@chaibuilder/sdk 2.0.0-beta.95 → 2.0.0-beta.97
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/ChaiThemeFn-Cort9tch.js +201 -0
- package/dist/ChaiThemeFn-DQu-2Eh9.cjs +13 -0
- package/dist/CodeEditor-B2x4yruH.cjs +1 -0
- package/dist/CodeEditor-VcQsGvTM.js +65 -0
- package/dist/Topbar-BQsjWb-A.js +16 -0
- package/dist/Topbar-DEw_kBMz.cjs +1 -0
- package/dist/context-menu-C4lLV8gP.cjs +1 -0
- package/dist/context-menu-D5ViOi6K.js +831 -0
- package/dist/core.cjs +5 -11770
- package/dist/core.js +3994 -6891
- package/dist/getSplitClasses-DodqA_KW.cjs +1 -0
- package/dist/getSplitClasses-DphwgQiE.js +48 -0
- package/dist/iconBase-Cn2BsTrq.cjs +1 -0
- package/dist/iconBase-DHfFLkem.js +124 -0
- package/dist/plugin-2xcljWGM.cjs +1 -0
- package/dist/plugin-kUMxtQR5.js +24 -0
- package/dist/render.cjs +2 -247
- package/dist/render.js +150 -205
- package/dist/runtime.cjs +1 -9
- package/dist/sdk.css +1 -1336
- package/dist/tailwind.cjs +1 -78
- package/dist/tailwind.js +19 -21
- package/dist/ui.cjs +1 -378
- package/dist/ui.js +244 -254
- package/dist/web-blocks.cjs +2 -1679
- package/dist/web-blocks.js +518 -747
- package/package.json +1 -1
- package/dist/ChaiThemeFn-DcE5RdLQ.cjs +0 -236
- package/dist/ChaiThemeFn-DzirXKjI.js +0 -237
- package/dist/CodeEditor-C8_JzwHn.cjs +0 -81
- package/dist/CodeEditor-DdIk_PEV.js +0 -81
- package/dist/Topbar-62QmCKWL.cjs +0 -18
- package/dist/Topbar-Cqt0j3Yt.js +0 -18
- package/dist/context-menu-DHla8ofZ.js +0 -893
- package/dist/context-menu-DawHUIXd.cjs +0 -923
- package/dist/getSplitClasses-BuALfSLX.js +0 -54
- package/dist/getSplitClasses-mbQmvwI3.cjs +0 -53
- package/dist/iconBase-BSrIcOaG.cjs +0 -146
- package/dist/iconBase-CWgVxu0A.js +0 -147
- package/dist/plugin-BcTnEZwx.cjs +0 -26
- package/dist/plugin-DGEKY3uC.js +0 -27
package/dist/web-blocks.js
CHANGED
|
@@ -1,35 +1,25 @@
|
|
|
1
|
-
import { registerChaiBlockSchema, StylesProp, registerChaiBlock } from "@chaibuilder/runtime";
|
|
2
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
4
|
-
import { createElement } from "react";
|
|
5
|
-
import { c as
|
|
6
|
-
import { ButtonIcon, CodeIcon, HeadingIcon, TextIcon, CursorTextIcon, DividerHorizontalIcon, SketchLogoIcon, ImageIcon
|
|
7
|
-
import { isEmpty, get, isNull, pick, omit, map } from "lodash-es";
|
|
8
|
-
import { GlobeIcon, GroupIcon, Columns, Rows } from "lucide-react";
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (!children) {
|
|
17
|
-
nestedChildren = /* @__PURE__ */ jsx(EmptySlot, { inBuilder });
|
|
18
|
-
}
|
|
19
|
-
let cssStyles = {};
|
|
20
|
-
if (backgroundImage) {
|
|
21
|
-
cssStyles = { backgroundImage: `url(${backgroundImage})` };
|
|
22
|
-
}
|
|
23
|
-
return React.createElement(tag, { ...blockProps, ...styles, style: cssStyles }, nestedChildren);
|
|
24
|
-
};
|
|
25
|
-
const Config$s = {
|
|
1
|
+
import { registerChaiBlockSchema as m, StylesProp as u, registerChaiBlock as d } from "@chaibuilder/runtime";
|
|
2
|
+
import { jsx as i, jsxs as b, Fragment as R } from "react/jsx-runtime";
|
|
3
|
+
import * as f from "react";
|
|
4
|
+
import { createElement as L } from "react";
|
|
5
|
+
import { c as C, G as A, g as I } from "./iconBase-DHfFLkem.js";
|
|
6
|
+
import { ButtonIcon as T, CodeIcon as H, HeadingIcon as z, TextIcon as F, CursorTextIcon as j, DividerHorizontalIcon as D, SketchLogoIcon as q, ImageIcon as $, Link1Icon as G, RowsIcon as U, ColumnsIcon as V, SpaceBetweenVerticallyIcon as O, VideoIcon as W, CheckboxIcon as X, InputIcon as E, LetterCaseToggleIcon as Y, RadiobuttonIcon as Z, DropdownMenuIcon as J } from "@radix-ui/react-icons";
|
|
7
|
+
import { isEmpty as w, get as h, isNull as K, pick as Q, omit as ee, map as P } from "lodash-es";
|
|
8
|
+
import { GlobeIcon as te, GroupIcon as le, Columns as oe, Rows as ne } from "lucide-react";
|
|
9
|
+
const v = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ i("div", { className: C("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ i("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, re = (e) => {
|
|
10
|
+
const { blockProps: l, inBuilder: t, backgroundImage: n, children: o, tag: r = "div", styles: s } = e;
|
|
11
|
+
let a = o;
|
|
12
|
+
o || (a = /* @__PURE__ */ i(v, { inBuilder: t }));
|
|
13
|
+
let c = {};
|
|
14
|
+
return n && (c = { backgroundImage: `url(${n})` }), f.createElement(r, { ...l, ...s, style: c }, a);
|
|
15
|
+
}, ie = {
|
|
26
16
|
type: "Box",
|
|
27
17
|
label: "Box",
|
|
28
18
|
category: "core",
|
|
29
19
|
group: "basic",
|
|
30
|
-
...
|
|
20
|
+
...m({
|
|
31
21
|
properties: {
|
|
32
|
-
styles:
|
|
22
|
+
styles: u(""),
|
|
33
23
|
backgroundImage: {
|
|
34
24
|
type: "string",
|
|
35
25
|
default: "",
|
|
@@ -62,50 +52,38 @@ const Config$s = {
|
|
|
62
52
|
}
|
|
63
53
|
}
|
|
64
54
|
}),
|
|
65
|
-
canAcceptBlock: () =>
|
|
66
|
-
}
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const child = children || /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
71
|
-
/* @__PURE__ */ jsx("span", { "data-ai-key": "content", children: content }),
|
|
72
|
-
_icon && /* @__PURE__ */ jsx(
|
|
55
|
+
canAcceptBlock: () => !0
|
|
56
|
+
}, se = (e) => {
|
|
57
|
+
const { blockProps: l, iconSize: t, icon: n, content: o, styles: r, children: s, iconPos: a, link: c, inBuilder: y } = e, g = n, k = s || /* @__PURE__ */ b(R, { children: [
|
|
58
|
+
/* @__PURE__ */ i("span", { "data-ai-key": "content", children: o }),
|
|
59
|
+
g && /* @__PURE__ */ i(
|
|
73
60
|
"div",
|
|
74
61
|
{
|
|
75
|
-
style: { width:
|
|
76
|
-
className:
|
|
77
|
-
dangerouslySetInnerHTML: { __html:
|
|
62
|
+
style: { width: t + "px" },
|
|
63
|
+
className: a + " " + (a === "order-first" ? "mr-2" : "ml-2") || "",
|
|
64
|
+
dangerouslySetInnerHTML: { __html: g }
|
|
78
65
|
}
|
|
79
66
|
)
|
|
80
|
-
] })
|
|
81
|
-
const button = createElement(
|
|
67
|
+
] }), p = L(
|
|
82
68
|
"button",
|
|
83
69
|
{
|
|
84
|
-
...
|
|
85
|
-
...
|
|
70
|
+
...l,
|
|
71
|
+
...r,
|
|
86
72
|
type: "button",
|
|
87
|
-
"aria-label":
|
|
73
|
+
"aria-label": o
|
|
88
74
|
},
|
|
89
|
-
|
|
75
|
+
k
|
|
90
76
|
);
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return /* @__PURE__ */ jsx("span", { children: button });
|
|
94
|
-
} else {
|
|
95
|
-
return /* @__PURE__ */ jsx("a", { "aria-label": content, href: get(link, "href") || "/", target: get(link, "target", "_self"), children: button });
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return button;
|
|
99
|
-
};
|
|
100
|
-
const Config$r = {
|
|
77
|
+
return w(h(c, "href")) ? p : y ? /* @__PURE__ */ i("span", { children: p }) : /* @__PURE__ */ i("a", { "aria-label": o, href: h(c, "href") || "/", target: h(c, "target", "_self"), children: p });
|
|
78
|
+
}, ae = {
|
|
101
79
|
type: "Button",
|
|
102
80
|
label: "Button",
|
|
103
81
|
category: "core",
|
|
104
|
-
icon:
|
|
82
|
+
icon: T,
|
|
105
83
|
group: "basic",
|
|
106
|
-
...
|
|
84
|
+
...m({
|
|
107
85
|
properties: {
|
|
108
|
-
styles:
|
|
86
|
+
styles: u("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
|
|
109
87
|
content: {
|
|
110
88
|
type: "string",
|
|
111
89
|
title: "Button label",
|
|
@@ -148,30 +126,28 @@ const Config$r = {
|
|
|
148
126
|
}),
|
|
149
127
|
i18nProps: ["content"],
|
|
150
128
|
aiProps: ["content"]
|
|
151
|
-
}
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
dangerouslySetInnerHTML: { __html: htmlCode.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
129
|
+
}, ce = (e) => {
|
|
130
|
+
const { blockProps: l, styles: t, htmlCode: n, inBuilder: o } = e;
|
|
131
|
+
return o ? /* @__PURE__ */ b("div", { className: "relative", children: [
|
|
132
|
+
o ? /* @__PURE__ */ i("div", { ...l, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
133
|
+
f.createElement("div", {
|
|
134
|
+
...t,
|
|
135
|
+
dangerouslySetInnerHTML: { __html: n.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
159
136
|
})
|
|
160
|
-
] }) :
|
|
161
|
-
...
|
|
162
|
-
...
|
|
163
|
-
dangerouslySetInnerHTML: { __html:
|
|
137
|
+
] }) : f.createElement("div", {
|
|
138
|
+
...l,
|
|
139
|
+
...t,
|
|
140
|
+
dangerouslySetInnerHTML: { __html: n }
|
|
164
141
|
});
|
|
165
|
-
}
|
|
166
|
-
const Config$q = {
|
|
142
|
+
}, pe = {
|
|
167
143
|
type: "CustomHTML",
|
|
168
144
|
label: "web_blocks.custom_html",
|
|
169
145
|
category: "core",
|
|
170
|
-
icon:
|
|
146
|
+
icon: H,
|
|
171
147
|
group: "advanced",
|
|
172
|
-
...
|
|
148
|
+
...m({
|
|
173
149
|
properties: {
|
|
174
|
-
styles:
|
|
150
|
+
styles: u(""),
|
|
175
151
|
htmlCode: {
|
|
176
152
|
type: "string",
|
|
177
153
|
default: "<div><p>Enter your HTML code here...</p></div>",
|
|
@@ -179,23 +155,18 @@ const Config$q = {
|
|
|
179
155
|
}
|
|
180
156
|
}
|
|
181
157
|
})
|
|
182
|
-
}
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
cssStyles = { backgroundImage: `url(${backgroundImage})` };
|
|
188
|
-
}
|
|
189
|
-
return React.createElement("div", { ...blockProps, ...styles, style: cssStyles });
|
|
190
|
-
};
|
|
191
|
-
const Config$p = {
|
|
158
|
+
}, ue = (e) => {
|
|
159
|
+
const { blockProps: l, styles: t, backgroundImage: n } = e;
|
|
160
|
+
let o = {};
|
|
161
|
+
return n && (o = { backgroundImage: `url(${n})` }), f.createElement("div", { ...l, ...t, style: o });
|
|
162
|
+
}, de = {
|
|
192
163
|
type: "EmptyBox",
|
|
193
164
|
label: "Empty Box",
|
|
194
165
|
category: "core",
|
|
195
166
|
group: "basic",
|
|
196
|
-
...
|
|
167
|
+
...m({
|
|
197
168
|
properties: {
|
|
198
|
-
styles:
|
|
169
|
+
styles: u(""),
|
|
199
170
|
backgroundImage: {
|
|
200
171
|
type: "string",
|
|
201
172
|
title: "Background Image",
|
|
@@ -204,23 +175,20 @@ const Config$p = {
|
|
|
204
175
|
}
|
|
205
176
|
}
|
|
206
177
|
})
|
|
207
|
-
}
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
...blockProps,
|
|
214
|
-
dangerouslySetInnerHTML: { __html: content }
|
|
178
|
+
}, me = (e) => {
|
|
179
|
+
const { blockProps: l, styles: t, content: n, tag: o = "h1", children: r = null } = e;
|
|
180
|
+
return r ? f.createElement(o, { ...t, ...l }, r) : f.createElement(o, {
|
|
181
|
+
...t,
|
|
182
|
+
...l,
|
|
183
|
+
dangerouslySetInnerHTML: { __html: n }
|
|
215
184
|
});
|
|
216
|
-
}
|
|
217
|
-
const Config$o = {
|
|
185
|
+
}, ye = {
|
|
218
186
|
type: "Heading",
|
|
219
187
|
label: "web_blocks.heading",
|
|
220
188
|
category: "core",
|
|
221
|
-
icon:
|
|
189
|
+
icon: z,
|
|
222
190
|
group: "typography",
|
|
223
|
-
...
|
|
191
|
+
...m({
|
|
224
192
|
properties: {
|
|
225
193
|
tag: {
|
|
226
194
|
type: "string",
|
|
@@ -228,7 +196,7 @@ const Config$o = {
|
|
|
228
196
|
title: "Level",
|
|
229
197
|
enum: ["h1", "h2", "h3", "h4", "h5", "h6"]
|
|
230
198
|
},
|
|
231
|
-
styles:
|
|
199
|
+
styles: u("text-3xl"),
|
|
232
200
|
content: {
|
|
233
201
|
type: "string",
|
|
234
202
|
default: "Heading goes here",
|
|
@@ -239,60 +207,51 @@ const Config$o = {
|
|
|
239
207
|
}),
|
|
240
208
|
aiProps: ["content"],
|
|
241
209
|
i18nProps: ["content"],
|
|
242
|
-
canAcceptBlock: (
|
|
243
|
-
}
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
});
|
|
252
|
-
};
|
|
253
|
-
const Config$n = {
|
|
210
|
+
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
211
|
+
}, ge = (e) => {
|
|
212
|
+
const { blockProps: l, styles: t, content: n } = e;
|
|
213
|
+
return K(e.children) ? f.createElement("p", {
|
|
214
|
+
...t,
|
|
215
|
+
...l,
|
|
216
|
+
dangerouslySetInnerHTML: { __html: n }
|
|
217
|
+
}) : f.createElement("p", { ...t, ...l }, e.children);
|
|
218
|
+
}, fe = {
|
|
254
219
|
type: "Paragraph",
|
|
255
220
|
label: "Paragraph",
|
|
256
221
|
category: "core",
|
|
257
|
-
icon:
|
|
222
|
+
icon: F,
|
|
258
223
|
group: "typography",
|
|
259
|
-
...
|
|
224
|
+
...m({
|
|
260
225
|
properties: {
|
|
261
|
-
styles:
|
|
226
|
+
styles: u(""),
|
|
262
227
|
content: {
|
|
263
228
|
type: "string",
|
|
264
229
|
title: "Content",
|
|
265
230
|
default: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
|
|
266
231
|
Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus
|
|
267
232
|
nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.`,
|
|
268
|
-
ui: { "ui:widget": "textarea", "ui:autosize":
|
|
233
|
+
ui: { "ui:widget": "textarea", "ui:autosize": !0, "ui:rows": 5 }
|
|
269
234
|
}
|
|
270
235
|
}
|
|
271
236
|
}),
|
|
272
237
|
i18nProps: ["content"],
|
|
273
238
|
aiProps: ["content"],
|
|
274
|
-
canAcceptBlock: (
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
const RichTextBlock = (props) => {
|
|
283
|
-
const { blockProps, content, styles } = props;
|
|
284
|
-
const forcedStyles = addForcedClasses(styles, "prose", "max-w-full");
|
|
285
|
-
return /* @__PURE__ */ jsx("div", { ...blockProps, ...forcedStyles, dangerouslySetInnerHTML: { __html: content } });
|
|
286
|
-
};
|
|
287
|
-
const Config$m = {
|
|
239
|
+
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
240
|
+
}, _ = (e, ...l) => ({
|
|
241
|
+
...e,
|
|
242
|
+
className: C(e.className, ...l)
|
|
243
|
+
}), be = (e) => {
|
|
244
|
+
const { blockProps: l, content: t, styles: n } = e, o = _(n, "prose", "max-w-full");
|
|
245
|
+
return /* @__PURE__ */ i("div", { ...l, ...o, dangerouslySetInnerHTML: { __html: t } });
|
|
246
|
+
}, he = {
|
|
288
247
|
type: "RichText",
|
|
289
248
|
label: "Rich Text",
|
|
290
249
|
category: "core",
|
|
291
|
-
icon:
|
|
250
|
+
icon: j,
|
|
292
251
|
group: "typography",
|
|
293
|
-
...
|
|
252
|
+
...m({
|
|
294
253
|
properties: {
|
|
295
|
-
styles:
|
|
254
|
+
styles: u(""),
|
|
296
255
|
content: {
|
|
297
256
|
type: "string",
|
|
298
257
|
title: "Content",
|
|
@@ -303,52 +262,46 @@ const Config$m = {
|
|
|
303
262
|
}),
|
|
304
263
|
aiProps: ["content"],
|
|
305
264
|
i18nProps: ["content"]
|
|
306
|
-
}
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
...blockProps,
|
|
313
|
-
dangerouslySetInnerHTML: { __html: content || "" }
|
|
265
|
+
}, ke = (e) => {
|
|
266
|
+
const { blockProps: l, styles: t, content: n, children: o = null, tag: r } = e;
|
|
267
|
+
return o ? f.createElement("span", { ...t, ...l }, o) : f.createElement(r || "span", {
|
|
268
|
+
...t,
|
|
269
|
+
...l,
|
|
270
|
+
dangerouslySetInnerHTML: { __html: n || "" }
|
|
314
271
|
});
|
|
315
|
-
}
|
|
316
|
-
const Config$l = {
|
|
272
|
+
}, we = {
|
|
317
273
|
type: "Span",
|
|
318
274
|
label: "Span",
|
|
319
275
|
category: "core",
|
|
320
276
|
group: "typography",
|
|
321
|
-
...
|
|
277
|
+
...m({
|
|
322
278
|
properties: {
|
|
323
|
-
styles:
|
|
279
|
+
styles: u(""),
|
|
324
280
|
content: {
|
|
325
281
|
type: "string",
|
|
326
282
|
title: "Content",
|
|
327
283
|
default: "",
|
|
328
|
-
ui: { "ui:widget": "textarea", "ui:autosize":
|
|
284
|
+
ui: { "ui:widget": "textarea", "ui:autosize": !0, "ui:rows": 3 }
|
|
329
285
|
}
|
|
330
286
|
}
|
|
331
287
|
}),
|
|
332
288
|
aiProps: ["content"],
|
|
333
289
|
i18nProps: ["content"],
|
|
334
|
-
canAcceptBlock: () =>
|
|
290
|
+
canAcceptBlock: () => !0
|
|
335
291
|
};
|
|
336
|
-
function
|
|
337
|
-
return
|
|
292
|
+
function xe(e) {
|
|
293
|
+
return A({ tag: "svg", attr: { version: "1.1", viewBox: "0 0 32 32" }, child: [{ tag: "path", attr: { d: "M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z" }, child: [] }] })(e);
|
|
338
294
|
}
|
|
339
|
-
const
|
|
340
|
-
const { scripts, inBuilder, blockProps } =
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
return /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: scripts } });
|
|
344
|
-
};
|
|
345
|
-
const Config$k = {
|
|
295
|
+
const Le = (e) => {
|
|
296
|
+
const { scripts: l, inBuilder: t, blockProps: n } = e;
|
|
297
|
+
return t ? /* @__PURE__ */ i("div", { ...n, children: /* @__PURE__ */ i("div", { className: C("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ i("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: l } });
|
|
298
|
+
}, ve = {
|
|
346
299
|
type: "CustomScript",
|
|
347
300
|
label: "web_blocks.custom_script",
|
|
348
301
|
category: "core",
|
|
349
|
-
icon:
|
|
302
|
+
icon: xe,
|
|
350
303
|
group: "advanced",
|
|
351
|
-
...
|
|
304
|
+
...m({
|
|
352
305
|
properties: {
|
|
353
306
|
scripts: {
|
|
354
307
|
type: "string",
|
|
@@ -359,50 +312,43 @@ const Config$k = {
|
|
|
359
312
|
}
|
|
360
313
|
}
|
|
361
314
|
})
|
|
362
|
-
}
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
};
|
|
367
|
-
const Config$j = {
|
|
315
|
+
}, Ie = (e) => {
|
|
316
|
+
const { blockProps: l, styles: t } = e;
|
|
317
|
+
return L("hr", { ...t, ...l });
|
|
318
|
+
}, Ce = {
|
|
368
319
|
type: "Divider",
|
|
369
320
|
label: "web_blocks.divider",
|
|
370
321
|
category: "core",
|
|
371
|
-
icon:
|
|
322
|
+
icon: D,
|
|
372
323
|
group: "basic",
|
|
373
|
-
...
|
|
324
|
+
...m({
|
|
374
325
|
properties: {
|
|
375
|
-
styles:
|
|
326
|
+
styles: u("bg-gray-900 h-0.5 py-2 my-1")
|
|
376
327
|
}
|
|
377
328
|
})
|
|
378
|
-
}
|
|
379
|
-
const
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
"
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
);
|
|
396
|
-
}
|
|
397
|
-
return React.createElement("span", { ...blockProps }, children);
|
|
398
|
-
};
|
|
399
|
-
const Config$i = {
|
|
329
|
+
}, Be = (e) => {
|
|
330
|
+
const { blockProps: l, inBuilder: t, children: n, globalBlock: o } = e;
|
|
331
|
+
return t && !o ? /* @__PURE__ */ b(
|
|
332
|
+
"div",
|
|
333
|
+
{
|
|
334
|
+
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
335
|
+
...l,
|
|
336
|
+
children: [
|
|
337
|
+
/* @__PURE__ */ b("h1", { children: [
|
|
338
|
+
"Global Block - ",
|
|
339
|
+
o
|
|
340
|
+
] }),
|
|
341
|
+
/* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
) : f.createElement("span", { ...l }, n);
|
|
345
|
+
}, _e = {
|
|
400
346
|
type: "GlobalBlock",
|
|
401
347
|
label: "Global Block",
|
|
402
|
-
icon:
|
|
348
|
+
icon: te,
|
|
403
349
|
category: "core",
|
|
404
350
|
group: "basic",
|
|
405
|
-
...
|
|
351
|
+
...m({
|
|
406
352
|
properties: {
|
|
407
353
|
globalBlock: {
|
|
408
354
|
type: "string",
|
|
@@ -412,37 +358,33 @@ const Config$i = {
|
|
|
412
358
|
}
|
|
413
359
|
}
|
|
414
360
|
})
|
|
415
|
-
}
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
return React.createElement("span", {
|
|
424
|
-
...blockProps,
|
|
425
|
-
...iStyles,
|
|
361
|
+
}, Pe = (e) => {
|
|
362
|
+
const { blockProps: l, icon: t, styles: n, width: o, inBuilder: r, height: s } = e, a = _(n, "");
|
|
363
|
+
if (w(t))
|
|
364
|
+
return /* @__PURE__ */ i(v, { inBuilder: r, className: "h-8 w-14" });
|
|
365
|
+
const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
366
|
+
return f.createElement("span", {
|
|
367
|
+
...l,
|
|
368
|
+
...a,
|
|
426
369
|
style: {
|
|
427
|
-
width:
|
|
428
|
-
height:
|
|
370
|
+
width: o ? `${o}px` : "auto",
|
|
371
|
+
height: s ? `${s}px` : "auto"
|
|
429
372
|
},
|
|
430
|
-
dangerouslySetInnerHTML: { __html:
|
|
373
|
+
dangerouslySetInnerHTML: { __html: c }
|
|
431
374
|
});
|
|
432
|
-
}
|
|
433
|
-
const Config$h = {
|
|
375
|
+
}, Se = {
|
|
434
376
|
type: "Icon",
|
|
435
377
|
label: "web_blocks.icon",
|
|
436
378
|
category: "core",
|
|
437
|
-
icon:
|
|
379
|
+
icon: q,
|
|
438
380
|
group: "media",
|
|
439
|
-
...
|
|
381
|
+
...m({
|
|
440
382
|
properties: {
|
|
441
|
-
styles:
|
|
383
|
+
styles: u(""),
|
|
442
384
|
icon: {
|
|
443
385
|
type: "string",
|
|
444
386
|
title: "Icon",
|
|
445
|
-
default:
|
|
387
|
+
default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>',
|
|
446
388
|
ui: { "ui:widget": "icon" }
|
|
447
389
|
},
|
|
448
390
|
width: {
|
|
@@ -457,35 +399,32 @@ const Config$h = {
|
|
|
457
399
|
}
|
|
458
400
|
}
|
|
459
401
|
})
|
|
460
|
-
}
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
mobileImage && /* @__PURE__ */ jsx("source", { srcSet: mobileImage, media: "(max-width: 480px)" }),
|
|
466
|
-
/* @__PURE__ */ jsx(
|
|
402
|
+
}, Ne = (e) => {
|
|
403
|
+
const { blockProps: l, image: t, mobileImage: n, styles: o, alt: r, height: s, width: a, lazyLoading: c } = e;
|
|
404
|
+
return w(t) ? /* @__PURE__ */ i(v, { className: "h-36" }) : /* @__PURE__ */ b("picture", { children: [
|
|
405
|
+
n && /* @__PURE__ */ i("source", { srcSet: n, media: "(max-width: 480px)" }),
|
|
406
|
+
/* @__PURE__ */ i(
|
|
467
407
|
"img",
|
|
468
408
|
{
|
|
469
|
-
...
|
|
470
|
-
...
|
|
471
|
-
src:
|
|
472
|
-
alt,
|
|
473
|
-
loading:
|
|
474
|
-
width,
|
|
475
|
-
height
|
|
409
|
+
...l,
|
|
410
|
+
...o,
|
|
411
|
+
src: t,
|
|
412
|
+
alt: r,
|
|
413
|
+
loading: c ? "lazy" : "eager",
|
|
414
|
+
width: a,
|
|
415
|
+
height: s
|
|
476
416
|
}
|
|
477
417
|
)
|
|
478
418
|
] });
|
|
479
|
-
}
|
|
480
|
-
const Config$g = {
|
|
419
|
+
}, Me = {
|
|
481
420
|
type: "Image",
|
|
482
421
|
label: "Image",
|
|
483
422
|
category: "core",
|
|
484
|
-
icon:
|
|
423
|
+
icon: $,
|
|
485
424
|
group: "media",
|
|
486
|
-
...
|
|
425
|
+
...m({
|
|
487
426
|
properties: {
|
|
488
|
-
styles:
|
|
427
|
+
styles: u(""),
|
|
489
428
|
image: {
|
|
490
429
|
type: "string",
|
|
491
430
|
title: "Image",
|
|
@@ -501,7 +440,7 @@ const Config$g = {
|
|
|
501
440
|
lazyLoading: {
|
|
502
441
|
type: "boolean",
|
|
503
442
|
title: "Lazy Load",
|
|
504
|
-
default:
|
|
443
|
+
default: !0
|
|
505
444
|
},
|
|
506
445
|
width: {
|
|
507
446
|
type: "number",
|
|
@@ -525,52 +464,34 @@ const Config$g = {
|
|
|
525
464
|
}),
|
|
526
465
|
aiProps: ["alt"],
|
|
527
466
|
i18nProps: ["alt"]
|
|
528
|
-
}
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
}
|
|
547
|
-
const lightBoxAttrs = {};
|
|
548
|
-
if (hrefType !== "image") lightBoxAttrs["data-vbtype"] = hrefType;
|
|
549
|
-
if (autoplay) lightBoxAttrs["data-autoplay"] = "true";
|
|
550
|
-
if (maxWidth) lightBoxAttrs["data-maxwidth"] = maxWidth + "px";
|
|
551
|
-
if (backdropColor) lightBoxAttrs["data-overlay"] = backdropColor;
|
|
552
|
-
if (galleryName) lightBoxAttrs["data-gall"] = galleryName;
|
|
553
|
-
if (children) {
|
|
554
|
-
return /* @__PURE__ */ jsx("a", { "aria-label": content, ...lightBoxAttrs, href: href || "#/", ...blockProps, ...forcedStyles, children });
|
|
555
|
-
}
|
|
556
|
-
return createElement("a", {
|
|
557
|
-
...blockProps,
|
|
558
|
-
...forcedStyles,
|
|
559
|
-
...lightBoxAttrs,
|
|
560
|
-
href: href || "#",
|
|
561
|
-
dangerouslySetInnerHTML: { __html: content },
|
|
562
|
-
"aria-label": content
|
|
467
|
+
}, Te = (e) => {
|
|
468
|
+
const { blockProps: l, children: t, styles: n, inBuilder: o, content: r, href: s } = e, { hrefType: a, autoplay: c, maxWidth: y, backdropColor: g, galleryName: k } = e, p = _(n, "cb-lightbox vbox-item");
|
|
469
|
+
if (!t && w(n == null ? void 0 : n.className) && w(r))
|
|
470
|
+
return /* @__PURE__ */ i(v, { inBuilder: o });
|
|
471
|
+
if (o)
|
|
472
|
+
return t ? /* @__PURE__ */ i("span", { ...l, ...p, children: t }) : L("span", {
|
|
473
|
+
...l,
|
|
474
|
+
...p,
|
|
475
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
476
|
+
});
|
|
477
|
+
const x = {};
|
|
478
|
+
return a !== "image" && (x["data-vbtype"] = a), c && (x["data-autoplay"] = "true"), y && (x["data-maxwidth"] = y + "px"), g && (x["data-overlay"] = g), k && (x["data-gall"] = k), t ? /* @__PURE__ */ i("a", { "aria-label": r, ...x, href: s || "#/", ...l, ...p, children: t }) : L("a", {
|
|
479
|
+
...l,
|
|
480
|
+
...p,
|
|
481
|
+
...x,
|
|
482
|
+
href: s || "#",
|
|
483
|
+
dangerouslySetInnerHTML: { __html: r },
|
|
484
|
+
"aria-label": r
|
|
563
485
|
});
|
|
564
|
-
}
|
|
565
|
-
const Config$f = {
|
|
486
|
+
}, $e = {
|
|
566
487
|
type: "LightBoxLink",
|
|
567
488
|
label: "Lightbox Link",
|
|
568
489
|
category: "core",
|
|
569
|
-
icon:
|
|
490
|
+
icon: $,
|
|
570
491
|
group: "basic",
|
|
571
|
-
...
|
|
492
|
+
...m({
|
|
572
493
|
properties: {
|
|
573
|
-
styles:
|
|
494
|
+
styles: u(""),
|
|
574
495
|
content: {
|
|
575
496
|
type: "string",
|
|
576
497
|
title: "Content",
|
|
@@ -591,7 +512,7 @@ const Config$f = {
|
|
|
591
512
|
autoplay: {
|
|
592
513
|
type: "boolean",
|
|
593
514
|
title: "Autoplay (Video only)",
|
|
594
|
-
default:
|
|
515
|
+
default: !1
|
|
595
516
|
},
|
|
596
517
|
maxWidth: {
|
|
597
518
|
type: "number",
|
|
@@ -615,53 +536,38 @@ const Config$f = {
|
|
|
615
536
|
}),
|
|
616
537
|
i18nProps: ["content"],
|
|
617
538
|
aiProps: ["content"],
|
|
618
|
-
canAcceptBlock: (
|
|
619
|
-
}
|
|
620
|
-
const
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
"span",
|
|
632
|
-
{
|
|
633
|
-
...blockProps,
|
|
634
|
-
...styles,
|
|
635
|
-
style: emptyStyles
|
|
636
|
-
},
|
|
637
|
-
content
|
|
638
|
-
);
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
if (children) {
|
|
642
|
-
return /* @__PURE__ */ jsx("a", { "aria-label": content, href: (link == null ? void 0 : link.href) || "#/", target: link == null ? void 0 : link.target, ...blockProps, ...styles, children });
|
|
643
|
-
}
|
|
644
|
-
return createElement(
|
|
539
|
+
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
540
|
+
}, Ee = (e) => {
|
|
541
|
+
const { blockProps: l, link: t, children: n, styles: o, inBuilder: r, content: s } = e;
|
|
542
|
+
let a = {};
|
|
543
|
+
return !n && w(s) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), r ? n ? /* @__PURE__ */ i("span", { ...l, style: a, ...o, children: n }) : L(
|
|
544
|
+
"span",
|
|
545
|
+
{
|
|
546
|
+
...l,
|
|
547
|
+
...o,
|
|
548
|
+
style: a
|
|
549
|
+
},
|
|
550
|
+
s
|
|
551
|
+
) : n ? /* @__PURE__ */ i("a", { "aria-label": s, href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...l, ...o, children: n }) : L(
|
|
645
552
|
"a",
|
|
646
553
|
{
|
|
647
|
-
...
|
|
648
|
-
...
|
|
649
|
-
href: (
|
|
650
|
-
target: (
|
|
651
|
-
"aria-label":
|
|
554
|
+
...l,
|
|
555
|
+
...o,
|
|
556
|
+
href: (t == null ? void 0 : t.href) || "#",
|
|
557
|
+
target: (t == null ? void 0 : t.target) || "_self",
|
|
558
|
+
"aria-label": s
|
|
652
559
|
},
|
|
653
|
-
|
|
560
|
+
s
|
|
654
561
|
);
|
|
655
|
-
}
|
|
656
|
-
const Config$e = {
|
|
562
|
+
}, Re = {
|
|
657
563
|
type: "Link",
|
|
658
564
|
label: "Link",
|
|
659
565
|
category: "core",
|
|
660
|
-
icon:
|
|
566
|
+
icon: G,
|
|
661
567
|
group: "basic",
|
|
662
|
-
...
|
|
568
|
+
...m({
|
|
663
569
|
properties: {
|
|
664
|
-
styles:
|
|
570
|
+
styles: u(""),
|
|
665
571
|
content: {
|
|
666
572
|
type: "string",
|
|
667
573
|
default: "Link goes here",
|
|
@@ -687,29 +593,23 @@ const Config$e = {
|
|
|
687
593
|
}),
|
|
688
594
|
aiProps: ["content"],
|
|
689
595
|
i18nProps: ["content"],
|
|
690
|
-
canAcceptBlock: (
|
|
691
|
-
}
|
|
692
|
-
const
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
}
|
|
698
|
-
return React.createElement(
|
|
699
|
-
tag ? tag : listType === "list-decimal" ? "ol" : "ul",
|
|
700
|
-
{ ...blockProps, ...styles, className },
|
|
701
|
-
children
|
|
596
|
+
canAcceptBlock: (e) => e !== "Link"
|
|
597
|
+
}, Ae = (e) => {
|
|
598
|
+
const { blockProps: l, children: t, listType: n, styles: o, tag: r, inBuilder: s } = e, a = C(h(o, "className", ""), n);
|
|
599
|
+
return !t && w(o == null ? void 0 : o.className) ? /* @__PURE__ */ i(v, { inBuilder: s }) : f.createElement(
|
|
600
|
+
r || (n === "list-decimal" ? "ol" : "ul"),
|
|
601
|
+
{ ...l, ...o, className: a },
|
|
602
|
+
t
|
|
702
603
|
);
|
|
703
|
-
}
|
|
704
|
-
const Config$d = {
|
|
604
|
+
}, He = {
|
|
705
605
|
type: "List",
|
|
706
606
|
label: "web_blocks.list",
|
|
707
|
-
icon:
|
|
607
|
+
icon: U,
|
|
708
608
|
category: "core",
|
|
709
609
|
group: "basic",
|
|
710
|
-
...
|
|
610
|
+
...m({
|
|
711
611
|
properties: {
|
|
712
|
-
styles:
|
|
612
|
+
styles: u(""),
|
|
713
613
|
listType: {
|
|
714
614
|
type: "string",
|
|
715
615
|
title: "List Type",
|
|
@@ -722,7 +622,7 @@ const Config$d = {
|
|
|
722
622
|
}
|
|
723
623
|
}
|
|
724
624
|
}),
|
|
725
|
-
canAcceptBlock: (
|
|
625
|
+
canAcceptBlock: (e) => e === "ListItem",
|
|
726
626
|
blocks: [
|
|
727
627
|
{ _type: "List", _id: "a", listType: "list-none", styles: "#styles:," },
|
|
728
628
|
{
|
|
@@ -747,27 +647,22 @@ const Config$d = {
|
|
|
747
647
|
content: "Item 3"
|
|
748
648
|
}
|
|
749
649
|
]
|
|
750
|
-
}
|
|
751
|
-
const
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
});
|
|
759
|
-
}
|
|
760
|
-
return React.createElement(tag || "li", { ...styles, ...blockProps }, children);
|
|
761
|
-
};
|
|
762
|
-
const Config$c = {
|
|
650
|
+
}, ze = (e) => {
|
|
651
|
+
const { blockProps: l, content: t, styles: n, children: o, tag: r } = e;
|
|
652
|
+
return o ? f.createElement(r || "li", { ...n, ...l }, o) : f.createElement(r || "li", {
|
|
653
|
+
...n,
|
|
654
|
+
...l,
|
|
655
|
+
dangerouslySetInnerHTML: { __html: t }
|
|
656
|
+
});
|
|
657
|
+
}, Fe = {
|
|
763
658
|
type: "ListItem",
|
|
764
659
|
label: "List Item",
|
|
765
|
-
icon:
|
|
660
|
+
icon: V,
|
|
766
661
|
category: "core",
|
|
767
662
|
group: "basic",
|
|
768
|
-
...
|
|
663
|
+
...m({
|
|
769
664
|
properties: {
|
|
770
|
-
styles:
|
|
665
|
+
styles: u(""),
|
|
771
666
|
content: {
|
|
772
667
|
type: "string",
|
|
773
668
|
default: "List item",
|
|
@@ -780,25 +675,18 @@ const Config$c = {
|
|
|
780
675
|
}),
|
|
781
676
|
i18nProps: ["content"],
|
|
782
677
|
aiProps: ["content"],
|
|
783
|
-
canAcceptBlock: (
|
|
784
|
-
canBeNested: (
|
|
785
|
-
}
|
|
786
|
-
const RawTextBlock = (props) => {
|
|
787
|
-
if (props.inBuilder || props.forceWrapper) {
|
|
788
|
-
return /* @__PURE__ */ jsx("span", { ...props.blockProps, children: props.content });
|
|
789
|
-
}
|
|
790
|
-
return `${props.content}`;
|
|
791
|
-
};
|
|
792
|
-
const Config$b = {
|
|
678
|
+
canAcceptBlock: (e) => e !== "ListItem",
|
|
679
|
+
canBeNested: (e) => e === "List"
|
|
680
|
+
}, je = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ i("span", { ...e.blockProps, children: e.content }) : `${e.content}`, De = {
|
|
793
681
|
type: "Text",
|
|
794
682
|
label: "Text",
|
|
795
|
-
hidden:
|
|
683
|
+
hidden: !0,
|
|
796
684
|
category: "core",
|
|
797
685
|
group: "typography",
|
|
798
|
-
icon:
|
|
799
|
-
...
|
|
686
|
+
icon: O,
|
|
687
|
+
...m({
|
|
800
688
|
properties: {
|
|
801
|
-
styles:
|
|
689
|
+
styles: u("text-black"),
|
|
802
690
|
content: {
|
|
803
691
|
type: "string",
|
|
804
692
|
default: ""
|
|
@@ -807,88 +695,60 @@ const Config$b = {
|
|
|
807
695
|
}),
|
|
808
696
|
aiProps: ["content"],
|
|
809
697
|
i18nProps: ["content"]
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
const
|
|
813
|
-
|
|
814
|
-
const getEmbedURL = (url) => {
|
|
815
|
-
if (YOUTUBE_REGEX.test(url)) {
|
|
816
|
-
const match = url.match(YOUTUBE_REGEX);
|
|
817
|
-
if (match) {
|
|
818
|
-
const videoId = match[4];
|
|
819
|
-
return `https://www.youtube.com/embed/${videoId}`;
|
|
820
|
-
}
|
|
821
|
-
return url;
|
|
698
|
+
}, S = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, N = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, M = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, qe = (e) => {
|
|
699
|
+
if (S.test(e)) {
|
|
700
|
+
const l = e.match(S);
|
|
701
|
+
return l ? `https://www.youtube.com/embed/${l[4]}` : e;
|
|
822
702
|
}
|
|
823
|
-
if (
|
|
824
|
-
const
|
|
825
|
-
|
|
826
|
-
const videoId = match[3];
|
|
827
|
-
return `https://player.vimeo.com/video/${videoId}`;
|
|
828
|
-
}
|
|
829
|
-
return url;
|
|
703
|
+
if (N.test(e)) {
|
|
704
|
+
const l = e.match(N);
|
|
705
|
+
return l ? `https://player.vimeo.com/video/${l[3]}` : e;
|
|
830
706
|
}
|
|
831
|
-
if (
|
|
832
|
-
const
|
|
833
|
-
|
|
834
|
-
const videoId = match[4];
|
|
835
|
-
return `https://www.dailymotion.com/embed/video/${videoId}`;
|
|
836
|
-
}
|
|
837
|
-
return url;
|
|
707
|
+
if (M.test(e)) {
|
|
708
|
+
const l = e.match(M);
|
|
709
|
+
return l ? `https://www.dailymotion.com/embed/video/${l[4]}` : e;
|
|
838
710
|
}
|
|
839
711
|
return null;
|
|
840
|
-
}
|
|
841
|
-
const
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
let embedURL = getEmbedURL(url);
|
|
849
|
-
let videoElement = null;
|
|
850
|
-
if (embedURL) {
|
|
851
|
-
if (!isEmpty(embedURL)) {
|
|
852
|
-
const iframeControls = [];
|
|
853
|
-
iframeControls.push(`autoplay=${autoplay ? 1 : 0}`);
|
|
854
|
-
iframeControls.push(`controls=${controls ? 1 : 0}`);
|
|
855
|
-
iframeControls.push(`mute=${muted ? 1 : 0}&muted=${muted ? 1 : 0}`);
|
|
856
|
-
iframeControls.push(`loop=${loop ? 1 : 0}`);
|
|
857
|
-
embedURL = `${embedURL}?${iframeControls.join("&")}`;
|
|
712
|
+
}, Ge = f.memo((e) => {
|
|
713
|
+
const { blockProps: l, inBuilder: t, styles: n, url: o, controls: r } = e, s = h(r, "autoPlay", !1), a = h(r, "controls", !1), c = s || h(r, "muted", !0), y = h(r, "loop", !1);
|
|
714
|
+
if (w(o)) return /* @__PURE__ */ i(v, { inBuilder: t, className: "h-36" });
|
|
715
|
+
let g = qe(o), k = null;
|
|
716
|
+
if (g) {
|
|
717
|
+
if (!w(g)) {
|
|
718
|
+
const p = [];
|
|
719
|
+
p.push(`autoplay=${s ? 1 : 0}`), p.push(`controls=${r ? 1 : 0}`), p.push(`mute=${c ? 1 : 0}&muted=${c ? 1 : 0}`), p.push(`loop=${y ? 1 : 0}`), g = `${g}?${p.join("&")}`;
|
|
858
720
|
}
|
|
859
|
-
|
|
860
|
-
...
|
|
721
|
+
k = f.createElement("iframe", {
|
|
722
|
+
...l,
|
|
861
723
|
className: "absolute inset-0 w-full h-full",
|
|
862
|
-
src:
|
|
863
|
-
allow:
|
|
864
|
-
allowFullScreen:
|
|
724
|
+
src: g,
|
|
725
|
+
allow: t ? "" : "autoplay *; fullscreen *",
|
|
726
|
+
allowFullScreen: !0,
|
|
865
727
|
frameBorder: 0
|
|
866
728
|
});
|
|
867
|
-
} else
|
|
868
|
-
|
|
869
|
-
...
|
|
729
|
+
} else
|
|
730
|
+
k = f.createElement("video", {
|
|
731
|
+
...l,
|
|
870
732
|
className: "absolute inset-0 w-full h-full",
|
|
871
|
-
src:
|
|
872
|
-
controls:
|
|
873
|
-
muted,
|
|
874
|
-
autoPlay:
|
|
875
|
-
loop
|
|
733
|
+
src: o,
|
|
734
|
+
controls: a,
|
|
735
|
+
muted: c,
|
|
736
|
+
autoPlay: t ? !1 : s,
|
|
737
|
+
loop: y
|
|
876
738
|
});
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
videoElement
|
|
739
|
+
return /* @__PURE__ */ i("div", { ...Q(n, ["className"]), children: /* @__PURE__ */ b("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
740
|
+
t ? /* @__PURE__ */ i("div", { ...l, ...ee(n, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
741
|
+
k
|
|
881
742
|
] }) });
|
|
882
|
-
})
|
|
883
|
-
const Config$a = {
|
|
743
|
+
}), Ue = {
|
|
884
744
|
type: "Video",
|
|
885
745
|
label: "Video",
|
|
886
746
|
category: "core",
|
|
887
|
-
icon:
|
|
747
|
+
icon: W,
|
|
888
748
|
group: "media",
|
|
889
|
-
...
|
|
749
|
+
...m({
|
|
890
750
|
properties: {
|
|
891
|
-
styles:
|
|
751
|
+
styles: u(""),
|
|
892
752
|
url: {
|
|
893
753
|
type: "string",
|
|
894
754
|
title: "Video URL",
|
|
@@ -898,79 +758,74 @@ const Config$a = {
|
|
|
898
758
|
type: "object",
|
|
899
759
|
title: "Controls",
|
|
900
760
|
default: {
|
|
901
|
-
autoplay:
|
|
902
|
-
controls:
|
|
903
|
-
loop:
|
|
904
|
-
muted:
|
|
761
|
+
autoplay: !1,
|
|
762
|
+
controls: !0,
|
|
763
|
+
loop: !1,
|
|
764
|
+
muted: !1
|
|
905
765
|
},
|
|
906
766
|
properties: {
|
|
907
767
|
autoplay: {
|
|
908
768
|
type: "boolean",
|
|
909
769
|
title: "Autoplay",
|
|
910
|
-
default:
|
|
770
|
+
default: !1
|
|
911
771
|
},
|
|
912
772
|
controls: {
|
|
913
773
|
type: "boolean",
|
|
914
774
|
title: "Show Controls",
|
|
915
|
-
default:
|
|
775
|
+
default: !0
|
|
916
776
|
},
|
|
917
777
|
loop: {
|
|
918
778
|
type: "boolean",
|
|
919
779
|
title: "Loop Video",
|
|
920
|
-
default:
|
|
780
|
+
default: !1
|
|
921
781
|
},
|
|
922
782
|
muted: {
|
|
923
783
|
type: "boolean",
|
|
924
784
|
title: "Muted",
|
|
925
|
-
default:
|
|
785
|
+
default: !1
|
|
926
786
|
}
|
|
927
787
|
}
|
|
928
788
|
}
|
|
929
789
|
}
|
|
930
790
|
}),
|
|
931
791
|
i18nProps: ["url"]
|
|
932
|
-
}
|
|
933
|
-
const
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
if (!showLabel)
|
|
937
|
-
return /* @__PURE__ */ jsx(
|
|
792
|
+
}, Ve = (e) => {
|
|
793
|
+
const { blockProps: l, fieldName: t, label: n, styles: o, inputStyles: r, required: s, checked: a, showLabel: c = !0 } = e, y = I();
|
|
794
|
+
return c ? /* @__PURE__ */ b("div", { ...o, ...l, children: [
|
|
795
|
+
/* @__PURE__ */ i(
|
|
938
796
|
"input",
|
|
939
797
|
{
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
...styles,
|
|
798
|
+
...r,
|
|
799
|
+
name: t,
|
|
800
|
+
id: y,
|
|
944
801
|
type: "checkbox",
|
|
945
|
-
required,
|
|
946
|
-
|
|
947
|
-
}
|
|
948
|
-
);
|
|
949
|
-
return /* @__PURE__ */ jsxs("div", { ...styles, ...blockProps, children: [
|
|
950
|
-
/* @__PURE__ */ jsx(
|
|
951
|
-
"input",
|
|
952
|
-
{
|
|
953
|
-
...inputStyles,
|
|
954
|
-
name: fieldName,
|
|
955
|
-
id: fieldId,
|
|
956
|
-
type: "checkbox",
|
|
957
|
-
required,
|
|
958
|
-
defaultChecked: checked
|
|
802
|
+
required: s,
|
|
803
|
+
defaultChecked: a
|
|
959
804
|
}
|
|
960
805
|
),
|
|
961
|
-
|
|
962
|
-
] })
|
|
963
|
-
|
|
964
|
-
|
|
806
|
+
n && /* @__PURE__ */ i("label", { htmlFor: y, children: n })
|
|
807
|
+
] }) : /* @__PURE__ */ i(
|
|
808
|
+
"input",
|
|
809
|
+
{
|
|
810
|
+
id: y,
|
|
811
|
+
...l,
|
|
812
|
+
...r,
|
|
813
|
+
...o,
|
|
814
|
+
type: "checkbox",
|
|
815
|
+
required: s,
|
|
816
|
+
name: t
|
|
817
|
+
}
|
|
818
|
+
);
|
|
819
|
+
}, Oe = {
|
|
965
820
|
type: "Checkbox",
|
|
966
821
|
label: "web_blocks.checkbox",
|
|
967
822
|
category: "core",
|
|
968
|
-
icon:
|
|
823
|
+
icon: X,
|
|
969
824
|
group: "form",
|
|
970
|
-
...
|
|
825
|
+
...m({
|
|
971
826
|
properties: {
|
|
972
|
-
styles:
|
|
973
|
-
inputStyles:
|
|
827
|
+
styles: u("flex items-center gap-x-2"),
|
|
828
|
+
inputStyles: u(""),
|
|
974
829
|
fieldName: {
|
|
975
830
|
type: "string",
|
|
976
831
|
title: "Field Name",
|
|
@@ -984,59 +839,52 @@ const Config$9 = {
|
|
|
984
839
|
checked: {
|
|
985
840
|
type: "boolean",
|
|
986
841
|
title: "Checked",
|
|
987
|
-
default:
|
|
842
|
+
default: !1
|
|
988
843
|
},
|
|
989
844
|
required: {
|
|
990
845
|
type: "boolean",
|
|
991
846
|
title: "Required",
|
|
992
|
-
default:
|
|
847
|
+
default: !1
|
|
993
848
|
},
|
|
994
849
|
showLabel: {
|
|
995
850
|
type: "boolean",
|
|
996
851
|
title: "Show Label",
|
|
997
|
-
default:
|
|
852
|
+
default: !0
|
|
998
853
|
}
|
|
999
854
|
}
|
|
1000
855
|
}),
|
|
1001
856
|
aiProps: ["label"],
|
|
1002
857
|
i18nProps: ["label"]
|
|
1003
|
-
}
|
|
1004
|
-
const
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
if (!children) {
|
|
1008
|
-
nestedChildren = /* @__PURE__ */ jsx(EmptySlot, { inBuilder });
|
|
1009
|
-
}
|
|
1010
|
-
const alpineAttrs = {
|
|
1011
|
-
"x-data": "{}",
|
|
1012
|
-
"x-on:submit.prevent": "post"
|
|
1013
|
-
};
|
|
1014
|
-
const formResponseAttr = {
|
|
1015
|
-
"x-html": "",
|
|
1016
|
-
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
1017
|
-
};
|
|
1018
|
-
return /* @__PURE__ */ jsxs(
|
|
858
|
+
}, We = (e) => {
|
|
859
|
+
const { children: l, blockProps: t, errorMessage: n, successMessage: o, action: r, styles: s, inBuilder: a } = e;
|
|
860
|
+
let c = l;
|
|
861
|
+
return l || (c = /* @__PURE__ */ i(v, { inBuilder: a })), /* @__PURE__ */ b(
|
|
1019
862
|
"form",
|
|
1020
863
|
{
|
|
1021
|
-
...
|
|
1022
|
-
|
|
1023
|
-
|
|
864
|
+
...{
|
|
865
|
+
"x-data": "{}",
|
|
866
|
+
"x-on:submit.prevent": "post"
|
|
867
|
+
},
|
|
868
|
+
"data-error": n,
|
|
869
|
+
"data-success": o,
|
|
1024
870
|
method: "post",
|
|
1025
|
-
action,
|
|
1026
|
-
...
|
|
1027
|
-
...
|
|
871
|
+
action: r,
|
|
872
|
+
...t,
|
|
873
|
+
...s,
|
|
1028
874
|
children: [
|
|
1029
|
-
/* @__PURE__ */
|
|
1030
|
-
|
|
875
|
+
/* @__PURE__ */ i("div", { ...{
|
|
876
|
+
"x-html": "",
|
|
877
|
+
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
878
|
+
} }),
|
|
879
|
+
c
|
|
1031
880
|
]
|
|
1032
881
|
}
|
|
1033
882
|
);
|
|
1034
|
-
}
|
|
1035
|
-
const Config$8 = {
|
|
883
|
+
}, Xe = {
|
|
1036
884
|
type: "Form",
|
|
1037
885
|
label: "Form",
|
|
1038
886
|
category: "core",
|
|
1039
|
-
icon:
|
|
887
|
+
icon: le,
|
|
1040
888
|
group: "form",
|
|
1041
889
|
blocks: () => [
|
|
1042
890
|
{ _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
|
|
@@ -1048,9 +896,9 @@ const Config$8 = {
|
|
|
1048
896
|
styles: "#styles:bg-black text-white rounded px-3 py-1,"
|
|
1049
897
|
}
|
|
1050
898
|
],
|
|
1051
|
-
...
|
|
899
|
+
...m({
|
|
1052
900
|
properties: {
|
|
1053
|
-
styles:
|
|
901
|
+
styles: u(""),
|
|
1054
902
|
action: {
|
|
1055
903
|
type: "string",
|
|
1056
904
|
title: "Submit URL",
|
|
@@ -1072,56 +920,52 @@ const Config$8 = {
|
|
|
1072
920
|
}),
|
|
1073
921
|
i18nProps: ["errorMessage", "successMessage"],
|
|
1074
922
|
aiProps: ["errorMessage", "successMessage"],
|
|
1075
|
-
canAcceptBlock: () =>
|
|
1076
|
-
}
|
|
1077
|
-
const
|
|
1078
|
-
|
|
1079
|
-
const fieldId = generateUUID();
|
|
1080
|
-
const attrs = {
|
|
1081
|
-
"x-bind:disabled": "formLoading"
|
|
1082
|
-
};
|
|
1083
|
-
return /* @__PURE__ */ jsxs(
|
|
923
|
+
canAcceptBlock: () => !0
|
|
924
|
+
}, Ye = (e) => {
|
|
925
|
+
const { blockProps: l, inBuilder: t, label: n, styles: o, inputStyles: r, icon: s, iconSize: a, iconPos: c } = e, y = I();
|
|
926
|
+
return /* @__PURE__ */ b(
|
|
1084
927
|
"button",
|
|
1085
928
|
{
|
|
1086
|
-
id:
|
|
1087
|
-
...
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
...
|
|
1091
|
-
|
|
1092
|
-
|
|
929
|
+
id: y,
|
|
930
|
+
...{
|
|
931
|
+
"x-bind:disabled": "formLoading"
|
|
932
|
+
},
|
|
933
|
+
...r,
|
|
934
|
+
...o,
|
|
935
|
+
...l || {},
|
|
936
|
+
type: t ? "button" : "submit",
|
|
937
|
+
"aria-label": n,
|
|
1093
938
|
children: [
|
|
1094
|
-
|
|
1095
|
-
|
|
939
|
+
n,
|
|
940
|
+
s && /* @__PURE__ */ i(
|
|
1096
941
|
"div",
|
|
1097
942
|
{
|
|
1098
|
-
style: { width:
|
|
1099
|
-
className:
|
|
1100
|
-
dangerouslySetInnerHTML: { __html:
|
|
943
|
+
style: { width: a + "px" },
|
|
944
|
+
className: c + " " + (c === "order-first" ? "mr-2" : "ml-2") || "",
|
|
945
|
+
dangerouslySetInnerHTML: { __html: s }
|
|
1101
946
|
}
|
|
1102
947
|
)
|
|
1103
948
|
]
|
|
1104
949
|
}
|
|
1105
950
|
);
|
|
1106
|
-
}
|
|
1107
|
-
const Config$7 = {
|
|
951
|
+
}, Ze = {
|
|
1108
952
|
type: "FormButton",
|
|
1109
953
|
label: "Submit Button",
|
|
1110
954
|
category: "core",
|
|
1111
|
-
icon:
|
|
955
|
+
icon: T,
|
|
1112
956
|
group: "form",
|
|
1113
|
-
...
|
|
957
|
+
...m({
|
|
1114
958
|
properties: {
|
|
1115
|
-
styles:
|
|
959
|
+
styles: u(
|
|
1116
960
|
"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
|
|
1117
961
|
),
|
|
1118
|
-
inputStyles:
|
|
962
|
+
inputStyles: u(""),
|
|
1119
963
|
label: {
|
|
1120
964
|
type: "string",
|
|
1121
965
|
title: "Label",
|
|
1122
966
|
default: "Submit",
|
|
1123
|
-
ai:
|
|
1124
|
-
i18n:
|
|
967
|
+
ai: !0,
|
|
968
|
+
i18n: !0
|
|
1125
969
|
},
|
|
1126
970
|
icon: {
|
|
1127
971
|
type: "string",
|
|
@@ -1144,50 +988,44 @@ const Config$7 = {
|
|
|
1144
988
|
}),
|
|
1145
989
|
i18nProps: ["label"],
|
|
1146
990
|
aiProps: ["label"]
|
|
1147
|
-
}
|
|
1148
|
-
const
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
return /* @__PURE__ */ jsx(
|
|
991
|
+
}, Je = (e) => {
|
|
992
|
+
const { blockProps: l, fieldName: t, label: n, placeholder: o, styles: r, inputStyles: s, showLabel: a, required: c, inputType: y } = e, g = I();
|
|
993
|
+
return a ? /* @__PURE__ */ b("div", { ...r, ...l, children: [
|
|
994
|
+
a && /* @__PURE__ */ i("label", { htmlFor: g, children: n }),
|
|
995
|
+
/* @__PURE__ */ i(
|
|
1153
996
|
"input",
|
|
1154
997
|
{
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
placeholder,
|
|
1162
|
-
required
|
|
1163
|
-
}
|
|
1164
|
-
);
|
|
1165
|
-
}
|
|
1166
|
-
return /* @__PURE__ */ jsxs("div", { ...styles, ...blockProps, children: [
|
|
1167
|
-
showLabel && /* @__PURE__ */ jsx("label", { htmlFor: fieldId, children: label }),
|
|
1168
|
-
/* @__PURE__ */ jsx(
|
|
1169
|
-
"input",
|
|
1170
|
-
{
|
|
1171
|
-
name: fieldName,
|
|
1172
|
-
...inputStyles,
|
|
1173
|
-
id: fieldId,
|
|
1174
|
-
type: inputType,
|
|
1175
|
-
placeholder,
|
|
1176
|
-
required
|
|
998
|
+
name: t,
|
|
999
|
+
...s,
|
|
1000
|
+
id: g,
|
|
1001
|
+
type: y,
|
|
1002
|
+
placeholder: o,
|
|
1003
|
+
required: c
|
|
1177
1004
|
}
|
|
1178
1005
|
)
|
|
1179
|
-
] })
|
|
1180
|
-
|
|
1181
|
-
|
|
1006
|
+
] }) : /* @__PURE__ */ i(
|
|
1007
|
+
"input",
|
|
1008
|
+
{
|
|
1009
|
+
id: g,
|
|
1010
|
+
name: t,
|
|
1011
|
+
...l,
|
|
1012
|
+
...s,
|
|
1013
|
+
...r,
|
|
1014
|
+
type: y,
|
|
1015
|
+
placeholder: o,
|
|
1016
|
+
required: c
|
|
1017
|
+
}
|
|
1018
|
+
);
|
|
1019
|
+
}, Ke = {
|
|
1182
1020
|
type: "Input",
|
|
1183
1021
|
label: "web_blocks.input",
|
|
1184
1022
|
category: "core",
|
|
1185
|
-
icon:
|
|
1023
|
+
icon: E,
|
|
1186
1024
|
group: "form",
|
|
1187
|
-
...
|
|
1025
|
+
...m({
|
|
1188
1026
|
properties: {
|
|
1189
|
-
styles:
|
|
1190
|
-
inputStyles:
|
|
1027
|
+
styles: u(""),
|
|
1028
|
+
inputStyles: u("w-full p-1"),
|
|
1191
1029
|
fieldName: {
|
|
1192
1030
|
type: "string",
|
|
1193
1031
|
title: "Field Name",
|
|
@@ -1196,14 +1034,14 @@ const Config$6 = {
|
|
|
1196
1034
|
showLabel: {
|
|
1197
1035
|
type: "boolean",
|
|
1198
1036
|
title: "Show Label",
|
|
1199
|
-
default:
|
|
1037
|
+
default: !0
|
|
1200
1038
|
},
|
|
1201
1039
|
label: {
|
|
1202
1040
|
type: "string",
|
|
1203
1041
|
title: "Label",
|
|
1204
1042
|
default: "Label",
|
|
1205
|
-
ai:
|
|
1206
|
-
i18n:
|
|
1043
|
+
ai: !0,
|
|
1044
|
+
i18n: !0
|
|
1207
1045
|
},
|
|
1208
1046
|
placeholder: {
|
|
1209
1047
|
type: "string",
|
|
@@ -1213,7 +1051,7 @@ const Config$6 = {
|
|
|
1213
1051
|
required: {
|
|
1214
1052
|
type: "boolean",
|
|
1215
1053
|
title: "Required",
|
|
1216
|
-
default:
|
|
1054
|
+
default: !1
|
|
1217
1055
|
},
|
|
1218
1056
|
inputType: {
|
|
1219
1057
|
type: "string",
|
|
@@ -1238,25 +1076,21 @@ const Config$6 = {
|
|
|
1238
1076
|
}),
|
|
1239
1077
|
aiProps: ["label", "placeholder"],
|
|
1240
1078
|
i18nProps: ["label", "placeholder"]
|
|
1241
|
-
}
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
return React.createElement("label", {
|
|
1247
|
-
...labelProps,
|
|
1248
|
-
dangerouslySetInnerHTML: { __html: content }
|
|
1079
|
+
}, Qe = (e) => {
|
|
1080
|
+
const { blockProps: l, content: t, styles: n, children: o } = e, r = { ...n, ...l };
|
|
1081
|
+
return o ? f.createElement("label", r, o) : f.createElement("label", {
|
|
1082
|
+
...r,
|
|
1083
|
+
dangerouslySetInnerHTML: { __html: t }
|
|
1249
1084
|
});
|
|
1250
|
-
}
|
|
1251
|
-
const Config$5 = {
|
|
1085
|
+
}, et = {
|
|
1252
1086
|
type: "Label",
|
|
1253
1087
|
label: "Label",
|
|
1254
1088
|
category: "core",
|
|
1255
|
-
icon:
|
|
1089
|
+
icon: Y,
|
|
1256
1090
|
group: "form",
|
|
1257
|
-
...
|
|
1091
|
+
...m({
|
|
1258
1092
|
properties: {
|
|
1259
|
-
styles:
|
|
1093
|
+
styles: u(),
|
|
1260
1094
|
content: {
|
|
1261
1095
|
type: "string",
|
|
1262
1096
|
title: "Content",
|
|
@@ -1266,39 +1100,34 @@ const Config$5 = {
|
|
|
1266
1100
|
}),
|
|
1267
1101
|
aiProps: ["content"],
|
|
1268
1102
|
i18nProps: ["content"]
|
|
1269
|
-
}
|
|
1270
|
-
const
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
/* @__PURE__ */ jsx("input", { ...inputStyles, name: fieldName, id: fieldId, type: "radio", required, defaultChecked: checked }),
|
|
1289
|
-
label && /* @__PURE__ */ jsx("label", { htmlFor: fieldId, children: label })
|
|
1290
|
-
] });
|
|
1291
|
-
};
|
|
1292
|
-
const Config$4 = {
|
|
1103
|
+
}, tt = (e) => {
|
|
1104
|
+
const { blockProps: l, fieldName: t, label: n, styles: o, inputStyles: r, required: s, checked: a, showLabel: c = !0 } = e, y = I();
|
|
1105
|
+
return c ? /* @__PURE__ */ b("div", { ...o, ...l, children: [
|
|
1106
|
+
/* @__PURE__ */ i("input", { ...r, name: t, id: y, type: "radio", required: s, defaultChecked: a }),
|
|
1107
|
+
n && /* @__PURE__ */ i("label", { htmlFor: y, children: n })
|
|
1108
|
+
] }) : /* @__PURE__ */ i(
|
|
1109
|
+
"input",
|
|
1110
|
+
{
|
|
1111
|
+
id: y,
|
|
1112
|
+
...l,
|
|
1113
|
+
...r,
|
|
1114
|
+
...o,
|
|
1115
|
+
type: "radio",
|
|
1116
|
+
required: s,
|
|
1117
|
+
checked: a,
|
|
1118
|
+
name: t
|
|
1119
|
+
}
|
|
1120
|
+
);
|
|
1121
|
+
}, lt = {
|
|
1293
1122
|
type: "Radio",
|
|
1294
1123
|
label: "web_blocks.radio",
|
|
1295
1124
|
category: "core",
|
|
1296
|
-
icon:
|
|
1125
|
+
icon: Z,
|
|
1297
1126
|
group: "form",
|
|
1298
|
-
...
|
|
1127
|
+
...m({
|
|
1299
1128
|
properties: {
|
|
1300
|
-
styles:
|
|
1301
|
-
inputStyles:
|
|
1129
|
+
styles: u("flex items-center gap-x-2"),
|
|
1130
|
+
inputStyles: u(""),
|
|
1302
1131
|
fieldName: {
|
|
1303
1132
|
type: "string",
|
|
1304
1133
|
title: "Field Name",
|
|
@@ -1312,50 +1141,44 @@ const Config$4 = {
|
|
|
1312
1141
|
checked: {
|
|
1313
1142
|
type: "boolean",
|
|
1314
1143
|
title: "Checked",
|
|
1315
|
-
default:
|
|
1144
|
+
default: !1
|
|
1316
1145
|
},
|
|
1317
1146
|
required: {
|
|
1318
1147
|
type: "boolean",
|
|
1319
1148
|
title: "Required",
|
|
1320
|
-
default:
|
|
1149
|
+
default: !1
|
|
1321
1150
|
},
|
|
1322
1151
|
showLabel: {
|
|
1323
1152
|
type: "boolean",
|
|
1324
1153
|
title: "Show Label",
|
|
1325
|
-
default:
|
|
1154
|
+
default: !0
|
|
1326
1155
|
}
|
|
1327
1156
|
}
|
|
1328
1157
|
}),
|
|
1329
1158
|
aiProps: ["label"],
|
|
1330
1159
|
i18nProps: ["label"]
|
|
1331
|
-
}
|
|
1332
|
-
const
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
/* @__PURE__ */
|
|
1338
|
-
map(options, (option) => /* @__PURE__ */ jsx("option", { value: option == null ? void 0 : option.value, children: option == null ? void 0 : option.label }, option == null ? void 0 : option.value))
|
|
1339
|
-
] });
|
|
1340
|
-
}
|
|
1341
|
-
return /* @__PURE__ */ jsxs("div", { ...styles, ...blockProps, children: [
|
|
1342
|
-
showLabel && /* @__PURE__ */ jsx("label", { htmlFor: fieldId, children: label }),
|
|
1343
|
-
/* @__PURE__ */ jsxs("select", { ...inputStyles, id: fieldId, required, multiple: _multiple, name: fieldName, children: [
|
|
1344
|
-
/* @__PURE__ */ jsx("option", { value: "", disabled: true, selected: true, hidden: true, children: placeholder }),
|
|
1345
|
-
map(options, (option) => /* @__PURE__ */ jsx("option", { value: option == null ? void 0 : option.value, children: option == null ? void 0 : option.label }, option == null ? void 0 : option.value))
|
|
1160
|
+
}, ot = (e) => {
|
|
1161
|
+
const { blockProps: l, fieldName: t, label: n, placeholder: o, styles: r, inputStyles: s, required: a, showLabel: c, _multiple: y, options: g } = e, k = I();
|
|
1162
|
+
return c ? /* @__PURE__ */ b("div", { ...r, ...l, children: [
|
|
1163
|
+
c && /* @__PURE__ */ i("label", { htmlFor: k, children: n }),
|
|
1164
|
+
/* @__PURE__ */ b("select", { ...s, id: k, required: a, multiple: y, name: t, children: [
|
|
1165
|
+
/* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
|
|
1166
|
+
P(g, (p) => /* @__PURE__ */ i("option", { value: p == null ? void 0 : p.value, children: p == null ? void 0 : p.label }, p == null ? void 0 : p.value))
|
|
1346
1167
|
] })
|
|
1168
|
+
] }) : /* @__PURE__ */ b("select", { id: k, ...r, ...l, required: a, multiple: y, name: t, children: [
|
|
1169
|
+
/* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
|
|
1170
|
+
P(g, (p) => /* @__PURE__ */ i("option", { value: p == null ? void 0 : p.value, children: p == null ? void 0 : p.label }, p == null ? void 0 : p.value))
|
|
1347
1171
|
] });
|
|
1348
|
-
}
|
|
1349
|
-
const Config$3 = {
|
|
1172
|
+
}, nt = {
|
|
1350
1173
|
type: "Select",
|
|
1351
1174
|
label: "web_blocks.select",
|
|
1352
1175
|
category: "core",
|
|
1353
|
-
icon:
|
|
1176
|
+
icon: J,
|
|
1354
1177
|
group: "form",
|
|
1355
|
-
...
|
|
1178
|
+
...m({
|
|
1356
1179
|
properties: {
|
|
1357
|
-
styles:
|
|
1358
|
-
inputStyles:
|
|
1180
|
+
styles: u(""),
|
|
1181
|
+
inputStyles: u("w-full p-1"),
|
|
1359
1182
|
fieldName: {
|
|
1360
1183
|
type: "string",
|
|
1361
1184
|
title: "Field Name",
|
|
@@ -1364,7 +1187,7 @@ const Config$3 = {
|
|
|
1364
1187
|
showLabel: {
|
|
1365
1188
|
type: "boolean",
|
|
1366
1189
|
title: "Show Label",
|
|
1367
|
-
default:
|
|
1190
|
+
default: !0
|
|
1368
1191
|
},
|
|
1369
1192
|
label: {
|
|
1370
1193
|
type: "string",
|
|
@@ -1379,12 +1202,12 @@ const Config$3 = {
|
|
|
1379
1202
|
required: {
|
|
1380
1203
|
type: "boolean",
|
|
1381
1204
|
title: "Required",
|
|
1382
|
-
default:
|
|
1205
|
+
default: !1
|
|
1383
1206
|
},
|
|
1384
1207
|
_multiple: {
|
|
1385
1208
|
type: "boolean",
|
|
1386
1209
|
title: "Multiple",
|
|
1387
|
-
default:
|
|
1210
|
+
default: !1
|
|
1388
1211
|
},
|
|
1389
1212
|
options: {
|
|
1390
1213
|
title: "Options",
|
|
@@ -1410,54 +1233,48 @@ const Config$3 = {
|
|
|
1410
1233
|
}),
|
|
1411
1234
|
aiProps: ["label", "placeholder"],
|
|
1412
1235
|
i18nProps: ["label", "placeholder"]
|
|
1413
|
-
}
|
|
1414
|
-
const
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
return /* @__PURE__ */ jsxs("div", { ...styles, ...blockProps, children: [
|
|
1432
|
-
showLabel && /* @__PURE__ */ jsx("label", { htmlFor: fieldId, children: label }),
|
|
1433
|
-
/* @__PURE__ */ jsx("textarea", { name: fieldName, ...inputStyles, id: fieldId, placeholder, rows: _rows })
|
|
1434
|
-
] });
|
|
1435
|
-
};
|
|
1436
|
-
const Config$2 = {
|
|
1236
|
+
}, rt = (e) => {
|
|
1237
|
+
const { blockProps: l, fieldName: t, label: n, placeholder: o, styles: r, inputStyles: s, _rows: a, showLabel: c } = e, y = I();
|
|
1238
|
+
return c ? /* @__PURE__ */ b("div", { ...r, ...l, children: [
|
|
1239
|
+
c && /* @__PURE__ */ i("label", { htmlFor: y, children: n }),
|
|
1240
|
+
/* @__PURE__ */ i("textarea", { name: t, ...s, id: y, placeholder: o, rows: a })
|
|
1241
|
+
] }) : /* @__PURE__ */ i(
|
|
1242
|
+
"textarea",
|
|
1243
|
+
{
|
|
1244
|
+
id: y,
|
|
1245
|
+
name: t,
|
|
1246
|
+
...l,
|
|
1247
|
+
...s,
|
|
1248
|
+
...r,
|
|
1249
|
+
placeholder: o,
|
|
1250
|
+
rows: a
|
|
1251
|
+
}
|
|
1252
|
+
);
|
|
1253
|
+
}, it = {
|
|
1437
1254
|
type: "TextArea",
|
|
1438
1255
|
label: "web_blocks.textarea",
|
|
1439
1256
|
category: "core",
|
|
1440
|
-
icon:
|
|
1257
|
+
icon: E,
|
|
1441
1258
|
group: "form",
|
|
1442
|
-
...
|
|
1259
|
+
...m({
|
|
1443
1260
|
properties: {
|
|
1444
1261
|
fieldName: {
|
|
1445
1262
|
type: "string",
|
|
1446
1263
|
title: "Field Name",
|
|
1447
1264
|
default: "fieldName"
|
|
1448
1265
|
},
|
|
1449
|
-
styles:
|
|
1450
|
-
inputStyles:
|
|
1266
|
+
styles: u(""),
|
|
1267
|
+
inputStyles: u("w-full p-1"),
|
|
1451
1268
|
showLabel: {
|
|
1452
1269
|
type: "boolean",
|
|
1453
1270
|
title: "Show Label",
|
|
1454
|
-
default:
|
|
1271
|
+
default: !0
|
|
1455
1272
|
},
|
|
1456
1273
|
label: {
|
|
1457
1274
|
type: "string",
|
|
1458
1275
|
title: "Label",
|
|
1459
1276
|
default: "Label",
|
|
1460
|
-
ui: { "ui:widget": "textarea", "ui:autosize":
|
|
1277
|
+
ui: { "ui:widget": "textarea", "ui:autosize": !0, "ui:rows": 3 }
|
|
1461
1278
|
},
|
|
1462
1279
|
placeholder: {
|
|
1463
1280
|
type: "string",
|
|
@@ -1473,28 +1290,25 @@ const Config$2 = {
|
|
|
1473
1290
|
}),
|
|
1474
1291
|
aiProps: ["label", "placeholder"],
|
|
1475
1292
|
i18nProps: ["label", "placeholder"]
|
|
1476
|
-
}
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
};
|
|
1481
|
-
const Config$1 = {
|
|
1293
|
+
}, st = (e) => {
|
|
1294
|
+
const { blockProps: l, styles: t } = e;
|
|
1295
|
+
return L("br", { ...l, ...t });
|
|
1296
|
+
}, at = {
|
|
1482
1297
|
type: "LineBreak",
|
|
1483
1298
|
label: "Line Break",
|
|
1484
1299
|
category: "core",
|
|
1485
1300
|
group: "basic",
|
|
1486
|
-
hidden:
|
|
1487
|
-
...
|
|
1301
|
+
hidden: !0,
|
|
1302
|
+
...m({
|
|
1488
1303
|
properties: {
|
|
1489
|
-
styles:
|
|
1304
|
+
styles: u("")
|
|
1490
1305
|
}
|
|
1491
1306
|
}),
|
|
1492
|
-
canAcceptBlock: () =>
|
|
1493
|
-
canDelete: () =>
|
|
1494
|
-
canMove: () =>
|
|
1495
|
-
canDuplicate: () =>
|
|
1496
|
-
}
|
|
1497
|
-
const NUMBER_TO_COL_SPAN = {
|
|
1307
|
+
canAcceptBlock: () => !0,
|
|
1308
|
+
canDelete: () => !1,
|
|
1309
|
+
canMove: () => !1,
|
|
1310
|
+
canDuplicate: () => !1
|
|
1311
|
+
}, B = {
|
|
1498
1312
|
SMALL: {
|
|
1499
1313
|
1: "col-span-1",
|
|
1500
1314
|
2: "col-span-2",
|
|
@@ -1537,31 +1351,27 @@ const NUMBER_TO_COL_SPAN = {
|
|
|
1537
1351
|
11: "lg:col-span-11",
|
|
1538
1352
|
12: "lg:col-span-12"
|
|
1539
1353
|
}
|
|
1540
|
-
}
|
|
1541
|
-
const
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
const _styles = { className: className.join(" ") };
|
|
1550
|
-
return /* @__PURE__ */ jsx("div", { ...blockProps, ...styles, ..._styles, children: children || /* @__PURE__ */ jsx("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
1551
|
-
};
|
|
1552
|
-
const ColumnConfig = {
|
|
1354
|
+
}, ct = (e) => {
|
|
1355
|
+
const { blockProps: l, children: t, styles: n, colSpan: o, tabletColSpan: r, desktopColSpan: s } = e, c = { className: [
|
|
1356
|
+
h(n, "className", ""),
|
|
1357
|
+
h(B, ["SMALL", isNaN(o) || !o ? 6 : o], ""),
|
|
1358
|
+
r ? h(B, ["MEDIUM", r || o], "") : "",
|
|
1359
|
+
s ? h(B, ["LARGE", r || o], "") : ""
|
|
1360
|
+
].join(" ") };
|
|
1361
|
+
return /* @__PURE__ */ i("div", { ...l, ...n, ...c, children: t || /* @__PURE__ */ i("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
1362
|
+
}, pt = {
|
|
1553
1363
|
type: "Column",
|
|
1554
1364
|
label: "Column",
|
|
1555
1365
|
group: "basic",
|
|
1556
1366
|
category: "core",
|
|
1557
|
-
icon:
|
|
1558
|
-
wrapper:
|
|
1559
|
-
canDelete: () =>
|
|
1560
|
-
canAcceptBlock: () =>
|
|
1561
|
-
canBeNested: (
|
|
1562
|
-
...
|
|
1367
|
+
icon: oe,
|
|
1368
|
+
wrapper: !0,
|
|
1369
|
+
canDelete: () => !0,
|
|
1370
|
+
canAcceptBlock: () => !0,
|
|
1371
|
+
canBeNested: (e) => e === "Row",
|
|
1372
|
+
...m({
|
|
1563
1373
|
properties: {
|
|
1564
|
-
styles:
|
|
1374
|
+
styles: u(""),
|
|
1565
1375
|
colSpan: {
|
|
1566
1376
|
type: "number",
|
|
1567
1377
|
title: "Column Span",
|
|
@@ -1584,34 +1394,25 @@ const ColumnConfig = {
|
|
|
1584
1394
|
}
|
|
1585
1395
|
}
|
|
1586
1396
|
})
|
|
1587
|
-
}
|
|
1588
|
-
const
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
const _styles = { className: className.join() };
|
|
1592
|
-
if (typeof (styles == null ? void 0 : styles.style) === "object") {
|
|
1593
|
-
styles.style.gap = `${gutter}px`;
|
|
1594
|
-
} else {
|
|
1595
|
-
_styles.style = { gap: `${gutter}px` };
|
|
1596
|
-
}
|
|
1597
|
-
return /* @__PURE__ */ jsx("div", { ...blockProps, ...styles, ..._styles, children });
|
|
1598
|
-
};
|
|
1599
|
-
const Config = {
|
|
1397
|
+
}, ut = (e) => {
|
|
1398
|
+
const { blockProps: l, children: t, styles: n, gutter: o } = e, s = { className: [h(n, "className", ""), " grid grid-cols-12"].join() };
|
|
1399
|
+
return typeof (n == null ? void 0 : n.style) == "object" ? n.style.gap = `${o}px` : s.style = { gap: `${o}px` }, /* @__PURE__ */ i("div", { ...l, ...n, ...s, children: t });
|
|
1400
|
+
}, dt = {
|
|
1600
1401
|
type: "Row",
|
|
1601
1402
|
label: "Row",
|
|
1602
1403
|
group: "basic",
|
|
1603
|
-
icon:
|
|
1404
|
+
icon: ne,
|
|
1604
1405
|
blocks: () => [
|
|
1605
1406
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1606
1407
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
1607
1408
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," }
|
|
1608
1409
|
],
|
|
1609
1410
|
category: "core",
|
|
1610
|
-
wrapper:
|
|
1611
|
-
canAcceptBlock: (
|
|
1612
|
-
...
|
|
1411
|
+
wrapper: !0,
|
|
1412
|
+
canAcceptBlock: (e) => e === "Column",
|
|
1413
|
+
...m({
|
|
1613
1414
|
properties: {
|
|
1614
|
-
styles:
|
|
1415
|
+
styles: u(""),
|
|
1615
1416
|
colCount: {
|
|
1616
1417
|
type: "number",
|
|
1617
1418
|
default: 2,
|
|
@@ -1626,39 +1427,9 @@ const Config = {
|
|
|
1626
1427
|
}
|
|
1627
1428
|
}
|
|
1628
1429
|
})
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
registerChaiBlock(Component$3, Config$s);
|
|
1632
|
-
registerChaiBlock(EmptyBox, Config$p);
|
|
1633
|
-
registerChaiBlock(Component$2, Config$r);
|
|
1634
|
-
registerChaiBlock(HeadingBlock, Config$o);
|
|
1635
|
-
registerChaiBlock(ParagraphBlock, Config$n);
|
|
1636
|
-
registerChaiBlock(SpanBlock, Config$l);
|
|
1637
|
-
registerChaiBlock(RichTextBlock, Config$m);
|
|
1638
|
-
registerChaiBlock(LinkBlock, Config$e);
|
|
1639
|
-
registerChaiBlock(LightBoxLinkBlock, Config$f);
|
|
1640
|
-
registerChaiBlock(ListBlock, Config$d);
|
|
1641
|
-
registerChaiBlock(ListItemBlock, Config$c);
|
|
1642
|
-
registerChaiBlock(IconBlock, Config$h);
|
|
1643
|
-
registerChaiBlock(ImageBlock, Config$g);
|
|
1644
|
-
registerChaiBlock(VideoBlock, Config$a);
|
|
1645
|
-
registerChaiBlock(CustomHTMLBlock, Config$q);
|
|
1646
|
-
registerChaiBlock(CustomScript, Config$k);
|
|
1647
|
-
registerChaiBlock(RawTextBlock, Config$b);
|
|
1648
|
-
registerChaiBlock(FormBlock, Config$8);
|
|
1649
|
-
registerChaiBlock(FormButtonBlock, Config$7);
|
|
1650
|
-
registerChaiBlock(InputBlock, Config$6);
|
|
1651
|
-
registerChaiBlock(CheckboxBlock, Config$9);
|
|
1652
|
-
registerChaiBlock(RadioBlock, Config$4);
|
|
1653
|
-
registerChaiBlock(SelectBlock, Config$3);
|
|
1654
|
-
registerChaiBlock(TextAreaBlock, Config$2);
|
|
1655
|
-
registerChaiBlock(LabelBlock, Config$5);
|
|
1656
|
-
registerChaiBlock(LineBreakBlock, Config$1);
|
|
1657
|
-
registerChaiBlock(DividerBlock, Config$j);
|
|
1658
|
-
registerChaiBlock(Component$1, Config$i);
|
|
1659
|
-
registerChaiBlock(Component, Config);
|
|
1660
|
-
registerChaiBlock(Column, ColumnConfig);
|
|
1430
|
+
}, wt = () => {
|
|
1431
|
+
d(re, ie), d(ue, de), d(se, ae), d(me, ye), d(ge, fe), d(ke, we), d(be, he), d(Ee, Re), d(Te, $e), d(Ae, He), d(ze, Fe), d(Pe, Se), d(Ne, Me), d(Ge, Ue), d(ce, pe), d(Le, ve), d(je, De), d(We, Xe), d(Ye, Ze), d(Je, Ke), d(Ve, Oe), d(tt, lt), d(ot, nt), d(rt, it), d(Qe, et), d(st, at), d(Ie, Ce), d(Be, _e), d(ut, dt), d(ct, pt);
|
|
1661
1432
|
};
|
|
1662
1433
|
export {
|
|
1663
|
-
loadWebBlocks
|
|
1434
|
+
wt as loadWebBlocks
|
|
1664
1435
|
};
|