@chaibuilder/sdk 4.0.0-beta.32 → 4.0.0-beta.33
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/{2SSKDMRQ-pPung-JB.js → 2SSKDMRQ-BXAXoR9y.js} +5 -5
- package/dist/{2SSKDMRQ-DfXKDvXk.cjs → 2SSKDMRQ-BqOsh3tf.cjs} +1 -1
- package/dist/{AP7HFJJL-CEJuc_Ox.js → AP7HFJJL-B78LfetW.js} +1 -1
- package/dist/{AP7HFJJL-PvPBwV6T.cjs → AP7HFJJL-Cv6sqAAd.cjs} +1 -1
- package/dist/{IconPicker-D_GRfhwS.js → IconPicker-BlO5Pnyu.js} +1 -1
- package/dist/{IconPicker-BJHUCDn4.cjs → IconPicker-D4yq_b-k.cjs} +1 -1
- package/dist/{WDYDFRGG-B3FrCE_j.js → WDYDFRGG-BE7jgVqa.js} +4 -4
- package/dist/{WDYDFRGG-BPHlcLi5.cjs → WDYDFRGG-Dz9d3cVW.cjs} +1 -1
- package/dist/{actions-registery-Bj-j1k5i.js → actions-registery-D3-4Yha7.js} +1108 -1061
- package/dist/{actions-registery-Cy1lqUVI.cjs → actions-registery-vPaY-3dZ.cjs} +25 -25
- package/dist/actions.cjs +1 -1
- package/dist/actions.js +2 -2
- package/dist/{active-in-another-tab-C_Ma7oFU.js → active-in-another-tab-CA47uafJ.js} +2 -2
- package/dist/{active-in-another-tab-WVYf-z5w.cjs → active-in-another-tab-CNn_R-55.cjs} +1 -1
- package/dist/{add-new-language-page-DtsBO739.js → add-new-language-page-B-kPbhFd.js} +3 -3
- package/dist/{add-new-language-page-CxW2Vuyr.cjs → add-new-language-page-QAZbAFQe.cjs} +1 -1
- package/dist/{add-new-page-BfKt72NF.cjs → add-new-page-D4nbAHOp.cjs} +1 -1
- package/dist/add-new-page-Y0d9tHh0.js +31 -0
- package/dist/{ai-panel-content-Dfo4jOVB.cjs → ai-panel-content-DXbebC-m.cjs} +1 -1
- package/dist/{ai-panel-content-dktE9CIO.js → ai-panel-content-WMOeK5pF.js} +5 -5
- package/dist/{ai-panel-default-lang-BbUTXMbm.js → ai-panel-default-lang-CM_psX_h.js} +7 -7
- package/dist/{ai-panel-default-lang-GQCtwlPs.cjs → ai-panel-default-lang-hmfyAYPM.cjs} +2 -2
- package/dist/{ai-panel-other-lang-DIDS-mTi.js → ai-panel-other-lang-BKANRJAb.js} +13 -13
- package/dist/{ai-panel-other-lang-nCUxwpLX.cjs → ai-panel-other-lang-D4GL1b-W.cjs} +1 -1
- package/dist/{ai-prompt-input-Dws5BHhQ.cjs → ai-prompt-input-Dwd0-pcD.cjs} +1 -1
- package/dist/{ai-prompt-input-B2q30bhR.js → ai-prompt-input-mxXtWptn.js} +13 -13
- package/dist/{ai-translation-prompt-CJVcuWrs.cjs → ai-translation-prompt-7M2aEZ1w.cjs} +1 -1
- package/dist/{ai-translation-prompt-D87qk3C1.js → ai-translation-prompt-C_Pb7BE4.js} +1 -1
- package/dist/{apply-binding-chfbBKi2.js → apply-binding-BYCW1k2l.js} +1 -1
- package/dist/{apply-binding-9XSrYzAE.cjs → apply-binding-xiigK7eK.cjs} +1 -1
- package/dist/{change-password-modal-CVUa60pC.cjs → change-password-modal-BYZoefwT.cjs} +1 -1
- package/dist/{change-password-modal-PahNYs8x.js → change-password-modal-Dqf_mleR.js} +5 -5
- package/dist/{code-editor-CWOmKcUc.js → code-editor-1fSEocLK.js} +1 -1
- package/dist/{code-editor-Cim6jQVF.cjs → code-editor-uN7W7KMD.cjs} +1 -1
- package/dist/{continue-editing-in-this-client-BYFOU3hH.js → continue-editing-in-this-client-DD7bBhjD.js} +2 -2
- package/dist/{continue-editing-in-this-client-CW0f2LRk.cjs → continue-editing-in-this-client-DDM65ror.cjs} +1 -1
- package/dist/{core-BWQrViOY.cjs → core-czmLeR0h.cjs} +1 -1
- package/dist/{core-QlWEXm1d.js → core-nSRy3D7z.js} +16 -15
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +14 -2
- package/dist/core.js +19 -19
- package/dist/{css-import-modal-CXulmaB4.cjs → css-import-modal-BU7bJAaT.cjs} +1 -1
- package/dist/{css-import-modal-6bMTRlCg.js → css-import-modal-pBNRVmGj.js} +1 -1
- package/dist/default-theme-options-DN-3gIjM.cjs +22 -0
- package/dist/{plugin-BSjgGgwo.js → default-theme-options-saBIkWGT.js} +114 -114
- package/dist/{delete-page-CdByrw3j.cjs → delete-page-8oEYsHPE.cjs} +1 -1
- package/dist/delete-page-B53nkF74.js +71 -0
- package/dist/{design-token-usage-D-hrcKz1.cjs → design-token-usage-Cm9m4AMz.cjs} +1 -1
- package/dist/{design-token-usage-lf7N_uOk.js → design-token-usage-DzWav2ip.js} +14 -14
- package/dist/{digital-asset-manager-PcYficIX.js → digital-asset-manager-1yLYGPuf.js} +3 -3
- package/dist/{digital-asset-manager-CxxhsToc.cjs → digital-asset-manager-BaTvMY8Q.cjs} +1 -1
- package/dist/{duplicate-page-D2f3HvWX.cjs → duplicate-page-C2DZI4U0.cjs} +1 -1
- package/dist/{duplicate-page-DfEA148D.js → duplicate-page-DCRVR-kF.js} +6 -6
- package/dist/{dynamic-page-selector-Dz7D1Wdr.cjs → dynamic-page-selector-CZJQnc-Q.cjs} +1 -1
- package/dist/{dynamic-page-selector-DB__KD2y.js → dynamic-page-selector-DCGWkLVV.js} +12 -12
- package/dist/get-chai-builder-theme-C_qofMh_.cjs +1 -0
- package/dist/{get-chai-builder-theme-BpuwSLeS.js → get-chai-builder-theme-CyOkIlte.js} +1 -1
- package/dist/{image-editor-CilPMtAC.js → image-editor-C0EYZJY_.js} +1 -1
- package/dist/{image-editor-BdW476J8.cjs → image-editor-DkgZrSGr.cjs} +1 -1
- package/dist/{index-IQefjAA0.js → index-BDrc0HJQ.js} +1604 -1566
- package/dist/index-BuXfCtgR.cjs +5 -0
- package/dist/{index-DsQXiNA_.js → index-C7bidKtE.js} +2786 -2752
- package/dist/index-DKjYF53r.cjs +160 -0
- package/dist/{json-diff-viewer-BPqY25PU.cjs → json-diff-viewer-88jEhq8D.cjs} +1 -1
- package/dist/{json-diff-viewer-Ci2IbgDn.js → json-diff-viewer-wmzIZcuQ.js} +34 -34
- package/dist/{lang-panel-DlAQr-y9.js → lang-panel--kWBnU_W.js} +7 -7
- package/dist/{lang-panel-jebYHYGD.cjs → lang-panel-I_ABfjOZ.cjs} +1 -1
- package/dist/manage-design-tokens-CslCEOXU.cjs +1 -0
- package/dist/manage-design-tokens-JdVKj09s.js +445 -0
- package/dist/manage-design-tokens-modal-DA15ou0u.cjs +1 -0
- package/dist/{manage-design-tokens-modal-9qpcb-EC.js → manage-design-tokens-modal-xKxC72Bc.js} +9 -9
- package/dist/{mark-as-template-DOZL3umP.js → mark-as-template-AbZrkEYl.js} +7 -7
- package/dist/{mark-as-template-DS-tMllK.cjs → mark-as-template-ClQjC2p2.cjs} +1 -1
- package/dist/{nested-path-selector-content-Be-pbnVl.js → nested-path-selector-content-B04k-PPB.js} +1 -1
- package/dist/{nested-path-selector-content-CWmPgU-L.cjs → nested-path-selector-content-dFwZaM1r.cjs} +1 -1
- package/dist/{no-language-page-content-C8W0M_Fj.js → no-language-page-content-CbUqxuC4.js} +2 -2
- package/dist/{no-language-page-content-DWtEo657.cjs → no-language-page-content-pzkWJAg6.cjs} +1 -1
- package/dist/{no-language-page-dialog-cpCZ9vES.js → no-language-page-dialog-AavD_Mmc.js} +2 -2
- package/dist/{no-language-page-dialog-FVXkSnfT.cjs → no-language-page-dialog-DhlOVXUm.cjs} +1 -1
- package/dist/{page-creator-CFtxeW_t.js → page-creator-2OZveMsR.js} +95 -95
- package/dist/{page-creator-o6yRzsVf.cjs → page-creator-DMjnStPf.cjs} +1 -1
- package/dist/{page-lock-Cthbk6Pg.js → page-lock-5MwwTWe8.js} +2 -2
- package/dist/{page-lock-BS_ErOIW.cjs → page-lock-B3CpoFTs.cjs} +1 -1
- package/dist/{page-locked-dialog-D5hmaWqw.js → page-locked-dialog-BhNZC9wZ.js} +13 -13
- package/dist/{page-locked-dialog-BWXifuQ8.cjs → page-locked-dialog-ZOvjnxRI.cjs} +1 -1
- package/dist/page-manager-new-BcI-1Dms.cjs +1 -0
- package/dist/{page-manager-new-Dl5YwsMm.js → page-manager-new-l68-Lc9h.js} +85 -88
- package/dist/{page-manager-search-and-filter-jDoLrCB7.cjs → page-manager-search-and-filter-BOpne6v-.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-iFsFJhn4.js → page-manager-search-and-filter-DJn98D02.js} +9 -9
- package/dist/{page-revisions-content-CeBepZEw.cjs → page-revisions-content-B00tDCzu.cjs} +1 -1
- package/dist/{page-revisions-content-C1IGUurW.js → page-revisions-content-Bqp-9bae.js} +23 -23
- package/dist/pages.cjs +1 -1
- package/dist/pages.d.ts +14 -2
- package/dist/pages.js +12 -12
- package/dist/{publish-pages-content-BpEoA1T6.js → publish-pages-content-CtZLSG6O.js} +68 -75
- package/dist/publish-pages-content-DfYG0biw.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +5 -5
- package/dist/{rte-widget-modal-c3T09VeO.js → rte-widget-modal-DGEWoQ1b.js} +1 -1
- package/dist/{rte-widget-modal-CC1KcrAT.cjs → rte-widget-modal-DX66uSPv.cjs} +1 -1
- package/dist/runtime.cjs +6 -6
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +36 -35
- package/dist/{save-to-lib-BERYhyxq.js → save-to-lib-CCxX5ZmQ.js} +25 -25
- package/dist/{save-to-lib-Bk59qO1r.cjs → save-to-lib-DmAjdhzU.cjs} +1 -1
- package/dist/sdk.css +1 -1
- package/dist/{selected-block-display-vFSCOnw8.cjs → selected-block-display-Csce27bR.cjs} +1 -1
- package/dist/{selected-block-display-C6NxfC0N.js → selected-block-display-Cv6jBhJD.js} +20 -20
- package/dist/{seo-panel-0vlr_dBq.cjs → seo-panel-BZYXeYzE.cjs} +1 -1
- package/dist/{seo-panel-COrEJZLA.js → seo-panel-Ctstjs-d.js} +25 -25
- package/dist/{shared-json-ld-C46hURIr.cjs → shared-json-ld-BDWtjHgw.cjs} +1 -1
- package/dist/{shared-json-ld-DnTuCBc3.js → shared-json-ld-BNHGmUBd.js} +45 -45
- package/dist/{slug-input-CAqkFZBq.js → slug-input-Bui1Qmvh.js} +1 -1
- package/dist/{slug-input-Curnt2n3.cjs → slug-input-IAl_jfHr.cjs} +1 -1
- package/dist/supabase-actions.cjs +1 -1
- package/dist/supabase-actions.js +223 -155
- package/dist/{take-over-request-6fliSr8w.cjs → take-over-request-Bl6jS1cK.cjs} +1 -1
- package/dist/{take-over-request-DvmM5qTu.js → take-over-request-Ceuqyk5K.js} +13 -13
- package/dist/{translation-warning-modal-B876S5yp.cjs → translation-warning-modal-CCmmwz1C.cjs} +1 -1
- package/dist/{translation-warning-modal-kRcfrPgo.js → translation-warning-modal-DA5dt2FA.js} +9 -9
- package/dist/types.d.ts +14 -2
- package/dist/{unmark-as-template-Dn3klZKq.js → unmark-as-template-CKVMibvu.js} +13 -13
- package/dist/{unmark-as-template-q1GblG-u.cjs → unmark-as-template-OEUqo0uc.cjs} +1 -1
- package/dist/unpublish-page-A5qn6E6g.js +28 -0
- package/dist/{unpublish-page-DMbcHmUV.cjs → unpublish-page-C81bYHLI.cjs} +1 -1
- package/dist/{unpublished-partials-modal-Ts5ZhAK9.js → unpublished-partials-modal-FqzTp5el.js} +3 -3
- package/dist/{unpublished-partials-modal-CEFXp1D1.cjs → unpublished-partials-modal-af5uDL7Y.cjs} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +1 -1
- package/dist/{web-preview-B2YGL26D.js → web-preview-vge6uUSa.js} +1 -1
- package/dist/{web-preview-C6SLwtqv.cjs → web-preview-xtKkQOXy.cjs} +1 -1
- package/package.json +1 -1
- package/dist/add-new-page-DG38rI6S.js +0 -31
- package/dist/delete-page-BDViv7Xm.js +0 -71
- package/dist/get-chai-builder-theme-B5RkBTsB.cjs +0 -1
- package/dist/index-Bzyv7mAh.cjs +0 -5
- package/dist/index-mPCp0j2h.cjs +0 -160
- package/dist/manage-design-tokens-BknGNAKE.cjs +0 -1
- package/dist/manage-design-tokens-Co5677WS.js +0 -428
- package/dist/manage-design-tokens-modal-BcgdwEXE.cjs +0 -1
- package/dist/page-manager-new-DpSqBzeh.cjs +0 -1
- package/dist/plugin-DHpuZZXz.cjs +0 -22
- package/dist/publish-pages-content-PNsiaGI-.cjs +0 -1
- package/dist/theme-panel-footer-3ixmq107.cjs +0 -1
- package/dist/theme-panel-footer-BlsXRcEY.js +0 -26
- package/dist/unpublish-page-BbFZw0so.js +0 -28
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as a, Fragment as p, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { B as g } from "./register-chai-top-bar-D6GjnauV.js";
|
|
3
|
-
import { d as le, ac as re, ad as ie, a6 as de, ae as v,
|
|
4
|
-
import {
|
|
3
|
+
import { d as le, ac as re, ad as ie, a6 as de, ae as v, E as ce, D as q, e as G, f as j, g as L, o as z, q as $, r as oe, s as ue, t as me, v as _, af as he } from "./index-C7bidKtE.js";
|
|
4
|
+
import { as as C, at as A, A as b, ax as H, aB as fe, w as I, ay as E, az as D } from "./index-BDrc0HJQ.js";
|
|
5
5
|
import { useQuery as pe, useQueryClient as O, useMutation as J } from "@tanstack/react-query";
|
|
6
6
|
import { format as S, formatDistanceToNow as xe } from "date-fns";
|
|
7
7
|
import { isEmpty as ge } from "lodash-es";
|
|
8
8
|
import { FileJson as Ne, CloudOff as ye, Undo2 as P, Trash as Q, X as be, Rocket as ve, Save as we, MoreHorizontal as De } from "lucide-react";
|
|
9
9
|
import * as w from "react";
|
|
10
|
-
import { useEffect as
|
|
10
|
+
import { useEffect as U, startTransition as Se, useState as Re, Suspense as Ee, lazy as Ce } from "react";
|
|
11
11
|
function Ae(t) {
|
|
12
12
|
const s = C(), n = A();
|
|
13
13
|
return pe({
|
|
@@ -50,7 +50,7 @@ const Ie = () => {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
}, Te = Ce(() => import("./json-diff-viewer-
|
|
53
|
+
}, Te = Ce(() => import("./json-diff-viewer-wmzIZcuQ.js")), N = ({ tag: t }) => t === "draft" ? /* @__PURE__ */ a("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: [
|
|
54
54
|
/* @__PURE__ */ a("span", { className: "relative flex h-2 w-2", children: [
|
|
55
55
|
/* @__PURE__ */ e("span", { className: "absolute inline-flex h-full w-full animate-ping rounded-full bg-amber-400 opacity-75" }),
|
|
56
56
|
/* @__PURE__ */ e("span", { className: "relative inline-flex h-2 w-2 rounded-full bg-amber-500" })
|
|
@@ -116,7 +116,7 @@ function Me() {
|
|
|
116
116
|
/* @__PURE__ */ e(v, { className: "h-8 w-8 rounded-full" })
|
|
117
117
|
] }, s)) });
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function F({
|
|
120
120
|
revision: t,
|
|
121
121
|
isLatest: s,
|
|
122
122
|
onRestore: n,
|
|
@@ -143,7 +143,7 @@ function U({
|
|
|
143
143
|
/* @__PURE__ */ e("div", { className: "flex items-center text-[10px] text-muted-foreground", children: /* @__PURE__ */ e("span", { className: "leading-tight", children: S(t.createdAt, "MMM d, yyyy, h:mm a") }) })
|
|
144
144
|
] })
|
|
145
145
|
] }),
|
|
146
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(E, { permissions: [D.RESTORE_REVISION, D.DELETE_REVISION], children: /* @__PURE__ */ e(
|
|
146
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(E, { permissions: [D.RESTORE_REVISION, D.DELETE_REVISION], children: /* @__PURE__ */ e(Ue, { revision: t, onRestore: n, onDelete: i }) }) }),
|
|
147
147
|
/* @__PURE__ */ e(
|
|
148
148
|
K,
|
|
149
149
|
{
|
|
@@ -241,7 +241,7 @@ function K({ checked: t, disabled: s, onChange: n, label: i = "Compare" }) {
|
|
|
241
241
|
/* @__PURE__ */ e("span", { className: "select-none leading-tight", children: i })
|
|
242
242
|
] }) });
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function Ue({ revision: t, onRestore: s, onDelete: n }) {
|
|
245
245
|
return /* @__PURE__ */ a(oe, { children: [
|
|
246
246
|
/* @__PURE__ */ e(ue, { asChild: !0, children: /* @__PURE__ */ a(g, { variant: "ghost", size: "icon", className: "h-5 w-5", children: [
|
|
247
247
|
/* @__PURE__ */ e(De, { className: "h-4 w-4" }),
|
|
@@ -262,7 +262,7 @@ function Fe({ revision: t, onRestore: s, onDelete: n }) {
|
|
|
262
262
|
] })
|
|
263
263
|
] });
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function Fe({
|
|
266
266
|
open: t,
|
|
267
267
|
onOpenChange: s,
|
|
268
268
|
revision: n,
|
|
@@ -271,16 +271,16 @@ function Ue({
|
|
|
271
271
|
}) {
|
|
272
272
|
const { data: d } = I((n == null ? void 0 : n.currentEditor) || ""), o = (d == null ? void 0 : d.name) || "Unknown";
|
|
273
273
|
return n ? /* @__PURE__ */ e(
|
|
274
|
-
|
|
274
|
+
q,
|
|
275
275
|
{
|
|
276
276
|
open: t,
|
|
277
277
|
onOpenChange: (m) => {
|
|
278
278
|
r || s(m);
|
|
279
279
|
},
|
|
280
|
-
children: /* @__PURE__ */ a(
|
|
281
|
-
/* @__PURE__ */ a(
|
|
280
|
+
children: /* @__PURE__ */ a(G, { className: "sm:max-w-md", children: [
|
|
281
|
+
/* @__PURE__ */ a(j, { children: [
|
|
282
282
|
/* @__PURE__ */ e(L, { children: "Restore Revision" }),
|
|
283
|
-
/* @__PURE__ */ a(
|
|
283
|
+
/* @__PURE__ */ a(z, { children: [
|
|
284
284
|
"You are about to restore to revision ",
|
|
285
285
|
n.uid.substring(0, 8),
|
|
286
286
|
" from",
|
|
@@ -291,7 +291,7 @@ function Ue({
|
|
|
291
291
|
] })
|
|
292
292
|
] }),
|
|
293
293
|
/* @__PURE__ */ e("div", { className: "py-2", children: /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "How would you like to handle your current edits?" }) }),
|
|
294
|
-
/* @__PURE__ */ a(
|
|
294
|
+
/* @__PURE__ */ a($, { className: "flex flex-col gap-2 sm:flex-row", children: [
|
|
295
295
|
/* @__PURE__ */ e(g, { variant: "outline", className: "sm:flex-1", onClick: () => i(!1), disabled: r, children: r ? /* @__PURE__ */ a(p, { children: [
|
|
296
296
|
/* @__PURE__ */ e("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
|
|
297
297
|
"Saving as draft..."
|
|
@@ -320,16 +320,16 @@ function Ve({
|
|
|
320
320
|
}) {
|
|
321
321
|
const { data: d } = I((n == null ? void 0 : n.currentEditor) || ""), o = (d == null ? void 0 : d.name) || "Unknown";
|
|
322
322
|
return n ? /* @__PURE__ */ e(
|
|
323
|
-
|
|
323
|
+
q,
|
|
324
324
|
{
|
|
325
325
|
open: t,
|
|
326
326
|
onOpenChange: (m) => {
|
|
327
327
|
r || s(m);
|
|
328
328
|
},
|
|
329
|
-
children: /* @__PURE__ */ a(
|
|
330
|
-
/* @__PURE__ */ a(
|
|
329
|
+
children: /* @__PURE__ */ a(G, { className: "sm:max-w-md", children: [
|
|
330
|
+
/* @__PURE__ */ a(j, { children: [
|
|
331
331
|
/* @__PURE__ */ e(L, { children: "Delete Revision" }),
|
|
332
|
-
/* @__PURE__ */ a(
|
|
332
|
+
/* @__PURE__ */ a(z, { children: [
|
|
333
333
|
"You are about to delete revision ",
|
|
334
334
|
n.uid.substring(0, 8),
|
|
335
335
|
" from",
|
|
@@ -340,7 +340,7 @@ function Ve({
|
|
|
340
340
|
] })
|
|
341
341
|
] }),
|
|
342
342
|
/* @__PURE__ */ e("div", { className: "py-2", children: /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "This action cannot be undone. Are you sure you want to proceed?" }) }),
|
|
343
|
-
/* @__PURE__ */ a(
|
|
343
|
+
/* @__PURE__ */ a($, { className: "flex flex-col gap-2 sm:flex-row", children: [
|
|
344
344
|
/* @__PURE__ */ e(g, { variant: "outline", className: "sm:flex-1", onClick: () => s(!1), disabled: r, children: "Cancel" }),
|
|
345
345
|
/* @__PURE__ */ e(g, { variant: "destructive", className: "sm:flex-1", onClick: i, disabled: r, children: r ? /* @__PURE__ */ a(p, { children: [
|
|
346
346
|
/* @__PURE__ */ e("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
|
|
@@ -357,7 +357,7 @@ function Ve({
|
|
|
357
357
|
function Qe({ isOpen: t }) {
|
|
358
358
|
var M;
|
|
359
359
|
const [s, n] = w.useState([]), [i, r] = w.useState(null), [d, o] = w.useState(!1), [m, u] = w.useState(!1), { data: l } = H(), { data: f, isFetching: R, error: h, refetch: x } = Ae(l == null ? void 0 : l.id), { mutate: B, isPending: W } = Ie(), { mutate: Y, isPending: X } = Oe(), Z = O(), { selectedLang: ee, fallbackLang: te } = le(), ae = ee || te;
|
|
360
|
-
|
|
360
|
+
U(() => {
|
|
361
361
|
Se(() => n([]));
|
|
362
362
|
}, [l == null ? void 0 : l.id]);
|
|
363
363
|
const ne = (c) => {
|
|
@@ -390,7 +390,7 @@ function Qe({ isOpen: t }) {
|
|
|
390
390
|
}
|
|
391
391
|
});
|
|
392
392
|
};
|
|
393
|
-
return
|
|
393
|
+
return U(() => {
|
|
394
394
|
t && x();
|
|
395
395
|
}, [t, x]), /* @__PURE__ */ a(p, { children: [
|
|
396
396
|
/* @__PURE__ */ a(re, { children: [
|
|
@@ -404,7 +404,7 @@ function Qe({ isOpen: t }) {
|
|
|
404
404
|
/* @__PURE__ */ e(_e, { lang: ae, compare: s, setCompare: n, pageId: l == null ? void 0 : l.id }),
|
|
405
405
|
/* @__PURE__ */ e(ke, { compare: s, setCompare: n }),
|
|
406
406
|
(M = f == null ? void 0 : f.filter((c) => c.uid === "current")) == null ? void 0 : M.map((c, y) => /* @__PURE__ */ e(
|
|
407
|
-
|
|
407
|
+
F,
|
|
408
408
|
{
|
|
409
409
|
pageId: l == null ? void 0 : l.id,
|
|
410
410
|
revision: c,
|
|
@@ -418,7 +418,7 @@ function Qe({ isOpen: t }) {
|
|
|
418
418
|
c.uid
|
|
419
419
|
)),
|
|
420
420
|
/* @__PURE__ */ e(de, { className: "min-h-0 flex-1", children: /* @__PURE__ */ e("div", { className: "space-y-2", children: [...f ?? []].filter((c) => c.uid !== "current").sort((c, y) => new Date(y.createdAt).getTime() - new Date(c.createdAt).getTime()).map((c, y) => /* @__PURE__ */ e(
|
|
421
|
-
|
|
421
|
+
F,
|
|
422
422
|
{
|
|
423
423
|
pageId: l == null ? void 0 : l.id,
|
|
424
424
|
revision: c,
|
|
@@ -433,7 +433,7 @@ function Qe({ isOpen: t }) {
|
|
|
433
433
|
)) }) })
|
|
434
434
|
] }),
|
|
435
435
|
/* @__PURE__ */ e(
|
|
436
|
-
|
|
436
|
+
Fe,
|
|
437
437
|
{
|
|
438
438
|
open: d,
|
|
439
439
|
onOpenChange: o,
|
package/dist/pages.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BuXfCtgR.cjs");exports.ChaiJsonInput=e.SmartJsonInput;exports.ChaiWebsiteBuilder=e.ChaiWebsiteBuilder;exports.ImagePicker=e.ImagePicker;exports.LanguageSwitcher=e.LanguageSwitcher;exports.NestedPathSelector=e.NestedPathSelector;exports.PermissionChecker=e.PermissionChecker;exports.SupabaseRealtimeAdapter=e.SupabaseRealtimeAdapter;exports.createRealtimeAdapter=e.createRealtimeAdapter;exports.useActivePage=e.useActivePage;exports.useApiUrl=e.useApiUrl;exports.useBuilderFetch=e.useBuilderFetch;exports.useBuilderPageData=e.useBuilderPageData;exports.useChaiAuth=e.useChaiAuth;exports.useChaiCurrentPage=e.useChaiCurrentPage;exports.useChaiUserInfo=e.useChaiUserInfo;exports.useClearAll=e.useClearAll;exports.useFallbackLang=e.useFallbackLang;exports.useFetch=e.useFetch;exports.useGotoPage=e.useGotoPage;exports.useLanguagePages=e.useLanguagePages;exports.usePageTypes=e.usePageTypes;exports.useRealtimeAdapter=e.useRealtimeAdapter;exports.useReloadPage=e.useReloadPage;exports.useUpdateActivePageMetadata=e.useUpdateActivePageMetadata;exports.useUserPermissions=e.useUserRoleAndPermissions;exports.useWebsitePages=e.useWebsitePages;exports.useWebsiteSetting=e.useWebsiteSetting;
|
package/dist/pages.d.ts
CHANGED
|
@@ -141,7 +141,12 @@ declare interface ChaiBuilderEditorProps {
|
|
|
141
141
|
* onSave callback function
|
|
142
142
|
* @param saveData
|
|
143
143
|
*/
|
|
144
|
-
onSave?: ({ blocks,
|
|
144
|
+
onSave?: ({ blocks, autoSave }: ChaiSavePageData) => Promise<boolean | Error>;
|
|
145
|
+
/**
|
|
146
|
+
* onSaveWebsiteData callback function for theme and design tokens
|
|
147
|
+
* @param saveData
|
|
148
|
+
*/
|
|
149
|
+
onSaveWebsiteData?: (data: ChaiSaveWebsiteData) => Promise<boolean | Error>;
|
|
145
150
|
/**
|
|
146
151
|
* onSaveStateChange callback function
|
|
147
152
|
* @param syncStatus
|
|
@@ -326,13 +331,20 @@ declare type ChaiPageType = {
|
|
|
326
331
|
declare type ChaiSavePageData = {
|
|
327
332
|
autoSave: boolean;
|
|
328
333
|
blocks: ChaiBlock[];
|
|
329
|
-
theme?: ChaiTheme;
|
|
330
334
|
needTranslations?: boolean;
|
|
331
335
|
designTokens: ChaiDesignTokens;
|
|
332
336
|
partialIds?: string[];
|
|
333
337
|
linkPageIds?: string[];
|
|
334
338
|
};
|
|
335
339
|
|
|
340
|
+
declare type ChaiSaveWebsiteData = {
|
|
341
|
+
type: "THEME";
|
|
342
|
+
data: ChaiTheme;
|
|
343
|
+
} | {
|
|
344
|
+
type: "DESIGN_TOKENS";
|
|
345
|
+
data: ChaiDesignTokens;
|
|
346
|
+
};
|
|
347
|
+
|
|
336
348
|
declare interface ChaiSiteWideUsageData {
|
|
337
349
|
[pageId: string]: {
|
|
338
350
|
name: string;
|
package/dist/pages.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aE as s, aT as t, aP as u, aN as i, aO as r, ay as g, b0 as l, b1 as P, aU as h, as as c, r as d, aK as n, a_ as o, ax as p, w as A, aV as C, i as b, at as m, aW as U, j as k, k as R, aZ as S, aX as W, aY as B, a$ as F, e as I, h as L } from "./index-BDrc0HJQ.js";
|
|
2
2
|
export {
|
|
3
3
|
s as ChaiJsonInput,
|
|
4
4
|
t as ChaiWebsiteBuilder,
|
|
@@ -14,17 +14,17 @@ export {
|
|
|
14
14
|
n as useBuilderPageData,
|
|
15
15
|
o as useChaiAuth,
|
|
16
16
|
p as useChaiCurrentPage,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
A as useChaiUserInfo,
|
|
18
|
+
C as useClearAll,
|
|
19
|
+
b as useFallbackLang,
|
|
20
|
+
m as useFetch,
|
|
21
21
|
U as useGotoPage,
|
|
22
22
|
k as useLanguagePages,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
R as usePageTypes,
|
|
24
|
+
S as useRealtimeAdapter,
|
|
25
|
+
W as useReloadPage,
|
|
26
|
+
B as useUpdateActivePageMetadata,
|
|
27
|
+
F as useUserPermissions,
|
|
28
|
+
I as useWebsitePages,
|
|
29
|
+
L as useWebsiteSetting
|
|
30
30
|
};
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
-
import { B
|
|
3
|
-
import { e as
|
|
4
|
-
import {
|
|
5
|
-
import { LanguageSelector as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const s = X(), d = Y();
|
|
12
|
-
return ne({
|
|
13
|
-
queryKey: [I.GET_CHANGES],
|
|
14
|
-
queryFn: async () => d(s, { action: I.GET_CHANGES })
|
|
15
|
-
});
|
|
16
|
-
}, fe = ({ page: s, selectedPages: d, handleCheckboxChange: k, getPageType: f, hasSlug: m, currentOwnerId: r }) => {
|
|
17
|
-
const u = q(), { data: i } = se(r), o = r === u ? null : i == null ? void 0 : i.name;
|
|
2
|
+
import { B } from "./register-chai-top-bar-D6GjnauV.js";
|
|
3
|
+
import { e as H, f as J, g as K, o as Q, q as V } from "./index-C7bidKtE.js";
|
|
4
|
+
import { s as q, t as W, i as X, v as Y, k as Z, w as ee, T as I, x as te } from "./index-BDrc0HJQ.js";
|
|
5
|
+
import { LanguageSelector as se } from "./page-manager-search-and-filter-DJn98D02.js";
|
|
6
|
+
import { find as U, filter as a, map as b, keys as le, get as D, includes as S, orderBy as N, isEmpty as ae, uniq as F, first as ne, concat as re } from "lodash-es";
|
|
7
|
+
import { Lock as oe, GlobeIcon as ce, File as ie, Edit as de } from "lucide-react";
|
|
8
|
+
import { useState as j, useCallback as ue, useMemo as x, useEffect as G, startTransition as O } from "react";
|
|
9
|
+
const he = ({ page: s, selectedPages: m, handleCheckboxChange: k, getPageType: p, hasSlug: u, currentOwnerId: r }) => {
|
|
10
|
+
const d = q(), { data: i } = ee(r), o = r === d ? null : i == null ? void 0 : i.name;
|
|
18
11
|
return /* @__PURE__ */ n("tr", { className: "group relative border-b last:border-b-0 hover:bg-gray-50", children: [
|
|
19
12
|
/* @__PURE__ */ n(
|
|
20
13
|
"td",
|
|
@@ -22,105 +15,105 @@ const pe = () => {
|
|
|
22
15
|
scope: "row",
|
|
23
16
|
className: `flex items-center gap-x-1 whitespace-nowrap px-6 py-2 text-gray-900 dark:text-white ${o ? "opacity-50" : ""}`,
|
|
24
17
|
children: [
|
|
25
|
-
o ? /* @__PURE__ */ t(
|
|
18
|
+
o ? /* @__PURE__ */ t(oe, { className: "h-4 w-4 fill-red-200 text-red-500" }) : /* @__PURE__ */ t(
|
|
26
19
|
"input",
|
|
27
20
|
{
|
|
28
|
-
checked:
|
|
29
|
-
onClick: (
|
|
30
|
-
|
|
21
|
+
checked: S(m, s == null ? void 0 : s.id),
|
|
22
|
+
onClick: (f) => {
|
|
23
|
+
f.stopPropagation(), k(s == null ? void 0 : s.id);
|
|
31
24
|
},
|
|
32
25
|
type: "checkbox",
|
|
33
26
|
className: "cursor-pointer rounded focus:outline-none focus:ring-0"
|
|
34
27
|
}
|
|
35
28
|
),
|
|
36
29
|
" ",
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */ t(
|
|
39
|
-
s.slug && /* @__PURE__ */ t(
|
|
30
|
+
u(s.pageType) ? /* @__PURE__ */ t(ie, { className: "h-4 w-4" }) : /* @__PURE__ */ t(ce, { className: "h-4 w-4" }),
|
|
31
|
+
/* @__PURE__ */ t(I, { content: s.name, side: "top", showTooltip: s.name.length > 25, children: /* @__PURE__ */ t("span", { className: "max-w-[200px] truncate font-medium text-black", children: s.name }) }),
|
|
32
|
+
s.slug && /* @__PURE__ */ t(I, { content: s.slug, side: "top", showTooltip: s.slug.length > 25, children: /* @__PURE__ */ t("span", { className: "max-w-[200px] truncate font-mono text-xs text-muted-foreground", children: s.slug }) })
|
|
40
33
|
]
|
|
41
34
|
}
|
|
42
35
|
),
|
|
43
|
-
/* @__PURE__ */ t("td", { className: "px-2", children:
|
|
44
|
-
/* @__PURE__ */ t("td", { className: "px-4 text-right", children:
|
|
36
|
+
/* @__PURE__ */ t("td", { className: "px-2", children: p(s == null ? void 0 : s.pageType) }),
|
|
37
|
+
/* @__PURE__ */ t("td", { className: "px-4 text-right", children: ne(s.changes) || "" }),
|
|
45
38
|
/* @__PURE__ */ t($, { children: o && /* @__PURE__ */ n("button", { className: "absolute right-0 top-0 flex h-full items-center gap-x-1 rounded bg-red-50 px-2 py-0.5 text-xs font-light text-red-500 opacity-0 group-hover:opacity-100", children: [
|
|
46
|
-
/* @__PURE__ */ t(
|
|
39
|
+
/* @__PURE__ */ t(de, { size: 12, className: "stroke-[3]" }),
|
|
47
40
|
" ",
|
|
48
41
|
/* @__PURE__ */ t("span", { className: "font-medium", children: o }),
|
|
49
42
|
" is editing this page"
|
|
50
43
|
] }) })
|
|
51
44
|
] }, s == null ? void 0 : s.id);
|
|
52
|
-
},
|
|
45
|
+
}, we = ({
|
|
53
46
|
onClose: s = () => {
|
|
54
47
|
},
|
|
55
|
-
isPending:
|
|
48
|
+
isPending: m,
|
|
56
49
|
publishPage: k
|
|
57
50
|
}) => {
|
|
58
|
-
const
|
|
51
|
+
const p = q(), { pageToUser: u } = W(), [r, d] = j([]), i = X(), [o, f] = j(i), { data: w, isFetching: C } = Y(), { data: g } = Z(), T = ue((e) => {
|
|
59
52
|
var l;
|
|
60
|
-
return (l =
|
|
61
|
-
}, [
|
|
62
|
-
() => a(
|
|
63
|
-
[T,
|
|
64
|
-
),
|
|
65
|
-
() => a(w, (e) => e.pageType === "theme" ? !1 : o === i ? e.lang === o || e.lang === "" : e.lang === o),
|
|
53
|
+
return (l = U(g, { key: e })) == null ? void 0 : l.hasSlug;
|
|
54
|
+
}, [g]), y = x(
|
|
55
|
+
() => a(g, (e) => !T(e.key)).map((e) => e.key),
|
|
56
|
+
[T, g]
|
|
57
|
+
), L = F(b(w, "lang")).filter(Boolean), c = x(
|
|
58
|
+
() => a(w, (e) => e.pageType === "theme" || e.pageType === "design_tokens" ? !1 : o === i ? e.lang === o || e.lang === "" : e.lang === o),
|
|
66
59
|
[w, o, i]
|
|
67
|
-
),
|
|
60
|
+
), P = x(
|
|
68
61
|
() => a(c, (e) => !y.includes(e.pageType)),
|
|
69
62
|
[c, y]
|
|
70
|
-
),
|
|
63
|
+
), v = x(
|
|
71
64
|
() => a(c, (e) => y.includes(e.pageType)),
|
|
72
65
|
[c, y]
|
|
73
66
|
);
|
|
74
|
-
|
|
67
|
+
G(() => {
|
|
75
68
|
const e = b(a(c, { online: !0 }), "id");
|
|
76
|
-
O(() =>
|
|
77
|
-
}, [c]),
|
|
78
|
-
const e = a(
|
|
79
|
-
O(() =>
|
|
80
|
-
}, [
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
|
|
69
|
+
O(() => d(e));
|
|
70
|
+
}, [c]), G(() => {
|
|
71
|
+
const e = a(le(u), (l) => D(u, [l, "userId"]) !== p);
|
|
72
|
+
O(() => d((l) => a(l, (h) => !S(e, h))));
|
|
73
|
+
}, [u, p]);
|
|
74
|
+
const E = r.length === (c == null ? void 0 : c.length), z = (e) => {
|
|
75
|
+
d((l) => S(l, e) ? a(l, (h) => h !== e) : re(l, e));
|
|
76
|
+
}, A = () => {
|
|
77
|
+
d(E ? [] : b(c, "id"));
|
|
85
78
|
}, M = () => {
|
|
86
79
|
k(
|
|
87
|
-
{ ids:
|
|
80
|
+
{ ids: F(r) },
|
|
88
81
|
{
|
|
89
82
|
onSuccess: () => {
|
|
90
|
-
s(),
|
|
83
|
+
s(), te("CENTER_CENTER"), f(i);
|
|
91
84
|
}
|
|
92
85
|
}
|
|
93
86
|
);
|
|
94
87
|
}, R = (e) => {
|
|
95
88
|
if (e === "theme") return "Theme";
|
|
96
|
-
const l =
|
|
89
|
+
const l = U(g, { key: e });
|
|
97
90
|
return l ? l == null ? void 0 : l.name : e;
|
|
98
|
-
}, _ =
|
|
91
|
+
}, _ = x(() => {
|
|
99
92
|
const e = [
|
|
100
93
|
{ label: "Updated", top: "pt-2" },
|
|
101
|
-
...N(a(
|
|
102
|
-
...N(a(
|
|
103
|
-
].filter((
|
|
94
|
+
...N(a(P, { online: !0 }), "pageType"),
|
|
95
|
+
...N(a(v, { online: !0 }), "pageType")
|
|
96
|
+
].filter((h) => h.pageType !== "theme" && h.pageType !== "design_tokens"), l = [
|
|
104
97
|
{ label: "Offline", top: "pt-6" },
|
|
105
|
-
...N(a(
|
|
106
|
-
...N(a(
|
|
98
|
+
...N(a(P, { online: !1 }), "pageType"),
|
|
99
|
+
...N(a(v, { online: !1 }), "pageType")
|
|
107
100
|
];
|
|
108
101
|
return [...e, ...l];
|
|
109
|
-
}, [
|
|
110
|
-
return /* @__PURE__ */ n(
|
|
111
|
-
/* @__PURE__ */ n(
|
|
112
|
-
/* @__PURE__ */ t(
|
|
113
|
-
/* @__PURE__ */ t(
|
|
102
|
+
}, [P, v]);
|
|
103
|
+
return /* @__PURE__ */ n(H, { className: "flex max-h-[80%] max-w-4xl flex-col", children: [
|
|
104
|
+
/* @__PURE__ */ n(J, { children: [
|
|
105
|
+
/* @__PURE__ */ t(K, { children: "Publish changes" }),
|
|
106
|
+
/* @__PURE__ */ t(Q, { className: "text-xs", children: "Select the pages you want to publish. Click publish when you're done." })
|
|
114
107
|
] }),
|
|
115
|
-
|
|
116
|
-
|
|
108
|
+
L.length > 0 && /* @__PURE__ */ t("div", { className: "my-[2px] mt-0", children: /* @__PURE__ */ t(
|
|
109
|
+
se,
|
|
117
110
|
{
|
|
118
|
-
languages: [i, ...
|
|
111
|
+
languages: [i, ...L],
|
|
119
112
|
selectedLanguage: o,
|
|
120
|
-
setSelectedLanguage:
|
|
113
|
+
setSelectedLanguage: f
|
|
121
114
|
}
|
|
122
115
|
) }),
|
|
123
|
-
/* @__PURE__ */ t("div", { className: "no-scrollbar relative -mx-4 -mt-4 h-full max-h-full overflow-y-auto", children:
|
|
116
|
+
/* @__PURE__ */ t("div", { className: "no-scrollbar relative -mx-4 -mt-4 h-full max-h-full overflow-y-auto", children: C ? /* @__PURE__ */ n("div", { className: "space-y-2 px-1", children: [
|
|
124
117
|
/* @__PURE__ */ t("div", { className: "mt-2 h-6 w-full animate-pulse rounded bg-gray-200" }),
|
|
125
118
|
/* @__PURE__ */ t("div", { className: "h-6 w-full animate-pulse rounded bg-gray-200" }),
|
|
126
119
|
/* @__PURE__ */ t("div", { className: "h-6 w-full animate-pulse rounded bg-gray-200" }),
|
|
@@ -131,9 +124,9 @@ const pe = () => {
|
|
|
131
124
|
/* @__PURE__ */ t(
|
|
132
125
|
"input",
|
|
133
126
|
{
|
|
134
|
-
checked:
|
|
127
|
+
checked: E,
|
|
135
128
|
onClick: (e) => {
|
|
136
|
-
e.stopPropagation(),
|
|
129
|
+
e.stopPropagation(), A();
|
|
137
130
|
},
|
|
138
131
|
type: "checkbox",
|
|
139
132
|
className: "mt-1 cursor-pointer rounded focus:outline-none focus:ring-0"
|
|
@@ -150,30 +143,30 @@ const pe = () => {
|
|
|
150
143
|
/* @__PURE__ */ t("div", { className: "absolute inset-0 left-6 flex items-center", children: /* @__PURE__ */ t("div", { className: "order-gray-300 w-full" }) }),
|
|
151
144
|
/* @__PURE__ */ t("div", { className: "relative flex justify-start", children: /* @__PURE__ */ t("span", { className: "bg-gray-50 pr-2", children: e.label }) })
|
|
152
145
|
] }) }, "separator") : /* @__PURE__ */ t(
|
|
153
|
-
|
|
146
|
+
he,
|
|
154
147
|
{
|
|
155
148
|
page: e,
|
|
156
149
|
selectedPages: r,
|
|
157
|
-
handleCheckboxChange:
|
|
150
|
+
handleCheckboxChange: z,
|
|
158
151
|
getPageType: R,
|
|
159
152
|
hasSlug: T,
|
|
160
|
-
currentOwnerId:
|
|
153
|
+
currentOwnerId: D(u, [(e == null ? void 0 : e.primaryPage) || (e == null ? void 0 : e.id), "userId"])
|
|
161
154
|
}
|
|
162
155
|
)
|
|
163
156
|
) })
|
|
164
157
|
] }) }),
|
|
165
|
-
/* @__PURE__ */ n(
|
|
158
|
+
/* @__PURE__ */ n(V, { className: "mt-10 flex items-center justify-center", children: [
|
|
166
159
|
r.length > 0 && /* @__PURE__ */ n("span", { className: "text-center text-sm text-muted-foreground", children: [
|
|
167
160
|
r.length,
|
|
168
161
|
" Page",
|
|
169
162
|
r.length !== 1 ? "s" : "",
|
|
170
163
|
" Selected"
|
|
171
164
|
] }),
|
|
172
|
-
/* @__PURE__ */ t(
|
|
173
|
-
/* @__PURE__ */ t(
|
|
165
|
+
/* @__PURE__ */ t(B, { disabled: m, variant: "outline", onClick: s, children: "Cancel" }),
|
|
166
|
+
/* @__PURE__ */ t(B, { disabled: m || C || ae(r), onClick: M, children: m ? "Publishing..." : "Publish Selected" })
|
|
174
167
|
] })
|
|
175
168
|
] });
|
|
176
169
|
};
|
|
177
170
|
export {
|
|
178
|
-
|
|
171
|
+
we as default
|
|
179
172
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),q=require("./register-chai-top-bar-DyW9GPzV.cjs"),f=require("./index-DKjYF53r.cjs"),i=require("./index-BuXfCtgR.cjs"),U=require("./page-manager-search-and-filter-BOpne6v-.cjs"),t=require("lodash-es"),b=require("lucide-react"),r=require("react"),F=({page:l,selectedPages:m,handleCheckboxChange:N,getPageType:p,hasSlug:x,currentOwnerId:a})=>{const u=i.useUserId(),{data:d}=i.useChaiUserInfo(a),c=a===u?null:d==null?void 0:d.name;return e.jsxs("tr",{className:"group relative border-b last:border-b-0 hover:bg-gray-50",children:[e.jsxs("td",{scope:"row",className:`flex items-center gap-x-1 whitespace-nowrap px-6 py-2 text-gray-900 dark:text-white ${c?"opacity-50":""}`,children:[c?e.jsx(b.Lock,{className:"h-4 w-4 fill-red-200 text-red-500"}):e.jsx("input",{checked:t.includes(m,l==null?void 0:l.id),onClick:y=>{y.stopPropagation(),N(l==null?void 0:l.id)},type:"checkbox",className:"cursor-pointer rounded focus:outline-none focus:ring-0"})," ",x(l.pageType)?e.jsx(b.File,{className:"h-4 w-4"}):e.jsx(b.GlobeIcon,{className:"h-4 w-4"}),e.jsx(i.Tooltip,{content:l.name,side:"top",showTooltip:l.name.length>25,children:e.jsx("span",{className:"max-w-[200px] truncate font-medium text-black",children:l.name})}),l.slug&&e.jsx(i.Tooltip,{content:l.slug,side:"top",showTooltip:l.slug.length>25,children:e.jsx("span",{className:"max-w-[200px] truncate font-mono text-xs text-muted-foreground",children:l.slug})})]}),e.jsx("td",{className:"px-2",children:p(l==null?void 0:l.pageType)}),e.jsx("td",{className:"px-4 text-right",children:t.first(l.changes)||""}),e.jsx(e.Fragment,{children:c&&e.jsxs("button",{className:"absolute right-0 top-0 flex h-full items-center gap-x-1 rounded bg-red-50 px-2 py-0.5 text-xs font-light text-red-500 opacity-0 group-hover:opacity-100",children:[e.jsx(b.Edit,{size:12,className:"stroke-[3]"})," ",e.jsx("span",{className:"font-medium",children:c})," is editing this page"]})})]},l==null?void 0:l.id)},D=({onClose:l=()=>{},isPending:m,publishPage:N})=>{const p=i.useUserId(),{pageToUser:x}=i.usePageToUser(),[a,u]=r.useState([]),d=i.useFallbackLang(),[c,y]=r.useState(d),{data:k,isFetching:P}=i.useGetPageChanges(),{data:g}=i.usePageTypes(),T=r.useCallback(s=>{var n;return(n=t.find(g,{key:s}))==null?void 0:n.hasSlug},[g]),j=r.useMemo(()=>t.filter(g,s=>!T(s.key)).map(s=>s.key),[T,g]),v=t.uniq(t.map(k,"lang")).filter(Boolean),o=r.useMemo(()=>t.filter(k,s=>s.pageType==="theme"||s.pageType==="design_tokens"?!1:c===d?s.lang===c||s.lang==="":s.lang===c),[k,c,d]),w=r.useMemo(()=>t.filter(o,s=>!j.includes(s.pageType)),[o,j]),S=r.useMemo(()=>t.filter(o,s=>j.includes(s.pageType)),[o,j]);r.useEffect(()=>{const s=t.map(t.filter(o,{online:!0}),"id");r.startTransition(()=>u(s))},[o]),r.useEffect(()=>{const s=t.filter(t.keys(x),n=>t.get(x,[n,"userId"])!==p);r.startTransition(()=>u(n=>t.filter(n,h=>!t.includes(s,h))))},[x,p]);const C=a.length===(o==null?void 0:o.length),B=s=>{u(n=>t.includes(n,s)?t.filter(n,h=>h!==s):t.concat(n,s))},E=()=>{u(C?[]:t.map(o,"id"))},L=()=>{N({ids:t.uniq(a)},{onSuccess:()=>{l(),i.throwConfetti("CENTER_CENTER"),y(d)}})},M=s=>{if(s==="theme")return"Theme";const n=t.find(g,{key:s});return n?n==null?void 0:n.name:s},I=r.useMemo(()=>{const s=[{label:"Updated",top:"pt-2"},...t.orderBy(t.filter(w,{online:!0}),"pageType"),...t.orderBy(t.filter(S,{online:!0}),"pageType")].filter(h=>h.pageType!=="theme"&&h.pageType!=="design_tokens"),n=[{label:"Offline",top:"pt-6"},...t.orderBy(t.filter(w,{online:!1}),"pageType"),...t.orderBy(t.filter(S,{online:!1}),"pageType")];return[...s,...n]},[w,S]);return e.jsxs(f.DialogContent,{className:"flex max-h-[80%] max-w-4xl flex-col",children:[e.jsxs(f.DialogHeader,{children:[e.jsx(f.DialogTitle,{children:"Publish changes"}),e.jsx(f.DialogDescription,{className:"text-xs",children:"Select the pages you want to publish. Click publish when you're done."})]}),v.length>0&&e.jsx("div",{className:"my-[2px] mt-0",children:e.jsx(U.LanguageSelector,{languages:[d,...v],selectedLanguage:c,setSelectedLanguage:y})}),e.jsx("div",{className:"no-scrollbar relative -mx-4 -mt-4 h-full max-h-full overflow-y-auto",children:P?e.jsxs("div",{className:"space-y-2 px-1",children:[e.jsx("div",{className:"mt-2 h-6 w-full animate-pulse rounded bg-gray-200"}),e.jsx("div",{className:"h-6 w-full animate-pulse rounded bg-gray-200"}),e.jsx("div",{className:"h-6 w-full animate-pulse rounded bg-gray-200"}),e.jsx("div",{className:"h-6 w-full animate-pulse rounded bg-gray-200"})]}):e.jsxs("table",{className:"w-full text-left text-xs text-gray-500 dark:text-gray-400 rtl:text-right",children:[e.jsx("thead",{className:"sticky top-0 z-10 border-b bg-gray-50 text-gray-700 dark:bg-gray-700 dark:text-gray-400",children:e.jsxs("tr",{children:[e.jsxs("th",{scope:"col",className:"w-[1 50px] flex items-center gap-x-2 px-6 py-3",children:[e.jsx("input",{checked:C,onClick:s=>{s.stopPropagation(),E()},type:"checkbox",className:"mt-1 cursor-pointer rounded focus:outline-none focus:ring-0"}),"Name"]}),e.jsx("th",{scope:"col",className:"w-[150px] px-2 py-3",children:"Type"}),e.jsx("th",{scope:"col",className:"w-[150px] px-4 py-3 text-right",children:"Status"})]})}),e.jsx("tbody",{children:t.map(I,s=>s.label?e.jsx("tr",{children:e.jsxs("td",{colSpan:3,className:`relative px-6 py-2 text-xs font-medium text-gray-800 ${s.top}`,children:[e.jsx("div",{className:"absolute inset-0 left-6 flex items-center",children:e.jsx("div",{className:"order-gray-300 w-full"})}),e.jsx("div",{className:"relative flex justify-start",children:e.jsx("span",{className:"bg-gray-50 pr-2",children:s.label})})]})},"separator"):e.jsx(F,{page:s,selectedPages:a,handleCheckboxChange:B,getPageType:M,hasSlug:T,currentOwnerId:t.get(x,[(s==null?void 0:s.primaryPage)||(s==null?void 0:s.id),"userId"])}))})]})}),e.jsxs(f.DialogFooter,{className:"mt-10 flex items-center justify-center",children:[a.length>0&&e.jsxs("span",{className:"text-center text-sm text-muted-foreground",children:[a.length," Page",a.length!==1?"s":""," Selected"]}),e.jsx(q.Button,{disabled:m,variant:"outline",onClick:l,children:"Cancel"}),e.jsx(q.Button,{disabled:m||P||t.isEmpty(a),onClick:L,children:m?"Publishing...":"Publish Selected"})]})]})};exports.default=D;
|
package/dist/render.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./default-theme-options-DN-3gIjM.cjs"),d=require("./apply-binding-xiigK7eK.cjs"),m=require("react/jsx-runtime"),t=require("lodash-es"),g=require("react"),b=require("./core-czmLeR0h.cjs"),F=require("@mhsdesign/jit-browser-tailwindcss"),j=require("@tailwindcss/aspect-ratio"),q=require("@tailwindcss/container-queries"),K=require("@tailwindcss/forms"),M=require("@tailwindcss/typography"),x=require("./get-chai-builder-theme-C_qofMh_.cjs");async function O(e){const a={pageProps:e.pageProps,block:e.block,lang:e.lang,draft:e.draft,inBuilder:!1},n=await e.dataProvider(a);return t.has(n,"$metadata")&&t.isFunction(e.dataProviderMetadataCallback)&&e.dataProviderMetadataCallback(e.block,n.$metadata),e.children({...t.omit(n,"$metadata")})}const N=()=>m.jsx("div",{}),H=e=>{const{block:a,lang:n,fallbackLang:s,children:i,externalData:l,blocks:o,draft:r,pageProps:c,dataProviderMetadataCallback:f}=e,p=b.getRegisteredChaiBlock(a._type),u=t.get(p,"component",null),k=t.get(e.repeaterData,"index",-1),_=t.get(e.repeaterData,"dataKey",""),P=n===s?"":n??"",y=d.applyBindingToBlockProps(d.applyLanguage(a,P,p),l??{},{index:k,key:_}),h=d.getBlockTagAttributes(a,!1),I=D(o,a._id,d.getBlockRuntimeProps(a._type)),$=t.has(p,"dataProvider")&&t.isFunction(p.dataProvider),v={...y,...h,...I},B={blockProps:{},inBuilder:!1,lang:n||s||"en",draft:r??!1,pageData:l??{},...v},C=t.get(v,"_show",!0);if(t.isNull(u)||!C)return null;if($){const w=t.get(p,"suspenseFallback",N);return m.jsx(g.Suspense,{fallback:g.createElement(w),children:m.jsx(O,{lang:n??"",pageProps:c,block:v,dataProvider:p.dataProvider,...f?{dataProviderMetadataCallback:f}:{},draft:r??!1,children:S=>g.createElement(u,{...B,...S,children:i({_id:a._id,_type:a._type,...t.isArray(y.repeaterItems)?{repeaterItems:d.applyLimit(y.repeaterItems,a),$repeaterItemsKey:y.$repeaterItemsKey,repeaterTotalItems:y.repeaterTotalItems??-1}:{}})})})})}return m.jsx(g.Suspense,{children:g.createElement(u,{...B,children:i({_id:a._id,_type:a._type,...t.isArray(y.repeaterItems)?{repeaterItems:d.applyLimit(y.repeaterItems,a),$repeaterItemsKey:y.$repeaterItemsKey,repeaterTotalItems:y.repeaterTotalItems??-1}:{}})})})},E=e=>{const{blocks:a,parent:n,repeaterData:s,type:i}=e;let l=t.uniqBy(t.filter(a,r=>t.has(r,"_id")&&(t.isEmpty(n)?!r._parent:r._parent===n)),"_id");const o=r=>t.filter(a,c=>c._parent===r).length>0;return(i==="Heading"||i==="Paragraph"||i==="Link"||i==="Span")&&(l=d.adjustSpacingInContentBlocks(l)),t.map(l,(r,c)=>r?g.createElement(H,{...e,key:r._id?`${r._id}-${c}`:`block-${c}`,block:r},({_id:f,_type:p,repeaterItems:u,$repeaterItemsKey:k})=>p==="Repeater"?t.isArray(u)&&u.map((_,P)=>g.createElement(E,{...e,parent:r._id,key:`${t.get(r,"_parent","root")}-${r._id}-${c}-${P}`,repeaterData:{index:P,dataKey:k}})):o(f)?g.createElement(E,{...e,parent:r._id,key:`${t.get(r,"_parent","root")}-${r._id}-${c}`,repeaterData:s,type:r._type}):null):null)},D=(e,a,n)=>t.isEmpty(n)?{}:Object.entries(n).reduce((s,[i,l])=>{const o=[];let r=t.find(e,{_id:a});for(;r;)o.push(r),r=t.find(e,{_id:r._parent});const c=t.find(o,{_type:l.block});return c&&(s[i]=t.get(c,t.get(l,"prop"),null)),s},{});function J(e){if(t.isEmpty(e.lang)&&!t.isEmpty(e.fallbackLang))throw new Error("lang prop is required when fallbackLang is provided");if(t.isEmpty(e.blocks))return null;const a=e.lang??"en",n=e.fallbackLang??a;return m.jsx(E,{...e,lang:a,fallbackLang:n})}async function V(e){const a=await e.dataProvider;return t.has(a,"$metadata")&&t.isFunction(e.dataProviderMetadataCallback)&&e.dataProviderMetadataCallback(e.block,a.$metadata),e.children({...t.omit(a,"$metadata")})}const W=()=>m.jsx("div",{}),U=async e=>{const{block:a,lang:n,fallbackLang:s,children:i,externalData:l,blocks:o,draft:r,pageProps:c,dataProviderMetadataCallback:f,dataProviders:p}=e,u=b.getRegisteredChaiBlock(a._type),k=t.get(u,"component",null),_=t.get(e.repeaterData,"index",-1),P=t.get(e.repeaterData,"dataKey",""),y=n===s?"":n??"en",h=d.applyBindingToBlockProps(d.applyLanguage(a,y,u),l??{},{index:_,key:P}),I=d.getBlockTagAttributes(a,!1),$=D(o,a._id,d.getBlockRuntimeProps(a._type)),v=t.has(u,"dataProvider")&&t.isFunction(u.dataProvider),B={...h,...I,...$},C={blockProps:{},inBuilder:!1,lang:n||s||"en",draft:r??!1,pageData:l??{},...B},w=t.get(B,"_show",!0);if(t.isNull(k)||!w)return null;if(v){const S=t.get(p,a._id,Promise.resolve({})),R=t.get(u,"suspenseFallback",W);return m.jsx(g.Suspense,{fallback:g.createElement(R),children:m.jsx(V,{lang:n??"",pageProps:c,block:B,dataProvider:S,...f?{dataProviderMetadataCallback:f}:{},draft:r??!1,children:A=>g.createElement(k,{...C,...A,children:i({_id:a._id,_type:a._type,...t.isArray(h.repeaterItems)?{repeaterItems:d.applyLimit(h.repeaterItems,a),$repeaterItemsKey:h.$repeaterItemsKey,repeaterTotalItems:h.repeaterTotalItems??-1}:{}})})})})}return g.createElement(k,{...C,children:i({_id:a._id,_type:a._type,...t.isArray(h.repeaterItems)?{repeaterItems:d.applyLimit(h.repeaterItems,a),$repeaterItemsKey:h.$repeaterItemsKey,repeaterTotalItems:h.repeaterTotalItems??-1}:{}})})},T=async e=>{const{blocks:a,parent:n,repeaterData:s,type:i}=e;let l=t.uniqBy(t.filter(a,r=>t.has(r,"_id")&&(t.isEmpty(n)?!r._parent:r._parent===n)),"_id");const o=r=>t.filter(a,c=>c._parent===r).length>0;return(i==="Heading"||i==="Paragraph"||i==="Link")&&(l=d.adjustSpacingInContentBlocks(l)),t.map(l,r=>r?g.createElement(U,{...e,dataProviders:e.dataProviders,key:r._id,block:r},({_id:c,_type:f,repeaterItems:p,$repeaterItemsKey:u})=>f==="Repeater"?t.isArray(p)&&p.map((k,_)=>g.createElement(T,{...e,parent:r._id,key:`${t.get(r,"_parent","root")}-${r._id}-${_}`,repeaterData:{index:_,dataKey:u}})):o(c)?g.createElement(T,{...e,parent:r._id,key:`${t.get(r,"_parent","root")}-${r._id}`,repeaterData:s,type:r._type}):null):null)};async function G(e){if(t.isEmpty(e.lang)&&!t.isEmpty(e.fallbackLang))throw new Error("lang prop is required when fallbackLang is provided");if(t.isEmpty(e.blocks))return null;const a=e.lang??"en",n=e.fallbackLang??a;if(e.dataProviders)return m.jsx(T,{...e,lang:a,fallbackLang:n,dataProviders:e.dataProviders});const i=e.blocks.filter(l=>{const o=b.getRegisteredChaiBlock(l._type);return!!(t.has(o,"dataProvider")&&t.isFunction(o.dataProvider))}).reduce((l,o)=>{const r=b.getRegisteredChaiBlock(o._type);if(!r||!r.dataProvider)return l;const c={pageProps:e.pageProps,block:o,lang:e.lang,draft:e.draft,inBuilder:!1};return l[o._id]=Promise.resolve(r.dataProvider(c)),l},{});return m.jsx(T,{...e,lang:a,fallbackLang:n,dataProviders:i})}function Q(e,a){const n=e.filter(s=>s._type==="GlobalBlock"||s._type==="PartialBlock");for(let s=0;s<n.length;s++){const i=n[s],l=t.get(i,"partialBlockId",t.get(i,"globalBlock",""));if(l==="")continue;let o=t.cloneDeep(t.get(a,l,[]));i._parent&&(o==null?void 0:o.length)>0&&(o=o.map(c=>(t.isEmpty(c._parent)&&(c._parent=i._parent),c)));const r=e.indexOf(i);e.splice(r,1,...o)}return e}const z=e=>{if(!e)return[];try{return JSON.parse(X(e)).filter(n=>!n._type.startsWith("@chai"))}catch{return[{_type:"Paragraph",_id:"error",content:"Invalid JSON. Please check the JSON string."}]}};function X(e){const a=/(asset:\/\/|https:\/\/asset\.localhost\/)(?:localhost\/)?[^"']+/g;return e.replace(a,n=>{const s=decodeURIComponent(n),i=s.indexOf("public");return i!==-1?s.substring(i+6):s})}async function Y(e,a=[],n=!1){return await F.createTailwindcss({tailwindConfig:{darkMode:"class",safelist:a,theme:{extend:{...x.getChaiBuilderTheme(),keyframes:{"accordion-down":{from:{height:"0"},to:{height:"var(--radix-accordion-content-height)"}},"accordion-up":{from:{height:"var(--radix-accordion-content-height)"},to:{height:"0"}}},animation:{"accordion-down":"accordion-down 0.2s ease-out","accordion-up":"accordion-up 0.2s ease-out"}}},plugins:[K,M,j,q,x.chaiBuilderPlugin],corePlugins:{preflight:n}}}).generateStylesFromContent(` ${n?"@tailwind base;":""}
|
|
2
2
|
@tailwind components;
|
|
3
3
|
@tailwind utilities;`,e)}const Z=(e,a)=>{const n=JSON.stringify(e).replace(/#styles:([^"]*)/g,(s,i)=>`#styles:${i.replace(/^,/g," ")}`.replace(/#styles:/g,""));return Y([n],[],a)},ee=async(e,a=!1)=>await Z(e,a);exports.getChaiThemeCssVariables=L.getChaiThemeCssVariables;exports.getThemeFontsCSSImport=L.getThemeFontsCSSImport;exports.getThemeFontsLinkMarkup=L.getThemeFontsLinkMarkup;exports.applyChaiDataBinding=d.applyChaiDataBinding;exports.applyDesignTokens=d.applyDesignTokens;exports.convertHTMLToChaiBlocks=d.getBlocksFromHTML;exports.AsyncRenderChaiBlocks=G;exports.RenderChaiBlocks=J;exports.convertToBlocks=z;exports.getMergedPartialBlocks=Q;exports.getStylesForBlocks=ee;
|
package/dist/render.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { c as De, e as xe, f as Ke } from "./
|
|
2
|
-
import { a as O, b as N, c as E, d as J, e as C, f as j } from "./apply-binding-
|
|
3
|
-
import { h as Ae, i as Fe, g as Me } from "./apply-binding-
|
|
1
|
+
import { c as De, e as xe, f as Ke } from "./default-theme-options-saBIkWGT.js";
|
|
2
|
+
import { a as O, b as N, c as E, d as J, e as C, f as j } from "./apply-binding-BYCW1k2l.js";
|
|
3
|
+
import { h as Ae, i as Fe, g as Me } from "./apply-binding-BYCW1k2l.js";
|
|
4
4
|
import { jsx as m } from "react/jsx-runtime";
|
|
5
5
|
import { has as P, isFunction as I, omit as q, get as d, isNull as H, isArray as B, uniqBy as W, filter as S, isEmpty as h, map as U, find as A, cloneDeep as z } from "lodash-es";
|
|
6
6
|
import { Suspense as F, createElement as g } from "react";
|
|
7
|
-
import {
|
|
7
|
+
import { f as L } from "./core-nSRy3D7z.js";
|
|
8
8
|
import { createTailwindcss as X } from "@mhsdesign/jit-browser-tailwindcss";
|
|
9
9
|
import Y from "@tailwindcss/aspect-ratio";
|
|
10
10
|
import Z from "@tailwindcss/container-queries";
|
|
11
11
|
import ee from "@tailwindcss/forms";
|
|
12
12
|
import te from "@tailwindcss/typography";
|
|
13
|
-
import { c as ae, g as re } from "./get-chai-builder-theme-
|
|
13
|
+
import { c as ae, g as re } from "./get-chai-builder-theme-CyOkIlte.js";
|
|
14
14
|
async function ne(e) {
|
|
15
15
|
const t = {
|
|
16
16
|
pageProps: e.pageProps,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { h as D, D as N, e as S, f as j, g as v, N as w } from "./index-
|
|
2
|
+
import { h as D, D as N, e as S, f as j, g as v, N as w } from "./index-C7bidKtE.js";
|
|
3
3
|
import { B } from "./register-chai-top-bar-D6GjnauV.js";
|
|
4
4
|
const M = ({
|
|
5
5
|
isOpen: f,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-DKjYF53r.cjs"),p=require("./register-chai-top-bar-DyW9GPzV.cjs"),S=({isOpen:m,onClose:r,editor:t,rteElement:f})=>{const a=s.usePageExternalData(),u=o=>{if(!t)return;const i=`{{${o}}}`;t.commands.focus();const{from:j,to:g}=t.state.selection;if(j!==g)t.chain().deleteSelection().insertContent(i).run();else{const{state:c}=t,n=c.selection.from,x=c.doc.textBetween(Math.max(0,n-1),n),l=c.doc.textBetween(n,Math.min(n+1,c.doc.content.size));let d="";n>0&&x!==" "&&!/[.,!?;:]/.test(x)&&(d=" ");let h="";l&&l!==" "&&!/[.,!?;:]/.test(l)&&(h=" "),t.chain().insertContent(d+i+h).run()}};return e.jsx(s.Dialog,{open:m,onOpenChange:o=>!o&&r(),children:e.jsxs(s.DialogContent,{className:"max-h-[90vh] overflow-y-auto sm:max-w-[800px]",children:[e.jsx(s.DialogHeader,{children:e.jsxs(s.DialogTitle,{className:"flex items-center justify-between pr-8",children:[e.jsx("span",{children:"Rich Text Editor"}),a&&Object.keys(a).length>0&&e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:"mr-2 text-sm text-muted-foreground",children:"Add field:"}),e.jsx("div",{className:"rte-path-selector",children:e.jsx(s.NestedPathSelector,{data:a,onSelect:u})})]})]})}),f,e.jsx("div",{className:"mt-4 flex justify-end",children:e.jsx(p.Button,{onClick:r,children:"Done"})})]})})};exports.default=S;
|