@brunoalz/smartgesti-site-editor 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/editor/BlockSelector.js +4 -2
  2. package/dist/editor/BlockSelector.js.map +1 -1
  3. package/dist/engine/export/exportHtml.d.ts +5 -1
  4. package/dist/engine/export/exportHtml.d.ts.map +1 -1
  5. package/dist/engine/export/exportHtml.js +69 -51
  6. package/dist/engine/export/exportHtml.js.map +1 -1
  7. package/dist/engine/export/exporters/sections/BlogPostExporters.d.ts +2 -0
  8. package/dist/engine/export/exporters/sections/BlogPostExporters.d.ts.map +1 -1
  9. package/dist/engine/export/exporters/sections/BlogPostExporters.js +137 -80
  10. package/dist/engine/export/exporters/sections/BlogPostExporters.js.map +1 -1
  11. package/dist/engine/export/exporters/sections/index.d.ts.map +1 -1
  12. package/dist/engine/export/exporters/sections/index.js +40 -38
  13. package/dist/engine/export/exporters/sections/index.js.map +1 -1
  14. package/dist/engine/index.js +97 -95
  15. package/dist/engine/index.js.map +1 -1
  16. package/dist/engine/plugins/builtin/blog/manifest.d.ts.map +1 -1
  17. package/dist/engine/plugins/builtin/blog/manifest.js +50 -18
  18. package/dist/engine/plugins/builtin/blog/manifest.js.map +1 -1
  19. package/dist/engine/plugins/builtin/blog/mockContentProvider.d.ts.map +1 -1
  20. package/dist/engine/plugins/builtin/blog/mockContentProvider.js +13 -9
  21. package/dist/engine/plugins/builtin/blog/mockContentProvider.js.map +1 -1
  22. package/dist/engine/plugins/contentHydration.d.ts.map +1 -1
  23. package/dist/engine/plugins/contentHydration.js +119 -79
  24. package/dist/engine/plugins/contentHydration.js.map +1 -1
  25. package/dist/engine/plugins/types.d.ts +5 -0
  26. package/dist/engine/plugins/types.d.ts.map +1 -1
  27. package/dist/engine/registry/blocks/sections/blogCategoryFilter.d.ts +3 -0
  28. package/dist/engine/registry/blocks/sections/blogCategoryFilter.d.ts.map +1 -0
  29. package/dist/engine/registry/blocks/sections/blogCategoryFilter.js +53 -0
  30. package/dist/engine/registry/blocks/sections/blogCategoryFilter.js.map +1 -0
  31. package/dist/engine/registry/blocks/sections/blogPostDetail.d.ts.map +1 -1
  32. package/dist/engine/registry/blocks/sections/blogPostDetail.js +4 -1
  33. package/dist/engine/registry/blocks/sections/blogPostDetail.js.map +1 -1
  34. package/dist/engine/registry/blocks/sections/blogSearchBar.d.ts +3 -0
  35. package/dist/engine/registry/blocks/sections/blogSearchBar.d.ts.map +1 -0
  36. package/dist/engine/registry/blocks/sections/blogSearchBar.js +56 -0
  37. package/dist/engine/registry/blocks/sections/blogSearchBar.js.map +1 -0
  38. package/dist/engine/registry/blocks/sections/index.d.ts +2 -0
  39. package/dist/engine/registry/blocks/sections/index.d.ts.map +1 -1
  40. package/dist/engine/render/renderers/sections/BlogCategoryFilterRenderer.d.ts +3 -0
  41. package/dist/engine/render/renderers/sections/BlogCategoryFilterRenderer.d.ts.map +1 -0
  42. package/dist/engine/render/renderers/sections/BlogCategoryFilterRenderer.js +213 -0
  43. package/dist/engine/render/renderers/sections/BlogCategoryFilterRenderer.js.map +1 -0
  44. package/dist/engine/render/renderers/sections/BlogSearchBarRenderer.d.ts +3 -0
  45. package/dist/engine/render/renderers/sections/BlogSearchBarRenderer.d.ts.map +1 -0
  46. package/dist/engine/render/renderers/sections/BlogSearchBarRenderer.js +138 -0
  47. package/dist/engine/render/renderers/sections/BlogSearchBarRenderer.js.map +1 -0
  48. package/dist/engine/render/renderers/sections/index.js +28 -24
  49. package/dist/engine/render/renderers/sections/index.js.map +1 -1
  50. package/dist/engine/schema/siteDocument.d.ts +66 -2
  51. package/dist/engine/schema/siteDocument.d.ts.map +1 -1
  52. package/dist/engine/schema/siteDocument.js.map +1 -1
  53. package/dist/index.d.ts +1 -1
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +108 -106
  56. package/dist/index.js.map +1 -1
  57. package/dist/utils/blockIcons.d.ts.map +1 -1
  58. package/dist/utils/blockIcons.js +2 -0
  59. package/dist/utils/blockIcons.js.map +1 -1
  60. package/dist/viewer/LandingPageViewer.d.ts +7 -2
  61. package/dist/viewer/LandingPageViewer.d.ts.map +1 -1
  62. package/dist/viewer/LandingPageViewer.js +106 -92
  63. package/dist/viewer/LandingPageViewer.js.map +1 -1
  64. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { createEmptySiteDocument as te } from "./schema/siteDocument.js";
2
- import { corporateThemeTokens as ae, darkThemeTokens as me, defaultComponentTokens as ie, defaultEffectTokens as pe, defaultLayoutTokens as se, defaultThemeTokens as ne, generateThemeCSSVariables as le, gradientDirectionMap as ce, gradientThemeTokens as ge, playfulThemeTokens as de, radiusScaleMap as fe, shadowScaleMap as he, spacingScaleMap as Pe } from "./schema/themeTokens.js";
3
- import { componentRegistry as xe } from "./registry/registry.js";
1
+ import { createEmptySiteDocument as ae } from "./schema/siteDocument.js";
2
+ import { corporateThemeTokens as ie, darkThemeTokens as pe, defaultComponentTokens as se, defaultEffectTokens as ne, defaultLayoutTokens as le, defaultThemeTokens as ce, generateThemeCSSVariables as ge, gradientDirectionMap as de, gradientThemeTokens as fe, playfulThemeTokens as he, radiusScaleMap as Pe, shadowScaleMap as Te, spacingScaleMap as xe } from "./schema/themeTokens.js";
3
+ import { componentRegistry as ke } from "./registry/registry.js";
4
4
  import "./registry/blocks/layout/container.js";
5
5
  import "./registry/blocks/layout/stack.js";
6
6
  import "./registry/blocks/layout/grid.js";
@@ -45,6 +45,8 @@ import "./registry/blocks/sections/categoryCardGrid.js";
45
45
  import "./registry/blocks/sections/blogPostCard.js";
46
46
  import "./registry/blocks/sections/blogPostGrid.js";
47
47
  import "./registry/blocks/sections/blogPostDetail.js";
48
+ import "./registry/blocks/sections/blogCategoryFilter.js";
49
+ import "./registry/blocks/sections/blogSearchBar.js";
48
50
  import "./registry/blocks/sections/productShowcase.js";
49
51
  import "./registry/blocks/sections/aboutSection.js";
50
52
  import "./registry/blocks/sections/contactSection.js";
@@ -52,99 +54,99 @@ import "./registry/blocks/forms/form.js";
52
54
  import "./registry/blocks/forms/input.js";
53
55
  import "./registry/blocks/forms/textarea.js";
54
56
  import "./registry/blocks/forms/select.js";
