@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":"index.js","sources":["../../../../../src/engine/export/exporters/sections/index.ts"],"sourcesContent":["/**\n * Section Exporters Auto-Registration\n */\n\nimport { htmlExportRegistry } from \"../HtmlExporter\";\nimport { exportHero } from \"./HeroExporter\";\nimport { exportNavbar } from \"./NavbarExporter\";\nimport { exportFooter } from \"./FooterExporter\";\nimport {\n exportFeature,\n exportFeatureGrid,\n exportCta,\n exportPricingCard,\n exportPricing,\n exportTestimonial,\n exportTestimonialGrid,\n exportFaqItem,\n exportFaq,\n exportStats,\n exportStatItem,\n exportLogoCloud,\n exportSocialLinks,\n} from \"./MarketingExporters\";\nimport {\n exportBlogCard,\n exportBlogCardGrid,\n exportTeamCard,\n exportTeamGrid,\n exportCourseCardGrid,\n exportCountdown,\n exportCarousel,\n} from \"./ContentGridExporters\";\n\n// Referência para renderChild\nimport { Block } from \"../../../schema/siteDocument\";\nimport { ThemeTokens } from \"../../../schema/themeTokens\";\n\nlet renderChildRef: ((block: Block, depth: number, basePath?: string, theme?: ThemeTokens) => string) | null = null;\n\nexport function setSectionExportersRenderChild(\n fn: (block: Block, depth: number, basePath?: string, theme?: ThemeTokens) => string\n) {\n renderChildRef = fn;\n}\n\n// Exporters simples (sem children)\nhtmlExportRegistry.register(\"hero\", exportHero);\nhtmlExportRegistry.register(\"navbar\", exportNavbar);\nhtmlExportRegistry.register(\"footer\", exportFooter);\nhtmlExportRegistry.register(\"feature\", exportFeature);\nhtmlExportRegistry.register(\"cta\", exportCta);\nhtmlExportRegistry.register(\"pricingCard\", exportPricingCard);\nhtmlExportRegistry.register(\"testimonial\", exportTestimonial);\nhtmlExportRegistry.register(\"faqItem\", exportFaqItem);\nhtmlExportRegistry.register(\"stats\", exportStats);\nhtmlExportRegistry.register(\"statItem\", exportStatItem);\nhtmlExportRegistry.register(\"logoCloud\", exportLogoCloud);\nhtmlExportRegistry.register(\"socialLinks\", exportSocialLinks);\nhtmlExportRegistry.register(\"blogCard\", exportBlogCard);\nhtmlExportRegistry.register(\"teamCard\", exportTeamCard);\nhtmlExportRegistry.register(\"courseCardGrid\", exportCourseCardGrid);\nhtmlExportRegistry.register(\"countdown\", exportCountdown);\nhtmlExportRegistry.register(\"carousel\", exportCarousel);\n\n// Exporters que precisam de renderChild\nhtmlExportRegistry.register(\"featureGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportFeatureGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"pricing\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportPricing(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"testimonialGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportTestimonialGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"faq\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportFaq(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"blogCardGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportBlogCardGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"teamGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportTeamGrid(block, depth, basePath, theme, renderChildRef);\n});\n"],"names":["renderChildRef","setSectionExportersRenderChild","fn","htmlExportRegistry","exportHero","exportNavbar","exportFooter","exportFeature","exportCta","exportPricingCard","exportTestimonial","exportFaqItem","exportStats","exportStatItem","exportLogoCloud","exportSocialLinks","exportBlogCard","exportTeamCard","exportCourseCardGrid","exportCountdown","exportCarousel","block","depth","basePath","theme","exportFeatureGrid","exportPricing","exportTestimonialGrid","exportFaq","exportBlogCardGrid","exportTeamGrid"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/engine/export/exporters/sections/index.ts"],"sourcesContent":["/**\n * Section Exporters Auto-Registration\n */\n\nimport { htmlExportRegistry } from \"../HtmlExporter\";\nimport { exportHero } from \"./HeroExporter\";\nimport { exportNavbar } from \"./NavbarExporter\";\nimport { exportFooter } from \"./FooterExporter\";\nimport {\n exportFeature,\n exportFeatureGrid,\n exportCta,\n exportPricingCard,\n exportPricing,\n exportTestimonial,\n exportTestimonialGrid,\n exportFaqItem,\n exportFaq,\n exportStats,\n exportStatItem,\n exportLogoCloud,\n exportSocialLinks,\n} from \"./MarketingExporters\";\nimport {\n exportBlogCard,\n exportBlogCardGrid,\n exportTeamCard,\n exportTeamGrid,\n exportCourseCardGrid,\n exportCountdown,\n exportCarousel,\n} from \"./ContentGridExporters\";\nimport {\n exportBlogPostCard,\n exportBlogPostGrid,\n exportBlogPostDetail,\n} from \"./BlogPostExporters\";\n\n// Referência para renderChild\nimport { Block } from \"../../../schema/siteDocument\";\nimport { ThemeTokens } from \"../../../schema/themeTokens\";\n\nlet renderChildRef: ((block: Block, depth: number, basePath?: string, theme?: ThemeTokens) => string) | null = null;\n\nexport function setSectionExportersRenderChild(\n fn: (block: Block, depth: number, basePath?: string, theme?: ThemeTokens) => string\n) {\n renderChildRef = fn;\n}\n\n// Exporters simples (sem children)\nhtmlExportRegistry.register(\"hero\", exportHero);\nhtmlExportRegistry.register(\"navbar\", exportNavbar);\nhtmlExportRegistry.register(\"footer\", exportFooter);\nhtmlExportRegistry.register(\"feature\", exportFeature);\nhtmlExportRegistry.register(\"cta\", exportCta);\nhtmlExportRegistry.register(\"pricingCard\", exportPricingCard);\nhtmlExportRegistry.register(\"testimonial\", exportTestimonial);\nhtmlExportRegistry.register(\"faqItem\", exportFaqItem);\nhtmlExportRegistry.register(\"stats\", exportStats);\nhtmlExportRegistry.register(\"statItem\", exportStatItem);\nhtmlExportRegistry.register(\"logoCloud\", exportLogoCloud);\nhtmlExportRegistry.register(\"socialLinks\", exportSocialLinks);\nhtmlExportRegistry.register(\"blogCard\", exportBlogCard);\nhtmlExportRegistry.register(\"blogPostCard\", exportBlogPostCard);\nhtmlExportRegistry.register(\"blogPostDetail\", exportBlogPostDetail);\nhtmlExportRegistry.register(\"teamCard\", exportTeamCard);\nhtmlExportRegistry.register(\"courseCardGrid\", exportCourseCardGrid);\nhtmlExportRegistry.register(\"countdown\", exportCountdown);\nhtmlExportRegistry.register(\"carousel\", exportCarousel);\n\n// Exporters que precisam de renderChild\nhtmlExportRegistry.register(\"featureGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportFeatureGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"pricing\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportPricing(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"testimonialGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportTestimonialGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"faq\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportFaq(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"blogCardGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportBlogCardGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"blogPostGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportBlogPostGrid(block, depth, basePath, theme, renderChildRef);\n});\n\nhtmlExportRegistry.register(\"teamGrid\", (block, depth, basePath, theme) => {\n if (!renderChildRef) throw new Error(\"renderChild not initialized\");\n return exportTeamGrid(block, depth, basePath, theme, renderChildRef);\n});\n"],"names":["renderChildRef","setSectionExportersRenderChild","fn","htmlExportRegistry","exportHero","exportNavbar","exportFooter","exportFeature","exportCta","exportPricingCard","exportTestimonial","exportFaqItem","exportStats","exportStatItem","exportLogoCloud","exportSocialLinks","exportBlogCard","exportBlogPostCard","exportBlogPostDetail","exportTeamCard","exportCourseCardGrid","exportCountdown","exportCarousel","block","depth","basePath","theme","exportFeatureGrid","exportPricing","exportTestimonialGrid","exportFaq","exportBlogCardGrid","exportBlogPostGrid","exportTeamGrid"],"mappings":";;;;;;;AA0CA,IAAIA,IAA2G;AAExG,SAASC,EACdC,GACA;AACA,EAAAF,IAAiBE;AACnB;AAGAC,EAAmB,SAAS,QAAQC,CAAU;AAC9CD,EAAmB,SAAS,UAAUE,CAAY;AAClDF,EAAmB,SAAS,UAAUG,CAAY;AAClDH,EAAmB,SAAS,WAAWI,CAAa;AACpDJ,EAAmB,SAAS,OAAOK,CAAS;AAC5CL,EAAmB,SAAS,eAAeM,CAAiB;AAC5DN,EAAmB,SAAS,eAAeO,CAAiB;AAC5DP,EAAmB,SAAS,WAAWQ,CAAa;AACpDR,EAAmB,SAAS,SAASS,CAAW;AAChDT,EAAmB,SAAS,YAAYU,CAAc;AACtDV,EAAmB,SAAS,aAAaW,CAA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BAAgB,CAACoB,GAAOC,GAAOC,GAAUC,MAAU;AAC7E,MAAI,CAAC1B,EAAgB,OAAM,IAAI,MAAM,6BAA6B;AAClE,SAAOgC,EAAmBT,GAAOC,GAAOC,GAAUC,GAAO1B,CAAc;AACzE,CAAC;AAEDG,EAAmB,SAAS,YAAY,CAACoB,GAAOC,GAAOC,GAAUC,MAAU;AACzE,MAAI,CAAC1B,EAAgB,OAAM,IAAI,MAAM,6BAA6B;AAClE,SAAOiC,EAAeV,GAAOC,GAAOC,GAAUC,GAAO1B,CAAc;AACrE,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitizeHtml.d.ts","sourceRoot":"","sources":["../../../src/engine/export/sanitizeHtml.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"sanitizeHtml.d.ts","sourceRoot":"","sources":["../../../src/engine/export/sanitizeHtml.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiJH;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqDjD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAG9C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o = [
|
|
2
2
|
"div",
|
|
3
3
|
"span",
|
|
4
4
|
"p",
|
|
@@ -30,8 +30,26 @@ const a = [
|
|
|
30
30
|
"hr",
|
|
31
31
|
"blockquote",
|
|
32
32
|
"code",
|
|
33
|
-
"pre"
|
|
34
|
-
|
|
33
|
+
"pre",
|
|
34
|
+
// Inline styles (hover effects, responsive CSS)
|
|
35
|
+
"style",
|
|
36
|
+
// SVG (social icons, wave decoration, hover overlays)
|
|
37
|
+
"svg",
|
|
38
|
+
"path",
|
|
39
|
+
"circle",
|
|
40
|
+
"rect",
|
|
41
|
+
"line",
|
|
42
|
+
"polyline",
|
|
43
|
+
"polygon",
|
|
44
|
+
"g",
|
|
45
|
+
// Form elements
|
|
46
|
+
"form",
|
|
47
|
+
"input",
|
|
48
|
+
"textarea",
|
|
49
|
+
"select",
|
|
50
|
+
"option",
|
|
51
|
+
"label"
|
|
52
|
+
], a = [
|
|
35
53
|
"id",
|
|
36
54
|
"class",
|
|
37
55
|
"style",
|
|
@@ -46,7 +64,36 @@ const a = [
|
|
|
46
64
|
"role",
|
|
47
65
|
"aria-label",
|
|
48
66
|
"aria-labelledby",
|
|
49
|
-
"data-*"
|
|
67
|
+
"data-*",
|
|
68
|
+
// SVG attributes
|
|
69
|
+
"viewBox",
|
|
70
|
+
"preserveAspectRatio",
|
|
71
|
+
"fill",
|
|
72
|
+
"stroke",
|
|
73
|
+
"stroke-width",
|
|
74
|
+
"stroke-linecap",
|
|
75
|
+
"stroke-linejoin",
|
|
76
|
+
"d",
|
|
77
|
+
"opacity",
|
|
78
|
+
"xmlns",
|
|
79
|
+
"cx",
|
|
80
|
+
"cy",
|
|
81
|
+
"r",
|
|
82
|
+
"x",
|
|
83
|
+
"y",
|
|
84
|
+
"x1",
|
|
85
|
+
"y1",
|
|
86
|
+
"x2",
|
|
87
|
+
"y2",
|
|
88
|
+
// Form attributes
|
|
89
|
+
"name",
|
|
90
|
+
"value",
|
|
91
|
+
"placeholder",
|
|
92
|
+
"required",
|
|
93
|
+
"disabled",
|
|
94
|
+
"for",
|
|
95
|
+
"action",
|
|
96
|
+
"method"
|
|
50
97
|
];
|
|
51
98
|
function l(r) {
|
|
52
99
|
return r.replace(/javascript:/gi, "").replace(/data:text\/html/gi, "");
|
|
@@ -56,23 +103,23 @@ function c(r, s) {
|
|
|
56
103
|
}
|
|
57
104
|
function m(r) {
|
|
58
105
|
const n = new DOMParser().parseFromString(r, "text/html");
|
|
59
|
-
return n.querySelectorAll("script").forEach((
|
|
60
|
-
if (Array.from(
|
|
61
|
-
|
|
62
|
-
}), !
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
65
|
-
for (;
|
|
66
|
-
|
|
67
|
-
|
|
106
|
+
return n.querySelectorAll("script").forEach((t) => t.remove()), n.querySelectorAll("*").forEach((t) => {
|
|
107
|
+
if (Array.from(t.attributes).forEach((e) => {
|
|
108
|
+
e.name.startsWith("on") && t.removeAttribute(e.name);
|
|
109
|
+
}), !o.includes(t.tagName.toLowerCase())) {
|
|
110
|
+
const e = t.parentNode;
|
|
111
|
+
if (e) {
|
|
112
|
+
for (; t.firstChild; )
|
|
113
|
+
e.insertBefore(t.firstChild, t);
|
|
114
|
+
e.removeChild(t);
|
|
68
115
|
}
|
|
69
116
|
}
|
|
70
|
-
Array.from(
|
|
71
|
-
if (!
|
|
72
|
-
|
|
117
|
+
Array.from(t.attributes).forEach((e) => {
|
|
118
|
+
if (!a.some((i) => i.endsWith("*") ? e.name.startsWith(i.slice(0, -1)) : e.name === i))
|
|
119
|
+
t.removeAttribute(e.name);
|
|
73
120
|
else {
|
|
74
|
-
const i = c(
|
|
75
|
-
i === null ?
|
|
121
|
+
const i = c(e.name, e.value);
|
|
122
|
+
i === null ? t.removeAttribute(e.name) : i !== e.value && t.setAttribute(e.name, i);
|
|
76
123
|
}
|
|
77
124
|
});
|
|
78
125
|
}), n.body.innerHTML;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitizeHtml.js","sources":["../../../src/engine/export/sanitizeHtml.ts"],"sourcesContent":["/**\n * HTML Sanitization\n * Remove scripts, event handlers e outros elementos perigosos\n */\n\n/**\n * Lista de tags permitidas\n */\nconst ALLOWED_TAGS = [\n 'div',\n 'span',\n 'p',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'a',\n 'img',\n 'button',\n 'section',\n 'article',\n 'header',\n 'footer',\n 'nav',\n 'main',\n 'aside',\n 'ul',\n 'ol',\n 'li',\n 'strong',\n 'em',\n 'b',\n 'i',\n 'u',\n 'br',\n 'hr',\n 'blockquote',\n 'code',\n 'pre',\n]\n\n/**\n * Lista de atributos permitidos\n */\nconst ALLOWED_ATTRIBUTES = [\n 'id',\n 'class',\n 'style',\n 'href',\n 'src',\n 'alt',\n 'target',\n 'rel',\n 'width',\n 'height',\n 'type',\n 'role',\n 'aria-label',\n 'aria-labelledby',\n 'data-*',\n]\n\n/**\n * Remove event handlers de atributos style\n */\nfunction sanitizeStyle(style: string): string {\n // Remove javascript: e data: URLs perigosos\n return style.replace(/javascript:/gi, '').replace(/data:text\\/html/gi, '')\n}\n\n/**\n * Sanitiza um atributo\n */\nfunction sanitizeAttribute(name: string, value: string): string | null {\n // Bloquear event handlers\n if (name.startsWith('on')) {\n return null\n }\n\n // Sanitizar href/src\n if ((name === 'href' || name === 'src') && value) {\n // Permitir http, https, /, #, mailto, tel\n if (!/^(https?:\\/\\/|\\/|#|mailto:|tel:)/.test(value)) {\n return '#'\n }\n // Bloquear javascript:\n if (value.toLowerCase().startsWith('javascript:')) {\n return '#'\n }\n }\n\n // Sanitizar style\n if (name === 'style') {\n return sanitizeStyle(value)\n }\n\n return value\n}\n\n/**\n * Sanitiza HTML removendo elementos perigosos\n */\nexport function sanitizeHtml(html: string): string {\n // Criar um parser temporário\n const parser = new DOMParser()\n const doc = parser.parseFromString(html, 'text/html')\n\n // Remover scripts\n const scripts = doc.querySelectorAll('script')\n scripts.forEach((script) => script.remove())\n\n // Remover event handlers de todos os elementos\n const allElements = doc.querySelectorAll('*')\n allElements.forEach((el) => {\n // Remover atributos que começam com 'on'\n Array.from(el.attributes).forEach((attr) => {\n if (attr.name.startsWith('on')) {\n el.removeAttribute(attr.name)\n }\n })\n\n // Remover tags não permitidas\n if (!ALLOWED_TAGS.includes(el.tagName.toLowerCase())) {\n const parent = el.parentNode\n if (parent) {\n while (el.firstChild) {\n parent.insertBefore(el.firstChild, el)\n }\n parent.removeChild(el)\n }\n }\n\n // Sanitizar atributos\n Array.from(el.attributes).forEach((attr) => {\n const isAllowed = ALLOWED_ATTRIBUTES.some((allowed) => {\n if (allowed.endsWith('*')) {\n return attr.name.startsWith(allowed.slice(0, -1))\n }\n return attr.name === allowed\n })\n\n if (!isAllowed) {\n el.removeAttribute(attr.name)\n } else {\n const sanitized = sanitizeAttribute(attr.name, attr.value)\n if (sanitized === null) {\n el.removeAttribute(attr.name)\n } else if (sanitized !== attr.value) {\n el.setAttribute(attr.name, sanitized)\n }\n }\n })\n })\n\n return doc.body.innerHTML\n}\n\n/**\n * Valida se uma URL é segura\n */\nexport function isSafeUrl(url: string): boolean {\n if (!url) return false\n return /^(https?:\\/\\/|\\/|#|mailto:|tel:)/.test(url)\n}\n"],"names":["ALLOWED_TAGS","ALLOWED_ATTRIBUTES","sanitizeStyle","style","sanitizeAttribute","name","value","sanitizeHtml","html","doc","script","el","attr","parent","allowed","sanitized","isSafeUrl","url"],"mappings":"AAQA,MAAMA,IAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAKMC,IAAqB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKA,SAASC,EAAcC,GAAuB;AAE5C,SAAOA,EAAM,QAAQ,iBAAiB,EAAE,EAAE,QAAQ,qBAAqB,EAAE;AAC3E;AAKA,SAASC,EAAkBC,GAAcC,GAA8B;AAErE,SAAID,EAAK,WAAW,IAAI,IACf,QAIJA,MAAS,UAAUA,MAAS,UAAUC,MAErC,CAA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B;AAC9C,SAAKA,IACE,mCAAmC,KAAKA,CAAG,IADjC;AAEnB;"}
|
|
1
|
+
{"version":3,"file":"sanitizeHtml.js","sources":["../../../src/engine/export/sanitizeHtml.ts"],"sourcesContent":["/**\n * HTML Sanitization\n * Remove scripts, event handlers e outros elementos perigosos\n */\n\n/**\n * Lista de tags permitidas\n */\nconst ALLOWED_TAGS = [\n 'div',\n 'span',\n 'p',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'a',\n 'img',\n 'button',\n 'section',\n 'article',\n 'header',\n 'footer',\n 'nav',\n 'main',\n 'aside',\n 'ul',\n 'ol',\n 'li',\n 'strong',\n 'em',\n 'b',\n 'i',\n 'u',\n 'br',\n 'hr',\n 'blockquote',\n 'code',\n 'pre',\n // Inline styles (hover effects, responsive CSS)\n 'style',\n // SVG (social icons, wave decoration, hover overlays)\n 'svg',\n 'path',\n 'circle',\n 'rect',\n 'line',\n 'polyline',\n 'polygon',\n 'g',\n // Form elements\n 'form',\n 'input',\n 'textarea',\n 'select',\n 'option',\n 'label',\n]\n\n/**\n * Lista de atributos permitidos\n */\nconst ALLOWED_ATTRIBUTES = [\n 'id',\n 'class',\n 'style',\n 'href',\n 'src',\n 'alt',\n 'target',\n 'rel',\n 'width',\n 'height',\n 'type',\n 'role',\n 'aria-label',\n 'aria-labelledby',\n 'data-*',\n // SVG attributes\n 'viewBox',\n 'preserveAspectRatio',\n 'fill',\n 'stroke',\n 'stroke-width',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'd',\n 'opacity',\n 'xmlns',\n 'cx',\n 'cy',\n 'r',\n 'x',\n 'y',\n 'x1',\n 'y1',\n 'x2',\n 'y2',\n // Form attributes\n 'name',\n 'value',\n 'placeholder',\n 'required',\n 'disabled',\n 'for',\n 'action',\n 'method',\n]\n\n/**\n * Remove event handlers de atributos style\n */\nfunction sanitizeStyle(style: string): string {\n // Remove javascript: e data: URLs perigosos\n return style.replace(/javascript:/gi, '').replace(/data:text\\/html/gi, '')\n}\n\n/**\n * Sanitiza um atributo\n */\nfunction sanitizeAttribute(name: string, value: string): string | null {\n // Bloquear event handlers\n if (name.startsWith('on')) {\n return null\n }\n\n // Sanitizar href/src\n if ((name === 'href' || name === 'src') && value) {\n // Permitir http, https, /, #, mailto, tel\n if (!/^(https?:\\/\\/|\\/|#|mailto:|tel:)/.test(value)) {\n return '#'\n }\n // Bloquear javascript:\n if (value.toLowerCase().startsWith('javascript:')) {\n return '#'\n }\n }\n\n // Sanitizar style\n if (name === 'style') {\n return sanitizeStyle(value)\n }\n\n return value\n}\n\n/**\n * Sanitiza HTML removendo elementos perigosos\n */\nexport function sanitizeHtml(html: string): string {\n // Criar um parser temporário\n const parser = new DOMParser()\n const doc = parser.parseFromString(html, 'text/html')\n\n // Remover scripts\n const scripts = doc.querySelectorAll('script')\n scripts.forEach((script) => script.remove())\n\n // Remover event handlers de todos os elementos\n const allElements = doc.querySelectorAll('*')\n allElements.forEach((el) => {\n // Remover atributos que começam com 'on'\n Array.from(el.attributes).forEach((attr) => {\n if (attr.name.startsWith('on')) {\n el.removeAttribute(attr.name)\n }\n })\n\n // Remover tags não permitidas\n if (!ALLOWED_TAGS.includes(el.tagName.toLowerCase())) {\n const parent = el.parentNode\n if (parent) {\n while (el.firstChild) {\n parent.insertBefore(el.firstChild, el)\n }\n parent.removeChild(el)\n }\n }\n\n // Sanitizar atributos\n Array.from(el.attributes).forEach((attr) => {\n const isAllowed = ALLOWED_ATTRIBUTES.some((allowed) => {\n if (allowed.endsWith('*')) {\n return attr.name.startsWith(allowed.slice(0, -1))\n }\n return attr.name === allowed\n })\n\n if (!isAllowed) {\n el.removeAttribute(attr.name)\n } else {\n const sanitized = sanitizeAttribute(attr.name, attr.value)\n if (sanitized === null) {\n el.removeAttribute(attr.name)\n } else if (sanitized !== attr.value) {\n el.setAttribute(attr.name, sanitized)\n }\n }\n })\n })\n\n return doc.body.innerHTML\n}\n\n/**\n * Valida se uma URL é segura\n */\nexport function isSafeUrl(url: string): boolean {\n if (!url) return false\n return /^(https?:\\/\\/|\\/|#|mailto:|tel:)/.test(url)\n}\n"],"names":["ALLOWED_TAGS","ALLOWED_ATTRIBUTES","sanitizeStyle","style","sanitizeAttribute","name","value","sanitizeHtml","html","doc","script","el","attr","parent","allowed","sanitized","isSafeUrl","url"],"mappings":"AAQA,MAAMA,IAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAKMC,IAAqB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAA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,EAAK,MAAMA,EAAK,KAAK;AACzD,QAAIG,MAAc,OAChBJ,EAAG,gBAAgBC,EAAK,IAAI,IACnBG,MAAcH,EAAK,SAC5BD,EAAG,aAAaC,EAAK,MAAMG,CAAS;AAAA,MAExC;AAAA,IACF,CAAC;AAAA,EACH,CAAC,GAEMN,EAAI,KAAK;AAClB;AAKO,SAASO,EAAUC,GAAsB;AAC9C,SAAKA,IACE,mCAAmC,KAAKA,CAAG,IADjC;AAEnB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styleResolver.d.ts","sourceRoot":"","sources":["../../../src/engine/export/styleResolver.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAKH,QAAQ,EACR,SAAS,EACT,WAAW,EAId,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"styleResolver.d.ts","sourceRoot":"","sources":["../../../src/engine/export/styleResolver.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAKH,QAAQ,EACR,SAAS,EACT,WAAW,EAId,MAAM,wBAAwB,CAAC;AAIhC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;AAM5C;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAM/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAI5C,CAAC;AAMF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,iCAAiC;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,2DA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.125rem"
|
|
@@ -61,7 +61,7 @@ function ct(e, n, r, o, u = "0.5rem 1rem", a = "1rem") {
|
|
|
61
61
|
].join("; ");
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function gt(e, n, r) {
|
|
65
65
|
const o = r?.colors?.primary || i.buttonColor, u = r?.colors?.primaryText || i.buttonTextColor, s = r?.colors?.menuLinkColor || r?.colors?.primary || i.linkColor, {
|
|
66
66
|
opacity: c = i.opacity,
|
|
67
67
|
blurOpacity: x = 15,
|
|
@@ -77,17 +77,17 @@ function mt(e, n, r) {
|
|
|
77
77
|
buttonVariant: _ = i.buttonVariant,
|
|
78
78
|
buttonSize: W = "md",
|
|
79
79
|
buttonHoverEffect: F = "darken",
|
|
80
|
-
buttonHoverIntensity:
|
|
80
|
+
buttonHoverIntensity: P = 50,
|
|
81
81
|
buttonHoverOverlay: v = "none",
|
|
82
|
-
buttonHoverIconName:
|
|
83
|
-
floating:
|
|
84
|
-
sticky:
|
|
85
|
-
transparent:
|
|
86
|
-
variation:
|
|
87
|
-
layout:
|
|
88
|
-
} = e, y =
|
|
89
|
-
t.push(`height: ${
|
|
90
|
-
const R = e.bg, d = R !== void 0 ? R :
|
|
82
|
+
buttonHoverIconName: K = "arrow-right",
|
|
83
|
+
floating: M = !1,
|
|
84
|
+
sticky: N = !0,
|
|
85
|
+
transparent: D = !1,
|
|
86
|
+
variation: E = "navbar-classic",
|
|
87
|
+
layout: G = "expanded"
|
|
88
|
+
} = e, y = E === "navbar-minimal", h = G === "compact", t = [], p = [];
|
|
89
|
+
t.push(`height: ${h ? "3.6rem" : "4.5rem"}`);
|
|
90
|
+
const R = e.bg, d = R !== void 0 ? R : D ? "transparent" : i.bg;
|
|
91
91
|
if (d === "transparent")
|
|
92
92
|
t.push("background-color: transparent");
|
|
93
93
|
else if (d.includes("gradient") || d.includes("linear") || d.includes("radial"))
|
|
@@ -96,27 +96,27 @@ function mt(e, n, r) {
|
|
|
96
96
|
const at = V(d, c);
|
|
97
97
|
t.push(`background-color: ${at}`);
|
|
98
98
|
}
|
|
99
|
-
const
|
|
100
|
-
if (t.push(`--navbar-blur-amount: ${
|
|
99
|
+
const A = Math.round(x / 100 * 30), U = x / 100;
|
|
100
|
+
if (t.push(`--navbar-blur-amount: ${A}px`), t.push(`--navbar-blur-opacity: ${U}`), M) {
|
|
101
101
|
t.push("position: fixed"), t.push("top: 20px"), t.push("left: 20px"), t.push("right: 20px"), t.push("width: calc(100% - 40px)"), t.push("z-index: 1000");
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
} else
|
|
102
|
+
const S = Math.max(l, 12);
|
|
103
|
+
S > 0 && t.push(`border-radius: ${S}px`);
|
|
104
|
+
} else N ? (t.push("position: fixed"), t.push("top: 0"), t.push("left: 0"), t.push("right: 0"), t.push("width: 100%"), t.push("z-index: 1000"), l > 0 && (t.push(`border-bottom-left-radius: ${l}px`), t.push(`border-bottom-right-radius: ${l}px`))) : (t.push("position: absolute"), t.push("top: 0"), t.push("left: 0"), t.push("right: 0"), t.push("width: 100%"), t.push("z-index: 1000"), l > 0 && (t.push(`border-bottom-left-radius: ${l}px`), t.push(`border-bottom-right-radius: ${l}px`)));
|
|
105
105
|
const q = I[z] || I.sm;
|
|
106
106
|
z !== "none" && t.push(`box-shadow: ${q}`), y && t.push("padding: 0.5rem 1rem");
|
|
107
|
-
const J = $ === "underline" || $ === "underline-center" || $ === "slide-bg" ? "0.3s" : "0.2s", Q = () => y ||
|
|
107
|
+
const J = $ === "underline" || $ === "underline-center" || $ === "slide-bg" ? "0.3s" : "0.2s", Q = () => y || h ? g.sm : g[B] || g.md, X = h ? "0.375rem 0.5rem" : "0.5rem 0.75rem", Y = [
|
|
108
108
|
`color: ${C}`,
|
|
109
109
|
`font-size: ${Q()}`,
|
|
110
110
|
"text-decoration: none",
|
|
111
|
-
`font-weight: ${
|
|
111
|
+
`font-weight: ${h ? "400" : "500"}`,
|
|
112
112
|
`transition: all ${J} ease`,
|
|
113
113
|
`padding: ${X}`,
|
|
114
114
|
"border-radius: 6px",
|
|
115
115
|
"display: inline-block"
|
|
116
|
-
], b = `[data-block-id="${n}"]`,
|
|
116
|
+
], b = `[data-block-id="${n}"]`, m = e.linkHoverColor || f, k = lt({
|
|
117
117
|
effect: $,
|
|
118
118
|
intensity: L,
|
|
119
|
-
hoverColor:
|
|
119
|
+
hoverColor: m
|
|
120
120
|
});
|
|
121
121
|
k.base && p.push(`
|
|
122
122
|
${b} .sg-navbar__link {
|
|
@@ -127,31 +127,31 @@ function mt(e, n, r) {
|
|
|
127
127
|
${k.hover}
|
|
128
128
|
}
|
|
129
129
|
`);
|
|
130
|
-
const
|
|
130
|
+
const w = pt({
|
|
131
131
|
effect: F,
|
|
132
|
-
intensity:
|
|
132
|
+
intensity: P,
|
|
133
133
|
buttonColor: f,
|
|
134
134
|
variant: _
|
|
135
135
|
});
|
|
136
|
-
|
|
136
|
+
w.base && p.push(`
|
|
137
137
|
${b} .sg-navbar__btn {
|
|
138
|
-
${
|
|
138
|
+
${w.base}
|
|
139
139
|
}
|
|
140
140
|
`), p.push(`
|
|
141
141
|
${b} .sg-navbar__btn:hover {
|
|
142
|
-
${
|
|
142
|
+
${w.hover}
|
|
143
143
|
}
|
|
144
144
|
`), p.push(ut()), v && v !== "none" && p.push(dt(`${b} .sg-navbar__btn`, {
|
|
145
145
|
overlay: v,
|
|
146
146
|
primaryColor: f,
|
|
147
|
-
iconName:
|
|
147
|
+
iconName: K,
|
|
148
148
|
textColor: H
|
|
149
149
|
}));
|
|
150
150
|
const j = {
|
|
151
151
|
sm: { padding: "0.375rem 0.875rem", fontSize: "0.875rem" },
|
|
152
152
|
md: { padding: "0.5rem 1rem", fontSize: "1rem" },
|
|
153
153
|
lg: { padding: "0.625rem 1.25rem", fontSize: "1.125rem" }
|
|
154
|
-
}, T = j[y ||
|
|
154
|
+
}, T = j[y || h ? "sm" : W] || j.md, Z = T.padding, tt = T.fontSize, ot = ct(
|
|
155
155
|
_,
|
|
156
156
|
f,
|
|
157
157
|
H,
|
|
@@ -169,7 +169,7 @@ function mt(e, n, r) {
|
|
|
169
169
|
`border-radius: ${l}px`,
|
|
170
170
|
"min-width: 220px",
|
|
171
171
|
"padding: 0.5rem 0"
|
|
172
|
-
], rt =
|
|
172
|
+
], rt = g[B] || g.md, st = [
|
|
173
173
|
`color: ${C}`,
|
|
174
174
|
`font-size: ${rt}`,
|
|
175
175
|
"text-decoration: none",
|
|
@@ -178,11 +178,11 @@ function mt(e, n, r) {
|
|
|
178
178
|
"display: block",
|
|
179
179
|
"white-space: nowrap",
|
|
180
180
|
"transition: background-color 0.2s ease, color 0.2s ease"
|
|
181
|
-
], it =
|
|
181
|
+
], it = m.startsWith("#") ? `${m}15` : m.replace("rgb(", "rgba(").replace(")", ", 0.08)");
|
|
182
182
|
return p.push(`
|
|
183
183
|
${b} .sg-navbar-dropdown__item:hover {
|
|
184
184
|
background-color: ${it} !important;
|
|
185
|
-
color: ${
|
|
185
|
+
color: ${m} !important;
|
|
186
186
|
transition: background-color 0.2s ease, color 0.2s ease;
|
|
187
187
|
}
|
|
188
188
|
`), {
|
|
@@ -230,9 +230,9 @@ function $t(e) {
|
|
|
230
230
|
}
|
|
231
231
|
export {
|
|
232
232
|
V as applyOpacityToColor,
|
|
233
|
-
|
|
233
|
+
g as fontSizes,
|
|
234
234
|
xt as mergeStyles,
|
|
235
|
-
|
|
235
|
+
gt as resolveNavbarStyles,
|
|
236
236
|
I as shadowValues,
|
|
237
237
|
$t as styleStringToReactStyle
|
|
238
238
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styleResolver.js","sources":["../../../src/engine/export/styleResolver.ts"],"sourcesContent":["/**\n * Style Resolver\n *\n * Sistema centralizado de resolução de estilos que combina\n * valores default com customizações do usuário, gerando\n * estilos inline completos para HTML export.\n */\n\n// Import hover effects from shared module\nimport {\n generateLinkHoverStyles,\n generateButtonHoverStyles,\n generateButtonOverlayCSS,\n getButtonHoverKeyframes,\n hexToRgb,\n hexToRgba,\n adjustColor,\n type LinkHoverConfig,\n type ButtonHoverConfig,\n type ButtonHoverOverlay,\n} from \"../shared/hoverEffects\";\n\n// Re-export for backwards compatibility\nexport { hexToRgb, hexToRgba, adjustColor };\n\n// ============================================================================\n// CONSTANTS\n// ============================================================================\n\n/**\n * Shadow values mapping\n */\nexport const shadowValues: Record<string, string> = {\n none: \"none\",\n sm: \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n md: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)\",\n lg: \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)\",\n xl: \"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)\",\n};\n\n/**\n * Font size values mapping\n */\nexport const fontSizes: Record<string, string> = {\n sm: \"0.875rem\",\n md: \"1rem\",\n lg: \"1.125rem\",\n};\n\n// ============================================================================\n// NAVBAR STYLE RESOLVER\n// ============================================================================\n\n/**\n * Resolved styles for navbar components\n */\nexport interface NavbarResolvedStyles {\n /** Styles for the nav element */\n nav: string;\n /** Styles for navigation links */\n link: string;\n /** Styles for the CTA button */\n button: string;\n /** Styles for the brand text */\n brandText: string;\n /** Styles for dropdown container */\n dropdown: string;\n /** Styles for dropdown items */\n dropdownItem: string;\n /** Dynamic CSS block for hover states and media queries */\n css: string;\n}\n\n/**\n * Default navbar styles (garantem aparência mesmo sem CSS externo)\n */\nconst navbarDefaults = {\n bg: \"#ffffff\",\n opacity: 100,\n borderRadius: 0,\n shadow: \"sm\" as const,\n linkColor: \"#1f2937\",\n linkFontSize: \"md\" as const,\n buttonColor: \"#3b82f6\",\n buttonTextColor: \"#ffffff\",\n buttonBorderRadius: 8,\n buttonVariant: \"solid\" as const,\n};\n\n/**\n * Resolve button styles based on variant\n */\nfunction resolveButtonStyle(\n variant: string,\n bgColor: string,\n textColor: string,\n borderRadius: number,\n padding: string = \"0.5rem 1rem\",\n fontSize: string = \"1rem\",\n): string {\n const baseStyles = [\n `padding: ${padding}`,\n `font-size: ${fontSize}`,\n `border-radius: ${borderRadius}px`,\n \"text-decoration: none\",\n \"font-weight: 500\",\n \"display: inline-block\",\n \"transition: all 0.2s ease\",\n \"cursor: pointer\",\n \"position: relative\", // Needed for shine effect\n \"overflow: hidden\", // Needed for shine effect\n ];\n\n switch (variant) {\n case \"outline\":\n return [\n ...baseStyles,\n \"background-color: transparent\",\n `color: ${bgColor}`,\n `border: 2px solid ${bgColor}`,\n ].join(\"; \");\n\n case \"ghost\":\n return [\n ...baseStyles,\n \"background-color: transparent\",\n `color: ${bgColor}`,\n \"border: none\",\n ].join(\"; \");\n\n case \"solid\":\n default:\n return [\n ...baseStyles,\n `background-color: ${bgColor}`,\n `color: ${textColor}`,\n \"border: none\",\n ].join(\"; \");\n }\n}\n\n/**\n * Resolve all navbar styles from block props\n *\n * @param props - Block props from navbar\n * @param blockId - Unique block ID for scoping CSS\n * @param theme - Theme tokens for palette colors\n * @returns Resolved inline style strings and dynamic CSS\n */\nexport function resolveNavbarStyles(props: Record<string, any>, blockId: string, theme?: any): NavbarResolvedStyles {\n // Use theme colors if available, otherwise use defaults\n const themePrimaryColor = theme?.colors?.primary || navbarDefaults.buttonColor;\n const themePrimaryText = theme?.colors?.primaryText || navbarDefaults.buttonTextColor;\n\n // Priorizar menuLinkColor da paleta (cor específica para links do menu)\n // menuLinkColor já vem otimizado para contraste, então não precisa verificação adicional\n const themeLinkColor = theme?.colors?.menuLinkColor || theme?.colors?.primary || navbarDefaults.linkColor;\n\n // Usar a cor do tema diretamente (menuLinkColor já foi calculado para ter contraste adequado)\n const safeLinkColor = themeLinkColor;\n\n // Merge props with defaults (theme-aware)\n const {\n opacity = navbarDefaults.opacity,\n blurOpacity = 15,\n borderRadius = navbarDefaults.borderRadius,\n shadow = navbarDefaults.shadow,\n linkColor = safeLinkColor,\n linkFontSize = navbarDefaults.linkFontSize,\n linkHoverEffect = \"background\",\n linkHoverIntensity = 50,\n buttonColor = themePrimaryColor,\n buttonTextColor = themePrimaryText,\n buttonBorderRadius = navbarDefaults.buttonBorderRadius,\n buttonVariant = navbarDefaults.buttonVariant,\n buttonSize = \"md\",\n buttonHoverEffect = \"darken\",\n buttonHoverIntensity = 50,\n buttonHoverOverlay = \"none\",\n buttonHoverIconName = \"arrow-right\",\n floating = false,\n sticky = true,\n transparent = false,\n variation = \"navbar-classic\",\n layout = \"expanded\",\n } = props;\n\n const isMinimal = variation === \"navbar-minimal\";\n const isCompact = layout === \"compact\";\n\n // Resolve nav styles\n const navStyles: string[] = [];\n const cssRules: string[] = [];\n\n // Navbar height - compact is 20% smaller (3.6rem vs 4.5rem)\n navStyles.push(`height: ${isCompact ? \"3.6rem\" : \"4.5rem\"}`);\n\n // Determine effective background\n const rawBg = props.bg;\n const effectiveBg = rawBg !== undefined ? rawBg : (transparent ? \"transparent\" : navbarDefaults.bg);\n\n // Apply background\n if (effectiveBg === \"transparent\") {\n navStyles.push(\"background-color: transparent\");\n } else {\n const isGradient = effectiveBg.includes(\"gradient\") ||\n effectiveBg.includes(\"linear\") ||\n effectiveBg.includes(\"radial\");\n\n if (isGradient) {\n navStyles.push(`background: ${effectiveBg}`);\n if (opacity < 100) {\n navStyles.push(`opacity: ${opacity / 100}`);\n }\n } else {\n // Apply background with user-chosen opacity\n const bgWithOpacity = applyOpacityToColor(effectiveBg, opacity);\n navStyles.push(`background-color: ${bgWithOpacity}`);\n }\n }\n\n // Apply blur intensity as CSS variable for glass effect (ALWAYS, independent of positioning)\n // Convert 0-100 to 0px-30px blur amount\n const blurAmount = Math.round((blurOpacity / 100) * 30); // 0-30px\n const blurBgOpacity = blurOpacity / 100; // 0-1 opacity for frosted glass effect (0% to 100%)\n navStyles.push(`--navbar-blur-amount: ${blurAmount}px`);\n navStyles.push(`--navbar-blur-opacity: ${blurBgOpacity}`);\n\n // Layout specific logic (positioning, not styles)\n if (floating) {\n // Floating navbar - fixed with margins\n navStyles.push(\"position: fixed\");\n navStyles.push(\"top: 20px\");\n navStyles.push(\"left: 20px\");\n navStyles.push(\"right: 20px\");\n navStyles.push(\"width: calc(100% - 40px)\");\n navStyles.push(\"z-index: 1000\");\n\n const effectiveRadius = Math.max(borderRadius, 12);\n if (effectiveRadius > 0) {\n navStyles.push(`border-radius: ${effectiveRadius}px`);\n }\n } else if (sticky) {\n // Sticky navbar - fixed at top, scrolls content only\n console.log('[NavbarStyles] Applying fixed position: sticky=true, floating=false');\n navStyles.push(\"position: fixed\");\n navStyles.push(\"top: 0\");\n navStyles.push(\"left: 0\");\n navStyles.push(\"right: 0\");\n navStyles.push(\"width: 100%\");\n navStyles.push(\"z-index: 1000\");\n\n if (borderRadius > 0) {\n navStyles.push(`border-bottom-left-radius: ${borderRadius}px`);\n navStyles.push(`border-bottom-right-radius: ${borderRadius}px`);\n }\n } else {\n // Non-sticky navbar - absolute position, scrolls with page but stays on top of hero\n console.log('[NavbarStyles] Applying absolute position: sticky=false, floating=false');\n navStyles.push(\"position: absolute\");\n navStyles.push(\"top: 0\");\n navStyles.push(\"left: 0\");\n navStyles.push(\"right: 0\");\n navStyles.push(\"width: 100%\");\n navStyles.push(\"z-index: 1000\");\n\n if (borderRadius > 0) {\n navStyles.push(`border-bottom-left-radius: ${borderRadius}px`);\n navStyles.push(`border-bottom-right-radius: ${borderRadius}px`);\n }\n }\n\n // Shadow\n // For classic/minimal, shadow behaves normally\n const shadowValue = shadowValues[shadow] || shadowValues.sm;\n if (shadow !== \"none\") {\n navStyles.push(`box-shadow: ${shadowValue}`);\n }\n\n // Padding adjustments\n if (isMinimal) {\n navStyles.push(\"padding: 0.5rem 1rem\"); // Smaller padding\n } else {\n // handled by exportHtml defaults usually, but we can enforce\n }\n\n // Resolve link styles\n // Transição mais longa para efeitos animados de underline\n const transitionDuration = (linkHoverEffect === \"underline\" || linkHoverEffect === \"underline-center\" || linkHoverEffect === \"slide-bg\")\n ? \"0.3s\"\n : \"0.2s\";\n\n // Link font size - compact mode uses smaller sizes\n const getLinkFontSize = () => {\n if (isMinimal || isCompact) return fontSizes.sm;\n return fontSizes[linkFontSize] || fontSizes.md;\n };\n\n // Link padding - compact mode uses smaller padding\n const linkPadding = isCompact ? \"0.375rem 0.5rem\" : \"0.5rem 0.75rem\";\n\n const linkStyles = [\n `color: ${linkColor}`,\n `font-size: ${getLinkFontSize()}`,\n \"text-decoration: none\",\n `font-weight: ${isCompact ? \"400\" : \"500\"}`,\n `transition: all ${transitionDuration} ease`,\n `padding: ${linkPadding}`,\n \"border-radius: 6px\",\n \"display: inline-block\",\n ];\n\n // Hover Effects CSS\n // Generate a unique selector based on blockId\n const scope = `[data-block-id=\"${blockId}\"]`;\n\n // Get linkHoverColor from props (default to buttonColor for backwards compatibility)\n const linkHoverColor = props.linkHoverColor || buttonColor;\n\n // Link Hover - gerar CSS baseado no efeito selecionado\n // Nota: normalização de intensidade é feita internamente pelo módulo hoverEffects\n const linkHoverResult = generateLinkHoverStyles({\n effect: linkHoverEffect as any,\n intensity: linkHoverIntensity,\n hoverColor: linkHoverColor,\n });\n\n // Adicionar estilos base se necessário (para animações como underline)\n if (linkHoverResult.base) {\n cssRules.push(`\n ${scope} .sg-navbar__link {\n ${linkHoverResult.base}\n }\n `);\n }\n\n cssRules.push(`\n ${scope} .sg-navbar__link:hover {\n ${linkHoverResult.hover}\n }\n `);\n\n // Button Hover - gerar CSS baseado no efeito selecionado\n const buttonHoverResult = generateButtonHoverStyles({\n effect: buttonHoverEffect as any,\n intensity: buttonHoverIntensity,\n buttonColor,\n buttonTextColor,\n variant: buttonVariant as any,\n });\n\n // Adicionar estilos base se necessário (para animações como pulse, shine)\n if (buttonHoverResult.base) {\n cssRules.push(`\n ${scope} .sg-navbar__btn {\n ${buttonHoverResult.base}\n }\n `);\n }\n\n cssRules.push(`\n ${scope} .sg-navbar__btn:hover {\n ${buttonHoverResult.hover}\n }\n `);\n\n // Adicionar keyframes para animações (pulse)\n cssRules.push(getButtonHoverKeyframes());\n\n // Adicionar CSS para efeito overlay (se configurado)\n if (buttonHoverOverlay && buttonHoverOverlay !== \"none\") {\n cssRules.push(generateButtonOverlayCSS(`${scope} .sg-navbar__btn`, {\n overlay: buttonHoverOverlay as ButtonHoverOverlay,\n primaryColor: buttonColor,\n iconName: buttonHoverIconName,\n textColor: buttonTextColor,\n }));\n }\n\n // Resolve button styles based on buttonSize prop\n const buttonSizeStyles: Record<string, { padding: string; fontSize: string }> = {\n sm: { padding: \"0.375rem 0.875rem\", fontSize: \"0.875rem\" },\n md: { padding: \"0.5rem 1rem\", fontSize: \"1rem\" },\n lg: { padding: \"0.625rem 1.25rem\", fontSize: \"1.125rem\" },\n };\n\n // Use buttonSize from props, fallback to sm for minimal or compact variations\n const effectiveButtonSize = (isMinimal || isCompact) ? \"sm\" : buttonSize;\n const btnSizeConfig = buttonSizeStyles[effectiveButtonSize] || buttonSizeStyles.md;\n const btnPadding = btnSizeConfig.padding;\n const btnSize = btnSizeConfig.fontSize;\n\n const buttonStyle = resolveButtonStyle(\n buttonVariant,\n buttonColor,\n buttonTextColor,\n buttonBorderRadius,\n btnPadding,\n btnSize\n );\n\n // Resolve brand text styles\n const brandTextStyles = [\n `color: ${buttonColor}`,\n \"font-weight: 700\",\n \"font-size: 1.25rem\",\n ];\n\n // Resolve dropdown styles - herda EXATAMENTE a mesma opacidade/blur da navbar\n // NOTA: backdrop-filter é aplicado via CSS: .sg-navbar--sticky .sg-navbar-dropdown\n const dropdownBg = applyOpacityToColor(effectiveBg === \"transparent\" ? navbarDefaults.bg : effectiveBg, opacity);\n\n const dropdownStyles = [\n // Background via CSS variable - o ::before usa essa variável e começa após o hover bridge\n `--dropdown-bg: ${dropdownBg}`,\n `--dropdown-radius: ${borderRadius}px`,\n `border-radius: ${borderRadius}px`,\n \"min-width: 220px\",\n \"padding: 0.5rem 0\",\n ];\n\n // Resolve dropdown item styles - herda linkColor\n const linkFontSizeValue = fontSizes[linkFontSize] || fontSizes.md;\n const dropdownItemStyles = [\n `color: ${linkColor}`,\n `font-size: ${linkFontSizeValue}`,\n \"text-decoration: none\",\n \"font-weight: 500\",\n \"padding: 0.75rem 1.25rem\",\n \"display: block\",\n \"white-space: nowrap\",\n \"transition: background-color 0.2s ease, color 0.2s ease\",\n ];\n\n // Dropdown item hover CSS - usa mesma lógica dos links com fundo sutil\n const dropdownHoverBg = linkHoverColor.startsWith('#')\n ? `${linkHoverColor}15` // Adiciona 15 no final (opacity ~8%)\n : linkHoverColor.replace('rgb(', 'rgba(').replace(')', ', 0.08)');\n\n cssRules.push(`\n ${scope} .sg-navbar-dropdown__item:hover {\n background-color: ${dropdownHoverBg} !important;\n color: ${linkHoverColor} !important;\n transition: background-color 0.2s ease, color 0.2s ease;\n }\n `);\n\n return {\n nav: navStyles.join(\"; \"),\n link: linkStyles.join(\"; \"),\n button: buttonStyle,\n brandText: brandTextStyles.join(\"; \"),\n dropdown: dropdownStyles.join(\"; \"),\n dropdownItem: dropdownItemStyles.join(\"; \"),\n css: cssRules.join(\"\\n\"),\n };\n}\n\n/**\n * Resolve hero button styles based on theme\n */\nexport function resolveHeroButtonStyles(theme?: any, _blockId?: string): { primary: string; secondary: string; css: string } {\n const primaryColor = theme?.colors?.primary || \"#3b82f6\";\n const primaryText = theme?.colors?.primaryText || \"#ffffff\";\n\n const primaryStyles = [\n `background-color: ${primaryColor}`,\n `color: ${primaryText}`,\n \"padding: 0.875rem 2rem\",\n \"border-radius: 0.5rem\",\n \"font-weight: 600\",\n \"font-size: 1rem\",\n \"text-decoration: none\",\n \"display: inline-block\",\n \"transition: all 0.2s ease\",\n \"border: none\",\n ].join(\"; \");\n\n const secondaryStyles = [\n \"background-color: transparent\",\n `color: ${primaryColor}`,\n \"padding: 0.875rem 2rem\",\n \"border-radius: 0.5rem\",\n \"font-weight: 600\",\n \"font-size: 1rem\",\n \"text-decoration: none\",\n \"display: inline-block\",\n \"transition: all 0.2s ease\",\n `border: 2px solid ${primaryColor}`,\n ].join(\"; \");\n\n // Hover effects are now controlled by the hover effects system\n // This function returns empty CSS - use resolveHeroButtonStylesWithHover for hover effects\n return {\n primary: primaryStyles,\n secondary: secondaryStyles,\n css: \"\",\n };\n}\n\n/**\n * Convert a color to rgba with opacity\n * Supports hex (#fff, #ffffff) and rgb() formats\n */\nexport function applyOpacityToColor(color: string, opacity: number): string {\n if (opacity >= 100) return color;\n\n const alpha = opacity / 100;\n\n // Handle hex colors\n if (color.startsWith(\"#\")) {\n let hex = color.slice(1);\n\n // Convert 3-char hex to 6-char\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n\n const r = parseInt(hex.slice(0, 2), 16);\n const g = parseInt(hex.slice(2, 4), 16);\n const b = parseInt(hex.slice(4, 6), 16);\n\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n }\n\n // Handle rgb() colors\n if (color.startsWith(\"rgb(\")) {\n const match = color.match(/rgb\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/);\n if (match) {\n return `rgba(${match[1]}, ${match[2]}, ${match[3]}, ${alpha})`;\n }\n }\n\n // Handle rgba() - just update alpha\n if (color.startsWith(\"rgba(\")) {\n return color.replace(/,\\s*[\\d.]+\\s*\\)$/, `, ${alpha})`);\n }\n\n // Fallback: use CSS opacity (not ideal for backgrounds)\n return color;\n}\n\n// ============================================================================\n// UTILITY FUNCTIONS\n// ============================================================================\n\n/**\n * Convert style object to inline style string\n */\nexport function styleObjectToString(styles: Record<string, string | number | undefined>): string {\n return Object.entries(styles)\n .filter(([, value]) => value !== undefined && value !== \"\")\n .map(([key, value]) => {\n // Convert camelCase to kebab-case\n const cssKey = key.replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return `${cssKey}: ${value}`;\n })\n .join(\"; \");\n}\n\n/**\n * Merge multiple style strings\n */\nexport function mergeStyles(...styles: (string | undefined)[]): string {\n return styles\n .filter(Boolean)\n .join(\"; \")\n .replace(/;+/g, \";\")\n .replace(/;\\s*$/, \"\");\n}\n\n/**\n * Convert inline style string to React CSSProperties object\n */\nexport function styleStringToReactStyle(styleString: string): any {\n if (!styleString) return {};\n\n return styleString\n .split(\";\")\n .reduce((acc, rule) => {\n const [rawKey, rawValue] = rule.split(\":\");\n const key = rawKey?.trim();\n const value = rawValue?.trim();\n\n if (key && value) {\n // ✅ Não camelCase CSS variables (React precisa da chave EXATA)\n if (key.startsWith(\"--\")) {\n acc[key] = value;\n } else {\n // Convert kebab-case to camelCase\n const camelKey = key.replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n acc[camelKey] = value;\n }\n }\n return acc;\n }, {} as any);\n}\n"],"names":["shadowValues","fontSizes","navbarDefaults","resolveButtonStyle","variant","bgColor","textColor","borderRadius","padding","fontSize","baseStyles","resolveNavbarStyles","props","blockId","theme","themePrimaryColor","themePrimaryText","safeLinkColor","opacity","blurOpacity","shadow","linkColor","linkFontSize","linkHoverEffect","linkHoverIntensity","buttonColor","buttonTextColor","buttonBorderRadius","buttonVariant","buttonSize","buttonHoverEffect","buttonHoverIntensity","buttonHoverOverlay","buttonHoverIconName","floating","sticky","transparent","variation","layout","isMinimal","isCompact","navStyles","cssRules","rawBg","effectiveBg","bgWithOpacity","applyOpacityToColor","blurAmount","blurBgOpacity","effectiveRadius","shadowValue","transitionDuration","getLinkFontSize","linkPadding","linkStyles","scope","linkHoverColor","linkHoverResult","generateLinkHoverStyles","buttonHoverResult","generateButtonHoverStyles","getButtonHoverKeyframes","generateButtonOverlayCSS","buttonSizeStyles","btnSizeConfig","btnPadding","btnSize","buttonStyle","brandTextStyles","dropdownStyles","linkFontSizeValue","dropdownItemStyles","dropdownHoverBg","color","alpha","hex","r","g","b","match","mergeStyles","styles","styleStringToReactStyle","styleString","acc","rule","rawKey","rawValue","key","value","camelKey"],"mappings":";;AAgCO,MAAMA,IAAuC;AAAA,EAChD,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAA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,OAAO,CAACC,GAAKC,MAAS;AACnB,UAAM,CAACC,GAAQC,CAAQ,IAAIF,EAAK,MAAM,GAAG,GACnCG,IAAMF,GAAQ,KAAA,GACdG,IAAQF,GAAU,KAAA;AAExB,QAAIC,KAAOC;AAEP,UAAID,EAAI,WAAW,IAAI;AACnB,QAAAJ,EAAII,CAAG,IAAIC;AAAA,WACR;AAEH,cAAMC,IAAWF,EAAI,QAAQ,aAAa,CAACX,MAAMA,EAAE,CAAC,EAAE,aAAa;AACnE,QAAAO,EAAIM,CAAQ,IAAID;AAAA,MACpB;AAEJ,WAAOL;AAAA,EACX,GAAG,CAAA,CAAS,IApBS,CAAA;AAqB7B;"}
|
|
1
|
+
{"version":3,"file":"styleResolver.js","sources":["../../../src/engine/export/styleResolver.ts"],"sourcesContent":["/**\n * Style Resolver\n *\n * Sistema centralizado de resolução de estilos que combina\n * valores default com customizações do usuário, gerando\n * estilos inline completos para HTML export.\n */\n\n// Import hover effects from shared module\nimport {\n generateLinkHoverStyles,\n generateButtonHoverStyles,\n generateButtonOverlayCSS,\n getButtonHoverKeyframes,\n hexToRgb,\n hexToRgba,\n adjustColor,\n type LinkHoverConfig,\n type ButtonHoverConfig,\n type ButtonHoverOverlay,\n} from \"../shared/hoverEffects\";\nimport { logger } from \"../../utils/logger\";\n\n// Re-export for backwards compatibility\nexport { hexToRgb, hexToRgba, adjustColor };\n\n// ============================================================================\n// CONSTANTS\n// ============================================================================\n\n/**\n * Shadow values mapping\n */\nexport const shadowValues: Record<string, string> = {\n none: \"none\",\n sm: \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n md: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)\",\n lg: \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)\",\n xl: \"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)\",\n};\n\n/**\n * Font size values mapping\n */\nexport const fontSizes: Record<string, string> = {\n sm: \"0.875rem\",\n md: \"1rem\",\n lg: \"1.125rem\",\n};\n\n// ============================================================================\n// NAVBAR STYLE RESOLVER\n// ============================================================================\n\n/**\n * Resolved styles for navbar components\n */\nexport interface NavbarResolvedStyles {\n /** Styles for the nav element */\n nav: string;\n /** Styles for navigation links */\n link: string;\n /** Styles for the CTA button */\n button: string;\n /** Styles for the brand text */\n brandText: string;\n /** Styles for dropdown container */\n dropdown: string;\n /** Styles for dropdown items */\n dropdownItem: string;\n /** Dynamic CSS block for hover states and media queries */\n css: string;\n}\n\n/**\n * Default navbar styles (garantem aparência mesmo sem CSS externo)\n */\nconst navbarDefaults = {\n bg: \"#ffffff\",\n opacity: 100,\n borderRadius: 0,\n shadow: \"sm\" as const,\n linkColor: \"#1f2937\",\n linkFontSize: \"md\" as const,\n buttonColor: \"#3b82f6\",\n buttonTextColor: \"#ffffff\",\n buttonBorderRadius: 8,\n buttonVariant: \"solid\" as const,\n};\n\n/**\n * Resolve button styles based on variant\n */\nfunction resolveButtonStyle(\n variant: string,\n bgColor: string,\n textColor: string,\n borderRadius: number,\n padding: string = \"0.5rem 1rem\",\n fontSize: string = \"1rem\",\n): string {\n const baseStyles = [\n `padding: ${padding}`,\n `font-size: ${fontSize}`,\n `border-radius: ${borderRadius}px`,\n \"text-decoration: none\",\n \"font-weight: 500\",\n \"display: inline-block\",\n \"transition: all 0.2s ease\",\n \"cursor: pointer\",\n \"position: relative\", // Needed for shine effect\n \"overflow: hidden\", // Needed for shine effect\n ];\n\n switch (variant) {\n case \"outline\":\n return [\n ...baseStyles,\n \"background-color: transparent\",\n `color: ${bgColor}`,\n `border: 2px solid ${bgColor}`,\n ].join(\"; \");\n\n case \"ghost\":\n return [\n ...baseStyles,\n \"background-color: transparent\",\n `color: ${bgColor}`,\n \"border: none\",\n ].join(\"; \");\n\n case \"solid\":\n default:\n return [\n ...baseStyles,\n `background-color: ${bgColor}`,\n `color: ${textColor}`,\n \"border: none\",\n ].join(\"; \");\n }\n}\n\n/**\n * Resolve all navbar styles from block props\n *\n * @param props - Block props from navbar\n * @param blockId - Unique block ID for scoping CSS\n * @param theme - Theme tokens for palette colors\n * @returns Resolved inline style strings and dynamic CSS\n */\nexport function resolveNavbarStyles(props: Record<string, any>, blockId: string, theme?: any): NavbarResolvedStyles {\n // Use theme colors if available, otherwise use defaults\n const themePrimaryColor = theme?.colors?.primary || navbarDefaults.buttonColor;\n const themePrimaryText = theme?.colors?.primaryText || navbarDefaults.buttonTextColor;\n\n // Priorizar menuLinkColor da paleta (cor específica para links do menu)\n // menuLinkColor já vem otimizado para contraste, então não precisa verificação adicional\n const themeLinkColor = theme?.colors?.menuLinkColor || theme?.colors?.primary || navbarDefaults.linkColor;\n\n // Usar a cor do tema diretamente (menuLinkColor já foi calculado para ter contraste adequado)\n const safeLinkColor = themeLinkColor;\n\n // Merge props with defaults (theme-aware)\n const {\n opacity = navbarDefaults.opacity,\n blurOpacity = 15,\n borderRadius = navbarDefaults.borderRadius,\n shadow = navbarDefaults.shadow,\n linkColor = safeLinkColor,\n linkFontSize = navbarDefaults.linkFontSize,\n linkHoverEffect = \"background\",\n linkHoverIntensity = 50,\n buttonColor = themePrimaryColor,\n buttonTextColor = themePrimaryText,\n buttonBorderRadius = navbarDefaults.buttonBorderRadius,\n buttonVariant = navbarDefaults.buttonVariant,\n buttonSize = \"md\",\n buttonHoverEffect = \"darken\",\n buttonHoverIntensity = 50,\n buttonHoverOverlay = \"none\",\n buttonHoverIconName = \"arrow-right\",\n floating = false,\n sticky = true,\n transparent = false,\n variation = \"navbar-classic\",\n layout = \"expanded\",\n } = props;\n\n const isMinimal = variation === \"navbar-minimal\";\n const isCompact = layout === \"compact\";\n\n // Resolve nav styles\n const navStyles: string[] = [];\n const cssRules: string[] = [];\n\n // Navbar height - compact is 20% smaller (3.6rem vs 4.5rem)\n navStyles.push(`height: ${isCompact ? \"3.6rem\" : \"4.5rem\"}`);\n\n // Determine effective background\n const rawBg = props.bg;\n const effectiveBg = rawBg !== undefined ? rawBg : (transparent ? \"transparent\" : navbarDefaults.bg);\n\n // Apply background\n if (effectiveBg === \"transparent\") {\n navStyles.push(\"background-color: transparent\");\n } else {\n const isGradient = effectiveBg.includes(\"gradient\") ||\n effectiveBg.includes(\"linear\") ||\n effectiveBg.includes(\"radial\");\n\n if (isGradient) {\n navStyles.push(`background: ${effectiveBg}`);\n if (opacity < 100) {\n navStyles.push(`opacity: ${opacity / 100}`);\n }\n } else {\n // Apply background with user-chosen opacity\n const bgWithOpacity = applyOpacityToColor(effectiveBg, opacity);\n navStyles.push(`background-color: ${bgWithOpacity}`);\n }\n }\n\n // Apply blur intensity as CSS variable for glass effect (ALWAYS, independent of positioning)\n // Convert 0-100 to 0px-30px blur amount\n const blurAmount = Math.round((blurOpacity / 100) * 30); // 0-30px\n const blurBgOpacity = blurOpacity / 100; // 0-1 opacity for frosted glass effect (0% to 100%)\n navStyles.push(`--navbar-blur-amount: ${blurAmount}px`);\n navStyles.push(`--navbar-blur-opacity: ${blurBgOpacity}`);\n\n // Layout specific logic (positioning, not styles)\n if (floating) {\n // Floating navbar - fixed with margins\n navStyles.push(\"position: fixed\");\n navStyles.push(\"top: 20px\");\n navStyles.push(\"left: 20px\");\n navStyles.push(\"right: 20px\");\n navStyles.push(\"width: calc(100% - 40px)\");\n navStyles.push(\"z-index: 1000\");\n\n const effectiveRadius = Math.max(borderRadius, 12);\n if (effectiveRadius > 0) {\n navStyles.push(`border-radius: ${effectiveRadius}px`);\n }\n } else if (sticky) {\n // Sticky navbar - fixed at top, scrolls content only\n navStyles.push(\"position: fixed\");\n navStyles.push(\"top: 0\");\n navStyles.push(\"left: 0\");\n navStyles.push(\"right: 0\");\n navStyles.push(\"width: 100%\");\n navStyles.push(\"z-index: 1000\");\n\n if (borderRadius > 0) {\n navStyles.push(`border-bottom-left-radius: ${borderRadius}px`);\n navStyles.push(`border-bottom-right-radius: ${borderRadius}px`);\n }\n } else {\n // Non-sticky navbar - absolute position, scrolls with page but stays on top of hero\n navStyles.push(\"position: absolute\");\n navStyles.push(\"top: 0\");\n navStyles.push(\"left: 0\");\n navStyles.push(\"right: 0\");\n navStyles.push(\"width: 100%\");\n navStyles.push(\"z-index: 1000\");\n\n if (borderRadius > 0) {\n navStyles.push(`border-bottom-left-radius: ${borderRadius}px`);\n navStyles.push(`border-bottom-right-radius: ${borderRadius}px`);\n }\n }\n\n // Shadow\n // For classic/minimal, shadow behaves normally\n const shadowValue = shadowValues[shadow] || shadowValues.sm;\n if (shadow !== \"none\") {\n navStyles.push(`box-shadow: ${shadowValue}`);\n }\n\n // Padding adjustments\n if (isMinimal) {\n navStyles.push(\"padding: 0.5rem 1rem\"); // Smaller padding\n } else {\n // handled by exportHtml defaults usually, but we can enforce\n }\n\n // Resolve link styles\n // Transição mais longa para efeitos animados de underline\n const transitionDuration = (linkHoverEffect === \"underline\" || linkHoverEffect === \"underline-center\" || linkHoverEffect === \"slide-bg\")\n ? \"0.3s\"\n : \"0.2s\";\n\n // Link font size - compact mode uses smaller sizes\n const getLinkFontSize = () => {\n if (isMinimal || isCompact) return fontSizes.sm;\n return fontSizes[linkFontSize] || fontSizes.md;\n };\n\n // Link padding - compact mode uses smaller padding\n const linkPadding = isCompact ? \"0.375rem 0.5rem\" : \"0.5rem 0.75rem\";\n\n const linkStyles = [\n `color: ${linkColor}`,\n `font-size: ${getLinkFontSize()}`,\n \"text-decoration: none\",\n `font-weight: ${isCompact ? \"400\" : \"500\"}`,\n `transition: all ${transitionDuration} ease`,\n `padding: ${linkPadding}`,\n \"border-radius: 6px\",\n \"display: inline-block\",\n ];\n\n // Hover Effects CSS\n // Generate a unique selector based on blockId\n const scope = `[data-block-id=\"${blockId}\"]`;\n\n // Get linkHoverColor from props (default to buttonColor for backwards compatibility)\n const linkHoverColor = props.linkHoverColor || buttonColor;\n\n // Link Hover - gerar CSS baseado no efeito selecionado\n // Nota: normalização de intensidade é feita internamente pelo módulo hoverEffects\n const linkHoverResult = generateLinkHoverStyles({\n effect: linkHoverEffect as any,\n intensity: linkHoverIntensity,\n hoverColor: linkHoverColor,\n });\n\n // Adicionar estilos base se necessário (para animações como underline)\n if (linkHoverResult.base) {\n cssRules.push(`\n ${scope} .sg-navbar__link {\n ${linkHoverResult.base}\n }\n `);\n }\n\n cssRules.push(`\n ${scope} .sg-navbar__link:hover {\n ${linkHoverResult.hover}\n }\n `);\n\n // Button Hover - gerar CSS baseado no efeito selecionado\n const buttonHoverResult = generateButtonHoverStyles({\n effect: buttonHoverEffect as any,\n intensity: buttonHoverIntensity,\n buttonColor,\n buttonTextColor,\n variant: buttonVariant as any,\n });\n\n // Adicionar estilos base se necessário (para animações como pulse, shine)\n if (buttonHoverResult.base) {\n cssRules.push(`\n ${scope} .sg-navbar__btn {\n ${buttonHoverResult.base}\n }\n `);\n }\n\n cssRules.push(`\n ${scope} .sg-navbar__btn:hover {\n ${buttonHoverResult.hover}\n }\n `);\n\n // Adicionar keyframes para animações (pulse)\n cssRules.push(getButtonHoverKeyframes());\n\n // Adicionar CSS para efeito overlay (se configurado)\n if (buttonHoverOverlay && buttonHoverOverlay !== \"none\") {\n cssRules.push(generateButtonOverlayCSS(`${scope} .sg-navbar__btn`, {\n overlay: buttonHoverOverlay as ButtonHoverOverlay,\n primaryColor: buttonColor,\n iconName: buttonHoverIconName,\n textColor: buttonTextColor,\n }));\n }\n\n // Resolve button styles based on buttonSize prop\n const buttonSizeStyles: Record<string, { padding: string; fontSize: string }> = {\n sm: { padding: \"0.375rem 0.875rem\", fontSize: \"0.875rem\" },\n md: { padding: \"0.5rem 1rem\", fontSize: \"1rem\" },\n lg: { padding: \"0.625rem 1.25rem\", fontSize: \"1.125rem\" },\n };\n\n // Use buttonSize from props, fallback to sm for minimal or compact variations\n const effectiveButtonSize = (isMinimal || isCompact) ? \"sm\" : buttonSize;\n const btnSizeConfig = buttonSizeStyles[effectiveButtonSize] || buttonSizeStyles.md;\n const btnPadding = btnSizeConfig.padding;\n const btnSize = btnSizeConfig.fontSize;\n\n const buttonStyle = resolveButtonStyle(\n buttonVariant,\n buttonColor,\n buttonTextColor,\n buttonBorderRadius,\n btnPadding,\n btnSize\n );\n\n // Resolve brand text styles\n const brandTextStyles = [\n `color: ${buttonColor}`,\n \"font-weight: 700\",\n \"font-size: 1.25rem\",\n ];\n\n // Resolve dropdown styles - herda EXATAMENTE a mesma opacidade/blur da navbar\n // NOTA: backdrop-filter é aplicado via CSS: .sg-navbar--sticky .sg-navbar-dropdown\n const dropdownBg = applyOpacityToColor(effectiveBg === \"transparent\" ? navbarDefaults.bg : effectiveBg, opacity);\n\n const dropdownStyles = [\n // Background via CSS variable - o ::before usa essa variável e começa após o hover bridge\n `--dropdown-bg: ${dropdownBg}`,\n `--dropdown-radius: ${borderRadius}px`,\n `border-radius: ${borderRadius}px`,\n \"min-width: 220px\",\n \"padding: 0.5rem 0\",\n ];\n\n // Resolve dropdown item styles - herda linkColor\n const linkFontSizeValue = fontSizes[linkFontSize] || fontSizes.md;\n const dropdownItemStyles = [\n `color: ${linkColor}`,\n `font-size: ${linkFontSizeValue}`,\n \"text-decoration: none\",\n \"font-weight: 500\",\n \"padding: 0.75rem 1.25rem\",\n \"display: block\",\n \"white-space: nowrap\",\n \"transition: background-color 0.2s ease, color 0.2s ease\",\n ];\n\n // Dropdown item hover CSS - usa mesma lógica dos links com fundo sutil\n const dropdownHoverBg = linkHoverColor.startsWith('#')\n ? `${linkHoverColor}15` // Adiciona 15 no final (opacity ~8%)\n : linkHoverColor.replace('rgb(', 'rgba(').replace(')', ', 0.08)');\n\n cssRules.push(`\n ${scope} .sg-navbar-dropdown__item:hover {\n background-color: ${dropdownHoverBg} !important;\n color: ${linkHoverColor} !important;\n transition: background-color 0.2s ease, color 0.2s ease;\n }\n `);\n\n return {\n nav: navStyles.join(\"; \"),\n link: linkStyles.join(\"; \"),\n button: buttonStyle,\n brandText: brandTextStyles.join(\"; \"),\n dropdown: dropdownStyles.join(\"; \"),\n dropdownItem: dropdownItemStyles.join(\"; \"),\n css: cssRules.join(\"\\n\"),\n };\n}\n\n/**\n * Resolve hero button styles based on theme\n */\nexport function resolveHeroButtonStyles(theme?: any, _blockId?: string): { primary: string; secondary: string; css: string } {\n const primaryColor = theme?.colors?.primary || \"#3b82f6\";\n const primaryText = theme?.colors?.primaryText || \"#ffffff\";\n\n const primaryStyles = [\n `background-color: ${primaryColor}`,\n `color: ${primaryText}`,\n \"padding: 0.875rem 2rem\",\n \"border-radius: 0.5rem\",\n \"font-weight: 600\",\n \"font-size: 1rem\",\n \"text-decoration: none\",\n \"display: inline-block\",\n \"transition: all 0.2s ease\",\n \"border: none\",\n ].join(\"; \");\n\n const secondaryStyles = [\n \"background-color: transparent\",\n `color: ${primaryColor}`,\n \"padding: 0.875rem 2rem\",\n \"border-radius: 0.5rem\",\n \"font-weight: 600\",\n \"font-size: 1rem\",\n \"text-decoration: none\",\n \"display: inline-block\",\n \"transition: all 0.2s ease\",\n `border: 2px solid ${primaryColor}`,\n ].join(\"; \");\n\n // Hover effects are now controlled by the hover effects system\n // This function returns empty CSS - use resolveHeroButtonStylesWithHover for hover effects\n return {\n primary: primaryStyles,\n secondary: secondaryStyles,\n css: \"\",\n };\n}\n\n/**\n * Convert a color to rgba with opacity\n * Supports hex (#fff, #ffffff) and rgb() formats\n */\nexport function applyOpacityToColor(color: string, opacity: number): string {\n if (opacity >= 100) return color;\n\n const alpha = opacity / 100;\n\n // Handle hex colors\n if (color.startsWith(\"#\")) {\n let hex = color.slice(1);\n\n // Convert 3-char hex to 6-char\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n\n const r = parseInt(hex.slice(0, 2), 16);\n const g = parseInt(hex.slice(2, 4), 16);\n const b = parseInt(hex.slice(4, 6), 16);\n\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n }\n\n // Handle rgb() colors\n if (color.startsWith(\"rgb(\")) {\n const match = color.match(/rgb\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/);\n if (match) {\n return `rgba(${match[1]}, ${match[2]}, ${match[3]}, ${alpha})`;\n }\n }\n\n // Handle rgba() - just update alpha\n if (color.startsWith(\"rgba(\")) {\n return color.replace(/,\\s*[\\d.]+\\s*\\)$/, `, ${alpha})`);\n }\n\n // Fallback: use CSS opacity (not ideal for backgrounds)\n return color;\n}\n\n// ============================================================================\n// UTILITY FUNCTIONS\n// ============================================================================\n\n/**\n * Convert style object to inline style string\n */\nexport function styleObjectToString(styles: Record<string, string | number | undefined>): string {\n return Object.entries(styles)\n .filter(([, value]) => value !== undefined && value !== \"\")\n .map(([key, value]) => {\n // Convert camelCase to kebab-case\n const cssKey = key.replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return `${cssKey}: ${value}`;\n })\n .join(\"; \");\n}\n\n/**\n * Merge multiple style strings\n */\nexport function mergeStyles(...styles: (string | undefined)[]): string {\n return styles\n .filter(Boolean)\n .join(\"; \")\n .replace(/;+/g, \";\")\n .replace(/;\\s*$/, \"\");\n}\n\n/**\n * Convert inline style string to React CSSProperties object\n */\nexport function styleStringToReactStyle(styleString: string): any {\n if (!styleString) return {};\n\n return styleString\n .split(\";\")\n .reduce((acc, rule) => {\n const [rawKey, rawValue] = rule.split(\":\");\n const key = rawKey?.trim();\n const value = rawValue?.trim();\n\n if (key && value) {\n // ✅ Não camelCase CSS variables (React precisa da chave EXATA)\n if (key.startsWith(\"--\")) {\n acc[key] = value;\n } else {\n // Convert kebab-case to camelCase\n const camelKey = key.replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n acc[camelKey] = value;\n }\n }\n return acc;\n }, {} as any);\n}\n"],"names":["shadowValues","fontSizes","navbarDefaults","resolveButtonStyle","variant","bgColor","textColor","borderRadius","padding","fontSize","baseStyles","resolveNavbarStyles","props","blockId","theme","themePrimaryColor","themePrimaryText","safeLinkColor","opacity","blurOpacity","shadow","linkColor","linkFontSize","linkHoverEffect","linkHoverIntensity","buttonColor","buttonTextColor","buttonBorderRadius","buttonVariant","buttonSize","buttonHoverEffect","buttonHoverIntensity","buttonHoverOverlay","buttonHoverIconName","floating","sticky","transparent","variation","layout","isMinimal","isCompact","navStyles","cssRules","rawBg","effectiveBg","bgWithOpacity","applyOpacityToColor","blurAmount","blurBgOpacity","effectiveRadius","shadowValue","transitionDuration","getLinkFontSize","linkPadding","linkStyles","scope","linkHoverColor","linkHoverResult","generateLinkHoverStyles","buttonHoverResult","generateButtonHoverStyles","getButtonHoverKeyframes","generateButtonOverlayCSS","buttonSizeStyles","btnSizeConfig","btnPadding","btnSize","buttonStyle","brandTextStyles","dropdownStyles","linkFontSizeValue","dropdownItemStyles","dropdownHoverBg","color","alpha","hex","r","g","b","match","mergeStyles","styles","styleStringToReactStyle","styleString","acc","rule","rawKey","rawValue","key","value","camelKey"],"mappings":";;AAiCO,MAAMA,IAAuC;AAAA,EAChD,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACR,GAKaC,IAAoC;AAAA,EAC7C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACR,GA6BMC,IAAiB;AAAA,EACnB,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,cAAc;AAAA,EACd,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EACpB,eAAe;AACnB;AAKA,SAASC,GACLC,GACAC,GACAC,GACAC,GACAC,IAAkB,eAClBC,IAAmB,QACb;AACN,QAAMC,IAAa;AAAA,IACf,YAAYF,CAAO;AAAA,IACnB,cAAcC,CAAQ;AAAA,IACtB,kBAAkBF,CAAY;AAAA,IAC9B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,EAAA;AAGJ,UAAQH,GAAA;AAAA,IACJ,KAAK;AACD,aA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QAAQC,CAAC,KAAKC,CAAC,KAAKC,CAAC,KAAKJ,CAAK;AAAA,EAC1C;AAGA,MAAID,EAAM,WAAW,MAAM,GAAG;AAC1B,UAAMM,IAAQN,EAAM,MAAM,4CAA4C;AACtE,QAAIM;AACA,aAAO,QAAQA,EAAM,CAAC,CAAC,KAAKA,EAAM,CAAC,CAAC,KAAKA,EAAM,CAAC,CAAC,KAAKL,CAAK;AAAA,EAEnE;AAGA,SAAID,EAAM,WAAW,OAAO,IACjBA,EAAM,QAAQ,oBAAoB,KAAKC,CAAK,GAAG,IAInDD;AACX;AAuBO,SAASO,MAAeC,GAAwC;AACnE,SAAOA,EACF,OAAO,OAAO,EACd,KAAK,IAAI,EACT,QAAQ,OAAO,GAAG,EAClB,QAAQ,SAAS,EAAE;AAC5B;AAKO,SAASC,GAAwBC,GAA0B;AAC9D,SAAKA,IAEEA,EACF,MAAM,GAAG,EACT,OAAO,CAACC,GAAKC,MAAS;AACnB,UAAM,CAACC,GAAQC,CAAQ,IAAIF,EAAK,MAAM,GAAG,GACnCG,IAAMF,GAAQ,KAAA,GACdG,IAAQF,GAAU,KAAA;AAExB,QAAIC,KAAOC;AAEP,UAAID,EAAI,WAAW,IAAI;AACnB,QAAAJ,EAAII,CAAG,IAAIC;AAAA,WACR;AAEH,cAAMC,IAAWF,EAAI,QAAQ,aAAa,CAACX,MAAMA,EAAE,CAAC,EAAE,aAAa;AACnE,QAAAO,EAAIM,CAAQ,IAAID;AAAA,MACpB;AAEJ,WAAOL;AAAA,EACX,GAAG,CAAA,CAAS,IApBS,CAAA;AAqB7B;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SiteDocument } from '../schema/siteDocument';
|
|
2
2
|
/**
|
|
3
3
|
* Gera uma landing page completa e profissional
|
|
4
4
|
*/
|
|
@@ -9,11 +9,11 @@ export declare function generateCompleteLandingPage(options?: {
|
|
|
9
9
|
description?: string;
|
|
10
10
|
primaryColor?: string;
|
|
11
11
|
theme?: 'light' | 'dark' | 'modern' | 'corporate';
|
|
12
|
-
}):
|
|
12
|
+
}): SiteDocument;
|
|
13
13
|
/**
|
|
14
14
|
* Gera patches para aplicar mudanças (simulando IA)
|
|
15
15
|
*/
|
|
16
|
-
export declare function generatePatchesForLandingPage(_document:
|
|
16
|
+
export declare function generatePatchesForLandingPage(_document: SiteDocument, changes: {
|
|
17
17
|
title?: string;
|
|
18
18
|
subtitle?: string;
|
|
19
19
|
primaryColor?: string;
|
|
@@ -31,5 +31,5 @@ export declare function generateModernLandingPage(options?: {
|
|
|
31
31
|
};
|
|
32
32
|
primaryColor?: string;
|
|
33
33
|
theme?: 'light' | 'dark' | 'gradient' | 'corporate';
|
|
34
|
-
}):
|
|
34
|
+
}): SiteDocument;
|
|
35
35
|
//# sourceMappingURL=generateLandingPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateLandingPage.d.ts","sourceRoot":"","sources":["../../../src/engine/generators/generateLandingPage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"generateLandingPage.d.ts","sourceRoot":"","sources":["../../../src/engine/generators/generateLandingPage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAuB,MAAM,wBAAwB,CAAA;AAI1E;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,GAAE;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAA;CAC7C,GAAG,YAAY,CAoDpB;AAmhCD;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,GAAG,GAAG,EAAE,CAkBR;AAMD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,GAAE;IACjD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,WAAW,EAAE,MAAM,CAAA;KACpB,CAAA;IACD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,WAAW,CAAA;CAC/C,GAAG,YAAY,CAkRpB"}
|