@gosalesdeal/blog 0.2.0 → 0.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.
Files changed (43) hide show
  1. package/README.md +265 -34
  2. package/dist/client/blogClient.js +36 -7
  3. package/dist/client/blogClient.js.map +1 -1
  4. package/dist/components/BlogPost.js +7 -8
  5. package/dist/components/BlogPost.js.map +1 -1
  6. package/dist/components/landing/BlogLayoutComponents.d.ts +14 -0
  7. package/dist/components/landing/BlogLayoutComponents.js +198 -0
  8. package/dist/components/landing/BlogLayoutComponents.js.map +1 -0
  9. package/dist/components/landing/FlexibleLayoutComponent.d.ts +40 -0
  10. package/dist/components/landing/FlexibleLayoutComponent.js +352 -0
  11. package/dist/components/landing/FlexibleLayoutComponent.js.map +1 -0
  12. package/dist/components/landing/HeroFeatureBanner.d.ts +36 -0
  13. package/dist/components/landing/HeroFeatureBanner.js +88 -0
  14. package/dist/components/landing/HeroFeatureBanner.js.map +1 -0
  15. package/dist/components/landing/HeroFeatureBannerComponent.d.ts +4 -0
  16. package/dist/components/landing/HeroFeatureBannerComponent.js +100 -0
  17. package/dist/components/landing/HeroFeatureBannerComponent.js.map +1 -0
  18. package/dist/components/landing/HeroFeatureBannerVideo.d.ts +34 -0
  19. package/dist/components/landing/HeroFeatureBannerVideo.js +261 -0
  20. package/dist/components/landing/HeroFeatureBannerVideo.js.map +1 -0
  21. package/dist/components/landing/HeroFeatureBannerVideoComponent.d.ts +5 -0
  22. package/dist/components/landing/HeroFeatureBannerVideoComponent.js +69 -0
  23. package/dist/components/landing/HeroFeatureBannerVideoComponent.js.map +1 -0
  24. package/dist/components/landing/VarietyReviewslistComponent.d.ts +4 -0
  25. package/dist/components/landing/VarietyReviewslistComponent.js +172 -0
  26. package/dist/components/landing/VarietyReviewslistComponent.js.map +1 -0
  27. package/dist/index.d.ts +11 -0
  28. package/dist/index.js +21 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/lib/resolveMediaSrc.d.ts +2 -0
  31. package/dist/lib/resolveMediaSrc.js +21 -0
  32. package/dist/lib/resolveMediaSrc.js.map +1 -0
  33. package/dist/render/BlockRenderer.js +5 -0
  34. package/dist/render/BlockRenderer.js.map +1 -1
  35. package/dist/render/LandingPageRenderer.d.ts +5 -0
  36. package/dist/render/LandingPageRenderer.js +50 -0
  37. package/dist/render/LandingPageRenderer.js.map +1 -0
  38. package/dist/render/landingPageHtml.d.ts +3 -1
  39. package/dist/render/landingPageHtml.js +18 -2
  40. package/dist/render/landingPageHtml.js.map +1 -1
  41. package/dist/styles.css +13 -0
  42. package/dist/types/blog.d.ts +5 -2
  43. package/package.json +6 -2
