@remotion/promo-pages 4.0.340 → 4.0.344

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 (185) hide show
  1. package/.turbo/turbo-make.log +2 -2
  2. package/LICENSE.md +7 -7
  3. package/dist/Homepage.js +248 -223
  4. package/dist/tailwind.css +3 -0
  5. package/package.json +10 -10
  6. package/src/components/homepage/CommunityStatsItems.tsx +1 -1
  7. package/src/components/homepage/Demo/Cards.tsx +2 -2
  8. package/src/components/homepage/Demo/EmojiCard.tsx +4 -2
  9. package/src/components/homepage/Demo/icons.tsx +2 -2
  10. package/src/components/homepage/GitHubButton.tsx +1 -1
  11. package/src/components/homepage/VideoAppsShowcase.tsx +70 -90
  12. package/dist/cn.d.ts +0 -2
  13. package/dist/cn.js +0 -5
  14. package/dist/components/Homepage.d.ts +0 -6
  15. package/dist/components/Homepage.js +0 -20
  16. package/dist/components/homepage/BackgroundAnimation.d.ts +0 -2
  17. package/dist/components/homepage/BackgroundAnimation.js +0 -66
  18. package/dist/components/homepage/ChooseTemplate.d.ts +0 -2
  19. package/dist/components/homepage/ChooseTemplate.js +0 -27
  20. package/dist/components/homepage/CommunityStats.d.ts +0 -3
  21. package/dist/components/homepage/CommunityStats.js +0 -6
  22. package/dist/components/homepage/CommunityStatsItems.d.ts +0 -7
  23. package/dist/components/homepage/CommunityStatsItems.js +0 -58
  24. package/dist/components/homepage/Counter.d.ts +0 -9
  25. package/dist/components/homepage/Counter.js +0 -55
  26. package/dist/components/homepage/Demo/Card.d.ts +0 -15
  27. package/dist/components/homepage/Demo/Card.js +0 -174
  28. package/dist/components/homepage/Demo/Cards.d.ts +0 -15
  29. package/dist/components/homepage/Demo/Cards.js +0 -57
  30. package/dist/components/homepage/Demo/Comp.d.ts +0 -38
  31. package/dist/components/homepage/Demo/Comp.js +0 -71
  32. package/dist/components/homepage/Demo/CurrentCountry.d.ts +0 -9
  33. package/dist/components/homepage/Demo/CurrentCountry.js +0 -48
  34. package/dist/components/homepage/Demo/DemoError.d.ts +0 -2
  35. package/dist/components/homepage/Demo/DemoError.js +0 -10
  36. package/dist/components/homepage/Demo/DemoErrorIcon.d.ts +0 -2
  37. package/dist/components/homepage/Demo/DemoErrorIcon.js +0 -16
  38. package/dist/components/homepage/Demo/DemoRender.d.ts +0 -102
  39. package/dist/components/homepage/Demo/DemoRender.js +0 -95
  40. package/dist/components/homepage/Demo/DigitWheel.d.ts +0 -9
  41. package/dist/components/homepage/Demo/DigitWheel.js +0 -94
  42. package/dist/components/homepage/Demo/DisplayedEmoji.d.ts +0 -5
  43. package/dist/components/homepage/Demo/DisplayedEmoji.js +0 -63
  44. package/dist/components/homepage/Demo/DoneCheckmark.d.ts +0 -2
  45. package/dist/components/homepage/Demo/DoneCheckmark.js +0 -20
  46. package/dist/components/homepage/Demo/DownloadNudge.d.ts +0 -2
  47. package/dist/components/homepage/Demo/DownloadNudge.js +0 -27
  48. package/dist/components/homepage/Demo/DragAndDropNudge.d.ts +0 -3
  49. package/dist/components/homepage/Demo/DragAndDropNudge.js +0 -26
  50. package/dist/components/homepage/Demo/EmojiCard.d.ts +0 -10
  51. package/dist/components/homepage/Demo/EmojiCard.js +0 -119
  52. package/dist/components/homepage/Demo/Minus.d.ts +0 -5
  53. package/dist/components/homepage/Demo/Minus.js +0 -11
  54. package/dist/components/homepage/Demo/PlayPauseButton.d.ts +0 -5
  55. package/dist/components/homepage/Demo/PlayPauseButton.js +0 -47
  56. package/dist/components/homepage/Demo/PlayerControls.d.ts +0 -8
  57. package/dist/components/homepage/Demo/PlayerControls.js +0 -15
  58. package/dist/components/homepage/Demo/PlayerSeekBar.d.ts +0 -11
  59. package/dist/components/homepage/Demo/PlayerSeekBar.js +0 -216
  60. package/dist/components/homepage/Demo/PlayerVolume.d.ts +0 -5
  61. package/dist/components/homepage/Demo/PlayerVolume.js +0 -53
  62. package/dist/components/homepage/Demo/Progress.d.ts +0 -4
  63. package/dist/components/homepage/Demo/Progress.js +0 -14
  64. package/dist/components/homepage/Demo/Spinner.d.ts +0 -5
  65. package/dist/components/homepage/Demo/Spinner.js +0 -37
  66. package/dist/components/homepage/Demo/Switcher.d.ts +0 -6
  67. package/dist/components/homepage/Demo/Switcher.js +0 -25
  68. package/dist/components/homepage/Demo/Temperature.d.ts +0 -6
  69. package/dist/components/homepage/Demo/Temperature.js +0 -21
  70. package/dist/components/homepage/Demo/TemperatureNumber.d.ts +0 -5
  71. package/dist/components/homepage/Demo/TemperatureNumber.js +0 -36
  72. package/dist/components/homepage/Demo/ThemeNudge.d.ts +0 -3
  73. package/dist/components/homepage/Demo/ThemeNudge.js +0 -35
  74. package/dist/components/homepage/Demo/TimeDisplay.d.ts +0 -6
  75. package/dist/components/homepage/Demo/TimeDisplay.js +0 -27
  76. package/dist/components/homepage/Demo/TrendingRepos.d.ts +0 -6
  77. package/dist/components/homepage/Demo/TrendingRepos.js +0 -65
  78. package/dist/components/homepage/Demo/icons.d.ts +0 -10
  79. package/dist/components/homepage/Demo/icons.js +0 -22
  80. package/dist/components/homepage/Demo/index.d.ts +0 -2
  81. package/dist/components/homepage/Demo/index.js +0 -95
  82. package/dist/components/homepage/Demo/math.d.ts +0 -10
  83. package/dist/components/homepage/Demo/math.js +0 -29
  84. package/dist/components/homepage/Demo/types.d.ts +0 -6
  85. package/dist/components/homepage/Demo/types.js +0 -0
  86. package/dist/components/homepage/EvaluateRemotion.d.ts +0 -3
  87. package/dist/components/homepage/EvaluateRemotion.js +0 -39
  88. package/dist/components/homepage/FreePricing.d.ts +0 -4
  89. package/dist/components/homepage/FreePricing.js +0 -75
  90. package/dist/components/homepage/GetStartedStrip.d.ts +0 -2
  91. package/dist/components/homepage/GetStartedStrip.js +0 -14
  92. package/dist/components/homepage/GitHubButton.d.ts +0 -2
  93. package/dist/components/homepage/GitHubButton.js +0 -7
  94. package/dist/components/homepage/IconForTemplate.d.ts +0 -6
  95. package/dist/components/homepage/IconForTemplate.js +0 -98
  96. package/dist/components/homepage/IfYouKnowReact.d.ts +0 -3
  97. package/dist/components/homepage/IfYouKnowReact.js +0 -23
  98. package/dist/components/homepage/InfoTooltip.d.ts +0 -6
  99. package/dist/components/homepage/InfoTooltip.js +0 -6
  100. package/dist/components/homepage/MoreTemplatesButton.d.ts +0 -2
  101. package/dist/components/homepage/MoreTemplatesButton.js +0 -10
  102. package/dist/components/homepage/MoreVideoPowerSection.d.ts +0 -2
  103. package/dist/components/homepage/MoreVideoPowerSection.js +0 -16
  104. package/dist/components/homepage/MuxVideo.d.ts +0 -7
  105. package/dist/components/homepage/MuxVideo.js +0 -45
  106. package/dist/components/homepage/NewsletterButton.d.ts +0 -2
  107. package/dist/components/homepage/NewsletterButton.js +0 -39
  108. package/dist/components/homepage/ParameterizeAndEdit.d.ts +0 -2
  109. package/dist/components/homepage/ParameterizeAndEdit.js +0 -22
  110. package/dist/components/homepage/Pricing.d.ts +0 -2
  111. package/dist/components/homepage/Pricing.js +0 -15
  112. package/dist/components/homepage/PricingBulletPoint.d.ts +0 -6
  113. package/dist/components/homepage/PricingBulletPoint.js +0 -19
  114. package/dist/components/homepage/RealMp4Videos.d.ts +0 -2
  115. package/dist/components/homepage/RealMp4Videos.js +0 -41
  116. package/dist/components/homepage/Spacer.d.ts +0 -2
  117. package/dist/components/homepage/Spacer.js +0 -4
  118. package/dist/components/homepage/TemplateIcon.d.ts +0 -5
  119. package/dist/components/homepage/TemplateIcon.js +0 -24
  120. package/dist/components/homepage/TextInput.d.ts +0 -7
  121. package/dist/components/homepage/TextInput.js +0 -34
  122. package/dist/components/homepage/TrustedByBanner.d.ts +0 -2
  123. package/dist/components/homepage/TrustedByBanner.js +0 -32
  124. package/dist/components/homepage/VideoApps.d.ts +0 -4
  125. package/dist/components/homepage/VideoApps.js +0 -72
  126. package/dist/components/homepage/VideoAppsShowcase.d.ts +0 -3
  127. package/dist/components/homepage/VideoAppsShowcase.js +0 -163
  128. package/dist/components/homepage/VideoAppsTitle.d.ts +0 -4
  129. package/dist/components/homepage/VideoAppsTitle.js +0 -4
  130. package/dist/components/homepage/VideoPlayerWithControls.d.ts +0 -20
  131. package/dist/components/homepage/VideoPlayerWithControls.js +0 -104
  132. package/dist/components/homepage/WriteInReact.d.ts +0 -2
  133. package/dist/components/homepage/WriteInReact.js +0 -10
  134. package/dist/components/homepage/YouAreHere.d.ts +0 -2
  135. package/dist/components/homepage/YouAreHere.js +0 -23
  136. package/dist/components/homepage/layout/Button.d.ts +0 -19
  137. package/dist/components/homepage/layout/Button.js +0 -29
  138. package/dist/components/homepage/layout/colors.d.ts +0 -13
  139. package/dist/components/homepage/layout/colors.js +0 -14
  140. package/dist/components/homepage/layout/use-color-mode.d.ts +0 -21
  141. package/dist/components/homepage/layout/use-color-mode.js +0 -22
  142. package/dist/components/homepage/layout/use-el-size.d.ts +0 -5
  143. package/dist/components/homepage/layout/use-el-size.js +0 -40
  144. package/dist/components/homepage/layout/use-mobile-layout.d.ts +0 -1
  145. package/dist/components/homepage/layout/use-mobile-layout.js +0 -6
  146. package/dist/components/icons/blank.d.ts +0 -3
  147. package/dist/components/icons/blank.js +0 -4
  148. package/dist/components/icons/clone.d.ts +0 -2
  149. package/dist/components/icons/clone.js +0 -2
  150. package/dist/components/icons/code-hike.d.ts +0 -3
  151. package/dist/components/icons/code-hike.js +0 -4
  152. package/dist/components/icons/cubes.d.ts +0 -3
  153. package/dist/components/icons/cubes.js +0 -4
  154. package/dist/components/icons/js.d.ts +0 -3
  155. package/dist/components/icons/js.js +0 -4
  156. package/dist/components/icons/music.d.ts +0 -2
  157. package/dist/components/icons/music.js +0 -4
  158. package/dist/components/icons/next.d.ts +0 -4
  159. package/dist/components/icons/next.js +0 -4
  160. package/dist/components/icons/overlay.d.ts +0 -3
  161. package/dist/components/icons/overlay.js +0 -4
  162. package/dist/components/icons/recorder.d.ts +0 -3
  163. package/dist/components/icons/recorder.js +0 -4
  164. package/dist/components/icons/remix.d.ts +0 -3
  165. package/dist/components/icons/remix.js +0 -4
  166. package/dist/components/icons/skia.d.ts +0 -3
  167. package/dist/components/icons/skia.js +0 -4
  168. package/dist/components/icons/stargazer.d.ts +0 -3
  169. package/dist/components/icons/stargazer.js +0 -4
  170. package/dist/components/icons/still.d.ts +0 -3
  171. package/dist/components/icons/still.js +0 -4
  172. package/dist/components/icons/tailwind.d.ts +0 -3
  173. package/dist/components/icons/tailwind.js +0 -4
  174. package/dist/components/icons/tiktok.d.ts +0 -3
  175. package/dist/components/icons/tiktok.js +0 -4
  176. package/dist/components/icons/ts.d.ts +0 -3
  177. package/dist/components/icons/ts.js +0 -4
  178. package/dist/components/icons/tts.d.ts +0 -3
  179. package/dist/components/icons/tts.js +0 -4
  180. package/dist/components/icons/undo.d.ts +0 -3
  181. package/dist/components/icons/undo.js +0 -2
  182. package/dist/components/icons/waveform.d.ts +0 -3
  183. package/dist/components/icons/waveform.js +0 -4
  184. package/dist/main.d.ts +0 -1
  185. package/dist/main.js +0 -6
