@chaibuilder/sdk 2.0.0-beta.110 → 2.0.0-beta.113
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/{CodeEditor-Bv7cAp6l.js → CodeEditor-C-jeR5bt.js} +1 -1
- package/dist/{CodeEditor-ol63c03C.cjs → CodeEditor-SZJ1H4vl.cjs} +1 -1
- package/dist/{Topbar-lIu26u9Y.cjs → Topbar-DSfx67NF.cjs} +1 -1
- package/dist/{Topbar-DutZ_viX.js → Topbar-DZ2jHLv7.js} +1 -1
- package/dist/core.cjs +5 -5
- package/dist/core.js +748 -698
- package/dist/render.cjs +2 -2
- package/dist/render.js +103 -102
- package/dist/tooltip-1Uu2avkZ.cjs +1 -0
- package/dist/{tooltip-CuxBhGWF.js → tooltip-PKiP886L.js} +250 -366
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +293 -192
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +159 -138
- package/package.json +3 -3
- package/dist/tooltip-DHlrjqh8.cjs +0 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { registerChaiBlockSchema as m, StylesProp as u, registerChaiBlock as d } from "@chaibuilder/runtime";
|
|
2
2
|
import { jsx as i, jsxs as b, Fragment as A } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
3
|
+
import * as f from "react";
|
|
4
4
|
import { createElement as L } from "react";
|
|
5
|
-
import { c as
|
|
6
|
-
import { ButtonIcon as $, CodeIcon as z, HeadingIcon as
|
|
7
|
-
import { isEmpty as w, get as
|
|
5
|
+
import { c as I, G as H, g as C } from "./iconBase-DHfFLkem.js";
|
|
6
|
+
import { ButtonIcon as $, CodeIcon as z, HeadingIcon as q, TextIcon as j, CursorTextIcon as F, DividerHorizontalIcon as D, SketchLogoIcon as G, ImageIcon as E, Link1Icon as U, RowsIcon as V, ColumnsIcon as O, SpaceBetweenVerticallyIcon as W, VideoIcon as X, CheckboxIcon as Y, InputIcon as T, LetterCaseToggleIcon as Z, RadiobuttonIcon as J, DropdownMenuIcon as K } from "@radix-ui/react-icons";
|
|
7
|
+
import { isEmpty as w, get as k, isNull as Q, pick as ee, omit as te, map as _ } from "lodash-es";
|
|
8
8
|
import { GlobeIcon as R, GroupIcon as le, Columns as oe, Rows as re } from "lucide-react";
|
|
9
|
-
const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div", { className:
|
|
10
|
-
const { blockProps: t, inBuilder: l, backgroundImage: r, children: o, tag: n = "div", styles:
|
|
11
|
-
let
|
|
12
|
-
o || (
|
|
9
|
+
const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div", { className: I("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ i("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, ne = (e) => {
|
|
10
|
+
const { blockProps: t, inBuilder: l, backgroundImage: r, children: o, tag: n = "div", styles: a } = e;
|
|
11
|
+
let s = o;
|
|
12
|
+
o || (s = /* @__PURE__ */ i(v, { inBuilder: l }));
|
|
13
13
|
let c = {};
|
|
14
|
-
return r && (c = { backgroundImage: `url(${r})` }),
|
|
14
|
+
return r && (c = { backgroundImage: `url(${r})` }), f.createElement(n, { ...t, ...a, style: c }, s);
|
|
15
15
|
}, ie = {
|
|
16
16
|
type: "Box",
|
|
17
17
|
label: "Box",
|
|
@@ -53,15 +53,15 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
53
53
|
}
|
|
54
54
|
}),
|
|
55
55
|
canAcceptBlock: () => !0
|
|
56
|
-
},
|
|
57
|
-
const { blockProps: t, iconSize: l, icon: r, content: o, styles: n, children:
|
|
56
|
+
}, ae = (e) => {
|
|
57
|
+
const { blockProps: t, iconSize: l, icon: r, content: o, styles: n, children: a, iconPos: s, link: c, inBuilder: y } = e, g = r, h = a || /* @__PURE__ */ b(A, { children: [
|
|
58
58
|
/* @__PURE__ */ i("span", { "data-ai-key": "content", children: o }),
|
|
59
|
-
|
|
59
|
+
g && /* @__PURE__ */ i(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
62
|
style: { width: l + "px" },
|
|
63
|
-
className:
|
|
64
|
-
dangerouslySetInnerHTML: { __html:
|
|
63
|
+
className: s + " " + (s === "order-first" ? "mr-2" : "ml-2") || "",
|
|
64
|
+
dangerouslySetInnerHTML: { __html: g }
|
|
65
65
|
}
|
|
66
66
|
)
|
|
67
67
|
] }), p = L(
|
|
@@ -72,10 +72,10 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
72
72
|
type: "button",
|
|
73
73
|
"aria-label": o
|
|
74
74
|
},
|
|
75
|
-
|
|
75
|
+
h
|
|
76
76
|
);
|
|
77
|
-
return w(
|
|
78
|
-
},
|
|
77
|
+
return w(k(c, "href")) ? p : y ? /* @__PURE__ */ i("span", { children: p }) : /* @__PURE__ */ i("a", { "aria-label": o, href: k(c, "href") || "/", target: k(c, "target", "_self"), children: p });
|
|
78
|
+
}, se = {
|
|
79
79
|
type: "Button",
|
|
80
80
|
label: "Button",
|
|
81
81
|
category: "core",
|
|
@@ -130,11 +130,11 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
130
130
|
const { blockProps: t, styles: l, htmlCode: r, inBuilder: o } = e;
|
|
131
131
|
return o ? /* @__PURE__ */ b("div", { className: "relative", children: [
|
|
132
132
|
o ? /* @__PURE__ */ i("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
|
|
133
|
-
|
|
133
|
+
f.createElement("div", {
|
|
134
134
|
...l,
|
|
135
135
|
dangerouslySetInnerHTML: { __html: r.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
136
136
|
})
|
|
137
|
-
] }) :
|
|
137
|
+
] }) : f.createElement("div", {
|
|
138
138
|
...t,
|
|
139
139
|
...l,
|
|
140
140
|
dangerouslySetInnerHTML: { __html: r }
|
|
@@ -158,7 +158,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
158
158
|
}, ue = (e) => {
|
|
159
159
|
const { blockProps: t, styles: l, backgroundImage: r } = e;
|
|
160
160
|
let o = {};
|
|
161
|
-
return r && (o = { backgroundImage: `url(${r})` }),
|
|
161
|
+
return r && (o = { backgroundImage: `url(${r})` }), f.createElement("div", { ...t, ...l, style: o });
|
|
162
162
|
}, de = {
|
|
163
163
|
type: "EmptyBox",
|
|
164
164
|
label: "Empty Box",
|
|
@@ -177,7 +177,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
177
177
|
})
|
|
178
178
|
}, me = (e) => {
|
|
179
179
|
const { blockProps: t, styles: l, content: r, tag: o = "h1", children: n = null } = e;
|
|
180
|
-
return n ?
|
|
180
|
+
return n ? f.createElement(o, { ...l, ...t }, n) : f.createElement(o, {
|
|
181
181
|
...l,
|
|
182
182
|
...t,
|
|
183
183
|
dangerouslySetInnerHTML: { __html: r }
|
|
@@ -186,7 +186,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
186
186
|
type: "Heading",
|
|
187
187
|
label: "web_blocks.heading",
|
|
188
188
|
category: "core",
|
|
189
|
-
icon:
|
|
189
|
+
icon: q,
|
|
190
190
|
group: "typography",
|
|
191
191
|
...m({
|
|
192
192
|
properties: {
|
|
@@ -210,16 +210,16 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
210
210
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
211
211
|
}, ge = (e) => {
|
|
212
212
|
const { blockProps: t, styles: l, content: r } = e;
|
|
213
|
-
return Q(e.children) ?
|
|
213
|
+
return Q(e.children) ? f.createElement("p", {
|
|
214
214
|
...l,
|
|
215
215
|
...t,
|
|
216
216
|
dangerouslySetInnerHTML: { __html: r }
|
|
217
|
-
}) :
|
|
217
|
+
}) : f.createElement("p", { ...l, ...t }, e.children);
|
|
218
218
|
}, fe = {
|
|
219
219
|
type: "Paragraph",
|
|
220
220
|
label: "Paragraph",
|
|
221
221
|
category: "core",
|
|
222
|
-
icon:
|
|
222
|
+
icon: j,
|
|
223
223
|
group: "typography",
|
|
224
224
|
...m({
|
|
225
225
|
properties: {
|
|
@@ -239,7 +239,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
239
239
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
240
240
|
}, P = (e, ...t) => ({
|
|
241
241
|
...e,
|
|
242
|
-
className:
|
|
242
|
+
className: I(e.className, ...t)
|
|
243
243
|
}), be = (e) => {
|
|
244
244
|
const { blockProps: t, content: l, styles: r } = e, o = P(
|
|
245
245
|
r,
|
|
@@ -251,7 +251,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
251
251
|
type: "RichText",
|
|
252
252
|
label: "Rich Text",
|
|
253
253
|
category: "core",
|
|
254
|
-
icon:
|
|
254
|
+
icon: F,
|
|
255
255
|
group: "typography",
|
|
256
256
|
...m({
|
|
257
257
|
properties: {
|
|
@@ -268,7 +268,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
268
268
|
i18nProps: ["content"]
|
|
269
269
|
}, ke = (e) => {
|
|
270
270
|
const { blockProps: t, styles: l, content: r, children: o = null, tag: n } = e;
|
|
271
|
-
return o ?
|
|
271
|
+
return o ? f.createElement("span", { ...l, ...t }, o) : f.createElement(n || "span", {
|
|
272
272
|
...l,
|
|
273
273
|
...t,
|
|
274
274
|
dangerouslySetInnerHTML: { __html: r || "" }
|
|
@@ -298,7 +298,7 @@ function xe(e) {
|
|
|
298
298
|
}
|
|
299
299
|
const Le = (e) => {
|
|
300
300
|
const { scripts: t, inBuilder: l, blockProps: r } = e;
|
|
301
|
-
return l ? /* @__PURE__ */ i("div", { ...r, children: /* @__PURE__ */ i("div", { className:
|
|
301
|
+
return l ? /* @__PURE__ */ i("div", { ...r, children: /* @__PURE__ */ i("div", { className: I("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ i("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: t } });
|
|
302
302
|
}, ve = {
|
|
303
303
|
type: "CustomScript",
|
|
304
304
|
label: "web_blocks.custom_script",
|
|
@@ -316,14 +316,14 @@ const Le = (e) => {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
})
|
|
319
|
-
},
|
|
319
|
+
}, Ce = (e) => {
|
|
320
320
|
const { blockProps: t, styles: l } = e;
|
|
321
321
|
return L("hr", { ...l, ...t });
|
|
322
|
-
},
|
|
322
|
+
}, Ie = {
|
|
323
323
|
type: "Divider",
|
|
324
324
|
label: "web_blocks.divider",
|
|
325
325
|
category: "core",
|
|
326
|
-
icon:
|
|
326
|
+
icon: D,
|
|
327
327
|
group: "basic",
|
|
328
328
|
...m({
|
|
329
329
|
properties: {
|
|
@@ -345,7 +345,7 @@ const Le = (e) => {
|
|
|
345
345
|
/* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
346
346
|
]
|
|
347
347
|
}
|
|
348
|
-
) :
|
|
348
|
+
) : f.createElement("span", { ...t }, r);
|
|
349
349
|
}, Pe = {
|
|
350
350
|
type: "GlobalBlock",
|
|
351
351
|
label: "Global Block",
|
|
@@ -364,16 +364,16 @@ const Le = (e) => {
|
|
|
364
364
|
}
|
|
365
365
|
})
|
|
366
366
|
}, _e = (e) => {
|
|
367
|
-
const { blockProps: t, icon: l, styles: r, width: o, inBuilder: n, height:
|
|
367
|
+
const { blockProps: t, icon: l, styles: r, width: o, inBuilder: n, height: a } = e, s = P(r, "");
|
|
368
368
|
if (w(l))
|
|
369
369
|
return /* @__PURE__ */ i(v, { inBuilder: n, className: "h-8 w-14" });
|
|
370
370
|
const c = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
371
|
-
return
|
|
371
|
+
return f.createElement("span", {
|
|
372
372
|
...t,
|
|
373
|
-
...
|
|
373
|
+
...s,
|
|
374
374
|
style: {
|
|
375
375
|
width: o ? `${o}px` : "auto",
|
|
376
|
-
height:
|
|
376
|
+
height: a ? `${a}px` : "auto"
|
|
377
377
|
},
|
|
378
378
|
dangerouslySetInnerHTML: { __html: c }
|
|
379
379
|
});
|
|
@@ -405,7 +405,7 @@ const Le = (e) => {
|
|
|
405
405
|
}
|
|
406
406
|
})
|
|
407
407
|
}, Ne = (e) => {
|
|
408
|
-
const { blockProps: t, image: l, mobileImage: r, styles: o, alt: n, height:
|
|
408
|
+
const { blockProps: t, image: l, mobileImage: r, styles: o, alt: n, height: a, width: s, lazyLoading: c } = e;
|
|
409
409
|
return w(l) ? /* @__PURE__ */ i(v, { className: "h-36" }) : /* @__PURE__ */ b("picture", { children: [
|
|
410
410
|
r && /* @__PURE__ */ i("source", { srcSet: r, media: "(max-width: 480px)" }),
|
|
411
411
|
/* @__PURE__ */ i(
|
|
@@ -416,8 +416,8 @@ const Le = (e) => {
|
|
|
416
416
|
src: l,
|
|
417
417
|
alt: n,
|
|
418
418
|
loading: c ? "lazy" : "eager",
|
|
419
|
-
width:
|
|
420
|
-
height:
|
|
419
|
+
width: s,
|
|
420
|
+
height: a
|
|
421
421
|
}
|
|
422
422
|
)
|
|
423
423
|
] });
|
|
@@ -470,7 +470,7 @@ const Le = (e) => {
|
|
|
470
470
|
aiProps: ["alt"],
|
|
471
471
|
i18nProps: ["alt"]
|
|
472
472
|
}, $e = (e) => {
|
|
473
|
-
const { blockProps: t, children: l, styles: r, inBuilder: o, content: n, href:
|
|
473
|
+
const { blockProps: t, children: l, styles: r, inBuilder: o, content: n, href: a } = e, { hrefType: s, autoplay: c, maxWidth: y, backdropColor: g, galleryName: h } = e, p = P(r, "cb-lightbox vbox-item");
|
|
474
474
|
if (!l && w(r == null ? void 0 : r.className) && w(n))
|
|
475
475
|
return /* @__PURE__ */ i(v, { inBuilder: o });
|
|
476
476
|
if (o)
|
|
@@ -480,11 +480,11 @@ const Le = (e) => {
|
|
|
480
480
|
dangerouslySetInnerHTML: { __html: n }
|
|
481
481
|
});
|
|
482
482
|
const x = {};
|
|
483
|
-
return
|
|
483
|
+
return s !== "image" && (x["data-vbtype"] = s), c && (x["data-autoplay"] = "true"), y && (x["data-maxwidth"] = y + "px"), g && (x["data-overlay"] = g), h && (x["data-gall"] = h), l ? /* @__PURE__ */ i("a", { "aria-label": n, ...x, href: a || "#/", ...t, ...p, children: l }) : L("a", {
|
|
484
484
|
...t,
|
|
485
485
|
...p,
|
|
486
486
|
...x,
|
|
487
|
-
href:
|
|
487
|
+
href: a || "#",
|
|
488
488
|
dangerouslySetInnerHTML: { __html: n },
|
|
489
489
|
"aria-label": n
|
|
490
490
|
});
|
|
@@ -543,26 +543,26 @@ const Le = (e) => {
|
|
|
543
543
|
aiProps: ["content"],
|
|
544
544
|
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
545
545
|
}, Te = (e) => {
|
|
546
|
-
const { blockProps: t, link: l, children: r, styles: o, inBuilder: n, content:
|
|
547
|
-
let
|
|
548
|
-
return !r && w(
|
|
546
|
+
const { blockProps: t, link: l, children: r, styles: o, inBuilder: n, content: a } = e;
|
|
547
|
+
let s = {};
|
|
548
|
+
return !r && w(a) && (s = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? r ? /* @__PURE__ */ i("span", { ...t, style: s, ...o, children: r }) : L(
|
|
549
549
|
"span",
|
|
550
550
|
{
|
|
551
551
|
...t,
|
|
552
552
|
...o,
|
|
553
|
-
style:
|
|
553
|
+
style: s
|
|
554
554
|
},
|
|
555
|
-
|
|
556
|
-
) : r ? /* @__PURE__ */ i("a", { "aria-label":
|
|
555
|
+
a
|
|
556
|
+
) : r ? /* @__PURE__ */ i("a", { "aria-label": a, href: (l == null ? void 0 : l.href) || "#/", target: l == null ? void 0 : l.target, ...t, ...o, children: r }) : L(
|
|
557
557
|
"a",
|
|
558
558
|
{
|
|
559
559
|
...t,
|
|
560
560
|
...o,
|
|
561
561
|
href: (l == null ? void 0 : l.href) || "#",
|
|
562
562
|
target: (l == null ? void 0 : l.target) || "_self",
|
|
563
|
-
"aria-label":
|
|
563
|
+
"aria-label": a
|
|
564
564
|
},
|
|
565
|
-
|
|
565
|
+
a
|
|
566
566
|
);
|
|
567
567
|
}, Re = {
|
|
568
568
|
type: "Link",
|
|
@@ -600,10 +600,10 @@ const Le = (e) => {
|
|
|
600
600
|
i18nProps: ["content"],
|
|
601
601
|
canAcceptBlock: (e) => e !== "Link"
|
|
602
602
|
}, Ae = (e) => {
|
|
603
|
-
const { blockProps: t, children: l, listType: r, styles: o, tag: n, inBuilder:
|
|
604
|
-
return !l && w(o == null ? void 0 : o.className) ? /* @__PURE__ */ i(v, { inBuilder:
|
|
603
|
+
const { blockProps: t, children: l, listType: r, styles: o, tag: n, inBuilder: a } = e, s = I(k(o, "className", ""), r);
|
|
604
|
+
return !l && w(o == null ? void 0 : o.className) ? /* @__PURE__ */ i(v, { inBuilder: a }) : f.createElement(
|
|
605
605
|
n || (r === "list-decimal" ? "ol" : "ul"),
|
|
606
|
-
{ ...t, ...o, className:
|
|
606
|
+
{ ...t, ...o, className: s },
|
|
607
607
|
l
|
|
608
608
|
);
|
|
609
609
|
}, He = {
|
|
@@ -654,12 +654,12 @@ const Le = (e) => {
|
|
|
654
654
|
]
|
|
655
655
|
}, ze = (e) => {
|
|
656
656
|
const { blockProps: t, content: l, styles: r, children: o, tag: n } = e;
|
|
657
|
-
return o ?
|
|
657
|
+
return o ? f.createElement(n || "li", { ...r, ...t }, o) : f.createElement(n || "li", {
|
|
658
658
|
...r,
|
|
659
659
|
...t,
|
|
660
660
|
dangerouslySetInnerHTML: { __html: l }
|
|
661
661
|
});
|
|
662
|
-
},
|
|
662
|
+
}, qe = {
|
|
663
663
|
type: "ListItem",
|
|
664
664
|
label: "List Item",
|
|
665
665
|
icon: O,
|
|
@@ -682,7 +682,7 @@ const Le = (e) => {
|
|
|
682
682
|
aiProps: ["content"],
|
|
683
683
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
684
684
|
canBeNested: (e) => e === "List"
|
|
685
|
-
},
|
|
685
|
+
}, je = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ i("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Fe = {
|
|
686
686
|
type: "Text",
|
|
687
687
|
label: "Text",
|
|
688
688
|
hidden: !0,
|
|
@@ -701,7 +701,7 @@ const Le = (e) => {
|
|
|
701
701
|
}),
|
|
702
702
|
aiProps: ["content"],
|
|
703
703
|
i18nProps: ["content"]
|
|
704
|
-
}, S = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, N = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, M = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/,
|
|
704
|
+
}, S = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, N = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, M = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, De = (e) => {
|
|
705
705
|
if (S.test(e)) {
|
|
706
706
|
const t = e.match(S);
|
|
707
707
|
return t ? `https://www.youtube.com/embed/${t[4]}` : e;
|
|
@@ -715,36 +715,36 @@ const Le = (e) => {
|
|
|
715
715
|
return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
|
|
716
716
|
}
|
|
717
717
|
return null;
|
|
718
|
-
}, Ge =
|
|
719
|
-
const { blockProps: t, inBuilder: l, styles: r, url: o, controls: n } = e,
|
|
718
|
+
}, Ge = f.memo((e) => {
|
|
719
|
+
const { blockProps: t, inBuilder: l, styles: r, url: o, controls: n } = e, a = k(n, "autoPlay", !1), s = k(n, "controls", !1), c = a || k(n, "muted", !0), y = k(n, "loop", !1);
|
|
720
720
|
if (w(o)) return /* @__PURE__ */ i(v, { inBuilder: l, className: "h-36" });
|
|
721
|
-
let
|
|
722
|
-
if (
|
|
723
|
-
if (!w(
|
|
721
|
+
let g = De(o), h = null;
|
|
722
|
+
if (g) {
|
|
723
|
+
if (!w(g)) {
|
|
724
724
|
const p = [];
|
|
725
|
-
p.push(`autoplay=${
|
|
725
|
+
p.push(`autoplay=${a ? 1 : 0}`), p.push(`controls=${n ? 1 : 0}`), p.push(`mute=${c ? 1 : 0}&muted=${c ? 1 : 0}`), p.push(`loop=${y ? 1 : 0}`), g = `${g}?${p.join("&")}`;
|
|
726
726
|
}
|
|
727
|
-
|
|
727
|
+
h = f.createElement("iframe", {
|
|
728
728
|
...t,
|
|
729
729
|
className: "absolute inset-0 w-full h-full",
|
|
730
|
-
src:
|
|
730
|
+
src: g,
|
|
731
731
|
allow: l ? "" : "autoplay *; fullscreen *",
|
|
732
732
|
allowFullScreen: !0,
|
|
733
733
|
frameBorder: 0
|
|
734
734
|
});
|
|
735
735
|
} else
|
|
736
|
-
|
|
736
|
+
h = f.createElement("video", {
|
|
737
737
|
...t,
|
|
738
738
|
className: "absolute inset-0 w-full h-full",
|
|
739
739
|
src: o,
|
|
740
|
-
controls:
|
|
740
|
+
controls: s,
|
|
741
741
|
muted: c,
|
|
742
|
-
autoPlay: l ? !1 :
|
|
742
|
+
autoPlay: l ? !1 : a,
|
|
743
743
|
loop: y
|
|
744
744
|
});
|
|
745
745
|
return /* @__PURE__ */ i("div", { ...ee(r, ["className"]), children: /* @__PURE__ */ b("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
746
746
|
l ? /* @__PURE__ */ i("div", { ...t, ...te(r, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
747
|
-
|
|
747
|
+
h
|
|
748
748
|
] }) });
|
|
749
749
|
}), Ue = {
|
|
750
750
|
type: "Video",
|
|
@@ -796,7 +796,7 @@ const Le = (e) => {
|
|
|
796
796
|
}),
|
|
797
797
|
i18nProps: ["url"]
|
|
798
798
|
}, Ve = (e) => {
|
|
799
|
-
const { blockProps: t, fieldName: l, label: r, styles: o, inputStyles: n, required:
|
|
799
|
+
const { blockProps: t, fieldName: l, label: r, styles: o, inputStyles: n, required: a, checked: s, showLabel: c = !0 } = e, y = C();
|
|
800
800
|
return c ? /* @__PURE__ */ b("div", { ...o, ...t, children: [
|
|
801
801
|
/* @__PURE__ */ i(
|
|
802
802
|
"input",
|
|
@@ -805,8 +805,8 @@ const Le = (e) => {
|
|
|
805
805
|
name: l,
|
|
806
806
|
id: y,
|
|
807
807
|
type: "checkbox",
|
|
808
|
-
required:
|
|
809
|
-
defaultChecked:
|
|
808
|
+
required: a,
|
|
809
|
+
defaultChecked: s
|
|
810
810
|
}
|
|
811
811
|
),
|
|
812
812
|
r && /* @__PURE__ */ i("label", { htmlFor: y, children: r })
|
|
@@ -818,7 +818,7 @@ const Le = (e) => {
|
|
|
818
818
|
...n,
|
|
819
819
|
...o,
|
|
820
820
|
type: "checkbox",
|
|
821
|
-
required:
|
|
821
|
+
required: a,
|
|
822
822
|
name: l
|
|
823
823
|
}
|
|
824
824
|
);
|
|
@@ -862,9 +862,9 @@ const Le = (e) => {
|
|
|
862
862
|
aiProps: ["label"],
|
|
863
863
|
i18nProps: ["label"]
|
|
864
864
|
}, We = (e) => {
|
|
865
|
-
const { children: t, blockProps: l, errorMessage: r, successMessage: o, action: n, styles:
|
|
865
|
+
const { children: t, blockProps: l, errorMessage: r, successMessage: o, action: n, styles: a, inBuilder: s } = e;
|
|
866
866
|
let c = t;
|
|
867
|
-
return t || (c = /* @__PURE__ */ i(v, { inBuilder:
|
|
867
|
+
return t || (c = /* @__PURE__ */ i(v, { inBuilder: s })), /* @__PURE__ */ b(
|
|
868
868
|
"form",
|
|
869
869
|
{
|
|
870
870
|
...{
|
|
@@ -876,7 +876,7 @@ const Le = (e) => {
|
|
|
876
876
|
method: "post",
|
|
877
877
|
action: n,
|
|
878
878
|
...l,
|
|
879
|
-
...
|
|
879
|
+
...a,
|
|
880
880
|
children: [
|
|
881
881
|
/* @__PURE__ */ i("div", { ...{
|
|
882
882
|
"x-html": "",
|
|
@@ -908,7 +908,7 @@ const Le = (e) => {
|
|
|
908
908
|
action: {
|
|
909
909
|
type: "string",
|
|
910
910
|
title: "Submit URL",
|
|
911
|
-
default: "/api/form
|
|
911
|
+
default: "/api/form"
|
|
912
912
|
},
|
|
913
913
|
errorMessage: {
|
|
914
914
|
type: "string",
|
|
@@ -928,7 +928,7 @@ const Le = (e) => {
|
|
|
928
928
|
aiProps: ["errorMessage", "successMessage"],
|
|
929
929
|
canAcceptBlock: () => !0
|
|
930
930
|
}, Ye = (e) => {
|
|
931
|
-
const { blockProps: t, inBuilder: l, label: r, styles: o, inputStyles: n, icon:
|
|
931
|
+
const { blockProps: t, inBuilder: l, label: r, styles: o, inputStyles: n, icon: a, iconSize: s, iconPos: c } = e, y = C();
|
|
932
932
|
return /* @__PURE__ */ b(
|
|
933
933
|
"button",
|
|
934
934
|
{
|
|
@@ -943,12 +943,12 @@ const Le = (e) => {
|
|
|
943
943
|
"aria-label": r,
|
|
944
944
|
children: [
|
|
945
945
|
r,
|
|
946
|
-
|
|
946
|
+
a && /* @__PURE__ */ i(
|
|
947
947
|
"div",
|
|
948
948
|
{
|
|
949
|
-
style: { width:
|
|
949
|
+
style: { width: s + "px" },
|
|
950
950
|
className: c + " " + (c === "order-first" ? "mr-2" : "ml-2") || "",
|
|
951
|
-
dangerouslySetInnerHTML: { __html:
|
|
951
|
+
dangerouslySetInnerHTML: { __html: a }
|
|
952
952
|
}
|
|
953
953
|
)
|
|
954
954
|
]
|
|
@@ -995,31 +995,44 @@ const Le = (e) => {
|
|
|
995
995
|
i18nProps: ["label"],
|
|
996
996
|
aiProps: ["label"]
|
|
997
997
|
}, Je = (e) => {
|
|
998
|
-
const {
|
|
999
|
-
|
|
1000
|
-
|
|
998
|
+
const {
|
|
999
|
+
blockProps: t,
|
|
1000
|
+
fieldName: l,
|
|
1001
|
+
label: r,
|
|
1002
|
+
placeholder: o,
|
|
1003
|
+
styles: n,
|
|
1004
|
+
inputStyles: a,
|
|
1005
|
+
showLabel: s,
|
|
1006
|
+
required: c,
|
|
1007
|
+
inputType: y,
|
|
1008
|
+
autocomplete: g
|
|
1009
|
+
} = e, h = C();
|
|
1010
|
+
return s ? /* @__PURE__ */ b("div", { ...n, ...t, children: [
|
|
1011
|
+
s && /* @__PURE__ */ i("label", { htmlFor: h, children: r }),
|
|
1001
1012
|
/* @__PURE__ */ i(
|
|
1002
1013
|
"input",
|
|
1003
1014
|
{
|
|
1004
1015
|
name: l,
|
|
1005
|
-
...
|
|
1006
|
-
id:
|
|
1016
|
+
...a,
|
|
1017
|
+
id: h,
|
|
1007
1018
|
type: y,
|
|
1008
1019
|
placeholder: o,
|
|
1009
|
-
required: c
|
|
1020
|
+
required: c,
|
|
1021
|
+
autoComplete: g ? "on" : "off"
|
|
1010
1022
|
}
|
|
1011
1023
|
)
|
|
1012
1024
|
] }) : /* @__PURE__ */ i(
|
|
1013
1025
|
"input",
|
|
1014
1026
|
{
|
|
1015
|
-
id:
|
|
1027
|
+
id: h,
|
|
1016
1028
|
name: l,
|
|
1017
1029
|
...t,
|
|
1018
|
-
...
|
|
1030
|
+
...a,
|
|
1019
1031
|
...n,
|
|
1020
1032
|
type: y,
|
|
1021
1033
|
placeholder: o,
|
|
1022
|
-
required: c
|
|
1034
|
+
required: c,
|
|
1035
|
+
autoComplete: g ? "on" : "off"
|
|
1023
1036
|
}
|
|
1024
1037
|
);
|
|
1025
1038
|
}, Ke = {
|
|
@@ -1054,29 +1067,21 @@ const Le = (e) => {
|
|
|
1054
1067
|
title: "Placeholder",
|
|
1055
1068
|
default: "Placeholder"
|
|
1056
1069
|
},
|
|
1070
|
+
inputType: {
|
|
1071
|
+
type: "string",
|
|
1072
|
+
title: "Input Type",
|
|
1073
|
+
default: "text",
|
|
1074
|
+
enum: ["text", "email", "password", "number", "tel", "hidden", "range", "color", "date", "time"]
|
|
1075
|
+
},
|
|
1057
1076
|
required: {
|
|
1058
1077
|
type: "boolean",
|
|
1059
1078
|
title: "Required",
|
|
1060
1079
|
default: !1
|
|
1061
1080
|
},
|
|
1062
|
-
|
|
1063
|
-
type: "
|
|
1064
|
-
title: "
|
|
1065
|
-
default:
|
|
1066
|
-
enum: [
|
|
1067
|
-
"text",
|
|
1068
|
-
"email",
|
|
1069
|
-
"password",
|
|
1070
|
-
"number",
|
|
1071
|
-
"tel",
|
|
1072
|
-
"file",
|
|
1073
|
-
"hidden",
|
|
1074
|
-
"range",
|
|
1075
|
-
"submit",
|
|
1076
|
-
"color",
|
|
1077
|
-
"date",
|
|
1078
|
-
"time"
|
|
1079
|
-
]
|
|
1081
|
+
autocomplete: {
|
|
1082
|
+
type: "boolean",
|
|
1083
|
+
title: "Autocomplete",
|
|
1084
|
+
default: !0
|
|
1080
1085
|
}
|
|
1081
1086
|
}
|
|
1082
1087
|
}),
|
|
@@ -1084,7 +1089,7 @@ const Le = (e) => {
|
|
|
1084
1089
|
i18nProps: ["label", "placeholder"]
|
|
1085
1090
|
}, Qe = (e) => {
|
|
1086
1091
|
const { blockProps: t, content: l, styles: r, children: o } = e, n = { ...r, ...t };
|
|
1087
|
-
return o ?
|
|
1092
|
+
return o ? f.createElement("label", n, o) : f.createElement("label", {
|
|
1088
1093
|
...n,
|
|
1089
1094
|
dangerouslySetInnerHTML: { __html: l }
|
|
1090
1095
|
});
|
|
@@ -1107,9 +1112,9 @@ const Le = (e) => {
|
|
|
1107
1112
|
aiProps: ["content"],
|
|
1108
1113
|
i18nProps: ["content"]
|
|
1109
1114
|
}, tt = (e) => {
|
|
1110
|
-
const { blockProps: t, fieldName: l, label: r, styles: o, inputStyles: n, required:
|
|
1115
|
+
const { blockProps: t, fieldName: l, label: r, styles: o, inputStyles: n, required: a, checked: s, showLabel: c = !0 } = e, y = C();
|
|
1111
1116
|
return c ? /* @__PURE__ */ b("div", { ...o, ...t, children: [
|
|
1112
|
-
/* @__PURE__ */ i("input", { ...n, name: l, id: y, type: "radio", required:
|
|
1117
|
+
/* @__PURE__ */ i("input", { ...n, name: l, id: y, type: "radio", required: a, defaultChecked: s }),
|
|
1113
1118
|
r && /* @__PURE__ */ i("label", { htmlFor: y, children: r })
|
|
1114
1119
|
] }) : /* @__PURE__ */ i(
|
|
1115
1120
|
"input",
|
|
@@ -1119,8 +1124,8 @@ const Le = (e) => {
|
|
|
1119
1124
|
...n,
|
|
1120
1125
|
...o,
|
|
1121
1126
|
type: "radio",
|
|
1122
|
-
required:
|
|
1123
|
-
checked:
|
|
1127
|
+
required: a,
|
|
1128
|
+
checked: s,
|
|
1124
1129
|
name: l
|
|
1125
1130
|
}
|
|
1126
1131
|
);
|
|
@@ -1164,16 +1169,16 @@ const Le = (e) => {
|
|
|
1164
1169
|
aiProps: ["label"],
|
|
1165
1170
|
i18nProps: ["label"]
|
|
1166
1171
|
}, ot = (e) => {
|
|
1167
|
-
const { blockProps: t, fieldName: l, label: r, placeholder: o, styles: n, inputStyles:
|
|
1172
|
+
const { blockProps: t, fieldName: l, label: r, placeholder: o, styles: n, inputStyles: a, required: s, showLabel: c, _multiple: y, options: g } = e, h = C();
|
|
1168
1173
|
return c ? /* @__PURE__ */ b("div", { ...n, ...t, children: [
|
|
1169
|
-
c && /* @__PURE__ */ i("label", { htmlFor:
|
|
1170
|
-
/* @__PURE__ */ b("select", { ...
|
|
1174
|
+
c && /* @__PURE__ */ i("label", { htmlFor: h, children: r }),
|
|
1175
|
+
/* @__PURE__ */ b("select", { ...a, id: h, required: s, multiple: y, name: l, children: [
|
|
1171
1176
|
/* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
|
|
1172
|
-
_(
|
|
1177
|
+
_(g, (p) => /* @__PURE__ */ i("option", { value: p == null ? void 0 : p.value, children: p == null ? void 0 : p.label }, p == null ? void 0 : p.value))
|
|
1173
1178
|
] })
|
|
1174
|
-
] }) : /* @__PURE__ */ b("select", { id:
|
|
1179
|
+
] }) : /* @__PURE__ */ b("select", { id: h, ...n, ...t, required: s, multiple: y, name: l, children: [
|
|
1175
1180
|
/* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
|
|
1176
|
-
_(
|
|
1181
|
+
_(g, (p) => /* @__PURE__ */ i("option", { value: p == null ? void 0 : p.value, children: p == null ? void 0 : p.label }, p == null ? void 0 : p.value))
|
|
1177
1182
|
] });
|
|
1178
1183
|
}, rt = {
|
|
1179
1184
|
type: "Select",
|
|
@@ -1240,20 +1245,31 @@ const Le = (e) => {
|
|
|
1240
1245
|
aiProps: ["label", "placeholder"],
|
|
1241
1246
|
i18nProps: ["label", "placeholder"]
|
|
1242
1247
|
}, nt = (e) => {
|
|
1243
|
-
const { blockProps: t, fieldName: l, label: r, placeholder: o, styles: n, inputStyles:
|
|
1248
|
+
const { blockProps: t, fieldName: l, label: r, placeholder: o, styles: n, inputStyles: a, rows: s, showLabel: c, required: y } = e, g = C();
|
|
1244
1249
|
return c ? /* @__PURE__ */ b("div", { ...n, ...t, children: [
|
|
1245
|
-
c && /* @__PURE__ */ i("label", { htmlFor:
|
|
1246
|
-
/* @__PURE__ */ i(
|
|
1250
|
+
c && /* @__PURE__ */ i("label", { htmlFor: g, children: r }),
|
|
1251
|
+
/* @__PURE__ */ i(
|
|
1252
|
+
"textarea",
|
|
1253
|
+
{
|
|
1254
|
+
name: l,
|
|
1255
|
+
...a,
|
|
1256
|
+
id: g,
|
|
1257
|
+
placeholder: o,
|
|
1258
|
+
rows: s,
|
|
1259
|
+
required: y
|
|
1260
|
+
}
|
|
1261
|
+
)
|
|
1247
1262
|
] }) : /* @__PURE__ */ i(
|
|
1248
1263
|
"textarea",
|
|
1249
1264
|
{
|
|
1250
|
-
id:
|
|
1265
|
+
id: g,
|
|
1251
1266
|
name: l,
|
|
1252
1267
|
...t,
|
|
1253
|
-
...
|
|
1268
|
+
...a,
|
|
1254
1269
|
...n,
|
|
1255
1270
|
placeholder: o,
|
|
1256
|
-
rows:
|
|
1271
|
+
rows: s,
|
|
1272
|
+
required: y
|
|
1257
1273
|
}
|
|
1258
1274
|
);
|
|
1259
1275
|
}, it = {
|
|
@@ -1287,19 +1303,24 @@ const Le = (e) => {
|
|
|
1287
1303
|
title: "Placeholder",
|
|
1288
1304
|
default: "Placeholder"
|
|
1289
1305
|
},
|
|
1290
|
-
|
|
1306
|
+
rows: {
|
|
1291
1307
|
type: "number",
|
|
1292
1308
|
title: "Rows",
|
|
1293
1309
|
default: 3
|
|
1310
|
+
},
|
|
1311
|
+
required: {
|
|
1312
|
+
type: "boolean",
|
|
1313
|
+
title: "Required",
|
|
1314
|
+
default: !1
|
|
1294
1315
|
}
|
|
1295
1316
|
}
|
|
1296
1317
|
}),
|
|
1297
1318
|
aiProps: ["label", "placeholder"],
|
|
1298
1319
|
i18nProps: ["label", "placeholder"]
|
|
1299
|
-
},
|
|
1320
|
+
}, at = (e) => {
|
|
1300
1321
|
const { blockProps: t, styles: l } = e;
|
|
1301
1322
|
return L("br", { ...t, ...l });
|
|
1302
|
-
},
|
|
1323
|
+
}, st = {
|
|
1303
1324
|
type: "LineBreak",
|
|
1304
1325
|
label: "Line Break",
|
|
1305
1326
|
category: "core",
|
|
@@ -1329,7 +1350,7 @@ const Le = (e) => {
|
|
|
1329
1350
|
/* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
1330
1351
|
]
|
|
1331
1352
|
}
|
|
1332
|
-
) :
|
|
1353
|
+
) : f.createElement("span", { ...t }, r);
|
|
1333
1354
|
}, pt = {
|
|
1334
1355
|
type: "PartialBlock",
|
|
1335
1356
|
label: "Partial Block",
|
|
@@ -1391,11 +1412,11 @@ const Le = (e) => {
|
|
|
1391
1412
|
12: "lg:col-span-12"
|
|
1392
1413
|
}
|
|
1393
1414
|
}, ut = (e) => {
|
|
1394
|
-
const { blockProps: t, children: l, styles: r, colSpan: o, tabletColSpan: n, desktopColSpan:
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
n ?
|
|
1398
|
-
|
|
1415
|
+
const { blockProps: t, children: l, styles: r, colSpan: o, tabletColSpan: n, desktopColSpan: a } = e, c = { className: [
|
|
1416
|
+
k(r, "className", ""),
|
|
1417
|
+
k(B, ["SMALL", isNaN(o) || !o ? 6 : o], ""),
|
|
1418
|
+
n ? k(B, ["MEDIUM", n || o], "") : "",
|
|
1419
|
+
a ? k(B, ["LARGE", n || o], "") : ""
|
|
1399
1420
|
].join(" ") };
|
|
1400
1421
|
return /* @__PURE__ */ i("div", { ...t, ...r, ...c, children: l || /* @__PURE__ */ i("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
1401
1422
|
}, dt = {
|
|
@@ -1434,8 +1455,8 @@ const Le = (e) => {
|
|
|
1434
1455
|
}
|
|
1435
1456
|
})
|
|
1436
1457
|
}, mt = (e) => {
|
|
1437
|
-
const { blockProps: t, children: l, styles: r, gutter: o } = e,
|
|
1438
|
-
return typeof (r == null ? void 0 : r.style) == "object" ? r.style.gap = `${o}px` :
|
|
1458
|
+
const { blockProps: t, children: l, styles: r, gutter: o } = e, a = { className: [k(r, "className", ""), " grid grid-cols-12"].join() };
|
|
1459
|
+
return typeof (r == null ? void 0 : r.style) == "object" ? r.style.gap = `${o}px` : a.style = { gap: `${o}px` }, /* @__PURE__ */ i("div", { ...t, ...r, ...a, children: l });
|
|
1439
1460
|
}, yt = {
|
|
1440
1461
|
type: "Row",
|
|
1441
1462
|
label: "Row",
|
|
@@ -1467,7 +1488,7 @@ const Le = (e) => {
|
|
|
1467
1488
|
}
|
|
1468
1489
|
})
|
|
1469
1490
|
}, Lt = () => {
|
|
1470
|
-
d(ne, ie), d(ue, de), d(
|
|
1491
|
+
d(ne, ie), d(ue, de), d(ae, se), d(me, ye), d(ge, fe), d(ke, we), d(be, he), d(Te, Re), d($e, Ee), d(Ae, He), d(ze, qe), d(_e, Se), d(Ne, Me), d(Ge, Ue), d(ce, pe), d(Le, ve), d(je, Fe), d(We, Xe), d(Ye, Ze), d(Je, Ke), d(Ve, Oe), d(tt, lt), d(ot, rt), d(nt, it), d(Qe, et), d(at, st), d(Ce, Ie), d(Be, Pe), d(ct, pt), d(mt, yt), d(ut, dt);
|
|
1471
1492
|
};
|
|
1472
1493
|
export {
|
|
1473
1494
|
Lt as loadWebBlocks
|