@chaibuilder/sdk 2.0.0-beta.7 → 2.0.0-beta.71

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 (53) hide show
  1. package/README.md +0 -4
  2. package/dist/ChaiThemeFn-Cort9tch.js +201 -0
  3. package/dist/ChaiThemeFn-DQu-2Eh9.cjs +13 -0
  4. package/dist/CodeEditor-B2x4yruH.cjs +1 -0
  5. package/dist/CodeEditor-VcQsGvTM.js +65 -0
  6. package/dist/Topbar-BQsjWb-A.js +16 -0
  7. package/dist/Topbar-DEw_kBMz.cjs +1 -0
  8. package/dist/chaibuilder-logo.png +0 -0
  9. package/dist/context-menu-C4lLV8gP.cjs +1 -0
  10. package/dist/{context-menu-I8woggB3.js → context-menu-D5ViOi6K.js} +260 -263
  11. package/dist/core.cjs +61 -1
  12. package/dist/core.d.ts +116 -54
  13. package/dist/core.js +8819 -123
  14. package/dist/getSplitClasses-DodqA_KW.cjs +1 -0
  15. package/dist/getSplitClasses-DphwgQiE.js +48 -0
  16. package/dist/{iconBase-Ief2hJUZ.js → iconBase-DHfFLkem.js} +6 -12
  17. package/dist/mockServiceWorker.js +39 -24
  18. package/dist/plugin-2xcljWGM.cjs +1 -0
  19. package/dist/plugin-kUMxtQR5.js +24 -0
  20. package/dist/render.cjs +2 -2
  21. package/dist/render.d.ts +35 -16
  22. package/dist/render.js +144 -134
  23. package/dist/runtime.cjs +1 -1
  24. package/dist/runtime.d.ts +0 -1
  25. package/dist/runtime.js +0 -20
  26. package/dist/{style.css → sdk.css} +1 -1
  27. package/dist/tailwind.cjs +1 -1
  28. package/dist/tailwind.d.ts +31 -26
  29. package/dist/tailwind.js +8 -10
  30. package/dist/ui.cjs +1 -1
  31. package/dist/ui.d.ts +6 -51
  32. package/dist/ui.js +210 -367
  33. package/dist/web-blocks.cjs +29 -2
  34. package/dist/web-blocks.js +1782 -831
  35. package/package.json +133 -132
  36. package/dist/CodeEditor-Bqjwy0VH.js +0 -127
  37. package/dist/CodeEditor-KUfhGPDN.cjs +0 -1
  38. package/dist/STRINGS-Xxstm-7I.js +0 -7
  39. package/dist/STRINGS-Yl7cSWDc.cjs +0 -1
  40. package/dist/Topbar-DQuMCOP6.cjs +0 -1
  41. package/dist/Topbar-g2pI6yGs.js +0 -161
  42. package/dist/context-menu-0lRey9QY.cjs +0 -1
  43. package/dist/controls-lEwMTdPQ.js +0 -234
  44. package/dist/controls-p9IwFnPx.cjs +0 -1
  45. package/dist/index-1_ZADyhv.js +0 -8554
  46. package/dist/index-QyeR27V9.cjs +0 -61
  47. package/dist/jsx-runtime-JYMCiFoE.cjs +0 -27
  48. package/dist/jsx-runtime-Sp0orL4X.js +0 -631
  49. package/dist/plugin-UiUFs2fK.js +0 -44
  50. package/dist/plugin-f6SDZ_Or.js +0 -108
  51. package/dist/plugin-jum1MjXp.cjs +0 -1
  52. package/dist/plugin-xOpS-UNV.cjs +0 -1
  53. /package/dist/{iconBase-aZzpqff_.cjs → iconBase-Cn2BsTrq.cjs} +0 -0
