@chaibuilder/sdk 2.6.4 → 3.0.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/{code-editor-ChUC9WsA.cjs → code-editor-BL_76o6w.cjs} +1 -1
- package/dist/{code-editor-RwOkFe_0.js → code-editor-tDa4T69w.js} +1 -1
- package/dist/core.cjs +4 -4
- package/dist/core.d.ts +1 -6
- package/dist/core.js +541 -534
- package/dist/{css-import-modal-w1WZrKpm.cjs → css-import-modal-BRFVZ9j3.cjs} +1 -1
- package/dist/{css-import-modal-Ds-qmte_.js → css-import-modal-CgSqJi_w.js} +1 -1
- package/dist/toggle-C5f1IJ1G.cjs +1 -0
- package/dist/{toggle-DXTcRcvD.js → toggle-C6VUu_7m.js} +62 -62
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +147 -148
- package/package.json +14 -15
- package/dist/toggle-CCqv4Cah.cjs +0 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { registerChaiBlockSchema as d, StylesProp as u, registerChaiBlock as p, stylesProp as S, closestBlockProp as
|
|
2
|
-
import { jsx as a, jsxs as
|
|
1
|
+
import { registerChaiBlockSchema as d, StylesProp as u, registerChaiBlock as p, stylesProp as S, closestBlockProp as V } from "@chaibuilder/runtime";
|
|
2
|
+
import { jsx as a, jsxs as f, Fragment as j } from "react/jsx-runtime";
|
|
3
3
|
import { c as _, g as I } from "./common-functions-BGzDsf1z.js";
|
|
4
4
|
import * as y from "react";
|
|
5
5
|
import { createElement as w } from "react";
|
|
6
|
-
import { ButtonIcon as A, CodeIcon as
|
|
7
|
-
import { isEmpty as C, get as h, map as T, isNull as
|
|
8
|
-
|
|
9
|
-
const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div", { className: _("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, ye = (e) => {
|
|
6
|
+
import { ButtonIcon as A, CodeIcon as M, DividerHorizontalIcon as F, CheckboxIcon as U, FileTextIcon as q, InputIcon as E, LetterCaseToggleIcon as Z, RadiobuttonIcon as G, DropdownMenuIcon as O, GlobeIcon as H, HeadingIcon as Y, TableIcon as W, BorderTopIcon as Q, BorderAllIcon as J, ViewHorizontalIcon as X, DragHandleHorizontalIcon as K, SketchLogoIcon as ee, ImageIcon as te, Link1Icon as oe, RowsIcon as $, ColumnsIcon as le, TextIcon as re, LayoutIcon as ne, CursorTextIcon as ae, SpaceBetweenVerticallyIcon as ie, VideoIcon as se, LoopIcon as z } from "@radix-ui/react-icons";
|
|
7
|
+
import { isEmpty as C, get as h, map as T, isNull as ce, omit as pe, pick as de } from "lodash-es";
|
|
8
|
+
const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div", { className: _("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, ue = (e) => {
|
|
10
9
|
const { blockProps: o, inBuilder: t, backgroundImage: l, children: r, tag: n = "div", styles: i } = e;
|
|
11
10
|
let s = r;
|
|
12
11
|
r || (s = /* @__PURE__ */ a(v, { inBuilder: t }));
|
|
13
12
|
let c = {};
|
|
14
13
|
return l && (c = { backgroundImage: `url(${l})` }), y.createElement(n, { ...o, ...i, style: c }, s);
|
|
15
|
-
},
|
|
14
|
+
}, me = {
|
|
16
15
|
type: "Box",
|
|
17
16
|
description: "Similar to a div or section elements in HTML",
|
|
18
17
|
label: "Box",
|
|
@@ -54,8 +53,8 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
54
53
|
}
|
|
55
54
|
}),
|
|
56
55
|
canAcceptBlock: () => !0
|
|
57
|
-
},
|
|
58
|
-
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: i, iconPos: s, link: c, inBuilder: m } = e, k = l, g = i || /* @__PURE__ */
|
|
56
|
+
}, ye = (e) => {
|
|
57
|
+
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: i, iconPos: s, link: c, inBuilder: m } = e, k = l, g = i || /* @__PURE__ */ f(j, { children: [
|
|
59
58
|
r && /* @__PURE__ */ a("span", { "data-ai-key": "content", children: r }),
|
|
60
59
|
k && /* @__PURE__ */ a(
|
|
61
60
|
"div",
|
|
@@ -76,7 +75,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
76
75
|
g
|
|
77
76
|
);
|
|
78
77
|
return C(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
|
-
},
|
|
78
|
+
}, ge = {
|
|
80
79
|
type: "Button",
|
|
81
80
|
description: "similar to a button element in HTML",
|
|
82
81
|
label: "Button",
|
|
@@ -133,9 +132,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
133
132
|
}),
|
|
134
133
|
i18nProps: ["content"],
|
|
135
134
|
aiProps: ["content"]
|
|
136
|
-
},
|
|
135
|
+
}, be = (e) => {
|
|
137
136
|
const { blockProps: o, styles: t, htmlCode: l, inBuilder: r } = e;
|
|
138
|
-
return r ? /* @__PURE__ */
|
|
137
|
+
return r ? /* @__PURE__ */ f("div", { className: "relative", children: [
|
|
139
138
|
r ? /* @__PURE__ */ a("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
140
139
|
y.createElement("div", {
|
|
141
140
|
...t,
|
|
@@ -146,12 +145,12 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
146
145
|
...t,
|
|
147
146
|
dangerouslySetInnerHTML: { __html: l }
|
|
148
147
|
});
|
|
149
|
-
},
|
|
148
|
+
}, fe = {
|
|
150
149
|
type: "CustomHTML",
|
|
151
150
|
description: "similar to a div or section elements in HTML",
|
|
152
151
|
label: "Custom HTML",
|
|
153
152
|
category: "core",
|
|
154
|
-
icon:
|
|
153
|
+
icon: M,
|
|
155
154
|
group: "advanced",
|
|
156
155
|
...d({
|
|
157
156
|
properties: {
|
|
@@ -164,15 +163,15 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
164
163
|
}
|
|
165
164
|
}),
|
|
166
165
|
i18nProps: ["htmlCode"]
|
|
167
|
-
},
|
|
166
|
+
}, he = (e) => {
|
|
168
167
|
const { scripts: o, inBuilder: t, blockProps: l } = e;
|
|
169
168
|
return t ? /* @__PURE__ */ a("div", { ...l, children: /* @__PURE__ */ a("div", { className: _("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: o } });
|
|
170
|
-
},
|
|
169
|
+
}, ke = {
|
|
171
170
|
type: "CustomScript",
|
|
172
171
|
description: "similar to a script element in HTML",
|
|
173
172
|
label: "Custom Script",
|
|
174
173
|
category: "core",
|
|
175
|
-
icon:
|
|
174
|
+
icon: M,
|
|
176
175
|
group: "advanced",
|
|
177
176
|
...d({
|
|
178
177
|
properties: {
|
|
@@ -186,26 +185,26 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
186
185
|
}
|
|
187
186
|
}),
|
|
188
187
|
hidden: !0
|
|
189
|
-
},
|
|
188
|
+
}, xe = (e) => {
|
|
190
189
|
const { blockProps: o, styles: t } = e;
|
|
191
190
|
return w("hr", { ...t, ...o });
|
|
192
|
-
},
|
|
191
|
+
}, we = {
|
|
193
192
|
type: "Divider",
|
|
194
193
|
description: "A horizontal line component",
|
|
195
194
|
label: "Divider",
|
|
196
195
|
category: "core",
|
|
197
|
-
icon:
|
|
196
|
+
icon: F,
|
|
198
197
|
group: "basic",
|
|
199
198
|
...d({
|
|
200
199
|
properties: {
|
|
201
200
|
styles: u("bg-gray-900 h-0.5 py-2 my-1")
|
|
202
201
|
}
|
|
203
202
|
})
|
|
204
|
-
},
|
|
203
|
+
}, Ce = (e) => {
|
|
205
204
|
const { blockProps: o, styles: t, backgroundImage: l } = e;
|
|
206
205
|
let r = {};
|
|
207
206
|
return l && (r = { backgroundImage: `url(${l})` }), y.createElement("div", { ...o, ...t, style: r });
|
|
208
|
-
},
|
|
207
|
+
}, ve = {
|
|
209
208
|
type: "EmptyBox",
|
|
210
209
|
description: "A box component with no children",
|
|
211
210
|
label: "Empty Box",
|
|
@@ -222,9 +221,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
222
221
|
}
|
|
223
222
|
}
|
|
224
223
|
})
|
|
225
|
-
},
|
|
224
|
+
}, Ie = (e) => {
|
|
226
225
|
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: s, showLabel: c = !0 } = e;
|
|
227
|
-
return c ? /* @__PURE__ */
|
|
226
|
+
return c ? /* @__PURE__ */ f("div", { ...r, ...o, children: [
|
|
228
227
|
/* @__PURE__ */ a("input", { ...n, name: t, type: "checkbox", required: i, defaultChecked: s }),
|
|
229
228
|
l && /* @__PURE__ */ a("label", { htmlFor: t, children: l })
|
|
230
229
|
] }) : /* @__PURE__ */ a(
|
|
@@ -239,11 +238,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
239
238
|
defaultChecked: s
|
|
240
239
|
}
|
|
241
240
|
);
|
|
242
|
-
},
|
|
241
|
+
}, Le = {
|
|
243
242
|
type: "Checkbox",
|
|
244
243
|
label: "web_blocks.checkbox",
|
|
245
244
|
category: "core",
|
|
246
|
-
icon:
|
|
245
|
+
icon: U,
|
|
247
246
|
group: "form",
|
|
248
247
|
...d({
|
|
249
248
|
properties: {
|
|
@@ -278,10 +277,10 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
278
277
|
}),
|
|
279
278
|
aiProps: ["label"],
|
|
280
279
|
i18nProps: ["label"]
|
|
281
|
-
},
|
|
280
|
+
}, Pe = (e) => {
|
|
282
281
|
const { children: o, blockProps: t, errorMessage: l, successMessage: r, action: n, styles: i, inBuilder: s } = e;
|
|
283
282
|
let c = o;
|
|
284
|
-
return o || (c = /* @__PURE__ */ a(v, { inBuilder: s })), /* @__PURE__ */
|
|
283
|
+
return o || (c = /* @__PURE__ */ a(v, { inBuilder: s })), /* @__PURE__ */ f(
|
|
285
284
|
"form",
|
|
286
285
|
{
|
|
287
286
|
...{
|
|
@@ -303,11 +302,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
303
302
|
]
|
|
304
303
|
}
|
|
305
304
|
);
|
|
306
|
-
},
|
|
305
|
+
}, Be = {
|
|
307
306
|
type: "Form",
|
|
308
307
|
label: "Form",
|
|
309
308
|
category: "core",
|
|
310
|
-
icon:
|
|
309
|
+
icon: q,
|
|
311
310
|
group: "form",
|
|
312
311
|
blocks: () => [
|
|
313
312
|
{ _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
|
|
@@ -344,9 +343,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
344
343
|
i18nProps: ["errorMessage", "successMessage"],
|
|
345
344
|
aiProps: ["errorMessage", "successMessage"],
|
|
346
345
|
canAcceptBlock: () => !0
|
|
347
|
-
},
|
|
346
|
+
}, Se = (e) => {
|
|
348
347
|
const { blockProps: o, inBuilder: t, label: l, styles: r, icon: n, iconSize: i, iconPos: s } = e;
|
|
349
|
-
return /* @__PURE__ */
|
|
348
|
+
return /* @__PURE__ */ f("button", { ...r, ...o || {}, type: t ? "button" : "submit", "aria-label": l, children: [
|
|
350
349
|
l,
|
|
351
350
|
n && /* @__PURE__ */ a(
|
|
352
351
|
"div",
|
|
@@ -357,7 +356,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
357
356
|
}
|
|
358
357
|
)
|
|
359
358
|
] });
|
|
360
|
-
},
|
|
359
|
+
}, _e = {
|
|
361
360
|
type: "FormButton",
|
|
362
361
|
label: "Submit Button",
|
|
363
362
|
category: "core",
|
|
@@ -396,7 +395,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
396
395
|
}),
|
|
397
396
|
i18nProps: ["label"],
|
|
398
397
|
aiProps: ["label"]
|
|
399
|
-
},
|
|
398
|
+
}, Te = (e) => {
|
|
400
399
|
const o = { type: "text", autocomplete: "on" };
|
|
401
400
|
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" } : {
|
|
402
401
|
// Special cases
|
|
@@ -464,7 +463,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
464
463
|
organization: { type: "text", autocomplete: "organization" },
|
|
465
464
|
language: { type: "text", autocomplete: "language" }
|
|
466
465
|
}[e] || o : o;
|
|
467
|
-
},
|
|
466
|
+
}, Ne = (e) => {
|
|
468
467
|
const {
|
|
469
468
|
blockProps: o,
|
|
470
469
|
fieldName: t,
|
|
@@ -476,8 +475,8 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
476
475
|
required: c,
|
|
477
476
|
inputType: m,
|
|
478
477
|
defaultValue: k
|
|
479
|
-
} = e, { type: g, autocomplete: x } =
|
|
480
|
-
return s ? /* @__PURE__ */
|
|
478
|
+
} = e, { type: g, autocomplete: x } = Te(m);
|
|
479
|
+
return s ? /* @__PURE__ */ f("div", { ...n, ...o, children: [
|
|
481
480
|
s && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
|
|
482
481
|
/* @__PURE__ */ a(
|
|
483
482
|
"input",
|
|
@@ -505,11 +504,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
505
504
|
defaultValue: k
|
|
506
505
|
}
|
|
507
506
|
);
|
|
508
|
-
},
|
|
507
|
+
}, Re = {
|
|
509
508
|
type: "Input",
|
|
510
509
|
label: "web_blocks.input",
|
|
511
510
|
category: "core",
|
|
512
|
-
icon:
|
|
511
|
+
icon: E,
|
|
513
512
|
group: "form",
|
|
514
513
|
...d({
|
|
515
514
|
properties: {
|
|
@@ -620,17 +619,17 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
620
619
|
}),
|
|
621
620
|
aiProps: ["label", "placeholder"],
|
|
622
621
|
i18nProps: ["label", "placeholder"]
|
|
623
|
-
},
|
|
622
|
+
}, Ae = (e) => {
|
|
624
623
|
const { blockProps: o, content: t, styles: l, children: r } = e, n = { ...l, ...o };
|
|
625
624
|
return r ? y.createElement("label", n, r) : y.createElement("label", {
|
|
626
625
|
...n,
|
|
627
626
|
dangerouslySetInnerHTML: { __html: t }
|
|
628
627
|
});
|
|
629
|
-
},
|
|
628
|
+
}, Me = {
|
|
630
629
|
type: "Label",
|
|
631
630
|
label: "Label",
|
|
632
631
|
category: "core",
|
|
633
|
-
icon:
|
|
632
|
+
icon: Z,
|
|
634
633
|
group: "form",
|
|
635
634
|
...d({
|
|
636
635
|
properties: {
|
|
@@ -644,9 +643,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
644
643
|
}),
|
|
645
644
|
aiProps: ["content"],
|
|
646
645
|
i18nProps: ["content"]
|
|
647
|
-
},
|
|
646
|
+
}, Ee = (e) => {
|
|
648
647
|
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: s, showLabel: c = !0 } = e;
|
|
649
|
-
return c ? /* @__PURE__ */
|
|
648
|
+
return c ? /* @__PURE__ */ f("div", { ...r, ...o, children: [
|
|
650
649
|
/* @__PURE__ */ a("input", { ...n, name: t, type: "radio", required: i, defaultChecked: s }),
|
|
651
650
|
l && /* @__PURE__ */ a("label", { htmlFor: t, children: l })
|
|
652
651
|
] }) : /* @__PURE__ */ a(
|
|
@@ -661,11 +660,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
661
660
|
checked: s
|
|
662
661
|
}
|
|
663
662
|
);
|
|
664
|
-
},
|
|
663
|
+
}, He = {
|
|
665
664
|
type: "Radio",
|
|
666
665
|
label: "web_blocks.radio",
|
|
667
666
|
category: "core",
|
|
668
|
-
icon:
|
|
667
|
+
icon: G,
|
|
669
668
|
group: "form",
|
|
670
669
|
...d({
|
|
671
670
|
properties: {
|
|
@@ -700,7 +699,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
700
699
|
}),
|
|
701
700
|
aiProps: ["label"],
|
|
702
701
|
i18nProps: ["label"]
|
|
703
|
-
},
|
|
702
|
+
}, $e = (e) => {
|
|
704
703
|
const {
|
|
705
704
|
blockProps: o,
|
|
706
705
|
fieldName: t,
|
|
@@ -713,10 +712,10 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
713
712
|
_multiple: m,
|
|
714
713
|
options: k,
|
|
715
714
|
defaultValue: g
|
|
716
|
-
} = e, x = m && g ? g.split(",").map((
|
|
717
|
-
return c ? /* @__PURE__ */
|
|
715
|
+
} = e, x = m && g ? g.split(",").map((b) => b.trim()) : g || "";
|
|
716
|
+
return c ? /* @__PURE__ */ f("div", { ...n, ...o, children: [
|
|
718
717
|
c && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
|
|
719
|
-
/* @__PURE__ */
|
|
718
|
+
/* @__PURE__ */ f(
|
|
720
719
|
"select",
|
|
721
720
|
{
|
|
722
721
|
...i,
|
|
@@ -726,11 +725,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
726
725
|
defaultValue: x,
|
|
727
726
|
children: [
|
|
728
727
|
/* @__PURE__ */ a("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
729
|
-
T(k, (
|
|
728
|
+
T(k, (b) => /* @__PURE__ */ a("option", { value: b == null ? void 0 : b.value, children: b == null ? void 0 : b.label }, b == null ? void 0 : b.value))
|
|
730
729
|
]
|
|
731
730
|
}
|
|
732
731
|
)
|
|
733
|
-
] }) : /* @__PURE__ */
|
|
732
|
+
] }) : /* @__PURE__ */ f(
|
|
734
733
|
"select",
|
|
735
734
|
{
|
|
736
735
|
...n,
|
|
@@ -741,15 +740,15 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
741
740
|
defaultValue: x,
|
|
742
741
|
children: [
|
|
743
742
|
/* @__PURE__ */ a("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
744
|
-
T(k, (
|
|
743
|
+
T(k, (b) => /* @__PURE__ */ a("option", { value: b == null ? void 0 : b.value, children: b == null ? void 0 : b.label }, b == null ? void 0 : b.value))
|
|
745
744
|
]
|
|
746
745
|
}
|
|
747
746
|
);
|
|
748
|
-
},
|
|
747
|
+
}, ze = {
|
|
749
748
|
type: "Select",
|
|
750
749
|
label: "web_blocks.select",
|
|
751
750
|
category: "core",
|
|
752
|
-
icon:
|
|
751
|
+
icon: O,
|
|
753
752
|
group: "form",
|
|
754
753
|
...d({
|
|
755
754
|
properties: {
|
|
@@ -814,9 +813,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
814
813
|
}),
|
|
815
814
|
aiProps: ["label", "placeholder"],
|
|
816
815
|
i18nProps: ["label", "placeholder"]
|
|
817
|
-
},
|
|
816
|
+
}, De = (e) => {
|
|
818
817
|
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, rows: s, showLabel: c, required: m, defaultValue: k } = e;
|
|
819
|
-
return c ? /* @__PURE__ */
|
|
818
|
+
return c ? /* @__PURE__ */ f("div", { ...n, ...o, children: [
|
|
820
819
|
c && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
|
|
821
820
|
/* @__PURE__ */ a(
|
|
822
821
|
"textarea",
|
|
@@ -842,11 +841,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
842
841
|
defaultValue: k
|
|
843
842
|
}
|
|
844
843
|
);
|
|
845
|
-
},
|
|
844
|
+
}, Ve = {
|
|
846
845
|
type: "TextArea",
|
|
847
846
|
label: "web_blocks.textarea",
|
|
848
847
|
category: "core",
|
|
849
|
-
icon:
|
|
848
|
+
icon: E,
|
|
850
849
|
group: "form",
|
|
851
850
|
...d({
|
|
852
851
|
properties: {
|
|
@@ -893,15 +892,15 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
893
892
|
}),
|
|
894
893
|
aiProps: ["label", "placeholder"],
|
|
895
894
|
i18nProps: ["label", "placeholder"]
|
|
896
|
-
},
|
|
895
|
+
}, je = (e) => {
|
|
897
896
|
const { blockProps: o, inBuilder: t, children: l, globalBlock: r } = e;
|
|
898
|
-
return t && !r ? /* @__PURE__ */
|
|
897
|
+
return t && !r ? /* @__PURE__ */ f(
|
|
899
898
|
"div",
|
|
900
899
|
{
|
|
901
900
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
902
901
|
...o,
|
|
903
902
|
children: [
|
|
904
|
-
/* @__PURE__ */
|
|
903
|
+
/* @__PURE__ */ f("h1", { children: [
|
|
905
904
|
"Global Block - ",
|
|
906
905
|
r
|
|
907
906
|
] }),
|
|
@@ -909,7 +908,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
909
908
|
]
|
|
910
909
|
}
|
|
911
910
|
) : y.createElement("span", { ...o }, l);
|
|
912
|
-
},
|
|
911
|
+
}, Fe = {
|
|
913
912
|
type: "GlobalBlock",
|
|
914
913
|
description: "A global block component",
|
|
915
914
|
label: "Global Block",
|
|
@@ -927,19 +926,19 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
927
926
|
}
|
|
928
927
|
}
|
|
929
928
|
})
|
|
930
|
-
},
|
|
929
|
+
}, Ue = (e) => {
|
|
931
930
|
const { blockProps: o, styles: t, content: l, tag: r = "h1", children: n = null } = e;
|
|
932
931
|
return n ? y.createElement(r, { ...t, ...o }, n) : y.createElement(r, {
|
|
933
932
|
...t,
|
|
934
933
|
...o,
|
|
935
934
|
dangerouslySetInnerHTML: { __html: l }
|
|
936
935
|
});
|
|
937
|
-
},
|
|
936
|
+
}, qe = {
|
|
938
937
|
type: "Heading",
|
|
939
938
|
description: "A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",
|
|
940
939
|
label: "Heading",
|
|
941
940
|
category: "core",
|
|
942
|
-
icon:
|
|
941
|
+
icon: Y,
|
|
943
942
|
group: "typography",
|
|
944
943
|
...d({
|
|
945
944
|
properties: {
|
|
@@ -961,10 +960,10 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
961
960
|
aiProps: ["content"],
|
|
962
961
|
i18nProps: ["content"],
|
|
963
962
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
964
|
-
},
|
|
963
|
+
}, Ze = (e) => {
|
|
965
964
|
const { blockProps: o, styles: t } = e;
|
|
966
965
|
return w("br", { ...o, ...t });
|
|
967
|
-
},
|
|
966
|
+
}, Ge = {
|
|
968
967
|
type: "LineBreak",
|
|
969
968
|
label: "Line Break",
|
|
970
969
|
category: "core",
|
|
@@ -979,19 +978,19 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
979
978
|
canDelete: () => !1,
|
|
980
979
|
canMove: () => !1,
|
|
981
980
|
canDuplicate: () => !1
|
|
982
|
-
},
|
|
981
|
+
}, Oe = (e) => {
|
|
983
982
|
const { blockProps: o, children: t, styles: l } = e;
|
|
984
983
|
return t ? w("table", { ...o, ...l }, t) : /* @__PURE__ */ a(v, {});
|
|
985
|
-
},
|
|
984
|
+
}, Ye = (e) => {
|
|
986
985
|
const { blockProps: o, children: t, styles: l } = e;
|
|
987
986
|
return t ? w("thead", { ...o, ...l }, t) : /* @__PURE__ */ a(v, {});
|
|
988
|
-
},
|
|
987
|
+
}, We = (e) => {
|
|
989
988
|
const { blockProps: o, children: t, styles: l } = e;
|
|
990
989
|
return t ? w("tbody", { ...o, ...l }, t) : /* @__PURE__ */ a(v, {});
|
|
991
|
-
},
|
|
990
|
+
}, Qe = (e) => {
|
|
992
991
|
const { blockProps: o, children: t, styles: l } = e;
|
|
993
992
|
return t ? w("tr", { ...o, ...l }, t) : /* @__PURE__ */ a(v, {});
|
|
994
|
-
},
|
|
993
|
+
}, Je = (e) => {
|
|
995
994
|
const { blockProps: o, children: t, content: l, styles: r } = e;
|
|
996
995
|
return !t && C(l) ? /* @__PURE__ */ a(v, {}) : t ? w("td", { ...o, ...r }, t) : w("td", {
|
|
997
996
|
...o,
|
|
@@ -999,13 +998,13 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
|
|
|
999
998
|
dangerouslySetInnerHTML: { __html: l }
|
|
1000
999
|
});
|
|
1001
1000
|
};
|
|
1002
|
-
p(
|
|
1001
|
+
p(Oe, {
|
|
1003
1002
|
type: "Table",
|
|
1004
1003
|
label: "Table",
|
|
1005
1004
|
category: "core",
|
|
1006
1005
|
group: "table",
|
|
1007
1006
|
hidden: !0,
|
|
1008
|
-
icon:
|
|
1007
|
+
icon: W,
|
|
1009
1008
|
...d({
|
|
1010
1009
|
properties: {
|
|
1011
1010
|
styles: u("")
|
|
@@ -1013,13 +1012,13 @@ p(We, {
|
|
|
1013
1012
|
}),
|
|
1014
1013
|
blocks: L("Table")
|
|
1015
1014
|
});
|
|
1016
|
-
p(
|
|
1015
|
+
p(Ye, {
|
|
1017
1016
|
type: "TableHead",
|
|
1018
1017
|
label: "Table Head",
|
|
1019
1018
|
category: "core",
|
|
1020
1019
|
group: "table",
|
|
1021
1020
|
hidden: !0,
|
|
1022
|
-
icon:
|
|
1021
|
+
icon: Q,
|
|
1023
1022
|
...d({
|
|
1024
1023
|
properties: {
|
|
1025
1024
|
styles: u("")
|
|
@@ -1027,13 +1026,13 @@ p(Qe, {
|
|
|
1027
1026
|
}),
|
|
1028
1027
|
blocks: L("TableHead")
|
|
1029
1028
|
});
|
|
1030
|
-
p(
|
|
1029
|
+
p(We, {
|
|
1031
1030
|
type: "TableBody",
|
|
1032
1031
|
label: "Table Body",
|
|
1033
1032
|
category: "core",
|
|
1034
1033
|
group: "table",
|
|
1035
1034
|
hidden: !0,
|
|
1036
|
-
icon:
|
|
1035
|
+
icon: J,
|
|
1037
1036
|
...d({
|
|
1038
1037
|
properties: {
|
|
1039
1038
|
styles: u("")
|
|
@@ -1041,13 +1040,13 @@ p(Je, {
|
|
|
1041
1040
|
}),
|
|
1042
1041
|
blocks: L("TableBody")
|
|
1043
1042
|
});
|
|
1044
|
-
p(
|
|
1043
|
+
p(Qe, {
|
|
1045
1044
|
type: "TableRow",
|
|
1046
1045
|
label: "Table Row",
|
|
1047
1046
|
category: "core",
|
|
1048
1047
|
group: "table",
|
|
1049
1048
|
hidden: !0,
|
|
1050
|
-
icon:
|
|
1049
|
+
icon: X,
|
|
1051
1050
|
...d({
|
|
1052
1051
|
properties: {
|
|
1053
1052
|
styles: u("")
|
|
@@ -1055,13 +1054,13 @@ p(Xe, {
|
|
|
1055
1054
|
}),
|
|
1056
1055
|
blocks: L("TableRow")
|
|
1057
1056
|
});
|
|
1058
|
-
p(
|
|
1057
|
+
p(Je, {
|
|
1059
1058
|
type: "TableCell",
|
|
1060
1059
|
label: "Table Cell",
|
|
1061
1060
|
category: "core",
|
|
1062
1061
|
group: "table",
|
|
1063
1062
|
hidden: !0,
|
|
1064
|
-
icon:
|
|
1063
|
+
icon: K,
|
|
1065
1064
|
...d({
|
|
1066
1065
|
properties: {
|
|
1067
1066
|
styles: u(""),
|
|
@@ -1120,11 +1119,11 @@ function L(e) {
|
|
|
1120
1119
|
}
|
|
1121
1120
|
return e === "TableRow" ? t() : e === "TableHead" ? l() : e === "TableBody" ? r() : [];
|
|
1122
1121
|
}
|
|
1123
|
-
const
|
|
1122
|
+
const D = (e, ...o) => ({
|
|
1124
1123
|
...e,
|
|
1125
1124
|
className: _(e.className, ...o)
|
|
1126
|
-
}),
|
|
1127
|
-
const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: i } = e, s =
|
|
1125
|
+
}), Xe = (e) => {
|
|
1126
|
+
const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: i } = e, s = D(l, "");
|
|
1128
1127
|
if (C(t))
|
|
1129
1128
|
return /* @__PURE__ */ a(v, { inBuilder: n, className: "h-8 w-14" });
|
|
1130
1129
|
const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
@@ -1137,11 +1136,11 @@ const $ = (e, ...o) => ({
|
|
|
1137
1136
|
},
|
|
1138
1137
|
dangerouslySetInnerHTML: { __html: c }
|
|
1139
1138
|
});
|
|
1140
|
-
},
|
|
1139
|
+
}, Ke = {
|
|
1141
1140
|
type: "Icon",
|
|
1142
1141
|
label: "web_blocks.icon",
|
|
1143
1142
|
category: "core",
|
|
1144
|
-
icon:
|
|
1143
|
+
icon: ee,
|
|
1145
1144
|
group: "media",
|
|
1146
1145
|
...d({
|
|
1147
1146
|
properties: {
|
|
@@ -1164,9 +1163,9 @@ const $ = (e, ...o) => ({
|
|
|
1164
1163
|
}
|
|
1165
1164
|
}
|
|
1166
1165
|
})
|
|
1167
|
-
},
|
|
1166
|
+
}, et = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==", tt = (e) => {
|
|
1168
1167
|
const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height: i, width: s, lazyLoading: c } = e;
|
|
1169
|
-
return C(t) ? /* @__PURE__ */ a(v, { className: "h-36" }) : /* @__PURE__ */
|
|
1168
|
+
return C(t) ? /* @__PURE__ */ a(v, { className: "h-36" }) : /* @__PURE__ */ f("picture", { children: [
|
|
1170
1169
|
l && /* @__PURE__ */ a("source", { srcSet: l, media: "(max-width: 480px)" }),
|
|
1171
1170
|
/* @__PURE__ */ a(
|
|
1172
1171
|
"img",
|
|
@@ -1181,12 +1180,12 @@ const $ = (e, ...o) => ({
|
|
|
1181
1180
|
}
|
|
1182
1181
|
)
|
|
1183
1182
|
] });
|
|
1184
|
-
},
|
|
1183
|
+
}, ot = {
|
|
1185
1184
|
type: "Image",
|
|
1186
1185
|
description: "A image component",
|
|
1187
1186
|
label: "Image",
|
|
1188
1187
|
category: "core",
|
|
1189
|
-
icon:
|
|
1188
|
+
icon: te,
|
|
1190
1189
|
group: "media",
|
|
1191
1190
|
...d({
|
|
1192
1191
|
properties: {
|
|
@@ -1194,7 +1193,7 @@ const $ = (e, ...o) => ({
|
|
|
1194
1193
|
image: {
|
|
1195
1194
|
type: "string",
|
|
1196
1195
|
title: "Image",
|
|
1197
|
-
default:
|
|
1196
|
+
default: et,
|
|
1198
1197
|
ui: { "ui:widget": "image" }
|
|
1199
1198
|
},
|
|
1200
1199
|
alt: {
|
|
@@ -1230,7 +1229,7 @@ const $ = (e, ...o) => ({
|
|
|
1230
1229
|
}),
|
|
1231
1230
|
aiProps: ["alt"],
|
|
1232
1231
|
i18nProps: ["alt", "image", "_imageId", "mobileImage", "_mobileImageId"]
|
|
1233
|
-
},
|
|
1232
|
+
}, lt = (e) => {
|
|
1234
1233
|
const { blockProps: o, link: t, children: l, styles: r, inBuilder: n, content: i } = e;
|
|
1235
1234
|
let s = {};
|
|
1236
1235
|
return !l && C(i) && (s = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? l ? /* @__PURE__ */ a("span", { role: "link", ...o, style: s, ...r, children: l }) : w(
|
|
@@ -1253,12 +1252,12 @@ const $ = (e, ...o) => ({
|
|
|
1253
1252
|
},
|
|
1254
1253
|
i
|
|
1255
1254
|
);
|
|
1256
|
-
},
|
|
1255
|
+
}, rt = {
|
|
1257
1256
|
type: "Link",
|
|
1258
1257
|
description: "A link component",
|
|
1259
1258
|
label: "Link",
|
|
1260
1259
|
category: "core",
|
|
1261
|
-
icon:
|
|
1260
|
+
icon: oe,
|
|
1262
1261
|
group: "basic",
|
|
1263
1262
|
...d({
|
|
1264
1263
|
properties: {
|
|
@@ -1294,14 +1293,14 @@ const $ = (e, ...o) => ({
|
|
|
1294
1293
|
aiProps: ["content"],
|
|
1295
1294
|
i18nProps: ["content"],
|
|
1296
1295
|
canAcceptBlock: (e) => e !== "Link"
|
|
1297
|
-
},
|
|
1296
|
+
}, nt = (e) => {
|
|
1298
1297
|
const { blockProps: o, children: t, styles: l, tag: r, inBuilder: n } = e;
|
|
1299
1298
|
return !t && C(l == null ? void 0 : l.className) ? /* @__PURE__ */ a(v, { inBuilder: n }) : y.createElement(r || "ul", { ...o, ...l }, t);
|
|
1300
|
-
},
|
|
1299
|
+
}, at = {
|
|
1301
1300
|
type: "List",
|
|
1302
1301
|
description: "A list component",
|
|
1303
1302
|
label: "List",
|
|
1304
|
-
icon:
|
|
1303
|
+
icon: $,
|
|
1305
1304
|
category: "core",
|
|
1306
1305
|
group: "basic",
|
|
1307
1306
|
...d({
|
|
@@ -1334,18 +1333,18 @@ const $ = (e, ...o) => ({
|
|
|
1334
1333
|
content: "Item 3"
|
|
1335
1334
|
}
|
|
1336
1335
|
]
|
|
1337
|
-
},
|
|
1336
|
+
}, it = (e) => {
|
|
1338
1337
|
const { blockProps: o, content: t, styles: l, children: r, tag: n } = e;
|
|
1339
1338
|
return r ? y.createElement(n || "li", { ...l, ...o }, r) : y.createElement(n || "li", {
|
|
1340
1339
|
...l,
|
|
1341
1340
|
...o,
|
|
1342
1341
|
dangerouslySetInnerHTML: { __html: t }
|
|
1343
1342
|
});
|
|
1344
|
-
},
|
|
1343
|
+
}, st = {
|
|
1345
1344
|
type: "ListItem",
|
|
1346
1345
|
description: "A list item component",
|
|
1347
1346
|
label: "List Item",
|
|
1348
|
-
icon:
|
|
1347
|
+
icon: le,
|
|
1349
1348
|
category: "core",
|
|
1350
1349
|
group: "basic",
|
|
1351
1350
|
...d({
|
|
@@ -1365,19 +1364,19 @@ const $ = (e, ...o) => ({
|
|
|
1365
1364
|
aiProps: ["content"],
|
|
1366
1365
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
1367
1366
|
canBeNested: (e) => e === "List" || e === "Repeater"
|
|
1368
|
-
},
|
|
1367
|
+
}, ct = (e) => {
|
|
1369
1368
|
const { blockProps: o, styles: t, content: l } = e;
|
|
1370
|
-
return
|
|
1369
|
+
return ce(e.children) ? y.createElement("p", {
|
|
1371
1370
|
...t,
|
|
1372
1371
|
...o,
|
|
1373
1372
|
dangerouslySetInnerHTML: { __html: l }
|
|
1374
1373
|
}) : y.createElement("p", { ...t, ...o }, e.children);
|
|
1375
|
-
},
|
|
1374
|
+
}, pt = {
|
|
1376
1375
|
type: "Paragraph",
|
|
1377
1376
|
description: "A paragraph component",
|
|
1378
1377
|
label: "Paragraph",
|
|
1379
1378
|
category: "core",
|
|
1380
|
-
icon:
|
|
1379
|
+
icon: re,
|
|
1381
1380
|
group: "typography",
|
|
1382
1381
|
...d({
|
|
1383
1382
|
properties: {
|
|
@@ -1393,15 +1392,15 @@ const $ = (e, ...o) => ({
|
|
|
1393
1392
|
i18nProps: ["content"],
|
|
1394
1393
|
aiProps: ["content"],
|
|
1395
1394
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
1396
|
-
},
|
|
1395
|
+
}, dt = (e) => {
|
|
1397
1396
|
const { blockProps: o, inBuilder: t, children: l, partialBlockId: r } = e;
|
|
1398
|
-
return t && !r ? /* @__PURE__ */
|
|
1397
|
+
return t && !r ? /* @__PURE__ */ f(
|
|
1399
1398
|
"div",
|
|
1400
1399
|
{
|
|
1401
1400
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
1402
1401
|
...o,
|
|
1403
1402
|
children: [
|
|
1404
|
-
/* @__PURE__ */
|
|
1403
|
+
/* @__PURE__ */ f("h1", { children: [
|
|
1405
1404
|
"Partial Block - ",
|
|
1406
1405
|
r
|
|
1407
1406
|
] }),
|
|
@@ -1409,7 +1408,7 @@ const $ = (e, ...o) => ({
|
|
|
1409
1408
|
]
|
|
1410
1409
|
}
|
|
1411
1410
|
) : y.createElement("span", { ...o }, l);
|
|
1412
|
-
},
|
|
1411
|
+
}, ut = {
|
|
1413
1412
|
type: "PartialBlock",
|
|
1414
1413
|
description: "A partial block component",
|
|
1415
1414
|
label: "Partial Block",
|
|
@@ -1470,7 +1469,7 @@ const $ = (e, ...o) => ({
|
|
|
1470
1469
|
11: "lg:col-span-11",
|
|
1471
1470
|
12: "lg:col-span-12"
|
|
1472
1471
|
}
|
|
1473
|
-
},
|
|
1472
|
+
}, mt = (e) => {
|
|
1474
1473
|
const { blockProps: o, children: t, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: i } = e, c = { className: [
|
|
1475
1474
|
h(l, "className", ""),
|
|
1476
1475
|
h(P, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
|
|
@@ -1478,13 +1477,13 @@ const $ = (e, ...o) => ({
|
|
|
1478
1477
|
i ? h(P, ["LARGE", n || r], "") : ""
|
|
1479
1478
|
].join(" ") };
|
|
1480
1479
|
return /* @__PURE__ */ a("div", { ...o, ...l, ...c, children: t || /* @__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" }) });
|
|
1481
|
-
},
|
|
1480
|
+
}, yt = {
|
|
1482
1481
|
type: "Column",
|
|
1483
1482
|
description: "A column component",
|
|
1484
1483
|
label: "Column",
|
|
1485
1484
|
group: "basic",
|
|
1486
1485
|
category: "core",
|
|
1487
|
-
icon:
|
|
1486
|
+
icon: ne,
|
|
1488
1487
|
wrapper: !0,
|
|
1489
1488
|
canDelete: () => !0,
|
|
1490
1489
|
canAcceptBlock: () => !0,
|
|
@@ -1514,15 +1513,15 @@ const $ = (e, ...o) => ({
|
|
|
1514
1513
|
}
|
|
1515
1514
|
}
|
|
1516
1515
|
})
|
|
1517
|
-
},
|
|
1516
|
+
}, gt = (e) => {
|
|
1518
1517
|
const { blockProps: o, children: t, styles: l, gutter: r } = e, i = { className: [h(l, "className", ""), " grid grid-cols-12"].join() };
|
|
1519
1518
|
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` : i.style = { gap: `${r}px` }, /* @__PURE__ */ a("div", { ...o, ...l, ...i, children: t });
|
|
1520
|
-
},
|
|
1519
|
+
}, bt = {
|
|
1521
1520
|
type: "Row",
|
|
1522
1521
|
description: "A row component",
|
|
1523
1522
|
label: "Row",
|
|
1524
1523
|
group: "basic",
|
|
1525
|
-
icon:
|
|
1524
|
+
icon: $,
|
|
1526
1525
|
blocks: () => [
|
|
1527
1526
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1528
1527
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
@@ -1548,19 +1547,19 @@ const $ = (e, ...o) => ({
|
|
|
1548
1547
|
}
|
|
1549
1548
|
}
|
|
1550
1549
|
})
|
|
1551
|
-
},
|
|
1552
|
-
const { blockProps: o, content: t, styles: l } = e, r =
|
|
1550
|
+
}, ft = (e) => {
|
|
1551
|
+
const { blockProps: o, content: t, styles: l } = e, r = D(
|
|
1553
1552
|
l,
|
|
1554
1553
|
"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",
|
|
1555
1554
|
"max-w-full"
|
|
1556
1555
|
);
|
|
1557
1556
|
return /* @__PURE__ */ a("div", { ...o, ...r, dangerouslySetInnerHTML: { __html: t } });
|
|
1558
|
-
},
|
|
1557
|
+
}, ht = {
|
|
1559
1558
|
type: "RichText",
|
|
1560
1559
|
description: "A rich text block",
|
|
1561
1560
|
label: "Rich Text",
|
|
1562
1561
|
category: "core",
|
|
1563
|
-
icon:
|
|
1562
|
+
icon: ae,
|
|
1564
1563
|
group: "typography",
|
|
1565
1564
|
...d({
|
|
1566
1565
|
properties: {
|
|
@@ -1575,14 +1574,14 @@ const $ = (e, ...o) => ({
|
|
|
1575
1574
|
}),
|
|
1576
1575
|
aiProps: ["content"],
|
|
1577
1576
|
i18nProps: ["content"]
|
|
1578
|
-
},
|
|
1577
|
+
}, kt = (e) => {
|
|
1579
1578
|
const { blockProps: o, styles: t, content: l, children: r = null, tag: n } = e;
|
|
1580
1579
|
return r ? y.createElement("span", { ...t, ...o }, r) : y.createElement(n || "span", {
|
|
1581
1580
|
...t,
|
|
1582
1581
|
...o,
|
|
1583
1582
|
dangerouslySetInnerHTML: { __html: l || "" }
|
|
1584
1583
|
});
|
|
1585
|
-
},
|
|
1584
|
+
}, xt = {
|
|
1586
1585
|
type: "Span",
|
|
1587
1586
|
description: "A span component",
|
|
1588
1587
|
label: "Span",
|
|
@@ -1602,14 +1601,14 @@ const $ = (e, ...o) => ({
|
|
|
1602
1601
|
aiProps: ["content"],
|
|
1603
1602
|
i18nProps: ["content"],
|
|
1604
1603
|
canAcceptBlock: () => !0
|
|
1605
|
-
},
|
|
1604
|
+
}, wt = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ a("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Ct = {
|
|
1606
1605
|
type: "Text",
|
|
1607
1606
|
description: "A text component with no styling",
|
|
1608
1607
|
label: "Text",
|
|
1609
1608
|
hidden: !0,
|
|
1610
1609
|
category: "core",
|
|
1611
1610
|
group: "typography",
|
|
1612
|
-
icon:
|
|
1611
|
+
icon: ie,
|
|
1613
1612
|
...d({
|
|
1614
1613
|
properties: {
|
|
1615
1614
|
styles: u("text-black"),
|
|
@@ -1653,7 +1652,7 @@ const $ = (e, ...o) => ({
|
|
|
1653
1652
|
default: !1
|
|
1654
1653
|
}
|
|
1655
1654
|
}
|
|
1656
|
-
}, N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, R = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/,
|
|
1655
|
+
}, N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, R = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/, vt = (e, o) => {
|
|
1657
1656
|
const t = h(o, "autoplay", !1), l = h(o, "controls", !1), r = h(o, "loop", !1), n = t || h(o, "muted", !0);
|
|
1658
1657
|
if (N.test(e)) {
|
|
1659
1658
|
const i = e.match(N);
|
|
@@ -1672,13 +1671,13 @@ const $ = (e, ...o) => ({
|
|
|
1672
1671
|
}
|
|
1673
1672
|
}
|
|
1674
1673
|
return null;
|
|
1675
|
-
},
|
|
1676
|
-
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: i } = e, s =
|
|
1677
|
-
return /* @__PURE__ */
|
|
1678
|
-
!s && i ? /* @__PURE__ */ a("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: C(o) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ a("iframe", { width: "100%", src: s, ...
|
|
1674
|
+
}, It = (e) => {
|
|
1675
|
+
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: i } = e, s = vt(o, r);
|
|
1676
|
+
return /* @__PURE__ */ f("div", { ...pe(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
1677
|
+
!s && i ? /* @__PURE__ */ a("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: C(o) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ a("iframe", { width: "100%", src: s, ...de(l, "className") }),
|
|
1679
1678
|
i && /* @__PURE__ */ a("div", { ...t, className: "absolute top-0 h-full w-full" })
|
|
1680
1679
|
] });
|
|
1681
|
-
},
|
|
1680
|
+
}, Lt = (e) => {
|
|
1682
1681
|
const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps: i } = e;
|
|
1683
1682
|
let s = n;
|
|
1684
1683
|
const c = [...h(r, "srcsets", []) || []];
|
|
@@ -1705,17 +1704,17 @@ const $ = (e, ...o) => ({
|
|
|
1705
1704
|
}),
|
|
1706
1705
|
"Your browser does not support the video tag."
|
|
1707
1706
|
) });
|
|
1708
|
-
},
|
|
1707
|
+
}, Pt = (e) => {
|
|
1709
1708
|
const { videoSource: o } = e;
|
|
1710
|
-
return o === "Custom" ? /* @__PURE__ */ a(
|
|
1709
|
+
return o === "Custom" ? /* @__PURE__ */ a(Lt, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ a(It, { ...e }) : /* @__PURE__ */ f("div", { children: [
|
|
1711
1710
|
"Invalid video source : ",
|
|
1712
1711
|
o
|
|
1713
1712
|
] });
|
|
1714
|
-
},
|
|
1713
|
+
}, Bt = {
|
|
1715
1714
|
type: "Video",
|
|
1716
1715
|
label: "Video",
|
|
1717
1716
|
category: "core",
|
|
1718
|
-
icon:
|
|
1717
|
+
icon: se,
|
|
1719
1718
|
group: "media",
|
|
1720
1719
|
...d({
|
|
1721
1720
|
properties: {
|
|
@@ -1796,24 +1795,24 @@ const $ = (e, ...o) => ({
|
|
|
1796
1795
|
}
|
|
1797
1796
|
}),
|
|
1798
1797
|
i18nProps: ["url"]
|
|
1799
|
-
},
|
|
1798
|
+
}, St = (e) => {
|
|
1800
1799
|
const { children: o, tag: t, styles: l, blockProps: r, inBuilder: n, $loading: i } = e;
|
|
1801
1800
|
let s = o;
|
|
1802
|
-
return C(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" })), t === "none" ? i && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */
|
|
1801
|
+
return C(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" })), t === "none" ? i && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ f("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1803
1802
|
/* @__PURE__ */ a("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1804
1803
|
/* @__PURE__ */ a("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1805
1804
|
] }, m)) : s : y.createElement(
|
|
1806
1805
|
t,
|
|
1807
1806
|
{ ...r, ...l },
|
|
1808
|
-
i && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */
|
|
1807
|
+
i && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ f("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1809
1808
|
/* @__PURE__ */ a("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1810
1809
|
/* @__PURE__ */ a("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1811
1810
|
] }, m)) : s
|
|
1812
1811
|
);
|
|
1813
|
-
},
|
|
1812
|
+
}, _t = {
|
|
1814
1813
|
type: "Repeater",
|
|
1815
1814
|
label: "Repeater",
|
|
1816
|
-
icon:
|
|
1815
|
+
icon: z,
|
|
1817
1816
|
group: "basic",
|
|
1818
1817
|
dataProviderMode: "live",
|
|
1819
1818
|
dataProviderDependencies: ["filter", "sort", "limit", "repeaterItems"],
|
|
@@ -1868,7 +1867,7 @@ const $ = (e, ...o) => ({
|
|
|
1868
1867
|
}
|
|
1869
1868
|
}
|
|
1870
1869
|
})
|
|
1871
|
-
},
|
|
1870
|
+
}, Tt = ({
|
|
1872
1871
|
children: e,
|
|
1873
1872
|
blockProps: o,
|
|
1874
1873
|
styles: t,
|
|
@@ -1891,27 +1890,27 @@ const $ = (e, ...o) => ({
|
|
|
1891
1890
|
{ ...o, ...t },
|
|
1892
1891
|
/* @__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" })
|
|
1893
1892
|
) : y.createElement(n, { ...o, ...t }, e);
|
|
1894
|
-
},
|
|
1893
|
+
}, Nt = {
|
|
1895
1894
|
type: "RepeaterItem",
|
|
1896
1895
|
label: "Repeater Item",
|
|
1897
|
-
icon:
|
|
1896
|
+
icon: z,
|
|
1898
1897
|
hidden: !0,
|
|
1899
1898
|
group: "basic",
|
|
1900
1899
|
...d({
|
|
1901
1900
|
properties: {
|
|
1902
1901
|
styles: S(""),
|
|
1903
|
-
parentTag:
|
|
1902
|
+
parentTag: V("Repeater", "tag")
|
|
1904
1903
|
}
|
|
1905
1904
|
}),
|
|
1906
1905
|
canAcceptBlock: (e) => e !== "RepeaterItem",
|
|
1907
1906
|
canDelete: () => !1,
|
|
1908
1907
|
canMove: () => !1,
|
|
1909
1908
|
canDuplicate: () => !1
|
|
1910
|
-
},
|
|
1909
|
+
}, Rt = ({
|
|
1911
1910
|
children: e,
|
|
1912
1911
|
blockProps: o,
|
|
1913
1912
|
styles: t
|
|
1914
|
-
}) => y.createElement("div", { ...o, ...t }, e),
|
|
1913
|
+
}) => y.createElement("div", { ...o, ...t }, e), At = {
|
|
1915
1914
|
type: "RepeaterEmptyState",
|
|
1916
1915
|
label: "Empty State",
|
|
1917
1916
|
hidden: !0,
|
|
@@ -1923,9 +1922,9 @@ const $ = (e, ...o) => ({
|
|
|
1923
1922
|
canDelete: () => !1,
|
|
1924
1923
|
canMove: () => !1,
|
|
1925
1924
|
canDuplicate: () => !1
|
|
1926
|
-
},
|
|
1927
|
-
p(
|
|
1925
|
+
}, Vt = () => {
|
|
1926
|
+
p(ue, me), p(Ce, ve), p(ye, ge), p(Ue, qe), p(ct, pt), p(kt, xt), p(ft, ht), p(lt, rt), p(nt, at), p(it, st), p(Xe, Ke), p(tt, ot), p(Pt, Bt), p(be, fe), p(he, ke), p(wt, Ct), p(Pe, Be), p(Se, _e), p(Ne, Re), p(Ie, Le), p(Ee, He), p($e, ze), p(De, Ve), p(Ae, Me), p(Ze, Ge), p(xe, we), p(je, Fe), p(dt, ut), p(gt, bt), p(mt, yt), p(St, _t), p(Tt, Nt), p(Rt, At);
|
|
1928
1927
|
};
|
|
1929
1928
|
export {
|
|
1930
|
-
|
|
1929
|
+
Vt as loadWebBlocks
|
|
1931
1930
|
};
|