@easybits.cloud/html-tailwind-generator 0.2.134 → 0.2.136

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.
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-VV5I53WR.js";
6
6
 
7
7
  // src/components4/GrapesEditor.tsx
8
- import { useEffect as useEffect2, useRef as useRef2, useState as useState2, forwardRef, useImperativeHandle } from "react";
8
+ import { useEffect as useEffect3, useRef as useRef2, useState as useState3, forwardRef, useImperativeHandle } from "react";
9
9
 
10
10
  // src/components4/blocks.ts
11
11
  var LANDING_BLOCKS = [
@@ -1015,6 +1015,160 @@ function TailwindClassEditor({ editor, themeVersion = 0, themeColors = {} }) {
1015
1015
  ] });
1016
1016
  }
1017
1017
 
1018
+ // src/components4/ImageSrcEditor.tsx
1019
+ import { useEffect as useEffect2, useState as useState2, useCallback as useCallback2 } from "react";
1020
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1021
+ function readSrc(component) {
1022
+ if (!component) return "";
1023
+ const attrs = component.getAttributes?.() || {};
1024
+ return attrs.src || "";
1025
+ }
1026
+ function readAlt(component) {
1027
+ if (!component) return "";
1028
+ const attrs = component.getAttributes?.() || {};
1029
+ return attrs.alt || "";
1030
+ }
1031
+ function isImageComponent(component) {
1032
+ if (!component) return false;
1033
+ if (component.get?.("type") === "image") return true;
1034
+ const el = component.getEl?.();
1035
+ return el?.tagName === "IMG";
1036
+ }
1037
+ function isValidHttpUrl(value) {
1038
+ if (!value) return false;
1039
+ try {
1040
+ const u = new URL(value);
1041
+ return u.protocol === "http:" || u.protocol === "https:";
1042
+ } catch {
1043
+ return false;
1044
+ }
1045
+ }
1046
+ function ImageSrcEditor({ editor }) {
1047
+ const [selectedComponent, setSelectedComponent] = useState2(null);
1048
+ const [isImg, setIsImg] = useState2(false);
1049
+ const [src, setSrc] = useState2("");
1050
+ const [alt, setAlt] = useState2("");
1051
+ const [previewError, setPreviewError] = useState2(false);
1052
+ const apply = useCallback2((next) => {
1053
+ if (!selectedComponent) return;
1054
+ selectedComponent.addAttributes?.(next);
1055
+ const el = selectedComponent.getEl?.();
1056
+ if (el) {
1057
+ if (next.src !== void 0) el.setAttribute("src", next.src);
1058
+ if (next.alt !== void 0) el.setAttribute("alt", next.alt);
1059
+ }
1060
+ editor?.trigger("sidebar:change");
1061
+ }, [editor, selectedComponent]);
1062
+ const applySrc = useCallback2(() => {
1063
+ if (!isValidHttpUrl(src)) return;
1064
+ apply({ src });
1065
+ }, [apply, src]);
1066
+ const applyAlt = useCallback2(() => {
1067
+ apply({ alt });
1068
+ }, [apply, alt]);
1069
+ useEffect2(() => {
1070
+ if (!editor) return;
1071
+ const onSelected = (component) => {
1072
+ setSelectedComponent(component);
1073
+ const img = isImageComponent(component);
1074
+ setIsImg(img);
1075
+ if (img) {
1076
+ setSrc(readSrc(component));
1077
+ setAlt(readAlt(component));
1078
+ setPreviewError(false);
1079
+ } else {
1080
+ setSrc("");
1081
+ setAlt("");
1082
+ }
1083
+ };
1084
+ const onDeselected = () => {
1085
+ setSelectedComponent(null);
1086
+ setIsImg(false);
1087
+ setSrc("");
1088
+ setAlt("");
1089
+ };
1090
+ editor.on("component:selected", onSelected);
1091
+ editor.on("component:deselected", onDeselected);
1092
+ const current = editor.getSelected();
1093
+ if (current) onSelected(current);
1094
+ return () => {
1095
+ editor.off("component:selected", onSelected);
1096
+ editor.off("component:deselected", onDeselected);
1097
+ };
1098
+ }, [editor]);
1099
+ if (!isImg) return null;
1100
+ const urlValid = isValidHttpUrl(src);
1101
+ return /* @__PURE__ */ jsxs2("div", { className: "p-3 border-b border-gray-800 bg-gray-900/50", children: [
1102
+ /* @__PURE__ */ jsx2("p", { className: "text-[10px] text-gray-400 font-bold uppercase tracking-wider mb-2", children: "Imagen" }),
1103
+ src && !previewError && /* @__PURE__ */ jsx2("div", { className: "mb-2 rounded-md overflow-hidden border border-gray-700 bg-gray-950", style: { aspectRatio: "16 / 9" }, children: /* @__PURE__ */ jsx2(
1104
+ "img",
1105
+ {
1106
+ src,
1107
+ alt: "",
1108
+ className: "w-full h-full object-cover",
1109
+ onError: () => setPreviewError(true),
1110
+ onLoad: () => setPreviewError(false)
1111
+ }
1112
+ ) }),
1113
+ /* @__PURE__ */ jsx2("label", { className: "block text-[10px] text-gray-500 uppercase tracking-wider mb-1", children: "URL" }),
1114
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-1 mb-2", children: [
1115
+ /* @__PURE__ */ jsx2(
1116
+ "input",
1117
+ {
1118
+ type: "text",
1119
+ value: src,
1120
+ onChange: (e) => {
1121
+ setSrc(e.target.value);
1122
+ setPreviewError(false);
1123
+ },
1124
+ onKeyDown: (e) => {
1125
+ if (e.key === "Enter") applySrc();
1126
+ },
1127
+ placeholder: "https://...",
1128
+ className: "flex-1 bg-gray-800 text-xs text-white rounded px-2 py-1.5 outline-none border border-transparent focus:border-brand-500 min-w-0"
1129
+ }
1130
+ ),
1131
+ /* @__PURE__ */ jsx2(
1132
+ "button",
1133
+ {
1134
+ onClick: applySrc,
1135
+ disabled: !urlValid,
1136
+ title: "Aplicar URL",
1137
+ className: "w-7 h-7 flex items-center justify-center rounded bg-brand-500 hover:bg-brand-600 transition-colors shrink-0 disabled:opacity-40 disabled:cursor-not-allowed",
1138
+ children: /* @__PURE__ */ jsx2("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx2("polyline", { points: "20 6 9 17 4 12" }) })
1139
+ }
1140
+ )
1141
+ ] }),
1142
+ src && !urlValid && /* @__PURE__ */ jsx2("p", { className: "text-[10px] text-amber-500 mb-2", children: "URL inv\xE1lida \u2014 debe empezar con http:// o https://" }),
1143
+ previewError && urlValid && /* @__PURE__ */ jsx2("p", { className: "text-[10px] text-red-400 mb-2", children: "No se pudo cargar la imagen desde esa URL." }),
1144
+ /* @__PURE__ */ jsx2("label", { className: "block text-[10px] text-gray-500 uppercase tracking-wider mb-1", children: "Alt" }),
1145
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-1", children: [
1146
+ /* @__PURE__ */ jsx2(
1147
+ "input",
1148
+ {
1149
+ type: "text",
1150
+ value: alt,
1151
+ onChange: (e) => setAlt(e.target.value),
1152
+ onKeyDown: (e) => {
1153
+ if (e.key === "Enter") applyAlt();
1154
+ },
1155
+ placeholder: "Descripci\xF3n...",
1156
+ className: "flex-1 bg-gray-800 text-xs text-white rounded px-2 py-1.5 outline-none border border-transparent focus:border-brand-500 min-w-0"
1157
+ }
1158
+ ),
1159
+ /* @__PURE__ */ jsx2(
1160
+ "button",
1161
+ {
1162
+ onClick: applyAlt,
1163
+ title: "Aplicar alt",
1164
+ className: "w-7 h-7 flex items-center justify-center rounded bg-gray-700 hover:bg-gray-600 transition-colors shrink-0",
1165
+ children: /* @__PURE__ */ jsx2("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx2("polyline", { points: "20 6 9 17 4 12" }) })
1166
+ }
1167
+ )
1168
+ ] })
1169
+ ] });
1170
+ }
1171
+
1018
1172
  // src/components4/grapesDarkCss.ts
