@backmatter/studio 0.0.18 → 0.0.20
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/chunks/{UiKitApp-DkuQBiQZ.js → UiKitApp-C269OA8v.js} +528 -481
- package/dist/chunks/{WorkspaceRoutes-DVvb3N-V.js → WorkspaceRoutes-B4B5jjje.js} +24376 -23915
- package/dist/chunks/{dashboard-B4FITg6c.js → dashboard-DeNgythd.js} +586 -565
- package/dist/chunks/{index-CegtXnEI.js → index-7-TtXaMq.js} +104 -104
- package/dist/dashboard.js +2 -2
- package/dist/index.js +166 -159
- package/dist/site-widget.css +25 -6
- package/dist/site-widget.js +6925 -6840
- package/dist/studio.css +171 -36
- package/package.json +2 -2
- package/src/api.ts +48 -1
- package/src/chat/ChatMessage.tsx +4 -4
- package/src/chat/ChatProvider.tsx +6 -0
- package/src/chat/chat-helpers.ts +54 -2
- package/src/chrome/CommandPalette.tsx +3 -3
- package/src/chrome/ContentExplorerSidebar.tsx +421 -74
- package/src/chrome/WorkspaceStatusBar.tsx +24 -24
- package/src/chrome/commit-error.ts +48 -60
- package/src/chrome/commit-failure.tsx +2 -2
- package/src/chrome/content-path-tree.ts +4 -0
- package/src/chrome/explorer-row-menu.ts +28 -0
- package/src/chrome/folder-create-context.ts +14 -0
- package/src/chrome/use-publish-check.ts +75 -0
- package/src/fields/FieldControl.tsx +173 -62
- package/src/pages/BlocksList.tsx +38 -3
- package/src/pages/DocEditorPage.tsx +47 -64
- package/src/pages/EmbedPublishPage.tsx +13 -5
- package/src/pages/GithubConnectPage.tsx +1 -1
- package/src/pages/LoginPage.tsx +67 -5
- package/src/pages/MediaFieldInput.tsx +155 -63
- package/src/pages/MediaGalleryPage.tsx +56 -3
- package/src/pages/PreviewAddress.tsx +30 -0
- package/src/pages/WorkspaceHomePage.tsx +1 -1
- package/src/pages/ui-kit/colors.tsx +2 -0
- package/src/pages/ui-kit/fields.tsx +60 -0
- package/src/styles/themes.ts +2 -0
- package/src/styles/tokens.stylex.ts +1 -0
- package/src/ui/Button.tsx +14 -0
- package/src/ui/Field.tsx +12 -1
- package/src/ui/Input.tsx +191 -97
- package/src/ui/popup.ts +13 -6
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsxs as s, jsx as t, Fragment as U } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useRef as
|
|
2
|
+
import { V as v, Y as he, Z as Zt, k as Rt, _ as Jt, f as ot, $ as Ve, a0 as Qt, a1 as en, a2 as tn, a3 as nn, a4 as rn, J as an, o as on, a5 as sn, a6 as ln, a7 as cn, a8 as He, a9 as fe, aa as ue, ab as st, ac as It, ad as dn, ae as un, T as hn, af as pn, ag as gn, ah as mn, ai as fn, aj as bn, ak as xn, I as vn, al as $n, P as kn, am as wn } from "./WorkspaceRoutes-B4B5jjje.js";
|
|
3
|
+
import { useRef as w, useState as b, useLayoutEffect as te, useCallback as Ke, useEffect as z, useMemo as yn, useId as Oe } from "react";
|
|
4
4
|
import { createPortal as Me } from "react-dom";
|
|
5
|
-
import { L as
|
|
5
|
+
import { L as Nn, a as lt } from "./dashboard-DeNgythd.js";
|
|
6
6
|
function O({
|
|
7
7
|
title: n,
|
|
8
8
|
lede: r,
|
|
9
|
-
children:
|
|
9
|
+
children: a
|
|
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
13
|
/* @__PURE__ */ t(v, { as: "h1", size: "display", weight: "semibold", children: n }),
|
|
14
14
|
/* @__PURE__ */ t(v, { tone: "muted", size: "sm", children: r })
|
|
15
15
|
] }),
|
|
16
|
-
/* @__PURE__ */ t("div", { className: "x78zum5 xdt5ytf x14n5cft", children:
|
|
16
|
+
/* @__PURE__ */ t("div", { className: "x78zum5 xdt5ytf x14n5cft", children: a })
|
|
17
17
|
] });
|
|
18
18
|
}
|
|
19
19
|
function Ee({
|
|
@@ -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
|
|
24
|
+
function Sn({
|
|
25
25
|
children: n
|
|
26
26
|
}) {
|
|
27
27
|
return /* @__PURE__ */ t("div", { className: "x78zum5 x1a02dak x6s0dn4 x3smv4v", children: n });
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function g({
|
|
30
30
|
label: n,
|
|
31
31
|
children: r
|
|
32
32
|
}) {
|
|
@@ -97,26 +97,26 @@ 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
|
|
101
|
-
const r = P.find((
|
|
100
|
+
function Mn(n) {
|
|
101
|
+
const r = P.find((a) => a.slug === n);
|
|
102
102
|
return r ? r.slug : "colors";
|
|
103
103
|
}
|
|
104
|
-
const
|
|
105
|
-
function
|
|
106
|
-
return /* @__PURE__ */ t(O, { title:
|
|
107
|
-
/* @__PURE__ */ t(
|
|
108
|
-
/* @__PURE__ */ t(
|
|
109
|
-
/* @__PURE__ */ t(
|
|
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(g, { label: n, children: /* @__PURE__ */ s(Sn, { children: [
|
|
107
|
+
/* @__PURE__ */ t(he, { variant: n, children: n }),
|
|
108
|
+
/* @__PURE__ */ t(he, { variant: n, disabled: !0, children: "disabled" }),
|
|
109
|
+
/* @__PURE__ */ t(Zt, { variant: n, to: "/__ui/buttons", children: "link" })
|
|
110
110
|
] }) }, n)) }) });
|
|
111
111
|
}
|
|
112
|
-
const
|
|
113
|
-
function
|
|
114
|
-
return /* @__PURE__ */ t(O, { title:
|
|
115
|
-
/* @__PURE__ */ t("div", { ...
|
|
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(k.chip, r) }),
|
|
116
116
|
/* @__PURE__ */ t("figcaption", { className: "x1ar5oo6 x10qp4ay x111yfic", children: n })
|
|
117
117
|
] }, n)) }) });
|
|
118
118
|
}
|
|
119
|
-
const
|
|
119
|
+
const k = {
|
|
120
120
|
chip: {
|
|
121
121
|
kZKoxP: "xy75621",
|
|
122
122
|
kaIpWk: "x13oidi",
|
|
@@ -145,6 +145,10 @@ const w = {
|
|
|
145
145
|
kWkggS: "x1hb2obb",
|
|
146
146
|
$$css: !0
|
|
147
147
|
},
|
|
148
|
+
bgRaised: {
|
|
149
|
+
kWkggS: "x15a9b3o",
|
|
150
|
+
$$css: !0
|
|
151
|
+
},
|
|
148
152
|
bgHover: {
|
|
149
153
|
kWkggS: "xofhlkk",
|
|
150
154
|
$$css: !0
|
|
@@ -205,132 +209,132 @@ const w = {
|
|
|
205
209
|
kWkggS: "xc54rw4",
|
|
206
210
|
$$css: !0
|
|
207
211
|
}
|
|
208
|
-
},
|
|
209
|
-
function
|
|
212
|
+
}, Rn = [["bgApp", k.bgApp], ["bgSidebar", k.bgSidebar], ["bgPanel", k.bgPanel], ["bgPanelInset", k.bgPanelInset], ["bgSurface", k.bgSurface], ["bgRaised", k.bgRaised], ["bgHover", k.bgHover], ["bgActive", k.bgActive], ["bgInput", k.bgInput], ["bgStatus", k.bgStatus], ["text", k.text], ["textMuted", k.textMuted], ["textInverse", k.textInverse], ["border", k.border], ["accent", k.accent], ["accentHover", k.accentHover], ["accentMuted", k.accentMuted], ["danger", k.danger], ["success", k.success], ["overlay", k.overlay], ["focus", k.focus]];
|
|
213
|
+
function ut(n, r, a) {
|
|
210
214
|
if (!(n != null && n.trim())) return;
|
|
211
|
-
const
|
|
212
|
-
return !r || !
|
|
215
|
+
const o = n.replace(/\/+$/, "");
|
|
216
|
+
return !r || !a ? o : `${o}${Jt(a, r.type, r.slug)}`;
|
|
213
217
|
}
|
|
214
|
-
const
|
|
215
|
-
function
|
|
216
|
-
const r = n.activity ?? null,
|
|
217
|
-
return { mode:
|
|
218
|
+
const pe = "cubic-bezier(0.23, 1, 0.32, 1)", Ge = "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, _t = "backmatter.devbar.mode";
|
|
219
|
+
function Pn(n) {
|
|
220
|
+
const r = n.activity ?? null, a = r ? r.type : n.siteMode === "preview" && n.changeCount > 0 ? "changes" : "idle", o = a === "published" ? "live" : n.siteMode;
|
|
221
|
+
return { mode: o, row: a, modeLabel: o === "preview" ? "Exit preview" : "Enter preview", announce: o === "preview" ? "Preview on, drafts visible" : "Live site" };
|
|
218
222
|
}
|
|
219
|
-
function
|
|
223
|
+
function Tn(n, r) {
|
|
220
224
|
return {
|
|
221
225
|
x: r.left + r.width / 2 - n.left,
|
|
222
226
|
y: r.top + r.height / 2 - n.top
|
|
223
227
|
};
|
|
224
228
|
}
|
|
225
|
-
function
|
|
229
|
+
function Wn(n, r) {
|
|
226
230
|
return Math.abs(r - n) > 1;
|
|
227
231
|
}
|
|
228
232
|
function se() {
|
|
229
233
|
return typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
230
234
|
}
|
|
231
|
-
function
|
|
235
|
+
function Hn() {
|
|
232
236
|
if (typeof sessionStorage > "u") return null;
|
|
233
237
|
try {
|
|
234
|
-
const n = sessionStorage.getItem(
|
|
238
|
+
const n = sessionStorage.getItem(_t);
|
|
235
239
|
return n === "live" || n === "preview" ? n : null;
|
|
236
240
|
} catch {
|
|
237
241
|
return null;
|
|
238
242
|
}
|
|
239
243
|
}
|
|
240
|
-
const
|
|
241
|
-
function
|
|
242
|
-
const r = n == null ? void 0 : n.getItem(
|
|
244
|
+
const ht = "backmatter.devbar.highlight", pt = "backmatter.devbar.agent-preview", qn = "backmatter-theme";
|
|
245
|
+
function Dn(n) {
|
|
246
|
+
const r = n == null ? void 0 : n.getItem(qn);
|
|
243
247
|
return r === "light" || r === "dark" || r === "system" ? r : "system";
|
|
244
248
|
}
|
|
245
|
-
function
|
|
249
|
+
function jn(n, r) {
|
|
246
250
|
return n === "system" ? r ? "dark" : "light" : n;
|
|
247
251
|
}
|
|
248
|
-
function
|
|
249
|
-
const
|
|
250
|
-
return
|
|
252
|
+
function gt(n, r, a) {
|
|
253
|
+
const o = n == null ? void 0 : n.getItem(r);
|
|
254
|
+
return o === "1" ? !0 : o === "0" ? !1 : a;
|
|
251
255
|
}
|
|
252
|
-
function
|
|
253
|
-
n == null || n.setItem(r,
|
|
256
|
+
function mt(n, r, a) {
|
|
257
|
+
n == null || n.setItem(r, a ? "1" : "0");
|
|
254
258
|
}
|
|
255
259
|
function qe(n) {
|
|
256
260
|
if (!(typeof sessionStorage > "u"))
|
|
257
261
|
try {
|
|
258
|
-
sessionStorage.setItem(
|
|
262
|
+
sessionStorage.setItem(_t, n);
|
|
259
263
|
} catch {
|
|
260
264
|
}
|
|
261
265
|
}
|
|
262
|
-
const
|
|
263
|
-
function
|
|
266
|
+
const Fn = 20, ft = 16, Vn = 12, Kn = 8, At = 12;
|
|
267
|
+
function Un(n) {
|
|
264
268
|
if (!n) return null;
|
|
265
269
|
const r = Number.parseInt(n.split(".")[0] ?? "", 10);
|
|
266
270
|
return Number.isFinite(r) ? r : null;
|
|
267
271
|
}
|
|
268
|
-
function
|
|
272
|
+
function Lt(n) {
|
|
269
273
|
return /Macintosh|Mac OS X/.test(n);
|
|
270
274
|
}
|
|
271
|
-
function
|
|
272
|
-
return !
|
|
275
|
+
function On(n) {
|
|
276
|
+
return !Lt(n) || /Firefox\//.test(n) ? !1 : /Chrome\/|Chromium\/|Edg\/|OPR\/|Brave\//.test(n);
|
|
273
277
|
}
|
|
274
|
-
function
|
|
275
|
-
if (/Windows/.test(n)) return
|
|
276
|
-
if (!
|
|
277
|
-
const
|
|
278
|
-
return
|
|
278
|
+
function Ue(n, r) {
|
|
279
|
+
if (/Windows/.test(n)) return Kn;
|
|
280
|
+
if (!Lt(n)) return At;
|
|
281
|
+
const a = Un(r);
|
|
282
|
+
return On(n) ? a !== null && a >= 26 ? Fn : (a !== null && a >= 15, ft) : Vn;
|
|
279
283
|
}
|
|
280
|
-
const
|
|
281
|
-
function
|
|
284
|
+
const xe = "backmatter-preview-frame";
|
|
285
|
+
function Gn() {
|
|
282
286
|
if (typeof navigator > "u") return Promise.resolve(void 0);
|
|
283
287
|
const n = navigator.userAgentData;
|
|
284
288
|
return n != null && n.getHighEntropyValues ? n.getHighEntropyValues(["platformVersion"]).then((r) => r.platformVersion) : Promise.resolve(void 0);
|
|
285
289
|
}
|
|
286
|
-
function
|
|
287
|
-
return typeof navigator > "u" ?
|
|
290
|
+
function Xn() {
|
|
291
|
+
return typeof navigator > "u" ? At : Ue(navigator.userAgent);
|
|
288
292
|
}
|
|
289
|
-
function
|
|
293
|
+
function bt(n) {
|
|
290
294
|
if (n !== void 0 && Number.isFinite(n) && n >= 0) return n;
|
|
291
295
|
if (typeof document < "u")
|
|
292
296
|
try {
|
|
293
297
|
const r = getComputedStyle(document.documentElement).getPropertyValue("--bm-preview-frame-radius").trim();
|
|
294
298
|
if (r) {
|
|
295
|
-
const
|
|
296
|
-
if (Number.isFinite(
|
|
299
|
+
const a = Number.parseFloat(r);
|
|
300
|
+
if (Number.isFinite(a) && a >= 0) return a;
|
|
297
301
|
}
|
|
298
302
|
} catch {
|
|
299
303
|
}
|
|
300
|
-
return
|
|
304
|
+
return Xn();
|
|
301
305
|
}
|
|
302
|
-
const
|
|
303
|
-
function
|
|
306
|
+
const Bt = "oklch(0.56 0.21 295)";
|
|
307
|
+
function Yn({
|
|
304
308
|
active: n,
|
|
305
309
|
radius: r
|
|
306
310
|
}) {
|
|
307
|
-
const
|
|
311
|
+
const a = w(null), o = w(null), [d, f] = b(() => bt(r));
|
|
308
312
|
return te(() => {
|
|
309
313
|
if (r !== void 0) {
|
|
310
|
-
|
|
314
|
+
f(bt(r));
|
|
311
315
|
return;
|
|
312
316
|
}
|
|
313
317
|
const h = navigator.userAgent;
|
|
314
|
-
|
|
315
|
-
u !== void 0 &&
|
|
318
|
+
f(Ue(h)), Gn().then((u) => {
|
|
319
|
+
u !== void 0 && f(Ue(h, u));
|
|
316
320
|
});
|
|
317
321
|
}, [r]), te(() => {
|
|
318
|
-
const h =
|
|
319
|
-
|
|
322
|
+
const h = a.current, u = o.current;
|
|
323
|
+
o.current = n, !(!h || u === null || u || !n || se()) && h.animate(
|
|
320
324
|
[
|
|
321
325
|
{ borderWidth: "3px" },
|
|
322
326
|
{ borderWidth: "7px", offset: 0.5 },
|
|
323
327
|
{ borderWidth: "3px" }
|
|
324
328
|
],
|
|
325
|
-
{ duration: 700, delay: 180, easing:
|
|
329
|
+
{ duration: 700, delay: 180, easing: pe }
|
|
326
330
|
);
|
|
327
331
|
}, [n]), /* @__PURE__ */ s(U, { children: [
|
|
328
|
-
/* @__PURE__ */ t("style", { children:
|
|
332
|
+
/* @__PURE__ */ t("style", { children: Zn }),
|
|
329
333
|
/* @__PURE__ */ t(
|
|
330
334
|
"div",
|
|
331
335
|
{
|
|
332
|
-
ref:
|
|
333
|
-
className:
|
|
336
|
+
ref: a,
|
|
337
|
+
className: xe,
|
|
334
338
|
"data-backmatter-preview-frame": "",
|
|
335
339
|
"data-active": n ? "true" : "false",
|
|
336
340
|
style: { "--bm-preview-frame-radius": `${d}px` },
|
|
@@ -339,50 +343,50 @@ function Gn({
|
|
|
339
343
|
)
|
|
340
344
|
] });
|
|
341
345
|
}
|
|
342
|
-
const
|
|
343
|
-
.${
|
|
346
|
+
const Zn = `
|
|
347
|
+
.${xe} {
|
|
344
348
|
position: fixed;
|
|
345
349
|
inset: 0;
|
|
346
350
|
z-index: 2147482999;
|
|
347
351
|
box-sizing: border-box;
|
|
348
352
|
pointer-events: none;
|
|
349
|
-
border: 3px solid ${
|
|
353
|
+
border: 3px solid ${Bt};
|
|
350
354
|
border-radius: 0 0 var(--bm-preview-frame-radius, 12px) var(--bm-preview-frame-radius, 12px);
|
|
351
355
|
background: transparent;
|
|
352
356
|
clip-path: circle(0% at 100% 100%);
|
|
353
|
-
transition: clip-path ${
|
|
357
|
+
transition: clip-path ${Bn}ms ${Ge};
|
|
354
358
|
}
|
|
355
|
-
.${
|
|
359
|
+
.${xe}[data-active="true"] {
|
|
356
360
|
/* 150% is shorter than the viewport diagonal — the ring never reached the top. */
|
|
357
361
|
clip-path: circle(150vmax at 100% 100%);
|
|
358
|
-
transition: clip-path ${
|
|
362
|
+
transition: clip-path ${Ln}ms ${pe} 80ms;
|
|
359
363
|
}
|
|
360
364
|
@media (prefers-reduced-motion: reduce) {
|
|
361
|
-
.${
|
|
365
|
+
.${xe} {
|
|
362
366
|
transition: none;
|
|
363
367
|
clip-path: none;
|
|
364
368
|
opacity: 0;
|
|
365
369
|
}
|
|
366
|
-
.${
|
|
370
|
+
.${xe}[data-active="true"] {
|
|
367
371
|
opacity: 1;
|
|
368
372
|
}
|
|
369
373
|
}
|
|
370
|
-
`, e = "backmatter-devbar",
|
|
371
|
-
function
|
|
374
|
+
`, e = "backmatter-devbar", Jn = "/api/backmatter/preview", Qn = 10, er = 360;
|
|
375
|
+
function xt(n, r) {
|
|
372
376
|
return `${n}:${r.trim().toLowerCase()}`;
|
|
373
377
|
}
|
|
374
|
-
function
|
|
378
|
+
function tr({
|
|
375
379
|
label: n,
|
|
376
380
|
branch: r,
|
|
377
|
-
tree:
|
|
378
|
-
doc:
|
|
381
|
+
tree: a,
|
|
382
|
+
doc: o,
|
|
379
383
|
exiting: d,
|
|
380
|
-
chatOpen:
|
|
384
|
+
chatOpen: f,
|
|
381
385
|
publishOpen: h,
|
|
382
386
|
changeCount: u,
|
|
383
387
|
lineDiff: p,
|
|
384
388
|
activity: c = null,
|
|
385
|
-
previewEntryPath: R =
|
|
389
|
+
previewEntryPath: R = Jn,
|
|
386
390
|
siteMode: y = "preview",
|
|
387
391
|
frame: q = !1,
|
|
388
392
|
frameRadius: X,
|
|
@@ -391,21 +395,21 @@ function Qn({
|
|
|
391
395
|
onExit: C,
|
|
392
396
|
onEnterPreview: S,
|
|
393
397
|
onToggleChat: E,
|
|
394
|
-
onTogglePublish:
|
|
398
|
+
onTogglePublish: m,
|
|
395
399
|
onStop: M,
|
|
396
400
|
onViewLive: D,
|
|
397
401
|
onPublishedDone: _,
|
|
398
402
|
onSignOut: j,
|
|
399
403
|
onPublishAnchor: Y
|
|
400
404
|
}) {
|
|
401
|
-
const le =
|
|
405
|
+
const le = w(null), ce = w(null), Z = w(null), G = w(null), x = w(null), A = w(null), T = w(null), J = w(null), [ne, ge] = b(null), re = Ke((i) => {
|
|
402
406
|
if (le.current = i, !i) {
|
|
403
|
-
|
|
407
|
+
ge(null);
|
|
404
408
|
return;
|
|
405
409
|
}
|
|
406
410
|
const l = i.shadowRoot ?? i.attachShadow({ mode: "open" });
|
|
407
|
-
|
|
408
|
-
}, []), [ie,
|
|
411
|
+
ge(($) => $ === l ? $ : l);
|
|
412
|
+
}, []), [ie, ve] = b(null), [F, L] = b(null), [$e, Ce] = b(y), [ze, Wt] = b(!1), Re = w(!1), ae = w(null), Xe = w(0), Ye = w(!1), Ze = w(!1), W = w({
|
|
409
413
|
toggleHidden: () => {
|
|
410
414
|
},
|
|
411
415
|
onModeKey: (i) => {
|
|
@@ -415,9 +419,9 @@ function Qn({
|
|
|
415
419
|
openDashboard: () => !1,
|
|
416
420
|
openShortcuts: () => {
|
|
417
421
|
}
|
|
418
|
-
}),
|
|
422
|
+
}), Je = w(!0), [Ie, Ht] = b("system"), [_e, Qe] = b(!0), [et, tt] = b(!0), [qt, ke] = b("main"), [Dt, jt] = b(""), [Ae, Le] = b(null);
|
|
419
423
|
z(() => {
|
|
420
|
-
const i =
|
|
424
|
+
const i = o == null ? void 0 : o.workspaceId;
|
|
421
425
|
if (!i) {
|
|
422
426
|
Le(null);
|
|
423
427
|
return;
|
|
@@ -430,20 +434,20 @@ function Qn({
|
|
|
430
434
|
}), () => {
|
|
431
435
|
l = !0;
|
|
432
436
|
};
|
|
433
|
-
}, [
|
|
434
|
-
const Be =
|
|
435
|
-
() =>
|
|
436
|
-
[N,
|
|
437
|
-
),
|
|
438
|
-
Z.current = i, !(i && !(i.getRootNode() instanceof ShadowRoot)) &&
|
|
439
|
-
}, []), Pe =
|
|
437
|
+
}, [o == null ? void 0 : o.workspaceId]);
|
|
438
|
+
const Be = yn(
|
|
439
|
+
() => ut(N, o, Ae),
|
|
440
|
+
[N, o, Ae]
|
|
441
|
+
), Ft = Ke((i) => {
|
|
442
|
+
Z.current = i, !(i && !(i.getRootNode() instanceof ShadowRoot)) && ve(i);
|
|
443
|
+
}, []), Pe = Pn({ siteMode: $e, changeCount: u, activity: c }), de = Pe.mode, Vt = (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 = `${$e}|${Pe.row}|${u}|${(p == null ? void 0 : p.added) ?? ""}|${(p == null ? void 0 : p.removed) ?? ""}|${n}|${Vt}`;
|
|
440
444
|
z(() => {
|
|
441
|
-
|
|
442
|
-
const i = je(), l =
|
|
443
|
-
|
|
445
|
+
jt(location.host);
|
|
446
|
+
const i = je(), l = Dn(i);
|
|
447
|
+
tt(gt(i, pt, !0)), Ht(l), Qe(gt(i, ht, !0));
|
|
444
448
|
}, []), z(() => {
|
|
445
|
-
if (
|
|
446
|
-
const i = matchMedia("(prefers-color-scheme: dark)"), l = () =>
|
|
449
|
+
if (kt(Ie), Ie !== "system" || typeof matchMedia != "function") return;
|
|
450
|
+
const i = matchMedia("(prefers-color-scheme: dark)"), l = () => kt("system");
|
|
447
451
|
return i.addEventListener("change", l), () => i.removeEventListener("change", l);
|
|
448
452
|
}, [Ie]), z(() => (document.documentElement.classList.toggle("backmatter-blocks", _e), () => document.documentElement.classList.remove("backmatter-blocks")), [_e]), z(() => {
|
|
449
453
|
const i = le.current;
|
|
@@ -453,11 +457,11 @@ function Qn({
|
|
|
453
457
|
const Q = new MutationObserver(H);
|
|
454
458
|
return Q.observe(l, { attributes: !0, attributeFilter: ["class"] }), () => Q.disconnect();
|
|
455
459
|
}, []), z(() => {
|
|
456
|
-
if (
|
|
457
|
-
|
|
460
|
+
if (ae.current && ae.current !== y && !d) {
|
|
461
|
+
ae.current = null, qe(y), Ce(y);
|
|
458
462
|
return;
|
|
459
463
|
}
|
|
460
|
-
|
|
464
|
+
ae.current || Ce(y), ae.current === y && (ae.current = null);
|
|
461
465
|
}, [y, d]), z(() => {
|
|
462
466
|
if (!F) return;
|
|
463
467
|
function i(l) {
|
|
@@ -467,7 +471,7 @@ function Qn({
|
|
|
467
471
|
return document.addEventListener("pointerdown", i), () => document.removeEventListener("pointerdown", i);
|
|
468
472
|
}, [F]), te(() => {
|
|
469
473
|
const i = Z.current, l = T.current;
|
|
470
|
-
!i || !l || F !== "settings" ||
|
|
474
|
+
!i || !l || F !== "settings" || cr(i, l);
|
|
471
475
|
}, [F, ie, Te]), te(() => {
|
|
472
476
|
if (!Y) return;
|
|
473
477
|
const i = A.current;
|
|
@@ -481,7 +485,7 @@ function Qn({
|
|
|
481
485
|
};
|
|
482
486
|
}, [h, Y, Te, ie]), z(() => {
|
|
483
487
|
function i(l) {
|
|
484
|
-
if (!
|
|
488
|
+
if (!or(l.composedPath()[0] ?? null)) {
|
|
485
489
|
if ((l.metaKey || l.ctrlKey) && l.key === ".") {
|
|
486
490
|
l.preventDefault(), W.current.toggleHidden();
|
|
487
491
|
return;
|
|
@@ -506,75 +510,75 @@ function Qn({
|
|
|
506
510
|
W.current.onEscape();
|
|
507
511
|
return;
|
|
508
512
|
}
|
|
509
|
-
|
|
513
|
+
Qt(l) === "chat" && L(null);
|
|
510
514
|
}
|
|
511
515
|
}
|
|
512
516
|
return document.addEventListener("keydown", i, !0), () => document.removeEventListener("keydown", i, !0);
|
|
513
517
|
}, []), te(() => {
|
|
514
|
-
var
|
|
518
|
+
var at;
|
|
515
519
|
const i = Z.current;
|
|
516
520
|
if (!ne || !i || !(i.getRootNode() instanceof ShadowRoot)) return;
|
|
517
|
-
if (!
|
|
518
|
-
|
|
519
|
-
const
|
|
520
|
-
if (I !== "play" && qe(y),
|
|
521
|
-
(
|
|
521
|
+
if (!Ze.current) {
|
|
522
|
+
Ze.current = !0;
|
|
523
|
+
const oe = I !== "play" && Hn() === y;
|
|
524
|
+
if (I !== "play" && qe(y), oe)
|
|
525
|
+
(at = ce.current) == null || at.setAttribute("data-settled", "true"), requestAnimationFrame(() => {
|
|
522
526
|
requestAnimationFrame(() => {
|
|
523
|
-
var
|
|
524
|
-
return (
|
|
527
|
+
var Ne;
|
|
528
|
+
return (Ne = ce.current) == null ? void 0 : Ne.removeAttribute("data-settled");
|
|
525
529
|
});
|
|
526
530
|
});
|
|
527
531
|
else if (se())
|
|
528
532
|
i.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 200, easing: "ease", fill: "backwards" });
|
|
529
533
|
else {
|
|
530
|
-
const
|
|
534
|
+
const Ne = i.animate(
|
|
531
535
|
[{ transform: "translateY(100%)" }, { transform: "none" }],
|
|
532
|
-
{ duration: 460, easing:
|
|
536
|
+
{ duration: 460, easing: pe, delay: 600, fill: "backwards" }
|
|
533
537
|
);
|
|
534
|
-
|
|
538
|
+
Ne.id = "rise", G.current && De(G.current, { delay: 740 });
|
|
535
539
|
}
|
|
536
540
|
}
|
|
537
|
-
const l = !
|
|
538
|
-
|
|
539
|
-
const H = i.getAnimations().some((
|
|
540
|
-
i.getAnimations().filter((
|
|
541
|
+
const l = !Ye.current;
|
|
542
|
+
Ye.current = !0;
|
|
543
|
+
const H = i.getAnimations().some((oe) => oe.id === "w") ? i.offsetWidth : Xe.current;
|
|
544
|
+
i.getAnimations().filter((oe) => oe.id === "w").forEach((oe) => oe.cancel());
|
|
541
545
|
const Q = i.offsetWidth;
|
|
542
|
-
if (
|
|
546
|
+
if (Xe.current = Q, l) return;
|
|
543
547
|
const B = G.current;
|
|
544
|
-
if (B && (se() ? B.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 150, easing: "ease", fill: "backwards" }) : De(B, { delay: 40, blur: !0 })), se() || !
|
|
545
|
-
const
|
|
548
|
+
if (B && (se() ? B.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 150, easing: "ease", fill: "backwards" }) : De(B, { delay: 40, blur: !0 })), se() || !Wn(H, Q)) return;
|
|
549
|
+
const Yt = i.animate(
|
|
546
550
|
[{ width: `${H}px` }, { width: `${Q}px` }],
|
|
547
|
-
{ duration: 380, easing:
|
|
551
|
+
{ duration: 380, easing: In }
|
|
548
552
|
);
|
|
549
|
-
|
|
553
|
+
Yt.id = "w";
|
|
550
554
|
}, [ne, Te, I, y]);
|
|
551
|
-
const
|
|
555
|
+
const we = (c == null ? void 0 : c.type) === "published" ? c.sha : "";
|
|
552
556
|
te(() => {
|
|
553
557
|
const i = J.current;
|
|
554
|
-
!
|
|
558
|
+
!we || !i || se() || i.animate(
|
|
555
559
|
[
|
|
556
560
|
{ transform: "scale(0.5)", opacity: 0 },
|
|
557
561
|
{ transform: "none", opacity: 1 }
|
|
558
562
|
],
|
|
559
563
|
{ duration: 420, delay: 140, easing: "cubic-bezier(.34, 1.56, .64, 1)", fill: "backwards" }
|
|
560
564
|
);
|
|
561
|
-
}, [
|
|
562
|
-
if (!
|
|
565
|
+
}, [we]), z(() => {
|
|
566
|
+
if (!we || !_) return;
|
|
563
567
|
const i = window.setTimeout(_, 3200);
|
|
564
568
|
return () => window.clearTimeout(i);
|
|
565
|
-
}, [
|
|
569
|
+
}, [we, _]);
|
|
566
570
|
function We(i, l) {
|
|
567
|
-
if (d || i ===
|
|
571
|
+
if (d || i === $e || i === "preview" && !S) return;
|
|
568
572
|
const $ = Z.current;
|
|
569
573
|
if ($) {
|
|
570
|
-
const H =
|
|
574
|
+
const H = Tn($.getBoundingClientRect(), l.getBoundingClientRect());
|
|
571
575
|
$.style.setProperty("--ox", `${H.x}px`), $.style.setProperty("--oy", `${H.y}px`);
|
|
572
576
|
}
|
|
573
|
-
i === "live" && (L(null),
|
|
577
|
+
i === "live" && (L(null), f && E(), h && m()), ae.current = i, qe(i), Ce(i), i === "preview" ? S == null || S() : C();
|
|
574
578
|
}
|
|
575
|
-
function
|
|
579
|
+
function nt(i) {
|
|
576
580
|
if (Re.current === i) return;
|
|
577
|
-
Re.current = i, L(null),
|
|
581
|
+
Re.current = i, L(null), Wt(i);
|
|
578
582
|
const l = Z.current;
|
|
579
583
|
if (!l || !(l.getRootNode() instanceof ShadowRoot)) return;
|
|
580
584
|
const $ = l.getRootNode(), H = $ instanceof ShadowRoot ? $.activeElement : null;
|
|
@@ -589,64 +593,64 @@ function Qn({
|
|
|
589
593
|
if (i) {
|
|
590
594
|
const B = l.animate(
|
|
591
595
|
[{ transform: "translateY(0)" }, { transform: "translateY(100%)" }],
|
|
592
|
-
{ duration: 220, easing:
|
|
596
|
+
{ duration: 220, easing: Ge, fill: "forwards" }
|
|
593
597
|
);
|
|
594
598
|
B.id = "hide";
|
|
595
599
|
return;
|
|
596
600
|
}
|
|
597
601
|
const Q = l.animate(
|
|
598
602
|
[{ transform: "translateY(100%)" }, { transform: "none" }],
|
|
599
|
-
{ duration: 460, easing:
|
|
603
|
+
{ duration: 460, easing: pe, fill: "backwards" }
|
|
600
604
|
);
|
|
601
605
|
Q.id = "rise", G.current && De(G.current, { delay: 140 });
|
|
602
606
|
}
|
|
603
607
|
W.current.openDashboard = () => N ? ((async () => {
|
|
604
608
|
let i = Be ?? N;
|
|
605
|
-
if (
|
|
609
|
+
if (o != null && o.workspaceId && o.type && o.slug && !Ae)
|
|
606
610
|
try {
|
|
607
|
-
const { workspace: l } = await ot(
|
|
608
|
-
i =
|
|
611
|
+
const { workspace: l } = await ot(o.workspaceId);
|
|
612
|
+
i = ut(N, o, l.slug) ?? i;
|
|
609
613
|
} catch {
|
|
610
614
|
}
|
|
611
615
|
location.assign(i);
|
|
612
616
|
})(), !0) : !1, W.current.openShortcuts = () => {
|
|
613
|
-
|
|
614
|
-
}, W.current.toggleHidden = () =>
|
|
617
|
+
ke("shortcuts"), L("settings");
|
|
618
|
+
}, W.current.toggleHidden = () => nt(!Re.current), W.current.onModeKey = (i) => We(de === "preview" ? "live" : "preview", i), W.current.onEscape = () => {
|
|
615
619
|
if (F) {
|
|
616
620
|
L(null);
|
|
617
621
|
return;
|
|
618
622
|
}
|
|
619
623
|
if (h) {
|
|
620
|
-
|
|
624
|
+
m();
|
|
621
625
|
return;
|
|
622
626
|
}
|
|
623
627
|
(c == null ? void 0 : c.type) === "editing" && (M == null || M());
|
|
624
628
|
};
|
|
625
|
-
function
|
|
626
|
-
d || (L(null), h &&
|
|
629
|
+
function rt(i) {
|
|
630
|
+
d || (L(null), h && m(), $e === "live" && Je.current && We("preview", i), E());
|
|
627
631
|
}
|
|
628
|
-
function
|
|
629
|
-
d || (L(null),
|
|
632
|
+
function Kt() {
|
|
633
|
+
d || (L(null), f && E(), m());
|
|
630
634
|
}
|
|
631
|
-
|
|
632
|
-
function
|
|
633
|
-
h &&
|
|
635
|
+
Je.current = et;
|
|
636
|
+
function Ut(i) {
|
|
637
|
+
h && m(), ke(i), L((l) => l === "settings" && i === "main" ? null : "settings");
|
|
634
638
|
}
|
|
635
|
-
function
|
|
636
|
-
h &&
|
|
639
|
+
function Ot() {
|
|
640
|
+
h && m(), L((i) => i === "page" ? null : "page");
|
|
637
641
|
}
|
|
638
|
-
const
|
|
639
|
-
|
|
642
|
+
const Gt = !!d || de === "live" && !S, Xt = !o || u <= 0, ye = /* @__PURE__ */ t(
|
|
643
|
+
nr,
|
|
640
644
|
{
|
|
641
645
|
mode: de,
|
|
642
|
-
disabled:
|
|
646
|
+
disabled: Gt,
|
|
643
647
|
buttonRef: x,
|
|
644
648
|
onClick: (i) => We(de === "preview" ? "live" : "preview", i.currentTarget)
|
|
645
649
|
}
|
|
646
650
|
);
|
|
647
|
-
let
|
|
648
|
-
(c == null ? void 0 : c.type) === "editing" ?
|
|
649
|
-
|
|
651
|
+
let me;
|
|
652
|
+
(c == null ? void 0 : c.type) === "editing" ? me = /* @__PURE__ */ s(U, { children: [
|
|
653
|
+
ye,
|
|
650
654
|
/* @__PURE__ */ t("span", { className: `${e}-spin`, "aria-hidden": !0 }),
|
|
651
655
|
/* @__PURE__ */ t("span", { className: `${e}-shimmer`, children: "Agent is editing" }),
|
|
652
656
|
/* @__PURE__ */ t("code", { className: `${e}-field`, children: c.field }),
|
|
@@ -654,15 +658,15 @@ function Qn({
|
|
|
654
658
|
"Stop",
|
|
655
659
|
/* @__PURE__ */ t("kbd", { className: `${e}-kbd`, children: "esc" })
|
|
656
660
|
] })
|
|
657
|
-
] }) : (c == null ? void 0 : c.type) === "publishing" ?
|
|
658
|
-
|
|
661
|
+
] }) : (c == null ? void 0 : c.type) === "publishing" ? me = /* @__PURE__ */ s(U, { children: [
|
|
662
|
+
ye,
|
|
659
663
|
/* @__PURE__ */ t("span", { className: `${e}-steps`, children: c.steps.map((i, l) => /* @__PURE__ */ s("span", { className: `${e}-step`, children: [
|
|
660
664
|
l > 0 ? /* @__PURE__ */ t("span", { className: `${e}-dash`, "aria-hidden": !0, children: "—" }) : null,
|
|
661
|
-
/* @__PURE__ */ t(
|
|
665
|
+
/* @__PURE__ */ t(ar, { state: i.state }),
|
|
662
666
|
/* @__PURE__ */ t("span", { children: i.label })
|
|
663
667
|
] }, `${i.label}:${l}`)) })
|
|
664
|
-
] }) : (c == null ? void 0 : c.type) === "published" ?
|
|
665
|
-
|
|
668
|
+
] }) : (c == null ? void 0 : c.type) === "published" ? me = /* @__PURE__ */ s(U, { children: [
|
|
669
|
+
ye,
|
|
666
670
|
/* @__PURE__ */ t("span", { ref: J, className: `${e}-check`, "aria-hidden": !0, children: "✓" }),
|
|
667
671
|
/* @__PURE__ */ s("span", { className: `${e}-published`, children: [
|
|
668
672
|
"Published ",
|
|
@@ -674,59 +678,59 @@ function Qn({
|
|
|
674
678
|
] }),
|
|
675
679
|
/* @__PURE__ */ t("button", { type: "button", className: `${e}-btn`, onClick: () => (D ?? C)(), children: "View live" }),
|
|
676
680
|
/* @__PURE__ */ t(
|
|
677
|
-
|
|
681
|
+
vt,
|
|
678
682
|
{
|
|
679
|
-
pressed:
|
|
680
|
-
disabled: !
|
|
681
|
-
shortcut:
|
|
682
|
-
onClick: (i) =>
|
|
683
|
+
pressed: f,
|
|
684
|
+
disabled: !o,
|
|
685
|
+
shortcut: Ve(),
|
|
686
|
+
onClick: (i) => rt(i.currentTarget)
|
|
683
687
|
}
|
|
684
688
|
)
|
|
685
|
-
] }) :
|
|
686
|
-
|
|
689
|
+
] }) : me = /* @__PURE__ */ s(U, { children: [
|
|
690
|
+
ye,
|
|
687
691
|
/* @__PURE__ */ t(
|
|
688
|
-
|
|
692
|
+
br,
|
|
689
693
|
{
|
|
690
694
|
label: n,
|
|
691
|
-
doc:
|
|
695
|
+
doc: o,
|
|
692
696
|
dashboardHref: Be,
|
|
693
697
|
bar: ie,
|
|
694
698
|
open: F === "page",
|
|
695
699
|
expanded: F === "page",
|
|
696
|
-
onToggle:
|
|
700
|
+
onToggle: Ot
|
|
697
701
|
}
|
|
698
702
|
),
|
|
699
703
|
/* @__PURE__ */ t("span", { className: `${e}-rule`, "aria-hidden": !0 }),
|
|
700
704
|
/* @__PURE__ */ t(
|
|
701
|
-
|
|
705
|
+
vt,
|
|
702
706
|
{
|
|
703
|
-
pressed:
|
|
704
|
-
disabled: !
|
|
705
|
-
shortcut:
|
|
706
|
-
onClick: (i) =>
|
|
707
|
+
pressed: f,
|
|
708
|
+
disabled: !o,
|
|
709
|
+
shortcut: Ve(),
|
|
710
|
+
onClick: (i) => rt(i.currentTarget)
|
|
707
711
|
}
|
|
708
712
|
),
|
|
709
713
|
/* @__PURE__ */ t(
|
|
710
|
-
|
|
714
|
+
rr,
|
|
711
715
|
{
|
|
712
716
|
buttonRef: A,
|
|
713
717
|
open: h,
|
|
714
718
|
count: u,
|
|
715
|
-
disabled:
|
|
716
|
-
onClick:
|
|
719
|
+
disabled: Xt,
|
|
720
|
+
onClick: Kt
|
|
717
721
|
}
|
|
718
722
|
),
|
|
719
723
|
/* @__PURE__ */ t(
|
|
720
|
-
|
|
724
|
+
sr,
|
|
721
725
|
{
|
|
722
726
|
buttonRef: T,
|
|
723
727
|
open: F === "settings",
|
|
724
|
-
onClick: () =>
|
|
728
|
+
onClick: () => Ut("main")
|
|
725
729
|
}
|
|
726
730
|
)
|
|
727
731
|
] });
|
|
728
|
-
const
|
|
729
|
-
/* @__PURE__ */ t("style", { children:
|
|
732
|
+
const it = /* @__PURE__ */ s(U, { children: [
|
|
733
|
+
/* @__PURE__ */ t("style", { children: wr }),
|
|
730
734
|
/* @__PURE__ */ s(
|
|
731
735
|
"div",
|
|
732
736
|
{
|
|
@@ -735,11 +739,11 @@ function Qn({
|
|
|
735
739
|
"data-mode": de,
|
|
736
740
|
"data-branch": r || void 0,
|
|
737
741
|
children: [
|
|
738
|
-
q ? /* @__PURE__ */ t(
|
|
742
|
+
q ? /* @__PURE__ */ t(Yn, { active: de === "preview", radius: X }) : null,
|
|
739
743
|
/* @__PURE__ */ s(
|
|
740
744
|
"footer",
|
|
741
745
|
{
|
|
742
|
-
ref:
|
|
746
|
+
ref: Ft,
|
|
743
747
|
"aria-label": "Backmatter",
|
|
744
748
|
"aria-hidden": ze || void 0,
|
|
745
749
|
inert: ze ? !0 : void 0,
|
|
@@ -749,7 +753,7 @@ function Qn({
|
|
|
749
753
|
children: [
|
|
750
754
|
/* @__PURE__ */ s("div", { className: `${e}-clip`, children: [
|
|
751
755
|
/* @__PURE__ */ t("span", { className: `${e}-flood`, "aria-hidden": !0 }),
|
|
752
|
-
/* @__PURE__ */ t("div", { ref: G, className: `${e}-row`, children:
|
|
756
|
+
/* @__PURE__ */ t("div", { ref: G, className: `${e}-row`, children: me }),
|
|
753
757
|
(c == null ? void 0 : c.type) === "publishing" ? /* @__PURE__ */ t(
|
|
754
758
|
"span",
|
|
755
759
|
{
|
|
@@ -764,38 +768,38 @@ function Qn({
|
|
|
764
768
|
}
|
|
765
769
|
),
|
|
766
770
|
/* @__PURE__ */ t(
|
|
767
|
-
|
|
771
|
+
lr,
|
|
768
772
|
{
|
|
769
773
|
open: F === "settings",
|
|
770
|
-
pane:
|
|
771
|
-
hostName:
|
|
774
|
+
pane: qt,
|
|
775
|
+
hostName: Dt,
|
|
772
776
|
branch: r,
|
|
773
777
|
bar: ie,
|
|
774
778
|
highlightBlocks: _e,
|
|
775
|
-
previewAgent:
|
|
779
|
+
previewAgent: et,
|
|
776
780
|
dashboardHref: Be,
|
|
777
781
|
onHighlight: (i) => {
|
|
778
|
-
|
|
782
|
+
Qe(i), mt(je(), ht, i);
|
|
779
783
|
},
|
|
780
784
|
onPreviewAgent: (i) => {
|
|
781
|
-
|
|
785
|
+
tt(i), mt(je(), pt, i);
|
|
782
786
|
},
|
|
783
|
-
onShortcuts: () =>
|
|
784
|
-
onBack: () =>
|
|
787
|
+
onShortcuts: () => ke("shortcuts"),
|
|
788
|
+
onBack: () => ke("main"),
|
|
785
789
|
onDashboard: () => {
|
|
786
790
|
W.current.openDashboard();
|
|
787
791
|
},
|
|
788
|
-
onHide: () =>
|
|
792
|
+
onHide: () => nt(!0),
|
|
789
793
|
onSwitchBranch: r ? () => L("branch") : void 0,
|
|
790
794
|
onSignOut: j
|
|
791
795
|
}
|
|
792
796
|
),
|
|
793
797
|
r ? /* @__PURE__ */ t(
|
|
794
|
-
|
|
798
|
+
xr,
|
|
795
799
|
{
|
|
796
800
|
branch: r,
|
|
797
|
-
tree:
|
|
798
|
-
workspaceId: (
|
|
801
|
+
tree: a,
|
|
802
|
+
workspaceId: (o == null ? void 0 : o.workspaceId) ?? null,
|
|
799
803
|
previewEntryPath: R,
|
|
800
804
|
bar: ie,
|
|
801
805
|
open: F === "branch",
|
|
@@ -807,27 +811,27 @@ function Qn({
|
|
|
807
811
|
)
|
|
808
812
|
] });
|
|
809
813
|
return /* @__PURE__ */ s("div", { ref: re, className: `${e}-host`, "data-backmatter-devbar": "", children: [
|
|
810
|
-
/* @__PURE__ */ t("style", { children:
|
|
811
|
-
ne ? Me(
|
|
814
|
+
/* @__PURE__ */ t("style", { children: kr }),
|
|
815
|
+
ne ? Me(it, ne) : /* @__PURE__ */ t(
|
|
812
816
|
"template",
|
|
813
817
|
{
|
|
814
818
|
shadowrootmode: "open",
|
|
815
|
-
children:
|
|
819
|
+
children: it
|
|
816
820
|
}
|
|
817
821
|
)
|
|
818
822
|
] });
|
|
819
823
|
}
|
|
820
|
-
function
|
|
824
|
+
function nr({
|
|
821
825
|
mode: n,
|
|
822
826
|
disabled: r,
|
|
823
|
-
buttonRef:
|
|
824
|
-
onClick:
|
|
827
|
+
buttonRef: a,
|
|
828
|
+
onClick: o
|
|
825
829
|
}) {
|
|
826
830
|
const d = n === "preview";
|
|
827
831
|
return /* @__PURE__ */ s(
|
|
828
832
|
"button",
|
|
829
833
|
{
|
|
830
|
-
ref:
|
|
834
|
+
ref: a,
|
|
831
835
|
type: "button",
|
|
832
836
|
"data-mode-button": "",
|
|
833
837
|
className: `${e}-mode`,
|
|
@@ -835,19 +839,19 @@ function er({
|
|
|
835
839
|
"aria-keyshortcuts": "Meta+Shift+P Control+Shift+P",
|
|
836
840
|
title: d ? "View the published site" : "View draft content",
|
|
837
841
|
disabled: r,
|
|
838
|
-
onClick:
|
|
842
|
+
onClick: o,
|
|
839
843
|
children: [
|
|
840
|
-
/* @__PURE__ */ t(
|
|
844
|
+
/* @__PURE__ */ t(ir, { exit: d }),
|
|
841
845
|
d ? "Exit preview" : "Enter preview"
|
|
842
846
|
]
|
|
843
847
|
}
|
|
844
848
|
);
|
|
845
849
|
}
|
|
846
|
-
function
|
|
850
|
+
function vt({
|
|
847
851
|
pressed: n,
|
|
848
852
|
disabled: r,
|
|
849
|
-
shortcut:
|
|
850
|
-
onClick:
|
|
853
|
+
shortcut: a,
|
|
854
|
+
onClick: o
|
|
851
855
|
}) {
|
|
852
856
|
return /* @__PURE__ */ s(
|
|
853
857
|
"button",
|
|
@@ -857,23 +861,23 @@ function xt({
|
|
|
857
861
|
"aria-pressed": n,
|
|
858
862
|
"aria-keyshortcuts": "Meta+J Control+J",
|
|
859
863
|
disabled: r,
|
|
860
|
-
onClick:
|
|
864
|
+
onClick: o,
|
|
861
865
|
children: [
|
|
862
|
-
/* @__PURE__ */ t(
|
|
866
|
+
/* @__PURE__ */ t(en, {}),
|
|
863
867
|
/* @__PURE__ */ t("span", { children: "Agent" }),
|
|
864
868
|
/* @__PURE__ */ s("kbd", { className: `${e}-kbd`, children: [
|
|
865
|
-
|
|
869
|
+
a,
|
|
866
870
|
"J"
|
|
867
871
|
] })
|
|
868
872
|
]
|
|
869
873
|
}
|
|
870
874
|
);
|
|
871
875
|
}
|
|
872
|
-
function
|
|
876
|
+
function rr({
|
|
873
877
|
buttonRef: n,
|
|
874
878
|
open: r,
|
|
875
|
-
count:
|
|
876
|
-
disabled:
|
|
879
|
+
count: a,
|
|
880
|
+
disabled: o,
|
|
877
881
|
onClick: d
|
|
878
882
|
}) {
|
|
879
883
|
return /* @__PURE__ */ s(
|
|
@@ -884,55 +888,55 @@ function tr({
|
|
|
884
888
|
className: `${e}-publish${r ? ` ${e}-publish-on` : ""}`,
|
|
885
889
|
"aria-haspopup": "dialog",
|
|
886
890
|
"aria-expanded": r ?? !1,
|
|
887
|
-
disabled:
|
|
891
|
+
disabled: o,
|
|
888
892
|
onClick: d,
|
|
889
893
|
children: [
|
|
890
|
-
/* @__PURE__ */ t(
|
|
894
|
+
/* @__PURE__ */ t(nn, {}),
|
|
891
895
|
/* @__PURE__ */ s("span", { children: [
|
|
892
896
|
"Publish",
|
|
893
|
-
|
|
897
|
+
a > 0 ? /* @__PURE__ */ s("span", { className: `${e}-count`, children: [
|
|
894
898
|
" ",
|
|
895
|
-
|
|
899
|
+
a
|
|
896
900
|
] }) : null
|
|
897
901
|
] })
|
|
898
902
|
]
|
|
899
903
|
}
|
|
900
904
|
);
|
|
901
905
|
}
|
|
902
|
-
function
|
|
906
|
+
function ir({ exit: n }) {
|
|
903
907
|
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: [
|
|
904
908
|
/* @__PURE__ */ t("circle", { cx: "6", cy: "6", r: "3.25", stroke: "currentColor", strokeWidth: "1.25" }),
|
|
905
909
|
/* @__PURE__ */ t("circle", { cx: "6", cy: "6", r: "1.35", fill: "currentColor" })
|
|
906
910
|
] });
|
|
907
911
|
}
|
|
908
|
-
function
|
|
912
|
+
function ar({ state: n }) {
|
|
909
913
|
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 });
|
|
910
914
|
}
|
|
911
915
|
function De(n, r = {}) {
|
|
912
|
-
const
|
|
916
|
+
const a = r.delay ?? 0;
|
|
913
917
|
if (se()) {
|
|
914
918
|
n.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 150, easing: "ease", fill: "backwards" });
|
|
915
919
|
return;
|
|
916
920
|
}
|
|
917
|
-
[...n.children].forEach((
|
|
918
|
-
|
|
921
|
+
[...n.children].forEach((o, d) => {
|
|
922
|
+
o.animate(
|
|
919
923
|
[
|
|
920
924
|
{ opacity: 0, transform: "translateY(4px)", filter: r.blur ? "blur(2px)" : "none" },
|
|
921
925
|
{ opacity: 1, transform: "none", filter: "none" }
|
|
922
926
|
],
|
|
923
|
-
{ duration: 300, delay:
|
|
927
|
+
{ duration: 300, delay: a + d * 28, easing: pe, fill: "backwards" }
|
|
924
928
|
);
|
|
925
929
|
});
|
|
926
930
|
}
|
|
927
|
-
function
|
|
931
|
+
function or(n) {
|
|
928
932
|
if (!(n instanceof HTMLElement)) return !1;
|
|
929
933
|
const r = n.tagName;
|
|
930
934
|
return r === "INPUT" || r === "TEXTAREA" || r === "SELECT" ? !0 : n.isContentEditable;
|
|
931
935
|
}
|
|
932
|
-
function
|
|
936
|
+
function sr({
|
|
933
937
|
buttonRef: n,
|
|
934
938
|
open: r,
|
|
935
|
-
onClick:
|
|
939
|
+
onClick: a
|
|
936
940
|
}) {
|
|
937
941
|
return /* @__PURE__ */ t(
|
|
938
942
|
"button",
|
|
@@ -943,18 +947,18 @@ function or({
|
|
|
943
947
|
"aria-label": "Settings",
|
|
944
948
|
"aria-haspopup": "dialog",
|
|
945
949
|
"aria-expanded": r,
|
|
946
|
-
onClick:
|
|
947
|
-
children: /* @__PURE__ */ t(
|
|
950
|
+
onClick: a,
|
|
951
|
+
children: /* @__PURE__ */ t(rn, {})
|
|
948
952
|
}
|
|
949
953
|
);
|
|
950
954
|
}
|
|
951
|
-
function
|
|
955
|
+
function lr({
|
|
952
956
|
open: n,
|
|
953
957
|
pane: r,
|
|
954
|
-
hostName:
|
|
955
|
-
branch:
|
|
958
|
+
hostName: a,
|
|
959
|
+
branch: o,
|
|
956
960
|
bar: d,
|
|
957
|
-
highlightBlocks:
|
|
961
|
+
highlightBlocks: f,
|
|
958
962
|
previewAgent: h,
|
|
959
963
|
dashboardHref: u,
|
|
960
964
|
onHighlight: p,
|
|
@@ -966,11 +970,11 @@ function ar({
|
|
|
966
970
|
onSwitchBranch: I,
|
|
967
971
|
onSignOut: N
|
|
968
972
|
}) {
|
|
969
|
-
const C =
|
|
973
|
+
const C = Oe(), [S, E] = b(null), m = Ve();
|
|
970
974
|
if (z(() => {
|
|
971
975
|
if (!n) return;
|
|
972
976
|
let _ = !1;
|
|
973
|
-
return
|
|
977
|
+
return an().then((j) => {
|
|
974
978
|
_ || E((j == null ? void 0 : j.user.email) ?? null);
|
|
975
979
|
}).catch(() => {
|
|
976
980
|
_ || E(null);
|
|
@@ -978,62 +982,62 @@ function ar({
|
|
|
978
982
|
_ = !0;
|
|
979
983
|
};
|
|
980
984
|
}, [n]), !n || !d) return null;
|
|
981
|
-
const M =
|
|
985
|
+
const M = a && o ? `${a} · ${o}` : a || o || "", D = r === "shortcuts" ? /* @__PURE__ */ s("div", { role: "dialog", "aria-labelledby": C, className: `${e}-menu ${e}-settings`, children: [
|
|
982
986
|
/* @__PURE__ */ t("div", { className: `${e}-settings-head`, children: /* @__PURE__ */ s("button", { type: "button", className: `${e}-settings-back`, onClick: y, children: [
|
|
983
|
-
/* @__PURE__ */ t(
|
|
987
|
+
/* @__PURE__ */ t(Tt, {}),
|
|
984
988
|
/* @__PURE__ */ t("span", { id: C, children: "Shortcuts" })
|
|
985
989
|
] }) }),
|
|
986
|
-
/* @__PURE__ */ t(
|
|
987
|
-
/* @__PURE__ */ t(
|
|
988
|
-
/* @__PURE__ */ t(
|
|
989
|
-
/* @__PURE__ */ t(
|
|
990
|
-
/* @__PURE__ */ t(
|
|
990
|
+
/* @__PURE__ */ t(be, { label: "Toggle preview", keys: `${m}⇧P` }),
|
|
991
|
+
/* @__PURE__ */ t(be, { label: "Agent", keys: `${m}J` }),
|
|
992
|
+
/* @__PURE__ */ t(be, { label: "Open in dashboard", keys: `${m}D` }),
|
|
993
|
+
/* @__PURE__ */ t(be, { label: "Hide toolbar", keys: `${m}.` }),
|
|
994
|
+
/* @__PURE__ */ t(be, { label: "Keyboard shortcuts", keys: "?" })
|
|
991
995
|
] }) : /* @__PURE__ */ s("div", { role: "dialog", "aria-labelledby": C, className: `${e}-menu ${e}-settings`, children: [
|
|
992
996
|
/* @__PURE__ */ s("div", { className: `${e}-settings-head`, children: [
|
|
993
997
|
/* @__PURE__ */ t("span", { id: C, className: `${e}-settings-kicker`, children: "Settings" }),
|
|
994
998
|
M ? /* @__PURE__ */ t("span", { className: `${e}-settings-place`, children: M }) : null
|
|
995
999
|
] }),
|
|
996
1000
|
/* @__PURE__ */ s("div", { className: `${e}-settings-row`, children: [
|
|
997
|
-
/* @__PURE__ */ t(
|
|
1001
|
+
/* @__PURE__ */ t(ur, {}),
|
|
998
1002
|
/* @__PURE__ */ t("span", { children: "Highlight editable blocks" }),
|
|
999
|
-
/* @__PURE__ */ t(
|
|
1003
|
+
/* @__PURE__ */ t($t, { on: f, label: "Highlight editable blocks", onClick: () => p(!f) })
|
|
1000
1004
|
] }),
|
|
1001
1005
|
/* @__PURE__ */ s("div", { className: `${e}-settings-row`, children: [
|
|
1002
|
-
/* @__PURE__ */ t(
|
|
1006
|
+
/* @__PURE__ */ t(hr, {}),
|
|
1003
1007
|
/* @__PURE__ */ t("span", { children: "Preview when Agent edits" }),
|
|
1004
|
-
/* @__PURE__ */ t(
|
|
1008
|
+
/* @__PURE__ */ t($t, { on: h, label: "Preview when Agent edits", onClick: () => c(!h) })
|
|
1005
1009
|
] }),
|
|
1006
1010
|
/* @__PURE__ */ t("div", { className: `${e}-settings-rule` }),
|
|
1007
1011
|
u ? /* @__PURE__ */ s("button", { type: "button", className: `${e}-settings-action`, onClick: q, children: [
|
|
1008
|
-
/* @__PURE__ */ t(
|
|
1012
|
+
/* @__PURE__ */ t(pr, {}),
|
|
1009
1013
|
/* @__PURE__ */ t("span", { children: "Open in dashboard" }),
|
|
1010
1014
|
/* @__PURE__ */ s("kbd", { className: `${e}-kbd`, children: [
|
|
1011
|
-
|
|
1015
|
+
m,
|
|
1012
1016
|
"D"
|
|
1013
1017
|
] })
|
|
1014
1018
|
] }) : null,
|
|
1015
1019
|
I ? /* @__PURE__ */ s("button", { type: "button", className: `${e}-settings-action`, onClick: I, children: [
|
|
1016
|
-
/* @__PURE__ */ t("span", { className: `${e}-settings-icon`, "aria-hidden": !0, children: /* @__PURE__ */ t(
|
|
1020
|
+
/* @__PURE__ */ t("span", { className: `${e}-settings-icon`, "aria-hidden": !0, children: /* @__PURE__ */ t(sn, {}) }),
|
|
1017
1021
|
/* @__PURE__ */ t("span", { children: "Switch branch" }),
|
|
1018
|
-
|
|
1022
|
+
o ? /* @__PURE__ */ t("span", { className: `${e}-settings-email`, children: o }) : null
|
|
1019
1023
|
] }) : null,
|
|
1020
1024
|
/* @__PURE__ */ s("button", { type: "button", className: `${e}-settings-action`, onClick: R, children: [
|
|
1021
|
-
/* @__PURE__ */ t(
|
|
1025
|
+
/* @__PURE__ */ t(gr, {}),
|
|
1022
1026
|
/* @__PURE__ */ t("span", { children: "Keyboard shortcuts" }),
|
|
1023
1027
|
/* @__PURE__ */ t("kbd", { className: `${e}-kbd`, children: "?" })
|
|
1024
1028
|
] }),
|
|
1025
1029
|
/* @__PURE__ */ s("button", { type: "button", className: `${e}-settings-action`, "aria-keyshortcuts": "Meta+. Control+.", onClick: X, children: [
|
|
1026
|
-
/* @__PURE__ */ t(
|
|
1030
|
+
/* @__PURE__ */ t(mr, {}),
|
|
1027
1031
|
/* @__PURE__ */ t("span", { children: "Hide toolbar" }),
|
|
1028
1032
|
/* @__PURE__ */ s("kbd", { className: `${e}-kbd`, children: [
|
|
1029
|
-
|
|
1033
|
+
m,
|
|
1030
1034
|
"."
|
|
1031
1035
|
] })
|
|
1032
1036
|
] }),
|
|
1033
1037
|
N ? /* @__PURE__ */ s(U, { children: [
|
|
1034
1038
|
/* @__PURE__ */ t("div", { className: `${e}-settings-rule` }),
|
|
1035
1039
|
/* @__PURE__ */ s("button", { type: "button", className: `${e}-settings-action`, onClick: N, children: [
|
|
1036
|
-
/* @__PURE__ */ t(
|
|
1040
|
+
/* @__PURE__ */ t(fr, {}),
|
|
1037
1041
|
/* @__PURE__ */ t("span", { children: "Sign out" }),
|
|
1038
1042
|
S ? /* @__PURE__ */ t("span", { className: `${e}-settings-email`, children: S }) : null
|
|
1039
1043
|
] })
|
|
@@ -1041,13 +1045,13 @@ function ar({
|
|
|
1041
1045
|
] });
|
|
1042
1046
|
return Me(D, d);
|
|
1043
1047
|
}
|
|
1044
|
-
function
|
|
1048
|
+
function be({ label: n, keys: r }) {
|
|
1045
1049
|
return /* @__PURE__ */ s("div", { className: `${e}-settings-action ${e}-settings-static`, children: [
|
|
1046
1050
|
/* @__PURE__ */ t("span", { children: n }),
|
|
1047
1051
|
/* @__PURE__ */ t("kbd", { className: `${e}-kbd`, children: r })
|
|
1048
1052
|
] });
|
|
1049
1053
|
}
|
|
1050
|
-
function
|
|
1054
|
+
function $t({ on: n, label: r, onClick: a }) {
|
|
1051
1055
|
return /* @__PURE__ */ t(
|
|
1052
1056
|
"button",
|
|
1053
1057
|
{
|
|
@@ -1056,49 +1060,49 @@ function vt({ on: n, label: r, onClick: o }) {
|
|
|
1056
1060
|
className: `${e}-switch${n ? ` ${e}-switch-on` : ""}`,
|
|
1057
1061
|
"aria-checked": n,
|
|
1058
1062
|
"aria-label": r,
|
|
1059
|
-
onClick:
|
|
1063
|
+
onClick: a,
|
|
1060
1064
|
children: /* @__PURE__ */ t("span", { className: `${e}-knob` })
|
|
1061
1065
|
}
|
|
1062
1066
|
);
|
|
1063
1067
|
}
|
|
1064
|
-
function
|
|
1065
|
-
const
|
|
1066
|
-
n.style.setProperty("--menu-right", `${Math.max(0,
|
|
1068
|
+
function cr(n, r) {
|
|
1069
|
+
const a = n.getBoundingClientRect(), o = r.getBoundingClientRect();
|
|
1070
|
+
n.style.setProperty("--menu-right", `${Math.max(0, a.right - o.right)}px`);
|
|
1067
1071
|
}
|
|
1068
|
-
function
|
|
1069
|
-
const
|
|
1070
|
-
let h =
|
|
1071
|
-
const u = 16, p = u -
|
|
1072
|
+
function dr(n, r) {
|
|
1073
|
+
const a = n.getBoundingClientRect(), o = r.getBoundingClientRect(), d = Math.min(er, window.innerWidth - 32);
|
|
1074
|
+
let h = o.left + o.width / 2 - a.left - d / 2;
|
|
1075
|
+
const u = 16, p = u - a.left, c = window.innerWidth - u - d - a.left;
|
|
1072
1076
|
n.style.setProperty("--menu-x", `${Math.max(p, Math.min(h, c))}px`);
|
|
1073
1077
|
}
|
|
1074
|
-
function
|
|
1078
|
+
function ur() {
|
|
1075
1079
|
return /* @__PURE__ */ s("svg", { className: `${e}-settings-icon`, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": !0, children: [
|
|
1076
1080
|
/* @__PURE__ */ t("path", { d: "M3 3h4.2v4.2H3zM8.8 3H13v4.2H8.8zM3 8.8h4.2V13H3z", fill: "none", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
1077
1081
|
/* @__PURE__ */ t("path", { d: "M8.8 10.2h4.2", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeDasharray: "1.4 1.5" })
|
|
1078
1082
|
] });
|
|
1079
1083
|
}
|
|
1080
|
-
function
|
|
1084
|
+
function hr() {
|
|
1081
1085
|
return /* @__PURE__ */ s("svg", { className: `${e}-settings-icon`, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": !0, children: [
|
|
1082
1086
|
/* @__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" }),
|
|
1083
1087
|
/* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "1.8", fill: "none", stroke: "currentColor", strokeWidth: "1.3" })
|
|
1084
1088
|
] });
|
|
1085
1089
|
}
|
|
1086
|
-
function
|
|
1090
|
+
function pr() {
|
|
1087
1091
|
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" }) });
|
|
1088
1092
|
}
|
|
1089
|
-
function
|
|
1093
|
+
function gr() {
|
|
1090
1094
|
return /* @__PURE__ */ s("svg", { className: `${e}-settings-icon`, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": !0, children: [
|
|
1091
1095
|
/* @__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" }),
|
|
1092
1096
|
/* @__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" })
|
|
1093
1097
|
] });
|
|
1094
1098
|
}
|
|
1095
|
-
function
|
|
1099
|
+
function mr() {
|
|
1096
1100
|
return /* @__PURE__ */ s("svg", { className: `${e}-settings-icon`, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": !0, children: [
|
|
1097
1101
|
/* @__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" }),
|
|
1098
1102
|
/* @__PURE__ */ t("path", { d: "M3 13 13 3", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
1099
1103
|
] });
|
|
1100
1104
|
}
|
|
1101
|
-
function
|
|
1105
|
+
function fr() {
|
|
1102
1106
|
return /* @__PURE__ */ s("svg", { className: `${e}-settings-icon`, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": !0, children: [
|
|
1103
1107
|
/* @__PURE__ */ t("path", { d: "M6.5 3.2H3.8v9.6h2.7", fill: "none", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" }),
|
|
1104
1108
|
/* @__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" })
|
|
@@ -1111,21 +1115,21 @@ function je() {
|
|
|
1111
1115
|
return null;
|
|
1112
1116
|
}
|
|
1113
1117
|
}
|
|
1114
|
-
function
|
|
1118
|
+
function kt(n) {
|
|
1115
1119
|
if (typeof document > "u") return;
|
|
1116
|
-
const r = typeof matchMedia == "function" && matchMedia("(prefers-color-scheme: dark)").matches,
|
|
1117
|
-
|
|
1120
|
+
const r = typeof matchMedia == "function" && matchMedia("(prefers-color-scheme: dark)").matches, a = jn(n, r) === "dark", o = document.documentElement;
|
|
1121
|
+
o.dataset.theme = a ? "dark" : "light", o.style.colorScheme = n === "system" ? "light dark" : a ? "dark" : "light", o.classList.toggle("dark", a), o.classList.toggle("light", !a);
|
|
1118
1122
|
}
|
|
1119
|
-
function
|
|
1123
|
+
function br({
|
|
1120
1124
|
label: n,
|
|
1121
1125
|
doc: r,
|
|
1122
|
-
dashboardHref:
|
|
1123
|
-
bar:
|
|
1126
|
+
dashboardHref: a,
|
|
1127
|
+
bar: o,
|
|
1124
1128
|
open: d,
|
|
1125
|
-
expanded:
|
|
1129
|
+
expanded: f,
|
|
1126
1130
|
onToggle: h
|
|
1127
1131
|
}) {
|
|
1128
|
-
const [u, p] = b([]), [c, R] = b(0), [y, q] = b(!1), [X, I] = b(!1), [N, C] = b(null), [S, E] = b(""),
|
|
1132
|
+
const [u, p] = b([]), [c, R] = b(0), [y, q] = b(!1), [X, I] = b(!1), [N, C] = b(null), [S, E] = b(""), m = Oe(), M = w(null), D = w(null), _ = w(null), j = w(0), Y = w(/* @__PURE__ */ new Map());
|
|
1129
1133
|
z(() => {
|
|
1130
1134
|
d || E("");
|
|
1131
1135
|
}, [d]), te(() => {
|
|
@@ -1133,26 +1137,26 @@ function mr({
|
|
|
1133
1137
|
d && ((x = _.current) == null || x.focus({ preventScroll: !0 }));
|
|
1134
1138
|
}, [d]), te(() => {
|
|
1135
1139
|
const x = M.current;
|
|
1136
|
-
if (!d || !
|
|
1137
|
-
const A = () =>
|
|
1140
|
+
if (!d || !o || !x) return;
|
|
1141
|
+
const A = () => dr(o, x);
|
|
1138
1142
|
return A(), window.addEventListener("resize", A), () => window.removeEventListener("resize", A);
|
|
1139
|
-
}, [d,
|
|
1143
|
+
}, [d, o]);
|
|
1140
1144
|
const le = Ke(
|
|
1141
1145
|
(x, A, T) => {
|
|
1142
1146
|
if (!r) return;
|
|
1143
|
-
const J = ++j.current, ne = S.trim(),
|
|
1144
|
-
A ? I(!0) : T != null && T.silent || q(!0),
|
|
1147
|
+
const J = ++j.current, ne = S.trim(), ge = xt(r.workspaceId, ne);
|
|
1148
|
+
A ? I(!0) : T != null && T.silent || q(!0), tn(r.workspaceId, {
|
|
1145
1149
|
q: ne || void 0,
|
|
1146
|
-
limit:
|
|
1150
|
+
limit: Qn,
|
|
1147
1151
|
offset: x,
|
|
1148
1152
|
current: r
|
|
1149
1153
|
}).then((re) => {
|
|
1150
1154
|
J === j.current && (R(re.total), p((ie) => {
|
|
1151
|
-
const
|
|
1152
|
-
return Y.current.set(
|
|
1155
|
+
const ve = A ? [...ie, ...re.items] : re.items;
|
|
1156
|
+
return Y.current.set(ge, { rows: ve, total: re.total }), ve;
|
|
1153
1157
|
}), C(null));
|
|
1154
1158
|
}).catch(() => {
|
|
1155
|
-
J === j.current && (A || Y.current.get(
|
|
1159
|
+
J === j.current && (A || Y.current.get(ge) || p([]), C("Couldn't load pages"));
|
|
1156
1160
|
}).finally(() => {
|
|
1157
1161
|
J === j.current && (q(!1), I(!1));
|
|
1158
1162
|
});
|
|
@@ -1161,7 +1165,7 @@ function mr({
|
|
|
1161
1165
|
);
|
|
1162
1166
|
z(() => {
|
|
1163
1167
|
if (!d || !r) return;
|
|
1164
|
-
const x = S.trim(), A =
|
|
1168
|
+
const x = S.trim(), A = xt(r.workspaceId, x), T = Y.current.get(A);
|
|
1165
1169
|
T && (p(T.rows), R(T.total), C(null));
|
|
1166
1170
|
const J = window.setTimeout(
|
|
1167
1171
|
() => le(0, !1, { silent: !!T }),
|
|
@@ -1177,13 +1181,13 @@ function mr({
|
|
|
1177
1181
|
const Z = !y && !N && u.length === 0, G = d ? /* @__PURE__ */ s(
|
|
1178
1182
|
"div",
|
|
1179
1183
|
{
|
|
1180
|
-
id:
|
|
1184
|
+
id: m,
|
|
1181
1185
|
role: "menu",
|
|
1182
1186
|
"aria-label": "Pages",
|
|
1183
1187
|
className: `${e}-menu ${e}-page-menu`,
|
|
1184
1188
|
children: [
|
|
1185
1189
|
/* @__PURE__ */ t(
|
|
1186
|
-
|
|
1190
|
+
Pt,
|
|
1187
1191
|
{
|
|
1188
1192
|
query: S,
|
|
1189
1193
|
onQuery: E,
|
|
@@ -1220,13 +1224,13 @@ function mr({
|
|
|
1220
1224
|
N ? /* @__PURE__ */ t("p", { className: `${e}-note ${e}-note-error`, children: N }) : null,
|
|
1221
1225
|
y && u.length === 0 ? /* @__PURE__ */ t("p", { className: `${e}-note ${e}-note-muted`, children: "Loading pages…" }) : null
|
|
1222
1226
|
] }),
|
|
1223
|
-
|
|
1227
|
+
a ? /* @__PURE__ */ t("div", { className: `${e}-page-menu-foot`, children: /* @__PURE__ */ t(
|
|
1224
1228
|
"button",
|
|
1225
1229
|
{
|
|
1226
1230
|
type: "button",
|
|
1227
1231
|
role: "menuitem",
|
|
1228
1232
|
className: `${e}-option`,
|
|
1229
|
-
onClick: () => location.assign(
|
|
1233
|
+
onClick: () => location.assign(a),
|
|
1230
1234
|
children: /* @__PURE__ */ t("span", { children: "Open in dashboard" })
|
|
1231
1235
|
}
|
|
1232
1236
|
) }) : null
|
|
@@ -1239,49 +1243,49 @@ function mr({
|
|
|
1239
1243
|
{
|
|
1240
1244
|
ref: M,
|
|
1241
1245
|
type: "button",
|
|
1242
|
-
className: `${e}-btn ${e}-page${
|
|
1246
|
+
className: `${e}-btn ${e}-page${f ? ` ${e}-page-on` : ""}`,
|
|
1243
1247
|
"aria-haspopup": "menu",
|
|
1244
|
-
"aria-expanded":
|
|
1245
|
-
"aria-controls":
|
|
1248
|
+
"aria-expanded": f,
|
|
1249
|
+
"aria-controls": m,
|
|
1246
1250
|
onClick: h,
|
|
1247
1251
|
children: [
|
|
1248
1252
|
/* @__PURE__ */ t("span", { children: n }),
|
|
1249
|
-
/* @__PURE__ */ t(
|
|
1253
|
+
/* @__PURE__ */ t(Tt, {})
|
|
1250
1254
|
]
|
|
1251
1255
|
}
|
|
1252
1256
|
),
|
|
1253
|
-
G &&
|
|
1257
|
+
G && o ? Me(G, o) : null
|
|
1254
1258
|
] });
|
|
1255
1259
|
}
|
|
1256
|
-
function
|
|
1260
|
+
function xr({
|
|
1257
1261
|
branch: n,
|
|
1258
1262
|
tree: r,
|
|
1259
|
-
workspaceId:
|
|
1260
|
-
previewEntryPath:
|
|
1263
|
+
workspaceId: a,
|
|
1264
|
+
previewEntryPath: o,
|
|
1261
1265
|
bar: d,
|
|
1262
|
-
open:
|
|
1266
|
+
open: f,
|
|
1263
1267
|
onClose: h
|
|
1264
1268
|
}) {
|
|
1265
|
-
const [u, p] = b(null), [c, R] = b(null), [y, q] = b(null), [X, I] = b(!1), [N, C] = b(""), S =
|
|
1269
|
+
const [u, p] = b(null), [c, R] = b(null), [y, q] = b(null), [X, I] = b(!1), [N, C] = b(""), S = Oe();
|
|
1266
1270
|
if (z(() => {
|
|
1267
|
-
|
|
1268
|
-
}, [
|
|
1269
|
-
if (!
|
|
1270
|
-
let
|
|
1271
|
-
return
|
|
1272
|
-
if (
|
|
1271
|
+
f || C("");
|
|
1272
|
+
}, [f]), z(() => {
|
|
1273
|
+
if (!f || !a || u) return;
|
|
1274
|
+
let m = !1;
|
|
1275
|
+
return on(a).then((M) => {
|
|
1276
|
+
if (m) return;
|
|
1273
1277
|
const D = M.branches.map((_) => _.name);
|
|
1274
1278
|
D.includes(n) || D.unshift(n), p(D), R(M.defaultBranch);
|
|
1275
1279
|
}).catch(() => {
|
|
1276
|
-
|
|
1280
|
+
m || q("Couldn't load branches");
|
|
1277
1281
|
}), () => {
|
|
1278
|
-
|
|
1282
|
+
m = !0;
|
|
1279
1283
|
};
|
|
1280
|
-
}, [
|
|
1281
|
-
const E = u ?
|
|
1284
|
+
}, [f, a, u, n]), !f || !d) return null;
|
|
1285
|
+
const E = u ? vr(u.map((m) => ({ key: m, label: m })), N) : null;
|
|
1282
1286
|
return Me(
|
|
1283
|
-
/* @__PURE__ */ t("div", { id: S, role: "menu", "aria-label": "Branches", className: `${e}-menu ${e}-page-menu`, children:
|
|
1284
|
-
|
|
1287
|
+
/* @__PURE__ */ t("div", { id: S, role: "menu", "aria-label": "Branches", className: `${e}-menu ${e}-page-menu`, children: a ? /* @__PURE__ */ t(
|
|
1288
|
+
Pt,
|
|
1285
1289
|
{
|
|
1286
1290
|
query: N,
|
|
1287
1291
|
onQuery: C,
|
|
@@ -1290,48 +1294,48 @@ function fr({
|
|
|
1290
1294
|
emptyLabel: N.trim() ? "Nothing matches" : "No branches",
|
|
1291
1295
|
error: y,
|
|
1292
1296
|
loading: E === null && !y,
|
|
1293
|
-
children: E == null ? void 0 : E.map((
|
|
1297
|
+
children: E == null ? void 0 : E.map((m) => /* @__PURE__ */ s(
|
|
1294
1298
|
"button",
|
|
1295
1299
|
{
|
|
1296
1300
|
type: "button",
|
|
1297
1301
|
role: "menuitem",
|
|
1298
|
-
className: `${e}-option${
|
|
1299
|
-
"aria-current":
|
|
1302
|
+
className: `${e}-option${m.label === n ? ` ${e}-current` : ""}`,
|
|
1303
|
+
"aria-current": m.label === n ? "true" : void 0,
|
|
1300
1304
|
disabled: X,
|
|
1301
1305
|
onClick: () => {
|
|
1302
|
-
if (
|
|
1306
|
+
if (m.label === n) {
|
|
1303
1307
|
h();
|
|
1304
1308
|
return;
|
|
1305
1309
|
}
|
|
1306
|
-
I(!0), q(null),
|
|
1307
|
-
workspaceId:
|
|
1308
|
-
branch:
|
|
1310
|
+
I(!0), q(null), $r({
|
|
1311
|
+
workspaceId: a,
|
|
1312
|
+
branch: m.label,
|
|
1309
1313
|
tree: r,
|
|
1310
1314
|
redirect: location.pathname + location.search + location.hash,
|
|
1311
|
-
previewEntryPath:
|
|
1315
|
+
previewEntryPath: o
|
|
1312
1316
|
}).catch((M) => {
|
|
1313
1317
|
I(!1), q(M instanceof Error ? M.message : "Couldn't switch branch");
|
|
1314
1318
|
});
|
|
1315
1319
|
},
|
|
1316
1320
|
children: [
|
|
1317
|
-
/* @__PURE__ */ t("span", { children:
|
|
1318
|
-
|
|
1321
|
+
/* @__PURE__ */ t("span", { children: m.label }),
|
|
1322
|
+
m.label === c ? /* @__PURE__ */ t("span", { className: `${e}-meta`, children: "default" }) : null
|
|
1319
1323
|
]
|
|
1320
1324
|
},
|
|
1321
|
-
|
|
1325
|
+
m.key
|
|
1322
1326
|
))
|
|
1323
1327
|
}
|
|
1324
1328
|
) : /* @__PURE__ */ t("p", { className: `${e}-note`, children: n }) }),
|
|
1325
1329
|
d
|
|
1326
1330
|
);
|
|
1327
1331
|
}
|
|
1328
|
-
function
|
|
1332
|
+
function Pt({
|
|
1329
1333
|
query: n,
|
|
1330
1334
|
onQuery: r,
|
|
1331
|
-
inputRef:
|
|
1332
|
-
searchClassName:
|
|
1335
|
+
inputRef: a,
|
|
1336
|
+
searchClassName: o,
|
|
1333
1337
|
showFilter: d,
|
|
1334
|
-
empty:
|
|
1338
|
+
empty: f,
|
|
1335
1339
|
emptyLabel: h,
|
|
1336
1340
|
error: u,
|
|
1337
1341
|
loading: p,
|
|
@@ -1341,37 +1345,37 @@ function Lt({
|
|
|
1341
1345
|
d ? /* @__PURE__ */ t("div", { className: `${e}-page-menu-search`, children: /* @__PURE__ */ t(
|
|
1342
1346
|
"input",
|
|
1343
1347
|
{
|
|
1344
|
-
ref:
|
|
1348
|
+
ref: a,
|
|
1345
1349
|
value: n,
|
|
1346
1350
|
onChange: (R) => r(R.target.value),
|
|
1347
1351
|
placeholder: "Search files",
|
|
1348
1352
|
"aria-label": "Search files",
|
|
1349
1353
|
autoComplete: "off",
|
|
1350
1354
|
spellCheck: !1,
|
|
1351
|
-
className:
|
|
1355
|
+
className: o
|
|
1352
1356
|
}
|
|
1353
1357
|
) }) : null,
|
|
1354
1358
|
c ? /* @__PURE__ */ s(U, { children: [
|
|
1355
1359
|
u ? /* @__PURE__ */ t("p", { className: `${e}-note ${e}-note-error`, children: u }) : null,
|
|
1356
1360
|
p ? /* @__PURE__ */ t("p", { className: `${e}-note`, children: "Loading…" }) : null,
|
|
1357
|
-
|
|
1361
|
+
f && !u ? /* @__PURE__ */ t("p", { className: `${e}-note`, children: h }) : null,
|
|
1358
1362
|
c
|
|
1359
1363
|
] }) : null
|
|
1360
1364
|
] });
|
|
1361
1365
|
}
|
|
1362
|
-
function
|
|
1366
|
+
function Tt() {
|
|
1363
1367
|
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" }) });
|
|
1364
1368
|
}
|
|
1365
|
-
function
|
|
1366
|
-
const
|
|
1367
|
-
return
|
|
1369
|
+
function vr(n, r) {
|
|
1370
|
+
const a = r.trim().toLowerCase();
|
|
1371
|
+
return a ? n.filter((o) => o.label.toLowerCase().includes(a)) : [...n];
|
|
1368
1372
|
}
|
|
1369
|
-
async function
|
|
1370
|
-
const r = n.checkout ??
|
|
1373
|
+
async function $r(n) {
|
|
1374
|
+
const r = n.checkout ?? cn, a = n.ticket ?? ln, o = n.assign ?? ((h) => location.assign(h));
|
|
1371
1375
|
await r(n.workspaceId, n.branch);
|
|
1372
1376
|
let d;
|
|
1373
1377
|
try {
|
|
1374
|
-
d = await
|
|
1378
|
+
d = await a(n.workspaceId, {
|
|
1375
1379
|
redirect: n.redirect,
|
|
1376
1380
|
branch: n.branch,
|
|
1377
1381
|
tree: n.tree
|
|
@@ -1380,10 +1384,10 @@ async function xr(n) {
|
|
|
1380
1384
|
const u = h instanceof Error ? h.message : "Couldn't open the branch";
|
|
1381
1385
|
throw new Error(`Checked out ${n.branch}, but the preview didn't update. ${u}`);
|
|
1382
1386
|
}
|
|
1383
|
-
const
|
|
1384
|
-
|
|
1387
|
+
const f = n.previewEntryPath.includes("?") ? "&" : "?";
|
|
1388
|
+
o(`${n.previewEntryPath}${f}ticket=${encodeURIComponent(d.ticket)}`);
|
|
1385
1389
|
}
|
|
1386
|
-
const
|
|
1390
|
+
const kr = `
|
|
1387
1391
|
.${e}-host {
|
|
1388
1392
|
position: absolute;
|
|
1389
1393
|
width: 0;
|
|
@@ -1402,9 +1406,9 @@ html.backmatter-blocks [data-backmatter-block] {
|
|
|
1402
1406
|
outline: 1.5px solid oklch(0.56 0.21 295);
|
|
1403
1407
|
outline-offset: 2px;
|
|
1404
1408
|
}
|
|
1405
|
-
`,
|
|
1409
|
+
`, wr = `
|
|
1406
1410
|
.${e}-root {
|
|
1407
|
-
--preview: ${
|
|
1411
|
+
--preview: ${Bt};
|
|
1408
1412
|
--preview-hover: oklch(0.50 0.20 295);
|
|
1409
1413
|
--preview-deep: oklch(0.48 0.20 295);
|
|
1410
1414
|
--preview-line: oklch(0.66 0.16 295);
|
|
@@ -1422,8 +1426,8 @@ html.backmatter-blocks [data-backmatter-block] {
|
|
|
1422
1426
|
--live: oklch(0.66 0.13 150);
|
|
1423
1427
|
--shadow-live: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 28px -8px rgba(0, 0, 0, 0.18);
|
|
1424
1428
|
--shadow-preview: 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 28px -8px oklch(0.45 0.2 295 / 0.5);
|
|
1425
|
-
--ease-out: ${
|
|
1426
|
-
--ease-in: ${
|
|
1429
|
+
--ease-out: ${pe};
|
|
1430
|
+
--ease-in: ${Ge};
|
|
1427
1431
|
--ox: 28px;
|
|
1428
1432
|
--oy: 20px;
|
|
1429
1433
|
color-scheme: light;
|
|
@@ -1508,11 +1512,11 @@ html.backmatter-blocks [data-backmatter-block] {
|
|
|
1508
1512
|
background: var(--preview);
|
|
1509
1513
|
pointer-events: none;
|
|
1510
1514
|
clip-path: circle(0px at var(--ox) var(--oy));
|
|
1511
|
-
transition: clip-path ${
|
|
1515
|
+
transition: clip-path ${An}ms var(--ease-in);
|
|
1512
1516
|
}
|
|
1513
1517
|
.${e}-root[data-mode="preview"] .${e}-flood {
|
|
1514
1518
|
clip-path: circle(150% at var(--ox) var(--oy));
|
|
1515
|
-
transition: clip-path ${
|
|
1519
|
+
transition: clip-path ${_n}ms var(--ease-out);
|
|
1516
1520
|
}
|
|
1517
1521
|
.${e}-root[data-settled] .${e}-flood { transition: none; }
|
|
1518
1522
|
.${e}-row {
|
|
@@ -2011,20 +2015,20 @@ html.backmatter-blocks [data-backmatter-block] {
|
|
|
2011
2015
|
:host(.${e}-pointing) .${e} * { cursor: pointer !important; }
|
|
2012
2016
|
:host(.${e}-pointing) .${e} button:disabled { cursor: default !important; }
|
|
2013
2017
|
`, Se = () => {
|
|
2014
|
-
},
|
|
2018
|
+
}, yr = {
|
|
2015
2019
|
position: "relative",
|
|
2016
2020
|
height: 96,
|
|
2017
2021
|
overflow: "hidden",
|
|
2018
2022
|
transform: "translateZ(0)",
|
|
2019
2023
|
"--bm-devbar-right": "auto",
|
|
2020
2024
|
"--bm-devbar-left": "12px"
|
|
2021
|
-
},
|
|
2025
|
+
}, Nr = {
|
|
2022
2026
|
locale: "en",
|
|
2023
2027
|
type: "page",
|
|
2024
2028
|
slug: "home",
|
|
2025
2029
|
workspaceId: "ws_sample"
|
|
2026
2030
|
};
|
|
2027
|
-
function
|
|
2031
|
+
function Sr() {
|
|
2028
2032
|
const [n, r] = b(0);
|
|
2029
2033
|
return /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: 40 }, children: [
|
|
2030
2034
|
/* @__PURE__ */ t("style", { children: `
|
|
@@ -2059,18 +2063,18 @@ function yr() {
|
|
|
2059
2063
|
{
|
|
2060
2064
|
type: "button",
|
|
2061
2065
|
className: "ui-kit-devbar-reset",
|
|
2062
|
-
onClick: () => r((
|
|
2066
|
+
onClick: () => r((a) => a + 1),
|
|
2063
2067
|
children: "Reset"
|
|
2064
2068
|
}
|
|
2065
2069
|
),
|
|
2066
|
-
/* @__PURE__ */ t(
|
|
2067
|
-
/* @__PURE__ */ t(
|
|
2068
|
-
/* @__PURE__ */ t(
|
|
2069
|
-
/* @__PURE__ */ t(
|
|
2070
|
-
/* @__PURE__ */ t(
|
|
2071
|
-
/* @__PURE__ */ t(
|
|
2070
|
+
/* @__PURE__ */ t(V, { play: n, heading: "Preview", siteMode: "preview" }),
|
|
2071
|
+
/* @__PURE__ */ t(V, { play: n, heading: "Live", siteMode: "live" }),
|
|
2072
|
+
/* @__PURE__ */ t(V, { play: n, heading: "Branch", siteMode: "preview", branch: "feat/sale", doc: !0 }),
|
|
2073
|
+
/* @__PURE__ */ t(V, { play: n, heading: "Exiting", siteMode: "preview", exiting: !0 }),
|
|
2074
|
+
/* @__PURE__ */ t(V, { play: n, heading: "Agent", siteMode: "preview", doc: !0, chatOpen: !0 }),
|
|
2075
|
+
/* @__PURE__ */ t(V, { play: n, heading: "Publish", siteMode: "live", doc: !0, changeCount: 3 }),
|
|
2072
2076
|
/* @__PURE__ */ t(
|
|
2073
|
-
|
|
2077
|
+
V,
|
|
2074
2078
|
{
|
|
2075
2079
|
play: n,
|
|
2076
2080
|
heading: "Changes",
|
|
@@ -2081,7 +2085,7 @@ function yr() {
|
|
|
2081
2085
|
}
|
|
2082
2086
|
),
|
|
2083
2087
|
/* @__PURE__ */ t(
|
|
2084
|
-
|
|
2088
|
+
V,
|
|
2085
2089
|
{
|
|
2086
2090
|
play: n,
|
|
2087
2091
|
heading: "Editing",
|
|
@@ -2091,7 +2095,7 @@ function yr() {
|
|
|
2091
2095
|
}
|
|
2092
2096
|
),
|
|
2093
2097
|
/* @__PURE__ */ t(
|
|
2094
|
-
|
|
2098
|
+
V,
|
|
2095
2099
|
{
|
|
2096
2100
|
play: n,
|
|
2097
2101
|
heading: "Publishing",
|
|
@@ -2109,7 +2113,7 @@ function yr() {
|
|
|
2109
2113
|
}
|
|
2110
2114
|
),
|
|
2111
2115
|
/* @__PURE__ */ t(
|
|
2112
|
-
|
|
2116
|
+
V,
|
|
2113
2117
|
{
|
|
2114
2118
|
play: n,
|
|
2115
2119
|
heading: "Published",
|
|
@@ -2120,13 +2124,13 @@ function yr() {
|
|
|
2120
2124
|
)
|
|
2121
2125
|
] });
|
|
2122
2126
|
}
|
|
2123
|
-
function
|
|
2127
|
+
function V({
|
|
2124
2128
|
play: n,
|
|
2125
2129
|
heading: r,
|
|
2126
|
-
siteMode:
|
|
2127
|
-
branch:
|
|
2130
|
+
siteMode: a,
|
|
2131
|
+
branch: o,
|
|
2128
2132
|
exiting: d = !1,
|
|
2129
|
-
doc:
|
|
2133
|
+
doc: f = !1,
|
|
2130
2134
|
chatOpen: h = !1,
|
|
2131
2135
|
changeCount: u = 0,
|
|
2132
2136
|
lineDiff: p,
|
|
@@ -2134,13 +2138,13 @@ function K({
|
|
|
2134
2138
|
}) {
|
|
2135
2139
|
return /* @__PURE__ */ s("section", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
2136
2140
|
/* @__PURE__ */ t("h2", { className: "ui-kit-devbar-label", children: r }),
|
|
2137
|
-
/* @__PURE__ */ t("div", { className: "ui-kit-devbar-stage", style:
|
|
2138
|
-
|
|
2141
|
+
/* @__PURE__ */ t("div", { className: "ui-kit-devbar-stage", style: yr, children: /* @__PURE__ */ t(
|
|
2142
|
+
tr,
|
|
2139
2143
|
{
|
|
2140
2144
|
label: "page/home",
|
|
2141
|
-
branch:
|
|
2142
|
-
doc:
|
|
2143
|
-
siteMode:
|
|
2145
|
+
branch: o,
|
|
2146
|
+
doc: f ? Nr : null,
|
|
2147
|
+
siteMode: a,
|
|
2144
2148
|
exiting: d,
|
|
2145
2149
|
chatOpen: h,
|
|
2146
2150
|
publishOpen: !1,
|
|
@@ -2157,62 +2161,105 @@ function K({
|
|
|
2157
2161
|
) })
|
|
2158
2162
|
] });
|
|
2159
2163
|
}
|
|
2160
|
-
const
|
|
2161
|
-
function
|
|
2162
|
-
return /* @__PURE__ */ t(O, { title:
|
|
2163
|
-
/* @__PURE__ */ t(
|
|
2164
|
-
/* @__PURE__ */ t(
|
|
2165
|
-
/* @__PURE__ */ t(
|
|
2164
|
+
const wt = P.find((n) => n.slug === "feedback");
|
|
2165
|
+
function Mr() {
|
|
2166
|
+
return /* @__PURE__ */ t(O, { title: wt.title, lede: wt.lede, children: /* @__PURE__ */ s(Ee, { children: [
|
|
2167
|
+
/* @__PURE__ */ t(g, { label: "StatusBar", block: !0, children: /* @__PURE__ */ s(He, { children: [
|
|
2168
|
+
/* @__PURE__ */ t(fe, { children: "main" }),
|
|
2169
|
+
/* @__PURE__ */ t(fe, { children: "2 uncommitted" })
|
|
2166
2170
|
] }) }),
|
|
2167
|
-
/* @__PURE__ */ t(
|
|
2168
|
-
/* @__PURE__ */ t(
|
|
2169
|
-
/* @__PURE__ */ t(
|
|
2171
|
+
/* @__PURE__ */ t(g, { label: "StatusBar", block: !0, children: /* @__PURE__ */ s(He, { children: [
|
|
2172
|
+
/* @__PURE__ */ t(fe, { children: "feat/sale" }),
|
|
2173
|
+
/* @__PURE__ */ t(fe, { children: "Unsaved" })
|
|
2170
2174
|
] }) }),
|
|
2171
|
-
/* @__PURE__ */ t(
|
|
2172
|
-
/* @__PURE__ */ t(
|
|
2173
|
-
/* @__PURE__ */ t(
|
|
2175
|
+
/* @__PURE__ */ t(g, { label: "danger", block: !0, children: /* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(fe, { tone: "danger", children: "Save failed" }) }) }),
|
|
2176
|
+
/* @__PURE__ */ t(g, { label: "success", children: /* @__PURE__ */ t(v, { tone: "success", children: "Success" }) }),
|
|
2177
|
+
/* @__PURE__ */ t(g, { label: "danger", children: /* @__PURE__ */ t(v, { tone: "danger", children: "Danger" }) })
|
|
2174
2178
|
] }) });
|
|
2175
2179
|
}
|
|
2176
|
-
const
|
|
2177
|
-
function
|
|
2180
|
+
const yt = P.find((n) => n.slug === "fields");
|
|
2181
|
+
function Fe({
|
|
2182
|
+
label: n,
|
|
2183
|
+
initial: r,
|
|
2184
|
+
readOnly: a = !1
|
|
2185
|
+
}) {
|
|
2186
|
+
const [o, d] = b(r);
|
|
2187
|
+
return /* @__PURE__ */ t(ue, { label: n, children: /* @__PURE__ */ t(
|
|
2188
|
+
un,
|
|
2189
|
+
{
|
|
2190
|
+
name: n,
|
|
2191
|
+
field: { kind: "number", min: 1, max: 8, step: 1 },
|
|
2192
|
+
value: o,
|
|
2193
|
+
models: [],
|
|
2194
|
+
objects: [],
|
|
2195
|
+
ancestorObjectNames: [],
|
|
2196
|
+
readOnly: a,
|
|
2197
|
+
onChange: d
|
|
2198
|
+
}
|
|
2199
|
+
) });
|
|
2200
|
+
}
|
|
2201
|
+
function Er() {
|
|
2202
|
+
const [n, r] = b(null);
|
|
2203
|
+
return /* @__PURE__ */ t(ue, { label: "Sales contact", children: /* @__PURE__ */ t(
|
|
2204
|
+
It,
|
|
2205
|
+
{
|
|
2206
|
+
searchable: !0,
|
|
2207
|
+
chip: !0,
|
|
2208
|
+
clearable: !0,
|
|
2209
|
+
placeholder: "Select a value",
|
|
2210
|
+
"aria-label": "Sales contact",
|
|
2211
|
+
value: n,
|
|
2212
|
+
onValueChange: r,
|
|
2213
|
+
options: [
|
|
2214
|
+
{ value: "jonah", label: "Jonah Wren" },
|
|
2215
|
+
{ value: "mae", label: "Mae Holt" }
|
|
2216
|
+
]
|
|
2217
|
+
}
|
|
2218
|
+
) });
|
|
2219
|
+
}
|
|
2220
|
+
function Cr() {
|
|
2178
2221
|
const [n, r] = b("en");
|
|
2179
|
-
return /* @__PURE__ */ t(O, { title:
|
|
2180
|
-
/* @__PURE__ */ t(
|
|
2181
|
-
/* @__PURE__ */ t(
|
|
2182
|
-
/* @__PURE__ */ t(
|
|
2183
|
-
|
|
2222
|
+
return /* @__PURE__ */ t(O, { title: yt.title, lede: yt.lede, children: /* @__PURE__ */ s(Ee, { children: [
|
|
2223
|
+
/* @__PURE__ */ t(g, { label: "Input", block: !0, children: /* @__PURE__ */ t(ue, { label: "Text", hint: "Shown under the field.", children: /* @__PURE__ */ t(st, { defaultValue: "Ada Lovelace", autoComplete: "off", spellCheck: !1 }) }) }),
|
|
2224
|
+
/* @__PURE__ */ t(g, { label: "disabled", block: !0, children: /* @__PURE__ */ t(ue, { label: "Disabled", children: /* @__PURE__ */ t(st, { defaultValue: "Locked", disabled: !0 }) }) }),
|
|
2225
|
+
/* @__PURE__ */ t(g, { label: "Relation", block: !0, children: /* @__PURE__ */ t(Er, {}) }),
|
|
2226
|
+
/* @__PURE__ */ t(g, { label: "Select", block: !0, children: /* @__PURE__ */ t(ue, { label: "Select", children: /* @__PURE__ */ t(
|
|
2227
|
+
It,
|
|
2184
2228
|
{
|
|
2185
2229
|
"aria-label": "Locale",
|
|
2186
2230
|
value: n,
|
|
2187
|
-
onValueChange: (
|
|
2231
|
+
onValueChange: (a) => r(a ?? "en"),
|
|
2188
2232
|
options: [
|
|
2189
2233
|
{ value: "en", label: "English (en)" },
|
|
2190
2234
|
{ value: "da", label: "Dansk (da)" }
|
|
2191
2235
|
]
|
|
2192
2236
|
}
|
|
2193
2237
|
) }) }),
|
|
2194
|
-
/* @__PURE__ */ t(
|
|
2238
|
+
/* @__PURE__ */ t(g, { label: "Slider", block: !0, children: /* @__PURE__ */ t(Fe, { label: "Beds", initial: 4 }) }),
|
|
2239
|
+
/* @__PURE__ */ t(g, { label: "Slider empty", block: !0, children: /* @__PURE__ */ t(Fe, { label: "Baths", initial: void 0 }) }),
|
|
2240
|
+
/* @__PURE__ */ t(g, { label: "Slider locked", block: !0, children: /* @__PURE__ */ t(Fe, { label: "Limit", initial: 8, readOnly: !0 }) }),
|
|
2241
|
+
/* @__PURE__ */ t(g, { label: "Textarea", block: !0, children: /* @__PURE__ */ t(ue, { label: "Body", children: /* @__PURE__ */ t(dn, { mono: !0, rows: 4, defaultValue: `---
|
|
2195
2242
|
title: Hello
|
|
2196
2243
|
---
|
|
2197
2244
|
|
|
2198
2245
|
Paragraph.` }) }) })
|
|
2199
2246
|
] }) });
|
|
2200
2247
|
}
|
|
2201
|
-
const
|
|
2202
|
-
function
|
|
2203
|
-
return /* @__PURE__ */ t(O, { title:
|
|
2204
|
-
/* @__PURE__ */ t(
|
|
2205
|
-
/* @__PURE__ */ t(
|
|
2248
|
+
const Nt = P.find((n) => n.slug === "lists");
|
|
2249
|
+
function zr() {
|
|
2250
|
+
return /* @__PURE__ */ t(O, { title: Nt.title, lede: Nt.lede, children: /* @__PURE__ */ t(g, { label: "List", block: !0, children: /* @__PURE__ */ s(Nn, { children: [
|
|
2251
|
+
/* @__PURE__ */ t(lt, { to: "/__ui/lists", title: "hello", meta: "en" }),
|
|
2252
|
+
/* @__PURE__ */ t(lt, { to: "/__ui/lists", title: "about", meta: "da" })
|
|
2206
2253
|
] }) }) });
|
|
2207
2254
|
}
|
|
2208
|
-
const
|
|
2209
|
-
function
|
|
2255
|
+
const St = P.find((n) => n.slug === "overlays");
|
|
2256
|
+
function Rr() {
|
|
2210
2257
|
const [n, r] = b(!1);
|
|
2211
|
-
return /* @__PURE__ */ t(
|
|
2212
|
-
/* @__PURE__ */ s(
|
|
2213
|
-
/* @__PURE__ */ t(
|
|
2258
|
+
return /* @__PURE__ */ t(hn, { children: /* @__PURE__ */ t(O, { title: St.title, lede: St.lede, children: /* @__PURE__ */ s(Ee, { children: [
|
|
2259
|
+
/* @__PURE__ */ s(g, { label: "ConfirmDialog", children: [
|
|
2260
|
+
/* @__PURE__ */ t(he, { onClick: () => r(!0), children: "Open dialog" }),
|
|
2214
2261
|
/* @__PURE__ */ t(
|
|
2215
|
-
|
|
2262
|
+
pn,
|
|
2216
2263
|
{
|
|
2217
2264
|
open: n,
|
|
2218
2265
|
onOpenChange: r,
|
|
@@ -2224,43 +2271,43 @@ function Er() {
|
|
|
2224
2271
|
}
|
|
2225
2272
|
)
|
|
2226
2273
|
] }),
|
|
2227
|
-
/* @__PURE__ */ t(
|
|
2274
|
+
/* @__PURE__ */ t(g, { label: "Tooltip", children: /* @__PURE__ */ t(gn, { label: "Sample tooltip", children: /* @__PURE__ */ t(he, { variant: "secondary", children: "Hover" }) }) })
|
|
2228
2275
|
] }) }) });
|
|
2229
2276
|
}
|
|
2230
|
-
const
|
|
2231
|
-
function
|
|
2232
|
-
return /* @__PURE__ */ s(O, { title:
|
|
2233
|
-
/* @__PURE__ */ t(
|
|
2234
|
-
|
|
2277
|
+
const Mt = P.find((n) => n.slug === "sections");
|
|
2278
|
+
function Ir() {
|
|
2279
|
+
return /* @__PURE__ */ s(O, { title: Mt.title, lede: Mt.lede, children: [
|
|
2280
|
+
/* @__PURE__ */ t(g, { label: "PageHeader", block: !0, children: /* @__PURE__ */ t(
|
|
2281
|
+
mn,
|
|
2235
2282
|
{
|
|
2236
|
-
kicker: /* @__PURE__ */ t(
|
|
2283
|
+
kicker: /* @__PURE__ */ t(fn, { to: "/__ui/sections", children: "Sections" }),
|
|
2237
2284
|
title: "Documents",
|
|
2238
2285
|
description: "Sample page header with action.",
|
|
2239
|
-
action: /* @__PURE__ */ t(
|
|
2286
|
+
action: /* @__PURE__ */ t(he, { children: "New" })
|
|
2240
2287
|
}
|
|
2241
2288
|
) }),
|
|
2242
|
-
/* @__PURE__ */ t(
|
|
2289
|
+
/* @__PURE__ */ t(g, { label: "Panel", block: !0, children: /* @__PURE__ */ t(bn, { children: /* @__PURE__ */ s(xn, { children: [
|
|
2243
2290
|
/* @__PURE__ */ t(v, { children: "First line" }),
|
|
2244
2291
|
/* @__PURE__ */ t(v, { children: "Second line" })
|
|
2245
2292
|
] }) }) })
|
|
2246
2293
|
] });
|
|
2247
2294
|
}
|
|
2248
|
-
const
|
|
2249
|
-
function
|
|
2250
|
-
return /* @__PURE__ */ s(O, { title:
|
|
2251
|
-
/* @__PURE__ */ t(
|
|
2252
|
-
/* @__PURE__ */ t(ee, { label: "xs", bar:
|
|
2253
|
-
/* @__PURE__ */ t(ee, { label: "sm", bar:
|
|
2254
|
-
/* @__PURE__ */ t(ee, { label: "md", bar:
|
|
2255
|
-
/* @__PURE__ */ t(ee, { label: "lg", bar:
|
|
2256
|
-
/* @__PURE__ */ t(ee, { label: "xl", bar:
|
|
2257
|
-
/* @__PURE__ */ t(ee, { label: "xxl", bar:
|
|
2295
|
+
const Et = P.find((n) => n.slug === "surfaces");
|
|
2296
|
+
function _r() {
|
|
2297
|
+
return /* @__PURE__ */ s(O, { title: Et.title, lede: Et.lede, children: [
|
|
2298
|
+
/* @__PURE__ */ t(g, { label: "Space", children: /* @__PURE__ */ s("div", { className: "x78zum5 x1a02dak xuk3077 x1n5939r", children: [
|
|
2299
|
+
/* @__PURE__ */ t(ee, { label: "xs", bar: K.xs }),
|
|
2300
|
+
/* @__PURE__ */ t(ee, { label: "sm", bar: K.sm }),
|
|
2301
|
+
/* @__PURE__ */ t(ee, { label: "md", bar: K.md }),
|
|
2302
|
+
/* @__PURE__ */ t(ee, { label: "lg", bar: K.lg }),
|
|
2303
|
+
/* @__PURE__ */ t(ee, { label: "xl", bar: K.xl }),
|
|
2304
|
+
/* @__PURE__ */ t(ee, { label: "xxl", bar: K.xxl })
|
|
2258
2305
|
] }) }),
|
|
2259
|
-
/* @__PURE__ */ t(
|
|
2260
|
-
/* @__PURE__ */ t(ee, { label: "sm", box:
|
|
2261
|
-
/* @__PURE__ */ t(ee, { label: "md", box:
|
|
2306
|
+
/* @__PURE__ */ t(g, { label: "Radius", children: /* @__PURE__ */ s("div", { className: "x78zum5 x1a02dak xuk3077 x1n5939r", children: [
|
|
2307
|
+
/* @__PURE__ */ t(ee, { label: "sm", box: K.radiusSm }),
|
|
2308
|
+
/* @__PURE__ */ t(ee, { label: "md", box: K.radiusMd })
|
|
2262
2309
|
] }) }),
|
|
2263
|
-
/* @__PURE__ */ t(
|
|
2310
|
+
/* @__PURE__ */ t(g, { label: "Backgrounds", children: /* @__PURE__ */ s("div", { className: "xk7greg x13oidi x86kjsi", children: [
|
|
2264
2311
|
/* @__PURE__ */ t(v, { size: "xs", tone: "muted", mono: !0, children: "bgApp" }),
|
|
2265
2312
|
/* @__PURE__ */ s("div", { className: "xk7greg x13oidi x1jtkcfc", children: [
|
|
2266
2313
|
/* @__PURE__ */ t(v, { size: "xs", tone: "muted", mono: !0, children: "bgSidebar" }),
|
|
@@ -2275,14 +2322,14 @@ function zr() {
|
|
|
2275
2322
|
function ee({
|
|
2276
2323
|
label: n,
|
|
2277
2324
|
bar: r,
|
|
2278
|
-
box:
|
|
2325
|
+
box: a
|
|
2279
2326
|
}) {
|
|
2280
2327
|
return /* @__PURE__ */ s("div", { className: "x78zum5 xdt5ytf x1cy8zhl x3smv4v", children: [
|
|
2281
|
-
/* @__PURE__ */ t("div", { ...
|
|
2328
|
+
/* @__PURE__ */ t("div", { ...Rt(r ? K.bar : K.radiusBox, r, a) }),
|
|
2282
2329
|
/* @__PURE__ */ t(v, { size: "xs", tone: "muted", mono: !0, children: n })
|
|
2283
2330
|
] });
|
|
2284
2331
|
}
|
|
2285
|
-
const
|
|
2332
|
+
const K = {
|
|
2286
2333
|
bar: {
|
|
2287
2334
|
kZKoxP: "xlup9mm",
|
|
2288
2335
|
kWkggS: "xrb6rkd",
|
|
@@ -2330,41 +2377,41 @@ const V = {
|
|
|
2330
2377
|
kaIpWk: "x13oidi",
|
|
2331
2378
|
$$css: !0
|
|
2332
2379
|
}
|
|
2333
|
-
},
|
|
2334
|
-
function
|
|
2335
|
-
return /* @__PURE__ */ s(O, { title:
|
|
2336
|
-
/* @__PURE__ */ t(
|
|
2337
|
-
/* @__PURE__ */ t(
|
|
2338
|
-
/* @__PURE__ */ t(
|
|
2339
|
-
/* @__PURE__ */ t(
|
|
2340
|
-
/* @__PURE__ */ t(
|
|
2341
|
-
/* @__PURE__ */ t(
|
|
2342
|
-
/* @__PURE__ */ t(
|
|
2343
|
-
/* @__PURE__ */ t(
|
|
2344
|
-
/* @__PURE__ */ t(
|
|
2345
|
-
/* @__PURE__ */ t(
|
|
2380
|
+
}, Ct = P.find((n) => n.slug === "type");
|
|
2381
|
+
function Ar() {
|
|
2382
|
+
return /* @__PURE__ */ s(O, { title: Ct.title, lede: Ct.lede, children: [
|
|
2383
|
+
/* @__PURE__ */ t(g, { label: "display", children: /* @__PURE__ */ t(v, { size: "display", weight: "semibold", children: "Display" }) }),
|
|
2384
|
+
/* @__PURE__ */ t(g, { label: "xl", children: /* @__PURE__ */ t(v, { size: "xl", weight: "semibold", children: "Title" }) }),
|
|
2385
|
+
/* @__PURE__ */ t(g, { label: "lg", children: /* @__PURE__ */ t(v, { size: "lg", weight: "medium", children: "Heading" }) }),
|
|
2386
|
+
/* @__PURE__ */ t(g, { label: "md", children: /* @__PURE__ */ t(v, { children: "Body" }) }),
|
|
2387
|
+
/* @__PURE__ */ t(g, { label: "sm", children: /* @__PURE__ */ t(v, { size: "sm", children: "Small" }) }),
|
|
2388
|
+
/* @__PURE__ */ t(g, { label: "xs", children: /* @__PURE__ */ t(v, { size: "xs", weight: "semibold", children: "Overline" }) }),
|
|
2389
|
+
/* @__PURE__ */ t(g, { label: "muted", children: /* @__PURE__ */ t(v, { tone: "muted", size: "sm", children: "Muted" }) }),
|
|
2390
|
+
/* @__PURE__ */ t(g, { label: "danger", children: /* @__PURE__ */ t(v, { tone: "danger", children: "Danger" }) }),
|
|
2391
|
+
/* @__PURE__ */ t(g, { label: "success", children: /* @__PURE__ */ t(v, { tone: "success", children: "Success" }) }),
|
|
2392
|
+
/* @__PURE__ */ t(g, { label: "mono", children: /* @__PURE__ */ t(v, { mono: !0, size: "sm", children: "content/blog/hello.mdx" }) })
|
|
2346
2393
|
] });
|
|
2347
2394
|
}
|
|
2348
|
-
const
|
|
2349
|
-
colors:
|
|
2350
|
-
type:
|
|
2351
|
-
surfaces:
|
|
2352
|
-
sections:
|
|
2353
|
-
buttons:
|
|
2354
|
-
fields:
|
|
2355
|
-
lists:
|
|
2356
|
-
overlays:
|
|
2357
|
-
feedback:
|
|
2358
|
-
devbar:
|
|
2395
|
+
const Lr = {
|
|
2396
|
+
colors: zn,
|
|
2397
|
+
type: Ar,
|
|
2398
|
+
surfaces: _r,
|
|
2399
|
+
sections: Ir,
|
|
2400
|
+
buttons: Cn,
|
|
2401
|
+
fields: Cr,
|
|
2402
|
+
lists: zr,
|
|
2403
|
+
overlays: Rr,
|
|
2404
|
+
feedback: Mr,
|
|
2405
|
+
devbar: Br
|
|
2359
2406
|
};
|
|
2360
|
-
function
|
|
2407
|
+
function Br() {
|
|
2361
2408
|
const n = P.find((r) => r.slug === "devbar");
|
|
2362
|
-
return /* @__PURE__ */ t(O, { title: n.title, lede: n.lede, children: /* @__PURE__ */ t(
|
|
2409
|
+
return /* @__PURE__ */ t(O, { title: n.title, lede: n.lede, children: /* @__PURE__ */ t(Sr, {}) });
|
|
2363
2410
|
}
|
|
2364
|
-
const
|
|
2411
|
+
const zt = P.map((n) => ({
|
|
2365
2412
|
...n,
|
|
2366
|
-
Page:
|
|
2367
|
-
})),
|
|
2413
|
+
Page: Lr[n.slug]
|
|
2414
|
+
})), Pr = [{
|
|
2368
2415
|
value: "system",
|
|
2369
2416
|
label: "System"
|
|
2370
2417
|
}, {
|
|
@@ -2373,26 +2420,26 @@ const Ct = P.map((n) => ({
|
|
|
2373
2420
|
}, {
|
|
2374
2421
|
value: "dark",
|
|
2375
2422
|
label: "Dark"
|
|
2376
|
-
}],
|
|
2377
|
-
function
|
|
2423
|
+
}], Tr = ["Foundations", "Components", "Host"];
|
|
2424
|
+
function Fr() {
|
|
2378
2425
|
const {
|
|
2379
2426
|
pathname: n
|
|
2380
|
-
} =
|
|
2427
|
+
} = vn(), r = n.replace(/\/$/, "") || "/", a = r === "/__ui" ? void 0 : r.slice(6), o = Mn(a), {
|
|
2381
2428
|
preference: d,
|
|
2382
|
-
setPreference:
|
|
2383
|
-
} =
|
|
2384
|
-
if (r !== `/__ui/${
|
|
2385
|
-
return /* @__PURE__ */ t(
|
|
2386
|
-
const u =
|
|
2429
|
+
setPreference: f
|
|
2430
|
+
} = $n();
|
|
2431
|
+
if (r !== `/__ui/${o}`)
|
|
2432
|
+
return /* @__PURE__ */ t(kn, { to: `/__ui/${o}`, replace: !0 });
|
|
2433
|
+
const u = zt.find((p) => p.slug === o).Page;
|
|
2387
2434
|
return /* @__PURE__ */ s("div", { className: "x78zum5 xdt5ytf x1ov3xa9 x86kjsi xqjzbou xnezs1t", children: [
|
|
2388
2435
|
/* @__PURE__ */ s("header", { className: "x78zum5 x6s0dn4 x1qughib x11cgr9k x173sf5p x15jjofa xso031l x1q0q8m5 x4b2zrn x1hb2obb", children: [
|
|
2389
2436
|
/* @__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:
|
|
2437
|
+
/* @__PURE__ */ t("div", { className: "x78zum5 x1a02dak x3smv4v", role: "group", "aria-label": "Theme", children: Pr.map((p) => /* @__PURE__ */ t(he, { variant: d === p.value ? "primary" : "secondary", "aria-pressed": d === p.value, onClick: () => f(p.value), children: p.label }, p.value)) })
|
|
2391
2438
|
] }),
|
|
2392
2439
|
/* @__PURE__ */ s("div", { className: "x78zum5 x98rzlu x2lwn1j", children: [
|
|
2393
|
-
/* @__PURE__ */ t("nav", { className: "x16grhtn x2lah0s x1odjw0f xk7greg x1jtkcfc xs1s249 x32b0ac xpozbvl", "aria-label": "UI kit", children:
|
|
2440
|
+
/* @__PURE__ */ t("nav", { className: "x16grhtn x2lah0s x1odjw0f xk7greg x1jtkcfc xs1s249 x32b0ac xpozbvl", "aria-label": "UI kit", children: Tr.map((p) => /* @__PURE__ */ s("div", { className: "x78zum5 xdt5ytf xpw8yq9 x31bu4j", children: [
|
|
2394
2441
|
/* @__PURE__ */ t(v, { as: "p", size: "xs", tone: "muted", weight: "semibold", children: p }),
|
|
2395
|
-
|
|
2442
|
+
zt.filter((c) => c.group === p).map((c) => /* @__PURE__ */ t(wn, { to: `/__ui/${c.slug}`, className: "x1lliihq x1heor9g x1hl2dhg", children: ({
|
|
2396
2443
|
isActive: R
|
|
2397
2444
|
}) => /* @__PURE__ */ t("span", { ...{
|
|
2398
2445
|
0: {
|
|
@@ -2408,5 +2455,5 @@ function qr() {
|
|
|
2408
2455
|
] });
|
|
2409
2456
|
}
|
|
2410
2457
|
export {
|
|
2411
|
-
|
|
2458
|
+
Fr as UiKitApp
|
|
2412
2459
|
};
|