@chaibuilder/sdk 2.3.2 → 2.3.3
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 +6 -3
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +136 -134
- 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 s, jsxs as f, Fragment as
|
|
1
|
+
import { registerChaiBlockSchema as d, StylesProp as u, registerChaiBlock as p, stylesProp as S, closestBlockProp as z } from "@chaibuilder/runtime";
|
|
2
|
+
import { jsx as s, jsxs as f, Fragment as R } from "react/jsx-runtime";
|
|
3
3
|
import { c as B, g as w } from "./common-functions-BGzDsf1z.js";
|
|
4
4
|
import * as g from "react";
|
|
5
5
|
import { createElement as x } from "react";
|
|
6
|
-
import { ButtonIcon as
|
|
7
|
-
import { isEmpty as C, get as h, map as
|
|
8
|
-
import { FileCode as
|
|
9
|
-
const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div", { className: B("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ s("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,
|
|
6
|
+
import { ButtonIcon as A, CopyIcon as D, CodeIcon as j, DividerHorizontalIcon as U, CheckboxIcon as q, InputIcon as M, LetterCaseToggleIcon as F, RadiobuttonIcon as V, DropdownMenuIcon as O, HeadingIcon as G, TableIcon as Y, BorderTopIcon as W, BorderAllIcon as X, ViewHorizontalIcon as J, DragHandleHorizontalIcon as Q, SketchLogoIcon as Z, ImageIcon as K, Link1Icon as ee, RowsIcon as te, ColumnsIcon as oe, TextIcon as le, CursorTextIcon as re, SpaceBetweenVerticallyIcon as ne, VideoIcon as ie, LoopIcon as E } from "@radix-ui/react-icons";
|
|
7
|
+
import { isEmpty as C, get as h, map as _, isNull as se, omit as ae, pick as ce } from "lodash-es";
|
|
8
|
+
import { FileCode as pe, GroupIcon as de, GlobeIcon as $, Columns as ue, Rows as me } from "lucide-react";
|
|
9
|
+
const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div", { className: B("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ s("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, ye = (e) => {
|
|
10
10
|
const { blockProps: t, inBuilder: o, backgroundImage: l, children: r, tag: n = "div", styles: i } = e;
|
|
11
11
|
let a = r;
|
|
12
12
|
r || (a = /* @__PURE__ */ s(v, { inBuilder: o }));
|
|
13
13
|
let c = {};
|
|
14
14
|
return l && (c = { backgroundImage: `url(${l})` }), g.createElement(n, { ...t, ...i, style: c }, a);
|
|
15
|
-
},
|
|
15
|
+
}, ge = {
|
|
16
16
|
type: "Box",
|
|
17
17
|
description: "Similar to a div or section elements in HTML",
|
|
18
18
|
label: "Box",
|
|
@@ -54,8 +54,8 @@ 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: a, link: c, inBuilder: m } = e, k = l, b = i || /* @__PURE__ */ f(
|
|
57
|
+
}, be = (e) => {
|
|
58
|
+
const { blockProps: t, iconSize: o, icon: l, content: r, styles: n, children: i, iconPos: a, link: c, inBuilder: m } = e, k = l, b = i || /* @__PURE__ */ f(R, { children: [
|
|
59
59
|
/* @__PURE__ */ s("span", { "data-ai-key": "content", children: r }),
|
|
60
60
|
k && /* @__PURE__ */ s(
|
|
61
61
|
"div",
|
|
@@ -76,12 +76,12 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
76
76
|
b
|
|
77
77
|
);
|
|
78
78
|
return C(h(c, "href")) ? y : m ? /* @__PURE__ */ s("span", { children: y }) : /* @__PURE__ */ s("a", { "aria-label": r, href: h(c, "href") || "/", target: h(c, "target", "_self"), children: y });
|
|
79
|
-
},
|
|
79
|
+
}, fe = {
|
|
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: A,
|
|
85
85
|
group: "basic",
|
|
86
86
|
...d({
|
|
87
87
|
properties: {
|
|
@@ -133,8 +133,8 @@ 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, a = /* @__PURE__ */ f(
|
|
136
|
+
}, he = (e) => {
|
|
137
|
+
const { blockProps: t, iconSize: o, icon: l, content: r, styles: n } = e, i = l, a = /* @__PURE__ */ f(R, { children: [
|
|
138
138
|
/* @__PURE__ */ s("span", { "data-ai-key": "content", children: r }),
|
|
139
139
|
i && /* @__PURE__ */ s("div", { style: { width: o + "px" }, dangerouslySetInnerHTML: { __html: i } })
|
|
140
140
|
] });
|
|
@@ -148,12 +148,12 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
148
148
|
},
|
|
149
149
|
a
|
|
150
150
|
);
|
|
151
|
-
},
|
|
151
|
+
}, ke = {
|
|
152
152
|
type: "CopyButton",
|
|
153
153
|
description: "A copy button component",
|
|
154
154
|
label: "Copy Button",
|
|
155
155
|
category: "core",
|
|
156
|
-
icon:
|
|
156
|
+
icon: D,
|
|
157
157
|
group: "basic",
|
|
158
158
|
...d({
|
|
159
159
|
properties: {
|
|
@@ -178,7 +178,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
178
178
|
}),
|
|
179
179
|
i18nProps: ["content"],
|
|
180
180
|
aiProps: ["content"]
|
|
181
|
-
},
|
|
181
|
+
}, xe = (e) => {
|
|
182
182
|
const { blockProps: t, styles: o, htmlCode: l, inBuilder: r } = e;
|
|
183
183
|
return r ? /* @__PURE__ */ f("div", { className: "relative", children: [
|
|
184
184
|
r ? /* @__PURE__ */ s("div", { ...t, ...o, className: "absolute z-20 h-full w-full" }) : null,
|
|
@@ -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
|
+
}, we = {
|
|
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: j,
|
|
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
|
+
}, Ce = (e) => {
|
|
213
213
|
const { scripts: t, inBuilder: o, blockProps: l } = e;
|
|
214
214
|
return o ? /* @__PURE__ */ s("div", { ...l, children: /* @__PURE__ */ s("div", { className: B("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ s("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__ */ s("div", { dangerouslySetInnerHTML: { __html: t } });
|
|
215
|
-
},
|
|
215
|
+
}, ve = {
|
|
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: pe,
|
|
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
|
+
}, Le = (e) => {
|
|
234
234
|
const { blockProps: t, styles: o } = e;
|
|
235
235
|
return x("hr", { ...o, ...t });
|
|
236
|
-
},
|
|
236
|
+
}, Be = {
|
|
237
237
|
type: "Divider",
|
|
238
238
|
description: "A horizontal line component",
|
|
239
239
|
label: "Divider",
|
|
240
240
|
category: "core",
|
|
241
|
-
icon:
|
|
241
|
+
icon: U,
|
|
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
|
+
}, Ie = (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
|
+
}, Pe = {
|
|
253
253
|
type: "EmptyBox",
|
|
254
254
|
description: "A box component with no children",
|
|
255
255
|
label: "Empty Box",
|
|
@@ -266,7 +266,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
})
|
|
269
|
-
},
|
|
269
|
+
}, Se = (e) => {
|
|
270
270
|
const { blockProps: t, fieldName: o, label: l, styles: r, inputStyles: n, required: i, checked: a, showLabel: c = !0 } = e, m = w();
|
|
271
271
|
return c ? /* @__PURE__ */ f("div", { ...r, ...t, children: [
|
|
272
272
|
/* @__PURE__ */ s(
|
|
@@ -293,11 +293,11 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
293
293
|
name: o
|
|
294
294
|
}
|
|
295
295
|
);
|
|
296
|
-
},
|
|
296
|
+
}, _e = {
|
|
297
297
|
type: "Checkbox",
|
|
298
298
|
label: "web_blocks.checkbox",
|
|
299
299
|
category: "core",
|
|
300
|
-
icon:
|
|
300
|
+
icon: q,
|
|
301
301
|
group: "form",
|
|
302
302
|
...d({
|
|
303
303
|
properties: {
|
|
@@ -332,7 +332,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
332
332
|
}),
|
|
333
333
|
aiProps: ["label"],
|
|
334
334
|
i18nProps: ["label"]
|
|
335
|
-
},
|
|
335
|
+
}, Te = (e) => {
|
|
336
336
|
const { children: t, blockProps: o, errorMessage: l, successMessage: r, action: n, styles: i, inBuilder: a } = e;
|
|
337
337
|
let c = t;
|
|
338
338
|
return t || (c = /* @__PURE__ */ s(v, { inBuilder: a })), /* @__PURE__ */ f(
|
|
@@ -357,11 +357,11 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
357
357
|
]
|
|
358
358
|
}
|
|
359
359
|
);
|
|
360
|
-
},
|
|
360
|
+
}, Ne = {
|
|
361
361
|
type: "Form",
|
|
362
362
|
label: "Form",
|
|
363
363
|
category: "core",
|
|
364
|
-
icon:
|
|
364
|
+
icon: de,
|
|
365
365
|
group: "form",
|
|
366
366
|
blocks: () => [
|
|
367
367
|
{ _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
|
|
@@ -398,7 +398,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
398
398
|
i18nProps: ["errorMessage", "successMessage"],
|
|
399
399
|
aiProps: ["errorMessage", "successMessage"],
|
|
400
400
|
canAcceptBlock: () => !0
|
|
401
|
-
},
|
|
401
|
+
}, Re = (e) => {
|
|
402
402
|
const { blockProps: t, inBuilder: o, label: l, styles: r, icon: n, iconSize: i, iconPos: a } = e, c = w();
|
|
403
403
|
return /* @__PURE__ */ f("button", { id: c, ...r, ...t || {}, type: o ? "button" : "submit", "aria-label": l, children: [
|
|
404
404
|
l,
|
|
@@ -411,11 +411,11 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
411
411
|
}
|
|
412
412
|
)
|
|
413
413
|
] });
|
|
414
|
-
},
|
|
414
|
+
}, Ae = {
|
|
415
415
|
type: "FormButton",
|
|
416
416
|
label: "Submit Button",
|
|
417
417
|
category: "core",
|
|
418
|
-
icon:
|
|
418
|
+
icon: A,
|
|
419
419
|
group: "form",
|
|
420
420
|
...d({
|
|
421
421
|
properties: {
|
|
@@ -450,7 +450,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
450
450
|
}),
|
|
451
451
|
i18nProps: ["label"],
|
|
452
452
|
aiProps: ["label"]
|
|
453
|
-
},
|
|
453
|
+
}, Me = (e) => {
|
|
454
454
|
const t = { type: "text", autocomplete: "on" };
|
|
455
455
|
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
456
|
// Special cases
|
|
@@ -516,8 +516,8 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
516
516
|
organization: { type: "text", autocomplete: "organization" },
|
|
517
517
|
language: { type: "text", autocomplete: "language" }
|
|
518
518
|
}[e] || t : t;
|
|
519
|
-
},
|
|
520
|
-
const { blockProps: t, fieldName: o, label: l, placeholder: r, styles: n, inputStyles: i, showLabel: a, required: c, inputType: m } = e, k = w(), { type: b, autocomplete: y } =
|
|
519
|
+
}, Ee = (e) => {
|
|
520
|
+
const { blockProps: t, fieldName: o, label: l, placeholder: r, styles: n, inputStyles: i, showLabel: a, required: c, inputType: m } = e, k = w(), { type: b, autocomplete: y } = Me(m);
|
|
521
521
|
return a ? /* @__PURE__ */ f("div", { ...n, ...t, children: [
|
|
522
522
|
a && /* @__PURE__ */ s("label", { htmlFor: k, children: l }),
|
|
523
523
|
/* @__PURE__ */ s(
|
|
@@ -546,11 +546,11 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
546
546
|
autoComplete: y
|
|
547
547
|
}
|
|
548
548
|
);
|
|
549
|
-
},
|
|
549
|
+
}, $e = {
|
|
550
550
|
type: "Input",
|
|
551
551
|
label: "web_blocks.input",
|
|
552
552
|
category: "core",
|
|
553
|
-
icon:
|
|
553
|
+
icon: M,
|
|
554
554
|
group: "form",
|
|
555
555
|
...d({
|
|
556
556
|
properties: {
|
|
@@ -654,17 +654,17 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
654
654
|
}),
|
|
655
655
|
aiProps: ["label", "placeholder"],
|
|
656
656
|
i18nProps: ["label", "placeholder"]
|
|
657
|
-
},
|
|
657
|
+
}, He = (e) => {
|
|
658
658
|
const { blockProps: t, content: o, styles: l, children: r } = e, n = { ...l, ...t };
|
|
659
659
|
return r ? g.createElement("label", n, r) : g.createElement("label", {
|
|
660
660
|
...n,
|
|
661
661
|
dangerouslySetInnerHTML: { __html: o }
|
|
662
662
|
});
|
|
663
|
-
},
|
|
663
|
+
}, ze = {
|
|
664
664
|
type: "Label",
|
|
665
665
|
label: "Label",
|
|
666
666
|
category: "core",
|
|
667
|
-
icon:
|
|
667
|
+
icon: F,
|
|
668
668
|
group: "form",
|
|
669
669
|
...d({
|
|
670
670
|
properties: {
|
|
@@ -678,7 +678,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
678
678
|
}),
|
|
679
679
|
aiProps: ["content"],
|
|
680
680
|
i18nProps: ["content"]
|
|
681
|
-
},
|
|
681
|
+
}, De = (e) => {
|
|
682
682
|
const { blockProps: t, fieldName: o, label: l, styles: r, inputStyles: n, required: i, checked: a, showLabel: c = !0 } = e, m = w();
|
|
683
683
|
return c ? /* @__PURE__ */ f("div", { ...r, ...t, children: [
|
|
684
684
|
/* @__PURE__ */ s("input", { ...n, name: o, id: m, type: "radio", required: i, defaultChecked: a }),
|
|
@@ -696,11 +696,11 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
696
696
|
name: o
|
|
697
697
|
}
|
|
698
698
|
);
|
|
699
|
-
},
|
|
699
|
+
}, je = {
|
|
700
700
|
type: "Radio",
|
|
701
701
|
label: "web_blocks.radio",
|
|
702
702
|
category: "core",
|
|
703
|
-
icon:
|
|
703
|
+
icon: V,
|
|
704
704
|
group: "form",
|
|
705
705
|
...d({
|
|
706
706
|
properties: {
|
|
@@ -735,23 +735,23 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
735
735
|
}),
|
|
736
736
|
aiProps: ["label"],
|
|
737
737
|
i18nProps: ["label"]
|
|
738
|
-
},
|
|
738
|
+
}, Ue = (e) => {
|
|
739
739
|
const { blockProps: t, fieldName: o, label: l, placeholder: r, styles: n, inputStyles: i, required: a, showLabel: c, _multiple: m, options: k } = e, b = w();
|
|
740
740
|
return c ? /* @__PURE__ */ f("div", { ...n, ...t, children: [
|
|
741
741
|
c && /* @__PURE__ */ s("label", { htmlFor: b, children: l }),
|
|
742
742
|
/* @__PURE__ */ f("select", { ...i, id: b, required: a, multiple: m, name: o, children: [
|
|
743
743
|
/* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
|
|
744
|
-
|
|
744
|
+
_(k, (y) => /* @__PURE__ */ s("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
|
|
745
745
|
] })
|
|
746
746
|
] }) : /* @__PURE__ */ f("select", { id: b, ...n, ...t, required: a, multiple: m, name: o, children: [
|
|
747
747
|
/* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
|
|
748
|
-
|
|
748
|
+
_(k, (y) => /* @__PURE__ */ s("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
|
|
749
749
|
] });
|
|
750
|
-
},
|
|
750
|
+
}, qe = {
|
|
751
751
|
type: "Select",
|
|
752
752
|
label: "web_blocks.select",
|
|
753
753
|
category: "core",
|
|
754
|
-
icon:
|
|
754
|
+
icon: O,
|
|
755
755
|
group: "form",
|
|
756
756
|
...d({
|
|
757
757
|
properties: {
|
|
@@ -811,7 +811,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
811
811
|
}),
|
|
812
812
|
aiProps: ["label", "placeholder"],
|
|
813
813
|
i18nProps: ["label", "placeholder"]
|
|
814
|
-
},
|
|
814
|
+
}, Fe = (e) => {
|
|
815
815
|
const { blockProps: t, fieldName: o, label: l, placeholder: r, styles: n, inputStyles: i, rows: a, showLabel: c, required: m } = e, k = w();
|
|
816
816
|
return c ? /* @__PURE__ */ f("div", { ...n, ...t, children: [
|
|
817
817
|
c && /* @__PURE__ */ s("label", { htmlFor: k, children: l }),
|
|
@@ -839,11 +839,11 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
839
839
|
required: m
|
|
840
840
|
}
|
|
841
841
|
);
|
|
842
|
-
},
|
|
842
|
+
}, Ve = {
|
|
843
843
|
type: "TextArea",
|
|
844
844
|
label: "web_blocks.textarea",
|
|
845
845
|
category: "core",
|
|
846
|
-
icon:
|
|
846
|
+
icon: M,
|
|
847
847
|
group: "form",
|
|
848
848
|
...d({
|
|
849
849
|
properties: {
|
|
@@ -884,7 +884,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
884
884
|
}),
|
|
885
885
|
aiProps: ["label", "placeholder"],
|
|
886
886
|
i18nProps: ["label", "placeholder"]
|
|
887
|
-
},
|
|
887
|
+
}, Oe = (e) => {
|
|
888
888
|
const { blockProps: t, inBuilder: o, children: l, globalBlock: r } = e;
|
|
889
889
|
return o && !r ? /* @__PURE__ */ f(
|
|
890
890
|
"div",
|
|
@@ -900,11 +900,11 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
900
900
|
]
|
|
901
901
|
}
|
|
902
902
|
) : g.createElement("span", { ...t }, l);
|
|
903
|
-
},
|
|
903
|
+
}, Ge = {
|
|
904
904
|
type: "GlobalBlock",
|
|
905
905
|
description: "A global block component",
|
|
906
906
|
label: "Global Block",
|
|
907
|
-
icon:
|
|
907
|
+
icon: $,
|
|
908
908
|
category: "core",
|
|
909
909
|
group: "basic",
|
|
910
910
|
hidden: !0,
|
|
@@ -918,19 +918,19 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
920
|
})
|
|
921
|
-
},
|
|
921
|
+
}, Ye = (e) => {
|
|
922
922
|
const { blockProps: t, styles: o, content: l, tag: r = "h1", children: n = null } = e;
|
|
923
923
|
return n ? g.createElement(r, { ...o, ...t }, n) : g.createElement(r, {
|
|
924
924
|
...o,
|
|
925
925
|
...t,
|
|
926
926
|
dangerouslySetInnerHTML: { __html: l }
|
|
927
927
|
});
|
|
928
|
-
},
|
|
928
|
+
}, We = {
|
|
929
929
|
type: "Heading",
|
|
930
930
|
description: "A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",
|
|
931
931
|
label: "Heading",
|
|
932
932
|
category: "core",
|
|
933
|
-
icon:
|
|
933
|
+
icon: G,
|
|
934
934
|
group: "typography",
|
|
935
935
|
...d({
|
|
936
936
|
properties: {
|
|
@@ -952,10 +952,10 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
952
952
|
aiProps: ["content"],
|
|
953
953
|
i18nProps: ["content"],
|
|
954
954
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
955
|
-
},
|
|
955
|
+
}, Xe = (e) => {
|
|
956
956
|
const { blockProps: t, styles: o } = e;
|
|
957
957
|
return x("br", { ...t, ...o });
|
|
958
|
-
},
|
|
958
|
+
}, Je = {
|
|
959
959
|
type: "LineBreak",
|
|
960
960
|
label: "Line Break",
|
|
961
961
|
category: "core",
|
|
@@ -970,19 +970,19 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
970
970
|
canDelete: () => !1,
|
|
971
971
|
canMove: () => !1,
|
|
972
972
|
canDuplicate: () => !1
|
|
973
|
-
},
|
|
973
|
+
}, Qe = (e) => {
|
|
974
974
|
const { blockProps: t, children: o, styles: l } = e;
|
|
975
975
|
return o ? x("table", { ...t, ...l }, o) : /* @__PURE__ */ s(v, {});
|
|
976
|
-
},
|
|
976
|
+
}, Ze = (e) => {
|
|
977
977
|
const { blockProps: t, children: o, styles: l } = e;
|
|
978
978
|
return o ? x("thead", { ...t, ...l }, o) : /* @__PURE__ */ s(v, {});
|
|
979
|
-
},
|
|
979
|
+
}, Ke = (e) => {
|
|
980
980
|
const { blockProps: t, children: o, styles: l } = e;
|
|
981
981
|
return o ? x("tbody", { ...t, ...l }, o) : /* @__PURE__ */ s(v, {});
|
|
982
|
-
},
|
|
982
|
+
}, et = (e) => {
|
|
983
983
|
const { blockProps: t, children: o, styles: l } = e;
|
|
984
984
|
return o ? x("tr", { ...t, ...l }, o) : /* @__PURE__ */ s(v, {});
|
|
985
|
-
},
|
|
985
|
+
}, tt = (e) => {
|
|
986
986
|
const { blockProps: t, children: o, content: l, styles: r } = e;
|
|
987
987
|
return !o && C(l) ? /* @__PURE__ */ s(v, {}) : o ? x("td", { ...t, ...r }, o) : x("td", {
|
|
988
988
|
...t,
|
|
@@ -990,13 +990,13 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
|
|
|
990
990
|
dangerouslySetInnerHTML: { __html: l }
|
|
991
991
|
});
|
|
992
992
|
};
|
|
993
|
-
p(
|
|
993
|
+
p(Qe, {
|
|
994
994
|
type: "Table",
|
|
995
995
|
label: "Table",
|
|
996
996
|
category: "core",
|
|
997
997
|
group: "table",
|
|
998
998
|
hidden: !0,
|
|
999
|
-
icon:
|
|
999
|
+
icon: Y,
|
|
1000
1000
|
...d({
|
|
1001
1001
|
properties: {
|
|
1002
1002
|
styles: u("")
|
|
@@ -1004,13 +1004,13 @@ p(Je, {
|
|
|
1004
1004
|
}),
|
|
1005
1005
|
blocks: L("Table")
|
|
1006
1006
|
});
|
|
1007
|
-
p(
|
|
1007
|
+
p(Ze, {
|
|
1008
1008
|
type: "TableHead",
|
|
1009
1009
|
label: "Table Head",
|
|
1010
1010
|
category: "core",
|
|
1011
1011
|
group: "table",
|
|
1012
1012
|
hidden: !0,
|
|
1013
|
-
icon:
|
|
1013
|
+
icon: W,
|
|
1014
1014
|
...d({
|
|
1015
1015
|
properties: {
|
|
1016
1016
|
styles: u("")
|
|
@@ -1018,13 +1018,13 @@ p(Qe, {
|
|
|
1018
1018
|
}),
|
|
1019
1019
|
blocks: L("TableHead")
|
|
1020
1020
|
});
|
|
1021
|
-
p(
|
|
1021
|
+
p(Ke, {
|
|
1022
1022
|
type: "TableBody",
|
|
1023
1023
|
label: "Table Body",
|
|
1024
1024
|
category: "core",
|
|
1025
1025
|
group: "table",
|
|
1026
1026
|
hidden: !0,
|
|
1027
|
-
icon:
|
|
1027
|
+
icon: X,
|
|
1028
1028
|
...d({
|
|
1029
1029
|
properties: {
|
|
1030
1030
|
styles: u("")
|
|
@@ -1032,13 +1032,13 @@ p(Ze, {
|
|
|
1032
1032
|
}),
|
|
1033
1033
|
blocks: L("TableBody")
|
|
1034
1034
|
});
|
|
1035
|
-
p(
|
|
1035
|
+
p(et, {
|
|
1036
1036
|
type: "TableRow",
|
|
1037
1037
|
label: "Table Row",
|
|
1038
1038
|
category: "core",
|
|
1039
1039
|
group: "table",
|
|
1040
1040
|
hidden: !0,
|
|
1041
|
-
icon:
|
|
1041
|
+
icon: J,
|
|
1042
1042
|
...d({
|
|
1043
1043
|
properties: {
|
|
1044
1044
|
styles: u("")
|
|
@@ -1046,13 +1046,13 @@ p(Ke, {
|
|
|
1046
1046
|
}),
|
|
1047
1047
|
blocks: L("TableRow")
|
|
1048
1048
|
});
|
|
1049
|
-
p(
|
|
1049
|
+
p(tt, {
|
|
1050
1050
|
type: "TableCell",
|
|
1051
1051
|
label: "Table Cell",
|
|
1052
1052
|
category: "core",
|
|
1053
1053
|
group: "table",
|
|
1054
1054
|
hidden: !0,
|
|
1055
|
-
icon:
|
|
1055
|
+
icon: Q,
|
|
1056
1056
|
...d({
|
|
1057
1057
|
properties: {
|
|
1058
1058
|
styles: u(""),
|
|
@@ -1111,11 +1111,11 @@ function L(e) {
|
|
|
1111
1111
|
}
|
|
1112
1112
|
return e === "TableRow" ? o() : e === "TableHead" ? l() : e === "TableBody" ? r() : [];
|
|
1113
1113
|
}
|
|
1114
|
-
const
|
|
1114
|
+
const H = (e, ...t) => ({
|
|
1115
1115
|
...e,
|
|
1116
1116
|
className: B(e.className, ...t)
|
|
1117
|
-
}),
|
|
1118
|
-
const { blockProps: t, icon: o, styles: l, width: r, inBuilder: n, height: i } = e, a =
|
|
1117
|
+
}), ot = (e) => {
|
|
1118
|
+
const { blockProps: t, icon: o, styles: l, width: r, inBuilder: n, height: i } = e, a = H(l, "");
|
|
1119
1119
|
if (C(o))
|
|
1120
1120
|
return /* @__PURE__ */ s(v, { inBuilder: n, className: "h-8 w-14" });
|
|
1121
1121
|
const c = o.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
@@ -1128,11 +1128,11 @@ const $ = (e, ...t) => ({
|
|
|
1128
1128
|
},
|
|
1129
1129
|
dangerouslySetInnerHTML: { __html: c }
|
|
1130
1130
|
});
|
|
1131
|
-
},
|
|
1131
|
+
}, lt = {
|
|
1132
1132
|
type: "Icon",
|
|
1133
1133
|
label: "web_blocks.icon",
|
|
1134
1134
|
category: "core",
|
|
1135
|
-
icon:
|
|
1135
|
+
icon: Z,
|
|
1136
1136
|
group: "media",
|
|
1137
1137
|
...d({
|
|
1138
1138
|
properties: {
|
|
@@ -1155,7 +1155,7 @@ const $ = (e, ...t) => ({
|
|
|
1155
1155
|
}
|
|
1156
1156
|
}
|
|
1157
1157
|
})
|
|
1158
|
-
},
|
|
1158
|
+
}, rt = (e) => {
|
|
1159
1159
|
const { blockProps: t, image: o, mobileImage: l, styles: r, alt: n, height: i, width: a, lazyLoading: c } = e;
|
|
1160
1160
|
return C(o) ? /* @__PURE__ */ s(v, { className: "h-36" }) : /* @__PURE__ */ f("picture", { children: [
|
|
1161
1161
|
l && /* @__PURE__ */ s("source", { srcSet: l, media: "(max-width: 480px)" }),
|
|
@@ -1172,12 +1172,12 @@ const $ = (e, ...t) => ({
|
|
|
1172
1172
|
}
|
|
1173
1173
|
)
|
|
1174
1174
|
] });
|
|
1175
|
-
},
|
|
1175
|
+
}, nt = {
|
|
1176
1176
|
type: "Image",
|
|
1177
1177
|
description: "A image component",
|
|
1178
1178
|
label: "Image",
|
|
1179
1179
|
category: "core",
|
|
1180
|
-
icon:
|
|
1180
|
+
icon: K,
|
|
1181
1181
|
group: "media",
|
|
1182
1182
|
...d({
|
|
1183
1183
|
properties: {
|
|
@@ -1227,7 +1227,7 @@ const $ = (e, ...t) => ({
|
|
|
1227
1227
|
}),
|
|
1228
1228
|
aiProps: ["alt"],
|
|
1229
1229
|
i18nProps: ["alt"]
|
|
1230
|
-
},
|
|
1230
|
+
}, it = (e) => {
|
|
1231
1231
|
const { blockProps: t, link: o, children: l, styles: r, inBuilder: n, content: i } = e;
|
|
1232
1232
|
let a = {};
|
|
1233
1233
|
return !l && C(i) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? l ? /* @__PURE__ */ s("a", { ...t, style: a, ...r, children: l }) : x(
|
|
@@ -1249,12 +1249,12 @@ const $ = (e, ...t) => ({
|
|
|
1249
1249
|
},
|
|
1250
1250
|
i
|
|
1251
1251
|
);
|
|
1252
|
-
},
|
|
1252
|
+
}, st = {
|
|
1253
1253
|
type: "Link",
|
|
1254
1254
|
description: "A link component",
|
|
1255
1255
|
label: "Link",
|
|
1256
1256
|
category: "core",
|
|
1257
|
-
icon:
|
|
1257
|
+
icon: ee,
|
|
1258
1258
|
group: "basic",
|
|
1259
1259
|
...d({
|
|
1260
1260
|
properties: {
|
|
@@ -1290,18 +1290,18 @@ const $ = (e, ...t) => ({
|
|
|
1290
1290
|
aiProps: ["content"],
|
|
1291
1291
|
i18nProps: ["content"],
|
|
1292
1292
|
canAcceptBlock: (e) => e !== "Link"
|
|
1293
|
-
},
|
|
1293
|
+
}, at = (e) => {
|
|
1294
1294
|
const { blockProps: t, children: o, listType: l, styles: r, tag: n, inBuilder: i } = e, a = B(h(r, "className", ""), l);
|
|
1295
1295
|
return !o && C(r == null ? void 0 : r.className) ? /* @__PURE__ */ s(v, { inBuilder: i }) : g.createElement(
|
|
1296
1296
|
n || (l === "list-decimal" ? "ol" : "ul"),
|
|
1297
1297
|
{ ...t, ...r, className: a },
|
|
1298
1298
|
o
|
|
1299
1299
|
);
|
|
1300
|
-
},
|
|
1300
|
+
}, ct = {
|
|
1301
1301
|
type: "List",
|
|
1302
1302
|
description: "A list component",
|
|
1303
1303
|
label: "List",
|
|
1304
|
-
icon:
|
|
1304
|
+
icon: te,
|
|
1305
1305
|
category: "core",
|
|
1306
1306
|
group: "basic",
|
|
1307
1307
|
...d({
|
|
@@ -1344,18 +1344,18 @@ const $ = (e, ...t) => ({
|
|
|
1344
1344
|
content: "Item 3"
|
|
1345
1345
|
}
|
|
1346
1346
|
]
|
|
1347
|
-
},
|
|
1347
|
+
}, pt = (e) => {
|
|
1348
1348
|
const { blockProps: t, content: o, styles: l, children: r, tag: n } = e;
|
|
1349
1349
|
return r ? g.createElement(n || "li", { ...l, ...t }, r) : g.createElement(n || "li", {
|
|
1350
1350
|
...l,
|
|
1351
1351
|
...t,
|
|
1352
1352
|
dangerouslySetInnerHTML: { __html: o }
|
|
1353
1353
|
});
|
|
1354
|
-
},
|
|
1354
|
+
}, dt = {
|
|
1355
1355
|
type: "ListItem",
|
|
1356
1356
|
description: "A list item component",
|
|
1357
1357
|
label: "List Item",
|
|
1358
|
-
icon:
|
|
1358
|
+
icon: oe,
|
|
1359
1359
|
category: "core",
|
|
1360
1360
|
group: "basic",
|
|
1361
1361
|
...d({
|
|
@@ -1375,19 +1375,19 @@ const $ = (e, ...t) => ({
|
|
|
1375
1375
|
aiProps: ["content"],
|
|
1376
1376
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
1377
1377
|
canBeNested: (e) => e === "List" || e === "Repeater"
|
|
1378
|
-
},
|
|
1378
|
+
}, ut = (e) => {
|
|
1379
1379
|
const { blockProps: t, styles: o, content: l } = e;
|
|
1380
|
-
return
|
|
1380
|
+
return se(e.children) ? g.createElement("p", {
|
|
1381
1381
|
...o,
|
|
1382
1382
|
...t,
|
|
1383
1383
|
dangerouslySetInnerHTML: { __html: l }
|
|
1384
1384
|
}) : g.createElement("p", { ...o, ...t }, e.children);
|
|
1385
|
-
},
|
|
1385
|
+
}, mt = {
|
|
1386
1386
|
type: "Paragraph",
|
|
1387
1387
|
description: "A paragraph component",
|
|
1388
1388
|
label: "Paragraph",
|
|
1389
1389
|
category: "core",
|
|
1390
|
-
icon:
|
|
1390
|
+
icon: le,
|
|
1391
1391
|
group: "typography",
|
|
1392
1392
|
...d({
|
|
1393
1393
|
properties: {
|
|
@@ -1403,7 +1403,7 @@ const $ = (e, ...t) => ({
|
|
|
1403
1403
|
i18nProps: ["content"],
|
|
1404
1404
|
aiProps: ["content"],
|
|
1405
1405
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
1406
|
-
},
|
|
1406
|
+
}, yt = (e) => {
|
|
1407
1407
|
const { blockProps: t, inBuilder: o, children: l, partialBlockId: r } = e;
|
|
1408
1408
|
return o && !r ? /* @__PURE__ */ f(
|
|
1409
1409
|
"div",
|
|
@@ -1419,11 +1419,11 @@ const $ = (e, ...t) => ({
|
|
|
1419
1419
|
]
|
|
1420
1420
|
}
|
|
1421
1421
|
) : g.createElement("span", { ...t }, l);
|
|
1422
|
-
},
|
|
1422
|
+
}, gt = {
|
|
1423
1423
|
type: "PartialBlock",
|
|
1424
1424
|
description: "A partial block component",
|
|
1425
1425
|
label: "Partial Block",
|
|
1426
|
-
icon:
|
|
1426
|
+
icon: $,
|
|
1427
1427
|
category: "core",
|
|
1428
1428
|
group: "basic",
|
|
1429
1429
|
hidden: !0,
|
|
@@ -1480,7 +1480,7 @@ const $ = (e, ...t) => ({
|
|
|
1480
1480
|
11: "lg:col-span-11",
|
|
1481
1481
|
12: "lg:col-span-12"
|
|
1482
1482
|
}
|
|
1483
|
-
},
|
|
1483
|
+
}, bt = (e) => {
|
|
1484
1484
|
const { blockProps: t, children: o, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: i } = e, c = { className: [
|
|
1485
1485
|
h(l, "className", ""),
|
|
1486
1486
|
h(I, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
|
|
@@ -1488,13 +1488,13 @@ const $ = (e, ...t) => ({
|
|
|
1488
1488
|
i ? h(I, ["LARGE", n || r], "") : ""
|
|
1489
1489
|
].join(" ") };
|
|
1490
1490
|
return /* @__PURE__ */ s("div", { ...t, ...l, ...c, children: o || /* @__PURE__ */ s("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
1491
|
-
},
|
|
1491
|
+
}, ft = {
|
|
1492
1492
|
type: "Column",
|
|
1493
1493
|
description: "A column component",
|
|
1494
1494
|
label: "Column",
|
|
1495
1495
|
group: "basic",
|
|
1496
1496
|
category: "core",
|
|
1497
|
-
icon:
|
|
1497
|
+
icon: ue,
|
|
1498
1498
|
wrapper: !0,
|
|
1499
1499
|
canDelete: () => !0,
|
|
1500
1500
|
canAcceptBlock: () => !0,
|
|
@@ -1524,15 +1524,15 @@ const $ = (e, ...t) => ({
|
|
|
1524
1524
|
}
|
|
1525
1525
|
}
|
|
1526
1526
|
})
|
|
1527
|
-
},
|
|
1527
|
+
}, ht = (e) => {
|
|
1528
1528
|
const { blockProps: t, children: o, styles: l, gutter: r } = e, i = { className: [h(l, "className", ""), " grid grid-cols-12"].join() };
|
|
1529
1529
|
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` : i.style = { gap: `${r}px` }, /* @__PURE__ */ s("div", { ...t, ...l, ...i, children: o });
|
|
1530
|
-
},
|
|
1530
|
+
}, kt = {
|
|
1531
1531
|
type: "Row",
|
|
1532
1532
|
description: "A row component",
|
|
1533
1533
|
label: "Row",
|
|
1534
1534
|
group: "basic",
|
|
1535
|
-
icon:
|
|
1535
|
+
icon: me,
|
|
1536
1536
|
blocks: () => [
|
|
1537
1537
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1538
1538
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
@@ -1558,19 +1558,19 @@ const $ = (e, ...t) => ({
|
|
|
1558
1558
|
}
|
|
1559
1559
|
}
|
|
1560
1560
|
})
|
|
1561
|
-
},
|
|
1562
|
-
const { blockProps: t, content: o, styles: l } = e, r =
|
|
1561
|
+
}, xt = (e) => {
|
|
1562
|
+
const { blockProps: t, content: o, styles: l } = e, r = H(
|
|
1563
1563
|
l,
|
|
1564
1564
|
"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
1565
|
"max-w-full"
|
|
1566
1566
|
);
|
|
1567
1567
|
return /* @__PURE__ */ s("div", { ...t, ...r, dangerouslySetInnerHTML: { __html: o } });
|
|
1568
|
-
},
|
|
1568
|
+
}, wt = {
|
|
1569
1569
|
type: "RichText",
|
|
1570
1570
|
description: "A rich text block",
|
|
1571
1571
|
label: "Rich Text",
|
|
1572
1572
|
category: "core",
|
|
1573
|
-
icon:
|
|
1573
|
+
icon: re,
|
|
1574
1574
|
group: "typography",
|
|
1575
1575
|
...d({
|
|
1576
1576
|
properties: {
|
|
@@ -1585,14 +1585,14 @@ const $ = (e, ...t) => ({
|
|
|
1585
1585
|
}),
|
|
1586
1586
|
aiProps: ["content"],
|
|
1587
1587
|
i18nProps: ["content"]
|
|
1588
|
-
},
|
|
1588
|
+
}, Ct = (e) => {
|
|
1589
1589
|
const { blockProps: t, styles: o, content: l, children: r = null, tag: n } = e;
|
|
1590
1590
|
return r ? g.createElement("span", { ...o, ...t }, r) : g.createElement(n || "span", {
|
|
1591
1591
|
...o,
|
|
1592
1592
|
...t,
|
|
1593
1593
|
dangerouslySetInnerHTML: { __html: l || "" }
|
|
1594
1594
|
});
|
|
1595
|
-
},
|
|
1595
|
+
}, vt = {
|
|
1596
1596
|
type: "Span",
|
|
1597
1597
|
description: "A span component",
|
|
1598
1598
|
label: "Span",
|
|
@@ -1612,14 +1612,14 @@ const $ = (e, ...t) => ({
|
|
|
1612
1612
|
aiProps: ["content"],
|
|
1613
1613
|
i18nProps: ["content"],
|
|
1614
1614
|
canAcceptBlock: () => !0
|
|
1615
|
-
},
|
|
1615
|
+
}, Lt = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Bt = {
|
|
1616
1616
|
type: "Text",
|
|
1617
1617
|
description: "A text component with no styling",
|
|
1618
1618
|
label: "Text",
|
|
1619
1619
|
hidden: !0,
|
|
1620
1620
|
category: "core",
|
|
1621
1621
|
group: "typography",
|
|
1622
|
-
icon:
|
|
1622
|
+
icon: ne,
|
|
1623
1623
|
...d({
|
|
1624
1624
|
properties: {
|
|
1625
1625
|
styles: u("text-black"),
|
|
@@ -1632,7 +1632,7 @@ const $ = (e, ...t) => ({
|
|
|
1632
1632
|
}),
|
|
1633
1633
|
aiProps: ["content"],
|
|
1634
1634
|
i18nProps: ["content"]
|
|
1635
|
-
},
|
|
1635
|
+
}, P = {
|
|
1636
1636
|
type: "object",
|
|
1637
1637
|
title: "Controls",
|
|
1638
1638
|
default: {
|
|
@@ -1663,18 +1663,18 @@ const $ = (e, ...t) => ({
|
|
|
1663
1663
|
default: !1
|
|
1664
1664
|
}
|
|
1665
1665
|
}
|
|
1666
|
-
},
|
|
1666
|
+
}, T = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, N = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/, It = (e, t) => {
|
|
1667
1667
|
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(
|
|
1668
|
+
if (T.test(e)) {
|
|
1669
|
+
const i = e.match(T);
|
|
1670
1670
|
if (i) {
|
|
1671
1671
|
const a = i[4];
|
|
1672
1672
|
let c = `https://www.youtube.com/embed/${a}`, m = o ? "autoplay=1" : "";
|
|
1673
1673
|
return m += r ? `&loop=1&playlist=${a}` : "", m += n ? "&mute=1&muted=1" : "", m += l ? "&controls=1" : "&controls=0", `${c}?${m}`;
|
|
1674
1674
|
}
|
|
1675
1675
|
}
|
|
1676
|
-
if (
|
|
1677
|
-
const i = e.match(
|
|
1676
|
+
if (N.test(e)) {
|
|
1677
|
+
const i = e.match(N);
|
|
1678
1678
|
if (i) {
|
|
1679
1679
|
const a = i[1];
|
|
1680
1680
|
let c = "";
|
|
@@ -1684,8 +1684,8 @@ const $ = (e, ...t) => ({
|
|
|
1684
1684
|
return null;
|
|
1685
1685
|
}, Pt = (e) => {
|
|
1686
1686
|
const { url: t, blockProps: o, styles: l, controls: r, videoSource: n, inBuilder: i } = e, a = It(t, r);
|
|
1687
|
-
return /* @__PURE__ */ f("div", { ...
|
|
1688
|
-
!a && i ? /* @__PURE__ */ s("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: C(t) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ s("iframe", { width: "100%", src: a, ...
|
|
1687
|
+
return /* @__PURE__ */ f("div", { ...ae(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
1688
|
+
!a && i ? /* @__PURE__ */ s("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: C(t) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ s("iframe", { width: "100%", src: a, ...ce(l, "className") }),
|
|
1689
1689
|
i && /* @__PURE__ */ s("div", { ...o, className: "absolute top-0 h-full w-full" })
|
|
1690
1690
|
] });
|
|
1691
1691
|
}, St = (e) => {
|
|
@@ -1725,7 +1725,7 @@ const $ = (e, ...t) => ({
|
|
|
1725
1725
|
type: "Video",
|
|
1726
1726
|
label: "Video",
|
|
1727
1727
|
category: "core",
|
|
1728
|
-
icon:
|
|
1728
|
+
icon: ie,
|
|
1729
1729
|
group: "media",
|
|
1730
1730
|
...d({
|
|
1731
1731
|
properties: {
|
|
@@ -1760,7 +1760,7 @@ const $ = (e, ...t) => ({
|
|
|
1760
1760
|
type: "object",
|
|
1761
1761
|
default: { srcsets: [] }
|
|
1762
1762
|
},
|
|
1763
|
-
controls: { ...
|
|
1763
|
+
controls: { ...P }
|
|
1764
1764
|
}
|
|
1765
1765
|
}
|
|
1766
1766
|
},
|
|
@@ -1776,7 +1776,8 @@ const $ = (e, ...t) => ({
|
|
|
1776
1776
|
type: "string",
|
|
1777
1777
|
title: "Youtube Video URL",
|
|
1778
1778
|
default: ""
|
|
1779
|
-
}
|
|
1779
|
+
},
|
|
1780
|
+
controls: { ...P }
|
|
1780
1781
|
}
|
|
1781
1782
|
}
|
|
1782
1783
|
},
|
|
@@ -1792,7 +1793,8 @@ const $ = (e, ...t) => ({
|
|
|
1792
1793
|
type: "string",
|
|
1793
1794
|
title: "Vimeo Video URL",
|
|
1794
1795
|
default: ""
|
|
1795
|
-
}
|
|
1796
|
+
},
|
|
1797
|
+
controls: { ...P }
|
|
1796
1798
|
}
|
|
1797
1799
|
}
|
|
1798
1800
|
}
|
|
@@ -1821,7 +1823,7 @@ const $ = (e, ...t) => ({
|
|
|
1821
1823
|
}, Rt = {
|
|
1822
1824
|
type: "Repeater",
|
|
1823
1825
|
label: "Repeater",
|
|
1824
|
-
icon:
|
|
1826
|
+
icon: E,
|
|
1825
1827
|
group: "basic",
|
|
1826
1828
|
dataProviderMode: "live",
|
|
1827
1829
|
dataProviderDependencies: ["filter", "sort", "limit", "repeaterItems"],
|
|
@@ -1840,7 +1842,7 @@ const $ = (e, ...t) => ({
|
|
|
1840
1842
|
],
|
|
1841
1843
|
...d({
|
|
1842
1844
|
properties: {
|
|
1843
|
-
styles:
|
|
1845
|
+
styles: S("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),
|
|
1844
1846
|
repeaterItems: {
|
|
1845
1847
|
title: "Collection",
|
|
1846
1848
|
type: "string",
|
|
@@ -1902,13 +1904,13 @@ const $ = (e, ...t) => ({
|
|
|
1902
1904
|
}, Mt = {
|
|
1903
1905
|
type: "RepeaterItem",
|
|
1904
1906
|
label: "Repeater Item",
|
|
1905
|
-
icon:
|
|
1907
|
+
icon: E,
|
|
1906
1908
|
hidden: !0,
|
|
1907
1909
|
group: "basic",
|
|
1908
1910
|
...d({
|
|
1909
1911
|
properties: {
|
|
1910
|
-
styles:
|
|
1911
|
-
parentTag:
|
|
1912
|
+
styles: S(""),
|
|
1913
|
+
parentTag: z("Repeater", "tag")
|
|
1912
1914
|
}
|
|
1913
1915
|
}),
|
|
1914
1916
|
canAcceptBlock: (e) => e !== "RepeaterItem",
|
|
@@ -1925,14 +1927,14 @@ const $ = (e, ...t) => ({
|
|
|
1925
1927
|
hidden: !0,
|
|
1926
1928
|
group: "basic",
|
|
1927
1929
|
...d({
|
|
1928
|
-
properties: { styles:
|
|
1930
|
+
properties: { styles: S("p-5 flex items-center justify-center") }
|
|
1929
1931
|
}),
|
|
1930
1932
|
canAcceptBlock: () => !0,
|
|
1931
1933
|
canDelete: () => !1,
|
|
1932
1934
|
canMove: () => !1,
|
|
1933
1935
|
canDuplicate: () => !1
|
|
1934
1936
|
}, Vt = () => {
|
|
1935
|
-
p(
|
|
1937
|
+
p(ye, ge), p(Ie, Pe), p(be, fe), p(Ye, We), p(ut, mt), p(Ct, vt), p(xt, wt), p(it, st), p(at, ct), p(pt, dt), p(ot, lt), p(rt, nt), p(_t, Tt), p(xe, we), p(Ce, ve), p(Lt, Bt), p(Te, Ne), p(Re, Ae), p(Ee, $e), p(Se, _e), p(De, je), p(Ue, qe), p(Fe, Ve), p(He, ze), p(Xe, Je), p(Le, Be), p(Oe, Ge), p(yt, gt), p(ht, kt), p(bt, ft), p(he, ke), p(Nt, Rt), p(At, Mt), p(Et, $t);
|
|
1936
1938
|
};
|
|
1937
1939
|
export {
|
|
1938
1940
|
Vt as loadWebBlocks
|