@@ -1,95 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import React, { useCallback } from 'react';
3
- import { z } from 'zod';
4
- import { PALETTE } from '../layout/colors';
5
- import { DemoErrorIcon } from './DemoErrorIcon';
6
- import { DoneCheckmark } from './DoneCheckmark';
7
- import { Progress } from './Progress';
8
- import { Spinner } from './Spinner';
9
- const countryPath = z.object({
10
- d: z.string(),
11
- class: z.string(),
12
- });
13
- const remoteData = z.object({
14
- repos: z.array(z.string()),
15
- date: z.string().or(z.number()),
16
- temperatureInCelsius: z.number(),
17
- countryLabel: z.string(),
18
- countryPaths: z.array(countryPath),
19
- });
20
- const location = z.object({
21
- country: z.string(),
22
- city: z.string(),
23
- latitude: z.number().or(z.string()),
24
- longitude: z.number().or(z.string()),
25
- });
26
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
27
- const data = z.object({
28
- trending: remoteData,
29
- location,
30
- emojiIndex: z.number(),
31
- theme: z.enum(['light', 'dark']),
32
- cardOrder: z.array(z.number()),
33
- });
34
- const style = {
35
- appearance: 'none',
36
- border: 'none',
37
- outline: 'none',
38
- backgroundColor: 'transparent',
39
- cursor: 'pointer',
40
- width: 55,
41
- height: 50,
42
- display: 'flex',
43
- alignItems: 'center',
44
- justifyContent: 'center',
45
- };
46
- export const RenderButton = ({ renderData, onError }) => {
47
- const [state, setState] = React.useState({
48
- type: 'idle',
49
- });
50
- const triggerRender = useCallback(async () => {
51
- if (renderData === null) {
52
- return;
53
- }
54
- try {
55
- setState({ type: 'invoking' });
56
- const { renderId, bucketName } = await (await fetch('https://bugs.remotion.dev/render', {
57
- method: 'post',
58
- headers: { 'content-type': 'application/json' },
59
- body: JSON.stringify(renderData),
60
- })).json();
61
- setState({ type: 'progress', progress: 0 });
62
- let done = false;
63
- while (!done) {
64
- const progress = (await (await fetch('https://bugs.remotion.dev/progress', {
65
- method: 'post',
66
- headers: { 'content-type': 'application/json' },
67
- body: JSON.stringify({ renderId, bucketName }),
68
- })).json());
69
- setState({
70
- type: 'progress',
71
- progress: progress.overallProgress,
72
- });
73
- if (progress.outputFile) {
74
- done = true;
75
- const a = document.createElement('a');
76
- a.href = progress.outputFile;
77
- a.download = 'remotion.dev.mp4';
78
- a.click();
79
- setState({ type: 'done' });
80
- }
81
- if (progress.fatalErrorEncountered) {
82
- done = true;
83
- }
84
- }
85
- }
86
- catch (_a) {
87
- setState({ type: 'error' });
88
- onError();
89
- }
90
- }, [onError, renderData]);
91
- return (_jsx("button", { type: "button", onClick: triggerRender, style: style, disabled: !renderData || state.type !== 'idle', children: state.type === 'error' ? (_jsx(DemoErrorIcon, {})) : state.type === 'done' ? (_jsx(DoneCheckmark, {})) : state.type === 'progress' ? (_jsx(Progress, { progress: state.progress })) : state.type === 'invoking' ? (_jsx(Spinner, { size: 20, duration: 1 })) : (_jsx("svg", { style: {
92
- width: 18,
93
- opacity: renderData ? 1 : 0.5,
94
- }, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 384 512", children: _jsx("path", { fill: PALETTE.TEXT_COLOR, d: "M214.6 342.6L192 365.3l-22.6-22.6-128-128L18.7 192 64 146.7l22.6 22.6L160 242.7 160 64l0-32 64 0 0 32 0 178.7 73.4-73.4L320 146.7 365.3 192l-22.6 22.6-128 128zM32 416l320 0 32 0 0 64-32 0L32 480 0 480l0-64 32 0z" }) })) }));
95
- };
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- export declare const NUM_WIDTH = 36;
3
- export declare const Wheel: React.FC<{
4
- readonly delay: number;
5
- readonly digits: number[];
6
- readonly renderDigit: (i: number) => React.ReactNode;
7
- readonly isLeadingDigit: boolean;
8
- readonly isNegative: boolean[];
9
- }>;
@@ -1,94 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { AbsoluteFill, interpolate, spring, useCurrentFrame, useVideoConfig, } from 'remotion';
3
- import { Minus } from './Minus';
4
- const DURATION = 25;
5
- const items = 10;
6
- export const NUM_WIDTH = 36;
7
- export const Wheel = ({ delay, digits, renderDigit, isLeadingDigit, isNegative }) => {
8
- const frame = useCurrentFrame();
9
- const { fps } = useVideoConfig();
10
- const singleDur = DURATION;
11
- const progressesMaker = (springConfig, durationInFrames) => new Array(digits.length - 1).fill(true).map((_, i) => {
12
- const current = digits[i];
13
- const next = digits[i + 1];
14
- if (current === next) {
15
- return 1;
16
- }
17
- return spring({
18
- fps,
19
- frame,
20
- config: springConfig,
21
- durationInFrames,
22
- delay: i * 50 + delay,
23
- });
24
- });
25
- const progresses = progressesMaker({
26
- mass: 0.7,
27
- damping: 12,
28
- }, singleDur);
29
- const softProgresses = progressesMaker({
30
- damping: 200,
31
- }, singleDur / 2);
32
- const rotations = digits.map((d) => 1 / items + d / 10);
33
- const offsets = rotations.map((r, i) => {
34
- const next = rotations[i + 1];
35
- if (next === undefined) {
36
- return 0;
37
- }
38
- return next - r;
39
- });
40
- const opacity = isLeadingDigit
41
- ? interpolate(softProgresses.reduce((a, b) => a + b, 0), new Array(digits.length).fill(true).map((_, i) => i), digits.map((digit) => (digit === 0 ? 0 : 1)))
42
- : 1;
43
- const minusSignOpacity = isLeadingDigit
44
- ? interpolate(softProgresses.reduce((a, b) => a + b, 0), new Array(digits.length).fill(true).map((_, i) => i), isNegative.map((negative) => (negative ? 1 : 0)))
45
- : 1;
46
- const minusSignMarginLeft = interpolate(minusSignOpacity, [0, 1], [10, 0]);
47
- const shiftLeft = isLeadingDigit
48
- ? interpolate(softProgresses.reduce((a, b) => a + b, 0), new Array(digits.length).fill(true).map((_, i) => i), digits.map((digit) => (digit === 0 ? -40 : 0)))
49
- : 1;
50
- const rotation = progresses
51
- .map((p, i) => {
52
- return p * offsets[i];
53
- })
54
- .reduce((a, b) => a + b, 0) + rotations[0];
55
- return (_jsxs("div", { style: {
56
- position: 'relative',
57
- width: NUM_WIDTH,
58
- display: 'inline-block',
59
- height: 80,
60
- marginLeft: shiftLeft,
61
- }, children: [isLeadingDigit ? (_jsx(Minus, { minusSignOpacity: minusSignOpacity, leftOffset: shiftLeft + minusSignMarginLeft })) : null, _jsx(AbsoluteFill, { style: {
62
- perspective: 5000,
63
- maskImage: `linear-gradient(to bottom, transparent 0%, #000 28%, #000 80%, transparent 100%)`,
64
- WebkitMaskImage: `linear-gradient(to bottom, transparent 0%, #000 28%, #000 80%, transparent 100%)`,
65
- }, children: new Array(items).fill(true).map((_, i) => {
66
- const index = i / items + rotation;
67
- const z = Math.cos(index * -Math.PI * 2) * 120;
68
- const y = Math.sin(index * Math.PI * 2) * -120;
69
- const r = interpolate(index, [0, 1], [0, Math.PI * 2]);
70
- return (_jsx(AbsoluteFill
71
- // eslint-disable-next-line react/no-array-index-key
72
- , { style: {
73
- justifyContent: 'center',
74
- alignItems: 'center',
75
- fontSize: 60,
76
- fontVariationSettings: `"wght" 400`,
77
- transform: `translateZ(${z}px) translateY(${y}px) rotateX(${r}deg)`,
78
- backfaceVisibility: 'hidden',
79
- perspective: 1000,
80
- }, children: _jsx("div", { style: {
81
- transform: `rotateX(-${r}rad)`,
82
- backfaceVisibility: 'hidden',
83
- display: 'flex',
84
- flexDirection: 'row',
85
- alignItems: 'center',
86
- justifyContent: 'center',
87
- opacity,
88
- }, children: _jsx("div", { style: {
89
- lineHeight: 1,
90
- display: 'inline',
91
- fontFeatureSettings: "'ss03' on",
92
- }, children: renderDigit(i) }) }) }, i));
93
- }) })] }));
94
- };
@@ -1,5 +0,0 @@
1
- import type { EmojiName } from '@remotion/animated-emoji';
2
- import React from 'react';
3
- export declare const DisplayedEmoji: React.FC<{
4
- readonly emoji: EmojiName;
5
- }>;
@@ -1,63 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEffect, useMemo, useState } from 'react';
3
- import { cancelRender, continueRender, delayRender, useVideoConfig, } from 'remotion';
4
- export const DisplayedEmoji = ({ emoji }) => {
5
- const [data, setData] = useState(null);
6
- const { durationInFrames, fps } = useVideoConfig();
7
- const [browser, setBrowser] = useState(typeof document !== 'undefined');
8
- const src = useMemo(() => {
9
- if (emoji === 'melting') {
10
- return 'https://fonts.gstatic.com/s/e/notoemoji/latest/1fae0/lottie.json';
11
- }
12
- if (emoji === 'partying-face') {
13
- return 'https://fonts.gstatic.com/s/e/notoemoji/latest/1f973/lottie.json';
14
- }
15
- if (emoji === 'fire') {
16
- return 'https://fonts.gstatic.com/s/e/notoemoji/latest/1f525/lottie.json';
17
- }
18
- throw new Error('Unknown emoji');
19
- }, [emoji]);
20
- const [handle] = useState(() => delayRender());
21
- useEffect(() => {
22
- Promise.all([
23
- fetch(src).then((res) => res.json()),
24
- import('@remotion/lottie').then(({ Lottie, getLottieMetadata }) => ({
25
- Lottie,
26
- getLottieMetadata,
27
- })),
28
- ])
29
- .then(([json, { Lottie, getLottieMetadata }]) => {
30
- var _a;
31
- setData({
32
- Lottie,
33
- duration: (_a = getLottieMetadata(json)) === null || _a === void 0 ? void 0 : _a.durationInSeconds,
34
- data: json,
35
- });
36
- continueRender(handle);
37
- })
38
- .catch((err) => {
39
- cancelRender(err);
40
- });
41
- }, [handle, src]);
42
- useEffect(() => {
43
- if (typeof document !== 'undefined') {
44
- setBrowser(true);
45
- }
46
- }, []);
47
- if (!browser) {
48
- return null;
49
- }
50
- if (!data) {
51
- return null;
52
- }
53
- const animDurtion = data.duration;
54
- const ratio = durationInFrames / fps / animDurtion;
55
- const closestInteger = ratio;
56
- const closestRatio = closestInteger / ratio;
57
- return (_jsx(data.Lottie, { style: {
58
- height: 100,
59
- width: '100%',
60
- display: 'flex',
61
- justifyContent: 'center',
62
- }, loop: true, animationData: data.data, playbackRate: closestRatio }));
63
- };
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const DoneCheckmark: React.FC;
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { PALETTE } from '../layout/colors';
3
- export const DoneCheckmark = () => {
4
- return (_jsx("div", { style: {
5
- backgroundColor: PALETTE.BRAND,
6
- height: 26,
7
- width: 26,
8
- borderRadius: 13,
9
- display: 'flex',
10
- alignItems: 'center',
11
- justifyContent: 'center',
12
- animation: 'jump 0.2s ease-out',
13
- }, children: _jsxs("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: {
14
- flexShrink: 0,
15
- width: 26,
16
- }, children: [_jsx("circle", { cx: "10", cy: "10", r: "10", fill: "#0B84F3" }), _jsx("path", { 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", fill: "white", style: {
17
- transform: 'scale(1.2)',
18
- transformOrigin: 'center',
19
- } })] }) }));
20
- };
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const DownloadNudge: React.FC;
@@ -1,27 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { FONTS } from '../layout/colors';
3
- const origWidth = 77;
4
- const scale = 0.4;
5
- const Icon = () => {
6
- return (_jsx("svg", { style: {
7
- width: origWidth * scale,
8
- }, viewBox: "0 0 77 160", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M5 154.5C51 121 79 81 69 5", stroke: "currentColor", strokeWidth: "8", strokeLinecap: "round" }) }));
9
- };
10
- export const DownloadNudge = () => {
11
- return (_jsx("div", { style: {
12
- position: 'relative',
13
- flexDirection: 'row',
14
- display: 'flex',
15
- justifyContent: 'flex-end',
16
- textAlign: 'right',
17
- paddingRight: 22,
18
- paddingTop: 20,
19
- }, children: _jsxs("div", { children: [_jsx(Icon, {}), _jsxs("div", { style: {
20
- fontFamily: FONTS.GTPLANAR,
21
- fontSize: 15,
22
- width: 280,
23
- position: 'absolute',
24
- right: 70,
25
- top: 60,
26
- }, children: ["Export the video using", _jsx("br", {}), ' ', _jsx("a", { href: "/lambda", className: "bluelink", children: "Remotion Lambda" }), "."] })] }) }));
27
- };
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const Icon: React.FC;
3
- export declare const DragAndDropNudge: React.FC;
@@ -1,26 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { FONTS, PALETTE } from '../layout/colors';
3
- const origWidth = 37;
4
- const scale = 0.4;
5
- export const Icon = () => {
6
- return (_jsx("svg", { style: {
7
- width: origWidth * scale,
8
- overflow: 'visible',
9
- }, viewBox: "0 0 37 59", fill: "none", children: _jsx("path", { d: "M5.00003 5C5.00002 36.5 16 44 32.0002 54", stroke: PALETTE.TEXT_COLOR, strokeWidth: "8", strokeLinecap: "round" }) }));
10
- };
11
- export const DragAndDropNudge = () => {
12
- return (_jsx("div", { style: {
13
- position: 'absolute',
14
- flexDirection: 'row',
15
- display: 'flex',
16
- justifyContent: 'flex-start',
17
- paddingBottom: 5,
18
- marginTop: 50,
19
- }, className: 'ml-4 lg:-ml-5', children: _jsxs("div", { children: [_jsx("div", { style: {
20
- fontFamily: FONTS.GTPLANAR,
21
- fontSize: 15,
22
- width: 280,
23
- paddingBottom: 8,
24
- textWrap: 'balance',
25
- }, className: '-ml-3 lg:-ml-5', children: "Drag and drop the cards to reorder them." }), _jsx(Icon, {})] }) }));
26
- };
@@ -1,10 +0,0 @@
1
- import type { EmojiName } from '@remotion/animated-emoji';
2
- import React from 'react';
3
- export type EmojiCardRef = {
4
- onLeft: () => void;
5
- onRight: () => void;
6
- };
7
- export type EmojiCardProps = {
8
- readonly emojiIndex: EmojiName;
9
- };
10
- export declare const EmojiCard: React.ForwardRefExoticComponent<EmojiCardProps & React.RefAttributes<EmojiCardRef>>;
@@ -1,119 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, } from 'react';
3
- import { AbsoluteFill, getRemotionEnvironment } from 'remotion';
4
- import { DisplayedEmoji } from './DisplayedEmoji';
5
- const applyTransforms = ({ ref1, ref2, ref3, transforms }) => {
6
- ref1.style.transform = `translateX(${transforms[0]}%)`;
7
- ref2.style.transform = `translateX(${transforms[1]}%)`;
8
- ref3.style.transform = `translateX(${transforms[2]}%)`;
9
- };
10
- const waitForRaq = async () => {
11
- await new Promise((resolve) => {
12
- requestAnimationFrame(resolve);
13
- });
14
- };
15
- const moveLeft = async ({ ref1, ref2, ref3, transforms }) => {
16
- for (let i = 0; i < 20; i++) {
17
- for (const idx in transforms) {
18
- transforms[idx] -= 5;
19
- if (transforms[idx] <= -200) {
20
- transforms[idx] += 300;
21
- }
22
- }
23
- applyTransforms({ ref1, ref2, ref3, transforms });
24
- await waitForRaq();
25
- }
26
- };
27
- const moveRight = async ({ ref1, ref2, ref3, transforms }) => {
28
- for (let i = 0; i < 20; i++) {
29
- for (const idx in transforms) {
30
- transforms[idx] += 5;
31
- if (transforms[idx] >= 100) {
32
- transforms[idx] -= 300;
33
- }
34
- }
35
- applyTransforms({ ref1, ref2, ref3, transforms });
36
- await waitForRaq();
37
- }
38
- };
39
- const emojiStyle = {
40
- width: '100%',
41
- position: 'absolute',
42
- top: 'calc(50% - 50px)',
43
- };
44
- const EmojiCardRefFn = ({ emojiIndex }, ref) => {
45
- const ref1 = useRef(null);
46
- const ref2 = useRef(null);
47
- const ref3 = useRef(null);
48
- const transforms = useRef([-100, 0, 100]);
49
- const onLeft = useCallback(() => {
50
- if (!ref1.current || !ref2.current || !ref3.current) {
51
- return;
52
- }
53
- moveLeft({
54
- ref1: ref1.current,
55
- ref2: ref2.current,
56
- ref3: ref3.current,
57
- transforms: transforms.current,
58
- });
59
- }, []);
60
- const onRight = useCallback(() => {
61
- if (!ref1.current || !ref2.current || !ref3.current) {
62
- return;
63
- }
64
- moveRight({
65
- ref1: ref1.current,
66
- ref2: ref2.current,
67
- ref3: ref3.current,
68
- transforms: transforms.current,
69
- });
70
- }, []);
71
- useEffect(() => {
72
- if (!ref1.current || !ref2.current || !ref3.current) {
73
- return;
74
- }
75
- applyTransforms({
76
- ref1: ref1.current,
77
- ref2: ref2.current,
78
- ref3: ref3.current,
79
- transforms: transforms.current,
80
- });
81
- }, []);
82
- useImperativeHandle(ref, () => {
83
- return {
84
- onLeft,
85
- onRight,
86
- };
87
- }, [onLeft, onRight]);
88
- useEffect(() => {
89
- if (!ref1.current || !ref2.current || !ref3.current) {
90
- return;
91
- }
92
- applyTransforms({
93
- ref1: ref1.current,
94
- ref2: ref2.current,
95
- ref3: ref3.current,
96
- transforms: transforms.current,
97
- });
98
- }, []);
99
- return (_jsxs(AbsoluteFill, { style: {
100
- justifyContent: 'center',
101
- alignItems: 'center',
102
- overflow: 'hidden',
103
- }, children: [_jsx("div", { style: {
104
- color: '#0b84f3',
105
- fontFamily: 'GTPlanar',
106
- fontWeight: '500',
107
- fontSize: 13,
108
- textAlign: 'center',
109
- position: 'absolute',
110
- marginTop: -90,
111
- }, children: "Choose an emoji" }), _jsx("div", { style: {
112
- position: 'absolute',
113
- width: '100%',
114
- display: 'flex',
115
- whiteSpace: 'nowrap',
116
- height: '100%',
117
- }, children: getRemotionEnvironment().isRendering ? (_jsx("div", { style: emojiStyle, children: _jsx(DisplayedEmoji, { emoji: emojiIndex }) })) : (_jsxs(_Fragment, { children: [_jsx("div", { ref: ref1, style: emojiStyle, children: _jsx(DisplayedEmoji, { emoji: 'melting' }) }), _jsx("div", { ref: ref2, style: emojiStyle, children: _jsx(DisplayedEmoji, { emoji: 'partying-face' }) }), _jsx("div", { ref: ref3, style: emojiStyle, children: _jsx(DisplayedEmoji, { emoji: 'fire' }) })] })) })] }));
118
- };
119
- export const EmojiCard = forwardRef(EmojiCardRefFn);
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- export declare const Minus: React.FC<{
3
- readonly leftOffset: number;
4
- readonly minusSignOpacity: number;
5
- }>;
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- export const Minus = ({ leftOffset, minusSignOpacity }) => {
3
- return (_jsx("div", { style: {
4
- position: 'relative',
5
- marginLeft: -40 - leftOffset,
6
- marginTop: 5,
7
- width: 40,
8
- opacity: minusSignOpacity,
9
- textAlign: 'right',
10
- }, children: "-" }));
11
- };
@@ -1,5 +0,0 @@
1
- import type { PlayerRef } from '@remotion/player';
2
- import React from 'react';
3
- export declare const PlayPauseButton: React.FC<{
4
- readonly playerRef: React.RefObject<PlayerRef | null>;
5
- }>;
@@ -1,47 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import React, { useCallback, useEffect } from 'react';
3
- import { PALETTE } from '../layout/colors';
4
- import { PausedIcon, PlayingIcon } from './icons';
5
- const playerButtonStyle = {
6
- appearance: 'none',
7
- border: 'none',
8
- borderRadius: 0,
9
- background: 'none',
10
- display: 'flex',
11
- justifyContent: 'center',
12
- alignItems: 'center',
13
- paddingRight: 20,
14
- paddingLeft: 20,
15
- cursor: 'pointer',
16
- height: 50,
17
- color: PALETTE.TEXT_COLOR,
18
- };
19
- export const PlayPauseButton = ({ playerRef }) => {
20
- const [playing, setPlaying] = React.useState(true);
21
- useEffect(() => {
22
- const { current } = playerRef;
23
- if (!current) {
24
- return;
25
- }
26
- const onPlay = () => {
27
- setPlaying(true);
28
- };
29
- const onPause = () => {
30
- setPlaying(false);
31
- };
32
- current.addEventListener('play', onPlay);
33
- current.addEventListener('pause', onPause);
34
- return () => {
35
- current.removeEventListener('play', onPlay);
36
- current.removeEventListener('pause', onPause);
37
- };
38
- }, [playerRef]);
39
- const onToggle = useCallback(() => {
40
- var _a;
41
- (_a = playerRef.current) === null || _a === void 0 ? void 0 : _a.toggle();
42
- }, [playerRef]);
43
- const playPauseIconStyle = {
44
- width: 15,
45
- };
46
- return (_jsx("button", { type: "button", style: playerButtonStyle, onClick: onToggle, children: playing ? (_jsx(PlayingIcon, { style: playPauseIconStyle })) : (_jsx(PausedIcon, { style: playPauseIconStyle })) }));
47
- };
@@ -1,8 +0,0 @@
1
- import type { PlayerRef } from '@remotion/player';
2
- import React from 'react';
3
- export declare const PlayerControls: React.FC<{
4
- readonly playerRef: React.RefObject<PlayerRef | null>;
5
- readonly durationInFrames: number;
6
- readonly fps: number;
7
- readonly children: React.ReactNode;
8
- }>;
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { PALETTE } from '../layout/colors';
3
- import { PlayerSeekBar } from './PlayerSeekBar';
4
- import { PlayerVolume } from './PlayerVolume';
5
- import { PlayPauseButton } from './PlayPauseButton';
6
- import { TimeDisplay } from './TimeDisplay';
7
- const Separator = () => {
8
- return (_jsx("div", { style: {
9
- borderRight: `2px solid ${PALETTE.BOX_STROKE}`,
10
- height: 50,
11
- } }));
12
- };
13
- export const PlayerControls = ({ playerRef, durationInFrames, fps, children }) => {
14
- return (_jsxs("div", { className: 'flex flex-row items-center bg-pane', children: [_jsx(PlayPauseButton, { playerRef: playerRef }), _jsx(Separator, {}), _jsx(PlayerVolume, { playerRef: playerRef }), _jsx(Separator, {}), _jsx("div", { style: { width: 15 } }), _jsx(TimeDisplay, { playerRef: playerRef, fps: fps }), _jsx("div", { style: { width: 15 } }), _jsx(PlayerSeekBar, { durationInFrames: durationInFrames, playerRef: playerRef, inFrame: null, outFrame: null, onSeekEnd: () => undefined, onSeekStart: () => undefined }), _jsx("div", { style: { width: 20 } }), _jsx(Separator, {}), children] }));
15
- };
@@ -1,11 +0,0 @@
1
- import type { PlayerRef } from '@remotion/player';
2
- import React from 'react';
3
- export declare const useHoverState: (ref: React.RefObject<HTMLDivElement | null>, hideControlsWhenPointerDoesntMove: boolean | number) => boolean;
4
- export declare const PlayerSeekBar: React.FC<{
5
- readonly durationInFrames: number;
6
- readonly onSeekStart: () => void;
7
- readonly onSeekEnd: () => void;
8
- readonly inFrame: number | null;
9
- readonly outFrame: number | null;
10
- readonly playerRef: React.RefObject<PlayerRef | null>;
11
- }>;