@brunoalz/smartgesti-site-editor 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor/BlockSelector.js +4 -2
- package/dist/editor/BlockSelector.js.map +1 -1
- package/dist/engine/export/exportHtml.d.ts +5 -1
- package/dist/engine/export/exportHtml.d.ts.map +1 -1
- package/dist/engine/export/exportHtml.js +69 -51
- package/dist/engine/export/exportHtml.js.map +1 -1
- package/dist/engine/export/exporters/sections/BlogPostExporters.d.ts +2 -0
- package/dist/engine/export/exporters/sections/BlogPostExporters.d.ts.map +1 -1
- package/dist/engine/export/exporters/sections/BlogPostExporters.js +137 -80
- package/dist/engine/export/exporters/sections/BlogPostExporters.js.map +1 -1
- package/dist/engine/export/exporters/sections/index.d.ts.map +1 -1
- package/dist/engine/export/exporters/sections/index.js +40 -38
- package/dist/engine/export/exporters/sections/index.js.map +1 -1
- package/dist/engine/index.js +97 -95
- package/dist/engine/index.js.map +1 -1
- package/dist/engine/plugins/builtin/blog/manifest.d.ts.map +1 -1
- package/dist/engine/plugins/builtin/blog/manifest.js +103 -53
- package/dist/engine/plugins/builtin/blog/manifest.js.map +1 -1
- package/dist/engine/plugins/builtin/blog/mockContentProvider.d.ts.map +1 -1
- package/dist/engine/plugins/builtin/blog/mockContentProvider.js +13 -9
- package/dist/engine/plugins/builtin/blog/mockContentProvider.js.map +1 -1
- package/dist/engine/plugins/contentHydration.d.ts.map +1 -1
- package/dist/engine/plugins/contentHydration.js +119 -79
- package/dist/engine/plugins/contentHydration.js.map +1 -1
- package/dist/engine/plugins/types.d.ts +5 -0
- package/dist/engine/plugins/types.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogCategoryFilter.d.ts +3 -0
- package/dist/engine/registry/blocks/sections/blogCategoryFilter.d.ts.map +1 -0
- package/dist/engine/registry/blocks/sections/blogCategoryFilter.js +53 -0
- package/dist/engine/registry/blocks/sections/blogCategoryFilter.js.map +1 -0
- package/dist/engine/registry/blocks/sections/blogPostDetail.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogPostDetail.js +4 -1
- package/dist/engine/registry/blocks/sections/blogPostDetail.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogPostGrid.js +4 -4
- package/dist/engine/registry/blocks/sections/blogPostGrid.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogSearchBar.d.ts +3 -0
- package/dist/engine/registry/blocks/sections/blogSearchBar.d.ts.map +1 -0
- package/dist/engine/registry/blocks/sections/blogSearchBar.js +56 -0
- package/dist/engine/registry/blocks/sections/blogSearchBar.js.map +1 -0
- package/dist/engine/registry/blocks/sections/index.d.ts +2 -0
- package/dist/engine/registry/blocks/sections/index.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/BlogCategoryFilterRenderer.d.ts +3 -0
- package/dist/engine/render/renderers/sections/BlogCategoryFilterRenderer.d.ts.map +1 -0
- package/dist/engine/render/renderers/sections/BlogCategoryFilterRenderer.js +213 -0
- package/dist/engine/render/renderers/sections/BlogCategoryFilterRenderer.js.map +1 -0
- package/dist/engine/render/renderers/sections/BlogSearchBarRenderer.d.ts +3 -0
- package/dist/engine/render/renderers/sections/BlogSearchBarRenderer.d.ts.map +1 -0
- package/dist/engine/render/renderers/sections/BlogSearchBarRenderer.js +138 -0
- package/dist/engine/render/renderers/sections/BlogSearchBarRenderer.js.map +1 -0
- package/dist/engine/render/renderers/sections/index.js +28 -24
- package/dist/engine/render/renderers/sections/index.js.map +1 -1
- package/dist/engine/schema/siteDocument.d.ts +66 -2
- package/dist/engine/schema/siteDocument.d.ts.map +1 -1
- package/dist/engine/schema/siteDocument.js.map +1 -1
- package/dist/hooks/useNavbarAutoSync.d.ts.map +1 -1
- package/dist/hooks/useNavbarAutoSync.js +27 -15
- package/dist/hooks/useNavbarAutoSync.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +108 -106
- package/dist/index.js.map +1 -1
- package/dist/utils/blockIcons.d.ts.map +1 -1
- package/dist/utils/blockIcons.js +2 -0
- package/dist/utils/blockIcons.js.map +1 -1
- package/dist/utils/navbarSync.d.ts +3 -1
- package/dist/utils/navbarSync.d.ts.map +1 -1
- package/dist/utils/navbarSync.js +3 -3
- package/dist/utils/navbarSync.js.map +1 -1
- package/dist/viewer/LandingPageViewer.d.ts +7 -2
- package/dist/viewer/LandingPageViewer.d.ts.map +1 -1
- package/dist/viewer/LandingPageViewer.js +106 -92
- package/dist/viewer/LandingPageViewer.js.map +1 -1
- package/package.json +1 -1
|
@@ -66,8 +66,8 @@ const s = [
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
];
|
|
69
|
-
function r(
|
|
70
|
-
const e =
|
|
69
|
+
function r(t) {
|
|
70
|
+
const e = t.data, a = t.metadata, o = a?.publishedAt ? new Date(a.publishedAt).toLocaleDateString("pt-BR", {
|
|
71
71
|
day: "2-digit",
|
|
72
72
|
month: "short",
|
|
73
73
|
year: "numeric"
|
|
@@ -81,28 +81,32 @@ function r(a) {
|
|
|
81
81
|
authorName: e.authorName || "",
|
|
82
82
|
authorAvatar: e.authorAvatar || "",
|
|
83
83
|
readingTime: e.readingTime ? `${e.readingTime} min de leitura` : "",
|
|
84
|
-
linkHref: `/site/p/blog/${
|
|
84
|
+
linkHref: `/site/p/blog/${t.slug || t.id}`,
|
|
85
85
|
linkText: "Ler mais",
|
|
86
86
|
// Detail-specific props
|
|
87
87
|
content: e.content || "",
|
|
88
88
|
featuredImage: e.featuredImage || "",
|
|
89
|
-
tags: Array.isArray(e.tags) ? e.tags : []
|
|
89
|
+
tags: Array.isArray(e.tags) ? e.tags : [],
|
|
90
|
+
// SEO props
|
|
91
|
+
metaTitle: e.metaTitle || e.title || "",
|
|
92
|
+
metaDescription: e.metaDescription || e.excerpt || "",
|
|
93
|
+
ogImage: e.ogImage || e.featuredImage || ""
|
|
90
94
|
};
|
|
91
95
|
}
|
|
92
96
|
const d = {
|
|
93
97
|
type: "blog-posts",
|
|
94
|
-
async fetchList(
|
|
95
|
-
const e =
|
|
98
|
+
async fetchList(t) {
|
|
99
|
+
const e = t.limit ?? 10, a = t.page ?? 1, o = (a - 1) * e;
|
|
96
100
|
return {
|
|
97
101
|
items: s.slice(o, o + e),
|
|
98
102
|
total: s.length,
|
|
99
|
-
page:
|
|
103
|
+
page: a,
|
|
100
104
|
limit: e,
|
|
101
105
|
hasMore: o + e < s.length
|
|
102
106
|
};
|
|
103
107
|
},
|
|
104
|
-
async fetchById(
|
|
105
|
-
return s.find((e) => e.id ===
|
|
108
|
+
async fetchById(t) {
|
|
109
|
+
return s.find((e) => e.id === t || e.slug === t) ?? null;
|
|
106
110
|
},
|
|
107
111
|
getSchema() {
|
|
108
112
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockContentProvider.js","sources":["../../../../../src/engine/plugins/builtin/blog/mockContentProvider.ts"],"sourcesContent":["/**\n * Mock Blog Content Provider\n * Provides placeholder blog data for editor preview when no real\n * ContentProvider is registered by the consumer.\n */\n\nimport type {\n ContentProvider,\n ContentItem,\n ContentListParams,\n ContentListResult,\n DataSchema,\n} from \"../../types\";\n\nconst MOCK_POSTS: ContentItem[] = [\n {\n id: \"mock-post-1\",\n type: \"blog-post\",\n slug: \"bem-vindo-ao-nosso-blog\",\n data: {\n title: \"Bem-vindo ao nosso blog!\",\n excerpt:\n \"Estamos animados em lançar nosso blog oficial. Acompanhe as novidades e dicas.\",\n content:\n \"<p>Estamos animados em lançar nosso blog oficial. Aqui você encontrará notícias, tutoriais e dicas importantes.</p>\",\n featuredImage:\n \"https://images.unsplash.com/photo-1499750310107-5fef28a66643?w=800&h=400&fit=crop\",\n category: \"Novidades\",\n tags: [\"lançamento\", \"novidades\"],\n authorName: \"Equipe Editorial\",\n authorAvatar: \"\",\n readingTime: 3,\n },\n metadata: {\n createdAt: \"2025-01-15T10:00:00Z\",\n updatedAt: \"2025-01-15T10:00:00Z\",\n publishedAt: \"2025-01-15T10:00:00Z\",\n status: \"published\",\n },\n },\n {\n id: \"mock-post-2\",\n type: \"blog-post\",\n slug: \"dicas-para-estudantes\",\n data: {\n title: \"5 Dicas para Estudantes de Sucesso\",\n excerpt:\n \"Confira as melhores práticas para melhorar seus estudos e alcançar seus objetivos acadêmicos.\",\n content:\n \"<p>Estudar de forma eficiente é uma habilidade que pode ser desenvolvida. Confira nossas dicas.</p>\",\n featuredImage:\n \"https://images.unsplash.com/photo-1523050854058-8df90110c9f1?w=800&h=400&fit=crop\",\n category: \"Educação\",\n tags: [\"educação\", \"dicas\", \"estudos\"],\n authorName: \"Prof. Maria Silva\",\n authorAvatar: \"\",\n readingTime: 5,\n },\n metadata: {\n createdAt: \"2025-01-20T14:30:00Z\",\n updatedAt: \"2025-01-20T14:30:00Z\",\n publishedAt: \"2025-01-20T14:30:00Z\",\n status: \"published\",\n },\n },\n {\n id: \"mock-post-3\",\n type: \"blog-post\",\n slug: \"novidades-do-semestre\",\n data: {\n title: \"Novidades para o Próximo Semestre\",\n excerpt:\n \"Novos cursos, eventos e melhorias que estão chegando. Saiba tudo sobre o que vem por aí.\",\n content:\n \"<p>O próximo semestre traz muitas novidades. Novos cursos, eventos e oportunidades para todos.</p>\",\n featuredImage:\n \"https://images.unsplash.com/photo-1524178232363-1fb2b075b655?w=800&h=400&fit=crop\",\n category: \"Institucional\",\n tags: [\"semestre\", \"novidades\", \"cursos\"],\n authorName: \"Coordenação Acadêmica\",\n authorAvatar: \"\",\n readingTime: 4,\n },\n metadata: {\n createdAt: \"2025-02-01T09:00:00Z\",\n updatedAt: \"2025-02-01T09:00:00Z\",\n publishedAt: \"2025-02-01T09:00:00Z\",\n status: \"published\",\n },\n },\n];\n\n/**\n * Converts a ContentItem to blogPostCard block props\n */\nfunction toBlockProps(item: ContentItem): Record<string, unknown> {\n const d = item.data;\n const meta = item.metadata;\n\n const publishedDate = meta?.publishedAt\n ? new Date(meta.publishedAt).toLocaleDateString(\"pt-BR\", {\n day: \"2-digit\",\n month: \"short\",\n year: \"numeric\",\n })\n : \"\";\n\n return {\n title: d.title || \"\",\n excerpt: d.excerpt || \"\",\n image: d.featuredImage || \"\",\n date: publishedDate,\n category: d.category || \"\",\n authorName: d.authorName || \"\",\n authorAvatar: d.authorAvatar || \"\",\n readingTime: d.readingTime ? `${d.readingTime} min de leitura` : \"\",\n linkHref: `/site/p/blog/${item.slug || item.id}`,\n linkText: \"Ler mais\",\n // Detail-specific props\n content: d.content || \"\",\n featuredImage: d.featuredImage || \"\",\n tags: Array.isArray(d.tags) ? d.tags : [],\n };\n}\n\n/**\n * Mock ContentProvider for blog posts.\n * Returns placeholder data for editor preview.\n */\nexport const mockBlogContentProvider: ContentProvider = {\n type: \"blog-posts\",\n\n async fetchList(params: ContentListParams): Promise<ContentListResult> {\n const limit = params.limit ?? 10;\n const page = params.page ?? 1;\n const start = (page - 1) * limit;\n const items = MOCK_POSTS.slice(start, start + limit);\n\n return {\n items,\n total: MOCK_POSTS.length,\n page,\n limit,\n hasMore: start + limit < MOCK_POSTS.length,\n };\n },\n\n async fetchById(idOrSlug: string): Promise<ContentItem | null> {\n return (\n MOCK_POSTS.find((p) => p.id === idOrSlug || p.slug === idOrSlug) ?? null\n );\n },\n\n getSchema(): DataSchema {\n return {\n type: \"blog-post\",\n label: \"Blog Post\",\n fields: [\n { name: \"title\", type: \"string\", required: true, label: \"Título\" },\n { name: \"slug\", type: \"string\", required: true, label: \"Slug\" },\n { name: \"excerpt\", type: \"string\", label: \"Resumo\" },\n {\n name: \"content\",\n type: \"richtext\",\n required: true,\n label: \"Conteúdo\",\n },\n { name: \"featuredImage\", type: \"image\", label: \"Imagem de Capa\" },\n { name: \"category\", type: \"string\", label: \"Categoria\" },\n { name: \"tags\", type: \"array\", label: \"Tags\" },\n { name: \"authorName\", type: \"string\", label: \"Autor\" },\n { name: \"authorAvatar\", type: \"image\", label: \"Avatar do Autor\" },\n { name: \"readingTime\", type: \"number\", label: \"Tempo de Leitura\" },\n ],\n };\n },\n\n toBlockProps,\n};\n"],"names":["MOCK_POSTS","toBlockProps","item","d","meta","publishedDate","mockBlogContentProvider","params","limit","page","start","idOrSlug","p"],"mappings":"AAcA,MAAMA,IAA4B;AAAA,EAChC;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,SACE;AAAA,MACF,SACE;AAAA,MACF,eACE;AAAA,MACF,UAAU;AAAA,MACV,MAAM,CAAC,cAAc,WAAW;AAAA,MAChC,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,aAAa;AAAA,IAAA;AAAA,IAEf,UAAU;AAAA,MACR,WAAW;AAAA,MACX,WAAW;AAAA,MACX,aAAa;AAAA,MACb,QAAQ;AAAA,IAAA;AAAA,EACV;AAAA,EAEF;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,SACE;AAAA,MACF,SACE;AAAA,MACF,eACE;AAAA,MACF,UAAU;AAAA,MACV,MAAM,CAAC,YAAY,SAAS,SAAS;AAAA,MACrC,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,aAAa;AAAA,IAAA;AAAA,IAEf,UAAU;AAAA,MACR,WAAW;AAAA,MACX,WAAW;AAAA,MACX,aAAa;AAAA,MACb,QAAQ;AAAA,IAAA;AAAA,EACV;AAAA,EAEF;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,SACE;AAAA,MACF,SACE;AAAA,MACF,eACE;AAAA,MACF,UAAU;AAAA,MACV,MAAM,CAAC,YAAY,aAAa,QAAQ;AAAA,MACxC,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,aAAa;AAAA,IAAA;AAAA,IAEf,UAAU;AAAA,MACR,WAAW;AAAA,MACX,WAAW;AAAA,MACX,aAAa;AAAA,MACb,QAAQ;AAAA,IAAA;AAAA,EACV;AAEJ;AAKA,SAASC,EAAaC,GAA4C;AAChE,QAAMC,IAAID,EAAK,MACTE,IAAOF,EAAK,UAEZG,IAAgBD,GAAM,cACxB,IAAI,KAAKA,EAAK,WAAW,EAAE,mBAAmB,SAAS;AAAA,IACrD,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,EAAA,CACP,IACD;AAEJ,SAAO;AAAA,IACL,OAAOD,EAAE,SAAS;AAAA,IAClB,SAASA,EAAE,WAAW;AAAA,IACtB,OAAOA,EAAE,iBAAiB;AAAA,IAC1B,MAAME;AAAA,IACN,UAAUF,EAAE,YAAY;AAAA,IACxB,YAAYA,EAAE,cAAc;AAAA,IAC5B,cAAcA,EAAE,gBAAgB;AAAA,IAChC,aAAaA,EAAE,cAAc,GAAGA,EAAE,WAAW,oBAAoB;AAAA,IACjE,UAAU,gBAAgBD,EAAK,QAAQA,EAAK,EAAE;AAAA,IAC9C,UAAU;AAAA;AAAA,IAEV,SAASC,EAAE,WAAW;AAAA,IACtB,eAAeA,EAAE,iBAAiB;AAAA,IAClC,MAAM,MAAM,QAAQA,EAAE,IAAI,IAAIA,EAAE,OAAO,CAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"mockContentProvider.js","sources":["../../../../../src/engine/plugins/builtin/blog/mockContentProvider.ts"],"sourcesContent":["/**\n * Mock Blog Content Provider\n * Provides placeholder blog data for editor preview when no real\n * ContentProvider is registered by the consumer.\n */\n\nimport type {\n ContentProvider,\n ContentItem,\n ContentListParams,\n ContentListResult,\n DataSchema,\n} from \"../../types\";\n\nconst MOCK_POSTS: ContentItem[] = [\n {\n id: \"mock-post-1\",\n type: \"blog-post\",\n slug: \"bem-vindo-ao-nosso-blog\",\n data: {\n title: \"Bem-vindo ao nosso blog!\",\n excerpt:\n \"Estamos animados em lançar nosso blog oficial. Acompanhe as novidades e dicas.\",\n content:\n \"<p>Estamos animados em lançar nosso blog oficial. Aqui você encontrará notícias, tutoriais e dicas importantes.</p>\",\n featuredImage:\n \"https://images.unsplash.com/photo-1499750310107-5fef28a66643?w=800&h=400&fit=crop\",\n category: \"Novidades\",\n tags: [\"lançamento\", \"novidades\"],\n authorName: \"Equipe Editorial\",\n authorAvatar: \"\",\n readingTime: 3,\n },\n metadata: {\n createdAt: \"2025-01-15T10:00:00Z\",\n updatedAt: \"2025-01-15T10:00:00Z\",\n publishedAt: \"2025-01-15T10:00:00Z\",\n status: \"published\",\n },\n },\n {\n id: \"mock-post-2\",\n type: \"blog-post\",\n slug: \"dicas-para-estudantes\",\n data: {\n title: \"5 Dicas para Estudantes de Sucesso\",\n excerpt:\n \"Confira as melhores práticas para melhorar seus estudos e alcançar seus objetivos acadêmicos.\",\n content:\n \"<p>Estudar de forma eficiente é uma habilidade que pode ser desenvolvida. Confira nossas dicas.</p>\",\n featuredImage:\n \"https://images.unsplash.com/photo-1523050854058-8df90110c9f1?w=800&h=400&fit=crop\",\n category: \"Educação\",\n tags: [\"educação\", \"dicas\", \"estudos\"],\n authorName: \"Prof. Maria Silva\",\n authorAvatar: \"\",\n readingTime: 5,\n },\n metadata: {\n createdAt: \"2025-01-20T14:30:00Z\",\n updatedAt: \"2025-01-20T14:30:00Z\",\n publishedAt: \"2025-01-20T14:30:00Z\",\n status: \"published\",\n },\n },\n {\n id: \"mock-post-3\",\n type: \"blog-post\",\n slug: \"novidades-do-semestre\",\n data: {\n title: \"Novidades para o Próximo Semestre\",\n excerpt:\n \"Novos cursos, eventos e melhorias que estão chegando. Saiba tudo sobre o que vem por aí.\",\n content:\n \"<p>O próximo semestre traz muitas novidades. Novos cursos, eventos e oportunidades para todos.</p>\",\n featuredImage:\n \"https://images.unsplash.com/photo-1524178232363-1fb2b075b655?w=800&h=400&fit=crop\",\n category: \"Institucional\",\n tags: [\"semestre\", \"novidades\", \"cursos\"],\n authorName: \"Coordenação Acadêmica\",\n authorAvatar: \"\",\n readingTime: 4,\n },\n metadata: {\n createdAt: \"2025-02-01T09:00:00Z\",\n updatedAt: \"2025-02-01T09:00:00Z\",\n publishedAt: \"2025-02-01T09:00:00Z\",\n status: \"published\",\n },\n },\n];\n\n/**\n * Converts a ContentItem to blogPostCard block props\n */\nfunction toBlockProps(item: ContentItem): Record<string, unknown> {\n const d = item.data;\n const meta = item.metadata;\n\n const publishedDate = meta?.publishedAt\n ? new Date(meta.publishedAt).toLocaleDateString(\"pt-BR\", {\n day: \"2-digit\",\n month: \"short\",\n year: \"numeric\",\n })\n : \"\";\n\n return {\n title: d.title || \"\",\n excerpt: d.excerpt || \"\",\n image: d.featuredImage || \"\",\n date: publishedDate,\n category: d.category || \"\",\n authorName: d.authorName || \"\",\n authorAvatar: d.authorAvatar || \"\",\n readingTime: d.readingTime ? `${d.readingTime} min de leitura` : \"\",\n linkHref: `/site/p/blog/${item.slug || item.id}`,\n linkText: \"Ler mais\",\n // Detail-specific props\n content: d.content || \"\",\n featuredImage: d.featuredImage || \"\",\n tags: Array.isArray(d.tags) ? d.tags : [],\n // SEO props\n metaTitle: d.metaTitle || d.title || \"\",\n metaDescription: d.metaDescription || d.excerpt || \"\",\n ogImage: d.ogImage || d.featuredImage || \"\",\n };\n}\n\n/**\n * Mock ContentProvider for blog posts.\n * Returns placeholder data for editor preview.\n */\nexport const mockBlogContentProvider: ContentProvider = {\n type: \"blog-posts\",\n\n async fetchList(params: ContentListParams): Promise<ContentListResult> {\n const limit = params.limit ?? 10;\n const page = params.page ?? 1;\n const start = (page - 1) * limit;\n const items = MOCK_POSTS.slice(start, start + limit);\n\n return {\n items,\n total: MOCK_POSTS.length,\n page,\n limit,\n hasMore: start + limit < MOCK_POSTS.length,\n };\n },\n\n async fetchById(idOrSlug: string): Promise<ContentItem | null> {\n return (\n MOCK_POSTS.find((p) => p.id === idOrSlug || p.slug === idOrSlug) ?? null\n );\n },\n\n getSchema(): DataSchema {\n return {\n type: \"blog-post\",\n label: \"Blog Post\",\n fields: [\n { name: \"title\", type: \"string\", required: true, label: \"Título\" },\n { name: \"slug\", type: \"string\", required: true, label: \"Slug\" },\n { name: \"excerpt\", type: \"string\", label: \"Resumo\" },\n {\n name: \"content\",\n type: \"richtext\",\n required: true,\n label: \"Conteúdo\",\n },\n { name: \"featuredImage\", type: \"image\", label: \"Imagem de Capa\" },\n { name: \"category\", type: \"string\", label: \"Categoria\" },\n { name: \"tags\", type: \"array\", label: \"Tags\" },\n { name: \"authorName\", type: \"string\", label: \"Autor\" },\n { name: \"authorAvatar\", type: \"image\", label: \"Avatar do Autor\" },\n { name: \"readingTime\", type: \"number\", label: \"Tempo de Leitura\" },\n ],\n };\n },\n\n toBlockProps,\n};\n"],"names":["MOCK_POSTS","toBlockProps","item","d","meta","publishedDate","mockBlogContentProvider","params","limit","page","start","idOrSlug","p"],"mappings":"AAcA,MAAMA,IAA4B;AAAA,EAChC;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,SACE;AAAA,MACF,SACE;AAAA,MACF,eACE;AAAA,MACF,UAAU;AAAA,MACV,MAAM,CAAC,cAAc,WAAW;AAAA,MAChC,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,aAAa;AAAA,IAAA;AAAA,IAEf,UAAU;AAAA,MACR,WAAW;AAAA,MACX,WAAW;AAAA,MACX,aAAa;AAAA,MACb,QAAQ;AAAA,IAAA;AAAA,EACV;AAAA,EAEF;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,SACE;AAAA,MACF,SACE;AAAA,MACF,eACE;AAAA,MACF,UAAU;AAAA,MACV,MAAM,CAAC,YAAY,SAAS,SAAS;AAAA,MACrC,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,aAAa;AAAA,IAAA;AAAA,IAEf,UAAU;AAAA,MACR,WAAW;AAAA,MACX,WAAW;AAAA,MACX,aAAa;AAAA,MACb,QAAQ;AAAA,IAAA;AA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A,IACnE;AAAA,EAEJ;AAAA,EAEA,cAAAV;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentHydration.d.ts","sourceRoot":"","sources":["../../../src/engine/plugins/contentHydration.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"contentHydration.d.ts","sourceRoot":"","sources":["../../../src/engine/plugins/contentHydration.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAwB,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAe,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAE9D;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,kBAAkB,EAC7B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,WAAW,CAAC,EAAE,iBAAiB,GAC9B,OAAO,CAAC,QAAQ,CAAC,CAsCnB"}
|
|
@@ -1,121 +1,161 @@
|
|
|
1
|
-
import { logger as
|
|
2
|
-
async function
|
|
3
|
-
if (!
|
|
4
|
-
return
|
|
5
|
-
const { provider: o, mode:
|
|
6
|
-
if (!
|
|
7
|
-
return
|
|
8
|
-
`ContentProvider "${o}" not found for page "${
|
|
9
|
-
),
|
|
1
|
+
import { logger as u } from "../../utils/logger.js";
|
|
2
|
+
async function v(t, n, e, r) {
|
|
3
|
+
if (!t.dataSource)
|
|
4
|
+
return t;
|
|
5
|
+
const { provider: o, mode: i, paramMapping: s } = t.dataSource, a = n.get(o);
|
|
6
|
+
if (!a)
|
|
7
|
+
return u.warn(
|
|
8
|
+
`ContentProvider "${o}" not found for page "${t.id}". Rendering with static props.`
|
|
9
|
+
), t;
|
|
10
10
|
try {
|
|
11
|
-
if (
|
|
12
|
-
return await
|
|
13
|
-
if (
|
|
14
|
-
const
|
|
15
|
-
return
|
|
16
|
-
`Could not resolve ID/slug for page "${
|
|
17
|
-
),
|
|
11
|
+
if (i === "list")
|
|
12
|
+
return await m(t, a, r);
|
|
13
|
+
if (i === "single") {
|
|
14
|
+
const c = l(s, e);
|
|
15
|
+
return c ? await y(t, a, c) : (u.warn(
|
|
16
|
+
`Could not resolve ID/slug for page "${t.id}" from URL params. Using static props.`
|
|
17
|
+
), t);
|
|
18
18
|
}
|
|
19
|
-
return
|
|
20
|
-
} catch (
|
|
21
|
-
return
|
|
19
|
+
return t;
|
|
20
|
+
} catch (c) {
|
|
21
|
+
return u.error(`Error hydrating page "${t.id}":`, c), t;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
async function
|
|
25
|
-
const
|
|
24
|
+
async function m(t, n, e) {
|
|
25
|
+
const r = {
|
|
26
26
|
limit: 12,
|
|
27
|
-
...
|
|
28
|
-
...
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
(i) => d(i, s)
|
|
34
|
-
);
|
|
27
|
+
...t.dataSource?.defaultParams,
|
|
28
|
+
...e
|
|
29
|
+
}, i = ((await n.fetchList(r)).items || []).map((a) => n.toBlockProps(a)), s = t.structure.map((a) => {
|
|
30
|
+
let c = d(a, i);
|
|
31
|
+
return c = f(c, i), c;
|
|
32
|
+
});
|
|
35
33
|
return {
|
|
36
|
-
...
|
|
37
|
-
structure:
|
|
34
|
+
...t,
|
|
35
|
+
structure: s
|
|
38
36
|
};
|
|
39
37
|
}
|
|
40
|
-
function d(
|
|
41
|
-
if (
|
|
38
|
+
function d(t, n) {
|
|
39
|
+
if (t.type === "blogPostGrid")
|
|
42
40
|
return {
|
|
43
|
-
...
|
|
41
|
+
...t,
|
|
44
42
|
props: {
|
|
45
|
-
...
|
|
46
|
-
cards:
|
|
43
|
+
...t.props,
|
|
44
|
+
cards: n
|
|
47
45
|
}
|
|
48
46
|
};
|
|
49
|
-
const
|
|
50
|
-
return
|
|
51
|
-
...
|
|
47
|
+
const e = t.props;
|
|
48
|
+
return e.children && Array.isArray(e.children) ? {
|
|
49
|
+
...t,
|
|
52
50
|
props: {
|
|
53
|
-
...
|
|
54
|
-
children:
|
|
55
|
-
(
|
|
51
|
+
...e,
|
|
52
|
+
children: e.children.map(
|
|
53
|
+
(r) => d(r, n)
|
|
56
54
|
)
|
|
57
55
|
}
|
|
58
|
-
} :
|
|
56
|
+
} : t;
|
|
59
57
|
}
|
|
60
|
-
async function
|
|
61
|
-
const
|
|
62
|
-
if (!
|
|
63
|
-
return
|
|
64
|
-
const o =
|
|
65
|
-
(a) =>
|
|
66
|
-
);
|
|
58
|
+
async function y(t, n, e) {
|
|
59
|
+
const r = await n.fetchById(e);
|
|
60
|
+
if (!r)
|
|
61
|
+
return u.warn(`Content item "${e}" not found. Using static props.`), t;
|
|
62
|
+
const o = n.toBlockProps(r), i = t.structure.map(
|
|
63
|
+
(a) => p(a, o, r)
|
|
64
|
+
), s = h(r, o);
|
|
67
65
|
return {
|
|
68
|
-
...
|
|
69
|
-
structure:
|
|
66
|
+
...t,
|
|
67
|
+
structure: i,
|
|
68
|
+
...s ? { seo: s } : {}
|
|
70
69
|
};
|
|
71
70
|
}
|
|
72
|
-
function
|
|
73
|
-
if (
|
|
71
|
+
function p(t, n, e) {
|
|
72
|
+
if (t.type === "blogPostDetail")
|
|
74
73
|
return {
|
|
75
|
-
...
|
|
74
|
+
...t,
|
|
76
75
|
props: {
|
|
77
|
-
...
|
|
78
|
-
...
|
|
76
|
+
...t.props,
|
|
77
|
+
...n,
|
|
79
78
|
// Preserve metadata
|
|
80
|
-
_contentItemId:
|
|
81
|
-
_contentItemSlug:
|
|
79
|
+
_contentItemId: e.id,
|
|
80
|
+
_contentItemSlug: e.slug
|
|
82
81
|
}
|
|
83
82
|
};
|
|
84
|
-
if (
|
|
83
|
+
if (t.type === "blogPostCard")
|
|
85
84
|
return {
|
|
85
|
+
...t,
|
|
86
|
+
props: {
|
|
87
|
+
...t.props,
|
|
88
|
+
...n
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const r = t.props;
|
|
92
|
+
return r.children && Array.isArray(r.children) ? {
|
|
93
|
+
...t,
|
|
94
|
+
props: {
|
|
86
95
|
...r,
|
|
96
|
+
children: r.children.map(
|
|
97
|
+
(o) => p(o, n, e)
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
} : t;
|
|
101
|
+
}
|
|
102
|
+
function h(t, n) {
|
|
103
|
+
const e = t.metadata?.seo, r = e?.metaTitle || n.metaTitle || n.title, o = e?.metaDescription || n.metaDescription || n.excerpt, i = e?.ogImage || n.ogImage || n.featuredImage;
|
|
104
|
+
if (!(!r && !o && !i))
|
|
105
|
+
return {
|
|
106
|
+
metaTitle: r,
|
|
107
|
+
metaDescription: o,
|
|
108
|
+
ogImage: i,
|
|
109
|
+
ogType: "article"
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function f(t, n) {
|
|
113
|
+
if (t.type === "blogCategoryFilter") {
|
|
114
|
+
const r = /* @__PURE__ */ new Map();
|
|
115
|
+
for (const i of n) {
|
|
116
|
+
const s = i.category;
|
|
117
|
+
s && r.set(s, (r.get(s) || 0) + 1);
|
|
118
|
+
}
|
|
119
|
+
const o = Array.from(r.entries()).map(([i, s]) => ({
|
|
120
|
+
name: i,
|
|
121
|
+
slug: i,
|
|
122
|
+
count: s
|
|
123
|
+
}));
|
|
124
|
+
return {
|
|
125
|
+
...t,
|
|
87
126
|
props: {
|
|
88
|
-
...
|
|
89
|
-
|
|
127
|
+
...t.props,
|
|
128
|
+
categories: o
|
|
90
129
|
}
|
|
91
130
|
};
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
131
|
+
}
|
|
132
|
+
const e = t.props;
|
|
133
|
+
return e.children && Array.isArray(e.children) ? {
|
|
134
|
+
...t,
|
|
95
135
|
props: {
|
|
96
|
-
...
|
|
97
|
-
children:
|
|
98
|
-
(
|
|
136
|
+
...e,
|
|
137
|
+
children: e.children.map(
|
|
138
|
+
(r) => f(r, n)
|
|
99
139
|
)
|
|
100
140
|
}
|
|
101
|
-
} :
|
|
141
|
+
} : t;
|
|
102
142
|
}
|
|
103
|
-
function
|
|
104
|
-
if (!(!
|
|
105
|
-
for (const
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
108
|
-
const o =
|
|
109
|
-
if (
|
|
143
|
+
function l(t, n) {
|
|
144
|
+
if (!(!t || !n)) {
|
|
145
|
+
for (const e of ["slug", "id"]) {
|
|
146
|
+
const r = t[e];
|
|
147
|
+
if (r) {
|
|
148
|
+
const o = r.startsWith(":") ? r.slice(1) : r, i = n[o];
|
|
149
|
+
if (i) return i;
|
|
110
150
|
}
|
|
111
151
|
}
|
|
112
|
-
for (const
|
|
113
|
-
const
|
|
152
|
+
for (const e of Object.values(t)) {
|
|
153
|
+
const r = e.startsWith(":") ? e.slice(1) : e, o = n[r];
|
|
114
154
|
if (o) return o;
|
|
115
155
|
}
|
|
116
156
|
}
|
|
117
157
|
}
|
|
118
158
|
export {
|
|
119
|
-
|
|
159
|
+
v as hydratePageWithContent
|
|
120
160
|
};
|
|
121
161
|
//# sourceMappingURL=contentHydration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentHydration.js","sources":["../../../src/engine/plugins/contentHydration.ts"],"sourcesContent":["/**\n * Content Hydration\n * Hydrates page blocks with data from ContentProviders before rendering.\n *\n * This works at the data level, before either rendering pipeline\n * (React renderers or HTML exporters) processes the blocks.\n */\n\nimport { logger } from \"../../utils/logger\";\nimport type { SitePage, Block } from \"../schema/siteDocument\";\nimport type { ContentProvider, ContentItem, ContentListParams } from \"./types\";\n\n/**\n * Map of provider type → ContentProvider instance\n */\nexport type ContentProviderMap = Map<string, ContentProvider>;\n\n/**\n * Hydrates a page's blocks with data from ContentProviders.\n *\n * For pages with a dataSource:\n * - mode \"list\": fetches list and populates grid blocks' `cards` prop\n * - mode \"single\": fetches single item and spreads props onto detail blocks\n *\n * Returns a new page with hydrated block props (original page is not mutated).\n */\nexport async function hydratePageWithContent(\n page: SitePage,\n providers: ContentProviderMap,\n urlParams?: Record<string, string>,\n fetchParams?: ContentListParams,\n): Promise<SitePage> {\n // No dataSource → return page as-is\n if (!page.dataSource) {\n return page;\n }\n\n const { provider: providerType, mode, paramMapping } = page.dataSource;\n const provider = providers.get(providerType);\n\n if (!provider) {\n logger.warn(\n `ContentProvider \"${providerType}\" not found for page \"${page.id}\". Rendering with static props.`,\n );\n return page;\n }\n\n try {\n if (mode === \"list\") {\n return await hydrateListPage(page, provider, fetchParams);\n }\n\n if (mode === \"single\") {\n // Resolve the ID/slug from URL params\n const idOrSlug = resolveIdFromParams(paramMapping, urlParams);\n if (!idOrSlug) {\n logger.warn(\n `Could not resolve ID/slug for page \"${page.id}\" from URL params. Using static props.`,\n );\n return page;\n }\n return await hydrateSinglePage(page, provider, idOrSlug);\n }\n\n return page;\n } catch (error) {\n logger.error(`Error hydrating page \"${page.id}\":`, error);\n return page;\n }\n}\n\n/**\n * Hydrates a list-mode page: fetches items and populates grid blocks.\n */\nasync function hydrateListPage(\n page: SitePage,\n provider: ContentProvider,\n fetchParams?: ContentListParams,\n): Promise<SitePage> {\n const params: ContentListParams = {\n limit: 12,\n ...page.dataSource?.defaultParams,\n ...fetchParams,\n };\n\n const result = await provider.fetchList(params);\n\n if (!result.items || result.items.length === 0) {\n return page;\n }\n\n // Convert items to block props\n const cardProps = result.items.map((item) => provider.toBlockProps(item));\n\n // Hydrate all grid blocks on the page with the fetched cards\n const hydratedStructure = page.structure.map((block) =>\n hydrateGridBlock(block, cardProps),\n );\n\n return {\n ...page,\n structure: hydratedStructure,\n };\n}\n\n/**\n * Hydrates grid blocks (blogPostGrid, etc.) with card data.\n */\nfunction hydrateGridBlock(\n block: Block,\n cardProps: Record<string, unknown>[],\n): Block {\n // Direct match: blogPostGrid gets cards populated\n if (block.type === \"blogPostGrid\") {\n return {\n ...block,\n props: {\n ...block.props,\n cards: cardProps,\n },\n };\n }\n\n // Recurse into children for nested structures\n const props = block.props as Record<string, unknown>;\n if (props.children && Array.isArray(props.children)) {\n return {\n ...block,\n props: {\n ...props,\n children: (props.children as Block[]).map((child) =>\n hydrateGridBlock(child, cardProps),\n ),\n },\n };\n }\n\n return block;\n}\n\n/**\n * Hydrates a single-mode page: fetches one item and populates detail blocks.\n */\nasync function hydrateSinglePage(\n page: SitePage,\n provider: ContentProvider,\n idOrSlug: string,\n): Promise<SitePage> {\n const item = await provider.fetchById(idOrSlug);\n\n if (!item) {\n logger.warn(`Content item \"${idOrSlug}\" not found. Using static props.`);\n return page;\n }\n\n const blockProps = provider.toBlockProps(item);\n\n // Hydrate all detail blocks on the page\n const hydratedStructure = page.structure.map((block) =>\n hydrateDetailBlock(block, blockProps, item),\n );\n\n return {\n ...page,\n structure: hydratedStructure,\n };\n}\n\n/**\n * Hydrates detail blocks (blogPostDetail, etc.) with item data.\n */\nfunction hydrateDetailBlock(\n block: Block,\n blockProps: Record<string, unknown>,\n item: ContentItem,\n): Block {\n if (block.type === \"blogPostDetail\") {\n return {\n ...block,\n props: {\n ...block.props,\n ...blockProps,\n // Preserve metadata\n _contentItemId: item.id,\n _contentItemSlug: item.slug,\n },\n };\n }\n\n // Also hydrate blogPostCard blocks that reference the same item\n if (block.type === \"blogPostCard\") {\n return {\n ...block,\n props: {\n ...block.props,\n ...blockProps,\n },\n };\n }\n\n // Recurse into children\n const props = block.props as Record<string, unknown>;\n if (props.children && Array.isArray(props.children)) {\n return {\n ...block,\n props: {\n ...props,\n children: (props.children as Block[]).map((child) =>\n hydrateDetailBlock(child, blockProps, item),\n ),\n },\n };\n }\n\n return block;\n}\n\n/**\n * Resolves the item ID/slug from URL params using paramMapping.\n * e.g., paramMapping: { slug: \":slug\" }, urlParams: { slug: \"my-post\" } → \"my-post\"\n */\nfunction resolveIdFromParams(\n paramMapping?: Record<string, string>,\n urlParams?: Record<string, string>,\n): string | undefined {\n if (!paramMapping || !urlParams) return undefined;\n\n // Try slug first, then id\n for (const key of [\"slug\", \"id\"]) {\n const paramPattern = paramMapping[key];\n if (paramPattern) {\n // Extract param name from pattern (e.g., \":slug\" → \"slug\")\n const paramName = paramPattern.startsWith(\":\")\n ? paramPattern.slice(1)\n : paramPattern;\n const value = urlParams[paramName];\n if (value) return value;\n }\n }\n\n // Fallback: return first available param value\n for (const paramPattern of Object.values(paramMapping)) {\n const paramName = paramPattern.startsWith(\":\")\n ? paramPattern.slice(1)\n : paramPattern;\n const value = urlParams[paramName];\n if (value) return value;\n }\n\n return undefined;\n}\n"],"names":["hydratePageWithContent","page","providers","urlParams","fetchParams","providerType","mode","paramMapping","provider","logger","hydrateListPage","idOrSlug","resolveIdFromParams","hydrateSinglePage","error","params","result","cardProps","item","hydratedStructure","block","hydrateGridBlock","props","child","blockProps","hydrateDetailBlock","key","paramPattern","paramName","value"],"mappings":";AA0BA,eAAsBA,EACpBC,GACAC,GACAC,GACAC,GACmB;AAEnB,MAAI,CAACH,EAAK;AACR,WAAOA;AAGT,QAAM,EAAE,UAAUI,GAAc,MAAAC,GAAM,cAAAC,EAAA,IAAiBN,EAAK,YACtDO,IAAWN,EAAU,IAAIG,CAAY;AAE3C,MAAI,CAACG;AACH,WAAAC,EAAO;AAAA,MACL,oBAAoBJ,CAAY,yBAAyBJ,EAAK,EAAE;AAAA,IAAA,GAE3DA;AAGT,MAAI;AACF,QAAIK,MAAS;AACX,aAAO,MAAMI,EAAgBT,GAAMO,GAAUJ,CAAW;AAG1D,QAAIE,MAAS,UAAU;AAErB,YAAMK,IAAWC,EAAoBL,GAAcJ,CAAS;AAC5D,aAAKQ,IAME,MAAME,EAAkBZ,GAAMO,GAAUG,CAAQ,KALrDF,EAAO;AAAA,QACL,uCAAuCR,EAAK,EAAE;AAAA,MAAA,GAEzCA;AAAA,IAGX;AAEA,WAAOA;AAAA,EACT,SAASa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1B,EAAUyB,CAAS;AACjC,UAAIC,EAAO,QAAOA;AAAA,IACpB;AAAA;AAGF;"}
|
|
1
|
+
{"version":3,"file":"contentHydration.js","sources":["../../../src/engine/plugins/contentHydration.ts"],"sourcesContent":["/**\n * Content Hydration\n * Hydrates page blocks with data from ContentProviders before rendering.\n *\n * This works at the data level, before either rendering pipeline\n * (React renderers or HTML exporters) processes the blocks.\n */\n\nimport { logger } from \"../../utils/logger\";\nimport type { SitePage, Block, PageSeoConfig } from \"../schema/siteDocument\";\nimport type { ContentProvider, ContentItem, ContentListParams } from \"./types\";\n\n/**\n * Map of provider type → ContentProvider instance\n */\nexport type ContentProviderMap = Map<string, ContentProvider>;\n\n/**\n * Hydrates a page's blocks with data from ContentProviders.\n *\n * For pages with a dataSource:\n * - mode \"list\": fetches list and populates grid blocks' `cards` prop\n * - mode \"single\": fetches single item and spreads props onto detail blocks\n *\n * Returns a new page with hydrated block props (original page is not mutated).\n */\nexport async function hydratePageWithContent(\n page: SitePage,\n providers: ContentProviderMap,\n urlParams?: Record<string, string>,\n fetchParams?: ContentListParams,\n): Promise<SitePage> {\n // No dataSource → return page as-is\n if (!page.dataSource) {\n return page;\n }\n\n const { provider: providerType, mode, paramMapping } = page.dataSource;\n const provider = providers.get(providerType);\n\n if (!provider) {\n logger.warn(\n `ContentProvider \"${providerType}\" not found for page \"${page.id}\". Rendering with static props.`,\n );\n return page;\n }\n\n try {\n if (mode === \"list\") {\n return await hydrateListPage(page, provider, fetchParams);\n }\n\n if (mode === \"single\") {\n // Resolve the ID/slug from URL params\n const idOrSlug = resolveIdFromParams(paramMapping, urlParams);\n if (!idOrSlug) {\n logger.warn(\n `Could not resolve ID/slug for page \"${page.id}\" from URL params. Using static props.`,\n );\n return page;\n }\n return await hydrateSinglePage(page, provider, idOrSlug);\n }\n\n return page;\n } catch (error) {\n logger.error(`Error hydrating page \"${page.id}\":`, error);\n return page;\n }\n}\n\n/**\n * Hydrates a list-mode page: fetches items and populates grid blocks.\n */\nasync function hydrateListPage(\n page: SitePage,\n provider: ContentProvider,\n fetchParams?: ContentListParams,\n): Promise<SitePage> {\n const params: ContentListParams = {\n limit: 12,\n ...page.dataSource?.defaultParams,\n ...fetchParams,\n };\n\n const result = await provider.fetchList(params);\n\n // Convert items to block props (empty array if no results — shows empty state, never mock data)\n const cardProps = (result.items || []).map((item) => provider.toBlockProps(item));\n\n // Hydrate all grid blocks and category filters on the page\n const hydratedStructure = page.structure.map((block) => {\n let hydrated = hydrateGridBlock(block, cardProps);\n hydrated = hydrateCategoryFilterBlock(hydrated, cardProps);\n return hydrated;\n });\n\n return {\n ...page,\n structure: hydratedStructure,\n };\n}\n\n/**\n * Hydrates grid blocks (blogPostGrid, etc.) with card data.\n */\nfunction hydrateGridBlock(\n block: Block,\n cardProps: Record<string, unknown>[],\n): Block {\n // Direct match: blogPostGrid gets cards populated\n if (block.type === \"blogPostGrid\") {\n return {\n ...block,\n props: {\n ...block.props,\n cards: cardProps,\n },\n };\n }\n\n // Recurse into children for nested structures\n const props = block.props as Record<string, unknown>;\n if (props.children && Array.isArray(props.children)) {\n return {\n ...block,\n props: {\n ...props,\n children: (props.children as Block[]).map((child) =>\n hydrateGridBlock(child, cardProps),\n ),\n },\n };\n }\n\n return block;\n}\n\n/**\n * Hydrates a single-mode page: fetches one item and populates detail blocks.\n */\nasync function hydrateSinglePage(\n page: SitePage,\n provider: ContentProvider,\n idOrSlug: string,\n): Promise<SitePage> {\n const item = await provider.fetchById(idOrSlug);\n\n if (!item) {\n logger.warn(`Content item \"${idOrSlug}\" not found. Using static props.`);\n return page;\n }\n\n const blockProps = provider.toBlockProps(item);\n\n // Hydrate all detail blocks on the page\n const hydratedStructure = page.structure.map((block) =>\n hydrateDetailBlock(block, blockProps, item),\n );\n\n // Extract SEO from content item and set on page\n const seo = extractSeoFromContent(item, blockProps);\n\n return {\n ...page,\n structure: hydratedStructure,\n ...(seo ? { seo } : {}),\n };\n}\n\n/**\n * Hydrates detail blocks (blogPostDetail, etc.) with item data.\n */\nfunction hydrateDetailBlock(\n block: Block,\n blockProps: Record<string, unknown>,\n item: ContentItem,\n): Block {\n if (block.type === \"blogPostDetail\") {\n return {\n ...block,\n props: {\n ...block.props,\n ...blockProps,\n // Preserve metadata\n _contentItemId: item.id,\n _contentItemSlug: item.slug,\n },\n };\n }\n\n // Also hydrate blogPostCard blocks that reference the same item\n if (block.type === \"blogPostCard\") {\n return {\n ...block,\n props: {\n ...block.props,\n ...blockProps,\n },\n };\n }\n\n // Recurse into children\n const props = block.props as Record<string, unknown>;\n if (props.children && Array.isArray(props.children)) {\n return {\n ...block,\n props: {\n ...props,\n children: (props.children as Block[]).map((child) =>\n hydrateDetailBlock(child, blockProps, item),\n ),\n },\n };\n }\n\n return block;\n}\n\n/**\n * Extracts SEO configuration from a ContentItem and block props.\n * Priority: item.metadata.seo > blockProps (metaTitle/title, metaDescription/excerpt, ogImage/featuredImage)\n */\nfunction extractSeoFromContent(\n item: ContentItem,\n blockProps: Record<string, unknown>,\n): PageSeoConfig | undefined {\n const seoMeta = item.metadata?.seo;\n\n const metaTitle = seoMeta?.metaTitle || (blockProps.metaTitle as string) || (blockProps.title as string);\n const metaDescription = seoMeta?.metaDescription || (blockProps.metaDescription as string) || (blockProps.excerpt as string);\n const ogImage = seoMeta?.ogImage || (blockProps.ogImage as string) || (blockProps.featuredImage as string);\n\n if (!metaTitle && !metaDescription && !ogImage) {\n return undefined;\n }\n\n return {\n metaTitle,\n metaDescription,\n ogImage,\n ogType: \"article\",\n };\n}\n\n/**\n * Hydrates blogCategoryFilter blocks with category data extracted from posts.\n */\nfunction hydrateCategoryFilterBlock(\n block: Block,\n cardProps: Record<string, unknown>[],\n): Block {\n if (block.type === \"blogCategoryFilter\") {\n // Extract unique categories from posts with counts\n const categoryMap = new Map<string, number>();\n for (const card of cardProps) {\n const cat = card.category as string;\n if (cat) {\n categoryMap.set(cat, (categoryMap.get(cat) || 0) + 1);\n }\n }\n\n const categories = Array.from(categoryMap.entries()).map(([name, count]) => ({\n name,\n slug: name,\n count,\n }));\n\n return {\n ...block,\n props: {\n ...block.props,\n categories,\n },\n };\n }\n\n // Recurse into children\n const props = block.props as Record<string, unknown>;\n if (props.children && Array.isArray(props.children)) {\n return {\n ...block,\n props: {\n ...props,\n children: (props.children as Block[]).map((child) =>\n hydrateCategoryFilterBlock(child, cardProps),\n ),\n },\n };\n }\n\n return block;\n}\n\n/**\n * Resolves the item ID/slug from URL params using paramMapping.\n * e.g., paramMapping: { slug: \":slug\" }, urlParams: { slug: \"my-post\" } → \"my-post\"\n */\nfunction resolveIdFromParams(\n paramMapping?: Record<string, string>,\n urlParams?: Record<string, string>,\n): string | undefined {\n if (!paramMapping || !urlParams) return undefined;\n\n // Try slug first, then id\n for (const key of [\"slug\", \"id\"]) {\n const paramPattern = paramMapping[key];\n if (paramPattern) {\n // Extract param name from pattern (e.g., \":slug\" → \"slug\")\n const paramName = paramPattern.startsWith(\":\")\n ? paramPattern.slice(1)\n : paramPattern;\n const value = urlParams[paramName];\n if (value) return value;\n }\n }\n\n // Fallback: return first available param value\n for (const paramPattern of Object.values(paramMapping)) {\n const paramName = paramPattern.startsWith(\":\")\n ? paramPattern.slice(1)\n : paramPattern;\n const value = urlParams[paramName];\n if (value) return value;\n }\n\n return undefined;\n}\n"],"names":["hydratePageWithContent","page","providers","urlParams","fetchParams","providerType","mode","paramMapping","provider","logger","hydrateListPage","idOrSlug","resolveIdFromParams","hydrateSinglePage","error","params","cardProps","item","hydratedStructure","block","hydrated","hydrateGridBlock","hydrateCategoryFilterBlock","props","child","blockProps","hydrateDetailBlock","seo","extractSeoFromContent","seoMeta","metaTitle","metaDescription","ogImage","categoryMap","card","cat","categories","name","count","key","paramPattern","paramName","value"],"mappings":";AA0BA,eAAsBA,EACpBC,GACAC,GACAC,GACAC,GACmB;AAEnB,MAAI,CAACH,EAAK;AACR,WAAOA;AAGT,QAAM,EAAE,UAAUI,GAAc,MAAAC,GAAM,cAAAC,EAAA,IAAiBN,EAAK,YACt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YAAY,CAAC;IAEtD,yDAAyD;IACzD,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,YAAY,CAAC;IAExD,yDAAyD;IACzD,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,iBAAiB,GAAG,SAAS,CAAC;IAEhF,6CAA6C;IAC7C,mBAAmB,CAAC,EAAE,MAAM,eAAe,EAAE,CAAC;CAC/C;AAMD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blogCategoryFilter.d.ts","sourceRoot":"","sources":["../../../../../src/engine/registry/blocks/sections/blogCategoryFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,eAAO,MAAM,uBAAuB,EAAE,eAAe,CAAC,oBAAoB,CA8CzE,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { componentRegistry as e } from "../../registry.js";
|
|
2
|
+
const t = {
|
|
3
|
+
type: "blogCategoryFilter",
|
|
4
|
+
name: "Blog Category Filter",
|
|
5
|
+
description: "Filtro de categorias para listagem do blog (plugin Blog)",
|
|
6
|
+
category: "sections",
|
|
7
|
+
pluginId: "blog",
|
|
8
|
+
canHaveChildren: !1,
|
|
9
|
+
defaultProps: {
|
|
10
|
+
title: "Categorias",
|
|
11
|
+
categories: [
|
|
12
|
+
{ name: "Novidades", slug: "novidades", count: 5 },
|
|
13
|
+
{ name: "Educação", slug: "educacao", count: 8 },
|
|
14
|
+
{ name: "Eventos", slug: "eventos", count: 3 },
|
|
15
|
+
{ name: "Institucional", slug: "institucional", count: 4 },
|
|
16
|
+
{ name: "Dicas", slug: "dicas", count: 6 }
|
|
17
|
+
],
|
|
18
|
+
variant: "chips",
|
|
19
|
+
showCount: !0,
|
|
20
|
+
showAll: !0,
|
|
21
|
+
allLabel: "Todas",
|
|
22
|
+
filterUrl: "/site/p/blog"
|
|
23
|
+
},
|
|
24
|
+
inspectorMeta: {
|
|
25
|
+
title: { label: "Título", inputType: "text", group: "Conteúdo" },
|
|
26
|
+
categories: { label: "Categorias", inputType: "text", group: "Conteúdo", readOnly: !0 },
|
|
27
|
+
variant: {
|
|
28
|
+
label: "Variante",
|
|
29
|
+
inputType: "select",
|
|
30
|
+
group: "Aparência",
|
|
31
|
+
options: [
|
|
32
|
+
{ value: "chips", label: "Chips (pills)" },
|
|
33
|
+
{ value: "buttons", label: "Botões" },
|
|
34
|
+
{ value: "list", label: "Lista vertical" }
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
showCount: { label: "Mostrar Contagem", inputType: "checkbox", group: "Aparência" },
|
|
38
|
+
showAll: { label: "Mostrar 'Todas'", inputType: "checkbox", group: "Comportamento" },
|
|
39
|
+
allLabel: {
|
|
40
|
+
label: "Label 'Todas'",
|
|
41
|
+
inputType: "text",
|
|
42
|
+
group: "Comportamento",
|
|
43
|
+
showWhen: { field: "showAll", equals: !0 }
|
|
44
|
+
},
|
|
45
|
+
activeCategory: { label: "Categoria Ativa", inputType: "text", group: "Comportamento" },
|
|
46
|
+
filterUrl: { label: "URL Base do Filtro", inputType: "text", group: "Comportamento" }
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
e.register(t);
|
|
50
|
+
export {
|
|
51
|
+
t as blogCategoryFilterBlock
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=blogCategoryFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blogCategoryFilter.js","sources":["../../../../../src/engine/registry/blocks/sections/blogCategoryFilter.ts"],"sourcesContent":["import { BlockDefinition } from \"../../types\";\nimport { componentRegistry } from \"../../registry\";\n\nexport const blogCategoryFilterBlock: BlockDefinition<\"blogCategoryFilter\"> = {\n type: \"blogCategoryFilter\",\n name: \"Blog Category Filter\",\n description: \"Filtro de categorias para listagem do blog (plugin Blog)\",\n category: \"sections\",\n pluginId: \"blog\",\n canHaveChildren: false,\n defaultProps: {\n title: \"Categorias\",\n categories: [\n { name: \"Novidades\", slug: \"novidades\", count: 5 },\n { name: \"Educação\", slug: \"educacao\", count: 8 },\n { name: \"Eventos\", slug: \"eventos\", count: 3 },\n { name: \"Institucional\", slug: \"institucional\", count: 4 },\n { name: \"Dicas\", slug: \"dicas\", count: 6 },\n ],\n variant: \"chips\",\n showCount: true,\n showAll: true,\n allLabel: \"Todas\",\n filterUrl: \"/site/p/blog\",\n },\n inspectorMeta: {\n title: { label: \"Título\", inputType: \"text\", group: \"Conteúdo\" },\n categories: { label: \"Categorias\", inputType: \"text\", group: \"Conteúdo\", readOnly: true },\n variant: {\n label: \"Variante\",\n inputType: \"select\",\n group: \"Aparência\",\n options: [\n { value: \"chips\", label: \"Chips (pills)\" },\n { value: \"buttons\", label: \"Botões\" },\n { value: \"list\", label: \"Lista vertical\" },\n ],\n },\n showCount: { label: \"Mostrar Contagem\", inputType: \"checkbox\", group: \"Aparência\" },\n showAll: { label: \"Mostrar 'Todas'\", inputType: \"checkbox\", group: \"Comportamento\" },\n allLabel: {\n label: \"Label 'Todas'\",\n inputType: \"text\",\n group: \"Comportamento\",\n showWhen: { field: \"showAll\", equals: true },\n },\n activeCategory: { label: \"Categoria Ativa\", inputType: \"text\", group: \"Comportamento\" },\n filterUrl: { label: \"URL Base do Filtro\", inputType: \"text\", group: \"Comportamento\" },\n },\n};\n\n// Auto-registro\ncomponentRegistry.register(blogCategoryFilterBlock);\n"],"names":["blogCategoryFilterBlock","componentRegistry"],"mappings":";AAGO,MAAMA,IAAiE;AAAA,EAC5E,MAAM;AAAA,EACN,MAAM;AAAA,EACN,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAA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gBAAA;AAAA,EAAgB;AAExF;AAGAC,EAAkB,SAASD,CAAuB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blogPostDetail.d.ts","sourceRoot":"","sources":["../../../../../src/engine/registry/blocks/sections/blogPostDetail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,eAAO,MAAM,mBAAmB,EAAE,eAAe,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"blogPostDetail.d.ts","sourceRoot":"","sources":["../../../../../src/engine/registry/blocks/sections/blogPostDetail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,eAAO,MAAM,mBAAmB,EAAE,eAAe,CAAC,gBAAgB,CA6CjE,CAAC"}
|
|
@@ -39,7 +39,10 @@ const t = {
|
|
|
39
39
|
showDate: { label: "Mostrar Data", inputType: "checkbox", group: "Visibilidade" },
|
|
40
40
|
showTags: { label: "Mostrar Tags", inputType: "checkbox", group: "Visibilidade" },
|
|
41
41
|
showReadingTime: { label: "Mostrar Tempo de Leitura", inputType: "checkbox", group: "Visibilidade" },
|
|
42
|
-
contentMaxWidth: { label: "Largura Máxima do Conteúdo", inputType: "text", group: "Layout" }
|
|
42
|
+
contentMaxWidth: { label: "Largura Máxima do Conteúdo", inputType: "text", group: "Layout" },
|
|
43
|
+
metaTitle: { label: "Meta Title (SEO)", inputType: "text", group: "SEO", readOnly: !0 },
|
|
44
|
+
metaDescription: { label: "Meta Description (SEO)", inputType: "textarea", group: "SEO", readOnly: !0 },
|
|
45
|
+
ogImage: { label: "Open Graph Image", inputType: "image-upload", group: "SEO", readOnly: !0 }
|
|
43
46
|
}
|
|
44
47
|
};
|
|
45
48
|
e.register(t);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blogPostDetail.js","sources":["../../../../../src/engine/registry/blocks/sections/blogPostDetail.ts"],"sourcesContent":["import { BlockDefinition } from \"../../types\";\nimport { componentRegistry } from \"../../registry\";\n\nexport const blogPostDetailBlock: BlockDefinition<\"blogPostDetail\"> = {\n type: \"blogPostDetail\",\n name: \"Blog Post Detail\",\n description: \"Conteúdo completo de um post do blog (plugin Blog)\",\n category: \"sections\",\n pluginId: \"blog\",\n canHaveChildren: false,\n defaultProps: {\n title: \"Título do Post\",\n content: \"<p>Conteúdo do post...</p>\",\n showFeaturedImage: true,\n showAuthor: true,\n authorVariant: \"inline\",\n showDate: true,\n showTags: true,\n showReadingTime: true,\n contentMaxWidth: \"720px\",\n },\n inspectorMeta: {\n title: { label: \"Título\", inputType: \"text\", group: \"Conteúdo\" },\n content: { label: \"Conteúdo\", inputType: \"textarea\", group: \"Conteúdo\" },\n featuredImage: { label: \"Imagem Destacada\", inputType: \"image-upload\", group: \"Mídia\" },\n date: { label: \"Data\", inputType: \"text\", group: \"Metadata\" },\n category: { label: \"Categoria\", inputType: \"text\", group: \"Metadata\" },\n readingTime: { label: \"Tempo de Leitura\", inputType: \"text\", group: \"Metadata\" },\n showFeaturedImage: { label: \"Mostrar Imagem Destacada\", inputType: \"checkbox\", group: \"Visibilidade\" },\n showAuthor: { label: \"Mostrar Autor\", inputType: \"checkbox\", group: \"Autor\" },\n authorVariant: {\n label: \"Variante do Autor\",\n inputType: \"select\",\n group: \"Autor\",\n options: [\n { value: \"inline\", label: \"Inline — Avatar + nome\" },\n { value: \"card\", label: \"Card — Avatar, nome e bio\" },\n { value: \"minimal\", label: \"Minimal — Apenas nome\" },\n ],\n },\n showDate: { label: \"Mostrar Data\", inputType: \"checkbox\", group: \"Visibilidade\" },\n showTags: { label: \"Mostrar Tags\", inputType: \"checkbox\", group: \"Visibilidade\" },\n showReadingTime: { label: \"Mostrar Tempo de Leitura\", inputType: \"checkbox\", group: \"Visibilidade\" },\n contentMaxWidth: { label: \"Largura Máxima do Conteúdo\", inputType: \"text\", group: \"Layout\" },\n },\n};\n\n// Auto-registro\ncomponentRegistry.register(blogPostDet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AAW,YAAY,OAAO,eAAA;AAAA,IACjE,iBAAiB,EAAE,OAAO,4BAA4B,WAAW,YAAY,OAAO,eAAA;AAAA,IACpF,iBAAiB,EAAE,OAAO,8BAA8B,WAAW,QAAQ,OAAO,SAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"blogPostDetail.js","sources":["../../../../../src/engine/registry/blocks/sections/blogPostDetail.ts"],"sourcesContent":["import { BlockDefinition } from \"../../types\";\nimport { componentRegistry } from \"../../registry\";\n\nexport const blogPostDetailBlock: BlockDefinition<\"blogPostDetail\"> = {\n type: \"blogPostDetail\",\n name: \"Blog Post Detail\",\n description: \"Conteúdo completo de um post do blog (plugin Blog)\",\n category: \"sections\",\n pluginId: \"blog\",\n canHaveChildren: false,\n defaultProps: {\n title: \"Título do Post\",\n content: \"<p>Conteúdo do post...</p>\",\n showFeaturedImage: true,\n showAuthor: true,\n authorVariant: \"inline\",\n showDate: true,\n showTags: true,\n showReadingTime: true,\n contentMaxWidth: \"720px\",\n },\n inspectorMeta: {\n title: { label: \"Título\", inputType: \"text\", group: \"Conteúdo\" },\n content: { label: \"Conteúdo\", inputType: \"textarea\", group: \"Conteúdo\" },\n featuredImage: { label: \"Imagem Destacada\", inputType: \"image-upload\", group: \"Mídia\" },\n date: { label: \"Data\", inputType: \"text\", group: \"Metadata\" },\n category: { label: \"Categoria\", inputType: \"text\", group: \"Metadata\" },\n readingTime: { label: \"Tempo de Leitura\", inputType: \"text\", group: \"Metadata\" },\n showFeaturedImage: { label: \"Mostrar Imagem Destacada\", inputType: \"checkbox\", group: \"Visibilidade\" },\n showAuthor: { label: \"Mostrar Autor\", inputType: \"checkbox\", group: \"Autor\" },\n authorVariant: {\n label: \"Variante do Autor\",\n inputType: \"select\",\n group: \"Autor\",\n options: [\n { value: \"inline\", label: \"Inline — Avatar + nome\" },\n { value: \"card\", label: \"Card — Avatar, nome e bio\" },\n { value: \"minimal\", label: \"Minimal — Apenas nome\" },\n ],\n },\n showDate: { label: \"Mostrar Data\", inputType: \"checkbox\", group: \"Visibilidade\" },\n showTags: { label: \"Mostrar Tags\", inputType: \"checkbox\", group: \"Visibilidade\" },\n showReadingTime: { label: \"Mostrar Tempo de Leitura\", inputType: \"checkbox\", group: \"Visibilidade\" },\n contentMaxWidth: { label: \"Largura Máxima do Conteúdo\", inputType: \"text\", group: \"Layout\" },\n metaTitle: { label: \"Meta Title (SEO)\", inputType: \"text\", group: \"SEO\", readOnly: true },\n metaDescription: { label: \"Meta Description (SEO)\", inputType: \"textarea\", group: \"SEO\", readOnly: true },\n ogImage: { label: \"Open Graph Image\", inputType: \"image-upload\", group: \"SEO\", readOnly: true },\n },\n};\n\n// Auto-registro\ncomponentRegistry.register(blogPostDetailBlock);\n"],"names":["blogPostDetailBlock","componentRegistry"],"mappings":";AAGO,MAAMA,IAAyD;AAAA,EACpE,MAAM;AAAA,EACN,MAAM;AAAA,EACN,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,cAAc;AAAA,IACZ,OAAO;AAAA,IACP,SAAS;AAAA,IACT,mBAAmB;AAAA,IACnB,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,UAAU;AAAA,IACV,UAAU;AAAA,IACV,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,EAAA;AAAA,EAEnB,eAAe;AAAA,IACb,OAAO,EAAE,OAAO,UAAU,WAAW,QAAQ,OAAO,WAAA;AAAA,IACpD,SAAS,EAAE,OAAO,YAAY,WAAW,YAAY,OAAO,WAAA;AAAA,IAC5D,eAAe,EAAE,OAAO,oBAAoB,WAAW,gBAAgB,OAAO,QAAA;AAAA,IAC9E,MAAM,EAAE,OAAO,QAAQ,WAAW,QAAQ,OAAO,WAAA;AAAA,IACjD,UAAU,EAAE,OAAO,aAAa,WAAW,QAAQ,OAAO,WAAA;AAAA,IAC1D,aAAa,EAAE,OAAO,oBAAoB,WAAW,QAAQ,OAAO,WAAA;AAAA,IACpE,mBAAmB,EAAE,OAAO,4BAA4B,WAAW,YAAY,OAAO,eAAA;AAAA,IACtF,YAAY,EAAE,OAAO,iBAAiB,WAAW,YAAY,OAAO,QAAA;AAAA,IACpE,eAAe;AAAA,MACb,OAAO;AAAA,MACP,WAAW;AAAA,MACX,OAAO;AAAA,MACP,SAAS;AAAA,QACP,EAAE,OAAO,UAAU,OAAO,yBAAA;AAAA,QAC1B,EAAE,OAAO,QAAQ,OAAO,4BAAA;AAAA,QACxB,EAAE,OAAO,WAAW,OAAO,wBAAA;AAAA,MAAwB;AAAA,IACrD;AAAA,IAEF,UAAU,EAAE,OAAO,gBAAgB,WAAW,YAAY,OAAO,eAAA;AAAA,IACjE,UAAU,EAAE,OAAO,gBAAgB,WAAW,YAAY,OAAO,eAAA;AAAA,IACjE,iBAAiB,EAAE,OAAO,4BAA4B,WAAW,YAAY,OAAO,eAAA;AAAA,IACpF,iBAAiB,EAAE,OAAO,8BAA8B,WAAW,QAAQ,OAAO,SAAA;AAAA,IAClF,WAAW,EAAE,OAAO,oBAAoB,WAAW,QAAQ,OAAO,OAAO,UAAU,GAAA;AAAA,IACnF,iBAAiB,EAAE,OAAO,0BAA0B,WAAW,YAAY,OAAO,OAAO,UAAU,GAAA;AAAA,IACnG,SAAS,EAAE,OAAO,oBAAoB,WAAW,gBAAgB,OAAO,OAAO,UAAU,GAAA;AAAA,EAAK;AAElG;AAGAC,EAAkB,SAASD,CAAmB;"}
|
|
@@ -6,7 +6,7 @@ const o = [
|
|
|
6
6
|
image: "https://images.unsplash.com/photo-1499750310107-5fef28a66643?w=800&h=400&fit=crop",
|
|
7
7
|
category: "Novidades",
|
|
8
8
|
date: "15 Jan 2025",
|
|
9
|
-
linkHref: "/blog/bem-vindo",
|
|
9
|
+
linkHref: "/site/p/blog/bem-vindo",
|
|
10
10
|
linkText: "Ler mais"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
@@ -15,7 +15,7 @@ const o = [
|
|
|
15
15
|
image: "https://images.unsplash.com/photo-1523050854058-8df90110c9f1?w=800&h=400&fit=crop",
|
|
16
16
|
category: "Educação",
|
|
17
17
|
date: "20 Jan 2025",
|
|
18
|
-
linkHref: "/blog/dicas-estudantes",
|
|
18
|
+
linkHref: "/site/p/blog/dicas-estudantes",
|
|
19
19
|
linkText: "Ler mais"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
@@ -24,7 +24,7 @@ const o = [
|
|
|
24
24
|
image: "https://images.unsplash.com/photo-1524178232363-1fb2b075b655?w=800&h=400&fit=crop",
|
|
25
25
|
category: "Institucional",
|
|
26
26
|
date: "01 Fev 2025",
|
|
27
|
-
linkHref: "/blog/novidades-semestre",
|
|
27
|
+
linkHref: "/site/p/blog/novidades-semestre",
|
|
28
28
|
linkText: "Ler mais"
|
|
29
29
|
}
|
|
30
30
|
], a = {
|
|
@@ -42,7 +42,7 @@ const o = [
|
|
|
42
42
|
variant: "default",
|
|
43
43
|
showViewAll: !1,
|
|
44
44
|
viewAllText: "Ver todos",
|
|
45
|
-
viewAllHref: "/blog"
|
|
45
|
+
viewAllHref: "/site/p/blog"
|
|
46
46
|
},
|
|
47
47
|
inspectorMeta: {
|
|
48
48
|
title: { label: "Título", inputType: "text", group: "Cabeçalho" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blogPostGrid.js","sources":["../../../../../src/engine/registry/blocks/sections/blogPostGrid.ts"],"sourcesContent":["import { BlockDefinition } from \"../../types\";\nimport { componentRegistry } from \"../../registry\";\n\n/**\n * Sample cards for editor preview.\n * In production, these are replaced by ContentProvider data.\n */\nconst sampleCards = [\n {\n title: \"Bem-vindo ao nosso blog!\",\n excerpt: \"Estamos animados em lançar nosso blog oficial. Acompanhe novidades e dicas.\",\n image: \"https://images.unsplash.com/photo-1499750310107-5fef28a66643?w=800&h=400&fit=crop\",\n category: \"Novidades\",\n date: \"15 Jan 2025\",\n linkHref: \"/blog/bem-vindo\",\n linkText: \"Ler mais\",\n },\n {\n title: \"5 Dicas para Estudantes de Sucesso\",\n excerpt: \"Confira as melhores práticas para melhorar seus estudos e alcançar seus objetivos.\",\n image: \"https://images.unsplash.com/photo-1523050854058-8df90110c9f1?w=800&h=400&fit=crop\",\n category: \"Educação\",\n date: \"20 Jan 2025\",\n linkHref: \"/blog/dicas-estudantes\",\n linkText: \"Ler mais\",\n },\n {\n title: \"Novidades para o Próximo Semestre\",\n excerpt: \"Novos cursos, eventos e melhorias que estão chegando. Saiba tudo sobre o que vem por aí.\",\n image: \"https://images.unsplash.com/photo-1524178232363-1fb2b075b655?w=800&h=400&fit=crop\",\n category: \"Institucional\",\n date: \"01 Fev 2025\",\n linkHref: \"/blog/novidades-semestre\",\n linkText: \"Ler mais\",\n },\n];\n\nexport const blogPostGridBlock: BlockDefinition<\"blogPostGrid\"> = {\n type: \"blogPostGrid\",\n name: \"Blog Post Grid\",\n description: \"Grid de posts do blog com suporte a dados dinâmicos (plugin Blog)\",\n category: \"sections\",\n pluginId: \"blog\",\n canHaveChildren: false,\n defaultProps: {\n title: \"Blog\",\n subtitle: \"Últimas publicações\",\n columns: 3,\n cards: sampleCards,\n variant: \"default\",\n showViewAll: false,\n viewAllText: \"Ver todos\",\n viewAllHref: \"/blog\",\n },\n inspectorMeta: {\n title: { label: \"Título\", inputType: \"text\", group: \"Cabeçalho\" },\n subtitle: { label: \"Subtítulo\", inputType: \"text\", group: \"Cabeçalho\" },\n columns: {\n label: \"Colunas\",\n inputType: \"select\",\n options: [\n { label: \"2\", value: 2 },\n { label: \"3\", value: 3 },\n { label: \"4\", value: 4 },\n ],\n group: \"Layout\",\n },\n variant: {\n label: \"Variante\",\n inputType: \"select\",\n options: [\n { label: \"Padrão\", value: \"default\" },\n { label: \"Destaque\", value: \"featured\" },\n { label: \"Minimal\", value: \"minimal\" },\n ],\n group: \"Aparência\",\n },\n showViewAll: { label: \"Mostrar 'Ver Todos'\", inputType: \"checkbox\", group: \"Rodapé\" },\n viewAllText: {\n label: \"Texto do Link\",\n inputType: \"text\",\n group: \"Rodapé\",\n showWhen: { field: \"showViewAll\", equals: true },\n },\n viewAllHref: {\n label: \"URL do Link\",\n inputType: \"text\",\n group: \"Rodapé\",\n showWhen: { field: \"showViewAll\", equals: true },\n },\n },\n};\n\n// Auto-registro\ncomponentRegistry.register(blogPostGridBlock);\n"],"names":["sampleCards","blogPostGridBlock","componentRegistry"],"mappings":";AAOA,MAAMA,IAAc;AAAA,EAClB;AAAA,IACE,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,EAAA;AAAA,EAEZ;AAAA,IACE,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,EAAA;AAAA,EAEZ;AAAA,IACE,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,EAAA;AAEd,GAEaC,IAAqD;AAAA,EAChE,MAAM;AAAA,EACN,MAAM;AAAA,EACN,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,cAAc;AAAA,IACZ,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,IACT,OAAOD;AAAA,IACP,SAAS;AAAA,IACT,aAAa;AAAA,IACb,aAAa;AAAA,IACb,aAAa;AAAA,EAAA;AAAA,EAEf,eAAe;AAAA,IACb,OAAO,EAAE,OAAO,UAAU,WAAW,QAAQ,OAAO,YAAA;AAAA,IACpD,UAAU,EAAE,OAAO,aAAa,WAAW,QAAQ,OAAO,YAAA;AAAA,IAC1D,SAAS;AAAA,MACP,OAAO;AAAA,MACP,WAAW;AAAA,MACX,SAAS;AAAA,QACP,EAAE,OAAO,KAAK,OAAO,EAAA;AAAA,QACrB,EAAE,OAAO,KAAK,OAAO,EAAA;AAAA,QACrB,EAAE,OAAO,KAAK,OAAO,EAAA;AAAA,MAAE;AAAA,MAEzB,OAAO;AAAA,IAAA;AAAA,IAET,SAAS;AAAA,MACP,OAAO;AAAA,MACP,WAAW;AAAA,MACX,SAAS;AAAA,QACP,EAAE,OAAO,UAAU,OAAO,UAAA;AAAA,QAC1B,EAAE,OAAO,YAAY,OAAO,WAAA;AAAA,QAC5B,EAAE,OAAO,WAAW,OAAO,UAAA;AAAA,MAAU;AAAA,MAEvC,OAAO;AAAA,IAAA;AAAA,IAET,aAAa,EAAE,OAAO,uBAAuB,WAAW,YAAY,OAAO,SAAA;AAAA,IAC3E,aAAa;AAAA,MACX,OAAO;AAAA,MACP,WAAW;AAAA,MACX,OAAO;AAAA,MACP,UAAU,EAAE,OAAO,eAAe,QAAQ,GAAA;AAAA,IAAK;AAAA,IAEjD,aAAa;AAAA,MACX,OAAO;AAAA,MACP,WAAW;AAAA,MACX,OAAO;AAAA,MACP,UAAU,EAAE,OAAO,eAAe,QAAQ,GAAA;AAAA,IAAK;AAAA,EACjD;AAEJ;AAGAE,EAAkB,SAASD,CAAiB;"}
|
|
1
|
+
{"version":3,"file":"blogPostGrid.js","sources":["../../../../../src/engine/registry/blocks/sections/blogPostGrid.ts"],"sourcesContent":["import { BlockDefinition } from \"../../types\";\nimport { componentRegistry } from \"../../registry\";\n\n/**\n * Sample cards for editor preview.\n * In production, these are replaced by ContentProvider data.\n */\nconst sampleCards = [\n {\n title: \"Bem-vindo ao nosso blog!\",\n excerpt: \"Estamos animados em lançar nosso blog oficial. Acompanhe novidades e dicas.\",\n image: \"https://images.unsplash.com/photo-1499750310107-5fef28a66643?w=800&h=400&fit=crop\",\n category: \"Novidades\",\n date: \"15 Jan 2025\",\n linkHref: \"/site/p/blog/bem-vindo\",\n linkText: \"Ler mais\",\n },\n {\n title: \"5 Dicas para Estudantes de Sucesso\",\n excerpt: \"Confira as melhores práticas para melhorar seus estudos e alcançar seus objetivos.\",\n image: \"https://images.unsplash.com/photo-1523050854058-8df90110c9f1?w=800&h=400&fit=crop\",\n category: \"Educação\",\n date: \"20 Jan 2025\",\n linkHref: \"/site/p/blog/dicas-estudantes\",\n linkText: \"Ler mais\",\n },\n {\n title: \"Novidades para o Próximo Semestre\",\n excerpt: \"Novos cursos, eventos e melhorias que estão chegando. Saiba tudo sobre o que vem por aí.\",\n image: \"https://images.unsplash.com/photo-1524178232363-1fb2b075b655?w=800&h=400&fit=crop\",\n category: \"Institucional\",\n date: \"01 Fev 2025\",\n linkHref: \"/site/p/blog/novidades-semestre\",\n linkText: \"Ler mais\",\n },\n];\n\nexport const blogPostGridBlock: BlockDefinition<\"blogPostGrid\"> = {\n type: \"blogPostGrid\",\n name: \"Blog Post Grid\",\n description: \"Grid de posts do blog com suporte a dados dinâmicos (plugin Blog)\",\n category: \"sections\",\n pluginId: \"blog\",\n canHaveChildren: false,\n defaultProps: {\n title: \"Blog\",\n subtitle: \"Últimas publicações\",\n columns: 3,\n cards: sampleCards,\n variant: \"default\",\n showViewAll: false,\n viewAllText: \"Ver todos\",\n viewAllHref: \"/site/p/blog\",\n },\n inspectorMeta: {\n title: { label: \"Título\", inputType: \"text\", group: \"Cabeçalho\" },\n subtitle: { label: \"Subtítulo\", inputType: \"text\", group: \"Cabeçalho\" },\n columns: {\n label: \"Colunas\",\n inputType: \"select\",\n options: [\n { label: \"2\", value: 2 },\n { label: \"3\", value: 3 },\n { label: \"4\", value: 4 },\n ],\n group: \"Layout\",\n },\n variant: {\n label: \"Variante\",\n inputType: \"select\",\n options: [\n { label: \"Padrão\", value: \"default\" },\n { label: \"Destaque\", value: \"featured\" },\n { label: \"Minimal\", value: \"minimal\" },\n ],\n group: \"Aparência\",\n },\n showViewAll: { label: \"Mostrar 'Ver Todos'\", inputType: \"checkbox\", group: \"Rodapé\" },\n viewAllText: {\n label: \"Texto do Link\",\n inputType: \"text\",\n group: \"Rodapé\",\n showWhen: { field: \"showViewAll\", equals: true },\n },\n viewAllHref: {\n label: \"URL do Link\",\n inputType: \"text\",\n group: \"Rodapé\",\n showWhen: { field: \"showViewAll\", equals: true },\n },\n },\n};\n\n// Auto-registro\ncomponentRegistry.register(blogPostGridBlock);\n"],"names":["sampleCards","blogPostGridBlock","componentRegistry"],"mappings":";AAOA,MAAMA,IAAc;AAAA,EAClB;AAAA,IACE,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,EAAA;AAAA,EAEZ;AAAA,IACE,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,EAAA;AAAA,EAEZ;AAAA,IACE,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,EAAA;AAEd,GAEaC,IAAqD;AAAA,EAChE,MAAM;AAAA,EACN,MAAM;AAAA,EACN,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,cAAc;AAAA,IACZ,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,IACT,OAAOD;AAAA,IACP,SAAS;AAAA,IACT,aAAa;AAAA,IACb,aAAa;AAAA,IACb,aAAa;AAAA,EAAA;AAAA,EAEf,eAAe;AAAA,IACb,OAAO,EAAE,OAAO,UAAU,WAAW,QAAQ,OAAO,YAAA;AAAA,IACpD,UAAU,EAAE,OAAO,aAAa,WAAW,QAAQ,OAAO,YAAA;AAAA,IAC1D,SAAS;AAAA,MACP,OAAO;AAAA,MACP,WAAW;AAAA,MACX,SAAS;AAAA,QACP,EAAE,OAAO,KAAK,OAAO,EAAA;AAAA,QACrB,EAAE,OAAO,KAAK,OAAO,EAAA;AAAA,QACrB,EAAE,OAAO,KAAK,OAAO,EAAA;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