55
- import { RenderNode as ke } from "./render/renderNode.js";
56
- import { RenderPage as ye, renderPage as Me } from "./render/renderPage.js";
57
- import { clearHtmlCache as Ve, exportBlockToHtml as be, exportDocumentToHtml as He, exportPageToHtml as ve, generateAssetsManifest as Re } from "./export/exportHtml.js";
58
- import { isSafeUrl as Ae, sanitizeHtml as De } from "./export/sanitizeHtml.js";
59
- import { Preview as Z } from "./preview/Preview.js";
60
- import { applyPatch as Ie, createAddPatch as Ne, createCopyPatch as Oe, createMovePatch as _e, createRemovePatch as we, createReplacePatch as Be } from "./patch/applyPatch.js";
61
- import { HistoryManager as je, createHistoryManager as Ue } from "./patch/history.js";
62
- import { PatchBuilder as ze } from "./patch/PatchBuilder.js";
63
- import { applyOverrides as Ke, classicPreset as qe, cleanPreset as Je, corporatePreset as Qe, getAllPresets as Xe, getPreset as Ye, glassPreset as Ze, minimalPreset as $e, neonPreset as er, pastelPreset as rr, playfulKidsPreset as tr, themePresets as or, validateContrast as ar } from "./presets/themePresets.js";
64
- import { HERO_IMAGE_NAMES as ir, PLACEHOLDER_IMAGE_URL as pr, getHeroVariation as sr, heroVariationIds as nr, heroVariations as lr } from "./presets/heroVariations.js";
65
- import { getNavbarVariation as gr, navbarVariationIds as dr, navbarVariations as fr } from "./presets/navbarVariations.js";
66
- import { generateCompleteLandingPage as Pr, generateModernLandingPage as Tr, generatePatchesForLandingPage as xr } from "./generators/generateLandingPage.js";
57
+ import { RenderNode as ye } from "./render/renderNode.js";
58
+ import { RenderPage as Ce, renderPage as Ve } from "./render/renderPage.js";
59
+ import { clearHtmlCache as He, exportBlockToHtml as ve, exportDocumentToHtml as Re, exportPageToHtml as Ee, generateAssetsManifest as Ae } from "./export/exportHtml.js";
60
+ import { isSafeUrl as Le, sanitizeHtml as Ie } from "./export/sanitizeHtml.js";
61
+ import { Preview as ee } from "./preview/Preview.js";
62
+ import { applyPatch as Oe, createAddPatch as _e, createCopyPatch as we, createMovePatch as Be, createRemovePatch as Ge, createReplacePatch as je } from "./patch/applyPatch.js";
63
+ import { HistoryManager as We, createHistoryManager as ze } from "./patch/history.js";
64
+ import { PatchBuilder as Ke } from "./patch/PatchBuilder.js";
65
+ import { applyOverrides as Je, classicPreset as Qe, cleanPreset as Xe, corporatePreset as Ye, getAllPresets as Ze, getPreset as $e, glassPreset as er, minimalPreset as rr, neonPreset as tr, pastelPreset as or, playfulKidsPreset as ar, themePresets as mr, validateContrast as ir } from "./presets/themePresets.js";
66
+ import { HERO_IMAGE_NAMES as sr, PLACEHOLDER_IMAGE_URL as nr, getHeroVariation as lr, heroVariationIds as cr, heroVariations as gr } from "./presets/heroVariations.js";
67
+ import { getNavbarVariation as fr, navbarVariationIds as hr, navbarVariations as Pr } from "./presets/navbarVariations.js";
68
+ import { generateCompleteLandingPage as xr, generateModernLandingPage as Sr, generatePatchesForLandingPage as kr } from "./generators/generateLandingPage.js";
67
69
  import "./plugins/builtin/blog/manifest.js";
68
- import { evaluateShowWhen as kr } from "./shared/showWhen.js";
69
- import { createThemeStyle as yr, generateCSSVariables as Mr, generateCSSVariablesObject as Cr, mergeThemeTokens as Vr } from "./theme/generateCSSVariables.js";
70
- import { gridPresetMap as Hr, imageGridPresetIds as vr } from "./shared/imageGrid/presets.js";
71
- import { hydratePageWithContent as Er } from "./plugins/contentHydration.js";
72
- import { matchDynamicPage as Dr } from "./plugins/dynamicPageResolver.js";
73
- import { pluginRegistry as Ir } from "./plugins/pluginRegistry.js";
74
- import { renderBlockNode as Or } from "./render/renderNodeImpl.js";
75
- import { darkTheme as wr, defaultTheme as Br } from "./theme/defaultTheme.js";
70
+ import { evaluateShowWhen as yr } from "./shared/showWhen.js";
71
+ import { createThemeStyle as Cr, generateCSSVariables as Vr, generateCSSVariablesObject as br, mergeThemeTokens as Hr } from "./theme/generateCSSVariables.js";
72
+ import { gridPresetMap as Rr, imageGridPresetIds as Er } from "./shared/imageGrid/presets.js";
73
+ import { hydratePageWithContent as Dr } from "./plugins/contentHydration.js";
74
+ import { matchDynamicPage as Ir } from "./plugins/dynamicPageResolver.js";
75
+ import { pluginRegistry as Or } from "./plugins/pluginRegistry.js";
76
+ import { renderBlockNode as wr } from "./render/renderNodeImpl.js";
77
+ import { darkTheme as Gr, defaultTheme as jr } from "./theme/defaultTheme.js";
76
78
  export {
77
- ir as HERO_IMAGE_NAMES,
78
- je as HistoryManager,
79
- pr as PLACEHOLDER_IMAGE_URL,
80
- ze as PatchBuilder,
81
- Z as Preview,
82
- ke as RenderNode,
83
- ye as RenderPage,
84
- Ke as applyOverrides,
85
- Ie as applyPatch,
86
- qe as classicPreset,
87
- Je as cleanPreset,
88
- Ve as clearHtmlCache,
89
- xe as componentRegistry,
90
- Qe as corporatePreset,
91
- ae as corporateThemeTokens,
92
- Ne as createAddPatch,
93
- Oe as createCopyPatch,
94
- te as createEmptySiteDocument,
95
- Ue as createHistoryManager,
96
- _e as createMovePatch,
97
- we as createRemovePatch,
98
- Be as createReplacePatch,
99
- yr as createSiteThemeStyle,
100
- me as darkThemeTokens,
101
- ie as defaultComponentTokens,
102
- pe as defaultEffectTokens,
103
- se as defaultLayoutTokens,
104
- ne as defaultThemeTokens,
105
- kr as evaluateShowWhen,
106
- be as exportBlockToHtml,
107
- He as exportDocumentToHtml,
108
- ve as exportPageToHtml,
109
- Re as generateAssetsManifest,
110
- Pr as generateCompleteLandingPage,
111
- Tr as generateModernLandingPage,
112
- xr as generatePatchesForLandingPage,
113
- Mr as generateSiteCSSVariables,
114
- Cr as generateSiteCSSVariablesObject,
115
- le as generateThemeCSSVariables,
116
- Xe as getAllPresets,
117
- sr as getHeroVariation,
118
- gr as getNavbarVariation,
119
- Ye as getPreset,
120
- Ze as glassPreset,
121
- ce as gradientDirectionMap,
122
- ge as gradientThemeTokens,
123
- Hr as gridPresetMap,
124
- nr as heroVariationIds,
125
- lr as heroVariations,
126
- Er as hydratePageWithContent,
127
- vr as imageGridPresetIds,
128
- Ae as isSafeUrl,
129
- Dr as matchDynamicPage,
130
- Vr as mergeSiteThemeTokens,
131
- $e as minimalPreset,
132
- dr as navbarVariationIds,
133
- fr as navbarVariations,
134
- er as neonPreset,
135
- rr as pastelPreset,
136
- tr as playfulKidsPreset,
137
- de as playfulThemeTokens,
138
- Ir as pluginRegistry,
139
- fe as radiusScaleMap,
140
- Or as renderNode,
141
- Me as renderPage,
142
- De as sanitizeHtml,
143
- he as shadowScaleMap,
144
- wr as siteDarkTheme,
145
- Br as siteDefaultTheme,
146
- Pe as spacingScaleMap,
147
- or as themePresets,
148
- ar as validateContrast
79
+ sr as HERO_IMAGE_NAMES,
80
+ We as HistoryManager,
81
+ nr as PLACEHOLDER_IMAGE_URL,
82
+ Ke as PatchBuilder,
83
+ ee as Preview,
84
+ ye as RenderNode,
85
+ Ce as RenderPage,
86
+ Je as applyOverrides,
87
+ Oe as applyPatch,
88
+ Qe as classicPreset,
89
+ Xe as cleanPreset,
90
+ He as clearHtmlCache,
91
+ ke as componentRegistry,
92
+ Ye as corporatePreset,
93
+ ie as corporateThemeTokens,
94
+ _e as createAddPatch,
95
+ we as createCopyPatch,
96
+ ae as createEmptySiteDocument,
97
+ ze as createHistoryManager,
98
+ Be as createMovePatch,
99
+ Ge as createRemovePatch,
100
+ je as createReplacePatch,
101
+ Cr as createSiteThemeStyle,
102
+ pe as darkThemeTokens,
103
+ se as defaultComponentTokens,
104
+ ne as defaultEffectTokens,
105
+ le as defaultLayoutTokens,
106
+ ce as defaultThemeTokens,
107
+ yr as evaluateShowWhen,
108
+ ve as exportBlockToHtml,
109
+ Re as exportDocumentToHtml,
110
+ Ee as exportPageToHtml,
111
+ Ae as generateAssetsManifest,
112
+ xr as generateCompleteLandingPage,
113
+ Sr as generateModernLandingPage,
114
+ kr as generatePatchesForLandingPage,
115
+ Vr as generateSiteCSSVariables,
116
+ br as generateSiteCSSVariablesObject,
117
+ ge as generateThemeCSSVariables,
118
+ Ze as getAllPresets,
119
+ lr as getHeroVariation,
120
+ fr as getNavbarVariation,
121
+ $e as getPreset,
122
+ er as glassPreset,
123
+ de as gradientDirectionMap,
124
+ fe as gradientThemeTokens,
125
+ Rr as gridPresetMap,
126
+ cr as heroVariationIds,
127
+ gr as heroVariations,
128
+ Dr as hydratePageWithContent,
129
+ Er as imageGridPresetIds,
130
+ Le as isSafeUrl,
131
+ Ir as matchDynamicPage,
132
+ Hr as mergeSiteThemeTokens,
133
+ rr as minimalPreset,
134
+ hr as navbarVariationIds,
135
+ Pr as navbarVariations,
136
+ tr as neonPreset,
137
+ or as pastelPreset,
138
+ ar as playfulKidsPreset,
139
+ he as playfulThemeTokens,
140
+ Or as pluginRegistry,
141
+ Pe as radiusScaleMap,
142
+ wr as renderNode,
143
+ Ve as renderPage,
144
+ Ie as sanitizeHtml,
145
+ Te as shadowScaleMap,
146
+ Gr as siteDarkTheme,
147
+ jr as siteDefaultTheme,
148
+ xe as spacingScaleMap,
149
+ mr as themePresets,
150
+ ir as validateContrast
149
151
  };
