@remotion/starburst 4.0.470 → 4.0.472

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.
@@ -10,6 +10,137 @@ export type StarburstProps = Omit<SequenceProps, 'children' | 'durationInFrames'
10
10
  readonly originOffsetX?: number;
11
11
  readonly originOffsetY?: number;
12
12
  };
13
+ export declare const starburstSchema: {
14
+ readonly 'style.translate': {
15
+ readonly type: "translate";
16
+ readonly step: 1;
17
+ readonly default: "0px 0px";
18
+ readonly description: "Offset";
19
+ };
20
+ readonly 'style.scale': {
21
+ readonly type: "scale";
22
+ readonly min: 0.05;
23
+ readonly max: 100;
24
+ readonly step: 0.01;
25
+ readonly default: 1;
26
+ readonly description: "Scale";
27
+ };
28
+ readonly 'style.rotate': {
29
+ readonly type: "rotation-css";
30
+ readonly step: 1;
31
+ readonly default: "0deg";
32
+ readonly description: "Rotation";
33
+ };
34
+ readonly 'style.opacity': {
35
+ readonly type: "number";
36
+ readonly min: 0;
37
+ readonly max: 1;
38
+ readonly step: 0.01;
39
+ readonly default: 1;
40
+ readonly description: "Opacity";
41
+ readonly hiddenFromList: false;
42
+ };
43
+ readonly premountFor: {
44
+ readonly type: "number";
45
+ readonly default: 0;
46
+ readonly description: "Premount For";
47
+ readonly min: 0;
48
+ readonly step: 1;
49
+ readonly hiddenFromList: false;
50
+ };
51
+ readonly postmountFor: {
52
+ readonly type: "number";
53
+ readonly default: 0;
54
+ readonly min: 0;
55
+ readonly step: 1;
56
+ readonly hiddenFromList: true;
57
+ };
58
+ readonly styleWhilePremounted: {
59
+ readonly type: "hidden";
60
+ };
61
+ readonly styleWhilePostmounted: {
62
+ readonly type: "hidden";
63
+ };
64
+ readonly durationInFrames: {
65
+ readonly type: "number";
66
+ readonly default: undefined;
67
+ readonly min: 1;
68
+ readonly step: 1;
69
+ readonly hiddenFromList: true;
70
+ };
71
+ readonly from: {
72
+ readonly type: "number";
73
+ readonly default: 0;
74
+ readonly step: 1;
75
+ readonly hiddenFromList: true;
76
+ };
77
+ readonly rays: {
78
+ readonly type: "number";
79
+ readonly min: 2;
80
+ readonly max: 100;
81
+ readonly step: 1;
82
+ readonly default: 12;
83
+ readonly description: "Number of Rays";
84
+ readonly hiddenFromList: false;
85
+ };
86
+ readonly colors: {
87
+ readonly type: "array";
88
+ readonly item: {
89
+ readonly type: "color";
90
+ };
91
+ readonly default: undefined;
92
+ readonly minLength: 2;
93
+ readonly newItemDefault: "#ff0000";
94
+ readonly description: "Colors";
95
+ readonly keyframable: false;
96
+ };
97
+ readonly rotation: {
98
+ readonly type: "number";
99
+ readonly min: 0;
100
+ readonly max: 360;
101
+ readonly step: 1;
102
+ readonly default: 0;
103
+ readonly description: "Rotation";
104
+ readonly hiddenFromList: false;
105
+ };
106
+ readonly smoothness: {
107
+ readonly type: "number";
108
+ readonly min: 0;
109
+ readonly max: 1;
110
+ readonly step: 0.01;
111
+ readonly default: 0;
112
+ readonly description: "Edge Smoothness";
113
+ readonly hiddenFromList: false;
114
+ };
115
+ readonly vignette: {
116
+ readonly type: "number";
117
+ readonly min: 0;
118
+ readonly max: 1;
119
+ readonly step: 0.01;
120
+ readonly default: 1;
121
+ readonly description: "Vignette";
122
+ readonly hiddenFromList: false;
123
+ };
124
+ readonly originOffsetX: {
125
+ readonly type: "number";
126
+ readonly min: -1;
127
+ readonly max: 1;
128
+ readonly step: 0.01;
129
+ readonly default: 0;
130
+ readonly description: "Origin Offset X";
131
+ readonly hiddenFromList: false;
132
+ };
133
+ readonly originOffsetY: {
134
+ readonly type: "number";
135
+ readonly min: -1;
136
+ readonly max: 1;
137
+ readonly step: 0.01;
138
+ readonly default: 0;
139
+ readonly description: "Origin Offset Y";
140
+ readonly hiddenFromList: false;
141
+ };
142
+ readonly hidden: import("remotion").SequenceFieldSchema;
143
+ };
13
144
  export declare const Starburst: React.ComponentType<Omit<SequenceProps, "children" | "durationInFrames" | "layout"> & Omit<AbsoluteFillLayout, "layout"> & {
14
145
  readonly durationInFrames?: number | undefined;
15
146
  readonly rays: number;
@@ -0,0 +1 @@
1
+ export declare const colorToRgb: (color: string) => [number, number, number];
@@ -1,17 +1,11 @@
1
1
  // src/starburst-effect.ts
2
2
  import { Internals } from "remotion";
3
3
 
4
- // src/hex-to-rgb.ts
5
- var hexToRgb = (hex) => {
6
- const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
7
- if (!result) {
8
- throw new Error(`Invalid hex color: ${hex}`);
9
- }
10
- return [
11
- parseInt(result[1], 16) / 255,
12
- parseInt(result[2], 16) / 255,
13
- parseInt(result[3], 16) / 255
14
- ];
4
+ // src/color-to-rgb.ts
5
+ import { NoReactInternals } from "remotion/no-react";
6
+ var colorToRgb = (color) => {
7
+ const packed = NoReactInternals.processColor(color);
8
+ return [packed >>> 16 & 255, packed >>> 8 & 255, packed & 255];
15
9
  };
16
10
 
17
11
  // src/starburst-effect.ts
@@ -24,7 +18,19 @@ var starburstEffectSchema = {
24
18
  max: 100,
25
19
  step: 1,
26
20
  default: undefined,
27
- description: "Number of Rays"
21
+ description: "Number of Rays",
22
+ hiddenFromList: false
23
+ },
24
+ colors: {
25
+ type: "array",
26
+ item: {
27
+ type: "color"
28
+ },
29
+ default: undefined,
30
+ minLength: 2,
31
+ newItemDefault: "#ff0000",
32
+ description: "Colors",
33
+ keyframable: false
28
34
  },
29
35
  rotation: {
30
36
  type: "number",
@@ -32,7 +38,8 @@ var starburstEffectSchema = {
32
38
  max: 360,
33
39
  step: 1,
34
40
  default: 0,
35
- description: "Rotation"
41
+ description: "Rotation",
42
+ hiddenFromList: false
36
43
  },
37
44
  smoothness: {
38
45
  type: "number",
@@ -40,7 +47,8 @@ var starburstEffectSchema = {
40
47
  max: 1,
41
48
  step: 0.01,
42
49
  default: 0,
43
- description: "Edge Smoothness"
50
+ description: "Edge Smoothness",
51
+ hiddenFromList: false
44
52
  },
45
53
  origin: {
46
54
  type: "uv-coordinate",
@@ -91,7 +99,7 @@ var validateStarburstEffectParams = (params) => {
91
99
  throw new RangeError(`"origin" must contain coordinates between 0 and 1, but got ${JSON.stringify(r.origin)}`);
92
100
  }
93
101
  for (const c of r.colors) {
94
- hexToRgb(c);
102
+ colorToRgb(c);
95
103
  }
96
104
  };
97
105
  var STARBURST_VS = `#version 300 es
@@ -292,10 +300,10 @@ var starburst = createEffect({
292
300
  }
293
301
  const { palettePixelData } = state;
294
302
  for (let i = 0;i < r.colors.length; i++) {
295
- const rgb = hexToRgb(r.colors[i]);
296
- palettePixelData[i * 4] = Math.round(rgb[0] * 255);
297
- palettePixelData[i * 4 + 1] = Math.round(rgb[1] * 255);
298
- palettePixelData[i * 4 + 2] = Math.round(rgb[2] * 255);
303
+ const rgb = colorToRgb(r.colors[i]);
304
+ palettePixelData[i * 4] = rgb[0];
305
+ palettePixelData[i * 4 + 1] = rgb[1];
306
+ palettePixelData[i * 4 + 2] = rgb[2];
299
307
  palettePixelData[i * 4 + 3] = 255;
300
308
  }
301
309
  }
@@ -494,10 +502,10 @@ var StarburstCanvas = ({
494
502
  const rotationRad = rotation * Math.PI / 180;
495
503
  const pixelData = new Uint8Array(colors.length * 4);
496
504
  for (let i = 0;i < colors.length; i++) {
497
- const rgb = hexToRgb(colors[i]);
498
- pixelData[i * 4] = Math.round(rgb[0] * 255);
499
- pixelData[i * 4 + 1] = Math.round(rgb[1] * 255);
500
- pixelData[i * 4 + 2] = Math.round(rgb[2] * 255);
505
+ const rgb = colorToRgb(colors[i]);
506
+ pixelData[i * 4] = rgb[0];
507
+ pixelData[i * 4 + 1] = rgb[1];
508
+ pixelData[i * 4 + 2] = rgb[2];
501
509
  pixelData[i * 4 + 3] = 255;
502
510
  }
503
511
  gl.activeTexture(gl.TEXTURE0);
@@ -534,13 +542,27 @@ var StarburstCanvas = ({
534
542
  });
535
543
  };
536
544
  var starburstSchema = {
545
+ durationInFrames: Internals2.durationInFramesField,
546
+ from: Internals2.fromField,
537
547
  rays: {
538
548
  type: "number",
539
549
  min: 2,
540
550
  max: 100,
541
551
  step: 1,
542
552
  default: 12,
543
- description: "Number of Rays"
553
+ description: "Number of Rays",
554
+ hiddenFromList: false
555
+ },
556
+ colors: {
557
+ type: "array",
558
+ item: {
559
+ type: "color"
560
+ },
561
+ default: undefined,
562
+ minLength: 2,
563
+ newItemDefault: "#ff0000",
564
+ description: "Colors",
565
+ keyframable: false
544
566
  },
545
567
  rotation: {
546
568
  type: "number",
@@ -548,7 +570,8 @@ var starburstSchema = {
548
570
  max: 360,
549
571
  step: 1,
550
572
  default: 0,
551
- description: "Rotation"
573
+ description: "Rotation",
574
+ hiddenFromList: false
552
575
  },
553
576
  smoothness: {
554
577
  type: "number",
@@ -556,7 +579,8 @@ var starburstSchema = {
556
579
  max: 1,
557
580
  step: 0.01,
558
581
  default: 0,
559
- description: "Edge Smoothness"
582
+ description: "Edge Smoothness",
583
+ hiddenFromList: false
560
584
  },
561
585
  vignette: {
562
586
  type: "number",
@@ -564,7 +588,8 @@ var starburstSchema = {
564
588
  max: 1,
565
589
  step: 0.01,
566
590
  default: 1,
567
- description: "Vignette"
591
+ description: "Vignette",
592
+ hiddenFromList: false
568
593
  },
569
594
  originOffsetX: {
570
595
  type: "number",
@@ -572,7 +597,8 @@ var starburstSchema = {
572
597
  max: 1,
573
598
  step: 0.01,
574
599
  default: 0,
575
- description: "Origin Offset X"
600
+ description: "Origin Offset X",
601
+ hiddenFromList: false
576
602
  },
577
603
  originOffsetY: {
578
604
  type: "number",
@@ -580,7 +606,8 @@ var starburstSchema = {
580
606
  max: 1,
581
607
  step: 0.01,
582
608
  default: 0,
583
- description: "Origin Offset Y"
609
+ description: "Origin Offset Y",
610
+ hiddenFromList: false
584
611
  },
585
612
  ...Internals2.sequenceStyleSchema,
586
613
  hidden: Internals2.hiddenField
@@ -642,7 +669,11 @@ var StarburstInner = ({
642
669
  })
643
670
  });
644
671
  };
645
- var Starburst = Internals2.wrapInSchema(StarburstInner, starburstSchema);
672
+ var Starburst = Internals2.wrapInSchema({
673
+ Component: StarburstInner,
674
+ schema: starburstSchema,
675
+ supportsEffects: false
676
+ });
646
677
  Starburst.displayName = "Starburst";
647
678
  Internals2.addSequenceStackTraces(Starburst);
648
679
 
@@ -6,6 +6,18 @@ export declare const starburstEffectSchema: {
6
6
  readonly step: 1;
7
7
  readonly default: undefined;
8
8
  readonly description: "Number of Rays";
9
+ readonly hiddenFromList: false;
10
+ };
11
+ readonly colors: {
12
+ readonly type: "array";
13
+ readonly item: {
14
+ readonly type: "color";
15
+ };
16
+ readonly default: undefined;
17
+ readonly minLength: 2;
18
+ readonly newItemDefault: "#ff0000";
19
+ readonly description: "Colors";
20
+ readonly keyframable: false;
9
21
  };
10
22
  readonly rotation: {
11
23
  readonly type: "number";
@@ -14,6 +26,7 @@ export declare const starburstEffectSchema: {
14
26
  readonly step: 1;
15
27
  readonly default: 0;
16
28
  readonly description: "Rotation";
29
+ readonly hiddenFromList: false;
17
30
  };
18
31
  readonly smoothness: {
19
32
  readonly type: "number";
@@ -22,6 +35,7 @@ export declare const starburstEffectSchema: {
22
35
  readonly step: 0.01;
23
36
  readonly default: 0;
24
37
  readonly description: "Edge Smoothness";
38
+ readonly hiddenFromList: false;
25
39
  };
26
40
  readonly origin: {
27
41
  readonly type: "uv-coordinate";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/starburst",
3
- "version": "4.0.470",
3
+ "version": "4.0.472",
4
4
  "description": "Starburst ray effect 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.470",
27
+ "remotion": "4.0.472",
28
28
  "zod": "4.3.6"
29
29
  },
30
30
  "peerDependencies": {
@@ -42,7 +42,7 @@
42
42
  "devDependencies": {
43
43
  "react": "19.2.3",
44
44
  "react-dom": "19.2.3",
45
- "@remotion/eslint-config-internal": "4.0.470",
45
+ "@remotion/eslint-config-internal": "4.0.472",
46
46
  "eslint": "9.19.0",
47
47
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
48
48
  },