@remotion/zod-types 4.0.142 → 4.0.144

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Remotion License
2
2
 
3
+ In Remotion 5.0, the license will slightly change. [View the changes here](https://github.com/remotion-dev/remotion/pull/3750).
4
+
5
+ ---
6
+
3
7
  Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion to create videos for free (even commercial), while a company license is required for for-profit organizations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.
4
8
 
5
9
  - [Free license](#free-license)
package/bundle.ts ADDED
@@ -0,0 +1,20 @@
1
+ import {build} from 'bun';
2
+
3
+ const output = await build({
4
+ entrypoints: ['src/index.ts'],
5
+ naming: '[name].mjs',
6
+ external: [
7
+ 'react',
8
+ 'remotion',
9
+ 'remotion/no-react',
10
+ 'react/jsx-runtime',
11
+ 'zod',
12
+ ],
13
+ });
14
+
15
+ const [file] = output.outputs;
16
+ const text = await file.text();
17
+
18
+ await Bun.write('dist/esm/index.mjs', text);
19
+
20
+ export {};
@@ -1,37 +1,37 @@
1
- import { NoReactInternals } from 'remotion/no-react';
2
- import { z } from 'zod';
3
-
4
- const REMOTION_COLOR_BRAND = '__remotion-color';
5
- const parseColor = (value) => {
6
- const colored = NoReactInternals.processColor(value)
7
- .toString(16)
8
- .padStart(8, '0');
9
- const opacity = parseInt(colored.slice(0, 2), 16);
10
- const r = parseInt(colored.slice(2, 4), 16);
11
- const g = parseInt(colored.slice(4, 6), 16);
12
- const b = parseInt(colored.slice(6, 8), 16);
13
- return { a: opacity, r, g, b };
1
+ // src/z-color.ts
2
+ import {NoReactInternals} from "remotion/no-react";
3
+ import {z} from "zod";
4
+ var REMOTION_COLOR_BRAND = "__remotion-color";
5
+ var parseColor = (value) => {
6
+ const colored = NoReactInternals.processColor(value).toString(16).padStart(8, "0");
7
+ const opacity = parseInt(colored.slice(0, 2), 16);
8
+ const r = parseInt(colored.slice(2, 4), 16);
9
+ const g = parseInt(colored.slice(4, 6), 16);
10
+ const b = parseInt(colored.slice(6, 8), 16);
11
+ return { a: opacity, r, g, b };
14
12
  };
15
- const zColor = () => z
16
- .string()
17
- .refine((value) => {
18
- try {
19
- parseColor(value);
20
- return true;
21
- }
22
- catch (err) {
23
- return false;
24
- }
25
- }, { message: 'Invalid color' })
26
- .describe(REMOTION_COLOR_BRAND);
13
+ var zColor = () => z.string().refine((value) => {
14
+ try {
15
+ parseColor(value);
16
+ return true;
17
+ } catch (err) {
18
+ return false;
19
+ }
20
+ }, { message: "Invalid color" }).describe(REMOTION_COLOR_BRAND);
27
21
 
28
- const REMOTION_TEXTAREA_BRAND = '__remotion-textarea';
29
- const zTextarea = () => z.string().describe(REMOTION_TEXTAREA_BRAND);
22
+ // src/z-textarea.ts
23
+ import {z as z2} from "zod";
24
+ var REMOTION_TEXTAREA_BRAND = "__remotion-textarea";
25
+ var zTextarea = () => z2.string().describe(REMOTION_TEXTAREA_BRAND);
30
26
 
31
- const ZodZypesInternals = {
32
- parseColor,
33
- REMOTION_COLOR_BRAND,
34
- REMOTION_TEXTAREA_BRAND,
27
+ // src/index.ts
28
+ var ZodZypesInternals = {
29
+ parseColor,
30
+ REMOTION_COLOR_BRAND,
31
+ REMOTION_TEXTAREA_BRAND
32
+ };
33
+ export {
34
+ zTextarea,
35
+ zColor,
36
+ ZodZypesInternals
35
37
  };
36
-
37
- export { ZodZypesInternals, zColor, zTextarea };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/zod-types",
3
- "version": "4.0.142",
3
+ "version": "4.0.144",
4
4
  "description": "A color validator for Zod",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",
@@ -16,18 +16,16 @@
16
16
  "url": "https://github.com/remotion-dev/remotion/issues"
17
17
  },
18
18
  "dependencies": {
19
- "remotion": "4.0.142"
19
+ "remotion": "4.0.144"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "zod": "^3.22.3"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@jonny/eslint-config": "3.0.281",
26
- "@rollup/plugin-typescript": "^8.2.0",
27
26
  "eslint": "8.56.0",
28
27
  "prettier": "3.2.5",
29
28
  "prettier-plugin-organize-imports": "3.2.4",
30
- "rollup": "^2.70.1",
31
29
  "zod": "^3.22.3"
32
30
  },
33
31
  "keywords": [
@@ -51,6 +49,6 @@
51
49
  "formatting": "prettier src --check",
52
50
  "lint": "eslint src --ext ts,tsx",
53
51
  "watch": "tsc -w",
54
- "build": "rollup --failAfterWarnings --config rollup.config.js && tsc -d"
52
+ "build": "bun bundle.ts && tsc -d"
55
53
  }
56
54
  }
@@ -1,12 +0,0 @@
1
- export { zColor } from './z-color.js';
2
- export { zTextarea } from './z-textarea.js';
3
- export declare const ZodZypesInternals: {
4
- parseColor: (value: string) => {
5
- a: number;
6
- r: number;
7
- g: number;
8
- b: number;
9
- };
10
- REMOTION_COLOR_BRAND: string;
11
- REMOTION_TEXTAREA_BRAND: string;
12
- };
@@ -1,9 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const REMOTION_COLOR_BRAND = "__remotion-color";
3
- export declare const parseColor: (value: string) => {
4
- a: number;
5
- r: number;
6
- g: number;
7
- b: number;
8
- };
9
- export declare const zColor: () => z.ZodEffects<z.ZodString, string, string>;
@@ -1,3 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const REMOTION_TEXTAREA_BRAND = "__remotion-textarea";
3
- export declare const zTextarea: () => z.ZodString;