@chaibuilder/sdk 2.2.19 → 2.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.cjs +4 -4
- package/dist/core.d.ts +3 -1
- package/dist/core.js +393 -382
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +186 -172
- package/package.json +3 -3
package/dist/web-blocks.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { registerChaiBlockSchema as
|
|
2
|
-
import { jsx as s, jsxs as
|
|
3
|
-
import { c as B, g as
|
|
1
|
+
import { registerChaiBlockSchema as u, StylesProp as d, registerChaiBlock as p, stylesProp as P, closestBlockProp as H } from "@chaibuilder/runtime";
|
|
2
|
+
import { jsx as s, jsxs as f, Fragment as N } from "react/jsx-runtime";
|
|
3
|
+
import { c as B, g as v } from "./common-functions-BGzDsf1z.js";
|
|
4
4
|
import * as b from "react";
|
|
5
5
|
import { createElement as w } from "react";
|
|
6
6
|
import { ButtonIcon as R, CopyIcon as z, CodeIcon as D, DividerHorizontalIcon as j, CheckboxIcon as V, InputIcon as M, LetterCaseToggleIcon as q, 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 E } from "@radix-ui/react-icons";
|
|
7
|
-
import { isEmpty as
|
|
8
|
-
import { FileCode as ce, GroupIcon as pe, GlobeIcon as $, Columns as
|
|
9
|
-
const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div", { className: B("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ s("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null,
|
|
7
|
+
import { isEmpty as C, get as h, map as S, isNull as ie, omit as se, pick as ae } from "lodash-es";
|
|
8
|
+
import { FileCode as ce, GroupIcon as pe, GlobeIcon as $, Columns as de, Rows as ue } from "lucide-react";
|
|
9
|
+
const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div", { className: B("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ s("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, me = (e) => {
|
|
10
10
|
const { blockProps: o, inBuilder: t, backgroundImage: l, children: r, tag: n = "div", styles: i } = e;
|
|
11
11
|
let a = r;
|
|
12
12
|
r || (a = /* @__PURE__ */ s(I, { inBuilder: t }));
|
|
13
13
|
let c = {};
|
|
14
14
|
return l && (c = { backgroundImage: `url(${l})` }), b.createElement(n, { ...o, ...i, style: c }, a);
|
|
15
|
-
},
|
|
15
|
+
}, ye = {
|
|
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
|
+
...u({
|
|
22
22
|
properties: {
|
|
23
|
-
styles:
|
|
23
|
+
styles: d(""),
|
|
24
24
|
backgroundImage: {
|
|
25
25
|
type: "string",
|
|
26
26
|
default: "",
|
|
@@ -55,7 +55,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
55
55
|
}),
|
|
56
56
|
canAcceptBlock: () => !0
|
|
57
57
|
}, ge = (e) => {
|
|
58
|
-
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: i, iconPos: a, link: c, inBuilder:
|
|
58
|
+
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: i, iconPos: a, link: c, inBuilder: m } = e, k = l, g = i || /* @__PURE__ */ f(N, { children: [
|
|
59
59
|
/* @__PURE__ */ s("span", { "data-ai-key": "content", children: r }),
|
|
60
60
|
k && /* @__PURE__ */ s(
|
|
61
61
|
"div",
|
|
@@ -65,7 +65,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
65
65
|
dangerouslySetInnerHTML: { __html: k }
|
|
66
66
|
}
|
|
67
67
|
)
|
|
68
|
-
] }),
|
|
68
|
+
] }), y = w(
|
|
69
69
|
"button",
|
|
70
70
|
{
|
|
71
71
|
...o,
|
|
@@ -75,7 +75,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
75
75
|
},
|
|
76
76
|
g
|
|
77
77
|
);
|
|
78
|
-
return
|
|
78
|
+
return C(h(c, "href")) ? y : m ? /* @__PURE__ */ s("span", { children: y }) : /* @__PURE__ */ s("a", { "aria-label": r, href: h(c, "href") || "/", target: h(c, "target", "_self"), children: y });
|
|
79
79
|
}, be = {
|
|
80
80
|
type: "Button",
|
|
81
81
|
description: "similar to a button element in HTML",
|
|
@@ -83,9 +83,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
83
83
|
category: "core",
|
|
84
84
|
icon: R,
|
|
85
85
|
group: "basic",
|
|
86
|
-
...
|
|
86
|
+
...u({
|
|
87
87
|
properties: {
|
|
88
|
-
styles:
|
|
88
|
+
styles: d("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
|
|
89
89
|
content: {
|
|
90
90
|
type: "string",
|
|
91
91
|
title: "Button label",
|
|
@@ -129,7 +129,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
129
129
|
i18nProps: ["content"],
|
|
130
130
|
aiProps: ["content"]
|
|
131
131
|
}, fe = (e) => {
|
|
132
|
-
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n } = e, i = l, a = /* @__PURE__ */
|
|
132
|
+
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n } = e, i = l, a = /* @__PURE__ */ f(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
|
] });
|
|
@@ -150,9 +150,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
150
150
|
category: "core",
|
|
151
151
|
icon: z,
|
|
152
152
|
group: "basic",
|
|
153
|
-
...
|
|
153
|
+
...u({
|
|
154
154
|
properties: {
|
|
155
|
-
styles:
|
|
155
|
+
styles: d("p-2 rounded-md flex items-center"),
|
|
156
156
|
content: {
|
|
157
157
|
type: "string",
|
|
158
158
|
title: "Button label",
|
|
@@ -175,7 +175,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
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__ */ f("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,
|
|
@@ -193,9 +193,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
193
193
|
category: "core",
|
|
194
194
|
icon: D,
|
|
195
195
|
group: "advanced",
|
|
196
|
-
...
|
|
196
|
+
...u({
|
|
197
197
|
properties: {
|
|
198
|
-
styles:
|
|
198
|
+
styles: d(""),
|
|
199
199
|
htmlCode: {
|
|
200
200
|
type: "string",
|
|
201
201
|
default: "<div><p>Enter your HTML code here...</p></div>",
|
|
@@ -203,17 +203,17 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
})
|
|
206
|
-
},
|
|
206
|
+
}, ve = (e) => {
|
|
207
207
|
const { scripts: o, inBuilder: t, blockProps: l } = e;
|
|
208
208
|
return t ? /* @__PURE__ */ s("div", { ...l, children: /* @__PURE__ */ s("div", { className: B("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ s("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ s("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ s("div", { dangerouslySetInnerHTML: { __html: o } });
|
|
209
|
-
},
|
|
209
|
+
}, Ce = {
|
|
210
210
|
type: "CustomScript",
|
|
211
211
|
description: "similar to a script element in HTML",
|
|
212
212
|
label: "Custom Script",
|
|
213
213
|
category: "core",
|
|
214
214
|
icon: ce,
|
|
215
215
|
group: "advanced",
|
|
216
|
-
...
|
|
216
|
+
...u({
|
|
217
217
|
properties: {
|
|
218
218
|
scripts: {
|
|
219
219
|
type: "string",
|
|
@@ -234,9 +234,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
234
234
|
category: "core",
|
|
235
235
|
icon: j,
|
|
236
236
|
group: "basic",
|
|
237
|
-
...
|
|
237
|
+
...u({
|
|
238
238
|
properties: {
|
|
239
|
-
styles:
|
|
239
|
+
styles: d("bg-gray-900 h-0.5 py-2 my-1")
|
|
240
240
|
}
|
|
241
241
|
})
|
|
242
242
|
}, Be = (e) => {
|
|
@@ -249,9 +249,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
249
249
|
label: "Empty Box",
|
|
250
250
|
category: "core",
|
|
251
251
|
group: "basic",
|
|
252
|
-
...
|
|
252
|
+
...u({
|
|
253
253
|
properties: {
|
|
254
|
-
styles:
|
|
254
|
+
styles: d(""),
|
|
255
255
|
backgroundImage: {
|
|
256
256
|
type: "string",
|
|
257
257
|
title: "Background Image",
|
|
@@ -261,24 +261,24 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
261
261
|
}
|
|
262
262
|
})
|
|
263
263
|
}, Pe = (e) => {
|
|
264
|
-
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: a, showLabel: c = !0 } = e,
|
|
265
|
-
return c ? /* @__PURE__ */
|
|
264
|
+
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: a, showLabel: c = !0 } = e, m = v();
|
|
265
|
+
return c ? /* @__PURE__ */ f("div", { ...r, ...o, children: [
|
|
266
266
|
/* @__PURE__ */ s(
|
|
267
267
|
"input",
|
|
268
268
|
{
|
|
269
269
|
...n,
|
|
270
270
|
name: t,
|
|
271
|
-
id:
|
|
271
|
+
id: m,
|
|
272
272
|
type: "checkbox",
|
|
273
273
|
required: i,
|
|
274
274
|
defaultChecked: a
|
|
275
275
|
}
|
|
276
276
|
),
|
|
277
|
-
l && /* @__PURE__ */ s("label", { htmlFor:
|
|
277
|
+
l && /* @__PURE__ */ s("label", { htmlFor: m, children: l })
|
|
278
278
|
] }) : /* @__PURE__ */ s(
|
|
279
279
|
"input",
|
|
280
280
|
{
|
|
281
|
-
id:
|
|
281
|
+
id: m,
|
|
282
282
|
...o,
|
|
283
283
|
...n,
|
|
284
284
|
...r,
|
|
@@ -293,10 +293,10 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
293
293
|
category: "core",
|
|
294
294
|
icon: V,
|
|
295
295
|
group: "form",
|
|
296
|
-
...
|
|
296
|
+
...u({
|
|
297
297
|
properties: {
|
|
298
|
-
styles:
|
|
299
|
-
inputStyles:
|
|
298
|
+
styles: d("flex items-center gap-x-2"),
|
|
299
|
+
inputStyles: d(""),
|
|
300
300
|
fieldName: {
|
|
301
301
|
type: "string",
|
|
302
302
|
title: "Field Name",
|
|
@@ -329,7 +329,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
329
329
|
}, _e = (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(I, { inBuilder: a })), /* @__PURE__ */
|
|
332
|
+
return o || (c = /* @__PURE__ */ s(I, { inBuilder: a })), /* @__PURE__ */ f(
|
|
333
333
|
"form",
|
|
334
334
|
{
|
|
335
335
|
...{
|
|
@@ -367,9 +367,9 @@ const I = ({ 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
|
+
...u({
|
|
371
371
|
properties: {
|
|
372
|
-
styles:
|
|
372
|
+
styles: d(""),
|
|
373
373
|
action: {
|
|
374
374
|
type: "string",
|
|
375
375
|
title: "Submit URL",
|
|
@@ -393,11 +393,11 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
393
393
|
aiProps: ["errorMessage", "successMessage"],
|
|
394
394
|
canAcceptBlock: () => !0
|
|
395
395
|
}, Ne = (e) => {
|
|
396
|
-
const { blockProps: o, inBuilder: t, label: l, styles: r, inputStyles: n, icon: i, iconSize: a, iconPos: c } = e,
|
|
397
|
-
return /* @__PURE__ */
|
|
396
|
+
const { blockProps: o, inBuilder: t, label: l, styles: r, inputStyles: n, icon: i, iconSize: a, iconPos: c } = e, m = v();
|
|
397
|
+
return /* @__PURE__ */ f(
|
|
398
398
|
"button",
|
|
399
399
|
{
|
|
400
|
-
id:
|
|
400
|
+
id: m,
|
|
401
401
|
...{
|
|
402
402
|
"x-bind:disabled": "formLoading"
|
|
403
403
|
},
|
|
@@ -425,12 +425,12 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
425
425
|
category: "core",
|
|
426
426
|
icon: R,
|
|
427
427
|
group: "form",
|
|
428
|
-
...
|
|
428
|
+
...u({
|
|
429
429
|
properties: {
|
|
430
|
-
styles:
|
|
430
|
+
styles: d(
|
|
431
431
|
"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
|
|
432
432
|
),
|
|
433
|
-
inputStyles:
|
|
433
|
+
inputStyles: d(""),
|
|
434
434
|
label: {
|
|
435
435
|
type: "string",
|
|
436
436
|
title: "Label",
|
|
@@ -469,10 +469,10 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
469
469
|
inputStyles: i,
|
|
470
470
|
showLabel: a,
|
|
471
471
|
required: c,
|
|
472
|
-
inputType:
|
|
472
|
+
inputType: m,
|
|
473
473
|
autocomplete: k
|
|
474
|
-
} = e, g =
|
|
475
|
-
return a ? /* @__PURE__ */
|
|
474
|
+
} = e, g = v();
|
|
475
|
+
return a ? /* @__PURE__ */ f("div", { ...n, ...o, children: [
|
|
476
476
|
a && /* @__PURE__ */ s("label", { htmlFor: g, children: l }),
|
|
477
477
|
/* @__PURE__ */ s(
|
|
478
478
|
"input",
|
|
@@ -480,7 +480,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
480
480
|
name: t,
|
|
481
481
|
...i,
|
|
482
482
|
id: g,
|
|
483
|
-
type:
|
|
483
|
+
type: m,
|
|
484
484
|
placeholder: r,
|
|
485
485
|
required: c,
|
|
486
486
|
autoComplete: k ? "on" : "off"
|
|
@@ -494,7 +494,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
494
494
|
...o,
|
|
495
495
|
...i,
|
|
496
496
|
...n,
|
|
497
|
-
type:
|
|
497
|
+
type: m,
|
|
498
498
|
placeholder: r,
|
|
499
499
|
required: c,
|
|
500
500
|
autoComplete: k ? "on" : "off"
|
|
@@ -506,10 +506,10 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
506
506
|
category: "core",
|
|
507
507
|
icon: M,
|
|
508
508
|
group: "form",
|
|
509
|
-
...
|
|
509
|
+
...u({
|
|
510
510
|
properties: {
|
|
511
|
-
styles:
|
|
512
|
-
inputStyles:
|
|
511
|
+
styles: d(""),
|
|
512
|
+
inputStyles: d("w-full p-1"),
|
|
513
513
|
fieldName: {
|
|
514
514
|
type: "string",
|
|
515
515
|
title: "Field Name",
|
|
@@ -577,9 +577,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
577
577
|
category: "core",
|
|
578
578
|
icon: q,
|
|
579
579
|
group: "form",
|
|
580
|
-
...
|
|
580
|
+
...u({
|
|
581
581
|
properties: {
|
|
582
|
-
styles:
|
|
582
|
+
styles: d(),
|
|
583
583
|
content: {
|
|
584
584
|
type: "string",
|
|
585
585
|
title: "Content",
|
|
@@ -590,14 +590,14 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
590
590
|
aiProps: ["content"],
|
|
591
591
|
i18nProps: ["content"]
|
|
592
592
|
}, He = (e) => {
|
|
593
|
-
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: a, showLabel: c = !0 } = e,
|
|
594
|
-
return c ? /* @__PURE__ */
|
|
595
|
-
/* @__PURE__ */ s("input", { ...n, name: t, id:
|
|
596
|
-
l && /* @__PURE__ */ s("label", { htmlFor:
|
|
593
|
+
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: a, showLabel: c = !0 } = e, m = v();
|
|
594
|
+
return c ? /* @__PURE__ */ f("div", { ...r, ...o, children: [
|
|
595
|
+
/* @__PURE__ */ s("input", { ...n, name: t, id: m, type: "radio", required: i, defaultChecked: a }),
|
|
596
|
+
l && /* @__PURE__ */ s("label", { htmlFor: m, children: l })
|
|
597
597
|
] }) : /* @__PURE__ */ s(
|
|
598
598
|
"input",
|
|
599
599
|
{
|
|
600
|
-
id:
|
|
600
|
+
id: m,
|
|
601
601
|
...o,
|
|
602
602
|
...n,
|
|
603
603
|
...r,
|
|
@@ -613,10 +613,10 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
613
613
|
category: "core",
|
|
614
614
|
icon: F,
|
|
615
615
|
group: "form",
|
|
616
|
-
...
|
|
616
|
+
...u({
|
|
617
617
|
properties: {
|
|
618
|
-
styles:
|
|
619
|
-
inputStyles:
|
|
618
|
+
styles: d("flex items-center gap-x-2"),
|
|
619
|
+
inputStyles: d(""),
|
|
620
620
|
fieldName: {
|
|
621
621
|
type: "string",
|
|
622
622
|
title: "Field Name",
|
|
@@ -647,16 +647,16 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
647
647
|
aiProps: ["label"],
|
|
648
648
|
i18nProps: ["label"]
|
|
649
649
|
}, De = (e) => {
|
|
650
|
-
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, required: a, showLabel: c, _multiple:
|
|
651
|
-
return c ? /* @__PURE__ */
|
|
650
|
+
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, required: a, showLabel: c, _multiple: m, options: k } = e, g = v();
|
|
651
|
+
return c ? /* @__PURE__ */ f("div", { ...n, ...o, children: [
|
|
652
652
|
c && /* @__PURE__ */ s("label", { htmlFor: g, children: l }),
|
|
653
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ f("select", { ...i, id: g, required: a, multiple: m, name: t, children: [
|
|
654
654
|
/* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
|
|
655
|
-
S(k, (
|
|
655
|
+
S(k, (y) => /* @__PURE__ */ s("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
|
|
656
656
|
] })
|
|
657
|
-
] }) : /* @__PURE__ */
|
|
657
|
+
] }) : /* @__PURE__ */ f("select", { id: g, ...n, ...o, required: a, multiple: m, name: t, children: [
|
|
658
658
|
/* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
|
|
659
|
-
S(k, (
|
|
659
|
+
S(k, (y) => /* @__PURE__ */ s("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
|
|
660
660
|
] });
|
|
661
661
|
}, je = {
|
|
662
662
|
type: "Select",
|
|
@@ -664,10 +664,10 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
664
664
|
category: "core",
|
|
665
665
|
icon: U,
|
|
666
666
|
group: "form",
|
|
667
|
-
...
|
|
667
|
+
...u({
|
|
668
668
|
properties: {
|
|
669
|
-
styles:
|
|
670
|
-
inputStyles:
|
|
669
|
+
styles: d(""),
|
|
670
|
+
inputStyles: d("w-full p-1"),
|
|
671
671
|
fieldName: {
|
|
672
672
|
type: "string",
|
|
673
673
|
title: "Field Name",
|
|
@@ -723,8 +723,8 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
723
723
|
aiProps: ["label", "placeholder"],
|
|
724
724
|
i18nProps: ["label", "placeholder"]
|
|
725
725
|
}, Ve = (e) => {
|
|
726
|
-
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, rows: a, showLabel: c, required:
|
|
727
|
-
return c ? /* @__PURE__ */
|
|
726
|
+
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, rows: a, showLabel: c, required: m } = e, k = v();
|
|
727
|
+
return c ? /* @__PURE__ */ f("div", { ...n, ...o, children: [
|
|
728
728
|
c && /* @__PURE__ */ s("label", { htmlFor: k, children: l }),
|
|
729
729
|
/* @__PURE__ */ s(
|
|
730
730
|
"textarea",
|
|
@@ -734,7 +734,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
734
734
|
id: k,
|
|
735
735
|
placeholder: r,
|
|
736
736
|
rows: a,
|
|
737
|
-
required:
|
|
737
|
+
required: m
|
|
738
738
|
}
|
|
739
739
|
)
|
|
740
740
|
] }) : /* @__PURE__ */ s(
|
|
@@ -747,7 +747,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
747
747
|
...n,
|
|
748
748
|
placeholder: r,
|
|
749
749
|
rows: a,
|
|
750
|
-
required:
|
|
750
|
+
required: m
|
|
751
751
|
}
|
|
752
752
|
);
|
|
753
753
|
}, qe = {
|
|
@@ -756,15 +756,15 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
756
756
|
category: "core",
|
|
757
757
|
icon: M,
|
|
758
758
|
group: "form",
|
|
759
|
-
...
|
|
759
|
+
...u({
|
|
760
760
|
properties: {
|
|
761
761
|
fieldName: {
|
|
762
762
|
type: "string",
|
|
763
763
|
title: "Field Name",
|
|
764
764
|
default: "fieldName"
|
|
765
765
|
},
|
|
766
|
-
styles:
|
|
767
|
-
inputStyles:
|
|
766
|
+
styles: d(""),
|
|
767
|
+
inputStyles: d("w-full p-1"),
|
|
768
768
|
showLabel: {
|
|
769
769
|
type: "boolean",
|
|
770
770
|
title: "Show Label",
|
|
@@ -797,13 +797,13 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
797
797
|
i18nProps: ["label", "placeholder"]
|
|
798
798
|
}, Fe = (e) => {
|
|
799
799
|
const { blockProps: o, inBuilder: t, children: l, globalBlock: r } = e;
|
|
800
|
-
return t && !r ? /* @__PURE__ */
|
|
800
|
+
return t && !r ? /* @__PURE__ */ f(
|
|
801
801
|
"div",
|
|
802
802
|
{
|
|
803
803
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
804
804
|
...o,
|
|
805
805
|
children: [
|
|
806
|
-
/* @__PURE__ */
|
|
806
|
+
/* @__PURE__ */ f("h1", { children: [
|
|
807
807
|
"Global Block - ",
|
|
808
808
|
r
|
|
809
809
|
] }),
|
|
@@ -819,7 +819,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
819
819
|
category: "core",
|
|
820
820
|
group: "basic",
|
|
821
821
|
hidden: !0,
|
|
822
|
-
...
|
|
822
|
+
...u({
|
|
823
823
|
properties: {
|
|
824
824
|
globalBlock: {
|
|
825
825
|
type: "string",
|
|
@@ -843,7 +843,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
843
843
|
category: "core",
|
|
844
844
|
icon: G,
|
|
845
845
|
group: "typography",
|
|
846
|
-
...
|
|
846
|
+
...u({
|
|
847
847
|
properties: {
|
|
848
848
|
tag: {
|
|
849
849
|
type: "string",
|
|
@@ -851,7 +851,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
851
851
|
title: "Level",
|
|
852
852
|
enum: ["h1", "h2", "h3", "h4", "h5", "h6"]
|
|
853
853
|
},
|
|
854
|
-
styles:
|
|
854
|
+
styles: d("text-3xl"),
|
|
855
855
|
content: {
|
|
856
856
|
type: "string",
|
|
857
857
|
default: "Heading goes here",
|
|
@@ -872,9 +872,9 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
872
872
|
category: "core",
|
|
873
873
|
group: "basic",
|
|
874
874
|
hidden: !0,
|
|
875
|
-
...
|
|
875
|
+
...u({
|
|
876
876
|
properties: {
|
|
877
|
-
styles:
|
|
877
|
+
styles: d("")
|
|
878
878
|
}
|
|
879
879
|
}),
|
|
880
880
|
canAcceptBlock: () => !0,
|
|
@@ -895,7 +895,7 @@ const I = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s("div",
|
|
|
895
895
|
return t ? w("tr", { ...o, ...l }, t) : /* @__PURE__ */ s(I, {});
|
|
896
896
|
}, Ke = (e) => {
|
|
897
897
|
const { blockProps: o, children: t, content: l, styles: r } = e;
|
|
898
|
-
return !t &&
|
|
898
|
+
return !t && C(l) ? /* @__PURE__ */ s(I, {}) : t ? w("td", { ...o, ...r }, t) : w("td", {
|
|
899
899
|
...o,
|
|
900
900
|
...r,
|
|
901
901
|
dangerouslySetInnerHTML: { __html: l }
|
|
@@ -908,9 +908,9 @@ p(Xe, {
|
|
|
908
908
|
group: "table",
|
|
909
909
|
hidden: !0,
|
|
910
910
|
icon: O,
|
|
911
|
-
...
|
|
911
|
+
...u({
|
|
912
912
|
properties: {
|
|
913
|
-
styles:
|
|
913
|
+
styles: d("")
|
|
914
914
|
}
|
|
915
915
|
}),
|
|
916
916
|
blocks: x("Table")
|
|
@@ -922,9 +922,9 @@ p(Je, {
|
|
|
922
922
|
group: "table",
|
|
923
923
|
hidden: !0,
|
|
924
924
|
icon: Y,
|
|
925
|
-
...
|
|
925
|
+
...u({
|
|
926
926
|
properties: {
|
|
927
|
-
styles:
|
|
927
|
+
styles: d("")
|
|
928
928
|
}
|
|
929
929
|
}),
|
|
930
930
|
blocks: x("TableHead")
|
|
@@ -936,9 +936,9 @@ p(Qe, {
|
|
|
936
936
|
group: "table",
|
|
937
937
|
hidden: !0,
|
|
938
938
|
icon: W,
|
|
939
|
-
...
|
|
939
|
+
...u({
|
|
940
940
|
properties: {
|
|
941
|
-
styles:
|
|
941
|
+
styles: d("")
|
|
942
942
|
}
|
|
943
943
|
}),
|
|
944
944
|
blocks: x("TableBody")
|
|
@@ -950,9 +950,9 @@ p(Ze, {
|
|
|
950
950
|
group: "table",
|
|
951
951
|
hidden: !0,
|
|
952
952
|
icon: X,
|
|
953
|
-
...
|
|
953
|
+
...u({
|
|
954
954
|
properties: {
|
|
955
|
-
styles:
|
|
955
|
+
styles: d("")
|
|
956
956
|
}
|
|
957
957
|
}),
|
|
958
958
|
blocks: x("TableRow")
|
|
@@ -964,9 +964,9 @@ p(Ke, {
|
|
|
964
964
|
group: "table",
|
|
965
965
|
hidden: !0,
|
|
966
966
|
icon: J,
|
|
967
|
-
...
|
|
967
|
+
...u({
|
|
968
968
|
properties: {
|
|
969
|
-
styles:
|
|
969
|
+
styles: d(""),
|
|
970
970
|
content: {
|
|
971
971
|
type: "string",
|
|
972
972
|
default: "Heading goes here",
|
|
@@ -981,27 +981,27 @@ p(Ke, {
|
|
|
981
981
|
});
|
|
982
982
|
function x(e) {
|
|
983
983
|
const o = (n, i) => ({
|
|
984
|
-
_id:
|
|
984
|
+
_id: v(),
|
|
985
985
|
_parent: n,
|
|
986
986
|
_type: "TableCell",
|
|
987
987
|
styles: "#styles:,",
|
|
988
988
|
content: `${e === "TableHead" ? "Table Head" : "Table Cell " + i}`
|
|
989
989
|
}), t = (n) => {
|
|
990
|
-
const i =
|
|
990
|
+
const i = v(), a = {
|
|
991
991
|
_type: "TableRow",
|
|
992
992
|
_id: i,
|
|
993
993
|
styles: "#styles:,border-b"
|
|
994
994
|
};
|
|
995
995
|
return n && (a._parent = n), [a, o(i, "1"), o(i, "2"), o(i, "3")];
|
|
996
996
|
}, l = (n) => {
|
|
997
|
-
const i =
|
|
997
|
+
const i = v(), a = {
|
|
998
998
|
_id: i,
|
|
999
999
|
_type: "TableHead",
|
|
1000
1000
|
styles: "#styles:,font-medium"
|
|
1001
1001
|
};
|
|
1002
1002
|
return n && (a._parent = n), [a, ...t(i)];
|
|
1003
1003
|
}, r = (n) => {
|
|
1004
|
-
const i =
|
|
1004
|
+
const i = v(), a = {
|
|
1005
1005
|
_id: i,
|
|
1006
1006
|
_type: "TableBody",
|
|
1007
1007
|
styles: "#styles:,"
|
|
@@ -1009,7 +1009,7 @@ function x(e) {
|
|
|
1009
1009
|
return n && (a._parent = n), [a, ...t(i), ...t(i)];
|
|
1010
1010
|
};
|
|
1011
1011
|
if (e === "Table") {
|
|
1012
|
-
const n =
|
|
1012
|
+
const n = v();
|
|
1013
1013
|
return [
|
|
1014
1014
|
{
|
|
1015
1015
|
_id: n,
|
|
@@ -1027,7 +1027,7 @@ const A = (e, ...o) => ({
|
|
|
1027
1027
|
className: B(e.className, ...o)
|
|
1028
1028
|
}), et = (e) => {
|
|
1029
1029
|
const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: i } = e, a = A(l, "");
|
|
1030
|
-
if (
|
|
1030
|
+
if (C(t))
|
|
1031
1031
|
return /* @__PURE__ */ s(I, { inBuilder: n, className: "h-8 w-14" });
|
|
1032
1032
|
const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
1033
1033
|
return b.createElement("span", {
|
|
@@ -1045,9 +1045,9 @@ const A = (e, ...o) => ({
|
|
|
1045
1045
|
category: "core",
|
|
1046
1046
|
icon: Q,
|
|
1047
1047
|
group: "media",
|
|
1048
|
-
...
|
|
1048
|
+
...u({
|
|
1049
1049
|
properties: {
|
|
1050
|
-
styles:
|
|
1050
|
+
styles: d(""),
|
|
1051
1051
|
icon: {
|
|
1052
1052
|
type: "string",
|
|
1053
1053
|
title: "Icon",
|
|
@@ -1068,7 +1068,7 @@ const A = (e, ...o) => ({
|
|
|
1068
1068
|
})
|
|
1069
1069
|
}, ot = (e) => {
|
|
1070
1070
|
const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height: i, width: a, lazyLoading: c } = e;
|
|
1071
|
-
return
|
|
1071
|
+
return C(t) ? /* @__PURE__ */ s(I, { className: "h-36" }) : /* @__PURE__ */ f("picture", { children: [
|
|
1072
1072
|
l && /* @__PURE__ */ s("source", { srcSet: l, media: "(max-width: 480px)" }),
|
|
1073
1073
|
/* @__PURE__ */ s(
|
|
1074
1074
|
"img",
|
|
@@ -1090,9 +1090,9 @@ const A = (e, ...o) => ({
|
|
|
1090
1090
|
category: "core",
|
|
1091
1091
|
icon: Z,
|
|
1092
1092
|
group: "media",
|
|
1093
|
-
...
|
|
1093
|
+
...u({
|
|
1094
1094
|
properties: {
|
|
1095
|
-
styles:
|
|
1095
|
+
styles: d(""),
|
|
1096
1096
|
image: {
|
|
1097
1097
|
type: "string",
|
|
1098
1098
|
title: "Image",
|
|
@@ -1141,7 +1141,7 @@ const A = (e, ...o) => ({
|
|
|
1141
1141
|
}, rt = (e) => {
|
|
1142
1142
|
const { blockProps: o, link: t, children: l, styles: r, inBuilder: n, content: i } = e;
|
|
1143
1143
|
let a = {};
|
|
1144
|
-
return !l &&
|
|
1144
|
+
return !l && C(i) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? l ? /* @__PURE__ */ s("span", { ...o, style: a, ...r, children: l }) : w(
|
|
1145
1145
|
"span",
|
|
1146
1146
|
{
|
|
1147
1147
|
...o,
|
|
@@ -1167,9 +1167,9 @@ const A = (e, ...o) => ({
|
|
|
1167
1167
|
category: "core",
|
|
1168
1168
|
icon: K,
|
|
1169
1169
|
group: "basic",
|
|
1170
|
-
...
|
|
1170
|
+
...u({
|
|
1171
1171
|
properties: {
|
|
1172
|
-
styles:
|
|
1172
|
+
styles: d(""),
|
|
1173
1173
|
content: {
|
|
1174
1174
|
type: "string",
|
|
1175
1175
|
default: "Link goes here",
|
|
@@ -1197,8 +1197,8 @@ const A = (e, ...o) => ({
|
|
|
1197
1197
|
i18nProps: ["content"],
|
|
1198
1198
|
canAcceptBlock: (e) => e !== "Link"
|
|
1199
1199
|
}, it = (e) => {
|
|
1200
|
-
const { blockProps: o, children: t, listType: l, styles: r, tag: n, inBuilder: i } = e, a = B(
|
|
1201
|
-
return !t &&
|
|
1200
|
+
const { blockProps: o, children: t, listType: l, styles: r, tag: n, inBuilder: i } = e, a = B(h(r, "className", ""), l);
|
|
1201
|
+
return !t && C(r == null ? void 0 : r.className) ? /* @__PURE__ */ s(I, { inBuilder: i }) : b.createElement(
|
|
1202
1202
|
n || (l === "list-decimal" ? "ol" : "ul"),
|
|
1203
1203
|
{ ...o, ...r, className: a },
|
|
1204
1204
|
t
|
|
@@ -1210,9 +1210,9 @@ const A = (e, ...o) => ({
|
|
|
1210
1210
|
icon: ee,
|
|
1211
1211
|
category: "core",
|
|
1212
1212
|
group: "basic",
|
|
1213
|
-
...
|
|
1213
|
+
...u({
|
|
1214
1214
|
properties: {
|
|
1215
|
-
styles:
|
|
1215
|
+
styles: d(""),
|
|
1216
1216
|
listType: {
|
|
1217
1217
|
type: "string",
|
|
1218
1218
|
title: "List Type",
|
|
@@ -1264,9 +1264,9 @@ const A = (e, ...o) => ({
|
|
|
1264
1264
|
icon: te,
|
|
1265
1265
|
category: "core",
|
|
1266
1266
|
group: "basic",
|
|
1267
|
-
...
|
|
1267
|
+
...u({
|
|
1268
1268
|
properties: {
|
|
1269
|
-
styles:
|
|
1269
|
+
styles: d(""),
|
|
1270
1270
|
content: {
|
|
1271
1271
|
type: "string",
|
|
1272
1272
|
default: "List item",
|
|
@@ -1288,16 +1288,16 @@ const A = (e, ...o) => ({
|
|
|
1288
1288
|
...o,
|
|
1289
1289
|
dangerouslySetInnerHTML: { __html: l }
|
|
1290
1290
|
}) : b.createElement("p", { ...t, ...o }, e.children);
|
|
1291
|
-
},
|
|
1291
|
+
}, dt = {
|
|
1292
1292
|
type: "Paragraph",
|
|
1293
1293
|
description: "A paragraph component",
|
|
1294
1294
|
label: "Paragraph",
|
|
1295
1295
|
category: "core",
|
|
1296
1296
|
icon: oe,
|
|
1297
1297
|
group: "typography",
|
|
1298
|
-
...
|
|
1298
|
+
...u({
|
|
1299
1299
|
properties: {
|
|
1300
|
-
styles:
|
|
1300
|
+
styles: d(""),
|
|
1301
1301
|
content: {
|
|
1302
1302
|
type: "string",
|
|
1303
1303
|
title: "Content",
|
|
@@ -1311,15 +1311,15 @@ const A = (e, ...o) => ({
|
|
|
1311
1311
|
i18nProps: ["content"],
|
|
1312
1312
|
aiProps: ["content"],
|
|
1313
1313
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
1314
|
-
},
|
|
1314
|
+
}, ut = (e) => {
|
|
1315
1315
|
const { blockProps: o, inBuilder: t, children: l, partialBlockId: r } = e;
|
|
1316
|
-
return t && !r ? /* @__PURE__ */
|
|
1316
|
+
return t && !r ? /* @__PURE__ */ f(
|
|
1317
1317
|
"div",
|
|
1318
1318
|
{
|
|
1319
1319
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
1320
1320
|
...o,
|
|
1321
1321
|
children: [
|
|
1322
|
-
/* @__PURE__ */
|
|
1322
|
+
/* @__PURE__ */ f("h1", { children: [
|
|
1323
1323
|
"Partial Block - ",
|
|
1324
1324
|
r
|
|
1325
1325
|
] }),
|
|
@@ -1327,7 +1327,7 @@ const A = (e, ...o) => ({
|
|
|
1327
1327
|
]
|
|
1328
1328
|
}
|
|
1329
1329
|
) : b.createElement("span", { ...o }, l);
|
|
1330
|
-
},
|
|
1330
|
+
}, mt = {
|
|
1331
1331
|
type: "PartialBlock",
|
|
1332
1332
|
description: "A partial block component",
|
|
1333
1333
|
label: "Partial Block",
|
|
@@ -1335,7 +1335,7 @@ const A = (e, ...o) => ({
|
|
|
1335
1335
|
category: "core",
|
|
1336
1336
|
group: "basic",
|
|
1337
1337
|
hidden: !0,
|
|
1338
|
-
...
|
|
1338
|
+
...u({
|
|
1339
1339
|
properties: {
|
|
1340
1340
|
partialBlockId: {
|
|
1341
1341
|
type: "string",
|
|
@@ -1388,12 +1388,12 @@ const A = (e, ...o) => ({
|
|
|
1388
1388
|
11: "lg:col-span-11",
|
|
1389
1389
|
12: "lg:col-span-12"
|
|
1390
1390
|
}
|
|
1391
|
-
},
|
|
1391
|
+
}, yt = (e) => {
|
|
1392
1392
|
const { blockProps: o, children: t, styles: l, colSpan: r, tabletColSpan: n, desktopColSpan: i } = e, c = { className: [
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
n ?
|
|
1396
|
-
i ?
|
|
1393
|
+
h(l, "className", ""),
|
|
1394
|
+
h(L, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
|
|
1395
|
+
n ? h(L, ["MEDIUM", n || r], "") : "",
|
|
1396
|
+
i ? h(L, ["LARGE", n || r], "") : ""
|
|
1397
1397
|
].join(" ") };
|
|
1398
1398
|
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" }) });
|
|
1399
1399
|
}, gt = {
|
|
@@ -1402,14 +1402,14 @@ const A = (e, ...o) => ({
|
|
|
1402
1402
|
label: "Column",
|
|
1403
1403
|
group: "basic",
|
|
1404
1404
|
category: "core",
|
|
1405
|
-
icon:
|
|
1405
|
+
icon: de,
|
|
1406
1406
|
wrapper: !0,
|
|
1407
1407
|
canDelete: () => !0,
|
|
1408
1408
|
canAcceptBlock: () => !0,
|
|
1409
1409
|
canBeNested: (e) => e === "Row",
|
|
1410
|
-
...
|
|
1410
|
+
...u({
|
|
1411
1411
|
properties: {
|
|
1412
|
-
styles:
|
|
1412
|
+
styles: d(""),
|
|
1413
1413
|
colSpan: {
|
|
1414
1414
|
type: "number",
|
|
1415
1415
|
title: "Column Span",
|
|
@@ -1433,14 +1433,14 @@ const A = (e, ...o) => ({
|
|
|
1433
1433
|
}
|
|
1434
1434
|
})
|
|
1435
1435
|
}, bt = (e) => {
|
|
1436
|
-
const { blockProps: o, children: t, styles: l, gutter: r } = e, i = { className: [
|
|
1436
|
+
const { blockProps: o, children: t, styles: l, gutter: r } = e, i = { className: [h(l, "className", ""), " grid grid-cols-12"].join() };
|
|
1437
1437
|
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 });
|
|
1438
1438
|
}, ft = {
|
|
1439
1439
|
type: "Row",
|
|
1440
1440
|
description: "A row component",
|
|
1441
1441
|
label: "Row",
|
|
1442
1442
|
group: "basic",
|
|
1443
|
-
icon:
|
|
1443
|
+
icon: ue,
|
|
1444
1444
|
blocks: () => [
|
|
1445
1445
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1446
1446
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
@@ -1449,9 +1449,9 @@ const A = (e, ...o) => ({
|
|
|
1449
1449
|
category: "core",
|
|
1450
1450
|
wrapper: !0,
|
|
1451
1451
|
canAcceptBlock: (e) => e === "Column",
|
|
1452
|
-
...
|
|
1452
|
+
...u({
|
|
1453
1453
|
properties: {
|
|
1454
|
-
styles:
|
|
1454
|
+
styles: d(""),
|
|
1455
1455
|
colCount: {
|
|
1456
1456
|
type: "number",
|
|
1457
1457
|
default: 2,
|
|
@@ -1480,9 +1480,9 @@ const A = (e, ...o) => ({
|
|
|
1480
1480
|
category: "core",
|
|
1481
1481
|
icon: le,
|
|
1482
1482
|
group: "typography",
|
|
1483
|
-
...
|
|
1483
|
+
...u({
|
|
1484
1484
|
properties: {
|
|
1485
|
-
styles:
|
|
1485
|
+
styles: d(""),
|
|
1486
1486
|
content: {
|
|
1487
1487
|
type: "string",
|
|
1488
1488
|
title: "Content",
|
|
@@ -1500,15 +1500,15 @@ const A = (e, ...o) => ({
|
|
|
1500
1500
|
...o,
|
|
1501
1501
|
dangerouslySetInnerHTML: { __html: l || "" }
|
|
1502
1502
|
});
|
|
1503
|
-
},
|
|
1503
|
+
}, vt = {
|
|
1504
1504
|
type: "Span",
|
|
1505
1505
|
description: "A span component",
|
|
1506
1506
|
label: "Span",
|
|
1507
1507
|
category: "core",
|
|
1508
1508
|
group: "typography",
|
|
1509
|
-
...
|
|
1509
|
+
...u({
|
|
1510
1510
|
properties: {
|
|
1511
|
-
styles:
|
|
1511
|
+
styles: d(""),
|
|
1512
1512
|
content: {
|
|
1513
1513
|
type: "string",
|
|
1514
1514
|
title: "Content",
|
|
@@ -1520,7 +1520,7 @@ const A = (e, ...o) => ({
|
|
|
1520
1520
|
aiProps: ["content"],
|
|
1521
1521
|
i18nProps: ["content"],
|
|
1522
1522
|
canAcceptBlock: () => !0
|
|
1523
|
-
},
|
|
1523
|
+
}, Ct = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s("span", { ...e.blockProps, children: e.content }) : `${e.content}`, It = {
|
|
1524
1524
|
type: "Text",
|
|
1525
1525
|
description: "A text component with no styling",
|
|
1526
1526
|
label: "Text",
|
|
@@ -1528,9 +1528,9 @@ const A = (e, ...o) => ({
|
|
|
1528
1528
|
category: "core",
|
|
1529
1529
|
group: "typography",
|
|
1530
1530
|
icon: re,
|
|
1531
|
-
...
|
|
1531
|
+
...u({
|
|
1532
1532
|
properties: {
|
|
1533
|
-
styles:
|
|
1533
|
+
styles: d("text-black"),
|
|
1534
1534
|
content: {
|
|
1535
1535
|
title: "Content",
|
|
1536
1536
|
type: "string",
|
|
@@ -1572,13 +1572,13 @@ const A = (e, ...o) => ({
|
|
|
1572
1572
|
}
|
|
1573
1573
|
}
|
|
1574
1574
|
}, _ = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, T = /(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/, Bt = (e, o) => {
|
|
1575
|
-
const t =
|
|
1575
|
+
const t = h(o, "autoplay", !1), l = h(o, "controls", !1), r = h(o, "loop", !1), n = t || h(o, "muted", !0);
|
|
1576
1576
|
if (_.test(e)) {
|
|
1577
1577
|
const i = e.match(_);
|
|
1578
1578
|
if (i) {
|
|
1579
1579
|
const a = i[4];
|
|
1580
|
-
let c = `https://www.youtube.com/embed/${a}`,
|
|
1581
|
-
return
|
|
1580
|
+
let c = `https://www.youtube.com/embed/${a}`, m = t ? "autoplay=1" : "";
|
|
1581
|
+
return m += r ? `&loop=1&playlist=${a}` : "", m += n ? "&mute=1&muted=1" : "", m += l ? "&controls=1" : "&controls=0", `${c}?${m}`;
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
1584
|
if (T.test(e)) {
|
|
@@ -1592,40 +1592,40 @@ const A = (e, ...o) => ({
|
|
|
1592
1592
|
return null;
|
|
1593
1593
|
}, Lt = (e) => {
|
|
1594
1594
|
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: i } = e, a = Bt(o, r);
|
|
1595
|
-
return /* @__PURE__ */
|
|
1596
|
-
!a && i ? /* @__PURE__ */ s("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children:
|
|
1595
|
+
return /* @__PURE__ */ f("div", { ...se(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
1596
|
+
!a && i ? /* @__PURE__ */ s("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__ */ s("iframe", { width: "100%", src: a, ...ae(l, "className") }),
|
|
1597
1597
|
i && /* @__PURE__ */ s("div", { ...t, className: "absolute top-0 h-full w-full" })
|
|
1598
1598
|
] });
|
|
1599
1599
|
}, Pt = (e) => {
|
|
1600
1600
|
const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps: i } = e;
|
|
1601
1601
|
let a = n;
|
|
1602
|
-
const c = [...
|
|
1602
|
+
const c = [...h(r, "srcsets", []) || []];
|
|
1603
1603
|
o && typeof o == "string" && c.push({ url: o, width: "9999" });
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1606
|
-
const k =
|
|
1607
|
-
return (a || !
|
|
1604
|
+
const m = c.sort((g, y) => parseInt(g.width) - parseInt(y.width)).filter((g) => !C(g.url) && !C(g.width));
|
|
1605
|
+
m.length === 0 && !a && (a = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
|
|
1606
|
+
const k = h(l, "autoplay", !1) || h(l, "muted", !0);
|
|
1607
|
+
return (a || !C(m)) && /* @__PURE__ */ s("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */ w(
|
|
1608
1608
|
"video",
|
|
1609
1609
|
{
|
|
1610
1610
|
...t,
|
|
1611
1611
|
...i,
|
|
1612
|
-
key: JSON.stringify(
|
|
1613
|
-
controls:
|
|
1614
|
-
autoPlay:
|
|
1615
|
-
loop:
|
|
1612
|
+
key: JSON.stringify(m),
|
|
1613
|
+
controls: h(l, "controls", !1),
|
|
1614
|
+
autoPlay: h(l, "autoplay", !1),
|
|
1615
|
+
loop: h(l, "loop", !1),
|
|
1616
1616
|
poster: a,
|
|
1617
1617
|
...k ? { muted: !0 } : {}
|
|
1618
1618
|
},
|
|
1619
|
-
|
|
1619
|
+
m.map((g) => {
|
|
1620
1620
|
if (!g.url || g.url.length < 4 || isNaN(g.width)) return null;
|
|
1621
|
-
const
|
|
1622
|
-
return /* @__PURE__ */ s("source", { src: g.url, media:
|
|
1621
|
+
const y = `(max-width: ${g.width}px)`;
|
|
1622
|
+
return /* @__PURE__ */ s("source", { src: g.url, media: y, type: g.type }, g.url);
|
|
1623
1623
|
}),
|
|
1624
1624
|
"Your browser does not support the video tag."
|
|
1625
1625
|
) });
|
|
1626
1626
|
}, St = (e) => {
|
|
1627
1627
|
const { videoSource: o } = e;
|
|
1628
|
-
return o === "Custom" ? /* @__PURE__ */ s(Pt, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ s(Lt, { ...e }) : /* @__PURE__ */
|
|
1628
|
+
return o === "Custom" ? /* @__PURE__ */ s(Pt, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ s(Lt, { ...e }) : /* @__PURE__ */ f("div", { children: [
|
|
1629
1629
|
"Invalid video source : ",
|
|
1630
1630
|
o
|
|
1631
1631
|
] });
|
|
@@ -1635,9 +1635,9 @@ const A = (e, ...o) => ({
|
|
|
1635
1635
|
category: "core",
|
|
1636
1636
|
icon: ne,
|
|
1637
1637
|
group: "media",
|
|
1638
|
-
...
|
|
1638
|
+
...u({
|
|
1639
1639
|
properties: {
|
|
1640
|
-
styles:
|
|
1640
|
+
styles: d("absolute h-full w-full object-cover"),
|
|
1641
1641
|
videoSource: {
|
|
1642
1642
|
type: "string",
|
|
1643
1643
|
default: "Custom",
|
|
@@ -1712,15 +1712,29 @@ const A = (e, ...o) => ({
|
|
|
1712
1712
|
}
|
|
1713
1713
|
}),
|
|
1714
1714
|
i18nProps: ["url"]
|
|
1715
|
-
}, Tt = ({
|
|
1716
|
-
|
|
1717
|
-
|
|
1715
|
+
}, Tt = ({
|
|
1716
|
+
children: e,
|
|
1717
|
+
tag: o,
|
|
1718
|
+
blockProps: t,
|
|
1719
|
+
styles: l,
|
|
1720
|
+
inBuilder: r,
|
|
1721
|
+
$loading: n
|
|
1722
|
+
}) => {
|
|
1723
|
+
let i = e;
|
|
1724
|
+
return C(i) && r && (i = /* @__PURE__ */ s("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5", children: "No items found" })), b.createElement(
|
|
1725
|
+
o,
|
|
1726
|
+
{ ...t, ...l },
|
|
1727
|
+
n ? Array.from({ length: 2 }).map((a, c) => /* @__PURE__ */ f("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1728
|
+
/* @__PURE__ */ s("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1729
|
+
/* @__PURE__ */ s("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1730
|
+
] }, c)) : i
|
|
1731
|
+
);
|
|
1718
1732
|
}, Nt = {
|
|
1719
1733
|
type: "Repeater",
|
|
1720
1734
|
label: "Repeater",
|
|
1721
1735
|
icon: E,
|
|
1722
1736
|
group: "basic",
|
|
1723
|
-
|
|
1737
|
+
dataProviderDependencies: ["filter", "sort", "limit", "repeaterItems"],
|
|
1724
1738
|
blocks: () => [
|
|
1725
1739
|
{ _id: "A", _type: "Repeater", tag: "ul" },
|
|
1726
1740
|
{ _id: "B", _name: "Repeater Item", _type: "RepeaterItem", parentTag: "ul", _parent: "A" }
|
|
@@ -1734,7 +1748,7 @@ const A = (e, ...o) => ({
|
|
|
1734
1748
|
// content: "No items",
|
|
1735
1749
|
// },
|
|
1736
1750
|
],
|
|
1737
|
-
...
|
|
1751
|
+
...u({
|
|
1738
1752
|
properties: {
|
|
1739
1753
|
styles: P("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),
|
|
1740
1754
|
repeaterItems: {
|
|
@@ -1793,7 +1807,7 @@ const A = (e, ...o) => ({
|
|
|
1793
1807
|
icon: E,
|
|
1794
1808
|
hidden: !0,
|
|
1795
1809
|
group: "basic",
|
|
1796
|
-
...
|
|
1810
|
+
...u({
|
|
1797
1811
|
properties: {
|
|
1798
1812
|
styles: P(""),
|
|
1799
1813
|
parentTag: H("Repeater", "tag")
|
|
@@ -1812,7 +1826,7 @@ const A = (e, ...o) => ({
|
|
|
1812
1826
|
label: "Empty State",
|
|
1813
1827
|
hidden: !0,
|
|
1814
1828
|
group: "basic",
|
|
1815
|
-
...
|
|
1829
|
+
...u({
|
|
1816
1830
|
properties: { styles: P("p-5 flex items-center justify-center") }
|
|
1817
1831
|
}),
|
|
1818
1832
|
canAcceptBlock: () => !0,
|
|
@@ -1820,7 +1834,7 @@ const A = (e, ...o) => ({
|
|
|
1820
1834
|
canMove: () => !1,
|
|
1821
1835
|
canDuplicate: () => !1
|
|
1822
1836
|
}, Ft = () => {
|
|
1823
|
-
p(
|
|
1837
|
+
p(me, ye), p(Be, Le), p(ge, be), p(Ge, Oe), p(pt, dt), p(wt, vt), p(ht, kt), p(rt, nt), p(it, st), p(at, ct), p(et, tt), p(ot, lt), p(St, _t), p(ke, we), p(ve, Ce), p(Ct, It), p(_e, Te), p(Ne, Re), p(Me, Ee), p(Pe, Se), p(He, ze), p(De, je), p(Ve, qe), p($e, Ae), p(Ye, We), p(Ie, xe), p(Fe, Ue), p(ut, mt), p(bt, ft), p(yt, gt), p(fe, he), p(Tt, Nt), p(Rt, Mt), p(Et, $t);
|
|
1824
1838
|
};
|
|
1825
1839
|
export {
|
|
1826
1840
|
Ft as loadWebBlocks
|