@fluid-app/fluid-cli-theme-dev 0.1.802 → 0.1.804
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 +51 -51
- package/dist/dist-cli-preview/account-screens.js +1 -1
- package/dist/dist-cli-preview/chunks/{MediaScreen-DR3Bw73s.js → MediaScreen-CyU-230G.js} +1 -1
- package/dist/dist-cli-preview/chunks/{MemberShareablesScreen-Cjp8ykma.js → MemberShareablesScreen-CQT2g8VF.js} +1 -1
- package/dist/dist-cli-preview/chunks/{MySiteScreen-H6AtTSxj.js → MySiteScreen-DXGS0LFN.js} +153 -153
- package/dist/dist-cli-preview/chunks/{PlaylistsScreen-B-JH1O8j.js → PlaylistsScreen-CFVbFfu1.js} +1 -1
- package/dist/dist-cli-preview/chunks/{ar-D_B30x0o.js → ar-D6FMqkKs.js} +61 -63
- package/dist/dist-cli-preview/chunks/{bg-CIgMfa9k.js → bg-DI_i8ro2.js} +64 -66
- package/dist/dist-cli-preview/chunks/{bn-BgnBXWHo.js → bn-OVwOOji9.js} +64 -66
- package/dist/dist-cli-preview/chunks/{cli-preview-Dsgkr5ti.js → cli-preview-DQYroZw8.js} +4 -4
- package/dist/dist-cli-preview/chunks/{cs-DmLSumGB.js → cs-D6JYJyQ_.js} +62 -64
- package/dist/dist-cli-preview/chunks/{da-EfkyseOR.js → da-CBnEaWaX.js} +69 -71
- package/dist/dist-cli-preview/chunks/{de-EARi-xk5.js → de-C1zLXvDu.js} +78 -80
- package/dist/dist-cli-preview/chunks/{el-BPz4rb5a.js → el-BYTCkiWl.js} +66 -68
- package/dist/dist-cli-preview/chunks/es-DWfGr0se.js +174 -0
- package/dist/dist-cli-preview/chunks/{fi-Bn9_l4IH.js → fi-D33EdpuR.js} +65 -67
- package/dist/dist-cli-preview/chunks/{fr-BSouGEGN.js → fr-Dj_yAPPa.js} +68 -70
- package/dist/dist-cli-preview/chunks/{he-BYEZTUry.js → he-BliLD1Uk.js} +66 -68
- package/dist/dist-cli-preview/chunks/{hi-BLnEaAml.js → hi-NOT9usCv.js} +67 -69
- package/dist/dist-cli-preview/chunks/{hr-B1T2UY_p.js → hr-BHq4o5jt.js} +64 -66
- package/dist/dist-cli-preview/chunks/{hu-cQw9hgLe.js → hu-CDp9q_Kf.js} +70 -72
- package/dist/dist-cli-preview/chunks/{id-Zd_5csjz.js → id-B22TPn2v.js} +72 -74
- package/dist/dist-cli-preview/chunks/{it-CmxC_FIJ.js → it-D4TNLbZa.js} +71 -73
- package/dist/dist-cli-preview/chunks/{ja-BcOunH2q.js → ja-DbkPbs7r.js} +61 -63
- package/dist/dist-cli-preview/chunks/{ko-CG_0ufw6.js → ko-BUqdySC2.js} +65 -67
- package/dist/dist-cli-preview/chunks/{mount-account-screen-uPkz5YjH.js → mount-account-screen-BKraHUbr.js} +2 -2
- package/dist/dist-cli-preview/chunks/{ms-DTN7PIDq.js → ms-CqLAlK1Y.js} +65 -67
- package/dist/dist-cli-preview/chunks/{navigate-account-screen-CuhkpeZR.js → navigate-account-screen-CYMLE6Sk.js} +1 -1
- package/dist/dist-cli-preview/chunks/{nl-x2lc8Ct5.js → nl-BPMGVN10.js} +66 -68
- package/dist/dist-cli-preview/chunks/{no-R8FScfrK.js → no-CI0iSYvt.js} +79 -81
- package/dist/dist-cli-preview/chunks/{pl-Bl9G1yOR.js → pl-Pug_uRwm.js} +62 -64
- package/dist/dist-cli-preview/chunks/{pt-nD60RpwN.js → pt-DKUBH1Ja.js} +72 -74
- package/dist/dist-cli-preview/chunks/{ro-D6ybG7vp.js → ro-iEx8zIUq.js} +68 -70
- package/dist/dist-cli-preview/chunks/{ru-C0oMeuhb.js → ru-DhQ1y0-t.js} +62 -64
- package/dist/dist-cli-preview/chunks/{sk-Bpdt_mn0.js → sk-fOZADVpn.js} +68 -70
- package/dist/dist-cli-preview/chunks/{sv-CEmTDhJy.js → sv-C-66jCvy.js} +76 -78
- package/dist/dist-cli-preview/chunks/{th-F8oLBw5n.js → th-Cv6TYs35.js} +64 -66
- package/dist/dist-cli-preview/chunks/{tl-BXIS85ly.js → tl-BA_pEBJJ.js} +68 -70
- package/dist/dist-cli-preview/chunks/{tr-YXIIDIEV.js → tr-BcK9nL8M.js} +66 -68
- package/dist/dist-cli-preview/chunks/{uk-CYYjeT-V.js → uk-1Fz0Q6zO.js} +64 -66
- package/dist/dist-cli-preview/chunks/{vi-DT4XS4HU.js → vi-BaCG5DnG.js} +65 -67
- package/dist/dist-cli-preview/chunks/{zh_CN-BeGANQIJ.js → zh_CN-BmS_FYBR.js} +23 -25
- package/dist/dist-cli-preview/chunks/{zh_TW-D9gGVyEb.js → zh_TW-LisCI6Yr.js} +27 -29
- package/package.json +2 -2
- package/dist/dist-cli-preview/chunks/es-CFZtv6aF.js +0 -176
|
@@ -1,14 +1,14 @@
|
|
|
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
|
|
2
|
-
import { C as B, h as ne, i as be, a as W, j as
|
|
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 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 be, a as W, j as Ge, 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
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
|
|
5
|
-
import { a as
|
|
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
|
+
import { a as ht, c as pt, b as ft, u as xt } from "./translation-api-context-factory-BEO-iYLb.js";
|
|
6
6
|
import { U as bt } from "./users-BwLXeQJs.js";
|
|
7
7
|
import { C as gt } 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
|
-
import { P as
|
|
11
|
-
import { u as
|
|
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 Me } 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
|
+
], Pe = 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
|
+
}), Mt = (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
|
+
}), Pt = (e) => e.client.get({
|
|
115
115
|
responseStyle: "data",
|
|
116
116
|
url: "/api/mysite/links",
|
|
117
117
|
...e
|
|
@@ -181,7 +181,7 @@ function xe(e) {
|
|
|
181
181
|
slug: e.slug ?? null
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function q(e) {
|
|
185
185
|
return {
|
|
186
186
|
id: e.id ?? 0,
|
|
187
187
|
url: e.url ?? "",
|
|
@@ -210,7 +210,7 @@ function Ut(e) {
|
|
|
210
210
|
preview_url: e.preview_url ?? null
|
|
211
211
|
};
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function Kt(e) {
|
|
214
214
|
return {
|
|
215
215
|
fetchProfile: async () => {
|
|
216
216
|
const s = await Et({ client: e });
|
|
@@ -231,7 +231,7 @@ function $t(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 ? Mt({
|
|
235
235
|
client: e,
|
|
236
236
|
body: { settings: { theme_id: s.theme_id } }
|
|
237
237
|
}) : Promise.resolve(),
|
|
@@ -241,13 +241,13 @@ function $t(e) {
|
|
|
241
241
|
}) : Promise.resolve()
|
|
242
242
|
]);
|
|
243
243
|
},
|
|
244
|
-
listLinks: async () => ((await
|
|
244
|
+
listLinks: async () => ((await Pt({ client: e })).links ?? []).map(q),
|
|
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 q(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 q(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(q),
|
|
267
267
|
listFavorites: async () => ((await It({ client: e })).favorites ?? []).map(J),
|
|
268
268
|
addFavorite: async (s) => {
|
|
269
269
|
const n = await Bt({
|
|
@@ -285,7 +285,7 @@ function $t(e) {
|
|
|
285
285
|
listThemes: async () => ((await Dt({ client: e })).themes ?? []).map(Ut)
|
|
286
286
|
};
|
|
287
287
|
}
|
|
288
|
-
const
|
|
288
|
+
const $t = {
|
|
289
289
|
heading: "MySite",
|
|
290
290
|
nav_profile: "Profile",
|
|
291
291
|
nav_theme: "Theme",
|
|
@@ -310,7 +310,7 @@ const Kt = {
|
|
|
310
310
|
remove: "Remove",
|
|
311
311
|
removing: "Removing...",
|
|
312
312
|
current_theme: "Current Theme",
|
|
313
|
-
|
|
313
|
+
view: "View",
|
|
314
314
|
mysite_preview: "MySite Preview",
|
|
315
315
|
no_site_configured: "No site configured",
|
|
316
316
|
choose_a_theme: "Choose a Theme",
|
|
@@ -375,127 +375,127 @@ const Kt = {
|
|
|
375
375
|
add_thumbnail: "Add Thumbnail",
|
|
376
376
|
replace_image: "Replace image",
|
|
377
377
|
thumbnail_update_failed: "Couldn't update thumbnail. Try again."
|
|
378
|
-
}, Ht =
|
|
379
|
-
fallback:
|
|
378
|
+
}, Ht = pt({
|
|
379
|
+
fallback: $t,
|
|
380
380
|
loaders: {
|
|
381
|
-
ar: () => import("./ar-
|
|
381
|
+
ar: () => import("./ar-D6FMqkKs.js").then(
|
|
382
382
|
(e) => e.default
|
|
383
383
|
),
|
|
384
|
-
bg: () => import("./bg-
|
|
384
|
+
bg: () => import("./bg-DI_i8ro2.js").then(
|
|
385
385
|
(e) => e.default
|
|
386
386
|
),
|
|
387
|
-
bn: () => import("./bn-
|
|
387
|
+
bn: () => import("./bn-OVwOOji9.js").then(
|
|
388
388
|
(e) => e.default
|
|
389
389
|
),
|
|
390
|
-
cs: () => import("./cs-
|
|
390
|
+
cs: () => import("./cs-D6JYJyQ_.js").then(
|
|
391
391
|
(e) => e.default
|
|
392
392
|
),
|
|
393
|
-
da: () => import("./da-
|
|
393
|
+
da: () => import("./da-CBnEaWaX.js").then(
|
|
394
394
|
(e) => e.default
|
|
395
395
|
),
|
|
396
|
-
de: () => import("./de-
|
|
396
|
+
de: () => import("./de-C1zLXvDu.js").then(
|
|
397
397
|
(e) => e.default
|
|
398
398
|
),
|
|
399
|
-
el: () => import("./el-
|
|
399
|
+
el: () => import("./el-BYTCkiWl.js").then(
|
|
400
400
|
(e) => e.default
|
|
401
401
|
),
|
|
402
|
-
es: () => import("./es-
|
|
402
|
+
es: () => import("./es-DWfGr0se.js").then(
|
|
403
403
|
(e) => e.default
|
|
404
404
|
),
|
|
405
|
-
fi: () => import("./fi-
|
|
405
|
+
fi: () => import("./fi-D33EdpuR.js").then(
|
|
406
406
|
(e) => e.default
|
|
407
407
|
),
|
|
408
|
-
fr: () => import("./fr-
|
|
408
|
+
fr: () => import("./fr-Dj_yAPPa.js").then(
|
|
409
409
|
(e) => e.default
|
|
410
410
|
),
|
|
411
|
-
he: () => import("./he-
|
|
411
|
+
he: () => import("./he-BliLD1Uk.js").then(
|
|
412
412
|
(e) => e.default
|
|
413
413
|
),
|
|
414
|
-
hi: () => import("./hi-
|
|
414
|
+
hi: () => import("./hi-NOT9usCv.js").then(
|
|
415
415
|
(e) => e.default
|
|
416
416
|
),
|
|
417
|
-
hr: () => import("./hr-
|
|
417
|
+
hr: () => import("./hr-BHq4o5jt.js").then(
|
|
418
418
|
(e) => e.default
|
|
419
419
|
),
|
|
420
|
-
hu: () => import("./hu-
|
|
420
|
+
hu: () => import("./hu-CDp9q_Kf.js").then(
|
|
421
421
|
(e) => e.default
|
|
422
422
|
),
|
|
423
|
-
id: () => import("./id-
|
|
423
|
+
id: () => import("./id-B22TPn2v.js").then(
|
|
424
424
|
(e) => e.default
|
|
425
425
|
),
|
|
426
|
-
it: () => import("./it-
|
|
426
|
+
it: () => import("./it-D4TNLbZa.js").then(
|
|
427
427
|
(e) => e.default
|
|
428
428
|
),
|
|
429
|
-
ja: () => import("./ja-
|
|
429
|
+
ja: () => import("./ja-DbkPbs7r.js").then(
|
|
430
430
|
(e) => e.default
|
|
431
431
|
),
|
|
432
|
-
ko: () => import("./ko-
|
|
432
|
+
ko: () => import("./ko-BUqdySC2.js").then(
|
|
433
433
|
(e) => e.default
|
|
434
434
|
),
|
|
435
|
-
ms: () => import("./ms-
|
|
435
|
+
ms: () => import("./ms-CqLAlK1Y.js").then(
|
|
436
436
|
(e) => e.default
|
|
437
437
|
),
|
|
438
|
-
nl: () => import("./nl-
|
|
438
|
+
nl: () => import("./nl-BPMGVN10.js").then(
|
|
439
439
|
(e) => e.default
|
|
440
440
|
),
|
|
441
|
-
no: () => import("./no-
|
|
441
|
+
no: () => import("./no-CI0iSYvt.js").then(
|
|
442
442
|
(e) => e.default
|
|
443
443
|
),
|
|
444
|
-
pl: () => import("./pl-
|
|
444
|
+
pl: () => import("./pl-Pug_uRwm.js").then(
|
|
445
445
|
(e) => e.default
|
|
446
446
|
),
|
|
447
|
-
pt: () => import("./pt-
|
|
447
|
+
pt: () => import("./pt-DKUBH1Ja.js").then(
|
|
448
448
|
(e) => e.default
|
|
449
449
|
),
|
|
450
|
-
ro: () => import("./ro-
|
|
450
|
+
ro: () => import("./ro-iEx8zIUq.js").then(
|
|
451
451
|
(e) => e.default
|
|
452
452
|
),
|
|
453
|
-
ru: () => import("./ru-
|
|
453
|
+
ru: () => import("./ru-DhQ1y0-t.js").then(
|
|
454
454
|
(e) => e.default
|
|
455
455
|
),
|
|
456
|
-
sk: () => import("./sk-
|
|
456
|
+
sk: () => import("./sk-fOZADVpn.js").then(
|
|
457
457
|
(e) => e.default
|
|
458
458
|
),
|
|
459
|
-
sv: () => import("./sv-
|
|
459
|
+
sv: () => import("./sv-C-66jCvy.js").then(
|
|
460
460
|
(e) => e.default
|
|
461
461
|
),
|
|
462
|
-
th: () => import("./th-
|
|
462
|
+
th: () => import("./th-Cv6TYs35.js").then(
|
|
463
463
|
(e) => e.default
|
|
464
464
|
),
|
|
465
|
-
tl: () => import("./tl-
|
|
465
|
+
tl: () => import("./tl-BA_pEBJJ.js").then(
|
|
466
466
|
(e) => e.default
|
|
467
467
|
),
|
|
468
|
-
tr: () => import("./tr-
|
|
468
|
+
tr: () => import("./tr-BcK9nL8M.js").then(
|
|
469
469
|
(e) => e.default
|
|
470
470
|
),
|
|
471
|
-
uk: () => import("./uk-
|
|
471
|
+
uk: () => import("./uk-1Fz0Q6zO.js").then(
|
|
472
472
|
(e) => e.default
|
|
473
473
|
),
|
|
474
|
-
vi: () => import("./vi-
|
|
474
|
+
vi: () => import("./vi-BaCG5DnG.js").then(
|
|
475
475
|
(e) => e.default
|
|
476
476
|
),
|
|
477
|
-
zh_CN: () => import("./zh_CN-
|
|
477
|
+
zh_CN: () => import("./zh_CN-BmS_FYBR.js").then(
|
|
478
478
|
(e) => e.default
|
|
479
479
|
),
|
|
480
|
-
zh_TW: () => import("./zh_TW-
|
|
480
|
+
zh_TW: () => import("./zh_TW-LisCI6Yr.js").then(
|
|
481
481
|
(e) => e.default
|
|
482
482
|
)
|
|
483
483
|
}
|
|
484
484
|
});
|
|
485
|
-
function
|
|
486
|
-
return
|
|
485
|
+
function Vt(e, s) {
|
|
486
|
+
return ht(e, s);
|
|
487
487
|
}
|
|
488
|
-
const { Provider:
|
|
488
|
+
const { Provider: qt, useTranslation: Gt } = ft("Mysite"), Yt = qt, D = Gt;
|
|
489
489
|
function Wt({
|
|
490
490
|
children: e
|
|
491
491
|
}) {
|
|
492
492
|
const { locale: s } = Ie(), n = xt(Ht, s), a = i.useMemo(
|
|
493
|
-
() =>
|
|
493
|
+
() => Vt(s, n),
|
|
494
494
|
[s, n]
|
|
495
495
|
);
|
|
496
496
|
return /* @__PURE__ */ t.jsx(Yt, { value: a, children: e });
|
|
497
497
|
}
|
|
498
|
-
const T = 300,
|
|
498
|
+
const T = 300, G = 500;
|
|
499
499
|
function Qt(e) {
|
|
500
500
|
switch (e) {
|
|
501
501
|
case "idle":
|
|
@@ -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
|
-
|
|
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, p] = i.useState(!1), [m, h] = i.useState(d), [y, j] = i.useState(!1), v = i.useCallback(() => {
|
|
568
|
+
h(d), p(!0);
|
|
569
569
|
}, [d]), N = i.useCallback(() => {
|
|
570
|
-
|
|
571
|
-
}, [d]),
|
|
570
|
+
p(!1), h(d);
|
|
571
|
+
}, [d]), M = i.useCallback(async () => {
|
|
572
572
|
const f = m.trim();
|
|
573
573
|
if (!f) {
|
|
574
574
|
a?.(l("slug_empty_error"), "error");
|
|
575
575
|
return;
|
|
576
576
|
}
|
|
577
577
|
if (f === d) {
|
|
578
|
-
|
|
578
|
+
p(!1);
|
|
579
579
|
return;
|
|
580
580
|
}
|
|
581
581
|
if (n) {
|
|
582
582
|
j(!0);
|
|
583
583
|
try {
|
|
584
|
-
await n(f), a?.(l("link_updated"), "success"),
|
|
584
|
+
await n(f), a?.(l("link_updated"), "success"), p(!1);
|
|
585
585
|
} catch {
|
|
586
586
|
a?.(l("link_update_failed"), "error");
|
|
587
587
|
} finally {
|
|
@@ -599,7 +599,7 @@ function Jt({
|
|
|
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
601
|
/* @__PURE__ */ t.jsx(be, { className: "text-sm", children: l("your_mysite_link") }),
|
|
602
|
-
!u && n && /* @__PURE__ */ t.jsx(
|
|
602
|
+
!u && n && /* @__PURE__ */ t.jsx(Ge, { children: /* @__PURE__ */ t.jsx(b, { 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: (f) =>
|
|
613
|
+
onChange: (f) => h(f.target.value),
|
|
614
614
|
onKeyDown: (f) => {
|
|
615
|
-
f.key === "Enter" && !y &&
|
|
615
|
+
f.key === "Enter" && !y && M(), f.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
|
|
@@ -649,7 +649,7 @@ function Jt({
|
|
|
649
649
|
children: l("cancel")
|
|
650
650
|
}
|
|
651
651
|
),
|
|
652
|
-
/* @__PURE__ */ t.jsx(b, { size: "sm", onClick:
|
|
652
|
+
/* @__PURE__ */ t.jsx(b, { size: "sm", onClick: M, disabled: y, children: l(y ? "saving" : "save") })
|
|
653
653
|
] }) })
|
|
654
654
|
}
|
|
655
655
|
)
|
|
@@ -661,13 +661,13 @@ function es({
|
|
|
661
661
|
themeName: s,
|
|
662
662
|
previewKey: n,
|
|
663
663
|
isUpdating: a,
|
|
664
|
-
|
|
664
|
+
onView: l
|
|
665
665
|
}) {
|
|
666
666
|
const { t: r } = D(), o = i.useRef(null), d = `${e}?preview=true`, u = i.useRef(!0);
|
|
667
667
|
i.useEffect(() => {
|
|
668
668
|
u.current = !0;
|
|
669
669
|
}, [n]);
|
|
670
|
-
const
|
|
670
|
+
const p = () => {
|
|
671
671
|
if (u.current) {
|
|
672
672
|
u.current = !1;
|
|
673
673
|
return;
|
|
@@ -689,7 +689,7 @@ function es({
|
|
|
689
689
|
size: "sm",
|
|
690
690
|
onClick: l,
|
|
691
691
|
disabled: !e,
|
|
692
|
-
children: r("
|
|
692
|
+
children: r("view")
|
|
693
693
|
}
|
|
694
694
|
)
|
|
695
695
|
] }),
|
|
@@ -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: p
|
|
722
722
|
},
|
|
723
723
|
n
|
|
724
724
|
),
|
|
@@ -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(Pe, { 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,17 +905,17 @@ function os({
|
|
|
905
905
|
setNodeRef: o,
|
|
906
906
|
transform: d,
|
|
907
907
|
transition: u,
|
|
908
|
-
isDragging:
|
|
908
|
+
isDragging: p
|
|
909
909
|
} = we({ id: e.id }), m = {
|
|
910
910
|
transform: Le.Transform.toString(d),
|
|
911
911
|
transition: u
|
|
912
|
-
},
|
|
912
|
+
}, h = Fe(e.url), y = h.length > 40 ? `${h.substring(0, 40)}...` : h;
|
|
913
913
|
return /* @__PURE__ */ t.jsxs(
|
|
914
914
|
"div",
|
|
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 ${p ? "opacity-50 shadow-lg" : ""}`,
|
|
919
919
|
children: [
|
|
920
920
|
/* @__PURE__ */ t.jsx(
|
|
921
921
|
"button",
|
|
@@ -966,7 +966,7 @@ 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 } = Me(), r = i.useMemo(() => ls(a), [a]), { data: o = [], isLoading: d } = Ye(), u = We(), p = Qe(), m = Xe(), h = Ze(), [y, j] = i.useState(!1), [v, N] = i.useState(null), [M, C] = i.useState(!1), [f, P] = i.useState(null), {
|
|
970
970
|
register: k,
|
|
971
971
|
handleSubmit: R,
|
|
972
972
|
reset: L,
|
|
@@ -978,7 +978,7 @@ function ds({
|
|
|
978
978
|
Y(Ce, {
|
|
979
979
|
coordinateGetter: ke
|
|
980
980
|
})
|
|
981
|
-
),
|
|
981
|
+
), $ = i.useCallback(() => {
|
|
982
982
|
N(null), L({ title: "", url: "" }), j(!0);
|
|
983
983
|
}, [L]), H = i.useCallback(
|
|
984
984
|
(g) => {
|
|
@@ -992,7 +992,7 @@ function ds({
|
|
|
992
992
|
j(!1), N(null), L({ title: "", url: "" });
|
|
993
993
|
}, [L]), Q = i.useCallback(
|
|
994
994
|
(g) => {
|
|
995
|
-
v ?
|
|
995
|
+
v ? p.mutate(
|
|
996
996
|
{
|
|
997
997
|
linkId: v.id,
|
|
998
998
|
body: { title: g.title, url: g.url }
|
|
@@ -1020,16 +1020,16 @@ function ds({
|
|
|
1020
1020
|
[
|
|
1021
1021
|
v,
|
|
1022
1022
|
u,
|
|
1023
|
-
|
|
1023
|
+
p,
|
|
1024
1024
|
A,
|
|
1025
1025
|
s,
|
|
1026
1026
|
n,
|
|
1027
1027
|
a
|
|
1028
1028
|
]
|
|
1029
1029
|
), x = i.useCallback((g) => {
|
|
1030
|
-
|
|
1030
|
+
P(g), C(!0);
|
|
1031
1031
|
}, []), z = i.useCallback(() => {
|
|
1032
|
-
C(!1),
|
|
1032
|
+
C(!1), P(null);
|
|
1033
1033
|
}, []), O = i.useCallback(() => {
|
|
1034
1034
|
f && m.mutate(f.id, {
|
|
1035
1035
|
onSuccess: () => {
|
|
@@ -1048,10 +1048,10 @@ function ds({
|
|
|
1048
1048
|
a
|
|
1049
1049
|
]), X = i.useCallback(
|
|
1050
1050
|
(g) => {
|
|
1051
|
-
const { active:
|
|
1052
|
-
if (Z &&
|
|
1053
|
-
const ze = o.findIndex((U) => U.id ===
|
|
1054
|
-
|
|
1051
|
+
const { active: V, over: Z } = g;
|
|
1052
|
+
if (Z && V.id !== Z.id) {
|
|
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
|
+
h.mutate(
|
|
1055
1055
|
{ orderedIds: Ae, optimisticItems: le },
|
|
1056
1056
|
{
|
|
1057
1057
|
onSuccess: () => {
|
|
@@ -1064,7 +1064,7 @@ function ds({
|
|
|
1064
1064
|
);
|
|
1065
1065
|
}
|
|
1066
1066
|
},
|
|
1067
|
-
[o,
|
|
1067
|
+
[o, h, s, n, a]
|
|
1068
1068
|
);
|
|
1069
1069
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1070
1070
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
@@ -1072,12 +1072,12 @@ function ds({
|
|
|
1072
1072
|
/* @__PURE__ */ t.jsx(b, { 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(b, { size: "sm", onClick:
|
|
1076
|
-
/* @__PURE__ */ t.jsx(
|
|
1075
|
+
/* @__PURE__ */ t.jsxs(b, { size: "sm", onClick: $, children: [
|
|
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((g,
|
|
1080
|
+
d ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: Array.from({ length: 3 }).map((g, 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",
|
|
@@ -1093,11 +1093,11 @@ function ds({
|
|
|
1093
1093
|
] })
|
|
1094
1094
|
]
|
|
1095
1095
|
},
|
|
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(b, { size: "sm", onClick:
|
|
1100
|
-
/* @__PURE__ */ t.jsx(
|
|
1099
|
+
/* @__PURE__ */ t.jsxs(b, { size: "sm", onClick: $, children: [
|
|
1100
|
+
/* @__PURE__ */ t.jsx(pe, { className: "mr-1 size-4" }),
|
|
1101
1101
|
a("add_button")
|
|
1102
1102
|
] })
|
|
1103
1103
|
] }) : /* @__PURE__ */ t.jsx(
|
|
@@ -1192,8 +1192,8 @@ function ds({
|
|
|
1192
1192
|
b,
|
|
1193
1193
|
{
|
|
1194
1194
|
type: "submit",
|
|
1195
|
-
disabled: I || u.isPending ||
|
|
1196
|
-
children: I || u.isPending ||
|
|
1195
|
+
disabled: I || u.isPending || p.isPending,
|
|
1196
|
+
children: I || u.isPending || p.isPending ? a("saving") : a("save")
|
|
1197
1197
|
}
|
|
1198
1198
|
)
|
|
1199
1199
|
] })
|
|
@@ -1206,7 +1206,7 @@ function ds({
|
|
|
1206
1206
|
/* @__PURE__ */ t.jsxs(
|
|
1207
1207
|
te,
|
|
1208
1208
|
{
|
|
1209
|
-
open:
|
|
1209
|
+
open: M,
|
|
1210
1210
|
onOpenChange: C,
|
|
1211
1211
|
title: a("delete_button_dialog"),
|
|
1212
1212
|
presentation: l ? "bottom-sheet" : "dialog",
|
|
@@ -1258,15 +1258,15 @@ function us({
|
|
|
1258
1258
|
transform: o,
|
|
1259
1259
|
transition: d,
|
|
1260
1260
|
isDragging: u
|
|
1261
|
-
} = we({ id: e.id }),
|
|
1261
|
+
} = we({ id: e.id }), p = {
|
|
1262
1262
|
transform: Le.Transform.toString(o),
|
|
1263
1263
|
transition: d
|
|
1264
|
-
}, m = e.name ?? n("untitled"),
|
|
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;
|
|
1265
1265
|
return /* @__PURE__ */ t.jsxs(
|
|
1266
1266
|
"div",
|
|
1267
1267
|
{
|
|
1268
1268
|
ref: r,
|
|
1269
|
-
style:
|
|
1269
|
+
style: p,
|
|
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(
|
|
@@ -1280,10 +1280,10 @@ function us({
|
|
|
1280
1280
|
children: /* @__PURE__ */ t.jsx(Ee, { className: "size-5" })
|
|
1281
1281
|
}
|
|
1282
1282
|
),
|
|
1283
|
-
/* @__PURE__ */ t.jsx("div", { className: "bg-muted size-10 shrink-0 overflow-hidden rounded-md", children:
|
|
1283
|
+
/* @__PURE__ */ t.jsx("div", { className: "bg-muted size-10 shrink-0 overflow-hidden rounded-md", children: h ? /* @__PURE__ */ t.jsx(
|
|
1284
1284
|
"img",
|
|
1285
1285
|
{
|
|
1286
|
-
src:
|
|
1286
|
+
src: h,
|
|
1287
1287
|
alt: m,
|
|
1288
1288
|
loading: "lazy",
|
|
1289
1289
|
width: 40,
|
|
@@ -1315,7 +1315,7 @@ 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 } = Me(), { data: r = [], isLoading: o } = Je(), d = et(), u = tt(), [p, m] = i.useState(!1), [h, y] = i.useState(null), j = ge(
|
|
1319
1319
|
Y(Se),
|
|
1320
1320
|
Y(Ce, {
|
|
1321
1321
|
coordinateGetter: ke
|
|
@@ -1327,8 +1327,8 @@ function ms({
|
|
|
1327
1327
|
[]
|
|
1328
1328
|
), N = i.useCallback(() => {
|
|
1329
1329
|
m(!1), y(null);
|
|
1330
|
-
}, []),
|
|
1331
|
-
|
|
1330
|
+
}, []), M = i.useCallback(() => {
|
|
1331
|
+
h && d.mutate(h.id, {
|
|
1332
1332
|
onSuccess: () => {
|
|
1333
1333
|
n?.(a("content_removed"), "success"), N(), s?.();
|
|
1334
1334
|
},
|
|
@@ -1337,7 +1337,7 @@ function ms({
|
|
|
1337
1337
|
}
|
|
1338
1338
|
});
|
|
1339
1339
|
}, [
|
|
1340
|
-
|
|
1340
|
+
h,
|
|
1341
1341
|
d,
|
|
1342
1342
|
N,
|
|
1343
1343
|
s,
|
|
@@ -1345,9 +1345,9 @@ function ms({
|
|
|
1345
1345
|
a
|
|
1346
1346
|
]), C = i.useCallback(
|
|
1347
1347
|
(f) => {
|
|
1348
|
-
const { active:
|
|
1349
|
-
if (k &&
|
|
1350
|
-
const R = r.findIndex((F) => F.id ===
|
|
1348
|
+
const { active: P, over: k } = f;
|
|
1349
|
+
if (k && P.id !== k.id) {
|
|
1350
|
+
const R = r.findIndex((F) => F.id === P.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
|
{
|
|
@@ -1368,7 +1368,7 @@ function ms({
|
|
|
1368
1368
|
/* @__PURE__ */ t.jsx(b, { 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((f,
|
|
1371
|
+
o ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: Array.from({ length: 3 }).map((f, P) => /* @__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
|
+
P
|
|
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
|
{
|
|
@@ -1409,14 +1409,14 @@ function ms({
|
|
|
1409
1409
|
/* @__PURE__ */ t.jsxs(
|
|
1410
1410
|
te,
|
|
1411
1411
|
{
|
|
1412
|
-
open:
|
|
1412
|
+
open: p,
|
|
1413
1413
|
onOpenChange: m,
|
|
1414
1414
|
title: a("remove_content_dialog"),
|
|
1415
1415
|
presentation: l ? "bottom-sheet" : "dialog",
|
|
1416
1416
|
size: "compact",
|
|
1417
1417
|
children: [
|
|
1418
1418
|
/* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground", children: a("remove_content_confirm", {
|
|
1419
|
-
name:
|
|
1419
|
+
name: h?.name ?? a("untitled")
|
|
1420
1420
|
}) }),
|
|
1421
1421
|
/* @__PURE__ */ t.jsxs(se, { children: [
|
|
1422
1422
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1433,7 +1433,7 @@ function ms({
|
|
|
1433
1433
|
{
|
|
1434
1434
|
type: "button",
|
|
1435
1435
|
variant: "destructive",
|
|
1436
|
-
onClick:
|
|
1436
|
+
onClick: M,
|
|
1437
1437
|
disabled: d.isPending,
|
|
1438
1438
|
children: d.isPending ? a("removing") : a("remove")
|
|
1439
1439
|
}
|
|
@@ -1444,37 +1444,37 @@ function ms({
|
|
|
1444
1444
|
)
|
|
1445
1445
|
] });
|
|
1446
1446
|
}
|
|
1447
|
-
const
|
|
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: Pe },
|
|
1450
1450
|
{ labelKey: "nav_content", key: "content", icon: rt },
|
|
1451
1451
|
{ labelKey: "nav_buttons", key: "buttons", icon: Ct }
|
|
1452
1452
|
];
|
|
1453
|
-
function
|
|
1454
|
-
|
|
1453
|
+
function K(e, s) {
|
|
1454
|
+
$e({ title: e, type: s });
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1456
|
+
function ps({
|
|
1457
1457
|
editingSection: e,
|
|
1458
1458
|
animPhase: s,
|
|
1459
1459
|
showEditContent: n,
|
|
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: p = [] } = st(), m = Ue(), h = at({
|
|
1464
1464
|
// The theme saves through here too, and only a slug write moves the URL.
|
|
1465
|
-
onSuccess: (x) => x.slug === void 0 ? void 0 :
|
|
1466
|
-
}), [y, j] = i.useState(0), v = i.useCallback(() => j((x) => x + 1), []), [N,
|
|
1465
|
+
onSuccess: (x) => x.slug === void 0 ? void 0 : Ke(m)
|
|
1466
|
+
}), [y, j] = i.useState(0), v = i.useCallback(() => j((x) => x + 1), []), [N, M] = i.useState(null), C = N ?? d?.theme_id ?? p.find((x) => x.name === "Default")?.id ?? p[0]?.id ?? null, P = p.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(
|
|
1467
1467
|
(x) => {
|
|
1468
1468
|
if (x.id === C) return;
|
|
1469
1469
|
const z = N;
|
|
1470
|
-
|
|
1470
|
+
M(x.id), h.mutate(
|
|
1471
1471
|
{ theme_id: x.id },
|
|
1472
1472
|
{
|
|
1473
1473
|
onSuccess: () => {
|
|
1474
|
-
|
|
1474
|
+
K(r("theme_changed", { name: x.name }), "success"), v();
|
|
1475
1475
|
},
|
|
1476
1476
|
onError: () => {
|
|
1477
|
-
|
|
1477
|
+
M(z), K(r("theme_update_failed"), "error");
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
1480
|
);
|
|
@@ -1482,14 +1482,14 @@ function hs({
|
|
|
1482
1482
|
[
|
|
1483
1483
|
C,
|
|
1484
1484
|
N,
|
|
1485
|
-
|
|
1485
|
+
h,
|
|
1486
1486
|
v,
|
|
1487
1487
|
r
|
|
1488
1488
|
]
|
|
1489
1489
|
), F = i.useCallback(
|
|
1490
1490
|
async (x) => {
|
|
1491
1491
|
await new Promise((z, O) => {
|
|
1492
|
-
|
|
1492
|
+
h.mutate(
|
|
1493
1493
|
{ slug: x },
|
|
1494
1494
|
{
|
|
1495
1495
|
onSuccess: () => z(),
|
|
@@ -1498,9 +1498,9 @@ function hs({
|
|
|
1498
1498
|
);
|
|
1499
1499
|
});
|
|
1500
1500
|
},
|
|
1501
|
-
[
|
|
1502
|
-
),
|
|
1503
|
-
k && window.open(
|
|
1501
|
+
[h]
|
|
1502
|
+
), $ = i.useCallback(() => {
|
|
1503
|
+
k && window.open(k, "_blank");
|
|
1504
1504
|
}, [k]), H = i.useMemo(() => e === "theme" ? r("nav_theme") : e === "buttons" ? r("nav_buttons") : e === "content" ? r("nav_content") : "", [e, r]);
|
|
1505
1505
|
if (u)
|
|
1506
1506
|
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,10 +1530,10 @@ function hs({
|
|
|
1530
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(
|
|
1531
1531
|
as,
|
|
1532
1532
|
{
|
|
1533
|
-
themes:
|
|
1533
|
+
themes: p,
|
|
1534
1534
|
selectedThemeId: C,
|
|
1535
1535
|
onSelectTheme: I,
|
|
1536
|
-
isPending:
|
|
1536
|
+
isPending: h.isPending,
|
|
1537
1537
|
onBack: l
|
|
1538
1538
|
}
|
|
1539
1539
|
) : n && e === "buttons" ? /* @__PURE__ */ t.jsx(
|
|
@@ -1541,14 +1541,14 @@ function hs({
|
|
|
1541
1541
|
{
|
|
1542
1542
|
onBack: l,
|
|
1543
1543
|
onRefreshPreview: v,
|
|
1544
|
-
onToast:
|
|
1544
|
+
onToast: K
|
|
1545
1545
|
}
|
|
1546
1546
|
) : n && e === "content" ? /* @__PURE__ */ t.jsx(
|
|
1547
1547
|
ms,
|
|
1548
1548
|
{
|
|
1549
1549
|
onBack: l,
|
|
1550
1550
|
onRefreshPreview: v,
|
|
1551
|
-
onToast:
|
|
1551
|
+
onToast: K
|
|
1552
1552
|
}
|
|
1553
1553
|
) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1554
1554
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -1565,10 +1565,10 @@ function hs({
|
|
|
1565
1565
|
mysiteUrl: k,
|
|
1566
1566
|
displayUrl: R,
|
|
1567
1567
|
onUpdateSlug: F,
|
|
1568
|
-
onToast:
|
|
1568
|
+
onToast: K
|
|
1569
1569
|
}
|
|
1570
1570
|
),
|
|
1571
|
-
/* @__PURE__ */ t.jsx("div", { className: "border-border bg-card divide-border divide-y overflow-hidden rounded-lg border", children:
|
|
1571
|
+
/* @__PURE__ */ t.jsx("div", { className: "border-border bg-card divide-border divide-y overflow-hidden rounded-lg border", children: hs.map((x) => {
|
|
1572
1572
|
const z = x.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 x ? () => o(x.slug) : () => a(x.key);
|
|
1573
1573
|
return /* @__PURE__ */ t.jsxs(
|
|
1574
1574
|
"button",
|
|
@@ -1596,10 +1596,10 @@ function hs({
|
|
|
1596
1596
|
es,
|
|
1597
1597
|
{
|
|
1598
1598
|
mysiteUrl: k,
|
|
1599
|
-
themeName:
|
|
1599
|
+
themeName: P,
|
|
1600
1600
|
previewKey: y,
|
|
1601
|
-
isUpdating:
|
|
1602
|
-
|
|
1601
|
+
isUpdating: h.isPending,
|
|
1602
|
+
onView: $
|
|
1603
1603
|
}
|
|
1604
1604
|
)
|
|
1605
1605
|
}
|
|
@@ -1614,8 +1614,8 @@ function fs() {
|
|
|
1614
1614
|
}, []);
|
|
1615
1615
|
const r = i.useCallback(() => {
|
|
1616
1616
|
l.current.forEach(clearTimeout), l.current = [];
|
|
1617
|
-
}, []), o = i.useCallback((m,
|
|
1618
|
-
const y = setTimeout(() => s(m),
|
|
1617
|
+
}, []), o = i.useCallback((m, h) => {
|
|
1618
|
+
const y = setTimeout(() => s(m), h);
|
|
1619
1619
|
l.current.push(y);
|
|
1620
1620
|
}, []), d = [
|
|
1621
1621
|
"slide",
|
|
@@ -1625,16 +1625,16 @@ function fs() {
|
|
|
1625
1625
|
"exit-slide"
|
|
1626
1626
|
].includes(e), u = i.useCallback(
|
|
1627
1627
|
(m) => {
|
|
1628
|
-
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 + G), o("editing", T + G + T);
|
|
1629
1629
|
},
|
|
1630
1630
|
[r, o]
|
|
1631
|
-
),
|
|
1632
|
-
r(), s("exit-fade-out"), o("exit-slide", T), o("exit-fade-in", T +
|
|
1631
|
+
), p = i.useCallback(() => {
|
|
1632
|
+
r(), s("exit-fade-out"), o("exit-slide", T), o("exit-fade-in", T + G);
|
|
1633
1633
|
const m = setTimeout(
|
|
1634
1634
|
() => {
|
|
1635
1635
|
s("idle"), a(null);
|
|
1636
1636
|
},
|
|
1637
|
-
T +
|
|
1637
|
+
T + G + T
|
|
1638
1638
|
);
|
|
1639
1639
|
l.current.push(m);
|
|
1640
1640
|
}, [r, o]);
|
|
@@ -1643,7 +1643,7 @@ function fs() {
|
|
|
1643
1643
|
animPhase: e,
|
|
1644
1644
|
showEditContent: d,
|
|
1645
1645
|
handleEditSection: u,
|
|
1646
|
-
handleBackClick:
|
|
1646
|
+
handleBackClick: p
|
|
1647
1647
|
};
|
|
1648
1648
|
}
|
|
1649
1649
|
function xs({
|
|
@@ -1666,17 +1666,17 @@ function bs(e) {
|
|
|
1666
1666
|
handleEditSection: r,
|
|
1667
1667
|
handleBackClick: o
|
|
1668
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
|
-
(
|
|
1670
|
-
|
|
1669
|
+
(p) => {
|
|
1670
|
+
p.preventDefault(), n !== null && o();
|
|
1671
1671
|
},
|
|
1672
1672
|
[n, o]
|
|
1673
1673
|
);
|
|
1674
1674
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1675
1675
|
/* @__PURE__ */ t.jsx(He, { children: /* @__PURE__ */ t.jsx(dt, { children: /* @__PURE__ */ t.jsxs(ct, { className: "text-lg", children: [
|
|
1676
|
-
/* @__PURE__ */ t.jsx(me, { children: d ? /* @__PURE__ */ t.jsx(ut, { href: "#", onClick: u, children: "MySite" }) : /* @__PURE__ */ t.jsx(
|
|
1676
|
+
/* @__PURE__ */ t.jsx(me, { children: d ? /* @__PURE__ */ t.jsx(ut, { href: "#", onClick: u, children: "MySite" }) : /* @__PURE__ */ t.jsx(he, { className: "font-semibold", children: "MySite" }) }),
|
|
1677
1677
|
d && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1678
1678
|
/* @__PURE__ */ t.jsx(mt, {}),
|
|
1679
|
-
/* @__PURE__ */ t.jsx(me, { children: /* @__PURE__ */ t.jsx(
|
|
1679
|
+
/* @__PURE__ */ t.jsx(me, { children: /* @__PURE__ */ t.jsx(he, { className: "font-semibold", children: d }) })
|
|
1680
1680
|
] })
|
|
1681
1681
|
] }) }) }),
|
|
1682
1682
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1685,7 +1685,7 @@ function bs(e) {
|
|
|
1685
1685
|
...e,
|
|
1686
1686
|
className: `h-full min-h-0 flex-1 ${e.className ?? ""}`,
|
|
1687
1687
|
children: /* @__PURE__ */ t.jsx(
|
|
1688
|
-
|
|
1688
|
+
ps,
|
|
1689
1689
|
{
|
|
1690
1690
|
editingSection: n,
|
|
1691
1691
|
animPhase: a,
|
|
@@ -1699,8 +1699,8 @@ function bs(e) {
|
|
|
1699
1699
|
] });
|
|
1700
1700
|
}
|
|
1701
1701
|
function Ds() {
|
|
1702
|
-
const { config: e } =
|
|
1703
|
-
() =>
|
|
1702
|
+
const { config: e } = Ve(), { fetch: s } = qe(), { baseUrl: n, defaultHeaders: a, onAuthError: l } = e, r = i.useMemo(
|
|
1703
|
+
() => Kt(
|
|
1704
1704
|
Lt({
|
|
1705
1705
|
baseUrl: n,
|
|
1706
1706
|
fetch: s,
|