@@ -1,350 +1,719 @@
1
- import { registerChaiBlock as u } from "@chaibuilder/runtime";
2
- import { j as s } from "./jsx-runtime-Sp0orL4X.js";
3
- import * as b from "react";
4
- import { T as m, y as v, x as C, g as p, q as N, s as B, l as T, f as L, m as S, w as D, c as y, b as F, S as G } from "./controls-lEwMTdPQ.js";
5
- import { c as j, G as V, g as I } from "./iconBase-Ief2hJUZ.js";
6
- 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";
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
- import "clsx";
10
- import "tailwind-merge";
11
- 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) => {
12
- const { blockProps: l, inBuilder: t, backgroundImage: o, children: a, tag: r = "div", styles: n } = e;
13
- let i = a;
14
- a || (i = /* @__PURE__ */ s.jsx(_, { inBuilder: t }));
15
- let c = {};
16
- return o && (c = { backgroundImage: `url(${o})` }), b.createElement(r, { ...l, ...n, style: c }, i);
17
- }, pe = {
1
+ import { registerChaiBlockSchema as p, StylesProp as d, registerChaiBlock as u, closestBlockProp as _, stylesProp as $, runtimeProp as F } from "@chaibuilder/runtime";
2
+ import { jsx as i, jsxs as k, Fragment as W } from "react/jsx-runtime";
3
+ import * as w from "react";
4
+ import { createElement as I } from "react";
5
+ import { c as P, G as X, g as C } from "./iconBase-DHfFLkem.js";
6
+ import { ButtonIcon as q, CodeIcon as Y, HeadingIcon as Z, TextIcon as J, CursorTextIcon as K, MoonIcon as G, SunIcon as Q, DividerHorizontalIcon as ee, SketchLogoIcon as te, ImageIcon as U, Link1Icon as le, RowsIcon as re, ColumnsIcon as ne, SpaceBetweenVerticallyIcon as oe, VideoIcon as ie, DropdownMenuIcon as O, CheckboxIcon as ae, InputIcon as V, LetterCaseToggleIcon as se, RadiobuttonIcon as ce } from "@radix-ui/react-icons";
7
+ import { isEmpty as S, get as v, isNull as de, pick as ue, omit as pe, map as R } from "lodash-es";
8
+ import { GlobeIcon as ye, GroupIcon as ge, Columns as me, Rows as he, PanelRightOpen as D, PanelRightClose as fe, AlignHorizontalJustifyStart as be, AppWindowIcon as we, UnfoldHorizontal as ke } from "lucide-react";
9
+ const B = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div", { className: P("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ i("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, ve = (e) => {
10
+ const { blockProps: t, inBuilder: l, backgroundImage: n, children: r, tag: o = "div", styles: a } = e;
11
+ let c = r;
12
+ r || (c = /* @__PURE__ */ i(B, { inBuilder: l }));
13
+ let s = {};
14
+ return n && (s = { backgroundImage: `url(${n})` }), w.createElement(o, { ...t, ...a, style: s }, c);
15
+ }, xe = {
18
16
  type: "Box",
19
- label: "web_blocks.box",
17
+ label: "Box",
20
18
  category: "core",
21
19
  group: "basic",
22
- props: {
23
- styles: m({ default: "" }),
24
- tag: v({
25
- title: "web_blocks.tag",
26
- default: "div",
27
- options: [
28
- { value: "div", title: "web_blocks.div" },
29
- { value: "header", title: "web_blocks.header" },
30
- { value: "footer", title: "web_blocks.footer" },
31
- { value: "section", title: "web_blocks.section" },
32
- { value: "article", title: "web_blocks.article" },
33
- { value: "aside", title: "web_blocks.aside" },
34
- { value: "main", title: "web_blocks.main" },
35
- { value: "nav", title: "web_blocks.nav" },
36
- { value: "figure", title: "web_blocks.figure" },
37
- { value: "details", title: "web_blocks.details" },
38
- { value: "summary", title: "web_blocks.summary" },
39
- { value: "dialog", title: "web_blocks.dialog" },
40
- { value: "strike", title: "web_blocks.strike" },
41
- { value: "caption", title: "web_blocks.caption" },
42
- { value: "legend", title: "web_blocks.legend" },
43
- { value: "figcaption", title: "web_blocks.figcaption" },
44
- { value: "mark", title: "web_blocks.mark" }
45
- ]
46
- }),
47
- backgroundImage: C({ title: "web_blocks.background_image" })
48
- },
20
+ ...p({
21
+ properties: {
22
+ styles: d(""),
23
+ backgroundImage: {
24
+ type: "string",
25
+ default: "",
26
+ title: "Background Image",
27
+ ui: { "ui:widget": "image" }
28
+ },
29
+ tag: {
30
+ type: "string",
31
+ default: "div",
32
+ title: "Tag",
33
+ oneOf: [
34
+ { const: "div", title: "div" },
35
+ { const: "header", title: "header" },
36
+ { const: "footer", title: "footer" },
37
+ { const: "section", title: "section" },
38
+ { const: "article", title: "article" },
39
+ { const: "aside", title: "aside" },
40
+ { const: "main", title: "main" },
41
+ { const: "nav", title: "nav" },
42
+ { const: "figure", title: "figure" },
43
+ { const: "details", title: "details" },
44
+ { const: "summary", title: "summary" },
45
+ { const: "dialog", title: "dialog" },
46
+ { const: "strike", title: "strike" },
47
+ { const: "caption", title: "caption" },
48
+ { const: "legend", title: "legend" },
49
+ { const: "figcaption", title: "figcaption" },
50
+ { const: "mark", title: "mark" }
51
+ ]
52
+ }
53
+ }
54
+ }),
49
55
  canAcceptBlock: () => !0
50
- }, be = (e) => {
51
- 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: [
52
- /* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", children: a }),
53
- c && /* @__PURE__ */ s.jsx(
56
+ }, Se = (e) => {
57
+ const { blockProps: t, iconSize: l, icon: n, content: r, styles: o, children: a, iconPos: c, link: s, inBuilder: g } = e, m = n, h = a || /* @__PURE__ */ k(W, { children: [
58
+ /* @__PURE__ */ i("span", { "data-ai-key": "content", children: r }),
59
+ m && /* @__PURE__ */ i(
54
60
  "div",
55
61
  {
56
- style: { width: t + "px" },
57
- className: r + " " + (r === "order-first" ? "mr-2" : "ml-2") || "",
58
- dangerouslySetInnerHTML: { __html: c }
62
+ style: { width: l + "px" },
63
+ className: c + " " + (c === "order-first" ? "mr-2" : "ml-2") || "",
64
+ dangerouslySetInnerHTML: { __html: m }
59
65
  }
60
66
  )
61
- ] });
62
- return b.createElement(
67
+ ] }), y = I(
63
68
  "button",
64
69
  {
65
- ...l,
66
- ...n,
67
- type: "button"
70
+ ...t,
71
+ ...o,
72
+ type: "button",
73
+ "aria-label": r
68
74
  },
69
- d
75
+ h
70
76
  );
71
- }, me = {
77
+ return S(v(s, "href")) ? y : g ? /* @__PURE__ */ i("span", { children: y }) : /* @__PURE__ */ i("a", { "aria-label": r, href: v(s, "href") || "/", target: v(s, "target", "_self"), children: y });
78
+ }, _e = {
72
79
  type: "Button",
73
- label: "web_blocks.button",
80
+ label: "Button",
74
81
  category: "core",
75
- icon: H,
82
+ icon: q,
76
83
  group: "basic",
77
- props: {
78
- content: p({ title: "web_blocks.label", default: "Button", ai: !0, i18n: !0 }),
79
- styles: m({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
80
- icon: N({ title: "web_blocks.icon", default: "" }),
81
- iconSize: B({ title: "web_blocks.icon_size", default: 24 }),
82
- iconPos: v({
83
- title: "web_blocks.icon_position",
84
- default: "order-last",
85
- options: [
86
- { title: "web_blocks.start", value: "order-first" },
87
- { title: "web_blocks.end", value: "order-last" }
88
- ]
89
- })
90
- }
91
- }, fe = (e) => {
92
- const { blockProps: l, styles: t, htmlCode: o, inBuilder: a } = e;
93
- return a ? /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
94
- a ? /* @__PURE__ */ s.jsx("div", { ...l, ...t, className: "absolute z-20 h-full w-full" }) : null,
95
- b.createElement("div", {
96
- ...t,
97
- dangerouslySetInnerHTML: { __html: o.replace(/<script.*?>.*?<\/script>/g, "") }
84
+ ...p({
85
+ properties: {
86
+ styles: d("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
87
+ content: {
88
+ type: "string",
89
+ title: "Button label",
90
+ default: "Button"
91
+ },
92
+ icon: {
93
+ type: "string",
94
+ title: "Icon",
95
+ default: "",
96
+ ui: { "ui:widget": "icon" }
97
+ },
98
+ iconSize: {
99
+ type: "number",
100
+ title: "Icon size",
101
+ default: 16
102
+ },
103
+ iconPos: {
104
+ type: "string",
105
+ title: "Icon position",
106
+ default: "order-last",
107
+ enum: ["order-first", "order-last"]
108
+ },
109
+ link: {
110
+ type: "object",
111
+ properties: {
112
+ type: { type: "string" },
113
+ href: { type: "string" },
114
+ target: { type: "string" }
115
+ },
116
+ default: {
117
+ type: "url",
118
+ href: "",
119
+ target: "_self"
120
+ },
121
+ ui: {
122
+ "ui:field": "link"
123
+ }
124
+ }
125
+ }
126
+ }),
127
+ i18nProps: ["content"],
128
+ aiProps: ["content"]
129
+ }, Be = (e) => {
130
+ const { blockProps: t, styles: l, htmlCode: n, inBuilder: r } = e;
131
+ return r ? /* @__PURE__ */ k("div", { className: "relative", children: [
132
+ r ? /* @__PURE__ */ i("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
133
+ w.createElement("div", {
134
+ ...l,
135
+ dangerouslySetInnerHTML: { __html: n.replace(/<script.*?>.*?<\/script>/g, "") }
98
136
  })
99
- ] }) : b.createElement("div", {
100
- ...l,
137
+ ] }) : w.createElement("div", {
101
138
  ...t,
102
- dangerouslySetInnerHTML: { __html: o }
139
+ ...l,
140
+ dangerouslySetInnerHTML: { __html: n }
103
141
  });
104
- }, he = {
142
+ }, Ie = {
105
143
  type: "CustomHTML",
106
144
  label: "web_blocks.custom_html",
107
145
  category: "core",
108
- icon: U,
146
+ icon: Y,
109
147
  group: "advanced",
110
- props: {
111
- styles: m({ default: "" }),
112
- htmlCode: T({
113
- title: "web_blocks.html_code",
114
- default: "<div><p>Enter your HTML code here...</p></div>",
115
- placeholder: "web_blocks.placeholder"
116
- })
117
- }
118
- }, ye = b.memo(
119
- (e) => {
120
- const { blockProps: l, styles: t, backgroundImage: o } = e;
121
- let a = {};
122
- return o && (a = { backgroundImage: `url(${o})` }), b.createElement("div", { ...l, ...t, style: a });
123
- }
124
- ), ge = {
148
+ ...p({
149
+ properties: {
150
+ styles: d(""),
151
+ htmlCode: {
152
+ type: "string",
153
+ default: "<div><p>Enter your HTML code here...</p></div>",
154
+ ui: { "ui:widget": "code" }
155
+ }
156
+ }
157
+ })
158
+ }, Ce = (e) => {
159
+ const { blockProps: t, styles: l, backgroundImage: n } = e;
160
+ let r = {};
161
+ return n && (r = { backgroundImage: `url(${n})` }), w.createElement("div", { ...t, ...l, style: r });
162
+ }, Le = {
125
163
  type: "EmptyBox",
126
- label: "web_blocks.empty_box",
164
+ label: "Empty Box",
127
165
  category: "core",
128
166
  group: "basic",
129
- props: {
130
- styles: m({ default: "" }),
131
- backgroundImage: C({ title: "Background Image" })
132
- }
133
- }, ke = (e) => {
134
- const { blockProps: l, styles: t, content: o, level: a = "h1", children: r = null } = e;
135
- return r ? b.createElement(a, { ...t, ...l }, r) : b.createElement(a, {
136
- ...t,
167
+ ...p({
168
+ properties: {
169
+ styles: d(""),
170
+ backgroundImage: {
171
+ type: "string",
172
+ title: "Background Image",
173
+ default: "",
174
+ ui: { "ui:widget": "image" }
175
+ }
176
+ }
177
+ })
178
+ }, Pe = (e) => {
179
+ const { blockProps: t, styles: l, content: n, tag: r = "h1", children: o = null } = e;
180
+ return o ? w.createElement(r, { ...l, ...t }, o) : w.createElement(r, {
137
181
  ...l,
138
- "data-ai-key": "content",
139
- "data-ai-type": "html",
140
- dangerouslySetInnerHTML: { __html: o }
182
+ ...t,
183
+ dangerouslySetInnerHTML: { __html: n }
141
184
  });
142
- }, xe = {
185
+ }, Ne = {
143
186
  type: "Heading",
144
187
  label: "web_blocks.heading",
145
188
  category: "core",
146
- icon: O,
189
+ icon: Z,
147
190
  group: "typography",
148
- props: {
149
- level: v({
150
- title: "web_blocks.level",
151
- default: "h2",
152
- binding: !1,
153
- options: [
154
- { value: "h1", title: "h1" },
155
- { value: "h2", title: "h2" },
156
- { value: "h3", title: "h3" },
157
- { value: "h4", title: "h4" },
158
- { value: "h5", title: "h5" },
159
- { value: "h6", title: "h6" }
160
- ]
161
- }),
162
- styles: m({ default: "text-3xl" }),
163
- content: L({ title: "Content", default: "Heading goes here", ai: !0, i18n: !0 })
164
- },
191
+ ...p({
192
+ properties: {
193
+ tag: {
194
+ type: "string",
195
+ default: "h2",
196
+ title: "Level",
197
+ enum: ["h1", "h2", "h3", "h4", "h5", "h6"]
198
+ },
199
+ styles: d("text-3xl"),
200
+ content: {
201
+ type: "string",
202
+ default: "Heading goes here",
203
+ title: "Content",
204
+ ui: { "ui:widget": "textarea" }
205
+ }
206
+ }
207
+ }),
208
+ aiProps: ["content"],
209
+ i18nProps: ["content"],
165
210
  canAcceptBlock: (e) => e === "Span" || e === "Text"
166
- }, we = (e) => {
167
- const { blockProps: l, styles: t, content: o } = e;
168
- return re(e.children) ? b.createElement("p", {
169
- ...t,
211
+ }, Me = (e) => {
212
+ const { blockProps: t, styles: l, content: n } = e;
213
+ return de(e.children) ? w.createElement("p", {
170
214
  ...l,
171
- "data-ai-key": "content",
172
- "data-ai-type": "html",
173
- dangerouslySetInnerHTML: { __html: o }
174
- }) : b.createElement("p", { ...t, ...l }, e.children);
175
- }, ve = {
215
+ ...t,
216
+ dangerouslySetInnerHTML: { __html: n }
217
+ }) : w.createElement("p", { ...l, ...t }, e.children);
218
+ }, $e = {
176
219
  type: "Paragraph",
177
220
  label: "Paragraph",
178
221
  category: "core",
179
- icon: W,
222
+ icon: J,
180
223
  group: "typography",
181
- props: {
182
- styles: m({ default: "" }),
183
- content: L({
184
- title: "Content",
185
- default: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
224
+ ...p({
225
+ properties: {
226
+ styles: d(""),
227
+ content: {
228
+ type: "string",
229
+ title: "Content",
230
+ default: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
186
231
  Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus
187
232
  nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.`,
188
- ai: !0,
189
- i18n: !0
190
- })
191
- },
233
+ ui: { "ui:widget": "textarea", "ui:autosize": !0, "ui:rows": 5 }
234
+ }
235
+ }
236
+ }),
237
+ i18nProps: ["content"],
238
+ aiProps: ["content"],
192
239
  canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
193
- }, _e = (e) => {
194
- const { blockProps: l, styles: t, content: o, children: a = null, tag: r } = e;
195
- return a ? b.createElement("span", { ...t, ...l }, a) : b.createElement(r || "span", {
196
- ...t,
240
+ }, T = (e, ...t) => ({
241
+ ...e,
242
+ className: P(e.className, ...t)
243
+ }), De = (e) => {
244
+ const { blockProps: t, content: l, styles: n } = e, r = T(n, "prose", "max-w-full");
245
+ return /* @__PURE__ */ i("div", { ...t, ...r, dangerouslySetInnerHTML: { __html: l } });
246
+ }, Te = {
247
+ type: "RichText",
248
+ label: "Rich Text",
249
+ category: "core",
250
+ icon: K,
251
+ group: "typography",
252
+ ...p({
253
+ properties: {
254
+ styles: d(""),
255
+ content: {
256
+ type: "string",
257
+ title: "Content",
258
+ default: "<p>This is a rich text block. You can add text, and other content here.</p>",
259
+ ui: { "ui:widget": "richtext" }
260
+ }
261
+ }
262
+ }),
263
+ aiProps: ["content"],
264
+ i18nProps: ["content"]
265
+ }, Ae = (e) => {
266
+ const { blockProps: t, styles: l, content: n, children: r = null, tag: o } = e;
267
+ return r ? w.createElement("span", { ...l, ...t }, r) : w.createElement(o || "span", {
197
268
  ...l,
198
- "data-ai-key": "content",
199
- dangerouslySetInnerHTML: { __html: o || "" }
269
+ ...t,
270
+ dangerouslySetInnerHTML: { __html: n || "" }
200
271
  });
201
- }, Ie = {
272
+ }, Ee = {
202
273
  type: "Span",
203
274
  label: "Span",
204
275
  category: "core",
205
276
  group: "typography",
206
- props: {
207
- styles: m({ default: "" }),
208
- content: L({ title: "Content", default: "", ai: !0, i18n: !0 })
209
- },
277
+ ...p({
278
+ properties: {
279
+ styles: d(""),
280
+ content: {
281
+ type: "string",
282
+ title: "Content",
283
+ default: "",
284
+ ui: { "ui:widget": "textarea", "ui:autosize": !0, "ui:rows": 3 }
285
+ }
286
+ }
287
+ }),
288
+ aiProps: ["content"],
289
+ i18nProps: ["content"],
210
290
  canAcceptBlock: () => !0
211
- }, Be = (e) => {
212
- const { blockProps: l, content: t, styles: o } = e;
213
- return /* @__PURE__ */ s.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ s.jsx(
291
+ };
292
+ function Re(e) {
293
+ return X({ 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);
294
+ }
295
+ const ze = (e) => {
296
+ const { scripts: t, inBuilder: l, blockProps: n } = e;
297
+ return l ? /* @__PURE__ */ i("div", { ...n, children: /* @__PURE__ */ i("div", { className: P("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ i("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__ */ i("div", { dangerouslySetInnerHTML: { __html: t } });
298
+ }, He = {
299
+ type: "CustomScript",
300
+ label: "web_blocks.custom_script",
301
+ category: "core",
302
+ icon: Re,
303
+ group: "advanced",
304
+ ...p({
305
+ properties: {
306
+ scripts: {
307
+ type: "string",
308
+ title: "Script",
309
+ default: "",
310
+ format: "code",
311
+ placeholder: "<script>console.log('Hello, world!');<\/script>"
312
+ }
313
+ }
314
+ })
315
+ }, je = (e) => /* @__PURE__ */ k("div", { ...e.blockProps, ...e.styles, children: [
316
+ e.mode,
317
+ e.children
318
+ ] }), Fe = (e) => e.mode === "dark" ? null : /* @__PURE__ */ i("button", { "aria-label": "dark mode button", ...e.blockProps, ...e.styles, children: e.children });
319
+ u(Fe, {
320
+ type: "DarkModeButton",
321
+ label: "Dark Mode Button",
322
+ category: "core",
323
+ icon: G,
324
+ group: "advanced",
325
+ hidden: !0,
326
+ ...p({
327
+ properties: {
328
+ mode: _("DarkModeSwitcher", "mode"),
329
+ styles: $("")
330
+ }
331
+ })
332
+ });
333
+ const qe = (e) => e.mode === "light" ? null : /* @__PURE__ */ i("button", { "aria-label": "light mode button", ...e.blockProps, ...e.styles, children: e.children });
334
+ u(qe, {
335
+ type: "LightModeButton",
336
+ label: "Light Mode Button",
337
+ category: "core",
338
+ icon: Q,
339
+ group: "advanced",
340
+ hidden: !0,
341
+ ...p({
342
+ properties: {
343
+ mode: _("DarkModeSwitcher", "mode"),
344
+ styles: $(""),
345
+ fake: {
346
+ type: "string",
347
+ default: ""
348
+ }
349
+ }
350
+ })
351
+ });
352
+ const Ge = {
353
+ type: "DarkModeSwitcher",
354
+ label: "web_blocks.dark_mode",
355
+ category: "core",
356
+ icon: G,
357
+ group: "advanced",
358
+ wrapper: !0,
359
+ ...p({
360
+ properties: {
361
+ mode: {
362
+ title: "Mode",
363
+ type: "string",
364
+ enum: ["dark", "light"],
365
+ default: "light"
366
+ },
367
+ styles: $("")
368
+ }
369
+ }),
370
+ blocks: () => [
371
+ { _id: "ultqCh", _type: "DarkModeSwitcher", mode: "light", styles: "#styles:,", _name: "Dark Mode Theme" },
372
+ {
373
+ _id: "vroabi",
374
+ _parent: "ultqCh",
375
+ _type: "LightModeButton",
376
+ // @ts-ignore
377
+ styles_attrs: { type: "button", "x-on:click": "darkMode = 'dark'", "x-show": "darkMode === 'light'" },
378
+ styles: "#styles:,bg-white dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",
379
+ _name: "Dark Mode Btn"
380
+ },
381
+ {
382
+ _id: "nltBrv",
383
+ _parent: "vroabi",
384
+ _type: "Icon",
385
+ styles: "#styles:, shrink-0 size-4",
386
+ 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'><path d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'></path></svg>"
387
+ },
388
+ {
389
+ _id: "gesydi",
390
+ _parent: "ultqCh",
391
+ _type: "DarkModeButton",
392
+ // @ts-ignore
393
+ styles_attrs: { type: "button", "x-on:click": "darkMode = 'light'", "x-show": "darkMode === 'dark'" },
394
+ styles: "#styles:,bg-white hidden dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",
395
+ _name: "Light Mode Btn"
396
+ },
397
+ {
398
+ _id: "AdDwBC",
399
+ _parent: "gesydi",
400
+ _type: "Icon",
401
+ styles: "#styles:, shrink-0 size-4",
402
+ 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>"
403
+ }
404
+ ]
405
+ }, Ue = (e) => {
406
+ const { blockProps: t, styles: l } = e;
407
+ return I("hr", { ...l, ...t });
408
+ }, Oe = {
409
+ type: "Divider",
410
+ label: "web_blocks.divider",
411
+ category: "core",
412
+ icon: ee,
413
+ group: "basic",
414
+ ...p({
415
+ properties: {
416
+ styles: d("bg-gray-900 h-0.5 py-2 my-1")
417
+ }
418
+ })
419
+ }, Ve = (e) => {
420
+ const { blockProps: t, inBuilder: l, children: n, globalBlock: r } = e;
421
+ return l && !r ? /* @__PURE__ */ k(
214
422
  "div",
215
423
  {
216
- "data-ai-key": "content",
217
- "data-ai-type": "richtext",
218
- ...l,
219
- ...o,
220
- dangerouslySetInnerHTML: { __html: t }
424
+ className: "flex flex-col items-center justify-center py-4 bg-gray-100 rounded-lg gap-y-1 dark:bg-gray-800",
425
+ ...t,
426
+ children: [
427
+ /* @__PURE__ */ k("h1", { children: [
428
+ "Global Block - ",
429
+ r
430
+ ] }),
431
+ /* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
432
+ ]
221
433
  }
222
- ) });
223
- }, Le = {
224
- type: "RichText",
225
- label: "Rich Text",
434
+ ) : w.createElement("span", { ...t }, n);
435
+ }, We = {
436
+ type: "GlobalBlock",
437
+ label: "Global Block",
438
+ icon: ye,
226
439
  category: "core",
227
- icon: X,
228
- group: "typography",
229
- props: {
230
- styles: m({ default: "" }),
231
- content: S({
232
- title: "Content",
233
- ai: !0,
234
- i18n: !0,
235
- default: "<p>This is a rich text block. You can add text, and other content here.</p>"
236
- })
237
- }
238
- }, je = (e) => {
239
- const { blockProps: l, link: t, children: o, styles: a, inBuilder: r, content: n } = e;
240
- let i = {};
241
- 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(
440
+ group: "advanced",
441
+ ...p({
442
+ properties: {
443
+ globalBlock: {
444
+ type: "string",
445
+ title: "Global Block",
446
+ default: "",
447
+ ui: {
448
+ "ui:widget": "hidden"
449
+ }
450
+ }
451
+ }
452
+ })
453
+ }, Xe = (e) => {
454
+ const { blockProps: t, icon: l, styles: n, width: r, inBuilder: o, height: a } = e, c = T(n, "");
455
+ if (S(l))
456
+ return /* @__PURE__ */ i(B, { inBuilder: o, className: "h-8 w-14" });
457
+ const s = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
458
+ return w.createElement("span", {
459
+ ...t,
460
+ ...c,
461
+ style: {
462
+ width: r ? `${r}px` : "auto",
463
+ height: a ? `${a}px` : "auto"
464
+ },
465
+ dangerouslySetInnerHTML: { __html: s }
466
+ });
467
+ }, Ye = {
468
+ type: "Icon",
469
+ label: "web_blocks.icon",
470
+ category: "core",
471
+ icon: te,
472
+ group: "media",
473
+ ...p({
474
+ properties: {
475
+ styles: d(""),
476
+ icon: {
477
+ type: "string",
478
+ title: "Icon",
479
+ 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>',
480
+ ui: { "ui:widget": "icon" }
481
+ },
482
+ width: {
483
+ type: "number",
484
+ default: 16,
485
+ title: "Width"
486
+ },
487
+ height: {
488
+ type: "number",
489
+ default: 16,
490
+ title: "Height"
491
+ }
492
+ }
493
+ })
494
+ }, Ze = (e) => {
495
+ const { blockProps: t, image: l, mobileImage: n, styles: r, alt: o, height: a, width: c, lazyLoading: s } = e;
496
+ return S(l) ? /* @__PURE__ */ i(B, { className: "h-36" }) : /* @__PURE__ */ k("picture", { children: [
497
+ n && /* @__PURE__ */ i("source", { srcSet: n, media: "(max-width: 480px)" }),
498
+ /* @__PURE__ */ i(
499
+ "img",
500
+ {
501
+ ...t,
502
+ ...r,
503
+ src: l,
504
+ alt: o,
505
+ loading: s ? "lazy" : "eager",
506
+ width: c,
507
+ height: a
508
+ }
509
+ )
510
+ ] });
511
+ }, Je = {
512
+ type: "Image",
513
+ label: "Image",
514
+ category: "core",
515
+ icon: U,
516
+ group: "media",
517
+ ...p({
518
+ properties: {
519
+ styles: d(""),
520
+ image: {
521
+ type: "string",
522
+ title: "Image",
523
+ default: "https://fakeimg.pl/400x200?text=Choose&font=bebas",
524
+ ui: { "ui:widget": "image" }
525
+ },
526
+ alt: {
527
+ type: "string",
528
+ title: "Alt text",
529
+ default: "",
530
+ ui: { "ui:placeholder": "Enter alt text" }
531
+ },
532
+ lazyLoading: {
533
+ type: "boolean",
534
+ title: "Lazy Load",
535
+ default: !0
536
+ },
537
+ width: {
538
+ type: "number",
539
+ title: "Width",
540
+ default: "",
541
+ ui: { "ui:placeholder": "Enter width" }
542
+ },
543
+ height: {
544
+ type: "number",
545
+ title: "Height",
546
+ default: "",
547
+ ui: { "ui:placeholder": "Enter height" }
548
+ },
549
+ mobileImage: {
550
+ type: "string",
551
+ title: "Mobile Image",
552
+ default: "",
553
+ ui: { "ui:widget": "image" }
554
+ }
555
+ }
556
+ }),
557
+ aiProps: ["alt"],
558
+ i18nProps: ["alt"]
559
+ }, Ke = (e) => {
560
+ const { blockProps: t, children: l, styles: n, inBuilder: r, content: o, href: a } = e, { hrefType: c, autoplay: s, maxWidth: g, backdropColor: m, galleryName: h } = e, y = T(n, "cb-lightbox");
561
+ if (!l && S(n == null ? void 0 : n.className) && S(o))
562
+ return /* @__PURE__ */ i(B, { inBuilder: r });
563
+ if (r)
564
+ return l ? /* @__PURE__ */ i("span", { ...t, ...y, children: l }) : w.createElement("span", {
565
+ ...t,
566
+ ...y,
567
+ dangerouslySetInnerHTML: { __html: o }
568
+ });
569
+ const f = {};
570
+ return c !== "image" && (f["data-vbtype"] = c), s && (f["data-autoplay"] = "true"), g && (f["data-maxwidth"] = g + "px"), m && (f["data-overlay"] = m), h && (f["data-gall"] = h), l ? /* @__PURE__ */ i("a", { "aria-label": o, ...f, href: a || "#/", ...t, ...y, children: l }) : w.createElement("a", {
571
+ ...t,
572
+ ...y,
573
+ ...f,
574
+ href: a || "#",
575
+ dangerouslySetInnerHTML: { __html: o },
576
+ "aria-label": o
577
+ });
578
+ }, Qe = {
579
+ type: "LightBoxLink",
580
+ label: "Lightbox Link",
581
+ category: "core",
582
+ icon: U,
583
+ group: "basic",
584
+ ...p({
585
+ properties: {
586
+ styles: d(""),
587
+ content: {
588
+ type: "string",
589
+ title: "Content",
590
+ default: "Link text or drop blocks inside"
591
+ },
592
+ hrefType: {
593
+ type: "string",
594
+ title: "Type",
595
+ default: "image",
596
+ enum: ["image", "video", "iframe", "inline", "ajax"],
597
+ enumNames: ["Image", "Video", "Iframe", "Inline", "Ajax"]
598
+ },
599
+ href: {
600
+ type: "string",
601
+ title: "Href",
602
+ default: ""
603
+ },
604
+ autoplay: {
605
+ type: "boolean",
606
+ title: "Autoplay (Video only)",
607
+ default: !1
608
+ },
609
+ maxWidth: {
610
+ type: "number",
611
+ title: "Max Width",
612
+ default: ""
613
+ },
614
+ backdropColor: {
615
+ type: "string",
616
+ title: "Backdrop Color",
617
+ default: ""
618
+ },
619
+ galleryName: {
620
+ type: "string",
621
+ title: "Gallery Name",
622
+ default: ""
623
+ }
624
+ },
625
+ dependencies: {
626
+ autoplay: ["hrefType", "video"]
627
+ }
628
+ }),
629
+ i18nProps: ["content"],
630
+ aiProps: ["content"],
631
+ canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
632
+ }, et = (e) => {
633
+ const { blockProps: t, link: l, children: n, styles: r, inBuilder: o, content: a } = e;
634
+ let c = {};
635
+ return !n && S(a) && (c = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), o ? n ? /* @__PURE__ */ i("span", { ...t, style: c, ...r, children: n }) : I(
242
636
  "span",
243
637
  {
244
- ...l,
245
- ...a,
246
- style: i,
247
- "data-ai-key": "content"
638
+ ...t,
639
+ ...r,
640
+ style: c
248
641
  },
249
- n
250
- ) : 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(
642
+ a
643
+ ) : n ? /* @__PURE__ */ i("a", { "aria-label": a, href: (l == null ? void 0 : l.href) || "#/", target: l == null ? void 0 : l.target, ...t, ...r, children: n }) : I(
251
644
  "a",
252
645
  {
253
- ...l,
254
- ...a,
255
- "data-ai-key": "content",
256
- href: (t == null ? void 0 : t.href) || "#",
257
- target: (t == null ? void 0 : t.target) || "_self"
646
+ ...t,
647
+ ...r,
648
+ href: (l == null ? void 0 : l.href) || "#",
649
+ target: (l == null ? void 0 : l.target) || "_self",
650
+ "aria-label": a
258
651
  },
259
- n
652
+ a
260
653
  );
261
- }, Ce = {
654
+ }, tt = {
262
655
  type: "Link",
263
656
  label: "Link",
264
657
  category: "core",
265
- icon: Y,
658
+ icon: le,
266
659
  group: "basic",
267
- props: {
268
- styles: m({ default: "" }),
269
- content: p({ title: "Content", default: "", ai: !0, i18n: !0 }),
270
- link: D({
271
- title: "Link",
272
- default: { type: "collection", target: "_self", href: "" }
273
- })
274
- },
660
+ ...p({
661
+ properties: {
662
+ styles: d(""),
663
+ content: {
664
+ type: "string",
665
+ default: "Link goes here",
666
+ title: "Content"
667
+ },
668
+ link: {
669
+ type: "object",
670
+ properties: {
671
+ type: { type: "string" },
672
+ href: { type: "string" },
673
+ target: { type: "string" }
674
+ },
675
+ default: {
676
+ type: "url",
677
+ href: "",
678
+ target: "_self"
679
+ },
680
+ ui: {
681
+ "ui:field": "link"
682
+ }
683
+ }
684
+ }
685
+ }),
686
+ aiProps: ["content"],
687
+ i18nProps: ["content"],
275
688
  canAcceptBlock: (e) => e !== "Link"
276
- }, q = (e, ...l) => ({
277
- ...e,
278
- className: j(e.className, ...l)
279
- }), Se = (e) => {
280
- const { blockProps: l, children: t, styles: o, inBuilder: a, content: r, href: n } = e, { hrefType: i, autoplay: c, maxWidth: d, backdropColor: h, galleryName: f } = e, g = q(o, "cb-lightbox");
281
- if (!t && k(o == null ? void 0 : o.className) && k(r))
282
- return /* @__PURE__ */ s.jsx(_, { inBuilder: a });
283
- if (a)
284
- return t ? /* @__PURE__ */ s.jsx("span", { ...l, ...g, children: t }) : b.createElement("span", {
285
- ...l,
286
- ...g,
287
- dangerouslySetInnerHTML: { __html: r }
288
- });
289
- const x = {};
290
- return x["data-vbtype"] = i, c && (x["data-autoplay"] = "true"), d && (x["data-maxwidth"] = d + "px"), h && (x["data-overlay"] = h), f && (x["data-gall"] = f), t ? /* @__PURE__ */ s.jsx("a", { ...x, href: n || "#/", ...l, ...g, children: t }) : b.createElement("a", {
291
- ...l,
292
- ...g,
293
- ...x,
294
- href: n || "#",
295
- dangerouslySetInnerHTML: { __html: r }
296
- });
297
- }, Me = {
298
- type: "LightBoxLink",
299
- label: "Lightbox Link",
300
- category: "core",
301
- icon: z,
302
- group: "basic",
303
- props: {
304
- styles: m({ default: "" }),
305
- content: p({ title: "Content", default: "Link text or drop blocks inside", ai: !0, i18n: !0 }),
306
- href: p({ title: "Href", default: "" }),
307
- hrefType: v({
308
- title: "Type",
309
- default: "video",
310
- options: [
311
- { value: "video", title: "Video" },
312
- { value: "iframe", title: "Iframe" },
313
- { value: "inline", title: "Inline" },
314
- { value: "ajax", title: "Ajax" }
315
- ]
316
- }),
317
- autoplay: y({ title: "Autoplay", default: !1 }),
318
- maxWidth: B({ title: "Max Width", default: "" }),
319
- backdropColor: p({ title: "Backdrop Color", default: "" }),
320
- galleryName: p({ title: "Gallery Name", default: "" })
321
- },
322
- canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
323
- }, Ne = (e) => {
324
- const { blockProps: l, children: t, listType: o, styles: a, tag: r, inBuilder: n } = e, i = j(w(a, "className", ""), o);
325
- return !t && k(a == null ? void 0 : a.className) ? /* @__PURE__ */ s.jsx(_, { inBuilder: n }) : b.createElement(
326
- r || (o === "list-decimal" ? "ol" : "ul"),
327
- { ...l, ...a, className: i },
328
- t
689
+ }, lt = (e) => {
690
+ const { blockProps: t, children: l, listType: n, styles: r, tag: o, inBuilder: a } = e, c = P(v(r, "className", ""), n);
691
+ return !l && S(r == null ? void 0 : r.className) ? /* @__PURE__ */ i(B, { inBuilder: a }) : w.createElement(
692
+ o || (n === "list-decimal" ? "ol" : "ul"),
693
+ { ...t, ...r, className: c },
694
+ l
329
695
  );
330
- }, Pe = {
696
+ }, rt = {
331
697
  type: "List",
332
698
  label: "web_blocks.list",
333
- icon: Z,
699
+ icon: re,
334
700
  category: "core",
335
701
  group: "basic",
336
- props: {
337
- styles: m({ default: "" }),
338
- listType: v({
339
- title: "web_blocks.list_type",
340
- default: "list-none",
341
- options: [
342
- { value: "list-none", title: "web_blocks.none" },
343
- { value: "list-disc", title: "web_blocks.disc" },
344
- { value: "list-decimal", title: "web_blocks.number" }
345
- ]
346
- })
347
- },
702
+ ...p({
703
+ properties: {
704
+ styles: d(""),
705
+ listType: {
706
+ type: "string",
707
+ title: "List Type",
708
+ default: "list-none",
709
+ oneOf: [
710
+ { enum: ["list-none"], title: "List None" },
711
+ { enum: ["list-disc"], title: "Disc" },
712
+ { enum: ["list-decimal"], title: "Decimal" }
713
+ ]
714
+ }
715
+ }
716
+ }),
348
717
  canAcceptBlock: (e) => e === "ListItem",
349
718
  blocks: [
350
719
  { _type: "List", _id: "a", listType: "list-none", styles: "#styles:," },
@@ -370,649 +739,1231 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
370
739
  content: "Item 3"
371
740
  }
372
741
  ]
373
- }, Ee = (e) => {
374
- const { blockProps: l, content: t, styles: o, children: a, tag: r } = e;
375
- return a ? b.createElement(r || "li", { ...o, ...l }, a) : b.createElement(r || "li", {
376
- ...o,
377
- ...l,
378
- "data-ai-key": "content",
379
- dangerouslySetInnerHTML: { __html: t }
742
+ }, nt = (e) => {
743
+ const { blockProps: t, content: l, styles: n, children: r, tag: o } = e;
744
+ return r ? w.createElement(o || "li", { ...n, ...t }, r) : w.createElement(o || "li", {
745
+ ...n,
746
+ ...t,
747
+ dangerouslySetInnerHTML: { __html: l }
380
748
  });
381
- }, $e = {
749
+ }, ot = {
382
750
  type: "ListItem",
383
751
  label: "List Item",
384
- icon: J,
752
+ icon: ne,
385
753
  category: "core",
386
754
  group: "basic",
387
- props: {
388
- styles: m({ default: "" }),
389
- content: L({ title: "Content", default: "List item", ai: !0, i18n: !0 })
390
- },
755
+ ...p({
756
+ properties: {
757
+ styles: d(""),
758
+ content: {
759
+ type: "string",
760
+ default: "List item",
761
+ title: "Content",
762
+ ui: {
763
+ "ui:widget": "textarea"
764
+ }
765
+ }
766
+ }
767
+ }),
768
+ i18nProps: ["content"],
769
+ aiProps: ["content"],
391
770
  canAcceptBlock: (e) => e !== "ListItem",
392
771
  canBeNested: (e) => e === "List"
393
- }, Te = (e) => {
394
- const { blockProps: l, icon: t, styles: o, width: a, inBuilder: r, height: n } = e, i = q(o, j(a ? `w-[${a}px]` : "", n ? `h-[${n}px]` : ""));
395
- if (k(t))
396
- return /* @__PURE__ */ s.jsx(_, { inBuilder: r, className: "h-8 w-14" });
397
- const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
398
- return b.createElement("span", {
399
- ...l,
400
- ...i,
401
- dangerouslySetInnerHTML: { __html: c }
402
- });
403
- }, He = {
404
- type: "Icon",
405
- label: "web_blocks.icon",
406
- category: "core",
407
- icon: K,
408
- group: "media",
409
- props: {
410
- styles: m({ default: "text-black" }),
411
- icon: N({
412
- title: "web_blocks.icon",
413
- 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>'
414
- }),
415
- width: B({ title: "web_blocks.width", default: "" }),
416
- height: B({ title: "web_blocks.height", default: "" })
417
- }
418
- }, ze = (e) => {
419
- const { blockProps: l, image: t, styles: o, alt: a, height: r, width: n, lazyLoading: i } = e;
420
- return k(t) ? /* @__PURE__ */ s.jsx(_, { className: "h-36" }) : b.createElement("img", {
421
- ...l,
422
- ...o,
423
- src: t,
424
- alt: a,
425
- loading: i ? "lazy" : "eager",
426
- height: r,
427
- width: n
428
- });
429
- }, Ae = {
430
- type: "Image",
431
- label: "Image",
772
+ }, it = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ i("span", { ...e.blockProps, children: e.content }) : `${e.content}`, at = {
773
+ type: "Text",
774
+ label: "Text",
775
+ hidden: !0,
432
776
  category: "core",
433
- icon: z,
434
- group: "media",
435
- props: {
436
- styles: m({ default: "" }),
437
- image: C({
438
- title: "Image",
439
- default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
440
- }),
441
- alt: p({ title: "Alt text", default: "", ai: !0, i18n: !0 }),
442
- width: p({ title: "Width", default: "" }),
443
- height: p({ title: "Height", default: "" }),
444
- lazyLoading: y({ title: "Lazy Load", default: !0 })
445
- }
446
- }, P = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, E = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, $ = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Re = (e) => {
447
- if (P.test(e)) {
448
- const l = e.match(P);
449
- return l ? `https://www.youtube.com/embed/${l[4]}` : e;
777
+ group: "typography",
778
+ icon: oe,
779
+ ...p({
780
+ properties: {
781
+ styles: d("text-black"),
782
+ content: {
783
+ type: "string",
784
+ default: ""
785
+ }
786
+ }
787
+ }),
788
+ aiProps: ["content"],
789
+ i18nProps: ["content"]
790
+ }, z = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, H = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, j = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, st = (e) => {
791
+ if (z.test(e)) {
792
+ const t = e.match(z);
793
+ return t ? `https://www.youtube.com/embed/${t[4]}` : e;
450
794
  }
451
- if (E.test(e)) {
452
- const l = e.match(E);
453
- return l ? `https://player.vimeo.com/video/${l[3]}` : e;
795
+ if (H.test(e)) {
796
+ const t = e.match(H);
797
+ return t ? `https://player.vimeo.com/video/${t[3]}` : e;
454
798
  }
455
- if ($.test(e)) {
456
- const l = e.match($);
457
- return l ? `https://www.dailymotion.com/embed/video/${l[4]}` : e;
799
+ if (j.test(e)) {
800
+ const t = e.match(j);
801
+ return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
458
802
  }
459
803
  return null;
460
- }, qe = b.memo(
461
- (e) => {
462
- 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);
463
- if (k(a))
464
- return /* @__PURE__ */ s.jsx(_, { inBuilder: t, className: "h-36" });
465
- let h = Re(a), f = null;
466
- if (h) {
467
- if (!k(h)) {
468
- const g = [];
469
- 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("&")}`;
470
- }
471
- f = b.createElement("iframe", {
472
- ...l,
473
- className: "absolute inset-0 w-full h-full",
474
- src: h,
475
- allow: t ? "" : "autoplay *; fullscreen *",
476
- allowFullScreen: !0,
477
- frameBorder: 0
478
- });
479
- } else
480
- f = b.createElement("video", {
481
- ...l,
482
- className: "absolute inset-0 w-full h-full",
483
- src: a,
484
- controls: i,
485
- muted: c,
486
- autoPlay: t ? !1 : n,
487
- loop: d
488
- });
489
- return /* @__PURE__ */ s.jsx("div", { ...ne(o, ["className"]), children: /* @__PURE__ */ s.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
490
- t ? /* @__PURE__ */ s.jsx("div", { ...l, ...ie(o, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
491
- f
492
- ] }) });
493
- }
494
- ), De = {
495
- type: "Video",
496
- label: "Video",
497
- category: "core",
498
- icon: Q,
804
+ }, ct = w.memo((e) => {
805
+ const { blockProps: t, inBuilder: l, styles: n, url: r, controls: o } = e, a = v(o, "autoPlay", !1), c = v(o, "controls", !1), s = a || v(o, "muted", !0), g = v(o, "loop", !1);
806
+ if (S(r)) return /* @__PURE__ */ i(B, { inBuilder: l, className: "h-36" });
807
+ let m = st(r), h = null;
808
+ if (m) {
809
+ if (!S(m)) {
810
+ const y = [];
811
+ y.push(`autoplay=${a ? 1 : 0}`), y.push(`controls=${o ? 1 : 0}`), y.push(`mute=${s ? 1 : 0}&muted=${s ? 1 : 0}`), y.push(`loop=${g ? 1 : 0}`), m = `${m}?${y.join("&")}`;
812
+ }
813
+ h = w.createElement("iframe", {
814
+ ...t,
815
+ className: "absolute inset-0 w-full h-full",
816
+ src: m,
817
+ allow: l ? "" : "autoplay *; fullscreen *",
818
+ allowFullScreen: !0,
819
+ frameBorder: 0
820
+ });
821
+ } else
822
+ h = w.createElement("video", {
823
+ ...t,
824
+ className: "absolute inset-0 w-full h-full",
825
+ src: r,
826
+ controls: c,
827
+ muted: s,
828
+ autoPlay: l ? !1 : a,
829
+ loop: g
830
+ });
831
+ return /* @__PURE__ */ i("div", { ...ue(n, ["className"]), children: /* @__PURE__ */ k("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
832
+ l ? /* @__PURE__ */ i("div", { ...t, ...pe(n, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
833
+ h
834
+ ] }) });
835
+ }), dt = {
836
+ type: "Video",
837
+ label: "Video",
838
+ category: "core",
839
+ icon: ie,
499
840
  group: "media",
500
- props: {
501
- styles: m({ default: "" }),
502
- url: p({
503
- title: "Video URL",
504
- default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann",
505
- i18n: !0
506
- }),
507
- controls: F({
508
- title: "Controls",
509
- properties: {
510
- autoPlay: y({ title: "Autoplay", default: !0 }),
511
- controls: y({ title: "Controls", default: !1 }),
512
- loop: y({ title: "Loop", default: !1 }),
513
- muted: y({ title: "Muted", default: !0 })
841
+ ...p({
842
+ properties: {
843
+ styles: d(""),
844
+ url: {
845
+ type: "string",
846
+ title: "Video URL",
847
+ default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
848
+ },
849
+ controls: {
850
+ type: "object",
851
+ title: "Controls",
852
+ default: {
853
+ autoplay: !1,
854
+ controls: !0,
855
+ loop: !1,
856
+ muted: !1
857
+ },
858
+ properties: {
859
+ autoplay: {
860
+ type: "boolean",
861
+ title: "Autoplay",
862
+ default: !1
863
+ },
864
+ controls: {
865
+ type: "boolean",
866
+ title: "Show Controls",
867
+ default: !0
868
+ },
869
+ loop: {
870
+ type: "boolean",
871
+ title: "Loop Video",
872
+ default: !1
873
+ },
874
+ muted: {
875
+ type: "boolean",
876
+ title: "Muted",
877
+ default: !1
878
+ }
879
+ }
514
880
  }
515
- })
881
+ }
882
+ }),
883
+ i18nProps: ["url"]
884
+ }, A = {
885
+ wrapper: { "x-data": "{ open: false }" },
886
+ button: { "x-on:click": "open = !open" },
887
+ menu: {
888
+ "x-show": "open",
889
+ "x-on:click": "open = false",
890
+ "x-on:click.away": "open = false",
891
+ "x-cloak": "",
892
+ "x-transition": ""
516
893
  }
894
+ }, ut = (e) => {
895
+ const { blockProps: t, content: l, icon: n, iconWidth: r, iconHeight: o, styles: a, show: c } = e;
896
+ return /* @__PURE__ */ k("button", { "aria-label": l, ...t, ...a, ...A.button, children: [
897
+ l,
898
+ /* @__PURE__ */ i(
899
+ "span",
900
+ {
901
+ className: c ? "rotate-180" : "",
902
+ dangerouslySetInnerHTML: { __html: n },
903
+ style: { width: r, height: o }
904
+ }
905
+ )
906
+ ] });
517
907
  };
518
- function Fe(e) {
519
- 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);
520
- }
521
- const Ge = (e) => {
522
- const { scripts: l, inBuilder: t, blockProps: o } = e;
523
- return t ? /* @__PURE__ */ s.jsx("div", { ...o, 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 } });
524
- }, Ve = {
525
- type: "CustomScript",
526
- label: "web_blocks.custom_script",
527
- category: "core",
528
- icon: Fe,
908
+ u(ut, {
909
+ type: "DropdownButton",
910
+ label: "Dropdown Button",
529
911
  group: "advanced",
530
- props: {
531
- scripts: T({
532
- title: "Script",
533
- default: "",
534
- placeholder: "<script>console.log('Hello, world!');<\/script>"
535
- })
536
- }
537
- }, Ue = (e) => {
538
- const { blockProps: l, styles: t } = e;
539
- return b.createElement("hr", { ...t, ...l });
540
- }, Oe = {
541
- type: "Divider",
542
- label: "web_blocks.divider",
543
912
  category: "core",
544
- icon: ee,
913
+ hidden: !0,
914
+ canMove: () => !1,
915
+ canDelete: () => !1,
916
+ ...p({
917
+ properties: {
918
+ show: _("Dropdown", "showDropdown"),
919
+ content: { type: "string", title: "Title", default: "Menu Item" },
920
+ icon: { type: "string", title: "Icon", default: "", ui: { "ui:widget": "icon" } },
921
+ iconWidth: { type: "string", title: "Icon Width", default: "16px" },
922
+ iconHeight: { type: "string", title: "Icon Height", default: "16px" },
923
+ styles: d("flex items-center gap-2 px-4 py-1")
924
+ }
925
+ }),
926
+ i18nProps: ["content"],
927
+ aiProps: ["content"]
928
+ });
929
+ const pt = (e) => {
930
+ const { blockProps: t, children: l, styles: n, show: r, inBuilder: o } = e;
931
+ return o && !r ? null : /* @__PURE__ */ i("div", { ...t, ...A.menu, ...n, children: l });
932
+ };
933
+ u(pt, {
934
+ type: "DropdownContent",
935
+ label: "Dropdown Content",
545
936
  group: "basic",
546
- props: {
547
- styles: m({ default: "bg-gray-900 h-0.5 py-2 my-1" })
548
- }
549
- }, We = () => null, Xe = {
550
- type: "Dark Mode",
551
- label: "web_blocks.dark_mode",
552
- category: "core",
553
- icon: te,
554
- group: "advanced",
555
- props: {},
937
+ hidden: !0,
938
+ canMove: () => !1,
939
+ canDelete: () => !1,
940
+ canAcceptBlock: () => !0,
941
+ ...p({
942
+ properties: {
943
+ show: _("Dropdown", "showDropdown"),
944
+ styles: d("absolute left-0 p-2 w-80 mt-2 bg-white rounded-lg shadow-lg z-50")
945
+ }
946
+ })
947
+ });
948
+ const yt = (e) => {
949
+ const { blockProps: t, children: l, styles: n } = e;
950
+ return /* @__PURE__ */ i("div", { ...t, ...n, ...A.wrapper, children: l });
951
+ }, gt = {
952
+ type: "Dropdown",
953
+ label: "Dropdown",
954
+ group: "basic",
955
+ icon: O,
556
956
  blocks: () => [
557
- { _id: "ultqCh", _type: "Span", tag: "span", styles: "#styles:,", _name: "Dark Mode Switcher" },
558
- {
559
- _id: "vroabi",
560
- _parent: "ultqCh",
561
- _type: "Button",
562
- // @ts-ignore
563
- styles_attrs: { type: "button", "x-on:click": "darkMode = 'dark'", "x-show": "darkMode === 'light'" },
564
- styles: "#styles:,bg-white dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",
565
- _name: "Dark Mode Btn"
566
- },
567
- {
568
- _id: "eweibk",
569
- _parent: "vroabi",
570
- _type: "Span",
571
- tag: "span",
572
- styles: "#styles:,group inline-flex shrink-0 justify-center items-center size-9"
573
- },
574
- {
575
- _id: "nltBrv",
576
- _parent: "eweibk",
577
- _type: "Icon",
578
- styles: "#styles:, shrink-0 size-4",
579
- 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'><path d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'></path></svg>"
580
- },
957
+ { _type: "Dropdown", _id: "dropdown" },
581
958
  {
582
- _id: "gesydi",
583
- _parent: "ultqCh",
584
- _type: "Button",
585
- // @ts-ignore
586
- styles_attrs: { type: "button", "x-on:click": "darkMode = 'light'", "x-show": "darkMode === 'dark'" },
587
- styles: "#styles:,bg-white dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",
588
- _name: "Light Mode Btn"
959
+ _type: "DropdownButton",
960
+ _id: "button",
961
+ _parent: "dropdown",
962
+ title: "Menu Item",
963
+ icon: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24"> <path d="M16.293 9.293 12 13.586 7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z"/> </svg>',
964
+ styles: "#styles:,flex items-center gap-2 px-4 py-1"
589
965
  },
590
966
  {
591
- _id: "sgbhDo",
592
- _parent: "gesydi",
593
- _type: "Span",
594
- tag: "span",
595
- styles: "#styles:,group inline-flex shrink-0 justify-center items-center size-9"
967
+ _type: "DropdownContent",
968
+ _id: "content",
969
+ _parent: "dropdown",
970
+ styles: "#styles:,absolute left-0 w-80 mt-0.5 bg-white rounded-lg shadow-lg z-50"
596
971
  },
597
972
  {
598
- _id: "AdDwBC",
599
- _parent: "sgbhDo",
600
- _type: "Icon",
601
- styles: "#styles:, shrink-0 size-4",
602
- 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>"
973
+ _type: "Link",
974
+ _id: "link",
975
+ _parent: "content",
976
+ content: "Link",
977
+ styles: "#styles:,flex items-center gap-2 px-4 py-1",
978
+ link: { href: "https://www.google.com", type: "url", target: "_self" }
603
979
  }
604
- ]
605
- }, Ye = (e) => {
606
- const { blockProps: l, inBuilder: t, children: o, globalBlock: a } = e;
607
- return t && !a ? /* @__PURE__ */ s.jsxs(
608
- "div",
980
+ ],
981
+ category: "core",
982
+ wrapper: !0,
983
+ ...p({
984
+ properties: {
985
+ showDropdown: F({
986
+ type: "boolean",
987
+ title: "Show Dropdown",
988
+ default: !1
989
+ }),
990
+ styles: d("relative w-max")
991
+ }
992
+ })
993
+ }, mt = (e) => {
994
+ const { blockProps: t, fieldName: l, label: n, styles: r, inputStyles: o, required: a, checked: c, showLabel: s = !0 } = e, g = C();
995
+ return s ? /* @__PURE__ */ k("div", { ...r, ...t, children: [
996
+ /* @__PURE__ */ i(
997
+ "input",
998
+ {
999
+ ...o,
1000
+ name: l,
1001
+ id: g,
1002
+ type: "checkbox",
1003
+ required: a,
1004
+ defaultChecked: c
1005
+ }
1006
+ ),
1007
+ n && /* @__PURE__ */ i("label", { htmlFor: g, children: n })
1008
+ ] }) : /* @__PURE__ */ i(
1009
+ "input",
609
1010
  {
610
- className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
611
- ...l,
612
- children: [
613
- /* @__PURE__ */ s.jsxs("h1", { children: [
614
- "Global Block - ",
615
- a
616
- ] }),
617
- /* @__PURE__ */ s.jsx("p", { children: "Choose a block from the sidebar to add it to this page." })
618
- ]
1011
+ id: g,
1012
+ ...t,
1013
+ ...o,
1014
+ ...r,
1015
+ type: "checkbox",
1016
+ required: a,
1017
+ name: l
619
1018
  }
620
- ) : b.createElement("div", { ...l }, o);
621
- }, Ze = {
622
- type: "GlobalBlock",
623
- label: "Global Block",
624
- icon: ce,
625
- category: "core",
626
- group: "advanced",
627
- props: {
628
- globalBlock: p({ title: "global block", default: "", hidden: !0 })
629
- }
630
- }, Je = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", ...e.blockProps, children: e.content }) : `${e.content}`, Ke = {
631
- type: "Text",
632
- label: "Text",
633
- hidden: !0,
634
- category: "core",
635
- group: "typography",
636
- icon: A,
637
- props: {
638
- content: L({ title: "Content", default: "", ai: !0, i18n: !0 })
639
- }
640
- }, Qe = (e) => {
641
- const { blockProps: l, backgroundImage: t, children: o, styles: a } = e;
642
- let r = {};
643
- return t && (r = { backgroundImage: `url(${t})` }), b.createElement("div", { ...l, ...a, style: r }, o);
644
- }, et = {
645
- type: "Body",
646
- label: "Body",
647
- category: "core",
648
- group: "basic",
649
- hidden: !0,
650
- props: {
651
- styles: m({ default: "font-body antialiased" }),
652
- backgroundImage: C({ title: "Background Image" })
653
- },
654
- canAcceptBlock: () => !0,
655
- canDelete: () => !1,
656
- canMove: () => !1,
657
- canDuplicate: () => !1
658
- }, tt = (e) => {
659
- const { blockProps: l, styles: t } = e;
660
- return b.createElement("br", { ...l, ...t });
661
- }, lt = {
662
- type: "LineBreak",
663
- label: "Line Break",
1019
+ );
1020
+ }, ht = {
1021
+ type: "Checkbox",
1022
+ label: "web_blocks.checkbox",
664
1023
  category: "core",
665
- group: "basic",
666
- hidden: !0,
667
- icon: A,
668
- props: {
669
- styles: m({ default: "" })
670
- }
671
- }, ot = (e) => {
672
- const { blockProps: l, errorMessage: t, name: o, _type: a, successMessage: r, action: n, styles: i, children: c } = e;
673
- let d = c;
674
- c || (d = /* @__PURE__ */ s.jsx(_, {}));
675
- const h = {
676
- "x-data": "{}",
677
- "x-on:submit.prevent": "post"
678
- }, f = {
679
- "x-html": "",
680
- ":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
681
- };
682
- return /* @__PURE__ */ s.jsxs(
1024
+ icon: ae,
1025
+ group: "form",
1026
+ ...p({
1027
+ properties: {
1028
+ styles: d("flex items-center gap-x-2"),
1029
+ inputStyles: d(""),
1030
+ fieldName: {
1031
+ type: "string",
1032
+ title: "Field Name",
1033
+ default: "fieldName"
1034
+ },
1035
+ label: {
1036
+ type: "string",
1037
+ title: "Label",
1038
+ default: "Label"
1039
+ },
1040
+ checked: {
1041
+ type: "boolean",
1042
+ title: "Checked",
1043
+ default: !1
1044
+ },
1045
+ required: {
1046
+ type: "boolean",
1047
+ title: "Required",
1048
+ default: !1
1049
+ },
1050
+ showLabel: {
1051
+ type: "boolean",
1052
+ title: "Show Label",
1053
+ default: !0
1054
+ }
1055
+ }
1056
+ }),
1057
+ aiProps: ["label"],
1058
+ i18nProps: ["label"]
1059
+ }, ft = (e) => {
1060
+ const { children: t, blockProps: l, errorMessage: n, successMessage: r, action: o, styles: a, inBuilder: c } = e;
1061
+ let s = t;
1062
+ return t || (s = /* @__PURE__ */ i(B, { inBuilder: c })), /* @__PURE__ */ k(
683
1063
  "form",
684
1064
  {
685
- ...h,
686
- "data-error": t,
1065
+ ...{
1066
+ "x-data": "{}",
1067
+ "x-on:submit.prevent": "post"
1068
+ },
1069
+ "data-error": n,
687
1070
  "data-success": r,
688
1071
  method: "post",
689
- action: n,
1072
+ action: o,
690
1073
  ...l,
691
- ...i,
1074
+ ...a,
692
1075
  children: [
693
- /* @__PURE__ */ s.jsx("div", { ...f }),
694
- /* @__PURE__ */ s.jsx("input", { name: "formname", type: "hidden", value: o || a }),
695
- d
1076
+ /* @__PURE__ */ i("div", { ...{
1077
+ "x-html": "",
1078
+ ":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
1079
+ } }),
1080
+ s
696
1081
  ]
697
1082
  }
698
1083
  );
699
- }, at = {
1084
+ }, bt = {
700
1085
  type: "Form",
701
1086
  label: "Form",
702
1087
  category: "core",
703
- icon: le,
1088
+ icon: ge,
704
1089
  group: "form",
705
- props: {
706
- styles: m({ default: "" }),
707
- action: p({
708
- title: "Submit URL",
709
- default: "/api/form/submit"
710
- }),
711
- errorMessage: S({
712
- title: "Error Message",
713
- default: "Something went wrong. Please try again"
714
- }),
715
- successMessage: S({
716
- title: "Success Message",
717
- default: "Thank you for your submission."
718
- })
719
- },
1090
+ blocks: () => [
1091
+ { _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
1092
+ { _type: "Input", _id: "form_input", _parent: "form", styles: "#styles:," },
1093
+ {
1094
+ _type: "FormButton",
1095
+ _id: "form_submit_btn",
1096
+ _parent: "form",
1097
+ styles: "#styles:bg-black text-white rounded px-3 py-1,"
1098
+ }
1099
+ ],
1100
+ ...p({
1101
+ properties: {
1102
+ styles: d(""),
1103
+ action: {
1104
+ type: "string",
1105
+ title: "Submit URL",
1106
+ default: "/api/form/submit"
1107
+ },
1108
+ errorMessage: {
1109
+ type: "string",
1110
+ title: "Error Message",
1111
+ default: "Something went wrong. Please try again",
1112
+ ui: { "ui:widget": "richtext" }
1113
+ },
1114
+ successMessage: {
1115
+ type: "string",
1116
+ title: "Success Message",
1117
+ default: "Thank you for your submission.",
1118
+ ui: { "ui:widget": "richtext" }
1119
+ }
1120
+ }
1121
+ }),
1122
+ i18nProps: ["errorMessage", "successMessage"],
1123
+ aiProps: ["errorMessage", "successMessage"],
720
1124
  canAcceptBlock: () => !0
721
- }, st = (e) => {
722
- const { blockProps: l, inBuilder: t, label: o, styles: a, inputStyles: r, icon: n, iconPos: i } = e, c = I(), d = {
723
- "x-bind:disabled": "formLoading"
724
- };
725
- return /* @__PURE__ */ s.jsxs(
1125
+ }, wt = (e) => {
1126
+ const { blockProps: t, inBuilder: l, label: n, styles: r, inputStyles: o, icon: a, iconSize: c, iconPos: s } = e, g = C();
1127
+ return /* @__PURE__ */ k(
726
1128
  "button",
727
1129
  {
728
- id: c,
729
- ...d,
1130
+ id: g,
1131
+ ...{
1132
+ "x-bind:disabled": "formLoading"
1133
+ },
1134
+ ...o,
730
1135
  ...r,
731
- ...a,
732
- ...l || {},
733
- type: t ? "button" : "submit",
1136
+ ...t || {},
1137
+ type: l ? "button" : "submit",
1138
+ "aria-label": n,
734
1139
  children: [
735
- o,
736
- n && /* @__PURE__ */ s.jsx("span", { className: i, dangerouslySetInnerHTML: { __html: n } })
1140
+ n,
1141
+ a && /* @__PURE__ */ i(
1142
+ "div",
1143
+ {
1144
+ style: { width: c + "px" },
1145
+ className: s + " " + (s === "order-first" ? "mr-2" : "ml-2") || "",
1146
+ dangerouslySetInnerHTML: { __html: a }
1147
+ }
1148
+ )
737
1149
  ]
738
1150
  }
739
1151
  );
740
- }, rt = {
1152
+ }, kt = {
741
1153
  type: "FormButton",
742
1154
  label: "Submit Button",
743
1155
  category: "core",
744
- icon: H,
1156
+ icon: q,
745
1157
  group: "form",
746
- props: {
747
- label: p({ title: "Label", default: "Submit", ai: !0, i18n: !0 }),
748
- styles: m({
749
- default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
750
- }),
751
- icon: N({ title: "Icon", default: "" }),
752
- iconPos: v({
753
- title: "Icon Position",
754
- default: "order-last",
755
- options: [
756
- { title: "Start", value: "order-first" },
757
- { title: "End", value: "order-last" }
758
- ]
759
- })
760
- }
761
- }, nt = (e) => {
762
- const {
763
- blockProps: l,
764
- label: t,
765
- placeholder: o,
766
- styles: a,
767
- inputStyles: r,
768
- showLabel: n,
769
- required: i,
770
- inputType: c = "text",
771
- inBuilder: d,
772
- fieldName: h
773
- } = e, f = I();
774
- return !n || c === "submit" ? (c === "submit" && (l.value = t), /* @__PURE__ */ s.jsx(
775
- "input",
776
- {
777
- id: f,
778
- name: h,
779
- readOnly: d,
780
- ...l,
781
- ...r,
782
- ...a,
783
- type: c,
784
- placeholder: o,
785
- required: i
1158
+ ...p({
1159
+ properties: {
1160
+ styles: d(
1161
+ "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
1162
+ ),
1163
+ inputStyles: d(""),
1164
+ label: {
1165
+ type: "string",
1166
+ title: "Label",
1167
+ default: "Submit",
1168
+ ai: !0,
1169
+ i18n: !0
1170
+ },
1171
+ icon: {
1172
+ type: "string",
1173
+ title: "Icon",
1174
+ default: "",
1175
+ ui: { "ui:widget": "icon" }
1176
+ },
1177
+ iconSize: {
1178
+ type: "number",
1179
+ title: "Icon size",
1180
+ default: 24
1181
+ },
1182
+ iconPos: {
1183
+ type: "string",
1184
+ title: "Icon Position",
1185
+ default: "order-last",
1186
+ enum: ["order-first", "order-last"]
1187
+ }
786
1188
  }
787
- )) : /* @__PURE__ */ s.jsxs("div", { ...a, ...l, children: [
788
- n && /* @__PURE__ */ s.jsx("label", { htmlFor: f, children: t }),
789
- /* @__PURE__ */ s.jsx(
1189
+ }),
1190
+ i18nProps: ["label"],
1191
+ aiProps: ["label"]
1192
+ }, vt = (e) => {
1193
+ const { blockProps: t, fieldName: l, label: n, placeholder: r, styles: o, inputStyles: a, showLabel: c, required: s, inputType: g } = e, m = C();
1194
+ return c ? /* @__PURE__ */ k("div", { ...o, ...t, children: [
1195
+ c && /* @__PURE__ */ i("label", { htmlFor: m, children: n }),
1196
+ /* @__PURE__ */ i(
790
1197
  "input",
791
1198
  {
792
- name: h,
793
- readOnly: d,
794
- ...r,
795
- id: f,
796
- type: c,
797
- placeholder: o,
798
- required: i
1199
+ name: l,
1200
+ ...a,
1201
+ id: m,
1202
+ type: g,
1203
+ placeholder: r,
1204
+ required: s
799
1205
  }
800
1206
  )
801
- ] });
802
- }, it = {
1207
+ ] }) : /* @__PURE__ */ i(
1208
+ "input",
1209
+ {
1210
+ id: m,
1211
+ name: l,
1212
+ ...t,
1213
+ ...a,
1214
+ ...o,
1215
+ type: g,
1216
+ placeholder: r,
1217
+ required: s
1218
+ }
1219
+ );
1220
+ }, xt = {
803
1221
  type: "Input",
804
- label: "Input",
1222
+ label: "web_blocks.input",
805
1223
  category: "core",
806
- icon: R,
1224
+ icon: V,
807
1225
  group: "form",
808
- props: {
809
- styles: m({ default: "" }),
810
- fieldName: p({ title: "Field Name", default: "input" }),
811
- inputType: v({
812
- title: "Type",
813
- options: M(
814
- ["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
815
- (e) => ({
816
- value: e,
817
- title: e
818
- })
819
- ),
820
- default: "text"
821
- }),
822
- value: p({ title: "Value", default: "", ai: !0, i18n: !0 }),
823
- showLabel: y({ title: "Show Label", default: !0 }),
824
- inputStyles: m({ default: "w-full p-1" }),
825
- label: p({ title: "Label", default: "Label", ai: !0, i18n: !0 }),
826
- placeholder: p({
827
- title: "Placeholder",
828
- default: "Placeholder"
829
- }),
830
- required: y({ title: "Required", default: !1 })
831
- }
832
- }, ct = (e) => {
833
- const { blockProps: l, fieldName: t, label: o, styles: a, inputStyles: r, checked: n, required: i, showLabel: c = !0 } = e, d = I();
834
- return c ? /* @__PURE__ */ s.jsxs("div", { ...a, ...l, children: [
835
- /* @__PURE__ */ s.jsx("input", { ...r, name: t, id: d, type: "radio", required: i, defaultChecked: n }),
836
- o && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: o })
837
- ] }) : /* @__PURE__ */ s.jsx(
1226
+ ...p({
1227
+ properties: {
1228
+ styles: d(""),
1229
+ inputStyles: d("w-full p-1"),
1230
+ fieldName: {
1231
+ type: "string",
1232
+ title: "Field Name",
1233
+ default: "fieldName"
1234
+ },
1235
+ showLabel: {
1236
+ type: "boolean",
1237
+ title: "Show Label",
1238
+ default: !0
1239
+ },
1240
+ label: {
1241
+ type: "string",
1242
+ title: "Label",
1243
+ default: "Label",
1244
+ ai: !0,
1245
+ i18n: !0
1246
+ },
1247
+ placeholder: {
1248
+ type: "string",
1249
+ title: "Placeholder",
1250
+ default: "Placeholder"
1251
+ },
1252
+ required: {
1253
+ type: "boolean",
1254
+ title: "Required",
1255
+ default: !1
1256
+ },
1257
+ inputType: {
1258
+ type: "string",
1259
+ title: "Input Type",
1260
+ default: "text",
1261
+ enum: [
1262
+ "text",
1263
+ "email",
1264
+ "password",
1265
+ "number",
1266
+ "tel",
1267
+ "file",
1268
+ "hidden",
1269
+ "range",
1270
+ "submit",
1271
+ "color",
1272
+ "date",
1273
+ "time"
1274
+ ]
1275
+ }
1276
+ }
1277
+ }),
1278
+ aiProps: ["label", "placeholder"],
1279
+ i18nProps: ["label", "placeholder"]
1280
+ }, St = (e) => {
1281
+ const { blockProps: t, content: l, styles: n, children: r } = e, o = { ...n, ...t };
1282
+ return r ? w.createElement("label", o, r) : w.createElement("label", {
1283
+ ...o,
1284
+ dangerouslySetInnerHTML: { __html: l }
1285
+ });
1286
+ }, _t = {
1287
+ type: "Label",
1288
+ label: "Label",
1289
+ category: "core",
1290
+ icon: se,
1291
+ group: "form",
1292
+ ...p({
1293
+ properties: {
1294
+ styles: d(),
1295
+ content: {
1296
+ type: "string",
1297
+ title: "Content",
1298
+ default: ""
1299
+ }
1300
+ }
1301
+ }),
1302
+ aiProps: ["content"],
1303
+ i18nProps: ["content"]
1304
+ }, Bt = (e) => {
1305
+ const { blockProps: t, fieldName: l, label: n, styles: r, inputStyles: o, required: a, checked: c, showLabel: s = !0 } = e, g = C();
1306
+ return s ? /* @__PURE__ */ k("div", { ...r, ...t, children: [
1307
+ /* @__PURE__ */ i("input", { ...o, name: l, id: g, type: "radio", required: a, defaultChecked: c }),
1308
+ n && /* @__PURE__ */ i("label", { htmlFor: g, children: n })
1309
+ ] }) : /* @__PURE__ */ i(
838
1310
  "input",
839
1311
  {
840
- id: d,
841
- ...l,
1312
+ id: g,
1313
+ ...t,
1314
+ ...o,
842
1315
  ...r,
843
- ...a,
844
1316
  type: "radio",
845
- required: i,
846
- checked: n,
847
- name: t
1317
+ required: a,
1318
+ checked: c,
1319
+ name: l
848
1320
  }
849
1321
  );
850
- }, dt = {
1322
+ }, It = {
851
1323
  type: "Radio",
852
1324
  label: "web_blocks.radio",
853
1325
  category: "core",
854
- icon: oe,
1326
+ icon: ce,
855
1327
  group: "form",
856
- props: {
857
- styles: m({ default: "flex items-center w-max gap-x-2" }),
858
- fieldName: p({ title: "web_blocks.field_name", default: "radio" }),
859
- label: p({ title: "web_blocks.label", default: "Label" }),
860
- checked: y({ title: "web_blocks.checked", default: !1 }),
861
- required: y({ title: "web_blocks.required", default: !1 })
862
- }
863
- }, ut = (e) => {
864
- const {
865
- blockProps: l,
866
- fieldName: t,
867
- label: o,
868
- placeholder: a,
869
- styles: r,
870
- inputStyles: n,
871
- required: i,
872
- showLabel: c,
873
- _multiple: d = !1
874
- } = e, h = I();
875
- return c ? /* @__PURE__ */ s.jsxs("div", { ...r, children: [
876
- c && /* @__PURE__ */ s.jsx("label", { htmlFor: h, children: o }),
877
- /* @__PURE__ */ s.jsxs("select", { ...n, id: h, required: i, multiple: d, name: t, children: [
878
- /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: a }),
879
- M(e.options, (f) => /* @__PURE__ */ s.jsx(
880
- "option",
881
- {
882
- selected: w(f, "selected", !1),
883
- value: f.value,
884
- dangerouslySetInnerHTML: { __html: f.label }
885
- },
886
- f.value
887
- ))
888
- ] })
889
- ] }) : /* @__PURE__ */ s.jsxs(
890
- "select",
891
- {
892
- id: h,
893
- ...r,
894
- ...l,
895
- required: i,
896
- multiple: d,
897
- name: t,
898
- children: [
899
- /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: a }),
900
- M(e.options, (f) => /* @__PURE__ */ s.jsx(
901
- "option",
902
- {
903
- selected: w(f, "selected", !1),
904
- value: f.value,
905
- dangerouslySetInnerHTML: { __html: f.label }
906
- },
907
- f.value
908
- ))
909
- ]
1328
+ ...p({
1329
+ properties: {
1330
+ styles: d("flex items-center gap-x-2"),
1331
+ inputStyles: d(""),
1332
+ fieldName: {
1333
+ type: "string",
1334
+ title: "Field Name",
1335
+ default: "fieldName"
1336
+ },
1337
+ label: {
1338
+ type: "string",
1339
+ title: "Label",
1340
+ default: "Label"
1341
+ },
1342
+ checked: {
1343
+ type: "boolean",
1344
+ title: "Checked",
1345
+ default: !1
1346
+ },
1347
+ required: {
1348
+ type: "boolean",
1349
+ title: "Required",
1350
+ default: !1
1351
+ },
1352
+ showLabel: {
1353
+ type: "boolean",
1354
+ title: "Show Label",
1355
+ default: !0
1356
+ }
910
1357
  }
911
- );
912
- }, pt = {
1358
+ }),
1359
+ aiProps: ["label"],
1360
+ i18nProps: ["label"]
1361
+ }, Ct = (e) => {
1362
+ const { blockProps: t, fieldName: l, label: n, placeholder: r, styles: o, inputStyles: a, required: c, showLabel: s, _multiple: g, options: m } = e, h = C();
1363
+ return s ? /* @__PURE__ */ k("div", { ...o, ...t, children: [
1364
+ s && /* @__PURE__ */ i("label", { htmlFor: h, children: n }),
1365
+ /* @__PURE__ */ k("select", { ...a, id: h, required: c, multiple: g, name: l, children: [
1366
+ /* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
1367
+ R(m, (y) => /* @__PURE__ */ i("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
1368
+ ] })
1369
+ ] }) : /* @__PURE__ */ k("select", { id: h, ...o, ...t, required: c, multiple: g, name: l, children: [
1370
+ /* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
1371
+ R(m, (y) => /* @__PURE__ */ i("option", { value: y == null ? void 0 : y.value, children: y == null ? void 0 : y.label }, y == null ? void 0 : y.value))
1372
+ ] });
1373
+ }, Lt = {
913
1374
  type: "Select",
914
1375
  label: "web_blocks.select",
915
1376
  category: "core",
916
- icon: ae,
1377
+ icon: O,
917
1378
  group: "form",
918
- props: {
919
- styles: m({ default: "" }),
920
- fieldName: p({ title: "Field Name", default: "select" }),
921
- showLabel: y({ title: "Show Label", default: !0 }),
922
- inputStyles: m({ default: "w-full p-1" }),
923
- label: p({ title: "Label", default: "Label", ai: !0, i18n: !0 }),
924
- placeholder: p({
925
- title: "Placeholder",
926
- default: "Placeholder"
927
- }),
928
- required: y({ title: "Required", default: !1 }),
929
- _multiple: y({ title: "Multiple", default: !1 }),
930
- options: G({
931
- title: "Options",
932
- itemProperties: {
933
- label: p({ title: "Label", default: "", ai: !0, i18n: !0 }),
934
- value: p({ title: "Value", default: "" })
1379
+ ...p({
1380
+ properties: {
1381
+ styles: d(""),
1382
+ inputStyles: d("w-full p-1"),
1383
+ fieldName: {
1384
+ type: "string",
1385
+ title: "Field Name",
1386
+ default: "fieldName"
1387
+ },
1388
+ showLabel: {
1389
+ type: "boolean",
1390
+ title: "Show Label",
1391
+ default: !0
1392
+ },
1393
+ label: {
1394
+ type: "string",
1395
+ title: "Label",
1396
+ default: "Label"
1397
+ },
1398
+ placeholder: {
1399
+ type: "string",
1400
+ title: "Placeholder",
1401
+ default: "Placeholder"
1402
+ },
1403
+ required: {
1404
+ type: "boolean",
1405
+ title: "Required",
1406
+ default: !1
1407
+ },
1408
+ _multiple: {
1409
+ type: "boolean",
1410
+ title: "Multiple",
1411
+ default: !1
1412
+ },
1413
+ options: {
1414
+ title: "Options",
1415
+ type: "array",
1416
+ default: [],
1417
+ items: {
1418
+ type: "object",
1419
+ properties: {
1420
+ label: {
1421
+ type: "string",
1422
+ title: "Label",
1423
+ default: ""
1424
+ },
1425
+ value: {
1426
+ type: "string",
1427
+ title: "Value",
1428
+ default: ""
1429
+ }
1430
+ }
1431
+ }
935
1432
  }
936
- })
937
- }
938
- }, bt = (e) => {
939
- const { blockProps: l, fieldName: t, label: o, placeholder: a, styles: r, inputStyles: n, _rows: i, showLabel: c } = e, d = I();
940
- return c ? /* @__PURE__ */ s.jsxs("div", { ...r, ...l, children: [
941
- c && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: o }),
942
- /* @__PURE__ */ s.jsx("textarea", { name: t, ...n, id: d, placeholder: a, rows: i })
943
- ] }) : /* @__PURE__ */ s.jsx(
1433
+ }
1434
+ }),
1435
+ aiProps: ["label", "placeholder"],
1436
+ i18nProps: ["label", "placeholder"]
1437
+ }, Pt = (e) => {
1438
+ const { blockProps: t, fieldName: l, label: n, placeholder: r, styles: o, inputStyles: a, _rows: c, showLabel: s } = e, g = C();
1439
+ return s ? /* @__PURE__ */ k("div", { ...o, ...t, children: [
1440
+ s && /* @__PURE__ */ i("label", { htmlFor: g, children: n }),
1441
+ /* @__PURE__ */ i("textarea", { name: l, ...a, id: g, placeholder: r, rows: c })
1442
+ ] }) : /* @__PURE__ */ i(
944
1443
  "textarea",
945
1444
  {
946
- id: d,
947
- name: t,
948
- ...l,
949
- ...n,
950
- ...r,
951
- placeholder: a,
952
- rows: i
1445
+ id: g,
1446
+ name: l,
1447
+ ...t,
1448
+ ...a,
1449
+ ...o,
1450
+ placeholder: r,
1451
+ rows: c
953
1452
  }
954
1453
  );
955
- }, mt = {
1454
+ }, Nt = {
956
1455
  type: "TextArea",
957
1456
  label: "web_blocks.textarea",
958
1457
  category: "core",
959
- icon: R,
1458
+ icon: V,
960
1459
  group: "form",
961
- props: {
962
- fieldName: p({ title: "Field Name", default: "textarea" }),
963
- showLabel: y({ title: "Show Label", default: !0 }),
964
- styles: m({ default: "" }),
965
- inputStyles: m({ default: "w-full p-1" }),
966
- label: p({ title: "Label", default: "Label", ai: !0, i18n: !0 }),
967
- placeholder: p({
968
- title: "Placeholder",
969
- default: "Placeholder"
970
- }),
971
- _rows: B({ title: "Rows", default: 3 })
1460
+ ...p({
1461
+ properties: {
1462
+ fieldName: {
1463
+ type: "string",
1464
+ title: "Field Name",
1465
+ default: "fieldName"
1466
+ },
1467
+ styles: d(""),
1468
+ inputStyles: d("w-full p-1"),
1469
+ showLabel: {
1470
+ type: "boolean",
1471
+ title: "Show Label",
1472
+ default: !0
1473
+ },
1474
+ label: {
1475
+ type: "string",
1476
+ title: "Label",
1477
+ default: "Label",
1478
+ ui: { "ui:widget": "textarea", "ui:autosize": !0, "ui:rows": 3 }
1479
+ },
1480
+ placeholder: {
1481
+ type: "string",
1482
+ title: "Placeholder",
1483
+ default: "Placeholder"
1484
+ },
1485
+ _rows: {
1486
+ type: "number",
1487
+ title: "Rows",
1488
+ default: 3
1489
+ }
1490
+ }
1491
+ }),
1492
+ aiProps: ["label", "placeholder"],
1493
+ i18nProps: ["label", "placeholder"]
1494
+ }, Mt = (e) => {
1495
+ const { blockProps: t, backgroundImage: l, children: n, styles: r, tag: o } = e;
1496
+ let a = {};
1497
+ return l && (a = { backgroundImage: `url(${l})` }), I(o || "div", { ...t, ...r, style: a }, n);
1498
+ }, $t = {
1499
+ type: "Body",
1500
+ label: "Body",
1501
+ category: "core",
1502
+ group: "basic",
1503
+ hidden: !0,
1504
+ ...p({
1505
+ properties: {
1506
+ styles: d("font-body antialiased"),
1507
+ backgroundImage: {
1508
+ type: "string",
1509
+ title: "Image",
1510
+ default: "",
1511
+ ui: { "ui:widget": "image" }
1512
+ },
1513
+ tag: {
1514
+ type: "string",
1515
+ default: "div",
1516
+ title: "Tag",
1517
+ oneOf: [
1518
+ { const: "div", title: "div" },
1519
+ { const: "header", title: "header" },
1520
+ { const: "footer", title: "footer" },
1521
+ { const: "section", title: "section" },
1522
+ { const: "article", title: "article" },
1523
+ { const: "aside", title: "aside" },
1524
+ { const: "main", title: "main" },
1525
+ { const: "nav", title: "nav" },
1526
+ { const: "figure", title: "figure" },
1527
+ { const: "details", title: "details" },
1528
+ { const: "summary", title: "summary" },
1529
+ { const: "dialog", title: "dialog" },
1530
+ { const: "strike", title: "strike" },
1531
+ { const: "caption", title: "caption" },
1532
+ { const: "legend", title: "legend" },
1533
+ { const: "figcaption", title: "figcaption" },
1534
+ { const: "mark", title: "mark" }
1535
+ ]
1536
+ }
1537
+ }
1538
+ }),
1539
+ canAcceptBlock: () => !0,
1540
+ canDelete: () => !1,
1541
+ canMove: () => !1,
1542
+ canDuplicate: () => !1
1543
+ }, Dt = (e) => {
1544
+ const { blockProps: t, styles: l } = e;
1545
+ return I("br", { ...t, ...l });
1546
+ }, Tt = {
1547
+ type: "LineBreak",
1548
+ label: "Line Break",
1549
+ category: "core",
1550
+ group: "basic",
1551
+ hidden: !0,
1552
+ ...p({
1553
+ properties: {
1554
+ styles: d("")
1555
+ }
1556
+ }),
1557
+ canAcceptBlock: () => !0,
1558
+ canDelete: () => !1,
1559
+ canMove: () => !1,
1560
+ canDuplicate: () => !1
1561
+ }, M = {
1562
+ SMALL: {
1563
+ 1: "col-span-1",
1564
+ 2: "col-span-2",
1565
+ 3: "col-span-3",
1566
+ 4: "col-span-4",
1567
+ 5: "col-span-5",
1568
+ 6: "col-span-6",
1569
+ 7: "col-span-7",
1570
+ 8: "col-span-8",
1571
+ 9: "col-span-9",
1572
+ 10: "col-span-10",
1573
+ 11: "col-span-11",
1574
+ 12: "col-span-12"
1575
+ },
1576
+ MEDIUM: {
1577
+ 1: "md:col-span-1",
1578
+ 2: "md:col-span-2",
1579
+ 3: "md:col-span-3",
1580
+ 4: "md:col-span-4",
1581
+ 5: "md:col-span-5",
1582
+ 6: "md:col-span-6",
1583
+ 7: "md:col-span-7",
1584
+ 8: "md:col-span-8",
1585
+ 9: "md:col-span-9",
1586
+ 10: "md:col-span-10",
1587
+ 11: "md:col-span-11",
1588
+ 12: "md:col-span-12"
1589
+ },
1590
+ LARGE: {
1591
+ 1: "lg:col-span-1",
1592
+ 2: "lg:col-span-2",
1593
+ 3: "lg:col-span-3",
1594
+ 4: "lg:col-span-4",
1595
+ 5: "lg:col-span-5",
1596
+ 6: "lg:col-span-6",
1597
+ 7: "lg:col-span-7",
1598
+ 8: "lg:col-span-8",
1599
+ 9: "lg:col-span-9",
1600
+ 10: "lg:col-span-10",
1601
+ 11: "lg:col-span-11",
1602
+ 12: "lg:col-span-12"
972
1603
  }
973
- }, ft = (e) => {
974
- const { blockProps: l, fieldName: t, label: o, styles: a, inputStyles: r, required: n, checked: i, showLabel: c = !0 } = e, d = I();
975
- return c ? /* @__PURE__ */ s.jsxs("div", { ...a, ...l, children: [
976
- /* @__PURE__ */ s.jsx(
977
- "input",
978
- {
979
- ...r,
980
- name: t,
981
- id: d,
982
- type: "checkbox",
983
- required: n,
984
- defaultChecked: i
1604
+ }, At = (e) => {
1605
+ const { blockProps: t, children: l, styles: n, colSpan: r, tabletColSpan: o, desktopColSpan: a } = e, s = { className: [
1606
+ v(n, "className", ""),
1607
+ v(M, ["SMALL", isNaN(r) || !r ? 6 : r], ""),
1608
+ o ? v(M, ["MEDIUM", o || r], "") : "",
1609
+ a ? v(M, ["LARGE", o || r], "") : ""
1610
+ ].join(" ") };
1611
+ return /* @__PURE__ */ i("div", { ...t, ...n, ...s, children: l || /* @__PURE__ */ i("div", { className: "h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
1612
+ }, Et = {
1613
+ type: "Column",
1614
+ label: "Column",
1615
+ group: "basic",
1616
+ category: "core",
1617
+ icon: me,
1618
+ wrapper: !0,
1619
+ canDelete: () => !0,
1620
+ canAcceptBlock: () => !0,
1621
+ canBeNested: (e) => e === "Row",
1622
+ ...p({
1623
+ properties: {
1624
+ styles: d(""),
1625
+ colSpan: {
1626
+ type: "number",
1627
+ title: "Column Span",
1628
+ default: 6,
1629
+ enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
1630
+ },
1631
+ tabletColSpan: {
1632
+ type: "number",
1633
+ title: "Column Span (Tablet)",
1634
+ default: null,
1635
+ enumNames: ["Default", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
1636
+ enum: [null, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
1637
+ },
1638
+ desktopColSpan: {
1639
+ type: "number",
1640
+ title: "Column Span (Desktop)",
1641
+ default: null,
1642
+ enumNames: ["Default", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
1643
+ enum: [null, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
985
1644
  }
986
- ),
987
- o && o !== "Label" && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: o })
988
- ] }) : /* @__PURE__ */ s.jsx(
989
- "input",
990
- {
991
- id: d,
992
- ...l,
993
- ...r,
994
- ...a,
995
- type: "checkbox",
996
- required: n,
997
- name: t
998
1645
  }
999
- );
1000
- }, ht = {
1001
- type: "Checkbox",
1002
- label: "web_blocks.checkbox",
1646
+ })
1647
+ }, Rt = (e) => {
1648
+ const { blockProps: t, children: l, styles: n, gutter: r } = e, a = { className: [v(n, "className", ""), " grid grid-cols-12"].join() };
1649
+ return typeof (n == null ? void 0 : n.style) == "object" ? n.style.gap = `${r}px` : a.style = { gap: `${r}px` }, /* @__PURE__ */ i("div", { ...t, ...n, ...a, children: l });
1650
+ }, zt = {
1651
+ type: "Row",
1652
+ label: "Row",
1653
+ group: "basic",
1654
+ icon: he,
1655
+ blocks: () => [
1656
+ { _type: "Row", _id: "row", styles: "#styles:,p-1" },
1657
+ { _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
1658
+ { _type: "Column", id: "column", _parent: "row", styles: "#styles:," }
1659
+ ],
1003
1660
  category: "core",
1004
- icon: se,
1005
- group: "form",
1006
- props: {
1007
- fieldName: p({ title: "Field Name", default: "checkbox" }),
1008
- styles: m({ default: "flex items-center gap-x-2" }),
1009
- label: p({ title: "web_blocks.label", default: "Label" }),
1010
- checked: y({ title: "web_blocks.checked", default: !1 }),
1011
- required: y({ title: "web_blocks.required", default: !1 })
1661
+ wrapper: !0,
1662
+ canAcceptBlock: (e) => e === "Column",
1663
+ ...p({
1664
+ properties: {
1665
+ styles: d(""),
1666
+ colCount: {
1667
+ type: "number",
1668
+ default: 2,
1669
+ minimum: 0,
1670
+ ui: { "ui:widget": "colCount" }
1671
+ },
1672
+ gutter: {
1673
+ type: "number",
1674
+ title: "Gutter (in px)",
1675
+ default: 16,
1676
+ minimum: 0
1677
+ }
1678
+ }
1679
+ })
1680
+ }, L = (e, t) => ({
1681
+ slider: {
1682
+ "x-data": `{
1683
+ currentSlide: 0,
1684
+ totalSlides: ${(t == null ? void 0 : t.totalSlides) || 0},
1685
+ autoplay: ${!!(t != null && t.autoplay)},
1686
+ autoplayInterval: null,
1687
+ init() {
1688
+ if (this.autoplay) {
1689
+ this.startAutoplay();
1690
+ }
1691
+ },
1692
+ startAutoplay() {
1693
+ this.autoplayInterval = setInterval(() => {
1694
+ this.nextSlide();
1695
+ }, ${isNaN(t == null ? void 0 : t.autoplayInterval) ? 3e3 : (t == null ? void 0 : t.autoplayInterval) * 1e3});
1696
+ },
1697
+ stopAutoplay() {
1698
+ clearInterval(this.autoplayInterval);
1699
+ },
1700
+ nextSlide() {
1701
+ this.currentSlide = (this.currentSlide + 1) % this.totalSlides;
1702
+ },
1703
+ prevSlide() {
1704
+ this.currentSlide = (this.currentSlide - 1 + this.totalSlides) %this.totalSlides;
1705
+ },
1706
+ updateCurrentSlide(slide) {
1707
+ this.currentSlide = slide;
1708
+ },
1709
+ }`
1710
+ },
1711
+ slides: {
1712
+ ":style": "'transform: translateX(-' + currentSlide * 100 + '%)'"
1713
+ },
1714
+ prevButton: {
1715
+ "x-on:click": "stopAutoplay(); prevSlide();"
1716
+ },
1717
+ nextButton: {
1718
+ "x-on:click": "stopAutoplay(); nextSlide();"
1719
+ },
1720
+ sliderNav: {
1721
+ ":class": `currentSlide === ${t == null ? void 0 : t.slide} ? '${t == null ? void 0 : t.activeDotClassName}' : '${t == null ? void 0 : t.className}'`,
1722
+ "x-on:click": `stopAutoplay(); updateCurrentSlide(${t == null ? void 0 : t.slide});`
1012
1723
  }
1013
- }, Lt = () => {
1014
- u(ue, pe), u(ye, ge), u(be, me), u(ke, xe), u(we, ve), u(_e, Ie), u(Be, Le), u(je, Ce), u(Se, Me), u(Ne, Pe), u(Ee, $e), u(Te, 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);
1724
+ })[e] || {}, Ht = (e) => {
1725
+ const { blockProps: t, styles: l, children: n, slider: r } = e;
1726
+ return !(r != null && r.showSlideButton) && typeof (r == null ? void 0 : r.showSlideButton) == "boolean" ? null : /* @__PURE__ */ i("div", { ...t, ...l, ...L("prevButton"), children: n });
1727
+ };
1728
+ u(Ht, {
1729
+ type: "SlidePreviousButton",
1730
+ label: "Slide Previous",
1731
+ group: "basic",
1732
+ category: "core",
1733
+ icon: D,
1734
+ canDelete: () => !1,
1735
+ canAcceptBlock: () => !0,
1736
+ canBeNested: (e) => e === "Slider",
1737
+ ...p({
1738
+ properties: {
1739
+ styles: d(
1740
+ "h-max w-max absolute left-0 top-1/2 -translate-y-1/2 flex items-center justify-center p-2 cursor-pointer"
1741
+ ),
1742
+ slider: _("Slider", "slider")
1743
+ }
1744
+ })
1745
+ });
1746
+ const jt = (e) => {
1747
+ const { blockProps: t, styles: l, children: n, slider: r } = e;
1748
+ return !(r != null && r.showSlideButton) && typeof (r == null ? void 0 : r.showSlideButton) == "boolean" ? null : /* @__PURE__ */ i("div", { ...t, ...l, ...L("nextButton"), children: n });
1749
+ };
1750
+ u(jt, {
1751
+ type: "SlideNextButton",
1752
+ label: "Slide Next",
1753
+ group: "basic",
1754
+ category: "core",
1755
+ icon: fe,
1756
+ canDelete: () => !1,
1757
+ canAcceptBlock: () => !0,
1758
+ canBeNested: (e) => e === "Slider",
1759
+ ...p({
1760
+ properties: {
1761
+ styles: d(
1762
+ "h-max w-max absolute right-0 top-1/2 -translate-y-1/2 flex items-center justify-center p-2 cursor-pointer"
1763
+ ),
1764
+ slider: _("Slider", "slider")
1765
+ }
1766
+ })
1767
+ });
1768
+ const Ft = (e) => {
1769
+ var a, c, s, g, m;
1770
+ const { blockProps: t, styles: l, children: n = null, inBuilder: r, slider: o } = e;
1771
+ if (r) {
1772
+ const h = ((c = (a = e == null ? void 0 : e.children) == null ? void 0 : a.props) == null ? void 0 : c.allBlocks) || ((g = (s = e == null ? void 0 : e.children) == null ? void 0 : s.props) == null ? void 0 : g.blocks) || [], y = o == null ? void 0 : o.currentSlide, f = (m = h == null ? void 0 : h.filter((x) => (x == null ? void 0 : x._parent) === (e == null ? void 0 : e._id))) == null ? void 0 : m.findIndex((x) => (x == null ? void 0 : x._id) === y);
1773
+ return /* @__PURE__ */ i("div", { ...t, ...l, style: { transform: `translateX(-${Math.max(0, f) * 100}%)` }, children: n || /* @__PURE__ */ i("div", { className: "h-full p-2", children: /* @__PURE__ */ i("div", { className: "h-full border-2 border-dashed" }) }) });
1774
+ }
1775
+ return /* @__PURE__ */ i("div", { ...t, ...l, ...L("slides"), children: n || /* @__PURE__ */ i("div", { className: "h-full p-2", children: /* @__PURE__ */ i("div", { className: "h-full border-2 border-dashed" }) }) });
1776
+ };
1777
+ u(Ft, {
1778
+ type: "Slides",
1779
+ label: "Slides",
1780
+ group: "basic",
1781
+ category: "core",
1782
+ icon: be,
1783
+ canDelete: () => !1,
1784
+ canAcceptBlock: (e) => e === "Slide",
1785
+ canBeNested: (e) => e === "Slider",
1786
+ ...p({
1787
+ properties: {
1788
+ slider: _("Slider", "slider"),
1789
+ styles: d("h-full flex transition-transform duration-500 ease-in-out")
1790
+ }
1791
+ })
1792
+ });
1793
+ const qt = (e) => {
1794
+ const { blockProps: t, styles: l, children: n = null } = e;
1795
+ return /* @__PURE__ */ i("div", { ...t, ...l, children: n || /* @__PURE__ */ k("div", { className: "flex h-full min-w-full items-center justify-center", children: [
1796
+ "Slide ",
1797
+ (e == null ? void 0 : e.index) + 1
1798
+ ] }) });
1799
+ };
1800
+ u(qt, {
1801
+ type: "Slide",
1802
+ label: "Slide",
1803
+ group: "basic",
1804
+ category: "core",
1805
+ icon: we,
1806
+ canDelete: () => !0,
1807
+ canAcceptBlock: () => !0,
1808
+ canBeNested: (e) => e === "Slides",
1809
+ ...p({
1810
+ properties: {
1811
+ styles: d("min-w-full h-full")
1812
+ }
1813
+ })
1814
+ });
1815
+ const Gt = (e) => {
1816
+ var y, f, x, E;
1817
+ const { blockProps: t, styles: l, dotStyles: n, activeDotStyles: r, slider: o, inBuilder: a, children: c } = e;
1818
+ if (!(o != null && o.showSlideNavbar) && typeof (o == null ? void 0 : o.showSlideNavbar) == "boolean") return null;
1819
+ const s = ((f = (y = e == null ? void 0 : e.children) == null ? void 0 : y.props) == null ? void 0 : f.allBlocks) || ((E = (x = e == null ? void 0 : e.children) == null ? void 0 : x.props) == null ? void 0 : E.blocks) || [], g = s == null ? void 0 : s.find((b) => (b == null ? void 0 : b._id) === (e == null ? void 0 : e._id)), m = s == null ? void 0 : s.find((b) => (b == null ? void 0 : b._parent) === (g == null ? void 0 : g._parent) && (b == null ? void 0 : b._type) === "Slides"), h = s == null ? void 0 : s.filter((b) => (b == null ? void 0 : b._parent) === (m == null ? void 0 : m._id));
1820
+ return a ? /* @__PURE__ */ i("div", { ...t, ...l, children: h == null ? void 0 : h.map((b, N) => /* @__PURE__ */ i(
1821
+ "div",
1822
+ {
1823
+ ...n,
1824
+ ...o != null && o.currentSlide ? (b == null ? void 0 : b._id) === (o == null ? void 0 : o.currentSlide) ? r : {} : N === 0 ? r : {},
1825
+ children: c
1826
+ }
1827
+ )) }) : /* @__PURE__ */ i("div", { ...t, ...l, children: h == null ? void 0 : h.map((b, N) => /* @__PURE__ */ i(
1828
+ "div",
1829
+ {
1830
+ ...L("sliderNav", {
1831
+ slide: N,
1832
+ className: n == null ? void 0 : n.className,
1833
+ activeDotClassName: (r == null ? void 0 : r.className) ?? ""
1834
+ })
1835
+ },
1836
+ b == null ? void 0 : b._id
1837
+ )) });
1838
+ };
1839
+ u(Gt, {
1840
+ type: "SliderNav",
1841
+ label: "Slider Navigation",
1842
+ group: "basic",
1843
+ category: "core",
1844
+ icon: D,
1845
+ canDelete: () => !1,
1846
+ canAcceptBlock: () => !1,
1847
+ canBeNested: (e) => e === "Slider",
1848
+ ...p({
1849
+ properties: {
1850
+ styles: d("w-full absolute left-0 bottom-0 flex items-center justify-center gap-x-2 p-2"),
1851
+ dotStyles: d("w-4 h-4 border border-gray-500 rounded-full cursor-pointer"),
1852
+ activeDotStyles: d("w-4 h-4 rounded-full bg-blue-500"),
1853
+ slider: _("Slider", "slider")
1854
+ }
1855
+ })
1856
+ });
1857
+ const Ut = () => null;
1858
+ u(Ut, {
1859
+ type: "SliderNavItem",
1860
+ label: "Slider Nav Item",
1861
+ group: "basic",
1862
+ category: "core",
1863
+ hidden: !0,
1864
+ icon: D,
1865
+ canDelete: () => !1,
1866
+ canDuplicate: () => !1,
1867
+ canAcceptBlock: () => !1,
1868
+ canBeNested: (e) => e === "SliderNav",
1869
+ ...p({
1870
+ properties: {}
1871
+ })
1872
+ });
1873
+ const Ot = (e) => {
1874
+ var s, g, m, h, y;
1875
+ const { blockProps: t, styles: l, children: n = null } = e, r = ((g = (s = e == null ? void 0 : e.children) == null ? void 0 : s.props) == null ? void 0 : g.allBlocks) || ((h = (m = e == null ? void 0 : e.children) == null ? void 0 : m.props) == null ? void 0 : h.blocks) || [], o = r == null ? void 0 : r.find((f) => (f == null ? void 0 : f._parent) === (e == null ? void 0 : e._id) && (f == null ? void 0 : f._type) === "Slides"), c = {
1876
+ totalSlides: ((y = r == null ? void 0 : r.filter((f) => (f == null ? void 0 : f._parent) === (o == null ? void 0 : o._id))) == null ? void 0 : y.length) || 0,
1877
+ ...typeof e.slider == "object" ? e.slider : {}
1878
+ };
1879
+ return /* @__PURE__ */ i("div", { ...t, ...l, ...L("slider", c), children: n || /* @__PURE__ */ i("div", { className: "h-[60vh] p-2", children: /* @__PURE__ */ i("div", { className: "h-full border-2 border-dashed" }) }) });
1880
+ }, Vt = {
1881
+ type: "Slider",
1882
+ label: "Slider",
1883
+ category: "core",
1884
+ icon: ke,
1885
+ group: "basic",
1886
+ wrapper: !0,
1887
+ blocks: () => [
1888
+ {
1889
+ _type: "Slider",
1890
+ _id: "slider"
1891
+ },
1892
+ {
1893
+ _type: "Slides",
1894
+ _id: "slider-slides",
1895
+ _parent: "slider"
1896
+ },
1897
+ {
1898
+ _type: "Slide",
1899
+ _id: "slider-slides-slide-1",
1900
+ _parent: "slider-slides"
1901
+ },
1902
+ {
1903
+ _type: "Slide",
1904
+ _id: "slider-slides-slide-2",
1905
+ _parent: "slider-slides"
1906
+ },
1907
+ {
1908
+ _type: "Slide",
1909
+ _id: "slider-slides-slide-3",
1910
+ _parent: "slider-slides"
1911
+ },
1912
+ {
1913
+ _type: "SlidePreviousButton",
1914
+ _parent: "slider",
1915
+ _id: "slider-left-arrow"
1916
+ },
1917
+ {
1918
+ _type: "Icon",
1919
+ _id: "slider-left-arrow-content",
1920
+ icon: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 320 512"><path d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"/></svg>',
1921
+ _parent: "slider-left-arrow"
1922
+ },
1923
+ {
1924
+ _type: "SlideNextButton",
1925
+ _parent: "slider",
1926
+ _id: "slider-right-arrow"
1927
+ },
1928
+ {
1929
+ _type: "Icon",
1930
+ _id: "slider-right-arrow-content",
1931
+ icon: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 320 512"><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg>',
1932
+ _parent: "slider-right-arrow"
1933
+ },
1934
+ {
1935
+ _type: "SliderNav",
1936
+ _parent: "slider",
1937
+ _id: "slider-nav"
1938
+ },
1939
+ {
1940
+ _type: "SliderNavItem",
1941
+ _parent: "slider-nav",
1942
+ _id: "slider-nav-item"
1943
+ }
1944
+ ],
1945
+ ...p({
1946
+ properties: {
1947
+ styles: d("w-full h-[60vh] relative overflow-x-hidden"),
1948
+ slider: F({
1949
+ type: "object",
1950
+ properties: {},
1951
+ default: {
1952
+ currentSlide: null,
1953
+ autoplay: !1,
1954
+ autoplayInterval: 2,
1955
+ showSlideButton: !0,
1956
+ showSlideNavbar: !0
1957
+ },
1958
+ ui: {
1959
+ "ui:field": "slider"
1960
+ }
1961
+ })
1962
+ }
1963
+ })
1964
+ }, el = () => {
1965
+ u(ve, xe), u(Ce, Le), u(Se, _e), u(Pe, Ne), u(Me, $e), u(Ae, Ee), u(De, Te), u(et, tt), u(Ke, Qe), u(lt, rt), u(nt, ot), u(Xe, Ye), u(Ze, Je), u(ct, dt), u(Be, Ie), u(ze, He), u(it, at), u(ft, bt), u(wt, kt), u(vt, xt), u(mt, ht), u(Bt, It), u(Ct, Lt), u(Pt, Nt), u(St, _t), u(Dt, Tt), u(Mt, $t), u(Ue, Oe), u(je, Ge), u(Ve, We), u(yt, gt), u(Rt, zt), u(At, Et), u(Ot, Vt);
1015
1966
  };
1016
1967
  export {
1017
- Lt as loadWebBlocks
1968
+ el as loadWebBlocks
1018
1969
  };