@katajere/recap 2.1.2 → 2.1.4
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.
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
/* gap: clamp(12px, 1.9dvh, 16px); */
|
|
17
17
|
/* gap: calc(12px + env(safe-area-inset-top)); */
|
|
18
18
|
position: absolute;
|
|
19
|
-
|
|
20
|
-
left:
|
|
21
|
-
top: clamp(40px, 5.69dvh, 48px); */
|
|
19
|
+
width: 100%;
|
|
20
|
+
left: 0;
|
|
21
|
+
/* top: clamp(40px, 5.69dvh, 48px); */
|
|
22
22
|
z-index: 3;
|
|
23
23
|
overflow: visible;
|
|
24
24
|
}
|
|
@@ -53,37 +53,39 @@
|
|
|
53
53
|
align-self: stretch;
|
|
54
54
|
display: flex;
|
|
55
55
|
flex-wrap: wrap;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
padding-left: calc(16px + env(safe-area-inset-left));
|
|
57
|
+
padding-right: calc(16px + env(safe-area-inset-right));
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
width: 100%;
|
|
59
60
|
position: relative;
|
|
60
61
|
z-index: 4;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
|
-
/*
|
|
64
|
-
.slide1-intro__brand--
|
|
65
|
-
font-size: clamp(
|
|
66
|
-
line-height: 1;
|
|
64
|
+
/* Short words (<=8 chars) - larger font */
|
|
65
|
+
.slide1-intro__brand--short {
|
|
66
|
+
font-size: clamp(40px, 14vw, 72px);
|
|
67
|
+
line-height: 1.1;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
|
-
/*
|
|
70
|
-
.slide1-intro__brand--
|
|
71
|
-
font-size: clamp(
|
|
72
|
-
line-height: 1;
|
|
70
|
+
/* Medium words (9-14 chars) - medium font */
|
|
71
|
+
.slide1-intro__brand--medium {
|
|
72
|
+
font-size: clamp(32px, 10vw, 56px);
|
|
73
|
+
line-height: 1.1;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
/*
|
|
76
|
-
.slide1-intro__brand--
|
|
77
|
-
font-size: clamp(
|
|
76
|
+
/* Long words (15+ chars) - smaller font to fit */
|
|
77
|
+
.slide1-intro__brand--long {
|
|
78
|
+
font-size: clamp(24px, 7vw, 44px);
|
|
79
|
+
line-height: 1.1;
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
/* Each word
|
|
82
|
+
/* Each word on its own line, never breaks mid-word */
|
|
81
83
|
.slide1-intro__word {
|
|
82
|
-
display:
|
|
83
|
-
white-space: nowrap;
|
|
84
|
+
display: block;
|
|
85
|
+
/* white-space: nowrap; */
|
|
84
86
|
}
|
|
85
87
|
|
|
86
|
-
/* Top floating frames - positioned
|
|
88
|
+
/* Top floating frames - positioned below business name */
|
|
87
89
|
.slide1-intro__frames-top {
|
|
88
90
|
display: flex;
|
|
89
91
|
flex-direction: row;
|
|
@@ -94,24 +96,21 @@
|
|
|
94
96
|
position: absolute;
|
|
95
97
|
width: 100%;
|
|
96
98
|
left: 0;
|
|
97
|
-
top:
|
|
99
|
+
top: 30vh;
|
|
98
100
|
z-index: 2;
|
|
99
101
|
}
|
|
100
102
|
|
|
101
|
-
/*
|
|
102
|
-
|
|
103
|
-
.slide1-intro--words-1 .slide1-intro__frames-top {
|
|
103
|
+
/* Adjust frame position based on business name length */
|
|
104
|
+
.slide1-intro:has(.slide1-intro__brand--short) .slide1-intro__frames-top {
|
|
104
105
|
top: 26vh;
|
|
105
106
|
}
|
|
106
107
|
|
|
107
|
-
|
|
108
|
-
.slide1-intro--words-2 .slide1-intro__frames-top {
|
|
108
|
+
.slide1-intro:has(.slide1-intro__brand--medium) .slide1-intro__frames-top {
|
|
109
109
|
top: 28vh;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
top: 32vh;
|
|
112
|
+
.slide1-intro:has(.slide1-intro__brand--long) .slide1-intro__frames-top {
|
|
113
|
+
top: 30vh;
|
|
115
114
|
}
|
|
116
115
|
|
|
117
116
|
.slide1-intro__frames-top .frame-rect {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slide1Intro.d.ts","sourceRoot":"","sources":["../../src/slides/Slide1Intro.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjE,OAAO,mBAAmB,CAAC;AAE3B,UAAU,gBAAgB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,iBAAS,WAAW,CAAC,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,oBAAoB,EAAE,WAAW,EAAE,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Slide1Intro.d.ts","sourceRoot":"","sources":["../../src/slides/Slide1Intro.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjE,OAAO,mBAAmB,CAAC;AAE3B,UAAU,gBAAgB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,iBAAS,WAAW,CAAC,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,oBAAoB,EAAE,WAAW,EAAE,EAAE,gBAAgB,2CA8JzI;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -13,7 +13,13 @@ function Slide1Intro({ businessName, businessCategory, introHeadline, introSubti
|
|
|
13
13
|
const copy = recapCopy[businessCategory] ?? recapCopy[BUSINESS_CATEGORIES.THRIVING];
|
|
14
14
|
const headline = introHeadline ?? copy.introHeadline;
|
|
15
15
|
const subtitle = introSubtitle ?? copy.introSubtitle;
|
|
16
|
-
|
|
16
|
+
// Calculate longest word length for font scaling
|
|
17
|
+
const words = businessName.split(' ');
|
|
18
|
+
const longestWordLength = Math.max(...words.map(w => w.length));
|
|
19
|
+
// Determine font size class based on longest word length
|
|
20
|
+
// Short words (<=8 chars): large font, Medium (9-14): medium, Long (15+): small
|
|
21
|
+
const fontSizeClass = longestWordLength <= 8 ? 'short' : longestWordLength <= 14 ? 'medium' : 'long';
|
|
22
|
+
const slideClass = `slide1-intro slide1-intro--${copy.introVariant}`;
|
|
17
23
|
const isNewUser = businessCategory === BUSINESS_CATEGORIES.NEW_USER;
|
|
18
24
|
const handleContinue = () => {
|
|
19
25
|
if (typeof window !== 'undefined') {
|
|
@@ -43,7 +49,7 @@ function Slide1Intro({ businessName, businessCategory, introHeadline, introSubti
|
|
|
43
49
|
backgroundPosition: 'center',
|
|
44
50
|
};
|
|
45
51
|
};
|
|
46
|
-
return (_jsxs("div", { className: slideClass, children: [_jsxs("div", { className: "slide1-intro__brand-container", children: [_jsx("div", { className: "slide1-intro__bg-text", children: "HEY" }), _jsx("div", { className: `slide1-intro__brand slide1-intro__brand
|
|
52
|
+
return (_jsxs("div", { className: slideClass, children: [_jsxs("div", { className: "slide1-intro__brand-container", children: [_jsx("div", { className: "slide1-intro__bg-text", children: "HEY" }), _jsx("div", { className: `slide1-intro__brand slide1-intro__brand--${fontSizeClass}`, children: words.map((word, wordIndex, wordsArray) => {
|
|
47
53
|
// Calculate character offset for stagger delay (include space characters)
|
|
48
54
|
const charOffset = wordsArray
|
|
49
55
|
.slice(0, wordIndex)
|
package/package.json
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
/* gap: clamp(12px, 1.9dvh, 16px); */
|
|
17
17
|
/* gap: calc(12px + env(safe-area-inset-top)); */
|
|
18
18
|
position: absolute;
|
|
19
|
-
|
|
20
|
-
left:
|
|
21
|
-
top: clamp(40px, 5.69dvh, 48px); */
|
|
19
|
+
width: 100%;
|
|
20
|
+
left: 0;
|
|
21
|
+
/* top: clamp(40px, 5.69dvh, 48px); */
|
|
22
22
|
z-index: 3;
|
|
23
23
|
overflow: visible;
|
|
24
24
|
}
|
|
@@ -53,37 +53,39 @@
|
|
|
53
53
|
align-self: stretch;
|
|
54
54
|
display: flex;
|
|
55
55
|
flex-wrap: wrap;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
padding-left: calc(16px + env(safe-area-inset-left));
|
|
57
|
+
padding-right: calc(16px + env(safe-area-inset-right));
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
width: 100%;
|
|
59
60
|
position: relative;
|
|
60
61
|
z-index: 4;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
|
-
/*
|
|
64
|
-
.slide1-intro__brand--
|
|
65
|
-
font-size: clamp(
|
|
66
|
-
line-height: 1;
|
|
64
|
+
/* Short words (<=8 chars) - larger font */
|
|
65
|
+
.slide1-intro__brand--short {
|
|
66
|
+
font-size: clamp(40px, 14vw, 72px);
|
|
67
|
+
line-height: 1.1;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
|
-
/*
|
|
70
|
-
.slide1-intro__brand--
|
|
71
|
-
font-size: clamp(
|
|
72
|
-
line-height: 1;
|
|
70
|
+
/* Medium words (9-14 chars) - medium font */
|
|
71
|
+
.slide1-intro__brand--medium {
|
|
72
|
+
font-size: clamp(32px, 10vw, 56px);
|
|
73
|
+
line-height: 1.1;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
/*
|
|
76
|
-
.slide1-intro__brand--
|
|
77
|
-
font-size: clamp(
|
|
76
|
+
/* Long words (15+ chars) - smaller font to fit */
|
|
77
|
+
.slide1-intro__brand--long {
|
|
78
|
+
font-size: clamp(24px, 7vw, 44px);
|
|
79
|
+
line-height: 1.1;
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
/* Each word
|
|
82
|
+
/* Each word on its own line, never breaks mid-word */
|
|
81
83
|
.slide1-intro__word {
|
|
82
|
-
display:
|
|
83
|
-
white-space: nowrap;
|
|
84
|
+
display: block;
|
|
85
|
+
/* white-space: nowrap; */
|
|
84
86
|
}
|
|
85
87
|
|
|
86
|
-
/* Top floating frames - positioned
|
|
88
|
+
/* Top floating frames - positioned below business name */
|
|
87
89
|
.slide1-intro__frames-top {
|
|
88
90
|
display: flex;
|
|
89
91
|
flex-direction: row;
|
|
@@ -94,24 +96,21 @@
|
|
|
94
96
|
position: absolute;
|
|
95
97
|
width: 100%;
|
|
96
98
|
left: 0;
|
|
97
|
-
top:
|
|
99
|
+
top: 30vh;
|
|
98
100
|
z-index: 2;
|
|
99
101
|
}
|
|
100
102
|
|
|
101
|
-
/*
|
|
102
|
-
|
|
103
|
-
.slide1-intro--words-1 .slide1-intro__frames-top {
|
|
103
|
+
/* Adjust frame position based on business name length */
|
|
104
|
+
.slide1-intro:has(.slide1-intro__brand--short) .slide1-intro__frames-top {
|
|
104
105
|
top: 26vh;
|
|
105
106
|
}
|
|
106
107
|
|
|
107
|
-
|
|
108
|
-
.slide1-intro--words-2 .slide1-intro__frames-top {
|
|
108
|
+
.slide1-intro:has(.slide1-intro__brand--medium) .slide1-intro__frames-top {
|
|
109
109
|
top: 28vh;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
top: 32vh;
|
|
112
|
+
.slide1-intro:has(.slide1-intro__brand--long) .slide1-intro__frames-top {
|
|
113
|
+
top: 30vh;
|
|
115
114
|
}
|
|
116
115
|
|
|
117
116
|
.slide1-intro__frames-top .frame-rect {
|
|
@@ -23,7 +23,15 @@ function Slide1Intro({ businessName, businessCategory, introHeadline, introSubti
|
|
|
23
23
|
const headline = introHeadline ?? copy.introHeadline;
|
|
24
24
|
const subtitle = introSubtitle ?? copy.introSubtitle;
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
// Calculate longest word length for font scaling
|
|
27
|
+
const words = businessName.split(' ');
|
|
28
|
+
const longestWordLength = Math.max(...words.map(w => w.length));
|
|
29
|
+
|
|
30
|
+
// Determine font size class based on longest word length
|
|
31
|
+
// Short words (<=8 chars): large font, Medium (9-14): medium, Long (15+): small
|
|
32
|
+
const fontSizeClass = longestWordLength <= 8 ? 'short' : longestWordLength <= 14 ? 'medium' : 'long';
|
|
33
|
+
|
|
34
|
+
const slideClass = `slide1-intro slide1-intro--${copy.introVariant}`;
|
|
27
35
|
const isNewUser = businessCategory === BUSINESS_CATEGORIES.NEW_USER;
|
|
28
36
|
|
|
29
37
|
const handleContinue = () => {
|
|
@@ -71,8 +79,8 @@ function Slide1Intro({ businessName, businessCategory, introHeadline, introSubti
|
|
|
71
79
|
<div className="slide1-intro__bg-text">HEY</div>
|
|
72
80
|
|
|
73
81
|
{/* Business name (character animation with natural word flow) */}
|
|
74
|
-
<div className={`slide1-intro__brand slide1-intro__brand
|
|
75
|
-
{
|
|
82
|
+
<div className={`slide1-intro__brand slide1-intro__brand--${fontSizeClass}`}>
|
|
83
|
+
{words.map((word, wordIndex, wordsArray) => {
|
|
76
84
|
// Calculate character offset for stagger delay (include space characters)
|
|
77
85
|
const charOffset = wordsArray
|
|
78
86
|
.slice(0, wordIndex)
|