@brunoalz/smartgesti-site-editor 1.2.0 → 1.3.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.js +5 -2
- package/dist/editor/BlockSelector.js.map +1 -1
- package/dist/editor/LandingPageEditor.d.ts.map +1 -1
- package/dist/editor/LandingPageEditor.js +163 -151
- package/dist/editor/LandingPageEditor.js.map +1 -1
- package/dist/editor/PropertyEditor/BlockPropertyEditor.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/BlockPropertyEditor.js +86 -48
- package/dist/editor/PropertyEditor/BlockPropertyEditor.js.map +1 -1
- package/dist/engine/export/exporters/sections/AdminSectionExporters.d.ts +6 -0
- package/dist/engine/export/exporters/sections/AdminSectionExporters.d.ts.map +1 -0
- package/dist/engine/export/exporters/sections/AdminSectionExporters.js +157 -0
- package/dist/engine/export/exporters/sections/AdminSectionExporters.js.map +1 -0
- package/dist/engine/export/exporters/sections/index.d.ts.map +1 -1
- package/dist/engine/export/exporters/sections/index.js +37 -33
- package/dist/engine/export/exporters/sections/index.js.map +1 -1
- package/dist/engine/index.js +98 -95
- package/dist/engine/index.js.map +1 -1
- package/dist/engine/preview/Preview.d.ts.map +1 -1
- package/dist/engine/preview/Preview.js +165 -160
- package/dist/engine/preview/Preview.js.map +1 -1
- package/dist/engine/registry/blocks/sections/aboutSection.d.ts +3 -0
- package/dist/engine/registry/blocks/sections/aboutSection.d.ts.map +1 -0
- package/dist/engine/registry/blocks/sections/aboutSection.js +117 -0
- package/dist/engine/registry/blocks/sections/aboutSection.js.map +1 -0
- package/dist/engine/registry/blocks/sections/contactSection.d.ts +3 -0
- package/dist/engine/registry/blocks/sections/contactSection.d.ts.map +1 -0
- package/dist/engine/registry/blocks/sections/contactSection.js +118 -0
- package/dist/engine/registry/blocks/sections/contactSection.js.map +1 -0
- 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/productShowcase.d.ts +3 -0
- package/dist/engine/registry/blocks/sections/productShowcase.d.ts.map +1 -0
- package/dist/engine/registry/blocks/sections/productShowcase.js +108 -0
- package/dist/engine/registry/blocks/sections/productShowcase.js.map +1 -0
- package/dist/engine/render/renderers/sections/AboutSectionRenderer.d.ts +3 -0
- package/dist/engine/render/renderers/sections/AboutSectionRenderer.d.ts.map +1 -0
- package/dist/engine/render/renderers/sections/AboutSectionRenderer.js +246 -0
- package/dist/engine/render/renderers/sections/AboutSectionRenderer.js.map +1 -0
- package/dist/engine/render/renderers/sections/ContactSectionRenderer.d.ts +3 -0
- package/dist/engine/render/renderers/sections/ContactSectionRenderer.d.ts.map +1 -0
- package/dist/engine/render/renderers/sections/ContactSectionRenderer.js +287 -0
- package/dist/engine/render/renderers/sections/ContactSectionRenderer.js.map +1 -0
- package/dist/engine/render/renderers/sections/ProductShowcaseRenderer.d.ts +3 -0
- package/dist/engine/render/renderers/sections/ProductShowcaseRenderer.d.ts.map +1 -0
- package/dist/engine/render/renderers/sections/ProductShowcaseRenderer.js +287 -0
- package/dist/engine/render/renderers/sections/ProductShowcaseRenderer.js.map +1 -0
- package/dist/engine/render/renderers/sections/index.js +26 -20
- package/dist/engine/render/renderers/sections/index.js.map +1 -1
- package/dist/engine/schema/siteDocument.d.ts +96 -2
- package/dist/engine/schema/siteDocument.d.ts.map +1 -1
- package/dist/engine/schema/siteDocument.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +109 -106
- package/dist/index.js.map +1 -1
- package/dist/shared/schema.d.ts +1 -1
- package/dist/shared/schema.d.ts.map +1 -1
- package/dist/shared/schema.js +7 -4
- package/dist/shared/schema.js.map +1 -1
- 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 +42 -23
- package/dist/shared/templates/index.js.map +1 -1
- package/dist/shared/templates/smartgesti-admin.d.ts +3 -0
- package/dist/shared/templates/smartgesti-admin.d.ts.map +1 -0
- package/dist/shared/templates/smartgesti-admin.js +426 -0
- package/dist/shared/templates/smartgesti-admin.js.map +1 -0
- package/dist/utils/blockIcons.d.ts.map +1 -1
- package/dist/utils/blockIcons.js +3 -0
- package/dist/utils/blockIcons.js.map +1 -1
- package/dist/viewer/LandingPageViewer.d.ts.map +1 -1
- package/dist/viewer/LandingPageViewer.js +66 -65
- package/dist/viewer/LandingPageViewer.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,76 +1,114 @@
|
|
|
1
|
-
import { jsx as p, jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { VariationSelector as
|
|
4
|
-
import { BlockHeader as
|
|
5
|
-
import { CollapsiblePropertyGroup as
|
|
6
|
-
import { evaluateShowWhen as
|
|
1
|
+
import { jsx as p, jsxs as T } from "react/jsx-runtime";
|
|
2
|
+
import { memo as b, useMemo as d, useCallback as w } from "react";
|
|
3
|
+
import { VariationSelector as S } from "./VariationSelector.js";
|
|
4
|
+
import { BlockHeader as M } from "./BlockHeader.js";
|
|
5
|
+
import { CollapsiblePropertyGroup as O } from "./CollapsiblePropertyGroup.js";
|
|
6
|
+
import { evaluateShowWhen as j } from "../../engine/shared/showWhen.js";
|
|
7
7
|
import { componentRegistry as E } from "../../engine/registry/registry.js";
|
|
8
|
-
import { pluginRegistry as
|
|
9
|
-
const
|
|
8
|
+
import { pluginRegistry as k } from "../../engine/plugins/pluginRegistry.js";
|
|
9
|
+
const H = {
|
|
10
|
+
// Buttons (primary)
|
|
11
|
+
primaryButtonColor: "primary",
|
|
12
|
+
buttonColor: "primary",
|
|
13
|
+
primaryButtonTextColor: "primaryText",
|
|
14
|
+
buttonTextColor: "primaryText",
|
|
15
|
+
// Buttons (secondary)
|
|
16
|
+
secondaryButtonColor: "secondary",
|
|
17
|
+
secondaryButtonTextColor: "primaryText",
|
|
18
|
+
// Badge
|
|
19
|
+
badgeColor: "accent",
|
|
20
|
+
badgeTextColor: "primaryText",
|
|
21
|
+
// Links
|
|
22
|
+
linkColor: "linkColor",
|
|
23
|
+
linkHoverColor: "primary",
|
|
24
|
+
// Border
|
|
25
|
+
borderColor: "border",
|
|
26
|
+
// Generic text
|
|
27
|
+
color: "text",
|
|
28
|
+
// Title/description
|
|
29
|
+
titleColor: "text",
|
|
30
|
+
subtitleColor: "mutedText",
|
|
31
|
+
descriptionColor: "mutedText",
|
|
32
|
+
// Background (generic)
|
|
33
|
+
bg: "bg"
|
|
34
|
+
};
|
|
35
|
+
function R(f, e) {
|
|
36
|
+
const r = H[f];
|
|
37
|
+
if (!r) return;
|
|
38
|
+
const s = e[r];
|
|
39
|
+
return typeof s == "string" ? s : void 0;
|
|
40
|
+
}
|
|
41
|
+
const q = b(function({
|
|
10
42
|
block: e,
|
|
11
|
-
document:
|
|
12
|
-
currentPageId:
|
|
13
|
-
onUpdate:
|
|
14
|
-
uploadConfig:
|
|
15
|
-
focusedGroup:
|
|
43
|
+
document: r,
|
|
44
|
+
currentPageId: s,
|
|
45
|
+
onUpdate: l,
|
|
46
|
+
uploadConfig: v,
|
|
47
|
+
focusedGroup: B
|
|
16
48
|
}) {
|
|
17
|
-
const
|
|
18
|
-
() => ({ document:
|
|
19
|
-
[
|
|
20
|
-
), h =
|
|
21
|
-
if (!e || !
|
|
22
|
-
const t =
|
|
49
|
+
const i = d(() => e ? E.get(e.type) : null, [e]), x = d(
|
|
50
|
+
() => ({ document: r, currentPageId: s }),
|
|
51
|
+
[r, s]
|
|
52
|
+
), h = d(() => {
|
|
53
|
+
if (!e || !r) return /* @__PURE__ */ new Set();
|
|
54
|
+
const t = k.getEditorRestrictions(r, e.type);
|
|
23
55
|
return t?.lockedFields ? new Set(t.lockedFields) : /* @__PURE__ */ new Set();
|
|
24
|
-
}, [e,
|
|
25
|
-
if (!e || !
|
|
26
|
-
const t = e.props,
|
|
27
|
-
for (const [a,
|
|
28
|
-
|
|
56
|
+
}, [e, r]), C = d(() => {
|
|
57
|
+
if (!e || !i?.inspectorMeta) return {};
|
|
58
|
+
const t = e.props, o = i.defaultProps || {}, c = {};
|
|
59
|
+
for (const [a, n] of Object.entries(
|
|
60
|
+
i.inspectorMeta
|
|
29
61
|
)) {
|
|
30
|
-
if (
|
|
62
|
+
if (n.showWhen && !j(n.showWhen, t, o, x))
|
|
31
63
|
continue;
|
|
32
|
-
const
|
|
33
|
-
c[
|
|
34
|
-
const u = t[a],
|
|
35
|
-
|
|
64
|
+
const m = n.group || "Geral";
|
|
65
|
+
c[m] || (c[m] = []);
|
|
66
|
+
const u = t[a], g = n.inputType === "color" || n.inputType === "color-advanced";
|
|
67
|
+
let y = u === void 0 || g && u === "" ? o[a] : u;
|
|
68
|
+
y === void 0 && g && r?.theme?.colors && (y = R(
|
|
69
|
+
a,
|
|
70
|
+
r.theme.colors
|
|
71
|
+
));
|
|
72
|
+
const P = h.has(a) ? { ...n, readOnly: !0 } : n;
|
|
73
|
+
c[m].push({
|
|
36
74
|
propName: a,
|
|
37
|
-
meta:
|
|
38
|
-
value:
|
|
75
|
+
meta: P,
|
|
76
|
+
value: y
|
|
39
77
|
});
|
|
40
78
|
}
|
|
41
79
|
return c;
|
|
42
|
-
}, [e,
|
|
43
|
-
|
|
44
|
-
}, [
|
|
45
|
-
return e ?
|
|
80
|
+
}, [e, i, r, x, h]), F = w((t, o) => {
|
|
81
|
+
l(t === "logo" && (o === void 0 || o === "") ? { [t]: o, logoHeight: 70 } : { [t]: o });
|
|
82
|
+
}, [l]);
|
|
83
|
+
return e ? i ? /* @__PURE__ */ T("div", { className: "p-3 space-y-4", children: [
|
|
46
84
|
/* @__PURE__ */ p(
|
|
47
|
-
|
|
85
|
+
M,
|
|
48
86
|
{
|
|
49
87
|
type: e.type,
|
|
50
|
-
name:
|
|
51
|
-
description:
|
|
88
|
+
name: i.name,
|
|
89
|
+
description: i.description
|
|
52
90
|
}
|
|
53
91
|
),
|
|
54
|
-
|
|
55
|
-
Object.keys(
|
|
56
|
-
|
|
92
|
+
i.variations && /* @__PURE__ */ p(S, { block: e, onUpdate: l }),
|
|
93
|
+
Object.keys(C).length === 0 ? /* @__PURE__ */ p("div", { className: "text-center text-gray-500 dark:text-gray-400 text-xs py-4", children: "Nenhuma propriedade configurável" }) : Object.entries(C).map(([t, o]) => /* @__PURE__ */ p(
|
|
94
|
+
O,
|
|
57
95
|
{
|
|
58
96
|
groupName: t,
|
|
59
|
-
props:
|
|
60
|
-
onPropChange:
|
|
61
|
-
onMultiUpdate:
|
|
97
|
+
props: o,
|
|
98
|
+
onPropChange: F,
|
|
99
|
+
onMultiUpdate: l,
|
|
62
100
|
allProps: e?.props,
|
|
63
|
-
uploadConfig:
|
|
64
|
-
isFocused: t ===
|
|
101
|
+
uploadConfig: v,
|
|
102
|
+
isFocused: t === B
|
|
65
103
|
},
|
|
66
104
|
t
|
|
67
105
|
))
|
|
68
|
-
] }) : /* @__PURE__ */
|
|
106
|
+
] }) : /* @__PURE__ */ T("div", { className: "p-4 text-center text-red-500 text-sm", children: [
|
|
69
107
|
"Tipo de bloco desconhecido: ",
|
|
70
108
|
e.type
|
|
71
109
|
] }) : /* @__PURE__ */ p("div", { className: "p-4 text-center text-gray-500 dark:text-gray-400 text-sm", children: "Selecione um bloco para editar" });
|
|
72
110
|
});
|
|
73
111
|
export {
|
|
74
|
-
|
|
112
|
+
q as BlockPropertyEditor
|
|
75
113
|
};
|
|
76
114
|
//# sourceMappingURL=BlockPropertyEditor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockPropertyEditor.js","sources":["../../../src/editor/PropertyEditor/BlockPropertyEditor.tsx"],"sourcesContent":["/**\n * Block Property Editor - Refatorado\n * Editor dinâmico de propriedades baseado em inspectorMeta\n */\n\nimport { memo, useMemo, useCallback } from \"react\";\nimport { Block, SiteDocument, componentRegistry, InspectorMeta, evaluateShowWhen, pluginRegistry } from \"../../engine\";\nimport type { ShowWhenContext } from \"../../engine\";\nimport { VariationSelector } from \"./VariationSelector\";\nimport { BlockHeader } from \"./BlockHeader\";\nimport { CollapsiblePropertyGroup } from \"./CollapsiblePropertyGroup\";\nimport type { UploadConfig } from \"../LandingPageEditor\";\n\ninterface BlockPropertyEditorProps {\n block: Block | null;\n document?: SiteDocument;\n currentPageId?: string;\n onUpdate: (updates: Record<string, any>) => void;\n uploadConfig?: UploadConfig;\n /** When set, the matching property group opens and scrolls into view */\n focusedGroup?: string | null;\n}\n\n/**\n * Componente principal do editor de propriedades\n * Memoizado para performance\n */\nexport const BlockPropertyEditor = memo(function BlockPropertyEditor({\n block,\n document,\n currentPageId,\n onUpdate,\n uploadConfig,\n focusedGroup,\n}: BlockPropertyEditorProps) {\n // Obter definição do bloco do registry\n const blockDefinition = useMemo(() => {\n if (!block) return null;\n return componentRegistry.get(block.type);\n }, [block]);\n\n // Contexto para cross-block showWhen\n const showWhenContext = useMemo<ShowWhenContext>(\n () => ({ document, currentPageId }),\n [document, currentPageId],\n );\n\n // Obter restrições de edição do plugin (se houver)\n const lockedFields = useMemo(() => {\n if (!block || !document) return new Set<string>();\n const restriction = pluginRegistry.getEditorRestrictions(document, block.type);\n if (!restriction?.lockedFields) return new Set<string>();\n return new Set(restriction.lockedFields);\n }, [block, document]);\n\n // Agrupar propriedades por grupo\n const groupedProps = useMemo(() => {\n if (!block || !blockDefinition?.inspectorMeta) return {};\n\n const props = block.props as Record<string, any>;\n const defaultProps = (blockDefinition.defaultProps || {}) as Record<string, any>;\n const groups: Record<\n string,\n Array<{ propName: string; meta: InspectorMeta; value: any }>\n > = {};\n\n for (const [propName, meta] of Object.entries(\n blockDefinition.inspectorMeta,\n )) {\n // Visibilidade condicional via showWhen\n if (meta.showWhen) {\n if (!evaluateShowWhen(meta.showWhen, props, defaultProps, showWhenContext)) {\n continue;\n }\n }\n\n const group = meta.group || \"Geral\";\n if (!groups[group]) {\n groups[group] = [];\n }\n\n // Usar valor atual ou fallback para defaultProps\n const currentValue = props[propName];\n // Para campos de cor, também fazer fallback se o valor for string vazia\n const isColorInput = meta.inputType === \"color\" || meta.inputType === \"color-advanced\";\n const shouldUseFallback = currentValue === undefined || (isColorInput && currentValue === \"\");\n const value = shouldUseFallback ? defaultProps[propName] : currentValue;\n\n // Aplicar readOnly de plugin restrictions\n const effectiveMeta = lockedFields.has(propName)\n ? { ...meta, readOnly: true }\n : meta;\n\n groups[group].push({\n propName,\n meta: effectiveMeta,\n value,\n });\n }\n\n return groups;\n }, [block, blockDefinition, showWhenContext, lockedFields]);\n\n // IMPORTANTE: todos os hooks devem ser chamados ANTES de qualquer early return\n const handlePropChange = useCallback((propName: string, value: any) => {\n // Se remover o logo (definir como undefined), resetar logoHeight para padrão\n if (propName === \"logo\" && (value === undefined || value === \"\")) {\n onUpdate({ [propName]: value, logoHeight: 70 });\n } else {\n onUpdate({ [propName]: value });\n }\n }, [onUpdate]);\n\n if (!block) {\n return (\n <div className=\"p-4 text-center text-gray-500 dark:text-gray-400 text-sm\">\n Selecione um bloco para editar\n </div>\n );\n }\n\n if (!blockDefinition) {\n return (\n <div className=\"p-4 text-center text-red-500 text-sm\">\n Tipo de bloco desconhecido: {block.type}\n </div>\n );\n }\n\n return (\n <div className=\"p-3 space-y-4\">\n {/* Header com ícone centralizado */}\n <BlockHeader\n type={block.type}\n name={blockDefinition.name}\n description={blockDefinition.description}\n />\n\n {/* Seletor de variações (Hero/Navbar) */}\n {blockDefinition.variations && (\n <VariationSelector block={block} onUpdate={onUpdate} />\n )}\n\n {/* Propriedades agrupadas com collapse */}\n {Object.keys(groupedProps).length === 0 ? (\n <div className=\"text-center text-gray-500 dark:text-gray-400 text-xs py-4\">\n Nenhuma propriedade configurável\n </div>\n ) : (\n Object.entries(groupedProps).map(([groupName, props]) => (\n <CollapsiblePropertyGroup\n key={groupName}\n groupName={groupName}\n props={props}\n onPropChange={handlePropChange}\n onMultiUpdate={onUpdate}\n allProps={block?.props as Record<string, any>}\n uploadConfig={uploadConfig}\n isFocused={groupName === focusedGroup}\n />\n ))\n )}\n </div>\n );\n});\n"],"names":["BlockPropertyEditor","memo","block","document","currentPageId","onUpdate","uploadConfig","focusedGroup","blockDefinition","useMemo","componentRegistry","showWhenContext","lockedFields","restriction","pluginRegistry","groupedProps","props","defaultProps","groups","propName","meta","evaluateShowWhen","group","currentValue","isColorInput","value","effectiveMeta","handlePropChange","useCallback","jsxs","jsx","BlockHeader","VariationSelector","groupName","CollapsiblePropertyGroup"],"mappings":";;;;;;;;AA2BO,MAAMA,IAAsBC,EAAK,SAA6B;AAAA,EACnE,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AACF,GAA6B;AAE3B,QAAMC,IAAkBC,EAAQ,MACzBP,IACEQ,EAAkB,IAAIR,EAAM,IAAI,IADpB,MAElB,CAACA,CAAK,CAAC,GAGJS,IAAkBF;AAAA,IACtB,OAAO,EAAE,UAAAN,GAAU,eAAAC;IACnB,CAACD,GAAUC,CAAa;AAAA,EAAA,GAIpBQ,IAAeH,EAAQ,MAAM;AACjC,QAAI,CAACP,KAAS,CAACC,EAAU,4BAAW,IAAA;AACpC,UAAMU,IAAcC,EAAe,sBAAsBX,GAAUD,EAAM,IAAI;AAC7E,WAAKW,GAAa,eACX,IAAI,IAAIA,EAAY,YAAY,wBADI,IAAA;AAAA,EAE7C,GAAG,CAACX,GAAOC,CAAQ,CAAC,GAGdY,IAAeN,EAAQ,MAAM;AACjC,QAAI,CAACP,KAAS,CAACM,GAAiB,sBAAsB,CAAA;AAEtD,UAAMQ,IAAQd,EAAM,OACde,IAAgBT,EAAgB,gBAAgB,CAAA,GAChDU,IAGF,CAAA;AAEJ,eAAW,CAACC,GAAUC,CAAI,KAAK,OAAO;AAAA,MACpCZ,EAAgB;AAAA,IAAA,GACf;AAED,UAAIY,EAAK,YACH,CAACC,EAAiBD,EAAK,UAAUJ,GAAOC,GAAcN,CAAe;AACvE;AAIJ,YAAMW,IAAQF,EAAK,SAAS;AAC5B,MAAK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ACA,OAAAjB;AAAA,QACA,cAAcW;AAAA,QACd,eAAetB;AAAA,QACf,UAAUH,GAAO;AAAA,QACjB,cAAAI;AAAA,QACA,WAAW2B,MAAc1B;AAAA,MAAA;AAAA,MAPpB0B;AAAA,IAAA,CASR;AAAA,EAAA,GAEL,IAvCE,gBAAAJ,EAAC,OAAA,EAAI,WAAU,wCAAuC,UAAA;AAAA,IAAA;AAAA,IACvB3B,EAAM;AAAA,EAAA,GACrC,IAVA,gBAAA4B,EAAC,OAAA,EAAI,WAAU,4DAA2D,UAAA,kCAE1E;AA+CN,CAAC;"}
|
|
1
|
+
{"version":3,"file":"BlockPropertyEditor.js","sources":["../../../src/editor/PropertyEditor/BlockPropertyEditor.tsx"],"sourcesContent":["/**\n * Block Property Editor - Refatorado\n * Editor dinâmico de propriedades baseado em inspectorMeta\n */\n\nimport { memo, useMemo, useCallback } from \"react\";\nimport { Block, SiteDocument, componentRegistry, InspectorMeta, evaluateShowWhen, pluginRegistry } from \"../../engine\";\nimport type { ShowWhenContext } from \"../../engine\";\nimport { VariationSelector } from \"./VariationSelector\";\nimport { BlockHeader } from \"./BlockHeader\";\nimport { CollapsiblePropertyGroup } from \"./CollapsiblePropertyGroup\";\nimport type { UploadConfig } from \"../LandingPageEditor\";\n\n// ============================================================================\n// Theme Color Fallback Map\n// Maps color property names → theme color token keys.\n// Used when block.props[colorProp] and defaultProps[colorProp] are both undefined,\n// so the editor shows the actual theme color instead of #000000.\n// ============================================================================\n\nconst THEME_COLOR_FALLBACKS: Record<string, string> = {\n // Buttons (primary)\n primaryButtonColor: \"primary\",\n buttonColor: \"primary\",\n primaryButtonTextColor: \"primaryText\",\n buttonTextColor: \"primaryText\",\n // Buttons (secondary)\n secondaryButtonColor: \"secondary\",\n secondaryButtonTextColor: \"primaryText\",\n // Badge\n badgeColor: \"accent\",\n badgeTextColor: \"primaryText\",\n // Links\n linkColor: \"linkColor\",\n linkHoverColor: \"primary\",\n // Border\n borderColor: \"border\",\n // Generic text\n color: \"text\",\n // Title/description\n titleColor: \"text\",\n subtitleColor: \"mutedText\",\n descriptionColor: \"mutedText\",\n // Background (generic)\n bg: \"bg\",\n};\n\n/**\n * Resolve theme color fallback for a color property.\n * Returns the theme color value if a mapping exists, undefined otherwise.\n */\nfunction resolveThemeColorFallback(\n propName: string,\n themeColors: Record<string, unknown>,\n): string | undefined {\n const themeKey = THEME_COLOR_FALLBACKS[propName];\n if (!themeKey) return undefined;\n const color = themeColors[themeKey];\n return typeof color === \"string\" ? color : undefined;\n}\n\ninterface BlockPropertyEditorProps {\n block: Block | null;\n document?: SiteDocument;\n currentPageId?: string;\n onUpdate: (updates: Record<string, any>) => void;\n uploadConfig?: UploadConfig;\n /** When set, the matching property group opens and scrolls into view */\n focusedGroup?: string | null;\n}\n\n/**\n * Componente principal do editor de propriedades\n * Memoizado para performance\n */\nexport const BlockPropertyEditor = memo(function BlockPropertyEditor({\n block,\n document,\n currentPageId,\n onUpdate,\n uploadConfig,\n focusedGroup,\n}: BlockPropertyEditorProps) {\n // Obter definição do bloco do registry\n const blockDefinition = useMemo(() => {\n if (!block) return null;\n return componentRegistry.get(block.type);\n }, [block]);\n\n // Contexto para cross-block showWhen\n const showWhenContext = useMemo<ShowWhenContext>(\n () => ({ document, currentPageId }),\n [document, currentPageId],\n );\n\n // Obter restrições de edição do plugin (se houver)\n const lockedFields = useMemo(() => {\n if (!block || !document) return new Set<string>();\n const restriction = pluginRegistry.getEditorRestrictions(document, block.type);\n if (!restriction?.lockedFields) return new Set<string>();\n return new Set(restriction.lockedFields);\n }, [block, document]);\n\n // Agrupar propriedades por grupo\n const groupedProps = useMemo(() => {\n if (!block || !blockDefinition?.inspectorMeta) return {};\n\n const props = block.props as Record<string, any>;\n const defaultProps = (blockDefinition.defaultProps || {}) as Record<string, any>;\n const groups: Record<\n string,\n Array<{ propName: string; meta: InspectorMeta; value: any }>\n > = {};\n\n for (const [propName, meta] of Object.entries(\n blockDefinition.inspectorMeta,\n )) {\n // Visibilidade condicional via showWhen\n if (meta.showWhen) {\n if (!evaluateShowWhen(meta.showWhen, props, defaultProps, showWhenContext)) {\n continue;\n }\n }\n\n const group = meta.group || \"Geral\";\n if (!groups[group]) {\n groups[group] = [];\n }\n\n // Usar valor atual ou fallback para defaultProps, e depois theme colors\n const currentValue = props[propName];\n // Para campos de cor, também fazer fallback se o valor for string vazia\n const isColorInput = meta.inputType === \"color\" || meta.inputType === \"color-advanced\";\n const shouldUseFallback = currentValue === undefined || (isColorInput && currentValue === \"\");\n let value = shouldUseFallback ? defaultProps[propName] : currentValue;\n\n // Para color inputs sem valor definido, tentar fallback para cor do theme\n if (value === undefined && isColorInput && document?.theme?.colors) {\n value = resolveThemeColorFallback(\n propName,\n document.theme.colors as unknown as Record<string, unknown>,\n );\n }\n\n // Aplicar readOnly de plugin restrictions\n const effectiveMeta = lockedFields.has(propName)\n ? { ...meta, readOnly: true }\n : meta;\n\n groups[group].push({\n propName,\n meta: effectiveMeta,\n value,\n });\n }\n\n return groups;\n }, [block, blockDefinition, document, showWhenContext, lockedFields]);\n\n // IMPORTANTE: todos os hooks devem ser chamados ANTES de qualquer early return\n const handlePropChange = useCallback((propName: string, value: any) => {\n // Se remover o logo (definir como undefined), resetar logoHeight para padrão\n if (propName === \"logo\" && (value === undefined || value === \"\")) {\n onUpdate({ [propName]: value, logoHeight: 70 });\n } else {\n onUpdate({ [propName]: value });\n }\n }, [onUpdate]);\n\n if (!block) {\n return (\n <div className=\"p-4 text-center text-gray-500 dark:text-gray-400 text-sm\">\n Selecione um bloco para editar\n </div>\n );\n }\n\n if (!blockDefinition) {\n return (\n <div className=\"p-4 text-center text-red-500 text-sm\">\n Tipo de bloco desconhecido: {block.type}\n </div>\n );\n }\n\n return (\n <div className=\"p-3 space-y-4\">\n {/* Header com ícone centralizado */}\n <BlockHeader\n type={block.type}\n name={blockDefinition.name}\n description={blockDefinition.description}\n />\n\n {/* Seletor de variações (Hero/Navbar) */}\n {blockDefinition.variations && (\n <VariationSelector block={block} onUpdate={onUpdate} />\n )}\n\n {/* Propriedades agrupadas com collapse */}\n {Object.keys(groupedProps).length === 0 ? (\n <div className=\"text-center text-gray-500 dark:text-gray-400 text-xs py-4\">\n Nenhuma propriedade configurável\n </div>\n ) : (\n Object.entries(groupedProps).map(([groupName, props]) => (\n <CollapsiblePropertyGroup\n key={groupName}\n groupName={groupName}\n props={props}\n onPropChange={handlePropChange}\n onMultiUpdate={onUpdate}\n allProps={block?.props as Record<string, any>}\n uploadConfig={uploadConfig}\n isFocused={groupName === focusedGroup}\n />\n ))\n )}\n </div>\n );\n});\n"],"names":["THEME_COLOR_FALLBACKS","resolveThemeColorFallback","propName","themeColors","themeKey","color","BlockPropertyEditor","memo","block","document","currentPageId","onUpdate","uploadConfig","focusedGroup","blockDefinition","useMemo","componentRegistry","showWhenContext","lockedFields","restriction","pluginRegistry","groupedProps","props","defaultProps","groups","meta","evaluateShowWhen","group","currentValue","isColorInput","value","effectiveMeta","handlePropChange","useCallback","jsxs","jsx","BlockHeader","VariationSelector","groupName","CollapsiblePropertyGroup"],"mappings":";;;;;;;;AAoBA,MAAMA,IAAgD;AAAA;AAAA,EAEpD,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,wBAAwB;AAAA,EACxB,iBAAiB;AAAA;AAAA,EAEjB,sBAAsB;AAAA,EACtB,0BAA0B;AAAA;AAAA,EAE1B,YAAY;AAAA,EACZ,gBAAgB;AAAA;AAAA,EAEhB,WAAW;AAAA,EACX,gBAAgB;AAAA;AAAA,EAEhB,aAAa;AAAA;AAAA,EAEb,OAAO;AAAA;AAAA,EAEP,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,kBAAkB;AAAA;AAAA,EAElB,IAAI;AACN;AAMA,SAASC,EACPC,GACAC,GACoB;AACpB,QAAMC,IAAWJ,EAAsBE,CAAQ;AAC/C,MAAI,CAACE,EAAU;AACf,QAAMC,IAAQF,EAAYC,CAAQ;AAClC,SAAO,OAAOC,KAAU,WAAWA,IAAQ;AAC7C;AAgB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MAAczB;AAAA,MAAA;AAAA,MAPpByB;AAAA,IAAA,CASR;AAAA,EAAA,GAEL,IAvCE,gBAAAJ,EAAC,OAAA,EAAI,WAAU,wCAAuC,UAAA;AAAA,IAAA;AAAA,IACvB1B,EAAM;AAAA,EAAA,GACrC,IAVA,gBAAA2B,EAAC,OAAA,EAAI,WAAU,4DAA2D,UAAA,kCAE1E;AA+CN,CAAC;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Block } from '../../../schema/siteDocument';
|
|
2
|
+
import { ThemeTokens } from '../../../schema/themeTokens';
|
|
3
|
+
export declare function exportProductShowcase(block: Block, _depth: number, _basePath?: string, theme?: ThemeTokens): string;
|
|
4
|
+
export declare function exportAboutSection(block: Block, _depth: number, _basePath?: string, theme?: ThemeTokens): string;
|
|
5
|
+
export declare function exportContactSection(block: Block, _depth: number, _basePath?: string, theme?: ThemeTokens): string;
|
|
6
|
+
//# sourceMappingURL=AdminSectionExporters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminSectionExporters.d.ts","sourceRoot":"","sources":["../../../../../src/engine/export/exporters/sections/AdminSectionExporters.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AA4F1D,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,WAAW,GAClB,MAAM,CA4GR;AAMD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,WAAW,GAClB,MAAM,CA2ER;AAkBD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,WAAW,GAClB,MAAM,CAwFR"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { escapeHtml as t, blockIdAttr as B, dataBlockIdAttr as I } from "../../shared/htmlHelpers.js";
|
|
2
|
+
import { generateScopedId as T } from "../../shared/idGenerator.js";
|
|
3
|
+
import { resolveResponsiveColumns as V, generateResponsiveGridStyles as K } from "../../shared/responsiveGridHelper.js";
|
|
4
|
+
import { generateButtonHoverStyles as D, generateButtonOverlayCSS as F, getButtonHoverKeyframes as Q } from "../../../shared/hoverEffects/buttonHover.js";
|
|
5
|
+
function q(e, $, R, x) {
|
|
6
|
+
const {
|
|
7
|
+
buttonHoverEffect: n,
|
|
8
|
+
buttonHoverIntensity: l,
|
|
9
|
+
buttonHoverOverlay: d,
|
|
10
|
+
buttonHoverIconName: m
|
|
11
|
+
} = R, a = x?.colors?.primary || "#6366f1", w = x?.colors?.primaryText || "#ffffff";
|
|
12
|
+
let s = "";
|
|
13
|
+
if (n !== "none") {
|
|
14
|
+
const c = D({
|
|
15
|
+
effect: n,
|
|
16
|
+
intensity: l,
|
|
17
|
+
buttonColor: a,
|
|
18
|
+
variant: "solid"
|
|
19
|
+
}), g = D({
|
|
20
|
+
effect: n,
|
|
21
|
+
intensity: l,
|
|
22
|
+
buttonColor: a,
|
|
23
|
+
variant: "outline"
|
|
24
|
+
});
|
|
25
|
+
c.base && (s += `${e} .${$}--primary { ${c.base} }`), g.base && (s += `${e} .${$}--secondary { ${g.base} }`), s += `${e} .${$}--primary:hover { ${c.hover} }`, s += `${e} .${$}--secondary:hover { ${g.hover} }`, s += Q();
|
|
26
|
+
}
|
|
27
|
+
return d && d !== "none" && (s += F(`${e} .${$}--primary`, {
|
|
28
|
+
overlay: d,
|
|
29
|
+
primaryColor: a,
|
|
30
|
+
iconName: m,
|
|
31
|
+
textColor: w
|
|
32
|
+
}), s += F(`${e} .${$}--secondary`, {
|
|
33
|
+
overlay: d,
|
|
34
|
+
primaryColor: a,
|
|
35
|
+
iconName: m,
|
|
36
|
+
textColor: a
|
|
37
|
+
})), s;
|
|
38
|
+
}
|
|
39
|
+
const E = "position: relative; overflow: hidden; transition: all 0.2s ease;";
|
|
40
|
+
function Y(e, $, R, x) {
|
|
41
|
+
const {
|
|
42
|
+
title: n,
|
|
43
|
+
subtitle: l,
|
|
44
|
+
products: d = [],
|
|
45
|
+
variant: m = "alternating",
|
|
46
|
+
bg: a,
|
|
47
|
+
buttonHoverEffect: w = "none",
|
|
48
|
+
buttonHoverIntensity: s = 50,
|
|
49
|
+
buttonHoverOverlay: c = "none",
|
|
50
|
+
buttonHoverIconName: g = "arrow-right"
|
|
51
|
+
} = e.props, _ = a ? `background-color: ${t(a)};` : "background-color: var(--sg-bg);", N = `[data-block-id="${e.id}"]`, S = q(N, "sg-showcase__btn", {
|
|
52
|
+
buttonHoverEffect: w,
|
|
53
|
+
buttonHoverIntensity: s,
|
|
54
|
+
buttonHoverOverlay: c,
|
|
55
|
+
buttonHoverIconName: g
|
|
56
|
+
}, x), O = l ? `<span style="display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary); color: #fff; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem;">${t(l)}</span>` : "", C = n ? `<h2 style="font-size: var(--sg-heading-h2); margin-bottom: 0.5rem;">${t(n)}</h2>` : "", z = n || l ? `<div data-block-group="Conteúdo" style="text-align: center; margin-bottom: 3rem;">${O}${C}</div>` : "", j = S ? `<style>${S}</style>` : "";
|
|
57
|
+
if (m === "grid") {
|
|
58
|
+
const r = T(e.id || "", "product-grid"), h = V(
|
|
59
|
+
Math.min(d.length, 3),
|
|
60
|
+
1,
|
|
61
|
+
2,
|
|
62
|
+
Math.min(d.length, 3)
|
|
63
|
+
), { inlineStyles: k, mediaQueries: y } = K(r, h, "2rem"), H = d.map((i) => {
|
|
64
|
+
const b = i.image ? `<div style="width: 100%; height: 200px; background-image: url(${t(i.image)}); background-size: cover; background-position: center;"></div>` : "", u = i.badge ? `<span style="display: inline-block; padding: 0.125rem 0.5rem; background-color: var(--sg-primary); color: #fff; border-radius: 9999px; font-size: 0.7rem; font-weight: 600; margin-bottom: 0.5rem;">${t(i.badge)}</span>` : "", p = i.icon ? `<span style="margin-right: 0.5rem;">${t(i.icon)}</span>` : "", f = i.primaryButton ? `<a href="${t(i.primaryButton.href || "#")}" class="sg-showcase__btn sg-showcase__btn--primary" style="display: inline-block; margin-top: 1rem; padding: 0.5rem 1rem; background-color: var(--sg-primary); color: var(--sg-primary-text); border-radius: var(--sg-button-radius, 0.5rem); text-decoration: none; font-weight: 500; font-size: 0.875rem; ${E}">${t(i.primaryButton.text)}</a>` : "";
|
|
65
|
+
return `<div style="background-color: var(--sg-surface); border-radius: var(--sg-card-radius, 0.75rem); overflow: hidden; box-shadow: var(--sg-card-shadow);">${b}<div style="padding: 1.5rem;">${u}<h3 style="font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem;">${p}${t(i.name)}</h3><p style="color: var(--sg-muted-text); font-size: 0.875rem;">${t(i.description)}</p>${f}</div></div>`;
|
|
66
|
+
}).join("");
|
|
67
|
+
return `${j}<style>${y}</style><section ${B(e.id)} ${I(e.id)} style="padding: 4rem 0; ${_}"><div style="max-width: 1200px; margin: 0 auto; padding: 0 1rem;">${z}<div data-block-group="Layout" id="${r}" style="${k}">${H}</div></div></section>`;
|
|
68
|
+
}
|
|
69
|
+
const M = T(e.id || "", "product-showcase"), A = d.map((r, h) => {
|
|
70
|
+
const k = m === "alternating" && h % 2 === 1, y = r.image ? `<img src="${t(r.image)}" alt="${t(r.name)}" style="width: 100%; border-radius: var(--sg-card-radius, 0.75rem); object-fit: cover;" />` : `<div style="width: 100%; height: 300px; background-color: var(--sg-surface); border-radius: var(--sg-card-radius, 0.75rem); display: flex; align-items: center; justify-content: center; font-size: 4rem;">${t(r.icon || "📦")}</div>`, H = r.badge ? `<span style="display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary); color: #fff; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; margin-bottom: 0.75rem;">${t(r.badge)}</span>` : "", i = r.icon ? `<span style="margin-right: 0.5rem;">${t(r.icon)}</span>` : "", b = r.features && r.features.length > 0 ? `<ul style="list-style: none; padding: 0; margin: 0 0 1.5rem 0;">${r.features.map((v) => `<li style="display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;"><span style="color: #10b981; font-weight: 700;">✓</span>${t(v)}</li>`).join("")}</ul>` : "", u = r.primaryButton ? `<a href="${t(r.primaryButton.href || "#")}" class="sg-showcase__btn sg-showcase__btn--primary" style="display: inline-block; padding: 0.625rem 1.25rem; background-color: var(--sg-primary); color: var(--sg-primary-text); border-radius: var(--sg-button-radius, 0.5rem); text-decoration: none; font-weight: 500; ${E}">${t(r.primaryButton.text)}</a>` : "", p = r.secondaryButton ? `<a href="${t(r.secondaryButton.href || "#")}" class="sg-showcase__btn sg-showcase__btn--secondary" style="display: inline-block; padding: 0.625rem 1.25rem; background-color: transparent; color: var(--sg-primary); border: 1px solid var(--sg-primary); border-radius: var(--sg-button-radius, 0.5rem); text-decoration: none; font-weight: 500; ${E}">${t(r.secondaryButton.text)}</a>` : "", f = u || p ? `<div style="display: flex; gap: 0.75rem; flex-wrap: wrap;">${u}${p}</div>` : "", o = `${M}-item-${h}`;
|
|
71
|
+
return `<style>
|
|
72
|
+
#${o} { flex-direction: column; }
|
|
73
|
+
@media (min-width: 768px) { #${o} { flex-direction: ${k ? "row-reverse" : "row"}; } }
|
|
74
|
+
</style><div id="${o}" style="display: flex; gap: 3rem; align-items: center;"><div style="flex: 1 1 50%;">${y}</div><div style="flex: 1 1 50%;">${H}<h3 style="font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem;">${i}${t(r.name)}</h3><p style="color: var(--sg-muted-text); margin-bottom: 1rem; line-height: 1.7;">${t(r.longDescription || r.description)}</p>${b}${f}</div></div>`;
|
|
75
|
+
}).join("");
|
|
76
|
+
return `${j}<section ${B(e.id)} ${I(e.id)} style="padding: 4rem 0; ${_}"><div style="max-width: 1200px; margin: 0 auto; padding: 0 1rem;">${z}<div data-block-group="Layout" style="display: flex; flex-direction: column; gap: 4rem;">${A}</div></div></section>`;
|
|
77
|
+
}
|
|
78
|
+
function tt(e, $, R, x) {
|
|
79
|
+
const {
|
|
80
|
+
title: n,
|
|
81
|
+
subtitle: l,
|
|
82
|
+
description: d,
|
|
83
|
+
secondaryDescription: m,
|
|
84
|
+
image: a,
|
|
85
|
+
achievements: w = [],
|
|
86
|
+
primaryButton: s,
|
|
87
|
+
variant: c = "image-left",
|
|
88
|
+
bg: g,
|
|
89
|
+
stats: _ = [],
|
|
90
|
+
buttonHoverEffect: N = "none",
|
|
91
|
+
buttonHoverIntensity: S = 50,
|
|
92
|
+
buttonHoverOverlay: O = "none",
|
|
93
|
+
buttonHoverIconName: C = "arrow-right"
|
|
94
|
+
} = e.props, z = g ? `background-color: ${t(g)};` : "background-color: var(--sg-bg);", j = c === "centered", M = c === "image-right", A = `[data-block-id="${e.id}"]`, r = q(A, "sg-about__btn", {
|
|
95
|
+
buttonHoverEffect: N,
|
|
96
|
+
buttonHoverIntensity: S,
|
|
97
|
+
buttonHoverOverlay: O,
|
|
98
|
+
buttonHoverIconName: C
|
|
99
|
+
}, x), h = l ? `<span style="display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary); color: #fff; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem;">${t(l)}</span>` : "", k = n ? `<h2 style="font-size: var(--sg-heading-h2); margin-bottom: 1rem;">${t(n)}</h2>` : "", y = d ? `<p style="color: var(--sg-muted-text); line-height: 1.7; margin-bottom: 1rem;">${t(d)}</p>` : "", H = m ? `<p style="color: var(--sg-muted-text); line-height: 1.7; margin-bottom: 1.5rem;">${t(m)}</p>` : "", i = w.length > 0 ? `<ul style="list-style: none; padding: 0; margin: 0 0 1.5rem 0;">${w.map((v) => `<li style="display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;"><span style="color: #10b981; font-weight: 700;">✓</span>${t(v.text)}</li>`).join("")}</ul>` : "", b = s ? `<a href="${t(s.href || "#")}" class="sg-about__btn sg-about__btn--primary" style="display: inline-block; padding: 0.75rem 1.5rem; background-color: var(--sg-primary); color: var(--sg-primary-text); border-radius: var(--sg-button-radius, 0.5rem); text-decoration: none; font-weight: 500; ${E}">${t(s.text)}</a>` : "", u = r ? `<style>${r}</style>` : "";
|
|
100
|
+
if (j) {
|
|
101
|
+
const v = a ? `<div data-block-group="Mídia" style="margin: 2rem 0;"><img src="${t(a)}" alt="${t(n || "About")}" style="width: 100%; border-radius: var(--sg-card-radius, 0.75rem); object-fit: cover;" /></div>` : "";
|
|
102
|
+
return `${u}<section ${B(e.id)} ${I(e.id)} style="padding: 4rem 0; ${z}"><div style="max-width: 800px; margin: 0 auto; padding: 0 1rem; text-align: center;">${h}${k}${v}${y}${H}${i}${b}</div></section>`;
|
|
103
|
+
}
|
|
104
|
+
const p = T(e.id || "", "about"), f = a ? `<img src="${t(a)}" alt="${t(n || "About")}" style="width: 100%; border-radius: var(--sg-card-radius, 0.75rem); object-fit: cover;" />` : '<div style="width: 100%; height: 400px; background-color: var(--sg-surface); border-radius: var(--sg-card-radius, 0.75rem); display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--sg-muted-text);">Imagem</div>', o = _.length > 0 ? `<div style="display: flex; gap: 0.5rem; margin-top: 1rem;">${_.map((v) => `<div style="background-color: var(--sg-primary); color: #fff; padding: 0.75rem 1rem; border-radius: var(--sg-card-radius, 0.75rem); text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,0.15); min-width: 80px;"><div style="font-size: 1.5rem; font-weight: 700;">${t(v.value)}</div><div style="font-size: 0.7rem; opacity: 0.9;">${t(v.label)}</div></div>`).join("")}</div>` : "";
|
|
105
|
+
return `${u}<style>
|
|
106
|
+
#${p} { flex-direction: column; }
|
|
107
|
+
@media (min-width: 768px) { #${p} { flex-direction: ${M ? "row-reverse" : "row"}; } }
|
|
108
|
+
</style><section ${B(e.id)} ${I(e.id)} style="padding: 4rem 0; ${z}"><div id="${p}" style="max-width: 1200px; margin: 0 auto; padding: 0 1rem; display: flex; gap: 3rem; align-items: center;"><div data-block-group="Mídia" style="flex: 1 1 50%; position: relative;">${f}${o}</div><div data-block-group="Conteúdo" style="flex: 1 1 50%;">${h}${k}${y}${H}${i}${b}</div></div></section>`;
|
|
109
|
+
}
|
|
110
|
+
const G = {
|
|
111
|
+
mail: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/></svg>',
|
|
112
|
+
phone: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z"/></svg>',
|
|
113
|
+
"map-pin": '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z"/><circle cx="12" cy="10" r="3"/></svg>',
|
|
114
|
+
clock: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>',
|
|
115
|
+
globe: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/></svg>'
|
|
116
|
+
};
|
|
117
|
+
function Z(e) {
|
|
118
|
+
return G[e] || G.mail;
|
|
119
|
+
}
|
|
120
|
+
function et(e, $, R, x) {
|
|
121
|
+
const {
|
|
122
|
+
title: n,
|
|
123
|
+
subtitle: l,
|
|
124
|
+
description: d,
|
|
125
|
+
contactInfo: m = [],
|
|
126
|
+
formTitle: a,
|
|
127
|
+
formFields: w = [],
|
|
128
|
+
submitText: s = "Enviar",
|
|
129
|
+
variant: c = "split",
|
|
130
|
+
bg: g,
|
|
131
|
+
buttonHoverEffect: _ = "none",
|
|
132
|
+
buttonHoverIntensity: N = 50,
|
|
133
|
+
buttonHoverOverlay: S = "none",
|
|
134
|
+
buttonHoverIconName: O = "arrow-right"
|
|
135
|
+
} = e.props, C = g ? `background-color: ${t(g)};` : "background-color: var(--sg-bg);", z = c === "form-only", j = c === "stacked", M = `[data-block-id="${e.id}"]`, A = q(M, "sg-contact__btn", {
|
|
136
|
+
buttonHoverEffect: _,
|
|
137
|
+
buttonHoverIntensity: N,
|
|
138
|
+
buttonHoverOverlay: S,
|
|
139
|
+
buttonHoverIconName: O
|
|
140
|
+
}, x), r = l ? `<span style="display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary); color: #fff; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem;">${t(l)}</span>` : "", h = n ? `<h2 style="font-size: var(--sg-heading-h2); margin-bottom: 0.5rem;">${t(n)}</h2>` : "", k = d ? `<p style="color: var(--sg-muted-text);">${t(d)}</p>` : "", y = n || l ? `<div data-block-group="Conteúdo" style="text-align: center; margin-bottom: 3rem;">${r}${h}${k}</div>` : "", H = w.map((o) => {
|
|
141
|
+
const v = o.label ? `<label style="display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; color: var(--sg-text);">${t(o.label)}${o.required ? '<span style="color: #ef4444;"> *</span>' : ""}</label>` : "", L = "width: 100%; padding: 0.625rem 0.75rem; border: 1px solid var(--sg-border); border-radius: var(--sg-button-radius, 0.5rem); font-size: 0.875rem; background-color: var(--sg-bg); color: var(--sg-text); box-sizing: border-box;", P = o.type === "textarea" ? `<textarea name="${t(o.name)}" placeholder="${t(o.placeholder || "")}" rows="4" style="${L} resize: vertical;"${o.required ? " required" : ""}></textarea>` : `<input type="${t(o.type || "text")}" name="${t(o.name)}" placeholder="${t(o.placeholder || "")}" style="${L}"${o.required ? " required" : ""} />`;
|
|
142
|
+
return `<div style="margin-bottom: 1rem;">${v}${P}</div>`;
|
|
143
|
+
}).join(""), i = `width: 100%; padding: 0.75rem 1.5rem; background-color: var(--sg-primary); color: var(--sg-primary-text); border: none; border-radius: var(--sg-button-radius, 0.5rem); font-weight: 500; cursor: pointer; font-size: 1rem; ${E}`, b = `<div data-block-group="Formulário" style="background-color: var(--sg-surface); border-radius: var(--sg-card-radius, 0.75rem); padding: 2rem; box-shadow: var(--sg-card-shadow);">${a ? `<h3 style="font-size: 1.25rem; font-weight: 600; margin-bottom: 1.5rem;">${t(a)}</h3>` : ""}<form>${H}<button type="submit" class="sg-contact__btn sg-contact__btn--primary" style="${i}">${t(s)}</button></form></div>`, u = A ? `<style>${A}</style>` : "";
|
|
144
|
+
if (z)
|
|
145
|
+
return `${u}<section ${B(e.id)} ${I(e.id)} style="padding: 4rem 0; ${C}"><div style="max-width: 600px; margin: 0 auto; padding: 0 1rem;">${y}${b}</div></section>`;
|
|
146
|
+
const p = m.map((o) => `<div style="display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem; background-color: var(--sg-surface); border-radius: var(--sg-card-radius, 0.75rem); box-shadow: var(--sg-card-shadow);"><div style="width: 2.5rem; height: 2.5rem; background-color: var(--sg-primary); border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;">${Z(o.icon || "mail")}</div><div><div style="font-weight: 600; font-size: 0.875rem; margin-bottom: 0.25rem;">${t(o.label)}</div><div style="color: var(--sg-muted-text); font-size: 0.875rem;">${t(o.value)}</div></div></div>`).join(""), f = T(e.id || "", "contact");
|
|
147
|
+
return j ? `${u}<section ${B(e.id)} ${I(e.id)} style="padding: 4rem 0; ${C}"><div style="max-width: 1200px; margin: 0 auto; padding: 0 1rem;">${y}${m.length > 0 ? `<div data-block-group="Info" style="display: flex; flex-direction: column; gap: 1rem; margin-bottom: 3rem;">${p}</div>` : ""}${b}</div></section>` : `${u}<style>
|
|
148
|
+
#${f} { flex-direction: column; }
|
|
149
|
+
@media (min-width: 768px) { #${f} { flex-direction: row; } }
|
|
150
|
+
</style><section ${B(e.id)} ${I(e.id)} style="padding: 4rem 0; ${C}"><div style="max-width: 1200px; margin: 0 auto; padding: 0 1rem;">${y}<div id="${f}" style="display: flex; gap: 3rem;">${m.length > 0 ? `<div data-block-group="Info" style="flex: 1 1 40%; display: flex; flex-direction: column; gap: 1rem;">${p}</div>` : ""}<div style="flex: 1 1 60%;">${b}</div></div></div></section>`;
|
|
151
|
+
}
|
|
152
|
+
export {
|
|
153
|
+
tt as exportAboutSection,
|
|
154
|
+
et as exportContactSection,
|
|
155
|
+
Y as exportProductShowcase
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=AdminSectionExporters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminSectionExporters.js","sources":["../../../../../src/engine/export/exporters/sections/AdminSectionExporters.ts"],"sourcesContent":["/**\n * Admin Section Exporters\n * ProductShowcase, AboutSection, ContactSection\n * Mobile-first responsive layouts with media queries\n */\n\nimport { Block } from \"../../../schema/siteDocument\";\nimport { ThemeTokens } from \"../../../schema/themeTokens\";\nimport { dataBlockIdAttr, blockIdAttr, escapeHtml } from \"../../shared/htmlHelpers\";\nimport { generateScopedId } from \"../../shared/idGenerator\";\nimport {\n resolveResponsiveColumns,\n generateResponsiveGridStyles,\n} from \"../../shared/responsiveGridHelper\";\nimport {\n generateButtonHoverStyles,\n generateButtonOverlayCSS,\n getButtonHoverKeyframes,\n type ButtonHoverEffect,\n type ButtonHoverOverlay,\n} from \"../../../shared/hoverEffects\";\n\n// ============================================================================\n// Shared: button hover CSS generator for admin sections\n// ============================================================================\n\nfunction generateAdminButtonHoverCSS(\n scope: string,\n classPrefix: string,\n props: {\n buttonHoverEffect: string;\n buttonHoverIntensity: number;\n buttonHoverOverlay: string;\n buttonHoverIconName: string;\n },\n theme?: ThemeTokens,\n): string {\n const {\n buttonHoverEffect,\n buttonHoverIntensity,\n buttonHoverOverlay,\n buttonHoverIconName,\n } = props;\n\n const primaryColor = theme?.colors?.primary || \"#6366f1\";\n const primaryText = theme?.colors?.primaryText || \"#ffffff\";\n let css = \"\";\n\n if (buttonHoverEffect !== \"none\") {\n const primaryResult = generateButtonHoverStyles({\n effect: buttonHoverEffect as ButtonHoverEffect,\n intensity: buttonHoverIntensity,\n buttonColor: primaryColor,\n buttonTextColor: primaryText,\n variant: \"solid\",\n });\n const outlineResult = generateButtonHoverStyles({\n effect: buttonHoverEffect as ButtonHoverEffect,\n intensity: buttonHoverIntensity,\n buttonColor: primaryColor,\n buttonTextColor: primaryColor,\n variant: \"outline\",\n });\n\n if (primaryResult.base) {\n css += `${scope} .${classPrefix}--primary { ${primaryResult.base} }`;\n }\n if (outlineResult.base) {\n css += `${scope} .${classPrefix}--secondary { ${outlineResult.base} }`;\n }\n css += `${scope} .${classPrefix}--primary:hover { ${primaryResult.hover} }`;\n css += `${scope} .${classPrefix}--secondary:hover { ${outlineResult.hover} }`;\n css += getButtonHoverKeyframes();\n }\n\n if (buttonHoverOverlay && buttonHoverOverlay !== \"none\") {\n css += generateButtonOverlayCSS(`${scope} .${classPrefix}--primary`, {\n overlay: buttonHoverOverlay as ButtonHoverOverlay,\n primaryColor,\n iconName: buttonHoverIconName,\n textColor: primaryText,\n });\n css += generateButtonOverlayCSS(`${scope} .${classPrefix}--secondary`, {\n overlay: buttonHoverOverlay as ButtonHoverOverlay,\n primaryColor,\n iconName: buttonHoverIconName,\n textColor: primaryColor,\n });\n }\n\n return css;\n}\n\nconst BTN_HOVER_BASE = \"position: relative; overflow: hidden; transition: all 0.2s ease;\";\n\n// ============================================================================\n// ProductShowcase\n// ============================================================================\n\nexport function exportProductShowcase(\n block: Block,\n _depth: number,\n _basePath?: string,\n theme?: ThemeTokens,\n): string {\n const {\n title,\n subtitle,\n products = [],\n variant = \"alternating\",\n bg,\n buttonHoverEffect = \"none\",\n buttonHoverIntensity = 50,\n buttonHoverOverlay = \"none\",\n buttonHoverIconName = \"arrow-right\",\n } = (block as any).props;\n\n const bgStyle = bg ? `background-color: ${escapeHtml(bg)};` : \"background-color: var(--sg-bg);\";\n const scope = `[data-block-id=\"${block.id}\"]`;\n\n // Hover CSS\n const hoverCss = generateAdminButtonHoverCSS(scope, \"sg-showcase__btn\", {\n buttonHoverEffect,\n buttonHoverIntensity,\n buttonHoverOverlay,\n buttonHoverIconName,\n }, theme);\n\n // Header\n const subtitleHtml = subtitle\n ? `<span style=\"display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary); color: #fff; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem;\">${escapeHtml(subtitle)}</span>`\n : \"\";\n const titleHtml = title\n ? `<h2 style=\"font-size: var(--sg-heading-h2); margin-bottom: 0.5rem;\">${escapeHtml(title)}</h2>`\n : \"\";\n const headerHtml =\n title || subtitle\n ? `<div data-block-group=\"Conteúdo\" style=\"text-align: center; margin-bottom: 3rem;\">${subtitleHtml}${titleHtml}</div>`\n : \"\";\n\n const stylePreamble = hoverCss ? `<style>${hoverCss}</style>` : \"\";\n\n if (variant === \"grid\") {\n const gridId = generateScopedId(block.id || \"\", \"product-grid\");\n const responsiveConfig = resolveResponsiveColumns(\n Math.min(products.length, 3),\n 1,\n 2,\n Math.min(products.length, 3),\n );\n const { inlineStyles, mediaQueries } = generateResponsiveGridStyles(gridId, responsiveConfig, \"2rem\");\n\n const cardsHtml = products\n .map((p: any) => {\n const imgHtml = p.image\n ? `<div style=\"width: 100%; height: 200px; background-image: url(${escapeHtml(p.image)}); background-size: cover; background-position: center;\"></div>`\n : \"\";\n const badgeHtml = p.badge\n ? `<span style=\"display: inline-block; padding: 0.125rem 0.5rem; background-color: var(--sg-primary); color: #fff; border-radius: 9999px; font-size: 0.7rem; font-weight: 600; margin-bottom: 0.5rem;\">${escapeHtml(p.badge)}</span>`\n : \"\";\n const iconHtml = p.icon ? `<span style=\"margin-right: 0.5rem;\">${escapeHtml(p.icon)}</span>` : \"\";\n const btnHtml = p.primaryButton\n ? `<a href=\"${escapeHtml(p.primaryButton.href || \"#\")}\" class=\"sg-showcase__btn sg-showcase__btn--primary\" style=\"display: inline-block; margin-top: 1rem; padding: 0.5rem 1rem; background-color: var(--sg-primary); color: var(--sg-primary-text); border-radius: var(--sg-button-radius, 0.5rem); text-decoration: none; font-weight: 500; font-size: 0.875rem; ${BTN_HOVER_BASE}\">${escapeHtml(p.primaryButton.text)}</a>`\n : \"\";\n return `<div style=\"background-color: var(--sg-surface); border-radius: var(--sg-card-radius, 0.75rem); overflow: hidden; box-shadow: var(--sg-card-shadow);\">${imgHtml}<div style=\"padding: 1.5rem;\">${badgeHtml}<h3 style=\"font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem;\">${iconHtml}${escapeHtml(p.name)}</h3><p style=\"color: var(--sg-muted-text); font-size: 0.875rem;\">${escapeHtml(p.description)}</p>${btnHtml}</div></div>`;\n })\n .join(\"\");\n\n return `${stylePreamble}<style>${mediaQueries}</style><section ${blockIdAttr(block.id)} ${dataBlockIdAttr(block.id)} style=\"padding: 4rem 0; ${bgStyle}\"><div style=\"max-width: 1200px; margin: 0 auto; padding: 0 1rem;\">${headerHtml}<div data-block-group=\"Layout\" id=\"${gridId}\" style=\"${inlineStyles}\">${cardsHtml}</div></div></section>`;\n }\n\n // alternating / stacked\n const scopeId = generateScopedId(block.id || \"\", \"product-showcase\");\n const productsHtml = products\n .map((p: any, index: number) => {\n const isReversed = variant === \"alternating\" && index % 2 === 1;\n\n const imgHtml = p.image\n ? `<img src=\"${escapeHtml(p.image)}\" alt=\"${escapeHtml(p.name)}\" style=\"width: 100%; border-radius: var(--sg-card-radius, 0.75rem); object-fit: cover;\" />`\n : `<div style=\"width: 100%; height: 300px; background-color: var(--sg-surface); border-radius: var(--sg-card-radius, 0.75rem); display: flex; align-items: center; justify-content: center; font-size: 4rem;\">${escapeHtml(p.icon || \"📦\")}</div>`;\n\n const badgeHtml = p.badge\n ? `<span style=\"display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary); color: #fff; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; margin-bottom: 0.75rem;\">${escapeHtml(p.badge)}</span>`\n : \"\";\n const iconHtml = p.icon ? `<span style=\"margin-right: 0.5rem;\">${escapeHtml(p.icon)}</span>` : \"\";\n\n const featuresHtml =\n p.features && p.features.length > 0\n ? `<ul style=\"list-style: none; padding: 0; margin: 0 0 1.5rem 0;\">${p.features.map((f: string) => `<li style=\"display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;\"><span style=\"color: #10b981; font-weight: 700;\">✓</span>${escapeHtml(f)}</li>`).join(\"\")}</ul>`\n : \"\";\n\n const primaryBtnHtml = p.primaryButton\n ? `<a href=\"${escapeHtml(p.primaryButton.href || \"#\")}\" class=\"sg-showcase__btn sg-showcase__btn--primary\" style=\"display: inline-block; padding: 0.625rem 1.25rem; background-color: var(--sg-primary); color: var(--sg-primary-text); border-radius: var(--sg-button-radius, 0.5rem); text-decoration: none; font-weight: 500; ${BTN_HOVER_BASE}\">${escapeHtml(p.primaryButton.text)}</a>`\n : \"\";\n const secondaryBtnHtml = p.secondaryButton\n ? `<a href=\"${escapeHtml(p.secondaryButton.href || \"#\")}\" class=\"sg-showcase__btn sg-showcase__btn--secondary\" style=\"display: inline-block; padding: 0.625rem 1.25rem; background-color: transparent; color: var(--sg-primary); border: 1px solid var(--sg-primary); border-radius: var(--sg-button-radius, 0.5rem); text-decoration: none; font-weight: 500; ${BTN_HOVER_BASE}\">${escapeHtml(p.secondaryButton.text)}</a>`\n : \"\";\n const buttonsHtml =\n primaryBtnHtml || secondaryBtnHtml\n ? `<div style=\"display: flex; gap: 0.75rem; flex-wrap: wrap;\">${primaryBtnHtml}${secondaryBtnHtml}</div>`\n : \"\";\n\n const itemId = `${scopeId}-item-${index}`;\n\n return `<style>\n #${itemId} { flex-direction: column; }\n @media (min-width: 768px) { #${itemId} { flex-direction: ${isReversed ? \"row-reverse\" : \"row\"}; } }\n</style><div id=\"${itemId}\" style=\"display: flex; gap: 3rem; align-items: center;\"><div style=\"flex: 1 1 50%;\">${imgHtml}</div><div style=\"flex: 1 1 50%;\">${badgeHtml}<h3 style=\"font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem;\">${iconHtml}${escapeHtml(p.name)}</h3><p style=\"color: var(--sg-muted-text); margin-bottom: 1rem; line-height: 1.7;\">${escapeHtml(p.longDescription || p.description)}</p>${featuresHtml}${buttonsHtml}</div></div>`;\n })\n .join(\"\");\n\n return `${stylePreamble}<section ${blockIdAttr(block.id)} ${dataBlockIdAttr(block.id)} style=\"padding: 4rem 0; ${bgStyle}\"><div style=\"max-width: 1200px; margin: 0 auto; padding: 0 1rem;\">${headerHtml}<div data-block-group=\"Layout\" style=\"display: flex; flex-direction: column; gap: 4rem;\">${productsHtml}</div></div></section>`;\n}\n\n// ============================================================================\n// AboutSection\n// ============================================================================\n\nexport function exportAboutSection(\n block: Block,\n _depth: number,\n _basePath?: string,\n theme?: ThemeTokens,\n): string {\n const {\n title,\n subtitle,\n description,\n secondaryDescription,\n image,\n achievements = [],\n primaryButton,\n variant = \"image-left\",\n bg,\n stats = [],\n buttonHoverEffect = \"none\",\n buttonHoverIntensity = 50,\n buttonHoverOverlay = \"none\",\n buttonHoverIconName = \"arrow-right\",\n } = (block as any).props;\n\n const bgStyle = bg ? `background-color: ${escapeHtml(bg)};` : \"background-color: var(--sg-bg);\";\n const isCentered = variant === \"centered\";\n const isReversed = variant === \"image-right\";\n const scope = `[data-block-id=\"${block.id}\"]`;\n\n // Hover CSS\n const hoverCss = generateAdminButtonHoverCSS(scope, \"sg-about__btn\", {\n buttonHoverEffect,\n buttonHoverIntensity,\n buttonHoverOverlay,\n buttonHoverIconName,\n }, theme);\n\n const subtitleHtml = subtitle\n ? `<span style=\"display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary); color: #fff; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem;\">${escapeHtml(subtitle)}</span>`\n : \"\";\n const titleHtml = title\n ? `<h2 style=\"font-size: var(--sg-heading-h2); margin-bottom: 1rem;\">${escapeHtml(title)}</h2>`\n : \"\";\n const descHtml = description\n ? `<p style=\"color: var(--sg-muted-text); line-height: 1.7; margin-bottom: 1rem;\">${escapeHtml(description)}</p>`\n : \"\";\n const secondaryDescHtml = secondaryDescription\n ? `<p style=\"color: var(--sg-muted-text); line-height: 1.7; margin-bottom: 1.5rem;\">${escapeHtml(secondaryDescription)}</p>`\n : \"\";\n const achievementsHtml =\n achievements.length > 0\n ? `<ul style=\"list-style: none; padding: 0; margin: 0 0 1.5rem 0;\">${achievements.map((a: any) => `<li style=\"display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;\"><span style=\"color: #10b981; font-weight: 700;\">✓</span>${escapeHtml(a.text)}</li>`).join(\"\")}</ul>`\n : \"\";\n const buttonHtml = primaryButton\n ? `<a href=\"${escapeHtml(primaryButton.href || \"#\")}\" class=\"sg-about__btn sg-about__btn--primary\" style=\"display: inline-block; padding: 0.75rem 1.5rem; background-color: var(--sg-primary); color: var(--sg-primary-text); border-radius: var(--sg-button-radius, 0.5rem); text-decoration: none; font-weight: 500; ${BTN_HOVER_BASE}\">${escapeHtml(primaryButton.text)}</a>`\n : \"\";\n\n const stylePreamble = hoverCss ? `<style>${hoverCss}</style>` : \"\";\n\n if (isCentered) {\n const imgHtml = image\n ? `<div data-block-group=\"Mídia\" style=\"margin: 2rem 0;\"><img src=\"${escapeHtml(image)}\" alt=\"${escapeHtml(title || \"About\")}\" style=\"width: 100%; border-radius: var(--sg-card-radius, 0.75rem); object-fit: cover;\" /></div>`\n : \"\";\n return `${stylePreamble}<section ${blockIdAttr(block.id)} ${dataBlockIdAttr(block.id)} style=\"padding: 4rem 0; ${bgStyle}\"><div style=\"max-width: 800px; margin: 0 auto; padding: 0 1rem; text-align: center;\">${subtitleHtml}${titleHtml}${imgHtml}${descHtml}${secondaryDescHtml}${achievementsHtml}${buttonHtml}</div></section>`;\n }\n\n // image-left / image-right\n const scopeId = generateScopedId(block.id || \"\", \"about\");\n const imgHtml = image\n ? `<img src=\"${escapeHtml(image)}\" alt=\"${escapeHtml(title || \"About\")}\" style=\"width: 100%; border-radius: var(--sg-card-radius, 0.75rem); object-fit: cover;\" />`\n : `<div style=\"width: 100%; height: 400px; background-color: var(--sg-surface); border-radius: var(--sg-card-radius, 0.75rem); display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--sg-muted-text);\">Imagem</div>`;\n\n const statsHtml =\n stats.length > 0\n ? `<div style=\"display: flex; gap: 0.5rem; margin-top: 1rem;\">${stats.map((s: any) => `<div style=\"background-color: var(--sg-primary); color: #fff; padding: 0.75rem 1rem; border-radius: var(--sg-card-radius, 0.75rem); text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,0.15); min-width: 80px;\"><div style=\"font-size: 1.5rem; font-weight: 700;\">${escapeHtml(s.value)}</div><div style=\"font-size: 0.7rem; opacity: 0.9;\">${escapeHtml(s.label)}</div></div>`).join(\"\")}</div>`\n : \"\";\n\n return `${stylePreamble}<style>\n #${scopeId} { flex-direction: column; }\n @media (min-width: 768px) { #${scopeId} { flex-direction: ${isReversed ? \"row-reverse\" : \"row\"}; } }\n</style><section ${blockIdAttr(block.id)} ${dataBlockIdAttr(block.id)} style=\"padding: 4rem 0; ${bgStyle}\"><div id=\"${scopeId}\" style=\"max-width: 1200px; margin: 0 auto; padding: 0 1rem; display: flex; gap: 3rem; align-items: center;\"><div data-block-group=\"Mídia\" style=\"flex: 1 1 50%; position: relative;\">${imgHtml}${statsHtml}</div><div data-block-group=\"Conteúdo\" style=\"flex: 1 1 50%;\">${subtitleHtml}${titleHtml}${descHtml}${secondaryDescHtml}${achievementsHtml}${buttonHtml}</div></div></section>`;\n}\n\n// ============================================================================\n// ContactSection\n// ============================================================================\n\nconst CONTACT_ICON_SVG: Record<string, string> = {\n mail: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect width=\"20\" height=\"16\" x=\"2\" y=\"4\" rx=\"2\"/><path d=\"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7\"/></svg>`,\n phone: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z\"/></svg>`,\n \"map-pin\": `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z\"/><circle cx=\"12\" cy=\"10\" r=\"3\"/></svg>`,\n clock: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><polyline points=\"12 6 12 12 16 14\"/></svg>`,\n globe: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\"/><path d=\"M2 12h20\"/></svg>`,\n};\n\nfunction getContactIconSvg(icon: string): string {\n return CONTACT_ICON_SVG[icon] || CONTACT_ICON_SVG.mail;\n}\n\nexport function exportContactSection(\n block: Block,\n _depth: number,\n _basePath?: string,\n theme?: ThemeTokens,\n): string {\n const {\n title,\n subtitle,\n description,\n contactInfo = [],\n formTitle,\n formFields = [],\n submitText = \"Enviar\",\n variant = \"split\",\n bg,\n buttonHoverEffect = \"none\",\n buttonHoverIntensity = 50,\n buttonHoverOverlay = \"none\",\n buttonHoverIconName = \"arrow-right\",\n } = (block as any).props;\n\n const bgStyle = bg ? `background-color: ${escapeHtml(bg)};` : \"background-color: var(--sg-bg);\";\n const isFormOnly = variant === \"form-only\";\n const isStacked = variant === \"stacked\";\n const scope = `[data-block-id=\"${block.id}\"]`;\n\n // Hover CSS — submit button uses --primary class\n const hoverCss = generateAdminButtonHoverCSS(scope, \"sg-contact__btn\", {\n buttonHoverEffect,\n buttonHoverIntensity,\n buttonHoverOverlay,\n buttonHoverIconName,\n }, theme);\n\n const subtitleHtml = subtitle\n ? `<span style=\"display: inline-block; padding: 0.25rem 0.75rem; background-color: var(--sg-primary); color: #fff; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem;\">${escapeHtml(subtitle)}</span>`\n : \"\";\n const titleHtml = title\n ? `<h2 style=\"font-size: var(--sg-heading-h2); margin-bottom: 0.5rem;\">${escapeHtml(title)}</h2>`\n : \"\";\n const descHtml = description\n ? `<p style=\"color: var(--sg-muted-text);\">${escapeHtml(description)}</p>`\n : \"\";\n const headerHtml =\n title || subtitle\n ? `<div data-block-group=\"Conteúdo\" style=\"text-align: center; margin-bottom: 3rem;\">${subtitleHtml}${titleHtml}${descHtml}</div>`\n : \"\";\n\n // Form HTML\n const fieldsHtml = formFields\n .map((field: any) => {\n const labelHtml = field.label\n ? `<label style=\"display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; color: var(--sg-text);\">${escapeHtml(field.label)}${field.required ? '<span style=\"color: #ef4444;\"> *</span>' : \"\"}</label>`\n : \"\";\n const inputStyle = `width: 100%; padding: 0.625rem 0.75rem; border: 1px solid var(--sg-border); border-radius: var(--sg-button-radius, 0.5rem); font-size: 0.875rem; background-color: var(--sg-bg); color: var(--sg-text); box-sizing: border-box;`;\n const inputHtml =\n field.type === \"textarea\"\n ? `<textarea name=\"${escapeHtml(field.name)}\" placeholder=\"${escapeHtml(field.placeholder || \"\")}\" rows=\"4\" style=\"${inputStyle} resize: vertical;\"${field.required ? \" required\" : \"\"}></textarea>`\n : `<input type=\"${escapeHtml(field.type || \"text\")}\" name=\"${escapeHtml(field.name)}\" placeholder=\"${escapeHtml(field.placeholder || \"\")}\" style=\"${inputStyle}\"${field.required ? \" required\" : \"\"} />`;\n return `<div style=\"margin-bottom: 1rem;\">${labelHtml}${inputHtml}</div>`;\n })\n .join(\"\");\n\n const submitBtnStyle = `width: 100%; padding: 0.75rem 1.5rem; background-color: var(--sg-primary); color: var(--sg-primary-text); border: none; border-radius: var(--sg-button-radius, 0.5rem); font-weight: 500; cursor: pointer; font-size: 1rem; ${BTN_HOVER_BASE}`;\n\n const formHtml = `<div data-block-group=\"Formulário\" style=\"background-color: var(--sg-surface); border-radius: var(--sg-card-radius, 0.75rem); padding: 2rem; box-shadow: var(--sg-card-shadow);\">${formTitle ? `<h3 style=\"font-size: 1.25rem; font-weight: 600; margin-bottom: 1.5rem;\">${escapeHtml(formTitle)}</h3>` : \"\"}<form>${fieldsHtml}<button type=\"submit\" class=\"sg-contact__btn sg-contact__btn--primary\" style=\"${submitBtnStyle}\">${escapeHtml(submitText)}</button></form></div>`;\n\n const stylePreamble = hoverCss ? `<style>${hoverCss}</style>` : \"\";\n\n if (isFormOnly) {\n return `${stylePreamble}<section ${blockIdAttr(block.id)} ${dataBlockIdAttr(block.id)} style=\"padding: 4rem 0; ${bgStyle}\"><div style=\"max-width: 600px; margin: 0 auto; padding: 0 1rem;\">${headerHtml}${formHtml}</div></section>`;\n }\n\n // Contact info cards\n const contactCardsHtml = contactInfo\n .map((info: any) => {\n const iconSvg = getContactIconSvg(info.icon || \"mail\");\n return `<div style=\"display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem; background-color: var(--sg-surface); border-radius: var(--sg-card-radius, 0.75rem); box-shadow: var(--sg-card-shadow);\"><div style=\"width: 2.5rem; height: 2.5rem; background-color: var(--sg-primary); border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;\">${iconSvg}</div><div><div style=\"font-weight: 600; font-size: 0.875rem; margin-bottom: 0.25rem;\">${escapeHtml(info.label)}</div><div style=\"color: var(--sg-muted-text); font-size: 0.875rem;\">${escapeHtml(info.value)}</div></div></div>`;\n })\n .join(\"\");\n\n const scopeId = generateScopedId(block.id || \"\", \"contact\");\n\n if (isStacked) {\n return `${stylePreamble}<section ${blockIdAttr(block.id)} ${dataBlockIdAttr(block.id)} style=\"padding: 4rem 0; ${bgStyle}\"><div style=\"max-width: 1200px; margin: 0 auto; padding: 0 1rem;\">${headerHtml}${contactInfo.length > 0 ? `<div data-block-group=\"Info\" style=\"display: flex; flex-direction: column; gap: 1rem; margin-bottom: 3rem;\">${contactCardsHtml}</div>` : \"\"}${formHtml}</div></section>`;\n }\n\n // split layout\n return `${stylePreamble}<style>\n #${scopeId} { flex-direction: column; }\n @media (min-width: 768px) { #${scopeId} { flex-direction: row; } }\n</style><section ${blockIdAttr(block.id)} ${dataBlockIdAttr(block.id)} style=\"padding: 4rem 0; ${bgStyle}\"><div style=\"max-width: 1200px; margin: 0 auto; padding: 0 1rem;\">${headerHtml}<div id=\"${scopeId}\" style=\"display: flex; gap: 3rem;\">${contactInfo.length > 0 ? `<div data-block-group=\"Info\" style=\"flex: 1 1 40%; display: flex; flex-direction: column; gap: 1rem;\">${contactCardsHtml}</div>` : \"\"}<div style=\"flex: 1 1 60%;\">${formHtml}</div></div></div></section>`;\n}\n"],"names":["generateAdminButtonHoverCSS","scope","classPrefix","props","theme","buttonHoverEffect","buttonHoverIntensity","buttonHoverOverlay","buttonHoverIconName","primaryColor","primaryText","css","primaryResult","generateButtonHoverStyles","outlineResult","getButtonHoverKeyframes","generateButtonOverlayCSS","BTN_HOVER_BASE","exportProductShowcase","block","_depth","_basePath","title","subtitle","products","variant","bg","bgStyle","escapeHtml","hoverCss","subtitleHtml","titleHtml","headerHtml","stylePreamble","gridId","generateScopedId","responsiveConfig","resolveResponsiveColumns","inlineStyles","mediaQueries","generateResponsiveGridStyles","cardsHtml","p","imgHtml","badgeHtml","iconHtml","btnHtml","blockIdAttr","dataBlockIdAttr","scopeId","productsHtml","index","isReversed","featuresHtml","f","primaryBtnHtml","secondaryBtnHtml","buttonsHtml","itemId","exportAboutSection","description","secondaryDescription","image","achievements","primaryButton","stats","isCentered","descHtml","secondaryDescHtml","achievementsHtml","a","buttonHtml","statsHtml","s","CONTACT_ICON_SVG","getContactIconSvg","icon","exportContactSection","contactInfo","formTitle","formFields","submitText","isFormOnly","isStacked","fieldsHtml","field","labelHtml","inputStyle","inputHtml","submitBtnStyle","formHtml","contactCardsHtml","info"],"mappings":";;;;AA0BA,SAASA,EACPC,GACAC,GACAC,GAMAC,GACQ;AACR,QAAM;AAAA,IACJ,mBAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,qBAAAC;AAAA,EAAA,IACEL,GAEEM,IAAeL,GAAO,QAAQ,WAAW,WACzCM,IAAcN,GAAO,QAAQ,eAAe;AAClD,MAAIO,IAAM;AAEV,MAAIN,MAAsB,QAAQ;AAChC,UAAMO,IAAgBC,EAA0B;AAAA,MAC9C,QAAQR;AAAA,MACR,WAAWC;AAAA,MACX,aAAaG;AAAA,MAEb,SAAS;AAAA,IAAA,CACV,GACKK,IAAgBD,EAA0B;AAAA,MAC9C,QAAQR;AAAA,MACR,WAAWC;AAAA,MACX,aAAaG;AAAA,MAEb,SAAS;AAAA,IAAA,CACV;AAED,IAAIG,EAAc,SAChBD,KAAO,GAAGV,CAAK,KAAKC,CAAW,eAAeU,EAAc,IAAI,OAE9DE,EAAc,SAChBH,KAAO,GAAGV,CAAK,KAAKC,CAAW,iBAAiBY,EAAc,IAAI,OAEpEH,KAAO,GAAGV,CAAK,KAAKC,CAAW,qBAAqBU,EAAc,KAAK,MACvED,KAAO,GAAGV,CAAK,KAAKC,CAAW,uBAAuBY,EAAc,KAAK,MACzEH,KAAOI,EAAA;AAAA,EACT;AAEA,SAAIR,KAAsBA,MAAuB,WAC/CI,KAAOK,EAAyB,GAAGf,CAAK,KAAKC,CAAW,aAAa;AAAA,IACnE,SAASK;AAAA,I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":"index.d.ts","sourceRoot":"","sources":["../../../../../src/engine/export/exporters/sections/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AA0CH,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI1D,wBAAgB,8BAA8B,CAC5C,EAAE,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW,KAAK,MAAM,QAGpF"}
|
|
@@ -1,62 +1,66 @@
|
|
|
1
1
|
import { htmlExportRegistry as r } from "../HtmlExporter.js";
|
|
2
|
-
import { exportHero as
|
|
3
|
-
import { exportNavbar as
|
|
2
|
+
import { exportHero as a } from "./HeroExporter.js";
|
|
3
|
+
import { exportNavbar as d } from "./NavbarExporter.js";
|
|
4
4
|
import { exportFooter as s } from "./FooterExporter.js";
|
|
5
|
-
import { exportFeature as g, exportCta as
|
|
6
|
-
import { exportBlogCard as P, exportTeamCard as
|
|
7
|
-
import { exportBlogPostCard as
|
|
5
|
+
import { exportFeature as g, exportCta as p, exportPricingCard as l, exportTestimonial as x, exportFaqItem as m, exportStats as C, exportStatItem as u, exportLogoCloud as c, exportSocialLinks as h, exportFeatureGrid as f, exportPricing as w, exportTestimonialGrid as G, exportFaq as b } from "./MarketingExporters.js";
|
|
6
|
+
import { exportBlogCard as P, exportTeamCard as S, exportCourseCardGrid as E, exportCountdown as z, exportCarousel as B, exportBlogCardGrid as F, exportTeamGrid as q } from "./ContentGridExporters.js";
|
|
7
|
+
import { exportBlogPostCard as I, exportBlogPostDetail as T, exportBlogPostGrid as L } from "./BlogPostExporters.js";
|
|
8
|
+
import { exportProductShowcase as R, exportAboutSection as k, exportContactSection as v } from "./AdminSectionExporters.js";
|
|
8
9
|
let t = null;
|
|
9
|
-
function
|
|
10
|
+
function M(e) {
|
|
10
11
|
t = e;
|
|
11
12
|
}
|
|
12
|
-
r.register("hero",
|
|
13
|
-
r.register("navbar",
|
|
13
|
+
r.register("hero", a);
|
|
14
|
+
r.register("navbar", d);
|
|
14
15
|
r.register("footer", s);
|
|
15
16
|
r.register("feature", g);
|
|
16
|
-
r.register("cta",
|
|
17
|
-
r.register("pricingCard",
|
|
17
|
+
r.register("cta", p);
|
|
18
|
+
r.register("pricingCard", l);
|
|
18
19
|
r.register("testimonial", x);
|
|
19
20
|
r.register("faqItem", m);
|
|
20
21
|
r.register("stats", C);
|
|
21
|
-
r.register("statItem",
|
|
22
|
-
r.register("logoCloud",
|
|
23
|
-
r.register("socialLinks",
|
|
22
|
+
r.register("statItem", u);
|
|
23
|
+
r.register("logoCloud", c);
|
|
24
|
+
r.register("socialLinks", h);
|
|
24
25
|
r.register("blogCard", P);
|
|
25
|
-
r.register("blogPostCard",
|
|
26
|
+
r.register("blogPostCard", I);
|
|
26
27
|
r.register("blogPostDetail", T);
|
|
27
|
-
r.register("teamCard",
|
|
28
|
-
r.register("courseCardGrid",
|
|
29
|
-
r.register("countdown",
|
|
30
|
-
r.register("carousel",
|
|
31
|
-
r.register("
|
|
28
|
+
r.register("teamCard", S);
|
|
29
|
+
r.register("courseCardGrid", E);
|
|
30
|
+
r.register("countdown", z);
|
|
31
|
+
r.register("carousel", B);
|
|
32
|
+
r.register("productShowcase", R);
|
|
33
|
+
r.register("aboutSection", k);
|
|
34
|
+
r.register("contactSection", v);
|
|
35
|
+
r.register("featureGrid", (e, o, i, n) => {
|
|
32
36
|
if (!t) throw new Error("renderChild not initialized");
|
|
33
|
-
return
|
|
37
|
+
return f(e);
|
|
34
38
|
});
|
|
35
|
-
r.register("pricing", (e,
|
|
39
|
+
r.register("pricing", (e, o, i, n) => {
|
|
36
40
|
if (!t) throw new Error("renderChild not initialized");
|
|
37
|
-
return
|
|
41
|
+
return w(e, o, i, n, t);
|
|
38
42
|
});
|
|
39
|
-
r.register("testimonialGrid", (e,
|
|
43
|
+
r.register("testimonialGrid", (e, o, i, n) => {
|
|
40
44
|
if (!t) throw new Error("renderChild not initialized");
|
|
41
|
-
return G(e,
|
|
45
|
+
return G(e, o, i, n, t);
|
|
42
46
|
});
|
|
43
|
-
r.register("faq", (e,
|
|
47
|
+
r.register("faq", (e, o, i, n) => {
|
|
44
48
|
if (!t) throw new Error("renderChild not initialized");
|
|
45
|
-
return
|
|
49
|
+
return b(e, o, i, n, t);
|
|
46
50
|
});
|
|
47
|
-
r.register("blogCardGrid", (e,
|
|
51
|
+
r.register("blogCardGrid", (e, o, i, n) => {
|
|
48
52
|
if (!t) throw new Error("renderChild not initialized");
|
|
49
|
-
return
|
|
53
|
+
return F(e, o, i, n, t);
|
|
50
54
|
});
|
|
51
|
-
r.register("blogPostGrid", (e,
|
|
55
|
+
r.register("blogPostGrid", (e, o, i, n) => {
|
|
52
56
|
if (!t) throw new Error("renderChild not initialized");
|
|
53
|
-
return L(e,
|
|
57
|
+
return L(e, o, i, n, t);
|
|
54
58
|
});
|
|
55
|
-
r.register("teamGrid", (e,
|
|
59
|
+
r.register("teamGrid", (e, o, i, n) => {
|
|
56
60
|
if (!t) throw new Error("renderChild not initialized");
|
|
57
|
-
return
|
|
61
|
+
return q(e, o, i, n, t);
|
|
58
62
|
});
|
|
59
63
|
export {
|
|
60
|
-
|
|
64
|
+
M as setSectionExportersRenderChild
|
|
61
65
|
};
|
|
62
66
|
//# sourceMappingURL=index.js.map
|