@chaibuilder/sdk 1.2.38 → 1.2.39
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-2_dpKDpp.js +144 -0
- package/dist/AddBlocks-p4Hrxjdf.cjs +1 -0
- package/dist/{CanvasArea-WJYJtUFt.js → CanvasArea-iN0LxF74.js} +183 -184
- package/dist/{CanvasArea-MuuWWyW0.cjs → CanvasArea-sbec3R-f.cjs} +5 -5
- package/dist/{ChaiBuilderEditor-vzyVasJe.js → ChaiBuilderEditor-JnZFji5_.js} +8191 -8073
- package/dist/{ChaiBuilderEditor-PLQ8Sq34.cjs → ChaiBuilderEditor-qxbkVVLu.cjs} +49 -49
- package/dist/{CurrentPage-j6xVMVFH.js → CurrentPage-Lr3ztuMx.js} +9 -10
- package/dist/CurrentPage-m7_GkZ8a.cjs +1 -0
- package/dist/ListTree-piETqoz9.cjs +1 -0
- package/dist/{ListTree-1oWz6vwo.js → ListTree-uJFhqUk9.js} +1 -2
- package/dist/{PagesPanel-PKnqTla9.js → PagesPanel-R8FWg5Xg.js} +4 -5
- package/dist/PagesPanel-lShO3SmJ.cjs +1 -0
- package/dist/{ProjectPanel-hx21JHK8.js → ProjectPanel-2dX4bM5q.js} +5 -6
- package/dist/ProjectPanel-_4546hym.cjs +1 -0
- package/dist/{Settings-3omes6Yj.js → Settings-J785mqWv.js} +4 -5
- package/dist/Settings-e2AZkjqY.cjs +1 -0
- package/dist/SidePanels-Vfw9Ir6p.cjs +1 -0
- package/dist/{SidePanels-vNc0pvVt.js → SidePanels-cN9er64h.js} +165 -146
- package/dist/{BrandingOptions-z7hXgff2.js → ThemeConfiguration-m_jkR2zi.js} +42 -41
- package/dist/ThemeConfiguration-nler1cz3.cjs +1 -0
- package/dist/Topbar-DmIPkF8D.cjs +1 -0
- package/dist/{Topbar-c3HIPa_q.js → Topbar-gaBycI3a.js} +3 -4
- package/dist/UILibrariesPanel-Igx0R4zc.js +138 -0
- package/dist/UILibrariesPanel-N144UO0E.cjs +1 -0
- package/dist/{UnsplashImages-IQo081nF.js → UnsplashImages-6HmGnetM.js} +3 -4
- package/dist/UnsplashImages-mC2ewX9D.cjs +1 -0
- package/dist/UploadImages-fo9ufcCE.cjs +1 -0
- package/dist/{UploadImages-BAy3wsRT.js → UploadImages-qRW8zhKj.js} +3 -4
- package/dist/{add-page-modal-WWRdRyDM.js → add-page-modal-0OuVNgx3.js} +16 -17
- package/dist/add-page-modal-mP9aTfG9.cjs +1 -0
- package/dist/{confirm-alert-LvvLsCWh.cjs → confirm-alert-3cDnni4v.cjs} +1 -1
- package/dist/{confirm-alert-h4RiwjkJ.js → confirm-alert-Mv-Iofef.js} +3 -4
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +3 -0
- package/dist/core.js +44 -45
- package/dist/{delete-page-modal-XymJxo7r.js → delete-page-modal-BVz9nreM.js} +4 -5
- package/dist/delete-page-modal-PTwcrTET.cjs +1 -0
- package/dist/email.cjs +1 -1
- package/dist/email.d.ts +3 -0
- package/dist/email.js +3 -4
- package/dist/{form-P0nEC3WH.js → form-e8l4xtI9.js} +1 -1
- package/dist/{form-I4uC5vkq.cjs → form-o7e6NNTk.cjs} +1 -1
- package/dist/{index-mVQVs_cP.cjs → index--XTVdy1h.cjs} +1 -1
- package/dist/{index-SP6aKHPH.js → index-CdnwVCXv.js} +2 -2
- package/dist/{page-viewer-OSlqdbEV.js → page-viewer-OopsJHBE.js} +5 -6
- package/dist/page-viewer-cjvx3lg7.cjs +1 -0
- package/dist/{project-general-setting-JR9L7fMQ.cjs → project-general-setting-3sdmeYrS.cjs} +1 -1
- package/dist/{project-general-setting-LXfl5i5Z.js → project-general-setting-n8KKf8qD.js} +5 -6
- package/dist/{project-seo-setting-cVDCPjBD.cjs → project-seo-setting-E554FQ3V.cjs} +1 -1
- package/dist/{project-seo-setting-lyzUUxe2.js → project-seo-setting-pu3qUSE0.js} +4 -5
- package/dist/single-page-detail-KdxEu4WS.cjs +1 -0
- package/dist/{single-page-detail-GeG-SXWn.js → single-page-detail-hcTkta3X.js} +6 -7
- package/dist/studio.cjs +1 -1
- package/dist/studio.d.ts +3 -0
- package/dist/studio.js +3 -4
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +138 -139
- package/dist/{useCanvasSettings-_EzUaA9P.js → useCanvasSettings-6lwRwexD.js} +1 -1
- package/dist/{useCanvasSettings-bP_V0UR2.cjs → useCanvasSettings-oERGzYXb.cjs} +1 -1
- package/package.json +2 -2
- package/dist/AddBlocks-G9pjsIyq.cjs +0 -1
- package/dist/AddBlocks-dljjAE5r.js +0 -210
- package/dist/BrandingOptions-N7iDaMgM.cjs +0 -1
- package/dist/CurrentPage-LaeYQ-Ke.cjs +0 -1
- package/dist/ListTree-_7e5p_e3.cjs +0 -1
- package/dist/PagesPanel-BsELxMie.cjs +0 -1
- package/dist/ProjectPanel-1aAFwguw.cjs +0 -1
- package/dist/Settings-tYjuuUgX.cjs +0 -1
- package/dist/SidePanels-7WG6SXw0.cjs +0 -1
- package/dist/Topbar-1zU6Ljsn.cjs +0 -1
- package/dist/UnsplashImages-zCQkmow-.cjs +0 -1
- package/dist/UploadImages-6K3GdM-b.cjs +0 -1
- package/dist/add-page-modal-8FJnOckX.cjs +0 -1
- package/dist/delete-page-modal-IRX0oKZJ.cjs +0 -1
- package/dist/page-viewer-fonOyiuT.cjs +0 -1
- package/dist/single-page-detail-LL8m0Va7.cjs +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { KeyboardIcon as
|
|
3
|
-
import
|
|
4
|
-
import { useAtom as
|
|
5
|
-
import { filter as
|
|
6
|
-
import { Z as
|
|
7
|
-
import { ListTreeIcon as
|
|
8
|
-
import { getChaiDataProviders as
|
|
9
|
-
import { useTranslation as
|
|
10
|
-
import { J as
|
|
2
|
+
import { KeyboardIcon as q, PlusIcon as E, Component2Icon as G } from "@radix-ui/react-icons";
|
|
3
|
+
import f, { useState as h, useEffect as Q, useMemo as X, memo as ee, lazy as v, Suspense as N } from "react";
|
|
4
|
+
import { useAtom as H } from "jotai";
|
|
5
|
+
import { filter as j, map as z, isNull as se, find as F, isEmpty as R, values as re, each as ae, get as le } from "lodash-es";
|
|
6
|
+
import { Z as J, _ as Z, $ as W, a0 as Y, a1 as ie, a2 as te, A as oe, a as ne, b as ce, c as de, d as me, e as xe, f as he, g as ue, a3 as pe, a4 as fe, a5 as je, a6 as ve, a7 as ge, a8 as be, a9 as Ne, aa as I, ab as ye, ac as we, ad as ke, ae as Ce, af as L, h as y, ag as De, O as Te, B as x, ah as V, ai as O, aj as M, ak as P, al as S } from "./ChaiBuilderEditor-JnZFji5_.js";
|
|
7
|
+
import { ListTreeIcon as B, PaletteIcon as _e, DatabaseIcon as Ae } from "lucide-react";
|
|
8
|
+
import { getChaiDataProviders as Pe, useChaiBlocks as Se } from "@chaibuilder/runtime";
|
|
9
|
+
import { useTranslation as g } from "react-i18next";
|
|
10
|
+
import { J as Be, a as Ke, d as Ee } from "./index-e0c8PmRQ.js";
|
|
11
11
|
import { O as i } from "./STRINGS--j49GZJP.js";
|
|
12
|
-
import { c as
|
|
12
|
+
import { c as ze } from "./Functions-7jnEwJyw.js";
|
|
13
13
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
14
14
|
import "clsx";
|
|
15
15
|
import "react-dom";
|
|
@@ -43,27 +43,26 @@ import "@radix-ui/react-context-menu";
|
|
|
43
43
|
import "react-icons-picker";
|
|
44
44
|
import "react-quill";
|
|
45
45
|
import "react-hotkeys-hook";
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
l("data_provider"),
|
|
46
|
+
const Ie = ({ provider: s, onClose: o }) => {
|
|
47
|
+
const { t: a } = g(), [l, u] = h(null);
|
|
48
|
+
return Q(() => {
|
|
49
|
+
s && (s.mockFn ? s.mockFn : s.dataFn)().then((c) => u(c));
|
|
50
|
+
}, [s]), s ? /* @__PURE__ */ e.jsx(J, { onOpenChange: (m) => m ? "" : o(), defaultOpen: !0, children: /* @__PURE__ */ e.jsxs(Z, { children: [
|
|
51
|
+
/* @__PURE__ */ e.jsxs(W, { children: [
|
|
52
|
+
/* @__PURE__ */ e.jsxs(Y, { children: [
|
|
53
|
+
a("data_provider"),
|
|
55
54
|
": ",
|
|
56
55
|
s.name
|
|
57
56
|
] }),
|
|
58
|
-
/* @__PURE__ */ e.jsx(
|
|
57
|
+
/* @__PURE__ */ e.jsx(ie, { children: s.description })
|
|
59
58
|
] }),
|
|
60
|
-
/* @__PURE__ */ e.jsx(
|
|
61
|
-
|
|
59
|
+
/* @__PURE__ */ e.jsx(te, { children: /* @__PURE__ */ e.jsx(
|
|
60
|
+
Be,
|
|
62
61
|
{
|
|
63
|
-
data:
|
|
64
|
-
shouldExpandNode:
|
|
62
|
+
data: l,
|
|
63
|
+
shouldExpandNode: Ke,
|
|
65
64
|
style: {
|
|
66
|
-
...
|
|
65
|
+
...Ee,
|
|
67
66
|
container: "max-h-[80vh] overflow-y-auto text-[12px] leading-[1.5] tracking-wide font-mono",
|
|
68
67
|
stringValue: "text-orange-600",
|
|
69
68
|
label: "text-green-900 font-semibold pr-1 tracking-wider"
|
|
@@ -72,64 +71,64 @@ const Ae = ({ provider: s, onClose: o }) => {
|
|
|
72
71
|
) })
|
|
73
72
|
] }) }) : null;
|
|
74
73
|
};
|
|
75
|
-
function
|
|
74
|
+
function Le({
|
|
76
75
|
children: s,
|
|
77
76
|
name: o,
|
|
78
|
-
onRemove:
|
|
77
|
+
onRemove: a
|
|
79
78
|
}) {
|
|
80
|
-
const { t:
|
|
81
|
-
return /* @__PURE__ */ e.jsxs(
|
|
82
|
-
/* @__PURE__ */ e.jsx(
|
|
83
|
-
/* @__PURE__ */ e.jsxs(
|
|
84
|
-
/* @__PURE__ */ e.jsxs(
|
|
79
|
+
const { t: l } = g();
|
|
80
|
+
return /* @__PURE__ */ e.jsxs(oe, { children: [
|
|
81
|
+
/* @__PURE__ */ e.jsx(ne, { asChild: !0, children: s }),
|
|
82
|
+
/* @__PURE__ */ e.jsxs(ce, { children: [
|
|
83
|
+
/* @__PURE__ */ e.jsxs(de, { children: [
|
|
85
84
|
/* @__PURE__ */ e.jsx(
|
|
86
|
-
|
|
85
|
+
me,
|
|
87
86
|
{
|
|
88
|
-
dangerouslySetInnerHTML: { __html:
|
|
87
|
+
dangerouslySetInnerHTML: { __html: l("remove_provider_confirmation").replace("{name}", o) }
|
|
89
88
|
}
|
|
90
89
|
),
|
|
91
|
-
/* @__PURE__ */ e.jsx(
|
|
90
|
+
/* @__PURE__ */ e.jsx(xe, { children: l("remove_provider_warning") })
|
|
92
91
|
] }),
|
|
93
|
-
/* @__PURE__ */ e.jsxs(
|
|
94
|
-
/* @__PURE__ */ e.jsx(
|
|
95
|
-
/* @__PURE__ */ e.jsx(
|
|
92
|
+
/* @__PURE__ */ e.jsxs(he, { children: [
|
|
93
|
+
/* @__PURE__ */ e.jsx(ue, { children: l("cancel") }),
|
|
94
|
+
/* @__PURE__ */ e.jsx(pe, { onClick: a, className: "bg-red-600 hover:bg-red-700", children: l("remove") })
|
|
96
95
|
] })
|
|
97
96
|
] })
|
|
98
97
|
] });
|
|
99
98
|
}
|
|
100
|
-
const
|
|
101
|
-
const { t: s } =
|
|
102
|
-
|
|
103
|
-
), [
|
|
104
|
-
o.map((r) =>
|
|
105
|
-
(r) => !
|
|
106
|
-
),
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
return
|
|
99
|
+
const Ve = () => {
|
|
100
|
+
const { t: s } = g(), o = X(() => Pe(), []), [a, l] = fe(), [, u] = H(je), [m, c] = h(
|
|
101
|
+
j(o, (r) => z(a, "providerKey").includes(r.providerKey))
|
|
102
|
+
), [w, p] = h(""), [k, b] = h(null), C = j(
|
|
103
|
+
o.map((r) => z(m, "providerKey").includes(r.providerKey) ? null : { value: r.providerKey, label: r.name }),
|
|
104
|
+
(r) => !se(r)
|
|
105
|
+
), D = (r) => {
|
|
106
|
+
const t = F(o, { providerKey: r });
|
|
107
|
+
c((d) => [...d, t]), l((d) => [...d, { providerKey: t.providerKey, args: {} }]), p(""), u("UNSAVED");
|
|
108
|
+
}, T = (r) => {
|
|
109
|
+
c((t) => j(t, (d) => d.providerKey !== r.providerKey)), l((t) => j(t, (d) => d.providerKey !== r.providerKey)), u("UNSAVED");
|
|
110
|
+
}, _ = (r) => b(r);
|
|
111
|
+
return R(o) ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("p", { className: "mb-1.5 p-4 text-xs text-gray-500", children: [
|
|
113
112
|
s("no_data_providers"),
|
|
114
113
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
115
114
|
/* @__PURE__ */ e.jsx("a", { className: "text-blue-500", href: "https://chaibuilder.com/docs/registering-data-providers", target: "_blank", children: s("learn_more") })
|
|
116
115
|
] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "px-1", children: [
|
|
117
116
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
118
117
|
/* @__PURE__ */ e.jsx("label", { children: /* @__PURE__ */ e.jsx("p", { className: "mb-1.5 text-xs text-gray-500", children: s("add_data_providers") }) }),
|
|
119
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center space-x-1", children: /* @__PURE__ */ e.jsxs(
|
|
120
|
-
/* @__PURE__ */ e.jsx(
|
|
121
|
-
/* @__PURE__ */ e.jsxs(
|
|
122
|
-
/* @__PURE__ */ e.jsx(
|
|
123
|
-
|
|
118
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center space-x-1", children: /* @__PURE__ */ e.jsxs(ve, { value: w, onValueChange: (r) => D(r), children: [
|
|
119
|
+
/* @__PURE__ */ e.jsx(ge, { className: "w-full", children: /* @__PURE__ */ e.jsx(be, { placeholder: s("select_provider") }) }),
|
|
120
|
+
/* @__PURE__ */ e.jsxs(Ne, { children: [
|
|
121
|
+
/* @__PURE__ */ e.jsx(I, { value: "", children: s("choose") }),
|
|
122
|
+
C.map((r) => /* @__PURE__ */ e.jsx(I, { value: r.value, children: r.label }, r.value))
|
|
124
123
|
] })
|
|
125
124
|
] }) }),
|
|
126
125
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
127
|
-
/* @__PURE__ */ e.jsxs("div", { className: `border-t ${
|
|
126
|
+
/* @__PURE__ */ e.jsxs("div", { className: `border-t ${m.length ? "block" : "hidden"}`, children: [
|
|
128
127
|
/* @__PURE__ */ e.jsxs("p", { className: "flex-1 pb-1.5 pt-4 text-xs font-medium text-gray-500", children: [
|
|
129
128
|
s("page_data_providers"),
|
|
130
129
|
":"
|
|
131
130
|
] }),
|
|
132
|
-
/* @__PURE__ */ e.jsx("div", { className: "space-y-2", children:
|
|
131
|
+
/* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: m.map((r) => /* @__PURE__ */ e.jsxs(
|
|
133
132
|
"div",
|
|
134
133
|
{
|
|
135
134
|
className: "w-full rounded-lg border bg-card text-card-foreground shadow-sm",
|
|
@@ -143,7 +142,7 @@ const Pe = () => {
|
|
|
143
142
|
/* @__PURE__ */ e.jsxs(
|
|
144
143
|
"button",
|
|
145
144
|
{
|
|
146
|
-
onClick: () =>
|
|
145
|
+
onClick: () => _(r),
|
|
147
146
|
className: "inline-flex h-9 items-center justify-center rounded-md px-3 text-xs font-medium text-blue-500 underline-offset-4 ring-offset-background transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
148
147
|
children: [
|
|
149
148
|
/* @__PURE__ */ e.jsxs(
|
|
@@ -169,7 +168,7 @@ const Pe = () => {
|
|
|
169
168
|
]
|
|
170
169
|
}
|
|
171
170
|
),
|
|
172
|
-
/* @__PURE__ */ e.jsx(
|
|
171
|
+
/* @__PURE__ */ e.jsx(Le, { onRemove: () => T(r), name: r.name, children: /* @__PURE__ */ e.jsxs("button", { className: "inline-flex h-9 items-center justify-center rounded-md px-3 text-xs font-medium text-red-500 underline-offset-4 ring-offset-background transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", children: [
|
|
173
172
|
/* @__PURE__ */ e.jsxs(
|
|
174
173
|
"svg",
|
|
175
174
|
{
|
|
@@ -197,126 +196,144 @@ const Pe = () => {
|
|
|
197
196
|
},
|
|
198
197
|
r.providerKey
|
|
199
198
|
)) }),
|
|
200
|
-
/* @__PURE__ */ e.jsx(
|
|
199
|
+
/* @__PURE__ */ e.jsx(Ie, { onClose: () => b(null), provider: k })
|
|
201
200
|
] })
|
|
202
201
|
] });
|
|
203
|
-
},
|
|
204
|
-
const { t: s } =
|
|
202
|
+
}, Oe = ee(() => {
|
|
203
|
+
const { t: s } = g(), o = {
|
|
205
204
|
"ctrl + Z": "Undo",
|
|
206
205
|
"ctrl + Y": "Redo",
|
|
207
206
|
"ctrl + D": "Duplicate"
|
|
208
|
-
},
|
|
207
|
+
}, a = {
|
|
209
208
|
// "ctrl + /": "Rename block",
|
|
210
209
|
"ctrl + S": "Save page",
|
|
211
210
|
esc: "Deselect blocks",
|
|
212
211
|
del: "Delete block"
|
|
213
212
|
};
|
|
214
|
-
return /* @__PURE__ */ e.jsxs(
|
|
215
|
-
/* @__PURE__ */ e.jsx(
|
|
216
|
-
/* @__PURE__ */ e.jsx(
|
|
217
|
-
/* @__PURE__ */ e.jsx(
|
|
213
|
+
return /* @__PURE__ */ e.jsxs(J, { children: [
|
|
214
|
+
/* @__PURE__ */ e.jsx(ye, { children: /* @__PURE__ */ e.jsxs(we, { children: [
|
|
215
|
+
/* @__PURE__ */ e.jsx(ke, { children: /* @__PURE__ */ e.jsx("div", { className: "flex w-10 items-center justify-center", children: /* @__PURE__ */ e.jsx(q, {}) }) }),
|
|
216
|
+
/* @__PURE__ */ e.jsx(Ce, { children: /* @__PURE__ */ e.jsx("p", { children: s("Keyboard shortcuts") }) })
|
|
218
217
|
] }) }),
|
|
219
|
-
/* @__PURE__ */ e.jsxs(
|
|
220
|
-
/* @__PURE__ */ e.jsx(
|
|
218
|
+
/* @__PURE__ */ e.jsxs(Z, { className: "sm:max-w-[525px]", children: [
|
|
219
|
+
/* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(Y, { children: s("Keyboard shortcuts") }) }),
|
|
221
220
|
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2", children: [
|
|
222
|
-
/* @__PURE__ */ e.jsx("div", { className: "mr-8 flex flex-col space-y-2 border-r border-gray-200", children: Object.keys(o).map((
|
|
223
|
-
/* @__PURE__ */ e.jsx(
|
|
224
|
-
/* @__PURE__ */ e.jsx("div", { children: s(o[
|
|
225
|
-
] },
|
|
226
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col space-y-2", children: Object.keys(
|
|
227
|
-
/* @__PURE__ */ e.jsx(
|
|
228
|
-
/* @__PURE__ */ e.jsx("div", { children: s(l
|
|
229
|
-
] },
|
|
221
|
+
/* @__PURE__ */ e.jsx("div", { className: "mr-8 flex flex-col space-y-2 border-r border-gray-200", children: Object.keys(o).map((l) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
|
|
222
|
+
/* @__PURE__ */ e.jsx(L, { variant: "outline", className: "border border-gray-600 p-1 px-2", children: s(l) }),
|
|
223
|
+
/* @__PURE__ */ e.jsx("div", { children: s(o[l]) })
|
|
224
|
+
] }, l)) }),
|
|
225
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col space-y-2", children: Object.keys(a).map((l) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
|
|
226
|
+
/* @__PURE__ */ e.jsx(L, { variant: "outline", className: "border border-gray-600 p-1 px-2", children: s(l) }),
|
|
227
|
+
/* @__PURE__ */ e.jsx("div", { children: s(a[l]) })
|
|
228
|
+
] }, l)) })
|
|
230
229
|
] }) })
|
|
231
230
|
] })
|
|
232
231
|
] });
|
|
233
|
-
}),
|
|
234
|
-
let
|
|
235
|
-
const
|
|
236
|
-
const s =
|
|
237
|
-
"add-blocks":
|
|
238
|
-
[i]:
|
|
239
|
-
"
|
|
240
|
-
images:
|
|
232
|
+
}), Me = v(() => import("./AddBlocks-2_dpKDpp.js")), K = v(() => import("./ListTree-uJFhqUk9.js")), Ue = v(() => import("./ThemeConfiguration-m_jkR2zi.js")), He = v(() => import("./ChaiBuilderEditor-JnZFji5_.js").then((s) => s.co)), Fe = v(() => import("./UILibrariesPanel-Igx0R4zc.js"));
|
|
233
|
+
let U = null;
|
|
234
|
+
const zs = () => {
|
|
235
|
+
const s = y("sideBarComponents.top", []), o = y("sideBarComponents.bottom", []), [a, l] = H(De), [u, m] = h(a), [c, w] = h(null), { t: p } = g(), k = Se(), b = y("filterChaiBlock", () => !0), C = j(k, b), { data: D, isLoading: T } = Te(), _ = !T && !R(D) || F(re(C), { category: "custom" }) !== void 0, r = {
|
|
236
|
+
"add-blocks": Me,
|
|
237
|
+
[i]: K,
|
|
238
|
+
"theme-configuration": Ue,
|
|
239
|
+
images: He,
|
|
240
|
+
"ui-libraries": Fe
|
|
241
241
|
};
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
ae(s, ({ name: n, panel: A }) => {
|
|
243
|
+
r[n] = A;
|
|
244
244
|
});
|
|
245
|
-
const
|
|
246
|
-
clearTimeout(
|
|
247
|
-
},
|
|
248
|
-
function
|
|
249
|
-
const
|
|
250
|
-
|
|
245
|
+
const t = (n) => {
|
|
246
|
+
clearTimeout(U), a !== i && n === i ? U = setTimeout(() => l(i), 500) : m(n), l(n);
|
|
247
|
+
}, d = y("dataBindingSupport", !1);
|
|
248
|
+
function $() {
|
|
249
|
+
const n = setTimeout(() => {
|
|
250
|
+
c && (t(i), clearTimeout(c));
|
|
251
251
|
}, 500);
|
|
252
|
-
|
|
252
|
+
w(n);
|
|
253
253
|
}
|
|
254
254
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative flex", children: [
|
|
255
|
-
|
|
255
|
+
a !== i ? /* @__PURE__ */ e.jsx(
|
|
256
256
|
"div",
|
|
257
257
|
{
|
|
258
|
-
onMouseEnter:
|
|
259
|
-
onClick: () =>
|
|
258
|
+
onMouseEnter: $,
|
|
259
|
+
onClick: () => t(i),
|
|
260
260
|
className: "fixed inset-0 z-[50] bg-black/20"
|
|
261
261
|
}
|
|
262
262
|
) : null,
|
|
263
263
|
/* @__PURE__ */ e.jsxs("div", { className: "z-[100] flex h-full w-fit flex-col items-center justify-between border-b border-r border-border bg-background pt-2", children: [
|
|
264
264
|
/* @__PURE__ */ e.jsxs("div", { className: "relative z-[100] flex w-14 flex-col items-center space-y-2", children: [
|
|
265
|
-
/* @__PURE__ */ e.
|
|
266
|
-
|
|
265
|
+
_ ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 rounded-md bg-gray-200 p-1", children: [
|
|
266
|
+
/* @__PURE__ */ e.jsx(
|
|
267
|
+
x,
|
|
268
|
+
{
|
|
269
|
+
onClick: () => t("add-blocks"),
|
|
270
|
+
size: "sm",
|
|
271
|
+
variant: a === "add-blocks" ? "default" : "outline",
|
|
272
|
+
children: /* @__PURE__ */ e.jsx(E, { className: "text-xl" })
|
|
273
|
+
}
|
|
274
|
+
),
|
|
275
|
+
/* @__PURE__ */ e.jsx(
|
|
276
|
+
x,
|
|
277
|
+
{
|
|
278
|
+
onClick: () => t("ui-libraries"),
|
|
279
|
+
size: "sm",
|
|
280
|
+
variant: a === "ui-libraries" ? "default" : "outline",
|
|
281
|
+
children: /* @__PURE__ */ e.jsx(G, { className: "text-xl" })
|
|
282
|
+
}
|
|
283
|
+
)
|
|
284
|
+
] }) : /* @__PURE__ */ e.jsx(
|
|
285
|
+
x,
|
|
267
286
|
{
|
|
268
|
-
onClick: () =>
|
|
269
|
-
c("add-blocks");
|
|
270
|
-
},
|
|
287
|
+
onClick: () => t("add-blocks"),
|
|
271
288
|
size: "sm",
|
|
272
|
-
variant:
|
|
273
|
-
children: /* @__PURE__ */ e.jsx(
|
|
289
|
+
variant: a === "add-blocks" ? "default" : "outline",
|
|
290
|
+
children: /* @__PURE__ */ e.jsx(E, { className: "text-xl" })
|
|
274
291
|
}
|
|
275
292
|
),
|
|
276
293
|
/* @__PURE__ */ e.jsx(
|
|
277
|
-
|
|
294
|
+
x,
|
|
278
295
|
{
|
|
279
|
-
onClick: () =>
|
|
296
|
+
onClick: () => t(i),
|
|
280
297
|
size: "sm",
|
|
281
|
-
variant:
|
|
282
|
-
children: /* @__PURE__ */ e.jsx(
|
|
298
|
+
variant: a === i ? "default" : "outline",
|
|
299
|
+
children: /* @__PURE__ */ e.jsx(B, { className: "w-4" })
|
|
283
300
|
}
|
|
284
301
|
),
|
|
285
302
|
/* @__PURE__ */ e.jsx(
|
|
286
|
-
|
|
303
|
+
x,
|
|
287
304
|
{
|
|
288
|
-
onClick: () =>
|
|
305
|
+
onClick: () => t("theme-configuration"),
|
|
289
306
|
size: "sm",
|
|
290
|
-
variant:
|
|
291
|
-
children: /* @__PURE__ */ e.jsx(
|
|
307
|
+
variant: a === "theme-configuration" ? "default" : "outline",
|
|
308
|
+
children: /* @__PURE__ */ e.jsx(_e, { className: "w-4 max-w-[40px] text-xs" })
|
|
292
309
|
}
|
|
293
310
|
),
|
|
294
|
-
|
|
295
|
-
s.map(({ name:
|
|
296
|
-
|
|
311
|
+
f.Children.toArray(
|
|
312
|
+
s.map(({ name: n, icon: A }) => /* @__PURE__ */ e.jsx(N, { fallback: /* @__PURE__ */ e.jsx(V, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(
|
|
313
|
+
x,
|
|
297
314
|
{
|
|
298
|
-
onClick: () =>
|
|
315
|
+
onClick: () => t(n),
|
|
299
316
|
size: "sm",
|
|
300
317
|
className: "w-10",
|
|
301
|
-
variant:
|
|
302
|
-
children: /* @__PURE__ */ e.jsx(
|
|
318
|
+
variant: a === n ? "default" : "outline",
|
|
319
|
+
children: /* @__PURE__ */ e.jsx(A, {})
|
|
303
320
|
}
|
|
304
321
|
) }))
|
|
305
322
|
)
|
|
306
323
|
] }),
|
|
307
324
|
/* @__PURE__ */ e.jsxs("div", { className: "relative z-[100] flex w-14 flex-col items-center space-y-2 pb-2", children: [
|
|
308
|
-
/* @__PURE__ */ e.jsx(
|
|
309
|
-
|
|
310
|
-
o.map((
|
|
325
|
+
/* @__PURE__ */ e.jsx(Oe, {}),
|
|
326
|
+
f.Children.toArray(
|
|
327
|
+
o.map((n) => /* @__PURE__ */ e.jsx(N, { fallback: /* @__PURE__ */ e.jsx(V, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(n, {}) }))
|
|
311
328
|
)
|
|
312
329
|
] })
|
|
313
330
|
] }),
|
|
314
|
-
|
|
331
|
+
a !== i ? /* @__PURE__ */ e.jsx(
|
|
315
332
|
"div",
|
|
316
333
|
{
|
|
317
|
-
className: "absolute left-14 z-[50] h-
|
|
334
|
+
className: "absolute left-14 z-[50] h-[100vh] w-fit translate-x-0 border-r bg-background transition-all duration-500 ease-in-out",
|
|
318
335
|
children: /* @__PURE__ */ e.jsx(
|
|
319
|
-
|
|
336
|
+
N,
|
|
320
337
|
{
|
|
321
338
|
fallback: /* @__PURE__ */ e.jsxs("div", { className: "flex animate-pulse flex-col gap-y-2 bg-white p-4", children: [
|
|
322
339
|
/* @__PURE__ */ e.jsx("div", { className: "h-6 w-1/2 bg-gray-300" }),
|
|
@@ -326,11 +343,13 @@ const _s = () => {
|
|
|
326
343
|
children: /* @__PURE__ */ e.jsx(
|
|
327
344
|
"div",
|
|
328
345
|
{
|
|
329
|
-
className:
|
|
346
|
+
className: ze(
|
|
347
|
+
"relative z-[100] h-full max-h-full overflow-y-auto overflow-x-hidden border-r bg-background p-1 shadow-md"
|
|
348
|
+
),
|
|
330
349
|
onMouseEnter: () => {
|
|
331
|
-
|
|
350
|
+
c && clearTimeout(c);
|
|
332
351
|
},
|
|
333
|
-
children:
|
|
352
|
+
children: f.createElement(le(r, a, () => /* @__PURE__ */ e.jsx("div", {})))
|
|
334
353
|
}
|
|
335
354
|
)
|
|
336
355
|
}
|
|
@@ -338,39 +357,39 @@ const _s = () => {
|
|
|
338
357
|
}
|
|
339
358
|
) : null,
|
|
340
359
|
/* @__PURE__ */ e.jsx("div", { className: "h-full w-60 border-r p-1", children: /* @__PURE__ */ e.jsx(
|
|
341
|
-
|
|
360
|
+
N,
|
|
342
361
|
{
|
|
343
362
|
fallback: /* @__PURE__ */ e.jsxs("div", { className: "flex animate-pulse flex-col gap-y-2 p-4", children: [
|
|
344
363
|
/* @__PURE__ */ e.jsx("div", { className: "h-6 w-1/2 bg-gray-300" }),
|
|
345
364
|
/* @__PURE__ */ e.jsx("div", { className: "h-16 w-full bg-gray-200" }),
|
|
346
365
|
/* @__PURE__ */ e.jsx("div", { className: "h-16 w-full bg-gray-200" })
|
|
347
366
|
] }),
|
|
348
|
-
children:
|
|
349
|
-
/* @__PURE__ */ e.jsxs(
|
|
350
|
-
/* @__PURE__ */ e.jsxs(
|
|
351
|
-
/* @__PURE__ */ e.jsx(
|
|
367
|
+
children: d ? /* @__PURE__ */ e.jsxs(O, { defaultValue: i, className: "flex h-full w-full flex-col py-1", children: [
|
|
368
|
+
/* @__PURE__ */ e.jsxs(M, { className: "mx-1 grid h-10 grid-cols-2", children: [
|
|
369
|
+
/* @__PURE__ */ e.jsxs(P, { value: i, children: [
|
|
370
|
+
/* @__PURE__ */ e.jsx(B, { className: "mr-2 h-3" }),
|
|
352
371
|
" ",
|
|
353
|
-
|
|
372
|
+
p("Outline")
|
|
354
373
|
] }),
|
|
355
|
-
/* @__PURE__ */ e.jsxs(
|
|
356
|
-
/* @__PURE__ */ e.jsx(
|
|
357
|
-
|
|
374
|
+
/* @__PURE__ */ e.jsxs(P, { value: "data-provider", children: [
|
|
375
|
+
/* @__PURE__ */ e.jsx(Ae, { className: "mr-2 w-3" }),
|
|
376
|
+
p("Data")
|
|
358
377
|
] })
|
|
359
378
|
] }),
|
|
360
|
-
/* @__PURE__ */ e.jsx(
|
|
361
|
-
/* @__PURE__ */ e.jsx(
|
|
362
|
-
] }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(
|
|
363
|
-
/* @__PURE__ */ e.jsx(
|
|
364
|
-
/* @__PURE__ */ e.jsx(
|
|
379
|
+
/* @__PURE__ */ e.jsx(S, { value: i, className: "no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden", children: f.createElement(K) }),
|
|
380
|
+
/* @__PURE__ */ e.jsx(S, { value: "data-provider", className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ e.jsx(Ve, {}) })
|
|
381
|
+
] }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(O, { defaultValue: i, className: "flex h-full w-full flex-col py-1", children: [
|
|
382
|
+
/* @__PURE__ */ e.jsx(M, { className: "mx-1 grid h-10 grid-cols-1", children: /* @__PURE__ */ e.jsxs(P, { value: i, children: [
|
|
383
|
+
/* @__PURE__ */ e.jsx(B, { className: "mr-2 h-3" }),
|
|
365
384
|
" ",
|
|
366
|
-
|
|
385
|
+
p("Outline")
|
|
367
386
|
] }) }),
|
|
368
387
|
/* @__PURE__ */ e.jsx(
|
|
369
|
-
|
|
388
|
+
S,
|
|
370
389
|
{
|
|
371
390
|
value: i,
|
|
372
391
|
className: "no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden",
|
|
373
|
-
children:
|
|
392
|
+
children: f.createElement(K)
|
|
374
393
|
}
|
|
375
394
|
)
|
|
376
395
|
] }) })
|
|
@@ -379,5 +398,5 @@ const _s = () => {
|
|
|
379
398
|
] });
|
|
380
399
|
};
|
|
381
400
|
export {
|
|
382
|
-
|
|
401
|
+
zs as default
|
|
383
402
|
};
|