@brunoalz/smartgesti-site-editor 1.9.1 → 1.10.1

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.
@@ -0,0 +1,27 @@
1
+ import { GalleryVariation } from '../schema/siteDocument';
2
+ export interface GalleryVariationPreset {
3
+ id: GalleryVariation;
4
+ name: string;
5
+ description: string;
6
+ thumbnail?: string;
7
+ defaultProps: {
8
+ variation: GalleryVariation;
9
+ columns: 2 | 3 | 4;
10
+ gap: number;
11
+ aspectRatio?: "1/1" | "4/3" | "16/9" | "3/2" | "auto";
12
+ imageBorderRadius: number;
13
+ imageShadow: "none" | "sm" | "md" | "lg" | "xl";
14
+ enterAnimation: "fade-scale" | "stagger" | "slide-up" | "none";
15
+ hoverEffect: "zoom-overlay" | "glow" | "scale" | "caption-reveal" | "none";
16
+ };
17
+ }
18
+ export declare const galleryVariations: Record<GalleryVariation, GalleryVariationPreset>;
19
+ /**
20
+ * Array of all gallery variation IDs for iteration
21
+ */
22
+ export declare const galleryVariationIds: GalleryVariation[];
23
+ /**
24
+ * Get a specific gallery variation by ID
25
+ */
26
+ export declare function getGalleryVariation(id: GalleryVariation): GalleryVariationPreset;
27
+ //# sourceMappingURL=galleryVariations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"galleryVariations.d.ts","sourceRoot":"","sources":["../../../src/engine/presets/galleryVariations.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,gBAAgB,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE;QACZ,SAAS,EAAE,gBAAgB,CAAC;QAC5B,OAAO,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACnB,GAAG,EAAE,MAAM,CAAC;QACZ,WAAW,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;QACtD,iBAAiB,EAAE,MAAM,CAAC;QAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;QAChD,cAAc,EAAE,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;QAC/D,WAAW,EAAE,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,gBAAgB,GAAG,MAAM,CAAC;KAC5E,CAAC;CACH;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,gBAAgB,EAAE,sBAAsB,CAsF9E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,EAMjD,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,gBAAgB,GAAG,sBAAsB,CAMhF"}
@@ -0,0 +1,102 @@
1
+ const r = {
2
+ // ============================================================================
3
+ // GALLERY GRID - Grade clássica de imagens
4
+ // ============================================================================
5
+ "gallery-grid": {
6
+ id: "gallery-grid",
7
+ name: "Grid Clássico",
8
+ description: "Grade responsiva com 4 colunas",
9
+ defaultProps: {
10
+ variation: "gallery-grid",
11
+ columns: 4,
12
+ gap: 1,
13
+ aspectRatio: "auto",
14
+ imageBorderRadius: 8,
15
+ imageShadow: "md",
16
+ enterAnimation: "fade-scale",
17
+ hoverEffect: "zoom-overlay"
18
+ }
19
+ },
20
+ // ============================================================================
21
+ // FUTURE VARIATIONS (v1.1-v1.4) - Placeholders for now
22
+ // ============================================================================
23
+ "gallery-masonry": {
24
+ id: "gallery-masonry",
25
+ name: "Mosaico",
26
+ description: "Grade tipo Pinterest com alturas variadas",
27
+ defaultProps: {
28
+ variation: "gallery-masonry",
29
+ columns: 3,
30
+ gap: 1.5,
31
+ aspectRatio: "auto",
32
+ imageBorderRadius: 12,
33
+ imageShadow: "lg",
34
+ enterAnimation: "stagger",
35
+ hoverEffect: "scale"
36
+ }
37
+ },
38
+ "gallery-featured": {
39
+ id: "gallery-featured",
40
+ name: "Destaque",
41
+ description: "Uma imagem grande + grid de miniaturas",
42
+ defaultProps: {
43
+ variation: "gallery-featured",
44
+ columns: 3,
45
+ gap: 1,
46
+ aspectRatio: "16/9",
47
+ imageBorderRadius: 8,
48
+ imageShadow: "lg",
49
+ enterAnimation: "slide-up",
50
+ hoverEffect: "glow"
51
+ }
52
+ },
53
+ "gallery-carousel": {
54
+ id: "gallery-carousel",
55
+ name: "Carrossel",
56
+ description: "Slider horizontal de imagens",
57
+ defaultProps: {
58
+ variation: "gallery-carousel",
59
+ columns: 4,
60
+ // Not used in carousel but required by type
61
+ gap: 1.5,
62
+ aspectRatio: "16/9",
63
+ imageBorderRadius: 16,
64
+ imageShadow: "xl",
65
+ enterAnimation: "fade-scale",
66
+ hoverEffect: "caption-reveal"
67
+ }
68
+ },
69
+ "gallery-alternating": {
70
+ id: "gallery-alternating",
71
+ name: "Alternado",
72
+ description: "Layout em zigue-zague",
73
+ defaultProps: {
74
+ variation: "gallery-alternating",
75
+ columns: 2,
76
+ gap: 2,
77
+ aspectRatio: "4/3",
78
+ imageBorderRadius: 12,
79
+ imageShadow: "lg",
80
+ enterAnimation: "stagger",
81
+ hoverEffect: "zoom-overlay"
82
+ }
83
+ }
84
+ }, i = [
85
+ "gallery-grid",
86
+ "gallery-masonry",
87
+ "gallery-featured",
88
+ "gallery-carousel",
89
+ "gallery-alternating"
90
+ ];
91
+ function o(a) {
92
+ const e = r[a];
93
+ if (!e)
94
+ throw new Error(`Gallery variation not found: ${a}`);
95
+ return e;
96
+ }
97
+ export {
98
+ i as galleryVariationIds,
99
+ r as galleryVariations,
100
+ o as getGalleryVariation
101
+ };
102
+ //# sourceMappingURL=galleryVariations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"galleryVariations.js","sources":["../../../src/engine/presets/galleryVariations.ts"],"sourcesContent":["/**\n * Presets de variações do bloco ImageGallery\n */\n\nimport type { GalleryVariation } from \"../schema/siteDocument\";\n\nexport interface GalleryVariationPreset {\n id: GalleryVariation;\n name: string;\n description: string;\n thumbnail?: string; // Future: add preview image URLs\n defaultProps: {\n variation: GalleryVariation;\n columns: 2 | 3 | 4;\n gap: number;\n aspectRatio?: \"1/1\" | \"4/3\" | \"16/9\" | \"3/2\" | \"auto\";\n imageBorderRadius: number;\n imageShadow: \"none\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n enterAnimation: \"fade-scale\" | \"stagger\" | \"slide-up\" | \"none\";\n hoverEffect: \"zoom-overlay\" | \"glow\" | \"scale\" | \"caption-reveal\" | \"none\";\n };\n}\n\nexport const galleryVariations: Record<GalleryVariation, GalleryVariationPreset> = {\n // ============================================================================\n // GALLERY GRID - Grade clássica de imagens\n // ============================================================================\n \"gallery-grid\": {\n id: \"gallery-grid\",\n name: \"Grid Clássico\",\n description: \"Grade responsiva com 4 colunas\",\n defaultProps: {\n variation: \"gallery-grid\",\n columns: 4,\n gap: 1,\n aspectRatio: \"auto\",\n imageBorderRadius: 8,\n imageShadow: \"md\",\n enterAnimation: \"fade-scale\",\n hoverEffect: \"zoom-overlay\",\n },\n },\n\n // ============================================================================\n // FUTURE VARIATIONS (v1.1-v1.4) - Placeholders for now\n // ============================================================================\n \"gallery-masonry\": {\n id: \"gallery-masonry\",\n name: \"Mosaico\",\n description: \"Grade tipo Pinterest com alturas variadas\",\n defaultProps: {\n variation: \"gallery-masonry\",\n columns: 3,\n gap: 1.5,\n aspectRatio: \"auto\",\n imageBorderRadius: 12,\n imageShadow: \"lg\",\n enterAnimation: \"stagger\",\n hoverEffect: \"scale\",\n },\n },\n\n \"gallery-featured\": {\n id: \"gallery-featured\",\n name: \"Destaque\",\n description: \"Uma imagem grande + grid de miniaturas\",\n defaultProps: {\n variation: \"gallery-featured\",\n columns: 3,\n gap: 1,\n aspectRatio: \"16/9\",\n imageBorderRadius: 8,\n imageShadow: \"lg\",\n enterAnimation: \"slide-up\",\n hoverEffect: \"glow\",\n },\n },\n\n \"gallery-carousel\": {\n id: \"gallery-carousel\",\n name: \"Carrossel\",\n description: \"Slider horizontal de imagens\",\n defaultProps: {\n variation: \"gallery-carousel\",\n columns: 4, // Not used in carousel but required by type\n gap: 1.5,\n aspectRatio: \"16/9\",\n imageBorderRadius: 16,\n imageShadow: \"xl\",\n enterAnimation: \"fade-scale\",\n hoverEffect: \"caption-reveal\",\n },\n },\n\n \"gallery-alternating\": {\n id: \"gallery-alternating\",\n name: \"Alternado\",\n description: \"Layout em zigue-zague\",\n defaultProps: {\n variation: \"gallery-alternating\",\n columns: 2,\n gap: 2,\n aspectRatio: \"4/3\",\n imageBorderRadius: 12,\n imageShadow: \"lg\",\n enterAnimation: \"stagger\",\n hoverEffect: \"zoom-overlay\",\n },\n },\n};\n\n/**\n * Array of all gallery variation IDs for iteration\n */\nexport const galleryVariationIds: GalleryVariation[] = [\n \"gallery-grid\",\n \"gallery-masonry\",\n \"gallery-featured\",\n \"gallery-carousel\",\n \"gallery-alternating\",\n];\n\n/**\n * Get a specific gallery variation by ID\n */\nexport function getGalleryVariation(id: GalleryVariation): GalleryVariationPreset {\n const variation = galleryVariations[id];\n if (!variation) {\n throw new Error(`Gallery variation not found: ${id}`);\n }\n return variation;\n}\n"],"names":["galleryVariations","galleryVariationIds","getGalleryVariation","id","variation"],"mappings":"AAuBO,MAAMA,IAAsE;AAAA;AAAA;AAAA;AAAA,EAIjF,gBAAgB;AAAA,IACd,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,cAAc;AAAA,MACZ,WAAW;AAAA,MACX,SAAS;AAAA,MACT,KAAK;AAAA,MACL,aAAa;AAAA,MACb,mBAAmB;AAAA,MACnB,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,aAAa;AAAA,IAAA;AAAA,EACf;AAAA;AAAA;AAAA;AAAA,EAMF,mBAAmB;AAAA,IACjB,IAAI;AAAA,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1
- {"version":3,"file":"Preview.d.ts","sourceRoot":"","sources":["../../../src/engine/preview/Preview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAA+C,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,YAAY,EAAS,MAAM,wBAAwB,CAAC;AAO7D,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,2DAA2D;IAC3D,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAwDD;;GAEG;AACH,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,YAAY,EACZ,eAAe,EACf,oBAA4B,EAC5B,YAAmB,GACpB,EAAE,YAAY,2CA4kBd"}
1
+ {"version":3,"file":"Preview.d.ts","sourceRoot":"","sources":["../../../src/engine/preview/Preview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAA+C,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,YAAY,EAAS,MAAM,wBAAwB,CAAC;AAO7D,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,2DAA2D;IAC3D,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAwDD;;GAEG;AACH,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,YAAY,EACZ,eAAe,EACf,oBAA4B,EAC5B,YAAmB,GACpB,EAAE,YAAY,2CAimBd"}
@@ -1,14 +1,14 @@
1
- import { jsx as C, jsxs as W } from "react/jsx-runtime";
2
- import { useRef as y, useState as j, useEffect as x, useMemo as F } from "react";
3
- import { componentRegistry as X } from "../registry/registry.js";
4
- import { exportPageToHtml as Y, exportBlockToHtml as K } from "../export/exportHtml.js";
5
- import { detectChangedBlocks as Q } from "../../utils/changeDetector.js";
6
- import { hashDocument as P } from "../../utils/documentHash.js";
7
- import { logger as D } from "../../utils/logger.js";
8
- function U(o, v) {
9
- const u = (w) => {
10
- for (const d of w) {
11
- if (d.id === v) return d;
1
+ import { jsx as P, jsxs as F } from "react/jsx-runtime";
2
+ import { useRef as k, useState as X, useEffect as S, useMemo as Y } from "react";
3
+ import { componentRegistry as K } from "../registry/registry.js";
4
+ import { exportPageToHtml as Q, exportBlockToHtml as U } from "../export/exportHtml.js";
5
+ import { detectChangedBlocks as V } from "../../utils/changeDetector.js";
6
+ import { hashDocument as H } from "../../utils/documentHash.js";
7
+ import { logger as J } from "../../utils/logger.js";
8
+ function Z(o, x) {
9
+ const u = (T) => {
10
+ for (const d of T) {
11
+ if (d.id === x) return d;
12
12
  const n = d.props;
13
13
  if (n?.children && Array.isArray(n.children)) {
14
14
  const r = u(n.children);
@@ -33,58 +33,58 @@ function U(o, v) {
33
33
  };
34
34
  return u(o.structure);
35
35
  }
36
- function V(o) {
37
- const v = {}, u = (w) => {
38
- for (const d of w) {
39
- const n = X.get(d.type);
40
- v[d.id] = n?.name || d.type;
36
+ function ee(o) {
37
+ const x = {}, u = (T) => {
38
+ for (const d of T) {
39
+ const n = K.get(d.type);
40
+ x[d.id] = n?.name || d.type;
41
41
  const r = d.props;
42
42
  r?.children && Array.isArray(r.children) && u(r.children), d.type === "card" && (Array.isArray(r?.header) && u(r.header), Array.isArray(r?.content) && u(r.content), Array.isArray(r?.footer) && u(r.footer));
43
43
  }
44
44
  };
45
- return o?.structure && u(o.structure), v;
45
+ return o?.structure && u(o.structure), x;
46
46
  }
47
- function ae({
47
+ function se({
48
48
  document: o,
49
- pageId: v,
49
+ pageId: x,
50
50
  className: u,
51
- style: w,
51
+ style: T,
52
52
  onBlockClick: d,
53
53
  selectedBlockId: n,
54
54
  showSelectionOverlay: r = !1,
55
- focusedGroup: H = null
55
+ focusedGroup: B = null
56
56
  }) {
57
- const s = y(null), E = y(null), _ = y(null), J = y(null), B = y(!1), [$, A] = j(!0), I = y(n), R = y(r), M = y(H);
58
- x(() => {
59
- I.current = n;
60
- }, [n]), x(() => {
57
+ const s = k(null), A = k(null), _ = k(null), q = k(null), L = k(!1), [G, C] = X(!0), D = k(n), R = k(r), M = k(B);
58
+ S(() => {
59
+ D.current = n;
60
+ }, [n]), S(() => {
61
61
  R.current = r;
62
- }, [r]), x(() => {
63
- M.current = H;
64
- }, [H]);
65
- const f = F(() => v ? o.pages.find((t) => t.id === v) : o.pages[0], [o, v]), z = y({});
66
- x(() => {
67
- z.current = V(f);
68
- }, [f]);
69
- const L = (t) => {
62
+ }, [r]), S(() => {
63
+ M.current = B;
64
+ }, [B]);
65
+ const p = Y(() => x ? o.pages.find((t) => t.id === x) : o.pages[0], [o, x]), $ = k({});
66
+ S(() => {
67
+ $.current = ee(p);
68
+ }, [p]);
69
+ const I = (t) => {
70
70
  if (!s.current) return;
71
71
  const e = s.current.contentDocument || s.current.contentWindow?.document;
72
72
  if (!e) return;
73
73
  const i = R.current, l = M.current;
74
74
  requestAnimationFrame(() => {
75
75
  const c = e.getElementById("block-highlight");
76
- c && c.remove(), e.querySelectorAll("[data-block-id]").forEach((T) => {
77
- const g = T;
78
- g.style.outline = "", g.style.outlineOffset = "";
76
+ c && c.remove(), e.querySelectorAll("[data-block-id]").forEach((h) => {
77
+ const m = h;
78
+ m.style.outline = "", m.style.outlineOffset = "";
79
79
  });
80
- const b = e.getElementById("sg-block-label");
81
- b && b.remove();
80
+ const E = e.getElementById("sg-block-label");
81
+ E && E.remove();
82
82
  const N = e.getElementById("sg-group-highlight");
83
83
  N && N.remove();
84
- const p = e.getElementById("sg-group-label");
85
- if (p && p.remove(), t) {
86
- const T = e.createElement("style");
87
- if (T.id = "block-highlight", T.textContent = `
84
+ const w = e.getElementById("sg-group-label");
85
+ if (w && w.remove(), t) {
86
+ const h = e.createElement("style");
87
+ if (h.id = "block-highlight", h.textContent = `
88
88
  [data-block-id="${t}"] {
89
89
  outline: 2px solid #3b82f6 !important;
90
90
  outline-offset: 2px !important;
@@ -101,34 +101,34 @@ function ae({
101
101
  pointer-events: none;
102
102
  z-index: -1;
103
103
  }
104
- `, e.head.appendChild(T), i) {
105
- const g = e.querySelector(`[data-block-id="${t}"]`);
106
- if (g) {
107
- const m = z.current[t] || t, k = e.createElement("div");
108
- k.id = "sg-block-label", k.textContent = m, k.style.cssText = "position:absolute;top:-22px;left:0;background:#3b82f6;color:#fff;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px 4px 0 0;z-index:10000;pointer-events:none;font-family:system-ui,sans-serif;white-space:nowrap;line-height:16px;", getComputedStyle(g).position === "static" && (g.style.position = "relative"), g.appendChild(k);
104
+ `, e.head.appendChild(h), i) {
105
+ const m = e.querySelector(`[data-block-id="${t}"]`);
106
+ if (m) {
107
+ const y = $.current[t] || t, v = e.createElement("div");
108
+ v.id = "sg-block-label", v.textContent = y, v.style.cssText = "position:absolute;top:-22px;left:0;background:#3b82f6;color:#fff;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px 4px 0 0;z-index:10000;pointer-events:none;font-family:system-ui,sans-serif;white-space:nowrap;line-height:16px;", getComputedStyle(m).position === "static" && (m.style.position = "relative"), m.appendChild(v);
109
109
  }
110
110
  }
111
111
  if (l) {
112
- const m = e.querySelector(`[data-block-id="${t}"]`)?.querySelector(`[data-block-group="${l}"]`);
113
- if (m) {
114
- const k = e.createElement("style");
115
- k.id = "sg-group-highlight", k.textContent = `
112
+ const y = e.querySelector(`[data-block-id="${t}"]`)?.querySelector(`[data-block-group="${l}"]`);
113
+ if (y) {
114
+ const v = e.createElement("style");
115
+ v.id = "sg-group-highlight", v.textContent = `
116
116
  [data-block-id="${t}"] [data-block-group="${l}"] {
117
117
  outline: 2px solid #8b5cf6 !important;
118
118
  outline-offset: 2px !important;
119
119
  position: relative;
120
120
  }
121
- `, e.head.appendChild(k);
122
- const S = e.createElement("div");
123
- S.id = "sg-group-label", S.textContent = l, S.style.cssText = "position:absolute;top:-20px;right:0;background:#8b5cf6;color:#fff;font-size:10px;font-weight:600;padding:2px 8px;border-radius:4px 4px 0 0;z-index:10001;pointer-events:none;font-family:system-ui,sans-serif;white-space:nowrap;line-height:14px;", getComputedStyle(m).position === "static" && (m.style.position = "relative"), m.appendChild(S);
121
+ `, e.head.appendChild(v);
122
+ const b = e.createElement("div");
123
+ b.id = "sg-group-label", b.textContent = l, b.style.cssText = "position:absolute;top:-20px;right:0;background:#8b5cf6;color:#fff;font-size:10px;font-weight:600;padding:2px 8px;border-radius:4px 4px 0 0;z-index:10001;pointer-events:none;font-family:system-ui,sans-serif;white-space:nowrap;line-height:14px;", getComputedStyle(y).position === "static" && (y.style.position = "relative"), y.appendChild(b);
124
124
  }
125
125
  }
126
126
  }
127
127
  });
128
- }, q = () => {
128
+ }, W = () => {
129
129
  s.current?.contentWindow && s.current.contentWindow.postMessage({
130
130
  type: "sg-set-block-names",
131
- names: z.current
131
+ names: $.current
132
132
  }, "*");
133
133
  }, O = (t) => {
134
134
  if (!s.current) return;
@@ -159,14 +159,14 @@ function ae({
159
159
  outline-offset: 1px !important;
160
160
  background: rgba(139, 92, 246, 0.04);
161
161
  }
162
- `, e.head.appendChild(l), q();
162
+ `, e.head.appendChild(l), W();
163
163
  }
164
- L(I.current || null);
165
- }, h = (t, e) => {
166
- if (!(!s.current || !f))
164
+ I(D.current || null);
165
+ }, g = (t, e) => {
166
+ if (!(!s.current || !p))
167
167
  try {
168
- e && A(!0);
169
- let i = Y(f, t, !0);
168
+ e && C(!0);
169
+ let i = Q(p, t, !0);
170
170
  const l = `
171
171
  <script>
172
172
  (function() {
@@ -273,109 +273,117 @@ function ae({
273
273
  `;
274
274
  i = i.replace("</body>", `${l}</body>`), i.includes("</body>") || (i = i + l);
275
275
  const c = s.current, a = () => {
276
- L(I.current || null), R.current && O(!0);
276
+ I(D.current || null), R.current && O(!0);
277
277
  };
278
278
  e ? (c.onload = () => {
279
- A(!1), E.current = JSON.parse(JSON.stringify(t)), _.current = P(t), a();
279
+ C(!1), A.current = JSON.parse(JSON.stringify(t)), _.current = H(t), a();
280
280
  }, setTimeout(() => {
281
- A(!1), E.current = JSON.parse(JSON.stringify(t)), _.current = P(t), a();
282
- }, 1e3)) : (E.current = JSON.parse(JSON.stringify(t)), _.current = P(t), c.onload = () => {
281
+ C(!1), A.current = JSON.parse(JSON.stringify(t)), _.current = H(t), a();
282
+ }, 1e3)) : (A.current = JSON.parse(JSON.stringify(t)), _.current = H(t), c.onload = () => {
283
283
  a();
284
284
  }), c.srcdoc = i;
285
285
  } catch (i) {
286
- D.error("[Preview] Error:", i), e && A(!1);
286
+ J.error("[Preview] Error:", i), e && C(!1);
287
287
  }
288
- }, G = (t, e) => {
289
- if (!(!s.current || !f))
288
+ }, j = (t, e) => {
289
+ if (!(!s.current || !p))
290
290
  try {
291
- const i = U(f, t);
291
+ const i = Z(p, t);
292
292
  if (!i) {
293
- h(e, !1);
293
+ g(e, !1);
294
294
  return;
295
295
  }
296
- const l = K(i, void 0, e.theme);
296
+ const l = U(i, void 0, e.theme);
297
297
  requestAnimationFrame(() => {
298
298
  const c = s.current;
299
299
  if (!c) return;
300
300
  const a = c.contentDocument || c.contentWindow?.document;
301
301
  if (!a) return;
302
- const b = a.querySelector(`[data-block-id="${t}"]`);
303
- if (b)
302
+ const E = a.querySelector(`[data-block-id="${t}"]`);
303
+ if (E)
304
304
  try {
305
- a.querySelectorAll(`style[data-block-style="${t}"]`).forEach((m) => m.remove());
306
- const p = a.createElement("div");
307
- p.innerHTML = l, p.querySelectorAll("style").forEach((m) => {
308
- m.setAttribute("data-block-style", t);
305
+ a.querySelectorAll(`style[data-block-style="${t}"]`).forEach((f) => f.remove()), a.querySelectorAll(`script[data-block-style="${t}"]`).forEach((f) => f.remove());
306
+ const h = a.createElement("div");
307
+ h.innerHTML = l, h.querySelectorAll("style").forEach((f) => {
308
+ f.setAttribute("data-block-style", t);
309
+ });
310
+ const y = [];
311
+ h.querySelectorAll("script").forEach((f) => {
312
+ y.push({ text: f.textContent || "" }), f.remove();
309
313
  });
310
- const g = a.createDocumentFragment();
311
- for (; p.firstChild; )
312
- g.appendChild(p.firstChild);
313
- g.childNodes.length > 0 ? b.parentNode?.replaceChild(g, b) : b.outerHTML = l, E.current = JSON.parse(JSON.stringify(e)), _.current = P(e), L(I.current || null);
314
+ const b = a.createDocumentFragment();
315
+ for (; h.firstChild; )
316
+ b.appendChild(h.firstChild);
317
+ b.childNodes.length > 0 ? E.parentNode?.replaceChild(b, E) : E.outerHTML = l, y.forEach(({ text: f }) => {
318
+ if (!f.trim()) return;
319
+ const z = a.createElement("script");
320
+ z.setAttribute("data-block-style", t), z.textContent = f, a.body.appendChild(z);
321
+ }), A.current = JSON.parse(JSON.stringify(e)), _.current = H(e), I(D.current || null);
314
322
  } catch (N) {
315
- D.error("[Preview] Erro ao atualizar:", N), h(e, !1);
323
+ J.error("[Preview] Erro ao atualizar:", N), g(e, !1);
316
324
  }
317
325
  else
318
- h(e, !1);
326
+ g(e, !1);
319
327
  });
320
328
  } catch (i) {
321
- D.error("[Preview] Erro:", i), h(e, !1);
329
+ J.error("[Preview] Erro:", i), g(e, !1);
322
330
  }
323
331
  };
324
- return x(() => {
325
- if (!f) {
326
- A(!1);
332
+ return S(() => {
333
+ if (!p) {
334
+ C(!1);
327
335
  return;
328
336
  }
329
- const t = P(o);
330
- if (!B.current) {
331
- s.current && (B.current = !0, J.current = f?.id ?? null, h(o, !0));
337
+ const t = H(o);
338
+ if (!L.current) {
339
+ s.current && (L.current = !0, q.current = p?.id ?? null, g(o, !0));
332
340
  return;
333
341
  }
334
342
  if (!s.current) return;
335
- const e = f?.id ?? null;
336
- if (J.current !== e) {
337
- J.current = e, h(o, !1);
343
+ const e = p?.id ?? null;
344
+ if (q.current !== e) {
345
+ q.current = e, g(o, !1);
338
346
  return;
339
347
  }
340
348
  if (_.current === t)
341
349
  return;
342
- const i = E.current ? JSON.stringify(E.current.theme) : null, l = JSON.stringify(o.theme);
350
+ const i = A.current ? JSON.stringify(A.current.theme) : null, l = JSON.stringify(o.theme);
343
351
  if (i !== l) {
344
- h(o, !1);
352
+ g(o, !1);
345
353
  return;
346
354
  }
347
- const c = Q(
348
- E.current || o,
355
+ const c = V(
356
+ A.current || o,
349
357
  o,
350
- f?.id
358
+ p?.id
351
359
  );
352
360
  if (c.length === 0) {
353
- D.debug(
361
+ J.debug(
354
362
  "[Preview] Hash changed but no changes detected, forcing reload"
355
- ), h(o, !1);
363
+ ), g(o, !1);
356
364
  return;
357
365
  }
358
366
  if (c.some(
359
367
  (a) => a.blockId === "__structural__" || a.changedProps?.includes("children")
360
368
  )) {
361
- h(o, !1);
369
+ g(o, !1);
362
370
  return;
363
371
  }
364
372
  if (c.length === 1) {
365
373
  const a = c[0];
366
374
  if (!(a.changedProps || []).some(
367
- (p) => p === "children" || p === "header" || p === "content" || p === "footer"
375
+ (w) => w === "children" || w === "header" || w === "content" || w === "footer"
368
376
  )) {
369
- G(a.blockId, o);
377
+ j(a.blockId, o);
370
378
  return;
371
379
  }
372
380
  }
373
- h(o, !1);
374
- }, [o, f]), x(() => {
375
- B.current && L(n || null);
376
- }, [n, H]), x(() => {
377
- B.current && O(r);
378
- }, [r]), x(() => {
381
+ g(o, !1);
382
+ }, [o, p]), S(() => {
383
+ L.current && I(n || null);
384
+ }, [n, B]), S(() => {
385
+ L.current && O(r);
386
+ }, [r]), S(() => {
379
387
  if (!d) return;
380
388
  const t = (e) => {
381
389
  e.data?.type === "block-click" && e.data?.blockId && d(e.data.blockId, e.data.group || void 0);
@@ -383,8 +391,8 @@ function ae({
383
391
  return window.addEventListener("message", t), () => {
384
392
  window.removeEventListener("message", t);
385
393
  };
386
- }, [d]), f ? /* @__PURE__ */ W("div", { className: u, style: { position: "relative", ...w }, children: [
387
- $ && /* @__PURE__ */ C(
394
+ }, [d]), p ? /* @__PURE__ */ F("div", { className: u, style: { position: "relative", ...T }, children: [
395
+ G && /* @__PURE__ */ P(
388
396
  "div",
389
397
  {
390
398
  style: {
@@ -399,10 +407,10 @@ function ae({
399
407
  backgroundColor: "rgba(255, 255, 255, 0.8)",
400
408
  zIndex: 10
401
409
  },
402
- children: /* @__PURE__ */ C("div", { style: { color: "#6b7280" }, children: "Carregando preview..." })
410
+ children: /* @__PURE__ */ P("div", { style: { color: "#6b7280" }, children: "Carregando preview..." })
403
411
  }
404
412
  ),
405
- /* @__PURE__ */ C(
413
+ /* @__PURE__ */ P(
406
414
  "iframe",
407
415
  {
408
416
  ref: s,
@@ -415,9 +423,9 @@ function ae({
415
423
  title: "Preview do site"
416
424
  }
417
425
  )
418
- ] }) : /* @__PURE__ */ C("div", { className: u, style: w, children: /* @__PURE__ */ C("div", { style: { padding: "2rem", textAlign: "center", color: "#6b7280" }, children: "Página não encontrada" }) });
426
+ ] }) : /* @__PURE__ */ P("div", { className: u, style: T, children: /* @__PURE__ */ P("div", { style: { padding: "2rem", textAlign: "center", color: "#6b7280" }, children: "Página não encontrada" }) });
419
427
  }
420
428
  export {
421
- ae as Preview
429
+ se as Preview
422
430
  };
423
431
  //# sourceMappingURL=Preview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Preview.js","sources":["../../../src/engine/preview/Preview.tsx"],"sourcesContent":["/**\n * Preview\n * Sem dependências circulares, sem reloads desnecessários\n */\n\nimport React, { useEffect, useRef, useState, useMemo } from \"react\";\nimport { SiteDocument, Block } from \"../schema/siteDocument\";\nimport { componentRegistry } from \"../registry/registry\";\nimport { exportPageToHtml, exportBlockToHtml } from \"../export/exportHtml\";\nimport { detectChangedBlocks } from \"../../utils/changeDetector\";\nimport { hashDocument } from \"../../utils/documentHash\";\nimport { logger } from \"../../utils/logger\";\n\nexport interface PreviewProps {\n document: SiteDocument;\n pageId?: string;\n className?: string;\n style?: React.CSSProperties;\n onBlockClick?: (blockId: string, group?: string) => void;\n selectedBlockId?: string | null;\n /** Exibe hover e label de seleção nos blocos do preview */\n showSelectionOverlay?: boolean;\n /** Grupo focado para indicador visual no preview */\n focusedGroup?: string | null;\n}\n\n/**\n * Encontra um bloco na estrutura recursivamente\n */\nfunction findBlockInPage(page: any, blockId: string): Block | null {\n const findInBlocks = (blocks: Block[]): Block | null => {\n for (const block of blocks) {\n if (block.id === blockId) return block;\n const props = block.props as Record<string, any>;\n if (props?.children && Array.isArray(props.children)) {\n const found = findInBlocks(props.children);\n if (found) return found;\n }\n if (block.type === \"card\") {\n if (props.header && Array.isArray(props.header)) {\n const found = findInBlocks(props.header);\n if (found) return found;\n }\n if (props.content && Array.isArray(props.content)) {\n const found = findInBlocks(props.content);\n if (found) return found;\n }\n if (props.footer && Array.isArray(props.footer)) {\n const found = findInBlocks(props.footer);\n if (found) return found;\n }\n }\n }\n return null;\n };\n return findInBlocks(page.structure);\n}\n\n/**\n * Monta mapa blockId → nome legível (da registry)\n */\nfunction buildBlockNameMap(page: any): Record<string, string> {\n const map: Record<string, string> = {};\n const walk = (blocks: Block[]) => {\n for (const block of blocks) {\n const def = componentRegistry.get(block.type);\n map[block.id] = def?.name || block.type;\n const props = block.props as Record<string, any>;\n if (props?.children && Array.isArray(props.children)) walk(props.children);\n if (block.type === \"card\") {\n if (Array.isArray(props?.header)) walk(props.header);\n if (Array.isArray(props?.content)) walk(props.content);\n if (Array.isArray(props?.footer)) walk(props.footer);\n }\n }\n };\n if (page?.structure) walk(page.structure);\n return map;\n}\n\n/**\n * Componente de preview usando iframe isolado\n */\nexport function Preview({\n document,\n pageId,\n className,\n style,\n onBlockClick,\n selectedBlockId,\n showSelectionOverlay = false,\n focusedGroup = null,\n}: PreviewProps) {\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const previousDocRef = useRef<SiteDocument | null>(null);\n const previousDocHashRef = useRef<string | null>(null);\n const previousPageIdRef = useRef<string | null>(null);\n const isInitializedRef = useRef<boolean>(false);\n const [isLoading, setIsLoading] = useState(true);\n\n // Usar ref para selectedBlockId (necessário para highlight assíncrono)\n const selectedBlockIdRef = useRef(selectedBlockId);\n const showSelectionOverlayRef = useRef(showSelectionOverlay);\n const focusedGroupRef = useRef(focusedGroup);\n\n // Atualizar refs quando props mudam\n useEffect(() => {\n selectedBlockIdRef.current = selectedBlockId;\n }, [selectedBlockId]);\n\n useEffect(() => {\n showSelectionOverlayRef.current = showSelectionOverlay;\n }, [showSelectionOverlay]);\n\n useEffect(() => {\n focusedGroupRef.current = focusedGroup;\n }, [focusedGroup]);\n\n const page = useMemo(() => {\n return pageId\n ? document.pages.find((p) => p.id === pageId)\n : document.pages[0];\n }, [document, pageId]);\n\n // Mapa blockId → nome legível para labels\n const blockNameMapRef = useRef<Record<string, string>>({});\n useEffect(() => {\n blockNameMapRef.current = buildBlockNameMap(page);\n }, [page]);\n\n // Atualizar highlight + selection overlay diretamente no iframe (sem reload)\n const updateHighlight = (blockId: string | null) => {\n if (!iframeRef.current) return;\n\n const iframeDoc =\n iframeRef.current.contentDocument ||\n iframeRef.current.contentWindow?.document;\n if (!iframeDoc) return;\n\n const overlayEnabled = showSelectionOverlayRef.current;\n const group = focusedGroupRef.current;\n\n requestAnimationFrame(() => {\n // Remover highlight anterior\n const oldStyle = iframeDoc.getElementById(\"block-highlight\");\n if (oldStyle) oldStyle.remove();\n\n const allBlocks = iframeDoc.querySelectorAll(\"[data-block-id]\");\n allBlocks.forEach((el) => {\n const htmlEl = el as HTMLElement;\n htmlEl.style.outline = \"\";\n htmlEl.style.outlineOffset = \"\";\n });\n\n // Remover labels anteriores\n const oldLabel = iframeDoc.getElementById(\"sg-block-label\");\n if (oldLabel) oldLabel.remove();\n const oldGroupStyle = iframeDoc.getElementById(\"sg-group-highlight\");\n if (oldGroupStyle) oldGroupStyle.remove();\n const oldGroupLabel = iframeDoc.getElementById(\"sg-group-label\");\n if (oldGroupLabel) oldGroupLabel.remove();\n\n // Adicionar novo highlight\n if (blockId) {\n const highlightStyle = iframeDoc.createElement(\"style\");\n highlightStyle.id = \"block-highlight\";\n highlightStyle.textContent = `\n [data-block-id=\"${blockId}\"] {\n outline: 2px solid #3b82f6 !important;\n outline-offset: 2px !important;\n position: relative;\n }\n [data-block-id=\"${blockId}\"]::before {\n content: '';\n position: absolute;\n top: -4px;\n left: -4px;\n right: -4px;\n bottom: -4px;\n background: rgba(59, 130, 246, 0.1);\n pointer-events: none;\n z-index: -1;\n }\n `;\n iframeDoc.head.appendChild(highlightStyle);\n\n // Selection label (only when overlay is enabled)\n if (overlayEnabled) {\n const selectedEl = iframeDoc.querySelector(`[data-block-id=\"${blockId}\"]`) as HTMLElement;\n if (selectedEl) {\n const blockName = blockNameMapRef.current[blockId] || blockId;\n const label = iframeDoc.createElement(\"div\");\n label.id = \"sg-block-label\";\n label.textContent = blockName;\n label.style.cssText = \"position:absolute;top:-22px;left:0;background:#3b82f6;color:#fff;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px 4px 0 0;z-index:10000;pointer-events:none;font-family:system-ui,sans-serif;white-space:nowrap;line-height:16px;\";\n const pos = getComputedStyle(selectedEl).position;\n if (pos === \"static\") selectedEl.style.position = \"relative\";\n selectedEl.appendChild(label);\n }\n }\n\n // Indicador de grupo — mostra qual sub-seção foi clicada (purple)\n if (group) {\n const blockEl = iframeDoc.querySelector(`[data-block-id=\"${blockId}\"]`);\n const groupEl = blockEl?.querySelector(`[data-block-group=\"${group}\"]`) as HTMLElement;\n if (groupEl) {\n const ghStyle = iframeDoc.createElement(\"style\");\n ghStyle.id = \"sg-group-highlight\";\n ghStyle.textContent = `\n [data-block-id=\"${blockId}\"] [data-block-group=\"${group}\"] {\n outline: 2px solid #8b5cf6 !important;\n outline-offset: 2px !important;\n position: relative;\n }\n `;\n iframeDoc.head.appendChild(ghStyle);\n\n const gLabel = iframeDoc.createElement(\"div\");\n gLabel.id = \"sg-group-label\";\n gLabel.textContent = group;\n gLabel.style.cssText = \"position:absolute;top:-20px;right:0;background:#8b5cf6;color:#fff;font-size:10px;font-weight:600;padding:2px 8px;border-radius:4px 4px 0 0;z-index:10001;pointer-events:none;font-family:system-ui,sans-serif;white-space:nowrap;line-height:14px;\";\n const gPos = getComputedStyle(groupEl).position;\n if (gPos === \"static\") groupEl.style.position = \"relative\";\n groupEl.appendChild(gLabel);\n }\n }\n }\n });\n };\n\n // Enviar mapa de nomes para o iframe\n const sendBlockNamesToIframe = () => {\n if (!iframeRef.current?.contentWindow) return;\n iframeRef.current.contentWindow.postMessage({\n type: \"sg-set-block-names\",\n names: blockNameMapRef.current,\n }, \"*\");\n };\n\n // Atualizar hover overlay (injetar/remover CSS de hover nos blocos)\n const updateSelectionOverlay = (enabled: boolean) => {\n if (!iframeRef.current) return;\n\n const iframeDoc =\n iframeRef.current.contentDocument ||\n iframeRef.current.contentWindow?.document;\n if (!iframeDoc) return;\n\n const existingStyle = iframeDoc.getElementById(\"sg-hover-overlay\");\n if (existingStyle) existingStyle.remove();\n\n // Remove tooltip when disabling\n if (!enabled) {\n const tooltip = iframeDoc.getElementById(\"sg-hover-tooltip\");\n if (tooltip) tooltip.style.opacity = \"0\";\n }\n\n if (enabled) {\n const hoverStyle = iframeDoc.createElement(\"style\");\n hoverStyle.id = \"sg-hover-overlay\";\n hoverStyle.textContent = `\n [data-block-id] {\n cursor: pointer;\n transition: outline 0.15s ease, outline-offset 0.15s ease;\n }\n [data-block-id]:hover {\n outline: 2px dashed #94a3b8 !important;\n outline-offset: 2px !important;\n }\n [data-block-group] {\n cursor: pointer;\n transition: outline 0.15s ease, background 0.15s ease;\n }\n [data-block-group]:hover {\n outline: 1.5px dashed #a78bfa !important;\n outline-offset: 1px !important;\n background: rgba(139, 92, 246, 0.04);\n }\n `;\n iframeDoc.head.appendChild(hoverStyle);\n sendBlockNamesToIframe();\n }\n\n // Re-apply highlight (recalcula label)\n updateHighlight(selectedBlockIdRef.current || null);\n };\n\n // Atualizar preview completo (com srcdoc - causa reload)\n const updateFullPreview = (doc: SiteDocument, showLoading: boolean) => {\n if (!iframeRef.current || !page) return;\n\n try {\n if (showLoading) {\n setIsLoading(true);\n }\n\n let html = exportPageToHtml(page, doc, true);\n\n // Adicionar click handler + hover handler: links não navegam, enviam editor-navigate; outros cliques enviam block-click\n const clickHandler = `\n <script>\n (function() {\n // Click handler\n document.addEventListener('click', function(e) {\n var target = e.target;\n var anchor = target;\n while (anchor && anchor.tagName !== 'A') {\n anchor = anchor.parentElement;\n }\n if (anchor && anchor.tagName === 'A' && anchor.href) {\n e.preventDefault();\n e.stopPropagation();\n window.parent.postMessage({\n type: 'editor-navigate',\n href: anchor.getAttribute('href') || anchor.href\n }, '*');\n return;\n }\n var element = target;\n var group = null;\n while (element && !element.dataset.blockId) {\n if (element.dataset && element.dataset.blockGroup && !group) {\n group = element.dataset.blockGroup;\n }\n element = element.parentElement;\n }\n if (element && element.dataset.blockId) {\n window.parent.postMessage({\n type: 'block-click',\n blockId: element.dataset.blockId,\n group: group\n }, '*');\n }\n }, true);\n\n // Hover tooltip — block name map injected from parent via postMessage\n var _blockNames = {};\n var _hoverTooltip = null;\n\n window.addEventListener('message', function(e) {\n if (e.data && e.data.type === 'sg-set-block-names') {\n _blockNames = e.data.names || {};\n }\n });\n\n function getTooltip() {\n if (_hoverTooltip) return _hoverTooltip;\n _hoverTooltip = document.createElement('div');\n _hoverTooltip.id = 'sg-hover-tooltip';\n _hoverTooltip.style.cssText = 'position:fixed;top:0;left:0;background:#334155;color:#fff;font-size:11px;font-weight:500;padding:3px 8px;border-radius:4px;z-index:99999;pointer-events:none;font-family:system-ui,sans-serif;white-space:nowrap;line-height:16px;opacity:0;transition:opacity 0.12s ease;box-shadow:0 2px 6px rgba(0,0,0,0.2);';\n document.body.appendChild(_hoverTooltip);\n return _hoverTooltip;\n }\n\n var _currentHoveredBlock = null;\n var _currentHoveredGroup = null;\n\n document.addEventListener('mouseover', function(e) {\n // Check if hover overlay is active\n if (!document.getElementById('sg-hover-overlay')) return;\n var el = e.target;\n var groupName = null;\n while (el && !el.dataset.blockId) {\n if (el.dataset && el.dataset.blockGroup && !groupName) {\n groupName = el.dataset.blockGroup;\n }\n el = el.parentElement;\n }\n if (el && el.dataset.blockId) {\n if (el !== _currentHoveredBlock || groupName !== _currentHoveredGroup) {\n _currentHoveredBlock = el;\n _currentHoveredGroup = groupName;\n var tt = getTooltip();\n var blockName = _blockNames[el.dataset.blockId] || el.dataset.blockId;\n tt.textContent = groupName ? (blockName + ' \\\\u203A ' + groupName) : blockName;\n tt.style.opacity = '1';\n }\n }\n }, true);\n\n document.addEventListener('mousemove', function(e) {\n if (_hoverTooltip && _hoverTooltip.style.opacity === '1') {\n _hoverTooltip.style.left = (e.clientX + 12) + 'px';\n _hoverTooltip.style.top = (e.clientY - 28) + 'px';\n }\n }, true);\n\n document.addEventListener('mouseout', function(e) {\n var el = e.target;\n while (el && !el.dataset.blockId) el = el.parentElement;\n if (el === _currentHoveredBlock) {\n var related = e.relatedTarget;\n while (related && related !== el) related = related.parentElement;\n if (!related) {\n _currentHoveredBlock = null;\n _currentHoveredGroup = null;\n if (_hoverTooltip) _hoverTooltip.style.opacity = '0';\n }\n }\n }, true);\n })();\n </script>\n `;\n html = html.replace(\"</body>\", `${clickHandler}</body>`);\n if (!html.includes(\"</body>\")) {\n html = html + clickHandler;\n }\n\n const iframe = iframeRef.current;\n\n const applyOverlayAfterLoad = () => {\n updateHighlight(selectedBlockIdRef.current || null);\n if (showSelectionOverlayRef.current) {\n updateSelectionOverlay(true);\n }\n };\n\n if (showLoading) {\n iframe.onload = () => {\n setIsLoading(false);\n previousDocRef.current = JSON.parse(JSON.stringify(doc));\n previousDocHashRef.current = hashDocument(doc);\n applyOverlayAfterLoad();\n };\n setTimeout(() => {\n setIsLoading(false);\n previousDocRef.current = JSON.parse(JSON.stringify(doc));\n previousDocHashRef.current = hashDocument(doc);\n applyOverlayAfterLoad();\n }, 1000);\n } else {\n previousDocRef.current = JSON.parse(JSON.stringify(doc));\n previousDocHashRef.current = hashDocument(doc);\n iframe.onload = () => {\n applyOverlayAfterLoad();\n };\n }\n\n iframe.srcdoc = html;\n } catch (error) {\n logger.error(\"[Preview] Error:\", error);\n if (showLoading) {\n setIsLoading(false);\n }\n }\n };\n\n // Atualizar apenas um bloco (sem reload)\n const updatePartialPreview = (blockId: string, doc: SiteDocument) => {\n if (!iframeRef.current || !page) return;\n\n try {\n const block = findBlockInPage(page, blockId);\n if (!block) {\n updateFullPreview(doc, false);\n return;\n }\n\n const blockHtml = exportBlockToHtml(block, undefined, doc.theme);\n\n requestAnimationFrame(() => {\n const iframe = iframeRef.current;\n if (!iframe) return;\n\n const iframeDoc =\n iframe.contentDocument || iframe.contentWindow?.document;\n if (!iframeDoc) return;\n\n const element = iframeDoc.querySelector(`[data-block-id=\"${blockId}\"]`);\n if (element) {\n try {\n // Remover <style> tags antigas associadas a este bloco\n const oldStyles = iframeDoc.querySelectorAll(`style[data-block-style=\"${blockId}\"]`);\n oldStyles.forEach(s => s.remove());\n\n const temp = iframeDoc.createElement(\"div\");\n temp.innerHTML = blockHtml;\n\n // Marcar e extrair <style> tags para inserção separada\n const styleTags = temp.querySelectorAll(\"style\");\n styleTags.forEach(style => {\n style.setAttribute(\"data-block-style\", blockId);\n });\n\n // Usar DocumentFragment para substituir com múltiplos elementos irmãos\n // (ex: <style>hover CSS</style><button>text</button>)\n const fragment = iframeDoc.createDocumentFragment();\n while (temp.firstChild) {\n fragment.appendChild(temp.firstChild);\n }\n\n if (fragment.childNodes.length > 0) {\n element.parentNode?.replaceChild(fragment, element);\n } else {\n element.outerHTML = blockHtml;\n }\n\n // Atualizar refs\n previousDocRef.current = JSON.parse(JSON.stringify(doc));\n previousDocHashRef.current = hashDocument(doc);\n\n // Reaplicar highlight\n updateHighlight(selectedBlockIdRef.current || null);\n } catch (error) {\n logger.error(\"[Preview] Erro ao atualizar:\", error);\n updateFullPreview(doc, false);\n }\n } else {\n updateFullPreview(doc, false);\n }\n });\n } catch (error) {\n logger.error(\"[Preview] Erro:\", error);\n updateFullPreview(doc, false);\n }\n };\n\n // Efeito para mudanças no DOCUMENTO (não no selectedBlockId)\n useEffect(() => {\n if (!page) {\n setIsLoading(false);\n return;\n }\n\n const currentDocHash = hashDocument(document);\n\n // Primeira renderização\n if (!isInitializedRef.current) {\n if (iframeRef.current) {\n isInitializedRef.current = true;\n previousPageIdRef.current = page?.id ?? null;\n updateFullPreview(document, true);\n }\n return;\n }\n\n if (!iframeRef.current) return;\n\n // Detectar troca de página (pageId mudou)\n const currentPageId = page?.id ?? null;\n if (previousPageIdRef.current !== currentPageId) {\n previousPageIdRef.current = currentPageId;\n updateFullPreview(document, false);\n return;\n }\n\n // Se hash não mudou, não há mudanças no documento\n if (previousDocHashRef.current === currentDocHash) {\n return;\n }\n\n // Se o theme mudou, forçar reload completo (CSS variables precisam ser regeneradas)\n const prevThemeJson = previousDocRef.current ? JSON.stringify(previousDocRef.current.theme) : null;\n const currThemeJson = JSON.stringify(document.theme);\n if (prevThemeJson !== currThemeJson) {\n updateFullPreview(document, false);\n return;\n }\n\n // Detectar mudanças na página atual\n const changedBlocks = detectChangedBlocks(\n previousDocRef.current || document,\n document,\n page?.id,\n );\n\n // Se não há mudanças detectadas mas o hash mudou, forçar reload\n if (changedBlocks.length === 0) {\n logger.debug(\n \"[Preview] Hash changed but no changes detected, forcing reload\",\n );\n updateFullPreview(document, false);\n return;\n }\n\n // Mudança estrutural (bloco adicionado/removido) = reload completo\n if (\n changedBlocks.some(\n (c) =>\n c.blockId === \"__structural__\" ||\n c.changedProps?.includes(\"children\"),\n )\n ) {\n updateFullPreview(document, false);\n return;\n }\n\n // Mudança de 1 bloco (não estrutural) = atualização parcial\n if (changedBlocks.length === 1) {\n const change = changedBlocks[0];\n const changedProps = change.changedProps || [];\n\n const isStructural = changedProps.some(\n (prop) =>\n prop === \"children\" ||\n prop === \"header\" ||\n prop === \"content\" ||\n prop === \"footer\",\n );\n\n if (!isStructural) {\n updatePartialPreview(change.blockId, document);\n return;\n }\n }\n\n // Fallback: reload completo SEM loader\n updateFullPreview(document, false);\n }, [document, page]); // APENAS document e page - sem funções\n\n // Efeito SEPARADO para highlight (não recarrega o preview)\n useEffect(() => {\n if (!isInitializedRef.current) return;\n updateHighlight(selectedBlockId || null);\n }, [selectedBlockId, focusedGroup]); // eslint-disable-line react-hooks/exhaustive-deps -- updateHighlight reads focusedGroupRef\n\n // Efeito para toggle do selection overlay\n useEffect(() => {\n if (!isInitializedRef.current) return;\n updateSelectionOverlay(showSelectionOverlay);\n }, [showSelectionOverlay]); // eslint-disable-line react-hooks/exhaustive-deps -- same pattern as updateFullPreview\n\n // Listener para cliques\n useEffect(() => {\n if (!onBlockClick) return;\n\n const handleMessage = (event: MessageEvent) => {\n if (event.data?.type === \"block-click\" && event.data?.blockId) {\n onBlockClick(event.data.blockId, event.data.group || undefined);\n }\n };\n\n window.addEventListener(\"message\", handleMessage);\n return () => {\n window.removeEventListener(\"message\", handleMessage);\n };\n }, [onBlockClick]);\n\n if (!page) {\n return (\n <div className={className} style={style}>\n <div style={{ padding: \"2rem\", textAlign: \"center\", color: \"#6b7280\" }}>\n Página não encontrada\n </div>\n </div>\n );\n }\n\n return (\n <div className={className} style={{ position: \"relative\", ...style }}>\n {isLoading && (\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"rgba(255, 255, 255, 0.8)\",\n zIndex: 10,\n }}\n >\n <div style={{ color: \"#6b7280\" }}>Carregando preview...</div>\n </div>\n )}\n <iframe\n ref={iframeRef}\n style={{\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n backgroundColor: \"#ffffff\",\n }}\n title=\"Preview do site\"\n />\n </div>\n );\n}\n"],"names":["findBlockInPage","page","blockId","findInBlocks","blocks","block","props","found","buildBlockNameMap","map","walk","def","componentRegistry","Preview","document","pageId","className","style","onBlockClick","selectedBlockId","showSelectionOverlay","focusedGroup","iframeRef","useRef","previousDocRef","previousDocHashRef","previousPageIdRef","isInitializedRef","isLoading","setIsLoading","useState","selectedBlockIdRef","showSelectionOverlayRef","focusedGroupRef","useEffect","useMemo","p","blockNameMapRef","updateHighlight","iframeDoc","overlayEnabled","group","oldStyle","el","htmlEl","oldLabel","oldGroupStyle","oldGroupLabel","highlightStyle","selectedEl","blockName","label","groupEl","ghStyle","gLabel","sendBlockNamesToIframe","updateSelectionOverlay","enabled","existingStyle","tooltip","hoverStyle","updateFullPreview","doc","showLoading","html","exportPageToHtml","clickHandler","iframe","applyOverlayAfterLoad","hashDocument","error","logger","updatePartialPreview","blockHtml","exportBlockToHtml","element","s","temp","fragment","currentDocHash","currentPageId","prevThemeJson","currThemeJson","changedBlocks","detectChangedBlocks","c","change","prop","handleMessage","event","jsxs","jsx"],"mappings":";;;;;;;AA6BA,SAASA,EAAgBC,GAAWC,GAA+B;AACjE,QAAMC,IAAe,CAACC,MAAkC;AACtD,eAAWC,KAASD,GAAQ;AAC1B,UAAIC,EAAM,OAAOH,EAAS,QAAOG;AACjC,YAAMC,IAAQD,EAAM;AACpB,UAAIC,GAAO,YAAY,MAAM,QAAQA,EAAM,QAAQ,GAAG;AACpD,cAAMC,IAAQJ,EAAaG,EAAM,QAAQ;AACzC,YAAIC,EAAO,QAAOA;AAAA,MACpB;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MAAM;AACX,aAAO,oBAAoB,WAAWA,CAAa;AAAA,IACrD;AAAA,EACF,GAAG,CAACtE,CAAY,CAAC,GAEZjB,IAWH,gBAAAyF,EAAC,SAAI,WAAA1E,GAAsB,OAAO,EAAE,UAAU,YAAY,GAAGC,EAAA,GAC1D,UAAA;AAAA,IAAAW,KACC,gBAAA+D;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL,UAAU;AAAA,UACV,KAAK;AAAA,UACL,MAAM;AAAA,UACN,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,SAAS;AAAA,UACT,YAAY;AAAA,UACZ,gBAAgB;AAAA,UAChB,iBAAiB;AAAA,UACjB,QAAQ;AAAA,QAAA;AAAA,QAGV,4BAAC,OAAA,EAAI,OAAO,EAAE,OAAO,UAAA,GAAa,UAAA,wBAAA,CAAqB;AAAA,MAAA;AAAA,IAAA;AAAA,IAG3D,gBAAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAKrE;AAAA,QACL,OAAO;AAAA,UACL,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,QAAQ;AAAA,UACR,iBAAiB;AAAA,QAAA;AAAA,QAEnB,OAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EACR,GACF,sBAtCG,OAAA,EAAI,WAAAN,GAAsB,OAAAC,GACzB,UAAA,gBAAA0E,EAAC,SAAI,OAAO,EAAE,SAAS,QAAQ,WAAW,UAAU,OAAO,UAAA,GAAa,mCAExE,GACF;AAoCN;"}
1
+ {"version":3,"file":"Preview.js","sources":["../../../src/engine/preview/Preview.tsx"],"sourcesContent":["/**\n * Preview\n * Sem dependências circulares, sem reloads desnecessários\n */\n\nimport React, { useEffect, useRef, useState, useMemo } from \"react\";\nimport { SiteDocument, Block } from \"../schema/siteDocument\";\nimport { componentRegistry } from \"../registry/registry\";\nimport { exportPageToHtml, exportBlockToHtml } from \"../export/exportHtml\";\nimport { detectChangedBlocks } from \"../../utils/changeDetector\";\nimport { hashDocument } from \"../../utils/documentHash\";\nimport { logger } from \"../../utils/logger\";\n\nexport interface PreviewProps {\n document: SiteDocument;\n pageId?: string;\n className?: string;\n style?: React.CSSProperties;\n onBlockClick?: (blockId: string, group?: string) => void;\n selectedBlockId?: string | null;\n /** Exibe hover e label de seleção nos blocos do preview */\n showSelectionOverlay?: boolean;\n /** Grupo focado para indicador visual no preview */\n focusedGroup?: string | null;\n}\n\n/**\n * Encontra um bloco na estrutura recursivamente\n */\nfunction findBlockInPage(page: any, blockId: string): Block | null {\n const findInBlocks = (blocks: Block[]): Block | null => {\n for (const block of blocks) {\n if (block.id === blockId) return block;\n const props = block.props as Record<string, any>;\n if (props?.children && Array.isArray(props.children)) {\n const found = findInBlocks(props.children);\n if (found) return found;\n }\n if (block.type === \"card\") {\n if (props.header && Array.isArray(props.header)) {\n const found = findInBlocks(props.header);\n if (found) return found;\n }\n if (props.content && Array.isArray(props.content)) {\n const found = findInBlocks(props.content);\n if (found) return found;\n }\n if (props.footer && Array.isArray(props.footer)) {\n const found = findInBlocks(props.footer);\n if (found) return found;\n }\n }\n }\n return null;\n };\n return findInBlocks(page.structure);\n}\n\n/**\n * Monta mapa blockId → nome legível (da registry)\n */\nfunction buildBlockNameMap(page: any): Record<string, string> {\n const map: Record<string, string> = {};\n const walk = (blocks: Block[]) => {\n for (const block of blocks) {\n const def = componentRegistry.get(block.type);\n map[block.id] = def?.name || block.type;\n const props = block.props as Record<string, any>;\n if (props?.children && Array.isArray(props.children)) walk(props.children);\n if (block.type === \"card\") {\n if (Array.isArray(props?.header)) walk(props.header);\n if (Array.isArray(props?.content)) walk(props.content);\n if (Array.isArray(props?.footer)) walk(props.footer);\n }\n }\n };\n if (page?.structure) walk(page.structure);\n return map;\n}\n\n/**\n * Componente de preview usando iframe isolado\n */\nexport function Preview({\n document,\n pageId,\n className,\n style,\n onBlockClick,\n selectedBlockId,\n showSelectionOverlay = false,\n focusedGroup = null,\n}: PreviewProps) {\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const previousDocRef = useRef<SiteDocument | null>(null);\n const previousDocHashRef = useRef<string | null>(null);\n const previousPageIdRef = useRef<string | null>(null);\n const isInitializedRef = useRef<boolean>(false);\n const [isLoading, setIsLoading] = useState(true);\n\n // Usar ref para selectedBlockId (necessário para highlight assíncrono)\n const selectedBlockIdRef = useRef(selectedBlockId);\n const showSelectionOverlayRef = useRef(showSelectionOverlay);\n const focusedGroupRef = useRef(focusedGroup);\n\n // Atualizar refs quando props mudam\n useEffect(() => {\n selectedBlockIdRef.current = selectedBlockId;\n }, [selectedBlockId]);\n\n useEffect(() => {\n showSelectionOverlayRef.current = showSelectionOverlay;\n }, [showSelectionOverlay]);\n\n useEffect(() => {\n focusedGroupRef.current = focusedGroup;\n }, [focusedGroup]);\n\n const page = useMemo(() => {\n return pageId\n ? document.pages.find((p) => p.id === pageId)\n : document.pages[0];\n }, [document, pageId]);\n\n // Mapa blockId → nome legível para labels\n const blockNameMapRef = useRef<Record<string, string>>({});\n useEffect(() => {\n blockNameMapRef.current = buildBlockNameMap(page);\n }, [page]);\n\n // Atualizar highlight + selection overlay diretamente no iframe (sem reload)\n const updateHighlight = (blockId: string | null) => {\n if (!iframeRef.current) return;\n\n const iframeDoc =\n iframeRef.current.contentDocument ||\n iframeRef.current.contentWindow?.document;\n if (!iframeDoc) return;\n\n const overlayEnabled = showSelectionOverlayRef.current;\n const group = focusedGroupRef.current;\n\n requestAnimationFrame(() => {\n // Remover highlight anterior\n const oldStyle = iframeDoc.getElementById(\"block-highlight\");\n if (oldStyle) oldStyle.remove();\n\n const allBlocks = iframeDoc.querySelectorAll(\"[data-block-id]\");\n allBlocks.forEach((el) => {\n const htmlEl = el as HTMLElement;\n htmlEl.style.outline = \"\";\n htmlEl.style.outlineOffset = \"\";\n });\n\n // Remover labels anteriores\n const oldLabel = iframeDoc.getElementById(\"sg-block-label\");\n if (oldLabel) oldLabel.remove();\n const oldGroupStyle = iframeDoc.getElementById(\"sg-group-highlight\");\n if (oldGroupStyle) oldGroupStyle.remove();\n const oldGroupLabel = iframeDoc.getElementById(\"sg-group-label\");\n if (oldGroupLabel) oldGroupLabel.remove();\n\n // Adicionar novo highlight\n if (blockId) {\n const highlightStyle = iframeDoc.createElement(\"style\");\n highlightStyle.id = \"block-highlight\";\n highlightStyle.textContent = `\n [data-block-id=\"${blockId}\"] {\n outline: 2px solid #3b82f6 !important;\n outline-offset: 2px !important;\n position: relative;\n }\n [data-block-id=\"${blockId}\"]::before {\n content: '';\n position: absolute;\n top: -4px;\n left: -4px;\n right: -4px;\n bottom: -4px;\n background: rgba(59, 130, 246, 0.1);\n pointer-events: none;\n z-index: -1;\n }\n `;\n iframeDoc.head.appendChild(highlightStyle);\n\n // Selection label (only when overlay is enabled)\n if (overlayEnabled) {\n const selectedEl = iframeDoc.querySelector(`[data-block-id=\"${blockId}\"]`) as HTMLElement;\n if (selectedEl) {\n const blockName = blockNameMapRef.current[blockId] || blockId;\n const label = iframeDoc.createElement(\"div\");\n label.id = \"sg-block-label\";\n label.textContent = blockName;\n label.style.cssText = \"position:absolute;top:-22px;left:0;background:#3b82f6;color:#fff;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px 4px 0 0;z-index:10000;pointer-events:none;font-family:system-ui,sans-serif;white-space:nowrap;line-height:16px;\";\n const pos = getComputedStyle(selectedEl).position;\n if (pos === \"static\") selectedEl.style.position = \"relative\";\n selectedEl.appendChild(label);\n }\n }\n\n // Indicador de grupo — mostra qual sub-seção foi clicada (purple)\n if (group) {\n const blockEl = iframeDoc.querySelector(`[data-block-id=\"${blockId}\"]`);\n const groupEl = blockEl?.querySelector(`[data-block-group=\"${group}\"]`) as HTMLElement;\n if (groupEl) {\n const ghStyle = iframeDoc.createElement(\"style\");\n ghStyle.id = \"sg-group-highlight\";\n ghStyle.textContent = `\n [data-block-id=\"${blockId}\"] [data-block-group=\"${group}\"] {\n outline: 2px solid #8b5cf6 !important;\n outline-offset: 2px !important;\n position: relative;\n }\n `;\n iframeDoc.head.appendChild(ghStyle);\n\n const gLabel = iframeDoc.createElement(\"div\");\n gLabel.id = \"sg-group-label\";\n gLabel.textContent = group;\n gLabel.style.cssText = \"position:absolute;top:-20px;right:0;background:#8b5cf6;color:#fff;font-size:10px;font-weight:600;padding:2px 8px;border-radius:4px 4px 0 0;z-index:10001;pointer-events:none;font-family:system-ui,sans-serif;white-space:nowrap;line-height:14px;\";\n const gPos = getComputedStyle(groupEl).position;\n if (gPos === \"static\") groupEl.style.position = \"relative\";\n groupEl.appendChild(gLabel);\n }\n }\n }\n });\n };\n\n // Enviar mapa de nomes para o iframe\n const sendBlockNamesToIframe = () => {\n if (!iframeRef.current?.contentWindow) return;\n iframeRef.current.contentWindow.postMessage({\n type: \"sg-set-block-names\",\n names: blockNameMapRef.current,\n }, \"*\");\n };\n\n // Atualizar hover overlay (injetar/remover CSS de hover nos blocos)\n const updateSelectionOverlay = (enabled: boolean) => {\n if (!iframeRef.current) return;\n\n const iframeDoc =\n iframeRef.current.contentDocument ||\n iframeRef.current.contentWindow?.document;\n if (!iframeDoc) return;\n\n const existingStyle = iframeDoc.getElementById(\"sg-hover-overlay\");\n if (existingStyle) existingStyle.remove();\n\n // Remove tooltip when disabling\n if (!enabled) {\n const tooltip = iframeDoc.getElementById(\"sg-hover-tooltip\");\n if (tooltip) tooltip.style.opacity = \"0\";\n }\n\n if (enabled) {\n const hoverStyle = iframeDoc.createElement(\"style\");\n hoverStyle.id = \"sg-hover-overlay\";\n hoverStyle.textContent = `\n [data-block-id] {\n cursor: pointer;\n transition: outline 0.15s ease, outline-offset 0.15s ease;\n }\n [data-block-id]:hover {\n outline: 2px dashed #94a3b8 !important;\n outline-offset: 2px !important;\n }\n [data-block-group] {\n cursor: pointer;\n transition: outline 0.15s ease, background 0.15s ease;\n }\n [data-block-group]:hover {\n outline: 1.5px dashed #a78bfa !important;\n outline-offset: 1px !important;\n background: rgba(139, 92, 246, 0.04);\n }\n `;\n iframeDoc.head.appendChild(hoverStyle);\n sendBlockNamesToIframe();\n }\n\n // Re-apply highlight (recalcula label)\n updateHighlight(selectedBlockIdRef.current || null);\n };\n\n // Atualizar preview completo (com srcdoc - causa reload)\n const updateFullPreview = (doc: SiteDocument, showLoading: boolean) => {\n if (!iframeRef.current || !page) return;\n\n try {\n if (showLoading) {\n setIsLoading(true);\n }\n\n let html = exportPageToHtml(page, doc, true);\n\n // Adicionar click handler + hover handler: links não navegam, enviam editor-navigate; outros cliques enviam block-click\n const clickHandler = `\n <script>\n (function() {\n // Click handler\n document.addEventListener('click', function(e) {\n var target = e.target;\n var anchor = target;\n while (anchor && anchor.tagName !== 'A') {\n anchor = anchor.parentElement;\n }\n if (anchor && anchor.tagName === 'A' && anchor.href) {\n e.preventDefault();\n e.stopPropagation();\n window.parent.postMessage({\n type: 'editor-navigate',\n href: anchor.getAttribute('href') || anchor.href\n }, '*');\n return;\n }\n var element = target;\n var group = null;\n while (element && !element.dataset.blockId) {\n if (element.dataset && element.dataset.blockGroup && !group) {\n group = element.dataset.blockGroup;\n }\n element = element.parentElement;\n }\n if (element && element.dataset.blockId) {\n window.parent.postMessage({\n type: 'block-click',\n blockId: element.dataset.blockId,\n group: group\n }, '*');\n }\n }, true);\n\n // Hover tooltip — block name map injected from parent via postMessage\n var _blockNames = {};\n var _hoverTooltip = null;\n\n window.addEventListener('message', function(e) {\n if (e.data && e.data.type === 'sg-set-block-names') {\n _blockNames = e.data.names || {};\n }\n });\n\n function getTooltip() {\n if (_hoverTooltip) return _hoverTooltip;\n _hoverTooltip = document.createElement('div');\n _hoverTooltip.id = 'sg-hover-tooltip';\n _hoverTooltip.style.cssText = 'position:fixed;top:0;left:0;background:#334155;color:#fff;font-size:11px;font-weight:500;padding:3px 8px;border-radius:4px;z-index:99999;pointer-events:none;font-family:system-ui,sans-serif;white-space:nowrap;line-height:16px;opacity:0;transition:opacity 0.12s ease;box-shadow:0 2px 6px rgba(0,0,0,0.2);';\n document.body.appendChild(_hoverTooltip);\n return _hoverTooltip;\n }\n\n var _currentHoveredBlock = null;\n var _currentHoveredGroup = null;\n\n document.addEventListener('mouseover', function(e) {\n // Check if hover overlay is active\n if (!document.getElementById('sg-hover-overlay')) return;\n var el = e.target;\n var groupName = null;\n while (el && !el.dataset.blockId) {\n if (el.dataset && el.dataset.blockGroup && !groupName) {\n groupName = el.dataset.blockGroup;\n }\n el = el.parentElement;\n }\n if (el && el.dataset.blockId) {\n if (el !== _currentHoveredBlock || groupName !== _currentHoveredGroup) {\n _currentHoveredBlock = el;\n _currentHoveredGroup = groupName;\n var tt = getTooltip();\n var blockName = _blockNames[el.dataset.blockId] || el.dataset.blockId;\n tt.textContent = groupName ? (blockName + ' \\\\u203A ' + groupName) : blockName;\n tt.style.opacity = '1';\n }\n }\n }, true);\n\n document.addEventListener('mousemove', function(e) {\n if (_hoverTooltip && _hoverTooltip.style.opacity === '1') {\n _hoverTooltip.style.left = (e.clientX + 12) + 'px';\n _hoverTooltip.style.top = (e.clientY - 28) + 'px';\n }\n }, true);\n\n document.addEventListener('mouseout', function(e) {\n var el = e.target;\n while (el && !el.dataset.blockId) el = el.parentElement;\n if (el === _currentHoveredBlock) {\n var related = e.relatedTarget;\n while (related && related !== el) related = related.parentElement;\n if (!related) {\n _currentHoveredBlock = null;\n _currentHoveredGroup = null;\n if (_hoverTooltip) _hoverTooltip.style.opacity = '0';\n }\n }\n }, true);\n })();\n </script>\n `;\n html = html.replace(\"</body>\", `${clickHandler}</body>`);\n if (!html.includes(\"</body>\")) {\n html = html + clickHandler;\n }\n\n const iframe = iframeRef.current;\n\n const applyOverlayAfterLoad = () => {\n updateHighlight(selectedBlockIdRef.current || null);\n if (showSelectionOverlayRef.current) {\n updateSelectionOverlay(true);\n }\n };\n\n if (showLoading) {\n iframe.onload = () => {\n setIsLoading(false);\n previousDocRef.current = JSON.parse(JSON.stringify(doc));\n previousDocHashRef.current = hashDocument(doc);\n applyOverlayAfterLoad();\n };\n setTimeout(() => {\n setIsLoading(false);\n previousDocRef.current = JSON.parse(JSON.stringify(doc));\n previousDocHashRef.current = hashDocument(doc);\n applyOverlayAfterLoad();\n }, 1000);\n } else {\n previousDocRef.current = JSON.parse(JSON.stringify(doc));\n previousDocHashRef.current = hashDocument(doc);\n iframe.onload = () => {\n applyOverlayAfterLoad();\n };\n }\n\n iframe.srcdoc = html;\n } catch (error) {\n logger.error(\"[Preview] Error:\", error);\n if (showLoading) {\n setIsLoading(false);\n }\n }\n };\n\n // Atualizar apenas um bloco (sem reload)\n const updatePartialPreview = (blockId: string, doc: SiteDocument) => {\n if (!iframeRef.current || !page) return;\n\n try {\n const block = findBlockInPage(page, blockId);\n if (!block) {\n updateFullPreview(doc, false);\n return;\n }\n\n const blockHtml = exportBlockToHtml(block, undefined, doc.theme);\n\n requestAnimationFrame(() => {\n const iframe = iframeRef.current;\n if (!iframe) return;\n\n const iframeDoc =\n iframe.contentDocument || iframe.contentWindow?.document;\n if (!iframeDoc) return;\n\n const element = iframeDoc.querySelector(`[data-block-id=\"${blockId}\"]`);\n if (element) {\n try {\n // Remover <style> e <script> tags antigas associadas a este bloco\n const oldStyles = iframeDoc.querySelectorAll(`style[data-block-style=\"${blockId}\"]`);\n oldStyles.forEach(s => s.remove());\n const oldScripts = iframeDoc.querySelectorAll(`script[data-block-style=\"${blockId}\"]`);\n oldScripts.forEach(s => s.remove());\n\n const temp = iframeDoc.createElement(\"div\");\n temp.innerHTML = blockHtml;\n\n // Marcar e extrair <style> tags para inserção separada\n const styleTags = temp.querySelectorAll(\"style\");\n styleTags.forEach(style => {\n style.setAttribute(\"data-block-style\", blockId);\n });\n\n // Extrair <script> tags antes da inserção no DOM\n // (scripts inseridos via innerHTML/fragment NÃO são executados pelo browser)\n const scriptTags: { text: string }[] = [];\n const scripts = temp.querySelectorAll(\"script\");\n scripts.forEach(script => {\n scriptTags.push({ text: script.textContent || \"\" });\n script.remove();\n });\n\n // Usar DocumentFragment para substituir com múltiplos elementos irmãos\n // (ex: <style>hover CSS</style><button>text</button>)\n const fragment = iframeDoc.createDocumentFragment();\n while (temp.firstChild) {\n fragment.appendChild(temp.firstChild);\n }\n\n if (fragment.childNodes.length > 0) {\n element.parentNode?.replaceChild(fragment, element);\n } else {\n element.outerHTML = blockHtml;\n }\n\n // Re-executar scripts criando novos elementos <script>\n // (o browser executa scripts criados via createElement + appendChild)\n scriptTags.forEach(({ text }) => {\n if (!text.trim()) return;\n const newScript = iframeDoc.createElement(\"script\");\n newScript.setAttribute(\"data-block-style\", blockId);\n newScript.textContent = text;\n iframeDoc.body.appendChild(newScript);\n });\n\n // Atualizar refs\n previousDocRef.current = JSON.parse(JSON.stringify(doc));\n previousDocHashRef.current = hashDocument(doc);\n\n // Reaplicar highlight\n updateHighlight(selectedBlockIdRef.current || null);\n } catch (error) {\n logger.error(\"[Preview] Erro ao atualizar:\", error);\n updateFullPreview(doc, false);\n }\n } else {\n updateFullPreview(doc, false);\n }\n });\n } catch (error) {\n logger.error(\"[Preview] Erro:\", error);\n updateFullPreview(doc, false);\n }\n };\n\n // Efeito para mudanças no DOCUMENTO (não no selectedBlockId)\n useEffect(() => {\n if (!page) {\n setIsLoading(false);\n return;\n }\n\n const currentDocHash = hashDocument(document);\n\n // Primeira renderização\n if (!isInitializedRef.current) {\n if (iframeRef.current) {\n isInitializedRef.current = true;\n previousPageIdRef.current = page?.id ?? null;\n updateFullPreview(document, true);\n }\n return;\n }\n\n if (!iframeRef.current) return;\n\n // Detectar troca de página (pageId mudou)\n const currentPageId = page?.id ?? null;\n if (previousPageIdRef.current !== currentPageId) {\n previousPageIdRef.current = currentPageId;\n updateFullPreview(document, false);\n return;\n }\n\n // Se hash não mudou, não há mudanças no documento\n if (previousDocHashRef.current === currentDocHash) {\n return;\n }\n\n // Se o theme mudou, forçar reload completo (CSS variables precisam ser regeneradas)\n const prevThemeJson = previousDocRef.current ? JSON.stringify(previousDocRef.current.theme) : null;\n const currThemeJson = JSON.stringify(document.theme);\n if (prevThemeJson !== currThemeJson) {\n updateFullPreview(document, false);\n return;\n }\n\n // Detectar mudanças na página atual\n const changedBlocks = detectChangedBlocks(\n previousDocRef.current || document,\n document,\n page?.id,\n );\n\n // Se não há mudanças detectadas mas o hash mudou, forçar reload\n if (changedBlocks.length === 0) {\n logger.debug(\n \"[Preview] Hash changed but no changes detected, forcing reload\",\n );\n updateFullPreview(document, false);\n return;\n }\n\n // Mudança estrutural (bloco adicionado/removido) = reload completo\n if (\n changedBlocks.some(\n (c) =>\n c.blockId === \"__structural__\" ||\n c.changedProps?.includes(\"children\"),\n )\n ) {\n updateFullPreview(document, false);\n return;\n }\n\n // Mudança de 1 bloco (não estrutural) = atualização parcial\n if (changedBlocks.length === 1) {\n const change = changedBlocks[0];\n const changedProps = change.changedProps || [];\n\n const isStructural = changedProps.some(\n (prop) =>\n prop === \"children\" ||\n prop === \"header\" ||\n prop === \"content\" ||\n prop === \"footer\",\n );\n\n if (!isStructural) {\n updatePartialPreview(change.blockId, document);\n return;\n }\n }\n\n // Fallback: reload completo SEM loader\n updateFullPreview(document, false);\n }, [document, page]); // APENAS document e page - sem funções\n\n // Efeito SEPARADO para highlight (não recarrega o preview)\n useEffect(() => {\n if (!isInitializedRef.current) return;\n updateHighlight(selectedBlockId || null);\n }, [selectedBlockId, focusedGroup]); // eslint-disable-line react-hooks/exhaustive-deps -- updateHighlight reads focusedGroupRef\n\n // Efeito para toggle do selection overlay\n useEffect(() => {\n if (!isInitializedRef.current) return;\n updateSelectionOverlay(showSelectionOverlay);\n }, [showSelectionOverlay]); // eslint-disable-line react-hooks/exhaustive-deps -- same pattern as updateFullPreview\n\n // Listener para cliques\n useEffect(() => {\n if (!onBlockClick) return;\n\n const handleMessage = (event: MessageEvent) => {\n if (event.data?.type === \"block-click\" && event.data?.blockId) {\n onBlockClick(event.data.blockId, event.data.group || undefined);\n }\n };\n\n window.addEventListener(\"message\", handleMessage);\n return () => {\n window.removeEventListener(\"message\", handleMessage);\n };\n }, [onBlockClick]);\n\n if (!page) {\n return (\n <div className={className} style={style}>\n <div style={{ padding: \"2rem\", textAlign: \"center\", color: \"#6b7280\" }}>\n Página não encontrada\n </div>\n </div>\n );\n }\n\n return (\n <div className={className} style={{ position: \"relative\", ...style }}>\n {isLoading && (\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"rgba(255, 255, 255, 0.8)\",\n zIndex: 10,\n }}\n >\n <div style={{ color: \"#6b7280\" }}>Carregando preview...</div>\n </div>\n )}\n <iframe\n ref={iframeRef}\n style={{\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n backgroundColor: \"#ffffff\",\n }}\n title=\"Preview do site\"\n />\n </div>\n );\n}\n"],"names":["findBlockInPage","page","blockId","findInBlocks","blocks","block","props","found","buildBlockNameMap","map","walk","def","componentRegistry","Preview","document","pageId","className","style","onBlockClick","selectedBlockId","showSelectionOverlay","focusedGroup","iframeRef","useRef","previousDocRef","previousDocHashRef","previousPageIdRef","isInitializedRef","isLoading","setIsLoading","useState","selectedBlockIdRef","showSelectionOverlayRef","focusedGroupRef","useEffect","useMemo","p","blockNameMapRef","updateHighlight","iframeDoc","overlayEnabled","group","oldStyle","el","htmlEl","oldLabel","oldGroupStyle","oldGroupLabel","highlightStyle","selectedEl","blockName","label","groupEl","ghStyle","gLabel","sendBlockNamesToIframe","updateSelectionOverlay","enabled","existingStyle","tooltip","hoverStyle","updateFullPreview","doc","showLoading","html","exportPageToHtml","clickHandler","iframe","applyOverlayAfterLoad","hashDocument","error","logger","updatePartialPreview","blockHtml","exportBlockToHtml","element","s","temp","scriptTags","script","fragment","text","newScript","currentDocHash","currentPageId","prevThemeJson","currThemeJson","changedBlocks","detectChangedBlocks","c","change","prop","handleMessage","event","jsxs","jsx"],"mappings":";;;;;;;AA6BA,SAASA,EAAgBC,GAAWC,GAA+B;AACjE,QAAMC,IAAe,CAACC,MAAkC;AACtD,eAAWC,KAASD,GAAQ;AAC1B,UAAIC,EAAM,OAAOH,EAAS,QAAOG;AACjC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A,IAAA;AAAA,IAG3D,gBAAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAKzE;AAAA,QACL,OAAO;AAAA,UACL,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,QAAQ;AAAA,UACR,iBAAiB;AAAA,QAAA;AAAA,QAEnB,OAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EACR,GACF,sBAtCG,OAAA,EAAI,WAAAN,GAAsB,OAAAC,GACzB,UAAA,gBAAA8E,EAAC,SAAI,OAAO,EAAE,SAAS,QAAQ,WAAW,UAAU,OAAO,UAAA,GAAa,mCAExE,GACF;AAoCN;"}
@@ -1 +1 @@
1
- {"version":3,"file":"imageGallery.d.ts","sourceRoot":"","sources":["../../../../../src/engine/registry/blocks/sections/imageGallery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,iBAAiB,CAAC,OAAO,CAuElE,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAAC,cAAc,CAgQ7D,CAAC;AAKF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"imageGallery.d.ts","sourceRoot":"","sources":["../../../../../src/engine/registry/blocks/sections/imageGallery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,iBAAiB,CAAC,OAAO,CAuElE,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAAC,cAAc,CA+P7D,CAAC;AAKF,eAAe,iBAAiB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { componentRegistry as e } from "../../registry.js";
2
- const a = {
2
+ import { galleryVariations as a } from "../../../presets/galleryVariations.js";
3
+ const o = {
3
4
  // Conteúdo
4
5
  title: "Nossa Galeria",
5
6
  subtitle: "Confira nossas imagens",
@@ -65,13 +66,14 @@ const a = {
65
66
  // Performance
66
67
  lazyLoad: !0,
67
68
  showWarningAt: 50
68
- }, o = {
69
+ }, l = {
69
70
  type: "imageGallery",
70
71
  name: "Galeria de Imagens",
71
72
  description: "Galeria de imagens com lightbox profissional e zoom",
72
73
  category: "sections",
73
74
  canHaveChildren: !1,
74
- defaultProps: a,
75
+ defaultProps: o,
76
+ variations: Object.values(a),
75
77
  inspectorMeta: {
76
78
  // =========================================================================
77
79
  // GRUPO: Conteúdo
@@ -86,12 +88,10 @@ const a = {
86
88
  inputType: "text",
87
89
  group: "Conteúdo"
88
90
  },
89
- images: {
90
- label: "Imagens",
91
- inputType: "gallery-images",
92
- group: "Conteúdo",
93
- description: "Gerencie as imagens da galeria"
94
- },
91
+ // Note: "images" field is hidden because there's no modal UI for it yet.
92
+ // Users add images via defaultProps or programmatically.
93
+ // The gallery-images input type exists but shows confusing "[object Object]..." text.
94
+ // Will be re-enabled when GalleryImagesInput modal component is implemented.
95
95
  // =========================================================================
96
96
  // GRUPO: Layout
97
97
  // =========================================================================
@@ -111,18 +111,18 @@ const a = {
111
111
  label: "Colunas",
112
112
  inputType: "number",
113
113
  min: 2,
114
- max: 4,
114
+ max: 12,
115
115
  group: "Layout",
116
- description: "Número de colunas no desktop"
116
+ description: "Número de colunas no desktop (responsivo: 4→3→2→1)"
117
117
  },
118
118
  gap: {
119
- label: "Espaçamento",
119
+ label: "Espaçamento (rem)",
120
120
  inputType: "number",
121
121
  min: 0,
122
- max: 3,
122
+ max: 5,
123
123
  step: 0.5,
124
124
  group: "Layout",
125
- description: "Espaçamento entre imagens (rem)"
125
+ description: "Espaçamento entre imagens (0 = sem espaço)"
126
126
  },
127
127
  aspectRatio: {
128
128
  label: "Proporção",
@@ -153,14 +153,14 @@ const a = {
153
153
  description: "Arredondamento das imagens (px)"
154
154
  },
155
155
  imageShadow: {
156
- label: "Sombra",
156
+ label: "Sombra da Imagem",
157
157
  inputType: "select",
158
158
  options: [
159
- { value: "none", label: "Sem sombra" },
159
+ { value: "none", label: "Nenhuma" },
160
160
  { value: "sm", label: "Pequena" },
161
161
  { value: "md", label: "Média" },
162
162
  { value: "lg", label: "Grande" },
163
- { value: "xl", label: "Extra grande" }
163
+ { value: "xl", label: "Extra Grande" }
164
164
  ],
165
165
  group: "Aparência"
166
166
  },
@@ -314,9 +314,9 @@ const a = {
314
314
  }
315
315
  }
316
316
  };
317
- e.register(o);
317
+ e.register(l);
318
318
  export {
319
- a as IMAGE_GALLERY_DEFAULT_PROPS,
320
- o as imageGalleryBlock
319
+ o as IMAGE_GALLERY_DEFAULT_PROPS,
320
+ l as imageGalleryBlock
321
321
  };
322
322
  //# sourceMappingURL=imageGallery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"imageGallery.js","sources":["../../../../../src/engine/registry/blocks/sections/imageGallery.ts"],"sourcesContent":["import { BlockDefinition } from \"../../types\";\nimport { componentRegistry } from \"../../registry\";\nimport type { ImageGalleryBlock } from \"../../../schema/siteDocument\";\n\n/**\n * Valores padrão do ImageGallery - Use para garantir consistência em templates e factories\n */\nexport const IMAGE_GALLERY_DEFAULT_PROPS: ImageGalleryBlock[\"props\"] = {\n // Conteúdo\n title: \"Nossa Galeria\",\n subtitle: \"Confira nossas imagens\",\n images: [\n {\n id: \"1\",\n src: \"https://placehold.co/800x600/3b82f6/ffffff?text=Image+1\",\n alt: \"Imagem de demonstração 1\",\n title: \"Projeto 1\",\n description: \"Descrição da primeira imagem\",\n },\n {\n id: \"2\",\n src: \"https://placehold.co/800x600/8b5cf6/ffffff?text=Image+2\",\n alt: \"Imagem de demonstração 2\",\n title: \"Projeto 2\",\n description: \"Descrição da segunda imagem\",\n },\n {\n id: \"3\",\n src: \"https://placehold.co/800x600/ec4899/ffffff?text=Image+3\",\n alt: \"Imagem de demonstração 3\",\n title: \"Projeto 3\",\n description: \"Descrição da terceira imagem\",\n },\n {\n id: \"4\",\n src: \"https://placehold.co/800x600/10b981/ffffff?text=Image+4\",\n alt: \"Imagem de demonstração 4\",\n title: \"Projeto 4\",\n description: \"Descrição da quarta imagem\",\n },\n ],\n\n // Layout\n variation: \"gallery-grid\",\n columns: 4,\n gap: 1,\n aspectRatio: \"auto\",\n\n // Aparência\n imageBorderRadius: 8,\n imageShadow: \"md\",\n\n // Animações\n enterAnimation: \"fade-scale\",\n hoverEffect: \"zoom-overlay\",\n hoverIntensity: 50,\n\n // Lightbox\n lightbox: {\n mode: \"adaptive\",\n showArrows: true,\n showThumbnails: true,\n showCounter: true,\n showCaption: true,\n enableZoom: true,\n enableDownload: false,\n enableAutoplay: false,\n autoplayInterval: 5,\n closeOnBackdropClick: true,\n closeOnEsc: true,\n enableKeyboard: true,\n enableTouchGestures: true,\n transitionDuration: 300,\n },\n\n // Performance\n lazyLoad: true,\n showWarningAt: 50,\n};\n\nexport const imageGalleryBlock: BlockDefinition<\"imageGallery\"> = {\n type: \"imageGallery\",\n name: \"Galeria de Imagens\",\n description: \"Galeria de imagens com lightbox profissional e zoom\",\n category: \"sections\",\n canHaveChildren: false,\n defaultProps: IMAGE_GALLERY_DEFAULT_PROPS,\n\n inspectorMeta: {\n // =========================================================================\n // GRUPO: Conteúdo\n // =========================================================================\n title: {\n label: \"Título\",\n inputType: \"text\",\n group: \"Conteúdo\",\n },\n subtitle: {\n label: \"Subtítulo\",\n inputType: \"text\",\n group: \"Conteúdo\",\n },\n images: {\n label: \"Imagens\",\n inputType: \"gallery-images\",\n group: \"Conteúdo\",\n description: \"Gerencie as imagens da galeria\",\n },\n\n // =========================================================================\n // GRUPO: Layout\n // =========================================================================\n variation: {\n label: \"Layout\",\n inputType: \"select\",\n options: [\n { value: \"gallery-grid\", label: \"Grid Clássico\" },\n { value: \"gallery-masonry\", label: \"Masonry (v1.1)\" },\n { value: \"gallery-featured\", label: \"Destaque (v1.2)\" },\n { value: \"gallery-carousel\", label: \"Carrossel (v1.3)\" },\n { value: \"gallery-alternating\", label: \"Alternado (v1.4)\" },\n ],\n group: \"Layout\",\n },\n columns: {\n label: \"Colunas\",\n inputType: \"number\",\n min: 2,\n max: 4,\n group: \"Layout\",\n description: \"Número de colunas no desktop\",\n },\n gap: {\n label: \"Espaçamento\",\n inputType: \"number\",\n min: 0,\n max: 3,\n step: 0.5,\n group: \"Layout\",\n description: \"Espaçamento entre imagens (rem)\",\n },\n aspectRatio: {\n label: \"Proporção\",\n inputType: \"select\",\n options: [\n { value: \"auto\", label: \"Original\" },\n { value: \"1/1\", label: \"Quadrado (1:1)\" },\n { value: \"4/3\", label: \"Paisagem (4:3)\" },\n { value: \"16/9\", label: \"Widescreen (16:9)\" },\n { value: \"3/2\", label: \"Clássico (3:2)\" },\n ],\n group: \"Layout\",\n },\n\n // =========================================================================\n // GRUPO: Aparência\n // =========================================================================\n bg: {\n label: \"Cor de Fundo\",\n inputType: \"color\",\n group: \"Aparência\",\n },\n imageBorderRadius: {\n label: \"Borda Arredondada\",\n inputType: \"number\",\n min: 0,\n max: 32,\n group: \"Aparência\",\n description: \"Arredondamento das imagens (px)\",\n },\n imageShadow: {\n label: \"Sombra\",\n inputType: \"select\",\n options: [\n { value: \"none\", label: \"Sem sombra\" },\n { value: \"sm\", label: \"Pequena\" },\n { value: \"md\", label: \"Média\" },\n { value: \"lg\", label: \"Grande\" },\n { value: \"xl\", label: \"Extra grande\" },\n ],\n group: \"Aparência\",\n },\n\n // =========================================================================\n // GRUPO: Animações\n // =========================================================================\n enterAnimation: {\n label: \"Animação de Entrada\",\n inputType: \"select\",\n options: [\n { value: \"fade-scale\", label: \"Fade + Zoom\" },\n { value: \"stagger\", label: \"Cascata\" },\n { value: \"slide-up\", label: \"Desliza de Baixo\" },\n { value: \"none\", label: \"Sem animação\" },\n ],\n group: \"Animações\",\n },\n hoverEffect: {\n label: \"Efeito de Hover\",\n inputType: \"select\",\n options: [\n { value: \"zoom-overlay\", label: \"Zoom + Overlay\" },\n { value: \"glow\", label: \"Brilho\" },\n { value: \"scale\", label: \"Aumentar\" },\n { value: \"caption-reveal\", label: \"Revelar Legenda\" },\n { value: \"none\", label: \"Sem efeito\" },\n ],\n group: \"Animações\",\n },\n hoverIntensity: {\n label: \"Intensidade do Hover\",\n inputType: \"number\",\n min: 0,\n max: 100,\n group: \"Animações\",\n description: \"Intensidade do efeito (0-100%)\",\n },\n\n // =========================================================================\n // GRUPO: Lightbox - Tema\n // =========================================================================\n \"lightbox.mode\": {\n label: \"Tema do Lightbox\",\n inputType: \"select\",\n options: [\n { value: \"adaptive\", label: \"Adaptável (Auto)\" },\n { value: \"dark\", label: \"Escuro\" },\n { value: \"light\", label: \"Claro\" },\n { value: \"theme\", label: \"Seguir Tema do Site\" },\n ],\n group: \"Lightbox - Tema\",\n },\n\n // =========================================================================\n // GRUPO: Lightbox - Navegação\n // =========================================================================\n \"lightbox.showArrows\": {\n label: \"Mostrar Setas\",\n inputType: \"checkbox\",\n group: \"Lightbox - Navegação\",\n },\n \"lightbox.showThumbnails\": {\n label: \"Mostrar Miniaturas\",\n inputType: \"checkbox\",\n group: \"Lightbox - Navegação\",\n },\n \"lightbox.showCounter\": {\n label: \"Mostrar Contador\",\n inputType: \"checkbox\",\n group: \"Lightbox - Navegação\",\n description: 'Exibe \"3 de 12\"',\n },\n \"lightbox.showCaption\": {\n label: \"Mostrar Legenda\",\n inputType: \"checkbox\",\n group: \"Lightbox - Navegação\",\n },\n\n // =========================================================================\n // GRUPO: Lightbox - Funcionalidades\n // =========================================================================\n \"lightbox.enableZoom\": {\n label: \"Ativar Zoom\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n },\n \"lightbox.enableDownload\": {\n label: \"Ativar Download\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n description: \"Permitir download de imagens (v1.1)\",\n },\n \"lightbox.enableAutoplay\": {\n label: \"Ativar Autoplay\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n description: \"Reprodução automática (v1.3)\",\n },\n \"lightbox.autoplayInterval\": {\n label: \"Intervalo do Autoplay\",\n inputType: \"number\",\n min: 2,\n max: 10,\n group: \"Lightbox - Funcionalidades\",\n description: \"Intervalo em segundos\",\n },\n \"lightbox.closeOnBackdropClick\": {\n label: \"Fechar ao Clicar Fora\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n },\n \"lightbox.closeOnEsc\": {\n label: \"Fechar com ESC\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n },\n \"lightbox.enableKeyboard\": {\n label: \"Navegação por Teclado\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n description: \"Arrows, +, -, 0\",\n },\n \"lightbox.enableTouchGestures\": {\n label: \"Gestos Touch\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n description: \"Swipe, pinch, double-tap\",\n },\n \"lightbox.transitionDuration\": {\n label: \"Duração da Transição\",\n inputType: \"number\",\n min: 100,\n max: 1000,\n step: 50,\n group: \"Lightbox - Funcionalidades\",\n description: \"Velocidade da animação (ms)\",\n },\n\n // =========================================================================\n // GRUPO: Performance\n // =========================================================================\n lazyLoad: {\n label: \"Lazy Loading\",\n inputType: \"checkbox\",\n group: \"Performance\",\n description: \"Carregar imagens sob demanda\",\n },\n showWarningAt: {\n label: \"Aviso de Performance\",\n inputType: \"number\",\n min: 20,\n max: 100,\n group: \"Performance\",\n description: \"Mostrar alerta após N imagens\",\n },\n },\n};\n\n// Register the block\ncomponentRegistry.register(imageGalleryBlock);\n\nexport default imageGalleryBlock;\n"],"names":["IMAGE_GALLERY_DEFAULT_PROPS","imageGalleryBlock","componentRegistry"],"mappings":";AAOO,MAAMA,IAA0D;AAAA;AAAA,EAErE,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,IACN;AAAA,MACE,IAAI;AAAA,MACJ,KAAK;AAAA,MACL,KAAK;AAAA,MACL,OAAO;A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A,MACP,WAAW;AAAA,MACX,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,gCAAgC;AAAA,MAC9B,OAAO;AAAA,MACP,WAAW;AAAA,MACX,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,+BAA+B;AAAA,MAC7B,OAAO;AAAA,MACP,WAAW;AAAA,MACX,KAAK;AAAA,MACL,KAAK;AAAA,MACL,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA;AAAA;AAAA;AAAA,IAMf,UAAU;AAAA,MACR,OAAO;AAAA,MACP,WAAW;AAAA,MACX,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,eAAe;AAAA,MACb,OAAO;AAAA,MACP,WAAW;AAAA,MACX,KAAK;AAAA,MACL,KAAK;AAAA,MACL,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ;AAGAE,EAAkB,SAASD,CAAiB;"}
1
+ {"version":3,"file":"imageGallery.js","sources":["../../../../../src/engine/registry/blocks/sections/imageGallery.ts"],"sourcesContent":["import { BlockDefinition } from \"../../types\";\nimport { componentRegistry } from \"../../registry\";\nimport type { ImageGalleryBlock } from \"../../../schema/siteDocument\";\nimport { galleryVariations } from \"../../../presets/galleryVariations\";\n\n/**\n * Valores padrão do ImageGallery - Use para garantir consistência em templates e factories\n */\nexport const IMAGE_GALLERY_DEFAULT_PROPS: ImageGalleryBlock[\"props\"] = {\n // Conteúdo\n title: \"Nossa Galeria\",\n subtitle: \"Confira nossas imagens\",\n images: [\n {\n id: \"1\",\n src: \"https://placehold.co/800x600/3b82f6/ffffff?text=Image+1\",\n alt: \"Imagem de demonstração 1\",\n title: \"Projeto 1\",\n description: \"Descrição da primeira imagem\",\n },\n {\n id: \"2\",\n src: \"https://placehold.co/800x600/8b5cf6/ffffff?text=Image+2\",\n alt: \"Imagem de demonstração 2\",\n title: \"Projeto 2\",\n description: \"Descrição da segunda imagem\",\n },\n {\n id: \"3\",\n src: \"https://placehold.co/800x600/ec4899/ffffff?text=Image+3\",\n alt: \"Imagem de demonstração 3\",\n title: \"Projeto 3\",\n description: \"Descrição da terceira imagem\",\n },\n {\n id: \"4\",\n src: \"https://placehold.co/800x600/10b981/ffffff?text=Image+4\",\n alt: \"Imagem de demonstração 4\",\n title: \"Projeto 4\",\n description: \"Descrição da quarta imagem\",\n },\n ],\n\n // Layout\n variation: \"gallery-grid\",\n columns: 4,\n gap: 1,\n aspectRatio: \"auto\",\n\n // Aparência\n imageBorderRadius: 8,\n imageShadow: \"md\",\n\n // Animações\n enterAnimation: \"fade-scale\",\n hoverEffect: \"zoom-overlay\",\n hoverIntensity: 50,\n\n // Lightbox\n lightbox: {\n mode: \"adaptive\",\n showArrows: true,\n showThumbnails: true,\n showCounter: true,\n showCaption: true,\n enableZoom: true,\n enableDownload: false,\n enableAutoplay: false,\n autoplayInterval: 5,\n closeOnBackdropClick: true,\n closeOnEsc: true,\n enableKeyboard: true,\n enableTouchGestures: true,\n transitionDuration: 300,\n },\n\n // Performance\n lazyLoad: true,\n showWarningAt: 50,\n};\n\nexport const imageGalleryBlock: BlockDefinition<\"imageGallery\"> = {\n type: \"imageGallery\",\n name: \"Galeria de Imagens\",\n description: \"Galeria de imagens com lightbox profissional e zoom\",\n category: \"sections\",\n canHaveChildren: false,\n defaultProps: IMAGE_GALLERY_DEFAULT_PROPS,\n variations: Object.values(galleryVariations),\n\n inspectorMeta: {\n // =========================================================================\n // GRUPO: Conteúdo\n // =========================================================================\n title: {\n label: \"Título\",\n inputType: \"text\",\n group: \"Conteúdo\",\n },\n subtitle: {\n label: \"Subtítulo\",\n inputType: \"text\",\n group: \"Conteúdo\",\n },\n // Note: \"images\" field is hidden because there's no modal UI for it yet.\n // Users add images via defaultProps or programmatically.\n // The gallery-images input type exists but shows confusing \"[object Object]...\" text.\n // Will be re-enabled when GalleryImagesInput modal component is implemented.\n\n // =========================================================================\n // GRUPO: Layout\n // =========================================================================\n variation: {\n label: \"Layout\",\n inputType: \"select\",\n options: [\n { value: \"gallery-grid\", label: \"Grid Clássico\" },\n { value: \"gallery-masonry\", label: \"Masonry (v1.1)\" },\n { value: \"gallery-featured\", label: \"Destaque (v1.2)\" },\n { value: \"gallery-carousel\", label: \"Carrossel (v1.3)\" },\n { value: \"gallery-alternating\", label: \"Alternado (v1.4)\" },\n ],\n group: \"Layout\",\n },\n columns: {\n label: \"Colunas\",\n inputType: \"number\",\n min: 2,\n max: 12,\n group: \"Layout\",\n description: \"Número de colunas no desktop (responsivo: 4→3→2→1)\",\n },\n gap: {\n label: \"Espaçamento (rem)\",\n inputType: \"number\",\n min: 0,\n max: 5,\n step: 0.5,\n group: \"Layout\",\n description: \"Espaçamento entre imagens (0 = sem espaço)\",\n },\n aspectRatio: {\n label: \"Proporção\",\n inputType: \"select\",\n options: [\n { value: \"auto\", label: \"Original\" },\n { value: \"1/1\", label: \"Quadrado (1:1)\" },\n { value: \"4/3\", label: \"Paisagem (4:3)\" },\n { value: \"16/9\", label: \"Widescreen (16:9)\" },\n { value: \"3/2\", label: \"Clássico (3:2)\" },\n ],\n group: \"Layout\",\n },\n\n // =========================================================================\n // GRUPO: Aparência\n // =========================================================================\n bg: {\n label: \"Cor de Fundo\",\n inputType: \"color\",\n group: \"Aparência\",\n },\n imageBorderRadius: {\n label: \"Borda Arredondada\",\n inputType: \"number\",\n min: 0,\n max: 32,\n group: \"Aparência\",\n description: \"Arredondamento das imagens (px)\",\n },\n imageShadow: {\n label: \"Sombra da Imagem\",\n inputType: \"select\",\n options: [\n { value: \"none\", label: \"Nenhuma\" },\n { value: \"sm\", label: \"Pequena\" },\n { value: \"md\", label: \"Média\" },\n { value: \"lg\", label: \"Grande\" },\n { value: \"xl\", label: \"Extra Grande\" },\n ],\n group: \"Aparência\",\n },\n\n // =========================================================================\n // GRUPO: Animações\n // =========================================================================\n enterAnimation: {\n label: \"Animação de Entrada\",\n inputType: \"select\",\n options: [\n { value: \"fade-scale\", label: \"Fade + Zoom\" },\n { value: \"stagger\", label: \"Cascata\" },\n { value: \"slide-up\", label: \"Desliza de Baixo\" },\n { value: \"none\", label: \"Sem animação\" },\n ],\n group: \"Animações\",\n },\n hoverEffect: {\n label: \"Efeito de Hover\",\n inputType: \"select\",\n options: [\n { value: \"zoom-overlay\", label: \"Zoom + Overlay\" },\n { value: \"glow\", label: \"Brilho\" },\n { value: \"scale\", label: \"Aumentar\" },\n { value: \"caption-reveal\", label: \"Revelar Legenda\" },\n { value: \"none\", label: \"Sem efeito\" },\n ],\n group: \"Animações\",\n },\n hoverIntensity: {\n label: \"Intensidade do Hover\",\n inputType: \"number\",\n min: 0,\n max: 100,\n group: \"Animações\",\n description: \"Intensidade do efeito (0-100%)\",\n },\n\n // =========================================================================\n // GRUPO: Lightbox - Tema\n // =========================================================================\n \"lightbox.mode\": {\n label: \"Tema do Lightbox\",\n inputType: \"select\",\n options: [\n { value: \"adaptive\", label: \"Adaptável (Auto)\" },\n { value: \"dark\", label: \"Escuro\" },\n { value: \"light\", label: \"Claro\" },\n { value: \"theme\", label: \"Seguir Tema do Site\" },\n ],\n group: \"Lightbox - Tema\",\n },\n\n // =========================================================================\n // GRUPO: Lightbox - Navegação\n // =========================================================================\n \"lightbox.showArrows\": {\n label: \"Mostrar Setas\",\n inputType: \"checkbox\",\n group: \"Lightbox - Navegação\",\n },\n \"lightbox.showThumbnails\": {\n label: \"Mostrar Miniaturas\",\n inputType: \"checkbox\",\n group: \"Lightbox - Navegação\",\n },\n \"lightbox.showCounter\": {\n label: \"Mostrar Contador\",\n inputType: \"checkbox\",\n group: \"Lightbox - Navegação\",\n description: 'Exibe \"3 de 12\"',\n },\n \"lightbox.showCaption\": {\n label: \"Mostrar Legenda\",\n inputType: \"checkbox\",\n group: \"Lightbox - Navegação\",\n },\n\n // =========================================================================\n // GRUPO: Lightbox - Funcionalidades\n // =========================================================================\n \"lightbox.enableZoom\": {\n label: \"Ativar Zoom\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n },\n \"lightbox.enableDownload\": {\n label: \"Ativar Download\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n description: \"Permitir download de imagens (v1.1)\",\n },\n \"lightbox.enableAutoplay\": {\n label: \"Ativar Autoplay\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n description: \"Reprodução automática (v1.3)\",\n },\n \"lightbox.autoplayInterval\": {\n label: \"Intervalo do Autoplay\",\n inputType: \"number\",\n min: 2,\n max: 10,\n group: \"Lightbox - Funcionalidades\",\n description: \"Intervalo em segundos\",\n },\n \"lightbox.closeOnBackdropClick\": {\n label: \"Fechar ao Clicar Fora\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n },\n \"lightbox.closeOnEsc\": {\n label: \"Fechar com ESC\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n },\n \"lightbox.enableKeyboard\": {\n label: \"Navegação por Teclado\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n description: \"Arrows, +, -, 0\",\n },\n \"lightbox.enableTouchGestures\": {\n label: \"Gestos Touch\",\n inputType: \"checkbox\",\n group: \"Lightbox - Funcionalidades\",\n description: \"Swipe, pinch, double-tap\",\n },\n \"lightbox.transitionDuration\": {\n label: \"Duração da Transição\",\n inputType: \"number\",\n min: 100,\n max: 1000,\n step: 50,\n group: \"Lightbox - Funcionalidades\",\n description: \"Velocidade da animação (ms)\",\n },\n\n // =========================================================================\n // GRUPO: Performance\n // =========================================================================\n lazyLoad: {\n label: \"Lazy Loading\",\n inputType: \"checkbox\",\n group: \"Performance\",\n description: \"Carregar imagens sob demanda\",\n },\n showWarningAt: {\n label: \"Aviso de Performance\",\n inputType: \"number\",\n min: 20,\n max: 100,\n group: \"Performance\",\n description: \"Mostrar alerta após N imagens\",\n },\n },\n};\n\n// Register the block\ncomponentRegistry.register(imageGalleryBlock);\n\nexport default imageGalleryBlock;\n"],"names":["IMAGE_GALLERY_DEFAUL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O;AAAA,MACP,WAAW;AAAA,MACX,OAAO;AAAA,IAAA;AAAA,IAET,uBAAuB;AAAA,MACrB,OAAO;AAAA,MACP,WAAW;AAAA,MACX,OAAO;AAAA,IAAA;AAAA,IAET,2BAA2B;AAAA,MACzB,OAAO;AAAA,MACP,WAAW;AAAA,MACX,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,gCAAgC;AAAA,MAC9B,OAAO;AAAA,MACP,WAAW;AAAA,MACX,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,+BAA+B;AAAA,MAC7B,OAAO;AAAA,MACP,WAAW;AAAA,MACX,KAAK;AAAA,MACL,KAAK;AAAA,MACL,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA;AAAA;AAAA;AAAA,IAMf,UAAU;AAAA,MACR,OAAO;AAAA,MACP,WAAW;AAAA,MACX,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,eAAe;AAAA,MACb,OAAO;AAAA,MACP,WAAW;AAAA,MACX,KAAK;AAAA,MACL,KAAK;AAAA,MACL,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ;AAGAC,EAAkB,SAASF,CAAiB;"}
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  export { LandingPageEditor } from './editor/LandingPageEditor';
6
6
  export type { UploadConfig, LandingPageEditorProps } from './editor/LandingPageEditor';
7
7
  export { LandingPageViewer } from './viewer/LandingPageViewer';
8
- export type { BlockType, Block, BlockBase, ContainerBlock, StackBlock, GridBlock, BoxBlock, SpacerBlock, HeadingBlock, TextBlock, ImageBlock, ButtonBlock, LinkBlock, DividerBlock, BadgeBlock, IconBlock, AvatarBlock, VideoBlock, CardBlock, SectionBlock, HeroBlock, HeroVariationId, NavbarBlock, NavbarLink, NavbarVariationId, FooterBlock, FeatureBlock, FeatureGridBlock, PricingCardBlock, PricingBlock, TestimonialBlock, TestimonialGridBlock, FaqItemBlock, FaqBlock, CtaBlock, StatItemBlock, StatsBlock, LogoCloudBlock, CountdownBlock, CarouselBlock, BlogCardBlock, BlogCardGridBlock, TeamCardBlock, TeamGridBlock, CourseCardGridBlock, CategoryCardGridBlock, SocialLinksBlock, BlogPostCardBlock, BlogPostGridBlock, BlogPostDetailBlock, ProductShowcaseBlock, AboutSectionBlock, ContactSectionBlock, FormBlock, InputBlock, BlogCategoryFilterBlock, BlogSearchBarBlock, BlogRecentPostsBlock, BlogTagCloudBlock, PageSeoConfig, SiteMetadata, SiteDocument, SitePage, ImageGridItem, ImageGridPreset, TypographyConfig, } from './engine/schema/siteDocument';
8
+ export type { BlockType, Block, BlockBase, ContainerBlock, StackBlock, GridBlock, BoxBlock, SpacerBlock, HeadingBlock, TextBlock, ImageBlock, ButtonBlock, LinkBlock, DividerBlock, BadgeBlock, IconBlock, AvatarBlock, VideoBlock, CardBlock, SectionBlock, HeroBlock, HeroVariationId, NavbarBlock, NavbarLink, NavbarVariationId, FooterBlock, FeatureBlock, FeatureGridBlock, PricingCardBlock, PricingBlock, TestimonialBlock, TestimonialGridBlock, FaqItemBlock, FaqBlock, CtaBlock, StatItemBlock, StatsBlock, LogoCloudBlock, CountdownBlock, CarouselBlock, BlogCardBlock, BlogCardGridBlock, TeamCardBlock, TeamGridBlock, CourseCardGridBlock, CategoryCardGridBlock, SocialLinksBlock, BlogPostCardBlock, BlogPostGridBlock, BlogPostDetailBlock, GalleryImage, LightboxConfig, GalleryEnterAnimation, GalleryHoverEffect, ImageGalleryBlock, ProductShowcaseBlock, AboutSectionBlock, ContactSectionBlock, FormBlock, InputBlock, BlogCategoryFilterBlock, BlogSearchBarBlock, BlogRecentPostsBlock, BlogTagCloudBlock, PageSeoConfig, SiteMetadata, SiteDocument, SitePage, ImageGridItem, ImageGridPreset, TypographyConfig, } from './engine/schema/siteDocument';
9
9
  export { createEmptySiteDocument, } from './engine/schema/siteDocument';
10
10
  export type { RadiusScale, ShadowScale, SpacingScale, MotionLevel, BackgroundStyle, GradientDirection, ColorTokens, TypographyTokens, EffectTokens, LayoutTokens, ComponentTokens, ThemeTokens, } from './engine/schema/themeTokens';
11
11
  export { radiusScaleMap, shadowScaleMap, spacingScaleMap, gradientDirectionMap, defaultEffectTokens, defaultLayoutTokens, defaultComponentTokens, defaultThemeTokens, darkThemeTokens, gradientThemeTokens, corporateThemeTokens, playfulThemeTokens, generateThemeCSSVariables, } from './engine/schema/themeTokens';
@@ -17,6 +17,7 @@ export type { RenderNodeProps, } from './engine/render/renderNode';
17
17
  export type { RenderPageProps, } from './engine/render/renderPage';
18
18
  export { RenderNode, renderNode, } from './engine/render/renderNode';
19
19
  export { RenderPage, renderPage, } from './engine/render/renderPage';
20
+ export { Lightbox, } from './engine/render/renderers/sections/Lightbox';
20
21
  export type { ExportPageToHtmlOptions, } from './engine/export/exportHtml';
21
22
  export { exportPageToHtml, exportBlockToHtml, clearHtmlCache, exportDocumentToHtml, generateAssetsManifest, } from './engine/export/exportHtml';
22
23
  export { sanitizeHtml, isSafeUrl, } from './engine/export/sanitizeHtml';
@@ -35,6 +36,8 @@ export type { HeroVariationPreset, } from './engine/presets/heroVariations';
35
36
  export { heroVariations, heroVariationIds, getHeroVariation, HERO_IMAGE_NAMES, PLACEHOLDER_IMAGE_URL, CAROUSEL_PLACEHOLDER_IMAGES, } from './engine/presets/heroVariations';
36
37
  export type { NavbarVariationPreset, } from './engine/presets/navbarVariations';
37
38
  export { navbarVariations, navbarVariationIds, getNavbarVariation, } from './engine/presets/navbarVariations';
39
+ export type { GalleryVariationPreset, } from './engine/presets/galleryVariations';
40
+ export { galleryVariations, galleryVariationIds, getGalleryVariation, } from './engine/presets/galleryVariations';
38
41
  export { blogPostCardVariations, blogPostCardVariationIds, blogPostDetailVariations, blogPostDetailVariationIds, blogCategoryFilterVariations, blogCategoryFilterVariationIds, blogSearchBarVariations, blogSearchBarVariationIds, blogRecentPostsVariations, blogRecentPostsVariationIds, blogTagCloudVariations, blogTagCloudVariationIds, } from './engine/presets/blogVariations';
39
42
  export type { BlogPostCardVariation, BlogPostDetailVariation, BlogCategoryFilterVariation, BlogSearchBarVariation, BlogRecentPostsVariation, BlogTagCloudVariation, } from './engine/presets/blogVariations';
40
43
  export { generateCompleteLandingPage, generatePatchesForLandingPage, generateModernLandingPage, } from './engine/generators/generateLandingPage';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,YAAY,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAI9D,OAAO,0BAA0B,CAAA;AAGjC,YAAY,EAEV,SAAS,EACT,KAAK,EACL,SAAS,EAGT,cAAc,EACd,UAAU,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EAGX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,EACT,YAAY,EACZ,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,EAGV,SAAS,EACT,YAAY,EAGZ,SAAS,EACT,eAAe,EACf,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,UAAU,EACV,cAAc,EACd,cAAc,EACd,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EAGnB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EAGnB,SAAS,EACT,UAAU,EAGV,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,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AyB,EAAE,MAAM,8BAA8B,CAAA;AAEnG,wCAAwC;AACxC,OAAO,EAAE,iBAAiB,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAErF,6CAA6C;AAC7C,YAAY,EAAE,sBAAsB,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAEpG,wCAAwC;AACxC,OAAO,EAAE,iBAAiB,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAErF,8BAA8B;AAC9B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAE/D,mCAAmC;AACnC,YAAY,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,0BAA0B,CAAA"}
package/dist/index.js CHANGED
@@ -60,119 +60,125 @@ import { componentRegistry as ge, componentRegistry as le } from "./engine/regis
60
60
  import { createEmptySiteDocument as ce, createEmptySiteDocument as Pe } from "./engine/schema/siteDocument.js";
61
61
  import { corporateThemeTokens as he, darkThemeTokens as xe, defaultComponentTokens as Ve, defaultEffectTokens as Se, defaultLayoutTokens as Te, defaultThemeTokens as be, generateThemeCSSVariables as ye, gradientDirectionMap as Ce, gradientThemeTokens as ue, playfulThemeTokens as ke, radiusScaleMap as Ee, shadowScaleMap as Le, spacingScaleMap as Re } from "./engine/schema/themeTokens.js";
62
62
  import { RenderNode as ve } from "./engine/render/renderNode.js";
63
- import { RenderPage as He, renderPage as Ie } from "./engine/render/renderPage.js";
64
- import { clearHtmlCache as we, exportBlockToHtml as Oe, exportDocumentToHtml as Be, exportPageToHtml as _e, generateAssetsManifest as Ne } from "./engine/export/exportHtml.js";
65
- import { isSafeUrl as Ge, sanitizeHtml as Ue } from "./engine/export/sanitizeHtml.js";
66
- import { Preview as We, Preview as ze } from "./engine/preview/Preview.js";
67
- import { applyPatch as qe, createAddPatch as Je, createCopyPatch as Qe, createMovePatch as Xe, createRemovePatch as Ye, createReplacePatch as Ze } from "./engine/patch/applyPatch.js";
68
- import { HistoryManager as er, createHistoryManager as rr } from "./engine/patch/history.js";
69
- import { PatchBuilder as or } from "./engine/patch/PatchBuilder.js";
70
- import { applyOverrides as ir, classicPreset as mr, cleanPreset as pr, corporatePreset as nr, getAllPresets as sr, getPreset as gr, glassPreset as lr, minimalPreset as dr, neonPreset as cr, pastelPreset as Pr, playfulKidsPreset as fr, themePresets as hr, validateContrast as xr } from "./engine/presets/themePresets.js";
71
- import { CAROUSEL_PLACEHOLDER_IMAGES as Sr, HERO_IMAGE_NAMES as Tr, PLACEHOLDER_IMAGE_URL as br, getHeroVariation as yr, heroVariationIds as Cr, heroVariations as ur } from "./engine/presets/heroVariations.js";
72
- import { getNavbarVariation as Er, navbarVariationIds as Lr, navbarVariations as Rr } from "./engine/presets/navbarVariations.js";
73
- import { blogCategoryFilterVariationIds as vr, blogCategoryFilterVariations as Dr, blogPostCardVariationIds as Hr, blogPostCardVariations as Ir, blogPostDetailVariationIds as Ar, blogPostDetailVariations as wr, blogRecentPostsVariationIds as Or, blogRecentPostsVariations as Br, blogSearchBarVariationIds as _r, blogSearchBarVariations as Nr, blogTagCloudVariationIds as Fr, blogTagCloudVariations as Gr } from "./engine/presets/blogVariations.js";
74
- import { generateCompleteLandingPage as jr, generateModernLandingPage as Wr, generatePatchesForLandingPage as zr } from "./engine/generators/generateLandingPage.js";
75
- import { evaluateShowWhen as qr } from "./engine/shared/showWhen.js";
76
- import { pluginRegistry as Qr } from "./engine/plugins/pluginRegistry.js";
77
- import { hydratePageWithContent as Yr } from "./engine/plugins/contentHydration.js";
78
- import { matchDynamicPage as $r } from "./engine/plugins/dynamicPageResolver.js";
79
- import { blogPlugin as rt } from "./engine/plugins/builtin/blog/manifest.js";
80
- import { mockBlogContentProvider as ot } from "./engine/plugins/builtin/blog/mockContentProvider.js";
81
- import { createThemeStyle as it, generateCSSVariables as mt, generateCSSVariablesObject as pt, mergeThemeTokens as nt } from "./engine/theme/generateCSSVariables.js";
82
- import { renderBlockNode as gt } from "./engine/render/renderNodeImpl.js";
83
- import { darkTheme as dt, defaultTheme as ct } from "./engine/theme/defaultTheme.js";
63
+ import { RenderPage as Ie, renderPage as He } from "./engine/render/renderPage.js";
64
+ import { Lightbox as we } from "./engine/render/renderers/sections/Lightbox.js";
65
+ import { clearHtmlCache as Be, exportBlockToHtml as _e, exportDocumentToHtml as Ne, exportPageToHtml as Ge, generateAssetsManifest as Fe } from "./engine/export/exportHtml.js";
66
+ import { isSafeUrl as je, sanitizeHtml as We } from "./engine/export/sanitizeHtml.js";
67
+ import { Preview as Ke, Preview as qe } from "./engine/preview/Preview.js";
68
+ import { applyPatch as Qe, createAddPatch as Xe, createCopyPatch as Ye, createMovePatch as Ze, createRemovePatch as $e, createReplacePatch as er } from "./engine/patch/applyPatch.js";
69
+ import { HistoryManager as tr, createHistoryManager as or } from "./engine/patch/history.js";
70
+ import { PatchBuilder as ir } from "./engine/patch/PatchBuilder.js";
71
+ import { applyOverrides as pr, classicPreset as nr, cleanPreset as sr, corporatePreset as gr, getAllPresets as lr, getPreset as dr, glassPreset as cr, minimalPreset as Pr, neonPreset as fr, pastelPreset as hr, playfulKidsPreset as xr, themePresets as Vr, validateContrast as Sr } from "./engine/presets/themePresets.js";
72
+ import { CAROUSEL_PLACEHOLDER_IMAGES as br, HERO_IMAGE_NAMES as yr, PLACEHOLDER_IMAGE_URL as Cr, getHeroVariation as ur, heroVariationIds as kr, heroVariations as Er } from "./engine/presets/heroVariations.js";
73
+ import { getNavbarVariation as Rr, navbarVariationIds as Mr, navbarVariations as vr } from "./engine/presets/navbarVariations.js";
74
+ import { galleryVariationIds as Ir, galleryVariations as Hr, getGalleryVariation as Ar } from "./engine/presets/galleryVariations.js";
75
+ import { blogCategoryFilterVariationIds as Or, blogCategoryFilterVariations as Br, blogPostCardVariationIds as _r, blogPostCardVariations as Nr, blogPostDetailVariationIds as Gr, blogPostDetailVariations as Fr, blogRecentPostsVariationIds as Ur, blogRecentPostsVariations as jr, blogSearchBarVariationIds as Wr, blogSearchBarVariations as zr, blogTagCloudVariationIds as Kr, blogTagCloudVariations as qr } from "./engine/presets/blogVariations.js";
76
+ import { generateCompleteLandingPage as Qr, generateModernLandingPage as Xr, generatePatchesForLandingPage as Yr } from "./engine/generators/generateLandingPage.js";
77
+ import { evaluateShowWhen as $r } from "./engine/shared/showWhen.js";
78
+ import { pluginRegistry as rt } from "./engine/plugins/pluginRegistry.js";
79
+ import { hydratePageWithContent as ot } from "./engine/plugins/contentHydration.js";
80
+ import { matchDynamicPage as it } from "./engine/plugins/dynamicPageResolver.js";
81
+ import { blogPlugin as pt } from "./engine/plugins/builtin/blog/manifest.js";
82
+ import { mockBlogContentProvider as st } from "./engine/plugins/builtin/blog/mockContentProvider.js";
83
+ import { createThemeStyle as lt, generateCSSVariables as dt, generateCSSVariablesObject as ct, mergeThemeTokens as Pt } from "./engine/theme/generateCSSVariables.js";
84
+ import { renderBlockNode as ht } from "./engine/render/renderNodeImpl.js";
85
+ import { darkTheme as Vt, defaultTheme as St } from "./engine/theme/defaultTheme.js";
84
86
  export {
85
- Sr as CAROUSEL_PLACEHOLDER_IMAGES,
86
- Tr as HERO_IMAGE_NAMES,
87
- er as HistoryManager,
87
+ br as CAROUSEL_PLACEHOLDER_IMAGES,
88
+ yr as HERO_IMAGE_NAMES,
89
+ tr as HistoryManager,
88
90
  ae as LandingPageEditor,
89
91
  ie as LandingPageEditorV2,
90
92
  pe as LandingPageViewer,
91
93
  ne as LandingPageViewerV2,
92
- br as PLACEHOLDER_IMAGE_URL,
93
- or as PatchBuilder,
94
- We as Preview,
95
- ze as PreviewV2,
94
+ we as Lightbox,
95
+ Cr as PLACEHOLDER_IMAGE_URL,
96
+ ir as PatchBuilder,
97
+ Ke as Preview,
98
+ qe as PreviewV2,
96
99
  ve as RenderNode,
97
- He as RenderPage,
98
- ir as applyOverrides,
99
- qe as applyPatch,
100
+ Ie as RenderPage,
101
+ pr as applyOverrides,
102
+ Qe as applyPatch,
100
103
  ge as blockRegistry,
101
- vr as blogCategoryFilterVariationIds,
102
- Dr as blogCategoryFilterVariations,
103
- rt as blogPlugin,
104
- Hr as blogPostCardVariationIds,
105
- Ir as blogPostCardVariations,
106
- Ar as blogPostDetailVariationIds,
107
- wr as blogPostDetailVariations,
108
- Or as blogRecentPostsVariationIds,
109
- Br as blogRecentPostsVariations,
110
- _r as blogSearchBarVariationIds,
111
- Nr as blogSearchBarVariations,
112
- Fr as blogTagCloudVariationIds,
113
- Gr as blogTagCloudVariations,
114
- mr as classicPreset,
115
- pr as cleanPreset,
116
- we as clearHtmlCache,
104
+ Or as blogCategoryFilterVariationIds,
105
+ Br as blogCategoryFilterVariations,
106
+ pt as blogPlugin,
107
+ _r as blogPostCardVariationIds,
108
+ Nr as blogPostCardVariations,
109
+ Gr as blogPostDetailVariationIds,
110
+ Fr as blogPostDetailVariations,
111
+ Ur as blogRecentPostsVariationIds,
112
+ jr as blogRecentPostsVariations,
113
+ Wr as blogSearchBarVariationIds,
114
+ zr as blogSearchBarVariations,
115
+ Kr as blogTagCloudVariationIds,
116
+ qr as blogTagCloudVariations,
117
+ nr as classicPreset,
118
+ sr as cleanPreset,
119
+ Be as clearHtmlCache,
117
120
  le as componentRegistry,
118
- nr as corporatePreset,
121
+ gr as corporatePreset,
119
122
  he as corporateThemeTokens,
120
- Je as createAddPatch,
121
- Qe as createCopyPatch,
123
+ Xe as createAddPatch,
124
+ Ye as createCopyPatch,
122
125
  ce as createEmptySiteDocument,
123
126
  Pe as createEmptySiteDocumentV2,
124
- rr as createHistoryManager,
125
- Xe as createMovePatch,
126
- Ye as createRemovePatch,
127
- Ze as createReplacePatch,
128
- it as createSiteThemeStyle,
127
+ or as createHistoryManager,
128
+ Ze as createMovePatch,
129
+ $e as createRemovePatch,
130
+ er as createReplacePatch,
131
+ lt as createSiteThemeStyle,
129
132
  xe as darkThemeTokens,
130
133
  Ve as defaultComponentTokens,
131
134
  Se as defaultEffectTokens,
132
135
  Te as defaultLayoutTokens,
133
136
  be as defaultThemeTokens,
134
- qr as evaluateShowWhen,
135
- Oe as exportBlockToHtml,
136
- Be as exportDocumentToHtml,
137
- _e as exportPageToHtml,
138
- Ne as generateAssetsManifest,
139
- jr as generateCompleteLandingPage,
140
- Wr as generateModernLandingPage,
141
- zr as generatePatchesForLandingPage,
142
- mt as generateSiteCSSVariables,
143
- pt as generateSiteCSSVariablesObject,
137
+ $r as evaluateShowWhen,
138
+ _e as exportBlockToHtml,
139
+ Ne as exportDocumentToHtml,
140
+ Ge as exportPageToHtml,
141
+ Ir as galleryVariationIds,
142
+ Hr as galleryVariations,
143
+ Fe as generateAssetsManifest,
144
+ Qr as generateCompleteLandingPage,
145
+ Xr as generateModernLandingPage,
146
+ Yr as generatePatchesForLandingPage,
147
+ dt as generateSiteCSSVariables,
148
+ ct as generateSiteCSSVariablesObject,
144
149
  ye as generateThemeCSSVariables,
145
- sr as getAllPresets,
146
- yr as getHeroVariation,
147
- Er as getNavbarVariation,
148
- gr as getPreset,
149
- lr as glassPreset,
150
+ lr as getAllPresets,
151
+ Ar as getGalleryVariation,
152
+ ur as getHeroVariation,
153
+ Rr as getNavbarVariation,
154
+ dr as getPreset,
155
+ cr as glassPreset,
150
156
  Ce as gradientDirectionMap,
151
157
  ue as gradientThemeTokens,
152
- Cr as heroVariationIds,
153
- ur as heroVariations,
154
- Yr as hydratePageWithContent,
155
- Ge as isSafeUrl,
156
- $r as matchDynamicPage,
157
- nt as mergeSiteThemeTokens,
158
- dr as minimalPreset,
159
- ot as mockBlogContentProvider,
160
- Lr as navbarVariationIds,
161
- Rr as navbarVariations,
162
- cr as neonPreset,
163
- Pr as pastelPreset,
164
- fr as playfulKidsPreset,
158
+ kr as heroVariationIds,
159
+ Er as heroVariations,
160
+ ot as hydratePageWithContent,
161
+ je as isSafeUrl,
162
+ it as matchDynamicPage,
163
+ Pt as mergeSiteThemeTokens,
164
+ Pr as minimalPreset,
165
+ st as mockBlogContentProvider,
166
+ Mr as navbarVariationIds,
167
+ vr as navbarVariations,
168
+ fr as neonPreset,
169
+ hr as pastelPreset,
170
+ xr as playfulKidsPreset,
165
171
  ke as playfulThemeTokens,
166
- Qr as pluginRegistry,
172
+ rt as pluginRegistry,
167
173
  Ee as radiusScaleMap,
168
- gt as renderNode,
169
- Ie as renderPage,
170
- Ue as sanitizeHtml,
174
+ ht as renderNode,
175
+ He as renderPage,
176
+ We as sanitizeHtml,
171
177
  Le as shadowScaleMap,
172
- dt as siteDarkTheme,
173
- ct as siteDefaultTheme,
178
+ Vt as siteDarkTheme,
179
+ St as siteDefaultTheme,
174
180
  Re as spacingScaleMap,
175
- hr as themePresets,
176
- xr as validateContrast
181
+ Vr as themePresets,
182
+ Sr as validateContrast
177
183
  };
178
184
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brunoalz/smartgesti-site-editor",
3
- "version": "1.9.1",
3
+ "version": "1.10.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Site editor component for SmartGesti platform",