@remotion/promo-pages 4.0.495 → 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 +518 -160
- 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 +365 -124
- package/dist/experts.js +362 -123
- package/dist/homepage/Pricing.js +365 -124
- package/dist/prompts/PromptsGallery.js +365 -124
- package/dist/prompts/PromptsShow.js +365 -124
- package/dist/prompts/PromptsSubmit.js +365 -124
- package/dist/team.js +365 -124
- package/dist/template-modal-content.js +365 -124
- package/dist/templates.js +365 -124
- 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.js
CHANGED
|
@@ -2029,17 +2029,6 @@ var delayRenderInternal = ({
|
|
|
2029
2029
|
scope.remotion_renderReady = false;
|
|
2030
2030
|
return handle;
|
|
2031
2031
|
};
|
|
2032
|
-
var delayRender = (label2, options) => {
|
|
2033
|
-
if (typeof window === "undefined") {
|
|
2034
|
-
return Math.random();
|
|
2035
|
-
}
|
|
2036
|
-
return delayRenderInternal({
|
|
2037
|
-
scope: window,
|
|
2038
|
-
environment: getRemotionEnvironment(),
|
|
2039
|
-
label: label2 ?? null,
|
|
2040
|
-
options: options ?? {}
|
|
2041
|
-
});
|
|
2042
|
-
};
|
|
2043
2032
|
var continueRenderInternal = ({
|
|
2044
2033
|
scope,
|
|
2045
2034
|
handle,
|
|
@@ -2360,7 +2349,7 @@ var getSingleChildComponent = (children) => {
|
|
|
2360
2349
|
}
|
|
2361
2350
|
return child.type;
|
|
2362
2351
|
};
|
|
2363
|
-
var VERSION = "4.0.
|
|
2352
|
+
var VERSION = "4.0.497";
|
|
2364
2353
|
var checkMultipleRemotionVersions = () => {
|
|
2365
2354
|
if (typeof globalThis === "undefined") {
|
|
2366
2355
|
return;
|
|
@@ -2838,6 +2827,45 @@ var textSchema = {
|
|
|
2838
2827
|
hiddenFromList: false
|
|
2839
2828
|
}
|
|
2840
2829
|
};
|
|
2830
|
+
var borderSchema = {
|
|
2831
|
+
"style.borderWidth": {
|
|
2832
|
+
type: "number",
|
|
2833
|
+
default: undefined,
|
|
2834
|
+
min: 0,
|
|
2835
|
+
step: 1,
|
|
2836
|
+
description: "Border width",
|
|
2837
|
+
hiddenFromList: false
|
|
2838
|
+
},
|
|
2839
|
+
"style.borderStyle": {
|
|
2840
|
+
type: "enum",
|
|
2841
|
+
default: "none",
|
|
2842
|
+
description: "Border style",
|
|
2843
|
+
variants: {
|
|
2844
|
+
none: {},
|
|
2845
|
+
hidden: {},
|
|
2846
|
+
solid: {},
|
|
2847
|
+
dashed: {},
|
|
2848
|
+
dotted: {},
|
|
2849
|
+
double: {},
|
|
2850
|
+
groove: {},
|
|
2851
|
+
ridge: {},
|
|
2852
|
+
inset: {},
|
|
2853
|
+
outset: {}
|
|
2854
|
+
}
|
|
2855
|
+
},
|
|
2856
|
+
"style.borderColor": {
|
|
2857
|
+
type: "color",
|
|
2858
|
+
default: undefined,
|
|
2859
|
+
description: "Border color"
|
|
2860
|
+
}
|
|
2861
|
+
};
|
|
2862
|
+
var backgroundSchema = {
|
|
2863
|
+
"style.backgroundColor": {
|
|
2864
|
+
type: "color",
|
|
2865
|
+
default: "transparent",
|
|
2866
|
+
description: "Color"
|
|
2867
|
+
}
|
|
2868
|
+
};
|
|
2841
2869
|
var textContentSchema = {
|
|
2842
2870
|
children: {
|
|
2843
2871
|
type: "text-content",
|
|
@@ -2865,20 +2893,13 @@ var premountSchema = {
|
|
|
2865
2893
|
keyframable: false
|
|
2866
2894
|
}
|
|
2867
2895
|
};
|
|
2868
|
-
var premountStyleSchema = {
|
|
2869
|
-
styleWhilePremounted: {
|
|
2870
|
-
type: "hidden"
|
|
2871
|
-
},
|
|
2872
|
-
styleWhilePostmounted: {
|
|
2873
|
-
type: "hidden"
|
|
2874
|
-
}
|
|
2875
|
-
};
|
|
2876
2896
|
var sequencePremountSchema = {
|
|
2877
|
-
...premountSchema
|
|
2878
|
-
...premountStyleSchema
|
|
2897
|
+
...premountSchema
|
|
2879
2898
|
};
|
|
2880
2899
|
var sequenceStyleSchema = {
|
|
2881
2900
|
...transformSchema,
|
|
2901
|
+
...backgroundSchema,
|
|
2902
|
+
...borderSchema,
|
|
2882
2903
|
...sequencePremountSchema
|
|
2883
2904
|
};
|
|
2884
2905
|
var hiddenField = {
|
|
@@ -6214,38 +6235,53 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
6214
6235
|
});
|
|
6215
6236
|
};
|
|
6216
6237
|
var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
|
|
6217
|
-
var
|
|
6218
|
-
var getActualTime = ({
|
|
6219
|
-
loopBehavior,
|
|
6220
|
-
durationFound,
|
|
6221
|
-
timeInSec
|
|
6222
|
-
}) => {
|
|
6223
|
-
return loopBehavior === "loop" ? durationFound ? timeInSec % durationFound : timeInSec : Math.min(timeInSec, durationFound || Infinity);
|
|
6224
|
-
};
|
|
6225
|
-
var decodeImage = async ({
|
|
6238
|
+
var createImageDecoder = async ({
|
|
6226
6239
|
resolvedSrc,
|
|
6227
6240
|
signal,
|
|
6228
6241
|
requestInit,
|
|
6229
|
-
|
|
6230
|
-
initialLoopBehavior
|
|
6242
|
+
contentType
|
|
6231
6243
|
}) => {
|
|
6232
6244
|
if (typeof ImageDecoder === "undefined") {
|
|
6233
6245
|
throw new Error("Your browser does not support the WebCodecs ImageDecoder API.");
|
|
6234
6246
|
}
|
|
6235
|
-
const
|
|
6236
|
-
const { body } =
|
|
6247
|
+
const response = await fetch(resolvedSrc, { ...requestInit, signal });
|
|
6248
|
+
const { body } = response;
|
|
6237
6249
|
if (!body) {
|
|
6238
6250
|
throw new Error("Got no body");
|
|
6239
6251
|
}
|
|
6240
6252
|
const decoder = new ImageDecoder({
|
|
6241
6253
|
data: body,
|
|
6242
|
-
type:
|
|
6254
|
+
type: contentType ?? response.headers.get("Content-Type") ?? "image/gif"
|
|
6243
6255
|
});
|
|
6244
|
-
await decoder.completed;
|
|
6256
|
+
await Promise.all([decoder.completed, decoder.tracks.ready]);
|
|
6245
6257
|
const { selectedTrack } = decoder.tracks;
|
|
6246
6258
|
if (!selectedTrack) {
|
|
6259
|
+
decoder.close();
|
|
6247
6260
|
throw new Error("No selected track");
|
|
6248
6261
|
}
|
|
6262
|
+
return { decoder, selectedTrack };
|
|
6263
|
+
};
|
|
6264
|
+
var CACHE_SIZE = 5;
|
|
6265
|
+
var getActualTime = ({
|
|
6266
|
+
loopBehavior,
|
|
6267
|
+
durationFound,
|
|
6268
|
+
timeInSec
|
|
6269
|
+
}) => {
|
|
6270
|
+
return loopBehavior === "loop" ? durationFound ? timeInSec % durationFound : timeInSec : Math.min(timeInSec, durationFound || Infinity);
|
|
6271
|
+
};
|
|
6272
|
+
var decodeImage = async ({
|
|
6273
|
+
resolvedSrc,
|
|
6274
|
+
signal,
|
|
6275
|
+
requestInit,
|
|
6276
|
+
currentTime,
|
|
6277
|
+
initialLoopBehavior
|
|
6278
|
+
}) => {
|
|
6279
|
+
const { decoder, selectedTrack } = await createImageDecoder({
|
|
6280
|
+
resolvedSrc,
|
|
6281
|
+
signal,
|
|
6282
|
+
requestInit,
|
|
6283
|
+
contentType: null
|
|
6284
|
+
});
|
|
6249
6285
|
const cache2 = [];
|
|
6250
6286
|
let durationFound = null;
|
|
6251
6287
|
const getFrameByIndex = async (frameIndex) => {
|
|
@@ -6351,6 +6387,13 @@ var decodeImage = async ({
|
|
|
6351
6387
|
return closest;
|
|
6352
6388
|
};
|
|
6353
6389
|
return {
|
|
6390
|
+
close: () => {
|
|
6391
|
+
for (const item of cache2) {
|
|
6392
|
+
item.frame?.close();
|
|
6393
|
+
item.frame = null;
|
|
6394
|
+
}
|
|
6395
|
+
decoder.close();
|
|
6396
|
+
},
|
|
6354
6397
|
getFrame,
|
|
6355
6398
|
frameCount: selectedTrack.frameCount
|
|
6356
6399
|
};
|
|
@@ -6388,6 +6431,7 @@ var animatedImageSchema = {
|
|
|
6388
6431
|
keyframable: false
|
|
6389
6432
|
},
|
|
6390
6433
|
...baseSchema,
|
|
6434
|
+
...premountSchema,
|
|
6391
6435
|
playbackRate: {
|
|
6392
6436
|
type: "number",
|
|
6393
6437
|
min: 0,
|
|
@@ -6398,7 +6442,9 @@ var animatedImageSchema = {
|
|
|
6398
6442
|
hiddenFromList: false,
|
|
6399
6443
|
keyframable: false
|
|
6400
6444
|
},
|
|
6401
|
-
...transformSchema
|
|
6445
|
+
...transformSchema,
|
|
6446
|
+
...backgroundSchema,
|
|
6447
|
+
...borderSchema
|
|
6402
6448
|
};
|
|
6403
6449
|
var getCanvasPropsFromSequenceProps = (props) => {
|
|
6404
6450
|
const canvasProps = {};
|
|
@@ -6450,6 +6496,15 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
6450
6496
|
const [initialLoopBehavior] = useState6(() => loopBehavior);
|
|
6451
6497
|
useEffect5(() => {
|
|
6452
6498
|
const controller = new AbortController;
|
|
6499
|
+
let cancelled = false;
|
|
6500
|
+
let continued = false;
|
|
6501
|
+
const continueRenderOnce = () => {
|
|
6502
|
+
if (continued) {
|
|
6503
|
+
return;
|
|
6504
|
+
}
|
|
6505
|
+
continued = true;
|
|
6506
|
+
continueRender2(decodeHandle);
|
|
6507
|
+
};
|
|
6453
6508
|
decodeImage({
|
|
6454
6509
|
resolvedSrc,
|
|
6455
6510
|
signal: controller.signal,
|
|
@@ -6457,22 +6512,31 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
6457
6512
|
currentTime: currentTimeRef.current,
|
|
6458
6513
|
initialLoopBehavior
|
|
6459
6514
|
}).then((d) => {
|
|
6515
|
+
if (cancelled) {
|
|
6516
|
+
d.close();
|
|
6517
|
+
return;
|
|
6518
|
+
}
|
|
6460
6519
|
setImageDecoder(d);
|
|
6461
|
-
|
|
6520
|
+
continueRenderOnce();
|
|
6462
6521
|
}).catch((err) => {
|
|
6522
|
+
if (cancelled) {
|
|
6523
|
+
return;
|
|
6524
|
+
}
|
|
6463
6525
|
if (err.name === "AbortError") {
|
|
6464
|
-
|
|
6526
|
+
continueRenderOnce();
|
|
6465
6527
|
return;
|
|
6466
6528
|
}
|
|
6467
6529
|
if (onError) {
|
|
6468
6530
|
onError?.(err);
|
|
6469
|
-
|
|
6531
|
+
continueRenderOnce();
|
|
6470
6532
|
} else {
|
|
6471
6533
|
cancelRender(err);
|
|
6472
6534
|
}
|
|
6473
6535
|
});
|
|
6474
6536
|
return () => {
|
|
6537
|
+
cancelled = true;
|
|
6475
6538
|
controller.abort();
|
|
6539
|
+
continueRenderOnce();
|
|
6476
6540
|
};
|
|
6477
6541
|
}, [
|
|
6478
6542
|
resolvedSrc,
|
|
@@ -6482,6 +6546,11 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
6482
6546
|
initialLoopBehavior,
|
|
6483
6547
|
continueRender2
|
|
6484
6548
|
]);
|
|
6549
|
+
useEffect5(() => {
|
|
6550
|
+
return () => {
|
|
6551
|
+
imageDecoder?.close();
|
|
6552
|
+
};
|
|
6553
|
+
}, [imageDecoder]);
|
|
6485
6554
|
useLayoutEffect2(() => {
|
|
6486
6555
|
if (!imageDecoder) {
|
|
6487
6556
|
return;
|
|
@@ -6551,6 +6620,11 @@ var AnimatedImageInner = ({
|
|
|
6551
6620
|
className,
|
|
6552
6621
|
style,
|
|
6553
6622
|
durationInFrames,
|
|
6623
|
+
from,
|
|
6624
|
+
premountFor,
|
|
6625
|
+
postmountFor,
|
|
6626
|
+
styleWhilePremounted,
|
|
6627
|
+
styleWhilePostmounted,
|
|
6554
6628
|
requestInit,
|
|
6555
6629
|
effects = [],
|
|
6556
6630
|
controls,
|
|
@@ -6562,6 +6636,24 @@ var AnimatedImageInner = ({
|
|
|
6562
6636
|
useImperativeHandle2(ref, () => {
|
|
6563
6637
|
return actualRef.current;
|
|
6564
6638
|
}, []);
|
|
6639
|
+
const {
|
|
6640
|
+
effectivePostmountFor,
|
|
6641
|
+
effectivePremountFor,
|
|
6642
|
+
freezeFrame,
|
|
6643
|
+
isPremountingOrPostmounting,
|
|
6644
|
+
postmountingActive,
|
|
6645
|
+
premountingActive,
|
|
6646
|
+
premountingStyle
|
|
6647
|
+
} = usePremounting({
|
|
6648
|
+
from: from ?? 0,
|
|
6649
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
6650
|
+
premountFor: premountFor ?? null,
|
|
6651
|
+
postmountFor: postmountFor ?? null,
|
|
6652
|
+
style: style ?? null,
|
|
6653
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
6654
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
6655
|
+
hideWhilePremounted: "display-none"
|
|
6656
|
+
});
|
|
6565
6657
|
const canvasProps = getCanvasPropsFromSequenceProps(sequenceProps);
|
|
6566
6658
|
const animatedImageProps = {
|
|
6567
6659
|
src,
|
|
@@ -6573,24 +6665,33 @@ var AnimatedImageInner = ({
|
|
|
6573
6665
|
loopBehavior,
|
|
6574
6666
|
id,
|
|
6575
6667
|
className,
|
|
6576
|
-
style,
|
|
6668
|
+
style: premountingStyle ?? undefined,
|
|
6577
6669
|
requestInit,
|
|
6578
6670
|
...canvasProps
|
|
6579
6671
|
};
|
|
6580
|
-
return /* @__PURE__ */ jsx14(
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6672
|
+
return /* @__PURE__ */ jsx14(Freeze, {
|
|
6673
|
+
frame: freezeFrame,
|
|
6674
|
+
active: isPremountingOrPostmounting,
|
|
6675
|
+
children: /* @__PURE__ */ jsx14(Sequence, {
|
|
6676
|
+
layout: "none",
|
|
6677
|
+
from: from ?? 0,
|
|
6678
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
6679
|
+
name: "<AnimatedImage>",
|
|
6680
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage",
|
|
6681
|
+
controls,
|
|
6682
|
+
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
6683
|
+
_remotionInternalPremountDisplay: effectivePremountFor || null,
|
|
6684
|
+
_remotionInternalPostmountDisplay: effectivePostmountFor || null,
|
|
6685
|
+
_remotionInternalIsPremounting: premountingActive,
|
|
6686
|
+
_remotionInternalIsPostmounting: postmountingActive,
|
|
6687
|
+
...sequenceProps,
|
|
6688
|
+
outlineRef: actualRef,
|
|
6689
|
+
children: /* @__PURE__ */ jsx14(AnimatedImageContent, {
|
|
6690
|
+
...animatedImageProps,
|
|
6691
|
+
ref: actualRef,
|
|
6692
|
+
effects,
|
|
6693
|
+
controls
|
|
6694
|
+
})
|
|
6594
6695
|
})
|
|
6595
6696
|
});
|
|
6596
6697
|
};
|
|
@@ -7306,13 +7407,17 @@ var makeSharedElementSourceNode = ({
|
|
|
7306
7407
|
}) => {
|
|
7307
7408
|
let connected = null;
|
|
7308
7409
|
let disposed = false;
|
|
7410
|
+
let currentAudioContext = audioContext;
|
|
7309
7411
|
return {
|
|
7412
|
+
setAudioContext: (newAudioContext) => {
|
|
7413
|
+
currentAudioContext = newAudioContext;
|
|
7414
|
+
},
|
|
7310
7415
|
attemptToConnect: () => {
|
|
7311
7416
|
if (disposed) {
|
|
7312
7417
|
throw new Error("SharedElementSourceNode has been disposed");
|
|
7313
7418
|
}
|
|
7314
|
-
if (!connected && ref.current) {
|
|
7315
|
-
const mediaElementSourceNode =
|
|
7419
|
+
if (!connected && ref.current && currentAudioContext) {
|
|
7420
|
+
const mediaElementSourceNode = currentAudioContext.createMediaElementSource(ref.current);
|
|
7316
7421
|
connected = mediaElementSourceNode;
|
|
7317
7422
|
}
|
|
7318
7423
|
},
|
|
@@ -7640,19 +7745,22 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7640
7745
|
const audioCtx = useContext21(SharedAudioContext);
|
|
7641
7746
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
7642
7747
|
const resume = audioCtx?.resume;
|
|
7643
|
-
const refs =
|
|
7748
|
+
const [refs] = useState10(() => {
|
|
7644
7749
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
7645
7750
|
const ref = createRef2();
|
|
7646
7751
|
return {
|
|
7647
7752
|
id: Math.random(),
|
|
7648
7753
|
ref,
|
|
7649
|
-
mediaElementSourceNode:
|
|
7754
|
+
mediaElementSourceNode: makeSharedElementSourceNode({
|
|
7650
7755
|
audioContext,
|
|
7651
7756
|
ref
|
|
7652
|
-
})
|
|
7757
|
+
})
|
|
7653
7758
|
};
|
|
7654
7759
|
});
|
|
7655
|
-
}
|
|
7760
|
+
});
|
|
7761
|
+
for (const { mediaElementSourceNode } of refs) {
|
|
7762
|
+
mediaElementSourceNode?.setAudioContext(audioContext);
|
|
7763
|
+
}
|
|
7656
7764
|
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
7657
7765
|
effectToUse(() => {
|
|
7658
7766
|
return () => {
|
|
@@ -7720,7 +7828,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7720
7828
|
const cloned = [...takenAudios.current];
|
|
7721
7829
|
const index = refs.findIndex((r) => r.id === id);
|
|
7722
7830
|
if (index === -1) {
|
|
7723
|
-
throw new TypeError(
|
|
7831
|
+
throw new TypeError(`Unknown audio ref ${id}; refs: ${refs.map((r) => r.id).join(", ")}`);
|
|
7724
7832
|
}
|
|
7725
7833
|
cloned[index] = false;
|
|
7726
7834
|
takenAudios.current = cloned;
|
|
@@ -7824,10 +7932,10 @@ var useSharedAudio = ({
|
|
|
7824
7932
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
7825
7933
|
}
|
|
7826
7934
|
const el = React20.createRef();
|
|
7827
|
-
const mediaElementSourceNode =
|
|
7828
|
-
audioContext: audioCtx
|
|
7935
|
+
const mediaElementSourceNode = makeSharedElementSourceNode({
|
|
7936
|
+
audioContext: audioCtx?.audioContext ?? null,
|
|
7829
7937
|
ref: el
|
|
7830
|
-
})
|
|
7938
|
+
});
|
|
7831
7939
|
return {
|
|
7832
7940
|
el,
|
|
7833
7941
|
id: Math.random(),
|
|
@@ -7842,6 +7950,7 @@ var useSharedAudio = ({
|
|
|
7842
7950
|
}
|
|
7843
7951
|
};
|
|
7844
7952
|
});
|
|
7953
|
+
elem.mediaElementSourceNode?.setAudioContext(audioCtx?.audioContext ?? null);
|
|
7845
7954
|
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
7846
7955
|
if (typeof document !== "undefined") {
|
|
7847
7956
|
effectToUse(() => {
|
|
@@ -9699,7 +9808,9 @@ var solidSchema = {
|
|
|
9699
9808
|
description: "Pixel density",
|
|
9700
9809
|
hiddenFromList: false
|
|
9701
9810
|
},
|
|
9702
|
-
...transformSchema
|
|
9811
|
+
...transformSchema,
|
|
9812
|
+
...backgroundSchema,
|
|
9813
|
+
...borderSchema
|
|
9703
9814
|
};
|
|
9704
9815
|
var SolidInner = ({
|
|
9705
9816
|
color,
|
|
@@ -9943,7 +10054,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
9943
10054
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
9944
10055
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
9945
10056
|
const canvasHeight = Math.ceil(height * resolvedPixelDensity);
|
|
9946
|
-
const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
10057
|
+
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
9947
10058
|
const { isClientSideRendering, isRendering } = useRemotionEnvironment();
|
|
9948
10059
|
const canRetryMissingPaintRecord = !isRendering || isClientSideRendering;
|
|
9949
10060
|
const usesDirectLayoutCanvas = onPaint === undefined && onInit === undefined;
|
|
@@ -9997,7 +10108,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
9997
10108
|
if (!placeholderCanvas) {
|
|
9998
10109
|
throw new Error("Canvas not found");
|
|
9999
10110
|
}
|
|
10000
|
-
const handle =
|
|
10111
|
+
const handle = delayRender2("onPaint");
|
|
10001
10112
|
if (!initializedRef.current) {
|
|
10002
10113
|
const currentOnInit = onInitRef.current;
|
|
10003
10114
|
if (!currentOnInit) {
|
|
@@ -10098,6 +10209,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
10098
10209
|
chainState,
|
|
10099
10210
|
continueRender2,
|
|
10100
10211
|
cancelRender2,
|
|
10212
|
+
delayRender2,
|
|
10101
10213
|
resolvedPixelDensity,
|
|
10102
10214
|
canRetryMissingPaintRecord
|
|
10103
10215
|
]);
|
|
@@ -10149,14 +10261,14 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
10149
10261
|
if (!canvas) {
|
|
10150
10262
|
return;
|
|
10151
10263
|
}
|
|
10152
|
-
const handle =
|
|
10264
|
+
const handle = delayRender2("waiting for first paint after canvas resize");
|
|
10153
10265
|
canvas.addEventListener("paint", () => {
|
|
10154
10266
|
continueRender2(handle);
|
|
10155
10267
|
}, { once: true });
|
|
10156
10268
|
return () => {
|
|
10157
10269
|
continueRender2(handle);
|
|
10158
10270
|
};
|
|
10159
|
-
}, [width, height, continueRender2, canvasSizeKey]);
|
|
10271
|
+
}, [width, height, continueRender2, delayRender2, canvasSizeKey]);
|
|
10160
10272
|
const innerStyle = useMemo31(() => {
|
|
10161
10273
|
return {
|
|
10162
10274
|
width,
|
|
@@ -10252,7 +10364,9 @@ var htmlInCanvasSchema = {
|
|
|
10252
10364
|
description: "Pixel density",
|
|
10253
10365
|
hiddenFromList: false
|
|
10254
10366
|
},
|
|
10255
|
-
...transformSchema
|
|
10367
|
+
...transformSchema,
|
|
10368
|
+
...backgroundSchema,
|
|
10369
|
+
...borderSchema
|
|
10256
10370
|
};
|
|
10257
10371
|
var HtmlInCanvasWrapped = withInteractivitySchema({
|
|
10258
10372
|
Component: HtmlInCanvasInner,
|
|
@@ -10274,6 +10388,7 @@ function truncateSrcForLabel(src) {
|
|
|
10274
10388
|
}
|
|
10275
10389
|
var canvasImageSchema = {
|
|
10276
10390
|
...baseSchema,
|
|
10391
|
+
...premountSchema,
|
|
10277
10392
|
fit: {
|
|
10278
10393
|
type: "enum",
|
|
10279
10394
|
default: "fill",
|
|
@@ -10284,7 +10399,9 @@ var canvasImageSchema = {
|
|
|
10284
10399
|
cover: {}
|
|
10285
10400
|
}
|
|
10286
10401
|
},
|
|
10287
|
-
...transformSchema
|
|
10402
|
+
...transformSchema,
|
|
10403
|
+
...backgroundSchema,
|
|
10404
|
+
...borderSchema
|
|
10288
10405
|
};
|
|
10289
10406
|
var makeAbortError = () => {
|
|
10290
10407
|
if (typeof DOMException !== "undefined") {
|
|
@@ -10608,6 +10725,10 @@ var CanvasImageInner = forwardRef10(({
|
|
|
10608
10725
|
from,
|
|
10609
10726
|
trimBefore,
|
|
10610
10727
|
freeze,
|
|
10728
|
+
premountFor,
|
|
10729
|
+
postmountFor,
|
|
10730
|
+
styleWhilePremounted,
|
|
10731
|
+
styleWhilePostmounted,
|
|
10611
10732
|
hidden,
|
|
10612
10733
|
name,
|
|
10613
10734
|
showInTimeline,
|
|
@@ -10625,39 +10746,65 @@ var CanvasImageInner = forwardRef10(({
|
|
|
10625
10746
|
useImperativeHandle7(ref, () => {
|
|
10626
10747
|
return actualRef.current;
|
|
10627
10748
|
}, []);
|
|
10628
|
-
|
|
10629
|
-
|
|
10749
|
+
const {
|
|
10750
|
+
effectivePostmountFor,
|
|
10751
|
+
effectivePremountFor,
|
|
10752
|
+
freezeFrame,
|
|
10753
|
+
isPremountingOrPostmounting,
|
|
10754
|
+
postmountingActive,
|
|
10755
|
+
premountingActive,
|
|
10756
|
+
premountingStyle
|
|
10757
|
+
} = usePremounting({
|
|
10630
10758
|
from: from ?? 0,
|
|
10631
|
-
trimBefore,
|
|
10632
10759
|
durationInFrames: durationInFrames ?? Infinity,
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
children: /* @__PURE__ */ jsx26(
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10760
|
+
premountFor: premountFor ?? null,
|
|
10761
|
+
postmountFor: postmountFor ?? null,
|
|
10762
|
+
style: style ?? null,
|
|
10763
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
10764
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
10765
|
+
hideWhilePremounted: "display-none"
|
|
10766
|
+
});
|
|
10767
|
+
return /* @__PURE__ */ jsx26(Freeze, {
|
|
10768
|
+
frame: freezeFrame,
|
|
10769
|
+
active: isPremountingOrPostmounting,
|
|
10770
|
+
children: /* @__PURE__ */ jsx26(Sequence, {
|
|
10771
|
+
layout: "none",
|
|
10772
|
+
from: from ?? 0,
|
|
10773
|
+
trimBefore,
|
|
10774
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
10775
|
+
freeze,
|
|
10776
|
+
hidden,
|
|
10777
|
+
showInTimeline: showInTimeline ?? true,
|
|
10778
|
+
name: name ?? "<CanvasImage>",
|
|
10779
|
+
_remotionInternalDocumentationLink: _remotionInternalDocumentationLink ?? "https://www.remotion.dev/docs/canvasimage",
|
|
10650
10780
|
controls,
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10781
|
+
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
10782
|
+
_remotionInternalIsMedia: { type: "image", src },
|
|
10783
|
+
_remotionInternalStack: stack,
|
|
10784
|
+
_remotionInternalPremountDisplay: effectivePremountFor || null,
|
|
10785
|
+
_remotionInternalPostmountDisplay: effectivePostmountFor || null,
|
|
10786
|
+
_remotionInternalIsPremounting: premountingActive,
|
|
10787
|
+
_remotionInternalIsPostmounting: postmountingActive,
|
|
10788
|
+
outlineRef: outlineRef ?? actualRef,
|
|
10789
|
+
children: /* @__PURE__ */ jsx26(CanvasImageContent, {
|
|
10790
|
+
ref: actualRef,
|
|
10791
|
+
src,
|
|
10792
|
+
width,
|
|
10793
|
+
height,
|
|
10794
|
+
fit,
|
|
10795
|
+
effects,
|
|
10796
|
+
controls,
|
|
10797
|
+
className,
|
|
10798
|
+
style: premountingStyle ?? undefined,
|
|
10799
|
+
id,
|
|
10800
|
+
onError,
|
|
10801
|
+
pauseWhenLoading,
|
|
10802
|
+
maxRetries,
|
|
10803
|
+
delayRenderRetries,
|
|
10804
|
+
delayRenderTimeoutInMilliseconds,
|
|
10805
|
+
refForOutline: outlineRef ?? null,
|
|
10806
|
+
...canvasProps
|
|
10807
|
+
})
|
|
10661
10808
|
})
|
|
10662
10809
|
});
|
|
10663
10810
|
});
|
|
@@ -10874,6 +11021,11 @@ var NativeImgInner = ({
|
|
|
10874
11021
|
trimBefore,
|
|
10875
11022
|
durationInFrames,
|
|
10876
11023
|
freeze,
|
|
11024
|
+
premountFor,
|
|
11025
|
+
postmountFor,
|
|
11026
|
+
style,
|
|
11027
|
+
styleWhilePremounted,
|
|
11028
|
+
styleWhilePostmounted,
|
|
10877
11029
|
controls,
|
|
10878
11030
|
outlineRef: refForOutline,
|
|
10879
11031
|
...props2
|
|
@@ -10881,24 +11033,51 @@ var NativeImgInner = ({
|
|
|
10881
11033
|
if (!src) {
|
|
10882
11034
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
10883
11035
|
}
|
|
10884
|
-
|
|
10885
|
-
|
|
11036
|
+
const {
|
|
11037
|
+
effectivePostmountFor,
|
|
11038
|
+
effectivePremountFor,
|
|
11039
|
+
freezeFrame,
|
|
11040
|
+
isPremountingOrPostmounting,
|
|
11041
|
+
postmountingActive,
|
|
11042
|
+
premountingActive,
|
|
11043
|
+
premountingStyle
|
|
11044
|
+
} = usePremounting({
|
|
10886
11045
|
from: from ?? 0,
|
|
10887
|
-
trimBefore,
|
|
10888
11046
|
durationInFrames: durationInFrames ?? Infinity,
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
11047
|
+
premountFor: premountFor ?? null,
|
|
11048
|
+
postmountFor: postmountFor ?? null,
|
|
11049
|
+
style: style ?? null,
|
|
11050
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
11051
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
11052
|
+
hideWhilePremounted: "display-none"
|
|
11053
|
+
});
|
|
11054
|
+
return /* @__PURE__ */ jsx28(Freeze, {
|
|
11055
|
+
frame: freezeFrame,
|
|
11056
|
+
active: isPremountingOrPostmounting,
|
|
11057
|
+
children: /* @__PURE__ */ jsx28(Sequence, {
|
|
11058
|
+
layout: "none",
|
|
11059
|
+
from: from ?? 0,
|
|
11060
|
+
trimBefore,
|
|
11061
|
+
durationInFrames: durationInFrames ?? Infinity,
|
|
11062
|
+
freeze,
|
|
11063
|
+
_remotionInternalStack: stack,
|
|
11064
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
11065
|
+
_remotionInternalIsMedia: { type: "image", src },
|
|
11066
|
+
_remotionInternalPremountDisplay: effectivePremountFor || null,
|
|
11067
|
+
_remotionInternalPostmountDisplay: effectivePostmountFor || null,
|
|
11068
|
+
_remotionInternalIsPremounting: premountingActive,
|
|
11069
|
+
_remotionInternalIsPostmounting: postmountingActive,
|
|
11070
|
+
name: name ?? "<Img>",
|
|
11071
|
+
controls,
|
|
11072
|
+
showInTimeline: showInTimeline ?? true,
|
|
11073
|
+
hidden,
|
|
11074
|
+
outlineRef: refForOutline,
|
|
11075
|
+
children: /* @__PURE__ */ jsx28(ImgContent, {
|
|
11076
|
+
src,
|
|
11077
|
+
refForOutline,
|
|
11078
|
+
style: premountingStyle ?? undefined,
|
|
11079
|
+
...props2
|
|
11080
|
+
})
|
|
10902
11081
|
})
|
|
10903
11082
|
});
|
|
10904
11083
|
};
|
|
@@ -10911,7 +11090,10 @@ var imgSchema = {
|
|
|
10911
11090
|
keyframable: false
|
|
10912
11091
|
},
|
|
10913
11092
|
...baseSchema,
|
|
10914
|
-
...
|
|
11093
|
+
...premountSchema,
|
|
11094
|
+
...transformSchema,
|
|
11095
|
+
...backgroundSchema,
|
|
11096
|
+
...borderSchema
|
|
10915
11097
|
};
|
|
10916
11098
|
var imgCanvasFallbackIncompatibleProps = new Set([
|
|
10917
11099
|
"alt",
|
|
@@ -10967,6 +11149,10 @@ var ImgInner = ({
|
|
|
10967
11149
|
trimBefore,
|
|
10968
11150
|
durationInFrames,
|
|
10969
11151
|
freeze,
|
|
11152
|
+
premountFor,
|
|
11153
|
+
postmountFor,
|
|
11154
|
+
styleWhilePremounted,
|
|
11155
|
+
styleWhilePostmounted,
|
|
10970
11156
|
controls,
|
|
10971
11157
|
width,
|
|
10972
11158
|
height,
|
|
@@ -10993,6 +11179,10 @@ var ImgInner = ({
|
|
|
10993
11179
|
trimBefore,
|
|
10994
11180
|
durationInFrames,
|
|
10995
11181
|
freeze,
|
|
11182
|
+
premountFor,
|
|
11183
|
+
postmountFor,
|
|
11184
|
+
styleWhilePremounted,
|
|
11185
|
+
styleWhilePostmounted,
|
|
10996
11186
|
controls,
|
|
10997
11187
|
width,
|
|
10998
11188
|
height,
|
|
@@ -11036,6 +11226,10 @@ var ImgInner = ({
|
|
|
11036
11226
|
trimBefore,
|
|
11037
11227
|
durationInFrames,
|
|
11038
11228
|
freeze,
|
|
11229
|
+
premountFor,
|
|
11230
|
+
postmountFor,
|
|
11231
|
+
styleWhilePremounted,
|
|
11232
|
+
styleWhilePostmounted,
|
|
11039
11233
|
hidden,
|
|
11040
11234
|
name: name ?? "<Img>",
|
|
11041
11235
|
showInTimeline,
|
|
@@ -11074,7 +11268,20 @@ var interactiveElementSchema = {
|
|
|
11074
11268
|
...baseSchema,
|
|
11075
11269
|
...transformSchema
|
|
11076
11270
|
};
|
|
11271
|
+
var interactiveBackgroundElementSchema = {
|
|
11272
|
+
...interactiveElementSchema,
|
|
11273
|
+
...backgroundSchema
|
|
11274
|
+
};
|
|
11275
|
+
var interactiveBorderElementSchema = {
|
|
11276
|
+
...interactiveBackgroundElementSchema,
|
|
11277
|
+
...borderSchema
|
|
11278
|
+
};
|
|
11077
11279
|
var interactiveTextElementSchema = {
|
|
11280
|
+
...interactiveBorderElementSchema,
|
|
11281
|
+
...textSchema,
|
|
11282
|
+
...textContentSchema
|
|
11283
|
+
};
|
|
11284
|
+
var interactiveSvgTextElementSchema = {
|
|
11078
11285
|
...interactiveElementSchema,
|
|
11079
11286
|
...textSchema,
|
|
11080
11287
|
...textContentSchema
|
|
@@ -11153,6 +11360,8 @@ var Interactive = {
|
|
|
11153
11360
|
baseSchema,
|
|
11154
11361
|
transformSchema,
|
|
11155
11362
|
textSchema,
|
|
11363
|
+
backgroundSchema,
|
|
11364
|
+
borderSchema,
|
|
11156
11365
|
premountSchema,
|
|
11157
11366
|
sequenceSchema,
|
|
11158
11367
|
withSchema,
|
|
@@ -11189,10 +11398,39 @@ var Interactive = {
|
|
|
11189
11398
|
Small: makeInteractiveTextElement("small", "<Interactive.Small>"),
|
|
11190
11399
|
Span: makeInteractiveTextElement("span", "<Interactive.Span>"),
|
|
11191
11400
|
Strong: makeInteractiveTextElement("strong", "<Interactive.Strong>"),
|
|
11192
|
-
Svg:
|
|
11193
|
-
Text:
|
|
11401
|
+
Svg: makeInteractiveElement("svg", "<Interactive.Svg>", interactiveBorderElementSchema),
|
|
11402
|
+
Text: makeInteractiveElement("text", "<Interactive.Text>", interactiveSvgTextElementSchema),
|
|
11194
11403
|
Ul: makeInteractiveTextElement("ul", "<Interactive.Ul>")
|
|
11195
11404
|
};
|
|
11405
|
+
var getAnimatedImageDurationInSeconds = async ({
|
|
11406
|
+
resolvedSrc,
|
|
11407
|
+
signal,
|
|
11408
|
+
requestInit,
|
|
11409
|
+
contentType
|
|
11410
|
+
}) => {
|
|
11411
|
+
const { decoder, selectedTrack } = await createImageDecoder({
|
|
11412
|
+
resolvedSrc,
|
|
11413
|
+
signal,
|
|
11414
|
+
requestInit,
|
|
11415
|
+
contentType
|
|
11416
|
+
});
|
|
11417
|
+
try {
|
|
11418
|
+
const { image } = await decoder.decode({
|
|
11419
|
+
frameIndex: selectedTrack.frameCount - 1,
|
|
11420
|
+
completeFramesOnly: true
|
|
11421
|
+
});
|
|
11422
|
+
try {
|
|
11423
|
+
if (image.duration === null) {
|
|
11424
|
+
throw new Error("Could not determine animated image duration");
|
|
11425
|
+
}
|
|
11426
|
+
return (image.timestamp + image.duration) / 1e6;
|
|
11427
|
+
} finally {
|
|
11428
|
+
image.close();
|
|
11429
|
+
}
|
|
11430
|
+
} finally {
|
|
11431
|
+
decoder.close();
|
|
11432
|
+
}
|
|
11433
|
+
};
|
|
11196
11434
|
var compositionsRef = React31.createRef();
|
|
11197
11435
|
var CompositionManagerProvider = ({
|
|
11198
11436
|
children,
|
|
@@ -12420,6 +12658,7 @@ var Internals = {
|
|
|
12420
12658
|
useAbsoluteTimelinePosition,
|
|
12421
12659
|
evaluateVolume,
|
|
12422
12660
|
getAbsoluteSrc,
|
|
12661
|
+
getAnimatedImageDurationInSeconds,
|
|
12423
12662
|
getAssetDisplayName,
|
|
12424
12663
|
Timeline: exports_timeline_position_state,
|
|
12425
12664
|
validateMediaTrimProps,
|
|
@@ -12444,7 +12683,6 @@ var Internals = {
|
|
|
12444
12683
|
textSchema,
|
|
12445
12684
|
transformSchema,
|
|
12446
12685
|
premountSchema,
|
|
12447
|
-
premountStyleSchema,
|
|
12448
12686
|
flattenActiveSchema,
|
|
12449
12687
|
getFlatSchemaWithAllKeys,
|
|
12450
12688
|
RemotionRootContexts,
|
|
@@ -12583,6 +12821,7 @@ var seriesSequenceSchema = {
|
|
|
12583
12821
|
hidden: Interactive.sequenceSchema.hidden,
|
|
12584
12822
|
showInTimeline: Interactive.sequenceSchema.showInTimeline,
|
|
12585
12823
|
freeze: Interactive.baseSchema.freeze,
|
|
12824
|
+
trimBefore: Interactive.sequenceSchema.trimBefore,
|
|
12586
12825
|
layout: Interactive.sequenceSchema.layout
|
|
12587
12826
|
};
|
|
12588
12827
|
var SeriesSequenceInner = forwardRef14(({
|
|
@@ -18204,7 +18443,9 @@ var makeShapeSchema = (shapeFields) => {
|
|
|
18204
18443
|
defaultValue: "#0b84ff",
|
|
18205
18444
|
description: "Fill"
|
|
18206
18445
|
}),
|
|
18207
|
-
...Internals.transformSchema
|
|
18446
|
+
...Internals.transformSchema,
|
|
18447
|
+
...Interactive.backgroundSchema,
|
|
18448
|
+
...Interactive.borderSchema
|
|
18208
18449
|
};
|
|
18209
18450
|
};
|
|
18210
18451
|
var arrowSchema = makeShapeSchema({
|
|
@@ -30960,6 +31201,45 @@ var transformSchema2 = {
|
|
|
30960
31201
|
hiddenFromList: false
|
|
30961
31202
|
}
|
|
30962
31203
|
};
|
|
31204
|
+
var borderSchema2 = {
|
|
31205
|
+
"style.borderWidth": {
|
|
31206
|
+
type: "number",
|
|
31207
|
+
default: undefined,
|
|
31208
|
+
min: 0,
|
|
31209
|
+
step: 1,
|
|
31210
|
+
description: "Border width",
|
|
31211
|
+
hiddenFromList: false
|
|
31212
|
+
},
|
|
31213
|
+
"style.borderStyle": {
|
|
31214
|
+
type: "enum",
|
|
31215
|
+
default: "none",
|
|
31216
|
+
description: "Border style",
|
|
31217
|
+
variants: {
|
|
31218
|
+
none: {},
|
|
31219
|
+
hidden: {},
|
|
31220
|
+
solid: {},
|
|
31221
|
+
dashed: {},
|
|
31222
|
+
dotted: {},
|
|
31223
|
+
double: {},
|
|
31224
|
+
groove: {},
|
|
31225
|
+
ridge: {},
|
|
31226
|
+
inset: {},
|
|
31227
|
+
outset: {}
|
|
31228
|
+
}
|
|
31229
|
+
},
|
|
31230
|
+
"style.borderColor": {
|
|
31231
|
+
type: "color",
|
|
31232
|
+
default: undefined,
|
|
31233
|
+
description: "Border color"
|
|
31234
|
+
}
|
|
31235
|
+
};
|
|
31236
|
+
var backgroundSchema2 = {
|
|
31237
|
+
"style.backgroundColor": {
|
|
31238
|
+
type: "color",
|
|
31239
|
+
default: "transparent",
|
|
31240
|
+
description: "Color"
|
|
31241
|
+
}
|
|
31242
|
+
};
|
|
30963
31243
|
var premountSchema2 = {
|
|
30964
31244
|
premountFor: {
|
|
30965
31245
|
type: "number",
|
|
@@ -30979,20 +31259,13 @@ var premountSchema2 = {
|
|
|
30979
31259
|
keyframable: false
|
|
30980
31260
|
}
|
|
30981
31261
|
};
|
|
30982
|
-
var premountStyleSchema2 = {
|
|
30983
|
-
styleWhilePremounted: {
|
|
30984
|
-
type: "hidden"
|
|
30985
|
-
},
|
|
30986
|
-
styleWhilePostmounted: {
|
|
30987
|
-
type: "hidden"
|
|
30988
|
-
}
|
|
30989
|
-
};
|
|
30990
31262
|
var sequencePremountSchema2 = {
|
|
30991
|
-
...premountSchema2
|
|
30992
|
-
...premountStyleSchema2
|
|
31263
|
+
...premountSchema2
|
|
30993
31264
|
};
|
|
30994
31265
|
var sequenceStyleSchema2 = {
|
|
30995
31266
|
...transformSchema2,
|
|
31267
|
+
...backgroundSchema2,
|
|
31268
|
+
...borderSchema2,
|
|
30996
31269
|
...sequencePremountSchema2
|
|
30997
31270
|
};
|
|
30998
31271
|
var hiddenField2 = {
|
|
@@ -36552,6 +36825,10 @@ async function* makeLoopingIterator({
|
|
|
36552
36825
|
passStartInSeconds = loopStartInSeconds;
|
|
36553
36826
|
}
|
|
36554
36827
|
}
|
|
36828
|
+
var MINIMUM_AUDIO_BUFFERING_TIME_SECONDS = 0.1;
|
|
36829
|
+
var hasEnoughAudioToStartPlayback = (bufferedDuration) => {
|
|
36830
|
+
return bufferedDuration >= MINIMUM_AUDIO_BUFFERING_TIME_SECONDS;
|
|
36831
|
+
};
|
|
36555
36832
|
var anchorToContinuousTime = ({
|
|
36556
36833
|
anchor,
|
|
36557
36834
|
unloopedTimeInSeconds,
|
|
@@ -36734,7 +37011,7 @@ var audioIteratorManager = ({
|
|
|
36734
37011
|
onDone();
|
|
36735
37012
|
return;
|
|
36736
37013
|
}
|
|
36737
|
-
onScheduled(result.value.
|
|
37014
|
+
onScheduled(result.value.sourceDurationInSeconds);
|
|
36738
37015
|
notifyNodeScheduled();
|
|
36739
37016
|
onAudioChunk({
|
|
36740
37017
|
buffer: result.value,
|
|
@@ -36816,24 +37093,32 @@ var audioIteratorManager = ({
|
|
|
36816
37093
|
});
|
|
36817
37094
|
audioIteratorsCreated++;
|
|
36818
37095
|
audioBufferIterator = iterator;
|
|
36819
|
-
let
|
|
37096
|
+
let bufferedDuration = 0;
|
|
37097
|
+
let hasUnblockedPlayback = false;
|
|
37098
|
+
const unblockPlayback = () => {
|
|
37099
|
+
if (hasUnblockedPlayback) {
|
|
37100
|
+
return;
|
|
37101
|
+
}
|
|
37102
|
+
hasUnblockedPlayback = true;
|
|
37103
|
+
delayHandle.unblock();
|
|
37104
|
+
};
|
|
36820
37105
|
proceedScheduling({
|
|
36821
37106
|
iterator,
|
|
36822
37107
|
nonce,
|
|
36823
37108
|
getTargetTime,
|
|
36824
37109
|
playbackRate,
|
|
36825
37110
|
scheduleAudioNode,
|
|
36826
|
-
onScheduled: () => {
|
|
36827
|
-
|
|
36828
|
-
if (
|
|
36829
|
-
|
|
37111
|
+
onScheduled: (sourceDurationInSeconds) => {
|
|
37112
|
+
bufferedDuration += sourceDurationInSeconds;
|
|
37113
|
+
if (hasEnoughAudioToStartPlayback(bufferedDuration)) {
|
|
37114
|
+
unblockPlayback();
|
|
36830
37115
|
}
|
|
36831
37116
|
},
|
|
36832
37117
|
onDestroyed: () => {
|
|
36833
|
-
|
|
37118
|
+
unblockPlayback();
|
|
36834
37119
|
},
|
|
36835
37120
|
onDone: () => {
|
|
36836
|
-
|
|
37121
|
+
unblockPlayback();
|
|
36837
37122
|
},
|
|
36838
37123
|
logLevel,
|
|
36839
37124
|
currentTime: sharedAudioContext.audioContext.currentTime,
|
|
@@ -40703,7 +40988,7 @@ var AudioForRendering2 = ({
|
|
|
40703
40988
|
throw new TypeError("No `src` was passed to <Audio>.");
|
|
40704
40989
|
}
|
|
40705
40990
|
const { fps } = videoConfig;
|
|
40706
|
-
const { delayRender
|
|
40991
|
+
const { delayRender, continueRender } = useDelayRender();
|
|
40707
40992
|
const [replaceWithHtml5Audio, setReplaceWithHtml5Audio] = useState210(false);
|
|
40708
40993
|
const [initialRequestInit] = useState210(requestInit);
|
|
40709
40994
|
const sequenceContext = useContext312(Internals.SequenceContext);
|
|
@@ -40733,7 +41018,7 @@ var AudioForRendering2 = ({
|
|
|
40733
41018
|
if (replaceWithHtml5Audio) {
|
|
40734
41019
|
return;
|
|
40735
41020
|
}
|
|
40736
|
-
const newHandle =
|
|
41021
|
+
const newHandle = delayRender(`Extracting audio for frame ${frame}`, {
|
|
40737
41022
|
retries: delayRenderRetries ?? undefined,
|
|
40738
41023
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
40739
41024
|
});
|
|
@@ -40825,7 +41110,7 @@ var AudioForRendering2 = ({
|
|
|
40825
41110
|
}, [
|
|
40826
41111
|
absoluteFrame,
|
|
40827
41112
|
continueRender,
|
|
40828
|
-
|
|
41113
|
+
delayRender,
|
|
40829
41114
|
delayRenderRetries,
|
|
40830
41115
|
delayRenderTimeoutInMilliseconds,
|
|
40831
41116
|
disallowFallbackToHtml5Audio,
|
|
@@ -41532,7 +41817,7 @@ var VideoForRendering2 = ({
|
|
|
41532
41817
|
sequenceContext?.durationInFrames
|
|
41533
41818
|
]);
|
|
41534
41819
|
const environment = useRemotionEnvironment();
|
|
41535
|
-
const { delayRender
|
|
41820
|
+
const { delayRender, continueRender, cancelRender: cancelRender3 } = useDelayRender();
|
|
41536
41821
|
const canvasRef = useRef312(null);
|
|
41537
41822
|
const [replaceWithOffthreadVideo, setReplaceWithOffthreadVideo] = useState53(false);
|
|
41538
41823
|
const [initialRequestInit] = useState53(requestInit);
|
|
@@ -41556,7 +41841,7 @@ var VideoForRendering2 = ({
|
|
|
41556
41841
|
}
|
|
41557
41842
|
const timestamp = frame / fps;
|
|
41558
41843
|
const durationInSeconds = 1 / fps;
|
|
41559
|
-
const newHandle =
|
|
41844
|
+
const newHandle = delayRender(`Extracting frame at time ${timestamp} from ${src}`, {
|
|
41560
41845
|
retries: delayRenderRetries ?? undefined,
|
|
41561
41846
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
41562
41847
|
});
|
|
@@ -41708,7 +41993,7 @@ var VideoForRendering2 = ({
|
|
|
41708
41993
|
}, [
|
|
41709
41994
|
absoluteFrame,
|
|
41710
41995
|
continueRender,
|
|
41711
|
-
|
|
41996
|
+
delayRender,
|
|
41712
41997
|
delayRenderRetries,
|
|
41713
41998
|
delayRenderTimeoutInMilliseconds,
|
|
41714
41999
|
environment.isClientSideRendering,
|
|
@@ -41827,7 +42112,6 @@ var videoSchema = {
|
|
|
41827
42112
|
},
|
|
41828
42113
|
...Internals.baseSchema,
|
|
41829
42114
|
...Internals.premountSchema,
|
|
41830
|
-
...Internals.premountStyleSchema,
|
|
41831
42115
|
volume: {
|
|
41832
42116
|
type: "number",
|
|
41833
42117
|
min: 0,
|
|
@@ -41848,7 +42132,9 @@ var videoSchema = {
|
|
|
41848
42132
|
},
|
|
41849
42133
|
muted: { type: "boolean", default: false, description: "Muted" },
|
|
41850
42134
|
loop: { type: "boolean", default: false, description: "Loop" },
|
|
41851
|
-
...Internals.transformSchema
|
|
42135
|
+
...Internals.transformSchema,
|
|
42136
|
+
...Interactive.backgroundSchema,
|
|
42137
|
+
...Interactive.borderSchema
|
|
41852
42138
|
};
|
|
41853
42139
|
var InnerVideo = ({
|
|
41854
42140
|
src,
|
|
@@ -42601,8 +42887,8 @@ var Lottie = ({
|
|
|
42601
42887
|
const containerRef = useRef53(null);
|
|
42602
42888
|
const onAnimationLoadedRef = useRef53(onAnimationLoaded);
|
|
42603
42889
|
onAnimationLoadedRef.current = onAnimationLoaded;
|
|
42604
|
-
const { delayRender
|
|
42605
|
-
const [handle] = useState44(() =>
|
|
42890
|
+
const { delayRender, continueRender } = useDelayRender();
|
|
42891
|
+
const [handle] = useState44(() => delayRender("Waiting for Lottie animation to load"));
|
|
42606
42892
|
useEffect45(() => {
|
|
42607
42893
|
return () => {
|
|
42608
42894
|
continueRender(handle);
|
|
@@ -42683,13 +42969,13 @@ var Lottie = ({
|
|
|
42683
42969
|
if (currentHref && currentHref === img.href.baseVal) {
|
|
42684
42970
|
return;
|
|
42685
42971
|
}
|
|
42686
|
-
const imgHandle =
|
|
42972
|
+
const imgHandle = delayRender(`Waiting for lottie image with src="${img.href.baseVal}" to load`);
|
|
42687
42973
|
img.addEventListener("load", () => {
|
|
42688
42974
|
continueRender(imgHandle);
|
|
42689
42975
|
}, { once: true });
|
|
42690
42976
|
img.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", img.href.baseVal);
|
|
42691
42977
|
});
|
|
42692
|
-
}, [direction, frame, loop, playbackRate,
|
|
42978
|
+
}, [direction, frame, loop, playbackRate, delayRender, continueRender]);
|
|
42693
42979
|
return /* @__PURE__ */ jsx70("div", {
|
|
42694
42980
|
ref: containerRef,
|
|
42695
42981
|
className: className2,
|
|
@@ -42704,7 +42990,7 @@ var DisplayedEmoji = ({ emoji }) => {
|
|
|
42704
42990
|
const [data, setData] = useState46(null);
|
|
42705
42991
|
const { durationInFrames, fps } = useVideoConfig();
|
|
42706
42992
|
const [browser, setBrowser] = useState46(typeof document !== "undefined");
|
|
42707
|
-
const { delayRender
|
|
42993
|
+
const { delayRender, continueRender, cancelRender: cancelRender2 } = useDelayRender();
|
|
42708
42994
|
const { isRendering } = useRemotionEnvironment();
|
|
42709
42995
|
const src = useMemo60(() => {
|
|
42710
42996
|
if (emoji === "melting") {
|
|
@@ -42718,7 +43004,7 @@ var DisplayedEmoji = ({ emoji }) => {
|
|
|
42718
43004
|
}
|
|
42719
43005
|
throw new Error("Unknown emoji");
|
|
42720
43006
|
}, [emoji]);
|
|
42721
|
-
const [handle] = useState46(() =>
|
|
43007
|
+
const [handle] = useState46(() => delayRender("Loading emojis!"));
|
|
42722
43008
|
useEffect46(() => {
|
|
42723
43009
|
fetch(src).then((res) => res.json()).then((json) => {
|
|
42724
43010
|
setData({
|
|
@@ -43451,7 +43737,7 @@ import {
|
|
|
43451
43737
|
import { BufferTarget, StreamTarget } from "mediabunny";
|
|
43452
43738
|
|
|
43453
43739
|
// ../core/dist/esm/version.mjs
|
|
43454
|
-
var VERSION2 = "4.0.
|
|
43740
|
+
var VERSION2 = "4.0.497";
|
|
43455
43741
|
|
|
43456
43742
|
// ../web-renderer/dist/esm/index.mjs
|
|
43457
43743
|
import { AudioSample, VideoSample } from "mediabunny";
|
|
@@ -44344,6 +44630,7 @@ function createScaffold({
|
|
|
44344
44630
|
wrapper.style.inset = "0";
|
|
44345
44631
|
wrapper.style.overflow = "hidden";
|
|
44346
44632
|
wrapper.style.visibility = "hidden";
|
|
44633
|
+
wrapper.style.filter = "opacity(0)";
|
|
44347
44634
|
wrapper.style.pointerEvents = "none";
|
|
44348
44635
|
wrapper.style.zIndex = "-9999";
|
|
44349
44636
|
const div = document.createElement("div");
|
|
@@ -44361,6 +44648,14 @@ function createScaffold({
|
|
|
44361
44648
|
wrapper.appendChild(div);
|
|
44362
44649
|
document.body.appendChild(wrapper);
|
|
44363
44650
|
const htmlInCanvasContext = useHtmlInCanvas ? setupHtmlInCanvas({ wrapper, div, width: width2, height: height2 }) : null;
|
|
44651
|
+
const updateFallbackScaffoldVisibility = () => {
|
|
44652
|
+
if (htmlInCanvasContext) {
|
|
44653
|
+
return;
|
|
44654
|
+
}
|
|
44655
|
+
div.style.visibility = containsLayoutSubtreeCanvas(div) ? "visible" : "";
|
|
44656
|
+
};
|
|
44657
|
+
const fallbackScaffoldObserver = htmlInCanvasContext ? null : new MutationObserver(updateFallbackScaffoldVisibility);
|
|
44658
|
+
fallbackScaffoldObserver?.observe(div, { childList: true, subtree: true });
|
|
44364
44659
|
const errorHolder = { error: null };
|
|
44365
44660
|
const root = ReactDOM6.createRoot(div, {
|
|
44366
44661
|
onUncaughtError: (err, errorInfo) => {
|
|
@@ -44451,12 +44746,14 @@ function createScaffold({
|
|
|
44451
44746
|
})
|
|
44452
44747
|
}));
|
|
44453
44748
|
});
|
|
44749
|
+
updateFallbackScaffoldVisibility();
|
|
44454
44750
|
return {
|
|
44455
44751
|
delayRenderScope,
|
|
44456
44752
|
div,
|
|
44457
44753
|
errorHolder,
|
|
44458
44754
|
htmlInCanvasContext,
|
|
44459
44755
|
[Symbol.dispose]: () => {
|
|
44756
|
+
fallbackScaffoldObserver?.disconnect();
|
|
44460
44757
|
root.unmount();
|
|
44461
44758
|
if (htmlInCanvasContext) {
|
|
44462
44759
|
teardownHtmlInCanvas({ htmlInCanvasContext, wrapper, div });
|
|
@@ -45073,6 +45370,67 @@ var hasScaleCssValue = (style2) => {
|
|
|
45073
45370
|
var hasAnyTransformCssValue = (style2) => {
|
|
45074
45371
|
return hasTransformCssValue(style2) || hasRotateCssValue(style2) || hasScaleCssValue(style2);
|
|
45075
45372
|
};
|
|
45373
|
+
var parseScaleComponent = (component) => {
|
|
45374
|
+
if (component.endsWith("%")) {
|
|
45375
|
+
return Number(component.slice(0, -1)) / 100;
|
|
45376
|
+
}
|
|
45377
|
+
return Number(component);
|
|
45378
|
+
};
|
|
45379
|
+
var parseScale = (transform) => {
|
|
45380
|
+
const match = /^scale\((.*)\)$/.exec(transform);
|
|
45381
|
+
if (!match) {
|
|
45382
|
+
return null;
|
|
45383
|
+
}
|
|
45384
|
+
const scaleValue = match[1].trim();
|
|
45385
|
+
if (scaleValue === "") {
|
|
45386
|
+
return null;
|
|
45387
|
+
}
|
|
45388
|
+
const components = scaleValue.split(/\s+/).map(parseScaleComponent);
|
|
45389
|
+
if (components.length < 1 || components.length > 3 || components.some((component) => !Number.isFinite(component))) {
|
|
45390
|
+
return null;
|
|
45391
|
+
}
|
|
45392
|
+
return {
|
|
45393
|
+
x: components[0],
|
|
45394
|
+
y: components[1] ?? components[0],
|
|
45395
|
+
z: components[2] ?? 1
|
|
45396
|
+
};
|
|
45397
|
+
};
|
|
45398
|
+
var parseAxisRotate = (transform) => {
|
|
45399
|
+
const match = /^rotate\((.*)\)$/.exec(transform);
|
|
45400
|
+
if (!match) {
|
|
45401
|
+
return null;
|
|
45402
|
+
}
|
|
45403
|
+
const rotateValue = match[1].trim();
|
|
45404
|
+
const keywordAxis = /^(x|y|z)\s+(.+)$/i.exec(rotateValue);
|
|
45405
|
+
if (keywordAxis) {
|
|
45406
|
+
const axisKeyword = keywordAxis[1].toLowerCase();
|
|
45407
|
+
const angle = keywordAxis[2];
|
|
45408
|
+
const rotateFunction = axisKeyword === "x" ? "rotateX" : axisKeyword === "y" ? "rotateY" : "rotate";
|
|
45409
|
+
return `${rotateFunction}(${angle})`;
|
|
45410
|
+
}
|
|
45411
|
+
const vectorAxis = /^(\S+)\s+(\S+)\s+(\S+)\s+(.+)$/.exec(rotateValue);
|
|
45412
|
+
if (!vectorAxis) {
|
|
45413
|
+
return null;
|
|
45414
|
+
}
|
|
45415
|
+
const axisVector = vectorAxis.slice(1, 4).map(Number);
|
|
45416
|
+
if (axisVector.some((component) => !Number.isFinite(component))) {
|
|
45417
|
+
return null;
|
|
45418
|
+
}
|
|
45419
|
+
return `rotate3d(${axisVector.join(", ")}, ${vectorAxis[4]})`;
|
|
45420
|
+
};
|
|
45421
|
+
var makeDOMMatrix = (transform) => {
|
|
45422
|
+
if (transform) {
|
|
45423
|
+
const scale = parseScale(transform);
|
|
45424
|
+
if (scale) {
|
|
45425
|
+
return new DOMMatrix().scale(scale.x, scale.y, scale.z);
|
|
45426
|
+
}
|
|
45427
|
+
const axisRotate = parseAxisRotate(transform);
|
|
45428
|
+
if (axisRotate) {
|
|
45429
|
+
return new DOMMatrix(axisRotate);
|
|
45430
|
+
}
|
|
45431
|
+
}
|
|
45432
|
+
return new DOMMatrix(transform);
|
|
45433
|
+
};
|
|
45076
45434
|
var isValidColor = (color) => {
|
|
45077
45435
|
try {
|
|
45078
45436
|
const result = NoReactInternals.processColor(color);
|
|
@@ -45470,15 +45828,15 @@ var calculateTransforms = ({
|
|
|
45470
45828
|
const hasApplicableTransformCssValue = canApplyCssTransforms({ computedStyle: transformStyle, element: parent }) && hasAnyTransformCssValue(transformStyle);
|
|
45471
45829
|
if (hasApplicableTransformCssValue || parent === element) {
|
|
45472
45830
|
const toParse = hasApplicableTransformCssValue && hasTransformCssValue(transformStyle) ? transformStyle.transform : undefined;
|
|
45473
|
-
const matrix =
|
|
45831
|
+
const matrix = makeDOMMatrix(toParse);
|
|
45474
45832
|
const resetTransforms = makeTransformResetter(parent);
|
|
45475
45833
|
const { scale, rotate: rotate2 } = parent.style;
|
|
45476
45834
|
const additionalMatrices = [];
|
|
45477
45835
|
if (hasApplicableTransformCssValue && rotate2 !== "" && rotate2 !== "none") {
|
|
45478
|
-
additionalMatrices.push(
|
|
45836
|
+
additionalMatrices.push(makeDOMMatrix(`rotate(${rotate2})`));
|
|
45479
45837
|
}
|
|
45480
45838
|
if (hasApplicableTransformCssValue && scale !== "" && scale !== "none") {
|
|
45481
|
-
additionalMatrices.push(
|
|
45839
|
+
additionalMatrices.push(makeDOMMatrix(`scale(${scale})`));
|
|
45482
45840
|
}
|
|
45483
45841
|
additionalMatrices.push(matrix);
|
|
45484
45842
|
const cleanup = resetTransforms(hasApplicableTransformCssValue);
|