zuljaman-banner-components 1.0.4 → 1.0.5

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.
@@ -22,6 +22,6 @@ const BannerStyle1 = ({ copy1, copy2, bannerSubstyle = 1, logoUrl, backgroundIma
22
22
  postType,
23
23
  ImageComponent,
24
24
  };
25
- return ((0, jsx_runtime_1.jsxs)("div", { className: "w-full h-full text-white", children: [bannerSubstyle === 1 && (0, jsx_runtime_1.jsx)(substyles_1.BannerSubstyle1, { ...substyleProps }), bannerSubstyle === 2 && (0, jsx_runtime_1.jsx)(substyles_1.BannerSubstyle2, { ...substyleProps }), bannerSubstyle === 3 && (0, jsx_runtime_1.jsx)(substyles_1.BannerSubstyle3, { ...substyleProps })] }));
25
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "w-full h-full text-white leading-[1.05]", children: [bannerSubstyle === 1 && (0, jsx_runtime_1.jsx)(substyles_1.BannerSubstyle1, { ...substyleProps }), bannerSubstyle === 2 && (0, jsx_runtime_1.jsx)(substyles_1.BannerSubstyle2, { ...substyleProps }), bannerSubstyle === 3 && (0, jsx_runtime_1.jsx)(substyles_1.BannerSubstyle3, { ...substyleProps })] }));
26
26
  };
27
27
  exports.BannerStyle1 = BannerStyle1;
