@chaibuilder/sdk 1.3.0-beta.8 → 1.3.0-beta.9

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