@chaibuilder/sdk 2.0.0-beta.6 → 2.0.0-beta.61

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