@@ -0,0 +1,198 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ const BlogTwoColumnComponent = ({ props }) => {
4
+ const ratios = {
5
+ "50-50": { left: "50%", right: "50%" },
6
+ "60-40": { left: "60%", right: "40%" },
7
+ "40-60": { left: "40%", right: "60%" },
8
+ "70-30": { left: "70%", right: "30%" },
9
+ "30-70": { left: "30%", right: "70%" },
10
+ "66-33": { left: "66.66%", right: "33.33%" },
11
+ "33-66": { left: "33.33%", right: "66.66%" }
12
+ };
13
+ const ratio = ratios[props.columnRatio] || ratios["50-50"];
14
+ const containerStyle = {
15
+ backgroundColor: props.backgroundColor || "transparent",
16
+ marginTop: props.marginTop || "2rem",
17
+ marginBottom: props.marginBottom || "2rem"
18
+ };
19
+ const innerContainerStyle = {
20
+ maxWidth: props.containerMaxWidth || "1200px",
21
+ margin: "0 auto",
22
+ padding: props.containerPadding || "2rem"
23
+ };
24
+ const rowStyle = {
25
+ display: "flex",
26
+ gap: props.gap || "2rem",
27
+ alignItems: props.verticalAlign || "center"
28
+ };
29
+ const leftColStyle = {
30
+ flex: `0 0 ${ratio.left}`,
31
+ backgroundColor: props.leftBgColor || "transparent",
32
+ padding: props.leftPadding || "0"
33
+ };
34
+ const rightColStyle = {
35
+ flex: `0 0 ${ratio.right}`,
36
+ backgroundColor: props.rightBgColor || "transparent",
37
+ padding: props.rightPadding || "0"
38
+ };
39
+ const responsiveCSS = `
40
+ @media (max-width: 768px) {
41
+ .blog-two-column-row${props.stackOnMobile ? "-stack-mobile" : ""} {
42
+ ${props.stackOnMobile ? "flex-direction: column;" : ""}
43
+ ${props.stackOnMobile && props.reverseOnMobile ? "flex-direction: column-reverse;" : ""}
44
+ }
45
+ .blog-two-column-row${props.stackOnMobile ? "-stack-mobile" : ""} > div {
46
+ ${props.stackOnMobile ? "flex: 0 0 100% !important;" : ""}
47
+ }
48
+ }
49
+ @media (min-width: 769px) and (max-width: 1024px) {
50
+ .blog-two-column-row${props.stackOnTablet ? "-stack-tablet" : ""} {
51
+ ${props.stackOnTablet ? "flex-direction: column;" : ""}
52
+ }
53
+ .blog-two-column-row${props.stackOnTablet ? "-stack-tablet" : ""} > div {
54
+ ${props.stackOnTablet ? "flex: 0 0 100% !important;" : ""}
55
+ }
56
+ }
57
+ `;
58
+ return /* @__PURE__ */ jsxs("div", { className: `blog-two-column ${props.className || ""}`, style: containerStyle, children: [
59
+ props.customCSS && /* @__PURE__ */ jsx("style", { children: props.customCSS }),
60
+ /* @__PURE__ */ jsx("style", { children: responsiveCSS }),
61
+ /* @__PURE__ */ jsx("div", { style: innerContainerStyle, children: /* @__PURE__ */ jsxs(
62
+ "div",
63
+ {
64
+ className: `blog-two-column-row${props.stackOnMobile ? "-stack-mobile" : ""}${props.stackOnTablet ? "-stack-tablet" : ""}`,
65
+ style: rowStyle,
66
+ children: [
67
+ /* @__PURE__ */ jsx("div", { className: props.leftClassName || "", style: leftColStyle, children: /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: props.leftContent || "Left column content" } }) }),
68
+ /* @__PURE__ */ jsx("div", { className: props.rightClassName || "", style: rightColStyle, children: /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: props.rightContent || "Right column content" } }) })
69
+ ]
70
+ }
71
+ ) })
72
+ ] });
73
+ };
74
+ const BlogThreeColumnComponent = ({ props }) => {
75
+ const ratios = {
76
+ "33-33-33": { col1: "33.33%", col2: "33.33%", col3: "33.33%" },
77
+ "50-25-25": { col1: "50%", col2: "25%", col3: "25%" },
78
+ "25-50-25": { col1: "25%", col2: "50%", col3: "25%" },
79
+ "25-25-50": { col1: "25%", col2: "25%", col3: "50%" },
80
+ "40-30-30": { col1: "40%", col2: "30%", col3: "30%" },
81
+ "30-40-30": { col1: "30%", col2: "40%", col3: "30%" },
82
+ "30-30-40": { col1: "30%", col2: "30%", col3: "40%" }
83
+ };
84
+ const ratio = ratios[props.columnRatio] || ratios["33-33-33"];
85
+ const containerStyle = {
86
+ backgroundColor: props.backgroundColor || "transparent",
87
+ marginTop: props.marginTop || "2rem",
88
+ marginBottom: props.marginBottom || "2rem"
89
+ };
90
+ const innerContainerStyle = {
91
+ maxWidth: props.containerMaxWidth || "1200px",
92
+ margin: "0 auto",
93
+ padding: props.containerPadding || "2rem"
94
+ };
95
+ const rowStyle = {
96
+ display: "flex",
97
+ gap: props.gap || "1.5rem",
98
+ alignItems: props.verticalAlign || "flex-start"
99
+ };
100
+ const responsiveCSS = `
101
+ @media (max-width: 768px) {
102
+ .blog-three-column-row${props.stackOnMobile ? "-stack-mobile" : ""} {
103
+ ${props.stackOnMobile ? "flex-direction: column;" : ""}
104
+ }
105
+ .blog-three-column-row${props.stackOnMobile ? "-stack-mobile" : ""} > div {
106
+ ${props.stackOnMobile ? "flex: 0 0 100% !important;" : ""}
107
+ }
108
+ }
109
+ @media (min-width: 769px) and (max-width: 1024px) {
110
+ .blog-three-column-row${props.stackOnTablet ? "-stack-tablet" : ""} {
111
+ ${props.stackOnTablet ? "flex-direction: column;" : ""}
112
+ }
113
+ .blog-three-column-row${props.stackOnTablet ? "-stack-tablet" : ""} > div {
114
+ ${props.stackOnTablet ? "flex: 0 0 100% !important;" : ""}
115
+ }
116
+ }
117
+ `;
118
+ return /* @__PURE__ */ jsxs("div", { className: `blog-three-column ${props.className || ""}`, style: containerStyle, children: [
119
+ props.customCSS && /* @__PURE__ */ jsx("style", { children: props.customCSS }),
120
+ /* @__PURE__ */ jsx("style", { children: responsiveCSS }),
121
+ /* @__PURE__ */ jsx("div", { style: innerContainerStyle, children: /* @__PURE__ */ jsxs(
122
+ "div",
123
+ {
124
+ className: `blog-three-column-row${props.stackOnMobile ? "-stack-mobile" : ""}${props.stackOnTablet ? "-stack-tablet" : ""}`,
125
+ style: rowStyle,
126
+ children: [
127
+ /* @__PURE__ */ jsx(
128
+ "div",
129
+ {
130
+ className: props.column1ClassName || "",
131
+ style: {
132
+ flex: `0 0 ${ratio.col1}`,
133
+ backgroundColor: props.column1BgColor || "transparent",
134
+ padding: props.column1Padding || "0"
135
+ },
136
+ children: /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: props.column1Content || "Column 1" } })
137
+ }
138
+ ),
139
+ /* @__PURE__ */ jsx(
140
+ "div",
141
+ {
142
+ className: props.column2ClassName || "",
143
+ style: {
144
+ flex: `0 0 ${ratio.col2}`,
145
+ backgroundColor: props.column2BgColor || "transparent",
146
+ padding: props.column2Padding || "0"
147
+ },
148
+ children: /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: props.column2Content || "Column 2" } })
149
+ }
150
+ ),
151
+ /* @__PURE__ */ jsx(
152
+ "div",
153
+ {
154
+ className: props.column3ClassName || "",
155
+ style: {
156
+ flex: `0 0 ${ratio.col3}`,
157
+ backgroundColor: props.column3BgColor || "transparent",
158
+ padding: props.column3Padding || "0"
159
+ },
160
+ children: /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: props.column3Content || "Column 3" } })
161
+ }
162
+ )
163
+ ]
164
+ }
165
+ ) })
166
+ ] });
167
+ };
168
+ const BlogContainerComponent = ({ props }) => {
169
+ const wrapperStyle = {
170
+ display: "flex",
171
+ justifyContent: props.contentAlign || "center",
172
+ marginTop: props.marginTop || "2rem",
173
+ marginBottom: props.marginBottom || "2rem"
174
+ };
175
+ const containerStyle = {
176
+ width: props.width || "100%",
177
+ maxWidth: props.maxWidth || "800px",
178
+ backgroundColor: props.backgroundColor || "transparent",
179
+ backgroundImage: props.backgroundImage ? `url(${props.backgroundImage})` : "none",
180
+ backgroundSize: props.backgroundSize || "cover",
181
+ backgroundPosition: props.backgroundPosition || "center",
182
+ backgroundRepeat: "no-repeat",
183
+ padding: props.paddingTop || props.paddingBottom || props.paddingLeft || props.paddingRight ? `${props.paddingTop || props.padding || "2rem"} ${props.paddingRight || props.padding || "2rem"} ${props.paddingBottom || props.padding || "2rem"} ${props.paddingLeft || props.padding || "2rem"}` : props.padding || "2rem",
184
+ border: props.border ? `${props.borderWidth || "1px"} ${props.borderStyle || "solid"} ${props.borderColor || "#e5e7eb"}` : "none",
185
+ borderRadius: props.borderRadius || "8px",
186
+ textAlign: props.textAlign || "left"
187
+ };
188
+ return /* @__PURE__ */ jsx("div", { style: wrapperStyle, children: /* @__PURE__ */ jsxs("div", { className: `blog-container ${props.shadow || ""} ${props.className || ""}`, style: containerStyle, children: [
189
+ props.customCSS && /* @__PURE__ */ jsx("style", { children: props.customCSS }),
190
+ /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: props.content || "Container content" } })
191
+ ] }) });
192
+ };
193
+ export {
194
+ BlogContainerComponent,
195
+ BlogThreeColumnComponent,
196
+ BlogTwoColumnComponent
197
+ };
198
+ //# sourceMappingURL=BlogLayoutComponents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlogLayoutComponents.js","sources":["../../../src/components/landing/BlogLayoutComponents.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\n/**\n * Blog Layout Components\n * Flexible layout components for arranging blog content in columns\n */\n\n// Blog Two Column Layout Component\nexport const BlogTwoColumnComponent: React.FC<{ props: Record<string, any> }> = ({ props }) => {\n const ratios: Record<string, { left: string; right: string }> = {\n '50-50': { left: '50%', right: '50%' },\n '60-40': { left: '60%', right: '40%' },\n '40-60': { left: '40%', right: '60%' },\n '70-30': { left: '70%', right: '30%' },\n '30-70': { left: '30%', right: '70%' },\n '66-33': { left: '66.66%', right: '33.33%' },\n '33-66': { left: '33.33%', right: '66.66%' },\n };\n\n const ratio = ratios[props.columnRatio] || ratios['50-50'];\n\n const containerStyle: any = {\n backgroundColor: props.backgroundColor || 'transparent',\n marginTop: props.marginTop || '2rem',\n marginBottom: props.marginBottom || '2rem',\n };\n\n const innerContainerStyle: any = {\n maxWidth: props.containerMaxWidth || '1200px',\n margin: '0 auto',\n padding: props.containerPadding || '2rem',\n };\n\n const rowStyle: any = {\n display: 'flex',\n gap: props.gap || '2rem',\n alignItems: props.verticalAlign || 'center',\n };\n\n const leftColStyle: any = {\n flex: `0 0 ${ratio.left}`,\n backgroundColor: props.leftBgColor || 'transparent',\n padding: props.leftPadding || '0',\n };\n\n const rightColStyle: any = {\n flex: `0 0 ${ratio.right}`,\n backgroundColor: props.rightBgColor || 'transparent',\n padding: props.rightPadding || '0',\n };\n\n const responsiveCSS = `\n @media (max-width: 768px) {\n .blog-two-column-row${props.stackOnMobile ? '-stack-mobile' : ''} {\n ${props.stackOnMobile ? 'flex-direction: column;' : ''}\n ${props.stackOnMobile && props.reverseOnMobile ? 'flex-direction: column-reverse;' : ''}\n }\n .blog-two-column-row${props.stackOnMobile ? '-stack-mobile' : ''} > div {\n ${props.stackOnMobile ? 'flex: 0 0 100% !important;' : ''}\n }\n }\n @media (min-width: 769px) and (max-width: 1024px) {\n .blog-two-column-row${props.stackOnTablet ? '-stack-tablet' : ''} {\n ${props.stackOnTablet ? 'flex-direction: column;' : ''}\n }\n .blog-two-column-row${props.stackOnTablet ? '-stack-tablet' : ''} > div {\n ${props.stackOnTablet ? 'flex: 0 0 100% !important;' : ''}\n }\n }\n `;\n\n return (\n <div className={`blog-two-column ${props.className || ''}`} style={containerStyle}>\n {props.customCSS && <style>{props.customCSS}</style>}\n <style>{responsiveCSS}</style>\n <div style={innerContainerStyle}>\n <div \n className={`blog-two-column-row${props.stackOnMobile ? '-stack-mobile' : ''}${props.stackOnTablet ? '-stack-tablet' : ''}`}\n style={rowStyle}\n >\n <div className={props.leftClassName || ''} style={leftColStyle}>\n <div dangerouslySetInnerHTML={{ __html: props.leftContent || 'Left column content' }} />\n </div>\n <div className={props.rightClassName || ''} style={rightColStyle}>\n <div dangerouslySetInnerHTML={{ __html: props.rightContent || 'Right column content' }} />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\n// Blog Three Column Layout Component\nexport const BlogThreeColumnComponent: React.FC<{ props: Record<string, any> }> = ({ props }) => {\n const ratios: Record<string, { col1: string; col2: string; col3: string }> = {\n '33-33-33': { col1: '33.33%', col2: '33.33%', col3: '33.33%' },\n '50-25-25': { col1: '50%', col2: '25%', col3: '25%' },\n '25-50-25': { col1: '25%', col2: '50%', col3: '25%' },\n '25-25-50': { col1: '25%', col2: '25%', col3: '50%' },\n '40-30-30': { col1: '40%', col2: '30%', col3: '30%' },\n '30-40-30': { col1: '30%', col2: '40%', col3: '30%' },\n '30-30-40': { col1: '30%', col2: '30%', col3: '40%' },\n };\n\n const ratio = ratios[props.columnRatio] || ratios['33-33-33'];\n\n const containerStyle: any = {\n backgroundColor: props.backgroundColor || 'transparent',\n marginTop: props.marginTop || '2rem',\n marginBottom: props.marginBottom || '2rem',\n };\n\n const innerContainerStyle: any = {\n maxWidth: props.containerMaxWidth || '1200px',\n margin: '0 auto',\n padding: props.containerPadding || '2rem',\n };\n\n const rowStyle: any = {\n display: 'flex',\n gap: props.gap || '1.5rem',\n alignItems: props.verticalAlign || 'flex-start',\n };\n\n const responsiveCSS = `\n @media (max-width: 768px) {\n .blog-three-column-row${props.stackOnMobile ? '-stack-mobile' : ''} {\n ${props.stackOnMobile ? 'flex-direction: column;' : ''}\n }\n .blog-three-column-row${props.stackOnMobile ? '-stack-mobile' : ''} > div {\n ${props.stackOnMobile ? 'flex: 0 0 100% !important;' : ''}\n }\n }\n @media (min-width: 769px) and (max-width: 1024px) {\n .blog-three-column-row${props.stackOnTablet ? '-stack-tablet' : ''} {\n ${props.stackOnTablet ? 'flex-direction: column;' : ''}\n }\n .blog-three-column-row${props.stackOnTablet ? '-stack-tablet' : ''} > div {\n ${props.stackOnTablet ? 'flex: 0 0 100% !important;' : ''}\n }\n }\n `;\n\n return (\n <div className={`blog-three-column ${props.className || ''}`} style={containerStyle}>\n {props.customCSS && <style>{props.customCSS}</style>}\n <style>{responsiveCSS}</style>\n <div style={innerContainerStyle}>\n <div \n className={`blog-three-column-row${props.stackOnMobile ? '-stack-mobile' : ''}${props.stackOnTablet ? '-stack-tablet' : ''}`}\n style={rowStyle}\n >\n <div \n className={props.column1ClassName || ''} \n style={{\n flex: `0 0 ${ratio.col1}`,\n backgroundColor: props.column1BgColor || 'transparent',\n padding: props.column1Padding || '0',\n }}\n >\n <div dangerouslySetInnerHTML={{ __html: props.column1Content || 'Column 1' }} />\n </div>\n <div \n className={props.column2ClassName || ''} \n style={{\n flex: `0 0 ${ratio.col2}`,\n backgroundColor: props.column2BgColor || 'transparent',\n padding: props.column2Padding || '0',\n }}\n >\n <div dangerouslySetInnerHTML={{ __html: props.column2Content || 'Column 2' }} />\n </div>\n <div \n className={props.column3ClassName || ''} \n style={{\n flex: `0 0 ${ratio.col3}`,\n backgroundColor: props.column3BgColor || 'transparent',\n padding: props.column3Padding || '0',\n }}\n >\n <div dangerouslySetInnerHTML={{ __html: props.column3Content || 'Column 3' }} />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\n// Blog Container/Section Component\nexport const BlogContainerComponent: React.FC<{ props: Record<string, any> }> = ({ props }) => {\n const wrapperStyle: any = {\n display: 'flex',\n justifyContent: props.contentAlign || 'center',\n marginTop: props.marginTop || '2rem',\n marginBottom: props.marginBottom || '2rem',\n };\n\n const containerStyle: any = {\n width: props.width || '100%',\n maxWidth: props.maxWidth || '800px',\n backgroundColor: props.backgroundColor || 'transparent',\n backgroundImage: props.backgroundImage ? `url(${props.backgroundImage})` : 'none',\n backgroundSize: props.backgroundSize || 'cover',\n backgroundPosition: props.backgroundPosition || 'center',\n backgroundRepeat: 'no-repeat',\n padding: props.paddingTop || props.paddingBottom || props.paddingLeft || props.paddingRight \n ? `${props.paddingTop || props.padding || '2rem'} ${props.paddingRight || props.padding || '2rem'} ${props.paddingBottom || props.padding || '2rem'} ${props.paddingLeft || props.padding || '2rem'}`\n : (props.padding || '2rem'),\n border: props.border ? `${props.borderWidth || '1px'} ${props.borderStyle || 'solid'} ${props.borderColor || '#e5e7eb'}` : 'none',\n borderRadius: props.borderRadius || '8px',\n textAlign: props.textAlign || 'left',\n };\n\n return (\n <div style={wrapperStyle}>\n <div className={`blog-container ${props.shadow || ''} ${props.className || ''}`} style={containerStyle}>\n {props.customCSS && <style>{props.customCSS}</style>}\n <div dangerouslySetInnerHTML={{ __html: props.content || 'Container content' }} />\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;AAUO,MAAM,yBAAmE,CAAC,EAAE,YAAY;AAC7F,QAAM,SAA0D;AAAA,IAC9D,SAAS,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,IAC/B,SAAS,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,IAC/B,SAAS,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,IAC/B,SAAS,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,IAC/B,SAAS,EAAE,MAAM,OAAO,OAAO,MAAA;AAAA,IAC/B,SAAS,EAAE,MAAM,UAAU,OAAO,SAAA;AAAA,IAClC,SAAS,EAAE,MAAM,UAAU,OAAO,SAAA;AAAA,EAAS;AAG7C,QAAM,QAAQ,OAAO,MAAM,WAAW,KAAK,OAAO,OAAO;AAEzD,QAAM,iBAAsB;AAAA,IAC1B,iBAAiB,MAAM,mBAAmB;AAAA,IAC1C,WAAW,MAAM,aAAa;AAAA,IAC9B,cAAc,MAAM,gBAAgB;AAAA,EAAA;AAGtC,QAAM,sBAA2B;AAAA,IAC/B,UAAU,MAAM,qBAAqB;AAAA,IACrC,QAAQ;AAAA,IACR,SAAS,MAAM,oBAAo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AAM,IAAI,MAAM,iBAAiB,MAAM,WAAW,MAAM,IAAI,MAAM,eAAe,MAAM,WAAW,MAAM,KAChM,MAAM,WAAW;AAAA,IACtB,QAAQ,MAAM,SAAS,GAAG,MAAM,eAAe,KAAK,IAAI,MAAM,eAAe,OAAO,IAAI,MAAM,eAAe,SAAS,KAAK;AAAA,IAC3H,cAAc,MAAM,gBAAgB;AAAA,IACpC,WAAW,MAAM,aAAa;AAAA,EAAA;AAGhC,6BACG,OAAA,EAAI,OAAO,cACV,UAAA,qBAAC,SAAI,WAAW,kBAAkB,MAAM,UAAU,EAAE,IAAI,MAAM,aAAa,EAAE,IAAI,OAAO,gBACrF,UAAA;AAAA,IAAA,MAAM,aAAa,oBAAC,SAAA,EAAO,UAAA,MAAM,WAAU;AAAA,IAC5C,oBAAC,SAAI,yBAAyB,EAAE,QAAQ,MAAM,WAAW,sBAAoB,CAAG;AAAA,EAAA,EAAA,CAClF,EAAA,CACF;AAEJ;"}
@@ -0,0 +1,40 @@
1
+ import { default as React } from 'react';
2
+ interface ColumnElement {
3
+ id: string;
4
+ type: string;
5
+ [key: string]: any;
6
+ }
7
+ interface Column {
8
+ id: string;
9
+ elements: ColumnElement[];
10
+ width?: string;
11
+ backgroundColor?: string;
12
+ padding?: string;
13
+ alignment?: 'top' | 'center' | 'bottom';
14
+ }
15
+ interface FlexibleLayoutProps {
16
+ props: {
17
+ columnCount?: number;
18
+ columns?: Column[];
19
+ columnRatio?: string;
20
+ containerMaxWidth?: string;
21
+ containerPadding?: string;
22
+ containerMarginTop?: string;
23
+ containerMarginBottom?: string;
24
+ containerBackgroundColor?: string;
25
+ containerBorderRadius?: string;
26
+ columnGap?: string;
27
+ rowGap?: string;
28
+ stackOnMobile?: boolean;
29
+ stackOnTablet?: boolean;
30
+ reverseOnMobile?: boolean;
31
+ mobileBreakpoint?: string;
32
+ tabletBreakpoint?: string;
33
+ customCSS?: string;
34
+ className?: string;
35
+ containerClass?: string;
36
+ columnsWrapperClass?: string;
37
+ };
38
+ }
39
+ export declare const FlexibleLayoutComponent: React.FC<FlexibleLayoutProps>;
40
+ export {};
@@ -0,0 +1,352 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const FlexibleLayoutComponent = ({ props }) => {
3
+ const {
4
+ columnCount = 2,
5
+ columns = [],
6
+ columnRatio = "50-50",
7
+ containerMaxWidth = "1200px",
8
+ containerPadding = "0rem",
9
+ containerMarginTop = "0rem",
10
+ containerMarginBottom = "0rem",
11
+ containerBackgroundColor = "transparent",
12
+ containerBorderRadius = "0px",
13
+ columnGap = "2rem",
14
+ rowGap = "1rem",
15
+ stackOnMobile = true,
16
+ stackOnTablet = false,
17
+ reverseOnMobile = false,
18
+ mobileBreakpoint = "768px",
19
+ tabletBreakpoint = "1024px",
20
+ customCSS = "",
21
+ className = "",
22
+ containerClass = "",
23
+ columnsWrapperClass = ""
24
+ } = props;
25
+ let ratios = columnRatio.split("-").map((r) => `${r}%`);
26
+ if (ratios.length !== columnCount) {
27
+ const equalRatio = `${Math.floor(100 / columnCount)}%`;
28
+ ratios = Array(columnCount).fill(equalRatio);
29
+ }
30
+ const renderElement = (element) => {
31
+ const commonStyle = {
32
+ marginTop: element.marginTop || "0",
33
+ marginBottom: element.marginBottom || "0"
34
+ };
35
+ switch (element.type) {
36
+ case "heading": {
37
+ const level = element.headingLevel || "h2";
38
+ const headingProps = {
39
+ key: element.id,
40
+ className: element.customClass,
41
+ style: {
42
+ ...commonStyle,
43
+ color: element.headingColor,
44
+ fontSize: element.headingSize,
45
+ fontWeight: element.headingWeight,
46
+ textAlign: element.headingAlign
47
+ }
48
+ };
49
+ switch (level) {
50
+ case "h1":
51
+ return /* @__PURE__ */ jsx("h1", { ...headingProps, children: element.headingText });
52
+ case "h2":
53
+ return /* @__PURE__ */ jsx("h2", { ...headingProps, children: element.headingText });
54
+ case "h3":
55
+ return /* @__PURE__ */ jsx("h3", { ...headingProps, children: element.headingText });
56
+ case "h4":
57
+ return /* @__PURE__ */ jsx("h4", { ...headingProps, children: element.headingText });
58
+ case "h5":
59
+ return /* @__PURE__ */ jsx("h5", { ...headingProps, children: element.headingText });
60
+ case "h6":
61
+ return /* @__PURE__ */ jsx("h6", { ...headingProps, children: element.headingText });
62
+ default:
63
+ return /* @__PURE__ */ jsx("h2", { ...headingProps, children: element.headingText });
64
+ }
65
+ }
66
+ case "paragraph":
67
+ return /* @__PURE__ */ jsx(
68
+ "p",
69
+ {
70
+ className: element.customClass,
71
+ style: {
72
+ ...commonStyle,
73
+ color: element.paragraphColor,
74
+ fontSize: element.paragraphSize,
75
+ textAlign: element.paragraphAlign,
76
+ lineHeight: element.paragraphLineHeight
77
+ },
78
+ children: element.paragraphText
79
+ },
80
+ element.id
81
+ );
82
+ case "image":
83
+ return /* @__PURE__ */ jsxs("div", { className: element.customClass, style: commonStyle, children: [
84
+ /* @__PURE__ */ jsx(
85
+ "img",
86
+ {
87
+ src: element.imageUrl || "https://via.placeholder.com/400x300",
88
+ alt: element.imageAlt || "Image",
89
+ style: {
90
+ width: element.imageWidth || "100%",
91
+ height: element.imageHeight || "auto",
92
+ objectFit: element.imageObjectFit,
93
+ borderRadius: element.imageBorderRadius,
94
+ display: "block"
95
+ }
96
+ }
97
+ ),
98
+ element.imageCaption && /* @__PURE__ */ jsx("p", { style: { fontSize: "0.875rem", color: "#6b7280", marginTop: "0.5rem", textAlign: "center" }, children: element.imageCaption })
99
+ ] }, element.id);
100
+ case "video": {
101
+ const getVideoEmbedUrl = (url, type) => {
102
+ if (type === "youtube") {
103
+ const videoId = url.includes("v=") ? url.split("v=")[1]?.split("&")[0] : url.split("/").pop();
104
+ return `https://www.youtube.com/embed/${videoId}`;
105
+ } else if (type === "vimeo") {
106
+ const videoId = url.split("/").pop();
107
+ return `https://player.vimeo.com/video/${videoId}`;
108
+ }
109
+ return url;
110
+ };
111
+ return /* @__PURE__ */ jsx("div", { className: element.customClass, style: commonStyle, children: element.videoType === "direct" ? /* @__PURE__ */ jsx(
112
+ "video",
113
+ {
114
+ src: element.videoUrl,
115
+ controls: element.videoControls,
116
+ autoPlay: element.videoAutoplay,
117
+ style: {
118
+ width: element.videoWidth || "100%",
119
+ height: element.videoHeight || "auto",
120
+ borderRadius: "8px"
121
+ }
122
+ }
123
+ ) : /* @__PURE__ */ jsx(
124
+ "iframe",
125
+ {
126
+ src: getVideoEmbedUrl(element.videoUrl || "", element.videoType || "youtube"),
127
+ style: {
128
+ width: element.videoWidth || "100%",
129
+ height: element.videoHeight || "400px",
130
+ border: "none",
131
+ borderRadius: "8px"
132
+ },
133
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
134
+ allowFullScreen: true
135
+ }
136
+ ) }, element.id);
137
+ }
138
+ case "button":
139
+ return /* @__PURE__ */ jsx(
140
+ "a",
141
+ {
142
+ href: element.buttonUrl || "#",
143
+ target: element.buttonTarget,
144
+ className: element.customClass,
145
+ style: {
146
+ ...commonStyle,
147
+ display: element.buttonFullWidth ? "block" : "inline-block",
148
+ padding: element.buttonSize === "small" ? "0.5rem 1rem" : element.buttonSize === "large" ? "1rem 2rem" : "0.75rem 1.5rem",
149
+ backgroundColor: element.buttonBgColor || "#3b82f6",
150
+ color: element.buttonTextColor || "#ffffff",
151
+ textDecoration: "none",
152
+ borderRadius: "6px",
153
+ fontWeight: "500",
154
+ textAlign: "center",
155
+ border: element.buttonStyle === "outline" ? "2px solid currentColor" : "none",
156
+ background: element.buttonStyle === "outline" || element.buttonStyle === "text" ? "transparent" : element.buttonBgColor
157
+ },
158
+ children: element.buttonText
159
+ },
160
+ element.id
161
+ );
162
+ case "list": {
163
+ const listProps = {
164
+ key: element.id,
165
+ className: element.customClass,
166
+ style: {
167
+ ...commonStyle,
168
+ listStyle: element.listStyle === "default" ? void 0 : "none",
169
+ paddingLeft: element.listStyle === "default" ? "1.5rem" : "0"
170
+ }
171
+ };
172
+ const items = (element.listItems || []).map((item, idx) => /* @__PURE__ */ jsx("li", { style: { marginBottom: "0.5rem" }, children: item }, idx));
173
+ return element.listType === "ordered" ? /* @__PURE__ */ jsx("ol", { ...listProps, children: items }) : /* @__PURE__ */ jsx("ul", { ...listProps, children: items });
174
+ }
175
+ case "quote":
176
+ return /* @__PURE__ */ jsxs(
177
+ "blockquote",
178
+ {
179
+ className: element.customClass,
180
+ style: {
181
+ ...commonStyle,
182
+ borderLeft: `4px solid ${element.quoteBorderColor || "#3b82f6"}`,
183
+ paddingLeft: "1.5rem",
184
+ fontStyle: "italic",
185
+ color: "#374151"
186
+ },
187
+ children: [
188
+ /* @__PURE__ */ jsx("p", { style: { marginBottom: "0.5rem" }, children: element.quoteText }),
189
+ element.quoteAuthor && /* @__PURE__ */ jsxs("footer", { style: { fontSize: "0.875rem", color: "#6b7280" }, children: [
190
+ "— ",
191
+ element.quoteAuthor
192
+ ] })
193
+ ]
194
+ },
195
+ element.id
196
+ );
197
+ case "divider":
198
+ return /* @__PURE__ */ jsx(
199
+ "hr",
200
+ {
201
+ className: element.customClass,
202
+ style: {
203
+ ...commonStyle,
204
+ border: "none",
205
+ borderTop: `${element.dividerHeight || "1px"} ${element.dividerStyle || "solid"} ${element.dividerColor || "#e5e7eb"}`,
206
+ width: element.dividerWidth || "100%"
207
+ }
208
+ },
209
+ element.id
210
+ );
211
+ case "spacer":
212
+ return /* @__PURE__ */ jsx(
213
+ "div",
214
+ {
215
+ className: element.customClass,
216
+ style: {
217
+ height: element.spacerHeight || "2rem"
218
+ }
219
+ },
220
+ element.id
221
+ );
222
+ case "code":
223
+ return /* @__PURE__ */ jsx(
224
+ "pre",
225
+ {
226
+ className: element.customClass,
227
+ style: {
228
+ ...commonStyle,
229
+ backgroundColor: element.codeTheme === "light" ? "#f3f4f6" : "#1e293b",
230
+ color: element.codeTheme === "light" ? "#1f2937" : "#e2e8f0",
231
+ padding: "1rem",
232
+ borderRadius: "6px",
233
+ overflow: "auto",
234
+ fontSize: "0.875rem",
235
+ fontFamily: "monospace"
236
+ },
237
+ children: /* @__PURE__ */ jsx("code", { children: element.codeContent })
238
+ },
239
+ element.id
240
+ );
241
+ case "badge":
242
+ return /* @__PURE__ */ jsx(
243
+ "span",
244
+ {
245
+ className: element.customClass,
246
+ style: {
247
+ ...commonStyle,
248
+ display: "inline-block",
249
+ padding: "0.25rem 0.75rem",
250
+ backgroundColor: element.badgeBgColor || "#3b82f6",
251
+ color: element.badgeColor || "#ffffff",
252
+ borderRadius: "9999px",
253
+ fontSize: "0.875rem",
254
+ fontWeight: "500"
255
+ },
256
+ children: element.badgeText
257
+ },
258
+ element.id
259
+ );
260
+ case "alert": {
261
+ const alertColors = {
262
+ info: { bg: "#dbeafe", border: "#3b82f6", text: "#1e40af" },
263
+ success: { bg: "#d1fae5", border: "#10b981", text: "#065f46" },
264
+ warning: { bg: "#fef3c7", border: "#f59e0b", text: "#92400e" },
265
+ error: { bg: "#fee2e2", border: "#ef4444", text: "#991b1b" }
266
+ };
267
+ const alertStyle = alertColors[element.alertType || "info"];
268
+ return /* @__PURE__ */ jsx(
269
+ "div",
270
+ {
271
+ className: element.customClass,
272
+ style: {
273
+ ...commonStyle,
274
+ backgroundColor: alertStyle.bg,
275
+ borderLeft: `4px solid ${alertStyle.border}`,
276
+ color: alertStyle.text,
277
+ padding: "1rem",
278
+ borderRadius: "6px"
279
+ },
280
+ children: element.alertText
281
+ },
282
+ element.id
283
+ );
284
+ }
285
+ default:
286
+ return null;
287
+ }
288
+ };
289
+ const responsiveCSS = `
290
+ @media (max-width: ${mobileBreakpoint}) {
291
+ .flexible-layout-container-${columnCount} {
292
+ ${stackOnMobile ? "flex-direction: column !important;" : ""}
293
+ ${reverseOnMobile ? "flex-direction: column-reverse !important;" : ""}
294
+ }
295
+ .flexible-layout-column-${columnCount} {
296
+ ${stackOnMobile ? "width: 100% !important; flex: none !important;" : ""}
297
+ }
298
+ }
299
+ @media (max-width: ${tabletBreakpoint}) and (min-width: ${mobileBreakpoint}) {
300
+ .flexible-layout-container-${columnCount} {
301
+ ${stackOnTablet ? "flex-direction: column !important;" : ""}
302
+ }
303
+ .flexible-layout-column-${columnCount} {
304
+ ${stackOnTablet ? "width: 100% !important; flex: none !important;" : ""}
305
+ }
306
+ }
307
+ `;
308
+ return /* @__PURE__ */ jsxs(
309
+ "div",
310
+ {
311
+ className: `flexible-layout w-full mx-auto overflow-hidden ${containerClass} ${className || ""}`,
312
+ children: [
313
+ customCSS && /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: customCSS } }),
314
+ /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: responsiveCSS } }),
315
+ /* @__PURE__ */ jsx(
316
+ "div",
317
+ {
318
+ className: `flexible-layout-container-${columnCount} flex w-full ${columnsWrapperClass}`,
319
+ style: {
320
+ gap: columnGap,
321
+ alignItems: "stretch"
322
+ },
323
+ children: columns.slice(0, columnCount).map((column, index) => /* @__PURE__ */ jsx(
324
+ "div",
325
+ {
326
+ className: `flexible-layout-column-${columnCount}`,
327
+ style: {
328
+ flex: `0 0 ${ratios[index] || "auto"}`,
329
+ minWidth: 0,
330
+ maxWidth: ratios[index] || "auto",
331
+ backgroundColor: column.backgroundColor,
332
+ padding: column.padding,
333
+ display: "flex",
334
+ flexDirection: "column",
335
+ justifyContent: column.alignment === "center" ? "center" : column.alignment === "bottom" ? "flex-end" : "flex-start",
336
+ boxSizing: "border-box",
337
+ overflow: "hidden"
338
+ },
339
+ children: /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: rowGap }, children: column.elements.map(renderElement) })
340
+ },
341
+ column.id
342
+ ))
343
+ }
344
+ )
345
+ ]
346
+ }
347
+ );
348
+ };
349
+ export {
350
+ FlexibleLayoutComponent
351
+ };
352
+ //# sourceMappingURL=FlexibleLayoutComponent.js.map