@brunoalz/smartgesti-site-editor 1.10.0 → 1.10.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.
@@ -1,35 +1,37 @@
1
1
  import { BlockPropertyEditor as o } from "./BlockPropertyEditor.js";
2
- import { VariationSelector as e } from "./VariationSelector.js";
2
+ import { VariationSelector as p } from "./VariationSelector.js";
3
3
  import { renderPropertyInput as n } from "./renderPropertyInput.js";
4
4
  import { ButtonGroupInput as x } from "./inputs/ButtonGroupInput.js";
5
5
  import { CarouselImagesInput as f } from "./inputs/CarouselImagesInput.js";
6
- import { ColorInput as i } from "./inputs/ColorInput.js";
7
- import { IconGridInput as g } from "./inputs/IconGridInput.js";
8
- import { ImageGridInput as c } from "./inputs/ImageGridInput.js";
9
- import { ImageInput as T } from "./inputs/ImageInput.js";
10
- import { NumberInput as G } from "./inputs/NumberInput.js";
11
- import { SelectInput as s } from "./inputs/SelectInput.js";
12
- import { SliderInput as P } from "./inputs/SliderInput.js";
13
- import { TextAreaInput as h } from "./inputs/TextAreaInput.js";
14
- import { TextInput as A } from "./inputs/TextInput.js";
15
- import { ToggleButton as N } from "./inputs/ToggleButton.js";
16
- import { TypographyInput as j } from "./inputs/TypographyInput.js";
6
+ import { ColorInput as l } from "./inputs/ColorInput.js";
7
+ import { GalleryImagesInput as i } from "./inputs/GalleryImagesInput.js";
8
+ import { IconGridInput as y } from "./inputs/IconGridInput.js";
9
+ import { ImageGridInput as G } from "./inputs/ImageGridInput.js";
10
+ import { ImageInput as s } from "./inputs/ImageInput.js";
11
+ import { NumberInput as S } from "./inputs/NumberInput.js";
12
+ import { SelectInput as P } from "./inputs/SelectInput.js";
13
+ import { SliderInput as h } from "./inputs/SliderInput.js";
14
+ import { TextAreaInput as A } from "./inputs/TextAreaInput.js";
15
+ import { TextInput as N } from "./inputs/TextInput.js";
16
+ import { ToggleButton as j } from "./inputs/ToggleButton.js";
17
+ import { TypographyInput as v } from "./inputs/TypographyInput.js";
17
18
  export {
18
19
  o as BlockPropertyEditor,
19
20
  x as ButtonGroupInput,
20
21
  f as CarouselImagesInput,
21
- i as ColorInput,
22
- g as IconGridInput,
23
- c as ImageGridInput,
24
- T as ImageInput,
25
- G as NumberInput,
26
- s as SelectInput,
27
- P as SliderInput,
28
- h as TextAreaInput,
29
- A as TextInput,
30
- N as ToggleButton,
31
- j as TypographyInput,
32
- e as VariationSelector,
22
+ l as ColorInput,
23
+ i as GalleryImagesInput,
24
+ y as IconGridInput,
25
+ G as ImageGridInput,
26
+ s as ImageInput,
27
+ S as NumberInput,
28
+ P as SelectInput,
29
+ h as SliderInput,
30
+ A as TextAreaInput,
31
+ N as TextInput,
32
+ j as ToggleButton,
33
+ v as TypographyInput,
34
+ p as VariationSelector,
33
35
  n as renderPropertyInput
34
36
  };
