@chaibuilder/sdk 2.3.2 → 2.3.4
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/core.cjs +1 -1
- package/dist/core.js +49 -34
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +349 -291
- package/package.json +1 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { registerChaiBlockSchema as d, StylesProp as u, registerChaiBlock as p, stylesProp as
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { c as
|
|
1
|
+
import { registerChaiBlockSchema as d, StylesProp as u, registerChaiBlock as p, stylesProp as T, closestBlockProp as V } from "@chaibuilder/runtime";
|
|
2
|
+
import { jsx as a, jsxs as b, Fragment as M } from "react/jsx-runtime";
|
|
3
|
+
import { c as P, g as C } from "./common-functions-BGzDsf1z.js";
|
|
4
4
|
import * as g from "react";
|
|
5
|
-
import { createElement as
|
|
6
|
-
import { ButtonIcon as
|
|
7
|
-
import { isEmpty as
|
|
8
|
-
import { FileCode as
|
|
9
|
-
const
|
|
5
|
+
import { createElement as w } from "react";
|
|
6
|
+
import { ButtonIcon as E, CopyIcon as j, CodeIcon as U, DividerHorizontalIcon as q, CheckboxIcon as F, InputIcon as $, LetterCaseToggleIcon as O, RadiobuttonIcon as G, DropdownMenuIcon as Y, HeadingIcon as W, TableIcon as X, BorderTopIcon as J, BorderAllIcon as Q, ViewHorizontalIcon as Z, DragHandleHorizontalIcon as K, SketchLogoIcon as ee, ImageIcon as te, Link1Icon as oe, RowsIcon as le, ColumnsIcon as re, TextIcon as ne, CursorTextIcon as ie, SpaceBetweenVerticallyIcon as ae, VideoIcon as se, LoopIcon as H } from "@radix-ui/react-icons";
|
|
7
|
+
import { isEmpty as v, get as h, map as N, isNull as ce, omit as pe, pick as de } from "lodash-es";
|
|
8
|
+
import { FileCode as ue, GroupIcon as me, GlobeIcon as z, Columns as ye, Rows as ge } from "lucide-react";
|
|
9
|
+
const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ a("div", { className: P("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ a("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ a("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, fe = (e) => {
|
|
10
10
|
const { blockProps: t, inBuilder: o, backgroundImage: l, children: r, tag: n = "div", styles: i } = e;
|
|
11
|
-
let
|
|
12
|
-
r || (
|
|
11
|
+
let s = r;
|
|
12
|
+
r || (s = /* @__PURE__ */ a(L, { inBuilder: o }));
|
|
13
13
|
let c = {};
|
|
14
|
-
return l && (c = { backgroundImage: `url(${l})` }), g.createElement(n, { ...t, ...i, style: c },
|
|
15
|
-
},
|
|
14
|
+
return l && (c = { backgroundImage: `url(${l})` }), g.createElement(n, { ...t, ...i, style: c }, s);
|
|
15
|
+
}, be = {
|
|
16
16
|
type: "Box",
|
|
17
17
|
description: "Similar to a div or section elements in HTML",
|
|
18
18
|
label: "Box",
|
|
@@ -54,18 +54,18 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
54
54
|
}
|
|
55
55
|
}),
|
|
56
56
|
canAcceptBlock: () => !0
|
|
57
|
-
},
|
|
58
|
-
const { blockProps: t, iconSize: o, icon: l, content: r, styles: n, children: i, iconPos:
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
k && /* @__PURE__ */
|
|
57
|
+
}, he = (e) => {
|
|
58
|
+
const { blockProps: t, iconSize: o, icon: l, content: r, styles: n, children: i, iconPos: s, link: c, inBuilder: m } = e, k = l, y = i || /* @__PURE__ */ b(M, { children: [
|
|
59
|
+
/* @__PURE__ */ a("span", { "data-ai-key": "content", children: r }),
|
|
60
|
+
k && /* @__PURE__ */ a(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
63
|
style: { width: o + "px" },
|
|
64
|
-
className:
|
|
64
|
+
className: s + " " + (s === "order-first" ? "mr-2" : "ml-2") || "",
|
|
65
65
|
dangerouslySetInnerHTML: { __html: k }
|
|
66
66
|
}
|
|
67
67
|
)
|
|
68
|
-
] }),
|
|
68
|
+
] }), x = w(
|
|
69
69
|
"button",
|
|
70
70
|
{
|
|
71
71
|
...t,
|
|
@@ -73,15 +73,15 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
73
73
|
type: "button",
|
|
74
74
|
"aria-label": r
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
y
|
|
77
77
|
);
|
|
78
|
-
return
|
|
79
|
-
},
|
|
78
|
+
return v(h(c, "href")) ? x : m ? /* @__PURE__ */ a("span", { children: x }) : /* @__PURE__ */ a("a", { "aria-label": r, href: h(c, "href") || "/", target: h(c, "target", "_self"), children: x });
|
|
79
|
+
}, ke = {
|
|
80
80
|
type: "Button",
|
|
81
81
|
description: "similar to a button element in HTML",
|
|
82
82
|
label: "Button",
|
|
83
83
|
category: "core",
|
|
84
|
-
icon:
|
|
84
|
+
icon: E,
|
|
85
85
|
group: "basic",
|
|
86
86
|
...d({
|
|
87
87
|
properties: {
|
|
@@ -133,12 +133,12 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
133
133
|
}),
|
|
134
134
|
i18nProps: ["content"],
|
|
135
135
|
aiProps: ["content"]
|
|
136
|
-
},
|
|
137
|
-
const { blockProps: t, iconSize: o, icon: l, content: r, styles: n } = e, i = l,
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
i && /* @__PURE__ */
|
|
136
|
+
}, xe = (e) => {
|
|
137
|
+
const { blockProps: t, iconSize: o, icon: l, content: r, styles: n } = e, i = l, s = /* @__PURE__ */ b(M, { children: [
|
|
138
|
+
/* @__PURE__ */ a("span", { "data-ai-key": "content", children: r }),
|
|
139
|
+
i && /* @__PURE__ */ a("div", { style: { width: o + "px" }, dangerouslySetInnerHTML: { __html: i } })
|
|
140
140
|
] });
|
|
141
|
-
return
|
|
141
|
+
return w(
|
|
142
142
|
"button",
|
|
143
143
|
{
|
|
144
144
|
...t,
|
|
@@ -146,14 +146,14 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
146
146
|
type: "button",
|
|
147
147
|
"aria-label": r
|
|
148
148
|
},
|
|
149
|
-
|
|
149
|
+
s
|
|
150
150
|
);
|
|
151
|
-
},
|
|
151
|
+
}, we = {
|
|
152
152
|
type: "CopyButton",
|
|
153
153
|
description: "A copy button component",
|
|
154
154
|
label: "Copy Button",
|
|
155
155
|
category: "core",
|
|
156
|
-
icon:
|
|
156
|
+
icon: j,
|
|
157
157
|
group: "basic",
|
|
158
158
|
...d({
|
|
159
159
|
properties: {
|
|
@@ -178,10 +178,10 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
178
178
|
}),
|
|
179
179
|
i18nProps: ["content"],
|
|
180
180
|
aiProps: ["content"]
|
|
181
|
-
},
|
|
181
|
+
}, Ce = (e) => {
|
|
182
182
|
const { blockProps: t, styles: o, htmlCode: l, inBuilder: r } = e;
|
|
183
|
-
return r ? /* @__PURE__ */
|
|
184
|
-
r ? /* @__PURE__ */
|
|
183
|
+
return r ? /* @__PURE__ */ b("div", { className: "relative", children: [
|
|
184
|
+
r ? /* @__PURE__ */ a("div", { ...t, ...o, className: "absolute z-20 h-full w-full" }) : null,
|
|
185
185
|
g.createElement("div", {
|
|
186
186
|
...o,
|
|
187
187
|
dangerouslySetInnerHTML: { __html: l.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
@@ -191,12 +191,12 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
191
191
|
...o,
|
|
192
192
|
dangerouslySetInnerHTML: { __html: l }
|
|
193
193
|
});
|
|
194
|
-
},
|
|
194
|
+
}, ve = {
|
|
195
195
|
type: "CustomHTML",
|
|
196
196
|
description: "similar to a div or section elements in HTML",
|
|
197
197
|
label: "Custom HTML",
|
|
198
198
|
category: "core",
|
|
199
|
-
icon:
|
|
199
|
+
icon: U,
|
|
200
200
|
group: "advanced",
|
|
201
201
|
...d({
|
|
202
202
|
properties: {
|
|
@@ -209,15 +209,15 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
209
209
|
}
|
|
210
210
|
}),
|
|
211
211
|
i18nProps: ["htmlCode"]
|
|
212
|
-
},
|
|
212
|
+
}, Le = (e) => {
|
|
213
213
|
const { scripts: t, inBuilder: o, blockProps: l } = e;
|
|
214
|
-
return o ? /* @__PURE__ */
|
|
215
|
-
},
|
|
214
|
+
return o ? /* @__PURE__ */ a("div", { ...l, children: /* @__PURE__ */ a("div", { className: P("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ a("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ a("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__ */ a("div", { dangerouslySetInnerHTML: { __html: t } });
|
|
215
|
+
}, Be = {
|
|
216
216
|
type: "CustomScript",
|
|
217
217
|
description: "similar to a script element in HTML",
|
|
218
218
|
label: "Custom Script",
|
|
219
219
|
category: "core",
|
|
220
|
-
icon:
|
|
220
|
+
icon: ue,
|
|
221
221
|
group: "advanced",
|
|
222
222
|
...d({
|
|
223
223
|
properties: {
|
|
@@ -230,26 +230,26 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
})
|
|
233
|
-
},
|
|
233
|
+
}, Ie = (e) => {
|
|
234
234
|
const { blockProps: t, styles: o } = e;
|
|
235
|
-
return
|
|
236
|
-
},
|
|
235
|
+
return w("hr", { ...o, ...t });
|
|
236
|
+
}, Pe = {
|
|
237
237
|
type: "Divider",
|
|
238
238
|
description: "A horizontal line component",
|
|
239
239
|
label: "Divider",
|
|
240
240
|
category: "core",
|
|
241
|
-
icon:
|
|
241
|
+
icon: q,
|
|
242
242
|
group: "basic",
|
|
243
243
|
...d({
|
|
244
244
|
properties: {
|
|
245
245
|
styles: u("bg-gray-900 h-0.5 py-2 my-1")
|
|
246
246
|
}
|
|
247
247
|
})
|
|
248
|
-
},
|
|
248
|
+
}, Se = (e) => {
|
|
249
249
|
const { blockProps: t, styles: o, backgroundImage: l } = e;
|
|
250
250
|
let r = {};
|
|
251
251
|
return l && (r = { backgroundImage: `url(${l})` }), g.createElement("div", { ...t, ...o, style: r });
|
|
252
|
-
},
|
|
252
|
+
}, _e = {
|
|
253
253
|
type: "EmptyBox",
|
|
254
254
|
description: "A box component with no children",
|
|
255
255
|
label: "Empty Box",
|
|
@@ -266,10 +266,10 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
})
|
|
269
|
-
},
|
|
270
|
-
const { blockProps: t, fieldName: o, label: l, styles: r, inputStyles: n, required: i, checked:
|
|
271
|
-
return c ? /* @__PURE__ */
|
|
272
|
-
/* @__PURE__ */
|
|
269
|
+
}, Te = (e) => {
|
|
270
|
+
const { blockProps: t, fieldName: o, label: l, styles: r, inputStyles: n, required: i, checked: s, showLabel: c = !0 } = e, m = C();
|
|
271
|
+
return c ? /* @__PURE__ */ b("div", { ...r, ...t, children: [
|
|
272
|
+
/* @__PURE__ */ a(
|
|
273
273
|
"input",
|
|
274
274
|
{
|
|
275
275
|
...n,
|
|
@@ -277,11 +277,11 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
277
277
|
id: m,
|
|
278
278
|
type: "checkbox",
|
|
279
279
|
required: i,
|
|
280
|
-
defaultChecked:
|
|
280
|
+
defaultChecked: s
|
|
281
281
|
}
|
|
282
282
|
),
|
|
283
|
-
l && /* @__PURE__ */
|
|
284
|
-
] }) : /* @__PURE__ */
|
|
283
|
+
l && /* @__PURE__ */ a("label", { htmlFor: m, children: l })
|
|
284
|
+
] }) : /* @__PURE__ */ a(
|
|
285
285
|
"input",
|
|
286
286
|
{
|
|
287
287
|
id: m,
|
|
@@ -290,14 +290,15 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
290
290
|
...r,
|
|
291
291
|
type: "checkbox",
|
|
292
292
|
required: i,
|
|
293
|
-
name: o
|
|
293
|
+
name: o,
|
|
294
|
+
defaultChecked: s
|
|
294
295
|
}
|
|
295
296
|
);
|
|
296
|
-
},
|
|
297
|
+
}, Ne = {
|
|
297
298
|
type: "Checkbox",
|
|
298
299
|
label: "web_blocks.checkbox",
|
|
299
300
|
category: "core",
|
|
300
|
-
icon:
|
|
301
|
+
icon: F,
|
|
301
302
|
group: "form",
|
|
302
303
|
...d({
|
|
303
304
|
properties: {
|
|
@@ -332,10 +333,10 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
332
333
|
}),
|
|
333
334
|
aiProps: ["label"],
|
|
334
335
|
i18nProps: ["label"]
|
|
335
|
-
},
|
|
336
|
-
const { children: t, blockProps: o, errorMessage: l, successMessage: r, action: n, styles: i, inBuilder:
|
|
336
|
+
}, Re = (e) => {
|
|
337
|
+
const { children: t, blockProps: o, errorMessage: l, successMessage: r, action: n, styles: i, inBuilder: s } = e;
|
|
337
338
|
let c = t;
|
|
338
|
-
return t || (c = /* @__PURE__ */
|
|
339
|
+
return t || (c = /* @__PURE__ */ a(L, { inBuilder: s })), /* @__PURE__ */ b(
|
|
339
340
|
"form",
|
|
340
341
|
{
|
|
341
342
|
...{
|
|
@@ -349,7 +350,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
349
350
|
...o,
|
|
350
351
|
...i,
|
|
351
352
|
children: [
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ a("div", { ...{
|
|
353
354
|
"x-html": "",
|
|
354
355
|
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
355
356
|
} }),
|
|
@@ -357,11 +358,11 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
357
358
|
]
|
|
358
359
|
}
|
|
359
360
|
);
|
|
360
|
-
},
|
|
361
|
+
}, Ae = {
|
|
361
362
|
type: "Form",
|
|
362
363
|
label: "Form",
|
|
363
364
|
category: "core",
|
|
364
|
-
icon:
|
|
365
|
+
icon: me,
|
|
365
366
|
group: "form",
|
|
366
367
|
blocks: () => [
|
|
367
368
|
{ _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
|
|
@@ -398,24 +399,24 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
398
399
|
i18nProps: ["errorMessage", "successMessage"],
|
|
399
400
|
aiProps: ["errorMessage", "successMessage"],
|
|
400
401
|
canAcceptBlock: () => !0
|
|
401
|
-
},
|
|
402
|
-
const { blockProps: t, inBuilder: o, label: l, styles: r, icon: n, iconSize: i, iconPos:
|
|
403
|
-
return /* @__PURE__ */
|
|
402
|
+
}, Me = (e) => {
|
|
403
|
+
const { blockProps: t, inBuilder: o, label: l, styles: r, icon: n, iconSize: i, iconPos: s } = e, c = C();
|
|
404
|
+
return /* @__PURE__ */ b("button", { id: c, ...r, ...t || {}, type: o ? "button" : "submit", "aria-label": l, children: [
|
|
404
405
|
l,
|
|
405
|
-
n && /* @__PURE__ */
|
|
406
|
+
n && /* @__PURE__ */ a(
|
|
406
407
|
"div",
|
|
407
408
|
{
|
|
408
409
|
style: { width: i + "px" },
|
|
409
|
-
className:
|
|
410
|
+
className: s + " " + (s === "order-first" ? "mr-2" : "ml-2") || "",
|
|
410
411
|
dangerouslySetInnerHTML: { __html: n }
|
|
411
412
|
}
|
|
412
413
|
)
|
|
413
414
|
] });
|
|
414
|
-
},
|
|
415
|
+
}, Ee = {
|
|
415
416
|
type: "FormButton",
|
|
416
417
|
label: "Submit Button",
|
|
417
418
|
category: "core",
|
|
418
|
-
icon:
|
|
419
|
+
icon: E,
|
|
419
420
|
group: "form",
|
|
420
421
|
...d({
|
|
421
422
|
properties: {
|
|
@@ -450,7 +451,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
450
451
|
}),
|
|
451
452
|
i18nProps: ["label"],
|
|
452
453
|
aiProps: ["label"]
|
|
453
|
-
},
|
|
454
|
+
}, $e = (e) => {
|
|
454
455
|
const t = { type: "text", autocomplete: "on" };
|
|
455
456
|
return e ? ["text", "password", "number", "hidden", "range", "color", "date", "time"].includes(e) ? { type: e, autocomplete: "on" } : e === "email" ? { type: "email", autocomplete: "email" } : e === "tel" ? { type: "tel", autocomplete: "tel" } : e === "url" ? { type: "url", autocomplete: "url" } : {
|
|
456
457
|
// Special cases
|
|
@@ -516,41 +517,43 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
516
517
|
organization: { type: "text", autocomplete: "organization" },
|
|
517
518
|
language: { type: "text", autocomplete: "language" }
|
|
518
519
|
}[e] || t : t;
|
|
519
|
-
},
|
|
520
|
-
const { blockProps: t, fieldName: o, label: l, placeholder: r, styles: n, inputStyles: i, showLabel:
|
|
521
|
-
return
|
|
522
|
-
|
|
523
|
-
/* @__PURE__ */
|
|
520
|
+
}, He = (e) => {
|
|
521
|
+
const { blockProps: t, fieldName: o, label: l, placeholder: r, styles: n, inputStyles: i, showLabel: s, required: c, inputType: m, defaultValue: k } = e, y = C(), { type: x, autocomplete: B } = $e(m);
|
|
522
|
+
return s ? /* @__PURE__ */ b("div", { ...n, ...t, children: [
|
|
523
|
+
s && /* @__PURE__ */ a("label", { htmlFor: y, children: l }),
|
|
524
|
+
/* @__PURE__ */ a(
|
|
524
525
|
"input",
|
|
525
526
|
{
|
|
526
527
|
name: o,
|
|
528
|
+
defaultValue: k,
|
|
527
529
|
...i,
|
|
528
|
-
id:
|
|
529
|
-
type:
|
|
530
|
+
id: y,
|
|
531
|
+
type: x,
|
|
530
532
|
placeholder: r,
|
|
531
533
|
required: c,
|
|
532
|
-
autoComplete:
|
|
534
|
+
autoComplete: B
|
|
533
535
|
}
|
|
534
536
|
)
|
|
535
|
-
] }) : /* @__PURE__ */
|
|
537
|
+
] }) : /* @__PURE__ */ a(
|
|
536
538
|
"input",
|
|
537
539
|
{
|
|
538
|
-
id:
|
|
540
|
+
id: y,
|
|
539
541
|
name: o,
|
|
540
542
|
...t,
|
|
541
543
|
...i,
|
|
542
544
|
...n,
|
|
543
|
-
type:
|
|
545
|
+
type: x,
|
|
544
546
|
placeholder: r,
|
|
545
547
|
required: c,
|
|
546
|
-
autoComplete:
|
|
548
|
+
autoComplete: B,
|
|
549
|
+
defaultValue: k
|
|
547
550
|
}
|
|
548
551
|
);
|
|
549
|
-
},
|
|
552
|
+
}, ze = {
|
|
550
553
|
type: "Input",
|
|
551
554
|
label: "web_blocks.input",
|
|
552
555
|
category: "core",
|
|
553
|
-
icon:
|
|
556
|
+
icon: $,
|
|
554
557
|
group: "form",
|
|
555
558
|
...d({
|
|
556
559
|
properties: {
|
|
@@ -649,22 +652,27 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
649
652
|
type: "boolean",
|
|
650
653
|
title: "Required",
|
|
651
654
|
default: !1
|
|
655
|
+
},
|
|
656
|
+
defaultValue: {
|
|
657
|
+
type: "string",
|
|
658
|
+
title: "Default Value",
|
|
659
|
+
default: ""
|
|
652
660
|
}
|
|
653
661
|
}
|
|
654
662
|
}),
|
|
655
663
|
aiProps: ["label", "placeholder"],
|
|
656
664
|
i18nProps: ["label", "placeholder"]
|
|
657
|
-
},
|
|
665
|
+
}, De = (e) => {
|
|
658
666
|
const { blockProps: t, content: o, styles: l, children: r } = e, n = { ...l, ...t };
|
|
659
667
|
return r ? g.createElement("label", n, r) : g.createElement("label", {
|
|
660
668
|
...n,
|
|
661
669
|
dangerouslySetInnerHTML: { __html: o }
|
|
662
670
|
});
|
|
663
|
-
},
|
|
671
|
+
}, Ve = {
|
|
664
672
|
type: "Label",
|
|
665
673
|
label: "Label",
|
|
666
674
|
category: "core",
|
|
667
|
-
icon:
|
|
675
|
+
icon: O,
|
|
668
676
|
group: "form",
|
|
669
677
|
...d({
|
|
670
678
|
properties: {
|
|
@@ -678,12 +686,12 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
678
686
|
}),
|
|
679
687
|
aiProps: ["content"],
|
|
680
688
|
i18nProps: ["content"]
|
|
681
|
-
},
|
|
682
|
-
const { blockProps: t, fieldName: o, label: l, styles: r, inputStyles: n, required: i, checked:
|
|
683
|
-
return c ? /* @__PURE__ */
|
|
684
|
-
/* @__PURE__ */
|
|
685
|
-
l && /* @__PURE__ */
|
|
686
|
-
] }) : /* @__PURE__ */
|
|
689
|
+
}, je = (e) => {
|
|
690
|
+
const { blockProps: t, fieldName: o, label: l, styles: r, inputStyles: n, required: i, checked: s, showLabel: c = !0 } = e, m = C();
|
|
691
|
+
return c ? /* @__PURE__ */ b("div", { ...r, ...t, children: [
|
|
692
|
+
/* @__PURE__ */ a("input", { ...n, name: o, id: m, type: "radio", required: i, defaultChecked: s }),
|
|
693
|
+
l && /* @__PURE__ */ a("label", { htmlFor: m, children: l })
|
|
694
|
+
] }) : /* @__PURE__ */ a(
|
|
687
695
|
"input",
|
|
688
696
|
{
|
|
689
697
|
id: m,
|
|
@@ -692,15 +700,15 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
692
700
|
...r,
|
|
693
701
|
type: "radio",
|
|
694
702
|
required: i,
|
|
695
|
-
checked:
|
|
703
|
+
checked: s,
|
|
696
704
|
name: o
|
|
697
705
|
}
|
|
698
706
|
);
|
|
699
|
-
},
|
|
707
|
+
}, Ue = {
|
|
700
708
|
type: "Radio",
|
|
701
709
|
label: "web_blocks.radio",
|
|
702
710
|
category: "core",
|
|
703
|
-
icon:
|
|
711
|
+
icon: G,
|
|
704
712
|
group: "form",
|
|
705
713
|
...d({
|
|
706
714
|
properties: {
|
|
@@ -735,23 +743,58 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
735
743
|
}),
|
|
736
744
|
aiProps: ["label"],
|
|
737
745
|
i18nProps: ["label"]
|
|
738
|
-
},
|
|
739
|
-
const {
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
746
|
+
}, qe = (e) => {
|
|
747
|
+
const {
|
|
748
|
+
blockProps: t,
|
|
749
|
+
fieldName: o,
|
|
750
|
+
label: l,
|
|
751
|
+
placeholder: r,
|
|
752
|
+
styles: n,
|
|
753
|
+
inputStyles: i,
|
|
754
|
+
required: s,
|
|
755
|
+
showLabel: c,
|
|
756
|
+
_multiple: m,
|
|
757
|
+
options: k,
|
|
758
|
+
defaultValue: y
|
|
759
|
+
} = e, x = C(), B = m && y ? y.split(",").map((f) => f.trim()) : y || "";
|
|
760
|
+
return c ? /* @__PURE__ */ b("div", { ...n, ...t, children: [
|
|
761
|
+
c && /* @__PURE__ */ a("label", { htmlFor: x, children: l }),
|
|
762
|
+
/* @__PURE__ */ b(
|
|
763
|
+
"select",
|
|
764
|
+
{
|
|
765
|
+
...i,
|
|
766
|
+
id: x,
|
|
767
|
+
required: s,
|
|
768
|
+
multiple: m,
|
|
769
|
+
name: o,
|
|
770
|
+
defaultValue: B,
|
|
771
|
+
children: [
|
|
772
|
+
/* @__PURE__ */ a("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
773
|
+
N(k, (f) => /* @__PURE__ */ a("option", { value: f == null ? void 0 : f.value, children: f == null ? void 0 : f.label }, f == null ? void 0 : f.value))
|
|
774
|
+
]
|
|
775
|
+
}
|
|
776
|
+
)
|
|
777
|
+
] }) : /* @__PURE__ */ b(
|
|
778
|
+
"select",
|
|
779
|
+
{
|
|
780
|
+
id: x,
|
|
781
|
+
...n,
|
|
782
|
+
...t,
|
|
783
|
+
required: s,
|
|
784
|
+
multiple: m,
|
|
785
|
+
name: o,
|
|
786
|
+
defaultValue: B,
|
|
787
|
+
children: [
|
|
788
|
+
/* @__PURE__ */ a("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
789
|
+
N(k, (f) => /* @__PURE__ */ a("option", { value: f == null ? void 0 : f.value, children: f == null ? void 0 : f.label }, f == null ? void 0 : f.value))
|
|
790
|
+
]
|
|
791
|
+
}
|
|
792
|
+
);
|
|
793
|
+
}, Fe = {
|
|
751
794
|
type: "Select",
|
|
752
795
|
label: "web_blocks.select",
|
|
753
796
|
category: "core",
|
|
754
|
-
icon:
|
|
797
|
+
icon: Y,
|
|
755
798
|
group: "form",
|
|
756
799
|
...d({
|
|
757
800
|
properties: {
|
|
@@ -782,6 +825,11 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
782
825
|
title: "Required",
|
|
783
826
|
default: !1
|
|
784
827
|
},
|
|
828
|
+
defaultValue: {
|
|
829
|
+
type: "string",
|
|
830
|
+
title: "Default Value",
|
|
831
|
+
default: ""
|
|
832
|
+
},
|
|
785
833
|
_multiple: {
|
|
786
834
|
type: "boolean",
|
|
787
835
|
title: "Multiple",
|
|
@@ -811,39 +859,41 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
811
859
|
}),
|
|
812
860
|
aiProps: ["label", "placeholder"],
|
|
813
861
|
i18nProps: ["label", "placeholder"]
|
|
814
|
-
},
|
|
815
|
-
const { blockProps: t, fieldName: o, label: l, placeholder: r, styles: n, inputStyles: i, rows:
|
|
816
|
-
return c ? /* @__PURE__ */
|
|
817
|
-
c && /* @__PURE__ */
|
|
818
|
-
/* @__PURE__ */
|
|
862
|
+
}, Oe = (e) => {
|
|
863
|
+
const { blockProps: t, fieldName: o, label: l, placeholder: r, styles: n, inputStyles: i, rows: s, showLabel: c, required: m, defaultValue: k } = e, y = C();
|
|
864
|
+
return c ? /* @__PURE__ */ b("div", { ...n, ...t, children: [
|
|
865
|
+
c && /* @__PURE__ */ a("label", { htmlFor: y, children: l }),
|
|
866
|
+
/* @__PURE__ */ a(
|
|
819
867
|
"textarea",
|
|
820
868
|
{
|
|
821
869
|
name: o,
|
|
822
870
|
...i,
|
|
823
|
-
id:
|
|
871
|
+
id: y,
|
|
824
872
|
placeholder: r,
|
|
825
|
-
rows:
|
|
826
|
-
required: m
|
|
873
|
+
rows: s,
|
|
874
|
+
required: m,
|
|
875
|
+
defaultValue: k
|
|
827
876
|
}
|
|
828
877
|
)
|
|
829
|
-
] }) : /* @__PURE__ */
|
|
878
|
+
] }) : /* @__PURE__ */ a(
|
|
830
879
|
"textarea",
|
|
831
880
|
{
|
|
832
|
-
id:
|
|
881
|
+
id: y,
|
|
833
882
|
name: o,
|
|
834
883
|
...t,
|
|
835
884
|
...i,
|
|
836
885
|
...n,
|
|
837
886
|
placeholder: r,
|
|
838
|
-
rows:
|
|
839
|
-
required: m
|
|
887
|
+
rows: s,
|
|
888
|
+
required: m,
|
|
889
|
+
defaultValue: k
|
|
840
890
|
}
|
|
841
891
|
);
|
|
842
|
-
},
|
|
892
|
+
}, Ge = {
|
|
843
893
|
type: "TextArea",
|
|
844
894
|
label: "web_blocks.textarea",
|
|
845
895
|
category: "core",
|
|
846
|
-
icon:
|
|
896
|
+
icon: $,
|
|
847
897
|
group: "form",
|
|
848
898
|
...d({
|
|
849
899
|
properties: {
|
|
@@ -879,32 +929,38 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
879
929
|
type: "boolean",
|
|
880
930
|
title: "Required",
|
|
881
931
|
default: !1
|
|
932
|
+
},
|
|
933
|
+
defaultValue: {
|
|
934
|
+
type: "string",
|
|
935
|
+
title: "Default Value",
|
|
936
|
+
default: "",
|
|
937
|
+
ui: { "ui:widget": "textarea", "ui:autosize": !0, "ui:rows": 3 }
|
|
882
938
|
}
|
|
883
939
|
}
|
|
884
940
|
}),
|
|
885
941
|
aiProps: ["label", "placeholder"],
|
|
886
942
|
i18nProps: ["label", "placeholder"]
|
|
887
|
-
},
|
|
943
|
+
}, Ye = (e) => {
|
|
888
944
|
const { blockProps: t, inBuilder: o, children: l, globalBlock: r } = e;
|
|
889
|
-
return o && !r ? /* @__PURE__ */
|
|
945
|
+
return o && !r ? /* @__PURE__ */ b(
|
|
890
946
|
"div",
|
|
891
947
|
{
|
|
892
948
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
893
949
|
...t,
|
|
894
950
|
children: [
|
|
895
|
-
/* @__PURE__ */
|
|
951
|
+
/* @__PURE__ */ b("h1", { children: [
|
|
896
952
|
"Global Block - ",
|
|
897
953
|
r
|
|
898
954
|
] }),
|
|
899
|
-
/* @__PURE__ */
|
|
955
|
+
/* @__PURE__ */ a("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
900
956
|
]
|
|
901
957
|
}
|
|
902
958
|
) : g.createElement("span", { ...t }, l);
|
|
903
|
-
},
|
|
959
|
+
}, We = {
|
|
904
960
|
type: "GlobalBlock",
|
|
905
961
|
description: "A global block component",
|
|
906
962
|
label: "Global Block",
|
|
907
|
-
icon:
|
|
963
|
+
icon: z,
|
|
908
964
|
category: "core",
|
|
909
965
|
group: "basic",
|
|
910
966
|
hidden: !0,
|
|
@@ -918,19 +974,19 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
918
974
|
}
|
|
919
975
|
}
|
|
920
976
|
})
|
|
921
|
-
},
|
|
977
|
+
}, Xe = (e) => {
|
|
922
978
|
const { blockProps: t, styles: o, content: l, tag: r = "h1", children: n = null } = e;
|
|
923
979
|
return n ? g.createElement(r, { ...o, ...t }, n) : g.createElement(r, {
|
|
924
980
|
...o,
|
|
925
981
|
...t,
|
|
926
982
|
dangerouslySetInnerHTML: { __html: l }
|
|
927
983
|
});
|
|
928
|
-
},
|
|
984
|
+
}, Je = {
|
|
929
985
|
type: "Heading",
|
|
930
986
|
description: "A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",
|
|
931
987
|
label: "Heading",
|
|
932
988
|
category: "core",
|
|
933
|
-
icon:
|
|
989
|
+
icon: W,
|
|
934
990
|
group: "typography",
|
|
935
991
|
...d({
|
|
936
992
|
properties: {
|
|
@@ -952,10 +1008,10 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
952
1008
|
aiProps: ["content"],
|
|
953
1009
|
i18nProps: ["content"],
|
|
954
1010
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
955
|
-
},
|
|
1011
|
+
}, Qe = (e) => {
|
|
956
1012
|
const { blockProps: t, styles: o } = e;
|
|
957
|
-
return
|
|
958
|
-
},
|
|
1013
|
+
return w("br", { ...t, ...o });
|
|
1014
|
+
}, Ze = {
|
|
959
1015
|
type: "LineBreak",
|
|
960
1016
|
label: "Line Break",
|
|
961
1017
|
category: "core",
|
|
@@ -970,89 +1026,89 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
970
1026
|
canDelete: () => !1,
|
|
971
1027
|
canMove: () => !1,
|
|
972
1028
|
canDuplicate: () => !1
|
|
973
|
-
},
|
|
1029
|
+
}, Ke = (e) => {
|
|
974
1030
|
const { blockProps: t, children: o, styles: l } = e;
|
|
975
|
-
return o ?
|
|
976
|
-
},
|
|
1031
|
+
return o ? w("table", { ...t, ...l }, o) : /* @__PURE__ */ a(L, {});
|
|
1032
|
+
}, et = (e) => {
|
|
977
1033
|
const { blockProps: t, children: o, styles: l } = e;
|
|
978
|
-
return o ?
|
|
979
|
-
},
|
|
1034
|
+
return o ? w("thead", { ...t, ...l }, o) : /* @__PURE__ */ a(L, {});
|
|
1035
|
+
}, tt = (e) => {
|
|
980
1036
|
const { blockProps: t, children: o, styles: l } = e;
|
|
981
|
-
return o ?
|
|
982
|
-
},
|
|
1037
|
+
return o ? w("tbody", { ...t, ...l }, o) : /* @__PURE__ */ a(L, {});
|
|
1038
|
+
}, ot = (e) => {
|
|
983
1039
|
const { blockProps: t, children: o, styles: l } = e;
|
|
984
|
-
return o ?
|
|
985
|
-
},
|
|
1040
|
+
return o ? w("tr", { ...t, ...l }, o) : /* @__PURE__ */ a(L, {});
|
|
1041
|
+
}, lt = (e) => {
|
|
986
1042
|
const { blockProps: t, children: o, content: l, styles: r } = e;
|
|
987
|
-
return !o &&
|
|
1043
|
+
return !o && v(l) ? /* @__PURE__ */ a(L, {}) : o ? w("td", { ...t, ...r }, o) : w("td", {
|
|
988
1044
|
...t,
|
|
989
1045
|
...r,
|
|
990
1046
|
dangerouslySetInnerHTML: { __html: l }
|
|
991
1047
|
});
|
|
992
1048
|
};
|
|
993
|
-
p(
|
|
1049
|
+
p(Ke, {
|
|
994
1050
|
type: "Table",
|
|
995
1051
|
label: "Table",
|
|
996
1052
|
category: "core",
|
|
997
1053
|
group: "table",
|
|
998
1054
|
hidden: !0,
|
|
999
|
-
icon:
|
|
1055
|
+
icon: X,
|
|
1000
1056
|
...d({
|
|
1001
1057
|
properties: {
|
|
1002
1058
|
styles: u("")
|
|
1003
1059
|
}
|
|
1004
1060
|
}),
|
|
1005
|
-
blocks:
|
|
1061
|
+
blocks: I("Table")
|
|
1006
1062
|
});
|
|
1007
|
-
p(
|
|
1063
|
+
p(et, {
|
|
1008
1064
|
type: "TableHead",
|
|
1009
1065
|
label: "Table Head",
|
|
1010
1066
|
category: "core",
|
|
1011
1067
|
group: "table",
|
|
1012
1068
|
hidden: !0,
|
|
1013
|
-
icon:
|
|
1069
|
+
icon: J,
|
|
1014
1070
|
...d({
|
|
1015
1071
|
properties: {
|
|
1016
1072
|
styles: u("")
|
|
1017
1073
|
}
|
|
1018
1074
|
}),
|
|
1019
|
-
blocks:
|
|
1075
|
+
blocks: I("TableHead")
|
|
1020
1076
|
});
|
|
1021
|
-
p(
|
|
1077
|
+
p(tt, {
|
|
1022
1078
|
type: "TableBody",
|
|
1023
1079
|
label: "Table Body",
|
|
1024
1080
|
category: "core",
|
|
1025
1081
|
group: "table",
|
|
1026
1082
|
hidden: !0,
|
|
1027
|
-
icon:
|
|
1083
|
+
icon: Q,
|
|
1028
1084
|
...d({
|
|
1029
1085
|
properties: {
|
|
1030
1086
|
styles: u("")
|
|
1031
1087
|
}
|
|
1032
1088
|
}),
|
|
1033
|
-
blocks:
|
|
1089
|
+
blocks: I("TableBody")
|
|
1034
1090
|
});
|
|
1035
|
-
p(
|
|
1091
|
+
p(ot, {
|
|
1036
1092
|
type: "TableRow",
|
|
1037
1093
|
label: "Table Row",
|
|
1038
1094
|
category: "core",
|
|
1039
1095
|
group: "table",
|
|
1040
1096
|
hidden: !0,
|
|
1041
|
-
icon:
|
|
1097
|
+
icon: Z,
|
|
1042
1098
|
...d({
|
|
1043
1099
|
properties: {
|
|
1044
1100
|
styles: u("")
|
|
1045
1101
|
}
|
|
1046
1102
|
}),
|
|
1047
|
-
blocks:
|
|
1103
|
+
blocks: I("TableRow")
|
|
1048
1104
|
});
|
|
1049
|
-
p(
|
|
1105
|
+
p(lt, {
|
|
1050
1106
|
type: "TableCell",
|
|
1051
1107
|
label: "Table Cell",
|
|
1052
1108
|
category: "core",
|
|
1053
1109
|
group: "table",
|
|
1054
1110
|
hidden: !0,
|
|
1055
|
-
icon:
|
|
1111
|
+
icon: K,
|
|
1056
1112
|
...d({
|
|
1057
1113
|
properties: {
|
|
1058
1114
|
styles: u(""),
|
|
@@ -1064,41 +1120,41 @@ p(et, {
|
|
|
1064
1120
|
}
|
|
1065
1121
|
}
|
|
1066
1122
|
}),
|
|
1067
|
-
blocks:
|
|
1123
|
+
blocks: I("TableCell"),
|
|
1068
1124
|
i18nProps: ["content"],
|
|
1069
1125
|
aiProps: ["content"]
|
|
1070
1126
|
});
|
|
1071
|
-
function
|
|
1127
|
+
function I(e) {
|
|
1072
1128
|
const t = (n, i) => ({
|
|
1073
|
-
_id:
|
|
1129
|
+
_id: C(),
|
|
1074
1130
|
_parent: n,
|
|
1075
1131
|
_type: "TableCell",
|
|
1076
1132
|
styles: "#styles:,",
|
|
1077
1133
|
content: `${e === "TableHead" ? "Table Head" : "Table Cell " + i}`
|
|
1078
1134
|
}), o = (n) => {
|
|
1079
|
-
const i =
|
|
1135
|
+
const i = C(), s = {
|
|
1080
1136
|
_type: "TableRow",
|
|
1081
1137
|
_id: i,
|
|
1082
1138
|
styles: "#styles:,border-b"
|
|
1083
1139
|
};
|
|
1084
|
-
return n && (
|
|
1140
|
+
return n && (s._parent = n), [s, t(i, "1"), t(i, "2"), t(i, "3")];
|
|
1085
1141
|
}, l = (n) => {
|
|
1086
|
-
const i =
|
|
1142
|
+
const i = C(), s = {
|
|
1087
1143
|
_id: i,
|
|
1088
1144
|
_type: "TableHead",
|
|
1089
1145
|
styles: "#styles:,font-medium"
|
|
1090
1146
|
};
|
|
1091
|
-
return n && (
|
|
1147
|
+
return n && (s._parent = n), [s, ...o(i)];
|
|
1092
1148
|
}, r = (n) => {
|
|
1093
|
-
const i =
|
|
1149
|
+
const i = C(), s = {
|
|
1094
1150
|
_id: i,
|
|
1095
1151
|
_type: "TableBody",
|
|
1096
1152
|
styles: "#styles:,"
|
|
1097
1153
|
};
|
|
1098
|
-
return n && (
|
|
1154
|
+
return n && (s._parent = n), [s, ...o(i), ...o(i)];
|
|
1099
1155
|
};
|
|
1100
1156
|
if (e === "Table") {
|
|
1101
|
-
const n =
|
|
1157
|
+
const n = C();
|
|
1102
1158
|
return [
|
|
1103
1159
|
{
|
|
1104
1160
|
_id: n,
|
|
@@ -1111,28 +1167,28 @@ function L(e) {
|
|
|
1111
1167
|
}
|
|
1112
1168
|
return e === "TableRow" ? o() : e === "TableHead" ? l() : e === "TableBody" ? r() : [];
|
|
1113
1169
|
}
|
|
1114
|
-
const
|
|
1170
|
+
const D = (e, ...t) => ({
|
|
1115
1171
|
...e,
|
|
1116
|
-
className:
|
|
1117
|
-
}),
|
|
1118
|
-
const { blockProps: t, icon: o, styles: l, width: r, inBuilder: n, height: i } = e,
|
|
1119
|
-
if (
|
|
1120
|
-
return /* @__PURE__ */
|
|
1172
|
+
className: P(e.className, ...t)
|
|
1173
|
+
}), rt = (e) => {
|
|
1174
|
+
const { blockProps: t, icon: o, styles: l, width: r, inBuilder: n, height: i } = e, s = D(l, "");
|
|
1175
|
+
if (v(o))
|
|
1176
|
+
return /* @__PURE__ */ a(L, { inBuilder: n, className: "h-8 w-14" });
|
|
1121
1177
|
const c = o.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
1122
1178
|
return g.createElement("span", {
|
|
1123
1179
|
...t,
|
|
1124
|
-
...
|
|
1180
|
+
...s,
|
|
1125
1181
|
style: {
|
|
1126
1182
|
width: r ? `${r}px` : "auto",
|
|
1127
1183
|
height: i ? `${i}px` : "auto"
|
|
1128
1184
|
},
|
|
1129
1185
|
dangerouslySetInnerHTML: { __html: c }
|
|
1130
1186
|
});
|
|
1131
|
-
},
|
|
1187
|
+
}, nt = {
|
|
1132
1188
|
type: "Icon",
|
|
1133
1189
|
label: "web_blocks.icon",
|
|
1134
1190
|
category: "core",
|
|
1135
|
-
icon:
|
|
1191
|
+
icon: ee,
|
|
1136
1192
|
group: "media",
|
|
1137
1193
|
...d({
|
|
1138
1194
|
properties: {
|
|
@@ -1155,11 +1211,11 @@ const $ = (e, ...t) => ({
|
|
|
1155
1211
|
}
|
|
1156
1212
|
}
|
|
1157
1213
|
})
|
|
1158
|
-
},
|
|
1159
|
-
const { blockProps: t, image: o, mobileImage: l, styles: r, alt: n, height: i, width:
|
|
1160
|
-
return
|
|
1161
|
-
l && /* @__PURE__ */
|
|
1162
|
-
/* @__PURE__ */
|
|
1214
|
+
}, it = (e) => {
|
|
1215
|
+
const { blockProps: t, image: o, mobileImage: l, styles: r, alt: n, height: i, width: s, lazyLoading: c } = e;
|
|
1216
|
+
return v(o) ? /* @__PURE__ */ a(L, { className: "h-36" }) : /* @__PURE__ */ b("picture", { children: [
|
|
1217
|
+
l && /* @__PURE__ */ a("source", { srcSet: l, media: "(max-width: 480px)" }),
|
|
1218
|
+
/* @__PURE__ */ a(
|
|
1163
1219
|
"img",
|
|
1164
1220
|
{
|
|
1165
1221
|
...t,
|
|
@@ -1167,17 +1223,17 @@ const $ = (e, ...t) => ({
|
|
|
1167
1223
|
src: o,
|
|
1168
1224
|
alt: n,
|
|
1169
1225
|
loading: c ? "lazy" : "eager",
|
|
1170
|
-
width:
|
|
1226
|
+
width: s,
|
|
1171
1227
|
height: i
|
|
1172
1228
|
}
|
|
1173
1229
|
)
|
|
1174
1230
|
] });
|
|
1175
|
-
},
|
|
1231
|
+
}, at = {
|
|
1176
1232
|
type: "Image",
|
|
1177
1233
|
description: "A image component",
|
|
1178
1234
|
label: "Image",
|
|
1179
1235
|
category: "core",
|
|
1180
|
-
icon:
|
|
1236
|
+
icon: te,
|
|
1181
1237
|
group: "media",
|
|
1182
1238
|
...d({
|
|
1183
1239
|
properties: {
|
|
@@ -1227,18 +1283,18 @@ const $ = (e, ...t) => ({
|
|
|
1227
1283
|
}),
|
|
1228
1284
|
aiProps: ["alt"],
|
|
1229
1285
|
i18nProps: ["alt"]
|
|
1230
|
-
},
|
|
1286
|
+
}, st = (e) => {
|
|
1231
1287
|
const { blockProps: t, link: o, children: l, styles: r, inBuilder: n, content: i } = e;
|
|
1232
|
-
let
|
|
1233
|
-
return !l &&
|
|
1288
|
+
let s = {};
|
|
1289
|
+
return !l && v(i) && (s = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? l ? /* @__PURE__ */ a("a", { ...t, style: s, ...r, children: l }) : w(
|
|
1234
1290
|
"a",
|
|
1235
1291
|
{
|
|
1236
1292
|
...t,
|
|
1237
1293
|
...r,
|
|
1238
|
-
style:
|
|
1294
|
+
style: s
|
|
1239
1295
|
},
|
|
1240
1296
|
i
|
|
1241
|
-
) : l ? /* @__PURE__ */
|
|
1297
|
+
) : l ? /* @__PURE__ */ a("a", { "aria-label": i, href: (o == null ? void 0 : o.href) || "#/", target: o == null ? void 0 : o.target, ...t, ...r, children: l }) : w(
|
|
1242
1298
|
"a",
|
|
1243
1299
|
{
|
|
1244
1300
|
...t,
|
|
@@ -1249,12 +1305,12 @@ const $ = (e, ...t) => ({
|
|
|
1249
1305
|
},
|
|
1250
1306
|
i
|
|
1251
1307
|
);
|
|
1252
|
-
},
|
|
1308
|
+
}, ct = {
|
|
1253
1309
|
type: "Link",
|
|
1254
1310
|
description: "A link component",
|
|
1255
1311
|
label: "Link",
|
|
1256
1312
|
category: "core",
|
|
1257
|
-
icon:
|
|
1313
|
+
icon: oe,
|
|
1258
1314
|
group: "basic",
|
|
1259
1315
|
...d({
|
|
1260
1316
|
properties: {
|
|
@@ -1290,18 +1346,18 @@ const $ = (e, ...t) => ({
|
|
|
1290
1346
|
aiProps: ["content"],
|
|
1291
1347
|
i18nProps: ["content"],
|
|
1292
1348
|
canAcceptBlock: (e) => e !== "Link"
|
|
1293
|
-
},
|
|
1294
|
-
const { blockProps: t, children: o, listType: l, styles: r, tag: n, inBuilder: i } = e,
|
|
1295
|
-
return !o &&
|
|
1349
|
+
}, pt = (e) => {
|
|
1350
|
+
const { blockProps: t, children: o, listType: l, styles: r, tag: n, inBuilder: i } = e, s = P(h(r, "className", ""), l);
|
|
1351
|
+
return !o && v(r == null ? void 0 : r.className) ? /* @__PURE__ */ a(L, { inBuilder: i }) : g.createElement(
|
|
1296
1352
|
n || (l === "list-decimal" ? "ol" : "ul"),
|
|
1297
|
-
{ ...t, ...r, className:
|
|
1353
|
+
{ ...t, ...r, className: s },
|
|
1298
1354
|
o
|
|
1299
1355
|
);
|
|
1300
|
-
},
|
|
1356
|
+
}, dt = {
|
|
1301
1357
|
type: "List",
|
|
1302
1358
|
description: "A list component",
|
|
1303
1359
|
label: "List",
|
|
1304
|
-
icon:
|
|
1360
|
+
icon: le,
|
|
1305
1361
|
category: "core",
|
|
1306
1362
|
group: "basic",
|
|
1307
1363
|
...d({
|
|
@@ -1344,18 +1400,18 @@ const $ = (e, ...t) => ({
|
|
|
1344
1400
|
content: "Item 3"
|
|
1345
1401
|
}
|
|
1346
1402
|
]
|
|
1347
|
-
},
|
|
1403
|
+
}, ut = (e) => {
|
|
1348
1404
|
const { blockProps: t, content: o, styles: l, children: r, tag: n } = e;
|
|
1349
1405
|
return r ? g.createElement(n || "li", { ...l, ...t }, r) : g.createElement(n || "li", {
|
|
1350
1406
|
...l,
|
|
1351
1407
|
...t,
|
|
1352
1408
|
dangerouslySetInnerHTML: { __html: o }
|
|
1353
1409
|
});
|
|
1354
|
-
},
|
|
1410
|
+
}, mt = {
|
|
1355
1411
|
type: "ListItem",
|
|
1356
1412
|
description: "A list item component",
|
|
1357
1413
|
label: "List Item",
|
|
1358
|
-
icon:
|
|
1414
|
+
icon: re,
|
|
1359
1415
|
category: "core",
|
|
1360
1416
|
group: "basic",
|
|
1361
1417
|
...d({
|
|
@@ -1375,19 +1431,19 @@ const $ = (e, ...t) => ({
|
|
|
1375
1431
|
aiProps: ["content"],
|
|
1376
1432
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
1377
1433
|
canBeNested: (e) => e === "List" || e === "Repeater"
|
|
1378
|
-
},
|
|
1434
|
+
}, yt = (e) => {
|
|
1379
1435
|
const { blockProps: t, styles: o, content: l } = e;
|
|
1380
|
-
return
|
|
1436
|
+
return ce(e.children) ? g.createElement("p", {
|
|
1381
1437
|
...o,
|
|
1382
1438
|
...t,
|
|
1383
1439
|
dangerouslySetInnerHTML: { __html: l }
|
|
1384
1440
|
}) : g.createElement("p", { ...o, ...t }, e.children);
|
|
1385
|
-
},
|
|
1441
|
+
}, gt = {
|
|
1386
1442
|
type: "Paragraph",
|
|
1387
1443
|
description: "A paragraph component",
|
|
1388
1444
|
label: "Paragraph",
|
|
1389
1445
|
category: "core",
|
|
1390
|
-
icon:
|
|
1446
|
+
icon: ne,
|
|
1391
1447
|
group: "typography",
|
|
1392
1448
|
...d({
|
|
1393
1449
|
properties: {
|
|
@@ -1403,27 +1459,27 @@ const $ = (e, ...t) => ({
|
|
|
1403
1459
|
i18nProps: ["content"],
|
|
1404
1460
|
aiProps: ["content"],
|
|
1405
1461
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
1406
|
-
},
|
|
1462
|
+
}, ft = (e) => {
|
|
1407
1463
|
const { blockProps: t, inBuilder: o, children: l, partialBlockId: r } = e;
|
|
1408
|
-
return o && !r ? /* @__PURE__ */
|
|
1464
|
+
return o && !r ? /* @__PURE__ */ b(
|
|
1409
1465
|
"div",
|
|
1410
1466
|
{
|
|
1411
1467
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
1412
1468
|
...t,
|
|
1413
1469
|
children: [
|
|
1414
|
-
/* @__PURE__ */
|
|
1470
|
+
/* @__PURE__ */ b("h1", { children: [
|
|
1415
1471
|
"Partial Block - ",
|
|
1416
1472
|
r
|
|
1417
1473
|
] }),
|
|
1418
|
-
/* @__PURE__ */
|
|
1474
|
+
/* @__PURE__ */ a("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
1419
1475
|
]
|
|
1420
1476
|
}
|
|
1421
1477
|
) : g.createElement("span", { ...t }, l);
|
|
1422
|
-
},
|
|
1478
|
+
}, bt = {
|
|
1423
1479
|
type: "PartialBlock",
|
|
1424
1480
|
description: "A partial block component",
|
|
1425
1481
|
label: "Partial Block",
|
|
1426
|
-
icon:
|
|
1482
|
+
icon: z,
|
|
1427
1483
|
category: "core",
|
|
1428
1484
|
group: "basic",
|
|
1429
1485
|
hidden: !0,
|
|
@@ -1437,7 +1493,7 @@ const $ = (e, ...t) => ({
|
|
|
1437
1493
|
}
|
|
1438
1494
|
}
|
|
1439
1495
|
})
|
|
1440
|
-
},
|
|
1496
|
+
}, S = {
|
|
1441
1497
|
SMALL: {
|
|
1442
1498
|
1: "col-span-1",
|
|
1443
1499
|
2: "col-span-2",
|
|
@@ -1480,21 +1536,21 @@ const $ = (e, ...t) => ({
|
|
|
1480
1536
|
11: "lg:col-span-11",
|
|
1481
1537
|
12: "lg:col-span-12"
|
|
1482
1538
|
}
|
|
1483
|
-
},
|
|
1539
|
+
}, ht = (e) => {
|
|
1484
1540
|
const { blockProps: t, children: o, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: i } = e, c = { className: [
|
|
1485
1541
|
h(l, "className", ""),
|
|
1486
|
-
h(
|
|
1487
|
-
n ? h(
|
|
1488
|
-
i ? h(
|
|
1542
|
+
h(S, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
|
|
1543
|
+
n ? h(S, ["MEDIUM", n || r], "") : "",
|
|
1544
|
+
i ? h(S, ["LARGE", n || r], "") : ""
|
|
1489
1545
|
].join(" ") };
|
|
1490
|
-
return /* @__PURE__ */
|
|
1491
|
-
},
|
|
1546
|
+
return /* @__PURE__ */ a("div", { ...t, ...l, ...c, children: o || /* @__PURE__ */ a("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
1547
|
+
}, kt = {
|
|
1492
1548
|
type: "Column",
|
|
1493
1549
|
description: "A column component",
|
|
1494
1550
|
label: "Column",
|
|
1495
1551
|
group: "basic",
|
|
1496
1552
|
category: "core",
|
|
1497
|
-
icon:
|
|
1553
|
+
icon: ye,
|
|
1498
1554
|
wrapper: !0,
|
|
1499
1555
|
canDelete: () => !0,
|
|
1500
1556
|
canAcceptBlock: () => !0,
|
|
@@ -1524,15 +1580,15 @@ const $ = (e, ...t) => ({
|
|
|
1524
1580
|
}
|
|
1525
1581
|
}
|
|
1526
1582
|
})
|
|
1527
|
-
},
|
|
1583
|
+
}, xt = (e) => {
|
|
1528
1584
|
const { blockProps: t, children: o, styles: l, gutter: r } = e, i = { className: [h(l, "className", ""), " grid grid-cols-12"].join() };
|
|
1529
|
-
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` : i.style = { gap: `${r}px` }, /* @__PURE__ */
|
|
1530
|
-
},
|
|
1585
|
+
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` : i.style = { gap: `${r}px` }, /* @__PURE__ */ a("div", { ...t, ...l, ...i, children: o });
|
|
1586
|
+
}, wt = {
|
|
1531
1587
|
type: "Row",
|
|
1532
1588
|
description: "A row component",
|
|
1533
1589
|
label: "Row",
|
|
1534
1590
|
group: "basic",
|
|
1535
|
-
icon:
|
|
1591
|
+
icon: ge,
|
|
1536
1592
|
blocks: () => [
|
|
1537
1593
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1538
1594
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
@@ -1558,19 +1614,19 @@ const $ = (e, ...t) => ({
|
|
|
1558
1614
|
}
|
|
1559
1615
|
}
|
|
1560
1616
|
})
|
|
1561
|
-
},
|
|
1562
|
-
const { blockProps: t, content: o, styles: l } = e, r =
|
|
1617
|
+
}, Ct = (e) => {
|
|
1618
|
+
const { blockProps: t, content: o, styles: l } = e, r = D(
|
|
1563
1619
|
l,
|
|
1564
1620
|
"prose dark:prose-invert prose-p:m-0 prose-p:min-h-[1rem] prose-blockquote:m-2 prose-blockquote:ml-4 prose-ul:m-0 prose-ol:m-0 prose-li:m-0",
|
|
1565
1621
|
"max-w-full"
|
|
1566
1622
|
);
|
|
1567
|
-
return /* @__PURE__ */
|
|
1568
|
-
},
|
|
1623
|
+
return /* @__PURE__ */ a("div", { ...t, ...r, dangerouslySetInnerHTML: { __html: o } });
|
|
1624
|
+
}, vt = {
|
|
1569
1625
|
type: "RichText",
|
|
1570
1626
|
description: "A rich text block",
|
|
1571
1627
|
label: "Rich Text",
|
|
1572
1628
|
category: "core",
|
|
1573
|
-
icon:
|
|
1629
|
+
icon: ie,
|
|
1574
1630
|
group: "typography",
|
|
1575
1631
|
...d({
|
|
1576
1632
|
properties: {
|
|
@@ -1585,14 +1641,14 @@ const $ = (e, ...t) => ({
|
|
|
1585
1641
|
}),
|
|
1586
1642
|
aiProps: ["content"],
|
|
1587
1643
|
i18nProps: ["content"]
|
|
1588
|
-
},
|
|
1644
|
+
}, Lt = (e) => {
|
|
1589
1645
|
const { blockProps: t, styles: o, content: l, children: r = null, tag: n } = e;
|
|
1590
1646
|
return r ? g.createElement("span", { ...o, ...t }, r) : g.createElement(n || "span", {
|
|
1591
1647
|
...o,
|
|
1592
1648
|
...t,
|
|
1593
1649
|
dangerouslySetInnerHTML: { __html: l || "" }
|
|
1594
1650
|
});
|
|
1595
|
-
},
|
|
1651
|
+
}, Bt = {
|
|
1596
1652
|
type: "Span",
|
|
1597
1653
|
description: "A span component",
|
|
1598
1654
|
label: "Span",
|
|
@@ -1612,14 +1668,14 @@ const $ = (e, ...t) => ({
|
|
|
1612
1668
|
aiProps: ["content"],
|
|
1613
1669
|
i18nProps: ["content"],
|
|
1614
1670
|
canAcceptBlock: () => !0
|
|
1615
|
-
},
|
|
1671
|
+
}, It = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ a("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Pt = {
|
|
1616
1672
|
type: "Text",
|
|
1617
1673
|
description: "A text component with no styling",
|
|
1618
1674
|
label: "Text",
|
|
1619
1675
|
hidden: !0,
|
|
1620
1676
|
category: "core",
|
|
1621
1677
|
group: "typography",
|
|
1622
|
-
icon:
|
|
1678
|
+
icon: ae,
|
|
1623
1679
|
...d({
|
|
1624
1680
|
properties: {
|
|
1625
1681
|
styles: u("text-black"),
|
|
@@ -1632,7 +1688,7 @@ const $ = (e, ...t) => ({
|
|
|
1632
1688
|
}),
|
|
1633
1689
|
aiProps: ["content"],
|
|
1634
1690
|
i18nProps: ["content"]
|
|
1635
|
-
},
|
|
1691
|
+
}, _ = {
|
|
1636
1692
|
type: "object",
|
|
1637
1693
|
title: "Controls",
|
|
1638
1694
|
default: {
|
|
@@ -1663,40 +1719,40 @@ const $ = (e, ...t) => ({
|
|
|
1663
1719
|
default: !1
|
|
1664
1720
|
}
|
|
1665
1721
|
}
|
|
1666
|
-
},
|
|
1722
|
+
}, R = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, A = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/, St = (e, t) => {
|
|
1667
1723
|
const o = h(t, "autoplay", !1), l = h(t, "controls", !1), r = h(t, "loop", !1), n = o || h(t, "muted", !0);
|
|
1668
|
-
if (
|
|
1669
|
-
const i = e.match(
|
|
1724
|
+
if (R.test(e)) {
|
|
1725
|
+
const i = e.match(R);
|
|
1670
1726
|
if (i) {
|
|
1671
|
-
const
|
|
1672
|
-
let c = `https://www.youtube.com/embed/${
|
|
1673
|
-
return m += r ? `&loop=1&playlist=${
|
|
1727
|
+
const s = i[4];
|
|
1728
|
+
let c = `https://www.youtube.com/embed/${s}`, m = o ? "autoplay=1" : "";
|
|
1729
|
+
return m += r ? `&loop=1&playlist=${s}` : "", m += n ? "&mute=1&muted=1" : "", m += l ? "&controls=1" : "&controls=0", `${c}?${m}`;
|
|
1674
1730
|
}
|
|
1675
1731
|
}
|
|
1676
|
-
if (
|
|
1677
|
-
const i = e.match(
|
|
1732
|
+
if (A.test(e)) {
|
|
1733
|
+
const i = e.match(A);
|
|
1678
1734
|
if (i) {
|
|
1679
|
-
const
|
|
1735
|
+
const s = i[1];
|
|
1680
1736
|
let c = "";
|
|
1681
|
-
return c += o ? "autoplay=1" : "", c += l ? "&controls=1" : "&controls=0", c += n ? "&muted=1" : "", c += r ? "&loop=1" : "", `https://player.vimeo.com/video/${
|
|
1737
|
+
return c += o ? "autoplay=1" : "", c += l ? "&controls=1" : "&controls=0", c += n ? "&muted=1" : "", c += r ? "&loop=1" : "", `https://player.vimeo.com/video/${s}?${c}`;
|
|
1682
1738
|
}
|
|
1683
1739
|
}
|
|
1684
1740
|
return null;
|
|
1685
|
-
},
|
|
1686
|
-
const { url: t, blockProps: o, styles: l, controls: r, videoSource: n, inBuilder: i } = e,
|
|
1687
|
-
return /* @__PURE__ */
|
|
1688
|
-
!
|
|
1689
|
-
i && /* @__PURE__ */
|
|
1741
|
+
}, _t = (e) => {
|
|
1742
|
+
const { url: t, blockProps: o, styles: l, controls: r, videoSource: n, inBuilder: i } = e, s = St(t, r);
|
|
1743
|
+
return /* @__PURE__ */ b("div", { ...pe(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
1744
|
+
!s && i ? /* @__PURE__ */ a("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: v(t) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ a("iframe", { width: "100%", src: s, ...de(l, "className") }),
|
|
1745
|
+
i && /* @__PURE__ */ a("div", { ...o, className: "absolute top-0 h-full w-full" })
|
|
1690
1746
|
] });
|
|
1691
|
-
},
|
|
1747
|
+
}, Tt = (e) => {
|
|
1692
1748
|
const { url: t, styles: o, controls: l, sources: r, poster: n, blockProps: i } = e;
|
|
1693
|
-
let
|
|
1749
|
+
let s = n;
|
|
1694
1750
|
const c = [...h(r, "srcsets", []) || []];
|
|
1695
1751
|
t && typeof t == "string" && c.push({ url: t, width: "9999" });
|
|
1696
|
-
const m = c.sort((
|
|
1697
|
-
m.length === 0 && !
|
|
1752
|
+
const m = c.sort((y, x) => parseInt(y.width) - parseInt(x.width)).filter((y) => !v(y.url) && !v(y.width));
|
|
1753
|
+
m.length === 0 && !s && (s = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
|
|
1698
1754
|
const k = h(l, "autoplay", !1) || h(l, "muted", !0);
|
|
1699
|
-
return (
|
|
1755
|
+
return (s || !v(m)) && /* @__PURE__ */ a("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */ w(
|
|
1700
1756
|
"video",
|
|
1701
1757
|
{
|
|
1702
1758
|
...o,
|
|
@@ -1705,27 +1761,27 @@ const $ = (e, ...t) => ({
|
|
|
1705
1761
|
controls: h(l, "controls", !1),
|
|
1706
1762
|
autoPlay: h(l, "autoplay", !1),
|
|
1707
1763
|
loop: h(l, "loop", !1),
|
|
1708
|
-
poster:
|
|
1764
|
+
poster: s,
|
|
1709
1765
|
...k ? { muted: !0 } : {}
|
|
1710
1766
|
},
|
|
1711
|
-
m.map((
|
|
1712
|
-
if (!
|
|
1713
|
-
const
|
|
1714
|
-
return /* @__PURE__ */
|
|
1767
|
+
m.map((y) => {
|
|
1768
|
+
if (!y.url || y.url.length < 4 || isNaN(y.width)) return null;
|
|
1769
|
+
const x = `(max-width: ${y.width}px)`;
|
|
1770
|
+
return /* @__PURE__ */ a("source", { src: y.url, media: x, type: y.type }, y.url);
|
|
1715
1771
|
}),
|
|
1716
1772
|
"Your browser does not support the video tag."
|
|
1717
1773
|
) });
|
|
1718
|
-
},
|
|
1774
|
+
}, Nt = (e) => {
|
|
1719
1775
|
const { videoSource: t } = e;
|
|
1720
|
-
return t === "Custom" ? /* @__PURE__ */
|
|
1776
|
+
return t === "Custom" ? /* @__PURE__ */ a(Tt, { ...e }) : t === "Youtube" || t === "Vimeo" ? /* @__PURE__ */ a(_t, { ...e }) : /* @__PURE__ */ b("div", { children: [
|
|
1721
1777
|
"Invalid video source : ",
|
|
1722
1778
|
t
|
|
1723
1779
|
] });
|
|
1724
|
-
},
|
|
1780
|
+
}, Rt = {
|
|
1725
1781
|
type: "Video",
|
|
1726
1782
|
label: "Video",
|
|
1727
1783
|
category: "core",
|
|
1728
|
-
icon:
|
|
1784
|
+
icon: se,
|
|
1729
1785
|
group: "media",
|
|
1730
1786
|
...d({
|
|
1731
1787
|
properties: {
|
|
@@ -1760,7 +1816,7 @@ const $ = (e, ...t) => ({
|
|
|
1760
1816
|
type: "object",
|
|
1761
1817
|
default: { srcsets: [] }
|
|
1762
1818
|
},
|
|
1763
|
-
controls: { ...
|
|
1819
|
+
controls: { ..._ }
|
|
1764
1820
|
}
|
|
1765
1821
|
}
|
|
1766
1822
|
},
|
|
@@ -1776,7 +1832,8 @@ const $ = (e, ...t) => ({
|
|
|
1776
1832
|
type: "string",
|
|
1777
1833
|
title: "Youtube Video URL",
|
|
1778
1834
|
default: ""
|
|
1779
|
-
}
|
|
1835
|
+
},
|
|
1836
|
+
controls: { ..._ }
|
|
1780
1837
|
}
|
|
1781
1838
|
}
|
|
1782
1839
|
},
|
|
@@ -1792,7 +1849,8 @@ const $ = (e, ...t) => ({
|
|
|
1792
1849
|
type: "string",
|
|
1793
1850
|
title: "Vimeo Video URL",
|
|
1794
1851
|
default: ""
|
|
1795
|
-
}
|
|
1852
|
+
},
|
|
1853
|
+
controls: { ..._ }
|
|
1796
1854
|
}
|
|
1797
1855
|
}
|
|
1798
1856
|
}
|
|
@@ -1804,24 +1862,24 @@ const $ = (e, ...t) => ({
|
|
|
1804
1862
|
}
|
|
1805
1863
|
}),
|
|
1806
1864
|
i18nProps: ["url"]
|
|
1807
|
-
},
|
|
1865
|
+
}, At = (e) => {
|
|
1808
1866
|
const { children: t, tag: o, styles: l, blockProps: r, inBuilder: n, $loading: i } = e;
|
|
1809
|
-
let
|
|
1810
|
-
return
|
|
1811
|
-
/* @__PURE__ */
|
|
1812
|
-
/* @__PURE__ */
|
|
1813
|
-
] }, m)) :
|
|
1867
|
+
let s = t;
|
|
1868
|
+
return v(s) && n && (s = /* @__PURE__ */ a("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Choose a collection to display items" })), o === "none" ? i && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ b("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1869
|
+
/* @__PURE__ */ a("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1870
|
+
/* @__PURE__ */ a("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1871
|
+
] }, m)) : s : g.createElement(
|
|
1814
1872
|
o,
|
|
1815
1873
|
{ ...r, ...l },
|
|
1816
|
-
i && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */
|
|
1817
|
-
/* @__PURE__ */
|
|
1818
|
-
/* @__PURE__ */
|
|
1819
|
-
] }, m)) :
|
|
1874
|
+
i && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ b("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1875
|
+
/* @__PURE__ */ a("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1876
|
+
/* @__PURE__ */ a("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1877
|
+
] }, m)) : s
|
|
1820
1878
|
);
|
|
1821
|
-
},
|
|
1879
|
+
}, Mt = {
|
|
1822
1880
|
type: "Repeater",
|
|
1823
1881
|
label: "Repeater",
|
|
1824
|
-
icon:
|
|
1882
|
+
icon: H,
|
|
1825
1883
|
group: "basic",
|
|
1826
1884
|
dataProviderMode: "live",
|
|
1827
1885
|
dataProviderDependencies: ["filter", "sort", "limit", "repeaterItems"],
|
|
@@ -1840,7 +1898,7 @@ const $ = (e, ...t) => ({
|
|
|
1840
1898
|
],
|
|
1841
1899
|
...d({
|
|
1842
1900
|
properties: {
|
|
1843
|
-
styles:
|
|
1901
|
+
styles: T("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),
|
|
1844
1902
|
repeaterItems: {
|
|
1845
1903
|
title: "Collection",
|
|
1846
1904
|
type: "string",
|
|
@@ -1876,7 +1934,7 @@ const $ = (e, ...t) => ({
|
|
|
1876
1934
|
}
|
|
1877
1935
|
}
|
|
1878
1936
|
})
|
|
1879
|
-
},
|
|
1937
|
+
}, Et = ({
|
|
1880
1938
|
children: e,
|
|
1881
1939
|
blockProps: t,
|
|
1882
1940
|
styles: o,
|
|
@@ -1897,43 +1955,43 @@ const $ = (e, ...t) => ({
|
|
|
1897
1955
|
return !e && r ? g.createElement(
|
|
1898
1956
|
n,
|
|
1899
1957
|
{ ...t, ...o },
|
|
1900
|
-
/* @__PURE__ */
|
|
1958
|
+
/* @__PURE__ */ a("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Add children to repeater item" })
|
|
1901
1959
|
) : g.createElement(n, { ...t, ...o }, e);
|
|
1902
|
-
},
|
|
1960
|
+
}, $t = {
|
|
1903
1961
|
type: "RepeaterItem",
|
|
1904
1962
|
label: "Repeater Item",
|
|
1905
|
-
icon:
|
|
1963
|
+
icon: H,
|
|
1906
1964
|
hidden: !0,
|
|
1907
1965
|
group: "basic",
|
|
1908
1966
|
...d({
|
|
1909
1967
|
properties: {
|
|
1910
|
-
styles:
|
|
1911
|
-
parentTag:
|
|
1968
|
+
styles: T(""),
|
|
1969
|
+
parentTag: V("Repeater", "tag")
|
|
1912
1970
|
}
|
|
1913
1971
|
}),
|
|
1914
1972
|
canAcceptBlock: (e) => e !== "RepeaterItem",
|
|
1915
1973
|
canDelete: () => !1,
|
|
1916
1974
|
canMove: () => !1,
|
|
1917
1975
|
canDuplicate: () => !1
|
|
1918
|
-
},
|
|
1976
|
+
}, Ht = ({
|
|
1919
1977
|
children: e,
|
|
1920
1978
|
blockProps: t,
|
|
1921
1979
|
styles: o
|
|
1922
|
-
}) => g.createElement("div", { ...t, ...o }, e),
|
|
1980
|
+
}) => g.createElement("div", { ...t, ...o }, e), zt = {
|
|
1923
1981
|
type: "RepeaterEmptyState",
|
|
1924
1982
|
label: "Empty State",
|
|
1925
1983
|
hidden: !0,
|
|
1926
1984
|
group: "basic",
|
|
1927
1985
|
...d({
|
|
1928
|
-
properties: { styles:
|
|
1986
|
+
properties: { styles: T("p-5 flex items-center justify-center") }
|
|
1929
1987
|
}),
|
|
1930
1988
|
canAcceptBlock: () => !0,
|
|
1931
1989
|
canDelete: () => !1,
|
|
1932
1990
|
canMove: () => !1,
|
|
1933
1991
|
canDuplicate: () => !1
|
|
1934
|
-
},
|
|
1935
|
-
p(
|
|
1992
|
+
}, Gt = () => {
|
|
1993
|
+
p(fe, be), p(Se, _e), p(he, ke), p(Xe, Je), p(yt, gt), p(Lt, Bt), p(Ct, vt), p(st, ct), p(pt, dt), p(ut, mt), p(rt, nt), p(it, at), p(Nt, Rt), p(Ce, ve), p(Le, Be), p(It, Pt), p(Re, Ae), p(Me, Ee), p(He, ze), p(Te, Ne), p(je, Ue), p(qe, Fe), p(Oe, Ge), p(De, Ve), p(Qe, Ze), p(Ie, Pe), p(Ye, We), p(ft, bt), p(xt, wt), p(ht, kt), p(xe, we), p(At, Mt), p(Et, $t), p(Ht, zt);
|
|
1936
1994
|
};
|
|
1937
1995
|
export {
|
|
1938
|
-
|
|
1996
|
+
Gt as loadWebBlocks
|
|
1939
1997
|
};
|