@@ -1 +1 @@
1
- {"version":3,"file":"BannerSubstyle1.d.ts","sourceRoot":"","sources":["../../../../src/components/Style1/substyles/BannerSubstyle1.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEtE,UAAU,oBAAqB,SAAQ,mBAAmB;IACxD,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;CACjD;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8G1D,CAAC"}
1
+ {"version":3,"file":"BannerSubstyle1.d.ts","sourceRoot":"","sources":["../../../../src/components/Style1/substyles/BannerSubstyle1.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEtE,UAAU,oBAAqB,SAAQ,mBAAmB;IACxD,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;CACjD;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8G1D,CAAC"}
@@ -4,10 +4,14 @@
4
4
  * Extracted from Next.js app implementation
5
5
  */
6
6
  "use client";
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
7
10
  Object.defineProperty(exports, "__esModule", { value: true });
8
11
  exports.BannerSubstyle1 = void 0;
9
12
  const jsx_runtime_1 = require("react/jsx-runtime");
10
13
  const react_1 = require("react");
14
+ const clsx_1 = __importDefault(require("clsx"));
11
15
  const shadowUtils_1 = require("../../../styles/shadowUtils");
12
16
  const BannerSubstyle1 = ({ copy1, copy2, fontSize_01, fontSize_02, logoUrl, backgroundImageUrl, postType, ImageComponent, }) => {
13
17
  const { shadowStyle, logoShadowStyle } = (0, react_1.useMemo)(() => {
@@ -39,10 +43,10 @@ const BannerSubstyle1 = ({ copy1, copy2, fontSize_01, fontSize_02, logoUrl, back
39
43
  });
40
44
  return { shadowStyle, logoShadowStyle };
41
45
  }, []); // Empty dependency array ensures this runs only once on mount
42
- return ((0, jsx_runtime_1.jsxs)("div", { className: "inset-0 flex flex-col items-start justify-between h-full text-center pb-20 relative isolate overflow-hidden gap-4", children: [backgroundImageUrl && ((0, jsx_runtime_1.jsx)(ImageComponent, { src: backgroundImageUrl, alt: "Background", width: 1080, height: postType === "STORY" ? 1920 : 1350, className: "object-cover absolute inset-0 w-full h-full -z-10", style: { objectFit: "cover" } })), (0, jsx_runtime_1.jsx)("div", { style: shadowStyle, className: "relative z-10", "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)("div", { style: logoShadowStyle, className: "relative z-10", "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)("div", { className: "relative px-20 pt-20 z-20", children: (0, jsx_runtime_1.jsx)("div", { className: "relative w-64 h-64", children: logoUrl && ((0, jsx_runtime_1.jsx)(ImageComponent, { src: logoUrl, alt: "Logo", width: 256, height: 256, className: "object-contain absolute inset-0 w-full h-full", style: { objectFit: "contain" } })) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "w-full px-20 relative z-20", children: [(0, jsx_runtime_1.jsx)("p", { style: {
46
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("inset-0 flex flex-col items-start justify-between h-full text-center relative isolate overflow-hidden gap-4 px-20", postType === "STORY" ? "py-36" : "py-20"), children: [backgroundImageUrl && ((0, jsx_runtime_1.jsx)(ImageComponent, { src: backgroundImageUrl, alt: "Background", width: 1080, height: postType === "STORY" ? 1920 : 1350, className: "object-cover absolute inset-0 w-full h-full -z-10", style: { objectFit: "cover" } })), (0, jsx_runtime_1.jsx)("div", { style: shadowStyle, className: "relative z-10", "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)("div", { style: logoShadowStyle, className: "relative z-10", "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)("div", { className: "relative z-20", children: (0, jsx_runtime_1.jsx)("div", { className: "relative w-64 h-64", children: logoUrl && ((0, jsx_runtime_1.jsx)(ImageComponent, { src: logoUrl, alt: "Logo", width: 256, height: 256, className: "object-contain absolute inset-0 w-full h-full", style: { objectFit: "contain" } })) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "w-full relative z-20", children: [(0, jsx_runtime_1.jsx)("p", { style: {
43
47
  fontSize: fontSize_01,
44
- }, className: "leading-tight whitespace-pre-wrap", children: copy1 }), (0, jsx_runtime_1.jsx)("p", { style: {
48
+ }, className: "whitespace-pre-wrap", children: copy1 }), (0, jsx_runtime_1.jsx)("p", { style: {
45
49
  fontSize: fontSize_02,
46
- }, className: "font-bold leading-tight whitespace-pre-wrap", children: copy2 })] })] }));
50
+ }, className: "font-bold whitespace-pre-wrap", children: copy2 })] })] }));
47
51
  };
48
52
  exports.BannerSubstyle1 = BannerSubstyle1;
@@ -1 +1 @@
1
- {"version":3,"file":"BannerSubstyle2.d.ts","sourceRoot":"","sources":["../../../../src/components/Style1/substyles/BannerSubstyle2.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEtE,UAAU,oBAAqB,SAAQ,mBAAmB;IACxD,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;CACjD;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA+G1D,CAAC"}
1
+ {"version":3,"file":"BannerSubstyle2.d.ts","sourceRoot":"","sources":["../../../../src/components/Style1/substyles/BannerSubstyle2.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEtE,UAAU,oBAAqB,SAAQ,mBAAmB;IACxD,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;CACjD;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA6G1D,CAAC"}
@@ -4,10 +4,14 @@
4
4
  * Extracted from Next.js app implementation
5
5
  */
6
6
  "use client";
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
7
10
  Object.defineProperty(exports, "__esModule", { value: true });
8
11
  exports.BannerSubstyle2 = void 0;
9
12
  const jsx_runtime_1 = require("react/jsx-runtime");
10
13
  const react_1 = require("react");
14
+ const clsx_1 = __importDefault(require("clsx"));
11
15
  const shadowUtils_1 = require("../../../styles/shadowUtils");
12
16
  const BannerSubstyle2 = ({ copy1, copy2, fontSize_01, fontSize_02, logoUrl, backgroundImageUrl, postType, ImageComponent, }) => {
13
17
  const { shadowStyle, logoShadowStyle } = (0, react_1.useMemo)(() => {
@@ -39,10 +43,10 @@ const BannerSubstyle2 = ({ copy1, copy2, fontSize_01, fontSize_02, logoUrl, back
39
43
  });
40
44
  return { shadowStyle, logoShadowStyle };
41
45
  }, []); // Empty dependency array ensures this runs only once on mount
42
- return ((0, jsx_runtime_1.jsxs)("div", { className: "inset-0 flex flex-col items-start justify-between h-full pb-20 relative isolate overflow-hidden gap-4", children: [backgroundImageUrl && ((0, jsx_runtime_1.jsx)(ImageComponent, { src: backgroundImageUrl, alt: "Background", width: 1080, height: postType === "STORY" ? 1920 : 1350, className: "object-cover absolute inset-0 w-full h-full -z-10 opacity-75", style: { objectFit: 'cover' } })), (0, jsx_runtime_1.jsx)("div", { style: shadowStyle, className: "relative z-10", "aria-hidden": "true" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative px-20 pt-20 z-20", children: [(0, jsx_runtime_1.jsx)("div", { style: logoShadowStyle, className: "relative z-10", "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)("div", { className: "relative w-64 h-64", children: logoUrl && ((0, jsx_runtime_1.jsx)(ImageComponent, { src: logoUrl, alt: "Logo", width: 256, height: 256, className: "object-contain absolute inset-0 w-full h-full", style: { objectFit: 'contain' } })) }), (0, jsx_runtime_1.jsx)("p", { style: {
46
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("inset-0 flex flex-col items-start justify-between h-full relative isolate overflow-hidden gap-4 px-20", postType === "STORY" ? "py-36" : "py-20"), children: [backgroundImageUrl && ((0, jsx_runtime_1.jsx)(ImageComponent, { src: backgroundImageUrl, alt: "Background", width: 1080, height: postType === "STORY" ? 1920 : 1350, className: "object-cover absolute inset-0 w-full h-full -z-10", style: { objectFit: "cover" } })), (0, jsx_runtime_1.jsx)("div", { style: shadowStyle, className: "relative z-10", "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)("div", { style: logoShadowStyle, className: "relative z-10", "aria-hidden": "true" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-20", children: [(0, jsx_runtime_1.jsx)("div", { className: "relative w-64 h-64", children: logoUrl && ((0, jsx_runtime_1.jsx)(ImageComponent, { src: logoUrl, alt: "Logo", width: 256, height: 256, className: "object-contain absolute inset-0 w-full h-full", style: { objectFit: "contain" } })) }), (0, jsx_runtime_1.jsx)("p", { style: {
43
47
  fontSize: `calc(${fontSize_01} * 0.8)`,
44
- }, className: "w-1/2 mt-8 leading-tight whitespace-pre-wrap", children: copy1 })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full px-20 relative z-20", children: (0, jsx_runtime_1.jsx)("p", { style: {
48
+ }, className: "w-1/2 mt-8 whitespace-pre-wrap", children: copy1 })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full relative z-20", children: (0, jsx_runtime_1.jsx)("p", { style: {
45
49
  fontSize: fontSize_02,
46
- }, className: "font-bold text-center leading-tight whitespace-pre-wrap", children: copy2 }) })] }));
50
+ }, className: "font-bold text-center whitespace-pre-wrap", children: copy2 }) })] }));
47
51
  };
