@brunoalz/smartgesti-site-editor 0.2.2 → 1.1.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 +2 -1
- package/dist/editor/BlockSelector.d.ts.map +1 -1
- package/dist/editor/BlockSelector.js +55 -64
- package/dist/editor/BlockSelector.js.map +1 -1
- package/dist/editor/LandingPageEditor.d.ts +19 -0
- package/dist/editor/LandingPageEditor.d.ts.map +1 -0
- package/dist/editor/LandingPageEditor.js +239 -0
- package/dist/editor/LandingPageEditor.js.map +1 -0
- 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 +5 -3
- package/dist/editor/PropertyEditor/BlockPropertyEditor.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/BlockPropertyEditor.js +60 -113
- package/dist/editor/PropertyEditor/BlockPropertyEditor.js.map +1 -1
- package/dist/editor/PropertyEditor/CollapsiblePropertyGroup.d.ts +3 -1
- 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/PropertyGroup.d.ts +1 -1
- package/dist/editor/PropertyEditor/PropertyGroup.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/VariationSelector.d.ts +2 -1
- package/dist/editor/PropertyEditor/VariationSelector.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/VariationSelector.js +35 -31
- package/dist/editor/PropertyEditor/VariationSelector.js.map +1 -1
- package/dist/editor/PropertyEditor/index.js +30 -28
- 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 +1 -1
- 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/ImageInput.d.ts.map +1 -0
- package/dist/{components → editor/PropertyEditor}/inputs/ImageInput.js +41 -39
- package/dist/editor/PropertyEditor/inputs/ImageInput.js.map +1 -0
- package/dist/editor/PropertyEditor/inputs/TypographyInput.js +41 -44
- package/dist/editor/PropertyEditor/inputs/TypographyInput.js.map +1 -1
- package/dist/editor/PropertyEditor/inputs/index.d.ts +2 -0
- package/dist/editor/PropertyEditor/inputs/index.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/renderPropertyInput.d.ts +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 +13 -4
- package/dist/editor/components/CenterPanel.d.ts.map +1 -1
- package/dist/editor/components/CenterPanel.js +40 -31
- package/dist/editor/components/CenterPanel.js.map +1 -1
- package/dist/editor/components/LeftPanel.d.ts +2 -1
- package/dist/editor/components/LeftPanel.d.ts.map +1 -1
- package/dist/editor/components/LeftPanel.js +13 -12
- package/dist/editor/components/LeftPanel.js.map +1 -1
- package/dist/editor/components/LoadingSpinner.d.ts.map +1 -0
- package/dist/editor/components/LoadingSpinner.js.map +1 -0
- package/dist/editor/components/RightPanel.d.ts +8 -2
- package/dist/editor/components/RightPanel.d.ts.map +1 -1
- package/dist/editor/components/RightPanel.js +24 -19
- package/dist/editor/components/RightPanel.js.map +1 -1
- package/dist/editor/components/Toolbar.d.ts +5 -1
- package/dist/editor/components/Toolbar.d.ts.map +1 -1
- package/dist/editor/components/Toolbar.js +56 -40
- package/dist/editor/components/Toolbar.js.map +1 -1
- package/dist/engine/export/exportHtml.d.ts +10 -5
- package/dist/engine/export/exportHtml.d.ts.map +1 -1
- package/dist/engine/export/exportHtml.js +38 -40
- package/dist/engine/export/exportHtml.js.map +1 -1
- package/dist/engine/export/exporters/content/HeadingExporter.d.ts.map +1 -1
- package/dist/engine/export/exporters/content/HeadingExporter.js +6 -6
- package/dist/engine/export/exporters/content/HeadingExporter.js.map +1 -1
- package/dist/engine/export/exporters/content/LinkExporter.d.ts.map +1 -1
- package/dist/engine/export/exporters/content/LinkExporter.js +6 -6
- package/dist/engine/export/exporters/content/LinkExporter.js.map +1 -1
- package/dist/engine/export/exporters/content/TextExporter.d.ts.map +1 -1
- package/dist/engine/export/exporters/content/TextExporter.js +7 -7
- package/dist/engine/export/exporters/content/TextExporter.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.d.ts.map +1 -1
- package/dist/engine/export/exporters/sections/FooterExporter.js +33 -40
- 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 -218
- 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/export/sanitizeHtml.d.ts.map +1 -1
- package/dist/engine/export/sanitizeHtml.js +65 -18
- package/dist/engine/export/sanitizeHtml.js.map +1 -1
- package/dist/engine/export/styleResolver.d.ts.map +1 -1
- package/dist/engine/export/styleResolver.js +33 -33
- package/dist/engine/export/styleResolver.js.map +1 -1
- package/dist/engine/generators/generateLandingPage.d.ts +4 -4
- package/dist/engine/generators/generateLandingPage.d.ts.map +1 -1
- package/dist/engine/generators/generateLandingPage.js.map +1 -1
- package/dist/engine/index.d.ts +6 -3
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +99 -89
- package/dist/engine/index.js.map +1 -1
- package/dist/engine/patch/PatchBuilder.d.ts +11 -11
- package/dist/engine/patch/PatchBuilder.d.ts.map +1 -1
- package/dist/engine/patch/PatchBuilder.js +92 -93
- package/dist/engine/patch/PatchBuilder.js.map +1 -1
- package/dist/engine/patch/applyPatch.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 +19 -0
- package/dist/engine/preview/Preview.d.ts.map +1 -0
- package/dist/engine/preview/Preview.js +418 -0
- package/dist/engine/preview/Preview.js.map +1 -0
- 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 +39 -36
- package/dist/engine/registry/registry.js.map +1 -1
- package/dist/engine/registry/types.d.ts +17 -13
- package/dist/engine/registry/types.d.ts.map +1 -1
- package/dist/engine/render/renderNodeImpl.js +85 -85
- package/dist/engine/render/renderNodeImpl.js.map +1 -1
- package/dist/engine/render/renderPage.d.ts +3 -3
- package/dist/engine/render/renderPage.d.ts.map +1 -1
- package/dist/engine/render/renderPage.js.map +1 -1
- package/dist/engine/render/renderers/composition/CardRenderer.js +4 -4
- package/dist/engine/render/renderers/content/LinkRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/content/LinkRenderer.js +41 -16
- package/dist/engine/render/renderers/content/LinkRenderer.js.map +1 -1
- package/dist/engine/render/renderers/content/SocialLinksRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/content/SocialLinksRenderer.js +16 -23
- package/dist/engine/render/renderers/content/SocialLinksRenderer.js.map +1 -1
- package/dist/engine/render/renderers/forms/FormRenderer.js +6 -6
- package/dist/engine/render/renderers/layout/GridRenderer.js +3 -3
- 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 +25 -30
- 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 +293 -229
- 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 +118 -7
- package/dist/engine/schema/siteDocument.d.ts.map +1 -1
- package/dist/engine/schema/siteDocument.js +1 -1
- package/dist/engine/schema/siteDocument.js.map +1 -1
- package/dist/engine/schema/themeTokens.d.ts +1 -1
- package/dist/engine/schema/themeTokens.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/presets.js +4 -12
- package/dist/engine/shared/imageGrid/presets.js.map +1 -1
- 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/layoutConstants.d.ts +13 -0
- package/dist/engine/shared/layoutConstants.d.ts.map +1 -0
- package/dist/engine/shared/layoutConstants.js +14 -0
- package/dist/engine/shared/layoutConstants.js.map +1 -0
- package/dist/engine/shared/shadowConstants.d.ts +5 -0
- package/dist/engine/shared/shadowConstants.d.ts.map +1 -0
- package/dist/engine/shared/shadowConstants.js +11 -0
- package/dist/engine/shared/shadowConstants.js.map +1 -0
- 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/engine/shared/socialIcons.d.ts +6 -0
- package/dist/engine/shared/socialIcons.d.ts.map +1 -0
- package/dist/engine/shared/socialIcons.js +13 -0
- package/dist/engine/shared/socialIcons.js.map +1 -0
- package/dist/engine/shared/typeGuards.d.ts +11 -0
- package/dist/engine/shared/typeGuards.d.ts.map +1 -0
- package/dist/hooks/useEditorState.d.ts +8 -5
- package/dist/hooks/useEditorState.d.ts.map +1 -1
- package/dist/hooks/useEditorState.js +150 -194
- package/dist/hooks/useEditorState.js.map +1 -1
- package/dist/hooks/useNavbarAutoSync.d.ts +2 -2
- package/dist/hooks/useNavbarAutoSync.d.ts.map +1 -1
- package/dist/hooks/useNavbarAutoSync.js.map +1 -1
- package/dist/index.d.ts +60 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +109 -124
- package/dist/index.js.map +1 -1
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/schema.d.ts +4 -4
- package/dist/shared/schema.d.ts.map +1 -1
- package/dist/shared/schema.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/escola-edvi.d.ts +2 -2
- package/dist/shared/templates/escola-edvi.d.ts.map +1 -1
- package/dist/shared/templates/escola-edvi.js.map +1 -1
- package/dist/shared/templates/escola-premium.d.ts +2 -2
- package/dist/shared/templates/escola-premium.d.ts.map +1 -1
- package/dist/shared/templates/escola-premium.js.map +1 -1
- package/dist/shared/templates/escola-zilom.d.ts +2 -2
- package/dist/shared/templates/escola-zilom.d.ts.map +1 -1
- package/dist/shared/templates/escola-zilom.js.map +1 -1
- package/dist/shared/templates/index.d.ts +7 -5
- 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/shared/validators.d.ts +3 -3
- package/dist/shared/validators.d.ts.map +1 -1
- package/dist/shared/validators.js.map +1 -1
- package/dist/site/BlockRenderer.d.ts +1 -1
- package/dist/site/BlockRenderer.d.ts.map +1 -1
- package/dist/site/BlockRenderer.js +22 -26
- package/dist/site/BlockRenderer.js.map +1 -1
- package/dist/site/blocks/Button.js +15 -17
- package/dist/site/blocks/Button.js.map +1 -1
- package/dist/site/blocks/Card.js +13 -15
- package/dist/site/blocks/Card.js.map +1 -1
- package/dist/site/blocks/Features.js +15 -17
- package/dist/site/blocks/Features.js.map +1 -1
- package/dist/site/blocks/Footer.js +10 -12
- package/dist/site/blocks/Footer.js.map +1 -1
- package/dist/site/blocks/Hero.js +12 -14
- package/dist/site/blocks/Hero.js.map +1 -1
- package/dist/site/blocks/Navbar.js +13 -15
- package/dist/site/blocks/Navbar.js.map +1 -1
- package/dist/site/blocks/Section.js +9 -11
- package/dist/site/blocks/Section.js.map +1 -1
- package/dist/site/blocks/SectionHeader.js +9 -11
- package/dist/site/blocks/SectionHeader.js.map +1 -1
- package/dist/site/blocks/SiteRoot.js +9 -12
- package/dist/site/blocks/SiteRoot.js.map +1 -1
- package/dist/site/index.js +73 -73
- package/dist/styles/site/sections.css.d.ts +1 -1
- package/dist/utils/blockUtils.d.ts +2 -2
- package/dist/utils/blockUtils.d.ts.map +1 -1
- package/dist/utils/blockUtils.js.map +1 -1
- package/dist/utils/changeDetector.d.ts +3 -2
- 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/cn.js +2 -2
- package/dist/utils/dataURLUtils.d.ts +24 -0
- package/dist/utils/dataURLUtils.d.ts.map +1 -0
- package/dist/utils/dataURLUtils.js +47 -0
- package/dist/utils/dataURLUtils.js.map +1 -0
- package/dist/utils/documentHash.d.ts +2 -2
- package/dist/utils/documentHash.d.ts.map +1 -1
- package/dist/utils/documentHash.js +8 -7
- package/dist/utils/documentHash.js.map +1 -1
- package/dist/utils/logger.d.ts +13 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +13 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/navbarSync.d.ts +3 -3
- package/dist/utils/navbarSync.d.ts.map +1 -1
- package/dist/utils/navbarSync.js +25 -24
- package/dist/utils/navbarSync.js.map +1 -1
- package/dist/utils/sharedTemplateToEngine.d.ts +7 -8
- 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 +32 -0
- package/dist/viewer/LandingPageViewer.d.ts.map +1 -0
- package/dist/viewer/LandingPageViewer.js +300 -0
- package/dist/viewer/LandingPageViewer.js.map +1 -0
- package/package.json +10 -5
- package/dist/components/ComponentPalette/definitions.d.ts +0 -3
- package/dist/components/ComponentPalette/definitions.d.ts.map +0 -1
- package/dist/components/ComponentPalette/definitions.js +0 -206
- package/dist/components/ComponentPalette/definitions.js.map +0 -1
- package/dist/components/ComponentPalette/index.d.ts +0 -7
- package/dist/components/ComponentPalette/index.d.ts.map +0 -1
- package/dist/components/ComponentPalette/index.js +0 -86
- package/dist/components/ComponentPalette/index.js.map +0 -1
- package/dist/components/LoadingSpinner.d.ts.map +0 -1
- package/dist/components/LoadingSpinner.js.map +0 -1
- package/dist/components/PreviewPanel/index.d.ts +0 -12
- package/dist/components/PreviewPanel/index.d.ts.map +0 -1
- package/dist/components/PreviewPanel/index.js +0 -140
- package/dist/components/PreviewPanel/index.js.map +0 -1
- package/dist/components/PropertyPanel/index.d.ts +0 -8
- package/dist/components/PropertyPanel/index.d.ts.map +0 -1
- package/dist/components/PropertyPanel/index.js +0 -223
- package/dist/components/PropertyPanel/index.js.map +0 -1
- package/dist/components/SiteEditor/index.d.ts +0 -3
- package/dist/components/SiteEditor/index.d.ts.map +0 -1
- package/dist/components/SiteEditor/index.js +0 -251
- package/dist/components/SiteEditor/index.js.map +0 -1
- package/dist/components/SiteViewer/index.d.ts +0 -3
- package/dist/components/SiteViewer/index.d.ts.map +0 -1
- package/dist/components/SiteViewer/index.js +0 -55
- package/dist/components/SiteViewer/index.js.map +0 -1
- package/dist/components/TemplateSelector/index.d.ts +0 -7
- package/dist/components/TemplateSelector/index.d.ts.map +0 -1
- package/dist/components/TemplateSelector/index.js +0 -109
- package/dist/components/TemplateSelector/index.js.map +0 -1
- package/dist/components/Toolbar/index.d.ts +0 -15
- package/dist/components/Toolbar/index.d.ts.map +0 -1
- package/dist/components/Toolbar/index.js +0 -113
- package/dist/components/Toolbar/index.js.map +0 -1
- package/dist/components/editors/PaletteSelector.d.ts +0 -14
- package/dist/components/editors/PaletteSelector.d.ts.map +0 -1
- package/dist/components/editors/PaletteSelector.js +0 -175
- package/dist/components/editors/PaletteSelector.js.map +0 -1
- package/dist/components/effects/SectionGlow.d.ts +0 -12
- package/dist/components/effects/SectionGlow.d.ts.map +0 -1
- package/dist/components/effects/SectionGlow.js +0 -139
- package/dist/components/effects/SectionGlow.js.map +0 -1
- package/dist/components/inputs/CheckboxInput.d.ts +0 -3
- package/dist/components/inputs/CheckboxInput.d.ts.map +0 -1
- package/dist/components/inputs/CheckboxInput.js +0 -46
- package/dist/components/inputs/CheckboxInput.js.map +0 -1
- package/dist/components/inputs/ColorInput.d.ts +0 -7
- package/dist/components/inputs/ColorInput.d.ts.map +0 -1
- package/dist/components/inputs/ColorInput.js +0 -180
- package/dist/components/inputs/ColorInput.js.map +0 -1
- package/dist/components/inputs/GradientInput.d.ts +0 -7
- package/dist/components/inputs/GradientInput.d.ts.map +0 -1
- package/dist/components/inputs/GradientInput.js +0 -78
- package/dist/components/inputs/GradientInput.js.map +0 -1
- package/dist/components/inputs/ImageInput.d.ts.map +0 -1
- package/dist/components/inputs/ImageInput.js.map +0 -1
- package/dist/components/inputs/SelectInput.d.ts +0 -7
- package/dist/components/inputs/SelectInput.d.ts.map +0 -1
- package/dist/components/inputs/SelectInput.js +0 -97
- package/dist/components/inputs/SelectInput.js.map +0 -1
- package/dist/components/inputs/SliderInput.d.ts +0 -8
- package/dist/components/inputs/SliderInput.d.ts.map +0 -1
- package/dist/components/inputs/SliderInput.js +0 -77
- package/dist/components/inputs/SliderInput.js.map +0 -1
- package/dist/components/inputs/index.d.ts +0 -11
- package/dist/components/inputs/index.d.ts.map +0 -1
- package/dist/components/inputs/types.d.ts +0 -48
- package/dist/components/inputs/types.d.ts.map +0 -1
- package/dist/components/inputs/types.js +0 -9
- package/dist/components/inputs/types.js.map +0 -1
- package/dist/components/renderers/ComponentRenderer.d.ts +0 -8
- package/dist/components/renderers/ComponentRenderer.d.ts.map +0 -1
- package/dist/components/renderers/ComponentRenderer.js +0 -13
- package/dist/components/renderers/ComponentRenderer.js.map +0 -1
- package/dist/components/renderers/HeroRenderer.d.ts +0 -3
- package/dist/components/renderers/HeroRenderer.d.ts.map +0 -1
- package/dist/components/renderers/HeroRenderer.js +0 -10
- package/dist/components/renderers/HeroRenderer.js.map +0 -1
- package/dist/components/renderers/hero/HeroBanner.d.ts +0 -3
- package/dist/components/renderers/hero/HeroBanner.d.ts.map +0 -1
- package/dist/components/renderers/hero/HeroBanner.js +0 -122
- package/dist/components/renderers/hero/HeroBanner.js.map +0 -1
- package/dist/components/renderers/hero/HeroCinematic.d.ts +0 -3
- package/dist/components/renderers/hero/HeroCinematic.d.ts.map +0 -1
- package/dist/components/renderers/hero/HeroCinematic.js +0 -141
- package/dist/components/renderers/hero/HeroCinematic.js.map +0 -1
- package/dist/components/renderers/hero/HeroClassic.d.ts +0 -3
- package/dist/components/renderers/hero/HeroClassic.d.ts.map +0 -1
- package/dist/components/renderers/hero/HeroClassic.js +0 -241
- package/dist/components/renderers/hero/HeroClassic.js.map +0 -1
- package/dist/components/renderers/hero/HeroCollage.d.ts +0 -3
- package/dist/components/renderers/hero/HeroCollage.d.ts.map +0 -1
- package/dist/components/renderers/hero/HeroCollage.js +0 -131
- package/dist/components/renderers/hero/HeroCollage.js.map +0 -1
- package/dist/components/renderers/hero/HeroColumns.d.ts +0 -3
- package/dist/components/renderers/hero/HeroColumns.d.ts.map +0 -1
- package/dist/components/renderers/hero/HeroColumns.js +0 -114
- package/dist/components/renderers/hero/HeroColumns.js.map +0 -1
- package/dist/components/renderers/hero/HeroGlass.d.ts +0 -3
- package/dist/components/renderers/hero/HeroGlass.d.ts.map +0 -1
- package/dist/components/renderers/hero/HeroGlass.js +0 -119
- package/dist/components/renderers/hero/HeroGlass.js.map +0 -1
- package/dist/components/renderers/hero/HeroNeon.d.ts +0 -3
- package/dist/components/renderers/hero/HeroNeon.d.ts.map +0 -1
- package/dist/components/renderers/hero/HeroNeon.js +0 -136
- package/dist/components/renderers/hero/HeroNeon.js.map +0 -1
- package/dist/components/renderers/hero/HeroParallax.d.ts +0 -3
- package/dist/components/renderers/hero/HeroParallax.d.ts.map +0 -1
- package/dist/components/renderers/hero/HeroParallax.js +0 -99
- package/dist/components/renderers/hero/HeroParallax.js.map +0 -1
- package/dist/components/renderers/hero/HeroSplit.d.ts +0 -3
- package/dist/components/renderers/hero/HeroSplit.d.ts.map +0 -1
- package/dist/components/renderers/hero/HeroSplit.js +0 -142
- package/dist/components/renderers/hero/HeroSplit.js.map +0 -1
- package/dist/components/renderers/hero/HeroSpotlight.d.ts +0 -3
- package/dist/components/renderers/hero/HeroSpotlight.d.ts.map +0 -1
- package/dist/components/renderers/hero/HeroSpotlight.js +0 -213
- package/dist/components/renderers/hero/HeroSpotlight.js.map +0 -1
- package/dist/components/renderers/hero/index.d.ts +0 -14
- package/dist/components/renderers/hero/index.d.ts.map +0 -1
- package/dist/components/renderers/index.d.ts +0 -8
- package/dist/components/renderers/index.d.ts.map +0 -1
- package/dist/components/renderers/index.js +0 -89
- package/dist/components/renderers/index.js.map +0 -1
- package/dist/components/renderers/types.d.ts +0 -11
- package/dist/components/renderers/types.d.ts.map +0 -1
- package/dist/editor/LandingPageEditorV2.d.ts +0 -19
- package/dist/editor/LandingPageEditorV2.d.ts.map +0 -1
- package/dist/editor/LandingPageEditorV2.js +0 -311
- package/dist/editor/LandingPageEditorV2.js.map +0 -1
- package/dist/editor/PropertyEditor/PropertyGroup.js +0 -23
- package/dist/editor/PropertyEditor/PropertyGroup.js.map +0 -1
- package/dist/engine/preview/PreviewV2.d.ts +0 -15
- package/dist/engine/preview/PreviewV2.d.ts.map +0 -1
- package/dist/engine/preview/PreviewV2.js +0 -242
- package/dist/engine/preview/PreviewV2.js.map +0 -1
- package/dist/modules/registry.d.ts +0 -31
- package/dist/modules/registry.d.ts.map +0 -1
- package/dist/modules/registry.js +0 -67
- package/dist/modules/registry.js.map +0 -1
- package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +0 -57
- package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js.map +0 -1
- package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +0 -2345
- package/dist/node_modules/@dnd-kit/core/dist/core.esm.js.map +0 -1
- package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +0 -440
- package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js.map +0 -1
- package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +0 -236
- package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js.map +0 -1
- package/dist/node_modules/clsx/dist/clsx.js +0 -17
- package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +0 -35
- package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +0 -18
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +0 -15
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-right.js +0 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-right.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/briefcase.js +0 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/briefcase.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +0 -8
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +0 -8
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.js +0 -15
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/file-text.js +0 -12
- package/dist/node_modules/lucide-react/dist/esm/icons/file-text.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/globe.js +0 -10
- package/dist/node_modules/lucide-react/dist/esm/icons/globe.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/grid-3x3.js +0 -12
- package/dist/node_modules/lucide-react/dist/esm/icons/grid-3x3.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-vertical.js +0 -13
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-vertical.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/heading.js +0 -10
- package/dist/node_modules/lucide-react/dist/esm/icons/heading.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/image.js +0 -10
- package/dist/node_modules/lucide-react/dist/esm/icons/image.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/images.js +0 -11
- package/dist/node_modules/lucide-react/dist/esm/icons/images.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/list.js +0 -13
- package/dist/node_modules/lucide-react/dist/esm/icons/list.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.js +0 -8
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/minus.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/minus.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/mouse-pointer-click.js +0 -18
- package/dist/node_modules/lucide-react/dist/esm/icons/mouse-pointer-click.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/navigation.js +0 -8
- package/dist/node_modules/lucide-react/dist/esm/icons/navigation.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.js +0 -10
- package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/phone.js +0 -14
- package/dist/node_modules/lucide-react/dist/esm/icons/phone.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/plus.js +0 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/plus.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/redo-2.js +0 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/redo-2.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/redo.js +0 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/redo.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js +0 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/save.js +0 -16
- package/dist/node_modules/lucide-react/dist/esm/icons/save.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square.js +0 -8
- package/dist/node_modules/lucide-react/dist/esm/icons/square.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/star.js +0 -14
- package/dist/node_modules/lucide-react/dist/esm/icons/star.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/trash-2.js +0 -12
- package/dist/node_modules/lucide-react/dist/esm/icons/trash-2.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/type.js +0 -10
- package/dist/node_modules/lucide-react/dist/esm/icons/type.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/undo-2.js +0 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/undo-2.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/undo.js +0 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/undo.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/user.js +0 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/user.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +0 -6
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +0 -1
- package/dist/node_modules/react-colorful/dist/index.js +0 -167
- package/dist/node_modules/react-colorful/dist/index.js.map +0 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -2266
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
- package/dist/types/index.d.ts +0 -99
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/module.d.ts +0 -25
- package/dist/types/module.d.ts.map +0 -1
- package/dist/utils/htmlExporter.d.ts +0 -6
- package/dist/utils/htmlExporter.d.ts.map +0 -1
- package/dist/utils/htmlExporter.js +0 -92
- package/dist/utils/htmlExporter.js.map +0 -1
- package/dist/utils/themeApplier.d.ts +0 -11
- package/dist/utils/themeApplier.d.ts.map +0 -1
- package/dist/utils/themeApplier.js +0 -29
- package/dist/utils/themeApplier.js.map +0 -1
- package/dist/utils/useDebounce.d.ts +0 -12
- package/dist/utils/useDebounce.d.ts.map +0 -1
- package/dist/viewer/LandingPageViewerV2.d.ts +0 -25
- package/dist/viewer/LandingPageViewerV2.d.ts.map +0 -1
- package/dist/viewer/LandingPageViewerV2.js +0 -253
- package/dist/viewer/LandingPageViewerV2.js.map +0 -1
- /package/dist/{components → editor/PropertyEditor}/inputs/ImageInput.d.ts +0 -0
- /package/dist/{components → editor/components}/LoadingSpinner.d.ts +0 -0
- /package/dist/{components → editor/components}/LoadingSpinner.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sources":["../../src/shared/validators.ts"],"sourcesContent":["/**\r\n * Validadores para SiteDocumentV2\r\n * Usados para garantir que documentos gerados por IA são válidos\r\n */\r\n\r\nimport type {\r\n SiteDocumentV2,\r\n Block,\r\n BlockType,\r\n SimpleThemeTokens,\r\n} from \"./schema\";\r\nimport { defaultThemeTokens, AVAILABLE_BLOCK_TYPES } from \"./schema\";\r\n\r\nexport interface ValidationError {\r\n path: string;\r\n message: string;\r\n severity: \"error\" | \"warning\";\r\n}\r\n\r\nexport interface ValidationResult {\r\n valid: boolean;\r\n errors: ValidationError[];\r\n warnings: ValidationError[];\r\n}\r\n\r\n/**\r\n * Valida um documento SiteDocumentV2 completo\r\n */\r\nexport function validateDocument(doc: unknown): ValidationResult {\r\n const errors: ValidationError[] = [];\r\n const warnings: ValidationError[] = [];\r\n\r\n // Verificar se é objeto\r\n if (!doc || typeof doc !== \"object\") {\r\n errors.push({\r\n path: \"\",\r\n message: \"Documento deve ser um objeto\",\r\n severity: \"error\",\r\n });\r\n return { valid: false, errors, warnings };\r\n }\r\n\r\n const document = doc as Record<string, unknown>;\r\n\r\n // Validar meta\r\n if (!document.meta || typeof document.meta !== \"object\") {\r\n errors.push({\r\n path: \"meta\",\r\n message: 'Campo \"meta\" é obrigatório',\r\n severity: \"error\",\r\n });\r\n } else {\r\n const meta = document.meta as Record<string, unknown>;\r\n if (!meta.title || typeof meta.title !== \"string\") {\r\n errors.push({\r\n path: \"meta.title\",\r\n message: 'Campo \"meta.title\" é obrigatório e deve ser string',\r\n severity: \"error\",\r\n });\r\n }\r\n }\r\n\r\n // Validar theme\r\n if (!document.theme || typeof document.theme !== \"object\") {\r\n warnings.push({\r\n path: \"theme\",\r\n message: 'Campo \"theme\" não encontrado, será usado tema padrão',\r\n severity: \"warning\",\r\n });\r\n } else {\r\n validateTheme(document.theme as Record<string, unknown>, errors, warnings);\r\n }\r\n\r\n // Validar structure\r\n if (!document.structure || !Array.isArray(document.structure)) {\r\n errors.push({\r\n path: \"structure\",\r\n message: 'Campo \"structure\" é obrigatório e deve ser array',\r\n severity: \"error\",\r\n });\r\n } else {\r\n validateBlocks(document.structure, \"structure\", errors, warnings);\r\n }\r\n\r\n return {\r\n valid: errors.length === 0,\r\n errors,\r\n warnings,\r\n };\r\n}\r\n\r\n/**\r\n * Valida tema\r\n */\r\nfunction validateTheme(\r\n theme: Record<string, unknown>,\r\n _errors: ValidationError[],\r\n warnings: ValidationError[],\r\n): void {\r\n // Validar colors\r\n if (theme.colors && typeof theme.colors === \"object\") {\r\n const colors = theme.colors as Record<string, unknown>;\r\n const requiredColors = [\"primary\", \"background\", \"text\"];\r\n for (const color of requiredColors) {\r\n if (!colors[color]) {\r\n warnings.push({\r\n path: `theme.colors.${color}`,\r\n message: `Cor \"${color}\" não definida, será usado valor padrão`,\r\n severity: \"warning\",\r\n });\r\n }\r\n }\r\n }\r\n\r\n // Validar typography\r\n if (theme.typography && typeof theme.typography === \"object\") {\r\n const typo = theme.typography as Record<string, unknown>;\r\n if (!typo.fontFamily) {\r\n warnings.push({\r\n path: \"theme.typography.fontFamily\",\r\n message: \"fontFamily não definido, será usado padrão\",\r\n severity: \"warning\",\r\n });\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Valida array de blocos recursivamente\r\n */\r\nfunction validateBlocks(\r\n blocks: unknown[],\r\n path: string,\r\n errors: ValidationError[],\r\n warnings: ValidationError[],\r\n): void {\r\n const seenIds = new Set<string>();\r\n\r\n blocks.forEach((block, index) => {\r\n const blockPath = `${path}[${index}]`;\r\n\r\n if (!block || typeof block !== \"object\") {\r\n errors.push({\r\n path: blockPath,\r\n message: \"Bloco deve ser um objeto\",\r\n severity: \"error\",\r\n });\r\n return;\r\n }\r\n\r\n const b = block as Record<string, unknown>;\r\n\r\n // Validar id\r\n if (!b.id || typeof b.id !== \"string\") {\r\n errors.push({\r\n path: `${blockPath}.id`,\r\n message: 'Bloco deve ter \"id\" string',\r\n severity: \"error\",\r\n });\r\n } else {\r\n if (seenIds.has(b.id)) {\r\n errors.push({\r\n path: `${blockPath}.id`,\r\n message: `ID duplicado: \"${b.id}\"`,\r\n severity: \"error\",\r\n });\r\n }\r\n seenIds.add(b.id);\r\n }\r\n\r\n // Validar type\r\n if (!b.type || typeof b.type !== \"string\") {\r\n errors.push({\r\n path: `${blockPath}.type`,\r\n message: 'Bloco deve ter \"type\" string',\r\n severity: \"error\",\r\n });\r\n } else if (\r\n !AVAILABLE_BLOCK_TYPES.includes(\r\n b.type as (typeof AVAILABLE_BLOCK_TYPES)[number],\r\n )\r\n ) {\r\n errors.push({\r\n path: `${blockPath}.type`,\r\n message: `Tipo de bloco inválido: \"${b.type}\"`,\r\n severity: \"error\",\r\n });\r\n }\r\n\r\n // Validar props\r\n if (b.props && typeof b.props === \"object\") {\r\n const props = b.props as Record<string, unknown>;\r\n\r\n // Validar children recursivamente\r\n if (props.children && Array.isArray(props.children)) {\r\n validateBlocks(\r\n props.children,\r\n `${blockPath}.props.children`,\r\n errors,\r\n warnings,\r\n );\r\n }\r\n\r\n // Validações específicas por tipo\r\n validateBlockProps(b.type as string, props, blockPath, errors, warnings);\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Valida props específicos por tipo de bloco\r\n */\r\nfunction validateBlockProps(\r\n type: string,\r\n props: Record<string, unknown>,\r\n path: string,\r\n errors: ValidationError[],\r\n warnings: ValidationError[],\r\n): void {\r\n switch (type) {\r\n case \"heading\":\r\n if (!props.text || typeof props.text !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.text`,\r\n message: 'Heading deve ter \"text\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (\r\n !props.level ||\r\n typeof props.level !== \"number\" ||\r\n props.level < 1 ||\r\n props.level > 6\r\n ) {\r\n warnings.push({\r\n path: `${path}.props.level`,\r\n message: 'Heading deve ter \"level\" entre 1-6',\r\n severity: \"warning\",\r\n });\r\n }\r\n break;\r\n\r\n case \"text\":\r\n if (!props.text || typeof props.text !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.text`,\r\n message: 'Text deve ter \"text\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"image\":\r\n if (!props.src || typeof props.src !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.src`,\r\n message: 'Image deve ter \"src\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"button\":\r\n if (!props.text || typeof props.text !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.text`,\r\n message: 'Button deve ter \"text\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"link\":\r\n if (!props.text || typeof props.text !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.text`,\r\n message: 'Link deve ter \"text\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (!props.href || typeof props.href !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.href`,\r\n message: 'Link deve ter \"href\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"hero\":\r\n if (!props.title || typeof props.title !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.title`,\r\n message: 'Hero deve ter \"title\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"feature\":\r\n if (!props.title || typeof props.title !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.title`,\r\n message: 'Feature deve ter \"title\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (!props.description || typeof props.description !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.description`,\r\n message: 'Feature deve ter \"description\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"featureGrid\":\r\n if (!props.features || !Array.isArray(props.features)) {\r\n errors.push({\r\n path: `${path}.props.features`,\r\n message: 'FeatureGrid deve ter array \"features\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"pricing\":\r\n if (!props.plans || !Array.isArray(props.plans)) {\r\n errors.push({\r\n path: `${path}.props.plans`,\r\n message: 'Pricing deve ter array \"plans\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"testimonial\":\r\n if (!props.quote || typeof props.quote !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.quote`,\r\n message: 'Testimonial deve ter \"quote\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (!props.author || typeof props.author !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.author`,\r\n message: 'Testimonial deve ter \"author\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"testimonialGrid\":\r\n if (!props.testimonials || !Array.isArray(props.testimonials)) {\r\n errors.push({\r\n path: `${path}.props.testimonials`,\r\n message: 'TestimonialGrid deve ter array \"testimonials\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"faq\":\r\n if (!props.items || !Array.isArray(props.items)) {\r\n errors.push({\r\n path: `${path}.props.items`,\r\n message: 'FAQ deve ter array \"items\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"faqItem\":\r\n if (!props.question || typeof props.question !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.question`,\r\n message: 'FAQItem deve ter \"question\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (!props.answer || typeof props.answer !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.answer`,\r\n message: 'FAQItem deve ter \"answer\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"cta\":\r\n if (!props.title || typeof props.title !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.title`,\r\n message: 'CTA deve ter \"title\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (!props.buttonText || typeof props.buttonText !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.buttonText`,\r\n message: 'CTA deve ter \"buttonText\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"stats\":\r\n if (!props.items || !Array.isArray(props.items)) {\r\n errors.push({\r\n path: `${path}.props.items`,\r\n message: 'Stats deve ter array \"items\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"navbar\":\r\n if (!props.links || !Array.isArray(props.links)) {\r\n warnings.push({\r\n path: `${path}.props.links`,\r\n message: \"Navbar sem links de navegação\",\r\n severity: \"warning\",\r\n });\r\n }\r\n break;\r\n\r\n case \"courseCardGrid\":\r\n if (!props.cards || !Array.isArray(props.cards)) {\r\n errors.push({\r\n path: `${path}.props.cards`,\r\n message: 'CourseCardGrid deve ter array \"cards\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"categoryCardGrid\":\r\n if (!props.categories || !Array.isArray(props.categories)) {\r\n errors.push({\r\n path: `${path}.props.categories`,\r\n message: 'CategoryCardGrid deve ter array \"categories\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"input\":\r\n case \"textarea\":\r\n if (!props.name || typeof props.name !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.name`,\r\n message: `${type} deve ter \"name\"`,\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"formSelect\":\r\n if (!props.name || typeof props.name !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.name`,\r\n message: 'FormSelect deve ter \"name\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (!props.options || !Array.isArray(props.options)) {\r\n errors.push({\r\n path: `${path}.props.options`,\r\n message: 'FormSelect deve ter array \"options\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n }\r\n}\r\n\r\n/**\r\n * Tenta corrigir erros comuns em documentos gerados por IA\r\n */\r\nexport function sanitizeDocument(doc: unknown): SiteDocumentV2 | null {\r\n if (!doc || typeof doc !== \"object\") {\r\n return null;\r\n }\r\n\r\n const document = doc as Record<string, unknown>;\r\n\r\n // Garantir estrutura básica com tema padrão\r\n const sanitized: SiteDocumentV2 = {\r\n meta: {\r\n title: \"Untitled Site\",\r\n },\r\n theme: { ...defaultThemeTokens },\r\n structure: [],\r\n };\r\n\r\n // Merge meta\r\n if (document.meta && typeof document.meta === \"object\") {\r\n const meta = document.meta as Record<string, unknown>;\r\n if (meta.title && typeof meta.title === \"string\") {\r\n sanitized.meta.title = meta.title;\r\n }\r\n if (meta.description && typeof meta.description === \"string\") {\r\n sanitized.meta.description = meta.description;\r\n }\r\n if (meta.favicon && typeof meta.favicon === \"string\") {\r\n sanitized.meta.favicon = meta.favicon;\r\n }\r\n if (meta.language && typeof meta.language === \"string\") {\r\n sanitized.meta.language = meta.language;\r\n }\r\n }\r\n\r\n // Merge theme\r\n if (document.theme && typeof document.theme === \"object\") {\r\n const theme = document.theme as Record<string, unknown>;\r\n\r\n if (theme.colors && typeof theme.colors === \"object\") {\r\n sanitized.theme.colors = {\r\n ...sanitized.theme.colors,\r\n ...(theme.colors as SimpleThemeTokens[\"colors\"]),\r\n };\r\n }\r\n\r\n if (theme.typography && typeof theme.typography === \"object\") {\r\n sanitized.theme.typography = {\r\n ...sanitized.theme.typography,\r\n ...(theme.typography as SimpleThemeTokens[\"typography\"]),\r\n };\r\n }\r\n\r\n if (theme.spacing && typeof theme.spacing === \"object\") {\r\n sanitized.theme.spacing = {\r\n ...sanitized.theme.spacing,\r\n ...(theme.spacing as SimpleThemeTokens[\"spacing\"]),\r\n };\r\n }\r\n\r\n if (theme.effects && typeof theme.effects === \"object\") {\r\n sanitized.theme.effects = {\r\n ...sanitized.theme.effects,\r\n ...(theme.effects as SimpleThemeTokens[\"effects\"]),\r\n };\r\n }\r\n }\r\n\r\n // Sanitize structure\r\n if (document.structure && Array.isArray(document.structure)) {\r\n sanitized.structure = sanitizeBlocks(document.structure);\r\n }\r\n\r\n return sanitized;\r\n}\r\n\r\n/**\r\n * Sanitiza array de blocos\r\n */\r\nfunction sanitizeBlocks(blocks: unknown[]): Block[] {\r\n const sanitized: Block[] = [];\r\n const usedIds = new Set<string>();\r\n let idCounter = 1;\r\n\r\n for (const block of blocks) {\r\n if (!block || typeof block !== \"object\") continue;\r\n\r\n const b = block as Record<string, unknown>;\r\n\r\n // Garantir type válido\r\n const type =\r\n typeof b.type === \"string\" &&\r\n AVAILABLE_BLOCK_TYPES.includes(\r\n b.type as (typeof AVAILABLE_BLOCK_TYPES)[number],\r\n )\r\n ? (b.type as BlockType)\r\n : \"box\";\r\n\r\n // Garantir id único\r\n let id = typeof b.id === \"string\" ? b.id : `${type}-${idCounter++}`;\r\n while (usedIds.has(id)) {\r\n id = `${type}-${idCounter++}`;\r\n }\r\n usedIds.add(id);\r\n\r\n // Sanitizar props\r\n const props =\r\n b.props && typeof b.props === \"object\"\r\n ? sanitizeProps(b.props as Record<string, unknown>)\r\n : {};\r\n\r\n sanitized.push({\r\n id,\r\n type,\r\n props,\r\n } as Block);\r\n }\r\n\r\n return sanitized;\r\n}\r\n\r\n/**\r\n * Sanitiza props de um bloco\r\n */\r\nfunction sanitizeProps(\r\n props: Record<string, unknown>,\r\n): Record<string, unknown> {\r\n const sanitized: Record<string, unknown> = {};\r\n\r\n for (const [key, value] of Object.entries(props)) {\r\n if (key === \"children\" && Array.isArray(value)) {\r\n sanitized.children = sanitizeBlocks(value);\r\n } else if (value !== null && value !== undefined) {\r\n sanitized[key] = value;\r\n }\r\n }\r\n\r\n return sanitized;\r\n}\r\n\r\n/**\r\n * Gera IDs únicos para blocos que não têm\r\n */\r\nexport function ensureBlockIds(blocks: Block[]): Block[] {\r\n const usedIds = new Set<string>();\r\n let counter = 1;\r\n\r\n function processBlock(block: Block): Block {\r\n // Gerar ID se não existir ou se for duplicado\r\n let id = block.id;\r\n if (!id || usedIds.has(id)) {\r\n id = `${block.type}-${counter++}`;\r\n while (usedIds.has(id)) {\r\n id = `${block.type}-${counter++}`;\r\n }\r\n }\r\n usedIds.add(id);\r\n\r\n // Processar children\r\n const props = { ...block.props } as Record<string, unknown>;\r\n if (props.children && Array.isArray(props.children)) {\r\n props.children = (props.children as Block[]).map(processBlock);\r\n }\r\n\r\n return { ...block, id, props };\r\n }\r\n\r\n return blocks.map(processBlock);\r\n}\r\n"],"names":["validateDocument","doc","errors","warnings","document","meta","validateTheme","validateBlocks","theme","_errors","colors","requiredColors","color","blocks","path","seenIds","block","index","blockPath","b","AVAILABLE_BLOCK_TYPES","props","validateBlockProps","type","sanitizeDocument","sanitized","defaultThemeTokens","sanitizeBlocks","usedIds","idCounter","id","sanitizeProps","key","value","ensureBlockIds","counter","processBlock"],"mappings":";AA4BO,SAASA,EAAiBC,GAAgC;AAC/D,QAAMC,IAA4B,CAAA,GAC5BC,IAA8B,CAAA;AAGpC,MAAI,CAACF,KAAO,OAAOA,KAAQ;AACzB,WAAAC,EAAO,KAAK;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU;AAAA,IAAA,CACX,GACM,EAAE,OAAO,IAAO,QAAAA,GAAQ,UAAAC,EAAA;AAGjC,QAAMC,IAAWH;AAGjB,MAAI,CAACG,EAAS,QAAQ,OAAOA,EAAS,QAAS;AAC7C,IAAAF,EAAO,KAAK;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU;AAAA,IAAA,CACX;AAAA,OACI;AACL,UAAMG,IAAOD,EAAS;AACtB,KAAI,CAACC,EAAK,SAAS,OAAOA,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,WAAIK,EAAM,YAAY,MAAM,QAAQA,EAAM,QAAQ,MAChDA,EAAM,WAAYA,EAAM,SAAqB,IAAIe,CAAY,IAGxD,EAAE,GAAGpB,GAAO,IAAAc,GAAI,OAAAT,EAAA;AAAA,EACzB;AAEA,SAAOR,EAAO,IAAIuB,CAAY;AAChC;"}
|
|
1
|
+
{"version":3,"file":"validators.js","sources":["../../src/shared/validators.ts"],"sourcesContent":["/**\r\n * Validadores para SiteDocument\r\n * Usados para garantir que documentos gerados por IA são válidos\r\n */\r\n\r\nimport type {\r\n SiteDocument,\r\n Block,\r\n BlockType,\r\n SimpleThemeTokens,\r\n} from \"./schema\";\r\nimport { defaultThemeTokens, AVAILABLE_BLOCK_TYPES } from \"./schema\";\r\n\r\nexport interface ValidationError {\r\n path: string;\r\n message: string;\r\n severity: \"error\" | \"warning\";\r\n}\r\n\r\nexport interface ValidationResult {\r\n valid: boolean;\r\n errors: ValidationError[];\r\n warnings: ValidationError[];\r\n}\r\n\r\n/**\r\n * Valida um documento SiteDocument completo\r\n */\r\nexport function validateDocument(doc: unknown): ValidationResult {\r\n const errors: ValidationError[] = [];\r\n const warnings: ValidationError[] = [];\r\n\r\n // Verificar se é objeto\r\n if (!doc || typeof doc !== \"object\") {\r\n errors.push({\r\n path: \"\",\r\n message: \"Documento deve ser um objeto\",\r\n severity: \"error\",\r\n });\r\n return { valid: false, errors, warnings };\r\n }\r\n\r\n const document = doc as Record<string, any>;\r\n\r\n // Validar meta\r\n if (!document.meta || typeof document.meta !== \"object\") {\r\n errors.push({\r\n path: \"meta\",\r\n message: 'Campo \"meta\" é obrigatório',\r\n severity: \"error\",\r\n });\r\n } else {\r\n const meta = document.meta as Record<string, any>;\r\n if (!meta.title || typeof meta.title !== \"string\") {\r\n errors.push({\r\n path: \"meta.title\",\r\n message: 'Campo \"meta.title\" é obrigatório e deve ser string',\r\n severity: \"error\",\r\n });\r\n }\r\n }\r\n\r\n // Validar theme\r\n if (!document.theme || typeof document.theme !== \"object\") {\r\n warnings.push({\r\n path: \"theme\",\r\n message: 'Campo \"theme\" não encontrado, será usado tema padrão',\r\n severity: \"warning\",\r\n });\r\n } else {\r\n validateTheme(document.theme as Record<string, any>, errors, warnings);\r\n }\r\n\r\n // Validar structure\r\n if (!document.structure || !Array.isArray(document.structure)) {\r\n errors.push({\r\n path: \"structure\",\r\n message: 'Campo \"structure\" é obrigatório e deve ser array',\r\n severity: \"error\",\r\n });\r\n } else {\r\n validateBlocks(document.structure, \"structure\", errors, warnings);\r\n }\r\n\r\n return {\r\n valid: errors.length === 0,\r\n errors,\r\n warnings,\r\n };\r\n}\r\n\r\n/**\r\n * Valida tema\r\n */\r\nfunction validateTheme(\r\n theme: Record<string, any>,\r\n _errors: ValidationError[],\r\n warnings: ValidationError[],\r\n): void {\r\n // Validar colors\r\n if (theme.colors && typeof theme.colors === \"object\") {\r\n const colors = theme.colors as Record<string, any>;\r\n const requiredColors = [\"primary\", \"background\", \"text\"];\r\n for (const color of requiredColors) {\r\n if (!colors[color]) {\r\n warnings.push({\r\n path: `theme.colors.${color}`,\r\n message: `Cor \"${color}\" não definida, será usado valor padrão`,\r\n severity: \"warning\",\r\n });\r\n }\r\n }\r\n }\r\n\r\n // Validar typography\r\n if (theme.typography && typeof theme.typography === \"object\") {\r\n const typo = theme.typography as Record<string, any>;\r\n if (!typo.fontFamily) {\r\n warnings.push({\r\n path: \"theme.typography.fontFamily\",\r\n message: \"fontFamily não definido, será usado padrão\",\r\n severity: \"warning\",\r\n });\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Valida array de blocos recursivamente\r\n */\r\nfunction validateBlocks(\r\n blocks: unknown[],\r\n path: string,\r\n errors: ValidationError[],\r\n warnings: ValidationError[],\r\n): void {\r\n const seenIds = new Set<string>();\r\n\r\n blocks.forEach((block, index) => {\r\n const blockPath = `${path}[${index}]`;\r\n\r\n if (!block || typeof block !== \"object\") {\r\n errors.push({\r\n path: blockPath,\r\n message: \"Bloco deve ser um objeto\",\r\n severity: \"error\",\r\n });\r\n return;\r\n }\r\n\r\n const b = block as Record<string, any>;\r\n\r\n // Validar id\r\n if (!b.id || typeof b.id !== \"string\") {\r\n errors.push({\r\n path: `${blockPath}.id`,\r\n message: 'Bloco deve ter \"id\" string',\r\n severity: \"error\",\r\n });\r\n } else {\r\n if (seenIds.has(b.id)) {\r\n errors.push({\r\n path: `${blockPath}.id`,\r\n message: `ID duplicado: \"${b.id}\"`,\r\n severity: \"error\",\r\n });\r\n }\r\n seenIds.add(b.id);\r\n }\r\n\r\n // Validar type\r\n if (!b.type || typeof b.type !== \"string\") {\r\n errors.push({\r\n path: `${blockPath}.type`,\r\n message: 'Bloco deve ter \"type\" string',\r\n severity: \"error\",\r\n });\r\n } else if (\r\n !AVAILABLE_BLOCK_TYPES.includes(\r\n b.type as (typeof AVAILABLE_BLOCK_TYPES)[number],\r\n )\r\n ) {\r\n errors.push({\r\n path: `${blockPath}.type`,\r\n message: `Tipo de bloco inválido: \"${b.type}\"`,\r\n severity: \"error\",\r\n });\r\n }\r\n\r\n // Validar props\r\n if (b.props && typeof b.props === \"object\") {\r\n const props = b.props as Record<string, any>;\r\n\r\n // Validar children recursivamente\r\n if (props.children && Array.isArray(props.children)) {\r\n validateBlocks(\r\n props.children,\r\n `${blockPath}.props.children`,\r\n errors,\r\n warnings,\r\n );\r\n }\r\n\r\n // Validações específicas por tipo\r\n validateBlockProps(b.type as string, props, blockPath, errors, warnings);\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Valida props específicos por tipo de bloco\r\n */\r\nfunction validateBlockProps(\r\n type: string,\r\n props: Record<string, any>,\r\n path: string,\r\n errors: ValidationError[],\r\n warnings: ValidationError[],\r\n): void {\r\n switch (type) {\r\n case \"heading\":\r\n if (!props.text || typeof props.text !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.text`,\r\n message: 'Heading deve ter \"text\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (\r\n !props.level ||\r\n typeof props.level !== \"number\" ||\r\n props.level < 1 ||\r\n props.level > 6\r\n ) {\r\n warnings.push({\r\n path: `${path}.props.level`,\r\n message: 'Heading deve ter \"level\" entre 1-6',\r\n severity: \"warning\",\r\n });\r\n }\r\n break;\r\n\r\n case \"text\":\r\n if (!props.text || typeof props.text !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.text`,\r\n message: 'Text deve ter \"text\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"image\":\r\n if (!props.src || typeof props.src !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.src`,\r\n message: 'Image deve ter \"src\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"button\":\r\n if (!props.text || typeof props.text !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.text`,\r\n message: 'Button deve ter \"text\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"link\":\r\n if (!props.text || typeof props.text !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.text`,\r\n message: 'Link deve ter \"text\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (!props.href || typeof props.href !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.href`,\r\n message: 'Link deve ter \"href\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"hero\":\r\n if (!props.title || typeof props.title !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.title`,\r\n message: 'Hero deve ter \"title\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"feature\":\r\n if (!props.title || typeof props.title !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.title`,\r\n message: 'Feature deve ter \"title\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (!props.description || typeof props.description !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.description`,\r\n message: 'Feature deve ter \"description\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"featureGrid\":\r\n if (!props.features || !Array.isArray(props.features)) {\r\n errors.push({\r\n path: `${path}.props.features`,\r\n message: 'FeatureGrid deve ter array \"features\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"pricing\":\r\n if (!props.plans || !Array.isArray(props.plans)) {\r\n errors.push({\r\n path: `${path}.props.plans`,\r\n message: 'Pricing deve ter array \"plans\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"testimonial\":\r\n if (!props.quote || typeof props.quote !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.quote`,\r\n message: 'Testimonial deve ter \"quote\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (!props.author || typeof props.author !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.author`,\r\n message: 'Testimonial deve ter \"author\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"testimonialGrid\":\r\n if (!props.testimonials || !Array.isArray(props.testimonials)) {\r\n errors.push({\r\n path: `${path}.props.testimonials`,\r\n message: 'TestimonialGrid deve ter array \"testimonials\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"faq\":\r\n if (!props.items || !Array.isArray(props.items)) {\r\n errors.push({\r\n path: `${path}.props.items`,\r\n message: 'FAQ deve ter array \"items\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"faqItem\":\r\n if (!props.question || typeof props.question !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.question`,\r\n message: 'FAQItem deve ter \"question\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (!props.answer || typeof props.answer !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.answer`,\r\n message: 'FAQItem deve ter \"answer\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"cta\":\r\n if (!props.title || typeof props.title !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.title`,\r\n message: 'CTA deve ter \"title\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (!props.buttonText || typeof props.buttonText !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.buttonText`,\r\n message: 'CTA deve ter \"buttonText\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"stats\":\r\n if (!props.items || !Array.isArray(props.items)) {\r\n errors.push({\r\n path: `${path}.props.items`,\r\n message: 'Stats deve ter array \"items\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"navbar\":\r\n if (!props.links || !Array.isArray(props.links)) {\r\n warnings.push({\r\n path: `${path}.props.links`,\r\n message: \"Navbar sem links de navegação\",\r\n severity: \"warning\",\r\n });\r\n }\r\n break;\r\n\r\n case \"courseCardGrid\":\r\n if (!props.cards || !Array.isArray(props.cards)) {\r\n errors.push({\r\n path: `${path}.props.cards`,\r\n message: 'CourseCardGrid deve ter array \"cards\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"categoryCardGrid\":\r\n if (!props.categories || !Array.isArray(props.categories)) {\r\n errors.push({\r\n path: `${path}.props.categories`,\r\n message: 'CategoryCardGrid deve ter array \"categories\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"input\":\r\n case \"textarea\":\r\n if (!props.name || typeof props.name !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.name`,\r\n message: `${type} deve ter \"name\"`,\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n\r\n case \"formSelect\":\r\n if (!props.name || typeof props.name !== \"string\") {\r\n errors.push({\r\n path: `${path}.props.name`,\r\n message: 'FormSelect deve ter \"name\"',\r\n severity: \"error\",\r\n });\r\n }\r\n if (!props.options || !Array.isArray(props.options)) {\r\n errors.push({\r\n path: `${path}.props.options`,\r\n message: 'FormSelect deve ter array \"options\"',\r\n severity: \"error\",\r\n });\r\n }\r\n break;\r\n }\r\n}\r\n\r\n/**\r\n * Tenta corrigir erros comuns em documentos gerados por IA\r\n */\r\nexport function sanitizeDocument(doc: unknown): SiteDocument | null {\r\n if (!doc || typeof doc !== \"object\") {\r\n return null;\r\n }\r\n\r\n const document = doc as Record<string, any>;\r\n\r\n // Garantir estrutura básica com tema padrão\r\n const sanitized: SiteDocument = {\r\n meta: {\r\n title: \"Untitled Site\",\r\n },\r\n theme: { ...defaultThemeTokens },\r\n structure: [],\r\n };\r\n\r\n // Merge meta\r\n if (document.meta && typeof document.meta === \"object\") {\r\n const meta = document.meta as Record<string, any>;\r\n if (meta.title && typeof meta.title === \"string\") {\r\n sanitized.meta.title = meta.title;\r\n }\r\n if (meta.description && typeof meta.description === \"string\") {\r\n sanitized.meta.description = meta.description;\r\n }\r\n if (meta.favicon && typeof meta.favicon === \"string\") {\r\n sanitized.meta.favicon = meta.favicon;\r\n }\r\n if (meta.language && typeof meta.language === \"string\") {\r\n sanitized.meta.language = meta.language;\r\n }\r\n }\r\n\r\n // Merge theme\r\n if (document.theme && typeof document.theme === \"object\") {\r\n const theme = document.theme as Record<string, any>;\r\n\r\n if (theme.colors && typeof theme.colors === \"object\") {\r\n sanitized.theme.colors = {\r\n ...sanitized.theme.colors,\r\n ...(theme.colors as SimpleThemeTokens[\"colors\"]),\r\n };\r\n }\r\n\r\n if (theme.typography && typeof theme.typography === \"object\") {\r\n sanitized.theme.typography = {\r\n ...sanitized.theme.typography,\r\n ...(theme.typography as SimpleThemeTokens[\"typography\"]),\r\n };\r\n }\r\n\r\n if (theme.spacing && typeof theme.spacing === \"object\") {\r\n sanitized.theme.spacing = {\r\n ...sanitized.theme.spacing,\r\n ...(theme.spacing as SimpleThemeTokens[\"spacing\"]),\r\n };\r\n }\r\n\r\n if (theme.effects && typeof theme.effects === \"object\") {\r\n sanitized.theme.effects = {\r\n ...sanitized.theme.effects,\r\n ...(theme.effects as SimpleThemeTokens[\"effects\"]),\r\n };\r\n }\r\n }\r\n\r\n // Sanitize structure\r\n if (document.structure && Array.isArray(document.structure)) {\r\n sanitized.structure = sanitizeBlocks(document.structure);\r\n }\r\n\r\n return sanitized;\r\n}\r\n\r\n/**\r\n * Sanitiza array de blocos\r\n */\r\nfunction sanitizeBlocks(blocks: unknown[]): Block[] {\r\n const sanitized: Block[] = [];\r\n const usedIds = new Set<string>();\r\n let idCounter = 1;\r\n\r\n for (const block of blocks) {\r\n if (!block || typeof block !== \"object\") continue;\r\n\r\n const b = block as Record<string, any>;\r\n\r\n // Garantir type válido\r\n const type =\r\n typeof b.type === \"string\" &&\r\n AVAILABLE_BLOCK_TYPES.includes(\r\n b.type as (typeof AVAILABLE_BLOCK_TYPES)[number],\r\n )\r\n ? (b.type as BlockType)\r\n : \"box\";\r\n\r\n // Garantir id único\r\n let id = typeof b.id === \"string\" ? b.id : `${type}-${idCounter++}`;\r\n while (usedIds.has(id)) {\r\n id = `${type}-${idCounter++}`;\r\n }\r\n usedIds.add(id);\r\n\r\n // Sanitizar props\r\n const props =\r\n b.props && typeof b.props === \"object\"\r\n ? sanitizeProps(b.props as Record<string, any>)\r\n : {};\r\n\r\n sanitized.push({\r\n id,\r\n type,\r\n props,\r\n } as Block);\r\n }\r\n\r\n return sanitized;\r\n}\r\n\r\n/**\r\n * Sanitiza props de um bloco\r\n */\r\nfunction sanitizeProps(\r\n props: Record<string, any>,\r\n): Record<string, any> {\r\n const sanitized: Record<string, any> = {};\r\n\r\n for (const [key, value] of Object.entries(props)) {\r\n if (key === \"children\" && Array.isArray(value)) {\r\n sanitized.children = sanitizeBlocks(value);\r\n } else if (value !== null && value !== undefined) {\r\n sanitized[key] = value;\r\n }\r\n }\r\n\r\n return sanitized;\r\n}\r\n\r\n/**\r\n * Gera IDs únicos para blocos que não têm\r\n */\r\nexport function ensureBlockIds(blocks: Block[]): Block[] {\r\n const usedIds = new Set<string>();\r\n let counter = 1;\r\n\r\n function processBlock(block: Block): Block {\r\n // Gerar ID se não existir ou se for duplicado\r\n let id = block.id;\r\n if (!id || usedIds.has(id)) {\r\n id = `${block.type}-${counter++}`;\r\n while (usedIds.has(id)) {\r\n id = `${block.type}-${counter++}`;\r\n }\r\n }\r\n usedIds.add(id);\r\n\r\n // Processar children\r\n const props = { ...block.props } as Record<string, any>;\r\n if (props.children && Array.isArray(props.children)) {\r\n props.children = (props.children as Block[]).map(processBlock);\r\n }\r\n\r\n return { ...block, id, props };\r\n }\r\n\r\n return blocks.map(processBlock);\r\n}\r\n"],"names":["validateDocument","doc","errors","warnings","document","meta","validateTheme","validateBlocks","theme","_errors","colors","requiredColors","color","blocks","path","seenIds","block","index","blockPath","b","AVAILABLE_BLOCK_TYPES","props","validateBlockProps","type","sanitizeDocument","sanitized","defaultThemeTokens","sanitizeBlocks","usedIds","idCounter","id","sanitizeProps","key","value","ensureBlockIds","counter","processBlock"],"mappings":";AA4BO,SAASA,EAAiBC,GAAgC;AAC/D,QAAMC,IAA4B,CAAA,GAC5BC,IAA8B,CAAA;AAGpC,MAAI,CAACF,KAAO,OAAOA,KAAQ;AACzB,WAAAC,EAAO,KAAK;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU;AAAA,IAAA,CACX,GACM,EAAE,OAAO,IAAO,QAAAA,GAAQ,UAAAC,EAAA;AAGjC,QAAMC,IAAWH;AAGjB,MAAI,CAACG,EAAS,QAAQ,OAAOA,EAAS,QAAS;AAC7C,IAAAF,EAAO,KAAK;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU;AAAA,IAAA,CACX;AAAA,OACI;AACL,UAAMG,IAAOD,EAAS;AACtB,KAAI,CAACC,EAAK,SAAS,OAAOA,EAAK,SAAU,aACvCH,EAAO,KAAK;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU;AAAA,IAAA,CACX;AAAA,EAEL;AAGA,SAAI,CAACE,EAAS,SAAS,OAAOA,EAAS,SAAU,WAC/CD,EAAS,KAAK;AAAA,IACZ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,UAAU;AAAA,EAAA,CACX,IAEDG,EAAcF,EAAS,OAA8BF,GAAQC,CAAQ,GAInE,CAACC,EAAS,aAAa,CAAC,MAAM,QAAQA,EAAS,SAAS,IAC1DF,EAAO,KAAK;A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AQxB"}
|
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/* empty css */
|
|
5
|
-
import "../engine/theme/defaultTheme.js";
|
|
6
|
-
import { Section as p } from "./blocks/Section.js";
|
|
7
|
-
import { Navbar as f } from "./blocks/Navbar.js";
|
|
1
|
+
import { jsx as e, Fragment as i, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { Card as p } from "./blocks/Card.js";
|
|
3
|
+
import { Section as f } from "./blocks/Section.js";
|
|
8
4
|
import { Footer as c } from "./blocks/Footer.js";
|
|
9
|
-
import {
|
|
5
|
+
import { Navbar as a } from "./blocks/Navbar.js";
|
|
10
6
|
import { Features as d } from "./blocks/Features.js";
|
|
11
|
-
import {
|
|
7
|
+
import { Hero as s } from "./blocks/Hero.js";
|
|
12
8
|
const t = {
|
|
13
|
-
hero:
|
|
9
|
+
hero: s,
|
|
14
10
|
features: d,
|
|
15
|
-
navbar:
|
|
11
|
+
navbar: a,
|
|
16
12
|
footer: c,
|
|
17
|
-
section:
|
|
18
|
-
card:
|
|
13
|
+
section: f,
|
|
14
|
+
card: p
|
|
19
15
|
};
|
|
20
|
-
function
|
|
21
|
-
t[r] =
|
|
16
|
+
function x(r, o) {
|
|
17
|
+
t[r] = o;
|
|
22
18
|
}
|
|
23
|
-
function
|
|
19
|
+
function B(r) {
|
|
24
20
|
return t[r];
|
|
25
21
|
}
|
|
26
22
|
function l({ block: r }) {
|
|
@@ -37,29 +33,29 @@ function l({ block: r }) {
|
|
|
37
33
|
},
|
|
38
34
|
children: [
|
|
39
35
|
"Unknown block type: ",
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ e("strong", { children: r.type }),
|
|
37
|
+
/* @__PURE__ */ e("pre", { style: { marginTop: "0.5rem", fontSize: "0.75rem" }, children: JSON.stringify(r.props, null, 2) })
|
|
42
38
|
]
|
|
43
39
|
}
|
|
44
40
|
) : null;
|
|
45
41
|
}
|
|
46
42
|
function u({
|
|
47
43
|
block: r,
|
|
48
|
-
fallback:
|
|
44
|
+
fallback: o = l
|
|
49
45
|
}) {
|
|
50
46
|
const n = t[r.type];
|
|
51
|
-
return n ? /* @__PURE__ */
|
|
47
|
+
return n ? /* @__PURE__ */ e(n, { id: r.id, ...r.props }) : /* @__PURE__ */ e(o, { block: r });
|
|
52
48
|
}
|
|
53
|
-
function
|
|
49
|
+
function F({
|
|
54
50
|
blocks: r,
|
|
55
|
-
fallback:
|
|
51
|
+
fallback: o
|
|
56
52
|
}) {
|
|
57
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ e(i, { children: r.map((n) => /* @__PURE__ */ e(u, { block: n, fallback: o }, n.id)) });
|
|
58
54
|
}
|
|
59
55
|
export {
|
|
60
|
-
|
|
56
|
+
F as BlockListRenderer,
|
|
61
57
|
u as BlockRenderer,
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
B as getBlockComponent,
|
|
59
|
+
x as registerBlockComponent
|
|
64
60
|
};
|
|
65
61
|
//# sourceMappingURL=BlockRenderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockRenderer.js","sources":["../../src/site/BlockRenderer.tsx"],"sourcesContent":["/**\n * BlockRenderer - Renders site blocks dynamically\n *\n * Maps block types to their React components and renders them\n * with the appropriate props.\n */\n\nimport type { ComponentType } from 'react';\nimport { Hero, Features, Navbar, Footer, Section, Card } from './blocks';\n\n/**\n * Block data structure from the site document\n */\nexport interface BlockData {\n id: string;\n type: string;\n props: Record<string,
|
|
1
|
+
{"version":3,"file":"BlockRenderer.js","sources":["../../src/site/BlockRenderer.tsx"],"sourcesContent":["/**\n * BlockRenderer - Renders site blocks dynamically\n *\n * Maps block types to their React components and renders them\n * with the appropriate props.\n */\n\nimport type { ComponentType } from 'react';\nimport { Hero, Features, Navbar, Footer, Section, Card } from './blocks';\n\n/**\n * Block data structure from the site document\n */\nexport interface BlockData {\n id: string;\n type: string;\n props: Record<string, any>;\n}\n\n/**\n * Registry of block type to component mapping\n */\nconst blockComponents: Record<string, ComponentType<any>> = {\n hero: Hero,\n features: Features,\n navbar: Navbar,\n footer: Footer,\n section: Section,\n card: Card,\n};\n\n/**\n * Register a custom block component\n */\nexport function registerBlockComponent(\n type: string,\n component: ComponentType<any>\n): void {\n blockComponents[type] = component;\n}\n\n/**\n * Get a block component by type\n */\nexport function getBlockComponent(type: string): ComponentType<any> | undefined {\n return blockComponents[type];\n}\n\n/**\n * BlockRenderer props\n */\nexport interface BlockRendererProps {\n block: BlockData;\n fallback?: ComponentType<{ block: BlockData }>;\n}\n\n/**\n * Default fallback component for unknown block types\n */\nfunction DefaultFallback({ block }: { block: BlockData }) {\n if (process.env.NODE_ENV === 'development') {\n return (\n <div\n style={{\n padding: '1rem',\n border: '1px dashed #ccc',\n borderRadius: '0.5rem',\n backgroundColor: '#f9fafb',\n color: '#6b7280',\n fontSize: '0.875rem',\n }}\n >\n Unknown block type: <strong>{block.type}</strong>\n <pre style={{ marginTop: '0.5rem', fontSize: '0.75rem' }}>\n {JSON.stringify(block.props, null, 2)}\n </pre>\n </div>\n );\n }\n return null;\n}\n\n/**\n * BlockRenderer - Renders a single block\n *\n * @example\n * ```tsx\n * <BlockRenderer\n * block={{\n * id: 'hero-1',\n * type: 'hero',\n * props: {\n * title: 'Welcome',\n * subtitle: 'To our site',\n * },\n * }}\n * />\n * ```\n */\nexport function BlockRenderer({\n block,\n fallback: Fallback = DefaultFallback,\n}: BlockRendererProps) {\n const Component = blockComponents[block.type];\n\n if (!Component) {\n return <Fallback block={block} />;\n }\n\n return <Component id={block.id} {...block.props} />;\n}\n\n/**\n * BlockListRenderer - Renders a list of blocks\n */\nexport interface BlockListRendererProps {\n blocks: BlockData[];\n fallback?: ComponentType<{ block: BlockData }>;\n}\n\nexport function BlockListRenderer({\n blocks,\n fallback,\n}: BlockListRendererProps) {\n return (\n <>\n {blocks.map((block) => (\n <BlockRenderer key={block.id} block={block} fallback={fallback} />\n ))}\n </>\n );\n}\n"],"names":["blockComponents","Hero","Features","Navbar","Footer","Section","Card","registerBlockComponent","type","component","getBlockComponent","DefaultFallback","block","jsxs","jsx","BlockRenderer","Fallback","Component","BlockListRenderer","blocks","fallback","Fragment"],"mappings":";;;;;;;AAsBA,MAAMA,IAAsD;AAAA,EAC1D,MAAMC;AAAA,EACN,UAAUC;AAAA,EACV,QAAQC;AAAA,EACR,QAAQC;AAAA,EACR,SAASC;AAAA,EACT,MAAMC;AACR;AAKO,SAASC,EACdC,GACAC,GACM;AACN,EAAAT,EAAgBQ,CAAI,IAAIC;AAC1B;AAKO,SAASC,EAAkBF,GAA8C;AAC9E,SAAOR,EAAgBQ,CAAI;AAC7B;AAaA,SAASG,EAAgB,EAAE,OAAAC,KAA+B;AACxD,SAAI,QAAQ,IAAI,aAAa,gBAEzB,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,cAAc;AAAA,QACd,iBAAiB;AAAA,QACjB,OAAO;AAAA,QACP,UAAU;AAAA,MAAA;AAAA,MAEb,UAAA;AAAA,QAAA;AAAA,QACqB,gBAAAC,EAAC,UAAA,EAAQ,UAAAF,EAAM,KAAA,CAAK;AAAA,QACxC,gBAAAE,EAAC,OAAA,EAAI,OAAO,EAAE,WAAW,UAAU,UAAU,UAAA,GAC1C,eAAK,UAAUF,EAAM,OAAO,MAAM,CAAC,EAAA,CACtC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAIC;AACT;AAmBO,SAASG,EAAc;AAAA,EAC5B,OAAAH;AAAA,EACA,UAAUI,IAAWL;AACvB,GAAuB;AACrB,QAAMM,IAAYjB,EAAgBY,EAAM,IAAI;AAE5C,SAAKK,sBAIGA,GAAA,EAAU,IAAIL,EAAM,IAAK,GAAGA,EAAM,OAAO,IAHxC,gBAAAE,EAACE,KAAS,OAAAJ,GAAc;AAInC;AAUO,SAASM,EAAkB;AAAA,EAChC,QAAAC;AAAA,EACA,UAAAC;AACF,GAA2B;AACzB,SACE,gBAAAN,EAAAO,GAAA,EACG,UAAAF,EAAO,IAAI,CAACP,MACX,gBAAAE,EAACC,GAAA,EAA6B,OAAAH,GAAc,UAAAQ,EAAA,GAAxBR,EAAM,EAAsC,CACjE,GACH;AAEJ;"}
|
|
@@ -1,35 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { clsx as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function j({
|
|
7
|
-
className: n,
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as e } from "clsx";
|
|
3
|
+
import { button as p, buttonVariant as b, buttonSize as c } from "../../styles/site/sections.css.js";
|
|
4
|
+
function y({
|
|
5
|
+
className: m,
|
|
8
6
|
children: t,
|
|
9
7
|
variant: s = "primary",
|
|
10
8
|
size: a = "md",
|
|
11
9
|
href: o,
|
|
12
|
-
onClick:
|
|
13
|
-
disabled:
|
|
10
|
+
onClick: u,
|
|
11
|
+
disabled: i
|
|
14
12
|
}) {
|
|
15
|
-
const r =
|
|
16
|
-
|
|
13
|
+
const r = e(
|
|
14
|
+
p,
|
|
17
15
|
b[s],
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
c[a],
|
|
17
|
+
m
|
|
20
18
|
);
|
|
21
|
-
return o ? /* @__PURE__ */
|
|
19
|
+
return o ? /* @__PURE__ */ n("a", { href: o, className: r, children: t }) : /* @__PURE__ */ n(
|
|
22
20
|
"button",
|
|
23
21
|
{
|
|
24
22
|
type: "button",
|
|
25
23
|
className: r,
|
|
26
|
-
onClick:
|
|
27
|
-
disabled:
|
|
24
|
+
onClick: u,
|
|
25
|
+
disabled: i,
|
|
28
26
|
children: t
|
|
29
27
|
}
|
|
30
28
|
);
|
|
31
29
|
}
|
|
32
30
|
export {
|
|
33
|
-
|
|
31
|
+
y as Button
|
|
34
32
|
};
|
|
35
33
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/site/blocks/Button.tsx"],"sourcesContent":["/**\n * Button - Site button component\n *\n * Supports multiple variants and sizes.\n */\n\nimport { clsx } from 'clsx';\nimport { button, buttonVariant, buttonSize } from '../../styles/site';\nimport type { SiteButtonProps } from './types';\n\nexport function Button({\n className,\n children,\n variant = 'primary',\n size = 'md',\n href,\n onClick,\n disabled,\n}: SiteButtonProps) {\n const classes = clsx(\n button,\n buttonVariant[variant],\n buttonSize[size],\n className\n );\n\n if (href) {\n return (\n <a href={href} className={classes}>\n {children}\n </a>\n );\n }\n\n return (\n <button\n type=\"button\"\n className={classes}\n onClick={onClick}\n disabled={disabled}\n >\n {children}\n </button>\n );\n}\n"],"names":["Button","className","children","variant","size","href","onClick","disabled","classes","clsx","button","buttonVariant","buttonSize","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/site/blocks/Button.tsx"],"sourcesContent":["/**\n * Button - Site button component\n *\n * Supports multiple variants and sizes.\n */\n\nimport { clsx } from 'clsx';\nimport { button, buttonVariant, buttonSize } from '../../styles/site';\nimport type { SiteButtonProps } from './types';\n\nexport function Button({\n className,\n children,\n variant = 'primary',\n size = 'md',\n href,\n onClick,\n disabled,\n}: SiteButtonProps) {\n const classes = clsx(\n button,\n buttonVariant[variant],\n buttonSize[size],\n className\n );\n\n if (href) {\n return (\n <a href={href} className={classes}>\n {children}\n </a>\n );\n }\n\n return (\n <button\n type=\"button\"\n className={classes}\n onClick={onClick}\n disabled={disabled}\n >\n {children}\n </button>\n );\n}\n"],"names":["Button","className","children","variant","size","href","onClick","disabled","classes","clsx","button","buttonVariant","buttonSize","jsx"],"mappings":";;;AAUO,SAASA,EAAO;AAAA,EACrB,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AACF,GAAoB;AAClB,QAAMC,IAAUC;AAAA,IACdC;AAAA,IACAC,EAAcR,CAAO;AAAA,IACrBS,EAAWR,CAAI;AAAA,IACfH;AAAA,EAAA;AAGF,SAAII,IAEA,gBAAAQ,EAAC,KAAA,EAAE,MAAAR,GAAY,WAAWG,GACvB,UAAAN,GACH,IAKF,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAWL;AAAA,MACX,SAAAF;AAAA,MACA,UAAAC;AAAA,MAEC,UAAAL;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
package/dist/site/blocks/Card.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { jsx as r, jsxs as m, Fragment as
|
|
2
|
-
import { clsx as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { card as h, cardHoverable as N, cardImage as f, cardContent as u, cardTitle as x, cardDescription as v } from "../../styles/site/sections.css.js";
|
|
6
|
-
function F({
|
|
1
|
+
import { jsx as r, jsxs as m, Fragment as i } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as h } from "clsx";
|
|
3
|
+
import { card as N, cardHoverable as p, cardImage as f, cardContent as u, cardTitle as x, cardDescription as v } from "../../styles/site/sections.css.js";
|
|
4
|
+
function b({
|
|
7
5
|
id: c,
|
|
8
|
-
className:
|
|
6
|
+
className: d,
|
|
9
7
|
title: a,
|
|
10
8
|
description: s,
|
|
11
9
|
image: e,
|
|
12
10
|
href: n,
|
|
13
|
-
hoverable:
|
|
11
|
+
hoverable: o = !0
|
|
14
12
|
}) {
|
|
15
|
-
const
|
|
13
|
+
const l = /* @__PURE__ */ m(i, { children: [
|
|
16
14
|
e && /* @__PURE__ */ r(
|
|
17
15
|
"img",
|
|
18
16
|
{
|
|
@@ -25,14 +23,14 @@ function F({
|
|
|
25
23
|
/* @__PURE__ */ r("h3", { className: x, children: a }),
|
|
26
24
|
s && /* @__PURE__ */ r("p", { className: v, children: s })
|
|
27
25
|
] })
|
|
28
|
-
] }),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
] }), t = h(
|
|
27
|
+
N,
|
|
28
|
+
o && p,
|
|
29
|
+
d
|
|
32
30
|
);
|
|
33
|
-
return n ? /* @__PURE__ */ r("a", { id: c, href: n, className:
|
|
31
|
+
return n ? /* @__PURE__ */ r("a", { id: c, href: n, className: t, children: l }) : /* @__PURE__ */ r("div", { id: c, className: t, children: l });
|
|
34
32
|
}
|
|
35
33
|
export {
|
|
36
|
-
|
|
34
|
+
b as Card
|
|
37
35
|
};
|
|
38
36
|
//# sourceMappingURL=Card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../../../src/site/blocks/Card.tsx"],"sourcesContent":["/**\n * Card - Content card component\n *\n * Card with optional image, title, and description.\n */\n\nimport { clsx } from 'clsx';\nimport {\n card,\n cardHoverable,\n cardImage,\n cardContent,\n cardTitle,\n cardDescription,\n} from '../../styles/site';\nimport type { CardProps } from './types';\n\nexport function Card({\n id,\n className,\n title,\n description,\n image,\n href,\n hoverable = true,\n}: CardProps) {\n const content = (\n <>\n {image && (\n <img\n src={image}\n alt={title}\n className={cardImage}\n />\n )}\n <div className={cardContent}>\n <h3 className={cardTitle}>{title}</h3>\n {description && (\n <p className={cardDescription}>{description}</p>\n )}\n </div>\n </>\n );\n\n const classes = clsx(\n card,\n hoverable && cardHoverable,\n className\n );\n\n if (href) {\n return (\n <a id={id} href={href} className={classes}>\n {content}\n </a>\n );\n }\n\n return (\n <div id={id} className={classes}>\n {content}\n </div>\n );\n}\n"],"names":["Card","id","className","title","description","image","href","hoverable","content","jsxs","Fragment","jsx","cardImage","cardContent","cardTitle","cardDescription","classes","clsx","card","cardHoverable"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../../src/site/blocks/Card.tsx"],"sourcesContent":["/**\n * Card - Content card component\n *\n * Card with optional image, title, and description.\n */\n\nimport { clsx } from 'clsx';\nimport {\n card,\n cardHoverable,\n cardImage,\n cardContent,\n cardTitle,\n cardDescription,\n} from '../../styles/site';\nimport type { CardProps } from './types';\n\nexport function Card({\n id,\n className,\n title,\n description,\n image,\n href,\n hoverable = true,\n}: CardProps) {\n const content = (\n <>\n {image && (\n <img\n src={image}\n alt={title}\n className={cardImage}\n />\n )}\n <div className={cardContent}>\n <h3 className={cardTitle}>{title}</h3>\n {description && (\n <p className={cardDescription}>{description}</p>\n )}\n </div>\n </>\n );\n\n const classes = clsx(\n card,\n hoverable && cardHoverable,\n className\n );\n\n if (href) {\n return (\n <a id={id} href={href} className={classes}>\n {content}\n </a>\n );\n }\n\n return (\n <div id={id} className={classes}>\n {content}\n </div>\n );\n}\n"],"names":["Card","id","className","title","description","image","href","hoverable","content","jsxs","Fragment","jsx","cardImage","cardContent","cardTitle","cardDescription","classes","clsx","card","cardHoverable"],"mappings":";;;AAiBO,SAASA,EAAK;AAAA,EACnB,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAAc;AACZ,QAAMC,IACJ,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAL,KACC,gBAAAM;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAKN;AAAA,QACL,KAAKF;AAAA,QACL,WAAWS;AAAA,MAAA;AAAA,IAAA;AAAA,IAGf,gBAAAH,EAAC,OAAA,EAAI,WAAWI,GACd,UAAA;AAAA,MAAA,gBAAAF,EAAC,MAAA,EAAG,WAAWG,GAAY,UAAAX,GAAM;AAAA,MAChCC,KACC,gBAAAO,EAAC,KAAA,EAAE,WAAWI,GAAkB,UAAAX,EAAA,CAAY;AAAA,IAAA,EAAA,CAEhD;AAAA,EAAA,GACF,GAGIY,IAAUC;AAAA,IACdC;AAAA,IACAX,KAAaY;AAAA,IACbjB;AAAA,EAAA;AAGF,SAAII,sBAEC,KAAA,EAAE,IAAAL,GAAQ,MAAAK,GAAY,WAAWU,GAC/B,UAAAR,GACH,IAKF,gBAAAG,EAAC,OAAA,EAAI,IAAAV,GAAQ,WAAWe,GACrB,UAAAR,GACH;AAEJ;"}
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { clsx as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function H({
|
|
7
|
-
id: n = "features",
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as o } from "clsx";
|
|
3
|
+
import { container as t, sectionHeader as h, sectionTitle as p, sectionSubtitle as N, featuresGrid as f, featureCard as u, featureIcon as v, featureTitle as x, featureDescription as g, section as T, sectionPadding as j } from "../../styles/site/sections.css.js";
|
|
4
|
+
function F({
|
|
5
|
+
id: r = "features",
|
|
8
6
|
className: l,
|
|
9
7
|
title: c,
|
|
10
8
|
subtitle: s,
|
|
11
|
-
features:
|
|
12
|
-
columns:
|
|
9
|
+
features: n,
|
|
10
|
+
columns: d = 3
|
|
13
11
|
}) {
|
|
14
12
|
return /* @__PURE__ */ e(
|
|
15
13
|
"section",
|
|
16
14
|
{
|
|
17
|
-
id:
|
|
18
|
-
className:
|
|
19
|
-
children: /* @__PURE__ */
|
|
20
|
-
(c || s) && /* @__PURE__ */
|
|
15
|
+
id: r,
|
|
16
|
+
className: o(T, j.lg, l),
|
|
17
|
+
children: /* @__PURE__ */ a("div", { className: t, children: [
|
|
18
|
+
(c || s) && /* @__PURE__ */ a("div", { className: h, children: [
|
|
21
19
|
c && /* @__PURE__ */ e("h2", { className: p, children: c }),
|
|
22
20
|
s && /* @__PURE__ */ e("p", { className: N, children: s })
|
|
23
21
|
] }),
|
|
@@ -26,13 +24,13 @@ function H({
|
|
|
26
24
|
{
|
|
27
25
|
className: f,
|
|
28
26
|
style: {
|
|
29
|
-
gridTemplateColumns: `repeat(${Math.min(
|
|
27
|
+
gridTemplateColumns: `repeat(${Math.min(d, n.length)}, minmax(0, 1fr))`
|
|
30
28
|
},
|
|
31
|
-
children:
|
|
29
|
+
children: n.map((i, m) => /* @__PURE__ */ a("div", { className: u, children: [
|
|
32
30
|
i.icon && /* @__PURE__ */ e("div", { className: v, children: i.icon }),
|
|
33
31
|
/* @__PURE__ */ e("h3", { className: x, children: i.title }),
|
|
34
32
|
/* @__PURE__ */ e("p", { className: g, children: i.description })
|
|
35
|
-
] },
|
|
33
|
+
] }, m))
|
|
36
34
|
}
|
|
37
35
|
)
|
|
38
36
|
] })
|
|
@@ -40,6 +38,6 @@ function H({
|
|
|
40
38
|
);
|
|
41
39
|
}
|
|
42
40
|
export {
|
|
43
|
-
|
|
41
|
+
F as Features
|
|
44
42
|
};
|
|
45
43
|
//# sourceMappingURL=Features.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Features.js","sources":["../../../src/site/blocks/Features.tsx"],"sourcesContent":["/**\n * Features - Features section component\n *\n * Grid of feature cards with icons.\n */\n\nimport { clsx } from 'clsx';\nimport {\n section,\n sectionPadding,\n container,\n sectionHeader,\n sectionTitle,\n sectionSubtitle,\n featuresGrid,\n featureCard,\n featureIcon,\n featureTitle,\n featureDescription,\n} from '../../styles/site';\nimport type { FeaturesProps } from './types';\n\nexport function Features({\n id = 'features',\n className,\n title,\n subtitle,\n features,\n columns = 3,\n}: FeaturesProps) {\n return (\n <section\n id={id}\n className={clsx(section, sectionPadding.lg, className)}\n >\n <div className={container}>\n {(title || subtitle) && (\n <div className={sectionHeader}>\n {title && <h2 className={sectionTitle}>{title}</h2>}\n {subtitle && <p className={sectionSubtitle}>{subtitle}</p>}\n </div>\n )}\n\n <div\n className={featuresGrid}\n style={{\n gridTemplateColumns: `repeat(${Math.min(columns, features.length)}, minmax(0, 1fr))`,\n }}\n >\n {features.map((feature, index) => (\n <div key={index} className={featureCard}>\n {feature.icon && (\n <div className={featureIcon}>\n {feature.icon}\n </div>\n )}\n <h3 className={featureTitle}>{feature.title}</h3>\n <p className={featureDescription}>{feature.description}</p>\n </div>\n ))}\n </div>\n </div>\n </section>\n );\n}\n"],"names":["Features","id","className","title","subtitle","features","columns","jsx","clsx","section","sectionPadding","jsxs","container","sectionHeader","sectionTitle","sectionSubtitle","featuresGrid","feature","index","featureCard","featureIcon","featureTitle","featureDescription"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Features.js","sources":["../../../src/site/blocks/Features.tsx"],"sourcesContent":["/**\n * Features - Features section component\n *\n * Grid of feature cards with icons.\n */\n\nimport { clsx } from 'clsx';\nimport {\n section,\n sectionPadding,\n container,\n sectionHeader,\n sectionTitle,\n sectionSubtitle,\n featuresGrid,\n featureCard,\n featureIcon,\n featureTitle,\n featureDescription,\n} from '../../styles/site';\nimport type { FeaturesProps } from './types';\n\nexport function Features({\n id = 'features',\n className,\n title,\n subtitle,\n features,\n columns = 3,\n}: FeaturesProps) {\n return (\n <section\n id={id}\n className={clsx(section, sectionPadding.lg, className)}\n >\n <div className={container}>\n {(title || subtitle) && (\n <div className={sectionHeader}>\n {title && <h2 className={sectionTitle}>{title}</h2>}\n {subtitle && <p className={sectionSubtitle}>{subtitle}</p>}\n </div>\n )}\n\n <div\n className={featuresGrid}\n style={{\n gridTemplateColumns: `repeat(${Math.min(columns, features.length)}, minmax(0, 1fr))`,\n }}\n >\n {features.map((feature, index) => (\n <div key={index} className={featureCard}>\n {feature.icon && (\n <div className={featureIcon}>\n {feature.icon}\n </div>\n )}\n <h3 className={featureTitle}>{feature.title}</h3>\n <p className={featureDescription}>{feature.description}</p>\n </div>\n ))}\n </div>\n </div>\n </section>\n );\n}\n"],"names":["Features","id","className","title","subtitle","features","columns","jsx","clsx","section","sectionPadding","jsxs","container","sectionHeader","sectionTitle","sectionSubtitle","featuresGrid","feature","index","featureCard","featureIcon","featureTitle","featureDescription"],"mappings":";;;AAsBO,SAASA,EAAS;AAAA,EACvB,IAAAC,IAAK;AAAA,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
|
-
|
|
6
|
-
|
|
7
|
-
id: s = "footer",
|
|
8
|
-
className: c,
|
|
2
|
+
import { clsx as p } from "clsx";
|
|
3
|
+
import { container as N, footerContent as v, footerSection as s, navbarBrand as g, footerTitle as x, footerLink as u, footerCopyright as j, footer as y, section as C, sectionPadding as F } from "../../styles/site/sections.css.js";
|
|
4
|
+
function k({
|
|
5
|
+
id: c = "footer",
|
|
6
|
+
className: i,
|
|
9
7
|
brand: o,
|
|
10
8
|
linkGroups: l = [],
|
|
11
9
|
copyright: n
|
|
@@ -14,12 +12,12 @@ function A({
|
|
|
14
12
|
return /* @__PURE__ */ e(
|
|
15
13
|
"footer",
|
|
16
14
|
{
|
|
17
|
-
id:
|
|
18
|
-
className: p(
|
|
15
|
+
id: c,
|
|
16
|
+
className: p(y, C, F.lg, i),
|
|
19
17
|
children: /* @__PURE__ */ r("div", { className: N, children: [
|
|
20
18
|
/* @__PURE__ */ r("div", { className: v, children: [
|
|
21
|
-
o && /* @__PURE__ */ e("div", { className:
|
|
22
|
-
l.map((t, f) => /* @__PURE__ */ r("div", { className:
|
|
19
|
+
o && /* @__PURE__ */ e("div", { className: s, children: /* @__PURE__ */ e("a", { href: "/", className: g, children: o }) }),
|
|
20
|
+
l.map((t, f) => /* @__PURE__ */ r("div", { className: s, children: [
|
|
23
21
|
/* @__PURE__ */ e("span", { className: x, children: t.title }),
|
|
24
22
|
t.links.map((a, h) => /* @__PURE__ */ e(
|
|
25
23
|
"a",
|
|
@@ -38,6 +36,6 @@ function A({
|
|
|
38
36
|
);
|
|
39
37
|
}
|
|
40
38
|
export {
|
|
41
|
-
|
|
39
|
+
k as Footer
|
|
42
40
|
};
|
|
43
41
|
//# sourceMappingURL=Footer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.js","sources":["../../../src/site/blocks/Footer.tsx"],"sourcesContent":["/**\n * Footer - Site footer component\n *\n * Footer with link groups and copyright.\n */\n\nimport { clsx } from 'clsx';\nimport {\n footer,\n footerContent,\n footerSection,\n footerTitle,\n footerLink,\n footerCopyright,\n section,\n sectionPadding,\n container,\n navbarBrand,\n} from '../../styles/site';\nimport type { FooterProps } from './types';\n\nexport function Footer({\n id = 'footer',\n className,\n brand,\n linkGroups = [],\n copyright,\n}: FooterProps) {\n const currentYear = new Date().getFullYear();\n const copyrightText = copyright || `© ${currentYear} All rights reserved.`;\n\n return (\n <footer\n id={id}\n className={clsx(footer, section, sectionPadding.lg, className)}\n >\n <div className={container}>\n <div className={footerContent}>\n {/* Brand column */}\n {brand && (\n <div className={footerSection}>\n <a href=\"/\" className={navbarBrand}>\n {brand}\n </a>\n </div>\n )}\n\n {/* Link groups */}\n {linkGroups.map((group, index) => (\n <div key={index} className={footerSection}>\n <span className={footerTitle}>{group.title}</span>\n {group.links.map((link, linkIndex) => (\n <a\n key={linkIndex}\n href={link.href}\n className={footerLink}\n >\n {link.label}\n </a>\n ))}\n </div>\n ))}\n </div>\n\n {/* Copyright */}\n <p className={footerCopyright}>\n {copyrightText}\n </p>\n </div>\n </footer>\n );\n}\n"],"names":["Footer","id","className","brand","linkGroups","copyright","currentYear","copyrightText","jsx","clsx","footer","section","sectionPadding","jsxs","container","footerContent","footerSection","navbarBrand","group","index","footerTitle","link","linkIndex","footerLink","footerCopyright"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Footer.js","sources":["../../../src/site/blocks/Footer.tsx"],"sourcesContent":["/**\n * Footer - Site footer component\n *\n * Footer with link groups and copyright.\n */\n\nimport { clsx } from 'clsx';\nimport {\n footer,\n footerContent,\n footerSection,\n footerTitle,\n footerLink,\n footerCopyright,\n section,\n sectionPadding,\n container,\n navbarBrand,\n} from '../../styles/site';\nimport type { FooterProps } from './types';\n\nexport function Footer({\n id = 'footer',\n className,\n brand,\n linkGroups = [],\n copyright,\n}: FooterProps) {\n const currentYear = new Date().getFullYear();\n const copyrightText = copyright || `© ${currentYear} All rights reserved.`;\n\n return (\n <footer\n id={id}\n className={clsx(footer, section, sectionPadding.lg, className)}\n >\n <div className={container}>\n <div className={footerContent}>\n {/* Brand column */}\n {brand && (\n <div className={footerSection}>\n <a href=\"/\" className={navbarBrand}>\n {brand}\n </a>\n </div>\n )}\n\n {/* Link groups */}\n {linkGroups.map((group, index) => (\n <div key={index} className={footerSection}>\n <span className={footerTitle}>{group.title}</span>\n {group.links.map((link, linkIndex) => (\n <a\n key={linkIndex}\n href={link.href}\n className={footerLink}\n >\n {link.label}\n </a>\n ))}\n </div>\n ))}\n </div>\n\n {/* Copyright */}\n <p className={footerCopyright}>\n {copyrightText}\n </p>\n </div>\n </footer>\n );\n}\n"],"names":["Footer","id","className","brand","linkGroups","copyright","currentYear","copyrightText","jsx","clsx","footer","section","sectionPadding","jsxs","container","footerContent","footerSection","navbarBrand","group","index","footerTitle","link","linkIndex","footerLink","footerCopyright"],"mappings":";;;AAqBO,SAASA,EAAO;AAAA,EACrB,IAAAC,IAAK;AAAA,EACL,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC,IAAa,CAAA;AAAA,EACb,WAAAC;AACF,GAAgB;AACd,QAAMC,KAAc,oBAAI,KAAA,GAAO,YAAA,GACzBC,IAAgBF,KAAa,KAAKC,CAAW;AAEnD,SACE,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,IAAAP;AAAA,MACA,WAAWQ,EAAKC,GAAQC,GAASC,EAAe,IAAIV,CAAS;AAAA,MAE7D,UAAA,gBAAAW,EAAC,OAAA,EAAI,WAAWC,GACd,UAAA;AAAA,QAAA,gBAAAD,EAAC,OAAA,EAAI,WAAWE,GAEb,UAAA;AAAA,UAAAZ,KACC,gBAAAK,EAAC,OAAA,EAAI,WAAWQ,GACd,UAAA,gBAAAR,EAAC,KAAA,EAAE,MAAK,KAAI,WAAWS,GACpB,UAAAd,EAAA,CACH,GACF;AAAA,UAIDC,EAAW,IAAI,CAACc,GAAOC,MACtB,gBAAAN,EAAC,OAAA,EAAgB,WAAWG,GAC1B,UAAA;AAAA,YAAA,gBAAAR,EAAC,QAAA,EAAK,WAAWY,GAAc,UAAAF,EAAM,OAAM;AAAA,YAC1CA,EAAM,MAAM,IAAI,CAACG,GAAMC,MACtB,gBAAAd;AAAA,cAAC;AAAA,cAAA;AAAA,gBAEC,MAAMa,EAAK;AAAA,gBACX,WAAWE;AAAA,gBAEV,UAAAF,EAAK;AAAA,cAAA;AAAA,cAJDC;AAAA,YAAA,CAMR;AAAA,UAAA,EAAA,GAVOH,CAWV,CACD;AAAA,QAAA,GACH;AAAA,QAGA,gBAAAX,EAAC,KAAA,EAAE,WAAWgB,GACX,UAAAjB,EAAA,CACH;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
package/dist/site/blocks/Hero.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { clsx as f } from "
|
|
3
|
-
/* empty css */
|
|
4
|
-
/* empty css */
|
|
2
|
+
import { clsx as f } from "clsx";
|
|
5
3
|
import { heroContent as p, heroTitle as u, heroSubtitle as v, heroActions as x, section as N, heroSection as b } from "../../styles/site/sections.css.js";
|
|
6
4
|
import { Button as o } from "./Button.js";
|
|
7
|
-
function
|
|
5
|
+
function j({
|
|
8
6
|
id: s = "hero",
|
|
9
7
|
className: c,
|
|
10
8
|
title: a,
|
|
11
|
-
subtitle:
|
|
9
|
+
subtitle: n,
|
|
12
10
|
ctaText: r,
|
|
13
|
-
ctaHref:
|
|
11
|
+
ctaHref: h,
|
|
14
12
|
secondaryCtaText: i,
|
|
15
|
-
secondaryCtaHref:
|
|
16
|
-
backgroundImage:
|
|
13
|
+
secondaryCtaHref: m,
|
|
14
|
+
backgroundImage: t,
|
|
17
15
|
alignment: g = "center"
|
|
18
16
|
}) {
|
|
19
17
|
const d = {
|
|
@@ -27,8 +25,8 @@ function y({
|
|
|
27
25
|
id: s,
|
|
28
26
|
className: f(N, b, c),
|
|
29
27
|
style: {
|
|
30
|
-
...
|
|
31
|
-
backgroundImage: `linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(${
|
|
28
|
+
...t && {
|
|
29
|
+
backgroundImage: `linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(${t})`,
|
|
32
30
|
backgroundSize: "cover",
|
|
33
31
|
backgroundPosition: "center"
|
|
34
32
|
}
|
|
@@ -40,10 +38,10 @@ function y({
|
|
|
40
38
|
style: d[g],
|
|
41
39
|
children: [
|
|
42
40
|
/* @__PURE__ */ e("h1", { className: u, children: a }),
|
|
43
|
-
|
|
41
|
+
n && /* @__PURE__ */ e("p", { className: v, children: n }),
|
|
44
42
|
(r || i) && /* @__PURE__ */ l("div", { className: x, children: [
|
|
45
|
-
r && /* @__PURE__ */ e(o, { variant: "primary", size: "lg", href:
|
|
46
|
-
i && /* @__PURE__ */ e(o, { variant: "outline", size: "lg", href:
|
|
43
|
+
r && /* @__PURE__ */ e(o, { variant: "primary", size: "lg", href: h, children: r }),
|
|
44
|
+
i && /* @__PURE__ */ e(o, { variant: "outline", size: "lg", href: m, children: i })
|
|
47
45
|
] })
|
|
48
46
|
]
|
|
49
47
|
}
|
|
@@ -52,6 +50,6 @@ function y({
|
|
|
52
50
|
);
|
|
53
51
|
}
|
|
54
52
|
export {
|
|
55
|
-
|
|
53
|
+
j as Hero
|
|
56
54
|
};
|
|
57
55
|
//# sourceMappingURL=Hero.js.map
|