@fluid-app/fluid-cli-theme-dev 0.1.750 → 0.1.752
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 +255 -261
- package/dist/dist-cli-preview/account-screens.js +1 -1
- package/dist/dist-cli-preview/chunks/{Combobox-DluUOyIh.js → Combobox-DN6uDwMf.js} +47 -47
- package/dist/dist-cli-preview/chunks/{ContactsScreen-BfIuH4zD.js → ContactsScreen-DcqiPXmX.js} +90 -90
- package/dist/dist-cli-preview/chunks/MediaScreen-C3wF55uB.js +8 -0
- package/dist/dist-cli-preview/chunks/{MemberManagementProviders-bM9sYpW9.js → MemberManagementProviders-Bln-Y7uX.js} +6 -6
- package/dist/dist-cli-preview/chunks/{MemberShareablesScreen-BpBDqbDD.js → MemberShareablesScreen-CMS8mOM-.js} +21 -21
- package/dist/dist-cli-preview/chunks/{MessagingScreen-B7329DBG.js → MessagingScreen-BamvtDSy.js} +6770 -6805
- package/dist/dist-cli-preview/chunks/{MobileActionSheet-D2rBX4Lx.js → MobileActionSheet-rTSxp-qM.js} +4 -4
- package/dist/dist-cli-preview/chunks/{MySiteScreen-AwmY3Ez5.js → MySiteScreen-H6AtTSxj.js} +124 -121
- package/dist/dist-cli-preview/chunks/{OrdersScreen-Bvo_Mx3w.js → OrdersScreen-0mJVaeqy.js} +8 -8
- package/dist/dist-cli-preview/chunks/OrdersScreen-PJd4uSZW.js +9 -0
- package/dist/dist-cli-preview/chunks/PlaylistsScreen-mRYnXb2q.js +8 -0
- package/dist/dist-cli-preview/chunks/{PortalTenantClientProvider-B3BFo8T5.js → PortalTenantClientProvider-CpIpKQVv.js} +1 -1
- package/dist/dist-cli-preview/chunks/{ProfileScreen-RH5vNLYu.js → ProfileScreen-B5_5apcV.js} +14 -14
- package/dist/dist-cli-preview/chunks/{ResponsiveDialog-Cuv5gFUx.js → ResponsiveDialog-CRjYPJDy.js} +73 -73
- package/dist/dist-cli-preview/chunks/{Select-CD9zC8ic.js → Select-V9j-VL4o.js} +2 -2
- package/dist/dist-cli-preview/chunks/{SubscriptionsScreen-DUV4cuMi.js → SubscriptionsScreen-DEwFQ2JA.js} +3 -3
- package/dist/dist-cli-preview/chunks/{Textarea-BX1sqax1.js → Textarea-DpGnk7nw.js} +42 -42
- package/dist/dist-cli-preview/chunks/{account-screen-runtime-gWamEEiQ.js → account-screen-runtime-B9i-9CLs.js} +2701 -2643
- package/dist/dist-cli-preview/chunks/{arrow-left-C-2EMJLp.js → arrow-left-Ds5JkG8w.js} +1 -1
- package/dist/dist-cli-preview/chunks/{cli-preview-DkdtTiW-.js → cli-preview-dpKrAzda.js} +10 -10
- package/dist/dist-cli-preview/chunks/{client.gen-Bn09emPC.js → client.gen-CG8-mDod.js} +20 -20
- package/dist/dist-cli-preview/chunks/{copy-DO_MJg1G.js → copy-CwTnpnmt.js} +1 -1
- package/dist/dist-cli-preview/chunks/{countries-api-adapter-DRAx82BG.js → countries-api-adapter-c75511Cl.js} +2 -2
- package/dist/dist-cli-preview/chunks/{create-card-entry-container-CkVBOwVA.js → create-card-entry-container-GX283QPD.js} +17967 -17974
- package/dist/dist-cli-preview/chunks/{hey-api-client-BtWnXt6Y.js → hey-api-client-EAWr0fT_.js} +1 -1
- package/dist/dist-cli-preview/chunks/{index-dtGU2026.js → index-BNk_peyi.js} +19 -19
- package/dist/dist-cli-preview/chunks/{index-DSMhrA7P.js → index-CHSpeqMH.js} +1 -1
- package/dist/dist-cli-preview/chunks/{index-B23yRHYj.js → index-Cwr1yiwQ.js} +3 -3
- package/dist/dist-cli-preview/chunks/{map-pin-_fZf7MT1.js → map-pin-Dyg5NsTr.js} +1 -1
- package/dist/dist-cli-preview/chunks/{mount-account-screen-wMW2XzB7.js → mount-account-screen-B7Ap9PT0.js} +8 -8
- package/dist/dist-cli-preview/chunks/mysite-BsaDPWEO.js +4 -0
- package/dist/dist-cli-preview/chunks/{navigate-account-screen-x9j5GXO3.js → navigate-account-screen-CbjUeIuP.js} +1 -1
- package/dist/dist-cli-preview/chunks/{schemas-BGhVnzPl.js → schemas-CZvv_5iX.js} +2 -2
- package/dist/dist-cli-preview/chunks/{screen-route-slug-utils-yYCdefUM.js → screen-route-slug-utils-yRpUie2O.js} +1 -1
- package/dist/dist-cli-preview/chunks/{search-DAHGESai.js → search-8wgRmDw1.js} +1 -1
- package/dist/dist-cli-preview/chunks/{sheet-haptics-context-1PrsBukT.js → sheet-haptics-context-COwdGTra.js} +17 -17
- package/dist/dist-cli-preview/chunks/{sidebar-DqS7s6Fo.js → sidebar-SmEnwFoV.js} +19 -19
- package/dist/dist-cli-preview/chunks/{sortable.esm-aUBXTWUl.js → sortable.esm-CibJ9yWj.js} +2 -2
- package/dist/dist-cli-preview/chunks/{store-api-context-DfNTd_aW.js → store-api-context-TW7uud2C.js} +1 -1
- package/dist/dist-cli-preview/chunks/{translation-api-context-factory-DDptTXAu.js → translation-api-context-factory-BEO-iYLb.js} +1 -1
- package/dist/dist-cli-preview/chunks/{use-mobile-CzhxjMYC.js → use-mobile-BChC77Fq.js} +3 -3
- package/dist/dist-cli-preview/chunks/{use-optional-store-DdujEdZ6.js → use-optional-store-DopS-Jc8.js} +2 -2
- package/dist/dist-cli-preview/chunks/{use-store-B2hbh2xH.js → use-store-CXu_fhao.js} +6 -6
- package/dist/dist-cli-preview/chunks/{useInfiniteQuery-BoOiol5L.js → useInfiniteQuery-Dw0mdxuD.js} +1 -1
- package/dist/dist-cli-preview/chunks/{users-lOg_maXR.js → users-BwLXeQJs.js} +1 -1
- package/package.json +2 -2
- package/dist/dist-cli-preview/chunks/MediaScreen-DCTVGUEM.js +0 -8
- package/dist/dist-cli-preview/chunks/OrdersScreen-ei7lxIS6.js +0 -9
- package/dist/dist-cli-preview/chunks/PlaylistsScreen-CU2BChK-.js +0 -8
- package/dist/dist-cli-preview/chunks/isAfter-BR4uNpua.js +0 -1313
- package/dist/dist-cli-preview/chunks/mysite-f4Rrey_c.js +0 -4
|
@@ -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
|
|
3
|
-
import { c as lt, a as ot } from "./client.gen-
|
|
4
|
-
import { S as E, I as ue, B as dt, a as ct, b as me, d as ut, c as pe, e as mt } from "./sheet-haptics-context-
|
|
5
|
-
import { a as pt, c as
|
|
6
|
-
import { U as
|
|
7
|
-
import { C as
|
|
8
|
-
import { A as re } from "./arrow-left-
|
|
9
|
-
import { C as yt, o as w, n as _, s as c, d as ee, f as _t } from "./schemas-
|
|
10
|
-
import { P as
|
|
11
|
-
import { u as Pe } from "./sidebar-
|
|
1
|
+
import { c as ae, aj as Ie, l as i, j as t, a4 as Be, $ as b, L as Re, X as oe, a7 as de, B as Oe, _ as Ue, a3 as ce, bG as $e, E as Ke, a1 as He, ak as qe, z as Ge } from "./account-screen-runtime-B9i-9CLs.js";
|
|
2
|
+
import { C as B, h as ne, i as be, a as W, j as Ve, k as Ye, l as We, m as Qe, n as Xe, o as Ze, c as ge, 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
|
+
import { c as lt, a as ot } from "./client.gen-CG8-mDod.js";
|
|
4
|
+
import { S as E, I as ue, B as dt, a as ct, b as me, d as ut, c as pe, e as mt } from "./sheet-haptics-context-COwdGTra.js";
|
|
5
|
+
import { a as pt, c as ht, b as ft, u as xt } from "./translation-api-context-factory-BEO-iYLb.js";
|
|
6
|
+
import { U as bt } from "./users-BwLXeQJs.js";
|
|
7
|
+
import { C as gt } from "./copy-CwTnpnmt.js";
|
|
8
|
+
import { A as re } from "./arrow-left-Ds5JkG8w.js";
|
|
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
|
+
import { P as he, R as te, e as se, T as ie, f as vt } from "./ResponsiveDialog-CRjYPJDy.js";
|
|
11
|
+
import { u as Pe } from "./sidebar-SmEnwFoV.js";
|
|
12
12
|
/**
|
|
13
13
|
* @license lucide-react v0.575.0 - ISC
|
|
14
14
|
*
|
|
@@ -91,7 +91,7 @@ const Et = (e) => e.client.get({
|
|
|
91
91
|
responseStyle: "data",
|
|
92
92
|
url: "/api/mysite/profile",
|
|
93
93
|
...e
|
|
94
|
-
}),
|
|
94
|
+
}), fe = (e) => e.client.put({
|
|
95
95
|
responseStyle: "data",
|
|
96
96
|
url: "/api/mysite/profile",
|
|
97
97
|
...e,
|
|
@@ -181,7 +181,7 @@ function xe(e) {
|
|
|
181
181
|
slug: e.slug ?? null
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function G(e) {
|
|
185
185
|
return {
|
|
186
186
|
id: e.id ?? 0,
|
|
187
187
|
url: e.url ?? "",
|
|
@@ -217,7 +217,7 @@ function $t(e) {
|
|
|
217
217
|
return xe(s.profile ?? {});
|
|
218
218
|
},
|
|
219
219
|
updateProfile: async (s) => {
|
|
220
|
-
const n = await
|
|
220
|
+
const n = await fe({
|
|
221
221
|
client: e,
|
|
222
222
|
body: {
|
|
223
223
|
profile: {
|
|
@@ -235,19 +235,19 @@ function $t(e) {
|
|
|
235
235
|
client: e,
|
|
236
236
|
body: { settings: { theme_id: s.theme_id } }
|
|
237
237
|
}) : Promise.resolve(),
|
|
238
|
-
s.slug !== void 0 ?
|
|
238
|
+
s.slug !== void 0 ? fe({
|
|
239
239
|
client: e,
|
|
240
240
|
body: { profile: { slug: s.slug } }
|
|
241
241
|
}) : Promise.resolve()
|
|
242
242
|
]);
|
|
243
243
|
},
|
|
244
|
-
listLinks: async () => ((await Mt({ client: e })).links ?? []).map(
|
|
244
|
+
listLinks: async () => ((await Mt({ client: e })).links ?? []).map(G),
|
|
245
245
|
createLink: async (s) => {
|
|
246
246
|
const n = await Ft({
|
|
247
247
|
client: e,
|
|
248
248
|
body: { link: { title: s.title, url: s.url } }
|
|
249
249
|
});
|
|
250
|
-
return
|
|
250
|
+
return G(n.link ?? {});
|
|
251
251
|
},
|
|
252
252
|
updateLink: async (s, n) => {
|
|
253
253
|
const a = await Tt({
|
|
@@ -255,7 +255,7 @@ function $t(e) {
|
|
|
255
255
|
path: { id: s },
|
|
256
256
|
body: { link: { title: n.title, url: n.url } }
|
|
257
257
|
});
|
|
258
|
-
return
|
|
258
|
+
return G(a.link ?? {});
|
|
259
259
|
},
|
|
260
260
|
deleteLink: async (s) => {
|
|
261
261
|
await zt({ client: e, path: { id: s } });
|
|
@@ -263,7 +263,7 @@ function $t(e) {
|
|
|
263
263
|
reorderLinks: async (s) => ((await At({
|
|
264
264
|
client: e,
|
|
265
265
|
body: { ordered_ids: s }
|
|
266
|
-
})).links ?? []).map(
|
|
266
|
+
})).links ?? []).map(G),
|
|
267
267
|
listFavorites: async () => ((await It({ client: e })).favorites ?? []).map(J),
|
|
268
268
|
addFavorite: async (s) => {
|
|
269
269
|
const n = await Bt({
|
|
@@ -371,8 +371,11 @@ const Kt = {
|
|
|
371
371
|
cancel_rename_aria: "Cancel rename",
|
|
372
372
|
theme_name_aria: "Theme name",
|
|
373
373
|
rename_failed: "Couldn't rename theme. Try again.",
|
|
374
|
-
name_validation_error: "Name {{error}}"
|
|
375
|
-
|
|
374
|
+
name_validation_error: "Name {{error}}",
|
|
375
|
+
add_thumbnail: "Add Thumbnail",
|
|
376
|
+
replace_image: "Replace image",
|
|
377
|
+
thumbnail_update_failed: "Couldn't update thumbnail. Try again."
|
|
378
|
+
}, Ht = ht({
|
|
376
379
|
fallback: Kt,
|
|
377
380
|
loaders: {
|
|
378
381
|
ar: () => import("./ar-D_B30x0o.js").then(
|
|
@@ -482,7 +485,7 @@ const Kt = {
|
|
|
482
485
|
function qt(e, s) {
|
|
483
486
|
return pt(e, s);
|
|
484
487
|
}
|
|
485
|
-
const { Provider:
|
|
488
|
+
const { Provider: Gt, useTranslation: Vt } = ft("Mysite"), Yt = Gt, D = Vt;
|
|
486
489
|
function Wt({
|
|
487
490
|
children: e
|
|
488
491
|
}) {
|
|
@@ -492,7 +495,7 @@ function Wt({
|
|
|
492
495
|
);
|
|
493
496
|
return /* @__PURE__ */ t.jsx(Yt, { value: a, children: e });
|
|
494
497
|
}
|
|
495
|
-
const T = 300,
|
|
498
|
+
const T = 300, V = 500;
|
|
496
499
|
function Qt(e) {
|
|
497
500
|
switch (e) {
|
|
498
501
|
case "idle":
|
|
@@ -535,7 +538,7 @@ function Zt({
|
|
|
535
538
|
}) {
|
|
536
539
|
const { t: n } = D();
|
|
537
540
|
return /* @__PURE__ */ t.jsxs(B, { className: "h-auto gap-0 py-0 shadow-none", children: [
|
|
538
|
-
/* @__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(be, { className: "text-sm", children: n("visitor_details") }) }),
|
|
539
542
|
/* @__PURE__ */ t.jsxs(W, { className: "flex px-4 pb-4", children: [
|
|
540
543
|
/* @__PURE__ */ t.jsxs("div", { className: "flex-1", children: [
|
|
541
544
|
/* @__PURE__ */ t.jsxs("div", { className: "mb-2 flex items-center gap-1.5", children: [
|
|
@@ -547,7 +550,7 @@ function Zt({
|
|
|
547
550
|
/* @__PURE__ */ t.jsx(Be, { orientation: "vertical", className: "bg-border mx-4 h-auto" }),
|
|
548
551
|
/* @__PURE__ */ t.jsxs("div", { className: "flex-1", children: [
|
|
549
552
|
/* @__PURE__ */ t.jsxs("div", { className: "mb-2 flex items-center gap-1.5", children: [
|
|
550
|
-
/* @__PURE__ */ t.jsx(
|
|
553
|
+
/* @__PURE__ */ t.jsx(bt, { className: "text-muted-foreground size-3.5" }),
|
|
551
554
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground text-sm", children: n("leads") })
|
|
552
555
|
] }),
|
|
553
556
|
/* @__PURE__ */ t.jsx("p", { className: "text-foreground text-2xl font-bold", children: s.toLocaleString() })
|
|
@@ -561,24 +564,24 @@ function Jt({
|
|
|
561
564
|
onUpdateSlug: n,
|
|
562
565
|
onToast: a
|
|
563
566
|
}) {
|
|
564
|
-
const { t: l } = D(), r = s.lastIndexOf("/"), o = r >= 0 ? s.slice(0, r + 1) : "", d = r >= 0 ? s.slice(r + 1) : s, [u,
|
|
565
|
-
p(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, h] = i.useState(!1), [m, p] = i.useState(d), [y, j] = i.useState(!1), v = i.useCallback(() => {
|
|
568
|
+
p(d), h(!0);
|
|
566
569
|
}, [d]), N = i.useCallback(() => {
|
|
567
|
-
|
|
570
|
+
h(!1), p(d);
|
|
568
571
|
}, [d]), P = i.useCallback(async () => {
|
|
569
|
-
const
|
|
570
|
-
if (!
|
|
572
|
+
const f = m.trim();
|
|
573
|
+
if (!f) {
|
|
571
574
|
a?.(l("slug_empty_error"), "error");
|
|
572
575
|
return;
|
|
573
576
|
}
|
|
574
|
-
if (
|
|
575
|
-
|
|
577
|
+
if (f === d) {
|
|
578
|
+
h(!1);
|
|
576
579
|
return;
|
|
577
580
|
}
|
|
578
581
|
if (n) {
|
|
579
582
|
j(!0);
|
|
580
583
|
try {
|
|
581
|
-
await n(
|
|
584
|
+
await n(f), a?.(l("link_updated"), "success"), h(!1);
|
|
582
585
|
} catch {
|
|
583
586
|
a?.(l("link_update_failed"), "error");
|
|
584
587
|
} finally {
|
|
@@ -595,8 +598,8 @@ function Jt({
|
|
|
595
598
|
}, [e, a, l]);
|
|
596
599
|
return /* @__PURE__ */ t.jsxs(B, { className: "h-auto gap-0 py-0 shadow-none", children: [
|
|
597
600
|
/* @__PURE__ */ t.jsxs(ne, { className: "items-center p-4", children: [
|
|
598
|
-
/* @__PURE__ */ t.jsx(
|
|
599
|
-
!u && n && /* @__PURE__ */ t.jsx(
|
|
601
|
+
/* @__PURE__ */ t.jsx(be, { className: "text-sm", children: l("your_mysite_link") }),
|
|
602
|
+
!u && n && /* @__PURE__ */ t.jsx(Ve, { children: /* @__PURE__ */ t.jsx(b, { variant: "link", size: "sm", onClick: v, children: l("edit_link") }) })
|
|
600
603
|
] }),
|
|
601
604
|
/* @__PURE__ */ t.jsxs(W, { className: "px-4 pb-4", children: [
|
|
602
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: [
|
|
@@ -607,9 +610,9 @@ function Jt({
|
|
|
607
610
|
{
|
|
608
611
|
type: "text",
|
|
609
612
|
value: m,
|
|
610
|
-
onChange: (
|
|
611
|
-
onKeyDown: (
|
|
612
|
-
|
|
613
|
+
onChange: (f) => p(f.target.value),
|
|
614
|
+
onKeyDown: (f) => {
|
|
615
|
+
f.key === "Enter" && !y && P(), f.key === "Escape" && N();
|
|
613
616
|
},
|
|
614
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",
|
|
615
618
|
autoFocus: !0
|
|
@@ -617,13 +620,13 @@ function Jt({
|
|
|
617
620
|
)
|
|
618
621
|
] }) : /* @__PURE__ */ t.jsx("span", { className: "min-w-0 flex-1 truncate text-sm", children: s || l("not_configured") }),
|
|
619
622
|
/* @__PURE__ */ t.jsx(
|
|
620
|
-
|
|
623
|
+
b,
|
|
621
624
|
{
|
|
622
625
|
variant: "ghost",
|
|
623
626
|
size: "icon",
|
|
624
627
|
onClick: C,
|
|
625
628
|
disabled: !e,
|
|
626
|
-
children: /* @__PURE__ */ t.jsx(
|
|
629
|
+
children: /* @__PURE__ */ t.jsx(gt, { className: "size-4" })
|
|
627
630
|
}
|
|
628
631
|
)
|
|
629
632
|
] }),
|
|
@@ -638,7 +641,7 @@ function Jt({
|
|
|
638
641
|
},
|
|
639
642
|
children: /* @__PURE__ */ t.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ t.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
640
643
|
/* @__PURE__ */ t.jsx(
|
|
641
|
-
|
|
644
|
+
b,
|
|
642
645
|
{
|
|
643
646
|
variant: "secondary",
|
|
644
647
|
size: "sm",
|
|
@@ -646,7 +649,7 @@ function Jt({
|
|
|
646
649
|
children: l("cancel")
|
|
647
650
|
}
|
|
648
651
|
),
|
|
649
|
-
/* @__PURE__ */ t.jsx(
|
|
652
|
+
/* @__PURE__ */ t.jsx(b, { size: "sm", onClick: P, disabled: y, children: l(y ? "saving" : "save") })
|
|
650
653
|
] }) })
|
|
651
654
|
}
|
|
652
655
|
)
|
|
@@ -664,7 +667,7 @@ function es({
|
|
|
664
667
|
i.useEffect(() => {
|
|
665
668
|
u.current = !0;
|
|
666
669
|
}, [n]);
|
|
667
|
-
const
|
|
670
|
+
const h = () => {
|
|
668
671
|
if (u.current) {
|
|
669
672
|
u.current = !1;
|
|
670
673
|
return;
|
|
@@ -679,7 +682,7 @@ function es({
|
|
|
679
682
|
/* @__PURE__ */ t.jsx("p", { className: "text-foreground text-sm font-semibold", children: s })
|
|
680
683
|
] }),
|
|
681
684
|
/* @__PURE__ */ t.jsx(
|
|
682
|
-
|
|
685
|
+
b,
|
|
683
686
|
{
|
|
684
687
|
className: "col-start-2 row-span-2 row-start-1 cursor-pointer self-center justify-self-end",
|
|
685
688
|
variant: "secondary",
|
|
@@ -715,7 +718,7 @@ function es({
|
|
|
715
718
|
title: r("mysite_preview"),
|
|
716
719
|
tabIndex: -1,
|
|
717
720
|
sandbox: "allow-scripts allow-same-origin",
|
|
718
|
-
onLoad:
|
|
721
|
+
onLoad: h
|
|
719
722
|
},
|
|
720
723
|
n
|
|
721
724
|
),
|
|
@@ -744,7 +747,7 @@ function as({
|
|
|
744
747
|
const { t: r } = D();
|
|
745
748
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
746
749
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
747
|
-
/* @__PURE__ */ t.jsx(
|
|
750
|
+
/* @__PURE__ */ t.jsx(b, { variant: "ghost", size: "icon", onClick: l, children: /* @__PURE__ */ t.jsx(re, { className: "size-4" }) }),
|
|
748
751
|
/* @__PURE__ */ t.jsx("h1", { className: "text-foreground text-xl font-bold", children: r("choose_a_theme") })
|
|
749
752
|
] }),
|
|
750
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) => {
|
|
@@ -902,7 +905,7 @@ function os({
|
|
|
902
905
|
setNodeRef: o,
|
|
903
906
|
transform: d,
|
|
904
907
|
transition: u,
|
|
905
|
-
isDragging:
|
|
908
|
+
isDragging: h
|
|
906
909
|
} = we({ id: e.id }), m = {
|
|
907
910
|
transform: Le.Transform.toString(d),
|
|
908
911
|
transition: u
|
|
@@ -912,7 +915,7 @@ function os({
|
|
|
912
915
|
{
|
|
913
916
|
ref: o,
|
|
914
917
|
style: m,
|
|
915
|
-
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 ${h ? "opacity-50 shadow-lg" : ""}`,
|
|
916
919
|
children: [
|
|
917
920
|
/* @__PURE__ */ t.jsx(
|
|
918
921
|
"button",
|
|
@@ -931,7 +934,7 @@ function os({
|
|
|
931
934
|
] }),
|
|
932
935
|
/* @__PURE__ */ t.jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
933
936
|
/* @__PURE__ */ t.jsx(
|
|
934
|
-
|
|
937
|
+
b,
|
|
935
938
|
{
|
|
936
939
|
variant: "ghost",
|
|
937
940
|
size: "sm",
|
|
@@ -942,7 +945,7 @@ function os({
|
|
|
942
945
|
}
|
|
943
946
|
),
|
|
944
947
|
/* @__PURE__ */ t.jsx(
|
|
945
|
-
|
|
948
|
+
b,
|
|
946
949
|
{
|
|
947
950
|
variant: "ghost",
|
|
948
951
|
size: "sm",
|
|
@@ -963,14 +966,14 @@ function ds({
|
|
|
963
966
|
onToast: n
|
|
964
967
|
}) {
|
|
965
968
|
"use no memo";
|
|
966
|
-
const { t: a } = D(), { isMobile: l } = Pe(), r = i.useMemo(() => ls(a), [a]), { data: o = [], isLoading: d } = Ye(), u = We(),
|
|
969
|
+
const { t: a } = D(), { isMobile: l } = Pe(), r = i.useMemo(() => ls(a), [a]), { data: o = [], isLoading: d } = Ye(), u = We(), h = Qe(), m = Xe(), p = Ze(), [y, j] = i.useState(!1), [v, N] = i.useState(null), [P, C] = i.useState(!1), [f, M] = i.useState(null), {
|
|
967
970
|
register: k,
|
|
968
971
|
handleSubmit: R,
|
|
969
972
|
reset: L,
|
|
970
973
|
formState: { errors: S, isSubmitting: I }
|
|
971
974
|
} = _t(r, {
|
|
972
975
|
defaultValues: { title: "", url: "" }
|
|
973
|
-
}), F =
|
|
976
|
+
}), F = ge(
|
|
974
977
|
Y(Se),
|
|
975
978
|
Y(Ce, {
|
|
976
979
|
coordinateGetter: ke
|
|
@@ -978,21 +981,21 @@ function ds({
|
|
|
978
981
|
), K = i.useCallback(() => {
|
|
979
982
|
N(null), L({ title: "", url: "" }), j(!0);
|
|
980
983
|
}, [L]), H = i.useCallback(
|
|
981
|
-
(
|
|
982
|
-
N(
|
|
983
|
-
title:
|
|
984
|
-
url: Fe(
|
|
984
|
+
(g) => {
|
|
985
|
+
N(g), L({
|
|
986
|
+
title: g.title,
|
|
987
|
+
url: Fe(g.url)
|
|
985
988
|
}), j(!0);
|
|
986
989
|
},
|
|
987
990
|
[L]
|
|
988
991
|
), A = i.useCallback(() => {
|
|
989
992
|
j(!1), N(null), L({ title: "", url: "" });
|
|
990
993
|
}, [L]), Q = i.useCallback(
|
|
991
|
-
(
|
|
992
|
-
v ?
|
|
994
|
+
(g) => {
|
|
995
|
+
v ? h.mutate(
|
|
993
996
|
{
|
|
994
997
|
linkId: v.id,
|
|
995
|
-
body: { title:
|
|
998
|
+
body: { title: g.title, url: g.url }
|
|
996
999
|
},
|
|
997
1000
|
{
|
|
998
1001
|
onSuccess: () => {
|
|
@@ -1003,7 +1006,7 @@ function ds({
|
|
|
1003
1006
|
}
|
|
1004
1007
|
}
|
|
1005
1008
|
) : u.mutate(
|
|
1006
|
-
{ title:
|
|
1009
|
+
{ title: g.title, url: g.url },
|
|
1007
1010
|
{
|
|
1008
1011
|
onSuccess: () => {
|
|
1009
1012
|
n?.(a("button_created"), "success"), A(), s?.();
|
|
@@ -1017,18 +1020,18 @@ function ds({
|
|
|
1017
1020
|
[
|
|
1018
1021
|
v,
|
|
1019
1022
|
u,
|
|
1020
|
-
|
|
1023
|
+
h,
|
|
1021
1024
|
A,
|
|
1022
1025
|
s,
|
|
1023
1026
|
n,
|
|
1024
1027
|
a
|
|
1025
1028
|
]
|
|
1026
|
-
), x = i.useCallback((
|
|
1027
|
-
M(
|
|
1029
|
+
), x = i.useCallback((g) => {
|
|
1030
|
+
M(g), C(!0);
|
|
1028
1031
|
}, []), z = i.useCallback(() => {
|
|
1029
1032
|
C(!1), M(null);
|
|
1030
1033
|
}, []), O = i.useCallback(() => {
|
|
1031
|
-
|
|
1034
|
+
f && m.mutate(f.id, {
|
|
1032
1035
|
onSuccess: () => {
|
|
1033
1036
|
n?.(a("button_deleted"), "success"), z(), s?.();
|
|
1034
1037
|
},
|
|
@@ -1037,15 +1040,15 @@ function ds({
|
|
|
1037
1040
|
}
|
|
1038
1041
|
});
|
|
1039
1042
|
}, [
|
|
1040
|
-
|
|
1043
|
+
f,
|
|
1041
1044
|
m,
|
|
1042
1045
|
z,
|
|
1043
1046
|
s,
|
|
1044
1047
|
n,
|
|
1045
1048
|
a
|
|
1046
1049
|
]), X = i.useCallback(
|
|
1047
|
-
(
|
|
1048
|
-
const { active: q, over: Z } =
|
|
1050
|
+
(g) => {
|
|
1051
|
+
const { active: q, over: Z } = g;
|
|
1049
1052
|
if (Z && q.id !== Z.id) {
|
|
1050
1053
|
const ze = o.findIndex((U) => U.id === q.id), Te = o.findIndex((U) => U.id === Z.id), le = ye(o, ze, Te), Ae = le.map((U) => U.id);
|
|
1051
1054
|
p.mutate(
|
|
@@ -1066,15 +1069,15 @@ function ds({
|
|
|
1066
1069
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1067
1070
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1068
1071
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1069
|
-
/* @__PURE__ */ t.jsx(
|
|
1072
|
+
/* @__PURE__ */ t.jsx(b, { variant: "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ t.jsx(re, { className: "size-4" }) }),
|
|
1070
1073
|
/* @__PURE__ */ t.jsx("h1", { className: "text-foreground text-xl font-bold", children: a("buttons_heading") })
|
|
1071
1074
|
] }),
|
|
1072
|
-
/* @__PURE__ */ t.jsxs(
|
|
1073
|
-
/* @__PURE__ */ t.jsx(
|
|
1075
|
+
/* @__PURE__ */ t.jsxs(b, { size: "sm", onClick: K, children: [
|
|
1076
|
+
/* @__PURE__ */ t.jsx(he, { className: "mr-1 size-4" }),
|
|
1074
1077
|
a("add_button")
|
|
1075
1078
|
] })
|
|
1076
1079
|
] }),
|
|
1077
|
-
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((g, q) => /* @__PURE__ */ t.jsxs(
|
|
1078
1081
|
"div",
|
|
1079
1082
|
{
|
|
1080
1083
|
className: "border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4",
|
|
@@ -1093,8 +1096,8 @@ function ds({
|
|
|
1093
1096
|
q
|
|
1094
1097
|
)) }) : o.length === 0 ? /* @__PURE__ */ t.jsxs(B, { className: "p-6 text-center sm:p-8", children: [
|
|
1095
1098
|
/* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground mb-4", children: a("no_buttons_empty") }),
|
|
1096
|
-
/* @__PURE__ */ t.jsxs(
|
|
1097
|
-
/* @__PURE__ */ t.jsx(
|
|
1099
|
+
/* @__PURE__ */ t.jsxs(b, { size: "sm", onClick: K, children: [
|
|
1100
|
+
/* @__PURE__ */ t.jsx(he, { className: "mr-1 size-4" }),
|
|
1098
1101
|
a("add_button")
|
|
1099
1102
|
] })
|
|
1100
1103
|
] }) : /* @__PURE__ */ t.jsx(
|
|
@@ -1106,16 +1109,16 @@ function ds({
|
|
|
1106
1109
|
children: /* @__PURE__ */ t.jsx(
|
|
1107
1110
|
je,
|
|
1108
1111
|
{
|
|
1109
|
-
items: o.map((
|
|
1112
|
+
items: o.map((g) => g.id),
|
|
1110
1113
|
strategy: Ne,
|
|
1111
|
-
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((g) => /* @__PURE__ */ t.jsx(
|
|
1112
1115
|
os,
|
|
1113
1116
|
{
|
|
1114
|
-
link:
|
|
1117
|
+
link: g,
|
|
1115
1118
|
onEdit: H,
|
|
1116
1119
|
onDelete: x
|
|
1117
1120
|
},
|
|
1118
|
-
|
|
1121
|
+
g.id
|
|
1119
1122
|
)) })
|
|
1120
1123
|
}
|
|
1121
1124
|
)
|
|
@@ -1162,7 +1165,7 @@ function ds({
|
|
|
1162
1165
|
] }),
|
|
1163
1166
|
/* @__PURE__ */ t.jsxs(se, { className: "flex justify-between", children: [
|
|
1164
1167
|
v ? /* @__PURE__ */ t.jsxs(
|
|
1165
|
-
|
|
1168
|
+
b,
|
|
1166
1169
|
{
|
|
1167
1170
|
type: "button",
|
|
1168
1171
|
variant: "destructive",
|
|
@@ -1177,7 +1180,7 @@ function ds({
|
|
|
1177
1180
|
) : /* @__PURE__ */ t.jsx("div", {}),
|
|
1178
1181
|
/* @__PURE__ */ t.jsxs("div", { className: "flex gap-2", children: [
|
|
1179
1182
|
/* @__PURE__ */ t.jsx(
|
|
1180
|
-
|
|
1183
|
+
b,
|
|
1181
1184
|
{
|
|
1182
1185
|
type: "button",
|
|
1183
1186
|
variant: "outline",
|
|
@@ -1186,11 +1189,11 @@ function ds({
|
|
|
1186
1189
|
}
|
|
1187
1190
|
),
|
|
1188
1191
|
/* @__PURE__ */ t.jsx(
|
|
1189
|
-
|
|
1192
|
+
b,
|
|
1190
1193
|
{
|
|
1191
1194
|
type: "submit",
|
|
1192
|
-
disabled: I || u.isPending ||
|
|
1193
|
-
children: I || u.isPending ||
|
|
1195
|
+
disabled: I || u.isPending || h.isPending,
|
|
1196
|
+
children: I || u.isPending || h.isPending ? a("saving") : a("save")
|
|
1194
1197
|
}
|
|
1195
1198
|
)
|
|
1196
1199
|
] })
|
|
@@ -1210,11 +1213,11 @@ function ds({
|
|
|
1210
1213
|
size: "compact",
|
|
1211
1214
|
children: [
|
|
1212
1215
|
/* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground", children: a("delete_button_confirm", {
|
|
1213
|
-
name:
|
|
1216
|
+
name: f?.title ?? ""
|
|
1214
1217
|
}) }),
|
|
1215
1218
|
/* @__PURE__ */ t.jsxs(se, { children: [
|
|
1216
1219
|
/* @__PURE__ */ t.jsx(
|
|
1217
|
-
|
|
1220
|
+
b,
|
|
1218
1221
|
{
|
|
1219
1222
|
type: "button",
|
|
1220
1223
|
variant: "outline",
|
|
@@ -1223,7 +1226,7 @@ function ds({
|
|
|
1223
1226
|
}
|
|
1224
1227
|
),
|
|
1225
1228
|
/* @__PURE__ */ t.jsx(
|
|
1226
|
-
|
|
1229
|
+
b,
|
|
1227
1230
|
{
|
|
1228
1231
|
type: "button",
|
|
1229
1232
|
variant: "destructive",
|
|
@@ -1255,7 +1258,7 @@ function us({
|
|
|
1255
1258
|
transform: o,
|
|
1256
1259
|
transition: d,
|
|
1257
1260
|
isDragging: u
|
|
1258
|
-
} = we({ id: e.id }),
|
|
1261
|
+
} = we({ id: e.id }), h = {
|
|
1259
1262
|
transform: Le.Transform.toString(o),
|
|
1260
1263
|
transition: d
|
|
1261
1264
|
}, m = e.name ?? n("untitled"), p = e.image_url, y = cs[e.favoriteable_type], j = e.favoriteable_type !== "Product" ? y ? n(y) : e.favoriteable_type : null;
|
|
@@ -1263,7 +1266,7 @@ function us({
|
|
|
1263
1266
|
"div",
|
|
1264
1267
|
{
|
|
1265
1268
|
ref: r,
|
|
1266
|
-
style:
|
|
1269
|
+
style: h,
|
|
1267
1270
|
className: `border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4 ${u ? "opacity-50 shadow-lg" : ""}`,
|
|
1268
1271
|
children: [
|
|
1269
1272
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1293,7 +1296,7 @@ function us({
|
|
|
1293
1296
|
j ? /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground text-xs", children: j }) : null
|
|
1294
1297
|
] }),
|
|
1295
1298
|
/* @__PURE__ */ t.jsx("div", { className: "flex shrink-0 items-center gap-1", children: /* @__PURE__ */ t.jsx(
|
|
1296
|
-
|
|
1299
|
+
b,
|
|
1297
1300
|
{
|
|
1298
1301
|
variant: "ghost",
|
|
1299
1302
|
size: "sm",
|
|
@@ -1312,14 +1315,14 @@ function ms({
|
|
|
1312
1315
|
onRefreshPreview: s,
|
|
1313
1316
|
onToast: n
|
|
1314
1317
|
}) {
|
|
1315
|
-
const { t: a } = D(), { isMobile: l } = Pe(), { data: r = [], isLoading: o } = Je(), d = et(), u = tt(), [
|
|
1318
|
+
const { t: a } = D(), { isMobile: l } = Pe(), { data: r = [], isLoading: o } = Je(), d = et(), u = tt(), [h, m] = i.useState(!1), [p, y] = i.useState(null), j = ge(
|
|
1316
1319
|
Y(Se),
|
|
1317
1320
|
Y(Ce, {
|
|
1318
1321
|
coordinateGetter: ke
|
|
1319
1322
|
})
|
|
1320
1323
|
), v = i.useCallback(
|
|
1321
|
-
(
|
|
1322
|
-
y(
|
|
1324
|
+
(f) => {
|
|
1325
|
+
y(f), m(!0);
|
|
1323
1326
|
},
|
|
1324
1327
|
[]
|
|
1325
1328
|
), N = i.useCallback(() => {
|
|
@@ -1341,8 +1344,8 @@ function ms({
|
|
|
1341
1344
|
n,
|
|
1342
1345
|
a
|
|
1343
1346
|
]), C = i.useCallback(
|
|
1344
|
-
(
|
|
1345
|
-
const { active: M, over: k } =
|
|
1347
|
+
(f) => {
|
|
1348
|
+
const { active: M, over: k } = f;
|
|
1346
1349
|
if (k && M.id !== k.id) {
|
|
1347
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);
|
|
1348
1351
|
u.mutate(
|
|
@@ -1362,10 +1365,10 @@ function ms({
|
|
|
1362
1365
|
);
|
|
1363
1366
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1364
1367
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1365
|
-
/* @__PURE__ */ t.jsx(
|
|
1368
|
+
/* @__PURE__ */ t.jsx(b, { variant: "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ t.jsx(re, { className: "size-4" }) }),
|
|
1366
1369
|
/* @__PURE__ */ t.jsx("h1", { className: "text-foreground text-xl font-bold", children: a("content_heading") })
|
|
1367
1370
|
] }),
|
|
1368
|
-
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((f, M) => /* @__PURE__ */ t.jsxs(
|
|
1369
1372
|
"div",
|
|
1370
1373
|
{
|
|
1371
1374
|
className: "border-border bg-card flex items-center gap-3 rounded-lg border p-3 sm:p-4",
|
|
@@ -1389,15 +1392,15 @@ function ms({
|
|
|
1389
1392
|
children: /* @__PURE__ */ t.jsx(
|
|
1390
1393
|
je,
|
|
1391
1394
|
{
|
|
1392
|
-
items: r.map((
|
|
1395
|
+
items: r.map((f) => f.id),
|
|
1393
1396
|
strategy: Ne,
|
|
1394
|
-
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((f) => /* @__PURE__ */ t.jsx(
|
|
1395
1398
|
us,
|
|
1396
1399
|
{
|
|
1397
|
-
favorite:
|
|
1400
|
+
favorite: f,
|
|
1398
1401
|
onDelete: v
|
|
1399
1402
|
},
|
|
1400
|
-
|
|
1403
|
+
f.id
|
|
1401
1404
|
)) })
|
|
1402
1405
|
}
|
|
1403
1406
|
)
|
|
@@ -1406,7 +1409,7 @@ function ms({
|
|
|
1406
1409
|
/* @__PURE__ */ t.jsxs(
|
|
1407
1410
|
te,
|
|
1408
1411
|
{
|
|
1409
|
-
open:
|
|
1412
|
+
open: h,
|
|
1410
1413
|
onOpenChange: m,
|
|
1411
1414
|
title: a("remove_content_dialog"),
|
|
1412
1415
|
presentation: l ? "bottom-sheet" : "dialog",
|
|
@@ -1417,7 +1420,7 @@ function ms({
|
|
|
1417
1420
|
}) }),
|
|
1418
1421
|
/* @__PURE__ */ t.jsxs(se, { children: [
|
|
1419
1422
|
/* @__PURE__ */ t.jsx(
|
|
1420
|
-
|
|
1423
|
+
b,
|
|
1421
1424
|
{
|
|
1422
1425
|
type: "button",
|
|
1423
1426
|
variant: "outline",
|
|
@@ -1426,7 +1429,7 @@ function ms({
|
|
|
1426
1429
|
}
|
|
1427
1430
|
),
|
|
1428
1431
|
/* @__PURE__ */ t.jsx(
|
|
1429
|
-
|
|
1432
|
+
b,
|
|
1430
1433
|
{
|
|
1431
1434
|
type: "button",
|
|
1432
1435
|
variant: "destructive",
|
|
@@ -1450,17 +1453,17 @@ const ps = [
|
|
|
1450
1453
|
function $(e, s) {
|
|
1451
1454
|
Ke({ title: e, type: s });
|
|
1452
1455
|
}
|
|
1453
|
-
function
|
|
1456
|
+
function hs({
|
|
1454
1457
|
editingSection: e,
|
|
1455
1458
|
animPhase: s,
|
|
1456
1459
|
showEditContent: n,
|
|
1457
1460
|
onEditSection: a,
|
|
1458
1461
|
onBackClick: l
|
|
1459
1462
|
}) {
|
|
1460
|
-
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: h = [] } = st(), m = Ue(), p = at({
|
|
1461
1464
|
// The theme saves through here too, and only a slug write moves the URL.
|
|
1462
1465
|
onSuccess: (x) => x.slug === void 0 ? void 0 : $e(m)
|
|
1463
|
-
}), [y, j] = i.useState(0), v = i.useCallback(() => j((x) => x + 1), []), [N, P] = i.useState(null), C = N ?? d?.theme_id ??
|
|
1466
|
+
}), [y, j] = i.useState(0), v = i.useCallback(() => j((x) => x + 1), []), [N, P] = i.useState(null), C = N ?? d?.theme_id ?? h.find((x) => x.name === "Default")?.id ?? h[0]?.id ?? null, M = h.find((x) => x.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(
|
|
1464
1467
|
(x) => {
|
|
1465
1468
|
if (x.id === C) return;
|
|
1466
1469
|
const z = N;
|
|
@@ -1527,7 +1530,7 @@ function fs({
|
|
|
1527
1530
|
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(
|
|
1528
1531
|
as,
|
|
1529
1532
|
{
|
|
1530
|
-
themes:
|
|
1533
|
+
themes: h,
|
|
1531
1534
|
selectedThemeId: C,
|
|
1532
1535
|
onSelectTheme: I,
|
|
1533
1536
|
isPending: p.isPending,
|
|
@@ -1603,7 +1606,7 @@ function fs({
|
|
|
1603
1606
|
)
|
|
1604
1607
|
] });
|
|
1605
1608
|
}
|
|
1606
|
-
function
|
|
1609
|
+
function fs() {
|
|
1607
1610
|
const [e, s] = i.useState("idle"), [n, a] = i.useState(null), l = i.useRef([]);
|
|
1608
1611
|
i.useEffect(() => {
|
|
1609
1612
|
const m = l;
|
|
@@ -1622,16 +1625,16 @@ function hs() {
|
|
|
1622
1625
|
"exit-slide"
|
|
1623
1626
|
].includes(e), u = i.useCallback(
|
|
1624
1627
|
(m) => {
|
|
1625
|
-
r(), a(m), s("fade-out"), o("slide", T), o("fade-in", T +
|
|
1628
|
+
r(), a(m), s("fade-out"), o("slide", T), o("fade-in", T + V), o("editing", T + V + T);
|
|
1626
1629
|
},
|
|
1627
1630
|
[r, o]
|
|
1628
|
-
),
|
|
1629
|
-
r(), s("exit-fade-out"), o("exit-slide", T), o("exit-fade-in", T +
|
|
1631
|
+
), h = i.useCallback(() => {
|
|
1632
|
+
r(), s("exit-fade-out"), o("exit-slide", T), o("exit-fade-in", T + V);
|
|
1630
1633
|
const m = setTimeout(
|
|
1631
1634
|
() => {
|
|
1632
1635
|
s("idle"), a(null);
|
|
1633
1636
|
},
|
|
1634
|
-
T +
|
|
1637
|
+
T + V + T
|
|
1635
1638
|
);
|
|
1636
1639
|
l.current.push(m);
|
|
1637
1640
|
}, [r, o]);
|
|
@@ -1640,7 +1643,7 @@ function hs() {
|
|
|
1640
1643
|
animPhase: e,
|
|
1641
1644
|
showEditContent: d,
|
|
1642
1645
|
handleEditSection: u,
|
|
1643
|
-
handleBackClick:
|
|
1646
|
+
handleBackClick: h
|
|
1644
1647
|
};
|
|
1645
1648
|
}
|
|
1646
1649
|
function xs({
|
|
@@ -1653,18 +1656,18 @@ function xs({
|
|
|
1653
1656
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
1654
1657
|
...r
|
|
1655
1658
|
}) {
|
|
1656
|
-
return /* @__PURE__ */ t.jsx(Wt, { children: /* @__PURE__ */ t.jsx(
|
|
1659
|
+
return /* @__PURE__ */ t.jsx(Wt, { children: /* @__PURE__ */ t.jsx(bs, { ...r }) });
|
|
1657
1660
|
}
|
|
1658
|
-
function
|
|
1661
|
+
function bs(e) {
|
|
1659
1662
|
const { t: s } = D(), {
|
|
1660
1663
|
editingSection: n,
|
|
1661
1664
|
animPhase: a,
|
|
1662
1665
|
showEditContent: l,
|
|
1663
1666
|
handleEditSection: r,
|
|
1664
1667
|
handleBackClick: o
|
|
1665
|
-
} =
|
|
1666
|
-
(
|
|
1667
|
-
|
|
1668
|
+
} = 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
|
+
(h) => {
|
|
1670
|
+
h.preventDefault(), n !== null && o();
|
|
1668
1671
|
},
|
|
1669
1672
|
[n, o]
|
|
1670
1673
|
);
|
|
@@ -1682,7 +1685,7 @@ function gs(e) {
|
|
|
1682
1685
|
...e,
|
|
1683
1686
|
className: `h-full min-h-0 flex-1 ${e.className ?? ""}`,
|
|
1684
1687
|
children: /* @__PURE__ */ t.jsx(
|
|
1685
|
-
|
|
1688
|
+
hs,
|
|
1686
1689
|
{
|
|
1687
1690
|
editingSection: n,
|
|
1688
1691
|
animPhase: a,
|
|
@@ -1696,7 +1699,7 @@ function gs(e) {
|
|
|
1696
1699
|
] });
|
|
1697
1700
|
}
|
|
1698
1701
|
function Ds() {
|
|
1699
|
-
const { config: e } = qe(), { fetch: s } =
|
|
1702
|
+
const { config: e } = qe(), { fetch: s } = Ge(), { baseUrl: n, defaultHeaders: a, onAuthError: l } = e, r = i.useMemo(
|
|
1700
1703
|
() => $t(
|
|
1701
1704
|
Lt({
|
|
1702
1705
|
baseUrl: n,
|
|
@@ -1707,9 +1710,9 @@ function Ds() {
|
|
|
1707
1710
|
),
|
|
1708
1711
|
[n, a, l, s]
|
|
1709
1712
|
);
|
|
1710
|
-
return /* @__PURE__ */ t.jsx(it, { value: r, children: /* @__PURE__ */ t.jsx(
|
|
1713
|
+
return /* @__PURE__ */ t.jsx(it, { value: r, children: /* @__PURE__ */ t.jsx(gs, {}) });
|
|
1711
1714
|
}
|
|
1712
|
-
function
|
|
1715
|
+
function gs() {
|
|
1713
1716
|
const { error: e } = De();
|
|
1714
1717
|
if (e) throw e;
|
|
1715
1718
|
return /* @__PURE__ */ t.jsx(xs, {});
|