@chaibuilder/sdk 1.2.93-beta.1 → 1.2.93-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CodeEditor-oXzf_WM-.cjs +1 -0
- package/dist/{CodeEditor-_pniWL9A.js → CodeEditor-p-F-Bwyu.js} +17 -19
- package/dist/{Topbar-AzDg5F6n.js → Topbar-Ns8vNtP5.js} +11 -13
- package/dist/Topbar-RgbS4i_F.cjs +1 -0
- package/dist/{UnsplashImages-Gdm78EC5.js → UnsplashImages-Mc0XR9vF.js} +8 -10
- package/dist/UnsplashImages-pDkNL6f7.cjs +1 -0
- package/dist/{UploadImages-2XWy9JHd.js → UploadImages-BF4_7sIk.js} +55 -30
- package/dist/UploadImages-KUCb9y7z.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +70 -72
- package/dist/index-11fpvJA3.cjs +223 -0
- package/dist/{index-zgy8mVKm.js → index-UmpQEfVx.js} +8967 -7745
- package/dist/{plugin-BXpjdQxx.cjs → plugin-P0tpo_XZ.cjs} +1 -1
- package/dist/plugin-_F-KZp1i.cjs +1 -0
- package/dist/{plugin-DdKuAR7p.js → plugin-f5uJtdXY.js} +1 -1
- package/dist/plugin-sJ3Hzvpv.js +57 -0
- package/dist/render.cjs +2 -2
- package/dist/render.js +6 -7
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.js +6 -7
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +98 -100
- package/package.json +1 -1
- package/dist/CodeEditor-hbpcHA6a.cjs +0 -1
- package/dist/GlobalBlockSettings-1Ix883dP.cjs +0 -1
- package/dist/GlobalBlockSettings-eytCBAHr.js +0 -44
- package/dist/Topbar-0dGbwmC_.cjs +0 -1
- package/dist/UnsplashImages-etSQzJ6J.cjs +0 -1
- package/dist/UploadImages-lyC-Th50.cjs +0 -1
- package/dist/_commonjsHelpers-f3sTPFkQ.js +0 -8
- package/dist/_commonjsHelpers-f52AuuUj.cjs +0 -1
- package/dist/index-lynOzeB3.cjs +0 -223
- package/dist/plugin-02QsHeBE.cjs +0 -1
- package/dist/plugin-VDzc8jUO.js +0 -52
- package/dist/useGlobalBlocksStore-1wJUEOl4.cjs +0 -1
- package/dist/useGlobalBlocksStore-HlGhDxuV.js +0 -1258
package/dist/web-blocks.js
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import { registerChaiBlock as u } from "@chaibuilder/runtime";
|
|
2
2
|
import { j as s } from "./jsx-runtime-Sp0orL4X.js";
|
|
3
3
|
import * as p from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import "
|
|
7
|
-
import {
|
|
8
|
-
import { isNull as re, isEmpty as y, get as x, pick as ce, omit as ie, map as M } from "lodash-es";
|
|
9
|
-
import { GlobeIcon as de } from "lucide-react";
|
|
4
|
+
import { c as j, T as m, f as v, o as C, b, q as N, y as I, l as T, d as L, m as S, v as R, r as k, e as F, G, g as B, S as O } from "./iconBase-HBZkvN04.js";
|
|
5
|
+
import { ButtonIcon as H, CodeIcon as U, HeadingIcon as V, 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 q, GroupIcon as le, InputIcon as A, RadiobuttonIcon as oe, DropdownMenuIcon as se, CheckboxIcon as ae } from "@radix-ui/react-icons";
|
|
6
|
+
import { isNull as ne, isEmpty as y, get as x, pick as re, omit as ce, map as M } from "lodash-es";
|
|
7
|
+
import { GlobeIcon as ie } from "lucide-react";
|
|
10
8
|
import "clsx";
|
|
11
9
|
import "tailwind-merge";
|
|
12
|
-
const
|
|
10
|
+
const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("div", { className: j("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ s.jsx("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, _ = de, ue = (e) => {
|
|
13
11
|
const { blockProps: l, inBuilder: t, backgroundImage: a, children: o, tag: n = "div", styles: r } = e;
|
|
14
12
|
let i = o;
|
|
15
13
|
o || (i = /* @__PURE__ */ s.jsx(_, { inBuilder: t }));
|
|
16
14
|
let c = {};
|
|
17
15
|
return a && (c = { backgroundImage: `url(${a})` }), p.createElement(n, { ...l, ...r, style: c }, i);
|
|
18
|
-
},
|
|
16
|
+
}, be = {
|
|
19
17
|
type: "Box",
|
|
20
18
|
label: "web_blocks.box",
|
|
21
19
|
category: "core",
|
|
@@ -48,7 +46,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
48
46
|
backgroundImage: C({ title: "web_blocks.background_image" })
|
|
49
47
|
},
|
|
50
48
|
canAcceptBlock: () => !0
|
|
51
|
-
},
|
|
49
|
+
}, pe = (e) => {
|
|
52
50
|
const { blockProps: l, iconSize: t, icon: a, content: o, iconPos: n, styles: r, children: i } = e, c = a, d = i || /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
53
51
|
/* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", children: o }),
|
|
54
52
|
c && /* @__PURE__ */ s.jsx(
|
|
@@ -69,7 +67,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
69
67
|
},
|
|
70
68
|
d
|
|
71
69
|
);
|
|
72
|
-
},
|
|
70
|
+
}, me = {
|
|
73
71
|
type: "Button",
|
|
74
72
|
label: "web_blocks.button",
|
|
75
73
|
category: "core",
|
|
@@ -78,7 +76,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
78
76
|
props: {
|
|
79
77
|
content: b({ title: "web_blocks.label", default: "Button" }),
|
|
80
78
|
styles: m({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
|
|
81
|
-
icon:
|
|
79
|
+
icon: N({ title: "web_blocks.icon", default: "" }),
|
|
82
80
|
iconSize: I({ title: "web_blocks.icon_size", default: 24 }),
|
|
83
81
|
iconPos: v({
|
|
84
82
|
title: "web_blocks.icon_position",
|
|
@@ -89,7 +87,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
89
87
|
]
|
|
90
88
|
})
|
|
91
89
|
}
|
|
92
|
-
},
|
|
90
|
+
}, fe = (e) => {
|
|
93
91
|
const { blockProps: l, styles: t, htmlCode: a, inBuilder: o } = e;
|
|
94
92
|
return o ? /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
|
|
95
93
|
o ? /* @__PURE__ */ s.jsx("div", { ...l, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
@@ -102,11 +100,11 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
102
100
|
...t,
|
|
103
101
|
dangerouslySetInnerHTML: { __html: a }
|
|
104
102
|
});
|
|
105
|
-
},
|
|
103
|
+
}, he = {
|
|
106
104
|
type: "CustomHTML",
|
|
107
105
|
label: "web_blocks.custom_html",
|
|
108
106
|
category: "core",
|
|
109
|
-
icon:
|
|
107
|
+
icon: U,
|
|
110
108
|
group: "advanced",
|
|
111
109
|
props: {
|
|
112
110
|
styles: m({ default: "" }),
|
|
@@ -116,12 +114,12 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
116
114
|
placeholder: "web_blocks.placeholder"
|
|
117
115
|
})
|
|
118
116
|
}
|
|
119
|
-
},
|
|
117
|
+
}, ke = p.memo(
|
|
120
118
|
(e) => {
|
|
121
119
|
const { blockProps: l, styles: t } = e;
|
|
122
120
|
return p.createElement("div", { ...l, ...t });
|
|
123
121
|
}
|
|
124
|
-
),
|
|
122
|
+
), ge = {
|
|
125
123
|
type: "EmptyBox",
|
|
126
124
|
label: "web_blocks.empty_box",
|
|
127
125
|
category: "core",
|
|
@@ -130,7 +128,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
130
128
|
styles: m({ default: "" }),
|
|
131
129
|
backgroundImage: C({ title: "web_blocks.background_image" })
|
|
132
130
|
}
|
|
133
|
-
},
|
|
131
|
+
}, ye = (e) => {
|
|
134
132
|
const { blockProps: l, styles: t, content: a, level: o = "h1", children: n = null } = e;
|
|
135
133
|
return n ? p.createElement(o, { ...t, ...l }, n) : p.createElement(o, {
|
|
136
134
|
...t,
|
|
@@ -139,11 +137,11 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
139
137
|
"data-ai-type": "html",
|
|
140
138
|
dangerouslySetInnerHTML: { __html: a }
|
|
141
139
|
});
|
|
142
|
-
},
|
|
140
|
+
}, _e = {
|
|
143
141
|
type: "Heading",
|
|
144
142
|
label: "web_blocks.heading",
|
|
145
143
|
category: "core",
|
|
146
|
-
icon:
|
|
144
|
+
icon: V,
|
|
147
145
|
group: "typography",
|
|
148
146
|
props: {
|
|
149
147
|
level: v({
|
|
@@ -163,20 +161,20 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
163
161
|
content: L({ title: "web_blocks.content", default: "Heading goes here" })
|
|
164
162
|
},
|
|
165
163
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
166
|
-
},
|
|
164
|
+
}, we = (e) => {
|
|
167
165
|
const { blockProps: l, styles: t, content: a } = e;
|
|
168
|
-
return
|
|
166
|
+
return ne(e.children) ? p.createElement("p", {
|
|
169
167
|
...t,
|
|
170
168
|
...l,
|
|
171
169
|
"data-ai-key": "content",
|
|
172
170
|
"data-ai-type": "html",
|
|
173
171
|
dangerouslySetInnerHTML: { __html: a }
|
|
174
172
|
}) : p.createElement("p", { ...t, ...l }, e.children);
|
|
175
|
-
},
|
|
173
|
+
}, xe = {
|
|
176
174
|
type: "Paragraph",
|
|
177
175
|
label: "web_blocks.paragraph",
|
|
178
176
|
category: "core",
|
|
179
|
-
icon:
|
|
177
|
+
icon: W,
|
|
180
178
|
group: "typography",
|
|
181
179
|
props: {
|
|
182
180
|
styles: m({ default: "" }),
|
|
@@ -186,7 +184,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
186
184
|
})
|
|
187
185
|
},
|
|
188
186
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
189
|
-
},
|
|
187
|
+
}, ve = (e) => {
|
|
190
188
|
const { blockProps: l, styles: t, content: a, children: o = null, tag: n } = e;
|
|
191
189
|
return o ? p.createElement("span", { ...t, ...l }, o) : p.createElement(n || "span", {
|
|
192
190
|
...t,
|
|
@@ -194,7 +192,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
194
192
|
"data-ai-key": "content",
|
|
195
193
|
dangerouslySetInnerHTML: { __html: a }
|
|
196
194
|
});
|
|
197
|
-
},
|
|
195
|
+
}, Be = {
|
|
198
196
|
type: "Span",
|
|
199
197
|
label: "web_blocks.span",
|
|
200
198
|
category: "core",
|
|
@@ -204,7 +202,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
204
202
|
content: L({ title: "web_blocks.content", default: "" })
|
|
205
203
|
},
|
|
206
204
|
canAcceptBlock: () => !0
|
|
207
|
-
},
|
|
205
|
+
}, Ie = (e) => {
|
|
208
206
|
const { blockProps: l, content: t, styles: a } = e;
|
|
209
207
|
return /* @__PURE__ */ s.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ s.jsx(
|
|
210
208
|
"div",
|
|
@@ -216,11 +214,11 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
216
214
|
dangerouslySetInnerHTML: { __html: t }
|
|
217
215
|
}
|
|
218
216
|
) });
|
|
219
|
-
},
|
|
217
|
+
}, je = {
|
|
220
218
|
type: "RichText",
|
|
221
219
|
label: "web_blocks.richtext",
|
|
222
220
|
category: "core",
|
|
223
|
-
icon:
|
|
221
|
+
icon: X,
|
|
224
222
|
group: "typography",
|
|
225
223
|
props: {
|
|
226
224
|
styles: m({ default: "" }),
|
|
@@ -229,7 +227,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
229
227
|
default: "<p>This is a rich text block. You can add text, and other content here.</p>"
|
|
230
228
|
})
|
|
231
229
|
}
|
|
232
|
-
},
|
|
230
|
+
}, Le = (e) => {
|
|
233
231
|
const { blockProps: l, link: t, children: a, styles: o, inBuilder: n, content: r } = e;
|
|
234
232
|
return !a && y(o == null ? void 0 : o.className) && y(r) ? /* @__PURE__ */ s.jsx(_, { inBuilder: n }) : n ? a ? /* @__PURE__ */ s.jsx("span", { ...l, ...o, children: a }) : p.createElement("span", {
|
|
235
233
|
...l,
|
|
@@ -243,16 +241,16 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
243
241
|
target: (t == null ? void 0 : t.target) || "_self",
|
|
244
242
|
dangerouslySetInnerHTML: { __html: r }
|
|
245
243
|
});
|
|
246
|
-
},
|
|
244
|
+
}, Ce = {
|
|
247
245
|
type: "Link",
|
|
248
246
|
label: "web_blocks.link",
|
|
249
247
|
category: "core",
|
|
250
|
-
icon:
|
|
248
|
+
icon: Y,
|
|
251
249
|
group: "basic",
|
|
252
250
|
props: {
|
|
253
251
|
styles: m({ default: "" }),
|
|
254
252
|
content: b({ title: "web_blocks.content", default: "" }),
|
|
255
|
-
link:
|
|
253
|
+
link: R({
|
|
256
254
|
title: "web_blocks.link",
|
|
257
255
|
default: { type: "page", target: "_self", href: "#" }
|
|
258
256
|
})
|
|
@@ -261,7 +259,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
261
259
|
}, D = (e, ...l) => ({
|
|
262
260
|
...e,
|
|
263
261
|
className: j(e.className, ...l)
|
|
264
|
-
}),
|
|
262
|
+
}), Se = (e) => {
|
|
265
263
|
const { blockProps: l, children: t, styles: a, inBuilder: o, content: n, href: r } = e, { hrefType: i, autoplay: c, maxWidth: d, backdropColor: h, galleryName: f } = e, g = D(a, "cb-lightbox");
|
|
266
264
|
if (!t && y(a == null ? void 0 : a.className) && y(n))
|
|
267
265
|
return /* @__PURE__ */ s.jsx(_, { inBuilder: o });
|
|
@@ -279,7 +277,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
279
277
|
href: r || "#",
|
|
280
278
|
dangerouslySetInnerHTML: { __html: n }
|
|
281
279
|
});
|
|
282
|
-
},
|
|
280
|
+
}, Me = {
|
|
283
281
|
type: "LightBoxLink",
|
|
284
282
|
label: "web_blocks.lightbox_link",
|
|
285
283
|
category: "core",
|
|
@@ -315,7 +313,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
315
313
|
}, $e = {
|
|
316
314
|
type: "List",
|
|
317
315
|
label: "web_blocks.list",
|
|
318
|
-
icon:
|
|
316
|
+
icon: Z,
|
|
319
317
|
category: "core",
|
|
320
318
|
group: "basic",
|
|
321
319
|
props: {
|
|
@@ -355,7 +353,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
355
353
|
content: "Item 3"
|
|
356
354
|
}
|
|
357
355
|
]
|
|
358
|
-
},
|
|
356
|
+
}, Ee = (e) => {
|
|
359
357
|
const { blockProps: l, content: t, styles: a, children: o, tag: n } = e;
|
|
360
358
|
return o ? p.createElement(n || "li", { ...a, ...l }, o) : p.createElement(n || "li", {
|
|
361
359
|
...a,
|
|
@@ -363,10 +361,10 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
363
361
|
"data-ai-key": "content",
|
|
364
362
|
dangerouslySetInnerHTML: { __html: t }
|
|
365
363
|
});
|
|
366
|
-
},
|
|
364
|
+
}, Pe = {
|
|
367
365
|
type: "ListItem",
|
|
368
366
|
label: "web_blocks.listitem",
|
|
369
|
-
icon:
|
|
367
|
+
icon: J,
|
|
370
368
|
category: "core",
|
|
371
369
|
group: "basic",
|
|
372
370
|
props: {
|
|
@@ -375,7 +373,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
375
373
|
},
|
|
376
374
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
377
375
|
canBeNested: (e) => e === "List"
|
|
378
|
-
},
|
|
376
|
+
}, Te = (e) => {
|
|
379
377
|
const { blockProps: l, icon: t, styles: a, width: o, inBuilder: n, height: r } = e, i = D(a, j(o ? `w-[${o}px]` : "", r ? `h-[${r}px]` : ""));
|
|
380
378
|
if (y(t))
|
|
381
379
|
return /* @__PURE__ */ s.jsx(_, { inBuilder: n, className: "h-8 w-14" });
|
|
@@ -385,22 +383,22 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
385
383
|
...i,
|
|
386
384
|
dangerouslySetInnerHTML: { __html: c }
|
|
387
385
|
});
|
|
388
|
-
},
|
|
386
|
+
}, He = {
|
|
389
387
|
type: "Icon",
|
|
390
388
|
label: "web_blocks.icon",
|
|
391
389
|
category: "core",
|
|
392
|
-
icon:
|
|
390
|
+
icon: K,
|
|
393
391
|
group: "media",
|
|
394
392
|
props: {
|
|
395
393
|
styles: m({ default: "text-black" }),
|
|
396
|
-
icon:
|
|
394
|
+
icon: N({
|
|
397
395
|
title: "web_blocks.icon",
|
|
398
396
|
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>'
|
|
399
397
|
}),
|
|
400
398
|
width: I({ title: "web_blocks.width", default: "" }),
|
|
401
399
|
height: I({ title: "web_blocks.height", default: "" })
|
|
402
400
|
}
|
|
403
|
-
},
|
|
401
|
+
}, ze = (e) => {
|
|
404
402
|
const { blockProps: l, image: t, styles: a, alt: o, height: n, width: r } = e;
|
|
405
403
|
return y(t) ? /* @__PURE__ */ s.jsx(_, { className: "h-36" }) : p.createElement("img", {
|
|
406
404
|
...l,
|
|
@@ -411,7 +409,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
411
409
|
height: n,
|
|
412
410
|
width: r
|
|
413
411
|
});
|
|
414
|
-
},
|
|
412
|
+
}, qe = {
|
|
415
413
|
type: "Image",
|
|
416
414
|
label: "web_blocks.image",
|
|
417
415
|
category: "core",
|
|
@@ -427,13 +425,13 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
427
425
|
width: b({ title: "web_blocks.width", default: "" }),
|
|
428
426
|
height: b({ title: "web_blocks.height", default: "" })
|
|
429
427
|
}
|
|
430
|
-
},
|
|
431
|
-
if (N.test(e)) {
|
|
432
|
-
const l = e.match(N);
|
|
433
|
-
return l ? `https://www.youtube.com/embed/${l[4]}` : e;
|
|
434
|
-
}
|
|
428
|
+
}, $ = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, E = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, P = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Ae = (e) => {
|
|
435
429
|
if ($.test(e)) {
|
|
436
430
|
const l = e.match($);
|
|
431
|
+
return l ? `https://www.youtube.com/embed/${l[4]}` : e;
|
|
432
|
+
}
|
|
433
|
+
if (E.test(e)) {
|
|
434
|
+
const l = e.match(E);
|
|
437
435
|
return l ? `https://player.vimeo.com/video/${l[3]}` : e;
|
|
438
436
|
}
|
|
439
437
|
if (P.test(e)) {
|
|
@@ -441,12 +439,12 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
441
439
|
return l ? `https://www.dailymotion.com/embed/video/${l[4]}` : e;
|
|
442
440
|
}
|
|
443
441
|
return null;
|
|
444
|
-
},
|
|
442
|
+
}, De = p.memo(
|
|
445
443
|
(e) => {
|
|
446
444
|
const { blockProps: l, inBuilder: t, styles: a, url: o, controls: n } = e, r = x(n, "autoPlay", !1), i = x(n, "controls", !1), c = r || x(n, "muted", !0), d = x(n, "loop", !1);
|
|
447
445
|
if (y(o))
|
|
448
446
|
return /* @__PURE__ */ s.jsx(_, { inBuilder: t, className: "h-36" });
|
|
449
|
-
let h =
|
|
447
|
+
let h = Ae(o), f = null;
|
|
450
448
|
if (h) {
|
|
451
449
|
if (!y(h)) {
|
|
452
450
|
const g = [];
|
|
@@ -470,16 +468,16 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
470
468
|
autoPlay: t ? !1 : r,
|
|
471
469
|
loop: d
|
|
472
470
|
});
|
|
473
|
-
return /* @__PURE__ */ s.jsx("div", { ...
|
|
474
|
-
t ? /* @__PURE__ */ s.jsx("div", { ...l, ...
|
|
471
|
+
return /* @__PURE__ */ s.jsx("div", { ...re(a, ["className"]), children: /* @__PURE__ */ s.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
472
|
+
t ? /* @__PURE__ */ s.jsx("div", { ...l, ...ce(a, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
475
473
|
f
|
|
476
474
|
] }) });
|
|
477
475
|
}
|
|
478
|
-
),
|
|
476
|
+
), Re = {
|
|
479
477
|
type: "Video",
|
|
480
478
|
label: "web_blocks.video",
|
|
481
479
|
category: "core",
|
|
482
|
-
icon:
|
|
480
|
+
icon: Q,
|
|
483
481
|
group: "media",
|
|
484
482
|
props: {
|
|
485
483
|
styles: m({ default: "" }),
|
|
@@ -487,7 +485,7 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
487
485
|
title: "web_blocks.video_url",
|
|
488
486
|
default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
|
|
489
487
|
}),
|
|
490
|
-
controls:
|
|
488
|
+
controls: F({
|
|
491
489
|
title: "web_blocks.controls",
|
|
492
490
|
properties: {
|
|
493
491
|
autoPlay: k({ title: "web_blocks.autoplay", default: !0 }),
|
|
@@ -498,17 +496,17 @@ const ue = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
498
496
|
})
|
|
499
497
|
}
|
|
500
498
|
};
|
|
501
|
-
function
|
|
502
|
-
return
|
|
499
|
+
function Fe(e) {
|
|
500
|
+
return G({ tag: "svg", attr: { version: "1.1", viewBox: "0 0 32 32" }, child: [{ tag: "path", attr: { d: "M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z" }, child: [] }] })(e);
|
|
503
501
|
}
|
|
504
|
-
const
|
|
502
|
+
const Ge = (e) => {
|
|
505
503
|
const { scripts: l, inBuilder: t, blockProps: a } = e;
|
|
506
504
|
return t ? /* @__PURE__ */ s.jsx("div", { ...a, children: /* @__PURE__ */ s.jsx("div", { className: j("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ s.jsx("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ s.jsx("div", { dangerouslySetInnerHTML: { __html: l } });
|
|
507
|
-
},
|
|
505
|
+
}, Oe = {
|
|
508
506
|
type: "CustomScript",
|
|
509
507
|
label: "web_blocks.custom_script",
|
|
510
508
|
category: "core",
|
|
511
|
-
icon:
|
|
509
|
+
icon: Fe,
|
|
512
510
|
group: "advanced",
|
|
513
511
|
props: {
|
|
514
512
|
scripts: T({
|
|
@@ -517,23 +515,23 @@ const Oe = (e) => {
|
|
|
517
515
|
placeholder: "<script>console.log('Hello, world!');<\/script>"
|
|
518
516
|
})
|
|
519
517
|
}
|
|
520
|
-
},
|
|
518
|
+
}, Ue = (e) => {
|
|
521
519
|
const { blockProps: l, styles: t } = e;
|
|
522
520
|
return p.createElement("hr", { ...t, ...l });
|
|
523
|
-
},
|
|
521
|
+
}, Ve = {
|
|
524
522
|
type: "Divider",
|
|
525
523
|
label: "web_blocks.divider",
|
|
526
524
|
category: "core",
|
|
527
|
-
icon:
|
|
525
|
+
icon: ee,
|
|
528
526
|
group: "basic",
|
|
529
527
|
props: {
|
|
530
528
|
styles: m({ default: "bg-gray-900 h-0.5 py-2 my-1" })
|
|
531
529
|
}
|
|
532
|
-
},
|
|
530
|
+
}, We = () => null, Xe = {
|
|
533
531
|
type: "Dark Mode",
|
|
534
532
|
label: "web_blocks.dark_mode",
|
|
535
533
|
category: "core",
|
|
536
|
-
icon:
|
|
534
|
+
icon: te,
|
|
537
535
|
group: "advanced",
|
|
538
536
|
props: {},
|
|
539
537
|
blocks: () => [
|
|
@@ -585,7 +583,7 @@ const Oe = (e) => {
|
|
|
585
583
|
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>"
|
|
586
584
|
}
|
|
587
585
|
]
|
|
588
|
-
},
|
|
586
|
+
}, Ye = (e) => {
|
|
589
587
|
const { blockProps: l, inBuilder: t, children: a, globalBlock: o } = e;
|
|
590
588
|
return t && !o ? /* @__PURE__ */ s.jsxs(
|
|
591
589
|
"div",
|
|
@@ -601,17 +599,17 @@ const Oe = (e) => {
|
|
|
601
599
|
]
|
|
602
600
|
}
|
|
603
601
|
) : p.createElement("div", { ...l }, a);
|
|
604
|
-
},
|
|
602
|
+
}, Ze = {
|
|
605
603
|
type: "GlobalBlock",
|
|
606
604
|
label: "Global Block",
|
|
607
|
-
icon:
|
|
605
|
+
icon: ie,
|
|
608
606
|
category: "core",
|
|
609
607
|
group: "advanced",
|
|
610
608
|
props: {
|
|
611
|
-
globalBlock: b({ title: "global block", default: ""
|
|
612
|
-
}
|
|
613
|
-
propsEditor:
|
|
614
|
-
},
|
|
609
|
+
globalBlock: b({ title: "global block", default: "" })
|
|
610
|
+
}
|
|
611
|
+
// propsEditor: GlobalBlockSettings,
|
|
612
|
+
}, Je = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", ...e.blockProps, children: e.content }) : `${e.content}`, Ke = {
|
|
615
613
|
type: "Text",
|
|
616
614
|
label: "web_blocks.text",
|
|
617
615
|
hidden: !0,
|
|
@@ -621,11 +619,11 @@ const Oe = (e) => {
|
|
|
621
619
|
props: {
|
|
622
620
|
content: L({ title: "web_blocks.content", defaultValue: "" })
|
|
623
621
|
}
|
|
624
|
-
},
|
|
622
|
+
}, Qe = (e) => {
|
|
625
623
|
const { blockProps: l, backgroundImage: t, children: a, styles: o } = e;
|
|
626
624
|
let n = {};
|
|
627
625
|
return t && (n = { backgroundImage: `url(${t})` }), p.createElement("div", { ...l, ...o, style: n }, a);
|
|
628
|
-
},
|
|
626
|
+
}, et = {
|
|
629
627
|
type: "Body",
|
|
630
628
|
label: "Body",
|
|
631
629
|
category: "core",
|
|
@@ -639,10 +637,10 @@ const Oe = (e) => {
|
|
|
639
637
|
canDelete: () => !1,
|
|
640
638
|
canMove: () => !1,
|
|
641
639
|
canDuplicate: () => !1
|
|
642
|
-
},
|
|
640
|
+
}, tt = (e) => {
|
|
643
641
|
const { blockProps: l, styles: t } = e;
|
|
644
642
|
return p.createElement("br", { ...l, ...t });
|
|
645
|
-
},
|
|
643
|
+
}, lt = {
|
|
646
644
|
type: "LineBreak",
|
|
647
645
|
label: "Line Break",
|
|
648
646
|
category: "core",
|
|
@@ -652,7 +650,7 @@ const Oe = (e) => {
|
|
|
652
650
|
props: {
|
|
653
651
|
styles: m({ default: "" })
|
|
654
652
|
}
|
|
655
|
-
},
|
|
653
|
+
}, ot = (e) => {
|
|
656
654
|
const { blockProps: l, errorMessage: t, name: a, _type: o, successMessage: n, action: r, styles: i, children: c } = e;
|
|
657
655
|
let d = c;
|
|
658
656
|
c || (d = /* @__PURE__ */ s.jsx(_, {}));
|
|
@@ -680,11 +678,11 @@ const Oe = (e) => {
|
|
|
680
678
|
]
|
|
681
679
|
}
|
|
682
680
|
);
|
|
683
|
-
},
|
|
681
|
+
}, st = {
|
|
684
682
|
type: "Form",
|
|
685
683
|
label: "web_blocks.form",
|
|
686
684
|
category: "core",
|
|
687
|
-
icon:
|
|
685
|
+
icon: le,
|
|
688
686
|
group: "form",
|
|
689
687
|
props: {
|
|
690
688
|
styles: m({ default: "" }),
|
|
@@ -702,7 +700,7 @@ const Oe = (e) => {
|
|
|
702
700
|
})
|
|
703
701
|
},
|
|
704
702
|
canAcceptBlock: () => !0
|
|
705
|
-
},
|
|
703
|
+
}, at = (e) => {
|
|
706
704
|
const { blockProps: l, inBuilder: t, label: a, styles: o, inputStyles: n, icon: r, iconPos: i } = e, c = B(), d = {
|
|
707
705
|
"x-bind:disabled": "formLoading"
|
|
708
706
|
};
|
|
@@ -721,7 +719,7 @@ const Oe = (e) => {
|
|
|
721
719
|
]
|
|
722
720
|
}
|
|
723
721
|
);
|
|
724
|
-
},
|
|
722
|
+
}, nt = {
|
|
725
723
|
type: "FormButton",
|
|
726
724
|
label: "web_blocks.submit_button",
|
|
727
725
|
category: "core",
|
|
@@ -732,7 +730,7 @@ const Oe = (e) => {
|
|
|
732
730
|
styles: m({
|
|
733
731
|
default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
|
|
734
732
|
}),
|
|
735
|
-
icon:
|
|
733
|
+
icon: N({ title: "Icon", default: "" }),
|
|
736
734
|
iconPos: v({
|
|
737
735
|
title: "web_blocks.icon_position",
|
|
738
736
|
default: "order-last",
|
|
@@ -742,7 +740,7 @@ const Oe = (e) => {
|
|
|
742
740
|
]
|
|
743
741
|
})
|
|
744
742
|
}
|
|
745
|
-
},
|
|
743
|
+
}, rt = (e) => {
|
|
746
744
|
const {
|
|
747
745
|
blockProps: l,
|
|
748
746
|
label: t,
|
|
@@ -783,7 +781,7 @@ const Oe = (e) => {
|
|
|
783
781
|
}
|
|
784
782
|
)
|
|
785
783
|
] });
|
|
786
|
-
},
|
|
784
|
+
}, ct = {
|
|
787
785
|
type: "Input",
|
|
788
786
|
label: "web_blocks.input",
|
|
789
787
|
category: "core",
|
|
@@ -813,7 +811,7 @@ const Oe = (e) => {
|
|
|
813
811
|
}),
|
|
814
812
|
required: k({ title: "web_blocks.required", default: !1 })
|
|
815
813
|
}
|
|
816
|
-
},
|
|
814
|
+
}, it = (e) => {
|
|
817
815
|
const { blockProps: l, fieldName: t, label: a, styles: o, inputStyles: n, checked: r, required: i, showLabel: c = !0 } = e, d = B();
|
|
818
816
|
return c ? /* @__PURE__ */ s.jsxs("div", { ...o, ...l, children: [
|
|
819
817
|
/* @__PURE__ */ s.jsx("input", { ...n, name: t, id: d, type: "radio", required: i, defaultChecked: r }),
|
|
@@ -831,11 +829,11 @@ const Oe = (e) => {
|
|
|
831
829
|
name: t
|
|
832
830
|
}
|
|
833
831
|
);
|
|
834
|
-
},
|
|
832
|
+
}, dt = {
|
|
835
833
|
type: "Radio",
|
|
836
834
|
label: "web_blocks.radio",
|
|
837
835
|
category: "core",
|
|
838
|
-
icon:
|
|
836
|
+
icon: oe,
|
|
839
837
|
group: "form",
|
|
840
838
|
props: {
|
|
841
839
|
styles: m({ default: "flex items-center w-max gap-x-2" }),
|
|
@@ -844,7 +842,7 @@ const Oe = (e) => {
|
|
|
844
842
|
checked: k({ title: "web_blocks.checked", default: !1 }),
|
|
845
843
|
required: k({ title: "web_blocks.required", default: !1 })
|
|
846
844
|
}
|
|
847
|
-
},
|
|
845
|
+
}, ut = (e) => {
|
|
848
846
|
const {
|
|
849
847
|
blockProps: l,
|
|
850
848
|
fieldName: t,
|
|
@@ -893,11 +891,11 @@ const Oe = (e) => {
|
|
|
893
891
|
]
|
|
894
892
|
}
|
|
895
893
|
);
|
|
896
|
-
},
|
|
894
|
+
}, bt = {
|
|
897
895
|
type: "Select",
|
|
898
896
|
label: "web_blocks.select",
|
|
899
897
|
category: "core",
|
|
900
|
-
icon:
|
|
898
|
+
icon: se,
|
|
901
899
|
group: "form",
|
|
902
900
|
props: {
|
|
903
901
|
styles: m({ default: "" }),
|
|
@@ -911,7 +909,7 @@ const Oe = (e) => {
|
|
|
911
909
|
}),
|
|
912
910
|
required: k({ title: "web_blocks.required", default: !1 }),
|
|
913
911
|
_multiple: k({ title: "web_blocks.multiple", default: !1 }),
|
|
914
|
-
options:
|
|
912
|
+
options: O({
|
|
915
913
|
title: "web_blocks.options",
|
|
916
914
|
itemProperties: {
|
|
917
915
|
label: b({ title: "web_blocks.label", default: "" }),
|
|
@@ -919,7 +917,7 @@ const Oe = (e) => {
|
|
|
919
917
|
}
|
|
920
918
|
})
|
|
921
919
|
}
|
|
922
|
-
},
|
|
920
|
+
}, pt = (e) => {
|
|
923
921
|
const { blockProps: l, fieldName: t, label: a, placeholder: o, styles: n, inputStyles: r, _rows: i, showLabel: c } = e, d = B();
|
|
924
922
|
return c ? /* @__PURE__ */ s.jsxs("div", { ...n, ...l, children: [
|
|
925
923
|
c && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: a }),
|
|
@@ -936,7 +934,7 @@ const Oe = (e) => {
|
|
|
936
934
|
rows: i
|
|
937
935
|
}
|
|
938
936
|
);
|
|
939
|
-
},
|
|
937
|
+
}, mt = {
|
|
940
938
|
type: "TextArea",
|
|
941
939
|
label: "web_blocks.textarea",
|
|
942
940
|
category: "core",
|
|
@@ -954,7 +952,7 @@ const Oe = (e) => {
|
|
|
954
952
|
}),
|
|
955
953
|
_rows: I({ title: "web_blocks.rows", default: 3 })
|
|
956
954
|
}
|
|
957
|
-
},
|
|
955
|
+
}, ft = (e) => {
|
|
958
956
|
const { blockProps: l, fieldName: t, label: a, styles: o, inputStyles: n, required: r, checked: i, showLabel: c = !0 } = e, d = B();
|
|
959
957
|
return c ? /* @__PURE__ */ s.jsxs("div", { ...o, ...l, children: [
|
|
960
958
|
/* @__PURE__ */ s.jsx(
|
|
@@ -981,11 +979,11 @@ const Oe = (e) => {
|
|
|
981
979
|
name: t
|
|
982
980
|
}
|
|
983
981
|
);
|
|
984
|
-
},
|
|
982
|
+
}, ht = {
|
|
985
983
|
type: "Checkbox",
|
|
986
984
|
label: "web_blocks.checkbox",
|
|
987
985
|
category: "core",
|
|
988
|
-
icon:
|
|
986
|
+
icon: ae,
|
|
989
987
|
group: "form",
|
|
990
988
|
props: {
|
|
991
989
|
fieldName: b({ title: "Field Name", default: "checkbox" }),
|
|
@@ -994,9 +992,9 @@ const Oe = (e) => {
|
|
|
994
992
|
checked: k({ title: "web_blocks.checked", default: !1 }),
|
|
995
993
|
required: k({ title: "web_blocks.required", default: !1 })
|
|
996
994
|
}
|
|
997
|
-
},
|
|
998
|
-
u(
|
|
995
|
+
}, It = () => {
|
|
996
|
+
u(ue, be), u(ke, ge), u(pe, me), u(ye, _e), u(we, xe), u(ve, Be), u(Ie, je), u(Le, Ce), u(Se, Me), u(Ne, $e), u(Ee, Pe), u(Te, He), u(ze, qe), u(De, Re), u(fe, he), u(Je, Ke), u(ot, st), u(at, nt), u(rt, ct), u(ft, ht), u(it, dt), u(ut, bt), u(pt, mt), u(tt, lt), u(Qe, et), u(Ge, Oe), u(Ue, Ve), u(We, Xe), u(Ye, Ze);
|
|
999
997
|
};
|
|
1000
998
|
export {
|
|
1001
|
-
|
|
999
|
+
It as loadWebBlocks
|
|
1002
1000
|
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),h=require("@monaco-editor/react"),k=require("./context-menu-sQn7ryJ6.cjs"),C=require("react-i18next"),u=require("react"),n=require("./useGlobalBlocksStore-1wJUEOl4.cjs"),E=require("./index-lynOzeB3.cjs"),R=require("@radix-ui/react-icons"),g=require("@react-hookz/web");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("class-variance-authority");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-dialog");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("lodash-es");require("jotai");require("./iconBase-kuD_VwQx.cjs");require("./_commonjsHelpers-f52AuuUj.cjs");require("@chaibuilder/runtime");require("tree-model");require("react-quill");require("./STRINGS-Yl7cSWDc.cjs");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("react-event-hook");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("./plugin-02QsHeBE.cjs");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("lucide-react");require("@rjsf/validator-ajv8");require("@rjsf/core");require("react-arborist");require("himalaya");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("i18next");require("framer-motion");const a=s=>{const i=document.createElement("div");return i.innerHTML=s,i.innerHTML};function v(){const{t:s}=C.useTranslation(),[i,q]=u.useState(!1),[l,d]=u.useState(""),[r,o]=E.useCodeEditor(),[c]=n.useSelectedBlockIds(),x=n.useUpdateBlocksProps(),m=n.useUpdateBlocksPropsRealtime(),p=g.useThrottledCallback(t=>{const f=a(t);m([r.blockId],{[r.blockProp]:f})},[],300),j=u.useCallback(()=>{if(i){const t=a(l);x([r.blockId],{[r.blockProp]:t})}},[i,l]);u.useEffect(()=>{c.includes(r==null?void 0:r.blockId)||(j(),o(null))},[c]);const b=()=>{o(null)};return e.jsxRuntimeExports.jsxs("div",{className:"h-full rounded-t-lg border-t-4 border-black bg-black text-white",children:[e.jsxRuntimeExports.jsx("button",{onClick:b,className:"fixed inset-0 z-[100000] cursor-default bg-gray-400/20"}),e.jsxRuntimeExports.jsxs("div",{className:"relative z-[100001] h-full w-full flex-col gap-y-1",children:[e.jsxRuntimeExports.jsxs("div",{className:"-mt-1 flex items-center justify-between px-2 py-2",children:[e.jsxRuntimeExports.jsxs("h3",{className:"space-x-3 text-sm font-semibold",children:[e.jsxRuntimeExports.jsx("span",{children:s("HTML Code Editor |")}),e.jsxRuntimeExports.jsx("span",{className:"text-xs text-gray-400",children:s("Scripts will be only executed in preview and live mode.")})]}),e.jsxRuntimeExports.jsx("div",{className:"flex gap-x-2",children:e.jsxRuntimeExports.jsx(k.Button,{onClick:()=>o(null),size:"sm",variant:"destructive",className:"h-6 w-fit",children:e.jsxRuntimeExports.jsx(R.Cross2Icon,{})})})]}),e.jsxRuntimeExports.jsx(h,{onMount:t=>{t.setValue(r.initialCode)},onChange:t=>{q(!0),d(t),p(t)},height:"100%",defaultLanguage:"html",theme:"vs-dark",defaultValue:"",options:{minimap:{enabled:!1}}})]})]})}exports.default=v;
|