@brunoalz/smartgesti-site-editor 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor/BlockSelector.d.ts.map +1 -1
- package/dist/editor/BlockSelector.js +60 -57
- package/dist/editor/BlockSelector.js.map +1 -1
- package/dist/editor/LandingPageEditor.d.ts.map +1 -1
- package/dist/editor/LandingPageEditor.js +145 -128
- package/dist/editor/LandingPageEditor.js.map +1 -1
- package/dist/editor/PageTabBar.d.ts +4 -1
- package/dist/editor/PageTabBar.d.ts.map +1 -1
- package/dist/editor/PageTabBar.js +179 -41
- package/dist/editor/PageTabBar.js.map +1 -1
- package/dist/editor/PropertyEditor/BlockPropertyEditor.d.ts +2 -0
- package/dist/editor/PropertyEditor/BlockPropertyEditor.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/BlockPropertyEditor.js +53 -45
- package/dist/editor/PropertyEditor/BlockPropertyEditor.js.map +1 -1
- package/dist/editor/PropertyEditor/CollapsiblePropertyGroup.d.ts +2 -0
- package/dist/editor/PropertyEditor/CollapsiblePropertyGroup.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/CollapsiblePropertyGroup.js +47 -33
- package/dist/editor/PropertyEditor/CollapsiblePropertyGroup.js.map +1 -1
- package/dist/editor/PropertyEditor/VariationSelector.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/VariationSelector.js +10 -6
- package/dist/editor/PropertyEditor/VariationSelector.js.map +1 -1
- package/dist/editor/PropertyEditor/index.js +20 -18
- package/dist/editor/PropertyEditor/index.js.map +1 -1
- package/dist/editor/PropertyEditor/inputs/CarouselImagesInput.d.ts +16 -0
- package/dist/editor/PropertyEditor/inputs/CarouselImagesInput.d.ts.map +1 -0
- package/dist/editor/PropertyEditor/inputs/CarouselImagesInput.js +170 -0
- package/dist/editor/PropertyEditor/inputs/CarouselImagesInput.js.map +1 -0
- package/dist/editor/PropertyEditor/inputs/ImageGridInput.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/inputs/ImageGridInput.js +148 -121
- package/dist/editor/PropertyEditor/inputs/ImageGridInput.js.map +1 -1
- package/dist/editor/PropertyEditor/inputs/index.d.ts +1 -0
- package/dist/editor/PropertyEditor/inputs/index.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/renderPropertyInput.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/renderPropertyInput.js +167 -139
- package/dist/editor/PropertyEditor/renderPropertyInput.js.map +1 -1
- package/dist/editor/components/CenterPanel.d.ts +9 -1
- package/dist/editor/components/CenterPanel.d.ts.map +1 -1
- package/dist/editor/components/CenterPanel.js +24 -14
- package/dist/editor/components/CenterPanel.js.map +1 -1
- package/dist/editor/components/RightPanel.d.ts +5 -0
- package/dist/editor/components/RightPanel.d.ts.map +1 -1
- package/dist/editor/components/RightPanel.js +18 -12
- package/dist/editor/components/RightPanel.js.map +1 -1
- package/dist/editor/components/Toolbar.d.ts +3 -0
- package/dist/editor/components/Toolbar.d.ts.map +1 -1
- package/dist/editor/components/Toolbar.js +54 -35
- package/dist/editor/components/Toolbar.js.map +1 -1
- package/dist/engine/export/exportHtml.d.ts.map +1 -1
- package/dist/engine/export/exportHtml.js +50 -50
- package/dist/engine/export/exportHtml.js.map +1 -1
- package/dist/engine/export/exporters/sections/BlogPostExporters.d.ts +6 -0
- package/dist/engine/export/exporters/sections/BlogPostExporters.d.ts.map +1 -0
- package/dist/engine/export/exporters/sections/BlogPostExporters.js +101 -0
- package/dist/engine/export/exporters/sections/BlogPostExporters.js.map +1 -0
- package/dist/engine/export/exporters/sections/FooterExporter.js +22 -22
- package/dist/engine/export/exporters/sections/FooterExporter.js.map +1 -1
- package/dist/engine/export/exporters/sections/HeroExporter.d.ts.map +1 -1
- package/dist/engine/export/exporters/sections/HeroExporter.js +222 -205
- package/dist/engine/export/exporters/sections/HeroExporter.js.map +1 -1
- package/dist/engine/export/exporters/sections/MarketingExporters.js +88 -88
- package/dist/engine/export/exporters/sections/MarketingExporters.js.map +1 -1
- package/dist/engine/export/exporters/sections/NavbarExporter.js +34 -34
- package/dist/engine/export/exporters/sections/NavbarExporter.js.map +1 -1
- package/dist/engine/export/exporters/sections/index.d.ts.map +1 -1
- package/dist/engine/export/exporters/sections/index.js +29 -22
- package/dist/engine/export/exporters/sections/index.js.map +1 -1
- package/dist/engine/index.d.ts +3 -0
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +99 -87
- package/dist/engine/index.js.map +1 -1
- package/dist/engine/plugins/builtin/blog/index.d.ts +3 -0
- package/dist/engine/plugins/builtin/blog/index.d.ts.map +1 -0
- package/dist/engine/plugins/builtin/blog/manifest.d.ts +3 -0
- package/dist/engine/plugins/builtin/blog/manifest.d.ts.map +1 -0
- package/dist/engine/plugins/builtin/blog/manifest.js +273 -0
- package/dist/engine/plugins/builtin/blog/manifest.js.map +1 -0
- package/dist/engine/plugins/builtin/blog/mockContentProvider.d.ts +7 -0
- package/dist/engine/plugins/builtin/blog/mockContentProvider.d.ts.map +1 -0
- package/dist/engine/plugins/builtin/blog/mockContentProvider.js +135 -0
- package/dist/engine/plugins/builtin/blog/mockContentProvider.js.map +1 -0
- package/dist/engine/plugins/contentHydration.d.ts +17 -0
- package/dist/engine/plugins/contentHydration.d.ts.map +1 -0
- package/dist/engine/plugins/contentHydration.js +121 -0
- package/dist/engine/plugins/contentHydration.js.map +1 -0
- package/dist/engine/plugins/dynamicPageResolver.d.ts +25 -0
- package/dist/engine/plugins/dynamicPageResolver.d.ts.map +1 -0
- package/dist/engine/plugins/dynamicPageResolver.js +32 -0
- package/dist/engine/plugins/dynamicPageResolver.js.map +1 -0
- package/dist/engine/plugins/index.d.ts +11 -0
- package/dist/engine/plugins/index.d.ts.map +1 -0
- package/dist/engine/plugins/pluginRegistry.d.ts +37 -0
- package/dist/engine/plugins/pluginRegistry.d.ts.map +1 -0
- package/dist/engine/plugins/pluginRegistry.js +134 -0
- package/dist/engine/plugins/pluginRegistry.js.map +1 -0
- package/dist/engine/plugins/types.d.ts +180 -0
- package/dist/engine/plugins/types.d.ts.map +1 -0
- package/dist/engine/presets/heroVariations.d.ts +5 -0
- package/dist/engine/presets/heroVariations.d.ts.map +1 -1
- package/dist/engine/presets/heroVariations.js +50 -6
- package/dist/engine/presets/heroVariations.js.map +1 -1
- package/dist/engine/preview/Preview.d.ts +6 -2
- package/dist/engine/preview/Preview.d.ts.map +1 -1
- package/dist/engine/preview/Preview.js +295 -125
- package/dist/engine/preview/Preview.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogPostCard.d.ts +3 -0
- package/dist/engine/registry/blocks/sections/blogPostCard.d.ts.map +1 -0
- package/dist/engine/registry/blocks/sections/blogPostCard.js +53 -0
- package/dist/engine/registry/blocks/sections/blogPostCard.js.map +1 -0
- package/dist/engine/registry/blocks/sections/blogPostDetail.d.ts +3 -0
- package/dist/engine/registry/blocks/sections/blogPostDetail.d.ts.map +1 -0
- package/dist/engine/registry/blocks/sections/blogPostDetail.js +49 -0
- package/dist/engine/registry/blocks/sections/blogPostDetail.js.map +1 -0
- package/dist/engine/registry/blocks/sections/blogPostGrid.d.ts +3 -0
- package/dist/engine/registry/blocks/sections/blogPostGrid.d.ts.map +1 -0
- package/dist/engine/registry/blocks/sections/blogPostGrid.js +89 -0
- package/dist/engine/registry/blocks/sections/blogPostGrid.js.map +1 -0
- package/dist/engine/registry/blocks/sections/hero.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/hero.js +67 -14
- package/dist/engine/registry/blocks/sections/hero.js.map +1 -1
- package/dist/engine/registry/blocks/sections/index.d.ts +3 -0
- package/dist/engine/registry/blocks/sections/index.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/navbar.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/navbar.js +2 -1
- package/dist/engine/registry/blocks/sections/navbar.js.map +1 -1
- package/dist/engine/registry/registry.d.ts.map +1 -1
- package/dist/engine/registry/registry.js +16 -12
- package/dist/engine/registry/registry.js.map +1 -1
- package/dist/engine/registry/types.d.ts +10 -6
- package/dist/engine/registry/types.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.d.ts +3 -0
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.d.ts.map +1 -0
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.js +199 -0
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.js.map +1 -0
- package/dist/engine/render/renderers/sections/BlogPostDetailRenderer.d.ts +3 -0
- package/dist/engine/render/renderers/sections/BlogPostDetailRenderer.d.ts.map +1 -0
- package/dist/engine/render/renderers/sections/BlogPostDetailRenderer.js +293 -0
- package/dist/engine/render/renderers/sections/BlogPostDetailRenderer.js.map +1 -0
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.d.ts +3 -0
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.d.ts.map +1 -0
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.js +101 -0
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.js.map +1 -0
- package/dist/engine/render/renderers/sections/CtaRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/CtaRenderer.js +33 -31
- package/dist/engine/render/renderers/sections/CtaRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/FaqItemRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/FaqItemRenderer.js +7 -6
- package/dist/engine/render/renderers/sections/FaqItemRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/FaqRenderer.js +7 -7
- package/dist/engine/render/renderers/sections/FaqRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/FeatureGridRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/FeatureGridRenderer.js +19 -18
- package/dist/engine/render/renderers/sections/FeatureGridRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/FeatureRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/FeatureRenderer.js +5 -4
- package/dist/engine/render/renderers/sections/FeatureRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/FooterRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/FooterRenderer.js +8 -7
- package/dist/engine/render/renderers/sections/FooterRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/HeroRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/HeroRenderer.js +295 -218
- package/dist/engine/render/renderers/sections/HeroRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/NavbarRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/NavbarRenderer.js +23 -22
- package/dist/engine/render/renderers/sections/NavbarRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/PricingCardRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/PricingCardRenderer.js +7 -6
- package/dist/engine/render/renderers/sections/PricingCardRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/PricingRenderer.js +9 -9
- package/dist/engine/render/renderers/sections/PricingRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/TestimonialGridRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/TestimonialGridRenderer.js +17 -16
- package/dist/engine/render/renderers/sections/TestimonialGridRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/TestimonialRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/TestimonialRenderer.js +11 -10
- package/dist/engine/render/renderers/sections/TestimonialRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/index.js +24 -18
- package/dist/engine/render/renderers/sections/index.js.map +1 -1
- package/dist/engine/schema/siteDocument.d.ts +104 -3
- package/dist/engine/schema/siteDocument.d.ts.map +1 -1
- package/dist/engine/schema/siteDocument.js.map +1 -1
- package/dist/engine/shared/carouselAnimation.d.ts +20 -0
- package/dist/engine/shared/carouselAnimation.d.ts.map +1 -0
- package/dist/engine/shared/carouselAnimation.js +62 -0
- package/dist/engine/shared/carouselAnimation.js.map +1 -0
- package/dist/engine/shared/imageGrid/types.d.ts +2 -0
- package/dist/engine/shared/imageGrid/types.d.ts.map +1 -1
- package/dist/engine/shared/showWhen.d.ts +44 -0
- package/dist/engine/shared/showWhen.d.ts.map +1 -0
- package/dist/engine/shared/showWhen.js +33 -0
- package/dist/engine/shared/showWhen.js.map +1 -0
- package/dist/hooks/useEditorState.d.ts +3 -0
- package/dist/hooks/useEditorState.d.ts.map +1 -1
- package/dist/hooks/useEditorState.js +106 -84
- package/dist/hooks/useEditorState.js.map +1 -1
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +109 -93
- package/dist/index.js.map +1 -1
- package/dist/shared/templates/escola-blog.d.ts +3 -0
- package/dist/shared/templates/escola-blog.d.ts.map +1 -0
- package/dist/shared/templates/escola-blog.js +160 -0
- package/dist/shared/templates/escola-blog.js.map +1 -0
- package/dist/shared/templates/index.d.ts +2 -0
- package/dist/shared/templates/index.d.ts.map +1 -1
- package/dist/shared/templates/index.js +30 -12
- package/dist/shared/templates/index.js.map +1 -1
- package/dist/utils/changeDetector.d.ts +2 -1
- package/dist/utils/changeDetector.d.ts.map +1 -1
- package/dist/utils/changeDetector.js +39 -39
- package/dist/utils/changeDetector.js.map +1 -1
- package/dist/utils/sharedTemplateToEngine.d.ts +4 -5
- package/dist/utils/sharedTemplateToEngine.d.ts.map +1 -1
- package/dist/utils/sharedTemplateToEngine.js +14 -87
- package/dist/utils/sharedTemplateToEngine.js.map +1 -1
- package/dist/viewer/LandingPageViewer.d.ts +13 -6
- package/dist/viewer/LandingPageViewer.d.ts.map +1 -1
- package/dist/viewer/LandingPageViewer.js +220 -122
- package/dist/viewer/LandingPageViewer.js.map +1 -1
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/engine/export/exporters/sections/index.ts"],"sourcesContent":["/**\n * Section Exporters Auto-Registration\n */\n\nimport { htmlExportRegistry } from \"../HtmlExporter\";\nimport { exportHero } from \"./HeroExporter\";\nimport { exportNavbar } from \"./NavbarExporter\";\nimport { exportFooter } from \"./FooterExporter\";\nimport {\n exportFeature,\n exportFeatureGrid,\n exportCta,\n exportPricingCard,\n exportPricing,\n exportTestimonial,\n exportTestimonialGrid,\n exportFaqItem,\n exportFaq,\n exportStats,\n exportStatItem,\n exportLogoCloud,\n exportSocialLinks,\n} from \"./MarketingExporters\";\nimport {\n exportBlogCard,\n exportBlogCardGrid,\n exportTeamCard,\n exportTeamGrid,\n exportCourseCardGrid,\n exportCountdown,\n exportCarousel,\n} from \"./ContentGridExporters\";\n\n// Referência para renderChild\nimport { Block } from \"../../../schema/siteDocument\";\nimport { ThemeTokens } from \"../../../schema/themeTokens\";\n\nlet renderChildRef: ((block: Block, depth: number, basePath?: string, theme?: ThemeTokens) => string) | null = null;\n\nexport function setSectionExportersRenderChild(\n fn: (block: Block, depth: number, basePath?: string, theme?: ThemeTokens) => string\n) {\n renderChildRef = fn;\n}\n\n// Exporters simples (sem children)\nhtmlExportRegistry.register(\"hero\", exportHero);\nhtmlExportRegistry.register(\"navbar\", exportNavbar);\nhtmlExportRegistry.register(\"footer\", exportFooter);\nhtmlExportRegistry.register(\"feature\", exportFeature);\nhtmlExportRegistry.register(\"cta\", exportCta);\nhtmlExportRegistry.register(\"pricingCard\", exportPricingCard);\nhtmlExportRegistry.register(\"testimonial\", exportTestimonial);\nhtmlExportRegistry.register(\"faqItem\", exportFaqItem);\nhtmlExportRegistry.register(\"stats\", exportStats);\nhtmlExportRegistry.register(\"statItem\", exportStatItem);\nhtmlExportRegistry.register(\"logoCloud\", exportLogoCloud);\nhtmlExportRegistry.register(\"socialLinks\", exportSocialLinks);\nhtmlExportRegistry.register(\"blogCard\", exportBlogCard);\nhtmlExportRegistry.register(\"teamCard\", exportTeamCard);\nhtmlExportRegistry.register(\"courseCardGrid\", exportCourseCardGrid);\nhtmlExportRegistry.register(\"countdown\", exportCountdown);\nhtmlExportRegistry.register(\"carousel\", exportCarousel);\n\n// Exporters que precisam de renderChild\nhtmlExportRegistry.register(\"featureGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportFeatureGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"pricing\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportPricing(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"testimonialGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportTestimonialGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"faq\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportFaq(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"blogCardGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportBlogCardGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"teamGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportTeamGrid(block, depth, basePath, theme, renderChildRef);\n});\n"],"names":["renderChildRef","setSectionExportersRenderChild","fn","htmlExportRegistry","exportHero","exportNavbar","exportFooter","exportFeature","exportCta","exportPricingCard","exportTestimonial","exportFaqItem","exportStats","exportStatItem","exportLogoCloud","exportSocialLinks","exportBlogCard","exportTeamCard","exportCourseCardGrid","exportCountdown","exportCarousel","block","depth","basePath","theme","exportFeatureGrid","exportPricing","exportTestimonialGrid","exportFaq","exportBlogCardGrid","exportTeamGrid"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/engine/export/exporters/sections/index.ts"],"sourcesContent":["/**\n * Section Exporters Auto-Registration\n */\n\nimport { htmlExportRegistry } from \"../HtmlExporter\";\nimport { exportHero } from \"./HeroExporter\";\nimport { exportNavbar } from \"./NavbarExporter\";\nimport { exportFooter } from \"./FooterExporter\";\nimport {\n exportFeature,\n exportFeatureGrid,\n exportCta,\n exportPricingCard,\n exportPricing,\n exportTestimonial,\n exportTestimonialGrid,\n exportFaqItem,\n exportFaq,\n exportStats,\n exportStatItem,\n exportLogoCloud,\n exportSocialLinks,\n} from \"./MarketingExporters\";\nimport {\n exportBlogCard,\n exportBlogCardGrid,\n exportTeamCard,\n exportTeamGrid,\n exportCourseCardGrid,\n exportCountdown,\n exportCarousel,\n} from \"./ContentGridExporters\";\nimport {\n exportBlogPostCard,\n exportBlogPostGrid,\n exportBlogPostDetail,\n} from \"./BlogPostExporters\";\n\n// Referência para renderChild\nimport { Block } from \"../../../schema/siteDocument\";\nimport { ThemeTokens } from \"../../../schema/themeTokens\";\n\nlet renderChildRef: ((block: Block, depth: number, basePath?: string, theme?: ThemeTokens) => string) | null = null;\n\nexport function setSectionExportersRenderChild(\n fn: (block: Block, depth: number, basePath?: string, theme?: ThemeTokens) => string\n) {\n renderChildRef = fn;\n}\n\n// Exporters simples (sem children)\nhtmlExportRegistry.register(\"hero\", exportHero);\nhtmlExportRegistry.register(\"navbar\", exportNavbar);\nhtmlExportRegistry.register(\"footer\", exportFooter);\nhtmlExportRegistry.register(\"feature\", exportFeature);\nhtmlExportRegistry.register(\"cta\", exportCta);\nhtmlExportRegistry.register(\"pricingCard\", exportPricingCard);\nhtmlExportRegistry.register(\"testimonial\", exportTestimonial);\nhtmlExportRegistry.register(\"faqItem\", exportFaqItem);\nhtmlExportRegistry.register(\"stats\", exportStats);\nhtmlExportRegistry.register(\"statItem\", exportStatItem);\nhtmlExportRegistry.register(\"logoCloud\", exportLogoCloud);\nhtmlExportRegistry.register(\"socialLinks\", exportSocialLinks);\nhtmlExportRegistry.register(\"blogCard\", exportBlogCard);\nhtmlExportRegistry.register(\"blogPostCard\", exportBlogPostCard);\nhtmlExportRegistry.register(\"blogPostDetail\", exportBlogPostDetail);\nhtmlExportRegistry.register(\"teamCard\", exportTeamCard);\nhtmlExportRegistry.register(\"courseCardGrid\", exportCourseCardGrid);\nhtmlExportRegistry.register(\"countdown\", exportCountdown);\nhtmlExportRegistry.register(\"carousel\", exportCarousel);\n\n// Exporters que precisam de renderChild\nhtmlExportRegistry.register(\"featureGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportFeatureGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"pricing\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportPricing(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"testimonialGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportTestimonialGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"faq\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportFaq(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"blogCardGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportBlogCardGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"blogPostGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportBlogPostGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"teamGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportTeamGrid(block, depth, basePath, theme, renderChildRef);\n});\n"],"names":["renderChildRef","setSectionExportersRenderChild","fn","htmlExportRegistry","exportHero","exportNavbar","exportFooter","exportFeature","exportCta","exportPricingCard","exportTestimonial","exportFaqItem","exportStats","exportStatItem","exportLogoCloud","exportSocialLinks","exportBlogCard","exportBlogPostCard","exportBlogPostDetail","exportTeamCard","exportCourseCardGrid","exportCountdown","exportCarousel","block","depth","basePath","theme","exportFeatureGrid","exportPricing","exportTestimonialGrid","exportFaq","exportBlogCardGrid","exportBlogPostGrid","exportTeamGrid"],"mappings":";;;;;;;AA0CA,IAAIA,IAA2G;AAExG,SAASC,EACdC,GACA;AACA,EAAAF,IAAiBE;AACnB;AAGAC,EAAmB,SAAS,QAAQC,CAAU;AAC9CD,EAAmB,SAAS,UAAUE,CAAY;AAClDF,EAAmB,SAAS,UAAUG,CAAY;AAClDH,EAAmB,SAAS,WAAWI,CAAa;AACpDJ,EAAmB,SAAS,OAAOK,CAAS;AAC5CL,EAAmB,SAAS,eAAeM,CAAiB;AAC5DN,EAAmB,SAAS,eAAeO,CAAiB;AAC5DP,EAAmB,SAAS,WAAWQ,CAAa;AACpDR,EAAmB,SAAS,SAASS,CAAW;AAChDT,EAAmB,SAAS,YAAYU,CAAc;AACtDV,EAAmB,SAAS,aAAaW,CAAe;AACxDX,EAAmB,SAAS,eAAeY,CAAiB;AAC5DZ,EAAmB,SAAS,YAAYa,CAAc;AACtDb,EAAmB,SAAS,gBAAgBc,CAAkB;AAC9Dd,EAAmB,SAAS,kBAAkBe,CAAoB;AAClEf,EAAmB,SAAS,YAAYgB,CAAc;AACtDhB,EAAmB,SAAS,kBAAkBiB,CAAoB;AAClEjB,EAAmB,SAAS,aAAakB,CAAe;AACxDlB,EAAmB,SAAS,YAAYmB,CAAc;AAGtDnB,EAAmB,SAAS,eAAe,CAACoB,GAAOC,GAAOC,GAAUC,MAAU;AAC5E,MAAI,CAAC1B,EAAgB,OAAM,IAAI,MAAM,6BAA6B;AAClE,SAAO2B,EAAkBJ,CAA6C;AACxE,CAAC;AAEDpB,EAAmB,SAAS,WAAW,CAACoB,GAAOC,GAAOC,GAAUC,MAAU;AACxE,MAAI,CAAC1B,EAAgB,OAAM,IAAI,MAAM,6BAA6B;AAClE,SAAO4B,EAAcL,GAAOC,GAAOC,GAAUC,GAAO1B,CAAc;AACpE,CAAC;AAEDG,EAAmB,SAAS,mBAAmB,CAACoB,GAAOC,GAAOC,GAAUC,MAAU;AAChF,MAAI,CAAC1B,EAAgB,OAAM,IAAI,MAAM,6BAA6B;AAClE,SAAO6B,EAAsBN,GAAOC,GAAOC,GAAUC,GAAO1B,CAAc;AAC5E,CAAC;AAEDG,EAAmB,SAAS,OAAO,CAACoB,GAAOC,GAAOC,GAAUC,MAAU;AACpE,MAAI,CAAC1B,EAAgB,OAAM,IAAI,MAAM,6BAA6B;AAClE,SAAO8B,EAAUP,GAAOC,GAAOC,GAAUC,GAAO1B,CAAc;AAChE,CAAC;AAEDG,EAAmB,SAAS,gBAAgB,CAACoB,GAAOC,GAAOC,GAAUC,MAAU;AAC7E,MAAI,CAAC1B,EAAgB,OAAM,IAAI,MAAM,6BAA6B;AAClE,SAAO+B,EAAmBR,GAAOC,GAAOC,GAAUC,GAAO1B,CAAc;AACzE,CAAC;AAEDG,EAAmB,SAAS,gBAAgB,CAACoB,GAAOC,GAAOC,GAAUC,MAAU;AAC7E,MAAI,CAAC1B,EAAgB,OAAM,IAAI,MAAM,6BAA6B;AAClE,SAAOgC,EAAmBT,GAAOC,GAAOC,GAAUC,GAAO1B,CAAc;AACzE,CAAC;AAEDG,EAAmB,SAAS,YAAY,CAACoB,GAAOC,GAAOC,GAAUC,MAAU;AACzE,MAAI,CAAC1B,EAAgB,OAAM,IAAI,MAAM,6BAA6B;AAClE,SAAOiC,EAAeV,GAAOC,GAAOC,GAAUC,GAAO1B,CAAc;AACrE,CAAC;"}
|
package/dist/engine/index.d.ts
CHANGED
|
@@ -21,5 +21,8 @@ export * from './presets/themePresets';
|
|
|
21
21
|
export { heroVariations, heroVariationIds, getHeroVariation, HERO_IMAGE_NAMES, PLACEHOLDER_IMAGE_URL, type HeroVariationPreset, } from './presets/heroVariations';
|
|
22
22
|
export { navbarVariations, navbarVariationIds, getNavbarVariation, type NavbarVariationPreset, } from './presets/navbarVariations';
|
|
23
23
|
export * from './generators/generateLandingPage';
|
|
24
|
+
export * from './plugins';
|
|
24
25
|
export * from './shared/imageGrid';
|
|
26
|
+
export { evaluateShowWhen } from './shared/showWhen';
|
|
27
|
+
export type { ShowWhenCondition, ShowWhenFieldCondition, ShowWhenAndCondition, ShowWhenOrCondition, ShowWhenContext, } from './shared/showWhen';
|
|
25
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/engine/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAElC,OAAO,mBAAmB,CAAC;AAG3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,SAAS,CAAC;AAGxB,cAAc,wBAAwB,CAAC;AACvC,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,mBAAmB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,qBAAqB,GAC3B,MAAM,4BAA4B,CAAC;AAGpC,cAAc,kCAAkC,CAAC;AAGjD,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/engine/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAElC,OAAO,mBAAmB,CAAC;AAG3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,SAAS,CAAC;AAGxB,cAAc,wBAAwB,CAAC;AACvC,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,mBAAmB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,qBAAqB,GAC3B,MAAM,4BAA4B,CAAC;AAGpC,cAAc,kCAAkC,CAAC;AAGjD,cAAc,WAAW,CAAC;AAE1B,OAAO,wBAAwB,CAAC;AAGhC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,YAAY,EACV,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,GAChB,MAAM,mBAAmB,CAAC"}
|
package/dist/engine/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createEmptySiteDocument as
|
|
2
|
-
import { corporateThemeTokens as
|
|
3
|
-
import { componentRegistry as
|
|
1
|
+
import { createEmptySiteDocument as $ } from "./schema/siteDocument.js";
|
|
2
|
+
import { corporateThemeTokens as re, darkThemeTokens as te, defaultComponentTokens as oe, defaultEffectTokens as ae, defaultLayoutTokens as me, defaultThemeTokens as ie, generateThemeCSSVariables as pe, gradientDirectionMap as se, gradientThemeTokens as ne, playfulThemeTokens as le, radiusScaleMap as ce, shadowScaleMap as ge, spacingScaleMap as de } from "./schema/themeTokens.js";
|
|
3
|
+
import { componentRegistry as he } 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";
|
|
@@ -42,94 +42,106 @@ import "./registry/blocks/sections/teamCard.js";
|
|
|
42
42
|
import "./registry/blocks/sections/teamGrid.js";
|
|
43
43
|
import "./registry/blocks/sections/courseCardGrid.js";
|
|
44
44
|
import "./registry/blocks/sections/categoryCardGrid.js";
|
|
45
|
+
import "./registry/blocks/sections/blogPostCard.js";
|
|
46
|
+
import "./registry/blocks/sections/blogPostGrid.js";
|
|
47
|
+
import "./registry/blocks/sections/blogPostDetail.js";
|
|
45
48
|
import "./registry/blocks/forms/form.js";
|
|
46
49
|
import "./registry/blocks/forms/input.js";
|
|
47
50
|
import "./registry/blocks/forms/textarea.js";
|
|
48
51
|
import "./registry/blocks/forms/select.js";
|
|
49
|
-
import { RenderNode as
|
|
50
|
-
import { RenderPage as
|
|
51
|
-
import { clearHtmlCache as
|
|
52
|
-
import { isSafeUrl as
|
|
53
|
-
import { Preview as
|
|
54
|
-
import { applyPatch as
|
|
55
|
-
import { HistoryManager as
|
|
56
|
-
import { PatchBuilder as
|
|
57
|
-
import { applyOverrides as
|
|
58
|
-
import { HERO_IMAGE_NAMES as
|
|
59
|
-
import { getNavbarVariation as
|
|
60
|
-
import { generateCompleteLandingPage as
|
|
61
|
-
import
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
52
|
+
import { RenderNode as Te } from "./render/renderNode.js";
|
|
53
|
+
import { RenderPage as Se, renderPage as ke } from "./render/renderPage.js";
|
|
54
|
+
import { clearHtmlCache as ye, exportBlockToHtml as Me, exportDocumentToHtml as Ce, exportPageToHtml as Ve, generateAssetsManifest as be } from "./export/exportHtml.js";
|
|
55
|
+
import { isSafeUrl as ve, sanitizeHtml as Re } from "./export/sanitizeHtml.js";
|
|
56
|
+
import { Preview as Q } from "./preview/Preview.js";
|
|
57
|
+
import { applyPatch as Ae, createAddPatch as De, createCopyPatch as Le, createMovePatch as Ie, createRemovePatch as Ne, createReplacePatch as Oe } from "./patch/applyPatch.js";
|
|
58
|
+
import { HistoryManager as we, createHistoryManager as Be } from "./patch/history.js";
|
|
59
|
+
import { PatchBuilder as je } from "./patch/PatchBuilder.js";
|
|
60
|
+
import { applyOverrides as We, classicPreset as ze, cleanPreset as Fe, corporatePreset as Ke, getAllPresets as qe, getPreset as Je, glassPreset as Qe, minimalPreset as Xe, neonPreset as Ye, pastelPreset as Ze, playfulKidsPreset as $e, themePresets as er, validateContrast as rr } from "./presets/themePresets.js";
|
|
61
|
+
import { HERO_IMAGE_NAMES as or, PLACEHOLDER_IMAGE_URL as ar, getHeroVariation as mr, heroVariationIds as ir, heroVariations as pr } from "./presets/heroVariations.js";
|
|
62
|
+
import { getNavbarVariation as nr, navbarVariationIds as lr, navbarVariations as cr } from "./presets/navbarVariations.js";
|
|
63
|
+
import { generateCompleteLandingPage as dr, generateModernLandingPage as fr, generatePatchesForLandingPage as hr } from "./generators/generateLandingPage.js";
|
|
64
|
+
import "./plugins/builtin/blog/manifest.js";
|
|
65
|
+
import { evaluateShowWhen as Tr } from "./shared/showWhen.js";
|
|
66
|
+
import { createThemeStyle as Sr, generateCSSVariables as kr, generateCSSVariablesObject as ur, mergeThemeTokens as yr } from "./theme/generateCSSVariables.js";
|
|
67
|
+
import { gridPresetMap as Cr, imageGridPresetIds as Vr } from "./shared/imageGrid/presets.js";
|
|
68
|
+
import { hydratePageWithContent as Hr } from "./plugins/contentHydration.js";
|
|
69
|
+
import { matchDynamicPage as Rr } from "./plugins/dynamicPageResolver.js";
|
|
70
|
+
import { pluginRegistry as Ar } from "./plugins/pluginRegistry.js";
|
|
71
|
+
import { renderBlockNode as Lr } from "./render/renderNodeImpl.js";
|
|
72
|
+
import { darkTheme as Nr, defaultTheme as Or } from "./theme/defaultTheme.js";
|
|
65
73
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
74
|
+
or as HERO_IMAGE_NAMES,
|
|
75
|
+
we as HistoryManager,
|
|
76
|
+
ar as PLACEHOLDER_IMAGE_URL,
|
|
77
|
+
je as PatchBuilder,
|
|
78
|
+
Q as Preview,
|
|
79
|
+
Te as RenderNode,
|
|
80
|
+
Se as RenderPage,
|
|
81
|
+
We as applyOverrides,
|
|
82
|
+
Ae as applyPatch,
|
|
83
|
+
ze as classicPreset,
|
|
84
|
+
Fe as cleanPreset,
|
|
85
|
+
ye as clearHtmlCache,
|
|
86
|
+
he as componentRegistry,
|
|
87
|
+
Ke as corporatePreset,
|
|
88
|
+
re as corporateThemeTokens,
|
|
89
|
+
De as createAddPatch,
|
|
90
|
+
Le as createCopyPatch,
|
|
91
|
+
$ as createEmptySiteDocument,
|
|
92
|
+
Be as createHistoryManager,
|
|
93
|
+
Ie as createMovePatch,
|
|
94
|
+
Ne as createRemovePatch,
|
|
95
|
+
Oe as createReplacePatch,
|
|
96
|
+
Sr as createSiteThemeStyle,
|
|
97
|
+
te as darkThemeTokens,
|
|
98
|
+
oe as defaultComponentTokens,
|
|
99
|
+
ae as defaultEffectTokens,
|
|
100
|
+
me as defaultLayoutTokens,
|
|
101
|
+
ie as defaultThemeTokens,
|
|
102
|
+
Tr as evaluateShowWhen,
|
|
103
|
+
Me as exportBlockToHtml,
|
|
104
|
+
Ce as exportDocumentToHtml,
|
|
105
|
+
Ve as exportPageToHtml,
|
|
106
|
+
be as generateAssetsManifest,
|
|
107
|
+
dr as generateCompleteLandingPage,
|
|
108
|
+
fr as generateModernLandingPage,
|
|
109
|
+
hr as generatePatchesForLandingPage,
|
|
110
|
+
kr as generateSiteCSSVariables,
|
|
111
|
+
ur as generateSiteCSSVariablesObject,
|
|
112
|
+
pe as generateThemeCSSVariables,
|
|
113
|
+
qe as getAllPresets,
|
|
114
|
+
mr as getHeroVariation,
|
|
115
|
+
nr as getNavbarVariation,
|
|
116
|
+
Je as getPreset,
|
|
117
|
+
Qe as glassPreset,
|
|
118
|
+
se as gradientDirectionMap,
|
|
119
|
+
ne as gradientThemeTokens,
|
|
120
|
+
Cr as gridPresetMap,
|
|
121
|
+
ir as heroVariationIds,
|
|
122
|
+
pr as heroVariations,
|
|
123
|
+
Hr as hydratePageWithContent,
|
|
124
|
+
Vr as imageGridPresetIds,
|
|
125
|
+
ve as isSafeUrl,
|
|
126
|
+
Rr as matchDynamicPage,
|
|
127
|
+
yr as mergeSiteThemeTokens,
|
|
128
|
+
Xe as minimalPreset,
|
|
129
|
+
lr as navbarVariationIds,
|
|
130
|
+
cr as navbarVariations,
|
|
131
|
+
Ye as neonPreset,
|
|
132
|
+
Ze as pastelPreset,
|
|
133
|
+
$e as playfulKidsPreset,
|
|
134
|
+
le as playfulThemeTokens,
|
|
135
|
+
Ar as pluginRegistry,
|
|
136
|
+
ce as radiusScaleMap,
|
|
137
|
+
Lr as renderNode,
|
|
138
|
+
ke as renderPage,
|
|
139
|
+
Re as sanitizeHtml,
|
|
140
|
+
ge as shadowScaleMap,
|
|
141
|
+
Nr as siteDarkTheme,
|
|
142
|
+
Or as siteDefaultTheme,
|
|
143
|
+
de as spacingScaleMap,
|
|
144
|
+
er as themePresets,
|
|
145
|
+
rr as validateContrast
|
|
134
146
|
};
|
|
135
147
|
//# sourceMappingURL=index.js.map
|
package/dist/engine/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/engine/plugins/builtin/blog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { pluginRegistry as h } from "../../pluginRegistry.js";
|
|
2
|
+
import { logger as n } from "../../../../utils/logger.js";
|
|
3
|
+
const g = "plugin-blog-home-grid", c = [
|
|
4
|
+
{
|
|
5
|
+
title: "Feira de Ciências 2026: Inovação e Criatividade",
|
|
6
|
+
excerpt: "Nossos alunos apresentaram projetos incríveis na Feira de Ciências deste ano. Confira os destaques e premiações!",
|
|
7
|
+
image: "https://images.unsplash.com/photo-1567168544230-3b9e5ec47659?w=800&h=400&fit=crop",
|
|
8
|
+
category: "Eventos",
|
|
9
|
+
date: "05 Fev 2026",
|
|
10
|
+
linkHref: "/site/p/blog/feira-de-ciencias-2026",
|
|
11
|
+
linkText: "Ler mais"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
title: "Matrículas Abertas para o Segundo Semestre",
|
|
15
|
+
excerpt: "Garanta a vaga do seu filho na melhor escola da região. Condições especiais para matrículas antecipadas.",
|
|
16
|
+
image: "https://images.unsplash.com/photo-1523050854058-8df90110c9f1?w=800&h=400&fit=crop",
|
|
17
|
+
category: "Institucional",
|
|
18
|
+
date: "01 Fev 2026",
|
|
19
|
+
linkHref: "/site/p/blog/matriculas-segundo-semestre",
|
|
20
|
+
linkText: "Ler mais"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: "5 Dicas para Preparar seu Filho para o Ano Letivo",
|
|
24
|
+
excerpt: "Dicas práticas para uma transição tranquila e um início de ano produtivo para toda a família.",
|
|
25
|
+
image: "https://images.unsplash.com/photo-1503676260728-1c00da094a0b?w=800&h=400&fit=crop",
|
|
26
|
+
category: "Educação",
|
|
27
|
+
date: "28 Jan 2026",
|
|
28
|
+
linkHref: "/site/p/blog/dicas-preparar-ano-letivo",
|
|
29
|
+
linkText: "Ler mais"
|
|
30
|
+
}
|
|
31
|
+
], v = `
|
|
32
|
+
<h2>O que é a Feira de Ciências?</h2>
|
|
33
|
+
<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>
|
|
34
|
+
<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>
|
|
35
|
+
|
|
36
|
+
<h2>Destaques da Edição 2026</h2>
|
|
37
|
+
<p>Entre os mais de 50 projetos apresentados, alguns se destacaram pela originalidade e impacto:</p>
|
|
38
|
+
<ul>
|
|
39
|
+
<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>
|
|
40
|
+
<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>
|
|
41
|
+
<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>
|
|
42
|
+
</ul>
|
|
43
|
+
|
|
44
|
+
<blockquote>
|
|
45
|
+
<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>
|
|
46
|
+
<p><strong>— Prof. Maria Silva, Coordenadora Pedagógica</strong></p>
|
|
47
|
+
</blockquote>
|
|
48
|
+
|
|
49
|
+
<h2>Premiações</h2>
|
|
50
|
+
<p>O júri, composto por professores universitários e profissionais da área de tecnologia, selecionou os três melhores projetos:</p>
|
|
51
|
+
<ol>
|
|
52
|
+
<li><strong>1º Lugar:</strong> Jardim Sustentável Inteligente (5º ano)</li>
|
|
53
|
+
<li><strong>2º Lugar:</strong> Energia Solar na Escola (2º EM)</li>
|
|
54
|
+
<li><strong>3º Lugar:</strong> Robótica Educacional (8º ano)</li>
|
|
55
|
+
</ol>
|
|
56
|
+
|
|
57
|
+
<h2>Próximos Passos</h2>
|
|
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
|
+
<p>Parabéns a todos os participantes, professores orientadores e famílias que apoiaram essa jornada de descobertas!</p>
|
|
60
|
+
`.trim();
|
|
61
|
+
function p(o, s) {
|
|
62
|
+
return { ...JSON.parse(JSON.stringify(o)), id: s };
|
|
63
|
+
}
|
|
64
|
+
const f = {
|
|
65
|
+
manifest: {
|
|
66
|
+
id: "blog",
|
|
67
|
+
version: "1.0.0",
|
|
68
|
+
name: "Blog",
|
|
69
|
+
description: "Blog com posts, categorias e tags",
|
|
70
|
+
icon: "FileText",
|
|
71
|
+
capabilities: {
|
|
72
|
+
blocks: ["blogPostCard", "blogPostGrid", "blogPostDetail"],
|
|
73
|
+
pageTemplates: [
|
|
74
|
+
{
|
|
75
|
+
id: "blog-listing",
|
|
76
|
+
name: "Blog",
|
|
77
|
+
slug: "blog",
|
|
78
|
+
pluginId: "blog",
|
|
79
|
+
structure: [],
|
|
80
|
+
dataSource: {
|
|
81
|
+
provider: "blog-posts",
|
|
82
|
+
mode: "list"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: "blog-post",
|
|
87
|
+
name: "Post",
|
|
88
|
+
slug: "blog/:slug",
|
|
89
|
+
pluginId: "blog",
|
|
90
|
+
structure: [],
|
|
91
|
+
dataSource: {
|
|
92
|
+
provider: "blog-posts",
|
|
93
|
+
mode: "single",
|
|
94
|
+
paramMapping: { slug: ":slug" }
|
|
95
|
+
},
|
|
96
|
+
editRestrictions: {
|
|
97
|
+
lockedStructure: !0,
|
|
98
|
+
nonRemovable: !0
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
dataSchemas: [
|
|
103
|
+
{
|
|
104
|
+
type: "blog-post",
|
|
105
|
+
label: "Blog Post",
|
|
106
|
+
fields: [
|
|
107
|
+
{ name: "title", type: "string", required: !0, label: "Title" },
|
|
108
|
+
{ name: "slug", type: "string", required: !0, label: "Slug" },
|
|
109
|
+
{ name: "excerpt", type: "string", label: "Excerpt" },
|
|
110
|
+
{ name: "content", type: "richtext", required: !0, label: "Content" },
|
|
111
|
+
{ name: "featuredImage", type: "image", label: "Featured Image" },
|
|
112
|
+
{ name: "category", type: "string", label: "Category" },
|
|
113
|
+
{ name: "tags", type: "array", label: "Tags" },
|
|
114
|
+
{ name: "authorVariant", type: "string", label: "Author Variant" },
|
|
115
|
+
{ name: "readingTime", type: "number", label: "Reading Time" }
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
contentProviders: ["blog-posts", "blog-categories"]
|
|
120
|
+
},
|
|
121
|
+
restrictions: {
|
|
122
|
+
lockedFields: {
|
|
123
|
+
blogPostDetail: ["content", "date"]
|
|
124
|
+
},
|
|
125
|
+
requiredPages: ["blog-listing", "blog-post"]
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
onActivate(o) {
|
|
129
|
+
n.debug("Blog plugin activating...");
|
|
130
|
+
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
|
+
if (i) {
|
|
132
|
+
const e = a.findIndex((r) => r.id === i.id), m = i.structure.some(
|
|
133
|
+
(r) => r.id === g
|
|
134
|
+
);
|
|
135
|
+
if (e >= 0 && !m) {
|
|
136
|
+
const r = {
|
|
137
|
+
id: g,
|
|
138
|
+
type: "blogPostGrid",
|
|
139
|
+
props: {
|
|
140
|
+
title: "Blog",
|
|
141
|
+
subtitle: "Últimas publicações",
|
|
142
|
+
columns: 3,
|
|
143
|
+
cards: c,
|
|
144
|
+
variant: "default",
|
|
145
|
+
showViewAll: !0,
|
|
146
|
+
viewAllText: "Ver todos os posts",
|
|
147
|
+
viewAllHref: "/site/p/blog"
|
|
148
|
+
}
|
|
149
|
+
}, d = [...a[e].structure], u = d.findIndex(
|
|
150
|
+
(b) => b.type === "footer"
|
|
151
|
+
);
|
|
152
|
+
u >= 0 ? d.splice(u, 0, r) : d.push(r), a[e] = {
|
|
153
|
+
...a[e],
|
|
154
|
+
structure: d
|
|
155
|
+
}, n.debug("Blog section injected into home page");
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (!s.has("blog")) {
|
|
159
|
+
const e = [];
|
|
160
|
+
t && e.push(p(t, "blog-page-navbar")), e.push({
|
|
161
|
+
id: "blog-page-hero",
|
|
162
|
+
type: "hero",
|
|
163
|
+
props: {
|
|
164
|
+
title: "Blog",
|
|
165
|
+
subtitle: "Novidades & Publicações",
|
|
166
|
+
description: "Acompanhe as últimas novidades, eventos e conquistas da nossa comunidade escolar.",
|
|
167
|
+
variant: "centered",
|
|
168
|
+
align: "center",
|
|
169
|
+
overlay: !0,
|
|
170
|
+
overlayColor: "rgba(79, 70, 229, 0.9)",
|
|
171
|
+
background: "#4f46e5",
|
|
172
|
+
minHeight: "280px"
|
|
173
|
+
}
|
|
174
|
+
}), e.push({
|
|
175
|
+
id: "blog-grid-main",
|
|
176
|
+
type: "blogPostGrid",
|
|
177
|
+
props: {
|
|
178
|
+
title: "",
|
|
179
|
+
subtitle: "",
|
|
180
|
+
columns: 3,
|
|
181
|
+
cards: c,
|
|
182
|
+
variant: "default",
|
|
183
|
+
showViewAll: !1,
|
|
184
|
+
viewAllText: "Ver todos",
|
|
185
|
+
viewAllHref: "/blog"
|
|
186
|
+
}
|
|
187
|
+
}), l && e.push(p(l, "blog-page-footer")), a.push({
|
|
188
|
+
id: "blog",
|
|
189
|
+
name: "Blog",
|
|
190
|
+
slug: "blog",
|
|
191
|
+
pluginId: "blog",
|
|
192
|
+
pageTemplateId: "blog-listing",
|
|
193
|
+
structure: e,
|
|
194
|
+
dataSource: {
|
|
195
|
+
provider: "blog-posts",
|
|
196
|
+
mode: "list"
|
|
197
|
+
}
|
|
198
|
+
}), n.debug("Blog listing page created");
|
|
199
|
+
}
|
|
200
|
+
if (!s.has("blog-post")) {
|
|
201
|
+
const e = [];
|
|
202
|
+
t && e.push(p(t, "post-page-navbar")), e.push({
|
|
203
|
+
id: "blog-detail-main",
|
|
204
|
+
type: "blogPostDetail",
|
|
205
|
+
props: {
|
|
206
|
+
title: "Feira de Ciências 2026: Inovação e Criatividade",
|
|
207
|
+
content: v,
|
|
208
|
+
featuredImage: "https://images.unsplash.com/photo-1567168544230-3b9e5ec47659?w=1200&h=600&fit=crop",
|
|
209
|
+
date: "05 Fev 2026",
|
|
210
|
+
category: "Eventos",
|
|
211
|
+
authorVariant: "inline",
|
|
212
|
+
readingTime: "5 min de leitura",
|
|
213
|
+
tags: ["Feira de Ciências", "Eventos", "Sustentabilidade", "Projetos"],
|
|
214
|
+
showFeaturedImage: !0,
|
|
215
|
+
showAuthor: !0,
|
|
216
|
+
showDate: !0,
|
|
217
|
+
showTags: !0,
|
|
218
|
+
showReadingTime: !0,
|
|
219
|
+
contentMaxWidth: "720px"
|
|
220
|
+
}
|
|
221
|
+
}), l && e.push(p(l, "post-page-footer")), a.push({
|
|
222
|
+
id: "blog-post",
|
|
223
|
+
name: "Post",
|
|
224
|
+
slug: "blog/:slug",
|
|
225
|
+
pluginId: "blog",
|
|
226
|
+
pageTemplateId: "blog-post",
|
|
227
|
+
isDynamic: !0,
|
|
228
|
+
structure: e,
|
|
229
|
+
dataSource: {
|
|
230
|
+
provider: "blog-posts",
|
|
231
|
+
mode: "single",
|
|
232
|
+
paramMapping: { slug: ":slug" }
|
|
233
|
+
},
|
|
234
|
+
editRestrictions: {
|
|
235
|
+
lockedStructure: !0,
|
|
236
|
+
nonRemovable: !0
|
|
237
|
+
}
|
|
238
|
+
}), n.debug("Blog post detail page created");
|
|
239
|
+
}
|
|
240
|
+
return {
|
|
241
|
+
...o,
|
|
242
|
+
pages: a
|
|
243
|
+
};
|
|
244
|
+
},
|
|
245
|
+
onDeactivate(o) {
|
|
246
|
+
n.debug("Blog plugin deactivating...");
|
|
247
|
+
const s = o.pages.filter((a) => a.pluginId !== "blog").map((a) => a.structure.some(
|
|
248
|
+
(t) => t.id === g
|
|
249
|
+
) ? {
|
|
250
|
+
...a,
|
|
251
|
+
structure: a.structure.filter(
|
|
252
|
+
(t) => t.id !== g
|
|
253
|
+
)
|
|
254
|
+
} : a);
|
|
255
|
+
return n.debug(
|
|
256
|
+
`Removed ${o.pages.length - s.length} blog page(s) and injected section`
|
|
257
|
+
), {
|
|
258
|
+
...o,
|
|
259
|
+
pages: s
|
|
260
|
+
};
|
|
261
|
+
},
|
|
262
|
+
getEditorRestrictions(o) {
|
|
263
|
+
if (o === "blogPostDetail")
|
|
264
|
+
return {
|
|
265
|
+
lockedFields: ["content", "date"]
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
h.register(f);
|
|
270
|
+
export {
|
|
271
|
+
f as blogPlugin
|
|
272
|
+
};
|
|
273
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +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,SAAS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,EAAK,aAAa,MAAM,EAEzC,IAAI,CAACA,MACgBA,EAAK,UAAU;AAAA,MACjC,CAACT,MAAMA,EAAE,OAAOd;AAAA,IAAA,IAGT;AAAA,MACL,GAAGuB;AAAA,MACH,WAAWA,EAAK,UAAU;AAAA,QACxB,CAACT,MAAMA,EAAE,OAAOd;AAAA,MAAA;AAAA,IAClB,IAGGuB,CACR;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;"}
|
|
@@ -0,0 +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"}
|