zuljaman-banner-components 1.0.39 → 1.0.41

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 (31) hide show
  1. package/dist/components/styles/Style7/substyleConfig.d.ts +6 -5
  2. package/dist/components/styles/Style7/substyleConfig.d.ts.map +1 -1
  3. package/dist/components/styles/Style7/substyleConfig.js +57 -43
  4. package/dist/components/styles/Style8/substyleConfig.d.ts +7 -5
  5. package/dist/components/styles/Style8/substyleConfig.d.ts.map +1 -1
  6. package/dist/components/styles/Style8/substyleConfig.js +48 -59
  7. package/dist/components/styles/Style9/substyleConfig.d.ts +6 -7
  8. package/dist/components/styles/Style9/substyleConfig.d.ts.map +1 -1
  9. package/dist/components/styles/Style9/substyleConfig.js +51 -46
  10. package/dist/constants/bannerDefaults.d.ts +19 -0
  11. package/dist/constants/bannerDefaults.d.ts.map +1 -0
  12. package/dist/constants/bannerDefaults.js +90 -0
  13. package/dist/constants/characterLimits.js +7 -7
  14. package/dist/constants/index.d.ts +1 -0
  15. package/dist/constants/index.d.ts.map +1 -1
  16. package/dist/constants/index.js +1 -0
  17. package/dist/index.d.ts +4 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +15 -1
  20. package/dist/styleConfig.js +5 -5
  21. package/dist/{utils.d.ts → utils/index.d.ts} +5 -2
  22. package/dist/utils/index.d.ts.map +1 -0
  23. package/dist/{utils.js → utils/index.js} +7 -1
  24. package/dist/utils/styleDefaults.d.ts +35 -0
  25. package/dist/utils/styleDefaults.d.ts.map +1 -0
  26. package/dist/utils/styleDefaults.js +53 -0
  27. package/dist/utils/styleRouter.d.ts +7 -0
  28. package/dist/utils/styleRouter.d.ts.map +1 -0
  29. package/dist/utils/styleRouter.js +34 -0
  30. package/package.json +1 -1
  31. package/dist/utils.d.ts.map +0 -1
@@ -1,11 +1,12 @@
1
1
  /**
2
- * Style7: Split Duo
3
- * Font: Lato Bold (copy-0) + Cormorant Garamond (copy-1)
4
- * Personality: Two-voice layout, sans + serif contrast, editorial split
2
+ * Style7: Modern Poster
3
+ * Font: Lato (sans-serif, warm and friendly)
4
+ * Personality: Clean centered hierarchy, event/product launch feel
5
+ *
6
+ * Redesigned: Strong headline + supporting subtitle, generous whitespace.
7
+ * Lato's warmth shines in centered compositions with clear size contrast.
5
8
  *
6
9
  * Coordinates are in pixels from center (540, 540) of a 1080x1080 banner
7
- * x: negative = left, positive = right
8
- * y: negative = up, positive = down
9
10
  */
10
11
  import { SubstyleConfig } from '../types/substyleTypes';
11
12
  export type { SubstyleConfig };
@@ -1 +1 @@
1
- {"version":3,"file":"substyleConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/styles/Style7/substyleConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAwElE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,cAEpD,CAAC"}
1
+ {"version":3,"file":"substyleConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/styles/Style7/substyleConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAqFlE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,cAEpD,CAAC"}
@@ -1,85 +1,99 @@
1
1
  "use strict";
2
2
  /**
3
- * Style7: Split Duo
4
- * Font: Lato Bold (copy-0) + Cormorant Garamond (copy-1)
5
- * Personality: Two-voice layout, sans + serif contrast, editorial split
3
+ * Style7: Modern Poster
4
+ * Font: Lato (sans-serif, warm and friendly)
5
+ * Personality: Clean centered hierarchy, event/product launch feel
6
+ *
7
+ * Redesigned: Strong headline + supporting subtitle, generous whitespace.
8
+ * Lato's warmth shines in centered compositions with clear size contrast.
6
9
  *
7
10
  * Coordinates are in pixels from center (540, 540) of a 1080x1080 banner
8
- * x: negative = left, positive = right
9
- * y: negative = up, positive = down
10
11
  */
11
12
  Object.defineProperty(exports, "__esModule", { value: true });
12
13
  exports.getSubstyleConfig = exports.STYLE7_SUBSTYLE_CONFIGS = void 0;
13
14
  const substyleUtils_1 = require("../utils/substyleUtils");
14
15
  exports.STYLE7_SUBSTYLE_CONFIGS = {
15
- // Substyle 1: Horizontal splitcopy-0 left, copy-1 right
16
- // Logo top-center bridges both halves
16
+ // Substyle 1: Centered posterheadline top, subtitle bottom, logo between
17
17
  1: {
18
18
  logo: {
19
- x: -110, // Top-center
20
- y: -486,
19
+ x: -110,
20
+ y: 100, // Center, between copies
21
21
  },
22
22
  copies: [
23
23
  {
24
- x: -270, // Left half (copy-0: sans bold)
25
- y: 100, // Middle area
26
- width: 430, // ~40% width
27
- alignment: 'left',
24
+ x: 0,
25
+ y: -280, // Upper third — bold headline
26
+ width: 900,
27
+ alignment: 'center',
28
28
  },
29
29
  {
30
- x: 270, // Right half (copy-1: serif)
31
- y: 100, // Same vertical level
32
- width: 430,
33
- alignment: 'right',
30
+ x: 0,
31
+ y: 350, // Lower third — lighter subtitle
32
+ width: 800,
33
+ alignment: 'center',
34
34
  },
35
35
  ],
36
- fontSizes: [1.0, 0.75],
36
+ fontSizes: [1.1, 0.50],
37
37
  },
38
- // Substyle 2: Vertical split copy-0 top, copy-1 bottom
39
- // Logo centered between them
38
+ // Substyle 2: Left-anchoredheadline left, subtitle below, logo bottom-right
40
39
  2: {
41
40
  logo: {
42
- x: -110, // Center
43
- y: 0, // Dead center (between copies)
41
+ x: 340,
42
+ y: 380, // Bottom-right
44
43
  },
45
44
  copies: [
46
45
  {
47
- x: 0, // Centered (copy-0: sans bold, top)
48
- y: -300, // Upper third
46
+ x: -50,
47
+ y: -150, // Upper-center
49
48
  width: 850,
50
- alignment: 'center',
49
+ alignment: 'left',
51
50
  },
52
51
  {
53
- x: 0, // Centered (copy-1: serif, bottom)
54
- y: 300, // Lower third
55
- width: 850,
56
- alignment: 'center',
52
+ x: -50,
53
+ y: -150, // Auto-positioned below
54
+ width: 700,
55
+ alignment: 'left',
57
56
  },
58
57
  ],
59
- fontSizes: [1.2, 0.70],
58
+ autoPositioning: true,
59
+ autoPositioningConfig: {
60
+ enabled: true,
61
+ links: [
62
+ { fromElement: 'copy-0', toElement: 'copy-1', direction: 'down' },
63
+ ],
64
+ },
65
+ gapRem: 1.5,
66
+ fontSizes: [1.0, 0.45],
60
67
  },
61
- // Substyle 3: Diagonal split copy-0 top-left, copy-1 bottom-right
62
- // Logo bottom-left corner
68
+ // Substyle 3: Bottom-weightedcopies at bottom, logo top-center
63
69
  3: {
64
70
  logo: {
65
- x: -475, // Bottom-left
66
- y: 380,
71
+ x: -110,
72
+ y: -486, // Top-center
67
73
  },
68
74
  copies: [
69
75
  {
70
- x: -200, // Upper-left area (copy-0: sans bold)
71
- y: -300,
72
- width: 500,
73
- alignment: 'left',
76
+ x: 0,
77
+ y: 250, // Lower area — headline
78
+ width: 900,
79
+ alignment: 'center',
74
80
  },
75
81
  {
76
- x: 200, // Lower-right area (copy-1: serif)
77
- y: 250,
78
- width: 500,
79
- alignment: 'right',
82
+ x: 0,
83
+ y: 250, // Auto-positioned below
84
+ width: 750,
85
+ alignment: 'center',
80
86
  },
81
87
  ],
82
- fontSizes: [1.1, 0.70],
88
+ autoPositioning: true,
89
+ autoPositioningConfig: {
90
+ enabled: true,
91
+ links: [
92
+ { fromElement: 'copy-0', toElement: 'copy-1', direction: 'down' },
93
+ ],
94
+ },
95
+ gapRem: 1.25,
96
+ fontSizes: [1.0, 0.45],
83
97
  },
84
98
  };