1019
1173
  var GRAPES_DARK_CSS = `
1020
1174
  /* Dark theme for GrapesJS editor \u2014 matches EasyBits dark sidebar */
@@ -1118,7 +1272,7 @@ var GRAPES_DARK_CSS = `
1118
1272
  `;
1119
1273
 
1120
1274
  // src/components4/GrapesEditor.tsx
1121
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1275
+ import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1122
1276
  var darkCssInjected = false;
1123
1277
  function injectDarkCss() {
1124
1278
  if (darkCssInjected || typeof document === "undefined") return;
@@ -1152,7 +1306,7 @@ var PANEL_TABS = [
1152
1306
  ];
1153
1307
  var GrapesEditor = forwardRef(
1154
1308
  ({ initialHtml, theme = "minimal", customColors: rawCustomColors, brandKits, onChange, onAiAction, onThemeChange, onBrandKitChange, initialBrandKitId, hiddenTabs = [], canvasStyles, devices, panelSide = "left", blocks: customBlocks, onVisibleSectionChange }, ref) => {
1155
- useEffect2(() => {
1309
+ useEffect3(() => {
1156
1310
  injectDarkCss();
1157
1311
  }, []);
1158
1312
  const customColors = flattenColors(rawCustomColors);
@@ -1174,13 +1328,13 @@ var GrapesEditor = forwardRef(
1174
1328
  themeRef.current = theme;
1175
1329
  const customColorsRef = useRef2(customColors);
1176
1330
  customColorsRef.current = customColors;
1177
- const [activeBrandKitId, setActiveBrandKitId] = useState2(initialBrandKitId || null);
1331
+ const [activeBrandKitId, setActiveBrandKitId] = useState3(initialBrandKitId || null);
1178
1332
  const visibleTabs = PANEL_TABS.filter((t) => !hiddenTabs.includes(t.id));
1179
- const [activePanel, setActivePanel] = useState2(
1333
+ const [activePanel, setActivePanel] = useState3(
1180
1334
  () => visibleTabs.find((t) => t.id === "styles")?.id ?? visibleTabs[0]?.id ?? "styles"
1181
1335
  );
1182
- const [ready, setReady] = useState2(false);
1183
- const [themeVersion, setThemeVersion] = useState2(0);
1336
+ const [ready, setReady] = useState3(false);
1337
+ const [themeVersion, setThemeVersion] = useState3(0);
1184
1338
  useImperativeHandle(ref, () => ({
1185
1339
  getEditor: () => editorRef.current,
1186
1340
  getHtml: () => {
@@ -1316,7 +1470,7 @@ ${vars}
1316
1470
  }
1317
1471
  return null;
1318
1472
  }
1319
- useEffect2(() => {
1473
+ useEffect3(() => {
1320
1474
  if (!editorContainerRef.current || editorRef.current) return;
1321
1475
  let mounted = true;
1322
1476
  (async () => {
@@ -1668,7 +1822,7 @@ ${html}` : html;
1668
1822
  editorRef.current = null;
