@chaibuilder/sdk 2.2.5 → 2.2.6
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-HKrlrH8b.js → code-editor-BP81Fo3h.js} +25 -25
- package/dist/code-editor-CRaw45ej.cjs +1 -0
- package/dist/core.cjs +1 -66
- package/dist/core.d.ts +9 -1
- package/dist/core.js +87 -9517
- package/dist/index-CPwl7tLt.cjs +66 -0
- package/dist/index-DojHY3B4.js +9620 -0
- package/dist/render.cjs +2 -2
- package/dist/render.d.ts +0 -2
- package/dist/render.js +81 -35
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +284 -220
- package/package.json +1 -1
- package/dist/CodeEditor-B7r9YjDC.cjs +0 -1
- package/dist/render-chai-blocks-6SVNwoLW.js +0 -201
- package/dist/render-chai-blocks-Bvl2_fRE.cjs +0 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { registerChaiBlockSchema as
|
|
2
|
-
import { jsx as s, jsxs as
|
|
3
|
-
import { c as
|
|
4
|
-
import * as
|
|
1
|
+
import { registerChaiBlockSchema as d, StylesProp as p, registerChaiBlock as u, stylesProp as T, closestBlockProp as H } from "@chaibuilder/runtime";
|
|
2
|
+
import { jsx as s, jsxs as h, Fragment as N } from "react/jsx-runtime";
|
|
3
|
+
import { c as x, g as C } from "./common-functions-BGzDsf1z.js";
|
|
4
|
+
import * as b from "react";
|
|
5
5
|
import { createElement as w } from "react";
|
|
6
|
-
import { ButtonIcon as
|
|
7
|
-
import { isEmpty as v, get as
|
|
8
|
-
import { FileCode as
|
|
9
|
-
const
|
|
6
|
+
import { ButtonIcon as R, CopyIcon as z, CodeIcon as V, DividerHorizontalIcon as j, CheckboxIcon as q, InputIcon as M, LetterCaseToggleIcon as D, RadiobuttonIcon as F, DropdownMenuIcon as U, HeadingIcon as G, TableIcon as O, BorderTopIcon as Y, BorderAllIcon as W, ViewHorizontalIcon as X, DragHandleHorizontalIcon as J, SketchLogoIcon as Q, ImageIcon as Z, Link1Icon as K, RowsIcon as ee, ColumnsIcon as te, TextIcon as oe, CursorTextIcon as le, SpaceBetweenVerticallyIcon as re, VideoIcon as ne, LoopIcon as $ } from "@radix-ui/react-icons";
|
|
7
|
+
import { isEmpty as v, get as f, map as P, isNull as ie, omit as se, pick as ae } from "lodash-es";
|
|
8
|
+
import { FileCode as ce, GroupIcon as pe, GlobeIcon as E, Columns as ue, Rows as de } from "lucide-react";
|
|
9
|
+
const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div", { className: x("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ s("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, ye = (e) => {
|
|
10
10
|
const { blockProps: o, inBuilder: t, backgroundImage: l, children: r, tag: n = "div", styles: i } = e;
|
|
11
11
|
let a = r;
|
|
12
|
-
r || (a = /* @__PURE__ */ s(
|
|
12
|
+
r || (a = /* @__PURE__ */ s(I, { inBuilder: t }));
|
|
13
13
|
let c = {};
|
|
14
|
-
return l && (c = { backgroundImage: `url(${l})` }),
|
|
15
|
-
},
|
|
14
|
+
return l && (c = { backgroundImage: `url(${l})` }), b.createElement(n, { ...o, ...i, style: c }, a);
|
|
15
|
+
}, me = {
|
|
16
16
|
type: "Box",
|
|
17
17
|
description: "Similar to a div or section elements in HTML",
|
|
18
18
|
label: "Box",
|
|
19
19
|
category: "core",
|
|
20
20
|
group: "basic",
|
|
21
|
-
...
|
|
21
|
+
...d({
|
|
22
22
|
properties: {
|
|
23
23
|
styles: p(""),
|
|
24
24
|
backgroundImage: {
|
|
@@ -54,8 +54,8 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
54
54
|
}
|
|
55
55
|
}),
|
|
56
56
|
canAcceptBlock: () => !0
|
|
57
|
-
},
|
|
58
|
-
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: i, iconPos: a, link: c, inBuilder: y } = e, k = l, g = i || /* @__PURE__ */
|
|
57
|
+
}, ge = (e) => {
|
|
58
|
+
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: i, iconPos: a, link: c, inBuilder: y } = e, k = l, g = i || /* @__PURE__ */ h(N, { children: [
|
|
59
59
|
/* @__PURE__ */ s("span", { "data-ai-key": "content", children: r }),
|
|
60
60
|
k && /* @__PURE__ */ s(
|
|
61
61
|
"div",
|
|
@@ -75,15 +75,15 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
75
75
|
},
|
|
76
76
|
g
|
|
77
77
|
);
|
|
78
|
-
return v(
|
|
79
|
-
},
|
|
78
|
+
return v(f(c, "href")) ? m : y ? /* @__PURE__ */ s("span", { children: m }) : /* @__PURE__ */ s("a", { "aria-label": r, href: f(c, "href") || "/", target: f(c, "target", "_self"), children: m });
|
|
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: R,
|
|
85
85
|
group: "basic",
|
|
86
|
-
...
|
|
86
|
+
...d({
|
|
87
87
|
properties: {
|
|
88
88
|
styles: p("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
|
|
89
89
|
content: {
|
|
@@ -128,8 +128,8 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
128
128
|
}),
|
|
129
129
|
i18nProps: ["content"],
|
|
130
130
|
aiProps: ["content"]
|
|
131
|
-
},
|
|
132
|
-
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n } = e, i = l, a = /* @__PURE__ */
|
|
131
|
+
}, fe = (e) => {
|
|
132
|
+
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n } = e, i = l, a = /* @__PURE__ */ h(N, { children: [
|
|
133
133
|
/* @__PURE__ */ s("span", { "data-ai-key": "content", children: r }),
|
|
134
134
|
i && /* @__PURE__ */ s("div", { style: { width: t + "px" }, dangerouslySetInnerHTML: { __html: i } })
|
|
135
135
|
] });
|
|
@@ -143,14 +143,14 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
143
143
|
},
|
|
144
144
|
a
|
|
145
145
|
);
|
|
146
|
-
},
|
|
146
|
+
}, he = {
|
|
147
147
|
type: "CopyButton",
|
|
148
148
|
description: "A copy button component",
|
|
149
149
|
label: "Copy Button",
|
|
150
150
|
category: "core",
|
|
151
|
-
icon:
|
|
151
|
+
icon: z,
|
|
152
152
|
group: "basic",
|
|
153
|
-
...
|
|
153
|
+
...d({
|
|
154
154
|
properties: {
|
|
155
155
|
styles: p("p-2 rounded-md flex items-center"),
|
|
156
156
|
content: {
|
|
@@ -173,27 +173,27 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
173
173
|
}),
|
|
174
174
|
i18nProps: ["content"],
|
|
175
175
|
aiProps: ["content"]
|
|
176
|
-
},
|
|
176
|
+
}, ke = (e) => {
|
|
177
177
|
const { blockProps: o, styles: t, htmlCode: l, inBuilder: r } = e;
|
|
178
|
-
return r ? /* @__PURE__ */
|
|
178
|
+
return r ? /* @__PURE__ */ h("div", { className: "relative", children: [
|
|
179
179
|
r ? /* @__PURE__ */ s("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
180
|
-
|
|
180
|
+
b.createElement("div", {
|
|
181
181
|
...t,
|
|
182
182
|
dangerouslySetInnerHTML: { __html: l.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
183
183
|
})
|
|
184
|
-
] }) :
|
|
184
|
+
] }) : b.createElement("div", {
|
|
185
185
|
...o,
|
|
186
186
|
...t,
|
|
187
187
|
dangerouslySetInnerHTML: { __html: l }
|
|
188
188
|
});
|
|
189
|
-
},
|
|
189
|
+
}, we = {
|
|
190
190
|
type: "CustomHTML",
|
|
191
191
|
description: "similar to a div or section elements in HTML",
|
|
192
192
|
label: "Custom HTML",
|
|
193
193
|
category: "core",
|
|
194
|
-
icon:
|
|
194
|
+
icon: V,
|
|
195
195
|
group: "advanced",
|
|
196
|
-
...
|
|
196
|
+
...d({
|
|
197
197
|
properties: {
|
|
198
198
|
styles: p(""),
|
|
199
199
|
htmlCode: {
|
|
@@ -203,17 +203,17 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
})
|
|
206
|
-
},
|
|
206
|
+
}, Ce = (e) => {
|
|
207
207
|
const { scripts: o, inBuilder: t, blockProps: l } = e;
|
|
208
|
-
return t ? /* @__PURE__ */ s("div", { ...l, children: /* @__PURE__ */ s("div", { className:
|
|
209
|
-
},
|
|
208
|
+
return t ? /* @__PURE__ */ s("div", { ...l, children: /* @__PURE__ */ s("div", { className: x("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ s("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ s("div", { dangerouslySetInnerHTML: { __html: o } });
|
|
209
|
+
}, ve = {
|
|
210
210
|
type: "CustomScript",
|
|
211
211
|
description: "similar to a script element in HTML",
|
|
212
212
|
label: "Custom Script",
|
|
213
213
|
category: "core",
|
|
214
|
-
icon:
|
|
214
|
+
icon: ce,
|
|
215
215
|
group: "advanced",
|
|
216
|
-
...
|
|
216
|
+
...d({
|
|
217
217
|
properties: {
|
|
218
218
|
scripts: {
|
|
219
219
|
type: "string",
|
|
@@ -224,32 +224,32 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
})
|
|
227
|
-
},
|
|
227
|
+
}, Ie = (e) => {
|
|
228
228
|
const { blockProps: o, styles: t } = e;
|
|
229
229
|
return w("hr", { ...t, ...o });
|
|
230
|
-
},
|
|
230
|
+
}, Be = {
|
|
231
231
|
type: "Divider",
|
|
232
232
|
description: "A horizontal line component",
|
|
233
233
|
label: "Divider",
|
|
234
234
|
category: "core",
|
|
235
|
-
icon:
|
|
235
|
+
icon: j,
|
|
236
236
|
group: "basic",
|
|
237
|
-
...
|
|
237
|
+
...d({
|
|
238
238
|
properties: {
|
|
239
239
|
styles: p("bg-gray-900 h-0.5 py-2 my-1")
|
|
240
240
|
}
|
|
241
241
|
})
|
|
242
|
-
},
|
|
242
|
+
}, xe = (e) => {
|
|
243
243
|
const { blockProps: o, styles: t, backgroundImage: l } = e;
|
|
244
244
|
let r = {};
|
|
245
|
-
return l && (r = { backgroundImage: `url(${l})` }),
|
|
246
|
-
},
|
|
245
|
+
return l && (r = { backgroundImage: `url(${l})` }), b.createElement("div", { ...o, ...t, style: r });
|
|
246
|
+
}, Le = {
|
|
247
247
|
type: "EmptyBox",
|
|
248
248
|
description: "A box component with no children",
|
|
249
249
|
label: "Empty Box",
|
|
250
250
|
category: "core",
|
|
251
251
|
group: "basic",
|
|
252
|
-
...
|
|
252
|
+
...d({
|
|
253
253
|
properties: {
|
|
254
254
|
styles: p(""),
|
|
255
255
|
backgroundImage: {
|
|
@@ -260,9 +260,9 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
})
|
|
263
|
-
},
|
|
263
|
+
}, Pe = (e) => {
|
|
264
264
|
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: a, showLabel: c = !0 } = e, y = C();
|
|
265
|
-
return c ? /* @__PURE__ */
|
|
265
|
+
return c ? /* @__PURE__ */ h("div", { ...r, ...o, children: [
|
|
266
266
|
/* @__PURE__ */ s(
|
|
267
267
|
"input",
|
|
268
268
|
{
|
|
@@ -287,13 +287,13 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
287
287
|
name: t
|
|
288
288
|
}
|
|
289
289
|
);
|
|
290
|
-
},
|
|
290
|
+
}, _e = {
|
|
291
291
|
type: "Checkbox",
|
|
292
292
|
label: "web_blocks.checkbox",
|
|
293
293
|
category: "core",
|
|
294
|
-
icon:
|
|
294
|
+
icon: q,
|
|
295
295
|
group: "form",
|
|
296
|
-
...
|
|
296
|
+
...d({
|
|
297
297
|
properties: {
|
|
298
298
|
styles: p("flex items-center gap-x-2"),
|
|
299
299
|
inputStyles: p(""),
|
|
@@ -326,10 +326,10 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
326
326
|
}),
|
|
327
327
|
aiProps: ["label"],
|
|
328
328
|
i18nProps: ["label"]
|
|
329
|
-
},
|
|
329
|
+
}, Se = (e) => {
|
|
330
330
|
const { children: o, blockProps: t, errorMessage: l, successMessage: r, action: n, styles: i, inBuilder: a } = e;
|
|
331
331
|
let c = o;
|
|
332
|
-
return o || (c = /* @__PURE__ */ s(
|
|
332
|
+
return o || (c = /* @__PURE__ */ s(I, { inBuilder: a })), /* @__PURE__ */ h(
|
|
333
333
|
"form",
|
|
334
334
|
{
|
|
335
335
|
...{
|
|
@@ -351,11 +351,11 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
351
351
|
]
|
|
352
352
|
}
|
|
353
353
|
);
|
|
354
|
-
},
|
|
354
|
+
}, Te = {
|
|
355
355
|
type: "Form",
|
|
356
356
|
label: "Form",
|
|
357
357
|
category: "core",
|
|
358
|
-
icon:
|
|
358
|
+
icon: pe,
|
|
359
359
|
group: "form",
|
|
360
360
|
blocks: () => [
|
|
361
361
|
{ _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
|
|
@@ -367,7 +367,7 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
367
367
|
styles: "#styles:bg-black text-white rounded px-3 py-1,"
|
|
368
368
|
}
|
|
369
369
|
],
|
|
370
|
-
...
|
|
370
|
+
...d({
|
|
371
371
|
properties: {
|
|
372
372
|
styles: p(""),
|
|
373
373
|
action: {
|
|
@@ -392,9 +392,9 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
392
392
|
i18nProps: ["errorMessage", "successMessage"],
|
|
393
393
|
aiProps: ["errorMessage", "successMessage"],
|
|
394
394
|
canAcceptBlock: () => !0
|
|
395
|
-
},
|
|
395
|
+
}, Ne = (e) => {
|
|
396
396
|
const { blockProps: o, inBuilder: t, label: l, styles: r, inputStyles: n, icon: i, iconSize: a, iconPos: c } = e, y = C();
|
|
397
|
-
return /* @__PURE__ */
|
|
397
|
+
return /* @__PURE__ */ h(
|
|
398
398
|
"button",
|
|
399
399
|
{
|
|
400
400
|
id: y,
|
|
@@ -419,13 +419,13 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
419
419
|
]
|
|
420
420
|
}
|
|
421
421
|
);
|
|
422
|
-
},
|
|
422
|
+
}, Re = {
|
|
423
423
|
type: "FormButton",
|
|
424
424
|
label: "Submit Button",
|
|
425
425
|
category: "core",
|
|
426
|
-
icon:
|
|
426
|
+
icon: R,
|
|
427
427
|
group: "form",
|
|
428
|
-
...
|
|
428
|
+
...d({
|
|
429
429
|
properties: {
|
|
430
430
|
styles: p(
|
|
431
431
|
"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
|
|
@@ -459,7 +459,7 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
459
459
|
}),
|
|
460
460
|
i18nProps: ["label"],
|
|
461
461
|
aiProps: ["label"]
|
|
462
|
-
},
|
|
462
|
+
}, Me = (e) => {
|
|
463
463
|
const {
|
|
464
464
|
blockProps: o,
|
|
465
465
|
fieldName: t,
|
|
@@ -472,7 +472,7 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
472
472
|
inputType: y,
|
|
473
473
|
autocomplete: k
|
|
474
474
|
} = e, g = C();
|
|
475
|
-
return a ? /* @__PURE__ */
|
|
475
|
+
return a ? /* @__PURE__ */ h("div", { ...n, ...o, children: [
|
|
476
476
|
a && /* @__PURE__ */ s("label", { htmlFor: g, children: l }),
|
|
477
477
|
/* @__PURE__ */ s(
|
|
478
478
|
"input",
|
|
@@ -500,13 +500,13 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
500
500
|
autoComplete: k ? "on" : "off"
|
|
501
501
|
}
|
|
502
502
|
);
|
|
503
|
-
},
|
|
503
|
+
}, $e = {
|
|
504
504
|
type: "Input",
|
|
505
505
|
label: "web_blocks.input",
|
|
506
506
|
category: "core",
|
|
507
507
|
icon: M,
|
|
508
508
|
group: "form",
|
|
509
|
-
...
|
|
509
|
+
...d({
|
|
510
510
|
properties: {
|
|
511
511
|
styles: p(""),
|
|
512
512
|
inputStyles: p("w-full p-1"),
|
|
@@ -552,19 +552,19 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
552
552
|
}),
|
|
553
553
|
aiProps: ["label", "placeholder"],
|
|
554
554
|
i18nProps: ["label", "placeholder"]
|
|
555
|
-
},
|
|
555
|
+
}, Ee = (e) => {
|
|
556
556
|
const { blockProps: o, content: t, styles: l, children: r } = e, n = { ...l, ...o };
|
|
557
|
-
return r ?
|
|
557
|
+
return r ? b.createElement("label", n, r) : b.createElement("label", {
|
|
558
558
|
...n,
|
|
559
559
|
dangerouslySetInnerHTML: { __html: t }
|
|
560
560
|
});
|
|
561
|
-
},
|
|
561
|
+
}, Ae = {
|
|
562
562
|
type: "Label",
|
|
563
563
|
label: "Label",
|
|
564
564
|
category: "core",
|
|
565
|
-
icon:
|
|
565
|
+
icon: D,
|
|
566
566
|
group: "form",
|
|
567
|
-
...
|
|
567
|
+
...d({
|
|
568
568
|
properties: {
|
|
569
569
|
styles: p(),
|
|
570
570
|
content: {
|
|
@@ -576,9 +576,9 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
576
576
|
}),
|
|
577
577
|
aiProps: ["content"],
|
|
578
578
|
i18nProps: ["content"]
|
|
579
|
-
},
|
|
579
|
+
}, He = (e) => {
|
|
580
580
|
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: a, showLabel: c = !0 } = e, y = C();
|
|
581
|
-
return c ? /* @__PURE__ */
|
|
581
|
+
return c ? /* @__PURE__ */ h("div", { ...r, ...o, children: [
|
|
582
582
|
/* @__PURE__ */ s("input", { ...n, name: t, id: y, type: "radio", required: i, defaultChecked: a }),
|
|
583
583
|
l && /* @__PURE__ */ s("label", { htmlFor: y, children: l })
|
|
584
584
|
] }) : /* @__PURE__ */ s(
|
|
@@ -594,13 +594,13 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
594
594
|
name: t
|
|
595
595
|
}
|
|
596
596
|
);
|
|
597
|
-
},
|
|
597
|
+
}, ze = {
|
|
598
598
|
type: "Radio",
|
|
599
599
|
label: "web_blocks.radio",
|
|
600
600
|
category: "core",
|
|
601
|
-
icon:
|
|
601
|
+
icon: F,
|
|
602
602
|
group: "form",
|
|
603
|
-
...
|
|
603
|
+
...d({
|
|
604
604
|
properties: {
|
|
605
605
|
styles: p("flex items-center gap-x-2"),
|
|
606
606
|
inputStyles: p(""),
|
|
@@ -633,25 +633,25 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
633
633
|
}),
|
|
634
634
|
aiProps: ["label"],
|
|
635
635
|
i18nProps: ["label"]
|
|
636
|
-
},
|
|
636
|
+
}, Ve = (e) => {
|
|
637
637
|
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, required: a, showLabel: c, _multiple: y, options: k } = e, g = C();
|
|
638
|
-
return c ? /* @__PURE__ */
|
|
638
|
+
return c ? /* @__PURE__ */ h("div", { ...n, ...o, children: [
|
|
639
639
|
c && /* @__PURE__ */ s("label", { htmlFor: g, children: l }),
|
|
640
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ h("select", { ...i, id: g, required: a, multiple: y, name: t, children: [
|
|
641
641
|
/* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
|
|
642
642
|
P(k, (m) => /* @__PURE__ */ s("option", { value: m == null ? void 0 : m.value, children: m == null ? void 0 : m.label }, m == null ? void 0 : m.value))
|
|
643
643
|
] })
|
|
644
|
-
] }) : /* @__PURE__ */
|
|
644
|
+
] }) : /* @__PURE__ */ h("select", { id: g, ...n, ...o, required: a, multiple: y, name: t, children: [
|
|
645
645
|
/* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
|
|
646
646
|
P(k, (m) => /* @__PURE__ */ s("option", { value: m == null ? void 0 : m.value, children: m == null ? void 0 : m.label }, m == null ? void 0 : m.value))
|
|
647
647
|
] });
|
|
648
|
-
},
|
|
648
|
+
}, je = {
|
|
649
649
|
type: "Select",
|
|
650
650
|
label: "web_blocks.select",
|
|
651
651
|
category: "core",
|
|
652
|
-
icon:
|
|
652
|
+
icon: U,
|
|
653
653
|
group: "form",
|
|
654
|
-
...
|
|
654
|
+
...d({
|
|
655
655
|
properties: {
|
|
656
656
|
styles: p(""),
|
|
657
657
|
inputStyles: p("w-full p-1"),
|
|
@@ -709,9 +709,9 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
709
709
|
}),
|
|
710
710
|
aiProps: ["label", "placeholder"],
|
|
711
711
|
i18nProps: ["label", "placeholder"]
|
|
712
|
-
},
|
|
712
|
+
}, qe = (e) => {
|
|
713
713
|
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, rows: a, showLabel: c, required: y } = e, k = C();
|
|
714
|
-
return c ? /* @__PURE__ */
|
|
714
|
+
return c ? /* @__PURE__ */ h("div", { ...n, ...o, children: [
|
|
715
715
|
c && /* @__PURE__ */ s("label", { htmlFor: k, children: l }),
|
|
716
716
|
/* @__PURE__ */ s(
|
|
717
717
|
"textarea",
|
|
@@ -737,13 +737,13 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
737
737
|
required: y
|
|
738
738
|
}
|
|
739
739
|
);
|
|
740
|
-
},
|
|
740
|
+
}, De = {
|
|
741
741
|
type: "TextArea",
|
|
742
742
|
label: "web_blocks.textarea",
|
|
743
743
|
category: "core",
|
|
744
744
|
icon: M,
|
|
745
745
|
group: "form",
|
|
746
|
-
...
|
|
746
|
+
...d({
|
|
747
747
|
properties: {
|
|
748
748
|
fieldName: {
|
|
749
749
|
type: "string",
|
|
@@ -782,31 +782,31 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
782
782
|
}),
|
|
783
783
|
aiProps: ["label", "placeholder"],
|
|
784
784
|
i18nProps: ["label", "placeholder"]
|
|
785
|
-
},
|
|
785
|
+
}, Fe = (e) => {
|
|
786
786
|
const { blockProps: o, inBuilder: t, children: l, globalBlock: r } = e;
|
|
787
|
-
return t && !r ? /* @__PURE__ */
|
|
787
|
+
return t && !r ? /* @__PURE__ */ h(
|
|
788
788
|
"div",
|
|
789
789
|
{
|
|
790
790
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
791
791
|
...o,
|
|
792
792
|
children: [
|
|
793
|
-
/* @__PURE__ */
|
|
793
|
+
/* @__PURE__ */ h("h1", { children: [
|
|
794
794
|
"Global Block - ",
|
|
795
795
|
r
|
|
796
796
|
] }),
|
|
797
797
|
/* @__PURE__ */ s("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
798
798
|
]
|
|
799
799
|
}
|
|
800
|
-
) :
|
|
801
|
-
},
|
|
800
|
+
) : b.createElement("span", { ...o }, l);
|
|
801
|
+
}, Ue = {
|
|
802
802
|
type: "GlobalBlock",
|
|
803
803
|
description: "A global block component",
|
|
804
804
|
label: "Global Block",
|
|
805
|
-
icon:
|
|
805
|
+
icon: E,
|
|
806
806
|
category: "core",
|
|
807
807
|
group: "basic",
|
|
808
808
|
hidden: !0,
|
|
809
|
-
...
|
|
809
|
+
...d({
|
|
810
810
|
properties: {
|
|
811
811
|
globalBlock: {
|
|
812
812
|
type: "string",
|
|
@@ -816,21 +816,21 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
818
|
})
|
|
819
|
-
},
|
|
819
|
+
}, Ge = (e) => {
|
|
820
820
|
const { blockProps: o, styles: t, content: l, tag: r = "h1", children: n = null } = e;
|
|
821
|
-
return n ?
|
|
821
|
+
return n ? b.createElement(r, { ...t, ...o }, n) : b.createElement(r, {
|
|
822
822
|
...t,
|
|
823
823
|
...o,
|
|
824
824
|
dangerouslySetInnerHTML: { __html: l }
|
|
825
825
|
});
|
|
826
|
-
},
|
|
826
|
+
}, Oe = {
|
|
827
827
|
type: "Heading",
|
|
828
828
|
description: "A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",
|
|
829
829
|
label: "Heading",
|
|
830
830
|
category: "core",
|
|
831
|
-
icon:
|
|
831
|
+
icon: G,
|
|
832
832
|
group: "typography",
|
|
833
|
-
...
|
|
833
|
+
...d({
|
|
834
834
|
properties: {
|
|
835
835
|
tag: {
|
|
836
836
|
type: "string",
|
|
@@ -850,16 +850,16 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
850
850
|
aiProps: ["content"],
|
|
851
851
|
i18nProps: ["content"],
|
|
852
852
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
853
|
-
},
|
|
853
|
+
}, Ye = (e) => {
|
|
854
854
|
const { blockProps: o, styles: t } = e;
|
|
855
855
|
return w("br", { ...o, ...t });
|
|
856
|
-
},
|
|
856
|
+
}, We = {
|
|
857
857
|
type: "LineBreak",
|
|
858
858
|
label: "Line Break",
|
|
859
859
|
category: "core",
|
|
860
860
|
group: "basic",
|
|
861
861
|
hidden: !0,
|
|
862
|
-
...
|
|
862
|
+
...d({
|
|
863
863
|
properties: {
|
|
864
864
|
styles: p("")
|
|
865
865
|
}
|
|
@@ -868,90 +868,90 @@ const x = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
868
868
|
canDelete: () => !1,
|
|
869
869
|
canMove: () => !1,
|
|
870
870
|
canDuplicate: () => !1
|
|
871
|
-
},
|
|
871
|
+
}, Xe = (e) => {
|
|
872
872
|
const { blockProps: o, children: t, styles: l } = e;
|
|
873
|
-
return t ? w("table", { ...o, ...l }, t) : /* @__PURE__ */ s(
|
|
874
|
-
},
|
|
873
|
+
return t ? w("table", { ...o, ...l }, t) : /* @__PURE__ */ s(I, {});
|
|
874
|
+
}, Je = (e) => {
|
|
875
875
|
const { blockProps: o, children: t, styles: l } = e;
|
|
876
|
-
return t ? w("thead", { ...o, ...l }, t) : /* @__PURE__ */ s(
|
|
877
|
-
},
|
|
876
|
+
return t ? w("thead", { ...o, ...l }, t) : /* @__PURE__ */ s(I, {});
|
|
877
|
+
}, Qe = (e) => {
|
|
878
878
|
const { blockProps: o, children: t, styles: l } = e;
|
|
879
|
-
return t ? w("tbody", { ...o, ...l }, t) : /* @__PURE__ */ s(
|
|
880
|
-
},
|
|
879
|
+
return t ? w("tbody", { ...o, ...l }, t) : /* @__PURE__ */ s(I, {});
|
|
880
|
+
}, Ze = (e) => {
|
|
881
881
|
const { blockProps: o, children: t, styles: l } = e;
|
|
882
|
-
return t ? w("tr", { ...o, ...l }, t) : /* @__PURE__ */ s(
|
|
883
|
-
},
|
|
882
|
+
return t ? w("tr", { ...o, ...l }, t) : /* @__PURE__ */ s(I, {});
|
|
883
|
+
}, Ke = (e) => {
|
|
884
884
|
const { blockProps: o, children: t, content: l, styles: r } = e;
|
|
885
|
-
return !t && v(l) ? /* @__PURE__ */ s(
|
|
885
|
+
return !t && v(l) ? /* @__PURE__ */ s(I, {}) : t ? w("td", { ...o, ...r }, t) : w("td", {
|
|
886
886
|
...o,
|
|
887
887
|
...r,
|
|
888
888
|
dangerouslySetInnerHTML: { __html: l }
|
|
889
889
|
});
|
|
890
890
|
};
|
|
891
|
-
|
|
891
|
+
u(Xe, {
|
|
892
892
|
type: "Table",
|
|
893
893
|
label: "Table",
|
|
894
894
|
category: "core",
|
|
895
895
|
group: "table",
|
|
896
896
|
hidden: !0,
|
|
897
|
-
icon:
|
|
898
|
-
...
|
|
897
|
+
icon: O,
|
|
898
|
+
...d({
|
|
899
899
|
properties: {
|
|
900
900
|
styles: p("")
|
|
901
901
|
}
|
|
902
902
|
}),
|
|
903
903
|
blocks: B("Table")
|
|
904
904
|
});
|
|
905
|
-
|
|
905
|
+
u(Je, {
|
|
906
906
|
type: "TableHead",
|
|
907
907
|
label: "Table Head",
|
|
908
908
|
category: "core",
|
|
909
909
|
group: "table",
|
|
910
910
|
hidden: !0,
|
|
911
|
-
icon:
|
|
912
|
-
...
|
|
911
|
+
icon: Y,
|
|
912
|
+
...d({
|
|
913
913
|
properties: {
|
|
914
914
|
styles: p("")
|
|
915
915
|
}
|
|
916
916
|
}),
|
|
917
917
|
blocks: B("TableHead")
|
|
918
918
|
});
|
|
919
|
-
|
|
919
|
+
u(Qe, {
|
|
920
920
|
type: "TableBody",
|
|
921
921
|
label: "Table Body",
|
|
922
922
|
category: "core",
|
|
923
923
|
group: "table",
|
|
924
924
|
hidden: !0,
|
|
925
|
-
icon:
|
|
926
|
-
...
|
|
925
|
+
icon: W,
|
|
926
|
+
...d({
|
|
927
927
|
properties: {
|
|
928
928
|
styles: p("")
|
|
929
929
|
}
|
|
930
930
|
}),
|
|
931
931
|
blocks: B("TableBody")
|
|
932
932
|
});
|
|
933
|
-
|
|
933
|
+
u(Ze, {
|
|
934
934
|
type: "TableRow",
|
|
935
935
|
label: "Table Row",
|
|
936
936
|
category: "core",
|
|
937
937
|
group: "table",
|
|
938
938
|
hidden: !0,
|
|
939
|
-
icon:
|
|
940
|
-
...
|
|
939
|
+
icon: X,
|
|
940
|
+
...d({
|
|
941
941
|
properties: {
|
|
942
942
|
styles: p("")
|
|
943
943
|
}
|
|
944
944
|
}),
|
|
945
945
|
blocks: B("TableRow")
|
|
946
946
|
});
|
|
947
|
-
|
|
947
|
+
u(Ke, {
|
|
948
948
|
type: "TableCell",
|
|
949
949
|
label: "Table Cell",
|
|
950
950
|
category: "core",
|
|
951
951
|
group: "table",
|
|
952
952
|
hidden: !0,
|
|
953
|
-
icon:
|
|
954
|
-
...
|
|
953
|
+
icon: J,
|
|
954
|
+
...d({
|
|
955
955
|
properties: {
|
|
956
956
|
styles: p(""),
|
|
957
957
|
content: {
|
|
@@ -1009,15 +1009,15 @@ function B(e) {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
return e === "TableRow" ? t() : e === "TableHead" ? l() : e === "TableBody" ? r() : [];
|
|
1011
1011
|
}
|
|
1012
|
-
const
|
|
1012
|
+
const A = (e, ...o) => ({
|
|
1013
1013
|
...e,
|
|
1014
|
-
className:
|
|
1015
|
-
}),
|
|
1016
|
-
const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: i } = e, a =
|
|
1014
|
+
className: x(e.className, ...o)
|
|
1015
|
+
}), et = (e) => {
|
|
1016
|
+
const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: i } = e, a = A(l, "");
|
|
1017
1017
|
if (v(t))
|
|
1018
|
-
return /* @__PURE__ */ s(
|
|
1018
|
+
return /* @__PURE__ */ s(I, { inBuilder: n, className: "h-8 w-14" });
|
|
1019
1019
|
const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
1020
|
-
return
|
|
1020
|
+
return b.createElement("span", {
|
|
1021
1021
|
...o,
|
|
1022
1022
|
...a,
|
|
1023
1023
|
style: {
|
|
@@ -1026,13 +1026,13 @@ const E = (e, ...o) => ({
|
|
|
1026
1026
|
},
|
|
1027
1027
|
dangerouslySetInnerHTML: { __html: c }
|
|
1028
1028
|
});
|
|
1029
|
-
},
|
|
1029
|
+
}, tt = {
|
|
1030
1030
|
type: "Icon",
|
|
1031
1031
|
label: "web_blocks.icon",
|
|
1032
1032
|
category: "core",
|
|
1033
|
-
icon:
|
|
1033
|
+
icon: Q,
|
|
1034
1034
|
group: "media",
|
|
1035
|
-
...
|
|
1035
|
+
...d({
|
|
1036
1036
|
properties: {
|
|
1037
1037
|
styles: p(""),
|
|
1038
1038
|
icon: {
|
|
@@ -1053,9 +1053,9 @@ const E = (e, ...o) => ({
|
|
|
1053
1053
|
}
|
|
1054
1054
|
}
|
|
1055
1055
|
})
|
|
1056
|
-
},
|
|
1056
|
+
}, ot = (e) => {
|
|
1057
1057
|
const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height: i, width: a, lazyLoading: c } = e;
|
|
1058
|
-
return v(t) ? /* @__PURE__ */ s(
|
|
1058
|
+
return v(t) ? /* @__PURE__ */ s(I, { className: "h-36" }) : /* @__PURE__ */ h("picture", { children: [
|
|
1059
1059
|
l && /* @__PURE__ */ s("source", { srcSet: l, media: "(max-width: 480px)" }),
|
|
1060
1060
|
/* @__PURE__ */ s(
|
|
1061
1061
|
"img",
|
|
@@ -1070,14 +1070,14 @@ const E = (e, ...o) => ({
|
|
|
1070
1070
|
}
|
|
1071
1071
|
)
|
|
1072
1072
|
] });
|
|
1073
|
-
},
|
|
1073
|
+
}, lt = {
|
|
1074
1074
|
type: "Image",
|
|
1075
1075
|
description: "A image component",
|
|
1076
1076
|
label: "Image",
|
|
1077
1077
|
category: "core",
|
|
1078
|
-
icon:
|
|
1078
|
+
icon: Z,
|
|
1079
1079
|
group: "media",
|
|
1080
|
-
...
|
|
1080
|
+
...d({
|
|
1081
1081
|
properties: {
|
|
1082
1082
|
styles: p(""),
|
|
1083
1083
|
image: {
|
|
@@ -1119,7 +1119,7 @@ const E = (e, ...o) => ({
|
|
|
1119
1119
|
}),
|
|
1120
1120
|
aiProps: ["alt"],
|
|
1121
1121
|
i18nProps: ["alt"]
|
|
1122
|
-
},
|
|
1122
|
+
}, rt = (e) => {
|
|
1123
1123
|
const { blockProps: o, link: t, children: l, styles: r, inBuilder: n, content: i } = e;
|
|
1124
1124
|
let a = {};
|
|
1125
1125
|
return !l && v(i) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? l ? /* @__PURE__ */ s("span", { ...o, style: a, ...r, children: l }) : w(
|
|
@@ -1141,14 +1141,14 @@ const E = (e, ...o) => ({
|
|
|
1141
1141
|
},
|
|
1142
1142
|
i
|
|
1143
1143
|
);
|
|
1144
|
-
},
|
|
1144
|
+
}, nt = {
|
|
1145
1145
|
type: "Link",
|
|
1146
1146
|
description: "A link component",
|
|
1147
1147
|
label: "Link",
|
|
1148
1148
|
category: "core",
|
|
1149
|
-
icon:
|
|
1149
|
+
icon: K,
|
|
1150
1150
|
group: "basic",
|
|
1151
|
-
...
|
|
1151
|
+
...d({
|
|
1152
1152
|
properties: {
|
|
1153
1153
|
styles: p(""),
|
|
1154
1154
|
content: {
|
|
@@ -1177,21 +1177,21 @@ const E = (e, ...o) => ({
|
|
|
1177
1177
|
aiProps: ["content"],
|
|
1178
1178
|
i18nProps: ["content"],
|
|
1179
1179
|
canAcceptBlock: (e) => e !== "Link"
|
|
1180
|
-
},
|
|
1181
|
-
const { blockProps: o, children: t, listType: l, styles: r, tag: n, inBuilder: i } = e, a =
|
|
1182
|
-
return !t && v(r == null ? void 0 : r.className) ? /* @__PURE__ */ s(
|
|
1180
|
+
}, it = (e) => {
|
|
1181
|
+
const { blockProps: o, children: t, listType: l, styles: r, tag: n, inBuilder: i } = e, a = x(f(r, "className", ""), l);
|
|
1182
|
+
return !t && v(r == null ? void 0 : r.className) ? /* @__PURE__ */ s(I, { inBuilder: i }) : b.createElement(
|
|
1183
1183
|
n || (l === "list-decimal" ? "ol" : "ul"),
|
|
1184
1184
|
{ ...o, ...r, className: a },
|
|
1185
1185
|
t
|
|
1186
1186
|
);
|
|
1187
|
-
},
|
|
1187
|
+
}, st = {
|
|
1188
1188
|
type: "List",
|
|
1189
1189
|
description: "A list component",
|
|
1190
1190
|
label: "List",
|
|
1191
|
-
icon:
|
|
1191
|
+
icon: ee,
|
|
1192
1192
|
category: "core",
|
|
1193
1193
|
group: "basic",
|
|
1194
|
-
...
|
|
1194
|
+
...d({
|
|
1195
1195
|
properties: {
|
|
1196
1196
|
styles: p(""),
|
|
1197
1197
|
listType: {
|
|
@@ -1231,21 +1231,21 @@ const E = (e, ...o) => ({
|
|
|
1231
1231
|
content: "Item 3"
|
|
1232
1232
|
}
|
|
1233
1233
|
]
|
|
1234
|
-
},
|
|
1234
|
+
}, at = (e) => {
|
|
1235
1235
|
const { blockProps: o, content: t, styles: l, children: r, tag: n } = e;
|
|
1236
|
-
return r ?
|
|
1236
|
+
return r ? b.createElement(n || "li", { ...l, ...o }, r) : b.createElement(n || "li", {
|
|
1237
1237
|
...l,
|
|
1238
1238
|
...o,
|
|
1239
1239
|
dangerouslySetInnerHTML: { __html: t }
|
|
1240
1240
|
});
|
|
1241
|
-
},
|
|
1241
|
+
}, ct = {
|
|
1242
1242
|
type: "ListItem",
|
|
1243
1243
|
description: "A list item component",
|
|
1244
1244
|
label: "List Item",
|
|
1245
|
-
icon:
|
|
1245
|
+
icon: te,
|
|
1246
1246
|
category: "core",
|
|
1247
1247
|
group: "basic",
|
|
1248
|
-
...
|
|
1248
|
+
...d({
|
|
1249
1249
|
properties: {
|
|
1250
1250
|
styles: p(""),
|
|
1251
1251
|
content: {
|
|
@@ -1261,22 +1261,22 @@ const E = (e, ...o) => ({
|
|
|
1261
1261
|
i18nProps: ["content"],
|
|
1262
1262
|
aiProps: ["content"],
|
|
1263
1263
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
1264
|
-
canBeNested: (e) => e === "List"
|
|
1265
|
-
},
|
|
1264
|
+
canBeNested: (e) => e === "List" || e === "Repeater"
|
|
1265
|
+
}, pt = (e) => {
|
|
1266
1266
|
const { blockProps: o, styles: t, content: l } = e;
|
|
1267
|
-
return
|
|
1267
|
+
return ie(e.children) ? b.createElement("p", {
|
|
1268
1268
|
...t,
|
|
1269
1269
|
...o,
|
|
1270
1270
|
dangerouslySetInnerHTML: { __html: l }
|
|
1271
|
-
}) :
|
|
1272
|
-
},
|
|
1271
|
+
}) : b.createElement("p", { ...t, ...o }, e.children);
|
|
1272
|
+
}, ut = {
|
|
1273
1273
|
type: "Paragraph",
|
|
1274
1274
|
description: "A paragraph component",
|
|
1275
1275
|
label: "Paragraph",
|
|
1276
1276
|
category: "core",
|
|
1277
|
-
icon:
|
|
1277
|
+
icon: oe,
|
|
1278
1278
|
group: "typography",
|
|
1279
|
-
...
|
|
1279
|
+
...d({
|
|
1280
1280
|
properties: {
|
|
1281
1281
|
styles: p(""),
|
|
1282
1282
|
content: {
|
|
@@ -1292,31 +1292,31 @@ const E = (e, ...o) => ({
|
|
|
1292
1292
|
i18nProps: ["content"],
|
|
1293
1293
|
aiProps: ["content"],
|
|
1294
1294
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
1295
|
-
},
|
|
1295
|
+
}, dt = (e) => {
|
|
1296
1296
|
const { blockProps: o, inBuilder: t, children: l, partialBlockId: r } = e;
|
|
1297
|
-
return t && !r ? /* @__PURE__ */
|
|
1297
|
+
return t && !r ? /* @__PURE__ */ h(
|
|
1298
1298
|
"div",
|
|
1299
1299
|
{
|
|
1300
1300
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
1301
1301
|
...o,
|
|
1302
1302
|
children: [
|
|
1303
|
-
/* @__PURE__ */
|
|
1303
|
+
/* @__PURE__ */ h("h1", { children: [
|
|
1304
1304
|
"Partial Block - ",
|
|
1305
1305
|
r
|
|
1306
1306
|
] }),
|
|
1307
1307
|
/* @__PURE__ */ s("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
1308
1308
|
]
|
|
1309
1309
|
}
|
|
1310
|
-
) :
|
|
1311
|
-
},
|
|
1310
|
+
) : b.createElement("span", { ...o }, l);
|
|
1311
|
+
}, yt = {
|
|
1312
1312
|
type: "PartialBlock",
|
|
1313
1313
|
description: "A partial block component",
|
|
1314
1314
|
label: "Partial Block",
|
|
1315
|
-
icon:
|
|
1315
|
+
icon: E,
|
|
1316
1316
|
category: "core",
|
|
1317
1317
|
group: "basic",
|
|
1318
1318
|
hidden: !0,
|
|
1319
|
-
...
|
|
1319
|
+
...d({
|
|
1320
1320
|
properties: {
|
|
1321
1321
|
partialBlockId: {
|
|
1322
1322
|
type: "string",
|
|
@@ -1326,7 +1326,7 @@ const E = (e, ...o) => ({
|
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
1328
|
})
|
|
1329
|
-
},
|
|
1329
|
+
}, L = {
|
|
1330
1330
|
SMALL: {
|
|
1331
1331
|
1: "col-span-1",
|
|
1332
1332
|
2: "col-span-2",
|
|
@@ -1369,26 +1369,26 @@ const E = (e, ...o) => ({
|
|
|
1369
1369
|
11: "lg:col-span-11",
|
|
1370
1370
|
12: "lg:col-span-12"
|
|
1371
1371
|
}
|
|
1372
|
-
},
|
|
1372
|
+
}, mt = (e) => {
|
|
1373
1373
|
const { blockProps: o, children: t, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: i } = e, c = { className: [
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
n ?
|
|
1377
|
-
i ?
|
|
1374
|
+
f(l, "className", ""),
|
|
1375
|
+
f(L, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
|
|
1376
|
+
n ? f(L, ["MEDIUM", n || r], "") : "",
|
|
1377
|
+
i ? f(L, ["LARGE", n || r], "") : ""
|
|
1378
1378
|
].join(" ") };
|
|
1379
1379
|
return /* @__PURE__ */ s("div", { ...o, ...l, ...c, children: t || /* @__PURE__ */ s("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
1380
|
-
},
|
|
1380
|
+
}, gt = {
|
|
1381
1381
|
type: "Column",
|
|
1382
1382
|
description: "A column component",
|
|
1383
1383
|
label: "Column",
|
|
1384
1384
|
group: "basic",
|
|
1385
1385
|
category: "core",
|
|
1386
|
-
icon:
|
|
1386
|
+
icon: ue,
|
|
1387
1387
|
wrapper: !0,
|
|
1388
1388
|
canDelete: () => !0,
|
|
1389
1389
|
canAcceptBlock: () => !0,
|
|
1390
1390
|
canBeNested: (e) => e === "Row",
|
|
1391
|
-
...
|
|
1391
|
+
...d({
|
|
1392
1392
|
properties: {
|
|
1393
1393
|
styles: p(""),
|
|
1394
1394
|
colSpan: {
|
|
@@ -1413,15 +1413,15 @@ const E = (e, ...o) => ({
|
|
|
1413
1413
|
}
|
|
1414
1414
|
}
|
|
1415
1415
|
})
|
|
1416
|
-
},
|
|
1417
|
-
const { blockProps: o, children: t, styles: l, gutter: r } = e, i = { className: [
|
|
1416
|
+
}, bt = (e) => {
|
|
1417
|
+
const { blockProps: o, children: t, styles: l, gutter: r } = e, i = { className: [f(l, "className", ""), " grid grid-cols-12"].join() };
|
|
1418
1418
|
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${r}px` : i.style = { gap: `${r}px` }, /* @__PURE__ */ s("div", { ...o, ...l, ...i, children: t });
|
|
1419
|
-
},
|
|
1419
|
+
}, ft = {
|
|
1420
1420
|
type: "Row",
|
|
1421
1421
|
description: "A row component",
|
|
1422
1422
|
label: "Row",
|
|
1423
1423
|
group: "basic",
|
|
1424
|
-
icon:
|
|
1424
|
+
icon: de,
|
|
1425
1425
|
blocks: () => [
|
|
1426
1426
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1427
1427
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
@@ -1430,7 +1430,7 @@ const E = (e, ...o) => ({
|
|
|
1430
1430
|
category: "core",
|
|
1431
1431
|
wrapper: !0,
|
|
1432
1432
|
canAcceptBlock: (e) => e === "Column",
|
|
1433
|
-
...
|
|
1433
|
+
...d({
|
|
1434
1434
|
properties: {
|
|
1435
1435
|
styles: p(""),
|
|
1436
1436
|
colCount: {
|
|
@@ -1447,21 +1447,20 @@ const E = (e, ...o) => ({
|
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
1449
|
})
|
|
1450
|
-
},
|
|
1451
|
-
const { blockProps: o, content: t, styles: l } = e, r =
|
|
1450
|
+
}, ht = (e) => {
|
|
1451
|
+
const { blockProps: o, content: t, styles: l } = e, r = A(
|
|
1452
1452
|
l,
|
|
1453
|
-
"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"
|
|
1454
|
-
"max-w-full"
|
|
1453
|
+
"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"
|
|
1455
1454
|
);
|
|
1456
1455
|
return /* @__PURE__ */ s("div", { ...o, ...r, dangerouslySetInnerHTML: { __html: t } });
|
|
1457
|
-
},
|
|
1456
|
+
}, kt = {
|
|
1458
1457
|
type: "RichText",
|
|
1459
1458
|
description: "A rich text block",
|
|
1460
1459
|
label: "Rich Text",
|
|
1461
1460
|
category: "core",
|
|
1462
|
-
icon:
|
|
1461
|
+
icon: le,
|
|
1463
1462
|
group: "typography",
|
|
1464
|
-
...
|
|
1463
|
+
...d({
|
|
1465
1464
|
properties: {
|
|
1466
1465
|
styles: p(""),
|
|
1467
1466
|
content: {
|
|
@@ -1474,20 +1473,20 @@ const E = (e, ...o) => ({
|
|
|
1474
1473
|
}),
|
|
1475
1474
|
aiProps: ["content"],
|
|
1476
1475
|
i18nProps: ["content"]
|
|
1477
|
-
},
|
|
1476
|
+
}, wt = (e) => {
|
|
1478
1477
|
const { blockProps: o, styles: t, content: l, children: r = null, tag: n } = e;
|
|
1479
|
-
return r ?
|
|
1478
|
+
return r ? b.createElement("span", { ...t, ...o }, r) : b.createElement(n || "span", {
|
|
1480
1479
|
...t,
|
|
1481
1480
|
...o,
|
|
1482
1481
|
dangerouslySetInnerHTML: { __html: l || "" }
|
|
1483
1482
|
});
|
|
1484
|
-
},
|
|
1483
|
+
}, Ct = {
|
|
1485
1484
|
type: "Span",
|
|
1486
1485
|
description: "A span component",
|
|
1487
1486
|
label: "Span",
|
|
1488
1487
|
category: "core",
|
|
1489
1488
|
group: "typography",
|
|
1490
|
-
...
|
|
1489
|
+
...d({
|
|
1491
1490
|
properties: {
|
|
1492
1491
|
styles: p(""),
|
|
1493
1492
|
content: {
|
|
@@ -1501,15 +1500,15 @@ const E = (e, ...o) => ({
|
|
|
1501
1500
|
aiProps: ["content"],
|
|
1502
1501
|
i18nProps: ["content"],
|
|
1503
1502
|
canAcceptBlock: () => !0
|
|
1504
|
-
},
|
|
1503
|
+
}, vt = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s("span", { ...e.blockProps, children: e.content }) : `${e.content}`, It = {
|
|
1505
1504
|
type: "Text",
|
|
1506
1505
|
description: "A text component with no styling",
|
|
1507
1506
|
label: "Text",
|
|
1508
1507
|
hidden: !0,
|
|
1509
1508
|
category: "core",
|
|
1510
1509
|
group: "typography",
|
|
1511
|
-
icon:
|
|
1512
|
-
...
|
|
1510
|
+
icon: re,
|
|
1511
|
+
...d({
|
|
1513
1512
|
properties: {
|
|
1514
1513
|
styles: p("text-black"),
|
|
1515
1514
|
content: {
|
|
@@ -1521,7 +1520,7 @@ const E = (e, ...o) => ({
|
|
|
1521
1520
|
}),
|
|
1522
1521
|
aiProps: ["content"],
|
|
1523
1522
|
i18nProps: ["content"]
|
|
1524
|
-
},
|
|
1523
|
+
}, Bt = {
|
|
1525
1524
|
type: "object",
|
|
1526
1525
|
title: "Controls",
|
|
1527
1526
|
default: {
|
|
@@ -1552,18 +1551,18 @@ const E = (e, ...o) => ({
|
|
|
1552
1551
|
default: !1
|
|
1553
1552
|
}
|
|
1554
1553
|
}
|
|
1555
|
-
},
|
|
1556
|
-
const t =
|
|
1557
|
-
if (
|
|
1558
|
-
const i = e.match(
|
|
1554
|
+
}, _ = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, S = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/, xt = (e, o) => {
|
|
1555
|
+
const t = f(o, "autoplay", !1), l = f(o, "controls", !1), r = f(o, "loop", !1), n = t || f(o, "muted", !0);
|
|
1556
|
+
if (_.test(e)) {
|
|
1557
|
+
const i = e.match(_);
|
|
1559
1558
|
if (i) {
|
|
1560
1559
|
const a = i[4];
|
|
1561
1560
|
let c = `https://www.youtube.com/embed/${a}`, y = t ? "autoplay=1" : "";
|
|
1562
1561
|
return y += r ? `&loop=1&playlist=${a}` : "", y += n ? "&mute=1&muted=1" : "", y += l ? "&controls=1" : "&controls=0", `${c}?${y}`;
|
|
1563
1562
|
}
|
|
1564
1563
|
}
|
|
1565
|
-
if (
|
|
1566
|
-
const i = e.match(
|
|
1564
|
+
if (S.test(e)) {
|
|
1565
|
+
const i = e.match(S);
|
|
1567
1566
|
if (i) {
|
|
1568
1567
|
const a = i[1];
|
|
1569
1568
|
let c = "";
|
|
@@ -1571,29 +1570,29 @@ const E = (e, ...o) => ({
|
|
|
1571
1570
|
}
|
|
1572
1571
|
}
|
|
1573
1572
|
return null;
|
|
1574
|
-
},
|
|
1575
|
-
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: i } = e, a =
|
|
1576
|
-
return /* @__PURE__ */
|
|
1577
|
-
!a && i ? /* @__PURE__ */ s("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: v(o) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ s("iframe", { width: "100%", src: a, ...
|
|
1573
|
+
}, Lt = (e) => {
|
|
1574
|
+
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: i } = e, a = xt(o, r);
|
|
1575
|
+
return /* @__PURE__ */ h("div", { ...se(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
1576
|
+
!a && i ? /* @__PURE__ */ s("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: v(o) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ s("iframe", { width: "100%", src: a, ...ae(l, "className") }),
|
|
1578
1577
|
i && /* @__PURE__ */ s("div", { ...t, className: "absolute top-0 h-full w-full" })
|
|
1579
1578
|
] });
|
|
1580
|
-
},
|
|
1579
|
+
}, Pt = (e) => {
|
|
1581
1580
|
const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps: i } = e;
|
|
1582
1581
|
let a = n;
|
|
1583
|
-
const c = [...
|
|
1582
|
+
const c = [...f(r, "srcsets", []) || []];
|
|
1584
1583
|
o && typeof o == "string" && c.push({ url: o, width: "9999" });
|
|
1585
1584
|
const y = c.sort((g, m) => parseInt(g.width) - parseInt(m.width)).filter((g) => !v(g.url) && !v(g.width));
|
|
1586
1585
|
y.length === 0 && !a && (a = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
|
|
1587
|
-
const k =
|
|
1586
|
+
const k = f(l, "autoplay", !1) || f(l, "muted", !0);
|
|
1588
1587
|
return (a || !v(y)) && /* @__PURE__ */ s("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */ w(
|
|
1589
1588
|
"video",
|
|
1590
1589
|
{
|
|
1591
1590
|
...t,
|
|
1592
1591
|
...i,
|
|
1593
1592
|
key: JSON.stringify(y),
|
|
1594
|
-
controls:
|
|
1595
|
-
autoPlay:
|
|
1596
|
-
loop:
|
|
1593
|
+
controls: f(l, "controls", !1),
|
|
1594
|
+
autoPlay: f(l, "autoplay", !1),
|
|
1595
|
+
loop: f(l, "loop", !1),
|
|
1597
1596
|
poster: a,
|
|
1598
1597
|
...k ? { muted: !0 } : {}
|
|
1599
1598
|
},
|
|
@@ -1604,19 +1603,19 @@ const E = (e, ...o) => ({
|
|
|
1604
1603
|
}),
|
|
1605
1604
|
"Your browser does not support the video tag."
|
|
1606
1605
|
) });
|
|
1607
|
-
},
|
|
1606
|
+
}, _t = (e) => {
|
|
1608
1607
|
const { videoSource: o } = e;
|
|
1609
|
-
return o === "Custom" ? /* @__PURE__ */ s(
|
|
1608
|
+
return o === "Custom" ? /* @__PURE__ */ s(Pt, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ s(Lt, { ...e }) : /* @__PURE__ */ h("div", { children: [
|
|
1610
1609
|
"Invalid video source : ",
|
|
1611
1610
|
o
|
|
1612
1611
|
] });
|
|
1613
|
-
},
|
|
1612
|
+
}, St = {
|
|
1614
1613
|
type: "Video",
|
|
1615
1614
|
label: "Video",
|
|
1616
1615
|
category: "core",
|
|
1617
|
-
icon:
|
|
1616
|
+
icon: ne,
|
|
1618
1617
|
group: "media",
|
|
1619
|
-
...
|
|
1618
|
+
...d({
|
|
1620
1619
|
properties: {
|
|
1621
1620
|
styles: p("absolute h-full w-full object-cover"),
|
|
1622
1621
|
videoSource: {
|
|
@@ -1649,7 +1648,7 @@ const E = (e, ...o) => ({
|
|
|
1649
1648
|
type: "object",
|
|
1650
1649
|
default: { srcsets: [] }
|
|
1651
1650
|
},
|
|
1652
|
-
controls: { ...
|
|
1651
|
+
controls: { ...Bt }
|
|
1653
1652
|
}
|
|
1654
1653
|
}
|
|
1655
1654
|
},
|
|
@@ -1693,9 +1692,74 @@ const E = (e, ...o) => ({
|
|
|
1693
1692
|
}
|
|
1694
1693
|
}),
|
|
1695
1694
|
i18nProps: ["url"]
|
|
1696
|
-
},
|
|
1697
|
-
|
|
1695
|
+
}, Tt = ({ children: e, tag: o, blockProps: t, styles: l }) => b.createElement(o, { ...t, ...l }, e), Nt = {
|
|
1696
|
+
type: "Repeater",
|
|
1697
|
+
label: "Repeater",
|
|
1698
|
+
icon: $,
|
|
1699
|
+
group: "basic",
|
|
1700
|
+
blocks: () => [
|
|
1701
|
+
{ _id: "A", _type: "Repeater", tag: "ul" },
|
|
1702
|
+
{ _id: "B", _type: "RepeaterItem", parentTag: "ul", _parent: "A" }
|
|
1703
|
+
],
|
|
1704
|
+
...d({
|
|
1705
|
+
properties: {
|
|
1706
|
+
repeaterItems: {
|
|
1707
|
+
title: "Items",
|
|
1708
|
+
type: "string",
|
|
1709
|
+
binding: "array",
|
|
1710
|
+
default: ""
|
|
1711
|
+
},
|
|
1712
|
+
tag: {
|
|
1713
|
+
title: "Tag",
|
|
1714
|
+
type: "string",
|
|
1715
|
+
default: "ul",
|
|
1716
|
+
enum: ["div", "ul", "ol"]
|
|
1717
|
+
},
|
|
1718
|
+
styles: T(""),
|
|
1719
|
+
limit: {
|
|
1720
|
+
title: "Limit",
|
|
1721
|
+
type: "number",
|
|
1722
|
+
default: ""
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
})
|
|
1726
|
+
}, Rt = ({
|
|
1727
|
+
children: e,
|
|
1728
|
+
blockProps: o,
|
|
1729
|
+
styles: t,
|
|
1730
|
+
parentTag: l
|
|
1731
|
+
}) => {
|
|
1732
|
+
let r = "li";
|
|
1733
|
+
switch (l) {
|
|
1734
|
+
case "ul":
|
|
1735
|
+
r = "li";
|
|
1736
|
+
break;
|
|
1737
|
+
case "ol":
|
|
1738
|
+
r = "li";
|
|
1739
|
+
break;
|
|
1740
|
+
default:
|
|
1741
|
+
r = "div";
|
|
1742
|
+
}
|
|
1743
|
+
return b.createElement(r, { ...o, ...t }, e);
|
|
1744
|
+
}, Mt = {
|
|
1745
|
+
type: "RepeaterItem",
|
|
1746
|
+
label: "Repeater Item",
|
|
1747
|
+
icon: $,
|
|
1748
|
+
hidden: !0,
|
|
1749
|
+
group: "basic",
|
|
1750
|
+
...d({
|
|
1751
|
+
properties: {
|
|
1752
|
+
styles: T(""),
|
|
1753
|
+
parentTag: H("Repeater", "tag")
|
|
1754
|
+
}
|
|
1755
|
+
}),
|
|
1756
|
+
canAcceptBlock: (e) => e !== "RepeaterItem",
|
|
1757
|
+
canDelete: () => !1,
|
|
1758
|
+
canMove: () => !1,
|
|
1759
|
+
canDuplicate: () => !1
|
|
1760
|
+
}, qt = () => {
|
|
1761
|
+
u(ye, me), u(xe, Le), u(ge, be), u(Ge, Oe), u(pt, ut), u(wt, Ct), u(ht, kt), u(rt, nt), u(it, st), u(at, ct), u(et, tt), u(ot, lt), u(_t, St), u(ke, we), u(Ce, ve), u(vt, It), u(Se, Te), u(Ne, Re), u(Me, $e), u(Pe, _e), u(He, ze), u(Ve, je), u(qe, De), u(Ee, Ae), u(Ye, We), u(Ie, Be), u(Fe, Ue), u(dt, yt), u(bt, ft), u(mt, gt), u(fe, he), u(Tt, Nt), u(Rt, Mt);
|
|
1698
1762
|
};
|
|
1699
1763
|
export {
|
|
1700
|
-
|
|
1764
|
+
qt as loadWebBlocks
|
|
1701
1765
|
};
|