35
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,14 @@
1
+ import { GalleryImage } from '../../../engine/schema/siteDocument';
2
+ import { UploadConfig } from '../../LandingPageEditor';
3
+ interface GalleryImagesInputProps {
4
+ images: GalleryImage[];
5
+ onImagesChange: (images: GalleryImage[]) => void;
6
+ label?: string;
7
+ description?: string;
8
+ uploadConfig?: UploadConfig;
9
+ /** Aviso de performance a partir de N imagens */
10
+ warningThreshold?: number;
11
+ }
12
+ export declare function GalleryImagesInput({ images, onImagesChange, label, description, warningThreshold, }: GalleryImagesInputProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=GalleryImagesInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GalleryImagesInput.d.ts","sourceRoot":"","sources":["../../../../src/editor/PropertyEditor/inputs/GalleryImagesInput.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,UAAU,uBAAuB;IAC/B,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAoZD,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,cAAc,EACd,KAAK,EACL,WAAW,EACX,gBAAqB,GACtB,EAAE,uBAAuB,2CAyLzB"}
@@ -0,0 +1,469 @@
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import { useState as k, useRef as R, useCallback as B } from "react";
3
+ import E from "react-dom";
4
+ import { cn as i } from "../../../utils/cn.js";
5
+ import { logger as j } from "../../../utils/logger.js";
6
+ function I() {
7
+ return `img-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;
8
+ }
9
+ function z({ draft: r, onDraftChange: o, onSave: h, onCancel: c, isEditing: x }) {
10
+ const g = R(null), [d, b] = k(!1), [m, n] = k(!1), p = B(
11
+ (s) => {
12
+ const y = s.target.files?.[0];
13
+ if (!y || !y.type.startsWith("image/")) return;
14
+ if (y.size > 10 * 1024 * 1024) {
15
+ j.warn("[GalleryImagesInput] Arquivo muito grande (máx 10MB)");
16
+ return;
17
+ }
18
+ b(!0);
19
+ const u = new FileReader();
20
+ u.onload = (v) => {
21
+ o({ ...r, src: v.target?.result }), b(!1);
22
+ }, u.onerror = () => {
23
+ j.error("[GalleryImagesInput] Erro ao ler arquivo"), b(!1);
24
+ }, u.readAsDataURL(y);
25
+ },
26
+ [r, o]
27
+ ), w = () => {
28
+ if (!r.alt.trim()) {
29
+ n(!0);
30
+ return;
31
+ }
32
+ n(!1), h();
33
+ }, N = r.tags?.join(", ") ?? "", L = /* @__PURE__ */ e(
34
+ "div",
35
+ {
36
+ className: "fixed inset-0 z-[9999] flex items-center justify-center p-4",
37
+ style: { backgroundColor: "rgba(0,0,0,0.5)" },
38
+ onMouseDown: (s) => {
39
+ s.target === s.currentTarget && c();
40
+ },
41
+ children: /* @__PURE__ */ a("div", { className: "bg-white dark:bg-gray-900 rounded-xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto", children: [
42
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between px-5 py-4 border-b border-gray-200 dark:border-gray-700", children: [
43
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: x ? "Editar imagem" : "Adicionar imagem" }),
44
+ /* @__PURE__ */ e(
45
+ "button",
46
+ {
47
+ type: "button",
48
+ onClick: c,
49
+ className: "text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors",
50
+ children: /* @__PURE__ */ e("svg", { className: "w-5 h-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ e(
51
+ "path",
52
+ {
53
+ fillRule: "evenodd",
54
+ d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
55
+ clipRule: "evenodd"
56
+ }
57
+ ) })
58
+ }
59
+ )
60
+ ] }),
61
+ /* @__PURE__ */ a("div", { className: "px-5 py-4 space-y-4", children: [
62
+ r.src && /* @__PURE__ */ e("div", { className: "w-full h-40 rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800 border border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ e("img", { src: r.src, alt: "preview", className: "w-full h-full object-contain" }) }),
63
+ /* @__PURE__ */ a("div", { className: "space-y-2", children: [
64
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-700 dark:text-gray-300", children: "Imagem" }),
65
+ /* @__PURE__ */ e(
66
+ "input",
67
+ {
68
+ ref: g,
69
+ type: "file",
70
+ accept: "image/*",
71
+ onChange: p,
72
+ className: "hidden"
73
+ }
74
+ ),
75
+ /* @__PURE__ */ a(
76
+ "button",
77
+ {
78
+ type: "button",
79
+ onClick: () => {
80
+ g.current && (g.current.value = "", g.current.click());
81
+ },
82
+ disabled: d,
83
+ className: i(
84
+ "w-full h-10 rounded-lg border-2 border-dashed transition-colors",
85
+ "border-gray-300 dark:border-gray-600",
86
+ "hover:border-blue-400 dark:hover:border-blue-500",
87
+ "flex items-center justify-center gap-2",
88
+ "bg-gray-50 dark:bg-gray-800 text-sm text-gray-500 dark:text-gray-400",
89
+ d && "opacity-50 cursor-not-allowed"
90
+ ),
91
+ children: [
92
+ /* @__PURE__ */ e("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e(
93
+ "path",
94
+ {
95
+ strokeLinecap: "round",
96
+ strokeLinejoin: "round",
97
+ strokeWidth: 2,
98
+ d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"
99
+ }
100
+ ) }),
101
+ d ? "Carregando..." : "Enviar arquivo"
102
+ ]
103
+ }
104
+ ),
105
+ /* @__PURE__ */ e("div", { className: "text-center text-xs text-gray-400", children: "ou" }),
106
+ /* @__PURE__ */ e(
107
+ "input",
108
+ {
109
+ type: "text",
110
+ placeholder: "https://... (URL externa)",
111
+ value: r.src.startsWith("data:") ? "" : r.src,
112
+ onChange: (s) => o({ ...r, src: s.target.value }),
113
+ className: i(
114
+ "w-full h-9 rounded-lg border-2 bg-white dark:bg-gray-800 px-3 text-sm transition-all",
115
+ "border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:outline-none",
116
+ "text-gray-900 dark:text-gray-100 placeholder:text-gray-400"
117
+ )
118
+ }
119
+ )
120
+ ] }),
121
+ /* @__PURE__ */ a("div", { className: "space-y-1", children: [
122
+ /* @__PURE__ */ a("label", { className: "block text-xs font-medium text-gray-700 dark:text-gray-300", children: [
123
+ "Texto alternativo",
124
+ " ",
125
+ /* @__PURE__ */ e("span", { className: "text-red-500", children: "*" }),
126
+ /* @__PURE__ */ e("span", { className: "font-normal text-gray-400 ml-1", children: "(obrigatório para acessibilidade)" })
127
+ ] }),
128
+ /* @__PURE__ */ e(
129
+ "input",
130
+ {
131
+ type: "text",
132
+ placeholder: "Descrição da imagem para leitores de tela",
133
+ value: r.alt,
134
+ onChange: (s) => {
135
+ n(!1), o({ ...r, alt: s.target.value });
136
+ },
137
+ className: i(
138
+ "w-full h-9 rounded-lg border-2 bg-white dark:bg-gray-800 px-3 text-sm transition-all",
139
+ "focus:outline-none",
140
+ m ? "border-red-400 dark:border-red-500" : "border-gray-300 dark:border-gray-600 focus:border-blue-500",
141
+ "text-gray-900 dark:text-gray-100 placeholder:text-gray-400"
142
+ )
143
+ }
144
+ ),
145
+ m && /* @__PURE__ */ e("p", { className: "text-xs text-red-500", children: "O texto alternativo é obrigatório." })
146
+ ] }),
147
+ /* @__PURE__ */ a("div", { className: "space-y-1", children: [
148
+ /* @__PURE__ */ a("label", { className: "block text-xs font-medium text-gray-700 dark:text-gray-300", children: [
149
+ "Título ",
150
+ /* @__PURE__ */ e("span", { className: "font-normal text-gray-400", children: "(opcional)" })
151
+ ] }),
152
+ /* @__PURE__ */ e(
153
+ "input",
154
+ {
155
+ type: "text",
156
+ placeholder: "Ex: Projeto de design para cliente X",
157
+ value: r.title ?? "",
158
+ onChange: (s) => o({ ...r, title: s.target.value || void 0 }),
159
+ className: i(
160
+ "w-full h-9 rounded-lg border-2 bg-white dark:bg-gray-800 px-3 text-sm transition-all",
161
+ "border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:outline-none",
162
+ "text-gray-900 dark:text-gray-100 placeholder:text-gray-400"
163
+ )
164
+ }
165
+ )
166
+ ] }),
167
+ /* @__PURE__ */ a("div", { className: "space-y-1", children: [
168
+ /* @__PURE__ */ a("label", { className: "block text-xs font-medium text-gray-700 dark:text-gray-300", children: [
169
+ "Descrição ",
170
+ /* @__PURE__ */ e("span", { className: "font-normal text-gray-400", children: "(opcional)" })
171
+ ] }),
172
+ /* @__PURE__ */ e(
173
+ "textarea",
174
+ {
175
+ placeholder: "Legenda exibida no lightbox",
176
+ value: r.description ?? "",
177
+ onChange: (s) => o({ ...r, description: s.target.value || void 0 }),
178
+ rows: 2,
179
+ className: i(
180
+ "w-full rounded-lg border-2 bg-white dark:bg-gray-800 px-3 py-2 text-sm transition-all resize-none",
181
+ "border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:outline-none",
182
+ "text-gray-900 dark:text-gray-100 placeholder:text-gray-400"
183
+ )
184
+ }
185
+ )
186
+ ] }),
187
+ /* @__PURE__ */ a("div", { className: "space-y-1", children: [
188
+ /* @__PURE__ */ a("label", { className: "block text-xs font-medium text-gray-700 dark:text-gray-300", children: [
189
+ "Tags ",
190
+ /* @__PURE__ */ e("span", { className: "font-normal text-gray-400", children: "(opcional, separadas por vírgula)" })
191
+ ] }),
192
+ /* @__PURE__ */ e(
193
+ "input",
194
+ {
195
+ type: "text",
196
+ placeholder: "Ex: produto, destaque, azul",
197
+ value: N,
198
+ onChange: (s) => {
199
+ const u = s.target.value.split(",").map((v) => v.trim()).filter(Boolean);
200
+ o({ ...r, tags: u.length > 0 ? u : void 0 });
201
+ },
202
+ className: i(
203
+ "w-full h-9 rounded-lg border-2 bg-white dark:bg-gray-800 px-3 text-sm transition-all",
204
+ "border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:outline-none",
205
+ "text-gray-900 dark:text-gray-100 placeholder:text-gray-400"
206
+ )
207
+ }
208
+ )
209
+ ] })
210
+ ] }),
211
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-end gap-2 px-5 py-4 border-t border-gray-200 dark:border-gray-700", children: [
212
+ /* @__PURE__ */ e(
213
+ "button",
214
+ {
215
+ type: "button",
216
+ onClick: c,
217
+ className: i(
218
+ "px-4 py-2 text-sm rounded-lg transition-colors",
219
+ "text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"
220
+ ),
221
+ children: "Cancelar"
222
+ }
223
+ ),
224
+ /* @__PURE__ */ e(
225
+ "button",
226
+ {
227
+ type: "button",
228
+ onClick: w,
229
+ disabled: !r.src,
230
+ className: i(
231
+ "px-4 py-2 text-sm rounded-lg font-medium transition-colors",
232
+ "bg-blue-600 hover:bg-blue-700 text-white",
233
+ !r.src && "opacity-50 cursor-not-allowed"
234
+ ),
235
+ children: x ? "Salvar" : "Adicionar"
236
+ }
237
+ )
238
+ ] })
239
+ ] })
240
+ }
241
+ );
242
+ return E.createPortal(L, document.body);
243
+ }
244
+ function W({ image: r, index: o, total: h, onEdit: c, onRemove: x, onMoveUp: g, onMoveDown: d }) {
245
+ return /* @__PURE__ */ a("div", { className: "relative group flex-shrink-0", children: [
246
+ /* @__PURE__ */ e(
247
+ "button",
248
+ {
249
+ type: "button",
250
+ onClick: c,
251
+ className: i(
252
+ "w-16 h-16 rounded-lg overflow-hidden border-2 transition-all block",
253
+ "bg-gray-100 dark:bg-gray-800",
254
+ "border-gray-200 dark:border-gray-700 hover:border-blue-400 dark:hover:border-blue-500"
255
+ ),
256
+ title: r.alt || r.title || `Imagem ${o + 1}`,
257
+ children: r.src ? /* @__PURE__ */ e("img", { src: r.src, alt: r.alt, className: "w-full h-full object-cover" }) : /* @__PURE__ */ e("div", { className: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ e("svg", { className: "w-6 h-6 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e(
258
+ "path",
259
+ {
260
+ strokeLinecap: "round",
261
+ strokeLinejoin: "round",
262
+ strokeWidth: 2,
263
+ d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"
264
+ }
265
+ ) }) })
266
+ }
267
+ ),
268
+ /* @__PURE__ */ a("div", { className: i(
269
+ "absolute inset-0 rounded-lg opacity-0 group-hover:opacity-100 transition-opacity",
270
+ "flex flex-col items-center justify-between p-0.5",
271
+ "bg-black/20"
272
+ ), children: [
273
+ /* @__PURE__ */ e(
274
+ "button",
275
+ {
276
+ type: "button",
277
+ onClick: g,
278
+ disabled: o === 0,
279
+ className: i(
280
+ "w-5 h-5 rounded bg-white/90 dark:bg-gray-800/90 flex items-center justify-center",
281
+ "text-gray-700 dark:text-gray-200 transition-colors",
282
+ o === 0 ? "opacity-30 cursor-not-allowed" : "hover:bg-white dark:hover:bg-gray-700"
283
+ ),
284
+ title: "Mover para cima",
285
+ children: /* @__PURE__ */ e("svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M5 15l7-7 7 7" }) })
286
+ }
287
+ ),
288
+ /* @__PURE__ */ e(
289
+ "button",
290
+ {
291
+ type: "button",
292
+ onClick: x,
293
+ className: i(
294
+ "w-5 h-5 rounded bg-red-500/90 hover:bg-red-600 flex items-center justify-center",
295
+ "text-white transition-colors"
296
+ ),
297
+ title: "Remover imagem",
298
+ children: /* @__PURE__ */ e("svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M6 18L18 6M6 6l12 12" }) })
299
+ }
300
+ ),
301
+ /* @__PURE__ */ e(
302
+ "button",
303
+ {
304
+ type: "button",
305
+ onClick: d,
306
+ disabled: o === h - 1,
307
+ className: i(
308
+ "w-5 h-5 rounded bg-white/90 dark:bg-gray-800/90 flex items-center justify-center",
309
+ "text-gray-700 dark:text-gray-200 transition-colors",
310
+ o === h - 1 ? "opacity-30 cursor-not-allowed" : "hover:bg-white dark:hover:bg-gray-700"
311
+ ),
312
+ title: "Mover para baixo",
313
+ children: /* @__PURE__ */ e("svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M19 9l-7 7-7-7" }) })
314
+ }
315
+ )
316
+ ] }),
317
+ /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 bg-black/50 text-white text-[9px] text-center py-0.5 rounded-b-lg pointer-events-none", children: o + 1 })
318
+ ] });
319
+ }
320
+ const f = { src: "", alt: "", title: void 0, description: void 0, tags: void 0 };
321
+ function q({
322
+ images: r,
323
+ onImagesChange: o,
324
+ label: h,
325
+ description: c,
326
+ warningThreshold: x = 50
327
+ }) {
328
+ const [g, d] = k(!1), [b, m] = k(null), [n, p] = k(f), w = () => {
329
+ p(f), m(null), d(!0);
330
+ }, N = (l) => {
331
+ const t = r[l];
332
+ p({
333
+ src: t.src,
334
+ alt: t.alt,
335
+ title: t.title,
336
+ description: t.description,
337
+ tags: t.tags
338
+ }), m(l), d(!0);
339
+ }, L = () => {
340
+ if (!(!n.src || !n.alt.trim())) {
341
+ if (b !== null) {
342
+ const l = r.map(
343
+ (t, M) => M === b ? {
344
+ ...t,
345
+ src: n.src,
346
+ alt: n.alt.trim(),
347
+ title: n.title,
348
+ description: n.description,
349
+ tags: n.tags
350
+ } : t
351
+ );
352
+ o(l);
353
+ } else {
354
+ const l = {
355
+ id: I(),
356
+ src: n.src,
357
+ alt: n.alt.trim(),
358
+ title: n.title,
359
+ description: n.description,
360
+ tags: n.tags
361
+ };
362
+ o([...r, l]);
363
+ }
364
+ d(!1), p(f), m(null);
365
+ }
366
+ }, s = () => {
367
+ d(!1), p(f), m(null);
368
+ }, y = (l) => {
369
+ o(r.filter((t, M) => M !== l));
370
+ }, u = (l) => {
371
+ if (l === 0) return;
372
+ const t = [...r];
373
+ [t[l - 1], t[l]] = [t[l], t[l - 1]], o(t);
374
+ }, v = (l) => {
375
+ if (l === r.length - 1) return;
376
+ const t = [...r];
377
+ [t[l], t[l + 1]] = [t[l + 1], t[l]], o(t);
378
+ }, C = r.length >= x;
379
+ return /* @__PURE__ */ a("div", { className: "space-y-2", children: [
380
+ h && /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
381
+ /* @__PURE__ */ e("label", { className: "block text-xs font-medium text-gray-800 dark:text-gray-100", children: h }),
382
+ /* @__PURE__ */ a("span", { className: "text-[10px] text-gray-500 dark:text-gray-400", children: [
383
+ r.length,
384
+ " ",
385
+ r.length === 1 ? "imagem" : "imagens"
386
+ ] })
387
+ ] }),
388
+ c && /* @__PURE__ */ e("p", { className: "text-[10px] text-gray-500 dark:text-gray-400", children: c }),
389
+ r.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2 max-h-52 overflow-y-auto pr-1", children: r.map((l, t) => /* @__PURE__ */ e(
390
+ W,
391
+ {
392
+ image: l,
393
+ index: t,
394
+ total: r.length,
395
+ onEdit: () => N(t),
396
+ onRemove: () => y(t),
397
+ onMoveUp: () => u(t),
398
+ onMoveDown: () => v(t)
399
+ },
400
+ l.id
401
+ )) }) : /* @__PURE__ */ a("div", { className: i(
402
+ "w-full py-6 rounded-lg border-2 border-dashed",
403
+ "border-gray-200 dark:border-gray-700",
404
+ "flex flex-col items-center justify-center gap-1",
405
+ "text-gray-400 dark:text-gray-500"
406
+ ), children: [
407
+ /* @__PURE__ */ e("svg", { className: "w-7 h-7", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e(
408
+ "path",
409
+ {
410
+ strokeLinecap: "round",
411
+ strokeLinejoin: "round",
412
+ strokeWidth: 1.5,
413
+ d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"
414
+ }
415
+ ) }),
416
+ /* @__PURE__ */ e("span", { className: "text-xs", children: "Nenhuma imagem adicionada" })
417
+ ] }),
418
+ C && /* @__PURE__ */ a("div", { className: "flex items-start gap-2 p-2 bg-amber-50 dark:bg-amber-900/20 rounded-lg border border-amber-200 dark:border-amber-700", children: [
419
+ /* @__PURE__ */ e("svg", { className: "w-4 h-4 text-amber-500 flex-shrink-0 mt-0.5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e(
420
+ "path",
421
+ {
422
+ fillRule: "evenodd",
423
+ d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
424
+ clipRule: "evenodd"
425
+ }
426
+ ) }),
427
+ /* @__PURE__ */ a("p", { className: "text-[10px] text-amber-700 dark:text-amber-300", children: [
428
+ /* @__PURE__ */ a("strong", { children: [
429
+ r.length,
430
+ " imagens"
431
+ ] }),
432
+ " — muitas imagens podem afetar o desempenho da página."
433
+ ] })
434
+ ] }),
435
+ /* @__PURE__ */ a(
436
+ "button",
437
+ {
438
+ type: "button",
439
+ onClick: w,
440
+ className: i(
441
+ "w-full h-9 rounded-lg border-2 border-dashed transition-colors",
442
+ "border-gray-300 dark:border-gray-600",
443
+ "hover:border-blue-400 dark:hover:border-blue-500",
444
+ "flex items-center justify-center gap-1.5",
445
+ "text-sm text-gray-500 dark:text-gray-400 hover:text-blue-500 dark:hover:text-blue-400",
446
+ "bg-gray-50 dark:bg-gray-800/50"
447
+ ),
448
+ children: [
449
+ /* @__PURE__ */ e("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 4v16m8-8H4" }) }),
450
+ "Adicionar imagem"
451
+ ]
452
+ }
453
+ ),
454
+ g && /* @__PURE__ */ e(
455
+ z,
456
+ {
457
+ draft: n,
458
+ onDraftChange: p,
459
+ onSave: L,
460
+ onCancel: s,
461
+ isEditing: b !== null
462
+ }
463
+ )
464
+ ] });
465
+ }
466
+ export {
467
+ q as GalleryImagesInput
468
+ };
469
+ //# sourceMappingURL=GalleryImagesInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GalleryImagesInput.js","sources":["../../../../src/editor/PropertyEditor/inputs/GalleryImagesInput.tsx"],"sourcesContent":["/**\n * GalleryImagesInput\n * Modal avançado para gerenciar imagens da galeria:\n * - Upload (FileReader) ou URL externa\n * - Alt text obrigatório (a11y)\n * - Título, descrição, tags opcionais\n * - Reordenação (mover para cima/baixo)\n * - Aviso de performance acima de 50 imagens\n */\n\nimport { useState, useRef, useCallback } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { cn } from \"../../../utils/cn\";\nimport { logger } from \"../../../utils/logger\";\nimport type { GalleryImage } from \"../../../engine/schema/siteDocument\";\nimport type { UploadConfig } from \"../../LandingPageEditor\";\n\ninterface GalleryImagesInputProps {\n images: GalleryImage[];\n onImagesChange: (images: GalleryImage[]) => void;\n label?: string;\n description?: string;\n uploadConfig?: UploadConfig;\n /** Aviso de performance a partir de N imagens */\n warningThreshold?: number;\n}\n\ntype DraftImage = Partial<GalleryImage> & { src: string; alt: string };\n\n/** Gera um ID único simples */\nfunction generateId(): string {\n return `img-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`;\n}\n\n// ─────────────────────────────────────────────────────────\n// Modal de add/edit\n// ─────────────────────────────────────────────────────────\n\ninterface ImageModalProps {\n draft: DraftImage;\n onDraftChange: (d: DraftImage) => void;\n onSave: () => void;\n onCancel: () => void;\n isEditing: boolean;\n}\n\nfunction ImageModal({ draft, onDraftChange, onSave, onCancel, isEditing }: ImageModalProps) {\n const fileInputRef = useRef<HTMLInputElement>(null);\n const [uploading, setUploading] = useState(false);\n const [altError, setAltError] = useState(false);\n\n const handleFileChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const file = e.target.files?.[0];\n if (!file) return;\n if (!file.type.startsWith(\"image/\")) return;\n if (file.size > 10 * 1024 * 1024) {\n logger.warn(\"[GalleryImagesInput] Arquivo muito grande (máx 10MB)\");\n return;\n }\n\n setUploading(true);\n const reader = new FileReader();\n reader.onload = (evt) => {\n onDraftChange({ ...draft, src: evt.target?.result as string });\n setUploading(false);\n };\n reader.onerror = () => {\n logger.error(\"[GalleryImagesInput] Erro ao ler arquivo\");\n setUploading(false);\n };\n reader.readAsDataURL(file);\n },\n [draft, onDraftChange],\n );\n\n const handleSave = () => {\n if (!draft.alt.trim()) {\n setAltError(true);\n return;\n }\n setAltError(false);\n onSave();\n };\n\n const tagsString = draft.tags?.join(\", \") ?? \"\";\n\n const content = (\n <div\n className=\"fixed inset-0 z-[9999] flex items-center justify-center p-4\"\n style={{ backgroundColor: \"rgba(0,0,0,0.5)\" }}\n onMouseDown={(e) => {\n if (e.target === e.currentTarget) onCancel();\n }}\n >\n <div className=\"bg-white dark:bg-gray-900 rounded-xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto\">\n {/* Header */}\n <div className=\"flex items-center justify-between px-5 py-4 border-b border-gray-200 dark:border-gray-700\">\n <h3 className=\"text-sm font-semibold text-gray-900 dark:text-white\">\n {isEditing ? \"Editar imagem\" : \"Adicionar imagem\"}\n </h3>\n <button\n type=\"button\"\n onClick={onCancel}\n className=\"text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors\"\n >\n <svg className=\"w-5 h-5\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </button>\n </div>\n\n {/* Body */}\n <div className=\"px-5 py-4 space-y-4\">\n {/* Preview */}\n {draft.src && (\n <div className=\"w-full h-40 rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800 border border-gray-200 dark:border-gray-700\">\n <img src={draft.src} alt=\"preview\" className=\"w-full h-full object-contain\" />\n </div>\n )}\n\n {/* Fonte da imagem */}\n <div className=\"space-y-2\">\n <label className=\"block text-xs font-medium text-gray-700 dark:text-gray-300\">\n Imagem\n </label>\n\n {/* Upload */}\n <input\n ref={fileInputRef}\n type=\"file\"\n accept=\"image/*\"\n onChange={handleFileChange}\n className=\"hidden\"\n />\n <button\n type=\"button\"\n onClick={() => {\n if (fileInputRef.current) {\n fileInputRef.current.value = \"\";\n fileInputRef.current.click();\n }\n }}\n disabled={uploading}\n className={cn(\n \"w-full h-10 rounded-lg border-2 border-dashed transition-colors\",\n \"border-gray-300 dark:border-gray-600\",\n \"hover:border-blue-400 dark:hover:border-blue-500\",\n \"flex items-center justify-center gap-2\",\n \"bg-gray-50 dark:bg-gray-800 text-sm text-gray-500 dark:text-gray-400\",\n uploading && \"opacity-50 cursor-not-allowed\",\n )}\n >\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12\"\n />\n </svg>\n {uploading ? \"Carregando...\" : \"Enviar arquivo\"}\n </button>\n\n <div className=\"text-center text-xs text-gray-400\">ou</div>\n\n {/* URL */}\n <input\n type=\"text\"\n placeholder=\"https://... (URL externa)\"\n value={draft.src.startsWith(\"data:\") ? \"\" : draft.src}\n onChange={(e) => onDraftChange({ ...draft, src: e.target.value })}\n className={cn(\n \"w-full h-9 rounded-lg border-2 bg-white dark:bg-gray-800 px-3 text-sm transition-all\",\n \"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:outline-none\",\n \"text-gray-900 dark:text-gray-100 placeholder:text-gray-400\",\n )}\n />\n </div>\n\n {/* Alt text (obrigatório) */}\n <div className=\"space-y-1\">\n <label className=\"block text-xs font-medium text-gray-700 dark:text-gray-300\">\n Texto alternativo{\" \"}\n <span className=\"text-red-500\">*</span>\n <span className=\"font-normal text-gray-400 ml-1\">(obrigatório para acessibilidade)</span>\n </label>\n <input\n type=\"text\"\n placeholder=\"Descrição da imagem para leitores de tela\"\n value={draft.alt}\n onChange={(e) => {\n setAltError(false);\n onDraftChange({ ...draft, alt: e.target.value });\n }}\n className={cn(\n \"w-full h-9 rounded-lg border-2 bg-white dark:bg-gray-800 px-3 text-sm transition-all\",\n \"focus:outline-none\",\n altError\n ? \"border-red-400 dark:border-red-500\"\n : \"border-gray-300 dark:border-gray-600 focus:border-blue-500\",\n \"text-gray-900 dark:text-gray-100 placeholder:text-gray-400\",\n )}\n />\n {altError && (\n <p className=\"text-xs text-red-500\">O texto alternativo é obrigatório.</p>\n )}\n </div>\n\n {/* Título (opcional) */}\n <div className=\"space-y-1\">\n <label className=\"block text-xs font-medium text-gray-700 dark:text-gray-300\">\n Título <span className=\"font-normal text-gray-400\">(opcional)</span>\n </label>\n <input\n type=\"text\"\n placeholder=\"Ex: Projeto de design para cliente X\"\n value={draft.title ?? \"\"}\n onChange={(e) =>\n onDraftChange({ ...draft, title: e.target.value || undefined })\n }\n className={cn(\n \"w-full h-9 rounded-lg border-2 bg-white dark:bg-gray-800 px-3 text-sm transition-all\",\n \"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:outline-none\",\n \"text-gray-900 dark:text-gray-100 placeholder:text-gray-400\",\n )}\n />\n </div>\n\n {/* Descrição (opcional) */}\n <div className=\"space-y-1\">\n <label className=\"block text-xs font-medium text-gray-700 dark:text-gray-300\">\n Descrição <span className=\"font-normal text-gray-400\">(opcional)</span>\n </label>\n <textarea\n placeholder=\"Legenda exibida no lightbox\"\n value={draft.description ?? \"\"}\n onChange={(e) =>\n onDraftChange({ ...draft, description: e.target.value || undefined })\n }\n rows={2}\n className={cn(\n \"w-full rounded-lg border-2 bg-white dark:bg-gray-800 px-3 py-2 text-sm transition-all resize-none\",\n \"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:outline-none\",\n \"text-gray-900 dark:text-gray-100 placeholder:text-gray-400\",\n )}\n />\n </div>\n\n {/* Tags (opcional) */}\n <div className=\"space-y-1\">\n <label className=\"block text-xs font-medium text-gray-700 dark:text-gray-300\">\n Tags <span className=\"font-normal text-gray-400\">(opcional, separadas por vírgula)</span>\n </label>\n <input\n type=\"text\"\n placeholder=\"Ex: produto, destaque, azul\"\n value={tagsString}\n onChange={(e) => {\n const raw = e.target.value;\n const tags = raw\n .split(\",\")\n .map((t) => t.trim())\n .filter(Boolean);\n onDraftChange({ ...draft, tags: tags.length > 0 ? tags : undefined });\n }}\n className={cn(\n \"w-full h-9 rounded-lg border-2 bg-white dark:bg-gray-800 px-3 text-sm transition-all\",\n \"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:outline-none\",\n \"text-gray-900 dark:text-gray-100 placeholder:text-gray-400\",\n )}\n />\n </div>\n </div>\n\n {/* Footer */}\n <div className=\"flex items-center justify-end gap-2 px-5 py-4 border-t border-gray-200 dark:border-gray-700\">\n <button\n type=\"button\"\n onClick={onCancel}\n className={cn(\n \"px-4 py-2 text-sm rounded-lg transition-colors\",\n \"text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800\",\n )}\n >\n Cancelar\n </button>\n <button\n type=\"button\"\n onClick={handleSave}\n disabled={!draft.src}\n className={cn(\n \"px-4 py-2 text-sm rounded-lg font-medium transition-colors\",\n \"bg-blue-600 hover:bg-blue-700 text-white\",\n !draft.src && \"opacity-50 cursor-not-allowed\",\n )}\n >\n {isEditing ? \"Salvar\" : \"Adicionar\"}\n </button>\n </div>\n </div>\n </div>\n );\n\n return ReactDOM.createPortal(content, document.body);\n}\n\n// ─────────────────────────────────────────────────────────\n// Thumbnail individual\n// ─────────────────────────────────────────────────────────\n\ninterface ImageThumbProps {\n image: GalleryImage;\n index: number;\n total: number;\n onEdit: () => void;\n onRemove: () => void;\n onMoveUp: () => void;\n onMoveDown: () => void;\n}\n\nfunction ImageThumb({ image, index, total, onEdit, onRemove, onMoveUp, onMoveDown }: ImageThumbProps) {\n return (\n <div className=\"relative group flex-shrink-0\">\n {/* Thumbnail */}\n <button\n type=\"button\"\n onClick={onEdit}\n className={cn(\n \"w-16 h-16 rounded-lg overflow-hidden border-2 transition-all block\",\n \"bg-gray-100 dark:bg-gray-800\",\n \"border-gray-200 dark:border-gray-700 hover:border-blue-400 dark:hover:border-blue-500\",\n )}\n title={image.alt || image.title || `Imagem ${index + 1}`}\n >\n {image.src ? (\n <img src={image.src} alt={image.alt} className=\"w-full h-full object-cover\" />\n ) : (\n <div className=\"w-full h-full flex items-center justify-center\">\n <svg className=\"w-6 h-6 text-gray-400\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\"\n />\n </svg>\n </div>\n )}\n </button>\n\n {/* Ações no hover */}\n <div className={cn(\n \"absolute inset-0 rounded-lg opacity-0 group-hover:opacity-100 transition-opacity\",\n \"flex flex-col items-center justify-between p-0.5\",\n \"bg-black/20\",\n )}>\n {/* Mover para cima */}\n <button\n type=\"button\"\n onClick={onMoveUp}\n disabled={index === 0}\n className={cn(\n \"w-5 h-5 rounded bg-white/90 dark:bg-gray-800/90 flex items-center justify-center\",\n \"text-gray-700 dark:text-gray-200 transition-colors\",\n index === 0\n ? \"opacity-30 cursor-not-allowed\"\n : \"hover:bg-white dark:hover:bg-gray-700\",\n )}\n title=\"Mover para cima\"\n >\n <svg className=\"w-3 h-3\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2.5} d=\"M5 15l7-7 7 7\" />\n </svg>\n </button>\n\n {/* Remover */}\n <button\n type=\"button\"\n onClick={onRemove}\n className={cn(\n \"w-5 h-5 rounded bg-red-500/90 hover:bg-red-600 flex items-center justify-center\",\n \"text-white transition-colors\",\n )}\n title=\"Remover imagem\"\n >\n <svg className=\"w-3 h-3\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2.5} d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </button>\n\n {/* Mover para baixo */}\n <button\n type=\"button\"\n onClick={onMoveDown}\n disabled={index === total - 1}\n className={cn(\n \"w-5 h-5 rounded bg-white/90 dark:bg-gray-800/90 flex items-center justify-center\",\n \"text-gray-700 dark:text-gray-200 transition-colors\",\n index === total - 1\n ? \"opacity-30 cursor-not-allowed\"\n : \"hover:bg-white dark:hover:bg-gray-700\",\n )}\n title=\"Mover para baixo\"\n >\n <svg className=\"w-3 h-3\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2.5} d=\"M19 9l-7 7-7-7\" />\n </svg>\n </button>\n </div>\n\n {/* Número */}\n <div className=\"absolute bottom-0 left-0 right-0 bg-black/50 text-white text-[9px] text-center py-0.5 rounded-b-lg pointer-events-none\">\n {index + 1}\n </div>\n </div>\n );\n}\n\n// ─────────────────────────────────────────────────────────\n// Componente principal\n// ─────────────────────────────────────────────────────────\n\nconst EMPTY_DRAFT: DraftImage = { src: \"\", alt: \"\", title: undefined, description: undefined, tags: undefined };\n\nexport function GalleryImagesInput({\n images,\n onImagesChange,\n label,\n description,\n warningThreshold = 50,\n}: GalleryImagesInputProps) {\n const [showModal, setShowModal] = useState(false);\n const [editingIndex, setEditingIndex] = useState<number | null>(null);\n const [draft, setDraft] = useState<DraftImage>(EMPTY_DRAFT);\n\n const openAdd = () => {\n setDraft(EMPTY_DRAFT);\n setEditingIndex(null);\n setShowModal(true);\n };\n\n const openEdit = (index: number) => {\n const img = images[index];\n setDraft({\n src: img.src,\n alt: img.alt,\n title: img.title,\n description: img.description,\n tags: img.tags,\n });\n setEditingIndex(index);\n setShowModal(true);\n };\n\n const handleSave = () => {\n if (!draft.src || !draft.alt.trim()) return;\n\n if (editingIndex !== null) {\n // Editar existente\n const updated = images.map((img, i) =>\n i === editingIndex\n ? {\n ...img,\n src: draft.src,\n alt: draft.alt.trim(),\n title: draft.title,\n description: draft.description,\n tags: draft.tags,\n }\n : img,\n );\n onImagesChange(updated);\n } else {\n // Adicionar novo\n const newImage: GalleryImage = {\n id: generateId(),\n src: draft.src,\n alt: draft.alt.trim(),\n title: draft.title,\n description: draft.description,\n tags: draft.tags,\n };\n onImagesChange([...images, newImage]);\n }\n\n setShowModal(false);\n setDraft(EMPTY_DRAFT);\n setEditingIndex(null);\n };\n\n const handleCancel = () => {\n setShowModal(false);\n setDraft(EMPTY_DRAFT);\n setEditingIndex(null);\n };\n\n const handleRemove = (index: number) => {\n onImagesChange(images.filter((_, i) => i !== index));\n };\n\n const handleMoveUp = (index: number) => {\n if (index === 0) return;\n const arr = [...images];\n [arr[index - 1], arr[index]] = [arr[index], arr[index - 1]];\n onImagesChange(arr);\n };\n\n const handleMoveDown = (index: number) => {\n if (index === images.length - 1) return;\n const arr = [...images];\n [arr[index], arr[index + 1]] = [arr[index + 1], arr[index]];\n onImagesChange(arr);\n };\n\n const showWarning = images.length >= warningThreshold;\n\n return (\n <div className=\"space-y-2\">\n {/* Label */}\n {label && (\n <div className=\"flex items-center justify-between\">\n <label className=\"block text-xs font-medium text-gray-800 dark:text-gray-100\">\n {label}\n </label>\n <span className=\"text-[10px] text-gray-500 dark:text-gray-400\">\n {images.length} {images.length === 1 ? \"imagem\" : \"imagens\"}\n </span>\n </div>\n )}\n {description && (\n <p className=\"text-[10px] text-gray-500 dark:text-gray-400\">{description}</p>\n )}\n\n {/* Grid de thumbnails */}\n {images.length > 0 ? (\n <div className=\"flex flex-wrap gap-2 max-h-52 overflow-y-auto pr-1\">\n {images.map((img, index) => (\n <ImageThumb\n key={img.id}\n image={img}\n index={index}\n total={images.length}\n onEdit={() => openEdit(index)}\n onRemove={() => handleRemove(index)}\n onMoveUp={() => handleMoveUp(index)}\n onMoveDown={() => handleMoveDown(index)}\n />\n ))}\n </div>\n ) : (\n <div className={cn(\n \"w-full py-6 rounded-lg border-2 border-dashed\",\n \"border-gray-200 dark:border-gray-700\",\n \"flex flex-col items-center justify-center gap-1\",\n \"text-gray-400 dark:text-gray-500\",\n )}>\n <svg className=\"w-7 h-7\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\"\n />\n </svg>\n <span className=\"text-xs\">Nenhuma imagem adicionada</span>\n </div>\n )}\n\n {/* Aviso de performance */}\n {showWarning && (\n <div className=\"flex items-start gap-2 p-2 bg-amber-50 dark:bg-amber-900/20 rounded-lg border border-amber-200 dark:border-amber-700\">\n <svg className=\"w-4 h-4 text-amber-500 flex-shrink-0 mt-0.5\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path\n fillRule=\"evenodd\"\n d=\"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z\"\n clipRule=\"evenodd\"\n />\n </svg>\n <p className=\"text-[10px] text-amber-700 dark:text-amber-300\">\n <strong>{images.length} imagens</strong> — muitas imagens podem afetar o desempenho da página.\n </p>\n </div>\n )}\n\n {/* Botão adicionar */}\n <button\n type=\"button\"\n onClick={openAdd}\n className={cn(\n \"w-full h-9 rounded-lg border-2 border-dashed transition-colors\",\n \"border-gray-300 dark:border-gray-600\",\n \"hover:border-blue-400 dark:hover:border-blue-500\",\n \"flex items-center justify-center gap-1.5\",\n \"text-sm text-gray-500 dark:text-gray-400 hover:text-blue-500 dark:hover:text-blue-400\",\n \"bg-gray-50 dark:bg-gray-800/50\",\n )}\n >\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M12 4v16m8-8H4\" />\n </svg>\n Adicionar imagem\n </button>\n\n {/* Modal */}\n {showModal && (\n <ImageModal\n draft={draft}\n onDraftChange={setDraft}\n onSave={handleSave}\n onCancel={handleCancel}\n isEditing={editingIndex !== null}\n />\n )}\n </div>\n );\n}\n"],"names":["generateId","ImageModal","draft","onDraftChange","onSave","onCancel","isEditing","fileInputRef","useRef","uploading","setUploading","useState","altError","setAltError","handleFileChange","useCallback","e","file","logger","reader","evt","handleSave","tagsString","content","jsx","jsxs","cn","tags","t","ReactDOM","ImageThumb","image","index","total","onEdit","onRemove","onMoveUp","onMoveDown","EMPTY_DRAFT","GalleryImagesInput","images","onImagesChange","label","description","warningThreshold","showModal","setShowModal","editingIndex","setEditingIndex","setDraft","openAdd","openEdit","img","updated","i","newImage","handleCancel","handleRemove","_","handleMoveUp","arr","handleMoveDown","showWarning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AAC,SAAI,WAAU,+CAA8C,MAAK,gBAAe,SAAQ,aACvF,UAAA,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,GAAE;AAAA,UACF,UAAS;AAAA,QAAA;AAAA,MAAA,GAEb;AAAA,MACA,gBAAAC,EAAC,KAAA,EAAE,WAAU,kDACX,UAAA;AAAA,QAAA,gBAAAA,EAAC,UAAA,EAAQ,UAAA;AAAA,UAAAe,EAAO;AAAA,UAAO;AAAA,QAAA,GAAQ;AAAA,QAAS;AAAA,MAAA,EAAA,CAC1C;AAAA,IAAA,GACF;AAAA,IAIF,gBAAAf;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,SAASyB;AAAA,QACT,WAAWxB;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,QAGF,UAAA;AAAA,UAAA,gBAAAF,EAAC,SAAI,WAAU,WAAU,MAAK,QAAO,QAAO,gBAAe,SAAQ,aACjE,4BAAC,QAAA,EAAK,eAAc,SAAQ,gBAAe,SAAQ,aAAa,GAAG,GAAE,kBAAiB,EAAA,CACxF;AAAA,UAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAKPqB,KACC,gBAAArB;AAAA,MAACvB;AAAA,MAAA;AAAA,QACC,OAAAC;AAAA,QACA,eAAe+C;AAAA,QACf,QAAQ5B;AAAA,QACR,UAAUmC;AAAA,QACV,WAAWT,MAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EAC9B,GAEJ;AAEJ;"}
@@ -12,4 +12,5 @@ export { ImageGridInput } from './ImageGridInput';
12
12
  export { TypographyInput } from './TypographyInput';
13
13
  export { ImageInput } from './ImageInput';
14
14
  export { CarouselImagesInput } from './CarouselImagesInput';
15
+ export { GalleryImagesInput } from './GalleryImagesInput';
15
16
  //# sourceMappingURL=index.d.ts.map