1669
1823
  };
1670
1824
  }, []);
1671
- useEffect2(() => {
1825
+ useEffect3(() => {
1672
1826
  const ed = editorRef.current;
1673
1827
  if (!ed) return;
1674
1828
  const doc = ed.Canvas.getDocument();
@@ -1691,52 +1845,55 @@ ${html}` : html;
1691
1845
  setTimeout(() => setThemeVersion((v) => v + 1), 100);
1692
1846
  }, [theme, customColors]);
1693
1847
  const sidebarBorder = panelSide === "right" ? "border-l" : "border-r";
1694
- const sidebar = /* @__PURE__ */ jsxs2("div", { className: `w-80 shrink-0 flex flex-col bg-black ${sidebarBorder} border-gray-700 overflow-hidden`, children: [
1695
- /* @__PURE__ */ jsx2("div", { className: "flex border-b border-gray-700", children: visibleTabs.map((tab) => /* @__PURE__ */ jsxs2(
1848
+ const sidebar = /* @__PURE__ */ jsxs3("div", { className: `w-80 shrink-0 flex flex-col bg-black ${sidebarBorder} border-gray-700 overflow-hidden`, children: [
1849
+ /* @__PURE__ */ jsx3("div", { className: "flex border-b border-gray-700", children: visibleTabs.map((tab) => /* @__PURE__ */ jsxs3(
1696
1850
  "button",
1697
1851
  {
1698
1852
  onClick: () => setActivePanel(tab.id),
1699
1853
  className: `flex-1 py-2.5 text-xs font-bold transition-colors ${activePanel === tab.id ? "bg-gray-800 text-white border-b-2 border-brand-500" : "text-gray-400 hover:text-gray-200 hover:bg-gray-800/50"}`,
1700
1854
  title: tab.label,
1701
1855
  children: [
1702
- /* @__PURE__ */ jsx2("span", { className: "block text-base mb-0.5", children: tab.icon }),
1856
+ /* @__PURE__ */ jsx3("span", { className: "block text-base mb-0.5", children: tab.icon }),
1703
1857
  tab.label
1704
1858
  ]
1705
1859
  },
1706
1860
  tab.id
1707
1861
  )) }),
1708
- !hiddenTabs.includes("blocks") && /* @__PURE__ */ jsx2(
1862
+ !hiddenTabs.includes("blocks") && /* @__PURE__ */ jsx3(
1709
1863
  "div",
1710
1864
  {
1711
1865
  ref: blocksRef,
1712
1866
  className: `flex-1 overflow-auto p-2 ${activePanel === "blocks" ? "" : "hidden"}`
1713
1867
  }
1714
1868
  ),
1715
- /* @__PURE__ */ jsx2(
1869
+ /* @__PURE__ */ jsx3(
1716
1870
  "div",
1717
1871
  {
1718
1872
  ref: layersRef,
1719
1873
  className: `flex-1 overflow-auto ${activePanel === "layers" ? "" : "hidden"}`
1720
1874
  }
1721
1875
  ),
1722
- /* @__PURE__ */ jsx2("div", { className: `flex-1 overflow-auto ${activePanel === "styles" ? "" : "hidden"}`, children: ready && /* @__PURE__ */ jsx2(
1723
- TailwindClassEditor,
1724
- {
1725
- editor: editorRef.current,
1726
- themeVersion,
1727
- themeColors: (() => {
1728
- if (customColors && Object.keys(customColors).length) return customColors;
1729
- const t = LANDING_THEMES.find((t2) => t2.id === theme);
1730
- return t?.colors || {};
1731
- })()
1732
- }
1733
- ) }),
1734
- /* @__PURE__ */ jsxs2("div", { className: `flex-1 overflow-auto p-3 ${activePanel === "themes" ? "" : "hidden"}`, children: [
1735
- /* @__PURE__ */ jsx2("p", { className: "text-xs text-gray-400 font-bold uppercase tracking-wider mb-3", children: "Temas" }),
1736
- /* @__PURE__ */ jsx2("div", { className: "grid grid-cols-2 gap-2", children: LANDING_THEMES.map((t) => {
1876
+ /* @__PURE__ */ jsxs3("div", { className: `flex-1 overflow-auto ${activePanel === "styles" ? "" : "hidden"}`, children: [
1877
+ ready && /* @__PURE__ */ jsx3(ImageSrcEditor, { editor: editorRef.current }),
1878
+ ready && /* @__PURE__ */ jsx3(
1879
+ TailwindClassEditor,
1880
+ {
1881
+ editor: editorRef.current,
1882
+ themeVersion,
1883
+ themeColors: (() => {
1884
+ if (customColors && Object.keys(customColors).length) return customColors;
1885
+ const t = LANDING_THEMES.find((t2) => t2.id === theme);
1886
+ return t?.colors || {};
1887
+ })()
1888
+ }
1889
+ )
1890
+ ] }),
1891
+ /* @__PURE__ */ jsxs3("div", { className: `flex-1 overflow-auto p-3 ${activePanel === "themes" ? "" : "hidden"}`, children: [
1892
+ /* @__PURE__ */ jsx3("p", { className: "text-xs text-gray-400 font-bold uppercase tracking-wider mb-3", children: "Temas" }),
1893
+ /* @__PURE__ */ jsx3("div", { className: "grid grid-cols-2 gap-2", children: LANDING_THEMES.map((t) => {
1737
1894
  const isActive = theme === t.id;
1738
1895
  const displayColors = isActive && customColors && Object.keys(customColors).length ? { ...t.colors, ...customColors } : t.colors;
1739
- return /* @__PURE__ */ jsxs2(
1896
+ return /* @__PURE__ */ jsxs3(
1740
1897
  "button",
1741
1898
  {
1742
1899
  onClick: () => {
@@ -1746,12 +1903,12 @@ ${html}` : html;
1746
1903
  },
1747
1904
  className: `flex flex-col items-center gap-1.5 p-2.5 rounded-xl border-2 transition-all ${isActive ? "border-brand-500 bg-brand-500/10" : "border-gray-700 hover:border-gray-500"}`,
1748
1905
  children: [
1749
- /* @__PURE__ */ jsxs2("div", { className: "flex gap-1", children: [
1750
- /* @__PURE__ */ jsx2("div", { className: "w-5 h-5 rounded-full border border-gray-600", style: { background: displayColors.primary }, title: "Primary" }),
1751
- /* @__PURE__ */ jsx2("div", { className: "w-5 h-5 rounded-full border border-gray-600", style: { background: displayColors.surface }, title: "Surface" }),
1752
- /* @__PURE__ */ jsx2("div", { className: "w-5 h-5 rounded-full border border-gray-600", style: { background: displayColors.accent }, title: "Accent" })
1906
+ /* @__PURE__ */ jsxs3("div", { className: "flex gap-1", children: [
1907
+ /* @__PURE__ */ jsx3("div", { className: "w-5 h-5 rounded-full border border-gray-600", style: { background: displayColors.primary }, title: "Primary" }),
1908
+ /* @__PURE__ */ jsx3("div", { className: "w-5 h-5 rounded-full border border-gray-600", style: { background: displayColors.surface }, title: "Surface" }),
1909
+ /* @__PURE__ */ jsx3("div", { className: "w-5 h-5 rounded-full border border-gray-600", style: { background: displayColors.accent }, title: "Accent" })
1753
1910
  ] }),
1754
- /* @__PURE__ */ jsx2("span", { className: "text-[10px] font-bold text-gray-300", children: t.label })
1911
+ /* @__PURE__ */ jsx3("span", { className: "text-[10px] font-bold text-gray-300", children: t.label })
1755
1912
  ]
1756
1913
  },
1757
1914
  t.id
@@ -1776,12 +1933,12 @@ ${html}` : html;
1776
1933
  "on-secondary": "On Secondary",
1777
1934
  "on-accent": "On Accent"
1778
1935
  };
1779
- return /* @__PURE__ */ jsx2("div", { className: "mt-3 space-y-1", children: Object.entries(currentColors).map(([key, hex]) => /* @__PURE__ */ jsxs2(
1936
+ return /* @__PURE__ */ jsx3("div", { className: "mt-3 space-y-1", children: Object.entries(currentColors).map(([key, hex]) => /* @__PURE__ */ jsxs3(
1780
1937
  "label",
1781
1938
  {
1782
1939
  className: "flex items-center gap-2 w-full px-2 py-1 rounded-lg hover:bg-gray-800 transition-colors group text-left cursor-pointer",
1783
1940
  children: [
1784
- /* @__PURE__ */ jsx2(
1941
+ /* @__PURE__ */ jsx3(
1785
1942
  "input",
1786
1943
  {
1787
1944
  type: "color",
@@ -1793,19 +1950,19 @@ ${html}` : html;
1793
1950
  className: "w-4 h-4 rounded border border-gray-600 shrink-0 cursor-pointer p-0 bg-transparent [&::-webkit-color-swatch-wrapper]:p-0 [&::-webkit-color-swatch]:border-none [&::-webkit-color-swatch]:rounded"
1794
1951
  }
1795
1952
  ),
1796
- /* @__PURE__ */ jsx2("span", { className: "text-[10px] text-gray-400 flex-1 truncate", children: COLOR_LABELS[key] || key }),
1797
- /* @__PURE__ */ jsx2("code", { className: "text-[10px] text-gray-500 group-hover:text-gray-300 font-mono", children: hex })
1953
+ /* @__PURE__ */ jsx3("span", { className: "text-[10px] text-gray-400 flex-1 truncate", children: COLOR_LABELS[key] || key }),
1954
+ /* @__PURE__ */ jsx3("code", { className: "text-[10px] text-gray-500 group-hover:text-gray-300 font-mono", children: hex })
1798
1955
  ]
1799
1956
  },
1800
1957
  key
1801
1958
  )) });
