@chaibuilder/sdk 1.2.56 → 1.2.58
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-HeYXoex4.js → AddBlocks-05ZH2Suu.js} +46 -50
- package/dist/AddBlocks-MH_fqSRf.cjs +1 -0
- package/dist/CanvasArea-7nhpzTI-.cjs +59 -0
- package/dist/{CanvasArea-CqILE5PR.js → CanvasArea-kMGTLtCw.js} +409 -394
- package/dist/CodeEditor-vECReGwz.cjs +1 -0
- package/dist/{CodeEditor-kxV5RCpd.js → CodeEditor-zYBqhBv3.js} +33 -39
- package/dist/{CurrentPage-IrFGAb7n.js → CurrentPage-VksVpchp.js} +26 -25
- package/dist/CurrentPage-caSpOhR9.cjs +1 -0
- package/dist/{ListTree-0n_G8NJx.js → ListTree-0iy8aBgI.js} +82 -65
- package/dist/ListTree-Njsk1AzL.cjs +1 -0
- package/dist/{PagesPanel-RYBf0Yct.js → PagesPanel-2AEsdqhe.js} +20 -19
- package/dist/PagesPanel-tb0qtxz4.cjs +1 -0
- package/dist/{ProjectPanel-Zagx6l3Q.js → ProjectPanel-IHFBvE5H.js} +25 -24
- package/dist/ProjectPanel-gmBUq2NI.cjs +1 -0
- package/dist/{Settings-RLDTFFf8.js → Settings-r9IvIq0G.js} +405 -396
- package/dist/Settings-uVLt1oiz.cjs +1 -0
- package/dist/{SidePanels-ao969pMV.js → SidePanels-2fD5UfH5.js} +89 -88
- package/dist/SidePanels-rhTLiLy6.cjs +1 -0
- package/dist/ThemeConfiguration-PvMN3j6h.cjs +1 -0
- package/dist/{ThemeConfiguration-S7yArRMp.js → ThemeConfiguration-ab7lbA2y.js} +18 -24
- package/dist/Topbar-1JTIu0uN.cjs +1 -0
- package/dist/{Topbar-B8u0whpc.js → Topbar-x4gslZ4T.js} +39 -38
- package/dist/UILibrariesPanel-CaGLzB9c.cjs +1 -0
- package/dist/UILibrariesPanel-raxCToMd.js +216 -0
- package/dist/{UnsplashImages-wWRifkCp.js → UnsplashImages-alt_doTy.js} +42 -47
- package/dist/UnsplashImages-cah1BRL_.cjs +1 -0
- package/dist/UploadImages-5dRETWCo.cjs +1 -0
- package/dist/{UploadImages-lUvZhW_j.js → UploadImages-JqVL_aQd.js} +32 -38
- package/dist/add-page-modal-9e6JkoxV.cjs +1 -0
- package/dist/{add-page-modal-04b4l2zu.js → add-page-modal-DbmbwG7V.js} +29 -28
- package/dist/{confirm-alert-FX5030eR.js → confirm-alert-m85JJlQi.js} +15 -21
- package/dist/confirm-alert-rYsxlfR4.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +44 -43
- package/dist/delete-page-modal-YtRcj7eK.cjs +1 -0
- package/dist/{delete-page-modal-1u9CyAIP.js → delete-page-modal-nIBA3zCg.js} +22 -21
- package/dist/email.cjs +1 -1
- package/dist/email.js +19 -19
- package/dist/form-G3PqS2Gc.cjs +1 -0
- package/dist/{form-HRdEJjVq.js → form-MSL4CDff.js} +3 -3
- package/dist/{html-to-json-OnIZDDXw.js → html-to-json-_01DXd-a.js} +37 -36
- package/dist/html-to-json-ndxaXRT8.cjs +1 -0
- package/dist/index-0FIxW0gR.cjs +1 -0
- package/dist/index-5IJnVFyU.cjs +206 -0
- package/dist/index-7zSzDmAA.cjs +1 -0
- package/dist/{index-vfmO3y2d.js → index-b4Wjumon.js} +19 -19
- package/dist/{ChaiBuilderEditor-tkzS851D.js → index-grcmKbfu.js} +14660 -17763
- package/dist/index-uLn8W3eR.js +3145 -0
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +17 -16
- package/dist/mockServiceWorker.js +18 -10
- package/dist/page-viewer-JySaivSD.cjs +1 -0
- package/dist/{page-viewer-dcb3u4OV.js → page-viewer-QxHe6m6V.js} +27 -26
- package/dist/project-general-setting-FqXwffxC.cjs +1 -0
- package/dist/{project-general-setting--sS34seu.js → project-general-setting-nSzmnyIU.js} +23 -22
- package/dist/{project-seo-setting-8tc3I-0M.js → project-seo-setting-3kFJ77jY.js} +20 -26
- package/dist/project-seo-setting-C3ilIIeM.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +104 -102
- package/dist/single-page-detail-F5J53NCW.cjs +1 -0
- package/dist/{single-page-detail-tP2pfgBp.js → single-page-detail-uSK1ExCH.js} +26 -25
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +19 -18
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +144 -150
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +164 -107
- package/package.json +1 -1
- package/dist/AddBlocks-VHoZezjj.cjs +0 -1
- package/dist/CanvasArea-137WY3Wx.cjs +0 -56
- package/dist/ChaiBuilderEditor-aY8flOgX.cjs +0 -206
- package/dist/CodeEditor-R2jKe97T.cjs +0 -1
- package/dist/CurrentPage-PjrVzHXR.cjs +0 -1
- package/dist/ListTree-C6oCXZDV.cjs +0 -1
- package/dist/PagesPanel-lIC3kYmS.cjs +0 -1
- package/dist/ProjectPanel-0Siyi5YS.cjs +0 -1
- package/dist/Settings-6QRVcl16.cjs +0 -1
- package/dist/SidePanels-j1EFsBlK.cjs +0 -1
- package/dist/ThemeConfiguration-q1471P7b.cjs +0 -1
- package/dist/Topbar-ogFKKDbx.cjs +0 -1
- package/dist/UILibrariesPanel-cm9CFWxc.cjs +0 -1
- package/dist/UILibrariesPanel-tcfz2ELp.js +0 -196
- package/dist/UnsplashImages-E2L3YDJI.cjs +0 -1
- package/dist/UploadImages-s-eeaGiS.cjs +0 -1
- package/dist/add-page-modal-eroF20lO.cjs +0 -1
- package/dist/confirm-alert-XuxEzG-V.cjs +0 -1
- package/dist/delete-page-modal-pgh7sdfg.cjs +0 -1
- package/dist/form-Z4IRWj0o.cjs +0 -1
- package/dist/html-to-json-rauxDBi6.cjs +0 -1
- package/dist/index-bt7EhwLh.cjs +0 -1
- package/dist/page-viewer-O960kM2x.cjs +0 -1
- package/dist/project-general-setting-lIvNs-Vq.cjs +0 -1
- package/dist/project-seo-setting-MIlAuqcc.cjs +0 -1
- package/dist/single-page-detail-0Z_hvd_j.cjs +0 -1
- package/dist/useCanvasSettings-R0h03UfD.cjs +0 -1
- package/dist/useCanvasSettings-rEZHbw3s.js +0 -6
|
@@ -1,34 +1,25 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { useState as p, useEffect as
|
|
3
|
-
import { isEmpty as d, startCase as
|
|
4
|
-
import { MixerHorizontalIcon as
|
|
5
|
-
import { createApi as
|
|
6
|
-
import { h as F,
|
|
7
|
-
import { useDebouncedState as
|
|
2
|
+
import { useState as p, useEffect as _ } from "react";
|
|
3
|
+
import { isEmpty as d, startCase as B } from "lodash-es";
|
|
4
|
+
import { MixerHorizontalIcon as E } from "@radix-ui/react-icons";
|
|
5
|
+
import { createApi as L } from "unsplash-js";
|
|
6
|
+
import { h as F, bp as K, b8 as U, b9 as V, ba as O, az as C, aA as P, aB as S, aC as A, aD as h, br as Q, B as H } from "./index-uLn8W3eR.js";
|
|
7
|
+
import { useDebouncedState as R } from "@react-hookz/web";
|
|
8
8
|
import { Loader as $ } from "lucide-react";
|
|
9
9
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
10
|
-
import "clsx";
|
|
11
|
-
import "react-dom";
|
|
12
|
-
import "@radix-ui/react-scroll-area";
|
|
13
|
-
import "@floating-ui/react-dom";
|
|
14
|
-
import "jotai";
|
|
15
|
-
import "i18next";
|
|
16
|
-
import "react-i18next";
|
|
17
|
-
import "flagged";
|
|
18
|
-
import "./MODIFIERS-fd5XOmum.js";
|
|
19
|
-
import "./Functions-7jnEwJyw.js";
|
|
20
|
-
import "tailwind-merge";
|
|
21
|
-
import "@chaibuilder/runtime";
|
|
22
|
-
import "tree-model";
|
|
23
|
-
import "./utils-VpVqnC9m.js";
|
|
24
10
|
import "@radix-ui/react-toggle";
|
|
25
11
|
import "class-variance-authority";
|
|
12
|
+
import "./utils-VpVqnC9m.js";
|
|
13
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
14
|
+
import "clsx";
|
|
15
|
+
import "tailwind-merge";
|
|
26
16
|
import "@radix-ui/react-switch";
|
|
27
17
|
import "@radix-ui/react-slot";
|
|
28
18
|
import "@radix-ui/react-accordion";
|
|
29
19
|
import "@radix-ui/react-alert-dialog";
|
|
30
20
|
import "@radix-ui/react-dialog";
|
|
31
21
|
import "@radix-ui/react-label";
|
|
22
|
+
import "@radix-ui/react-scroll-area";
|
|
32
23
|
import "@radix-ui/react-tabs";
|
|
33
24
|
import "@radix-ui/react-tooltip";
|
|
34
25
|
import "@radix-ui/react-popover";
|
|
@@ -41,32 +32,36 @@ import "@radix-ui/react-toast";
|
|
|
41
32
|
import "cmdk";
|
|
42
33
|
import "@radix-ui/react-context-menu";
|
|
43
34
|
import "react-icons-picker";
|
|
35
|
+
import "react-dom";
|
|
44
36
|
import "react-quill";
|
|
45
|
-
import "
|
|
46
|
-
import "
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
import "./Functions-7jnEwJyw.js";
|
|
38
|
+
import "@chaibuilder/runtime";
|
|
39
|
+
import "jotai";
|
|
40
|
+
import "tree-model";
|
|
41
|
+
import "react-i18next";
|
|
42
|
+
const I = async (x, g) => new Promise((o, r) => {
|
|
43
|
+
L({ accessKey: g }).search.getPhotos(x).then((i) => {
|
|
49
44
|
o(i);
|
|
50
45
|
}).catch((i) => r(i));
|
|
51
|
-
}),
|
|
52
|
-
const o = F("unsplashAccessKey", ""), [r, j] = p([]), [i, v] = p(0), [l,
|
|
46
|
+
}), _e = ({ isModalView: x, onSelect: g }) => {
|
|
47
|
+
const o = F("unsplashAccessKey", ""), [r, j] = p([]), [i, v] = p(0), [l, k] = p(), [n, q] = p(), [z, y] = p(0), [u, D] = R("", 1e3), [f, c] = p(!1), T = async (s) => {
|
|
53
48
|
if (d(u))
|
|
54
49
|
return;
|
|
55
50
|
let t = i + 1;
|
|
56
51
|
s && (s.preventDefault(), t = 1), c(!0), v(t);
|
|
57
52
|
const m = { query: u, page: t };
|
|
58
|
-
l && (m.orientation = l), n && (m.color = n),
|
|
59
|
-
var
|
|
60
|
-
j(t === 1 ? ((
|
|
53
|
+
l && (m.orientation = l), n && (m.color = n), I(m, o).then((a) => {
|
|
54
|
+
var b, N, w;
|
|
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);
|
|
61
56
|
}).catch(() => {
|
|
62
57
|
c(!1);
|
|
63
58
|
});
|
|
64
59
|
};
|
|
65
|
-
return
|
|
60
|
+
return _(() => {
|
|
66
61
|
if (!d(u) && o) {
|
|
67
62
|
c(!0);
|
|
68
63
|
const s = { query: u, page: 1 };
|
|
69
|
-
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) => {
|
|
70
65
|
var m, a;
|
|
71
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);
|
|
72
67
|
}).catch(() => {
|
|
@@ -94,21 +89,21 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
94
89
|
name: "query",
|
|
95
90
|
className: "input",
|
|
96
91
|
placeholder: 'Try "dog" or "apple"',
|
|
97
|
-
onChange: (s) =>
|
|
92
|
+
onChange: (s) => D(s.target.value)
|
|
98
93
|
}
|
|
99
94
|
),
|
|
100
|
-
/* @__PURE__ */ e.jsxs(
|
|
101
|
-
/* @__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(E, {}) }),
|
|
102
97
|
/* @__PURE__ */ e.jsx(
|
|
103
|
-
|
|
98
|
+
O,
|
|
104
99
|
{
|
|
105
100
|
side: x ? "bottom" : "right",
|
|
106
101
|
className: "z-[9999] flex w-max items-center justify-center",
|
|
107
102
|
children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
108
103
|
/* @__PURE__ */ e.jsx("div", { className: "py-1 text-sm font-medium", children: "Orientation" }),
|
|
109
|
-
/* @__PURE__ */ e.jsxs(
|
|
110
|
-
/* @__PURE__ */ e.jsx(
|
|
111
|
-
/* @__PURE__ */ e.jsxs(
|
|
104
|
+
/* @__PURE__ */ e.jsxs(C, { defaultValue: l, onValueChange: (s) => k(s), children: [
|
|
105
|
+
/* @__PURE__ */ e.jsx(P, { className: "h-auto w-40 p-1 px-3", children: /* @__PURE__ */ e.jsx(S, { placeholder: "Select" }) }),
|
|
106
|
+
/* @__PURE__ */ e.jsxs(A, { className: "z-[9999]", children: [
|
|
112
107
|
/* @__PURE__ */ e.jsx(h, { value: "", children: "All" }),
|
|
113
108
|
/* @__PURE__ */ e.jsx(h, { value: "landscape", children: "Landscape" }),
|
|
114
109
|
/* @__PURE__ */ e.jsx(h, { value: "portrait", children: "Portrait" }),
|
|
@@ -116,9 +111,9 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
116
111
|
] })
|
|
117
112
|
] }),
|
|
118
113
|
/* @__PURE__ */ e.jsx("div", { className: "pb-1 pt-2 text-sm font-medium", children: "Color" }),
|
|
119
|
-
/* @__PURE__ */ e.jsxs(
|
|
120
|
-
/* @__PURE__ */ e.jsx(
|
|
121
|
-
/* @__PURE__ */ e.jsxs(
|
|
114
|
+
/* @__PURE__ */ e.jsxs(C, { defaultValue: n, onValueChange: (s) => q(s), children: [
|
|
115
|
+
/* @__PURE__ */ e.jsx(P, { className: "h-auto w-40 p-1 px-3", children: /* @__PURE__ */ e.jsx(S, { placeholder: "Select" }) }),
|
|
116
|
+
/* @__PURE__ */ e.jsxs(A, { className: "z-[9999]", children: [
|
|
122
117
|
/* @__PURE__ */ e.jsx(h, { value: "", children: "All" }),
|
|
123
118
|
[
|
|
124
119
|
"black_and_white",
|
|
@@ -132,7 +127,7 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
132
127
|
"green",
|
|
133
128
|
"teal",
|
|
134
129
|
"blue"
|
|
135
|
-
].map((s) => /* @__PURE__ */ e.jsx(h, { value: s, children:
|
|
130
|
+
].map((s) => /* @__PURE__ */ e.jsx(h, { value: s, children: B(s) }, s))
|
|
136
131
|
] })
|
|
137
132
|
] })
|
|
138
133
|
] })
|
|
@@ -141,7 +136,7 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
141
136
|
] })
|
|
142
137
|
] }),
|
|
143
138
|
/* @__PURE__ */ e.jsxs(
|
|
144
|
-
|
|
139
|
+
Q,
|
|
145
140
|
{
|
|
146
141
|
className: `h-full ${x && !d(r) ? "-mx-2 flex flex-wrap px-2" : "-mx-2 flex flex-col pb-8 pt-2"}`,
|
|
147
142
|
children: [
|
|
@@ -182,12 +177,12 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
182
177
|
" Loading..."
|
|
183
178
|
] }),
|
|
184
179
|
!d(r) && i < z && !f && /* @__PURE__ */ e.jsx(
|
|
185
|
-
|
|
180
|
+
H,
|
|
186
181
|
{
|
|
187
182
|
size: "sm",
|
|
188
183
|
variant: "link",
|
|
189
184
|
className: "w-full",
|
|
190
|
-
onClick: () =>
|
|
185
|
+
onClick: () => T(void 0),
|
|
191
186
|
disabled: f,
|
|
192
187
|
children: f ? "" : "Load More"
|
|
193
188
|
}
|
|
@@ -198,6 +193,6 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
198
193
|
] });
|
|
199
194
|
};
|
|
200
195
|
export {
|
|
201
|
-
|
|
202
|
-
|
|
196
|
+
_e as default,
|
|
197
|
+
I as fetchImage
|
|
203
198
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),o=require("react"),l=require("lodash-es"),C=require("@radix-ui/react-icons"),k=require("unsplash-js"),t=require("./index-0FIxW0gR.cjs"),A=require("@react-hookz/web"),T=require("lucide-react");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-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("tree-model");require("react-i18next");const g=async(d,E)=>new Promise((a,n)=>{k.createApi({accessKey:E}).search.getPhotos(d).then(c=>{a(c)}).catch(c=>n(c))}),z=({isModalView:d,onSelect:E})=>{const a=t.useBuilderProp("unsplashAccessKey",""),[n,f]=o.useState([]),[c,q]=o.useState(0),[u,S]=o.useState(),[x,b]=o.useState(),[I,R]=o.useState(0),[j,w]=A.useDebouncedState("",1e3),[h,m]=o.useState(!1),P=async s=>{if(l.isEmpty(j))return;let i=c+1;s&&(s.preventDefault(),i=1),m(!0),q(i);const p={query:j,page:i};u&&(p.orientation=u),x&&(p.color=x),g(p,a).then(r=>{var y,v,N;f(i===1?((y=r==null?void 0:r.response)==null?void 0:y.results)||[]:[...n,...((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 o.useEffect(()=>{if(!l.isEmpty(j)&&a){m(!0);const s={query:j,page:1};u&&(s.orientation=u),x&&(s.color=x),q(1),g(s,a).then(i=>{var p,r;f(((p=i==null?void 0:i.response)==null?void 0:p.results)||[]),R((r=i==null?void 0:i.response)==null?void 0:r.total_pages),m(!1)}).catch(()=>{m(!1)})}},[u,x,j,a]),l.isEmpty(a)?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:l.startCase(s)},s))]})]})]})})]})]}),e.jsxRuntimeExports.jsxs(t.ScrollArea,{className:`h-full ${d&&!l.isEmpty(n)?"-mx-2 flex flex-wrap px-2":"-mx-2 flex flex-col pb-8 pt-2"}`,children:[l.isEmpty(n)&&!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:n.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))}):n.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..."]}),!l.isEmpty(n)&&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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),s=require("react"),l=require("lodash-es"),m=require("@radix-ui/react-icons"),E=require("jotai"),p=require("./index-0FIxW0gR.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-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("@react-hookz/web");require("tree-model");require("react-i18next");const N=E.atom([]),I=({isModalView:t,onSelect:a})=>{const j=p.useBuilderProp("uploadMediaCallback"),u=p.useBuilderProp("fetchMediaCallback"),[i,x]=E.useAtom(N),[n,f]=s.useState(!1),[h,g]=s.useState(!1),[c,d]=s.useState(),[b,R]=s.useState("");s.useEffect(()=>{(async()=>{if(!u)return;g(!0);const r=await u();x(r||[]),g(!1)})()},[]);const v=r=>{var o,q;r&&((q=(o=r==null?void 0:r.target)==null?void 0:o.files)==null?void 0:q.length)>0&&d(r.target.files[0])},y=async()=>{if(j){f(!0);try{const{url:r}=await j(c);a(r),d(void 0);const o=await u();x(o)}catch(r){x([]),R((r==null?void 0:r.message)||"Something went wrong.")}f(!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 max-h-96 w-full max-w-sm rounded-md object-contain"}),b&&e.jsxRuntimeExports.jsx("div",{className:"w-full pt-2 text-center text-sm text-red-500",children:b}),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:n,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:[n?e.jsxRuntimeExports.jsx(m.GearIcon,{className:"animate-spin"}):e.jsxRuntimeExports.jsx(m.UploadIcon,{className:"animate-bounce"})," ",n?"Uploading...":"Upload"]}),!n&&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:[l.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..."})}),l.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:l.map(i,r=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>a(r.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:r.name,src:r.thumbUrl})})},r.id))}):l.map(i,r=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"px-2 py-1",onClick:()=>a(r.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:r.name,src:r.url})})},r.id))]})]})};exports.default=I;
|
|
@@ -1,32 +1,23 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as i, useEffect as w } from "react";
|
|
3
3
|
import { isEmpty as b, map as j } from "lodash-es";
|
|
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 { h as v,
|
|
6
|
+
import { h as v, br as A } from "./index-uLn8W3eR.js";
|
|
7
7
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
8
|
-
import "clsx";
|
|
9
|
-
import "react-dom";
|
|
10
|
-
import "@radix-ui/react-scroll-area";
|
|
11
|
-
import "@floating-ui/react-dom";
|
|
12
|
-
import "i18next";
|
|
13
|
-
import "react-i18next";
|
|
14
|
-
import "flagged";
|
|
15
|
-
import "./MODIFIERS-fd5XOmum.js";
|
|
16
|
-
import "./Functions-7jnEwJyw.js";
|
|
17
|
-
import "tailwind-merge";
|
|
18
|
-
import "@chaibuilder/runtime";
|
|
19
|
-
import "@react-hookz/web";
|
|
20
|
-
import "tree-model";
|
|
21
|
-
import "./utils-VpVqnC9m.js";
|
|
22
8
|
import "@radix-ui/react-toggle";
|
|
23
9
|
import "class-variance-authority";
|
|
10
|
+
import "./utils-VpVqnC9m.js";
|
|
11
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
12
|
+
import "clsx";
|
|
13
|
+
import "tailwind-merge";
|
|
24
14
|
import "@radix-ui/react-switch";
|
|
25
15
|
import "@radix-ui/react-slot";
|
|
26
16
|
import "@radix-ui/react-accordion";
|
|
27
17
|
import "@radix-ui/react-alert-dialog";
|
|
28
18
|
import "@radix-ui/react-dialog";
|
|
29
19
|
import "@radix-ui/react-label";
|
|
20
|
+
import "@radix-ui/react-scroll-area";
|
|
30
21
|
import "@radix-ui/react-tabs";
|
|
31
22
|
import "@radix-ui/react-tooltip";
|
|
32
23
|
import "@radix-ui/react-popover";
|
|
@@ -39,34 +30,37 @@ import "@radix-ui/react-toast";
|
|
|
39
30
|
import "cmdk";
|
|
40
31
|
import "@radix-ui/react-context-menu";
|
|
41
32
|
import "react-icons-picker";
|
|
33
|
+
import "react-dom";
|
|
42
34
|
import "react-quill";
|
|
43
|
-
import "
|
|
44
|
-
import "
|
|
45
|
-
import "
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
import "./Functions-7jnEwJyw.js";
|
|
36
|
+
import "@chaibuilder/runtime";
|
|
37
|
+
import "@react-hookz/web";
|
|
38
|
+
import "tree-model";
|
|
39
|
+
import "react-i18next";
|
|
40
|
+
const R = F([]), ge = ({ isModalView: r, onSelect: a }) => {
|
|
41
|
+
const p = v("uploadMediaCallback"), n = v("fetchMediaCallback"), [s, m] = E(R), [o, u] = i(!1), [x, f] = i(!1), [d, c] = i(), [h, y] = i("");
|
|
48
42
|
w(() => {
|
|
49
43
|
(async () => {
|
|
50
|
-
if (!
|
|
44
|
+
if (!n)
|
|
51
45
|
return;
|
|
52
46
|
f(!0);
|
|
53
|
-
const t = await
|
|
54
|
-
|
|
47
|
+
const t = await n();
|
|
48
|
+
m(t || []), f(!1);
|
|
55
49
|
})();
|
|
56
50
|
}, []);
|
|
57
51
|
const N = (t) => {
|
|
58
|
-
var
|
|
59
|
-
t && ((g = (
|
|
52
|
+
var l, g;
|
|
53
|
+
t && ((g = (l = t == null ? void 0 : t.target) == null ? void 0 : l.files) == null ? void 0 : g.length) > 0 && c(t.target.files[0]);
|
|
60
54
|
}, I = async () => {
|
|
61
55
|
if (p) {
|
|
62
56
|
u(!0);
|
|
63
57
|
try {
|
|
64
58
|
const { url: t } = await p(d);
|
|
65
59
|
a(t), c(void 0);
|
|
66
|
-
const
|
|
67
|
-
|
|
60
|
+
const l = await n();
|
|
61
|
+
m(l);
|
|
68
62
|
} catch (t) {
|
|
69
|
-
|
|
63
|
+
m([]), y((t == null ? void 0 : t.message) || "Something went wrong.");
|
|
70
64
|
}
|
|
71
65
|
u(!1);
|
|
72
66
|
}
|
|
@@ -88,16 +82,16 @@ const R = F([]), Ie = ({ isModalView: r, onSelect: a }) => {
|
|
|
88
82
|
{
|
|
89
83
|
type: "button",
|
|
90
84
|
onClick: I,
|
|
91
|
-
disabled:
|
|
85
|
+
disabled: o,
|
|
92
86
|
className: "flex items-center rounded-full bg-blue-500 px-3 py-1 text-sm text-white hover:bg-blue-600 hover:text-white",
|
|
93
87
|
children: [
|
|
94
|
-
|
|
88
|
+
o ? /* @__PURE__ */ e.jsx(C, { className: "animate-spin" }) : /* @__PURE__ */ e.jsx(U, { className: "animate-bounce" }),
|
|
95
89
|
" ",
|
|
96
|
-
|
|
90
|
+
o ? "Uploading..." : "Upload"
|
|
97
91
|
]
|
|
98
92
|
}
|
|
99
93
|
),
|
|
100
|
-
!
|
|
94
|
+
!o && /* @__PURE__ */ e.jsxs(
|
|
101
95
|
"button",
|
|
102
96
|
{
|
|
103
97
|
type: "button",
|
|
@@ -118,16 +112,16 @@ const R = F([]), Ie = ({ isModalView: r, onSelect: a }) => {
|
|
|
118
112
|
/* @__PURE__ */ e.jsx("input", { type: "file", id: r ? "upload-in-modal" : "upload-in-panel", hidden: !0, onChange: N })
|
|
119
113
|
] }),
|
|
120
114
|
/* @__PURE__ */ e.jsxs(A, { className: `-mx-2 flex h-full flex-col pb-8 pt-2 ${r ? "px-2" : ""} pt-2`, children: [
|
|
121
|
-
b(
|
|
122
|
-
b(
|
|
123
|
-
r ? /* @__PURE__ */ e.jsx("div", { className: "h-full columns-5 py-2", children: j(
|
|
115
|
+
b(s) && x && /* @__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..." }) }),
|
|
116
|
+
b(s) && !x && /* @__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" }) }),
|
|
117
|
+
r ? /* @__PURE__ */ e.jsx("div", { className: "h-full columns-5 py-2", children: j(s, (t) => /* @__PURE__ */ e.jsx("div", { role: "button", tabIndex: 0, className: "my-1 flex", onClick: () => a(t.url), children: /* @__PURE__ */ e.jsx("div", { className: "relative overflow-hidden rounded-md bg-cover bg-no-repeat", children: /* @__PURE__ */ e.jsx(
|
|
124
118
|
"img",
|
|
125
119
|
{
|
|
126
120
|
className: "h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",
|
|
127
121
|
alt: t.name,
|
|
128
122
|
src: t.thumbUrl
|
|
129
123
|
}
|
|
130
|
-
) }) }, t.id)) }) : j(
|
|
124
|
+
) }) }, t.id)) }) : j(s, (t) => (
|
|
131
125
|
// TODO: Drag and Drop Image to Canvas from Here use `pic.url` for image quality
|
|
132
126
|
/* @__PURE__ */ e.jsx("div", { role: "button", tabIndex: 0, className: "px-2 py-1", onClick: () => a(t.url), children: /* @__PURE__ */ e.jsx("div", { className: "relative overflow-hidden rounded-md bg-cover bg-no-repeat", children: /* @__PURE__ */ e.jsx(
|
|
133
127
|
"img",
|
|
@@ -142,5 +136,5 @@ const R = F([]), Ie = ({ isModalView: r, onSelect: a }) => {
|
|
|
142
136
|
] });
|
|
143
137
|
};
|
|
144
138
|
export {
|
|
145
|
-
|
|
139
|
+
ge as default
|
|
146
140
|
};
|
|
@@ -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-0FIxW0gR.cjs"),g=require("./controls-rRZhz0vu.cjs"),R=require("./form-G3PqS2Gc.cjs"),f=require("./index-7zSzDmAA.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-5IJnVFyU.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("lucide-react");require("./index--mLLy7QQ.cjs");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,28 +1,17 @@
|
|
|
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 { av as C, B as u, au as b, aE as A } from "./index-uLn8W3eR.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-MSL4CDff.js";
|
|
7
|
+
import { e as N } from "./index-b4Wjumon.js";
|
|
8
8
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
|
-
import "clsx";
|
|
10
|
-
import "react-dom";
|
|
11
|
-
import "@radix-ui/react-scroll-area";
|
|
12
|
-
import "@floating-ui/react-dom";
|
|
13
|
-
import "jotai";
|
|
14
|
-
import "i18next";
|
|
15
|
-
import "react-i18next";
|
|
16
|
-
import "flagged";
|
|
17
|
-
import "./MODIFIERS-fd5XOmum.js";
|
|
18
|
-
import "./Functions-7jnEwJyw.js";
|
|
19
|
-
import "tailwind-merge";
|
|
20
|
-
import "@chaibuilder/runtime";
|
|
21
|
-
import "@react-hookz/web";
|
|
22
|
-
import "tree-model";
|
|
23
|
-
import "./utils-VpVqnC9m.js";
|
|
24
9
|
import "@radix-ui/react-toggle";
|
|
25
10
|
import "class-variance-authority";
|
|
11
|
+
import "./utils-VpVqnC9m.js";
|
|
12
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
13
|
+
import "clsx";
|
|
14
|
+
import "tailwind-merge";
|
|
26
15
|
import "@radix-ui/react-switch";
|
|
27
16
|
import "@radix-ui/react-slot";
|
|
28
17
|
import "@radix-ui/react-accordion";
|
|
@@ -30,6 +19,7 @@ import "@radix-ui/react-icons";
|
|
|
30
19
|
import "@radix-ui/react-alert-dialog";
|
|
31
20
|
import "@radix-ui/react-dialog";
|
|
32
21
|
import "@radix-ui/react-label";
|
|
22
|
+
import "@radix-ui/react-scroll-area";
|
|
33
23
|
import "@radix-ui/react-tabs";
|
|
34
24
|
import "@radix-ui/react-tooltip";
|
|
35
25
|
import "@radix-ui/react-popover";
|
|
@@ -42,17 +32,28 @@ import "@radix-ui/react-toast";
|
|
|
42
32
|
import "cmdk";
|
|
43
33
|
import "@radix-ui/react-context-menu";
|
|
44
34
|
import "react-icons-picker";
|
|
35
|
+
import "react-dom";
|
|
45
36
|
import "react-quill";
|
|
37
|
+
import "./Functions-7jnEwJyw.js";
|
|
38
|
+
import "@chaibuilder/runtime";
|
|
39
|
+
import "jotai";
|
|
40
|
+
import "@react-hookz/web";
|
|
41
|
+
import "tree-model";
|
|
42
|
+
import "react-i18next";
|
|
43
|
+
import "@rjsf/core";
|
|
44
|
+
import "@rjsf/validator-ajv8";
|
|
45
|
+
import "./index-grcmKbfu.js";
|
|
46
|
+
import "i18next";
|
|
47
|
+
import "@floating-ui/react-dom";
|
|
48
|
+
import "flagged";
|
|
46
49
|
import "react-hotkeys-hook";
|
|
47
50
|
import "lucide-react";
|
|
48
51
|
import "./index-VBXQixVm.js";
|
|
49
|
-
import "@rjsf/core";
|
|
50
|
-
import "@rjsf/validator-ajv8";
|
|
51
|
-
import "./core.js";
|
|
52
52
|
import "sonner";
|
|
53
|
-
import "./html-to-json-
|
|
53
|
+
import "./html-to-json-_01DXd-a.js";
|
|
54
54
|
import "himalaya";
|
|
55
|
-
|
|
55
|
+
import "lodash";
|
|
56
|
+
const v = ({ closeModal: e }) => {
|
|
56
57
|
var a, s;
|
|
57
58
|
const i = N(), [o, f] = c({
|
|
58
59
|
name: "",
|
|
@@ -79,7 +80,7 @@ const S = ({ closeModal: e }) => {
|
|
|
79
80
|
}),
|
|
80
81
|
slug: g({ title: "Page Slug", default: o.slug })
|
|
81
82
|
};
|
|
82
|
-
return /* @__PURE__ */ t.jsxs(
|
|
83
|
+
return /* @__PURE__ */ t.jsxs(C, { children: [
|
|
83
84
|
/* @__PURE__ */ t.jsx("div", { className: "px-1 font-bold", children: "Add Page" }),
|
|
84
85
|
/* @__PURE__ */ t.jsx(D, { formData: o, properties: P, onChange: h, disabled: i.isPending }),
|
|
85
86
|
/* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ t.jsx(
|
|
@@ -92,13 +93,13 @@ const S = ({ closeModal: e }) => {
|
|
|
92
93
|
}
|
|
93
94
|
) })
|
|
94
95
|
] });
|
|
95
|
-
},
|
|
96
|
+
}, Mt = () => {
|
|
96
97
|
const [e, i] = c(!1);
|
|
97
|
-
return /* @__PURE__ */ t.jsxs(
|
|
98
|
+
return /* @__PURE__ */ t.jsxs(b, { open: e, onOpenChange: () => i(!e), children: [
|
|
98
99
|
/* @__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" }) }),
|
|
99
|
-
e && /* @__PURE__ */ t.jsx(
|
|
100
|
+
e && /* @__PURE__ */ t.jsx(v, { closeModal: () => i(!e) })
|
|
100
101
|
] });
|
|
101
102
|
};
|
|
102
103
|
export {
|
|
103
|
-
|
|
104
|
+
Mt as default
|
|
104
105
|
};
|
|
@@ -1,25 +1,14 @@
|
|
|
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 "./
|
|
2
|
+
import { A as a, b as n, d as c, e as x, g as d, B as j } from "./index-uLn8W3eR.js";
|
|
3
3
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "@floating-ui/react-dom";
|
|
9
|
-
import "jotai";
|
|
10
|
-
import "i18next";
|
|
11
|
-
import "react-i18next";
|
|
12
|
-
import "flagged";
|
|
5
|
+
import "@radix-ui/react-toggle";
|
|
6
|
+
import "class-variance-authority";
|
|
7
|
+
import "./utils-VpVqnC9m.js";
|
|
13
8
|
import "lodash-es";
|
|
14
9
|
import "./MODIFIERS-fd5XOmum.js";
|
|
15
|
-
import "
|
|
10
|
+
import "clsx";
|
|
16
11
|
import "tailwind-merge";
|
|
17
|
-
import "@chaibuilder/runtime";
|
|
18
|
-
import "@react-hookz/web";
|
|
19
|
-
import "tree-model";
|
|
20
|
-
import "./utils-VpVqnC9m.js";
|
|
21
|
-
import "@radix-ui/react-toggle";
|
|
22
|
-
import "class-variance-authority";
|
|
23
12
|
import "@radix-ui/react-switch";
|
|
24
13
|
import "@radix-ui/react-slot";
|
|
25
14
|
import "@radix-ui/react-accordion";
|
|
@@ -27,6 +16,7 @@ import "@radix-ui/react-icons";
|
|
|
27
16
|
import "@radix-ui/react-alert-dialog";
|
|
28
17
|
import "@radix-ui/react-dialog";
|
|
29
18
|
import "@radix-ui/react-label";
|
|
19
|
+
import "@radix-ui/react-scroll-area";
|
|
30
20
|
import "@radix-ui/react-tabs";
|
|
31
21
|
import "@radix-ui/react-tooltip";
|
|
32
22
|
import "@radix-ui/react-popover";
|
|
@@ -39,11 +29,15 @@ import "@radix-ui/react-toast";
|
|
|
39
29
|
import "cmdk";
|
|
40
30
|
import "@radix-ui/react-context-menu";
|
|
41
31
|
import "react-icons-picker";
|
|
32
|
+
import "react-dom";
|
|
42
33
|
import "react-quill";
|
|
43
|
-
import "
|
|
44
|
-
import "
|
|
45
|
-
import "
|
|
46
|
-
|
|
34
|
+
import "./Functions-7jnEwJyw.js";
|
|
35
|
+
import "@chaibuilder/runtime";
|
|
36
|
+
import "jotai";
|
|
37
|
+
import "@react-hookz/web";
|
|
38
|
+
import "tree-model";
|
|
39
|
+
import "react-i18next";
|
|
40
|
+
const ii = ({
|
|
47
41
|
open: o,
|
|
48
42
|
onCancel: m = () => {
|
|
49
43
|
},
|
|
@@ -62,5 +56,5 @@ const ei = ({
|
|
|
62
56
|
] })
|
|
63
57
|
] }) });
|
|
64
58
|
export {
|
|
65
|
-
|
|
59
|
+
ii as default
|
|
66
60
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("./index-0FIxW0gR.cjs");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-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");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 e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-5IJnVFyU.cjs"),e=require("./index-0FIxW0gR.cjs"),r=require("react-i18next");require("i18next");require("./jsx-runtime-Z_BpKhVy.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("flagged");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@radix-ui/react-icons");require("react-hotkeys-hook");require("@chaibuilder/runtime");require("@react-hookz/web");require("lucide-react");require("./index--mLLy7QQ.cjs");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.ChaiBuilderEditor=s.ChaiBuilderEditor;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});
|