@remotion/promo-pages 5.0.0-canary.3 → 5.0.2-canary

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 (130) hide show
  1. package/.turbo/turbo-make.log +8 -0
  2. package/bundle.ts +46 -0
  3. package/dist/Homepage.js +1 -1
  4. package/dist/homepage/Pricing.js +1 -1
  5. package/eslint.config.mjs +7 -0
  6. package/index.html +13 -0
  7. package/package.json +1 -4
  8. package/public/fire.mp3 +0 -0
  9. package/public/img/cluster.png +0 -0
  10. package/public/img/code-sample-new.png +0 -0
  11. package/public/img/freelancers/alex.jpeg +0 -0
  12. package/public/img/freelancers/antoine.jpeg +0 -0
  13. package/public/img/freelancers/ayush.png +0 -0
  14. package/public/img/freelancers/benjamin.jpeg +0 -0
  15. package/public/img/freelancers/default.png +0 -0
  16. package/public/img/freelancers/florent.jpeg +0 -0
  17. package/public/img/freelancers/karel.jpeg +0 -0
  18. package/public/img/freelancers/lorenzo.jpeg +0 -0
  19. package/public/img/freelancers/mickael.jpeg +0 -0
  20. package/public/img/freelancers/mohit.jpeg +0 -0
  21. package/public/img/freelancers/pramod.jpg +0 -0
  22. package/public/img/freelancers/pranav.jpg +0 -0
  23. package/public/img/freelancers/rahul.png +0 -0
  24. package/public/img/freelancers/ray.jpeg +0 -0
  25. package/public/img/freelancers/stephen.png +0 -0
  26. package/public/img/freelancers/umungo.png +0 -0
  27. package/public/img/freelancers/yehor.jpeg +0 -0
  28. package/public/img/gt-planar-black.woff2 +0 -0
  29. package/public/img/gt-planar-bold.woff2 +0 -0
  30. package/public/img/gt-planar-medium.woff2 +0 -0
  31. package/public/img/gt-planar-regular.woff2 +0 -0
  32. package/public/img/logo-small.png +0 -0
  33. package/public/img/mp4.png +0 -0
  34. package/public/img/player-demo.mp4 +0 -0
  35. package/public/img/player-example-dark.png +0 -0
  36. package/public/img/player-example.png +0 -0
  37. package/public/img/writeinreact.png +0 -0
  38. package/public/partyhorn.mp3 +0 -0
  39. package/public/sad.mp3 +0 -0
  40. package/src/cn.ts +6 -0
  41. package/src/components/Homepage.tsx +88 -0
  42. package/src/components/homepage/BackgroundAnimation.tsx +108 -0
  43. package/src/components/homepage/ChooseTemplate.tsx +57 -0
  44. package/src/components/homepage/CodeExample.tsx +89 -0
  45. package/src/components/homepage/CommunityStats.tsx +54 -0
  46. package/src/components/homepage/CommunityStatsItems.tsx +304 -0
  47. package/src/components/homepage/Counter.tsx +110 -0
  48. package/src/components/homepage/Demo/Card.tsx +273 -0
  49. package/src/components/homepage/Demo/Cards.tsx +129 -0
  50. package/src/components/homepage/Demo/Comp.tsx +157 -0
  51. package/src/components/homepage/Demo/CurrentCountry.tsx +97 -0
  52. package/src/components/homepage/Demo/DemoError.tsx +18 -0
  53. package/src/components/homepage/Demo/DemoErrorIcon.tsx +32 -0
  54. package/src/components/homepage/Demo/DemoRender.tsx +166 -0
  55. package/src/components/homepage/Demo/DigitWheel.tsx +179 -0
  56. package/src/components/homepage/Demo/DisplayedEmoji.tsx +81 -0
  57. package/src/components/homepage/Demo/DoneCheckmark.tsx +39 -0
  58. package/src/components/homepage/Demo/DownloadNudge.tsx +62 -0
  59. package/src/components/homepage/Demo/DragAndDropNudge.tsx +57 -0
  60. package/src/components/homepage/Demo/EmojiCard.tsx +198 -0
  61. package/src/components/homepage/Demo/Minus.tsx +21 -0
  62. package/src/components/homepage/Demo/PlayPauseButton.tsx +66 -0
  63. package/src/components/homepage/Demo/PlayerControls.tsx +48 -0
  64. package/src/components/homepage/Demo/PlayerSeekBar.tsx +325 -0
  65. package/src/components/homepage/Demo/PlayerVolume.tsx +83 -0
  66. package/src/components/homepage/Demo/Progress.tsx +38 -0
  67. package/src/components/homepage/Demo/Spinner.tsx +60 -0
  68. package/src/components/homepage/Demo/Switcher.tsx +54 -0
  69. package/src/components/homepage/Demo/Temperature.tsx +44 -0
  70. package/src/components/homepage/Demo/TemperatureNumber.tsx +68 -0
  71. package/src/components/homepage/Demo/ThemeNudge.tsx +72 -0
  72. package/src/components/homepage/Demo/TimeDisplay.tsx +43 -0
  73. package/src/components/homepage/Demo/TrendingRepos.tsx +106 -0
  74. package/src/components/homepage/Demo/icons.tsx +114 -0
  75. package/src/components/homepage/Demo/index.tsx +158 -0
  76. package/src/components/homepage/Demo/math.ts +43 -0
  77. package/src/components/homepage/Demo/types.ts +6 -0
  78. package/src/components/homepage/Editor.tsx +67 -0
  79. package/src/components/homepage/EvaluateRemotion.tsx +92 -0
  80. package/src/components/homepage/FreePricing.tsx +295 -0
  81. package/src/components/homepage/GetStartedStrip.tsx +77 -0
  82. package/src/components/homepage/GitHubButton.tsx +23 -0
  83. package/src/components/homepage/IconForTemplate.tsx +154 -0
  84. package/src/components/homepage/IfYouKnowReact.tsx +29 -0
  85. package/src/components/homepage/InfoTooltip.tsx +25 -0
  86. package/src/components/homepage/MoreTemplatesButton.tsx +29 -0
  87. package/src/components/homepage/MuxVideo.tsx +68 -0
  88. package/src/components/homepage/NewsletterButton.tsx +88 -0
  89. package/src/components/homepage/Pricing.tsx +49 -0
  90. package/src/components/homepage/PricingBulletPoint.tsx +50 -0
  91. package/src/components/homepage/RealMp4Videos.tsx +50 -0
  92. package/src/components/homepage/Spacer.tsx +5 -0
  93. package/src/components/homepage/TemplateIcon.tsx +36 -0
  94. package/src/components/homepage/TextInput.tsx +62 -0
  95. package/src/components/homepage/TrustedByBanner.tsx +194 -0
  96. package/src/components/homepage/VideoApps.tsx +231 -0
  97. package/src/components/homepage/VideoAppsShowcase.tsx +276 -0
  98. package/src/components/homepage/VideoAppsTitle.tsx +24 -0
  99. package/src/components/homepage/VideoPlayerWithControls.tsx +188 -0
  100. package/src/components/homepage/WriteInReact.tsx +34 -0
  101. package/src/components/homepage/YouAreHere.tsx +30 -0
  102. package/src/components/homepage/custom.css +57 -0
  103. package/src/components/homepage/layout/Button.tsx +93 -0
  104. package/src/components/homepage/layout/colors.ts +17 -0
  105. package/src/components/homepage/layout/use-color-mode.tsx +44 -0
  106. package/src/components/homepage/layout/use-el-size.ts +51 -0
  107. package/src/components/homepage/layout/use-mobile-layout.ts +8 -0
  108. package/src/components/homepage/video-player.css +24 -0
  109. package/src/components/icons/blank.tsx +13 -0
  110. package/src/components/icons/clone.tsx +10 -0
  111. package/src/components/icons/code-hike.tsx +15 -0
  112. package/src/components/icons/cubes.tsx +13 -0
  113. package/src/components/icons/js.tsx +17 -0
  114. package/src/components/icons/next.tsx +64 -0
  115. package/src/components/icons/overlay.tsx +24 -0
  116. package/src/components/icons/remix.tsx +24 -0
  117. package/src/components/icons/skia.tsx +13 -0
  118. package/src/components/icons/stargazer.tsx +13 -0
  119. package/src/components/icons/still.tsx +13 -0
  120. package/src/components/icons/tailwind.tsx +22 -0
  121. package/src/components/icons/tiktok.tsx +13 -0
  122. package/src/components/icons/ts.tsx +18 -0
  123. package/src/components/icons/tts.tsx +13 -0
  124. package/src/components/icons/undo.tsx +11 -0
  125. package/src/components/icons/waveform.tsx +13 -0
  126. package/src/fonts.css +30 -0
  127. package/src/index.css +74 -0
  128. package/src/main.tsx +12 -0
  129. package/tsconfig.json +15 -0
  130. package/vite.config.ts +9 -0
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import {useMobileLayout} from './layout/use-mobile-layout';
3
+
4
+ const icon: React.CSSProperties = {
5
+ height: 16,
6
+ marginLeft: 10,
7
+ };
8
+
9
+ export const MoreTemplatesButton: React.FC = () => {
10
+ const mobileLayout = useMobileLayout();
11
+
12
+ return (
13
+ <a href="/templates" className="no-underline text-inherit">
14
+ <div className="right-0 border-2 rounded-full text-inherit px-4 py-2 fontbrand font-semibold text-sm flex flex-row items-center">
15
+ {mobileLayout ? 'Templates' : 'Find a template'}
16
+ <svg
17
+ style={icon}
18
+ xmlns="http://www.w3.org/2000/svg"
19
+ viewBox="0 0 448 512"
20
+ >
21
+ <path
22
+ fill="currentColor"
23
+ d="M438.6 278.6l-160 160C272.4 444.9 264.2 448 256 448s-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L338.8 288H32C14.33 288 .0016 273.7 .0016 256S14.33 224 32 224h306.8l-105.4-105.4c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160C451.1 245.9 451.1 266.1 438.6 278.6z"
24
+ />
25
+ </svg>
26
+ </div>
27
+ </a>
28
+ );
29
+ };
@@ -0,0 +1,68 @@
1
+ import Hls from 'hls.js';
2
+ import React, {forwardRef, useEffect, useImperativeHandle, useRef} from 'react';
3
+ import {VideoPlayerWithControls} from './VideoPlayerWithControls';
4
+
5
+ const getVideoToPlayUrl = (muxId: string) => {
6
+ return `https://stream.mux.com/${muxId}.m3u8`;
7
+ };
8
+
9
+ const MuxVideoForward: React.ForwardRefRenderFunction<
10
+ HTMLVideoElement,
11
+ React.DetailedHTMLProps<
12
+ React.VideoHTMLAttributes<HTMLVideoElement>,
13
+ HTMLVideoElement
14
+ > & {
15
+ readonly muxId: string;
16
+ }
17
+ > = ({muxId, ...props}, ref) => {
18
+ const videoRef = useRef<HTMLVideoElement>(null);
19
+ const vidUrl = getVideoToPlayUrl(muxId);
20
+
21
+ useImperativeHandle(ref, () => videoRef.current!, []);
22
+
23
+ useEffect(() => {
24
+ let hls: Hls;
25
+ if (videoRef.current) {
26
+ const {current} = videoRef;
27
+ if (current.canPlayType('application/vnd.apple.mpegurl')) {
28
+ // Some browers (safari and ie edge) support HLS natively
29
+ current.src = vidUrl;
30
+ } else if (Hls.isSupported()) {
31
+ // This will run in all other modern browsers
32
+ hls = new Hls();
33
+ hls.loadSource(vidUrl);
34
+ hls.attachMedia(current);
35
+ } else {
36
+ // eslint-disable-next-line no-console
37
+ console.error("This is a legacy browser that doesn't support MSE");
38
+ }
39
+ }
40
+
41
+ return () => {
42
+ if (hls) {
43
+ hls.destroy();
44
+ }
45
+ };
46
+ }, [vidUrl, videoRef]);
47
+
48
+ return <video ref={videoRef} {...props} />;
49
+ };
50
+
51
+ export const MuxVideo = forwardRef(MuxVideoForward);
52
+
53
+ export const NewMuxVideo: React.FC<{
54
+ readonly muxId: string;
55
+ }> = ({muxId}) => {
56
+ return (
57
+ <VideoPlayerWithControls
58
+ playbackId={muxId}
59
+ poster={'https://image.mux.com/' + muxId + '/thumbnail.png?time=1'}
60
+ onError={(error) => {
61
+ // eslint-disable-next-line no-console
62
+ console.log(error);
63
+ }}
64
+ onLoaded={() => undefined}
65
+ onSize={() => undefined}
66
+ />
67
+ );
68
+ };
@@ -0,0 +1,88 @@
1
+ import React, {useCallback, useState} from 'react';
2
+ import {BlueButton} from './layout/Button';
3
+ import {Spacer} from './Spacer';
4
+
5
+ export const NewsletterButton: React.FC<{}> = () => {
6
+ const [email, setEmail] = useState('');
7
+ const [submitting, setSubmitting] = useState(false);
8
+ const [subscribed, setSubscribed] = useState(false);
9
+
10
+ const handleSubmit = useCallback(
11
+ async (e: React.FormEvent<HTMLFormElement>) => {
12
+ try {
13
+ setSubmitting(true);
14
+ e.preventDefault();
15
+
16
+ const response = await fetch(
17
+ 'https://www.remotion.pro/api/newsletter',
18
+ {
19
+ method: 'POST',
20
+ body: JSON.stringify({email}),
21
+ headers: {
22
+ 'content-type': 'application/json',
23
+ },
24
+ },
25
+ );
26
+ const json = await response.json();
27
+ if (json.success) {
28
+ setSubscribed(true);
29
+ } else {
30
+ // eslint-disable-next-line no-alert
31
+ alert('Something went wrong. Please try again later.');
32
+ }
33
+
34
+ setSubmitting(false);
35
+ } catch {
36
+ // eslint-disable-next-line no-alert
37
+ alert('Something went wrong. Please try again later.');
38
+ }
39
+ },
40
+ [email],
41
+ );
42
+
43
+ return (
44
+ <div>
45
+ <div className="flex flex-col">
46
+ <div className={'w-full'}>
47
+ <div className={'border-effect bg-pane flex flex-col flex-1 p-5'}>
48
+ <div className={'text-2xl font-bold fontbrand'}>Newsletter</div>
49
+ <form
50
+ onSubmit={handleSubmit}
51
+ style={{
52
+ width: '100%',
53
+ }}
54
+ >
55
+ <p className="leading-snug mt-1 text-muted fontbrand">
56
+ Read about new features and noteworthy updates we have made on
57
+ Remotion once in a while.
58
+ </p>
59
+
60
+ <input
61
+ className="w-full rounded-lg border-effect border-black outline-none px-3 py-3 fontbrand text-lg box-border focus:border-brand"
62
+ disabled={submitting}
63
+ value={email}
64
+ onChange={(e) => setEmail(e.target.value)}
65
+ type={'email'}
66
+ required
67
+ placeholder="animator@gmail.com"
68
+ />
69
+ <Spacer />
70
+ <Spacer />
71
+ <div>
72
+ <BlueButton
73
+ type="submit"
74
+ className="w-full"
75
+ loading={submitting}
76
+ disabled={submitting || subscribed}
77
+ size="sm"
78
+ >
79
+ {subscribed ? 'Subscribed!' : 'Subscribe'}
80
+ </BlueButton>
81
+ </div>
82
+ </form>
83
+ </div>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ );
88
+ };
@@ -0,0 +1,49 @@
1
+ import React from 'react';
2
+ import {CompanyPricing, EnterpriseLicense, FreePricing} from './FreePricing';
3
+
4
+ export const Pricing: React.FC = () => {
5
+ return (
6
+ <div
7
+ style={{
8
+ display: 'flex',
9
+ flexDirection: 'column',
10
+ gap: 20,
11
+ marginBottom: 40,
12
+ }}
13
+ >
14
+ <FreePricing />
15
+ <CompanyPricing />
16
+ <EnterpriseLicense />
17
+ <div
18
+ style={{
19
+ justifyContent: 'center',
20
+ display: 'flex',
21
+ }}
22
+ >
23
+ <div
24
+ style={{
25
+ fontFamily: 'GTPlanar',
26
+ }}
27
+ >
28
+ See our{' '}
29
+ <a
30
+ target="_blank"
31
+ className="bluelink"
32
+ href="https://remotion.pro/faq"
33
+ >
34
+ FAQ
35
+ </a>{' '}
36
+ and{' '}
37
+ <a
38
+ target="_blank"
39
+ className="bluelink"
40
+ href="https://www.remotion.pro/terms"
41
+ >
42
+ Terms and Conditions
43
+ </a>{' '}
44
+ for more details.
45
+ </div>
46
+ </div>
47
+ </div>
48
+ );
49
+ };
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+
3
+ const container: React.CSSProperties = {
4
+ display: 'flex',
5
+ flexDirection: 'row',
6
+ alignItems: 'center',
7
+ gap: '10px',
8
+ };
9
+
10
+ const greyCircle: React.CSSProperties = {
11
+ width: 20,
12
+ height: 20,
13
+ borderRadius: 10,
14
+ backgroundColor: 'var(--footer-border)',
15
+ };
16
+
17
+ export const PricingBulletPoint: React.FC<{
18
+ readonly text: React.ReactNode;
19
+ readonly checked: boolean;
20
+ readonly children?: React.ReactNode;
21
+ }> = ({text, checked, children}) => {
22
+ const checkmarkSVG = (
23
+ <svg
24
+ width="20"
25
+ height="20"
26
+ viewBox="0 0 20 20"
27
+ fill="none"
28
+ xmlns="http://www.w3.org/2000/svg"
29
+ style={{
30
+ flexShrink: 0,
31
+ }}
32
+ >
33
+ <circle cx="10" cy="10" r="10" fill="#0B84F3" />
34
+ <path
35
+ d="M14.7908 7.20505C15.0697 7.47844 15.0697 7.92243 14.7908 8.19583L9.07711 13.795C8.79813 14.0683 8.34505 14.0683 8.06606 13.795L5.20924 10.9954C4.93025 10.722 4.93025 10.278 5.20924 10.0046C5.48823 9.73121 5.9413 9.73121 6.22029 10.0046L8.5727 12.3077L13.7819 7.20505C14.0609 6.93165 14.514 6.93165 14.793 7.20505H14.7908Z"
36
+ fill="white"
37
+ />
38
+ </svg>
39
+ );
40
+
41
+ return (
42
+ <div style={container}>
43
+ {checked ? checkmarkSVG : <div style={greyCircle} />}
44
+ <div className={'fontbrand text-lg '}>
45
+ {text}
46
+ {children}
47
+ </div>
48
+ </div>
49
+ );
50
+ };
@@ -0,0 +1,50 @@
1
+ import React, {useCallback, useEffect, useRef, useState} from 'react';
2
+
3
+ export const RealMP4Videos: React.FC = () => {
4
+ const ref = useRef<HTMLDivElement>(null);
5
+ const [isIntersecting, setIsIntersecting] = useState(false);
6
+
7
+ const callback: IntersectionObserverCallback = useCallback((data) => {
8
+ setIsIntersecting(data[0].isIntersecting);
9
+ }, []);
10
+
11
+ useEffect(() => {
12
+ const {current} = ref;
13
+ if (!current) {
14
+ return;
15
+ }
16
+
17
+ const observer = new IntersectionObserver(callback, {
18
+ root: null,
19
+ threshold: 0.5,
20
+ });
21
+ observer.observe(current);
22
+
23
+ return () => observer.unobserve(current);
24
+ }, [callback]);
25
+
26
+ return (
27
+ <div ref={ref} className={'flex flex-col lg:flex-row'}>
28
+ <div>
29
+ <h2 className="text-4xl fontbrand">
30
+ Real <span className={'text-brand'}>.mp4</span> videos
31
+ </h2>
32
+ <p className="leading-relaxed">
33
+ Remotion renders all frames to images and <br /> encodes them to a
34
+ real video - audio support included. <br /> WebM and other formats are
35
+ also supported.
36
+ </p>
37
+ </div>
38
+ <div className="flex flex-1 justify-start lg:justify-end items-end">
39
+ <img
40
+ src="/img/mp4.png"
41
+ className="mb-[30px] lg:mb-0"
42
+ style={{
43
+ width: 110,
44
+ animationPlayState: isIntersecting ? 'running' : 'paused',
45
+ }}
46
+ />
47
+ </div>
48
+ </div>
49
+ );
50
+ };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+
3
+ export const Spacer: React.FC = () => {
4
+ return <div style={{width: 4, height: 4}} />;
5
+ };
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import {useMobileLayout} from './layout/use-mobile-layout';
3
+
4
+ const icon: React.CSSProperties = {
5
+ display: 'flex',
6
+ width: 36,
7
+ height: 36,
8
+ justifyContent: 'center',
9
+ alignItems: 'center',
10
+ margin: 0,
11
+ };
12
+
13
+ const outer: React.CSSProperties = {
14
+ textAlign: 'center',
15
+ display: 'flex',
16
+ alignItems: 'center',
17
+ flexDirection: 'column',
18
+ color: 'var(--ifm-font-color-base)',
19
+ cursor: 'pointer',
20
+ filter: 'drop-shadow(0px 0px 4px var(--background))',
21
+ textDecoration: 'none',
22
+ };
23
+
24
+ export const TemplateIcon: React.FC<{
25
+ readonly label: string;
26
+ readonly children: React.ReactNode;
27
+ }> = ({children, label}) => {
28
+ const mobileLayout = useMobileLayout();
29
+
30
+ return (
31
+ <span style={outer}>
32
+ <div style={icon}>{children}</div>
33
+ {mobileLayout ? null : <div className="text-xs fontbrand">{label}</div>}
34
+ </span>
35
+ );
36
+ };
@@ -0,0 +1,62 @@
1
+ import type {DetailedHTMLProps} from 'react';
2
+ import React, {useCallback, useState} from 'react';
3
+
4
+ const inputStyle: React.CSSProperties = {
5
+ padding: 16,
6
+ border: 'none',
7
+ outline: 'none',
8
+ borderRadius: 4,
9
+ minWidth: 35,
10
+ fontSize: 16,
11
+ background: 'var(--background)',
12
+ };
13
+
14
+ const backgroundStyle = (
15
+ focused: boolean,
16
+ fullWidth: boolean,
17
+ ): React.CSSProperties => {
18
+ return {
19
+ padding: 2,
20
+ background: focused
21
+ ? 'var(--ifm-color-primary)'
22
+ : 'var(--ifm-font-color-base)',
23
+ display: fullWidth ? 'block' : 'inline-block',
24
+ transition: '0.2s background-color',
25
+ borderRadius: 7,
26
+ overflow: 'hidden',
27
+ width: fullWidth ? '100%' : undefined,
28
+ };
29
+ };
30
+
31
+ type Props = Omit<
32
+ DetailedHTMLProps<
33
+ React.InputHTMLAttributes<HTMLInputElement>,
34
+ HTMLInputElement
35
+ >,
36
+ 'onFocus' | 'onBlur'
37
+ > & {
38
+ readonly fullWidth?: boolean;
39
+ };
40
+
41
+ export const CoolInput: React.FC<Props> = ({style, fullWidth, ...props}) => {
42
+ const [focus, setFocused] = useState(false);
43
+
44
+ const onFocus = useCallback(() => {
45
+ setFocused(true);
46
+ }, [setFocused]);
47
+
48
+ const onBlur = useCallback(() => {
49
+ setFocused(false);
50
+ }, [setFocused]);
51
+
52
+ return (
53
+ <div style={backgroundStyle(focus, fullWidth!)}>
54
+ <input
55
+ style={{...inputStyle, ...style}}
56
+ {...props}
57
+ onFocus={onFocus}
58
+ onBlur={onBlur}
59
+ />
60
+ </div>
61
+ );
62
+ };