@brunoalz/smartgesti-site-editor 1.7.0 → 1.9.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.
- package/dist/engine/export/exporters/sections/BlogPostExporters.d.ts.map +1 -1
- package/dist/engine/export/exporters/sections/BlogPostExporters.js +585 -227
- package/dist/engine/export/exporters/sections/BlogPostExporters.js.map +1 -1
- package/dist/engine/plugins/builtin/blog/manifest.d.ts.map +1 -1
- package/dist/engine/plugins/builtin/blog/manifest.js +264 -112
- package/dist/engine/plugins/builtin/blog/manifest.js.map +1 -1
- package/dist/engine/plugins/contentHydration.js +93 -77
- package/dist/engine/plugins/contentHydration.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogCategoryFilter.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogCategoryFilter.js +0 -1
- package/dist/engine/registry/blocks/sections/blogCategoryFilter.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogPostGrid.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogPostGrid.js +321 -6
- package/dist/engine/registry/blocks/sections/blogPostGrid.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogRecentPosts.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogRecentPosts.js +11 -2
- package/dist/engine/registry/blocks/sections/blogRecentPosts.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogTagCloud.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogTagCloud.js +0 -1
- package/dist/engine/registry/blocks/sections/blogTagCloud.js.map +1 -1
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.js +35 -33
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.js +251 -66
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/BlogRecentPostsRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/BlogRecentPostsRenderer.js +31 -30
- package/dist/engine/render/renderers/sections/BlogRecentPostsRenderer.js.map +1 -1
- package/dist/engine/schema/siteDocument.d.ts +36 -1
- package/dist/engine/schema/siteDocument.d.ts.map +1 -1
- package/dist/engine/schema/siteDocument.js.map +1 -1
- package/dist/engine/shared/iconUtils.d.ts +25 -0
- package/dist/engine/shared/iconUtils.d.ts.map +1 -0
- package/dist/engine/shared/iconUtils.js +43 -0
- package/dist/engine/shared/iconUtils.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
function
|
|
2
|
+
function I(s) {
|
|
3
3
|
const {
|
|
4
|
-
title:
|
|
5
|
-
excerpt:
|
|
6
|
-
image:
|
|
7
|
-
date:
|
|
4
|
+
title: n,
|
|
5
|
+
excerpt: m,
|
|
6
|
+
image: d,
|
|
7
|
+
date: l,
|
|
8
8
|
category: c,
|
|
9
9
|
authorName: i,
|
|
10
10
|
authorAvatar: h,
|
|
11
|
-
readingTime:
|
|
11
|
+
readingTime: a,
|
|
12
12
|
linkHref: o,
|
|
13
13
|
linkText: g = "Ler mais",
|
|
14
14
|
variant: p = "default",
|
|
15
|
-
showImage:
|
|
16
|
-
showCategory:
|
|
15
|
+
showImage: u = !0,
|
|
16
|
+
showCategory: v = !0,
|
|
17
17
|
showDate: f = !0,
|
|
18
|
-
showAuthor:
|
|
18
|
+
showAuthor: x = !0,
|
|
19
19
|
showReadingTime: y = !0
|
|
20
20
|
} = s.props, r = p === "horizontal";
|
|
21
21
|
return /* @__PURE__ */ t(
|
|
@@ -23,13 +23,14 @@ function T(s) {
|
|
|
23
23
|
{
|
|
24
24
|
style: {
|
|
25
25
|
backgroundColor: "var(--sg-surface)",
|
|
26
|
-
borderRadius: "
|
|
27
|
-
boxShadow: "
|
|
26
|
+
borderRadius: "0.75rem",
|
|
27
|
+
boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
28
|
+
border: "1px solid var(--sg-border, #e5e7eb)",
|
|
28
29
|
overflow: "hidden",
|
|
29
30
|
display: r ? "flex" : "block"
|
|
30
31
|
},
|
|
31
32
|
children: [
|
|
32
|
-
|
|
33
|
+
u && !(p === "minimal") && d ? /* @__PURE__ */ e(
|
|
33
34
|
"div",
|
|
34
35
|
{
|
|
35
36
|
style: {
|
|
@@ -38,13 +39,13 @@ function T(s) {
|
|
|
38
39
|
minHeight: r ? "200px" : void 0,
|
|
39
40
|
flexShrink: 0,
|
|
40
41
|
overflow: "hidden",
|
|
41
|
-
borderRadius: r ? "
|
|
42
|
+
borderRadius: r ? "0.75rem 0 0 0.75rem" : "0.75rem 0.75rem 0 0"
|
|
42
43
|
},
|
|
43
44
|
children: /* @__PURE__ */ e(
|
|
44
45
|
"img",
|
|
45
46
|
{
|
|
46
|
-
src:
|
|
47
|
-
alt:
|
|
47
|
+
src: d,
|
|
48
|
+
alt: n,
|
|
48
49
|
style: {
|
|
49
50
|
width: "100%",
|
|
50
51
|
height: "100%",
|
|
@@ -65,7 +66,7 @@ function T(s) {
|
|
|
65
66
|
flex: 1
|
|
66
67
|
},
|
|
67
68
|
children: [
|
|
68
|
-
|
|
69
|
+
v && c && /* @__PURE__ */ e(
|
|
69
70
|
"span",
|
|
70
71
|
{
|
|
71
72
|
style: {
|
|
@@ -97,12 +98,12 @@ function T(s) {
|
|
|
97
98
|
color: "inherit",
|
|
98
99
|
textDecoration: "none"
|
|
99
100
|
},
|
|
100
|
-
children:
|
|
101
|
+
children: n
|
|
101
102
|
}
|
|
102
|
-
) :
|
|
103
|
+
) : n
|
|
103
104
|
}
|
|
104
105
|
),
|
|
105
|
-
|
|
106
|
+
m && /* @__PURE__ */ e(
|
|
106
107
|
"p",
|
|
107
108
|
{
|
|
108
109
|
style: {
|
|
@@ -112,7 +113,7 @@ function T(s) {
|
|
|
112
113
|
marginBottom: "1rem",
|
|
113
114
|
flex: 1
|
|
114
115
|
},
|
|
115
|
-
children:
|
|
116
|
+
children: m
|
|
116
117
|
}
|
|
117
118
|
),
|
|
118
119
|
/* @__PURE__ */ t(
|
|
@@ -126,7 +127,7 @@ function T(s) {
|
|
|
126
127
|
flexWrap: "wrap"
|
|
127
128
|
},
|
|
128
129
|
children: [
|
|
129
|
-
|
|
130
|
+
x && i && /* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
|
|
130
131
|
h && /* @__PURE__ */ e(
|
|
131
132
|
"img",
|
|
132
133
|
{
|
|
@@ -142,25 +143,25 @@ function T(s) {
|
|
|
142
143
|
),
|
|
143
144
|
/* @__PURE__ */ e("span", { style: { fontSize: "0.875rem", fontWeight: 500 }, children: i })
|
|
144
145
|
] }),
|
|
145
|
-
|
|
146
|
-
f &&
|
|
146
|
+
x && i && (f && l || y && a) && /* @__PURE__ */ e("span", { style: { color: "var(--sg-muted-text)", fontSize: "0.75rem" }, children: "·" }),
|
|
147
|
+
f && l && /* @__PURE__ */ e(
|
|
147
148
|
"span",
|
|
148
149
|
{
|
|
149
150
|
style: {
|
|
150
151
|
color: "var(--sg-muted-text)",
|
|
151
152
|
fontSize: "0.8125rem"
|
|
152
153
|
},
|
|
153
|
-
children:
|
|
154
|
+
children: l
|
|
154
155
|
}
|
|
155
156
|
),
|
|
156
|
-
y &&
|
|
157
|
+
y && a && /* @__PURE__ */ e(
|
|
157
158
|
"span",
|
|
158
159
|
{
|
|
159
160
|
style: {
|
|
160
161
|
color: "var(--sg-muted-text)",
|
|
161
162
|
fontSize: "0.8125rem"
|
|
162
163
|
},
|
|
163
|
-
children:
|
|
164
|
+
children: a
|
|
164
165
|
}
|
|
165
166
|
)
|
|
166
167
|
]
|
|
@@ -171,17 +172,18 @@ function T(s) {
|
|
|
171
172
|
{
|
|
172
173
|
href: o,
|
|
173
174
|
style: {
|
|
174
|
-
display: "inline-block",
|
|
175
|
-
marginTop: "1rem",
|
|
176
175
|
color: "var(--sg-primary)",
|
|
177
|
-
fontWeight:
|
|
176
|
+
fontWeight: 600,
|
|
177
|
+
textDecoration: "none",
|
|
178
178
|
fontSize: "0.875rem",
|
|
179
|
-
|
|
179
|
+
marginTop: "1rem",
|
|
180
|
+
display: "inline-flex",
|
|
181
|
+
alignItems: "center",
|
|
182
|
+
gap: "0.25rem"
|
|
180
183
|
},
|
|
181
184
|
children: [
|
|
182
185
|
g,
|
|
183
|
-
" "
|
|
184
|
-
"→"
|
|
186
|
+
" →"
|
|
185
187
|
]
|
|
186
188
|
}
|
|
187
189
|
)
|
|
@@ -194,6 +196,6 @@ function T(s) {
|
|
|
194
196
|
);
|
|
195
197
|
}
|
|
196
198
|
export {
|
|
197
|
-
|
|
199
|
+
I as renderBlogPostCard
|
|
198
200
|
};
|
|
199
201
|
//# sourceMappingURL=BlogPostCardRenderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogPostCardRenderer.js","sources":["../../../../../src/engine/render/renderers/sections/BlogPostCardRenderer.tsx"],"sourcesContent":["/**\n * BlogPostCard Renderer\n * Renderiza card individual de post de blog\n * Variantes: default (vertical), horizontal (imagem esquerda), minimal (sem imagem)\n */\n\nimport React from \"react\";\n\nexport function renderBlogPostCard(block: any): React.ReactNode {\n const {\n title,\n excerpt,\n image,\n date,\n category,\n authorName,\n authorAvatar,\n readingTime,\n linkHref,\n linkText = \"Ler mais\",\n variant = \"default\",\n showImage = true,\n showCategory = true,\n showDate = true,\n showAuthor = true,\n showReadingTime = true,\n } = block.props;\n\n const isHorizontal = variant === \"horizontal\";\n const isMinimal = variant === \"minimal\";\n const shouldShowImage = showImage && !isMinimal && image;\n\n const imageElement = shouldShowImage ? (\n <div\n style={{\n width: isHorizontal ? \"40%\" : \"100%\",\n height: isHorizontal ? \"100%\" : \"200px\",\n minHeight: isHorizontal ? \"200px\" : undefined,\n flexShrink: 0,\n overflow: \"hidden\",\n borderRadius: isHorizontal
|
|
1
|
+
{"version":3,"file":"BlogPostCardRenderer.js","sources":["../../../../../src/engine/render/renderers/sections/BlogPostCardRenderer.tsx"],"sourcesContent":["/**\n * BlogPostCard Renderer\n * Renderiza card individual de post de blog\n * Variantes: default (vertical), horizontal (imagem esquerda), minimal (sem imagem)\n *\n * NOTA: Este renderer não é usado no preview do editor (que usa exportPageToHtml).\n * Mantido para compatibilidade ou uso futuro.\n */\n\nimport React from \"react\";\n\nexport function renderBlogPostCard(block: any): React.ReactNode {\n const {\n title,\n excerpt,\n image,\n date,\n category,\n authorName,\n authorAvatar,\n readingTime,\n linkHref,\n linkText = \"Ler mais\",\n variant = \"default\",\n showImage = true,\n showCategory = true,\n showDate = true,\n showAuthor = true,\n showReadingTime = true,\n } = block.props;\n\n const isHorizontal = variant === \"horizontal\";\n const isMinimal = variant === \"minimal\";\n const shouldShowImage = showImage && !isMinimal && image;\n\n // Image element\n const imageElement = shouldShowImage ? (\n <div\n style={{\n width: isHorizontal ? \"40%\" : \"100%\",\n height: isHorizontal ? \"100%\" : \"200px\",\n minHeight: isHorizontal ? \"200px\" : undefined,\n flexShrink: 0,\n overflow: \"hidden\",\n borderRadius: isHorizontal ? \"0.75rem 0 0 0.75rem\" : \"0.75rem 0.75rem 0 0\",\n }}\n >\n <img\n src={image}\n alt={title}\n style={{\n width: \"100%\",\n height: \"100%\",\n objectFit: \"cover\",\n display: \"block\",\n }}\n />\n </div>\n ) : null;\n\n // Content element\n const contentElement = (\n <div\n style={{\n padding: \"1.5rem\",\n display: \"flex\",\n flexDirection: \"column\",\n flex: 1,\n }}\n >\n {/* Category badge */}\n {showCategory && category && (\n <span\n style={{\n display: \"inline-block\",\n fontSize: \"0.75rem\",\n fontWeight: 600,\n color: \"var(--sg-primary)\",\n textTransform: \"uppercase\",\n letterSpacing: \"0.05em\",\n marginBottom: \"0.5rem\",\n }}\n >\n {category}\n </span>\n )}\n\n {/* Title */}\n <h3\n style={{\n fontSize: \"1.25rem\",\n fontWeight: 600,\n marginBottom: \"0.5rem\",\n lineHeight: 1.3,\n }}\n >\n {linkHref ? (\n <a\n href={linkHref}\n style={{\n color: \"inherit\",\n textDecoration: \"none\",\n }}\n >\n {title}\n </a>\n ) : (\n title\n )}\n </h3>\n\n {/* Excerpt */}\n {excerpt && (\n <p\n style={{\n color: \"var(--sg-muted-text)\",\n fontSize: \"0.9375rem\",\n lineHeight: 1.6,\n marginBottom: \"1rem\",\n flex: 1,\n }}\n >\n {excerpt}\n </p>\n )}\n\n {/* Meta row: author + date + reading time */}\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"0.75rem\",\n marginTop: \"auto\",\n flexWrap: \"wrap\",\n }}\n >\n {/* Author */}\n {showAuthor && authorName && (\n <div style={{ display: \"flex\", alignItems: \"center\", gap: \"0.5rem\" }}>\n {authorAvatar && (\n <img\n src={authorAvatar}\n alt={authorName}\n style={{\n width: \"1.75rem\",\n height: \"1.75rem\",\n borderRadius: \"50%\",\n objectFit: \"cover\",\n }}\n />\n )}\n <span style={{ fontSize: \"0.875rem\", fontWeight: 500 }}>\n {authorName}\n </span>\n </div>\n )}\n\n {/* Separator dot */}\n {showAuthor && authorName && ((showDate && date) || (showReadingTime && readingTime)) && (\n <span style={{ color: \"var(--sg-muted-text)\", fontSize: \"0.75rem\" }}>\n {\"\\u00B7\"}\n </span>\n )}\n\n {/* Date */}\n {showDate && date && (\n <span\n style={{\n color: \"var(--sg-muted-text)\",\n fontSize: \"0.8125rem\",\n }}\n >\n {date}\n </span>\n )}\n\n {/* Reading time */}\n {showReadingTime && readingTime && (\n <span\n style={{\n color: \"var(--sg-muted-text)\",\n fontSize: \"0.8125rem\",\n }}\n >\n {readingTime}\n </span>\n )}\n </div>\n\n {/* Read more link */}\n {linkHref && linkText && (\n <a\n href={linkHref}\n style={{\n color: \"var(--sg-primary)\",\n fontWeight: 600,\n textDecoration: \"none\",\n fontSize: \"0.875rem\",\n marginTop: \"1rem\",\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: \"0.25rem\",\n }}\n >\n {linkText} →\n </a>\n )}\n </div>\n );\n\n return (\n <article\n key={block.id}\n style={{\n backgroundColor: \"var(--sg-surface)\",\n borderRadius: \"0.75rem\",\n boxShadow: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\n border: \"1px solid var(--sg-border, #e5e7eb)\",\n overflow: \"hidden\",\n display: isHorizontal ? \"flex\" : \"block\",\n }}\n >\n {imageElement}\n {contentElement}\n </article>\n );\n}\n"],"names":["renderBlogPostCard","block","title","excerpt","image","date","category","authorName","authorAvatar","readingTime","linkHref","linkText","variant","showImage","showCategory","showDate","showAuthor","showReadingTime","isHorizontal","jsxs","jsx"],"mappings":";AAWO,SAASA,EAAmBC,GAA6B;AAC9D,QAAM;AAAA,IACJ,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,SAAAC,IAAU;AAAA,IACV,WAAAC,IAAY;AAAA,IACZ,cAAAC,IAAe;AAAA,IACf,UAAAC,IAAW;AAAA,IACX,YAAAC,IAAa;AAAA,IACb,iBAAAC,IAAkB;AAAA,EAAA,IAChBhB,EAAM,OAEJiB,IAAeN,MAAY;AAmLjC,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MAEC,OAAO;AAAA,QACL,iBAAiB;AAAA,QACjB,cAAc;AAAA,QACd,WAAW;AAAA,QACX,QAAQ;AAAA,QACR,UAAU;AAAA,QACV,SAASD,IAAe,SAAS;AAAA,MAAA;AAAA,MAGlC,UAAA;AAAA,QA7LmBL,KAAa,EADnBD,MAAY,cACqBR,IAIjD,gBAAAgB;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KAAmBR,KAClB,gBAAAW;AAAA,sBAAC;AAAA,sBAAA;AAAA,wBACC,OAAO;AAAA,0BACL,OAAO;AAAA,0BACP,UAAU;AAAA,wBAAA;AAAA,wBAGX,UAAAX;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBACH;AAAA,gBAAA;AAAA,cAAA;AAAA,cAKHC,KAAYC,KACX,gBAAAQ;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,MAAMT;AAAA,kBACN,OAAO;AAAA,oBACL,OAAO;AAAA,oBACP,YAAY;AAAA,oBACZ,gBAAgB;AAAA,oBAChB,UAAU;AAAA,oBACV,WAAW;AAAA,oBACX,SAAS;AAAA,oBACT,YAAY;AAAA,oBACZ,KAAK;AAAA,kBAAA;AAAA,kBAGN,UAAA;AAAA,oBAAAC;AAAA,oBAAS;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAAA;AAAA,YACZ;AAAA,UAAA;AAAA,QAAA;AAAA,MAkBD;AAAA,IAAA;AAAA,IAXIV,EAAM;AAAA,EAAA;AAcjB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogPostGridRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/engine/render/renderers/sections/BlogPostGridRenderer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BlogPostGridRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/engine/render/renderers/sections/BlogPostGridRenderer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AA8J1B,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,CAAC,SAAS,CAgT9D"}
|
|
@@ -1,80 +1,265 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { renderBlogPostCard as
|
|
3
|
-
function
|
|
4
|
-
if (
|
|
5
|
-
const
|
|
6
|
-
return `${
|
|
1
|
+
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { renderBlogPostCard as A } from "./BlogPostCardRenderer.js";
|
|
3
|
+
function y(e, t) {
|
|
4
|
+
if (t <= 1) return e;
|
|
5
|
+
const i = e.includes("?") ? "&" : "?";
|
|
6
|
+
return `${e}${i}pagina=${t}`;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
if (
|
|
10
|
-
return Array.from({ length:
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
for (let
|
|
15
|
-
return
|
|
8
|
+
function H(e, t) {
|
|
9
|
+
if (t <= 7)
|
|
10
|
+
return Array.from({ length: t }, (a, c) => c + 1);
|
|
11
|
+
const i = [1];
|
|
12
|
+
e > 3 && i.push(-1);
|
|
13
|
+
const g = Math.max(2, e - 1), s = Math.min(t - 1, e + 1);
|
|
14
|
+
for (let a = g; a <= s; a++) i.push(a);
|
|
15
|
+
return e < t - 2 && i.push(-1), i[i.length - 1] !== t && i.push(t), i;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function P(e, t) {
|
|
18
|
+
return /* @__PURE__ */ l(
|
|
19
|
+
"a",
|
|
20
|
+
{
|
|
21
|
+
href: e.linkHref || "#",
|
|
22
|
+
"data-block-group": "Post em Destaque",
|
|
23
|
+
style: {
|
|
24
|
+
display: "block",
|
|
25
|
+
position: "relative",
|
|
26
|
+
width: "100%",
|
|
27
|
+
minHeight: "420px",
|
|
28
|
+
borderRadius: "var(--sg-card-radius, 0.75rem)",
|
|
29
|
+
overflow: "hidden",
|
|
30
|
+
marginBottom: "2.5rem",
|
|
31
|
+
textDecoration: "none",
|
|
32
|
+
color: "#fff",
|
|
33
|
+
backgroundColor: "#1a1a2e"
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
e.image && /* @__PURE__ */ r(
|
|
37
|
+
"img",
|
|
38
|
+
{
|
|
39
|
+
src: e.image,
|
|
40
|
+
alt: e.title || "",
|
|
41
|
+
style: {
|
|
42
|
+
position: "absolute",
|
|
43
|
+
top: 0,
|
|
44
|
+
left: 0,
|
|
45
|
+
width: "100%",
|
|
46
|
+
height: "100%",
|
|
47
|
+
objectFit: "cover"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ r(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
style: {
|
|
55
|
+
position: "absolute",
|
|
56
|
+
inset: 0,
|
|
57
|
+
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%)"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
/* @__PURE__ */ l(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
style: {
|
|
65
|
+
position: "absolute",
|
|
66
|
+
bottom: 0,
|
|
67
|
+
left: 0,
|
|
68
|
+
right: 0,
|
|
69
|
+
padding: "2rem 2.5rem"
|
|
70
|
+
},
|
|
71
|
+
children: [
|
|
72
|
+
e.category && /* @__PURE__ */ r(
|
|
73
|
+
"span",
|
|
74
|
+
{
|
|
75
|
+
style: {
|
|
76
|
+
display: "inline-block",
|
|
77
|
+
padding: "0.25rem 0.75rem",
|
|
78
|
+
backgroundColor: "var(--sg-primary)",
|
|
79
|
+
color: "var(--sg-primary-text, #fff)",
|
|
80
|
+
fontSize: "0.75rem",
|
|
81
|
+
fontWeight: 600,
|
|
82
|
+
textTransform: "uppercase",
|
|
83
|
+
letterSpacing: "0.05em",
|
|
84
|
+
borderRadius: "0.25rem",
|
|
85
|
+
marginBottom: "0.75rem"
|
|
86
|
+
},
|
|
87
|
+
children: e.category
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ r(
|
|
91
|
+
"h2",
|
|
92
|
+
{
|
|
93
|
+
style: {
|
|
94
|
+
fontSize: "2rem",
|
|
95
|
+
fontWeight: 700,
|
|
96
|
+
lineHeight: 1.2,
|
|
97
|
+
marginBottom: "0.5rem",
|
|
98
|
+
color: "#fff"
|
|
99
|
+
},
|
|
100
|
+
children: e.title
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
e.excerpt && /* @__PURE__ */ r(
|
|
104
|
+
"p",
|
|
105
|
+
{
|
|
106
|
+
style: {
|
|
107
|
+
fontSize: "1rem",
|
|
108
|
+
lineHeight: 1.5,
|
|
109
|
+
color: "rgba(255,255,255,0.85)",
|
|
110
|
+
marginBottom: "0.75rem",
|
|
111
|
+
maxWidth: "600px"
|
|
112
|
+
},
|
|
113
|
+
children: e.excerpt
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
/* @__PURE__ */ l(
|
|
117
|
+
"div",
|
|
118
|
+
{
|
|
119
|
+
style: {
|
|
120
|
+
display: "flex",
|
|
121
|
+
alignItems: "center",
|
|
122
|
+
gap: "0.5rem",
|
|
123
|
+
fontSize: "0.875rem",
|
|
124
|
+
color: "rgba(255,255,255,0.8)"
|
|
125
|
+
},
|
|
126
|
+
children: [
|
|
127
|
+
e.authorAvatar && /* @__PURE__ */ r(
|
|
128
|
+
"img",
|
|
129
|
+
{
|
|
130
|
+
src: e.authorAvatar,
|
|
131
|
+
alt: e.authorName || "",
|
|
132
|
+
style: {
|
|
133
|
+
width: "1.75rem",
|
|
134
|
+
height: "1.75rem",
|
|
135
|
+
borderRadius: "50%",
|
|
136
|
+
objectFit: "cover"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
e.authorName && /* @__PURE__ */ r("span", { style: { fontWeight: 500 }, children: e.authorName }),
|
|
141
|
+
e.authorName && e.date && /* @__PURE__ */ r("span", { children: "·" }),
|
|
142
|
+
e.date && /* @__PURE__ */ r("span", { children: e.date })
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
`${t}-hero`
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
function W(e) {
|
|
18
155
|
const {
|
|
19
|
-
title:
|
|
20
|
-
subtitle:
|
|
21
|
-
columns:
|
|
156
|
+
title: t,
|
|
157
|
+
subtitle: i,
|
|
158
|
+
columns: g = 3,
|
|
22
159
|
cards: s = [],
|
|
23
|
-
variant:
|
|
160
|
+
variant: a = "default",
|
|
24
161
|
showViewAll: c = !1,
|
|
25
|
-
viewAllText:
|
|
26
|
-
viewAllHref:
|
|
27
|
-
currentPage:
|
|
28
|
-
totalPages:
|
|
29
|
-
paginationBaseUrl: p = "#"
|
|
30
|
-
|
|
31
|
-
|
|
162
|
+
viewAllText: b = "Ver todos",
|
|
163
|
+
viewAllHref: v = "#",
|
|
164
|
+
currentPage: n = 1,
|
|
165
|
+
totalPages: h = 1,
|
|
166
|
+
paginationBaseUrl: p = "#",
|
|
167
|
+
// Card customization
|
|
168
|
+
cardBorderRadius: x = "0.75rem",
|
|
169
|
+
cardShadow: z = "md",
|
|
170
|
+
cardHoverEffect: C = "lift",
|
|
171
|
+
cardBorder: S = !0,
|
|
172
|
+
// Link customization
|
|
173
|
+
linkStyle: k = "link",
|
|
174
|
+
linkColor: w = "#2563eb",
|
|
175
|
+
linkHoverColor: B = "#1d4ed8",
|
|
176
|
+
// Image customization
|
|
177
|
+
imageHoverEffect: R = "zoom",
|
|
178
|
+
imageBorderRadius: j = "0.75rem"
|
|
179
|
+
} = e.props, d = a === "magazine", u = d && s.length > 0 ? s[0] : null, f = d ? s.slice(1) : s;
|
|
180
|
+
return /* @__PURE__ */ r(
|
|
32
181
|
"section",
|
|
33
182
|
{
|
|
34
183
|
style: {
|
|
35
|
-
padding: "var(--sg-section-padding-md)",
|
|
184
|
+
padding: d ? "0" : "var(--sg-section-padding-md)",
|
|
36
185
|
backgroundColor: "var(--sg-bg)"
|
|
37
186
|
},
|
|
38
|
-
children: /* @__PURE__ */ l("div", { style: { maxWidth: "1200px", margin: "0 auto", padding: "0 1rem" }, children: [
|
|
39
|
-
|
|
40
|
-
|
|
187
|
+
children: /* @__PURE__ */ l("div", { style: d ? {} : { maxWidth: "1200px", margin: "0 auto", padding: "0 1rem" }, children: [
|
|
188
|
+
u && P(u, e.id),
|
|
189
|
+
d ? f.length > 0 && /* @__PURE__ */ l("div", { "data-block-group": "Cabeçalho", style: { marginBottom: "2rem" }, children: [
|
|
190
|
+
/* @__PURE__ */ r(
|
|
191
|
+
"h3",
|
|
192
|
+
{
|
|
193
|
+
style: {
|
|
194
|
+
fontSize: "0.875rem",
|
|
195
|
+
fontWeight: 700,
|
|
196
|
+
textTransform: "uppercase",
|
|
197
|
+
letterSpacing: "0.1em",
|
|
198
|
+
color: "var(--sg-text)",
|
|
199
|
+
marginBottom: "0.75rem"
|
|
200
|
+
},
|
|
201
|
+
children: "Posts Recentes"
|
|
202
|
+
}
|
|
203
|
+
),
|
|
204
|
+
/* @__PURE__ */ r(
|
|
205
|
+
"div",
|
|
206
|
+
{
|
|
207
|
+
style: {
|
|
208
|
+
height: "2px",
|
|
209
|
+
backgroundColor: "var(--sg-primary)",
|
|
210
|
+
width: "3rem"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
)
|
|
214
|
+
] }) : (t || i) && /* @__PURE__ */ l("div", { "data-block-group": "Cabeçalho", style: { textAlign: "center", marginBottom: "3rem" }, children: [
|
|
215
|
+
t && /* @__PURE__ */ r(
|
|
41
216
|
"h2",
|
|
42
217
|
{
|
|
43
218
|
style: {
|
|
44
219
|
fontSize: "var(--sg-heading-h2)",
|
|
45
220
|
marginBottom: "0.5rem"
|
|
46
221
|
},
|
|
47
|
-
children:
|
|
222
|
+
children: t
|
|
48
223
|
}
|
|
49
224
|
),
|
|
50
|
-
|
|
225
|
+
i && /* @__PURE__ */ r(
|
|
51
226
|
"p",
|
|
52
227
|
{
|
|
53
228
|
style: { color: "var(--sg-muted-text)", fontSize: "1.125rem" },
|
|
54
|
-
children:
|
|
229
|
+
children: i
|
|
55
230
|
}
|
|
56
231
|
)
|
|
57
232
|
] }),
|
|
58
|
-
|
|
233
|
+
f.length > 0 ? /* @__PURE__ */ r(
|
|
59
234
|
"div",
|
|
60
235
|
{
|
|
61
236
|
"data-block-group": "Layout",
|
|
62
237
|
style: {
|
|
63
238
|
display: "grid",
|
|
64
|
-
gridTemplateColumns: `repeat(${
|
|
239
|
+
gridTemplateColumns: `repeat(${g}, 1fr)`,
|
|
65
240
|
gap: "2rem"
|
|
66
241
|
},
|
|
67
|
-
children:
|
|
68
|
-
(
|
|
69
|
-
id: `${
|
|
242
|
+
children: f.map(
|
|
243
|
+
(o, m) => A({
|
|
244
|
+
id: `${e.id}-card-${d ? m + 1 : m}`,
|
|
70
245
|
props: {
|
|
71
|
-
...
|
|
72
|
-
variant:
|
|
246
|
+
...o,
|
|
247
|
+
variant: a === "featured" && m === 0 ? "horizontal" : a === "minimal" ? "minimal" : "default",
|
|
248
|
+
// Pass customization props
|
|
249
|
+
cardBorderRadius: x,
|
|
250
|
+
cardShadow: z,
|
|
251
|
+
cardHoverEffect: C,
|
|
252
|
+
cardBorder: S,
|
|
253
|
+
linkStyle: k,
|
|
254
|
+
linkColor: w,
|
|
255
|
+
linkHoverColor: B,
|
|
256
|
+
imageHoverEffect: R,
|
|
257
|
+
imageBorderRadius: j
|
|
73
258
|
}
|
|
74
259
|
})
|
|
75
260
|
)
|
|
76
261
|
}
|
|
77
|
-
) : /* @__PURE__ */ l(
|
|
262
|
+
) : u ? null : /* @__PURE__ */ l(
|
|
78
263
|
"div",
|
|
79
264
|
{
|
|
80
265
|
style: {
|
|
@@ -85,15 +270,15 @@ function z(i) {
|
|
|
85
270
|
borderRadius: "var(--sg-card-radius, 0.5rem)"
|
|
86
271
|
},
|
|
87
272
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ r("p", { style: { fontSize: "1rem", marginBottom: "0.5rem" }, children: "Nenhum post encontrado" }),
|
|
274
|
+
/* @__PURE__ */ r("p", { style: { fontSize: "0.875rem" }, children: "Os posts aparecerão aqui quando forem publicados." })
|
|
90
275
|
]
|
|
91
276
|
}
|
|
92
277
|
),
|
|
93
|
-
c && /* @__PURE__ */
|
|
278
|
+
c && /* @__PURE__ */ r("div", { "data-block-group": "Rodapé", style: { textAlign: "center", marginTop: "2.5rem" }, children: /* @__PURE__ */ r(
|
|
94
279
|
"a",
|
|
95
280
|
{
|
|
96
|
-
href:
|
|
281
|
+
href: v,
|
|
97
282
|
style: {
|
|
98
283
|
display: "inline-block",
|
|
99
284
|
padding: "0.75rem 2rem",
|
|
@@ -104,10 +289,10 @@ function z(i) {
|
|
|
104
289
|
fontWeight: 500,
|
|
105
290
|
fontSize: "0.9375rem"
|
|
106
291
|
},
|
|
107
|
-
children:
|
|
292
|
+
children: b
|
|
108
293
|
}
|
|
109
294
|
) }),
|
|
110
|
-
|
|
295
|
+
h > 1 && /* @__PURE__ */ l(
|
|
111
296
|
"nav",
|
|
112
297
|
{
|
|
113
298
|
"data-block-group": "Paginação",
|
|
@@ -119,10 +304,10 @@ function z(i) {
|
|
|
119
304
|
marginTop: "2.5rem"
|
|
120
305
|
},
|
|
121
306
|
children: [
|
|
122
|
-
|
|
307
|
+
n > 1 ? /* @__PURE__ */ r(
|
|
123
308
|
"a",
|
|
124
309
|
{
|
|
125
|
-
href:
|
|
310
|
+
href: y(p, n - 1),
|
|
126
311
|
style: {
|
|
127
312
|
display: "inline-flex",
|
|
128
313
|
alignItems: "center",
|
|
@@ -137,7 +322,7 @@ function z(i) {
|
|
|
137
322
|
},
|
|
138
323
|
children: "‹"
|
|
139
324
|
}
|
|
140
|
-
) : /* @__PURE__ */
|
|
325
|
+
) : /* @__PURE__ */ r(
|
|
141
326
|
"span",
|
|
142
327
|
{
|
|
143
328
|
style: {
|
|
@@ -155,8 +340,8 @@ function z(i) {
|
|
|
155
340
|
children: "‹"
|
|
156
341
|
}
|
|
157
342
|
),
|
|
158
|
-
|
|
159
|
-
(
|
|
343
|
+
H(n, h).map(
|
|
344
|
+
(o, m) => o === -1 ? /* @__PURE__ */ r(
|
|
160
345
|
"span",
|
|
161
346
|
{
|
|
162
347
|
style: {
|
|
@@ -170,11 +355,11 @@ function z(i) {
|
|
|
170
355
|
},
|
|
171
356
|
children: "…"
|
|
172
357
|
},
|
|
173
|
-
`ellipsis-${
|
|
174
|
-
) : /* @__PURE__ */
|
|
358
|
+
`ellipsis-${m}`
|
|
359
|
+
) : /* @__PURE__ */ r(
|
|
175
360
|
"a",
|
|
176
361
|
{
|
|
177
|
-
href:
|
|
362
|
+
href: y(p, o),
|
|
178
363
|
style: {
|
|
179
364
|
display: "inline-flex",
|
|
180
365
|
alignItems: "center",
|
|
@@ -182,22 +367,22 @@ function z(i) {
|
|
|
182
367
|
width: "2.25rem",
|
|
183
368
|
height: "2.25rem",
|
|
184
369
|
borderRadius: "var(--sg-card-radius, 0.5rem)",
|
|
185
|
-
border: `1px solid ${
|
|
186
|
-
backgroundColor:
|
|
187
|
-
color:
|
|
370
|
+
border: `1px solid ${o === n ? "var(--sg-primary)" : "var(--sg-border, #e5e7eb)"}`,
|
|
371
|
+
backgroundColor: o === n ? "var(--sg-primary)" : "transparent",
|
|
372
|
+
color: o === n ? "var(--sg-primary-text, #fff)" : "var(--sg-text)",
|
|
188
373
|
textDecoration: "none",
|
|
189
|
-
fontWeight:
|
|
374
|
+
fontWeight: o === n ? 600 : 400,
|
|
190
375
|
fontSize: "0.875rem"
|
|
191
376
|
},
|
|
192
|
-
children:
|
|
377
|
+
children: o
|
|
193
378
|
},
|
|
194
|
-
|
|
379
|
+
o
|
|
195
380
|
)
|
|
196
381
|
),
|
|
197
|
-
|
|
382
|
+
n < h ? /* @__PURE__ */ r(
|
|
198
383
|
"a",
|
|
199
384
|
{
|
|
200
|
-
href:
|
|
385
|
+
href: y(p, n + 1),
|
|
201
386
|
style: {
|
|
202
387
|
display: "inline-flex",
|
|
203
388
|
alignItems: "center",
|
|
@@ -212,7 +397,7 @@ function z(i) {
|
|
|
212
397
|
},
|
|
213
398
|
children: "›"
|
|
214
399
|
}
|
|
215
|
-
) : /* @__PURE__ */
|
|
400
|
+
) : /* @__PURE__ */ r(
|
|
216
401
|
"span",
|
|
217
402
|
{
|
|
218
403
|
style: {
|
|
@@ -235,10 +420,10 @@ function z(i) {
|
|
|
235
420
|
)
|
|
236
421
|
] })
|
|
237
422
|
},
|
|
238
|
-
|
|
423
|
+
e.id
|
|
239
424
|
);
|
|
240
425
|
}
|
|
241
426
|
export {
|
|
242
|
-
|
|
427
|
+
W as renderBlogPostGrid
|
|
243
428
|
};
|
|
244
429
|
//# sourceMappingURL=BlogPostGridRenderer.js.map
|