@remotion/promo-pages 4.0.478 → 4.0.479

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/team.js CHANGED
@@ -5746,7 +5746,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
5746
5746
  var addSequenceStackTraces = (component) => {
5747
5747
  componentsToAddStacksTo.push(component);
5748
5748
  };
5749
- var VERSION = "4.0.478";
5749
+ var VERSION = "4.0.479";
5750
5750
  var checkMultipleRemotionVersions = () => {
5751
5751
  if (typeof globalThis === "undefined") {
5752
5752
  return;
@@ -6109,10 +6109,7 @@ var Freeze = ({
6109
6109
  })
6110
6110
  });
6111
6111
  };
6112
- var PremountContext = createContext14({
6113
- premountFramesRemaining: 0
6114
- });
6115
- var sequenceVisualStyleSchema = {
6112
+ var transformSchema = {
6116
6113
  "style.transformOrigin": {
6117
6114
  type: "transform-origin",
6118
6115
  step: 1,
@@ -6148,7 +6145,8 @@ var sequenceVisualStyleSchema = {
6148
6145
  hiddenFromList: false
6149
6146
  }
6150
6147
  };
6151
- var sequencePremountSchema = {
6148
+ var sequenceVisualStyleSchema = transformSchema;
6149
+ var premountSchema = {
6152
6150
  premountFor: {
6153
6151
  type: "number",
6154
6152
  default: 0,
@@ -6171,9 +6169,10 @@ var sequencePremountSchema = {
6171
6169
  type: "hidden"
6172
6170
  }
6173
6171
  };
6172
+ var sequencePremountSchema = premountSchema;
6174
6173
  var sequenceStyleSchema = {
6175
- ...sequenceVisualStyleSchema,
6176
- ...sequencePremountSchema
6174
+ ...transformSchema,
6175
+ ...premountSchema
6177
6176
  };
6178
6177
  var hiddenField = {
6179
6178
  type: "boolean",
@@ -6211,12 +6210,16 @@ var freezeField = {
6211
6210
  step: 1,
6212
6211
  hiddenFromList: true
6213
6212
  };
6214
- var sequenceSchema = extendSchemaWithSequenceName({
6215
- hidden: hiddenField,
6216
- showInTimeline: showInTimelineField,
6213
+ var baseSchema = {
6214
+ durationInFrames: durationInFramesField,
6217
6215
  from: fromField,
6218
6216
  freeze: freezeField,
6219
- durationInFrames: durationInFramesField,
6217
+ hidden: hiddenField,
6218
+ name: sequenceNameField,
6219
+ showInTimeline: showInTimelineField
6220
+ };
6221
+ var sequenceSchema = {
6222
+ ...baseSchema,
6220
6223
  layout: {
6221
6224
  type: "enum",
6222
6225
  default: "absolute-fill",
@@ -6226,14 +6229,18 @@ var sequenceSchema = extendSchemaWithSequenceName({
6226
6229
  none: {}
6227
6230
  }
6228
6231
  }
6229
- });
6230
- var sequenceSchemaWithoutFrom = extendSchemaWithSequenceName({
6231
- hidden: hiddenField,
6232
- showInTimeline: showInTimelineField,
6233
- freeze: freezeField,
6232
+ };
6233
+ var baseSchemaWithoutFrom = {
6234
6234
  durationInFrames: durationInFramesField,
6235
+ freeze: freezeField,
6236
+ hidden: hiddenField,
6237
+ name: sequenceNameField,
6238
+ showInTimeline: showInTimelineField
6239
+ };
6240
+ var sequenceSchemaWithoutFrom = {
6241
+ ...baseSchemaWithoutFrom,
6235
6242
  layout: sequenceSchema.layout
6236
- });
6243
+ };
6237
6244
  var sequenceSchemaDefaultLayoutNone = {
6238
6245
  ...sequenceSchema,
6239
6246
  layout: {
@@ -6241,6 +6248,9 @@ var sequenceSchemaDefaultLayoutNone = {
6241
6248
  default: "none"
6242
6249
  }
6243
6250
  };
6251
+ var PremountContext = createContext14({
6252
+ premountFramesRemaining: 0
6253
+ });
6244
6254
  var SequenceManager = React11.createContext({
6245
6255
  registerSequence: () => {
6246
6256
  throw new Error("SequenceManagerContext not initialized");
@@ -7925,10 +7935,21 @@ var interpolateColors = (input, inputRange, outputRange, options) => {
7925
7935
  return interpolateColorsRGB(input, inputRange, processedOutputRange, options);
7926
7936
  };
7927
7937
  var easingToFn = (e) => {
7928
- if (e === "linear") {
7929
- return Easing.linear;
7938
+ switch (e.type) {
7939
+ case "linear":
7940
+ return Easing.linear;
7941
+ case "spring":
7942
+ return Easing.spring({
7943
+ damping: e.damping,
7944
+ mass: e.mass,
7945
+ overshootClamping: e.overshootClamping,
7946
+ stiffness: e.stiffness
7947
+ });
7948
+ case "bezier":
7949
+ return bezier(e.x1, e.y1, e.x2, e.y2);
7950
+ default:
7951
+ throw new TypeError(`Unsupported easing: ${JSON.stringify(e)}`);
7930
7952
  }
7931
- return bezier(e[0], e[1], e[2], e[3]);
7932
7953
  };
7933
7954
  var interpolateKeyframedStatus = ({
7934
7955
  frame,
@@ -8250,6 +8271,9 @@ var findPropsToDelete = ({
8250
8271
  }
8251
8272
  return [...otherKeys];
8252
8273
  };
8274
+ var DEFAULT_LINEAR_EASING = {
8275
+ type: "linear"
8276
+ };
8253
8277
  var makeStaticDragOverride = (value) => {
8254
8278
  return { type: "static", value };
8255
8279
  };
@@ -8262,7 +8286,7 @@ var makeKeyframedDragOverride = ({
8262
8286
  const keyframes = existingIndex === -1 ? [...status.keyframes, { frame, value }].sort((first, second) => first.frame - second.frame) : status.keyframes.map((keyframe, index) => index === existingIndex ? { frame, value } : keyframe);
8263
8287
  const easing = [...status.easing];
8264
8288
  while (easing.length < keyframes.length - 1) {
8265
- easing.push("linear");
8289
+ easing.push(DEFAULT_LINEAR_EASING);
8266
8290
  }
8267
8291
  if (easing.length > keyframes.length - 1) {
8268
8292
  easing.length = keyframes.length - 1;
@@ -8420,7 +8444,7 @@ var mergeValues = ({
8420
8444
  return merged;
8421
8445
  };
8422
8446
  var stackToOverrideMap = {};
8423
- var wrapInSchema = ({
8447
+ var withInteractivitySchema = ({
8424
8448
  Component,
8425
8449
  componentIdentity,
8426
8450
  schema,
@@ -8434,7 +8458,7 @@ var wrapInSchema = ({
8434
8458
  if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
8435
8459
  return React13.createElement(Component, {
8436
8460
  ...props,
8437
- _experimentalControls: null,
8461
+ controls: null,
8438
8462
  ref
8439
8463
  });
8440
8464
  }
@@ -8442,7 +8466,7 @@ var wrapInSchema = ({
8442
8466
  const { getDragOverrides } = useContext16(VisualModeDragOverridesContext);
8443
8467
  const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
8444
8468
  const frame = useCurrentFrame();
8445
- if (props._experimentalControls) {
8469
+ if (props.controls) {
8446
8470
  return React13.createElement(Component, {
8447
8471
  ...props,
8448
8472
  ref
@@ -8497,11 +8521,11 @@ var wrapInSchema = ({
8497
8521
  });
8498
8522
  return React13.createElement(Component, {
8499
8523
  ...mergedProps,
8500
- _experimentalControls: controls,
8524
+ controls,
8501
8525
  ref
8502
8526
  });
8503
8527
  });
8504
- Wrapped.displayName = `wrapInSchema(${Component.displayName || Component.name || "Component"})`;
8528
+ Wrapped.displayName = `withInteractivitySchema(${Component.displayName || Component.name || "Component"})`;
8505
8529
  return Wrapped;
8506
8530
  };
8507
8531
  var EMPTY_EFFECTS = [];
@@ -8515,7 +8539,7 @@ var RegularSequenceRefForwardingFunction = ({
8515
8539
  width,
8516
8540
  showInTimeline = true,
8517
8541
  hidden = false,
8518
- _experimentalControls: controls,
8542
+ controls,
8519
8543
  _remotionInternalEffects,
8520
8544
  _remotionInternalLoopDisplay: loopDisplay,
8521
8545
  _remotionInternalStack: stack,
@@ -8523,7 +8547,7 @@ var RegularSequenceRefForwardingFunction = ({
8523
8547
  _remotionInternalPremountDisplay: premountDisplay,
8524
8548
  _remotionInternalPostmountDisplay: postmountDisplay,
8525
8549
  _remotionInternalIsMedia: isMedia,
8526
- _remotionInternalRefForOutline: passedRefForOutline,
8550
+ outlineRef: passedRefForOutline,
8527
8551
  ...other
8528
8552
  }, ref) => {
8529
8553
  const { layout = "absolute-fill" } = other;
@@ -8850,13 +8874,13 @@ var SequenceRefForwardingFunction = (props, ref) => {
8850
8874
  };
8851
8875
  var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
8852
8876
  var SequenceWithoutSchema = SequenceInner;
8853
- var Sequence = wrapInSchema({
8877
+ var Sequence = withInteractivitySchema({
8854
8878
  Component: SequenceInner,
8855
8879
  componentIdentity: "dev.remotion.remotion.Sequence",
8856
8880
  schema: sequenceSchema,
8857
8881
  supportsEffects: false
8858
8882
  });
8859
- var SequenceWithoutFrom = wrapInSchema({
8883
+ var SequenceWithoutFrom = withInteractivitySchema({
8860
8884
  Component: SequenceInner,
8861
8885
  componentIdentity: null,
8862
8886
  schema: sequenceSchemaWithoutFrom,
@@ -9395,9 +9419,7 @@ var resolveAnimatedImageSource = (src) => {
9395
9419
  return new URL(src, window.origin).href;
9396
9420
  };
9397
9421
  var animatedImageSchema = {
9398
- durationInFrames: durationInFramesField,
9399
- from: fromField,
9400
- freeze: freezeField,
9422
+ ...baseSchema,
9401
9423
  playbackRate: {
9402
9424
  type: "number",
9403
9425
  min: 0,
@@ -9408,8 +9430,7 @@ var animatedImageSchema = {
9408
9430
  hiddenFromList: false,
9409
9431
  keyframable: false
9410
9432
  },
9411
- ...sequenceVisualStyleSchema,
9412
- hidden: hiddenField
9433
+ ...transformSchema
9413
9434
  };
9414
9435
  var AnimatedImageContent = forwardRef4(({
9415
9436
  src,
@@ -9554,7 +9575,7 @@ var AnimatedImageInner = ({
9554
9575
  durationInFrames,
9555
9576
  requestInit,
9556
9577
  effects = [],
9557
- _experimentalControls: controls,
9578
+ controls,
9558
9579
  ref,
9559
9580
  ...sequenceProps
9560
9581
  }) => {
@@ -9583,10 +9604,10 @@ var AnimatedImageInner = ({
9583
9604
  durationInFrames: resolvedDuration,
9584
9605
  name: "<AnimatedImage>",
9585
9606
  _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage",
9586
- _experimentalControls: controls,
9607
+ controls,
9587
9608
  _remotionInternalEffects: memoizedEffectDefinitions,
9588
9609
  ...sequenceProps,
9589
- _remotionInternalRefForOutline: actualRef,
9610
+ outlineRef: actualRef,
9590
9611
  children: /* @__PURE__ */ jsx14(AnimatedImageContent, {
9591
9612
  ...animatedImageProps,
9592
9613
  ref: actualRef,
@@ -9595,7 +9616,7 @@ var AnimatedImageInner = ({
9595
9616
  })
9596
9617
  });
9597
9618
  };
9598
- var AnimatedImage = wrapInSchema({
9619
+ var AnimatedImage = withInteractivitySchema({
9599
9620
  Component: AnimatedImageInner,
9600
9621
  componentIdentity: "dev.remotion.remotion.AnimatedImage",
9601
9622
  schema: animatedImageSchema,
@@ -9603,6 +9624,36 @@ var AnimatedImage = wrapInSchema({
9603
9624
  });
9604
9625
  AnimatedImage.displayName = "AnimatedImage";
9605
9626
  addSequenceStackTraces(AnimatedImage);
9627
+ var disabledEffectField = {
9628
+ type: "boolean",
9629
+ default: false,
9630
+ description: "Disabled"
9631
+ };
9632
+ var createEffect = (definition) => {
9633
+ const { calculateKey: userCalculateKey, validateParams } = definition;
9634
+ const widened = {
9635
+ ...definition,
9636
+ documentationLink: definition.documentationLink ?? null,
9637
+ calculateKey: (params) => {
9638
+ const disabled = params.disabled ?? false;
9639
+ return `${userCalculateKey(params)}-disabled-${disabled}`;
9640
+ },
9641
+ schema: {
9642
+ disabled: disabledEffectField,
9643
+ ...definition.schema
9644
+ }
9645
+ };
9646
+ const factory = (params = {}) => {
9647
+ validateParams(params);
9648
+ return {
9649
+ definition: widened,
9650
+ params,
9651
+ effectKey: widened.calculateKey(params),
9652
+ memoized: false
9653
+ };
9654
+ };
9655
+ return factory;
9656
+ };
9606
9657
  var validateArtifactFilename = (filename) => {
9607
9658
  if (typeof filename !== "string") {
9608
9659
  throw new TypeError(`The "filename" must be a string, but you passed a value of type ${typeof filename}`);
@@ -12548,9 +12599,7 @@ var resolveSolidPixelDensity = (pixelDensity) => {
12548
12599
  return pixelDensity;
12549
12600
  };
12550
12601
  var solidSchema = {
12551
- durationInFrames: durationInFramesField,
12552
- from: fromField,
12553
- freeze: freezeField,
12602
+ ...baseSchema,
12554
12603
  color: {
12555
12604
  type: "color",
12556
12605
  default: "transparent",
@@ -12572,8 +12621,7 @@ var solidSchema = {
12572
12621
  description: "Height",
12573
12622
  hiddenFromList: false
12574
12623
  },
12575
- ...sequenceVisualStyleSchema,
12576
- hidden: hiddenField
12624
+ ...transformSchema
12577
12625
  };
12578
12626
  var SolidInner = ({
12579
12627
  color,
@@ -12680,7 +12728,7 @@ var SolidInner = ({
12680
12728
  };
12681
12729
  var SolidOuter = forwardRef8(({
12682
12730
  effects = [],
12683
- _experimentalControls: controls,
12731
+ controls,
12684
12732
  color,
12685
12733
  height,
12686
12734
  width,
@@ -12706,11 +12754,11 @@ var SolidOuter = forwardRef8(({
12706
12754
  freeze,
12707
12755
  hidden,
12708
12756
  showInTimeline,
12709
- _experimentalControls: controls,
12757
+ controls,
12710
12758
  _remotionInternalEffects: memoizedEffectDefinitions,
12711
12759
  durationInFrames,
12712
12760
  name: name ?? "<Solid>",
12713
- _remotionInternalRefForOutline: actualRef,
12761
+ outlineRef: actualRef,
12714
12762
  _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/solid",
12715
12763
  ...props2,
12716
12764
  children: /* @__PURE__ */ jsx24(SolidInner, {
@@ -12726,7 +12774,7 @@ var SolidOuter = forwardRef8(({
12726
12774
  })
12727
12775
  });
12728
12776
  });
12729
- var Solid = wrapInSchema({
12777
+ var Solid = withInteractivitySchema({
12730
12778
  Component: SolidOuter,
12731
12779
  componentIdentity: "dev.remotion.remotion.Solid",
12732
12780
  schema: solidSchema,
@@ -13003,7 +13051,7 @@ var HtmlInCanvasInner = forwardRef9(({
13003
13051
  onPaint,
13004
13052
  onInit,
13005
13053
  pixelDensity,
13006
- _experimentalControls: controls,
13054
+ controls,
13007
13055
  style,
13008
13056
  durationInFrames,
13009
13057
  name,
@@ -13025,9 +13073,9 @@ var HtmlInCanvasInner = forwardRef9(({
13025
13073
  durationInFrames: resolvedDuration,
13026
13074
  name: name ?? "<HtmlInCanvas>",
13027
13075
  _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
13028
- _experimentalControls: controls,
13076
+ controls,
13029
13077
  _remotionInternalEffects: memoizedEffectDefinitions,
13030
- _remotionInternalRefForOutline: actualRef,
13078
+ outlineRef: actualRef,
13031
13079
  layout: "none",
13032
13080
  ...sequenceProps,
13033
13081
  children: /* @__PURE__ */ jsx25(HtmlInCanvasContent, {
@@ -13046,13 +13094,10 @@ var HtmlInCanvasInner = forwardRef9(({
13046
13094
  });
13047
13095
  HtmlInCanvasInner.displayName = "HtmlInCanvas";
13048
13096
  var htmlInCanvasSchema = {
13049
- durationInFrames: durationInFramesField,
13050
- from: fromField,
13051
- freeze: freezeField,
13052
- ...sequenceVisualStyleSchema,
13053
- hidden: hiddenField
13097
+ ...baseSchema,
13098
+ ...transformSchema
13054
13099
  };
13055
- var HtmlInCanvasWrapped = wrapInSchema({
13100
+ var HtmlInCanvasWrapped = withInteractivitySchema({
13056
13101
  Component: HtmlInCanvasInner,
13057
13102
  componentIdentity: "dev.remotion.remotion.HtmlInCanvas",
13058
13103
  schema: htmlInCanvasSchema,
@@ -13070,9 +13115,7 @@ function truncateSrcForLabel(src) {
13070
13115
  return src;
13071
13116
  }
13072
13117
  var canvasImageSchema = {
13073
- durationInFrames: durationInFramesField,
13074
- from: fromField,
13075
- freeze: freezeField,
13118
+ ...baseSchema,
13076
13119
  fit: {
13077
13120
  type: "enum",
13078
13121
  default: "fill",
@@ -13083,8 +13126,7 @@ var canvasImageSchema = {
13083
13126
  cover: {}
13084
13127
  }
13085
13128
  },
13086
- ...sequenceVisualStyleSchema,
13087
- hidden: hiddenField
13129
+ ...transformSchema
13088
13130
  };
13089
13131
  var makeAbortError = () => {
13090
13132
  if (typeof DOMException !== "undefined") {
@@ -13165,6 +13207,7 @@ var CanvasImageContent = forwardRef10(({
13165
13207
  const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
13166
13208
  const { delayPlayback } = useBufferState();
13167
13209
  const [outputCanvas, setOutputCanvas] = useState16(null);
13210
+ const [loadedImage, setLoadedImage] = useState16(null);
13168
13211
  const actualSrc = usePreload(src);
13169
13212
  const chainState = useEffectChainState();
13170
13213
  const memoizedEffects = useMemoizedEffects({
@@ -13190,9 +13233,6 @@ var CanvasImageContent = forwardRef10(({
13190
13233
  }
13191
13234
  }, [ref, refForOutline]);
13192
13235
  useEffect17(() => {
13193
- if (!outputCanvas || !sourceCanvas) {
13194
- return;
13195
- }
13196
13236
  const isPremounting = Boolean(sequenceContext?.premounting);
13197
13237
  const isPostmounting = Boolean(sequenceContext?.postmounting);
13198
13238
  const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
@@ -13207,6 +13247,7 @@ var CanvasImageContent = forwardRef10(({
13207
13247
  let continued = false;
13208
13248
  let errorCount = 0;
13209
13249
  let timeoutId = null;
13250
+ setLoadedImage(null);
13210
13251
  const continueRenderOnce = () => {
13211
13252
  if (continued) {
13212
13253
  return;
@@ -13220,30 +13261,9 @@ var CanvasImageContent = forwardRef10(({
13220
13261
  if (cancelled) {
13221
13262
  return;
13222
13263
  }
13223
- const canvasWidth = width ?? image.width;
13224
- const canvasHeight = height ?? image.height;
13225
- const sourceContext = sourceCanvas.getContext("2d", {
13226
- colorSpace: "srgb"
13227
- });
13228
- if (!sourceContext) {
13229
- throw new Error("Could not get 2D context for <CanvasImage> source canvas");
13230
- }
13231
- sourceCanvas.width = canvasWidth;
13232
- sourceCanvas.height = canvasHeight;
13233
- outputCanvas.width = canvasWidth;
13234
- outputCanvas.height = canvasHeight;
13235
- sourceContext.clearRect(0, 0, canvasWidth, canvasHeight);
13236
- sourceContext.drawImage(image.element, ...calculateImageFit(fit, { width: image.width, height: image.height }, { width: canvasWidth, height: canvasHeight }));
13237
- return runEffectChain({
13238
- state: chainState.get(canvasWidth, canvasHeight),
13239
- source: sourceCanvas,
13240
- effects: memoizedEffects,
13241
- output: outputCanvas,
13242
- width: canvasWidth,
13243
- height: canvasHeight
13244
- });
13245
- }).then((completed) => {
13246
- if (completed && !cancelled) {
13264
+ setLoadedImage(image);
13265
+ }).then(() => {
13266
+ if (!cancelled) {
13247
13267
  continueRenderOnce();
13248
13268
  }
13249
13269
  }).catch((err) => {
@@ -13280,21 +13300,87 @@ var CanvasImageContent = forwardRef10(({
13280
13300
  }, [
13281
13301
  actualSrc,
13282
13302
  cancelRender2,
13283
- chainState,
13284
13303
  continueRender2,
13285
13304
  delayPlayback,
13286
13305
  delayRender2,
13287
13306
  delayRenderRetries,
13288
13307
  delayRenderTimeoutInMilliseconds,
13308
+ maxRetries,
13309
+ onError,
13310
+ pauseWhenLoading,
13311
+ sequenceContext?.postmounting,
13312
+ sequenceContext?.premounting
13313
+ ]);
13314
+ useEffect17(() => {
13315
+ if (!loadedImage || !outputCanvas || !sourceCanvas) {
13316
+ return;
13317
+ }
13318
+ const handle = delayRender2(`Applying effects to <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`);
13319
+ let cancelled = false;
13320
+ let continued = false;
13321
+ const continueRenderOnce = () => {
13322
+ if (continued) {
13323
+ return;
13324
+ }
13325
+ continued = true;
13326
+ continueRender2(handle);
13327
+ };
13328
+ const canvasWidth = width ?? loadedImage.width;
13329
+ const canvasHeight = height ?? loadedImage.height;
13330
+ const sourceContext = sourceCanvas.getContext("2d", {
13331
+ colorSpace: "srgb"
13332
+ });
13333
+ if (!sourceContext) {
13334
+ cancelRender2(new Error("Could not get 2D context for <CanvasImage> source canvas"));
13335
+ continueRenderOnce();
13336
+ return () => {
13337
+ continueRenderOnce();
13338
+ };
13339
+ }
13340
+ sourceCanvas.width = canvasWidth;
13341
+ sourceCanvas.height = canvasHeight;
13342
+ outputCanvas.width = canvasWidth;
13343
+ outputCanvas.height = canvasHeight;
13344
+ sourceContext.clearRect(0, 0, canvasWidth, canvasHeight);
13345
+ sourceContext.drawImage(loadedImage.element, ...calculateImageFit(fit, { width: loadedImage.width, height: loadedImage.height }, { width: canvasWidth, height: canvasHeight }));
13346
+ runEffectChain({
13347
+ state: chainState.get(canvasWidth, canvasHeight),
13348
+ source: sourceCanvas,
13349
+ effects: memoizedEffects,
13350
+ output: outputCanvas,
13351
+ width: canvasWidth,
13352
+ height: canvasHeight
13353
+ }).then((completed) => {
13354
+ if (completed && !cancelled) {
13355
+ continueRenderOnce();
13356
+ }
13357
+ }).catch((err) => {
13358
+ if (cancelled) {
13359
+ return;
13360
+ }
13361
+ if (onError) {
13362
+ onError(err);
13363
+ continueRenderOnce();
13364
+ } else {
13365
+ cancelRender2(err);
13366
+ }
13367
+ });
13368
+ return () => {
13369
+ cancelled = true;
13370
+ continueRenderOnce();
13371
+ };
13372
+ }, [
13373
+ actualSrc,
13374
+ cancelRender2,
13375
+ chainState,
13376
+ continueRender2,
13377
+ delayRender2,
13289
13378
  fit,
13290
13379
  height,
13291
- maxRetries,
13380
+ loadedImage,
13292
13381
  memoizedEffects,
13293
13382
  onError,
13294
13383
  outputCanvas,
13295
- pauseWhenLoading,
13296
- sequenceContext?.postmounting,
13297
- sequenceContext?.premounting,
13298
13384
  sourceCanvas,
13299
13385
  width
13300
13386
  ]);
@@ -13330,9 +13416,9 @@ var CanvasImageInner = forwardRef10(({
13330
13416
  name,
13331
13417
  showInTimeline,
13332
13418
  stack,
13333
- _experimentalControls: controls,
13419
+ controls,
13334
13420
  _remotionInternalDocumentationLink,
13335
- _remotionInternalRefForOutline,
13421
+ outlineRef,
13336
13422
  ...canvasProps
13337
13423
  }, ref) => {
13338
13424
  if (!src) {
@@ -13352,11 +13438,11 @@ var CanvasImageInner = forwardRef10(({
13352
13438
  showInTimeline: showInTimeline ?? true,
13353
13439
  name: name ?? "<CanvasImage>",
13354
13440
  _remotionInternalDocumentationLink: _remotionInternalDocumentationLink ?? "https://www.remotion.dev/docs/canvasimage",
13355
- _experimentalControls: controls,
13441
+ controls,
13356
13442
  _remotionInternalEffects: memoizedEffectDefinitions,
13357
13443
  _remotionInternalIsMedia: { type: "image", src },
13358
13444
  _remotionInternalStack: stack,
13359
- _remotionInternalRefForOutline: _remotionInternalRefForOutline ?? actualRef,
13445
+ outlineRef: outlineRef ?? actualRef,
13360
13446
  children: /* @__PURE__ */ jsx26(CanvasImageContent, {
13361
13447
  ref: actualRef,
13362
13448
  src,
@@ -13373,12 +13459,12 @@ var CanvasImageInner = forwardRef10(({
13373
13459
  maxRetries,
13374
13460
  delayRenderRetries,
13375
13461
  delayRenderTimeoutInMilliseconds,
13376
- refForOutline: _remotionInternalRefForOutline ?? null,
13462
+ refForOutline: outlineRef ?? null,
13377
13463
  ...canvasProps
13378
13464
  })
13379
13465
  });
13380
13466
  });
13381
- var CanvasImage = wrapInSchema({
13467
+ var CanvasImage = withInteractivitySchema({
13382
13468
  Component: CanvasImageInner,
13383
13469
  componentIdentity: "dev.remotion.remotion.CanvasImage",
13384
13470
  schema: canvasImageSchema,
@@ -13583,8 +13669,8 @@ var NativeImgInner = ({
13583
13669
  from,
13584
13670
  durationInFrames,
13585
13671
  freeze,
13586
- _experimentalControls: controls,
13587
- _remotionInternalRefForOutline: refForOutline,
13672
+ controls,
13673
+ outlineRef: refForOutline,
13588
13674
  ...props2
13589
13675
  }) => {
13590
13676
  if (!src) {
@@ -13599,10 +13685,10 @@ var NativeImgInner = ({
13599
13685
  _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
13600
13686
  _remotionInternalIsMedia: { type: "image", src },
13601
13687
  name: name ?? "<Img>",
13602
- _experimentalControls: controls,
13688
+ controls,
13603
13689
  showInTimeline: showInTimeline ?? true,
13604
13690
  hidden,
13605
- _remotionInternalRefForOutline: refForOutline,
13691
+ outlineRef: refForOutline,
13606
13692
  children: /* @__PURE__ */ jsx28(ImgContent, {
13607
13693
  src,
13608
13694
  refForOutline,
@@ -13612,11 +13698,8 @@ var NativeImgInner = ({
13612
13698
  };
13613
13699
  var CanvasImageWithPrivateProps = CanvasImage;
13614
13700
  var imgSchema = {
13615
- durationInFrames: durationInFramesField,
13616
- from: fromField,
13617
- freeze: freezeField,
13618
- ...sequenceVisualStyleSchema,
13619
- hidden: hiddenField
13701
+ ...baseSchema,
13702
+ ...transformSchema
13620
13703
  };
13621
13704
  var imgCanvasFallbackIncompatibleProps = new Set([
13622
13705
  "alt",
@@ -13671,7 +13754,7 @@ var ImgInner = ({
13671
13754
  from,
13672
13755
  durationInFrames,
13673
13756
  freeze,
13674
- _experimentalControls: controls,
13757
+ controls,
13675
13758
  width,
13676
13759
  height,
13677
13760
  className,
@@ -13696,7 +13779,7 @@ var ImgInner = ({
13696
13779
  from,
13697
13780
  durationInFrames,
13698
13781
  freeze,
13699
- _experimentalControls: controls,
13782
+ controls,
13700
13783
  width,
13701
13784
  height,
13702
13785
  className,
@@ -13706,7 +13789,7 @@ var ImgInner = ({
13706
13789
  maxRetries,
13707
13790
  delayRenderRetries,
13708
13791
  delayRenderTimeoutInMilliseconds,
13709
- _remotionInternalRefForOutline: refForOutline
13792
+ outlineRef: refForOutline
13710
13793
  });
13711
13794
  }
13712
13795
  if (!src) {
@@ -13743,12 +13826,12 @@ var ImgInner = ({
13743
13826
  showInTimeline,
13744
13827
  stack,
13745
13828
  _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
13746
- _experimentalControls: controls,
13747
- _remotionInternalRefForOutline: refForOutline,
13829
+ controls,
13830
+ outlineRef: refForOutline,
13748
13831
  ...canvasProps
13749
13832
  });
13750
13833
  };
13751
- var Img = wrapInSchema({
13834
+ var Img = withInteractivitySchema({
13752
13835
  Component: ImgInner,
13753
13836
  componentIdentity: "dev.remotion.remotion.Img",
13754
13837
  schema: imgSchema,
@@ -13756,11 +13839,8 @@ var Img = wrapInSchema({
13756
13839
  });
13757
13840
  addSequenceStackTraces(Img);
13758
13841
  var interactiveElementSchema = {
13759
- durationInFrames: durationInFramesField,
13760
- from: fromField,
13761
- freeze: freezeField,
13762
- ...sequenceVisualStyleSchema,
13763
- hidden: hiddenField
13842
+ ...baseSchema,
13843
+ ...transformSchema
13764
13844
  };
13765
13845
  var setRef = (ref, value) => {
13766
13846
  if (typeof ref === "function") {
@@ -13779,7 +13859,7 @@ var makeInteractiveElement = (tag, displayName) => {
13779
13859
  name,
13780
13860
  showInTimeline,
13781
13861
  stack,
13782
- _experimentalControls,
13862
+ controls,
13783
13863
  ...props2
13784
13864
  } = propsWithControls;
13785
13865
  const refForOutline = useRef25(null);
@@ -13795,10 +13875,10 @@ var makeInteractiveElement = (tag, displayName) => {
13795
13875
  hidden,
13796
13876
  name: name ?? displayName,
13797
13877
  showInTimeline: showInTimeline ?? true,
13798
- _experimentalControls,
13878
+ controls,
13799
13879
  _remotionInternalStack: stack,
13800
13880
  _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
13801
- _remotionInternalRefForOutline: refForOutline,
13881
+ outlineRef: refForOutline,
13802
13882
  children: React29.createElement(tag, {
13803
13883
  ...props2,
13804
13884
  ref: callbackRef
@@ -13806,7 +13886,7 @@ var makeInteractiveElement = (tag, displayName) => {
13806
13886
  });
13807
13887
  });
13808
13888
  Inner.displayName = displayName;
13809
- const Wrapped = wrapInSchema({
13889
+ const Wrapped = withInteractivitySchema({
13810
13890
  Component: Inner,
13811
13891
  componentIdentity: `dev.remotion.remotion.${displayName.slice(1, -1)}`,
13812
13892
  schema: interactiveElementSchema,
@@ -13817,6 +13897,11 @@ var makeInteractiveElement = (tag, displayName) => {
13817
13897
  return Wrapped;
13818
13898
  };
13819
13899
  var Interactive = {
13900
+ baseSchema,
13901
+ transformSchema,
13902
+ premountSchema,
13903
+ sequenceSchema,
13904
+ withSchema: withInteractivitySchema,
13820
13905
  A: makeInteractiveElement("a", "<Interactive.A>"),
13821
13906
  Article: makeInteractiveElement("article", "<Interactive.Article>"),
13822
13907
  Aside: makeInteractiveElement("aside", "<Interactive.Aside>"),
@@ -13998,36 +14083,6 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
13998
14083
  }
13999
14084
  `;
14000
14085
  };
14001
- var disabledEffectField = {
14002
- type: "boolean",
14003
- default: false,
14004
- description: "Disabled"
14005
- };
14006
- var createEffect = (definition) => {
14007
- const { calculateKey: userCalculateKey, validateParams } = definition;
14008
- const widened = {
14009
- ...definition,
14010
- documentationLink: definition.documentationLink ?? null,
14011
- calculateKey: (params) => {
14012
- const disabled = params.disabled ?? false;
14013
- return `${userCalculateKey(params)}-disabled-${disabled}`;
14014
- },
14015
- schema: {
14016
- disabled: disabledEffectField,
14017
- ...definition.schema
14018
- }
14019
- };
14020
- const factory = (params = {}) => {
14021
- validateParams(params);
14022
- return {
14023
- definition: widened,
14024
- params,
14025
- effectKey: widened.calculateKey(params),
14026
- memoized: false
14027
- };
14028
- };
14029
- return factory;
14030
- };
14031
14086
  var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
14032
14087
  var getPreviewDomElement = () => {
14033
14088
  return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
@@ -15114,12 +15169,14 @@ var Internals = {
15114
15169
  SequenceManager,
15115
15170
  SequenceManagerRefContext,
15116
15171
  SequenceStackTracesUpdateContext,
15117
- wrapInSchema,
15172
+ baseSchema,
15118
15173
  sequenceSchema,
15119
15174
  SequenceWithoutSchema,
15120
15175
  sequenceStyleSchema,
15121
15176
  sequenceVisualStyleSchema,
15122
15177
  sequencePremountSchema,
15178
+ transformSchema,
15179
+ premountSchema,
15123
15180
  flattenActiveSchema,
15124
15181
  getFlatSchemaWithAllKeys,
15125
15182
  RemotionRootContexts,
@@ -15319,7 +15376,7 @@ var SeriesInner = (props2) => {
15319
15376
  })
15320
15377
  });
15321
15378
  };
15322
- var Series = Object.assign(wrapInSchema({
15379
+ var Series = Object.assign(withInteractivitySchema({
15323
15380
  Component: SeriesInner,
15324
15381
  componentIdentity: "dev.remotion.remotion.Series",
15325
15382
  schema: sequenceSchemaDefaultLayoutNone,
@@ -15909,6 +15966,7 @@ import { jsx as jsx82 } from "react/jsx-runtime";
15909
15966
  import { jsx as jsx92 } from "react/jsx-runtime";
15910
15967
  import { jsx as jsx102 } from "react/jsx-runtime";
15911
15968
  import { jsx as jsx112 } from "react/jsx-runtime";
15969
+ import { jsx as jsx122 } from "react/jsx-runtime";
15912
15970
  var unitDir = (from, to) => {
15913
15971
  const dx = to[0] - from[0];
15914
15972
  const dy = to[1] - from[1];
@@ -16052,6 +16110,7 @@ var doesReactSupportTransformOriginProperty = (version2) => {
16052
16110
  const [major] = version2.split(".").map(Number);
16053
16111
  return major > 18;
16054
16112
  };
16113
+ var HtmlInCanvasWithPrivateProps = HtmlInCanvas;
16055
16114
  var RenderSvg = ({
16056
16115
  defaultName,
16057
16116
  documentationLink,
@@ -16071,7 +16130,7 @@ var RenderSvg = ({
16071
16130
  hidden,
16072
16131
  name,
16073
16132
  showInTimeline,
16074
- _experimentalControls: controls,
16133
+ controls,
16075
16134
  stack,
16076
16135
  ...props
16077
16136
  }) => {
@@ -16158,7 +16217,7 @@ var RenderSvg = ({
16158
16217
  }) : null
16159
16218
  ]
16160
16219
  });
16161
- const content = effects.length === 0 ? svg : /* @__PURE__ */ jsx40(HtmlInCanvas, {
16220
+ const content = effects.length === 0 ? svg : /* @__PURE__ */ jsx40(HtmlInCanvasWithPrivateProps, {
16162
16221
  ref: setCanvasRef,
16163
16222
  width: Math.ceil(width),
16164
16223
  height: Math.ceil(height),
@@ -16166,7 +16225,7 @@ var RenderSvg = ({
16166
16225
  pixelDensity,
16167
16226
  showInTimeline: false,
16168
16227
  style: actualStyle,
16169
- _experimentalControls: controls,
16228
+ controls,
16170
16229
  children: svg
16171
16230
  });
16172
16231
  const stackProps = stack === undefined ? null : { stack };
@@ -16179,11 +16238,11 @@ var RenderSvg = ({
16179
16238
  freeze,
16180
16239
  hidden,
16181
16240
  showInTimeline,
16182
- _experimentalControls: controls,
16241
+ controls,
16183
16242
  _remotionInternalEffects: memoizedEffectDefinitions,
16184
16243
  durationInFrames,
16185
16244
  name: name ?? defaultName,
16186
- _remotionInternalRefForOutline: outlineRef,
16245
+ outlineRef,
16187
16246
  _remotionInternalDocumentationLink: name === undefined ? documentationLink : undefined,
16188
16247
  ...stackProps,
16189
16248
  children: content
@@ -16241,16 +16300,13 @@ var enumField = ({
16241
16300
  };
16242
16301
  var makeShapeSchema = (shapeFields) => {
16243
16302
  return {
16244
- from: Internals.sequenceSchema.from,
16245
- freeze: Internals.sequenceSchema.freeze,
16246
- durationInFrames: Internals.sequenceSchema.durationInFrames,
16303
+ ...Internals.baseSchema,
16247
16304
  ...shapeFields,
16248
16305
  fill: colorField({
16249
16306
  defaultValue: "#0b84ff",
16250
16307
  description: "Fill"
16251
16308
  }),
16252
- ...Internals.sequenceVisualStyleSchema,
16253
- hidden: Internals.sequenceSchema.hidden
16309
+ ...Internals.transformSchema
16254
16310
  };
16255
16311
  };
16256
16312
  var arrowSchema = makeShapeSchema({
@@ -16308,7 +16364,7 @@ var ArrowInner = ({
16308
16364
  ...props
16309
16365
  });
16310
16366
  };
16311
- var Arrow = Internals.wrapInSchema({
16367
+ var Arrow = Interactive.withSchema({
16312
16368
  Component: ArrowInner,
16313
16369
  componentIdentity: "dev.remotion.shapes.Arrow",
16314
16370
  schema: arrowSchema,
@@ -16732,7 +16788,7 @@ var CalloutInner = ({
16732
16788
  ...props
16733
16789
  });
16734
16790
  };
16735
- var Callout = Internals.wrapInSchema({
16791
+ var Callout = Interactive.withSchema({
16736
16792
  Component: CalloutInner,
16737
16793
  componentIdentity: "dev.remotion.shapes.Callout",
16738
16794
  schema: calloutSchema,
@@ -16794,7 +16850,7 @@ var CircleInner = ({ radius, ...props }) => {
16794
16850
  ...props
16795
16851
  });
16796
16852
  };
16797
- var Circle = Internals.wrapInSchema({
16853
+ var Circle = Interactive.withSchema({
16798
16854
  Component: CircleInner,
16799
16855
  componentIdentity: "dev.remotion.shapes.Circle",
16800
16856
  schema: circleSchema,
@@ -16851,7 +16907,7 @@ var EllipseInner = ({ rx, ry, ...props }) => {
16851
16907
  ...props
16852
16908
  });
16853
16909
  };
16854
- var Ellipse = Internals.wrapInSchema({
16910
+ var Ellipse = Interactive.withSchema({
16855
16911
  Component: EllipseInner,
16856
16912
  componentIdentity: "dev.remotion.shapes.Ellipse",
16857
16913
  schema: ellipseSchema,
@@ -16989,7 +17045,7 @@ var HeartInner = ({
16989
17045
  ...props
16990
17046
  });
16991
17047
  };
16992
- var Heart = Internals.wrapInSchema({
17048
+ var Heart = Interactive.withSchema({
16993
17049
  Component: HeartInner,
16994
17050
  componentIdentity: "dev.remotion.shapes.Heart",
16995
17051
  schema: heartSchema,
@@ -17143,7 +17199,7 @@ var PieInner = ({
17143
17199
  ...props
17144
17200
  });
17145
17201
  };
17146
- var Pie = Internals.wrapInSchema({
17202
+ var Pie = Interactive.withSchema({
17147
17203
  Component: PieInner,
17148
17204
  componentIdentity: "dev.remotion.shapes.Pie",
17149
17205
  schema: pieSchema,
@@ -17242,7 +17298,7 @@ var PolygonInner = ({
17242
17298
  ...props
17243
17299
  });
17244
17300
  };
17245
- var Polygon = Internals.wrapInSchema({
17301
+ var Polygon = Interactive.withSchema({
17246
17302
  Component: PolygonInner,
17247
17303
  componentIdentity: "dev.remotion.shapes.Polygon",
17248
17304
  schema: polygonSchema,
@@ -17308,13 +17364,224 @@ var RectInner = ({
17308
17364
  ...props
17309
17365
  });
17310
17366
  };
17311
- var Rect = Internals.wrapInSchema({
17367
+ var Rect = Interactive.withSchema({
17312
17368
  Component: RectInner,
17313
17369
  componentIdentity: "dev.remotion.shapes.Rect",
17314
17370
  schema: rectSchema,
17315
17371
  supportsEffects: true
17316
17372
  });
17317
17373
  Internals.addSequenceStackTraces(Rect);
17374
+ var KAPPA = 0.5522847498307936;
17375
+ var CAP_HANDLE = 4 / 3;
17376
+ var curve = ({
17377
+ to,
17378
+ cp1,
17379
+ cp2
17380
+ }) => {
17381
+ return {
17382
+ type: "C",
17383
+ cp1x: cp1[0],
17384
+ cp1y: cp1[1],
17385
+ cp2x: cp2[0],
17386
+ cp2y: cp2[1],
17387
+ x: to[0],
17388
+ y: to[1]
17389
+ };
17390
+ };
17391
+ var cap = ({
17392
+ from,
17393
+ to,
17394
+ radius,
17395
+ direction
17396
+ }) => {
17397
+ if (direction === "top") {
17398
+ return curve({
17399
+ to,
17400
+ cp1: [from[0], from[1] - radius * CAP_HANDLE],
17401
+ cp2: [to[0], to[1] - radius * CAP_HANDLE]
17402
+ });
17403
+ }
17404
+ if (direction === "right") {
17405
+ return curve({
17406
+ to,
17407
+ cp1: [from[0] + radius * CAP_HANDLE, from[1]],
17408
+ cp2: [to[0] + radius * CAP_HANDLE, to[1]]
17409
+ });
17410
+ }
17411
+ if (direction === "bottom") {
17412
+ return curve({
17413
+ to,
17414
+ cp1: [from[0], from[1] + radius * CAP_HANDLE],
17415
+ cp2: [to[0], to[1] + radius * CAP_HANDLE]
17416
+ });
17417
+ }
17418
+ return curve({
17419
+ to,
17420
+ cp1: [from[0] - radius * CAP_HANDLE, from[1]],
17421
+ cp2: [to[0] - radius * CAP_HANDLE, to[1]]
17422
+ });
17423
+ };
17424
+ var edge = ({
17425
+ from,
17426
+ to,
17427
+ edgeRoundness,
17428
+ direction
17429
+ }) => {
17430
+ const dx = to[0] - from[0];
17431
+ const dy = to[1] - from[1];
17432
+ const handleX = Math.abs(dx) * KAPPA * edgeRoundness;
17433
+ const handleY = Math.abs(dy) * KAPPA * edgeRoundness;
17434
+ if (direction === "top-right") {
17435
+ return curve({
17436
+ to,
17437
+ cp1: [from[0], from[1] + handleY],
17438
+ cp2: [to[0] - handleX, to[1]]
17439
+ });
17440
+ }
17441
+ if (direction === "right-bottom") {
17442
+ return curve({
17443
+ to,
17444
+ cp1: [from[0] - handleX, from[1]],
17445
+ cp2: [to[0], to[1] - handleY]
17446
+ });
17447
+ }
17448
+ if (direction === "bottom-left") {
17449
+ return curve({
17450
+ to,
17451
+ cp1: [from[0], from[1] - handleY],
17452
+ cp2: [to[0] + handleX, to[1]]
17453
+ });
17454
+ }
17455
+ return curve({
17456
+ to,
17457
+ cp1: [from[0] + handleX, from[1]],
17458
+ cp2: [to[0], to[1] + handleY]
17459
+ });
17460
+ };
17461
+ var clampCornerRadius = ({
17462
+ cornerRadius,
17463
+ width,
17464
+ height
17465
+ }) => {
17466
+ return Math.min(Math.max(cornerRadius, 0), width / 2, height / 2);
17467
+ };
17468
+ var makeSpark = ({
17469
+ width,
17470
+ height,
17471
+ edgeRoundness = 1,
17472
+ cornerRadius = 0
17473
+ }) => {
17474
+ const centerX = width / 2;
17475
+ const centerY = height / 2;
17476
+ const radius = clampCornerRadius({ cornerRadius, width, height });
17477
+ const top = [centerX, 0];
17478
+ const right = [width, centerY];
17479
+ const bottom = [centerX, height];
17480
+ const left = [0, centerY];
17481
+ const topRight = radius === 0 ? top : [centerX + radius, radius];
17482
+ const rightTop = radius === 0 ? right : [width - radius, centerY - radius];
17483
+ const rightBottom = radius === 0 ? right : [width - radius, centerY + radius];
17484
+ const bottomRight = radius === 0 ? bottom : [centerX + radius, height - radius];
17485
+ const bottomLeft = radius === 0 ? bottom : [centerX - radius, height - radius];
17486
+ const leftBottom = radius === 0 ? left : [radius, centerY + radius];
17487
+ const leftTop = radius === 0 ? left : [radius, centerY - radius];
17488
+ const topLeft = radius === 0 ? top : [centerX - radius, radius];
17489
+ const instructions = [
17490
+ {
17491
+ type: "M",
17492
+ x: topRight[0],
17493
+ y: topRight[1]
17494
+ },
17495
+ edge({
17496
+ from: topRight,
17497
+ to: rightTop,
17498
+ edgeRoundness,
17499
+ direction: "top-right"
17500
+ })
17501
+ ];
17502
+ if (radius > 0) {
17503
+ instructions.push(cap({ from: rightTop, to: rightBottom, radius, direction: "right" }));
17504
+ }
17505
+ instructions.push(edge({
17506
+ from: rightBottom,
17507
+ to: bottomRight,
17508
+ edgeRoundness,
17509
+ direction: "right-bottom"
17510
+ }));
17511
+ if (radius > 0) {
17512
+ instructions.push(cap({ from: bottomRight, to: bottomLeft, radius, direction: "bottom" }));
17513
+ }
17514
+ instructions.push(edge({
17515
+ from: bottomLeft,
17516
+ to: leftBottom,
17517
+ edgeRoundness,
17518
+ direction: "bottom-left"
17519
+ }));
17520
+ if (radius > 0) {
17521
+ instructions.push(cap({ from: leftBottom, to: leftTop, radius, direction: "left" }));
17522
+ }
17523
+ instructions.push(edge({
17524
+ from: leftTop,
17525
+ to: topLeft,
17526
+ edgeRoundness,
17527
+ direction: "left-top"
17528
+ }));
17529
+ if (radius > 0) {
17530
+ instructions.push(cap({ from: topLeft, to: topRight, radius, direction: "top" }));
17531
+ }
17532
+ instructions.push({ type: "Z" });
17533
+ return {
17534
+ path: serializeInstructions(instructions),
17535
+ width,
17536
+ height,
17537
+ transformOrigin: `${centerX} ${centerY}`,
17538
+ instructions
17539
+ };
17540
+ };
17541
+ var sparkSchema = makeShapeSchema({
17542
+ width: numberField({
17543
+ defaultValue: 100,
17544
+ description: "Width",
17545
+ min: 0
17546
+ }),
17547
+ height: numberField({
17548
+ defaultValue: 140,
17549
+ description: "Height",
17550
+ min: 0
17551
+ }),
17552
+ edgeRoundness: numberField({
17553
+ defaultValue: 1,
17554
+ description: "Edge Roundness",
17555
+ min: 0,
17556
+ step: 0.01
17557
+ }),
17558
+ cornerRadius: numberField({
17559
+ defaultValue: 0,
17560
+ description: "Corner Radius",
17561
+ min: 0
17562
+ })
17563
+ });
17564
+ var SparkInner = ({
17565
+ width,
17566
+ height,
17567
+ edgeRoundness,
17568
+ cornerRadius,
17569
+ ...props
17570
+ }) => {
17571
+ return /* @__PURE__ */ jsx102(RenderSvg, {
17572
+ defaultName: "<Spark>",
17573
+ documentationLink: "https://www.remotion.dev/docs/shapes/spark",
17574
+ ...makeSpark({ width, height, edgeRoundness, cornerRadius }),
17575
+ ...props
17576
+ });
17577
+ };
17578
+ var Spark = Interactive.withSchema({
17579
+ Component: SparkInner,
17580
+ componentIdentity: "dev.remotion.shapes.Spark",
17581
+ schema: sparkSchema,
17582
+ supportsEffects: true
17583
+ });
17584
+ Internals.addSequenceStackTraces(Spark);
17318
17585
  var star = ({
17319
17586
  centerX,
17320
17587
  centerY,
@@ -17405,7 +17672,7 @@ var StarInner = ({
17405
17672
  edgeRoundness,
17406
17673
  ...props
17407
17674
  }) => {
17408
- return /* @__PURE__ */ jsx102(RenderSvg, {
17675
+ return /* @__PURE__ */ jsx112(RenderSvg, {
17409
17676
  defaultName: "<Star>",
17410
17677
  documentationLink: "https://www.remotion.dev/docs/shapes/star",
17411
17678
  ...makeStar({
@@ -17418,7 +17685,7 @@ var StarInner = ({
17418
17685
  ...props
17419
17686
  });
17420
17687
  };
17421
- var Star = Internals.wrapInSchema({
17688
+ var Star = Interactive.withSchema({
17422
17689
  Component: StarInner,
17423
17690
  componentIdentity: "dev.remotion.shapes.Star",
17424
17691
  schema: starSchema,
@@ -17517,14 +17784,14 @@ var TriangleInner = ({
17517
17784
  cornerRadius,
17518
17785
  ...props
17519
17786
  }) => {
17520
- return /* @__PURE__ */ jsx112(RenderSvg, {
17787
+ return /* @__PURE__ */ jsx122(RenderSvg, {
17521
17788
  defaultName: "<Triangle>",
17522
17789
  documentationLink: "https://www.remotion.dev/docs/shapes/triangle",
17523
17790
  ...makeTriangle({ length: length2, direction, edgeRoundness, cornerRadius }),
17524
17791
  ...props
17525
17792
  });
17526
17793
  };
17527
- var Triangle = Internals.wrapInSchema({
17794
+ var Triangle = Interactive.withSchema({
17528
17795
  Component: TriangleInner,
17529
17796
  componentIdentity: "dev.remotion.shapes.Triangle",
17530
17797
  schema: triangleSchema,
@@ -17990,18 +18257,18 @@ function arcToCircle2({
17990
18257
  result.push(approximate_unit_arc2(theta1, delta_theta));
17991
18258
  theta1 += delta_theta;
17992
18259
  }
17993
- return result.map((curve) => {
17994
- for (let i = 0;i < curve.length; i += 2) {
17995
- let x = curve[i + 0];
17996
- let y = curve[i + 1];
18260
+ return result.map((curve2) => {
18261
+ for (let i = 0;i < curve2.length; i += 2) {
18262
+ let x = curve2[i + 0];
18263
+ let y = curve2[i + 1];
17997
18264
  x *= rx;
17998
18265
  y *= ry;
17999
18266
  const xp = cos_phi * x - sin_phi * y;
18000
18267
  const yp = sin_phi * x + cos_phi * y;
18001
- curve[i + 0] = xp + cc[0];
18002
- curve[i + 1] = yp + cc[1];
18268
+ curve2[i + 0] = xp + cc[0];
18269
+ curve2[i + 1] = yp + cc[1];
18003
18270
  }
18004
- return curve;
18271
+ return curve2;
18005
18272
  });
18006
18273
  }
18007
18274
  var removeATSHVQInstructions2 = (segments) => {
@@ -18608,7 +18875,7 @@ import { jsx as jsx93 } from "react/jsx-runtime";
18608
18875
  import React72 from "react";
18609
18876
  import { jsx as jsx103 } from "react/jsx-runtime";
18610
18877
  import { jsx as jsx113 } from "react/jsx-runtime";
18611
- import { jsx as jsx122 } from "react/jsx-runtime";
18878
+ import { jsx as jsx123 } from "react/jsx-runtime";
18612
18879
  import * as React36 from "react";
18613
18880
  import * as ReactDOM4 from "react-dom";
18614
18881
  import React112 from "react";
@@ -19422,11 +19689,11 @@ var Link = ({
19422
19689
  });
19423
19690
  };
19424
19691
  var PlanePaperIcon = (props) => {
19425
- return /* @__PURE__ */ jsx122("svg", {
19692
+ return /* @__PURE__ */ jsx123("svg", {
19426
19693
  xmlns: "http://www.w3.org/2000/svg",
19427
19694
  ...props,
19428
19695
  viewBox: "0 0 576 512",
19429
- children: /* @__PURE__ */ jsx122("path", {
19696
+ children: /* @__PURE__ */ jsx123("path", {
19430
19697
  fill: "currentcolor",
19431
19698
  d: "M169.9 280L94.9 448.6 461.2 280 169.9 280zm291.3-48L94.9 63.4 169.9 232 461.2 232zM34.8 465.6L128 256 34.8 46.4C33 42.2 32 37.6 32 33 32 14.8 46.7 0 64.8 0 69.5 0 74.2 1 78.5 3L554.2 222c13.3 6.1 21.8 19.4 21.8 34s-8.5 27.9-21.8 34L78.5 509c-4.3 2-9 3-13.7 3-18.1 0-32.8-14.8-32.8-33 0-4.6 1-9.2 2.8-13.4z"
19432
19699
  })