@brunoalz/smartgesti-site-editor 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"BlogPostExporters.d.ts","sourceRoot":"","sources":["../../../../../src/engine/export/exporters/sections/BlogPostExporters.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAc1D,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,WAAW,GAClB,MAAM,CAgGR;AAsED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,WAAW,EACnB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW,KAAK,MAAM,GAC7F,MAAM,CAyDR;AAMD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,WAAW,GAClB,MAAM,CAoFR;AAMD,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAwFR;AAMD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAkDR;AAMD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAqER;AAMD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAgER"}
1
+ {"version":3,"file":"BlogPostExporters.d.ts","sourceRoot":"","sources":["../../../../../src/engine/export/exporters/sections/BlogPostExporters.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAc1D,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,WAAW,GAClB,MAAM,CAgGR;AA0GD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,WAAW,EACnB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW,KAAK,MAAM,GAC7F,MAAM,CAuFR;AAMD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,WAAW,GAClB,MAAM,CAoFR;AAMD,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAwFR;AAMD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAkDR;AAMD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAqER;AAMD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAgER"}
@@ -1,282 +1,293 @@
1
- import { escapeHtml as e, dataBlockIdAttr as B } from "../../shared/htmlHelpers.js";
1
+ import { escapeHtml as e, dataBlockIdAttr as N } from "../../shared/htmlHelpers.js";
2
2
  import { generateScopedId as D } from "../../shared/idGenerator.js";
3
- import { resolveResponsiveColumns as L, generateResponsiveGridStyles as M } from "../../shared/responsiveGridHelper.js";
3
+ import { resolveResponsiveColumns as M, generateResponsiveGridStyles as L } from "../../shared/responsiveGridHelper.js";
4
4
  import { resolveWidgetShadow as _ } from "../../../shared/widgetStyles.js";
5
5
  import { generateLinkHoverStyles as q } from "../../../shared/hoverEffects/linkHover.js";
6
- function Q(t, $, b, C) {
6
+ function J(t, v, $, z) {
7
7
  const {
8
- title: l,
8
+ title: o,
9
9
  excerpt: r,
10
10
  image: g,
11
- date: p,
12
- category: v,
13
- authorName: f,
14
- authorAvatar: n,
15
- readingTime: o,
16
- linkHref: h,
11
+ date: h,
12
+ category: c,
13
+ authorName: m,
14
+ authorAvatar: l,
15
+ readingTime: a,
16
+ linkHref: b,
17
17
  linkText: d,
18
- variant: H = "default",
19
- showImage: z = !0,
20
- showCategory: a = !0,
18
+ variant: S = "default",
19
+ showImage: j = !0,
20
+ showCategory: s = !0,
21
21
  showDate: k = !0,
22
22
  showAuthor: P = !1,
23
- showReadingTime: m = !1
23
+ showReadingTime: p = !1
24
24
  } = t.props;
25
- if (H === "horizontal") {
26
- const x = z && g ? `<div style="width: 260px; min-height: 180px; flex-shrink: 0; background-image: url(${e(g)}); background-size: cover; background-position: center;"></div>` : "", I = [];
27
- a && v && I.push(e(v)), k && p && I.push(e(p)), m && o && I.push(e(o));
28
- const u = I.length ? `<p style="font-size: 0.75rem; color: var(--sg-muted-text); margin-bottom: 0.5rem;">${I.join(" &middot; ")}</p>` : "", j = P && f ? `<div style="display: flex; align-items: center; gap: 0.5rem; margin-top: auto; padding-top: 0.75rem;">${n ? `<img src="${e(n)}" alt="${e(f)}" style="width: 28px; height: 28px; border-radius: 50%; object-fit: cover;" />` : ""}<span style="font-size: 0.8rem; color: var(--sg-muted-text);">${e(f)}</span></div>` : "", A = d ? `<a href="${e(h || "#")}" style="color: var(--sg-primary); font-weight: 500; text-decoration: none; font-size: 0.875rem;">${e(d)}</a>` : "";
29
- return `<article ${B(t.id)} class="sg-blog-post-card" style="display: flex; background-color: var(--sg-bg); border-radius: var(--sg-card-radius); overflow: hidden; box-shadow: var(--sg-card-shadow);" data-variant="horizontal">${x}<div style="padding: 1.25rem; display: flex; flex-direction: column; flex: 1;">${u}<h3 style="font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem;">${e(l)}</h3>${r ? `<p style="color: var(--sg-muted-text); font-size: 0.875rem; margin-bottom: 0.75rem;">${e(r)}</p>` : ""}${A}${j}</div></article>`;
25
+ if (S === "horizontal") {
26
+ const y = j && g ? `<div style="width: 260px; min-height: 180px; flex-shrink: 0; background-image: url(${e(g)}); background-size: cover; background-position: center;"></div>` : "", H = [];
27
+ s && c && H.push(e(c)), k && h && H.push(e(h)), p && a && H.push(e(a));
28
+ const u = H.length ? `<p style="font-size: 0.75rem; color: var(--sg-muted-text); margin-bottom: 0.5rem;">${H.join(" &middot; ")}</p>` : "", C = P && m ? `<div style="display: flex; align-items: center; gap: 0.5rem; margin-top: auto; padding-top: 0.75rem;">${l ? `<img src="${e(l)}" alt="${e(m)}" style="width: 28px; height: 28px; border-radius: 50%; object-fit: cover;" />` : ""}<span style="font-size: 0.8rem; color: var(--sg-muted-text);">${e(m)}</span></div>` : "", R = d ? `<a href="${e(b || "#")}" style="color: var(--sg-primary); font-weight: 500; text-decoration: none; font-size: 0.875rem;">${e(d)}</a>` : "";
29
+ return `<article ${N(t.id)} class="sg-blog-post-card" style="display: flex; background-color: var(--sg-bg); border-radius: var(--sg-card-radius); overflow: hidden; box-shadow: var(--sg-card-shadow);" data-variant="horizontal">${y}<div style="padding: 1.25rem; display: flex; flex-direction: column; flex: 1;">${u}<h3 style="font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem;">${e(o)}</h3>${r ? `<p style="color: var(--sg-muted-text); font-size: 0.875rem; margin-bottom: 0.75rem;">${e(r)}</p>` : ""}${R}${C}</div></article>`;
30
30
  }
31
- if (H === "minimal") {
32
- const x = [];
33
- a && v && x.push(e(v)), k && p && x.push(e(p)), m && o && x.push(e(o));
34
- const I = x.length ? `<p style="font-size: 0.75rem; color: var(--sg-muted-text); margin-bottom: 0.5rem;">${x.join(" &middot; ")}</p>` : "", u = d ? `<a href="${e(h || "#")}" style="color: var(--sg-primary); font-weight: 500; text-decoration: none; font-size: 0.875rem;">${e(d)}</a>` : "";
35
- return `<article ${B(t.id)} class="sg-blog-post-card" style="padding: 1.25rem 0; border-bottom: 1px solid var(--sg-border, #e5e7eb);" data-variant="minimal">${I}<h3 style="font-size: 1.125rem; font-weight: 600; margin-bottom: 0.25rem;">${e(l)}</h3>${r ? `<p style="color: var(--sg-muted-text); font-size: 0.875rem; margin-bottom: 0.5rem;">${e(r)}</p>` : ""}${u}</article>`;
31
+ if (S === "minimal") {
32
+ const y = [];
33
+ s && c && y.push(e(c)), k && h && y.push(e(h)), p && a && y.push(e(a));
34
+ const H = y.length ? `<p style="font-size: 0.75rem; color: var(--sg-muted-text); margin-bottom: 0.5rem;">${y.join(" &middot; ")}</p>` : "", u = d ? `<a href="${e(b || "#")}" style="color: var(--sg-primary); font-weight: 500; text-decoration: none; font-size: 0.875rem;">${e(d)}</a>` : "";
35
+ return `<article ${N(t.id)} class="sg-blog-post-card" style="padding: 1.25rem 0; border-bottom: 1px solid var(--sg-border, #e5e7eb);" data-variant="minimal">${H}<h3 style="font-size: 1.125rem; font-weight: 600; margin-bottom: 0.25rem;">${e(o)}</h3>${r ? `<p style="color: var(--sg-muted-text); font-size: 0.875rem; margin-bottom: 0.5rem;">${e(r)}</p>` : ""}${u}</article>`;
36
36
  }
37
- const y = z && g ? `<div style="height: 200px; background-image: url(${e(g)}); background-size: cover; background-position: center;"></div>` : "", s = [];
38
- a && v && s.push(e(v)), k && p && s.push(e(p)), m && o && s.push(e(o));
39
- const c = s.length ? `<p style="font-size: 0.75rem; color: var(--sg-muted-text); margin-bottom: 0.5rem;">${s.join(" &middot; ")}</p>` : "", S = P && f ? `<div style="display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem;">${n ? `<img src="${e(n)}" alt="${e(f)}" style="width: 32px; height: 32px; border-radius: 50%; object-fit: cover;" />` : ""}<span style="font-size: 0.8rem; color: var(--sg-muted-text);">${e(f)}</span></div>` : "", w = d ? `<a href="${e(h || "#")}" style="color: var(--sg-primary); font-weight: 500; text-decoration: none; font-size: 0.875rem;">${e(d)}</a>` : "";
40
- return `<article ${B(t.id)} class="sg-blog-post-card" style="background-color: var(--sg-bg); border-radius: var(--sg-card-radius); overflow: hidden; box-shadow: var(--sg-card-shadow);" data-variant="default">${y}<div style="padding: 1.5rem;">${c}<h3 style="font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem;">${e(l)}</h3>${r ? `<p style="color: var(--sg-muted-text); font-size: 0.875rem; margin-bottom: 1rem;">${e(r)}</p>` : ""}${w}${S}</div></article>`;
37
+ const x = j && g ? `<div style="height: 200px; background-image: url(${e(g)}); background-size: cover; background-position: center;"></div>` : "", n = [];
38
+ s && c && n.push(e(c)), k && h && n.push(e(h)), p && a && n.push(e(a));
39
+ const f = n.length ? `<p style="font-size: 0.75rem; color: var(--sg-muted-text); margin-bottom: 0.5rem;">${n.join(" &middot; ")}</p>` : "", I = P && m ? `<div style="display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem;">${l ? `<img src="${e(l)}" alt="${e(m)}" style="width: 32px; height: 32px; border-radius: 50%; object-fit: cover;" />` : ""}<span style="font-size: 0.8rem; color: var(--sg-muted-text);">${e(m)}</span></div>` : "", w = d ? `<a href="${e(b || "#")}" style="color: var(--sg-primary); font-weight: 500; text-decoration: none; font-size: 0.875rem;">${e(d)}</a>` : "";
40
+ return `<article ${N(t.id)} class="sg-blog-post-card" style="background-color: var(--sg-bg); border-radius: var(--sg-card-radius); overflow: hidden; box-shadow: var(--sg-card-shadow);" data-variant="default">${x}<div style="padding: 1.5rem;">${f}<h3 style="font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem;">${e(o)}</h3>${r ? `<p style="color: var(--sg-muted-text); font-size: 0.875rem; margin-bottom: 1rem;">${e(r)}</p>` : ""}${w}${I}</div></article>`;
41
41
  }
42
- function N(t, $) {
43
- if ($ <= 1) return t;
44
- const b = t.includes("?") ? "&" : "?";
45
- return `${t}${b}pagina=${$}`;
42
+ function E(t, v) {
43
+ if (v <= 1) return t;
44
+ const $ = t.includes("?") ? "&" : "?";
45
+ return `${t}${$}pagina=${v}`;
46
46
  }
47
- function Y(t, $) {
48
- if ($ <= 7)
49
- return Array.from({ length: $ }, (r, g) => g + 1);
50
- const b = [1];
51
- t > 3 && b.push(-1);
52
- const C = Math.max(2, t - 1), l = Math.min($ - 1, t + 1);
53
- for (let r = C; r <= l; r++) b.push(r);
54
- return t < $ - 2 && b.push(-1), b[b.length - 1] !== $ && b.push($), b;
47
+ function V(t, v) {
48
+ if (v <= 7)
49
+ return Array.from({ length: v }, (r, g) => g + 1);
50
+ const $ = [1];
51
+ t > 3 && $.push(-1);
52
+ const z = Math.max(2, t - 1), o = Math.min(v - 1, t + 1);
53
+ for (let r = z; r <= o; r++) $.push(r);
54
+ return t < v - 2 && $.push(-1), $[$.length - 1] !== v && $.push(v), $;
55
55
  }
56
- function F(t, $, b) {
57
- if ($ <= 1) return "";
58
- const C = "display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border-radius:var(--sg-card-radius, 0.5rem);text-decoration:none;font-size:0.875rem;", l = "border:1px solid var(--sg-border, #e5e7eb);", r = "border:1px solid var(--sg-primary);", g = t > 1 ? `<a href="${e(N(b, t - 1))}" style="${C}${l}color:var(--sg-text);">&lsaquo;</a>` : `<span style="${C}${l}color:var(--sg-muted-text);opacity:0.4;">&lsaquo;</span>`, v = Y(t, $).map((n, o) => {
59
- if (n === -1)
60
- return `<span style="${C}color:var(--sg-muted-text);">&hellip;</span>`;
61
- const h = n === t;
62
- return `<a href="${e(N(b, n))}" style="${C}${h ? r : l}background-color:${h ? "var(--sg-primary)" : "transparent"};color:${h ? "var(--sg-primary-text, #fff)" : "var(--sg-text)"};font-weight:${h ? "600" : "400"};">${n}</a>`;
63
- }).join(""), f = t < $ ? `<a href="${e(N(b, t + 1))}" style="${C}${l}color:var(--sg-text);">&rsaquo;</a>` : `<span style="${C}${l}color:var(--sg-muted-text);opacity:0.4;">&rsaquo;</span>`;
64
- return `<nav data-block-group="Paginação" style="display:flex;justify-content:center;align-items:center;gap:0.375rem;margin-top:2.5rem;">${g}${v}${f}</nav>`;
56
+ function Y(t, v, $) {
57
+ if (v <= 1) return "";
58
+ const z = "display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border-radius:var(--sg-card-radius, 0.5rem);text-decoration:none;font-size:0.875rem;", o = "border:1px solid var(--sg-border, #e5e7eb);", r = "border:1px solid var(--sg-primary);", g = t > 1 ? `<a href="${e(E($, t - 1))}" style="${z}${o}color:var(--sg-text);">&lsaquo;</a>` : `<span style="${z}${o}color:var(--sg-muted-text);opacity:0.4;">&lsaquo;</span>`, c = V(t, v).map((l, a) => {
59
+ if (l === -1)
60
+ return `<span style="${z}color:var(--sg-muted-text);">&hellip;</span>`;
61
+ const b = l === t;
62
+ return `<a href="${e(E($, l))}" style="${z}${b ? r : o}background-color:${b ? "var(--sg-primary)" : "transparent"};color:${b ? "var(--sg-primary-text, #fff)" : "var(--sg-text)"};font-weight:${b ? "600" : "400"};">${l}</a>`;
63
+ }).join(""), m = t < v ? `<a href="${e(E($, t + 1))}" style="${z}${o}color:var(--sg-text);">&rsaquo;</a>` : `<span style="${z}${o}color:var(--sg-muted-text);opacity:0.4;">&rsaquo;</span>`;
64
+ return `<nav data-block-group="Paginação" style="display:flex;justify-content:center;align-items:center;gap:0.375rem;margin-top:2.5rem;">${g}${c}${m}</nav>`;
65
65
  }
66
- function J(t, $, b, C, l) {
66
+ function F(t) {
67
+ const v = t.image ? `<img src="${e(t.image)}" alt="${e(t.title || "")}" style="position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;" />` : "", $ = t.category ? `<span style="display:inline-block;padding:0.25rem 0.75rem;background-color:var(--sg-primary);color:var(--sg-primary-text, #fff);font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;border-radius:0.25rem;margin-bottom:0.75rem;">${e(t.category)}</span>` : "", z = t.excerpt ? `<p style="font-size:1rem;line-height:1.5;color:rgba(255,255,255,0.85);margin-bottom:0.75rem;max-width:600px;">${e(t.excerpt)}</p>` : "", o = [];
68
+ t.authorAvatar && o.push(`<img src="${e(t.authorAvatar)}" alt="${e(t.authorName || "")}" style="width:1.75rem;height:1.75rem;border-radius:50%;object-fit:cover;" />`), t.authorName && o.push(`<span style="font-weight:500;">${e(t.authorName)}</span>`), t.authorName && t.date && o.push("<span>&middot;</span>"), t.date && o.push(`<span>${e(t.date)}</span>`);
69
+ const r = o.length ? `<div style="display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;color:rgba(255,255,255,0.8);">${o.join("")}</div>` : "";
70
+ return `<a href="${e(t.linkHref || "#")}" data-block-group="Post em Destaque" style="display:block;position:relative;width:100%;min-height:420px;border-radius:var(--sg-card-radius, 0.75rem);overflow:hidden;margin-bottom:2.5rem;text-decoration:none;color:#fff;background-color:#1a1a2e;">${v}<div style="position:absolute;inset:0;background:linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.15) 100%);"></div><div style="position:absolute;bottom:0;left:0;right:0;padding:2rem 2.5rem;">${$}<h2 style="font-size:2rem;font-weight:700;line-height:1.2;margin-bottom:0.5rem;color:#fff;">${e(t.title || "")}</h2>${z}${r}</div></a>`;
71
+ }
72
+ function K(t, v, $, z, o) {
67
73
  const {
68
74
  title: r,
69
75
  subtitle: g,
70
- columns: p = 3,
71
- cards: v = [],
72
- showViewAll: f = !1,
73
- viewAllText: n,
74
- viewAllHref: o,
75
- currentPage: h = 1,
76
- totalPages: d = 1,
77
- paginationBaseUrl: H = "#"
78
- } = t.props, z = D(t.id || "", "blog-post-grid"), a = L(p, 1, 2, p), { inlineStyles: k, mediaQueries: P } = M(
79
- z,
80
- a,
76
+ columns: h = 3,
77
+ cards: c = [],
78
+ variant: m = "default",
79
+ showViewAll: l = !1,
80
+ viewAllText: a,
81
+ viewAllHref: b,
82
+ currentPage: d = 1,
83
+ totalPages: S = 1,
84
+ paginationBaseUrl: j = "#"
85
+ } = t.props, s = m === "magazine", k = s && c.length > 0 ? c[0] : null, P = s ? c.slice(1) : c, p = D(t.id || "", "blog-post-grid"), x = M(h, 1, 2, h), { inlineStyles: n, mediaQueries: f } = L(
86
+ p,
87
+ x,
81
88
  "2rem"
82
- ), m = r || g ? `<div data-block-group="Cabeçalho" style="text-align: center; margin-bottom: 3rem;">${r ? `<h2 style="font-size: var(--sg-heading-h2); margin-bottom: 0.5rem;">${e(r)}</h2>` : ""}${g ? `<p style="color: var(--sg-muted-text);">${e(g)}</p>` : ""}</div>` : "";
83
- if (!l)
89
+ ), I = k ? F(k) : "";
90
+ let w = "";
91
+ if (s ? P.length > 0 && (w = '<div data-block-group="Cabeçalho" style="margin-bottom:2rem;"><h3 style="font-size:0.875rem;font-weight:700;text-transform:uppercase;letter-spacing:0.1em;color:var(--sg-text);margin-bottom:0.75rem;">Posts Recentes</h3><div style="height:2px;background-color:var(--sg-primary);width:3rem;"></div></div>') : (r || g) && (w = `<div data-block-group="Cabeçalho" style="text-align: center; margin-bottom: 3rem;">${r ? `<h2 style="font-size: var(--sg-heading-h2); margin-bottom: 0.5rem;">${e(r)}</h2>` : ""}${g ? `<p style="color: var(--sg-muted-text);">${e(g)}</p>` : ""}</div>`), !o)
84
92
  throw new Error("exportBlogPostGrid requires renderChild function");
85
- const y = v.length > 0 ? v.map(
86
- (S, w) => l(
93
+ const y = (B) => m === "featured" && B === 0 ? "horizontal" : m === "minimal" ? "minimal" : "default";
94
+ let H = "";
95
+ P.length > 0 ? H = P.map(
96
+ (B, T) => o(
87
97
  {
88
- id: `${t.id}-card-${w}`,
98
+ id: `${t.id}-card-${s ? T + 1 : T}`,
89
99
  type: "blogPostCard",
90
- props: S
100
+ props: { ...B, variant: y(T) }
91
101
  },
92
- $ + 1,
93
- b,
94
- C
102
+ v + 1,
103
+ $,
104
+ z
95
105
  )
96
- ).join("") : '<div style="grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--sg-muted-text); border: 2px dashed var(--sg-border, #e5e7eb); border-radius: var(--sg-card-radius, 0.5rem);"><p style="font-size: 1rem; margin-bottom: 0.5rem;">Nenhum post encontrado</p><p style="font-size: 0.875rem;">Os posts aparecerão aqui quando forem publicados.</p></div>', s = f && n ? `<div data-block-group="Rodapé" style="text-align: center; margin-top: 2.5rem;"><a href="${e(o || "#")}" style="display: inline-block; padding: 0.75rem 1.5rem; background-color: var(--sg-primary); color: var(--sg-primary-text, #fff); font-weight: 600; border-radius: var(--sg-button-radius); text-decoration: none;">${e(n)}</a></div>` : "", c = F(h, d, H);
97
- return `<style>${P}</style><section ${B(t.id)} style="padding: 4rem 0; background-color: var(--sg-bg);"><div style="max-width: 1200px; margin: 0 auto; padding: 0 1rem;">${m}<div data-block-group="Layout" id="${z}" style="${k}">${y}</div>${s}${c}</div></section>`;
106
+ ).join("") : k || (H = '<div style="grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--sg-muted-text); border: 2px dashed var(--sg-border, #e5e7eb); border-radius: var(--sg-card-radius, 0.5rem);"><p style="font-size: 1rem; margin-bottom: 0.5rem;">Nenhum post encontrado</p><p style="font-size: 0.875rem;">Os posts aparecerão aqui quando forem publicados.</p></div>');
107
+ const u = H ? `<div data-block-group="Layout" id="${p}" style="${n}">${H}</div>` : "", C = l && a ? `<div data-block-group="Rodapé" style="text-align: center; margin-top: 2.5rem;"><a href="${e(b || "#")}" style="display: inline-block; padding: 0.75rem 1.5rem; background-color: var(--sg-primary); color: var(--sg-primary-text, #fff); font-weight: 600; border-radius: var(--sg-button-radius); text-decoration: none;">${e(a)}</a></div>` : "", R = Y(d, S, j), i = s ? "0" : "4rem 0", A = s ? "" : "max-width: 1200px; margin: 0 auto; padding: 0 1rem;";
108
+ return `<style>${f}</style><section ${N(t.id)} style="padding: ${i}; background-color: var(--sg-bg);"><div style="${A}">${I}${w}${u}${C}${R}</div></section>`;
98
109
  }
99
- function K(t, $, b, C) {
110
+ function X(t, v, $, z) {
100
111
  const {
101
- title: l,
112
+ title: o,
102
113
  content: r,
103
114
  featuredImage: g,
104
- date: p,
105
- category: v,
106
- readingTime: f,
107
- tags: n = [],
108
- showFeaturedImage: o = !0,
109
- showAuthor: h = !0,
115
+ date: h,
116
+ category: c,
117
+ readingTime: m,
118
+ tags: l = [],
119
+ showFeaturedImage: a = !0,
120
+ showAuthor: b = !0,
110
121
  authorVariant: d = "inline",
111
- showDate: H = !0,
112
- showTags: z = !0,
113
- showReadingTime: a = !0,
122
+ showDate: S = !0,
123
+ showTags: j = !0,
124
+ showReadingTime: s = !0,
114
125
  contentMaxWidth: k = "720px",
115
126
  authorName: P,
116
- authorAvatar: m,
117
- authorBio: y
118
- } = t.props, s = e(P || "Nome do Autor"), c = y ? e(y) : "", S = o && g ? `<div data-block-group="Mídia" style="width: 100%; margin: 0 auto 2.5rem auto; border-radius: var(--sg-card-radius); overflow: hidden;"><img src="${e(g)}" alt="${e(l || "")}" style="width: 100%; height: auto; max-height: 520px; object-fit: cover; display: block;" /></div>` : "", w = v ? `<span style="display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary); color: var(--sg-primary-text, #fff); border-radius: 999px; font-size: 0.75rem; font-weight: 600; margin-bottom: 1rem;">${e(v)}</span>` : "", x = [];
119
- H && p && x.push(e(p)), a && f && x.push(e(f));
120
- const I = x.length ? `<p style="color: var(--sg-muted-text); font-size: 0.875rem; margin-bottom: 1.5rem;">${x.join(" &middot; ")}</p>` : "", u = `<h1 data-block-group="Conteúdo" style="font-size: var(--sg-heading-h1, 2.25rem); font-weight: 700; margin-bottom: 0.75rem; line-height: 1.2;">${e(l)}</h1>`, j = r ? `<div class="sg-blog-post-content" style="font-size: 1.0625rem; line-height: 1.75; color: var(--sg-text);">${r}</div>` : "", A = m ? `<img src="${e(m)}" alt="${s}" style="width:56px;height:56px;border-radius:50%;object-fit:cover;flex-shrink:0;" />` : `<div style="width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg, var(--sg-primary, #6366f1) 0%, #818cf8 100%);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--sg-primary-text, #fff);font-size:1.5rem;font-weight:700;">${s.charAt(0).toUpperCase()}</div>`, i = m ? `<img src="${e(m)}" alt="${s}" style="width:40px;height:40px;border-radius:50%;object-fit:cover;flex-shrink:0;" />` : `<div style="width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg, var(--sg-primary, #6366f1) 0%, #818cf8 100%);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--sg-primary-text, #fff);font-size:1.1rem;font-weight:700;">${s.charAt(0).toUpperCase()}</div>`;
121
- let R = "";
122
- if (h) {
123
- const E = c ? `<p style="color:var(--sg-muted-text);font-size:0.875rem;margin:0.25rem 0 0;">${c}</p>` : "";
124
- d === "card" ? R = `<div data-block-group="Autor" style="display:flex;align-items:flex-start;gap:1rem;margin-top:3rem;padding:1.25rem;border-radius:var(--sg-card-radius, 0.75rem);background-color:var(--sg-surface, #f9fafb);">${A}<div><div style="font-size:0.75rem;color:var(--sg-muted-text);text-transform:uppercase;letter-spacing:0.05em;margin-bottom:0.125rem;">Escrito por</div><div style="font-weight:600;font-size:1rem;">${s}</div>${E}</div></div>` : d === "minimal" ? R = `<p data-block-group="Autor" style="margin-top:3rem;padding-top:2rem;border-top:1px solid var(--sg-border, #e5e7eb);color:var(--sg-muted-text);font-size:0.9375rem;">Escrito por <span style="font-weight:600;color:var(--sg-text);">${s}</span></p>` : R = `<div data-block-group="Autor" style="display:flex;align-items:center;gap:0.75rem;margin-top:3rem;padding-top:2rem;border-top:1px solid var(--sg-border, #e5e7eb);">${i}<div><div style="font-size:0.75rem;color:var(--sg-muted-text);">Escrito por</div><div style="font-weight:600;font-size:0.9375rem;">${s}</div></div></div>`;
127
+ authorAvatar: p,
128
+ authorBio: x
129
+ } = t.props, n = e(P || "Nome do Autor"), f = x ? e(x) : "", I = a && g ? `<div data-block-group="Mídia" style="width: 100%; margin: 0 auto 2.5rem auto; border-radius: var(--sg-card-radius); overflow: hidden;"><img src="${e(g)}" alt="${e(o || "")}" style="width: 100%; height: auto; max-height: 520px; object-fit: cover; display: block;" /></div>` : "", w = c ? `<span style="display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary); color: var(--sg-primary-text, #fff); border-radius: 999px; font-size: 0.75rem; font-weight: 600; margin-bottom: 1rem;">${e(c)}</span>` : "", y = [];
130
+ S && h && y.push(e(h)), s && m && y.push(e(m));
131
+ const H = y.length ? `<p style="color: var(--sg-muted-text); font-size: 0.875rem; margin-bottom: 1.5rem;">${y.join(" &middot; ")}</p>` : "", u = `<h1 data-block-group="Conteúdo" style="font-size: var(--sg-heading-h1, 2.25rem); font-weight: 700; margin-bottom: 0.75rem; line-height: 1.2;">${e(o)}</h1>`, C = r ? `<div class="sg-blog-post-content" style="font-size: 1.0625rem; line-height: 1.75; color: var(--sg-text);">${r}</div>` : "", R = p ? `<img src="${e(p)}" alt="${n}" style="width:56px;height:56px;border-radius:50%;object-fit:cover;flex-shrink:0;" />` : `<div style="width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg, var(--sg-primary, #6366f1) 0%, #818cf8 100%);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--sg-primary-text, #fff);font-size:1.5rem;font-weight:700;">${n.charAt(0).toUpperCase()}</div>`, i = p ? `<img src="${e(p)}" alt="${n}" style="width:40px;height:40px;border-radius:50%;object-fit:cover;flex-shrink:0;" />` : `<div style="width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg, var(--sg-primary, #6366f1) 0%, #818cf8 100%);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--sg-primary-text, #fff);font-size:1.1rem;font-weight:700;">${n.charAt(0).toUpperCase()}</div>`;
132
+ let A = "";
133
+ if (b) {
134
+ const T = f ? `<p style="color:var(--sg-muted-text);font-size:0.875rem;margin:0.25rem 0 0;">${f}</p>` : "";
135
+ d === "card" ? A = `<div data-block-group="Autor" style="display:flex;align-items:flex-start;gap:1rem;margin-top:3rem;padding:1.25rem;border-radius:var(--sg-card-radius, 0.75rem);background-color:var(--sg-surface, #f9fafb);">${R}<div><div style="font-size:0.75rem;color:var(--sg-muted-text);text-transform:uppercase;letter-spacing:0.05em;margin-bottom:0.125rem;">Escrito por</div><div style="font-weight:600;font-size:1rem;">${n}</div>${T}</div></div>` : d === "minimal" ? A = `<p data-block-group="Autor" style="margin-top:3rem;padding-top:2rem;border-top:1px solid var(--sg-border, #e5e7eb);color:var(--sg-muted-text);font-size:0.9375rem;">Escrito por <span style="font-weight:600;color:var(--sg-text);">${n}</span></p>` : A = `<div data-block-group="Autor" style="display:flex;align-items:center;gap:0.75rem;margin-top:3rem;padding-top:2rem;border-top:1px solid var(--sg-border, #e5e7eb);">${i}<div><div style="font-size:0.75rem;color:var(--sg-muted-text);">Escrito por</div><div style="font-weight:600;font-size:0.9375rem;">${n}</div></div></div>`;
125
136
  }
126
- const T = z && n.length > 0 ? `<div data-block-group="Visibilidade" style="margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem;">${n.map(
127
- (E) => `<span style="display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-surface, #f3f4f6); color: var(--sg-text); border-radius: 999px; font-size: 0.75rem;">${e(E)}</span>`
137
+ const B = j && l.length > 0 ? `<div data-block-group="Visibilidade" style="margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem;">${l.map(
138
+ (T) => `<span style="display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-surface, #f3f4f6); color: var(--sg-text); border-radius: 999px; font-size: 0.75rem;">${e(T)}</span>`
128
139
  ).join("")}</div>` : "";
129
- return `<article ${B(t.id)} class="sg-blog-post-detail" style="padding: 0; padding-bottom: 6rem;">${S}<div style="max-width: ${e(k)}; margin: 0 auto; padding: 0 1rem;">${w}${u}${I}${j}${R}${T}</div></article>`;
140
+ return `<article ${N(t.id)} class="sg-blog-post-detail" style="padding: 0; padding-bottom: 6rem;">${I}<div style="max-width: ${e(k)}; margin: 0 auto; padding: 0 1rem;">${w}${u}${H}${C}${A}${B}</div></article>`;
130
141
  }
131
- function X(t, $, b, C) {
142
+ function Z(t, v, $, z) {
132
143
  const {
133
- title: l,
144
+ title: o,
134
145
  categories: r = [],
135
146
  variant: g = "chips",
136
- showCount: p = !0,
137
- showAll: v = !0,
138
- allLabel: f = "Todas",
139
- activeCategory: n,
140
- filterUrl: o = "#",
141
- borderRadius: h = "0.75rem",
147
+ showCount: h = !0,
148
+ showAll: c = !0,
149
+ allLabel: m = "Todas",
150
+ activeCategory: l,
151
+ filterUrl: a = "#",
152
+ borderRadius: b = "0.75rem",
142
153
  shadow: d = "none",
143
- linkColor: H
144
- } = t.props, z = H || "var(--sg-text)", a = `widget-cat-${t.id || ""}`, k = _(d), P = k !== "none" ? `box-shadow:${k};` : "", m = (u) => u ? e(`${o}?categoria=${u}`) : e(o), y = t.props.linkHoverColor || "", s = t.props.linkHoverEffect || "background", c = t.props.linkHoverIntensity ?? 50;
145
- let S = "";
146
- if (y) {
154
+ linkColor: S
155
+ } = t.props, j = S || "var(--sg-text)", s = `widget-cat-${t.id || ""}`, k = _(d), P = k !== "none" ? `box-shadow:${k};` : "", p = (u) => u ? e(`${a}?categoria=${u}`) : e(a), x = t.props.linkHoverColor || "", n = t.props.linkHoverEffect || "background", f = t.props.linkHoverIntensity ?? 50;
156
+ let I = "";
157
+ if (x) {
147
158
  const u = q({
148
- effect: s,
149
- intensity: c,
150
- hoverColor: y
151
- }), j = u.base ? `#${a} .sg-cat-chip:not(.sg-cat-active), #${a} .sg-cat-btn:not(.sg-cat-active), #${a} .sg-cat-list-item { ${u.base}; transition: all 0.3s ease; }` : `#${a} .sg-cat-chip, #${a} .sg-cat-btn, #${a} .sg-cat-list-item { transition: all 0.3s ease; }`, A = `#${a} .sg-cat-chip:hover:not(.sg-cat-active), #${a} .sg-cat-btn:hover:not(.sg-cat-active), #${a} .sg-cat-list-item:hover { ${u.hover}; transition: all 0.3s ease; }`;
152
- S = `<style>${j}
153
- ${A}</style>`;
159
+ effect: n,
160
+ intensity: f,
161
+ hoverColor: x
162
+ }), C = u.base ? `#${s} .sg-cat-chip:not(.sg-cat-active), #${s} .sg-cat-btn:not(.sg-cat-active), #${s} .sg-cat-list-item { ${u.base}; transition: all 0.3s ease; }` : `#${s} .sg-cat-chip, #${s} .sg-cat-btn, #${s} .sg-cat-list-item { transition: all 0.3s ease; }`, R = `#${s} .sg-cat-chip:hover:not(.sg-cat-active), #${s} .sg-cat-btn:hover:not(.sg-cat-active), #${s} .sg-cat-list-item:hover { ${u.hover}; transition: all 0.3s ease; }`;
163
+ I = `<style>${C}
164
+ ${R}</style>`;
154
165
  } else
155
- S = `<style>
156
- #${a} .sg-cat-chip:hover { opacity:0.8; transform:translateY(-1px); }
157
- #${a} .sg-cat-btn:hover { border-color:var(--sg-primary) !important; color:var(--sg-primary) !important; }
158
- #${a} .sg-cat-list-item:hover { background-color:rgba(0,0,0,0.04); }
166
+ I = `<style>
167
+ #${s} .sg-cat-chip:hover { opacity:0.8; transform:translateY(-1px); }
168
+ #${s} .sg-cat-btn:hover { border-color:var(--sg-primary) !important; color:var(--sg-primary) !important; }
169
+ #${s} .sg-cat-list-item:hover { background-color:rgba(0,0,0,0.04); }
159
170
  </style>`;
160
171
  let w = "";
161
172
  if (g === "chips") {
162
- const u = (i) => `display:inline-flex;align-items:center;gap:0.375rem;padding:0.375rem 0.875rem;border-radius:9999px;font-size:0.875rem;font-weight:500;text-decoration:none;background-color:${i ? "var(--sg-primary)" : "var(--sg-bg)"};color:${i ? "var(--sg-primary-text, #fff)" : z};transition:all 0.2s ease;`, j = v ? `<a href="${e(o)}" class="sg-cat-chip" style="${u(!n)}">${e(f)}</a>` : "", A = r.map((i) => {
163
- const R = n === i.slug, T = p && i.count != null ? `<span style="font-size:0.75rem;opacity:0.7;">(${i.count})</span>` : "";
164
- return `<a href="${m(i.slug)}" class="${R ? "sg-cat-active" : "sg-cat-chip"}" style="${u(R)}">${e(i.name)}${T}</a>`;
173
+ const u = (i) => `display:inline-flex;align-items:center;gap:0.375rem;padding:0.375rem 0.875rem;border-radius:9999px;font-size:0.875rem;font-weight:500;text-decoration:none;background-color:${i ? "var(--sg-primary)" : "var(--sg-bg)"};color:${i ? "var(--sg-primary-text, #fff)" : j};transition:all 0.2s ease;`, C = c ? `<a href="${e(a)}" class="sg-cat-chip" style="${u(!l)}">${e(m)}</a>` : "", R = r.map((i) => {
174
+ const A = l === i.slug, B = h && i.count != null ? `<span style="font-size:0.75rem;opacity:0.7;">(${i.count})</span>` : "";
175
+ return `<a href="${p(i.slug)}" class="${A ? "sg-cat-active" : "sg-cat-chip"}" style="${u(A)}">${e(i.name)}${B}</a>`;
165
176
  }).join("");
166
- w = `<div style="display:flex;flex-wrap:wrap;gap:0.5rem;">${j}${A}</div>`;
177
+ w = `<div style="display:flex;flex-wrap:wrap;gap:0.5rem;">${C}${R}</div>`;
167
178
  } else if (g === "buttons") {
168
- const u = (i) => `display:inline-flex;align-items:center;gap:0.375rem;padding:0.5rem 1rem;border-radius:calc(${h} * 0.6);font-size:0.875rem;font-weight:500;text-decoration:none;border:1px solid ${i ? "var(--sg-primary)" : "var(--sg-border, #e5e7eb)"};background-color:${i ? "var(--sg-primary)" : "transparent"};color:${i ? "var(--sg-primary-text, #fff)" : z};transition:all 0.2s ease;`, j = v ? `<a href="${e(o)}" class="sg-cat-btn" style="${u(!n)}">${e(f)}</a>` : "", A = r.map((i) => {
169
- const R = n === i.slug, T = p && i.count != null ? `<span style="font-size:0.75rem;opacity:0.7;">(${i.count})</span>` : "";
170
- return `<a href="${m(i.slug)}" class="${R ? "sg-cat-active" : "sg-cat-btn"}" style="${u(R)}">${e(i.name)}${T}</a>`;
179
+ const u = (i) => `display:inline-flex;align-items:center;gap:0.375rem;padding:0.5rem 1rem;border-radius:calc(${b} * 0.6);font-size:0.875rem;font-weight:500;text-decoration:none;border:1px solid ${i ? "var(--sg-primary)" : "var(--sg-border, #e5e7eb)"};background-color:${i ? "var(--sg-primary)" : "transparent"};color:${i ? "var(--sg-primary-text, #fff)" : j};transition:all 0.2s ease;`, C = c ? `<a href="${e(a)}" class="sg-cat-btn" style="${u(!l)}">${e(m)}</a>` : "", R = r.map((i) => {
180
+ const A = l === i.slug, B = h && i.count != null ? `<span style="font-size:0.75rem;opacity:0.7;">(${i.count})</span>` : "";
181
+ return `<a href="${p(i.slug)}" class="${A ? "sg-cat-active" : "sg-cat-btn"}" style="${u(A)}">${e(i.name)}${B}</a>`;
171
182
  }).join("");
172
- w = `<div style="display:flex;flex-wrap:wrap;gap:0.5rem;">${j}${A}</div>`;
183
+ w = `<div style="display:flex;flex-wrap:wrap;gap:0.5rem;">${C}${R}</div>`;
173
184
  } else {
174
- const u = (i) => `display:flex;align-items:center;justify-content:space-between;padding:0.625rem 0.75rem;border-radius:calc(${h} * 0.5);font-size:0.875rem;font-weight:${i ? "600" : "400"};text-decoration:none;background-color:${i ? "var(--sg-bg)" : "transparent"};color:${i ? "var(--sg-primary)" : z};transition:all 0.2s ease;`, j = v ? `<a href="${e(o)}" class="sg-cat-list-item" style="${u(!n)}">${e(f)}</a>` : "", A = r.map((i) => {
175
- const R = n === i.slug, T = p && i.count != null ? `<span style="font-size:0.75rem;color:var(--sg-muted-text);background-color:var(--sg-bg);padding:0.125rem 0.5rem;border-radius:9999px;">${i.count}</span>` : "";
176
- return `<a href="${m(i.slug)}" class="sg-cat-list-item" style="${u(R)}">${e(i.name)}${T}</a>`;
185
+ const u = (i) => `display:flex;align-items:center;justify-content:space-between;padding:0.625rem 0.75rem;border-radius:calc(${b} * 0.5);font-size:0.875rem;font-weight:${i ? "600" : "400"};text-decoration:none;background-color:${i ? "var(--sg-bg)" : "transparent"};color:${i ? "var(--sg-primary)" : j};transition:all 0.2s ease;`, C = c ? `<a href="${e(a)}" class="sg-cat-list-item" style="${u(!l)}">${e(m)}</a>` : "", R = r.map((i) => {
186
+ const A = l === i.slug, B = h && i.count != null ? `<span style="font-size:0.75rem;color:var(--sg-muted-text);background-color:var(--sg-bg);padding:0.125rem 0.5rem;border-radius:9999px;">${i.count}</span>` : "";
187
+ return `<a href="${p(i.slug)}" class="sg-cat-list-item" style="${u(A)}">${e(i.name)}${B}</a>`;
177
188
  }).join("");
178
- w = `<div style="display:flex;flex-direction:column;gap:0.125rem;">${j}${A}</div>`;
189
+ w = `<div style="display:flex;flex-direction:column;gap:0.125rem;">${C}${R}</div>`;
179
190
  }
180
- const x = l ? `<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--sg-border, #e5e7eb);"><h3 style="font-size:1rem;font-weight:600;margin:0;color:var(--sg-text);">${e(l)}</h3></div>` : "", I = g === "list" ? "padding:0.5rem 0.75rem;" : "padding:1rem 1.25rem;";
181
- return `${S}<div id="${a}" ${B(t.id)} data-block-group="Conteúdo" style="background-color:var(--sg-surface, var(--sg-bg));border:1px solid var(--sg-border, #e5e7eb);border-radius:${h};${P}overflow:hidden;">${x}<div style="${I}">${w}</div></div>`;
191
+ const y = o ? `<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--sg-border, #e5e7eb);"><h3 style="font-size:1rem;font-weight:600;margin:0;color:var(--sg-text);">${e(o)}</h3></div>` : "", H = g === "list" ? "padding:0.5rem 0.75rem;" : "padding:1rem 1.25rem;";
192
+ return `${I}<div id="${s}" ${N(t.id)} data-block-group="Conteúdo" style="background-color:var(--sg-surface, var(--sg-bg));border:1px solid var(--sg-border, #e5e7eb);border-radius:${b};${P}overflow:hidden;">${y}<div style="${H}">${w}</div></div>`;
182
193
  }
183
- function Z(t, $, b, C) {
194
+ function ee(t, v, $, z) {
184
195
  const {
185
- placeholder: l = "Buscar posts...",
196
+ placeholder: o = "Buscar posts...",
186
197
  variant: r = "simple",
187
198
  showIcon: g = !0,
188
- searchUrl: p = "#",
189
- filterCategories: v = !1,
190
- filterTags: f = !1,
191
- filterDate: n = !1,
192
- borderRadius: o = "0.75rem",
193
- shadow: h = "none"
194
- } = t.props, d = `widget-search-${t.id || ""}`, H = _(h), z = H !== "none" ? `box-shadow:${H};` : "", a = `calc(${o} * 0.6)`, k = `<style>
199
+ searchUrl: h = "#",
200
+ filterCategories: c = !1,
201
+ filterTags: m = !1,
202
+ filterDate: l = !1,
203
+ borderRadius: a = "0.75rem",
204
+ shadow: b = "none"
205
+ } = t.props, d = `widget-search-${t.id || ""}`, S = _(b), j = S !== "none" ? `box-shadow:${S};` : "", s = `calc(${a} * 0.6)`, k = `<style>
195
206
  #${d} input:focus, #${d} select:focus {
196
207
  border-color: var(--sg-primary);
197
208
  box-shadow: 0 0 0 3px rgba(var(--sg-primary-rgb, 59, 130, 246), 0.15);
198
209
  }
199
- </style>`, P = g ? '<svg style="position:absolute;left:0.75rem;top:50%;transform:translateY(-50%);width:1.25rem;height:1.25rem;color:var(--sg-muted-text);" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35" stroke-linecap="round"/></svg>' : "", m = g ? "padding-left:2.5rem;" : "", y = r === "expanded", s = y ? "2px" : "1px", c = y ? "1.0625rem" : "0.875rem", S = y ? "0.875rem" : "0.625rem", w = `width:100%;${m}padding-right:1rem;padding-top:${S};padding-bottom:${S};font-size:${c};border:${s} solid var(--sg-border, #e5e7eb);border-radius:${a};background-color:var(--sg-bg);color:var(--sg-text);outline:none;transition:border-color 0.2s, box-shadow 0.2s;`, x = `padding:0.625rem 0.75rem;font-size:0.875rem;border:1px solid var(--sg-border, #e5e7eb);border-radius:${a};background-color:var(--sg-bg);color:var(--sg-text);transition:border-color 0.2s;`, I = `<div style="position:relative;">${P}<input type="search" name="busca" placeholder="${e(l)}" style="${w}" /></div>`;
200
- let u = I;
210
+ </style>`, P = g ? '<svg style="position:absolute;left:0.75rem;top:50%;transform:translateY(-50%);width:1.25rem;height:1.25rem;color:var(--sg-muted-text);" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35" stroke-linecap="round"/></svg>' : "", p = g ? "padding-left:2.5rem;" : "", x = r === "expanded", n = x ? "2px" : "1px", f = x ? "1.0625rem" : "0.875rem", I = x ? "0.875rem" : "0.625rem", w = `width:100%;${p}padding-right:1rem;padding-top:${I};padding-bottom:${I};font-size:${f};border:${n} solid var(--sg-border, #e5e7eb);border-radius:${s};background-color:var(--sg-bg);color:var(--sg-text);outline:none;transition:border-color 0.2s, box-shadow 0.2s;`, y = `padding:0.625rem 0.75rem;font-size:0.875rem;border:1px solid var(--sg-border, #e5e7eb);border-radius:${s};background-color:var(--sg-bg);color:var(--sg-text);transition:border-color 0.2s;`, H = `<div style="position:relative;">${P}<input type="search" name="busca" placeholder="${e(o)}" style="${w}" /></div>`;
211
+ let u = H;
201
212
  if (r === "with-filters") {
202
- const j = [];
203
- v && j.push(`<select name="categoria" style="${x}"><option value="">Categoria</option></select>`), f && j.push(`<select name="tag" style="${x}"><option value="">Tag</option></select>`), n && j.push(`<select name="periodo" style="${x}"><option value="">Período</option></select>`), u = `${I}<div style="display:flex;flex-wrap:wrap;gap:0.5rem;margin-top:0.75rem;">${j.join("")}</div>`;
213
+ const C = [];
214
+ c && C.push(`<select name="categoria" style="${y}"><option value="">Categoria</option></select>`), m && C.push(`<select name="tag" style="${y}"><option value="">Tag</option></select>`), l && C.push(`<select name="periodo" style="${y}"><option value="">Período</option></select>`), u = `${H}<div style="display:flex;flex-wrap:wrap;gap:0.5rem;margin-top:0.75rem;">${C.join("")}</div>`;
204
215
  }
205
- return `${k}<div id="${d}" ${B(t.id)} data-block-group="Conteúdo" style="background-color:var(--sg-surface, var(--sg-bg));border:1px solid var(--sg-border, #e5e7eb);border-radius:${o};${z}overflow:hidden;"><form action="${e(p)}" method="get" style="padding:1.25rem;">${u}</form></div>`;
216
+ return `${k}<div id="${d}" ${N(t.id)} data-block-group="Conteúdo" style="background-color:var(--sg-surface, var(--sg-bg));border:1px solid var(--sg-border, #e5e7eb);border-radius:${a};${j}overflow:hidden;"><form action="${e(h)}" method="get" style="padding:1.25rem;">${u}</form></div>`;
206
217
  }
207
- function ee(t, $, b, C) {
218
+ function te(t, v, $, z) {
208
219
  const {
209
- title: l = "Posts Recentes",
220
+ title: o = "Posts Recentes",
210
221
  posts: r = [],
211
222
  showThumbnail: g = !0,
212
- showDate: p = !0,
213
- showCategory: v = !1,
214
- borderRadius: f = "0.75rem",
215
- shadow: n = "none",
216
- linkColor: o
217
- } = t.props, h = o || "var(--sg-text)", d = `widget-recent-${t.id || ""}`, H = _(n), z = H !== "none" ? `box-shadow:${H};` : "", a = t.props.linkHoverColor || "", k = t.props.linkHoverEffect || "background", P = t.props.linkHoverIntensity ?? 50;
218
- let m = "";
219
- if (a) {
220
- const c = q({
223
+ showDate: h = !0,
224
+ showCategory: c = !1,
225
+ borderRadius: m = "0.75rem",
226
+ shadow: l = "none",
227
+ linkColor: a
228
+ } = t.props, b = a || "var(--sg-text)", d = `widget-recent-${t.id || ""}`, S = _(l), j = S !== "none" ? `box-shadow:${S};` : "", s = t.props.linkHoverColor || "", k = t.props.linkHoverEffect || "background", P = t.props.linkHoverIntensity ?? 50;
229
+ let p = "";
230
+ if (s) {
231
+ const f = q({
221
232
  effect: k,
222
233
  intensity: P,
223
- hoverColor: a
224
- }), S = c.base ? `#${d} .sg-recent-post { ${c.base}; transition: all 0.3s ease; }` : `#${d} .sg-recent-post { transition: all 0.3s ease; }`, w = `#${d} .sg-recent-post:hover { ${c.hover}; transition: all 0.3s ease; }
225
- #${d} .sg-recent-post:hover .sg-recent-title { color: ${a}; }`;
226
- m = `<style>${S}
234
+ hoverColor: s
235
+ }), I = f.base ? `#${d} .sg-recent-post { ${f.base}; transition: all 0.3s ease; }` : `#${d} .sg-recent-post { transition: all 0.3s ease; }`, w = `#${d} .sg-recent-post:hover { ${f.hover}; transition: all 0.3s ease; }
236
+ #${d} .sg-recent-post:hover .sg-recent-title { color: ${s}; }`;
237
+ p = `<style>${I}
227
238
  ${w}</style>`;
228
239
  } else
229
- m = `<style>
240
+ p = `<style>
230
241
  #${d} .sg-recent-post:hover { background-color:rgba(0,0,0,0.04); }
231
242
  #${d} .sg-recent-post:hover .sg-recent-title { color:var(--sg-primary); }
232
243
  </style>`;
233
- const y = l ? `<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--sg-border, #e5e7eb);"><h3 style="font-size:1rem;font-weight:600;margin:0;color:var(--sg-text);">${e(l)}</h3></div>` : "";
234
- let s = "";
235
- return r.length === 0 ? s = '<p style="padding:1.5rem 1.25rem;color:var(--sg-muted-text);font-size:0.875rem;text-align:center;margin:0;">Nenhum post recente</p>' : s = r.map((c) => {
236
- const S = g && c.image ? `<img src="${e(c.image)}" alt="${e(c.title)}" style="width:64px;height:64px;object-fit:cover;border-radius:calc(${f} * 0.5);flex-shrink:0;" />` : "", w = [];
237
- p && c.date && w.push(e(c.date)), v && c.category && w.push(`<span style="font-size:0.6875rem;color:var(--sg-primary);font-weight:600;text-transform:uppercase;letter-spacing:0.03em;">${e(c.category)}</span>`);
238
- const x = w.length ? `<div style="display:flex;align-items:center;gap:0.5rem;margin-top:0.25rem;font-size:0.75rem;color:var(--sg-muted-text);">${w.join("")}</div>` : "";
239
- return `<a href="/site/p/blog/${e(c.slug)}" class="sg-recent-post" style="display:flex;align-items:center;gap:0.75rem;padding:0.75rem 1.25rem;text-decoration:none;color:inherit;transition:background-color 0.2s;">${S}<div style="flex:1;min-width:0;"><div class="sg-recent-title" style="font-size:0.875rem;font-weight:500;color:${h};line-height:1.4;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;transition:color 0.2s;">${e(c.title)}</div>${x}</div></a>`;
240
- }).join(""), `${m}<div id="${d}" ${B(t.id)} data-block-group="Conteúdo" style="background-color:var(--sg-surface, var(--sg-bg));border-radius:${f};border:1px solid var(--sg-border, #e5e7eb);${z}overflow:hidden;">${y}<div style="padding:0.5rem 0;">${s}</div></div>`;
244
+ const x = o ? `<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--sg-border, #e5e7eb);"><h3 style="font-size:1rem;font-weight:600;margin:0;color:var(--sg-text);">${e(o)}</h3></div>` : "";
245
+ let n = "";
246
+ return r.length === 0 ? n = '<p style="padding:1.5rem 1.25rem;color:var(--sg-muted-text);font-size:0.875rem;text-align:center;margin:0;">Nenhum post recente</p>' : n = r.map((f) => {
247
+ const I = g && f.image ? `<img src="${e(f.image)}" alt="${e(f.title)}" style="width:64px;height:64px;object-fit:cover;border-radius:calc(${m} * 0.5);flex-shrink:0;" />` : "", w = [];
248
+ h && f.date && w.push(e(f.date)), c && f.category && w.push(`<span style="font-size:0.6875rem;color:var(--sg-primary);font-weight:600;text-transform:uppercase;letter-spacing:0.03em;">${e(f.category)}</span>`);
249
+ const y = w.length ? `<div style="display:flex;align-items:center;gap:0.5rem;margin-top:0.25rem;font-size:0.75rem;color:var(--sg-muted-text);">${w.join("")}</div>` : "";
250
+ return `<a href="/site/p/blog/${e(f.slug)}" class="sg-recent-post" style="display:flex;align-items:center;gap:0.75rem;padding:0.75rem 1.25rem;text-decoration:none;color:inherit;transition:background-color 0.2s;">${I}<div style="flex:1;min-width:0;"><div class="sg-recent-title" style="font-size:0.875rem;font-weight:500;color:${b};line-height:1.4;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;transition:color 0.2s;">${e(f.title)}</div>${y}</div></a>`;
251
+ }).join(""), `${p}<div id="${d}" ${N(t.id)} data-block-group="Conteúdo" style="background-color:var(--sg-surface, var(--sg-bg));border-radius:${m};border:1px solid var(--sg-border, #e5e7eb);${j}overflow:hidden;">${x}<div style="padding:0.5rem 0;">${n}</div></div>`;
241
252
  }
242
- function te(t, $, b, C) {
253
+ function re(t, v, $, z) {
243
254
  const {
244
- title: l = "Tags",
255
+ title: o = "Tags",
245
256
  tags: r = [],
246
257
  variant: g = "badges",
247
- borderRadius: p = "0.75rem",
248
- shadow: v = "none",
249
- linkColor: f
250
- } = t.props, n = f || "var(--sg-text)", o = `widget-tags-${t.id || ""}`, h = _(v), d = h !== "none" ? `box-shadow:${h};` : "", H = t.props.linkHoverColor || "", z = t.props.linkHoverEffect || "background", a = t.props.linkHoverIntensity ?? 50;
258
+ borderRadius: h = "0.75rem",
259
+ shadow: c = "none",
260
+ linkColor: m
261
+ } = t.props, l = m || "var(--sg-text)", a = `widget-tags-${t.id || ""}`, b = _(c), d = b !== "none" ? `box-shadow:${b};` : "", S = t.props.linkHoverColor || "", j = t.props.linkHoverEffect || "background", s = t.props.linkHoverIntensity ?? 50;
251
262
  let k = "";
252
- if (H) {
253
- const y = q({
254
- effect: z,
255
- intensity: a,
256
- hoverColor: H
257
- }), s = y.base ? `#${o} .sg-tag-badge, #${o} .sg-tag-list-item { ${y.base}; transition: all 0.3s ease; }` : `#${o} .sg-tag-badge, #${o} .sg-tag-list-item { transition: all 0.3s ease; }`, c = `#${o} .sg-tag-badge:hover, #${o} .sg-tag-list-item:hover { ${y.hover}; transition: all 0.3s ease; }`;
258
- k = `<style>${s}
259
- ${c}</style>`;
263
+ if (S) {
264
+ const x = q({
265
+ effect: j,
266
+ intensity: s,
267
+ hoverColor: S
268
+ }), n = x.base ? `#${a} .sg-tag-badge, #${a} .sg-tag-list-item { ${x.base}; transition: all 0.3s ease; }` : `#${a} .sg-tag-badge, #${a} .sg-tag-list-item { transition: all 0.3s ease; }`, f = `#${a} .sg-tag-badge:hover, #${a} .sg-tag-list-item:hover { ${x.hover}; transition: all 0.3s ease; }`;
269
+ k = `<style>${n}
270
+ ${f}</style>`;
260
271
  } else
261
272
  k = `<style>
262
- #${o} .sg-tag-badge:hover { opacity:0.8; transform:translateY(-1px); }
263
- #${o} .sg-tag-list-item:hover { background-color:rgba(0,0,0,0.04); }
273
+ #${a} .sg-tag-badge:hover { opacity:0.8; transform:translateY(-1px); }
274
+ #${a} .sg-tag-list-item:hover { background-color:rgba(0,0,0,0.04); }
264
275
  </style>`;
265
- const P = l ? `<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--sg-border, #e5e7eb);"><h3 style="font-size:1rem;font-weight:600;margin:0;color:var(--sg-text);">${e(l)}</h3></div>` : "";
266
- let m = "";
267
- return r.length === 0 ? m = '<p style="color:var(--sg-muted-text);font-size:0.875rem;text-align:center;margin:0;">Nenhuma tag encontrada</p>' : g === "badges" ? m = `<div style="display:flex;flex-wrap:wrap;gap:0.5rem;">${r.map(
268
- (s) => `<span class="sg-tag-badge" style="display:inline-flex;align-items:center;gap:0.375rem;padding:0.3rem 0.75rem;border-radius:9999px;font-size:0.8125rem;font-weight:500;background-color:var(--sg-bg);color:${n};cursor:pointer;transition:all 0.2s ease;">${e(s.name)}<span style="font-size:0.6875rem;color:var(--sg-muted-text);opacity:0.7;">(${s.count})</span></span>`
269
- ).join("")}</div>` : m = `<div style="display:flex;flex-direction:column;gap:0.25rem;">${r.map(
270
- (s) => `<div class="sg-tag-list-item" style="display:flex;align-items:center;justify-content:space-between;padding:0.5rem 0.75rem;border-radius:calc(${p} * 0.5);font-size:0.875rem;color:${n};cursor:pointer;transition:background-color 0.2s;"><span>${e(s.name)}</span><span style="font-size:0.75rem;color:var(--sg-muted-text);background-color:var(--sg-bg);padding:0.125rem 0.5rem;border-radius:9999px;">${s.count}</span></div>`
271
- ).join("")}</div>`, `${k}<div id="${o}" ${B(t.id)} data-block-group="Conteúdo" style="background-color:var(--sg-surface, var(--sg-bg));border-radius:${p};border:1px solid var(--sg-border, #e5e7eb);${d}overflow:hidden;">${P}<div style="padding:1rem 1.25rem;">${m}</div></div>`;
276
+ const P = o ? `<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--sg-border, #e5e7eb);"><h3 style="font-size:1rem;font-weight:600;margin:0;color:var(--sg-text);">${e(o)}</h3></div>` : "";
277
+ let p = "";
278
+ return r.length === 0 ? p = '<p style="color:var(--sg-muted-text);font-size:0.875rem;text-align:center;margin:0;">Nenhuma tag encontrada</p>' : g === "badges" ? p = `<div style="display:flex;flex-wrap:wrap;gap:0.5rem;">${r.map(
279
+ (n) => `<span class="sg-tag-badge" style="display:inline-flex;align-items:center;gap:0.375rem;padding:0.3rem 0.75rem;border-radius:9999px;font-size:0.8125rem;font-weight:500;background-color:var(--sg-bg);color:${l};cursor:pointer;transition:all 0.2s ease;">${e(n.name)}<span style="font-size:0.6875rem;color:var(--sg-muted-text);opacity:0.7;">(${n.count})</span></span>`
280
+ ).join("")}</div>` : p = `<div style="display:flex;flex-direction:column;gap:0.25rem;">${r.map(
281
+ (n) => `<div class="sg-tag-list-item" style="display:flex;align-items:center;justify-content:space-between;padding:0.5rem 0.75rem;border-radius:calc(${h} * 0.5);font-size:0.875rem;color:${l};cursor:pointer;transition:background-color 0.2s;"><span>${e(n.name)}</span><span style="font-size:0.75rem;color:var(--sg-muted-text);background-color:var(--sg-bg);padding:0.125rem 0.5rem;border-radius:9999px;">${n.count}</span></div>`
282
+ ).join("")}</div>`, `${k}<div id="${a}" ${N(t.id)} data-block-group="Conteúdo" style="background-color:var(--sg-surface, var(--sg-bg));border-radius:${h};border:1px solid var(--sg-border, #e5e7eb);${d}overflow:hidden;">${P}<div style="padding:1rem 1.25rem;">${p}</div></div>`;
272
283
  }
273
284
  export {
274
- X as exportBlogCategoryFilter,
275
- Q as exportBlogPostCard,
276
- K as exportBlogPostDetail,
277
- J as exportBlogPostGrid,
278
- ee as exportBlogRecentPosts,
279
- Z as exportBlogSearchBar,
280
- te as exportBlogTagCloud
285
+ Z as exportBlogCategoryFilter,
286
+ J as exportBlogPostCard,
287
+ X as exportBlogPostDetail,
288
+ K as exportBlogPostGrid,
289
+ te as exportBlogRecentPosts,
290
+ ee as exportBlogSearchBar,
291
+ re as exportBlogTagCloud
281
292
  };
282
293
  //# sourceMappingURL=BlogPostExporters.js.map