@chaibuilder/sdk 1.2.25 → 1.2.26
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-l1JENNvq.js +206 -0
- package/dist/AddBlocks-zPPKkeKs.cjs +1 -0
- package/dist/BrandingOptions-DkpqGARR.cjs +1 -0
- package/dist/{BrandingOptions-iTyWpwTs.js → BrandingOptions-udtH5yJs.js} +54 -40
- package/dist/{CanvasArea-dZjng782.js → CanvasArea-h0W-Tyha.js} +324 -340
- package/dist/CanvasArea-zme1r3Zi.cjs +55 -0
- package/dist/Class-PoYusiA5.cjs +1 -0
- package/dist/{Class-ahc3NIbq.js → Class-lGzsNBOK.js} +29 -26
- package/dist/CurrentPage-Hl52iub_.cjs +1 -0
- package/dist/{CurrentPage-Kmfp-kFk.js → CurrentPage-tJUjXWdb.js} +54 -40
- package/dist/Functions-7jnEwJyw.js +15 -0
- package/dist/Functions-N3yhPYKY.cjs +1 -0
- package/dist/ListTree-WvTjY5rr.cjs +1 -0
- package/dist/{ListTree-N3jeD790.js → ListTree-cZ-Ihlt3.js} +96 -86
- package/dist/MODIFIERS-0g14w5RS.cjs +1 -0
- package/dist/{MODIFIERS-CNqNUapY.js → MODIFIERS-dytZ-osO.js} +4 -10
- package/dist/PagesPanel-6rrLXEO-.js +64 -0
- package/dist/PagesPanel-WzCocl6u.cjs +1 -0
- package/dist/ProjectPanel-o7gdcwPn.cjs +1 -0
- package/dist/ProjectPanel-tz3bjdXy.js +85 -0
- package/dist/{STRINGS-b432aBJJ.js → STRINGS--j49GZJP.js} +2 -2
- package/dist/{Settings-jCcd-VE6.js → Settings-4s2LUVmC.js} +401 -407
- package/dist/Settings-AqoKwR92.cjs +1 -0
- package/dist/SidePanels-3o6Okmvu.cjs +1 -0
- package/dist/{SidePanels-pHMYprpW.js → SidePanels-bugFfInz.js} +118 -108
- package/dist/Topbar-CqW7G360.cjs +1 -0
- package/dist/Topbar-pWzBEOed.js +132 -0
- package/dist/UnsplashImages-NGskB93R.cjs +1 -0
- package/dist/{UnsplashImages-L7x_3RQf.js → UnsplashImages-qvwFbV-E.js} +63 -50
- package/dist/{UploadImages-zdEJRLD8.js → UploadImages-9NapgXBq.js} +60 -37
- package/dist/UploadImages-Oh7Glr9A.cjs +1 -0
- package/dist/_commonjsHelpers-UyOWmZb0.js +8 -0
- package/dist/_commonjsHelpers-wDK0ZLPo.cjs +1 -0
- package/dist/add-page-modal--6TTBRYa.cjs +1 -0
- package/dist/add-page-modal-k2Kb92HS.js +104 -0
- package/dist/confirm-alert-C4M9eF-o.cjs +1 -0
- package/dist/confirm-alert-GUhZ_G8w.js +60 -0
- package/dist/controls-KK2oLIa8.cjs +1 -0
- package/dist/{controls-IS5qnRce.js → controls-OfJWSEqC.js} +85 -20
- package/dist/core.cjs +1 -1
- package/dist/core.js +75 -150
- package/dist/defaultTheme-7VqqhOcp.cjs +1 -0
- package/dist/{defaultTheme-4kA60XdB.js → defaultTheme-D8B4-wHO.js} +8 -6
- package/dist/delete-page-modal-cFoL-wdo.cjs +1 -0
- package/dist/delete-page-modal-zONvdebd.js +83 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +292 -3
- package/dist/email.cjs +1 -1
- package/dist/email.js +37 -18
- package/dist/empty-slot-ZBlsQi6m.js +15 -0
- package/dist/empty-slot-nzYOgZuS.cjs +1 -0
- package/dist/{form-0_RLz2TB.js → form-STUz-6nE.js} +12 -12
- package/dist/form-lBQ_76Uw.cjs +1 -0
- package/dist/{html-to-json-uSnxl72F.cjs → html-to-json-efmv1pCj.cjs} +1 -1
- package/dist/{html-to-json-2xtb7520.js → html-to-json-ngX9ef2u.js} +41 -41
- package/dist/index-Gk6sASBd.js +3080 -0
- package/dist/index-OB199Izc.cjs +206 -0
- package/dist/index-SkyM3d6Q.js +39503 -0
- package/dist/index-YpnaudSM.js +63 -0
- package/dist/index-e0c8PmRQ.js +205 -0
- package/dist/index-ecnGWzh9.cjs +1 -0
- package/dist/index-gi1LIOCw.cjs +1 -0
- package/dist/index-h-hd6EvN.cjs +1 -0
- package/dist/index-llTXLDGE.js +2201 -0
- package/dist/index-mbyqq81O.cjs +1 -0
- package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-WbnYoNE9.js} +109 -106
- package/dist/jsx-runtime-Z_BpKhVy.cjs +27 -0
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +66 -62
- package/dist/page-viewer-2kwnKM6v.cjs +1 -0
- package/dist/{page-viewer-NnOwmAmu.js → page-viewer-Pdg9F5Hv.js} +57 -43
- package/dist/project-general-setting-CnNL98NM.cjs +1 -0
- package/dist/{project-general-setting-9ju3TDju.js → project-general-setting-f8Ebsn6K.js} +43 -35
- package/dist/project-seo-setting-mlxL_e2_.cjs +1 -0
- package/dist/{project-seo-setting-36CdUszM.js → project-seo-setting-pX34Qsym.js} +40 -23
- package/dist/render.cjs +1 -1
- package/dist/render.js +14 -13
- package/dist/single-page-detail-XfzrGlzA.cjs +1 -0
- package/dist/{single-page-detail-hD1jKZ8k.js → single-page-detail-dpe5LT0M.js} +74 -66
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +40 -24
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +160 -365
- package/dist/web-blocks.cjs +6 -1
- package/dist/web-blocks.js +1153 -3
- package/package.json +1 -1
- package/dist/AddBlocks-Ol3iIVKa.js +0 -207
- package/dist/AddBlocks-a1c-7Ewz.cjs +0 -1
- package/dist/BrandingOptions-6rnt0UaA.cjs +0 -1
- package/dist/CanvasArea-R4ogF9AT.cjs +0 -55
- package/dist/ChaiBuilderEditor-m30yoOgJ.cjs +0 -163
- package/dist/ChaiBuilderEditor-vP4at00I.js +0 -27974
- package/dist/Class-eieto7e-.cjs +0 -1
- package/dist/Controls-3Cc1XYXg.js +0 -105
- package/dist/Controls-ky25Ebo3.cjs +0 -1
- package/dist/CurrentPage-3gQTH0Zt.cjs +0 -1
- package/dist/Functions-Hvon6AMZ.cjs +0 -1
- package/dist/Functions-NzT2Six_.js +0 -15
- package/dist/ImagesPanel-J1RlG7xG.cjs +0 -1
- package/dist/ImagesPanel-Wb0GF_NA.js +0 -29
- package/dist/ListTree-CZ-mtjZ9.cjs +0 -1
- package/dist/MODIFIERS-o1p3VnpS.cjs +0 -1
- package/dist/PagesPanel-Gi0z6gaf.cjs +0 -1
- package/dist/PagesPanel-u1IB-nRr.js +0 -48
- package/dist/ProjectPanel-EydGZmMW.js +0 -71
- package/dist/ProjectPanel-kiiljG4H.cjs +0 -1
- package/dist/Settings-8ilCSH8b.cjs +0 -1
- package/dist/SidePanels-T36C6Lhc.cjs +0 -1
- package/dist/Topbar-CvWQuspR.cjs +0 -1
- package/dist/Topbar-pbIDUE_B.js +0 -122
- package/dist/UnsplashImages-KBZPd9dv.cjs +0 -1
- package/dist/UploadImages-GkkJVAgG.cjs +0 -1
- package/dist/accordion-oPUeqPCZ.js +0 -42
- package/dist/accordion-ynvFtV_p.cjs +0 -1
- package/dist/add-page-modal-9SGv2hgc.cjs +0 -1
- package/dist/add-page-modal-JCDXZIPW.js +0 -95
- package/dist/alert-dialog-P9xMMB6C.cjs +0 -1
- package/dist/alert-dialog-rypfO5ly.js +0 -64
- package/dist/badge-E-S7CqUt.cjs +0 -1
- package/dist/badge-tEwO7C51.js +0 -23
- package/dist/block-helpers-OKHmRRol.cjs +0 -1
- package/dist/block-helpers-oSFpSsGz.js +0 -23
- package/dist/command-BxR6jaCI.cjs +0 -1
- package/dist/command-Pn3HKDuV.js +0 -97
- package/dist/confirm-alert-uNm0lZ0y.cjs +0 -1
- package/dist/confirm-alert-wR5_VJ1l.js +0 -36
- package/dist/context-menu-8dC9uGXj.js +0 -122
- package/dist/context-menu-IgLbIuth.cjs +0 -1
- package/dist/controls-L7DPvB0m.cjs +0 -1
- package/dist/defaultTheme-mrkeGFGI.cjs +0 -1
- package/dist/delete-page-modal-7KmP1elv.js +0 -67
- package/dist/delete-page-modal-SgfwvfNu.cjs +0 -1
- package/dist/dropdown-menu-El86_9Uo.js +0 -124
- package/dist/dropdown-menu-SiHzqWwZ.cjs +0 -1
- package/dist/form-W58AVUdf.cjs +0 -1
- package/dist/hover-card-KUwpDkW8.cjs +0 -1
- package/dist/hover-card-q138xxXR.js +0 -45
- package/dist/iconBase-gbUAAO2L.cjs +0 -1
- package/dist/iconBase-h4DuR_XT.js +0 -63
- package/dist/index-9MmykVSc.cjs +0 -1
- package/dist/index-hElOGcFr.js +0 -2200
- package/dist/index-lDTsQp7h.js +0 -188
- package/dist/index-rq5Y9ZDy.cjs +0 -1
- package/dist/jsx-runtime-JYMCiFoE.cjs +0 -27
- package/dist/label-KaP7MRrs.js +0 -10
- package/dist/label-tFm8HZdb.cjs +0 -1
- package/dist/link-WbcKdQ9k.cjs +0 -1
- package/dist/link-xuhP-4dN.js +0 -196
- package/dist/page-viewer-Hx5hxHKm.cjs +0 -1
- package/dist/popover-a84pbVhQ.js +0 -23
- package/dist/popover-fKjgcRUx.cjs +0 -1
- package/dist/project-general-setting-FxkwjvJz.cjs +0 -1
- package/dist/project-seo-setting-RU7qiXxb.cjs +0 -1
- package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
- package/dist/scroll-area-ewXbxc3n.js +0 -30
- package/dist/select-7bjg-rr9.cjs +0 -1
- package/dist/select-POGdEDHT.js +0 -75
- package/dist/separator-3Civ-6hb.cjs +0 -1
- package/dist/separator-SctTn0Qi.js +0 -18
- package/dist/single-page-detail-beY0MT1b.cjs +0 -1
- package/dist/skeleton-STeL9VrJ.cjs +0 -1
- package/dist/skeleton-lu8e7q2y.js +0 -239
- package/dist/tabs-_4WbA1cc.cjs +0 -1
- package/dist/tabs-yQ3oGziM.js +0 -106
- package/dist/textarea-1kZEh7ki.cjs +0 -1
- package/dist/textarea-b2QvVhrK.js +0 -73
- package/dist/useAddBlock-8pxOEYIl.cjs +0 -1
- package/dist/useAddBlock-FEKFJNwQ.js +0 -69
- package/dist/useChaiExternalData-fkFgoS80.js +0 -6
- package/dist/useChaiExternalData-rwoAZ6uU.cjs +0 -1
- package/dist/useDarkMode-7i57segK.cjs +0 -1
- package/dist/useDarkMode-8VHJlYyE.js +0 -23
- package/dist/useSelectedBreakpoints-6NK5qd7T.js +0 -10
- package/dist/useSelectedBreakpoints-7ONXb-vN.cjs +0 -1
- package/dist/useStylingState-Iuj84yvc.js +0 -186
- package/dist/useStylingState-OIvJMV6p.cjs +0 -1
- package/dist/useUiLibraries-nCdauJ4N.cjs +0 -1
- package/dist/useUiLibraries-psyWFbNc.js +0 -12
- package/dist/useUpdateBlocksProps-Unn8lUyj.cjs +0 -1
- package/dist/useUpdateBlocksProps-vWcDp-P9.js +0 -23
- package/dist/utils-dze1SGvB.js +0 -6
- package/dist/utils-qK_SjzzV.cjs +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { get as e, omit as
|
|
2
|
-
const
|
|
1
|
+
import { get as e, omit as t } from "lodash-es";
|
|
2
|
+
const a = "#styles:";
|
|
3
|
+
const r = (i) => ({
|
|
3
4
|
type: "singular",
|
|
4
5
|
default: i.default || "",
|
|
5
6
|
binding: e(i, "binding", !0),
|
|
@@ -8,12 +9,12 @@ const d = (i) => ({
|
|
|
8
9
|
required: i.required || !1,
|
|
9
10
|
schema: {
|
|
10
11
|
type: "string",
|
|
11
|
-
...
|
|
12
|
+
...t(i, ["i18n", "required"])
|
|
12
13
|
},
|
|
13
14
|
uiSchema: {
|
|
14
15
|
"ui:placeholder": i.placeholder || "Enter here"
|
|
15
16
|
}
|
|
16
|
-
}),
|
|
17
|
+
}), u = (i) => ({
|
|
17
18
|
type: "singular",
|
|
18
19
|
default: i.default || "",
|
|
19
20
|
binding: e(i, "binding", !0),
|
|
@@ -22,7 +23,7 @@ const d = (i) => ({
|
|
|
22
23
|
required: i.required || !1,
|
|
23
24
|
schema: {
|
|
24
25
|
type: "string",
|
|
25
|
-
...
|
|
26
|
+
...t(i, ["i18n", "required", "rows"])
|
|
26
27
|
},
|
|
27
28
|
uiSchema: {
|
|
28
29
|
"ui:widget": "textarea",
|
|
@@ -31,7 +32,7 @@ const d = (i) => ({
|
|
|
31
32
|
rows: i.rows || 4
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
}),
|
|
35
|
+
}), l = (i) => ({
|
|
35
36
|
type: "singular",
|
|
36
37
|
i18n: i.i18n || !1,
|
|
37
38
|
default: i.default || !1,
|
|
@@ -39,13 +40,13 @@ const d = (i) => ({
|
|
|
39
40
|
binding: e(i, "binding", !0),
|
|
40
41
|
schema: {
|
|
41
42
|
type: "boolean",
|
|
42
|
-
...
|
|
43
|
+
...t(i, ["i18n", "required"])
|
|
43
44
|
},
|
|
44
45
|
uiSchema: {
|
|
45
46
|
"ui:title": i.title || "Select Item",
|
|
46
47
|
"ui:description": ""
|
|
47
48
|
}
|
|
48
|
-
}),
|
|
49
|
+
}), s = (i) => ({
|
|
49
50
|
type: "singular",
|
|
50
51
|
default: i.default || "",
|
|
51
52
|
binding: e(i, "binding", !0),
|
|
@@ -54,7 +55,7 @@ const d = (i) => ({
|
|
|
54
55
|
required: i.required || !1,
|
|
55
56
|
schema: {
|
|
56
57
|
type: "number",
|
|
57
|
-
...
|
|
58
|
+
...t(i, ["i18n", "required"])
|
|
58
59
|
},
|
|
59
60
|
uiSchema: {}
|
|
60
61
|
}), g = (i) => ({
|
|
@@ -66,8 +67,8 @@ const d = (i) => ({
|
|
|
66
67
|
dataType: "string",
|
|
67
68
|
schema: {
|
|
68
69
|
type: "string",
|
|
69
|
-
...
|
|
70
|
-
oneOf: i.options.map((
|
|
70
|
+
...t(i, ["i18n", "required", "options", "binding"]),
|
|
71
|
+
oneOf: i.options.map((n) => ({ const: n.value, title: n.title }))
|
|
71
72
|
},
|
|
72
73
|
uiSchema: {
|
|
73
74
|
"ui:widget": "select"
|
|
@@ -80,12 +81,26 @@ const d = (i) => ({
|
|
|
80
81
|
dataType: "string",
|
|
81
82
|
schema: {
|
|
82
83
|
type: "string",
|
|
83
|
-
...
|
|
84
|
+
...t(i, ["i18n", "required"])
|
|
84
85
|
},
|
|
85
86
|
uiSchema: {
|
|
86
87
|
"ui:widget": "color"
|
|
87
88
|
}
|
|
88
|
-
})
|
|
89
|
+
});
|
|
90
|
+
const y = (i) => ({
|
|
91
|
+
type: "singular",
|
|
92
|
+
default: i.default || "",
|
|
93
|
+
i18n: i.i18n || !1,
|
|
94
|
+
binding: e(i, "binding", !0),
|
|
95
|
+
dataType: "string",
|
|
96
|
+
schema: {
|
|
97
|
+
type: "string",
|
|
98
|
+
...t(i, ["i18n", "required"])
|
|
99
|
+
},
|
|
100
|
+
uiSchema: {
|
|
101
|
+
"ui:widget": "richtext"
|
|
102
|
+
}
|
|
103
|
+
}), m = (i) => ({
|
|
89
104
|
type: "model",
|
|
90
105
|
title: i.title,
|
|
91
106
|
dataType: "object",
|
|
@@ -93,6 +108,51 @@ const d = (i) => ({
|
|
|
93
108
|
binding: e(i, "binding", !0),
|
|
94
109
|
properties: i.properties
|
|
95
110
|
}), o = (i) => ({
|
|
111
|
+
type: "list",
|
|
112
|
+
itemProperties: i.itemProperties,
|
|
113
|
+
binding: e(i, "binding", !0),
|
|
114
|
+
title: i.title,
|
|
115
|
+
dataType: "array",
|
|
116
|
+
default: i.default || [],
|
|
117
|
+
itemTitle: i.getItemLabel ? i.getItemLabel({}) : () => ""
|
|
118
|
+
}), c = (i) => ({
|
|
119
|
+
type: "styles",
|
|
120
|
+
binding: !1,
|
|
121
|
+
default: `${a},${i.default || ""}`,
|
|
122
|
+
presets: i.presets || {}
|
|
123
|
+
}), b = (i) => ({
|
|
124
|
+
default: i.default || "",
|
|
125
|
+
binding: e(i, "binding", !0),
|
|
126
|
+
type: "singular",
|
|
127
|
+
i18n: i.i18n || !1,
|
|
128
|
+
dataType: "string",
|
|
129
|
+
schema: {
|
|
130
|
+
type: "string",
|
|
131
|
+
title: "Icon",
|
|
132
|
+
default: i.default || ""
|
|
133
|
+
},
|
|
134
|
+
uiSchema: {
|
|
135
|
+
"ui:widget": "icon"
|
|
136
|
+
}
|
|
137
|
+
}), f = (i) => ({
|
|
138
|
+
default: i.default,
|
|
139
|
+
type: "singular",
|
|
140
|
+
binding: e(i, "binding", !0),
|
|
141
|
+
dataType: "object",
|
|
142
|
+
i18n: i.i18n || !1,
|
|
143
|
+
schema: {
|
|
144
|
+
type: "object",
|
|
145
|
+
...i || {},
|
|
146
|
+
properties: {
|
|
147
|
+
type: { type: "string" },
|
|
148
|
+
href: { type: "string" },
|
|
149
|
+
target: { type: "string" }
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
uiSchema: {
|
|
153
|
+
"ui:field": "link"
|
|
154
|
+
}
|
|
155
|
+
}), h = (i) => ({
|
|
96
156
|
type: "singular",
|
|
97
157
|
default: i.default || "",
|
|
98
158
|
binding: e(i, "binding", !0),
|
|
@@ -100,19 +160,24 @@ const d = (i) => ({
|
|
|
100
160
|
i18n: i.i18n || !1,
|
|
101
161
|
schema: {
|
|
102
162
|
type: "string",
|
|
103
|
-
...
|
|
163
|
+
...t(i, ["i18n", "required"])
|
|
104
164
|
},
|
|
105
165
|
uiSchema: {
|
|
106
166
|
"ui:widget": "image"
|
|
107
167
|
}
|
|
108
168
|
});
|
|
109
169
|
export {
|
|
110
|
-
|
|
111
|
-
|
|
170
|
+
c as S,
|
|
171
|
+
b as T,
|
|
172
|
+
m as b,
|
|
173
|
+
s as c,
|
|
112
174
|
p as f,
|
|
113
|
-
|
|
114
|
-
o,
|
|
115
|
-
|
|
175
|
+
u as g,
|
|
176
|
+
o as h,
|
|
177
|
+
y as m,
|
|
178
|
+
h as o,
|
|
179
|
+
f as q,
|
|
180
|
+
l as r,
|
|
116
181
|
g as s,
|
|
117
|
-
|
|
182
|
+
r as u
|
|
118
183
|
};
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-OB199Izc.cjs"),e=require("./index-h-hd6EvN.cjs"),r=require("react-i18next");require("i18next");require("./jsx-runtime-Z_BpKhVy.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("flagged");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@radix-ui/react-icons");require("react-hotkeys-hook");require("@chaibuilder/runtime");require("@react-hookz/web");require("./STRINGS-gPz7CUOk.cjs");require("./MODIFIERS-0g14w5RS.cjs");require("./Class-PoYusiA5.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-quill");exports.ChaiBuilderEditor=s.ChaiBuilderEditor;exports.useActiveModal=e.useActiveModal;exports.useActivePanel=e.useActivePanel;exports.useAddBlock=e.useAddBlock;exports.useAddBlockParent=e.useAddBlockParent;exports.useAddClassesToBlocks=e.useAddClassesToBlocks;exports.useAllBlocks=e.useAllBlocks;exports.useBlocksStore=e.useBlocksStore;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderProp=e.useBuilderProp;exports.useBuilderReset=e.useBuilderReset;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;exports.useCopyBlockIds=e.useCopyBlockIds;exports.useCopyToClipboard=e.useCopyToClipboard;exports.useCurrentPage=e.useCurrentPage;exports.useCutBlockIds=e.useCutBlockIds;exports.useDarkMode=e.useDarkMode;exports.useDuplicateBlocks=e.useDuplicateBlocks;exports.useGetPageData=e.useGetPageData;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;exports.useReadOnlyMode=e.useReadOnlyMode;exports.useRemoveBlocks=e.useRemoveBlocks;exports.useRemoveClassesFromBlocks=e.useRemoveClassesFromBlocks;exports.useSavePage=e.useSavePage;exports.useSelectedBlock=e.useSelectedBlock;exports.useSelectedBlockAllClasses=e.useSelectedBlockAllClasses;exports.useSelectedBlockCurrentClasses=e.useSelectedBlockCurrentClasses;exports.useSelectedBlockIds=e.useSelectedBlockIds;exports.useSelectedBlocksDisplayChild=e.useSelectedBlocksDisplayChild;exports.useSelectedBreakpoints=e.useSelectedBreakpoints;exports.useSelectedStylingBlocks=e.useSelectedStylingBlocks;exports.useStylingBreakpoint=e.useStylingBreakpoint;exports.useStylingState=e.useStylingState;exports.useUILibraryBlocks=e.useUILibraryBlocks;exports.useUndoManager=e.useUndoManager;exports.useUpdateBlocksProps=e.useUpdateBlocksProps;exports.useUpdateBlocksPropsRealtime=e.useUpdateBlocksPropsRealtime;Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>r.useTranslation});
|
package/dist/core.js
CHANGED
|
@@ -1,163 +1,88 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { u as Gs, a as Ls, b as Vs } from "./useDarkMode-8VHJlYyE.js";
|
|
9
|
-
import { u as Zs, a as qs } from "./useSelectedBreakpoints-6NK5qd7T.js";
|
|
10
|
-
import { u as Js } from "./skeleton-lu8e7q2y.js";
|
|
11
|
-
import { useTranslation as Ns } from "react-i18next";
|
|
12
|
-
import { u as Xs } from "./useUiLibraries-psyWFbNc.js";
|
|
13
|
-
import { u as $s, a as so } from "./useUpdateBlocksProps-vWcDp-P9.js";
|
|
14
|
-
import "./jsx-runtime-Sp0orL4X.js";
|
|
15
|
-
import "./MODIFIERS-CNqNUapY.js";
|
|
1
|
+
import { C as G } from "./index-SkyM3d6Q.js";
|
|
2
|
+
import { K, a9 as N, L as Q, aa as V, M as X, a8 as Y, E as _, F as $, h as j, u as ss, N as es, O as os, P as as, Q as ts, R as rs, U as is, V as ps, t as ls, W as ms, X as us, Y as ds, Z as cs, q as Bs, J as ks, s as ns, _ as Cs, z as Ss, a1 as Ps, a0 as gs, $ as vs, r as ys, a7 as As, ab as hs, ac as Is, a2 as Ms, a4 as Rs, a3 as Us, v as Ds, a5 as bs, a6 as fs } from "./index-Gk6sASBd.js";
|
|
3
|
+
import { useTranslation as Os } from "react-i18next";
|
|
4
|
+
import "i18next";
|
|
5
|
+
import "./jsx-runtime-WbnYoNE9.js";
|
|
6
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
7
|
+
import "react";
|
|
16
8
|
import "clsx";
|
|
17
|
-
import "@radix-ui/react-scroll-area";
|
|
18
9
|
import "react-dom";
|
|
10
|
+
import "@radix-ui/react-scroll-area";
|
|
19
11
|
import "@floating-ui/react-dom";
|
|
20
|
-
import "
|
|
12
|
+
import "jotai";
|
|
21
13
|
import "flagged";
|
|
22
|
-
import "
|
|
14
|
+
import "lodash-es";
|
|
15
|
+
import "./Functions-7jnEwJyw.js";
|
|
23
16
|
import "tailwind-merge";
|
|
24
17
|
import "@radix-ui/react-icons";
|
|
25
18
|
import "react-hotkeys-hook";
|
|
26
|
-
import "@react-hookz/web";
|
|
27
19
|
import "@chaibuilder/runtime";
|
|
28
|
-
import "
|
|
29
|
-
import "./
|
|
30
|
-
import "./
|
|
31
|
-
import "./Class-
|
|
32
|
-
import "@radix-ui/react-
|
|
20
|
+
import "@react-hookz/web";
|
|
21
|
+
import "./STRINGS--j49GZJP.js";
|
|
22
|
+
import "./MODIFIERS-dytZ-osO.js";
|
|
23
|
+
import "./Class-lGzsNBOK.js";
|
|
24
|
+
import "@radix-ui/react-toggle";
|
|
33
25
|
import "class-variance-authority";
|
|
34
|
-
import "
|
|
26
|
+
import "@radix-ui/react-switch";
|
|
27
|
+
import "@radix-ui/react-slot";
|
|
28
|
+
import "@radix-ui/react-accordion";
|
|
29
|
+
import "@radix-ui/react-alert-dialog";
|
|
30
|
+
import "@radix-ui/react-dialog";
|
|
31
|
+
import "@radix-ui/react-label";
|
|
32
|
+
import "@radix-ui/react-tabs";
|
|
35
33
|
import "@radix-ui/react-tooltip";
|
|
34
|
+
import "@radix-ui/react-popover";
|
|
35
|
+
import "@radix-ui/react-menubar";
|
|
36
|
+
import "@radix-ui/react-hover-card";
|
|
37
|
+
import "@radix-ui/react-select";
|
|
38
|
+
import "@radix-ui/react-dropdown-menu";
|
|
39
|
+
import "@radix-ui/react-separator";
|
|
36
40
|
import "@radix-ui/react-toast";
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
[s, r]
|
|
43
|
-
);
|
|
44
|
-
return [o, t];
|
|
45
|
-
}, d = a([]), cs = () => {
|
|
46
|
-
const [o, s] = l(d), r = m(C), t = c(
|
|
47
|
-
(e) => {
|
|
48
|
-
s(e), r([]);
|
|
49
|
-
},
|
|
50
|
-
[s, r]
|
|
51
|
-
);
|
|
52
|
-
return [o, t];
|
|
53
|
-
}, h = a([]), as = () => {
|
|
54
|
-
const [o, s] = l(h), r = c(
|
|
55
|
-
(t) => {
|
|
56
|
-
s((e) => B(e, t) ? y(e, t) : [...e, t]);
|
|
57
|
-
},
|
|
58
|
-
[s]
|
|
59
|
-
);
|
|
60
|
-
return [o, s, r];
|
|
61
|
-
}, w = () => {
|
|
62
|
-
const o = u(p);
|
|
63
|
-
return c(
|
|
64
|
-
(s, r) => {
|
|
65
|
-
const t = v(o, (e) => (B(s, k(e, "_id")) && M(e, "_parent", r), e));
|
|
66
|
-
console.log("newBlocks", t);
|
|
67
|
-
},
|
|
68
|
-
[o]
|
|
69
|
-
);
|
|
70
|
-
}, ls = () => {
|
|
71
|
-
console.warn("usePasteBlocks is not implemented");
|
|
72
|
-
const o = u(d), [s, r] = x(), t = g(), e = w();
|
|
73
|
-
return {
|
|
74
|
-
canPaste: I(
|
|
75
|
-
() => s.length > 0 || o.length > 0,
|
|
76
|
-
[o, s]
|
|
77
|
-
),
|
|
78
|
-
pasteBlocks: c(
|
|
79
|
-
(n) => {
|
|
80
|
-
P(o) ? e(s, n) : t(o, n), r(() => []);
|
|
81
|
-
},
|
|
82
|
-
[s, o, t, e, r]
|
|
83
|
-
)
|
|
84
|
-
};
|
|
85
|
-
}, f = {
|
|
86
|
-
name: "",
|
|
87
|
-
props: {},
|
|
88
|
-
modalProps: {},
|
|
89
|
-
backdropClose: !0
|
|
90
|
-
}, b = a(f), ns = () => {
|
|
91
|
-
const [o, s] = l(b), r = c(
|
|
92
|
-
(e, i = {}, n = {}) => {
|
|
93
|
-
s({ name: e, props: i, modalProps: n });
|
|
94
|
-
},
|
|
95
|
-
[s]
|
|
96
|
-
), t = c(
|
|
97
|
-
(...e) => {
|
|
98
|
-
k(o, "props.onClose", () => {
|
|
99
|
-
})(...e), s(f);
|
|
100
|
-
},
|
|
101
|
-
[s, o]
|
|
102
|
-
);
|
|
103
|
-
return {
|
|
104
|
-
activeModal: o,
|
|
105
|
-
openModal: r,
|
|
106
|
-
closeModal: t
|
|
107
|
-
};
|
|
108
|
-
}, us = () => (console.warn("useAllBlocks is deprecated, use useBlocksStore() instead"), u(p)), is = () => u(A), T = a(""), R = a(null), ds = () => l(T), ps = () => l(R), ms = () => {
|
|
109
|
-
const [o, s] = S(null), r = c(async (t) => {
|
|
110
|
-
if (!(navigator != null && navigator.clipboard))
|
|
111
|
-
return console.warn("Clipboard not supported"), !1;
|
|
112
|
-
try {
|
|
113
|
-
return await navigator.clipboard.writeText(t), s(t), !0;
|
|
114
|
-
} catch (e) {
|
|
115
|
-
return console.warn("Copy failed", e), s(null), !1;
|
|
116
|
-
}
|
|
117
|
-
}, []);
|
|
118
|
-
return [o, r];
|
|
119
|
-
};
|
|
41
|
+
import "cmdk";
|
|
42
|
+
import "@radix-ui/react-context-menu";
|
|
43
|
+
import "react-icons-picker";
|
|
44
|
+
import "react-quill";
|
|
120
45
|
export {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
46
|
+
G as ChaiBuilderEditor,
|
|
47
|
+
K as useActiveModal,
|
|
48
|
+
N as useActivePanel,
|
|
49
|
+
Q as useAddBlock,
|
|
50
|
+
V as useAddBlockParent,
|
|
51
|
+
X as useAddClassesToBlocks,
|
|
52
|
+
Y as useAllBlocks,
|
|
53
|
+
_ as useBlocksStore,
|
|
54
|
+
$ as useBrandingOptions,
|
|
55
|
+
j as useBuilderProp,
|
|
56
|
+
ss as useBuilderReset,
|
|
57
|
+
es as useCanvasWidth,
|
|
58
|
+
os as useCanvasZoom,
|
|
59
|
+
as as useCopyBlockIds,
|
|
60
|
+
ts as useCopyToClipboard,
|
|
61
|
+
rs as useCurrentPage,
|
|
62
|
+
is as useCutBlockIds,
|
|
63
|
+
ps as useDarkMode,
|
|
64
|
+
ls as useDuplicateBlocks,
|
|
65
|
+
ms as useGetPageData,
|
|
66
|
+
us as useHiddenBlockIds,
|
|
67
|
+
ds as useHighlightBlockId,
|
|
68
|
+
cs as usePasteBlocks,
|
|
69
|
+
Bs as usePreviewMode,
|
|
70
|
+
ks as useReadOnlyMode,
|
|
71
|
+
ns as useRemoveBlocks,
|
|
72
|
+
Cs as useRemoveClassesFromBlocks,
|
|
73
|
+
Ss as useSavePage,
|
|
74
|
+
Ps as useSelectedBlock,
|
|
75
|
+
gs as useSelectedBlockAllClasses,
|
|
76
|
+
vs as useSelectedBlockCurrentClasses,
|
|
77
|
+
ys as useSelectedBlockIds,
|
|
78
|
+
As as useSelectedBlocksDisplayChild,
|
|
79
|
+
hs as useSelectedBreakpoints,
|
|
80
|
+
Is as useSelectedStylingBlocks,
|
|
81
|
+
Ms as useStylingBreakpoint,
|
|
82
|
+
Rs as useStylingState,
|
|
83
|
+
Os as useTranslation,
|
|
84
|
+
Us as useUILibraryBlocks,
|
|
85
|
+
Ds as useUndoManager,
|
|
86
|
+
bs as useUpdateBlocksProps,
|
|
87
|
+
fs as useUpdateBlocksPropsRealtime
|
|
163
88
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("lodash-es"),m=require("./STRINGS-gPz7CUOk.cjs"),d=require("./_commonjsHelpers-wDK0ZLPo.cjs"),x=(e,t="")=>{const r=i.get(e,"bodyTextLightColor","#64748b"),n=i.get(e,"bodyTextDarkColor","#94a3b8"),o=i.get(e,"bodyBgLightColor","#FFFFFF"),a=i.get(e,"bodyBgDarkColor","#0f172a");return`${t}font-body ${t}antialiased ${t}text-[${r}] ${t}bg-[${o}] dark:${t}text-[${n}] dark:${t}bg-[${a}]`},u=(e,t="")=>{const n=e.replace(m.STYLES_KEY,"").split(",").map(o=>o.split(" ").map(s=>{if(s==="")return"";if(s.includes(":")){const l=s.split(":");return l[l.length-1]=t+i.last(l),l.join(":")}return`${t}${s}`}).join(" "));return`${m.STYLES_KEY}${n.join(" , ")}`};var c={},g={};(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"cloneDeep",{enumerable:!0,get:function(){return t}});function t(r){return Array.isArray(r)?r.map(n=>t(n)):typeof r=="object"&&r!==null?Object.fromEntries(Object.entries(r).map(([n,o])=>[n,t(o)])):r}})(g);var f={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:e})=>({...e("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>e("brightness"),backdropContrast:({theme:e})=>e("contrast"),backdropGrayscale:({theme:e})=>e("grayscale"),backdropHueRotate:({theme:e})=>e("hueRotate"),backdropInvert:({theme:e})=>e("invert"),backdropOpacity:({theme:e})=>e("opacity"),backdropSaturate:({theme:e})=>e("saturate"),backdropSepia:({theme:e})=>e("sepia"),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({...e("colors"),DEFAULT:e("colors.gray.200","currentColor")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>({...e("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:e})=>e("colors"),colors:({colors:e})=>({inherit:e.inherit,current:e.current,transparent:e.transparent,black:e.black,white:e.white,slate:e.slate,gray:e.gray,zinc:e.zinc,neutral:e.neutral,stone:e.stone,red:e.red,orange:e.orange,amber:e.amber,yellow:e.yellow,lime:e.lime,green:e.green,emerald:e.emerald,teal:e.teal,cyan:e.cyan,sky:e.sky,blue:e.blue,indigo:e.indigo,violet:e.violet,purple:e.purple,fuchsia:e.fuchsia,pink:e.pink,rose:e.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>e("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>({none:"none",...e("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridTemplateColumns:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))"},height:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:e})=>({...e("spacing"),none:"none",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:e,breakpoints:t})=>({none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t(e("screens"))}),minHeight:{0:"0px",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",20:"0.2",25:"0.25",30:"0.3",40:"0.4",50:"0.5",60:"0.6",70:"0.7",75:"0.75",80:"0.8",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:e("colors.blue.500","#3b82f6"),...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:e})=>({...e("spacing")}),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:e})=>({...e("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:e})=>({...e("spacing")}),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),width:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]};(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=g,r=n(f);function n(a){return a&&a.__esModule?a:{default:a}}const o=(0,t.cloneDeep)(r.default.theme)})(c);let p=c;var b=(p.__esModule?p:{default:p}).default;const h=d.getDefaultExportFromCjs(b);exports.addPrefixToClasses=u;exports.defaultTheme=h;exports.getBrandingClasses=x;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { get as
|
|
2
|
-
import {
|
|
3
|
-
import { g as d } from "./
|
|
1
|
+
import { get as l, last as x } from "lodash-es";
|
|
2
|
+
import { a as m } from "./STRINGS--j49GZJP.js";
|
|
3
|
+
import { g as d } from "./_commonjsHelpers-UyOWmZb0.js";
|
|
4
4
|
const z = (e, t = "") => {
|
|
5
|
-
const r =
|
|
5
|
+
const r = l(e, "bodyTextLightColor", "#64748b"), n = l(e, "bodyTextDarkColor", "#94a3b8"), o = l(e, "bodyBgLightColor", "#FFFFFF"), a = l(e, "bodyBgDarkColor", "#0f172a");
|
|
6
6
|
return `${t}font-body ${t}antialiased ${t}text-[${r}] ${t}bg-[${o}] dark:${t}text-[${n}] dark:${t}bg-[${a}]`;
|
|
7
7
|
}, k = (e, t = "") => {
|
|
8
8
|
const n = e.replace(m, "").split(",").map((o) => o.split(" ").map((i) => {
|
|
@@ -18,6 +18,7 @@ const z = (e, t = "") => {
|
|
|
18
18
|
};
|
|
19
19
|
var c = {}, g = {};
|
|
20
20
|
(function(e) {
|
|
21
|
+
"use strict";
|
|
21
22
|
Object.defineProperty(e, "__esModule", {
|
|
22
23
|
value: !0
|
|
23
24
|
}), Object.defineProperty(e, "cloneDeep", {
|
|
@@ -1025,6 +1026,7 @@ var u = {
|
|
|
1025
1026
|
plugins: []
|
|
1026
1027
|
};
|
|
1027
1028
|
(function(e) {
|
|
1029
|
+
"use strict";
|
|
1028
1030
|
Object.defineProperty(e, "__esModule", {
|
|
1029
1031
|
value: !0
|
|
1030
1032
|
}), Object.defineProperty(e, "default", {
|
|
@@ -1041,8 +1043,8 @@ var u = {
|
|
|
1041
1043
|
}
|
|
1042
1044
|
const o = (0, t.cloneDeep)(r.default.theme);
|
|
1043
1045
|
})(c);
|
|
1044
|
-
let
|
|
1045
|
-
var f = (
|
|
1046
|
+
let p = c;
|
|
1047
|
+
var f = (p.__esModule ? p : { default: p }).default;
|
|
1046
1048
|
const C = /* @__PURE__ */ d(f);
|
|
1047
1049
|
export {
|
|
1048
1050
|
k as a,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("./index-h-hd6EvN.cjs"),l=require("./index-mbyqq81O.cjs"),q=require("@radix-ui/react-icons");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./STRINGS-gPz7CUOk.cjs");require("@react-hookz/web");require("./MODIFIERS-0g14w5RS.cjs");require("./Class-PoYusiA5.cjs");require("react-i18next");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-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("./index-OB199Izc.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-efmv1pCj.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");const d=({pageData:i,projectData:t})=>{const n={},u=l.useDeletePage(),s=i.uuid===t.homepage,o=()=>{u.mutate(i,{onSuccess:()=>{n({uuid:t.homepage,slug:"/home"})}})};return e.jsxRuntimeExports.jsxs(r.AlertDialog,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTrigger,{disabled:s,children:e.jsxRuntimeExports.jsx("div",{className:`flex h-full items-center justify-center rounded-md border px-2 py-2 font-medium hover:bg-red-400 hover:text-white ${s?"cursor-not-allowed border-red-200 text-red-200":"cursor-pointer border-red-400 text-red-400"}`,children:e.jsxRuntimeExports.jsx(q.TrashIcon,{})})}),e.jsxRuntimeExports.jsxs(r.AlertDialogContent,{children:[e.jsxRuntimeExports.jsxs(r.AlertDialogTitle,{children:["Are you sure you want to delete ",e.jsxRuntimeExports.jsx("i",{className:"text-red-500",children:i.name})," page?"]}),e.jsxRuntimeExports.jsx(r.AlertDialogDescription,{children:"This action cannot be undone. This will permanently delete your page."}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-3",children:[e.jsxRuntimeExports.jsx(r.AlertDialogCancel,{disabled:u.isPending,children:"Cancel"}),e.jsxRuntimeExports.jsx(r.Button,{variant:"destructive",onClick:o,disabled:u.isPending,children:"Yes, Delete"})]})]})]})};exports.default=d;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
+
import { A as p, a as l, b as n, d, e as a, g as c, B as u } from "./index-Gk6sASBd.js";
|
|
3
|
+
import { h } from "./index-llTXLDGE.js";
|
|
4
|
+
import { TrashIcon as x } from "@radix-ui/react-icons";
|
|
5
|
+
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import "lodash-es";
|
|
8
|
+
import "./Functions-7jnEwJyw.js";
|
|
9
|
+
import "clsx";
|
|
10
|
+
import "tailwind-merge";
|
|
11
|
+
import "@chaibuilder/runtime";
|
|
12
|
+
import "jotai";
|
|
13
|
+
import "./STRINGS--j49GZJP.js";
|
|
14
|
+
import "@react-hookz/web";
|
|
15
|
+
import "./MODIFIERS-dytZ-osO.js";
|
|
16
|
+
import "./Class-lGzsNBOK.js";
|
|
17
|
+
import "react-i18next";
|
|
18
|
+
import "@radix-ui/react-toggle";
|
|
19
|
+
import "class-variance-authority";
|
|
20
|
+
import "@radix-ui/react-switch";
|
|
21
|
+
import "@radix-ui/react-slot";
|
|
22
|
+
import "@radix-ui/react-accordion";
|
|
23
|
+
import "@radix-ui/react-alert-dialog";
|
|
24
|
+
import "@radix-ui/react-dialog";
|
|
25
|
+
import "@radix-ui/react-label";
|
|
26
|
+
import "@radix-ui/react-scroll-area";
|
|
27
|
+
import "@radix-ui/react-tabs";
|
|
28
|
+
import "@radix-ui/react-tooltip";
|
|
29
|
+
import "@radix-ui/react-popover";
|
|
30
|
+
import "@radix-ui/react-menubar";
|
|
31
|
+
import "@radix-ui/react-hover-card";
|
|
32
|
+
import "@radix-ui/react-select";
|
|
33
|
+
import "@radix-ui/react-dropdown-menu";
|
|
34
|
+
import "@radix-ui/react-separator";
|
|
35
|
+
import "@radix-ui/react-toast";
|
|
36
|
+
import "cmdk";
|
|
37
|
+
import "@radix-ui/react-context-menu";
|
|
38
|
+
import "react-icons-picker";
|
|
39
|
+
import "react-dom";
|
|
40
|
+
import "react-quill";
|
|
41
|
+
import "./index-SkyM3d6Q.js";
|
|
42
|
+
import "i18next";
|
|
43
|
+
import "@floating-ui/react-dom";
|
|
44
|
+
import "flagged";
|
|
45
|
+
import "react-hotkeys-hook";
|
|
46
|
+
import "sonner";
|
|
47
|
+
import "./html-to-json-ngX9ef2u.js";
|
|
48
|
+
import "himalaya";
|
|
49
|
+
import "lucide-react";
|
|
50
|
+
import "./index-YpnaudSM.js";
|
|
51
|
+
const ce = ({ pageData: r, projectData: i }) => {
|
|
52
|
+
const m = {}, t = h(), o = r.uuid === i.homepage, s = () => {
|
|
53
|
+
t.mutate(r, {
|
|
54
|
+
onSuccess: () => {
|
|
55
|
+
m({ uuid: i.homepage, slug: "/home" });
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
return /* @__PURE__ */ e.jsxs(p, { children: [
|
|
60
|
+
/* @__PURE__ */ e.jsx(l, { disabled: o, children: /* @__PURE__ */ e.jsx(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
className: `flex h-full items-center justify-center rounded-md border px-2 py-2 font-medium hover:bg-red-400 hover:text-white ${o ? "cursor-not-allowed border-red-200 text-red-200" : "cursor-pointer border-red-400 text-red-400"}`,
|
|
64
|
+
children: /* @__PURE__ */ e.jsx(x, {})
|
|
65
|
+
}
|
|
66
|
+
) }),
|
|
67
|
+
/* @__PURE__ */ e.jsxs(n, { children: [
|
|
68
|
+
/* @__PURE__ */ e.jsxs(d, { children: [
|
|
69
|
+
"Are you sure you want to delete ",
|
|
70
|
+
/* @__PURE__ */ e.jsx("i", { className: "text-red-500", children: r.name }),
|
|
71
|
+
" page?"
|
|
72
|
+
] }),
|
|
73
|
+
/* @__PURE__ */ e.jsx(a, { children: "This action cannot be undone. This will permanently delete your page." }),
|
|
74
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-3", children: [
|
|
75
|
+
/* @__PURE__ */ e.jsx(c, { disabled: t.isPending, children: "Cancel" }),
|
|
76
|
+
/* @__PURE__ */ e.jsx(u, { variant: "destructive", onClick: s, disabled: t.isPending, children: "Yes, Delete" })
|
|
77
|
+
] })
|
|
78
|
+
] })
|
|
79
|
+
] });
|
|
80
|
+
};
|
|
81
|
+
export {
|
|
82
|
+
ce as default
|
|
83
|
+
};
|