remotion 3.3.79 → 3.3.80
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/dist/cjs/EditorProps.d.ts +15 -0
- package/dist/cjs/EditorProps.js +53 -0
- package/dist/cjs/props-if-has-props.d.ts +10 -0
- package/dist/cjs/props-if-has-props.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = Record<string, object>;
|
|
3
|
+
export declare type EditorPropsContextType = {
|
|
4
|
+
props: Props;
|
|
5
|
+
updateProps: (options: {
|
|
6
|
+
id: string;
|
|
7
|
+
defaultProps: object;
|
|
8
|
+
newProps: object;
|
|
9
|
+
}) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const EditorPropsContext: React.Context<EditorPropsContextType>;
|
|
12
|
+
export declare const EditorPropsProvider: React.FC<{
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.EditorPropsProvider = exports.EditorPropsContext = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
|
+
exports.EditorPropsContext = (0, react_1.createContext)({
|
|
30
|
+
props: {},
|
|
31
|
+
updateProps: () => {
|
|
32
|
+
throw new Error('Not implemented');
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
const EditorPropsProvider = ({ children }) => {
|
|
36
|
+
const [props, setProps] = react_1.default.useState({});
|
|
37
|
+
const updateProps = (0, react_1.useCallback)(({ defaultProps, id, newProps, }) => {
|
|
38
|
+
setProps((prev) => {
|
|
39
|
+
var _a;
|
|
40
|
+
return {
|
|
41
|
+
...prev,
|
|
42
|
+
[id]: typeof newProps === 'function'
|
|
43
|
+
? newProps((_a = prev[id]) !== null && _a !== void 0 ? _a : defaultProps)
|
|
44
|
+
: newProps,
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
}, []);
|
|
48
|
+
const ctx = (0, react_1.useMemo)(() => {
|
|
49
|
+
return { props, updateProps };
|
|
50
|
+
}, [props, updateProps]);
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)(exports.EditorPropsContext.Provider, { value: ctx, children: children }));
|
|
52
|
+
};
|
|
53
|
+
exports.EditorPropsProvider = EditorPropsProvider;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
export declare type PropsIfHasProps<Schema extends z.ZodTypeAny, Props> = z.ZodTypeAny extends Schema ? {} extends Props ? {
|
|
3
|
+
defaultProps?: Props;
|
|
4
|
+
} : {
|
|
5
|
+
defaultProps: Props;
|
|
6
|
+
} : {} extends Props ? {
|
|
7
|
+
defaultProps: z.infer<Schema>;
|
|
8
|
+
} : {
|
|
9
|
+
defaultProps: z.infer<Schema> & Props;
|
|
10
|
+
};
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.3.
|
|
1
|
+
export declare const VERSION = "3.3.80";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/index.mjs
CHANGED
package/dist/esm/version.mjs
CHANGED