@brucesantos/design-space 0.3.0 → 0.4.0

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