@remotion/light-leaks 4.0.432 → 4.0.434
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/LightLeak.d.ts +5 -1
- package/dist/esm/index.mjs +19 -33
- package/package.json +4 -4
package/dist/LightLeak.d.ts
CHANGED
|
@@ -5,4 +5,8 @@ export type LightLeakProps = Omit<SequenceProps, 'children' | 'durationInFrames'
|
|
|
5
5
|
readonly seed?: number;
|
|
6
6
|
readonly hueShift?: number;
|
|
7
7
|
};
|
|
8
|
-
export declare const LightLeak: React.
|
|
8
|
+
export declare const LightLeak: React.ComponentType<Omit<SequenceProps, "children" | "durationInFrames" | "layout"> & Omit<AbsoluteFillLayout, "layout"> & {
|
|
9
|
+
readonly durationInFrames?: number | undefined;
|
|
10
|
+
readonly seed?: number | undefined;
|
|
11
|
+
readonly hueShift?: number | undefined;
|
|
12
|
+
}>;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/LightLeak.tsx
|
|
2
|
-
import { useCallback, useEffect,
|
|
2
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
3
|
import {
|
|
4
4
|
AbsoluteFill,
|
|
5
5
|
Internals,
|
|
@@ -189,6 +189,12 @@ var lightLeakSchema = {
|
|
|
189
189
|
default: 0,
|
|
190
190
|
description: "Hue Shift"
|
|
191
191
|
},
|
|
192
|
+
"style.translate": {
|
|
193
|
+
type: "translate",
|
|
194
|
+
step: 1,
|
|
195
|
+
default: "0px 0px",
|
|
196
|
+
description: "Position"
|
|
197
|
+
},
|
|
192
198
|
"style.scale": {
|
|
193
199
|
type: "number",
|
|
194
200
|
min: 0.05,
|
|
@@ -197,6 +203,12 @@ var lightLeakSchema = {
|
|
|
197
203
|
default: 1,
|
|
198
204
|
description: "Scale"
|
|
199
205
|
},
|
|
206
|
+
"style.rotate": {
|
|
207
|
+
type: "rotation",
|
|
208
|
+
step: 1,
|
|
209
|
+
default: "0deg",
|
|
210
|
+
description: "Rotation"
|
|
211
|
+
},
|
|
200
212
|
"style.opacity": {
|
|
201
213
|
type: "number",
|
|
202
214
|
min: 0,
|
|
@@ -206,34 +218,14 @@ var lightLeakSchema = {
|
|
|
206
218
|
description: "Opacity"
|
|
207
219
|
}
|
|
208
220
|
};
|
|
209
|
-
var
|
|
210
|
-
seed
|
|
211
|
-
hueShift
|
|
221
|
+
var LightLeakInner = ({
|
|
222
|
+
seed = 0,
|
|
223
|
+
hueShift = 0,
|
|
212
224
|
durationInFrames,
|
|
213
|
-
from: fromProp,
|
|
214
225
|
style,
|
|
226
|
+
controls,
|
|
215
227
|
...sequenceProps
|
|
216
228
|
}) => {
|
|
217
|
-
const opacityProp = style?.opacity;
|
|
218
|
-
const scaleProp = style?.scale;
|
|
219
|
-
const schemaInput = useMemo(() => {
|
|
220
|
-
return {
|
|
221
|
-
seed: seedProp,
|
|
222
|
-
hueShift: hueShiftProp,
|
|
223
|
-
"style.opacity": opacityProp,
|
|
224
|
-
"style.scale": scaleProp
|
|
225
|
-
};
|
|
226
|
-
}, [seedProp, hueShiftProp, opacityProp, scaleProp]);
|
|
227
|
-
const {
|
|
228
|
-
controls,
|
|
229
|
-
values: {
|
|
230
|
-
seed,
|
|
231
|
-
hueShift,
|
|
232
|
-
"style.opacity": opacity,
|
|
233
|
-
"style.scale": scale,
|
|
234
|
-
..._rest
|
|
235
|
-
}
|
|
236
|
-
} = Internals.useSchema(lightLeakSchema, schemaInput);
|
|
237
229
|
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
238
230
|
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
239
231
|
if (typeof seed !== "number" || !Number.isFinite(seed)) {
|
|
@@ -245,25 +237,19 @@ var LightLeak = ({
|
|
|
245
237
|
if (hueShift < 0 || hueShift > 360) {
|
|
246
238
|
throw new RangeError(`"hueShift" must be between 0 and 360, but got ${hueShift}`);
|
|
247
239
|
}
|
|
248
|
-
const mergedStyle = useMemo(() => {
|
|
249
|
-
return {
|
|
250
|
-
...style,
|
|
251
|
-
opacity,
|
|
252
|
-
scale
|
|
253
|
-
};
|
|
254
|
-
}, [style, opacity, scale]);
|
|
255
240
|
return /* @__PURE__ */ jsx(Sequence, {
|
|
256
241
|
durationInFrames: resolvedDuration,
|
|
257
242
|
name: "<LightLeak>",
|
|
258
243
|
controls,
|
|
259
244
|
...sequenceProps,
|
|
260
|
-
style
|
|
245
|
+
style,
|
|
261
246
|
children: /* @__PURE__ */ jsx(LightLeakCanvas, {
|
|
262
247
|
seed,
|
|
263
248
|
hueShift
|
|
264
249
|
})
|
|
265
250
|
});
|
|
266
251
|
};
|
|
252
|
+
var LightLeak = Internals.wrapInSchema(LightLeakInner, lightLeakSchema);
|
|
267
253
|
LightLeak.displayName = "LightLeak";
|
|
268
254
|
Internals.addSequenceStackTraces(LightLeak);
|
|
269
255
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/light-leaks",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.434",
|
|
4
4
|
"description": "Light leak effects for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"remotion": "4.0.
|
|
27
|
+
"remotion": "4.0.434",
|
|
28
28
|
"zod": "4.3.6"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"react": "19.2.3",
|
|
44
44
|
"react-dom": "19.2.3",
|
|
45
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
45
|
+
"@remotion/eslint-config-internal": "4.0.434",
|
|
46
46
|
"eslint": "9.19.0",
|
|
47
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
47
|
+
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
48
48
|
},
|
|
49
49
|
"keywords": [
|
|
50
50
|
"remotion",
|