@brucesantos/design-space 0.1.0 → 0.2.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,52 +1,52 @@
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-MPoK6VR1.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-MPoK6VR1.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 c, jsx as a, Fragment as M } from "react/jsx-runtime";
2
+ import { useState as x, useEffect as E, useMemo as y, useCallback as C, useContext as ae, createContext as ne, forwardRef as re, useRef as se } from "react";
3
+ import { v as oe, P as f, N as Y, s as ie, c as de, g as ce } from "./contrast-BXd_acxo.js";
4
+ import { C as lt, S as ut, a as ht, b as mt, d as pt, e as bt, f as ft, h as vt, i as gt, j as wt, p as Nt, r as kt, k as _t, l as yt, m as St } from "./contrast-BXd_acxo.js";
5
+ function le(e) {
6
+ const t = new Map(e.scenarios.map((u) => [u.id, u])), n = new Map(e.personas.map((u) => [u.id, u])), s = new Map(e.fixtures.map((u) => [u.id, u])), r = new Map((e.rules ?? []).map((u) => [u.id, u])), o = new Map(e.modules.map((u) => [u.id, u])), d = new Map(
7
+ e.modules.flatMap((u) => (u.flows ?? []).map((h) => [h.id, h]))
8
+ ), l = e.modules.map((u) => ({
9
+ module: u,
10
+ scenarios: e.scenarios.filter((h) => h.id.split(".")[0] === u.id)
11
+ })), m = new Set(l.flatMap((u) => u.scenarios.map((h) => h.id))), i = e.scenarios.filter((u) => !m.has(u.id)), p = (u) => u ? t.get(u) : void 0, g = (u) => u ? n.get(u) : void 0, v = (u) => u ? u.permissions ? u.permissions : g(u.persona)?.permissions ?? [] : [];
12
12
  return {
13
13
  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];
14
+ tree: l,
15
+ orphans: i,
16
+ issues: oe(e),
17
+ scenario: p,
18
+ persona: g,
19
+ fixture: (u) => u ? s.get(u) : void 0,
20
+ rule: (u) => u ? r.get(u) : void 0,
21
+ module: (u) => u ? o.get(u) : void 0,
22
+ flow: (u) => u ? d.get(u) : void 0,
23
+ rulesOf: (u) => (u?.rules ?? []).map((h) => r.get(h)).filter((h) => !!h),
24
+ permissionsOf: v,
25
+ scenariosForRoute: (u) => {
26
+ const h = u.split("?")[0];
27
27
  return e.scenarios.filter((b) => b.route.split("?")[0] === h);
28
28
  },
29
- search: (i) => {
30
- const h = W(i);
29
+ search: (u) => {
30
+ const h = z(u);
31
31
  return h ? e.scenarios.filter((b) => {
32
- const y = l.get(b.id.split(".")[0] ?? "")?.name ?? "";
33
- return W(
32
+ const w = o.get(b.id.split(".")[0] ?? "")?.name ?? "";
33
+ return z(
34
34
  [
35
35
  b.title,
36
36
  b.id,
37
37
  b.intent ?? "",
38
38
  b.route,
39
- y,
40
- r.get(b.persona)?.name ?? "",
39
+ w,
40
+ n.get(b.persona)?.name ?? "",
41
41
  (b.tags ?? []).join(" "),
42
42
  (b.expected ?? []).join(" ")
43
43
  ].join(" ")
44
44
  ).includes(h);
45
45
  }) : e.scenarios;
46
46
  },
47
- byStatus: (i) => e.scenarios.filter((h) => h.status === i),
47
+ byStatus: (u) => e.scenarios.filter((h) => h.status === u),
48
48
  coverage: () => {
49
- const i = {
49
+ const u = {
50
50
  proposed: 0,
51
51
  "in-review": 0,
52
52
  approved: 0,
@@ -54,137 +54,137 @@ function oe(e) {
54
54
  implemented: 0,
55
55
  superseded: 0
56
56
  };
57
- for (const h of e.scenarios) i[h.status] += 1;
58
- return i;
57
+ for (const h of e.scenarios) u[h.status] += 1;
58
+ return u;
59
59
  }
60
60
  };
61
61
  }
62
- function W(e) {
62
+ function z(e) {
63
63
  return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim();
64
64
  }
65
- const Y = [
65
+ const G = [
66
66
  { id: "fit", label: "Ajustar" },
67
67
  { id: "mobile", label: "Celular", width: 390, height: 844 },
68
68
  { id: "tablet", label: "Tablet", width: 834, height: 1112 },
69
69
  { id: "desktop", label: "Desktop", width: 1440, height: 900 },
70
70
  { 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));
71
+ ], Q = [1, 1.25, 1.5, 2];
72
+ function ue(e, t) {
73
+ const n = new URLSearchParams(e), s = n.get(f.scenario) ?? void 0, r = t.scenario(s), o = n.get(f.network), d = Number(n.get(f.textScale));
74
74
  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",
75
+ scenario: r?.id,
76
+ persona: n.get(f.persona) ?? r?.persona,
77
+ fixture: n.get(f.fixture) ?? r?.fixture,
78
+ network: pe(o) ? o : r?.network ?? "success",
79
+ viewport: n.get(f.viewport) ?? "fit",
80
+ customWidth: be(n.get(f.customWidth)),
81
+ themeMode: n.get(f.themeMode) ?? t.product.theme?.modes?.[0],
82
+ locale: n.get(f.locale) ?? t.product.theme?.locales?.[0],
83
+ dataSource: n.get(f.dataSource) ?? t.product.dataSources?.default ?? "fixtures",
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(f.chrome) !== "0",
87
+ keyboardMode: n.get(f.keyboardMode) === "1",
88
+ reducedMotion: n.get(f.reducedMotion) === "1",
89
+ textScale: Q.includes(d) ? d : 1,
90
+ inspector: n.get(f.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 U(e, t) {
94
+ const n = new URLSearchParams(), s = t.scenario(e.scenario);
95
+ e.scenario && n.set(f.scenario, e.scenario), e.persona && e.persona !== s?.persona && n.set(f.persona, e.persona), e.fixture && e.fixture !== s?.fixture && n.set(f.fixture, e.fixture), e.network !== (s?.network ?? "success") && n.set(f.network, e.network), e.viewport !== "fit" && n.set(f.viewport, e.viewport), e.viewport === "custom" && e.customWidth && n.set(f.customWidth, String(e.customWidth));
96
+ const r = t.product.theme?.modes?.[0];
97
+ e.themeMode && e.themeMode !== r && n.set(f.themeMode, e.themeMode);
98
+ const o = t.product.theme?.locales?.[0];
99
+ e.locale && e.locale !== o && n.set(f.locale, e.locale);
100
+ const d = t.product.dataSources?.default ?? "fixtures";
101
+ e.dataSource && e.dataSource !== d && n.set(f.dataSource, e.dataSource), e.chrome || n.set(f.chrome, "0"), e.keyboardMode && n.set(f.keyboardMode, "1"), e.reducedMotion && n.set(f.reducedMotion, "1"), e.textScale !== 1 && n.set(f.textScale, String(e.textScale)), e.inspector || n.set(f.inspector, "0");
102
+ const l = n.toString();
103
+ return l ? `?${l}` : "";
104
104
  }
105
- function de(e) {
106
- const [t, r] = _(() => U());
105
+ function he(e) {
106
+ const [t, n] = x(() => K());
107
107
  E(() => {
108
- const m = () => r(U());
109
- return window.addEventListener("popstate", m), () => window.removeEventListener("popstate", m);
108
+ const i = () => n(K());
109
+ return window.addEventListener("popstate", i), () => window.removeEventListener("popstate", i);
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 = y(() => ue(t.search, e), [t.search, e]), r = C((i, p, g = !1) => {
112
+ const v = `${i}${p}`;
113
+ g ? window.history.replaceState(null, "", v) : window.history.pushState(null, "", v), n({ path: i, search: p });
114
+ }, []), o = C(
115
+ (i) => {
116
+ const p = { ...s, ...i };
117
+ r(t.path, U(p, 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, r, e]
120
+ ), d = C(
121
+ (i, p) => {
122
+ const [g, v] = i.split("?"), u = g || "/", h = v ? `?${v}` : t.search;
123
+ r(u, h, p?.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, r]
126
+ ), l = C(
127
+ (i) => {
128
+ const p = e.scenario(i);
129
+ if (!p) return;
130
+ const g = {
131
+ ...s,
132
+ scenario: p.id,
133
+ persona: p.persona,
134
+ fixture: p.fixture,
135
+ network: p.network ?? "success"
136
136
  };
137
- s(f.route, H(v, e), !1);
137
+ r(p.route, U(g, e), !1);
138
138
  },
139
- [n, s, e]
140
- ), u = k(() => ce(n), [n]);
141
- return { location: t, controls: n, viewport: u, setControls: l, navigate: c, openScenario: o };
139
+ [s, r, e]
140
+ ), m = y(() => me(s), [s]);
141
+ return { location: t, controls: s, viewport: m, setControls: o, navigate: d, openScenario: l };
142
142
  }
143
- function ce(e) {
144
- const t = Y.find((r) => r.id === e.viewport);
143
+ function me(e) {
144
+ const t = G.find((n) => n.id === e.viewport);
145
145
  return e.viewport === "custom" ? { id: "custom", label: "Personalizado", width: e.customWidth ?? 1024 } : t ?? { id: "fit", label: "Ajustar" };
146
146
  }
147
- function U() {
147
+ function K() {
148
148
  return typeof window > "u" ? { path: "/", search: "" } : { path: window.location.pathname, search: window.location.search };
149
149
  }
150
- function le(e) {
151
- return e !== null && q.includes(e);
150
+ function pe(e) {
151
+ return e !== null && Y.includes(e);
152
152
  }
153
- function ue(e) {
153
+ function be(e) {
154
154
  if (!e) return;
155
155
  const t = Number.parseInt(e, 10);
156
156
  return Number.isFinite(t) && t > 0 ? t : void 0;
157
157
  }
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;
158
+ function fe(e, t) {
159
+ const n = e.split("/").filter(Boolean), s = ge(t).split("/").filter(Boolean), r = {};
160
+ for (const [o, d] of n.entries()) {
161
+ if (d === "*")
162
+ return r["*"] = s.slice(o).join("/"), r;
163
+ const l = s[o];
164
+ if (l === void 0) return null;
165
+ if (d.startsWith(":")) {
166
+ r[d.slice(1)] = l;
167
167
  continue;
168
168
  }
169
- if (c !== o) return null;
169
+ if (d !== l) return null;
170
170
  }
171
- return r.length !== n.length ? null : s;
171
+ return n.length !== s.length ? null : r;
172
172
  }
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 };
173
+ function ve(e, t) {
174
+ const n = [...e].sort((s, r) => V(r.path) - V(s.path));
175
+ for (const s of n) {
176
+ const r = fe(s.path, t);
177
+ if (r) return { definition: s, params: r };
178
178
  }
179
179
  }
180
- function K(e) {
180
+ function V(e) {
181
181
  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;
182
+ let n = t.length;
183
+ for (const s of t)
184
+ s === "*" ? n -= 2 : s.startsWith(":") ? n += 1 : n += 4;
185
+ return n;
186
186
  }
187
- function pe(e) {
187
+ function ge(e) {
188
188
  const t = e.split("?")[0] ?? e;
189
189
  try {
190
190
  return decodeURI(t);
@@ -192,84 +192,84 @@ function pe(e) {
192
192
  return t;
193
193
  }
194
194
  }
195
- const fe = 2500;
196
- class be extends Error {
195
+ const we = 2500;
196
+ class Ne extends Error {
197
197
  constructor(t) {
198
198
  super(`Falha de rede simulada no cenário "${t}".`), this.name = "SimulatedNetworkError";
199
199
  }
200
200
  }
201
- function F(e) {
201
+ function P(e) {
202
202
  if (e)
203
203
  return typeof e.data == "function" ? e.data() : e.data;
204
204
  }
205
205
  const O = {
206
206
  id: "fixtures",
207
207
  label: "Fixtures",
208
- load: async ({ scenario: e, fixture: t, network: r }) => {
209
- switch (r) {
208
+ load: async ({ scenario: e, fixture: t, network: n }) => {
209
+ switch (n) {
210
210
  case "empty":
211
211
  return null;
212
212
  case "error":
213
- throw new be(e.id);
213
+ throw new Ne(e.id);
214
214
  case "loading":
215
215
  return new Promise(() => {
216
216
  });
217
217
  case "slow":
218
- return await ve(fe), F(t);
218
+ return await ke(we), P(t);
219
219
  default:
220
- return F(t);
220
+ return P(t);
221
221
  }
222
222
  }
223
223
  };
224
- function Je(e) {
225
- const { id: t, label: r, baseUrl: n, path: s, init: l, fallbackToFixture: c = !0 } = e;
224
+ function et(e) {
225
+ const { id: t, label: n, baseUrl: s, path: r, init: o, fallbackToFixture: d = !0 } = e;
226
226
  return {
227
227
  id: t,
228
- label: r,
229
- load: async (o) => {
230
- const u = new URL(s ? s(o) : o.scenario.route, n);
228
+ label: n,
229
+ load: async (l) => {
230
+ const m = new URL(r ? r(l) : l.scenario.route, s);
231
231
  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 });
232
+ const i = await fetch(m, o);
233
+ if (!i.ok) throw new Error(`${i.status} ${i.statusText}`);
234
+ return await i.json();
235
+ } catch (i) {
236
+ if (d) return P(l.fixture);
237
+ throw new Error(`Adapter "${t}" falhou em ${m.toString()}`, { cause: i });
238
238
  }
239
239
  }
240
240
  };
241
241
  }
242
- function ve(e) {
242
+ function ke(e) {
243
243
  return new Promise((t) => setTimeout(t, e));
244
244
  }
245
- function ge(e) {
246
- const { scenario: t, fixture: r, network: n, adapter: s } = e, [l, c] = _({
245
+ function _e(e) {
246
+ const { scenario: t, fixture: n, network: s, adapter: r } = e, [o, d] = x({
247
247
  data: void 0,
248
248
  isLoading: !!t,
249
249
  error: void 0
250
250
  });
251
251
  return E(() => {
252
252
  if (!t) {
253
- c({ data: void 0, isLoading: !1, error: void 0 });
253
+ d({ data: void 0, isLoading: !1, error: void 0 });
254
254
  return;
255
255
  }
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({
256
+ let l = !0;
257
+ d({ data: void 0, isLoading: !0, error: void 0 });
258
+ const m = r ?? O;
259
+ return Promise.resolve(m.load({ scenario: t, fixture: n, network: s })).then((i) => {
260
+ l && d({ data: i, isLoading: !1, error: void 0 });
261
+ }).catch((i) => {
262
+ l && d({
263
263
  data: void 0,
264
264
  isLoading: !1,
265
- error: m instanceof Error ? m : new Error(String(m))
265
+ error: i instanceof Error ? i : new Error(String(i))
266
266
  });
267
267
  }), () => {
268
- o = !1;
268
+ l = !1;
269
269
  };
270
- }, [t, r, n, s]), l;
270
+ }, [t, n, s, r]), o;
271
271
  }
272
- const Ne = {
272
+ const ye = {
273
273
  a: "link",
274
274
  article: "article",
275
275
  aside: "complementary",
@@ -303,7 +303,7 @@ const Ne = {
303
303
  th: "columnheader",
304
304
  tr: "row",
305
305
  ul: "list"
306
- }, we = {
306
+ }, Se = {
307
307
  button: "button",
308
308
  checkbox: "checkbox",
309
309
  email: "textbox",
@@ -318,65 +318,65 @@ const Ne = {
318
318
  text: "textbox",
319
319
  url: "textbox"
320
320
  };
321
- function _e(e) {
321
+ function xe(e) {
322
322
  if (!e || !(e instanceof HTMLElement)) return;
323
- const { name: t, nameFrom: r } = xe(e);
323
+ const { name: t, nameFrom: n } = Ce(e);
324
324
  return {
325
- role: ke(e),
325
+ role: Me(e),
326
326
  name: t,
327
- nameFrom: r,
328
- description: Se(e),
329
- states: ye(e),
330
- selector: Ee(e),
327
+ nameFrom: n,
328
+ description: Te(e),
329
+ states: Ae(e),
330
+ selector: $e(e),
331
331
  hiddenFromTabOrder: e.tabIndex < 0,
332
- hiddenFromAssistiveTech: Me(e)
332
+ hiddenFromAssistiveTech: Ee(e)
333
333
  };
334
334
  }
335
- function ke(e) {
335
+ function Me(e) {
336
336
  const t = e.getAttribute("role");
337
337
  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";
338
+ const n = e.tagName.toLowerCase();
339
+ if (n === "input") {
340
+ const s = e.type.toLowerCase();
341
+ return Se[s] ?? "textbox";
342
342
  }
343
- return r === "a" && !e.hasAttribute("href") ? "generic" : Ne[r] ?? "generic";
343
+ return n === "a" && !e.hasAttribute("href") ? "generic" : ye[n] ?? "generic";
344
344
  }
345
- function xe(e) {
345
+ function Ce(e) {
346
346
  const t = e.getAttribute("aria-labelledby");
347
347
  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" };
348
+ const d = t.split(/\s+/).map((l) => e.ownerDocument.getElementById(l)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
349
+ if (d) return { name: d, nameFrom: "aria-labelledby" };
350
350
  }
351
- const r = e.getAttribute("aria-label")?.trim();
352
- if (r) return { name: r, nameFrom: "aria-label" };
351
+ const n = e.getAttribute("aria-label")?.trim();
352
+ if (n) return { name: n, nameFrom: "aria-label" };
353
353
  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" };
354
+ const d = Array.from(e.labels ?? []).map((l) => l.textContent?.trim() ?? "").filter(Boolean);
355
+ if (d.length) return { name: d.join(" "), nameFrom: "label" };
356
356
  }
357
357
  if (e instanceof HTMLImageElement) {
358
- const c = e.getAttribute("alt");
359
- if (c !== null) return { name: c, nameFrom: "alt" };
358
+ const d = e.getAttribute("alt");
359
+ if (d !== null) return { name: d, nameFrom: "alt" };
360
360
  }
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" };
361
+ const s = e.getAttribute("title")?.trim(), r = Le(e);
362
+ return r ? { name: r, 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
363
  }
364
- function Se(e) {
364
+ function Te(e) {
365
365
  const t = e.getAttribute("aria-describedby");
366
366
  if (t) {
367
- const r = t.split(/\s+/).map((n) => e.ownerDocument.getElementById(n)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
368
- if (r) return r;
367
+ const n = t.split(/\s+/).map((s) => e.ownerDocument.getElementById(s)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
368
+ if (n) return n;
369
369
  }
370
370
  return e.getAttribute("aria-description")?.trim() || void 0;
371
371
  }
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}`);
372
+ function Ae(e) {
373
+ const t = [], n = (s, r = s.replace("aria-", "")) => {
374
+ const o = e.getAttribute(s);
375
+ o !== null && o !== "false" && t.push(o === "true" || o === "" ? r : `${r}=${o}`);
376
376
  };
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)];
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"), 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
378
  }
379
- function Me(e) {
379
+ function Ee(e) {
380
380
  let t = e;
381
381
  for (; t; ) {
382
382
  if (t.getAttribute("aria-hidden") === "true" || t.hasAttribute("hidden")) return !0;
@@ -384,21 +384,21 @@ function Me(e) {
384
384
  }
385
385
  return !1;
386
386
  }
387
- function Ce(e) {
387
+ function Le(e) {
388
388
  const t = e.cloneNode(!0);
389
- for (const r of t.querySelectorAll("[aria-hidden='true'],[hidden]"))
390
- r.remove();
389
+ for (const n of t.querySelectorAll("[aria-hidden='true'],[hidden]"))
390
+ n.remove();
391
391
  return (t.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 160);
392
392
  }
393
- function Ee(e) {
393
+ function $e(e) {
394
394
  const t = e.tagName.toLowerCase();
395
395
  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;
396
+ const n = e.getAttribute("data-testid");
397
+ if (n) return `${t}[data-testid="${n}"]`;
398
+ const s = Array.from(e.classList).slice(0, 2);
399
+ return s.length ? `${t}.${s.join(".")}` : t;
400
400
  }
401
- function Te(e = document) {
401
+ function Fe(e = document) {
402
402
  const t = [
403
403
  "a[href]",
404
404
  "button",
@@ -409,215 +409,345 @@ function Te(e = document) {
409
409
  "[tabindex]",
410
410
  "[contenteditable='true']"
411
411
  ].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;
412
+ return Array.from(e.querySelectorAll(t)).filter((n) => {
413
+ if (n.tabIndex < 0 || n.disabled || n.getAttribute("aria-hidden") === "true") return !1;
414
+ const s = window.getComputedStyle(n);
415
+ return s.display === "none" || s.visibility === "hidden" ? !1 : n.offsetWidth > 0 || n.offsetHeight > 0 || n === document.activeElement;
416
416
  });
417
417
  }
418
- function Ae(e, t) {
419
- const [r, n] = _(), [s, l] = _([]), c = M(() => {
420
- const o = t.current;
421
- if (!o) {
422
- l([]);
418
+ function Pe(e, t) {
419
+ const [n, s] = x(), [r, o] = x([]), d = C(() => {
420
+ const l = t.current;
421
+ if (!l) {
422
+ o([]);
423
423
  return;
424
424
  }
425
- l(
426
- Te(o).map((u, m) => ({
427
- index: m + 1,
428
- element: u,
429
- rect: u.getBoundingClientRect(),
430
- forcedOrder: u.tabIndex > 0
425
+ o(
426
+ Fe(l).map((m, i) => ({
427
+ index: i + 1,
428
+ element: m,
429
+ rect: m.getBoundingClientRect(),
430
+ forcedOrder: m.tabIndex > 0
431
431
  }))
432
432
  );
433
433
  }, [t]);
434
434
  return E(() => {
435
435
  if (!e) {
436
- n(void 0), l([]);
436
+ s(void 0), o([]);
437
437
  return;
438
438
  }
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();
439
+ const l = () => s(xe(document.activeElement));
440
+ document.addEventListener("focusin", l), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0), l(), d();
441
+ const m = t.current, i = m ? new MutationObserver(() => d()) : void 0;
442
+ return i?.observe(m, { childList: !0, subtree: !0, attributes: !0 }), () => {
443
+ document.removeEventListener("focusin", l), window.removeEventListener("resize", d), window.removeEventListener("scroll", d, !0), i?.disconnect();
444
444
  };
445
- }, [e, c, t]), { focused: r, tabStops: s, refresh: c };
445
+ }, [e, d, t]), { focused: n, tabStops: r, refresh: d };
446
446
  }
447
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"
448
+ status: {
449
+ proposed: "Proposta",
450
+ "in-review": "Em revisão",
451
+ approved: "Aprovado",
452
+ "in-implementation": "Em implementação",
453
+ implemented: "Implementado",
454
+ superseded: "Superado"
455
+ },
456
+ statusMeaning: {
457
+ proposed: "Exploração ainda não aprovada.",
458
+ "in-review": "Aberto para validação de design, negócio ou cliente.",
459
+ approved: "Referência autorizada, registrada por URL de commit.",
460
+ "in-implementation": "Ligado a um trabalho ativo de engenharia.",
461
+ implemented: "Disponível no produto real e validado.",
462
+ superseded: "Mantido para histórico ou substituído por outra decisão."
463
+ },
464
+ network: {
465
+ success: "Sucesso",
466
+ loading: "Carregando",
467
+ empty: "Vazio",
468
+ error: "Erro",
469
+ slow: "Lento"
470
+ },
471
+ keyboard: {
472
+ full: "Jornada completável só por teclado",
473
+ partial: "Parcialmente operável por teclado",
474
+ "not-applicable": "Não se aplica"
475
+ },
476
+ viewport: {
477
+ fit: "Ajustar",
478
+ mobile: "Celular",
479
+ tablet: "Tablet",
480
+ desktop: "Desktop",
481
+ custom: "Personalizado"
482
+ },
483
+ topbar: {
484
+ toggleNav: "Mostrar ou ocultar a navegação",
485
+ copyLink: "Copiar link",
486
+ copied: "Link copiado",
487
+ copyPrompt: "Copie o link do cenário:",
488
+ cleanReview: "Revisão limpa",
489
+ cleanReviewTitle: "Ocultar o chrome do Design Space para revisão limpa e captura de tela",
490
+ panel: "Painel",
491
+ branchTitle: (e) => `Branch: ${e}`,
492
+ commitTitle: (e) => `Commit: ${e}`,
493
+ envTitle: (e) => `Ambiente: ${e}`
494
+ },
495
+ sidebar: {
496
+ region: "Cenários do produto",
497
+ searchPlaceholder: "Buscar situação…",
498
+ searchLabel: "Buscar cenário pelo vocabulário do produto",
499
+ noMatch: (e) => `Nenhuma situação para "${e}".`,
500
+ matchCount: (e) => `${e} ${e === 1 ? "situação" : "situações"}.`,
501
+ emptyModule: "Nenhum cenário ainda.",
502
+ withoutModule: "Sem módulo"
503
+ },
504
+ controls: {
505
+ region: "Controles do cenário",
506
+ persona: "Persona",
507
+ fixture: "Dados",
508
+ network: "Rede",
509
+ viewport: "Viewport",
510
+ customWidth: "Largura personalizada em pixels",
511
+ theme: "Tema",
512
+ locale: "Idioma",
513
+ dataSource: "Fonte",
514
+ fixturesOption: "Fixtures",
515
+ a11y: "Acessibilidade",
516
+ keyboardMode: "Teclado",
517
+ keyboardModeTitle: "Percorrer a jornada só por teclado, com foco visível e ordem de tabulação evidenciada",
518
+ reducedMotion: "Movimento",
519
+ reducedMotionTitle: "Reduzir movimento dentro do palco",
520
+ textScale: "Ampliação de texto",
521
+ none: "—"
522
+ },
523
+ inspector: {
524
+ region: "Painel de contexto",
525
+ tabScenario: "Cenário",
526
+ tabA11y: "Acessibilidade",
527
+ tabDiagnostics: "Diagnóstico",
528
+ diagnosticsWithErrors: (e) => `Diagnóstico (${e})`,
529
+ noScenario: "Nenhum cenário ativo. Escolha uma situação na navegação para ver contexto, regras e critérios.",
530
+ situation: "Situação",
531
+ reproduction: "Reprodução",
532
+ id: "Id",
533
+ route: "Rota",
534
+ persona: "Persona",
535
+ personaSwapped: "trocada",
536
+ data: "Dados",
537
+ network: "Rede",
538
+ goal: (e) => `Objetivo: ${e}`,
539
+ permissions: "Permissões efetivas",
540
+ preconditions: "Pré-condições",
541
+ rules: "Regras",
542
+ actions: "Ações disponíveis",
543
+ expected: "Critérios de aceite",
544
+ approval: "Aprovação",
545
+ openApproved: "Abrir a versão aprovada",
546
+ engineering: "Engenharia",
547
+ a11yContract: "Contrato do cenário",
548
+ keyboard: "Teclado",
549
+ contrast: "Contraste",
550
+ contrastTarget: (e) => `WCAG 2.2 ${e}`,
551
+ announces: "Precisa ser anunciado:",
552
+ focusedElement: "Elemento em foco",
553
+ keyboardModeOff: "Ligue o modo teclado na barra de controles para inspecionar a árvore acessível.",
554
+ pressTab: (e) => `Pressione Tab dentro do palco. ${e} paradas de tabulação foram encontradas.`,
555
+ role: "Papel",
556
+ name: "Nome",
557
+ noAccessibleName: "sem nome acessível",
558
+ nameFrom: "Nome vem de",
559
+ description: "Descrição",
560
+ selector: "Seletor",
561
+ focusableButHidden: "Este elemento é focável mas está escondido de tecnologia assistiva. Um leitor de tela recebe foco sem receber conteúdo.",
562
+ tabStopsInStage: (e) => `${e} paradas de tabulação no palco.`,
563
+ tokenContrast: "Contraste dos tokens",
564
+ 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.",
565
+ pair: "Par",
566
+ ratio: "Razão",
567
+ pairsFailing: (e) => `${e} ${e === 1 ? "par" : "pares"} fora do alvo. O teste de tokens do produto falha o build por isso.`,
568
+ 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.",
569
+ coverage: "Cobertura por status",
570
+ scenariosRegistered: (e) => `${e} cenários registrados.`,
571
+ scenarioContract: "Contrato de cenário",
572
+ noIssues: "Nenhum problema encontrado."
573
+ },
574
+ home: {
575
+ 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"}.`,
576
+ withoutModule: "Sem módulo",
577
+ 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.",
578
+ emptyModule: "Nenhuma situação registrada neste módulo ainda.",
579
+ keyboardBadge: "teclado"
580
+ },
581
+ shell: {
582
+ restoreChrome: "Mostrar controles",
583
+ noRoute: "Nenhuma rota para este endereço",
584
+ noRouteHint: "não casa com nenhuma rota declarada. Escolha uma situação na navegação."
585
+ }
471
586
  };
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: [
587
+ function Oe(e) {
588
+ if (!e) return S;
589
+ const t = { ...S };
590
+ for (const n of Object.keys(S)) {
591
+ const s = e[n];
592
+ s && (t[n] = { ...S[n], ...s });
593
+ }
594
+ return t;
595
+ }
596
+ const J = ne(S);
597
+ function N() {
598
+ return ae(J);
599
+ }
600
+ const tt = S.status, at = S.statusMeaning, nt = S.network, rt = S.keyboard;
601
+ function Re({ registry: e, activeScenario: t, onOpenScenario: n }) {
602
+ const s = N(), [r, o] = x(""), [d, l] = x(/* @__PURE__ */ new Set()), m = y(() => {
603
+ if (r.trim())
604
+ return new Set(e.search(r).map((h) => h.id));
605
+ }, [r, e]), i = (h) => l((b) => {
606
+ const w = new Set(b);
607
+ return w.has(h) ? w.delete(h) : w.add(h), w;
608
+ }), p = (h) => m ? h.filter((b) => m.has(b.id)) : h, g = e.tree.map((h) => ({ ...h, scenarios: p(h.scenarios) })).filter((h) => m ? h.scenarios.length > 0 : !0), v = p(e.orphans), u = g.reduce((h, b) => h + b.scenarios.length, 0) + v.length;
609
+ return /* @__PURE__ */ c("nav", { className: "ds-chrome ds-sidebar", "aria-label": s.sidebar.region, children: [
481
610
  /* @__PURE__ */ a("div", { className: "ds-sidebar__search", children: /* @__PURE__ */ a(
482
611
  "input",
483
612
  {
484
613
  className: "ds-input ds-input--search",
485
614
  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)
615
+ value: r,
616
+ placeholder: s.sidebar.searchPlaceholder,
617
+ "aria-label": s.sidebar.searchLabel,
618
+ onChange: (h) => o(h.target.value)
490
619
  }
491
620
  ) }),
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(
621
+ /* @__PURE__ */ c("div", { className: "ds-sidebar__tree", children: [
622
+ r.trim() !== "" && /* @__PURE__ */ a("p", { className: "ds-sidebar__empty", role: "status", children: u === 0 ? s.sidebar.noMatch(r) : s.sidebar.matchCount(u) }),
623
+ g.map((h) => {
624
+ const b = !d.has(h.module.id) || !!m;
625
+ return /* @__PURE__ */ c("section", { className: "ds-module", children: [
626
+ /* @__PURE__ */ c(
498
627
  "button",
499
628
  {
500
629
  type: "button",
501
630
  className: "ds-module__header",
502
- "aria-expanded": h,
503
- onClick: () => u(i.module.id),
631
+ "aria-expanded": b,
632
+ onClick: () => i(h.module.id),
504
633
  children: [
505
634
  /* @__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 })
635
+ /* @__PURE__ */ a("span", { children: h.module.name }),
636
+ /* @__PURE__ */ a("span", { className: "ds-module__count", children: h.scenarios.length })
508
637
  ]
509
638
  }
510
639
  ),
511
- h && /* @__PURE__ */ d("ul", { className: "ds-module__scenarios", children: [
512
- i.scenarios.map((b) => /* @__PURE__ */ a(
513
- V,
640
+ b && /* @__PURE__ */ c("ul", { className: "ds-module__scenarios", children: [
641
+ h.scenarios.map((w) => /* @__PURE__ */ a(
642
+ q,
514
643
  {
515
- scenario: b,
516
- isActive: b.id === t,
517
- onOpen: r
644
+ scenario: w,
645
+ isActive: w.id === t,
646
+ onOpen: n
518
647
  },
519
- b.id
648
+ w.id
520
649
  )),
521
- i.scenarios.length === 0 && /* @__PURE__ */ a("li", { className: "ds-sidebar__empty", children: "Nenhum cenário ainda." })
650
+ h.scenarios.length === 0 && /* @__PURE__ */ a("li", { className: "ds-sidebar__empty", children: s.sidebar.emptyModule })
522
651
  ] })
523
- ] }, i.module.id);
652
+ ] }, h.module.id);
524
653
  }),
525
- v.length > 0 && /* @__PURE__ */ d("section", { className: "ds-module", children: [
526
- /* @__PURE__ */ d("div", { className: "ds-module__header", "aria-hidden": "true", children: [
654
+ v.length > 0 && /* @__PURE__ */ c("section", { className: "ds-module", children: [
655
+ /* @__PURE__ */ c("div", { className: "ds-module__header", "aria-hidden": "true", children: [
527
656
  /* @__PURE__ */ a("span", { className: "ds-module__chevron", children: "▶" }),
528
- /* @__PURE__ */ a("span", { children: "Sem módulo" }),
657
+ /* @__PURE__ */ a("span", { children: s.sidebar.withoutModule }),
529
658
  /* @__PURE__ */ a("span", { className: "ds-module__count", children: v.length })
530
659
  ] }),
531
- /* @__PURE__ */ a("ul", { className: "ds-module__scenarios", children: v.map((i) => /* @__PURE__ */ a(
532
- V,
660
+ /* @__PURE__ */ a("ul", { className: "ds-module__scenarios", children: v.map((h) => /* @__PURE__ */ a(
661
+ q,
533
662
  {
534
- scenario: i,
535
- isActive: i.id === t,
536
- onOpen: r
663
+ scenario: h,
664
+ isActive: h.id === t,
665
+ onOpen: n
537
666
  },
538
- i.id
667
+ h.id
539
668
  )) })
540
669
  ] })
541
670
  ] })
542
671
  ] });
543
672
  }
544
- function V({
673
+ function q({
545
674
  scenario: e,
546
675
  isActive: t,
547
- onOpen: r
676
+ onOpen: n
548
677
  }) {
549
- return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ d(
678
+ const s = N().status[e.status];
679
+ return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ c(
550
680
  "button",
551
681
  {
552
682
  type: "button",
553
683
  className: "ds-scenario",
554
684
  "aria-current": t,
555
- onClick: () => r(e.id),
685
+ onClick: () => n(e.id),
556
686
  children: [
557
687
  /* @__PURE__ */ a(
558
688
  "span",
559
689
  {
560
690
  className: "ds-status-dot",
561
691
  "data-status": e.status,
562
- title: S[e.status]
692
+ title: s
563
693
  }
564
694
  ),
565
695
  /* @__PURE__ */ a("span", { className: "ds-scenario__title", children: e.title }),
566
- /* @__PURE__ */ a("span", { className: "ds-visually-hidden", children: S[e.status] })
696
+ /* @__PURE__ */ a("span", { className: "ds-visually-hidden", children: s })
567
697
  ]
568
698
  }
569
699
  ) });
570
700
  }
571
- function $e({
701
+ function Ie({
572
702
  product: e,
573
703
  scenario: t,
574
- deploy: r,
575
- inspectorOpen: n,
576
- sidebarOpen: s,
577
- onToggleInspector: l,
578
- onToggleSidebar: c,
579
- onHideChrome: o
704
+ deploy: n,
705
+ inspectorOpen: s,
706
+ sidebarOpen: r,
707
+ onToggleInspector: o,
708
+ onToggleSidebar: d,
709
+ onHideChrome: l
580
710
  }) {
581
- const [u, m] = _(!1), f = async () => {
582
- const v = t ? re(t, { origin: r.origin }) : `${r.origin}${window.location.pathname}${window.location.search}`;
711
+ const m = N().topbar, [i, p] = x(!1), g = async () => {
712
+ const v = t ? ie(t, { origin: n.origin }) : `${n.origin}${window.location.pathname}${window.location.search}`;
583
713
  try {
584
714
  await navigator.clipboard.writeText(v);
585
715
  } catch {
586
- window.prompt("Copie o link do cenário:", v);
716
+ window.prompt(m.copyPrompt, v);
587
717
  }
588
- m(!0), window.setTimeout(() => m(!1), 1600);
718
+ p(!0), window.setTimeout(() => p(!1), 1600);
589
719
  };
590
- return /* @__PURE__ */ d("header", { className: "ds-chrome ds-topbar", children: [
720
+ return /* @__PURE__ */ c("header", { className: "ds-chrome ds-topbar", children: [
591
721
  /* @__PURE__ */ a(
592
722
  "button",
593
723
  {
594
724
  type: "button",
595
725
  className: "ds-btn ds-btn--ghost",
596
- "aria-pressed": s,
597
- onClick: c,
598
- title: "Mostrar ou ocultar a navegação",
726
+ "aria-pressed": r,
727
+ onClick: d,
728
+ title: m.toggleNav,
599
729
  children: "☰"
600
730
  }
601
731
  ),
602
- /* @__PURE__ */ d("div", { className: "ds-topbar__product", children: [
732
+ /* @__PURE__ */ c("div", { className: "ds-topbar__product", children: [
603
733
  /* @__PURE__ */ a("span", { children: e.name }),
604
734
  e.tagline && /* @__PURE__ */ a("span", { className: "ds-topbar__tagline", children: e.tagline })
605
735
  ] }),
606
736
  /* @__PURE__ */ a("div", { className: "ds-topbar__spacer" }),
607
- /* @__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 })
737
+ /* @__PURE__ */ c("div", { className: "ds-topbar__meta", children: [
738
+ n.branch && /* @__PURE__ */ a("code", { title: m.branchTitle(n.branch), children: n.branch.length > 28 ? `${n.branch.slice(0, 27)}…` : n.branch }),
739
+ n.commit && /* @__PURE__ */ a("code", { title: m.commitTitle(n.commit), children: n.shortCommit }),
740
+ /* @__PURE__ */ a("code", { title: m.envTitle(n.env), children: n.env })
611
741
  ] }),
612
- /* @__PURE__ */ a("button", { type: "button", className: "ds-btn", onClick: f, children: u ? "Link copiado" : "Copiar link" }),
742
+ /* @__PURE__ */ a("button", { type: "button", className: "ds-btn", onClick: g, children: i ? m.copied : m.copyLink }),
613
743
  /* @__PURE__ */ a(
614
744
  "button",
615
745
  {
616
746
  type: "button",
617
747
  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"
748
+ onClick: l,
749
+ title: m.cleanReviewTitle,
750
+ children: m.cleanReview
621
751
  }
622
752
  ),
623
753
  /* @__PURE__ */ a(
@@ -625,72 +755,72 @@ function $e({
625
755
  {
626
756
  type: "button",
627
757
  className: "ds-btn",
628
- "aria-pressed": n,
629
- onClick: l,
630
- children: "Painel"
758
+ "aria-pressed": s,
759
+ onClick: o,
760
+ children: m.panel
631
761
  }
632
762
  )
633
763
  ] });
634
764
  }
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" }),
640
- /* @__PURE__ */ d(
765
+ function De({ registry: e, controls: t, onChange: n }) {
766
+ const s = N(), r = s.controls, { product: o } = e, d = o.dataSources?.adapters ?? [], l = o.theme?.modes ?? [], m = o.theme?.locales ?? [];
767
+ return /* @__PURE__ */ c("div", { className: "ds-chrome ds-controls", role: "group", "aria-label": r.region, children: [
768
+ /* @__PURE__ */ c("div", { className: "ds-field", children: [
769
+ /* @__PURE__ */ a("label", { htmlFor: "ds-persona", children: r.persona }),
770
+ /* @__PURE__ */ c(
641
771
  "select",
642
772
  {
643
773
  id: "ds-persona",
644
774
  className: "ds-select",
645
775
  value: t.persona ?? "",
646
- onChange: (o) => r({ persona: o.target.value || void 0 }),
776
+ onChange: (i) => n({ persona: i.target.value || void 0 }),
647
777
  children: [
648
- /* @__PURE__ */ a("option", { value: "", children: "—" }),
649
- n.personas.map((o) => /* @__PURE__ */ a("option", { value: o.id, children: o.name }, o.id))
778
+ /* @__PURE__ */ a("option", { value: "", children: r.none }),
779
+ o.personas.map((i) => /* @__PURE__ */ a("option", { value: i.id, children: i.name }, i.id))
650
780
  ]
651
781
  }
652
782
  )
653
783
  ] }),
654
- /* @__PURE__ */ d("div", { className: "ds-field", children: [
655
- /* @__PURE__ */ a("label", { htmlFor: "ds-fixture", children: "Dados" }),
656
- /* @__PURE__ */ d(
784
+ /* @__PURE__ */ c("div", { className: "ds-field", children: [
785
+ /* @__PURE__ */ a("label", { htmlFor: "ds-fixture", children: r.fixture }),
786
+ /* @__PURE__ */ c(
657
787
  "select",
658
788
  {
659
789
  id: "ds-fixture",
660
790
  className: "ds-select",
661
791
  value: t.fixture ?? "",
662
- onChange: (o) => r({ fixture: o.target.value || void 0 }),
792
+ onChange: (i) => n({ fixture: i.target.value || void 0 }),
663
793
  children: [
664
- /* @__PURE__ */ a("option", { value: "", children: "—" }),
665
- n.fixtures.map((o) => /* @__PURE__ */ a("option", { value: o.id, children: o.label }, o.id))
794
+ /* @__PURE__ */ a("option", { value: "", children: r.none }),
795
+ o.fixtures.map((i) => /* @__PURE__ */ a("option", { value: i.id, children: i.label }, i.id))
666
796
  ]
667
797
  }
668
798
  )
669
799
  ] }),
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(
800
+ /* @__PURE__ */ c("div", { className: "ds-field", children: [
801
+ /* @__PURE__ */ a("span", { className: "ds-field__label", id: "ds-network-label", children: r.network }),
802
+ /* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-network-label", children: Y.map((i) => /* @__PURE__ */ a(
673
803
  "button",
674
804
  {
675
805
  type: "button",
676
- "aria-pressed": t.network === o,
677
- onClick: () => r({ network: o }),
678
- children: Q[o]
806
+ "aria-pressed": t.network === i,
807
+ onClick: () => n({ network: i }),
808
+ children: s.network[i]
679
809
  },
680
- o
810
+ i
681
811
  )) })
682
812
  ] }),
683
- /* @__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(
813
+ /* @__PURE__ */ c("div", { className: "ds-field", children: [
814
+ /* @__PURE__ */ a("span", { className: "ds-field__label", id: "ds-viewport-label", children: r.viewport }),
815
+ /* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-viewport-label", children: G.map((i) => /* @__PURE__ */ a(
686
816
  "button",
687
817
  {
688
818
  type: "button",
689
- "aria-pressed": t.viewport === o.id,
690
- onClick: () => r({ viewport: o.id }),
691
- children: o.label
819
+ "aria-pressed": t.viewport === i.id,
820
+ onClick: () => n({ viewport: i.id }),
821
+ children: s.viewport[i.id] ?? i.label
692
822
  },
693
- o.id
823
+ i.id
694
824
  )) }),
695
825
  t.viewport === "custom" && /* @__PURE__ */ a(
696
826
  "input",
@@ -701,65 +831,65 @@ function Pe({ registry: e, controls: t, onChange: r }) {
701
831
  max: 3840,
702
832
  step: 10,
703
833
  style: { width: 88 },
704
- "aria-label": "Largura personalizada em pixels",
834
+ "aria-label": r.customWidth,
705
835
  value: t.customWidth ?? 1024,
706
- onChange: (o) => r({ customWidth: Number(o.target.value) || void 0 })
836
+ onChange: (i) => n({ customWidth: Number(i.target.value) || void 0 })
707
837
  }
708
838
  )
709
839
  ] }),
710
- l.length > 1 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
711
- /* @__PURE__ */ a("label", { htmlFor: "ds-theme", children: "Tema" }),
840
+ l.length > 1 && /* @__PURE__ */ c("div", { className: "ds-field", children: [
841
+ /* @__PURE__ */ a("label", { htmlFor: "ds-theme", children: r.theme }),
712
842
  /* @__PURE__ */ a(
713
843
  "select",
714
844
  {
715
845
  id: "ds-theme",
716
846
  className: "ds-select",
717
847
  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))
848
+ onChange: (i) => n({ themeMode: i.target.value }),
849
+ children: l.map((i) => /* @__PURE__ */ a("option", { value: i, children: i }, i))
720
850
  }
721
851
  )
722
852
  ] }),
723
- c.length > 1 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
724
- /* @__PURE__ */ a("label", { htmlFor: "ds-locale", children: "Idioma" }),
853
+ m.length > 1 && /* @__PURE__ */ c("div", { className: "ds-field", children: [
854
+ /* @__PURE__ */ a("label", { htmlFor: "ds-locale", children: r.locale }),
725
855
  /* @__PURE__ */ a(
726
856
  "select",
727
857
  {
728
858
  id: "ds-locale",
729
859
  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))
860
+ value: t.locale ?? m[0],
861
+ onChange: (i) => n({ locale: i.target.value }),
862
+ children: m.map((i) => /* @__PURE__ */ a("option", { value: i, children: i }, i))
733
863
  }
734
864
  )
735
865
  ] }),
736
- s.length > 0 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
737
- /* @__PURE__ */ a("label", { htmlFor: "ds-source", children: "Fonte" }),
738
- /* @__PURE__ */ d(
866
+ d.length > 0 && /* @__PURE__ */ c("div", { className: "ds-field", children: [
867
+ /* @__PURE__ */ a("label", { htmlFor: "ds-source", children: r.dataSource }),
868
+ /* @__PURE__ */ c(
739
869
  "select",
740
870
  {
741
871
  id: "ds-source",
742
872
  className: "ds-select",
743
873
  value: t.dataSource ?? "fixtures",
744
- onChange: (o) => r({ dataSource: o.target.value }),
874
+ onChange: (i) => n({ dataSource: i.target.value }),
745
875
  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))
876
+ /* @__PURE__ */ a("option", { value: "fixtures", children: r.fixturesOption }),
877
+ d.filter((i) => i.id !== "fixtures").map((i) => /* @__PURE__ */ a("option", { value: i.id, children: i.label }, i.id))
748
878
  ]
749
879
  }
750
880
  )
751
881
  ] }),
752
- /* @__PURE__ */ d("div", { className: "ds-field", children: [
753
- /* @__PURE__ */ a("span", { className: "ds-field__label", children: "Acessibilidade" }),
882
+ /* @__PURE__ */ c("div", { className: "ds-field", children: [
883
+ /* @__PURE__ */ a("span", { className: "ds-field__label", children: r.a11y }),
754
884
  /* @__PURE__ */ a(
755
885
  "button",
756
886
  {
757
887
  type: "button",
758
888
  className: "ds-btn",
759
889
  "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"
890
+ onClick: () => n({ keyboardMode: !t.keyboardMode }),
891
+ title: r.keyboardModeTitle,
892
+ children: r.keyboardMode
763
893
  }
764
894
  ),
765
895
  /* @__PURE__ */ a(
@@ -768,59 +898,59 @@ function Pe({ registry: e, controls: t, onChange: r }) {
768
898
  type: "button",
769
899
  className: "ds-btn",
770
900
  "aria-pressed": t.reducedMotion,
771
- onClick: () => r({ reducedMotion: !t.reducedMotion }),
772
- title: "Reduzir movimento dentro do palco",
773
- children: "Movimento"
901
+ onClick: () => n({ reducedMotion: !t.reducedMotion }),
902
+ title: r.reducedMotionTitle,
903
+ children: r.reducedMotion
774
904
  }
775
905
  ),
776
- /* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-label": "Ampliação de texto", children: G.map((o) => /* @__PURE__ */ a(
906
+ /* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-label": r.textScale, children: Q.map((i) => /* @__PURE__ */ a(
777
907
  "button",
778
908
  {
779
909
  type: "button",
780
- "aria-pressed": t.textScale === o,
781
- onClick: () => r({ textScale: o }),
782
- children: o === 1 ? "100%" : `${o * 100}%`
910
+ "aria-pressed": t.textScale === i,
911
+ onClick: () => n({ textScale: i }),
912
+ children: i === 1 ? "100%" : `${i * 100}%`
783
913
  },
784
- o
914
+ i
785
915
  )) })
786
916
  ] })
787
917
  ] });
788
918
  }
789
- function Re({
919
+ function Be({
790
920
  registry: e,
791
921
  scenario: t,
792
- controls: r,
793
- focusedNode: n,
794
- tabStopCount: s
922
+ controls: n,
923
+ focusedNode: s,
924
+ tabStopCount: r
795
925
  }) {
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: [
798
- /* @__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" })
926
+ const o = N().inspector, [d, l] = x("scenario"), m = e.issues.filter((i) => i.level === "error").length;
927
+ return /* @__PURE__ */ c("aside", { className: "ds-chrome ds-inspector", "aria-label": o.region, children: [
928
+ /* @__PURE__ */ c("div", { className: "ds-inspector__tabs", role: "tablist", children: [
929
+ /* @__PURE__ */ a(F, { id: "scenario", current: d, onSelect: l, children: o.tabScenario }),
930
+ /* @__PURE__ */ a(F, { id: "a11y", current: d, onSelect: l, children: o.tabA11y }),
931
+ /* @__PURE__ */ a(F, { id: "diagnostics", current: d, onSelect: l, children: m > 0 ? o.diagnosticsWithErrors(m) : o.tabDiagnostics })
802
932
  ] }),
803
- /* @__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,
933
+ /* @__PURE__ */ c("div", { className: "ds-inspector__body", role: "tabpanel", children: [
934
+ d === "scenario" && /* @__PURE__ */ a(We, { registry: e, scenario: t, controls: n }),
935
+ d === "a11y" && /* @__PURE__ */ a(
936
+ je,
807
937
  {
808
938
  registry: e,
809
939
  scenario: t,
810
- focusedNode: n,
811
- keyboardMode: r.keyboardMode,
812
- tabStopCount: s
940
+ focusedNode: s,
941
+ keyboardMode: n.keyboardMode,
942
+ tabStopCount: r
813
943
  }
814
944
  ),
815
- l === "diagnostics" && /* @__PURE__ */ a(Be, { registry: e })
945
+ d === "diagnostics" && /* @__PURE__ */ a(He, { registry: e })
816
946
  ] })
817
947
  ] });
818
948
  }
819
- function L({
949
+ function F({
820
950
  id: e,
821
951
  current: t,
822
- onSelect: r,
823
- children: n
952
+ onSelect: n,
953
+ children: s
824
954
  }) {
825
955
  return /* @__PURE__ */ a(
826
956
  "button",
@@ -828,164 +958,148 @@ function L({
828
958
  type: "button",
829
959
  role: "tab",
830
960
  "aria-selected": t === e,
831
- onClick: () => r(e),
832
- children: n
961
+ onClick: () => n(e),
962
+ children: s
833
963
  }
834
964
  );
835
965
  }
836
- function De({
966
+ function We({
837
967
  registry: e,
838
968
  scenario: t,
839
- controls: r
969
+ controls: n
840
970
  }) {
971
+ const s = N(), r = s.inspector;
841
972
  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: [
845
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
846
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Situação" }),
973
+ return /* @__PURE__ */ a("p", { className: "ds-block", children: r.noScenario });
974
+ const o = e.persona(n.persona ?? t.persona), d = n.persona ? e.persona(n.persona)?.permissions ?? [] : e.permissionsOf(t), l = e.rulesOf(t), m = e.fixture(n.fixture ?? t.fixture), i = !!(n.persona && n.persona !== t.persona);
975
+ return /* @__PURE__ */ c(M, { children: [
976
+ /* @__PURE__ */ c("div", { className: "ds-block", children: [
977
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.situation }),
847
978
  /* @__PURE__ */ a("p", { style: { color: "var(--ds-fg)", fontSize: 14, fontWeight: 600 }, children: t.title }),
848
979
  t.intent && /* @__PURE__ */ a("p", { children: t.intent }),
849
- /* @__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))
980
+ /* @__PURE__ */ c("div", { className: "ds-chips", children: [
981
+ /* @__PURE__ */ a("span", { className: "ds-chip", "data-tone": ze(t.status), children: s.status[t.status] }),
982
+ (t.tags ?? []).map((p) => /* @__PURE__ */ a("span", { className: "ds-chip", children: p }, p))
852
983
  ] }),
853
- /* @__PURE__ */ a("p", { style: { marginTop: 6 }, children: Le[t.status] })
984
+ /* @__PURE__ */ a("p", { style: { marginTop: 6 }, children: s.statusMeaning[t.status] })
854
985
  ] }),
855
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
856
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Reprodução" }),
857
- /* @__PURE__ */ d("dl", { className: "ds-kv", children: [
858
- /* @__PURE__ */ a("dt", { children: "Id" }),
986
+ /* @__PURE__ */ c("div", { className: "ds-block", children: [
987
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.reproduction }),
988
+ /* @__PURE__ */ c("dl", { className: "ds-kv", children: [
989
+ /* @__PURE__ */ a("dt", { children: r.id }),
859
990
  /* @__PURE__ */ a("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.id }),
860
- /* @__PURE__ */ a("dt", { children: "Rota" }),
991
+ /* @__PURE__ */ a("dt", { children: r.route }),
861
992
  /* @__PURE__ */ a("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.route }),
862
- /* @__PURE__ */ a("dt", { children: "Persona" }),
863
- /* @__PURE__ */ d("dd", { children: [
864
- n?.name ?? "—",
865
- o && /* @__PURE__ */ a("span", { className: "ds-chip", "data-tone": "warn", style: { marginLeft: 6 }, children: "trocada" })
993
+ /* @__PURE__ */ a("dt", { children: r.persona }),
994
+ /* @__PURE__ */ c("dd", { children: [
995
+ o?.name ?? "—",
996
+ i && /* @__PURE__ */ a("span", { className: "ds-chip", "data-tone": "warn", style: { marginLeft: 6 }, children: r.personaSwapped })
866
997
  ] }),
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] })
998
+ /* @__PURE__ */ a("dt", { children: r.data }),
999
+ /* @__PURE__ */ a("dd", { children: m?.label ?? "—" }),
1000
+ /* @__PURE__ */ a("dt", { children: r.network }),
1001
+ /* @__PURE__ */ a("dd", { children: s.network[n.network] })
871
1002
  ] }),
872
- n?.goal && /* @__PURE__ */ d("p", { style: { marginTop: 8 }, children: [
873
- "Objetivo: ",
874
- n.goal
875
- ] })
1003
+ o?.goal && /* @__PURE__ */ a("p", { style: { marginTop: 8 }, children: r.goal(o.goal) })
876
1004
  ] }),
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)) })
1005
+ d.length > 0 && /* @__PURE__ */ c("div", { className: "ds-block", children: [
1006
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.permissions }),
1007
+ /* @__PURE__ */ a("div", { className: "ds-chips", children: d.map((p) => /* @__PURE__ */ a("span", { className: "ds-chip", children: p }, p)) })
880
1008
  ] }),
881
- 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)) })
1009
+ t.preconditions?.length ? /* @__PURE__ */ c("div", { className: "ds-block", children: [
1010
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.preconditions }),
1011
+ /* @__PURE__ */ a("ul", { className: "ds-list", children: t.preconditions.map((p) => /* @__PURE__ */ a("li", { children: p }, p)) })
884
1012
  ] }) : 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))
1013
+ l.length > 0 && /* @__PURE__ */ c("div", { className: "ds-block", children: [
1014
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.rules }),
1015
+ l.map((p) => /* @__PURE__ */ c("div", { className: "ds-rule", children: [
1016
+ /* @__PURE__ */ a("span", { className: "ds-rule__id", children: p.id }),
1017
+ /* @__PURE__ */ a("span", { className: "ds-rule__statement", children: p.statement }),
1018
+ p.rationale && /* @__PURE__ */ a("p", { className: "ds-rule__rationale", children: p.rationale })
1019
+ ] }, p.id))
892
1020
  ] }),
893
- 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)) })
1021
+ t.actions?.length ? /* @__PURE__ */ c("div", { className: "ds-block", children: [
1022
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.actions }),
1023
+ /* @__PURE__ */ a("ul", { className: "ds-list", children: t.actions.map((p) => /* @__PURE__ */ a("li", { children: p }, p)) })
896
1024
  ] }) : null,
897
- 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)) })
1025
+ t.expected?.length ? /* @__PURE__ */ c("div", { className: "ds-block", children: [
1026
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.expected }),
1027
+ /* @__PURE__ */ a("ul", { className: "ds-list", children: t.expected.map((p) => /* @__PURE__ */ a("li", { children: p }, p)) })
900
1028
  ] }) : null,
901
- t.approvedAt && /* @__PURE__ */ d("div", { className: "ds-block", children: [
902
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Aprovação" }),
903
- /* @__PURE__ */ d("p", { children: [
1029
+ t.approvedAt && /* @__PURE__ */ c("div", { className: "ds-block", children: [
1030
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.approval }),
1031
+ /* @__PURE__ */ c("p", { children: [
904
1032
  t.approvedAt.date,
905
1033
  " · ",
906
1034
  /* @__PURE__ */ a("code", { children: t.approvedAt.commit.slice(0, 7) })
907
1035
  ] }),
908
- /* @__PURE__ */ a("a", { href: t.approvedAt.url, target: "_blank", rel: "noreferrer", children: "Abrir a versão aprovada" })
1036
+ /* @__PURE__ */ a("a", { href: t.approvedAt.url, target: "_blank", rel: "noreferrer", children: r.openApproved })
909
1037
  ] }),
910
- t.ticket && /* @__PURE__ */ d("div", { className: "ds-block", children: [
911
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Engenharia" }),
1038
+ t.ticket && /* @__PURE__ */ c("div", { className: "ds-block", children: [
1039
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: r.engineering }),
912
1040
  /* @__PURE__ */ a("p", { children: t.ticket })
913
1041
  ] })
914
1042
  ] });
915
1043
  }
916
- function Ie({
1044
+ function je({
917
1045
  registry: e,
918
1046
  scenario: t,
919
- focusedNode: r,
920
- keyboardMode: n,
921
- tabStopCount: s
1047
+ focusedNode: n,
1048
+ keyboardMode: s,
1049
+ tabStopCount: r
922
1050
  }) {
923
- const l = ne(e.product.theme?.contrastPairs), c = l.filter((o) => o.passes !== !0);
924
- return /* @__PURE__ */ d(x, { children: [
925
- t && /* @__PURE__ */ d("div", { className: "ds-block", children: [
926
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Contrato do cenário" }),
927
- /* @__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
- ] })
1051
+ const o = N(), d = o.inspector, l = de(e.product.theme?.contrastPairs), m = l.filter((i) => i.passes !== !0);
1052
+ return /* @__PURE__ */ c(M, { children: [
1053
+ t && /* @__PURE__ */ c("div", { className: "ds-block", children: [
1054
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: d.a11yContract }),
1055
+ /* @__PURE__ */ c("dl", { className: "ds-kv", children: [
1056
+ /* @__PURE__ */ a("dt", { children: d.keyboard }),
1057
+ /* @__PURE__ */ a("dd", { children: o.keyboard[t.a11y.keyboard] }),
1058
+ /* @__PURE__ */ a("dt", { children: d.contrast }),
1059
+ /* @__PURE__ */ a("dd", { children: d.contrastTarget(t.a11y.contrast) })
935
1060
  ] }),
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)) })
1061
+ t.a11y.announces?.length ? /* @__PURE__ */ c(M, { children: [
1062
+ /* @__PURE__ */ a("p", { style: { marginTop: 8 }, children: d.announces }),
1063
+ /* @__PURE__ */ a("div", { className: "ds-chips", children: t.a11y.announces.map((i) => /* @__PURE__ */ a("span", { className: "ds-chip", children: i }, i)) })
939
1064
  ] }) : null,
940
1065
  t.a11y.notes && /* @__PURE__ */ a("p", { style: { marginTop: 8 }, children: t.a11y.notes })
941
1066
  ] }),
942
- /* @__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: [
945
- /* @__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 })
1067
+ /* @__PURE__ */ c("div", { className: "ds-block", children: [
1068
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: d.focusedElement }),
1069
+ s ? n ? /* @__PURE__ */ c(M, { children: [
1070
+ /* @__PURE__ */ c("dl", { className: "ds-kv", children: [
1071
+ /* @__PURE__ */ a("dt", { children: d.role }),
1072
+ /* @__PURE__ */ a("dd", { children: n.role }),
1073
+ /* @__PURE__ */ a("dt", { children: d.name }),
1074
+ /* @__PURE__ */ a("dd", { children: n.name ? n.name : /* @__PURE__ */ a("span", { style: { color: "var(--ds-err)" }, children: d.noAccessibleName }) }),
1075
+ /* @__PURE__ */ a("dt", { children: d.nameFrom }),
1076
+ /* @__PURE__ */ a("dd", { children: n.nameFrom }),
1077
+ n.description ? /* @__PURE__ */ c(M, { children: [
1078
+ /* @__PURE__ */ a("dt", { children: d.description }),
1079
+ /* @__PURE__ */ a("dd", { children: n.description })
955
1080
  ] }) : null,
956
- /* @__PURE__ */ a("dt", { children: "Seletor" }),
957
- /* @__PURE__ */ a("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: r.selector })
1081
+ /* @__PURE__ */ a("dt", { children: d.selector }),
1082
+ /* @__PURE__ */ a("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: n.selector })
958
1083
  ] }),
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." })
1084
+ n.states.length > 0 && /* @__PURE__ */ a("div", { className: "ds-chips", style: { marginTop: 8 }, children: n.states.map((i) => /* @__PURE__ */ a("span", { className: "ds-chip", children: i }, i)) }),
1085
+ n.hiddenFromAssistiveTech && /* @__PURE__ */ a("p", { className: "ds-note", style: { marginTop: 8 }, children: d.focusableButHidden }),
1086
+ /* @__PURE__ */ a("p", { style: { marginTop: 8 }, children: d.tabStopsInStage(r) })
1087
+ ] }) : /* @__PURE__ */ a("p", { children: d.pressTab(r) }) : /* @__PURE__ */ a("p", { children: d.keyboardModeOff })
970
1088
  ] }),
971
- /* @__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" })
1089
+ /* @__PURE__ */ c("div", { className: "ds-block", children: [
1090
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: d.tokenContrast }),
1091
+ l.length === 0 ? /* @__PURE__ */ a("p", { children: d.noContrastPairs }) : /* @__PURE__ */ c("table", { className: "ds-contrast", children: [
1092
+ /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ c("tr", { children: [
1093
+ /* @__PURE__ */ a("th", { scope: "col", children: d.pair }),
1094
+ /* @__PURE__ */ a("th", { scope: "col", children: d.ratio })
981
1095
  ] }) }),
982
- /* @__PURE__ */ a("tbody", { children: l.map((o) => /* @__PURE__ */ d("tr", { children: [
983
- /* @__PURE__ */ d("td", { children: [
1096
+ /* @__PURE__ */ a("tbody", { children: l.map((i) => /* @__PURE__ */ c("tr", { children: [
1097
+ /* @__PURE__ */ c("td", { children: [
984
1098
  /* @__PURE__ */ a(
985
1099
  "span",
986
1100
  {
987
1101
  className: "ds-swatch",
988
- style: { background: o.pair.background },
1102
+ style: { background: i.pair.background },
989
1103
  "aria-hidden": "true"
990
1104
  }
991
1105
  ),
@@ -993,82 +1107,74 @@ function Ie({
993
1107
  "span",
994
1108
  {
995
1109
  className: "ds-swatch",
996
- style: { background: o.pair.foreground },
1110
+ style: { background: i.pair.foreground },
997
1111
  "aria-hidden": "true"
998
1112
  }
999
1113
  ),
1000
- o.pair.name
1114
+ i.pair.name
1001
1115
  ] }),
1002
1116
  /* @__PURE__ */ a(
1003
1117
  "td",
1004
1118
  {
1005
1119
  style: {
1006
- color: o.passes === !0 ? "var(--ds-ok)" : o.passes === !1 ? "var(--ds-err)" : "var(--ds-warn)"
1120
+ color: i.passes === !0 ? "var(--ds-ok)" : i.passes === !1 ? "var(--ds-err)" : "var(--ds-warn)"
1007
1121
  },
1008
- children: o.label
1122
+ children: i.label
1009
1123
  }
1010
1124
  )
1011
- ] }, o.pair.name)) })
1125
+ ] }, i.pair.name)) })
1012
1126
  ] }),
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
- ] })
1127
+ m.length > 0 && /* @__PURE__ */ a("p", { className: "ds-note", style: { marginTop: 8 }, children: d.pairsFailing(m.length) })
1019
1128
  ] }),
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." })
1129
+ /* @__PURE__ */ a("p", { className: "ds-note", children: d.automatedIsFloor })
1021
1130
  ] });
1022
1131
  }
1023
- function Be({ registry: e }) {
1024
- const t = e.coverage(), { issues: r } = e;
1025
- return /* @__PURE__ */ d(x, { children: [
1026
- /* @__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
- ] })
1132
+ function He({ registry: e }) {
1133
+ const t = N(), n = t.inspector, s = e.coverage(), { issues: r } = e;
1134
+ return /* @__PURE__ */ c(M, { children: [
1135
+ /* @__PURE__ */ c("div", { className: "ds-block", children: [
1136
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: n.coverage }),
1137
+ /* @__PURE__ */ a("dl", { className: "ds-kv", children: Object.entries(s).filter(([, o]) => o > 0).map(([o, d]) => /* @__PURE__ */ c("div", { style: { display: "contents" }, children: [
1138
+ /* @__PURE__ */ a("dt", { children: t.status[o] }),
1139
+ /* @__PURE__ */ a("dd", { style: { fontVariantNumeric: "tabular-nums" }, children: d })
1140
+ ] }, o)) }),
1141
+ /* @__PURE__ */ a("p", { style: { marginTop: 8 }, children: n.scenariosRegistered(e.product.scenarios.length) })
1036
1142
  ] }),
1037
- /* @__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}`))
1143
+ /* @__PURE__ */ c("div", { className: "ds-block", children: [
1144
+ /* @__PURE__ */ a("h2", { className: "ds-block__title", children: n.scenarioContract }),
1145
+ r.length === 0 ? /* @__PURE__ */ a("p", { children: n.noIssues }) : r.map((o, d) => /* @__PURE__ */ c("div", { className: "ds-issue", "data-level": o.level, children: [
1146
+ /* @__PURE__ */ a("span", { className: "ds-issue__where", children: o.where }),
1147
+ o.message
1148
+ ] }, `${o.where}-${d}`))
1043
1149
  ] })
1044
1150
  ] });
1045
1151
  }
1046
- function je(e) {
1152
+ function ze(e) {
1047
1153
  if (e === "approved" || e === "implemented") return "ok";
1048
1154
  if (e === "in-review" || e === "proposed") return "warn";
1049
1155
  }
1050
- const ze = ee(function({ viewport: t, textScale: r, reducedMotion: n, keyboardMode: s, children: l }, c) {
1156
+ const Ue = re(function({ viewport: t, textScale: n, reducedMotion: s, keyboardMode: r, children: o }, d) {
1051
1157
  return /* @__PURE__ */ a("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ a(
1052
1158
  "div",
1053
1159
  {
1054
- ref: c,
1160
+ ref: d,
1055
1161
  className: "ds-stage",
1056
1162
  "data-viewport": t.id,
1057
- "data-keyboard-mode": s,
1058
- "data-reduced-motion": n,
1163
+ "data-keyboard-mode": r,
1164
+ "data-reduced-motion": s,
1059
1165
  style: {
1060
1166
  width: t.width ? `${t.width}px` : "100%",
1061
1167
  minHeight: t.height ? `${t.height}px` : void 0,
1062
1168
  // A ampliação é aplicada no `font-size` do contêiner, não com
1063
1169
  // `transform: scale`. É a diferença entre testar se o layout aguenta
1064
1170
  // texto grande e só dar zoom na captura de tela.
1065
- fontSize: r === 1 ? void 0 : `${r * 100}%`
1171
+ fontSize: n === 1 ? void 0 : `${n * 100}%`
1066
1172
  },
1067
- children: l
1173
+ children: o
1068
1174
  }
1069
1175
  ) });
1070
1176
  });
1071
- function We({ stops: e }) {
1177
+ function Ke({ stops: e }) {
1072
1178
  return e.length === 0 ? null : /* @__PURE__ */ a("div", { className: "ds-chrome ds-taborder", "aria-hidden": "true", children: e.map((t) => /* @__PURE__ */ a(
1073
1179
  "span",
1074
1180
  {
@@ -1080,46 +1186,40 @@ function We({ stops: e }) {
1080
1186
  `${t.index}-${t.rect.top}-${t.rect.left}`
1081
1187
  )) });
1082
1188
  }
1083
- function He({ title: e, children: t }) {
1084
- return /* @__PURE__ */ d("div", { className: "ds-chrome ds-stage-empty", children: [
1189
+ function Ve({ title: e, children: t }) {
1190
+ return /* @__PURE__ */ c("div", { className: "ds-chrome ds-stage-empty", children: [
1085
1191
  /* @__PURE__ */ a("h2", { children: e }),
1086
1192
  t
1087
1193
  ] });
1088
1194
  }
1089
- function Ue({ registry: e, onOpenScenario: t }) {
1090
- const { product: r } = e, n = e.coverage(), s = r.scenarios.length;
1091
- return /* @__PURE__ */ d("div", { className: "ds-chrome ds-home", children: [
1092
- /* @__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],
1195
+ function qe({ registry: e, onOpenScenario: t }) {
1196
+ const n = N(), { product: s } = e, r = e.coverage(), o = s.scenarios.length;
1197
+ return /* @__PURE__ */ c("div", { className: "ds-chrome ds-home", children: [
1198
+ /* @__PURE__ */ c("header", { className: "ds-home__header", children: [
1199
+ /* @__PURE__ */ a("h1", { children: s.name }),
1200
+ s.tagline && /* @__PURE__ */ a("p", { className: "ds-home__tagline", children: s.tagline }),
1201
+ /* @__PURE__ */ a("p", { className: "ds-home__lead", children: n.home.lead(o) }),
1202
+ /* @__PURE__ */ a("div", { className: "ds-chips", children: Object.entries(r).filter(([, d]) => d > 0).map(([d, l]) => /* @__PURE__ */ c("span", { className: "ds-chip", children: [
1203
+ n.status[d],
1104
1204
  ": ",
1105
- c
1106
- ] }, l)) })
1205
+ l
1206
+ ] }, d)) })
1107
1207
  ] }),
1108
- e.tree.map(({ module: l, scenarios: c }) => /* @__PURE__ */ a(
1109
- Ke,
1208
+ e.tree.map(({ module: d, scenarios: l }) => /* @__PURE__ */ a(
1209
+ Ye,
1110
1210
  {
1111
- module: l,
1112
- scenarios: c,
1211
+ module: d,
1212
+ scenarios: l,
1113
1213
  registry: e,
1114
1214
  onOpenScenario: t
1115
1215
  },
1116
- l.id
1216
+ d.id
1117
1217
  )),
1118
- 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." }),
1218
+ e.orphans.length > 0 && /* @__PURE__ */ c("section", { className: "ds-home__module", children: [
1219
+ /* @__PURE__ */ a("h2", { children: n.home.withoutModule }),
1220
+ /* @__PURE__ */ a("p", { className: "ds-home__hint", children: n.home.withoutModuleHint }),
1121
1221
  /* @__PURE__ */ a(
1122
- J,
1222
+ X,
1123
1223
  {
1124
1224
  scenarios: e.orphans,
1125
1225
  registry: e,
@@ -1129,276 +1229,278 @@ function Ue({ registry: e, onOpenScenario: t }) {
1129
1229
  ] })
1130
1230
  ] });
1131
1231
  }
1132
- function Ke({
1232
+ function Ye({
1133
1233
  module: e,
1134
1234
  scenarios: t,
1135
- registry: r,
1136
- onOpenScenario: n
1235
+ registry: n,
1236
+ onOpenScenario: s
1137
1237
  }) {
1138
- return /* @__PURE__ */ d("section", { className: "ds-home__module", children: [
1238
+ return /* @__PURE__ */ c("section", { className: "ds-home__module", children: [
1139
1239
  /* @__PURE__ */ a("h2", { children: e.name }),
1140
1240
  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 })
1241
+ (e.flows ?? []).map((r) => /* @__PURE__ */ a(Ge, { flow: r, registry: n, onOpenScenario: s }, r.id)),
1242
+ /* @__PURE__ */ a(X, { scenarios: t, registry: n, onOpenScenario: s })
1143
1243
  ] });
1144
1244
  }
1145
- function Ve({
1245
+ function Ge({
1146
1246
  flow: e,
1147
1247
  registry: t,
1148
- onOpenScenario: r
1248
+ onOpenScenario: n
1149
1249
  }) {
1150
- return /* @__PURE__ */ d("div", { className: "ds-flow", children: [
1250
+ return /* @__PURE__ */ c("div", { className: "ds-flow", children: [
1151
1251
  /* @__PURE__ */ a("h3", { children: e.title }),
1152
1252
  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 ?? {});
1155
- 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 }),
1253
+ /* @__PURE__ */ a("ol", { className: "ds-flow__steps", children: e.steps.map((s, r) => {
1254
+ const o = t.scenario(s.scenario), d = Object.entries(s.branches ?? {});
1255
+ return /* @__PURE__ */ c("li", { children: [
1256
+ /* @__PURE__ */ a("button", { type: "button", className: "ds-flow__step", onClick: () => n(s.scenario), children: s.label ?? o?.title ?? s.scenario }),
1257
+ s.decision && /* @__PURE__ */ a("p", { className: "ds-flow__decision", children: s.decision }),
1258
+ d.length > 0 && /* @__PURE__ */ a("ul", { className: "ds-flow__branches", children: d.map(([l, m]) => /* @__PURE__ */ c("li", { children: [
1259
+ /* @__PURE__ */ a("span", { className: "ds-flow__branch-label", children: l }),
1160
1260
  /* @__PURE__ */ a(
1161
1261
  "button",
1162
1262
  {
1163
1263
  type: "button",
1164
1264
  className: "ds-flow__step",
1165
- onClick: () => r(u),
1166
- children: t.scenario(u)?.title ?? u
1265
+ onClick: () => n(m),
1266
+ children: t.scenario(m)?.title ?? m
1167
1267
  }
1168
1268
  )
1169
- ] }, o)) })
1170
- ] }, `${n.scenario}-${s}`);
1269
+ ] }, l)) })
1270
+ ] }, `${s.scenario}-${r}`);
1171
1271
  }) })
1172
1272
  ] });
1173
1273
  }
1174
- function J({
1274
+ function X({
1175
1275
  scenarios: e,
1176
1276
  registry: t,
1177
- onOpenScenario: r
1277
+ onOpenScenario: n
1178
1278
  }) {
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: [
1180
- /* @__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 })
1279
+ const s = N();
1280
+ return e.length === 0 ? /* @__PURE__ */ a("p", { className: "ds-home__hint", children: s.home.emptyModule }) : /* @__PURE__ */ a("ul", { className: "ds-home__grid", children: e.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ c("button", { type: "button", className: "ds-home__card", onClick: () => n(r.id), children: [
1281
+ /* @__PURE__ */ c("span", { className: "ds-home__card-head", children: [
1282
+ /* @__PURE__ */ a("span", { className: "ds-status-dot", "data-status": r.status }),
1283
+ /* @__PURE__ */ a("span", { className: "ds-home__card-title", children: r.title })
1183
1284
  ] }),
1184
- n.intent && /* @__PURE__ */ a("span", { className: "ds-home__card-intent", children: n.intent }),
1185
- /* @__PURE__ */ d("span", { className: "ds-home__card-meta", children: [
1186
- t.persona(n.persona)?.name ?? n.persona,
1285
+ r.intent && /* @__PURE__ */ a("span", { className: "ds-home__card-intent", children: r.intent }),
1286
+ /* @__PURE__ */ c("span", { className: "ds-home__card-meta", children: [
1287
+ t.persona(r.persona)?.name ?? r.persona,
1187
1288
  " · ",
1188
- S[n.status],
1189
- n.a11y.keyboard === "full" ? " · teclado" : ""
1289
+ s.status[r.status],
1290
+ r.a11y.keyboard === "full" ? ` · ${s.home.keyboardBadge}` : ""
1190
1291
  ] })
1191
- ] }) }, n.id)) });
1292
+ ] }) }, r.id)) });
1192
1293
  }
1193
- function Xe({ product: e }) {
1194
- const t = k(() => oe(e), [e]), r = k(() => se(), []), { 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: $ });
1294
+ function st({ product: e }) {
1295
+ const t = y(() => le(e), [e]), n = y(() => Oe(e.theme?.labels), [e.theme?.labels]), s = y(() => ce(e.deploy), [e.deploy]), { location: r, controls: o, viewport: d, setControls: l, navigate: m, openScenario: i } = he(t), [p, g] = x(!0), v = se(null), { focused: u, tabStops: h } = Pe(o.keyboardMode, v), b = t.scenario(o.scenario), w = t.persona(o.persona ?? b?.persona), T = t.fixture(o.fixture ?? b?.fixture), Z = y(() => {
1296
+ const k = o.dataSource ?? "fixtures";
1297
+ return k === "fixtures" ? O : e.dataSources?.adapters?.find((_) => _.id === k) ?? O;
1298
+ }, [o.dataSource, e.dataSources?.adapters]), { data: R, isLoading: I, error: D } = _e({ scenario: b, fixture: T, network: o.network, adapter: Z });
1198
1299
  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) {
1300
+ const k = (_) => {
1301
+ if (!(!_.shiftKey || _.metaKey || _.ctrlKey || _.altKey || _.target?.matches("input, textarea, select, [contenteditable='true']"))) {
1302
+ switch (_.key) {
1202
1303
  case "C":
1203
- c({ chrome: !s.chrome });
1304
+ l({ chrome: !o.chrome });
1204
1305
  break;
1205
1306
  case "K":
1206
- c({ keyboardMode: !s.keyboardMode });
1307
+ l({ keyboardMode: !o.keyboardMode });
1207
1308
  break;
1208
1309
  case "P":
1209
- c({ inspector: !s.inspector });
1310
+ l({ inspector: !o.inspector });
1210
1311
  break;
1211
1312
  default:
1212
1313
  return;
1213
1314
  }
1214
- w.preventDefault();
1315
+ _.preventDefault();
1215
1316
  }
1216
1317
  };
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(
1318
+ return window.addEventListener("keydown", k), () => window.removeEventListener("keydown", k);
1319
+ }, [o.chrome, o.keyboardMode, o.inspector, l]);
1320
+ const L = y(() => o.persona && o.persona !== b?.persona ? t.persona(o.persona)?.permissions ?? [] : t.permissionsOf(b), [o.persona, t, b]), B = y(
1220
1321
  () => ({
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,
1322
+ scenario: b,
1323
+ persona: w,
1324
+ permissions: L,
1325
+ can: (k) => L.includes(k),
1326
+ data: R,
1327
+ fixture: T,
1328
+ network: o.network,
1329
+ isLoading: I,
1229
1330
  error: D,
1230
- rules: t.rulesOf(h),
1231
- viewport: l,
1232
- themeMode: s.themeMode,
1233
- locale: s.locale,
1331
+ rules: t.rulesOf(b),
1332
+ viewport: d,
1333
+ themeMode: o.themeMode,
1334
+ locale: o.locale,
1234
1335
  a11y: {
1235
- keyboardMode: s.keyboardMode,
1236
- reducedMotion: s.reducedMotion,
1237
- textScale: s.textScale
1336
+ keyboardMode: o.keyboardMode,
1337
+ reducedMotion: o.reducedMotion,
1338
+ textScale: o.textScale
1238
1339
  },
1239
- navigate: o,
1240
- openScenario: u
1340
+ navigate: m,
1341
+ openScenario: i
1241
1342
  }),
1242
1343
  [
1243
- h,
1244
1344
  b,
1245
- T,
1246
- P,
1247
- y,
1248
- s.network,
1249
- s.themeMode,
1250
- s.locale,
1251
- s.keyboardMode,
1252
- s.reducedMotion,
1253
- s.textScale,
1345
+ w,
1346
+ L,
1254
1347
  R,
1348
+ T,
1349
+ o.network,
1350
+ o.themeMode,
1351
+ o.locale,
1352
+ o.keyboardMode,
1353
+ o.reducedMotion,
1354
+ o.textScale,
1355
+ I,
1255
1356
  D,
1256
1357
  t,
1257
- l,
1258
- o,
1259
- u
1358
+ d,
1359
+ m,
1360
+ i
1260
1361
  ]
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",
1362
+ ), ee = !b && r.path === "/", $ = ve(e.routes, r.path), W = e.wrapper, j = e.notFound, H = $ ? /* @__PURE__ */ a($.definition.screen, { params: $.params, context: B }) : j ? /* @__PURE__ */ a(j, { path: r.path }) : /* @__PURE__ */ a(Ve, { title: n.shell.noRoute, children: /* @__PURE__ */ c("p", { children: [
1363
+ /* @__PURE__ */ a("code", { children: r.path }),
1264
1364
  " ",
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(
1365
+ n.shell.noRouteHint
1366
+ ] }) }), te = W ? /* @__PURE__ */ a(W, { context: B, children: H }) : H;
1367
+ return /* @__PURE__ */ a(J.Provider, { value: n, children: /* @__PURE__ */ c(
1269
1368
  "div",
1270
1369
  {
1271
1370
  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,
1371
+ "data-chrome": o.chrome ? "visible" : "hidden",
1372
+ "data-inspector": o.inspector ? "open" : "closed",
1373
+ "data-sidebar": p ? "open" : "closed",
1374
+ "data-viewport": d.id,
1276
1375
  children: [
1277
- s.chrome && /* @__PURE__ */ a(
1278
- $e,
1376
+ o.chrome && /* @__PURE__ */ a(
1377
+ Ie,
1279
1378
  {
1280
1379
  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 })
1380
+ scenario: b,
1381
+ deploy: s,
1382
+ inspectorOpen: o.inspector,
1383
+ sidebarOpen: p,
1384
+ onToggleInspector: () => l({ inspector: !o.inspector }),
1385
+ onToggleSidebar: () => g((k) => !k),
1386
+ onHideChrome: () => l({ chrome: !1 })
1288
1387
  }
1289
1388
  ),
1290
- s.chrome && /* @__PURE__ */ a(
1291
- Oe,
1389
+ o.chrome && /* @__PURE__ */ a(
1390
+ Re,
1292
1391
  {
1293
1392
  registry: t,
1294
- activeScenario: s.scenario,
1295
- onOpenScenario: u
1393
+ activeScenario: o.scenario,
1394
+ onOpenScenario: i
1296
1395
  }
1297
1396
  ),
1298
- /* @__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,
1397
+ /* @__PURE__ */ c("div", { className: "ds-stage-area", children: [
1398
+ ee ? /* @__PURE__ */ a("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ a(qe, { registry: t, onOpenScenario: i }) }) : /* @__PURE__ */ a(
1399
+ Ue,
1301
1400
  {
1302
1401
  ref: v,
1303
- viewport: l,
1304
- textScale: s.textScale,
1305
- reducedMotion: s.reducedMotion,
1306
- keyboardMode: s.keyboardMode,
1307
- children: Z
1402
+ viewport: d,
1403
+ textScale: o.textScale,
1404
+ reducedMotion: o.reducedMotion,
1405
+ keyboardMode: o.keyboardMode,
1406
+ children: te
1308
1407
  }
1309
1408
  ),
1310
- s.chrome && /* @__PURE__ */ a(Pe, { registry: t, controls: s, onChange: c })
1409
+ o.chrome && /* @__PURE__ */ a(De, { registry: t, controls: o, onChange: l })
1311
1410
  ] }),
1312
- s.chrome && /* @__PURE__ */ a(
1313
- Re,
1411
+ o.chrome && /* @__PURE__ */ a(
1412
+ Be,
1314
1413
  {
1315
1414
  registry: t,
1316
- scenario: h,
1317
- controls: s,
1318
- focusedNode: g,
1319
- tabStopCount: i.length
1415
+ scenario: b,
1416
+ controls: o,
1417
+ focusedNode: u,
1418
+ tabStopCount: h.length
1320
1419
  }
1321
1420
  ),
1322
- s.keyboardMode && /* @__PURE__ */ a(We, { stops: i }),
1323
- !s.chrome && /* @__PURE__ */ a(
1421
+ o.keyboardMode && /* @__PURE__ */ a(Ke, { stops: h }),
1422
+ !o.chrome && /* @__PURE__ */ a(
1324
1423
  "button",
1325
1424
  {
1326
1425
  type: "button",
1327
1426
  className: "ds-chrome ds-restore",
1328
- onClick: () => c({ chrome: !0 }),
1329
- children: "Mostrar controles"
1427
+ onClick: () => l({ chrome: !0 }),
1428
+ children: n.shell.restoreChrome
1330
1429
  }
1331
1430
  )
1332
1431
  ]
1333
1432
  }
1334
- );
1433
+ ) });
1335
1434
  }
1336
- function C(e) {
1435
+ function A(e) {
1337
1436
  return new Date(e.length === 10 ? `${e}T00:00:00` : e);
1338
1437
  }
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;
1438
+ function ot(e, t) {
1439
+ const n = A(e), s = A(t);
1440
+ let r = s.getFullYear() - n.getFullYear();
1441
+ const o = s.getMonth() - n.getMonth();
1442
+ return (o < 0 || o === 0 && s.getDate() < n.getDate()) && (r -= 1), r;
1344
1443
  }
1345
- function et(e, t) {
1346
- const r = C(e), n = C(t);
1347
- return Math.floor((n.getTime() - r.getTime()) / 864e5);
1444
+ function it(e, t) {
1445
+ const n = A(e), s = A(t);
1446
+ return Math.floor((s.getTime() - n.getTime()) / 864e5);
1348
1447
  }
1349
1448
  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,
1449
+ lt as CONTRAST_THRESHOLDS,
1450
+ S as DEFAULT_LABELS,
1451
+ st as DesignSpace,
1452
+ qe as Home,
1453
+ rt as KEYBOARD_LABELS,
1454
+ nt as NETWORK_LABELS,
1455
+ Y as NETWORK_STATES,
1456
+ f as PARAM,
1457
+ ut as SCENARIO_STATUSES,
1458
+ we as SLOW_NETWORK_DELAY_MS,
1459
+ tt as STATUS_LABELS,
1460
+ at as STATUS_MEANING,
1461
+ Ne as SimulatedNetworkError,
1462
+ Ue as Stage,
1463
+ Ve as StageEmpty,
1464
+ Q as TEXT_SCALES,
1465
+ Ke as TabOrderOverlay,
1466
+ G as VIEWPORTS,
1467
+ ot as ageInYears,
1468
+ ht as applyOverrides,
1469
+ mt as assertContrastPairs,
1470
+ pt as checkContrastPair,
1471
+ de as checkContrastPairs,
1472
+ bt as commitUrl,
1473
+ Me as computeRole,
1474
+ ft as contrastRatio,
1475
+ et as createHttpAdapter,
1476
+ le as createRegistry,
1477
+ it as daysBetween,
1478
+ xe as describeElement,
1379
1479
  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
1480
+ vt as flatten,
1481
+ gt as formatIssues,
1482
+ ce as getDeployContext,
1483
+ wt as hasErrors,
1484
+ fe as matchPath,
1485
+ Nt as parseColor,
1486
+ ue as parseControls,
1487
+ A as parseIsoDate,
1488
+ kt as readCssVariable,
1489
+ _t as relativeLuminance,
1490
+ P as resolveFixture,
1491
+ Oe as resolveLabels,
1492
+ ve as resolveRoute,
1493
+ me as resolveViewport,
1494
+ ie as scenarioUrl,
1495
+ U as serializeControls,
1496
+ yt as serializeValue,
1497
+ $e as shortSelector,
1498
+ Fe as tabbableElements,
1499
+ he as useDesignSpaceState,
1500
+ Pe as useKeyboardMode,
1501
+ N as useLabels,
1502
+ _e as useScenarioData,
1503
+ oe as validateProduct,
1504
+ St as validateScenario
1403
1505
  };
1404
1506
  //# sourceMappingURL=index.js.map