@chaibuilder/sdk 1.2.18 → 1.2.20
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-uCdu9Xpr.js → AddBlocks-VIWJkaHJ.js} +24 -25
- package/dist/AddBlocks-X9eh8OWJ.cjs +1 -0
- package/dist/{BrandingOptions-JbHRN7V5.js → BrandingOptions-5ss0k1nb.js} +12 -13
- package/dist/BrandingOptions-PzPdafIT.cjs +1 -0
- package/dist/CanvasArea-TTGqlBKO.js +908 -0
- package/dist/CanvasArea-hoyr4dfb.cjs +55 -0
- package/dist/CurrentPage-EddxgHU-.cjs +1 -0
- package/dist/{CurrentPage-AlOLPG4o.js → CurrentPage-a3T2uy8Q.js} +10 -12
- package/dist/ListTree-kergCZrw.js +126 -0
- package/dist/ListTree-tADrgsqZ.cjs +1 -0
- package/dist/Outline-3IHYlOzF.cjs +1 -0
- package/dist/Outline-rNFJGkap.js +294 -0
- package/dist/{PagesPanel-VbSQHEu_.js → PagesPanel-0bL28ofN.js} +5 -7
- package/dist/PagesPanel-B33hWN11.cjs +1 -0
- package/dist/ProjectPanel-qtRTXNOP.cjs +1 -0
- package/dist/{ProjectPanel-fqux215P.js → ProjectPanel-sBRkUXnY.js} +15 -17
- package/dist/{Settings-IhWI1ice.js → Settings-HgGe1ANj.js} +587 -554
- package/dist/Settings-rXxS3RGM.cjs +1 -0
- package/dist/{SidePanels-lMCXrchR.js → SidePanels-R_g9rSjP.js} +132 -134
- package/dist/SidePanels-aAm-2A3s.cjs +1 -0
- package/dist/{Topbar-DYiisBtw.js → Topbar-AUTKpVHO.js} +3 -4
- package/dist/Topbar-cXtxVswU.cjs +1 -0
- package/dist/TypeIcon-ElNNPazl.cjs +1 -0
- package/dist/TypeIcon-qO96rNbV.js +69 -0
- package/dist/{UnsplashImages-lGLcqo4M.js → UnsplashImages-1RFHZIte.js} +13 -14
- package/dist/UnsplashImages-p34UJJWJ.cjs +1 -0
- package/dist/UploadImages-CLfyNo1i.cjs +1 -0
- package/dist/{UploadImages-06m6vjbL.js → UploadImages-G2orrhmZ.js} +8 -9
- package/dist/{add-page-modal-mEbIXSKX.js → add-page-modal-DUthvJNJ.js} +7 -9
- package/dist/add-page-modal-KCy_Khfe.cjs +1 -0
- package/dist/confirm-alert-T8vimDRx.cjs +1 -0
- package/dist/{confirm-alert-YETlIRpE.js → confirm-alert-nk2WQHud.js} +3 -4
- package/dist/{controls-Dy1qa8Dc.cjs → controls-KK2oLIa8.cjs} +1 -1
- package/dist/{controls-XPXGHKht.js → controls-OfJWSEqC.js} +29 -28
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +2 -1
- package/dist/core.js +45 -47
- package/dist/defaultTheme-7Lk2zq60.cjs +1 -0
- package/dist/{defaultTheme-s0cpA5Oy.js → defaultTheme-gunU_Fe5.js} +31 -33
- package/dist/{delete-page-modal-J_SmPWrw.js → delete-page-modal-WvWRQUgU.js} +8 -10
- package/dist/delete-page-modal-_pFjWLJn.cjs +1 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +81 -81
- package/dist/email.cjs +1 -1
- package/dist/email.d.ts +2 -0
- package/dist/email.js +4 -6
- package/dist/{form-Y0Vb4m04.cjs → form-YnnWtUGk.cjs} +1 -1
- package/dist/{form-2xJcQs_Y.js → form-kXQX4L2W.js} +1 -1
- package/dist/{index-627XtO9e.js → index--Pt4B5bv.js} +3 -3
- package/dist/index-DeHH1q_1.cjs +1 -0
- package/dist/{index-3TQsdso6.cjs → index-JqRQZLN5.cjs} +1 -1
- package/dist/{index-LF3KXx4u.js → index-QIbDWoML.js} +8308 -8162
- package/dist/{index-ZwpjuB-N.cjs → index-e5cgISUO.cjs} +51 -51
- package/dist/{index-ZBqiaKhx.js → index-la4rqGKN.js} +802 -794
- package/dist/lib.cjs +1 -1
- package/dist/lib.js +1 -1
- package/dist/page-viewer-6phtctz6.cjs +1 -0
- package/dist/{page-viewer-7u0SWWmO.js → page-viewer-s_lHBVfx.js} +6 -8
- package/dist/project-general-setting-SaNOMXEl.cjs +1 -0
- package/dist/{project-general-setting-SqC85J7F.js → project-general-setting-gj4A0X5W.js} +7 -9
- package/dist/{project-seo-setting-TlQherop.js → project-seo-setting-aCPg-IIc.js} +5 -6
- package/dist/project-seo-setting-bMDdgKRZ.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +10 -0
- package/dist/render.js +164 -78
- package/dist/{single-page-detail-ClZYIdSO.js → single-page-detail-TP-cxVIT.js} +36 -38
- package/dist/single-page-detail-er8i2FIF.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.d.ts +2 -0
- package/dist/studio.js +4 -6
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +130 -131
- package/dist/{useAddBlockByDrop-E343zoB3.cjs → useAddBlockByDrop-LSV8adwE.cjs} +1 -1
- package/dist/{useAddBlockByDrop-sPX4lN-O.js → useAddBlockByDrop-_vczk5o_.js} +1 -1
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +1 -1
- package/package.json +4 -14
- package/dist/AddBlocks-5Q5w5lPJ.cjs +0 -1
- package/dist/BrandingOptions-xrGQI1Kn.cjs +0 -1
- package/dist/CanvasArea-aWzbzB9p.js +0 -1403
- package/dist/CanvasArea-oUIvLfdq.cjs +0 -60
- package/dist/CurrentPage-atmd8UrZ.cjs +0 -1
- package/dist/Outline-oGoAdnBw.js +0 -355
- package/dist/Outline-uMUTwN-R.cjs +0 -1
- package/dist/PagesPanel-nN3QUwXp.cjs +0 -1
- package/dist/ProjectPanel-UIEFhref.cjs +0 -1
- package/dist/Settings-8qUW0Iow.cjs +0 -1
- package/dist/SidePanels-cOHgPE9y.cjs +0 -1
- package/dist/Topbar-vLD-rWl5.cjs +0 -1
- package/dist/UnsplashImages-1JWfKlBc.cjs +0 -1
- package/dist/UploadImages-T4MYMOhW.cjs +0 -1
- package/dist/add-page-modal-niwhffYL.cjs +0 -1
- package/dist/confirm-alert-ZpEIxh3X.cjs +0 -1
- package/dist/defaultTheme-1XwPZT2b.cjs +0 -1
- package/dist/delete-page-modal-sOqRlmKb.cjs +0 -1
- package/dist/index-T3wfa1kz.cjs +0 -1
- package/dist/page-viewer-6UDraUKW.cjs +0 -1
- package/dist/project-general-setting-AW5Vtmgx.cjs +0 -1
- package/dist/project-seo-setting-cWiNZcxW.cjs +0 -1
- package/dist/single-page-detail-kJUW6FE9.cjs +0 -1
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import I, { useState as j, useEffect as z } from "react";
|
|
3
3
|
import { isString as L, isEmpty as x, isEqual as C, omit as y, kebabCase as B } from "lodash-es";
|
|
4
4
|
import { HomeIcon as G } from "@radix-ui/react-icons";
|
|
5
|
-
import {
|
|
6
|
-
import { u as g, b as Z, g as $, o as F, r as Q } from "./controls-
|
|
5
|
+
import { bf as Y, B as q } from "./index-la4rqGKN.js";
|
|
6
|
+
import { u as g, b as Z, g as $, o as F, r as Q } from "./controls-OfJWSEqC.js";
|
|
7
7
|
import { toast as U } from "sonner";
|
|
8
|
-
import { F as P } from "./form-
|
|
9
|
-
import { f as V, a as X, g as _, b as K } from "./index
|
|
8
|
+
import { F as P } from "./form-kXQX4L2W.js";
|
|
9
|
+
import { f as V, a as X, g as _, b as K } from "./index--Pt4B5bv.js";
|
|
10
10
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
11
11
|
import "./Functions-7jnEwJyw.js";
|
|
12
12
|
import "clsx";
|
|
13
13
|
import "tailwind-merge";
|
|
14
14
|
import "@chaibuilder/runtime";
|
|
15
15
|
import "jotai";
|
|
16
|
-
import "flat-to-nested";
|
|
17
16
|
import "./MODIFIERS-WQdaNvb8.js";
|
|
18
17
|
import "@react-hookz/web";
|
|
19
18
|
import "@radix-ui/react-toggle";
|
|
@@ -43,10 +42,9 @@ import "react-quill";
|
|
|
43
42
|
import "react-i18next";
|
|
44
43
|
import "@rjsf/core";
|
|
45
44
|
import "@rjsf/validator-ajv8";
|
|
46
|
-
import "./index-
|
|
45
|
+
import "./index-QIbDWoML.js";
|
|
47
46
|
import "i18next";
|
|
48
47
|
import "@floating-ui/react-dom";
|
|
49
|
-
import "react-textarea-autosize";
|
|
50
48
|
import "flagged";
|
|
51
49
|
import "react-dnd";
|
|
52
50
|
import "@minoru/react-dnd-treeview";
|
|
@@ -55,31 +53,31 @@ import "./html-to-json-C5sExaSD.js";
|
|
|
55
53
|
import "himalaya";
|
|
56
54
|
import "lucide-react";
|
|
57
55
|
import "./index-YpnaudSM.js";
|
|
58
|
-
const O = I.lazy(() => import("./delete-page-modal-
|
|
56
|
+
const O = I.lazy(() => import("./delete-page-modal-WvWRQUgU.js")), J = I.lazy(() => import("./confirm-alert-nk2WQHud.js")), h = (r) => {
|
|
59
57
|
if (!L(r) || !(r.includes("/[") && r.includes("]")))
|
|
60
58
|
return !1;
|
|
61
|
-
const
|
|
59
|
+
const s = /^\[((?:\.{3})?[a-zA-Z0-9_-]+)\]$/, u = /^[a-zA-Z0-9_-]+$/;
|
|
62
60
|
let e = !0;
|
|
63
61
|
return r.split("/").forEach((n) => {
|
|
64
|
-
e && (n.includes("[[") && n.includes("]]") ? e = /^\[\[\.{3}[a-zA-Z0-9_-]+\]\]$/.test(n) : n.includes("[") && n.includes("]") ? e =
|
|
62
|
+
e && (n.includes("[[") && n.includes("]]") ? e = /^\[\[\.{3}[a-zA-Z0-9_-]+\]\]$/.test(n) : n.includes("[") && n.includes("]") ? e = s.test(n) : e = u.test(n));
|
|
65
63
|
}), e;
|
|
66
64
|
}, f = (r) => r && x(r.seoData) ? {
|
|
67
65
|
...r,
|
|
68
66
|
seoData: { title: "", description: "", image: "" }
|
|
69
67
|
} : r, W = (r, m) => {
|
|
70
|
-
const
|
|
71
|
-
return
|
|
72
|
-
},
|
|
73
|
-
const u = V(), { data: e } = X(), n = _(), c = K("Homepage updated successfully."), [i, T] = j(f(
|
|
74
|
-
isHomePage: (e == null ? void 0 : e.homepage) ===
|
|
75
|
-
}), N = W(i,
|
|
68
|
+
const s = !C(y(r, ["seoData"]), y(m, ["seoData"])), u = !C(f(m).seoData, f(r).seoData);
|
|
69
|
+
return s || u;
|
|
70
|
+
}, De = ({ open: r, setOpen: m, pageData: s }) => {
|
|
71
|
+
const u = V(), { data: e } = X(), n = _(), c = K("Homepage updated successfully."), [i, T] = j(f(s)), [d, v] = j({
|
|
72
|
+
isHomePage: (e == null ? void 0 : e.homepage) === s.uuid
|
|
73
|
+
}), N = W(i, s);
|
|
76
74
|
z(() => {
|
|
77
|
-
const l = !C(f(
|
|
75
|
+
const l = !C(f(s), i), o = (e == null ? void 0 : e.homepage) !== s.uuid && d.isHomePage;
|
|
78
76
|
m(l || o ? "PENDING" : "OPEN");
|
|
79
|
-
}, [e,
|
|
77
|
+
}, [e, s, i, d, m]);
|
|
80
78
|
const S = () => {
|
|
81
79
|
if (N) {
|
|
82
|
-
if (
|
|
80
|
+
if (s.type === "DYNAMIC" && !h((i == null ? void 0 : i.slug) || "")) {
|
|
83
81
|
r === "ALERT" && m("PENDING");
|
|
84
82
|
return;
|
|
85
83
|
}
|
|
@@ -92,7 +90,7 @@ const O = I.lazy(() => import("./delete-page-modal-J_SmPWrw.js")), J = I.lazy(()
|
|
|
92
90
|
}
|
|
93
91
|
});
|
|
94
92
|
}
|
|
95
|
-
d.isHomePage && (e == null ? void 0 : e.homepage) !==
|
|
93
|
+
d.isHomePage && (e == null ? void 0 : e.homepage) !== s.uuid && c.mutate({ ...e, homepage: s == null ? void 0 : s.uuid }, { onSuccess: () => m("CLOSE") });
|
|
96
94
|
}, b = ({ formData: l }, o) => {
|
|
97
95
|
T((p) => {
|
|
98
96
|
var E, A;
|
|
@@ -149,8 +147,8 @@ const O = I.lazy(() => import("./delete-page-modal-J_SmPWrw.js")), J = I.lazy(()
|
|
|
149
147
|
default: d.isHomePage
|
|
150
148
|
})
|
|
151
149
|
};
|
|
152
|
-
return /* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
150
|
+
return /* @__PURE__ */ t.jsxs(Y, { className: "flex h-full select-none flex-col", children: [
|
|
151
|
+
/* @__PURE__ */ t.jsx(
|
|
154
152
|
J,
|
|
155
153
|
{
|
|
156
154
|
open: r === "ALERT",
|
|
@@ -160,9 +158,9 @@ const O = I.lazy(() => import("./delete-page-modal-J_SmPWrw.js")), J = I.lazy(()
|
|
|
160
158
|
disabled: c.isPending || n.isPending
|
|
161
159
|
}
|
|
162
160
|
),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ t.jsx("div", { className: "rounded-md bg-background/30 px-2.5 py-1", children: /* @__PURE__ */ t.jsx("h1", { className: "px-1 font-semibold", children: "Page Details" }) }),
|
|
162
|
+
/* @__PURE__ */ t.jsx("div", { className: "px-2.5 pt-2", children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col space-y-2", children: [
|
|
163
|
+
/* @__PURE__ */ t.jsx(
|
|
166
164
|
P,
|
|
167
165
|
{
|
|
168
166
|
title: "Basic Details",
|
|
@@ -172,8 +170,8 @@ const O = I.lazy(() => import("./delete-page-modal-J_SmPWrw.js")), J = I.lazy(()
|
|
|
172
170
|
disabled: n.isPending || c.isPending
|
|
173
171
|
}
|
|
174
172
|
),
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ t.jsx("div", { className: "h-2 w-full" }),
|
|
174
|
+
/* @__PURE__ */ t.jsx(
|
|
177
175
|
P,
|
|
178
176
|
{
|
|
179
177
|
title: "SEO Details",
|
|
@@ -183,7 +181,7 @@ const O = I.lazy(() => import("./delete-page-modal-J_SmPWrw.js")), J = I.lazy(()
|
|
|
183
181
|
disabled: n.isPending || c.isPending
|
|
184
182
|
}
|
|
185
183
|
),
|
|
186
|
-
(e == null ? void 0 : e.homepage) !==
|
|
184
|
+
(e == null ? void 0 : e.homepage) !== s.uuid && s.type === "STATIC" ? /* @__PURE__ */ t.jsx(
|
|
187
185
|
P,
|
|
188
186
|
{
|
|
189
187
|
formData: d,
|
|
@@ -191,31 +189,31 @@ const O = I.lazy(() => import("./delete-page-modal-J_SmPWrw.js")), J = I.lazy(()
|
|
|
191
189
|
onChange: H,
|
|
192
190
|
disabled: n.isPending || c.isPending
|
|
193
191
|
}
|
|
194
|
-
) :
|
|
195
|
-
/* @__PURE__ */
|
|
192
|
+
) : s.type === "STATIC" && /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-x-1 px-1 pt-2 text-xs font-medium text-gray-500", children: [
|
|
193
|
+
/* @__PURE__ */ t.jsx(G, {}),
|
|
196
194
|
" This is homepage",
|
|
197
195
|
" "
|
|
198
196
|
] }),
|
|
199
|
-
i.type === "DYNAMIC" && !h((i == null ? void 0 : i.slug) || "") && /* @__PURE__ */
|
|
197
|
+
i.type === "DYNAMIC" && !h((i == null ? void 0 : i.slug) || "") && /* @__PURE__ */ t.jsxs("small", { className: "px-1 text-red-400", children: [
|
|
200
198
|
"Add dynamic ID in page slug Eg: ",
|
|
201
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ t.jsx("i", { className: "underline", children: "some-url/[some-id]" })
|
|
202
200
|
] }),
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ t.jsxs("div", { className: "my-2 flex w-full items-center justify-between gap-x-2 px-1", children: [
|
|
202
|
+
/* @__PURE__ */ t.jsx(
|
|
205
203
|
q,
|
|
206
204
|
{
|
|
207
205
|
className: "w-full",
|
|
208
206
|
type: "submit",
|
|
209
207
|
onClick: S,
|
|
210
|
-
disabled: (e == null ? void 0 : e.homepage) !==
|
|
208
|
+
disabled: (e == null ? void 0 : e.homepage) !== s.uuid && d.isHomePage ? !1 : x(i.name) || x(i.slug) || !N || n.isPending || c.isPending || i.type === "DYNAMIC" && !h((i == null ? void 0 : i.slug) || ""),
|
|
211
209
|
children: "Save"
|
|
212
210
|
}
|
|
213
211
|
),
|
|
214
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ t.jsx(O, { pageData: s, projectData: e })
|
|
215
213
|
] })
|
|
216
214
|
] }) })
|
|
217
215
|
] });
|
|
218
216
|
};
|
|
219
217
|
export {
|
|
220
|
-
|
|
218
|
+
De as default
|
|
221
219
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-Z_BpKhVy.cjs"),f=require("react"),c=require("lodash-es"),H=require("@radix-ui/react-icons"),y=require("./index-DeHH1q_1.cjs"),d=require("./controls-KK2oLIa8.cjs"),w=require("sonner"),p=require("./form-YnnWtUGk.cjs"),P=require("./index-JqRQZLN5.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./MODIFIERS-9EwxLM8V.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-MmCxz2Ay.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-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("react-i18next");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./index-e5cgISUO.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("./html-to-json-FGufPv9R.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");const z=f.lazy(()=>Promise.resolve().then(()=>require("./delete-page-modal-_pFjWLJn.cjs"))),L=f.lazy(()=>Promise.resolve().then(()=>require("./confirm-alert-T8vimDRx.cjs"))),E=u=>{if(!c.isString(u)||!(u.includes("/[")&&u.includes("]")))return!1;const s=/^\[((?:\.{3})?[a-zA-Z0-9_-]+)\]$/,q=/^[a-zA-Z0-9_-]+$/;let e=!0;return u.split("/").forEach(n=>{e&&(n.includes("[[")&&n.includes("]]")?e=/^\[\[\.{3}[a-zA-Z0-9_-]+\]\]$/.test(n):n.includes("[")&&n.includes("]")?e=s.test(n):e=q.test(n))}),e},h=u=>u&&c.isEmpty(u.seoData)?{...u,seoData:{title:"",description:"",image:""}}:u,G=(u,o)=>{const s=!c.isEqual(c.omit(u,["seoData"]),c.omit(o,["seoData"])),q=!c.isEqual(h(o).seoData,h(u).seoData);return s||q},Y=({open:u,setOpen:o,pageData:s})=>{const q=P.useQueryClient(),{data:e}=P.useProject(),n=P.useUpdatePage(),m=P.useUpdateProject("Homepage updated successfully."),[i,b]=f.useState(h(s)),[a,A]=f.useState({isHomePage:(e==null?void 0:e.homepage)===s.uuid}),j=G(i,s);f.useEffect(()=>{const l=!c.isEqual(h(s),i),t=(e==null?void 0:e.homepage)!==s.uuid&&a.isHomePage;o(l||t?"PENDING":"OPEN")},[e,s,i,a,o]);const C=()=>{if(j){if(s.type==="DYNAMIC"&&!E((i==null?void 0:i.slug)||"")){u==="ALERT"&&o("PENDING");return}n.mutate(i,{onSuccess:()=>{q.invalidateQueries({refetchType:"active",queryKey:["pages",e==null?void 0:e.uuid]}),o("CLOSE"),w.toast.success("Page updated successfully.")}})}a.isHomePage&&(e==null?void 0:e.homepage)!==s.uuid&&m.mutate({...e,homepage:s==null?void 0:s.uuid},{onSuccess:()=>o("CLOSE")})},R=({formData:l},t)=>{b(g=>{var S,N;if(!t)return g;const x={[t]:l[t]};return t==="name"?x.slug=c.kebabCase((S=l[t])==null?void 0:S.replace(/\d/g,"")):t==="slug"?x.slug=(N=l[t])==null?void 0:N.replace(/\d/g,"").replace(/\s+/g,"").replace("--","-").replace("__","_"):t==="seoData"&&(x.seoData={title:l[t].title||"",description:l[t].description||"",image:l[t].image||""}),{...g,...x}})},I=({formData:l},t)=>{A(g=>{const x={[t]:l[t]};return{...g,...x}})},v={name:d.u({title:"Page Name",default:i.name}),slug:d.u({title:"Page Slug",default:i.slug})},T={seoData:d.b({title:"",description:"",default:{title:"",description:"",image:""},properties:{title:d.u({title:"Meta Title",default:i.name}),description:d.g({title:"Meta Description",default:i.slug}),image:d.o({title:"Social Media Image",default:""})}})},M={isHomePage:d.r({title:"Set as homepage",default:a.isHomePage})};return r.jsxRuntimeExports.jsxs(y.ScrollArea,{className:"flex h-full select-none flex-col",children:[r.jsxRuntimeExports.jsx(L,{open:u==="ALERT",title:"Do yo want to save changes?",onCancel:()=>o("CLOSE"),onConfirm:C,disabled:m.isPending||n.isPending}),r.jsxRuntimeExports.jsx("div",{className:"rounded-md bg-background/30 px-2.5 py-1",children:r.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Page Details"})}),r.jsxRuntimeExports.jsx("div",{className:"px-2.5 pt-2",children:r.jsxRuntimeExports.jsxs("div",{className:"flex flex-col space-y-2",children:[r.jsxRuntimeExports.jsx(p.Form,{title:"Basic Details",formData:i,properties:v,onChange:R,disabled:n.isPending||m.isPending}),r.jsxRuntimeExports.jsx("div",{className:"h-2 w-full"}),r.jsxRuntimeExports.jsx(p.Form,{title:"SEO Details",formData:i,properties:T,onChange:R,disabled:n.isPending||m.isPending}),(e==null?void 0:e.homepage)!==s.uuid&&s.type==="STATIC"?r.jsxRuntimeExports.jsx(p.Form,{formData:a,properties:M,onChange:I,disabled:n.isPending||m.isPending}):s.type==="STATIC"&&r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-1 px-1 pt-2 text-xs font-medium text-gray-500",children:[r.jsxRuntimeExports.jsx(H.HomeIcon,{})," This is homepage"," "]}),i.type==="DYNAMIC"&&!E((i==null?void 0:i.slug)||"")&&r.jsxRuntimeExports.jsxs("small",{className:"px-1 text-red-400",children:["Add dynamic ID in page slug Eg: ",r.jsxRuntimeExports.jsx("i",{className:"underline",children:"some-url/[some-id]"})]}),r.jsxRuntimeExports.jsxs("div",{className:"my-2 flex w-full items-center justify-between gap-x-2 px-1",children:[r.jsxRuntimeExports.jsx(y.Button,{className:"w-full",type:"submit",onClick:C,disabled:(e==null?void 0:e.homepage)!==s.uuid&&a.isHomePage?!1:c.isEmpty(i.name)||c.isEmpty(i.slug)||!j||n.isPending||m.isPending||i.type==="DYNAMIC"&&!E((i==null?void 0:i.slug)||""),children:"Save"}),r.jsxRuntimeExports.jsx(z,{pageData:s,projectData:e})]})]})})]})};exports.default=Y;
|
package/dist/studio.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./jsx-runtime-Z_BpKhVy.cjs");const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./jsx-runtime-Z_BpKhVy.cjs");const e=require("./index-JqRQZLN5.cjs");require("react");require("sonner");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./index-e5cgISUO.cjs");require("i18next");require("react-i18next");require("./index-DeHH1q_1.cjs");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./MODIFIERS-9EwxLM8V.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-MmCxz2Ay.cjs");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("@floating-ui/react-dom");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("./html-to-json-FGufPv9R.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");exports.ChaiBuilderStudio=e.ChaiBuilderStudio;
|
package/dist/studio.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ declare type ChaiBlock = {
|
|
|
24
24
|
} & Record<string, any>;
|
|
25
25
|
|
|
26
26
|
declare interface ChaiBuilderEditorProps {
|
|
27
|
+
showDebugLogs?: boolean;
|
|
27
28
|
autoSaveSupport?: boolean;
|
|
28
29
|
autoSaveInterval?: TimeInSeconds;
|
|
29
30
|
breakpoints?: Breakpoint[];
|
|
@@ -77,6 +78,7 @@ declare interface ChaiBuilderEditorProps {
|
|
|
77
78
|
outlineMenuItems?: OutlineMenuItems;
|
|
78
79
|
getPages?: () => Promise<ChaiPage[]>;
|
|
79
80
|
unsplashAccessKey?: string;
|
|
81
|
+
_flags?: Record<string, boolean>;
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
export declare const ChaiBuilderStudio: (props: ChaiBuilderStudioProps) => JSX_2.Element;
|
package/dist/studio.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as _ } from "./index--Pt4B5bv.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "sonner";
|
|
5
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
|
-
import "./index-
|
|
6
|
+
import "./index-QIbDWoML.js";
|
|
7
7
|
import "i18next";
|
|
8
8
|
import "react-i18next";
|
|
9
|
-
import "./index-
|
|
9
|
+
import "./index-la4rqGKN.js";
|
|
10
10
|
import "lodash-es";
|
|
11
11
|
import "./Functions-7jnEwJyw.js";
|
|
12
12
|
import "clsx";
|
|
13
13
|
import "tailwind-merge";
|
|
14
14
|
import "@chaibuilder/runtime";
|
|
15
15
|
import "jotai";
|
|
16
|
-
import "flat-to-nested";
|
|
17
16
|
import "./MODIFIERS-WQdaNvb8.js";
|
|
18
17
|
import "@react-hookz/web";
|
|
19
18
|
import "@radix-ui/react-toggle";
|
|
@@ -42,7 +41,6 @@ import "react-icons-picker";
|
|
|
42
41
|
import "react-dom";
|
|
43
42
|
import "react-quill";
|
|
44
43
|
import "@floating-ui/react-dom";
|
|
45
|
-
import "react-textarea-autosize";
|
|
46
44
|
import "flagged";
|
|
47
45
|
import "react-dnd";
|
|
48
46
|
import "@minoru/react-dnd-treeview";
|
|
@@ -52,5 +50,5 @@ import "himalaya";
|
|
|
52
50
|
import "lucide-react";
|
|
53
51
|
import "./index-YpnaudSM.js";
|
|
54
52
|
export {
|
|
55
|
-
|
|
53
|
+
_ as ChaiBuilderStudio
|
|
56
54
|
};
|
package/dist/ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DeHH1q_1.cjs");require("react");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./MODIFIERS-9EwxLM8V.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@react-hookz/web");require("./jsx-runtime-Z_BpKhVy.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-MmCxz2Ay.cjs");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("react-i18next");exports.Accordion=e.Accordion;exports.AccordionContent=e.AccordionContent;exports.AccordionItem=e.AccordionItem;exports.AccordionTrigger=e.AccordionTrigger;exports.Alert=e.Alert;exports.AlertDescription=e.AlertDescription;exports.AlertDialog=e.AlertDialog;exports.AlertDialogAction=e.AlertDialogAction;exports.AlertDialogCancel=e.AlertDialogCancel;exports.AlertDialogContent=e.AlertDialogContent;exports.AlertDialogDescription=e.AlertDialogDescription;exports.AlertDialogFooter=e.AlertDialogFooter;exports.AlertDialogHeader=e.AlertDialogHeader;exports.AlertDialogTitle=e.AlertDialogTitle;exports.AlertDialogTrigger=e.AlertDialogTrigger;exports.AlertTitle=e.AlertTitle;exports.Badge=e.Badge;exports.Button=e.Button;exports.Card=e.Card;exports.CardContent=e.CardContent;exports.CardDescription=e.CardDescription;exports.CardFooter=e.CardFooter;exports.CardHeader=e.CardHeader;exports.CardTitle=e.CardTitle;exports.Command=e.Command;exports.CommandDialog=e.CommandDialog;exports.CommandEmpty=e.CommandEmpty;exports.CommandGroup=e.CommandGroup;exports.CommandInput=e.CommandInput;exports.CommandItem=e.CommandItem;exports.CommandList=e.CommandList;exports.CommandSeparator=e.CommandSeparator;exports.CommandShortcut=e.CommandShortcut;exports.ContextMenu=e.ContextMenu;exports.ContextMenuCheckboxItem=e.ContextMenuCheckboxItem;exports.ContextMenuContent=e.ContextMenuContent;exports.ContextMenuGroup=e.ContextMenuGroup;exports.ContextMenuItem=e.ContextMenuItem;exports.ContextMenuLabel=e.ContextMenuLabel;exports.ContextMenuPortal=e.ContextMenuPortal;exports.ContextMenuRadioGroup=e.ContextMenuRadioGroup;exports.ContextMenuRadioItem=e.ContextMenuRadioItem;exports.ContextMenuSeparator=e.ContextMenuSeparator;exports.ContextMenuShortcut=e.ContextMenuShortcut;exports.ContextMenuSub=e.ContextMenuSub;exports.ContextMenuSubContent=e.ContextMenuSubContent;exports.ContextMenuSubTrigger=e.ContextMenuSubTrigger;exports.ContextMenuTrigger=e.ContextMenuTrigger;exports.Dialog=e.Dialog;exports.DialogContent=e.DialogContent;exports.DialogDescription=e.DialogDescription;exports.DialogFooter=e.DialogFooter;exports.DialogHeader=e.DialogHeader;exports.DialogTitle=e.DialogTitle;exports.DialogTrigger=e.DialogTrigger;exports.DropdownMenu=e.DropdownMenu;exports.DropdownMenuCheckboxItem=e.DropdownMenuCheckboxItem;exports.DropdownMenuContent=e.DropdownMenuContent;exports.DropdownMenuGroup=e.DropdownMenuGroup;exports.DropdownMenuItem=e.DropdownMenuItem;exports.DropdownMenuLabel=e.DropdownMenuLabel;exports.DropdownMenuPortal=e.DropdownMenuPortal;exports.DropdownMenuRadioGroup=e.DropdownMenuRadioGroup;exports.DropdownMenuRadioItem=e.DropdownMenuRadioItem;exports.DropdownMenuSeparator=e.DropdownMenuSeparator;exports.DropdownMenuShortcut=e.DropdownMenuShortcut;exports.DropdownMenuSub=e.DropdownMenuSub;exports.DropdownMenuSubContent=e.DropdownMenuSubContent;exports.DropdownMenuSubTrigger=e.DropdownMenuSubTrigger;exports.DropdownMenuTrigger=e.DropdownMenuTrigger;exports.HoverCard=e.HoverCard;exports.HoverCardContent=e.HoverCardContent;exports.HoverCardTrigger=e.HoverCardTrigger;exports.IconPickerField=e.IconPickerField;exports.ImagePickerField=e.ImagePickerField;exports.Input=e.Input;exports.Label=e.Label;exports.LinkField=e.LinkField;exports.Menubar=e.Menubar;exports.MenubarCheckboxItem=e.MenubarCheckboxItem;exports.MenubarContent=e.MenubarContent;exports.MenubarGroup=e.MenubarGroup;exports.MenubarItem=e.MenubarItem;exports.MenubarLabel=e.MenubarLabel;exports.MenubarMenu=e.MenubarMenu;exports.MenubarPortal=e.MenubarPortal;exports.MenubarRadioGroup=e.MenubarRadioGroup;exports.MenubarRadioItem=e.MenubarRadioItem;exports.MenubarSeparator=e.MenubarSeparator;exports.MenubarShortcut=e.MenubarShortcut;exports.MenubarSub=e.MenubarSub;exports.MenubarSubContent=e.MenubarSubContent;exports.MenubarSubTrigger=e.MenubarSubTrigger;exports.MenubarTrigger=e.MenubarTrigger;exports.Popover=e.Popover;exports.PopoverContent=e.PopoverContent;exports.PopoverTrigger=e.PopoverTrigger;exports.RTEField=e.RichTextEditorField;exports.ScrollArea=e.ScrollArea;exports.ScrollBar=e.ScrollBar;exports.Select=e.Select;exports.SelectContent=e.SelectContent;exports.SelectGroup=e.SelectGroup;exports.SelectItem=e.SelectItem;exports.SelectLabel=e.SelectLabel;exports.SelectSeparator=e.SelectSeparator;exports.SelectTrigger=e.SelectTrigger;exports.SelectValue=e.SelectValue;exports.Separator=e.Separator;exports.Sheet=e.Sheet;exports.SheetClose=e.SheetClose;exports.SheetContent=e.SheetContent;exports.SheetDescription=e.SheetDescription;exports.SheetFooter=e.SheetFooter;exports.SheetHeader=e.SheetHeader;exports.SheetTitle=e.SheetTitle;exports.SheetTrigger=e.SheetTrigger;exports.Skeleton=e.Skeleton;exports.Switch=e.Switch;exports.Tabs=e.Tabs;exports.TabsContent=e.TabsContent;exports.TabsList=e.TabsList;exports.TabsTrigger=e.TabsTrigger;exports.Textarea=e.Textarea;exports.Toaster=e.Toaster;exports.Toggle=e.Toggle;exports.Tooltip=e.Tooltip;exports.TooltipContent=e.TooltipContent;exports.TooltipPortal=e.TooltipPortal;exports.TooltipProvider=e.TooltipProvider;exports.TooltipTrigger=e.TooltipTrigger;exports.badgeVariants=e.badgeVariants;exports.buttonVariants=e.buttonVariants;exports.reducer=e.reducer;exports.toast=e.toast;exports.toggleVariants=e.toggleVariants;exports.useToast=e.useToast;
|
package/dist/ui.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLBu
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
export declare const buttonVariants: (props?: {
|
|
106
|
-
variant?: "
|
|
106
|
+
variant?: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost";
|
|
107
107
|
size?: "sm" | "lg" | "default" | "icon";
|
|
108
108
|
} & ClassProp) => string;
|
|
109
109
|
|
package/dist/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b9 as q, bc as
|
|
1
|
+
import { b9 as q, bc as y, ba as z, bb as J, bp as K, bC as W, A as X, ai as Y, g as Z, b as _, e as $, f as N, c as O, d as Q, a as U, bq as aa, as as ea, B as oa, bj as ta, bm as ra, bl as sa, bo as na, bk as ia, bE as ba, aY as pa, cc as ua, a$ as la, b0 as ma, aZ as ca, b1 as da, a_ as ga, ce as Ca, cd as Ma, bu as Sa, cf as Da, bt as Ta, ck as xa, bs as Aa, ch as ha, cl as Ia, cp as wa, cg as Pa, ci as ka, cj as Fa, cm as Ga, cn as La, co as va, bv as Ha, ad as Ra, ae as Ba, ah as Va, b2 as fa, af as Ea, ag as ja, ao as qa, aG as ya, aL as za, aI as Ja, bg as Ka, bh as Wa, aJ as Xa, c4 as Ya, c8 as Za, c3 as _a, aK as $a, bi as Na, c5 as Oa, c6 as Qa, c7 as Ua, aH as ae, aD as ee, aF as oe, aE as te, b6 as re, b7 as se, bd as ne, aB as ie, b8 as be, bG as pe, bN as ue, bJ as le, bT as me, bK as ce, bM as de, bH as ge, bQ as Ce, bO as Me, bP as Se, bL as De, bV as Te, bU as xe, bR as Ae, bS as he, bI as Ie, aV as we, aX as Pe, aW as ke, b5 as Fe, bf as Ge, bF as Le, aj as ve, am as He, ay as Re, an as Be, az as Ve, bW as fe, ak as Ee, al as je, aA as qe, bX as ye, bZ as ze, b_ as Je, c2 as Ke, c0 as We, b$ as Xe, c1 as Ye, bY as Ze, S as _e, aC as $e, au as Ne, ax as Oe, av as Qe, aw as Ue, bn as ao, I as eo, bz as oo, ap as to, ar as ro, be as so, T as no, aq as io, bD as bo, bB as po, c9 as uo, cb as lo, bA as mo, ca as co } from "./index-la4rqGKN.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "lodash-es";
|
|
4
4
|
import "./Functions-7jnEwJyw.js";
|
|
@@ -6,7 +6,6 @@ import "clsx";
|
|
|
6
6
|
import "tailwind-merge";
|
|
7
7
|
import "@chaibuilder/runtime";
|
|
8
8
|
import "jotai";
|
|
9
|
-
import "flat-to-nested";
|
|
10
9
|
import "./MODIFIERS-WQdaNvb8.js";
|
|
11
10
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
12
11
|
import "@react-hookz/web";
|
|
@@ -39,140 +38,140 @@ import "react-quill";
|
|
|
39
38
|
import "react-i18next";
|
|
40
39
|
export {
|
|
41
40
|
q as Accordion,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
41
|
+
y as AccordionContent,
|
|
42
|
+
z as AccordionItem,
|
|
43
|
+
J as AccordionTrigger,
|
|
44
|
+
K as Alert,
|
|
45
|
+
W as AlertDescription,
|
|
46
|
+
X as AlertDialog,
|
|
47
|
+
Y as AlertDialogAction,
|
|
48
|
+
Z as AlertDialogCancel,
|
|
49
|
+
_ as AlertDialogContent,
|
|
50
|
+
$ as AlertDialogDescription,
|
|
51
|
+
N as AlertDialogFooter,
|
|
52
|
+
O as AlertDialogHeader,
|
|
53
|
+
Q as AlertDialogTitle,
|
|
54
|
+
U as AlertDialogTrigger,
|
|
55
|
+
aa as AlertTitle,
|
|
56
|
+
ea as Badge,
|
|
57
|
+
oa as Button,
|
|
58
|
+
ta as Card,
|
|
59
|
+
ra as CardContent,
|
|
60
|
+
sa as CardDescription,
|
|
61
|
+
na as CardFooter,
|
|
62
|
+
ia as CardHeader,
|
|
63
|
+
ba as CardTitle,
|
|
64
|
+
pa as Command,
|
|
65
|
+
ua as CommandDialog,
|
|
67
66
|
la as CommandEmpty,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
67
|
+
ma as CommandGroup,
|
|
68
|
+
ca as CommandInput,
|
|
69
|
+
da as CommandItem,
|
|
70
|
+
ga as CommandList,
|
|
71
|
+
Ca as CommandSeparator,
|
|
72
|
+
Ma as CommandShortcut,
|
|
73
|
+
Sa as ContextMenu,
|
|
74
|
+
Da as ContextMenuCheckboxItem,
|
|
75
|
+
Ta as ContextMenuContent,
|
|
76
|
+
xa as ContextMenuGroup,
|
|
77
|
+
Aa as ContextMenuItem,
|
|
78
|
+
ha as ContextMenuLabel,
|
|
79
|
+
Ia as ContextMenuPortal,
|
|
80
|
+
wa as ContextMenuRadioGroup,
|
|
81
|
+
Pa as ContextMenuRadioItem,
|
|
82
|
+
ka as ContextMenuSeparator,
|
|
83
|
+
Fa as ContextMenuShortcut,
|
|
84
|
+
Ga as ContextMenuSub,
|
|
85
|
+
La as ContextMenuSubContent,
|
|
87
86
|
va as ContextMenuSubTrigger,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
Ha as ContextMenuTrigger,
|
|
88
|
+
Ra as Dialog,
|
|
89
|
+
Ba as DialogContent,
|
|
90
|
+
Va as DialogDescription,
|
|
91
|
+
fa as DialogFooter,
|
|
92
|
+
Ea as DialogHeader,
|
|
93
|
+
ja as DialogTitle,
|
|
95
94
|
qa as DialogTrigger,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
95
|
+
ya as DropdownMenu,
|
|
96
|
+
za as DropdownMenuCheckboxItem,
|
|
97
|
+
Ja as DropdownMenuContent,
|
|
98
|
+
Ka as DropdownMenuGroup,
|
|
99
|
+
Wa as DropdownMenuItem,
|
|
100
|
+
Xa as DropdownMenuLabel,
|
|
101
|
+
Ya as DropdownMenuPortal,
|
|
102
|
+
Za as DropdownMenuRadioGroup,
|
|
103
|
+
_a as DropdownMenuRadioItem,
|
|
104
|
+
$a as DropdownMenuSeparator,
|
|
105
|
+
Na as DropdownMenuShortcut,
|
|
106
|
+
Oa as DropdownMenuSub,
|
|
107
|
+
Qa as DropdownMenuSubContent,
|
|
108
|
+
Ua as DropdownMenuSubTrigger,
|
|
109
|
+
ae as DropdownMenuTrigger,
|
|
110
|
+
ee as HoverCard,
|
|
111
|
+
oe as HoverCardContent,
|
|
112
|
+
te as HoverCardTrigger,
|
|
113
|
+
re as IconPickerField,
|
|
114
|
+
se as ImagePickerField,
|
|
115
|
+
ne as Input,
|
|
116
|
+
ie as Label,
|
|
117
|
+
be as LinkField,
|
|
118
|
+
pe as Menubar,
|
|
119
|
+
ue as MenubarCheckboxItem,
|
|
121
120
|
le as MenubarContent,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
121
|
+
me as MenubarGroup,
|
|
122
|
+
ce as MenubarItem,
|
|
123
|
+
de as MenubarLabel,
|
|
124
|
+
ge as MenubarMenu,
|
|
125
|
+
Ce as MenubarPortal,
|
|
126
|
+
Me as MenubarRadioGroup,
|
|
127
|
+
Se as MenubarRadioItem,
|
|
128
|
+
De as MenubarSeparator,
|
|
129
|
+
Te as MenubarShortcut,
|
|
130
|
+
xe as MenubarSub,
|
|
131
|
+
Ae as MenubarSubContent,
|
|
132
|
+
he as MenubarSubTrigger,
|
|
133
|
+
Ie as MenubarTrigger,
|
|
134
|
+
we as Popover,
|
|
135
|
+
Pe as PopoverContent,
|
|
136
|
+
ke as PopoverTrigger,
|
|
137
|
+
Fe as RTEField,
|
|
138
|
+
Ge as ScrollArea,
|
|
139
|
+
Le as ScrollBar,
|
|
141
140
|
ve as Select,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
141
|
+
He as SelectContent,
|
|
142
|
+
Re as SelectGroup,
|
|
143
|
+
Be as SelectItem,
|
|
144
|
+
Ve as SelectLabel,
|
|
145
|
+
fe as SelectSeparator,
|
|
146
|
+
Ee as SelectTrigger,
|
|
147
|
+
je as SelectValue,
|
|
149
148
|
qe as Separator,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
149
|
+
ye as Sheet,
|
|
150
|
+
ze as SheetClose,
|
|
151
|
+
Je as SheetContent,
|
|
152
|
+
Ke as SheetDescription,
|
|
153
|
+
We as SheetFooter,
|
|
154
|
+
Xe as SheetHeader,
|
|
155
|
+
Ye as SheetTitle,
|
|
156
|
+
Ze as SheetTrigger,
|
|
157
|
+
_e as Skeleton,
|
|
158
|
+
$e as Switch,
|
|
159
|
+
Ne as Tabs,
|
|
160
|
+
Oe as TabsContent,
|
|
161
|
+
Qe as TabsList,
|
|
162
|
+
Ue as TabsTrigger,
|
|
163
|
+
ao as Textarea,
|
|
164
|
+
eo as Toaster,
|
|
165
|
+
oo as Toggle,
|
|
166
|
+
to as Tooltip,
|
|
167
|
+
ro as TooltipContent,
|
|
168
|
+
so as TooltipPortal,
|
|
169
|
+
no as TooltipProvider,
|
|
170
|
+
io as TooltipTrigger,
|
|
171
|
+
bo as badgeVariants,
|
|
172
|
+
po as buttonVariants,
|
|
173
|
+
uo as reducer,
|
|
175
174
|
lo as toast,
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
mo as toggleVariants,
|
|
176
|
+
co as useToast
|
|
178
177
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("react"),t=require("lodash-es"),l=require("./index-
|
|
1
|
+
"use strict";const u=require("react"),t=require("lodash-es"),l=require("./index-DeHH1q_1.cjs"),a=()=>{const{addCoreBlock:o}=l.useAddBlock(),s=l.useBuilderProp("getExternalPredefinedBlock",t.noop);return u.useCallback(async n=>{const{block:r,dropTargetId:e,relativeIndex:c}=n;if(t.has(r,"format")){const d=await s(r);return o({blocks:d},e===0?null:e,c)}return o(r,e===0?null:e,c)},[o])};exports.useAddBlockByDrop=a;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback as d } from "react";
|
|
2
2
|
import { noop as s, has as a } from "lodash-es";
|
|
3
|
-
import { L as u, h as i } from "./index-
|
|
3
|
+
import { L as u, h as i } from "./index-la4rqGKN.js";
|
|
4
4
|
const f = () => {
|
|
5
5
|
const { addCoreBlock: r } = u(), l = i("getExternalPredefinedBlock", s);
|
|
6
6
|
return d(
|