48
52
  exports.BannerSubstyle2 = BannerSubstyle2;
@@ -1 +1 @@
1
- {"version":3,"file":"BannerSubstyle3.d.ts","sourceRoot":"","sources":["../../../../src/components/Style1/substyles/BannerSubstyle3.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEtE,UAAU,oBAAqB,SAAQ,mBAAmB;IACxD,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;CACjD;AAQD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8G1D,CAAC"}
1
+ {"version":3,"file":"BannerSubstyle3.d.ts","sourceRoot":"","sources":["../../../../src/components/Style1/substyles/BannerSubstyle3.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEtE,UAAU,oBAAqB,SAAQ,mBAAmB;IACxD,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;CACjD;AAQD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAkH1D,CAAC"}
@@ -4,10 +4,14 @@
4
4
  * Extracted from Next.js app implementation
5
5
  */
6
6
  "use client";
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
7
10
  Object.defineProperty(exports, "__esModule", { value: true });
8
11
  exports.BannerSubstyle3 = void 0;
9
12
  const jsx_runtime_1 = require("react/jsx-runtime");
10
13
  const react_1 = require("react");
14
+ const clsx_1 = __importDefault(require("clsx"));
11
15
  const shadowUtils_1 = require("../../../styles/shadowUtils");
12
16
  // Helper function to replace multiple spaces with newlines
13
17
  const formatCopy = (text) => {
@@ -48,10 +52,10 @@ const BannerSubstyle3 = ({ copy1, copy2, fontSize_01, fontSize_02, logoUrl, back
48
52
  // Process the copy strings
49
53
  const formattedCopy1 = (0, react_1.useMemo)(() => formatCopy(copy1), [copy1]);
50
54
  const formattedCopy2 = (0, react_1.useMemo)(() => formatCopy(copy2), [copy2]);
51
- return ((0, jsx_runtime_1.jsxs)("div", { className: "inset-0 flex flex-col items-start justify-between h-full pb-20 relative isolate overflow-hidden gap-4", children: [backgroundImageUrl && ((0, jsx_runtime_1.jsx)(ImageComponent, { src: backgroundImageUrl, alt: "Background", width: 1080, height: postType === "STORY" ? 1920 : 1350, className: "object-cover absolute inset-0 w-full h-full -z-10", style: { objectFit: 'cover' } })), (0, jsx_runtime_1.jsx)("div", { style: shadowStyle, className: "relative z-10", "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)("div", { style: logoShadowStyle, className: "relative z-10", "aria-hidden": "true" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative px-20 pt-20 flex justify-between w-full z-20", children: [(0, jsx_runtime_1.jsx)("div", { className: "relative w-64 h-64 pr-64", children: logoUrl && ((0, jsx_runtime_1.jsx)(ImageComponent, { src: logoUrl, alt: "Logo", width: 256, height: 256, className: "object-contain absolute inset-0 w-full h-full", style: { objectFit: 'contain' } })) }), (0, jsx_runtime_1.jsx)("p", { style: {
55
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("inset-0 flex flex-col items-start justify-between h-full relative isolate overflow-hidden gap-4 px-20", postType === "STORY" ? "py-36" : "py-20"), children: [backgroundImageUrl && ((0, jsx_runtime_1.jsx)(ImageComponent, { src: backgroundImageUrl, alt: "Background", width: 1080, height: postType === "STORY" ? 1920 : 1350, className: "object-cover absolute inset-0 w-full h-full -z-10", style: { objectFit: "cover" } })), (0, jsx_runtime_1.jsx)("div", { style: shadowStyle, className: "relative z-10", "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)("div", { style: logoShadowStyle, className: "relative z-10", "aria-hidden": "true" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative flex justify-between w-full z-20", children: [(0, jsx_runtime_1.jsx)("div", { className: "relative w-64 h-64 pr-64", children: logoUrl && ((0, jsx_runtime_1.jsx)(ImageComponent, { src: logoUrl, alt: "Logo", width: 256, height: 256, className: "object-contain absolute inset-0 w-full h-full", style: { objectFit: "contain" } })) }), (0, jsx_runtime_1.jsx)("p", { style: {
52
56
  fontSize: `calc(${fontSize_01} * 0.8)`,
53
- }, className: "text-right w-2/3 leading-tight whitespace-pre-wrap", children: formattedCopy1 })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full px-20 relative z-20", children: (0, jsx_runtime_1.jsx)("p", { style: {
57
+ }, className: "text-right w-2/3 whitespace-pre-wrap", children: formattedCopy1 })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full relative z-20", children: (0, jsx_runtime_1.jsx)("p", { style: {
54
58
  fontSize: fontSize_02,
55
- }, className: "font-bold text-center leading-tight whitespace-pre-wrap", children: formattedCopy2 }) })] }));
59
+ }, className: "font-bold text-center whitespace-pre-wrap", children: formattedCopy2 }) })] }));
56
60
  };
57
61
  exports.BannerSubstyle3 = BannerSubstyle3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zuljaman-banner-components",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Shared banner components package for Next.js and AWS Lambda platforms",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",