@chaibuilder/sdk 1.0.24 → 1.1.0
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/AddBlocks-P3qHuE5J.cjs +1 -0
- package/dist/AddBlocks-imyQSCbI.js +230 -0
- package/dist/{BrandingOptions-2aNZT1u3.cjs → BrandingOptions-_2XBEPab.cjs} +1 -1
- package/dist/{BrandingOptions-GLVanp1T.js → BrandingOptions-tSNtQ1Kv.js} +1 -1
- package/dist/CanvasArea-TzIgm_vh.cjs +58 -0
- package/dist/CanvasArea-dS2B20gv.js +1421 -0
- package/dist/{CurrentPage-JJpZpFko.cjs → CurrentPage-_Em0U2gh.cjs} +1 -1
- package/dist/{CurrentPage-fyWf5F84.js → CurrentPage-pSsaLyEf.js} +2 -2
- package/dist/Layers-RyVRzaUa.cjs +1 -0
- package/dist/{Layers-RGy6kyuR.js → Layers-wp2Uc2Y5.js} +119 -137
- package/dist/{MarkAsGlobalBlock-EsX3-clj.js → MarkAsGlobalBlock-aqik3ouc.js} +1 -1
- package/dist/{MarkAsGlobalBlock-1G5m_8t3.cjs → MarkAsGlobalBlock-p_wvHkQZ.cjs} +1 -1
- package/dist/{PagesPanel-LjiXL4rp.js → PagesPanel-L2VS8RyZ.js} +3 -3
- package/dist/{PagesPanel-J8uYp1Tp.cjs → PagesPanel-ZuXc2610.cjs} +1 -1
- package/dist/{ProjectPanel-IXVY1LJ_.cjs → ProjectPanel-SErKorHi.cjs} +1 -1
- package/dist/{ProjectPanel-F435j6T2.js → ProjectPanel-T3AXGe7O.js} +3 -3
- package/dist/{Settings-xwTkQuKA.cjs → Settings-GJHtwQaa.cjs} +1 -1
- package/dist/{Settings-b3lEaQ7w.js → Settings-xkL3U3Y-.js} +2 -2
- package/dist/{SidePanels-1Ooc-KTb.cjs → SidePanels-5FNROZe7.cjs} +1 -1
- package/dist/{SidePanels-MnI_uhIo.js → SidePanels-pd7HYv8I.js} +33 -32
- package/dist/{Topbar-1ClabAix.js → Topbar-Jc74a6oE.js} +1 -1
- package/dist/{Topbar-e0hKiAm_.cjs → Topbar-ZjAs5fDc.cjs} +1 -1
- package/dist/{UnsplashImages-UejSDiRk.js → UnsplashImages-_PxEYx5c.js} +1 -1
- package/dist/{UnsplashImages-OJ5u1mVM.cjs → UnsplashImages-nXceZLmd.cjs} +1 -1
- package/dist/{UploadImages-2SqVkr1u.cjs → UploadImages-tcQb5NZu.cjs} +1 -1
- package/dist/{UploadImages-xBJTMBKX.js → UploadImages-zzSgKmP9.js} +10 -10
- package/dist/{add-page-modal-SdyjVxRW.js → add-page-modal-Njd5M7E2.js} +3 -3
- package/dist/{add-page-modal-rkF5RqMj.cjs → add-page-modal-U8EH-GIa.cjs} +1 -1
- package/dist/{confirm-alert-TCwoZBC3.js → confirm-alert-2JxcNf3T.js} +1 -1
- package/dist/{confirm-alert-uk39UILT.cjs → confirm-alert-mzlwOW9w.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +2 -2
- package/dist/{delete-page-modal-PKSlPOAB.cjs → delete-page-modal-0LQiM0fX.cjs} +1 -1
- package/dist/{delete-page-modal-pjChqG0d.js → delete-page-modal-NT7df4pk.js} +2 -2
- package/dist/{form-aIN_qzKQ.js → form-TQ7vwDYO.js} +1 -1
- package/dist/{form-N6Izl5Ni.cjs → form-bSW-Pkw9.cjs} +1 -1
- package/dist/{index-0ZqKzbSx.js → index-N3mTbV2j.js} +6 -4
- package/dist/{index-aPk1Fuat.js → index-ORFlyrBx.js} +536 -534
- package/dist/{index-LL32f5q7.cjs → index-pYZXf7hY.cjs} +2 -2
- package/dist/index-zkc4SQCu.cjs +1 -0
- package/dist/{page-viewer-wrYXvC-7.cjs → page-viewer-UxwOwHCO.cjs} +1 -1
- package/dist/{page-viewer-SMOg1l3b.js → page-viewer-e3lOBAH3.js} +3 -3
- package/dist/{project-general-setting-wDjCo89M.cjs → project-general-setting-DrLwWE-6.cjs} +1 -1
- package/dist/{project-general-setting-CcnnvnwD.js → project-general-setting-el86II8N.js} +3 -3
- package/dist/{project-seo-setting-RJMYUQxR.cjs → project-seo-setting-cERASO9j.cjs} +1 -1
- package/dist/{project-seo-setting-CPtrvtsw.js → project-seo-setting-k0HlefUD.js} +2 -2
- package/dist/{single-page-detail-7NRw-CLc.js → single-page-detail-UFEXRI81.js} +4 -4
- package/dist/{single-page-detail-gnpyWcy7.cjs → single-page-detail-fUh22jZE.cjs} +1 -1
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +57 -57
- package/dist/useAddBlockByDrop-DPV32UHP.cjs +1 -0
- package/dist/useAddBlockByDrop-UA_Iw_4l.js +20 -0
- package/package.json +2 -2
- package/dist/AddBlocks-F05ZiQnz.cjs +0 -3
- package/dist/AddBlocks-kmAje7cV.js +0 -270
- package/dist/CanvasArea-AHGpIP2x.cjs +0 -56
- package/dist/CanvasArea-gJ_UifbO.js +0 -1349
- package/dist/Layers-YtfF6ty5.cjs +0 -1
- package/dist/index-4h4Ti2E4.cjs +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-NV737rRe.js";
|
|
2
2
|
import { PlusIcon as E, Half2Icon as V } from "@radix-ui/react-icons";
|
|
3
|
-
import h, { useState as p, useEffect as L, useMemo as M, lazy as
|
|
4
|
-
import { useAtom as
|
|
5
|
-
import { filter as
|
|
6
|
-
import { ao as O, ap as Y, aq as J, ar as U, as as $, D as q, E as G, F as Z, G as Q, H as W, I as X, J as ee, K as se, at as re, s as ae, t as ie, au as
|
|
3
|
+
import h, { useState as p, useEffect as L, useMemo as M, lazy as b, Suspense as v } from "react";
|
|
4
|
+
import { useAtom as N } from "jotai";
|
|
5
|
+
import { filter as j, map as k, isNull as H, find as I, isEmpty as R, each as F, get as _ } from "lodash";
|
|
6
|
+
import { ao as O, ap as Y, aq as J, ar as U, as as $, D as q, E as G, F as Z, G as Q, H as W, I as X, J as ee, K as se, at as re, s as ae, t as ie, au as le, av as te, aw as oe, ax as ne, ay as C, i as D, az as ce, aA as de, B as g, S as A, aB as me, aC as xe, aD as P, aE as S } from "./index-ORFlyrBx.js";
|
|
7
7
|
import "./lib.js";
|
|
8
8
|
import { ListTreeIcon as T, DatabaseIcon as pe } from "lucide-react";
|
|
9
9
|
import { getChaiDataProviders as ue } from "@chaibuilder/runtime";
|
|
10
|
-
import { E as he } from "./index-
|
|
10
|
+
import { E as he } from "./index-N3mTbV2j.js";
|
|
11
11
|
import { c as fe } from "./utils-PPBbw5bk.js";
|
|
12
12
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
13
13
|
import "@radix-ui/react-toggle";
|
|
@@ -57,9 +57,9 @@ import "@minoru/react-dnd-treeview";
|
|
|
57
57
|
import "react-hotkeys-hook";
|
|
58
58
|
import "sonner";
|
|
59
59
|
const ve = h.lazy(() => import("react-json-view")), je = ({ provider: r, onClose: o }) => {
|
|
60
|
-
const [a,
|
|
60
|
+
const [a, d] = p(null);
|
|
61
61
|
return L(() => {
|
|
62
|
-
r && (r.mockFn ? r.mockFn : r.dataFn)().then((
|
|
62
|
+
r && (r.mockFn ? r.mockFn : r.dataFn)().then((n) => d(n));
|
|
63
63
|
}, [r]), r ? /* @__PURE__ */ e.jsx(O, { onOpenChange: (t) => t ? "" : o(), defaultOpen: !0, children: /* @__PURE__ */ e.jsxs(Y, { children: [
|
|
64
64
|
/* @__PURE__ */ e.jsxs(J, { children: [
|
|
65
65
|
/* @__PURE__ */ e.jsxs(U, { children: [
|
|
@@ -105,16 +105,16 @@ function ge({
|
|
|
105
105
|
] });
|
|
106
106
|
}
|
|
107
107
|
const be = () => {
|
|
108
|
-
const r = M(() => ue(), []), [o, a] = ae(), [,
|
|
109
|
-
|
|
110
|
-
), [m, y] = p(""), [f, l] = p(null),
|
|
108
|
+
const r = M(() => ue(), []), [o, a] = ae(), [, d] = N(ie), [t, n] = p(
|
|
109
|
+
j(r, (s) => k(o, "providerKey").includes(s.providerKey))
|
|
110
|
+
), [m, y] = p(""), [f, l] = p(null), w = j(
|
|
111
111
|
r.map((s) => k(t, "providerKey").includes(s.providerKey) ? null : { value: s.providerKey, label: s.name }),
|
|
112
112
|
(s) => !H(s)
|
|
113
113
|
), i = (s) => {
|
|
114
114
|
const x = I(r, { providerKey: s });
|
|
115
|
-
|
|
115
|
+
n((c) => [...c, x]), a((c) => [...c, { providerKey: x.providerKey, args: {} }]), y(""), d("UNSAVED");
|
|
116
116
|
}, u = (s) => {
|
|
117
|
-
|
|
117
|
+
n((x) => j(x, (c) => c.providerKey !== s.providerKey)), a((x) => j(x, (c) => c.providerKey !== s.providerKey)), d("UNSAVED");
|
|
118
118
|
}, B = (s) => l(s);
|
|
119
119
|
return R(r) ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("p", { className: "text-gray-500 mb-1.5 text-xs p-4", children: [
|
|
120
120
|
"You have no data providers registered. Please add a data provider to your project. ",
|
|
@@ -123,11 +123,11 @@ const be = () => {
|
|
|
123
123
|
] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "px-1", children: [
|
|
124
124
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
125
125
|
/* @__PURE__ */ e.jsx("label", { children: /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 mb-1.5 text-xs", children: "Add data providers:" }) }),
|
|
126
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center space-x-1", children: /* @__PURE__ */ e.jsxs(
|
|
127
|
-
/* @__PURE__ */ e.jsx(
|
|
126
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center space-x-1", children: /* @__PURE__ */ e.jsxs(le, { value: m, onValueChange: (s) => i(s), children: [
|
|
127
|
+
/* @__PURE__ */ e.jsx(te, { className: "w-full", children: /* @__PURE__ */ e.jsx(oe, { placeholder: "Select a provider" }) }),
|
|
128
128
|
/* @__PURE__ */ e.jsxs(ne, { children: [
|
|
129
129
|
/* @__PURE__ */ e.jsx(C, { value: "", children: "Choose" }),
|
|
130
|
-
|
|
130
|
+
w.map((s) => /* @__PURE__ */ e.jsx(C, { value: s.value, children: s.label }, s.value))
|
|
131
131
|
] })
|
|
132
132
|
] }) }),
|
|
133
133
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
@@ -204,28 +204,29 @@ const be = () => {
|
|
|
204
204
|
/* @__PURE__ */ e.jsx(je, { onClose: () => l(null), provider: f })
|
|
205
205
|
] })
|
|
206
206
|
] });
|
|
207
|
-
}, z =
|
|
207
|
+
}, ye = b(() => import("./AddBlocks-imyQSCbI.js")), z = b(() => import("./Layers-wp2Uc2Y5.js")), we = b(() => import("./BrandingOptions-tSNtQ1Kv.js")), Ne = b(() => import("./index-ORFlyrBx.js").then((r) => r.cB));
|
|
208
208
|
let K = null;
|
|
209
|
-
const
|
|
210
|
-
const r = D("sideBarComponents.top", []), o = D("sideBarComponents.bottom", []), [a,
|
|
209
|
+
const Ps = () => {
|
|
210
|
+
const r = D("sideBarComponents.top", []), o = D("sideBarComponents.bottom", []), [a, d] = N(ce), [t, n] = p(a), [m, y] = p(null), f = {
|
|
211
|
+
"add-blocks": ye,
|
|
211
212
|
layers: z,
|
|
212
|
-
"branding-options":
|
|
213
|
-
images:
|
|
213
|
+
"branding-options": we,
|
|
214
|
+
images: Ne
|
|
214
215
|
};
|
|
215
216
|
F(r, ({ name: i, panel: u }) => {
|
|
216
217
|
f[i] = u;
|
|
217
218
|
});
|
|
218
219
|
const l = (i) => {
|
|
219
|
-
clearTimeout(K),
|
|
220
|
-
}, [,
|
|
220
|
+
clearTimeout(K), w(!1), a !== "layers" && i === "layers" ? K = setTimeout(() => n("layers"), 500) : n(i), d(i);
|
|
221
|
+
}, [, w] = N(de);
|
|
221
222
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative flex", children: [
|
|
222
223
|
/* @__PURE__ */ e.jsxs("div", { className: "z-[100] flex h-full w-fit flex-col items-center justify-between border-b border-r border-border bg-background pt-2", children: [
|
|
223
224
|
/* @__PURE__ */ e.jsxs("div", { className: "relative z-[100] flex w-14 flex-col items-center space-y-2", children: [
|
|
224
225
|
/* @__PURE__ */ e.jsx(
|
|
225
|
-
|
|
226
|
+
g,
|
|
226
227
|
{
|
|
227
228
|
onClick: () => {
|
|
228
|
-
|
|
229
|
+
l("add-blocks");
|
|
229
230
|
},
|
|
230
231
|
size: "sm",
|
|
231
232
|
variant: a === "add-blocks" ? "default" : "outline",
|
|
@@ -233,7 +234,7 @@ const As = () => {
|
|
|
233
234
|
}
|
|
234
235
|
),
|
|
235
236
|
/* @__PURE__ */ e.jsx(
|
|
236
|
-
|
|
237
|
+
g,
|
|
237
238
|
{
|
|
238
239
|
onClick: () => l("layers"),
|
|
239
240
|
size: "sm",
|
|
@@ -242,7 +243,7 @@ const As = () => {
|
|
|
242
243
|
}
|
|
243
244
|
),
|
|
244
245
|
/* @__PURE__ */ e.jsx(
|
|
245
|
-
|
|
246
|
+
g,
|
|
246
247
|
{
|
|
247
248
|
onClick: () => l("branding-options"),
|
|
248
249
|
size: "sm",
|
|
@@ -251,8 +252,8 @@ const As = () => {
|
|
|
251
252
|
}
|
|
252
253
|
),
|
|
253
254
|
h.Children.toArray(
|
|
254
|
-
r.map(({ name: i, icon: u }) => /* @__PURE__ */ e.jsx(
|
|
255
|
-
|
|
255
|
+
r.map(({ name: i, icon: u }) => /* @__PURE__ */ e.jsx(v, { fallback: /* @__PURE__ */ e.jsx(A, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(
|
|
256
|
+
g,
|
|
256
257
|
{
|
|
257
258
|
onClick: () => l(i),
|
|
258
259
|
size: "sm",
|
|
@@ -264,7 +265,7 @@ const As = () => {
|
|
|
264
265
|
)
|
|
265
266
|
] }),
|
|
266
267
|
/* @__PURE__ */ e.jsx("div", { className: "relative z-[100] flex w-14 flex-col items-center space-y-2", children: h.Children.toArray(
|
|
267
|
-
o.map((i) => /* @__PURE__ */ e.jsx(
|
|
268
|
+
o.map((i) => /* @__PURE__ */ e.jsx(v, { fallback: /* @__PURE__ */ e.jsx(A, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(i, {}) }))
|
|
268
269
|
) })
|
|
269
270
|
] }),
|
|
270
271
|
/* @__PURE__ */ e.jsx(
|
|
@@ -281,7 +282,7 @@ const As = () => {
|
|
|
281
282
|
{
|
|
282
283
|
className: `fixed left-14 z-[50] h-full w-96 border-r bg-background duration-500 ease-in-out ${a !== "layers" ? "translate-x-0" : "-translate-x-full"}`,
|
|
283
284
|
children: /* @__PURE__ */ e.jsx(
|
|
284
|
-
|
|
285
|
+
v,
|
|
285
286
|
{
|
|
286
287
|
fallback: /* @__PURE__ */ e.jsxs("div", { className: "flex animate-pulse flex-col gap-y-2 bg-white p-4", children: [
|
|
287
288
|
/* @__PURE__ */ e.jsx("div", { className: "h-6 w-1/2 bg-gray-300" }),
|
|
@@ -309,7 +310,7 @@ const As = () => {
|
|
|
309
310
|
}
|
|
310
311
|
),
|
|
311
312
|
/* @__PURE__ */ e.jsx("div", { className: "h-full w-60 border-r p-1", children: /* @__PURE__ */ e.jsx(
|
|
312
|
-
|
|
313
|
+
v,
|
|
313
314
|
{
|
|
314
315
|
fallback: /* @__PURE__ */ e.jsxs("div", { className: "flex animate-pulse flex-col gap-y-2 p-4", children: [
|
|
315
316
|
/* @__PURE__ */ e.jsx("div", { className: "h-6 w-1/2 bg-gray-300" }),
|
|
@@ -335,5 +336,5 @@ const As = () => {
|
|
|
335
336
|
] });
|
|
336
337
|
};
|
|
337
338
|
export {
|
|
338
|
-
|
|
339
|
+
Ps as default
|
|
339
340
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-NV737rRe.js";
|
|
2
2
|
import o, { useMemo as m, Suspense as c } from "react";
|
|
3
3
|
import { FontFamilyIcon as x } from "@radix-ui/react-icons";
|
|
4
|
-
import { i as a, au as d, av as h, aw as u, ax as g, aF as j, aG as v, ay as r, ag as f, aH as S, aI as b, aJ as N, aK as w, S as p, aL as y } from "./index-
|
|
4
|
+
import { i as a, au as d, av as h, aw as u, ax as g, aF as j, aG as v, ay as r, ag as f, aH as S, aI as b, aJ as N, aK as w, S as p, aL as y } from "./index-ORFlyrBx.js";
|
|
5
5
|
import { useTranslation as C } from "react-i18next";
|
|
6
6
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
7
7
|
import "@radix-ui/react-toggle";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),n=require("react"),l=require("@radix-ui/react-icons"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),n=require("react"),l=require("@radix-ui/react-icons"),r=require("./index-zkc4SQCu.cjs"),a=require("react-i18next");require("./MODIFIERS-WFzDQfiT.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-It2K33fU.cjs");require("lodash");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");const o=()=>r.useBuilderProp("languages",["en"]),c=()=>o().length===1?null:e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(r.Select,{children:[e.jsxRuntimeExports.jsx(r.SelectTrigger,{className:"w-[150px] border-0",children:e.jsxRuntimeExports.jsx(r.SelectValue,{placeholder:e.jsxRuntimeExports.jsxs("span",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(l.FontFamilyIcon,{className:"h-4 w-4"})," English(US)"]})})}),e.jsxRuntimeExports.jsx(r.SelectContent,{children:e.jsxRuntimeExports.jsxs(r.SelectGroup,{children:[e.jsxRuntimeExports.jsx(r.SelectLabel,{children:"Fruits"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"apple",children:"Apple"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"banana",children:"Banana"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"blueberry",children:"Blueberry"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"grapes",children:"Grapes"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"pineapple",children:"Pineapple"})]})})]})}),p=()=>{const{savePage:i,syncState:s}=r.useSavePage(),{t:x}=a.useTranslation(),u=n.useMemo(()=>{switch(s){case"SAVING":return"animate-pulse bg-gray-500 text-gray-900";case"SAVED":return"bg-green-500 text-white hover:bg-green-600 hover:text-white";default:return"bg-gray-200 text-gray-500 hover:bg-gray-100"}},[s]);return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(r.Tooltip,{children:[e.jsxRuntimeExports.jsx(r.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs(r.Toggle,{onClick:t=>{t.preventDefault(),i()},className:`flex h-auto w-20 items-center gap-x-1 rounded-full p-1 px-2 ${u}`,size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx("svg",{fill:"currentColor",width:"16",height:"16",viewBox:"0 0 0.32 0.32",xmlns:"http://www.w3.org/2000/svg",children:e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",d:"M.274.086a.02.02 0 0 1 0 .028l-.12.12a.02.02 0 0 1-.028 0l-.06-.06A.02.02 0 0 1 .094.146L.14.192.246.086a.02.02 0 0 1 .028 0Z"})}),s==="SAVING"?"Saving...":s==="SAVED"?x("Saved"):"Save"]})}),e.jsxRuntimeExports.jsx(r.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:s==="SAVING"?"Saving...":s==="SAVED"?"Saved":"Save changes"})})]})})},m=()=>{const i=r.useBuilderProp("topBarComponents.left",[]),s=r.useBuilderProp("topBarComponents.center",[]),x=r.useBuilderProp("topBarComponents.right",[]),u=r.useBuilderProp("editable",!0);return e.jsxRuntimeExports.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2 font-bold",children:n.Children.toArray(i.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))})}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:n.Children.toArray(s.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxRuntimeExports.jsx(c,{}),e.jsxRuntimeExports.jsx(r.Separator,{orientation:"vertical"}),u?e.jsxRuntimeExports.jsx(p,{}):null,n.Children.toArray(x.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))]})]})};exports.default=m;
|
|
@@ -3,7 +3,7 @@ import { useState as p, useEffect as D } from "react";
|
|
|
3
3
|
import { isEmpty as d, startCase as E } from "lodash";
|
|
4
4
|
import { MixerHorizontalIcon as L } from "@radix-ui/react-icons";
|
|
5
5
|
import { createApi as B } from "unsplash-js";
|
|
6
|
-
import { i as F,
|
|
6
|
+
import { i as F, bo as K, b3 as U, b4 as V, b5 as O, au as P, av as C, aw as S, ax as I, ay as h, br as Q, B as H } from "./index-ORFlyrBx.js";
|
|
7
7
|
import { useDebouncedState as R } from "@react-hookz/web";
|
|
8
8
|
import { Loader as $ } from "lucide-react";
|
|
9
9
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),a=require("react"),o=require("lodash"),C=require("@radix-ui/react-icons"),k=require("unsplash-js"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),a=require("react"),o=require("lodash"),C=require("@radix-ui/react-icons"),k=require("unsplash-js"),t=require("./index-zkc4SQCu.cjs"),A=require("@react-hookz/web"),T=require("lucide-react");require("./MODIFIERS-WFzDQfiT.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-It2K33fU.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("react-i18next");const g=async(d,E)=>new Promise((l,i)=>{k.createApi({accessKey:E}).search.getPhotos(d).then(c=>{l(c)}).catch(c=>i(c))}),z=({isModalView:d,onSelect:E})=>{const l=t.useBuilderProp("unsplashAccessKey"),[i,f]=a.useState([]),[c,q]=a.useState(0),[u,S]=a.useState(),[x,b]=a.useState(),[I,R]=a.useState(0),[j,w]=A.useDebouncedState("",1e3),[h,m]=a.useState(!1),P=async s=>{if(o.isEmpty(j))return;let n=c+1;s&&(s.preventDefault(),n=1),m(!0),q(n);const p={query:j,page:n};u&&(p.orientation=u),x&&(p.color=x),g(p,l).then(r=>{var y,v,N;f(n===1?((y=r==null?void 0:r.response)==null?void 0:y.results)||[]:[...i,...((v=r==null?void 0:r.response)==null?void 0:v.results)||[]]),R((N=r==null?void 0:r.response)==null?void 0:N.total_pages),m(!1)}).catch(()=>{m(!1)})};return a.useEffect(()=>{if(!o.isEmpty(j)){m(!0);const s={query:j,page:1};u&&(s.orientation=u),x&&(s.color=x),q(1),g(s,l).then(n=>{var p,r;f(((p=n==null?void 0:n.response)==null?void 0:p.results)||[]),R((r=n==null?void 0:n.response)==null?void 0:r.total_pages),m(!1)}).catch(()=>{m(!1)})}},[u,x,j,l]),o.isEmpty(l)?e.jsxRuntimeExports.jsx("div",{className:"h-full flex flex-col items-center justify-center",children:e.jsxRuntimeExports.jsxs("p",{className:"max-w-3xl text-center text-gray-500",children:["To enable Unsplash, kindly provide your",e.jsxRuntimeExports.jsx("a",{href:"https://unsplash.com/documentation#public-authentication",className:"underline px-1 hover:text-blue-400",target:"_blank",rel:"noopener noreferrer",children:"Unsplash Access Key"})]})}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("form",{className:"flex items-center rounded-md border bg-gray-100 p-px",children:[e.jsxRuntimeExports.jsx(t.Input,{type:"text",name:"query",className:"input",placeholder:'Try "dog" or "apple"',onChange:s=>w(s.target.value)}),e.jsxRuntimeExports.jsxs(t.Popover,{children:[e.jsxRuntimeExports.jsx(t.PopoverTrigger,{asChild:!0,className:"h-full w-10 cursor-pointer p-2.5 hover:bg-slate-200",children:e.jsxRuntimeExports.jsx(C.MixerHorizontalIcon,{})}),e.jsxRuntimeExports.jsx(t.PopoverContent,{side:d?"bottom":"right",className:"z-[9999] flex w-max items-center justify-center",children:e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("div",{className:"py-1 text-sm font-medium",children:"Orientation"}),e.jsxRuntimeExports.jsxs(t.Select,{defaultValue:u,onValueChange:s=>S(s),children:[e.jsxRuntimeExports.jsx(t.SelectTrigger,{className:"h-auto w-40 p-1 px-3",children:e.jsxRuntimeExports.jsx(t.SelectValue,{placeholder:"Select"})}),e.jsxRuntimeExports.jsxs(t.SelectContent,{className:"z-[9999]",children:[e.jsxRuntimeExports.jsx(t.SelectItem,{value:"",children:"All"}),e.jsxRuntimeExports.jsx(t.SelectItem,{value:"landscape",children:"Landscape"}),e.jsxRuntimeExports.jsx(t.SelectItem,{value:"portrait",children:"Portrait"}),e.jsxRuntimeExports.jsx(t.SelectItem,{value:"squarish",children:"Square"})]})]}),e.jsxRuntimeExports.jsx("div",{className:"pb-1 pt-2 text-sm font-medium",children:"Color"}),e.jsxRuntimeExports.jsxs(t.Select,{defaultValue:x,onValueChange:s=>b(s),children:[e.jsxRuntimeExports.jsx(t.SelectTrigger,{className:"h-auto w-40 p-1 px-3",children:e.jsxRuntimeExports.jsx(t.SelectValue,{placeholder:"Select"})}),e.jsxRuntimeExports.jsxs(t.SelectContent,{className:"z-[9999]",children:[e.jsxRuntimeExports.jsx(t.SelectItem,{value:"",children:"All"}),["black_and_white","black","white","yellow","orange","red","purple","magenta","green","teal","blue"].map(s=>e.jsxRuntimeExports.jsx(t.SelectItem,{value:s,children:o.startCase(s)},s))]})]})]})})]})]}),e.jsxRuntimeExports.jsxs(t.ScrollArea,{className:`h-full ${d&&!o.isEmpty(i)?"-mx-2 flex flex-wrap px-2":"-mx-2 flex flex-col pb-8 pt-2"}`,children:[o.isEmpty(i)&&!h&&e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center py-6",children:[e.jsxRuntimeExports.jsx("div",{className:"font-medium",children:"No Data"}),e.jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-500",children:"Enter query and press enter"})]}),d?e.jsxRuntimeExports.jsx("div",{className:"h-full columns-5 py-2",children:i.map(s=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>E(s.urls.regular),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:s.alt_description,src:s.urls.small})})},s.id))}):i.map(s=>e.jsxRuntimeExports.jsx("div",{className:"w-full px-2 py-1",children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:s.alt_description,src:s.urls.small})})},s.id)),h&&e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsxRuntimeExports.jsx(T.Loader,{className:"animate-spin w-6 h-6"})," Loading..."]}),!o.isEmpty(i)&&c<I&&!h&&e.jsxRuntimeExports.jsx(t.Button,{size:"sm",variant:"link",className:"w-full",onClick:()=>P(void 0),disabled:h,children:h?"":"Load More"})]})]})};exports.default=z;exports.fetchImage=g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),r=require("react"),a=require("lodash"),m=require("@radix-ui/react-icons"),q=require("jotai"),p=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),r=require("react"),a=require("lodash"),m=require("@radix-ui/react-icons"),q=require("jotai"),p=require("./index-zkc4SQCu.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-It2K33fU.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("react-i18next");const N=q.atom([]),I=({isModalView:t,onSelect:u})=>{const E=p.useBuilderProp("uploadMediaCallback",()=>""),x=p.useBuilderProp("fetchMediaCallback",()=>[]),[i,n]=q.useAtom(N),[o,j]=r.useState(!1),[h,f]=r.useState(!1),[c,d]=r.useState(),[g,R]=r.useState("");r.useEffect(()=>{(async()=>{f(!0);const s=await x();n(s||[]),f(!1)})()},[x,n]);const v=s=>{var l,b;s&&((b=(l=s==null?void 0:s.target)==null?void 0:l.files)==null?void 0:b.length)>0&&d(s.target.files[0])},y=async()=>{j(!0);try{const{url:s}=await E(c);u(s),d(void 0);const l=await x();n(l)}catch(s){n([]),R((s==null?void 0:s.message)||"Something went wrong.")}j(!1)};return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[c?e.jsxRuntimeExports.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center rounded-md border bg-slate-50 p-2 px-1",children:[e.jsxRuntimeExports.jsx("img",{src:URL.createObjectURL(c),alt:"",className:"h-auto w-full max-w-sm rounded-md max-h-96 object-contain"}),g&&e.jsxRuntimeExports.jsx("div",{className:"w-full pt-2 text-center text-sm text-red-500",children:g}),e.jsxRuntimeExports.jsxs("div",{className:"flex w-full items-center justify-center gap-2 pt-2",children:[e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:y,disabled:o,className:"flex items-center rounded-full bg-blue-500 px-3 py-1 text-sm text-white hover:bg-blue-600 hover:text-white",children:[o?e.jsxRuntimeExports.jsx(m.GearIcon,{className:"animate-spin"}):e.jsxRuntimeExports.jsx(m.UploadIcon,{className:"animate-bounce"})," ",o?"Uploading...":"Upload"]}),!o&&e.jsxRuntimeExports.jsxs("button",{type:"button",className:"flex items-center rounded-full border border-gray-300 px-3 py-1 text-sm hover:bg-gray-200",onClick:()=>d(void 0),children:[e.jsxRuntimeExports.jsx(m.Cross1Icon,{})," Cancel"]})]})]}):e.jsxRuntimeExports.jsxs("label",{htmlFor:t?"upload-in-modal":"upload-in-panel",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex w-full cursor-pointer flex-col items-center justify-center rounded-md border border-dashed border-blue-900 bg-gray-200 py-8 hover:bg-blue-50",children:[e.jsxRuntimeExports.jsx("div",{className:"text-3xl",children:"+"}),e.jsxRuntimeExports.jsx("div",{children:"Click to choose file"})]}),e.jsxRuntimeExports.jsx("input",{type:"file",id:t?"upload-in-modal":"upload-in-panel",hidden:!0,onChange:v})]}),e.jsxRuntimeExports.jsxs(p.ScrollArea,{className:`-mx-2 flex h-full flex-col pb-8 pt-2 ${t?"px-2":""} pt-2`,children:[a.isEmpty(i)&&h&&e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:e.jsxRuntimeExports.jsx("div",{className:"animate-pulse font-medium",children:"Fetching..."})}),a.isEmpty(i)&&!h&&e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:e.jsxRuntimeExports.jsx("div",{className:"font-medium",children:"No Images"})}),t?e.jsxRuntimeExports.jsx("div",{className:"h-full columns-5 py-2",children:a.map(i,s=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>u(s.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:s.name,src:s.thumbUrl})})},s.id))}):a.map(i,s=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"px-2 py-1",onClick:()=>u(s.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto w-full cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:s.name,src:s.url})})},s.id))]})]})};exports.default=I;
|
|
@@ -3,7 +3,7 @@ import { useState as i, useEffect as w } from "react";
|
|
|
3
3
|
import { isEmpty as g, map as b } from "lodash";
|
|
4
4
|
import { GearIcon as C, UploadIcon as U, Cross1Icon as k } from "@radix-ui/react-icons";
|
|
5
5
|
import { atom as F, useAtom as E } from "jotai";
|
|
6
|
-
import { i as j,
|
|
6
|
+
import { i as j, br as A } from "./index-ORFlyrBx.js";
|
|
7
7
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
8
8
|
import "@radix-ui/react-toggle";
|
|
9
9
|
import "class-variance-authority";
|
|
@@ -36,8 +36,8 @@ import "redux-undo";
|
|
|
36
36
|
import "@chaibuilder/runtime";
|
|
37
37
|
import "@react-hookz/web";
|
|
38
38
|
import "react-i18next";
|
|
39
|
-
const R = F([]), he = ({ isModalView:
|
|
40
|
-
const v = j("uploadMediaCallback", () => ""), m = j("fetchMediaCallback", () => []), [
|
|
39
|
+
const R = F([]), he = ({ isModalView: r, onSelect: n }) => {
|
|
40
|
+
const v = j("uploadMediaCallback", () => ""), m = j("fetchMediaCallback", () => []), [s, o] = E(R), [l, p] = i(!1), [u, x] = i(!1), [d, c] = i(), [f, y] = i("");
|
|
41
41
|
w(() => {
|
|
42
42
|
(async () => {
|
|
43
43
|
x(!0);
|
|
@@ -99,24 +99,24 @@ const R = F([]), he = ({ isModalView: s, onSelect: n }) => {
|
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
101
|
] })
|
|
102
|
-
] }) : /* @__PURE__ */ e.jsxs("label", { htmlFor:
|
|
102
|
+
] }) : /* @__PURE__ */ e.jsxs("label", { htmlFor: r ? "upload-in-modal" : "upload-in-panel", children: [
|
|
103
103
|
/* @__PURE__ */ e.jsxs("div", { className: "flex w-full cursor-pointer flex-col items-center justify-center rounded-md border border-dashed border-blue-900 bg-gray-200 py-8 hover:bg-blue-50", children: [
|
|
104
104
|
/* @__PURE__ */ e.jsx("div", { className: "text-3xl", children: "+" }),
|
|
105
105
|
/* @__PURE__ */ e.jsx("div", { children: "Click to choose file" })
|
|
106
106
|
] }),
|
|
107
|
-
/* @__PURE__ */ e.jsx("input", { type: "file", id:
|
|
107
|
+
/* @__PURE__ */ e.jsx("input", { type: "file", id: r ? "upload-in-modal" : "upload-in-panel", hidden: !0, onChange: N })
|
|
108
108
|
] }),
|
|
109
|
-
/* @__PURE__ */ e.jsxs(A, { className: `-mx-2 flex h-full flex-col pb-8 pt-2 ${
|
|
110
|
-
g(
|
|
111
|
-
g(
|
|
112
|
-
|
|
109
|
+
/* @__PURE__ */ e.jsxs(A, { className: `-mx-2 flex h-full flex-col pb-8 pt-2 ${r ? "px-2" : ""} pt-2`, children: [
|
|
110
|
+
g(s) && u && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e.jsx("div", { className: "animate-pulse font-medium", children: "Fetching..." }) }),
|
|
111
|
+
g(s) && !u && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e.jsx("div", { className: "font-medium", children: "No Images" }) }),
|
|
112
|
+
r ? /* @__PURE__ */ e.jsx("div", { className: "h-full columns-5 py-2", children: b(s, (t) => /* @__PURE__ */ e.jsx("div", { role: "button", tabIndex: 0, className: "my-1 flex", onClick: () => n(t.url), children: /* @__PURE__ */ e.jsx("div", { className: "relative overflow-hidden rounded-md bg-cover bg-no-repeat", children: /* @__PURE__ */ e.jsx(
|
|
113
113
|
"img",
|
|
114
114
|
{
|
|
115
115
|
className: "h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",
|
|
116
116
|
alt: t.name,
|
|
117
117
|
src: t.thumbUrl
|
|
118
118
|
}
|
|
119
|
-
) }) }, t.id)) }) : b(
|
|
119
|
+
) }) }, t.id)) }) : b(s, (t) => (
|
|
120
120
|
// TODO: Drag and Drop Image to Canvas from Here use `pic.url` for image quality
|
|
121
121
|
/* @__PURE__ */ e.jsx("div", { role: "button", tabIndex: 0, className: "px-2 py-1", onClick: () => n(t.url), children: /* @__PURE__ */ e.jsx("div", { className: "relative overflow-hidden rounded-md bg-cover bg-no-repeat", children: /* @__PURE__ */ e.jsx(
|
|
122
122
|
"img",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-NV737rRe.js";
|
|
2
2
|
import { useState as c } from "react";
|
|
3
3
|
import { kebabCase as j } from "lodash";
|
|
4
|
-
import { ap as b, B as u, ao as C,
|
|
4
|
+
import { ap as b, B as u, ao as C, bd as A } from "./index-ORFlyrBx.js";
|
|
5
5
|
import { u as g } from "./controls-G0puEH71.js";
|
|
6
|
-
import { F as D } from "./form-
|
|
7
|
-
import { g as N } from "./index-
|
|
6
|
+
import { F as D } from "./form-TQ7vwDYO.js";
|
|
7
|
+
import { g as N } from "./index-N3mTbV2j.js";
|
|
8
8
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
9
9
|
import "@radix-ui/react-toggle";
|
|
10
10
|
import "class-variance-authority";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),x=require("react"),P=require("lodash"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),x=require("react"),P=require("lodash"),t=require("./index-zkc4SQCu.cjs"),g=require("./controls-aHZq-q4b.cjs"),R=require("./form-bSW-Pkw9.cjs"),f=require("./index-pYZXf7hY.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-It2K33fU.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("react-i18next");require("@rjsf/core");require("@rjsf/validator-ajv8");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("./lib.cjs");require("himalaya");require("./functions-KMQYiBHf.cjs");require("@mhsdesign/jit-browser-tailwindcss");require("@bobthered/tailwindcss-palette-generator");require("@tailwindcss/forms");require("@tailwindcss/typography");require("@tailwindcss/aspect-ratio");require("@tailwindcss/line-clamp");require("./tailwind-config-OxLD7oFU.cjs");require("react-hotkeys-hook");require("sonner");require("lucide-react");const b=({closeModal:i})=>{var q,l;const u=f.useAddPage(),[r,m]=x.useState({name:"",slug:"",blocks:[],type:"STATIC",seoData:{},template:""}),p=()=>{u.mutate(r,{onSuccess:()=>i()})},j=({formData:n},s)=>{m(o=>{var d,c;const a={[s]:n[s]};return s==="name"?a.slug=P.kebabCase((d=n[s])==null?void 0:d.replace(/\d/g,"")):s==="slug"&&(a.slug=(c=n[s])==null?void 0:c.replace(/\d/g,"").replace(/\s+/g,"").replace("--","-").replace("__","_")),{...o,...a}})},h={name:g.u({title:"Page Name",default:r.name}),slug:g.u({title:"Page Slug",default:r.slug})};return e.jsxRuntimeExports.jsxs(t.DialogContent,{children:[e.jsxRuntimeExports.jsx("div",{className:"px-1 font-bold",children:"Add Page"}),e.jsxRuntimeExports.jsx(R.Form,{formData:r,properties:h,onChange:j,disabled:u.isPending}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-end",children:e.jsxRuntimeExports.jsx(t.Button,{type:"submit",disabled:!r.name||!r.slug||((q=r.name)==null?void 0:q.length)<2||((l=r.slug)==null?void 0:l.length)<2||u.isPending,onClick:p,children:"Add Page"})})]})},C=()=>{const[i,u]=x.useState(!1);return e.jsxRuntimeExports.jsxs(t.Dialog,{open:i,onOpenChange:()=>u(!i),children:[e.jsxRuntimeExports.jsx(t.DialogTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx(t.Button,{size:"sm",variant:"link",className:"text-blue-500",onClick:()=>u(!i),children:"+ New Page"})}),i&&e.jsxRuntimeExports.jsx(b,{closeModal:()=>u(!i)})]})};exports.default=C;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as i } from "./jsx-runtime-NV737rRe.js";
|
|
2
|
-
import { D as a, F as n, H as c, I as x, K as j, B as d } from "./index-
|
|
2
|
+
import { D as a, F as n, H as c, I as x, K as j, B as d } from "./index-ORFlyrBx.js";
|
|
3
3
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@radix-ui/react-toggle";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),r=require("./index-zkc4SQCu.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("react");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-It2K33fU.cjs");require("lodash");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("react-i18next");const x=({open:t,onCancel:q=()=>{},onConfirm:s,title:n,description:i,disabled:u,cancelText:l="Discard",confirmText:o="Save"})=>e.jsxRuntimeExports.jsx(r.AlertDialog,{open:t,children:e.jsxRuntimeExports.jsxs(r.AlertDialogContent,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTitle,{children:n}),i&&e.jsxRuntimeExports.jsx(r.AlertDialogDescription,{children:i}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-3",children:[e.jsxRuntimeExports.jsx(r.AlertDialogCancel,{disabled:u,onClick:q,children:l}),e.jsxRuntimeExports.jsx(r.Button,{variant:"default",onClick:s,disabled:u,children:o})]})]})});exports.default=x;
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-pYZXf7hY.cjs"),e=require("./index-zkc4SQCu.cjs"),u=require("react-i18next");require("i18next");require("./jsx-runtime-WUGKV8jN.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("react");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("react-textarea-autosize");require("jotai");require("flagged");require("react-dnd");require("lodash");require("@minoru/react-dnd-treeview");require("./lib.cjs");require("./utils-It2K33fU.cjs");require("tailwind-merge");require("himalaya");require("./functions-KMQYiBHf.cjs");require("@mhsdesign/jit-browser-tailwindcss");require("@bobthered/tailwindcss-palette-generator");require("@tailwindcss/forms");require("@tailwindcss/typography");require("@tailwindcss/aspect-ratio");require("@tailwindcss/line-clamp");require("./tailwind-config-OxLD7oFU.cjs");require("react-hotkeys-hook");require("@chaibuilder/runtime");require("@radix-ui/react-icons");require("sonner");require("lucide-react");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-quill");require("flat-to-nested");require("redux-undo");require("@react-hookz/web");exports.ChaiBuilderEditor=s.ChaiBuilderEditor;exports.useActiveLanguage=e.useActiveLanguage;exports.useActiveModal=e.useActiveModal;exports.useActivePanel=e.useActivePanel;exports.useAddBlock=e.useAddBlock;exports.useAddBlockParent=e.useAddBlockParent;exports.useAddClassesToBlocks=e.useAddClassesToBlocks;exports.useAllBlocks=e.useAllBlocks;exports.useBlockContentByLanguage=e.useBlockContentByLanguage;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderProp=e.useBuilderProp;exports.useBuilderReset=e.useBuilderReset;exports.useBuildingBlocks=e.useBuildingBlocks;exports.useCanvasHistory=e.useCanvasHistory;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;exports.useCopyBlockIds=e.useCopyBlockIds;exports.useCurrentPage=e.useCurrentPage;exports.useCutBlockIds=e.useCutBlockIds;exports.useDarkMode=e.useDarkMode;exports.useDeveloperPreviewMode=e.useDeveloperPreviewMode;exports.useDuplicateBlocks=e.useDuplicateBlocks;exports.useFeatureSupport=e.useFeatureSupport;exports.useGetPageData=e.useGetPageData;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.useLanguages=e.useLanguages;exports.useMarkAsGlobalBlock=e.useMarkAsGlobalBlock;exports.useMoveBlocks=e.useMoveBlocks;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;exports.usePrimaryLanguage=e.usePrimaryLanguage;exports.useProject=e.useProject;exports.useReadOnlyMode=e.useReadOnlyMode;exports.useRemoveBlocks=e.useRemoveBlocks;exports.useRemoveClassesFromBlocks=e.useRemoveClassesFromBlocks;exports.useSavePage=e.useSavePage;exports.useSelectedBlock=e.useSelectedBlock;exports.useSelectedBlockAllClasses=e.useSelectedBlockAllClasses;exports.useSelectedBlockCurrentClasses=e.useSelectedBlockCurrentClasses;exports.useSelectedBlockIds=e.useSelectedBlockIds;exports.useSelectedBlocksDisplayChild=e.useSelectedBlocksDisplayChild;exports.useSelectedBreakpoints=e.useSelectedBreakpoints;exports.useSelectedStylingBlocks=e.useSelectedStylingBlocks;exports.useSetAllBlocks=e.useSetAllBlocks;exports.useStylingBreakpoint=e.useStylingBreakpoint;exports.useStylingState=e.useStylingState;exports.useTranslations=e.useTranslations;exports.useTreeData=e.useTreeData;exports.useUILibraryBlocks=e.useUILibraryBlocks;exports.useUpdateBlocksProps=e.useUpdateBlocksProps;exports.useUpdateBlocksPropsRealtime=e.useUpdateBlocksPropsRealtime;Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>u.useTranslation});
|
package/dist/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as os } from "./index-
|
|
2
|
-
import { ak as rs, N as is, af as ps, O as ms, ah as us, P as ls, ae as cs, an as ds, x as Bs, i as ks, y as ns, Q as gs, p as Cs, R as Ps, U as Ss, k as vs, V as ys, n as As, W as Ms, X as hs, m as Ds, L as Is, Y as Ls, Z as Rs, _ as fs, am as xs, $ as Ts, a0 as Us, o as bs, h as js, al as ws, a1 as Hs, M as Os, l as Fs, a3 as Gs, ag as Ws, a6 as Zs, a5 as Es, a4 as Ns, j as Qs, ad as Vs, ai as Xs, aj as Ys, w as _s, a7 as $s, a9 as qs, a2 as zs, aa as Js, a8 as Ks, ab as se, ac as ee } from "./index-
|
|
1
|
+
import { k as os } from "./index-N3mTbV2j.js";
|
|
2
|
+
import { ak as rs, N as is, af as ps, O as ms, ah as us, P as ls, ae as cs, an as ds, x as Bs, i as ks, y as ns, Q as gs, p as Cs, R as Ps, U as Ss, k as vs, V as ys, n as As, W as Ms, X as hs, m as Ds, L as Is, Y as Ls, Z as Rs, _ as fs, am as xs, $ as Ts, a0 as Us, o as bs, h as js, al as ws, a1 as Hs, M as Os, l as Fs, a3 as Gs, ag as Ws, a6 as Zs, a5 as Es, a4 as Ns, j as Qs, ad as Vs, ai as Xs, aj as Ys, w as _s, a7 as $s, a9 as qs, a2 as zs, aa as Js, a8 as Ks, ab as se, ac as ee } from "./index-ORFlyrBx.js";
|
|
3
3
|
import { useTranslation as oe } from "react-i18next";
|
|
4
4
|
import "i18next";
|
|
5
5
|
import "./jsx-runtime-NV737rRe.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-WUGKV8jN.cjs"),r=require("./index-zkc4SQCu.cjs"),q=require("./index-pYZXf7hY.cjs"),l=require("@radix-ui/react-icons");require("./MODIFIERS-WFzDQfiT.cjs");require("react");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-It2K33fU.cjs");require("lodash");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("react-i18next");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("./lib.cjs");require("himalaya");require("./functions-KMQYiBHf.cjs");require("@mhsdesign/jit-browser-tailwindcss");require("@bobthered/tailwindcss-palette-generator");require("@tailwindcss/forms");require("@tailwindcss/typography");require("@tailwindcss/aspect-ratio");require("@tailwindcss/line-clamp");require("./tailwind-config-OxLD7oFU.cjs");require("react-hotkeys-hook");require("sonner");require("lucide-react");const d=({pageData:i,projectData:t})=>{const n={},u=q.useDeletePage(),s=i.uuid===t.homepage,o=()=>{u.mutate(i,{onSuccess:()=>{n({uuid:t.homepage,slug:"/home"})}})};return e.jsxRuntimeExports.jsxs(r.AlertDialog,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTrigger,{disabled:s,children:e.jsxRuntimeExports.jsx("div",{className:`flex h-full items-center justify-center rounded-md border px-2 py-2 font-medium hover:bg-red-400 hover:text-white ${s?"cursor-not-allowed border-red-200 text-red-200":"cursor-pointer border-red-400 text-red-400"}`,children:e.jsxRuntimeExports.jsx(l.TrashIcon,{})})}),e.jsxRuntimeExports.jsxs(r.AlertDialogContent,{children:[e.jsxRuntimeExports.jsxs(r.AlertDialogTitle,{children:["Are you sure you want to delete ",e.jsxRuntimeExports.jsx("i",{className:"text-red-500",children:i.name})," page?"]}),e.jsxRuntimeExports.jsx(r.AlertDialogDescription,{children:"This action cannot be undone. This will permanently delete your page."}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-3",children:[e.jsxRuntimeExports.jsx(r.AlertDialogCancel,{disabled:u.isPending,children:"Cancel"}),e.jsxRuntimeExports.jsx(r.Button,{variant:"destructive",onClick:o,disabled:u.isPending,children:"Yes, Delete"})]})]})]})};exports.default=d;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as r } from "./jsx-runtime-NV737rRe.js";
|
|
2
|
-
import { D as s, E as l, F as n, H as d, I as a, K as c, B as u } from "./index-
|
|
3
|
-
import { j as x } from "./index-
|
|
2
|
+
import { D as s, E as l, F as n, H as d, I as a, K as c, B as u } from "./index-ORFlyrBx.js";
|
|
3
|
+
import { j as x } from "./index-N3mTbV2j.js";
|
|
4
4
|
import { TrashIcon as h } from "@radix-ui/react-icons";
|
|
5
5
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
6
6
|
import "react";
|
|
@@ -2,7 +2,7 @@ import { j as u } from "./jsx-runtime-NV737rRe.js";
|
|
|
2
2
|
import b from "@rjsf/core";
|
|
3
3
|
import x from "@rjsf/validator-ajv8";
|
|
4
4
|
import { includes as h, get as a, set as $, first as F } from "lodash";
|
|
5
|
-
import {
|
|
5
|
+
import { bg as P, bh as E, bi as O, bj as S } from "./index-ORFlyrBx.js";
|
|
6
6
|
const d = (i, l = "") => {
|
|
7
7
|
switch (i.type) {
|
|
8
8
|
case "singular":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const f=require("./jsx-runtime-WUGKV8jN.cjs"),y=require("@rjsf/core"),E=require("@rjsf/validator-ajv8"),i=require("lodash"),d=require("./index-
|
|
1
|
+
"use strict";const f=require("./jsx-runtime-WUGKV8jN.cjs"),y=require("@rjsf/core"),E=require("@rjsf/validator-ajv8"),i=require("lodash"),d=require("./index-zkc4SQCu.cjs"),h=(c,n="")=>{switch(c.type){case"singular":return c.uiSchema;case"model":const{properties:p}=c,u={};return Object.keys(p).forEach(r=>{const e=p[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;u[o]=h(e,n)}),u;case"list":const{itemProperties:m}=c,l={items:{}};return Object.keys(m).forEach(r=>{const e=m[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;l.items[o]=h(e,n)}),l;default:return{}}},x=(c,n="")=>{switch(c.type){case"singular":return c.schema;case"model":const{properties:p,title:u}=c,m={title:u,type:"object",properties:{}};return Object.keys(p).forEach(o=>{const t=p[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;m.properties[s]=x(t,n)}),m;case"list":const{itemProperties:l,title:r}=c,e={title:r,type:"array",items:{type:"object",properties:{}}};return Object.keys(l).forEach(o=>{const t=l[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;e.items.properties[s]=x(t,n),i.set(e.items,"title",i.get(t,"itemTitle",`${r} item`))}),e;default:return{}}},$=({title:c,properties:n={},formData:p,onChange:u,disabled:m=!1,activeLang:l=""})=>{const r={type:"object",properties:{}},e={};Object.keys(n).forEach(t=>{const s=n[t];if(i.includes(["slot","styles"],s.type))return;const a=i.get(s,"i18n",!1)?`${t}-${l}`:t;r.properties[a]=x(s,l),e[a]=h(s,l)});const o=({...t},s)=>{const a=s==null?void 0:s.replace("root.","").split("/").pop();if(!s||!a)return;const j=i.first(a.split("."));s&&j&&u({...t},j)};return f.jsxRuntimeExports.jsxs(f.jsxRuntimeExports.Fragment,{children:[c&&f.jsxRuntimeExports.jsx("h1",{className:"px-1 text-sm font-semibold underline",children:c}),f.jsxRuntimeExports.jsx("div",{className:"-mx-3",children:f.jsxRuntimeExports.jsx(y,{widgets:{richtext:d.RichTextEditorField,icon:d.IconPickerField,image:d.ImagePickerField},fields:{link:d.LinkField},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:e,schema:r,formData:p,validator:E,onChange:o,disabled:m})})]})};exports.Form=$;
|
|
@@ -20,7 +20,7 @@ import { initReactI18next as oS } from "react-i18next";
|
|
|
20
20
|
import { j as n1 } from "./jsx-runtime-NV737rRe.js";
|
|
21
21
|
import * as O from "react";
|
|
22
22
|
import p, { useState as g1, useRef as z1, useLayoutEffect as L3, useEffect as L1, useCallback as D1, useDebugValue as i91, useContext as Et, forwardRef as Q, createContext as $t, useReducer as cS, useMemo as fa, cloneElement as Ae, Fragment as hS, Children as br, Component as Ff, isValidElement as sS, createElement as G4, memo as vS, Suspense as Ue, lazy as v0 } from "react";
|
|
23
|
-
import { u as O3, a as h2, c as qf, b as wt, d as Pe, e as s2, f as d0, g as Wf, h as dS, i as J4, B as S3, S as uS, j as Kf, k as gS, l as fS, m as pS, n as zS, o as MS, p as mS, q as HS, r as VS, s as wS, t as bS, v as yS, T as xS, w as LS, x as OS, y as Uf, z as SS, A as CS, C as BS, D as AS, E as PS, F as ES, G as IS, H as kS, I as NS, J as RS, K as TS } from "./index-
|
|
23
|
+
import { u as O3, a as h2, c as qf, b as wt, d as Pe, e as s2, f as d0, g as Wf, h as dS, i as J4, B as S3, S as uS, j as Kf, k as gS, l as fS, m as pS, n as zS, o as MS, p as mS, q as HS, r as VS, s as wS, t as bS, v as yS, T as xS, w as LS, x as OS, y as Uf, z as SS, A as CS, C as BS, D as AS, E as PS, F as ES, G as IS, H as kS, I as NS, J as RS, K as TS } from "./index-ORFlyrBx.js";
|
|
24
24
|
import { g as Ii, c as j0 } from "./MODIFIERS-MLfpKQY1.js";
|
|
25
25
|
import Zf from "clsx";
|
|
26
26
|
import { flushSync as DS, createPortal as jS } from "react-dom";
|
|
@@ -38530,7 +38530,9 @@ object-assign/index.js:
|
|
|
38530
38530
|
*/
|
|
38531
38531
|
D();
|
|
38532
38532
|
var Ch1 = process.env.NODE_ENV !== "production" ? Sh1 : () => null;
|
|
38533
|
-
const Bh1 = {
|
|
38533
|
+
const Bh1 = {
|
|
38534
|
+
dnd: !1
|
|
38535
|
+
};
|
|
38534
38536
|
class Ah1 extends p.Component {
|
|
38535
38537
|
constructor(e) {
|
|
38536
38538
|
super(e), this.state = { hasError: !1 };
|
|
@@ -38593,7 +38595,7 @@ const Ph1 = () => {
|
|
|
38593
38595
|
e((l) => (delete l[n.providerKey], l));
|
|
38594
38596
|
});
|
|
38595
38597
|
}), [r, a, e]), /* @__PURE__ */ n1.jsx(n1.Fragment, { children: t });
|
|
38596
|
-
}, Th1 = v0(() => import("./SidePanels-
|
|
38598
|
+
}, Th1 = v0(() => import("./SidePanels-pd7HYv8I.js")), Dh1 = v0(() => import("./Topbar-Jc74a6oE.js")), jh1 = v0(() => import("./CanvasArea-dS2B20gv.js")), Fh1 = v0(() => import("./Settings-xkL3U3Y-.js")), qh1 = () => {
|
|
38597
38599
|
const [t] = ki(bS), e = (n) => {
|
|
38598
38600
|
yS() || n.preventDefault();
|
|
38599
38601
|
};
|
|
@@ -40723,7 +40725,7 @@ const js1 = () => {
|
|
|
40723
40725
|
] })
|
|
40724
40726
|
] })
|
|
40725
40727
|
] });
|
|
40726
|
-
}, Us1 = () => /* @__PURE__ */ n1.jsx(Ks1, { children: /* @__PURE__ */ n1.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ n1.jsx(zC, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), Zs1 = v0(() => import("./PagesPanel-
|
|
40728
|
+
}, Us1 = () => /* @__PURE__ */ n1.jsx(Ks1, { children: /* @__PURE__ */ n1.jsx("button", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ n1.jsx(zC, { className: "w-4 h-4 text-red-500 cursor-pointer hover:text-red-300 duration-300" }) }) }), Zs1 = v0(() => import("./PagesPanel-L2VS8RyZ.js")), Gs1 = v0(() => import("./ProjectPanel-T3AXGe7O.js")), Js1 = v0(() => import("./CurrentPage-pSsaLyEf.js")), Ys1 = () => /* @__PURE__ */ n1.jsx("h2", { children: "Your Logo" }), Qs1 = () => {
|
|
40727
40729
|
const { mutate: t } = Ps1();
|
|
40728
40730
|
return J4("editable", !0) ? /* @__PURE__ */ n1.jsx(S3, { onClick: t, className: "bg-blue-600 text-white", children: "Publish" }) : null;
|
|
40729
40731
|
}, Xs1 = (t) => {
|