@chrryai/chrry 1.1.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/About.module.scss +112 -0
- package/Account.module.scss +159 -0
- package/AddToHomeScreen.module.scss +126 -0
- package/Affiliate.module.scss +245 -0
- package/AffiliateDashboard.module.scss +269 -0
- package/Agent.module.scss +197 -0
- package/AnimatedWrapper.module.scss +0 -0
- package/App.module.scss +283 -0
- package/Bookmark.module.scss +15 -0
- package/Calendar.module.scss +824 -0
- package/CharacterProfiles.module.scss +29 -0
- package/Chat.module.scss +932 -0
- package/Checkbox.module.scss +67 -0
- package/Chrry.module.scss +69 -0
- package/Collaborate.module.scss +22 -0
- package/CollaborationStatus.module.scss +17 -0
- package/CollaborationTooltip.module.scss +257 -0
- package/ColorScheme.module.scss +24 -0
- package/EditThread.module.scss +51 -0
- package/EmptyStateTips.module.scss +52 -0
- package/EnableNotifications.module.scss +20 -0
- package/EventModal.module.scss +277 -0
- package/Img.module.scss +48 -0
- package/Instructions.module.scss +333 -0
- package/LICENSE +664 -0
- package/LanguageSwitcher.module.scss +21 -0
- package/Loading.module.scss +32 -0
- package/MarkdownContent.module.scss +161 -0
- package/MemoryConsent.module.scss +41 -0
- package/Menu.module.scss +272 -0
- package/Message.module.scss +470 -0
- package/Messages.module.scss +86 -0
- package/Modal.module.scss +118 -0
- package/README.md +112 -0
- package/Search.module.scss +26 -0
- package/Select.module.scss +32 -0
- package/Share.module.scss +84 -0
- package/Sidebar.module.scss +69 -0
- package/SignIn.module.scss +129 -0
- package/Skeleton.module.scss +232 -0
- package/SplashScreen.module.scss +189 -0
- package/Star.module.scss +15 -0
- package/Store.module.scss +240 -0
- package/Subscribe.module.scss +219 -0
- package/Testimonials.module.scss +33 -0
- package/Thread.module.scss +111 -0
- package/Threads.module.scss +105 -0
- package/TypingIndicator.module.scss +93 -0
- package/Users.module.scss +98 -0
- package/Version.module.scss +22 -0
- package/Weather.module.scss +31 -0
- package/Why.module.scss +79 -0
- package/__tests__/README.md +126 -0
- package/__tests__/TestComponent.module.scss +236 -0
- package/animations.scss +163 -0
- package/breakpoints.scss +8 -0
- package/context/AppContext.module.scss +22 -0
- package/context/providers/README.md +329 -0
- package/dist/About.module-RPTFOKG6.scss +112 -0
- package/dist/Account.module-AA2NOD5S.scss +159 -0
- package/dist/AddToHomeScreen.module-P6HAQ4QD.scss +126 -0
- package/dist/Affiliate.module-YM7MG54E.scss +245 -0
- package/dist/AffiliateDashboard.module-SZQJJBME.scss +269 -0
- package/dist/Agent.module-66YIBDMM.scss +197 -0
- package/dist/App.module-TOWYJFPB.scss +283 -0
- package/dist/Bookmark.module-UVMQ4TED.scss +15 -0
- package/dist/Calendar.module-HHEIXJEA.scss +824 -0
- package/dist/CharacterProfiles.module-KABR34TV.scss +29 -0
- package/dist/Chat.module-Y4TGJLBQ.scss +932 -0
- package/dist/Checkbox.module-RNW2YOC5.scss +67 -0
- package/dist/Chrry.module-SLPTRY52.scss +69 -0
- package/dist/Collaborate.module-MLRE23FZ.scss +22 -0
- package/dist/CollaborationStatus.module-CRGOOW56.scss +17 -0
- package/dist/ColorScheme.module-N7SJ5N52.scss +24 -0
- package/dist/EditThread.module-L3HOEGS3.scss +51 -0
- package/dist/EmptyStateTips.module-JLNPQ4OO.scss +52 -0
- package/dist/EnableNotifications.module-C4MYQTUA.scss +20 -0
- package/dist/EventModal.module-K7VNKTCE.scss +277 -0
- package/dist/Instructions.module-JMFWEXAP.scss +333 -0
- package/dist/LanguageSwitcher.module-MT2SIZ4L.scss +21 -0
- package/dist/Loading.module-OU42QILE.scss +32 -0
- package/dist/MarkdownContent.module-64GHE3YP.scss +161 -0
- package/dist/MemoryConsent.module-FZL3REH4.scss +41 -0
- package/dist/Menu.module-RVXPXILR.scss +272 -0
- package/dist/Message.module-5UUYCVY2.scss +470 -0
- package/dist/Messages.module-GBPUAPAI.scss +86 -0
- package/dist/Modal.module-TOU4YLFQ.scss +118 -0
- package/dist/Search.module-GU3BRADG.scss +26 -0
- package/dist/Select.module-R7QM256C.scss +32 -0
- package/dist/Share.module-VQBCBSA5.scss +84 -0
- package/dist/Sidebar.module-AUSDVTCY.scss +69 -0
- package/dist/SignIn.module-53SOSG63.scss +129 -0
- package/dist/Skeleton.module-REMEBLDY.scss +232 -0
- package/dist/Store.module-NP6776GY.scss +240 -0
- package/dist/Subscribe.module-NVGQ57RA.scss +219 -0
- package/dist/Thread.module-QAJI6KOQ.scss +111 -0
- package/dist/Threads.module-J54DFQQZ.scss +105 -0
- package/dist/Users.module-ZRHCY63D.scss +98 -0
- package/dist/Version.module-MLMD7GW5.scss +22 -0
- package/dist/Weather.module-NT6XFKA7.scss +31 -0
- package/dist/Why.module-UVZJCJF7.scss +79 -0
- package/dist/index.d.mts +1408 -0
- package/dist/index.d.ts +1408 -0
- package/dist/index.js +44600 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +44575 -0
- package/dist/index.mjs.map +1 -0
- package/dist/react-tooltip.min-LLVNRY3Z.css +1 -0
- package/globals.css +91 -0
- package/globals.scss +585 -0
- package/icons/README.md +150 -0
- package/package.json +118 -0
- package/styles/view-transitions.css +207 -0
- package/toRem.scss +6 -0
- package/utils.module.scss +116 -0
- package/utils.scss +88 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
@use "./breakpoints.scss";
|
|
2
|
+
@use "./toRem.scss";
|
|
3
|
+
|
|
4
|
+
.thread {
|
|
5
|
+
max-width: breakpoints.$breakpoint-mobile;
|
|
6
|
+
margin: toRem.toRem(5) auto 0 auto;
|
|
7
|
+
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: toRem.toRem(10);
|
|
11
|
+
font-size: toRem.toRem(15);
|
|
12
|
+
padding-bottom: toRem.toRem(195);
|
|
13
|
+
width: 100%;
|
|
14
|
+
|
|
15
|
+
&.empty {
|
|
16
|
+
margin-top: auto;
|
|
17
|
+
padding-bottom: toRem.toRem(160);
|
|
18
|
+
|
|
19
|
+
@media (min-height: toRem.toRem(600)) {
|
|
20
|
+
padding-bottom: toRem.toRem(170);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@media (min-height: toRem.toRem(700)) {
|
|
24
|
+
padding-bottom: toRem.toRem(180);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// @media (max-height: breakpoints.$breakpoint-mobile) {
|
|
28
|
+
// padding-bottom: 0;
|
|
29
|
+
// }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media (min-width: breakpoints.$breakpoint-tablet) {
|
|
33
|
+
max-width: breakpoints.$breakpoint-tablet;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@media (min-width: breakpoints.$breakpoint-desktop) {
|
|
37
|
+
max-width: breakpoints.$breakpoint-desktop;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.hourlyLimit {
|
|
42
|
+
font-size: toRem.toRem(12);
|
|
43
|
+
color: var(--shade-6);
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: toRem.toRem(5);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.likeButton {
|
|
50
|
+
font-size: toRem.toRem(12);
|
|
51
|
+
& {
|
|
52
|
+
color: var(--shade-6);
|
|
53
|
+
}
|
|
54
|
+
&:hover {
|
|
55
|
+
color: var(--accent-1);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.headers {
|
|
60
|
+
display: flex;
|
|
61
|
+
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
gap: toRem.toRem(10);
|
|
64
|
+
|
|
65
|
+
&:empty {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.header {
|
|
71
|
+
display: flex;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
align-items: center;
|
|
74
|
+
gap: toRem.toRem(10);
|
|
75
|
+
flex-wrap: wrap;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.chatTop {
|
|
79
|
+
display: flex;
|
|
80
|
+
gap: toRem.toRem(10);
|
|
81
|
+
justify-content: center;
|
|
82
|
+
align-items: center;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.loadingContainer,
|
|
86
|
+
.errorContainer {
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
margin-top: toRem.toRem(30);
|
|
90
|
+
width: 100%;
|
|
91
|
+
height: 100%;
|
|
92
|
+
flex: 1;
|
|
93
|
+
align-items: center;
|
|
94
|
+
display: flex;
|
|
95
|
+
gap: toRem.toRem(5);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.messages {
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.chatContainer {
|
|
102
|
+
&.empty {
|
|
103
|
+
.chat {
|
|
104
|
+
// @media (min-height: breakpoints.$breakpoint-mobile) {
|
|
105
|
+
// padding: 0;
|
|
106
|
+
// position: static;
|
|
107
|
+
// transform: none;
|
|
108
|
+
// }
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
@use "./breakpoints.scss";
|
|
2
|
+
@use "./toRem.scss";
|
|
3
|
+
|
|
4
|
+
.threads {
|
|
5
|
+
width: 100%;
|
|
6
|
+
max-width: breakpoints.$breakpoint-mobile;
|
|
7
|
+
margin: toRem.toRem(20) auto;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex: 1;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: toRem.toRem(10);
|
|
13
|
+
font-size: toRem.toRem(15);
|
|
14
|
+
margin-top: toRem.toRem(20);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.threadsContainer {
|
|
18
|
+
opacity: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.threadsItem {
|
|
22
|
+
opacity: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.characterProfiles {
|
|
26
|
+
display: flex;
|
|
27
|
+
gap: toRem.toRem(5);
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
font-size: toRem.toRem(12);
|
|
30
|
+
align-items: flex-start;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.threadItemTitle {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: toRem.toRem(5);
|
|
37
|
+
margin-bottom: toRem.toRem(5);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.right {
|
|
41
|
+
display: flex;
|
|
42
|
+
gap: toRem.toRem(7.5) toRem.toRem(10);
|
|
43
|
+
margin-left: auto;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.loadingContainer {
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
align-items: center;
|
|
50
|
+
flex: 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.threadItemDate {
|
|
54
|
+
font-size: toRem.toRem(11);
|
|
55
|
+
color: var(--shade-6);
|
|
56
|
+
margin-left: auto;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.searchInput {
|
|
60
|
+
border: toRem.toRem(1) dashed var(--accent-5) !important;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.searchContainer {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
gap: toRem.toRem(5);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.threadsContainer {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
gap: toRem.toRem(20);
|
|
73
|
+
margin-top: toRem.toRem(5);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.threadAiResponse {
|
|
77
|
+
margin: 0 0;
|
|
78
|
+
font-size: toRem.toRem(13);
|
|
79
|
+
color: var(--shade-7);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.threadsTitle {
|
|
83
|
+
font-size: toRem.toRem(22);
|
|
84
|
+
margin: 0;
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: toRem.toRem(5);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.loadMoreButton {
|
|
91
|
+
font-size: toRem.toRem(12.5);
|
|
92
|
+
padding: toRem.toRem(5) toRem.toRem(10);
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
gap: toRem.toRem(5);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.loadMoreButtonContainer {
|
|
99
|
+
display: flex;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.profileImage {
|
|
104
|
+
border-radius: 50%;
|
|
105
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
@use "./toRem.scss";
|
|
2
|
+
|
|
3
|
+
.typingIndicator {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: toRem.toRem(8);
|
|
7
|
+
padding: toRem.toRem(8) toRem.toRem(12);
|
|
8
|
+
margin: toRem.toRem(8) 0;
|
|
9
|
+
background: var(--shade-1);
|
|
10
|
+
border-radius: 12px;
|
|
11
|
+
font-size: toRem.toRem(13);
|
|
12
|
+
color: var(--shade-5);
|
|
13
|
+
border: toRem.toRem(1) solid var(--shade-2);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.avatars {
|
|
17
|
+
display: flex;
|
|
18
|
+
gap: toRem.toRem(4);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.avatar {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
width: toRem.toRem(20);
|
|
26
|
+
height: toRem.toRem(20);
|
|
27
|
+
border-radius: 50%;
|
|
28
|
+
background: var(--shade-2);
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.userImage {
|
|
33
|
+
border-radius: 50%;
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
object-fit: cover;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.typingText {
|
|
40
|
+
flex: 1;
|
|
41
|
+
font-weight: 500;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.dots {
|
|
45
|
+
display: flex;
|
|
46
|
+
gap: toRem.toRem(2);
|
|
47
|
+
align-items: center;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.dots span {
|
|
51
|
+
width: toRem.toRem(4);
|
|
52
|
+
height: toRem.toRem(4);
|
|
53
|
+
background: var(--shade-4);
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
animation: typing 1.4s infinite ease-in-out;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.dots span:nth-child(1) {
|
|
59
|
+
animation-delay: 0s;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.dots span:nth-child(2) {
|
|
63
|
+
animation-delay: 0.2s;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.dots span:nth-child(3) {
|
|
67
|
+
animation-delay: 0.4s;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@keyframes typing {
|
|
71
|
+
0%,
|
|
72
|
+
60%,
|
|
73
|
+
100% {
|
|
74
|
+
transform: scale(1);
|
|
75
|
+
opacity: 0.5;
|
|
76
|
+
}
|
|
77
|
+
30% {
|
|
78
|
+
transform: scale(1.2);
|
|
79
|
+
opacity: 1;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Dark mode adjustments */
|
|
84
|
+
@media (prefers-color-scheme: dark) {
|
|
85
|
+
.typingIndicator {
|
|
86
|
+
background: var(--shade-0);
|
|
87
|
+
border-color: var(--shade-1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.avatar {
|
|
91
|
+
background: var(--shade-1);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
@use "./toRem.scss";
|
|
2
|
+
@use "./utils.scss";
|
|
3
|
+
@use "./breakpoints.scss";
|
|
4
|
+
|
|
5
|
+
.users {
|
|
6
|
+
width: 100%;
|
|
7
|
+
max-width: breakpoints.$breakpoint-mobile;
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex: 1;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: toRem.toRem(10);
|
|
14
|
+
font-size: toRem.toRem(15);
|
|
15
|
+
}
|
|
16
|
+
.searchInput {
|
|
17
|
+
border: toRem.toRem(1) dashed var(--accent-5) !important;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.loadingContainer {
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
flex: 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.usersTitle {
|
|
28
|
+
margin-top: 0;
|
|
29
|
+
margin-bottom: toRem.toRem(10);
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: toRem.toRem(5);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.usersContainer {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.usersItem {
|
|
41
|
+
display: flex;
|
|
42
|
+
gap: toRem.toRem(10);
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
border-bottom: toRem.toRem(1) dashed var(--shade-2);
|
|
45
|
+
padding: toRem.toRem(15) 0;
|
|
46
|
+
|
|
47
|
+
&:last-child {
|
|
48
|
+
border-bottom: none;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.profileImage {
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.usersItemUserImage {
|
|
57
|
+
display: flex;
|
|
58
|
+
gap: toRem.toRem(5);
|
|
59
|
+
align-items: center;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.usersItemUser {
|
|
63
|
+
display: flex;
|
|
64
|
+
gap: toRem.toRem(15);
|
|
65
|
+
align-items: center;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.usersItemCharacterProfiles {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
gap: toRem.toRem(10);
|
|
72
|
+
align-items: flex-start;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.usersItemCharacterProfile {
|
|
76
|
+
display: flex;
|
|
77
|
+
gap: toRem.toRem(5);
|
|
78
|
+
align-items: center;
|
|
79
|
+
animation: slideUp 0.1s ease forwards;
|
|
80
|
+
@include utils.respect-reduced-motion;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.tags {
|
|
84
|
+
font-size: toRem.toRem(12);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.loadMoreButton {
|
|
88
|
+
font-size: toRem.toRem(12.5);
|
|
89
|
+
padding: toRem.toRem(5) toRem.toRem(10);
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: toRem.toRem(5);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.loadMoreButtonContainer {
|
|
96
|
+
display: flex;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@use "./toRem.scss";
|
|
2
|
+
|
|
3
|
+
.video {
|
|
4
|
+
width: toRem.toRem(30);
|
|
5
|
+
height: toRem.toRem(30);
|
|
6
|
+
object-fit: cover;
|
|
7
|
+
border-radius: 50%;
|
|
8
|
+
pointer-events: none; // So clicks pass through to foreground content
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.updateModalButtons {
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: flex-end;
|
|
14
|
+
margin-top: toRem.toRem(10);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.updateModalDescription {
|
|
18
|
+
font-size: toRem.toRem(14);
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: toRem.toRem(5);
|
|
22
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@use "./toRem.scss";
|
|
2
|
+
@use "./utils.scss";
|
|
3
|
+
|
|
4
|
+
.weather {
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
font-size: toRem.toRem(13);
|
|
8
|
+
gap: toRem.toRem(5);
|
|
9
|
+
animation: slideUp 0.4s ease forwards;
|
|
10
|
+
@include utils.respect-reduced-motion;
|
|
11
|
+
padding: toRem.toRem(8) toRem.toRem(3);
|
|
12
|
+
color: var(--shade-8);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.location {
|
|
16
|
+
padding: 0;
|
|
17
|
+
margin: 0;
|
|
18
|
+
color: var(--accent-6);
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
font-size: toRem.toRem(14);
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
color: var(--accent-5);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.info {
|
|
28
|
+
display: flex;
|
|
29
|
+
gap: toRem.toRem(5);
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
package/Why.module.scss
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@use "./breakpoints.scss";
|
|
2
|
+
@use "./toRem.scss";
|
|
3
|
+
@use "./utils.scss";
|
|
4
|
+
|
|
5
|
+
.desktopOnly {
|
|
6
|
+
display: none;
|
|
7
|
+
|
|
8
|
+
@media (min-width: breakpoints.$breakpoint-mobile) {
|
|
9
|
+
display: flex;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.why {
|
|
14
|
+
section {
|
|
15
|
+
font-size: toRem.toRem(15);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.mobileOnly {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
@media (min-width: breakpoints.$breakpoint-mobile) {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.features {
|
|
28
|
+
display: grid;
|
|
29
|
+
grid-template-columns: repeat(auto-fit, minmax(toRem.toRem(250), 1fr));
|
|
30
|
+
gap: toRem.toRem(20);
|
|
31
|
+
margin-top: toRem.toRem(20);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.feature {
|
|
35
|
+
padding: toRem.toRem(20);
|
|
36
|
+
background: var(--shade-1);
|
|
37
|
+
border-radius: 8px;
|
|
38
|
+
border: toRem.toRem(1) solid var(--shade-2);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.comparison {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: toRem.toRem(12);
|
|
45
|
+
margin-top: toRem.toRem(20);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.comparisonItem {
|
|
49
|
+
padding: toRem.toRem(16);
|
|
50
|
+
background: var(--shade-1);
|
|
51
|
+
border-radius: 6px;
|
|
52
|
+
border-left: toRem.toRem(4) solid var(--accent-1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@media (max-width: breakpoints.$breakpoint-mobile) {
|
|
56
|
+
.mobileOnly {
|
|
57
|
+
h3,
|
|
58
|
+
h4 {
|
|
59
|
+
font-size: 1.1em;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
div[style*="display: flex"] {
|
|
63
|
+
span:first-child {
|
|
64
|
+
flex: 1;
|
|
65
|
+
margin-right: toRem.toRem(8);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
span:last-child {
|
|
69
|
+
flex-shrink: 0;
|
|
70
|
+
font-weight: bold;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.features {
|
|
76
|
+
grid-template-columns: repeat(auto-fit, minmax(toRem.toRem(250), 1fr));
|
|
77
|
+
gap: toRem.toRem(20);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# SCSS to TypeScript Converter Tests
|
|
2
|
+
|
|
3
|
+
This directory contains comprehensive tests for the SCSS to TypeScript converter.
|
|
4
|
+
|
|
5
|
+
## Test File
|
|
6
|
+
|
|
7
|
+
**`TestComponent.module.scss`** - A comprehensive SCSS file that tests all features:
|
|
8
|
+
|
|
9
|
+
### Features Tested:
|
|
10
|
+
|
|
11
|
+
1. ✅ **Basic Styles** - All CSS properties
|
|
12
|
+
2. ✅ **Interactive States** - `:hover`, `:active`, `:focus`, `:disabled`
|
|
13
|
+
3. ✅ **CSS Variables** - `var(--accent-6)`, `var(--background)`, etc.
|
|
14
|
+
4. ✅ **toRem.toRem()** - SCSS function conversion
|
|
15
|
+
5. ✅ **Responsive Fonts** - `4vw` viewport units
|
|
16
|
+
6. ✅ **Flexbox** - All flex properties
|
|
17
|
+
7. ✅ **Colors** - Hex, RGB, CSS vars
|
|
18
|
+
8. ✅ **Positioning** - Absolute, relative
|
|
19
|
+
9. ✅ **Typography** - Font sizes, weights, line-height
|
|
20
|
+
10. ✅ **Borders & Shadows** - Border radius, box-shadow
|
|
21
|
+
|
|
22
|
+
## Running Tests
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Run all tests
|
|
26
|
+
npm test
|
|
27
|
+
|
|
28
|
+
# Run only converter tests
|
|
29
|
+
npm test scss-converter
|
|
30
|
+
|
|
31
|
+
# Watch mode
|
|
32
|
+
npm test -- --watch
|
|
33
|
+
|
|
34
|
+
# Generate test output manually
|
|
35
|
+
node ../../../scripts/scss-to-universal.js TestComponent.module.scss TestComponent.styles.ts
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Expected Output
|
|
39
|
+
|
|
40
|
+
The converter should generate:
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
export const TestComponentStyleDefs = {
|
|
44
|
+
container: {
|
|
45
|
+
display: "flex",
|
|
46
|
+
flexDirection: "column",
|
|
47
|
+
// ... more styles
|
|
48
|
+
},
|
|
49
|
+
button: {
|
|
50
|
+
base: {
|
|
51
|
+
padding: 8,
|
|
52
|
+
backgroundColor: "__CSS_VAR__--accent-6",
|
|
53
|
+
// ... base styles
|
|
54
|
+
},
|
|
55
|
+
hover: {
|
|
56
|
+
backgroundColor: "__CSS_VAR__--accent-5",
|
|
57
|
+
transform: "translateY(-1px)",
|
|
58
|
+
},
|
|
59
|
+
active: {
|
|
60
|
+
transform: "translateY(1px)",
|
|
61
|
+
},
|
|
62
|
+
// ... more states
|
|
63
|
+
},
|
|
64
|
+
// ... more components
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Interactive hook for styles with pseudo-classes
|
|
68
|
+
export const useTestComponentStyles = () => {
|
|
69
|
+
// ... generated hook
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## What Gets Tested
|
|
74
|
+
|
|
75
|
+
### ✅ Conversion Accuracy
|
|
76
|
+
|
|
77
|
+
- Property names (kebab-case → camelCase)
|
|
78
|
+
- Values (numbers, strings, CSS vars)
|
|
79
|
+
- toRem.toRem() → numbers
|
|
80
|
+
- CSS variables → `__CSS_VAR__` markers
|
|
81
|
+
|
|
82
|
+
### ✅ Interactive States
|
|
83
|
+
|
|
84
|
+
- Detection of `:hover`, `:active`, `:focus`, `:disabled`
|
|
85
|
+
- Proper `base` / `hover` / `active` structure
|
|
86
|
+
- Hook generation with `useInteractiveStyles`
|
|
87
|
+
|
|
88
|
+
### ✅ Type Safety
|
|
89
|
+
|
|
90
|
+
- TypeScript types generated
|
|
91
|
+
- Proper imports
|
|
92
|
+
- Hook return types
|
|
93
|
+
|
|
94
|
+
### ✅ Edge Cases
|
|
95
|
+
|
|
96
|
+
- Mixed interactive and non-interactive styles
|
|
97
|
+
- Multiple pseudo-classes on same element
|
|
98
|
+
- Nested selectors (should be handled)
|
|
99
|
+
- Media queries (should be removed)
|
|
100
|
+
|
|
101
|
+
## Adding New Tests
|
|
102
|
+
|
|
103
|
+
1. Add new SCSS patterns to `TestComponent.module.scss`
|
|
104
|
+
2. Add corresponding test cases to `scss-converter.test.js`
|
|
105
|
+
3. Run tests to verify
|
|
106
|
+
4. Update this README
|
|
107
|
+
|
|
108
|
+
## Troubleshooting
|
|
109
|
+
|
|
110
|
+
If tests fail:
|
|
111
|
+
|
|
112
|
+
1. Check the generated `TestComponent.styles.ts` file
|
|
113
|
+
2. Compare with expected output
|
|
114
|
+
3. Check script at `../../../scripts/scss-to-universal.js`
|
|
115
|
+
4. Run converter manually to see errors
|
|
116
|
+
|
|
117
|
+
## CI/CD
|
|
118
|
+
|
|
119
|
+
These tests should run on every commit to ensure the converter doesn't break.
|
|
120
|
+
|
|
121
|
+
Add to your CI pipeline:
|
|
122
|
+
|
|
123
|
+
```yaml
|
|
124
|
+
- name: Test SCSS Converter
|
|
125
|
+
run: npm test scss-converter
|
|
126
|
+
```
|