@fluid-app/fluid-cli-theme-dev 0.1.858 → 0.1.860
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/dist-cli-preview/.vite/manifest.json +57 -57
- package/dist/dist-cli-preview/account-screens.js +1 -1
- package/dist/dist-cli-preview/chunks/{MediaScreen-CeQr5sOj.js → MediaScreen-DM1gG68G.js} +1 -1
- package/dist/dist-cli-preview/chunks/{MemberShareablesScreen-CSIzbzek.js → MemberShareablesScreen-D02mrr9M.js} +1 -1
- package/dist/dist-cli-preview/chunks/{MySiteScreen-DXGS0LFN.js → MySiteScreen-CdV3cRZT.js} +127 -125
- package/dist/dist-cli-preview/chunks/{PlaylistsScreen-A2eZN-uN.js → PlaylistsScreen-Cw3sdsiQ.js} +1 -1
- package/dist/dist-cli-preview/chunks/{ProfileScreen-CalLs-9U.js → ProfileScreen-Dn7WUTa3.js} +1 -1
- package/dist/dist-cli-preview/chunks/{SubscriptionsScreen-nAngLwhT.js → SubscriptionsScreen-C1OJ5fBz.js} +1 -1
- package/dist/dist-cli-preview/chunks/{ar-DmMh3sDO.js → ar-Dsg1nlvm.js} +60 -48
- package/dist/dist-cli-preview/chunks/{bg-CW2RoA_M.js → bg-5_ZPyCkS.js} +22 -10
- package/dist/dist-cli-preview/chunks/{bn-BbLEUKB5.js → bn-Br0DolCb.js} +63 -51
- package/dist/dist-cli-preview/chunks/{cli-preview-C9cCdhnf.js → cli-preview-D4nKNM-o.js} +6 -6
- package/dist/dist-cli-preview/chunks/{create-card-entry-container-BSCK5Gif.js → create-card-entry-container-Bv73GFDg.js} +4879 -4814
- package/dist/dist-cli-preview/chunks/{cs-CeuOJBl7.js → cs-BO-xeA9y.js} +88 -76
- package/dist/dist-cli-preview/chunks/{da-CFtzdZOV.js → da-BDNaKVcI.js} +28 -16
- package/dist/dist-cli-preview/chunks/{de-Bbf4wRTp.js → de-BIwkMp24.js} +84 -72
- package/dist/dist-cli-preview/chunks/{el-BEfD3YSV.js → el-CGpbhHMn.js} +55 -43
- package/dist/dist-cli-preview/chunks/{es-DQmjIO_8.js → es-BSmpZVUe.js} +107 -95
- package/dist/dist-cli-preview/chunks/{fi-Dg9N58V4.js → fi-DAERZGOP.js} +87 -75
- package/dist/dist-cli-preview/chunks/{fr-CdTnm4rX.js → fr-BFboVnJW.js} +141 -129
- package/dist/dist-cli-preview/chunks/{he-DAQIOwQk.js → he-BTi-utvY.js} +61 -49
- package/dist/dist-cli-preview/chunks/{hi-BmqNxoxp.js → hi-A2U67MYM.js} +63 -51
- package/dist/dist-cli-preview/chunks/{hr-uDkMlYOS.js → hr-D0tEByNM.js} +88 -76
- package/dist/dist-cli-preview/chunks/{hu-BkmTf8w5.js → hu-B2dys-Gd.js} +61 -49
- package/dist/dist-cli-preview/chunks/{id-CKUjZdVT.js → id-D_7a9i2u.js} +19 -7
- package/dist/dist-cli-preview/chunks/{it-DyauvCpK.js → it-i5jCU4FX.js} +105 -93
- package/dist/dist-cli-preview/chunks/{ja-DxNYuTgz.js → ja-BRKq7fT7.js} +139 -127
- package/dist/dist-cli-preview/chunks/{ko-CPjVQJdD.js → ko-BTpMkZIl.js} +101 -89
- package/dist/dist-cli-preview/chunks/{mount-account-screen-CcYNiCEy.js → mount-account-screen-DQVjc-v2.js} +2 -2
- package/dist/dist-cli-preview/chunks/{ms-CAPLdbVE.js → ms-CHoiDJip.js} +21 -9
- package/dist/dist-cli-preview/chunks/{navigate-account-screen-CzhKxkUa.js → navigate-account-screen-CXY4Ti77.js} +1 -1
- package/dist/dist-cli-preview/chunks/{nl-CtW2aiHA.js → nl-Br7dpLh3.js} +132 -120
- package/dist/dist-cli-preview/chunks/{no-Bbw05v8T.js → no-D3ubIvrB.js} +58 -46
- package/dist/dist-cli-preview/chunks/{pl-byjoUzGK.js → pl-DNiTOwyr.js} +23 -11
- package/dist/dist-cli-preview/chunks/{pt-CB-GrVOq.js → pt-Ae799qrM.js} +124 -112
- package/dist/dist-cli-preview/chunks/{ro-DVupGVGy.js → ro-D6Rc_UTZ.js} +58 -46
- package/dist/dist-cli-preview/chunks/{ru-BvxSS6eO.js → ru-xhRWQMd8.js} +55 -43
- package/dist/dist-cli-preview/chunks/{sk-BIe1Zfzh.js → sk-BB0Mc-8k.js} +56 -44
- package/dist/dist-cli-preview/chunks/{sv-CYPVS8Ef.js → sv-BSOc9yXD.js} +88 -76
- package/dist/dist-cli-preview/chunks/{th-BozqSU1j.js → th-BhXCcPRG.js} +29 -17
- package/dist/dist-cli-preview/chunks/{tl-D8y_2gg3.js → tl-412jkta7.js} +85 -73
- package/dist/dist-cli-preview/chunks/{tr-CsoMjmFB.js → tr-AfYDza_U.js} +344 -332
- package/dist/dist-cli-preview/chunks/{uk-zvhdQcTY.js → uk-F7mjkkOe.js} +55 -43
- package/dist/dist-cli-preview/chunks/{vi-B3ednClC.js → vi-DURl9HEv.js} +311 -299
- package/dist/dist-cli-preview/chunks/{zh_CN-CR84H0xg.js → zh_CN-BzrMq5mP.js} +118 -106
- package/dist/dist-cli-preview/chunks/{zh_TW-D0UiDpu8.js → zh_TW-BY4ttR8i.js} +118 -106
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { c as ae, aj as Ie, l as i, j as t, a4 as Be, $ as
|
|
2
|
-
import { C as B, h as ne, i as
|
|
1
|
+
import { c as ae, aj as Ie, l as i, j as t, a4 as Be, $ as g, L as Re, X as oe, a7 as de, B as Oe, _ as Ue, a3 as ce, bG as Ke, E as $e, a1 as He, ak as Ve, z as qe } from "./account-screen-runtime-B9i-9CLs.js";
|
|
2
|
+
import { C as B, h as ne, i as ge, a as W, j as Ge, k as Ye, l as We, m as Qe, n as Xe, o as Ze, c as be, d as Y, f as ye, D as _e, e as ve, S as je, v as Ne, s as ke, K as Ce, P as Se, u as we, b as Le, G as Ee, p as Je, q as et, r as tt, t as De, w as st, x as at, U as nt, L as rt, M as it } from "./sortable.esm-CibJ9yWj.js";
|
|
3
3
|
import { c as lt, a as ot } from "./client.gen-CG8-mDod.js";
|
|
4
4
|
import { S as E, I as ue, B as dt, a as ct, b as me, d as ut, c as he, e as mt } from "./sheet-haptics-context-COwdGTra.js";
|
|
5
5
|
import { a as ht, c as pt, b as ft, u as xt } from "./translation-api-context-factory-BEO-iYLb.js";
|
|
6
|
-
import { U as
|
|
7
|
-
import { C as
|
|
6
|
+
import { U as gt } from "./users-BwLXeQJs.js";
|
|
7
|
+
import { C as bt } from "./copy-CwTnpnmt.js";
|
|
8
8
|
import { A as re } from "./arrow-left-Ds5JkG8w.js";
|
|
9
9
|
import { C as yt, o as w, n as _, s as c, d as ee, f as _t } from "./schemas-CZvv_5iX.js";
|
|
10
10
|
import { P as pe, R as te, e as se, T as ie, f as vt } from "./ResponsiveDialog-CRjYPJDy.js";
|
|
11
|
-
import { u as
|
|
11
|
+
import { u as Pe } from "./sidebar-SmEnwFoV.js";
|
|
12
12
|
/**
|
|
13
13
|
* @license lucide-react v0.575.0 - ISC
|
|
14
14
|
*
|
|
@@ -54,7 +54,7 @@ const St = [
|
|
|
54
54
|
["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
|
|
55
55
|
["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
|
|
56
56
|
["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }]
|
|
57
|
-
],
|
|
57
|
+
], Me = ae("palette", St);
|
|
58
58
|
function wt(e) {
|
|
59
59
|
return e instanceof DOMException && e.name === "AbortError" || e instanceof Error && e.name === "AbortError";
|
|
60
60
|
}
|
|
@@ -103,7 +103,7 @@ const Et = (e) => e.client.get({
|
|
|
103
103
|
responseStyle: "data",
|
|
104
104
|
url: "/api/mysite/themes",
|
|
105
105
|
...e
|
|
106
|
-
}),
|
|
106
|
+
}), Pt = (e) => e.client.put({
|
|
107
107
|
responseStyle: "data",
|
|
108
108
|
url: "/api/mysite/settings",
|
|
109
109
|
...e,
|
|
@@ -111,7 +111,7 @@ const Et = (e) => e.client.get({
|
|
|
111
111
|
"Content-Type": "application/json",
|
|
112
112
|
...e.headers
|
|
113
113
|
}
|
|
114
|
-
}),
|
|
114
|
+
}), Mt = (e) => e.client.get({
|
|
115
115
|
responseStyle: "data",
|
|
116
116
|
url: "/api/mysite/links",
|
|
117
117
|
...e
|
|
@@ -231,7 +231,7 @@ function Kt(e) {
|
|
|
231
231
|
},
|
|
232
232
|
updateSettings: async (s) => {
|
|
233
233
|
await Promise.all([
|
|
234
|
-
s.theme_id !== void 0 ?
|
|
234
|
+
s.theme_id !== void 0 ? Pt({
|
|
235
235
|
client: e,
|
|
236
236
|
body: { settings: { theme_id: s.theme_id } }
|
|
237
237
|
}) : Promise.resolve(),
|
|
@@ -241,7 +241,7 @@ function Kt(e) {
|
|
|
241
241
|
}) : Promise.resolve()
|
|
242
242
|
]);
|
|
243
243
|
},
|
|
244
|
-
listLinks: async () => ((await
|
|
244
|
+
listLinks: async () => ((await Mt({ client: e })).links ?? []).map(q),
|
|
245
245
|
createLink: async (s) => {
|
|
246
246
|
const n = await Ft({
|
|
247
247
|
client: e,
|
|
@@ -538,7 +538,7 @@ function Zt({
|
|
|
538
538
|
}) {
|
|
539
539
|
const { t: n } = D();
|
|
540
540
|
return /* @__PURE__ */ t.jsxs(B, { className: "h-auto gap-0 py-0 shadow-none", children: [
|
|
541
|
-
/* @__PURE__ */ t.jsx(ne, { className: "p-4 pb-3", children: /* @__PURE__ */ t.jsx(
|
|
541
|
+
/* @__PURE__ */ t.jsx(ne, { className: "p-4 pb-3", children: /* @__PURE__ */ t.jsx(ge, { className: "text-sm", children: n("visitor_details") }) }),
|
|
542
542
|
/* @__PURE__ */ t.jsxs(W, { className: "flex px-4 pb-4", children: [
|
|
543
543
|
/* @__PURE__ */ t.jsxs("div", { className: "flex-1", children: [
|
|
544
544
|
/* @__PURE__ */ t.jsxs("div", { className: "mb-2 flex items-center gap-1.5", children: [
|
|
@@ -550,7 +550,7 @@ function Zt({
|
|
|
550
550
|
/* @__PURE__ */ t.jsx(Be, { orientation: "vertical", className: "bg-border mx-4 h-auto" }),
|
|
551
551
|
/* @__PURE__ */ t.jsxs("div", { className: "flex-1", children: [
|
|
552
552
|
/* @__PURE__ */ t.jsxs("div", { className: "mb-2 flex items-center gap-1.5", children: [
|
|
553
|
-
/* @__PURE__ */ t.jsx(
|
|
553
|
+
/* @__PURE__ */ t.jsx(gt, { className: "text-muted-foreground size-3.5" }),
|
|
554
554
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground text-sm", children: n("leads") })
|
|
555
555
|
] }),
|
|
556
556
|
/* @__PURE__ */ t.jsx("p", { className: "text-foreground text-2xl font-bold", children: s.toLocaleString() })
|
|
@@ -564,24 +564,24 @@ function Jt({
|
|
|
564
564
|
onUpdateSlug: n,
|
|
565
565
|
onToast: a
|
|
566
566
|
}) {
|
|
567
|
-
const { t: l } = D(), r = s.lastIndexOf("/"), o = r >= 0 ? s.slice(0, r + 1) : "", d = r >= 0 ? s.slice(r + 1) : s, [u,
|
|
568
|
-
h(d),
|
|
567
|
+
const { t: l } = D(), r = s.lastIndexOf("/"), o = r >= 0 ? s.slice(0, r + 1) : "", d = r >= 0 ? s.slice(r + 1) : s, [u, f] = i.useState(!1), [m, h] = i.useState(d), [y, j] = i.useState(!1), v = i.useCallback(() => {
|
|
568
|
+
h(d), f(!0);
|
|
569
569
|
}, [d]), N = i.useCallback(() => {
|
|
570
|
-
|
|
571
|
-
}, [d]),
|
|
572
|
-
const
|
|
573
|
-
if (!
|
|
570
|
+
f(!1), h(d);
|
|
571
|
+
}, [d]), P = i.useCallback(async () => {
|
|
572
|
+
const x = m.trim();
|
|
573
|
+
if (!x) {
|
|
574
574
|
a?.(l("slug_empty_error"), "error");
|
|
575
575
|
return;
|
|
576
576
|
}
|
|
577
|
-
if (
|
|
578
|
-
|
|
577
|
+
if (x === d) {
|
|
578
|
+
f(!1);
|
|
579
579
|
return;
|
|
580
580
|
}
|
|
581
581
|
if (n) {
|
|
582
582
|
j(!0);
|
|
583
583
|
try {
|
|
584
|
-
await n(
|
|
584
|
+
await n(x), a?.(l("link_updated"), "success"), f(!1);
|
|
585
585
|
} catch {
|
|
586
586
|
a?.(l("link_update_failed"), "error");
|
|
587
587
|
} finally {
|
|
@@ -598,8 +598,8 @@ function Jt({
|
|
|
598
598
|
}, [e, a, l]);
|
|
599
599
|
return /* @__PURE__ */ t.jsxs(B, { className: "h-auto gap-0 py-0 shadow-none", children: [
|
|
600
600
|
/* @__PURE__ */ t.jsxs(ne, { className: "items-center p-4", children: [
|
|
601
|
-
/* @__PURE__ */ t.jsx(
|
|
602
|
-
!u && n && /* @__PURE__ */ t.jsx(Ge, { children: /* @__PURE__ */ t.jsx(
|
|
601
|
+
/* @__PURE__ */ t.jsx(ge, { className: "text-sm", children: l("your_mysite_link") }),
|
|
602
|
+
!u && n && /* @__PURE__ */ t.jsx(Ge, { children: /* @__PURE__ */ t.jsx(g, { variant: "link", size: "sm", onClick: v, children: l("edit_link") }) })
|
|
603
603
|
] }),
|
|
604
604
|
/* @__PURE__ */ t.jsxs(W, { className: "px-4 pb-4", children: [
|
|
605
605
|
/* @__PURE__ */ t.jsxs("div", { className: "text-foreground flex items-center gap-2 rounded-lg border bg-gradient-to-r from-[rgba(72,187,120,0.2)] via-[rgba(236,72,153,0.15)] to-[rgba(251,146,60,0.15)] px-3 py-2.5", children: [
|
|
@@ -610,9 +610,9 @@ function Jt({
|
|
|
610
610
|
{
|
|
611
611
|
type: "text",
|
|
612
612
|
value: m,
|
|
613
|
-
onChange: (
|
|
614
|
-
onKeyDown: (
|
|
615
|
-
|
|
613
|
+
onChange: (x) => h(x.target.value),
|
|
614
|
+
onKeyDown: (x) => {
|
|
615
|
+
x.key === "Enter" && !y && P(), x.key === "Escape" && N();
|
|
616
616
|
},
|
|
617
617
|
className: "border-input text-foreground focus:ring-primary bg-background/60 min-w-0 flex-1 rounded-md border px-2 py-1 text-sm font-medium outline-none focus:ring-1",
|
|
618
618
|
autoFocus: !0
|
|
@@ -620,13 +620,13 @@ function Jt({
|
|
|
620
620
|
)
|
|
621
621
|
] }) : /* @__PURE__ */ t.jsx("span", { className: "min-w-0 flex-1 truncate text-sm", children: s || l("not_configured") }),
|
|
622
622
|
/* @__PURE__ */ t.jsx(
|
|
623
|
-
|
|
623
|
+
g,
|
|
624
624
|
{
|
|
625
625
|
variant: "ghost",
|
|
626
626
|
size: "icon",
|
|
627
627
|
onClick: C,
|
|
628
628
|
disabled: !e,
|
|
629
|
-
children: /* @__PURE__ */ t.jsx(
|
|
629
|
+
children: /* @__PURE__ */ t.jsx(bt, { className: "size-4" })
|
|
630
630
|
}
|
|
631
631
|
)
|
|
632
632
|
] }),
|
|
@@ -641,7 +641,7 @@ function Jt({
|
|
|
641
641
|
},
|
|
642
642
|
children: /* @__PURE__ */ t.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ t.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
643
643
|
/* @__PURE__ */ t.jsx(
|
|
644
|
-
|
|
644
|
+
g,
|
|
645
645
|
{
|
|
646
646
|
variant: "secondary",
|
|
647
647
|
size: "sm",
|
|
@@ -649,7 +649,7 @@ function Jt({
|
|
|
649
649
|
children: l("cancel")
|
|
650
650
|
}
|
|
651
651
|
),
|
|
652
|
-
/* @__PURE__ */ t.jsx(
|
|
652
|
+
/* @__PURE__ */ t.jsx(g, { size: "sm", onClick: P, disabled: y, children: l(y ? "saving" : "save") })
|
|
653
653
|
] }) })
|
|
654
654
|
}
|
|
655
655
|
)
|
|
@@ -667,7 +667,7 @@ function es({
|
|
|
667
667
|
i.useEffect(() => {
|
|
668
668
|
u.current = !0;
|
|
669
669
|
}, [n]);
|
|
670
|
-
const
|
|
670
|
+
const f = () => {
|
|
671
671
|
if (u.current) {
|
|
672
672
|
u.current = !1;
|
|
673
673
|
return;
|
|
@@ -682,7 +682,7 @@ function es({
|
|
|
682
682
|
/* @__PURE__ */ t.jsx("p", { className: "text-foreground text-sm font-semibold", children: s })
|
|
683
683
|
] }),
|
|
684
684
|
/* @__PURE__ */ t.jsx(
|
|
685
|
-
|
|
685
|
+
g,
|
|
686
686
|
{
|
|
687
687
|
className: "col-start-2 row-span-2 row-start-1 cursor-pointer self-center justify-self-end",
|
|
688
688
|
variant: "secondary",
|
|
@@ -718,7 +718,7 @@ function es({
|
|
|
718
718
|
title: r("mysite_preview"),
|
|
719
719
|
tabIndex: -1,
|
|
720
720
|
sandbox: "allow-scripts allow-same-origin",
|
|
721
|
-
onLoad:
|
|
721
|
+
onLoad: f
|
|
722
722
|
},
|
|
723
723
|
n
|
|
724
724
|
),
|
|
@@ -747,7 +747,7 @@ function as({
|
|
|
747
747
|
const { t: r } = D();
|
|
748
748
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
749
749
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
750
|
-
/* @__PURE__ */ t.jsx(
|
|
750
|
+
/* @__PURE__ */ t.jsx(g, { variant: "ghost", size: "icon", onClick: l, children: /* @__PURE__ */ t.jsx(re, { className: "size-4" }) }),
|
|
751
751
|
/* @__PURE__ */ t.jsx("h1", { className: "text-foreground text-xl font-bold", children: r("choose_a_theme") })
|
|
752
752
|
] }),
|
|
753
753
|
e.length === 0 ? /* @__PURE__ */ t.jsx(B, { children: /* @__PURE__ */ t.jsx(W, { className: "py-8 text-center", children: /* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground", children: r("no_themes_available") }) }) }) : /* @__PURE__ */ t.jsx("div", { className: "grid grid-cols-2 gap-4 sm:grid-cols-3", children: e.map((o) => {
|
|
@@ -778,7 +778,7 @@ function as({
|
|
|
778
778
|
{
|
|
779
779
|
className: "text-muted-foreground/50 flex h-full w-full items-center justify-center",
|
|
780
780
|
style: { backgroundColor: ss(o.name) },
|
|
781
|
-
children: /* @__PURE__ */ t.jsx(
|
|
781
|
+
children: /* @__PURE__ */ t.jsx(Me, { className: "size-8" })
|
|
782
782
|
}
|
|
783
783
|
),
|
|
784
784
|
d && /* @__PURE__ */ t.jsx("div", { className: "bg-primary/20 absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ t.jsx("div", { className: "bg-primary text-primary-foreground flex size-8 items-center justify-center rounded-full", children: /* @__PURE__ */ t.jsx(yt, { className: "size-5" }) }) }),
|
|
@@ -905,7 +905,7 @@ function os({
|
|
|
905
905
|
setNodeRef: o,
|
|
906
906
|
transform: d,
|
|
907
907
|
transition: u,
|
|
908
|
-
isDragging:
|
|
908
|
+
isDragging: f
|
|
909
909
|
} = we({ id: e.id }), m = {
|
|
910
910
|
transform: Le.Transform.toString(d),
|
|
911
911
|
transition: u
|
|
@@ -915,7 +915,7 @@ function os({
|
|
|
915
915
|
{
|
|
916
916
|
ref: o,
|
|
917
917
|
style: m,
|
|
918
|
-
className: `border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4 ${
|
|
918
|
+
className: `border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4 ${f ? "opacity-50 shadow-lg" : ""}`,
|
|
919
919
|
children: [
|
|
920
920
|
/* @__PURE__ */ t.jsx(
|
|
921
921
|
"button",
|
|
@@ -934,7 +934,7 @@ function os({
|
|
|
934
934
|
] }),
|
|
935
935
|
/* @__PURE__ */ t.jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
936
936
|
/* @__PURE__ */ t.jsx(
|
|
937
|
-
|
|
937
|
+
g,
|
|
938
938
|
{
|
|
939
939
|
variant: "ghost",
|
|
940
940
|
size: "sm",
|
|
@@ -945,7 +945,7 @@ function os({
|
|
|
945
945
|
}
|
|
946
946
|
),
|
|
947
947
|
/* @__PURE__ */ t.jsx(
|
|
948
|
-
|
|
948
|
+
g,
|
|
949
949
|
{
|
|
950
950
|
variant: "ghost",
|
|
951
951
|
size: "sm",
|
|
@@ -966,14 +966,14 @@ function ds({
|
|
|
966
966
|
onToast: n
|
|
967
967
|
}) {
|
|
968
968
|
"use no memo";
|
|
969
|
-
const { t: a } = D(), { isMobile: l } =
|
|
969
|
+
const { t: a } = D(), { isMobile: l } = Pe(), r = i.useMemo(() => ls(a), [a]), { data: o = [], isLoading: d } = Ye(), u = We(), f = Qe(), m = Xe(), h = Ze(), [y, j] = i.useState(!1), [v, N] = i.useState(null), [P, C] = i.useState(!1), [x, M] = i.useState(null), {
|
|
970
970
|
register: k,
|
|
971
971
|
handleSubmit: R,
|
|
972
972
|
reset: L,
|
|
973
973
|
formState: { errors: S, isSubmitting: I }
|
|
974
974
|
} = _t(r, {
|
|
975
975
|
defaultValues: { title: "", url: "" }
|
|
976
|
-
}), F =
|
|
976
|
+
}), F = be(
|
|
977
977
|
Y(Se),
|
|
978
978
|
Y(Ce, {
|
|
979
979
|
coordinateGetter: ke
|
|
@@ -981,21 +981,21 @@ function ds({
|
|
|
981
981
|
), $ = i.useCallback(() => {
|
|
982
982
|
N(null), L({ title: "", url: "" }), j(!0);
|
|
983
983
|
}, [L]), H = i.useCallback(
|
|
984
|
-
(
|
|
985
|
-
N(
|
|
986
|
-
title:
|
|
987
|
-
url: Fe(
|
|
984
|
+
(b) => {
|
|
985
|
+
N(b), L({
|
|
986
|
+
title: b.title,
|
|
987
|
+
url: Fe(b.url)
|
|
988
988
|
}), j(!0);
|
|
989
989
|
},
|
|
990
990
|
[L]
|
|
991
991
|
), A = i.useCallback(() => {
|
|
992
992
|
j(!1), N(null), L({ title: "", url: "" });
|
|
993
993
|
}, [L]), Q = i.useCallback(
|
|
994
|
-
(
|
|
995
|
-
v ?
|
|
994
|
+
(b) => {
|
|
995
|
+
v ? f.mutate(
|
|
996
996
|
{
|
|
997
997
|
linkId: v.id,
|
|
998
|
-
body: { title:
|
|
998
|
+
body: { title: b.title, url: b.url }
|
|
999
999
|
},
|
|
1000
1000
|
{
|
|
1001
1001
|
onSuccess: () => {
|
|
@@ -1006,7 +1006,7 @@ function ds({
|
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
1008
|
) : u.mutate(
|
|
1009
|
-
{ title:
|
|
1009
|
+
{ title: b.title, url: b.url },
|
|
1010
1010
|
{
|
|
1011
1011
|
onSuccess: () => {
|
|
1012
1012
|
n?.(a("button_created"), "success"), A(), s?.();
|
|
@@ -1020,18 +1020,18 @@ function ds({
|
|
|
1020
1020
|
[
|
|
1021
1021
|
v,
|
|
1022
1022
|
u,
|
|
1023
|
-
|
|
1023
|
+
f,
|
|
1024
1024
|
A,
|
|
1025
1025
|
s,
|
|
1026
1026
|
n,
|
|
1027
1027
|
a
|
|
1028
1028
|
]
|
|
1029
|
-
),
|
|
1030
|
-
|
|
1029
|
+
), p = i.useCallback((b) => {
|
|
1030
|
+
M(b), C(!0);
|
|
1031
1031
|
}, []), z = i.useCallback(() => {
|
|
1032
|
-
C(!1),
|
|
1032
|
+
C(!1), M(null);
|
|
1033
1033
|
}, []), O = i.useCallback(() => {
|
|
1034
|
-
|
|
1034
|
+
x && m.mutate(x.id, {
|
|
1035
1035
|
onSuccess: () => {
|
|
1036
1036
|
n?.(a("button_deleted"), "success"), z(), s?.();
|
|
1037
1037
|
},
|
|
@@ -1040,15 +1040,15 @@ function ds({
|
|
|
1040
1040
|
}
|
|
1041
1041
|
});
|
|
1042
1042
|
}, [
|
|
1043
|
-
|
|
1043
|
+
x,
|
|
1044
1044
|
m,
|
|
1045
1045
|
z,
|
|
1046
1046
|
s,
|
|
1047
1047
|
n,
|
|
1048
1048
|
a
|
|
1049
1049
|
]), X = i.useCallback(
|
|
1050
|
-
(
|
|
1051
|
-
const { active: V, over: Z } =
|
|
1050
|
+
(b) => {
|
|
1051
|
+
const { active: V, over: Z } = b;
|
|
1052
1052
|
if (Z && V.id !== Z.id) {
|
|
1053
1053
|
const ze = o.findIndex((U) => U.id === V.id), Te = o.findIndex((U) => U.id === Z.id), le = ye(o, ze, Te), Ae = le.map((U) => U.id);
|
|
1054
1054
|
h.mutate(
|
|
@@ -1069,15 +1069,15 @@ function ds({
|
|
|
1069
1069
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1070
1070
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1071
1071
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1072
|
-
/* @__PURE__ */ t.jsx(
|
|
1072
|
+
/* @__PURE__ */ t.jsx(g, { variant: "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ t.jsx(re, { className: "size-4" }) }),
|
|
1073
1073
|
/* @__PURE__ */ t.jsx("h1", { className: "text-foreground text-xl font-bold", children: a("buttons_heading") })
|
|
1074
1074
|
] }),
|
|
1075
|
-
/* @__PURE__ */ t.jsxs(
|
|
1075
|
+
/* @__PURE__ */ t.jsxs(g, { size: "sm", onClick: $, children: [
|
|
1076
1076
|
/* @__PURE__ */ t.jsx(pe, { className: "mr-1 size-4" }),
|
|
1077
1077
|
a("add_button")
|
|
1078
1078
|
] })
|
|
1079
1079
|
] }),
|
|
1080
|
-
d ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: Array.from({ length: 3 }).map((
|
|
1080
|
+
d ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: Array.from({ length: 3 }).map((b, V) => /* @__PURE__ */ t.jsxs(
|
|
1081
1081
|
"div",
|
|
1082
1082
|
{
|
|
1083
1083
|
className: "border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4",
|
|
@@ -1096,7 +1096,7 @@ function ds({
|
|
|
1096
1096
|
V
|
|
1097
1097
|
)) }) : o.length === 0 ? /* @__PURE__ */ t.jsxs(B, { className: "p-6 text-center sm:p-8", children: [
|
|
1098
1098
|
/* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground mb-4", children: a("no_buttons_empty") }),
|
|
1099
|
-
/* @__PURE__ */ t.jsxs(
|
|
1099
|
+
/* @__PURE__ */ t.jsxs(g, { size: "sm", onClick: $, children: [
|
|
1100
1100
|
/* @__PURE__ */ t.jsx(pe, { className: "mr-1 size-4" }),
|
|
1101
1101
|
a("add_button")
|
|
1102
1102
|
] })
|
|
@@ -1109,16 +1109,16 @@ function ds({
|
|
|
1109
1109
|
children: /* @__PURE__ */ t.jsx(
|
|
1110
1110
|
je,
|
|
1111
1111
|
{
|
|
1112
|
-
items: o.map((
|
|
1112
|
+
items: o.map((b) => b.id),
|
|
1113
1113
|
strategy: Ne,
|
|
1114
|
-
children: /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: o.map((
|
|
1114
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: o.map((b) => /* @__PURE__ */ t.jsx(
|
|
1115
1115
|
os,
|
|
1116
1116
|
{
|
|
1117
|
-
link:
|
|
1117
|
+
link: b,
|
|
1118
1118
|
onEdit: H,
|
|
1119
|
-
onDelete:
|
|
1119
|
+
onDelete: p
|
|
1120
1120
|
},
|
|
1121
|
-
|
|
1121
|
+
b.id
|
|
1122
1122
|
)) })
|
|
1123
1123
|
}
|
|
1124
1124
|
)
|
|
@@ -1165,12 +1165,12 @@ function ds({
|
|
|
1165
1165
|
] }),
|
|
1166
1166
|
/* @__PURE__ */ t.jsxs(se, { className: "flex justify-between", children: [
|
|
1167
1167
|
v ? /* @__PURE__ */ t.jsxs(
|
|
1168
|
-
|
|
1168
|
+
g,
|
|
1169
1169
|
{
|
|
1170
1170
|
type: "button",
|
|
1171
1171
|
variant: "destructive",
|
|
1172
1172
|
onClick: () => {
|
|
1173
|
-
A(),
|
|
1173
|
+
A(), p(v);
|
|
1174
1174
|
},
|
|
1175
1175
|
children: [
|
|
1176
1176
|
/* @__PURE__ */ t.jsx(ie, { className: "mr-1 size-4" }),
|
|
@@ -1180,7 +1180,7 @@ function ds({
|
|
|
1180
1180
|
) : /* @__PURE__ */ t.jsx("div", {}),
|
|
1181
1181
|
/* @__PURE__ */ t.jsxs("div", { className: "flex gap-2", children: [
|
|
1182
1182
|
/* @__PURE__ */ t.jsx(
|
|
1183
|
-
|
|
1183
|
+
g,
|
|
1184
1184
|
{
|
|
1185
1185
|
type: "button",
|
|
1186
1186
|
variant: "outline",
|
|
@@ -1189,11 +1189,11 @@ function ds({
|
|
|
1189
1189
|
}
|
|
1190
1190
|
),
|
|
1191
1191
|
/* @__PURE__ */ t.jsx(
|
|
1192
|
-
|
|
1192
|
+
g,
|
|
1193
1193
|
{
|
|
1194
1194
|
type: "submit",
|
|
1195
|
-
disabled: I || u.isPending ||
|
|
1196
|
-
children: I || u.isPending ||
|
|
1195
|
+
disabled: I || u.isPending || f.isPending,
|
|
1196
|
+
children: I || u.isPending || f.isPending ? a("saving") : a("save")
|
|
1197
1197
|
}
|
|
1198
1198
|
)
|
|
1199
1199
|
] })
|
|
@@ -1206,18 +1206,18 @@ function ds({
|
|
|
1206
1206
|
/* @__PURE__ */ t.jsxs(
|
|
1207
1207
|
te,
|
|
1208
1208
|
{
|
|
1209
|
-
open:
|
|
1209
|
+
open: P,
|
|
1210
1210
|
onOpenChange: C,
|
|
1211
1211
|
title: a("delete_button_dialog"),
|
|
1212
1212
|
presentation: l ? "bottom-sheet" : "dialog",
|
|
1213
1213
|
size: "compact",
|
|
1214
1214
|
children: [
|
|
1215
1215
|
/* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground", children: a("delete_button_confirm", {
|
|
1216
|
-
name:
|
|
1216
|
+
name: x?.title ?? ""
|
|
1217
1217
|
}) }),
|
|
1218
1218
|
/* @__PURE__ */ t.jsxs(se, { children: [
|
|
1219
1219
|
/* @__PURE__ */ t.jsx(
|
|
1220
|
-
|
|
1220
|
+
g,
|
|
1221
1221
|
{
|
|
1222
1222
|
type: "button",
|
|
1223
1223
|
variant: "outline",
|
|
@@ -1226,7 +1226,7 @@ function ds({
|
|
|
1226
1226
|
}
|
|
1227
1227
|
),
|
|
1228
1228
|
/* @__PURE__ */ t.jsx(
|
|
1229
|
-
|
|
1229
|
+
g,
|
|
1230
1230
|
{
|
|
1231
1231
|
type: "button",
|
|
1232
1232
|
variant: "destructive",
|
|
@@ -1258,7 +1258,7 @@ function us({
|
|
|
1258
1258
|
transform: o,
|
|
1259
1259
|
transition: d,
|
|
1260
1260
|
isDragging: u
|
|
1261
|
-
} = we({ id: e.id }),
|
|
1261
|
+
} = we({ id: e.id }), f = {
|
|
1262
1262
|
transform: Le.Transform.toString(o),
|
|
1263
1263
|
transition: d
|
|
1264
1264
|
}, m = e.name ?? n("untitled"), h = e.image_url, y = cs[e.favoriteable_type], j = e.favoriteable_type !== "Product" ? y ? n(y) : e.favoriteable_type : null;
|
|
@@ -1266,7 +1266,7 @@ function us({
|
|
|
1266
1266
|
"div",
|
|
1267
1267
|
{
|
|
1268
1268
|
ref: r,
|
|
1269
|
-
style:
|
|
1269
|
+
style: f,
|
|
1270
1270
|
className: `border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4 ${u ? "opacity-50 shadow-lg" : ""}`,
|
|
1271
1271
|
children: [
|
|
1272
1272
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1296,7 +1296,7 @@ function us({
|
|
|
1296
1296
|
j ? /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground text-xs", children: j }) : null
|
|
1297
1297
|
] }),
|
|
1298
1298
|
/* @__PURE__ */ t.jsx("div", { className: "flex shrink-0 items-center gap-1", children: /* @__PURE__ */ t.jsx(
|
|
1299
|
-
|
|
1299
|
+
g,
|
|
1300
1300
|
{
|
|
1301
1301
|
variant: "ghost",
|
|
1302
1302
|
size: "sm",
|
|
@@ -1315,19 +1315,19 @@ function ms({
|
|
|
1315
1315
|
onRefreshPreview: s,
|
|
1316
1316
|
onToast: n
|
|
1317
1317
|
}) {
|
|
1318
|
-
const { t: a } = D(), { isMobile: l } =
|
|
1318
|
+
const { t: a } = D(), { isMobile: l } = Pe(), { data: r = [], isLoading: o } = Je(), d = et(), u = tt(), [f, m] = i.useState(!1), [h, y] = i.useState(null), j = be(
|
|
1319
1319
|
Y(Se),
|
|
1320
1320
|
Y(Ce, {
|
|
1321
1321
|
coordinateGetter: ke
|
|
1322
1322
|
})
|
|
1323
1323
|
), v = i.useCallback(
|
|
1324
|
-
(
|
|
1325
|
-
y(
|
|
1324
|
+
(x) => {
|
|
1325
|
+
y(x), m(!0);
|
|
1326
1326
|
},
|
|
1327
1327
|
[]
|
|
1328
1328
|
), N = i.useCallback(() => {
|
|
1329
1329
|
m(!1), y(null);
|
|
1330
|
-
}, []),
|
|
1330
|
+
}, []), P = i.useCallback(() => {
|
|
1331
1331
|
h && d.mutate(h.id, {
|
|
1332
1332
|
onSuccess: () => {
|
|
1333
1333
|
n?.(a("content_removed"), "success"), N(), s?.();
|
|
@@ -1344,10 +1344,10 @@ function ms({
|
|
|
1344
1344
|
n,
|
|
1345
1345
|
a
|
|
1346
1346
|
]), C = i.useCallback(
|
|
1347
|
-
(
|
|
1348
|
-
const { active:
|
|
1349
|
-
if (k &&
|
|
1350
|
-
const R = r.findIndex((F) => F.id ===
|
|
1347
|
+
(x) => {
|
|
1348
|
+
const { active: M, over: k } = x;
|
|
1349
|
+
if (k && M.id !== k.id) {
|
|
1350
|
+
const R = r.findIndex((F) => F.id === M.id), L = r.findIndex((F) => F.id === k.id), S = ye(r, R, L), I = S.map((F) => F.id);
|
|
1351
1351
|
u.mutate(
|
|
1352
1352
|
{ orderedIds: I, optimisticItems: S },
|
|
1353
1353
|
{
|
|
@@ -1365,10 +1365,10 @@ function ms({
|
|
|
1365
1365
|
);
|
|
1366
1366
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1367
1367
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1368
|
-
/* @__PURE__ */ t.jsx(
|
|
1368
|
+
/* @__PURE__ */ t.jsx(g, { variant: "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ t.jsx(re, { className: "size-4" }) }),
|
|
1369
1369
|
/* @__PURE__ */ t.jsx("h1", { className: "text-foreground text-xl font-bold", children: a("content_heading") })
|
|
1370
1370
|
] }),
|
|
1371
|
-
o ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: Array.from({ length: 3 }).map((
|
|
1371
|
+
o ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: Array.from({ length: 3 }).map((x, M) => /* @__PURE__ */ t.jsxs(
|
|
1372
1372
|
"div",
|
|
1373
1373
|
{
|
|
1374
1374
|
className: "border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4",
|
|
@@ -1382,7 +1382,7 @@ function ms({
|
|
|
1382
1382
|
/* @__PURE__ */ t.jsx(E, { className: "size-8" })
|
|
1383
1383
|
]
|
|
1384
1384
|
},
|
|
1385
|
-
|
|
1385
|
+
M
|
|
1386
1386
|
)) }) : r.length === 0 ? /* @__PURE__ */ t.jsx(B, { className: "p-6 text-center sm:p-8", children: /* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground", children: a("no_content_empty") }) }) : /* @__PURE__ */ t.jsx(
|
|
1387
1387
|
_e,
|
|
1388
1388
|
{
|
|
@@ -1392,15 +1392,15 @@ function ms({
|
|
|
1392
1392
|
children: /* @__PURE__ */ t.jsx(
|
|
1393
1393
|
je,
|
|
1394
1394
|
{
|
|
1395
|
-
items: r.map((
|
|
1395
|
+
items: r.map((x) => x.id),
|
|
1396
1396
|
strategy: Ne,
|
|
1397
|
-
children: /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: r.map((
|
|
1397
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: r.map((x) => /* @__PURE__ */ t.jsx(
|
|
1398
1398
|
us,
|
|
1399
1399
|
{
|
|
1400
|
-
favorite:
|
|
1400
|
+
favorite: x,
|
|
1401
1401
|
onDelete: v
|
|
1402
1402
|
},
|
|
1403
|
-
|
|
1403
|
+
x.id
|
|
1404
1404
|
)) })
|
|
1405
1405
|
}
|
|
1406
1406
|
)
|
|
@@ -1409,7 +1409,7 @@ function ms({
|
|
|
1409
1409
|
/* @__PURE__ */ t.jsxs(
|
|
1410
1410
|
te,
|
|
1411
1411
|
{
|
|
1412
|
-
open:
|
|
1412
|
+
open: f,
|
|
1413
1413
|
onOpenChange: m,
|
|
1414
1414
|
title: a("remove_content_dialog"),
|
|
1415
1415
|
presentation: l ? "bottom-sheet" : "dialog",
|
|
@@ -1420,7 +1420,7 @@ function ms({
|
|
|
1420
1420
|
}) }),
|
|
1421
1421
|
/* @__PURE__ */ t.jsxs(se, { children: [
|
|
1422
1422
|
/* @__PURE__ */ t.jsx(
|
|
1423
|
-
|
|
1423
|
+
g,
|
|
1424
1424
|
{
|
|
1425
1425
|
type: "button",
|
|
1426
1426
|
variant: "outline",
|
|
@@ -1429,11 +1429,11 @@ function ms({
|
|
|
1429
1429
|
}
|
|
1430
1430
|
),
|
|
1431
1431
|
/* @__PURE__ */ t.jsx(
|
|
1432
|
-
|
|
1432
|
+
g,
|
|
1433
1433
|
{
|
|
1434
1434
|
type: "button",
|
|
1435
1435
|
variant: "destructive",
|
|
1436
|
-
onClick:
|
|
1436
|
+
onClick: P,
|
|
1437
1437
|
disabled: d.isPending,
|
|
1438
1438
|
children: d.isPending ? a("removing") : a("remove")
|
|
1439
1439
|
}
|
|
@@ -1446,7 +1446,7 @@ function ms({
|
|
|
1446
1446
|
}
|
|
1447
1447
|
const hs = [
|
|
1448
1448
|
{ labelKey: "nav_profile", slug: "profile", icon: nt },
|
|
1449
|
-
{ labelKey: "nav_theme", key: "theme", icon:
|
|
1449
|
+
{ labelKey: "nav_theme", key: "theme", icon: Me },
|
|
1450
1450
|
{ labelKey: "nav_content", key: "content", icon: rt },
|
|
1451
1451
|
{ labelKey: "nav_buttons", key: "buttons", icon: Ct }
|
|
1452
1452
|
];
|
|
@@ -1460,21 +1460,21 @@ function ps({
|
|
|
1460
1460
|
onEditSection: a,
|
|
1461
1461
|
onBackClick: l
|
|
1462
1462
|
}) {
|
|
1463
|
-
const { t: r } = D(), { navigate: o } = Oe(), { data: d, isLoading: u } = De(), { data:
|
|
1463
|
+
const { t: r } = D(), { navigate: o } = Oe(), { data: d, isLoading: u } = De(), { data: f = [] } = st(), m = Ue(), h = at({
|
|
1464
1464
|
// The theme saves through here too, and only a slug write moves the URL.
|
|
1465
|
-
onSuccess: (
|
|
1466
|
-
}), [y, j] = i.useState(0), v = i.useCallback(() => j((
|
|
1467
|
-
(
|
|
1468
|
-
if (
|
|
1465
|
+
onSuccess: (p) => p.slug === void 0 ? void 0 : Ke(m)
|
|
1466
|
+
}), [y, j] = i.useState(0), v = i.useCallback(() => j((p) => p + 1), []), [N, P] = i.useState(null), C = N ?? d?.theme_id ?? f.find((p) => p.name === "Default")?.id ?? f[0]?.id ?? null, M = f.find((p) => p.id === C)?.name ?? "Default", k = d?.mysite_url ?? "", R = k ? k.replace(/^https?:\/\//, "") : "", L = d?.mysite_views ?? 0, S = d?.mysite_leads ?? 0, I = i.useCallback(
|
|
1467
|
+
(p) => {
|
|
1468
|
+
if (p.id === C) return;
|
|
1469
1469
|
const z = N;
|
|
1470
|
-
|
|
1471
|
-
{ theme_id:
|
|
1470
|
+
P(p.id), h.mutate(
|
|
1471
|
+
{ theme_id: p.id },
|
|
1472
1472
|
{
|
|
1473
1473
|
onSuccess: () => {
|
|
1474
|
-
K(r("theme_changed", { name:
|
|
1474
|
+
K(r("theme_changed", { name: p.name }), "success"), v();
|
|
1475
1475
|
},
|
|
1476
1476
|
onError: () => {
|
|
1477
|
-
|
|
1477
|
+
P(z), K(r("theme_update_failed"), "error");
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
1480
|
);
|
|
@@ -1487,10 +1487,10 @@ function ps({
|
|
|
1487
1487
|
r
|
|
1488
1488
|
]
|
|
1489
1489
|
), F = i.useCallback(
|
|
1490
|
-
async (
|
|
1490
|
+
async (p) => {
|
|
1491
1491
|
await new Promise((z, O) => {
|
|
1492
1492
|
h.mutate(
|
|
1493
|
-
{ slug:
|
|
1493
|
+
{ slug: p },
|
|
1494
1494
|
{
|
|
1495
1495
|
onSuccess: () => z(),
|
|
1496
1496
|
onError: () => O(new Error("Failed"))
|
|
@@ -1500,7 +1500,9 @@ function ps({
|
|
|
1500
1500
|
},
|
|
1501
1501
|
[h]
|
|
1502
1502
|
), $ = i.useCallback(() => {
|
|
1503
|
-
|
|
1503
|
+
if (!k) return;
|
|
1504
|
+
const p = new URL(k);
|
|
1505
|
+
p.searchParams.set("rep_view", "true"), window.open(p.toString(), "_blank");
|
|
1504
1506
|
}, [k]), H = i.useMemo(() => e === "theme" ? r("nav_theme") : e === "buttons" ? r("nav_buttons") : e === "content" ? r("nav_content") : "", [e, r]);
|
|
1505
1507
|
if (u)
|
|
1506
1508
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex h-full flex-col overflow-y-auto px-2 py-6 2xl:flex-row 2xl:overflow-hidden", children: [
|
|
@@ -1530,7 +1532,7 @@ function ps({
|
|
|
1530
1532
|
children: /* @__PURE__ */ t.jsx("div", { className: "flex min-w-0 flex-col gap-5 2xl:h-full 2xl:overflow-y-auto", children: n && e === "theme" ? /* @__PURE__ */ t.jsx(
|
|
1531
1533
|
as,
|
|
1532
1534
|
{
|
|
1533
|
-
themes:
|
|
1535
|
+
themes: f,
|
|
1534
1536
|
selectedThemeId: C,
|
|
1535
1537
|
onSelectTheme: I,
|
|
1536
1538
|
isPending: h.isPending,
|
|
@@ -1568,8 +1570,8 @@ function ps({
|
|
|
1568
1570
|
onToast: K
|
|
1569
1571
|
}
|
|
1570
1572
|
),
|
|
1571
|
-
/* @__PURE__ */ t.jsx("div", { className: "border-border bg-card divide-border divide-y overflow-hidden rounded-lg border", children: hs.map((
|
|
1572
|
-
const z =
|
|
1573
|
+
/* @__PURE__ */ t.jsx("div", { className: "border-border bg-card divide-border divide-y overflow-hidden rounded-lg border", children: hs.map((p) => {
|
|
1574
|
+
const z = p.icon, O = "group hover:bg-muted flex w-full items-center gap-2.5 px-3 py-2.5 transition-colors text-left cursor-pointer", X = "slug" in p ? () => o(p.slug) : () => a(p.key);
|
|
1573
1575
|
return /* @__PURE__ */ t.jsxs(
|
|
1574
1576
|
"button",
|
|
1575
1577
|
{
|
|
@@ -1578,11 +1580,11 @@ function ps({
|
|
|
1578
1580
|
className: O,
|
|
1579
1581
|
children: [
|
|
1580
1582
|
/* @__PURE__ */ t.jsx("div", { className: "bg-muted text-foreground flex size-7 shrink-0 items-center justify-center rounded-full", children: /* @__PURE__ */ t.jsx(z, { className: "size-3.5" }) }),
|
|
1581
|
-
/* @__PURE__ */ t.jsx("span", { className: "text-foreground flex-1 text-sm font-medium", children: r(
|
|
1583
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-foreground flex-1 text-sm font-medium", children: r(p.labelKey) }),
|
|
1582
1584
|
/* @__PURE__ */ t.jsx(ce, { className: "text-muted-foreground size-3 shrink-0 transition-transform group-hover:translate-x-0.5" })
|
|
1583
1585
|
]
|
|
1584
1586
|
},
|
|
1585
|
-
|
|
1587
|
+
p.labelKey
|
|
1586
1588
|
);
|
|
1587
1589
|
}) })
|
|
1588
1590
|
] }) })
|
|
@@ -1596,7 +1598,7 @@ function ps({
|
|
|
1596
1598
|
es,
|
|
1597
1599
|
{
|
|
1598
1600
|
mysiteUrl: k,
|
|
1599
|
-
themeName:
|
|
1601
|
+
themeName: M,
|
|
1600
1602
|
previewKey: y,
|
|
1601
1603
|
isUpdating: h.isPending,
|
|
1602
1604
|
onView: $
|
|
@@ -1628,7 +1630,7 @@ function fs() {
|
|
|
1628
1630
|
r(), a(m), s("fade-out"), o("slide", T), o("fade-in", T + G), o("editing", T + G + T);
|
|
1629
1631
|
},
|
|
1630
1632
|
[r, o]
|
|
1631
|
-
),
|
|
1633
|
+
), f = i.useCallback(() => {
|
|
1632
1634
|
r(), s("exit-fade-out"), o("exit-slide", T), o("exit-fade-in", T + G);
|
|
1633
1635
|
const m = setTimeout(
|
|
1634
1636
|
() => {
|
|
@@ -1643,7 +1645,7 @@ function fs() {
|
|
|
1643
1645
|
animPhase: e,
|
|
1644
1646
|
showEditContent: d,
|
|
1645
1647
|
handleEditSection: u,
|
|
1646
|
-
handleBackClick:
|
|
1648
|
+
handleBackClick: f
|
|
1647
1649
|
};
|
|
1648
1650
|
}
|
|
1649
1651
|
function xs({
|
|
@@ -1656,9 +1658,9 @@ function xs({
|
|
|
1656
1658
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
1657
1659
|
...r
|
|
1658
1660
|
}) {
|
|
1659
|
-
return /* @__PURE__ */ t.jsx(Wt, { children: /* @__PURE__ */ t.jsx(
|
|
1661
|
+
return /* @__PURE__ */ t.jsx(Wt, { children: /* @__PURE__ */ t.jsx(gs, { ...r }) });
|
|
1660
1662
|
}
|
|
1661
|
-
function
|
|
1663
|
+
function gs(e) {
|
|
1662
1664
|
const { t: s } = D(), {
|
|
1663
1665
|
editingSection: n,
|
|
1664
1666
|
animPhase: a,
|
|
@@ -1666,8 +1668,8 @@ function bs(e) {
|
|
|
1666
1668
|
handleEditSection: r,
|
|
1667
1669
|
handleBackClick: o
|
|
1668
1670
|
} = fs(), d = i.useMemo(() => n === "theme" ? s("nav_theme") : n === "buttons" ? s("nav_buttons") : n === "content" ? s("nav_content") : null, [n, s]), u = i.useCallback(
|
|
1669
|
-
(
|
|
1670
|
-
|
|
1671
|
+
(f) => {
|
|
1672
|
+
f.preventDefault(), n !== null && o();
|
|
1671
1673
|
},
|
|
1672
1674
|
[n, o]
|
|
1673
1675
|
);
|
|
@@ -1710,9 +1712,9 @@ function Ds() {
|
|
|
1710
1712
|
),
|
|
1711
1713
|
[n, a, l, s]
|
|
1712
1714
|
);
|
|
1713
|
-
return /* @__PURE__ */ t.jsx(it, { value: r, children: /* @__PURE__ */ t.jsx(
|
|
1715
|
+
return /* @__PURE__ */ t.jsx(it, { value: r, children: /* @__PURE__ */ t.jsx(bs, {}) });
|
|
1714
1716
|
}
|
|
1715
|
-
function
|
|
1717
|
+
function bs() {
|
|
1716
1718
|
const { error: e } = De();
|
|
1717
1719
|
if (e) throw e;
|
|
1718
1720
|
return /* @__PURE__ */ t.jsx(xs, {});
|