@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/design.js
CHANGED
|
@@ -5579,7 +5579,7 @@ var getSingleChildComponent = (children) => {
|
|
|
5579
5579
|
}
|
|
5580
5580
|
return child.type;
|
|
5581
5581
|
};
|
|
5582
|
-
var VERSION = "4.0.
|
|
5582
|
+
var VERSION = "4.0.497";
|
|
5583
5583
|
var checkMultipleRemotionVersions = () => {
|
|
5584
5584
|
if (typeof globalThis === "undefined") {
|
|
5585
5585
|
return;
|
|
@@ -6057,6 +6057,45 @@ var textSchema = {
|
|
|
6057
6057
|
hiddenFromList: false
|
|
6058
6058
|
}
|
|
6059
6059
|
};
|
|
6060
|
+
var borderSchema = {
|
|
6061
|
+
"style.borderWidth": {
|
|
6062
|
+
type: "number",
|
|
6063
|
+
default: undefined,
|
|
6064
|
+
min: 0,
|
|
6065
|
+
step: 1,
|
|
6066
|
+
description: "Border width",
|
|
6067
|
+
hiddenFromList: false
|
|
6068
|
+
},
|
|
6069
|
+
"style.borderStyle": {
|
|
6070
|
+
type: "enum",
|
|
6071
|
+
default: "none",
|
|
6072
|
+
description: "Border style",
|
|
6073
|
+
variants: {
|
|
6074
|
+
none: {},
|
|
6075
|
+
hidden: {},
|
|
6076
|
+
solid: {},
|
|
6077
|
+
dashed: {},
|
|
6078
|
+
dotted: {},
|
|
6079
|
+
double: {},
|
|
6080
|
+
groove: {},
|
|
6081
|
+
ridge: {},
|
|
6082
|
+
inset: {},
|
|
6083
|
+
outset: {}
|
|
6084
|
+
}
|
|
6085
|
+
},
|
|
6086
|
+
"style.borderColor": {
|
|
6087
|
+
type: "color",
|
|
6088
|
+
default: undefined,
|
|
6089
|
+
description: "Border color"
|
|
6090
|
+
}
|
|
6091
|
+
};
|
|
6092
|
+
var backgroundSchema = {
|
|
6093
|
+
"style.backgroundColor": {
|
|
6094
|
+
type: "color",
|
|
6095
|
+
default: "transparent",
|
|
6096
|
+
description: "Color"
|
|
6097
|
+
}
|
|
6098
|
+
};
|
|
6060
6099
|
var textContentSchema = {
|
|
6061
6100
|
children: {
|
|
6062
6101
|
type: "text-content",
|
|
@@ -6084,20 +6123,13 @@ var premountSchema = {
|
|
|
6084
6123
|
keyframable: false
|
|
6085
6124
|
}
|
|
6086
6125
|
};
|
|
6087
|
-
var premountStyleSchema = {
|
|
6088
|
-
styleWhilePremounted: {
|
|
6089
|
-
type: "hidden"
|
|
6090
|
-
},
|
|
6091
|
-
styleWhilePostmounted: {
|
|
6092
|
-
type: "hidden"
|
|
6093
|
-
}
|
|
6094
|
-
};
|
|
6095
6126
|
var sequencePremountSchema = {
|
|
6096
|
-
...premountSchema
|
|
6097
|
-
...premountStyleSchema
|
|
6127
|
+
...premountSchema
|
|
6098
6128
|
};
|
|
6099
6129
|
var sequenceStyleSchema = {
|
|
6100
6130
|
...transformSchema,
|
|
6131
|
+
...backgroundSchema,
|
|
6132
|
+
...borderSchema,
|
|
6101
6133
|
...sequencePremountSchema
|
|
6102
6134
|
};
|
|
6103
6135
|
var hiddenField = {
|
|
@@ -9433,38 +9465,53 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
9433
9465
|
});
|
|
9434
9466
|
};
|
|
9435
9467
|
var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
|
|
9436
|
-
var
|
|
9437
|
-
var getActualTime = ({
|
|
9438
|
-
loopBehavior,
|
|
9439
|
-
durationFound,
|
|
9440
|
-
timeInSec
|
|
9441
|
-
}) => {
|
|
9442
|
-
return loopBehavior === "loop" ? durationFound ? timeInSec % durationFound : timeInSec : Math.min(timeInSec, durationFound || Infinity);
|
|
9443
|
-
};
|
|
9444
|
-
var decodeImage = async ({
|
|
9468
|
+
var createImageDecoder = async ({
|
|
9445
9469
|
resolvedSrc,
|
|
9446
9470
|
signal,
|
|
9447
9471
|
requestInit,
|
|
9448
|
-
|
|
9449
|
-
initialLoopBehavior
|
|
9472
|
+
contentType
|
|
9450
9473
|
}) => {
|
|
9451
9474
|
if (typeof ImageDecoder === "undefined") {
|
|
9452
9475
|
throw new Error("Your browser does not support the WebCodecs ImageDecoder API.");
|
|
9453
9476
|
}
|
|
9454
|
-
const
|
|
9455
|
-
const { body } =
|
|
9477
|
+
const response = await fetch(resolvedSrc, { ...requestInit, signal });
|
|
9478
|
+
const { body } = response;
|
|
9456
9479
|
if (!body) {
|
|
9457
9480
|
throw new Error("Got no body");
|
|
9458
9481
|
}
|
|
9459
9482
|
const decoder = new ImageDecoder({
|
|
9460
9483
|
data: body,
|
|
9461
|
-
type:
|
|
9484
|
+
type: contentType ?? response.headers.get("Content-Type") ?? "image/gif"
|
|
9462
9485
|
});
|
|
9463
|
-
await decoder.completed;
|
|
9486
|
+
await Promise.all([decoder.completed, decoder.tracks.ready]);
|
|
9464
9487
|
const { selectedTrack } = decoder.tracks;
|
|
9465
9488
|
if (!selectedTrack) {
|
|
9489
|
+
decoder.close();
|
|
9466
9490
|
throw new Error("No selected track");
|
|
9467
9491
|
}
|
|
9492
|
+
return { decoder, selectedTrack };
|
|
9493
|
+
};
|
|
9494
|
+
var CACHE_SIZE = 5;
|
|
9495
|
+
var getActualTime = ({
|
|
9496
|
+
loopBehavior,
|
|
9497
|
+
durationFound,
|
|
9498
|
+
timeInSec
|
|
9499
|
+
}) => {
|
|
9500
|
+
return loopBehavior === "loop" ? durationFound ? timeInSec % durationFound : timeInSec : Math.min(timeInSec, durationFound || Infinity);
|
|
9501
|
+
};
|
|
9502
|
+
var decodeImage = async ({
|
|
9503
|
+
resolvedSrc,
|
|
9504
|
+
signal,
|
|
9505
|
+
requestInit,
|
|
9506
|
+
currentTime,
|
|
9507
|
+
initialLoopBehavior
|
|
9508
|
+
}) => {
|
|
9509
|
+
const { decoder, selectedTrack } = await createImageDecoder({
|
|
9510
|
+
resolvedSrc,
|
|
9511
|
+
signal,
|
|
9512
|
+
requestInit,
|
|
9513
|
+
contentType: null
|
|
9514
|
+
});
|
|
9468
9515
|
const cache2 = [];
|
|
9469
9516
|
let durationFound = null;
|
|
9470
9517
|
const getFrameByIndex = async (frameIndex) => {
|
|
@@ -9570,6 +9617,13 @@ var decodeImage = async ({
|
|
|
9570
9617
|
return closest;
|
|
9571
9618
|
};
|
|
9572
9619
|
return {
|
|
9620
|
+
close: () => {
|
|
9621
|
+
for (const item of cache2) {
|
|
9622
|
+
item.frame?.close();
|
|
9623
|
+
item.frame = null;
|
|
9624
|
+
}
|
|
9625
|
+
decoder.close();
|
|
9626
|
+
},
|
|
9573
9627
|
getFrame,
|
|
9574
9628
|
frameCount: selectedTrack.frameCount
|
|
9575
9629
|
};
|
|
@@ -9607,6 +9661,7 @@ var animatedImageSchema = {
|
|
|
9607
9661
|
keyframable: false
|
|
9608
9662
|
},
|
|
9609
9663
|
...baseSchema,
|
|
9664
|
+
...premountSchema,
|
|
9610
9665
|
playbackRate: {
|
|
9611
9666
|
type: "number",
|
|
9612
9667
|
min: 0,
|
|
@@ -9617,7 +9672,9 @@ var animatedImageSchema = {
|
|
|
9617
9672
|
hiddenFromList: false,
|
|
9618
9673
|
keyframable: false
|
|
9619
9674
|
},
|
|
9620
|
-
...transformSchema
|
|
9675
|
+
...transformSchema,
|
|
9676
|
+
...backgroundSchema,
|
|
9677
|
+
...borderSchema
|
|
9621
9678
|
};
|
|
9622
9679
|
var getCanvasPropsFromSequenceProps = (props) => {
|
|
9623
9680
|
const canvasProps = {};
|
|
@@ -9669,6 +9726,15 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
9669
9726
|
const [initialLoopBehavior] = useState6(() => loopBehavior);
|
|
9670
9727
|
useEffect5(() => {
|
|
9671
9728
|
const controller = new AbortController;
|
|
9729
|
+
let cancelled = false;
|
|
9730
|
+
let continued = false;
|
|
9731
|
+
const continueRenderOnce = () => {
|
|
9732
|
+
if (continued) {
|
|
9733
|
+
return;
|
|
9734
|
+
}
|
|
9735
|
+
continued = true;
|
|
9736
|
+
continueRender2(decodeHandle);
|
|
9737
|
+
};
|
|
9672
9738
|
decodeImage({
|
|
9673
9739
|
resolvedSrc,
|
|
9674
9740
|
signal: controller.signal,
|
|
@@ -9676,22 +9742,31 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
9676
9742
|
currentTime: currentTimeRef.current,
|
|
9677
9743
|
initialLoopBehavior
|
|
9678
9744
|
}).then((d) => {
|
|
9745
|
+
if (cancelled) {
|
|
9746
|
+
d.close();
|
|
9747
|
+
return;
|
|
9748
|
+
}
|
|
9679
9749
|
setImageDecoder(d);
|
|
9680
|
-
|
|
9750
|
+
continueRenderOnce();
|
|
9681
9751
|
}).catch((err) => {
|
|
9752
|
+
if (cancelled) {
|
|
9753
|
+
return;
|
|
9754
|
+
}
|
|
9682
9755
|
if (err.name === "AbortError") {
|
|
9683
|
-
|
|
9756
|
+
continueRenderOnce();
|
|
9684
9757
|
return;
|
|
9685
9758
|
}
|
|
9686
9759
|
if (onError) {
|
|
9687
9760
|
onError?.(err);
|
|
9688
|
-
|
|
9761
|
+
continueRenderOnce();
|
|
9689
9762
|
} else {
|
|
9690
9763
|
cancelRender(err);
|
|
9691
9764
|
}
|
|
9692
9765
|
});
|
|
9693
9766
|
return () => {
|
|
9767
|
+
cancelled = true;
|
|
9694
9768
|
controller.abort();
|
|
9769
|
+
continueRenderOnce();
|
|
9695
9770
|
};
|
|
9696
9771
|
}, [
|
|
9697
9772
|
resolvedSrc,
|
|
@@ -9701,6 +9776,11 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
9701
9776
|
initialLoopBehavior,
|
|
9702
9777
|
continueRender2
|
|
9703
9778
|
]);
|
|
9779
|
+
useEffect5(() => {
|
|
9780
|
+
return () => {
|
|
9781
|
+
imageDecoder?.close();
|
|
9782
|
+
};
|
|
9783
|
+
}, [imageDecoder]);
|
|
9704
9784
|
useLayoutEffect2(() => {
|
|
9705
9785
|
if (!imageDecoder) {
|
|
9706
9786
|
return;
|
|
@@ -9770,6 +9850,11 @@ var AnimatedImageInner = ({
|
|
|
9770
9850
|
className,
|
|
9771
9851
|
style,
|
|
9772
9852
|
durationInFrames,
|
|
9853
|
+
from,
|
|
9854
|
+
premountFor,
|
|
9855
|
+
postmountFor,
|
|
9856
|
+
styleWhilePremounted,
|
|
9857
|
+
styleWhilePostmounted,
|
|
9773
9858
|
requestInit,
|
|
9774
9859
|
effects = [],
|
|
9775
9860
|
controls,
|
|
@@ -9781,6 +9866,24 @@ var AnimatedImageInner = ({
|
|
|
9781
9866
|
useImperativeHandle2(ref, () => {
|
|
9782
9867
|
return actualRef.current;
|
|
9783
9868
|
}, []);
|
|
9869
|
+
const {
|
|
9870
|
+
effectivePostmountFor,
|
|
9871
|
+
effectivePremountFor,
|
|
9872
|
+
freezeFrame,
|
|
9873
|
+
isPremountingOrPostmounting,
|
|
9874
|
+
postmountingActive,
|
|
9875
|
+
premountingActive,
|
|
9876
|
+
premountingStyle
|
|
9877
|
+
} = usePremounting({
|
|
9878
|
+
from: from ?? 0,
|
|
9879
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
9880
|
+
premountFor: premountFor ?? null,
|
|
9881
|
+
postmountFor: postmountFor ?? null,
|
|
9882
|
+
style: style ?? null,
|
|
9883
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
9884
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
9885
|
+
hideWhilePremounted: "display-none"
|
|
9886
|
+
});
|
|
9784
9887
|
const canvasProps = getCanvasPropsFromSequenceProps(sequenceProps);
|
|
9785
9888
|
const animatedImageProps = {
|
|
9786
9889
|
src,
|
|
@@ -9792,24 +9895,33 @@ var AnimatedImageInner = ({
|
|
|
9792
9895
|
loopBehavior,
|
|
9793
9896
|
id,
|
|
9794
9897
|
className,
|
|
9795
|
-
style,
|
|
9898
|
+
style: premountingStyle ?? undefined,
|
|
9796
9899
|
requestInit,
|
|
9797
9900
|
...canvasProps
|
|
9798
9901
|
};
|
|
9799
|
-
return /* @__PURE__ */ jsx14(
|
|
9800
|
-
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9902
|
+
return /* @__PURE__ */ jsx14(Freeze, {
|
|
9903
|
+
frame: freezeFrame,
|
|
9904
|
+
active: isPremountingOrPostmounting,
|
|
9905
|
+
children: /* @__PURE__ */ jsx14(Sequence, {
|
|
9906
|
+
layout: "none",
|
|
9907
|
+
from: from ?? 0,
|
|
9908
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
9909
|
+
name: "<AnimatedImage>",
|
|
9910
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage",
|
|
9911
|
+
controls,
|
|
9912
|
+
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
9913
|
+
_remotionInternalPremountDisplay: effectivePremountFor || null,
|
|
9914
|
+
_remotionInternalPostmountDisplay: effectivePostmountFor || null,
|
|
9915
|
+
_remotionInternalIsPremounting: premountingActive,
|
|
9916
|
+
_remotionInternalIsPostmounting: postmountingActive,
|
|
9917
|
+
...sequenceProps,
|
|
9918
|
+
outlineRef: actualRef,
|
|
9919
|
+
children: /* @__PURE__ */ jsx14(AnimatedImageContent, {
|
|
9920
|
+
...animatedImageProps,
|
|
9921
|
+
ref: actualRef,
|
|
9922
|
+
effects,
|
|
9923
|
+
controls
|
|
9924
|
+
})
|
|
9813
9925
|
})
|
|
9814
9926
|
});
|
|
9815
9927
|
};
|
|
@@ -10525,13 +10637,17 @@ var makeSharedElementSourceNode = ({
|
|
|
10525
10637
|
}) => {
|
|
10526
10638
|
let connected = null;
|
|
10527
10639
|
let disposed = false;
|
|
10640
|
+
let currentAudioContext = audioContext;
|
|
10528
10641
|
return {
|
|
10642
|
+
setAudioContext: (newAudioContext) => {
|
|
10643
|
+
currentAudioContext = newAudioContext;
|
|
10644
|
+
},
|
|
10529
10645
|
attemptToConnect: () => {
|
|
10530
10646
|
if (disposed) {
|
|
10531
10647
|
throw new Error("SharedElementSourceNode has been disposed");
|
|
10532
10648
|
}
|
|
10533
|
-
if (!connected && ref.current) {
|
|
10534
|
-
const mediaElementSourceNode =
|
|
10649
|
+
if (!connected && ref.current && currentAudioContext) {
|
|
10650
|
+
const mediaElementSourceNode = currentAudioContext.createMediaElementSource(ref.current);
|
|
10535
10651
|
connected = mediaElementSourceNode;
|
|
10536
10652
|
}
|
|
10537
10653
|
},
|
|
@@ -10859,19 +10975,22 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10859
10975
|
const audioCtx = useContext21(SharedAudioContext);
|
|
10860
10976
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
10861
10977
|
const resume = audioCtx?.resume;
|
|
10862
|
-
const refs =
|
|
10978
|
+
const [refs] = useState10(() => {
|
|
10863
10979
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
10864
10980
|
const ref = createRef2();
|
|
10865
10981
|
return {
|
|
10866
10982
|
id: Math.random(),
|
|
10867
10983
|
ref,
|
|
10868
|
-
mediaElementSourceNode:
|
|
10984
|
+
mediaElementSourceNode: makeSharedElementSourceNode({
|
|
10869
10985
|
audioContext,
|
|
10870
10986
|
ref
|
|
10871
|
-
})
|
|
10987
|
+
})
|
|
10872
10988
|
};
|
|
10873
10989
|
});
|
|
10874
|
-
}
|
|
10990
|
+
});
|
|
10991
|
+
for (const { mediaElementSourceNode } of refs) {
|
|
10992
|
+
mediaElementSourceNode?.setAudioContext(audioContext);
|
|
10993
|
+
}
|
|
10875
10994
|
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
10876
10995
|
effectToUse(() => {
|
|
10877
10996
|
return () => {
|
|
@@ -10939,7 +11058,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10939
11058
|
const cloned = [...takenAudios.current];
|
|
10940
11059
|
const index = refs.findIndex((r2) => r2.id === id);
|
|
10941
11060
|
if (index === -1) {
|
|
10942
|
-
throw new TypeError(
|
|
11061
|
+
throw new TypeError(`Unknown audio ref ${id}; refs: ${refs.map((r2) => r2.id).join(", ")}`);
|
|
10943
11062
|
}
|
|
10944
11063
|
cloned[index] = false;
|
|
10945
11064
|
takenAudios.current = cloned;
|
|
@@ -11043,10 +11162,10 @@ var useSharedAudio = ({
|
|
|
11043
11162
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
11044
11163
|
}
|
|
11045
11164
|
const el = React20.createRef();
|
|
11046
|
-
const mediaElementSourceNode =
|
|
11047
|
-
audioContext: audioCtx
|
|
11165
|
+
const mediaElementSourceNode = makeSharedElementSourceNode({
|
|
11166
|
+
audioContext: audioCtx?.audioContext ?? null,
|
|
11048
11167
|
ref: el
|
|
11049
|
-
})
|
|
11168
|
+
});
|
|
11050
11169
|
return {
|
|
11051
11170
|
el,
|
|
11052
11171
|
id: Math.random(),
|
|
@@ -11061,6 +11180,7 @@ var useSharedAudio = ({
|
|
|
11061
11180
|
}
|
|
11062
11181
|
};
|
|
11063
11182
|
});
|
|
11183
|
+
elem.mediaElementSourceNode?.setAudioContext(audioCtx?.audioContext ?? null);
|
|
11064
11184
|
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
11065
11185
|
if (typeof document !== "undefined") {
|
|
11066
11186
|
effectToUse(() => {
|
|
@@ -12918,7 +13038,9 @@ var solidSchema = {
|
|
|
12918
13038
|
description: "Pixel density",
|
|
12919
13039
|
hiddenFromList: false
|
|
12920
13040
|
},
|
|
12921
|
-
...transformSchema
|
|
13041
|
+
...transformSchema,
|
|
13042
|
+
...backgroundSchema,
|
|
13043
|
+
...borderSchema
|
|
12922
13044
|
};
|
|
12923
13045
|
var SolidInner = ({
|
|
12924
13046
|
color,
|
|
@@ -13472,7 +13594,9 @@ var htmlInCanvasSchema = {
|
|
|
13472
13594
|
description: "Pixel density",
|
|
13473
13595
|
hiddenFromList: false
|
|
13474
13596
|
},
|
|
13475
|
-
...transformSchema
|
|
13597
|
+
...transformSchema,
|
|
13598
|
+
...backgroundSchema,
|
|
13599
|
+
...borderSchema
|
|
13476
13600
|
};
|
|
13477
13601
|
var HtmlInCanvasWrapped = withInteractivitySchema({
|
|
13478
13602
|
Component: HtmlInCanvasInner,
|
|
@@ -13494,6 +13618,7 @@ function truncateSrcForLabel(src) {
|
|
|
13494
13618
|
}
|
|
13495
13619
|
var canvasImageSchema = {
|
|
13496
13620
|
...baseSchema,
|
|
13621
|
+
...premountSchema,
|
|
13497
13622
|
fit: {
|
|
13498
13623
|
type: "enum",
|
|
13499
13624
|
default: "fill",
|
|
@@ -13504,7 +13629,9 @@ var canvasImageSchema = {
|
|
|
13504
13629
|
cover: {}
|
|
13505
13630
|
}
|
|
13506
13631
|
},
|
|
13507
|
-
...transformSchema
|
|
13632
|
+
...transformSchema,
|
|
13633
|
+
...backgroundSchema,
|
|
13634
|
+
...borderSchema
|
|
13508
13635
|
};
|
|
13509
13636
|
var makeAbortError = () => {
|
|
13510
13637
|
if (typeof DOMException !== "undefined") {
|
|
@@ -13828,6 +13955,10 @@ var CanvasImageInner = forwardRef10(({
|
|
|
13828
13955
|
from,
|
|
13829
13956
|
trimBefore,
|
|
13830
13957
|
freeze,
|
|
13958
|
+
premountFor,
|
|
13959
|
+
postmountFor,
|
|
13960
|
+
styleWhilePremounted,
|
|
13961
|
+
styleWhilePostmounted,
|
|
13831
13962
|
hidden,
|
|
13832
13963
|
name,
|
|
13833
13964
|
showInTimeline,
|
|
@@ -13845,39 +13976,65 @@ var CanvasImageInner = forwardRef10(({
|
|
|
13845
13976
|
useImperativeHandle7(ref, () => {
|
|
13846
13977
|
return actualRef.current;
|
|
13847
13978
|
}, []);
|
|
13848
|
-
|
|
13849
|
-
|
|
13979
|
+
const {
|
|
13980
|
+
effectivePostmountFor,
|
|
13981
|
+
effectivePremountFor,
|
|
13982
|
+
freezeFrame,
|
|
13983
|
+
isPremountingOrPostmounting,
|
|
13984
|
+
postmountingActive,
|
|
13985
|
+
premountingActive,
|
|
13986
|
+
premountingStyle
|
|
13987
|
+
} = usePremounting({
|
|
13850
13988
|
from: from ?? 0,
|
|
13851
|
-
trimBefore,
|
|
13852
13989
|
durationInFrames: durationInFrames ?? Infinity,
|
|
13853
|
-
|
|
13854
|
-
|
|
13855
|
-
|
|
13856
|
-
|
|
13857
|
-
|
|
13858
|
-
|
|
13859
|
-
|
|
13860
|
-
|
|
13861
|
-
|
|
13862
|
-
|
|
13863
|
-
children: /* @__PURE__ */ jsx26(
|
|
13864
|
-
|
|
13865
|
-
|
|
13866
|
-
|
|
13867
|
-
|
|
13868
|
-
|
|
13869
|
-
|
|
13990
|
+
premountFor: premountFor ?? null,
|
|
13991
|
+
postmountFor: postmountFor ?? null,
|
|
13992
|
+
style: style ?? null,
|
|
13993
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
13994
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
13995
|
+
hideWhilePremounted: "display-none"
|
|
13996
|
+
});
|
|
13997
|
+
return /* @__PURE__ */ jsx26(Freeze, {
|
|
13998
|
+
frame: freezeFrame,
|
|
13999
|
+
active: isPremountingOrPostmounting,
|
|
14000
|
+
children: /* @__PURE__ */ jsx26(Sequence, {
|
|
14001
|
+
layout: "none",
|
|
14002
|
+
from: from ?? 0,
|
|
14003
|
+
trimBefore,
|
|
14004
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
14005
|
+
freeze,
|
|
14006
|
+
hidden,
|
|
14007
|
+
showInTimeline: showInTimeline ?? true,
|
|
14008
|
+
name: name ?? "<CanvasImage>",
|
|
14009
|
+
_remotionInternalDocumentationLink: _remotionInternalDocumentationLink ?? "https://www.remotion.dev/docs/canvasimage",
|
|
13870
14010
|
controls,
|
|
13871
|
-
|
|
13872
|
-
|
|
13873
|
-
|
|
13874
|
-
|
|
13875
|
-
|
|
13876
|
-
|
|
13877
|
-
|
|
13878
|
-
|
|
13879
|
-
|
|
13880
|
-
|
|
14011
|
+
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
14012
|
+
_remotionInternalIsMedia: { type: "image", src },
|
|
14013
|
+
_remotionInternalStack: stack,
|
|
14014
|
+
_remotionInternalPremountDisplay: effectivePremountFor || null,
|
|
14015
|
+
_remotionInternalPostmountDisplay: effectivePostmountFor || null,
|
|
14016
|
+
_remotionInternalIsPremounting: premountingActive,
|
|
14017
|
+
_remotionInternalIsPostmounting: postmountingActive,
|
|
14018
|
+
outlineRef: outlineRef ?? actualRef,
|
|
14019
|
+
children: /* @__PURE__ */ jsx26(CanvasImageContent, {
|
|
14020
|
+
ref: actualRef,
|
|
14021
|
+
src,
|
|
14022
|
+
width,
|
|
14023
|
+
height,
|
|
14024
|
+
fit,
|
|
14025
|
+
effects,
|
|
14026
|
+
controls,
|
|
14027
|
+
className,
|
|
14028
|
+
style: premountingStyle ?? undefined,
|
|
14029
|
+
id,
|
|
14030
|
+
onError,
|
|
14031
|
+
pauseWhenLoading,
|
|
14032
|
+
maxRetries,
|
|
14033
|
+
delayRenderRetries,
|
|
14034
|
+
delayRenderTimeoutInMilliseconds,
|
|
14035
|
+
refForOutline: outlineRef ?? null,
|
|
14036
|
+
...canvasProps
|
|
14037
|
+
})
|
|
13881
14038
|
})
|
|
13882
14039
|
});
|
|
13883
14040
|
});
|
|
@@ -14094,6 +14251,11 @@ var NativeImgInner = ({
|
|
|
14094
14251
|
trimBefore,
|
|
14095
14252
|
durationInFrames,
|
|
14096
14253
|
freeze,
|
|
14254
|
+
premountFor,
|
|
14255
|
+
postmountFor,
|
|
14256
|
+
style,
|
|
14257
|
+
styleWhilePremounted,
|
|
14258
|
+
styleWhilePostmounted,
|
|
14097
14259
|
controls,
|
|
14098
14260
|
outlineRef: refForOutline,
|
|
14099
14261
|
...props2
|
|
@@ -14101,24 +14263,51 @@ var NativeImgInner = ({
|
|
|
14101
14263
|
if (!src) {
|
|
14102
14264
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
14103
14265
|
}
|
|
14104
|
-
|
|
14105
|
-
|
|
14266
|
+
const {
|
|
14267
|
+
effectivePostmountFor,
|
|
14268
|
+
effectivePremountFor,
|
|
14269
|
+
freezeFrame,
|
|
14270
|
+
isPremountingOrPostmounting,
|
|
14271
|
+
postmountingActive,
|
|
14272
|
+
premountingActive,
|
|
14273
|
+
premountingStyle
|
|
14274
|
+
} = usePremounting({
|
|
14106
14275
|
from: from ?? 0,
|
|
14107
|
-
trimBefore,
|
|
14108
14276
|
durationInFrames: durationInFrames ?? Infinity,
|
|
14109
|
-
|
|
14110
|
-
|
|
14111
|
-
|
|
14112
|
-
|
|
14113
|
-
|
|
14114
|
-
|
|
14115
|
-
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
|
|
14277
|
+
premountFor: premountFor ?? null,
|
|
14278
|
+
postmountFor: postmountFor ?? null,
|
|
14279
|
+
style: style ?? null,
|
|
14280
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
14281
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
14282
|
+
hideWhilePremounted: "display-none"
|
|
14283
|
+
});
|
|
14284
|
+
return /* @__PURE__ */ jsx28(Freeze, {
|
|
14285
|
+
frame: freezeFrame,
|
|
14286
|
+
active: isPremountingOrPostmounting,
|
|
14287
|
+
children: /* @__PURE__ */ jsx28(Sequence, {
|
|
14288
|
+
layout: "none",
|
|
14289
|
+
from: from ?? 0,
|
|
14290
|
+
trimBefore,
|
|
14291
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
14292
|
+
freeze,
|
|
14293
|
+
_remotionInternalStack: stack,
|
|
14294
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
14295
|
+
_remotionInternalIsMedia: { type: "image", src },
|
|
14296
|
+
_remotionInternalPremountDisplay: effectivePremountFor || null,
|
|
14297
|
+
_remotionInternalPostmountDisplay: effectivePostmountFor || null,
|
|
14298
|
+
_remotionInternalIsPremounting: premountingActive,
|
|
14299
|
+
_remotionInternalIsPostmounting: postmountingActive,
|
|
14300
|
+
name: name ?? "<Img>",
|
|
14301
|
+
controls,
|
|
14302
|
+
showInTimeline: showInTimeline ?? true,
|
|
14303
|
+
hidden,
|
|
14304
|
+
outlineRef: refForOutline,
|
|
14305
|
+
children: /* @__PURE__ */ jsx28(ImgContent, {
|
|
14306
|
+
src,
|
|
14307
|
+
refForOutline,
|
|
14308
|
+
style: premountingStyle ?? undefined,
|
|
14309
|
+
...props2
|
|
14310
|
+
})
|
|
14122
14311
|
})
|
|
14123
14312
|
});
|
|
14124
14313
|
};
|
|
@@ -14131,7 +14320,10 @@ var imgSchema = {
|
|
|
14131
14320
|
keyframable: false
|
|
14132
14321
|
},
|
|
14133
14322
|
...baseSchema,
|
|
14134
|
-
...
|
|
14323
|
+
...premountSchema,
|
|
14324
|
+
...transformSchema,
|
|
14325
|
+
...backgroundSchema,
|
|
14326
|
+
...borderSchema
|
|
14135
14327
|
};
|
|
14136
14328
|
var imgCanvasFallbackIncompatibleProps = new Set([
|
|
14137
14329
|
"alt",
|
|
@@ -14187,6 +14379,10 @@ var ImgInner = ({
|
|
|
14187
14379
|
trimBefore,
|
|
14188
14380
|
durationInFrames,
|
|
14189
14381
|
freeze,
|
|
14382
|
+
premountFor,
|
|
14383
|
+
postmountFor,
|
|
14384
|
+
styleWhilePremounted,
|
|
14385
|
+
styleWhilePostmounted,
|
|
14190
14386
|
controls,
|
|
14191
14387
|
width,
|
|
14192
14388
|
height,
|
|
@@ -14213,6 +14409,10 @@ var ImgInner = ({
|
|
|
14213
14409
|
trimBefore,
|
|
14214
14410
|
durationInFrames,
|
|
14215
14411
|
freeze,
|
|
14412
|
+
premountFor,
|
|
14413
|
+
postmountFor,
|
|
14414
|
+
styleWhilePremounted,
|
|
14415
|
+
styleWhilePostmounted,
|
|
14216
14416
|
controls,
|
|
14217
14417
|
width,
|
|
14218
14418
|
height,
|
|
@@ -14256,6 +14456,10 @@ var ImgInner = ({
|
|
|
14256
14456
|
trimBefore,
|
|
14257
14457
|
durationInFrames,
|
|
14258
14458
|
freeze,
|
|
14459
|
+
premountFor,
|
|
14460
|
+
postmountFor,
|
|
14461
|
+
styleWhilePremounted,
|
|
14462
|
+
styleWhilePostmounted,
|
|
14259
14463
|
hidden,
|
|
14260
14464
|
name: name ?? "<Img>",
|
|
14261
14465
|
showInTimeline,
|
|
@@ -14294,7 +14498,20 @@ var interactiveElementSchema = {
|
|
|
14294
14498
|
...baseSchema,
|
|
14295
14499
|
...transformSchema
|
|
14296
14500
|
};
|
|
14501
|
+
var interactiveBackgroundElementSchema = {
|
|
14502
|
+
...interactiveElementSchema,
|
|
14503
|
+
...backgroundSchema
|
|
14504
|
+
};
|
|
14505
|
+
var interactiveBorderElementSchema = {
|
|
14506
|
+
...interactiveBackgroundElementSchema,
|
|
14507
|
+
...borderSchema
|
|
14508
|
+
};
|
|
14297
14509
|
var interactiveTextElementSchema = {
|
|
14510
|
+
...interactiveBorderElementSchema,
|
|
14511
|
+
...textSchema,
|
|
14512
|
+
...textContentSchema
|
|
14513
|
+
};
|
|
14514
|
+
var interactiveSvgTextElementSchema = {
|
|
14298
14515
|
...interactiveElementSchema,
|
|
14299
14516
|
...textSchema,
|
|
14300
14517
|
...textContentSchema
|
|
@@ -14373,6 +14590,8 @@ var Interactive = {
|
|
|
14373
14590
|
baseSchema,
|
|
14374
14591
|
transformSchema,
|
|
14375
14592
|
textSchema,
|
|
14593
|
+
backgroundSchema,
|
|
14594
|
+
borderSchema,
|
|
14376
14595
|
premountSchema,
|
|
14377
14596
|
sequenceSchema,
|
|
14378
14597
|
withSchema,
|
|
@@ -14409,10 +14628,39 @@ var Interactive = {
|
|
|
14409
14628
|
Small: makeInteractiveTextElement("small", "<Interactive.Small>"),
|
|
14410
14629
|
Span: makeInteractiveTextElement("span", "<Interactive.Span>"),
|
|
14411
14630
|
Strong: makeInteractiveTextElement("strong", "<Interactive.Strong>"),
|
|
14412
|
-
Svg:
|
|
14413
|
-
Text:
|
|
14631
|
+
Svg: makeInteractiveElement("svg", "<Interactive.Svg>", interactiveBorderElementSchema),
|
|
14632
|
+
Text: makeInteractiveElement("text", "<Interactive.Text>", interactiveSvgTextElementSchema),
|
|
14414
14633
|
Ul: makeInteractiveTextElement("ul", "<Interactive.Ul>")
|
|
14415
14634
|
};
|
|
14635
|
+
var getAnimatedImageDurationInSeconds = async ({
|
|
14636
|
+
resolvedSrc,
|
|
14637
|
+
signal,
|
|
14638
|
+
requestInit,
|
|
14639
|
+
contentType
|
|
14640
|
+
}) => {
|
|
14641
|
+
const { decoder, selectedTrack } = await createImageDecoder({
|
|
14642
|
+
resolvedSrc,
|
|
14643
|
+
signal,
|
|
14644
|
+
requestInit,
|
|
14645
|
+
contentType
|
|
14646
|
+
});
|
|
14647
|
+
try {
|
|
14648
|
+
const { image } = await decoder.decode({
|
|
14649
|
+
frameIndex: selectedTrack.frameCount - 1,
|
|
14650
|
+
completeFramesOnly: true
|
|
14651
|
+
});
|
|
14652
|
+
try {
|
|
14653
|
+
if (image.duration === null) {
|
|
14654
|
+
throw new Error("Could not determine animated image duration");
|
|
14655
|
+
}
|
|
14656
|
+
return (image.timestamp + image.duration) / 1e6;
|
|
14657
|
+
} finally {
|
|
14658
|
+
image.close();
|
|
14659
|
+
}
|
|
14660
|
+
} finally {
|
|
14661
|
+
decoder.close();
|
|
14662
|
+
}
|
|
14663
|
+
};
|
|
14416
14664
|
var compositionsRef = React31.createRef();
|
|
14417
14665
|
var CompositionManagerProvider = ({
|
|
14418
14666
|
children,
|
|
@@ -15640,6 +15888,7 @@ var Internals = {
|
|
|
15640
15888
|
useAbsoluteTimelinePosition,
|
|
15641
15889
|
evaluateVolume,
|
|
15642
15890
|
getAbsoluteSrc,
|
|
15891
|
+
getAnimatedImageDurationInSeconds,
|
|
15643
15892
|
getAssetDisplayName,
|
|
15644
15893
|
Timeline: exports_timeline_position_state,
|
|
15645
15894
|
validateMediaTrimProps,
|
|
@@ -15664,7 +15913,6 @@ var Internals = {
|
|
|
15664
15913
|
textSchema,
|
|
15665
15914
|
transformSchema,
|
|
15666
15915
|
premountSchema,
|
|
15667
|
-
premountStyleSchema,
|
|
15668
15916
|
flattenActiveSchema,
|
|
15669
15917
|
getFlatSchemaWithAllKeys,
|
|
15670
15918
|
RemotionRootContexts,
|
|
@@ -15803,6 +16051,7 @@ var seriesSequenceSchema = {
|
|
|
15803
16051
|
hidden: Interactive.sequenceSchema.hidden,
|
|
15804
16052
|
showInTimeline: Interactive.sequenceSchema.showInTimeline,
|
|
15805
16053
|
freeze: Interactive.baseSchema.freeze,
|
|
16054
|
+
trimBefore: Interactive.sequenceSchema.trimBefore,
|
|
15806
16055
|
layout: Interactive.sequenceSchema.layout
|
|
15807
16056
|
};
|
|
15808
16057
|
var SeriesSequenceInner = forwardRef14(({
|
|
@@ -16875,7 +17124,9 @@ var makeShapeSchema = (shapeFields) => {
|
|
|
16875
17124
|
defaultValue: "#0b84ff",
|
|
16876
17125
|
description: "Fill"
|
|
16877
17126
|
}),
|
|
16878
|
-
...Internals.transformSchema
|
|
17127
|
+
...Internals.transformSchema,
|
|
17128
|
+
...Interactive.backgroundSchema,
|
|
17129
|
+
...Interactive.borderSchema
|
|
16879
17130
|
};
|
|
16880
17131
|
};
|
|
16881
17132
|
var arrowSchema = makeShapeSchema({
|