@backmatter/studio 0.0.13 → 0.0.14

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.
@@ -1,8 +1,8 @@
1
1
  import { jsxs as s, jsx as t, Fragment as U } from "react/jsx-runtime";
2
- import { P as $, V as ue, W as Zt, p as Rt, X as Jt, f as at, Y as Fe, Z as Qt, _ as en, $ as tn, a0 as nn, a1 as rn, G as on, m as an, a2 as sn, a3 as ln, a4 as cn, a5 as He, a6 as me, a7 as Ne, a8 as st, a9 as dn, aa as un, T as hn, ab as pn, ac as gn, ad as mn, ae as fn, af as bn, ag as xn, F as vn, ah as $n, N as kn, ai as wn } from "./WorkspaceRoutes-CCDPtLla.js";
3
- import { useRef as k, useState as f, useLayoutEffect as te, useCallback as Ke, useEffect as z, useMemo as yn, useId as Ue } from "react";
2
+ import { P as v, V as ue, W as Xt, p as zt, X as Yt, f as ot, Y as Fe, Z as Zt, _ as Jt, $ as Qt, a0 as en, a1 as tn, G as nn, m as rn, a2 as on, a3 as an, a4 as sn, a5 as He, a6 as me, a7 as Ne, a8 as at, a9 as ln, aa as cn, T as dn, ab as un, ac as hn, ad as pn, ae as gn, af as mn, ag as fn, F as bn, ah as xn, N as vn, ai as $n } from "./WorkspaceRoutes-Dt7JvEWT.js";
3
+ import { useRef as k, useState as b, useLayoutEffect as te, useCallback as Ke, useEffect as z, useMemo as kn, useId as Ue } from "react";
4
4
  import { createPortal as Me } from "react-dom";