85
99
  const getSubstyleConfig = (substyle) => {
@@ -1,11 +1,13 @@
1
1
  /**
2
- * Style8: Quote / Testimonial
3
- * Font: Cormorant Garamond italic (copy-0: quote) + Roboto (copy-1: attribution)
4
- * Personality: Elegant quotation with attribution, testimonial-ready
2
+ * Style8: Editorial Quote
3
+ * Font: Cormorant Garamond (serif, elegant)
4
+ * Personality: Magazine pull-quote, intimate and refined
5
+ *
6
+ * Redesigned: Smaller, more elegant quote text. No pill backgrounds —
7
+ * attribution is plain small text (the serif font does the elegance work).
8
+ * Noise ON for texture.
5
9
  *
6
10
  * Coordinates are in pixels from center (540, 540) of a 1080x1080 banner
7
- * x: negative = left, positive = right
8
- * y: negative = up, positive = down
9
11
  */
10
12
  import { SubstyleConfig } from '../types/substyleTypes';
11
13
  export type { SubstyleConfig };
@@ -1 +1 @@
1
- {"version":3,"file":"substyleConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/styles/Style8/substyleConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CA0GlE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,cAEpD,CAAC"}
1
+ {"version":3,"file":"substyleConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/styles/Style8/substyleConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CA6FlE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,cAEpD,CAAC"}
@@ -1,42 +1,37 @@
1
1
  "use strict";
2
2
  /**
3
- * Style8: Quote / Testimonial
4
- * Font: Cormorant Garamond italic (copy-0: quote) + Roboto (copy-1: attribution)
5
- * Personality: Elegant quotation with attribution, testimonial-ready
3
+ * Style8: Editorial Quote
4
+ * Font: Cormorant Garamond (serif, elegant)
5
+ * Personality: Magazine pull-quote, intimate and refined
6
+ *
7
+ * Redesigned: Smaller, more elegant quote text. No pill backgrounds —
8
+ * attribution is plain small text (the serif font does the elegance work).
9
+ * Noise ON for texture.
6
10
  *
7
11
  * Coordinates are in pixels from center (540, 540) of a 1080x1080 banner
8
- * x: negative = left, positive = right
9
- * y: negative = up, positive = down
10
12
  */
11
13
  Object.defineProperty(exports, "__esModule", { value: true });
12
14
  exports.getSubstyleConfig = exports.STYLE8_SUBSTYLE_CONFIGS = void 0;
13
15
  const substyleUtils_1 = require("../utils/substyleUtils");
14
16
  exports.STYLE8_SUBSTYLE_CONFIGS = {
15
- // Substyle 1: Centered quote with attribution below
16
- // Logo at top-center, quote centered, attribution chained below
17
+ // Substyle 1: Centered editorial quote text mid-page, attribution below
17
18
  1: {
18
19
  logo: {
19
- x: -110, // Top-center
20
- y: -486,
20
+ x: -110,
21
+ y: -486, // Top-center
21
22
  },
22
23
  copies: [
23
24
  {
24
- x: 0, // Centered (copy-0: quote text)
25
- y: -50, // Slightly above center
26
- width: 800, // ~74% width for elegant line lengths
25
+ x: 0,
26
+ y: -30, // Slightly above center
27
+ width: 750, // Narrower for elegant line lengths
27
28
  alignment: 'center',
28
29
  },
29
30
  {
30
- x: 0, // Centered (copy-1: attribution)
31
- y: -50, // Auto-positioned below quote
32
- width: 500,
31
+ x: 0,
32
+ y: -30, // Auto-positioned below
33
+ width: 600,
33
34
  alignment: 'center',
34
- hasBg: true,
35
- bgColor: '#FFFFFF',
36
- color: '#000000',
37
- paddingX: '1.5rem',
38
- paddingY: '0.75rem',
39
- borderRadius: '2rem', // Pill shape for attribution
40
35
  },
41
36
  ],
42
37
  autoPositioning: true,
@@ -46,74 +41,68 @@ exports.STYLE8_SUBSTYLE_CONFIGS = {
46
41
  { fromElement: 'copy-0', toElement: 'copy-1', direction: 'down' },
47
42
  ],
48
43
  },
49
- gapRem: 2.0,
50
- fontSizes: [1.0, 0.35],
44
+ gapRem: 2.5,
45
+ fontSizes: [0.80, 0.35],
51
46
  },
52
- // Substyle 2: Left-aligned quote, attribution bottom-right
53
- // Logo top-left, quote left-aligned, attribution floats bottom-right
47
+ // Substyle 2: Left-aligned quote editorial magazine feel
54
48
  2: {
55
49
  logo: {
56
- x: -475, // Top-left
57
- y: -486,
50
+ x: -475,
51
+ y: -486, // Top-left
58
52
  },
59
53
  copies: [
60
54
  {
61
- x: -100, // Left-biased (copy-0: quote text)
62
- y: 0, // Center area
63
- width: 750,
55
+ x: -60,
56
+ y: 50, // Center area
57
+ width: 700,
64
58
  alignment: 'left',
65
59
  },
66
60
  {
67
- x: 250, // Bottom-right area (copy-1: attribution)
68
- y: 380,
69
- width: 450,
70
- alignment: 'right',
71
- hasBg: true,
72
- bgColor: '#FFFFFF',
73
- color: '#000000',
74
- paddingX: '1.25rem',
75
- paddingY: '0.75rem',
76
- borderRadius: '2rem',
61
+ x: -60,
62
+ y: 50, // Auto-positioned below
63
+ width: 500,
64
+ alignment: 'left',
77
65
  },
78
66
  ],
79
- fontSizes: [0.90, 0.35],
67
+ autoPositioning: true,
68
+ autoPositioningConfig: {
69
+ enabled: true,
70
+ links: [
71
+ { fromElement: 'copy-0', toElement: 'copy-1', direction: 'down' },
72
+ ],
73
+ },
74
+ gapRem: 2.0,
75
+ fontSizes: [0.75, 0.35],
80
76
  },
81
- // Substyle 3: Bottom quote with logo above
82
- // Logo center, quote bottom-center, attribution chained above quote
77
+ // Substyle 3: Bottom quote text anchored low, logo upper area
83
78
  3: {
84
79
  logo: {
85
- x: -110, // Center
86
- y: -200, // Upper area
80
+ x: -110,
81
+ y: -250, // Upper-center area
87
82
  },
88
83
  copies: [
89
84
  {
90
- x: 0, // Centered (copy-0: quote text)
91
- y: 300, // Lower area
92
- width: 800,
85
+ x: 0,
86
+ y: 250, // Lower area
87
+ width: 750,
93
88
  alignment: 'center',
94
89
  },
95
90
  {
96
- x: 0, // Centered (copy-1: attribution)
97
- y: 300, // Auto-positioned above quote
98
- width: 500,
91
+ x: 0,
92
+ y: 250, // Auto-positioned below
93
+ width: 600,
99
94
  alignment: 'center',
100
- hasBg: true,
101
- bgColor: '#FFFFFF',
102
- color: '#000000',
103
- paddingX: '1.5rem',
104
- paddingY: '0.75rem',
105
- borderRadius: '2rem',
106
95
  },
107
96
  ],
108
97
  autoPositioning: true,
109
98
  autoPositioningConfig: {
110
99
  enabled: true,
111
100
  links: [
112
- { fromElement: 'copy-0', toElement: 'copy-1', direction: 'up' },
101
+ { fromElement: 'copy-0', toElement: 'copy-1', direction: 'down' },
113
102
  ],
114
103
  },
115
104
  gapRem: 2.0,
116
- fontSizes: [1.0, 0.35],
105
+ fontSizes: [0.80, 0.35],
117
106
  },
118
107
  };
