@remotion/promo-pages 5.0.0-canary → 5.0.0-canary.3
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/dist/Homepage.js +1 -1
- package/dist/homepage/Pricing.js +1 -1
- package/package.json +15 -12
- package/.turbo/turbo-make.log +0 -8
- package/bundle.ts +0 -38
- package/eslint.config.mjs +0 -7
- package/index.html +0 -13
- package/public/fire.mp3 +0 -0
- package/public/img/cluster.png +0 -0
- package/public/img/code-sample-new.png +0 -0
- package/public/img/freelancers/alex.jpeg +0 -0
- package/public/img/freelancers/antoine.jpeg +0 -0
- package/public/img/freelancers/ayush.png +0 -0
- package/public/img/freelancers/benjamin.jpeg +0 -0
- package/public/img/freelancers/default.png +0 -0
- package/public/img/freelancers/florent.jpeg +0 -0
- package/public/img/freelancers/karel.jpeg +0 -0
- package/public/img/freelancers/lorenzo.jpeg +0 -0
- package/public/img/freelancers/mickael.jpeg +0 -0
- package/public/img/freelancers/mohit.jpeg +0 -0
- package/public/img/freelancers/pramod.jpg +0 -0
- package/public/img/freelancers/pranav.jpg +0 -0
- package/public/img/freelancers/rahul.png +0 -0
- package/public/img/freelancers/ray.jpeg +0 -0
- package/public/img/freelancers/stephen.png +0 -0
- package/public/img/freelancers/umungo.png +0 -0
- package/public/img/freelancers/yehor.jpeg +0 -0
- package/public/img/gt-planar-black.woff2 +0 -0
- package/public/img/gt-planar-bold.woff2 +0 -0
- package/public/img/gt-planar-medium.woff2 +0 -0
- package/public/img/gt-planar-regular.woff2 +0 -0
- package/public/img/logo-small.png +0 -0
- package/public/img/mp4.png +0 -0
- package/public/img/player-demo.mp4 +0 -0
- package/public/img/player-example-dark.png +0 -0
- package/public/img/player-example.png +0 -0
- package/public/img/writeinreact.png +0 -0
- package/public/partyhorn.mp3 +0 -0
- package/public/sad.mp3 +0 -0
- package/src/cn.ts +0 -6
- package/src/components/Homepage.tsx +0 -88
- package/src/components/homepage/BackgroundAnimation.tsx +0 -108
- package/src/components/homepage/ChooseTemplate.tsx +0 -57
- package/src/components/homepage/CodeExample.tsx +0 -89
- package/src/components/homepage/CommunityStats.tsx +0 -54
- package/src/components/homepage/CommunityStatsItems.tsx +0 -304
- package/src/components/homepage/Counter.tsx +0 -110
- package/src/components/homepage/Demo/Card.tsx +0 -273
- package/src/components/homepage/Demo/Cards.tsx +0 -129
- package/src/components/homepage/Demo/Comp.tsx +0 -157
- package/src/components/homepage/Demo/CurrentCountry.tsx +0 -97
- package/src/components/homepage/Demo/DemoError.tsx +0 -18
- package/src/components/homepage/Demo/DemoErrorIcon.tsx +0 -32
- package/src/components/homepage/Demo/DemoRender.tsx +0 -166
- package/src/components/homepage/Demo/DigitWheel.tsx +0 -179
- package/src/components/homepage/Demo/DisplayedEmoji.tsx +0 -81
- package/src/components/homepage/Demo/DoneCheckmark.tsx +0 -39
- package/src/components/homepage/Demo/DownloadNudge.tsx +0 -62
- package/src/components/homepage/Demo/DragAndDropNudge.tsx +0 -57
- package/src/components/homepage/Demo/EmojiCard.tsx +0 -198
- package/src/components/homepage/Demo/Minus.tsx +0 -21
- package/src/components/homepage/Demo/PlayPauseButton.tsx +0 -66
- package/src/components/homepage/Demo/PlayerControls.tsx +0 -48
- package/src/components/homepage/Demo/PlayerSeekBar.tsx +0 -325
- package/src/components/homepage/Demo/PlayerVolume.tsx +0 -83
- package/src/components/homepage/Demo/Progress.tsx +0 -38
- package/src/components/homepage/Demo/Spinner.tsx +0 -60
- package/src/components/homepage/Demo/Switcher.tsx +0 -54
- package/src/components/homepage/Demo/Temperature.tsx +0 -44
- package/src/components/homepage/Demo/TemperatureNumber.tsx +0 -68
- package/src/components/homepage/Demo/ThemeNudge.tsx +0 -72
- package/src/components/homepage/Demo/TimeDisplay.tsx +0 -43
- package/src/components/homepage/Demo/TrendingRepos.tsx +0 -106
- package/src/components/homepage/Demo/icons.tsx +0 -114
- package/src/components/homepage/Demo/index.tsx +0 -158
- package/src/components/homepage/Demo/math.ts +0 -43
- package/src/components/homepage/Demo/types.ts +0 -6
- package/src/components/homepage/Editor.tsx +0 -67
- package/src/components/homepage/EvaluateRemotion.tsx +0 -92
- package/src/components/homepage/FreePricing.tsx +0 -295
- package/src/components/homepage/GetStartedStrip.tsx +0 -77
- package/src/components/homepage/GitHubButton.tsx +0 -23
- package/src/components/homepage/IconForTemplate.tsx +0 -154
- package/src/components/homepage/IfYouKnowReact.tsx +0 -29
- package/src/components/homepage/InfoTooltip.tsx +0 -25
- package/src/components/homepage/MoreTemplatesButton.tsx +0 -29
- package/src/components/homepage/MuxVideo.tsx +0 -68
- package/src/components/homepage/NewsletterButton.tsx +0 -88
- package/src/components/homepage/Pricing.tsx +0 -49
- package/src/components/homepage/PricingBulletPoint.tsx +0 -50
- package/src/components/homepage/RealMp4Videos.tsx +0 -50
- package/src/components/homepage/Spacer.tsx +0 -5
- package/src/components/homepage/TemplateIcon.tsx +0 -36
- package/src/components/homepage/TextInput.tsx +0 -62
- package/src/components/homepage/TrustedByBanner.tsx +0 -194
- package/src/components/homepage/VideoApps.tsx +0 -231
- package/src/components/homepage/VideoAppsShowcase.tsx +0 -276
- package/src/components/homepage/VideoAppsTitle.tsx +0 -24
- package/src/components/homepage/VideoPlayerWithControls.tsx +0 -188
- package/src/components/homepage/WriteInReact.tsx +0 -34
- package/src/components/homepage/YouAreHere.tsx +0 -30
- package/src/components/homepage/custom.css +0 -57
- package/src/components/homepage/layout/Button.tsx +0 -93
- package/src/components/homepage/layout/colors.ts +0 -17
- package/src/components/homepage/layout/use-color-mode.tsx +0 -44
- package/src/components/homepage/layout/use-el-size.ts +0 -51
- package/src/components/homepage/layout/use-mobile-layout.ts +0 -8
- package/src/components/homepage/video-player.css +0 -24
- package/src/components/icons/blank.tsx +0 -13
- package/src/components/icons/clone.tsx +0 -10
- package/src/components/icons/code-hike.tsx +0 -15
- package/src/components/icons/cubes.tsx +0 -13
- package/src/components/icons/js.tsx +0 -17
- package/src/components/icons/next.tsx +0 -64
- package/src/components/icons/overlay.tsx +0 -24
- package/src/components/icons/remix.tsx +0 -24
- package/src/components/icons/skia.tsx +0 -13
- package/src/components/icons/stargazer.tsx +0 -13
- package/src/components/icons/still.tsx +0 -13
- package/src/components/icons/tailwind.tsx +0 -22
- package/src/components/icons/tiktok.tsx +0 -13
- package/src/components/icons/ts.tsx +0 -18
- package/src/components/icons/tts.tsx +0 -13
- package/src/components/icons/undo.tsx +0 -11
- package/src/components/icons/waveform.tsx +0 -13
- package/src/fonts.css +0 -30
- package/src/index.css +0 -74
- package/src/main.tsx +0 -12
- package/tsconfig.json +0 -15
- package/vite.config.ts +0 -9
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {cn} from '../../cn';
|
|
3
|
-
|
|
4
|
-
// StatItemContent component
|
|
5
|
-
const StatItemContent: React.FC<{
|
|
6
|
-
readonly content: React.ReactNode;
|
|
7
|
-
readonly width: string;
|
|
8
|
-
readonly minWidth?: string;
|
|
9
|
-
readonly maxWidth?: string;
|
|
10
|
-
readonly height?: string;
|
|
11
|
-
readonly fontSize?: string;
|
|
12
|
-
readonly fontWeight?: React.CSSProperties['fontWeight'];
|
|
13
|
-
}> = ({
|
|
14
|
-
content,
|
|
15
|
-
width,
|
|
16
|
-
minWidth,
|
|
17
|
-
maxWidth,
|
|
18
|
-
height = 'auto',
|
|
19
|
-
fontSize,
|
|
20
|
-
fontWeight,
|
|
21
|
-
}) => (
|
|
22
|
-
<div
|
|
23
|
-
style={{
|
|
24
|
-
width,
|
|
25
|
-
minWidth,
|
|
26
|
-
maxWidth,
|
|
27
|
-
height,
|
|
28
|
-
fontSize,
|
|
29
|
-
fontWeight,
|
|
30
|
-
display: 'flex',
|
|
31
|
-
justifyContent: 'center',
|
|
32
|
-
alignItems: 'center',
|
|
33
|
-
textAlign: 'center',
|
|
34
|
-
fontFamily: 'GTPlanar',
|
|
35
|
-
fontFeatureSettings: "'ss03' on",
|
|
36
|
-
}}
|
|
37
|
-
>
|
|
38
|
-
{content}
|
|
39
|
-
</div>
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
const Pill: React.FC<{
|
|
43
|
-
readonly children: React.ReactNode;
|
|
44
|
-
readonly className?: string;
|
|
45
|
-
}> = ({children, className}) => {
|
|
46
|
-
return (
|
|
47
|
-
<div
|
|
48
|
-
className={cn(
|
|
49
|
-
className,
|
|
50
|
-
'card leading-none flex flex-wrap justify-center items-center min-w-[200px] min-h-[80px] max-h-[110px] flex-1 p-0',
|
|
51
|
-
)}
|
|
52
|
-
>
|
|
53
|
-
{children}
|
|
54
|
-
</div>
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export const InstallsPerMonth: React.FC = () => {
|
|
59
|
-
return (
|
|
60
|
-
<Pill className={'w-[30%] flex-col'}>
|
|
61
|
-
<div
|
|
62
|
-
style={{
|
|
63
|
-
display: 'flex',
|
|
64
|
-
alignItems: 'center',
|
|
65
|
-
justifyContent: 'center',
|
|
66
|
-
}}
|
|
67
|
-
>
|
|
68
|
-
<StatItemContent
|
|
69
|
-
content="180k"
|
|
70
|
-
width="100px"
|
|
71
|
-
fontSize="2.5rem"
|
|
72
|
-
fontWeight="bold"
|
|
73
|
-
/>
|
|
74
|
-
<StatItemContent
|
|
75
|
-
content={
|
|
76
|
-
<svg
|
|
77
|
-
width="40"
|
|
78
|
-
height="40"
|
|
79
|
-
viewBox="0 0 25 25"
|
|
80
|
-
fill="none"
|
|
81
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
82
|
-
>
|
|
83
|
-
<path
|
|
84
|
-
d="M12.6367 2.47534C12.5488 2.44116 12.4512 2.44116 12.3584 2.47534L3.10547 5.98608L12.5 9.67749L21.8945 5.98608L12.6367 2.47534ZM2.34375 18.4519C2.34375 18.613 2.44629 18.7595 2.59766 18.8181L11.3281 22.1287V11.738L2.34375 8.20776V18.4519ZM13.6719 22.1287L22.4023 18.8181C22.5537 18.7595 22.6562 18.613 22.6562 18.4519V8.20776L13.6719 11.738V22.1287ZM11.5283 0.287842C12.1533 0.048584 12.8418 0.048584 13.4668 0.287842L23.2324 3.9939C24.2969 4.39429 25 5.40991 25 6.54761V18.4519C25 19.5896 24.2969 20.6052 23.2373 21.0105L13.4717 24.7166C12.8467 24.9558 12.1582 24.9558 11.5332 24.7166L1.76758 21.0105C0.703125 20.6052 0 19.5896 0 18.4519V6.54761C0 5.40991 0.703125 4.39429 1.7627 3.98901L11.5283 0.282959V0.287842Z"
|
|
85
|
-
fill="var(--text-color)"
|
|
86
|
-
/>
|
|
87
|
-
</svg>
|
|
88
|
-
}
|
|
89
|
-
width="50px"
|
|
90
|
-
/>
|
|
91
|
-
</div>
|
|
92
|
-
<StatItemContent
|
|
93
|
-
content="installs per month"
|
|
94
|
-
width="75%"
|
|
95
|
-
fontSize="1.0rem"
|
|
96
|
-
fontWeight="bold"
|
|
97
|
-
/>
|
|
98
|
-
</Pill>
|
|
99
|
-
);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export const PagesOfDocs: React.FC = () => {
|
|
103
|
-
return (
|
|
104
|
-
<Pill className="flex-col">
|
|
105
|
-
<div style={{display: 'flex', alignItems: 'center'}}>
|
|
106
|
-
<StatItemContent
|
|
107
|
-
content={
|
|
108
|
-
<svg
|
|
109
|
-
width="28"
|
|
110
|
-
height="40"
|
|
111
|
-
viewBox="0 0 18 21"
|
|
112
|
-
fill="none"
|
|
113
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
114
|
-
>
|
|
115
|
-
<path
|
|
116
|
-
d="M0 3.60938C0 1.61602 1.58304 0 3.53571 0H17.0357H18V0.984375V15.4219V16.4062H17.0357H16.7143V19.0312H17.0357H18V21H17.0357H3.21429C1.43839 21 0 19.5316 0 17.7188C0 17.608 0.00401786 17.4973 0.0160714 17.3906H0V3.60938ZM3.21429 16.4062C2.50312 16.4062 1.92857 16.9928 1.92857 17.7188C1.92857 18.4447 2.50312 19.0312 3.21429 19.0312H14.7857V16.4062H3.21429ZM1.92857 14.7123C2.32232 14.5359 2.75625 14.4375 3.21429 14.4375H16.0714V1.96875H3.53571C2.64777 1.96875 1.92857 2.70293 1.92857 3.60938V14.7123ZM6.10714 4.59375H13.1786H14.1429V6.5625H13.1786H6.10714H5.14286V4.59375H6.10714ZM6.10714 7.875H13.1786H14.1429V9.84375H13.1786H6.10714H5.14286V7.875H6.10714Z"
|
|
117
|
-
fill="var(--text-color)"
|
|
118
|
-
/>
|
|
119
|
-
</svg>
|
|
120
|
-
}
|
|
121
|
-
width="40px"
|
|
122
|
-
/>
|
|
123
|
-
<StatItemContent
|
|
124
|
-
content="600"
|
|
125
|
-
width="85px"
|
|
126
|
-
maxWidth="100px"
|
|
127
|
-
fontSize="2.5rem"
|
|
128
|
-
fontWeight="bold"
|
|
129
|
-
/>
|
|
130
|
-
</div>
|
|
131
|
-
<StatItemContent
|
|
132
|
-
content="pages of docs"
|
|
133
|
-
width="125px"
|
|
134
|
-
fontSize="1.0rem"
|
|
135
|
-
fontWeight="bold"
|
|
136
|
-
/>
|
|
137
|
-
</Pill>
|
|
138
|
-
);
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
export const TemplatesAndExamples: React.FC = () => (
|
|
142
|
-
<Pill className="w-[30%] flex items-center flex-row">
|
|
143
|
-
<StatItemContent
|
|
144
|
-
content="35"
|
|
145
|
-
width="60px"
|
|
146
|
-
fontSize="2.7rem"
|
|
147
|
-
fontWeight="bold"
|
|
148
|
-
/>
|
|
149
|
-
<StatItemContent
|
|
150
|
-
content="templates & examples"
|
|
151
|
-
width="135px"
|
|
152
|
-
fontSize="1.35rem"
|
|
153
|
-
fontWeight="bold"
|
|
154
|
-
/>
|
|
155
|
-
</Pill>
|
|
156
|
-
);
|
|
157
|
-
|
|
158
|
-
export const GitHubStars: React.FC = () => {
|
|
159
|
-
return (
|
|
160
|
-
<Pill className="w-[30%] flex-col">
|
|
161
|
-
<div style={{display: 'flex', alignItems: 'center'}}>
|
|
162
|
-
<StatItemContent
|
|
163
|
-
content={
|
|
164
|
-
<svg
|
|
165
|
-
width="40"
|
|
166
|
-
height="40"
|
|
167
|
-
viewBox="0 0 26 24"
|
|
168
|
-
fill="none"
|
|
169
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
170
|
-
>
|
|
171
|
-
<path
|
|
172
|
-
d="M12.9951 0C13.4424 0 13.8507 0.24375 14.0451 0.632812L17.3799 7.25625L24.8271 8.31562C25.2646 8.37656 25.6292 8.67188 25.7653 9.07969C25.9014 9.4875 25.7896 9.92812 25.4785 10.2281L20.0778 15.3937L21.3514 22.6875C21.4243 23.1094 21.2444 23.5359 20.8799 23.7891C20.5153 24.0422 20.0389 24.0703 19.65 23.8688L12.9903 20.4375L6.34027 23.8641C5.94652 24.0656 5.47014 24.0375 5.11041 23.7844C4.75069 23.5312 4.56597 23.1047 4.63889 22.6828L5.9125 15.3891L0.511803 10.2281C0.195831 9.92812 0.0888863 9.48281 0.224997 9.07969C0.361108 8.67656 0.725692 8.38125 1.16319 8.31562L8.61041 7.25625L11.9451 0.632812C12.1444 0.24375 12.5479 0 12.9951 0ZM12.9951 3.70312L10.4431 8.775C10.2729 9.10781 9.94722 9.34219 9.56319 9.39844L3.8125 10.2141L7.98819 14.2031C8.25555 14.4609 8.38194 14.8266 8.31875 15.1875L7.33194 20.7984L12.4458 18.1641C12.791 17.9859 13.2042 17.9859 13.5444 18.1641L18.6583 20.7984L17.6764 15.1922C17.6132 14.8313 17.7347 14.4656 18.0069 14.2078L22.1826 10.2188L16.4319 9.39844C16.0528 9.34219 15.7222 9.1125 15.5521 8.775L12.9951 3.70312Z"
|
|
173
|
-
fill="var(--text-color)"
|
|
174
|
-
/>
|
|
175
|
-
</svg>
|
|
176
|
-
}
|
|
177
|
-
width="45px"
|
|
178
|
-
/>
|
|
179
|
-
<StatItemContent
|
|
180
|
-
content="21k"
|
|
181
|
-
width="80px"
|
|
182
|
-
fontSize="2.5rem"
|
|
183
|
-
fontWeight="bold"
|
|
184
|
-
/>
|
|
185
|
-
</div>
|
|
186
|
-
<StatItemContent
|
|
187
|
-
content="GitHub stars"
|
|
188
|
-
width="125px"
|
|
189
|
-
fontSize="1.0rem"
|
|
190
|
-
fontWeight="bold"
|
|
191
|
-
/>
|
|
192
|
-
</Pill>
|
|
193
|
-
);
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
export const DiscordMembers: React.FC = () => {
|
|
197
|
-
return (
|
|
198
|
-
<Pill className={'w-[30%]'}>
|
|
199
|
-
<div
|
|
200
|
-
style={{
|
|
201
|
-
width: '80%',
|
|
202
|
-
display: 'flex',
|
|
203
|
-
alignItems: 'center',
|
|
204
|
-
justifyContent: 'center',
|
|
205
|
-
}}
|
|
206
|
-
>
|
|
207
|
-
<div
|
|
208
|
-
style={{
|
|
209
|
-
display: 'flex',
|
|
210
|
-
flexDirection: 'column',
|
|
211
|
-
alignItems: 'center',
|
|
212
|
-
justifyContent: 'center',
|
|
213
|
-
}}
|
|
214
|
-
>
|
|
215
|
-
<StatItemContent
|
|
216
|
-
content="4000"
|
|
217
|
-
width="142px"
|
|
218
|
-
fontSize="2.5rem"
|
|
219
|
-
fontWeight="bold"
|
|
220
|
-
/>
|
|
221
|
-
<StatItemContent
|
|
222
|
-
content="Discord members"
|
|
223
|
-
width="142px"
|
|
224
|
-
fontSize="1rem"
|
|
225
|
-
fontWeight="bold"
|
|
226
|
-
/>
|
|
227
|
-
</div>
|
|
228
|
-
<div
|
|
229
|
-
style={{
|
|
230
|
-
display: 'flex',
|
|
231
|
-
justifyContent: 'center',
|
|
232
|
-
}}
|
|
233
|
-
>
|
|
234
|
-
<StatItemContent
|
|
235
|
-
content={
|
|
236
|
-
<svg
|
|
237
|
-
width="61"
|
|
238
|
-
height="47"
|
|
239
|
-
viewBox="0 0 46 35"
|
|
240
|
-
fill="none"
|
|
241
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
242
|
-
>
|
|
243
|
-
<path
|
|
244
|
-
d="M38.9978 2.95533C38.9843 2.93009 38.962 2.91064 38.9352 2.90065C35.955 1.53492 32.8101 0.560692 29.5791 0.00230404C29.55 -0.00300893 29.5201 0.00092017 29.4934 0.0135365C29.4667 0.0261528 29.4447 0.0468187 29.4304 0.0726144C29.0019 0.84938 28.6129 1.64724 28.2648 2.46316C24.7802 1.93495 21.2356 1.93495 17.7509 2.46316C17.4015 1.64523 17.0072 0.847165 16.5697 0.0726144C16.5546 0.0475873 16.5324 0.0275657 16.506 0.0150584C16.4795 0.00255114 16.45 -0.00188563 16.421 0.00230404C13.1844 0.558177 10.034 1.53248 7.04927 2.90065C7.0231 2.91173 7.00116 2.93089 6.98669 2.95533C1.02568 11.8535 -0.609293 20.5251 0.188637 29.0951C0.190896 29.1167 0.197628 29.1376 0.208402 29.1564C0.219177 29.1752 0.233759 29.1916 0.25122 29.2045C3.7235 31.7693 7.60667 33.7268 11.7352 34.9934C11.7648 35.0025 11.7966 35.0022 11.8261 34.9924C11.8556 34.9826 11.8812 34.9638 11.8994 34.9387C12.7852 33.7344 13.5702 32.4593 14.2463 31.1263C14.2553 31.108 14.2604 31.088 14.2613 31.0676C14.2622 31.0471 14.2589 31.0268 14.2516 31.0077C14.2442 30.9886 14.233 30.9713 14.2186 30.9567C14.2043 30.9422 14.1871 30.9308 14.1681 30.9232C12.9278 30.4486 11.7271 29.8765 10.5774 29.2123C10.5571 29.1999 10.54 29.1828 10.5277 29.1624C10.5154 29.142 10.5082 29.119 10.5067 29.0953C10.5051 29.0715 10.5093 29.0478 10.5189 29.026C10.5285 29.0042 10.5432 28.985 10.5617 28.9701C10.8042 28.7904 11.0468 28.6029 11.2736 28.4155C11.2936 28.3979 11.3182 28.3864 11.3445 28.3822C11.3708 28.3781 11.3978 28.3815 11.4222 28.392C18.9478 31.8216 27.0992 31.8216 34.5388 28.392C34.5625 28.3804 34.589 28.3757 34.6153 28.3785C34.6416 28.3813 34.6666 28.3914 34.6874 28.4076C34.9143 28.5951 35.1568 28.7904 35.3993 28.9701C35.4178 28.985 35.4325 29.0042 35.4421 29.026C35.4517 29.0478 35.4559 29.0715 35.4543 29.0953C35.4528 29.119 35.4456 29.142 35.4333 29.1624C35.421 29.1828 35.4039 29.1999 35.3836 29.2123C34.2369 29.8799 33.0357 30.4496 31.7929 30.9154C31.7739 30.923 31.7567 30.9344 31.7424 30.9489C31.728 30.9635 31.7168 30.9808 31.7095 30.9999C31.7021 31.019 31.6988 31.0393 31.6997 31.0597C31.7006 31.0801 31.7057 31.1001 31.7147 31.1185C32.4026 32.4449 33.187 33.7191 34.0616 34.9309C34.0798 34.956 34.1054 34.9748 34.1349 34.9846C34.1644 34.9944 34.1962 34.9947 34.2258 34.9856C38.3663 33.7246 42.2606 31.7669 45.7411 29.1967C45.7589 29.1841 45.7737 29.1679 45.7846 29.149C45.7954 29.1301 45.8019 29.109 45.8037 29.0873C46.758 19.1892 44.1922 10.5879 38.9978 2.95533ZM15.3728 23.8765C13.1042 23.8765 11.2423 21.7985 11.2423 19.2517C11.2423 16.7049 13.0729 14.619 15.3728 14.619C17.6962 14.619 19.5424 16.7127 19.5032 19.2439C19.5032 21.7985 17.6727 23.8765 15.3728 23.8765ZM30.6586 23.8765C28.39 23.8765 26.5282 21.7985 26.5282 19.2517C26.5282 16.7049 28.3509 14.619 30.6586 14.619C32.982 14.619 34.8282 16.7127 34.7891 19.2439C34.7891 21.7985 32.9742 23.8765 30.6586 23.8765Z"
|
|
245
|
-
fill="var(--text-color)"
|
|
246
|
-
/>
|
|
247
|
-
</svg>
|
|
248
|
-
}
|
|
249
|
-
width="45px"
|
|
250
|
-
/>
|
|
251
|
-
</div>
|
|
252
|
-
</div>
|
|
253
|
-
</Pill>
|
|
254
|
-
);
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
export const Contributors: React.FC = () => {
|
|
258
|
-
return (
|
|
259
|
-
<Pill className="w-[30%]">
|
|
260
|
-
<div style={{display: 'flex', justifyContent: 'center'}}>
|
|
261
|
-
<div style={{display: 'flex', justifyContent: 'center'}}>
|
|
262
|
-
<StatItemContent
|
|
263
|
-
content={
|
|
264
|
-
<svg
|
|
265
|
-
width="60"
|
|
266
|
-
height="50"
|
|
267
|
-
viewBox="0 0 63 40"
|
|
268
|
-
fill="none"
|
|
269
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
270
|
-
>
|
|
271
|
-
<path
|
|
272
|
-
d="M6.975 5.375C6.975 3.94946 7.54656 2.58231 8.56395 1.5743C9.58133 0.566293 10.9612 0 12.4 0C13.8388 0 15.2187 0.566293 16.2361 1.5743C17.2534 2.58231 17.825 3.94946 17.825 5.375C17.825 6.80054 17.2534 8.16769 16.2361 9.1757C15.2187 10.1837 13.8388 10.75 12.4 10.75C10.9612 10.75 9.58133 10.1837 8.56395 9.1757C7.54656 8.16769 6.975 6.80054 6.975 5.375ZM6.2 20.5114C5.23125 21.5864 4.65 23.0165 4.65 24.5714C4.65 26.1263 5.23125 27.5565 6.2 28.6315V20.5114ZM20.1887 15.7795C17.3116 18.3038 15.5 21.9991 15.5 26.1071C15.5 29.3993 16.6625 32.4228 18.6 34.7935V36.8571C18.6 38.556 17.2147 39.9286 15.5 39.9286H9.3C7.58531 39.9286 6.2 38.556 6.2 36.8571V34.2848C2.53813 32.5571 0 28.8618 0 24.5714C0 18.6301 4.85344 13.8214 10.85 13.8214H13.95C16.275 13.8214 18.4256 14.5413 20.1887 15.7699V15.7795ZM43.4 36.8571V34.7935C45.3375 32.4228 46.5 29.3993 46.5 26.1071C46.5 21.9991 44.6884 18.3038 41.8112 15.7699C43.5744 14.5413 45.725 13.8214 48.05 13.8214H51.15C57.1466 13.8214 62 18.6301 62 24.5714C62 28.8618 59.4619 32.5571 55.8 34.2848V36.8571C55.8 38.556 54.4147 39.9286 52.7 39.9286H46.5C44.7853 39.9286 43.4 38.556 43.4 36.8571ZM44.175 5.375C44.175 3.94946 44.7466 2.58231 45.7639 1.5743C46.7813 0.566293 48.1612 0 49.6 0C51.0388 0 52.4187 0.566293 53.4361 1.5743C54.4534 2.58231 55.025 3.94946 55.025 5.375C55.025 6.80054 54.4534 8.16769 53.4361 9.1757C52.4187 10.1837 51.0388 10.75 49.6 10.75C48.1612 10.75 46.7813 10.1837 45.7639 9.1757C44.7466 8.16769 44.175 6.80054 44.175 5.375ZM55.8 20.5114V28.6411C56.7687 27.5565 57.35 26.1359 57.35 24.581C57.35 23.0261 56.7687 21.596 55.8 20.521V20.5114ZM31 0C32.6443 0 34.2213 0.647192 35.3841 1.7992C36.5468 2.95121 37.2 4.51367 37.2 6.14286C37.2 7.77204 36.5468 9.3345 35.3841 10.4865C34.2213 11.6385 32.6443 12.2857 31 12.2857C29.3557 12.2857 27.7787 11.6385 26.6159 10.4865C25.4532 9.3345 24.8 7.77204 24.8 6.14286C24.8 4.51367 25.4532 2.95121 26.6159 1.7992C27.7787 0.647192 29.3557 0 31 0ZM23.25 26.1071C23.25 27.6621 23.8312 29.0826 24.8 30.1672V22.0471C23.8312 23.1317 23.25 24.5522 23.25 26.1071ZM37.2 22.0471V30.1768C38.1687 29.0922 38.75 27.6717 38.75 26.1167C38.75 24.5618 38.1687 23.1317 37.2 22.0567V22.0471ZM43.4 26.1071C43.4 30.3975 40.8619 34.0929 37.2 35.8205V39.9286C37.2 41.6275 35.8147 43 34.1 43H27.9C26.1853 43 24.8 41.6275 24.8 39.9286V35.8205C21.1381 34.0929 18.6 30.3975 18.6 26.1071C18.6 20.1658 23.4534 15.3571 29.45 15.3571H32.55C38.5466 15.3571 43.4 20.1658 43.4 26.1071Z"
|
|
273
|
-
fill="var(--text-color)"
|
|
274
|
-
/>
|
|
275
|
-
</svg>
|
|
276
|
-
}
|
|
277
|
-
width="65px"
|
|
278
|
-
/>
|
|
279
|
-
</div>
|
|
280
|
-
<div
|
|
281
|
-
style={{
|
|
282
|
-
display: 'flex',
|
|
283
|
-
flexDirection: 'column',
|
|
284
|
-
alignItems: 'center',
|
|
285
|
-
justifyContent: 'center',
|
|
286
|
-
}}
|
|
287
|
-
>
|
|
288
|
-
<StatItemContent
|
|
289
|
-
content="250"
|
|
290
|
-
width="100px"
|
|
291
|
-
fontSize="2.5rem"
|
|
292
|
-
fontWeight="bold"
|
|
293
|
-
/>
|
|
294
|
-
<StatItemContent
|
|
295
|
-
content="contributors"
|
|
296
|
-
width="100px"
|
|
297
|
-
fontSize="1.0rem"
|
|
298
|
-
fontWeight="bold"
|
|
299
|
-
/>
|
|
300
|
-
</div>
|
|
301
|
-
</div>
|
|
302
|
-
</Pill>
|
|
303
|
-
);
|
|
304
|
-
};
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import type {ChangeEvent} from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import {cn} from '../../cn';
|
|
4
|
-
|
|
5
|
-
const Triangle: React.FC<{
|
|
6
|
-
readonly rotated: boolean;
|
|
7
|
-
}> = ({rotated}) => (
|
|
8
|
-
<svg
|
|
9
|
-
width="12px"
|
|
10
|
-
height="7px"
|
|
11
|
-
viewBox="0 0 12 7"
|
|
12
|
-
fill="none"
|
|
13
|
-
style={{
|
|
14
|
-
transform: rotated ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
15
|
-
}}
|
|
16
|
-
>
|
|
17
|
-
<path
|
|
18
|
-
fill="currentcolor"
|
|
19
|
-
d="M7.17096 0.475588C6.73198 0.0764969 6.01906 0.0764969 5.58007 0.475588L1.08483 4.56228C0.761737 4.85601 0.666915 5.29341 0.84251 5.67654C1.01811 6.05966 1.42549 6.3087 1.88203 6.3087H10.8725C11.3255 6.3087 11.7364 6.05966 11.912 5.67654C12.0876 5.29341 11.9893 4.85601 11.6697 4.56228L7.17448 0.475588H7.17096Z"
|
|
20
|
-
/>
|
|
21
|
-
</svg>
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
const container: React.CSSProperties = {
|
|
25
|
-
display: 'flex',
|
|
26
|
-
flexDirection: 'row',
|
|
27
|
-
justifyContent: 'flex-end',
|
|
28
|
-
alignItems: 'center',
|
|
29
|
-
borderRadius: 4,
|
|
30
|
-
height: 42,
|
|
31
|
-
overflow: 'hidden',
|
|
32
|
-
flexShrink: 0,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const buttonContainer: React.CSSProperties = {
|
|
36
|
-
display: 'flex',
|
|
37
|
-
width: 30,
|
|
38
|
-
padding: 2,
|
|
39
|
-
height: 20,
|
|
40
|
-
justifyContent: 'center',
|
|
41
|
-
alignItems: 'center',
|
|
42
|
-
backgroundColor: 'inherit',
|
|
43
|
-
cursor: 'pointer',
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
interface CounterProps {
|
|
47
|
-
readonly count: number;
|
|
48
|
-
readonly setCount: (count: number) => void;
|
|
49
|
-
readonly minCount?: number;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export const Counter: React.FC<CounterProps> = ({
|
|
53
|
-
count,
|
|
54
|
-
setCount,
|
|
55
|
-
minCount = 0,
|
|
56
|
-
}) => {
|
|
57
|
-
const decrement = () => {
|
|
58
|
-
if (count > minCount) {
|
|
59
|
-
setCount(count - 1);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const increment = () => {
|
|
64
|
-
setCount(count + 1);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<div style={container} className={cn('border-effect w-[110px]')}>
|
|
69
|
-
<input
|
|
70
|
-
className={
|
|
71
|
-
'fontbrand text-2xl font-medium min-w-[60px] border-0 text-end bg-transparent outline-0'
|
|
72
|
-
}
|
|
73
|
-
type="number"
|
|
74
|
-
onClick={(e) => e.currentTarget.select()}
|
|
75
|
-
value={count}
|
|
76
|
-
onChange={(e: ChangeEvent<HTMLInputElement>) => {
|
|
77
|
-
if (e.target.value.trim() === '') {
|
|
78
|
-
setCount(1);
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const max = Math.max(parseInt(e.target.value, 10), 1);
|
|
83
|
-
setCount(max);
|
|
84
|
-
}}
|
|
85
|
-
/>
|
|
86
|
-
<div className="flex flex-col ml-3 h-full">
|
|
87
|
-
<button
|
|
88
|
-
type="button"
|
|
89
|
-
className="border-0 border-l-2 border-l-solid border-b-2 flex-1"
|
|
90
|
-
style={{
|
|
91
|
-
...buttonContainer,
|
|
92
|
-
}}
|
|
93
|
-
onClick={increment}
|
|
94
|
-
>
|
|
95
|
-
<Triangle rotated={false} />
|
|
96
|
-
</button>
|
|
97
|
-
<button
|
|
98
|
-
type="button"
|
|
99
|
-
className="border-0 border-l-2 border-l-solid flex-1"
|
|
100
|
-
style={{
|
|
101
|
-
...buttonContainer,
|
|
102
|
-
}}
|
|
103
|
-
onClick={decrement}
|
|
104
|
-
>
|
|
105
|
-
<Triangle rotated />
|
|
106
|
-
</button>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
);
|
|
110
|
-
};
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
import React, {useCallback, useRef} from 'react';
|
|
2
|
-
import {AbsoluteFill, spring} from 'remotion';
|
|
3
|
-
import {
|
|
4
|
-
cardHeight,
|
|
5
|
-
cardWidth,
|
|
6
|
-
getIndexFromPosition,
|
|
7
|
-
getInitialPositions,
|
|
8
|
-
getPositionForIndex,
|
|
9
|
-
type Position,
|
|
10
|
-
} from './math';
|
|
11
|
-
import {Switcher} from './Switcher';
|
|
12
|
-
|
|
13
|
-
const arePositionsEqual = (a: Position[], b: Position[]) => {
|
|
14
|
-
return a.every((pos, i) => {
|
|
15
|
-
return pos.x === b[i].x && pos.y === b[i].y;
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const Card: React.FC<{
|
|
20
|
-
readonly index: number;
|
|
21
|
-
readonly refsToUse: React.MutableRefObject<HTMLDivElement>[];
|
|
22
|
-
readonly onUpdate: (newIndices: number[]) => void;
|
|
23
|
-
readonly content: React.ReactNode;
|
|
24
|
-
readonly positions: React.MutableRefObject<Position[]>;
|
|
25
|
-
readonly shouldBePositions: React.MutableRefObject<Position[]>;
|
|
26
|
-
readonly indices: number[];
|
|
27
|
-
readonly theme: 'dark' | 'light';
|
|
28
|
-
readonly withSwitcher: boolean;
|
|
29
|
-
readonly onClickLeft: () => void;
|
|
30
|
-
readonly onClickRight: () => void;
|
|
31
|
-
}> = ({
|
|
32
|
-
positions,
|
|
33
|
-
shouldBePositions,
|
|
34
|
-
index,
|
|
35
|
-
refsToUse,
|
|
36
|
-
onUpdate,
|
|
37
|
-
content,
|
|
38
|
-
indices,
|
|
39
|
-
theme,
|
|
40
|
-
withSwitcher,
|
|
41
|
-
onClickLeft,
|
|
42
|
-
onClickRight,
|
|
43
|
-
}) => {
|
|
44
|
-
const refToUse = refsToUse[index];
|
|
45
|
-
const stopPrevious = useRef<(() => void)[]>([]);
|
|
46
|
-
|
|
47
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
48
|
-
let newIndices = [...indices];
|
|
49
|
-
|
|
50
|
-
const applyPositions = useCallback(
|
|
51
|
-
(except: number | null) => {
|
|
52
|
-
let stopped = false;
|
|
53
|
-
stopPrevious.current.forEach((s) => {
|
|
54
|
-
s();
|
|
55
|
-
});
|
|
56
|
-
stopPrevious.current.push(() => {
|
|
57
|
-
stopped = true;
|
|
58
|
-
});
|
|
59
|
-
positions.current.forEach((_, i) => {
|
|
60
|
-
const shouldBe = shouldBePositions.current[i];
|
|
61
|
-
const ref = refsToUse[i].current;
|
|
62
|
-
if (!ref) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (except === null) {
|
|
67
|
-
ref.style.pointerEvents = 'none';
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (i === except) {
|
|
71
|
-
ref.style.left = getPositionForIndex(i).x + 'px';
|
|
72
|
-
ref.style.top = getPositionForIndex(i).y + 'px';
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
let animationI = 1;
|
|
77
|
-
const duration = 20;
|
|
78
|
-
|
|
79
|
-
const releasePositionX = positions.current[i].x;
|
|
80
|
-
const releasePositionY = positions.current[i].y;
|
|
81
|
-
|
|
82
|
-
const finishAnimation = () => {
|
|
83
|
-
refsToUse.forEach((r) => {
|
|
84
|
-
r.current.style.zIndex = '1';
|
|
85
|
-
r.current.style.scale = '1';
|
|
86
|
-
r.current.style.opacity = '1';
|
|
87
|
-
});
|
|
88
|
-
if (i === 0) {
|
|
89
|
-
setTimeout(() => {
|
|
90
|
-
onUpdate([...newIndices]);
|
|
91
|
-
}, 200);
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
if (
|
|
96
|
-
releasePositionX === shouldBe.x &&
|
|
97
|
-
releasePositionY === shouldBe.y &&
|
|
98
|
-
animationI === duration &&
|
|
99
|
-
except === null
|
|
100
|
-
) {
|
|
101
|
-
finishAnimation();
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const update = () => {
|
|
106
|
-
if (stopped) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
const progress = spring({
|
|
111
|
-
fps: 60,
|
|
112
|
-
frame: animationI,
|
|
113
|
-
config: {
|
|
114
|
-
damping: 200,
|
|
115
|
-
},
|
|
116
|
-
durationInFrames: duration,
|
|
117
|
-
durationRestThreshold: 0.001,
|
|
118
|
-
});
|
|
119
|
-
const newX =
|
|
120
|
-
progress * (shouldBe.x - releasePositionX) + releasePositionX;
|
|
121
|
-
const newY =
|
|
122
|
-
progress * (shouldBe.y - releasePositionY) + releasePositionY;
|
|
123
|
-
ref.style.left = `${newX}px`;
|
|
124
|
-
ref.style.top = `${newY}px`;
|
|
125
|
-
positions.current[i] = {
|
|
126
|
-
x: newX,
|
|
127
|
-
y: newY,
|
|
128
|
-
};
|
|
129
|
-
animationI++;
|
|
130
|
-
if (animationI === duration && except === null) {
|
|
131
|
-
finishAnimation();
|
|
132
|
-
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
requestAnimationFrame(update);
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
update();
|
|
140
|
-
});
|
|
141
|
-
},
|
|
142
|
-
[newIndices, onUpdate, positions, refsToUse, shouldBePositions],
|
|
143
|
-
);
|
|
144
|
-
|
|
145
|
-
const onPointerDown = useCallback(
|
|
146
|
-
(e: React.PointerEvent<HTMLDivElement>) => {
|
|
147
|
-
e.currentTarget.setPointerCapture(e.pointerId);
|
|
148
|
-
const cardLeft = refToUse.current.offsetLeft;
|
|
149
|
-
const cardTop = refToUse.current.offsetTop;
|
|
150
|
-
const startX = e.clientX;
|
|
151
|
-
const startY = e.clientY;
|
|
152
|
-
|
|
153
|
-
if (e.button === 2) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
let translateX = 0;
|
|
158
|
-
let translateY = 0;
|
|
159
|
-
refToUse.current.style.scale = '1.05';
|
|
160
|
-
refToUse.current.style.cursor = 'grabbing';
|
|
161
|
-
|
|
162
|
-
const onMove = (evt: PointerEvent) => {
|
|
163
|
-
refsToUse.forEach((r) => {
|
|
164
|
-
if (r !== refToUse) {
|
|
165
|
-
r.current.style.opacity = '0';
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
const scale =
|
|
169
|
-
refToUse.current.getBoundingClientRect().width / cardWidth;
|
|
170
|
-
|
|
171
|
-
translateX = (evt.clientX - startX) * (1 / scale);
|
|
172
|
-
translateY = (evt.clientY - startY) * (1 / scale);
|
|
173
|
-
|
|
174
|
-
const position = getIndexFromPosition(
|
|
175
|
-
cardLeft + translateX,
|
|
176
|
-
cardTop + translateY,
|
|
177
|
-
);
|
|
178
|
-
if (position === undefined) {
|
|
179
|
-
throw new Error('pos');
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (position === index) {
|
|
183
|
-
if (
|
|
184
|
-
!arePositionsEqual(getInitialPositions(), shouldBePositions.current)
|
|
185
|
-
) {
|
|
186
|
-
shouldBePositions.current = getInitialPositions();
|
|
187
|
-
applyPositions(index);
|
|
188
|
-
}
|
|
189
|
-
} else {
|
|
190
|
-
const newPos = getInitialPositions();
|
|
191
|
-
newPos[position] = getPositionForIndex(index);
|
|
192
|
-
newPos[index] = getPositionForIndex(position);
|
|
193
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
194
|
-
newIndices = [...indices];
|
|
195
|
-
const prevIndexPosition = newIndices[position];
|
|
196
|
-
newIndices[position] = newIndices[index];
|
|
197
|
-
newIndices[index] = prevIndexPosition;
|
|
198
|
-
|
|
199
|
-
if (!arePositionsEqual(newPos, shouldBePositions.current)) {
|
|
200
|
-
shouldBePositions.current = newPos;
|
|
201
|
-
applyPositions(index);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
refToUse.current.style.transform = `translateX(${translateX}px) translateY(${translateY}px)`;
|
|
206
|
-
refToUse.current.style.zIndex = '2';
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
refToUse.current.addEventListener(
|
|
210
|
-
'pointerup',
|
|
211
|
-
() => {
|
|
212
|
-
positions.current[index] = {
|
|
213
|
-
x: cardLeft + translateX,
|
|
214
|
-
y: cardTop + translateY,
|
|
215
|
-
};
|
|
216
|
-
refToUse.current.style.left = `${cardLeft + translateX}px`;
|
|
217
|
-
refToUse.current.style.top = `${cardTop + translateY}px`;
|
|
218
|
-
refToUse.current.style.transform = `translateX(0px) translateY(0px)`;
|
|
219
|
-
refToUse.current.style.cursor = 'grab';
|
|
220
|
-
|
|
221
|
-
refToUse.current.removeEventListener('pointermove', onMove);
|
|
222
|
-
applyPositions(null);
|
|
223
|
-
},
|
|
224
|
-
{once: true},
|
|
225
|
-
);
|
|
226
|
-
|
|
227
|
-
refToUse.current.addEventListener('pointermove', onMove);
|
|
228
|
-
},
|
|
229
|
-
[applyPositions, index, positions, refToUse, shouldBePositions],
|
|
230
|
-
);
|
|
231
|
-
|
|
232
|
-
const onPointerUp = useCallback((e: React.PointerEvent<HTMLDivElement>) => {
|
|
233
|
-
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
234
|
-
}, []);
|
|
235
|
-
|
|
236
|
-
const {x, y} = getPositionForIndex(index);
|
|
237
|
-
const color = theme === 'light' ? ' #EAEAEA' : '#333';
|
|
238
|
-
return (
|
|
239
|
-
<div
|
|
240
|
-
ref={refToUse}
|
|
241
|
-
className={'transition-opacity duration-200'}
|
|
242
|
-
onPointerDown={onPointerDown}
|
|
243
|
-
onPointerUp={onPointerUp}
|
|
244
|
-
style={{
|
|
245
|
-
width: cardWidth,
|
|
246
|
-
height: cardHeight,
|
|
247
|
-
position: 'absolute',
|
|
248
|
-
left: x,
|
|
249
|
-
top: y,
|
|
250
|
-
userSelect: 'none',
|
|
251
|
-
border: `1px solid ${color}`,
|
|
252
|
-
borderRadius: 13,
|
|
253
|
-
cursor: 'grab',
|
|
254
|
-
}}
|
|
255
|
-
>
|
|
256
|
-
<AbsoluteFill
|
|
257
|
-
style={{
|
|
258
|
-
backgroundColor: color,
|
|
259
|
-
borderRadius: 12,
|
|
260
|
-
}}
|
|
261
|
-
className={'transition-opacity duration-200'}
|
|
262
|
-
>
|
|
263
|
-
{content}
|
|
264
|
-
{withSwitcher ? (
|
|
265
|
-
<>
|
|
266
|
-
<Switcher onTap={onClickLeft} type="left" theme={theme} />
|
|
267
|
-
<Switcher onTap={onClickRight} type="right" theme={theme} />
|
|
268
|
-
</>
|
|
269
|
-
) : null}
|
|
270
|
-
</AbsoluteFill>
|
|
271
|
-
</div>
|
|
272
|
-
);
|
|
273
|
-
};
|