@remotion/starburst 4.0.463 → 4.0.464

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.
@@ -15,14 +15,14 @@ var hexToRgb = (hex) => {
15
15
  };
16
16
 
17
17
  // src/starburst-effect.ts
18
- var { createEffect } = Internals;
18
+ var { createEffect, createWebGL2ContextError } = Internals;
19
19
  var starburstEffectSchema = {
20
20
  rays: {
21
21
  type: "number",
22
22
  min: 2,
23
23
  max: 100,
24
24
  step: 1,
25
- default: 12,
25
+ default: undefined,
26
26
  description: "Number of Rays"
27
27
  },
28
28
  rotation: {
@@ -76,6 +76,9 @@ var resolve = (p) => ({
76
76
  originOffsetY: p.originOffsetY ?? 0
77
77
  });
78
78
  var validateStarburstEffectParams = (params) => {
79
+ if (params === null || typeof params !== "object") {
80
+ throw new TypeError(`Starburst effect requires a parameters object, but got ${JSON.stringify(params)}`);
81
+ }
79
82
  const { rays, colors } = params;
80
83
  if (typeof rays !== "number" || !Number.isFinite(rays)) {
81
84
  throw new TypeError(`"rays" must be a finite number, but got ${JSON.stringify(rays)}`);
@@ -208,7 +211,7 @@ var linkProgram = (gl, vs, fs) => {
208
211
  }
209
212
  return program;
210
213
  };
211
- var starburstImpl = createEffect({
214
+ var starburst = createEffect({
212
215
  type: "remotion/starburst",
213
216
  label: "Starburst",
214
217
  backend: "webgl2",
@@ -223,7 +226,7 @@ var starburstImpl = createEffect({
223
226
  preserveDrawingBuffer: true
224
227
  });
225
228
  if (!gl) {
226
- throw new Error("Failed to acquire WebGL2 context for starburst effect");
229
+ throw createWebGL2ContextError("starburst effect");
227
230
  }
228
231
  gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
229
232
  gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
@@ -387,12 +390,9 @@ var starburstImpl = createEffect({
387
390
  gl.deleteTexture(sourceTexture);
388
391
  gl.deleteTexture(paletteTexture);
389
392
  },
390
- schema: starburstEffectSchema
393
+ schema: starburstEffectSchema,
394
+ validateParams: validateStarburstEffectParams
391
395
  });
392
- var starburst = (params) => {
393
- validateStarburstEffectParams(params);
394
- return starburstImpl(params);
395
- };
396
396
 
397
397
  // src/Starburst.tsx
398
398
  import { useCallback, useEffect, useRef, useState } from "react";
package/dist/index.d.ts CHANGED
@@ -2,5 +2,7 @@ export { Starburst } from './Starburst';
2
2
  export type { StarburstProps } from './Starburst';
3
3
  export { starburstEffectSchema, type StarburstEffectParams, } from './starburst-effect';
4
4
  export declare const StarburstInternals: {
5
- readonly starburst: (params: import("./starburst-effect").StarburstEffectParams) => import("remotion").EffectDescriptor<unknown>;
5
+ readonly starburst: (params: import("./starburst-effect").StarburstEffectParams & {
6
+ readonly disabled?: boolean | undefined;
7
+ }) => import("remotion").EffectDescriptor<unknown>;
6
8
  };
@@ -1,11 +1,10 @@
1
- import type { EffectDescriptor } from 'remotion';
2
1
  export declare const starburstEffectSchema: {
3
2
  readonly rays: {
4
3
  readonly type: "number";
5
4
  readonly min: 2;
6
5
  readonly max: 100;
7
6
  readonly step: 1;
8
- readonly default: 12;
7
+ readonly default: undefined;
9
8
  readonly description: "Number of Rays";
10
9
  };
11
10
  readonly rotation: {
@@ -58,4 +57,6 @@ export type StarburstEffectParams = {
58
57
  readonly originOffsetX?: number;
59
58
  readonly originOffsetY?: number;
60
59
  };
61
- export declare const starburst: (params: StarburstEffectParams) => EffectDescriptor<unknown>;
60
+ export declare const starburst: (params: StarburstEffectParams & {
61
+ readonly disabled?: boolean | undefined;
62
+ }) => import("remotion").EffectDescriptor<unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/starburst",
3
- "version": "4.0.463",
3
+ "version": "4.0.464",
4
4
  "description": "Starburst ray effect for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,6 +10,7 @@
10
10
  },
11
11
  "type": "module",
12
12
  "scripts": {
13
+ "test": "bun test src/test",
13
14
  "formatting": "oxfmt src --check",
14
15
  "format": "oxfmt src",
15
16
  "lint": "eslint src",
@@ -23,7 +24,7 @@
23
24
  "url": "https://github.com/remotion-dev/remotion/issues"
24
25
  },
25
26
  "dependencies": {
26
- "remotion": "4.0.463",
27
+ "remotion": "4.0.464",
27
28
  "zod": "4.3.6"
28
29
  },
29
30
  "peerDependencies": {
@@ -41,7 +42,7 @@
41
42
  "devDependencies": {
42
43
  "react": "19.2.3",
43
44
  "react-dom": "19.2.3",
44
- "@remotion/eslint-config-internal": "4.0.463",
45
+ "@remotion/eslint-config-internal": "4.0.464",
45
46
  "eslint": "9.19.0",
46
47
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
47
48
  },