5
- import { L as Nn, a as lt } from "./dashboard-Dw0zfTXg.js";
5
+ import { L as wn, a as st } from "./dashboard-BuY2aGkO.js";
6
6
  function O({
7
7
  title: n,
8
8
  lede: r,
@@ -10,8 +10,8 @@ function O({
10
10
  }) {
11
11
  return /* @__PURE__ */ s("div", { className: "x78zum5 xdt5ytf x14n5cft x1kozois", children: [
12
12
  /* @__PURE__ */ s("header", { className: "x78zum5 xdt5ytf x1ndbd79 xiky8lt", children: [
13
- /* @__PURE__ */ t($, { as: "h1", size: "display", weight: "semibold", children: n }),
14
- /* @__PURE__ */ t($, { tone: "muted", size: "sm", children: r })
13
+ /* @__PURE__ */ t(v, { as: "h1", size: "display", weight: "semibold", children: n }),
14
+ /* @__PURE__ */ t(v, { tone: "muted", size: "sm", children: r })
15
15
  ] }),
16
16
  /* @__PURE__ */ t("div", { className: "x78zum5 xdt5ytf x14n5cft", children: o })
17
17
  ] });
@@ -21,12 +21,12 @@ function Ee({
21
21
  }) {
22
22
  return /* @__PURE__ */ t("div", { className: "xrvj5dj xnby9oq xwaa2ar xe93d63 x7a106z xcqouw7", children: n });
23
23
  }
24
- function Sn({
24
+ function yn({
25
25
  children: n
26
26
  }) {
27
27
  return /* @__PURE__ */ t("div", { className: "x78zum5 x1a02dak x6s0dn4 x3smv4v", children: n });
28
28
  }
29
- function b({
29
+ function f({
30
30
  label: n,
31
31
  children: r
32
32
  }) {
@@ -97,22 +97,22 @@ const P = [
97
97
  lede: "The host bar a site mounts. These specimens do not call the preview API."
98
98
  }
99
99
  ];
100
- function Mn(n) {
100
+ function Nn(n) {
101
101
  const r = P.find((o) => o.slug === n);
102
102
  return r ? r.slug : "colors";
103
103
  }
104
- const ct = P.find((n) => n.slug === "buttons"), En = ["primary", "secondary", "ghost", "danger"];
105
- function Cn() {
106
- return /* @__PURE__ */ t(O, { title: ct.title, lede: ct.lede, children: /* @__PURE__ */ t(Ee, { children: En.map((n) => /* @__PURE__ */ t(b, { label: n, children: /* @__PURE__ */ s(Sn, { children: [
104
+ const lt = P.find((n) => n.slug === "buttons"), Sn = ["primary", "secondary", "ghost", "danger"];
105
+ function Mn() {
106
+ return /* @__PURE__ */ t(O, { title: lt.title, lede: lt.lede, children: /* @__PURE__ */ t(Ee, { children: Sn.map((n) => /* @__PURE__ */ t(f, { label: n, children: /* @__PURE__ */ s(yn, { children: [
107
107
  /* @__PURE__ */ t(ue, { variant: n, children: n }),
108
108
  /* @__PURE__ */ t(ue, { variant: n, disabled: !0, children: "disabled" }),
109
- /* @__PURE__ */ t(Zt, { variant: n, to: "/__ui/buttons", children: "link" })
109
+ /* @__PURE__ */ t(Xt, { variant: n, to: "/__ui/buttons", children: "link" })
110
110
  ] }) }, n)) }) });
111
111
  }
112
- const dt = P.find((n) => n.slug === "colors");
113
- function zn() {
114
- return /* @__PURE__ */ t(O, { title: dt.title, lede: dt.lede, children: /* @__PURE__ */ t("div", { className: "xrvj5dj x1sipb5g x11cgr9k x1kk4rku", children: Rn.map(([n, r]) => /* @__PURE__ */ s("figure", { className: "x78zum5 xdt5ytf x3smv4v x1ghz6dp xeuugli", children: [
115
- /* @__PURE__ */ t("div", { ...Rt(w.chip, r) }),
112
+ const ct = P.find((n) => n.slug === "colors");
113
+ function En() {
114
+ return /* @__PURE__ */ t(O, { title: ct.title, lede: ct.lede, children: /* @__PURE__ */ t("div", { className: "xrvj5dj x1sipb5g x11cgr9k x1kk4rku", children: Cn.map(([n, r]) => /* @__PURE__ */ s("figure", { className: "x78zum5 xdt5ytf x3smv4v x1ghz6dp xeuugli", children: [
115
+ /* @__PURE__ */ t("div", { ...zt(w.chip, r) }),
116
116
  /* @__PURE__ */ t("figcaption", { className: "x1ar5oo6 x10qp4ay x111yfic", children: n })
117
117
  ] }, n)) }) });
118
118
  }
@@ -205,111 +205,113 @@ const w = {
205
205
  kWkggS: "xc54rw4",
206
206
  $$css: !0
207
207
  }
208
- }, Rn = [["bgApp", w.bgApp], ["bgSidebar", w.bgSidebar], ["bgPanel", w.bgPanel], ["bgPanelInset", w.bgPanelInset], ["bgSurface", w.bgSurface], ["bgHover", w.bgHover], ["bgActive", w.bgActive], ["bgInput", w.bgInput], ["bgStatus", w.bgStatus], ["text", w.text], ["textMuted", w.textMuted], ["textInverse", w.textInverse], ["border", w.border], ["accent", w.accent], ["accentHover", w.accentHover], ["accentMuted", w.accentMuted], ["danger", w.danger], ["success", w.success], ["overlay", w.overlay], ["focus", w.focus]];
209
- function ut(n, r, o, a = "en") {
208
+ }, Cn = [["bgApp", w.bgApp], ["bgSidebar", w.bgSidebar], ["bgPanel", w.bgPanel], ["bgPanelInset", w.bgPanelInset], ["bgSurface", w.bgSurface], ["bgHover", w.bgHover], ["bgActive", w.bgActive], ["bgInput", w.bgInput], ["bgStatus", w.bgStatus], ["text", w.text], ["textMuted", w.textMuted], ["textInverse", w.textInverse], ["border", w.border], ["accent", w.accent], ["accentHover", w.accentHover], ["accentMuted", w.accentMuted], ["danger", w.danger], ["success", w.success], ["overlay", w.overlay], ["focus", w.focus]];
209
+ function dt(n, r, o) {
210
210
  if (!(n != null && n.trim())) return;
211
- const d = n.replace(/\/+$/, "");
212
- return !r || !o ? d : `${d}${Jt(o, r.type, r.slug, r.locale, a)}`;
211
+ const a = n.replace(/\/+$/, "");
212
+ return !r || !o ? a : `${a}${Yt(o, r.type, r.slug)}`;
213
213
  }
214
- const he = "cubic-bezier(0.23, 1, 0.32, 1)", Oe = "cubic-bezier(0.55, 0, 1, 0.45)", In = "cubic-bezier(0.32, 0.72, 0, 1)", _n = 550, An = 300, Ln = 750, Bn = 360, It = "backmatter.devbar.mode";
215
- function Pn(n) {
214
+ const he = "cubic-bezier(0.23, 1, 0.32, 1)", Oe = "cubic-bezier(0.55, 0, 1, 0.45)", zn = "cubic-bezier(0.32, 0.72, 0, 1)", Rn = 550, In = 300, _n = 750, An = 360, Rt = "backmatter.devbar.mode";
215
+ function Ln(n) {
216
216
  const r = n.activity ?? null, o = r ? r.type : n.siteMode === "preview" && n.changeCount > 0 ? "changes" : "idle", a = o === "published" ? "live" : n.siteMode;
217
217
  return { mode: a, row: o, modeLabel: a === "preview" ? "Exit preview" : "Enter preview", announce: a === "preview" ? "Preview on, drafts visible" : "Live site" };
218
218
  }
219
- function Tn(n, r) {
219
+ function Bn(n, r) {
220
220
  return {
221
221
  x: r.left + r.width / 2 - n.left,
222
222
  y: r.top + r.height / 2 - n.top
223
223
  };
224
224
  }
225
- function Wn(n, r) {
225
+ function Pn(n, r) {
226
226
  return Math.abs(r - n) > 1;
227
227
  }
228
228
  function se() {
229
229
  return typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
230
230
  }
231
- function Hn() {
231
+ function Tn() {
232
232
  if (typeof sessionStorage > "u") return null;
233
233
  try {
234
- const n = sessionStorage.getItem(It);
234
+ const n = sessionStorage.getItem(Rt);
235
235
  return n === "live" || n === "preview" ? n : null;
236
236
  } catch {
237
237
  return null;
238
238
  }
239
239
  }
240
- const ht = "backmatter.devbar.highlight", pt = "backmatter.devbar.agent-preview", Dn = "backmatter-theme";
241
- function qn(n) {
242
- const r = n == null ? void 0 : n.getItem(Dn);
240
+ const ut = "backmatter.devbar.highlight", ht = "backmatter.devbar.agent-preview", Wn = "backmatter-theme";
241
+ function Hn(n) {
242
+ const r = n == null ? void 0 : n.getItem(Wn);
243
243
  return r === "light" || r === "dark" || r === "system" ? r : "system";
244
244
  }
245
- function jn(n, r) {
245
+ function qn(n, r) {
246
246
  return n === "system" ? r ? "dark" : "light" : n;
247
247
  }
248
- function gt(n, r, o) {
248
+ function pt(n, r, o) {
249
249
  const a = n == null ? void 0 : n.getItem(r);
250
250
  return a === "1" ? !0 : a === "0" ? !1 : o;
251
251
  }
252
- function mt(n, r, o) {
252
+ function gt(n, r, o) {
253
253
  n == null || n.setItem(r, o ? "1" : "0");
254
254
  }
255
- function De(n) {
255
+ function qe(n) {
256
256
  if (!(typeof sessionStorage > "u"))
257
257
  try {
258
- sessionStorage.setItem(It, n);
258
+ sessionStorage.setItem(Rt, n);
259
259
  } catch {
260
260
  }
261
261
  }
262
- const Fn = 20, ft = 16, Kn = 12, Vn = 8, _t = 12;
263
- function Un(n) {
262
+ const Dn = 20, mt = 16, jn = 12, Fn = 8, It = 12;
263
+ function Kn(n) {
264
264
  if (!n) return null;
265
265
  const r = Number.parseInt(n.split(".")[0] ?? "", 10);
266
266
  return Number.isFinite(r) ? r : null;
267
267
  }
268
- function At(n) {
268
+ function _t(n) {
269
269
  return /Macintosh|Mac OS X/.test(n);
270
270
  }
271
- function On(n) {
272
- return !At(n) || /Firefox\//.test(n) ? !1 : /Chrome\/|Chromium\/|Edg\/|OPR\/|Brave\//.test(n);
271
+ function Vn(n) {
272
+ return !_t(n) || /Firefox\//.test(n) ? !1 : /Chrome\/|Chromium\/|Edg\/|OPR\/|Brave\//.test(n);
273
273
  }
274
274
  function Ve(n, r) {
275
- if (/Windows/.test(n)) return Vn;
276
- if (!At(n)) return _t;
277
- const o = Un(r);
278
- return On(n) ? o !== null && o >= 26 ? Fn : (o !== null && o >= 15, ft) : Kn;
275
+ if (/Windows/.test(n)) return Fn;
276
+ if (!_t(n)) return It;
277
+ const o = Kn(r);
278
+ return Vn(n) ? o !== null && o >= 26 ? Dn : (o !== null && o >= 15, mt) : jn;
279
279
  }
280
280
  const be = "backmatter-preview-frame";
281
- function Gn() {
281
+ function Un() {
282
282
  if (typeof navigator > "u") return Promise.resolve(void 0);
283
283
  const n = navigator.userAgentData;
284
284
  return n != null && n.getHighEntropyValues ? n.getHighEntropyValues(["platformVersion"]).then((r) => r.platformVersion) : Promise.resolve(void 0);
285
285
  }
286
- function Xn() {
287
- return typeof navigator > "u" ? _t : Ve(navigator.userAgent);
286
+ function On() {
287
+ return typeof navigator > "u" ? It : Ve(navigator.userAgent);
288
288
  }
289
- function bt(n) {
289
+ function ft(n) {
290
290
  if (n !== void 0 && Number.isFinite(n) && n >= 0) return n;
291
- if (typeof document < "u") {
292
- const r = getComputedStyle(document.documentElement).getPropertyValue("--bm-preview-frame-radius").trim();
293
- if (r) {
294
- const o = Number.parseFloat(r);
295
- if (Number.isFinite(o) && o >= 0) return o;
291
+ if (typeof document < "u")
292
+ try {
293
+ const r = getComputedStyle(document.documentElement).getPropertyValue("--bm-preview-frame-radius").trim();
294
+ if (r) {
295
+ const o = Number.parseFloat(r);
296
+ if (Number.isFinite(o) && o >= 0) return o;
297
+ }
298
+ } catch {
296
299
  }
297
- }
298
- return Xn();
300
+ return On();
299
301
  }
300
- const Lt = "oklch(0.56 0.21 295)";
301
- function Yn({
302
+ const At = "oklch(0.56 0.21 295)";
303
+ function Gn({
302
304
  active: n,
303
305
  radius: r
304
306
  }) {
305
- const o = k(null), a = k(null), [d, m] = f(() => bt(r));
307
+ const o = k(null), a = k(null), [d, m] = b(() => ft(r));
306
308
  return te(() => {
307
309
  if (r !== void 0) {
308
- m(bt(r));
310
+ m(ft(r));
309
311
  return;
310
312
  }
311
313
  const h = navigator.userAgent;
312
- m(Ve(h)), Gn().then((u) => {
314
+ m(Ve(h)), Un().then((u) => {
313
315
  u !== void 0 && m(Ve(h, u));
314
316
  });
315
317
  }, [r]), te(() => {
@@ -323,7 +325,7 @@ function Yn({
323
325
  { duration: 700, delay: 180, easing: he }
324
326
  );
325
327
  }, [n]), /* @__PURE__ */ s(U, { children: [
326
- /* @__PURE__ */ t("style", { children: Zn }),
328
+ /* @__PURE__ */ t("style", { children: Xn }),
327
329
  /* @__PURE__ */ t(
328
330
  "div",
329
331
  {
@@ -337,23 +339,23 @@ function Yn({
337
339
  )
338
340
  ] });
339
341
  }
340
- const Zn = `
342
+ const Xn = `
341
343
  .${be} {
342
344
  position: fixed;
343
345
  inset: 0;
344
346
  z-index: 2147482999;
345
347
  box-sizing: border-box;
346
348
  pointer-events: none;
347
- border: 3px solid ${Lt};
349
+ border: 3px solid ${At};
348
350
  border-radius: 0 0 var(--bm-preview-frame-radius, 12px) var(--bm-preview-frame-radius, 12px);
349
351
  background: transparent;
350
352
  clip-path: circle(0% at 100% 100%);
351
- transition: clip-path ${Bn}ms ${Oe};
353
+ transition: clip-path ${An}ms ${Oe};
352
354
  }
353
355
  .${be}[data-active="true"] {
354
356
  /* 150% is shorter than the viewport diagonal — the ring never reached the top. */
355
357
  clip-path: circle(150vmax at 100% 100%);
356
- transition: clip-path ${Ln}ms ${he} 80ms;
358
+ transition: clip-path ${_n}ms ${he} 80ms;
357
359
  }
358
360
  @media (prefers-reduced-motion: reduce) {
359
361
  .${be} {
@@ -365,11 +367,11 @@ const Zn = `
365
367
  opacity: 1;
366
368
  }
367
369
  }
368
- `, e = "backmatter-devbar", Jn = "/api/backmatter/preview", Qn = 10, er = 360;
369
- function xt(n, r) {
370
+ `, e = "backmatter-devbar", Yn = "/api/backmatter/preview", Zn = 10, Jn = 360;
371
+ function bt(n, r) {
370
372
  return `${n}:${r.trim().toLowerCase()}`;
371
373
  }
372
- function tr({
374
+ function Qn({
373
375
  label: n,
374
376
  branch: r,
375
377
  tree: o,
@@ -380,9 +382,9 @@ function tr({
380
382
  changeCount: u,
381
383
  lineDiff: p,
382
384
  activity: c = null,
383
- previewEntryPath: R = Jn,
385
+ previewEntryPath: R = Yn,
384
386
  siteMode: y = "preview",
385
- frame: D = !1,
387
+ frame: q = !1,
386
388
  frameRadius: X,
387
389
  entrance: I = "auto",
388
390
  dashboardHref: N,
@@ -391,19 +393,19 @@ function tr({
391
393
  onToggleChat: E,
392
394
  onTogglePublish: g,
393
395
  onStop: M,
394
- onViewLive: q,
396
+ onViewLive: D,
395
397
  onPublishedDone: _,
396
398
  onSignOut: j,
397
399
  onPublishAnchor: Y
398
400
  }) {
399
- const le = k(null), ce = k(null), Z = k(null), G = k(null), x = k(null), A = k(null), T = k(null), J = k(null), [ne, pe] = f(null), re = Ke((i) => {
401
+ const le = k(null), ce = k(null), Z = k(null), G = k(null), x = k(null), A = k(null), T = k(null), J = k(null), [ne, pe] = b(null), re = Ke((i) => {
400
402
  if (le.current = i, !i) {
401
403
  pe(null);
402
404
  return;
403
405
  }
404
406
  const l = i.shadowRoot ?? i.attachShadow({ mode: "open" });
405
- pe((v) => v === l ? v : l);
406
- }, []), [ie, xe] = f(null), [F, L] = f(null), [ve, Ce] = f(y), [ze, Tt] = f(!1), Re = k(!1), oe = k(null), Ge = k(0), Xe = k(!1), Ye = k(!1), W = k({
407
+ pe(($) => $ === l ? $ : l);
408
+ }, []), [ie, xe] = b(null), [F, L] = b(null), [ve, Ce] = b(y), [ze, Pt] = b(!1), Re = k(!1), oe = k(null), Ge = k(0), Xe = k(!1), Ye = k(!1), W = k({
407
409
  toggleHidden: () => {
408
410
  },
409
411
  onModeKey: (i) => {
@@ -413,7 +415,7 @@ function tr({
413
415
  openDashboard: () => !1,
414
416
  openShortcuts: () => {
415
417
  }
416
- }), Ze = k(!0), [Ie, Wt] = f("system"), [_e, Je] = f(!0), [Qe, et] = f(!0), [Ht, $e] = f("main"), [Dt, qt] = f(""), [Ae, Le] = f(null), [tt, jt] = f("en");
418
+ }), Ze = k(!0), [Ie, Tt] = b("system"), [_e, Je] = b(!0), [Qe, et] = b(!0), [Wt, $e] = b("main"), [Ht, qt] = b(""), [Ae, Le] = b(null);
417
419
  z(() => {
418
420
  const i = a == null ? void 0 : a.workspaceId;
419
421
  if (!i) {
@@ -421,51 +423,51 @@ function tr({
421
423
  return;
422
424
  }
423
425
  let l = !1;
424
- return at(i).then(({ workspace: v }) => {
425
- l || (Le(v.slug), jt(v.locales[0] ?? "en"));
426
+ return ot(i).then(({ workspace: $ }) => {
427
+ l || Le($.slug);
426
428
  }).catch(() => {
427
429
  l || Le(null);
428
430
  }), () => {
429
431
  l = !0;
430
432
  };
431
433
  }, [a == null ? void 0 : a.workspaceId]);
432
- const Be = yn(
433
- () => ut(N, a, Ae, tt),
434
- [N, a, Ae, tt]
435
- ), Ft = Ke((i) => {
434
+ const Be = kn(
435
+ () => dt(N, a, Ae),
436
+ [N, a, Ae]
437
+ ), Dt = Ke((i) => {
436
438
  Z.current = i, !(i && !(i.getRootNode() instanceof ShadowRoot)) && xe(i);
437
- }, []), Pe = Pn({ siteMode: ve, changeCount: u, activity: c }), de = Pe.mode, Kt = (c == null ? void 0 : c.type) === "editing" ? `editing:${c.field}` : (c == null ? void 0 : c.type) === "publishing" ? `publishing:${c.steps.map((i) => `${i.state}:${i.label}`).join("|")}` : (c == null ? void 0 : c.type) === "published" ? `published:${c.sha}` : "", Te = `${ve}|${Pe.row}|${u}|${(p == null ? void 0 : p.added) ?? ""}|${(p == null ? void 0 : p.removed) ?? ""}|${n}|${Kt}`;
439
+ }, []), Pe = Ln({ siteMode: ve, changeCount: u, activity: c }), de = Pe.mode, jt = (c == null ? void 0 : c.type) === "editing" ? `editing:${c.field}` : (c == null ? void 0 : c.type) === "publishing" ? `publishing:${c.steps.map((i) => `${i.state}:${i.label}`).join("|")}` : (c == null ? void 0 : c.type) === "published" ? `published:${c.sha}` : "", Te = `${ve}|${Pe.row}|${u}|${(p == null ? void 0 : p.added) ?? ""}|${(p == null ? void 0 : p.removed) ?? ""}|${n}|${jt}`;
438
440
  z(() => {
439
441
  qt(location.host);
440
- const i = je(), l = qn(i);
441
- et(gt(i, pt, !0)), Wt(l), Je(gt(i, ht, !0));
442
+ const i = je(), l = Hn(i);
443
+ et(pt(i, ht, !0)), Tt(l), Je(pt(i, ut, !0));
442
444
  }, []), z(() => {
443
- if (kt(Ie), Ie !== "system" || typeof matchMedia != "function") return;
444
- const i = matchMedia("(prefers-color-scheme: dark)"), l = () => kt("system");
445
+ if ($t(Ie), Ie !== "system" || typeof matchMedia != "function") return;
446
+ const i = matchMedia("(prefers-color-scheme: dark)"), l = () => $t("system");
445
447
  return i.addEventListener("change", l), () => i.removeEventListener("change", l);
446
448
  }, [Ie]), z(() => (document.documentElement.classList.toggle("backmatter-blocks", _e), () => document.documentElement.classList.remove("backmatter-blocks")), [_e]), z(() => {
447
449
  const i = le.current;
448
450
  if (!i) return;
449
- const l = document.documentElement, v = `${e}-pointing`, H = () => i.classList.toggle(v, l.classList.contains("backmatter-pointing"));
451
+ const l = document.documentElement, $ = `${e}-pointing`, H = () => i.classList.toggle($, l.classList.contains("backmatter-pointing"));
450
452
  H();
451
453
  const Q = new MutationObserver(H);
452
454
  return Q.observe(l, { attributes: !0, attributeFilter: ["class"] }), () => Q.disconnect();
453
455
  }, []), z(() => {
454
456
  if (oe.current && oe.current !== y && !d) {
455
- oe.current = null, De(y), Ce(y);
457
+ oe.current = null, qe(y), Ce(y);
456
458
  return;
457
459
  }
458
460
  oe.current || Ce(y), oe.current === y && (oe.current = null);
459
461
  }, [y, d]), z(() => {
460
462
  if (!F) return;
461
463
  function i(l) {
462
- const v = ce.current;
463
- v && l.composedPath().includes(v) || L(null);
464
+ const $ = ce.current;
465
+ $ && l.composedPath().includes($) || L(null);
464
466
  }
465
467
  return document.addEventListener("pointerdown", i), () => document.removeEventListener("pointerdown", i);
466
468
  }, [F]), te(() => {
467
469
  const i = Z.current, l = T.current;
468
- !i || !l || F !== "settings" || cr(i, l);
470
+ !i || !l || F !== "settings" || sr(i, l);
469
471
  }, [F, ie, Te]), te(() => {
470
472
  if (!Y) return;
471
473
  const i = A.current;
@@ -479,16 +481,16 @@ function tr({
479
481
  };
480
482
  }, [h, Y, Te, ie]), z(() => {
481
483
  function i(l) {
482
- if (!ar(l.composedPath()[0] ?? null)) {
484
+ if (!ir(l.composedPath()[0] ?? null)) {
483
485
  if ((l.metaKey || l.ctrlKey) && l.key === ".") {
484
486
  l.preventDefault(), W.current.toggleHidden();
485
487
  return;
486
488
  }
487
489
  if ((l.metaKey || l.ctrlKey) && l.shiftKey && l.key.toLowerCase() === "p") {
488
490
  l.preventDefault();
489
- const v = x.current;
490
- if (!v || v.disabled) return;
491
- W.current.onModeKey(v);
491
+ const $ = x.current;
492
+ if (!$ || $.disabled) return;
493
+ W.current.onModeKey($);
492
494
  return;
493
495
  }
494
496
  if ((l.metaKey || l.ctrlKey) && !l.shiftKey && l.key.toLowerCase() === "d") {
@@ -504,19 +506,19 @@ function tr({
504
506
  W.current.onEscape();
505
507
  return;
506
508
  }
507
- Qt(l) === "chat" && L(null);
509
+ Zt(l) === "chat" && L(null);
508
510
  }
509
511
  }
510
512
  return document.addEventListener("keydown", i, !0), () => document.removeEventListener("keydown", i, !0);
511
513
  }, []), te(() => {
512
- var ot;
514
+ var it;
513
515
  const i = Z.current;
514
516
  if (!ne || !i || !(i.getRootNode() instanceof ShadowRoot)) return;
515
517
  if (!Ye.current) {
516
518
  Ye.current = !0;
517
- const ae = I !== "play" && Hn() === y;
518
- if (I !== "play" && De(y), ae)
519
- (ot = ce.current) == null || ot.setAttribute("data-settled", "true"), requestAnimationFrame(() => {
519
+ const ae = I !== "play" && Tn() === y;
520
+ if (I !== "play" && qe(y), ae)
521
+ (it = ce.current) == null || it.setAttribute("data-settled", "true"), requestAnimationFrame(() => {
520
522
  requestAnimationFrame(() => {
521
523
  var ye;
522
524
  return (ye = ce.current) == null ? void 0 : ye.removeAttribute("data-settled");
@@ -529,7 +531,7 @@ function tr({
529
531
  [{ transform: "translateY(100%)" }, { transform: "none" }],
530
532
  { duration: 460, easing: he, delay: 600, fill: "backwards" }
531
533
  );
532
- ye.id = "rise", G.current && qe(G.current, { delay: 740 });
534
+ ye.id = "rise", G.current && De(G.current, { delay: 740 });
533
535
  }
534
536
  }
535
537
  const l = !Xe.current;
@@ -539,12 +541,12 @@ function tr({
539
541
  const Q = i.offsetWidth;
540
542
  if (Ge.current = Q, l) return;
541
543
  const B = G.current;
542
- if (B && (se() ? B.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 150, easing: "ease", fill: "backwards" }) : qe(B, { delay: 40, blur: !0 })), se() || !Wn(H, Q)) return;
543
- const Yt = i.animate(
544
+ if (B && (se() ? B.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 150, easing: "ease", fill: "backwards" }) : De(B, { delay: 40, blur: !0 })), se() || !Pn(H, Q)) return;
545
+ const Gt = i.animate(
544
546
  [{ width: `${H}px` }, { width: `${Q}px` }],
545
- { duration: 380, easing: In }
547
+ { duration: 380, easing: zn }
546
548
  );
547
- Yt.id = "w";
549
+ Gt.id = "w";
548
550
  }, [ne, Te, I, y]);
549
551
  const ke = (c == null ? void 0 : c.type) === "published" ? c.sha : "";
550
552
  te(() => {
@@ -563,19 +565,19 @@ function tr({
563
565
  }, [ke, _]);
564
566
  function We(i, l) {
565
567
  if (d || i === ve || i === "preview" && !S) return;
566
- const v = Z.current;
567
- if (v) {
568
- const H = Tn(v.getBoundingClientRect(), l.getBoundingClientRect());
569
- v.style.setProperty("--ox", `${H.x}px`), v.style.setProperty("--oy", `${H.y}px`);
568
+ const $ = Z.current;
569
+ if ($) {
570
+ const H = Bn($.getBoundingClientRect(), l.getBoundingClientRect());
571
+ $.style.setProperty("--ox", `${H.x}px`), $.style.setProperty("--oy", `${H.y}px`);
570
572
  }
571
- i === "live" && (L(null), m && E(), h && g()), oe.current = i, De(i), Ce(i), i === "preview" ? S == null || S() : C();
573
+ i === "live" && (L(null), m && E(), h && g()), oe.current = i, qe(i), Ce(i), i === "preview" ? S == null || S() : C();
572
574
  }
573
- function nt(i) {
575
+ function tt(i) {
574
576
  if (Re.current === i) return;
575
- Re.current = i, L(null), Tt(i);
577
+ Re.current = i, L(null), Pt(i);
576
578
  const l = Z.current;
577
579
  if (!l || !(l.getRootNode() instanceof ShadowRoot)) return;
578
- const v = l.getRootNode(), H = v instanceof ShadowRoot ? v.activeElement : null;
580
+ const $ = l.getRootNode(), H = $ instanceof ShadowRoot ? $.activeElement : null;
579
581
  if (i && H instanceof HTMLElement && H.blur(), l.getAnimations().filter((B) => B.id === "hide" || B.id === "rise").forEach((B) => B.cancel()), se()) {
580
582
  const B = l.animate(
581
583
  [{ opacity: i ? 1 : 0 }, { opacity: i ? 0 : 1 }],
@@ -596,20 +598,20 @@ function tr({
596
598
  [{ transform: "translateY(100%)" }, { transform: "none" }],
597
599
  { duration: 460, easing: he, fill: "backwards" }
598
600
  );
599
- Q.id = "rise", G.current && qe(G.current, { delay: 140 });
601
+ Q.id = "rise", G.current && De(G.current, { delay: 140 });
600
602
  }
601
603
  W.current.openDashboard = () => N ? ((async () => {
602
604
  let i = Be ?? N;
603
605
  if (a != null && a.workspaceId && a.type && a.slug && !Ae)
604
606
  try {
605
- const { workspace: l } = await at(a.workspaceId);
606
- i = ut(N, a, l.slug, l.locales[0] ?? "en") ?? i;
607
+ const { workspace: l } = await ot(a.workspaceId);
608
+ i = dt(N, a, l.slug) ?? i;
607
609
  } catch {
608
610
  }
609
611
  location.assign(i);
610
612
  })(), !0) : !1, W.current.openShortcuts = () => {
611
613
  $e("shortcuts"), L("settings");
612
- }, W.current.toggleHidden = () => nt(!Re.current), W.current.onModeKey = (i) => We(de === "preview" ? "live" : "preview", i), W.current.onEscape = () => {
614
+ }, W.current.toggleHidden = () => tt(!Re.current), W.current.onModeKey = (i) => We(de === "preview" ? "live" : "preview", i), W.current.onEscape = () => {
613
615
  if (F) {
614
616
  L(null);
615
617
  return;
@@ -620,24 +622,24 @@ function tr({
620
622
  }
621
623
  (c == null ? void 0 : c.type) === "editing" && (M == null || M());
622
624
  };
623
- function rt(i) {
625
+ function nt(i) {
624
626
  d || (L(null), h && g(), ve === "live" && Ze.current && We("preview", i), E());
625
627
  }
626
- function Vt() {
628
+ function Ft() {
627
629
  d || (L(null), m && E(), g());
628
630
  }
629
631
  Ze.current = Qe;
630
- function Ut(i) {
632
+ function Kt(i) {
631
633
  h && g(), $e(i), L((l) => l === "settings" && i === "main" ? null : "settings");
632
634
  }
633
- function Ot() {
635
+ function Vt() {
634
636
  h && g(), L((i) => i === "page" ? null : "page");
635
637
  }
636
- const Gt = !!d || de === "live" && !S, Xt = !a || u <= 0, we = /* @__PURE__ */ t(
637
- nr,
638
+ const Ut = !!d || de === "live" && !S, Ot = !a || u <= 0, we = /* @__PURE__ */ t(
639
+ er,
638
640
  {
639
641
  mode: de,
640
- disabled: Gt,
642
+ disabled: Ut,
641
643
  buttonRef: x,
642
644
  onClick: (i) => We(de === "preview" ? "live" : "preview", i.currentTarget)
643
645
  }
@@ -656,7 +658,7 @@ function tr({
656
658
  we,
657
659
  /* @__PURE__ */ t("span", { className: `${e}-steps`, children: c.steps.map((i, l) => /* @__PURE__ */ s("span", { className: `${e}-step`, children: [
658
660
  l > 0 ? /* @__PURE__ */ t("span", { className: `${e}-dash`, "aria-hidden": !0, children: "—" }) : null,
659
- /* @__PURE__ */ t(or, { state: i.state }),
661
+ /* @__PURE__ */ t(rr, { state: i.state }),
660
662
  /* @__PURE__ */ t("span", { children: i.label })
661
663
  ] }, `${i.label}:${l}`)) })
662
664
  ] }) : (c == null ? void 0 : c.type) === "published" ? ge = /* @__PURE__ */ s(U, { children: [
@@ -670,20 +672,20 @@ function tr({
670
672
  c.when
671
673
  ] })
672
674
  ] }),
673
- /* @__PURE__ */ t("button", { type: "button", className: `${e}-btn`, onClick: () => (q ?? C)(), children: "View live" }),
675
+ /* @__PURE__ */ t("button", { type: "button", className: `${e}-btn`, onClick: () => (D ?? C)(), children: "View live" }),
674
676
  /* @__PURE__ */ t(
675
- vt,
677
+ xt,
676
678
  {
677
679
  pressed: m,
678
680
  disabled: !a,
679
681
  shortcut: Fe(),
680
- onClick: (i) => rt(i.currentTarget)
682
+ onClick: (i) => nt(i.currentTarget)
681
683
  }
682
684
  )
683
685
  ] }) : ge = /* @__PURE__ */ s(U, { children: [
684
686
  we,
685
687
  /* @__PURE__ */ t(
686
- br,
688
+ mr,
687
689
  {
688
690
  label: n,
689
691
  doc: a,
@@ -691,40 +693,40 @@ function tr({
691
693
  bar: ie,
692
694
  open: F === "page",
693
695
  expanded: F === "page",
694
- onToggle: Ot
696
+ onToggle: Vt
695
697
  }
696
698
  ),
697
699
  /* @__PURE__ */ t("span", { className: `${e}-rule`, "aria-hidden": !0 }),
698
700
  /* @__PURE__ */ t(
699
- vt,
701
+ xt,
700
702
  {
701
703
  pressed: m,
702
704
  disabled: !a,
703
705
  shortcut: Fe(),
704
- onClick: (i) => rt(i.currentTarget)
706
+ onClick: (i) => nt(i.currentTarget)
705
707
  }
706
708
  ),
707
709
  /* @__PURE__ */ t(
708
- rr,
710
+ tr,
709
711
  {
710
712
  buttonRef: A,
711
713
  open: h,
712
714
  count: u,
713
- disabled: Xt,
714
- onClick: Vt
715
+ disabled: Ot,
716
+ onClick: Ft
715
717
  }
716
718
  ),
717
719
  /* @__PURE__ */ t(
718
- sr,
720
+ or,
719
721
  {
720
722
  buttonRef: T,
721
723
  open: F === "settings",
722
- onClick: () => Ut("main")
724
+ onClick: () => Kt("main")
723
725
  }
724
726
  )
725
727
  ] });
726
- const it = /* @__PURE__ */ s(U, { children: [
727
- /* @__PURE__ */ t("style", { children: wr }),
728
+ const rt = /* @__PURE__ */ s(U, { children: [
729
+ /* @__PURE__ */ t("style", { children: $r }),
728
730
  /* @__PURE__ */ s(
729
731
  "div",
730
732
  {
@@ -733,11 +735,11 @@ function tr({
733
735
  "data-mode": de,
734
736
  "data-branch": r || void 0,
735
737
  children: [
736
- D ? /* @__PURE__ */ t(Yn, { active: de === "preview", radius: X }) : null,
738
+ q ? /* @__PURE__ */ t(Gn, { active: de === "preview", radius: X }) : null,
737
739
  /* @__PURE__ */ s(
738
740
  "footer",
739
741
  {
740
- ref: Ft,
742
+ ref: Dt,
741
743
  "aria-label": "Backmatter",
742
744
  "aria-hidden": ze || void 0,
743
745
  inert: ze ? !0 : void 0,
@@ -762,34 +764,34 @@ function tr({
762
764
  }
763
765
  ),
764
766
  /* @__PURE__ */ t(
765
- lr,
767
+ ar,
766
768
  {
767
769
  open: F === "settings",
768
- pane: Ht,
769
- hostName: Dt,
770
+ pane: Wt,
771
+ hostName: Ht,
770
772
  branch: r,
771
773
  bar: ie,
772
774
  highlightBlocks: _e,
773
775
  previewAgent: Qe,
774
776
  dashboardHref: Be,
775
777
  onHighlight: (i) => {
776
- Je(i), mt(je(), ht, i);
778
+ Je(i), gt(je(), ut, i);
777
779
  },
778
780
  onPreviewAgent: (i) => {
779
- et(i), mt(je(), pt, i);
781
+ et(i), gt(je(), ht, i);
780
782
  },
781
783
  onShortcuts: () => $e("shortcuts"),
782
784
  onBack: () => $e("main"),
783
785
  onDashboard: () => {
784
786
  W.current.openDashboard();
785
787
  },
786
- onHide: () => nt(!0),
788
+ onHide: () => tt(!0),
787
789
  onSwitchBranch: r ? () => L("branch") : void 0,
788
790
  onSignOut: j
789
791
  }
790
792
  ),
791
793
  r ? /* @__PURE__ */ t(
792
- xr,
794
+ fr,
793
795
  {
794
796
  branch: r,
795
797
  tree: o,
@@ -805,17 +807,17 @@ function tr({
805
807
  )
806
808
  ] });
807
809
  return /* @__PURE__ */ s("div", { ref: re, className: `${e}-host`, "data-backmatter-devbar": "", children: [
808
- /* @__PURE__ */ t("style", { children: kr }),
809
- ne ? Me(it, ne) : /* @__PURE__ */ t(
810
+ /* @__PURE__ */ t("style", { children: vr }),
811
+ ne ? Me(rt, ne) : /* @__PURE__ */ t(
810
812
  "template",
811
813
  {
812
814
  shadowrootmode: "open",
813
- children: it
815
+ children: rt
814
816
  }
815
817
  )
816
818
  ] });
817
819
  }
818
- function nr({
820
+ function er({
819
821
  mode: n,
820
822
  disabled: r,
821
823
  buttonRef: o,
@@ -835,13 +837,13 @@ function nr({
835
837
  disabled: r,
836
838
  onClick: a,
837
839
  children: [
838
- /* @__PURE__ */ t(ir, { exit: d }),
840
+ /* @__PURE__ */ t(nr, { exit: d }),
839
841
  d ? "Exit preview" : "Enter preview"
840
842
  ]
841
843
  }
842
844
  );
843
845
  }
844
- function vt({
846
+ function xt({
845
847
  pressed: n,
846
848
  disabled: r,
847
849
  shortcut: o,
@@ -857,7 +859,7 @@ function vt({
857
859
  disabled: r,
858
860
  onClick: a,
859
861
  children: [
860
- /* @__PURE__ */ t(en, {}),
862
+ /* @__PURE__ */ t(Jt, {}),
861
863
  /* @__PURE__ */ t("span", { children: "Agent" }),
862
864
  /* @__PURE__ */ s("kbd", { className: `${e}-kbd`, children: [
863
865
  o,
@@ -867,7 +869,7 @@ function vt({
867
869
  }
868
870
  );
869
871
  }
870
- function rr({
872
+ function tr({
871
873
  buttonRef: n,
872
874
  open: r,
873
875
  count: o,
@@ -885,7 +887,7 @@ function rr({
885
887
  disabled: a,
886
888
  onClick: d,
887
889
  children: [
888
- /* @__PURE__ */ t(nn, {}),
890
+ /* @__PURE__ */ t(en, {}),
889
891
  /* @__PURE__ */ s("span", { children: [
890
892
  "Publish",
891
893
  o > 0 ? /* @__PURE__ */ s("span", { className: `${e}-count`, children: [
@@ -897,16 +899,16 @@ function rr({
897
899
  }
898
900
  );
899
901
  }
900
- function ir({ exit: n }) {
902
+ function nr({ exit: n }) {
901
903
  return n ? /* @__PURE__ */ t("svg", { className: `${e}-mark`, width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": !0, children: /* @__PURE__ */ t("path", { d: "M3 3l6 6M9 3 3 9", stroke: "currentColor", strokeWidth: "1.25", strokeLinecap: "round" }) }) : /* @__PURE__ */ s("svg", { className: `${e}-mark`, width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": !0, children: [
902
904
  /* @__PURE__ */ t("circle", { cx: "6", cy: "6", r: "3.25", stroke: "currentColor", strokeWidth: "1.25" }),
903
905
  /* @__PURE__ */ t("circle", { cx: "6", cy: "6", r: "1.35", fill: "currentColor" })
904
906
  ] });
905
907
  }
906
- function or({ state: n }) {
908
+ function rr({ state: n }) {
907
909
  return n === "done" ? /* @__PURE__ */ t("span", { className: `${e}-done`, "aria-hidden": !0, children: "✓" }) : n === "active" ? /* @__PURE__ */ t("span", { className: `${e}-spin`, "aria-hidden": !0 }) : /* @__PURE__ */ t("span", { className: `${e}-ring`, "aria-hidden": !0 });
908
910
  }
909
- function qe(n, r = {}) {
911
+ function De(n, r = {}) {
910
912
  const o = r.delay ?? 0;
911
913
  if (se()) {
912
914
  n.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 150, easing: "ease", fill: "backwards" });
@@ -922,12 +924,12 @@ function qe(n, r = {}) {
922
924
  );
923
925
  });
924
926
  }
925
- function ar(n) {
927
+ function ir(n) {
926
928
  if (!(n instanceof HTMLElement)) return !1;
927
929
  const r = n.tagName;
928
930
  return r === "INPUT" || r === "TEXTAREA" || r === "SELECT" ? !0 : n.isContentEditable;
929
931
  }
930
- function sr({
932
+ function or({
931
933
  buttonRef: n,
932
934
  open: r,
933
935
  onClick: o
@@ -942,11 +944,11 @@ function sr({
942
944
  "aria-haspopup": "dialog",
943
945
  "aria-expanded": r,
944
946
  onClick: o,
945
- children: /* @__PURE__ */ t(rn, {})
947
+ children: /* @__PURE__ */ t(tn, {})
946
948
  }
947
949
  );
948
950
  }
949
- function lr({
951
+ function ar({
950
952
  open: n,
951
953
  pane: r,
952
954
  hostName: o,
@@ -959,16 +961,16 @@ function lr({
959
961
  onPreviewAgent: c,
960
962
  onShortcuts: R,
961
963
  onBack: y,
962
- onDashboard: D,
964
+ onDashboard: q,
963
965
  onHide: X,
964
966
  onSwitchBranch: I,
965
967
  onSignOut: N
966
968
  }) {
967
- const C = Ue(), [S, E] = f(null), g = Fe();
969
+ const C = Ue(), [S, E] = b(null), g = Fe();
968
970
  if (z(() => {
969
971
  if (!n) return;
970
972
  let _ = !1;
971
- return on().then((j) => {
973
+ return nn().then((j) => {
972
974
  _ || E((j == null ? void 0 : j.user.email) ?? null);
973
975
  }).catch(() => {
974
976
  _ || E(null);
@@ -976,9 +978,9 @@ function lr({
976
978
  _ = !0;
977
979
  };
978
980
  }, [n]), !n || !d) return null;
979
- const M = o && a ? `${o} · ${a}` : o || a || "", q = r === "shortcuts" ? /* @__PURE__ */ s("div", { role: "dialog", "aria-labelledby": C, className: `${e}-menu ${e}-settings`, children: [
981
+ const M = o && a ? `${o} · ${a}` : o || a || "", D = r === "shortcuts" ? /* @__PURE__ */ s("div", { role: "dialog", "aria-labelledby": C, className: `${e}-menu ${e}-settings`, children: [
980
982
  /* @__PURE__ */ t("div", { className: `${e}-settings-head`, children: /* @__PURE__ */ s("button", { type: "button", className: `${e}-settings-back`, onClick: y, children: [
981
- /* @__PURE__ */ t(Pt, {}),
983
+ /* @__PURE__ */ t(Bt, {}),
982
984
  /* @__PURE__ */ t("span", { id: C, children: "Shortcuts" })
983
985
  ] }) }),
984
986
  /* @__PURE__ */ t(fe, { label: "Toggle preview", keys: `${g}⇧P` }),
@@ -992,18 +994,18 @@ function lr({
992
994
  M ? /* @__PURE__ */ t("span", { className: `${e}-settings-place`, children: M }) : null
993
995
  ] }),
994
996
  /* @__PURE__ */ s("div", { className: `${e}-settings-row`, children: [
995
- /* @__PURE__ */ t(ur, {}),
997
+ /* @__PURE__ */ t(cr, {}),
996
998
  /* @__PURE__ */ t("span", { children: "Highlight editable blocks" }),
997
- /* @__PURE__ */ t($t, { on: m, label: "Highlight editable blocks", onClick: () => p(!m) })
999
+ /* @__PURE__ */ t(vt, { on: m, label: "Highlight editable blocks", onClick: () => p(!m) })
998
1000
  ] }),
999
1001
  /* @__PURE__ */ s("div", { className: `${e}-settings-row`, children: [
1000
- /* @__PURE__ */ t(hr, {}),
1002
+ /* @__PURE__ */ t(dr, {}),
1001
1003
  /* @__PURE__ */ t("span", { children: "Preview when Agent edits" }),
1002
- /* @__PURE__ */ t($t, { on: h, label: "Preview when Agent edits", onClick: () => c(!h) })
1004
+ /* @__PURE__ */ t(vt, { on: h, label: "Preview when Agent edits", onClick: () => c(!h) })
1003
1005
  ] }),
1004
1006
  /* @__PURE__ */ t("div", { className: `${e}-settings-rule` }),
1005
- u ? /* @__PURE__ */ s("button", { type: "button", className: `${e}-settings-action`, onClick: D, children: [
1006
- /* @__PURE__ */ t(pr, {}),
1007
+ u ? /* @__PURE__ */ s("button", { type: "button", className: `${e}-settings-action`, onClick: q, children: [
1008
+ /* @__PURE__ */ t(ur, {}),
1007
1009
  /* @__PURE__ */ t("span", { children: "Open in dashboard" }),
1008
1010
  /* @__PURE__ */ s("kbd", { className: `${e}-kbd`, children: [
1009
1011
  g,
@@ -1011,17 +1013,17 @@ function lr({
1011
1013
  ] })
1012
1014
  ] }) : null,
1013
1015
  I ? /* @__PURE__ */ s("button", { type: "button", className: `${e}-settings-action`, onClick: I, children: [
1014
- /* @__PURE__ */ t("span", { className: `${e}-settings-icon`, "aria-hidden": !0, children: /* @__PURE__ */ t(sn, {}) }),
1016
+ /* @__PURE__ */ t("span", { className: `${e}-settings-icon`, "aria-hidden": !0, children: /* @__PURE__ */ t(on, {}) }),
1015
1017
  /* @__PURE__ */ t("span", { children: "Switch branch" }),
1016
1018
  a ? /* @__PURE__ */ t("span", { className: `${e}-settings-email`, children: a }) : null
1017
1019
  ] }) : null,
1018
1020
  /* @__PURE__ */ s("button", { type: "button", className: `${e}-settings-action`, onClick: R, children: [
1019
- /* @__PURE__ */ t(gr, {}),
1021
+ /* @__PURE__ */ t(hr, {}),
1020
1022
  /* @__PURE__ */ t("span", { children: "Keyboard shortcuts" }),
1021
1023
  /* @__PURE__ */ t("kbd", { className: `${e}-kbd`, children: "?" })
1022
1024
  ] }),
1023
1025
  /* @__PURE__ */ s("button", { type: "button", className: `${e}-settings-action`, "aria-keyshortcuts": "Meta+. Control+.", onClick: X, children: [
1024
- /* @__PURE__ */ t(mr, {}),
1026
+ /* @__PURE__ */ t(pr, {}),
1025
1027
  /* @__PURE__ */ t("span", { children: "Hide toolbar" }),
1026
1028
  /* @__PURE__ */ s("kbd", { className: `${e}-kbd`, children: [
1027
1029
  g,
@@ -1031,13 +1033,13 @@ function lr({
1031
1033
  N ? /* @__PURE__ */ s(U, { children: [
1032
1034
  /* @__PURE__ */ t("div", { className: `${e}-settings-rule` }),
1033
1035
  /* @__PURE__ */ s("button", { type: "button", className: `${e}-settings-action`, onClick: N, children: [
1034
- /* @__PURE__ */ t(fr, {}),
1036
+ /* @__PURE__ */ t(gr, {}),
1035
1037
  /* @__PURE__ */ t("span", { children: "Sign out" }),
1036
1038
  S ? /* @__PURE__ */ t("span", { className: `${e}-settings-email`, children: S }) : null
1037
1039
  ] })
1038
1040
  ] }) : null
1039
1041
  ] });
1040
- return Me(q, d);
1042
+ return Me(D, d);
1041
1043
  }
1042
1044
  function fe({ label: n, keys: r }) {
1043
1045
  return /* @__PURE__ */ s("div", { className: `${e}-settings-action ${e}-settings-static`, children: [
@@ -1045,7 +1047,7 @@ function fe({ label: n, keys: r }) {
1045
1047
  /* @__PURE__ */ t("kbd", { className: `${e}-kbd`, children: r })
1046
1048
  ] });
1047
1049
  }
1048
- function $t({ on: n, label: r, onClick: o }) {
1050
+ function vt({ on: n, label: r, onClick: o }) {
1049
1051
  return /* @__PURE__ */ t(
1050
1052
  "button",
1051
1053
  {
@@ -1059,44 +1061,44 @@ function $t({ on: n, label: r, onClick: o }) {
1059
1061
  }
1060
1062
  );
1061
1063
  }
1062
- function cr(n, r) {
1064
+ function sr(n, r) {
1063
1065
  const o = n.getBoundingClientRect(), a = r.getBoundingClientRect();
1064
1066
  n.style.setProperty("--menu-right", `${Math.max(0, o.right - a.right)}px`);
1065
1067
  }
1066
- function dr(n, r) {
1067
- const o = n.getBoundingClientRect(), a = r.getBoundingClientRect(), d = Math.min(er, window.innerWidth - 32);
1068
+ function lr(n, r) {
1069
+ const o = n.getBoundingClientRect(), a = r.getBoundingClientRect(), d = Math.min(Jn, window.innerWidth - 32);
1068
1070
  let h = a.left + a.width / 2 - o.left - d / 2;
1069
1071
  const u = 16, p = u - o.left, c = window.innerWidth - u - d - o.left;
1070
1072
  n.style.setProperty("--menu-x", `${Math.max(p, Math.min(h, c))}px`);
1071
1073
  }
1072
- function ur() {
1074
+ function cr() {
1073
1075
  return /* @__PURE__ */ s("svg", { className: `${e}-settings-icon`, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": !0, children: [
1074
1076
  /* @__PURE__ */ t("path", { d: "M3 3h4.2v4.2H3zM8.8 3H13v4.2H8.8zM3 8.8h4.2V13H3z", fill: "none", stroke: "currentColor", strokeWidth: "1.3" }),
1075
1077
  /* @__PURE__ */ t("path", { d: "M8.8 10.2h4.2", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeDasharray: "1.4 1.5" })
1076
1078
  ] });
1077
1079
  }
1078
- function hr() {
1080
+ function dr() {
1079
1081
  return /* @__PURE__ */ s("svg", { className: `${e}-settings-icon`, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": !0, children: [
1080
1082
  /* @__PURE__ */ t("path", { d: "M1.6 8S4 3.8 8 3.8 14.4 8 14.4 8 12 12.2 8 12.2 1.6 8 1.6 8Z", fill: "none", stroke: "currentColor", strokeWidth: "1.3" }),
1081
1083
  /* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "1.8", fill: "none", stroke: "currentColor", strokeWidth: "1.3" })
1082
1084
  ] });
1083
1085
  }
1084
- function pr() {
1086
+ function ur() {
1085
1087
  return /* @__PURE__ */ t("svg", { className: `${e}-settings-icon`, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": !0, children: /* @__PURE__ */ t("path", { d: "M2.5 2.5h4.2v4.2H2.5zM9.3 2.5h4.2v4.2H9.3zM2.5 9.3h4.2v4.2H2.5zM9.3 9.3h4.2v4.2H9.3z", fill: "none", stroke: "currentColor", strokeWidth: "1.3" }) });
1086
1088
  }
1087
- function gr() {
1089
+ function hr() {
1088
1090
  return /* @__PURE__ */ s("svg", { className: `${e}-settings-icon`, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": !0, children: [
1089
1091
  /* @__PURE__ */ t("rect", { x: "1.8", y: "3.6", width: "12.4", height: "8.8", rx: "1.4", fill: "none", stroke: "currentColor", strokeWidth: "1.3" }),
1090
1092
  /* @__PURE__ */ t("path", { d: "M4 6.2h.1M6.4 6.2h.1M8.8 6.2h.1M11.2 6.2h.1M4.8 8.4h6.4", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
1091
1093
  ] });
1092
1094
  }
1093
- function mr() {
1095
+ function pr() {
1094
1096
  return /* @__PURE__ */ s("svg", { className: `${e}-settings-icon`, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": !0, children: [
1095
1097
  /* @__PURE__ */ t("path", { d: "M2 8s2.2-3.6 6-3.6S14 8 14 8s-2.2 3.6-6 3.6S2 8 2 8Z", fill: "none", stroke: "currentColor", strokeWidth: "1.3" }),
1096
1098
  /* @__PURE__ */ t("path", { d: "M3 13 13 3", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
1097
1099
  ] });
1098
1100
  }
1099
- function fr() {
1101
+ function gr() {
1100
1102
  return /* @__PURE__ */ s("svg", { className: `${e}-settings-icon`, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": !0, children: [
1101
1103
  /* @__PURE__ */ t("path", { d: "M6.5 3.2H3.8v9.6h2.7", fill: "none", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" }),
1102
1104
  /* @__PURE__ */ t("path", { d: "M7 8h6.2M11 5.4 13.6 8 11 10.6", fill: "none", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" })
@@ -1109,12 +1111,12 @@ function je() {
1109
1111
  return null;
1110
1112
  }
1111
1113
  }
1112
- function kt(n) {
1114
+ function $t(n) {
1113
1115
  if (typeof document > "u") return;
1114
- const r = typeof matchMedia == "function" && matchMedia("(prefers-color-scheme: dark)").matches, o = jn(n, r) === "dark", a = document.documentElement;
1116
+ const r = typeof matchMedia == "function" && matchMedia("(prefers-color-scheme: dark)").matches, o = qn(n, r) === "dark", a = document.documentElement;
1115
1117
  a.dataset.theme = o ? "dark" : "light", a.style.colorScheme = n === "system" ? "light dark" : o ? "dark" : "light", a.classList.toggle("dark", o), a.classList.toggle("light", !o);
1116
1118
  }
1117
- function br({
1119
+ function mr({
1118
1120
  label: n,
1119
1121
  doc: r,
1120
1122
  dashboardHref: o,
@@ -1123,7 +1125,7 @@ function br({
1123
1125
  expanded: m,
1124
1126
  onToggle: h
1125
1127
  }) {
1126
- const [u, p] = f([]), [c, R] = f(0), [y, D] = f(!1), [X, I] = f(!1), [N, C] = f(null), [S, E] = f(""), g = Ue(), M = k(null), q = k(null), _ = k(null), j = k(0), Y = k(/* @__PURE__ */ new Map());
1128
+ const [u, p] = b([]), [c, R] = b(0), [y, q] = b(!1), [X, I] = b(!1), [N, C] = b(null), [S, E] = b(""), g = Ue(), M = k(null), D = k(null), _ = k(null), j = k(0), Y = k(/* @__PURE__ */ new Map());
1127
1129
  z(() => {
1128
1130
  d || E("");
1129
1131
  }, [d]), te(() => {
@@ -1132,16 +1134,16 @@ function br({
1132
1134
  }, [d]), te(() => {
1133
1135
  const x = M.current;
1134
1136
  if (!d || !a || !x) return;
1135
- const A = () => dr(a, x);
1137
+ const A = () => lr(a, x);
1136
1138
  return A(), window.addEventListener("resize", A), () => window.removeEventListener("resize", A);
1137
1139
  }, [d, a]);
1138
1140
  const le = Ke(
1139
1141
  (x, A, T) => {
1140
1142
  if (!r) return;
1141
- const J = ++j.current, ne = S.trim(), pe = xt(r.workspaceId, ne);
1142
- A ? I(!0) : T != null && T.silent || D(!0), tn(r.workspaceId, {
1143
+ const J = ++j.current, ne = S.trim(), pe = bt(r.workspaceId, ne);
1144
+ A ? I(!0) : T != null && T.silent || q(!0), Qt(r.workspaceId, {
1143
1145
  q: ne || void 0,
1144
- limit: Qn,
1146
+ limit: Zn,
1145
1147
  offset: x,
1146
1148
  current: r
1147
1149
  }).then((re) => {
@@ -1152,14 +1154,14 @@ function br({
1152
1154
  }).catch(() => {
1153
1155
  J === j.current && (A || Y.current.get(pe) || p([]), C("Couldn't load pages"));
1154
1156
  }).finally(() => {
1155
- J === j.current && (D(!1), I(!1));
1157
+ J === j.current && (q(!1), I(!1));
1156
1158
  });
1157
1159
  },
1158
1160
  [r, S]
1159
1161
  );
1160
1162
  z(() => {
1161
1163
  if (!d || !r) return;
1162
- const x = S.trim(), A = xt(r.workspaceId, x), T = Y.current.get(A);
1164
+ const x = S.trim(), A = bt(r.workspaceId, x), T = Y.current.get(A);
1163
1165
  T && (p(T.rows), R(T.total), C(null));
1164
1166
  const J = window.setTimeout(
1165
1167
  () => le(0, !1, { silent: !!T }),
@@ -1168,7 +1170,7 @@ function br({
1168
1170
  return () => window.clearTimeout(J);
1169
1171
  }, [d, r, S, le]);
1170
1172
  function ce() {
1171
- const x = q.current;
1173
+ const x = D.current;
1172
1174
  !x || y || X || u.length >= c || x.scrollTop + x.clientHeight < x.scrollHeight - 48 || le(u.length, !0);
1173
1175
  }
1174
1176
  if (!r) return /* @__PURE__ */ t("span", { className: `${e}-crumb`, children: n });
@@ -1181,7 +1183,7 @@ function br({
1181
1183
  className: `${e}-menu ${e}-page-menu`,
1182
1184
  children: [
1183
1185
  /* @__PURE__ */ t(
1184
- Bt,
1186
+ Lt,
1185
1187
  {
1186
1188
  query: S,
1187
1189
  onQuery: E,
@@ -1194,7 +1196,7 @@ function br({
1194
1196
  loading: y && u.length === 0
1195
1197
  }
1196
1198
  ),
1197
- /* @__PURE__ */ s("div", { ref: q, className: `${e}-page-menu-list`, onScroll: ce, children: [
1199
+ /* @__PURE__ */ s("div", { ref: D, className: `${e}-page-menu-list`, onScroll: ce, children: [
1198
1200
  u.map((x) => /* @__PURE__ */ t(
1199
1201
  "button",
1200
1202
  {
@@ -1244,14 +1246,14 @@ function br({
1244
1246
  onClick: h,
1245
1247
  children: [
1246
1248
  /* @__PURE__ */ t("span", { children: n }),
1247
- /* @__PURE__ */ t(Pt, {})
1249
+ /* @__PURE__ */ t(Bt, {})
1248
1250
  ]
1249
1251
  }
1250
1252
  ),
1251
1253
  G && a ? Me(G, a) : null
1252
1254
  ] });
1253
1255
  }
1254
- function xr({
1256
+ function fr({
1255
1257
  branch: n,
1256
1258
  tree: r,
1257
1259
  workspaceId: o,
@@ -1260,26 +1262,26 @@ function xr({
1260
1262
  open: m,
1261
1263
  onClose: h
1262
1264
  }) {
1263
- const [u, p] = f(null), [c, R] = f(null), [y, D] = f(null), [X, I] = f(!1), [N, C] = f(""), S = Ue();
1265
+ const [u, p] = b(null), [c, R] = b(null), [y, q] = b(null), [X, I] = b(!1), [N, C] = b(""), S = Ue();
1264
1266
  if (z(() => {
1265
1267
  m || C("");
1266
1268
  }, [m]), z(() => {
1267
1269
  if (!m || !o || u) return;
1268
1270
  let g = !1;
1269
- return an(o).then((M) => {
1271
+ return rn(o).then((M) => {
1270
1272
  if (g) return;
1271
- const q = M.branches.map((_) => _.name);
1272
- q.includes(n) || q.unshift(n), p(q), R(M.defaultBranch);
1273
+ const D = M.branches.map((_) => _.name);
1274
+ D.includes(n) || D.unshift(n), p(D), R(M.defaultBranch);
1273
1275
  }).catch(() => {
1274
- g || D("Couldn't load branches");
1276
+ g || q("Couldn't load branches");
1275
1277
  }), () => {
1276
1278
  g = !0;
1277
1279
  };
1278
1280
  }, [m, o, u, n]), !m || !d) return null;
1279
- const E = u ? vr(u.map((g) => ({ key: g, label: g })), N) : null;
1281
+ const E = u ? br(u.map((g) => ({ key: g, label: g })), N) : null;
1280
1282
  return Me(
1281
1283
  /* @__PURE__ */ t("div", { id: S, role: "menu", "aria-label": "Branches", className: `${e}-menu ${e}-page-menu`, children: o ? /* @__PURE__ */ t(
1282
- Bt,
1284
+ Lt,
1283
1285
  {
1284
1286
  query: N,
1285
1287
  onQuery: C,
@@ -1301,14 +1303,14 @@ function xr({
1301
1303
  h();
1302
1304
  return;
1303
1305
  }
1304
- I(!0), D(null), $r({
1306
+ I(!0), q(null), xr({
1305
1307
  workspaceId: o,
1306
1308
  branch: g.label,
1307
1309
  tree: r,
1308
1310
  redirect: location.pathname + location.search + location.hash,
1309
1311
  previewEntryPath: a
1310
1312
  }).catch((M) => {
1311
- I(!1), D(M instanceof Error ? M.message : "Couldn't switch branch");
1313
+ I(!1), q(M instanceof Error ? M.message : "Couldn't switch branch");
1312
1314
  });
1313
1315
  },
1314
1316
  children: [
@@ -1323,7 +1325,7 @@ function xr({
1323
1325
  d
1324
1326
  );
1325
1327
  }
1326
- function Bt({
1328
+ function Lt({
1327
1329
  query: n,
1328
1330
  onQuery: r,
1329
1331
  inputRef: o,
@@ -1357,15 +1359,15 @@ function Bt({
1357
1359
  ] }) : null
1358
1360
  ] });
1359
1361
  }
1360
- function Pt() {
1362
+ function Bt() {
1361
1363
  return /* @__PURE__ */ t("svg", { className: `${e}-chevron`, width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", "aria-hidden": !0, children: /* @__PURE__ */ t("path", { d: "M2.5 4.5 6 8l3.5-3.5", stroke: "currentColor", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) });
1362
1364
  }
1363
- function vr(n, r) {
1365
+ function br(n, r) {
1364
1366
  const o = r.trim().toLowerCase();
1365
1367
  return o ? n.filter((a) => a.label.toLowerCase().includes(o)) : [...n];
1366
1368
  }
1367
- async function $r(n) {
1368
- const r = n.checkout ?? cn, o = n.ticket ?? ln, a = n.assign ?? ((h) => location.assign(h));
1369
+ async function xr(n) {
1370
+ const r = n.checkout ?? sn, o = n.ticket ?? an, a = n.assign ?? ((h) => location.assign(h));
1369
1371
  await r(n.workspaceId, n.branch);
1370
1372
  let d;
1371
1373
  try {
@@ -1381,7 +1383,7 @@ async function $r(n) {
1381
1383
  const m = n.previewEntryPath.includes("?") ? "&" : "?";
1382
1384
  a(`${n.previewEntryPath}${m}ticket=${encodeURIComponent(d.ticket)}`);
1383
1385
  }
1384
- const kr = `
1386
+ const vr = `
1385
1387
  .${e}-host {
1386
1388
  position: absolute;
1387
1389
  width: 0;
@@ -1400,9 +1402,9 @@ html.backmatter-blocks [data-backmatter-block] {
1400
1402
  outline: 1.5px solid oklch(0.56 0.21 295);
1401
1403
  outline-offset: 2px;
1402
1404
  }
1403
- `, wr = `
1405
+ `, $r = `
1404
1406
  .${e}-root {
1405
- --preview: ${Lt};
1407
+ --preview: ${At};
1406
1408
  --preview-hover: oklch(0.50 0.20 295);
1407
1409
  --preview-deep: oklch(0.48 0.20 295);
1408
1410
  --preview-line: oklch(0.66 0.16 295);
@@ -1506,11 +1508,11 @@ html.backmatter-blocks [data-backmatter-block] {
1506
1508
  background: var(--preview);
1507
1509
  pointer-events: none;
1508
1510
  clip-path: circle(0px at var(--ox) var(--oy));
1509
- transition: clip-path ${An}ms var(--ease-in);
1511
+ transition: clip-path ${In}ms var(--ease-in);
1510
1512
  }
1511
1513
  .${e}-root[data-mode="preview"] .${e}-flood {
1512
1514
  clip-path: circle(150% at var(--ox) var(--oy));
1513
- transition: clip-path ${_n}ms var(--ease-out);
1515
+ transition: clip-path ${Rn}ms var(--ease-out);
1514
1516
  }
1515
1517
  .${e}-root[data-settled] .${e}-flood { transition: none; }
1516
1518
  .${e}-row {
@@ -2009,21 +2011,21 @@ html.backmatter-blocks [data-backmatter-block] {
2009
2011
  :host(.${e}-pointing) .${e} * { cursor: pointer !important; }
2010
2012
  :host(.${e}-pointing) .${e} button:disabled { cursor: default !important; }
2011
2013
  `, Se = () => {
2012
- }, yr = {
2014
+ }, kr = {
2013
2015
  position: "relative",
2014
2016
  height: 96,
2015
2017
  overflow: "hidden",
2016
2018
  transform: "translateZ(0)",
2017
2019
  "--bm-devbar-right": "auto",
2018
2020
  "--bm-devbar-left": "12px"
2019
- }, Nr = {
2021
+ }, wr = {
2020
2022
  locale: "en",
2021
2023
  type: "page",
2022
2024
  slug: "home",
2023
2025
  workspaceId: "ws_sample"
2024
2026
  };
2025
- function Sr() {
2026
- const [n, r] = f(0);
2027
+ function yr() {
2028
+ const [n, r] = b(0);
2027
2029
  return /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 40 }, children: [
2028
2030
  /* @__PURE__ */ t("style", { children: `
2029
2031
  .ui-kit-devbar-label {
@@ -2132,12 +2134,12 @@ function K({
2132
2134
  }) {
2133
2135
  return /* @__PURE__ */ s("section", { style: { display: "flex", flexDirection: "column" }, children: [
2134
2136
  /* @__PURE__ */ t("h2", { className: "ui-kit-devbar-label", children: r }),
2135
- /* @__PURE__ */ t("div", { className: "ui-kit-devbar-stage", style: yr, children: /* @__PURE__ */ t(
2136
- tr,
2137
+ /* @__PURE__ */ t("div", { className: "ui-kit-devbar-stage", style: kr, children: /* @__PURE__ */ t(
2138
+ Qn,
2137
2139
  {
2138
2140
  label: "page/home",
2139
2141
  branch: a,
2140
- doc: m ? Nr : null,
2142
+ doc: m ? wr : null,
2141
2143
  siteMode: o,
2142
2144
  exiting: d,
2143
2145
  chatOpen: h,
@@ -2155,30 +2157,30 @@ function K({
2155
2157
  ) })
2156
2158
  ] });
2157
2159
  }
2158
- const wt = P.find((n) => n.slug === "feedback");
2159
- function Mr() {
2160
- return /* @__PURE__ */ t(O, { title: wt.title, lede: wt.lede, children: /* @__PURE__ */ s(Ee, { children: [
2161
- /* @__PURE__ */ t(b, { label: "StatusBar", block: !0, children: /* @__PURE__ */ s(He, { children: [
2160
+ const kt = P.find((n) => n.slug === "feedback");
2161
+ function Nr() {
2162
+ return /* @__PURE__ */ t(O, { title: kt.title, lede: kt.lede, children: /* @__PURE__ */ s(Ee, { children: [
2163
+ /* @__PURE__ */ t(f, { label: "StatusBar", block: !0, children: /* @__PURE__ */ s(He, { children: [
2162
2164
  /* @__PURE__ */ t(me, { children: "main" }),
2163
2165
  /* @__PURE__ */ t(me, { children: "2 uncommitted" })
2164
2166
  ] }) }),
2165
- /* @__PURE__ */ t(b, { label: "StatusBar", block: !0, children: /* @__PURE__ */ s(He, { children: [
2167
+ /* @__PURE__ */ t(f, { label: "StatusBar", block: !0, children: /* @__PURE__ */ s(He, { children: [
2166
2168
  /* @__PURE__ */ t(me, { children: "feat/sale" }),
2167
2169
  /* @__PURE__ */ t(me, { children: "Unsaved" })
2168
2170
  ] }) }),
2169
- /* @__PURE__ */ t(b, { label: "danger", block: !0, children: /* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(me, { tone: "danger", children: "Save failed" }) }) }),
2170
- /* @__PURE__ */ t(b, { label: "success", children: /* @__PURE__ */ t($, { tone: "success", children: "Success" }) }),
2171
- /* @__PURE__ */ t(b, { label: "danger", children: /* @__PURE__ */ t($, { tone: "danger", children: "Danger" }) })
2171
+ /* @__PURE__ */ t(f, { label: "danger", block: !0, children: /* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(me, { tone: "danger", children: "Save failed" }) }) }),
2172
+ /* @__PURE__ */ t(f, { label: "success", children: /* @__PURE__ */ t(v, { tone: "success", children: "Success" }) }),
2173
+ /* @__PURE__ */ t(f, { label: "danger", children: /* @__PURE__ */ t(v, { tone: "danger", children: "Danger" }) })
2172
2174
  ] }) });
2173
2175
  }
2174
- const yt = P.find((n) => n.slug === "fields");
2175
- function Er() {
2176
- const [n, r] = f("en");
2177
- return /* @__PURE__ */ t(O, { title: yt.title, lede: yt.lede, children: /* @__PURE__ */ s(Ee, { children: [
2178
- /* @__PURE__ */ t(b, { label: "Input", block: !0, children: /* @__PURE__ */ t(Ne, { label: "Text", hint: "Shown under the field.", children: /* @__PURE__ */ t(st, { defaultValue: "Ada Lovelace", autoComplete: "off", spellCheck: !1 }) }) }),
2179
- /* @__PURE__ */ t(b, { label: "disabled", block: !0, children: /* @__PURE__ */ t(Ne, { label: "Disabled", children: /* @__PURE__ */ t(st, { defaultValue: "Locked", disabled: !0 }) }) }),
2180
- /* @__PURE__ */ t(b, { label: "Select", block: !0, children: /* @__PURE__ */ t(Ne, { label: "Select", children: /* @__PURE__ */ t(
2181
- dn,
2176
+ const wt = P.find((n) => n.slug === "fields");
2177
+ function Sr() {
2178
+ const [n, r] = b("en");
2179
+ return /* @__PURE__ */ t(O, { title: wt.title, lede: wt.lede, children: /* @__PURE__ */ s(Ee, { children: [
2180
+ /* @__PURE__ */ t(f, { label: "Input", block: !0, children: /* @__PURE__ */ t(Ne, { label: "Text", hint: "Shown under the field.", children: /* @__PURE__ */ t(at, { defaultValue: "Ada Lovelace", autoComplete: "off", spellCheck: !1 }) }) }),
2181
+ /* @__PURE__ */ t(f, { label: "disabled", block: !0, children: /* @__PURE__ */ t(Ne, { label: "Disabled", children: /* @__PURE__ */ t(at, { defaultValue: "Locked", disabled: !0 }) }) }),
2182
+ /* @__PURE__ */ t(f, { label: "Select", block: !0, children: /* @__PURE__ */ t(Ne, { label: "Select", children: /* @__PURE__ */ t(
2183
+ ln,
2182
2184
  {
2183
2185
  "aria-label": "Locale",
2184
2186
  value: n,
@@ -2189,28 +2191,28 @@ function Er() {
2189
2191
  ]
2190
2192
  }
2191
2193
  ) }) }),
2192
- /* @__PURE__ */ t(b, { label: "Textarea", block: !0, children: /* @__PURE__ */ t(Ne, { label: "Body", children: /* @__PURE__ */ t(un, { mono: !0, rows: 4, defaultValue: `---
2194
+ /* @__PURE__ */ t(f, { label: "Textarea", block: !0, children: /* @__PURE__ */ t(Ne, { label: "Body", children: /* @__PURE__ */ t(cn, { mono: !0, rows: 4, defaultValue: `---
2193
2195
  title: Hello
2194
2196
  ---
2195
2197
 
2196
2198
  Paragraph.` }) }) })
2197
2199
  ] }) });
2198
2200
  }
2199
- const Nt = P.find((n) => n.slug === "lists");
2200
- function Cr() {
2201
- return /* @__PURE__ */ t(O, { title: Nt.title, lede: Nt.lede, children: /* @__PURE__ */ t(b, { label: "List", block: !0, children: /* @__PURE__ */ s(Nn, { children: [
2202
- /* @__PURE__ */ t(lt, { to: "/__ui/lists", title: "hello", meta: "en" }),
2203
- /* @__PURE__ */ t(lt, { to: "/__ui/lists", title: "about", meta: "da" })
2201
+ const yt = P.find((n) => n.slug === "lists");
2202
+ function Mr() {
2203
+ return /* @__PURE__ */ t(O, { title: yt.title, lede: yt.lede, children: /* @__PURE__ */ t(f, { label: "List", block: !0, children: /* @__PURE__ */ s(wn, { children: [
2204
+ /* @__PURE__ */ t(st, { to: "/__ui/lists", title: "hello", meta: "en" }),
2205
+ /* @__PURE__ */ t(st, { to: "/__ui/lists", title: "about", meta: "da" })
2204
2206
  ] }) }) });
2205
2207
  }
2206
- const St = P.find((n) => n.slug === "overlays");
2207
- function zr() {
2208
- const [n, r] = f(!1);
2209
- return /* @__PURE__ */ t(hn, { children: /* @__PURE__ */ t(O, { title: St.title, lede: St.lede, children: /* @__PURE__ */ s(Ee, { children: [
2210
- /* @__PURE__ */ s(b, { label: "ConfirmDialog", children: [
2208
+ const Nt = P.find((n) => n.slug === "overlays");
2209
+ function Er() {
2210
+ const [n, r] = b(!1);
2211
+ return /* @__PURE__ */ t(dn, { children: /* @__PURE__ */ t(O, { title: Nt.title, lede: Nt.lede, children: /* @__PURE__ */ s(Ee, { children: [
2212
+ /* @__PURE__ */ s(f, { label: "ConfirmDialog", children: [
2211
2213
  /* @__PURE__ */ t(ue, { onClick: () => r(!0), children: "Open dialog" }),
2212
2214
  /* @__PURE__ */ t(
2213
- pn,
2215
+ un,
2214
2216
  {
2215
2217
  open: n,
2216
2218
  onOpenChange: r,
@@ -2222,31 +2224,31 @@ function zr() {
2222
2224
  }
2223
2225
  )
2224
2226
  ] }),
2225
- /* @__PURE__ */ t(b, { label: "Tooltip", children: /* @__PURE__ */ t(gn, { label: "Sample tooltip", children: /* @__PURE__ */ t(ue, { variant: "secondary", children: "Hover" }) }) })
2227
+ /* @__PURE__ */ t(f, { label: "Tooltip", children: /* @__PURE__ */ t(hn, { label: "Sample tooltip", children: /* @__PURE__ */ t(ue, { variant: "secondary", children: "Hover" }) }) })
2226
2228
  ] }) }) });
2227
2229
  }
2228
- const Mt = P.find((n) => n.slug === "sections");
2229
- function Rr() {
2230
- return /* @__PURE__ */ s(O, { title: Mt.title, lede: Mt.lede, children: [
2231
- /* @__PURE__ */ t(b, { label: "PageHeader", block: !0, children: /* @__PURE__ */ t(
2232
- mn,
2230
+ const St = P.find((n) => n.slug === "sections");
2231
+ function Cr() {
2232
+ return /* @__PURE__ */ s(O, { title: St.title, lede: St.lede, children: [
2233
+ /* @__PURE__ */ t(f, { label: "PageHeader", block: !0, children: /* @__PURE__ */ t(
2234
+ pn,
2233
2235
  {
2234
- kicker: /* @__PURE__ */ t(fn, { to: "/__ui/sections", children: "Sections" }),
2236
+ kicker: /* @__PURE__ */ t(gn, { to: "/__ui/sections", children: "Sections" }),
2235
2237
  title: "Documents",
2236
2238
  description: "Sample page header with action.",
2237
2239
  action: /* @__PURE__ */ t(ue, { children: "New" })
2238
2240
  }
2239
2241
  ) }),
2240
- /* @__PURE__ */ t(b, { label: "Panel", block: !0, children: /* @__PURE__ */ t(bn, { children: /* @__PURE__ */ s(xn, { children: [
2241
- /* @__PURE__ */ t($, { children: "First line" }),
2242
- /* @__PURE__ */ t($, { children: "Second line" })
2242
+ /* @__PURE__ */ t(f, { label: "Panel", block: !0, children: /* @__PURE__ */ t(mn, { children: /* @__PURE__ */ s(fn, { children: [
2243
+ /* @__PURE__ */ t(v, { children: "First line" }),
2244
+ /* @__PURE__ */ t(v, { children: "Second line" })
2243
2245
  ] }) }) })
2244
2246
  ] });
2245
2247
  }
2246
- const Et = P.find((n) => n.slug === "surfaces");
2247
- function Ir() {
2248
- return /* @__PURE__ */ s(O, { title: Et.title, lede: Et.lede, children: [
2249
- /* @__PURE__ */ t(b, { label: "Space", children: /* @__PURE__ */ s("div", { className: "x78zum5 x1a02dak xuk3077 x1n5939r", children: [
2248
+ const Mt = P.find((n) => n.slug === "surfaces");
2249
+ function zr() {
2250
+ return /* @__PURE__ */ s(O, { title: Mt.title, lede: Mt.lede, children: [
2251
+ /* @__PURE__ */ t(f, { label: "Space", children: /* @__PURE__ */ s("div", { className: "x78zum5 x1a02dak xuk3077 x1n5939r", children: [
2250
2252
  /* @__PURE__ */ t(ee, { label: "xs", bar: V.xs }),
2251
2253
  /* @__PURE__ */ t(ee, { label: "sm", bar: V.sm }),
2252
2254
  /* @__PURE__ */ t(ee, { label: "md", bar: V.md }),
@@ -2254,17 +2256,17 @@ function Ir() {
2254
2256
  /* @__PURE__ */ t(ee, { label: "xl", bar: V.xl }),
2255
2257
  /* @__PURE__ */ t(ee, { label: "xxl", bar: V.xxl })
2256
2258
  ] }) }),
2257
- /* @__PURE__ */ t(b, { label: "Radius", children: /* @__PURE__ */ s("div", { className: "x78zum5 x1a02dak xuk3077 x1n5939r", children: [
2259
+ /* @__PURE__ */ t(f, { label: "Radius", children: /* @__PURE__ */ s("div", { className: "x78zum5 x1a02dak xuk3077 x1n5939r", children: [
2258
2260
  /* @__PURE__ */ t(ee, { label: "sm", box: V.radiusSm }),
2259
2261
  /* @__PURE__ */ t(ee, { label: "md", box: V.radiusMd })
2260
2262
  ] }) }),
2261
- /* @__PURE__ */ t(b, { label: "Backgrounds", children: /* @__PURE__ */ s("div", { className: "xk7greg x13oidi x86kjsi", children: [
2262
- /* @__PURE__ */ t($, { size: "xs", tone: "muted", mono: !0, children: "bgApp" }),
2263
+ /* @__PURE__ */ t(f, { label: "Backgrounds", children: /* @__PURE__ */ s("div", { className: "xk7greg x13oidi x86kjsi", children: [
2264
+ /* @__PURE__ */ t(v, { size: "xs", tone: "muted", mono: !0, children: "bgApp" }),
2263
2265
  /* @__PURE__ */ s("div", { className: "xk7greg x13oidi x1jtkcfc", children: [
2264
- /* @__PURE__ */ t($, { size: "xs", tone: "muted", mono: !0, children: "bgSidebar" }),
2266
+ /* @__PURE__ */ t(v, { size: "xs", tone: "muted", mono: !0, children: "bgSidebar" }),
2265
2267
  /* @__PURE__ */ s("div", { className: "xk7greg x13oidi x1d0qn7y", children: [
2266
- /* @__PURE__ */ t($, { size: "xs", tone: "muted", mono: !0, children: "bgPanel" }),
2267
- /* @__PURE__ */ t("div", { className: "xk7greg x13oidi x1hb2obb xmkeg23 x1y0btm7 x1j0qoeq", children: /* @__PURE__ */ t($, { size: "xs", mono: !0, children: "bgSurface" }) })
2268
+ /* @__PURE__ */ t(v, { size: "xs", tone: "muted", mono: !0, children: "bgPanel" }),
2269
+ /* @__PURE__ */ t("div", { className: "xk7greg x13oidi x1hb2obb xmkeg23 x1y0btm7 x1j0qoeq", children: /* @__PURE__ */ t(v, { size: "xs", mono: !0, children: "bgSurface" }) })
2268
2270
  ] })
2269
2271
  ] })
2270
2272
  ] }) })
@@ -2276,8 +2278,8 @@ function ee({
2276
2278
  box: o
2277
2279
  }) {
2278
2280
  return /* @__PURE__ */ s("div", { className: "x78zum5 xdt5ytf x1cy8zhl x3smv4v", children: [
2279
- /* @__PURE__ */ t("div", { ...Rt(r ? V.bar : V.radiusBox, r, o) }),
2280
- /* @__PURE__ */ t($, { size: "xs", tone: "muted", mono: !0, children: n })
2281
+ /* @__PURE__ */ t("div", { ...zt(r ? V.bar : V.radiusBox, r, o) }),
2282
+ /* @__PURE__ */ t(v, { size: "xs", tone: "muted", mono: !0, children: n })
2281
2283
  ] });
2282
2284
  }
2283
2285
  const V = {
@@ -2328,41 +2330,41 @@ const V = {
2328
2330
  kaIpWk: "x13oidi",
2329
2331
  $$css: !0
2330
2332
  }
2331
- }, Ct = P.find((n) => n.slug === "type");
2332
- function _r() {
2333
- return /* @__PURE__ */ s(O, { title: Ct.title, lede: Ct.lede, children: [
2334
- /* @__PURE__ */ t(b, { label: "display", children: /* @__PURE__ */ t($, { size: "display", weight: "semibold", children: "Display" }) }),
2335
- /* @__PURE__ */ t(b, { label: "xl", children: /* @__PURE__ */ t($, { size: "xl", weight: "semibold", children: "Title" }) }),
2336
- /* @__PURE__ */ t(b, { label: "lg", children: /* @__PURE__ */ t($, { size: "lg", weight: "medium", children: "Heading" }) }),
2337
- /* @__PURE__ */ t(b, { label: "md", children: /* @__PURE__ */ t($, { children: "Body" }) }),
2338
- /* @__PURE__ */ t(b, { label: "sm", children: /* @__PURE__ */ t($, { size: "sm", children: "Small" }) }),
2339
- /* @__PURE__ */ t(b, { label: "xs", children: /* @__PURE__ */ t($, { size: "xs", weight: "semibold", children: "Overline" }) }),
2340
- /* @__PURE__ */ t(b, { label: "muted", children: /* @__PURE__ */ t($, { tone: "muted", size: "sm", children: "Muted" }) }),
2341
- /* @__PURE__ */ t(b, { label: "danger", children: /* @__PURE__ */ t($, { tone: "danger", children: "Danger" }) }),
2342
- /* @__PURE__ */ t(b, { label: "success", children: /* @__PURE__ */ t($, { tone: "success", children: "Success" }) }),
2343
- /* @__PURE__ */ t(b, { label: "mono", children: /* @__PURE__ */ t($, { mono: !0, size: "sm", children: "content/blog/hello.mdx" }) })
2333
+ }, Et = P.find((n) => n.slug === "type");
2334
+ function Rr() {
2335
+ return /* @__PURE__ */ s(O, { title: Et.title, lede: Et.lede, children: [
2336
+ /* @__PURE__ */ t(f, { label: "display", children: /* @__PURE__ */ t(v, { size: "display", weight: "semibold", children: "Display" }) }),
2337
+ /* @__PURE__ */ t(f, { label: "xl", children: /* @__PURE__ */ t(v, { size: "xl", weight: "semibold", children: "Title" }) }),
2338
+ /* @__PURE__ */ t(f, { label: "lg", children: /* @__PURE__ */ t(v, { size: "lg", weight: "medium", children: "Heading" }) }),
2339
+ /* @__PURE__ */ t(f, { label: "md", children: /* @__PURE__ */ t(v, { children: "Body" }) }),
2340
+ /* @__PURE__ */ t(f, { label: "sm", children: /* @__PURE__ */ t(v, { size: "sm", children: "Small" }) }),
2341
+ /* @__PURE__ */ t(f, { label: "xs", children: /* @__PURE__ */ t(v, { size: "xs", weight: "semibold", children: "Overline" }) }),
2342
+ /* @__PURE__ */ t(f, { label: "muted", children: /* @__PURE__ */ t(v, { tone: "muted", size: "sm", children: "Muted" }) }),
2343
+ /* @__PURE__ */ t(f, { label: "danger", children: /* @__PURE__ */ t(v, { tone: "danger", children: "Danger" }) }),
2344
+ /* @__PURE__ */ t(f, { label: "success", children: /* @__PURE__ */ t(v, { tone: "success", children: "Success" }) }),
2345
+ /* @__PURE__ */ t(f, { label: "mono", children: /* @__PURE__ */ t(v, { mono: !0, size: "sm", children: "content/blog/hello.mdx" }) })
2344
2346
  ] });
2345
2347
  }
2346
- const Ar = {
2347
- colors: zn,
2348
- type: _r,
2349
- surfaces: Ir,
2350
- sections: Rr,
2351
- buttons: Cn,
2352
- fields: Er,
2353
- lists: Cr,
2354
- overlays: zr,
2355
- feedback: Mr,
2356
- devbar: Lr
2348
+ const Ir = {
2349
+ colors: En,
2350
+ type: Rr,
2351
+ surfaces: zr,
2352
+ sections: Cr,
2353
+ buttons: Mn,
2354
+ fields: Sr,
2355
+ lists: Mr,
2356
+ overlays: Er,
2357
+ feedback: Nr,
2358
+ devbar: _r
2357
2359
  };
2358
- function Lr() {
2360
+ function _r() {
2359
2361
  const n = P.find((r) => r.slug === "devbar");
2360
- return /* @__PURE__ */ t(O, { title: n.title, lede: n.lede, children: /* @__PURE__ */ t(Sr, {}) });
2362
+ return /* @__PURE__ */ t(O, { title: n.title, lede: n.lede, children: /* @__PURE__ */ t(yr, {}) });
2361
2363
  }
2362
- const zt = P.map((n) => ({
2364
+ const Ct = P.map((n) => ({
2363
2365
  ...n,
2364
- Page: Ar[n.slug]
2365
- })), Br = [{
2366
+ Page: Ir[n.slug]
2367
+ })), Ar = [{
2366
2368
  value: "system",
2367
2369
  label: "System"
2368
2370
  }, {
@@ -2371,26 +2373,26 @@ const zt = P.map((n) => ({
2371
2373
  }, {
2372
2374
  value: "dark",
2373
2375
  label: "Dark"
2374
- }], Pr = ["Foundations", "Components", "Host"];
2375
- function jr() {
2376
+ }], Lr = ["Foundations", "Components", "Host"];
2377
+ function qr() {
2376
2378
  const {
2377
2379
  pathname: n
2378
- } = vn(), r = n.replace(/\/$/, "") || "/", o = r === "/__ui" ? void 0 : r.slice(6), a = Mn(o), {
2380
+ } = bn(), r = n.replace(/\/$/, "") || "/", o = r === "/__ui" ? void 0 : r.slice(6), a = Nn(o), {
2379
2381
  preference: d,
2380
2382
  setPreference: m
2381
- } = $n();
2383
+ } = xn();
2382
2384
  if (r !== `/__ui/${a}`)
2383
- return /* @__PURE__ */ t(kn, { to: `/__ui/${a}`, replace: !0 });
2384
- const u = zt.find((p) => p.slug === a).Page;
2385
+ return /* @__PURE__ */ t(vn, { to: `/__ui/${a}`, replace: !0 });
2386
+ const u = Ct.find((p) => p.slug === a).Page;
2385
2387
  return /* @__PURE__ */ s("div", { className: "x78zum5 xdt5ytf x1ov3xa9 x86kjsi xqjzbou xnezs1t", children: [
2386
2388
  /* @__PURE__ */ s("header", { className: "x78zum5 x6s0dn4 x1qughib x11cgr9k x173sf5p x15jjofa xso031l x1q0q8m5 x4b2zrn x1hb2obb", children: [
2387
- /* @__PURE__ */ t($, { as: "p", size: "lg", weight: "semibold", children: "UI kit" }),
2388
- /* @__PURE__ */ t("div", { className: "x78zum5 x1a02dak x3smv4v", role: "group", "aria-label": "Theme", children: Br.map((p) => /* @__PURE__ */ t(ue, { variant: d === p.value ? "primary" : "secondary", "aria-pressed": d === p.value, onClick: () => m(p.value), children: p.label }, p.value)) })
2389
+ /* @__PURE__ */ t(v, { as: "p", size: "lg", weight: "semibold", children: "UI kit" }),
2390
+ /* @__PURE__ */ t("div", { className: "x78zum5 x1a02dak x3smv4v", role: "group", "aria-label": "Theme", children: Ar.map((p) => /* @__PURE__ */ t(ue, { variant: d === p.value ? "primary" : "secondary", "aria-pressed": d === p.value, onClick: () => m(p.value), children: p.label }, p.value)) })
2389
2391
  ] }),
2390
2392
  /* @__PURE__ */ s("div", { className: "x78zum5 x98rzlu x2lwn1j", children: [
2391
- /* @__PURE__ */ t("nav", { className: "x16grhtn x2lah0s x1odjw0f xk7greg x1jtkcfc xs1s249 x32b0ac xpozbvl", "aria-label": "UI kit", children: Pr.map((p) => /* @__PURE__ */ s("div", { className: "x78zum5 xdt5ytf xpw8yq9 x31bu4j", children: [
2392
- /* @__PURE__ */ t($, { as: "p", size: "xs", tone: "muted", weight: "semibold", children: p }),
2393
- zt.filter((c) => c.group === p).map((c) => /* @__PURE__ */ t(wn, { to: `/__ui/${c.slug}`, className: "x1lliihq x1heor9g x1hl2dhg", children: ({
2393
+ /* @__PURE__ */ t("nav", { className: "x16grhtn x2lah0s x1odjw0f xk7greg x1jtkcfc xs1s249 x32b0ac xpozbvl", "aria-label": "UI kit", children: Lr.map((p) => /* @__PURE__ */ s("div", { className: "x78zum5 xdt5ytf xpw8yq9 x31bu4j", children: [
2394
+ /* @__PURE__ */ t(v, { as: "p", size: "xs", tone: "muted", weight: "semibold", children: p }),
2395
+ Ct.filter((c) => c.group === p).map((c) => /* @__PURE__ */ t($n, { to: `/__ui/${c.slug}`, className: "x1lliihq x1heor9g x1hl2dhg", children: ({
2394
2396
  isActive: R
2395
2397
  }) => /* @__PURE__ */ t("span", { ...{
2396
2398
  0: {
@@ -2406,5 +2408,5 @@ function jr() {
2406
2408
  ] });
2407
2409
  }
2408
2410
  export {
2409
- jr as UiKitApp
2411
+ qr as UiKitApp
2410
2412
  };