Skip to content

🎥 Make videos programmatically with React

rename to zod-types

Jonny Burger38d8e6f259df
diff --git a/packages/cli/.eslintrc b/packages/cli/.eslintrc
index 8e9d1e4c1d..ab99307a23 100644
--- a/packages/cli/.eslintrc
+++ b/packages/cli/.eslintrc
@@ -18,8 +18,8 @@
"allowTypeImports": true
},
{
- "name": "@remotion/z-color",
- "message": "Can only import @remotion/z-color as a type",
+ "name": "@remotion/zod-types",
+ "message": "Can only import @remotion/zod-types as a type",
"allowTypeImports": true
}
]
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 413eacc2a9..7b118a9a32 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -62,7 +62,7 @@
"@types/semver": "^7.3.4",
"@typescript-eslint/eslint-plugin": "5.18.0",
"@typescript-eslint/parser": "5.18.0",
- "@remotion/z-color": "workspace:*",
+ "@remotion/zod-types": "workspace:*",
"eslint": "8.25.0",
"eslint-plugin-10x": "1.5.2",
"eslint-plugin-react": "7.29.4",
diff --git a/packages/cli/src/editor/components/get-zod-if-possible.tsx b/packages/cli/src/editor/components/get-zod-if-possible.tsx
index 0b328eee1a..7cf99e6a6a 100644
--- a/packages/cli/src/editor/components/get-zod-if-possible.tsx
+++ b/packages/cli/src/editor/components/get-zod-if-possible.tsx
@@ -10,7 +10,7 @@ import React, {
export type ZodType = Awaited<typeof import('zod')>['z'];
export type ZodColorType = Awaited<
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
- typeof import('@remotion/z-color')
+ typeof import('@remotion/zod-types')
>;
export const getZodIfPossible = async (): Promise<ZodType | null> => {
@@ -24,7 +24,7 @@ export const getZodIfPossible = async (): Promise<ZodType | null> => {
export const getZColorIfPossible = async (): Promise<ZodColorType | null> => {
try {
- const mod = await import('@remotion/z-color');
+ const mod = await import('@remotion/zod-types');
return mod;
} catch (err) {
return null;
diff --git a/packages/cli/src/list-of-remotion-packages.ts b/packages/cli/src/list-of-remotion-packages.ts
index 1836727c45..2e697b9b2b 100644
--- a/packages/cli/src/list-of-remotion-packages.ts
+++ b/packages/cli/src/list-of-remotion-packages.ts
@@ -20,6 +20,6 @@ export const listOfRemotionPackages = [
'@remotion/rive',
'@remotion/gif',
'@remotion/shapes',
- '@remotion/z-color',
+ '@remotion/zod-types',
'remotion',
];
diff --git a/packages/cli/src/test/color-math.test.ts b/packages/cli/src/test/color-math.test.ts
index ceb9217363..a2e6ef7cc2 100644
--- a/packages/cli/src/test/color-math.test.ts
+++ b/packages/cli/src/test/color-math.test.ts
@@ -4,7 +4,7 @@ import {getZColorIfPossible} from '../editor/components/get-zod-if-possible';
const getZColor = async () => {
const z = await getZColorIfPossible();
if (!z) {
- throw new Error('z-color not found');
+ throw new Error('@remotion/zod-types not found');
}
return z;
diff --git a/packages/cli/src/test/create-zod-values.test.ts b/packages/cli/src/test/create-zod-values.test.ts
index 5d871854ab..9e813604f9 100644
--- a/packages/cli/src/test/create-zod-values.test.ts
+++ b/packages/cli/src/test/create-zod-values.test.ts
@@ -17,7 +17,7 @@ const getZ = async () => {
const getZColor = async () => {
const z = await getZColorIfPossible();
if (!z) {
- throw new Error('z-color not found');
+ throw new Error('@remotion/zod-types not found');
}
return z;
diff --git a/packages/create-video/src/list-of-remotion-packages.ts b/packages/create-video/src/list-of-remotion-packages.ts
index bf0c82d627..27401736a6 100644
--- a/packages/create-video/src/list-of-remotion-packages.ts
+++ b/packages/create-video/src/list-of-remotion-packages.ts
@@ -20,6 +20,6 @@ export const listOfRemotionPackages = [
'@remotion/rive',
'@remotion/gif',
'@remotion/shapes',
- '@remotion/z-color',
+ '@remotion/zod-types',
'remotion',
];
diff --git a/packages/docs/components/TableOfContents/z-color.tsx b/packages/docs/components/TableOfContents/zod-types.tsx
similarity index 86%
rename from packages/docs/components/TableOfContents/z-color.tsx
rename to packages/docs/components/TableOfContents/zod-types.tsx
index 2d68249967..94cc87dc9c 100644
--- a/packages/docs/components/TableOfContents/z-color.tsx
+++ b/packages/docs/components/TableOfContents/zod-types.tsx
@@ -6,7 +6,7 @@ export const TableOfContents: React.FC = () => {
return (
<div>
<Grid>
- <TOCItem link="/docs/z-color/z-color">
+ <TOCItem link="/docs/zod-types/z-color">
<strong>{"zColor()"}</strong>
<div>A Zod Type for colors</div>
</TOCItem>
diff --git a/packages/docs/docs/4-0-alpha.md b/packages/docs/docs/4-0-alpha.md
index 6dccd74a44..95c499ad5d 100644
--- a/packages/docs/docs/4-0-alpha.md
+++ b/packages/docs/docs/4-0-alpha.md
@@ -73,7 +73,7 @@ See how to migrate: [Migration guide](/docs/4-0-migration)
- Fix rendering with FFmpeg on Linux
- Make all strings `as const` when saving back to the root file to ensure type safety.
-- New [`zColor()`](/docs/z-color) API
+- New [`zColor()`](/docs/zod-types/z-color) API
- New sidebar design and new mechanism for toggling sidebars
- Create new array items
- Zod union type support
diff --git a/packages/docs/docs/z-color/index.md b/packages/docs/docs/zod-types/index.md
similarity index 86%
rename from packages/docs/docs/z-color/index.md
rename to packages/docs/docs/zod-types/index.md
index e9e0ae4501..322af2110d 100644
--- a/packages/docs/docs/z-color/index.md
+++ b/packages/docs/docs/zod-types/index.md
@@ -1,6 +1,6 @@
---
sidebar_label: Overview
-title: "@remotion/z-color"
+title: "@remotion/zod-types"
crumb: Schema
---
@@ -23,18 +23,18 @@ Install `@remotion/rive`
<TabItem value="npm">
```bash
-npm i @remotion/z-color
+npm i @remotion/zod-types
```
</TabItem>
<TabItem value="yarn">
```bash
-yarn add @remotion/z-color
+yarn add @remotion/zod-types
```
</TabItem>
<TabItem value="pnpm">
```bash
-pnpm i @remotion/z-color
+pnpm i @remotion/zod-types
```
</TabItem>
</Tabs>
diff --git a/packages/docs/docs/z-color/z-color.md b/packages/docs/docs/zod-types/z-color.md
similarity index 93%
rename from packages/docs/docs/z-color/z-color.md
rename to packages/docs/docs/zod-types/z-color.md
index 6ed9845dfc..bbdbcd8948 100644
--- a/packages/docs/docs/z-color/z-color.md
+++ b/packages/docs/docs/zod-types/z-color.md
@@ -1,7 +1,7 @@
---
image: /generated/articles-docs-z-color.png
title: zColor()
-slug: z-color/z-color
+slug: zod-types/z-color
---
Using `zColor()`, you can specify in your [schema](/docs/parametrized-rendering) that a string has to be a color.
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index ac24bda3fe..806c1da973 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -330,12 +330,12 @@ module.exports = {
},
{
type: "category",
- label: "@remotion/z-color",
+ label: "@remotion/zod-types",
link: {
type: "doc",
- id: "z-color/index",
+ id: "zod-types/index",
},
- items: ["z-color/z-color"],
+ items: ["zod-types/z-color"],
},
],
mainSidebar: [
diff --git a/packages/example-without-zod/remotion.config.ts b/packages/example-without-zod/remotion.config.ts
index a4eb14bd33..d28738e334 100644
--- a/packages/example-without-zod/remotion.config.ts
+++ b/packages/example-without-zod/remotion.config.ts
@@ -8,7 +8,7 @@ Config.overrideWebpackConfig((config) => {
alias: {
...config.resolve?.alias,
zod: false,
- "@remotion/z-color": false,
+ "@remotion/zod-types": false,
},
},
};
diff --git a/packages/example/package.json b/packages/example/package.json
index e6b4e08404..dbdfb025d7 100644
--- a/packages/example/package.json
+++ b/packages/example/package.json
@@ -44,7 +44,7 @@
"@remotion/shapes": "workspace:*",
"@remotion/skia": "workspace:*",
"@remotion/three": "workspace:*",
- "@remotion/z-color": "workspace:*",
+ "@remotion/zod-types": "workspace:*",
"@types/express": "^4.17.11",
"@types/node": "^16.7.5",
"@types/opentype.js": "^1.3.4",
diff --git a/packages/example/src/BetaText/index.tsx b/packages/example/src/BetaText/index.tsx
index 42c57337d1..3e397cce8b 100644
--- a/packages/example/src/BetaText/index.tsx
+++ b/packages/example/src/BetaText/index.tsx
@@ -1,4 +1,4 @@
-import {zColor} from '@remotion/z-color';
+import {zColor} from '@remotion/zod-types';
import {mix} from 'polished';
import React from 'react';
import {interpolate, spring, useCurrentFrame, useVideoConfig} from 'remotion';
diff --git a/packages/example/src/Video.tsx b/packages/example/src/Video.tsx
index 9a3bb9f2a6..332c04c478 100644
--- a/packages/example/src/Video.tsx
+++ b/packages/example/src/Video.tsx
@@ -1,4 +1,4 @@
-import {zColor} from '@remotion/z-color';
+import {zColor} from '@remotion/zod-types';
import {alias} from 'lib/alias';
import React from 'react';
import {Composition, Folder, getInputProps, Still} from 'remotion';
diff --git a/packages/z-color/.eslintrc b/packages/zod-types/.eslintrc
similarity index 100%
rename from packages/z-color/.eslintrc
rename to packages/zod-types/.eslintrc
diff --git a/packages/z-color/.npmignore b/packages/zod-types/.npmignore
similarity index 100%
rename from packages/z-color/.npmignore
rename to packages/zod-types/.npmignore
diff --git a/packages/z-color/.prettierrc.js b/packages/zod-types/.prettierrc.js
similarity index 100%
rename from packages/z-color/.prettierrc.js
rename to packages/zod-types/.prettierrc.js
diff --git a/packages/z-color/package.json b/packages/zod-types/package.json
similarity index 97%
rename from packages/z-color/package.json
rename to packages/zod-types/package.json
index f4d3d052ba..8b8474e056 100644
--- a/packages/z-color/package.json
+++ b/packages/zod-types/package.json
@@ -1,5 +1,5 @@
{
- "name": "@remotion/z-color",
+ "name": "@remotion/zod-types",
"version": "3.3.84",
"description": "A color validator for Zod",
"main": "dist/cjs/index.js",
diff --git a/packages/z-color/rollup.config.js b/packages/zod-types/rollup.config.js
similarity index 100%
rename from packages/z-color/rollup.config.js
rename to packages/zod-types/rollup.config.js
diff --git a/packages/z-color/src/index.ts b/packages/zod-types/src/index.ts
similarity index 100%
rename from packages/z-color/src/index.ts
rename to packages/zod-types/src/index.ts
diff --git a/packages/z-color/src/z-color.ts b/packages/zod-types/src/z-color.ts
similarity index 100%
rename from packages/z-color/src/z-color.ts
rename to packages/zod-types/src/z-color.ts
diff --git a/packages/z-color/tsconfig-esm.json b/packages/zod-types/tsconfig-esm.json
similarity index 100%
rename from packages/z-color/tsconfig-esm.json
rename to packages/zod-types/tsconfig-esm.json
diff --git a/packages/z-color/tsconfig.json b/packages/zod-types/tsconfig.json
similarity index 100%
rename from packages/z-color/tsconfig.json
rename to packages/zod-types/tsconfig.json
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 207541bdea..0ea58272b2 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -140,7 +140,7 @@ importers:
'@remotion/media-utils': workspace:*
'@remotion/player': workspace:*
'@remotion/renderer': workspace:*
- '@remotion/z-color': workspace:*
+ '@remotion/zod-types': workspace:*
'@types/minimist': ^1.2.2
'@types/node': ^16.7.5
'@types/prettier': ^2.7.2
@@ -184,7 +184,7 @@ importers:
source-map: 0.6.1
devDependencies:
'@jonny/eslint-config': 3.0.266_t54va6jeo5lf3vtqih5uiyrm5e
- '@remotion/z-color': link:../z-color
+ '@remotion/zod-types': link:../zod-types
'@types/minimist': 1.2.2
'@types/node': 16.10.2
'@types/prettier': 2.7.2
@@ -509,7 +509,7 @@ importers:
'@remotion/shapes': workspace:*
'@remotion/skia': workspace:*
'@remotion/three': workspace:*
- '@remotion/z-color': workspace:*
+ '@remotion/zod-types': workspace:*
'@types/babel__core': ^7.1.12
'@types/babel__template': ^7.4.0
'@types/express': ^4.17.11
@@ -562,7 +562,7 @@ importers:
'@remotion/shapes': link:../shapes
'@remotion/skia': link:../skia
'@remotion/three': link:../three
- '@remotion/z-color': link:../z-color
+ '@remotion/zod-types': link:../zod-types
'@types/express': 4.17.13
'@types/node': 16.10.2
'@types/opentype.js': 1.3.4
@@ -1187,7 +1187,7 @@ importers:
three: 0.145.0
typescript: 4.7.2
- packages/z-color:
+ packages/zod-types:
specifiers:
'@jonny/eslint-config': 3.0.266
'@rollup/plugin-typescript': ^8.2.0