119
108
  const getSubstyleConfig = (substyle) => {
@@ -1,15 +1,14 @@
1
1
  /**
2
- * Style9: Stacked Impact
2
+ * Style9: Bold Condensed
3
3
  * Font: Roboto Condensed (sans-serif, bold)
4
- * Personality: 3-element vertical stack, high-impact headlines, layered text
5
- * First style to use 3-element chain
4
+ * Personality: Urban, bold, high-impact headlines
6
5
  *
7
- * NOTE: Each copy has a different base Y to pre-space them.
8
- * Auto-positioning fine-tunes the gap but doesn't have to do all the heavy lifting.
6
+ * Redesigned: Roboto Condensed is NARROW it fits more text per line than
7
+ * regular fonts. So we can use BIGGER sizes (0.90-1.0) without overflow.
8
+ * Strong size hierarchy: hero headline + supporting line + small accent.
9
+ * Only 2 copies (dropped the 3rd — it was diluting the impact).
9
10
  *
10
11
  * Coordinates are in pixels from center (540, 540) of a 1080x1080 banner
11
- * x: negative = left, positive = right
12
- * y: negative = up, positive = down
13
12
  */
14
13
  import { SubstyleConfig } from '../types/substyleTypes';
15
14
  export type { SubstyleConfig };
@@ -1 +1 @@
1
- {"version":3,"file":"substyleConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/styles/Style9/substyleConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAuFlE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,cAEpD,CAAC"}
1
+ {"version":3,"file":"substyleConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/styles/Style9/substyleConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CA6FlE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,cAEpD,CAAC"}
@@ -1,104 +1,109 @@
1
1
  "use strict";
2
2
  /**
3
- * Style9: Stacked Impact
3
+ * Style9: Bold Condensed
4
4
  * Font: Roboto Condensed (sans-serif, bold)
5
- * Personality: 3-element vertical stack, high-impact headlines, layered text
6
- * First style to use 3-element chain
5
+ * Personality: Urban, bold, high-impact headlines
7
6
  *
8
- * NOTE: Each copy has a different base Y to pre-space them.
9
- * Auto-positioning fine-tunes the gap but doesn't have to do all the heavy lifting.
7
+ * Redesigned: Roboto Condensed is NARROW it fits more text per line than
8
+ * regular fonts. So we can use BIGGER sizes (0.90-1.0) without overflow.
9
+ * Strong size hierarchy: hero headline + supporting line + small accent.
10
+ * Only 2 copies (dropped the 3rd — it was diluting the impact).
10
11
  *
11
12
  * Coordinates are in pixels from center (540, 540) of a 1080x1080 banner
12
- * x: negative = left, positive = right
13
- * y: negative = up, positive = down
14
13
  */
15
14
  Object.defineProperty(exports, "__esModule", { value: true });
16
15
  exports.getSubstyleConfig = exports.STYLE9_SUBSTYLE_CONFIGS = void 0;
17
16
  const substyleUtils_1 = require("../utils/substyleUtils");
18
17
  exports.STYLE9_SUBSTYLE_CONFIGS = {
19
- // Substyle 1: Centered 3-stack, logo bottom-center
18
+ // Substyle 1: Centered bold — big headline top, subtitle bottom
20
19
  1: {
21
20
  logo: {
22
21
  x: -110,
23
- y: 432,
22
+ y: 432, // Bottom-center
24
23
  },
25
24
  copies: [
26
25
  {
27
26
  x: 0,
28
- y: -250, // Upper area
29
- width: 900,
27
+ y: -200, // Upper area — hero headline
28
+ width: 950,
30
29
  alignment: 'center',
31
30
  },
32
31
  {
33
32
  x: 0,
34
- y: -50, // Middle area (pre-spaced ~200px below copy-0)
35
- width: 900,
36
- alignment: 'center',
37
- },
38
- {
39
- x: 0,
40
- y: 150, // Lower area (pre-spaced ~200px below copy-1)
41
- width: 750,
33
+ y: -200, // Auto-positioned below
34
+ width: 850,
42
35
  alignment: 'center',
43
36
  },
44
37
  ],
45
- fontSizes: [0.75, 0.75, 0.40],
38
+ autoPositioning: true,
39
+ autoPositioningConfig: {
40
+ enabled: true,
41
+ links: [
42
+ { fromElement: 'copy-0', toElement: 'copy-1', direction: 'down' },
43
+ ],
44
+ },
45
+ gapRem: 0.75,
46
+ fontSizes: [1.0, 0.50],
46
47
  },
47
- // Substyle 2: Left-aligned 3-stack, logo top-right
48
+ // Substyle 2: Left-aligned bold — headline left, logo top-right
48
49
  2: {
49
50
  logo: {
50
51
  x: 340,
51
- y: -486,
52
+ y: -486, // Top-right
52
53
  },
53
54
  copies: [
54
55
  {
55
56
  x: -60,
56
- y: -100, // Upper-center
57
- width: 800,
58
- alignment: 'left',
59
- },
60
- {
61
- x: -60,
62
- y: 100, // Middle (pre-spaced ~200px)
63
- width: 800,
57
+ y: 50, // Center area
58
+ width: 850,
64
59
  alignment: 'left',
65
60
  },
66
61
  {
67
62
  x: -60,
68
- y: 280, // Lower (pre-spaced ~180px)
69
- width: 650,
63
+ y: 50, // Auto-positioned below
64
+ width: 750,
70
65
  alignment: 'left',
71
66
  },
72
67
  ],
73
- fontSizes: [0.75, 0.75, 0.35],
68
+ autoPositioning: true,
69
+ autoPositioningConfig: {
70
+ enabled: true,
71
+ links: [
72
+ { fromElement: 'copy-0', toElement: 'copy-1', direction: 'down' },
73
+ ],
74
+ },
75
+ gapRem: 0.75,
76
+ fontSizes: [1.0, 0.45],
74
77
  },
75
- // Substyle 3: Top 3-stack with logo below
78
+ // Substyle 3: Top-weighted copies at top, logo bottom-center
76
79
  3: {
77
80
  logo: {
78
81
  x: -110,
79
- y: 380,
82
+ y: 380, // Bottom-center
80
83
  },
81
84
  copies: [
82
85
  {
83
86
  x: 0,
84
- y: -400, // Near top
85
- width: 900,
87
+ y: -350, // Near top — hero
88
+ width: 950,
86
89
  alignment: 'center',
87
90
  },
88
91
  {
89
92
  x: 0,
90
- y: -200, // Upper-center (pre-spaced ~200px)
91
- width: 900,
92
- alignment: 'center',
93
- },
94
- {
95
- x: 0,
96
- y: 0, // Center (pre-spaced ~200px)
97
- width: 750,
93
+ y: -350, // Auto-positioned below
94
+ width: 850,
98
95
  alignment: 'center',
99
96
  },
100
97
  ],
101
- fontSizes: [0.75, 0.75, 0.40],
98
+ autoPositioning: true,
99
+ autoPositioningConfig: {
100
+ enabled: true,
101
+ links: [
102
+ { fromElement: 'copy-0', toElement: 'copy-1', direction: 'down' },
103
+ ],
104
+ },
105
+ gapRem: 0.75,
106
+ fontSizes: [1.0, 0.50],
102
107
  },
103
108
  };
104
109
  const getSubstyleConfig = (substyle) => {
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Shared constants used by both zuljaman and Lambda.
3
+ * Single source of truth for banner defaults.
4
+ */
5
+ /** Default placeholder text for copies when no user text is provided */
6
+ export declare const DEFAULT_COPY_TEXTS: string[];
7
+ /** Available Google Fonts and their loaded weights (matches CDN imports) */
8
+ export declare const FONT_WEIGHTS: Record<string, number[]>;
9
+ /** All available font families for the font picker UI */
10
+ export declare const AVAILABLE_FONTS: Array<{
11
+ value: string;
12
+ label: string;
13
+ category: 'sans-serif' | 'serif' | 'cursive';
14
+ }>;
15
+ /** Extract font family name from CSS value like "'Playfair Display', serif" -> "Playfair Display" */
16
+ export declare function extractFontName(cssValue: string): string;
17
+ /** Get available weights for a font family (by CSS value or name) */
18
+ export declare function getFontWeights(fontFamilyOrName: string): number[];
19
+ //# sourceMappingURL=bannerDefaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bannerDefaults.d.ts","sourceRoot":"","sources":["../../src/constants/bannerDefaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wEAAwE;AACxE,eAAO,MAAM,kBAAkB,UAI9B,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CA+BjD,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,GAAG,SAAS,CAAA;CAAE,CA+BjH,CAAC;AAEF,qGAAqG;AACrG,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,qEAAqE;AACrE,wBAAgB,cAAc,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,EAAE,CAGjE"}
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ /**
3
+ * Shared constants used by both zuljaman and Lambda.
4
+ * Single source of truth for banner defaults.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.AVAILABLE_FONTS = exports.FONT_WEIGHTS = exports.DEFAULT_COPY_TEXTS = void 0;
8
+ exports.extractFontName = extractFontName;
9
+ exports.getFontWeights = getFontWeights;
10
+ /** Default placeholder text for copies when no user text is provided */
11
+ exports.DEFAULT_COPY_TEXTS = [
12
+ 'Lorem ipsum dolor sit amet',
13
+ 'Consectetur adipiscing elit sed do eiusmod',
14
+ 'Tempor incididunt ut labore',
15
+ ];
16
+ /** Available Google Fonts and their loaded weights (matches CDN imports) */
17
+ exports.FONT_WEIGHTS = {
18
+ "Roboto": [300, 400, 500, 700, 900],
19
+ "Roboto Condensed": [300, 400, 500, 600, 700, 800, 900],
20
+ "Lato": [300, 400, 700, 900],
21
+ "Inter": [300, 400, 500, 600, 700, 800, 900],
22
+ "Open Sans": [300, 400, 500, 600, 700, 800],
23
+ "Source Sans 3": [300, 400, 500, 600, 700, 800, 900],
24
+ "Work Sans": [300, 400, 500, 600, 700, 800],
25
+ "DM Sans": [300, 400, 500, 600, 700],
26
+ "Montserrat": [300, 400, 500, 600, 700, 800, 900],
27
+ "Poppins": [400, 500, 600, 700, 800, 900],
28
+ "Raleway": [300, 400, 500, 600, 700, 800],
29
+ "Oswald": [300, 400, 500, 600, 700],
30
+ "Nunito": [300, 400, 500, 600, 700, 800, 900],
31
+ "Quicksand": [400, 500, 600, 700],
32
+ "Josefin Sans": [300, 400, 500, 600, 700],
33
+ "Bebas Neue": [400],
34
+ "Anton": [400],
35
+ "Archivo Black": [400],
36
+ "Cormorant Garamond": [300, 400, 500, 600, 700],
37
+ "Playfair Display": [400, 500, 600, 700, 800, 900],
38
+ "Merriweather": [300, 400, 700, 900],
39
+ "Lora": [400, 500, 600, 700],
40
+ "Libre Baskerville": [400, 700],
41
+ "EB Garamond": [400, 500, 600, 700, 800],
42
+ "Crimson Text": [400, 600, 700],
43
+ "Source Serif 4": [300, 400, 500, 600, 700],
44
+ "Dancing Script": [400, 500, 600, 700],
45
+ "Caveat": [400, 500, 600, 700],
46
+ "Pacifico": [400],
47
+ "Satisfy": [400],
48
+ };
49
+ /** All available font families for the font picker UI */
50
+ exports.AVAILABLE_FONTS = [
51
+ { value: "Roboto, sans-serif", label: "Roboto", category: "sans-serif" },
52
+ { value: "'Roboto Condensed', sans-serif", label: "Roboto Condensed", category: "sans-serif" },
53
+ { value: "Lato, sans-serif", label: "Lato", category: "sans-serif" },
54
+ { value: "Inter, sans-serif", label: "Inter", category: "sans-serif" },
55
+ { value: "'Open Sans', sans-serif", label: "Open Sans", category: "sans-serif" },
56
+ { value: "'Source Sans 3', sans-serif", label: "Source Sans", category: "sans-serif" },
57
+ { value: "'Work Sans', sans-serif", label: "Work Sans", category: "sans-serif" },
58
+ { value: "'DM Sans', sans-serif", label: "DM Sans", category: "sans-serif" },
59
+ { value: "Montserrat, sans-serif", label: "Montserrat", category: "sans-serif" },
60
+ { value: "Poppins, sans-serif", label: "Poppins", category: "sans-serif" },
61
+ { value: "Raleway, sans-serif", label: "Raleway", category: "sans-serif" },
62
+ { value: "Oswald, sans-serif", label: "Oswald", category: "sans-serif" },
63
+ { value: "Nunito, sans-serif", label: "Nunito", category: "sans-serif" },
64
+ { value: "Quicksand, sans-serif", label: "Quicksand", category: "sans-serif" },
65
+ { value: "'Josefin Sans', sans-serif", label: "Josefin Sans", category: "sans-serif" },
66
+ { value: "'Bebas Neue', sans-serif", label: "Bebas Neue", category: "sans-serif" },
67
+ { value: "Anton, sans-serif", label: "Anton", category: "sans-serif" },
68
+ { value: "'Archivo Black', sans-serif", label: "Archivo Black", category: "sans-serif" },
69
+ { value: "'Cormorant Garamond', serif", label: "Cormorant Garamond", category: "serif" },
70
+ { value: "'Playfair Display', serif", label: "Playfair Display", category: "serif" },
71
+ { value: "Merriweather, serif", label: "Merriweather", category: "serif" },
72
+ { value: "Lora, serif", label: "Lora", category: "serif" },
73
+ { value: "'Libre Baskerville', serif", label: "Libre Baskerville", category: "serif" },
74
+ { value: "'EB Garamond', serif", label: "EB Garamond", category: "serif" },
75
+ { value: "'Crimson Text', serif", label: "Crimson Text", category: "serif" },
76
+ { value: "'Source Serif 4', serif", label: "Source Serif", category: "serif" },
77
+ { value: "'Dancing Script', cursive", label: "Dancing Script", category: "cursive" },
78
+ { value: "Caveat, cursive", label: "Caveat", category: "cursive" },
79
+ { value: "Pacifico, cursive", label: "Pacifico", category: "cursive" },
80
+ { value: "Satisfy, cursive", label: "Satisfy", category: "cursive" },
81
+ ];
82
+ /** Extract font family name from CSS value like "'Playfair Display', serif" -> "Playfair Display" */
83
+ function extractFontName(cssValue) {
84
+ return cssValue.replace(/['"`]/g, '').split(',')[0].trim();
85
+ }
86
+ /** Get available weights for a font family (by CSS value or name) */
87
+ function getFontWeights(fontFamilyOrName) {
88
+ const name = fontFamilyOrName.includes(',') ? extractFontName(fontFamilyOrName) : fontFamilyOrName;
89
+ return exports.FONT_WEIGHTS[name] || [400, 700];
90
+ }
@@ -52,9 +52,9 @@ exports.RECOMMENDED_CHARACTER_LIMITS = {
52
52
  3: { limits: [50, 25], copyCount: 2 }
53
53
  },
54
54
  9: {
55
- 1: { limits: [25, 25, 30], copyCount: 3 },
56
- 2: { limits: [25, 25, 30], copyCount: 3 },
57
- 3: { limits: [25, 25, 30], copyCount: 3 }
55
+ 1: { limits: [30, 35], copyCount: 2 },
56
+ 2: { limits: [30, 35], copyCount: 2 },
57
+ 3: { limits: [30, 35], copyCount: 2 }
58
58
  }
59
59
  };
60
60
  /**
@@ -174,11 +174,11 @@ exports.BANNER_CONFIGURATIONS = {
174
174
  2: createDualCopyConfigAsymmetric(50, 25),
175
175
  3: createDualCopyConfigAsymmetric(50, 25),
176
176
  },
177
- // Style 9: Stacked Impact (Roboto Condensed) — 3-element chain
177
+ // Style 9: Bold Condensed (Roboto Condensed) — 2 copies, high impact
178
178
  9: {
179
- 1: createTripleCopyConfig(25, 25, 30),
180
- 2: createTripleCopyConfig(25, 25, 30),
181
- 3: createTripleCopyConfig(25, 25, 30),
179
+ 1: createDualCopyConfig(30),
180
+ 2: createDualCopyConfig(30),
181
+ 3: createDualCopyConfig(30),
182
182
  },
183
183
  };
184
184
  /**
@@ -4,4 +4,5 @@
4
4
  export * from './styleConfigs';
5
5
  export * from './characterLimits';
6
6
  export * from './defaults';
7
+ export * from './bannerDefaults';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
@@ -20,3 +20,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
20
20
  __exportStar(require("./styleConfigs"), exports);
21
21
  __exportStar(require("./characterLimits"), exports);
22
22
  __exportStar(require("./defaults"), exports);
23
+ __exportStar(require("./bannerDefaults"), exports);
package/dist/index.d.ts CHANGED
@@ -28,4 +28,8 @@ export type { SubstyleConfig as Style8SubstyleConfig } from './components/styles
28
28
  export { STYLE8_SUBSTYLE_CONFIGS, getSubstyleConfig as getStyle8SubstyleConfig } from './components/styles/Style8/substyleConfig';
29
29
  export type { SubstyleConfig as Style9SubstyleConfig } from './components/styles/Style9/substyleConfig';
30
30
  export { STYLE9_SUBSTYLE_CONFIGS, getSubstyleConfig as getStyle9SubstyleConfig } from './components/styles/Style9/substyleConfig';
31
+ export { getSubstyleConfigForStyle } from './utils/styleRouter';
32
+ export { DEFAULT_COPY_TEXTS, FONT_WEIGHTS, AVAILABLE_FONTS, extractFontName, getFontWeights } from './constants/bannerDefaults';
33
+ export { getStyleShadowDefaults, getCopyDefaults } from './utils/styleDefaults';
34
+ export type { StyleShadowDefaults, CopyDefaults } from './utils/styleDefaults';
31
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,cAAc,CAAC;AAG7B,cAAc,YAAY,CAAC;AAG3B,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,UAAU,CAAC;AAGzB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,2CAA2C,CAAC;AAE1D,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,cAAc,CAAC;AAG7B,cAAc,YAAY,CAAC;AAG3B,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,UAAU,CAAC;AAGzB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,2CAA2C,CAAC;AAE1D,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAEnD,YAAY,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACxG,OAAO,EACL,uBAAuB,EACvB,iBAAiB,IAAI,uBAAuB,EAC7C,MAAM,2CAA2C,CAAC;AAGnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGhI,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAChF,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
20
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
21
  };
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.getStyle9SubstyleConfig = exports.STYLE9_SUBSTYLE_CONFIGS = exports.getStyle8SubstyleConfig = exports.STYLE8_SUBSTYLE_CONFIGS = exports.getStyle7SubstyleConfig = exports.STYLE7_SUBSTYLE_CONFIGS = exports.getStyle6SubstyleConfig = exports.STYLE6_SUBSTYLE_CONFIGS = exports.getStyle5SubstyleConfig = exports.STYLE5_SUBSTYLE_CONFIGS = exports.getStyle4SubstyleConfig = exports.STYLE4_SUBSTYLE_CONFIGS = exports.getStyle3SubstyleConfig = exports.STYLE3_SUBSTYLE_CONFIGS = exports.getStyle2SubstyleConfig = exports.STYLE2_SUBSTYLE_CONFIGS = void 0;
23
+ exports.getCopyDefaults = exports.getStyleShadowDefaults = exports.getFontWeights = exports.extractFontName = exports.AVAILABLE_FONTS = exports.FONT_WEIGHTS = exports.DEFAULT_COPY_TEXTS = exports.getSubstyleConfigForStyle = exports.getStyle9SubstyleConfig = exports.STYLE9_SUBSTYLE_CONFIGS = exports.getStyle8SubstyleConfig = exports.STYLE8_SUBSTYLE_CONFIGS = exports.getStyle7SubstyleConfig = exports.STYLE7_SUBSTYLE_CONFIGS = exports.getStyle6SubstyleConfig = exports.STYLE6_SUBSTYLE_CONFIGS = exports.getStyle5SubstyleConfig = exports.STYLE5_SUBSTYLE_CONFIGS = exports.getStyle4SubstyleConfig = exports.STYLE4_SUBSTYLE_CONFIGS = exports.getStyle3SubstyleConfig = exports.STYLE3_SUBSTYLE_CONFIGS = exports.getStyle2SubstyleConfig = exports.STYLE2_SUBSTYLE_CONFIGS = void 0;
24
24
  // Core components
25
25
  __exportStar(require("./components"), exports);
26
26
  // Platform adapters
@@ -59,3 +59,17 @@ Object.defineProperty(exports, "getStyle8SubstyleConfig", { enumerable: true, ge
59
59
  var substyleConfig_8 = require("./components/styles/Style9/substyleConfig");
60
60
  Object.defineProperty(exports, "STYLE9_SUBSTYLE_CONFIGS", { enumerable: true, get: function () { return substyleConfig_8.STYLE9_SUBSTYLE_CONFIGS; } });
61
61
  Object.defineProperty(exports, "getStyle9SubstyleConfig", { enumerable: true, get: function () { return substyleConfig_8.getSubstyleConfig; } });
62
+ // Unified style router (replaces consumer switch statements)
63
+ var styleRouter_1 = require("./utils/styleRouter");
64
+ Object.defineProperty(exports, "getSubstyleConfigForStyle", { enumerable: true, get: function () { return styleRouter_1.getSubstyleConfigForStyle; } });
65
+ // Shared constants
66
+ var bannerDefaults_1 = require("./constants/bannerDefaults");
67
+ Object.defineProperty(exports, "DEFAULT_COPY_TEXTS", { enumerable: true, get: function () { return bannerDefaults_1.DEFAULT_COPY_TEXTS; } });
68
+ Object.defineProperty(exports, "FONT_WEIGHTS", { enumerable: true, get: function () { return bannerDefaults_1.FONT_WEIGHTS; } });
69
+ Object.defineProperty(exports, "AVAILABLE_FONTS", { enumerable: true, get: function () { return bannerDefaults_1.AVAILABLE_FONTS; } });
70
+ Object.defineProperty(exports, "extractFontName", { enumerable: true, get: function () { return bannerDefaults_1.extractFontName; } });
71
+ Object.defineProperty(exports, "getFontWeights", { enumerable: true, get: function () { return bannerDefaults_1.getFontWeights; } });
72
+ // Style defaults utilities
73
+ var styleDefaults_1 = require("./utils/styleDefaults");
74
+ Object.defineProperty(exports, "getStyleShadowDefaults", { enumerable: true, get: function () { return styleDefaults_1.getStyleShadowDefaults; } });
75
+ Object.defineProperty(exports, "getCopyDefaults", { enumerable: true, get: function () { return styleDefaults_1.getCopyDefaults; } });
@@ -167,7 +167,7 @@ exports.STYLE_CONFIGS = {
167
167
  recommendedCopyAmount: 2,
168
168
  maxLengthThreshold: 50,
169
169
  copyCharLimits: [50, 25],
170
- copyFontWeights: ['normal', 'bold'],
170
+ copyFontWeights: ['normal', 'normal'],
171
171
  fontFamily: '"Cormorant Garamond", serif',
172
172
  noiseEnabled: true,
173
173
  shadows: {
@@ -186,10 +186,10 @@ exports.STYLE_CONFIGS = {
186
186
  },
187
187
  },
188
188
  9: {
189
- recommendedCopyAmount: 3,
190
- maxLengthThreshold: 25,
191
- copyCharLimits: [25, 25, 30],
192
- copyFontWeights: ['bold', 'bold', 'normal'],
189
+ recommendedCopyAmount: 2,
190
+ maxLengthThreshold: 30,
191
+ copyCharLimits: [30, 35],
192
+ copyFontWeights: ['bold', 'normal'],
193
193
  fontFamily: '"Roboto Condensed", Roboto, sans-serif',
194
194
  noiseEnabled: false,
195
195
  shadows: {
@@ -2,7 +2,7 @@
2
2
  * Enhanced font size calculation for banner styles with separate sizing for copy1 and copy2
3
3
  * Extracted from Next.js app implementation
4
4
  */
5
- import type { StyleFontConfig, FontSizeResult } from './types';
5
+ import type { StyleFontConfig, FontSizeResult } from '../types';
6
6
  /**
7
7
  * Calculates dynamic font sizes for both copy1 and copy2 based on content length
8
8
  * and style-specific constraints.
@@ -12,5 +12,8 @@ import type { StyleFontConfig, FontSizeResult } from './types';
12
12
  * @param config - Style-specific font configuration
13
13
  * @returns Object with fontSize_01 and fontSize_02 strings
14
14
  */
15
+ export { getSubstyleConfigForStyle } from './styleRouter';
16
+ export { getStyleShadowDefaults, getCopyDefaults } from './styleDefaults';
17
+ export type { StyleShadowDefaults, CopyDefaults } from './styleDefaults';
15
18
  export declare const calculateStyleFontSizes: (copy1: string | null | undefined, copy2: string | null | undefined, config: StyleFontConfig) => FontSizeResult;
16
- //# sourceMappingURL=utils.d.ts.map
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEhE;;;;;;;;GAQG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC1E,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEzE,eAAO,MAAM,uBAAuB,GAClC,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,QAAQ,eAAe,KACtB,cAmBF,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * Extracted from Next.js app implementation
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.calculateStyleFontSizes = void 0;
7
+ exports.calculateStyleFontSizes = exports.getCopyDefaults = exports.getStyleShadowDefaults = exports.getSubstyleConfigForStyle = void 0;
8
8
  /**
9
9
  * Calculates dynamic font sizes for both copy1 and copy2 based on content length
10
10
  * and style-specific constraints.
@@ -14,6 +14,12 @@ exports.calculateStyleFontSizes = void 0;
14
14
  * @param config - Style-specific font configuration
15
15
  * @returns Object with fontSize_01 and fontSize_02 strings
16
16
  */
17
+ // Re-export new utilities
18
+ var styleRouter_1 = require("./styleRouter");
19
+ Object.defineProperty(exports, "getSubstyleConfigForStyle", { enumerable: true, get: function () { return styleRouter_1.getSubstyleConfigForStyle; } });
20
+ var styleDefaults_1 = require("./styleDefaults");
21
+ Object.defineProperty(exports, "getStyleShadowDefaults", { enumerable: true, get: function () { return styleDefaults_1.getStyleShadowDefaults; } });
22
+ Object.defineProperty(exports, "getCopyDefaults", { enumerable: true, get: function () { return styleDefaults_1.getCopyDefaults; } });
17
23
  const calculateStyleFontSizes = (copy1, copy2, config) => {
18
24
  var _a, _b;
19
25
  const { baseSizeRem1, baseSizeRem2, maxLengthThreshold, reductionFactor } = config;
@@ -0,0 +1,35 @@
1
+ export interface StyleShadowDefaults {
2
+ textShadowEnabled: boolean;
3
+ textShadowSize: number;
4
+ textShadowIntensity: number;
5
+ logoShadowEnabled: boolean;
6
+ logoShadowSize: number;
7
+ logoShadowIntensity: number;
8
+ noiseEnabled: boolean;
9
+ noiseIntensity: number;
10
+ }
11
+ /**
12
+ * Get shadow/noise defaults for a style.
13
+ * Extracts values from STYLE_CONFIGS with sensible fallbacks.
14
+ */
15
+ export declare function getStyleShadowDefaults(bannerStyle: number): StyleShadowDefaults;
16
+ export interface CopyDefaults {
17
+ styleSlot: number;
18
+ text: string;
19
+ fontSize: number;
20
+ fontWeight: string;
21
+ align: string;
22
+ rotation: number;
23
+ color?: string;
24
+ bgColor?: string;
25
+ hasBg?: boolean;
26
+ paddingX?: string;
27
+ paddingY?: string;
28
+ borderRadius?: string;
29
+ }
30
+ /**
31
+ * Get default copy configuration for a style slot.
32
+ * Returns the substyle-defined defaults for position, font, and visual properties.
33
+ */
34
+ export declare function getCopyDefaults(bannerStyle: number, bannerSubstyle: number, styleSlot: number): CopyDefaults;
35
+ //# sourceMappingURL=styleDefaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleDefaults.d.ts","sourceRoot":"","sources":["../../src/utils/styleDefaults.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,mBAAmB,CAY/E;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,YAAY,CAmB5G"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getStyleShadowDefaults = getStyleShadowDefaults;
4
+ exports.getCopyDefaults = getCopyDefaults;
5
+ /**
6
+ * Style defaults utilities — shadow configs, copy initialization.
7
+ * Used by both zuljaman and Lambda.
8
+ */
9
+ const styleConfig_1 = require("../styleConfig");
10
+ const styleRouter_1 = require("./styleRouter");
11
+ const bannerDefaults_1 = require("../constants/bannerDefaults");
12
+ /**
13
+ * Get shadow/noise defaults for a style.
14
+ * Extracts values from STYLE_CONFIGS with sensible fallbacks.
15
+ */
16
+ function getStyleShadowDefaults(bannerStyle) {
17
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
18
+ const styleConfig = (0, styleConfig_1.getStyleConfig)(bannerStyle);
19
+ return {
20
+ textShadowEnabled: (_c = (_b = (_a = styleConfig.shadows) === null || _a === void 0 ? void 0 : _a.textShadow) === null || _b === void 0 ? void 0 : _b.enabled) !== null && _c !== void 0 ? _c : true,
21
+ textShadowSize: (_f = (_e = (_d = styleConfig.shadows) === null || _d === void 0 ? void 0 : _d.textShadow) === null || _e === void 0 ? void 0 : _e.size) !== null && _f !== void 0 ? _f : 70,
22
+ textShadowIntensity: (_j = (_h = (_g = styleConfig.shadows) === null || _g === void 0 ? void 0 : _g.textShadow) === null || _h === void 0 ? void 0 : _h.intensity) !== null && _j !== void 0 ? _j : 0.85,
23
+ logoShadowEnabled: (_m = (_l = (_k = styleConfig.shadows) === null || _k === void 0 ? void 0 : _k.logoShadow) === null || _l === void 0 ? void 0 : _l.enabled) !== null && _m !== void 0 ? _m : true,
24
+ logoShadowSize: (_q = (_p = (_o = styleConfig.shadows) === null || _o === void 0 ? void 0 : _o.logoShadow) === null || _p === void 0 ? void 0 : _p.size) !== null && _q !== void 0 ? _q : 150,
25
+ logoShadowIntensity: (_t = (_s = (_r = styleConfig.shadows) === null || _r === void 0 ? void 0 : _r.logoShadow) === null || _s === void 0 ? void 0 : _s.intensity) !== null && _t !== void 0 ? _t : 0.375,
26
+ noiseEnabled: (_u = styleConfig.noiseEnabled) !== null && _u !== void 0 ? _u : false,
27
+ noiseIntensity: 2.0,
28
+ };
29
+ }
30
+ /**
31
+ * Get default copy configuration for a style slot.
32
+ * Returns the substyle-defined defaults for position, font, and visual properties.
33
+ */
34
+ function getCopyDefaults(bannerStyle, bannerSubstyle, styleSlot) {
35
+ var _a, _b, _c, _d, _e;
36
+ const styleConfig = (0, styleConfig_1.getStyleConfig)(bannerStyle);
37
+ const substyleConfig = (0, styleRouter_1.getSubstyleConfigForStyle)(bannerStyle, bannerSubstyle);
38
+ const copyConfig = (_a = substyleConfig === null || substyleConfig === void 0 ? void 0 : substyleConfig.copies) === null || _a === void 0 ? void 0 : _a[styleSlot];
39
+ return {
40
+ styleSlot,
41
+ text: bannerDefaults_1.DEFAULT_COPY_TEXTS[styleSlot] || bannerDefaults_1.DEFAULT_COPY_TEXTS[0],
42
+ fontSize: (_c = (_b = substyleConfig === null || substyleConfig === void 0 ? void 0 : substyleConfig.fontSizes) === null || _b === void 0 ? void 0 : _b[styleSlot]) !== null && _c !== void 0 ? _c : 1.0,
43
+ fontWeight: ((_d = styleConfig.copyFontWeights) === null || _d === void 0 ? void 0 : _d[styleSlot]) || 'normal',
44
+ align: (copyConfig === null || copyConfig === void 0 ? void 0 : copyConfig.alignment) || 'center',
45
+ rotation: (_e = copyConfig === null || copyConfig === void 0 ? void 0 : copyConfig.rotation) !== null && _e !== void 0 ? _e : 0,
46
+ color: copyConfig === null || copyConfig === void 0 ? void 0 : copyConfig.color,
47
+ bgColor: copyConfig === null || copyConfig === void 0 ? void 0 : copyConfig.bgColor,
48
+ hasBg: copyConfig === null || copyConfig === void 0 ? void 0 : copyConfig.hasBg,
49
+ paddingX: copyConfig === null || copyConfig === void 0 ? void 0 : copyConfig.paddingX,
50
+ paddingY: copyConfig === null || copyConfig === void 0 ? void 0 : copyConfig.paddingY,
51
+ borderRadius: copyConfig === null || copyConfig === void 0 ? void 0 : copyConfig.borderRadius,
52
+ };
53
+ }
@@ -0,0 +1,7 @@
1
+ import type { SubstyleConfig } from '../components/styles/types/substyleTypes';
2
+ /**
3
+ * Get substyle config for any style+substyle combination.
4
+ * Eliminates the switch-statement pattern that was duplicated in every consumer.
5
+ */
6
+ export declare function getSubstyleConfigForStyle(bannerStyle: number, bannerSubstyle: number): SubstyleConfig;
7
+ //# sourceMappingURL=styleRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleRouter.d.ts","sourceRoot":"","sources":["../../src/utils/styleRouter.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE/E;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,cAAc,CAarG"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSubstyleConfigForStyle = getSubstyleConfigForStyle;
4
+ /**
5
+ * Unified substyle config router — single function that replaces the switch-statement
6
+ * pattern duplicated across zuljaman and Lambda.
7
+ */
8
+ const substyleConfig_1 = require("../components/styles/Style1/substyleConfig");
9
+ const substyleConfig_2 = require("../components/styles/Style2/substyleConfig");
10
+ const substyleConfig_3 = require("../components/styles/Style3/substyleConfig");
11
+ const substyleConfig_4 = require("../components/styles/Style4/substyleConfig");
12
+ const substyleConfig_5 = require("../components/styles/Style5/substyleConfig");
13
+ const substyleConfig_6 = require("../components/styles/Style6/substyleConfig");
14
+ const substyleConfig_7 = require("../components/styles/Style7/substyleConfig");
15
+ const substyleConfig_8 = require("../components/styles/Style8/substyleConfig");
16
+ const substyleConfig_9 = require("../components/styles/Style9/substyleConfig");
17
+ /**
18
+ * Get substyle config for any style+substyle combination.
19
+ * Eliminates the switch-statement pattern that was duplicated in every consumer.
20
+ */
21
+ function getSubstyleConfigForStyle(bannerStyle, bannerSubstyle) {
22
+ switch (bannerStyle) {
23
+ case 2: return (0, substyleConfig_2.getSubstyleConfig)(bannerSubstyle);
24
+ case 3: return (0, substyleConfig_3.getSubstyleConfig)(bannerSubstyle);
25
+ case 4: return (0, substyleConfig_4.getSubstyleConfig)(bannerSubstyle);
26
+ case 5: return (0, substyleConfig_5.getSubstyleConfig)(bannerSubstyle);
27
+ case 6: return (0, substyleConfig_6.getSubstyleConfig)(bannerSubstyle);
28
+ case 7: return (0, substyleConfig_7.getSubstyleConfig)(bannerSubstyle);
29
+ case 8: return (0, substyleConfig_8.getSubstyleConfig)(bannerSubstyle);
30
+ case 9: return (0, substyleConfig_9.getSubstyleConfig)(bannerSubstyle);
31
+ case 1:
32
+ default: return (0, substyleConfig_1.getSubstyleConfig)(bannerSubstyle);
33
+ }
34
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zuljaman-banner-components",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
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",
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE/D;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,QAAQ,eAAe,KACtB,cAmBF,CAAC"}