@brucesantos/design-space 0.9.0 → 0.9.2

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