init commit
This commit is contained in:
18
remotion/node_modules/@remotion/studio/dist/api/get-zod-schema-from-primitive.js
generated
vendored
Normal file
18
remotion/node_modules/@remotion/studio/dist/api/get-zod-schema-from-primitive.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getZodSchemaFromPrimitive = void 0;
|
||||
const getZodSchemaFromPrimitive = (value, z) => {
|
||||
if (typeof value === 'string') {
|
||||
return z.string();
|
||||
}
|
||||
if (typeof value === 'number') {
|
||||
return z.number();
|
||||
}
|
||||
let stringified;
|
||||
try {
|
||||
stringified = JSON.stringify(value);
|
||||
}
|
||||
catch (_a) { }
|
||||
throw new Error(`visualControl(): Specify a schema for this value: ${stringified !== null && stringified !== void 0 ? stringified : '[non-serializable value]'}. See https://remotion.dev/docs/studio/visual-control`);
|
||||
};
|
||||
exports.getZodSchemaFromPrimitive = getZodSchemaFromPrimitive;
|
||||
Reference in New Issue
Block a user