150
152
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../../src/engine/plugins/builtin/blog/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAqFtD,eAAO,MAAM,UAAU,EAAE,kBAiSxB,CAAC"}
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../../src/engine/plugins/builtin/blog/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAqFtD,eAAO,MAAM,UAAU,EAAE,kBAwUxB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { pluginRegistry as h } from "../../pluginRegistry.js";
2
2
  import { logger as n } from "../../../../utils/logger.js";
3
- const g = "plugin-blog-home-grid", c = [
3
+ const p = "plugin-blog-home-grid", u = [
4
4
  {
5
5
  title: "Feira de Ciências 2026: Inovação e Criatividade",
6
6
  excerpt: "Nossos alunos apresentaram projetos incríveis na Feira de Ciências deste ano. Confira os destaques e premiações!",
@@ -58,7 +58,7 @@ const g = "plugin-blog-home-grid", c = [
58
58
  <p>Os três projetos finalistas representarão nossa escola na <strong>Feira Regional de Ciências</strong>, que acontecerá em março na capital. Os alunos já estão se preparando para levar suas apresentações a um público ainda maior.</p>
59
59
  <p>Parabéns a todos os participantes, professores orientadores e famílias que apoiaram essa jornada de descobertas!</p>
60
60
  `.trim();
61
- function p(o, s) {
61
+ function c(o, s) {
62
62
  return { ...JSON.parse(JSON.stringify(o)), id: s };
63
63
  }
64
64
  const f = {
@@ -69,7 +69,7 @@ const f = {
69
69
  description: "Blog com posts, categorias e tags",
70
70
  icon: "FileText",
71
71
  capabilities: {
72
- blocks: ["blogPostCard", "blogPostGrid", "blogPostDetail"],
72
+ blocks: ["blogPostCard", "blogPostGrid", "blogPostDetail", "blogCategoryFilter", "blogSearchBar"],
73
73
  pageTemplates: [
74
74
  {
75
75
  id: "blog-listing",
@@ -112,7 +112,10 @@ const f = {
112
112
  { name: "category", type: "string", label: "Category" },
113
113
  { name: "tags", type: "array", label: "Tags" },
114
114
  { name: "authorVariant", type: "string", label: "Author Variant" },
115
- { name: "readingTime", type: "number", label: "Reading Time" }
115
+ { name: "readingTime", type: "number", label: "Reading Time" },
116
+ { name: "metaTitle", type: "string", label: "Meta Title (SEO)" },
117
+ { name: "metaDescription", type: "string", label: "Meta Description (SEO)" },
118
+ { name: "ogImage", type: "image", label: "Open Graph Image" }
116
119
  ]
117
120
  }
118
121
  ],
@@ -129,27 +132,27 @@ const f = {
129
132
  n.debug("Blog plugin activating...");
130
133
  const s = new Set(o.pages.map((e) => e.id)), a = [...o.pages], i = o.pages.find((e) => e.slug === "home") || o.pages[0], t = i?.structure.find((e) => e.type === "navbar"), l = i?.structure.find((e) => e.type === "footer");
131
134
  if (i) {
132
- const e = a.findIndex((r) => r.id === i.id), m = i.structure.some(
133
- (r) => r.id === g
135
+ const e = a.findIndex((r) => r.id === i.id), g = i.structure.some(
136
+ (r) => r.id === p
134
137
  );
135
- if (e >= 0 && !m) {
138
+ if (e >= 0 && !g) {
136
139
  const r = {
137
- id: g,
140
+ id: p,
138
141
  type: "blogPostGrid",
139
142
  props: {
140
143
  title: "Blog",
141
144
  subtitle: "Últimas publicações",
142
145
  columns: 3,
143
- cards: c,
146
+ cards: u,
144
147
  variant: "default",
145
148
  showViewAll: !0,
146
149
  viewAllText: "Ver todos os posts",
147
150
  viewAllHref: "/site/p/blog"
148
151
  }
149
- }, d = [...a[e].structure], u = d.findIndex(
152
+ }, d = [...a[e].structure], m = d.findIndex(
150
153
  (b) => b.type === "footer"
151
154
  );
152
- u >= 0 ? d.splice(u, 0, r) : d.push(r), a[e] = {
155
+ m >= 0 ? d.splice(m, 0, r) : d.push(r), a[e] = {
153
156
  ...a[e],
154
157
  structure: d
155
158
  }, n.debug("Blog section injected into home page");
@@ -157,7 +160,7 @@ const f = {
157
160
  }
158
161
  if (!s.has("blog")) {
159
162
  const e = [];
160
- t && e.push(p(t, "blog-page-navbar")), e.push({
163
+ t && e.push(c(t, "blog-page-navbar")), e.push({
161
164
  id: "blog-page-hero",
162
165
  type: "hero",
163
166
  props: {
@@ -171,6 +174,31 @@ const f = {
171
174
  background: "#4f46e5",
172
175
  minHeight: "280px"
173
176
  }
177
+ }), e.push({
178
+ id: "blog-search-bar",
179
+ type: "blogSearchBar",
180
+ props: {
181
+ placeholder: "Buscar posts...",
182
+ variant: "simple",
183
+ showIcon: !0,
184
+ searchUrl: "/site/p/blog"
185
+ }
186
+ }), e.push({
187
+ id: "blog-category-filter",
188
+ type: "blogCategoryFilter",
189
+ props: {
190
+ title: "",
191
+ categories: u.map((g) => ({
192
+ name: g.category,
193
+ slug: g.category.toLowerCase().replace(/\s+/g, "-"),
194
+ count: 1
195
+ })),
196
+ variant: "chips",
197
+ showCount: !1,
198
+ showAll: !0,
199
+ allLabel: "Todas",
200
+ filterUrl: "/site/p/blog"
201
+ }
174
202
  }), e.push({
175
203
  id: "blog-grid-main",
176
204
  type: "blogPostGrid",
@@ -178,13 +206,13 @@ const f = {
178
206
  title: "",
179
207
  subtitle: "",
180
208
  columns: 3,
181
- cards: c,
209
+ cards: u,
182
210
  variant: "default",
183
211
  showViewAll: !1,
184
212
  viewAllText: "Ver todos",
185
213
  viewAllHref: "/blog"
186
214
  }
187
- }), l && e.push(p(l, "blog-page-footer")), a.push({
215
+ }), l && e.push(c(l, "blog-page-footer")), a.push({
188
216
  id: "blog",
189
217
  name: "Blog",
190
218
  slug: "blog",
@@ -199,7 +227,7 @@ const f = {
199
227
  }
200
228
  if (!s.has("blog-post")) {
201
229
  const e = [];
202
- t && e.push(p(t, "post-page-navbar")), e.push({
230
+ t && e.push(c(t, "post-page-navbar")), e.push({
203
231
  id: "blog-detail-main",
204
232
  type: "blogPostDetail",
205
233
  props: {
@@ -218,7 +246,7 @@ const f = {
218
246
  showReadingTime: !0,
219
247
  contentMaxWidth: "720px"
220
248
  }
221
- }), l && e.push(p(l, "post-page-footer")), a.push({
249
+ }), l && e.push(c(l, "post-page-footer")), a.push({
222
250
  id: "blog-post",
223
251
  name: "Post",
224
252
  slug: "blog/:slug",
@@ -245,11 +273,11 @@ const f = {
245
273
  onDeactivate(o) {
246
274
  n.debug("Blog plugin deactivating...");
247
275
  const s = o.pages.filter((a) => a.pluginId !== "blog").map((a) => a.structure.some(
248
- (t) => t.id === g
276
+ (t) => t.id === p
249
277
  ) ? {
250
278
  ...a,
251
279
  structure: a.structure.filter(
252
- (t) => t.id !== g
280
+ (t) => t.id !== p
253
281
  )
254
282
  } : a);
255
283
  return n.debug(
@@ -264,6 +292,10 @@ const f = {
264
292
  return {
265
293
  lockedFields: ["content", "date"]
266
294
  };
295
+ if (o === "blogCategoryFilter")
296
+ return {
297
+ lockedFields: ["categories"]
298
+ };
267
299
  }
268
300
  };
269
301
  h.register(f);
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.js","sources":["../../../../../src/engine/plugins/builtin/blog/manifest.ts"],"sourcesContent":["/**\n * Blog Plugin Manifest\n * Plugin para blog com posts, categorias e tags.\n *\n * onActivate:\n * 1. Injeta seção blogPostGrid na home page (antes do footer)\n * 2. Cria página \"Blog\" com navbar + grid de posts + footer\n * 3. Cria página \"Post\" com navbar + detalhe do post + footer\n *\n * onDeactivate:\n * 1. Remove a seção injetada na home page\n * 2. Remove as páginas do plugin\n */\n\nimport type { PluginRegistration } from \"../../types\";\nimport type { SiteDocument, Block, BlockType } from \"../../../schema/siteDocument\";\nimport { pluginRegistry } from \"../../pluginRegistry\";\nimport { logger } from \"../../../../utils/logger\";\n\n// ─── ID usado para a seção de blog injetada na home page ───\nconst BLOG_HOME_SECTION_ID = \"plugin-blog-home-grid\";\n\n// ─── Sample blog cards para preview ───\nconst SAMPLE_BLOG_CARDS = [\n {\n title: \"Feira de Ciências 2026: Inovação e Criatividade\",\n excerpt:\n \"Nossos alunos apresentaram projetos incríveis na Feira de Ciências deste ano. Confira os destaques e premiações!\",\n image:\n \"https://images.unsplash.com/photo-1567168544230-3b9e5ec47659?w=800&h=400&fit=crop\",\n category: \"Eventos\",\n date: \"05 Fev 2026\",\n linkHref: \"/site/p/blog/feira-de-ciencias-2026\",\n linkText: \"Ler mais\",\n },\n {\n title: \"Matrículas Abertas para o Segundo Semestre\",\n excerpt:\n \"Garanta a vaga do seu filho na melhor escola da região. Condições especiais para matrículas antecipadas.\",\n image:\n \"https://images.unsplash.com/photo-1523050854058-8df90110c9f1?w=800&h=400&fit=crop\",\n category: \"Institucional\",\n date: \"01 Fev 2026\",\n linkHref: \"/site/p/blog/matriculas-segundo-semestre\",\n linkText: \"Ler mais\",\n },\n {\n title: \"5 Dicas para Preparar seu Filho para o Ano Letivo\",\n excerpt:\n \"Dicas práticas para uma transição tranquila e um início de ano produtivo para toda a família.\",\n image:\n \"https://images.unsplash.com/photo-1503676260728-1c00da094a0b?w=800&h=400&fit=crop\",\n category: \"Educação\",\n date: \"28 Jan 2026\",\n linkHref: \"/site/p/blog/dicas-preparar-ano-letivo\",\n linkText: \"Ler mais\",\n },\n];\n\n// ─── Conteúdo HTML rico para o post de exemplo ───\nconst SAMPLE_POST_CONTENT = `\n<h2>O que é a Feira de Ciências?</h2>\n<p>A Feira de Ciências é um evento anual que celebra a curiosidade, a pesquisa e a criatividade dos nossos alunos. Nesta edição especial de 2026, recebemos mais de <strong>500 visitantes</strong> e contamos com a participação de todas as turmas do Ensino Fundamental e Médio.</p>\n<p>Este ano, o tema central foi <em>\"Ciência e Sustentabilidade\"</em>, incentivando os estudantes a desenvolverem projetos que aliassem inovação tecnológica com responsabilidade ambiental.</p>\n\n<h2>Destaques da Edição 2026</h2>\n<p>Entre os mais de 50 projetos apresentados, alguns se destacaram pela originalidade e impacto:</p>\n<ul>\n <li><strong>Jardim Sustentável Inteligente</strong> — Alunos do 5º ano desenvolveram um sistema de irrigação automática usando sensores de umidade e placa Arduino.</li>\n <li><strong>Robótica Educacional</strong> — A turma do 8º ano criou um robô que auxilia no ensino de matemática para crianças do 1º ao 3º ano.</li>\n <li><strong>Energia Solar na Escola</strong> — Projeto do 2º ano do Ensino Médio demonstrou como painéis solares poderiam reduzir em 40% o consumo de energia da escola.</li>\n</ul>\n\n<blockquote>\n <p>\"A Feira de Ciências é um dos momentos mais importantes do nosso calendário escolar. Ver a dedicação e o brilho nos olhos dos alunos ao apresentarem seus projetos nos enche de orgulho e nos motiva a continuar investindo em educação de qualidade.\"</p>\n <p><strong>— Prof. Maria Silva, Coordenadora Pedagógica</strong></p>\n</blockquote>\n\n<h2>Premiações</h2>\n<p>O júri, composto por professores universitários e profissionais da área de tecnologia, selecionou os três melhores projetos:</p>\n<ol>\n <li><strong>1º Lugar:</strong> Jardim Sustentável Inteligente (5º ano)</li>\n <li><strong>2º Lugar:</strong> Energia Solar na Escola (2º EM)</li>\n <li><strong>3º Lugar:</strong> Robótica Educacional (8º ano)</li>\n</ol>\n\n<h2>Próximos Passos</h2>\n<p>Os três projetos finalistas representarão nossa escola na <strong>Feira Regional de Ciências</strong>, que acontecerá em março na capital. Os alunos já estão se preparando para levar suas apresentações a um público ainda maior.</p>\n<p>Parabéns a todos os participantes, professores orientadores e famílias que apoiaram essa jornada de descobertas!</p>\n`.trim();\n\n/**\n * Deep-clone um bloco com novo ID\n */\nfunction cloneBlock(block: Block, newId: string): Block {\n const cloned: Block = JSON.parse(JSON.stringify(block));\n return { ...cloned, id: newId };\n}\n\nexport const blogPlugin: PluginRegistration = {\n manifest: {\n id: \"blog\",\n version: \"1.0.0\",\n name: \"Blog\",\n description: \"Blog com posts, categorias e tags\",\n icon: \"FileText\",\n\n capabilities: {\n blocks: [\"blogPostCard\", \"blogPostGrid\", \"blogPostDetail\"],\n\n pageTemplates: [\n {\n id: \"blog-listing\",\n name: \"Blog\",\n slug: \"blog\",\n pluginId: \"blog\",\n structure: [],\n dataSource: {\n provider: \"blog-posts\",\n mode: \"list\",\n },\n },\n {\n id: \"blog-post\",\n name: \"Post\",\n slug: \"blog/:slug\",\n pluginId: \"blog\",\n structure: [],\n dataSource: {\n provider: \"blog-posts\",\n mode: \"single\",\n paramMapping: { slug: \":slug\" },\n },\n editRestrictions: {\n lockedStructure: true,\n nonRemovable: true,\n },\n },\n ],\n\n dataSchemas: [\n {\n type: \"blog-post\",\n label: \"Blog Post\",\n fields: [\n { name: \"title\", type: \"string\", required: true, label: \"Title\" },\n { name: \"slug\", type: \"string\", required: true, label: \"Slug\" },\n { name: \"excerpt\", type: \"string\", label: \"Excerpt\" },\n { name: \"content\", type: \"richtext\", required: true, label: \"Content\" },\n { name: \"featuredImage\", type: \"image\", label: \"Featured Image\" },\n { name: \"category\", type: \"string\", label: \"Category\" },\n { name: \"tags\", type: \"array\", label: \"Tags\" },\n { name: \"authorVariant\", type: \"string\", label: \"Author Variant\" },\n { name: \"readingTime\", type: \"number\", label: \"Reading Time\" },\n ],\n },\n ],\n\n contentProviders: [\"blog-posts\", \"blog-categories\"],\n },\n\n restrictions: {\n lockedFields: {\n blogPostDetail: [\"content\", \"date\"],\n },\n requiredPages: [\"blog-listing\", \"blog-post\"],\n },\n },\n\n onActivate(document: SiteDocument): SiteDocument {\n logger.debug(\"Blog plugin activating...\");\n\n const existingPageIds = new Set(document.pages.map((p) => p.id));\n const newPages = [...document.pages];\n\n // ── Encontrar home page para clonar navbar/footer ──\n const homePage =\n document.pages.find((p) => p.slug === \"home\") || document.pages[0];\n\n const homeNavbar = homePage?.structure.find((b) => b.type === \"navbar\");\n const homeFooter = homePage?.structure.find((b) => b.type === \"footer\");\n\n // ── 1. Injetar seção de blog na home page (antes do footer) ──\n if (homePage) {\n const homeIdx = newPages.findIndex((p) => p.id === homePage.id);\n const alreadyInjected = homePage.structure.some(\n (b) => b.id === BLOG_HOME_SECTION_ID,\n );\n\n if (homeIdx >= 0 && !alreadyInjected) {\n const blogHomeSection: Block = {\n id: BLOG_HOME_SECTION_ID,\n type: \"blogPostGrid\",\n props: {\n title: \"Blog\",\n subtitle: \"Últimas publicações\",\n columns: 3,\n cards: SAMPLE_BLOG_CARDS,\n variant: \"default\",\n showViewAll: true,\n viewAllText: \"Ver todos os posts\",\n viewAllHref: \"/site/p/blog\",\n },\n } as Block;\n\n const updatedStructure = [...newPages[homeIdx].structure];\n const footerIdx = updatedStructure.findIndex(\n (b) => b.type === \"footer\",\n );\n\n if (footerIdx >= 0) {\n updatedStructure.splice(footerIdx, 0, blogHomeSection);\n } else {\n updatedStructure.push(blogHomeSection);\n }\n\n newPages[homeIdx] = {\n ...newPages[homeIdx],\n structure: updatedStructure,\n };\n logger.debug(\"Blog section injected into home page\");\n }\n }\n\n // ── 2. Criar página \"Blog\" (listagem completa) ──\n if (!existingPageIds.has(\"blog\")) {\n const blogPageStructure: Block[] = [];\n\n // Navbar clonada da home\n if (homeNavbar) {\n blogPageStructure.push(cloneBlock(homeNavbar, \"blog-page-navbar\"));\n }\n\n // Hero banner do blog\n blogPageStructure.push({\n id: \"blog-page-hero\",\n type: \"hero\",\n props: {\n title: \"Blog\",\n subtitle: \"Novidades & Publicações\",\n description:\n \"Acompanhe as últimas novidades, eventos e conquistas da nossa comunidade escolar.\",\n variant: \"centered\",\n align: \"center\",\n overlay: true,\n overlayColor: \"rgba(79, 70, 229, 0.9)\",\n background: \"#4f46e5\",\n minHeight: \"280px\",\n },\n } as Block);\n\n // Grid de posts\n blogPageStructure.push({\n id: \"blog-grid-main\",\n type: \"blogPostGrid\",\n props: {\n title: \"\",\n subtitle: \"\",\n columns: 3,\n cards: SAMPLE_BLOG_CARDS,\n variant: \"default\",\n showViewAll: false,\n viewAllText: \"Ver todos\",\n viewAllHref: \"/blog\",\n },\n } as Block);\n\n // Footer clonado da home\n if (homeFooter) {\n blogPageStructure.push(cloneBlock(homeFooter, \"blog-page-footer\"));\n }\n\n newPages.push({\n id: \"blog\",\n name: \"Blog\",\n slug: \"blog\",\n pluginId: \"blog\",\n pageTemplateId: \"blog-listing\",\n structure: blogPageStructure,\n dataSource: {\n provider: \"blog-posts\",\n mode: \"list\",\n },\n });\n logger.debug(\"Blog listing page created\");\n }\n\n // ── 3. Criar página \"Post\" (detalhe) ──\n if (!existingPageIds.has(\"blog-post\")) {\n const postPageStructure: Block[] = [];\n\n if (homeNavbar) {\n postPageStructure.push(cloneBlock(homeNavbar, \"post-page-navbar\"));\n }\n\n postPageStructure.push({\n id: \"blog-detail-main\",\n type: \"blogPostDetail\",\n props: {\n title: \"Feira de Ciências 2026: Inovação e Criatividade\",\n content: SAMPLE_POST_CONTENT,\n featuredImage:\n \"https://images.unsplash.com/photo-1567168544230-3b9e5ec47659?w=1200&h=600&fit=crop\",\n date: \"05 Fev 2026\",\n category: \"Eventos\",\n authorVariant: \"inline\",\n readingTime: \"5 min de leitura\",\n tags: [\"Feira de Ciências\", \"Eventos\", \"Sustentabilidade\", \"Projetos\"],\n showFeaturedImage: true,\n showAuthor: true,\n showDate: true,\n showTags: true,\n showReadingTime: true,\n contentMaxWidth: \"720px\",\n },\n } as Block);\n\n if (homeFooter) {\n postPageStructure.push(cloneBlock(homeFooter, \"post-page-footer\"));\n }\n\n newPages.push({\n id: \"blog-post\",\n name: \"Post\",\n slug: \"blog/:slug\",\n pluginId: \"blog\",\n pageTemplateId: \"blog-post\",\n isDynamic: true,\n structure: postPageStructure,\n dataSource: {\n provider: \"blog-posts\",\n mode: \"single\",\n paramMapping: { slug: \":slug\" },\n },\n editRestrictions: {\n lockedStructure: true,\n nonRemovable: true,\n },\n });\n logger.debug(\"Blog post detail page created\");\n }\n\n return {\n ...document,\n pages: newPages,\n };\n },\n\n onDeactivate(document: SiteDocument): SiteDocument {\n logger.debug(\"Blog plugin deactivating...\");\n\n const newPages = document.pages\n // Remover páginas do plugin\n .filter((page) => page.pluginId !== \"blog\")\n // Remover seção de blog injetada na home page\n .map((page) => {\n const hasInjected = page.structure.some(\n (b) => b.id === BLOG_HOME_SECTION_ID,\n );\n if (hasInjected) {\n return {\n ...page,\n structure: page.structure.filter(\n (b) => b.id !== BLOG_HOME_SECTION_ID,\n ),\n };\n }\n return page;\n });\n\n logger.debug(\n `Removed ${document.pages.length - newPages.length} blog page(s) and injected section`,\n );\n\n return {\n ...document,\n pages: newPages,\n };\n },\n\n getEditorRestrictions(blockType: BlockType) {\n if (blockType === \"blogPostDetail\") {\n return {\n lockedFields: [\"content\", \"date\"],\n };\n }\n return undefined;\n },\n};\n\n// Auto-registrar o plugin (side effect — como os blocos fazem com componentRegistry)\npluginRegistry.register(blogPlugin);\n"],"names":["BLOG_HOME_SECTION_ID","SAMPLE_BLOG_CARDS","SAMPLE_POST_CONTENT","cloneBlock","block","newId","blogPlugin","document","logger","existingPageIds","p","newPages","homePage","homeNavbar","b","homeFooter","homeIdx","alreadyInjected","blogHomeSection","updatedStructure","footerIdx","blogPageStructure","postPageStructure","page","blockType","pluginRegistry"],"mappings":";;AAoBA,MAAMA,IAAuB,yBAGvBC,IAAoB;AAAA,EACxB;AAAA,IACE,OAAO;AAAA,IACP,SACE;AAAA,IACF,OACE;AAAA,IACF,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,EAAA;AAAA,EAEZ;AAAA,IACE,OAAO;AAAA,IACP,SACE;AAAA,IACF,OACE;AAAA,IACF,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,EAAA;AAAA,EAEZ;AAAA,IACE,OAAO;AAAA,IACP,SACE;AAAA,IACF,OACE;AAAA,IACF,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,EAAA;AAEd,GAGMC,IAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6B1B,KAAA;AAKF,SAASC,EAAWC,GAAcC,GAAsB;AAEtD,SAAO,EAAE,GADa,KAAK,MAAM,KAAK,UAAUD,CAAK,CAAC,GAClC,IAAIC,EAAA;AAC1B;AAEO,MAAMC,IAAiC;AAAA,EAC5C,UAAU;AAAA,IACR,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,aAAa;AAAA,IACb,MAAM;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R;AAEH,WAAAf,EAAO;AAAA,MACL,WAAWD,EAAS,MAAM,SAASI,EAAS,MAAM;AAAA,IAAA,GAG7C;AAAA,MACL,GAAGJ;AAAA,MACH,OAAOI;AAAA,IAAA;AAAA,EAEX;AAAA,EAEA,sBAAsBa,GAAsB;AAC1C,QAAIA,MAAc;AAChB,aAAO;AAAA,QACL,cAAc,CAAC,WAAW,MAAM;AAAA,MAAA;AAAA,EAItC;AACF;AAGAC,EAAe,SAASnB,CAAU;"}
1
+ {"version":3,"file":"manifest.js","sources":["../../../../../src/engine/plugins/builtin/blog/manifest.ts"],"sourcesContent":["/**\n * Blog Plugin Manifest\n * Plugin para blog com posts, categorias e tags.\n *\n * onActivate:\n * 1. Injeta seção blogPostGrid na home page (antes do footer)\n * 2. Cria página \"Blog\" com navbar + grid de posts + footer\n * 3. Cria página \"Post\" com navbar + detalhe do post + footer\n *\n * onDeactivate:\n * 1. Remove a seção injetada na home page\n * 2. Remove as páginas do plugin\n */\n\nimport type { PluginRegistration } from \"../../types\";\nimport type { SiteDocument, Block, BlockType } from \"../../../schema/siteDocument\";\nimport { pluginRegistry } from \"../../pluginRegistry\";\nimport { logger } from \"../../../../utils/logger\";\n\n// ─── ID usado para a seção de blog injetada na home page ───\nconst BLOG_HOME_SECTION_ID = \"plugin-blog-home-grid\";\n\n// ─── Sample blog cards para preview ───\nconst SAMPLE_BLOG_CARDS = [\n {\n title: \"Feira de Ciências 2026: Inovação e Criatividade\",\n excerpt:\n \"Nossos alunos apresentaram projetos incríveis na Feira de Ciências deste ano. Confira os destaques e premiações!\",\n image:\n \"https://images.unsplash.com/photo-1567168544230-3b9e5ec47659?w=800&h=400&fit=crop\",\n category: \"Eventos\",\n date: \"05 Fev 2026\",\n linkHref: \"/site/p/blog/feira-de-ciencias-2026\",\n linkText: \"Ler mais\",\n },\n {\n title: \"Matrículas Abertas para o Segundo Semestre\",\n excerpt:\n \"Garanta a vaga do seu filho na melhor escola da região. Condições especiais para matrículas antecipadas.\",\n image:\n \"https://images.unsplash.com/photo-1523050854058-8df90110c9f1?w=800&h=400&fit=crop\",\n category: \"Institucional\",\n date: \"01 Fev 2026\",\n linkHref: \"/site/p/blog/matriculas-segundo-semestre\",\n linkText: \"Ler mais\",\n },\n {\n title: \"5 Dicas para Preparar seu Filho para o Ano Letivo\",\n excerpt:\n \"Dicas práticas para uma transição tranquila e um início de ano produtivo para toda a família.\",\n image:\n \"https://images.unsplash.com/photo-1503676260728-1c00da094a0b?w=800&h=400&fit=crop\",\n category: \"Educação\",\n date: \"28 Jan 2026\",\n linkHref: \"/site/p/blog/dicas-preparar-ano-letivo\",\n linkText: \"Ler mais\",\n },\n];\n\n// ─── Conteúdo HTML rico para o post de exemplo ───\nconst SAMPLE_POST_CONTENT = `\n<h2>O que é a Feira de Ciências?</h2>\n<p>A Feira de Ciências é um evento anual que celebra a curiosidade, a pesquisa e a criatividade dos nossos alunos. Nesta edição especial de 2026, recebemos mais de <strong>500 visitantes</strong> e contamos com a participação de todas as turmas do Ensino Fundamental e Médio.</p>\n<p>Este ano, o tema central foi <em>\"Ciência e Sustentabilidade\"</em>, incentivando os estudantes a desenvolverem projetos que aliassem inovação tecnológica com responsabilidade ambiental.</p>\n\n<h2>Destaques da Edição 2026</h2>\n<p>Entre os mais de 50 projetos apresentados, alguns se destacaram pela originalidade e impacto:</p>\n<ul>\n <li><strong>Jardim Sustentável Inteligente</strong> — Alunos do 5º ano desenvolveram um sistema de irrigação automática usando sensores de umidade e placa Arduino.</li>\n <li><strong>Robótica Educacional</strong> — A turma do 8º ano criou um robô que auxilia no ensino de matemática para crianças do 1º ao 3º ano.</li>\n <li><strong>Energia Solar na Escola</strong> — Projeto do 2º ano do Ensino Médio demonstrou como painéis solares poderiam reduzir em 40% o consumo de energia da escola.</li>\n</ul>\n\n<blockquote>\n <p>\"A Feira de Ciências é um dos momentos mais importantes do nosso calendário escolar. Ver a dedicação e o brilho nos olhos dos alunos ao apresentarem seus projetos nos enche de orgulho e nos motiva a continuar investindo em educação de qualidade.\"</p>\n <p><strong>— Prof. Maria Silva, Coordenadora Pedagógica</strong></p>\n</blockquote>\n\n<h2>Premiações</h2>\n<p>O júri, composto por professores universitários e profissionais da área de tecnologia, selecionou os três melhores projetos:</p>\n<ol>\n <li><strong>1º Lugar:</strong> Jardim Sustentável Inteligente (5º ano)</li>\n <li><strong>2º Lugar:</strong> Energia Solar na Escola (2º EM)</li>\n <li><strong>3º Lugar:</strong> Robótica Educacional (8º ano)</li>\n</ol>\n\n<h2>Próximos Passos</h2>\n<p>Os três projetos finalistas representarão nossa escola na <strong>Feira Regional de Ciências</strong>, que acontecerá em março na capital. Os alunos já estão se preparando para levar suas apresentações a um público ainda maior.</p>\n<p>Parabéns a todos os participantes, professores orientadores e famílias que apoiaram essa jornada de descobertas!</p>\n`.trim();\n\n/**\n * Deep-clone um bloco com novo ID\n */\nfunction cloneBlock(block: Block, newId: string): Block {\n const cloned: Block = JSON.parse(JSON.stringify(block));\n return { ...cloned, id: newId };\n}\n\nexport const blogPlugin: PluginRegistration = {\n manifest: {\n id: \"blog\",\n version: \"1.0.0\",\n name: \"Blog\",\n description: \"Blog com posts, categorias e tags\",\n icon: \"FileText\",\n\n capabilities: {\n blocks: [\"blogPostCard\", \"blogPostGrid\", \"blogPostDetail\", \"blogCategoryFilter\", \"blogSearchBar\"],\n\n pageTemplates: [\n {\n id: \"blog-listing\",\n name: \"Blog\",\n slug: \"blog\",\n pluginId: \"blog\",\n structure: [],\n dataSource: {\n provider: \"blog-posts\",\n mode: \"list\",\n },\n },\n {\n id: \"blog-post\",\n name: \"Post\",\n slug: \"blog/:slug\",\n pluginId: \"blog\",\n structure: [],\n dataSource: {\n provider: \"blog-posts\",\n mode: \"single\",\n paramMapping: { slug: \":slug\" },\n },\n editRestrictions: {\n lockedStructure: true,\n nonRemovable: true,\n },\n },\n ],\n\n dataSchemas: [\n {\n type: \"blog-post\",\n label: \"Blog Post\",\n fields: [\n { name: \"title\", type: \"string\", required: true, label: \"Title\" },\n { name: \"slug\", type: \"string\", required: true, label: \"Slug\" },\n { name: \"excerpt\", type: \"string\", label: \"Excerpt\" },\n { name: \"content\", type: \"richtext\", required: true, label: \"Content\" },\n { name: \"featuredImage\", type: \"image\", label: \"Featured Image\" },\n { name: \"category\", type: \"string\", label: \"Category\" },\n { name: \"tags\", type: \"array\", label: \"Tags\" },\n { name: \"authorVariant\", type: \"string\", label: \"Author Variant\" },\n { name: \"readingTime\", type: \"number\", label: \"Reading Time\" },\n { name: \"metaTitle\", type: \"string\", label: \"Meta Title (SEO)\" },\n { name: \"metaDescription\", type: \"string\", label: \"Meta Description (SEO)\" },\n { name: \"ogImage\", type: \"image\", label: \"Open Graph Image\" },\n ],\n },\n ],\n\n contentProviders: [\"blog-posts\", \"blog-categories\"],\n },\n\n restrictions: {\n lockedFields: {\n blogPostDetail: [\"content\", \"date\"],\n },\n requiredPages: [\"blog-listing\", \"blog-post\"],\n },\n },\n\n onActivate(document: SiteDocument): SiteDocument {\n logger.debug(\"Blog plugin activating...\");\n\n const existingPageIds = new Set(document.pages.map((p) => p.id));\n const newPages = [...document.pages];\n\n // ── Encontrar home page para clonar navbar/footer ──\n const homePage =\n document.pages.find((p) => p.slug === \"home\") || document.pages[0];\n\n const homeNavbar = homePage?.structure.find((b) => b.type === \"navbar\");\n const homeFooter = homePage?.structure.find((b) => b.type === \"footer\");\n\n // ── 1. Injetar seção de blog na home page (antes do footer) ──\n if (homePage) {\n const homeIdx = newPages.findIndex((p) => p.id === homePage.id);\n const alreadyInjected = homePage.structure.some(\n (b) => b.id === BLOG_HOME_SECTION_ID,\n );\n\n if (homeIdx >= 0 && !alreadyInjected) {\n const blogHomeSection: Block = {\n id: BLOG_HOME_SECTION_ID,\n type: \"blogPostGrid\",\n props: {\n title: \"Blog\",\n subtitle: \"Últimas publicações\",\n columns: 3,\n cards: SAMPLE_BLOG_CARDS,\n variant: \"default\",\n showViewAll: true,\n viewAllText: \"Ver todos os posts\",\n viewAllHref: \"/site/p/blog\",\n },\n } as Block;\n\n const updatedStructure = [...newPages[homeIdx].structure];\n const footerIdx = updatedStructure.findIndex(\n (b) => b.type === \"footer\",\n );\n\n if (footerIdx >= 0) {\n updatedStructure.splice(footerIdx, 0, blogHomeSection);\n } else {\n updatedStructure.push(blogHomeSection);\n }\n\n newPages[homeIdx] = {\n ...newPages[homeIdx],\n structure: updatedStructure,\n };\n logger.debug(\"Blog section injected into home page\");\n }\n }\n\n // ── 2. Criar página \"Blog\" (listagem completa) ──\n if (!existingPageIds.has(\"blog\")) {\n const blogPageStructure: Block[] = [];\n\n // Navbar clonada da home\n if (homeNavbar) {\n blogPageStructure.push(cloneBlock(homeNavbar, \"blog-page-navbar\"));\n }\n\n // Hero banner do blog\n blogPageStructure.push({\n id: \"blog-page-hero\",\n type: \"hero\",\n props: {\n title: \"Blog\",\n subtitle: \"Novidades & Publicações\",\n description:\n \"Acompanhe as últimas novidades, eventos e conquistas da nossa comunidade escolar.\",\n variant: \"centered\",\n align: \"center\",\n overlay: true,\n overlayColor: \"rgba(79, 70, 229, 0.9)\",\n background: \"#4f46e5\",\n minHeight: \"280px\",\n },\n } as Block);\n\n // Search bar\n blogPageStructure.push({\n id: \"blog-search-bar\",\n type: \"blogSearchBar\",\n props: {\n placeholder: \"Buscar posts...\",\n variant: \"simple\",\n showIcon: true,\n searchUrl: \"/site/p/blog\",\n },\n } as Block);\n\n // Category filter\n blogPageStructure.push({\n id: \"blog-category-filter\",\n type: \"blogCategoryFilter\",\n props: {\n title: \"\",\n categories: SAMPLE_BLOG_CARDS.map((c) => ({\n name: c.category,\n slug: c.category.toLowerCase().replace(/\\s+/g, \"-\"),\n count: 1,\n })),\n variant: \"chips\",\n showCount: false,\n showAll: true,\n allLabel: \"Todas\",\n filterUrl: \"/site/p/blog\",\n },\n } as Block);\n\n // Grid de posts\n blogPageStructure.push({\n id: \"blog-grid-main\",\n type: \"blogPostGrid\",\n props: {\n title: \"\",\n subtitle: \"\",\n columns: 3,\n cards: SAMPLE_BLOG_CARDS,\n variant: \"default\",\n showViewAll: false,\n viewAllText: \"Ver todos\",\n viewAllHref: \"/blog\",\n },\n } as Block);\n\n // Footer clonado da home\n if (homeFooter) {\n blogPageStructure.push(cloneBlock(homeFooter, \"blog-page-footer\"));\n }\n\n newPages.push({\n id: \"blog\",\n name: \"Blog\",\n slug: \"blog\",\n pluginId: \"blog\",\n pageTemplateId: \"blog-listing\",\n structure: blogPageStructure,\n dataSource: {\n provider: \"blog-posts\",\n mode: \"list\",\n },\n });\n logger.debug(\"Blog listing page created\");\n }\n\n // ── 3. Criar página \"Post\" (detalhe) ──\n if (!existingPageIds.has(\"blog-post\")) {\n const postPageStructure: Block[] = [];\n\n if (homeNavbar) {\n postPageStructure.push(cloneBlock(homeNavbar, \"post-page-navbar\"));\n }\n\n postPageStructure.push({\n id: \"blog-detail-main\",\n type: \"blogPostDetail\",\n props: {\n title: \"Feira de Ciências 2026: Inovação e Criatividade\",\n content: SAMPLE_POST_CONTENT,\n featuredImage:\n \"https://images.unsplash.com/photo-1567168544230-3b9e5ec47659?w=1200&h=600&fit=crop\",\n date: \"05 Fev 2026\",\n category: \"Eventos\",\n authorVariant: \"inline\",\n readingTime: \"5 min de leitura\",\n tags: [\"Feira de Ciências\", \"Eventos\", \"Sustentabilidade\", \"Projetos\"],\n showFeaturedImage: true,\n showAuthor: true,\n showDate: true,\n showTags: true,\n showReadingTime: true,\n contentMaxWidth: \"720px\",\n },\n } as Block);\n\n if (homeFooter) {\n postPageStructure.push(cloneBlock(homeFooter, \"post-page-footer\"));\n }\n\n newPages.push({\n id: \"blog-post\",\n name: \"Post\",\n slug: \"blog/:slug\",\n pluginId: \"blog\",\n pageTemplateId: \"blog-post\",\n isDynamic: true,\n structure: postPageStructure,\n dataSource: {\n provider: \"blog-posts\",\n mode: \"single\",\n paramMapping: { slug: \":slug\" },\n },\n editRestrictions: {\n lockedStructure: true,\n nonRemovable: true,\n },\n });\n logger.debug(\"Blog post detail page created\");\n }\n\n return {\n ...document,\n pages: newPages,\n };\n },\n\n onDeactivate(document: SiteDocument): SiteDocument {\n logger.debug(\"Blog plugin deactivating...\");\n\n const newPages = document.pages\n // Remover páginas do plugin\n .filter((page) => page.pluginId !== \"blog\")\n // Remover seção de blog injetada na home page\n .map((page) => {\n const hasInjected = page.structure.some(\n (b) => b.id === BLOG_HOME_SECTION_ID,\n );\n if (hasInjected) {\n return {\n ...page,\n structure: page.structure.filter(\n (b) => b.id !== BLOG_HOME_SECTION_ID,\n ),\n };\n }\n return page;\n });\n\n logger.debug(\n `Removed ${document.pages.length - newPages.length} blog page(s) and injected section`,\n );\n\n return {\n ...document,\n pages: newPages,\n };\n },\n\n getEditorRestrictions(blockType: BlockType) {\n if (blockType === \"blogPostDetail\") {\n return {\n lockedFields: [\"content\", \"date\"],\n };\n }\n if (blockType === \"blogCategoryFilter\") {\n return {\n lockedFields: [\"categories\"],\n };\n }\n return undefined;\n },\n};\n\n// Auto-registrar o plugin (side effect — como os blocos fazem com componentRegistry)\npluginRegistry.register(blogPlugin);\n"],"names":["BLOG_HOME_SECTION_ID","SAMPLE_BLOG_CARDS","SAMPLE_POST_CONTENT","cloneBlock","block","newId","blogPlugin","document","logger","existingPageIds","p","newPages","homePage","homeNavbar","b","homeFooter","homeIdx","alreadyInjected","blogHomeSection","updatedStructure","footerIdx","blogPageStructure","c","postPageStructure","page","blockType","pluginRegistry"],"mappings":";;AAoBA,MAAMA,IAAuB,yBAGvBC,IAAoB;AAAA,EACxB;AAAA,IACE,OAAO;AAAA,IACP,SACE;AAAA,IACF,OACE;AAAA,IACF,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,EAAA;AAAA,EAEZ;AAAA,IACE,OAAO;AAAA,IACP,SACE;AAAA,IACF,OACE;AAAA,IACF,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,EAAA;AAAA,EAEZ;AAAA,IACE,OAAO;AAAA,IACP,SACE;AAAA,IACF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AAA,MAAA;AAAA,IAClB,IAGGwB,CACR;AAEH,WAAAhB,EAAO;AAAA,MACL,WAAWD,EAAS,MAAM,SAASI,EAAS,MAAM;AAAA,IAAA,GAG7C;AAAA,MACL,GAAGJ;AAAA,MACH,OAAOI;AAAA,IAAA;AAAA,EAEX;AAAA,EAEA,sBAAsBc,GAAsB;AAC1C,QAAIA,MAAc;AAChB,aAAO;AAAA,QACL,cAAc,CAAC,WAAW,MAAM;AAAA,MAAA;AAGpC,QAAIA,MAAc;AAChB,aAAO;AAAA,QACL,cAAc,CAAC,YAAY;AAAA,MAAA;AAAA,EAIjC;AACF;AAGAC,EAAe,SAASpB,CAAU;"}
@@ -1 +1 @@
1
- {"version":3,"file":"mockContentProvider.d.ts","sourceRoot":"","sources":["../../../../../src/engine/plugins/builtin/blog/mockContentProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EAKhB,MAAM,aAAa,CAAC;AAiHrB;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,eAiDrC,CAAC"}
1
+ {"version":3,"file":"mockContentProvider.d.ts","sourceRoot":"","sources":["../../../../../src/engine/plugins/builtin/blog/mockContentProvider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EAKhB,MAAM,aAAa,CAAC;AAqHrB;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,eAiDrC,CAAC"}
@@ -66,8 +66,8 @@ const s = [
66
66
  }
67
67
  }
68
68
  ];
69
- function r(a) {
70
- const e = a.data, t = a.metadata, o = t?.publishedAt ? new Date(t.publishedAt).toLocaleDateString("pt-BR", {
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/${a.slug || a.id}`,
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(a) {
95
- const e = a.limit ?? 10, t = a.page ?? 1, o = (t - 1) * 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: t,
103
+ page: a,
100
104
  limit: e,
101
105
  hasMore: o + e < s.length
102
106
  };
103
107
  },
104
- async fetchById(a) {
105
- return s.find((e) => e.id === a || e.slug === a) ?? null;
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,IA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D,IAAO,KAAKD;AAG3B,WAAO;AAAA,MACL,OAHYR,EAAW,MAAMU,GAAOA,IAAQF,CAAK;AAAA,MAIjD,OAAOR,EAAW;AAAA,MAClB,MAAAS;AAAA,MACA,OAAAD;AAAA,MACA,SAASE,IAAQF,IAAQR,EAAW;AAAA,IAAA;AAAA,EAExC;AAAA,EAEA,MAAM,UAAUW,GAA+C;AAC7D,WACEX,EAAW,KAAK,CAACY,MAAMA,EAAE,OAAOD,KAAYC,EAAE,SAASD,CAAQ,KAAK;AAAA,EAExE;AAAA,EAEA,YAAwB;AACtB,WAAO;AAAA,MACL,MAAM;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,QACN,EAAE,MAAM,SAAS,MAAM,UAAU,UAAU,IAAM,OAAO,SAAA;AAAA,QACxD,EAAE,MAAM,QAAQ,MAAM,UAAU,UAAU,IAAM,OAAO,OAAA;AAAA,QACvD,EAAE,MAAM,WAAW,MAAM,UAAU,OAAO,SAAA;AAAA,QAC1C;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,UAAU;AAAA,UACV,OAAO;AAAA,QAAA;AAAA,QAET,EAAE,MAAM,iBAAiB,MAAM,SAAS,OAAO,iBAAA;AAAA,QAC/C,EAAE,MAAM,YAAY,MAAM,UAAU,OAAO,YAAA;AAAA,QAC3C,EAAE,MAAM,QAAQ,MAAM,SAAS,OAAO,OAAA;AAAA,QACtC,EAAE,MAAM,cAAc,MAAM,UAAU,OAAO,QAAA;AAAA,QAC7C,EAAE,MAAM,gBAAgB,MAAM,SAAS,OAAO,kBAAA;AAAA,QAC9C,EAAE,MAAM,eAAe,MAAM,UAAU,OAAO,mBAAA;AAAA,MAAmB;AAAA,IACnE;AAAA,EAEJ;AAAA,EAEA,cAAAV;AACF;"}
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;AAA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AAM,iBAAiB,MAAM,SAAS,OAAO,iBAAA;AAAA,QAC/C,EAAE,MAAM,YAAY,MAAM,UAAU,OAAO,YAAA;AAAA,QAC3C,EAAE,MAAM,QAAQ,MAAM,SAAS,OAAO,OAAA;AAAA,QACtC,EAAE,MAAM,cAAc,MAAM,UAAU,OAAO,QAAA;AAAA,QAC7C,EAAE,MAAM,gBAAgB,MAAM,SAAS,OAAO,kBAAA;AAAA,QAC9C,EAAE,MAAM,eAAe,MAAM,UAAU,OAAO,mBAAA;AAAA,MAAmB;AAAA,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,EAAS,MAAM,wBAAwB,CAAC;AAC9D,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
+ {"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"}