@chaibuilder/sdk 1.2.67 → 1.2.69
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-hWn_HIZX.cjs +1 -0
- package/dist/{CodeEditor-q5unEaUI.js → CodeEditor-j7qNDNkC.js} +18 -14
- package/dist/STRINGS-hZpwIZMT.cjs +1 -0
- package/dist/STRINGS-rPGH65PW.js +8 -0
- package/dist/Topbar-MIYSo6jN.cjs +1 -0
- package/dist/{Topbar-kVBx7pp4.js → Topbar-Mfc4KKxc.js} +28 -26
- package/dist/{UnsplashImages-sotLcz6r.js → UnsplashImages-KIgzZx57.js} +30 -26
- package/dist/UnsplashImages-zco6ruqn.cjs +1 -0
- package/dist/{UploadImages-I0QQ6vj1.js → UploadImages-sygXbTXU.js} +18 -14
- package/dist/UploadImages-znUxJ9OD.cjs +1 -0
- package/dist/context-menu-Lx_MAqsu.cjs +1 -0
- package/dist/{context-menu-sks9vdzC.js → context-menu-zu6r7B6f.js} +298 -311
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +14 -1
- package/dist/core.js +88 -80
- package/dist/{index-5hfuDpYs.cjs → index-FpYnmYj7.cjs} +23 -23
- package/dist/{index-Zu-K_BX7.js → index-T7WZImL0.js} +5639 -4980
- package/dist/render.cjs +1 -1
- package/dist/render.js +1 -1
- package/dist/{select-JW3OMYm-.js → select-1WwjQDp6.js} +1 -1
- package/dist/{select-fXj5tdMX.cjs → select-FnytvxNn.cjs} +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +5 -5
- package/dist/ui.js +251 -215
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +385 -392
- package/package.json +1 -1
- package/dist/AddBlocks-TVOOPK2w.cjs +0 -1
- package/dist/AddBlocks-mbuhydG3.js +0 -123
- package/dist/CanvasArea-KJMcis97.cjs +0 -1
- package/dist/CanvasArea-kg3Rgg9t.js +0 -136
- package/dist/CodeEditor-QP6l0mv4.cjs +0 -1
- package/dist/STRINGS--j49GZJP.js +0 -7
- package/dist/STRINGS-gPz7CUOk.cjs +0 -1
- package/dist/SettingsPanel-MWeQjDWs.cjs +0 -1
- package/dist/SettingsPanel-pomLrOxB.js +0 -81
- package/dist/SidePanels-9sbERNEv.cjs +0 -1
- package/dist/SidePanels-YpRrvfiH.js +0 -406
- package/dist/Topbar-veJ2_blW.cjs +0 -1
- package/dist/UILibrariesPanel-ES8YzN9C.js +0 -226
- package/dist/UILibrariesPanel-H8t36R6M.cjs +0 -1
- package/dist/UnsplashImages--MXx-DYM.cjs +0 -1
- package/dist/UploadImages-xhxeYKkl.cjs +0 -1
- package/dist/badge-7BVT3zxN.cjs +0 -1
- package/dist/badge-pJqQSA13.js +0 -23
- package/dist/context-menu-_8TFbFEJ.cjs +0 -1
- package/dist/separator-hT24N-xp.cjs +0 -1
- package/dist/separator-sgwOa1FE.js +0 -18
package/dist/web-blocks.js
CHANGED
|
@@ -1,147 +1,147 @@
|
|
|
1
|
-
import { registerChaiBlock as
|
|
1
|
+
import { registerChaiBlock as p } from "@chaibuilder/runtime";
|
|
2
2
|
import { j as n } from "./jsx-runtime-Sp0orL4X.js";
|
|
3
|
-
import * as
|
|
4
|
-
import { c as C, o as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
3
|
+
import * as f from "react";
|
|
4
|
+
import { c as C, o as m, f as I, v as E, b, T as N, y as L, u as R, r as j, d as S, q as D, e as g, h as V, G as U, g as B, S as O } from "./iconBase-zweRWSz0.js";
|
|
5
|
+
import G from "i18next";
|
|
6
|
+
import { ButtonIcon as H, CodeIcon as W, HeadingIcon as X, TextIcon as Y, CursorTextIcon as Z, Link1Icon as J, ImageIcon as A, RowsIcon as K, ColumnsIcon as Q, SketchLogoIcon as ee, VideoIcon as te, DividerHorizontalIcon as le, MoonIcon as oe, SpaceBetweenVerticallyIcon as z, GroupIcon as se, InputIcon as q, RadiobuttonIcon as ae, DropdownMenuIcon as ne, CheckboxIcon as re } from "@radix-ui/react-icons";
|
|
7
|
+
import { isNull as ie, isEmpty as w, get as v, pick as ce, omit as de, map as M } from "lodash-es";
|
|
7
8
|
import "clsx";
|
|
8
9
|
import "tailwind-merge";
|
|
9
|
-
const
|
|
10
|
-
const { blockProps: l, inBuilder: t, backgroundImage: a, children:
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
return a && (
|
|
15
|
-
},
|
|
10
|
+
const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ n.jsx("div", { className: C("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ n.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ n.jsx("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, _ = ue, o = (e) => G.t(e), pe = (e) => {
|
|
11
|
+
const { blockProps: l, inBuilder: t, backgroundImage: a, children: s, tag: r = "div", styles: i } = e;
|
|
12
|
+
let d = s;
|
|
13
|
+
s || (d = /* @__PURE__ */ n.jsx(_, { inBuilder: t }));
|
|
14
|
+
let c = {};
|
|
15
|
+
return a && (c = { backgroundImage: `url(${a})` }), f.createElement(r, { ...l, ...i, style: c }, d);
|
|
16
|
+
}, be = {
|
|
16
17
|
type: "Box",
|
|
17
|
-
label: "
|
|
18
|
+
label: o("web_blocks.box"),
|
|
18
19
|
category: "core",
|
|
19
20
|
group: "basic",
|
|
20
21
|
props: {
|
|
21
|
-
styles:
|
|
22
|
+
styles: m({ default: "" }),
|
|
22
23
|
tag: I({
|
|
23
|
-
title: "
|
|
24
|
+
title: o("web_blocks.tag"),
|
|
24
25
|
default: "div",
|
|
25
26
|
options: [
|
|
26
|
-
{ value: "div", title: "div" },
|
|
27
|
-
{ value: "header", title: "header" },
|
|
28
|
-
{ value: "footer", title: "footer" },
|
|
29
|
-
{ value: "section", title: "section" },
|
|
30
|
-
{ value: "article", title: "article" },
|
|
31
|
-
{ value: "aside", title: "aside" },
|
|
32
|
-
{ value: "main", title: "main" },
|
|
33
|
-
{ value: "nav", title: "nav" },
|
|
34
|
-
{ value: "figure", title: "figure" },
|
|
35
|
-
{ value: "details", title: "details" },
|
|
36
|
-
{ value: "summary", title: "summary" },
|
|
37
|
-
{ value: "dialog", title: "dialog" },
|
|
38
|
-
{ value: "strike", title: "strike" },
|
|
39
|
-
{ value: "caption", title: "caption" },
|
|
40
|
-
{ value: "legend", title: "legend" },
|
|
41
|
-
{ value: "figcaption", title: "figcaption" },
|
|
42
|
-
{ value: "mark", title: "mark" }
|
|
27
|
+
{ value: "div", title: o("web_blocks.div") },
|
|
28
|
+
{ value: "header", title: o("web_blocks.header") },
|
|
29
|
+
{ value: "footer", title: o("web_blocks.footer") },
|
|
30
|
+
{ value: "section", title: o("web_blocks.section") },
|
|
31
|
+
{ value: "article", title: o("web_blocks.article") },
|
|
32
|
+
{ value: "aside", title: o("web_blocks.aside") },
|
|
33
|
+
{ value: "main", title: o("web_blocks.main") },
|
|
34
|
+
{ value: "nav", title: o("web_blocks.nav") },
|
|
35
|
+
{ value: "figure", title: o("web_blocks.figure") },
|
|
36
|
+
{ value: "details", title: o("web_blocks.details") },
|
|
37
|
+
{ value: "summary", title: o("web_blocks.summary") },
|
|
38
|
+
{ value: "dialog", title: o("web_blocks.dialog") },
|
|
39
|
+
{ value: "strike", title: o("web_blocks.strike") },
|
|
40
|
+
{ value: "caption", title: o("web_blocks.caption") },
|
|
41
|
+
{ value: "legend", title: o("web_blocks.legend") },
|
|
42
|
+
{ value: "figcaption", title: o("web_blocks.figcaption") },
|
|
43
|
+
{ value: "mark", title: o("web_blocks.mark") }
|
|
43
44
|
]
|
|
44
45
|
}),
|
|
45
|
-
backgroundImage:
|
|
46
|
+
backgroundImage: E({ title: o("web_blocks.background_image") })
|
|
46
47
|
},
|
|
47
48
|
canAcceptBlock: () => !0
|
|
48
|
-
},
|
|
49
|
-
const { blockProps: l, iconSize: t, icon: a, content:
|
|
50
|
-
/* @__PURE__ */ n.jsx("span", { "data-ai-key": "content", children:
|
|
51
|
-
|
|
49
|
+
}, me = (e) => {
|
|
50
|
+
const { blockProps: l, iconSize: t, icon: a, content: s, iconPos: r, styles: i, children: d } = e, c = a, u = d || /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
51
|
+
/* @__PURE__ */ n.jsx("span", { "data-ai-key": "content", children: s }),
|
|
52
|
+
c && /* @__PURE__ */ n.jsx(
|
|
52
53
|
"div",
|
|
53
54
|
{
|
|
54
55
|
style: { width: t + "px" },
|
|
55
|
-
className:
|
|
56
|
-
dangerouslySetInnerHTML: { __html:
|
|
56
|
+
className: r + " " + (r === "order-first" ? "mr-2" : "ml-2") || "",
|
|
57
|
+
dangerouslySetInnerHTML: { __html: c }
|
|
57
58
|
}
|
|
58
59
|
)
|
|
59
60
|
] });
|
|
60
|
-
return
|
|
61
|
+
return f.createElement(
|
|
61
62
|
"button",
|
|
62
63
|
{
|
|
63
64
|
...l,
|
|
64
|
-
...
|
|
65
|
+
...i,
|
|
65
66
|
type: "button"
|
|
66
67
|
},
|
|
67
|
-
|
|
68
|
+
u
|
|
68
69
|
);
|
|
69
70
|
}, fe = {
|
|
70
71
|
type: "Button",
|
|
71
|
-
label: "
|
|
72
|
+
label: o("web_blocks.button"),
|
|
72
73
|
category: "core",
|
|
73
74
|
icon: H,
|
|
74
75
|
group: "basic",
|
|
75
76
|
props: {
|
|
76
|
-
content:
|
|
77
|
-
styles:
|
|
78
|
-
icon:
|
|
79
|
-
iconSize:
|
|
77
|
+
content: b({ title: o("web_blocks.label"), default: o("web_blocks.default") }),
|
|
78
|
+
styles: m({ default: "text-white bg-primary px-4 py-2 rounded flex items-center" }),
|
|
79
|
+
icon: N({ title: o("web_blocks.icon"), default: "" }),
|
|
80
|
+
iconSize: L({ title: o("web_blocks.icon_size"), default: 24 }),
|
|
80
81
|
iconPos: I({
|
|
81
|
-
title: "
|
|
82
|
+
title: o("web_blocks.icon_position"),
|
|
82
83
|
default: "order-last",
|
|
83
84
|
options: [
|
|
84
|
-
{ title: "
|
|
85
|
-
{ title: "
|
|
85
|
+
{ title: o("web_blocks.start"), value: "order-first" },
|
|
86
|
+
{ title: o("web_blocks.end"), value: "order-last" }
|
|
86
87
|
]
|
|
87
88
|
})
|
|
88
89
|
}
|
|
89
|
-
},
|
|
90
|
-
const { blockProps: l, styles: t, htmlCode: a, inBuilder:
|
|
91
|
-
return
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
}, he = (e) => {
|
|
91
|
+
const { blockProps: l, styles: t, htmlCode: a, inBuilder: s } = e;
|
|
92
|
+
return s ? /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
|
|
93
|
+
s ? /* @__PURE__ */ n.jsx("div", { ...l, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
94
|
+
f.createElement("div", {
|
|
94
95
|
...t,
|
|
95
96
|
dangerouslySetInnerHTML: { __html: a.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
96
97
|
})
|
|
97
|
-
] }) :
|
|
98
|
+
] }) : f.createElement("div", {
|
|
98
99
|
...l,
|
|
99
100
|
...t,
|
|
100
101
|
dangerouslySetInnerHTML: { __html: a }
|
|
101
102
|
});
|
|
102
|
-
},
|
|
103
|
+
}, ye = {
|
|
103
104
|
type: "CustomHTML",
|
|
104
|
-
label: "
|
|
105
|
+
label: o("web_blocks.custom_html"),
|
|
105
106
|
category: "core",
|
|
106
|
-
icon:
|
|
107
|
+
icon: W,
|
|
107
108
|
group: "advanced",
|
|
108
109
|
props: {
|
|
109
|
-
styles:
|
|
110
|
-
htmlCode:
|
|
111
|
-
title: "
|
|
112
|
-
default: "<div><p>
|
|
113
|
-
placeholder: "
|
|
110
|
+
styles: m({ default: "" }),
|
|
111
|
+
htmlCode: R({
|
|
112
|
+
title: o("web_blocks.html_code"),
|
|
113
|
+
default: "<div><p>" + o("web_blocks.default_snippet") + "</p></div>",
|
|
114
|
+
placeholder: o("web_blocks.placeholder")
|
|
114
115
|
})
|
|
115
116
|
},
|
|
116
117
|
canAcceptBlock: () => !1
|
|
117
|
-
},
|
|
118
|
+
}, ge = f.memo(
|
|
118
119
|
(e) => {
|
|
119
120
|
const { blockProps: l, styles: t } = e;
|
|
120
|
-
return
|
|
121
|
+
return f.createElement("div", { ...l, ...t });
|
|
121
122
|
}
|
|
122
|
-
),
|
|
123
|
+
), ke = {
|
|
123
124
|
type: "EmptyBox",
|
|
124
|
-
label: "
|
|
125
|
+
label: o("web_blocks.empty_box"),
|
|
125
126
|
category: "core",
|
|
126
127
|
group: "basic",
|
|
127
128
|
props: {
|
|
128
|
-
styles:
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
return s ? m.createElement(o, { ...t, ...l }, s) : m.createElement(o, {
|
|
129
|
+
styles: m({ default: "" })
|
|
130
|
+
}
|
|
131
|
+
}, we = (e) => {
|
|
132
|
+
const { blockProps: l, styles: t, content: a, level: s = "h1", children: r = null } = e;
|
|
133
|
+
return r ? f.createElement(s, { ...t, ...l }, r) : f.createElement(s, {
|
|
134
134
|
...t,
|
|
135
135
|
...l,
|
|
136
136
|
"data-ai-key": "content",
|
|
137
137
|
"data-ai-type": "html",
|
|
138
138
|
dangerouslySetInnerHTML: { __html: a }
|
|
139
139
|
});
|
|
140
|
-
},
|
|
140
|
+
}, _e = {
|
|
141
141
|
type: "Heading",
|
|
142
|
-
label: "
|
|
142
|
+
label: o("web_blocks.heading"),
|
|
143
143
|
category: "core",
|
|
144
|
-
icon:
|
|
144
|
+
icon: X,
|
|
145
145
|
group: "typography",
|
|
146
146
|
props: {
|
|
147
147
|
level: I({
|
|
@@ -157,49 +157,49 @@ const ce = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ n.jsx("d
|
|
|
157
157
|
{ value: "h6", title: "h6" }
|
|
158
158
|
]
|
|
159
159
|
}),
|
|
160
|
-
styles:
|
|
161
|
-
content:
|
|
160
|
+
styles: m({ default: "text-3xl" }),
|
|
161
|
+
content: j({ title: "Content", default: "Heading goes here" })
|
|
162
162
|
},
|
|
163
163
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
164
164
|
}, xe = (e) => {
|
|
165
165
|
const { blockProps: l, styles: t, content: a } = e;
|
|
166
|
-
return
|
|
166
|
+
return ie(e.children) ? f.createElement("p", {
|
|
167
167
|
...t,
|
|
168
168
|
...l,
|
|
169
169
|
"data-ai-key": "content",
|
|
170
170
|
"data-ai-type": "html",
|
|
171
171
|
dangerouslySetInnerHTML: { __html: a }
|
|
172
|
-
}) :
|
|
172
|
+
}) : f.createElement("p", { ...t, ...l }, e.children);
|
|
173
173
|
}, ve = {
|
|
174
174
|
type: "Paragraph",
|
|
175
|
-
label: "
|
|
175
|
+
label: o("web_blocks.paragraph"),
|
|
176
176
|
category: "core",
|
|
177
|
-
icon:
|
|
177
|
+
icon: Y,
|
|
178
178
|
group: "typography",
|
|
179
179
|
props: {
|
|
180
|
-
styles:
|
|
181
|
-
content:
|
|
182
|
-
title: "
|
|
180
|
+
styles: m({ default: "" }),
|
|
181
|
+
content: j({
|
|
182
|
+
title: o("web_blocks.content"),
|
|
183
183
|
default: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere."
|
|
184
184
|
})
|
|
185
185
|
},
|
|
186
186
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
187
|
-
},
|
|
188
|
-
const { blockProps: l, styles: t, content: a, children:
|
|
189
|
-
return
|
|
187
|
+
}, Ie = (e) => {
|
|
188
|
+
const { blockProps: l, styles: t, content: a, children: s = null, tag: r } = e;
|
|
189
|
+
return s ? f.createElement("span", { ...t, ...l }, s) : f.createElement(r || "span", {
|
|
190
190
|
...t,
|
|
191
191
|
...l,
|
|
192
192
|
"data-ai-key": "content",
|
|
193
193
|
dangerouslySetInnerHTML: { __html: a }
|
|
194
194
|
});
|
|
195
|
-
},
|
|
195
|
+
}, Be = {
|
|
196
196
|
type: "Span",
|
|
197
|
-
label: "
|
|
197
|
+
label: o("web_blocks.span"),
|
|
198
198
|
category: "core",
|
|
199
199
|
group: "typography",
|
|
200
200
|
props: {
|
|
201
|
-
styles:
|
|
202
|
-
content:
|
|
201
|
+
styles: m({ default: "" }),
|
|
202
|
+
content: j({ title: o("web_blocks.content"), default: "" })
|
|
203
203
|
},
|
|
204
204
|
canAcceptBlock: () => !0
|
|
205
205
|
}, Le = (e) => {
|
|
@@ -214,117 +214,117 @@ const ce = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ n.jsx("d
|
|
|
214
214
|
dangerouslySetInnerHTML: { __html: t }
|
|
215
215
|
}
|
|
216
216
|
) });
|
|
217
|
-
},
|
|
217
|
+
}, je = {
|
|
218
218
|
type: "RichText",
|
|
219
|
-
label: "
|
|
219
|
+
label: o("web_blocks.richtext"),
|
|
220
220
|
category: "core",
|
|
221
|
-
icon:
|
|
221
|
+
icon: Z,
|
|
222
222
|
group: "typography",
|
|
223
223
|
props: {
|
|
224
|
-
styles:
|
|
224
|
+
styles: m({ default: "" }),
|
|
225
225
|
content: S({
|
|
226
|
-
title: "
|
|
226
|
+
title: o("web_blocks.content"),
|
|
227
227
|
default: "<p>This is a rich text block. You can add text, and other content here.</p>"
|
|
228
228
|
})
|
|
229
229
|
}
|
|
230
|
-
},
|
|
231
|
-
const { blockProps: l, link: t, children: a, styles:
|
|
232
|
-
return !a &&
|
|
230
|
+
}, Ce = (e) => {
|
|
231
|
+
const { blockProps: l, link: t, children: a, styles: s, inBuilder: r, content: i } = e;
|
|
232
|
+
return !a && w(s == null ? void 0 : s.className) && w(i) ? /* @__PURE__ */ n.jsx(_, { inBuilder: r }) : r ? a ? /* @__PURE__ */ n.jsx("span", { ...l, ...s, children: a }) : f.createElement("span", {
|
|
233
233
|
...l,
|
|
234
|
-
...
|
|
235
|
-
dangerouslySetInnerHTML: { __html:
|
|
236
|
-
}) : a ? /* @__PURE__ */ n.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...l, ...
|
|
234
|
+
...s,
|
|
235
|
+
dangerouslySetInnerHTML: { __html: i }
|
|
236
|
+
}) : a ? /* @__PURE__ */ n.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...l, ...s, children: a }) : f.createElement("a", {
|
|
237
237
|
...l,
|
|
238
|
-
...
|
|
238
|
+
...s,
|
|
239
239
|
"data-ai-key": "content",
|
|
240
240
|
href: (t == null ? void 0 : t.href) || "#",
|
|
241
241
|
target: (t == null ? void 0 : t.target) || "_self",
|
|
242
|
-
dangerouslySetInnerHTML: { __html:
|
|
242
|
+
dangerouslySetInnerHTML: { __html: i }
|
|
243
243
|
});
|
|
244
|
-
},
|
|
244
|
+
}, Se = {
|
|
245
245
|
type: "Link",
|
|
246
|
-
label: "
|
|
246
|
+
label: o("web_blocks.link"),
|
|
247
247
|
category: "core",
|
|
248
|
-
icon:
|
|
248
|
+
icon: J,
|
|
249
249
|
group: "basic",
|
|
250
250
|
props: {
|
|
251
|
-
styles:
|
|
252
|
-
content:
|
|
253
|
-
link:
|
|
254
|
-
title: "
|
|
251
|
+
styles: m({ default: "" }),
|
|
252
|
+
content: b({ title: o("web_blocks.content"), default: "" }),
|
|
253
|
+
link: D({
|
|
254
|
+
title: o("web_blocks.link"),
|
|
255
255
|
default: { type: "page", target: "_self", href: "#" }
|
|
256
256
|
})
|
|
257
257
|
},
|
|
258
258
|
canAcceptBlock: (e) => e !== "Link"
|
|
259
|
-
},
|
|
259
|
+
}, F = (e, ...l) => ({
|
|
260
260
|
...e,
|
|
261
261
|
className: C(e.className, ...l)
|
|
262
|
-
}),
|
|
263
|
-
const { blockProps: l, children: t, styles: a, inBuilder:
|
|
264
|
-
if (!t &&
|
|
265
|
-
return /* @__PURE__ */ n.jsx(
|
|
266
|
-
if (
|
|
267
|
-
return t ? /* @__PURE__ */ n.jsx("span", { ...l, ...
|
|
262
|
+
}), Me = (e) => {
|
|
263
|
+
const { blockProps: l, children: t, styles: a, inBuilder: s, content: r, href: i } = e, { hrefType: d, autoplay: c, maxWidth: u, backdropColor: y, galleryName: h } = e, k = F(a, "cb-lightbox");
|
|
264
|
+
if (!t && w(a == null ? void 0 : a.className) && w(r))
|
|
265
|
+
return /* @__PURE__ */ n.jsx(_, { inBuilder: s });
|
|
266
|
+
if (s)
|
|
267
|
+
return t ? /* @__PURE__ */ n.jsx("span", { ...l, ...k, children: t }) : f.createElement("span", {
|
|
268
268
|
...l,
|
|
269
|
-
...
|
|
270
|
-
dangerouslySetInnerHTML: { __html:
|
|
269
|
+
...k,
|
|
270
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
271
271
|
});
|
|
272
|
-
const
|
|
273
|
-
return
|
|
272
|
+
const x = {};
|
|
273
|
+
return x["data-vbtype"] = d, c && (x["data-autoplay"] = "true"), u && (x["data-maxwidth"] = u + "px"), y && (x["data-overlay"] = y), h && (x["data-gall"] = h), t ? /* @__PURE__ */ n.jsx("a", { ...x, href: i || "#/", ...l, ...k, children: t }) : f.createElement("a", {
|
|
274
274
|
...l,
|
|
275
|
-
...
|
|
276
|
-
...
|
|
277
|
-
href:
|
|
278
|
-
dangerouslySetInnerHTML: { __html:
|
|
275
|
+
...k,
|
|
276
|
+
...x,
|
|
277
|
+
href: i || "#",
|
|
278
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
279
279
|
});
|
|
280
|
-
},
|
|
280
|
+
}, Ee = {
|
|
281
281
|
type: "LightBoxLink",
|
|
282
|
-
label: "
|
|
282
|
+
label: o("web_blocks.lightbox_link"),
|
|
283
283
|
category: "core",
|
|
284
|
-
icon:
|
|
284
|
+
icon: A,
|
|
285
285
|
group: "basic",
|
|
286
286
|
props: {
|
|
287
|
-
styles:
|
|
288
|
-
content:
|
|
289
|
-
href:
|
|
287
|
+
styles: m({ default: "" }),
|
|
288
|
+
content: b({ title: o("web_blocks.content"), default: "Link text or drop blocks inside" }),
|
|
289
|
+
href: b({ title: o("web_blocks.href"), default: "" }),
|
|
290
290
|
hrefType: I({
|
|
291
|
-
title: "
|
|
291
|
+
title: o("web_blocks.type"),
|
|
292
292
|
default: "video",
|
|
293
293
|
options: [
|
|
294
|
-
{ value: "video", title: "video
|
|
295
|
-
{ value: "iframe", title: "iframe" },
|
|
296
|
-
{ value: "inline", title: "inline" },
|
|
297
|
-
{ value: "ajax", title: "ajax" }
|
|
294
|
+
{ value: "video", title: o("web_blocks.video") },
|
|
295
|
+
{ value: "iframe", title: o("web_blocks.iframe") },
|
|
296
|
+
{ value: "inline", title: o("web_blocks.inline") },
|
|
297
|
+
{ value: "ajax", title: o("web_blocks.ajax") }
|
|
298
298
|
]
|
|
299
299
|
}),
|
|
300
|
-
autoplay: g({ title: "
|
|
301
|
-
maxWidth:
|
|
302
|
-
backdropColor:
|
|
303
|
-
galleryName:
|
|
300
|
+
autoplay: g({ title: o("web_blocks.autoplay"), default: !1 }),
|
|
301
|
+
maxWidth: L({ title: o("web_blocks.max_width"), default: "" }),
|
|
302
|
+
backdropColor: b({ title: o("web_blocks.backdrop_color"), default: "" }),
|
|
303
|
+
galleryName: b({ title: o("web_blocks.gallery_name"), default: "" })
|
|
304
304
|
},
|
|
305
305
|
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
306
|
-
},
|
|
307
|
-
const { blockProps: l, children: t, listType: a, styles:
|
|
308
|
-
return !t &&
|
|
309
|
-
|
|
310
|
-
{ ...l, ...
|
|
306
|
+
}, Ne = (e) => {
|
|
307
|
+
const { blockProps: l, children: t, listType: a, styles: s, tag: r, inBuilder: i } = e, d = C(v(s, "className", ""), a);
|
|
308
|
+
return !t && w(s == null ? void 0 : s.className) ? /* @__PURE__ */ n.jsx(_, { inBuilder: i }) : f.createElement(
|
|
309
|
+
r || (a === "list-decimal" ? "ol" : "ul"),
|
|
310
|
+
{ ...l, ...s, className: d },
|
|
311
311
|
t
|
|
312
312
|
);
|
|
313
|
-
},
|
|
313
|
+
}, Pe = {
|
|
314
314
|
type: "List",
|
|
315
|
-
label: "
|
|
316
|
-
icon:
|
|
315
|
+
label: o("web_blocks.list"),
|
|
316
|
+
icon: K,
|
|
317
317
|
category: "core",
|
|
318
318
|
group: "basic",
|
|
319
319
|
props: {
|
|
320
|
-
styles:
|
|
320
|
+
styles: m({ default: "" }),
|
|
321
321
|
listType: I({
|
|
322
|
-
title: "
|
|
322
|
+
title: o("web_blocks.list_type"),
|
|
323
323
|
default: "list-none",
|
|
324
324
|
options: [
|
|
325
|
-
{ value: "list-none", title: "
|
|
326
|
-
{ value: "list-disc", title: "
|
|
327
|
-
{ value: "list-decimal", title: "
|
|
325
|
+
{ value: "list-none", title: o("web_blocks.none") },
|
|
326
|
+
{ value: "list-disc", title: o("web_blocks.disc") },
|
|
327
|
+
{ value: "list-decimal", title: o("web_blocks.number") }
|
|
328
328
|
]
|
|
329
329
|
})
|
|
330
330
|
},
|
|
@@ -353,104 +353,104 @@ const ce = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ n.jsx("d
|
|
|
353
353
|
content: "Item 3"
|
|
354
354
|
}
|
|
355
355
|
]
|
|
356
|
-
},
|
|
357
|
-
const { blockProps: l, content: t, styles: a, children:
|
|
358
|
-
return
|
|
356
|
+
}, $e = (e) => {
|
|
357
|
+
const { blockProps: l, content: t, styles: a, children: s, tag: r } = e;
|
|
358
|
+
return s ? f.createElement(r || "li", { ...a, ...l }, s) : f.createElement(r || "li", {
|
|
359
359
|
...a,
|
|
360
360
|
...l,
|
|
361
361
|
"data-ai-key": "content",
|
|
362
362
|
dangerouslySetInnerHTML: { __html: t }
|
|
363
363
|
});
|
|
364
|
-
},
|
|
364
|
+
}, Te = {
|
|
365
365
|
type: "ListItem",
|
|
366
|
-
label: "
|
|
367
|
-
icon:
|
|
366
|
+
label: o("web_blocks.listitem"),
|
|
367
|
+
icon: Q,
|
|
368
368
|
category: "core",
|
|
369
369
|
group: "basic",
|
|
370
370
|
props: {
|
|
371
|
-
styles:
|
|
372
|
-
content:
|
|
371
|
+
styles: m({ default: "" }),
|
|
372
|
+
content: j({ title: o("web_blocks.content"), default: "List item" })
|
|
373
373
|
},
|
|
374
374
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
375
375
|
canBeNested: (e) => e === "List"
|
|
376
|
-
},
|
|
377
|
-
const { blockProps: l, icon: t, styles: a, width:
|
|
378
|
-
if (
|
|
379
|
-
return /* @__PURE__ */ n.jsx(
|
|
380
|
-
const
|
|
381
|
-
return
|
|
376
|
+
}, Re = (e) => {
|
|
377
|
+
const { blockProps: l, icon: t, styles: a, width: s, inBuilder: r, height: i } = e, d = F(a, C(s ? `w-[${s}px]` : "", i ? `h-[${i}px]` : ""));
|
|
378
|
+
if (w(t))
|
|
379
|
+
return /* @__PURE__ */ n.jsx(_, { inBuilder: r, className: "h-8 w-14" });
|
|
380
|
+
const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
381
|
+
return f.createElement("span", {
|
|
382
382
|
...l,
|
|
383
|
-
...
|
|
384
|
-
dangerouslySetInnerHTML: { __html:
|
|
383
|
+
...d,
|
|
384
|
+
dangerouslySetInnerHTML: { __html: c }
|
|
385
385
|
});
|
|
386
|
-
},
|
|
386
|
+
}, He = {
|
|
387
387
|
type: "Icon",
|
|
388
|
-
label: "
|
|
388
|
+
label: o("web_blocks.icon"),
|
|
389
389
|
category: "core",
|
|
390
|
-
icon:
|
|
390
|
+
icon: ee,
|
|
391
391
|
group: "media",
|
|
392
392
|
props: {
|
|
393
|
-
styles:
|
|
394
|
-
icon:
|
|
395
|
-
title: "
|
|
393
|
+
styles: m({ default: "text-black" }),
|
|
394
|
+
icon: N({
|
|
395
|
+
title: o("web_blocks.icon"),
|
|
396
396
|
default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'
|
|
397
397
|
}),
|
|
398
|
-
width:
|
|
399
|
-
height:
|
|
398
|
+
width: L({ title: o("web_blocks.width"), default: "" }),
|
|
399
|
+
height: L({ title: o("web_blocks.height"), default: "" })
|
|
400
400
|
}
|
|
401
|
-
},
|
|
402
|
-
const { blockProps: l, image: t, styles: a, alt:
|
|
403
|
-
return
|
|
401
|
+
}, Ae = (e) => {
|
|
402
|
+
const { blockProps: l, image: t, styles: a, alt: s, height: r, width: i } = e;
|
|
403
|
+
return w(t) ? /* @__PURE__ */ n.jsx(_, { className: "h-36" }) : f.createElement("img", {
|
|
404
404
|
...l,
|
|
405
405
|
...a,
|
|
406
406
|
src: t,
|
|
407
|
-
alt:
|
|
407
|
+
alt: s,
|
|
408
408
|
loading: "lazy",
|
|
409
|
-
height:
|
|
410
|
-
width:
|
|
409
|
+
height: r,
|
|
410
|
+
width: i
|
|
411
411
|
});
|
|
412
|
-
},
|
|
412
|
+
}, ze = {
|
|
413
413
|
type: "Image",
|
|
414
|
-
label: "
|
|
414
|
+
label: o("web_blocks.image"),
|
|
415
415
|
category: "core",
|
|
416
|
-
icon:
|
|
416
|
+
icon: A,
|
|
417
417
|
group: "media",
|
|
418
418
|
props: {
|
|
419
|
-
styles:
|
|
420
|
-
image:
|
|
419
|
+
styles: m({ default: "" }),
|
|
420
|
+
image: E({
|
|
421
421
|
title: "Image",
|
|
422
422
|
default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
|
|
423
423
|
}),
|
|
424
|
-
alt:
|
|
425
|
-
width:
|
|
426
|
-
height:
|
|
424
|
+
alt: b({ title: o("web_blocks.alt"), default: "" }),
|
|
425
|
+
width: b({ title: o("web_blocks.width"), default: "" }),
|
|
426
|
+
height: b({ title: o("web_blocks.height"), default: "" })
|
|
427
427
|
}
|
|
428
|
-
},
|
|
429
|
-
if (
|
|
430
|
-
const l = e.match(
|
|
428
|
+
}, P = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, $ = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, T = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, qe = (e) => {
|
|
429
|
+
if (P.test(e)) {
|
|
430
|
+
const l = e.match(P);
|
|
431
431
|
return l ? `https://www.youtube.com/embed/${l[4]}` : e;
|
|
432
432
|
}
|
|
433
|
-
if (
|
|
434
|
-
const l = e.match(
|
|
433
|
+
if ($.test(e)) {
|
|
434
|
+
const l = e.match($);
|
|
435
435
|
return l ? `https://player.vimeo.com/video/${l[3]}` : e;
|
|
436
436
|
}
|
|
437
|
-
if (
|
|
438
|
-
const l = e.match(
|
|
437
|
+
if (T.test(e)) {
|
|
438
|
+
const l = e.match(T);
|
|
439
439
|
return l ? `https://www.dailymotion.com/embed/video/${l[4]}` : e;
|
|
440
440
|
}
|
|
441
441
|
return null;
|
|
442
|
-
},
|
|
442
|
+
}, Fe = f.memo(
|
|
443
443
|
(e) => {
|
|
444
|
-
const { blockProps: l, inBuilder: t, styles: a, url:
|
|
445
|
-
if (
|
|
446
|
-
return /* @__PURE__ */ n.jsx(
|
|
447
|
-
let y =
|
|
444
|
+
const { blockProps: l, inBuilder: t, styles: a, url: s, controls: r } = e, i = v(r, "autoPlay", !1), d = v(r, "controls", !1), c = i || v(r, "muted", !0), u = v(r, "loop", !1);
|
|
445
|
+
if (w(s))
|
|
446
|
+
return /* @__PURE__ */ n.jsx(_, { inBuilder: t, className: "h-36" });
|
|
447
|
+
let y = qe(s), h = null;
|
|
448
448
|
if (y) {
|
|
449
|
-
if (!
|
|
450
|
-
const
|
|
451
|
-
|
|
449
|
+
if (!w(y)) {
|
|
450
|
+
const k = [];
|
|
451
|
+
k.push(`autoplay=${i ? 1 : 0}`), k.push(`controls=${r ? 1 : 0}`), k.push(`mute=${c ? 1 : 0}&muted=${c ? 1 : 0}`), k.push(`loop=${u ? 1 : 0}`), y = `${y}?${k.join("&")}`;
|
|
452
452
|
}
|
|
453
|
-
h =
|
|
453
|
+
h = f.createElement("iframe", {
|
|
454
454
|
...l,
|
|
455
455
|
className: "absolute inset-0 w-full h-full",
|
|
456
456
|
src: y,
|
|
@@ -459,33 +459,33 @@ const ce = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ n.jsx("d
|
|
|
459
459
|
frameBorder: 0
|
|
460
460
|
});
|
|
461
461
|
} else
|
|
462
|
-
h =
|
|
462
|
+
h = f.createElement("video", {
|
|
463
463
|
...l,
|
|
464
464
|
className: "absolute inset-0 w-full h-full",
|
|
465
|
-
src:
|
|
466
|
-
controls:
|
|
467
|
-
muted:
|
|
468
|
-
autoPlay: t ? !1 :
|
|
469
|
-
loop:
|
|
465
|
+
src: s,
|
|
466
|
+
controls: d,
|
|
467
|
+
muted: c,
|
|
468
|
+
autoPlay: t ? !1 : i,
|
|
469
|
+
loop: u
|
|
470
470
|
});
|
|
471
|
-
return /* @__PURE__ */ n.jsx("div", { ...
|
|
472
|
-
t ? /* @__PURE__ */ n.jsx("div", { ...l, ...
|
|
471
|
+
return /* @__PURE__ */ n.jsx("div", { ...ce(a, ["className"]), children: /* @__PURE__ */ n.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
472
|
+
t ? /* @__PURE__ */ n.jsx("div", { ...l, ...de(a, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
473
473
|
h
|
|
474
474
|
] }) });
|
|
475
475
|
}
|
|
476
476
|
), De = {
|
|
477
477
|
type: "Video",
|
|
478
|
-
label: "
|
|
478
|
+
label: o("web_blocks.video"),
|
|
479
479
|
category: "core",
|
|
480
|
-
icon:
|
|
480
|
+
icon: te,
|
|
481
481
|
group: "media",
|
|
482
482
|
props: {
|
|
483
|
-
styles:
|
|
484
|
-
url:
|
|
483
|
+
styles: m({ default: "" }),
|
|
484
|
+
url: b({
|
|
485
485
|
title: "Video URL",
|
|
486
486
|
default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
|
|
487
487
|
}),
|
|
488
|
-
controls:
|
|
488
|
+
controls: V({
|
|
489
489
|
title: "Controls",
|
|
490
490
|
properties: {
|
|
491
491
|
autoPlay: g({ title: "Autoplay", default: !0 }),
|
|
@@ -496,43 +496,43 @@ const ce = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ n.jsx("d
|
|
|
496
496
|
})
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
|
-
function
|
|
500
|
-
return
|
|
499
|
+
function Ve(e) {
|
|
500
|
+
return U({ 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);
|
|
501
501
|
}
|
|
502
|
-
const
|
|
502
|
+
const Ue = (e) => {
|
|
503
503
|
const { scripts: l, inBuilder: t, blockProps: a } = e;
|
|
504
504
|
return t ? /* @__PURE__ */ n.jsx("div", { ...a }) : /* @__PURE__ */ n.jsx("div", { dangerouslySetInnerHTML: { __html: l } });
|
|
505
|
-
},
|
|
505
|
+
}, Oe = {
|
|
506
506
|
type: "CustomScript",
|
|
507
|
-
label: "
|
|
507
|
+
label: o("web_blocks.custom_script"),
|
|
508
508
|
category: "core",
|
|
509
|
-
icon:
|
|
509
|
+
icon: Ve,
|
|
510
510
|
group: "advanced",
|
|
511
511
|
props: {
|
|
512
|
-
scripts:
|
|
512
|
+
scripts: R({
|
|
513
513
|
title: "Script",
|
|
514
514
|
default: "",
|
|
515
515
|
placeholder: "<script>console.log('Hello, world!');<\/script>"
|
|
516
516
|
})
|
|
517
517
|
},
|
|
518
518
|
canAcceptBlock: () => !1
|
|
519
|
-
},
|
|
519
|
+
}, Ge = (e) => {
|
|
520
520
|
const { blockProps: l, styles: t } = e;
|
|
521
|
-
return
|
|
522
|
-
},
|
|
521
|
+
return f.createElement("hr", { ...t, ...l });
|
|
522
|
+
}, We = {
|
|
523
523
|
type: "Divider",
|
|
524
|
-
label: "
|
|
524
|
+
label: o("web_blocks.divider"),
|
|
525
525
|
category: "core",
|
|
526
|
-
icon:
|
|
526
|
+
icon: le,
|
|
527
527
|
group: "basic",
|
|
528
528
|
props: {
|
|
529
|
-
styles:
|
|
529
|
+
styles: m({ default: "bg-gray-900 h-0.5 py-2 my-1" })
|
|
530
530
|
}
|
|
531
|
-
},
|
|
531
|
+
}, Xe = () => null, Ye = {
|
|
532
532
|
type: "Dark Mode",
|
|
533
|
-
label: "
|
|
533
|
+
label: o("web_blocks.dark_mode"),
|
|
534
534
|
category: "core",
|
|
535
|
-
icon:
|
|
535
|
+
icon: oe,
|
|
536
536
|
group: "advanced",
|
|
537
537
|
props: {},
|
|
538
538
|
blocks: () => [
|
|
@@ -584,51 +584,51 @@ const Fe = (e) => {
|
|
|
584
584
|
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>"
|
|
585
585
|
}
|
|
586
586
|
]
|
|
587
|
-
},
|
|
587
|
+
}, Ze = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ n.jsx("span", { "data-ai-key": "content", ...e.blockProps, children: e.content }) : `${e.content}`, Je = {
|
|
588
588
|
type: "Text",
|
|
589
|
-
label: "
|
|
589
|
+
label: o("web_blocks.text"),
|
|
590
590
|
hidden: !0,
|
|
591
591
|
category: "core",
|
|
592
592
|
group: "typography",
|
|
593
|
-
icon:
|
|
593
|
+
icon: z,
|
|
594
594
|
props: {
|
|
595
|
-
content:
|
|
595
|
+
content: j({ title: o("web_blocks.content"), defaultValue: "" })
|
|
596
596
|
}
|
|
597
|
-
},
|
|
598
|
-
const { blockProps: l, backgroundImage: t, children: a, styles:
|
|
599
|
-
let
|
|
600
|
-
return t && (
|
|
601
|
-
},
|
|
597
|
+
}, Ke = (e) => {
|
|
598
|
+
const { blockProps: l, backgroundImage: t, children: a, styles: s } = e;
|
|
599
|
+
let r = {};
|
|
600
|
+
return t && (r = { backgroundImage: `url(${t})` }), f.createElement("div", { ...l, ...s, style: r }, a);
|
|
601
|
+
}, Qe = {
|
|
602
602
|
type: "Body",
|
|
603
603
|
label: "Body",
|
|
604
604
|
category: "core",
|
|
605
605
|
group: "basic",
|
|
606
606
|
hidden: !0,
|
|
607
607
|
props: {
|
|
608
|
-
styles:
|
|
609
|
-
backgroundImage:
|
|
608
|
+
styles: m({ default: "font-body antialiased" }),
|
|
609
|
+
backgroundImage: E({ title: "Background Image" })
|
|
610
610
|
},
|
|
611
611
|
canAcceptBlock: () => !0,
|
|
612
612
|
canDelete: () => !1,
|
|
613
613
|
canMove: () => !1,
|
|
614
614
|
canDuplicate: () => !1
|
|
615
|
-
},
|
|
615
|
+
}, et = (e) => {
|
|
616
616
|
const { blockProps: l, styles: t } = e;
|
|
617
|
-
return
|
|
618
|
-
},
|
|
617
|
+
return f.createElement("br", { ...l, ...t });
|
|
618
|
+
}, tt = {
|
|
619
619
|
type: "LineBreak",
|
|
620
620
|
label: "Line Break",
|
|
621
621
|
category: "core",
|
|
622
622
|
group: "basic",
|
|
623
623
|
hidden: !0,
|
|
624
|
-
icon:
|
|
624
|
+
icon: z,
|
|
625
625
|
props: {
|
|
626
|
-
styles:
|
|
626
|
+
styles: m({ default: "" })
|
|
627
627
|
}
|
|
628
|
-
},
|
|
629
|
-
const { blockProps: l, errorMessage: t, name: a, _type:
|
|
630
|
-
let
|
|
631
|
-
|
|
628
|
+
}, lt = (e) => {
|
|
629
|
+
const { blockProps: l, errorMessage: t, name: a, _type: s, successMessage: r, action: i, styles: d, children: c } = e;
|
|
630
|
+
let u = c;
|
|
631
|
+
c || (u = /* @__PURE__ */ n.jsx(_, {}));
|
|
632
632
|
const y = {
|
|
633
633
|
"x-data": "useForm",
|
|
634
634
|
"x-on:submit.prevent": "post"
|
|
@@ -641,28 +641,27 @@ const Fe = (e) => {
|
|
|
641
641
|
{
|
|
642
642
|
...y,
|
|
643
643
|
"data-error": t,
|
|
644
|
-
"data-success":
|
|
644
|
+
"data-success": r,
|
|
645
645
|
method: "post",
|
|
646
|
-
action:
|
|
646
|
+
action: i,
|
|
647
647
|
...l,
|
|
648
|
-
...
|
|
648
|
+
...d,
|
|
649
649
|
children: [
|
|
650
650
|
/* @__PURE__ */ n.jsx("div", { ...h }),
|
|
651
|
-
/* @__PURE__ */ n.jsx("input", { name: "formname", type: "hidden", value: a ||
|
|
652
|
-
|
|
651
|
+
/* @__PURE__ */ n.jsx("input", { name: "formname", type: "hidden", value: a || s }),
|
|
652
|
+
u
|
|
653
653
|
]
|
|
654
654
|
}
|
|
655
655
|
);
|
|
656
|
-
},
|
|
656
|
+
}, ot = {
|
|
657
657
|
type: "Form",
|
|
658
658
|
label: "Form",
|
|
659
659
|
category: "core",
|
|
660
|
-
icon:
|
|
660
|
+
icon: se,
|
|
661
661
|
group: "form",
|
|
662
|
-
hidden: !0,
|
|
663
662
|
props: {
|
|
664
|
-
styles:
|
|
665
|
-
action:
|
|
663
|
+
styles: m({ default: "" }),
|
|
664
|
+
action: b({
|
|
666
665
|
title: "Submit URL",
|
|
667
666
|
default: "/api/form/submit"
|
|
668
667
|
}),
|
|
@@ -676,38 +675,37 @@ const Fe = (e) => {
|
|
|
676
675
|
})
|
|
677
676
|
},
|
|
678
677
|
canAcceptBlock: () => !0
|
|
679
|
-
},
|
|
680
|
-
const { blockProps: l, inBuilder: t, label: a, styles:
|
|
678
|
+
}, st = (e) => {
|
|
679
|
+
const { blockProps: l, inBuilder: t, label: a, styles: s, inputStyles: r, icon: i, iconPos: d } = e, c = B(), u = {
|
|
681
680
|
"x-bind:disabled": "formLoading"
|
|
682
681
|
};
|
|
683
682
|
return /* @__PURE__ */ n.jsxs(
|
|
684
683
|
"button",
|
|
685
684
|
{
|
|
686
|
-
id:
|
|
687
|
-
...
|
|
685
|
+
id: c,
|
|
686
|
+
...u,
|
|
687
|
+
...r,
|
|
688
688
|
...s,
|
|
689
|
-
...o,
|
|
690
689
|
...l || {},
|
|
691
690
|
type: t ? "button" : "submit",
|
|
692
691
|
children: [
|
|
693
692
|
a,
|
|
694
|
-
|
|
693
|
+
i && /* @__PURE__ */ n.jsx("span", { className: d, dangerouslySetInnerHTML: { __html: i } })
|
|
695
694
|
]
|
|
696
695
|
}
|
|
697
696
|
);
|
|
698
|
-
},
|
|
697
|
+
}, at = {
|
|
699
698
|
type: "FormButton",
|
|
700
699
|
label: "Submit Button",
|
|
701
700
|
category: "core",
|
|
702
701
|
icon: H,
|
|
703
702
|
group: "form",
|
|
704
|
-
hidden: !0,
|
|
705
703
|
props: {
|
|
706
|
-
label:
|
|
707
|
-
styles:
|
|
704
|
+
label: b({ title: "Label", default: "Submit" }),
|
|
705
|
+
styles: m({
|
|
708
706
|
default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
|
|
709
707
|
}),
|
|
710
|
-
icon:
|
|
708
|
+
icon: N({ title: "Icon", default: "" }),
|
|
711
709
|
iconPos: I({
|
|
712
710
|
title: "Icon Position",
|
|
713
711
|
default: "order-last",
|
|
@@ -717,60 +715,59 @@ const Fe = (e) => {
|
|
|
717
715
|
]
|
|
718
716
|
})
|
|
719
717
|
}
|
|
720
|
-
},
|
|
718
|
+
}, nt = (e) => {
|
|
721
719
|
const {
|
|
722
720
|
blockProps: l,
|
|
723
721
|
label: t,
|
|
724
722
|
placeholder: a,
|
|
725
|
-
styles:
|
|
726
|
-
inputStyles:
|
|
727
|
-
showLabel:
|
|
728
|
-
required:
|
|
729
|
-
inputType:
|
|
730
|
-
inBuilder:
|
|
723
|
+
styles: s,
|
|
724
|
+
inputStyles: r,
|
|
725
|
+
showLabel: i,
|
|
726
|
+
required: d,
|
|
727
|
+
inputType: c = "text",
|
|
728
|
+
inBuilder: u,
|
|
731
729
|
fieldName: y
|
|
732
|
-
} = e, h =
|
|
733
|
-
return !
|
|
730
|
+
} = e, h = B();
|
|
731
|
+
return !i || c === "submit" ? (c === "submit" && (l.value = t), /* @__PURE__ */ n.jsx(
|
|
734
732
|
"input",
|
|
735
733
|
{
|
|
736
734
|
id: h,
|
|
737
735
|
name: y,
|
|
738
|
-
readOnly:
|
|
736
|
+
readOnly: u,
|
|
739
737
|
...l,
|
|
738
|
+
...r,
|
|
740
739
|
...s,
|
|
741
|
-
|
|
742
|
-
type: i,
|
|
740
|
+
type: c,
|
|
743
741
|
placeholder: a,
|
|
744
|
-
required:
|
|
742
|
+
required: d
|
|
745
743
|
}
|
|
746
|
-
)) : /* @__PURE__ */ n.jsxs("div", { ...
|
|
747
|
-
|
|
744
|
+
)) : /* @__PURE__ */ n.jsxs("div", { ...s, ...l, children: [
|
|
745
|
+
i && /* @__PURE__ */ n.jsx("label", { htmlFor: h, children: t }),
|
|
748
746
|
/* @__PURE__ */ n.jsx(
|
|
749
747
|
"input",
|
|
750
748
|
{
|
|
751
749
|
name: y,
|
|
752
|
-
readOnly:
|
|
753
|
-
...
|
|
750
|
+
readOnly: u,
|
|
751
|
+
...r,
|
|
754
752
|
id: h,
|
|
755
|
-
type:
|
|
753
|
+
type: c,
|
|
756
754
|
placeholder: a,
|
|
757
|
-
required:
|
|
755
|
+
required: d
|
|
758
756
|
}
|
|
759
757
|
)
|
|
760
758
|
] });
|
|
761
|
-
},
|
|
759
|
+
}, rt = {
|
|
762
760
|
type: "Input",
|
|
763
761
|
label: "Input",
|
|
764
762
|
category: "core",
|
|
765
|
-
icon:
|
|
763
|
+
icon: q,
|
|
766
764
|
group: "form",
|
|
767
|
-
hidden: !0,
|
|
768
765
|
props: {
|
|
769
|
-
styles:
|
|
770
|
-
fieldName:
|
|
766
|
+
styles: m({ default: "" }),
|
|
767
|
+
fieldName: b({ title: "Field Name", default: "input" }),
|
|
771
768
|
inputType: I({
|
|
772
769
|
title: "Type",
|
|
773
|
-
options:
|
|
770
|
+
options: M(
|
|
774
771
|
["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
|
|
775
772
|
(e) => ({
|
|
776
773
|
value: e,
|
|
@@ -779,68 +776,67 @@ const Fe = (e) => {
|
|
|
779
776
|
),
|
|
780
777
|
default: "text"
|
|
781
778
|
}),
|
|
782
|
-
value:
|
|
779
|
+
value: b({ title: "Value", default: "" }),
|
|
783
780
|
showLabel: g({ title: "Show label", default: !0 }),
|
|
784
|
-
inputStyles:
|
|
785
|
-
label:
|
|
786
|
-
placeholder:
|
|
781
|
+
inputStyles: m({ default: "w-full p-1" }),
|
|
782
|
+
label: b({ title: "Label", default: "Label" }),
|
|
783
|
+
placeholder: b({
|
|
787
784
|
title: "Placeholder",
|
|
788
785
|
default: "Placeholder"
|
|
789
786
|
}),
|
|
790
787
|
required: g({ title: "Required", default: !1 })
|
|
791
788
|
}
|
|
792
|
-
},
|
|
793
|
-
const { blockProps: l, fieldName: t, label: a, styles:
|
|
794
|
-
return
|
|
795
|
-
/* @__PURE__ */ n.jsx("input", { ...
|
|
796
|
-
a && /* @__PURE__ */ n.jsx("label", { htmlFor:
|
|
789
|
+
}, it = (e) => {
|
|
790
|
+
const { blockProps: l, fieldName: t, label: a, styles: s, inputStyles: r, checked: i, required: d, showLabel: c = !0 } = e, u = B();
|
|
791
|
+
return c ? /* @__PURE__ */ n.jsxs("div", { ...s, ...l, children: [
|
|
792
|
+
/* @__PURE__ */ n.jsx("input", { ...r, name: t, id: u, type: "radio", required: d, defaultChecked: i }),
|
|
793
|
+
a && /* @__PURE__ */ n.jsx("label", { htmlFor: u, children: a })
|
|
797
794
|
] }) : /* @__PURE__ */ n.jsx(
|
|
798
795
|
"input",
|
|
799
796
|
{
|
|
800
|
-
id:
|
|
797
|
+
id: u,
|
|
801
798
|
...l,
|
|
799
|
+
...r,
|
|
802
800
|
...s,
|
|
803
|
-
...o,
|
|
804
801
|
type: "radio",
|
|
805
|
-
required:
|
|
806
|
-
checked:
|
|
802
|
+
required: d,
|
|
803
|
+
checked: i,
|
|
807
804
|
name: t
|
|
808
805
|
}
|
|
809
806
|
);
|
|
810
|
-
},
|
|
807
|
+
}, ct = {
|
|
811
808
|
type: "Radio",
|
|
812
809
|
label: "Radio",
|
|
813
810
|
category: "core",
|
|
814
|
-
icon:
|
|
811
|
+
icon: ae,
|
|
815
812
|
group: "form",
|
|
816
|
-
hidden: !0,
|
|
817
813
|
props: {
|
|
818
|
-
styles:
|
|
819
|
-
fieldName:
|
|
820
|
-
label:
|
|
814
|
+
styles: m({ default: "flex items-center w-max gap-x-2" }),
|
|
815
|
+
fieldName: b({ title: "Field Name", default: "radio" }),
|
|
816
|
+
label: b({ title: "Label", default: "Label" }),
|
|
821
817
|
checked: g({ title: "Checked", default: !1 }),
|
|
822
818
|
required: g({ title: "Required", default: !1 })
|
|
823
819
|
}
|
|
824
|
-
},
|
|
820
|
+
}, dt = (e) => {
|
|
825
821
|
const {
|
|
826
822
|
blockProps: l,
|
|
827
823
|
fieldName: t,
|
|
828
824
|
label: a,
|
|
829
|
-
placeholder:
|
|
830
|
-
styles:
|
|
831
|
-
inputStyles:
|
|
832
|
-
required:
|
|
833
|
-
showLabel:
|
|
834
|
-
_multiple:
|
|
835
|
-
} = e, y =
|
|
836
|
-
return
|
|
837
|
-
|
|
838
|
-
/* @__PURE__ */ n.jsxs("select", { ...
|
|
839
|
-
/* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children:
|
|
840
|
-
|
|
825
|
+
placeholder: s,
|
|
826
|
+
styles: r,
|
|
827
|
+
inputStyles: i,
|
|
828
|
+
required: d,
|
|
829
|
+
showLabel: c,
|
|
830
|
+
_multiple: u = !1
|
|
831
|
+
} = e, y = B();
|
|
832
|
+
return c ? /* @__PURE__ */ n.jsxs("div", { ...r, children: [
|
|
833
|
+
c && /* @__PURE__ */ n.jsx("label", { htmlFor: y, children: a }),
|
|
834
|
+
/* @__PURE__ */ n.jsxs("select", { ...i, id: y, required: d, multiple: u, name: t, children: [
|
|
835
|
+
/* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
|
|
836
|
+
M(e.options, (h) => /* @__PURE__ */ n.jsx(
|
|
841
837
|
"option",
|
|
842
838
|
{
|
|
843
|
-
selected:
|
|
839
|
+
selected: v(h, "selected", !1),
|
|
844
840
|
value: h.value,
|
|
845
841
|
dangerouslySetInnerHTML: { __html: h.label }
|
|
846
842
|
},
|
|
@@ -851,17 +847,17 @@ const Fe = (e) => {
|
|
|
851
847
|
"select",
|
|
852
848
|
{
|
|
853
849
|
id: y,
|
|
854
|
-
...
|
|
850
|
+
...r,
|
|
855
851
|
...l,
|
|
856
|
-
required:
|
|
857
|
-
multiple:
|
|
852
|
+
required: d,
|
|
853
|
+
multiple: u,
|
|
858
854
|
name: t,
|
|
859
855
|
children: [
|
|
860
|
-
/* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children:
|
|
861
|
-
|
|
856
|
+
/* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
|
|
857
|
+
M(e.options, (h) => /* @__PURE__ */ n.jsx(
|
|
862
858
|
"option",
|
|
863
859
|
{
|
|
864
|
-
selected:
|
|
860
|
+
selected: v(h, "selected", !1),
|
|
865
861
|
value: h.value,
|
|
866
862
|
dangerouslySetInnerHTML: { __html: h.label }
|
|
867
863
|
},
|
|
@@ -870,93 +866,91 @@ const Fe = (e) => {
|
|
|
870
866
|
]
|
|
871
867
|
}
|
|
872
868
|
);
|
|
873
|
-
},
|
|
869
|
+
}, ut = {
|
|
874
870
|
type: "Select",
|
|
875
871
|
label: "Select",
|
|
876
872
|
category: "core",
|
|
877
|
-
icon:
|
|
873
|
+
icon: ne,
|
|
878
874
|
group: "form",
|
|
879
|
-
hidden: !0,
|
|
880
875
|
props: {
|
|
881
|
-
styles:
|
|
882
|
-
fieldName:
|
|
876
|
+
styles: m({ default: "" }),
|
|
877
|
+
fieldName: b({ title: "Field Name", default: "select" }),
|
|
883
878
|
showLabel: g({ title: "Show label", default: !0 }),
|
|
884
|
-
inputStyles:
|
|
885
|
-
label:
|
|
886
|
-
placeholder:
|
|
879
|
+
inputStyles: m({ default: "w-full p-1" }),
|
|
880
|
+
label: b({ title: "Label", default: "Label" }),
|
|
881
|
+
placeholder: b({
|
|
887
882
|
title: "Placeholder",
|
|
888
883
|
default: "Placeholder"
|
|
889
884
|
}),
|
|
890
885
|
required: g({ title: "Required", default: !1 }),
|
|
891
886
|
_multiple: g({ title: "Multiple Choice", default: !1 }),
|
|
892
|
-
options:
|
|
887
|
+
options: O({
|
|
893
888
|
title: "Options",
|
|
894
889
|
itemProperties: {
|
|
895
|
-
label:
|
|
896
|
-
value:
|
|
890
|
+
label: b({ title: "Label", default: "" }),
|
|
891
|
+
value: b({ title: "Value", default: "" })
|
|
897
892
|
}
|
|
898
893
|
})
|
|
899
894
|
}
|
|
900
|
-
},
|
|
901
|
-
const { blockProps: l, fieldName: t, label: a, placeholder:
|
|
902
|
-
return
|
|
903
|
-
|
|
904
|
-
/* @__PURE__ */ n.jsx("textarea", { name: t, ...
|
|
895
|
+
}, pt = (e) => {
|
|
896
|
+
const { blockProps: l, fieldName: t, label: a, placeholder: s, styles: r, inputStyles: i, _rows: d, showLabel: c } = e, u = B();
|
|
897
|
+
return c ? /* @__PURE__ */ n.jsxs("div", { ...r, ...l, children: [
|
|
898
|
+
c && /* @__PURE__ */ n.jsx("label", { htmlFor: u, children: a }),
|
|
899
|
+
/* @__PURE__ */ n.jsx("textarea", { name: t, ...i, id: u, placeholder: s, rows: d })
|
|
905
900
|
] }) : /* @__PURE__ */ n.jsx(
|
|
906
901
|
"textarea",
|
|
907
902
|
{
|
|
908
|
-
id:
|
|
903
|
+
id: u,
|
|
909
904
|
name: t,
|
|
910
905
|
...l,
|
|
906
|
+
...i,
|
|
911
907
|
...r,
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
rows: c
|
|
908
|
+
placeholder: s,
|
|
909
|
+
rows: d
|
|
915
910
|
}
|
|
916
911
|
);
|
|
917
|
-
},
|
|
912
|
+
}, bt = {
|
|
918
913
|
type: "TextArea",
|
|
919
914
|
label: "TextArea",
|
|
920
915
|
category: "core",
|
|
921
|
-
icon:
|
|
916
|
+
icon: q,
|
|
922
917
|
group: "form",
|
|
923
|
-
hidden: !0,
|
|
924
918
|
props: {
|
|
925
|
-
fieldName:
|
|
919
|
+
fieldName: b({ title: "Field Name", default: "textarea" }),
|
|
926
920
|
showLabel: g({ title: "Show label", default: !0 }),
|
|
927
|
-
styles:
|
|
928
|
-
inputStyles:
|
|
929
|
-
label:
|
|
930
|
-
placeholder:
|
|
921
|
+
styles: m({ default: "" }),
|
|
922
|
+
inputStyles: m({ default: "w-full p-1" }),
|
|
923
|
+
label: b({ title: "Label", default: "Label" }),
|
|
924
|
+
placeholder: b({
|
|
931
925
|
title: "Placeholder",
|
|
932
926
|
default: "Placeholder"
|
|
933
927
|
}),
|
|
934
|
-
_rows:
|
|
928
|
+
_rows: L({ title: "Rows", default: 3 })
|
|
935
929
|
}
|
|
936
|
-
},
|
|
937
|
-
const { blockProps: l, fieldName: t, label: a, styles:
|
|
938
|
-
return
|
|
930
|
+
}, mt = (e) => {
|
|
931
|
+
const { blockProps: l, fieldName: t, label: a, styles: s, inputStyles: r, required: i, checked: d, showLabel: c = !0 } = e, u = B();
|
|
932
|
+
return c ? /* @__PURE__ */ n.jsxs("div", { ...s, ...l, children: [
|
|
939
933
|
/* @__PURE__ */ n.jsx(
|
|
940
934
|
"input",
|
|
941
935
|
{
|
|
942
|
-
...
|
|
936
|
+
...r,
|
|
943
937
|
name: t,
|
|
944
|
-
id:
|
|
938
|
+
id: u,
|
|
945
939
|
type: "checkbox",
|
|
946
|
-
required:
|
|
947
|
-
defaultChecked:
|
|
940
|
+
required: i,
|
|
941
|
+
defaultChecked: d
|
|
948
942
|
}
|
|
949
943
|
),
|
|
950
|
-
a && a !== "Label" && /* @__PURE__ */ n.jsx("label", { htmlFor:
|
|
944
|
+
a && a !== "Label" && /* @__PURE__ */ n.jsx("label", { htmlFor: u, children: a })
|
|
951
945
|
] }) : /* @__PURE__ */ n.jsx(
|
|
952
946
|
"input",
|
|
953
947
|
{
|
|
954
|
-
id:
|
|
948
|
+
id: u,
|
|
955
949
|
...l,
|
|
950
|
+
...r,
|
|
956
951
|
...s,
|
|
957
|
-
...o,
|
|
958
952
|
type: "checkbox",
|
|
959
|
-
required:
|
|
953
|
+
required: i,
|
|
960
954
|
name: t
|
|
961
955
|
}
|
|
962
956
|
);
|
|
@@ -964,19 +958,18 @@ const Fe = (e) => {
|
|
|
964
958
|
type: "Checkbox",
|
|
965
959
|
label: "Checkbox",
|
|
966
960
|
category: "core",
|
|
967
|
-
icon:
|
|
961
|
+
icon: re,
|
|
968
962
|
group: "form",
|
|
969
|
-
hidden: !0,
|
|
970
963
|
props: {
|
|
971
|
-
fieldName:
|
|
972
|
-
styles:
|
|
973
|
-
label:
|
|
964
|
+
fieldName: b({ title: "Field Name", default: "checkbox" }),
|
|
965
|
+
styles: m({ default: "flex items-center gap-x-2" }),
|
|
966
|
+
label: b({ title: "Label", default: "Label" }),
|
|
974
967
|
checked: g({ title: "Checked", default: !1 }),
|
|
975
968
|
required: g({ title: "Required", default: !1 })
|
|
976
969
|
}
|
|
977
|
-
},
|
|
978
|
-
|
|
970
|
+
}, It = () => {
|
|
971
|
+
p(pe, be), p(ge, ke), p(me, fe), p(we, _e), p(xe, ve), p(Ie, Be), p(Le, je), p(Ce, Se), p(Me, Ee), p(Ne, Pe), p($e, Te), p(Re, He), p(Ae, ze), p(Fe, De), p(he, ye), p(Ze, Je), p(lt, ot), p(st, at), p(nt, rt), p(mt, ft), p(it, ct), p(dt, ut), p(pt, bt), p(et, tt), p(Ke, Qe), p(Ue, Oe), p(Ge, We), p(Xe, Ye);
|
|
979
972
|
};
|
|
980
973
|
export {
|
|
981
|
-
|
|
974
|
+
It as loadWebBlocks
|
|
982
975
|
};
|