🎥 Make videos programmatically with React
new icons :heart_eyes:
Jonny Burger8ad1920bb34f
diff --git a/packages/create-video/index.js b/packages/create-video/index.jsdeleted file mode 100644index 78f47616fd..0000000000--- a/packages/create-video/index.js+++ /dev/null@@ -1,5 +0,0 @@-export default () => {- throw new Error(- 'create-video is a CLI tool only. Run `yarn create video` or `npm init video` instead!'- );-};diff --git a/packages/create-video/package.json b/packages/create-video/package.jsonindex a987f997af..d8d365ed79 100644--- a/packages/create-video/package.json+++ b/packages/create-video/package.json@@ -2,7 +2,7 @@"name": "create-video","version": "3.0.4","description": "",- "main": "index.js",+ "main": "dist/index.js","bin": {"create-video": "bin.js"},diff --git a/packages/create-video/src/index.ts b/packages/create-video/src/index.tsnew file mode 100644index 0000000000..15c8987fb6--- /dev/null+++ b/packages/create-video/src/index.ts@@ -0,0 +1,13 @@+import {FEATURED_TEMPLATES} from './templates';++export const CreateVideoInternals = {+ FEATURED_TEMPLATES,+};++export {Template} from './templates';++export default () => {+ throw new Error(+ 'create-video is a CLI tool only. Run `yarn create video` or `npm init video` instead!'+ );+};diff --git a/packages/create-video/src/init.ts b/packages/create-video/src/init.tsindex 9632454078..56e95b4e7d 100644--- a/packages/create-video/src/init.ts+++ b/packages/create-video/src/init.ts@@ -13,58 +13,7 @@ import {import prompts, {selectAsync} from './prompts';import {resolveProjectRoot} from './resolve-project-root';import {stripAnsi} from './strip-ansi';--type TEMPLATES = {- shortName: string;- description: string;- org: string;- repoName: string;-};--const FEATURED_TEMPLATES: TEMPLATES[] = [- {- shortName: 'Hello World',- org: 'remotion-dev',- repoName: 'template-helloworld',- description: 'The default starter template (recommended)',- },- {- shortName: 'Blank',- description: 'Nothing except an empty canvas',- org: 'remotion-dev',- repoName: 'template-empty',- },- {- shortName: 'Hello World (Javascript)',- org: 'remotion-dev',- repoName: 'template-helloworld-javascript',- description: 'The default starter template in plain JS',- },- {- shortName: 'React Three Fiber',- org: 'remotion-dev',- repoName: 'template-three',- description: 'Remotion + React Three Fiber Starter Template',- },- {- shortName: 'Still images',- org: 'remotion-dev',- repoName: 'template-still',- description: 'Dynamic PNG/JPEG template with built-in server',- },- {- shortName: 'Text To Speech',- org: 'FelippeChemello',- repoName: 'Remotion-TTS-Example',- description: 'Turns text into speech and makes a video',- },- {- shortName: 'Audiogram',- org: 'marcusstenbeck',- repoName: 'remotion-template-audiogram',- description: 'Text and waveform visualization for podcasts',- },-];+import {FEATURED_TEMPLATES, Template} from './templates';function padEnd(str: string, width: number): string {// Pulled from commander for overriding@@ -133,7 +82,7 @@ export const init = async () => {}),},{}- )) as TEMPLATES;+ )) as Template;const pkgManager = selectPackageManager();diff --git a/packages/create-video/src/templates.ts b/packages/create-video/src/templates.tsnew file mode 100644index 0000000000..b4c24a8f55--- /dev/null+++ b/packages/create-video/src/templates.ts@@ -0,0 +1,115 @@+export type Template = {+ shortName: string;+ description: string;+ org: string;+ repoName: string;+ homePageLabel: string;+ longerDescription: string;+ promoVideo: {+ muxId: string;+ width: number;+ height: number;+ };+};++export const FEATURED_TEMPLATES: Template[] = [+ {+ homePageLabel: 'TypeScript',+ shortName: 'Hello World',+ org: 'remotion-dev',+ repoName: 'template-helloworld',+ description: 'The default starter template (recommended)',+ longerDescription:+ 'A basic template with TypeScript, Prettier and ESLint preconfigured. Our recommended choice for beginners.',+ promoVideo: {+ muxId: 'vKvV6aa7GXGlR01cmpc6J8Zz4Gkj9d2hBSnVYoef00900I',+ height: 1080,+ width: 1920,+ },+ },++ {+ homePageLabel: 'JavaScript',+ shortName: 'Hello World (Javascript)',+ org: 'remotion-dev',+ repoName: 'template-helloworld-javascript',+ description: 'The default starter template in plain JS',+ longerDescription:+ 'The Hello World template, but in plain JavaScript. Recommended for people who detest TypeScript.',+ promoVideo: {+ muxId: 'dRIuc00f8QWnKedM8GBGPqXJWqU01DPJFgPTHpJgixxas',+ width: 1920,+ height: 1080,+ },+ },+ {+ homePageLabel: 'Blank',+ shortName: 'Blank',+ description: 'Nothing except an empty canvas',+ org: 'remotion-dev',+ repoName: 'template-empty',+ longerDescription:+ 'A template containing nothing but an empty canvas. Recommended for people who already worked with Remotion.',+ promoVideo: {+ muxId: 'JD00x15y859GjqO7C9hpILkrSddGzd55K4lfj02dv8gU4',+ width: 1280,+ height: 720,+ },+ },+ {+ homePageLabel: '3D',+ shortName: 'React Three Fiber',+ org: 'remotion-dev',+ repoName: 'template-three',+ description: 'Remotion + React Three Fiber Starter Template',+ longerDescription:+ 'A template with a React Three Fiber scene to play around.',+ promoVideo: {+ muxId: 'mN40242xogVDx023lCChyg8JJBLT02Mqu01Pp00rbbk00SL8M',+ width: 1280,+ height: 720,+ },+ },+ {+ homePageLabel: 'Stills',+ shortName: 'Still images',+ org: 'remotion-dev',+ repoName: 'template-still',+ description: 'Dynamic PNG/JPEG template with built-in server',+ longerDescription:+ 'A template for creating still images. Includes a built-in HTTP server that can be deployed to Heroku.',+ promoVideo: {+ muxId: 'admEY3QofSXUf01YbLKR8KqoZXhhprTvEZCM9onSo0001o',+ height: 628,+ width: 1200,+ },+ },+ {+ homePageLabel: 'TTS',+ shortName: 'Text To Speech',+ org: 'FelippeChemello',+ repoName: 'Remotion-TTS-Example',+ description: 'Turns text into speech and makes a video',+ longerDescription:+ 'A template that turns text into a spoken video. Integrates with Azure Cloud for Speech synthesis.',+ promoVideo: {+ muxId: '8vJJ01lNuFmQCx7n59VILevqQGxRuQHp9a7VBR7B4C8k',+ width: 1920,+ height: 1080,+ },+ },+ {+ homePageLabel: 'Audiogram',+ shortName: 'Audiogram',+ org: 'marcusstenbeck',+ repoName: 'remotion-template-audiogram',+ description: 'Text and waveform visualization for podcasts',+ longerDescription:+ 'A template that turns podcast snippets into videos that can be posted on Social Media.',+ promoVideo: {+ muxId: 'nqGuji1CJuoPoU3iprRRhiy3HXiQN0201HLyliOg44HOU',+ height: 1080,+ width: 1080,+ },+ },+];diff --git a/packages/docs/package.json b/packages/docs/package.jsonindex 29858b697e..c7f5bedda9 100644--- a/packages/docs/package.json+++ b/packages/docs/package.json@@ -31,6 +31,7 @@"@remotion/player": "3.0.4","@remotion/renderer": "3.0.4","@remotion/three": "3.0.4",+ "create-video": "3.0.4","@splitbee/web": "^0.2.4","chalk": "4.1.2","clipboard": "^2.0.8",diff --git a/packages/docs/src/components/ChooseTemplate.tsx b/packages/docs/src/components/ChooseTemplate.tsxnew file mode 100644index 0000000000..ee8abc96b5--- /dev/null+++ b/packages/docs/src/components/ChooseTemplate.tsx@@ -0,0 +1,138 @@+import React, { useCallback, useState } from "react";+import { CreateVideoInternals, Template } from "create-video";+import { TemplateModal } from "./TemplateModal";+import { Blank } from "../pages/icons/blank";+import { Cubes } from "../pages/icons/cubes";+import { JSIcon } from "../pages/icons/js";+import { StillIcon } from "../pages/icons/still";+import { TypeScriptIcon } from "../pages/icons/ts";+import { TTSIcon } from "../pages/icons/tts";+import { Waveform } from "../pages/icons/waveform";+import { TemplateIcon } from "../pages/template-icon";++const IconForTemplate: React.FC<{+ template: Template;+}> = ({ template }) => {+ if (template.homePageLabel === "TypeScript") {+ return (+ <TypeScriptIcon+ style={{+ height: 48,+ }}+ ></TypeScriptIcon>+ );+ }++ if (template.homePageLabel === "Blank") {+ return (+ <Blank+ style={{+ height: 36,+ }}+ ></Blank>+ );+ }++ if (template.homePageLabel === "JavaScript") {+ return (+ <JSIcon+ style={{+ height: 40,+ }}+ ></JSIcon>+ );+ }+ if (template.homePageLabel === "3D") {+ return (+ <Cubes+ style={{+ height: 36,+ }}+ ></Cubes>+ );+ }++ if (template.homePageLabel === "Stills") {+ return (+ <StillIcon+ style={{+ height: 36,+ }}+ ></StillIcon>+ );+ }++ if (template.homePageLabel === "Audiogram") {+ return (+ <Waveform+ style={{+ height: 36,+ }}+ ></Waveform>+ );+ }+ if (template.homePageLabel === "TTS") {+ return (+ <TTSIcon+ style={{+ height: 36,+ }}+ ></TTSIcon>+ );+ }++ return (+ <Blank+ style={{+ height: 40,+ }}+ ></Blank>+ );+};++export const ChooseTemplate: React.FC = () => {+ const [modal, setModal] = useState<Template | null>(null);++ const onClick = useCallback((template: Template) => {+ setModal(template);+ }, []);++ const onDismiss = useCallback(() => {+ setModal(null);+ }, []);++ return (+ <div+ style={{+ display: "flex",+ flexDirection: "column",+ }}+ >+ {modal ? (+ <TemplateModal+ selectedTemplate={modal}+ onDismiss={onDismiss}+ ></TemplateModal>+ ) : null}+ <div style={{ flex: 1 }} />+ <div+ style={{+ display: "flex",+ flexDirection: "row",+ justifyContent: "center",+ }}+ >+ {CreateVideoInternals.FEATURED_TEMPLATES.map((template) => {+ return (+ <TemplateIcon+ onClick={() => onClick(template)}+ label={template.homePageLabel}+ >+ <IconForTemplate template={template} />+ </TemplateIcon>+ );+ })}+ </div>+ </div>+ );+};diff --git a/packages/docs/src/components/TemplateModal.tsx b/packages/docs/src/components/TemplateModal.tsxindex ed76094585..b577ef9919 100644--- a/packages/docs/src/components/TemplateModal.tsx+++ b/packages/docs/src/components/TemplateModal.tsx@@ -1,3 +1,4 @@+import { Template } from "create-video";import React, { useCallback, useEffect, useRef } from "react";import { TemplateModalContent } from "./TemplateModalContent";@@ -18,7 +19,8 @@ const container: React.CSSProperties = {export const TemplateModal: React.FC<{onDismiss: () => void;-}> = ({ onDismiss }) => {+ selectedTemplate: Template;+}> = ({ onDismiss, selectedTemplate }) => {const outer = useRef<HTMLDivElement>(null);const inner = useRef<HTMLDivElement>(null);@@ -50,7 +52,9 @@ export const TemplateModal: React.FC<{return (<div style={container} ref={outer}><div ref={inner}>- <TemplateModalContent></TemplateModalContent>+ <TemplateModalContent+ template={selectedTemplate}+ ></TemplateModalContent></div></div>);diff --git a/packages/docs/src/components/TemplateModalContent.tsx b/packages/docs/src/components/TemplateModalContent.tsxindex 95b7cefd6d..e4c248d6bd 100644--- a/packages/docs/src/components/TemplateModalContent.tsx+++ b/packages/docs/src/components/TemplateModalContent.tsx@@ -1,6 +1,94 @@-import React, { useMemo } from "react";+import { Template } from "create-video";+import React, { useCallback, useMemo, useState } from "react";+import { useElementSize } from "../helpers/use-el-size";+import { MuxVideo } from "./MuxVideo";+import { Spinner } from "./Spinner";-export const TemplateModalContent: React.FC = () => {+const RESERVED_FOR_SIDEBAR = 350;++const column: React.CSSProperties = {+ width: RESERVED_FOR_SIDEBAR,+ paddingLeft: 16,+ paddingRight: 16,+ paddingTop: 24,+ overflow: "auto",+};++const iconContainer: React.CSSProperties = {+ width: 24,+ height: 36,+ marginRight: 12,+ display: "inline-flex",+ alignItems: "center",+ justifyContent: "center",+};++const link: React.CSSProperties = {+ color: "inherit",+ display: "inline-flex",+ flexDirection: "row",+ alignItems: "center",+};++const description: React.CSSProperties = {+ fontSize: 14,+};++const githubrow: React.CSSProperties = {+ flexDirection: "row",+ alignItems: "center",+ display: "flex",+ paddingTop: 4,+ paddingBottom: 4,+ verticalAlign: "middle",+};++const loadingContainer: React.CSSProperties = {+ position: "absolute",+ justifyContent: "center",+ alignItems: "center",+ display: "flex",+};++const CommandIcon: React.FC = () => {+ return (+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" height="18">+ <path d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z" />+ </svg>+ );+};++const GithubIcon: React.FC = () => {+ return (+ <svg viewBox="0 0 496 512" height="22" width="22">+ <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"+ />+ </svg>+ );+};++const StackBlitzIcon: React.FC = () => {+ return (+ <svg viewBox="0 0 28 28" aria-hidden="true" width="24" height="24">+ <path+ fill="currentColor"+ d="M12.747 16.273h-7.46L18.925 1.5l-3.671 10.227h7.46L9.075 26.5l3.671-10.227z"+ ></path>+ </svg>+ );+};++const spinner: React.CSSProperties = {+ height: 16,+ width: 16,+};++export const TemplateModalContent: React.FC<{+ template: Template;+}> = ({ template }) => {+ const [loaded, setLoaded] = useState(false);const containerCss: React.CSSProperties = useMemo(() => {return {backgroundColor: "var(--ifm-hero-background-color)",@@ -8,10 +96,117 @@ export const TemplateModalContent: React.FC = () => {display: "flex",flexDirection: "row",overflow: "auto",- width: 100,- height: 100,};}, []);- return <div style={containerCss}></div>;+ const containerSize = useElementSize(+ typeof document === "undefined" ? null : document.body+ );+ const mobileLayout = (containerSize?.width ?? Infinity) < 900;++ const possibleVideoWidth = mobileLayout+ ? containerSize?.width+ : Math.min(containerSize?.width ?? 0, 1200) -+ (mobileLayout ? 0 : RESERVED_FOR_SIDEBAR);+ const containerHeight = mobileLayout+ ? Infinity+ : Math.min(containerSize?.height ?? 0, 800);++ const heightRatio = (containerHeight ?? 0) / template.promoVideo.height;+ const widthRatio = (possibleVideoWidth ?? 0) / template.promoVideo.width;++ const ratio = Math.min(heightRatio, widthRatio);++ const height = ratio * template.promoVideo.height;+ const width = ratio * template.promoVideo.width;++ const loadingStyle = useMemo(() => {+ return {+ ...loadingContainer,+ height,+ width,+ };+ }, [height, width]);++ const onLoadedMetadata = useCallback(() => {+ setLoaded(true);+ }, []);++ return (+ <div style={containerCss}>+ <div>+ {loaded ? null : (+ <div style={loadingStyle}>+ <Spinner style={spinner} />+ </div>+ )}+ <MuxVideo+ muxId={template.promoVideo.muxId}+ loop+ height={height}+ width={width}+ autoPlay+ muted+ onLoadedMetadata={onLoadedMetadata}+ />+ </div>+ <div style={column}>+ <h1>{template.shortName}</h1>+ <div style={description}>{template.longerDescription}</div>+ <br />++ <div style={githubrow}>+ <div style={iconContainer}>+ <CommandIcon></CommandIcon>+ </div>+ npm init video+ </div>+ <div style={githubrow}>+ <a+ style={link}+ href={`https://github.com/${template.org}/${template.repoName}/generate`}+ >+ <div style={iconContainer}>+ <GithubIcon></GithubIcon>+ </div>{" "}+ Use template+ </a>+ <span+ style={{+ whiteSpace: "pre",+ color: "var(--light-text-color)",+ }}+ >+ {" "}+ |{" "}+ </span>+ <a+ target={"_blank"}+ style={link}+ href={`https://github.com/${template.org}/${template.repoName}`}+ >+ View source+ </a>+ </div>+ <a+ target={"_blank"}+ style={link}+ href={`https://stackblitz.com/github/${template.org}/${template.repoName}`}+ >+ <div style={githubrow}>+ <div style={iconContainer}>+ <StackBlitzIcon></StackBlitzIcon>+ </div>+ Try online{" "}+ <span+ style={{ whiteSpace: "pre", color: "var(--light-text-color)" }}+ >+ {" "}+ via StackBlitz+ </span>+ </div>+ </a>+ </div>+ </div>+ );};diff --git a/packages/docs/src/pages/ChooseTemplate.tsx b/packages/docs/src/pages/ChooseTemplate.tsxdeleted file mode 100644index 73091e2135..0000000000--- a/packages/docs/src/pages/ChooseTemplate.tsx+++ /dev/null@@ -1,63 +0,0 @@-import React, { useCallback, useState } from "react";-import { TemplateModal } from "../components/TemplateModal";-import { Blank } from "./icons/blank";-import { Cubes } from "./icons/cubes";-import { JSIcon } from "./icons/js";-import { Next } from "./icons/next";-import { TypeScriptIcon } from "./icons/ts";-import { TTSIcon } from "./icons/tts";-import { Waveform } from "./icons/waveform";-import { TemplateIcon } from "./template-icon";--export const ChooseTemplate: React.FC = () => {- const [modal, setModal] = useState(false);-- const onClick = useCallback(() => {- setModal(true);- }, []);-- const onDismiss = useCallback(() => {- setModal(false);- }, []);-- return (- <div- style={{- display: "flex",- flexDirection: "column",- }}- >- {modal ? <TemplateModal onDismiss={onDismiss}></TemplateModal> : null}- <div style={{ flex: 1 }} />- <div- style={{- display: "flex",- flexDirection: "row",- justifyContent: "center",- }}- >- <TemplateIcon onClick={onClick} label={"Blank Project"}>- <Blank style={{ height: 40 }} />- </TemplateIcon>- <TemplateIcon label={"Hello World"}>- <TypeScriptIcon style={{ height: 40 }} />- </TemplateIcon>- <TemplateIcon label={"Plain Javascript"}>- <JSIcon style={{ width: 40 }} />- </TemplateIcon>- <TemplateIcon label={"Audio Visualizer"}>- <Waveform style={{ width: 40 }} />- </TemplateIcon>- <TemplateIcon label={"3D Video"}>- <Cubes style={{ width: 40 }} />- </TemplateIcon>- <TemplateIcon label={"Text to Speech"}>- <TTSIcon style={{ height: 40 }} />- </TemplateIcon>- <TemplateIcon label={"Next.JS project"}>- <Next style={{ width: 60 }} />- </TemplateIcon>- </div>- </div>- );-};diff --git a/packages/docs/src/pages/icons/blank.tsx b/packages/docs/src/pages/icons/blank.tsxindex bd1c7709c7..0c75421b00 100644--- a/packages/docs/src/pages/icons/blank.tsx+++ b/packages/docs/src/pages/icons/blank.tsx@@ -2,20 +2,10 @@ import React, { SVGProps } from "react";export const Blank: React.FC<SVGProps<SVGSVGElement>> = (props) => {return (- <svg- aria-hidden="true"- focusable="false"- data-prefix="far"- data-icon="file"- className="svg-inline--fa fa-file fa-w-12"- role="img"- xmlns="http://www.w3.org/2000/svg"- viewBox="0 0 384 512"- {...props}- >+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" {...props}><pathfill="currentColor"- d="M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"+ d="M0 64C0 28.65 28.65 0 64 0H220.1C232.8 0 245.1 5.057 254.1 14.06L369.9 129.9C378.9 138.9 384 151.2 384 163.9V448C384 483.3 355.3 512 320 512H64C28.65 512 0 483.3 0 448V64zM352 192H240C213.5 192 192 170.5 192 144V32H64C46.33 32 32 46.33 32 64V448C32 465.7 46.33 480 64 480H320C337.7 480 352 465.7 352 448V192zM347.3 152.6L231.4 36.69C229.4 34.62 226.8 33.18 224 32.48V144C224 152.8 231.2 160 240 160H351.5C350.8 157.2 349.4 154.6 347.3 152.6z"/></svg>);diff --git a/packages/docs/src/pages/icons/cubes.tsx b/packages/docs/src/pages/icons/cubes.tsxindex 5a59667ddb..9a00ec4fb2 100644--- a/packages/docs/src/pages/icons/cubes.tsx+++ b/packages/docs/src/pages/icons/cubes.tsx@@ -2,20 +2,10 @@ import React, { SVGProps } from "react";export const Cubes: React.FC<SVGProps<SVGSVGElement>> = (props) => {return (- <svg- aria-hidden="true"- focusable="false"- data-prefix="fas"- data-icon="cubes"- className="svg-inline--fa fa-cubes fa-w-16"- role="img"- xmlns="http://www.w3.org/2000/svg"- viewBox="0 0 512 512"- {...props}- >+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props}><pathfill="currentColor"- d="M488.6 250.2L392 214V105.5c0-15-9.3-28.4-23.4-33.7l-100-37.5c-8.1-3.1-17.1-3.1-25.3 0l-100 37.5c-14.1 5.3-23.4 18.7-23.4 33.7V214l-96.6 36.2C9.3 255.5 0 268.9 0 283.9V394c0 13.6 7.7 26.1 19.9 32.2l100 50c10.1 5.1 22.1 5.1 32.2 0l103.9-52 103.9 52c10.1 5.1 22.1 5.1 32.2 0l100-50c12.2-6.1 19.9-18.6 19.9-32.2V283.9c0-15-9.3-28.4-23.4-33.7zM358 214.8l-85 31.9v-68.2l85-37v73.3zM154 104.1l102-38.2 102 38.2v.6l-102 41.4-102-41.4v-.6zm84 291.1l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6zm240 112l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6z"+ d="M239.5 5.018C250.1 1.106 261.9 1.106 272.5 5.018L480.5 81.28C499.4 88.22 512 106.2 512 126.4V385.7C512 405.8 499.4 423.8 480.5 430.7L272.5 506.1C261.9 510.9 250.1 510.9 239.5 506.1L31.48 430.7C12.57 423.8 0 405.8 0 385.7V126.4C0 106.2 12.57 88.22 31.48 81.28L239.5 5.018zM261.5 35.06C257.1 33.76 254 33.76 250.5 35.06L44.14 110.7L256 193.1L467.9 110.7L261.5 35.06zM42.49 400.7L240 473.1V222L32 140.3V385.7C32 392.4 36.19 398.4 42.49 400.7V400.7zM272 473.1L469.5 400.7C475.8 398.4 480 392.4 480 385.7V140.3L272 222V473.1z"/></svg>);diff --git a/packages/docs/src/pages/icons/next.tsx b/packages/docs/src/pages/icons/next.tsxdeleted file mode 100644index 8de5c1cd65..0000000000--- a/packages/docs/src/pages/icons/next.tsx+++ /dev/null@@ -1,45 +0,0 @@-import React, { SVGProps } from "react";--export const Next: React.FC<SVGProps<SVGSVGElement>> = () => {- return (- <svg- width="207px"- height="124px"- viewBox="0 0 207 124"- version="1.1"- xmlns="http://www.w3.org/2000/svg"- >- <g- id="Page-1"- stroke="none"- strokeWidth="1"- fill="none"- fillRule="evenodd"- >- <g- id="Black-Next.js"- transform="translate(-247.000000, -138.000000)"- fill="currentColor"- fillRule="nonzero"- >- <g id="next-black" transform="translate(247.000000, 138.000000)">- <g id="EXT-+-Type-something">- <path- d="M48.9421964,32.6320058 L87.9011585,32.6320058 L87.9011585,35.7136421 L52.5134345,35.7136421 L52.5134345,58.9070103 L85.7908813,58.9070103 L85.7908813,61.9886466 L52.5134345,61.9886466 L52.5134345,87.4526941 L88.306981,87.4526941 L88.306981,90.5343303 L48.9421964,90.5343303 L48.9421964,32.6320058 Z M91.3912326,32.6320058 L95.5306221,32.6320058 L113.8738,58.0960534 L132.622801,32.6320058 L158.124498,0.286809811 L116.22757,60.7722112 L137.817329,90.5343303 L133.51561,90.5343303 L113.8738,63.4483691 L94.1508254,90.5343303 L89.9302715,90.5343303 L111.682358,60.7722112 L91.3912326,32.6320058 Z M139.359455,35.713642 L139.359455,32.6320058 L183.756439,32.6320058 L183.756439,35.7136421 L163.302983,35.7136421 L163.302983,90.5343303 L159.731745,90.5343303 L159.731745,35.7136421 L139.359455,35.713642 Z"- id="EXT"- />- <polygon- id="Type-something"- points="0.202923647 32.6320058 4.66697141 32.6320058 66.2235778 124.303087 40.785176 90.5343303 3.93649086 37.0111732 3.77416185 90.5343303 0.202923647 90.5343303"- />- </g>- <path- d="M183.396622,86.5227221 C184.134938,86.5227221 184.673474,85.9601075 184.673474,85.233037 C184.673474,84.5059658 184.134938,83.9433513 183.396622,83.9433513 C182.666993,83.9433513 182.11977,84.5059658 182.11977,85.233037 C182.11977,85.9601075 182.666993,86.5227221 183.396622,86.5227221 Z M186.905793,83.1297235 C186.905793,85.2763149 188.460599,86.678523 190.727662,86.678523 C193.142388,86.678523 194.601647,85.233037 194.601647,82.7229099 L194.601647,73.8855335 L192.655968,73.8855335 L192.655968,82.7142542 C192.655968,84.1078073 191.952397,84.8521899 190.710289,84.8521899 C189.598473,84.8521899 188.842785,84.1597409 188.816727,83.1297235 L186.905793,83.1297235 Z M197.146664,83.0172011 C197.285642,85.2503478 199.153145,86.678523 201.932686,86.678523 C204.903321,86.678523 206.762139,85.1811034 206.762139,82.792155 C206.762139,80.9138876 205.702439,79.8752151 203.131364,79.2779777 L201.750279,78.9404092 C200.117298,78.5595622 199.457158,78.0488813 199.457158,77.1573541 C199.457158,76.0321243 200.482113,75.296398 202.019547,75.296398 C203.478806,75.296398 204.48639,76.0148135 204.668797,77.1660091 L206.562359,77.1660091 C206.44944,75.0626962 204.590622,73.5825873 202.045605,73.5825873 C199.309495,73.5825873 197.48542,75.0626962 197.48542,77.2871878 C197.48542,79.1221767 198.519063,80.2127835 200.786126,80.7407758 L202.401734,81.1302779 C204.060773,81.5197807 204.790402,82.091051 204.790402,83.0431676 C204.790402,84.1510859 203.643842,84.9560573 202.08035,84.9560573 C200.403939,84.9560573 199.240006,84.2030196 199.074971,83.0172011 L197.146664,83.0172011 Z"- id=".JS"- />- </g>- </g>- </g>- </svg>- );-};diff --git a/packages/docs/src/pages/icons/still.tsx b/packages/docs/src/pages/icons/still.tsxnew file mode 100644index 0000000000..1949e89045--- /dev/null+++ b/packages/docs/src/pages/icons/still.tsx@@ -0,0 +1,12 @@+import React, { SVGProps } from "react";++export const StillIcon: React.FC<SVGProps<SVGSVGElement>> = (props) => {+ return (+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props}>+ <path+ fill="currentColor"+ d="M324.9 157.8c-11.38-17.38-39.89-17.31-51.23-.0625L200.5 268.5L184.1 245.9C172.7 229.1 145.9 229.9 134.4 245.9l-64.52 89.16c-6.797 9.406-7.75 21.72-2.547 32C72.53 377.5 83.05 384 94.75 384h322.5c11.41 0 21.8-6.281 27.14-16.38c5.312-10 4.734-22.09-1.516-31.56L324.9 157.8zM95.8 352l62.39-87.38l29.91 41.34C191.2 310.2 196.4 313.2 201.4 312.6c5.25-.125 10.12-2.781 13.02-7.188l83.83-129.9L415 352H95.8zM447.1 32h-384C28.65 32-.0091 60.65-.0091 96v320c0 35.35 28.65 64 63.1 64h384c35.35 0 64-28.65 64-64V96C511.1 60.65 483.3 32 447.1 32zM480 416c0 17.64-14.36 32-32 32H64c-17.64 0-32-14.36-32-32V96c0-17.64 14.36-32 32-32h384c17.64 0 32 14.36 32 32V416zM144 192C170.5 192 192 170.5 192 144S170.5 96 144 96S96 117.5 96 144S117.5 192 144 192zM144 128c8.822 0 15.1 7.178 15.1 16S152.8 160 144 160S128 152.8 128 144S135.2 128 144 128z"+ />+ </svg>+ );+};diff --git a/packages/docs/src/pages/icons/ts.tsx b/packages/docs/src/pages/icons/ts.tsxindex 9b08410719..47f1b5f02b 100644--- a/packages/docs/src/pages/icons/ts.tsx+++ b/packages/docs/src/pages/icons/ts.tsx@@ -3,19 +3,14 @@ import React, { SVGProps } from "react";export const TypeScriptIcon: React.FC<SVGProps<SVGSVGElement>> = (props) => {return (<svg- aria-hidden="true"- focusable="false"- data-prefix="fas"- data-icon="globe-europe"- className="svg-inline--fa fa-globe-europe fa-w-16"- role="img"+ fill="#000000"xmlns="http://www.w3.org/2000/svg"- viewBox="0 0 496 512"+ viewBox="0 0 24 24"{...props}><pathfill="currentColor"- d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm200 248c0 22.5-3.9 44.2-10.8 64.4h-20.3c-4.3 0-8.4-1.7-11.4-4.8l-32-32.6c-4.5-4.6-4.5-12.1.1-16.7l12.5-12.5v-8.7c0-3-1.2-5.9-3.3-8l-9.4-9.4c-2.1-2.1-5-3.3-8-3.3h-16c-6.2 0-11.3-5.1-11.3-11.3 0-3 1.2-5.9 3.3-8l9.4-9.4c2.1-2.1 5-3.3 8-3.3h32c6.2 0 11.3-5.1 11.3-11.3v-9.4c0-6.2-5.1-11.3-11.3-11.3h-36.7c-8.8 0-16 7.2-16 16v4.5c0 6.9-4.4 13-10.9 15.2l-31.6 10.5c-3.3 1.1-5.5 4.1-5.5 7.6v2.2c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8s-3.6-8-8-8H247c-3 0-5.8 1.7-7.2 4.4l-9.4 18.7c-2.7 5.4-8.2 8.8-14.3 8.8H194c-8.8 0-16-7.2-16-16V199c0-4.2 1.7-8.3 4.7-11.3l20.1-20.1c4.6-4.6 7.2-10.9 7.2-17.5 0-3.4 2.2-6.5 5.5-7.6l40-13.3c1.7-.6 3.2-1.5 4.4-2.7l26.8-26.8c2.1-2.1 3.3-5 3.3-8 0-6.2-5.1-11.3-11.3-11.3H258l-16 16v8c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8v-20c0-2.5 1.2-4.9 3.2-6.4l28.9-21.7c1.9-.1 3.8-.3 5.7-.3C358.3 56 448 145.7 448 256zM130.1 149.1c0-3 1.2-5.9 3.3-8l25.4-25.4c2.1-2.1 5-3.3 8-3.3 6.2 0 11.3 5.1 11.3 11.3v16c0 3-1.2 5.9-3.3 8l-9.4 9.4c-2.1 2.1-5 3.3-8 3.3h-16c-6.2 0-11.3-5.1-11.3-11.3zm128 306.4v-7.1c0-8.8-7.2-16-16-16h-20.2c-10.8 0-26.7-5.3-35.4-11.8l-22.2-16.7c-11.5-8.6-18.2-22.1-18.2-36.4v-23.9c0-16 8.4-30.8 22.1-39l42.9-25.7c7.1-4.2 15.2-6.5 23.4-6.5h31.2c10.9 0 21.4 3.9 29.6 10.9l43.2 37.1h18.3c8.5 0 16.6 3.4 22.6 9.4l17.3 17.3c3.4 3.4 8.1 5.3 12.9 5.3H423c-32.4 58.9-93.8 99.5-164.9 103.1z"+ d="M3,5v14c0,1.105,0.895,2,2,2h14c1.105,0,2-0.895,2-2V5c0-1.105-0.895-2-2-2H5C3.895,3,3,3.895,3,5z M13.666,12.451h-2.118 V19H9.841v-6.549H7.767V11h5.899V12.451z M13.998,18.626v-1.751c0,0,0.956,0.721,2.104,0.721c1.148,0,1.103-0.75,1.103-0.853 c0-1.089-3.251-1.089-3.251-3.501c0-3.281,4.737-1.986,4.737-1.986l-0.059,1.559c0,0-0.794-0.53-1.692-0.53 c-0.897,0-1.221,0.427-1.221,0.883c0,1.177,3.281,1.059,3.281,3.428C19,20.244,13.998,18.626,13.998,18.626z"/></svg>);diff --git a/packages/docs/src/pages/icons/tts.tsx b/packages/docs/src/pages/icons/tts.tsxindex bdfa19e790..9aa16c36ac 100644--- a/packages/docs/src/pages/icons/tts.tsx+++ b/packages/docs/src/pages/icons/tts.tsx@@ -2,20 +2,10 @@ import React, { SVGProps } from "react";export const TTSIcon: React.FC<SVGProps<SVGSVGElement>> = (props) => {return (- <svg- aria-hidden="true"- focusable="false"- data-prefix="fas"- data-icon="volume"- className="svg-inline--fa fa-volume fa-w-15"- role="img"- xmlns="http://www.w3.org/2000/svg"- viewBox="0 0 480 512"- {...props}- >+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props}><pathfill="currentColor"- d="M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zM480 256c0-63.53-32.06-121.94-85.77-156.24-11.19-7.14-26.03-3.82-33.12 7.46s-3.78 26.21 7.41 33.36C408.27 165.97 432 209.11 432 256s-23.73 90.03-63.48 115.42c-11.19 7.14-14.5 22.07-7.41 33.36 6.51 10.36 21.12 15.14 33.12 7.46C447.94 377.94 480 319.53 480 256zm-141.77-76.87c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 228.28 336 241.63 336 256c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.86z"+ d="M256 31.1c-141.4 0-255.1 93.13-255.1 208c0 47.62 19.91 91.25 52.91 126.3c-14.87 39.5-45.87 72.88-46.37 73.25c-6.623 7-8.373 17.25-4.623 26C5.816 474.3 14.38 480 24 480c61.49 0 109.1-25.75 139.1-46.25c28.1 9 60.16 14.25 92.9 14.25c141.4 0 255.1-93.13 255.1-207.1S397.4 31.1 256 31.1zM256 416c-28.25 0-56.24-4.25-83.24-12.75c-9.516-3.068-19.92-1.461-28.07 4.338c-22.1 16.25-58.54 35.29-102.7 39.66c11.1-15.12 29.75-40.5 40.74-69.63l.1289-.3398c4.283-11.27 1.791-23.1-6.43-32.82C47.51 313.1 32.06 277.6 32.06 240c0-97 100.5-176 223.1-176c123.5 0 223.1 79 223.1 176S379.5 416 256 416zM272 272h-128c-8.801 0-16 7.199-16 15.1C127.1 296.8 135.2 304 144 304h128c8.801 0 15.1-7.204 15.1-16C287.1 279.2 280.8 272 272 272zM368 176h-224c-8.801 0-16 7.199-16 15.1C127.1 200.8 135.2 208 144 208h224c8.801 0 15.1-7.204 15.1-16C383.1 183.2 376.8 176 368 176z"/></svg>);diff --git a/packages/docs/src/pages/icons/waveform.tsx b/packages/docs/src/pages/icons/waveform.tsxindex 1a2cfd10f1..4197cc7f4f 100644--- a/packages/docs/src/pages/icons/waveform.tsx+++ b/packages/docs/src/pages/icons/waveform.tsx@@ -2,20 +2,10 @@ import React, { SVGProps } from "react";export const Waveform: React.FC<SVGProps<SVGSVGElement>> = (props) => {return (- <svg- aria-hidden="true"- focusable="false"- data-prefix="fas"- data-icon="waveform"- className="svg-inline--fa fa-waveform fa-w-20"- role="img"- xmlns="http://www.w3.org/2000/svg"- viewBox="0 0 640 512"- {...props}- >+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" {...props}><pathfill="currentColor"- d="M140 192h-24a16 16 0 0 0-16 16v96a16 16 0 0 0 16 16h24a16 16 0 0 0 16-16v-96a16 16 0 0 0-16-16zm-96 32H20a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h24a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM236 96h-24a16 16 0 0 0-16 16v288a16 16 0 0 0 16 16h24a16 16 0 0 0 16-16V112a16 16 0 0 0-16-16zm384 128h-24a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h24a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM524 64h-24a16 16 0 0 0-16 16v352a16 16 0 0 0 16 16h24a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm-96 64h-24a16 16 0 0 0-16 16v224a16 16 0 0 0 16 16h24a16 16 0 0 0 16-16V144a16 16 0 0 0-16-16zM332 0h-24a16 16 0 0 0-16 16v480a16 16 0 0 0 16 16h24a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16z"+ d="M224 96C215.2 96 208 103.2 208 111.1v288C208 408.8 215.2 416 223.1 416C232.8 416 240 408.8 240 400V111.1C240 103.2 232.8 96 224 96zM128 192C119.2 192 112 199.2 112 207.1V304C112 312.8 119.2 320 127.1 320S144 312.8 144 304V207.1C144 199.2 136.8 192 128 192zM32 224C23.2 224 16 231.2 16 239.1V272C16 280.8 23.2 288 31.1 288S48 280.8 48 272V239.1C48 231.2 40.8 224 32 224zM416 128C407.2 128 400 135.2 400 143.1v224C400 376.8 407.2 384 415.1 384S432 376.8 432 368V143.1C432 135.2 424.8 128 416 128zM608 224c-8.8 0-16 7.2-16 15.1V272C592 280.8 599.2 288 608 288s16-7.2 16-15.1V239.1C624 231.2 616.8 224 608 224zM512 64c-8.8 0-16 7.2-16 15.1V432C496 440.8 503.2 448 511.1 448C520.8 448 528 440.8 528 432V79.1C528 71.2 520.8 64 512 64zM320 0C311.2 0 304 7.2 304 15.1V496C304 504.8 311.2 512 319.1 512S336 504.8 336 496V15.1C336 7.2 328.8 0 320 0z"/></svg>);diff --git a/packages/docs/src/pages/index.tsx b/packages/docs/src/pages/index.tsxindex 1a19cb0561..84a18b6fe8 100644--- a/packages/docs/src/pages/index.tsx+++ b/packages/docs/src/pages/index.tsx@@ -9,7 +9,7 @@ import { Parametrize } from "../../components/LandingPage/parametrize";import { RealMP4Videos } from "../../components/LandingPage/real-mp4-videos";import { SuccessFeatures } from "../../components/LandingPage/SuccessFeatures";import { WriteInReact } from "../../components/LandingPage/WriteInReact";-import { ChooseTemplate } from "./ChooseTemplate";+import { ChooseTemplate } from "../components/ChooseTemplate";import styles from "./landing.module.css";import { VideoApps } from "../../components/LambdaSplash/VideoApps";import { VideoAppsTitle } from "../../components/LambdaSplash/VideoAppsTitle";diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 7e150f25d8..a3b6df8471 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -294,6 +294,7 @@ importers:clipboard: ^2.0.8clsx: ^1.1.1color-namer: 1.4.0+ create-video: 3.0.4eslint: 8.13.0hls.js: ^0.14.17jest: ^27.2.4@@ -328,6 +329,7 @@ importers:clipboard: 2.0.8clsx: 1.1.1color-namer: 1.4.0+ create-video: link:../create-videohls.js: 0.14.17jest: 27.2.4polished: 4.1.2