@chaibuilder/sdk 1.0.20 → 1.0.22
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/README.md +30 -103
- package/dist/{AddBlocks-U6bHEqmk.js → AddBlocks--G1jvF_h.js} +8 -5
- package/dist/AddBlocks-kQZRgF1n.cjs +3 -0
- package/dist/BrandingOptions-3zuS6-D8.cjs +1 -0
- package/dist/{BrandingOptions-qDgIOayU.js → BrandingOptions-dwNB6XlX.js} +14 -21
- package/dist/{CanvasArea-yXpQHB6x.cjs → CanvasArea-SzwU-7i5.cjs} +4 -4
- package/dist/{CanvasArea-_poBbOON.js → CanvasArea-YM7NWbx0.js} +78 -76
- package/dist/CurrentPage-Fw-gGZIK.cjs +1 -0
- package/dist/{CurrentPage-SrovfgGL.js → CurrentPage-iC1tGuWi.js} +16 -14
- package/dist/Layers-bvtrSZ0e.cjs +1 -0
- package/dist/{Layers-OKJ5nkTF.js → Layers-tvGxr-fn.js} +18 -16
- package/dist/MODIFIERS-MLfpKQY1.js +73 -0
- package/dist/MODIFIERS-WFzDQfiT.cjs +1 -0
- package/dist/{MarkAsGlobalBlock-Ynq-S6mW.js → MarkAsGlobalBlock-hUoxbVet.js} +10 -9
- package/dist/MarkAsGlobalBlock-wqHaABl_.cjs +1 -0
- package/dist/PagesPanel-IHkdL59C.cjs +1 -0
- package/dist/{PagesPanel-5macGkBU.js → PagesPanel-w32nyAEE.js} +21 -19
- package/dist/{ProjectPanel-HS_TJ2k0.js → ProjectPanel-1yH8uzoo.js} +17 -15
- package/dist/ProjectPanel-Rt_C00rp.cjs +1 -0
- package/dist/{Settings-23ZBoDkz.js → Settings-MbtN9j5p.js} +19 -16
- package/dist/Settings-zqxhKtAP.cjs +1 -0
- package/dist/SidePanels-PcCVJHFu.cjs +1 -0
- package/dist/{SidePanels-HzpyQU1x.js → SidePanels-WDSKmDRO.js} +28 -26
- package/dist/{Topbar-tfg74vbT.js → Topbar-QBbGJftd.js} +26 -25
- package/dist/Topbar-p07CgA1J.cjs +1 -0
- package/dist/{UnsplashImages-tvUZGbHK.js → UnsplashImages-NOdXhrYp.js} +8 -7
- package/dist/UnsplashImages-RobUmAqJ.cjs +1 -0
- package/dist/{UploadImages-pKoVEsI7.js → UploadImages-_yFxI_3x.js} +8 -7
- package/dist/UploadImages-oRvUykXU.cjs +1 -0
- package/dist/{add-page-modal-217go3Eh.js → add-page-modal-1C4AYlR3.js} +21 -18
- package/dist/add-page-modal-c20toln3.cjs +1 -0
- package/dist/{confirm-alert-AG96Fmck.js → confirm-alert-LM4La_do.js} +9 -8
- package/dist/confirm-alert-exrulqxB.cjs +1 -0
- package/dist/controls-G0puEH71.js +120 -0
- package/dist/controls-aHZq-q4b.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +73 -71
- package/dist/{delete-page-modal-YYt_TVmB.js → delete-page-modal-ZkdZdhkf.js} +22 -20
- package/dist/delete-page-modal-sMfhH69k.cjs +1 -0
- package/dist/{form-Ik57WNLs.cjs → form-0TlI-dUt.cjs} +1 -1
- package/dist/{form-gIapXg-W.js → form-rvWlnmcr.js} +2 -2
- package/dist/functions-JFP-oMsY.js +1109 -0
- package/dist/functions-KMQYiBHf.cjs +2 -0
- package/dist/{index-tTN-yd28.cjs → index-8dYzEcE3.cjs} +44 -44
- package/dist/{index-4DQm5fFW.js → index-UPQtDmUs.js} +5439 -5429
- package/dist/index-lH7BBNlu.cjs +1 -0
- package/dist/{index-PrUoEet_.js → index-pgz9p5Yh.js} +191 -190
- package/dist/{jsx-runtime-qAwJ85SY.js → jsx-runtime-NV737rRe.js} +1 -1
- package/dist/{jsx-runtime-WKRPbKtm.cjs → jsx-runtime-WUGKV8jN.cjs} +6 -6
- package/dist/lib.cjs +1 -2
- package/dist/lib.d.ts +3 -9
- package/dist/lib.js +113 -1264
- package/dist/page-viewer-1EuLsHyz.cjs +1 -0
- package/dist/{page-viewer-LQSQxs98.js → page-viewer-3860AKDT.js} +39 -37
- package/dist/project-general-setting-Bg7qIWUd.cjs +1 -0
- package/dist/{project-general-setting-04N25MvJ.js → project-general-setting-mg_zEkzX.js} +22 -19
- package/dist/{project-seo-setting-zxnjvt3c.js → project-seo-setting-6Q0gFmHY.js} +17 -24
- package/dist/project-seo-setting-8B9pZPZN.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +40 -44
- package/dist/single-page-detail-52Xz-XJ7.cjs +1 -0
- package/dist/{single-page-detail-lJHZSKqK.js → single-page-detail-Asn7bb7f.js} +47 -44
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +21 -19
- package/dist/tailwind-config-OxLD7oFU.cjs +1 -0
- package/dist/tailwind-config-d1VL1lzE.js +62 -0
- package/dist/tailwind.cjs +1 -0
- package/dist/tailwind.d.ts +80 -0
- package/dist/tailwind.js +24 -0
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +4 -4
- package/dist/ui.js +144 -143
- package/dist/utils-It2K33fU.cjs +1 -0
- package/dist/{Class-nQk08vqd.js → utils-PPBbw5bk.js} +115 -183
- package/package.json +9 -9
- package/dist/AddBlocks-LvIqNyBE.cjs +0 -3
- package/dist/BrandingOptions-viABH78W.cjs +0 -1
- package/dist/Class-RZuPYbUS.cjs +0 -1
- package/dist/CurrentPage-XWSb_RZ8.cjs +0 -1
- package/dist/Layers-oluQMEyo.cjs +0 -1
- package/dist/MarkAsGlobalBlock-PG9EQfno.cjs +0 -1
- package/dist/PagesPanel-wYA8ksbF.cjs +0 -1
- package/dist/ProjectPanel-4hGK3CSo.cjs +0 -1
- package/dist/Settings-KS4sVa5a.cjs +0 -1
- package/dist/SidePanels-IfwzrWxw.cjs +0 -1
- package/dist/Topbar-zZtHp9g8.cjs +0 -1
- package/dist/UnsplashImages-nA7MSE46.cjs +0 -1
- package/dist/UploadImages-Ne7knL-U.cjs +0 -1
- package/dist/add-page-modal-az5Y2__Z.cjs +0 -1
- package/dist/blocks.cjs +0 -1
- package/dist/blocks.d.ts +0 -4
- package/dist/blocks.js +0 -20
- package/dist/confirm-alert-tADWj_Cs.cjs +0 -1
- package/dist/delete-page-modal-iits21u4.cjs +0 -1
- package/dist/index-SSmZipiF.js +0 -1191
- package/dist/index-UXNvQkHk.cjs +0 -1
- package/dist/index-plLNWLKk.cjs +0 -9
- package/dist/page-viewer-2SE5kCoO.cjs +0 -1
- package/dist/project-general-setting-XunBDyuZ.cjs +0 -1
- package/dist/project-seo-setting-_nu22LPz.cjs +0 -1
- package/dist/single-page-detail-TjWZvxFa.cjs +0 -1
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { j as s } from "./jsx-runtime-
|
|
1
|
+
import { j as s } from "./jsx-runtime-NV737rRe.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";
|
|
4
4
|
import { HomeIcon as G } from "@radix-ui/react-icons";
|
|
5
|
-
import { bp as Y, B as q } from "./index-
|
|
6
|
-
import { u as g, b as Z, g as $, o as F, r as Q } from "./
|
|
5
|
+
import { bp as Y, B as q } from "./index-pgz9p5Yh.js";
|
|
6
|
+
import { u as g, b as Z, g as $, o as F, r as Q } from "./controls-G0puEH71.js";
|
|
7
7
|
import { toast as U } from "sonner";
|
|
8
|
-
import { F as h } from "./form-
|
|
9
|
-
import { h as V, b as X, i as _, c as K } from "./index-
|
|
10
|
-
import "./
|
|
11
|
-
import "clsx";
|
|
12
|
-
import "tailwind-merge";
|
|
8
|
+
import { F as h } from "./form-rvWlnmcr.js";
|
|
9
|
+
import { h as V, b as X, i as _, c as K } from "./index-UPQtDmUs.js";
|
|
10
|
+
import "./MODIFIERS-MLfpKQY1.js";
|
|
13
11
|
import "@radix-ui/react-toggle";
|
|
14
12
|
import "class-variance-authority";
|
|
13
|
+
import "./utils-PPBbw5bk.js";
|
|
14
|
+
import "clsx";
|
|
15
|
+
import "tailwind-merge";
|
|
15
16
|
import "@radix-ui/react-switch";
|
|
16
17
|
import "@radix-ui/react-slot";
|
|
17
18
|
import "@radix-ui/react-accordion";
|
|
@@ -39,14 +40,6 @@ import "redux-undo";
|
|
|
39
40
|
import "@chaibuilder/runtime";
|
|
40
41
|
import "@react-hookz/web";
|
|
41
42
|
import "react-i18next";
|
|
42
|
-
import "./lib.js";
|
|
43
|
-
import "himalaya";
|
|
44
|
-
import "@mhsdesign/jit-browser-tailwindcss";
|
|
45
|
-
import "@bobthered/tailwindcss-palette-generator";
|
|
46
|
-
import "@tailwindcss/forms";
|
|
47
|
-
import "@tailwindcss/typography";
|
|
48
|
-
import "@tailwindcss/aspect-ratio";
|
|
49
|
-
import "@tailwindcss/line-clamp";
|
|
50
43
|
import "@rjsf/core";
|
|
51
44
|
import "@rjsf/validator-ajv8";
|
|
52
45
|
import "i18next";
|
|
@@ -55,66 +48,76 @@ import "react-textarea-autosize";
|
|
|
55
48
|
import "flagged";
|
|
56
49
|
import "react-dnd";
|
|
57
50
|
import "@minoru/react-dnd-treeview";
|
|
51
|
+
import "./lib.js";
|
|
52
|
+
import "himalaya";
|
|
53
|
+
import "./functions-JFP-oMsY.js";
|
|
54
|
+
import "@mhsdesign/jit-browser-tailwindcss";
|
|
55
|
+
import "@bobthered/tailwindcss-palette-generator";
|
|
56
|
+
import "@tailwindcss/forms";
|
|
57
|
+
import "@tailwindcss/typography";
|
|
58
|
+
import "@tailwindcss/aspect-ratio";
|
|
59
|
+
import "@tailwindcss/line-clamp";
|
|
60
|
+
import "./tailwind-config-d1VL1lzE.js";
|
|
58
61
|
import "react-hotkeys-hook";
|
|
59
62
|
import "lucide-react";
|
|
60
|
-
const O = I.lazy(() => import("./delete-page-modal-
|
|
63
|
+
const O = I.lazy(() => import("./delete-page-modal-ZkdZdhkf.js")), J = I.lazy(() => import("./confirm-alert-LM4La_do.js")), P = (r) => {
|
|
61
64
|
if (!L(r) || !(r.includes("/[") && r.includes("]")))
|
|
62
65
|
return !1;
|
|
63
|
-
const t = /^\[((?:\.{3})?[a-zA-Z0-9_-]+)\]$/,
|
|
66
|
+
const t = /^\[((?:\.{3})?[a-zA-Z0-9_-]+)\]$/, p = /^[a-zA-Z0-9_-]+$/;
|
|
64
67
|
let e = !0;
|
|
65
|
-
return r.split("/").forEach((
|
|
66
|
-
e && (
|
|
68
|
+
return r.split("/").forEach((m) => {
|
|
69
|
+
e && (m.includes("[[") && m.includes("]]") ? e = /^\[\[\.{3}[a-zA-Z0-9_-]+\]\]$/.test(m) : m.includes("[") && m.includes("]") ? e = t.test(m) : e = p.test(m));
|
|
67
70
|
}), e;
|
|
68
71
|
}, f = (r) => r && x(r.seoData) ? {
|
|
69
72
|
...r,
|
|
70
73
|
seoData: { title: "", description: "", image: "" }
|
|
71
|
-
} : r, W = (r,
|
|
72
|
-
const t = !C(y(r, ["seoData"]), y(
|
|
73
|
-
return t ||
|
|
74
|
-
},
|
|
75
|
-
const
|
|
74
|
+
} : r, W = (r, n) => {
|
|
75
|
+
const t = !C(y(r, ["seoData"]), y(n, ["seoData"])), p = !C(f(n).seoData, f(r).seoData);
|
|
76
|
+
return t || p;
|
|
77
|
+
}, mi = ({ open: r, setOpen: n, pageData: t }) => {
|
|
78
|
+
const p = V(), { data: e } = X(), m = _(), c = K("Homepage updated successfully."), [i, T] = j(f(t)), [d, v] = j({
|
|
76
79
|
isHomePage: (e == null ? void 0 : e.homepage) === t.uuid
|
|
77
80
|
}), N = W(i, t);
|
|
78
81
|
z(() => {
|
|
79
82
|
const l = !C(f(t), i), o = (e == null ? void 0 : e.homepage) !== t.uuid && d.isHomePage;
|
|
80
|
-
|
|
81
|
-
}, [e, t, i, d,
|
|
83
|
+
n(l || o ? "PENDING" : "OPEN");
|
|
84
|
+
}, [e, t, i, d, n]);
|
|
82
85
|
const S = () => {
|
|
83
86
|
if (N) {
|
|
84
87
|
if (t.type === "DYNAMIC" && !P((i == null ? void 0 : i.slug) || "")) {
|
|
85
|
-
r === "ALERT" &&
|
|
88
|
+
r === "ALERT" && n("PENDING");
|
|
86
89
|
return;
|
|
87
90
|
}
|
|
88
|
-
|
|
91
|
+
m.mutate(i, {
|
|
89
92
|
onSuccess: () => {
|
|
90
|
-
|
|
93
|
+
p.invalidateQueries({
|
|
91
94
|
refetchType: "active",
|
|
92
95
|
queryKey: ["pages", e == null ? void 0 : e.uuid]
|
|
93
|
-
}),
|
|
96
|
+
}), n("CLOSE"), U.success("Page updated successfully.");
|
|
94
97
|
}
|
|
95
98
|
});
|
|
96
99
|
}
|
|
97
|
-
d.isHomePage && (e == null ? void 0 : e.homepage) !== t.uuid && c.mutate({ ...e, homepage: t == null ? void 0 : t.uuid }, { onSuccess: () =>
|
|
100
|
+
d.isHomePage && (e == null ? void 0 : e.homepage) !== t.uuid && c.mutate({ ...e, homepage: t == null ? void 0 : t.uuid }, { onSuccess: () => n("CLOSE") });
|
|
98
101
|
}, b = ({ formData: l }, o) => {
|
|
99
|
-
T((
|
|
102
|
+
T((u) => {
|
|
100
103
|
var E, A;
|
|
101
104
|
if (!o)
|
|
102
|
-
return
|
|
105
|
+
return u;
|
|
103
106
|
const a = { [o]: l[o] };
|
|
104
107
|
return o === "name" ? a.slug = B((E = l[o]) == null ? void 0 : E.replace(/\d/g, "")) : o === "slug" ? a.slug = (A = l[o]) == null ? void 0 : A.replace(/\d/g, "").replace(/\s+/g, "").replace("--", "-").replace("__", "_") : o === "seoData" && (a.seoData = {
|
|
105
108
|
title: l[o].title || "",
|
|
106
109
|
description: l[o].description || "",
|
|
107
110
|
image: l[o].image || ""
|
|
108
111
|
}), {
|
|
109
|
-
...
|
|
112
|
+
...u,
|
|
110
113
|
...a
|
|
111
114
|
};
|
|
112
115
|
});
|
|
113
116
|
}, H = ({ formData: l }, o) => {
|
|
114
|
-
v((
|
|
117
|
+
v((u) => {
|
|
115
118
|
const a = { [o]: l[o] };
|
|
116
119
|
return {
|
|
117
|
-
...
|
|
120
|
+
...u,
|
|
118
121
|
...a
|
|
119
122
|
};
|
|
120
123
|
});
|
|
@@ -157,9 +160,9 @@ const O = I.lazy(() => import("./delete-page-modal-YYt_TVmB.js")), J = I.lazy(()
|
|
|
157
160
|
{
|
|
158
161
|
open: r === "ALERT",
|
|
159
162
|
title: "Do yo want to save changes?",
|
|
160
|
-
onCancel: () =>
|
|
163
|
+
onCancel: () => n("CLOSE"),
|
|
161
164
|
onConfirm: S,
|
|
162
|
-
disabled: c.isPending ||
|
|
165
|
+
disabled: c.isPending || m.isPending
|
|
163
166
|
}
|
|
164
167
|
),
|
|
165
168
|
/* @__PURE__ */ s.jsx("div", { className: "rounded-md bg-background/30 px-2.5 py-1", children: /* @__PURE__ */ s.jsx("h1", { className: "px-1 font-semibold", children: "Page Details" }) }),
|
|
@@ -171,7 +174,7 @@ const O = I.lazy(() => import("./delete-page-modal-YYt_TVmB.js")), J = I.lazy(()
|
|
|
171
174
|
formData: i,
|
|
172
175
|
properties: M,
|
|
173
176
|
onChange: b,
|
|
174
|
-
disabled:
|
|
177
|
+
disabled: m.isPending || c.isPending
|
|
175
178
|
}
|
|
176
179
|
),
|
|
177
180
|
/* @__PURE__ */ s.jsx("div", { className: "h-2 w-full" }),
|
|
@@ -182,7 +185,7 @@ const O = I.lazy(() => import("./delete-page-modal-YYt_TVmB.js")), J = I.lazy(()
|
|
|
182
185
|
formData: i,
|
|
183
186
|
properties: w,
|
|
184
187
|
onChange: b,
|
|
185
|
-
disabled:
|
|
188
|
+
disabled: m.isPending || c.isPending
|
|
186
189
|
}
|
|
187
190
|
),
|
|
188
191
|
(e == null ? void 0 : e.homepage) !== t.uuid && t.type === "STATIC" ? /* @__PURE__ */ s.jsx(
|
|
@@ -191,7 +194,7 @@ const O = I.lazy(() => import("./delete-page-modal-YYt_TVmB.js")), J = I.lazy(()
|
|
|
191
194
|
formData: d,
|
|
192
195
|
properties: R,
|
|
193
196
|
onChange: H,
|
|
194
|
-
disabled:
|
|
197
|
+
disabled: m.isPending || c.isPending
|
|
195
198
|
}
|
|
196
199
|
) : t.type === "STATIC" && /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-x-1 px-1 pt-2 text-xs font-medium text-gray-500", children: [
|
|
197
200
|
/* @__PURE__ */ s.jsx(G, {}),
|
|
@@ -209,7 +212,7 @@ const O = I.lazy(() => import("./delete-page-modal-YYt_TVmB.js")), J = I.lazy(()
|
|
|
209
212
|
className: "w-full",
|
|
210
213
|
type: "submit",
|
|
211
214
|
onClick: S,
|
|
212
|
-
disabled: (e == null ? void 0 : e.homepage) !== t.uuid && d.isHomePage ? !1 : x(i.name) || x(i.slug) || !N ||
|
|
215
|
+
disabled: (e == null ? void 0 : e.homepage) !== t.uuid && d.isHomePage ? !1 : x(i.name) || x(i.slug) || !N || m.isPending || c.isPending || i.type === "DYNAMIC" && !P((i == null ? void 0 : i.slug) || ""),
|
|
213
216
|
children: "Save"
|
|
214
217
|
}
|
|
215
218
|
),
|
|
@@ -219,5 +222,5 @@ const O = I.lazy(() => import("./delete-page-modal-YYt_TVmB.js")), J = I.lazy(()
|
|
|
219
222
|
] });
|
|
220
223
|
};
|
|
221
224
|
export {
|
|
222
|
-
|
|
225
|
+
mi as default
|
|
223
226
|
};
|
package/dist/studio.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./jsx-runtime-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./jsx-runtime-WUGKV8jN.cjs");const e=require("./index-8dYzEcE3.cjs");require("react");require("sonner");require("./MODIFIERS-WFzDQfiT.cjs");require("i18next");require("react-i18next");require("./index-lH7BBNlu.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-It2K33fU.cjs");require("lodash");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("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("./lib.cjs");require("himalaya");require("./functions-KMQYiBHf.cjs");require("@mhsdesign/jit-browser-tailwindcss");require("@bobthered/tailwindcss-palette-generator");require("@tailwindcss/forms");require("@tailwindcss/typography");require("@tailwindcss/aspect-ratio");require("@tailwindcss/line-clamp");require("./tailwind-config-OxLD7oFU.cjs");require("react-hotkeys-hook");require("lucide-react");exports.ChaiBuilderStudio=e.ChaiBuilderStudio;
|
package/dist/studio.js
CHANGED
|
@@ -1,30 +1,21 @@
|
|
|
1
|
-
import "./jsx-runtime-
|
|
2
|
-
import { C as
|
|
1
|
+
import "./jsx-runtime-NV737rRe.js";
|
|
2
|
+
import { C as pi } from "./index-UPQtDmUs.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "sonner";
|
|
5
|
-
import "./
|
|
6
|
-
import "clsx";
|
|
7
|
-
import "tailwind-merge";
|
|
8
|
-
import "lodash";
|
|
5
|
+
import "./MODIFIERS-MLfpKQY1.js";
|
|
9
6
|
import "i18next";
|
|
10
7
|
import "react-i18next";
|
|
11
|
-
import "./index-
|
|
12
|
-
import "@chaibuilder/runtime";
|
|
13
|
-
import "@radix-ui/react-icons";
|
|
14
|
-
import "./lib.js";
|
|
15
|
-
import "himalaya";
|
|
16
|
-
import "@mhsdesign/jit-browser-tailwindcss";
|
|
17
|
-
import "@bobthered/tailwindcss-palette-generator";
|
|
18
|
-
import "@tailwindcss/forms";
|
|
19
|
-
import "@tailwindcss/typography";
|
|
20
|
-
import "@tailwindcss/aspect-ratio";
|
|
21
|
-
import "@tailwindcss/line-clamp";
|
|
22
|
-
import "./index-PrUoEet_.js";
|
|
8
|
+
import "./index-pgz9p5Yh.js";
|
|
23
9
|
import "@radix-ui/react-toggle";
|
|
24
10
|
import "class-variance-authority";
|
|
11
|
+
import "./utils-PPBbw5bk.js";
|
|
12
|
+
import "lodash";
|
|
13
|
+
import "clsx";
|
|
14
|
+
import "tailwind-merge";
|
|
25
15
|
import "@radix-ui/react-switch";
|
|
26
16
|
import "@radix-ui/react-slot";
|
|
27
17
|
import "@radix-ui/react-accordion";
|
|
18
|
+
import "@radix-ui/react-icons";
|
|
28
19
|
import "@radix-ui/react-alert-dialog";
|
|
29
20
|
import "@radix-ui/react-dialog";
|
|
30
21
|
import "@radix-ui/react-label";
|
|
@@ -46,14 +37,25 @@ import "react-quill";
|
|
|
46
37
|
import "jotai";
|
|
47
38
|
import "flat-to-nested";
|
|
48
39
|
import "redux-undo";
|
|
40
|
+
import "@chaibuilder/runtime";
|
|
49
41
|
import "@react-hookz/web";
|
|
50
42
|
import "@floating-ui/react-dom";
|
|
51
43
|
import "react-textarea-autosize";
|
|
52
44
|
import "flagged";
|
|
53
45
|
import "react-dnd";
|
|
54
46
|
import "@minoru/react-dnd-treeview";
|
|
47
|
+
import "./lib.js";
|
|
48
|
+
import "himalaya";
|
|
49
|
+
import "./functions-JFP-oMsY.js";
|
|
50
|
+
import "@mhsdesign/jit-browser-tailwindcss";
|
|
51
|
+
import "@bobthered/tailwindcss-palette-generator";
|
|
52
|
+
import "@tailwindcss/forms";
|
|
53
|
+
import "@tailwindcss/typography";
|
|
54
|
+
import "@tailwindcss/aspect-ratio";
|
|
55
|
+
import "@tailwindcss/line-clamp";
|
|
56
|
+
import "./tailwind-config-d1VL1lzE.js";
|
|
55
57
|
import "react-hotkeys-hook";
|
|
56
58
|
import "lucide-react";
|
|
57
59
|
export {
|
|
58
|
-
|
|
60
|
+
pi as ChaiBuilderStudio
|
|
59
61
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function o(r={}){return{colors:{border:"hsl(var(--border))",input:"hsl(var(--input))",ring:"hsl(var(--ring))",background:"hsl(var(--background))",foreground:"hsl(var(--foreground))",primary:{DEFAULT:"hsl(var(--primary))",foreground:"hsl(var(--primary-foreground))"},secondary:{DEFAULT:"hsl(var(--secondary))",foreground:"hsl(var(--secondary-foreground))"},destructive:{DEFAULT:"hsl(var(--destructive))",foreground:"hsl(var(--destructive-foreground))"},muted:{DEFAULT:"hsl(var(--muted))",foreground:"hsl(var(--muted-foreground))"},accent:{DEFAULT:"hsl(var(--accent))",foreground:"hsl(var(--accent-foreground))"},popover:{DEFAULT:"hsl(var(--popover))",foreground:"hsl(var(--popover-foreground))"},card:{DEFAULT:"hsl(var(--card))",foreground:"hsl(var(--card-foreground))"}},borderRadius:{lg:"var(--radius)",md:"calc(var(--radius) - 2px)",sm:"calc(var(--radius) - 4px)"},keyframes:{"accordion-down":{from:{height:"0"},to:{height:"var(--radix-accordion-content-height)"}},"accordion-up":{from:{height:"var(--radix-accordion-content-height)"},to:{height:"0"}}},animation:{"accordion-down":"accordion-down 0.2s ease-out","accordion-up":"accordion-up 0.2s ease-out"},...r}}exports.chaiBuilderTheme=o;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
function o(r = {}) {
|
|
2
|
+
return {
|
|
3
|
+
colors: {
|
|
4
|
+
border: "hsl(var(--border))",
|
|
5
|
+
input: "hsl(var(--input))",
|
|
6
|
+
ring: "hsl(var(--ring))",
|
|
7
|
+
background: "hsl(var(--background))",
|
|
8
|
+
foreground: "hsl(var(--foreground))",
|
|
9
|
+
primary: {
|
|
10
|
+
DEFAULT: "hsl(var(--primary))",
|
|
11
|
+
foreground: "hsl(var(--primary-foreground))"
|
|
12
|
+
},
|
|
13
|
+
secondary: {
|
|
14
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
15
|
+
foreground: "hsl(var(--secondary-foreground))"
|
|
16
|
+
},
|
|
17
|
+
destructive: {
|
|
18
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
19
|
+
foreground: "hsl(var(--destructive-foreground))"
|
|
20
|
+
},
|
|
21
|
+
muted: {
|
|
22
|
+
DEFAULT: "hsl(var(--muted))",
|
|
23
|
+
foreground: "hsl(var(--muted-foreground))"
|
|
24
|
+
},
|
|
25
|
+
accent: {
|
|
26
|
+
DEFAULT: "hsl(var(--accent))",
|
|
27
|
+
foreground: "hsl(var(--accent-foreground))"
|
|
28
|
+
},
|
|
29
|
+
popover: {
|
|
30
|
+
DEFAULT: "hsl(var(--popover))",
|
|
31
|
+
foreground: "hsl(var(--popover-foreground))"
|
|
32
|
+
},
|
|
33
|
+
card: {
|
|
34
|
+
DEFAULT: "hsl(var(--card))",
|
|
35
|
+
foreground: "hsl(var(--card-foreground))"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
borderRadius: {
|
|
39
|
+
lg: "var(--radius)",
|
|
40
|
+
md: "calc(var(--radius) - 2px)",
|
|
41
|
+
sm: "calc(var(--radius) - 4px)"
|
|
42
|
+
},
|
|
43
|
+
keyframes: {
|
|
44
|
+
"accordion-down": {
|
|
45
|
+
from: { height: "0" },
|
|
46
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
47
|
+
},
|
|
48
|
+
"accordion-up": {
|
|
49
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
50
|
+
to: { height: "0" }
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
animation: {
|
|
54
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
55
|
+
"accordion-up": "accordion-up 0.2s ease-out"
|
|
56
|
+
},
|
|
57
|
+
...r
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
o as c
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("tailwindcss-animate"),n=require("./tailwind-config-OxLD7oFU.cjs"),d=e=>({darkMode:"class",content:[...e,"node_modules/@chaibuilder/sdk/dist/*.{js,cjs}","node_modules/@chaibuilder/runtime/dist/*.{js,cjs}"],theme:{container:{center:!0,padding:"2rem",screens:{"2xl":"1400px"}},extend:n.chaiBuilderTheme()},plugins:[i]});exports.chaiBuilderTailwindConfig=d;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare const chaiBuilderTailwindConfig: (content: string[]) => {
|
|
2
|
+
darkMode: string;
|
|
3
|
+
content: string[];
|
|
4
|
+
theme: {
|
|
5
|
+
container: {
|
|
6
|
+
center: boolean;
|
|
7
|
+
padding: string;
|
|
8
|
+
screens: {
|
|
9
|
+
"2xl": string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
extend: {
|
|
13
|
+
colors: {
|
|
14
|
+
border: string;
|
|
15
|
+
input: string;
|
|
16
|
+
ring: string;
|
|
17
|
+
background: string;
|
|
18
|
+
foreground: string;
|
|
19
|
+
primary: {
|
|
20
|
+
DEFAULT: string;
|
|
21
|
+
foreground: string;
|
|
22
|
+
};
|
|
23
|
+
secondary: {
|
|
24
|
+
DEFAULT: string;
|
|
25
|
+
foreground: string;
|
|
26
|
+
};
|
|
27
|
+
destructive: {
|
|
28
|
+
DEFAULT: string;
|
|
29
|
+
foreground: string;
|
|
30
|
+
};
|
|
31
|
+
muted: {
|
|
32
|
+
DEFAULT: string;
|
|
33
|
+
foreground: string;
|
|
34
|
+
};
|
|
35
|
+
accent: {
|
|
36
|
+
DEFAULT: string;
|
|
37
|
+
foreground: string;
|
|
38
|
+
};
|
|
39
|
+
popover: {
|
|
40
|
+
DEFAULT: string;
|
|
41
|
+
foreground: string;
|
|
42
|
+
};
|
|
43
|
+
card: {
|
|
44
|
+
DEFAULT: string;
|
|
45
|
+
foreground: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
borderRadius: {
|
|
49
|
+
lg: string;
|
|
50
|
+
md: string;
|
|
51
|
+
sm: string;
|
|
52
|
+
};
|
|
53
|
+
keyframes: {
|
|
54
|
+
"accordion-down": {
|
|
55
|
+
from: {
|
|
56
|
+
height: string;
|
|
57
|
+
};
|
|
58
|
+
to: {
|
|
59
|
+
height: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
"accordion-up": {
|
|
63
|
+
from: {
|
|
64
|
+
height: string;
|
|
65
|
+
};
|
|
66
|
+
to: {
|
|
67
|
+
height: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
animation: {
|
|
72
|
+
"accordion-down": string;
|
|
73
|
+
"accordion-up": string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
plugins: any[];
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export { }
|
package/dist/tailwind.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import i from "tailwindcss-animate";
|
|
2
|
+
import { c as d } from "./tailwind-config-d1VL1lzE.js";
|
|
3
|
+
const t = (e) => ({
|
|
4
|
+
darkMode: "class",
|
|
5
|
+
content: [
|
|
6
|
+
...e,
|
|
7
|
+
"node_modules/@chaibuilder/sdk/dist/*.{js,cjs}",
|
|
8
|
+
"node_modules/@chaibuilder/runtime/dist/*.{js,cjs}"
|
|
9
|
+
],
|
|
10
|
+
theme: {
|
|
11
|
+
container: {
|
|
12
|
+
center: !0,
|
|
13
|
+
padding: "2rem",
|
|
14
|
+
screens: {
|
|
15
|
+
"2xl": "1400px"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
extend: d()
|
|
19
|
+
},
|
|
20
|
+
plugins: [i]
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
t as chaiBuilderTailwindConfig
|
|
24
|
+
};
|
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-lH7BBNlu.cjs");require("./jsx-runtime-WUGKV8jN.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("react");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-It2K33fU.cjs");require("lodash");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("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");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
|
@@ -104,7 +104,7 @@ export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLBu
|
|
|
104
104
|
|
|
105
105
|
export declare const buttonVariants: (props?: {
|
|
106
106
|
variant?: "link" | "default" | "outline" | "secondary" | "destructive" | "ghost";
|
|
107
|
-
size?: "
|
|
107
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
108
108
|
} & ClassProp) => string;
|
|
109
109
|
|
|
110
110
|
export declare const Card: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -153,7 +153,7 @@ export declare const CommandInput: React_2.ForwardRefExoticComponent<Omit<Omit<R
|
|
|
153
153
|
|
|
154
154
|
export declare const CommandItem: React_2.ForwardRefExoticComponent<Omit<{
|
|
155
155
|
children?: React_2.ReactNode;
|
|
156
|
-
} & Omit<React_2.HTMLAttributes<HTMLDivElement>, "
|
|
156
|
+
} & Omit<React_2.HTMLAttributes<HTMLDivElement>, "disabled" | "value" | "onSelect"> & {
|
|
157
157
|
disabled?: boolean;
|
|
158
158
|
onSelect?: (value: string) => void;
|
|
159
159
|
value?: string;
|
|
@@ -444,12 +444,12 @@ declare type ToastProps = React_2.ComponentPropsWithoutRef<typeof Toast>;
|
|
|
444
444
|
|
|
445
445
|
export declare const Toggle: React_2.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: {
|
|
446
446
|
variant?: "default" | "outline";
|
|
447
|
-
size?: "
|
|
447
|
+
size?: "default" | "sm" | "lg";
|
|
448
448
|
} & ClassProp) => string> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
449
449
|
|
|
450
450
|
export declare const toggleVariants: (props?: {
|
|
451
451
|
variant?: "default" | "outline";
|
|
452
|
-
size?: "
|
|
452
|
+
size?: "default" | "sm" | "lg";
|
|
453
453
|
} & ClassProp) => string;
|
|
454
454
|
|
|
455
455
|
export declare const Tooltip: React_2.FC<TooltipPrimitive.TooltipProps>;
|