@remotion/promo-pages 4.0.496 → 4.0.497
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/Homepage.js +490 -133
- package/dist/components/homepage/CommunityStatsItems.js +2 -2
- package/dist/components/homepage/GitHubButton.js +1 -1
- package/dist/components/homepage/Pricing.js +1 -1
- package/dist/design.js +360 -109
- package/dist/experts.js +357 -108
- package/dist/homepage/Pricing.js +360 -109
- package/dist/prompts/PromptsGallery.js +360 -109
- package/dist/prompts/PromptsShow.js +360 -109
- package/dist/prompts/PromptsSubmit.js +360 -109
- package/dist/team.js +360 -109
- package/dist/template-modal-content.js +360 -109
- package/dist/templates.js +360 -109
- package/package.json +13 -13
- package/dist/components/homepage/CanvasSectionTitle.d.ts +0 -4
- package/dist/components/homepage/CanvasSectionTitle.js +0 -14
- package/dist/components/homepage/ChooseTemplate.d.ts +0 -2
- package/dist/components/homepage/ChooseTemplate.js +0 -25
- package/dist/components/homepage/EditorStarterSection.d.ts +0 -3
- package/dist/components/homepage/EditorStarterSection.js +0 -8
- package/dist/components/homepage/MoreTemplatesButton.d.ts +0 -2
- package/dist/components/homepage/MoreTemplatesButton.js +0 -11
- package/dist/prompts/PromptsSubmit.css +0 -2578
package/dist/homepage/Pricing.js
CHANGED
|
@@ -5582,7 +5582,7 @@ var getSingleChildComponent = (children) => {
|
|
|
5582
5582
|
}
|
|
5583
5583
|
return child.type;
|
|
5584
5584
|
};
|
|
5585
|
-
var VERSION = "4.0.
|
|
5585
|
+
var VERSION = "4.0.497";
|
|
5586
5586
|
var checkMultipleRemotionVersions = () => {
|
|
5587
5587
|
if (typeof globalThis === "undefined") {
|
|
5588
5588
|
return;
|
|
@@ -6060,6 +6060,45 @@ var textSchema = {
|
|
|
6060
6060
|
hiddenFromList: false
|
|
6061
6061
|
}
|
|
6062
6062
|
};
|
|
6063
|
+
var borderSchema = {
|
|
6064
|
+
"style.borderWidth": {
|
|
6065
|
+
type: "number",
|
|
6066
|
+
default: undefined,
|
|
6067
|
+
min: 0,
|
|
6068
|
+
step: 1,
|
|
6069
|
+
description: "Border width",
|
|
6070
|
+
hiddenFromList: false
|
|
6071
|
+
},
|
|
6072
|
+
"style.borderStyle": {
|
|
6073
|
+
type: "enum",
|
|
6074
|
+
default: "none",
|
|
6075
|
+
description: "Border style",
|
|
6076
|
+
variants: {
|
|
6077
|
+
none: {},
|
|
6078
|
+
hidden: {},
|
|
6079
|
+
solid: {},
|
|
6080
|
+
dashed: {},
|
|
6081
|
+
dotted: {},
|
|
6082
|
+
double: {},
|
|
6083
|
+
groove: {},
|
|
6084
|
+
ridge: {},
|
|
6085
|
+
inset: {},
|
|
6086
|
+
outset: {}
|
|
6087
|
+
}
|
|
6088
|
+
},
|
|
6089
|
+
"style.borderColor": {
|
|
6090
|
+
type: "color",
|
|
6091
|
+
default: undefined,
|
|
6092
|
+
description: "Border color"
|
|
6093
|
+
}
|
|
6094
|
+
};
|
|
6095
|
+
var backgroundSchema = {
|
|
6096
|
+
"style.backgroundColor": {
|
|
6097
|
+
type: "color",
|
|
6098
|
+
default: "transparent",
|
|
6099
|
+
description: "Color"
|
|
6100
|
+
}
|
|
6101
|
+
};
|
|
6063
6102
|
var textContentSchema = {
|
|
6064
6103
|
children: {
|
|
6065
6104
|
type: "text-content",
|
|
@@ -6087,20 +6126,13 @@ var premountSchema = {
|
|
|
6087
6126
|
keyframable: false
|
|
6088
6127
|
}
|
|
6089
6128
|
};
|
|
6090
|
-
var premountStyleSchema = {
|
|
6091
|
-
styleWhilePremounted: {
|
|
6092
|
-
type: "hidden"
|
|
6093
|
-
},
|
|
6094
|
-
styleWhilePostmounted: {
|
|
6095
|
-
type: "hidden"
|
|
6096
|
-
}
|
|
6097
|
-
};
|
|
6098
6129
|
var sequencePremountSchema = {
|
|
6099
|
-
...premountSchema
|
|
6100
|
-
...premountStyleSchema
|
|
6130
|
+
...premountSchema
|
|
6101
6131
|
};
|
|
6102
6132
|
var sequenceStyleSchema = {
|
|
6103
6133
|
...transformSchema,
|
|
6134
|
+
...backgroundSchema,
|
|
6135
|
+
...borderSchema,
|
|
6104
6136
|
...sequencePremountSchema
|
|
6105
6137
|
};
|
|
6106
6138
|
var hiddenField = {
|
|
@@ -9436,38 +9468,53 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
9436
9468
|
});
|
|
9437
9469
|
};
|
|
9438
9470
|
var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
|
|
9439
|
-
var
|
|
9440
|
-
var getActualTime = ({
|
|
9441
|
-
loopBehavior,
|
|
9442
|
-
durationFound,
|
|
9443
|
-
timeInSec
|
|
9444
|
-
}) => {
|
|
9445
|
-
return loopBehavior === "loop" ? durationFound ? timeInSec % durationFound : timeInSec : Math.min(timeInSec, durationFound || Infinity);
|
|
9446
|
-
};
|
|
9447
|
-
var decodeImage = async ({
|
|
9471
|
+
var createImageDecoder = async ({
|
|
9448
9472
|
resolvedSrc,
|
|
9449
9473
|
signal,
|
|
9450
9474
|
requestInit,
|
|
9451
|
-
|
|
9452
|
-
initialLoopBehavior
|
|
9475
|
+
contentType
|
|
9453
9476
|
}) => {
|
|
9454
9477
|
if (typeof ImageDecoder === "undefined") {
|
|
9455
9478
|
throw new Error("Your browser does not support the WebCodecs ImageDecoder API.");
|
|
9456
9479
|
}
|
|
9457
|
-
const
|
|
9458
|
-
const { body } =
|
|
9480
|
+
const response = await fetch(resolvedSrc, { ...requestInit, signal });
|
|
9481
|
+
const { body } = response;
|
|
9459
9482
|
if (!body) {
|
|
9460
9483
|
throw new Error("Got no body");
|
|
9461
9484
|
}
|
|
9462
9485
|
const decoder = new ImageDecoder({
|
|
9463
9486
|
data: body,
|
|
9464
|
-
type:
|
|
9487
|
+
type: contentType ?? response.headers.get("Content-Type") ?? "image/gif"
|
|
9465
9488
|
});
|
|
9466
|
-
await decoder.completed;
|
|
9489
|
+
await Promise.all([decoder.completed, decoder.tracks.ready]);
|
|
9467
9490
|
const { selectedTrack } = decoder.tracks;
|
|
9468
9491
|
if (!selectedTrack) {
|
|
9492
|
+
decoder.close();
|
|
9469
9493
|
throw new Error("No selected track");
|
|
9470
9494
|
}
|
|
9495
|
+
return { decoder, selectedTrack };
|
|
9496
|
+
};
|
|
9497
|
+
var CACHE_SIZE = 5;
|
|
9498
|
+
var getActualTime = ({
|
|
9499
|
+
loopBehavior,
|
|
9500
|
+
durationFound,
|
|
9501
|
+
timeInSec
|
|
9502
|
+
}) => {
|
|
9503
|
+
return loopBehavior === "loop" ? durationFound ? timeInSec % durationFound : timeInSec : Math.min(timeInSec, durationFound || Infinity);
|
|
9504
|
+
};
|
|
9505
|
+
var decodeImage = async ({
|
|
9506
|
+
resolvedSrc,
|
|
9507
|
+
signal,
|
|
9508
|
+
requestInit,
|
|
9509
|
+
currentTime,
|
|
9510
|
+
initialLoopBehavior
|
|
9511
|
+
}) => {
|
|
9512
|
+
const { decoder, selectedTrack } = await createImageDecoder({
|
|
9513
|
+
resolvedSrc,
|
|
9514
|
+
signal,
|
|
9515
|
+
requestInit,
|
|
9516
|
+
contentType: null
|
|
9517
|
+
});
|
|
9471
9518
|
const cache2 = [];
|
|
9472
9519
|
let durationFound = null;
|
|
9473
9520
|
const getFrameByIndex = async (frameIndex) => {
|
|
@@ -9573,6 +9620,13 @@ var decodeImage = async ({
|
|
|
9573
9620
|
return closest;
|
|
9574
9621
|
};
|
|
9575
9622
|
return {
|
|
9623
|
+
close: () => {
|
|
9624
|
+
for (const item of cache2) {
|
|
9625
|
+
item.frame?.close();
|
|
9626
|
+
item.frame = null;
|
|
9627
|
+
}
|
|
9628
|
+
decoder.close();
|
|
9629
|
+
},
|
|
9576
9630
|
getFrame,
|
|
9577
9631
|
frameCount: selectedTrack.frameCount
|
|
9578
9632
|
};
|
|
@@ -9610,6 +9664,7 @@ var animatedImageSchema = {
|
|
|
9610
9664
|
keyframable: false
|
|
9611
9665
|
},
|
|
9612
9666
|
...baseSchema,
|
|
9667
|
+
...premountSchema,
|
|
9613
9668
|
playbackRate: {
|
|
9614
9669
|
type: "number",
|
|
9615
9670
|
min: 0,
|
|
@@ -9620,7 +9675,9 @@ var animatedImageSchema = {
|
|
|
9620
9675
|
hiddenFromList: false,
|
|
9621
9676
|
keyframable: false
|
|
9622
9677
|
},
|
|
9623
|
-
...transformSchema
|
|
9678
|
+
...transformSchema,
|
|
9679
|
+
...backgroundSchema,
|
|
9680
|
+
...borderSchema
|
|
9624
9681
|
};
|
|
9625
9682
|
var getCanvasPropsFromSequenceProps = (props) => {
|
|
9626
9683
|
const canvasProps = {};
|
|
@@ -9672,6 +9729,15 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
9672
9729
|
const [initialLoopBehavior] = useState6(() => loopBehavior);
|
|
9673
9730
|
useEffect5(() => {
|
|
9674
9731
|
const controller = new AbortController;
|
|
9732
|
+
let cancelled = false;
|
|
9733
|
+
let continued = false;
|
|
9734
|
+
const continueRenderOnce = () => {
|
|
9735
|
+
if (continued) {
|
|
9736
|
+
return;
|
|
9737
|
+
}
|
|
9738
|
+
continued = true;
|
|
9739
|
+
continueRender2(decodeHandle);
|
|
9740
|
+
};
|
|
9675
9741
|
decodeImage({
|
|
9676
9742
|
resolvedSrc,
|
|
9677
9743
|
signal: controller.signal,
|
|
@@ -9679,22 +9745,31 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
9679
9745
|
currentTime: currentTimeRef.current,
|
|
9680
9746
|
initialLoopBehavior
|
|
9681
9747
|
}).then((d) => {
|
|
9748
|
+
if (cancelled) {
|
|
9749
|
+
d.close();
|
|
9750
|
+
return;
|
|
9751
|
+
}
|
|
9682
9752
|
setImageDecoder(d);
|
|
9683
|
-
|
|
9753
|
+
continueRenderOnce();
|
|
9684
9754
|
}).catch((err) => {
|
|
9755
|
+
if (cancelled) {
|
|
9756
|
+
return;
|
|
9757
|
+
}
|
|
9685
9758
|
if (err.name === "AbortError") {
|
|
9686
|
-
|
|
9759
|
+
continueRenderOnce();
|
|
9687
9760
|
return;
|
|
9688
9761
|
}
|
|
9689
9762
|
if (onError) {
|
|
9690
9763
|
onError?.(err);
|
|
9691
|
-
|
|
9764
|
+
continueRenderOnce();
|
|
9692
9765
|
} else {
|
|
9693
9766
|
cancelRender(err);
|
|
9694
9767
|
}
|
|
9695
9768
|
});
|
|
9696
9769
|
return () => {
|
|
9770
|
+
cancelled = true;
|
|
9697
9771
|
controller.abort();
|
|
9772
|
+
continueRenderOnce();
|
|
9698
9773
|
};
|
|
9699
9774
|
}, [
|
|
9700
9775
|
resolvedSrc,
|
|
@@ -9704,6 +9779,11 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
9704
9779
|
initialLoopBehavior,
|
|
9705
9780
|
continueRender2
|
|
9706
9781
|
]);
|
|
9782
|
+
useEffect5(() => {
|
|
9783
|
+
return () => {
|
|
9784
|
+
imageDecoder?.close();
|
|
9785
|
+
};
|
|
9786
|
+
}, [imageDecoder]);
|
|
9707
9787
|
useLayoutEffect2(() => {
|
|
9708
9788
|
if (!imageDecoder) {
|
|
9709
9789
|
return;
|
|
@@ -9773,6 +9853,11 @@ var AnimatedImageInner = ({
|
|
|
9773
9853
|
className,
|
|
9774
9854
|
style,
|
|
9775
9855
|
durationInFrames,
|
|
9856
|
+
from,
|
|
9857
|
+
premountFor,
|
|
9858
|
+
postmountFor,
|
|
9859
|
+
styleWhilePremounted,
|
|
9860
|
+
styleWhilePostmounted,
|
|
9776
9861
|
requestInit,
|
|
9777
9862
|
effects = [],
|
|
9778
9863
|
controls,
|
|
@@ -9784,6 +9869,24 @@ var AnimatedImageInner = ({
|
|
|
9784
9869
|
useImperativeHandle2(ref, () => {
|
|
9785
9870
|
return actualRef.current;
|
|
9786
9871
|
}, []);
|
|
9872
|
+
const {
|
|
9873
|
+
effectivePostmountFor,
|
|
9874
|
+
effectivePremountFor,
|
|
9875
|
+
freezeFrame,
|
|
9876
|
+
isPremountingOrPostmounting,
|
|
9877
|
+
postmountingActive,
|
|
9878
|
+
premountingActive,
|
|
9879
|
+
premountingStyle
|
|
9880
|
+
} = usePremounting({
|
|
9881
|
+
from: from ?? 0,
|
|
9882
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
9883
|
+
premountFor: premountFor ?? null,
|
|
9884
|
+
postmountFor: postmountFor ?? null,
|
|
9885
|
+
style: style ?? null,
|
|
9886
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
9887
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
9888
|
+
hideWhilePremounted: "display-none"
|
|
9889
|
+
});
|
|
9787
9890
|
const canvasProps = getCanvasPropsFromSequenceProps(sequenceProps);
|
|
9788
9891
|
const animatedImageProps = {
|
|
9789
9892
|
src,
|
|
@@ -9795,24 +9898,33 @@ var AnimatedImageInner = ({
|
|
|
9795
9898
|
loopBehavior,
|
|
9796
9899
|
id,
|
|
9797
9900
|
className,
|
|
9798
|
-
style,
|
|
9901
|
+
style: premountingStyle ?? undefined,
|
|
9799
9902
|
requestInit,
|
|
9800
9903
|
...canvasProps
|
|
9801
9904
|
};
|
|
9802
|
-
return /* @__PURE__ */ jsx14(
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9905
|
+
return /* @__PURE__ */ jsx14(Freeze, {
|
|
9906
|
+
frame: freezeFrame,
|
|
9907
|
+
active: isPremountingOrPostmounting,
|
|
9908
|
+
children: /* @__PURE__ */ jsx14(Sequence, {
|
|
9909
|
+
layout: "none",
|
|
9910
|
+
from: from ?? 0,
|
|
9911
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
9912
|
+
name: "<AnimatedImage>",
|
|
9913
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage",
|
|
9914
|
+
controls,
|
|
9915
|
+
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
9916
|
+
_remotionInternalPremountDisplay: effectivePremountFor || null,
|
|
9917
|
+
_remotionInternalPostmountDisplay: effectivePostmountFor || null,
|
|
9918
|
+
_remotionInternalIsPremounting: premountingActive,
|
|
9919
|
+
_remotionInternalIsPostmounting: postmountingActive,
|
|
9920
|
+
...sequenceProps,
|
|
9921
|
+
outlineRef: actualRef,
|
|
9922
|
+
children: /* @__PURE__ */ jsx14(AnimatedImageContent, {
|
|
9923
|
+
...animatedImageProps,
|
|
9924
|
+
ref: actualRef,
|
|
9925
|
+
effects,
|
|
9926
|
+
controls
|
|
9927
|
+
})
|
|
9816
9928
|
})
|
|
9817
9929
|
});
|
|
9818
9930
|
};
|
|
@@ -10528,13 +10640,17 @@ var makeSharedElementSourceNode = ({
|
|
|
10528
10640
|
}) => {
|
|
10529
10641
|
let connected = null;
|
|
10530
10642
|
let disposed = false;
|
|
10643
|
+
let currentAudioContext = audioContext;
|
|
10531
10644
|
return {
|
|
10645
|
+
setAudioContext: (newAudioContext) => {
|
|
10646
|
+
currentAudioContext = newAudioContext;
|
|
10647
|
+
},
|
|
10532
10648
|
attemptToConnect: () => {
|
|
10533
10649
|
if (disposed) {
|
|
10534
10650
|
throw new Error("SharedElementSourceNode has been disposed");
|
|
10535
10651
|
}
|
|
10536
|
-
if (!connected && ref.current) {
|
|
10537
|
-
const mediaElementSourceNode =
|
|
10652
|
+
if (!connected && ref.current && currentAudioContext) {
|
|
10653
|
+
const mediaElementSourceNode = currentAudioContext.createMediaElementSource(ref.current);
|
|
10538
10654
|
connected = mediaElementSourceNode;
|
|
10539
10655
|
}
|
|
10540
10656
|
},
|
|
@@ -10862,19 +10978,22 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10862
10978
|
const audioCtx = useContext21(SharedAudioContext);
|
|
10863
10979
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
10864
10980
|
const resume = audioCtx?.resume;
|
|
10865
|
-
const refs =
|
|
10981
|
+
const [refs] = useState10(() => {
|
|
10866
10982
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
10867
10983
|
const ref = createRef2();
|
|
10868
10984
|
return {
|
|
10869
10985
|
id: Math.random(),
|
|
10870
10986
|
ref,
|
|
10871
|
-
mediaElementSourceNode:
|
|
10987
|
+
mediaElementSourceNode: makeSharedElementSourceNode({
|
|
10872
10988
|
audioContext,
|
|
10873
10989
|
ref
|
|
10874
|
-
})
|
|
10990
|
+
})
|
|
10875
10991
|
};
|
|
10876
10992
|
});
|
|
10877
|
-
}
|
|
10993
|
+
});
|
|
10994
|
+
for (const { mediaElementSourceNode } of refs) {
|
|
10995
|
+
mediaElementSourceNode?.setAudioContext(audioContext);
|
|
10996
|
+
}
|
|
10878
10997
|
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
10879
10998
|
effectToUse(() => {
|
|
10880
10999
|
return () => {
|
|
@@ -10942,7 +11061,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10942
11061
|
const cloned = [...takenAudios.current];
|
|
10943
11062
|
const index = refs.findIndex((r2) => r2.id === id);
|
|
10944
11063
|
if (index === -1) {
|
|
10945
|
-
throw new TypeError(
|
|
11064
|
+
throw new TypeError(`Unknown audio ref ${id}; refs: ${refs.map((r2) => r2.id).join(", ")}`);
|
|
10946
11065
|
}
|
|
10947
11066
|
cloned[index] = false;
|
|
10948
11067
|
takenAudios.current = cloned;
|
|
@@ -11046,10 +11165,10 @@ var useSharedAudio = ({
|
|
|
11046
11165
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
11047
11166
|
}
|
|
11048
11167
|
const el = React20.createRef();
|
|
11049
|
-
const mediaElementSourceNode =
|
|
11050
|
-
audioContext: audioCtx
|
|
11168
|
+
const mediaElementSourceNode = makeSharedElementSourceNode({
|
|
11169
|
+
audioContext: audioCtx?.audioContext ?? null,
|
|
11051
11170
|
ref: el
|
|
11052
|
-
})
|
|
11171
|
+
});
|
|
11053
11172
|
return {
|
|
11054
11173
|
el,
|
|
11055
11174
|
id: Math.random(),
|
|
@@ -11064,6 +11183,7 @@ var useSharedAudio = ({
|
|
|
11064
11183
|
}
|
|
11065
11184
|
};
|
|
11066
11185
|
});
|
|
11186
|
+
elem.mediaElementSourceNode?.setAudioContext(audioCtx?.audioContext ?? null);
|
|
11067
11187
|
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
11068
11188
|
if (typeof document !== "undefined") {
|
|
11069
11189
|
effectToUse(() => {
|
|
@@ -12921,7 +13041,9 @@ var solidSchema = {
|
|
|
12921
13041
|
description: "Pixel density",
|
|
12922
13042
|
hiddenFromList: false
|
|
12923
13043
|
},
|
|
12924
|
-
...transformSchema
|
|
13044
|
+
...transformSchema,
|
|
13045
|
+
...backgroundSchema,
|
|
13046
|
+
...borderSchema
|
|
12925
13047
|
};
|
|
12926
13048
|
var SolidInner = ({
|
|
12927
13049
|
color,
|
|
@@ -13475,7 +13597,9 @@ var htmlInCanvasSchema = {
|
|
|
13475
13597
|
description: "Pixel density",
|
|
13476
13598
|
hiddenFromList: false
|
|
13477
13599
|
},
|
|
13478
|
-
...transformSchema
|
|
13600
|
+
...transformSchema,
|
|
13601
|
+
...backgroundSchema,
|
|
13602
|
+
...borderSchema
|
|
13479
13603
|
};
|
|
13480
13604
|
var HtmlInCanvasWrapped = withInteractivitySchema({
|
|
13481
13605
|
Component: HtmlInCanvasInner,
|
|
@@ -13497,6 +13621,7 @@ function truncateSrcForLabel(src) {
|
|
|
13497
13621
|
}
|
|
13498
13622
|
var canvasImageSchema = {
|
|
13499
13623
|
...baseSchema,
|
|
13624
|
+
...premountSchema,
|
|
13500
13625
|
fit: {
|
|
13501
13626
|
type: "enum",
|
|
13502
13627
|
default: "fill",
|
|
@@ -13507,7 +13632,9 @@ var canvasImageSchema = {
|
|
|
13507
13632
|
cover: {}
|
|
13508
13633
|
}
|
|
13509
13634
|
},
|
|
13510
|
-
...transformSchema
|
|
13635
|
+
...transformSchema,
|
|
13636
|
+
...backgroundSchema,
|
|
13637
|
+
...borderSchema
|
|
13511
13638
|
};
|
|
13512
13639
|
var makeAbortError = () => {
|
|
13513
13640
|
if (typeof DOMException !== "undefined") {
|
|
@@ -13831,6 +13958,10 @@ var CanvasImageInner = forwardRef10(({
|
|
|
13831
13958
|
from,
|
|
13832
13959
|
trimBefore,
|
|
13833
13960
|
freeze,
|
|
13961
|
+
premountFor,
|
|
13962
|
+
postmountFor,
|
|
13963
|
+
styleWhilePremounted,
|
|
13964
|
+
styleWhilePostmounted,
|
|
13834
13965
|
hidden,
|
|
13835
13966
|
name,
|
|
13836
13967
|
showInTimeline,
|
|
@@ -13848,39 +13979,65 @@ var CanvasImageInner = forwardRef10(({
|
|
|
13848
13979
|
useImperativeHandle7(ref, () => {
|
|
13849
13980
|
return actualRef.current;
|
|
13850
13981
|
}, []);
|
|
13851
|
-
|
|
13852
|
-
|
|
13982
|
+
const {
|
|
13983
|
+
effectivePostmountFor,
|
|
13984
|
+
effectivePremountFor,
|
|
13985
|
+
freezeFrame,
|
|
13986
|
+
isPremountingOrPostmounting,
|
|
13987
|
+
postmountingActive,
|
|
13988
|
+
premountingActive,
|
|
13989
|
+
premountingStyle
|
|
13990
|
+
} = usePremounting({
|
|
13853
13991
|
from: from ?? 0,
|
|
13854
|
-
trimBefore,
|
|
13855
13992
|
durationInFrames: durationInFrames ?? Infinity,
|
|
13856
|
-
|
|
13857
|
-
|
|
13858
|
-
|
|
13859
|
-
|
|
13860
|
-
|
|
13861
|
-
|
|
13862
|
-
|
|
13863
|
-
|
|
13864
|
-
|
|
13865
|
-
|
|
13866
|
-
children: /* @__PURE__ */ jsx26(
|
|
13867
|
-
|
|
13868
|
-
|
|
13869
|
-
|
|
13870
|
-
|
|
13871
|
-
|
|
13872
|
-
|
|
13993
|
+
premountFor: premountFor ?? null,
|
|
13994
|
+
postmountFor: postmountFor ?? null,
|
|
13995
|
+
style: style ?? null,
|
|
13996
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
13997
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
13998
|
+
hideWhilePremounted: "display-none"
|
|
13999
|
+
});
|
|
14000
|
+
return /* @__PURE__ */ jsx26(Freeze, {
|
|
14001
|
+
frame: freezeFrame,
|
|
14002
|
+
active: isPremountingOrPostmounting,
|
|
14003
|
+
children: /* @__PURE__ */ jsx26(Sequence, {
|
|
14004
|
+
layout: "none",
|
|
14005
|
+
from: from ?? 0,
|
|
14006
|
+
trimBefore,
|
|
14007
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
14008
|
+
freeze,
|
|
14009
|
+
hidden,
|
|
14010
|
+
showInTimeline: showInTimeline ?? true,
|
|
14011
|
+
name: name ?? "<CanvasImage>",
|
|
14012
|
+
_remotionInternalDocumentationLink: _remotionInternalDocumentationLink ?? "https://www.remotion.dev/docs/canvasimage",
|
|
13873
14013
|
controls,
|
|
13874
|
-
|
|
13875
|
-
|
|
13876
|
-
|
|
13877
|
-
|
|
13878
|
-
|
|
13879
|
-
|
|
13880
|
-
|
|
13881
|
-
|
|
13882
|
-
|
|
13883
|
-
|
|
14014
|
+
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
14015
|
+
_remotionInternalIsMedia: { type: "image", src },
|
|
14016
|
+
_remotionInternalStack: stack,
|
|
14017
|
+
_remotionInternalPremountDisplay: effectivePremountFor || null,
|
|
14018
|
+
_remotionInternalPostmountDisplay: effectivePostmountFor || null,
|
|
14019
|
+
_remotionInternalIsPremounting: premountingActive,
|
|
14020
|
+
_remotionInternalIsPostmounting: postmountingActive,
|
|
14021
|
+
outlineRef: outlineRef ?? actualRef,
|
|
14022
|
+
children: /* @__PURE__ */ jsx26(CanvasImageContent, {
|
|
14023
|
+
ref: actualRef,
|
|
14024
|
+
src,
|
|
14025
|
+
width,
|
|
14026
|
+
height,
|
|
14027
|
+
fit,
|
|
14028
|
+
effects,
|
|
14029
|
+
controls,
|
|
14030
|
+
className,
|
|
14031
|
+
style: premountingStyle ?? undefined,
|
|
14032
|
+
id,
|
|
14033
|
+
onError,
|
|
14034
|
+
pauseWhenLoading,
|
|
14035
|
+
maxRetries,
|
|
14036
|
+
delayRenderRetries,
|
|
14037
|
+
delayRenderTimeoutInMilliseconds,
|
|
14038
|
+
refForOutline: outlineRef ?? null,
|
|
14039
|
+
...canvasProps
|
|
14040
|
+
})
|
|
13884
14041
|
})
|
|
13885
14042
|
});
|
|
13886
14043
|
});
|
|
@@ -14097,6 +14254,11 @@ var NativeImgInner = ({
|
|
|
14097
14254
|
trimBefore,
|
|
14098
14255
|
durationInFrames,
|
|
14099
14256
|
freeze,
|
|
14257
|
+
premountFor,
|
|
14258
|
+
postmountFor,
|
|
14259
|
+
style,
|
|
14260
|
+
styleWhilePremounted,
|
|
14261
|
+
styleWhilePostmounted,
|
|
14100
14262
|
controls,
|
|
14101
14263
|
outlineRef: refForOutline,
|
|
14102
14264
|
...props2
|
|
@@ -14104,24 +14266,51 @@ var NativeImgInner = ({
|
|
|
14104
14266
|
if (!src) {
|
|
14105
14267
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
14106
14268
|
}
|
|
14107
|
-
|
|
14108
|
-
|
|
14269
|
+
const {
|
|
14270
|
+
effectivePostmountFor,
|
|
14271
|
+
effectivePremountFor,
|
|
14272
|
+
freezeFrame,
|
|
14273
|
+
isPremountingOrPostmounting,
|
|
14274
|
+
postmountingActive,
|
|
14275
|
+
premountingActive,
|
|
14276
|
+
premountingStyle
|
|
14277
|
+
} = usePremounting({
|
|
14109
14278
|
from: from ?? 0,
|
|
14110
|
-
trimBefore,
|
|
14111
14279
|
durationInFrames: durationInFrames ?? Infinity,
|
|
14112
|
-
|
|
14113
|
-
|
|
14114
|
-
|
|
14115
|
-
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
|
|
14122
|
-
|
|
14123
|
-
|
|
14124
|
-
|
|
14280
|
+
premountFor: premountFor ?? null,
|
|
14281
|
+
postmountFor: postmountFor ?? null,
|
|
14282
|
+
style: style ?? null,
|
|
14283
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
14284
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
14285
|
+
hideWhilePremounted: "display-none"
|
|
14286
|
+
});
|
|
14287
|
+
return /* @__PURE__ */ jsx28(Freeze, {
|
|
14288
|
+
frame: freezeFrame,
|
|
14289
|
+
active: isPremountingOrPostmounting,
|
|
14290
|
+
children: /* @__PURE__ */ jsx28(Sequence, {
|
|
14291
|
+
layout: "none",
|
|
14292
|
+
from: from ?? 0,
|
|
14293
|
+
trimBefore,
|
|
14294
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
14295
|
+
freeze,
|
|
14296
|
+
_remotionInternalStack: stack,
|
|
14297
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
14298
|
+
_remotionInternalIsMedia: { type: "image", src },
|
|
14299
|
+
_remotionInternalPremountDisplay: effectivePremountFor || null,
|
|
14300
|
+
_remotionInternalPostmountDisplay: effectivePostmountFor || null,
|
|
14301
|
+
_remotionInternalIsPremounting: premountingActive,
|
|
14302
|
+
_remotionInternalIsPostmounting: postmountingActive,
|
|
14303
|
+
name: name ?? "<Img>",
|
|
14304
|
+
controls,
|
|
14305
|
+
showInTimeline: showInTimeline ?? true,
|
|
14306
|
+
hidden,
|
|
14307
|
+
outlineRef: refForOutline,
|
|
14308
|
+
children: /* @__PURE__ */ jsx28(ImgContent, {
|
|
14309
|
+
src,
|
|
14310
|
+
refForOutline,
|
|
14311
|
+
style: premountingStyle ?? undefined,
|
|
14312
|
+
...props2
|
|
14313
|
+
})
|
|
14125
14314
|
})
|
|
14126
14315
|
});
|
|
14127
14316
|
};
|
|
@@ -14134,7 +14323,10 @@ var imgSchema = {
|
|
|
14134
14323
|
keyframable: false
|
|
14135
14324
|
},
|
|
14136
14325
|
...baseSchema,
|
|
14137
|
-
...
|
|
14326
|
+
...premountSchema,
|
|
14327
|
+
...transformSchema,
|
|
14328
|
+
...backgroundSchema,
|
|
14329
|
+
...borderSchema
|
|
14138
14330
|
};
|
|
14139
14331
|
var imgCanvasFallbackIncompatibleProps = new Set([
|
|
14140
14332
|
"alt",
|
|
@@ -14190,6 +14382,10 @@ var ImgInner = ({
|
|
|
14190
14382
|
trimBefore,
|
|
14191
14383
|
durationInFrames,
|
|
14192
14384
|
freeze,
|
|
14385
|
+
premountFor,
|
|
14386
|
+
postmountFor,
|
|
14387
|
+
styleWhilePremounted,
|
|
14388
|
+
styleWhilePostmounted,
|
|
14193
14389
|
controls,
|
|
14194
14390
|
width,
|
|
14195
14391
|
height,
|
|
@@ -14216,6 +14412,10 @@ var ImgInner = ({
|
|
|
14216
14412
|
trimBefore,
|
|
14217
14413
|
durationInFrames,
|
|
14218
14414
|
freeze,
|
|
14415
|
+
premountFor,
|
|
14416
|
+
postmountFor,
|
|
14417
|
+
styleWhilePremounted,
|
|
14418
|
+
styleWhilePostmounted,
|
|
14219
14419
|
controls,
|
|
14220
14420
|
width,
|
|
14221
14421
|
height,
|
|
@@ -14259,6 +14459,10 @@ var ImgInner = ({
|
|
|
14259
14459
|
trimBefore,
|
|
14260
14460
|
durationInFrames,
|
|
14261
14461
|
freeze,
|
|
14462
|
+
premountFor,
|
|
14463
|
+
postmountFor,
|
|
14464
|
+
styleWhilePremounted,
|
|
14465
|
+
styleWhilePostmounted,
|
|
14262
14466
|
hidden,
|
|
14263
14467
|
name: name ?? "<Img>",
|
|
14264
14468
|
showInTimeline,
|
|
@@ -14297,7 +14501,20 @@ var interactiveElementSchema = {
|
|
|
14297
14501
|
...baseSchema,
|
|
14298
14502
|
...transformSchema
|
|
14299
14503
|
};
|
|
14504
|
+
var interactiveBackgroundElementSchema = {
|
|
14505
|
+
...interactiveElementSchema,
|
|
14506
|
+
...backgroundSchema
|
|
14507
|
+
};
|
|
14508
|
+
var interactiveBorderElementSchema = {
|
|
14509
|
+
...interactiveBackgroundElementSchema,
|
|
14510
|
+
...borderSchema
|
|
14511
|
+
};
|
|
14300
14512
|
var interactiveTextElementSchema = {
|
|
14513
|
+
...interactiveBorderElementSchema,
|
|
14514
|
+
...textSchema,
|
|
14515
|
+
...textContentSchema
|
|
14516
|
+
};
|
|
14517
|
+
var interactiveSvgTextElementSchema = {
|
|
14301
14518
|
...interactiveElementSchema,
|
|
14302
14519
|
...textSchema,
|
|
14303
14520
|
...textContentSchema
|
|
@@ -14376,6 +14593,8 @@ var Interactive = {
|
|
|
14376
14593
|
baseSchema,
|
|
14377
14594
|
transformSchema,
|
|
14378
14595
|
textSchema,
|
|
14596
|
+
backgroundSchema,
|
|
14597
|
+
borderSchema,
|
|
14379
14598
|
premountSchema,
|
|
14380
14599
|
sequenceSchema,
|
|
14381
14600
|
withSchema,
|
|
@@ -14412,10 +14631,39 @@ var Interactive = {
|
|
|
14412
14631
|
Small: makeInteractiveTextElement("small", "<Interactive.Small>"),
|
|
14413
14632
|
Span: makeInteractiveTextElement("span", "<Interactive.Span>"),
|
|
14414
14633
|
Strong: makeInteractiveTextElement("strong", "<Interactive.Strong>"),
|
|
14415
|
-
Svg:
|
|
14416
|
-
Text:
|
|
14634
|
+
Svg: makeInteractiveElement("svg", "<Interactive.Svg>", interactiveBorderElementSchema),
|
|
14635
|
+
Text: makeInteractiveElement("text", "<Interactive.Text>", interactiveSvgTextElementSchema),
|
|
14417
14636
|
Ul: makeInteractiveTextElement("ul", "<Interactive.Ul>")
|
|
14418
14637
|
};
|
|
14638
|
+
var getAnimatedImageDurationInSeconds = async ({
|
|
14639
|
+
resolvedSrc,
|
|
14640
|
+
signal,
|
|
14641
|
+
requestInit,
|
|
14642
|
+
contentType
|
|
14643
|
+
}) => {
|
|
14644
|
+
const { decoder, selectedTrack } = await createImageDecoder({
|
|
14645
|
+
resolvedSrc,
|
|
14646
|
+
signal,
|
|
14647
|
+
requestInit,
|
|
14648
|
+
contentType
|
|
14649
|
+
});
|
|
14650
|
+
try {
|
|
14651
|
+
const { image } = await decoder.decode({
|
|
14652
|
+
frameIndex: selectedTrack.frameCount - 1,
|
|
14653
|
+
completeFramesOnly: true
|
|
14654
|
+
});
|
|
14655
|
+
try {
|
|
14656
|
+
if (image.duration === null) {
|
|
14657
|
+
throw new Error("Could not determine animated image duration");
|
|
14658
|
+
}
|
|
14659
|
+
return (image.timestamp + image.duration) / 1e6;
|
|
14660
|
+
} finally {
|
|
14661
|
+
image.close();
|
|
14662
|
+
}
|
|
14663
|
+
} finally {
|
|
14664
|
+
decoder.close();
|
|
14665
|
+
}
|
|
14666
|
+
};
|
|
14419
14667
|
var compositionsRef = React31.createRef();
|
|
14420
14668
|
var CompositionManagerProvider = ({
|
|
14421
14669
|
children,
|
|
@@ -15643,6 +15891,7 @@ var Internals = {
|
|
|
15643
15891
|
useAbsoluteTimelinePosition,
|
|
15644
15892
|
evaluateVolume,
|
|
15645
15893
|
getAbsoluteSrc,
|
|
15894
|
+
getAnimatedImageDurationInSeconds,
|
|
15646
15895
|
getAssetDisplayName,
|
|
15647
15896
|
Timeline: exports_timeline_position_state,
|
|
15648
15897
|
validateMediaTrimProps,
|
|
@@ -15667,7 +15916,6 @@ var Internals = {
|
|
|
15667
15916
|
textSchema,
|
|
15668
15917
|
transformSchema,
|
|
15669
15918
|
premountSchema,
|
|
15670
|
-
premountStyleSchema,
|
|
15671
15919
|
flattenActiveSchema,
|
|
15672
15920
|
getFlatSchemaWithAllKeys,
|
|
15673
15921
|
RemotionRootContexts,
|
|
@@ -15806,6 +16054,7 @@ var seriesSequenceSchema = {
|
|
|
15806
16054
|
hidden: Interactive.sequenceSchema.hidden,
|
|
15807
16055
|
showInTimeline: Interactive.sequenceSchema.showInTimeline,
|
|
15808
16056
|
freeze: Interactive.baseSchema.freeze,
|
|
16057
|
+
trimBefore: Interactive.sequenceSchema.trimBefore,
|
|
15809
16058
|
layout: Interactive.sequenceSchema.layout
|
|
15810
16059
|
};
|
|
15811
16060
|
var SeriesSequenceInner = forwardRef14(({
|
|
@@ -16878,7 +17127,9 @@ var makeShapeSchema = (shapeFields) => {
|
|
|
16878
17127
|
defaultValue: "#0b84ff",
|
|
16879
17128
|
description: "Fill"
|
|
16880
17129
|
}),
|
|
16881
|
-
...Internals.transformSchema
|
|
17130
|
+
...Internals.transformSchema,
|
|
17131
|
+
...Interactive.backgroundSchema,
|
|
17132
|
+
...Interactive.borderSchema
|
|
16882
17133
|
};
|
|
16883
17134
|
};
|
|
16884
17135
|
var arrowSchema = makeShapeSchema({
|