@brunoalz/smartgesti-site-editor 1.5.2 → 1.7.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/LandingPageEditor.d.ts.map +1 -1
- package/dist/editor/LandingPageEditor.js +199 -185
- package/dist/editor/LandingPageEditor.js.map +1 -1
- package/dist/editor/PropertyEditor/VariationSelector.d.ts +1 -1
- package/dist/editor/PropertyEditor/VariationSelector.d.ts.map +1 -1
- package/dist/editor/PropertyEditor/VariationSelector.js +262 -93
- package/dist/editor/PropertyEditor/VariationSelector.js.map +1 -1
- package/dist/engine/export/exporters/layout/GridExporter.d.ts.map +1 -1
- package/dist/engine/export/exporters/layout/GridExporter.js +47 -31
- package/dist/engine/export/exporters/layout/GridExporter.js.map +1 -1
- package/dist/engine/export/exporters/layout/StackExporter.d.ts.map +1 -1
- package/dist/engine/export/exporters/layout/StackExporter.js +17 -16
- package/dist/engine/export/exporters/layout/StackExporter.js.map +1 -1
- package/dist/engine/export/exporters/sections/BlogPostExporters.d.ts.map +1 -1
- package/dist/engine/export/exporters/sections/BlogPostExporters.js +246 -186
- package/dist/engine/export/exporters/sections/BlogPostExporters.js.map +1 -1
- package/dist/engine/plugins/builtin/blog/manifest.d.ts.map +1 -1
- package/dist/engine/plugins/builtin/blog/manifest.js +65 -47
- package/dist/engine/plugins/builtin/blog/manifest.js.map +1 -1
- package/dist/engine/presets/blogVariations.d.ts +51 -0
- package/dist/engine/presets/blogVariations.d.ts.map +1 -0
- package/dist/engine/presets/blogVariations.js +267 -0
- package/dist/engine/presets/blogVariations.js.map +1 -0
- package/dist/engine/registry/blocks/layout/grid.d.ts.map +1 -1
- package/dist/engine/registry/blocks/layout/grid.js +84 -42
- package/dist/engine/registry/blocks/layout/grid.js.map +1 -1
- package/dist/engine/registry/blocks/layout/stack.d.ts.map +1 -1
- package/dist/engine/registry/blocks/layout/stack.js +14 -13
- package/dist/engine/registry/blocks/layout/stack.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogCategoryFilter.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogCategoryFilter.js +62 -5
- package/dist/engine/registry/blocks/sections/blogCategoryFilter.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogPostDetail.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogPostDetail.js +16 -4
- package/dist/engine/registry/blocks/sections/blogPostDetail.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogRecentPosts.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogRecentPosts.js +62 -5
- package/dist/engine/registry/blocks/sections/blogRecentPosts.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogSearchBar.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogSearchBar.js +23 -1
- package/dist/engine/registry/blocks/sections/blogSearchBar.js.map +1 -1
- package/dist/engine/registry/blocks/sections/blogTagCloud.d.ts.map +1 -1
- package/dist/engine/registry/blocks/sections/blogTagCloud.js +63 -6
- package/dist/engine/registry/blocks/sections/blogTagCloud.js.map +1 -1
- package/dist/engine/render/renderers/layout/GridRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/layout/GridRenderer.js +51 -18
- package/dist/engine/render/renderers/layout/GridRenderer.js.map +1 -1
- package/dist/engine/render/renderers/layout/StackRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/layout/StackRenderer.js +30 -25
- package/dist/engine/render/renderers/layout/StackRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/BlogCategoryFilterRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/BlogCategoryFilterRenderer.js +157 -132
- package/dist/engine/render/renderers/sections/BlogCategoryFilterRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/BlogPostDetailRenderer.js +17 -17
- package/dist/engine/render/renderers/sections/BlogPostDetailRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/BlogRecentPostsRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/BlogRecentPostsRenderer.js +168 -136
- package/dist/engine/render/renderers/sections/BlogRecentPostsRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/BlogSearchBarRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/BlogSearchBarRenderer.js +59 -102
- package/dist/engine/render/renderers/sections/BlogSearchBarRenderer.js.map +1 -1
- package/dist/engine/render/renderers/sections/BlogTagCloudRenderer.d.ts.map +1 -1
- package/dist/engine/render/renderers/sections/BlogTagCloudRenderer.js +158 -122
- package/dist/engine/render/renderers/sections/BlogTagCloudRenderer.js.map +1 -1
- package/dist/engine/schema/siteDocument.d.ts +57 -1
- package/dist/engine/schema/siteDocument.d.ts.map +1 -1
- package/dist/engine/schema/siteDocument.js.map +1 -1
- package/dist/engine/shared/hoverEffects/colorUtils.d.ts +2 -1
- package/dist/engine/shared/hoverEffects/colorUtils.d.ts.map +1 -1
- package/dist/engine/shared/hoverEffects/colorUtils.js +16 -12
- package/dist/engine/shared/hoverEffects/colorUtils.js.map +1 -1
- package/dist/engine/shared/widgetStyles.d.ts +9 -0
- package/dist/engine/shared/widgetStyles.d.ts.map +1 -0
- package/dist/engine/shared/widgetStyles.js +13 -0
- package/dist/engine/shared/widgetStyles.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +84 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import { dataBlockIdAttr as
|
|
2
|
-
import { generateScopedId as
|
|
3
|
-
import { generateFlexDirectionMediaQueries as
|
|
4
|
-
function
|
|
1
|
+
import { dataBlockIdAttr as m } from "../../shared/htmlHelpers.js";
|
|
2
|
+
import { generateScopedId as D } from "../../shared/idGenerator.js";
|
|
3
|
+
import { generateFlexDirectionMediaQueries as b, BREAKPOINTS as A } from "../../shared/responsiveGridHelper.js";
|
|
4
|
+
function O(t, $, x, y, r) {
|
|
5
5
|
const {
|
|
6
|
-
direction:
|
|
6
|
+
direction: s = "col",
|
|
7
7
|
gap: u = "1rem",
|
|
8
8
|
align: i = "stretch",
|
|
9
9
|
justify: e = "start",
|
|
10
|
-
wrap:
|
|
11
|
-
sticky:
|
|
10
|
+
wrap: g = !1,
|
|
11
|
+
sticky: a = !1,
|
|
12
12
|
stickyOffset: w = "80px",
|
|
13
|
-
|
|
13
|
+
paddingBottom: c,
|
|
14
|
+
children: h = []
|
|
14
15
|
} = t.props;
|
|
15
|
-
if (!
|
|
16
|
+
if (!r)
|
|
16
17
|
throw new Error("exportStack requires renderChild function");
|
|
17
|
-
const n =
|
|
18
|
-
let
|
|
19
|
-
const
|
|
20
|
-
|
|
18
|
+
const n = D(t.id || "", "stack"), d = s === "row", l = "column", k = s === "row" ? "row" : "column", I = i === "start" ? "flex-start" : i === "end" ? "flex-end" : i === "center" ? "center" : "stretch", S = e === "start" ? "flex-start" : e === "end" ? "flex-end" : e === "center" ? "center" : e === "space-between" ? "space-between" : "space-around";
|
|
19
|
+
let o = d ? b(n, l, k) : "";
|
|
20
|
+
const j = a ? ` position: sticky; top: ${w}; align-self: flex-start;` : "";
|
|
21
|
+
a && (o += `
|
|
21
22
|
@media (max-width: ${A.md}) {
|
|
22
23
|
#${n} {
|
|
23
24
|
position: static !important;
|
|
24
25
|
align-self: stretch !important;
|
|
25
26
|
}
|
|
26
27
|
}`);
|
|
27
|
-
const
|
|
28
|
-
return
|
|
28
|
+
const p = h.map((B) => r(B, $ + 1, x, y)).join(""), v = c ? ` padding-bottom: ${c};` : "", f = `display: flex; flex-direction: ${l}; gap: ${u}; align-items: ${I}; justify-content: ${S}; flex-wrap: ${g ? "wrap" : "nowrap"};${j}${v}`;
|
|
29
|
+
return o ? `<style>${o}</style><div id="${n}" ${m(t.id)} style="${f}">${p}</div>` : `<div ${m(t.id)} style="${f}">${p}</div>`;
|
|
29
30
|
}
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
+
O as exportStack
|
|
32
33
|
};
|
|
33
34
|
//# sourceMappingURL=StackExporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackExporter.js","sources":["../../../../../src/engine/export/exporters/layout/StackExporter.ts"],"sourcesContent":["/**\n * Stack Block Exporter\n * Responsive direction: column (mobile) → row (desktop) when direction=\"row\"\n * Suporte a sticky positioning para sidebars\n */\n\nimport { Block } from \"../../../schema/siteDocument\";\nimport { ThemeTokens } from \"../../../schema/themeTokens\";\nimport { dataBlockIdAttr } from \"../../shared/htmlHelpers\";\nimport { generateScopedId } from \"../../shared/idGenerator\";\nimport { generateFlexDirectionMediaQueries, BREAKPOINTS } from \"../../shared/responsiveGridHelper\";\n\nexport function exportStack(\n block: Block,\n depth: number,\n basePath?: string,\n theme?: ThemeTokens,\n renderChild?: (block: Block, _depth: number, basePath?: string, theme?: ThemeTokens) => string,\n): string {\n const {\n direction = \"col\",\n gap = \"1rem\",\n align = \"stretch\",\n justify = \"start\",\n wrap = false,\n sticky = false,\n stickyOffset = \"80px\",\n children = [],\n } = (block as any).props;\n\n if (!renderChild) {\n throw new Error(\"exportStack requires renderChild function\");\n }\n\n const stackId = generateScopedId(block.id || \"\", \"stack\");\n\n // Mobile-first: se direction=\"row\", começa column em mobile e vira row em desktop\n const isMobileFirst = direction === \"row\";\n const mobileDirection = isMobileFirst ? \"column\" : \"column\";\n const desktopDirection = direction === \"row\" ? \"row\" : \"column\";\n\n const alignItems =\n align === \"start\"\n ? \"flex-start\"\n : align === \"end\"\n ? \"flex-end\"\n : align === \"center\"\n ? \"center\"\n : \"stretch\";\n const justifyContent =\n justify === \"start\"\n ? \"flex-start\"\n : justify === \"end\"\n ? \"flex-end\"\n : justify === \"center\"\n ? \"center\"\n : justify === \"space-between\"\n ? \"space-between\"\n : \"space-around\";\n\n // Media queries for responsive direction\n let mediaQueries = isMobileFirst\n ? generateFlexDirectionMediaQueries(stackId, mobileDirection as any, desktopDirection as any)\n : \"\";\n\n // Sticky: add position sticky on desktop, disable on mobile\n const stickyInline = sticky\n ? ` position: sticky; top: ${stickyOffset}; align-self: flex-start;`\n : \"\";\n\n if (sticky) {\n mediaQueries += `\n @media (max-width: ${BREAKPOINTS.md}) {\n #${stackId} {\n position: static !important;\n align-self: stretch !important;\n }\n }`;\n }\n\n const childrenHtml = children\n .map((c: Block) => renderChild(c, depth + 1, basePath, theme))\n .join(\"\");\n\n const inlineStyles = `display: flex; flex-direction: ${mobileDirection}; gap: ${gap}; align-items: ${alignItems}; justify-content: ${justifyContent}; flex-wrap: ${wrap ? \"wrap\" : \"nowrap\"};${stickyInline}`;\n\n return mediaQueries\n ? `<style>${mediaQueries}</style><div id=\"${stackId}\" ${dataBlockIdAttr(block.id)} style=\"${inlineStyles}\">${childrenHtml}</div>`\n : `<div ${dataBlockIdAttr(block.id)} style=\"${inlineStyles}\">${childrenHtml}</div>`;\n}\n"],"names":["exportStack","block","depth","basePath","theme","renderChild","direction","gap","align","justify","wrap","sticky","stickyOffset","children","stackId","generateScopedId","isMobileFirst","mobileDirection","desktopDirection","alignItems","justifyContent","mediaQueries","generateFlexDirectionMediaQueries","stickyInline","BREAKPOINTS","childrenHtml","c","inlineStyles","dataBlockIdAttr"],"mappings":";;;AAYO,SAASA,EACdC,GACAC,GACAC,GACAC,GACAC,GACQ;AACR,QAAM;AAAA,IACJ,WAAAC,IAAY;AAAA,IACZ,KAAAC,IAAM;AAAA,IACN,OAAAC,IAAQ;AAAA,IACR,SAAAC,IAAU;AAAA,IACV,MAAAC,IAAO;AAAA,IACP,QAAAC,IAAS;AAAA,IACT,cAAAC,IAAe;AAAA,IACf,UAAAC,IAAW,CAAA;AAAA,EAAC,
|
|
1
|
+
{"version":3,"file":"StackExporter.js","sources":["../../../../../src/engine/export/exporters/layout/StackExporter.ts"],"sourcesContent":["/**\n * Stack Block Exporter\n * Responsive direction: column (mobile) → row (desktop) when direction=\"row\"\n * Suporte a sticky positioning para sidebars\n */\n\nimport { Block } from \"../../../schema/siteDocument\";\nimport { ThemeTokens } from \"../../../schema/themeTokens\";\nimport { dataBlockIdAttr } from \"../../shared/htmlHelpers\";\nimport { generateScopedId } from \"../../shared/idGenerator\";\nimport { generateFlexDirectionMediaQueries, BREAKPOINTS } from \"../../shared/responsiveGridHelper\";\n\nexport function exportStack(\n block: Block,\n depth: number,\n basePath?: string,\n theme?: ThemeTokens,\n renderChild?: (block: Block, _depth: number, basePath?: string, theme?: ThemeTokens) => string,\n): string {\n const {\n direction = \"col\",\n gap = \"1rem\",\n align = \"stretch\",\n justify = \"start\",\n wrap = false,\n sticky = false,\n stickyOffset = \"80px\",\n paddingBottom,\n children = [],\n } = (block as any).props;\n\n if (!renderChild) {\n throw new Error(\"exportStack requires renderChild function\");\n }\n\n const stackId = generateScopedId(block.id || \"\", \"stack\");\n\n // Mobile-first: se direction=\"row\", começa column em mobile e vira row em desktop\n const isMobileFirst = direction === \"row\";\n const mobileDirection = isMobileFirst ? \"column\" : \"column\";\n const desktopDirection = direction === \"row\" ? \"row\" : \"column\";\n\n const alignItems =\n align === \"start\"\n ? \"flex-start\"\n : align === \"end\"\n ? \"flex-end\"\n : align === \"center\"\n ? \"center\"\n : \"stretch\";\n const justifyContent =\n justify === \"start\"\n ? \"flex-start\"\n : justify === \"end\"\n ? \"flex-end\"\n : justify === \"center\"\n ? \"center\"\n : justify === \"space-between\"\n ? \"space-between\"\n : \"space-around\";\n\n // Media queries for responsive direction\n let mediaQueries = isMobileFirst\n ? generateFlexDirectionMediaQueries(stackId, mobileDirection as any, desktopDirection as any)\n : \"\";\n\n // Sticky: add position sticky on desktop, disable on mobile\n const stickyInline = sticky\n ? ` position: sticky; top: ${stickyOffset}; align-self: flex-start;`\n : \"\";\n\n if (sticky) {\n mediaQueries += `\n @media (max-width: ${BREAKPOINTS.md}) {\n #${stackId} {\n position: static !important;\n align-self: stretch !important;\n }\n }`;\n }\n\n const childrenHtml = children\n .map((c: Block) => renderChild(c, depth + 1, basePath, theme))\n .join(\"\");\n\n const paddingBottomStyle = paddingBottom ? ` padding-bottom: ${paddingBottom};` : \"\";\n const inlineStyles = `display: flex; flex-direction: ${mobileDirection}; gap: ${gap}; align-items: ${alignItems}; justify-content: ${justifyContent}; flex-wrap: ${wrap ? \"wrap\" : \"nowrap\"};${stickyInline}${paddingBottomStyle}`;\n\n return mediaQueries\n ? `<style>${mediaQueries}</style><div id=\"${stackId}\" ${dataBlockIdAttr(block.id)} style=\"${inlineStyles}\">${childrenHtml}</div>`\n : `<div ${dataBlockIdAttr(block.id)} style=\"${inlineStyles}\">${childrenHtml}</div>`;\n}\n"],"names":["exportStack","block","depth","basePath","theme","renderChild","direction","gap","align","justify","wrap","sticky","stickyOffset","paddingBottom","children","stackId","generateScopedId","isMobileFirst","mobileDirection","desktopDirection","alignItems","justifyContent","mediaQueries","generateFlexDirectionMediaQueries","stickyInline","BREAKPOINTS","childrenHtml","c","paddingBottomStyle","inlineStyles","dataBlockIdAttr"],"mappings":";;;AAYO,SAASA,EACdC,GACAC,GACAC,GACAC,GACAC,GACQ;AACR,QAAM;AAAA,IACJ,WAAAC,IAAY;AAAA,IACZ,KAAAC,IAAM;AAAA,IACN,OAAAC,IAAQ;AAAA,IACR,SAAAC,IAAU;AAAA,IACV,MAAAC,IAAO;AAAA,IACP,QAAAC,IAAS;AAAA,IACT,cAAAC,IAAe;AAAA,IACf,eAAAC;AAAA,IACA,UAAAC,IAAW,CAAA;AAAA,EAAC,IACTb,EAAc;AAEnB,MAAI,CAACI;AACH,UAAM,IAAI,MAAM,2CAA2C;AAG7D,QAAMU,IAAUC,EAAiBf,EAAM,MAAM,IAAI,OAAO,GAGlDgB,IAAgBX,MAAc,OAC9BY,IAAkC,UAClCC,IAAmBb,MAAc,QAAQ,QAAQ,UAEjDc,IACJZ,MAAU,UACN,eACAA,MAAU,QACR,aACAA,MAAU,WACR,WACA,WACJa,IACJZ,MAAY,UACR,eACAA,MAAY,QACV,aACAA,MAAY,WACV,WACAA,MAAY,kBACV,kBACA;AAGZ,MAAIa,IAAeL,IACfM,EAAkCR,GAASG,GAAwBC,CAAuB,IAC1F;AAGJ,QAAMK,IAAeb,IACjB,2BAA2BC,CAAY,8BACvC;AAEJ,EAAID,MACFW,KAAgB;AAAA,yBACKG,EAAY,EAAE;AAAA,SAC9BV,CAAO;AAAA;AAAA;AAAA;AAAA;AAOd,QAAMW,IAAeZ,EAClB,IAAI,CAACa,MAAatB,EAAYsB,GAAGzB,IAAQ,GAAGC,GAAUC,CAAK,CAAC,EAC5D,KAAK,EAAE,GAEJwB,IAAqBf,IAAgB,oBAAoBA,CAAa,MAAM,IAC5EgB,IAAe,kCAAkCX,CAAe,UAAUX,CAAG,kBAAkBa,CAAU,sBAAsBC,CAAc,gBAAgBX,IAAO,SAAS,QAAQ,IAAIc,CAAY,GAAGI,CAAkB;AAEhO,SAAON,IACH,UAAUA,CAAY,oBAAoBP,CAAO,KAAKe,EAAgB7B,EAAM,EAAE,CAAC,WAAW4B,CAAY,KAAKH,CAAY,WACvH,QAAQI,EAAgB7B,EAAM,EAAE,CAAC,WAAW4B,CAAY,KAAKH,CAAY;AAC/E;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogPostExporters.d.ts","sourceRoot":"","sources":["../../../../../src/engine/export/exporters/sections/BlogPostExporters.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"BlogPostExporters.d.ts","sourceRoot":"","sources":["../../../../../src/engine/export/exporters/sections/BlogPostExporters.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAc1D,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,WAAW,GAClB,MAAM,CAgGR;AAsED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,WAAW,EACnB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW,KAAK,MAAM,GAC7F,MAAM,CAyDR;AAMD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,WAAW,GAClB,MAAM,CAoFR;AAMD,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAwFR;AAMD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAkDR;AAMD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAqER;AAMD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,MAAM,CAgER"}
|