1802
1959
  })(),
1803
- brandKits && brandKits.length > 0 && /* @__PURE__ */ jsxs2(Fragment, { children: [
1804
- /* @__PURE__ */ jsx2("p", { className: "text-xs text-gray-400 font-bold uppercase tracking-wider mt-5 mb-3", children: "Brand Kits" }),
1805
- /* @__PURE__ */ jsx2("div", { className: "grid grid-cols-2 gap-2", children: brandKits.map((bk) => {
1960
+ brandKits && brandKits.length > 0 && /* @__PURE__ */ jsxs3(Fragment, { children: [
1961
+ /* @__PURE__ */ jsx3("p", { className: "text-xs text-gray-400 font-bold uppercase tracking-wider mt-5 mb-3", children: "Brand Kits" }),
1962
+ /* @__PURE__ */ jsx3("div", { className: "grid grid-cols-2 gap-2", children: brandKits.map((bk) => {
1806
1963
  const bkBase = flattenColors(bk.colors) || {};
1807
1964
  const displayColors = activeBrandKitId === bk.id && customColors && Object.keys(customColors).length ? { ...bkBase, ...customColors } : bkBase;
1808
- return /* @__PURE__ */ jsxs2(
1965
+ return /* @__PURE__ */ jsxs3(
1809
1966
  "button",
1810
1967
  {
1811
1968
  onClick: () => {
@@ -1815,7 +1972,7 @@ ${html}` : html;
1815
1972
  },
1816
1973
  className: `flex flex-col items-center gap-1.5 p-2.5 rounded-xl border-2 transition-all ${activeBrandKitId === bk.id ? "border-brand-500 bg-brand-500/10" : "border-gray-700 hover:border-gray-500"}`,
1817
1974
  children: [
1818
- /* @__PURE__ */ jsx2("div", { className: "flex gap-1", children: ["primary", "surface", "accent"].map((key) => /* @__PURE__ */ jsx2(
1975
+ /* @__PURE__ */ jsx3("div", { className: "flex gap-1", children: ["primary", "surface", "accent"].map((key) => /* @__PURE__ */ jsx3(
1819
1976
  "div",
1820
1977
  {
1821
1978
  className: "w-5 h-5 rounded-full border border-gray-600",
@@ -1823,7 +1980,7 @@ ${html}` : html;
1823
1980
  },
1824
1981
  key
1825
1982
  )) }),
1826
- /* @__PURE__ */ jsx2("span", { className: "text-[10px] font-bold text-gray-300 truncate max-w-full", children: bk.name })
1983
+ /* @__PURE__ */ jsx3("span", { className: "text-[10px] font-bold text-gray-300 truncate max-w-full", children: bk.name })
1827
1984
  ]
1828
1985
  },
1829
1986
  bk.id
@@ -1834,12 +1991,12 @@ ${html}` : html;
1834
1991
  if (!bk) return null;
1835
1992
  const baseColors = flattenColors(bk.colors) || {};
1836
1993
  const colors = customColors && Object.keys(customColors).length ? { ...baseColors, ...customColors } : baseColors;
1837
- return /* @__PURE__ */ jsx2("div", { className: "mt-3 space-y-1", children: Object.entries(colors).map(([key, hex]) => /* @__PURE__ */ jsxs2(
1994
+ return /* @__PURE__ */ jsx3("div", { className: "mt-3 space-y-1", children: Object.entries(colors).map(([key, hex]) => /* @__PURE__ */ jsxs3(
1838
1995
  "label",
1839
1996
  {
1840
1997
  className: "flex items-center gap-2 w-full px-2 py-1 rounded-lg hover:bg-gray-800 transition-colors group text-left cursor-pointer",
1841
1998
  children: [
1842
- /* @__PURE__ */ jsx2(
1999
+ /* @__PURE__ */ jsx3(
1843
2000
  "input",
1844
2001
  {
1845
2002
  type: "color",
@@ -1851,8 +2008,8 @@ ${html}` : html;
1851
2008
  className: "w-4 h-4 rounded border border-gray-600 shrink-0 cursor-pointer p-0 bg-transparent [&::-webkit-color-swatch-wrapper]:p-0 [&::-webkit-color-swatch]:border-none [&::-webkit-color-swatch]:rounded"
1852
2009
  }
1853
2010
  ),
1854
- /* @__PURE__ */ jsx2("span", { className: "text-[10px] text-gray-400 flex-1 truncate", children: key }),
1855
- /* @__PURE__ */ jsx2("code", { className: "text-[10px] text-gray-500 group-hover:text-gray-300 font-mono", children: hex })
2011
+ /* @__PURE__ */ jsx3("span", { className: "text-[10px] text-gray-400 flex-1 truncate", children: key }),
2012
+ /* @__PURE__ */ jsx3("code", { className: "text-[10px] text-gray-500 group-hover:text-gray-300 font-mono", children: hex })
1856
2013
  ]
1857
2014
  },
1858
2015
  key
@@ -1861,16 +2018,16 @@ ${html}` : html;
1861
2018
  ] })
1862
2019
  ] })
1863
2020
  ] });
1864
- const canvas = /* @__PURE__ */ jsx2("div", { ref: editorContainerRef, className: "flex-1 h-full bg-black" });
1865
- return /* @__PURE__ */ jsxs2("div", { className: "flex h-full w-full relative", children: [
1866
- panelSide === "right" ? /* @__PURE__ */ jsxs2(Fragment, { children: [
2021
+ const canvas = /* @__PURE__ */ jsx3("div", { ref: editorContainerRef, className: "flex-1 h-full bg-black" });
2022
+ return /* @__PURE__ */ jsxs3("div", { className: "flex h-full w-full relative", children: [
2023
+ panelSide === "right" ? /* @__PURE__ */ jsxs3(Fragment, { children: [
1867
2024
  canvas,
1868
2025
  sidebar
1869
- ] }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
2026
+ ] }) : /* @__PURE__ */ jsxs3(Fragment, { children: [
1870
2027
  sidebar,
1871
2028
  canvas
1872
2029
  ] }),
1873
- /* @__PURE__ */ jsx2(
2030
+ /* @__PURE__ */ jsx3(
1874
2031
  "div",
1875
2032
  {
1876
2033
  className: `absolute inset-0 z-50 pointer-events-none bg-gray-950/40 backdrop-blur-[2px] transition-all duration-500 ${ready ? "opacity-0 invisible" : "opacity-100"}`
@@ -1883,6 +2040,7 @@ GrapesEditor.displayName = "GrapesEditor";
1883
2040
  var GrapesEditor_default = GrapesEditor;
1884
2041
  export {
1885
2042
  GrapesEditor_default as GrapesEditor,
2043
+ ImageSrcEditor,
1886
2044
  LANDING_BLOCKS,
1887
2045
  TailwindClassEditor
1888
2046
  };