@chaibuilder/sdk 2.0.12 → 2.1.1
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-BVHvdz8H.cjs → CodeEditor-BG4oToVY.cjs} +1 -1
- package/dist/{CodeEditor-ZtRSywKI.js → CodeEditor-CdNhJvdd.js} +1 -1
- package/dist/core.cjs +6 -6
- package/dist/core.d.ts +192 -168
- package/dist/core.js +7690 -4348
- package/dist/render.d.ts +1 -0
- package/dist/tooltip-CkYl0YhP.cjs +1 -0
- package/dist/tooltip-D9DF_nUo.js +1900 -0
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +36 -3
- package/dist/ui.js +225 -291
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +300 -309
- package/package.json +3 -1
- package/dist/Topbar-CX5hnmQJ.js +0 -16
- package/dist/Topbar-D7QTF9G-.cjs +0 -1
- package/dist/tooltip-BMhhYJb6.cjs +0 -1
- package/dist/tooltip-VMv3Eoxb.js +0 -671
package/dist/web-blocks.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { registerChaiBlockSchema as
|
|
2
|
-
import { jsx as i, jsxs as b, Fragment as
|
|
3
|
-
import * as
|
|
4
|
-
import { createElement as
|
|
5
|
-
import { c as v, g as
|
|
6
|
-
import { ButtonIcon as M, CodeIcon as
|
|
7
|
-
import { isEmpty as w, get as k, isNull as K, pick as Q, omit as ee, map as
|
|
8
|
-
import { FileCode as te, GlobeIcon as
|
|
9
|
-
const
|
|
10
|
-
const { blockProps: t, inBuilder: l, backgroundImage:
|
|
1
|
+
import { registerChaiBlockSchema as d, StylesProp as p, registerChaiBlock as u } from "@chaibuilder/runtime";
|
|
2
|
+
import { jsx as i, jsxs as b, Fragment as N } from "react/jsx-runtime";
|
|
3
|
+
import * as g from "react";
|
|
4
|
+
import { createElement as C } from "react";
|
|
5
|
+
import { c as v, g as x } from "./Functions-BGzDsf1z.js";
|
|
6
|
+
import { ButtonIcon as M, CodeIcon as A, HeadingIcon as R, TextIcon as H, CursorTextIcon as z, DividerHorizontalIcon as q, SketchLogoIcon as F, ImageIcon as j, Link1Icon as D, RowsIcon as G, ColumnsIcon as U, SpaceBetweenVerticallyIcon as V, VideoIcon as O, CopyIcon as W, CheckboxIcon as X, InputIcon as $, LetterCaseToggleIcon as Y, RadiobuttonIcon as Z, DropdownMenuIcon as J } from "@radix-ui/react-icons";
|
|
7
|
+
import { isEmpty as w, get as k, isNull as K, pick as Q, omit as ee, map as B } from "lodash-es";
|
|
8
|
+
import { FileCode as te, GlobeIcon as T, GroupIcon as le, Columns as oe, Rows as ne } from "lucide-react";
|
|
9
|
+
const L = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div", { className: v("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ i("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, re = (e) => {
|
|
10
|
+
const { blockProps: t, inBuilder: l, backgroundImage: n, children: o, tag: r = "div", styles: s } = e;
|
|
11
11
|
let a = o;
|
|
12
|
-
o || (a = /* @__PURE__ */ i(
|
|
12
|
+
o || (a = /* @__PURE__ */ i(L, { inBuilder: l }));
|
|
13
13
|
let c = {};
|
|
14
|
-
return
|
|
14
|
+
return n && (c = { backgroundImage: `url(${n})` }), g.createElement(r, { ...t, ...s, style: c }, a);
|
|
15
15
|
}, ie = {
|
|
16
16
|
type: "Box",
|
|
17
|
+
description: "Similar to a div or section elements in HTML",
|
|
17
18
|
label: "Box",
|
|
18
19
|
category: "core",
|
|
19
20
|
group: "basic",
|
|
20
|
-
...
|
|
21
|
+
...d({
|
|
21
22
|
properties: {
|
|
22
|
-
styles:
|
|
23
|
+
styles: p(""),
|
|
23
24
|
backgroundImage: {
|
|
24
25
|
type: "string",
|
|
25
26
|
default: "",
|
|
@@ -54,36 +55,37 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
54
55
|
}),
|
|
55
56
|
canAcceptBlock: () => !0
|
|
56
57
|
}, se = (e) => {
|
|
57
|
-
const { blockProps: t, iconSize: l, icon:
|
|
58
|
+
const { blockProps: t, iconSize: l, icon: n, content: o, styles: r, children: s, iconPos: a, link: c, inBuilder: y } = e, f = n, h = s || /* @__PURE__ */ b(N, { children: [
|
|
58
59
|
/* @__PURE__ */ i("span", { "data-ai-key": "content", children: o }),
|
|
59
|
-
|
|
60
|
+
f && /* @__PURE__ */ i(
|
|
60
61
|
"div",
|
|
61
62
|
{
|
|
62
63
|
style: { width: l + "px" },
|
|
63
64
|
className: a + " " + (a === "order-first" ? "mr-2" : "ml-2") || "",
|
|
64
|
-
dangerouslySetInnerHTML: { __html:
|
|
65
|
+
dangerouslySetInnerHTML: { __html: f }
|
|
65
66
|
}
|
|
66
67
|
)
|
|
67
|
-
] }),
|
|
68
|
+
] }), m = C(
|
|
68
69
|
"button",
|
|
69
70
|
{
|
|
70
71
|
...t,
|
|
71
|
-
...
|
|
72
|
+
...r,
|
|
72
73
|
type: "button",
|
|
73
74
|
"aria-label": o
|
|
74
75
|
},
|
|
75
76
|
h
|
|
76
77
|
);
|
|
77
|
-
return w(k(c, "href")) ?
|
|
78
|
+
return w(k(c, "href")) ? m : y ? /* @__PURE__ */ i("span", { children: m }) : /* @__PURE__ */ i("a", { "aria-label": o, href: k(c, "href") || "/", target: k(c, "target", "_self"), children: m });
|
|
78
79
|
}, ae = {
|
|
79
80
|
type: "Button",
|
|
81
|
+
description: "similar to a button element in HTML",
|
|
80
82
|
label: "Button",
|
|
81
83
|
category: "core",
|
|
82
84
|
icon: M,
|
|
83
85
|
group: "basic",
|
|
84
|
-
...
|
|
86
|
+
...d({
|
|
85
87
|
properties: {
|
|
86
|
-
styles:
|
|
88
|
+
styles: p("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
|
|
87
89
|
content: {
|
|
88
90
|
type: "string",
|
|
89
91
|
title: "Button label",
|
|
@@ -127,27 +129,28 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
127
129
|
i18nProps: ["content"],
|
|
128
130
|
aiProps: ["content"]
|
|
129
131
|
}, ce = (e) => {
|
|
130
|
-
const { blockProps: t, styles: l, htmlCode:
|
|
132
|
+
const { blockProps: t, styles: l, htmlCode: n, inBuilder: o } = e;
|
|
131
133
|
return o ? /* @__PURE__ */ b("div", { className: "relative", children: [
|
|
132
134
|
o ? /* @__PURE__ */ i("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
|
|
133
|
-
|
|
135
|
+
g.createElement("div", {
|
|
134
136
|
...l,
|
|
135
|
-
dangerouslySetInnerHTML: { __html:
|
|
137
|
+
dangerouslySetInnerHTML: { __html: n.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
136
138
|
})
|
|
137
|
-
] }) :
|
|
139
|
+
] }) : g.createElement("div", {
|
|
138
140
|
...t,
|
|
139
141
|
...l,
|
|
140
|
-
dangerouslySetInnerHTML: { __html:
|
|
142
|
+
dangerouslySetInnerHTML: { __html: n }
|
|
141
143
|
});
|
|
142
144
|
}, pe = {
|
|
143
145
|
type: "CustomHTML",
|
|
144
|
-
|
|
146
|
+
description: "similar to a div or section elements in HTML",
|
|
147
|
+
label: "Custom HTML",
|
|
145
148
|
category: "core",
|
|
146
|
-
icon:
|
|
149
|
+
icon: A,
|
|
147
150
|
group: "advanced",
|
|
148
|
-
...
|
|
151
|
+
...d({
|
|
149
152
|
properties: {
|
|
150
|
-
styles:
|
|
153
|
+
styles: p(""),
|
|
151
154
|
htmlCode: {
|
|
152
155
|
type: "string",
|
|
153
156
|
default: "<div><p>Enter your HTML code here...</p></div>",
|
|
@@ -156,17 +159,18 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
156
159
|
}
|
|
157
160
|
})
|
|
158
161
|
}, ue = (e) => {
|
|
159
|
-
const { blockProps: t, styles: l, backgroundImage:
|
|
162
|
+
const { blockProps: t, styles: l, backgroundImage: n } = e;
|
|
160
163
|
let o = {};
|
|
161
|
-
return
|
|
164
|
+
return n && (o = { backgroundImage: `url(${n})` }), g.createElement("div", { ...t, ...l, style: o });
|
|
162
165
|
}, de = {
|
|
163
166
|
type: "EmptyBox",
|
|
167
|
+
description: "A box component with no children",
|
|
164
168
|
label: "Empty Box",
|
|
165
169
|
category: "core",
|
|
166
170
|
group: "basic",
|
|
167
|
-
...
|
|
171
|
+
...d({
|
|
168
172
|
properties: {
|
|
169
|
-
styles:
|
|
173
|
+
styles: p(""),
|
|
170
174
|
backgroundImage: {
|
|
171
175
|
type: "string",
|
|
172
176
|
title: "Background Image",
|
|
@@ -176,19 +180,20 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
176
180
|
}
|
|
177
181
|
})
|
|
178
182
|
}, me = (e) => {
|
|
179
|
-
const { blockProps: t, styles: l, content:
|
|
180
|
-
return
|
|
183
|
+
const { blockProps: t, styles: l, content: n, tag: o = "h1", children: r = null } = e;
|
|
184
|
+
return r ? g.createElement(o, { ...l, ...t }, r) : g.createElement(o, {
|
|
181
185
|
...l,
|
|
182
186
|
...t,
|
|
183
|
-
dangerouslySetInnerHTML: { __html:
|
|
187
|
+
dangerouslySetInnerHTML: { __html: n }
|
|
184
188
|
});
|
|
185
189
|
}, ye = {
|
|
186
190
|
type: "Heading",
|
|
187
|
-
|
|
191
|
+
description: "A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",
|
|
192
|
+
label: "Heading",
|
|
188
193
|
category: "core",
|
|
189
|
-
icon:
|
|
194
|
+
icon: R,
|
|
190
195
|
group: "typography",
|
|
191
|
-
...
|
|
196
|
+
...d({
|
|
192
197
|
properties: {
|
|
193
198
|
tag: {
|
|
194
199
|
type: "string",
|
|
@@ -196,7 +201,7 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
196
201
|
title: "Level",
|
|
197
202
|
enum: ["h1", "h2", "h3", "h4", "h5", "h6"]
|
|
198
203
|
},
|
|
199
|
-
styles:
|
|
204
|
+
styles: p("text-3xl"),
|
|
200
205
|
content: {
|
|
201
206
|
type: "string",
|
|
202
207
|
default: "Heading goes here",
|
|
@@ -209,21 +214,22 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
209
214
|
i18nProps: ["content"],
|
|
210
215
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
211
216
|
}, ge = (e) => {
|
|
212
|
-
const { blockProps: t, styles: l, content:
|
|
213
|
-
return K(e.children) ?
|
|
217
|
+
const { blockProps: t, styles: l, content: n } = e;
|
|
218
|
+
return K(e.children) ? g.createElement("p", {
|
|
214
219
|
...l,
|
|
215
220
|
...t,
|
|
216
|
-
dangerouslySetInnerHTML: { __html:
|
|
217
|
-
}) :
|
|
221
|
+
dangerouslySetInnerHTML: { __html: n }
|
|
222
|
+
}) : g.createElement("p", { ...l, ...t }, e.children);
|
|
218
223
|
}, fe = {
|
|
219
224
|
type: "Paragraph",
|
|
225
|
+
description: "A paragraph component",
|
|
220
226
|
label: "Paragraph",
|
|
221
227
|
category: "core",
|
|
222
|
-
icon:
|
|
228
|
+
icon: H,
|
|
223
229
|
group: "typography",
|
|
224
|
-
...
|
|
230
|
+
...d({
|
|
225
231
|
properties: {
|
|
226
|
-
styles:
|
|
232
|
+
styles: p(""),
|
|
227
233
|
content: {
|
|
228
234
|
type: "string",
|
|
229
235
|
title: "Content",
|
|
@@ -237,25 +243,26 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
237
243
|
i18nProps: ["content"],
|
|
238
244
|
aiProps: ["content"],
|
|
239
245
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
240
|
-
},
|
|
246
|
+
}, E = (e, ...t) => ({
|
|
241
247
|
...e,
|
|
242
248
|
className: v(e.className, ...t)
|
|
243
249
|
}), be = (e) => {
|
|
244
|
-
const { blockProps: t, content: l, styles:
|
|
245
|
-
|
|
250
|
+
const { blockProps: t, content: l, styles: n } = e, o = E(
|
|
251
|
+
n,
|
|
246
252
|
"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",
|
|
247
253
|
"max-w-full"
|
|
248
254
|
);
|
|
249
255
|
return /* @__PURE__ */ i("div", { ...t, ...o, dangerouslySetInnerHTML: { __html: l } });
|
|
250
256
|
}, he = {
|
|
251
257
|
type: "RichText",
|
|
258
|
+
description: "A rich text block",
|
|
252
259
|
label: "Rich Text",
|
|
253
260
|
category: "core",
|
|
254
|
-
icon:
|
|
261
|
+
icon: z,
|
|
255
262
|
group: "typography",
|
|
256
|
-
...
|
|
263
|
+
...d({
|
|
257
264
|
properties: {
|
|
258
|
-
styles:
|
|
265
|
+
styles: p(""),
|
|
259
266
|
content: {
|
|
260
267
|
type: "string",
|
|
261
268
|
title: "Content",
|
|
@@ -267,20 +274,21 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
267
274
|
aiProps: ["content"],
|
|
268
275
|
i18nProps: ["content"]
|
|
269
276
|
}, ke = (e) => {
|
|
270
|
-
const { blockProps: t, styles: l, content:
|
|
271
|
-
return o ?
|
|
277
|
+
const { blockProps: t, styles: l, content: n, children: o = null, tag: r } = e;
|
|
278
|
+
return o ? g.createElement("span", { ...l, ...t }, o) : g.createElement(r || "span", {
|
|
272
279
|
...l,
|
|
273
280
|
...t,
|
|
274
|
-
dangerouslySetInnerHTML: { __html:
|
|
281
|
+
dangerouslySetInnerHTML: { __html: n || "" }
|
|
275
282
|
});
|
|
276
283
|
}, we = {
|
|
277
284
|
type: "Span",
|
|
285
|
+
description: "A span component",
|
|
278
286
|
label: "Span",
|
|
279
287
|
category: "core",
|
|
280
288
|
group: "typography",
|
|
281
|
-
...
|
|
289
|
+
...d({
|
|
282
290
|
properties: {
|
|
283
|
-
styles:
|
|
291
|
+
styles: p(""),
|
|
284
292
|
content: {
|
|
285
293
|
type: "string",
|
|
286
294
|
title: "Content",
|
|
@@ -292,16 +300,17 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
292
300
|
aiProps: ["content"],
|
|
293
301
|
i18nProps: ["content"],
|
|
294
302
|
canAcceptBlock: () => !0
|
|
295
|
-
},
|
|
296
|
-
const { scripts: t, inBuilder: l, blockProps:
|
|
297
|
-
return l ? /* @__PURE__ */ i("div", { ...
|
|
298
|
-
},
|
|
303
|
+
}, Ce = (e) => {
|
|
304
|
+
const { scripts: t, inBuilder: l, blockProps: n } = e;
|
|
305
|
+
return l ? /* @__PURE__ */ i("div", { ...n, children: /* @__PURE__ */ i("div", { className: v("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ i("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: t } });
|
|
306
|
+
}, xe = {
|
|
299
307
|
type: "CustomScript",
|
|
300
|
-
|
|
308
|
+
description: "similar to a script element in HTML",
|
|
309
|
+
label: "Custom Script",
|
|
301
310
|
category: "core",
|
|
302
311
|
icon: te,
|
|
303
312
|
group: "advanced",
|
|
304
|
-
...
|
|
313
|
+
...d({
|
|
305
314
|
properties: {
|
|
306
315
|
scripts: {
|
|
307
316
|
type: "string",
|
|
@@ -312,22 +321,23 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
312
321
|
}
|
|
313
322
|
}
|
|
314
323
|
})
|
|
315
|
-
},
|
|
324
|
+
}, Le = (e) => {
|
|
316
325
|
const { blockProps: t, styles: l } = e;
|
|
317
|
-
return
|
|
318
|
-
},
|
|
326
|
+
return C("hr", { ...l, ...t });
|
|
327
|
+
}, ve = {
|
|
319
328
|
type: "Divider",
|
|
320
|
-
|
|
329
|
+
description: "A horizontal line component",
|
|
330
|
+
label: "Divider",
|
|
321
331
|
category: "core",
|
|
322
|
-
icon:
|
|
332
|
+
icon: q,
|
|
323
333
|
group: "basic",
|
|
324
|
-
...
|
|
334
|
+
...d({
|
|
325
335
|
properties: {
|
|
326
|
-
styles:
|
|
336
|
+
styles: p("bg-gray-900 h-0.5 py-2 my-1")
|
|
327
337
|
}
|
|
328
338
|
})
|
|
329
|
-
},
|
|
330
|
-
const { blockProps: t, inBuilder: l, children:
|
|
339
|
+
}, Ie = (e) => {
|
|
340
|
+
const { blockProps: t, inBuilder: l, children: n, globalBlock: o } = e;
|
|
331
341
|
return l && !o ? /* @__PURE__ */ b(
|
|
332
342
|
"div",
|
|
333
343
|
{
|
|
@@ -341,15 +351,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
341
351
|
/* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
342
352
|
]
|
|
343
353
|
}
|
|
344
|
-
) :
|
|
354
|
+
) : g.createElement("span", { ...t }, n);
|
|
345
355
|
}, Be = {
|
|
346
356
|
type: "GlobalBlock",
|
|
357
|
+
description: "A global block component",
|
|
347
358
|
label: "Global Block",
|
|
348
|
-
icon:
|
|
359
|
+
icon: T,
|
|
349
360
|
category: "core",
|
|
350
361
|
group: "basic",
|
|
351
362
|
hidden: !0,
|
|
352
|
-
...
|
|
363
|
+
...d({
|
|
353
364
|
properties: {
|
|
354
365
|
globalBlock: {
|
|
355
366
|
type: "string",
|
|
@@ -360,11 +371,11 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
360
371
|
}
|
|
361
372
|
})
|
|
362
373
|
}, Pe = (e) => {
|
|
363
|
-
const { blockProps: t, icon: l, styles:
|
|
374
|
+
const { blockProps: t, icon: l, styles: n, width: o, inBuilder: r, height: s } = e, a = E(n, "");
|
|
364
375
|
if (w(l))
|
|
365
|
-
return /* @__PURE__ */ i(
|
|
376
|
+
return /* @__PURE__ */ i(L, { inBuilder: r, className: "h-8 w-14" });
|
|
366
377
|
const c = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
367
|
-
return
|
|
378
|
+
return g.createElement("span", {
|
|
368
379
|
...t,
|
|
369
380
|
...a,
|
|
370
381
|
style: {
|
|
@@ -373,15 +384,15 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
373
384
|
},
|
|
374
385
|
dangerouslySetInnerHTML: { __html: c }
|
|
375
386
|
});
|
|
376
|
-
},
|
|
387
|
+
}, Se = {
|
|
377
388
|
type: "Icon",
|
|
378
389
|
label: "web_blocks.icon",
|
|
379
390
|
category: "core",
|
|
380
|
-
icon:
|
|
391
|
+
icon: F,
|
|
381
392
|
group: "media",
|
|
382
|
-
...
|
|
393
|
+
...d({
|
|
383
394
|
properties: {
|
|
384
|
-
styles:
|
|
395
|
+
styles: p(""),
|
|
385
396
|
icon: {
|
|
386
397
|
type: "string",
|
|
387
398
|
title: "Icon",
|
|
@@ -400,17 +411,17 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
400
411
|
}
|
|
401
412
|
}
|
|
402
413
|
})
|
|
403
|
-
},
|
|
404
|
-
const { blockProps: t, image: l, mobileImage:
|
|
405
|
-
return w(l) ? /* @__PURE__ */ i(
|
|
406
|
-
|
|
414
|
+
}, _e = (e) => {
|
|
415
|
+
const { blockProps: t, image: l, mobileImage: n, styles: o, alt: r, height: s, width: a, lazyLoading: c } = e;
|
|
416
|
+
return w(l) ? /* @__PURE__ */ i(L, { className: "h-36" }) : /* @__PURE__ */ b("picture", { children: [
|
|
417
|
+
n && /* @__PURE__ */ i("source", { srcSet: n, media: "(max-width: 480px)" }),
|
|
407
418
|
/* @__PURE__ */ i(
|
|
408
419
|
"img",
|
|
409
420
|
{
|
|
410
421
|
...t,
|
|
411
422
|
...o,
|
|
412
423
|
src: l,
|
|
413
|
-
alt:
|
|
424
|
+
alt: r,
|
|
414
425
|
loading: c ? "lazy" : "eager",
|
|
415
426
|
width: a,
|
|
416
427
|
height: s
|
|
@@ -419,13 +430,14 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
419
430
|
] });
|
|
420
431
|
}, Ne = {
|
|
421
432
|
type: "Image",
|
|
433
|
+
description: "A image component",
|
|
422
434
|
label: "Image",
|
|
423
435
|
category: "core",
|
|
424
|
-
icon:
|
|
436
|
+
icon: j,
|
|
425
437
|
group: "media",
|
|
426
|
-
...
|
|
438
|
+
...d({
|
|
427
439
|
properties: {
|
|
428
|
-
styles:
|
|
440
|
+
styles: p(""),
|
|
429
441
|
image: {
|
|
430
442
|
type: "string",
|
|
431
443
|
title: "Image",
|
|
@@ -465,83 +477,10 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
465
477
|
}),
|
|
466
478
|
aiProps: ["alt"],
|
|
467
479
|
i18nProps: ["alt"]
|
|
468
|
-
},
|
|
469
|
-
const { blockProps: t,
|
|
470
|
-
if (!l && w(r == null ? void 0 : r.className) && w(n))
|
|
471
|
-
return /* @__PURE__ */ i(C, { inBuilder: o });
|
|
472
|
-
if (o)
|
|
473
|
-
return l ? /* @__PURE__ */ i("span", { ...t, ...p, children: l }) : L("span", {
|
|
474
|
-
...t,
|
|
475
|
-
...p,
|
|
476
|
-
dangerouslySetInnerHTML: { __html: n }
|
|
477
|
-
});
|
|
478
|
-
const x = {};
|
|
479
|
-
return a !== "image" && (x["data-vbtype"] = a), c && (x["data-autoplay"] = "true"), y && (x["data-maxwidth"] = y + "px"), g && (x["data-overlay"] = g), h && (x["data-gall"] = h), l ? /* @__PURE__ */ i("a", { "aria-label": n, ...x, href: s || "#/", ...t, ...p, children: l }) : L("a", {
|
|
480
|
-
...t,
|
|
481
|
-
...p,
|
|
482
|
-
...x,
|
|
483
|
-
href: s || "#",
|
|
484
|
-
dangerouslySetInnerHTML: { __html: n },
|
|
485
|
-
"aria-label": n
|
|
486
|
-
});
|
|
487
|
-
}, Me = {
|
|
488
|
-
type: "LightBoxLink",
|
|
489
|
-
label: "Lightbox Link",
|
|
490
|
-
category: "core",
|
|
491
|
-
icon: E,
|
|
492
|
-
group: "basic",
|
|
493
|
-
...m({
|
|
494
|
-
properties: {
|
|
495
|
-
styles: u(""),
|
|
496
|
-
content: {
|
|
497
|
-
type: "string",
|
|
498
|
-
title: "Content",
|
|
499
|
-
default: "Link text or drop blocks inside"
|
|
500
|
-
},
|
|
501
|
-
hrefType: {
|
|
502
|
-
type: "string",
|
|
503
|
-
title: "Type",
|
|
504
|
-
default: "image",
|
|
505
|
-
enum: ["image", "video", "iframe", "inline", "ajax"],
|
|
506
|
-
enumNames: ["Image", "Video", "Iframe", "Inline", "Ajax"]
|
|
507
|
-
},
|
|
508
|
-
href: {
|
|
509
|
-
type: "string",
|
|
510
|
-
title: "Href",
|
|
511
|
-
default: ""
|
|
512
|
-
},
|
|
513
|
-
autoplay: {
|
|
514
|
-
type: "boolean",
|
|
515
|
-
title: "Autoplay (Video only)",
|
|
516
|
-
default: !1
|
|
517
|
-
},
|
|
518
|
-
maxWidth: {
|
|
519
|
-
type: "number",
|
|
520
|
-
title: "Max Width",
|
|
521
|
-
default: ""
|
|
522
|
-
},
|
|
523
|
-
backdropColor: {
|
|
524
|
-
type: "string",
|
|
525
|
-
title: "Backdrop Color",
|
|
526
|
-
default: ""
|
|
527
|
-
},
|
|
528
|
-
galleryName: {
|
|
529
|
-
type: "string",
|
|
530
|
-
title: "Gallery Name",
|
|
531
|
-
default: ""
|
|
532
|
-
}
|
|
533
|
-
},
|
|
534
|
-
dependencies: {
|
|
535
|
-
autoplay: ["hrefType", "video"]
|
|
536
|
-
}
|
|
537
|
-
}),
|
|
538
|
-
i18nProps: ["content"],
|
|
539
|
-
aiProps: ["content"],
|
|
540
|
-
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
541
|
-
}, Ee = (e) => {
|
|
542
|
-
const { blockProps: t, link: l, children: r, styles: o, inBuilder: n, content: s } = e;
|
|
480
|
+
}, Me = (e) => {
|
|
481
|
+
const { blockProps: t, link: l, children: n, styles: o, inBuilder: r, content: s } = e;
|
|
543
482
|
let a = {};
|
|
544
|
-
return !
|
|
483
|
+
return !n && w(s) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), r ? n ? /* @__PURE__ */ i("span", { ...t, style: a, ...o, children: n }) : C(
|
|
545
484
|
"span",
|
|
546
485
|
{
|
|
547
486
|
...t,
|
|
@@ -549,7 +488,7 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
549
488
|
style: a
|
|
550
489
|
},
|
|
551
490
|
s
|
|
552
|
-
) :
|
|
491
|
+
) : n ? /* @__PURE__ */ i("a", { "aria-label": s, href: (l == null ? void 0 : l.href) || "#/", target: l == null ? void 0 : l.target, ...t, ...o, children: n }) : C(
|
|
553
492
|
"a",
|
|
554
493
|
{
|
|
555
494
|
...t,
|
|
@@ -560,15 +499,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
560
499
|
},
|
|
561
500
|
s
|
|
562
501
|
);
|
|
563
|
-
},
|
|
502
|
+
}, $e = {
|
|
564
503
|
type: "Link",
|
|
504
|
+
description: "A link component",
|
|
565
505
|
label: "Link",
|
|
566
506
|
category: "core",
|
|
567
|
-
icon:
|
|
507
|
+
icon: D,
|
|
568
508
|
group: "basic",
|
|
569
|
-
...
|
|
509
|
+
...d({
|
|
570
510
|
properties: {
|
|
571
|
-
styles:
|
|
511
|
+
styles: p(""),
|
|
572
512
|
content: {
|
|
573
513
|
type: "string",
|
|
574
514
|
default: "Link goes here",
|
|
@@ -595,22 +535,23 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
595
535
|
aiProps: ["content"],
|
|
596
536
|
i18nProps: ["content"],
|
|
597
537
|
canAcceptBlock: (e) => e !== "Link"
|
|
598
|
-
},
|
|
599
|
-
const { blockProps: t, children: l, listType:
|
|
600
|
-
return !l && w(o == null ? void 0 : o.className) ? /* @__PURE__ */ i(
|
|
601
|
-
|
|
538
|
+
}, Te = (e) => {
|
|
539
|
+
const { blockProps: t, children: l, listType: n, styles: o, tag: r, inBuilder: s } = e, a = v(k(o, "className", ""), n);
|
|
540
|
+
return !l && w(o == null ? void 0 : o.className) ? /* @__PURE__ */ i(L, { inBuilder: s }) : g.createElement(
|
|
541
|
+
r || (n === "list-decimal" ? "ol" : "ul"),
|
|
602
542
|
{ ...t, ...o, className: a },
|
|
603
543
|
l
|
|
604
544
|
);
|
|
605
|
-
},
|
|
545
|
+
}, Ee = {
|
|
606
546
|
type: "List",
|
|
607
|
-
|
|
608
|
-
|
|
547
|
+
description: "A list component",
|
|
548
|
+
label: "List",
|
|
549
|
+
icon: G,
|
|
609
550
|
category: "core",
|
|
610
551
|
group: "basic",
|
|
611
|
-
...
|
|
552
|
+
...d({
|
|
612
553
|
properties: {
|
|
613
|
-
styles:
|
|
554
|
+
styles: p(""),
|
|
614
555
|
listType: {
|
|
615
556
|
type: "string",
|
|
616
557
|
title: "List Type",
|
|
@@ -648,22 +589,23 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
648
589
|
content: "Item 3"
|
|
649
590
|
}
|
|
650
591
|
]
|
|
651
|
-
},
|
|
652
|
-
const { blockProps: t, content: l, styles:
|
|
653
|
-
return o ?
|
|
654
|
-
...
|
|
592
|
+
}, Ae = (e) => {
|
|
593
|
+
const { blockProps: t, content: l, styles: n, children: o, tag: r } = e;
|
|
594
|
+
return o ? g.createElement(r || "li", { ...n, ...t }, o) : g.createElement(r || "li", {
|
|
595
|
+
...n,
|
|
655
596
|
...t,
|
|
656
597
|
dangerouslySetInnerHTML: { __html: l }
|
|
657
598
|
});
|
|
658
|
-
},
|
|
599
|
+
}, Re = {
|
|
659
600
|
type: "ListItem",
|
|
601
|
+
description: "A list item component",
|
|
660
602
|
label: "List Item",
|
|
661
|
-
icon:
|
|
603
|
+
icon: U,
|
|
662
604
|
category: "core",
|
|
663
605
|
group: "basic",
|
|
664
|
-
...
|
|
606
|
+
...d({
|
|
665
607
|
properties: {
|
|
666
|
-
styles:
|
|
608
|
+
styles: p(""),
|
|
667
609
|
content: {
|
|
668
610
|
type: "string",
|
|
669
611
|
default: "List item",
|
|
@@ -678,16 +620,17 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
678
620
|
aiProps: ["content"],
|
|
679
621
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
680
622
|
canBeNested: (e) => e === "List"
|
|
681
|
-
},
|
|
623
|
+
}, He = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ i("span", { ...e.blockProps, children: e.content }) : `${e.content}`, ze = {
|
|
682
624
|
type: "Text",
|
|
625
|
+
description: "A text component with no styling",
|
|
683
626
|
label: "Text",
|
|
684
627
|
hidden: !0,
|
|
685
628
|
category: "core",
|
|
686
629
|
group: "typography",
|
|
687
|
-
icon:
|
|
688
|
-
...
|
|
630
|
+
icon: V,
|
|
631
|
+
...d({
|
|
689
632
|
properties: {
|
|
690
|
-
styles:
|
|
633
|
+
styles: p("text-black"),
|
|
691
634
|
content: {
|
|
692
635
|
title: "Content",
|
|
693
636
|
type: "string",
|
|
@@ -697,39 +640,39 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
697
640
|
}),
|
|
698
641
|
aiProps: ["content"],
|
|
699
642
|
i18nProps: ["content"]
|
|
700
|
-
},
|
|
701
|
-
if (
|
|
702
|
-
const t = e.match(
|
|
643
|
+
}, P = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, S = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, _ = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, qe = (e) => {
|
|
644
|
+
if (P.test(e)) {
|
|
645
|
+
const t = e.match(P);
|
|
703
646
|
return t ? `https://www.youtube.com/embed/${t[4]}` : e;
|
|
704
647
|
}
|
|
705
|
-
if (
|
|
706
|
-
const t = e.match(
|
|
648
|
+
if (S.test(e)) {
|
|
649
|
+
const t = e.match(S);
|
|
707
650
|
return t ? `https://player.vimeo.com/video/${t[3]}` : e;
|
|
708
651
|
}
|
|
709
|
-
if (
|
|
710
|
-
const t = e.match(
|
|
652
|
+
if (_.test(e)) {
|
|
653
|
+
const t = e.match(_);
|
|
711
654
|
return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
|
|
712
655
|
}
|
|
713
656
|
return null;
|
|
714
|
-
},
|
|
715
|
-
const { blockProps: t, inBuilder: l, styles:
|
|
716
|
-
if (w(o)) return /* @__PURE__ */ i(
|
|
717
|
-
let
|
|
718
|
-
if (
|
|
719
|
-
if (!w(
|
|
720
|
-
const
|
|
721
|
-
|
|
657
|
+
}, Fe = g.memo((e) => {
|
|
658
|
+
const { blockProps: t, inBuilder: l, styles: n, url: o, controls: r } = e, s = k(r, "autoPlay", !1), a = k(r, "controls", !1), c = s || k(r, "muted", !0), y = k(r, "loop", !1);
|
|
659
|
+
if (w(o)) return /* @__PURE__ */ i(L, { inBuilder: l, className: "h-36" });
|
|
660
|
+
let f = qe(o), h = null;
|
|
661
|
+
if (f) {
|
|
662
|
+
if (!w(f)) {
|
|
663
|
+
const m = [];
|
|
664
|
+
m.push(`autoplay=${s ? 1 : 0}`), m.push(`controls=${r ? 1 : 0}`), m.push(`mute=${c ? 1 : 0}&muted=${c ? 1 : 0}`), m.push(`loop=${y ? 1 : 0}`), f = `${f}?${m.join("&")}`;
|
|
722
665
|
}
|
|
723
|
-
h =
|
|
666
|
+
h = g.createElement("iframe", {
|
|
724
667
|
...t,
|
|
725
668
|
className: "absolute inset-0 w-full h-full",
|
|
726
|
-
src:
|
|
669
|
+
src: f,
|
|
727
670
|
allow: l ? "" : "autoplay *; fullscreen *",
|
|
728
671
|
allowFullScreen: !0,
|
|
729
672
|
frameBorder: 0
|
|
730
673
|
});
|
|
731
674
|
} else
|
|
732
|
-
h =
|
|
675
|
+
h = g.createElement("video", {
|
|
733
676
|
...t,
|
|
734
677
|
className: "absolute inset-0 w-full h-full",
|
|
735
678
|
src: o,
|
|
@@ -738,19 +681,19 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
738
681
|
autoPlay: l ? !1 : s,
|
|
739
682
|
loop: y
|
|
740
683
|
});
|
|
741
|
-
return /* @__PURE__ */ i("div", { ...Q(
|
|
742
|
-
l ? /* @__PURE__ */ i("div", { ...t, ...ee(
|
|
684
|
+
return /* @__PURE__ */ i("div", { ...Q(n, ["className"]), children: /* @__PURE__ */ b("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
685
|
+
l ? /* @__PURE__ */ i("div", { ...t, ...ee(n, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
743
686
|
h
|
|
744
687
|
] }) });
|
|
745
|
-
}),
|
|
688
|
+
}), je = {
|
|
746
689
|
type: "Video",
|
|
747
690
|
label: "Video",
|
|
748
691
|
category: "core",
|
|
749
|
-
icon:
|
|
692
|
+
icon: O,
|
|
750
693
|
group: "media",
|
|
751
|
-
...
|
|
694
|
+
...d({
|
|
752
695
|
properties: {
|
|
753
|
-
styles:
|
|
696
|
+
styles: p(""),
|
|
754
697
|
url: {
|
|
755
698
|
type: "string",
|
|
756
699
|
title: "Video URL",
|
|
@@ -791,13 +734,58 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
791
734
|
}
|
|
792
735
|
}),
|
|
793
736
|
i18nProps: ["url"]
|
|
737
|
+
}, De = (e) => {
|
|
738
|
+
const { blockProps: t, iconSize: l, icon: n, content: o, styles: r } = e, s = n, a = /* @__PURE__ */ b(N, { children: [
|
|
739
|
+
/* @__PURE__ */ i("span", { "data-ai-key": "content", children: o }),
|
|
740
|
+
s && /* @__PURE__ */ i("div", { style: { width: l + "px" }, dangerouslySetInnerHTML: { __html: s } })
|
|
741
|
+
] });
|
|
742
|
+
return C(
|
|
743
|
+
"button",
|
|
744
|
+
{
|
|
745
|
+
...t,
|
|
746
|
+
...r,
|
|
747
|
+
type: "button",
|
|
748
|
+
"aria-label": o
|
|
749
|
+
},
|
|
750
|
+
a
|
|
751
|
+
);
|
|
752
|
+
}, Ge = {
|
|
753
|
+
type: "CopyButton",
|
|
754
|
+
description: "A copy button component",
|
|
755
|
+
label: "Copy Button",
|
|
756
|
+
category: "core",
|
|
757
|
+
icon: W,
|
|
758
|
+
group: "basic",
|
|
759
|
+
...d({
|
|
760
|
+
properties: {
|
|
761
|
+
styles: p("p-2 rounded-md flex items-center"),
|
|
762
|
+
content: {
|
|
763
|
+
type: "string",
|
|
764
|
+
title: "Button label",
|
|
765
|
+
default: "Button"
|
|
766
|
+
},
|
|
767
|
+
icon: {
|
|
768
|
+
type: "string",
|
|
769
|
+
title: "Icon",
|
|
770
|
+
default: "<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-copy'><path d='M8 17L19 8M8 17V7a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v10'/></svg>",
|
|
771
|
+
ui: { "ui:widget": "icon" }
|
|
772
|
+
},
|
|
773
|
+
iconSize: {
|
|
774
|
+
type: "number",
|
|
775
|
+
title: "Icon size",
|
|
776
|
+
default: 20
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}),
|
|
780
|
+
i18nProps: ["content"],
|
|
781
|
+
aiProps: ["content"]
|
|
794
782
|
}, Ue = (e) => {
|
|
795
|
-
const { blockProps: t, fieldName: l, label:
|
|
783
|
+
const { blockProps: t, fieldName: l, label: n, styles: o, inputStyles: r, required: s, checked: a, showLabel: c = !0 } = e, y = x();
|
|
796
784
|
return c ? /* @__PURE__ */ b("div", { ...o, ...t, children: [
|
|
797
785
|
/* @__PURE__ */ i(
|
|
798
786
|
"input",
|
|
799
787
|
{
|
|
800
|
-
...
|
|
788
|
+
...r,
|
|
801
789
|
name: l,
|
|
802
790
|
id: y,
|
|
803
791
|
type: "checkbox",
|
|
@@ -805,13 +793,13 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
805
793
|
defaultChecked: a
|
|
806
794
|
}
|
|
807
795
|
),
|
|
808
|
-
|
|
796
|
+
n && /* @__PURE__ */ i("label", { htmlFor: y, children: n })
|
|
809
797
|
] }) : /* @__PURE__ */ i(
|
|
810
798
|
"input",
|
|
811
799
|
{
|
|
812
800
|
id: y,
|
|
813
801
|
...t,
|
|
814
|
-
...
|
|
802
|
+
...r,
|
|
815
803
|
...o,
|
|
816
804
|
type: "checkbox",
|
|
817
805
|
required: s,
|
|
@@ -824,10 +812,10 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
824
812
|
category: "core",
|
|
825
813
|
icon: X,
|
|
826
814
|
group: "form",
|
|
827
|
-
...
|
|
815
|
+
...d({
|
|
828
816
|
properties: {
|
|
829
|
-
styles:
|
|
830
|
-
inputStyles:
|
|
817
|
+
styles: p("flex items-center gap-x-2"),
|
|
818
|
+
inputStyles: p(""),
|
|
831
819
|
fieldName: {
|
|
832
820
|
type: "string",
|
|
833
821
|
title: "Field Name",
|
|
@@ -858,19 +846,19 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
858
846
|
aiProps: ["label"],
|
|
859
847
|
i18nProps: ["label"]
|
|
860
848
|
}, Oe = (e) => {
|
|
861
|
-
const { children: t, blockProps: l, errorMessage:
|
|
849
|
+
const { children: t, blockProps: l, errorMessage: n, successMessage: o, action: r, styles: s, inBuilder: a } = e;
|
|
862
850
|
let c = t;
|
|
863
|
-
return t || (c = /* @__PURE__ */ i(
|
|
851
|
+
return t || (c = /* @__PURE__ */ i(L, { inBuilder: a })), /* @__PURE__ */ b(
|
|
864
852
|
"form",
|
|
865
853
|
{
|
|
866
854
|
...{
|
|
867
855
|
"x-data": "{}",
|
|
868
856
|
"x-on:submit.prevent": "post"
|
|
869
857
|
},
|
|
870
|
-
"data-error":
|
|
858
|
+
"data-error": n,
|
|
871
859
|
"data-success": o,
|
|
872
860
|
method: "post",
|
|
873
|
-
action:
|
|
861
|
+
action: r,
|
|
874
862
|
...l,
|
|
875
863
|
...s,
|
|
876
864
|
children: [
|
|
@@ -898,9 +886,9 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
898
886
|
styles: "#styles:bg-black text-white rounded px-3 py-1,"
|
|
899
887
|
}
|
|
900
888
|
],
|
|
901
|
-
...
|
|
889
|
+
...d({
|
|
902
890
|
properties: {
|
|
903
|
-
styles:
|
|
891
|
+
styles: p(""),
|
|
904
892
|
action: {
|
|
905
893
|
type: "string",
|
|
906
894
|
title: "Submit URL",
|
|
@@ -924,7 +912,7 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
924
912
|
aiProps: ["errorMessage", "successMessage"],
|
|
925
913
|
canAcceptBlock: () => !0
|
|
926
914
|
}, Xe = (e) => {
|
|
927
|
-
const { blockProps: t, inBuilder: l, label:
|
|
915
|
+
const { blockProps: t, inBuilder: l, label: n, styles: o, inputStyles: r, icon: s, iconSize: a, iconPos: c } = e, y = x();
|
|
928
916
|
return /* @__PURE__ */ b(
|
|
929
917
|
"button",
|
|
930
918
|
{
|
|
@@ -932,13 +920,13 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
932
920
|
...{
|
|
933
921
|
"x-bind:disabled": "formLoading"
|
|
934
922
|
},
|
|
935
|
-
...
|
|
923
|
+
...r,
|
|
936
924
|
...o,
|
|
937
925
|
...t || {},
|
|
938
926
|
type: l ? "button" : "submit",
|
|
939
|
-
"aria-label":
|
|
927
|
+
"aria-label": n,
|
|
940
928
|
children: [
|
|
941
|
-
|
|
929
|
+
n,
|
|
942
930
|
s && /* @__PURE__ */ i(
|
|
943
931
|
"div",
|
|
944
932
|
{
|
|
@@ -956,12 +944,12 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
956
944
|
category: "core",
|
|
957
945
|
icon: M,
|
|
958
946
|
group: "form",
|
|
959
|
-
...
|
|
947
|
+
...d({
|
|
960
948
|
properties: {
|
|
961
|
-
styles:
|
|
949
|
+
styles: p(
|
|
962
950
|
"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
|
|
963
951
|
),
|
|
964
|
-
inputStyles:
|
|
952
|
+
inputStyles: p(""),
|
|
965
953
|
label: {
|
|
966
954
|
type: "string",
|
|
967
955
|
title: "Label",
|
|
@@ -994,17 +982,17 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
994
982
|
const {
|
|
995
983
|
blockProps: t,
|
|
996
984
|
fieldName: l,
|
|
997
|
-
label:
|
|
985
|
+
label: n,
|
|
998
986
|
placeholder: o,
|
|
999
|
-
styles:
|
|
987
|
+
styles: r,
|
|
1000
988
|
inputStyles: s,
|
|
1001
989
|
showLabel: a,
|
|
1002
990
|
required: c,
|
|
1003
991
|
inputType: y,
|
|
1004
|
-
autocomplete:
|
|
1005
|
-
} = e, h =
|
|
1006
|
-
return a ? /* @__PURE__ */ b("div", { ...
|
|
1007
|
-
a && /* @__PURE__ */ i("label", { htmlFor: h, children:
|
|
992
|
+
autocomplete: f
|
|
993
|
+
} = e, h = x();
|
|
994
|
+
return a ? /* @__PURE__ */ b("div", { ...r, ...t, children: [
|
|
995
|
+
a && /* @__PURE__ */ i("label", { htmlFor: h, children: n }),
|
|
1008
996
|
/* @__PURE__ */ i(
|
|
1009
997
|
"input",
|
|
1010
998
|
{
|
|
@@ -1014,7 +1002,7 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1014
1002
|
type: y,
|
|
1015
1003
|
placeholder: o,
|
|
1016
1004
|
required: c,
|
|
1017
|
-
autoComplete:
|
|
1005
|
+
autoComplete: f ? "on" : "off"
|
|
1018
1006
|
}
|
|
1019
1007
|
)
|
|
1020
1008
|
] }) : /* @__PURE__ */ i(
|
|
@@ -1024,23 +1012,23 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1024
1012
|
name: l,
|
|
1025
1013
|
...t,
|
|
1026
1014
|
...s,
|
|
1027
|
-
...
|
|
1015
|
+
...r,
|
|
1028
1016
|
type: y,
|
|
1029
1017
|
placeholder: o,
|
|
1030
1018
|
required: c,
|
|
1031
|
-
autoComplete:
|
|
1019
|
+
autoComplete: f ? "on" : "off"
|
|
1032
1020
|
}
|
|
1033
1021
|
);
|
|
1034
1022
|
}, Je = {
|
|
1035
1023
|
type: "Input",
|
|
1036
1024
|
label: "web_blocks.input",
|
|
1037
1025
|
category: "core",
|
|
1038
|
-
icon:
|
|
1026
|
+
icon: $,
|
|
1039
1027
|
group: "form",
|
|
1040
|
-
...
|
|
1028
|
+
...d({
|
|
1041
1029
|
properties: {
|
|
1042
|
-
styles:
|
|
1043
|
-
inputStyles:
|
|
1030
|
+
styles: p(""),
|
|
1031
|
+
inputStyles: p("w-full p-1"),
|
|
1044
1032
|
fieldName: {
|
|
1045
1033
|
type: "string",
|
|
1046
1034
|
title: "Field Name",
|
|
@@ -1084,9 +1072,9 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1084
1072
|
aiProps: ["label", "placeholder"],
|
|
1085
1073
|
i18nProps: ["label", "placeholder"]
|
|
1086
1074
|
}, Ke = (e) => {
|
|
1087
|
-
const { blockProps: t, content: l, styles:
|
|
1088
|
-
return o ?
|
|
1089
|
-
...
|
|
1075
|
+
const { blockProps: t, content: l, styles: n, children: o } = e, r = { ...n, ...t };
|
|
1076
|
+
return o ? g.createElement("label", r, o) : g.createElement("label", {
|
|
1077
|
+
...r,
|
|
1090
1078
|
dangerouslySetInnerHTML: { __html: l }
|
|
1091
1079
|
});
|
|
1092
1080
|
}, Qe = {
|
|
@@ -1095,9 +1083,9 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1095
1083
|
category: "core",
|
|
1096
1084
|
icon: Y,
|
|
1097
1085
|
group: "form",
|
|
1098
|
-
...
|
|
1086
|
+
...d({
|
|
1099
1087
|
properties: {
|
|
1100
|
-
styles:
|
|
1088
|
+
styles: p(),
|
|
1101
1089
|
content: {
|
|
1102
1090
|
type: "string",
|
|
1103
1091
|
title: "Content",
|
|
@@ -1108,16 +1096,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1108
1096
|
aiProps: ["content"],
|
|
1109
1097
|
i18nProps: ["content"]
|
|
1110
1098
|
}, et = (e) => {
|
|
1111
|
-
const { blockProps: t, fieldName: l, label:
|
|
1099
|
+
const { blockProps: t, fieldName: l, label: n, styles: o, inputStyles: r, required: s, checked: a, showLabel: c = !0 } = e, y = x();
|
|
1112
1100
|
return c ? /* @__PURE__ */ b("div", { ...o, ...t, children: [
|
|
1113
|
-
/* @__PURE__ */ i("input", { ...
|
|
1114
|
-
|
|
1101
|
+
/* @__PURE__ */ i("input", { ...r, name: l, id: y, type: "radio", required: s, defaultChecked: a }),
|
|
1102
|
+
n && /* @__PURE__ */ i("label", { htmlFor: y, children: n })
|
|
1115
1103
|
] }) : /* @__PURE__ */ i(
|
|
1116
1104
|
"input",
|
|
1117
1105
|
{
|
|
1118
1106
|
id: y,
|
|
1119
1107
|
...t,
|
|
1120
|
-
...
|
|
1108
|
+
...r,
|
|
1121
1109
|
...o,
|
|
1122
1110
|
type: "radio",
|
|
1123
1111
|
required: s,
|
|
@@ -1131,10 +1119,10 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1131
1119
|
category: "core",
|
|
1132
1120
|
icon: Z,
|
|
1133
1121
|
group: "form",
|
|
1134
|
-
...
|
|
1122
|
+
...d({
|
|
1135
1123
|
properties: {
|
|
1136
|
-
styles:
|
|
1137
|
-
inputStyles:
|
|
1124
|
+
styles: p("flex items-center gap-x-2"),
|
|
1125
|
+
inputStyles: p(""),
|
|
1138
1126
|
fieldName: {
|
|
1139
1127
|
type: "string",
|
|
1140
1128
|
title: "Field Name",
|
|
@@ -1165,16 +1153,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1165
1153
|
aiProps: ["label"],
|
|
1166
1154
|
i18nProps: ["label"]
|
|
1167
1155
|
}, lt = (e) => {
|
|
1168
|
-
const { blockProps: t, fieldName: l, label:
|
|
1169
|
-
return c ? /* @__PURE__ */ b("div", { ...
|
|
1170
|
-
c && /* @__PURE__ */ i("label", { htmlFor: h, children:
|
|
1156
|
+
const { blockProps: t, fieldName: l, label: n, placeholder: o, styles: r, inputStyles: s, required: a, showLabel: c, _multiple: y, options: f } = e, h = x();
|
|
1157
|
+
return c ? /* @__PURE__ */ b("div", { ...r, ...t, children: [
|
|
1158
|
+
c && /* @__PURE__ */ i("label", { htmlFor: h, children: n }),
|
|
1171
1159
|
/* @__PURE__ */ b("select", { ...s, id: h, required: a, multiple: y, name: l, children: [
|
|
1172
1160
|
/* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
|
|
1173
|
-
|
|
1161
|
+
B(f, (m) => /* @__PURE__ */ i("option", { value: m == null ? void 0 : m.value, children: m == null ? void 0 : m.label }, m == null ? void 0 : m.value))
|
|
1174
1162
|
] })
|
|
1175
|
-
] }) : /* @__PURE__ */ b("select", { id: h, ...
|
|
1163
|
+
] }) : /* @__PURE__ */ b("select", { id: h, ...r, ...t, required: a, multiple: y, name: l, children: [
|
|
1176
1164
|
/* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
|
|
1177
|
-
|
|
1165
|
+
B(f, (m) => /* @__PURE__ */ i("option", { value: m == null ? void 0 : m.value, children: m == null ? void 0 : m.label }, m == null ? void 0 : m.value))
|
|
1178
1166
|
] });
|
|
1179
1167
|
}, ot = {
|
|
1180
1168
|
type: "Select",
|
|
@@ -1182,10 +1170,10 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1182
1170
|
category: "core",
|
|
1183
1171
|
icon: J,
|
|
1184
1172
|
group: "form",
|
|
1185
|
-
...
|
|
1173
|
+
...d({
|
|
1186
1174
|
properties: {
|
|
1187
|
-
styles:
|
|
1188
|
-
inputStyles:
|
|
1175
|
+
styles: p(""),
|
|
1176
|
+
inputStyles: p("w-full p-1"),
|
|
1189
1177
|
fieldName: {
|
|
1190
1178
|
type: "string",
|
|
1191
1179
|
title: "Field Name",
|
|
@@ -1240,16 +1228,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1240
1228
|
}),
|
|
1241
1229
|
aiProps: ["label", "placeholder"],
|
|
1242
1230
|
i18nProps: ["label", "placeholder"]
|
|
1243
|
-
},
|
|
1244
|
-
const { blockProps: t, fieldName: l, label:
|
|
1245
|
-
return c ? /* @__PURE__ */ b("div", { ...
|
|
1246
|
-
c && /* @__PURE__ */ i("label", { htmlFor:
|
|
1231
|
+
}, nt = (e) => {
|
|
1232
|
+
const { blockProps: t, fieldName: l, label: n, placeholder: o, styles: r, inputStyles: s, rows: a, showLabel: c, required: y } = e, f = x();
|
|
1233
|
+
return c ? /* @__PURE__ */ b("div", { ...r, ...t, children: [
|
|
1234
|
+
c && /* @__PURE__ */ i("label", { htmlFor: f, children: n }),
|
|
1247
1235
|
/* @__PURE__ */ i(
|
|
1248
1236
|
"textarea",
|
|
1249
1237
|
{
|
|
1250
1238
|
name: l,
|
|
1251
1239
|
...s,
|
|
1252
|
-
id:
|
|
1240
|
+
id: f,
|
|
1253
1241
|
placeholder: o,
|
|
1254
1242
|
rows: a,
|
|
1255
1243
|
required: y
|
|
@@ -1258,31 +1246,31 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1258
1246
|
] }) : /* @__PURE__ */ i(
|
|
1259
1247
|
"textarea",
|
|
1260
1248
|
{
|
|
1261
|
-
id:
|
|
1249
|
+
id: f,
|
|
1262
1250
|
name: l,
|
|
1263
1251
|
...t,
|
|
1264
1252
|
...s,
|
|
1265
|
-
...
|
|
1253
|
+
...r,
|
|
1266
1254
|
placeholder: o,
|
|
1267
1255
|
rows: a,
|
|
1268
1256
|
required: y
|
|
1269
1257
|
}
|
|
1270
1258
|
);
|
|
1271
|
-
},
|
|
1259
|
+
}, rt = {
|
|
1272
1260
|
type: "TextArea",
|
|
1273
1261
|
label: "web_blocks.textarea",
|
|
1274
1262
|
category: "core",
|
|
1275
|
-
icon:
|
|
1263
|
+
icon: $,
|
|
1276
1264
|
group: "form",
|
|
1277
|
-
...
|
|
1265
|
+
...d({
|
|
1278
1266
|
properties: {
|
|
1279
1267
|
fieldName: {
|
|
1280
1268
|
type: "string",
|
|
1281
1269
|
title: "Field Name",
|
|
1282
1270
|
default: "fieldName"
|
|
1283
1271
|
},
|
|
1284
|
-
styles:
|
|
1285
|
-
inputStyles:
|
|
1272
|
+
styles: p(""),
|
|
1273
|
+
inputStyles: p("w-full p-1"),
|
|
1286
1274
|
showLabel: {
|
|
1287
1275
|
type: "boolean",
|
|
1288
1276
|
title: "Show Label",
|
|
@@ -1315,16 +1303,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1315
1303
|
i18nProps: ["label", "placeholder"]
|
|
1316
1304
|
}, it = (e) => {
|
|
1317
1305
|
const { blockProps: t, styles: l } = e;
|
|
1318
|
-
return
|
|
1306
|
+
return C("br", { ...t, ...l });
|
|
1319
1307
|
}, st = {
|
|
1320
1308
|
type: "LineBreak",
|
|
1321
1309
|
label: "Line Break",
|
|
1322
1310
|
category: "core",
|
|
1323
1311
|
group: "basic",
|
|
1324
1312
|
hidden: !0,
|
|
1325
|
-
...
|
|
1313
|
+
...d({
|
|
1326
1314
|
properties: {
|
|
1327
|
-
styles:
|
|
1315
|
+
styles: p("")
|
|
1328
1316
|
}
|
|
1329
1317
|
}),
|
|
1330
1318
|
canAcceptBlock: () => !0,
|
|
@@ -1332,7 +1320,7 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1332
1320
|
canMove: () => !1,
|
|
1333
1321
|
canDuplicate: () => !1
|
|
1334
1322
|
}, at = (e) => {
|
|
1335
|
-
const { blockProps: t, inBuilder: l, children:
|
|
1323
|
+
const { blockProps: t, inBuilder: l, children: n, partialBlockId: o } = e;
|
|
1336
1324
|
return l && !o ? /* @__PURE__ */ b(
|
|
1337
1325
|
"div",
|
|
1338
1326
|
{
|
|
@@ -1346,15 +1334,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1346
1334
|
/* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
1347
1335
|
]
|
|
1348
1336
|
}
|
|
1349
|
-
) :
|
|
1337
|
+
) : g.createElement("span", { ...t }, n);
|
|
1350
1338
|
}, ct = {
|
|
1351
1339
|
type: "PartialBlock",
|
|
1340
|
+
description: "A partial block component",
|
|
1352
1341
|
label: "Partial Block",
|
|
1353
|
-
icon:
|
|
1342
|
+
icon: T,
|
|
1354
1343
|
category: "core",
|
|
1355
1344
|
group: "basic",
|
|
1356
1345
|
hidden: !0,
|
|
1357
|
-
...
|
|
1346
|
+
...d({
|
|
1358
1347
|
properties: {
|
|
1359
1348
|
partialBlockId: {
|
|
1360
1349
|
type: "string",
|
|
@@ -1364,7 +1353,7 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1364
1353
|
}
|
|
1365
1354
|
}
|
|
1366
1355
|
})
|
|
1367
|
-
},
|
|
1356
|
+
}, I = {
|
|
1368
1357
|
SMALL: {
|
|
1369
1358
|
1: "col-span-1",
|
|
1370
1359
|
2: "col-span-2",
|
|
@@ -1408,15 +1397,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1408
1397
|
12: "lg:col-span-12"
|
|
1409
1398
|
}
|
|
1410
1399
|
}, pt = (e) => {
|
|
1411
|
-
const { blockProps: t, children: l, styles:
|
|
1412
|
-
k(
|
|
1413
|
-
k(
|
|
1414
|
-
|
|
1415
|
-
s ? k(
|
|
1400
|
+
const { blockProps: t, children: l, styles: n, colSpan: o, tabletColSpan: r, desktopColSpan: s } = e, c = { className: [
|
|
1401
|
+
k(n, "className", ""),
|
|
1402
|
+
k(I, ["SMALL", isNaN(o) || !o ? 6 : o], ""),
|
|
1403
|
+
r ? k(I, ["MEDIUM", r || o], "") : "",
|
|
1404
|
+
s ? k(I, ["LARGE", r || o], "") : ""
|
|
1416
1405
|
].join(" ") };
|
|
1417
|
-
return /* @__PURE__ */ i("div", { ...t, ...
|
|
1406
|
+
return /* @__PURE__ */ i("div", { ...t, ...n, ...c, children: l || /* @__PURE__ */ i("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
1418
1407
|
}, ut = {
|
|
1419
1408
|
type: "Column",
|
|
1409
|
+
description: "A column component",
|
|
1420
1410
|
label: "Column",
|
|
1421
1411
|
group: "basic",
|
|
1422
1412
|
category: "core",
|
|
@@ -1425,9 +1415,9 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1425
1415
|
canDelete: () => !0,
|
|
1426
1416
|
canAcceptBlock: () => !0,
|
|
1427
1417
|
canBeNested: (e) => e === "Row",
|
|
1428
|
-
...
|
|
1418
|
+
...d({
|
|
1429
1419
|
properties: {
|
|
1430
|
-
styles:
|
|
1420
|
+
styles: p(""),
|
|
1431
1421
|
colSpan: {
|
|
1432
1422
|
type: "number",
|
|
1433
1423
|
title: "Column Span",
|
|
@@ -1451,13 +1441,14 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1451
1441
|
}
|
|
1452
1442
|
})
|
|
1453
1443
|
}, dt = (e) => {
|
|
1454
|
-
const { blockProps: t, children: l, styles:
|
|
1455
|
-
return typeof (
|
|
1444
|
+
const { blockProps: t, children: l, styles: n, gutter: o } = e, s = { className: [k(n, "className", ""), " grid grid-cols-12"].join() };
|
|
1445
|
+
return typeof (n == null ? void 0 : n.style) == "object" ? n.style.gap = `${o}px` : s.style = { gap: `${o}px` }, /* @__PURE__ */ i("div", { ...t, ...n, ...s, children: l });
|
|
1456
1446
|
}, mt = {
|
|
1457
1447
|
type: "Row",
|
|
1448
|
+
description: "A row component",
|
|
1458
1449
|
label: "Row",
|
|
1459
1450
|
group: "basic",
|
|
1460
|
-
icon:
|
|
1451
|
+
icon: ne,
|
|
1461
1452
|
blocks: () => [
|
|
1462
1453
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1463
1454
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
@@ -1466,9 +1457,9 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1466
1457
|
category: "core",
|
|
1467
1458
|
wrapper: !0,
|
|
1468
1459
|
canAcceptBlock: (e) => e === "Column",
|
|
1469
|
-
...
|
|
1460
|
+
...d({
|
|
1470
1461
|
properties: {
|
|
1471
|
-
styles:
|
|
1462
|
+
styles: p(""),
|
|
1472
1463
|
colCount: {
|
|
1473
1464
|
type: "number",
|
|
1474
1465
|
default: 2,
|
|
@@ -1483,9 +1474,9 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
|
|
|
1483
1474
|
}
|
|
1484
1475
|
}
|
|
1485
1476
|
})
|
|
1486
|
-
},
|
|
1487
|
-
|
|
1477
|
+
}, Ct = () => {
|
|
1478
|
+
u(re, ie), u(ue, de), u(se, ae), u(me, ye), u(ge, fe), u(ke, we), u(be, he), u(Me, $e), u(Te, Ee), u(Ae, Re), u(Pe, Se), u(_e, Ne), u(Fe, je), u(ce, pe), u(Ce, xe), u(He, ze), u(Oe, We), u(Xe, Ye), u(Ze, Je), u(Ue, Ve), u(et, tt), u(lt, ot), u(nt, rt), u(Ke, Qe), u(it, st), u(Le, ve), u(Ie, Be), u(at, ct), u(dt, mt), u(pt, ut), u(De, Ge);
|
|
1488
1479
|
};
|
|
1489
1480
|
export {
|
|
1490
|
-
|
|
1481
|
+
Ct as loadWebBlocks
|
|
1491
1482
|
};
|