🎥 Make videos programmatically with React
Revert "Revert "start new landing page""
Jonny Burger3b8be37a96be
diff --git a/packages/docs/.npmrc b/packages/docs/.npmrcnew file mode 100644index 0000000000..521a9f7c07--- /dev/null+++ b/packages/docs/.npmrc@@ -0,0 +1 @@+legacy-peer-deps=truediff --git a/packages/docs/components/LandingPage/CodeExample.tsx b/packages/docs/components/LandingPage/CodeExample.tsxnew file mode 100644index 0000000000..6c0e00425e--- /dev/null+++ b/packages/docs/components/LandingPage/CodeExample.tsx@@ -0,0 +1,86 @@+import { Player } from "@remotion/player";+import React, { useState } from "react";+import { interpolate, useCurrentFrame } from "remotion";+import styled from "styled-components";++const IMG_WIDTH = 1120;+const IMG_HEIGHT = 760;+const ASPECT = IMG_WIDTH / IMG_HEIGHT;++const Demo: React.FC = () => {+ const frame = useCurrentFrame();+ const scale = interpolate(frame, [0, 10, 40, 49], [0, 1, 1, 0]);+ return (+ <div+ style={{+ display: "flex",+ justifyContent: "center",+ alignItems: "center",+ flex: 1,+ backgroundColor: "black",+ }}+ >+ <img+ style={{ transform: `scale(${scale})` }}+ src="http://localhost:3000/img/logo-small.png"+ />+ </div>+ );+};++const container = {+ width: 500,+ height: (1 / ASPECT) * 500,+ position: "relative" as const,+};++const Preview: React.FC = () => {+ return (+ <Player+ component={Demo}+ compositionHeight={IMG_HEIGHT}+ compositionWidth={IMG_WIDTH}+ durationInFrames={50}+ style={container}+ controls+ fps={30}+ ></Player>+ );+};++const Tab = styled.button<{+ active: boolean;+}>`+ appearance: none;+ background-color: transparent;+ font-family: inherit;+ border: none;+ cursor: pointer;+ color: var(--text-color);+ opacity: ${(props) => (props.active ? 1 : 0.5)};+`;++type Tab = "code" | "preview";++export const CodeExample: React.FC = () => {+ const [tab, setTab] = useState<Tab>("code");+ return (+ <div style={{ flex: 1, textAlign: "left", width: 500 }}>+ <Tab active={tab === "code"} onClick={() => setTab("code")}>+ Code+ </Tab>+ |+ <Tab active={tab === "preview"} onClick={() => setTab("preview")}>+ Preview+ </Tab>+ <div>+ {tab === "code" && (+ <div style={container}>+ <img src="/img/code-sample.png"></img>+ </div>+ )}+ {tab === "preview" && <Preview></Preview>}+ </div>+ </div>+ );+};diff --git a/packages/docs/components/LandingPage/FreePricing.tsx b/packages/docs/components/LandingPage/FreePricing.tsxnew file mode 100644index 0000000000..9c5e5d0c26--- /dev/null+++ b/packages/docs/components/LandingPage/FreePricing.tsx@@ -0,0 +1,53 @@+import React from "react";+import styled from "styled-components";+import { mobile } from "../layout/layout";+import { PricingTable } from "./PricingTable";++const Row = styled.div`+ display: flex;+ flex-direction: row;+ text-align: center;+`;++const Title = styled.h2`+ font-size: 2.5em;+ font-weight: 700;+ font-family: --apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,+ Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;+ line-height: 1.1;+`;++const Mp4 = styled.span`+ background: linear-gradient(to right, rgb(66, 144, 245), rgb(66, 233, 245));+ -webkit-text-fill-color: transparent;+ -webkit-background-clip: text;+`;++const Container = styled.div`+ text-align: center;+ ${mobile`+ text-align: left;+ `}+`;++export const FreePricing: React.FC = () => {+ return (+ <>+ <Container>+ <Title>+ <Mp4>Free</Mp4> for individuals <br /> Funded by companies+ </Title>+ <p>+ Remotion is free for individuals - you can even build a business on+ it! <br />+ As a company, you need a license to use Remotion. <br /> With your+ support, we constantly improve Remotion for everyone.+ </p>+ </Container>+ <PricingTable></PricingTable>+ <br />+ <br />+ <br />+ </>+ );+};diff --git a/packages/docs/components/LandingPage/GetStartedStrip.tsx b/packages/docs/components/LandingPage/GetStartedStrip.tsxnew file mode 100644index 0000000000..e68a946bd7--- /dev/null+++ b/packages/docs/components/LandingPage/GetStartedStrip.tsx@@ -0,0 +1,97 @@+import React, { useState } from "react";+import styled, { keyframes } from "styled-components";+import { BlueButton } from "../layout/Button";+import { GithubButton } from "./GithubButton";++const Row = styled.div`+ display: flex;+ flex-direction: row;+ align-items: center;+`;++const CodeBlock = styled.div`+ background-color: #333;+ padding: 12px 16px;+ border-radius: 8px;+ color: white;+ font: var(--ifm-code-font-size) / var(--ifm-pre-line-height)+ var(--ifm-font-family-monospace);+ cursor: pointer;+ &:hover {+ background-color: #444;+ }+`;++const A = styled.a`+ &:hover {+ text-decoration: none;+ }+`;++const animation = keyframes`+ 0% {+ transform: translateY(-18px);+ opacity: 0;+ }++ 30% {+ opacity: 0.7;+ }+ 70% {+ opacity: 0.7;+ }+ 100% {+ transform: translateY(-23px);+ opacity: 0;+ }+`;++const Copied = styled.div`+ position: absolute;+ animation: ${animation} 0.7s linear;+ z-index: 0;+ animation-fill-mode: forwards;+ top: 0;+ font: var(--ifm-code-font-size) / var(--ifm-pre-line-height)+ var(--ifm-font-family-monospace);+ font-size: 13px;+ width: 100%;+ text-align: center;+`;++export const GetStarted: React.FC = () => {+ const [clicked, setClicked] = useState<number | null>(null);+ return (+ <>+ <Row>+ <div style={{ position: "relative" }}>+ {clicked ? <Copied key={clicked}>Copied!</Copied> : null}+ <CodeBlock+ onClick={() => {+ navigator.clipboard.writeText("npm init video");++ setClicked(Date.now());+ }}+ title="Click to copy"+ >+ $ npm init video+ </CodeBlock>+ </div>+ <div style={{ width: 10 }}></div>+ <A href="/docs">+ <BlueButton size="sm" loading={false} fullWidth={false}>+ Docs+ </BlueButton>+ </A>+ <div style={{ width: 10 }}></div>+ <A href="https://github.com/JonnyBurger/remotion">+ <BlueButton size="sm" loading={false} fullWidth={false}>+ <GithubButton></GithubButton>+ </BlueButton>+ </A>+ </Row>+ <div style={{ height: 10 }}></div>+ <Row></Row>+ </>+ );+};diff --git a/packages/docs/components/LandingPage/GithubButton.tsx b/packages/docs/components/LandingPage/GithubButton.tsxnew file mode 100644index 0000000000..ab120f0468--- /dev/null+++ b/packages/docs/components/LandingPage/GithubButton.tsx@@ -0,0 +1,50 @@+import React, { useEffect, useState } from "react";+import styled from "styled-components";++const Container = styled.div`+ display: flex;+ flex-direction: row;+ font-weight: bold;+ justify-content: center;+ align-items: center;+`;++const Stars = styled.div`+ font-size: 0.75em;+ margin-top: 2.5px;+`;++const GithubIcon: React.FC = () => {+ return (+ <svg viewBox="0 0 496 512" style={{ height: 24, marginRight: 8 }}>+ <path+ fill="currentColor"+ d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"+ ></path>+ </svg>+ );+};++export const GithubButton: React.FC = () => {+ const [stars, setStars] = useState(null);++ useEffect(() => {+ fetch(`https://api.github.com/repos/JonnyBurger/remotion`)+ .then((res) => res.json())+ .then((json) => json.watchers)+ .then((stars) => {+ setStars(stars);+ })+ .catch((err) => {+ console.log(err);+ setStars(null);+ });+ }, []);++ return (+ <Container>+ <GithubIcon></GithubIcon> <div>Github</div>{" "}+ <div style={{ width: 8 }}></div> <Stars>{stars ? stars : null}</Stars>+ </Container>+ );+};diff --git a/packages/docs/components/LandingPage/GithubDemo.tsx b/packages/docs/components/LandingPage/GithubDemo.tsxnew file mode 100644index 0000000000..68cb379bd0--- /dev/null+++ b/packages/docs/components/LandingPage/GithubDemo.tsx@@ -0,0 +1,97 @@+import React from "react";+import {+ AbsoluteFill,+ Img,+ interpolate,+ measureSpring,+ spring,+ useCurrentFrame,+ useVideoConfig,+} from "remotion";+import styled from "styled-components";++const Title = styled.h1`+ font-size: 5em;+ color: var(--text-color);+ margin-bottom: 0;+ margin-top: 0;+ line-height: 1.4;+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,+ Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;+`;++const Description = styled.p`+ font-size: 3em;+ margin-bottom: 0;+ margin-top: 0;+ line-height: 1.4;+ color: var(--text-color);++ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,+ Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;+`;++export type GithubResponse = {+ login: string;+ avatar_url: string;+ followers: number;+};+export const GithubDemo: React.FC<{+ data: GithubResponse | null;+}> = ({ data }) => {+ const frame = useCurrentFrame();+ const { fps } = useVideoConfig();+ const progress = spring({+ frame,+ fps,+ config: {+ damping: 200,+ },+ });++ const springDur = measureSpring({ fps, config: { damping: 200 } });++ const titleTranslation = interpolate(progress, [0, 1], [700, 0]);+ const subtitleOpacity = interpolate(+ frame,+ [springDur + 15, springDur + 40],+ [0, 1]+ );++ if (!data) {+ return null;+ }++ return (+ <AbsoluteFill+ style={{+ backgroundColor: "var(--ifm-background-color)",+ justifyContent: "center",+ alignItems: "center",+ }}+ >+ <div+ style={{ display: "flex", flexDirection: "row", alignItems: "center" }}+ >+ <Img+ src={data.avatar_url}+ style={{+ borderRadius: 150,+ height: 300,+ width: 300,+ transform: `scale(${progress})`,+ }}+ />+ <div style={{ width: 60 }} />+ <div>+ <Title style={{ transform: `translateY(${titleTranslation}px)` }}>+ Hi {data.login}!+ </Title>+ <Description style={{ opacity: subtitleOpacity }}>+ You have {data.followers} followers.+ </Description>+ </div>+ </div>+ </AbsoluteFill>+ );+};diff --git a/packages/docs/components/LandingPage/PlayerPreview.tsx b/packages/docs/components/LandingPage/PlayerPreview.tsxnew file mode 100644index 0000000000..93d25dbe43--- /dev/null+++ b/packages/docs/components/LandingPage/PlayerPreview.tsx@@ -0,0 +1,42 @@+import React from "react";+import styled from "styled-components";++const Container = styled.div`+ display: flex;+ flex: 1;+ cursor: pointer;+ position: relative;+ &:hover {+ transform: scale(1.015);+ }+ transition: transform 0.3s;+`;++const A = styled.a``;++export const PlayerPreview: React.FC = () => {+ return (+ <A href="https://www.youtube.com/watch?v=gwlDorikqgY" target="_blank">+ <Container>+ <img+ style={{+ boxShadow: "var(--box-shadow)",+ }}+ src="http://i3.ytimg.com/vi/gwlDorikqgY/maxresdefault.jpg"+ ></img>+ <div+ style={{+ width: "100%",+ textAlign: "center",+ position: "absolute",+ bottom: 20,+ color: "black",+ fontSize: 13,+ }}+ >+ Watch 2 min video+ </div>+ </Container>+ </A>+ );+};diff --git a/packages/docs/components/LandingPage/PricingTable.tsx b/packages/docs/components/LandingPage/PricingTable.tsxnew file mode 100644index 0000000000..5a5139eb98--- /dev/null+++ b/packages/docs/components/LandingPage/PricingTable.tsx@@ -0,0 +1,235 @@+import React, { useState } from "react";+import styled, { css } from "styled-components";+import { BlueButton } from "../layout/Button";+import { mobile } from "../layout/layout";+import { Spacer } from "../layout/Spacer";+import { PeriodSelector } from "../PeriodSelector";+import { Triangle } from "../Triangle";++enum Period {+ Monthly = "monthly",+ Yearly = "yearly",+}++const PricingRow = styled.div`+ display: flex;+ flex-direction: row;+ ${mobile`+ flex-direction: column;+ align-items: center;+ `}+`;++const Panel = styled.div`+ background-color: var(--ifm-background-color);+ box-shadow: var(--box-shadow);+ padding: 10px;+ border-radius: 15px;+ flex: 1;+ text-align: center;+ padding-top: 30px;+ padding-bottom: 10px;+ min-height: 500px;+ display: flex;+ flex-direction: column;+ ul {+ text-align: left;+ list-style-type: none;+ padding-left: 0;+ }+ li {+ margin-top: 12px;+ margin-bottom: 12px;+ display: flex;+ color: var(--text-color);+ font-size: 0.95em;+ }+`;++const PerPeriod = styled.div`+ font-weight: 500;+ margin-top: -7px;+ font-size: 0.9em;+`;++const gradient = css`+ -webkit-background-clip: text;+ -moz-background-clip: text;+ background-clip: text;+ -webkit-text-fill-color: transparent;+ -moz-text-fill-color: transparent;+ text-fill-color: transparent;+`;++const Price = styled.div`+ font-size: 60px;+ font-weight: 700;+ margin-top: -5px;+`;++const FreePrice = styled(Price)`+ background: linear-gradient(to right, #4290f5, #42e9f5);+ ${gradient};+`;++const GradientPrice = styled(Price)`+ background: linear-gradient(to right, #e01d67, #79367a);+ ${gradient};+`;++const OrangePrice = styled(Price)`+ background: linear-gradient(to right, #f5ad43, #fd764a);+ ${gradient};+`;++const Portion = styled.div`+ flex: 1;+ ${mobile`+ max-width: 500px;+ width: 100%;+ `}+`;++const TargetTitle = styled.div`+ border-bottom: 1px solid var(--text-color);+ font-weight: 600;+ margin-bottom: 20px;+`;++const BulletContainer = styled.div`+ margin-right: 8px;+ display: inline-flex;+ justify-content: center;+ margin-top: 5px;+`;++const Bullet: React.FC<{ color: string }> = ({ color }) => {+ return (+ <BulletContainer>+ <Triangle size={15} opacity={1} color1={color} />+ </BulletContainer>+ );+};++const A = styled.a`+ &:hover {+ text-decoration: none;+ }+ color: inherit;+`;++export const PricingTable: React.FC<{}> = () => {+ const [period, setPeriod] = useState(Period.Monthly);+ return (+ <div>+ <PeriodSelector period={period} setPeriod={setPeriod} />+ <PricingRow>+ <Portion>+ <TargetTitle>Individuals & Small teams</TargetTitle>+ <Panel>+ <strong>Completely</strong>+ <FreePrice>Free</FreePrice>+ <PerPeriod>forever!</PerPeriod>+ <ul>+ <li>+ <Bullet color="#4290f5" />+ Unlimited usage of all Remotion tools+ </li>+ <li>+ <Bullet color="#4290f5" />+ Commercial use allowed+ </li>+ <li>+ <Bullet color="#4290f5" />+ Community support+ </li>+ </ul>+ <div style={{ flex: 1 }} />+ <BlueButton fullWidth disabled loading={false} size="bg">+ No signup required+ </BlueButton>+ </Panel>+ </Portion>+ <Spacer />+ <Spacer />+ <Spacer />+ <Portion style={{ flex: 2 }}>+ <TargetTitle>Companies</TargetTitle>+ <PricingRow>+ <Panel>+ <strong>Developer seat</strong>+ <GradientPrice>+ {period === Period.Monthly ? "$15" : "$150"}+ </GradientPrice>+ <PerPeriod>+ per {period === Period.Monthly ? "month" : "year"}+ </PerPeriod>+ <ul>+ <li>+ <Bullet color="#79367a" />+ allows 1 developer to work on Remotion projects+ </li>+ <li>+ <Bullet color="#79367a" />+ may use Remotion on multiple machines+ </li>+ <li>+ <Bullet color="#79367a" />+ Access to prioritized support+ </li>+ <li>+ <Bullet color="#79367a" />+ As long as you make renders, at least one license must be kept+ active+ </li>+ </ul>+ <div style={{ flex: 1 }} />+ <A href="https://companies.remotion.dev" target="_blank">+ <div>+ <BlueButton fullWidth loading={false} size="bg">+ Buy a license+ </BlueButton>+ </div>+ </A>+ </Panel>+ <Spacer />+ <Spacer />+ <Spacer />+ <Panel>+ <strong>Cloud rendering seat</strong>+ <OrangePrice>+ {period === Period.Monthly ? "$10" : "$100"}+ </OrangePrice>+ <PerPeriod>+ per {period === Period.Monthly ? "month" : "year"}+ </PerPeriod>+ <ul>+ <li>+ <Bullet color="#f5ad43" />+ Choose 1 seat per cloud instance (e.g. VPS, EC2) you are+ running Remotion on+ </li>+ <li>+ <Bullet color="#f5ad43" />+ Pay only for as long as you are rendering videos.+ </li>+ <li>+ <Bullet color="#f5ad43" />+ Using serverless? Choose 1 seat per 2.000 renders per month.+ </li>+ </ul>+ <div style={{ flex: 1 }} />+ <A href="https://companies.remotion.dev" target="_blank">+ <div>+ <BlueButton fullWidth loading={false} size="bg">+ Buy a license+ </BlueButton>+ </div>+ </A>+ </Panel>+ </PricingRow>+ </Portion>+ </PricingRow>+ </div>+ );+};diff --git a/packages/docs/components/LandingPage/Programmatic.tsx b/packages/docs/components/LandingPage/Programmatic.tsxnew file mode 100644index 0000000000..c5d0f08a36--- /dev/null+++ b/packages/docs/components/LandingPage/Programmatic.tsx@@ -0,0 +1,68 @@+import { Player, PlayerRef } from "@remotion/player";+import React, { useCallback, useEffect, useRef, useState } from "react";+import styled from "styled-components";+import { mobile } from "../layout/layout";+import { GithubDemo, GithubResponse } from "./GithubDemo";++const MobilePlayer = styled.div`+ width: 500px;+ position: relative;+ ${mobile`+ width: 100%;+ `}+`;++export const ProgrammaticContent: React.FC<{ data: GithubResponse | null }> = ({+ data,+}) => {+ const containerRef = useRef<HTMLDivElement>(null);+ const playerRef = useRef<PlayerRef>(null);++ const [isIntersecting, setIsIntersecting] = useState(false);++ const callback: IntersectionObserverCallback = useCallback((data) => {+ const { isIntersecting } = data[0];+ setIsIntersecting(isIntersecting);+ if (isIntersecting) {+ playerRef.current?.play();+ } else {+ playerRef.current?.pause();+ }+ }, []);++ useEffect(() => {+ const { current } = containerRef;+ if (!current) {+ return;+ }+ const observer = new IntersectionObserver(callback, {+ root: null,+ threshold: 1,+ });+ observer.observe(current);++ return () => observer.unobserve(current);+ }, []);++ useEffect(() => {+ if (isIntersecting) {+ playerRef.current?.play();+ }+ }, [data, isIntersecting]);++ return (+ <MobilePlayer ref={containerRef}>+ <Player+ ref={playerRef}+ component={GithubDemo}+ compositionHeight={720}+ compositionWidth={1280}+ durationInFrames={100}+ fps={30}+ controls+ style={{ width: "100%" }}+ inputProps={{ data }}+ />+ </MobilePlayer>+ );+};diff --git a/packages/docs/components/LandingPage/WriteInReact.tsx b/packages/docs/components/LandingPage/WriteInReact.tsxnew file mode 100644index 0000000000..d41db2367f--- /dev/null+++ b/packages/docs/components/LandingPage/WriteInReact.tsx@@ -0,0 +1,57 @@+import React from "react";+import styled from "styled-components";+import { mobile } from "../layout/layout";+import { GetStarted } from "./GetStartedStrip";+import { PlayerPreview } from "./PlayerPreview";++const Row = styled.div`+ flex-direction: row;+ display: flex;+ ${mobile`+ flex-direction: column;+ `}+`;++const Title = styled.h1`+ font-size: 5em;+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,+ Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;+ font-weight: 700;+ line-height: 1;+ -webkit-text-fill-color: transparent;+ background: linear-gradient(+ to right,+ var(--text-color),+ var(--light-text-color)+ );+ -webkit-background-clip: text;+ width: 500px;+`;++const Right = styled.div`+ flex: 1;+ ${mobile`+ margin-top: 30px;+ `}+`;++export const WriteInReact: React.FC = () => {+ return (+ <Row>+ <div style={{ flex: 1 }}>+ <Title>+ Write videos <br /> in React.+ </Title>+ <p>+ Use your React knowledge to create real MP4 videos. <br /> Scale your+ video production using server-side rendering and parametrization.+ </p>++ <GetStarted></GetStarted>+ </div>+ <Right>+ <PlayerPreview />+ </Right>+ </Row>+ );+};diff --git a/packages/docs/components/LandingPage/editor.tsx b/packages/docs/components/LandingPage/editor.tsxnew file mode 100644index 0000000000..aa0e1c732c--- /dev/null+++ b/packages/docs/components/LandingPage/editor.tsx@@ -0,0 +1,105 @@+import React, { useCallback, useEffect, useRef, useState } from "react";+import styled, { keyframes } from "styled-components";+import { mobile } from "../layout/layout";++const Row = styled.div`+ display: flex;+ flex-direction: row;+ justify-content: flex-end;+ text-align: right;+ align-items: center;+ ${mobile`+ flex-direction: column-reverse;+ text-align: left;+ align-items: flex-start;+ justify-content: flex-start;+ `}+`;++const Title = styled.h2`+ font-size: 2.5em;+ font-weight: 700;+ font-family: --apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,+ Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;+ line-height: 1.1;+ text-align: right;+ ${mobile`+ text-align: left;+ `}+`;++const Mp4 = styled.span`+ background: linear-gradient(to right, rgb(66, 144, 245), rgb(66, 233, 245));+ -webkit-text-fill-color: transparent;+ -webkit-background-clip: text;+`;++const animation = keyframes`+ from {+ opacity: 0;+ }+ to {+ opacity: 1;+ }+`;+const Video = styled.video<{+ playing: boolean;+}>`+ animation: ${animation} 0.6s;+ animation-play-state: ${(props) => (props.playing ? "running" : "paused")};+`;++export const LightningFastEditor: React.FC = () => {+ const ref = useRef<HTMLDivElement>(null);+ const videoRef = useRef<HTMLVideoElement>(null);+ const [isIntersecting, setIsIntersecting] = useState(false);++ const callback: IntersectionObserverCallback = useCallback((data) => {+ const { isIntersecting } = data[0];+ setIsIntersecting(isIntersecting);+ if (isIntersecting) {+ videoRef.current?.play();+ } else {+ videoRef.current?.pause();+ }+ }, []);++ useEffect(() => {+ const { current } = ref;+ if (!current) {+ return;+ }+ const observer = new IntersectionObserver(callback, {+ root: null,+ threshold: 0.2,+ });+ observer.observe(current);++ return () => observer.unobserve(current);+ }, []);+ return (+ <Row ref={ref}>+ <div>+ <Video+ src="/img/player-demo.mp4"+ autoPlay+ muted+ playsInline+ playing={isIntersecting}+ loop+ style={{ width: 500, borderRadius: 7, overflow: "hidden" }}+ ></Video>+ </div>+ <div style={{ flex: 1 }}>+ <Title>+ Fast and <br /> <Mp4>delightful</Mp4> editing+ </Title>+ <p>+ Preview your video in the browser. <br />+ Fast refresh while the video is playing. <br />+ Scrub through the timeline to get every frame perfect.+ </p>+ </div>+ </Row>+ );+};diff --git a/packages/docs/components/LandingPage/if-you-know-react.tsx b/packages/docs/components/LandingPage/if-you-know-react.tsxnew file mode 100644index 0000000000..b85cb68dfa--- /dev/null+++ b/packages/docs/components/LandingPage/if-you-know-react.tsx@@ -0,0 +1,73 @@+import React from "react";+import styled from "styled-components";+import { BlueButton } from "../layout/Button";+import { mobile } from "../layout/layout";+import { CodeExample } from "./CodeExample";++const Row = styled.div`+ display: flex;+ flex-direction: row;+ text-align: right;+ justify-content: flex-end;+ align-items: center;+ ${mobile`+ flex-direction: column-reverse;+ text-align: left;+ justify-content: flex-start;+ align-items: flex-start;+ `}+`;++const Title = styled.h2`+ font-size: 2.5em;+ font-weight: 700;+ font-family: --apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,+ Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;+ line-height: 1.1;+ text-align: right;+ ${mobile`+ text-align: left;+ `}+`;++const Rea = styled.span`+ background: linear-gradient(to right, rgb(66, 144, 245), rgb(66, 233, 245));+ -webkit-text-fill-color: transparent;+ -webkit-background-clip: text;+`;++const A = styled.a`+ display: inline-block;+ ${mobile`++ margin-bottom: 80px;+ `};+ &:hover {+ text-decoration: none;+ }+`;++export const IfYouKnowReact: React.FC = () => {+ return (+ <Row>+ <CodeExample></CodeExample>+ <div style={{ width: 40 }}></div>+ <div>+ <Title>+ If you know <Rea>React</Rea> <br />+ you can make videos.+ </Title>+ <p>+ Remotion is a set of utilities for video creation in React. <br /> The+ rules of React stay the same. <br />+ Learn the fundamentals in just a few minutes:+ </p>+ <A href="/docs/the-fundamentals">+ <BlueButton size="sm" fullWidth={false} loading={false}>+ Learn Remotion+ </BlueButton>+ </A>+ </div>+ </Row>+ );+};diff --git a/packages/docs/components/LandingPage/parametrize.tsx b/packages/docs/components/LandingPage/parametrize.tsxnew file mode 100644index 0000000000..5545836d20--- /dev/null+++ b/packages/docs/components/LandingPage/parametrize.tsx@@ -0,0 +1,197 @@+import React, { useEffect, useReducer, useRef, useState } from "react";+import styled from "styled-components";+import { BlueButton } from "../layout/Button";+import { mobile } from "../layout/layout";+import { GithubResponse } from "./GithubDemo";+import { ProgrammaticContent } from "./Programmatic";++const Row = styled.div`+ display: flex;+ flex-direction: row;+ text-align: left;+ align-items: center;+ ${mobile`+ flex-direction: column;+ align-items: flex-start;+ `}+`;++const Title = styled.h2`+ font-size: 2.5em;+ font-weight: 700;+ font-family: --apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,+ Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;+ line-height: 1.1;+ text-align: left;+`;++const Mp4 = styled.span`+ background: linear-gradient(to right, rgb(66, 144, 245), rgb(66, 233, 245));+ -webkit-text-fill-color: transparent;+ -webkit-background-clip: text;+`;++const SubmitButton = styled.button`+ appearance: none;+ padding: 14px 16px;+ background-color: rgb(66, 144, 245);+ color: white;+ border: none;+ font-weight: bold;+ border-radius: 3px;+ font-size: 14px;+ cursor: pointer;+`;++const Input = styled.input`+ color: var(--text-color);+`;++const cache: { [key: string]: GithubResponse } = {};++const makeRequest = async (username: string): Promise<GithubResponse> => {+ if (cache[username]) {+ return cache[username];+ }+ const response = await fetch(`https://api.github.com/users/${username}`);+ const json = await response.json();+ if (response.status !== 200) {+ throw new Error(json.message);+ }+ cache[username] = json;+ return json;+};++type Actions =+ | {+ type: "fetch-video";+ }+ | {+ type: "receive-video";+ response: GithubResponse;+ }+ | {+ type: "receive-error";+ error: Error;+ };++type State =+ | {+ type: "error";+ error: Error;+ }+ | {+ type: "loaded";+ response: GithubResponse;+ }+ | {+ type: "loading";+ };++const reducer = (state: State, action: Actions): State => {+ switch (action.type) {+ case "fetch-video":+ return {+ type: "loading",+ };+ case "receive-video":+ return {+ type: "loaded",+ response: action.response,+ };+ case "receive-error":+ return {+ type: "error",+ error: action.error,+ };+ default:+ return state;+ }+};++export const Parametrize: React.FC = () => {+ const ref = useRef<HTMLInputElement>(null);+ const [username, setUsername] = useState("JonnyBurger");++ const [state, dispatch] = useReducer(reducer, { type: "loading" });++ useEffect(() => {+ dispatch({+ type: "fetch-video",+ });+ makeRequest(username)+ .then((response) => {+ dispatch({+ type: "receive-video",+ response,+ });+ })+ .catch((error) => {+ dispatch({+ type: "receive-error",+ error,+ });+ });+ }, [username]);++ return (+ <Row>+ <div style={{ flex: 1 }}>+ <Title>+ <Mp4>Programmatic</Mp4> content <br />+ and rendering+ </Title>+ <p>+ Fetch data from an API and use it as the content. <br />+ Render videos programmatically using our server-side APIs.+ </p>+ <span style={{ fontSize: 13 }}>+ Customize the video by entering your Github username.+ </span>+ <div style={{ height: 10 }}></div>+ <div>+ <form+ onSubmit={(e) => {+ e.preventDefault();+ if (!ref.current?.value) {+ return;+ }++ setUsername(ref.current?.value as string);+ }}+ style={{ display: "flex", flexDirection: "row" }}+ >+ <Input+ autoFocus+ ref={ref}+ type="text"+ placeholder="Your Github username"+ ></Input>{" "}+ <div style={{ width: 8, display: "inline-block" }}></div>+ <BlueButton+ loading={state.type === "loading"}+ fullWidth={false}+ size="sm"+ onClick={() => {+ if (!ref.current?.value) {+ return;+ }+ setUsername(ref.current?.value as string);+ }}+ >+ Show video+ </BlueButton>+ </form>+ </div>+ {state.type === "error" ? (+ <div style={{ color: "red", fontSize: 13 }}>+ Error: {state.error.message}+ </div>+ ) : null}+ </div>+ <ProgrammaticContent+ data={state.type === "loaded" ? state.response : null}+ />+ </Row>+ );+};diff --git a/packages/docs/components/LandingPage/real-mp4-videos.tsx b/packages/docs/components/LandingPage/real-mp4-videos.tsxnew file mode 100644index 0000000000..ad6fe37223--- /dev/null+++ b/packages/docs/components/LandingPage/real-mp4-videos.tsx@@ -0,0 +1,102 @@+import React, { useCallback, useEffect, useRef, useState } from "react";+import styled, { keyframes } from "styled-components";+import { mobile } from "../layout/layout";++const Row = styled.div`+ display: flex;+ flex-direction: row;+ ${mobile`+ flex-direction: column-reverse;+ `}+`;++const Title = styled.h2`+ font-size: 2.5em;+ font-weight: 700;+ font-family: --apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,+ Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;+ line-height: 1.1;+`;++const Mp4 = styled.span`+ background: linear-gradient(to right, rgb(66, 144, 245), rgb(66, 233, 245));+ -webkit-text-fill-color: transparent;+ -webkit-background-clip: text;+`;++const animation = keyframes`+ from {+ opacity: 0;+ transform: translateY(50px);+ }+ to {+ opacity: 1;+ transform: translateY(0px);+ }+`;++const Mp4Container = styled.div`+ flex: 1;+ justify-content: flex-end;+ ${mobile`+ justify-content: flex-start;+ `}+ align-items: center;+ display: flex;+`;++const Icon = styled.img<{+ playing: boolean;+}>`+ animation: ${animation} 0.6s;+ animation-play-state: ${(props) => (props.playing ? "running" : "paused")};+ ${mobile`+ animation: none;+ margin-bottom: 30px;+ `}+`;++export const RealMP4Videos: React.FC = () => {+ const ref = useRef<HTMLDivElement>(null);+ const [isIntersecting, setIsIntersecting] = useState(false);++ const callback: IntersectionObserverCallback = useCallback((data) => {+ setIsIntersecting(data[0].isIntersecting);+ }, []);++ useEffect(() => {+ const { current } = ref;+ if (!current) {+ return;+ }+ const observer = new IntersectionObserver(callback, {+ root: null,+ threshold: 0.5,+ });+ observer.observe(current);++ return () => observer.unobserve(current);+ }, []);++ return (+ <Row ref={ref}>+ <div>+ <Title>+ Real <Mp4>.mp4</Mp4> videos+ </Title>+ <p>+ Remotion renders all frames to images and <br /> encodes them to a+ real video - audio support included. <br /> WebM and other formats are+ also supported.+ </p>+ </div>+ <Mp4Container>+ <Icon+ playing={isIntersecting}+ src="/img/mp4.png"+ style={{ width: 110 }}+ ></Icon>+ </Mp4Container>+ </Row>+ );+};diff --git a/packages/docs/components/PeriodSelector.tsx b/packages/docs/components/PeriodSelector.tsxnew file mode 100644index 0000000000..229f60c885--- /dev/null+++ b/packages/docs/components/PeriodSelector.tsx@@ -0,0 +1,42 @@+import React from "react";+import styled from "styled-components";+import { BlueButton, ClearButton } from "./layout/Button";++enum Period {+ Monthly = "monthly",+ Yearly = "yearly",+}+const PeriodSwitcher = styled.div`+ display: flex;+ justify-content: center;+ margin-bottom: 30px;+`;++export const PeriodSelector: React.FC<{+ period: Period;+ setPeriod: (per: Period) => void;+}> = ({ period, setPeriod }) => {+ const MonthlyComponent = period === Period.Monthly ? BlueButton : ClearButton;+ const YearlyComponent = period !== Period.Monthly ? BlueButton : ClearButton;++ return (+ <PeriodSwitcher>+ <MonthlyComponent+ loading={false}+ size="sm"+ fullWidth={false}+ onClick={() => setPeriod(Period.Monthly)}+ >+ Monthly+ </MonthlyComponent>+ <YearlyComponent+ loading={false}+ size="sm"+ fullWidth={false}+ onClick={() => setPeriod(Period.Yearly)}+ >+ Yearly+ </YearlyComponent>+ </PeriodSwitcher>+ );+};diff --git a/packages/docs/components/Triangle.tsx b/packages/docs/components/Triangle.tsxnew file mode 100644index 0000000000..4b8032b486--- /dev/null+++ b/packages/docs/components/Triangle.tsx@@ -0,0 +1,28 @@+import React from "react";+import styled from "styled-components";++const Container = styled.svg`+ transform: rotate(90deg);+`;++export const Triangle: React.FC<{+ size: number;+ opacity: number;+ color1?: string;+}> = ({ size, opacity, color1 = "#42e9f5" }) => {+ return (+ <Container+ width={size}+ height={size}+ style={{ opacity }}+ viewBox="-100 -100 400 400"+ >+ <g stroke={color1} strokeWidth="100" strokeLinejoin="round">+ <path+ fill={color1}+ d="M 2 172 a 196 100 0 0 0 195 5 A 196 240 0 0 0 100 2.259 A 196 240 0 0 0 2 172 z"+ />+ </g>+ </Container>+ );+};diff --git a/packages/docs/components/layout/Button.tsx b/packages/docs/components/layout/Button.tsxnew file mode 100644index 0000000000..f122c40445--- /dev/null+++ b/packages/docs/components/layout/Button.tsx@@ -0,0 +1,86 @@+import { opacify } from "polished";+import React, { ComponentProps } from "react";+import styled from "styled-components";+import { ButtonSpinner } from "./ButtonSpinner";+import { RED, UNDERLAY_RED } from "./colors";++type ExtraProps = {+ size: Size;+ fullWidth: boolean;+ background: string;+ hoverColor: string;+ color: string;+ loading: boolean;+};++const Container = styled.button<ExtraProps>`+ padding: ${(props) => (props.size === "sm" ? "10px 16px" : "16px 22px")};+ border-radius: 8px;+ font-weight: bold;+ background-color: ${(props) => props.background};+ color: ${(props) => props.color};+ cursor: ${(props) => (props.disabled ? "default" : "pointer")};+ appearance: none;+ border: none;+ font: inherit;+ font-weight: bold;+ display: flex;+ flex-direction: row;+ align-items: center;+ justify-content: center;+ transition: background-color 0.1s;+ ${(props) => (props.fullWidth ? "width: 100%;" : "")};+ opacity: ${(props) => (props.disabled ? 0.7 : 1)};+ &:not([disabled]):hover {+ background-color: ${(props) => props.hoverColor};+ }+`;++type Size = "sm" | "bg";++type Props = ComponentProps<typeof Container> & ExtraProps;+type MandatoryProps = Omit<ExtraProps, "background" | "color" | "hoverColor">;+type PrestyledProps = ComponentProps<typeof Container> & MandatoryProps;++export const Button: React.FC<Props> = (props) => {+ const { children, loading, ...other } = props;+ const actualDisabled = other.disabled || loading;+ return (+ <Container {...other} disabled={actualDisabled}>+ {children} {loading ? <ButtonSpinner /> : null}+ </Container>+ );+};++export const BlueButton: React.FC<PrestyledProps> = (props) => {+ return (+ <Button+ {...props}+ background="var(--blue-underlay)"+ hoverColor="var(--blue-underlay-hover)"+ color="var(--blue-button-color)"+ />+ );+};++export const RedButton: React.FC<PrestyledProps> = (props) => {+ return (+ <Button+ {...props}+ background={UNDERLAY_RED}+ hoverColor={opacify(0.1, UNDERLAY_RED)}+ color={RED}+ />+ );+};++export const ClearButton: React.FC<PrestyledProps> = (props) => {+ return (+ <Button+ {...props}+ background="transparent"+ color="var(--text-color)"+ hoverColor="var(--clear-hover)"+ />+ );+};diff --git a/packages/docs/components/layout/ButtonSpinner.tsx b/packages/docs/components/layout/ButtonSpinner.tsxnew file mode 100644index 0000000000..9e0dd26960--- /dev/null+++ b/packages/docs/components/layout/ButtonSpinner.tsx@@ -0,0 +1,46 @@+import React from "react";+import styled, { keyframes } from "styled-components";++const radius = 10;+const strokeWidth = 2.5;+const actualR = radius - strokeWidth;++export const Container = styled.div`+ width: ${radius * 2}px;+ height: ${radius * 2}px;+ border-radius: ${radius}px;+ margin-left: 10px;+`;++const circumference = 2 * actualR * Math.PI;+const anim = keyframes`+ from {+ stroke-dashoffset: 0+ }+ to {+ stroke-dashoffset: ${circumference}+ }+`;++const Circle = styled.circle`+ animation: ${anim} 2s infinite linear;+`;++export const ButtonSpinner: React.FC = () => {+ return (+ <Container>+ <svg viewBox="0 0 20 20">+ <Circle+ r={actualR}+ cx={radius}+ cy={radius}+ stroke="currentColor"+ strokeDasharray={`${circumference / 2}`}+ strokeLinecap="round"+ strokeWidth={strokeWidth}+ fill="transparent"+ />+ </svg>+ </Container>+ );+};diff --git a/packages/docs/components/layout/Spacer.tsx b/packages/docs/components/layout/Spacer.tsxnew file mode 100644index 0000000000..366557c9f3--- /dev/null+++ b/packages/docs/components/layout/Spacer.tsx@@ -0,0 +1,6 @@+import styled from "styled-components";++export const Spacer = styled.div`+ height: 4px;+ width: 4px;+`;diff --git a/packages/docs/components/layout/colors.ts b/packages/docs/components/layout/colors.tsnew file mode 100644index 0000000000..e7f875596d--- /dev/null+++ b/packages/docs/components/layout/colors.ts@@ -0,0 +1,8 @@+import { darken, transparentize } from "polished";++export const LIGHT_BLUE = "#42e9f5";+export const DARK_BLUE = "#4290f5";+export const UNDERLAY_BLUE = transparentize(0.85, DARK_BLUE);+export const RED = "#e74c3c";+export const UNDERLAY_RED = transparentize(0.9, RED);+export const BLUE_TEXT = darken(0.3, DARK_BLUE);diff --git a/packages/docs/components/layout/layout.ts b/packages/docs/components/layout/layout.tsnew file mode 100644index 0000000000..32080c3802--- /dev/null+++ b/packages/docs/components/layout/layout.ts@@ -0,0 +1,9 @@+import { css } from "styled-components";++export const BREAKPOINT_WIDTH = 900;++export const mobile = (arg0: any, ...args: any[]) => css`+ @media (max-width: ${BREAKPOINT_WIDTH}px) {+ ${css(arg0, ...args)};+ }+`;diff --git a/packages/docs/package-lock.json b/packages/docs/package-lock.jsonindex b64b1237c1..c1525653dc 100644--- a/packages/docs/package-lock.json+++ b/packages/docs/package-lock.json@@ -1,24 +1,26 @@{"name": "docs",- "version": "2.1.1",+ "version": "2.1.2","lockfileVersion": 2,"requires": true,"packages": {"": {- "version": "2.1.1",+ "version": "2.1.2","dependencies": {"@babel/plugin-transform-modules-commonjs": "^7.14.0","@docusaurus/core": "2.0.0-alpha.75","@docusaurus/preset-classic": "2.0.0-alpha.75","@mdx-js/react": "^1.6.21",- "@remotion/player": "^2.1.0",+ "@remotion/player": "^2.1.2","@splitbee/web": "^0.2.4","@types/color-namer": "^1.3.0",+ "@types/styled-components": "^5.1.9","clsx": "^1.1.1","color-namer": "1.4.0","polished": "4.1.2","prism-react-renderer": "^1.1.1",- "remotion": "^2.1.0"+ "remotion": "^2.1.2",+ "styled-components": "^5.3.0"}},"node_modules/@algolia/autocomplete-core": {@@ -1829,6 +1831,29 @@"node": ">=10"}},+ "node_modules/@emotion/is-prop-valid": {+ "version": "0.8.8",+ "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",+ "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==",+ "dependencies": {+ "@emotion/memoize": "0.7.4"+ }+ },+ "node_modules/@emotion/memoize": {+ "version": "0.7.4",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",+ "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw=="+ },+ "node_modules/@emotion/stylis": {+ "version": "0.8.5",+ "resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.8.5.tgz",+ "integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ=="+ },+ "node_modules/@emotion/unitless": {+ "version": "0.7.5",+ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz",+ "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="+ },"node_modules/@endiliey/static-site-generator-webpack-plugin": {"version": "4.0.0","resolved": "https://registry.npmjs.org/@endiliey/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.0.tgz",@@ -1987,11 +2012,11 @@"integrity": "sha512-6RglhutqrGFMO1MNUXp95RBuYIuc8wTnMAV5MUhLmjTOy78ncwOw7RgeQ/HeymkKXRhZd0s2DNrM1rL7unk3MQ=="},"node_modules/@remotion/player": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/@remotion/player/-/player-2.1.0.tgz",- "integrity": "sha512-wW/+MgPQlkzdrU1vYQEgaCfT2wfByfgEJGJsUtEva3n4KvbBFKJp8ToqDcX2EjTVCk6H80zzJQ3B0UfOSxwEsg==",+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/@remotion/player/-/player-2.1.2.tgz",+ "integrity": "sha512-Xaa6d9BFovukeWo4HTAF5EdCGm92Jjr1WQaU8+h0aN01HWcfgPiRcS2Eabu0b/g61knmX7L4ArJV2ycGDkB2Xw==","dependencies": {- "remotion": "^2.1.0"+ "remotion": "^2.1.2"},"peerDependencies": {"react": ">=16.8.0",@@ -2368,6 +2393,15 @@"@types/unist": "*"}},+ "node_modules/@types/hoist-non-react-statics": {+ "version": "3.3.1",+ "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",+ "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",+ "dependencies": {+ "@types/react": "*",+ "hoist-non-react-statics": "^3.3.0"+ }+ },"node_modules/@types/html-minifier-terser": {"version": "5.1.1","resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz",@@ -2406,11 +2440,26 @@"resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz","integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw=="},+ "node_modules/@types/prop-types": {+ "version": "15.7.3",+ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz",+ "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw=="+ },"node_modules/@types/q": {"version": "1.5.4","resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz","integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug=="},+ "node_modules/@types/react": {+ "version": "17.0.5",+ "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.5.tgz",+ "integrity": "sha512-bj4biDB9ZJmGAYTWSKJly6bMr4BLUiBrx9ujiJEoP9XIDY9CTaPGxE5QWN/1WjpPLzYF7/jRNnV2nNxNe970sw==",+ "dependencies": {+ "@types/prop-types": "*",+ "@types/scheduler": "*",+ "csstype": "^3.0.2"+ }+ },"node_modules/@types/sax": {"version": "1.2.1","resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.1.tgz",@@ -2419,6 +2468,21 @@"@types/node": "*"}},+ "node_modules/@types/scheduler": {+ "version": "0.16.1",+ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.1.tgz",+ "integrity": "sha512-EaCxbanVeyxDRTQBkdLb3Bvl/HK7PBK6UJjsSixB0iHKoWxE5uu2Q/DgtpOhPIojN0Zl1whvOd7PoHs2P0s5eA=="+ },+ "node_modules/@types/styled-components": {+ "version": "5.1.9",+ "resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.9.tgz",+ "integrity": "sha512-kbEG6YlwK8rucITpKEr6pA4Ho9KSQHUUOzZ9lY3va1mtcjvS3D0wDciFyHEiNHKLL/npZCKDQJqm0x44sPO9oA==",+ "dependencies": {+ "@types/hoist-non-react-statics": "*",+ "@types/react": "*",+ "csstype": "^3.0.2"+ }+ },"node_modules/@types/unist": {"version": "2.0.3","resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz",@@ -3044,6 +3108,25 @@"@babel/helper-define-polyfill-provider": "^0.2.0"}},+ "node_modules/babel-plugin-styled-components": {+ "version": "1.12.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-1.12.0.tgz",+ "integrity": "sha512-FEiD7l5ZABdJPpLssKXjBUJMYqzbcNzBowfXDCdJhOpbhWiewapUaY+LZGT8R4Jg2TwOjGjG4RKeyrO5p9sBkA==",+ "dependencies": {+ "@babel/helper-annotate-as-pure": "^7.0.0",+ "@babel/helper-module-imports": "^7.0.0",+ "babel-plugin-syntax-jsx": "^6.18.0",+ "lodash": "^4.17.11"+ },+ "peerDependencies": {+ "styled-components": ">= 2"+ }+ },+ "node_modules/babel-plugin-syntax-jsx": {+ "version": "6.18.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz",+ "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY="+ },"node_modules/bail": {"version": "1.0.5","resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz",@@ -3384,6 +3467,11 @@"node": ">= 6"}},+ "node_modules/camelize": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz",+ "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs="+ },"node_modules/caniuse-api": {"version": "3.0.0","resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz",@@ -4097,6 +4185,14 @@"node": ">=8"}},+ "node_modules/css-color-keywords": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz",+ "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=",+ "engines": {+ "node": ">=4"+ }+ },"node_modules/css-color-names": {"version": "1.0.1","resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-1.0.1.tgz",@@ -4179,6 +4275,16 @@"resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz","integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w=="},+ "node_modules/css-to-react-native": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz",+ "integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==",+ "dependencies": {+ "camelize": "^1.0.0",+ "css-color-keywords": "^1.0.0",+ "postcss-value-parser": "^4.0.2"+ }+ },"node_modules/css-tree": {"version": "1.1.3","resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",@@ -4305,6 +4411,11 @@"node": ">=8.0.0"}},+ "node_modules/csstype": {+ "version": "3.0.8",+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz",+ "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw=="+ },"node_modules/d": {"version": "1.0.1","resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",@@ -10069,9 +10180,9 @@}},"node_modules/remotion": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/remotion/-/remotion-2.1.0.tgz",- "integrity": "sha512-q5WJvD0EcyDdE7QI8IdR9+zrjfX5ig7R0zJgQgAiIptbSDDuj2Md+g3onzmY5GW6BVf0eOtHg9OGpEuT6NydMg==",+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/remotion/-/remotion-2.1.2.tgz",+ "integrity": "sha512-AWeoBuSM/pP5C/S/OMWEZE+84qtcFYzshyD3vk7k2eRJaKQxVYduVmu5wMIPH6AWg09eAoNhr9FuPqFyhsiEYA==","peerDependencies": {"react": "^17.0.1","react-dom": "^17.0.1"@@ -10727,6 +10838,11 @@"node": ">=8"}},+ "node_modules/shallowequal": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",+ "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="+ },"node_modules/shebang-command": {"version": "2.0.0","resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",@@ -11301,6 +11417,35 @@"inline-style-parser": "0.1.1"}},+ "node_modules/styled-components": {+ "version": "5.3.0",+ "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.3.0.tgz",+ "integrity": "sha512-bPJKwZCHjJPf/hwTJl6TbkSZg/3evha+XPEizrZUGb535jLImwDUdjTNxXqjjaASt2M4qO4AVfoHJNe3XB/tpQ==",+ "dependencies": {+ "@babel/helper-module-imports": "^7.0.0",+ "@babel/traverse": "^7.4.5",+ "@emotion/is-prop-valid": "^0.8.8",+ "@emotion/stylis": "^0.8.4",+ "@emotion/unitless": "^0.7.4",+ "babel-plugin-styled-components": ">= 1.12.0",+ "css-to-react-native": "^3.0.0",+ "hoist-non-react-statics": "^3.0.0",+ "shallowequal": "^1.1.0",+ "supports-color": "^5.5.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/styled-components"+ },+ "peerDependencies": {+ "react": ">= 16.8.0",+ "react-dom": ">= 16.8.0",+ "react-is": ">= 16.8.0"+ }+ },"node_modules/stylehacks": {"version": "5.0.0","resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.0.0.tgz",@@ -14765,6 +14910,29 @@"tslib": "^2.1.0"}},+ "@emotion/is-prop-valid": {+ "version": "0.8.8",+ "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",+ "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==",+ "requires": {+ "@emotion/memoize": "0.7.4"+ }+ },+ "@emotion/memoize": {+ "version": "0.7.4",+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",+ "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw=="+ },+ "@emotion/stylis": {+ "version": "0.8.5",+ "resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.8.5.tgz",+ "integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ=="+ },+ "@emotion/unitless": {+ "version": "0.7.5",+ "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz",+ "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="+ },"@endiliey/static-site-generator-webpack-plugin": {"version": "4.0.0","resolved": "https://registry.npmjs.org/@endiliey/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.0.tgz",@@ -14909,11 +15077,11 @@"integrity": "sha512-6RglhutqrGFMO1MNUXp95RBuYIuc8wTnMAV5MUhLmjTOy78ncwOw7RgeQ/HeymkKXRhZd0s2DNrM1rL7unk3MQ=="},"@remotion/player": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/@remotion/player/-/player-2.1.0.tgz",- "integrity": "sha512-wW/+MgPQlkzdrU1vYQEgaCfT2wfByfgEJGJsUtEva3n4KvbBFKJp8ToqDcX2EjTVCk6H80zzJQ3B0UfOSxwEsg==",+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/@remotion/player/-/player-2.1.2.tgz",+ "integrity": "sha512-Xaa6d9BFovukeWo4HTAF5EdCGm92Jjr1WQaU8+h0aN01HWcfgPiRcS2Eabu0b/g61knmX7L4ArJV2ycGDkB2Xw==","requires": {- "remotion": "^2.1.0"+ "remotion": "^2.1.2"}},"@sideway/address": {@@ -15221,6 +15389,15 @@"@types/unist": "*"}},+ "@types/hoist-non-react-statics": {+ "version": "3.3.1",+ "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",+ "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",+ "requires": {+ "@types/react": "*",+ "hoist-non-react-statics": "^3.3.0"+ }+ },"@types/html-minifier-terser": {"version": "5.1.1","resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz",@@ -15259,11 +15436,26 @@"resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz","integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw=="},+ "@types/prop-types": {+ "version": "15.7.3",+ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz",+ "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw=="+ },"@types/q": {"version": "1.5.4","resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz","integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug=="},+ "@types/react": {+ "version": "17.0.5",+ "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.5.tgz",+ "integrity": "sha512-bj4biDB9ZJmGAYTWSKJly6bMr4BLUiBrx9ujiJEoP9XIDY9CTaPGxE5QWN/1WjpPLzYF7/jRNnV2nNxNe970sw==",+ "requires": {+ "@types/prop-types": "*",+ "@types/scheduler": "*",+ "csstype": "^3.0.2"+ }+ },"@types/sax": {"version": "1.2.1","resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.1.tgz",@@ -15272,6 +15464,21 @@"@types/node": "*"}},+ "@types/scheduler": {+ "version": "0.16.1",+ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.1.tgz",+ "integrity": "sha512-EaCxbanVeyxDRTQBkdLb3Bvl/HK7PBK6UJjsSixB0iHKoWxE5uu2Q/DgtpOhPIojN0Zl1whvOd7PoHs2P0s5eA=="+ },+ "@types/styled-components": {+ "version": "5.1.9",+ "resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.9.tgz",+ "integrity": "sha512-kbEG6YlwK8rucITpKEr6pA4Ho9KSQHUUOzZ9lY3va1mtcjvS3D0wDciFyHEiNHKLL/npZCKDQJqm0x44sPO9oA==",+ "requires": {+ "@types/hoist-non-react-statics": "*",+ "@types/react": "*",+ "csstype": "^3.0.2"+ }+ },"@types/unist": {"version": "2.0.3","resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz",@@ -15809,6 +16016,22 @@"@babel/helper-define-polyfill-provider": "^0.2.0"}},+ "babel-plugin-styled-components": {+ "version": "1.12.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-1.12.0.tgz",+ "integrity": "sha512-FEiD7l5ZABdJPpLssKXjBUJMYqzbcNzBowfXDCdJhOpbhWiewapUaY+LZGT8R4Jg2TwOjGjG4RKeyrO5p9sBkA==",+ "requires": {+ "@babel/helper-annotate-as-pure": "^7.0.0",+ "@babel/helper-module-imports": "^7.0.0",+ "babel-plugin-syntax-jsx": "^6.18.0",+ "lodash": "^4.17.11"+ }+ },+ "babel-plugin-syntax-jsx": {+ "version": "6.18.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz",+ "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY="+ },"bail": {"version": "1.0.5","resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz",@@ -16097,6 +16320,11 @@"resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz","integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA=="},+ "camelize": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz",+ "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs="+ },"caniuse-api": {"version": "3.0.0","resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz",@@ -16702,6 +16930,11 @@"resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz","integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA=="},+ "css-color-keywords": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz",+ "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU="+ },"css-color-names": {"version": "1.0.1","resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-1.0.1.tgz",@@ -16771,6 +17004,16 @@"resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz","integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w=="},+ "css-to-react-native": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz",+ "integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==",+ "requires": {+ "camelize": "^1.0.0",+ "css-color-keywords": "^1.0.0",+ "postcss-value-parser": "^4.0.2"+ }+ },"css-tree": {"version": "1.1.3","resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",@@ -16869,6 +17112,11 @@"css-tree": "^1.1.2"}},+ "csstype": {+ "version": "3.0.8",+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz",+ "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw=="+ },"d": {"version": "1.0.1","resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",@@ -21600,9 +21848,9 @@}},"remotion": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/remotion/-/remotion-2.1.0.tgz",- "integrity": "sha512-q5WJvD0EcyDdE7QI8IdR9+zrjfX5ig7R0zJgQgAiIptbSDDuj2Md+g3onzmY5GW6BVf0eOtHg9OGpEuT6NydMg=="+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/remotion/-/remotion-2.1.2.tgz",+ "integrity": "sha512-AWeoBuSM/pP5C/S/OMWEZE+84qtcFYzshyD3vk7k2eRJaKQxVYduVmu5wMIPH6AWg09eAoNhr9FuPqFyhsiEYA=="},"remove-trailing-separator": {"version": "1.1.0",@@ -22156,6 +22404,11 @@"kind-of": "^6.0.2"}},+ "shallowequal": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",+ "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="+ },"shebang-command": {"version": "2.0.0","resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",@@ -22636,6 +22889,23 @@"inline-style-parser": "0.1.1"}},+ "styled-components": {+ "version": "5.3.0",+ "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.3.0.tgz",+ "integrity": "sha512-bPJKwZCHjJPf/hwTJl6TbkSZg/3evha+XPEizrZUGb535jLImwDUdjTNxXqjjaASt2M4qO4AVfoHJNe3XB/tpQ==",+ "requires": {+ "@babel/helper-module-imports": "^7.0.0",+ "@babel/traverse": "^7.4.5",+ "@emotion/is-prop-valid": "^0.8.8",+ "@emotion/stylis": "^0.8.4",+ "@emotion/unitless": "^0.7.4",+ "babel-plugin-styled-components": ">= 1.12.0",+ "css-to-react-native": "^3.0.0",+ "hoist-non-react-statics": "^3.0.0",+ "shallowequal": "^1.1.0",+ "supports-color": "^5.5.0"+ }+ },"stylehacks": {"version": "5.0.0","resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.0.0.tgz",diff --git a/packages/docs/package.json b/packages/docs/package.jsonindex be8180c01e..95ce1c3b9a 100644--- a/packages/docs/package.json+++ b/packages/docs/package.json@@ -19,11 +19,13 @@"@remotion/player": "^2.1.2","@splitbee/web": "^0.2.4","@types/color-namer": "^1.3.0",+ "@types/styled-components": "^5.1.9","clsx": "^1.1.1","color-namer": "1.4.0","polished": "4.1.2","prism-react-renderer": "^1.1.1",- "remotion": "^2.1.2"+ "remotion": "^2.1.2",+ "styled-components": "^5.3.0"},"browserslist": {"production": [diff --git a/packages/docs/src/css/custom.css b/packages/docs/src/css/custom.cssindex 0ca82174a4..12f8c3dee0 100644--- a/packages/docs/src/css/custom.css+++ b/packages/docs/src/css/custom.css@@ -17,6 +17,25 @@--ifm-code-font-size: 95%;}+[data-theme="light"] {+ --text-color: #000;+ --blue-button-color: #084696;+ --blue-underlay: rgba(66, 144, 245, 0.15);+ --blue-underlay-hover: rgba(66, 144, 245, 0.25);+ --light-text-color: #777;+ --clear-hover: rgba(0, 0, 0, 0.04);+ --box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);+}+[data-theme="dark"] {+ --text-color: #fff;+ --blue-underlay: rgba(255, 255, 255, 0.15);+ --blue-underlay-hover: rgba(255, 255, 255, 0.25);+ --clear-hover: rgba(255, 255, 255, 0.06);+ --blue-button-color: white;+ --light-text-color: #aaa;+ --box-shadow: 0 1px 8px rgba(255, 255, 255, 0.2);+}+[data-theme="light"] .docusaurus-highlight-code-line {background-color: rgb(232, 232, 232);display: block;diff --git a/packages/docs/src/pages/header.module.css b/packages/docs/src/pages/header.module.cssdeleted file mode 100644index 23cfd9dfaa..0000000000--- a/packages/docs/src/pages/header.module.css+++ /dev/null@@ -1,30 +0,0 @@-.title {- font-size: 3em;- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,- Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;- font-weight: 700;- line-height: 1.2;- word-break: break-word;-}--.row {- display: flex;- flex-direction: row;- text-align: left;-}--.youtubeIframe{- align-self: center;-}--@media screen and (max-width: 1200px) {- .row {- flex-direction: column;- text-align: center;- }-- .tabContainer {- margin-top: 1rem;- justify-content: center;- }-}\ No newline at end of filediff --git a/packages/docs/src/pages/index.tsx b/packages/docs/src/pages/index.tsxindex 5837630f76..5605b2dc63 100644--- a/packages/docs/src/pages/index.tsx+++ b/packages/docs/src/pages/index.tsx@@ -1,210 +1,68 @@-import Link from "@docusaurus/Link";-import useBaseUrl from "@docusaurus/useBaseUrl";import splitbee from "@splitbee/web";import Layout from "@theme/Layout";-import TabItem from "@theme/TabItem";-import Tabs from "@theme/Tabs";-import clsx from "clsx";-import React, { useState } from "react";-import headerStyles from "./header.module.css";-import styles from "./styles.module.css";+import React from "react";+import styled from "styled-components";+import { LightningFastEditor } from "../../components/LandingPage/editor";+import { FreePricing } from "../../components/LandingPage/FreePricing";+import { IfYouKnowReact } from "../../components/LandingPage/if-you-know-react";+import { Parametrize } from "../../components/LandingPage/parametrize";+import { RealMP4Videos } from "../../components/LandingPage/real-mp4-videos";+import { WriteInReact } from "../../components/LandingPage/WriteInReact";+import { mobile } from "../../components/layout/layout";+setTimeout(() => {splitbee.init();}, 100);-const features = [- {- title: "Leverage the web",- imageUrl: "img/wordcloud.png",- description: (- <>- You've seen magic being created using CSS, Canvas, SVG and WebGL – why- not use these powerful technologies for making videos?- </>- ),- },- {- title: "Leverage React",- imageUrl: "img/leverage-react.png",- description: (- <>- Instead of copy & paste and undo & redo, use React's powerful- composition model to reuse components and fix mistakes later.- </>- ),- },- {- title: "Programmatic videos",- imageUrl: "img/programmatic.png",- description: (- <>- Use programming to create more advanced visualizations.{" "}- <code>fetch</code> data from an API and render videos dynamically using- SSR.- </>- ),- },-];--const Feature: React.FC<{- imageUrl: string;- title: string;- description: JSX.Element;-}> = ({ imageUrl, title, description }) => {- const imgUrl = useBaseUrl(imageUrl);- return (- <div className={clsx("col col--4", styles.feature)}>- {imgUrl && (- <div className="text--center">- <img className={styles.featureImage} src={imgUrl} alt={title} />- </div>- )}- <h3>{title}</h3>- <p>{description}</p>- </div>- );-};--const Snippet: React.FC<{- snippetValue: string;-}> = ({ snippetValue }) => {- const [copied, setCopied] = useState(false);- return (- <div className={styles.snippet}>- <div className={styles.snippetValue}>$ {snippetValue}</div>- <div- className={styles.copySnippet}- onClick={() => {- navigator.clipboard.writeText(snippetValue);- setCopied(true);- }}- >- {copied ? "Copied!" : "Copy"}- </div>- </div>- );-};+const Content = styled.div`+ max-width: 1000px;+ margin: auto;+ padding-top: 10vh;+ padding-left: 20px;+ padding-right: 20px;+ ${mobile`+ max-width: 500px;+ `}+`;-const PageHeader: React.FC = () => {- return (- <div className={headerStyles.row}>- <div style={{ flex: 1 }}>- <h1 className={headerStyles.title}>- Write videos programmatically in React- </h1>- <p style={{ marginBottom: 0 }}>- Use your React knowledge to create real MP4 videos. Render videos- dynamically using server-side rendering and parametrization.- </p>- <Tabs- className={headerStyles.tabContainer}- defaultValue="npm"- values={[- { label: "NPM", value: "npm" },- { label: "Yarn", value: "yarn" },- ]}- >- <TabItem value="npm">- <Snippet snippetValue={"npm init video"} />- </TabItem>-- <TabItem value="yarn">- <Snippet snippetValue={"yarn create video"} />- </TabItem>- </Tabs>- </div>- <div style={{ width: 20 }}></div>- <iframe- style={{- width: 560,- height: 315,- maxWidth: "100%",- }}- className={headerStyles.youtubeIframe}- src="https://www.youtube.com/embed/gwlDorikqgY"- title="Remotion - Create videos programmatically in React"- frameBorder="0"- allow="autoplay"- allowFullScreen- />- </div>- );-};--function Home() {+const NewLanding: React.FC = () => {return (<Layouttitle="Write videos in React"description="Create MP4 motion graphics in React. Leverage CSS, SVG, WebGL and more technologies to render videos programmatically!">- <header className={clsx("hero ", styles.heroBanner)}>- <div className="container">- <PageHeader />-- <br />- <div>- <StartPageExplainer- img="img/vscode.png"- text="Write your videos using React 17 and Typescript."- />- <StartPageExplainer- img="img/editor.png"- text="Preview your video in the browser with Fast Refresh and Timeline."- />- </div>- <div- style={{- display: "flex",- flexDirection: "row",- justifyContent: "center",- alignItems: "center",- marginTop: 50,- }}- >- <div className={styles.buttons}>- <Link- className={clsx(- "button button--outline button--secondary button--lg",- styles.getStarted- )}- to={useBaseUrl("docs/")}- >- Get Started- </Link>- </div>- <div style={{ width: 8 }}></div>- </div>- </div>- </header>- <main>- {features && features.length > 0 && (- <section className={styles.features}>- <div className="container">- <div className="row">- {features.map((props, idx) => (- <Feature key={idx} {...props} />- ))}- </div>- </div>- </section>- )}- </main>+ <Content>+ <WriteInReact></WriteInReact>+ <br />+ <br />+ <br />+ <br />+ <br />+ <IfYouKnowReact></IfYouKnowReact>+ <br />+ <br />+ <br />+ <br />+ <br />+ <RealMP4Videos></RealMP4Videos>+ <br />+ <br />+ <br />+ <br />+ <LightningFastEditor></LightningFastEditor>+ <br />+ <br />+ <br />+ <br />+ <Parametrize></Parametrize>+ <br />+ <br />+ <br />+ <br />+ <FreePricing></FreePricing>+ </Content></Layout>);-}--function StartPageExplainer(props) {- return (- <div style={{ display: "inline-block", textAlign: "center" }}>- <img- src={props.img}- alt="Screenshot Remotion Player"- style={{ maxHeight: 400 }}- />- <br />- <div style={{ fontSize: 14 }}>{props.text}</div>- </div>- );-}+};-export default Home;+export default NewLanding;diff --git a/packages/docs/src/pages/styles.module.css b/packages/docs/src/pages/styles.module.cssdeleted file mode 100644index e55e200e6d..0000000000--- a/packages/docs/src/pages/styles.module.css+++ /dev/null@@ -1,111 +0,0 @@-/* stylelint-disable docusaurus/copyright-header */--/**- * CSS files with the .module.css suffix will be treated as CSS modules- * and scoped locally.- */--.heroBanner {- padding: 4rem 0;- text-align: center;- position: relative;- overflow: hidden;-}--@media screen and (max-width: 966px) {- .heroBanner {- padding: 2rem;- }-}--.buttons {- display: flex;- align-items: center;- justify-content: center;-}--.features {- display: flex;- align-items: center;- padding: 2rem 0;- width: 100%;-}--.featureImage {- height: 200px;- width: 300px;-}--.container * {- color: white;-}--/* snippets part : */--.snippets {- max-width: 450px;- margin-top: 40px;- margin-bottom: 30px;- margin-left: auto;- margin-right: auto;-}--.snippetsTitle {- font-size: 1.3em;- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,- Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;- font-weight: 700;- line-height: 1.4;- margin-bottom: 20px;-}--.snippet {- max-width: 400px;- padding: 12px 12px 10px 20px;- background-color: #111111;- margin-bottom: 10px;- display: flex;- flex-direction: row;- align-items: center;- position: relative;- border-radius: 0.4rem;-}--.snippetValue {- color: white;- font-size: 1.5em;- font-family: monospace;-}--.copySnippet {- color: white;- right: 15px;- padding: 2px 10px;- border-radius: 0.4rem;- position: absolute;- width: fit-content;-}--.copySnippet:hover {- cursor: pointer;- background-color: rgba(255, 255, 255, 0.15);-}--@media screen and (max-width: 1200px) {- .snippet {- margin: 0 auto;- margin-bottom: 3rem;- }-}--@media screen and (max-width: 600px) {- .heroBanner {- padding: 1rem;- }- .snippetValue {- font-size: 1.25em;- }- .copySnippet {- font-size: 0.75em;- }-}diff --git a/packages/docs/static/img/code-sample.png b/packages/docs/static/img/code-sample.pngnew file mode 100644index 0000000000..9fbbe339cdBinary files /dev/null and b/packages/docs/static/img/code-sample.png differdiff --git a/packages/docs/static/img/editor.png b/packages/docs/static/img/editor.pngdeleted file mode 100644index 610e2163c4..0000000000Binary files a/packages/docs/static/img/editor.png and /dev/null differdiff --git a/packages/docs/static/img/leverage-react.png b/packages/docs/static/img/leverage-react.pngdeleted file mode 100644index 131a1bf469..0000000000Binary files a/packages/docs/static/img/leverage-react.png and /dev/null differdiff --git a/packages/docs/static/img/mp4.png b/packages/docs/static/img/mp4.pngnew file mode 100644index 0000000000..2d36a37e67Binary files /dev/null and b/packages/docs/static/img/mp4.png differdiff --git a/packages/docs/static/img/player-demo.mp4 b/packages/docs/static/img/player-demo.mp4new file mode 100644index 0000000000..0c5fa9b6c0Binary files /dev/null and b/packages/docs/static/img/player-demo.mp4 differdiff --git a/packages/docs/static/img/programmatic.png b/packages/docs/static/img/programmatic.pngdeleted file mode 100644index 4701af319e..0000000000Binary files a/packages/docs/static/img/programmatic.png and /dev/null differdiff --git a/packages/docs/static/img/vscode.png b/packages/docs/static/img/vscode.pngdeleted file mode 100644index bf978bc491..0000000000Binary files a/packages/docs/static/img/vscode.png and /dev/null differdiff --git a/packages/docs/static/img/wordcloud.png b/packages/docs/static/img/wordcloud.pngdeleted file mode 100644index f5d9614bd6..0000000000Binary files a/packages/docs/static/img/wordcloud.png and /dev/null differdiff --git a/packages/player/src/utils/use-element-size.ts b/packages/player/src/utils/use-element-size.tsindex 96e42636c2..9efccb05d3 100644--- a/packages/player/src/utils/use-element-size.ts+++ b/packages/player/src/utils/use-element-size.ts@@ -18,7 +18,7 @@ export const useElementSize = (return new ResizeObserver((entries) => {const newSize = entries[0].target.getClientRects();- if (!newSize) {+ if (!newSize || !newSize[0]) {setSize(null);return;}