🎥 Make videos programmatically with React
vibing
Jonny Burger04261d5e71f9
diff --git a/packages/convert/app/components/timing-editor/AnimationDuration.tsx b/packages/convert/app/components/timing-editor/AnimationDuration.tsxindex b15d8050c7..d38d14dc5b 100644--- a/packages/convert/app/components/timing-editor/AnimationDuration.tsx+++ b/packages/convert/app/components/timing-editor/AnimationDuration.tsx@@ -30,7 +30,7 @@ export const AnimationDuration: React.FC<{><svg height="1em" viewBox="0 0 512 512"><path- fill="white"+ fill="black"d="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg>diff --git a/packages/convert/app/components/timing-editor/Sidebar.tsx b/packages/convert/app/components/timing-editor/Sidebar.tsxindex 8d215a92fe..2ab029aa1c 100644--- a/packages/convert/app/components/timing-editor/Sidebar.tsx+++ b/packages/convert/app/components/timing-editor/Sidebar.tsx@@ -14,25 +14,8 @@ export const Sidebar: React.FC<{readonly onRelease: () => void;}> = ({config, calculatedDurationInFrames, onModeChange, onChange, onRelease}) => {return (- <div- id="spring-sidebar"- className="p-4"- style={{- display: 'flex',- flexDirection: 'column',- borderRight: '1px solid #242424',- }}- >- <div- style={{- fontFamily: 'GTPlanar',- fontWeight: 'bold',- fontSize: 20,- marginBottom: 16,- }}- >- Timing Editor- </div>+ <div className="p-4 flex flex-col border-r border-[#242424] flex-1 w-full overflow-y-auto md:w-[400px] md:h-full md:flex-none">+ <div className="font-brand font-bold text-xl mb-4">Timing Editor</div><Tabsvalue={config.type}onValueChange={(value) =>diff --git a/packages/convert/app/components/timing-editor/TimingEditor.tsx b/packages/convert/app/components/timing-editor/TimingEditor.tsxindex d20d68eb53..f58fcfd00c 100644--- a/packages/convert/app/components/timing-editor/TimingEditor.tsx+++ b/packages/convert/app/components/timing-editor/TimingEditor.tsx@@ -70,26 +70,8 @@ export function TimingEditor() {const draggedDuration = draggedConfig ? getDuration(draggedConfig) : null;return (- <div- style={{- display: 'flex',- justifyContent: 'center',- alignItems: 'center',- height: '100%',- width: '100%',- position: 'absolute',- flexDirection: 'column',- }}- >- <div- id="spring-app"- style={{- display: 'flex',- overflow: 'hidden',- width: '100%',- flex: 1,- }}- >+ <div className="flex justify-center items-center h-full w-full absolute flex-col">+ <div className="flex overflow-hidden w-full flex-1 flex-col md:flex-row"><Sidebarconfig={currentConfig}calculatedDurationInFrames={duration}@@ -97,7 +79,7 @@ export function TimingEditor() {onChange={onChange}onRelease={onRelease}/>- <div id="spring-canvas">+ <div className="flex flex-col h-[300px] w-full border-b border-[#242424] md:h-auto md:flex-1 md:border-b-0"><CanvasWrapperconfig={config}draggedConfig={draggedConfig}@@ -105,7 +87,7 @@ export function TimingEditor() {duration={duration}fps={fps}/>- <div id="spring-animation-preview">+ <div className="hidden md:flex flex-row justify-center"><AnimationPreview animation="Scale" id="spring-scale" /><AnimationPreview animation="Translate" id="spring-translate" /><AnimationPreview animation="Rotate" id="spring-rotate" />diff --git a/packages/convert/app/components/timing-editor/draw.ts b/packages/convert/app/components/timing-editor/draw.tsindex d0fba484c3..3a9ac4d6f9 100644--- a/packages/convert/app/components/timing-editor/draw.ts+++ b/packages/convert/app/components/timing-editor/draw.ts@@ -77,9 +77,6 @@ export const draw = ({16;const formatAxisLabel = (value: number) => {- if (Number.isInteger(value)) {- return value.toString();- }return value.toFixed(2);};diff --git a/packages/convert/app/tailwind.css b/packages/convert/app/tailwind.cssindex b1e3982eb1..e8a1e8bf04 100644--- a/packages/convert/app/tailwind.css+++ b/packages/convert/app/tailwind.css@@ -164,55 +164,3 @@@apply bg-background text-foreground;}}--/* Timing Editor Styles */-.timing-editor-page {- height: 100vh;- width: 100vw;-}--#spring-app {- flex-direction: row;-}--#spring-canvas {- display: flex;- flex-direction: column;-}--#spring-sidebar {- width: 400px;- height: 100%;-}--#spring-animation-preview {- display: flex;- flex-direction: row;- justify-content: center;-}--@media screen and (max-width: 900px) {- #spring-app {- flex-direction: column;- }- #spring-sidebar {- flex: 1;- width: 100%;- overflow-y: auto;- }- #spring-canvas {- height: 300px;- width: 100%;- display: block;- border-bottom: 1px solid #242424;- }- #spring-animation-preview {- display: none;- }-}--@media screen and (min-width: 901px) {- #spring-canvas {- flex: 1;- }-}