@chaibuilder/sdk 2.0.0-beta.2 → 2.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChaiThemeFn--DgGggh_.js +190 -0
- package/dist/ChaiThemeFn-bugxb1Cl.cjs +13 -0
- package/dist/{CodeEditor-xhb27i29.js → CodeEditor-7Cs6j_Wn.js} +14 -14
- package/dist/CodeEditor-Ifwz-vPV.cjs +1 -0
- package/dist/STRINGS-26RPxXyi.cjs +1 -0
- package/dist/STRINGS-BnWT5XcX.js +5 -0
- package/dist/Topbar-J_gRMjOQ.js +73 -0
- package/dist/Topbar-tTu3ihcy.cjs +1 -0
- package/dist/context-menu-4nQs6OxC.cjs +1 -0
- package/dist/{context-menu-I8woggB3.js → context-menu-oLipAPzI.js} +237 -254
- package/dist/core.cjs +61 -1
- package/dist/core.d.ts +56 -34
- package/dist/core.js +8598 -107
- package/dist/plugin-4xaTkTNB.cjs +1 -0
- package/dist/plugin-GuIj4Ul0.js +24 -0
- package/dist/render.cjs +2 -2
- package/dist/render.d.ts +34 -16
- package/dist/render.js +119 -121
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.d.ts +0 -1
- package/dist/runtime.js +0 -20
- package/dist/style.css +1 -1
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.d.ts +26 -25
- package/dist/tailwind.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +238 -223
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +1079 -703
- package/package.json +6 -9
- package/dist/CodeEditor-e9zXhHFt.cjs +0 -1
- package/dist/STRINGS-Xxstm-7I.js +0 -7
- package/dist/STRINGS-Yl7cSWDc.cjs +0 -1
- package/dist/Topbar-CofpLWzO.cjs +0 -1
- package/dist/Topbar-xrdjosmc.js +0 -160
- package/dist/context-menu-0lRey9QY.cjs +0 -1
- package/dist/controls-lEwMTdPQ.js +0 -234
- package/dist/controls-p9IwFnPx.cjs +0 -1
- package/dist/index-CHYv1sC2.cjs +0 -63
- package/dist/index-s4RPN00p.js +0 -8540
- package/dist/plugin-UiUFs2fK.js +0 -44
- package/dist/plugin-f6SDZ_Or.js +0 -108
- package/dist/plugin-jum1MjXp.cjs +0 -1
- package/dist/plugin-xOpS-UNV.cjs +0 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,350 +1,453 @@
|
|
|
1
|
-
import { registerChaiBlock as u } from "@chaibuilder/runtime";
|
|
2
|
-
import { j as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { GlobeIcon as ce } from "lucide-react";
|
|
1
|
+
import { registerChaiBlockSchema as p, StylesProp as c, registerChaiBlock as u } from "@chaibuilder/runtime";
|
|
2
|
+
import { j as r } from "./jsx-runtime-Sp0orL4X.js";
|
|
3
|
+
import * as y from "react";
|
|
4
|
+
import { c as I, G as E, g as w } from "./iconBase-Ief2hJUZ.js";
|
|
5
|
+
import { ButtonIcon as C, CodeIcon as T, HeadingIcon as $, TextIcon as N, CursorTextIcon as H, Link1Icon as z, ImageIcon as j, RowsIcon as R, ColumnsIcon as A, SketchLogoIcon as D, VideoIcon as q, DividerHorizontalIcon as F, MoonIcon as G, SpaceBetweenVerticallyIcon as V, InputIcon as S, RadiobuttonIcon as O, DropdownMenuIcon as U, CheckboxIcon as W, LetterCaseToggleIcon as X } from "@radix-ui/react-icons";
|
|
6
|
+
import { isNull as Y, isEmpty as b, get as v, pick as Z, omit as J, map as L } from "lodash-es";
|
|
7
|
+
import { GlobeIcon as K, GroupIcon as Q } from "lucide-react";
|
|
9
8
|
import "clsx";
|
|
10
9
|
import "tailwind-merge";
|
|
11
|
-
const
|
|
12
|
-
const { blockProps:
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
let
|
|
16
|
-
return
|
|
17
|
-
},
|
|
10
|
+
const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("div", { className: I("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ r.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ r.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, x = ee, te = (e) => {
|
|
11
|
+
const { blockProps: o, inBuilder: t, backgroundImage: n, children: l, tag: i = "div", styles: s } = e;
|
|
12
|
+
let a = l;
|
|
13
|
+
l || (a = /* @__PURE__ */ r.jsx(x, { inBuilder: t }));
|
|
14
|
+
let d = {};
|
|
15
|
+
return n && (d = { backgroundImage: `url(${n})` }), y.createElement(i, { ...o, ...s, style: d }, a);
|
|
16
|
+
}, oe = {
|
|
18
17
|
type: "Box",
|
|
19
|
-
label: "
|
|
18
|
+
label: "Box",
|
|
20
19
|
category: "core",
|
|
21
20
|
group: "basic",
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
21
|
+
...p({
|
|
22
|
+
properties: {
|
|
23
|
+
styles: c(""),
|
|
24
|
+
backgroundImage: {
|
|
25
|
+
type: "string",
|
|
26
|
+
default: "",
|
|
27
|
+
title: "Background Image",
|
|
28
|
+
ui: { "ui:widget": "image" }
|
|
29
|
+
},
|
|
30
|
+
tag: {
|
|
31
|
+
type: "string",
|
|
32
|
+
default: "div",
|
|
33
|
+
title: "Tag",
|
|
34
|
+
oneOf: [
|
|
35
|
+
{ const: "div", title: "div" },
|
|
36
|
+
{ const: "header", title: "header" },
|
|
37
|
+
{ const: "footer", title: "footer" },
|
|
38
|
+
{ const: "section", title: "section" },
|
|
39
|
+
{ const: "article", title: "article" },
|
|
40
|
+
{ const: "aside", title: "aside" },
|
|
41
|
+
{ const: "main", title: "main" },
|
|
42
|
+
{ const: "nav", title: "nav" },
|
|
43
|
+
{ const: "figure", title: "figure" },
|
|
44
|
+
{ const: "details", title: "details" },
|
|
45
|
+
{ const: "summary", title: "summary" },
|
|
46
|
+
{ const: "dialog", title: "dialog" },
|
|
47
|
+
{ const: "strike", title: "strike" },
|
|
48
|
+
{ const: "caption", title: "caption" },
|
|
49
|
+
{ const: "legend", title: "legend" },
|
|
50
|
+
{ const: "figcaption", title: "figcaption" },
|
|
51
|
+
{ const: "mark", title: "mark" }
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}),
|
|
49
56
|
canAcceptBlock: () => !0
|
|
50
|
-
},
|
|
51
|
-
const { blockProps:
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
57
|
+
}, le = (e) => {
|
|
58
|
+
const { blockProps: o, iconSize: t, icon: n, content: l, styles: i, children: s, iconPos: a } = e, d = n, g = s || /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
59
|
+
/* @__PURE__ */ r.jsx("span", { "data-ai-key": "content", children: l }),
|
|
60
|
+
d && /* @__PURE__ */ r.jsx(
|
|
54
61
|
"div",
|
|
55
62
|
{
|
|
56
63
|
style: { width: t + "px" },
|
|
57
|
-
className:
|
|
58
|
-
dangerouslySetInnerHTML: { __html:
|
|
64
|
+
className: a + " " + (a === "order-first" ? "mr-2" : "ml-2") || "",
|
|
65
|
+
dangerouslySetInnerHTML: { __html: d }
|
|
59
66
|
}
|
|
60
67
|
)
|
|
61
68
|
] });
|
|
62
|
-
return
|
|
69
|
+
return y.createElement(
|
|
63
70
|
"button",
|
|
64
71
|
{
|
|
65
|
-
...
|
|
66
|
-
...
|
|
72
|
+
...o,
|
|
73
|
+
...i,
|
|
67
74
|
type: "button"
|
|
68
75
|
},
|
|
69
|
-
|
|
76
|
+
g
|
|
70
77
|
);
|
|
71
|
-
},
|
|
78
|
+
}, ne = {
|
|
72
79
|
type: "Button",
|
|
73
|
-
label: "
|
|
80
|
+
label: "Button",
|
|
74
81
|
category: "core",
|
|
75
|
-
icon:
|
|
82
|
+
icon: C,
|
|
76
83
|
group: "basic",
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
84
|
+
...p({
|
|
85
|
+
properties: {
|
|
86
|
+
styles: c("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
|
|
87
|
+
content: {
|
|
88
|
+
type: "string",
|
|
89
|
+
title: "Button label",
|
|
90
|
+
default: "Button"
|
|
91
|
+
},
|
|
92
|
+
icon: {
|
|
93
|
+
type: "string",
|
|
94
|
+
title: "Icon",
|
|
95
|
+
default: "",
|
|
96
|
+
ui: { "ui:widget": "icon" }
|
|
97
|
+
},
|
|
98
|
+
iconSize: {
|
|
99
|
+
type: "number",
|
|
100
|
+
title: "Icon size",
|
|
101
|
+
default: 24
|
|
102
|
+
},
|
|
103
|
+
iconPos: {
|
|
104
|
+
type: "string",
|
|
105
|
+
title: "Icon position",
|
|
106
|
+
default: "order-last",
|
|
107
|
+
enum: ["order-first", "order-last"]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}),
|
|
111
|
+
i18nProps: ["content"],
|
|
112
|
+
aiProps: ["content"]
|
|
113
|
+
}, re = (e) => {
|
|
114
|
+
const { blockProps: o, styles: t, htmlCode: n, inBuilder: l } = e;
|
|
115
|
+
return l ? /* @__PURE__ */ r.jsxs("div", { className: "relative", children: [
|
|
116
|
+
l ? /* @__PURE__ */ r.jsx("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
117
|
+
y.createElement("div", {
|
|
96
118
|
...t,
|
|
97
|
-
dangerouslySetInnerHTML: { __html:
|
|
119
|
+
dangerouslySetInnerHTML: { __html: n.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
98
120
|
})
|
|
99
|
-
] }) :
|
|
100
|
-
...
|
|
121
|
+
] }) : y.createElement("div", {
|
|
122
|
+
...o,
|
|
101
123
|
...t,
|
|
102
|
-
dangerouslySetInnerHTML: { __html:
|
|
124
|
+
dangerouslySetInnerHTML: { __html: n }
|
|
103
125
|
});
|
|
104
|
-
},
|
|
126
|
+
}, ie = {
|
|
105
127
|
type: "CustomHTML",
|
|
106
128
|
label: "web_blocks.custom_html",
|
|
107
129
|
category: "core",
|
|
108
|
-
icon:
|
|
130
|
+
icon: T,
|
|
109
131
|
group: "advanced",
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
132
|
+
...p({
|
|
133
|
+
properties: {
|
|
134
|
+
styles: c(""),
|
|
135
|
+
htmlCode: {
|
|
136
|
+
type: "string",
|
|
137
|
+
default: "<div><p>Enter your HTML code here...</p></div>",
|
|
138
|
+
ui: { "ui:widget": "code" }
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
}, se = (e) => {
|
|
143
|
+
const { blockProps: o, styles: t, backgroundImage: n } = e;
|
|
144
|
+
let l = {};
|
|
145
|
+
return n && (l = { backgroundImage: `url(${n})` }), y.createElement("div", { ...o, ...t, style: l });
|
|
146
|
+
}, ae = {
|
|
125
147
|
type: "EmptyBox",
|
|
126
|
-
label: "
|
|
148
|
+
label: "Empty Box",
|
|
127
149
|
category: "core",
|
|
128
150
|
group: "basic",
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
151
|
+
...p({
|
|
152
|
+
properties: {
|
|
153
|
+
styles: c(""),
|
|
154
|
+
backgroundImage: {
|
|
155
|
+
type: "string",
|
|
156
|
+
title: "Background Image",
|
|
157
|
+
default: "",
|
|
158
|
+
ui: { "ui:widget": "image" }
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
})
|
|
162
|
+
}, ce = (e) => {
|
|
163
|
+
const { blockProps: o, styles: t, content: n, level: l = "h1", children: i = null } = e;
|
|
164
|
+
return i ? y.createElement(l, { ...t, ...o }, i) : y.createElement(l, {
|
|
136
165
|
...t,
|
|
137
|
-
...
|
|
138
|
-
|
|
139
|
-
"data-ai-type": "html",
|
|
140
|
-
dangerouslySetInnerHTML: { __html: o }
|
|
166
|
+
...o,
|
|
167
|
+
dangerouslySetInnerHTML: { __html: n }
|
|
141
168
|
});
|
|
142
|
-
},
|
|
169
|
+
}, de = {
|
|
143
170
|
type: "Heading",
|
|
144
171
|
label: "web_blocks.heading",
|
|
145
172
|
category: "core",
|
|
146
|
-
icon:
|
|
173
|
+
icon: $,
|
|
147
174
|
group: "typography",
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
},
|
|
175
|
+
...p({
|
|
176
|
+
properties: {
|
|
177
|
+
level: {
|
|
178
|
+
type: "string",
|
|
179
|
+
default: "h2",
|
|
180
|
+
title: "Level",
|
|
181
|
+
enum: ["h1", "h2", "h3", "h4", "h5", "h6"]
|
|
182
|
+
},
|
|
183
|
+
styles: c("text-3xl"),
|
|
184
|
+
content: {
|
|
185
|
+
type: "string",
|
|
186
|
+
default: "Heading goes here",
|
|
187
|
+
title: "Content",
|
|
188
|
+
ui: { "ui:widget": "textarea" }
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}),
|
|
192
|
+
aiProps: ["content"],
|
|
193
|
+
i18nProps: ["content"],
|
|
165
194
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
166
|
-
},
|
|
167
|
-
const { blockProps:
|
|
168
|
-
return
|
|
195
|
+
}, ue = (e) => {
|
|
196
|
+
const { blockProps: o, styles: t, content: n } = e;
|
|
197
|
+
return Y(e.children) ? y.createElement("p", {
|
|
169
198
|
...t,
|
|
170
|
-
...
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}) : b.createElement("p", { ...t, ...l }, e.children);
|
|
175
|
-
}, ve = {
|
|
199
|
+
...o,
|
|
200
|
+
dangerouslySetInnerHTML: { __html: n }
|
|
201
|
+
}) : y.createElement("p", { ...t, ...o }, e.children);
|
|
202
|
+
}, pe = {
|
|
176
203
|
type: "Paragraph",
|
|
177
204
|
label: "Paragraph",
|
|
178
205
|
category: "core",
|
|
179
|
-
icon:
|
|
206
|
+
icon: N,
|
|
180
207
|
group: "typography",
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
208
|
+
...p({
|
|
209
|
+
properties: {
|
|
210
|
+
styles: c(""),
|
|
211
|
+
content: {
|
|
212
|
+
type: "string",
|
|
213
|
+
title: "Content",
|
|
214
|
+
default: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
|
|
186
215
|
Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus
|
|
187
216
|
nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.`,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
},
|
|
217
|
+
ui: { "ui:widget": "textarea", "ui:autosize": !0, "ui:rows": 5 }
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}),
|
|
221
|
+
i18nProps: ["content"],
|
|
222
|
+
aiProps: ["content"],
|
|
192
223
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
193
|
-
},
|
|
194
|
-
const { blockProps:
|
|
195
|
-
return
|
|
224
|
+
}, ge = (e) => {
|
|
225
|
+
const { blockProps: o, styles: t, content: n, children: l = null, tag: i } = e;
|
|
226
|
+
return l ? y.createElement("span", { ...t, ...o }, l) : y.createElement(i || "span", {
|
|
196
227
|
...t,
|
|
197
|
-
...
|
|
198
|
-
|
|
199
|
-
dangerouslySetInnerHTML: { __html: o || "" }
|
|
228
|
+
...o,
|
|
229
|
+
dangerouslySetInnerHTML: { __html: n || "" }
|
|
200
230
|
});
|
|
201
|
-
},
|
|
231
|
+
}, ye = {
|
|
202
232
|
type: "Span",
|
|
203
233
|
label: "Span",
|
|
204
234
|
category: "core",
|
|
205
235
|
group: "typography",
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
{
|
|
216
|
-
"data-ai-key": "content",
|
|
217
|
-
"data-ai-type": "richtext",
|
|
218
|
-
...l,
|
|
219
|
-
...o,
|
|
220
|
-
dangerouslySetInnerHTML: { __html: t }
|
|
236
|
+
...p({
|
|
237
|
+
properties: {
|
|
238
|
+
styles: c(""),
|
|
239
|
+
content: {
|
|
240
|
+
type: "string",
|
|
241
|
+
title: "Content",
|
|
242
|
+
default: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
|
|
243
|
+
ui: { "ui:widget": "textarea", "ui:autosize": !0, "ui:rows": 3 }
|
|
244
|
+
}
|
|
221
245
|
}
|
|
222
|
-
|
|
223
|
-
|
|
246
|
+
}),
|
|
247
|
+
aiProps: ["content"],
|
|
248
|
+
i18nProps: ["content"],
|
|
249
|
+
canAcceptBlock: () => !0
|
|
250
|
+
}, me = (e) => {
|
|
251
|
+
const { blockProps: o, content: t, styles: n } = e;
|
|
252
|
+
return /* @__PURE__ */ r.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ r.jsx("div", { ...o, ...n, dangerouslySetInnerHTML: { __html: t } }) });
|
|
253
|
+
}, he = {
|
|
224
254
|
type: "RichText",
|
|
225
255
|
label: "Rich Text",
|
|
226
256
|
category: "core",
|
|
227
|
-
icon:
|
|
257
|
+
icon: H,
|
|
228
258
|
group: "typography",
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
259
|
+
...p({
|
|
260
|
+
properties: {
|
|
261
|
+
styles: c(""),
|
|
262
|
+
content: {
|
|
263
|
+
type: "string",
|
|
264
|
+
title: "Content",
|
|
265
|
+
default: "<p>This is a rich text block. You can add text, and other content here.</p>",
|
|
266
|
+
ui: { "ui:widget": "richtext" }
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}),
|
|
270
|
+
aiProps: ["content"],
|
|
271
|
+
i18nProps: ["content"]
|
|
272
|
+
}, fe = (e) => {
|
|
273
|
+
const { blockProps: o, link: t, children: n, styles: l, inBuilder: i, content: s } = e;
|
|
274
|
+
let a = {};
|
|
275
|
+
return !n && b(s) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), i ? n ? /* @__PURE__ */ r.jsx("span", { ...o, style: a, ...l, children: n }) : y.createElement(
|
|
242
276
|
"span",
|
|
243
277
|
{
|
|
278
|
+
...o,
|
|
244
279
|
...l,
|
|
245
|
-
|
|
246
|
-
style: i,
|
|
247
|
-
"data-ai-key": "content"
|
|
280
|
+
style: a
|
|
248
281
|
},
|
|
249
|
-
|
|
250
|
-
) :
|
|
282
|
+
s
|
|
283
|
+
) : n ? /* @__PURE__ */ r.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...o, ...l, children: n }) : y.createElement(
|
|
251
284
|
"a",
|
|
252
285
|
{
|
|
286
|
+
...o,
|
|
253
287
|
...l,
|
|
254
|
-
...a,
|
|
255
|
-
"data-ai-key": "content",
|
|
256
288
|
href: (t == null ? void 0 : t.href) || "#",
|
|
257
289
|
target: (t == null ? void 0 : t.target) || "_self"
|
|
258
290
|
},
|
|
259
|
-
|
|
291
|
+
s
|
|
260
292
|
);
|
|
261
|
-
},
|
|
293
|
+
}, be = {
|
|
262
294
|
type: "Link",
|
|
263
295
|
label: "Link",
|
|
264
296
|
category: "core",
|
|
265
|
-
icon:
|
|
297
|
+
icon: z,
|
|
266
298
|
group: "basic",
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
299
|
+
...p({
|
|
300
|
+
properties: {
|
|
301
|
+
styles: c(""),
|
|
302
|
+
content: {
|
|
303
|
+
type: "string",
|
|
304
|
+
default: "Link goes here",
|
|
305
|
+
title: "Content"
|
|
306
|
+
},
|
|
307
|
+
link: {
|
|
308
|
+
type: "object",
|
|
309
|
+
properties: {
|
|
310
|
+
type: { type: "string" },
|
|
311
|
+
href: { type: "string" },
|
|
312
|
+
target: { type: "string" }
|
|
313
|
+
},
|
|
314
|
+
default: {
|
|
315
|
+
type: "url",
|
|
316
|
+
href: "",
|
|
317
|
+
target: "_self"
|
|
318
|
+
},
|
|
319
|
+
ui: {
|
|
320
|
+
"ui:field": "link"
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}),
|
|
325
|
+
aiProps: ["content"],
|
|
326
|
+
i18nProps: ["content"],
|
|
275
327
|
canAcceptBlock: (e) => e !== "Link"
|
|
276
|
-
},
|
|
328
|
+
}, M = (e, ...o) => ({
|
|
277
329
|
...e,
|
|
278
|
-
className:
|
|
279
|
-
}),
|
|
280
|
-
const { blockProps:
|
|
281
|
-
if (!t &&
|
|
282
|
-
return /* @__PURE__ */
|
|
283
|
-
if (
|
|
284
|
-
return t ? /* @__PURE__ */
|
|
285
|
-
...
|
|
286
|
-
...
|
|
287
|
-
dangerouslySetInnerHTML: { __html:
|
|
330
|
+
className: I(e.className, ...o)
|
|
331
|
+
}), ke = (e) => {
|
|
332
|
+
const { blockProps: o, children: t, styles: n, inBuilder: l, content: i, href: s } = e, { hrefType: a, autoplay: d, maxWidth: g, backdropColor: h, galleryName: f } = e, m = M(n, "cb-lightbox");
|
|
333
|
+
if (!t && b(n == null ? void 0 : n.className) && b(i))
|
|
334
|
+
return /* @__PURE__ */ r.jsx(x, { inBuilder: l });
|
|
335
|
+
if (l)
|
|
336
|
+
return t ? /* @__PURE__ */ r.jsx("span", { ...o, ...m, children: t }) : y.createElement("span", {
|
|
337
|
+
...o,
|
|
338
|
+
...m,
|
|
339
|
+
dangerouslySetInnerHTML: { __html: i }
|
|
288
340
|
});
|
|
289
|
-
const
|
|
290
|
-
return
|
|
291
|
-
...
|
|
292
|
-
...
|
|
293
|
-
...
|
|
294
|
-
href:
|
|
295
|
-
dangerouslySetInnerHTML: { __html:
|
|
341
|
+
const k = {};
|
|
342
|
+
return k["data-vbtype"] = a, d && (k["data-autoplay"] = "true"), g && (k["data-maxwidth"] = g + "px"), h && (k["data-overlay"] = h), f && (k["data-gall"] = f), t ? /* @__PURE__ */ r.jsx("a", { ...k, href: s || "#/", ...o, ...m, children: t }) : y.createElement("a", {
|
|
343
|
+
...o,
|
|
344
|
+
...m,
|
|
345
|
+
...k,
|
|
346
|
+
href: s || "#",
|
|
347
|
+
dangerouslySetInnerHTML: { __html: i }
|
|
296
348
|
});
|
|
297
|
-
},
|
|
349
|
+
}, xe = {
|
|
298
350
|
type: "LightBoxLink",
|
|
299
351
|
label: "Lightbox Link",
|
|
300
352
|
category: "core",
|
|
301
|
-
icon:
|
|
353
|
+
icon: j,
|
|
302
354
|
group: "basic",
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
355
|
+
...p({
|
|
356
|
+
properties: {
|
|
357
|
+
styles: c(""),
|
|
358
|
+
content: {
|
|
359
|
+
type: "string",
|
|
360
|
+
title: "Content",
|
|
361
|
+
default: "Link text or drop blocks inside"
|
|
362
|
+
},
|
|
363
|
+
href: {
|
|
364
|
+
type: "string",
|
|
365
|
+
title: "Href",
|
|
366
|
+
default: ""
|
|
367
|
+
},
|
|
368
|
+
hrefType: {
|
|
369
|
+
type: "string",
|
|
370
|
+
title: "Type",
|
|
371
|
+
default: "video",
|
|
372
|
+
oneOf: [
|
|
373
|
+
{
|
|
374
|
+
type: "string",
|
|
375
|
+
title: "Video",
|
|
376
|
+
enum: ["video"]
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
type: "string",
|
|
380
|
+
title: "Iframe",
|
|
381
|
+
enum: ["iframe"]
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
type: "string",
|
|
385
|
+
title: "Inline",
|
|
386
|
+
enum: ["inline"]
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
type: "string",
|
|
390
|
+
title: "Ajax",
|
|
391
|
+
enum: ["ajax"]
|
|
392
|
+
}
|
|
393
|
+
]
|
|
394
|
+
},
|
|
395
|
+
autoplay: {
|
|
396
|
+
type: "boolean",
|
|
397
|
+
title: "Autoplay",
|
|
398
|
+
default: !1,
|
|
399
|
+
dependencies: {
|
|
400
|
+
hrefType: ["video"]
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
maxWidth: {
|
|
404
|
+
type: "number",
|
|
405
|
+
title: "Max Width",
|
|
406
|
+
default: ""
|
|
407
|
+
},
|
|
408
|
+
backdropColor: {
|
|
409
|
+
type: "string",
|
|
410
|
+
title: "Backdrop Color",
|
|
411
|
+
default: ""
|
|
412
|
+
},
|
|
413
|
+
galleryName: {
|
|
414
|
+
type: "string",
|
|
415
|
+
title: "Gallery Name",
|
|
416
|
+
default: ""
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}),
|
|
420
|
+
i18nProps: ["content"],
|
|
421
|
+
aiProps: ["content"],
|
|
322
422
|
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
323
|
-
},
|
|
324
|
-
const { blockProps:
|
|
325
|
-
return !t &&
|
|
326
|
-
|
|
327
|
-
{ ...
|
|
423
|
+
}, we = (e) => {
|
|
424
|
+
const { blockProps: o, children: t, listType: n, styles: l, tag: i, inBuilder: s } = e, a = I(v(l, "className", ""), n);
|
|
425
|
+
return !t && b(l == null ? void 0 : l.className) ? /* @__PURE__ */ r.jsx(x, { inBuilder: s }) : y.createElement(
|
|
426
|
+
i || (n === "list-decimal" ? "ol" : "ul"),
|
|
427
|
+
{ ...o, ...l, className: a },
|
|
328
428
|
t
|
|
329
429
|
);
|
|
330
|
-
},
|
|
430
|
+
}, ve = {
|
|
331
431
|
type: "List",
|
|
332
432
|
label: "web_blocks.list",
|
|
333
|
-
icon:
|
|
433
|
+
icon: R,
|
|
334
434
|
category: "core",
|
|
335
435
|
group: "basic",
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
436
|
+
...p({
|
|
437
|
+
properties: {
|
|
438
|
+
styles: c(""),
|
|
439
|
+
listType: {
|
|
440
|
+
type: "string",
|
|
441
|
+
title: "List Type",
|
|
442
|
+
default: "list-none",
|
|
443
|
+
oneOf: [
|
|
444
|
+
{ enum: ["list-none"], title: "List None" },
|
|
445
|
+
{ enum: ["list-disc"], title: "Disc" },
|
|
446
|
+
{ enum: ["list-decimal"], title: "Decimal" }
|
|
447
|
+
]
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}),
|
|
348
451
|
canAcceptBlock: (e) => e === "ListItem",
|
|
349
452
|
blocks: [
|
|
350
453
|
{ _type: "List", _id: "a", listType: "list-none", styles: "#styles:," },
|
|
@@ -370,189 +473,286 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
370
473
|
content: "Item 3"
|
|
371
474
|
}
|
|
372
475
|
]
|
|
373
|
-
},
|
|
374
|
-
const { blockProps:
|
|
375
|
-
return
|
|
476
|
+
}, Ie = (e) => {
|
|
477
|
+
const { blockProps: o, content: t, styles: n, children: l, tag: i } = e;
|
|
478
|
+
return l ? y.createElement(i || "li", { ...n, ...o }, l) : y.createElement(i || "li", {
|
|
479
|
+
...n,
|
|
376
480
|
...o,
|
|
377
|
-
...l,
|
|
378
|
-
"data-ai-key": "content",
|
|
379
481
|
dangerouslySetInnerHTML: { __html: t }
|
|
380
482
|
});
|
|
381
|
-
},
|
|
483
|
+
}, Le = {
|
|
382
484
|
type: "ListItem",
|
|
383
485
|
label: "List Item",
|
|
384
|
-
icon:
|
|
486
|
+
icon: A,
|
|
385
487
|
category: "core",
|
|
386
488
|
group: "basic",
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
489
|
+
...p({
|
|
490
|
+
properties: {
|
|
491
|
+
styles: c(""),
|
|
492
|
+
content: {
|
|
493
|
+
type: "string",
|
|
494
|
+
default: "List item",
|
|
495
|
+
title: "Content",
|
|
496
|
+
ui: {
|
|
497
|
+
"ui:widget": "textarea"
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}),
|
|
502
|
+
i18nProps: ["content"],
|
|
503
|
+
aiProps: ["content"],
|
|
391
504
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
392
505
|
canBeNested: (e) => e === "List"
|
|
393
|
-
},
|
|
394
|
-
const { blockProps:
|
|
395
|
-
if (
|
|
396
|
-
return /* @__PURE__ */
|
|
397
|
-
const
|
|
398
|
-
return
|
|
399
|
-
...
|
|
400
|
-
...
|
|
401
|
-
dangerouslySetInnerHTML: { __html:
|
|
506
|
+
}, _e = (e) => {
|
|
507
|
+
const { blockProps: o, icon: t, styles: n, width: l, inBuilder: i, height: s } = e, a = M(n, I(l ? `w-[${l}px]` : "", s ? `h-[${s}px]` : ""));
|
|
508
|
+
if (b(t))
|
|
509
|
+
return /* @__PURE__ */ r.jsx(x, { inBuilder: i, className: "h-8 w-14" });
|
|
510
|
+
const d = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
511
|
+
return y.createElement("span", {
|
|
512
|
+
...o,
|
|
513
|
+
...a,
|
|
514
|
+
dangerouslySetInnerHTML: { __html: d }
|
|
402
515
|
});
|
|
403
|
-
},
|
|
516
|
+
}, Be = {
|
|
404
517
|
type: "Icon",
|
|
405
518
|
label: "web_blocks.icon",
|
|
406
519
|
category: "core",
|
|
407
|
-
icon:
|
|
520
|
+
icon: D,
|
|
408
521
|
group: "media",
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
522
|
+
...p({
|
|
523
|
+
properties: {
|
|
524
|
+
styles: c("text-black"),
|
|
525
|
+
icon: {
|
|
526
|
+
type: "string",
|
|
527
|
+
title: "Icon",
|
|
528
|
+
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>',
|
|
529
|
+
ui: { "ui:widget": "icon" }
|
|
530
|
+
},
|
|
531
|
+
width: {
|
|
532
|
+
type: "number",
|
|
533
|
+
default: 16,
|
|
534
|
+
title: "Width"
|
|
535
|
+
},
|
|
536
|
+
height: {
|
|
537
|
+
type: "number",
|
|
538
|
+
default: 16,
|
|
539
|
+
title: "Height"
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
})
|
|
543
|
+
}, Pe = (e) => {
|
|
544
|
+
const { blockProps: o, image: t, styles: n, alt: l, height: i, width: s, lazyLoading: a } = e;
|
|
545
|
+
return b(t) ? /* @__PURE__ */ r.jsx(x, { className: "h-36" }) : y.createElement("img", {
|
|
422
546
|
...o,
|
|
547
|
+
...n,
|
|
423
548
|
src: t,
|
|
424
|
-
alt:
|
|
425
|
-
loading:
|
|
426
|
-
height:
|
|
427
|
-
width:
|
|
549
|
+
alt: l,
|
|
550
|
+
loading: a ? "lazy" : "eager",
|
|
551
|
+
height: i,
|
|
552
|
+
width: s
|
|
428
553
|
});
|
|
429
|
-
},
|
|
554
|
+
}, Ce = {
|
|
430
555
|
type: "Image",
|
|
431
556
|
label: "Image",
|
|
432
557
|
category: "core",
|
|
433
|
-
icon:
|
|
558
|
+
icon: j,
|
|
434
559
|
group: "media",
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
560
|
+
...p({
|
|
561
|
+
properties: {
|
|
562
|
+
styles: c(""),
|
|
563
|
+
image: {
|
|
564
|
+
type: "string",
|
|
565
|
+
title: "Image",
|
|
566
|
+
default: "https://fakeimg.pl/400x200?text=Choose&font=bebas",
|
|
567
|
+
ui: { "ui:widget": "image" }
|
|
568
|
+
},
|
|
569
|
+
alt: {
|
|
570
|
+
type: "string",
|
|
571
|
+
title: "Alt text",
|
|
572
|
+
default: "",
|
|
573
|
+
ui: { "ui:placeholder": "Enter alt text" }
|
|
574
|
+
},
|
|
575
|
+
lazyLoading: {
|
|
576
|
+
type: "boolean",
|
|
577
|
+
title: "Lazy Load",
|
|
578
|
+
default: !0
|
|
579
|
+
},
|
|
580
|
+
width: {
|
|
581
|
+
type: "number",
|
|
582
|
+
title: "Width",
|
|
583
|
+
default: "",
|
|
584
|
+
ui: { "ui:placeholder": "Enter width" }
|
|
585
|
+
},
|
|
586
|
+
height: {
|
|
587
|
+
type: "number",
|
|
588
|
+
title: "Height",
|
|
589
|
+
default: "",
|
|
590
|
+
ui: { "ui:placeholder": "Enter height" }
|
|
591
|
+
},
|
|
592
|
+
mobileImage: {
|
|
593
|
+
type: "string",
|
|
594
|
+
title: "Mobile Image",
|
|
595
|
+
default: "",
|
|
596
|
+
ui: { "ui:widget": "image" }
|
|
597
|
+
},
|
|
598
|
+
mobileWidth: {
|
|
599
|
+
type: "number",
|
|
600
|
+
title: "Mobile Width",
|
|
601
|
+
default: "",
|
|
602
|
+
ui: { "ui:placeholder": "Enter width" }
|
|
603
|
+
},
|
|
604
|
+
mobileHeight: {
|
|
605
|
+
type: "number",
|
|
606
|
+
title: "Mobile Height",
|
|
607
|
+
default: "",
|
|
608
|
+
ui: { "ui:placeholder": "Enter height" }
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}),
|
|
612
|
+
aiProps: ["alt"],
|
|
613
|
+
i18nProps: ["alt"]
|
|
614
|
+
}, _ = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, B = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, P = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, je = (e) => {
|
|
615
|
+
if (_.test(e)) {
|
|
616
|
+
const o = e.match(_);
|
|
617
|
+
return o ? `https://www.youtube.com/embed/${o[4]}` : e;
|
|
450
618
|
}
|
|
451
|
-
if (
|
|
452
|
-
const
|
|
453
|
-
return
|
|
619
|
+
if (B.test(e)) {
|
|
620
|
+
const o = e.match(B);
|
|
621
|
+
return o ? `https://player.vimeo.com/video/${o[3]}` : e;
|
|
454
622
|
}
|
|
455
|
-
if (
|
|
456
|
-
const
|
|
457
|
-
return
|
|
623
|
+
if (P.test(e)) {
|
|
624
|
+
const o = e.match(P);
|
|
625
|
+
return o ? `https://www.dailymotion.com/embed/video/${o[4]}` : e;
|
|
458
626
|
}
|
|
459
627
|
return null;
|
|
460
|
-
},
|
|
461
|
-
(
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
if (h) {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}
|
|
494
|
-
), De = {
|
|
628
|
+
}, Se = y.memo((e) => {
|
|
629
|
+
const { blockProps: o, inBuilder: t, styles: n, url: l, controls: i } = e, s = v(i, "autoPlay", !1), a = v(i, "controls", !1), d = s || v(i, "muted", !0), g = v(i, "loop", !1);
|
|
630
|
+
if (b(l))
|
|
631
|
+
return /* @__PURE__ */ r.jsx(x, { inBuilder: t, className: "h-36" });
|
|
632
|
+
let h = je(l), f = null;
|
|
633
|
+
if (h) {
|
|
634
|
+
if (!b(h)) {
|
|
635
|
+
const m = [];
|
|
636
|
+
m.push(`autoplay=${s ? 1 : 0}`), m.push(`controls=${i ? 1 : 0}`), m.push(`mute=${d ? 1 : 0}&muted=${d ? 1 : 0}`), m.push(`loop=${g ? 1 : 0}`), h = `${h}?${m.join("&")}`;
|
|
637
|
+
}
|
|
638
|
+
f = y.createElement("iframe", {
|
|
639
|
+
...o,
|
|
640
|
+
className: "absolute inset-0 w-full h-full",
|
|
641
|
+
src: h,
|
|
642
|
+
allow: t ? "" : "autoplay *; fullscreen *",
|
|
643
|
+
allowFullScreen: !0,
|
|
644
|
+
frameBorder: 0
|
|
645
|
+
});
|
|
646
|
+
} else
|
|
647
|
+
f = y.createElement("video", {
|
|
648
|
+
...o,
|
|
649
|
+
className: "absolute inset-0 w-full h-full",
|
|
650
|
+
src: l,
|
|
651
|
+
controls: a,
|
|
652
|
+
muted: d,
|
|
653
|
+
autoPlay: t ? !1 : s,
|
|
654
|
+
loop: g
|
|
655
|
+
});
|
|
656
|
+
return /* @__PURE__ */ r.jsx("div", { ...Z(n, ["className"]), children: /* @__PURE__ */ r.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
657
|
+
t ? /* @__PURE__ */ r.jsx("div", { ...o, ...J(n, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
658
|
+
f
|
|
659
|
+
] }) });
|
|
660
|
+
}), Me = {
|
|
495
661
|
type: "Video",
|
|
496
662
|
label: "Video",
|
|
497
663
|
category: "core",
|
|
498
|
-
icon:
|
|
664
|
+
icon: q,
|
|
499
665
|
group: "media",
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
666
|
+
...p({
|
|
667
|
+
properties: {
|
|
668
|
+
styles: c(""),
|
|
669
|
+
url: {
|
|
670
|
+
type: "string",
|
|
671
|
+
title: "Video URL",
|
|
672
|
+
default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
|
|
673
|
+
},
|
|
674
|
+
controls: {
|
|
675
|
+
type: "object",
|
|
676
|
+
title: "Controls",
|
|
677
|
+
default: {
|
|
678
|
+
autoplay: !1,
|
|
679
|
+
controls: !0,
|
|
680
|
+
loop: !1,
|
|
681
|
+
muted: !1
|
|
682
|
+
},
|
|
683
|
+
properties: {
|
|
684
|
+
autoplay: {
|
|
685
|
+
type: "boolean",
|
|
686
|
+
title: "Autoplay",
|
|
687
|
+
default: !1
|
|
688
|
+
},
|
|
689
|
+
controls: {
|
|
690
|
+
type: "boolean",
|
|
691
|
+
title: "Show Controls",
|
|
692
|
+
default: !0
|
|
693
|
+
},
|
|
694
|
+
loop: {
|
|
695
|
+
type: "boolean",
|
|
696
|
+
title: "Loop Video",
|
|
697
|
+
default: !1
|
|
698
|
+
},
|
|
699
|
+
muted: {
|
|
700
|
+
type: "boolean",
|
|
701
|
+
title: "Muted",
|
|
702
|
+
default: !1
|
|
703
|
+
}
|
|
704
|
+
}
|
|
514
705
|
}
|
|
515
|
-
}
|
|
516
|
-
}
|
|
706
|
+
}
|
|
707
|
+
}),
|
|
708
|
+
i18nProps: ["url"]
|
|
709
|
+
}, Ee = (e) => {
|
|
710
|
+
const { blockProps: o, styles: t } = e;
|
|
711
|
+
return y.createElement("hr", { ...t, ...o });
|
|
712
|
+
}, Te = {
|
|
713
|
+
type: "Divider",
|
|
714
|
+
label: "web_blocks.divider",
|
|
715
|
+
category: "core",
|
|
716
|
+
icon: F,
|
|
717
|
+
group: "basic",
|
|
718
|
+
...p({
|
|
719
|
+
properties: {
|
|
720
|
+
styles: c("bg-gray-900 h-0.5 py-2 my-1")
|
|
721
|
+
}
|
|
722
|
+
})
|
|
517
723
|
};
|
|
518
|
-
function
|
|
519
|
-
return
|
|
724
|
+
function $e(e) {
|
|
725
|
+
return E({ 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);
|
|
520
726
|
}
|
|
521
|
-
const
|
|
522
|
-
const { scripts:
|
|
523
|
-
return t ? /* @__PURE__ */
|
|
524
|
-
},
|
|
727
|
+
const Ne = (e) => {
|
|
728
|
+
const { scripts: o, inBuilder: t, blockProps: n } = e;
|
|
729
|
+
return t ? /* @__PURE__ */ r.jsx("div", { ...n, children: /* @__PURE__ */ r.jsx("div", { className: I("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ r.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ r.jsx("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__ */ r.jsx("div", { dangerouslySetInnerHTML: { __html: o } });
|
|
730
|
+
}, He = {
|
|
525
731
|
type: "CustomScript",
|
|
526
732
|
label: "web_blocks.custom_script",
|
|
527
733
|
category: "core",
|
|
528
|
-
icon:
|
|
734
|
+
icon: $e,
|
|
529
735
|
group: "advanced",
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
label: "web_blocks.divider",
|
|
543
|
-
category: "core",
|
|
544
|
-
icon: ee,
|
|
545
|
-
group: "basic",
|
|
546
|
-
props: {
|
|
547
|
-
styles: m({ default: "bg-gray-900 h-0.5 py-2 my-1" })
|
|
548
|
-
}
|
|
549
|
-
}, We = () => null, Xe = {
|
|
736
|
+
...p({
|
|
737
|
+
properties: {
|
|
738
|
+
scripts: {
|
|
739
|
+
type: "string",
|
|
740
|
+
title: "Script",
|
|
741
|
+
default: "",
|
|
742
|
+
format: "code",
|
|
743
|
+
placeholder: "<script>console.log('Hello, world!');<\/script>"
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
})
|
|
747
|
+
}, ze = (e) => null, Re = {
|
|
550
748
|
type: "Dark Mode",
|
|
551
749
|
label: "web_blocks.dark_mode",
|
|
552
750
|
category: "core",
|
|
553
|
-
icon:
|
|
751
|
+
icon: G,
|
|
554
752
|
group: "advanced",
|
|
555
|
-
|
|
753
|
+
...p({
|
|
754
|
+
properties: {}
|
|
755
|
+
}),
|
|
556
756
|
blocks: () => [
|
|
557
757
|
{ _id: "ultqCh", _type: "Span", tag: "span", styles: "#styles:,", _name: "Dark Mode Switcher" },
|
|
558
758
|
{
|
|
@@ -602,417 +802,593 @@ const Ge = (e) => {
|
|
|
602
802
|
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>"
|
|
603
803
|
}
|
|
604
804
|
]
|
|
605
|
-
},
|
|
606
|
-
const { blockProps:
|
|
607
|
-
return t && !
|
|
805
|
+
}, Ae = (e) => {
|
|
806
|
+
const { blockProps: o, inBuilder: t, children: n, globalBlock: l } = e;
|
|
807
|
+
return t && !l ? /* @__PURE__ */ r.jsxs(
|
|
608
808
|
"div",
|
|
609
809
|
{
|
|
610
810
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
611
|
-
...
|
|
811
|
+
...o,
|
|
612
812
|
children: [
|
|
613
|
-
/* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ r.jsxs("h1", { children: [
|
|
614
814
|
"Global Block - ",
|
|
615
|
-
|
|
815
|
+
l
|
|
616
816
|
] }),
|
|
617
|
-
/* @__PURE__ */
|
|
817
|
+
/* @__PURE__ */ r.jsx("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
618
818
|
]
|
|
619
819
|
}
|
|
620
|
-
) :
|
|
621
|
-
},
|
|
820
|
+
) : y.createElement("div", { ...o }, n);
|
|
821
|
+
}, De = {
|
|
622
822
|
type: "GlobalBlock",
|
|
623
823
|
label: "Global Block",
|
|
624
|
-
icon:
|
|
824
|
+
icon: K,
|
|
625
825
|
category: "core",
|
|
626
826
|
group: "advanced",
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
827
|
+
...p({
|
|
828
|
+
properties: {
|
|
829
|
+
globalBlock: {
|
|
830
|
+
type: "string",
|
|
831
|
+
title: "Global Block",
|
|
832
|
+
default: "",
|
|
833
|
+
ui: {
|
|
834
|
+
"ui:widget": "hidden"
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
})
|
|
839
|
+
}, qe = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ r.jsx("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Fe = {
|
|
631
840
|
type: "Text",
|
|
632
841
|
label: "Text",
|
|
633
842
|
hidden: !0,
|
|
634
843
|
category: "core",
|
|
635
844
|
group: "typography",
|
|
636
|
-
icon:
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
}
|
|
845
|
+
icon: V,
|
|
846
|
+
...p({
|
|
847
|
+
properties: {
|
|
848
|
+
styles: c("text-black"),
|
|
849
|
+
content: {
|
|
850
|
+
type: "string",
|
|
851
|
+
default: ""
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
}),
|
|
855
|
+
aiProps: ["content"],
|
|
856
|
+
i18nProps: ["content"]
|
|
857
|
+
}, Ge = (e) => {
|
|
858
|
+
const { blockProps: o, backgroundImage: t, children: n, styles: l, tag: i } = e;
|
|
859
|
+
let s = {};
|
|
860
|
+
return t && (s = { backgroundImage: `url(${t})` }), y.createElement(i || "div", { ...o, ...l, style: s }, n);
|
|
861
|
+
}, Ve = {
|
|
645
862
|
type: "Body",
|
|
646
863
|
label: "Body",
|
|
647
864
|
category: "core",
|
|
648
865
|
group: "basic",
|
|
649
866
|
hidden: !0,
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
867
|
+
...p({
|
|
868
|
+
properties: {
|
|
869
|
+
styles: c("font-body antialiased"),
|
|
870
|
+
backgroundImage: {
|
|
871
|
+
type: "string",
|
|
872
|
+
title: "Image",
|
|
873
|
+
default: "",
|
|
874
|
+
ui: { "ui:widget": "image" }
|
|
875
|
+
},
|
|
876
|
+
tag: {
|
|
877
|
+
type: "string",
|
|
878
|
+
default: "div",
|
|
879
|
+
title: "Tag",
|
|
880
|
+
oneOf: [
|
|
881
|
+
{ const: "div", title: "div" },
|
|
882
|
+
{ const: "header", title: "header" },
|
|
883
|
+
{ const: "footer", title: "footer" },
|
|
884
|
+
{ const: "section", title: "section" },
|
|
885
|
+
{ const: "article", title: "article" },
|
|
886
|
+
{ const: "aside", title: "aside" },
|
|
887
|
+
{ const: "main", title: "main" },
|
|
888
|
+
{ const: "nav", title: "nav" },
|
|
889
|
+
{ const: "figure", title: "figure" },
|
|
890
|
+
{ const: "details", title: "details" },
|
|
891
|
+
{ const: "summary", title: "summary" },
|
|
892
|
+
{ const: "dialog", title: "dialog" },
|
|
893
|
+
{ const: "strike", title: "strike" },
|
|
894
|
+
{ const: "caption", title: "caption" },
|
|
895
|
+
{ const: "legend", title: "legend" },
|
|
896
|
+
{ const: "figcaption", title: "figcaption" },
|
|
897
|
+
{ const: "mark", title: "mark" }
|
|
898
|
+
]
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}),
|
|
654
902
|
canAcceptBlock: () => !0,
|
|
655
903
|
canDelete: () => !1,
|
|
656
904
|
canMove: () => !1,
|
|
657
905
|
canDuplicate: () => !1
|
|
658
|
-
},
|
|
659
|
-
const { blockProps:
|
|
660
|
-
return
|
|
661
|
-
},
|
|
906
|
+
}, Oe = (e) => {
|
|
907
|
+
const { blockProps: o, styles: t } = e;
|
|
908
|
+
return y.createElement("br", { ...o, ...t });
|
|
909
|
+
}, Ue = {
|
|
662
910
|
type: "LineBreak",
|
|
663
911
|
label: "Line Break",
|
|
664
912
|
category: "core",
|
|
665
913
|
group: "basic",
|
|
666
914
|
hidden: !0,
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
},
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
915
|
+
...p({
|
|
916
|
+
properties: {
|
|
917
|
+
styles: c("")
|
|
918
|
+
}
|
|
919
|
+
}),
|
|
920
|
+
canAcceptBlock: () => !0,
|
|
921
|
+
canDelete: () => !1,
|
|
922
|
+
canMove: () => !1,
|
|
923
|
+
canDuplicate: () => !1
|
|
924
|
+
}, We = (e) => {
|
|
925
|
+
const { children: o, blockProps: t, errorMessage: n, successMessage: l, action: i, styles: s } = e;
|
|
926
|
+
let a = o;
|
|
927
|
+
o || (a = /* @__PURE__ */ r.jsx(x, {}));
|
|
928
|
+
const d = {
|
|
676
929
|
"x-data": "{}",
|
|
677
930
|
"x-on:submit.prevent": "post"
|
|
678
|
-
},
|
|
931
|
+
}, g = {
|
|
679
932
|
"x-html": "",
|
|
680
933
|
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
681
934
|
};
|
|
682
|
-
return /* @__PURE__ */
|
|
935
|
+
return /* @__PURE__ */ r.jsxs(
|
|
683
936
|
"form",
|
|
684
937
|
{
|
|
685
|
-
...
|
|
686
|
-
"data-error":
|
|
687
|
-
"data-success":
|
|
938
|
+
...d,
|
|
939
|
+
"data-error": n,
|
|
940
|
+
"data-success": l,
|
|
688
941
|
method: "post",
|
|
689
|
-
action:
|
|
690
|
-
...
|
|
691
|
-
...
|
|
942
|
+
action: i,
|
|
943
|
+
...t,
|
|
944
|
+
...s,
|
|
692
945
|
children: [
|
|
693
|
-
/* @__PURE__ */
|
|
694
|
-
|
|
695
|
-
d
|
|
946
|
+
/* @__PURE__ */ r.jsx("div", { ...g }),
|
|
947
|
+
a
|
|
696
948
|
]
|
|
697
949
|
}
|
|
698
950
|
);
|
|
699
|
-
},
|
|
951
|
+
}, Xe = {
|
|
700
952
|
type: "Form",
|
|
701
953
|
label: "Form",
|
|
702
954
|
category: "core",
|
|
703
|
-
icon:
|
|
955
|
+
icon: Q,
|
|
704
956
|
group: "form",
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
957
|
+
...p({
|
|
958
|
+
properties: {
|
|
959
|
+
styles: c(""),
|
|
960
|
+
action: {
|
|
961
|
+
type: "string",
|
|
962
|
+
title: "Submit URL",
|
|
963
|
+
default: "/api/form/submit"
|
|
964
|
+
},
|
|
965
|
+
errorMessage: {
|
|
966
|
+
type: "string",
|
|
967
|
+
title: "Error Message",
|
|
968
|
+
default: "Something went wrong. Please try again",
|
|
969
|
+
ui: { "ui:widget": "richtext" }
|
|
970
|
+
},
|
|
971
|
+
successMessage: {
|
|
972
|
+
type: "string",
|
|
973
|
+
title: "Success Message",
|
|
974
|
+
default: "Thank you for your submission.",
|
|
975
|
+
ui: { "ui:widget": "richtext" }
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
}),
|
|
979
|
+
i18nProps: ["errorMessage", "successMessage"],
|
|
980
|
+
aiProps: ["errorMessage", "successMessage"],
|
|
720
981
|
canAcceptBlock: () => !0
|
|
721
|
-
},
|
|
722
|
-
const { blockProps:
|
|
982
|
+
}, Ye = (e) => {
|
|
983
|
+
const { blockProps: o, inBuilder: t, label: n, styles: l, inputStyles: i, icon: s, iconSize: a, iconPos: d } = e, g = w(), h = {
|
|
723
984
|
"x-bind:disabled": "formLoading"
|
|
724
985
|
};
|
|
725
|
-
return /* @__PURE__ */
|
|
986
|
+
return /* @__PURE__ */ r.jsxs(
|
|
726
987
|
"button",
|
|
727
988
|
{
|
|
728
|
-
id:
|
|
729
|
-
...
|
|
730
|
-
...
|
|
731
|
-
...
|
|
732
|
-
...
|
|
989
|
+
id: g,
|
|
990
|
+
...h,
|
|
991
|
+
...i,
|
|
992
|
+
...l,
|
|
993
|
+
...o || {},
|
|
733
994
|
type: t ? "button" : "submit",
|
|
734
995
|
children: [
|
|
735
|
-
|
|
736
|
-
|
|
996
|
+
n,
|
|
997
|
+
s && /* @__PURE__ */ r.jsx(
|
|
998
|
+
"div",
|
|
999
|
+
{
|
|
1000
|
+
style: { width: a + "px" },
|
|
1001
|
+
className: d + " " + (d === "order-first" ? "mr-2" : "ml-2") || "",
|
|
1002
|
+
dangerouslySetInnerHTML: { __html: s }
|
|
1003
|
+
}
|
|
1004
|
+
)
|
|
737
1005
|
]
|
|
738
1006
|
}
|
|
739
1007
|
);
|
|
740
|
-
},
|
|
1008
|
+
}, Ze = {
|
|
741
1009
|
type: "FormButton",
|
|
742
1010
|
label: "Submit Button",
|
|
743
1011
|
category: "core",
|
|
744
|
-
icon:
|
|
1012
|
+
icon: C,
|
|
745
1013
|
group: "form",
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
required: i
|
|
786
|
-
}
|
|
787
|
-
)) : /* @__PURE__ */ s.jsxs("div", { ...a, ...l, children: [
|
|
788
|
-
n && /* @__PURE__ */ s.jsx("label", { htmlFor: f, children: t }),
|
|
789
|
-
/* @__PURE__ */ s.jsx(
|
|
1014
|
+
...p({
|
|
1015
|
+
properties: {
|
|
1016
|
+
styles: c(
|
|
1017
|
+
"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
|
|
1018
|
+
),
|
|
1019
|
+
inputStyles: c(""),
|
|
1020
|
+
label: {
|
|
1021
|
+
type: "string",
|
|
1022
|
+
title: "Label",
|
|
1023
|
+
default: "Submit",
|
|
1024
|
+
ai: !0,
|
|
1025
|
+
i18n: !0
|
|
1026
|
+
},
|
|
1027
|
+
icon: {
|
|
1028
|
+
type: "string",
|
|
1029
|
+
title: "Icon",
|
|
1030
|
+
default: "",
|
|
1031
|
+
ui: { "ui:widget": "icon" }
|
|
1032
|
+
},
|
|
1033
|
+
iconSize: {
|
|
1034
|
+
type: "number",
|
|
1035
|
+
title: "Icon size",
|
|
1036
|
+
default: 24
|
|
1037
|
+
},
|
|
1038
|
+
iconPos: {
|
|
1039
|
+
type: "string",
|
|
1040
|
+
title: "Icon Position",
|
|
1041
|
+
default: "order-last",
|
|
1042
|
+
enum: ["order-first", "order-last"]
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
}),
|
|
1046
|
+
i18nProps: ["label"],
|
|
1047
|
+
aiProps: ["label"]
|
|
1048
|
+
}, Je = (e) => {
|
|
1049
|
+
const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: i, inputStyles: s, showLabel: a, required: d, inputType: g } = e, h = w();
|
|
1050
|
+
return a ? /* @__PURE__ */ r.jsxs("div", { ...i, ...o, children: [
|
|
1051
|
+
a && /* @__PURE__ */ r.jsx("label", { htmlFor: h, children: n }),
|
|
1052
|
+
/* @__PURE__ */ r.jsx(
|
|
790
1053
|
"input",
|
|
791
1054
|
{
|
|
792
|
-
name:
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
required: i
|
|
1055
|
+
name: t,
|
|
1056
|
+
...s,
|
|
1057
|
+
id: h,
|
|
1058
|
+
type: g,
|
|
1059
|
+
placeholder: l,
|
|
1060
|
+
required: d
|
|
799
1061
|
}
|
|
800
1062
|
)
|
|
801
|
-
] })
|
|
802
|
-
|
|
1063
|
+
] }) : /* @__PURE__ */ r.jsx(
|
|
1064
|
+
"input",
|
|
1065
|
+
{
|
|
1066
|
+
id: h,
|
|
1067
|
+
name: t,
|
|
1068
|
+
...o,
|
|
1069
|
+
...s,
|
|
1070
|
+
...i,
|
|
1071
|
+
type: g,
|
|
1072
|
+
placeholder: l,
|
|
1073
|
+
required: d
|
|
1074
|
+
}
|
|
1075
|
+
);
|
|
1076
|
+
}, Ke = {
|
|
803
1077
|
type: "Input",
|
|
804
|
-
label: "
|
|
1078
|
+
label: "web_blocks.input",
|
|
805
1079
|
category: "core",
|
|
806
|
-
icon:
|
|
1080
|
+
icon: S,
|
|
807
1081
|
group: "form",
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
1082
|
+
...p({
|
|
1083
|
+
properties: {
|
|
1084
|
+
styles: c(""),
|
|
1085
|
+
inputStyles: c("w-full p-1"),
|
|
1086
|
+
showLabel: {
|
|
1087
|
+
type: "boolean",
|
|
1088
|
+
title: "Show Label",
|
|
1089
|
+
default: !0
|
|
1090
|
+
},
|
|
1091
|
+
label: {
|
|
1092
|
+
type: "string",
|
|
1093
|
+
title: "Label",
|
|
1094
|
+
default: "Label",
|
|
1095
|
+
ai: !0,
|
|
1096
|
+
i18n: !0
|
|
1097
|
+
},
|
|
1098
|
+
placeholder: {
|
|
1099
|
+
type: "string",
|
|
1100
|
+
title: "Placeholder",
|
|
1101
|
+
default: "Placeholder"
|
|
1102
|
+
},
|
|
1103
|
+
required: {
|
|
1104
|
+
type: "boolean",
|
|
1105
|
+
title: "Required",
|
|
1106
|
+
default: !1
|
|
1107
|
+
},
|
|
1108
|
+
inputType: {
|
|
1109
|
+
type: "string",
|
|
1110
|
+
title: "Input Type",
|
|
1111
|
+
default: "text",
|
|
1112
|
+
enum: [
|
|
1113
|
+
"text",
|
|
1114
|
+
"email",
|
|
1115
|
+
"password",
|
|
1116
|
+
"number",
|
|
1117
|
+
"tel",
|
|
1118
|
+
"file",
|
|
1119
|
+
"hidden",
|
|
1120
|
+
"range",
|
|
1121
|
+
"submit",
|
|
1122
|
+
"color",
|
|
1123
|
+
"date",
|
|
1124
|
+
"time"
|
|
1125
|
+
]
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
}),
|
|
1129
|
+
aiProps: ["label", "placeholder"],
|
|
1130
|
+
i18nProps: ["label", "placeholder"]
|
|
1131
|
+
}, Qe = (e) => {
|
|
1132
|
+
const { blockProps: o, fieldName: t, label: n, styles: l, inputStyles: i, required: s, checked: a, showLabel: d = !0 } = e, g = w();
|
|
1133
|
+
return d ? /* @__PURE__ */ r.jsxs("div", { ...l, ...o, children: [
|
|
1134
|
+
/* @__PURE__ */ r.jsx("input", { ...i, name: t, id: g, type: "radio", required: s, defaultChecked: a }),
|
|
1135
|
+
n && /* @__PURE__ */ r.jsx("label", { htmlFor: g, children: n })
|
|
1136
|
+
] }) : /* @__PURE__ */ r.jsx(
|
|
838
1137
|
"input",
|
|
839
1138
|
{
|
|
840
|
-
id:
|
|
1139
|
+
id: g,
|
|
1140
|
+
...o,
|
|
1141
|
+
...i,
|
|
841
1142
|
...l,
|
|
842
|
-
...r,
|
|
843
|
-
...a,
|
|
844
1143
|
type: "radio",
|
|
845
|
-
required:
|
|
846
|
-
checked:
|
|
1144
|
+
required: s,
|
|
1145
|
+
checked: a,
|
|
847
1146
|
name: t
|
|
848
1147
|
}
|
|
849
1148
|
);
|
|
850
|
-
},
|
|
1149
|
+
}, et = {
|
|
851
1150
|
type: "Radio",
|
|
852
1151
|
label: "web_blocks.radio",
|
|
853
1152
|
category: "core",
|
|
854
|
-
icon:
|
|
1153
|
+
icon: O,
|
|
855
1154
|
group: "form",
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
"option",
|
|
881
|
-
{
|
|
882
|
-
selected: w(f, "selected", !1),
|
|
883
|
-
value: f.value,
|
|
884
|
-
dangerouslySetInnerHTML: { __html: f.label }
|
|
885
|
-
},
|
|
886
|
-
f.value
|
|
887
|
-
))
|
|
888
|
-
] })
|
|
889
|
-
] }) : /* @__PURE__ */ s.jsxs(
|
|
890
|
-
"select",
|
|
891
|
-
{
|
|
892
|
-
id: h,
|
|
893
|
-
...r,
|
|
894
|
-
...l,
|
|
895
|
-
required: i,
|
|
896
|
-
multiple: d,
|
|
897
|
-
name: t,
|
|
898
|
-
children: [
|
|
899
|
-
/* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: a }),
|
|
900
|
-
M(e.options, (f) => /* @__PURE__ */ s.jsx(
|
|
901
|
-
"option",
|
|
902
|
-
{
|
|
903
|
-
selected: w(f, "selected", !1),
|
|
904
|
-
value: f.value,
|
|
905
|
-
dangerouslySetInnerHTML: { __html: f.label }
|
|
906
|
-
},
|
|
907
|
-
f.value
|
|
908
|
-
))
|
|
909
|
-
]
|
|
1155
|
+
...p({
|
|
1156
|
+
properties: {
|
|
1157
|
+
styles: c("flex items-center gap-x-2"),
|
|
1158
|
+
inputStyles: c(""),
|
|
1159
|
+
label: {
|
|
1160
|
+
type: "string",
|
|
1161
|
+
title: "Label",
|
|
1162
|
+
default: "Label"
|
|
1163
|
+
},
|
|
1164
|
+
checked: {
|
|
1165
|
+
type: "boolean",
|
|
1166
|
+
title: "Checked",
|
|
1167
|
+
default: !1
|
|
1168
|
+
},
|
|
1169
|
+
required: {
|
|
1170
|
+
type: "boolean",
|
|
1171
|
+
title: "Required",
|
|
1172
|
+
default: !1
|
|
1173
|
+
},
|
|
1174
|
+
showLabel: {
|
|
1175
|
+
type: "boolean",
|
|
1176
|
+
title: "Show Label",
|
|
1177
|
+
default: !0
|
|
1178
|
+
}
|
|
910
1179
|
}
|
|
911
|
-
)
|
|
912
|
-
|
|
1180
|
+
}),
|
|
1181
|
+
aiProps: ["label"],
|
|
1182
|
+
i18nProps: ["label"]
|
|
1183
|
+
}, tt = (e) => {
|
|
1184
|
+
const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: i, inputStyles: s, required: a, showLabel: d, _multiple: g, options: h } = e, f = w();
|
|
1185
|
+
return d ? /* @__PURE__ */ r.jsxs("div", { ...i, ...o, children: [
|
|
1186
|
+
d && /* @__PURE__ */ r.jsx("label", { htmlFor: f, children: n }),
|
|
1187
|
+
/* @__PURE__ */ r.jsxs("select", { ...s, id: f, required: a, multiple: g, name: t, children: [
|
|
1188
|
+
/* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: l }),
|
|
1189
|
+
L(h, (m) => /* @__PURE__ */ r.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
|
|
1190
|
+
] })
|
|
1191
|
+
] }) : /* @__PURE__ */ r.jsxs("select", { id: f, ...i, ...o, required: a, multiple: g, name: t, children: [
|
|
1192
|
+
/* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: l }),
|
|
1193
|
+
L(h, (m) => /* @__PURE__ */ r.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
|
|
1194
|
+
] });
|
|
1195
|
+
}, ot = {
|
|
913
1196
|
type: "Select",
|
|
914
1197
|
label: "web_blocks.select",
|
|
915
1198
|
category: "core",
|
|
916
|
-
icon:
|
|
1199
|
+
icon: U,
|
|
917
1200
|
group: "form",
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
1201
|
+
...p({
|
|
1202
|
+
properties: {
|
|
1203
|
+
styles: c(""),
|
|
1204
|
+
inputStyles: c("w-full p-1"),
|
|
1205
|
+
showLabel: {
|
|
1206
|
+
type: "boolean",
|
|
1207
|
+
title: "Show Label",
|
|
1208
|
+
default: !0
|
|
1209
|
+
},
|
|
1210
|
+
label: {
|
|
1211
|
+
type: "string",
|
|
1212
|
+
title: "Label",
|
|
1213
|
+
default: "Label"
|
|
1214
|
+
},
|
|
1215
|
+
placeholder: {
|
|
1216
|
+
type: "string",
|
|
1217
|
+
title: "Placeholder",
|
|
1218
|
+
default: "Placeholder"
|
|
1219
|
+
},
|
|
1220
|
+
required: {
|
|
1221
|
+
type: "boolean",
|
|
1222
|
+
title: "Required",
|
|
1223
|
+
default: !1
|
|
1224
|
+
},
|
|
1225
|
+
_multiple: {
|
|
1226
|
+
type: "boolean",
|
|
1227
|
+
title: "Multiple",
|
|
1228
|
+
default: !1
|
|
1229
|
+
},
|
|
1230
|
+
options: {
|
|
1231
|
+
title: "Options",
|
|
1232
|
+
type: "array",
|
|
1233
|
+
default: [],
|
|
1234
|
+
items: {
|
|
1235
|
+
type: "object",
|
|
1236
|
+
properties: {
|
|
1237
|
+
label: {
|
|
1238
|
+
type: "string",
|
|
1239
|
+
title: "Label",
|
|
1240
|
+
default: ""
|
|
1241
|
+
},
|
|
1242
|
+
value: {
|
|
1243
|
+
type: "string",
|
|
1244
|
+
title: "Value",
|
|
1245
|
+
default: ""
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
935
1249
|
}
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1250
|
+
}
|
|
1251
|
+
}),
|
|
1252
|
+
aiProps: ["label", "placeholder"],
|
|
1253
|
+
i18nProps: ["label", "placeholder"]
|
|
1254
|
+
}, lt = (e) => {
|
|
1255
|
+
const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: i, inputStyles: s, _rows: a, showLabel: d } = e, g = w();
|
|
1256
|
+
return d ? /* @__PURE__ */ r.jsxs("div", { ...i, ...o, children: [
|
|
1257
|
+
d && /* @__PURE__ */ r.jsx("label", { htmlFor: g, children: n }),
|
|
1258
|
+
/* @__PURE__ */ r.jsx("textarea", { name: t, ...s, id: g, placeholder: l, rows: a })
|
|
1259
|
+
] }) : /* @__PURE__ */ r.jsx(
|
|
944
1260
|
"textarea",
|
|
945
1261
|
{
|
|
946
|
-
id:
|
|
1262
|
+
id: g,
|
|
947
1263
|
name: t,
|
|
948
|
-
...
|
|
949
|
-
...
|
|
950
|
-
...
|
|
951
|
-
placeholder:
|
|
952
|
-
rows:
|
|
1264
|
+
...o,
|
|
1265
|
+
...s,
|
|
1266
|
+
...i,
|
|
1267
|
+
placeholder: l,
|
|
1268
|
+
rows: a
|
|
953
1269
|
}
|
|
954
1270
|
);
|
|
955
|
-
},
|
|
1271
|
+
}, nt = {
|
|
956
1272
|
type: "TextArea",
|
|
957
1273
|
label: "web_blocks.textarea",
|
|
958
1274
|
category: "core",
|
|
959
|
-
icon:
|
|
1275
|
+
icon: S,
|
|
960
1276
|
group: "form",
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1277
|
+
...p({
|
|
1278
|
+
properties: {
|
|
1279
|
+
styles: c(""),
|
|
1280
|
+
inputStyles: c("w-full p-1"),
|
|
1281
|
+
showLabel: {
|
|
1282
|
+
type: "boolean",
|
|
1283
|
+
title: "Show Label",
|
|
1284
|
+
default: !0
|
|
1285
|
+
},
|
|
1286
|
+
label: {
|
|
1287
|
+
type: "string",
|
|
1288
|
+
title: "Label",
|
|
1289
|
+
default: "Label",
|
|
1290
|
+
ui: { "ui:widget": "textarea", "ui:autosize": !0, "ui:rows": 3 }
|
|
1291
|
+
},
|
|
1292
|
+
placeholder: {
|
|
1293
|
+
type: "string",
|
|
1294
|
+
title: "Placeholder",
|
|
1295
|
+
default: "Placeholder"
|
|
1296
|
+
},
|
|
1297
|
+
_rows: {
|
|
1298
|
+
type: "number",
|
|
1299
|
+
title: "Rows",
|
|
1300
|
+
default: 3
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
}),
|
|
1304
|
+
aiProps: ["label", "placeholder"],
|
|
1305
|
+
i18nProps: ["label", "placeholder"]
|
|
1306
|
+
}, rt = (e) => {
|
|
1307
|
+
const { blockProps: o, fieldName: t, label: n, styles: l, inputStyles: i, required: s, checked: a, showLabel: d = !0 } = e, g = w();
|
|
1308
|
+
return d ? /* @__PURE__ */ r.jsxs("div", { ...l, ...o, children: [
|
|
1309
|
+
/* @__PURE__ */ r.jsx(
|
|
977
1310
|
"input",
|
|
978
1311
|
{
|
|
979
|
-
...
|
|
1312
|
+
...i,
|
|
980
1313
|
name: t,
|
|
981
|
-
id:
|
|
1314
|
+
id: g,
|
|
982
1315
|
type: "checkbox",
|
|
983
|
-
required:
|
|
984
|
-
defaultChecked:
|
|
1316
|
+
required: s,
|
|
1317
|
+
defaultChecked: a
|
|
985
1318
|
}
|
|
986
1319
|
),
|
|
987
|
-
|
|
988
|
-
] }) : /* @__PURE__ */
|
|
1320
|
+
n && /* @__PURE__ */ r.jsx("label", { htmlFor: g, children: n })
|
|
1321
|
+
] }) : /* @__PURE__ */ r.jsx(
|
|
989
1322
|
"input",
|
|
990
1323
|
{
|
|
991
|
-
id:
|
|
1324
|
+
id: g,
|
|
1325
|
+
...o,
|
|
1326
|
+
...i,
|
|
992
1327
|
...l,
|
|
993
|
-
...r,
|
|
994
|
-
...a,
|
|
995
1328
|
type: "checkbox",
|
|
996
|
-
required:
|
|
1329
|
+
required: s,
|
|
997
1330
|
name: t
|
|
998
1331
|
}
|
|
999
1332
|
);
|
|
1000
|
-
},
|
|
1333
|
+
}, it = {
|
|
1001
1334
|
type: "Checkbox",
|
|
1002
1335
|
label: "web_blocks.checkbox",
|
|
1003
1336
|
category: "core",
|
|
1004
|
-
icon:
|
|
1337
|
+
icon: W,
|
|
1005
1338
|
group: "form",
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1339
|
+
...p({
|
|
1340
|
+
properties: {
|
|
1341
|
+
styles: c("flex items-center gap-x-2"),
|
|
1342
|
+
inputStyles: c(""),
|
|
1343
|
+
label: {
|
|
1344
|
+
type: "string",
|
|
1345
|
+
title: "Label",
|
|
1346
|
+
default: "Label"
|
|
1347
|
+
},
|
|
1348
|
+
checked: {
|
|
1349
|
+
type: "boolean",
|
|
1350
|
+
title: "Checked",
|
|
1351
|
+
default: !1
|
|
1352
|
+
},
|
|
1353
|
+
required: {
|
|
1354
|
+
type: "boolean",
|
|
1355
|
+
title: "Required",
|
|
1356
|
+
default: !1
|
|
1357
|
+
},
|
|
1358
|
+
showLabel: {
|
|
1359
|
+
type: "boolean",
|
|
1360
|
+
title: "Show Label",
|
|
1361
|
+
default: !0
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
}),
|
|
1365
|
+
aiProps: ["label"],
|
|
1366
|
+
i18nProps: ["label"]
|
|
1367
|
+
}, st = (e) => {
|
|
1368
|
+
const { blockProps: o, content: t, styles: n, children: l } = e, i = { ...n, ...o };
|
|
1369
|
+
return l ? y.createElement("label", i, l) : y.createElement("label", {
|
|
1370
|
+
...i,
|
|
1371
|
+
dangerouslySetInnerHTML: { __html: t }
|
|
1372
|
+
});
|
|
1373
|
+
}, at = {
|
|
1374
|
+
type: "Label",
|
|
1375
|
+
label: "Label",
|
|
1376
|
+
category: "core",
|
|
1377
|
+
icon: X,
|
|
1378
|
+
group: "form",
|
|
1379
|
+
...p({
|
|
1380
|
+
properties: {
|
|
1381
|
+
styles: c(),
|
|
1382
|
+
content: {
|
|
1383
|
+
type: "string",
|
|
1384
|
+
title: "Content",
|
|
1385
|
+
default: ""
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
})
|
|
1389
|
+
}, ft = () => {
|
|
1390
|
+
u(te, oe), u(se, ae), u(le, ne), u(ce, de), u(ue, pe), u(ge, ye), u(me, he), u(fe, be), u(ke, xe), u(we, ve), u(Ie, Le), u(_e, Be), u(Pe, Ce), u(Se, Me), u(re, ie), u(Ne, He), u(qe, Fe), u(We, Xe), u(Ye, Ze), u(Je, Ke), u(rt, it), u(Qe, et), u(tt, ot), u(lt, nt), u(st, at), u(Oe, Ue), u(Ge, Ve), u(Ee, Te), u(ze, Re), u(Ae, De);
|
|
1015
1391
|
};
|
|
1016
1392
|
export {
|
|
1017
|
-
|
|
1393
|
+
ft as loadWebBlocks
|
|
1018
1394
|
};
|