@chaibuilder/sdk 1.2.63 → 1.2.64
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-6dJmFSgk.js +142 -0
- package/dist/AddBlocks-doCNVVbk.cjs +1 -0
- package/dist/{CanvasArea-DvfLxy0w.js → CanvasArea-kB6ky_uL.js} +4 -4
- package/dist/{CanvasArea-hGLbDJlM.cjs → CanvasArea-kdnkFfKR.cjs} +1 -1
- package/dist/{CodeEditor-QPwyZNgA.js → CodeEditor-37od44Ou.js} +1 -1
- package/dist/{CurrentPage-fMCaBGwl.cjs → CurrentPage-Ekl5Cwbv.cjs} +1 -1
- package/dist/{CurrentPage-rOUX01kk.js → CurrentPage-bHq9Uusr.js} +3 -3
- package/dist/{PagesPanel-ZCZjs7Bi.cjs → PagesPanel-SMHrEmCb.cjs} +1 -1
- package/dist/{PagesPanel-6P4VkMP-.js → PagesPanel-wIPAyjJK.js} +4 -4
- package/dist/{ProjectPanel-Cn3teDRW.js → ProjectPanel-L-SlDizV.js} +4 -4
- package/dist/{ProjectPanel-XSVWRr6v.cjs → ProjectPanel-YruLal65.cjs} +1 -1
- package/dist/{Settings-dbB2VPAj.js → Settings-WXkCyhAv.js} +16 -14
- package/dist/{Settings-Amh8Mtm7.cjs → Settings-_5VHcgFC.cjs} +1 -1
- package/dist/{SidePanels-_Im6sF4f.js → SidePanels-UQj0XTnb.js} +72 -72
- package/dist/{SidePanels-5adH7U3T.cjs → SidePanels-UeIZB3e1.cjs} +1 -1
- package/dist/{StaticCanvas-goU42OMU.js → StaticCanvas-7C52tXAv.js} +42 -42
- package/dist/{StaticCanvas-fDhBK35X.cjs → StaticCanvas-ll9VTXI5.cjs} +1 -1
- package/dist/ThemeConfigPanel-_86vVxLz.cjs +1 -0
- package/dist/{ThemeConfigPanel-aEN4tTYi.js → ThemeConfigPanel-gw8B2zvx.js} +59 -56
- package/dist/{Topbar-SuY-S0im.js → Topbar-1O05wogM.js} +2 -2
- package/dist/{Topbar-ag6qdgbe.cjs → Topbar-gb17oHdJ.cjs} +1 -1
- package/dist/{UILibrariesPanel-RI9mo293.js → UILibrariesPanel-vshiYI6G.js} +18 -18
- package/dist/{UnsplashImages-dasLGrBn.js → UnsplashImages-Eq7hprBO.js} +5 -5
- package/dist/{UploadImages-Gh2AQpk1.js → UploadImages-lco2Tea3.js} +7 -7
- package/dist/{add-page-modal-zCiyvKEa.js → add-page-modal-qr7rvJzN.js} +6 -6
- package/dist/{add-page-modal-80cVOM7i.cjs → add-page-modal-rOKavDFX.cjs} +1 -1
- package/dist/{confirm-alert-9XYi0a4k.js → confirm-alert-P6TAevaP.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +6 -2
- package/dist/core.js +15 -15
- package/dist/{delete-page-modal-pzagU_6y.js → delete-page-modal-55oioI9i.js} +3 -3
- package/dist/{delete-page-modal-foPRP--l.cjs → delete-page-modal-wdAiMVnL.cjs} +1 -1
- package/dist/email.cjs +1 -1
- package/dist/email.js +2 -2
- package/dist/{form-EjiQiiEY.js → form-5ke_lZv8.js} +1 -1
- package/dist/{index-DzAuS11k.cjs → index-6w-6HYBd.cjs} +1 -1
- package/dist/{index-BbW1Uw_k.cjs → index-audsIPBC.cjs} +1 -1
- package/dist/{index-bscJUvUx.js → index-b33n_-zO.js} +60 -60
- package/dist/{index-qSbpzIA4.js → index-fnkMn4Pk.js} +3 -3
- package/dist/{index-EEcKvBh3.js → index-wRAIA8zZ.js} +5 -5
- package/dist/{page-viewer-Z1wXyzzc.js → page-viewer-t44DP65U.js} +9 -9
- package/dist/{page-viewer-XFTCHu_2.cjs → page-viewer-wU7T0f48.cjs} +1 -1
- package/dist/{project-general-setting-HV3X_wHI.cjs → project-general-setting-87cX9vvO.cjs} +1 -1
- package/dist/{project-general-setting-5B7s5swF.js → project-general-setting-NEkNjf7V.js} +4 -4
- package/dist/{project-seo-setting-aAGnwBrw.js → project-seo-setting-YmspOYsF.js} +2 -2
- package/dist/{single-page-detail-6C1WP3s5.cjs → single-page-detail-27UjWK8L.cjs} +1 -1
- package/dist/{single-page-detail-Yr0EbBJJ.js → single-page-detail-jHzoDP7B.js} +10 -10
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +3 -3
- package/dist/ui.js +10 -10
- package/package.json +1 -1
- package/dist/AddBlocks-4wpxOF2K.cjs +0 -1
- package/dist/AddBlocks-ChNxwRrx.js +0 -142
- package/dist/ThemeConfigPanel-N6l317II.cjs +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import { noop as T, get as g, has as I, first as x, isEmpty as L, values as U, groupBy as D, map as R, capitalize as _ } from "lodash-es";
|
|
3
|
-
import * as
|
|
4
|
-
import S, { useState as A, useCallback as
|
|
5
|
-
import {
|
|
3
|
+
import * as O from "react";
|
|
4
|
+
import S, { useState as A, useCallback as z, useEffect as G, useRef as M } from "react";
|
|
5
|
+
import { aN as H, aO as $, B as F, aP as W, aQ as Y, aR as q, aS as J, aT as K, aU as Q, aV as V, h as C, aq as X, j as Z, aA as ee, T as te, v as se, w as oe, Y as re, bf as ae, $ as ne, ai as ie } from "./index-b33n_-zO.js";
|
|
6
6
|
import { syncBlocksWithDefaults as le, useChaiBlocks as ce } from "@chaibuilder/runtime";
|
|
7
7
|
import { Loader as de } from "lucide-react";
|
|
8
8
|
import { useAtom as w, atom as me } from "jotai";
|
|
@@ -47,7 +47,7 @@ function ke({
|
|
|
47
47
|
setLibrary: n
|
|
48
48
|
}) {
|
|
49
49
|
var u;
|
|
50
|
-
const [d, l] =
|
|
50
|
+
const [d, l] = O.useState(!1), { t: s } = E();
|
|
51
51
|
return a ? /* @__PURE__ */ e.jsxs(H, { open: d, onOpenChange: l, children: [
|
|
52
52
|
/* @__PURE__ */ e.jsx($, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
53
53
|
/* @__PURE__ */ e.jsx("span", { children: s("Choose Library") }),
|
|
@@ -67,10 +67,10 @@ function ke({
|
|
|
67
67
|
)
|
|
68
68
|
] }) }),
|
|
69
69
|
/* @__PURE__ */ e.jsx(W, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(Y, { children: [
|
|
70
|
-
/* @__PURE__ */ e.jsx(
|
|
71
|
-
/* @__PURE__ */ e.jsxs(
|
|
72
|
-
/* @__PURE__ */ e.jsx(
|
|
73
|
-
/* @__PURE__ */ e.jsx(
|
|
70
|
+
/* @__PURE__ */ e.jsx(q, { placeholder: "Search library...", className: "h-9" }),
|
|
71
|
+
/* @__PURE__ */ e.jsxs(J, { children: [
|
|
72
|
+
/* @__PURE__ */ e.jsx(K, { children: "No library found." }),
|
|
73
|
+
/* @__PURE__ */ e.jsx(Q, { children: t.map((o) => /* @__PURE__ */ e.jsxs(
|
|
74
74
|
V,
|
|
75
75
|
{
|
|
76
76
|
value: o.uuid,
|
|
@@ -98,10 +98,10 @@ const we = ({
|
|
|
98
98
|
closePopover: a,
|
|
99
99
|
library: n
|
|
100
100
|
}) => {
|
|
101
|
-
const [d, l] = A(!1), s = C("getUILibraryBlock", T), { addCoreBlock: u, addPredefinedBlock: o } = X(), [p, j] = Z(), [, k] = ee(), f = g(t, "name", g(t, "label")),
|
|
101
|
+
const [d, l] = A(!1), s = C("getUILibraryBlock", T), { addCoreBlock: u, addPredefinedBlock: o } = X(), [p, j] = Z(), [, k] = ee(), f = g(t, "name", g(t, "label")), v = je("dnd"), [, b] = w(he), i = (r) => {
|
|
102
102
|
const m = I(r, "styles_attrs.data-page-section");
|
|
103
103
|
return r._type === "Box" && m;
|
|
104
|
-
}, B =
|
|
104
|
+
}, B = z(
|
|
105
105
|
async (r) => {
|
|
106
106
|
if (r.stopPropagation(), I(t, "component")) {
|
|
107
107
|
u(t, x(p)), a();
|
|
@@ -125,7 +125,7 @@ const we = ({
|
|
|
125
125
|
};
|
|
126
126
|
} else
|
|
127
127
|
r.dataTransfer.setDragImage(new Image(), 0, 0);
|
|
128
|
-
|
|
128
|
+
b(y), setTimeout(() => {
|
|
129
129
|
j([]), k(null), a();
|
|
130
130
|
}, 200);
|
|
131
131
|
}
|
|
@@ -136,7 +136,7 @@ const we = ({
|
|
|
136
136
|
{
|
|
137
137
|
onClick: d ? () => {
|
|
138
138
|
} : B,
|
|
139
|
-
draggable:
|
|
139
|
+
draggable: v ? "true" : "false",
|
|
140
140
|
onDragStart: c,
|
|
141
141
|
className: ge(
|
|
142
142
|
"relative mt-2 cursor-pointer overflow-hidden rounded-md border border-gray-300 bg-white duration-200 hover:border-blue-500 hover:shadow-xl"
|
|
@@ -152,9 +152,9 @@ const we = ({
|
|
|
152
152
|
) }),
|
|
153
153
|
/* @__PURE__ */ e.jsx(oe, { children: /* @__PURE__ */ e.jsx("p", { children: f }) })
|
|
154
154
|
] });
|
|
155
|
-
},
|
|
156
|
-
const [a, n] = w(
|
|
157
|
-
return
|
|
155
|
+
}, ve = me({}), be = (t) => {
|
|
156
|
+
const [a, n] = w(ve), d = C("getUILibraryBlocks", T), l = g(a, `${t == null ? void 0 : t.uuid}.blocks`, []), s = g(a, `${t == null ? void 0 : t.uuid}.loading`, !1);
|
|
157
|
+
return G(() => {
|
|
158
158
|
(async () => {
|
|
159
159
|
if (s || l.length > 0 || !t)
|
|
160
160
|
return;
|
|
@@ -164,7 +164,7 @@ const we = ({
|
|
|
164
164
|
})();
|
|
165
165
|
}, [t, l, s]), { data: l, isLoading: s };
|
|
166
166
|
}, Be = re("_selectedLibrary", null), Ne = () => {
|
|
167
|
-
const [t, a] = w(Be), n = C("uiLibraries", []), d = ce(), l = U(d).filter((c) => c.category === "custom"), s = n.find((c) => c.uuid === t) || x(n), { data: u, isLoading: o } =
|
|
167
|
+
const [t, a] = w(Be), n = C("uiLibraries", []), d = ce(), l = U(d).filter((c) => c.category === "custom"), s = n.find((c) => c.uuid === t) || x(n), { data: u, isLoading: o } = be(s), p = D([...u, ...l], "group"), [j, k] = A("Hero"), [, f] = w(ae), v = g(p, j, []), { t: b } = E(), i = M(null), B = (c) => {
|
|
168
168
|
i.current && (clearTimeout(i.current), i.current = null), i.current = setTimeout(() => {
|
|
169
169
|
i.current && k(c);
|
|
170
170
|
}, 300);
|
|
@@ -197,9 +197,9 @@ const we = ({
|
|
|
197
197
|
onMouseEnter: () => i.current ? clearTimeout(i.current) : null,
|
|
198
198
|
className: "z-10 -mt-2 flex h-full max-h-full w-[300px] flex-col gap-2 border-l border-gray-300 transition-all ease-linear",
|
|
199
199
|
children: [
|
|
200
|
-
/* @__PURE__ */ e.jsx("div", { className: "sticky top-0 z-30 border-b border-gray-300 bg-gray-200 p-2 text-[9px] font-light leading-3 text-gray-500", children:
|
|
200
|
+
/* @__PURE__ */ e.jsx("div", { className: "sticky top-0 z-30 border-b border-gray-300 bg-gray-200 p-2 text-[9px] font-light leading-3 text-gray-500", children: b("Click on a block to add it to the page") }),
|
|
201
201
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2 px-2", children: S.Children.toArray(
|
|
202
|
-
|
|
202
|
+
v.map((c) => /* @__PURE__ */ e.jsx(we, { block: c, library: s, closePopover: () => f(fe) }))
|
|
203
203
|
) }),
|
|
204
204
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
205
205
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
@@ -3,9 +3,9 @@ import { useState as p, useEffect as D } from "react";
|
|
|
3
3
|
import { isEmpty as d, startCase as E } from "lodash-es";
|
|
4
4
|
import { MixerHorizontalIcon as L } from "@radix-ui/react-icons";
|
|
5
5
|
import { createApi as B } from "unsplash-js";
|
|
6
|
-
import { h as F,
|
|
7
|
-
import { useDebouncedState as
|
|
8
|
-
import { Loader as
|
|
6
|
+
import { h as F, bb as K, aN as O, aO as U, aP as V, bs as P, bt as C, bu as S, bv as I, bw as h, ai as Q, B as H } from "./index-b33n_-zO.js";
|
|
7
|
+
import { useDebouncedState as R } from "@react-hookz/web";
|
|
8
|
+
import { Loader as $ } from "lucide-react";
|
|
9
9
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
10
10
|
import "@radix-ui/react-toggle";
|
|
11
11
|
import "class-variance-authority";
|
|
@@ -44,7 +44,7 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
44
44
|
o(i);
|
|
45
45
|
}).catch((i) => r(i));
|
|
46
46
|
}), De = ({ isModalView: x, onSelect: g }) => {
|
|
47
|
-
const o = F("unsplashAccessKey", ""), [r, j] = p([]), [i, v] = p(0), [l, A] = p(), [n, q] = p(), [z, y] = p(0), [u, T] =
|
|
47
|
+
const o = F("unsplashAccessKey", ""), [r, j] = p([]), [i, v] = p(0), [l, A] = p(), [n, q] = p(), [z, y] = p(0), [u, T] = R("", 1e3), [f, c] = p(!1), _ = async (s) => {
|
|
48
48
|
if (d(u))
|
|
49
49
|
return;
|
|
50
50
|
let t = i + 1;
|
|
@@ -173,7 +173,7 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
173
173
|
) }) }, s.id)
|
|
174
174
|
)),
|
|
175
175
|
f && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center py-8", children: [
|
|
176
|
-
/* @__PURE__ */ e.jsx(
|
|
176
|
+
/* @__PURE__ */ e.jsx($, { className: "animate-spin w-6 h-6" }),
|
|
177
177
|
" Loading..."
|
|
178
178
|
] }),
|
|
179
179
|
!d(r) && i < z && !f && /* @__PURE__ */ e.jsx(
|
|
@@ -2,7 +2,7 @@ import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
|
2
2
|
import { useState as i, useEffect as k } from "react";
|
|
3
3
|
import { isEmpty as j, map as b } from "lodash-es";
|
|
4
4
|
import { atom as F, useAtom as U } from "jotai";
|
|
5
|
-
import { h as y,
|
|
5
|
+
import { h as y, ai as C } from "./index-b33n_-zO.js";
|
|
6
6
|
import { useTranslation as E } from "react-i18next";
|
|
7
7
|
import { Upload as G, Loader as P } from "lucide-react";
|
|
8
8
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
@@ -39,21 +39,21 @@ import "@chaibuilder/runtime";
|
|
|
39
39
|
import "@react-hookz/web";
|
|
40
40
|
import "tree-model";
|
|
41
41
|
const S = F([]), be = ({ isModalView: a, onSelect: m }) => {
|
|
42
|
-
const { t: s } = E(), p = y("uploadMediaCallback"), n = y("fetchMediaCallback"), [o,
|
|
42
|
+
const { t: s } = E(), p = y("uploadMediaCallback"), n = y("fetchMediaCallback"), [o, d] = U(S), [N, u] = i(!1), [x, f] = i(!1), [, v] = i(), [h, c] = i("");
|
|
43
43
|
k(() => {
|
|
44
44
|
(async () => {
|
|
45
45
|
if (!n)
|
|
46
46
|
return;
|
|
47
47
|
f(!0);
|
|
48
48
|
const t = await n();
|
|
49
|
-
|
|
49
|
+
d(t || []), f(!1);
|
|
50
50
|
})();
|
|
51
51
|
}, []);
|
|
52
52
|
const w = (t) => {
|
|
53
53
|
var r, l;
|
|
54
|
-
if (
|
|
54
|
+
if (c(""), t && ((l = (r = t == null ? void 0 : t.target) == null ? void 0 : r.files) == null ? void 0 : l.length) > 0) {
|
|
55
55
|
const g = t.target.files[0];
|
|
56
|
-
g.type.startsWith("image") ? I(g) :
|
|
56
|
+
g.type.startsWith("image") ? I(g) : c(s("Please select an image"));
|
|
57
57
|
}
|
|
58
58
|
}, I = async (t) => {
|
|
59
59
|
if (p) {
|
|
@@ -62,9 +62,9 @@ const S = F([]), be = ({ isModalView: a, onSelect: m }) => {
|
|
|
62
62
|
const { url: r } = await p(t);
|
|
63
63
|
m(r), v(void 0);
|
|
64
64
|
const l = await n();
|
|
65
|
-
|
|
65
|
+
d(l);
|
|
66
66
|
} catch (r) {
|
|
67
|
-
|
|
67
|
+
d([]), c((r == null ? void 0 : r.message) || "Something went wrong.");
|
|
68
68
|
}
|
|
69
69
|
u(!1);
|
|
70
70
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import { useState as c } from "react";
|
|
3
3
|
import { kebabCase as j } from "lodash-es";
|
|
4
|
-
import {
|
|
4
|
+
import { b0 as b, B as u, a_ as C, a$ as A } from "./index-b33n_-zO.js";
|
|
5
5
|
import { g } from "./controls-yjgoZzB6.js";
|
|
6
|
-
import { F as D } from "./form-
|
|
7
|
-
import { e as N } from "./index-
|
|
6
|
+
import { F as D } from "./form-5ke_lZv8.js";
|
|
7
|
+
import { e as N } from "./index-fnkMn4Pk.js";
|
|
8
8
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
9
|
import "@radix-ui/react-toggle";
|
|
10
10
|
import "class-variance-authority";
|
|
@@ -42,7 +42,7 @@ import "tree-model";
|
|
|
42
42
|
import "react-i18next";
|
|
43
43
|
import "@rjsf/core";
|
|
44
44
|
import "@rjsf/validator-ajv8";
|
|
45
|
-
import "./index-
|
|
45
|
+
import "./index-wRAIA8zZ.js";
|
|
46
46
|
import "i18next";
|
|
47
47
|
import "react-arborist";
|
|
48
48
|
import "lucide-react";
|
|
@@ -81,7 +81,7 @@ const S = ({ closeModal: e }) => {
|
|
|
81
81
|
}),
|
|
82
82
|
slug: g({ title: "Page Slug", default: o.slug })
|
|
83
83
|
};
|
|
84
|
-
return /* @__PURE__ */ t.jsxs(
|
|
84
|
+
return /* @__PURE__ */ t.jsxs(b, { children: [
|
|
85
85
|
/* @__PURE__ */ t.jsx("div", { className: "px-1 font-bold", children: "Add Page" }),
|
|
86
86
|
/* @__PURE__ */ t.jsx(D, { formData: o, properties: P, onChange: h, disabled: i.isPending }),
|
|
87
87
|
/* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ t.jsx(
|
|
@@ -96,7 +96,7 @@ const S = ({ closeModal: e }) => {
|
|
|
96
96
|
] });
|
|
97
97
|
}, Mt = () => {
|
|
98
98
|
const [e, i] = c(!1);
|
|
99
|
-
return /* @__PURE__ */ t.jsxs(
|
|
99
|
+
return /* @__PURE__ */ t.jsxs(C, { open: e, onOpenChange: () => i(!e), children: [
|
|
100
100
|
/* @__PURE__ */ t.jsx(A, { asChild: !0, children: /* @__PURE__ */ t.jsx(u, { size: "sm", variant: "link", className: "text-blue-500", onClick: () => i(!e), children: "+ New Page" }) }),
|
|
101
101
|
e && /* @__PURE__ */ t.jsx(S, { closeModal: () => i(!e) })
|
|
102
102
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),x=require("react"),P=require("lodash-es"),t=require("./index-aeDphKpP.cjs"),g=require("./controls-rRZhz0vu.cjs"),R=require("./form-4jTocVbZ.cjs"),f=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),x=require("react"),P=require("lodash-es"),t=require("./index-aeDphKpP.cjs"),g=require("./controls-rRZhz0vu.cjs"),R=require("./form-4jTocVbZ.cjs"),f=require("./index-6w-6HYBd.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.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("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("react-i18next");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./index-audsIPBC.cjs");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-ndxaXRT8.cjs");require("himalaya");require("lodash");const b=({closeModal:i})=>{var l,o;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(q=>{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("__","_")),{...q,...a}})},h={name:g.g({title:"Page Name",default:r.name}),slug:g.g({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||((l=r.name)==null?void 0:l.length)<2||((o=r.slug)==null?void 0:o.length)<2||u.isPending,onClick:p,children:"Add Page"})})]})},E=()=>{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=E;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as i } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { A as a, b as n, d as c, e as x, g as d, B as j } from "./index-
|
|
2
|
+
import { A as a, b as n, d as c, e as x, g as d, B as j } from "./index-b33n_-zO.js";
|
|
3
3
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@radix-ui/react-toggle";
|
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-audsIPBC.cjs");require("react");const e=require("./index-aeDphKpP.cjs"),r=require("react-i18next");require("i18next");require("./jsx-runtime-Z_BpKhVy.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("jotai");require("@react-hookz/web");require("react-arborist");require("./Functions-N3yhPYKY.cjs");require("lodash-es");require("clsx");require("tailwind-merge");require("@radix-ui/react-icons");require("lucide-react");require("./index--mLLy7QQ.cjs");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("@chaibuilder/runtime");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.cjs");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("tree-model");exports.AddBlocksPanel=s.AddBlocksPanel;exports.BlockSettings=s.BlockSettings;exports.Breakpoints=s.Breakpoints;exports.BuilderCanvas=s.BuilderCanvas;exports.ChaiBuilderEditor=s.ChaiBuilderEditor;exports.Outline=s.ListTree;exports.ThemeConfigPanel=s.ThemeConfigPanel;exports.UndoRedo=s.UndoRedo;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.useBlocksStore=e.useBlocksStore;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderProp=e.useBuilderProp;exports.useBuilderReset=e.useBuilderReset;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;exports.useCodeEditor=e.useCodeEditor;exports.useCopyBlockIds=e.useCopyBlockIds;exports.useCopyToClipboard=e.useCopyToClipboard;exports.useCurrentPage=e.useCurrentPage;exports.useCutBlockIds=e.useCutBlockIds;exports.useDarkMode=e.useDarkMode;exports.useDuplicateBlocks=e.useDuplicateBlocks;exports.useGetPageData=e.useGetPageData;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;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.useStylingBreakpoint=e.useStylingBreakpoint;exports.useStylingState=e.useStylingState;exports.useUILibraryBlocks=e.useUILibraryBlocks;exports.useUndoManager=e.useUndoManager;exports.useUpdateBlocksProps=e.useUpdateBlocksProps;exports.useUpdateBlocksPropsRealtime=e.useUpdateBlocksPropsRealtime;Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>r.useTranslation});
|
package/dist/core.d.ts
CHANGED
|
@@ -12,7 +12,8 @@ declare type AddBlocks = {
|
|
|
12
12
|
addPredefinedBlock: any;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
export declare const AddBlocksPanel: LazyExoticComponent<({ className }: {
|
|
15
|
+
export declare const AddBlocksPanel: LazyExoticComponent<({ className, showHeading }: {
|
|
16
|
+
showHeading?: boolean;
|
|
16
17
|
className?: string;
|
|
17
18
|
}) => JSX_2.Element>;
|
|
18
19
|
|
|
@@ -196,7 +197,10 @@ declare type SavePageData = {
|
|
|
196
197
|
themeConfiguration?: Record<string, any>;
|
|
197
198
|
};
|
|
198
199
|
|
|
199
|
-
export declare const ThemeConfigPanel: LazyExoticComponent<(
|
|
200
|
+
export declare const ThemeConfigPanel: LazyExoticComponent<({ showHeading, className, }: {
|
|
201
|
+
className?: string;
|
|
202
|
+
showHeading?: boolean;
|
|
203
|
+
}) => JSX_2.Element>;
|
|
200
204
|
|
|
201
205
|
declare type TimeInSeconds = number;
|
|
202
206
|
|
package/dist/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as Z, g as _, B as N, f as Q, C as V, L as X, T as Y, U as $ } from "./index-
|
|
1
|
+
import { A as Z, g as _, B as N, f as Q, C as V, L as X, T as Y, U as $ } from "./index-wRAIA8zZ.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
4
|
-
import { useTranslation as
|
|
3
|
+
import { ap as as, aL as es, aq as os, aM as ts, ar as rs, aK as is, i as ps, aj as ls, h as ms, u as us, J as ds, as as cs, an as Bs, at as ns, au as ks, av as Cs, aw as Ss, ax as gs, n as Ps, ay as vs, az as ys, aA as As, aB as hs, _ as Is, ao as Ms, k as Rs, aC as Us, ad as fs, l as Ds, aE as Ts, aD as xs, j as Es, aJ as Fs, K as Hs, z as Ls, aF as Os, aH as bs, aG as js, F as ws, y as zs, aI as Gs } from "./index-b33n_-zO.js";
|
|
4
|
+
import { useTranslation as Ks } from "react-i18next";
|
|
5
5
|
import "i18next";
|
|
6
6
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
7
7
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
@@ -58,8 +58,8 @@ export {
|
|
|
58
58
|
es as useActivePanel,
|
|
59
59
|
os as useAddBlock,
|
|
60
60
|
ts as useAddBlockParent,
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
rs as useAddClassesToBlocks,
|
|
62
|
+
is as useAllBlocks,
|
|
63
63
|
ps as useBlocksStore,
|
|
64
64
|
ls as useBrandingOptions,
|
|
65
65
|
ms as useBuilderProp,
|
|
@@ -78,11 +78,11 @@ export {
|
|
|
78
78
|
As as useHighlightBlockId,
|
|
79
79
|
hs as usePasteBlocks,
|
|
80
80
|
Is as usePreviewMode,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
Ms as useReadOnlyMode,
|
|
82
|
+
Rs as useRemoveBlocks,
|
|
83
|
+
Us as useRemoveClassesFromBlocks,
|
|
84
|
+
fs as useSavePage,
|
|
85
|
+
Ds as useSelectedBlock,
|
|
86
86
|
Ts as useSelectedBlockAllClasses,
|
|
87
87
|
xs as useSelectedBlockCurrentClasses,
|
|
88
88
|
Es as useSelectedBlockIds,
|
|
@@ -91,9 +91,9 @@ export {
|
|
|
91
91
|
Ls as useSelectedStylingBlocks,
|
|
92
92
|
Os as useStylingBreakpoint,
|
|
93
93
|
bs as useStylingState,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
Ks as useTranslation,
|
|
95
|
+
js as useUILibraryBlocks,
|
|
96
|
+
ws as useUndoManager,
|
|
97
|
+
zs as useUpdateBlocksProps,
|
|
98
|
+
Gs as useUpdateBlocksPropsRealtime
|
|
99
99
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { A as p, a as l, b as n, d, e as a, g as c, B as u } from "./index-
|
|
3
|
-
import { h } from "./index-
|
|
2
|
+
import { A as p, a as l, b as n, d, e as a, g as c, B as u } from "./index-b33n_-zO.js";
|
|
3
|
+
import { h } from "./index-fnkMn4Pk.js";
|
|
4
4
|
import { TrashIcon as x } from "@radix-ui/react-icons";
|
|
5
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
6
|
import "react";
|
|
@@ -38,7 +38,7 @@ import "jotai";
|
|
|
38
38
|
import "@react-hookz/web";
|
|
39
39
|
import "tree-model";
|
|
40
40
|
import "react-i18next";
|
|
41
|
-
import "./index-
|
|
41
|
+
import "./index-wRAIA8zZ.js";
|
|
42
42
|
import "i18next";
|
|
43
43
|
import "react-arborist";
|
|
44
44
|
import "lucide-react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("./index-aeDphKpP.cjs"),l=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("./index-aeDphKpP.cjs"),l=require("./index-6w-6HYBd.cjs"),q=require("@radix-ui/react-icons");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("lodash-es");require("./MODIFIERS-mVmfEGgo.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("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("react-i18next");require("./index-audsIPBC.cjs");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-ndxaXRT8.cjs");require("himalaya");require("lodash");const d=({pageData:i,projectData:t})=>{const n={},u=l.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(q.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;
|
package/dist/email.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),q=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),q=require("./index-audsIPBC.cjs"),r=require("@radix-ui/react-icons"),o=require("lodash-es");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("i18next");require("react-i18next");require("jotai");require("@react-hookz/web");require("react-arborist");require("./index-aeDphKpP.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.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("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("tree-model");require("lucide-react");require("./index--mLLy7QQ.cjs");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");const n=[{title:"Mobile",content:"Mobile email client",breakpoint:"xs",icon:e.jsxRuntimeExports.jsx(r.MobileIcon,{}),width:400},{title:"Email Client",content:"Content as seen inside an email client",breakpoint:"sm",icon:e.jsxRuntimeExports.jsx(r.MobileIcon,{className:"rotate-90"}),width:700}],s=i=>{const u={...i,filterChaiBlock:t=>o.includes(t.type,"Email/"),importHTMLSupport:!1,dataBindingSupport:!1,breakpoints:n};return e.jsxRuntimeExports.jsx(q.ChaiBuilderEditor,{...u})};exports.ChaiBuilderEmail=s;
|
package/dist/email.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as i } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { C as p } from "./index-
|
|
2
|
+
import { C as p } from "./index-wRAIA8zZ.js";
|
|
3
3
|
import { MobileIcon as t } from "@radix-ui/react-icons";
|
|
4
4
|
import { includes as e } from "lodash-es";
|
|
5
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
@@ -9,7 +9,7 @@ import "react-i18next";
|
|
|
9
9
|
import "jotai";
|
|
10
10
|
import "@react-hookz/web";
|
|
11
11
|
import "react-arborist";
|
|
12
|
-
import "./index-
|
|
12
|
+
import "./index-b33n_-zO.js";
|
|
13
13
|
import "@radix-ui/react-toggle";
|
|
14
14
|
import "class-variance-authority";
|
|
15
15
|
import "./utils-VpVqnC9m.js";
|
|
@@ -2,7 +2,7 @@ import { j as u } from "./jsx-runtime-WbnYoNE9.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-es";
|
|
5
|
-
import {
|
|
5
|
+
import { b3 as P, b4 as E, b5 as O, b6 as S } from "./index-b33n_-zO.js";
|
|
6
6
|
const d = (i, l = "") => {
|
|
7
7
|
switch (i.type) {
|
|
8
8
|
case "singular":
|