@chaibuilder/sdk 1.2.97 → 1.2.99

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