@chaibuilder/pages 0.16.14 → 0.16.15
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/{2AITGKQY-B7xwscsX.js → 2AITGKQY-2rt9M99C.js} +5 -5
- package/dist/{2AITGKQY-B9AnRLq_.cjs → 2AITGKQY-Cs6RBSPQ.cjs} +1 -1
- package/dist/{NCMVHL6D-CRMC-wXy.cjs → NCMVHL6D-CsC6nsSQ.cjs} +1 -1
- package/dist/{NCMVHL6D-B1mwht0Q.js → NCMVHL6D-vUfYKc6i.js} +4 -4
- package/dist/{ZDWCUMSJ-BqqPEOij.cjs → ZDWCUMSJ-B2OZjsr6.cjs} +1 -1
- package/dist/{ZDWCUMSJ-CxKNtXtp.js → ZDWCUMSJ-CzEWKlEU.js} +1 -1
- package/dist/active-in-another-tab-B0N5S-Bh.js +34 -0
- package/dist/active-in-another-tab-BK3cZf-x.cjs +1 -0
- package/dist/{add-new-language-page-D2a6GK-7.cjs → add-new-language-page-Dt1j-8Zg.cjs} +1 -1
- package/dist/{add-new-language-page-DD0qvJJs.js → add-new-language-page-YlqcCdlK.js} +20 -20
- package/dist/{add-new-page-01GDCaa4.cjs → add-new-page-DqhQUQBz.cjs} +1 -1
- package/dist/{add-new-page-CYtuChN1.js → add-new-page-aYomeid4.js} +1 -1
- package/dist/{ai-panel-content-DfdnvlS8.js → ai-panel-content-C6cH9rrC.js} +2 -2
- package/dist/{ai-panel-content-Ouz6pu_0.cjs → ai-panel-content-MOZmNIKP.cjs} +1 -1
- package/dist/{ai-panel-default-lang-Bi2fH1so.js → ai-panel-default-lang-BZHkFsox.js} +3 -3
- package/dist/{ai-panel-default-lang-N1pb8rzQ.cjs → ai-panel-default-lang-DOk_Q0IO.cjs} +2 -2
- package/dist/{ai-panel-other-lang-2JPRSyO1.js → ai-panel-other-lang-D2A46FTg.js} +3 -3
- package/dist/{ai-panel-other-lang-BysU1464.cjs → ai-panel-other-lang-qHrdvAMa.cjs} +1 -1
- package/dist/{ai-prompt-input-JeIqWZco.cjs → ai-prompt-input-BZSjjNJd.cjs} +1 -1
- package/dist/{ai-prompt-input-DadL_cng.js → ai-prompt-input-C6gDvvLQ.js} +2 -2
- package/dist/{ai-translation-prompt-CQb1L7NM.cjs → ai-translation-prompt-BqXo2CLp.cjs} +1 -1
- package/dist/{ai-translation-prompt-B0si-R0R.js → ai-translation-prompt-DTR0wbGt.js} +1 -1
- package/dist/continue-editing-in-this-client-C3T6Jzhi.cjs +1 -0
- package/dist/continue-editing-in-this-client-D2S1yCOM.js +24 -0
- package/dist/delete-page-BF1k60U2.js +70 -0
- package/dist/delete-page-x0DWKzsR.cjs +1 -0
- package/dist/{digital-asset-manager-B5FQGtGY.cjs → digital-asset-manager-BmlFt2T_.cjs} +1 -1
- package/dist/{digital-asset-manager-jfnmWRJj.js → digital-asset-manager-C8udwDBW.js} +1 -1
- package/dist/{duplicate-page-BNjfZ7Wd.cjs → duplicate-page-Dt_QZkTk.cjs} +1 -1
- package/dist/{duplicate-page-CERjaPIW.js → duplicate-page-u_6vUVo1.js} +13 -13
- package/dist/{dynamic-page-selector-Bpz_bvRu.cjs → dynamic-page-selector-Cgs_Y_Kl.cjs} +1 -1
- package/dist/{dynamic-page-selector-XEWV4iCf.js → dynamic-page-selector-DxBHmglP.js} +1 -1
- package/dist/index-BeWL6Sj6.cjs +5 -0
- package/dist/index-DI2Rwk5v.js +4820 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -34
- package/dist/index.js +21 -22
- package/dist/{json-diff-viewer-H-2DkGza.cjs → json-diff-viewer-D2g0Yab2.cjs} +1 -1
- package/dist/{json-diff-viewer-DyvKomxd.js → json-diff-viewer-QdUwk7yF.js} +6 -6
- package/dist/{lang-panel-BWP5A-FD.js → lang-panel-B8OD0GiA.js} +24 -24
- package/dist/{lang-panel-DcZ7u4em.cjs → lang-panel-M2Zb01lF.cjs} +1 -1
- package/dist/{mark-as-template-1oVraE1x.js → mark-as-template-CJ1mlxYT.js} +7 -7
- package/dist/{mark-as-template-B_FyVRRO.cjs → mark-as-template-DONU52b1.cjs} +1 -1
- package/dist/{no-language-page-content-JO4YYUx7.cjs → no-language-page-content-DD9Ok2Ku.cjs} +1 -1
- package/dist/{no-language-page-content-CEci_4j7.js → no-language-page-content-Dtm37LTJ.js} +1 -1
- package/dist/no-language-page-dialog-D3dvenZ7.cjs +1 -0
- package/dist/no-language-page-dialog-Dj_z2_hF.js +10 -0
- package/dist/{page-creator-DJJFl7px.js → page-creator-DIMFISo4.js} +52 -52
- package/dist/{page-creator-BGgoOA92.cjs → page-creator-DTC66ujU.cjs} +1 -1
- package/dist/page-lock-CI6BYvF_.cjs +1 -0
- package/dist/page-lock-DUlNr3os.js +30 -0
- package/dist/page-locked-dialog-BKwULMV7.js +133 -0
- package/dist/page-locked-dialog-DorIbva0.cjs +1 -0
- package/dist/page-manager-new-lNVrLOJp.cjs +1 -0
- package/dist/page-manager-new-znvqI9_L.js +354 -0
- package/dist/{page-manager-search-and-filter-DbUoW8Di.js → page-manager-search-and-filter-C-_w7N27.js} +1 -1
- package/dist/{page-manager-search-and-filter-Dgh8iyGp.cjs → page-manager-search-and-filter-pe0q0qnZ.cjs} +1 -1
- package/dist/{page-revisions-content-CwoXXE53.cjs → page-revisions-content-Caaj5TEI.cjs} +1 -1
- package/dist/{page-revisions-content-CxEJGxLY.js → page-revisions-content-CyLjyxNU.js} +19 -19
- package/dist/pages.css +1 -1
- package/dist/{publish-pages-content-CfAlmivf.js → publish-pages-content-Bih1W9C4.js} +88 -88
- package/dist/publish-pages-content-D5beVcQI.cjs +1 -0
- package/dist/{save-to-lib-BCaBfh0I.js → save-to-lib-BwpkJcT2.js} +1 -1
- package/dist/{save-to-lib-DpyJA0y1.cjs → save-to-lib-DPAERsi4.cjs} +1 -1
- package/dist/{selected-block-display-BmNhvYKu.js → selected-block-display-GXSf3y2s.js} +1 -1
- package/dist/{selected-block-display-CqnwyGRp.cjs → selected-block-display-s99Y91qI.cjs} +1 -1
- package/dist/{seo-panel-BH8fcGqr.js → seo-panel-BurZA566.js} +61 -61
- package/dist/{seo-panel-D-nKfsRJ.cjs → seo-panel-BxUfalVy.cjs} +1 -1
- package/dist/{shared-json-ld-m_OsVv8h.cjs → shared-json-ld-BYAdrPeC.cjs} +1 -1
- package/dist/{shared-json-ld-zTDoJzUv.js → shared-json-ld-DHWdJvQd.js} +39 -39
- package/dist/{slug-input-vzNtu37S.cjs → slug-input-CR2B1kDJ.cjs} +1 -1
- package/dist/{slug-input-CumDDlCk.js → slug-input-Z_ny7bgX.js} +1 -1
- package/dist/take-over-request-CnEpToCM.cjs +1 -0
- package/dist/take-over-request-DF2JsIes.js +63 -0
- package/dist/{theme-panel-footer-CdUmjB-e.js → theme-panel-footer-5mxFeEua.js} +4 -4
- package/dist/{theme-panel-footer-CKccBcd9.cjs → theme-panel-footer-C2CjHoBu.cjs} +1 -1
- package/dist/{unmark-as-template-BNFOsxIg.cjs → unmark-as-template-Dn90g1eh.cjs} +1 -1
- package/dist/{unmark-as-template-6ew-7bf8.js → unmark-as-template-JRRUYTOY.js} +1 -1
- package/dist/{unpublish-page-BZQpTpU3.cjs → unpublish-page-C3C_rTRd.cjs} +1 -1
- package/dist/{unpublish-page-BomE76Wg.js → unpublish-page-FZ8rbi7u.js} +9 -9
- package/dist/{web-preview-jo8lnpEx.js → web-preview-CGBKG162.js} +1 -1
- package/dist/{web-preview-C5QTX7bS.cjs → web-preview-NdxC92Fk.cjs} +1 -1
- package/package.json +3 -3
- package/dist/delete-page-C8Nt7IYF.cjs +0 -1
- package/dist/delete-page-_96Di9yN.js +0 -40
- package/dist/index-Pdb5tSRL.cjs +0 -5
- package/dist/index-e9WlBH0R.js +0 -4960
- package/dist/page-lock-request-BoYzkcyt.cjs +0 -1
- package/dist/page-lock-request-WzpcD2ZN.js +0 -75
- package/dist/page-locked-by-dialog-Djvjp2Hx.js +0 -68
- package/dist/page-locked-by-dialog-bvI27OZ6.cjs +0 -1
- package/dist/page-manager-new-CMfGorRQ.cjs +0 -1
- package/dist/page-manager-new-DmVX0qLk.js +0 -354
- package/dist/publish-pages-content-BRu7qwAo.cjs +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as n, Fragment as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useQuery as re, useQueryClient as
|
|
2
|
+
import { aq as C, ar as A, A as b, aw as q, az as le, ao as I, ax as R, ay as w } from "./index-DI2Rwk5v.js";
|
|
3
|
+
import { useQuery as re, useQueryClient as O, useMutation as G } from "@tanstack/react-query";
|
|
4
4
|
import { useLanguages as ie, useSavePage as de } from "@chaibuilder/sdk";
|
|
5
|
-
import { SheetHeader as ce, SheetTitle as oe, ScrollArea as ue, Skeleton as y, Button as g, DropdownMenu as me, DropdownMenuTrigger as he, DropdownMenuContent as fe, DropdownMenuItem as U, DropdownMenuSeparator as pe, Dialog as j, DialogContent as L, DialogHeader as
|
|
5
|
+
import { SheetHeader as ce, SheetTitle as oe, ScrollArea as ue, Skeleton as y, Button as g, DropdownMenu as me, DropdownMenuTrigger as he, DropdownMenuContent as fe, DropdownMenuItem as U, DropdownMenuSeparator as pe, Dialog as j, DialogContent as L, DialogHeader as z, DialogTitle as P, DialogDescription as $, DialogFooter as H } from "@chaibuilder/sdk/ui";
|
|
6
6
|
import { format as D, formatDistanceToNow as xe } from "date-fns";
|
|
7
7
|
import { isEmpty as ge } from "lodash-es";
|
|
8
8
|
import { FileJson as Ne, MoreHorizontal as be, Undo2 as J, Trash as Q, CloudOff as ye, Rocket as ve, Save as we, X as De } from "lucide-react";
|
|
@@ -21,7 +21,7 @@ function Ce(t) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
const Ae = () => {
|
|
24
|
-
const t = C(), s = A(), a =
|
|
24
|
+
const t = C(), s = A(), a = O();
|
|
25
25
|
return G({
|
|
26
26
|
mutationFn: async (i) => await s(t, {
|
|
27
27
|
action: b.DELETE_PAGE_REVISION,
|
|
@@ -34,7 +34,7 @@ const Ae = () => {
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
}, Ie = () => {
|
|
37
|
-
const t = C(), s = A(), a =
|
|
37
|
+
const t = C(), s = A(), a = O();
|
|
38
38
|
return G({
|
|
39
39
|
mutationFn: async ({ revisionId: i, discardCurrent: l }) => await s(t, {
|
|
40
40
|
action: b.RESTORE_PAGE_REVISION,
|
|
@@ -46,7 +46,7 @@ const Ae = () => {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
|
-
},
|
|
49
|
+
}, Oe = Se(() => import("./json-diff-viewer-QdUwk7yF.js")), N = ({ tag: t }) => t === "draft" ? /* @__PURE__ */ n("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
|
|
50
50
|
/* @__PURE__ */ n("span", { className: "relative flex h-2 w-2", children: [
|
|
51
51
|
/* @__PURE__ */ e("span", { className: "absolute inline-flex h-full w-full animate-ping rounded-full bg-amber-400 opacity-75" }),
|
|
52
52
|
/* @__PURE__ */ e("span", { className: "relative inline-flex h-2 w-2 rounded-full bg-amber-500" })
|
|
@@ -65,7 +65,7 @@ const Ae = () => {
|
|
|
65
65
|
/* @__PURE__ */ e(we, { className: "h-3 w-3" }),
|
|
66
66
|
/* @__PURE__ */ e("span", { className: "text-[11px] leading-tight", children: "Unsaved changes" })
|
|
67
67
|
] }) : /* @__PURE__ */ e("span", { className: "rounded bg-purple-500/10 px-1.5 py-0.5 font-mono text-xs font-bold text-purple-600", children: t });
|
|
68
|
-
function
|
|
68
|
+
function ke({ compare: t, setCompare: s }) {
|
|
69
69
|
const { data: a } = q(), { saveState: i } = de(), [l] = le();
|
|
70
70
|
if (!a) return null;
|
|
71
71
|
const d = !!t.find((o) => {
|
|
@@ -214,7 +214,7 @@ function Te({ compare: t, setCompare: s, pageId: a }) {
|
|
|
214
214
|
Re,
|
|
215
215
|
{
|
|
216
216
|
fallback: /* @__PURE__ */ e("div", { className: "flex items-center justify-center p-4", children: /* @__PURE__ */ e("span", { className: "text-sm", children: "Loading diff viewer..." }) }),
|
|
217
|
-
children: /* @__PURE__ */ e(
|
|
217
|
+
children: /* @__PURE__ */ e(Oe, { open: i, onOpenChange: l, compare: t })
|
|
218
218
|
}
|
|
219
219
|
)
|
|
220
220
|
] });
|
|
@@ -271,9 +271,9 @@ function Ue({
|
|
|
271
271
|
l || s(m);
|
|
272
272
|
},
|
|
273
273
|
children: /* @__PURE__ */ n(L, { className: "sm:max-w-md", children: [
|
|
274
|
-
/* @__PURE__ */ n(
|
|
275
|
-
/* @__PURE__ */ e(
|
|
276
|
-
/* @__PURE__ */ n(
|
|
274
|
+
/* @__PURE__ */ n(z, { children: [
|
|
275
|
+
/* @__PURE__ */ e(P, { children: "Restore Revision" }),
|
|
276
|
+
/* @__PURE__ */ n($, { children: [
|
|
277
277
|
"You are about to restore to revision ",
|
|
278
278
|
a.uid.substring(0, 8),
|
|
279
279
|
" from",
|
|
@@ -320,9 +320,9 @@ function Fe({
|
|
|
320
320
|
l || s(m);
|
|
321
321
|
},
|
|
322
322
|
children: /* @__PURE__ */ n(L, { className: "sm:max-w-md", children: [
|
|
323
|
-
/* @__PURE__ */ n(
|
|
324
|
-
/* @__PURE__ */ e(
|
|
325
|
-
/* @__PURE__ */ n(
|
|
323
|
+
/* @__PURE__ */ n(z, { children: [
|
|
324
|
+
/* @__PURE__ */ e(P, { children: "Delete Revision" }),
|
|
325
|
+
/* @__PURE__ */ n($, { children: [
|
|
326
326
|
"You are about to delete revision ",
|
|
327
327
|
a.uid.substring(0, 8),
|
|
328
328
|
" from",
|
|
@@ -349,7 +349,7 @@ function Fe({
|
|
|
349
349
|
}
|
|
350
350
|
function Je({ isOpen: t }) {
|
|
351
351
|
var T, _;
|
|
352
|
-
const [s, a] = v.useState([]), [i, l] = v.useState(null), [d, u] = v.useState(!1), [m, o] = v.useState(!1), { data: r } = q(), { data: f, isFetching: S, error: h, refetch: x } = Ce(r == null ? void 0 : r.id), { mutate: W, isPending: Y } = Ae(), { mutate: B, isPending: X } = Ie(), Z =
|
|
352
|
+
const [s, a] = v.useState([]), [i, l] = v.useState(null), [d, u] = v.useState(!1), [m, o] = v.useState(!1), { data: r } = q(), { data: f, isFetching: S, error: h, refetch: x } = Ce(r == null ? void 0 : r.id), { mutate: W, isPending: Y } = Ae(), { mutate: B, isPending: X } = Ie(), Z = O(), { selectedLang: ee, fallbackLang: te } = ie(), ne = ee || te;
|
|
353
353
|
F(() => a([]), [r == null ? void 0 : r.id]);
|
|
354
354
|
const ae = (c) => {
|
|
355
355
|
i && B(
|
|
@@ -362,7 +362,7 @@ function Je({ isOpen: t }) {
|
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
);
|
|
365
|
-
},
|
|
365
|
+
}, k = (c) => {
|
|
366
366
|
l(c), u(!0);
|
|
367
367
|
}, M = (c) => {
|
|
368
368
|
l(c), o(!0);
|
|
@@ -389,14 +389,14 @@ function Je({ isOpen: t }) {
|
|
|
389
389
|
] }),
|
|
390
390
|
S ? /* @__PURE__ */ e(Me, {}) : h ? /* @__PURE__ */ e("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ n("div", { className: "mt-2 flex h-full min-h-0 flex-1 flex-col space-y-2", children: [
|
|
391
391
|
/* @__PURE__ */ e(Te, { lang: ne, compare: s, setCompare: a, pageId: r == null ? void 0 : r.id }),
|
|
392
|
-
/* @__PURE__ */ e(
|
|
392
|
+
/* @__PURE__ */ e(ke, { compare: s, setCompare: a }),
|
|
393
393
|
(T = f == null ? void 0 : f.filter((c) => c.uid === "current")) == null ? void 0 : T.map((c, E) => /* @__PURE__ */ e(
|
|
394
394
|
V,
|
|
395
395
|
{
|
|
396
396
|
pageId: r == null ? void 0 : r.id,
|
|
397
397
|
revision: c,
|
|
398
398
|
isLatest: !0,
|
|
399
|
-
onRestore: () =>
|
|
399
|
+
onRestore: () => k(c),
|
|
400
400
|
onDelete: () => M(c),
|
|
401
401
|
revisionNumber: E,
|
|
402
402
|
compare: s,
|
|
@@ -410,7 +410,7 @@ function Je({ isOpen: t }) {
|
|
|
410
410
|
pageId: r == null ? void 0 : r.id,
|
|
411
411
|
revision: c,
|
|
412
412
|
isLatest: c.uid === "current",
|
|
413
|
-
onRestore: () =>
|
|
413
|
+
onRestore: () => k(c),
|
|
414
414
|
onDelete: () => M(c),
|
|
415
415
|
revisionNumber: E + 1,
|
|
416
416
|
compare: s,
|