🎥 Make videos programmatically with React
editor starter docs updates
JonnyBurgerb4c1bcff2040
diff --git a/packages/docs/docs/editor-starter/TableOfContents.tsx b/packages/docs/docs/editor-starter/TableOfContents.tsxindex 0bb03e7334..2d39d9c03c 100644--- a/packages/docs/docs/editor-starter/TableOfContents.tsx+++ b/packages/docs/docs/editor-starter/TableOfContents.tsx@@ -8,31 +8,35 @@ export const TableOfContents: React.FC = () => {<Grid><TOCItem link="/docs/editor-starter/setup"><strong>Setup</strong>- <div>Installation and configuration guide.</div>+ <div>Installation and configuration guide</div></TOCItem><TOCItem link="/docs/editor-starter/features"><strong>Features</strong>- <div>Features included in the Editor Starter.</div>+ <div>Features included in the Editor Starter</div></TOCItem><TOCItem link="/docs/editor-starter/fonts"><strong>Fonts</strong>- <div>Fonts included in the Editor Starter.</div>+ <div>How fonts work and which ones are included</div></TOCItem><TOCItem link="/docs/editor-starter/captioning"><strong>Captioning</strong>- <div>How to setup captions and how they work.</div>+ <div>How to setup captions and how they work</div>+ </TOCItem>+ <TOCItem link="/docs/editor-starter/rendering">+ <strong>Rendering</strong>+ <div>How to setup exports and how they work</div></TOCItem><TOCItem link="/docs/editor-starter/asset-uploads"><strong>Asset Uploads</strong>- <div>Asset upload functionality in the Editor Starter.</div>+ <div>Asset upload functionality in the Editor Starter</div></TOCItem>- <TOCItem link="/docs/editor-starter/undo-and-redo">+ <TOCItem link="/docs/editor-starter/undo-redo"><strong>Undo and Redo</strong>- <div>Undo and Redo functionality in the Editor Starter.</div>+ <div>Undo and Redo functionality in the Editor Starter</div></TOCItem><TOCItem link="/docs/editor-starter/features-not-included"><strong>Features not included</strong>- <div>Features not included in the Editor Starter.</div>+ <div>Features not included in the Editor Starter</div></TOCItem><TOCItem link="/docs/editor-starter/faq"><strong>FAQ</strong>diff --git a/packages/docs/docs/editor-starter/features-not-included.mdx b/packages/docs/docs/editor-starter/features-not-included.mdxindex 3880965eb2..e43f1b1e3d 100644--- a/packages/docs/docs/editor-starter/features-not-included.mdx+++ b/packages/docs/docs/editor-starter/features-not-included.mdx@@ -82,6 +82,10 @@ It is left up to you to decide how to handle long audio files.There is only one theme, a dark one.+## Snapping++There is no magnetic "snapping" feature out of the box that aligns items based on the position of other items or the canvas bounds.+## See also- [Features included in the Editor Starter](/docs/editor-starter/features)diff --git a/packages/docs/docs/editor-starter/rendering.mdx b/packages/docs/docs/editor-starter/rendering.mdxnew file mode 100644index 0000000000..b564fe6607--- /dev/null+++ b/packages/docs/docs/editor-starter/rendering.mdx@@ -0,0 +1,9 @@+---+image: /generated/articles-docs-editor-starter-rendering.png+title: Rendering+sidebar_label: Rendering+id: rendering+crumb: Editor Starter+---++TODOdiff --git a/packages/docs/docs/editor-starter/tracks-items-assets.mdx b/packages/docs/docs/editor-starter/tracks-items-assets.mdxnew file mode 100644index 0000000000..e8e1c06efe--- /dev/null+++ b/packages/docs/docs/editor-starter/tracks-items-assets.mdx@@ -0,0 +1,38 @@+---+title: Tracks, items and assets in the Editor Starter+sidebar_label: Tracks, items, assets+id: tracks-items-assets+crumb: Editor Starter+---++The state of the Editor Starter contains different data types:++- **Assets**: Assets refer to media files, such as images, videos, audio, GIFs and captions.+- **Items**: Items are the data type that is represented in the timeline and rendered in the canvas.+- **Tracks**: A track can contain multiple items. Tracks are stacked above each other, with the track showing at the top rendering the items in the front.++The relationship between these entities is as following:++- An item may refer to up to one asset.+- Multiple items may refer the same asset.+- A track may contain multiple items (different types are allowed).+- An item can only belong to one track.+- Items in a track may not overlap.++## Items++The different items are defined by the type [`ItemType`](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter%20type%20ItemType&type=code).+By default, there are the following items:++- [`ImageItem`](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter+type+ImageItem&type=code)+- [`TextItem`](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter+type+textItem&type=code)+- [`VideoItem`](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter+type+videoitem&type=code)+- [`GifItem`](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter+type+gifitem&type=code)+- [`SolidItem`](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter+type+soliditem&type=code)+- [`AudioItem`](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter+type+soliditem&type=code)+- [`CaptionsItem`](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter+type+captionsitem&type=code)++To add a new item type, copy the logic of one of the items, change it, and add it to the [`ItemType`](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter%20type%20ItemType&type=code) union.+A lot of errors should appear when you run the typechecker in your console: `npx tsc -w`++These errors are intentional and are supposed to guide you towards where in the code you need to add implementations for certain things in order to support the new item type.diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.tsindex a761039aa3..f295c3151d 100644--- a/packages/docs/sidebars.ts+++ b/packages/docs/sidebars.ts@@ -1355,6 +1355,7 @@ const sidebars: SidebarsConfig = {'editor-starter/fonts','editor-starter/asset-uploads','editor-starter/undo-redo',+ 'editor-starter/tracks-items-assets','editor-starter/faq','editor-starter/backend-routes','editor-starter/features-not-included',diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.tsindex 2f0b914262..c5cccf3432 100644--- a/packages/docs/src/data/articles.ts+++ b/packages/docs/src/data/articles.ts@@ -1358,6 +1358,15 @@ export const articles = [noAi: false,slug: 'editor-starter/index',},+ {+ id: 'rendering',+ title: 'Rendering',+ relativePath: 'docs/editor-starter/rendering.mdx',+ compId: 'articles-docs-editor-starter-rendering',+ crumb: 'Editor Starter',+ noAi: false,+ slug: 'editor-starter/rendering',+ },{id: 'setup',title: 'Setup',diff --git a/packages/docs/static/generated/articles-docs-editor-starter-rendering.png b/packages/docs/static/generated/articles-docs-editor-starter-rendering.pngnew file mode 100644index 0000000000..382f706934Binary files /dev/null and b/packages/docs/static/generated/articles-docs-editor-starter-rendering.png differ