@chaibuilder/sdk 2.0.0-beta.3 → 2.0.0-beta.30
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-0eH8iZVR.js → CodeEditor-4lhmWkV8.js} +18 -19
- package/dist/CodeEditor-TiCZr6Ta.cjs +1 -0
- package/dist/STRINGS-26RPxXyi.cjs +1 -0
- package/dist/STRINGS-BnWT5XcX.js +5 -0
- package/dist/Topbar-Rar8liE-.cjs +1 -0
- package/dist/Topbar-iARshVmF.js +72 -0
- package/dist/{context-menu-I8woggB3.js → context-menu-EDKTnqIV.js} +65 -65
- package/dist/core.cjs +61 -1
- package/dist/core.d.ts +89 -53
- package/dist/core.js +8829 -106
- 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 +118 -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.js +2 -2
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +1279 -684
- package/package.json +6 -9
- package/dist/CodeEditor-11MpHO6f.cjs +0 -1
- package/dist/STRINGS-Xxstm-7I.js +0 -7
- package/dist/STRINGS-Yl7cSWDc.cjs +0 -1
- package/dist/Topbar-mYNWDS80.js +0 -160
- package/dist/Topbar-wetkUwFe.cjs +0 -1
- package/dist/controls-lEwMTdPQ.js +0 -234
- package/dist/controls-p9IwFnPx.cjs +0 -1
- package/dist/index-ElguMY6B.js +0 -8540
- package/dist/index-kmPTldAW.cjs +0 -63
- 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,449 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { registerChaiBlockSchema as u, StylesProp as c, registerChaiBlock as d, closestBlockProp as S, runtimeProp as D } from "@chaibuilder/runtime";
|
|
2
2
|
import { j as s } from "./jsx-runtime-Sp0orL4X.js";
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { GlobeIcon as ce } from "lucide-react";
|
|
3
|
+
import * as m from "react";
|
|
4
|
+
import { c as _, G as A, g as v } from "./iconBase-Ief2hJUZ.js";
|
|
5
|
+
import { ButtonIcon as M, CodeIcon as R, HeadingIcon as z, TextIcon as H, CursorTextIcon as q, Link1Icon as F, ImageIcon as N, RowsIcon as G, ColumnsIcon as U, SketchLogoIcon as V, VideoIcon as O, DividerHorizontalIcon as W, MoonIcon as X, SpaceBetweenVerticallyIcon as Y, InputIcon as E, RadiobuttonIcon as Z, DropdownMenuIcon as $, CheckboxIcon as J, LetterCaseToggleIcon as K } from "@radix-ui/react-icons";
|
|
6
|
+
import { isEmpty as k, get as f, isNull as Q, pick as ee, omit as te, map as I } from "lodash-es";
|
|
7
|
+
import { GlobeIcon as oe, GroupIcon as le, Columns as ne, Rows as se } 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 re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s.jsx("div", { className: _("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ s.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, w = re, ie = (e) => {
|
|
11
|
+
const { blockProps: o, inBuilder: t, backgroundImage: l, children: n, tag: r = "div", styles: i } = e;
|
|
12
|
+
let a = n;
|
|
13
|
+
n || (a = /* @__PURE__ */ s.jsx(w, { inBuilder: t }));
|
|
14
|
+
let p = {};
|
|
15
|
+
return l && (p = { backgroundImage: `url(${l})` }), m.createElement(r, { ...o, ...i, style: p }, a);
|
|
16
|
+
}, ae = {
|
|
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
|
+
...u({
|
|
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__ */ s.jsx("span", { "data-ai-key": "content", children:
|
|
53
|
-
|
|
57
|
+
}, ce = (e) => {
|
|
58
|
+
const { blockProps: o, iconSize: t, icon: l, content: n, styles: r, children: i, iconPos: a, link: p, inBuilder: y } = e, h = l, b = i || /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
59
|
+
/* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", children: n }),
|
|
60
|
+
h && /* @__PURE__ */ s.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: h }
|
|
59
66
|
}
|
|
60
67
|
)
|
|
61
|
-
] })
|
|
62
|
-
return b.createElement(
|
|
68
|
+
] }), g = m.createElement(
|
|
63
69
|
"button",
|
|
64
70
|
{
|
|
65
|
-
...
|
|
66
|
-
...
|
|
71
|
+
...o,
|
|
72
|
+
...r,
|
|
67
73
|
type: "button"
|
|
68
74
|
},
|
|
69
|
-
|
|
75
|
+
b
|
|
70
76
|
);
|
|
71
|
-
},
|
|
77
|
+
return k(f(p, "href")) ? g : y ? /* @__PURE__ */ s.jsx("span", { children: g }) : /* @__PURE__ */ s.jsx("a", { href: f(p, "href") || "/", target: f(p, "target", "_self"), children: g });
|
|
78
|
+
}, pe = {
|
|
72
79
|
type: "Button",
|
|
73
|
-
label: "
|
|
80
|
+
label: "Button",
|
|
74
81
|
category: "core",
|
|
75
|
-
icon:
|
|
82
|
+
icon: M,
|
|
76
83
|
group: "basic",
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
84
|
+
...u({
|
|
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
|
+
link: {
|
|
110
|
+
type: "object",
|
|
111
|
+
properties: {
|
|
112
|
+
type: { type: "string" },
|
|
113
|
+
href: { type: "string" },
|
|
114
|
+
target: { type: "string" }
|
|
115
|
+
},
|
|
116
|
+
default: {
|
|
117
|
+
type: "url",
|
|
118
|
+
href: "",
|
|
119
|
+
target: "_self"
|
|
120
|
+
},
|
|
121
|
+
ui: {
|
|
122
|
+
"ui:field": "link"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}),
|
|
127
|
+
i18nProps: ["content"],
|
|
128
|
+
aiProps: ["content"]
|
|
129
|
+
}, de = (e) => {
|
|
130
|
+
const { blockProps: o, styles: t, htmlCode: l, inBuilder: n } = e;
|
|
131
|
+
return n ? /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
|
|
132
|
+
n ? /* @__PURE__ */ s.jsx("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
133
|
+
m.createElement("div", {
|
|
96
134
|
...t,
|
|
97
|
-
dangerouslySetInnerHTML: { __html:
|
|
135
|
+
dangerouslySetInnerHTML: { __html: l.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
98
136
|
})
|
|
99
|
-
] }) :
|
|
100
|
-
...
|
|
137
|
+
] }) : m.createElement("div", {
|
|
138
|
+
...o,
|
|
101
139
|
...t,
|
|
102
|
-
dangerouslySetInnerHTML: { __html:
|
|
140
|
+
dangerouslySetInnerHTML: { __html: l }
|
|
103
141
|
});
|
|
104
|
-
},
|
|
142
|
+
}, ue = {
|
|
105
143
|
type: "CustomHTML",
|
|
106
144
|
label: "web_blocks.custom_html",
|
|
107
145
|
category: "core",
|
|
108
|
-
icon:
|
|
146
|
+
icon: R,
|
|
109
147
|
group: "advanced",
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
148
|
+
...u({
|
|
149
|
+
properties: {
|
|
150
|
+
styles: c(""),
|
|
151
|
+
htmlCode: {
|
|
152
|
+
type: "string",
|
|
153
|
+
default: "<div><p>Enter your HTML code here...</p></div>",
|
|
154
|
+
ui: { "ui:widget": "code" }
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
})
|
|
158
|
+
}, ge = (e) => {
|
|
159
|
+
const { blockProps: o, styles: t, backgroundImage: l } = e;
|
|
160
|
+
let n = {};
|
|
161
|
+
return l && (n = { backgroundImage: `url(${l})` }), m.createElement("div", { ...o, ...t, style: n });
|
|
162
|
+
}, ye = {
|
|
125
163
|
type: "EmptyBox",
|
|
126
|
-
label: "
|
|
164
|
+
label: "Empty Box",
|
|
127
165
|
category: "core",
|
|
128
166
|
group: "basic",
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
167
|
+
...u({
|
|
168
|
+
properties: {
|
|
169
|
+
styles: c(""),
|
|
170
|
+
backgroundImage: {
|
|
171
|
+
type: "string",
|
|
172
|
+
title: "Background Image",
|
|
173
|
+
default: "",
|
|
174
|
+
ui: { "ui:widget": "image" }
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
}, me = (e) => {
|
|
179
|
+
const { blockProps: o, styles: t, content: l, tag: n = "h1", children: r = null } = e;
|
|
180
|
+
return r ? m.createElement(n, { ...t, ...o }, r) : m.createElement(n, {
|
|
136
181
|
...t,
|
|
137
|
-
...
|
|
138
|
-
|
|
139
|
-
"data-ai-type": "html",
|
|
140
|
-
dangerouslySetInnerHTML: { __html: o }
|
|
182
|
+
...o,
|
|
183
|
+
dangerouslySetInnerHTML: { __html: l }
|
|
141
184
|
});
|
|
142
|
-
},
|
|
185
|
+
}, he = {
|
|
143
186
|
type: "Heading",
|
|
144
187
|
label: "web_blocks.heading",
|
|
145
188
|
category: "core",
|
|
146
|
-
icon:
|
|
189
|
+
icon: z,
|
|
147
190
|
group: "typography",
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
},
|
|
191
|
+
...u({
|
|
192
|
+
properties: {
|
|
193
|
+
tag: {
|
|
194
|
+
type: "string",
|
|
195
|
+
default: "h2",
|
|
196
|
+
title: "Level",
|
|
197
|
+
enum: ["h1", "h2", "h3", "h4", "h5", "h6"]
|
|
198
|
+
},
|
|
199
|
+
styles: c("text-3xl"),
|
|
200
|
+
content: {
|
|
201
|
+
type: "string",
|
|
202
|
+
default: "Heading goes here",
|
|
203
|
+
title: "Content",
|
|
204
|
+
ui: { "ui:widget": "textarea" }
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}),
|
|
208
|
+
aiProps: ["content"],
|
|
209
|
+
i18nProps: ["content"],
|
|
165
210
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
166
|
-
},
|
|
167
|
-
const { blockProps:
|
|
168
|
-
return
|
|
211
|
+
}, fe = (e) => {
|
|
212
|
+
const { blockProps: o, styles: t, content: l } = e;
|
|
213
|
+
return Q(e.children) ? m.createElement("p", {
|
|
169
214
|
...t,
|
|
170
|
-
...
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}) : b.createElement("p", { ...t, ...l }, e.children);
|
|
175
|
-
}, ve = {
|
|
215
|
+
...o,
|
|
216
|
+
dangerouslySetInnerHTML: { __html: l }
|
|
217
|
+
}) : m.createElement("p", { ...t, ...o }, e.children);
|
|
218
|
+
}, be = {
|
|
176
219
|
type: "Paragraph",
|
|
177
220
|
label: "Paragraph",
|
|
178
221
|
category: "core",
|
|
179
|
-
icon:
|
|
222
|
+
icon: H,
|
|
180
223
|
group: "typography",
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
224
|
+
...u({
|
|
225
|
+
properties: {
|
|
226
|
+
styles: c(""),
|
|
227
|
+
content: {
|
|
228
|
+
type: "string",
|
|
229
|
+
title: "Content",
|
|
230
|
+
default: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
|
|
186
231
|
Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus
|
|
187
232
|
nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.`,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
},
|
|
233
|
+
ui: { "ui:widget": "textarea", "ui:autosize": !0, "ui:rows": 5 }
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}),
|
|
237
|
+
i18nProps: ["content"],
|
|
238
|
+
aiProps: ["content"],
|
|
192
239
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
193
|
-
},
|
|
194
|
-
const { blockProps:
|
|
195
|
-
return
|
|
240
|
+
}, ke = (e) => {
|
|
241
|
+
const { blockProps: o, styles: t, content: l, children: n = null, tag: r } = e;
|
|
242
|
+
return n ? m.createElement("span", { ...t, ...o }, n) : m.createElement(r || "span", {
|
|
196
243
|
...t,
|
|
197
|
-
...
|
|
198
|
-
|
|
199
|
-
dangerouslySetInnerHTML: { __html: o || "" }
|
|
244
|
+
...o,
|
|
245
|
+
dangerouslySetInnerHTML: { __html: l || "" }
|
|
200
246
|
});
|
|
201
|
-
},
|
|
247
|
+
}, xe = {
|
|
202
248
|
type: "Span",
|
|
203
249
|
label: "Span",
|
|
204
250
|
category: "core",
|
|
205
251
|
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 }
|
|
252
|
+
...u({
|
|
253
|
+
properties: {
|
|
254
|
+
styles: c(""),
|
|
255
|
+
content: {
|
|
256
|
+
type: "string",
|
|
257
|
+
title: "Content",
|
|
258
|
+
default: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
|
|
259
|
+
ui: { "ui:widget": "textarea", "ui:autosize": !0, "ui:rows": 3 }
|
|
260
|
+
}
|
|
221
261
|
}
|
|
222
|
-
|
|
223
|
-
|
|
262
|
+
}),
|
|
263
|
+
aiProps: ["content"],
|
|
264
|
+
i18nProps: ["content"],
|
|
265
|
+
canAcceptBlock: () => !0
|
|
266
|
+
}, we = (e) => {
|
|
267
|
+
const { blockProps: o, content: t, styles: l } = e;
|
|
268
|
+
return /* @__PURE__ */ s.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ s.jsx("div", { ...o, ...l, dangerouslySetInnerHTML: { __html: t } }) });
|
|
269
|
+
}, ve = {
|
|
224
270
|
type: "RichText",
|
|
225
271
|
label: "Rich Text",
|
|
226
272
|
category: "core",
|
|
227
|
-
icon:
|
|
273
|
+
icon: q,
|
|
228
274
|
group: "typography",
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
275
|
+
...u({
|
|
276
|
+
properties: {
|
|
277
|
+
styles: c(""),
|
|
278
|
+
content: {
|
|
279
|
+
type: "string",
|
|
280
|
+
title: "Content",
|
|
281
|
+
default: "<p>This is a rich text block. You can add text, and other content here.</p>",
|
|
282
|
+
ui: { "ui:widget": "richtext" }
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}),
|
|
286
|
+
aiProps: ["content"],
|
|
287
|
+
i18nProps: ["content"]
|
|
288
|
+
}, _e = (e) => {
|
|
289
|
+
const { blockProps: o, link: t, children: l, styles: n, inBuilder: r, content: i } = e;
|
|
290
|
+
let a = {};
|
|
291
|
+
return !l && k(i) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), r ? l ? /* @__PURE__ */ s.jsx("span", { ...o, style: a, ...n, children: l }) : m.createElement(
|
|
242
292
|
"span",
|
|
243
293
|
{
|
|
244
|
-
...
|
|
245
|
-
...
|
|
246
|
-
style:
|
|
247
|
-
"data-ai-key": "content"
|
|
294
|
+
...o,
|
|
295
|
+
...n,
|
|
296
|
+
style: a
|
|
248
297
|
},
|
|
249
|
-
|
|
250
|
-
) :
|
|
298
|
+
i
|
|
299
|
+
) : l ? /* @__PURE__ */ s.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...o, ...n, children: l }) : m.createElement(
|
|
251
300
|
"a",
|
|
252
301
|
{
|
|
253
|
-
...
|
|
254
|
-
...
|
|
255
|
-
"data-ai-key": "content",
|
|
302
|
+
...o,
|
|
303
|
+
...n,
|
|
256
304
|
href: (t == null ? void 0 : t.href) || "#",
|
|
257
305
|
target: (t == null ? void 0 : t.target) || "_self"
|
|
258
306
|
},
|
|
259
|
-
|
|
307
|
+
i
|
|
260
308
|
);
|
|
261
|
-
},
|
|
309
|
+
}, Be = {
|
|
262
310
|
type: "Link",
|
|
263
311
|
label: "Link",
|
|
264
312
|
category: "core",
|
|
265
|
-
icon:
|
|
313
|
+
icon: F,
|
|
266
314
|
group: "basic",
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
315
|
+
...u({
|
|
316
|
+
properties: {
|
|
317
|
+
styles: c(""),
|
|
318
|
+
content: {
|
|
319
|
+
type: "string",
|
|
320
|
+
default: "Link goes here",
|
|
321
|
+
title: "Content"
|
|
322
|
+
},
|
|
323
|
+
link: {
|
|
324
|
+
type: "object",
|
|
325
|
+
properties: {
|
|
326
|
+
type: { type: "string" },
|
|
327
|
+
href: { type: "string" },
|
|
328
|
+
target: { type: "string" }
|
|
329
|
+
},
|
|
330
|
+
default: {
|
|
331
|
+
type: "url",
|
|
332
|
+
href: "",
|
|
333
|
+
target: "_self"
|
|
334
|
+
},
|
|
335
|
+
ui: {
|
|
336
|
+
"ui:field": "link"
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}),
|
|
341
|
+
aiProps: ["content"],
|
|
342
|
+
i18nProps: ["content"],
|
|
275
343
|
canAcceptBlock: (e) => e !== "Link"
|
|
276
|
-
},
|
|
344
|
+
}, T = (e, ...o) => ({
|
|
277
345
|
...e,
|
|
278
|
-
className:
|
|
279
|
-
}),
|
|
280
|
-
const { blockProps:
|
|
281
|
-
if (!t && k(
|
|
282
|
-
return /* @__PURE__ */ s.jsx(
|
|
283
|
-
if (
|
|
284
|
-
return t ? /* @__PURE__ */ s.jsx("span", { ...
|
|
285
|
-
...
|
|
346
|
+
className: _(e.className, ...o)
|
|
347
|
+
}), Ce = (e) => {
|
|
348
|
+
const { blockProps: o, children: t, styles: l, inBuilder: n, content: r, href: i } = e, { hrefType: a, autoplay: p, maxWidth: y, backdropColor: h, galleryName: b } = e, g = T(l, "cb-lightbox");
|
|
349
|
+
if (!t && k(l == null ? void 0 : l.className) && k(r))
|
|
350
|
+
return /* @__PURE__ */ s.jsx(w, { inBuilder: n });
|
|
351
|
+
if (n)
|
|
352
|
+
return t ? /* @__PURE__ */ s.jsx("span", { ...o, ...g, children: t }) : m.createElement("span", {
|
|
353
|
+
...o,
|
|
286
354
|
...g,
|
|
287
355
|
dangerouslySetInnerHTML: { __html: r }
|
|
288
356
|
});
|
|
289
357
|
const x = {};
|
|
290
|
-
return x["data-vbtype"] =
|
|
291
|
-
...
|
|
358
|
+
return a !== "image" && (x["data-vbtype"] = a), p && (x["data-autoplay"] = "true"), y && (x["data-maxwidth"] = y + "px"), h && (x["data-overlay"] = h), b && (x["data-gall"] = b), t ? /* @__PURE__ */ s.jsx("a", { ...x, href: i || "#/", ...o, ...g, children: t }) : m.createElement("a", {
|
|
359
|
+
...o,
|
|
292
360
|
...g,
|
|
293
361
|
...x,
|
|
294
|
-
href:
|
|
362
|
+
href: i || "#",
|
|
295
363
|
dangerouslySetInnerHTML: { __html: r }
|
|
296
364
|
});
|
|
297
|
-
},
|
|
365
|
+
}, Ie = {
|
|
298
366
|
type: "LightBoxLink",
|
|
299
367
|
label: "Lightbox Link",
|
|
300
368
|
category: "core",
|
|
301
|
-
icon:
|
|
369
|
+
icon: N,
|
|
302
370
|
group: "basic",
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
371
|
+
...u({
|
|
372
|
+
properties: {
|
|
373
|
+
styles: c(""),
|
|
374
|
+
content: {
|
|
375
|
+
type: "string",
|
|
376
|
+
title: "Content",
|
|
377
|
+
default: "Link text or drop blocks inside"
|
|
378
|
+
},
|
|
379
|
+
hrefType: {
|
|
380
|
+
type: "string",
|
|
381
|
+
title: "Type",
|
|
382
|
+
default: "image",
|
|
383
|
+
enum: ["image", "video", "iframe", "inline", "ajax"],
|
|
384
|
+
enumNames: ["Image", "Video", "Iframe", "Inline", "Ajax"]
|
|
385
|
+
},
|
|
386
|
+
href: {
|
|
387
|
+
type: "string",
|
|
388
|
+
title: "Href",
|
|
389
|
+
default: ""
|
|
390
|
+
},
|
|
391
|
+
autoplay: {
|
|
392
|
+
type: "boolean",
|
|
393
|
+
title: "Autoplay (Video only)",
|
|
394
|
+
default: !1
|
|
395
|
+
},
|
|
396
|
+
maxWidth: {
|
|
397
|
+
type: "number",
|
|
398
|
+
title: "Max Width",
|
|
399
|
+
default: ""
|
|
400
|
+
},
|
|
401
|
+
backdropColor: {
|
|
402
|
+
type: "string",
|
|
403
|
+
title: "Backdrop Color",
|
|
404
|
+
default: ""
|
|
405
|
+
},
|
|
406
|
+
galleryName: {
|
|
407
|
+
type: "string",
|
|
408
|
+
title: "Gallery Name",
|
|
409
|
+
default: ""
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
dependencies: {
|
|
413
|
+
autoplay: ["hrefType", "video"]
|
|
414
|
+
}
|
|
415
|
+
}),
|
|
416
|
+
i18nProps: ["content"],
|
|
417
|
+
aiProps: ["content"],
|
|
322
418
|
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
323
|
-
},
|
|
324
|
-
const { blockProps:
|
|
325
|
-
return !t && k(
|
|
326
|
-
r || (
|
|
327
|
-
{ ...
|
|
419
|
+
}, Le = (e) => {
|
|
420
|
+
const { blockProps: o, children: t, listType: l, styles: n, tag: r, inBuilder: i } = e, a = _(f(n, "className", ""), l);
|
|
421
|
+
return !t && k(n == null ? void 0 : n.className) ? /* @__PURE__ */ s.jsx(w, { inBuilder: i }) : m.createElement(
|
|
422
|
+
r || (l === "list-decimal" ? "ol" : "ul"),
|
|
423
|
+
{ ...o, ...n, className: a },
|
|
328
424
|
t
|
|
329
425
|
);
|
|
330
|
-
},
|
|
426
|
+
}, je = {
|
|
331
427
|
type: "List",
|
|
332
428
|
label: "web_blocks.list",
|
|
333
|
-
icon:
|
|
429
|
+
icon: G,
|
|
334
430
|
category: "core",
|
|
335
431
|
group: "basic",
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
432
|
+
...u({
|
|
433
|
+
properties: {
|
|
434
|
+
styles: c(""),
|
|
435
|
+
listType: {
|
|
436
|
+
type: "string",
|
|
437
|
+
title: "List Type",
|
|
438
|
+
default: "list-none",
|
|
439
|
+
oneOf: [
|
|
440
|
+
{ enum: ["list-none"], title: "List None" },
|
|
441
|
+
{ enum: ["list-disc"], title: "Disc" },
|
|
442
|
+
{ enum: ["list-decimal"], title: "Decimal" }
|
|
443
|
+
]
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}),
|
|
348
447
|
canAcceptBlock: (e) => e === "ListItem",
|
|
349
448
|
blocks: [
|
|
350
449
|
{ _type: "List", _id: "a", listType: "list-none", styles: "#styles:," },
|
|
@@ -370,189 +469,280 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
370
469
|
content: "Item 3"
|
|
371
470
|
}
|
|
372
471
|
]
|
|
373
|
-
},
|
|
374
|
-
const { blockProps:
|
|
375
|
-
return
|
|
376
|
-
...o,
|
|
472
|
+
}, Pe = (e) => {
|
|
473
|
+
const { blockProps: o, content: t, styles: l, children: n, tag: r } = e;
|
|
474
|
+
return n ? m.createElement(r || "li", { ...l, ...o }, n) : m.createElement(r || "li", {
|
|
377
475
|
...l,
|
|
378
|
-
|
|
476
|
+
...o,
|
|
379
477
|
dangerouslySetInnerHTML: { __html: t }
|
|
380
478
|
});
|
|
381
|
-
},
|
|
479
|
+
}, Se = {
|
|
382
480
|
type: "ListItem",
|
|
383
481
|
label: "List Item",
|
|
384
|
-
icon:
|
|
482
|
+
icon: U,
|
|
385
483
|
category: "core",
|
|
386
484
|
group: "basic",
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
485
|
+
...u({
|
|
486
|
+
properties: {
|
|
487
|
+
styles: c(""),
|
|
488
|
+
content: {
|
|
489
|
+
type: "string",
|
|
490
|
+
default: "List item",
|
|
491
|
+
title: "Content",
|
|
492
|
+
ui: {
|
|
493
|
+
"ui:widget": "textarea"
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}),
|
|
498
|
+
i18nProps: ["content"],
|
|
499
|
+
aiProps: ["content"],
|
|
391
500
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
392
501
|
canBeNested: (e) => e === "List"
|
|
393
|
-
},
|
|
394
|
-
const { blockProps:
|
|
502
|
+
}, Me = (e) => {
|
|
503
|
+
const { blockProps: o, icon: t, styles: l, width: n, inBuilder: r, height: i } = e, a = T(l, _(n ? `w-[${n}px]` : "", i ? `h-[${i}px]` : ""));
|
|
395
504
|
if (k(t))
|
|
396
|
-
return /* @__PURE__ */ s.jsx(
|
|
397
|
-
const
|
|
398
|
-
return
|
|
399
|
-
...
|
|
400
|
-
...
|
|
401
|
-
dangerouslySetInnerHTML: { __html:
|
|
505
|
+
return /* @__PURE__ */ s.jsx(w, { inBuilder: r, className: "h-8 w-14" });
|
|
506
|
+
const p = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
507
|
+
return m.createElement("span", {
|
|
508
|
+
...o,
|
|
509
|
+
...a,
|
|
510
|
+
dangerouslySetInnerHTML: { __html: p }
|
|
402
511
|
});
|
|
403
|
-
},
|
|
512
|
+
}, Ne = {
|
|
404
513
|
type: "Icon",
|
|
405
514
|
label: "web_blocks.icon",
|
|
406
515
|
category: "core",
|
|
407
|
-
icon:
|
|
516
|
+
icon: V,
|
|
408
517
|
group: "media",
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}
|
|
518
|
+
...u({
|
|
519
|
+
properties: {
|
|
520
|
+
styles: c("text-black"),
|
|
521
|
+
icon: {
|
|
522
|
+
type: "string",
|
|
523
|
+
title: "Icon",
|
|
524
|
+
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>',
|
|
525
|
+
ui: { "ui:widget": "icon" }
|
|
526
|
+
},
|
|
527
|
+
width: {
|
|
528
|
+
type: "number",
|
|
529
|
+
default: 16,
|
|
530
|
+
title: "Width"
|
|
531
|
+
},
|
|
532
|
+
height: {
|
|
533
|
+
type: "number",
|
|
534
|
+
default: 16,
|
|
535
|
+
title: "Height"
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
})
|
|
539
|
+
}, Ee = (e) => {
|
|
540
|
+
const { blockProps: o, image: t, mobileImage: l, styles: n, alt: r, height: i, width: a, lazyLoading: p } = e;
|
|
541
|
+
return k(t) ? /* @__PURE__ */ s.jsx(w, { className: "h-36" }) : /* @__PURE__ */ s.jsxs("picture", { children: [
|
|
542
|
+
l && /* @__PURE__ */ s.jsx("source", { srcSet: l, media: "(max-width: 480px)" }),
|
|
543
|
+
/* @__PURE__ */ s.jsx(
|
|
544
|
+
"img",
|
|
545
|
+
{
|
|
546
|
+
...o,
|
|
547
|
+
...n,
|
|
548
|
+
src: t,
|
|
549
|
+
alt: r,
|
|
550
|
+
loading: p ? "lazy" : "eager",
|
|
551
|
+
width: a,
|
|
552
|
+
height: i
|
|
553
|
+
}
|
|
554
|
+
)
|
|
555
|
+
] });
|
|
556
|
+
}, $e = {
|
|
430
557
|
type: "Image",
|
|
431
558
|
label: "Image",
|
|
432
559
|
category: "core",
|
|
433
|
-
icon:
|
|
560
|
+
icon: N,
|
|
434
561
|
group: "media",
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
562
|
+
...u({
|
|
563
|
+
properties: {
|
|
564
|
+
styles: c(""),
|
|
565
|
+
image: {
|
|
566
|
+
type: "string",
|
|
567
|
+
title: "Image",
|
|
568
|
+
default: "https://fakeimg.pl/400x200?text=Choose&font=bebas",
|
|
569
|
+
ui: { "ui:widget": "image" }
|
|
570
|
+
},
|
|
571
|
+
alt: {
|
|
572
|
+
type: "string",
|
|
573
|
+
title: "Alt text",
|
|
574
|
+
default: "",
|
|
575
|
+
ui: { "ui:placeholder": "Enter alt text" }
|
|
576
|
+
},
|
|
577
|
+
lazyLoading: {
|
|
578
|
+
type: "boolean",
|
|
579
|
+
title: "Lazy Load",
|
|
580
|
+
default: !0
|
|
581
|
+
},
|
|
582
|
+
width: {
|
|
583
|
+
type: "number",
|
|
584
|
+
title: "Width",
|
|
585
|
+
default: "",
|
|
586
|
+
ui: { "ui:placeholder": "Enter width" }
|
|
587
|
+
},
|
|
588
|
+
height: {
|
|
589
|
+
type: "number",
|
|
590
|
+
title: "Height",
|
|
591
|
+
default: "",
|
|
592
|
+
ui: { "ui:placeholder": "Enter height" }
|
|
593
|
+
},
|
|
594
|
+
mobileImage: {
|
|
595
|
+
type: "string",
|
|
596
|
+
title: "Mobile Image",
|
|
597
|
+
default: "",
|
|
598
|
+
ui: { "ui:widget": "image" }
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}),
|
|
602
|
+
aiProps: ["alt"],
|
|
603
|
+
i18nProps: ["alt"]
|
|
604
|
+
}, L = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, j = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, P = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Te = (e) => {
|
|
605
|
+
if (L.test(e)) {
|
|
606
|
+
const o = e.match(L);
|
|
607
|
+
return o ? `https://www.youtube.com/embed/${o[4]}` : e;
|
|
450
608
|
}
|
|
451
|
-
if (
|
|
452
|
-
const
|
|
453
|
-
return
|
|
609
|
+
if (j.test(e)) {
|
|
610
|
+
const o = e.match(j);
|
|
611
|
+
return o ? `https://player.vimeo.com/video/${o[3]}` : e;
|
|
454
612
|
}
|
|
455
|
-
if (
|
|
456
|
-
const
|
|
457
|
-
return
|
|
613
|
+
if (P.test(e)) {
|
|
614
|
+
const o = e.match(P);
|
|
615
|
+
return o ? `https://www.dailymotion.com/embed/video/${o[4]}` : e;
|
|
458
616
|
}
|
|
459
617
|
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 = {
|
|
618
|
+
}, De = m.memo((e) => {
|
|
619
|
+
const { blockProps: o, inBuilder: t, styles: l, url: n, controls: r } = e, i = f(r, "autoPlay", !1), a = f(r, "controls", !1), p = i || f(r, "muted", !0), y = f(r, "loop", !1);
|
|
620
|
+
if (k(n))
|
|
621
|
+
return /* @__PURE__ */ s.jsx(w, { inBuilder: t, className: "h-36" });
|
|
622
|
+
let h = Te(n), b = null;
|
|
623
|
+
if (h) {
|
|
624
|
+
if (!k(h)) {
|
|
625
|
+
const g = [];
|
|
626
|
+
g.push(`autoplay=${i ? 1 : 0}`), g.push(`controls=${r ? 1 : 0}`), g.push(`mute=${p ? 1 : 0}&muted=${p ? 1 : 0}`), g.push(`loop=${y ? 1 : 0}`), h = `${h}?${g.join("&")}`;
|
|
627
|
+
}
|
|
628
|
+
b = m.createElement("iframe", {
|
|
629
|
+
...o,
|
|
630
|
+
className: "absolute inset-0 w-full h-full",
|
|
631
|
+
src: h,
|
|
632
|
+
allow: t ? "" : "autoplay *; fullscreen *",
|
|
633
|
+
allowFullScreen: !0,
|
|
634
|
+
frameBorder: 0
|
|
635
|
+
});
|
|
636
|
+
} else
|
|
637
|
+
b = m.createElement("video", {
|
|
638
|
+
...o,
|
|
639
|
+
className: "absolute inset-0 w-full h-full",
|
|
640
|
+
src: n,
|
|
641
|
+
controls: a,
|
|
642
|
+
muted: p,
|
|
643
|
+
autoPlay: t ? !1 : i,
|
|
644
|
+
loop: y
|
|
645
|
+
});
|
|
646
|
+
return /* @__PURE__ */ s.jsx("div", { ...ee(l, ["className"]), children: /* @__PURE__ */ s.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
647
|
+
t ? /* @__PURE__ */ s.jsx("div", { ...o, ...te(l, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
648
|
+
b
|
|
649
|
+
] }) });
|
|
650
|
+
}), Ae = {
|
|
495
651
|
type: "Video",
|
|
496
652
|
label: "Video",
|
|
497
653
|
category: "core",
|
|
498
|
-
icon:
|
|
654
|
+
icon: O,
|
|
499
655
|
group: "media",
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
656
|
+
...u({
|
|
657
|
+
properties: {
|
|
658
|
+
styles: c(""),
|
|
659
|
+
url: {
|
|
660
|
+
type: "string",
|
|
661
|
+
title: "Video URL",
|
|
662
|
+
default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
|
|
663
|
+
},
|
|
664
|
+
controls: {
|
|
665
|
+
type: "object",
|
|
666
|
+
title: "Controls",
|
|
667
|
+
default: {
|
|
668
|
+
autoplay: !1,
|
|
669
|
+
controls: !0,
|
|
670
|
+
loop: !1,
|
|
671
|
+
muted: !1
|
|
672
|
+
},
|
|
673
|
+
properties: {
|
|
674
|
+
autoplay: {
|
|
675
|
+
type: "boolean",
|
|
676
|
+
title: "Autoplay",
|
|
677
|
+
default: !1
|
|
678
|
+
},
|
|
679
|
+
controls: {
|
|
680
|
+
type: "boolean",
|
|
681
|
+
title: "Show Controls",
|
|
682
|
+
default: !0
|
|
683
|
+
},
|
|
684
|
+
loop: {
|
|
685
|
+
type: "boolean",
|
|
686
|
+
title: "Loop Video",
|
|
687
|
+
default: !1
|
|
688
|
+
},
|
|
689
|
+
muted: {
|
|
690
|
+
type: "boolean",
|
|
691
|
+
title: "Muted",
|
|
692
|
+
default: !1
|
|
693
|
+
}
|
|
694
|
+
}
|
|
514
695
|
}
|
|
515
|
-
}
|
|
516
|
-
}
|
|
696
|
+
}
|
|
697
|
+
}),
|
|
698
|
+
i18nProps: ["url"]
|
|
699
|
+
}, Re = (e) => {
|
|
700
|
+
const { blockProps: o, styles: t } = e;
|
|
701
|
+
return m.createElement("hr", { ...t, ...o });
|
|
702
|
+
}, ze = {
|
|
703
|
+
type: "Divider",
|
|
704
|
+
label: "web_blocks.divider",
|
|
705
|
+
category: "core",
|
|
706
|
+
icon: W,
|
|
707
|
+
group: "basic",
|
|
708
|
+
...u({
|
|
709
|
+
properties: {
|
|
710
|
+
styles: c("bg-gray-900 h-0.5 py-2 my-1")
|
|
711
|
+
}
|
|
712
|
+
})
|
|
517
713
|
};
|
|
518
|
-
function
|
|
519
|
-
return
|
|
714
|
+
function He(e) {
|
|
715
|
+
return A({ 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
716
|
}
|
|
521
|
-
const
|
|
522
|
-
const { scripts:
|
|
523
|
-
return t ? /* @__PURE__ */ s.jsx("div", { ...
|
|
524
|
-
},
|
|
717
|
+
const qe = (e) => {
|
|
718
|
+
const { scripts: o, inBuilder: t, blockProps: l } = e;
|
|
719
|
+
return t ? /* @__PURE__ */ s.jsx("div", { ...l, children: /* @__PURE__ */ s.jsx("div", { className: _("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ s.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__ */ s.jsx("div", { dangerouslySetInnerHTML: { __html: o } });
|
|
720
|
+
}, Fe = {
|
|
525
721
|
type: "CustomScript",
|
|
526
722
|
label: "web_blocks.custom_script",
|
|
527
723
|
category: "core",
|
|
528
|
-
icon:
|
|
724
|
+
icon: He,
|
|
529
725
|
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 = {
|
|
726
|
+
...u({
|
|
727
|
+
properties: {
|
|
728
|
+
scripts: {
|
|
729
|
+
type: "string",
|
|
730
|
+
title: "Script",
|
|
731
|
+
default: "",
|
|
732
|
+
format: "code",
|
|
733
|
+
placeholder: "<script>console.log('Hello, world!');<\/script>"
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
})
|
|
737
|
+
}, Ge = (e) => null, Ue = {
|
|
550
738
|
type: "Dark Mode",
|
|
551
739
|
label: "web_blocks.dark_mode",
|
|
552
740
|
category: "core",
|
|
553
|
-
icon:
|
|
741
|
+
icon: X,
|
|
554
742
|
group: "advanced",
|
|
555
|
-
|
|
743
|
+
...u({
|
|
744
|
+
properties: {}
|
|
745
|
+
}),
|
|
556
746
|
blocks: () => [
|
|
557
747
|
{ _id: "ultqCh", _type: "Span", tag: "span", styles: "#styles:,", _name: "Dark Mode Switcher" },
|
|
558
748
|
{
|
|
@@ -602,417 +792,822 @@ const Ge = (e) => {
|
|
|
602
792
|
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
793
|
}
|
|
604
794
|
]
|
|
605
|
-
},
|
|
606
|
-
const { blockProps:
|
|
607
|
-
return t && !
|
|
795
|
+
}, Ve = (e) => {
|
|
796
|
+
const { blockProps: o, inBuilder: t, children: l, globalBlock: n } = e;
|
|
797
|
+
return t && !n ? /* @__PURE__ */ s.jsxs(
|
|
608
798
|
"div",
|
|
609
799
|
{
|
|
610
800
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
611
|
-
...
|
|
801
|
+
...o,
|
|
612
802
|
children: [
|
|
613
803
|
/* @__PURE__ */ s.jsxs("h1", { children: [
|
|
614
804
|
"Global Block - ",
|
|
615
|
-
|
|
805
|
+
n
|
|
616
806
|
] }),
|
|
617
807
|
/* @__PURE__ */ s.jsx("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
618
808
|
]
|
|
619
809
|
}
|
|
620
|
-
) :
|
|
621
|
-
},
|
|
810
|
+
) : m.createElement("div", { ...o }, l);
|
|
811
|
+
}, Oe = {
|
|
622
812
|
type: "GlobalBlock",
|
|
623
813
|
label: "Global Block",
|
|
624
|
-
icon:
|
|
814
|
+
icon: oe,
|
|
625
815
|
category: "core",
|
|
626
816
|
group: "advanced",
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
817
|
+
...u({
|
|
818
|
+
properties: {
|
|
819
|
+
globalBlock: {
|
|
820
|
+
type: "string",
|
|
821
|
+
title: "Global Block",
|
|
822
|
+
default: "",
|
|
823
|
+
ui: {
|
|
824
|
+
"ui:widget": "hidden"
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
})
|
|
829
|
+
}, We = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s.jsx("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Xe = {
|
|
631
830
|
type: "Text",
|
|
632
831
|
label: "Text",
|
|
633
832
|
hidden: !0,
|
|
634
833
|
category: "core",
|
|
635
834
|
group: "typography",
|
|
636
|
-
icon:
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
}
|
|
835
|
+
icon: Y,
|
|
836
|
+
...u({
|
|
837
|
+
properties: {
|
|
838
|
+
styles: c("text-black"),
|
|
839
|
+
content: {
|
|
840
|
+
type: "string",
|
|
841
|
+
default: ""
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
}),
|
|
845
|
+
aiProps: ["content"],
|
|
846
|
+
i18nProps: ["content"]
|
|
847
|
+
}, Ye = (e) => {
|
|
848
|
+
const { blockProps: o, backgroundImage: t, children: l, styles: n, tag: r } = e;
|
|
849
|
+
let i = {};
|
|
850
|
+
return t && (i = { backgroundImage: `url(${t})` }), m.createElement(r || "div", { ...o, ...n, style: i }, l);
|
|
851
|
+
}, Ze = {
|
|
645
852
|
type: "Body",
|
|
646
853
|
label: "Body",
|
|
647
854
|
category: "core",
|
|
648
855
|
group: "basic",
|
|
649
856
|
hidden: !0,
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
857
|
+
...u({
|
|
858
|
+
properties: {
|
|
859
|
+
styles: c("font-body antialiased"),
|
|
860
|
+
backgroundImage: {
|
|
861
|
+
type: "string",
|
|
862
|
+
title: "Image",
|
|
863
|
+
default: "",
|
|
864
|
+
ui: { "ui:widget": "image" }
|
|
865
|
+
},
|
|
866
|
+
tag: {
|
|
867
|
+
type: "string",
|
|
868
|
+
default: "div",
|
|
869
|
+
title: "Tag",
|
|
870
|
+
oneOf: [
|
|
871
|
+
{ const: "div", title: "div" },
|
|
872
|
+
{ const: "header", title: "header" },
|
|
873
|
+
{ const: "footer", title: "footer" },
|
|
874
|
+
{ const: "section", title: "section" },
|
|
875
|
+
{ const: "article", title: "article" },
|
|
876
|
+
{ const: "aside", title: "aside" },
|
|
877
|
+
{ const: "main", title: "main" },
|
|
878
|
+
{ const: "nav", title: "nav" },
|
|
879
|
+
{ const: "figure", title: "figure" },
|
|
880
|
+
{ const: "details", title: "details" },
|
|
881
|
+
{ const: "summary", title: "summary" },
|
|
882
|
+
{ const: "dialog", title: "dialog" },
|
|
883
|
+
{ const: "strike", title: "strike" },
|
|
884
|
+
{ const: "caption", title: "caption" },
|
|
885
|
+
{ const: "legend", title: "legend" },
|
|
886
|
+
{ const: "figcaption", title: "figcaption" },
|
|
887
|
+
{ const: "mark", title: "mark" }
|
|
888
|
+
]
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
}),
|
|
654
892
|
canAcceptBlock: () => !0,
|
|
655
893
|
canDelete: () => !1,
|
|
656
894
|
canMove: () => !1,
|
|
657
895
|
canDuplicate: () => !1
|
|
658
|
-
},
|
|
659
|
-
const { blockProps:
|
|
660
|
-
return
|
|
661
|
-
},
|
|
896
|
+
}, Je = (e) => {
|
|
897
|
+
const { blockProps: o, styles: t } = e;
|
|
898
|
+
return m.createElement("br", { ...o, ...t });
|
|
899
|
+
}, Ke = {
|
|
662
900
|
type: "LineBreak",
|
|
663
901
|
label: "Line Break",
|
|
664
902
|
category: "core",
|
|
665
903
|
group: "basic",
|
|
666
904
|
hidden: !0,
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
},
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
905
|
+
...u({
|
|
906
|
+
properties: {
|
|
907
|
+
styles: c("")
|
|
908
|
+
}
|
|
909
|
+
}),
|
|
910
|
+
canAcceptBlock: () => !0,
|
|
911
|
+
canDelete: () => !1,
|
|
912
|
+
canMove: () => !1,
|
|
913
|
+
canDuplicate: () => !1
|
|
914
|
+
}, Qe = (e) => {
|
|
915
|
+
const { children: o, blockProps: t, errorMessage: l, successMessage: n, action: r, styles: i, inBuilder: a } = e;
|
|
916
|
+
let p = o;
|
|
917
|
+
o || (p = /* @__PURE__ */ s.jsx(w, { inBuilder: a }));
|
|
918
|
+
const y = {
|
|
676
919
|
"x-data": "{}",
|
|
677
920
|
"x-on:submit.prevent": "post"
|
|
678
|
-
},
|
|
921
|
+
}, h = {
|
|
679
922
|
"x-html": "",
|
|
680
923
|
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
681
924
|
};
|
|
682
925
|
return /* @__PURE__ */ s.jsxs(
|
|
683
926
|
"form",
|
|
684
927
|
{
|
|
685
|
-
...
|
|
686
|
-
"data-error":
|
|
687
|
-
"data-success":
|
|
928
|
+
...y,
|
|
929
|
+
"data-error": l,
|
|
930
|
+
"data-success": n,
|
|
688
931
|
method: "post",
|
|
689
|
-
action:
|
|
690
|
-
...
|
|
932
|
+
action: r,
|
|
933
|
+
...t,
|
|
691
934
|
...i,
|
|
692
935
|
children: [
|
|
693
|
-
/* @__PURE__ */ s.jsx("div", { ...
|
|
694
|
-
|
|
695
|
-
d
|
|
936
|
+
/* @__PURE__ */ s.jsx("div", { ...h }),
|
|
937
|
+
p
|
|
696
938
|
]
|
|
697
939
|
}
|
|
698
940
|
);
|
|
699
|
-
},
|
|
941
|
+
}, et = {
|
|
700
942
|
type: "Form",
|
|
701
943
|
label: "Form",
|
|
702
944
|
category: "core",
|
|
703
945
|
icon: le,
|
|
704
946
|
group: "form",
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
947
|
+
blocks: () => [
|
|
948
|
+
{ _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
|
|
949
|
+
{ _type: "Input", _id: "form_input", _parent: "form", styles: "#styles:," },
|
|
950
|
+
{
|
|
951
|
+
_type: "FormButton",
|
|
952
|
+
_id: "form_submit_btn",
|
|
953
|
+
_parent: "form",
|
|
954
|
+
styles: "#styles:bg-black text-white rounded px-3 py-1,"
|
|
955
|
+
}
|
|
956
|
+
],
|
|
957
|
+
...u({
|
|
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
|
+
}, tt = (e) => {
|
|
983
|
+
const { blockProps: o, inBuilder: t, label: l, styles: n, inputStyles: r, icon: i, iconSize: a, iconPos: p } = e, y = v(), h = {
|
|
723
984
|
"x-bind:disabled": "formLoading"
|
|
724
985
|
};
|
|
725
986
|
return /* @__PURE__ */ s.jsxs(
|
|
726
987
|
"button",
|
|
727
988
|
{
|
|
728
|
-
id:
|
|
729
|
-
...
|
|
989
|
+
id: y,
|
|
990
|
+
...h,
|
|
730
991
|
...r,
|
|
731
|
-
...
|
|
732
|
-
...
|
|
992
|
+
...n,
|
|
993
|
+
...o || {},
|
|
733
994
|
type: t ? "button" : "submit",
|
|
734
995
|
children: [
|
|
735
|
-
|
|
736
|
-
|
|
996
|
+
l,
|
|
997
|
+
i && /* @__PURE__ */ s.jsx(
|
|
998
|
+
"div",
|
|
999
|
+
{
|
|
1000
|
+
style: { width: a + "px" },
|
|
1001
|
+
className: p + " " + (p === "order-first" ? "mr-2" : "ml-2") || "",
|
|
1002
|
+
dangerouslySetInnerHTML: { __html: i }
|
|
1003
|
+
}
|
|
1004
|
+
)
|
|
737
1005
|
]
|
|
738
1006
|
}
|
|
739
1007
|
);
|
|
740
|
-
},
|
|
1008
|
+
}, ot = {
|
|
741
1009
|
type: "FormButton",
|
|
742
1010
|
label: "Submit Button",
|
|
743
1011
|
category: "core",
|
|
744
|
-
icon:
|
|
1012
|
+
icon: M,
|
|
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
|
-
id: f,
|
|
778
|
-
name: h,
|
|
779
|
-
readOnly: d,
|
|
780
|
-
...l,
|
|
781
|
-
...r,
|
|
782
|
-
...a,
|
|
783
|
-
type: c,
|
|
784
|
-
placeholder: o,
|
|
785
|
-
required: i
|
|
1014
|
+
...u({
|
|
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
|
+
}
|
|
786
1044
|
}
|
|
787
|
-
)
|
|
788
|
-
|
|
1045
|
+
}),
|
|
1046
|
+
i18nProps: ["label"],
|
|
1047
|
+
aiProps: ["label"]
|
|
1048
|
+
}, lt = (e) => {
|
|
1049
|
+
const { blockProps: o, fieldName: t, label: l, placeholder: n, styles: r, inputStyles: i, showLabel: a, required: p, inputType: y } = e, h = v();
|
|
1050
|
+
return a ? /* @__PURE__ */ s.jsxs("div", { ...r, ...o, children: [
|
|
1051
|
+
a && /* @__PURE__ */ s.jsx("label", { htmlFor: h, children: l }),
|
|
789
1052
|
/* @__PURE__ */ s.jsx(
|
|
790
1053
|
"input",
|
|
791
1054
|
{
|
|
792
|
-
name:
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
required: i
|
|
1055
|
+
name: t,
|
|
1056
|
+
...i,
|
|
1057
|
+
id: h,
|
|
1058
|
+
type: y,
|
|
1059
|
+
placeholder: n,
|
|
1060
|
+
required: p
|
|
799
1061
|
}
|
|
800
1062
|
)
|
|
801
|
-
] })
|
|
802
|
-
|
|
1063
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
1064
|
+
"input",
|
|
1065
|
+
{
|
|
1066
|
+
id: h,
|
|
1067
|
+
name: t,
|
|
1068
|
+
...o,
|
|
1069
|
+
...i,
|
|
1070
|
+
...r,
|
|
1071
|
+
type: y,
|
|
1072
|
+
placeholder: n,
|
|
1073
|
+
required: p
|
|
1074
|
+
}
|
|
1075
|
+
);
|
|
1076
|
+
}, nt = {
|
|
803
1077
|
type: "Input",
|
|
804
|
-
label: "
|
|
1078
|
+
label: "web_blocks.input",
|
|
805
1079
|
category: "core",
|
|
806
|
-
icon:
|
|
1080
|
+
icon: E,
|
|
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
|
-
|
|
1082
|
+
...u({
|
|
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
|
+
}, st = (e) => {
|
|
1132
|
+
const { blockProps: o, fieldName: t, label: l, styles: n, inputStyles: r, required: i, checked: a, showLabel: p = !0 } = e, y = v();
|
|
1133
|
+
return p ? /* @__PURE__ */ s.jsxs("div", { ...n, ...o, children: [
|
|
1134
|
+
/* @__PURE__ */ s.jsx("input", { ...r, name: t, id: y, type: "radio", required: i, defaultChecked: a }),
|
|
1135
|
+
l && /* @__PURE__ */ s.jsx("label", { htmlFor: y, children: l })
|
|
837
1136
|
] }) : /* @__PURE__ */ s.jsx(
|
|
838
1137
|
"input",
|
|
839
1138
|
{
|
|
840
|
-
id:
|
|
841
|
-
...
|
|
1139
|
+
id: y,
|
|
1140
|
+
...o,
|
|
842
1141
|
...r,
|
|
843
|
-
...
|
|
1142
|
+
...n,
|
|
844
1143
|
type: "radio",
|
|
845
1144
|
required: i,
|
|
846
|
-
checked:
|
|
1145
|
+
checked: a,
|
|
847
1146
|
name: t
|
|
848
1147
|
}
|
|
849
1148
|
);
|
|
850
|
-
},
|
|
1149
|
+
}, rt = {
|
|
851
1150
|
type: "Radio",
|
|
852
1151
|
label: "web_blocks.radio",
|
|
853
1152
|
category: "core",
|
|
854
|
-
icon:
|
|
1153
|
+
icon: Z,
|
|
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
|
+
...u({
|
|
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
|
+
}, it = (e) => {
|
|
1184
|
+
const { blockProps: o, fieldName: t, label: l, placeholder: n, styles: r, inputStyles: i, required: a, showLabel: p, _multiple: y, options: h } = e, b = v();
|
|
1185
|
+
return p ? /* @__PURE__ */ s.jsxs("div", { ...r, ...o, children: [
|
|
1186
|
+
p && /* @__PURE__ */ s.jsx("label", { htmlFor: b, children: l }),
|
|
1187
|
+
/* @__PURE__ */ s.jsxs("select", { ...i, id: b, required: a, multiple: y, name: t, children: [
|
|
1188
|
+
/* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: n }),
|
|
1189
|
+
I(h, (g) => /* @__PURE__ */ s.jsx("option", { value: g == null ? void 0 : g.value, children: g == null ? void 0 : g.label }, g == null ? void 0 : g.value))
|
|
1190
|
+
] })
|
|
1191
|
+
] }) : /* @__PURE__ */ s.jsxs("select", { id: b, ...r, ...o, required: a, multiple: y, name: t, children: [
|
|
1192
|
+
/* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: n }),
|
|
1193
|
+
I(h, (g) => /* @__PURE__ */ s.jsx("option", { value: g == null ? void 0 : g.value, children: g == null ? void 0 : g.label }, g == null ? void 0 : g.value))
|
|
1194
|
+
] });
|
|
1195
|
+
}, at = {
|
|
913
1196
|
type: "Select",
|
|
914
1197
|
label: "web_blocks.select",
|
|
915
1198
|
category: "core",
|
|
916
|
-
icon:
|
|
1199
|
+
icon: $,
|
|
917
1200
|
group: "form",
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
1201
|
+
...u({
|
|
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
|
-
|
|
1250
|
+
}
|
|
1251
|
+
}),
|
|
1252
|
+
aiProps: ["label", "placeholder"],
|
|
1253
|
+
i18nProps: ["label", "placeholder"]
|
|
1254
|
+
}, ct = (e) => {
|
|
1255
|
+
const { blockProps: o, fieldName: t, label: l, placeholder: n, styles: r, inputStyles: i, _rows: a, showLabel: p } = e, y = v();
|
|
1256
|
+
return p ? /* @__PURE__ */ s.jsxs("div", { ...r, ...o, children: [
|
|
1257
|
+
p && /* @__PURE__ */ s.jsx("label", { htmlFor: y, children: l }),
|
|
1258
|
+
/* @__PURE__ */ s.jsx("textarea", { name: t, ...i, id: y, placeholder: n, rows: a })
|
|
943
1259
|
] }) : /* @__PURE__ */ s.jsx(
|
|
944
1260
|
"textarea",
|
|
945
1261
|
{
|
|
946
|
-
id:
|
|
1262
|
+
id: y,
|
|
947
1263
|
name: t,
|
|
948
|
-
...
|
|
949
|
-
...
|
|
1264
|
+
...o,
|
|
1265
|
+
...i,
|
|
950
1266
|
...r,
|
|
951
|
-
placeholder:
|
|
952
|
-
rows:
|
|
1267
|
+
placeholder: n,
|
|
1268
|
+
rows: a
|
|
953
1269
|
}
|
|
954
1270
|
);
|
|
955
|
-
},
|
|
1271
|
+
}, pt = {
|
|
956
1272
|
type: "TextArea",
|
|
957
1273
|
label: "web_blocks.textarea",
|
|
958
1274
|
category: "core",
|
|
959
|
-
icon:
|
|
1275
|
+
icon: E,
|
|
960
1276
|
group: "form",
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
1277
|
+
...u({
|
|
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
|
+
}, dt = (e) => {
|
|
1307
|
+
const { blockProps: o, fieldName: t, label: l, styles: n, inputStyles: r, required: i, checked: a, showLabel: p = !0 } = e, y = v();
|
|
1308
|
+
return p ? /* @__PURE__ */ s.jsxs("div", { ...n, ...o, children: [
|
|
976
1309
|
/* @__PURE__ */ s.jsx(
|
|
977
1310
|
"input",
|
|
978
1311
|
{
|
|
979
1312
|
...r,
|
|
980
1313
|
name: t,
|
|
981
|
-
id:
|
|
1314
|
+
id: y,
|
|
982
1315
|
type: "checkbox",
|
|
983
|
-
required:
|
|
984
|
-
defaultChecked:
|
|
1316
|
+
required: i,
|
|
1317
|
+
defaultChecked: a
|
|
985
1318
|
}
|
|
986
1319
|
),
|
|
987
|
-
|
|
1320
|
+
l && /* @__PURE__ */ s.jsx("label", { htmlFor: y, children: l })
|
|
988
1321
|
] }) : /* @__PURE__ */ s.jsx(
|
|
989
1322
|
"input",
|
|
990
1323
|
{
|
|
991
|
-
id:
|
|
992
|
-
...
|
|
1324
|
+
id: y,
|
|
1325
|
+
...o,
|
|
993
1326
|
...r,
|
|
994
|
-
...
|
|
1327
|
+
...n,
|
|
995
1328
|
type: "checkbox",
|
|
996
|
-
required:
|
|
1329
|
+
required: i,
|
|
997
1330
|
name: t
|
|
998
1331
|
}
|
|
999
1332
|
);
|
|
1000
|
-
},
|
|
1333
|
+
}, ut = {
|
|
1001
1334
|
type: "Checkbox",
|
|
1002
1335
|
label: "web_blocks.checkbox",
|
|
1003
1336
|
category: "core",
|
|
1004
|
-
icon:
|
|
1337
|
+
icon: J,
|
|
1338
|
+
group: "form",
|
|
1339
|
+
...u({
|
|
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
|
+
}, gt = (e) => {
|
|
1368
|
+
const { blockProps: o, content: t, styles: l, children: n } = e, r = { ...l, ...o };
|
|
1369
|
+
return n ? m.createElement("label", r, n) : m.createElement("label", {
|
|
1370
|
+
...r,
|
|
1371
|
+
dangerouslySetInnerHTML: { __html: t }
|
|
1372
|
+
});
|
|
1373
|
+
}, yt = {
|
|
1374
|
+
type: "Label",
|
|
1375
|
+
label: "Label",
|
|
1376
|
+
category: "core",
|
|
1377
|
+
icon: K,
|
|
1005
1378
|
group: "form",
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1379
|
+
...u({
|
|
1380
|
+
properties: {
|
|
1381
|
+
styles: c(),
|
|
1382
|
+
content: {
|
|
1383
|
+
type: "string",
|
|
1384
|
+
title: "Content",
|
|
1385
|
+
default: ""
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
})
|
|
1389
|
+
}, C = {
|
|
1390
|
+
wrapper: { "x-data": "{ open: false }" },
|
|
1391
|
+
button: { "x-on:click": "open = !open" },
|
|
1392
|
+
menu: { "x-show": "open", "x-on:click.away": "open = false" }
|
|
1393
|
+
}, mt = (e) => {
|
|
1394
|
+
const { blockProps: o, content: t, icon: l, iconWidth: n, iconHeight: r, styles: i, show: a } = e;
|
|
1395
|
+
return /* @__PURE__ */ s.jsxs("button", { ...o, ...C.button, ...i, children: [
|
|
1396
|
+
t,
|
|
1397
|
+
/* @__PURE__ */ s.jsx(
|
|
1398
|
+
"span",
|
|
1399
|
+
{
|
|
1400
|
+
className: a ? "rotate-180" : "",
|
|
1401
|
+
dangerouslySetInnerHTML: { __html: l },
|
|
1402
|
+
style: { width: n, height: r }
|
|
1403
|
+
}
|
|
1404
|
+
)
|
|
1405
|
+
] });
|
|
1406
|
+
};
|
|
1407
|
+
d(mt, {
|
|
1408
|
+
type: "DropdownButton",
|
|
1409
|
+
label: "Dropdown Button",
|
|
1410
|
+
group: "advanced",
|
|
1411
|
+
category: "core",
|
|
1412
|
+
hidden: !0,
|
|
1413
|
+
canMove: () => !1,
|
|
1414
|
+
canDelete: () => !1,
|
|
1415
|
+
...u({
|
|
1416
|
+
properties: {
|
|
1417
|
+
show: S("Dropdown", "showDropdown"),
|
|
1418
|
+
content: { type: "string", title: "Title", default: "Menu Item" },
|
|
1419
|
+
icon: { type: "string", title: "Icon", default: "", ui: { "ui:widget": "icon" } },
|
|
1420
|
+
iconWidth: { type: "string", title: "Icon Width", default: "16px" },
|
|
1421
|
+
iconHeight: { type: "string", title: "Icon Height", default: "16px" },
|
|
1422
|
+
styles: c("flex items-center gap-2 px-4 py-1")
|
|
1423
|
+
}
|
|
1424
|
+
})
|
|
1425
|
+
});
|
|
1426
|
+
const ht = (e) => {
|
|
1427
|
+
const { blockProps: o, children: t, styles: l, show: n, inBuilder: r } = e;
|
|
1428
|
+
return r && !n ? null : /* @__PURE__ */ s.jsx("div", { ...o, ...C.menu, ...l, children: t });
|
|
1429
|
+
};
|
|
1430
|
+
d(ht, {
|
|
1431
|
+
type: "DropdownContent",
|
|
1432
|
+
label: "Dropdown Content",
|
|
1433
|
+
hidden: !0,
|
|
1434
|
+
canMove: () => !1,
|
|
1435
|
+
canDelete: () => !1,
|
|
1436
|
+
canAcceptBlock: () => !0,
|
|
1437
|
+
...u({
|
|
1438
|
+
properties: {
|
|
1439
|
+
show: S("Dropdown", "showDropdown"),
|
|
1440
|
+
styles: c("absolute left-0 p-2 w-80 mt-2 bg-white rounded-lg shadow-lg z-50")
|
|
1441
|
+
}
|
|
1442
|
+
})
|
|
1443
|
+
});
|
|
1444
|
+
const ft = (e) => {
|
|
1445
|
+
const { blockProps: o, children: t, styles: l } = e;
|
|
1446
|
+
return /* @__PURE__ */ s.jsx("div", { ...o, ...l, ...C.wrapper, children: t });
|
|
1447
|
+
}, bt = {
|
|
1448
|
+
type: "Dropdown",
|
|
1449
|
+
label: "Dropdown",
|
|
1450
|
+
group: "basic",
|
|
1451
|
+
icon: $,
|
|
1452
|
+
blocks: () => [
|
|
1453
|
+
{ _type: "Dropdown", _id: "dropdown" },
|
|
1454
|
+
{
|
|
1455
|
+
_type: "DropdownButton",
|
|
1456
|
+
_id: "button",
|
|
1457
|
+
_parent: "dropdown",
|
|
1458
|
+
title: "Menu Item",
|
|
1459
|
+
icon: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24"> <path d="M16.293 9.293 12 13.586 7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z"/> </svg>',
|
|
1460
|
+
styles: "#styles:,flex items-center gap-2 px-4 py-1"
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
_type: "DropdownContent",
|
|
1464
|
+
_id: "content",
|
|
1465
|
+
_parent: "dropdown",
|
|
1466
|
+
styles: "#styles:,absolute left-0 w-80 mt-0.5 bg-white rounded-lg shadow-lg z-50"
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
_type: "Link",
|
|
1470
|
+
_id: "link",
|
|
1471
|
+
_parent: "content",
|
|
1472
|
+
content: "Link",
|
|
1473
|
+
styles: "#styles:,flex items-center gap-2 px-4 py-1",
|
|
1474
|
+
link: { href: "https://www.google.com", type: "url", target: "_self" }
|
|
1475
|
+
}
|
|
1476
|
+
],
|
|
1477
|
+
category: "core",
|
|
1478
|
+
wrapper: !0,
|
|
1479
|
+
...u({
|
|
1480
|
+
properties: {
|
|
1481
|
+
showDropdown: D({
|
|
1482
|
+
type: "boolean",
|
|
1483
|
+
title: "Show Dropdown",
|
|
1484
|
+
default: !1
|
|
1485
|
+
}),
|
|
1486
|
+
styles: c("relative w-max")
|
|
1487
|
+
}
|
|
1488
|
+
})
|
|
1489
|
+
}, B = {
|
|
1490
|
+
SMALL: {
|
|
1491
|
+
1: "col-span-1",
|
|
1492
|
+
2: "col-span-2",
|
|
1493
|
+
3: "col-span-3",
|
|
1494
|
+
4: "col-span-4",
|
|
1495
|
+
5: "col-span-5",
|
|
1496
|
+
6: "col-span-6",
|
|
1497
|
+
7: "col-span-7",
|
|
1498
|
+
8: "col-span-8",
|
|
1499
|
+
9: "col-span-9",
|
|
1500
|
+
10: "col-span-10",
|
|
1501
|
+
11: "col-span-11",
|
|
1502
|
+
12: "col-span-12"
|
|
1503
|
+
},
|
|
1504
|
+
MEDIUM: {
|
|
1505
|
+
1: "md:col-span-1",
|
|
1506
|
+
2: "md:col-span-2",
|
|
1507
|
+
3: "md:col-span-3",
|
|
1508
|
+
4: "md:col-span-4",
|
|
1509
|
+
5: "md:col-span-5",
|
|
1510
|
+
6: "md:col-span-6",
|
|
1511
|
+
7: "md:col-span-7",
|
|
1512
|
+
8: "md:col-span-8",
|
|
1513
|
+
9: "md:col-span-9",
|
|
1514
|
+
10: "md:col-span-10",
|
|
1515
|
+
11: "md:col-span-11",
|
|
1516
|
+
12: "md:col-span-12"
|
|
1517
|
+
},
|
|
1518
|
+
LARGE: {
|
|
1519
|
+
1: "lg:col-span-1",
|
|
1520
|
+
2: "lg:col-span-2",
|
|
1521
|
+
3: "lg:col-span-3",
|
|
1522
|
+
4: "lg:col-span-4",
|
|
1523
|
+
5: "lg:col-span-5",
|
|
1524
|
+
6: "lg:col-span-6",
|
|
1525
|
+
7: "lg:col-span-7",
|
|
1526
|
+
8: "lg:col-span-8",
|
|
1527
|
+
9: "lg:col-span-9",
|
|
1528
|
+
10: "lg:col-span-10",
|
|
1529
|
+
11: "lg:col-span-11",
|
|
1530
|
+
12: "lg:col-span-12"
|
|
1012
1531
|
}
|
|
1013
|
-
},
|
|
1014
|
-
|
|
1532
|
+
}, kt = (e) => {
|
|
1533
|
+
const { blockProps: o, children: t, styles: l, colSpan: n, tabletColSpan: r, desktopColSpan: i } = e, p = { className: [
|
|
1534
|
+
f(l, "className", ""),
|
|
1535
|
+
f(B, ["SMALL", isNaN(n) || !n ? 6 : n], ""),
|
|
1536
|
+
r ? f(B, ["MEDIUM", r || n], "") : "",
|
|
1537
|
+
i ? f(B, ["LARGE", r || n], "") : ""
|
|
1538
|
+
].join(" ") };
|
|
1539
|
+
return /* @__PURE__ */ s.jsx("div", { ...o, ...l, ...p, children: t || /* @__PURE__ */ s.jsx("div", { className: "min-h-12 h-full w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
1540
|
+
}, xt = {
|
|
1541
|
+
type: "Column",
|
|
1542
|
+
label: "Column",
|
|
1543
|
+
group: "basic",
|
|
1544
|
+
category: "core",
|
|
1545
|
+
icon: ne,
|
|
1546
|
+
wrapper: !0,
|
|
1547
|
+
canDelete: () => !0,
|
|
1548
|
+
canAcceptBlock: () => !0,
|
|
1549
|
+
canBeNested: (e) => e === "Row",
|
|
1550
|
+
...u({
|
|
1551
|
+
properties: {
|
|
1552
|
+
styles: c(""),
|
|
1553
|
+
colSpan: {
|
|
1554
|
+
type: "number",
|
|
1555
|
+
title: "Column Span",
|
|
1556
|
+
default: 6,
|
|
1557
|
+
enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
1558
|
+
},
|
|
1559
|
+
tabletColSpan: {
|
|
1560
|
+
type: "number",
|
|
1561
|
+
title: "Column Span (Tablet)",
|
|
1562
|
+
default: null,
|
|
1563
|
+
enumNames: ["Default", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
1564
|
+
enum: [null, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
1565
|
+
},
|
|
1566
|
+
desktopColSpan: {
|
|
1567
|
+
type: "number",
|
|
1568
|
+
title: "Column Span (Desktop)",
|
|
1569
|
+
default: null,
|
|
1570
|
+
enumNames: ["Default", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
1571
|
+
enum: [null, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
})
|
|
1575
|
+
}, wt = (e) => {
|
|
1576
|
+
const { blockProps: o, children: t, styles: l, gutter: n } = e, i = { className: [f(l, "className", ""), " grid grid-cols-12"].join() };
|
|
1577
|
+
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${n}px` : i.style = { gap: `${n}px` }, /* @__PURE__ */ s.jsx("div", { ...o, ...l, ...i, children: t });
|
|
1578
|
+
}, vt = {
|
|
1579
|
+
type: "Row",
|
|
1580
|
+
label: "Row",
|
|
1581
|
+
group: "basic",
|
|
1582
|
+
icon: se,
|
|
1583
|
+
blocks: () => [
|
|
1584
|
+
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1585
|
+
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
1586
|
+
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," }
|
|
1587
|
+
],
|
|
1588
|
+
category: "core",
|
|
1589
|
+
wrapper: !0,
|
|
1590
|
+
canAcceptBlock: (e) => e === "Column",
|
|
1591
|
+
...u({
|
|
1592
|
+
properties: {
|
|
1593
|
+
styles: c(""),
|
|
1594
|
+
colCount: {
|
|
1595
|
+
type: "number",
|
|
1596
|
+
default: 2,
|
|
1597
|
+
minimum: 0,
|
|
1598
|
+
ui: { "ui:widget": "colCount" }
|
|
1599
|
+
},
|
|
1600
|
+
gutter: {
|
|
1601
|
+
type: "number",
|
|
1602
|
+
title: "Gutter (in px)",
|
|
1603
|
+
default: 16,
|
|
1604
|
+
minimum: 0
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
})
|
|
1608
|
+
}, Mt = () => {
|
|
1609
|
+
d(ie, ae), d(ge, ye), d(ce, pe), d(me, he), d(fe, be), d(ke, xe), d(we, ve), d(_e, Be), d(Ce, Ie), d(Le, je), d(Pe, Se), d(Me, Ne), d(Ee, $e), d(De, Ae), d(de, ue), d(qe, Fe), d(We, Xe), d(Qe, et), d(tt, ot), d(lt, nt), d(dt, ut), d(st, rt), d(it, at), d(ct, pt), d(gt, yt), d(Je, Ke), d(Ye, Ze), d(Re, ze), d(Ge, Ue), d(Ve, Oe), d(ft, bt), d(wt, vt), d(kt, xt);
|
|
1015
1610
|
};
|
|
1016
1611
|
export {
|
|
1017
|
-
|
|
1612
|
+
Mt as loadWebBlocks
|
|
1018
1613
|
};
|