@chaibuilder/sdk 2.0.0-beta.64 → 2.0.0-beta.66
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-B2x4yruH.cjs +1 -0
- package/dist/CodeEditor-VcQsGvTM.js +65 -0
- package/dist/Topbar-BQsjWb-A.js +16 -0
- package/dist/Topbar-DEw_kBMz.cjs +1 -0
- package/dist/chaibuilder-logo.png +0 -0
- package/dist/context-menu-C4lLV8gP.cjs +1 -0
- package/dist/{context-menu-FCyNTUkl.js → context-menu-D5ViOi6K.js} +236 -239
- package/dist/core.cjs +5 -5
- package/dist/core.js +1601 -1609
- package/dist/render.cjs +2 -2
- package/dist/render.js +83 -83
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +198 -198
- package/dist/web-blocks.cjs +6 -6
- package/dist/web-blocks.js +375 -346
- package/package.json +4 -2
- package/dist/CodeEditor-BLTQpTTM.js +0 -67
- package/dist/CodeEditor-CJhjQonw.cjs +0 -1
- package/dist/Topbar-CEyGOl06.js +0 -16
- package/dist/Topbar-pFV2NO8v.cjs +0 -1
- package/dist/context-menu-C_ITMOD1.cjs +0 -1
- package/dist/jsx-runtime-Drh4NO5G.js +0 -633
- package/dist/jsx-runtime-qcKc-DpB.cjs +0 -30
package/dist/web-blocks.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { registerChaiBlockSchema as p, StylesProp as d, registerChaiBlock as u, closestBlockProp as
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import { createElement as
|
|
5
|
-
import { c as
|
|
6
|
-
import { ButtonIcon as
|
|
7
|
-
import { isEmpty as
|
|
8
|
-
import { GlobeIcon as
|
|
9
|
-
const
|
|
10
|
-
const { blockProps: t, inBuilder: l, backgroundImage: n, children: r, tag:
|
|
1
|
+
import { registerChaiBlockSchema as p, StylesProp as d, registerChaiBlock as u, closestBlockProp as _, stylesProp as $, runtimeProp as F } from "@chaibuilder/runtime";
|
|
2
|
+
import { jsx as i, jsxs as k, Fragment as W } from "react/jsx-runtime";
|
|
3
|
+
import * as w from "react";
|
|
4
|
+
import { createElement as I } from "react";
|
|
5
|
+
import { c as P, G as X, g as C } from "./iconBase-DHfFLkem.js";
|
|
6
|
+
import { ButtonIcon as q, CodeIcon as Y, HeadingIcon as Z, TextIcon as J, CursorTextIcon as K, MoonIcon as G, SunIcon as Q, DividerHorizontalIcon as ee, SketchLogoIcon as te, ImageIcon as U, Link1Icon as le, RowsIcon as re, ColumnsIcon as ne, SpaceBetweenVerticallyIcon as oe, VideoIcon as ie, DropdownMenuIcon as O, CheckboxIcon as ae, InputIcon as V, LetterCaseToggleIcon as se, RadiobuttonIcon as ce } from "@radix-ui/react-icons";
|
|
7
|
+
import { isEmpty as S, get as v, isNull as de, pick as ue, omit as pe, map as R } from "lodash-es";
|
|
8
|
+
import { GlobeIcon as ye, GroupIcon as ge, Columns as me, Rows as he, PanelRightOpen as D, PanelRightClose as fe, AlignHorizontalJustifyStart as be, AppWindowIcon as we, UnfoldHorizontal as ke } from "lucide-react";
|
|
9
|
+
const B = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div", { className: P("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ i("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, ve = (e) => {
|
|
10
|
+
const { blockProps: t, inBuilder: l, backgroundImage: n, children: r, tag: o = "div", styles: a } = e;
|
|
11
11
|
let c = r;
|
|
12
|
-
r || (c = /* @__PURE__ */
|
|
13
|
-
let
|
|
14
|
-
return n && (
|
|
15
|
-
},
|
|
12
|
+
r || (c = /* @__PURE__ */ i(B, { inBuilder: l }));
|
|
13
|
+
let s = {};
|
|
14
|
+
return n && (s = { backgroundImage: `url(${n})` }), w.createElement(o, { ...t, ...a, style: s }, c);
|
|
15
|
+
}, xe = {
|
|
16
16
|
type: "Box",
|
|
17
17
|
label: "Box",
|
|
18
18
|
category: "core",
|
|
@@ -53,10 +53,10 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
53
53
|
}
|
|
54
54
|
}),
|
|
55
55
|
canAcceptBlock: () => !0
|
|
56
|
-
},
|
|
57
|
-
const { blockProps: t, iconSize: l, icon: n, content: r, styles:
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
m && /* @__PURE__ */
|
|
56
|
+
}, Se = (e) => {
|
|
57
|
+
const { blockProps: t, iconSize: l, icon: n, content: r, styles: o, children: a, iconPos: c, link: s, inBuilder: g } = e, m = n, h = a || /* @__PURE__ */ k(W, { children: [
|
|
58
|
+
/* @__PURE__ */ i("span", { "data-ai-key": "content", children: r }),
|
|
59
|
+
m && /* @__PURE__ */ i(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
62
|
style: { width: l + "px" },
|
|
@@ -64,22 +64,22 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
64
64
|
dangerouslySetInnerHTML: { __html: m }
|
|
65
65
|
}
|
|
66
66
|
)
|
|
67
|
-
] }), y =
|
|
67
|
+
] }), y = I(
|
|
68
68
|
"button",
|
|
69
69
|
{
|
|
70
70
|
...t,
|
|
71
|
-
...
|
|
71
|
+
...o,
|
|
72
72
|
type: "button",
|
|
73
73
|
"aria-label": r
|
|
74
74
|
},
|
|
75
75
|
h
|
|
76
76
|
);
|
|
77
|
-
return v(
|
|
78
|
-
},
|
|
77
|
+
return S(v(s, "href")) ? y : g ? /* @__PURE__ */ i("span", { children: y }) : /* @__PURE__ */ i("a", { "aria-label": r, href: v(s, "href") || "/", target: v(s, "target", "_self"), children: y });
|
|
78
|
+
}, _e = {
|
|
79
79
|
type: "Button",
|
|
80
80
|
label: "Button",
|
|
81
81
|
category: "core",
|
|
82
|
-
icon:
|
|
82
|
+
icon: q,
|
|
83
83
|
group: "basic",
|
|
84
84
|
...p({
|
|
85
85
|
properties: {
|
|
@@ -126,24 +126,24 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
126
126
|
}),
|
|
127
127
|
i18nProps: ["content"],
|
|
128
128
|
aiProps: ["content"]
|
|
129
|
-
},
|
|
129
|
+
}, Be = (e) => {
|
|
130
130
|
const { blockProps: t, styles: l, htmlCode: n, inBuilder: r } = e;
|
|
131
|
-
return r ? /* @__PURE__ */
|
|
132
|
-
r ? /* @__PURE__ */
|
|
133
|
-
|
|
131
|
+
return r ? /* @__PURE__ */ k("div", { className: "relative", children: [
|
|
132
|
+
r ? /* @__PURE__ */ i("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
|
|
133
|
+
w.createElement("div", {
|
|
134
134
|
...l,
|
|
135
135
|
dangerouslySetInnerHTML: { __html: n.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
136
136
|
})
|
|
137
|
-
] }) :
|
|
137
|
+
] }) : w.createElement("div", {
|
|
138
138
|
...t,
|
|
139
139
|
...l,
|
|
140
140
|
dangerouslySetInnerHTML: { __html: n }
|
|
141
141
|
});
|
|
142
|
-
},
|
|
142
|
+
}, Ie = {
|
|
143
143
|
type: "CustomHTML",
|
|
144
144
|
label: "web_blocks.custom_html",
|
|
145
145
|
category: "core",
|
|
146
|
-
icon:
|
|
146
|
+
icon: Y,
|
|
147
147
|
group: "advanced",
|
|
148
148
|
...p({
|
|
149
149
|
properties: {
|
|
@@ -155,11 +155,11 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
})
|
|
158
|
-
},
|
|
158
|
+
}, Ce = (e) => {
|
|
159
159
|
const { blockProps: t, styles: l, backgroundImage: n } = e;
|
|
160
160
|
let r = {};
|
|
161
|
-
return n && (r = { backgroundImage: `url(${n})` }),
|
|
162
|
-
},
|
|
161
|
+
return n && (r = { backgroundImage: `url(${n})` }), w.createElement("div", { ...t, ...l, style: r });
|
|
162
|
+
}, Le = {
|
|
163
163
|
type: "EmptyBox",
|
|
164
164
|
label: "Empty Box",
|
|
165
165
|
category: "core",
|
|
@@ -175,18 +175,18 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
})
|
|
178
|
-
},
|
|
179
|
-
const { blockProps: t, styles: l, content: n, tag: r = "h1", children:
|
|
180
|
-
return
|
|
178
|
+
}, Pe = (e) => {
|
|
179
|
+
const { blockProps: t, styles: l, content: n, tag: r = "h1", children: o = null } = e;
|
|
180
|
+
return o ? w.createElement(r, { ...l, ...t }, o) : w.createElement(r, {
|
|
181
181
|
...l,
|
|
182
182
|
...t,
|
|
183
183
|
dangerouslySetInnerHTML: { __html: n }
|
|
184
184
|
});
|
|
185
|
-
},
|
|
185
|
+
}, Ne = {
|
|
186
186
|
type: "Heading",
|
|
187
187
|
label: "web_blocks.heading",
|
|
188
188
|
category: "core",
|
|
189
|
-
icon:
|
|
189
|
+
icon: Z,
|
|
190
190
|
group: "typography",
|
|
191
191
|
...p({
|
|
192
192
|
properties: {
|
|
@@ -208,18 +208,18 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
208
208
|
aiProps: ["content"],
|
|
209
209
|
i18nProps: ["content"],
|
|
210
210
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
211
|
-
},
|
|
211
|
+
}, Me = (e) => {
|
|
212
212
|
const { blockProps: t, styles: l, content: n } = e;
|
|
213
|
-
return
|
|
213
|
+
return de(e.children) ? w.createElement("p", {
|
|
214
214
|
...l,
|
|
215
215
|
...t,
|
|
216
216
|
dangerouslySetInnerHTML: { __html: n }
|
|
217
|
-
}) :
|
|
218
|
-
},
|
|
217
|
+
}) : w.createElement("p", { ...l, ...t }, e.children);
|
|
218
|
+
}, $e = {
|
|
219
219
|
type: "Paragraph",
|
|
220
220
|
label: "Paragraph",
|
|
221
221
|
category: "core",
|
|
222
|
-
icon:
|
|
222
|
+
icon: J,
|
|
223
223
|
group: "typography",
|
|
224
224
|
...p({
|
|
225
225
|
properties: {
|
|
@@ -237,14 +237,17 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
237
237
|
i18nProps: ["content"],
|
|
238
238
|
aiProps: ["content"],
|
|
239
239
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
240
|
-
},
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
},
|
|
240
|
+
}, T = (e, ...t) => ({
|
|
241
|
+
...e,
|
|
242
|
+
className: P(e.className, ...t)
|
|
243
|
+
}), De = (e) => {
|
|
244
|
+
const { blockProps: t, content: l, styles: n } = e, r = T(n, "prose", "max-w-full");
|
|
245
|
+
return /* @__PURE__ */ i("div", { ...t, ...r, dangerouslySetInnerHTML: { __html: l } });
|
|
246
|
+
}, Te = {
|
|
244
247
|
type: "RichText",
|
|
245
248
|
label: "Rich Text",
|
|
246
249
|
category: "core",
|
|
247
|
-
icon:
|
|
250
|
+
icon: K,
|
|
248
251
|
group: "typography",
|
|
249
252
|
...p({
|
|
250
253
|
properties: {
|
|
@@ -259,14 +262,14 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
259
262
|
}),
|
|
260
263
|
aiProps: ["content"],
|
|
261
264
|
i18nProps: ["content"]
|
|
262
|
-
},
|
|
263
|
-
const { blockProps: t, styles: l, content: n, children: r = null, tag:
|
|
264
|
-
return r ?
|
|
265
|
+
}, Ae = (e) => {
|
|
266
|
+
const { blockProps: t, styles: l, content: n, children: r = null, tag: o } = e;
|
|
267
|
+
return r ? w.createElement("span", { ...l, ...t }, r) : w.createElement(o || "span", {
|
|
265
268
|
...l,
|
|
266
269
|
...t,
|
|
267
270
|
dangerouslySetInnerHTML: { __html: n || "" }
|
|
268
271
|
});
|
|
269
|
-
},
|
|
272
|
+
}, Ee = {
|
|
270
273
|
type: "Span",
|
|
271
274
|
label: "Span",
|
|
272
275
|
category: "core",
|
|
@@ -286,17 +289,17 @@ const _ = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ o.jsx("di
|
|
|
286
289
|
i18nProps: ["content"],
|
|
287
290
|
canAcceptBlock: () => !0
|
|
288
291
|
};
|
|
289
|
-
function
|
|
290
|
-
return
|
|
292
|
+
function Re(e) {
|
|
293
|
+
return X({ tag: "svg", attr: { version: "1.1", viewBox: "0 0 32 32" }, child: [{ tag: "path", attr: { d: "M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z" }, child: [] }] })(e);
|
|
291
294
|
}
|
|
292
|
-
const
|
|
295
|
+
const ze = (e) => {
|
|
293
296
|
const { scripts: t, inBuilder: l, blockProps: n } = e;
|
|
294
|
-
return l ? /* @__PURE__ */
|
|
295
|
-
},
|
|
297
|
+
return l ? /* @__PURE__ */ i("div", { ...n, children: /* @__PURE__ */ i("div", { className: P("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ i("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: t } });
|
|
298
|
+
}, He = {
|
|
296
299
|
type: "CustomScript",
|
|
297
300
|
label: "web_blocks.custom_script",
|
|
298
301
|
category: "core",
|
|
299
|
-
icon:
|
|
302
|
+
icon: Re,
|
|
300
303
|
group: "advanced",
|
|
301
304
|
...p({
|
|
302
305
|
properties: {
|
|
@@ -309,36 +312,36 @@ const Ee = (e) => {
|
|
|
309
312
|
}
|
|
310
313
|
}
|
|
311
314
|
})
|
|
312
|
-
},
|
|
315
|
+
}, je = (e) => /* @__PURE__ */ k("div", { ...e.blockProps, ...e.styles, children: [
|
|
313
316
|
e.mode,
|
|
314
317
|
e.children
|
|
315
|
-
] }),
|
|
316
|
-
u(
|
|
318
|
+
] }), Fe = (e) => e.mode === "dark" ? null : /* @__PURE__ */ i("button", { "aria-label": "dark mode button", ...e.blockProps, ...e.styles, children: e.children });
|
|
319
|
+
u(Fe, {
|
|
317
320
|
type: "DarkModeButton",
|
|
318
321
|
label: "Dark Mode Button",
|
|
319
322
|
category: "core",
|
|
320
|
-
icon:
|
|
323
|
+
icon: G,
|
|
321
324
|
group: "advanced",
|
|
322
325
|
hidden: !0,
|
|
323
326
|
...p({
|
|
324
327
|
properties: {
|
|
325
|
-
mode:
|
|
326
|
-
styles:
|
|
328
|
+
mode: _("DarkModeSwitcher", "mode"),
|
|
329
|
+
styles: $("")
|
|
327
330
|
}
|
|
328
331
|
})
|
|
329
332
|
});
|
|
330
|
-
const
|
|
331
|
-
u(
|
|
333
|
+
const qe = (e) => e.mode === "light" ? null : /* @__PURE__ */ i("button", { "aria-label": "light mode button", ...e.blockProps, ...e.styles, children: e.children });
|
|
334
|
+
u(qe, {
|
|
332
335
|
type: "LightModeButton",
|
|
333
336
|
label: "Light Mode Button",
|
|
334
337
|
category: "core",
|
|
335
|
-
icon:
|
|
338
|
+
icon: Q,
|
|
336
339
|
group: "advanced",
|
|
337
340
|
hidden: !0,
|
|
338
341
|
...p({
|
|
339
342
|
properties: {
|
|
340
|
-
mode:
|
|
341
|
-
styles:
|
|
343
|
+
mode: _("DarkModeSwitcher", "mode"),
|
|
344
|
+
styles: $(""),
|
|
342
345
|
fake: {
|
|
343
346
|
type: "string",
|
|
344
347
|
default: ""
|
|
@@ -346,11 +349,11 @@ u(He, {
|
|
|
346
349
|
}
|
|
347
350
|
})
|
|
348
351
|
});
|
|
349
|
-
const
|
|
352
|
+
const Ge = {
|
|
350
353
|
type: "DarkModeSwitcher",
|
|
351
354
|
label: "web_blocks.dark_mode",
|
|
352
355
|
category: "core",
|
|
353
|
-
icon:
|
|
356
|
+
icon: G,
|
|
354
357
|
group: "advanced",
|
|
355
358
|
wrapper: !0,
|
|
356
359
|
...p({
|
|
@@ -361,7 +364,7 @@ const qe = {
|
|
|
361
364
|
enum: ["dark", "light"],
|
|
362
365
|
default: "light"
|
|
363
366
|
},
|
|
364
|
-
styles:
|
|
367
|
+
styles: $("")
|
|
365
368
|
}
|
|
366
369
|
}),
|
|
367
370
|
blocks: () => [
|
|
@@ -399,40 +402,40 @@ const qe = {
|
|
|
399
402
|
icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='4'></circle><path d='M12 2v2'></path><path d='M12 20v2'></path><path d='m4.93 4.93 1.41 1.41'></path><path d='m17.66 17.66 1.41 1.41'></path><path d='M2 12h2'></path><path d='M20 12h2'></path><path d='m6.34 17.66-1.41 1.41'></path><path d='m19.07 4.93-1.41 1.41'></path></svg>"
|
|
400
403
|
}
|
|
401
404
|
]
|
|
402
|
-
},
|
|
405
|
+
}, Ue = (e) => {
|
|
403
406
|
const { blockProps: t, styles: l } = e;
|
|
404
|
-
return
|
|
405
|
-
},
|
|
407
|
+
return I("hr", { ...l, ...t });
|
|
408
|
+
}, Oe = {
|
|
406
409
|
type: "Divider",
|
|
407
410
|
label: "web_blocks.divider",
|
|
408
411
|
category: "core",
|
|
409
|
-
icon:
|
|
412
|
+
icon: ee,
|
|
410
413
|
group: "basic",
|
|
411
414
|
...p({
|
|
412
415
|
properties: {
|
|
413
416
|
styles: d("bg-gray-900 h-0.5 py-2 my-1")
|
|
414
417
|
}
|
|
415
418
|
})
|
|
416
|
-
},
|
|
419
|
+
}, Ve = (e) => {
|
|
417
420
|
const { blockProps: t, inBuilder: l, children: n, globalBlock: r } = e;
|
|
418
|
-
return l && !r ? /* @__PURE__ */
|
|
421
|
+
return l && !r ? /* @__PURE__ */ k(
|
|
419
422
|
"div",
|
|
420
423
|
{
|
|
421
424
|
className: "flex flex-col items-center justify-center py-4 bg-gray-100 rounded-lg gap-y-1 dark:bg-gray-800",
|
|
422
425
|
...t,
|
|
423
426
|
children: [
|
|
424
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ k("h1", { children: [
|
|
425
428
|
"Global Block - ",
|
|
426
429
|
r
|
|
427
430
|
] }),
|
|
428
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
429
432
|
]
|
|
430
433
|
}
|
|
431
|
-
) :
|
|
432
|
-
},
|
|
434
|
+
) : w.createElement("span", { ...t }, n);
|
|
435
|
+
}, We = {
|
|
433
436
|
type: "GlobalBlock",
|
|
434
437
|
label: "Global Block",
|
|
435
|
-
icon:
|
|
438
|
+
icon: ye,
|
|
436
439
|
category: "core",
|
|
437
440
|
group: "advanced",
|
|
438
441
|
...p({
|
|
@@ -447,28 +450,25 @@ const qe = {
|
|
|
447
450
|
}
|
|
448
451
|
}
|
|
449
452
|
})
|
|
450
|
-
},
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
return /* @__PURE__ */ o.jsx(_, { inBuilder: s, className: "h-8 w-14" });
|
|
457
|
-
const a = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
458
|
-
return x.createElement("span", {
|
|
453
|
+
}, Xe = (e) => {
|
|
454
|
+
const { blockProps: t, icon: l, styles: n, width: r, inBuilder: o, height: a } = e, c = T(n, "");
|
|
455
|
+
if (S(l))
|
|
456
|
+
return /* @__PURE__ */ i(B, { inBuilder: o, className: "h-8 w-14" });
|
|
457
|
+
const s = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
458
|
+
return w.createElement("span", {
|
|
459
459
|
...t,
|
|
460
460
|
...c,
|
|
461
461
|
style: {
|
|
462
462
|
width: r ? `${r}px` : "auto",
|
|
463
|
-
height:
|
|
463
|
+
height: a ? `${a}px` : "auto"
|
|
464
464
|
},
|
|
465
|
-
dangerouslySetInnerHTML: { __html:
|
|
465
|
+
dangerouslySetInnerHTML: { __html: s }
|
|
466
466
|
});
|
|
467
|
-
},
|
|
467
|
+
}, Ye = {
|
|
468
468
|
type: "Icon",
|
|
469
469
|
label: "web_blocks.icon",
|
|
470
470
|
category: "core",
|
|
471
|
-
icon:
|
|
471
|
+
icon: te,
|
|
472
472
|
group: "media",
|
|
473
473
|
...p({
|
|
474
474
|
properties: {
|
|
@@ -491,28 +491,28 @@ const qe = {
|
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
493
|
})
|
|
494
|
-
},
|
|
495
|
-
const { blockProps: t, image: l, mobileImage: n, styles: r, alt:
|
|
496
|
-
return
|
|
497
|
-
n && /* @__PURE__ */
|
|
498
|
-
/* @__PURE__ */
|
|
494
|
+
}, Ze = (e) => {
|
|
495
|
+
const { blockProps: t, image: l, mobileImage: n, styles: r, alt: o, height: a, width: c, lazyLoading: s } = e;
|
|
496
|
+
return S(l) ? /* @__PURE__ */ i(B, { className: "h-36" }) : /* @__PURE__ */ k("picture", { children: [
|
|
497
|
+
n && /* @__PURE__ */ i("source", { srcSet: n, media: "(max-width: 480px)" }),
|
|
498
|
+
/* @__PURE__ */ i(
|
|
499
499
|
"img",
|
|
500
500
|
{
|
|
501
501
|
...t,
|
|
502
502
|
...r,
|
|
503
503
|
src: l,
|
|
504
|
-
alt:
|
|
505
|
-
loading:
|
|
504
|
+
alt: o,
|
|
505
|
+
loading: s ? "lazy" : "eager",
|
|
506
506
|
width: c,
|
|
507
|
-
height:
|
|
507
|
+
height: a
|
|
508
508
|
}
|
|
509
509
|
)
|
|
510
510
|
] });
|
|
511
|
-
},
|
|
511
|
+
}, Je = {
|
|
512
512
|
type: "Image",
|
|
513
513
|
label: "Image",
|
|
514
514
|
category: "core",
|
|
515
|
-
icon:
|
|
515
|
+
icon: U,
|
|
516
516
|
group: "media",
|
|
517
517
|
...p({
|
|
518
518
|
properties: {
|
|
@@ -556,30 +556,30 @@ const qe = {
|
|
|
556
556
|
}),
|
|
557
557
|
aiProps: ["alt"],
|
|
558
558
|
i18nProps: ["alt"]
|
|
559
|
-
},
|
|
560
|
-
const { blockProps: t, children: l, styles: n, inBuilder: r, content:
|
|
561
|
-
if (!l &&
|
|
562
|
-
return /* @__PURE__ */
|
|
559
|
+
}, Ke = (e) => {
|
|
560
|
+
const { blockProps: t, children: l, styles: n, inBuilder: r, content: o, href: a } = e, { hrefType: c, autoplay: s, maxWidth: g, backdropColor: m, galleryName: h } = e, y = T(n, "cb-lightbox");
|
|
561
|
+
if (!l && S(n == null ? void 0 : n.className) && S(o))
|
|
562
|
+
return /* @__PURE__ */ i(B, { inBuilder: r });
|
|
563
563
|
if (r)
|
|
564
|
-
return l ? /* @__PURE__ */
|
|
564
|
+
return l ? /* @__PURE__ */ i("span", { ...t, ...y, children: l }) : w.createElement("span", {
|
|
565
565
|
...t,
|
|
566
566
|
...y,
|
|
567
|
-
dangerouslySetInnerHTML: { __html:
|
|
567
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
568
568
|
});
|
|
569
569
|
const f = {};
|
|
570
|
-
return c !== "image" && (f["data-vbtype"] = c),
|
|
570
|
+
return c !== "image" && (f["data-vbtype"] = c), s && (f["data-autoplay"] = "true"), g && (f["data-maxwidth"] = g + "px"), m && (f["data-overlay"] = m), h && (f["data-gall"] = h), l ? /* @__PURE__ */ i("a", { "aria-label": o, ...f, href: a || "#/", ...t, ...y, children: l }) : w.createElement("a", {
|
|
571
571
|
...t,
|
|
572
572
|
...y,
|
|
573
573
|
...f,
|
|
574
|
-
href:
|
|
575
|
-
dangerouslySetInnerHTML: { __html:
|
|
576
|
-
"aria-label":
|
|
574
|
+
href: a || "#",
|
|
575
|
+
dangerouslySetInnerHTML: { __html: o },
|
|
576
|
+
"aria-label": o
|
|
577
577
|
});
|
|
578
|
-
},
|
|
578
|
+
}, Qe = {
|
|
579
579
|
type: "LightBoxLink",
|
|
580
580
|
label: "Lightbox Link",
|
|
581
581
|
category: "core",
|
|
582
|
-
icon:
|
|
582
|
+
icon: U,
|
|
583
583
|
group: "basic",
|
|
584
584
|
...p({
|
|
585
585
|
properties: {
|
|
@@ -629,33 +629,33 @@ const qe = {
|
|
|
629
629
|
i18nProps: ["content"],
|
|
630
630
|
aiProps: ["content"],
|
|
631
631
|
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
632
|
-
},
|
|
633
|
-
const { blockProps: t, link: l, children: n, styles: r, inBuilder:
|
|
632
|
+
}, et = (e) => {
|
|
633
|
+
const { blockProps: t, link: l, children: n, styles: r, inBuilder: o, content: a } = e;
|
|
634
634
|
let c = {};
|
|
635
|
-
return !n &&
|
|
635
|
+
return !n && S(a) && (c = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), o ? n ? /* @__PURE__ */ i("span", { ...t, style: c, ...r, children: n }) : I(
|
|
636
636
|
"span",
|
|
637
637
|
{
|
|
638
638
|
...t,
|
|
639
639
|
...r,
|
|
640
640
|
style: c
|
|
641
641
|
},
|
|
642
|
-
|
|
643
|
-
) : n ? /* @__PURE__ */
|
|
642
|
+
a
|
|
643
|
+
) : n ? /* @__PURE__ */ i("a", { "aria-label": a, href: (l == null ? void 0 : l.href) || "#/", target: l == null ? void 0 : l.target, ...t, ...r, children: n }) : I(
|
|
644
644
|
"a",
|
|
645
645
|
{
|
|
646
646
|
...t,
|
|
647
647
|
...r,
|
|
648
648
|
href: (l == null ? void 0 : l.href) || "#",
|
|
649
649
|
target: (l == null ? void 0 : l.target) || "_self",
|
|
650
|
-
"aria-label":
|
|
650
|
+
"aria-label": a
|
|
651
651
|
},
|
|
652
|
-
|
|
652
|
+
a
|
|
653
653
|
);
|
|
654
|
-
},
|
|
654
|
+
}, tt = {
|
|
655
655
|
type: "Link",
|
|
656
656
|
label: "Link",
|
|
657
657
|
category: "core",
|
|
658
|
-
icon:
|
|
658
|
+
icon: le,
|
|
659
659
|
group: "basic",
|
|
660
660
|
...p({
|
|
661
661
|
properties: {
|
|
@@ -686,17 +686,17 @@ const qe = {
|
|
|
686
686
|
aiProps: ["content"],
|
|
687
687
|
i18nProps: ["content"],
|
|
688
688
|
canAcceptBlock: (e) => e !== "Link"
|
|
689
|
-
},
|
|
690
|
-
const { blockProps: t, children: l, listType: n, styles: r, tag:
|
|
691
|
-
return !l &&
|
|
692
|
-
|
|
689
|
+
}, lt = (e) => {
|
|
690
|
+
const { blockProps: t, children: l, listType: n, styles: r, tag: o, inBuilder: a } = e, c = P(v(r, "className", ""), n);
|
|
691
|
+
return !l && S(r == null ? void 0 : r.className) ? /* @__PURE__ */ i(B, { inBuilder: a }) : w.createElement(
|
|
692
|
+
o || (n === "list-decimal" ? "ol" : "ul"),
|
|
693
693
|
{ ...t, ...r, className: c },
|
|
694
694
|
l
|
|
695
695
|
);
|
|
696
|
-
},
|
|
696
|
+
}, rt = {
|
|
697
697
|
type: "List",
|
|
698
698
|
label: "web_blocks.list",
|
|
699
|
-
icon:
|
|
699
|
+
icon: re,
|
|
700
700
|
category: "core",
|
|
701
701
|
group: "basic",
|
|
702
702
|
...p({
|
|
@@ -739,17 +739,17 @@ const qe = {
|
|
|
739
739
|
content: "Item 3"
|
|
740
740
|
}
|
|
741
741
|
]
|
|
742
|
-
},
|
|
743
|
-
const { blockProps: t, content: l, styles: n, children: r, tag:
|
|
744
|
-
return r ?
|
|
742
|
+
}, nt = (e) => {
|
|
743
|
+
const { blockProps: t, content: l, styles: n, children: r, tag: o } = e;
|
|
744
|
+
return r ? w.createElement(o || "li", { ...n, ...t }, r) : w.createElement(o || "li", {
|
|
745
745
|
...n,
|
|
746
746
|
...t,
|
|
747
747
|
dangerouslySetInnerHTML: { __html: l }
|
|
748
748
|
});
|
|
749
|
-
},
|
|
749
|
+
}, ot = {
|
|
750
750
|
type: "ListItem",
|
|
751
751
|
label: "List Item",
|
|
752
|
-
icon:
|
|
752
|
+
icon: ne,
|
|
753
753
|
category: "core",
|
|
754
754
|
group: "basic",
|
|
755
755
|
...p({
|
|
@@ -769,13 +769,13 @@ const qe = {
|
|
|
769
769
|
aiProps: ["content"],
|
|
770
770
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
771
771
|
canBeNested: (e) => e === "List"
|
|
772
|
-
},
|
|
772
|
+
}, it = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ i("span", { ...e.blockProps, children: e.content }) : `${e.content}`, at = {
|
|
773
773
|
type: "Text",
|
|
774
774
|
label: "Text",
|
|
775
775
|
hidden: !0,
|
|
776
776
|
category: "core",
|
|
777
777
|
group: "typography",
|
|
778
|
-
icon:
|
|
778
|
+
icon: oe,
|
|
779
779
|
...p({
|
|
780
780
|
properties: {
|
|
781
781
|
styles: d("text-black"),
|
|
@@ -787,30 +787,30 @@ const qe = {
|
|
|
787
787
|
}),
|
|
788
788
|
aiProps: ["content"],
|
|
789
789
|
i18nProps: ["content"]
|
|
790
|
-
},
|
|
791
|
-
if (
|
|
792
|
-
const t = e.match(
|
|
790
|
+
}, z = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, H = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, j = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, st = (e) => {
|
|
791
|
+
if (z.test(e)) {
|
|
792
|
+
const t = e.match(z);
|
|
793
793
|
return t ? `https://www.youtube.com/embed/${t[4]}` : e;
|
|
794
794
|
}
|
|
795
|
-
if (
|
|
796
|
-
const t = e.match(
|
|
795
|
+
if (H.test(e)) {
|
|
796
|
+
const t = e.match(H);
|
|
797
797
|
return t ? `https://player.vimeo.com/video/${t[3]}` : e;
|
|
798
798
|
}
|
|
799
|
-
if (
|
|
800
|
-
const t = e.match(
|
|
799
|
+
if (j.test(e)) {
|
|
800
|
+
const t = e.match(j);
|
|
801
801
|
return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
|
|
802
802
|
}
|
|
803
803
|
return null;
|
|
804
|
-
},
|
|
805
|
-
const { blockProps: t, inBuilder: l, styles: n, url: r, controls:
|
|
806
|
-
if (
|
|
804
|
+
}, ct = w.memo((e) => {
|
|
805
|
+
const { blockProps: t, inBuilder: l, styles: n, url: r, controls: o } = e, a = v(o, "autoPlay", !1), c = v(o, "controls", !1), s = a || v(o, "muted", !0), g = v(o, "loop", !1);
|
|
806
|
+
if (S(r)) return /* @__PURE__ */ i(B, { inBuilder: l, className: "h-36" });
|
|
807
807
|
let m = st(r), h = null;
|
|
808
808
|
if (m) {
|
|
809
|
-
if (!
|
|
809
|
+
if (!S(m)) {
|
|
810
810
|
const y = [];
|
|
811
|
-
y.push(`autoplay=${
|
|
811
|
+
y.push(`autoplay=${a ? 1 : 0}`), y.push(`controls=${o ? 1 : 0}`), y.push(`mute=${s ? 1 : 0}&muted=${s ? 1 : 0}`), y.push(`loop=${g ? 1 : 0}`), m = `${m}?${y.join("&")}`;
|
|
812
812
|
}
|
|
813
|
-
h =
|
|
813
|
+
h = w.createElement("iframe", {
|
|
814
814
|
...t,
|
|
815
815
|
className: "absolute inset-0 w-full h-full",
|
|
816
816
|
src: m,
|
|
@@ -819,24 +819,24 @@ const qe = {
|
|
|
819
819
|
frameBorder: 0
|
|
820
820
|
});
|
|
821
821
|
} else
|
|
822
|
-
h =
|
|
822
|
+
h = w.createElement("video", {
|
|
823
823
|
...t,
|
|
824
824
|
className: "absolute inset-0 w-full h-full",
|
|
825
825
|
src: r,
|
|
826
826
|
controls: c,
|
|
827
|
-
muted:
|
|
828
|
-
autoPlay: l ? !1 :
|
|
827
|
+
muted: s,
|
|
828
|
+
autoPlay: l ? !1 : a,
|
|
829
829
|
loop: g
|
|
830
830
|
});
|
|
831
|
-
return /* @__PURE__ */
|
|
832
|
-
l ? /* @__PURE__ */
|
|
831
|
+
return /* @__PURE__ */ i("div", { ...ue(n, ["className"]), children: /* @__PURE__ */ k("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
832
|
+
l ? /* @__PURE__ */ i("div", { ...t, ...pe(n, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
833
833
|
h
|
|
834
834
|
] }) });
|
|
835
|
-
}),
|
|
835
|
+
}), dt = {
|
|
836
836
|
type: "Video",
|
|
837
837
|
label: "Video",
|
|
838
838
|
category: "core",
|
|
839
|
-
icon:
|
|
839
|
+
icon: ie,
|
|
840
840
|
group: "media",
|
|
841
841
|
...p({
|
|
842
842
|
properties: {
|
|
@@ -881,25 +881,31 @@ const qe = {
|
|
|
881
881
|
}
|
|
882
882
|
}),
|
|
883
883
|
i18nProps: ["url"]
|
|
884
|
-
},
|
|
884
|
+
}, A = {
|
|
885
885
|
wrapper: { "x-data": "{ open: false }" },
|
|
886
886
|
button: { "x-on:click": "open = !open" },
|
|
887
|
-
menu: {
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
887
|
+
menu: {
|
|
888
|
+
"x-show": "open",
|
|
889
|
+
"x-on:click": "open = false",
|
|
890
|
+
"x-on:click.away": "open = false",
|
|
891
|
+
"x-cloak": "",
|
|
892
|
+
"x-transition": ""
|
|
893
|
+
}
|
|
894
|
+
}, ut = (e) => {
|
|
895
|
+
const { blockProps: t, content: l, icon: n, iconWidth: r, iconHeight: o, styles: a, show: c } = e;
|
|
896
|
+
return /* @__PURE__ */ k("button", { "aria-label": l, ...t, ...a, ...A.button, children: [
|
|
891
897
|
l,
|
|
892
|
-
/* @__PURE__ */
|
|
898
|
+
/* @__PURE__ */ i(
|
|
893
899
|
"span",
|
|
894
900
|
{
|
|
895
901
|
className: c ? "rotate-180" : "",
|
|
896
902
|
dangerouslySetInnerHTML: { __html: n },
|
|
897
|
-
style: { width: r, height:
|
|
903
|
+
style: { width: r, height: o }
|
|
898
904
|
}
|
|
899
905
|
)
|
|
900
906
|
] });
|
|
901
907
|
};
|
|
902
|
-
u(
|
|
908
|
+
u(ut, {
|
|
903
909
|
type: "DropdownButton",
|
|
904
910
|
label: "Dropdown Button",
|
|
905
911
|
group: "advanced",
|
|
@@ -909,7 +915,7 @@ u(ct, {
|
|
|
909
915
|
canDelete: () => !1,
|
|
910
916
|
...p({
|
|
911
917
|
properties: {
|
|
912
|
-
show:
|
|
918
|
+
show: _("Dropdown", "showDropdown"),
|
|
913
919
|
content: { type: "string", title: "Title", default: "Menu Item" },
|
|
914
920
|
icon: { type: "string", title: "Icon", default: "", ui: { "ui:widget": "icon" } },
|
|
915
921
|
iconWidth: { type: "string", title: "Icon Width", default: "16px" },
|
|
@@ -920,11 +926,11 @@ u(ct, {
|
|
|
920
926
|
i18nProps: ["content"],
|
|
921
927
|
aiProps: ["content"]
|
|
922
928
|
});
|
|
923
|
-
const
|
|
924
|
-
const { blockProps: t, children: l, styles: n, show: r, inBuilder:
|
|
925
|
-
return
|
|
929
|
+
const pt = (e) => {
|
|
930
|
+
const { blockProps: t, children: l, styles: n, show: r, inBuilder: o } = e;
|
|
931
|
+
return o && !r ? null : /* @__PURE__ */ i("div", { ...t, ...A.menu, ...n, children: l });
|
|
926
932
|
};
|
|
927
|
-
u(
|
|
933
|
+
u(pt, {
|
|
928
934
|
type: "DropdownContent",
|
|
929
935
|
label: "Dropdown Content",
|
|
930
936
|
group: "basic",
|
|
@@ -934,19 +940,19 @@ u(dt, {
|
|
|
934
940
|
canAcceptBlock: () => !0,
|
|
935
941
|
...p({
|
|
936
942
|
properties: {
|
|
937
|
-
show:
|
|
943
|
+
show: _("Dropdown", "showDropdown"),
|
|
938
944
|
styles: d("absolute left-0 p-2 w-80 mt-2 bg-white rounded-lg shadow-lg z-50")
|
|
939
945
|
}
|
|
940
946
|
})
|
|
941
947
|
});
|
|
942
|
-
const
|
|
948
|
+
const yt = (e) => {
|
|
943
949
|
const { blockProps: t, children: l, styles: n } = e;
|
|
944
|
-
return /* @__PURE__ */
|
|
945
|
-
},
|
|
950
|
+
return /* @__PURE__ */ i("div", { ...t, ...n, ...A.wrapper, children: l });
|
|
951
|
+
}, gt = {
|
|
946
952
|
type: "Dropdown",
|
|
947
953
|
label: "Dropdown",
|
|
948
954
|
group: "basic",
|
|
949
|
-
icon:
|
|
955
|
+
icon: O,
|
|
950
956
|
blocks: () => [
|
|
951
957
|
{ _type: "Dropdown", _id: "dropdown" },
|
|
952
958
|
{
|
|
@@ -976,7 +982,7 @@ const ut = (e) => {
|
|
|
976
982
|
wrapper: !0,
|
|
977
983
|
...p({
|
|
978
984
|
properties: {
|
|
979
|
-
showDropdown:
|
|
985
|
+
showDropdown: F({
|
|
980
986
|
type: "boolean",
|
|
981
987
|
title: "Show Dropdown",
|
|
982
988
|
default: !1
|
|
@@ -984,43 +990,48 @@ const ut = (e) => {
|
|
|
984
990
|
styles: d("relative w-max")
|
|
985
991
|
}
|
|
986
992
|
})
|
|
987
|
-
},
|
|
988
|
-
const { blockProps: t, fieldName: l, label: n, styles: r, inputStyles:
|
|
989
|
-
return
|
|
990
|
-
/* @__PURE__ */
|
|
993
|
+
}, mt = (e) => {
|
|
994
|
+
const { blockProps: t, fieldName: l, label: n, styles: r, inputStyles: o, required: a, checked: c, showLabel: s = !0 } = e, g = C();
|
|
995
|
+
return s ? /* @__PURE__ */ k("div", { ...r, ...t, children: [
|
|
996
|
+
/* @__PURE__ */ i(
|
|
991
997
|
"input",
|
|
992
998
|
{
|
|
993
|
-
...
|
|
999
|
+
...o,
|
|
994
1000
|
name: l,
|
|
995
1001
|
id: g,
|
|
996
1002
|
type: "checkbox",
|
|
997
|
-
required:
|
|
1003
|
+
required: a,
|
|
998
1004
|
defaultChecked: c
|
|
999
1005
|
}
|
|
1000
1006
|
),
|
|
1001
|
-
n && /* @__PURE__ */
|
|
1002
|
-
] }) : /* @__PURE__ */
|
|
1007
|
+
n && /* @__PURE__ */ i("label", { htmlFor: g, children: n })
|
|
1008
|
+
] }) : /* @__PURE__ */ i(
|
|
1003
1009
|
"input",
|
|
1004
1010
|
{
|
|
1005
1011
|
id: g,
|
|
1006
1012
|
...t,
|
|
1007
|
-
...
|
|
1013
|
+
...o,
|
|
1008
1014
|
...r,
|
|
1009
1015
|
type: "checkbox",
|
|
1010
|
-
required:
|
|
1016
|
+
required: a,
|
|
1011
1017
|
name: l
|
|
1012
1018
|
}
|
|
1013
1019
|
);
|
|
1014
|
-
},
|
|
1020
|
+
}, ht = {
|
|
1015
1021
|
type: "Checkbox",
|
|
1016
1022
|
label: "web_blocks.checkbox",
|
|
1017
1023
|
category: "core",
|
|
1018
|
-
icon:
|
|
1024
|
+
icon: ae,
|
|
1019
1025
|
group: "form",
|
|
1020
1026
|
...p({
|
|
1021
1027
|
properties: {
|
|
1022
1028
|
styles: d("flex items-center gap-x-2"),
|
|
1023
1029
|
inputStyles: d(""),
|
|
1030
|
+
fieldName: {
|
|
1031
|
+
type: "string",
|
|
1032
|
+
title: "Field Name",
|
|
1033
|
+
default: "fieldName"
|
|
1034
|
+
},
|
|
1024
1035
|
label: {
|
|
1025
1036
|
type: "string",
|
|
1026
1037
|
title: "Label",
|
|
@@ -1045,38 +1056,36 @@ const ut = (e) => {
|
|
|
1045
1056
|
}),
|
|
1046
1057
|
aiProps: ["label"],
|
|
1047
1058
|
i18nProps: ["label"]
|
|
1048
|
-
},
|
|
1049
|
-
const { children: t, blockProps: l, errorMessage: n, successMessage: r, action:
|
|
1050
|
-
let
|
|
1051
|
-
t || (
|
|
1052
|
-
const g = {
|
|
1053
|
-
"x-data": "{}",
|
|
1054
|
-
"x-on:submit.prevent": "post"
|
|
1055
|
-
}, m = {
|
|
1056
|
-
"x-html": "",
|
|
1057
|
-
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
1058
|
-
};
|
|
1059
|
-
return /* @__PURE__ */ o.jsxs(
|
|
1059
|
+
}, ft = (e) => {
|
|
1060
|
+
const { children: t, blockProps: l, errorMessage: n, successMessage: r, action: o, styles: a, inBuilder: c } = e;
|
|
1061
|
+
let s = t;
|
|
1062
|
+
return t || (s = /* @__PURE__ */ i(B, { inBuilder: c })), /* @__PURE__ */ k(
|
|
1060
1063
|
"form",
|
|
1061
1064
|
{
|
|
1062
|
-
...
|
|
1065
|
+
...{
|
|
1066
|
+
"x-data": "{}",
|
|
1067
|
+
"x-on:submit.prevent": "post"
|
|
1068
|
+
},
|
|
1063
1069
|
"data-error": n,
|
|
1064
1070
|
"data-success": r,
|
|
1065
1071
|
method: "post",
|
|
1066
|
-
action:
|
|
1072
|
+
action: o,
|
|
1067
1073
|
...l,
|
|
1068
|
-
...
|
|
1074
|
+
...a,
|
|
1069
1075
|
children: [
|
|
1070
|
-
/* @__PURE__ */
|
|
1071
|
-
|
|
1076
|
+
/* @__PURE__ */ i("div", { ...{
|
|
1077
|
+
"x-html": "",
|
|
1078
|
+
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
1079
|
+
} }),
|
|
1080
|
+
s
|
|
1072
1081
|
]
|
|
1073
1082
|
}
|
|
1074
1083
|
);
|
|
1075
|
-
},
|
|
1084
|
+
}, bt = {
|
|
1076
1085
|
type: "Form",
|
|
1077
1086
|
label: "Form",
|
|
1078
1087
|
category: "core",
|
|
1079
|
-
icon:
|
|
1088
|
+
icon: ge,
|
|
1080
1089
|
group: "form",
|
|
1081
1090
|
blocks: () => [
|
|
1082
1091
|
{ _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
|
|
@@ -1113,38 +1122,38 @@ const ut = (e) => {
|
|
|
1113
1122
|
i18nProps: ["errorMessage", "successMessage"],
|
|
1114
1123
|
aiProps: ["errorMessage", "successMessage"],
|
|
1115
1124
|
canAcceptBlock: () => !0
|
|
1116
|
-
},
|
|
1117
|
-
const { blockProps: t, inBuilder: l, label: n, styles: r, inputStyles:
|
|
1118
|
-
|
|
1119
|
-
};
|
|
1120
|
-
return /* @__PURE__ */ o.jsxs(
|
|
1125
|
+
}, wt = (e) => {
|
|
1126
|
+
const { blockProps: t, inBuilder: l, label: n, styles: r, inputStyles: o, icon: a, iconSize: c, iconPos: s } = e, g = C();
|
|
1127
|
+
return /* @__PURE__ */ k(
|
|
1121
1128
|
"button",
|
|
1122
1129
|
{
|
|
1123
1130
|
id: g,
|
|
1124
|
-
...
|
|
1125
|
-
|
|
1131
|
+
...{
|
|
1132
|
+
"x-bind:disabled": "formLoading"
|
|
1133
|
+
},
|
|
1134
|
+
...o,
|
|
1126
1135
|
...r,
|
|
1127
1136
|
...t || {},
|
|
1128
1137
|
type: l ? "button" : "submit",
|
|
1129
1138
|
"aria-label": n,
|
|
1130
1139
|
children: [
|
|
1131
1140
|
n,
|
|
1132
|
-
|
|
1141
|
+
a && /* @__PURE__ */ i(
|
|
1133
1142
|
"div",
|
|
1134
1143
|
{
|
|
1135
1144
|
style: { width: c + "px" },
|
|
1136
|
-
className:
|
|
1137
|
-
dangerouslySetInnerHTML: { __html:
|
|
1145
|
+
className: s + " " + (s === "order-first" ? "mr-2" : "ml-2") || "",
|
|
1146
|
+
dangerouslySetInnerHTML: { __html: a }
|
|
1138
1147
|
}
|
|
1139
1148
|
)
|
|
1140
1149
|
]
|
|
1141
1150
|
}
|
|
1142
1151
|
);
|
|
1143
|
-
},
|
|
1152
|
+
}, kt = {
|
|
1144
1153
|
type: "FormButton",
|
|
1145
1154
|
label: "Submit Button",
|
|
1146
1155
|
category: "core",
|
|
1147
|
-
icon:
|
|
1156
|
+
icon: q,
|
|
1148
1157
|
group: "form",
|
|
1149
1158
|
...p({
|
|
1150
1159
|
properties: {
|
|
@@ -1180,44 +1189,49 @@ const ut = (e) => {
|
|
|
1180
1189
|
}),
|
|
1181
1190
|
i18nProps: ["label"],
|
|
1182
1191
|
aiProps: ["label"]
|
|
1183
|
-
},
|
|
1184
|
-
const { blockProps: t, fieldName: l, label: n, placeholder: r, styles:
|
|
1185
|
-
return c ? /* @__PURE__ */
|
|
1186
|
-
c && /* @__PURE__ */
|
|
1187
|
-
/* @__PURE__ */
|
|
1192
|
+
}, vt = (e) => {
|
|
1193
|
+
const { blockProps: t, fieldName: l, label: n, placeholder: r, styles: o, inputStyles: a, showLabel: c, required: s, inputType: g } = e, m = C();
|
|
1194
|
+
return c ? /* @__PURE__ */ k("div", { ...o, ...t, children: [
|
|
1195
|
+
c && /* @__PURE__ */ i("label", { htmlFor: m, children: n }),
|
|
1196
|
+
/* @__PURE__ */ i(
|
|
1188
1197
|
"input",
|
|
1189
1198
|
{
|
|
1190
1199
|
name: l,
|
|
1191
|
-
...
|
|
1200
|
+
...a,
|
|
1192
1201
|
id: m,
|
|
1193
1202
|
type: g,
|
|
1194
1203
|
placeholder: r,
|
|
1195
|
-
required:
|
|
1204
|
+
required: s
|
|
1196
1205
|
}
|
|
1197
1206
|
)
|
|
1198
|
-
] }) : /* @__PURE__ */
|
|
1207
|
+
] }) : /* @__PURE__ */ i(
|
|
1199
1208
|
"input",
|
|
1200
1209
|
{
|
|
1201
1210
|
id: m,
|
|
1202
1211
|
name: l,
|
|
1203
1212
|
...t,
|
|
1204
|
-
...
|
|
1205
|
-
...
|
|
1213
|
+
...a,
|
|
1214
|
+
...o,
|
|
1206
1215
|
type: g,
|
|
1207
1216
|
placeholder: r,
|
|
1208
|
-
required:
|
|
1217
|
+
required: s
|
|
1209
1218
|
}
|
|
1210
1219
|
);
|
|
1211
|
-
},
|
|
1220
|
+
}, xt = {
|
|
1212
1221
|
type: "Input",
|
|
1213
1222
|
label: "web_blocks.input",
|
|
1214
1223
|
category: "core",
|
|
1215
|
-
icon:
|
|
1224
|
+
icon: V,
|
|
1216
1225
|
group: "form",
|
|
1217
1226
|
...p({
|
|
1218
1227
|
properties: {
|
|
1219
1228
|
styles: d(""),
|
|
1220
1229
|
inputStyles: d("w-full p-1"),
|
|
1230
|
+
fieldName: {
|
|
1231
|
+
type: "string",
|
|
1232
|
+
title: "Field Name",
|
|
1233
|
+
default: "fieldName"
|
|
1234
|
+
},
|
|
1221
1235
|
showLabel: {
|
|
1222
1236
|
type: "boolean",
|
|
1223
1237
|
title: "Show Label",
|
|
@@ -1263,13 +1277,13 @@ const ut = (e) => {
|
|
|
1263
1277
|
}),
|
|
1264
1278
|
aiProps: ["label", "placeholder"],
|
|
1265
1279
|
i18nProps: ["label", "placeholder"]
|
|
1266
|
-
},
|
|
1267
|
-
const { blockProps: t, content: l, styles: n, children: r } = e,
|
|
1268
|
-
return r ?
|
|
1269
|
-
...
|
|
1280
|
+
}, St = (e) => {
|
|
1281
|
+
const { blockProps: t, content: l, styles: n, children: r } = e, o = { ...n, ...t };
|
|
1282
|
+
return r ? w.createElement("label", o, r) : w.createElement("label", {
|
|
1283
|
+
...o,
|
|
1270
1284
|
dangerouslySetInnerHTML: { __html: l }
|
|
1271
1285
|
});
|
|
1272
|
-
},
|
|
1286
|
+
}, _t = {
|
|
1273
1287
|
type: "Label",
|
|
1274
1288
|
label: "Label",
|
|
1275
1289
|
category: "core",
|
|
@@ -1287,34 +1301,39 @@ const ut = (e) => {
|
|
|
1287
1301
|
}),
|
|
1288
1302
|
aiProps: ["content"],
|
|
1289
1303
|
i18nProps: ["content"]
|
|
1290
|
-
},
|
|
1291
|
-
const { blockProps: t, fieldName: l, label: n, styles: r, inputStyles:
|
|
1292
|
-
return
|
|
1293
|
-
/* @__PURE__ */
|
|
1294
|
-
n && /* @__PURE__ */
|
|
1295
|
-
] }) : /* @__PURE__ */
|
|
1304
|
+
}, Bt = (e) => {
|
|
1305
|
+
const { blockProps: t, fieldName: l, label: n, styles: r, inputStyles: o, required: a, checked: c, showLabel: s = !0 } = e, g = C();
|
|
1306
|
+
return s ? /* @__PURE__ */ k("div", { ...r, ...t, children: [
|
|
1307
|
+
/* @__PURE__ */ i("input", { ...o, name: l, id: g, type: "radio", required: a, defaultChecked: c }),
|
|
1308
|
+
n && /* @__PURE__ */ i("label", { htmlFor: g, children: n })
|
|
1309
|
+
] }) : /* @__PURE__ */ i(
|
|
1296
1310
|
"input",
|
|
1297
1311
|
{
|
|
1298
1312
|
id: g,
|
|
1299
1313
|
...t,
|
|
1300
|
-
...
|
|
1314
|
+
...o,
|
|
1301
1315
|
...r,
|
|
1302
1316
|
type: "radio",
|
|
1303
|
-
required:
|
|
1317
|
+
required: a,
|
|
1304
1318
|
checked: c,
|
|
1305
1319
|
name: l
|
|
1306
1320
|
}
|
|
1307
1321
|
);
|
|
1308
|
-
},
|
|
1322
|
+
}, It = {
|
|
1309
1323
|
type: "Radio",
|
|
1310
1324
|
label: "web_blocks.radio",
|
|
1311
1325
|
category: "core",
|
|
1312
|
-
icon:
|
|
1326
|
+
icon: ce,
|
|
1313
1327
|
group: "form",
|
|
1314
1328
|
...p({
|
|
1315
1329
|
properties: {
|
|
1316
1330
|
styles: d("flex items-center gap-x-2"),
|
|
1317
1331
|
inputStyles: d(""),
|
|
1332
|
+
fieldName: {
|
|
1333
|
+
type: "string",
|
|
1334
|
+
title: "Field Name",
|
|
1335
|
+
default: "fieldName"
|
|
1336
|
+
},
|
|
1318
1337
|
label: {
|
|
1319
1338
|
type: "string",
|
|
1320
1339
|
title: "Label",
|
|
@@ -1339,28 +1358,33 @@ const ut = (e) => {
|
|
|
1339
1358
|
}),
|
|
1340
1359
|
aiProps: ["label"],
|
|
1341
1360
|
i18nProps: ["label"]
|
|
1342
|
-
},
|
|
1343
|
-
const { blockProps: t, fieldName: l, label: n, placeholder: r, styles:
|
|
1344
|
-
return
|
|
1345
|
-
|
|
1346
|
-
/* @__PURE__ */
|
|
1347
|
-
/* @__PURE__ */
|
|
1348
|
-
|
|
1361
|
+
}, Ct = (e) => {
|
|
1362
|
+
const { blockProps: t, fieldName: l, label: n, placeholder: r, styles: o, inputStyles: a, required: c, showLabel: s, _multiple: g, options: m } = e, h = C();
|
|
1363
|
+
return s ? /* @__PURE__ */ k("div", { ...o, ...t, children: [
|
|
1364
|
+
s && /* @__PURE__ */ i("label", { htmlFor: h, children: n }),
|
|
1365
|
+
/* @__PURE__ */ k("select", { ...a, id: h, required: c, multiple: g, name: l, children: [
|
|
1366
|
+
/* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
|
|
1367
|
+
R(m, (y) => /* @__PURE__ */ i("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
|
|
1349
1368
|
] })
|
|
1350
|
-
] }) : /* @__PURE__ */
|
|
1351
|
-
/* @__PURE__ */
|
|
1352
|
-
|
|
1369
|
+
] }) : /* @__PURE__ */ k("select", { id: h, ...o, ...t, required: c, multiple: g, name: l, children: [
|
|
1370
|
+
/* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
|
|
1371
|
+
R(m, (y) => /* @__PURE__ */ i("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
|
|
1353
1372
|
] });
|
|
1354
|
-
},
|
|
1373
|
+
}, Lt = {
|
|
1355
1374
|
type: "Select",
|
|
1356
1375
|
label: "web_blocks.select",
|
|
1357
1376
|
category: "core",
|
|
1358
|
-
icon:
|
|
1377
|
+
icon: O,
|
|
1359
1378
|
group: "form",
|
|
1360
1379
|
...p({
|
|
1361
1380
|
properties: {
|
|
1362
1381
|
styles: d(""),
|
|
1363
1382
|
inputStyles: d("w-full p-1"),
|
|
1383
|
+
fieldName: {
|
|
1384
|
+
type: "string",
|
|
1385
|
+
title: "Field Name",
|
|
1386
|
+
default: "fieldName"
|
|
1387
|
+
},
|
|
1364
1388
|
showLabel: {
|
|
1365
1389
|
type: "boolean",
|
|
1366
1390
|
title: "Show Label",
|
|
@@ -1410,31 +1434,36 @@ const ut = (e) => {
|
|
|
1410
1434
|
}),
|
|
1411
1435
|
aiProps: ["label", "placeholder"],
|
|
1412
1436
|
i18nProps: ["label", "placeholder"]
|
|
1413
|
-
},
|
|
1414
|
-
const { blockProps: t, fieldName: l, label: n, placeholder: r, styles:
|
|
1415
|
-
return
|
|
1416
|
-
|
|
1417
|
-
/* @__PURE__ */
|
|
1418
|
-
] }) : /* @__PURE__ */
|
|
1437
|
+
}, Pt = (e) => {
|
|
1438
|
+
const { blockProps: t, fieldName: l, label: n, placeholder: r, styles: o, inputStyles: a, _rows: c, showLabel: s } = e, g = C();
|
|
1439
|
+
return s ? /* @__PURE__ */ k("div", { ...o, ...t, children: [
|
|
1440
|
+
s && /* @__PURE__ */ i("label", { htmlFor: g, children: n }),
|
|
1441
|
+
/* @__PURE__ */ i("textarea", { name: l, ...a, id: g, placeholder: r, rows: c })
|
|
1442
|
+
] }) : /* @__PURE__ */ i(
|
|
1419
1443
|
"textarea",
|
|
1420
1444
|
{
|
|
1421
1445
|
id: g,
|
|
1422
1446
|
name: l,
|
|
1423
1447
|
...t,
|
|
1424
|
-
...
|
|
1425
|
-
...
|
|
1448
|
+
...a,
|
|
1449
|
+
...o,
|
|
1426
1450
|
placeholder: r,
|
|
1427
1451
|
rows: c
|
|
1428
1452
|
}
|
|
1429
1453
|
);
|
|
1430
|
-
},
|
|
1454
|
+
}, Nt = {
|
|
1431
1455
|
type: "TextArea",
|
|
1432
1456
|
label: "web_blocks.textarea",
|
|
1433
1457
|
category: "core",
|
|
1434
|
-
icon:
|
|
1458
|
+
icon: V,
|
|
1435
1459
|
group: "form",
|
|
1436
1460
|
...p({
|
|
1437
1461
|
properties: {
|
|
1462
|
+
fieldName: {
|
|
1463
|
+
type: "string",
|
|
1464
|
+
title: "Field Name",
|
|
1465
|
+
default: "fieldName"
|
|
1466
|
+
},
|
|
1438
1467
|
styles: d(""),
|
|
1439
1468
|
inputStyles: d("w-full p-1"),
|
|
1440
1469
|
showLabel: {
|
|
@@ -1462,11 +1491,11 @@ const ut = (e) => {
|
|
|
1462
1491
|
}),
|
|
1463
1492
|
aiProps: ["label", "placeholder"],
|
|
1464
1493
|
i18nProps: ["label", "placeholder"]
|
|
1465
|
-
},
|
|
1466
|
-
const { blockProps: t, backgroundImage: l, children: n, styles: r, tag:
|
|
1467
|
-
let
|
|
1468
|
-
return l && (
|
|
1469
|
-
},
|
|
1494
|
+
}, Mt = (e) => {
|
|
1495
|
+
const { blockProps: t, backgroundImage: l, children: n, styles: r, tag: o } = e;
|
|
1496
|
+
let a = {};
|
|
1497
|
+
return l && (a = { backgroundImage: `url(${l})` }), I(o || "div", { ...t, ...r, style: a }, n);
|
|
1498
|
+
}, $t = {
|
|
1470
1499
|
type: "Body",
|
|
1471
1500
|
label: "Body",
|
|
1472
1501
|
category: "core",
|
|
@@ -1511,10 +1540,10 @@ const ut = (e) => {
|
|
|
1511
1540
|
canDelete: () => !1,
|
|
1512
1541
|
canMove: () => !1,
|
|
1513
1542
|
canDuplicate: () => !1
|
|
1514
|
-
},
|
|
1543
|
+
}, Dt = (e) => {
|
|
1515
1544
|
const { blockProps: t, styles: l } = e;
|
|
1516
|
-
return
|
|
1517
|
-
},
|
|
1545
|
+
return I("br", { ...t, ...l });
|
|
1546
|
+
}, Tt = {
|
|
1518
1547
|
type: "LineBreak",
|
|
1519
1548
|
label: "Line Break",
|
|
1520
1549
|
category: "core",
|
|
@@ -1529,7 +1558,7 @@ const ut = (e) => {
|
|
|
1529
1558
|
canDelete: () => !1,
|
|
1530
1559
|
canMove: () => !1,
|
|
1531
1560
|
canDuplicate: () => !1
|
|
1532
|
-
},
|
|
1561
|
+
}, M = {
|
|
1533
1562
|
SMALL: {
|
|
1534
1563
|
1: "col-span-1",
|
|
1535
1564
|
2: "col-span-2",
|
|
@@ -1572,20 +1601,20 @@ const ut = (e) => {
|
|
|
1572
1601
|
11: "lg:col-span-11",
|
|
1573
1602
|
12: "lg:col-span-12"
|
|
1574
1603
|
}
|
|
1575
|
-
},
|
|
1576
|
-
const { blockProps: t, children: l, styles: n, colSpan: r, tabletColSpan:
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1604
|
+
}, At = (e) => {
|
|
1605
|
+
const { blockProps: t, children: l, styles: n, colSpan: r, tabletColSpan: o, desktopColSpan: a } = e, s = { className: [
|
|
1606
|
+
v(n, "className", ""),
|
|
1607
|
+
v(M, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
|
|
1608
|
+
o ? v(M, ["MEDIUM", o || r], "") : "",
|
|
1609
|
+
a ? v(M, ["LARGE", o || r], "") : ""
|
|
1581
1610
|
].join(" ") };
|
|
1582
|
-
return /* @__PURE__ */
|
|
1583
|
-
},
|
|
1611
|
+
return /* @__PURE__ */ i("div", { ...t, ...n, ...s, 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" }) });
|
|
1612
|
+
}, Et = {
|
|
1584
1613
|
type: "Column",
|
|
1585
1614
|
label: "Column",
|
|
1586
1615
|
group: "basic",
|
|
1587
1616
|
category: "core",
|
|
1588
|
-
icon:
|
|
1617
|
+
icon: me,
|
|
1589
1618
|
wrapper: !0,
|
|
1590
1619
|
canDelete: () => !0,
|
|
1591
1620
|
canAcceptBlock: () => !0,
|
|
@@ -1615,14 +1644,14 @@ const ut = (e) => {
|
|
|
1615
1644
|
}
|
|
1616
1645
|
}
|
|
1617
1646
|
})
|
|
1618
|
-
},
|
|
1619
|
-
const { blockProps: t, children: l, styles: n, gutter: r } = e,
|
|
1620
|
-
return typeof (n == null ? void 0 : n.style) == "object" ? n.style.gap = `${r}px` :
|
|
1621
|
-
},
|
|
1647
|
+
}, Rt = (e) => {
|
|
1648
|
+
const { blockProps: t, children: l, styles: n, gutter: r } = e, a = { className: [v(n, "className", ""), " grid grid-cols-12"].join() };
|
|
1649
|
+
return typeof (n == null ? void 0 : n.style) == "object" ? n.style.gap = `${r}px` : a.style = { gap: `${r}px` }, /* @__PURE__ */ i("div", { ...t, ...n, ...a, children: l });
|
|
1650
|
+
}, zt = {
|
|
1622
1651
|
type: "Row",
|
|
1623
1652
|
label: "Row",
|
|
1624
1653
|
group: "basic",
|
|
1625
|
-
icon:
|
|
1654
|
+
icon: he,
|
|
1626
1655
|
blocks: () => [
|
|
1627
1656
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1628
1657
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
@@ -1648,7 +1677,7 @@ const ut = (e) => {
|
|
|
1648
1677
|
}
|
|
1649
1678
|
}
|
|
1650
1679
|
})
|
|
1651
|
-
},
|
|
1680
|
+
}, L = (e, t) => ({
|
|
1652
1681
|
slider: {
|
|
1653
1682
|
"x-data": `{
|
|
1654
1683
|
currentSlide: 0,
|
|
@@ -1692,16 +1721,16 @@ const ut = (e) => {
|
|
|
1692
1721
|
":class": `currentSlide === ${t == null ? void 0 : t.slide} ? '${t == null ? void 0 : t.activeDotClassName}' : '${t == null ? void 0 : t.className}'`,
|
|
1693
1722
|
"x-on:click": `stopAutoplay(); updateCurrentSlide(${t == null ? void 0 : t.slide});`
|
|
1694
1723
|
}
|
|
1695
|
-
})[e] || {},
|
|
1724
|
+
})[e] || {}, Ht = (e) => {
|
|
1696
1725
|
const { blockProps: t, styles: l, children: n, slider: r } = e;
|
|
1697
|
-
return !(r != null && r.showSlideButton) && typeof (r == null ? void 0 : r.showSlideButton) == "boolean" ? null : /* @__PURE__ */
|
|
1726
|
+
return !(r != null && r.showSlideButton) && typeof (r == null ? void 0 : r.showSlideButton) == "boolean" ? null : /* @__PURE__ */ i("div", { ...t, ...l, ...L("prevButton"), children: n });
|
|
1698
1727
|
};
|
|
1699
|
-
u(
|
|
1728
|
+
u(Ht, {
|
|
1700
1729
|
type: "SlidePreviousButton",
|
|
1701
1730
|
label: "Slide Previous",
|
|
1702
1731
|
group: "basic",
|
|
1703
1732
|
category: "core",
|
|
1704
|
-
icon:
|
|
1733
|
+
icon: D,
|
|
1705
1734
|
canDelete: () => !1,
|
|
1706
1735
|
canAcceptBlock: () => !0,
|
|
1707
1736
|
canBeNested: (e) => e === "Slider",
|
|
@@ -1710,20 +1739,20 @@ u(At, {
|
|
|
1710
1739
|
styles: d(
|
|
1711
1740
|
"h-max w-max absolute left-0 top-1/2 -translate-y-1/2 flex items-center justify-center p-2 cursor-pointer"
|
|
1712
1741
|
),
|
|
1713
|
-
slider:
|
|
1742
|
+
slider: _("Slider", "slider")
|
|
1714
1743
|
}
|
|
1715
1744
|
})
|
|
1716
1745
|
});
|
|
1717
|
-
const
|
|
1746
|
+
const jt = (e) => {
|
|
1718
1747
|
const { blockProps: t, styles: l, children: n, slider: r } = e;
|
|
1719
|
-
return !(r != null && r.showSlideButton) && typeof (r == null ? void 0 : r.showSlideButton) == "boolean" ? null : /* @__PURE__ */
|
|
1748
|
+
return !(r != null && r.showSlideButton) && typeof (r == null ? void 0 : r.showSlideButton) == "boolean" ? null : /* @__PURE__ */ i("div", { ...t, ...l, ...L("nextButton"), children: n });
|
|
1720
1749
|
};
|
|
1721
|
-
u(
|
|
1750
|
+
u(jt, {
|
|
1722
1751
|
type: "SlideNextButton",
|
|
1723
1752
|
label: "Slide Next",
|
|
1724
1753
|
group: "basic",
|
|
1725
1754
|
category: "core",
|
|
1726
|
-
icon:
|
|
1755
|
+
icon: fe,
|
|
1727
1756
|
canDelete: () => !1,
|
|
1728
1757
|
canAcceptBlock: () => !0,
|
|
1729
1758
|
canBeNested: (e) => e === "Slider",
|
|
@@ -1732,48 +1761,48 @@ u(Rt, {
|
|
|
1732
1761
|
styles: d(
|
|
1733
1762
|
"h-max w-max absolute right-0 top-1/2 -translate-y-1/2 flex items-center justify-center p-2 cursor-pointer"
|
|
1734
1763
|
),
|
|
1735
|
-
slider:
|
|
1764
|
+
slider: _("Slider", "slider")
|
|
1736
1765
|
}
|
|
1737
1766
|
})
|
|
1738
1767
|
});
|
|
1739
|
-
const
|
|
1740
|
-
var
|
|
1741
|
-
const { blockProps: t, styles: l, children: n = null, inBuilder: r, slider:
|
|
1768
|
+
const Ft = (e) => {
|
|
1769
|
+
var a, c, s, g, m;
|
|
1770
|
+
const { blockProps: t, styles: l, children: n = null, inBuilder: r, slider: o } = e;
|
|
1742
1771
|
if (r) {
|
|
1743
|
-
const h = ((c = (
|
|
1744
|
-
return /* @__PURE__ */
|
|
1772
|
+
const h = ((c = (a = e == null ? void 0 : e.children) == null ? void 0 : a.props) == null ? void 0 : c.allBlocks) || ((g = (s = e == null ? void 0 : e.children) == null ? void 0 : s.props) == null ? void 0 : g.blocks) || [], y = o == null ? void 0 : o.currentSlide, f = (m = h == null ? void 0 : h.filter((x) => (x == null ? void 0 : x._parent) === (e == null ? void 0 : e._id))) == null ? void 0 : m.findIndex((x) => (x == null ? void 0 : x._id) === y);
|
|
1773
|
+
return /* @__PURE__ */ i("div", { ...t, ...l, style: { transform: `translateX(-${Math.max(0, f) * 100}%)` }, children: n || /* @__PURE__ */ i("div", { className: "h-full p-2", children: /* @__PURE__ */ i("div", { className: "h-full border-2 border-dashed" }) }) });
|
|
1745
1774
|
}
|
|
1746
|
-
return /* @__PURE__ */
|
|
1775
|
+
return /* @__PURE__ */ i("div", { ...t, ...l, ...L("slides"), children: n || /* @__PURE__ */ i("div", { className: "h-full p-2", children: /* @__PURE__ */ i("div", { className: "h-full border-2 border-dashed" }) }) });
|
|
1747
1776
|
};
|
|
1748
|
-
u(
|
|
1777
|
+
u(Ft, {
|
|
1749
1778
|
type: "Slides",
|
|
1750
1779
|
label: "Slides",
|
|
1751
1780
|
group: "basic",
|
|
1752
1781
|
category: "core",
|
|
1753
|
-
icon:
|
|
1782
|
+
icon: be,
|
|
1754
1783
|
canDelete: () => !1,
|
|
1755
1784
|
canAcceptBlock: (e) => e === "Slide",
|
|
1756
1785
|
canBeNested: (e) => e === "Slider",
|
|
1757
1786
|
...p({
|
|
1758
1787
|
properties: {
|
|
1759
|
-
slider:
|
|
1788
|
+
slider: _("Slider", "slider"),
|
|
1760
1789
|
styles: d("h-full flex transition-transform duration-500 ease-in-out")
|
|
1761
1790
|
}
|
|
1762
1791
|
})
|
|
1763
1792
|
});
|
|
1764
|
-
const
|
|
1793
|
+
const qt = (e) => {
|
|
1765
1794
|
const { blockProps: t, styles: l, children: n = null } = e;
|
|
1766
|
-
return /* @__PURE__ */
|
|
1795
|
+
return /* @__PURE__ */ i("div", { ...t, ...l, children: n || /* @__PURE__ */ k("div", { className: "flex h-full min-w-full items-center justify-center", children: [
|
|
1767
1796
|
"Slide ",
|
|
1768
1797
|
(e == null ? void 0 : e.index) + 1
|
|
1769
1798
|
] }) });
|
|
1770
1799
|
};
|
|
1771
|
-
u(
|
|
1800
|
+
u(qt, {
|
|
1772
1801
|
type: "Slide",
|
|
1773
1802
|
label: "Slide",
|
|
1774
1803
|
group: "basic",
|
|
1775
1804
|
category: "core",
|
|
1776
|
-
icon:
|
|
1805
|
+
icon: we,
|
|
1777
1806
|
canDelete: () => !0,
|
|
1778
1807
|
canAcceptBlock: () => !0,
|
|
1779
1808
|
canBeNested: (e) => e === "Slides",
|
|
@@ -1783,23 +1812,23 @@ u(Ht, {
|
|
|
1783
1812
|
}
|
|
1784
1813
|
})
|
|
1785
1814
|
});
|
|
1786
|
-
const
|
|
1787
|
-
var y, f,
|
|
1788
|
-
const { blockProps: t, styles: l, dotStyles: n, activeDotStyles: r, slider:
|
|
1789
|
-
if (!(
|
|
1790
|
-
const
|
|
1791
|
-
return
|
|
1815
|
+
const Gt = (e) => {
|
|
1816
|
+
var y, f, x, E;
|
|
1817
|
+
const { blockProps: t, styles: l, dotStyles: n, activeDotStyles: r, slider: o, inBuilder: a, children: c } = e;
|
|
1818
|
+
if (!(o != null && o.showSlideNavbar) && typeof (o == null ? void 0 : o.showSlideNavbar) == "boolean") return null;
|
|
1819
|
+
const s = ((f = (y = e == null ? void 0 : e.children) == null ? void 0 : y.props) == null ? void 0 : f.allBlocks) || ((E = (x = e == null ? void 0 : e.children) == null ? void 0 : x.props) == null ? void 0 : E.blocks) || [], g = s == null ? void 0 : s.find((b) => (b == null ? void 0 : b._id) === (e == null ? void 0 : e._id)), m = s == null ? void 0 : s.find((b) => (b == null ? void 0 : b._parent) === (g == null ? void 0 : g._parent) && (b == null ? void 0 : b._type) === "Slides"), h = s == null ? void 0 : s.filter((b) => (b == null ? void 0 : b._parent) === (m == null ? void 0 : m._id));
|
|
1820
|
+
return a ? /* @__PURE__ */ i("div", { ...t, ...l, children: h == null ? void 0 : h.map((b, N) => /* @__PURE__ */ i(
|
|
1792
1821
|
"div",
|
|
1793
1822
|
{
|
|
1794
1823
|
...n,
|
|
1795
|
-
...
|
|
1824
|
+
...o != null && o.currentSlide ? (b == null ? void 0 : b._id) === (o == null ? void 0 : o.currentSlide) ? r : {} : N === 0 ? r : {},
|
|
1796
1825
|
children: c
|
|
1797
1826
|
}
|
|
1798
|
-
)) }) : /* @__PURE__ */
|
|
1827
|
+
)) }) : /* @__PURE__ */ i("div", { ...t, ...l, children: h == null ? void 0 : h.map((b, N) => /* @__PURE__ */ i(
|
|
1799
1828
|
"div",
|
|
1800
1829
|
{
|
|
1801
|
-
...
|
|
1802
|
-
slide:
|
|
1830
|
+
...L("sliderNav", {
|
|
1831
|
+
slide: N,
|
|
1803
1832
|
className: n == null ? void 0 : n.className,
|
|
1804
1833
|
activeDotClassName: (r == null ? void 0 : r.className) ?? ""
|
|
1805
1834
|
})
|
|
@@ -1807,12 +1836,12 @@ const qt = (e) => {
|
|
|
1807
1836
|
b == null ? void 0 : b._id
|
|
1808
1837
|
)) });
|
|
1809
1838
|
};
|
|
1810
|
-
u(
|
|
1839
|
+
u(Gt, {
|
|
1811
1840
|
type: "SliderNav",
|
|
1812
1841
|
label: "Slider Navigation",
|
|
1813
1842
|
group: "basic",
|
|
1814
1843
|
category: "core",
|
|
1815
|
-
icon:
|
|
1844
|
+
icon: D,
|
|
1816
1845
|
canDelete: () => !1,
|
|
1817
1846
|
canAcceptBlock: () => !1,
|
|
1818
1847
|
canBeNested: (e) => e === "Slider",
|
|
@@ -1821,18 +1850,18 @@ u(qt, {
|
|
|
1821
1850
|
styles: d("w-full absolute left-0 bottom-0 flex items-center justify-center gap-x-2 p-2"),
|
|
1822
1851
|
dotStyles: d("w-4 h-4 border border-gray-500 rounded-full cursor-pointer"),
|
|
1823
1852
|
activeDotStyles: d("w-4 h-4 rounded-full bg-blue-500"),
|
|
1824
|
-
slider:
|
|
1853
|
+
slider: _("Slider", "slider")
|
|
1825
1854
|
}
|
|
1826
1855
|
})
|
|
1827
1856
|
});
|
|
1828
|
-
const
|
|
1829
|
-
u(
|
|
1857
|
+
const Ut = () => null;
|
|
1858
|
+
u(Ut, {
|
|
1830
1859
|
type: "SliderNavItem",
|
|
1831
1860
|
label: "Slider Nav Item",
|
|
1832
1861
|
group: "basic",
|
|
1833
1862
|
category: "core",
|
|
1834
1863
|
hidden: !0,
|
|
1835
|
-
icon:
|
|
1864
|
+
icon: D,
|
|
1836
1865
|
canDelete: () => !1,
|
|
1837
1866
|
canDuplicate: () => !1,
|
|
1838
1867
|
canAcceptBlock: () => !1,
|
|
@@ -1841,18 +1870,18 @@ u(Ft, {
|
|
|
1841
1870
|
properties: {}
|
|
1842
1871
|
})
|
|
1843
1872
|
});
|
|
1844
|
-
const
|
|
1845
|
-
var
|
|
1846
|
-
const { blockProps: t, styles: l, children: n = null } = e, r = ((g = (
|
|
1847
|
-
totalSlides: ((y = r == null ? void 0 : r.filter((f) => (f == null ? void 0 : f._parent) === (
|
|
1873
|
+
const Ot = (e) => {
|
|
1874
|
+
var s, g, m, h, y;
|
|
1875
|
+
const { blockProps: t, styles: l, children: n = null } = e, r = ((g = (s = e == null ? void 0 : e.children) == null ? void 0 : s.props) == null ? void 0 : g.allBlocks) || ((h = (m = e == null ? void 0 : e.children) == null ? void 0 : m.props) == null ? void 0 : h.blocks) || [], o = r == null ? void 0 : r.find((f) => (f == null ? void 0 : f._parent) === (e == null ? void 0 : e._id) && (f == null ? void 0 : f._type) === "Slides"), c = {
|
|
1876
|
+
totalSlides: ((y = r == null ? void 0 : r.filter((f) => (f == null ? void 0 : f._parent) === (o == null ? void 0 : o._id))) == null ? void 0 : y.length) || 0,
|
|
1848
1877
|
...typeof e.slider == "object" ? e.slider : {}
|
|
1849
1878
|
};
|
|
1850
|
-
return /* @__PURE__ */
|
|
1851
|
-
},
|
|
1879
|
+
return /* @__PURE__ */ i("div", { ...t, ...l, ...L("slider", c), children: n || /* @__PURE__ */ i("div", { className: "h-[60vh] p-2", children: /* @__PURE__ */ i("div", { className: "h-full border-2 border-dashed" }) }) });
|
|
1880
|
+
}, Vt = {
|
|
1852
1881
|
type: "Slider",
|
|
1853
1882
|
label: "Slider",
|
|
1854
1883
|
category: "core",
|
|
1855
|
-
icon:
|
|
1884
|
+
icon: ke,
|
|
1856
1885
|
group: "basic",
|
|
1857
1886
|
wrapper: !0,
|
|
1858
1887
|
blocks: () => [
|
|
@@ -1916,7 +1945,7 @@ const Gt = (e) => {
|
|
|
1916
1945
|
...p({
|
|
1917
1946
|
properties: {
|
|
1918
1947
|
styles: d("w-full h-[60vh] relative overflow-x-hidden"),
|
|
1919
|
-
slider:
|
|
1948
|
+
slider: F({
|
|
1920
1949
|
type: "object",
|
|
1921
1950
|
properties: {},
|
|
1922
1951
|
default: {
|
|
@@ -1932,9 +1961,9 @@ const Gt = (e) => {
|
|
|
1932
1961
|
})
|
|
1933
1962
|
}
|
|
1934
1963
|
})
|
|
1935
|
-
},
|
|
1936
|
-
u(
|
|
1964
|
+
}, el = () => {
|
|
1965
|
+
u(ve, xe), u(Ce, Le), u(Se, _e), u(Pe, Ne), u(Me, $e), u(Ae, Ee), u(De, Te), u(et, tt), u(Ke, Qe), u(lt, rt), u(nt, ot), u(Xe, Ye), u(Ze, Je), u(ct, dt), u(Be, Ie), u(ze, He), u(it, at), u(ft, bt), u(wt, kt), u(vt, xt), u(mt, ht), u(Bt, It), u(Ct, Lt), u(Pt, Nt), u(St, _t), u(Dt, Tt), u(Mt, $t), u(Ue, Oe), u(je, Ge), u(Ve, We), u(yt, gt), u(Rt, zt), u(At, Et), u(Ot, Vt);
|
|
1937
1966
|
};
|
|
1938
1967
|
export {
|
|
1939
|
-
|
|
1968
|
+
el as loadWebBlocks
|
|
1940
1969
|
};
|