@chaibuilder/sdk 2.6.0 → 2.6.2
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 +1 -0
- package/dist/code-editor-RwOkFe_0.js +58 -0
- package/dist/core.cjs +3 -3
- package/dist/core.js +721 -722
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +153 -197
- package/package.json +1 -2
- package/dist/code-editor-CAnkmeVK.js +0 -72
- package/dist/code-editor-D5TOcelm.cjs +0 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { registerChaiBlockSchema as d, StylesProp as u, registerChaiBlock as p, stylesProp as _, closestBlockProp as
|
|
2
|
-
import { jsx as i, jsxs as
|
|
1
|
+
import { registerChaiBlockSchema as d, StylesProp as u, registerChaiBlock as p, stylesProp as _, closestBlockProp as z } from "@chaibuilder/runtime";
|
|
2
|
+
import { jsx as i, jsxs as b, Fragment as D } from "react/jsx-runtime";
|
|
3
3
|
import { c as P, 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
|
|
7
|
-
import { isEmpty as C, get as h, map as T, isNull as
|
|
8
|
-
import { FileCode as
|
|
9
|
-
const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div", { className: P("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,
|
|
6
|
+
import { ButtonIcon as A, CodeIcon as V, DividerHorizontalIcon as j, CheckboxIcon as F, InputIcon as M, LetterCaseToggleIcon as U, RadiobuttonIcon as q, DropdownMenuIcon as G, HeadingIcon as Z, TableIcon as O, BorderTopIcon as Y, BorderAllIcon as W, ViewHorizontalIcon as Q, DragHandleHorizontalIcon as J, SketchLogoIcon as X, ImageIcon as K, Link1Icon as ee, RowsIcon as te, ColumnsIcon as oe, TextIcon as le, CursorTextIcon as re, SpaceBetweenVerticallyIcon as ne, VideoIcon as ae, LoopIcon as E } from "@radix-ui/react-icons";
|
|
7
|
+
import { isEmpty as C, get as h, map as T, isNull as ie, omit as se, pick as ce } from "lodash-es";
|
|
8
|
+
import { FileCode as pe, GroupIcon as de, GlobeIcon as H, Columns as ue, Rows as me } from "lucide-react";
|
|
9
|
+
const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div", { className: P("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, ye = (e) => {
|
|
10
10
|
const { blockProps: o, inBuilder: t, backgroundImage: l, children: r, tag: n = "div", styles: a } = e;
|
|
11
11
|
let s = r;
|
|
12
12
|
r || (s = /* @__PURE__ */ i(v, { inBuilder: t }));
|
|
13
13
|
let c = {};
|
|
14
14
|
return l && (c = { backgroundImage: `url(${l})` }), y.createElement(n, { ...o, ...a, style: c }, s);
|
|
15
|
-
},
|
|
15
|
+
}, ge = {
|
|
16
16
|
type: "Box",
|
|
17
17
|
description: "Similar to a div or section elements in HTML",
|
|
18
18
|
label: "Box",
|
|
@@ -55,7 +55,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
55
55
|
}),
|
|
56
56
|
canAcceptBlock: () => !0
|
|
57
57
|
}, fe = (e) => {
|
|
58
|
-
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: a, iconPos: s, link: c, inBuilder: m } = e, k = l, g = a || /* @__PURE__ */
|
|
58
|
+
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: a, iconPos: s, link: c, inBuilder: m } = e, k = l, g = a || /* @__PURE__ */ b(D, { children: [
|
|
59
59
|
r && /* @__PURE__ */ i("span", { "data-ai-key": "content", children: r }),
|
|
60
60
|
k && /* @__PURE__ */ i(
|
|
61
61
|
"div",
|
|
@@ -76,12 +76,12 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
76
76
|
g
|
|
77
77
|
);
|
|
78
78
|
return C(h(c, "href")) ? x : m ? /* @__PURE__ */ i("span", { children: x }) : /* @__PURE__ */ i("a", { "aria-label": r, href: h(c, "href") || "/", target: h(c, "target", "_self"), children: x });
|
|
79
|
-
},
|
|
79
|
+
}, be = {
|
|
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,54 +133,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
133
133
|
}),
|
|
134
134
|
i18nProps: ["content"],
|
|
135
135
|
aiProps: ["content"]
|
|
136
|
-
},
|
|
137
|
-
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n } = e, a = l, s = /* @__PURE__ */ f(A, { children: [
|
|
138
|
-
/* @__PURE__ */ i("span", { "data-ai-key": "content", children: r }),
|
|
139
|
-
a && /* @__PURE__ */ i("div", { style: { width: t + "px" }, dangerouslySetInnerHTML: { __html: a } })
|
|
140
|
-
] });
|
|
141
|
-
return w(
|
|
142
|
-
"button",
|
|
143
|
-
{
|
|
144
|
-
...o,
|
|
145
|
-
...n,
|
|
146
|
-
type: "button",
|
|
147
|
-
"aria-label": r
|
|
148
|
-
},
|
|
149
|
-
s
|
|
150
|
-
);
|
|
151
|
-
}, xe = {
|
|
152
|
-
type: "CopyButton",
|
|
153
|
-
description: "A copy button component",
|
|
154
|
-
label: "Copy Button",
|
|
155
|
-
category: "core",
|
|
156
|
-
icon: V,
|
|
157
|
-
group: "basic",
|
|
158
|
-
...d({
|
|
159
|
-
properties: {
|
|
160
|
-
styles: u("p-2 rounded-md flex items-center"),
|
|
161
|
-
content: {
|
|
162
|
-
type: "string",
|
|
163
|
-
title: "Button label",
|
|
164
|
-
default: "Button"
|
|
165
|
-
},
|
|
166
|
-
icon: {
|
|
167
|
-
type: "string",
|
|
168
|
-
title: "Icon",
|
|
169
|
-
default: "<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-copy'><path d='M8 17L19 8M8 17V7a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v10'/></svg>",
|
|
170
|
-
ui: { "ui:widget": "icon" }
|
|
171
|
-
},
|
|
172
|
-
iconSize: {
|
|
173
|
-
type: "number",
|
|
174
|
-
title: "Icon size",
|
|
175
|
-
default: 20
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}),
|
|
179
|
-
i18nProps: ["content"],
|
|
180
|
-
aiProps: ["content"]
|
|
181
|
-
}, we = (e) => {
|
|
136
|
+
}, he = (e) => {
|
|
182
137
|
const { blockProps: o, styles: t, htmlCode: l, inBuilder: r } = e;
|
|
183
|
-
return r ? /* @__PURE__ */
|
|
138
|
+
return r ? /* @__PURE__ */ b("div", { className: "relative", children: [
|
|
184
139
|
r ? /* @__PURE__ */ i("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
185
140
|
y.createElement("div", {
|
|
186
141
|
...t,
|
|
@@ -191,12 +146,12 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
191
146
|
...t,
|
|
192
147
|
dangerouslySetInnerHTML: { __html: l }
|
|
193
148
|
});
|
|
194
|
-
},
|
|
149
|
+
}, ke = {
|
|
195
150
|
type: "CustomHTML",
|
|
196
151
|
description: "similar to a div or section elements in HTML",
|
|
197
152
|
label: "Custom HTML",
|
|
198
153
|
category: "core",
|
|
199
|
-
icon:
|
|
154
|
+
icon: V,
|
|
200
155
|
group: "advanced",
|
|
201
156
|
...d({
|
|
202
157
|
properties: {
|
|
@@ -209,15 +164,15 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
209
164
|
}
|
|
210
165
|
}),
|
|
211
166
|
i18nProps: ["htmlCode"]
|
|
212
|
-
},
|
|
167
|
+
}, xe = (e) => {
|
|
213
168
|
const { scripts: o, inBuilder: t, blockProps: l } = e;
|
|
214
169
|
return t ? /* @__PURE__ */ i("div", { ...l, children: /* @__PURE__ */ i("div", { className: P("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: o } });
|
|
215
|
-
},
|
|
170
|
+
}, we = {
|
|
216
171
|
type: "CustomScript",
|
|
217
172
|
description: "similar to a script element in HTML",
|
|
218
173
|
label: "Custom Script",
|
|
219
174
|
category: "core",
|
|
220
|
-
icon:
|
|
175
|
+
icon: pe,
|
|
221
176
|
group: "advanced",
|
|
222
177
|
...d({
|
|
223
178
|
properties: {
|
|
@@ -229,27 +184,28 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
229
184
|
placeholder: "<script>console.log('Hello, world!');<\/script>"
|
|
230
185
|
}
|
|
231
186
|
}
|
|
232
|
-
})
|
|
233
|
-
|
|
187
|
+
}),
|
|
188
|
+
hidden: !0
|
|
189
|
+
}, Ce = (e) => {
|
|
234
190
|
const { blockProps: o, styles: t } = e;
|
|
235
191
|
return w("hr", { ...t, ...o });
|
|
236
|
-
},
|
|
192
|
+
}, ve = {
|
|
237
193
|
type: "Divider",
|
|
238
194
|
description: "A horizontal line component",
|
|
239
195
|
label: "Divider",
|
|
240
196
|
category: "core",
|
|
241
|
-
icon:
|
|
197
|
+
icon: j,
|
|
242
198
|
group: "basic",
|
|
243
199
|
...d({
|
|
244
200
|
properties: {
|
|
245
201
|
styles: u("bg-gray-900 h-0.5 py-2 my-1")
|
|
246
202
|
}
|
|
247
203
|
})
|
|
248
|
-
},
|
|
204
|
+
}, Ie = (e) => {
|
|
249
205
|
const { blockProps: o, styles: t, backgroundImage: l } = e;
|
|
250
206
|
let r = {};
|
|
251
207
|
return l && (r = { backgroundImage: `url(${l})` }), y.createElement("div", { ...o, ...t, style: r });
|
|
252
|
-
},
|
|
208
|
+
}, Le = {
|
|
253
209
|
type: "EmptyBox",
|
|
254
210
|
description: "A box component with no children",
|
|
255
211
|
label: "Empty Box",
|
|
@@ -266,9 +222,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
266
222
|
}
|
|
267
223
|
}
|
|
268
224
|
})
|
|
269
|
-
},
|
|
225
|
+
}, Pe = (e) => {
|
|
270
226
|
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: a, checked: s, showLabel: c = !0 } = e;
|
|
271
|
-
return c ? /* @__PURE__ */
|
|
227
|
+
return c ? /* @__PURE__ */ b("div", { ...r, ...o, children: [
|
|
272
228
|
/* @__PURE__ */ i("input", { ...n, name: t, type: "checkbox", required: a, defaultChecked: s }),
|
|
273
229
|
l && /* @__PURE__ */ i("label", { htmlFor: t, children: l })
|
|
274
230
|
] }) : /* @__PURE__ */ i(
|
|
@@ -283,11 +239,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
283
239
|
defaultChecked: s
|
|
284
240
|
}
|
|
285
241
|
);
|
|
286
|
-
},
|
|
242
|
+
}, Be = {
|
|
287
243
|
type: "Checkbox",
|
|
288
244
|
label: "web_blocks.checkbox",
|
|
289
245
|
category: "core",
|
|
290
|
-
icon:
|
|
246
|
+
icon: F,
|
|
291
247
|
group: "form",
|
|
292
248
|
...d({
|
|
293
249
|
properties: {
|
|
@@ -322,10 +278,10 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
322
278
|
}),
|
|
323
279
|
aiProps: ["label"],
|
|
324
280
|
i18nProps: ["label"]
|
|
325
|
-
},
|
|
281
|
+
}, Se = (e) => {
|
|
326
282
|
const { children: o, blockProps: t, errorMessage: l, successMessage: r, action: n, styles: a, inBuilder: s } = e;
|
|
327
283
|
let c = o;
|
|
328
|
-
return o || (c = /* @__PURE__ */ i(v, { inBuilder: s })), /* @__PURE__ */
|
|
284
|
+
return o || (c = /* @__PURE__ */ i(v, { inBuilder: s })), /* @__PURE__ */ b(
|
|
329
285
|
"form",
|
|
330
286
|
{
|
|
331
287
|
...{
|
|
@@ -347,11 +303,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
347
303
|
]
|
|
348
304
|
}
|
|
349
305
|
);
|
|
350
|
-
},
|
|
306
|
+
}, _e = {
|
|
351
307
|
type: "Form",
|
|
352
308
|
label: "Form",
|
|
353
309
|
category: "core",
|
|
354
|
-
icon:
|
|
310
|
+
icon: de,
|
|
355
311
|
group: "form",
|
|
356
312
|
blocks: () => [
|
|
357
313
|
{ _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
|
|
@@ -388,9 +344,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
388
344
|
i18nProps: ["errorMessage", "successMessage"],
|
|
389
345
|
aiProps: ["errorMessage", "successMessage"],
|
|
390
346
|
canAcceptBlock: () => !0
|
|
391
|
-
},
|
|
347
|
+
}, Te = (e) => {
|
|
392
348
|
const { blockProps: o, inBuilder: t, label: l, styles: r, icon: n, iconSize: a, iconPos: s } = e;
|
|
393
|
-
return /* @__PURE__ */
|
|
349
|
+
return /* @__PURE__ */ b("button", { ...r, ...o || {}, type: t ? "button" : "submit", "aria-label": l, children: [
|
|
394
350
|
l,
|
|
395
351
|
n && /* @__PURE__ */ i(
|
|
396
352
|
"div",
|
|
@@ -401,11 +357,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
401
357
|
}
|
|
402
358
|
)
|
|
403
359
|
] });
|
|
404
|
-
},
|
|
360
|
+
}, Ne = {
|
|
405
361
|
type: "FormButton",
|
|
406
362
|
label: "Submit Button",
|
|
407
363
|
category: "core",
|
|
408
|
-
icon:
|
|
364
|
+
icon: A,
|
|
409
365
|
group: "form",
|
|
410
366
|
...d({
|
|
411
367
|
properties: {
|
|
@@ -440,7 +396,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
440
396
|
}),
|
|
441
397
|
i18nProps: ["label"],
|
|
442
398
|
aiProps: ["label"]
|
|
443
|
-
},
|
|
399
|
+
}, Re = (e) => {
|
|
444
400
|
const o = { type: "text", autocomplete: "on" };
|
|
445
401
|
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" } : {
|
|
446
402
|
// Special cases
|
|
@@ -508,7 +464,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
508
464
|
organization: { type: "text", autocomplete: "organization" },
|
|
509
465
|
language: { type: "text", autocomplete: "language" }
|
|
510
466
|
}[e] || o : o;
|
|
511
|
-
},
|
|
467
|
+
}, Ae = (e) => {
|
|
512
468
|
const {
|
|
513
469
|
blockProps: o,
|
|
514
470
|
fieldName: t,
|
|
@@ -520,8 +476,8 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
520
476
|
required: c,
|
|
521
477
|
inputType: m,
|
|
522
478
|
defaultValue: k
|
|
523
|
-
} = e, { type: g, autocomplete: x } =
|
|
524
|
-
return s ? /* @__PURE__ */
|
|
479
|
+
} = e, { type: g, autocomplete: x } = Re(m);
|
|
480
|
+
return s ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
|
|
525
481
|
s && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
|
|
526
482
|
/* @__PURE__ */ i(
|
|
527
483
|
"input",
|
|
@@ -549,11 +505,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
549
505
|
defaultValue: k
|
|
550
506
|
}
|
|
551
507
|
);
|
|
552
|
-
},
|
|
508
|
+
}, Me = {
|
|
553
509
|
type: "Input",
|
|
554
510
|
label: "web_blocks.input",
|
|
555
511
|
category: "core",
|
|
556
|
-
icon:
|
|
512
|
+
icon: M,
|
|
557
513
|
group: "form",
|
|
558
514
|
...d({
|
|
559
515
|
properties: {
|
|
@@ -664,17 +620,17 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
664
620
|
}),
|
|
665
621
|
aiProps: ["label", "placeholder"],
|
|
666
622
|
i18nProps: ["label", "placeholder"]
|
|
667
|
-
},
|
|
623
|
+
}, Ee = (e) => {
|
|
668
624
|
const { blockProps: o, content: t, styles: l, children: r } = e, n = { ...l, ...o };
|
|
669
625
|
return r ? y.createElement("label", n, r) : y.createElement("label", {
|
|
670
626
|
...n,
|
|
671
627
|
dangerouslySetInnerHTML: { __html: t }
|
|
672
628
|
});
|
|
673
|
-
},
|
|
629
|
+
}, He = {
|
|
674
630
|
type: "Label",
|
|
675
631
|
label: "Label",
|
|
676
632
|
category: "core",
|
|
677
|
-
icon:
|
|
633
|
+
icon: U,
|
|
678
634
|
group: "form",
|
|
679
635
|
...d({
|
|
680
636
|
properties: {
|
|
@@ -688,9 +644,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
688
644
|
}),
|
|
689
645
|
aiProps: ["content"],
|
|
690
646
|
i18nProps: ["content"]
|
|
691
|
-
},
|
|
647
|
+
}, $e = (e) => {
|
|
692
648
|
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: a, checked: s, showLabel: c = !0 } = e;
|
|
693
|
-
return c ? /* @__PURE__ */
|
|
649
|
+
return c ? /* @__PURE__ */ b("div", { ...r, ...o, children: [
|
|
694
650
|
/* @__PURE__ */ i("input", { ...n, name: t, type: "radio", required: a, defaultChecked: s }),
|
|
695
651
|
l && /* @__PURE__ */ i("label", { htmlFor: t, children: l })
|
|
696
652
|
] }) : /* @__PURE__ */ i(
|
|
@@ -705,11 +661,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
705
661
|
checked: s
|
|
706
662
|
}
|
|
707
663
|
);
|
|
708
|
-
},
|
|
664
|
+
}, ze = {
|
|
709
665
|
type: "Radio",
|
|
710
666
|
label: "web_blocks.radio",
|
|
711
667
|
category: "core",
|
|
712
|
-
icon:
|
|
668
|
+
icon: q,
|
|
713
669
|
group: "form",
|
|
714
670
|
...d({
|
|
715
671
|
properties: {
|
|
@@ -744,7 +700,7 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
744
700
|
}),
|
|
745
701
|
aiProps: ["label"],
|
|
746
702
|
i18nProps: ["label"]
|
|
747
|
-
},
|
|
703
|
+
}, De = (e) => {
|
|
748
704
|
const {
|
|
749
705
|
blockProps: o,
|
|
750
706
|
fieldName: t,
|
|
@@ -757,10 +713,10 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
757
713
|
_multiple: m,
|
|
758
714
|
options: k,
|
|
759
715
|
defaultValue: g
|
|
760
|
-
} = e, x = m && g ? g.split(",").map((
|
|
761
|
-
return c ? /* @__PURE__ */
|
|
716
|
+
} = e, x = m && g ? g.split(",").map((f) => f.trim()) : g || "";
|
|
717
|
+
return c ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
|
|
762
718
|
c && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
|
|
763
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ b(
|
|
764
720
|
"select",
|
|
765
721
|
{
|
|
766
722
|
...a,
|
|
@@ -770,11 +726,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
770
726
|
defaultValue: x,
|
|
771
727
|
children: [
|
|
772
728
|
/* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
773
|
-
T(k, (
|
|
729
|
+
T(k, (f) => /* @__PURE__ */ i("option", { value: f == null ? void 0 : f.value, children: f == null ? void 0 : f.label }, f == null ? void 0 : f.value))
|
|
774
730
|
]
|
|
775
731
|
}
|
|
776
732
|
)
|
|
777
|
-
] }) : /* @__PURE__ */
|
|
733
|
+
] }) : /* @__PURE__ */ b(
|
|
778
734
|
"select",
|
|
779
735
|
{
|
|
780
736
|
...n,
|
|
@@ -785,15 +741,15 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
785
741
|
defaultValue: x,
|
|
786
742
|
children: [
|
|
787
743
|
/* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
788
|
-
T(k, (
|
|
744
|
+
T(k, (f) => /* @__PURE__ */ i("option", { value: f == null ? void 0 : f.value, children: f == null ? void 0 : f.label }, f == null ? void 0 : f.value))
|
|
789
745
|
]
|
|
790
746
|
}
|
|
791
747
|
);
|
|
792
|
-
},
|
|
748
|
+
}, Ve = {
|
|
793
749
|
type: "Select",
|
|
794
750
|
label: "web_blocks.select",
|
|
795
751
|
category: "core",
|
|
796
|
-
icon:
|
|
752
|
+
icon: G,
|
|
797
753
|
group: "form",
|
|
798
754
|
...d({
|
|
799
755
|
properties: {
|
|
@@ -858,9 +814,9 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
858
814
|
}),
|
|
859
815
|
aiProps: ["label", "placeholder"],
|
|
860
816
|
i18nProps: ["label", "placeholder"]
|
|
861
|
-
},
|
|
817
|
+
}, je = (e) => {
|
|
862
818
|
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: a, rows: s, showLabel: c, required: m, defaultValue: k } = e;
|
|
863
|
-
return c ? /* @__PURE__ */
|
|
819
|
+
return c ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
|
|
864
820
|
c && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
|
|
865
821
|
/* @__PURE__ */ i(
|
|
866
822
|
"textarea",
|
|
@@ -886,11 +842,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
886
842
|
defaultValue: k
|
|
887
843
|
}
|
|
888
844
|
);
|
|
889
|
-
},
|
|
845
|
+
}, Fe = {
|
|
890
846
|
type: "TextArea",
|
|
891
847
|
label: "web_blocks.textarea",
|
|
892
848
|
category: "core",
|
|
893
|
-
icon:
|
|
849
|
+
icon: M,
|
|
894
850
|
group: "form",
|
|
895
851
|
...d({
|
|
896
852
|
properties: {
|
|
@@ -937,15 +893,15 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
937
893
|
}),
|
|
938
894
|
aiProps: ["label", "placeholder"],
|
|
939
895
|
i18nProps: ["label", "placeholder"]
|
|
940
|
-
},
|
|
896
|
+
}, Ue = (e) => {
|
|
941
897
|
const { blockProps: o, inBuilder: t, children: l, globalBlock: r } = e;
|
|
942
|
-
return t && !r ? /* @__PURE__ */
|
|
898
|
+
return t && !r ? /* @__PURE__ */ b(
|
|
943
899
|
"div",
|
|
944
900
|
{
|
|
945
901
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
946
902
|
...o,
|
|
947
903
|
children: [
|
|
948
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ b("h1", { children: [
|
|
949
905
|
"Global Block - ",
|
|
950
906
|
r
|
|
951
907
|
] }),
|
|
@@ -953,11 +909,11 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
953
909
|
]
|
|
954
910
|
}
|
|
955
911
|
) : y.createElement("span", { ...o }, l);
|
|
956
|
-
},
|
|
912
|
+
}, qe = {
|
|
957
913
|
type: "GlobalBlock",
|
|
958
914
|
description: "A global block component",
|
|
959
915
|
label: "Global Block",
|
|
960
|
-
icon:
|
|
916
|
+
icon: H,
|
|
961
917
|
category: "core",
|
|
962
918
|
group: "basic",
|
|
963
919
|
hidden: !0,
|
|
@@ -971,19 +927,19 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
971
927
|
}
|
|
972
928
|
}
|
|
973
929
|
})
|
|
974
|
-
},
|
|
930
|
+
}, Ge = (e) => {
|
|
975
931
|
const { blockProps: o, styles: t, content: l, tag: r = "h1", children: n = null } = e;
|
|
976
932
|
return n ? y.createElement(r, { ...t, ...o }, n) : y.createElement(r, {
|
|
977
933
|
...t,
|
|
978
934
|
...o,
|
|
979
935
|
dangerouslySetInnerHTML: { __html: l }
|
|
980
936
|
});
|
|
981
|
-
},
|
|
937
|
+
}, Ze = {
|
|
982
938
|
type: "Heading",
|
|
983
939
|
description: "A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",
|
|
984
940
|
label: "Heading",
|
|
985
941
|
category: "core",
|
|
986
|
-
icon:
|
|
942
|
+
icon: Z,
|
|
987
943
|
group: "typography",
|
|
988
944
|
...d({
|
|
989
945
|
properties: {
|
|
@@ -1005,10 +961,10 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
1005
961
|
aiProps: ["content"],
|
|
1006
962
|
i18nProps: ["content"],
|
|
1007
963
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
1008
|
-
},
|
|
964
|
+
}, Oe = (e) => {
|
|
1009
965
|
const { blockProps: o, styles: t } = e;
|
|
1010
966
|
return w("br", { ...o, ...t });
|
|
1011
|
-
},
|
|
967
|
+
}, Ye = {
|
|
1012
968
|
type: "LineBreak",
|
|
1013
969
|
label: "Line Break",
|
|
1014
970
|
category: "core",
|
|
@@ -1023,19 +979,19 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
1023
979
|
canDelete: () => !1,
|
|
1024
980
|
canMove: () => !1,
|
|
1025
981
|
canDuplicate: () => !1
|
|
1026
|
-
},
|
|
982
|
+
}, We = (e) => {
|
|
1027
983
|
const { blockProps: o, children: t, styles: l } = e;
|
|
1028
984
|
return t ? w("table", { ...o, ...l }, t) : /* @__PURE__ */ i(v, {});
|
|
1029
|
-
},
|
|
985
|
+
}, Qe = (e) => {
|
|
1030
986
|
const { blockProps: o, children: t, styles: l } = e;
|
|
1031
987
|
return t ? w("thead", { ...o, ...l }, t) : /* @__PURE__ */ i(v, {});
|
|
1032
|
-
},
|
|
988
|
+
}, Je = (e) => {
|
|
1033
989
|
const { blockProps: o, children: t, styles: l } = e;
|
|
1034
990
|
return t ? w("tbody", { ...o, ...l }, t) : /* @__PURE__ */ i(v, {});
|
|
1035
|
-
},
|
|
991
|
+
}, Xe = (e) => {
|
|
1036
992
|
const { blockProps: o, children: t, styles: l } = e;
|
|
1037
993
|
return t ? w("tr", { ...o, ...l }, t) : /* @__PURE__ */ i(v, {});
|
|
1038
|
-
},
|
|
994
|
+
}, Ke = (e) => {
|
|
1039
995
|
const { blockProps: o, children: t, content: l, styles: r } = e;
|
|
1040
996
|
return !t && C(l) ? /* @__PURE__ */ i(v, {}) : t ? w("td", { ...o, ...r }, t) : w("td", {
|
|
1041
997
|
...o,
|
|
@@ -1043,13 +999,13 @@ const v = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
1043
999
|
dangerouslySetInnerHTML: { __html: l }
|
|
1044
1000
|
});
|
|
1045
1001
|
};
|
|
1046
|
-
p(
|
|
1002
|
+
p(We, {
|
|
1047
1003
|
type: "Table",
|
|
1048
1004
|
label: "Table",
|
|
1049
1005
|
category: "core",
|
|
1050
1006
|
group: "table",
|
|
1051
1007
|
hidden: !0,
|
|
1052
|
-
icon:
|
|
1008
|
+
icon: O,
|
|
1053
1009
|
...d({
|
|
1054
1010
|
properties: {
|
|
1055
1011
|
styles: u("")
|
|
@@ -1057,13 +1013,13 @@ p(Xe, {
|
|
|
1057
1013
|
}),
|
|
1058
1014
|
blocks: L("Table")
|
|
1059
1015
|
});
|
|
1060
|
-
p(
|
|
1016
|
+
p(Qe, {
|
|
1061
1017
|
type: "TableHead",
|
|
1062
1018
|
label: "Table Head",
|
|
1063
1019
|
category: "core",
|
|
1064
1020
|
group: "table",
|
|
1065
1021
|
hidden: !0,
|
|
1066
|
-
icon:
|
|
1022
|
+
icon: Y,
|
|
1067
1023
|
...d({
|
|
1068
1024
|
properties: {
|
|
1069
1025
|
styles: u("")
|
|
@@ -1071,13 +1027,13 @@ p(Ke, {
|
|
|
1071
1027
|
}),
|
|
1072
1028
|
blocks: L("TableHead")
|
|
1073
1029
|
});
|
|
1074
|
-
p(
|
|
1030
|
+
p(Je, {
|
|
1075
1031
|
type: "TableBody",
|
|
1076
1032
|
label: "Table Body",
|
|
1077
1033
|
category: "core",
|
|
1078
1034
|
group: "table",
|
|
1079
1035
|
hidden: !0,
|
|
1080
|
-
icon:
|
|
1036
|
+
icon: W,
|
|
1081
1037
|
...d({
|
|
1082
1038
|
properties: {
|
|
1083
1039
|
styles: u("")
|
|
@@ -1085,13 +1041,13 @@ p(et, {
|
|
|
1085
1041
|
}),
|
|
1086
1042
|
blocks: L("TableBody")
|
|
1087
1043
|
});
|
|
1088
|
-
p(
|
|
1044
|
+
p(Xe, {
|
|
1089
1045
|
type: "TableRow",
|
|
1090
1046
|
label: "Table Row",
|
|
1091
1047
|
category: "core",
|
|
1092
1048
|
group: "table",
|
|
1093
1049
|
hidden: !0,
|
|
1094
|
-
icon:
|
|
1050
|
+
icon: Q,
|
|
1095
1051
|
...d({
|
|
1096
1052
|
properties: {
|
|
1097
1053
|
styles: u("")
|
|
@@ -1099,13 +1055,13 @@ p(tt, {
|
|
|
1099
1055
|
}),
|
|
1100
1056
|
blocks: L("TableRow")
|
|
1101
1057
|
});
|
|
1102
|
-
p(
|
|
1058
|
+
p(Ke, {
|
|
1103
1059
|
type: "TableCell",
|
|
1104
1060
|
label: "Table Cell",
|
|
1105
1061
|
category: "core",
|
|
1106
1062
|
group: "table",
|
|
1107
1063
|
hidden: !0,
|
|
1108
|
-
icon:
|
|
1064
|
+
icon: J,
|
|
1109
1065
|
...d({
|
|
1110
1066
|
properties: {
|
|
1111
1067
|
styles: u(""),
|
|
@@ -1164,11 +1120,11 @@ function L(e) {
|
|
|
1164
1120
|
}
|
|
1165
1121
|
return e === "TableRow" ? t() : e === "TableHead" ? l() : e === "TableBody" ? r() : [];
|
|
1166
1122
|
}
|
|
1167
|
-
const
|
|
1123
|
+
const $ = (e, ...o) => ({
|
|
1168
1124
|
...e,
|
|
1169
1125
|
className: P(e.className, ...o)
|
|
1170
|
-
}),
|
|
1171
|
-
const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: a } = e, s =
|
|
1126
|
+
}), et = (e) => {
|
|
1127
|
+
const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: a } = e, s = $(l, "");
|
|
1172
1128
|
if (C(t))
|
|
1173
1129
|
return /* @__PURE__ */ i(v, { inBuilder: n, className: "h-8 w-14" });
|
|
1174
1130
|
const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
@@ -1181,11 +1137,11 @@ const z = (e, ...o) => ({
|
|
|
1181
1137
|
},
|
|
1182
1138
|
dangerouslySetInnerHTML: { __html: c }
|
|
1183
1139
|
});
|
|
1184
|
-
},
|
|
1140
|
+
}, tt = {
|
|
1185
1141
|
type: "Icon",
|
|
1186
1142
|
label: "web_blocks.icon",
|
|
1187
1143
|
category: "core",
|
|
1188
|
-
icon:
|
|
1144
|
+
icon: X,
|
|
1189
1145
|
group: "media",
|
|
1190
1146
|
...d({
|
|
1191
1147
|
properties: {
|
|
@@ -1208,9 +1164,9 @@ const z = (e, ...o) => ({
|
|
|
1208
1164
|
}
|
|
1209
1165
|
}
|
|
1210
1166
|
})
|
|
1211
|
-
},
|
|
1167
|
+
}, ot = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==", lt = (e) => {
|
|
1212
1168
|
const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height: a, width: s, lazyLoading: c } = e;
|
|
1213
|
-
return C(t) ? /* @__PURE__ */ i(v, { className: "h-36" }) : /* @__PURE__ */
|
|
1169
|
+
return C(t) ? /* @__PURE__ */ i(v, { className: "h-36" }) : /* @__PURE__ */ b("picture", { children: [
|
|
1214
1170
|
l && /* @__PURE__ */ i("source", { srcSet: l, media: "(max-width: 480px)" }),
|
|
1215
1171
|
/* @__PURE__ */ i(
|
|
1216
1172
|
"img",
|
|
@@ -1225,12 +1181,12 @@ const z = (e, ...o) => ({
|
|
|
1225
1181
|
}
|
|
1226
1182
|
)
|
|
1227
1183
|
] });
|
|
1228
|
-
},
|
|
1184
|
+
}, rt = {
|
|
1229
1185
|
type: "Image",
|
|
1230
1186
|
description: "A image component",
|
|
1231
1187
|
label: "Image",
|
|
1232
1188
|
category: "core",
|
|
1233
|
-
icon:
|
|
1189
|
+
icon: K,
|
|
1234
1190
|
group: "media",
|
|
1235
1191
|
...d({
|
|
1236
1192
|
properties: {
|
|
@@ -1238,7 +1194,7 @@ const z = (e, ...o) => ({
|
|
|
1238
1194
|
image: {
|
|
1239
1195
|
type: "string",
|
|
1240
1196
|
title: "Image",
|
|
1241
|
-
default:
|
|
1197
|
+
default: ot,
|
|
1242
1198
|
ui: { "ui:widget": "image" }
|
|
1243
1199
|
},
|
|
1244
1200
|
alt: {
|
|
@@ -1274,7 +1230,7 @@ const z = (e, ...o) => ({
|
|
|
1274
1230
|
}),
|
|
1275
1231
|
aiProps: ["alt"],
|
|
1276
1232
|
i18nProps: ["alt", "image", "_imageId", "mobileImage", "_mobileImageId"]
|
|
1277
|
-
},
|
|
1233
|
+
}, nt = (e) => {
|
|
1278
1234
|
const { blockProps: o, link: t, children: l, styles: r, inBuilder: n, content: a } = e;
|
|
1279
1235
|
let s = {};
|
|
1280
1236
|
return !l && C(a) && (s = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? l ? /* @__PURE__ */ i("span", { role: "link", ...o, style: s, ...r, children: l }) : w(
|
|
@@ -1297,12 +1253,12 @@ const z = (e, ...o) => ({
|
|
|
1297
1253
|
},
|
|
1298
1254
|
a
|
|
1299
1255
|
);
|
|
1300
|
-
},
|
|
1256
|
+
}, at = {
|
|
1301
1257
|
type: "Link",
|
|
1302
1258
|
description: "A link component",
|
|
1303
1259
|
label: "Link",
|
|
1304
1260
|
category: "core",
|
|
1305
|
-
icon:
|
|
1261
|
+
icon: ee,
|
|
1306
1262
|
group: "basic",
|
|
1307
1263
|
...d({
|
|
1308
1264
|
properties: {
|
|
@@ -1338,18 +1294,18 @@ const z = (e, ...o) => ({
|
|
|
1338
1294
|
aiProps: ["content"],
|
|
1339
1295
|
i18nProps: ["content"],
|
|
1340
1296
|
canAcceptBlock: (e) => e !== "Link"
|
|
1341
|
-
},
|
|
1297
|
+
}, it = (e) => {
|
|
1342
1298
|
const { blockProps: o, children: t, listType: l, styles: r, tag: n, inBuilder: a } = e, s = P(h(r, "className", ""), l);
|
|
1343
1299
|
return !t && C(r == null ? void 0 : r.className) ? /* @__PURE__ */ i(v, { inBuilder: a }) : y.createElement(
|
|
1344
1300
|
n || (l === "list-decimal" ? "ol" : "ul"),
|
|
1345
1301
|
{ ...o, ...r, className: s },
|
|
1346
1302
|
t
|
|
1347
1303
|
);
|
|
1348
|
-
},
|
|
1304
|
+
}, st = {
|
|
1349
1305
|
type: "List",
|
|
1350
1306
|
description: "A list component",
|
|
1351
1307
|
label: "List",
|
|
1352
|
-
icon:
|
|
1308
|
+
icon: te,
|
|
1353
1309
|
category: "core",
|
|
1354
1310
|
group: "basic",
|
|
1355
1311
|
...d({
|
|
@@ -1392,18 +1348,18 @@ const z = (e, ...o) => ({
|
|
|
1392
1348
|
content: "Item 3"
|
|
1393
1349
|
}
|
|
1394
1350
|
]
|
|
1395
|
-
},
|
|
1351
|
+
}, ct = (e) => {
|
|
1396
1352
|
const { blockProps: o, content: t, styles: l, children: r, tag: n } = e;
|
|
1397
1353
|
return r ? y.createElement(n || "li", { ...l, ...o }, r) : y.createElement(n || "li", {
|
|
1398
1354
|
...l,
|
|
1399
1355
|
...o,
|
|
1400
1356
|
dangerouslySetInnerHTML: { __html: t }
|
|
1401
1357
|
});
|
|
1402
|
-
},
|
|
1358
|
+
}, pt = {
|
|
1403
1359
|
type: "ListItem",
|
|
1404
1360
|
description: "A list item component",
|
|
1405
1361
|
label: "List Item",
|
|
1406
|
-
icon:
|
|
1362
|
+
icon: oe,
|
|
1407
1363
|
category: "core",
|
|
1408
1364
|
group: "basic",
|
|
1409
1365
|
...d({
|
|
@@ -1423,19 +1379,19 @@ const z = (e, ...o) => ({
|
|
|
1423
1379
|
aiProps: ["content"],
|
|
1424
1380
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
1425
1381
|
canBeNested: (e) => e === "List" || e === "Repeater"
|
|
1426
|
-
},
|
|
1382
|
+
}, dt = (e) => {
|
|
1427
1383
|
const { blockProps: o, styles: t, content: l } = e;
|
|
1428
|
-
return
|
|
1384
|
+
return ie(e.children) ? y.createElement("p", {
|
|
1429
1385
|
...t,
|
|
1430
1386
|
...o,
|
|
1431
1387
|
dangerouslySetInnerHTML: { __html: l }
|
|
1432
1388
|
}) : y.createElement("p", { ...t, ...o }, e.children);
|
|
1433
|
-
},
|
|
1389
|
+
}, ut = {
|
|
1434
1390
|
type: "Paragraph",
|
|
1435
1391
|
description: "A paragraph component",
|
|
1436
1392
|
label: "Paragraph",
|
|
1437
1393
|
category: "core",
|
|
1438
|
-
icon:
|
|
1394
|
+
icon: le,
|
|
1439
1395
|
group: "typography",
|
|
1440
1396
|
...d({
|
|
1441
1397
|
properties: {
|
|
@@ -1451,15 +1407,15 @@ const z = (e, ...o) => ({
|
|
|
1451
1407
|
i18nProps: ["content"],
|
|
1452
1408
|
aiProps: ["content"],
|
|
1453
1409
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
1454
|
-
},
|
|
1410
|
+
}, mt = (e) => {
|
|
1455
1411
|
const { blockProps: o, inBuilder: t, children: l, partialBlockId: r } = e;
|
|
1456
|
-
return t && !r ? /* @__PURE__ */
|
|
1412
|
+
return t && !r ? /* @__PURE__ */ b(
|
|
1457
1413
|
"div",
|
|
1458
1414
|
{
|
|
1459
1415
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
1460
1416
|
...o,
|
|
1461
1417
|
children: [
|
|
1462
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ b("h1", { children: [
|
|
1463
1419
|
"Partial Block - ",
|
|
1464
1420
|
r
|
|
1465
1421
|
] }),
|
|
@@ -1467,11 +1423,11 @@ const z = (e, ...o) => ({
|
|
|
1467
1423
|
]
|
|
1468
1424
|
}
|
|
1469
1425
|
) : y.createElement("span", { ...o }, l);
|
|
1470
|
-
},
|
|
1426
|
+
}, yt = {
|
|
1471
1427
|
type: "PartialBlock",
|
|
1472
1428
|
description: "A partial block component",
|
|
1473
1429
|
label: "Partial Block",
|
|
1474
|
-
icon:
|
|
1430
|
+
icon: H,
|
|
1475
1431
|
category: "core",
|
|
1476
1432
|
group: "basic",
|
|
1477
1433
|
hidden: !0,
|
|
@@ -1528,7 +1484,7 @@ const z = (e, ...o) => ({
|
|
|
1528
1484
|
11: "lg:col-span-11",
|
|
1529
1485
|
12: "lg:col-span-12"
|
|
1530
1486
|
}
|
|
1531
|
-
},
|
|
1487
|
+
}, gt = (e) => {
|
|
1532
1488
|
const { blockProps: o, children: t, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: a } = e, c = { className: [
|
|
1533
1489
|
h(l, "className", ""),
|
|
1534
1490
|
h(B, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
|
|
@@ -1536,13 +1492,13 @@ const z = (e, ...o) => ({
|
|
|
1536
1492
|
a ? h(B, ["LARGE", n || r], "") : ""
|
|
1537
1493
|
].join(" ") };
|
|
1538
1494
|
return /* @__PURE__ */ i("div", { ...o, ...l, ...c, children: t || /* @__PURE__ */ i("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
1539
|
-
},
|
|
1495
|
+
}, ft = {
|
|
1540
1496
|
type: "Column",
|
|
1541
1497
|
description: "A column component",
|
|
1542
1498
|
label: "Column",
|
|
1543
1499
|
group: "basic",
|
|
1544
1500
|
category: "core",
|
|
1545
|
-
icon:
|
|
1501
|
+
icon: ue,
|
|
1546
1502
|
wrapper: !0,
|
|
1547
1503
|
canDelete: () => !0,
|
|
1548
1504
|
canAcceptBlock: () => !0,
|
|
@@ -1572,15 +1528,15 @@ const z = (e, ...o) => ({
|
|
|
1572
1528
|
}
|
|
1573
1529
|
}
|
|
1574
1530
|
})
|
|
1575
|
-
},
|
|
1531
|
+
}, bt = (e) => {
|
|
1576
1532
|
const { blockProps: o, children: t, styles: l, gutter: r } = e, a = { className: [h(l, "className", ""), " grid grid-cols-12"].join() };
|
|
1577
1533
|
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` : a.style = { gap: `${r}px` }, /* @__PURE__ */ i("div", { ...o, ...l, ...a, children: t });
|
|
1578
|
-
},
|
|
1534
|
+
}, ht = {
|
|
1579
1535
|
type: "Row",
|
|
1580
1536
|
description: "A row component",
|
|
1581
1537
|
label: "Row",
|
|
1582
1538
|
group: "basic",
|
|
1583
|
-
icon:
|
|
1539
|
+
icon: me,
|
|
1584
1540
|
blocks: () => [
|
|
1585
1541
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1586
1542
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
@@ -1606,19 +1562,19 @@ const z = (e, ...o) => ({
|
|
|
1606
1562
|
}
|
|
1607
1563
|
}
|
|
1608
1564
|
})
|
|
1609
|
-
},
|
|
1610
|
-
const { blockProps: o, content: t, styles: l } = e, r =
|
|
1565
|
+
}, kt = (e) => {
|
|
1566
|
+
const { blockProps: o, content: t, styles: l } = e, r = $(
|
|
1611
1567
|
l,
|
|
1612
1568
|
"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",
|
|
1613
1569
|
"max-w-full"
|
|
1614
1570
|
);
|
|
1615
1571
|
return /* @__PURE__ */ i("div", { ...o, ...r, dangerouslySetInnerHTML: { __html: t } });
|
|
1616
|
-
},
|
|
1572
|
+
}, xt = {
|
|
1617
1573
|
type: "RichText",
|
|
1618
1574
|
description: "A rich text block",
|
|
1619
1575
|
label: "Rich Text",
|
|
1620
1576
|
category: "core",
|
|
1621
|
-
icon:
|
|
1577
|
+
icon: re,
|
|
1622
1578
|
group: "typography",
|
|
1623
1579
|
...d({
|
|
1624
1580
|
properties: {
|
|
@@ -1633,14 +1589,14 @@ const z = (e, ...o) => ({
|
|
|
1633
1589
|
}),
|
|
1634
1590
|
aiProps: ["content"],
|
|
1635
1591
|
i18nProps: ["content"]
|
|
1636
|
-
},
|
|
1592
|
+
}, wt = (e) => {
|
|
1637
1593
|
const { blockProps: o, styles: t, content: l, children: r = null, tag: n } = e;
|
|
1638
1594
|
return r ? y.createElement("span", { ...t, ...o }, r) : y.createElement(n || "span", {
|
|
1639
1595
|
...t,
|
|
1640
1596
|
...o,
|
|
1641
1597
|
dangerouslySetInnerHTML: { __html: l || "" }
|
|
1642
1598
|
});
|
|
1643
|
-
},
|
|
1599
|
+
}, Ct = {
|
|
1644
1600
|
type: "Span",
|
|
1645
1601
|
description: "A span component",
|
|
1646
1602
|
label: "Span",
|
|
@@ -1660,14 +1616,14 @@ const z = (e, ...o) => ({
|
|
|
1660
1616
|
aiProps: ["content"],
|
|
1661
1617
|
i18nProps: ["content"],
|
|
1662
1618
|
canAcceptBlock: () => !0
|
|
1663
|
-
},
|
|
1619
|
+
}, vt = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ i("span", { ...e.blockProps, children: e.content }) : `${e.content}`, It = {
|
|
1664
1620
|
type: "Text",
|
|
1665
1621
|
description: "A text component with no styling",
|
|
1666
1622
|
label: "Text",
|
|
1667
1623
|
hidden: !0,
|
|
1668
1624
|
category: "core",
|
|
1669
1625
|
group: "typography",
|
|
1670
|
-
icon:
|
|
1626
|
+
icon: ne,
|
|
1671
1627
|
...d({
|
|
1672
1628
|
properties: {
|
|
1673
1629
|
styles: u("text-black"),
|
|
@@ -1711,7 +1667,7 @@ const z = (e, ...o) => ({
|
|
|
1711
1667
|
default: !1
|
|
1712
1668
|
}
|
|
1713
1669
|
}
|
|
1714
|
-
}, 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+)/,
|
|
1670
|
+
}, 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+)/, Lt = (e, o) => {
|
|
1715
1671
|
const t = h(o, "autoplay", !1), l = h(o, "controls", !1), r = h(o, "loop", !1), n = t || h(o, "muted", !0);
|
|
1716
1672
|
if (N.test(e)) {
|
|
1717
1673
|
const a = e.match(N);
|
|
@@ -1730,13 +1686,13 @@ const z = (e, ...o) => ({
|
|
|
1730
1686
|
}
|
|
1731
1687
|
}
|
|
1732
1688
|
return null;
|
|
1733
|
-
},
|
|
1734
|
-
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: a } = e, s =
|
|
1735
|
-
return /* @__PURE__ */
|
|
1736
|
-
!s && a ? /* @__PURE__ */ i("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__ */ i("iframe", { width: "100%", src: s, ...
|
|
1689
|
+
}, Pt = (e) => {
|
|
1690
|
+
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: a } = e, s = Lt(o, r);
|
|
1691
|
+
return /* @__PURE__ */ b("div", { ...se(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
1692
|
+
!s && a ? /* @__PURE__ */ i("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__ */ i("iframe", { width: "100%", src: s, ...ce(l, "className") }),
|
|
1737
1693
|
a && /* @__PURE__ */ i("div", { ...t, className: "absolute top-0 h-full w-full" })
|
|
1738
1694
|
] });
|
|
1739
|
-
},
|
|
1695
|
+
}, Bt = (e) => {
|
|
1740
1696
|
const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps: a } = e;
|
|
1741
1697
|
let s = n;
|
|
1742
1698
|
const c = [...h(r, "srcsets", []) || []];
|
|
@@ -1763,17 +1719,17 @@ const z = (e, ...o) => ({
|
|
|
1763
1719
|
}),
|
|
1764
1720
|
"Your browser does not support the video tag."
|
|
1765
1721
|
) });
|
|
1766
|
-
},
|
|
1722
|
+
}, St = (e) => {
|
|
1767
1723
|
const { videoSource: o } = e;
|
|
1768
|
-
return o === "Custom" ? /* @__PURE__ */ i(
|
|
1724
|
+
return o === "Custom" ? /* @__PURE__ */ i(Bt, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ i(Pt, { ...e }) : /* @__PURE__ */ b("div", { children: [
|
|
1769
1725
|
"Invalid video source : ",
|
|
1770
1726
|
o
|
|
1771
1727
|
] });
|
|
1772
|
-
},
|
|
1728
|
+
}, _t = {
|
|
1773
1729
|
type: "Video",
|
|
1774
1730
|
label: "Video",
|
|
1775
1731
|
category: "core",
|
|
1776
|
-
icon:
|
|
1732
|
+
icon: ae,
|
|
1777
1733
|
group: "media",
|
|
1778
1734
|
...d({
|
|
1779
1735
|
properties: {
|
|
@@ -1854,24 +1810,24 @@ const z = (e, ...o) => ({
|
|
|
1854
1810
|
}
|
|
1855
1811
|
}),
|
|
1856
1812
|
i18nProps: ["url"]
|
|
1857
|
-
},
|
|
1813
|
+
}, Tt = (e) => {
|
|
1858
1814
|
const { children: o, tag: t, styles: l, blockProps: r, inBuilder: n, $loading: a } = e;
|
|
1859
1815
|
let s = o;
|
|
1860
|
-
return C(s) && n && (s = /* @__PURE__ */ i("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" ? a && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */
|
|
1816
|
+
return C(s) && n && (s = /* @__PURE__ */ i("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" ? a && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ b("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1861
1817
|
/* @__PURE__ */ i("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1862
1818
|
/* @__PURE__ */ i("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1863
1819
|
] }, m)) : s : y.createElement(
|
|
1864
1820
|
t,
|
|
1865
1821
|
{ ...r, ...l },
|
|
1866
|
-
a && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */
|
|
1822
|
+
a && n ? Array.from({ length: 2 }).map((c, m) => /* @__PURE__ */ b("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1867
1823
|
/* @__PURE__ */ i("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1868
1824
|
/* @__PURE__ */ i("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1869
1825
|
] }, m)) : s
|
|
1870
1826
|
);
|
|
1871
|
-
},
|
|
1827
|
+
}, Nt = {
|
|
1872
1828
|
type: "Repeater",
|
|
1873
1829
|
label: "Repeater",
|
|
1874
|
-
icon:
|
|
1830
|
+
icon: E,
|
|
1875
1831
|
group: "basic",
|
|
1876
1832
|
dataProviderMode: "live",
|
|
1877
1833
|
dataProviderDependencies: ["filter", "sort", "limit", "repeaterItems"],
|
|
@@ -1926,7 +1882,7 @@ const z = (e, ...o) => ({
|
|
|
1926
1882
|
}
|
|
1927
1883
|
}
|
|
1928
1884
|
})
|
|
1929
|
-
},
|
|
1885
|
+
}, Rt = ({
|
|
1930
1886
|
children: e,
|
|
1931
1887
|
blockProps: o,
|
|
1932
1888
|
styles: t,
|
|
@@ -1949,27 +1905,27 @@ const z = (e, ...o) => ({
|
|
|
1949
1905
|
{ ...o, ...t },
|
|
1950
1906
|
/* @__PURE__ */ i("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" })
|
|
1951
1907
|
) : y.createElement(n, { ...o, ...t }, e);
|
|
1952
|
-
},
|
|
1908
|
+
}, At = {
|
|
1953
1909
|
type: "RepeaterItem",
|
|
1954
1910
|
label: "Repeater Item",
|
|
1955
|
-
icon:
|
|
1911
|
+
icon: E,
|
|
1956
1912
|
hidden: !0,
|
|
1957
1913
|
group: "basic",
|
|
1958
1914
|
...d({
|
|
1959
1915
|
properties: {
|
|
1960
1916
|
styles: _(""),
|
|
1961
|
-
parentTag:
|
|
1917
|
+
parentTag: z("Repeater", "tag")
|
|
1962
1918
|
}
|
|
1963
1919
|
}),
|
|
1964
1920
|
canAcceptBlock: (e) => e !== "RepeaterItem",
|
|
1965
1921
|
canDelete: () => !1,
|
|
1966
1922
|
canMove: () => !1,
|
|
1967
1923
|
canDuplicate: () => !1
|
|
1968
|
-
},
|
|
1924
|
+
}, Mt = ({
|
|
1969
1925
|
children: e,
|
|
1970
1926
|
blockProps: o,
|
|
1971
1927
|
styles: t
|
|
1972
|
-
}) => y.createElement("div", { ...o, ...t }, e),
|
|
1928
|
+
}) => y.createElement("div", { ...o, ...t }, e), Et = {
|
|
1973
1929
|
type: "RepeaterEmptyState",
|
|
1974
1930
|
label: "Empty State",
|
|
1975
1931
|
hidden: !0,
|
|
@@ -1981,9 +1937,9 @@ const z = (e, ...o) => ({
|
|
|
1981
1937
|
canDelete: () => !1,
|
|
1982
1938
|
canMove: () => !1,
|
|
1983
1939
|
canDuplicate: () => !1
|
|
1984
|
-
},
|
|
1985
|
-
p(
|
|
1940
|
+
}, Ut = () => {
|
|
1941
|
+
p(ye, ge), p(Ie, Le), p(fe, be), p(Ge, Ze), p(dt, ut), p(wt, Ct), p(kt, xt), p(nt, at), p(it, st), p(ct, pt), p(et, tt), p(lt, rt), p(St, _t), p(he, ke), p(xe, we), p(vt, It), p(Se, _e), p(Te, Ne), p(Ae, Me), p(Pe, Be), p($e, ze), p(De, Ve), p(je, Fe), p(Ee, He), p(Oe, Ye), p(Ce, ve), p(Ue, qe), p(mt, yt), p(bt, ht), p(gt, ft), p(Tt, Nt), p(Rt, At), p(Mt, Et);
|
|
1986
1942
|
};
|
|
1987
1943
|
export {
|
|
1988
|
-
|
|
1944
|
+
Ut as loadWebBlocks
|
|
1989
1945
|
};
|