@brunoalz/smartgesti-site-editor 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor/BlockSelector.d.ts.map +1 -1
- package/dist/editor/BlockSelector.js +60 -57
- package/dist/editor/BlockSelector.js.map +1 -1
- package/dist/editor/LandingPageEditor.d.ts.map +1 -1
- package/dist/editor/LandingPageEditor.js +145 -128
- package/dist/editor/LandingPageEditor.js.map +1 -1
- package/dist/editor/PageTabBar.d.ts +4 -1
- package/dist/editor/PageTabBar.d.ts.map +1 -1
- package/dist/editor/PageTabBar.js +179 -41
- package/dist/editor/PageTabBar.js.map +1 -1
- package/dist/editor/PropertyEditor/BlockPropertyEditor.d.ts +2 -0
- package/dist/editor/PropertyEditor/BlockPropertyEditor.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/BlockPropertyEditor.js +53 -45
- package/dist/editor/PropertyEditor/BlockPropertyEditor.js.map +1 -1
- package/dist/editor/PropertyEditor/CollapsiblePropertyGroup.d.ts +2 -0
- package/dist/editor/PropertyEditor/CollapsiblePropertyGroup.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/CollapsiblePropertyGroup.js +47 -33
- package/dist/editor/PropertyEditor/CollapsiblePropertyGroup.js.map +1 -1
- package/dist/editor/PropertyEditor/VariationSelector.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/VariationSelector.js +10 -6
- package/dist/editor/PropertyEditor/VariationSelector.js.map +1 -1
- package/dist/editor/PropertyEditor/index.js +20 -18
- package/dist/editor/PropertyEditor/index.js.map +1 -1
- package/dist/editor/PropertyEditor/inputs/CarouselImagesInput.d.ts +16 -0
- package/dist/editor/PropertyEditor/inputs/CarouselImagesInput.d.ts.map +1 -0
- package/dist/editor/PropertyEditor/inputs/CarouselImagesInput.js +170 -0
- package/dist/editor/PropertyEditor/inputs/CarouselImagesInput.js.map +1 -0
- package/dist/editor/PropertyEditor/inputs/ImageGridInput.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/inputs/ImageGridInput.js +148 -121
- package/dist/editor/PropertyEditor/inputs/ImageGridInput.js.map +1 -1
- package/dist/editor/PropertyEditor/inputs/index.d.ts +1 -0
- package/dist/editor/PropertyEditor/inputs/index.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/renderPropertyInput.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/renderPropertyInput.js +167 -139
- package/dist/editor/PropertyEditor/renderPropertyInput.js.map +1 -1
- package/dist/editor/components/CenterPanel.d.ts +9 -1
- package/dist/editor/components/CenterPanel.d.ts.map +1 -1
- package/dist/editor/components/CenterPanel.js +24 -14
- package/dist/editor/components/CenterPanel.js.map +1 -1
- package/dist/editor/components/RightPanel.d.ts +5 -0
- package/dist/editor/components/RightPanel.d.ts.map +1 -1
- package/dist/editor/components/RightPanel.js +18 -12
- package/dist/editor/components/RightPanel.js.map +1 -1
- package/dist/editor/components/Toolbar.d.ts +3 -0
- package/dist/editor/components/Toolbar.d.ts.map +1 -1
- package/dist/editor/components/Toolbar.js +54 -35
- package/dist/editor/components/Toolbar.js.map +1 -1
- package/dist/engine/export/exportHtml.d.ts.map +1 -1
- package/dist/engine/export/exportHtml.js +50 -50
- package/dist/engine/export/exportHtml.js.map +1 -1
- package/dist/engine/export/exporters/sections/BlogPostExporters.d.ts +6 -0
- package/dist/engine/export/exporters/sections/BlogPostExporters.d.ts.map +1 -0
- package/dist/engine/export/exporters/sections/BlogPostExporters.js +101 -0
- package/dist/engine/export/exporters/sections/BlogPostExporters.js.map +1 -0
- package/dist/engine/export/exporters/sections/FooterExporter.js +22 -22
- package/dist/engine/export/exporters/sections/FooterExporter.js.map +1 -1
- package/dist/engine/export/exporters/sections/HeroExporter.d.ts.map +1 -1
- package/dist/engine/export/exporters/sections/HeroExporter.js +222 -205
- package/dist/engine/export/exporters/sections/HeroExporter.js.map +1 -1
- package/dist/engine/export/exporters/sections/MarketingExporters.js +88 -88
- package/dist/engine/export/exporters/sections/MarketingExporters.js.map +1 -1
- package/dist/engine/export/exporters/sections/NavbarExporter.js +34 -34
- package/dist/engine/export/exporters/sections/NavbarExporter.js.map +1 -1
- package/dist/engine/export/exporters/sections/index.d.ts.map +1 -1
- package/dist/engine/export/exporters/sections/index.js +29 -22
- package/dist/engine/export/exporters/sections/index.js.map +1 -1
- package/dist/engine/index.d.ts +3 -0
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +99 -87
- package/dist/engine/index.js.map +1 -1
- package/dist/engine/plugins/builtin/blog/index.d.ts +3 -0
- package/dist/engine/plugins/builtin/blog/index.d.ts.map +1 -0
- package/dist/engine/plugins/builtin/blog/manifest.d.ts +3 -0
- package/dist/engine/plugins/builtin/blog/manifest.d.ts.map +1 -0
- package/dist/engine/plugins/builtin/blog/manifest.js +273 -0
- package/dist/engine/plugins/builtin/blog/manifest.js.map +1 -0
- package/dist/engine/plugins/builtin/blog/mockContentProvider.d.ts +7 -0
- package/dist/engine/plugins/builtin/blog/mockContentProvider.d.ts.map +1 -0
- package/dist/engine/plugins/builtin/blog/mockContentProvider.js +135 -0
- package/dist/engine/plugins/builtin/blog/mockContentProvider.js.map +1 -0
- package/dist/engine/plugins/contentHydration.d.ts +17 -0
- package/dist/engine/plugins/contentHydration.d.ts.map +1 -0
- package/dist/engine/plugins/contentHydration.js +121 -0
- package/dist/engine/plugins/contentHydration.js.map +1 -0
- package/dist/engine/plugins/dynamicPageResolver.d.ts +25 -0
- package/dist/engine/plugins/dynamicPageResolver.d.ts.map +1 -0
- package/dist/engine/plugins/dynamicPageResolver.js +32 -0
- package/dist/engine/plugins/dynamicPageResolver.js.map +1 -0
- package/dist/engine/plugins/index.d.ts +11 -0
- package/dist/engine/plugins/index.d.ts.map +1 -0
- package/dist/engine/plugins/pluginRegistry.d.ts +37 -0
- package/dist/engine/plugins/pluginRegistry.d.ts.map +1 -0
- package/dist/engine/plugins/pluginRegistry.js +134 -0
- package/dist/engine/plugins/pluginRegistry.js.map +1 -0
- package/dist/engine/plugins/types.d.ts +180 -0
- package/dist/engine/plugins/types.d.ts.map +1 -0
- package/dist/engine/presets/heroVariations.d.ts +5 -0
- package/dist/engine/presets/heroVariations.d.ts.map +1 -1
- package/dist/engine/presets/heroVariations.js +50 -6
- package/dist/engine/presets/heroVariations.js.map +1 -1
- package/dist/engine/preview/Preview.d.ts +6 -2
- package/dist/engine/preview/Preview.d.ts.map +1 -1
- package/dist/engine/preview/Preview.js +295 -125
- package/dist/engine/preview/Preview.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogPostCard.d.ts +3 -0
- package/dist/engine/registry/blocks/sections/blogPostCard.d.ts.map +1 -0
- package/dist/engine/registry/blocks/sections/blogPostCard.js +53 -0
- package/dist/engine/registry/blocks/sections/blogPostCard.js.map +1 -0
- package/dist/engine/registry/blocks/sections/blogPostDetail.d.ts +3 -0
- package/dist/engine/registry/blocks/sections/blogPostDetail.d.ts.map +1 -0
- package/dist/engine/registry/blocks/sections/blogPostDetail.js +49 -0
- package/dist/engine/registry/blocks/sections/blogPostDetail.js.map +1 -0
- package/dist/engine/registry/blocks/sections/blogPostGrid.d.ts +3 -0
- package/dist/engine/registry/blocks/sections/blogPostGrid.d.ts.map +1 -0
- package/dist/engine/registry/blocks/sections/blogPostGrid.js +89 -0
- package/dist/engine/registry/blocks/sections/blogPostGrid.js.map +1 -0
- package/dist/engine/registry/blocks/sections/hero.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/hero.js +67 -14
- package/dist/engine/registry/blocks/sections/hero.js.map +1 -1
- package/dist/engine/registry/blocks/sections/index.d.ts +3 -0
- package/dist/engine/registry/blocks/sections/index.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/navbar.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/navbar.js +2 -1
- package/dist/engine/registry/blocks/sections/navbar.js.map +1 -1
- package/dist/engine/registry/registry.d.ts.map +1 -1
- package/dist/engine/registry/registry.js +16 -12
- package/dist/engine/registry/registry.js.map +1 -1
- package/dist/engine/registry/types.d.ts +10 -6
- package/dist/engine/registry/types.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.d.ts +3 -0
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.d.ts.map +1 -0
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.js +199 -0
- package/dist/engine/render/renderers/sections/BlogPostCardRenderer.js.map +1 -0
- package/dist/engine/render/renderers/sections/BlogPostDetailRenderer.d.ts +3 -0
- package/dist/engine/render/renderers/sections/BlogPostDetailRenderer.d.ts.map +1 -0
- package/dist/engine/render/renderers/sections/BlogPostDetailRenderer.js +293 -0
- package/dist/engine/render/renderers/sections/BlogPostDetailRenderer.js.map +1 -0
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.d.ts +3 -0
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.d.ts.map +1 -0
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.js +101 -0
- package/dist/engine/render/renderers/sections/BlogPostGridRenderer.js.map +1 -0
- package/dist/engine/render/renderers/sections/CtaRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/CtaRenderer.js +33 -31
- package/dist/engine/render/renderers/sections/CtaRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/FaqItemRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/FaqItemRenderer.js +7 -6
- package/dist/engine/render/renderers/sections/FaqItemRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/FaqRenderer.js +7 -7
- package/dist/engine/render/renderers/sections/FaqRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/FeatureGridRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/FeatureGridRenderer.js +19 -18
- package/dist/engine/render/renderers/sections/FeatureGridRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/FeatureRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/FeatureRenderer.js +5 -4
- package/dist/engine/render/renderers/sections/FeatureRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/FooterRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/FooterRenderer.js +8 -7
- package/dist/engine/render/renderers/sections/FooterRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/HeroRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/HeroRenderer.js +295 -218
- package/dist/engine/render/renderers/sections/HeroRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/NavbarRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/NavbarRenderer.js +23 -22
- package/dist/engine/render/renderers/sections/NavbarRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/PricingCardRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/PricingCardRenderer.js +7 -6
- package/dist/engine/render/renderers/sections/PricingCardRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/PricingRenderer.js +9 -9
- package/dist/engine/render/renderers/sections/PricingRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/TestimonialGridRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/TestimonialGridRenderer.js +17 -16
- package/dist/engine/render/renderers/sections/TestimonialGridRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/TestimonialRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/TestimonialRenderer.js +11 -10
- package/dist/engine/render/renderers/sections/TestimonialRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/index.js +24 -18
- package/dist/engine/render/renderers/sections/index.js.map +1 -1
- package/dist/engine/schema/siteDocument.d.ts +104 -3
- package/dist/engine/schema/siteDocument.d.ts.map +1 -1
- package/dist/engine/schema/siteDocument.js.map +1 -1
- package/dist/engine/shared/carouselAnimation.d.ts +20 -0
- package/dist/engine/shared/carouselAnimation.d.ts.map +1 -0
- package/dist/engine/shared/carouselAnimation.js +62 -0
- package/dist/engine/shared/carouselAnimation.js.map +1 -0
- package/dist/engine/shared/imageGrid/types.d.ts +2 -0
- package/dist/engine/shared/imageGrid/types.d.ts.map +1 -1
- package/dist/engine/shared/showWhen.d.ts +44 -0
- package/dist/engine/shared/showWhen.d.ts.map +1 -0
- package/dist/engine/shared/showWhen.js +33 -0
- package/dist/engine/shared/showWhen.js.map +1 -0
- package/dist/hooks/useEditorState.d.ts +3 -0
- package/dist/hooks/useEditorState.d.ts.map +1 -1
- package/dist/hooks/useEditorState.js +106 -84
- package/dist/hooks/useEditorState.js.map +1 -1
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +109 -93
- package/dist/index.js.map +1 -1
- package/dist/shared/templates/escola-blog.d.ts +3 -0
- package/dist/shared/templates/escola-blog.d.ts.map +1 -0
- package/dist/shared/templates/escola-blog.js +160 -0
- package/dist/shared/templates/escola-blog.js.map +1 -0
- package/dist/shared/templates/index.d.ts +2 -0
- package/dist/shared/templates/index.d.ts.map +1 -1
- package/dist/shared/templates/index.js +30 -12
- package/dist/shared/templates/index.js.map +1 -1
- package/dist/utils/changeDetector.d.ts +2 -1
- package/dist/utils/changeDetector.d.ts.map +1 -1
- package/dist/utils/changeDetector.js +39 -39
- package/dist/utils/changeDetector.js.map +1 -1
- package/dist/utils/sharedTemplateToEngine.d.ts +4 -5
- package/dist/utils/sharedTemplateToEngine.d.ts.map +1 -1
- package/dist/utils/sharedTemplateToEngine.js +14 -87
- package/dist/utils/sharedTemplateToEngine.js.map +1 -1
- package/dist/viewer/LandingPageViewer.d.ts +13 -6
- package/dist/viewer/LandingPageViewer.d.ts.map +1 -1
- package/dist/viewer/LandingPageViewer.js +220 -122
- package/dist/viewer/LandingPageViewer.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,63 +1,77 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { ChevronDown as
|
|
4
|
-
import { renderPropertyInput as
|
|
5
|
-
import { cn as
|
|
6
|
-
const
|
|
7
|
-
groupName:
|
|
8
|
-
props:
|
|
9
|
-
onPropChange:
|
|
10
|
-
onMultiUpdate:
|
|
11
|
-
allProps:
|
|
1
|
+
import { jsxs as t, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { memo as h, useState as k, useRef as w, useMemo as v, useEffect as N } from "react";
|
|
3
|
+
import { Pencil as C, ChevronDown as j } from "lucide-react";
|
|
4
|
+
import { renderPropertyInput as I } from "./renderPropertyInput.js";
|
|
5
|
+
import { cn as s } from "../../utils/cn.js";
|
|
6
|
+
const A = h(function({
|
|
7
|
+
groupName: l,
|
|
8
|
+
props: p,
|
|
9
|
+
onPropChange: c,
|
|
10
|
+
onMultiUpdate: o,
|
|
11
|
+
allProps: a,
|
|
12
12
|
uploadConfig: g,
|
|
13
|
-
defaultOpen:
|
|
13
|
+
defaultOpen: m = !0,
|
|
14
|
+
isFocused: r
|
|
14
15
|
}) {
|
|
15
|
-
const [
|
|
16
|
-
if (
|
|
17
|
-
return { allProps:
|
|
18
|
-
}, [
|
|
19
|
-
return
|
|
20
|
-
|
|
16
|
+
const [e, u] = k(m), i = w(null), f = v(() => {
|
|
17
|
+
if (a && o)
|
|
18
|
+
return { allProps: a, onMultiUpdate: o };
|
|
19
|
+
}, [a, o]);
|
|
20
|
+
return N(() => {
|
|
21
|
+
r && i.current && (u(!0), requestAnimationFrame(() => {
|
|
22
|
+
i.current?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
23
|
+
}));
|
|
24
|
+
}, [r]), p.length === 0 ? null : /* @__PURE__ */ t("div", { ref: i, id: `prop-group-${l}`, className: s(
|
|
25
|
+
"border rounded-lg transition-colors",
|
|
26
|
+
r ? "border-purple-400 dark:border-purple-600 ring-1 ring-purple-200 dark:ring-purple-800" : "border-gray-200 dark:border-gray-700"
|
|
27
|
+
), children: [
|
|
28
|
+
/* @__PURE__ */ t(
|
|
21
29
|
"button",
|
|
22
30
|
{
|
|
23
31
|
type: "button",
|
|
24
|
-
onClick: () =>
|
|
25
|
-
className:
|
|
32
|
+
onClick: () => u(!e),
|
|
33
|
+
className: s(
|
|
26
34
|
"flex items-center justify-between w-full px-3 py-2.5",
|
|
27
35
|
"bg-gray-50 dark:bg-gray-800/50",
|
|
28
36
|
"hover:bg-gray-100 dark:hover:bg-gray-800",
|
|
29
37
|
"transition-colors cursor-pointer",
|
|
30
38
|
"focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500",
|
|
31
39
|
"rounded-t-lg",
|
|
32
|
-
!
|
|
40
|
+
!e && "rounded-b-lg"
|
|
33
41
|
),
|
|
34
42
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
/* @__PURE__ */ t("span", { className: "flex items-center gap-2", children: [
|
|
44
|
+
/* @__PURE__ */ n("span", { className: "text-xs font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wide", children: l }),
|
|
45
|
+
r && /* @__PURE__ */ t("span", { className: "inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-semibold bg-purple-100 dark:bg-purple-900/50 text-purple-700 dark:text-purple-300 animate-pulse", children: [
|
|
46
|
+
/* @__PURE__ */ n(C, { className: "w-2.5 h-2.5" }),
|
|
47
|
+
"Editando"
|
|
48
|
+
] })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ n(
|
|
51
|
+
j,
|
|
38
52
|
{
|
|
39
|
-
className:
|
|
53
|
+
className: s(
|
|
40
54
|
"w-4 h-4 text-gray-500 dark:text-gray-400 transition-transform duration-200",
|
|
41
|
-
|
|
55
|
+
e && "rotate-180"
|
|
42
56
|
)
|
|
43
57
|
}
|
|
44
58
|
)
|
|
45
59
|
]
|
|
46
60
|
}
|
|
47
61
|
),
|
|
48
|
-
|
|
49
|
-
({ propName:
|
|
50
|
-
|
|
62
|
+
e && /* @__PURE__ */ n("div", { className: "p-3 space-y-3 bg-white dark:bg-gray-900 rounded-b-lg", children: p.map(
|
|
63
|
+
({ propName: d, meta: b, value: x }) => I(
|
|
64
|
+
d,
|
|
51
65
|
b,
|
|
52
|
-
|
|
53
|
-
(y) =>
|
|
66
|
+
x,
|
|
67
|
+
(y) => c(d, y),
|
|
54
68
|
g,
|
|
55
|
-
|
|
69
|
+
f
|
|
56
70
|
)
|
|
57
71
|
) })
|
|
58
72
|
] });
|
|
59
73
|
});
|
|
60
74
|
export {
|
|
61
|
-
|
|
75
|
+
A as CollapsiblePropertyGroup
|
|
62
76
|
};
|
|
63
77
|
//# sourceMappingURL=CollapsiblePropertyGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsiblePropertyGroup.js","sources":["../../../src/editor/PropertyEditor/CollapsiblePropertyGroup.tsx"],"sourcesContent":["import { memo, useState, useMemo } from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport { InspectorMeta } from \"../../engine\";\nimport { renderPropertyInput, type RenderInputContext } from \"./renderPropertyInput\";\nimport { cn } from \"../../utils/cn\";\nimport type { UploadConfig } from \"../LandingPageEditor\";\n\ninterface CollapsiblePropertyGroupProps {\n groupName: string;\n props: Array<{\n propName: string;\n meta: InspectorMeta;\n value: any;\n }>;\n onPropChange: (propName: string, value: any) => void;\n /** Callback to update multiple props at once (for special inputs like image-grid) */\n onMultiUpdate?: (updates: Record<string, any>) => void;\n /** All current prop values (for special inputs that need to read multiple props) */\n allProps?: Record<string, any>;\n uploadConfig?: UploadConfig;\n defaultOpen?: boolean;\n}\n\n/**\n * Grupo de propriedades colapsável\n * Memoizado para evitar re-renders desnecessários\n */\nexport const CollapsiblePropertyGroup = memo(function CollapsiblePropertyGroup({\n groupName,\n props,\n onPropChange,\n onMultiUpdate,\n allProps,\n uploadConfig,\n defaultOpen = true,\n}: CollapsiblePropertyGroupProps) {\n const [isOpen, setIsOpen] = useState(defaultOpen);\n\n // Create context for special inputs\n const renderContext = useMemo<RenderInputContext | undefined>(() => {\n if (allProps && onMultiUpdate) {\n return { allProps, onMultiUpdate };\n }\n return undefined;\n }, [allProps, onMultiUpdate]);\n\n if (props.length === 0) {\n return null;\n }\n\n return (\n <div className
|
|
1
|
+
{"version":3,"file":"CollapsiblePropertyGroup.js","sources":["../../../src/editor/PropertyEditor/CollapsiblePropertyGroup.tsx"],"sourcesContent":["import { memo, useState, useMemo, useEffect, useRef } from \"react\";\nimport { ChevronDown, Pencil } from \"lucide-react\";\nimport { InspectorMeta } from \"../../engine\";\nimport { renderPropertyInput, type RenderInputContext } from \"./renderPropertyInput\";\nimport { cn } from \"../../utils/cn\";\nimport type { UploadConfig } from \"../LandingPageEditor\";\n\ninterface CollapsiblePropertyGroupProps {\n groupName: string;\n props: Array<{\n propName: string;\n meta: InspectorMeta;\n value: any;\n }>;\n onPropChange: (propName: string, value: any) => void;\n /** Callback to update multiple props at once (for special inputs like image-grid) */\n onMultiUpdate?: (updates: Record<string, any>) => void;\n /** All current prop values (for special inputs that need to read multiple props) */\n allProps?: Record<string, any>;\n uploadConfig?: UploadConfig;\n defaultOpen?: boolean;\n /** When true, opens the group and scrolls it into view */\n isFocused?: boolean;\n}\n\n/**\n * Grupo de propriedades colapsável\n * Memoizado para evitar re-renders desnecessários\n */\nexport const CollapsiblePropertyGroup = memo(function CollapsiblePropertyGroup({\n groupName,\n props,\n onPropChange,\n onMultiUpdate,\n allProps,\n uploadConfig,\n defaultOpen = true,\n isFocused,\n}: CollapsiblePropertyGroupProps) {\n const [isOpen, setIsOpen] = useState(defaultOpen);\n const groupRef = useRef<HTMLDivElement>(null);\n\n // Create context for special inputs\n const renderContext = useMemo<RenderInputContext | undefined>(() => {\n if (allProps && onMultiUpdate) {\n return { allProps, onMultiUpdate };\n }\n return undefined;\n }, [allProps, onMultiUpdate]);\n\n // When focused, open and scroll into view\n useEffect(() => {\n if (isFocused && groupRef.current) {\n setIsOpen(true);\n // Small delay to ensure the group content is rendered before scrolling\n requestAnimationFrame(() => {\n groupRef.current?.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n });\n }\n }, [isFocused]);\n\n if (props.length === 0) {\n return null;\n }\n\n return (\n <div ref={groupRef} id={`prop-group-${groupName}`} className={cn(\n \"border rounded-lg transition-colors\",\n isFocused\n ? \"border-purple-400 dark:border-purple-600 ring-1 ring-purple-200 dark:ring-purple-800\"\n : \"border-gray-200 dark:border-gray-700\"\n )}>\n {/* Header clicável */}\n <button\n type=\"button\"\n onClick={() => setIsOpen(!isOpen)}\n className={cn(\n \"flex items-center justify-between w-full px-3 py-2.5\",\n \"bg-gray-50 dark:bg-gray-800/50\",\n \"hover:bg-gray-100 dark:hover:bg-gray-800\",\n \"transition-colors cursor-pointer\",\n \"focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500\",\n \"rounded-t-lg\",\n !isOpen && \"rounded-b-lg\"\n )}\n >\n <span className=\"flex items-center gap-2\">\n <span className=\"text-xs font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wide\">\n {groupName}\n </span>\n {isFocused && (\n <span className=\"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-semibold bg-purple-100 dark:bg-purple-900/50 text-purple-700 dark:text-purple-300 animate-pulse\">\n <Pencil className=\"w-2.5 h-2.5\" />\n Editando\n </span>\n )}\n </span>\n <ChevronDown\n className={cn(\n \"w-4 h-4 text-gray-500 dark:text-gray-400 transition-transform duration-200\",\n isOpen && \"rotate-180\"\n )}\n />\n </button>\n\n {/* Conteúdo colapsável */}\n {isOpen && (\n <div className=\"p-3 space-y-3 bg-white dark:bg-gray-900 rounded-b-lg\">\n {props.map(({ propName, meta, value }) =>\n renderPropertyInput(\n propName,\n meta,\n value,\n (newValue) => onPropChange(propName, newValue),\n uploadConfig,\n renderContext\n )\n )}\n </div>\n )}\n </div>\n );\n});\n"],"names":["CollapsiblePropertyGroup","memo","groupName","props","onPropChange","onMultiUpdate","allProps","uploadConfig","defaultOpen","isFocused","isOpen","setIsOpen","useState","groupRef","useRef","renderContext","useMemo","useEffect","jsxs","cn","jsx","Pencil","ChevronDown","propName","meta","value","renderPropertyInput","newValue"],"mappings":";;;;;AA6BO,MAAMA,IAA2BC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AU,cAAA,CAAc;AAAA,cAAE;AAAA,YAAA,EAAA,CAEpC;AAAA,UAAA,GAEJ;AAAA,UACA,gBAAAD;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,WAAWH;AAAA,gBACT;AAAA,gBACAT,KAAU;AAAA,cAAA;AAAA,YACZ;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAIDA,KACC,gBAAAU,EAAC,OAAA,EAAI,WAAU,wDACZ,UAAAjB,EAAM;AAAA,MAAI,CAAC,EAAE,UAAAoB,GAAU,MAAAC,GAAM,OAAAC,QAC5BC;AAAA,QACEH;AAAA,QACAC;AAAA,QACAC;AAAA,QACA,CAACE,MAAavB,EAAamB,GAAUI,CAAQ;AAAA,QAC7CpB;AAAA,QACAQ;AAAA,MAAA;AAAA,IACF,EACF,CACF;AAAA,EAAA,GAEJ;AAEJ,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VariationSelector.d.ts","sourceRoot":"","sources":["../../../src/editor/PropertyEditor/VariationSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAUrC,UAAU,sBAAsB;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;CAClD;AAyGD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"VariationSelector.d.ts","sourceRoot":"","sources":["../../../src/editor/PropertyEditor/VariationSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAUrC,UAAU,sBAAsB;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;CAClD;AAyGD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,oDAqI5B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import g from "react";
|
|
3
3
|
import { cn as u } from "../../utils/cn.js";
|
|
4
|
-
import { heroVariationIds as
|
|
4
|
+
import { heroVariationIds as m, heroVariations as p } from "../../engine/presets/heroVariations.js";
|
|
5
5
|
import { navbarVariationIds as v, navbarVariations as f } from "../../engine/presets/navbarVariations.js";
|
|
6
6
|
function r(n, o) {
|
|
7
7
|
return n[o] !== void 0 ? { [o]: n[o] } : {};
|
|
@@ -91,13 +91,13 @@ const y = {
|
|
|
91
91
|
buttonHoverIntensity: 50,
|
|
92
92
|
buttonHoverOverlay: "none",
|
|
93
93
|
buttonHoverIconName: "arrow-right"
|
|
94
|
-
},
|
|
94
|
+
}, I = g.memo(function({ block: o, onUpdate: l }) {
|
|
95
95
|
if (o.type === "hero") {
|
|
96
96
|
const e = o.props, d = e.variation;
|
|
97
97
|
return /* @__PURE__ */ c("div", { className: "space-y-2", children: [
|
|
98
98
|
/* @__PURE__ */ t("h4", { className: "text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wide", children: "Variações" }),
|
|
99
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-2", children:
|
|
100
|
-
const i =
|
|
99
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-2", children: m.map((a) => {
|
|
100
|
+
const i = p[a];
|
|
101
101
|
return /* @__PURE__ */ t(
|
|
102
102
|
"button",
|
|
103
103
|
{
|
|
@@ -120,7 +120,11 @@ const y = {
|
|
|
120
120
|
...r(e, "imageGridEnabled"),
|
|
121
121
|
...r(e, "imageGridPreset"),
|
|
122
122
|
...r(e, "imageGridImages"),
|
|
123
|
-
...r(e, "imageGridGap")
|
|
123
|
+
...r(e, "imageGridGap"),
|
|
124
|
+
// 5. Preserva configuração do Carousel
|
|
125
|
+
...r(e, "carouselImages"),
|
|
126
|
+
...r(e, "carouselInterval"),
|
|
127
|
+
...r(e, "carouselTransition")
|
|
124
128
|
};
|
|
125
129
|
l(s);
|
|
126
130
|
},
|
|
@@ -174,6 +178,6 @@ const y = {
|
|
|
174
178
|
return null;
|
|
175
179
|
});
|
|
176
180
|
export {
|
|
177
|
-
|
|
181
|
+
I as VariationSelector
|
|
178
182
|
};
|
|
179
183
|
//# sourceMappingURL=VariationSelector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VariationSelector.js","sources":["../../../src/editor/PropertyEditor/VariationSelector.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Block } from \"../../engine\";\nimport {\n heroVariations,\n heroVariationIds,\n} from \"../../engine/presets/heroVariations\";\nimport {\n navbarVariations,\n navbarVariationIds,\n} from \"../../engine/presets/navbarVariations\";\n\ninterface VariationSelectorProps {\n block: Block;\n onUpdate: (updates: Record<string, any>) => void;\n}\n\n/**\n * Helper para preservar um valor se ele existir (não undefined)\n */\nfunction preserveIfDefined(obj: Record<string, any>, key: string): Record<string, any> {\n return obj[key] !== undefined ? { [key]: obj[key] } : {};\n}\n\n/**\n * Props visuais do Hero que DEVEM ser resetadas ao trocar de variação\n * para evitar \"vazamento\" de estilos entre variações\n */\nconst HERO_VISUAL_PROPS_TO_RESET: Record<string, any> = {\n // Variant e variation\n variation: undefined,\n variant: \"centered\",\n // Layout\n align: \"center\",\n contentPosition: \"center\",\n contentSpacing: \"default\",\n blockGap: \"default\",\n minHeight: \"70vh\",\n contentMaxWidth: \"700px\",\n paddingY: undefined,\n // Background & Overlay\n background: undefined,\n overlay: false,\n overlayColor: undefined,\n // Typography colors (legacy)\n titleColor: undefined,\n subtitleColor: undefined,\n descriptionColor: undefined,\n // Typography config (novo sistema)\n titleTypography: undefined,\n subtitleTypography: undefined,\n descriptionTypography: undefined,\n // Badge styling\n badgeColor: undefined,\n badgeTextColor: undefined,\n // Image styling\n imageRadius: 16,\n imageShadow: \"lg\",\n imagePosition: \"right\",\n // Button styling\n buttonSize: \"md\",\n primaryButtonVariant: \"solid\",\n primaryButtonColor: undefined,\n primaryButtonTextColor: undefined,\n primaryButtonRadius: 8,\n secondaryButtonVariant: \"outline\",\n secondaryButtonColor: undefined,\n secondaryButtonTextColor: undefined,\n secondaryButtonRadius: 8,\n // Button hover\n buttonHoverEffect: \"scale\",\n buttonHoverIntensity: 50,\n buttonHoverOverlay: \"none\",\n buttonHoverIconName: \"arrow-right\",\n // Decorative\n showWave: false,\n waveColor: \"rgba(255,255,255,0.1)\",\n // Image Grid\n imageGridEnabled: false,\n imageGridPreset: \"four-equal\",\n imageGridImages: [],\n imageGridGap: 8,\n};\n\n/**\n * Props visuais da Navbar que DEVEM ser resetadas ao trocar de variação\n */\nconst NAVBAR_VISUAL_PROPS_TO_RESET: Record<string, any> = {\n variation: undefined,\n layout: \"expanded\",\n floating: false,\n sticky: true,\n // Aparência\n bg: \"#ffffff\",\n opacity: 100,\n blurOpacity: 0,\n borderRadius: 0,\n shadow: \"sm\",\n // Borda\n borderPosition: \"none\",\n borderWidth: 1,\n borderColor: \"#e5e7eb\",\n // Links\n linkColor: \"#374151\",\n linkHoverColor: \"#2563eb\",\n linkFontSize: \"md\",\n linkHoverEffect: \"background\",\n linkHoverIntensity: 50,\n // Botão\n buttonVariant: \"solid\",\n buttonColor: \"#2563eb\",\n buttonTextColor: \"#ffffff\",\n buttonBorderRadius: 8,\n buttonSize: \"md\",\n buttonHoverEffect: \"darken\",\n buttonHoverIntensity: 50,\n buttonHoverOverlay: \"none\",\n buttonHoverIconName: \"arrow-right\",\n};\n\n/**\n * Componente para selecionar variações de Hero e Navbar\n * Preserva props customizadas ao trocar variação\n */\nexport const VariationSelector = React.memo(function VariationSelector({ block, onUpdate }: VariationSelectorProps) {\n // Hero variations\n if (block.type === \"hero\") {\n const props = block.props as Record<string, any>;\n const currentVariation = props.variation;\n\n return (\n <div className=\"space-y-2\">\n <h4 className=\"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wide\">\n Variações\n </h4>\n <div className=\"grid grid-cols-2 gap-2\">\n {heroVariationIds.map((id) => {\n const v = heroVariations[id];\n const isActive = currentVariation === id;\n return (\n <button\n key={id}\n type=\"button\"\n onClick={() => {\n // IMPORTANTE: Ao trocar variação:\n // 1. Primeiro RESETA todas as props visuais para valores padrão\n // 2. Depois aplica os defaults da nova variação\n // 3. Por fim preserva o conteúdo do usuário\n\n const newProps = {\n // 1. RESET: Limpa todas as props visuais para evitar vazamento\n ...HERO_VISUAL_PROPS_TO_RESET,\n\n // 2. Aplica os defaults da nova variação\n ...v.defaultProps,\n\n // 3. Preserva APENAS o conteúdo editado pelo usuário\n ...preserveIfDefined(props, \"title\"),\n ...preserveIfDefined(props, \"subtitle\"),\n ...preserveIfDefined(props, \"description\"),\n ...preserveIfDefined(props, \"badge\"),\n ...preserveIfDefined(props, \"primaryButton\"),\n ...preserveIfDefined(props, \"secondaryButton\"),\n ...preserveIfDefined(props, \"image\"),\n\n // 4. Preserva configuração da Image Grid\n ...preserveIfDefined(props, \"imageGridEnabled\"),\n ...preserveIfDefined(props, \"imageGridPreset\"),\n ...preserveIfDefined(props, \"imageGridImages\"),\n ...preserveIfDefined(props, \"imageGridGap\"),\n };\n\n onUpdate(newProps);\n }}\n className={cn(\n \"flex items-center gap-2 p-2 rounded-lg border-2 text-left transition-all\",\n isActive\n ? \"border-blue-500 bg-blue-50 dark:bg-blue-900/20\"\n : \"border-gray-200 dark:border-gray-600 hover:border-blue-300 dark:hover:border-blue-700\",\n )}\n >\n <span className=\"text-xs font-medium text-gray-800 dark:text-gray-100\">\n {v.name}\n </span>\n </button>\n );\n })}\n </div>\n </div>\n );\n }\n\n // Navbar variations\n if (block.type === \"navbar\") {\n const props = block.props as Record<string, any>;\n const currentVariation = props.variation;\n\n return (\n <div className=\"space-y-2\">\n <h4 className=\"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wide\">\n Variações\n </h4>\n <div className=\"grid grid-cols-2 gap-2\">\n {navbarVariationIds.map((id) => {\n const v = navbarVariations[id];\n const isActive = currentVariation === id;\n return (\n <button\n key={id}\n type=\"button\"\n onClick={() => {\n // IMPORTANTE: Ao trocar variação:\n // 1. Primeiro RESETA todas as props visuais para valores padrão\n // 2. Depois aplica os defaults da nova variação\n // 3. Por fim preserva o conteúdo do usuário\n\n const newProps = {\n // 1. RESET: Limpa todas as props visuais para evitar vazamento\n ...NAVBAR_VISUAL_PROPS_TO_RESET,\n\n // 2. Aplica os defaults da nova variação\n ...v.defaultProps,\n\n // 3. Preserva APENAS o conteúdo editado pelo usuário\n ...preserveIfDefined(props, \"logo\"),\n ...preserveIfDefined(props, \"logoText\"),\n ...preserveIfDefined(props, \"logoHeight\"),\n ...preserveIfDefined(props, \"links\"),\n ...preserveIfDefined(props, \"ctaButton\"),\n };\n\n onUpdate(newProps);\n }}\n className={cn(\n \"flex items-center gap-2 p-2 rounded-lg border-2 text-left transition-all\",\n isActive\n ? \"border-blue-500 bg-blue-50 dark:bg-blue-900/20\"\n : \"border-gray-200 dark:border-gray-600 hover:border-blue-300 dark:hover:border-blue-700\",\n )}\n >\n <span className=\"text-xs font-medium text-gray-800 dark:text-gray-100\">\n {v.name}\n </span>\n </button>\n );\n })}\n </div>\n </div>\n );\n }\n\n return null;\n});\n"],"names":["preserveIfDefined","obj","key","HERO_VISUAL_PROPS_TO_RESET","NAVBAR_VISUAL_PROPS_TO_RESET","VariationSelector","React","block","onUpdate","props","currentVariation","jsxs","jsx","heroVariationIds","id","v","heroVariations","newProps","cn","navbarVariationIds","navbarVariations"],"mappings":";;;;;AAoBA,SAASA,EAAkBC,GAA0BC,GAAkC;AACrF,SAAOD,EAAIC,CAAG,MAAM,SAAY,EAAE,CAACA,CAAG,GAAGD,EAAIC,CAAG,EAAA,IAAM,CAAA;AACxD;AAMA,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AAAA,IAAA,GACF;AAAA,EAEJ;AAEA,SAAO;AACT,CAAC;"}
|
|
1
|
+
{"version":3,"file":"VariationSelector.js","sources":["../../../src/editor/PropertyEditor/VariationSelector.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Block } from \"../../engine\";\nimport {\n heroVariations,\n heroVariationIds,\n} from \"../../engine/presets/heroVariations\";\nimport {\n navbarVariations,\n navbarVariationIds,\n} from \"../../engine/presets/navbarVariations\";\n\ninterface VariationSelectorProps {\n block: Block;\n onUpdate: (updates: Record<string, any>) => void;\n}\n\n/**\n * Helper para preservar um valor se ele existir (não undefined)\n */\nfunction preserveIfDefined(obj: Record<string, any>, key: string): Record<string, any> {\n return obj[key] !== undefined ? { [key]: obj[key] } : {};\n}\n\n/**\n * Props visuais do Hero que DEVEM ser resetadas ao trocar de variação\n * para evitar \"vazamento\" de estilos entre variações\n */\nconst HERO_VISUAL_PROPS_TO_RESET: Record<string, any> = {\n // Variant e variation\n variation: undefined,\n variant: \"centered\",\n // Layout\n align: \"center\",\n contentPosition: \"center\",\n contentSpacing: \"default\",\n blockGap: \"default\",\n minHeight: \"70vh\",\n contentMaxWidth: \"700px\",\n paddingY: undefined,\n // Background & Overlay\n background: undefined,\n overlay: false,\n overlayColor: undefined,\n // Typography colors (legacy)\n titleColor: undefined,\n subtitleColor: undefined,\n descriptionColor: undefined,\n // Typography config (novo sistema)\n titleTypography: undefined,\n subtitleTypography: undefined,\n descriptionTypography: undefined,\n // Badge styling\n badgeColor: undefined,\n badgeTextColor: undefined,\n // Image styling\n imageRadius: 16,\n imageShadow: \"lg\",\n imagePosition: \"right\",\n // Button styling\n buttonSize: \"md\",\n primaryButtonVariant: \"solid\",\n primaryButtonColor: undefined,\n primaryButtonTextColor: undefined,\n primaryButtonRadius: 8,\n secondaryButtonVariant: \"outline\",\n secondaryButtonColor: undefined,\n secondaryButtonTextColor: undefined,\n secondaryButtonRadius: 8,\n // Button hover\n buttonHoverEffect: \"scale\",\n buttonHoverIntensity: 50,\n buttonHoverOverlay: \"none\",\n buttonHoverIconName: \"arrow-right\",\n // Decorative\n showWave: false,\n waveColor: \"rgba(255,255,255,0.1)\",\n // Image Grid\n imageGridEnabled: false,\n imageGridPreset: \"four-equal\",\n imageGridImages: [],\n imageGridGap: 8,\n};\n\n/**\n * Props visuais da Navbar que DEVEM ser resetadas ao trocar de variação\n */\nconst NAVBAR_VISUAL_PROPS_TO_RESET: Record<string, any> = {\n variation: undefined,\n layout: \"expanded\",\n floating: false,\n sticky: true,\n // Aparência\n bg: \"#ffffff\",\n opacity: 100,\n blurOpacity: 0,\n borderRadius: 0,\n shadow: \"sm\",\n // Borda\n borderPosition: \"none\",\n borderWidth: 1,\n borderColor: \"#e5e7eb\",\n // Links\n linkColor: \"#374151\",\n linkHoverColor: \"#2563eb\",\n linkFontSize: \"md\",\n linkHoverEffect: \"background\",\n linkHoverIntensity: 50,\n // Botão\n buttonVariant: \"solid\",\n buttonColor: \"#2563eb\",\n buttonTextColor: \"#ffffff\",\n buttonBorderRadius: 8,\n buttonSize: \"md\",\n buttonHoverEffect: \"darken\",\n buttonHoverIntensity: 50,\n buttonHoverOverlay: \"none\",\n buttonHoverIconName: \"arrow-right\",\n};\n\n/**\n * Componente para selecionar variações de Hero e Navbar\n * Preserva props customizadas ao trocar variação\n */\nexport const VariationSelector = React.memo(function VariationSelector({ block, onUpdate }: VariationSelectorProps) {\n // Hero variations\n if (block.type === \"hero\") {\n const props = block.props as Record<string, any>;\n const currentVariation = props.variation;\n\n return (\n <div className=\"space-y-2\">\n <h4 className=\"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wide\">\n Variações\n </h4>\n <div className=\"grid grid-cols-2 gap-2\">\n {heroVariationIds.map((id) => {\n const v = heroVariations[id];\n const isActive = currentVariation === id;\n return (\n <button\n key={id}\n type=\"button\"\n onClick={() => {\n // IMPORTANTE: Ao trocar variação:\n // 1. Primeiro RESETA todas as props visuais para valores padrão\n // 2. Depois aplica os defaults da nova variação\n // 3. Por fim preserva o conteúdo do usuário\n\n const newProps = {\n // 1. RESET: Limpa todas as props visuais para evitar vazamento\n ...HERO_VISUAL_PROPS_TO_RESET,\n\n // 2. Aplica os defaults da nova variação\n ...v.defaultProps,\n\n // 3. Preserva APENAS o conteúdo editado pelo usuário\n ...preserveIfDefined(props, \"title\"),\n ...preserveIfDefined(props, \"subtitle\"),\n ...preserveIfDefined(props, \"description\"),\n ...preserveIfDefined(props, \"badge\"),\n ...preserveIfDefined(props, \"primaryButton\"),\n ...preserveIfDefined(props, \"secondaryButton\"),\n ...preserveIfDefined(props, \"image\"),\n\n // 4. Preserva configuração da Image Grid\n ...preserveIfDefined(props, \"imageGridEnabled\"),\n ...preserveIfDefined(props, \"imageGridPreset\"),\n ...preserveIfDefined(props, \"imageGridImages\"),\n ...preserveIfDefined(props, \"imageGridGap\"),\n\n // 5. Preserva configuração do Carousel\n ...preserveIfDefined(props, \"carouselImages\"),\n ...preserveIfDefined(props, \"carouselInterval\"),\n ...preserveIfDefined(props, \"carouselTransition\"),\n };\n\n onUpdate(newProps);\n }}\n className={cn(\n \"flex items-center gap-2 p-2 rounded-lg border-2 text-left transition-all\",\n isActive\n ? \"border-blue-500 bg-blue-50 dark:bg-blue-900/20\"\n : \"border-gray-200 dark:border-gray-600 hover:border-blue-300 dark:hover:border-blue-700\",\n )}\n >\n <span className=\"text-xs font-medium text-gray-800 dark:text-gray-100\">\n {v.name}\n </span>\n </button>\n );\n })}\n </div>\n </div>\n );\n }\n\n // Navbar variations\n if (block.type === \"navbar\") {\n const props = block.props as Record<string, any>;\n const currentVariation = props.variation;\n\n return (\n <div className=\"space-y-2\">\n <h4 className=\"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wide\">\n Variações\n </h4>\n <div className=\"grid grid-cols-2 gap-2\">\n {navbarVariationIds.map((id) => {\n const v = navbarVariations[id];\n const isActive = currentVariation === id;\n return (\n <button\n key={id}\n type=\"button\"\n onClick={() => {\n // IMPORTANTE: Ao trocar variação:\n // 1. Primeiro RESETA todas as props visuais para valores padrão\n // 2. Depois aplica os defaults da nova variação\n // 3. Por fim preserva o conteúdo do usuário\n\n const newProps = {\n // 1. RESET: Limpa todas as props visuais para evitar vazamento\n ...NAVBAR_VISUAL_PROPS_TO_RESET,\n\n // 2. Aplica os defaults da nova variação\n ...v.defaultProps,\n\n // 3. Preserva APENAS o conteúdo editado pelo usuário\n ...preserveIfDefined(props, \"logo\"),\n ...preserveIfDefined(props, \"logoText\"),\n ...preserveIfDefined(props, \"logoHeight\"),\n ...preserveIfDefined(props, \"links\"),\n ...preserveIfDefined(props, \"ctaButton\"),\n };\n\n onUpdate(newProps);\n }}\n className={cn(\n \"flex items-center gap-2 p-2 rounded-lg border-2 text-left transition-all\",\n isActive\n ? \"border-blue-500 bg-blue-50 dark:bg-blue-900/20\"\n : \"border-gray-200 dark:border-gray-600 hover:border-blue-300 dark:hover:border-blue-700\",\n )}\n >\n <span className=\"text-xs font-medium text-gray-800 dark:text-gray-100\">\n {v.name}\n </span>\n </button>\n );\n })}\n </div>\n </div>\n );\n }\n\n return null;\n});\n"],"names":["preserveIfDefined","obj","key","HERO_VISUAL_PROPS_TO_RESET","NAVBAR_VISUAL_PROPS_TO_RESET","VariationSelector","React","block","onUpdate","props","currentVariation","jsxs","jsx","heroVariationIds","id","v","heroVariations","newProps","cn","navbarVariationIds","navbarVariations"],"mappings":";;;;;AAoBA,SAASA,EAAkBC,GAA0BC,GAAkC;AACrF,SAAOD,EAAIC,CAAG,MAAM,SAAY,EAAE,CAACA,CAAG,GAAGD,EAAIC,CAAG,EAAA,IAAM,CAAA;AACxD;AAMA,MAAMC,IAAkD;AAAA;AAAA,EAEtD,WAAW;AAAA,EACX,SAAS;AAAA;AAAA,EAET,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,UAAU;AAAA;AAA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
@@ -1,32 +1,34 @@
|
|
|
1
1
|
import { BlockPropertyEditor as o } from "./BlockPropertyEditor.js";
|
|
2
2
|
import { VariationSelector as e } from "./VariationSelector.js";
|
|
3
3
|
import { renderPropertyInput as n } from "./renderPropertyInput.js";
|
|
4
|
-
import { ButtonGroupInput as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import { ButtonGroupInput as x } from "./inputs/ButtonGroupInput.js";
|
|
5
|
+
import { CarouselImagesInput as f } from "./inputs/CarouselImagesInput.js";
|
|
6
|
+
import { ColorInput as i } from "./inputs/ColorInput.js";
|
|
7
|
+
import { IconGridInput as g } from "./inputs/IconGridInput.js";
|
|
8
|
+
import { ImageGridInput as c } from "./inputs/ImageGridInput.js";
|
|
9
|
+
import { ImageInput as T } from "./inputs/ImageInput.js";
|
|
10
|
+
import { NumberInput as G } from "./inputs/NumberInput.js";
|
|
11
|
+
import { SelectInput as s } from "./inputs/SelectInput.js";
|
|
11
12
|
import { SliderInput as P } from "./inputs/SliderInput.js";
|
|
12
13
|
import { TextAreaInput as h } from "./inputs/TextAreaInput.js";
|
|
13
14
|
import { TextInput as A } from "./inputs/TextInput.js";
|
|
14
|
-
import { ToggleButton as
|
|
15
|
-
import { TypographyInput as
|
|
15
|
+
import { ToggleButton as N } from "./inputs/ToggleButton.js";
|
|
16
|
+
import { TypographyInput as j } from "./inputs/TypographyInput.js";
|
|
16
17
|
export {
|
|
17
18
|
o as BlockPropertyEditor,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
c as
|
|
23
|
-
T as
|
|
24
|
-
G as
|
|
19
|
+
x as ButtonGroupInput,
|
|
20
|
+
f as CarouselImagesInput,
|
|
21
|
+
i as ColorInput,
|
|
22
|
+
g as IconGridInput,
|
|
23
|
+
c as ImageGridInput,
|
|
24
|
+
T as ImageInput,
|
|
25
|
+
G as NumberInput,
|
|
26
|
+
s as SelectInput,
|
|
25
27
|
P as SliderInput,
|
|
26
28
|
h as TextAreaInput,
|
|
27
29
|
A as TextInput,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
N as ToggleButton,
|
|
31
|
+
j as TypographyInput,
|
|
30
32
|
e as VariationSelector,
|
|
31
33
|
n as renderPropertyInput
|
|
32
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UploadConfig } from '../../LandingPageEditor';
|
|
2
|
+
interface CarouselImagesInputProps {
|
|
3
|
+
/** Array de URLs de imagens */
|
|
4
|
+
images: string[];
|
|
5
|
+
/** Callback ao atualizar imagens */
|
|
6
|
+
onImagesChange: (images: string[]) => void;
|
|
7
|
+
/** Label do componente */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Descrição */
|
|
10
|
+
description?: string;
|
|
11
|
+
/** Configuração de upload */
|
|
12
|
+
uploadConfig?: UploadConfig;
|
|
13
|
+
}
|
|
14
|
+
export declare function CarouselImagesInput({ images, onImagesChange, label, description, }: CarouselImagesInputProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=CarouselImagesInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CarouselImagesInput.d.ts","sourceRoot":"","sources":["../../../../src/editor/PropertyEditor/inputs/CarouselImagesInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,UAAU,wBAAwB;IAChC,+BAA+B;IAC/B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,oCAAoC;IACpC,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC3C,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAqHD,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,cAAc,EACd,KAAK,EACL,WAAW,GACZ,EAAE,wBAAwB,2CAgF1B"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as y } from "react";
|
|
3
|
+
import { cn as m } from "../../../utils/cn.js";
|
|
4
|
+
const x = 2, f = 5;
|
|
5
|
+
function k({
|
|
6
|
+
index: t,
|
|
7
|
+
src: a,
|
|
8
|
+
onChange: c,
|
|
9
|
+
onRemove: d,
|
|
10
|
+
canRemove: i
|
|
11
|
+
}) {
|
|
12
|
+
const n = y(null), u = (l) => {
|
|
13
|
+
const e = l.target.files?.[0];
|
|
14
|
+
if (!e || !e.type.startsWith("image/") || e.size > 10 * 1024 * 1024) return;
|
|
15
|
+
const o = new FileReader();
|
|
16
|
+
o.onload = (b) => {
|
|
17
|
+
const p = b.target?.result;
|
|
18
|
+
c(p);
|
|
19
|
+
}, o.readAsDataURL(e);
|
|
20
|
+
}, h = () => {
|
|
21
|
+
n.current && (n.current.value = "", n.current.click());
|
|
22
|
+
}, g = !!a && !a.includes("placehold.co");
|
|
23
|
+
return /* @__PURE__ */ s("div", { className: "relative group", children: [
|
|
24
|
+
/* @__PURE__ */ r(
|
|
25
|
+
"input",
|
|
26
|
+
{
|
|
27
|
+
ref: n,
|
|
28
|
+
type: "file",
|
|
29
|
+
accept: "image/*",
|
|
30
|
+
onChange: u,
|
|
31
|
+
className: "hidden"
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ r(
|
|
35
|
+
"button",
|
|
36
|
+
{
|
|
37
|
+
type: "button",
|
|
38
|
+
onClick: h,
|
|
39
|
+
className: m(
|
|
40
|
+
"w-20 h-12 rounded-lg overflow-hidden border-2 transition-all",
|
|
41
|
+
"flex items-center justify-center",
|
|
42
|
+
"bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700",
|
|
43
|
+
g ? "border-blue-400 dark:border-blue-500" : "border-dashed border-gray-300 dark:border-gray-600 hover:border-blue-400"
|
|
44
|
+
),
|
|
45
|
+
children: a ? /* @__PURE__ */ r(
|
|
46
|
+
"img",
|
|
47
|
+
{
|
|
48
|
+
src: a,
|
|
49
|
+
alt: `Slide ${t + 1}`,
|
|
50
|
+
className: "w-full h-full object-cover"
|
|
51
|
+
}
|
|
52
|
+
) : /* @__PURE__ */ r(
|
|
53
|
+
"svg",
|
|
54
|
+
{
|
|
55
|
+
className: "w-5 h-5 text-gray-400",
|
|
56
|
+
fill: "none",
|
|
57
|
+
stroke: "currentColor",
|
|
58
|
+
viewBox: "0 0 24 24",
|
|
59
|
+
children: /* @__PURE__ */ r(
|
|
60
|
+
"path",
|
|
61
|
+
{
|
|
62
|
+
strokeLinecap: "round",
|
|
63
|
+
strokeLinejoin: "round",
|
|
64
|
+
strokeWidth: 2,
|
|
65
|
+
d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
i && /* @__PURE__ */ r(
|
|
73
|
+
"button",
|
|
74
|
+
{
|
|
75
|
+
type: "button",
|
|
76
|
+
onClick: d,
|
|
77
|
+
className: m(
|
|
78
|
+
"absolute -top-1 -right-1 w-5 h-5 rounded-full",
|
|
79
|
+
"bg-red-500 text-white",
|
|
80
|
+
"flex items-center justify-center",
|
|
81
|
+
"opacity-0 group-hover:opacity-100 transition-opacity",
|
|
82
|
+
"text-xs font-bold"
|
|
83
|
+
),
|
|
84
|
+
children: "×"
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
/* @__PURE__ */ r("div", { className: "absolute bottom-0 left-0 right-0 bg-black/50 text-white text-[10px] text-center py-0.5", children: t + 1 })
|
|
88
|
+
] });
|
|
89
|
+
}
|
|
90
|
+
function C({
|
|
91
|
+
images: t,
|
|
92
|
+
onImagesChange: a,
|
|
93
|
+
label: c,
|
|
94
|
+
description: d
|
|
95
|
+
}) {
|
|
96
|
+
const i = t.length < f, n = t.length > x, u = (l, e) => {
|
|
97
|
+
const o = [...t];
|
|
98
|
+
o[l] = e, a(o);
|
|
99
|
+
}, h = (l) => {
|
|
100
|
+
if (!n) return;
|
|
101
|
+
const e = t.filter((o, b) => b !== l);
|
|
102
|
+
a(e);
|
|
103
|
+
}, g = () => {
|
|
104
|
+
i && a([...t, ""]);
|
|
105
|
+
};
|
|
106
|
+
return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
107
|
+
c && /* @__PURE__ */ s("label", { className: "block text-xs font-medium text-gray-800 dark:text-gray-100", children: [
|
|
108
|
+
c,
|
|
109
|
+
d && /* @__PURE__ */ r("span", { className: "text-gray-500 dark:text-gray-400 text-xs font-normal ml-1", children: d })
|
|
110
|
+
] }),
|
|
111
|
+
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
112
|
+
/* @__PURE__ */ s("span", { className: "text-[10px] text-gray-500 dark:text-gray-400 uppercase tracking-wide", children: [
|
|
113
|
+
"Slides (",
|
|
114
|
+
t.length,
|
|
115
|
+
"/",
|
|
116
|
+
f,
|
|
117
|
+
")"
|
|
118
|
+
] }),
|
|
119
|
+
/* @__PURE__ */ s("div", { className: "flex flex-wrap gap-2 items-center", children: [
|
|
120
|
+
t.map((l, e) => /* @__PURE__ */ r(
|
|
121
|
+
k,
|
|
122
|
+
{
|
|
123
|
+
index: e,
|
|
124
|
+
src: l,
|
|
125
|
+
onChange: (o) => u(e, o),
|
|
126
|
+
onRemove: () => h(e),
|
|
127
|
+
canRemove: n
|
|
128
|
+
},
|
|
129
|
+
e
|
|
130
|
+
)),
|
|
131
|
+
i && /* @__PURE__ */ r(
|
|
132
|
+
"button",
|
|
133
|
+
{
|
|
134
|
+
type: "button",
|
|
135
|
+
onClick: g,
|
|
136
|
+
className: m(
|
|
137
|
+
"w-20 h-12 rounded-lg border-2 border-dashed",
|
|
138
|
+
"border-gray-300 dark:border-gray-600",
|
|
139
|
+
"hover:border-blue-400 dark:hover:border-blue-500",
|
|
140
|
+
"flex items-center justify-center transition-colors",
|
|
141
|
+
"bg-gray-50 dark:bg-gray-800"
|
|
142
|
+
),
|
|
143
|
+
children: /* @__PURE__ */ r(
|
|
144
|
+
"svg",
|
|
145
|
+
{
|
|
146
|
+
className: "w-5 h-5 text-gray-400",
|
|
147
|
+
fill: "none",
|
|
148
|
+
stroke: "currentColor",
|
|
149
|
+
viewBox: "0 0 24 24",
|
|
150
|
+
children: /* @__PURE__ */ r(
|
|
151
|
+
"path",
|
|
152
|
+
{
|
|
153
|
+
strokeLinecap: "round",
|
|
154
|
+
strokeLinejoin: "round",
|
|
155
|
+
strokeWidth: 2,
|
|
156
|
+
d: "M12 4v16m8-8H4"
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
] })
|
|
164
|
+
] })
|
|
165
|
+
] });
|
|
166
|
+
}
|
|
167
|
+
export {
|
|
168
|
+
C as CarouselImagesInput
|
|
169
|
+
};
|
|
170
|
+
//# sourceMappingURL=CarouselImagesInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CarouselImagesInput.js","sources":["../../../../src/editor/PropertyEditor/inputs/CarouselImagesInput.tsx"],"sourcesContent":["/**\n * CarouselImagesInput\n * Componente para editar array de imagens do carrossel hero (2-5 imagens)\n */\n\nimport { useRef } from \"react\";\nimport { cn } from \"../../../utils/cn\";\nimport type { UploadConfig } from \"../../LandingPageEditor\";\n\ninterface CarouselImagesInputProps {\n /** Array de URLs de imagens */\n images: string[];\n /** Callback ao atualizar imagens */\n onImagesChange: (images: string[]) => void;\n /** Label do componente */\n label?: string;\n /** Descrição */\n description?: string;\n /** Configuração de upload */\n uploadConfig?: UploadConfig;\n}\n\nconst MIN_IMAGES = 2;\nconst MAX_IMAGES = 5;\n\n/**\n * Slot individual de imagem do carrossel\n */\nfunction CarouselSlot({\n index,\n src,\n onChange,\n onRemove,\n canRemove,\n}: {\n index: number;\n src: string;\n onChange: (src: string) => void;\n onRemove: () => void;\n canRemove: boolean;\n}) {\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const file = e.target.files?.[0];\n if (!file) return;\n\n if (!file.type.startsWith(\"image/\")) return;\n if (file.size > 10 * 1024 * 1024) return;\n\n const reader = new FileReader();\n reader.onload = (evt) => {\n const dataUrl = evt.target?.result as string;\n onChange(dataUrl);\n };\n reader.readAsDataURL(file);\n };\n\n const handleClick = () => {\n if (inputRef.current) {\n inputRef.current.value = \"\";\n inputRef.current.click();\n }\n };\n\n const hasImage = !!src && !src.includes(\"placehold.co\");\n\n return (\n <div className=\"relative group\">\n <input\n ref={inputRef}\n type=\"file\"\n accept=\"image/*\"\n onChange={handleFileChange}\n className=\"hidden\"\n />\n\n <button\n type=\"button\"\n onClick={handleClick}\n className={cn(\n \"w-20 h-12 rounded-lg overflow-hidden border-2 transition-all\",\n \"flex items-center justify-center\",\n \"bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700\",\n hasImage\n ? \"border-blue-400 dark:border-blue-500\"\n : \"border-dashed border-gray-300 dark:border-gray-600 hover:border-blue-400\"\n )}\n >\n {src ? (\n <img\n src={src}\n alt={`Slide ${index + 1}`}\n className=\"w-full h-full object-cover\"\n />\n ) : (\n <svg\n className=\"w-5 h-5 text-gray-400\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\"\n />\n </svg>\n )}\n </button>\n\n {/* Botão de remover */}\n {canRemove && (\n <button\n type=\"button\"\n onClick={onRemove}\n className={cn(\n \"absolute -top-1 -right-1 w-5 h-5 rounded-full\",\n \"bg-red-500 text-white\",\n \"flex items-center justify-center\",\n \"opacity-0 group-hover:opacity-100 transition-opacity\",\n \"text-xs font-bold\"\n )}\n >\n ×\n </button>\n )}\n\n {/* Número do slide */}\n <div className=\"absolute bottom-0 left-0 right-0 bg-black/50 text-white text-[10px] text-center py-0.5\">\n {index + 1}\n </div>\n </div>\n );\n}\n\nexport function CarouselImagesInput({\n images,\n onImagesChange,\n label,\n description,\n}: CarouselImagesInputProps) {\n const canAdd = images.length < MAX_IMAGES;\n const canRemove = images.length > MIN_IMAGES;\n\n const handleImageChange = (index: number, src: string) => {\n const newImages = [...images];\n newImages[index] = src;\n onImagesChange(newImages);\n };\n\n const handleImageRemove = (index: number) => {\n if (!canRemove) return;\n const newImages = images.filter((_, i) => i !== index);\n onImagesChange(newImages);\n };\n\n const handleAddImage = () => {\n if (!canAdd) return;\n onImagesChange([...images, \"\"]);\n };\n\n return (\n <div className=\"space-y-2\">\n {label && (\n <label className=\"block text-xs font-medium text-gray-800 dark:text-gray-100\">\n {label}\n {description && (\n <span className=\"text-gray-500 dark:text-gray-400 text-xs font-normal ml-1\">\n {description}\n </span>\n )}\n </label>\n )}\n\n <div className=\"space-y-1\">\n <span className=\"text-[10px] text-gray-500 dark:text-gray-400 uppercase tracking-wide\">\n Slides ({images.length}/{MAX_IMAGES})\n </span>\n <div className=\"flex flex-wrap gap-2 items-center\">\n {images.map((src, index) => (\n <CarouselSlot\n key={index}\n index={index}\n src={src}\n onChange={(newSrc) => handleImageChange(index, newSrc)}\n onRemove={() => handleImageRemove(index)}\n canRemove={canRemove}\n />\n ))}\n {canAdd && (\n <button\n type=\"button\"\n onClick={handleAddImage}\n className={cn(\n \"w-20 h-12 rounded-lg border-2 border-dashed\",\n \"border-gray-300 dark:border-gray-600\",\n \"hover:border-blue-400 dark:hover:border-blue-500\",\n \"flex items-center justify-center transition-colors\",\n \"bg-gray-50 dark:bg-gray-800\"\n )}\n >\n <svg\n className=\"w-5 h-5 text-gray-400\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 4v16m8-8H4\"\n />\n </svg>\n </button>\n )}\n </div>\n </div>\n </div>\n );\n}\n"],"names":["MIN_IMAGES","MAX_IMAGES","CarouselSlot","index","src","onChange","onRemove","canRemove","inputRef","useRef","handleFileChange","e","file","reader","evt","dataUrl","handleClick","hasImage","jsxs","jsx","cn","CarouselImagesInput","images","onImagesChange","label","description","canAdd","handleImageChange","newImages","handleImageRemove","_","i","handleAddImage","newSrc"],"mappings":";;;AAsBA,MAAMA,IAAa,GACbC,IAAa;AAKnB,SAASC,EAAa;AAAA,EACpB,OAAAC;AAAA,EACA,KAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,GAMG;AACD,QAAMC,IAAWC,EAAyB,IAAI,GAExCC,IAAmB,CAACC,MAA2C;AACnE,UAAMC,IAAOD,EAAE,OAAO,QAAQ,CAAC;AAI/B,QAHI,CAACC,KAED,CAACA,EAAK,KAAK,WAAW,QAAQ,KAC9BA,EAAK,OAAO,KAAK,OAAO,KAAM;AAElC,UAAMC,IAAS,IAAI,WAAA;AACnB,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AAC,OAAA,EAAI,WAAU,qCACZ,UAAA;AAAA,QAAAI,EAAO,IAAI,CAAClB,GAAKD,MAChB,gBAAAgB;AAAA,UAACjB;AAAA,UAAA;AAAA,YAEC,OAAAC;AAAA,YACA,KAAAC;AAAA,YACA,UAAU,CAAC6B,MAAWN,EAAkBxB,GAAO8B,CAAM;AAAA,YACrD,UAAU,MAAMJ,EAAkB1B,CAAK;AAAA,YACvC,WAAAI;AAAA,UAAA;AAAA,UALKJ;AAAA,QAAA,CAOR;AAAA,QACAuB,KACC,gBAAAP;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAASa;AAAA,YACT,WAAWZ;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,YAAA;AAAA,YAGF,UAAA,gBAAAD;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,MAAK;AAAA,gBACL,QAAO;AAAA,gBACP,SAAQ;AAAA,gBAER,UAAA,gBAAAA;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,eAAc;AAAA,oBACd,gBAAe;AAAA,oBACf,aAAa;AAAA,oBACb,GAAE;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACJ;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MACF,EAAA,CAEJ;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageGridInput.d.ts","sourceRoot":"","sources":["../../../../src/editor/PropertyEditor/inputs/ImageGridInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,eAAe,EAGrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,UAAU,mBAAmB;IAC3B,mBAAmB;IACnB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,uBAAuB;IACvB,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IACzB,oBAAoB;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,cAAc,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,sCAAsC;IACtC,cAAc,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IAClD,kCAAkC;IAClC,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;
|
|
1
|
+
{"version":3,"file":"ImageGridInput.d.ts","sourceRoot":"","sources":["../../../../src/editor/PropertyEditor/inputs/ImageGridInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,eAAe,EAGrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,UAAU,mBAAmB;IAC3B,mBAAmB;IACnB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,uBAAuB;IACvB,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IACzB,oBAAoB;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,cAAc,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,sCAAsC;IACtC,cAAc,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IAClD,kCAAkC;IAClC,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAiOD,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,OAAO,EACZ,cAAc,EACd,cAAc,EACd,WAAW,EACX,KAAK,EACL,WAAW,GACZ,EAAE,mBAAmB,2CA6HrB"}
|