Skip to content

Commit

Permalink
Merge branch 'main' into pr/3013
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBurger committed Oct 19, 2023
2 parents a872fcb + 672f158 commit 30b36a8
Show file tree
Hide file tree
Showing 102 changed files with 558 additions and 89 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ jobs:
name: Build Node ${{ matrix.node_version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
Expand All @@ -141,10 +142,6 @@ jobs:
- os: ubuntu-latest
node_version: 20.5
steps:
- name: Downgrade MinGW
run: |
choco install mingw --version=11.2.0 --allow-downgrade
if: matrix.os == 'windows-latest'
- uses: actions/checkout@main
- uses: actions/setup-node@v3
with:
Expand Down
10 changes: 7 additions & 3 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Depending on the type of your legal entity, you are granted permission to use Re

## Free license

Copyright © 2023 [Remotion](https://www.remotion.dev/)
Copyright © 2023 [Remotion](https://www.remotion.dev)

### Eligibility

Expand Down Expand Up @@ -36,6 +36,10 @@ Support is provided on a best-we-can-do basis via GitHub Issues and Discord.

## Company license

You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](/docs/support)).
You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](https://www.remotion.dev/docs/support)).

Visit [remotion.pro](https://www.remotion.pro) for pricing and to buy a license.
Visit [remotion.pro](https://www.remotion.pro/license) for pricing and to buy a license.

### FAQs

Are you not sure whether you need a company license because of an edge case? Here are some [frequently asked questions](https://www.remotion.pro/faq).
2 changes: 1 addition & 1 deletion packages/astro-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@remotion/astro-example",
"private": true,
"type": "module",
"version": "4.0.48",
"version": "4.0.50",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remotion/babel-loader",
"version": "4.0.48",
"version": "4.0.50",
"description": "babel-loader polyfill for Remotion",
"main": "dist/index.js",
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions packages/bugs/api/[v].ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ type Bug = {
};

const bugs: Bug[] = [
{
title: "Broken Lambda",
description: "Lambda rendering fails with IPv6 error.",
link: "https://github.com/remotion-dev/remotion/pull/3019",
versions: ["4.0.49"],
},
{
title: "OffthreadVideo could crash",
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/bugs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"@types/node": "^20.6.5"
},
"private": true,
"version": "4.0.48"
"version": "4.0.50"
}
2 changes: 1 addition & 1 deletion packages/bundler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remotion/bundler",
"version": "4.0.48",
"version": "4.0.50",
"description": "Bundler for Remotion",
"main": "dist/index.js",
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-autocomplete/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.48",
"version": "4.0.50",
"name": "@remotion/fig-autocomplete",
"private": true,
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remotion/cli",
"version": "4.0.48",
"version": "4.0.50",
"description": "CLI for Remotion",
"main": "dist/index.js",
"sideEffects": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {ZodObjectEditor} from './ZodObjectEditor';
import {ZodOptionalEditor} from './ZodOptionalEditor';
import {ZodStaticFileEditor} from './ZodStaticFileEditor';
import {ZodStringEditor} from './ZodStringEditor';
import {ZodTextareaEditor} from './ZodTextareaEditor';
import {ZodUnionEditor} from './ZodUnionEditor';

export type UpdaterFunction<T> = (
Expand Down Expand Up @@ -102,6 +103,28 @@ export const ZodSwitch: React.FC<{
);
}

if (
zodTypes &&
schema._def.description ===
zodTypes.ZodZypesInternals.REMOTION_TEXTAREA_BRAND
) {
return (
<ZodTextareaEditor
value={value as string}
setValue={setValue as UpdaterFunction<string>}
jsonPath={jsonPath}
schema={schema}
onSave={onSave as UpdaterFunction<string>}
defaultValue={defaultValue as string}
showSaveButton={showSaveButton}
onRemove={onRemove}
saving={saving}
saveDisabledByParent={saveDisabledByParent}
mayPad={mayPad}
/>
);
}

return (
<ZodStringEditor
value={value as string}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
import React, {useCallback} from 'react';
import type {z} from 'zod';
import {
useZodIfPossible,
useZodTypesIfPossible,
} from '../../get-zod-if-possible';
import {RemTextarea} from '../../NewComposition/RemTextarea';
import {Fieldset} from './Fieldset';
import {useLocalState} from './local-state';
import {SchemaLabel} from './SchemaLabel';
import type {JSONPath} from './zod-types';
import {ZodFieldValidation} from './ZodFieldValidation';
import type {UpdaterFunction} from './ZodSwitch';

const fullWidth: React.CSSProperties = {
width: '100%',
};

const textareaStyle: React.CSSProperties = {
resize: 'vertical',
minHeight: 100,
};

export const ZodTextareaEditor: React.FC<{
schema: z.ZodTypeAny;
jsonPath: JSONPath;
value: string;
defaultValue: string;
setValue: UpdaterFunction<string>;
onSave: UpdaterFunction<string>;
onRemove: null | (() => void);
showSaveButton: boolean;
saving: boolean;
saveDisabledByParent: boolean;
mayPad: boolean;
}> = ({
jsonPath,
value,
setValue,
showSaveButton,
defaultValue,
schema,
onSave,
onRemove,
saving,
saveDisabledByParent,
mayPad,
}) => {
const z = useZodIfPossible();
if (!z) {
throw new Error('expected zod');
}

const zodTypes = useZodTypesIfPossible();
if (!zodTypes) {
throw new Error('expected zod textarea');
}

const {
localValue,
onChange: setLocalValue,
reset,
} = useLocalState({
schema,
setValue,
value,
defaultValue,
});

const onChange: React.ChangeEventHandler<HTMLTextAreaElement> = useCallback(
(e) => {
setLocalValue(() => e.target.value, false, false);
},
[setLocalValue],
);

const save = useCallback(() => {
onSave(() => value, false, false);
}, [onSave, value]);

return (
<Fieldset shouldPad={mayPad} success={localValue.zodValidation.success}>
<SchemaLabel
isDefaultValue={localValue.value === defaultValue}
jsonPath={jsonPath}
onReset={reset}
onSave={save}
showSaveButton={showSaveButton}
onRemove={onRemove}
saving={saving}
valid={localValue.zodValidation.success}
saveDisabledByParent={saveDisabledByParent}
suffix={null}
/>
<div style={fullWidth}>
<RemTextarea
onChange={onChange}
value={localValue.value}
status={localValue.zodValidation ? 'ok' : 'error'}
placeholder={jsonPath.join('.')}
name={jsonPath.join('.')}
style={textareaStyle}
/>
<ZodFieldValidation path={jsonPath} localValue={localValue} />
</div>
</Fieldset>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ export const createZodValues = (
return '#ffffff';
}

if (
zodTypes &&
schema._def.description ===
zodTypes.ZodZypesInternals.REMOTION_TEXTAREA_BRAND
) {
return '';
}

return createZodValues(
(def as z.ZodEffectsDef).schema,
zodRuntime,
Expand Down
8 changes: 5 additions & 3 deletions packages/cli/src/preview-server/start-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ export const startServer = async (options: {

const maxTries = 5;

// Default Node.js host, but explicity
const host = '0.0.0.0';
const host = RenderInternals.isIpV6Supported() ? '::' : '0.0.0.0';
const hostsToTry = RenderInternals.isIpV6Supported()
? ['::', '::1']
: ['0.0.0.0', '127.0.0.1'];

for (let i = 0; i < maxTries; i++) {
try {
Expand All @@ -120,7 +122,7 @@ export const startServer = async (options: {
desiredPort,
from: 3000,
to: 3100,
hostsToTry: ['127.0.0.1', '0.0.0.0'],
hostsToTry,
})
.then(({port, didUsePort}) => {
server.listen({
Expand Down
7 changes: 7 additions & 0 deletions packages/cli/src/test/create-zod-values.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,3 +322,10 @@ test('Should create a color', async () => {

expect(createZodValues(zodTypes.zColor(), z, zodTypes)).toBe('#ffffff');
});

test('Should create a textarea', async () => {
const z = await getZ();
const zodTypes = await getZodTypes();

expect(createZodValues(zodTypes.zTextarea(), z, zodTypes)).toBe('');
});
2 changes: 1 addition & 1 deletion packages/cloudrun/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remotion/cloudrun",
"version": "4.0.48",
"version": "4.0.50",
"description": "GCP Cloud Run alternative to lambda rendering",
"main": "dist/index.js",
"scripts": {
Expand Down
Binary file modified packages/cloudrun/src/gcpInstaller/gcpInstaller.tar
Binary file not shown.
Binary file modified packages/compositor-darwin-arm64/compositor
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/compositor-darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.48",
"version": "4.0.50",
"name": "@remotion/compositor-darwin-arm64",
"os": [
"darwin"
Expand Down
Binary file modified packages/compositor-darwin-x64/compositor
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/compositor-darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.48",
"version": "4.0.50",
"name": "@remotion/compositor-darwin-x64",
"os": [
"darwin"
Expand Down
Binary file modified packages/compositor-linux-arm64-gnu/compositor
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/compositor-linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.48",
"version": "4.0.50",
"name": "@remotion/compositor-linux-arm64-gnu",
"os": [
"linux"
Expand Down
Binary file modified packages/compositor-linux-arm64-musl/compositor
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/compositor-linux-arm64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.48",
"version": "4.0.50",
"name": "@remotion/compositor-linux-arm64-musl",
"os": [
"linux"
Expand Down
Binary file modified packages/compositor-linux-x64-gnu/compositor
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/compositor-linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.48",
"version": "4.0.50",
"name": "@remotion/compositor-linux-x64-gnu",
"os": [
"linux"
Expand Down
Binary file modified packages/compositor-linux-x64-musl/compositor
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/compositor-linux-x64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.48",
"version": "4.0.50",
"name": "@remotion/compositor-linux-x64-musl",
"os": [
"linux"
Expand Down
Binary file modified packages/compositor-win32-x64-msvc/compositor.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/compositor-win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.48",
"version": "4.0.50",
"name": "@remotion/compositor-win32-x64-msvc",
"os": [
"win32"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "remotion",
"version": "4.0.48",
"version": "4.0.50",
"description": "Render videos in React",
"main": "dist/cjs/index.js",
"types": "dist/cjs/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/resolve-video-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ export const resolveVideoConfig = ({
...data,
id: composition.id,
defaultProps: composition.defaultProps ?? {},
props: calculatedProm.props ?? composition.defaultProps ?? {},
props: calculatedProm.props ?? fallbackProps,
};
};
2 changes: 1 addition & 1 deletion packages/core/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Automatically generated on publish
export const VERSION = '4.0.48';
export const VERSION = '4.0.50';
2 changes: 1 addition & 1 deletion packages/create-video/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-video",
"version": "4.0.48",
"version": "4.0.50",
"description": "",
"main": "dist/index.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion packages/discord-poster/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remotion/discord-poster",
"version": "4.0.48",
"version": "4.0.50",
"license": "SEE LICENSE IN LICENSE.md",
"type": "module",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/components/TableOfContents/zod-types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export const TableOfContents: React.FC = () => {
<strong>{"zColor()"}</strong>
<div>A Zod Type for colors</div>
</TOCItem>
<TOCItem link="/docs/zod-types/z-textarea">
<strong>{"zTextarea()"}</strong>
<div>A Zod Type for multiple-line text in a textarea</div>
</TOCItem>
</Grid>
</div>
);
Expand Down
Loading

0 comments on commit 30b36a8

Please sign in to comment.