@chaibuilder/sdk 1.2.64 → 1.2.65
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/CanvasArea-fSdH_RiN.cjs +1 -0
- package/dist/{CanvasArea-kB6ky_uL.js → CanvasArea-ut5yknzX.js} +58 -54
- package/dist/{CodeEditor-37od44Ou.js → CodeEditor-Qff4q7sx.js} +1 -1
- package/dist/{CurrentPage-bHq9Uusr.js → CurrentPage-jHSVy3hq.js} +38 -26
- package/dist/CurrentPage-p_AM4lrF.cjs +1 -0
- package/dist/{PagesPanel-wIPAyjJK.js → PagesPanel-U3InJ9Db.js} +20 -8
- package/dist/PagesPanel-wqDb4D-x.cjs +1 -0
- package/dist/{ProjectPanel-L-SlDizV.js → ProjectPanel-XODJTO4J.js} +36 -24
- package/dist/ProjectPanel-fWESzHr6.cjs +1 -0
- package/dist/{SidePanels-UQj0XTnb.js → SidePanels-ijaUKSek.js} +96 -82
- package/dist/SidePanels-lrMQqc0h.cjs +1 -0
- package/dist/Topbar-RrCDxd0i.cjs +1 -0
- package/dist/{Topbar-1O05wogM.js → Topbar-vHlnfxPs.js} +45 -30
- package/dist/UILibrariesPanel-7btHgBD0.cjs +1 -0
- package/dist/{UILibrariesPanel-vshiYI6G.js → UILibrariesPanel-NVUMUPUj.js} +85 -65
- package/dist/{UnsplashImages-Eq7hprBO.js → UnsplashImages-UkHihhA5.js} +18 -18
- package/dist/{UploadImages-lco2Tea3.js → UploadImages-HtuJZJlo.js} +1 -1
- package/dist/add-page-modal-RwIj1FxH.cjs +1 -0
- package/dist/{add-page-modal-qr7rvJzN.js → add-page-modal-TOfMfmPA.js} +33 -24
- package/dist/{confirm-alert-P6TAevaP.js → confirm-alert-eIp2cAkc.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +7 -8
- package/dist/core.js +74 -59
- package/dist/{delete-page-modal-55oioI9i.js → delete-page-modal-4bxjpVBD.js} +33 -21
- package/dist/delete-page-modal-qYDZmpgT.cjs +1 -0
- package/dist/email.cjs +1 -1
- package/dist/email.js +20 -5
- package/dist/{form-5ke_lZv8.js → form-NAzFjGs0.js} +9 -9
- package/dist/html-to-json-NqRjgFqp.cjs +1 -0
- package/dist/html-to-json-l_mw5y-e.js +243 -0
- package/dist/{index-6w-6HYBd.cjs → index--k2M8kzI.cjs} +1 -1
- package/dist/{index-audsIPBC.cjs → index-5XyNUAjc.cjs} +81 -22
- package/dist/{index-b33n_-zO.js → index-C7mB4XFm.js} +117 -117
- package/dist/{index-fnkMn4Pk.js → index-YZhtVcj_.js} +4 -4
- package/dist/{index-wRAIA8zZ.js → index-lFgDm1oa.js} +48587 -45055
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +22 -22
- package/dist/page-viewer-4wrnWnK0.js +124 -0
- package/dist/page-viewer-ra0GLx1p.cjs +1 -0
- package/dist/{project-general-setting-NEkNjf7V.js → project-general-setting-IwZUkYF3.js} +18 -9
- package/dist/project-general-setting-lFjTUhHD.cjs +1 -0
- package/dist/{project-seo-setting-YmspOYsF.js → project-seo-setting-e1fTqVsd.js} +2 -2
- package/dist/{single-page-detail-jHzoDP7B.js → single-page-detail-ZNWFKqLW.js} +64 -55
- package/dist/single-page-detail-g55Anu7R.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +18 -6
- package/dist/style.css +2 -2
- package/dist/ui.js +67 -67
- package/package.json +1 -1
- package/dist/AddBlocks-6dJmFSgk.js +0 -142
- package/dist/AddBlocks-doCNVVbk.cjs +0 -1
- package/dist/CanvasArea-kdnkFfKR.cjs +0 -1
- package/dist/CurrentPage-Ekl5Cwbv.cjs +0 -1
- package/dist/PagesPanel-SMHrEmCb.cjs +0 -1
- package/dist/ProjectPanel-YruLal65.cjs +0 -1
- package/dist/Settings-WXkCyhAv.js +0 -2380
- package/dist/Settings-_5VHcgFC.cjs +0 -1
- package/dist/SidePanels-UeIZB3e1.cjs +0 -1
- package/dist/StaticCanvas-7C52tXAv.js +0 -749
- package/dist/StaticCanvas-ll9VTXI5.cjs +0 -60
- package/dist/ThemeConfigPanel-_86vVxLz.cjs +0 -1
- package/dist/ThemeConfigPanel-gw8B2zvx.js +0 -194
- package/dist/Topbar-gb17oHdJ.cjs +0 -1
- package/dist/UILibrariesPanel-03Y3F3A_.cjs +0 -1
- package/dist/add-page-modal-rOKavDFX.cjs +0 -1
- package/dist/atoms-KQpaDRnF.cjs +0 -1
- package/dist/atoms-Oomqut88.js +0 -6
- package/dist/delete-page-modal-wdAiMVnL.cjs +0 -1
- package/dist/html-to-json-_01DXd-a.js +0 -192
- package/dist/html-to-json-ndxaXRT8.cjs +0 -1
- package/dist/index-e0c8PmRQ.js +0 -205
- package/dist/index-gi1LIOCw.cjs +0 -1
- package/dist/page-viewer-t44DP65U.js +0 -112
- package/dist/page-viewer-wU7T0f48.cjs +0 -1
- package/dist/plugin-2hf9pCRy.cjs +0 -1
- package/dist/plugin-wDnsBVPp.js +0 -54
- package/dist/project-general-setting-87cX9vvO.cjs +0 -1
- package/dist/single-page-detail-27UjWK8L.cjs +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
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
|
|
3
|
-
import * as
|
|
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 _, capitalize as O } from "lodash-es";
|
|
3
|
+
import * as R from "react";
|
|
4
4
|
import S, { useState as A, useCallback as z, useEffect as G, useRef as M } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { a4 as H, a5 as F, B as J, a6 as W, a7 as $, a8 as K, a9 as V, aa as Y, ab as q, ac as Q, h as C, U as X, j as Z, V as ee, T as te, v as se, w as oe, b5 as re, aO as ae, a3 as ie, aJ as ne } from "./index-C7mB4XFm.js";
|
|
6
6
|
import { syncBlocksWithDefaults as le, useChaiBlocks as ce } from "@chaibuilder/runtime";
|
|
7
|
-
import { Loader as
|
|
8
|
-
import { useAtom as w, atom as
|
|
9
|
-
import { c as
|
|
10
|
-
import { CaretSortIcon as
|
|
7
|
+
import { Loader as me } from "lucide-react";
|
|
8
|
+
import { useAtom as w, atom as de } from "jotai";
|
|
9
|
+
import { c as E } from "./Functions-7jnEwJyw.js";
|
|
10
|
+
import { CaretSortIcon as pe, CheckIcon as ue, CaretRightIcon as xe } from "@radix-ui/react-icons";
|
|
11
11
|
import { O as fe } from "./MODIFIERS-fd5XOmum.js";
|
|
12
|
-
import { useTranslation as
|
|
13
|
-
import {
|
|
12
|
+
import { useTranslation as P } from "react-i18next";
|
|
13
|
+
import { c as he } from "./index-lFgDm1oa.js";
|
|
14
14
|
import ge from "clsx";
|
|
15
15
|
import { useFeature as je } from "flagged";
|
|
16
16
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
@@ -41,48 +41,68 @@ import "react-dom";
|
|
|
41
41
|
import "react-quill";
|
|
42
42
|
import "@react-hookz/web";
|
|
43
43
|
import "tree-model";
|
|
44
|
+
import "i18next";
|
|
45
|
+
import "react-arborist";
|
|
46
|
+
import "./index-VBXQixVm.js";
|
|
47
|
+
import "prop-types";
|
|
48
|
+
import "react-hotkeys-hook";
|
|
49
|
+
import "@floating-ui/dom";
|
|
50
|
+
import "@floating-ui/react-dom";
|
|
51
|
+
import "@tailwindcss/typography";
|
|
52
|
+
import "@tailwindcss/forms";
|
|
53
|
+
import "@tailwindcss/aspect-ratio";
|
|
54
|
+
import "tailwindcss-palette-generator";
|
|
55
|
+
import "./html-to-json-l_mw5y-e.js";
|
|
56
|
+
import "himalaya";
|
|
57
|
+
import "lodash";
|
|
58
|
+
import "react-wrap-balancer";
|
|
59
|
+
import "@rjsf/core";
|
|
60
|
+
import "@rjsf/validator-ajv8";
|
|
61
|
+
import "react-autosuggest";
|
|
62
|
+
import "fuse.js";
|
|
63
|
+
import "./controls-yjgoZzB6.js";
|
|
44
64
|
function ke({
|
|
45
65
|
uiLibraries: t,
|
|
46
66
|
library: a,
|
|
47
|
-
setLibrary:
|
|
67
|
+
setLibrary: i
|
|
48
68
|
}) {
|
|
49
|
-
var
|
|
50
|
-
const [
|
|
51
|
-
return a ? /* @__PURE__ */ e.jsxs(H, { open:
|
|
52
|
-
/* @__PURE__ */ e.jsx(
|
|
69
|
+
var p;
|
|
70
|
+
const [m, l] = R.useState(!1), { t: s } = P();
|
|
71
|
+
return a ? /* @__PURE__ */ e.jsxs(H, { open: m, onOpenChange: l, children: [
|
|
72
|
+
/* @__PURE__ */ e.jsx(F, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
53
73
|
/* @__PURE__ */ e.jsx("span", { children: s("Choose Library") }),
|
|
54
74
|
/* @__PURE__ */ e.jsxs(
|
|
55
|
-
|
|
75
|
+
J,
|
|
56
76
|
{
|
|
57
77
|
variant: "outline",
|
|
58
78
|
size: "sm",
|
|
59
79
|
role: "combobox",
|
|
60
|
-
"aria-expanded":
|
|
80
|
+
"aria-expanded": m,
|
|
61
81
|
className: "w-[200px] justify-between",
|
|
62
82
|
children: [
|
|
63
|
-
a ? (
|
|
64
|
-
/* @__PURE__ */ e.jsx(
|
|
83
|
+
a ? (p = t.find((o) => o.uuid === a)) == null ? void 0 : p.name : s("Select library"),
|
|
84
|
+
/* @__PURE__ */ e.jsx(pe, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
65
85
|
]
|
|
66
86
|
}
|
|
67
87
|
)
|
|
68
88
|
] }) }),
|
|
69
|
-
/* @__PURE__ */ e.jsx(W, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(
|
|
70
|
-
/* @__PURE__ */ e.jsx(
|
|
71
|
-
/* @__PURE__ */ e.jsxs(
|
|
72
|
-
/* @__PURE__ */ e.jsx(
|
|
73
|
-
/* @__PURE__ */ e.jsx(
|
|
74
|
-
|
|
89
|
+
/* @__PURE__ */ e.jsx(W, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs($, { children: [
|
|
90
|
+
/* @__PURE__ */ e.jsx(K, { placeholder: "Search library...", className: "h-9" }),
|
|
91
|
+
/* @__PURE__ */ e.jsxs(V, { children: [
|
|
92
|
+
/* @__PURE__ */ e.jsx(Y, { children: "No library found." }),
|
|
93
|
+
/* @__PURE__ */ e.jsx(q, { children: t.map((o) => /* @__PURE__ */ e.jsxs(
|
|
94
|
+
Q,
|
|
75
95
|
{
|
|
76
96
|
value: o.uuid,
|
|
77
|
-
onSelect: (
|
|
78
|
-
|
|
97
|
+
onSelect: (u) => {
|
|
98
|
+
i(u), l(!1);
|
|
79
99
|
},
|
|
80
100
|
children: [
|
|
81
101
|
o.name,
|
|
82
102
|
/* @__PURE__ */ e.jsx(
|
|
83
|
-
|
|
103
|
+
ue,
|
|
84
104
|
{
|
|
85
|
-
className:
|
|
105
|
+
className: E("ml-auto h-4 w-4", a === o.uuid ? "opacity-100" : "opacity-0")
|
|
86
106
|
}
|
|
87
107
|
)
|
|
88
108
|
]
|
|
@@ -96,28 +116,28 @@ function ke({
|
|
|
96
116
|
const we = ({
|
|
97
117
|
block: t,
|
|
98
118
|
closePopover: a,
|
|
99
|
-
library:
|
|
119
|
+
library: i
|
|
100
120
|
}) => {
|
|
101
|
-
const [
|
|
102
|
-
const
|
|
103
|
-
return r._type === "Box" &&
|
|
121
|
+
const [m, l] = A(!1), s = C("getUILibraryBlock", T), { addCoreBlock: p, addPredefinedBlock: o } = X(), [u, j] = Z(), [, k] = ee(), f = g(t, "name", g(t, "label")), b = je("dnd"), [, v] = w(he), n = (r) => {
|
|
122
|
+
const d = I(r, "styles_attrs.data-page-section");
|
|
123
|
+
return r._type === "Box" && d;
|
|
104
124
|
}, B = z(
|
|
105
125
|
async (r) => {
|
|
106
126
|
if (r.stopPropagation(), I(t, "component")) {
|
|
107
|
-
|
|
127
|
+
p(t, x(u)), a();
|
|
108
128
|
return;
|
|
109
129
|
}
|
|
110
130
|
l(!0);
|
|
111
|
-
const
|
|
112
|
-
let h = x(
|
|
113
|
-
|
|
131
|
+
const d = await s(i, t);
|
|
132
|
+
let h = x(u);
|
|
133
|
+
n(x(d)) && (h = null), L(d) || o(le(d), h), a();
|
|
114
134
|
},
|
|
115
135
|
[t]
|
|
116
136
|
), c = async (r) => {
|
|
117
|
-
const
|
|
118
|
-
let h = x(
|
|
119
|
-
if (
|
|
120
|
-
const y = { blocks:
|
|
137
|
+
const d = await s(i, t);
|
|
138
|
+
let h = x(u);
|
|
139
|
+
if (n(x(d)) && (h = null), !L(d)) {
|
|
140
|
+
const y = { blocks: d, uiLibrary: !0, parent: h };
|
|
121
141
|
if (r.dataTransfer.setData("text/plain", JSON.stringify(y)), t.preview) {
|
|
122
142
|
const N = new Image();
|
|
123
143
|
N.src = t.preview, N.onload = () => {
|
|
@@ -125,7 +145,7 @@ const we = ({
|
|
|
125
145
|
};
|
|
126
146
|
} else
|
|
127
147
|
r.dataTransfer.setDragImage(new Image(), 0, 0);
|
|
128
|
-
|
|
148
|
+
v(y), setTimeout(() => {
|
|
129
149
|
j([]), k(null), a();
|
|
130
150
|
}, 200);
|
|
131
151
|
}
|
|
@@ -134,16 +154,16 @@ const we = ({
|
|
|
134
154
|
/* @__PURE__ */ e.jsx(se, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
135
155
|
"div",
|
|
136
156
|
{
|
|
137
|
-
onClick:
|
|
157
|
+
onClick: m ? () => {
|
|
138
158
|
} : B,
|
|
139
|
-
draggable:
|
|
159
|
+
draggable: b ? "true" : "false",
|
|
140
160
|
onDragStart: c,
|
|
141
161
|
className: ge(
|
|
142
162
|
"relative mt-2 cursor-pointer overflow-hidden rounded-md border border-gray-300 bg-white duration-200 hover:border-blue-500 hover:shadow-xl"
|
|
143
163
|
),
|
|
144
164
|
children: [
|
|
145
|
-
|
|
146
|
-
/* @__PURE__ */ e.jsx(
|
|
165
|
+
m && /* @__PURE__ */ e.jsxs("div", { className: "absolute flex h-full w-full items-center justify-center bg-black/70", children: [
|
|
166
|
+
/* @__PURE__ */ e.jsx(me, { className: "animate-spin", size: 15, color: "white" }),
|
|
147
167
|
/* @__PURE__ */ e.jsx("span", { className: "pl-2 text-sm text-white", children: "Adding..." })
|
|
148
168
|
] }),
|
|
149
169
|
t.preview ? /* @__PURE__ */ e.jsx("img", { src: t.preview, className: "min-h-[25px] w-full rounded-md", alt: f }) : /* @__PURE__ */ e.jsx("div", { className: "flex h-20 items-center justify-center rounded-md border border-border border-gray-300 bg-gray-200", children: /* @__PURE__ */ e.jsx("p", { className: "max-w-xs text-center text-sm text-gray-700", children: f }) })
|
|
@@ -152,39 +172,39 @@ const we = ({
|
|
|
152
172
|
) }),
|
|
153
173
|
/* @__PURE__ */ e.jsx(oe, { children: /* @__PURE__ */ e.jsx("p", { children: f }) })
|
|
154
174
|
] });
|
|
155
|
-
},
|
|
156
|
-
const [a,
|
|
175
|
+
}, be = de({}), ve = (t) => {
|
|
176
|
+
const [a, i] = w(be), m = 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
177
|
return G(() => {
|
|
158
178
|
(async () => {
|
|
159
179
|
if (s || l.length > 0 || !t)
|
|
160
180
|
return;
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
|
|
181
|
+
i((o) => ({ ...o, [t == null ? void 0 : t.uuid]: { loading: !0, blocks: [] } }));
|
|
182
|
+
const p = await m(t);
|
|
183
|
+
i((o) => ({ ...o, [t == null ? void 0 : t.uuid]: { loading: !1, blocks: p || [] } }));
|
|
164
184
|
})();
|
|
165
185
|
}, [t, l, s]), { data: l, isLoading: s };
|
|
166
186
|
}, Be = re("_selectedLibrary", null), Ne = () => {
|
|
167
|
-
const [t, a] = w(Be),
|
|
168
|
-
|
|
169
|
-
|
|
187
|
+
const [t, a] = w(Be), i = C("uiLibraries", []), m = ce(), l = U(m).filter((c) => c.category === "custom"), s = i.find((c) => c.uuid === t) || x(i), { data: p, isLoading: o } = ve(s), u = D([...p, ...l], "group"), [j, k] = A("Hero"), [, f] = w(ae), b = g(u, j, []), { t: v } = P(), n = M(null), B = (c) => {
|
|
188
|
+
n.current && (clearTimeout(n.current), n.current = null), n.current = setTimeout(() => {
|
|
189
|
+
n.current && k(c);
|
|
170
190
|
}, 300);
|
|
171
191
|
};
|
|
172
|
-
return o ? /* @__PURE__ */ e.jsx(
|
|
173
|
-
s != null && s.uuid ? /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 flex h-fit flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ e.jsx("h1", { className: "flex w-full flex-col items-baseline truncate px-1 text-sm font-semibold xl:flex-col", children: /* @__PURE__ */ e.jsx(ke, { library: s == null ? void 0 : s.uuid, setLibrary: a, uiLibraries:
|
|
192
|
+
return o ? /* @__PURE__ */ e.jsx(ie, { className: "h-full w-full" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full max-h-full w-[460px] flex-col overflow-hidden bg-background", children: [
|
|
193
|
+
s != null && s.uuid ? /* @__PURE__ */ e.jsx("div", { className: "sticky top-0 flex h-fit flex-col", children: /* @__PURE__ */ e.jsx("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ e.jsx("h1", { className: "flex w-full flex-col items-baseline truncate px-1 text-sm font-semibold xl:flex-col", children: /* @__PURE__ */ e.jsx(ke, { library: s == null ? void 0 : s.uuid, setLibrary: a, uiLibraries: i }) }) }) }) : null,
|
|
174
194
|
/* @__PURE__ */ e.jsxs("div", { className: "flex h-[95%] border-t border-gray-300 pt-2", children: [
|
|
175
195
|
/* @__PURE__ */ e.jsx("div", { className: "flex h-full w-40 flex-col gap-1 px-1", children: S.Children.toArray(
|
|
176
|
-
|
|
196
|
+
_(u, (c, r) => /* @__PURE__ */ e.jsxs(
|
|
177
197
|
"div",
|
|
178
198
|
{
|
|
179
199
|
onMouseEnter: () => B(r),
|
|
180
|
-
onMouseLeave: () => clearTimeout(
|
|
200
|
+
onMouseLeave: () => clearTimeout(n.current),
|
|
181
201
|
onClick: () => k(r),
|
|
182
|
-
className:
|
|
202
|
+
className: E(
|
|
183
203
|
"flex w-full cursor-pointer items-center justify-between rounded-md p-1 text-sm transition-all ease-in-out hover:bg-gray-200",
|
|
184
204
|
r === j ? "bg-blue-500 text-white hover:bg-blue-600" : ""
|
|
185
205
|
),
|
|
186
206
|
children: [
|
|
187
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
207
|
+
/* @__PURE__ */ e.jsx("span", { children: O(r) }),
|
|
188
208
|
/* @__PURE__ */ e.jsx(xe, { className: "ml-2 h-5 w-5" })
|
|
189
209
|
]
|
|
190
210
|
},
|
|
@@ -192,14 +212,14 @@ const we = ({
|
|
|
192
212
|
))
|
|
193
213
|
) }),
|
|
194
214
|
/* @__PURE__ */ e.jsxs(
|
|
195
|
-
|
|
215
|
+
ne,
|
|
196
216
|
{
|
|
197
|
-
onMouseEnter: () =>
|
|
217
|
+
onMouseEnter: () => n.current ? clearTimeout(n.current) : null,
|
|
198
218
|
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
219
|
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:
|
|
220
|
+
/* @__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: v("Click on a block to add it to the page") }),
|
|
201
221
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2 px-2", children: S.Children.toArray(
|
|
202
|
-
|
|
222
|
+
b.map((c) => /* @__PURE__ */ e.jsx(we, { block: c, library: s, closePopover: () => f(fe) }))
|
|
203
223
|
) }),
|
|
204
224
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
205
225
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
@@ -209,7 +229,7 @@ const we = ({
|
|
|
209
229
|
)
|
|
210
230
|
] })
|
|
211
231
|
] }) });
|
|
212
|
-
},
|
|
232
|
+
}, Pt = () => /* @__PURE__ */ e.jsx(Ne, {});
|
|
213
233
|
export {
|
|
214
|
-
|
|
234
|
+
Pt as default
|
|
215
235
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import { useState as p, useEffect as D } from "react";
|
|
3
3
|
import { isEmpty as d, startCase as E } from "lodash-es";
|
|
4
|
-
import { MixerHorizontalIcon as
|
|
5
|
-
import { createApi as
|
|
6
|
-
import { h as
|
|
7
|
-
import { useDebouncedState as
|
|
8
|
-
import { Loader as
|
|
4
|
+
import { MixerHorizontalIcon as F } from "@radix-ui/react-icons";
|
|
5
|
+
import { createApi as L } from "unsplash-js";
|
|
6
|
+
import { h as B, aF as K, a4 as U, a5 as V, a6 as O, bw as P, bx as C, by as S, bz as A, bA as h, aJ as Q, B as H } from "./index-C7mB4XFm.js";
|
|
7
|
+
import { useDebouncedState as J } from "@react-hookz/web";
|
|
8
|
+
import { Loader as R } from "lucide-react";
|
|
9
9
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
10
10
|
import "@radix-ui/react-toggle";
|
|
11
11
|
import "class-variance-authority";
|
|
@@ -39,18 +39,18 @@ import "@chaibuilder/runtime";
|
|
|
39
39
|
import "jotai";
|
|
40
40
|
import "tree-model";
|
|
41
41
|
import "react-i18next";
|
|
42
|
-
const
|
|
43
|
-
|
|
42
|
+
const I = async (x, g) => new Promise((o, r) => {
|
|
43
|
+
L({ accessKey: g }).search.getPhotos(x).then((i) => {
|
|
44
44
|
o(i);
|
|
45
45
|
}).catch((i) => r(i));
|
|
46
46
|
}), De = ({ isModalView: x, onSelect: g }) => {
|
|
47
|
-
const o =
|
|
47
|
+
const o = B("unsplashAccessKey", ""), [r, j] = p([]), [i, v] = p(0), [l, k] = p(), [n, q] = p(), [z, y] = p(0), [u, T] = J("", 1e3), [f, c] = p(!1), _ = async (s) => {
|
|
48
48
|
if (d(u))
|
|
49
49
|
return;
|
|
50
50
|
let t = i + 1;
|
|
51
51
|
s && (s.preventDefault(), t = 1), c(!0), v(t);
|
|
52
52
|
const m = { query: u, page: t };
|
|
53
|
-
l && (m.orientation = l), n && (m.color = n),
|
|
53
|
+
l && (m.orientation = l), n && (m.color = n), I(m, o).then((a) => {
|
|
54
54
|
var b, N, w;
|
|
55
55
|
j(t === 1 ? ((b = a == null ? void 0 : a.response) == null ? void 0 : b.results) || [] : [...r, ...((N = a == null ? void 0 : a.response) == null ? void 0 : N.results) || []]), y((w = a == null ? void 0 : a.response) == null ? void 0 : w.total_pages), c(!1);
|
|
56
56
|
}).catch(() => {
|
|
@@ -61,7 +61,7 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
61
61
|
if (!d(u) && o) {
|
|
62
62
|
c(!0);
|
|
63
63
|
const s = { query: u, page: 1 };
|
|
64
|
-
l && (s.orientation = l), n && (s.color = n), v(1),
|
|
64
|
+
l && (s.orientation = l), n && (s.color = n), v(1), I(s, o).then((t) => {
|
|
65
65
|
var m, a;
|
|
66
66
|
j(((m = t == null ? void 0 : t.response) == null ? void 0 : m.results) || []), y((a = t == null ? void 0 : t.response) == null ? void 0 : a.total_pages), c(!1);
|
|
67
67
|
}).catch(() => {
|
|
@@ -92,18 +92,18 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
92
92
|
onChange: (s) => T(s.target.value)
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
|
-
/* @__PURE__ */ e.jsxs(
|
|
96
|
-
/* @__PURE__ */ e.jsx(
|
|
95
|
+
/* @__PURE__ */ e.jsxs(U, { children: [
|
|
96
|
+
/* @__PURE__ */ e.jsx(V, { asChild: !0, className: "h-full w-10 cursor-pointer p-2.5 hover:bg-slate-200", children: /* @__PURE__ */ e.jsx(F, {}) }),
|
|
97
97
|
/* @__PURE__ */ e.jsx(
|
|
98
|
-
|
|
98
|
+
O,
|
|
99
99
|
{
|
|
100
100
|
side: x ? "bottom" : "right",
|
|
101
101
|
className: "z-[9999] flex w-max items-center justify-center",
|
|
102
102
|
children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
103
103
|
/* @__PURE__ */ e.jsx("div", { className: "py-1 text-sm font-medium", children: "Orientation" }),
|
|
104
|
-
/* @__PURE__ */ e.jsxs(P, { defaultValue: l, onValueChange: (s) =>
|
|
104
|
+
/* @__PURE__ */ e.jsxs(P, { defaultValue: l, onValueChange: (s) => k(s), children: [
|
|
105
105
|
/* @__PURE__ */ e.jsx(C, { className: "h-auto w-40 p-1 px-3", children: /* @__PURE__ */ e.jsx(S, { placeholder: "Select" }) }),
|
|
106
|
-
/* @__PURE__ */ e.jsxs(
|
|
106
|
+
/* @__PURE__ */ e.jsxs(A, { className: "z-[9999]", children: [
|
|
107
107
|
/* @__PURE__ */ e.jsx(h, { value: "", children: "All" }),
|
|
108
108
|
/* @__PURE__ */ e.jsx(h, { value: "landscape", children: "Landscape" }),
|
|
109
109
|
/* @__PURE__ */ e.jsx(h, { value: "portrait", children: "Portrait" }),
|
|
@@ -113,7 +113,7 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
113
113
|
/* @__PURE__ */ e.jsx("div", { className: "pb-1 pt-2 text-sm font-medium", children: "Color" }),
|
|
114
114
|
/* @__PURE__ */ e.jsxs(P, { defaultValue: n, onValueChange: (s) => q(s), children: [
|
|
115
115
|
/* @__PURE__ */ e.jsx(C, { className: "h-auto w-40 p-1 px-3", children: /* @__PURE__ */ e.jsx(S, { placeholder: "Select" }) }),
|
|
116
|
-
/* @__PURE__ */ e.jsxs(
|
|
116
|
+
/* @__PURE__ */ e.jsxs(A, { className: "z-[9999]", children: [
|
|
117
117
|
/* @__PURE__ */ e.jsx(h, { value: "", children: "All" }),
|
|
118
118
|
[
|
|
119
119
|
"black_and_white",
|
|
@@ -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(R, { className: "animate-spin w-6 h-6" }),
|
|
177
177
|
" Loading..."
|
|
178
178
|
] }),
|
|
179
179
|
!d(r) && i < z && !f && /* @__PURE__ */ e.jsx(
|
|
@@ -194,5 +194,5 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
194
194
|
};
|
|
195
195
|
export {
|
|
196
196
|
De as default,
|
|
197
|
-
|
|
197
|
+
I as fetchImage
|
|
198
198
|
};
|
|
@@ -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, aJ as C } from "./index-C7mB4XFm.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";
|
|
@@ -0,0 +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--k2M8kzI.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-5XyNUAjc.cjs");require("i18next");require("react-arborist");require("lucide-react");require("./index--mLLy7QQ.cjs");require("prop-types");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./html-to-json-NqRjgFqp.cjs");require("himalaya");require("lodash");require("react-wrap-balancer");require("react-autosuggest");require("fuse.js");require("sonner");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.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||((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"})})]})},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,10 +1,10 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import { useState as c } from "react";
|
|
3
|
-
import { kebabCase as
|
|
4
|
-
import {
|
|
3
|
+
import { kebabCase as P } from "lodash-es";
|
|
4
|
+
import { aj as C, B as u, ah as b, ai as A } from "./index-C7mB4XFm.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-NAzFjGs0.js";
|
|
7
|
+
import { e as N } from "./index-YZhtVcj_.js";
|
|
8
8
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
9
|
import "@radix-ui/react-toggle";
|
|
10
10
|
import "class-variance-authority";
|
|
@@ -42,21 +42,30 @@ 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-lFgDm1oa.js";
|
|
46
46
|
import "i18next";
|
|
47
47
|
import "react-arborist";
|
|
48
48
|
import "lucide-react";
|
|
49
49
|
import "./index-VBXQixVm.js";
|
|
50
|
+
import "prop-types";
|
|
51
|
+
import "react-hotkeys-hook";
|
|
52
|
+
import "@floating-ui/dom";
|
|
50
53
|
import "@floating-ui/react-dom";
|
|
51
54
|
import "flagged";
|
|
52
|
-
import "
|
|
53
|
-
import "
|
|
54
|
-
import "
|
|
55
|
+
import "@tailwindcss/typography";
|
|
56
|
+
import "@tailwindcss/forms";
|
|
57
|
+
import "@tailwindcss/aspect-ratio";
|
|
58
|
+
import "tailwindcss-palette-generator";
|
|
59
|
+
import "./html-to-json-l_mw5y-e.js";
|
|
55
60
|
import "himalaya";
|
|
56
61
|
import "lodash";
|
|
57
|
-
|
|
62
|
+
import "react-wrap-balancer";
|
|
63
|
+
import "react-autosuggest";
|
|
64
|
+
import "fuse.js";
|
|
65
|
+
import "sonner";
|
|
66
|
+
const S = ({ closeModal: i }) => {
|
|
58
67
|
var a, s;
|
|
59
|
-
const
|
|
68
|
+
const r = N(), [o, f] = c({
|
|
60
69
|
name: "",
|
|
61
70
|
slug: "",
|
|
62
71
|
blocks: [],
|
|
@@ -64,43 +73,43 @@ const S = ({ closeModal: e }) => {
|
|
|
64
73
|
seoData: {},
|
|
65
74
|
template: ""
|
|
66
75
|
}), x = () => {
|
|
67
|
-
|
|
68
|
-
}, h = ({ formData: m },
|
|
76
|
+
r.mutate(o, { onSuccess: () => i() });
|
|
77
|
+
}, h = ({ formData: m }, e) => {
|
|
69
78
|
f((l) => {
|
|
70
79
|
var n, d;
|
|
71
|
-
const p = { [
|
|
72
|
-
return
|
|
80
|
+
const p = { [e]: m[e] };
|
|
81
|
+
return e === "name" ? p.slug = P((n = m[e]) == null ? void 0 : n.replace(/\d/g, "")) : e === "slug" && (p.slug = (d = m[e]) == null ? void 0 : d.replace(/\d/g, "").replace(/\s+/g, "").replace("--", "-").replace("__", "_")), {
|
|
73
82
|
...l,
|
|
74
83
|
...p
|
|
75
84
|
};
|
|
76
85
|
});
|
|
77
|
-
},
|
|
86
|
+
}, j = {
|
|
78
87
|
name: g({
|
|
79
88
|
title: "Page Name",
|
|
80
89
|
default: o.name
|
|
81
90
|
}),
|
|
82
91
|
slug: g({ title: "Page Slug", default: o.slug })
|
|
83
92
|
};
|
|
84
|
-
return /* @__PURE__ */ t.jsxs(
|
|
93
|
+
return /* @__PURE__ */ t.jsxs(C, { children: [
|
|
85
94
|
/* @__PURE__ */ t.jsx("div", { className: "px-1 font-bold", children: "Add Page" }),
|
|
86
|
-
/* @__PURE__ */ t.jsx(D, { formData: o, properties:
|
|
95
|
+
/* @__PURE__ */ t.jsx(D, { formData: o, properties: j, onChange: h, disabled: r.isPending }),
|
|
87
96
|
/* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ t.jsx(
|
|
88
97
|
u,
|
|
89
98
|
{
|
|
90
99
|
type: "submit",
|
|
91
|
-
disabled: !o.name || !o.slug || ((a = o.name) == null ? void 0 : a.length) < 2 || ((s = o.slug) == null ? void 0 : s.length) < 2 ||
|
|
100
|
+
disabled: !o.name || !o.slug || ((a = o.name) == null ? void 0 : a.length) < 2 || ((s = o.slug) == null ? void 0 : s.length) < 2 || r.isPending,
|
|
92
101
|
onClick: x,
|
|
93
102
|
children: "Add Page"
|
|
94
103
|
}
|
|
95
104
|
) })
|
|
96
105
|
] });
|
|
97
|
-
},
|
|
98
|
-
const [
|
|
99
|
-
return /* @__PURE__ */ t.jsxs(
|
|
100
|
-
/* @__PURE__ */ t.jsx(A, { asChild: !0, children: /* @__PURE__ */ t.jsx(u, { size: "sm", variant: "link", className: "text-blue-500", onClick: () =>
|
|
101
|
-
|
|
106
|
+
}, It = () => {
|
|
107
|
+
const [i, r] = c(!1);
|
|
108
|
+
return /* @__PURE__ */ t.jsxs(b, { open: i, onOpenChange: () => r(!i), children: [
|
|
109
|
+
/* @__PURE__ */ t.jsx(A, { asChild: !0, children: /* @__PURE__ */ t.jsx(u, { size: "sm", variant: "link", className: "text-blue-500", onClick: () => r(!i), children: "+ New Page" }) }),
|
|
110
|
+
i && /* @__PURE__ */ t.jsx(S, { closeModal: () => r(!i) })
|
|
102
111
|
] });
|
|
103
112
|
};
|
|
104
113
|
export {
|
|
105
|
-
|
|
114
|
+
It as default
|
|
106
115
|
};
|
|
@@ -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-C7mB4XFm.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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-5XyNUAjc.cjs"),e=require("./index-aeDphKpP.cjs"),s=require("react-i18next");require("i18next");require("./jsx-runtime-Z_BpKhVy.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");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("prop-types");require("react-quill");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("flagged");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./html-to-json-NqRjgFqp.cjs");require("himalaya");require("./MODIFIERS-mVmfEGgo.cjs");require("lodash");require("@chaibuilder/runtime");require("react-wrap-balancer");require("@rjsf/core");require("@rjsf/validator-ajv8");require("react-autosuggest");require("fuse.js");require("./utils-D_vtk3zK.cjs");require("./controls-rRZhz0vu.cjs");require("@radix-ui/react-scroll-area");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("tree-model");exports.AddBlocksPanel=r.AddBlocksPanel;exports.BlockSettings=r.Settings;exports.Breakpoints=r.Breakpoints;exports.BuilderCanvas=r.StaticCanvas;exports.ChaiBuilderEditor=r.ChaiBuilderEditor;exports.Outline=r.ListTree;exports.ThemeConfigPanel=r.ThemeConfigPanel;exports.UndoRedo=r.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:()=>s.useTranslation});
|
package/dist/core.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
3
|
-
import { LazyExoticComponent } from 'react';
|
|
4
2
|
import { default as React_2 } from 'react';
|
|
3
|
+
import * as React_3 from 'react';
|
|
5
4
|
import { ReactNode } from 'react';
|
|
6
5
|
import { RESET } from 'jotai/utils';
|
|
7
6
|
import { ThrottledFunction } from '@react-hookz/web';
|
|
@@ -12,10 +11,10 @@ declare type AddBlocks = {
|
|
|
12
11
|
addPredefinedBlock: any;
|
|
13
12
|
};
|
|
14
13
|
|
|
15
|
-
export declare const AddBlocksPanel:
|
|
14
|
+
export declare const AddBlocksPanel: ({ className, showHeading }: {
|
|
16
15
|
showHeading?: boolean;
|
|
17
16
|
className?: string;
|
|
18
|
-
}) => JSX_2.Element
|
|
17
|
+
}) => JSX_2.Element;
|
|
19
18
|
|
|
20
19
|
declare type AskAiResponse = {
|
|
21
20
|
blocks?: Array<{
|
|
@@ -30,7 +29,7 @@ declare interface Block {
|
|
|
30
29
|
[key: string]: any;
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
export declare const BlockSettings:
|
|
32
|
+
export declare const BlockSettings: React_2.FC;
|
|
34
33
|
|
|
35
34
|
declare type Breakpoint = {
|
|
36
35
|
title: string;
|
|
@@ -42,7 +41,7 @@ declare type Breakpoint = {
|
|
|
42
41
|
|
|
43
42
|
export declare const Breakpoints: () => JSX_2.Element;
|
|
44
43
|
|
|
45
|
-
export declare const BuilderCanvas:
|
|
44
|
+
export declare const BuilderCanvas: () => React_2.JSX.Element;
|
|
46
45
|
|
|
47
46
|
export declare type ChaiBlock = {
|
|
48
47
|
_id: string;
|
|
@@ -197,10 +196,10 @@ declare type SavePageData = {
|
|
|
197
196
|
themeConfiguration?: Record<string, any>;
|
|
198
197
|
};
|
|
199
198
|
|
|
200
|
-
export declare const ThemeConfigPanel:
|
|
199
|
+
export declare const ThemeConfigPanel: ({ showHeading, className, }: {
|
|
201
200
|
className?: string;
|
|
202
201
|
showHeading?: boolean;
|
|
203
|
-
}) =>
|
|
202
|
+
}) => React_3.JSX.Element;
|
|
204
203
|
|
|
205
204
|
declare type TimeInSeconds = number;
|
|
206
205
|
|