@remotion/promo-pages 4.0.485 → 4.0.486
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 +328 -254
- package/dist/components/homepage/CommunityStatsItems.js +2 -2
- package/dist/components/homepage/GetStartedStrip.js +1 -1
- package/dist/components/homepage/GitHubButton.js +1 -1
- package/dist/components/homepage/Pricing.d.ts +3 -1
- package/dist/components/homepage/Pricing.js +6 -2
- package/dist/components/prompts/PromptsGallery.js +1 -1
- package/dist/components/prompts/PromptsSubmit.js +3 -169
- package/dist/design.js +166 -131
- package/dist/experts.js +73 -38
- package/dist/homepage/Pricing.js +175 -134
- package/dist/prompts/PromptsGallery.js +170 -135
- package/dist/prompts/PromptsShow.js +168 -133
- package/dist/prompts/PromptsSubmit.js +166 -131
- package/dist/team.js +166 -131
- package/dist/template-modal-content.js +175 -140
- package/dist/templates.js +166 -131
- package/package.json +13 -13
package/dist/Homepage.js
CHANGED
|
@@ -1091,8 +1091,8 @@ import {
|
|
|
1091
1091
|
forwardRef as forwardRef10,
|
|
1092
1092
|
useCallback as useCallback17,
|
|
1093
1093
|
useContext as useContext32,
|
|
1094
|
-
useEffect as useEffect17,
|
|
1095
1094
|
useImperativeHandle as useImperativeHandle7,
|
|
1095
|
+
useLayoutEffect as useLayoutEffect10,
|
|
1096
1096
|
useMemo as useMemo31,
|
|
1097
1097
|
useRef as useRef23,
|
|
1098
1098
|
useState as useState16
|
|
@@ -1100,7 +1100,7 @@ import {
|
|
|
1100
1100
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1101
1101
|
import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
|
|
1102
1102
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1103
|
-
import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as
|
|
1103
|
+
import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
|
|
1104
1104
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1105
1105
|
import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
1106
1106
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -1126,8 +1126,8 @@ import { useCallback as useCallback24 } from "react";
|
|
|
1126
1126
|
import {
|
|
1127
1127
|
useCallback as useCallback22,
|
|
1128
1128
|
useContext as useContext36,
|
|
1129
|
-
useEffect as
|
|
1130
|
-
useLayoutEffect as
|
|
1129
|
+
useEffect as useEffect17,
|
|
1130
|
+
useLayoutEffect as useLayoutEffect12,
|
|
1131
1131
|
useMemo as useMemo35,
|
|
1132
1132
|
useState as useState19
|
|
1133
1133
|
} from "react";
|
|
@@ -1136,13 +1136,13 @@ import React37, {
|
|
|
1136
1136
|
forwardRef as forwardRef13,
|
|
1137
1137
|
useCallback as useCallback23,
|
|
1138
1138
|
useContext as useContext37,
|
|
1139
|
-
useEffect as
|
|
1139
|
+
useEffect as useEffect19,
|
|
1140
1140
|
useImperativeHandle as useImperativeHandle9,
|
|
1141
1141
|
useMemo as useMemo36,
|
|
1142
1142
|
useRef as useRef27,
|
|
1143
1143
|
useState as useState20
|
|
1144
1144
|
} from "react";
|
|
1145
|
-
import { useEffect as
|
|
1145
|
+
import { useEffect as useEffect18 } from "react";
|
|
1146
1146
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1147
1147
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1148
1148
|
import React39, { useMemo as useMemo37 } from "react";
|
|
@@ -1159,9 +1159,9 @@ import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as
|
|
|
1159
1159
|
import {
|
|
1160
1160
|
forwardRef as forwardRef15,
|
|
1161
1161
|
useContext as useContext38,
|
|
1162
|
-
useEffect as
|
|
1162
|
+
useEffect as useEffect20,
|
|
1163
1163
|
useImperativeHandle as useImperativeHandle10,
|
|
1164
|
-
useLayoutEffect as
|
|
1164
|
+
useLayoutEffect as useLayoutEffect13,
|
|
1165
1165
|
useMemo as useMemo39,
|
|
1166
1166
|
useRef as useRef28
|
|
1167
1167
|
} from "react";
|
|
@@ -2335,7 +2335,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
2335
2335
|
var addSequenceStackTraces = (component) => {
|
|
2336
2336
|
componentsToAddStacksTo.push(component);
|
|
2337
2337
|
};
|
|
2338
|
-
var VERSION = "4.0.
|
|
2338
|
+
var VERSION = "4.0.486";
|
|
2339
2339
|
var checkMultipleRemotionVersions = () => {
|
|
2340
2340
|
if (typeof globalThis === "undefined") {
|
|
2341
2341
|
return;
|
|
@@ -2741,6 +2741,12 @@ var textSchema = {
|
|
|
2741
2741
|
default: undefined,
|
|
2742
2742
|
description: "Color"
|
|
2743
2743
|
},
|
|
2744
|
+
"style.fontFamily": {
|
|
2745
|
+
type: "font-family",
|
|
2746
|
+
default: undefined,
|
|
2747
|
+
description: "Font family",
|
|
2748
|
+
keyframable: false
|
|
2749
|
+
},
|
|
2744
2750
|
"style.fontSize": {
|
|
2745
2751
|
type: "number",
|
|
2746
2752
|
default: undefined,
|
|
@@ -10071,6 +10077,18 @@ var loadImage = ({
|
|
|
10071
10077
|
function exponentialBackoff(errorCount) {
|
|
10072
10078
|
return 1000 * 2 ** (errorCount - 1);
|
|
10073
10079
|
}
|
|
10080
|
+
var waitForNextFrame = ({
|
|
10081
|
+
onFrame
|
|
10082
|
+
}) => {
|
|
10083
|
+
if (typeof requestAnimationFrame === "undefined") {
|
|
10084
|
+
onFrame();
|
|
10085
|
+
return () => {
|
|
10086
|
+
return;
|
|
10087
|
+
};
|
|
10088
|
+
}
|
|
10089
|
+
const frame = requestAnimationFrame(onFrame);
|
|
10090
|
+
return () => cancelAnimationFrame(frame);
|
|
10091
|
+
};
|
|
10074
10092
|
var CanvasImageContent = forwardRef10(({
|
|
10075
10093
|
src,
|
|
10076
10094
|
width,
|
|
@@ -10100,6 +10118,17 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10100
10118
|
overrideId: controls?.overrideId ?? null
|
|
10101
10119
|
});
|
|
10102
10120
|
const sequenceContext = useContext32(SequenceContext);
|
|
10121
|
+
const pendingLoadDelayRef = useRef23(null);
|
|
10122
|
+
const continuePendingLoadDelay = useCallback17(() => {
|
|
10123
|
+
const pending = pendingLoadDelayRef.current;
|
|
10124
|
+
if (!pending || pending.continued) {
|
|
10125
|
+
return;
|
|
10126
|
+
}
|
|
10127
|
+
pending.continued = true;
|
|
10128
|
+
pending.unblock();
|
|
10129
|
+
continueRender2(pending.handle);
|
|
10130
|
+
pendingLoadDelayRef.current = null;
|
|
10131
|
+
}, [continueRender2]);
|
|
10103
10132
|
const sourceCanvas = useMemo31(() => {
|
|
10104
10133
|
if (typeof document === "undefined") {
|
|
10105
10134
|
return null;
|
|
@@ -10117,7 +10146,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10117
10146
|
ref.current = canvas;
|
|
10118
10147
|
}
|
|
10119
10148
|
}, [ref, refForOutline]);
|
|
10120
|
-
|
|
10149
|
+
useLayoutEffect10(() => {
|
|
10121
10150
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
10122
10151
|
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
10123
10152
|
const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
|
|
@@ -10129,17 +10158,13 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10129
10158
|
};
|
|
10130
10159
|
const controller = new AbortController;
|
|
10131
10160
|
let cancelled = false;
|
|
10132
|
-
let continued = false;
|
|
10133
10161
|
let errorCount = 0;
|
|
10134
10162
|
let timeoutId = null;
|
|
10135
10163
|
setLoadedImage(null);
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
|
|
10139
|
-
|
|
10140
|
-
continued = true;
|
|
10141
|
-
unblock();
|
|
10142
|
-
continueRender2(handle);
|
|
10164
|
+
pendingLoadDelayRef.current = {
|
|
10165
|
+
handle,
|
|
10166
|
+
unblock,
|
|
10167
|
+
continued: false
|
|
10143
10168
|
};
|
|
10144
10169
|
const attemptLoad = () => {
|
|
10145
10170
|
loadImage({ src: actualSrc, signal: controller.signal }).then((image) => {
|
|
@@ -10147,13 +10172,9 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10147
10172
|
return;
|
|
10148
10173
|
}
|
|
10149
10174
|
setLoadedImage(image);
|
|
10150
|
-
}).then(() => {
|
|
10151
|
-
if (!cancelled) {
|
|
10152
|
-
continueRenderOnce();
|
|
10153
|
-
}
|
|
10154
10175
|
}).catch((err) => {
|
|
10155
10176
|
if (err.name === "AbortError") {
|
|
10156
|
-
|
|
10177
|
+
continuePendingLoadDelay();
|
|
10157
10178
|
return;
|
|
10158
10179
|
}
|
|
10159
10180
|
errorCount++;
|
|
@@ -10167,7 +10188,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10167
10188
|
}, backoff);
|
|
10168
10189
|
} else if (onError) {
|
|
10169
10190
|
onError(err);
|
|
10170
|
-
|
|
10191
|
+
continuePendingLoadDelay();
|
|
10171
10192
|
} else {
|
|
10172
10193
|
cancelRender2(err);
|
|
10173
10194
|
}
|
|
@@ -10180,12 +10201,12 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10180
10201
|
clearTimeout(timeoutId);
|
|
10181
10202
|
}
|
|
10182
10203
|
controller.abort();
|
|
10183
|
-
|
|
10204
|
+
continuePendingLoadDelay();
|
|
10184
10205
|
};
|
|
10185
10206
|
}, [
|
|
10186
10207
|
actualSrc,
|
|
10187
10208
|
cancelRender2,
|
|
10188
|
-
|
|
10209
|
+
continuePendingLoadDelay,
|
|
10189
10210
|
delayPlayback,
|
|
10190
10211
|
delayRender2,
|
|
10191
10212
|
delayRenderRetries,
|
|
@@ -10196,13 +10217,16 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10196
10217
|
sequenceContext?.postmounting,
|
|
10197
10218
|
sequenceContext?.premounting
|
|
10198
10219
|
]);
|
|
10199
|
-
|
|
10220
|
+
useLayoutEffect10(() => {
|
|
10200
10221
|
if (!loadedImage || !outputCanvas || !sourceCanvas) {
|
|
10201
10222
|
return;
|
|
10202
10223
|
}
|
|
10203
10224
|
const handle = delayRender2(`Applying effects to <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`);
|
|
10204
10225
|
let cancelled = false;
|
|
10205
10226
|
let continued = false;
|
|
10227
|
+
let cancelWaitForNextFrame = () => {
|
|
10228
|
+
return;
|
|
10229
|
+
};
|
|
10206
10230
|
const continueRenderOnce = () => {
|
|
10207
10231
|
if (continued) {
|
|
10208
10232
|
return;
|
|
@@ -10237,7 +10261,15 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10237
10261
|
height: canvasHeight
|
|
10238
10262
|
}).then((completed) => {
|
|
10239
10263
|
if (completed && !cancelled) {
|
|
10240
|
-
|
|
10264
|
+
cancelWaitForNextFrame = waitForNextFrame({
|
|
10265
|
+
onFrame: () => {
|
|
10266
|
+
if (cancelled) {
|
|
10267
|
+
return;
|
|
10268
|
+
}
|
|
10269
|
+
continueRenderOnce();
|
|
10270
|
+
continuePendingLoadDelay();
|
|
10271
|
+
}
|
|
10272
|
+
});
|
|
10241
10273
|
}
|
|
10242
10274
|
}).catch((err) => {
|
|
10243
10275
|
if (cancelled) {
|
|
@@ -10246,12 +10278,14 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10246
10278
|
if (onError) {
|
|
10247
10279
|
onError(err);
|
|
10248
10280
|
continueRenderOnce();
|
|
10281
|
+
continuePendingLoadDelay();
|
|
10249
10282
|
} else {
|
|
10250
10283
|
cancelRender2(err);
|
|
10251
10284
|
}
|
|
10252
10285
|
});
|
|
10253
10286
|
return () => {
|
|
10254
10287
|
cancelled = true;
|
|
10288
|
+
cancelWaitForNextFrame();
|
|
10255
10289
|
continueRenderOnce();
|
|
10256
10290
|
};
|
|
10257
10291
|
}, [
|
|
@@ -10259,6 +10293,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10259
10293
|
cancelRender2,
|
|
10260
10294
|
chainState,
|
|
10261
10295
|
continueRender2,
|
|
10296
|
+
continuePendingLoadDelay,
|
|
10262
10297
|
delayRender2,
|
|
10263
10298
|
fit,
|
|
10264
10299
|
height,
|
|
@@ -10468,7 +10503,7 @@ var ImgContent = ({
|
|
|
10468
10503
|
if (typeof window !== "undefined") {
|
|
10469
10504
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
10470
10505
|
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
10471
|
-
|
|
10506
|
+
useLayoutEffect11(() => {
|
|
10472
10507
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
10473
10508
|
if (imageRef.current) {
|
|
10474
10509
|
imageRef.current.src = actualSrc;
|
|
@@ -11364,7 +11399,7 @@ var OffthreadVideoForRendering = ({
|
|
|
11364
11399
|
mediaVolume: 1
|
|
11365
11400
|
});
|
|
11366
11401
|
warnAboutTooHighVolume(volume);
|
|
11367
|
-
|
|
11402
|
+
useEffect17(() => {
|
|
11368
11403
|
if (!src) {
|
|
11369
11404
|
throw new Error("No src passed");
|
|
11370
11405
|
}
|
|
@@ -11421,7 +11456,7 @@ var OffthreadVideoForRendering = ({
|
|
|
11421
11456
|
}, [toneMapped, currentTime, src, transparent]);
|
|
11422
11457
|
const [imageSrc, setImageSrc] = useState19(null);
|
|
11423
11458
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
11424
|
-
|
|
11459
|
+
useLayoutEffect12(() => {
|
|
11425
11460
|
if (!window.remotion_videoEnabled) {
|
|
11426
11461
|
return;
|
|
11427
11462
|
}
|
|
@@ -11525,7 +11560,7 @@ var useEmitVideoFrame = ({
|
|
|
11525
11560
|
ref,
|
|
11526
11561
|
onVideoFrame
|
|
11527
11562
|
}) => {
|
|
11528
|
-
|
|
11563
|
+
useEffect18(() => {
|
|
11529
11564
|
const { current } = ref;
|
|
11530
11565
|
if (!current) {
|
|
11531
11566
|
return;
|
|
@@ -11700,7 +11735,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11700
11735
|
tag: "video",
|
|
11701
11736
|
mountTime
|
|
11702
11737
|
}));
|
|
11703
|
-
|
|
11738
|
+
useEffect19(() => {
|
|
11704
11739
|
const { current } = videoRef;
|
|
11705
11740
|
if (!current) {
|
|
11706
11741
|
return;
|
|
@@ -11743,7 +11778,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11743
11778
|
const currentOnDurationCallback = useRef27(onDuration);
|
|
11744
11779
|
currentOnDurationCallback.current = onDuration;
|
|
11745
11780
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
11746
|
-
|
|
11781
|
+
useEffect19(() => {
|
|
11747
11782
|
const { current } = videoRef;
|
|
11748
11783
|
if (!current) {
|
|
11749
11784
|
return;
|
|
@@ -11760,7 +11795,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11760
11795
|
current.removeEventListener("loadedmetadata", onLoadedMetadata);
|
|
11761
11796
|
};
|
|
11762
11797
|
}, [src]);
|
|
11763
|
-
|
|
11798
|
+
useEffect19(() => {
|
|
11764
11799
|
const { current } = videoRef;
|
|
11765
11800
|
if (!current) {
|
|
11766
11801
|
return;
|
|
@@ -12541,7 +12576,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
12541
12576
|
mediaVolume: 1
|
|
12542
12577
|
});
|
|
12543
12578
|
warnAboutTooHighVolume(volume);
|
|
12544
|
-
|
|
12579
|
+
useEffect20(() => {
|
|
12545
12580
|
if (!props2.src) {
|
|
12546
12581
|
throw new Error("No src passed");
|
|
12547
12582
|
}
|
|
@@ -12585,7 +12620,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
12585
12620
|
return videoRef.current;
|
|
12586
12621
|
}, []);
|
|
12587
12622
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
12588
|
-
|
|
12623
|
+
useEffect20(() => {
|
|
12589
12624
|
if (!window.remotion_videoEnabled) {
|
|
12590
12625
|
return;
|
|
12591
12626
|
}
|
|
@@ -12675,7 +12710,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
12675
12710
|
]);
|
|
12676
12711
|
const { src } = props2;
|
|
12677
12712
|
if (environment.isRendering) {
|
|
12678
|
-
|
|
12713
|
+
useLayoutEffect13(() => {
|
|
12679
12714
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
12680
12715
|
return;
|
|
12681
12716
|
}
|
|
@@ -13289,6 +13324,9 @@ var ExpertsPageContent = ({ Link }) => {
|
|
|
13289
13324
|
})
|
|
13290
13325
|
});
|
|
13291
13326
|
};
|
|
13327
|
+
// src/components/homepage/Pricing.tsx
|
|
13328
|
+
import { useMemo as useMemo53 } from "react";
|
|
13329
|
+
|
|
13292
13330
|
// ../design/dist/esm/index.mjs
|
|
13293
13331
|
import * as React23 from "react";
|
|
13294
13332
|
import * as React8 from "react";
|
|
@@ -14635,7 +14673,7 @@ var getDefaultConfig = () => {
|
|
|
14635
14673
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
14636
14674
|
|
|
14637
14675
|
// ../design/dist/esm/index.mjs
|
|
14638
|
-
import React32, { useEffect as
|
|
14676
|
+
import React32, { useEffect as useEffect21, useMemo as useMemo43, useState as useState21 } from "react";
|
|
14639
14677
|
|
|
14640
14678
|
// ../paths/dist/esm/index.mjs
|
|
14641
14679
|
var cutLInstruction = ({
|
|
@@ -16741,6 +16779,94 @@ var getBoundingBox = (d) => {
|
|
|
16741
16779
|
const unarced = removeATSHVQInstructions(normalizeInstructions(parsed));
|
|
16742
16780
|
return getBoundingBoxFromInstructions(unarced);
|
|
16743
16781
|
};
|
|
16782
|
+
var translateSegments = (segments, x, y) => {
|
|
16783
|
+
return segments.map((segment) => {
|
|
16784
|
+
if (segment.type === "a" || segment.type === "c" || segment.type === "v" || segment.type === "s" || segment.type === "h" || segment.type === "l" || segment.type === "m" || segment.type === "q" || segment.type === "t") {
|
|
16785
|
+
return segment;
|
|
16786
|
+
}
|
|
16787
|
+
if (segment.type === "V") {
|
|
16788
|
+
return {
|
|
16789
|
+
type: "V",
|
|
16790
|
+
y: segment.y + y
|
|
16791
|
+
};
|
|
16792
|
+
}
|
|
16793
|
+
if (segment.type === "H") {
|
|
16794
|
+
return {
|
|
16795
|
+
type: "H",
|
|
16796
|
+
x: segment.x + x
|
|
16797
|
+
};
|
|
16798
|
+
}
|
|
16799
|
+
if (segment.type === "A") {
|
|
16800
|
+
return {
|
|
16801
|
+
type: "A",
|
|
16802
|
+
rx: segment.rx,
|
|
16803
|
+
ry: segment.ry,
|
|
16804
|
+
largeArcFlag: segment.largeArcFlag,
|
|
16805
|
+
sweepFlag: segment.sweepFlag,
|
|
16806
|
+
xAxisRotation: segment.xAxisRotation,
|
|
16807
|
+
x: segment.x + x,
|
|
16808
|
+
y: segment.y + y
|
|
16809
|
+
};
|
|
16810
|
+
}
|
|
16811
|
+
if (segment.type === "Z") {
|
|
16812
|
+
return segment;
|
|
16813
|
+
}
|
|
16814
|
+
if (segment.type === "C") {
|
|
16815
|
+
return {
|
|
16816
|
+
type: "C",
|
|
16817
|
+
cp1x: segment.cp1x + x,
|
|
16818
|
+
cp1y: segment.cp1y + y,
|
|
16819
|
+
cp2x: segment.cp2x + x,
|
|
16820
|
+
cp2y: segment.cp2y + y,
|
|
16821
|
+
x: segment.x + x,
|
|
16822
|
+
y: segment.y + y
|
|
16823
|
+
};
|
|
16824
|
+
}
|
|
16825
|
+
if (segment.type === "Q") {
|
|
16826
|
+
return {
|
|
16827
|
+
type: "Q",
|
|
16828
|
+
cpx: segment.cpx + x,
|
|
16829
|
+
cpy: segment.cpy + y,
|
|
16830
|
+
x: segment.x + x,
|
|
16831
|
+
y: segment.y + y
|
|
16832
|
+
};
|
|
16833
|
+
}
|
|
16834
|
+
if (segment.type === "S") {
|
|
16835
|
+
return {
|
|
16836
|
+
type: "S",
|
|
16837
|
+
cpx: segment.cpx + x,
|
|
16838
|
+
cpy: segment.cpy + y,
|
|
16839
|
+
x: segment.x + x,
|
|
16840
|
+
y: segment.y + y
|
|
16841
|
+
};
|
|
16842
|
+
}
|
|
16843
|
+
if (segment.type === "T") {
|
|
16844
|
+
return {
|
|
16845
|
+
type: "T",
|
|
16846
|
+
x: segment.x + x,
|
|
16847
|
+
y: segment.y + y
|
|
16848
|
+
};
|
|
16849
|
+
}
|
|
16850
|
+
if (segment.type === "L") {
|
|
16851
|
+
return {
|
|
16852
|
+
type: "L",
|
|
16853
|
+
x: segment.x + x,
|
|
16854
|
+
y: segment.y + y
|
|
16855
|
+
};
|
|
16856
|
+
}
|
|
16857
|
+
if (segment.type === "M") {
|
|
16858
|
+
return {
|
|
16859
|
+
type: "M",
|
|
16860
|
+
x: segment.x + x,
|
|
16861
|
+
y: segment.y + y
|
|
16862
|
+
};
|
|
16863
|
+
}
|
|
16864
|
+
throw new Error(`Unknown segment type: ${segment.type}`);
|
|
16865
|
+
});
|
|
16866
|
+
};
|
|
16867
|
+
var translatePath = (path, x, y) => {
|
|
16868
|
+
return serializeInstructions(translateSegments(parsePath(path), x, y));
|
|
16869
|
+
};
|
|
16744
16870
|
var mod = (x, m) => {
|
|
16745
16871
|
return (x % m + m) % m;
|
|
16746
16872
|
};
|
|
@@ -17302,94 +17428,6 @@ var getLength = (path) => {
|
|
|
17302
17428
|
const constructucted = construct(path);
|
|
17303
17429
|
return constructucted.totalLength;
|
|
17304
17430
|
};
|
|
17305
|
-
var translateSegments = (segments, x, y) => {
|
|
17306
|
-
return segments.map((segment) => {
|
|
17307
|
-
if (segment.type === "a" || segment.type === "c" || segment.type === "v" || segment.type === "s" || segment.type === "h" || segment.type === "l" || segment.type === "m" || segment.type === "q" || segment.type === "t") {
|
|
17308
|
-
return segment;
|
|
17309
|
-
}
|
|
17310
|
-
if (segment.type === "V") {
|
|
17311
|
-
return {
|
|
17312
|
-
type: "V",
|
|
17313
|
-
y: segment.y + y
|
|
17314
|
-
};
|
|
17315
|
-
}
|
|
17316
|
-
if (segment.type === "H") {
|
|
17317
|
-
return {
|
|
17318
|
-
type: "H",
|
|
17319
|
-
x: segment.x + x
|
|
17320
|
-
};
|
|
17321
|
-
}
|
|
17322
|
-
if (segment.type === "A") {
|
|
17323
|
-
return {
|
|
17324
|
-
type: "A",
|
|
17325
|
-
rx: segment.rx,
|
|
17326
|
-
ry: segment.ry,
|
|
17327
|
-
largeArcFlag: segment.largeArcFlag,
|
|
17328
|
-
sweepFlag: segment.sweepFlag,
|
|
17329
|
-
xAxisRotation: segment.xAxisRotation,
|
|
17330
|
-
x: segment.x + x,
|
|
17331
|
-
y: segment.y + y
|
|
17332
|
-
};
|
|
17333
|
-
}
|
|
17334
|
-
if (segment.type === "Z") {
|
|
17335
|
-
return segment;
|
|
17336
|
-
}
|
|
17337
|
-
if (segment.type === "C") {
|
|
17338
|
-
return {
|
|
17339
|
-
type: "C",
|
|
17340
|
-
cp1x: segment.cp1x + x,
|
|
17341
|
-
cp1y: segment.cp1y + y,
|
|
17342
|
-
cp2x: segment.cp2x + x,
|
|
17343
|
-
cp2y: segment.cp2y + y,
|
|
17344
|
-
x: segment.x + x,
|
|
17345
|
-
y: segment.y + y
|
|
17346
|
-
};
|
|
17347
|
-
}
|
|
17348
|
-
if (segment.type === "Q") {
|
|
17349
|
-
return {
|
|
17350
|
-
type: "Q",
|
|
17351
|
-
cpx: segment.cpx + x,
|
|
17352
|
-
cpy: segment.cpy + y,
|
|
17353
|
-
x: segment.x + x,
|
|
17354
|
-
y: segment.y + y
|
|
17355
|
-
};
|
|
17356
|
-
}
|
|
17357
|
-
if (segment.type === "S") {
|
|
17358
|
-
return {
|
|
17359
|
-
type: "S",
|
|
17360
|
-
cpx: segment.cpx + x,
|
|
17361
|
-
cpy: segment.cpy + y,
|
|
17362
|
-
x: segment.x + x,
|
|
17363
|
-
y: segment.y + y
|
|
17364
|
-
};
|
|
17365
|
-
}
|
|
17366
|
-
if (segment.type === "T") {
|
|
17367
|
-
return {
|
|
17368
|
-
type: "T",
|
|
17369
|
-
x: segment.x + x,
|
|
17370
|
-
y: segment.y + y
|
|
17371
|
-
};
|
|
17372
|
-
}
|
|
17373
|
-
if (segment.type === "L") {
|
|
17374
|
-
return {
|
|
17375
|
-
type: "L",
|
|
17376
|
-
x: segment.x + x,
|
|
17377
|
-
y: segment.y + y
|
|
17378
|
-
};
|
|
17379
|
-
}
|
|
17380
|
-
if (segment.type === "M") {
|
|
17381
|
-
return {
|
|
17382
|
-
type: "M",
|
|
17383
|
-
x: segment.x + x,
|
|
17384
|
-
y: segment.y + y
|
|
17385
|
-
};
|
|
17386
|
-
}
|
|
17387
|
-
throw new Error(`Unknown segment type: ${segment.type}`);
|
|
17388
|
-
});
|
|
17389
|
-
};
|
|
17390
|
-
var translatePath = (path, x, y) => {
|
|
17391
|
-
return serializeInstructions(translateSegments(parsePath(path), x, y));
|
|
17392
|
-
};
|
|
17393
17431
|
var resetPath = (d) => {
|
|
17394
17432
|
const box = getBoundingBox(d);
|
|
17395
17433
|
return translatePath(d, -box.x1, -box.y1);
|
|
@@ -20325,7 +20363,7 @@ var extrudeAndTransformElement = (options) => {
|
|
|
20325
20363
|
// ../design/dist/esm/index.mjs
|
|
20326
20364
|
import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
20327
20365
|
import { jsx as jsx312, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
20328
|
-
import { useEffect as
|
|
20366
|
+
import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef31 } from "react";
|
|
20329
20367
|
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
20330
20368
|
import { jsx as jsx53, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
20331
20369
|
import React62 from "react";
|
|
@@ -20580,7 +20618,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
20580
20618
|
isActive: false
|
|
20581
20619
|
});
|
|
20582
20620
|
const eventTarget = useMemo43(() => new EventTarget, []);
|
|
20583
|
-
|
|
20621
|
+
useEffect21(() => {
|
|
20584
20622
|
if (disabled) {
|
|
20585
20623
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
20586
20624
|
} else {
|
|
@@ -20727,7 +20765,7 @@ var getAngle = (ref, coordinates) => {
|
|
|
20727
20765
|
var lastCoordinates = null;
|
|
20728
20766
|
var useMousePosition = (ref) => {
|
|
20729
20767
|
const [angle, setAngle] = useState21(getAngle(ref.current, lastCoordinates));
|
|
20730
|
-
|
|
20768
|
+
useEffect21(() => {
|
|
20731
20769
|
const element = ref.current;
|
|
20732
20770
|
if (!element) {
|
|
20733
20771
|
return;
|
|
@@ -20848,7 +20886,7 @@ var Spinner = ({ size, duration }) => {
|
|
|
20848
20886
|
};
|
|
20849
20887
|
}, [size]);
|
|
20850
20888
|
const pathsRef = useRef31([]);
|
|
20851
|
-
|
|
20889
|
+
useEffect22(() => {
|
|
20852
20890
|
const animate = () => {
|
|
20853
20891
|
const now = performance.now();
|
|
20854
20892
|
for (let index = 0;index < lines; index++) {
|
|
@@ -28914,7 +28952,10 @@ var CompanyPricing = () => {
|
|
|
28914
28952
|
|
|
28915
28953
|
// src/components/homepage/Pricing.tsx
|
|
28916
28954
|
import { jsx as jsx50, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
28917
|
-
var Pricing = () => {
|
|
28955
|
+
var Pricing = ({ faqHref = "/docs/pricing#faq" }) => {
|
|
28956
|
+
const faqLinkTarget = useMemo53(() => {
|
|
28957
|
+
return faqHref.startsWith("http") ? "_blank" : undefined;
|
|
28958
|
+
}, [faqHref]);
|
|
28918
28959
|
return /* @__PURE__ */ jsxs9("div", {
|
|
28919
28960
|
style: {
|
|
28920
28961
|
display: "flex",
|
|
@@ -28939,9 +28980,9 @@ var Pricing = () => {
|
|
|
28939
28980
|
"See our",
|
|
28940
28981
|
" ",
|
|
28941
28982
|
/* @__PURE__ */ jsx50("a", {
|
|
28942
|
-
target:
|
|
28983
|
+
target: faqLinkTarget,
|
|
28943
28984
|
className: "bluelink",
|
|
28944
|
-
href:
|
|
28985
|
+
href: faqHref,
|
|
28945
28986
|
children: "FAQ"
|
|
28946
28987
|
}),
|
|
28947
28988
|
" ",
|
|
@@ -29312,7 +29353,7 @@ var AutomationsSection = () => {
|
|
|
29312
29353
|
var AutomationsSection_default = AutomationsSection;
|
|
29313
29354
|
|
|
29314
29355
|
// src/components/homepage/BackgroundAnimation.tsx
|
|
29315
|
-
import { useEffect as
|
|
29356
|
+
import { useEffect as useEffect40 } from "react";
|
|
29316
29357
|
import { jsx as jsx56, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
29317
29358
|
"use client";
|
|
29318
29359
|
var rx = 0.2;
|
|
@@ -29338,7 +29379,7 @@ var BackgroundAnimation = () => {
|
|
|
29338
29379
|
}
|
|
29339
29380
|
}
|
|
29340
29381
|
`;
|
|
29341
|
-
|
|
29382
|
+
useEffect40(() => {
|
|
29342
29383
|
const _style = document.createElement("style");
|
|
29343
29384
|
_style.innerHTML = css;
|
|
29344
29385
|
document.head.appendChild(_style);
|
|
@@ -29551,7 +29592,7 @@ var GitHubStars = () => {
|
|
|
29551
29592
|
width: "45px"
|
|
29552
29593
|
}),
|
|
29553
29594
|
/* @__PURE__ */ jsx57(StatItemContent, {
|
|
29554
|
-
content: "
|
|
29595
|
+
content: "52K",
|
|
29555
29596
|
width: "80px",
|
|
29556
29597
|
fontSize: "2.5rem",
|
|
29557
29598
|
fontWeight: "bold"
|
|
@@ -29729,16 +29770,16 @@ var CommunityStats_default = CommunityStats;
|
|
|
29729
29770
|
import { createContext as createContext32 } from "react";
|
|
29730
29771
|
import { jsx as jsx59, jsxs as jsxs14, Fragment as Fragment12 } from "react/jsx-runtime";
|
|
29731
29772
|
import { jsx as jsx214, jsxs as jsxs24, Fragment as Fragment23 } from "react/jsx-runtime";
|
|
29732
|
-
import
|
|
29733
|
-
import { useContext as useContext210, useEffect as
|
|
29734
|
-
import { useContext as useContext46, useLayoutEffect as
|
|
29773
|
+
import React57 from "react";
|
|
29774
|
+
import { useContext as useContext210, useEffect as useEffect41, useState as useState38 } from "react";
|
|
29775
|
+
import { useContext as useContext46, useLayoutEffect as useLayoutEffect18 } from "react";
|
|
29735
29776
|
import { jsx as jsx314 } from "react/jsx-runtime";
|
|
29736
29777
|
import { useEffect as useEffect210, useState as useState210 } from "react";
|
|
29737
29778
|
import { useLayoutEffect as useLayoutEffect23 } from "react";
|
|
29738
29779
|
import { useContext as useContext47, useEffect as useEffect52, useRef as useRef47 } from "react";
|
|
29739
29780
|
import { useEffect as useEffect310, useRef as useRef212 } from "react";
|
|
29740
|
-
import { useCallback as useCallback39, useContext as useContext310, useMemo as
|
|
29741
|
-
import { useEffect as
|
|
29781
|
+
import { useCallback as useCallback39, useContext as useContext310, useMemo as useMemo54, useRef as useRef48, useState as useState39 } from "react";
|
|
29782
|
+
import { useEffect as useEffect42, useRef as useRef310 } from "react";
|
|
29742
29783
|
import { useCallback as useCallback210, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
|
|
29743
29784
|
import {
|
|
29744
29785
|
forwardRef as forwardRef210,
|
|
@@ -29770,7 +29811,7 @@ import { useCallback as useCallback42, useMemo as useMemo410, useRef as useRef52
|
|
|
29770
29811
|
import React54, { useCallback as useCallback310, useMemo as useMemo310, useState as useState52 } from "react";
|
|
29771
29812
|
import { jsx as jsx74, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
29772
29813
|
import { jsx as jsx84, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
29773
|
-
import { useCallback as useCallback52, useEffect as useEffect92, useMemo as
|
|
29814
|
+
import { useCallback as useCallback52, useEffect as useEffect92, useMemo as useMemo55, useState as useState82 } from "react";
|
|
29774
29815
|
import { useEffect as useEffect83, useRef as useRef62, useState as useState72 } from "react";
|
|
29775
29816
|
import { jsx as jsx94, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
29776
29817
|
import { useCallback as useCallback62, useEffect as useEffect102, useMemo as useMemo62, useRef as useRef72, useState as useState92 } from "react";
|
|
@@ -31675,8 +31716,8 @@ var calculateOuter = ({
|
|
|
31675
31716
|
overflow: overflowVisible ? "visible" : "hidden"
|
|
31676
31717
|
};
|
|
31677
31718
|
};
|
|
31678
|
-
var PlayerEventEmitterContext =
|
|
31679
|
-
var ThumbnailEmitterContext =
|
|
31719
|
+
var PlayerEventEmitterContext = React57.createContext(undefined);
|
|
31720
|
+
var ThumbnailEmitterContext = React57.createContext(undefined);
|
|
31680
31721
|
|
|
31681
31722
|
class PlayerEmitter {
|
|
31682
31723
|
listeners = {
|
|
@@ -31794,7 +31835,7 @@ var useBufferStateEmitter = (emitter) => {
|
|
|
31794
31835
|
if (!bufferManager) {
|
|
31795
31836
|
throw new Error("BufferingContextReact not found");
|
|
31796
31837
|
}
|
|
31797
|
-
|
|
31838
|
+
useLayoutEffect18(() => {
|
|
31798
31839
|
const clear1 = bufferManager.listenForBuffering(() => {
|
|
31799
31840
|
bufferManager.buffering.current = true;
|
|
31800
31841
|
emitter.dispatchWaiting({});
|
|
@@ -31815,7 +31856,7 @@ var PlayerEmitterProvider = ({ children, currentPlaybackRate }) => {
|
|
|
31815
31856
|
if (!bufferManager) {
|
|
31816
31857
|
throw new Error("BufferingContextReact not found");
|
|
31817
31858
|
}
|
|
31818
|
-
|
|
31859
|
+
useEffect41(() => {
|
|
31819
31860
|
if (currentPlaybackRate) {
|
|
31820
31861
|
emitter.dispatchRateChange(currentPlaybackRate);
|
|
31821
31862
|
}
|
|
@@ -32004,7 +32045,7 @@ var usePlayer = () => {
|
|
|
32004
32045
|
const isBuffering = useCallback39(() => {
|
|
32005
32046
|
return buffering.current;
|
|
32006
32047
|
}, [buffering]);
|
|
32007
|
-
const returnValue =
|
|
32048
|
+
const returnValue = useMemo54(() => {
|
|
32008
32049
|
return {
|
|
32009
32050
|
frameBack,
|
|
32010
32051
|
frameForward,
|
|
@@ -32190,7 +32231,7 @@ var getIsBackgrounded = () => {
|
|
|
32190
32231
|
};
|
|
32191
32232
|
var useIsBackgrounded = () => {
|
|
32192
32233
|
const isBackgrounded = useRef310(getIsBackgrounded());
|
|
32193
|
-
|
|
32234
|
+
useEffect42(() => {
|
|
32194
32235
|
const onVisibilityChange = () => {
|
|
32195
32236
|
isBackgrounded.current = getIsBackgrounded();
|
|
32196
32237
|
};
|
|
@@ -32981,7 +33022,7 @@ var PlaybackrateOption = ({ rate, onSelect, selectedRate, keyboardSelectedRate }
|
|
|
32981
33022
|
setHovered(false);
|
|
32982
33023
|
}, []);
|
|
32983
33024
|
const isFocused = keyboardSelectedRate === rate;
|
|
32984
|
-
const actualStyle =
|
|
33025
|
+
const actualStyle = useMemo55(() => {
|
|
32985
33026
|
return {
|
|
32986
33027
|
...rateDiv,
|
|
32987
33028
|
backgroundColor: hovered || isFocused ? "#eee" : "transparent"
|
|
@@ -33048,7 +33089,7 @@ var PlaybackPopup = ({ setIsComponentVisible, playbackRates, canvasSize }) => {
|
|
|
33048
33089
|
setPlaybackRate(rate);
|
|
33049
33090
|
setIsComponentVisible(false);
|
|
33050
33091
|
}, [setIsComponentVisible, setPlaybackRate]);
|
|
33051
|
-
const playbackPopup =
|
|
33092
|
+
const playbackPopup = useMemo55(() => {
|
|
33052
33093
|
return {
|
|
33053
33094
|
position: "absolute",
|
|
33054
33095
|
right: 0,
|
|
@@ -34966,8 +35007,8 @@ var Thumbnail = forward2(ThumbnailFn);
|
|
|
34966
35007
|
// src/components/homepage/Demo/index.tsx
|
|
34967
35008
|
import {
|
|
34968
35009
|
useCallback as useCallback55,
|
|
34969
|
-
useEffect as
|
|
34970
|
-
useMemo as
|
|
35010
|
+
useEffect as useEffect57,
|
|
35011
|
+
useMemo as useMemo68,
|
|
34971
35012
|
useRef as useRef59,
|
|
34972
35013
|
useState as useState56
|
|
34973
35014
|
} from "react";
|
|
@@ -35718,15 +35759,15 @@ var UNDERLAY_RED = curriedTransparentize$1(0.9, RED);
|
|
|
35718
35759
|
var BLUE_TEXT = curriedDarken$1(0.3, "#42e9f5");
|
|
35719
35760
|
|
|
35720
35761
|
// src/components/homepage/layout/use-color-mode.tsx
|
|
35721
|
-
import
|
|
35762
|
+
import React58, { useContext as useContext48, useMemo as useMemo56 } from "react";
|
|
35722
35763
|
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
35723
|
-
var Context =
|
|
35764
|
+
var Context = React58.createContext(undefined);
|
|
35724
35765
|
var ColorModeProvider = ({
|
|
35725
35766
|
children,
|
|
35726
35767
|
colorMode,
|
|
35727
35768
|
setColorMode
|
|
35728
35769
|
}) => {
|
|
35729
|
-
const value =
|
|
35770
|
+
const value = useMemo56(() => {
|
|
35730
35771
|
return { colorMode, setColorMode };
|
|
35731
35772
|
}, [colorMode, setColorMode]);
|
|
35732
35773
|
return /* @__PURE__ */ jsx60(Context.Provider, {
|
|
@@ -35744,14 +35785,14 @@ function useColorMode() {
|
|
|
35744
35785
|
|
|
35745
35786
|
// ../media/dist/esm/index.mjs
|
|
35746
35787
|
import { useMemo as useMemo312, useState as useState311 } from "react";
|
|
35747
|
-
import { useContext as useContext212, useEffect as
|
|
35788
|
+
import { useContext as useContext212, useEffect as useEffect43, useMemo as useMemo58, useRef as useRef50, useState as useState40 } from "react";
|
|
35748
35789
|
import { ALL_FORMATS, Input as Input2, UrlSource } from "mediabunny";
|
|
35749
35790
|
import {
|
|
35750
35791
|
AudioBufferSink,
|
|
35751
35792
|
InputDisposedError
|
|
35752
35793
|
} from "mediabunny";
|
|
35753
35794
|
import { CanvasSink } from "mediabunny";
|
|
35754
|
-
import { useContext as useContext50, useLayoutEffect as
|
|
35795
|
+
import { useContext as useContext50, useLayoutEffect as useLayoutEffect19 } from "react";
|
|
35755
35796
|
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
35756
35797
|
import { useContext as useContext312, useLayoutEffect as useLayoutEffect24, useMemo as useMemo213, useState as useState212 } from "react";
|
|
35757
35798
|
import React211 from "react";
|
|
@@ -35781,7 +35822,7 @@ import { jsx as jsx412 } from "react/jsx-runtime";
|
|
|
35781
35822
|
import {
|
|
35782
35823
|
useContext as useContext53,
|
|
35783
35824
|
useLayoutEffect as useLayoutEffect43,
|
|
35784
|
-
useMemo as
|
|
35825
|
+
useMemo as useMemo57,
|
|
35785
35826
|
useRef as useRef312,
|
|
35786
35827
|
useState as useState53
|
|
35787
35828
|
} from "react";
|
|
@@ -37808,7 +37849,7 @@ var useCommonEffects = ({
|
|
|
37808
37849
|
label: label3
|
|
37809
37850
|
}) => {
|
|
37810
37851
|
const sharedAudioContext = useContext50(Internals.SharedAudioContext);
|
|
37811
|
-
|
|
37852
|
+
useLayoutEffect19(() => {
|
|
37812
37853
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37813
37854
|
if (!mediaPlayer)
|
|
37814
37855
|
return;
|
|
@@ -37825,7 +37866,7 @@ var useCommonEffects = ({
|
|
|
37825
37866
|
frame,
|
|
37826
37867
|
mediaPlayerRef
|
|
37827
37868
|
]);
|
|
37828
|
-
|
|
37869
|
+
useLayoutEffect19(() => {
|
|
37829
37870
|
if (!sharedAudioContext)
|
|
37830
37871
|
return;
|
|
37831
37872
|
const { remove } = sharedAudioContext.audioSyncAnchorEmitter.subscribe((event) => {
|
|
@@ -37837,90 +37878,90 @@ var useCommonEffects = ({
|
|
|
37837
37878
|
remove();
|
|
37838
37879
|
};
|
|
37839
37880
|
}, [sharedAudioContext, mediaPlayerRef]);
|
|
37840
|
-
|
|
37881
|
+
useLayoutEffect19(() => {
|
|
37841
37882
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37842
37883
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37843
37884
|
return;
|
|
37844
37885
|
}
|
|
37845
37886
|
mediaPlayer.setTrimBefore(trimBefore, currentTimeRef.current);
|
|
37846
37887
|
}, [trimBefore, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37847
|
-
|
|
37888
|
+
useLayoutEffect19(() => {
|
|
37848
37889
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37849
37890
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37850
37891
|
return;
|
|
37851
37892
|
}
|
|
37852
37893
|
mediaPlayer.setTrimAfter(trimAfter, currentTimeRef.current);
|
|
37853
37894
|
}, [trimAfter, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37854
|
-
|
|
37895
|
+
useLayoutEffect19(() => {
|
|
37855
37896
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37856
37897
|
if (!mediaPlayer || !mediaPlayerReady)
|
|
37857
37898
|
return;
|
|
37858
37899
|
mediaPlayer.setMuted(effectiveMuted);
|
|
37859
37900
|
}, [effectiveMuted, mediaPlayerReady, mediaPlayerRef]);
|
|
37860
|
-
|
|
37901
|
+
useLayoutEffect19(() => {
|
|
37861
37902
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37862
37903
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37863
37904
|
return;
|
|
37864
37905
|
}
|
|
37865
37906
|
mediaPlayer.setVolume(userPreferredVolume);
|
|
37866
37907
|
}, [userPreferredVolume, mediaPlayerReady, mediaPlayerRef]);
|
|
37867
|
-
|
|
37908
|
+
useLayoutEffect19(() => {
|
|
37868
37909
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37869
37910
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37870
37911
|
return;
|
|
37871
37912
|
}
|
|
37872
37913
|
mediaPlayer.setPlaybackRate(playbackRate, currentTimeRef.current);
|
|
37873
37914
|
}, [playbackRate, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37874
|
-
|
|
37915
|
+
useLayoutEffect19(() => {
|
|
37875
37916
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37876
37917
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37877
37918
|
return;
|
|
37878
37919
|
}
|
|
37879
37920
|
mediaPlayer.setGlobalPlaybackRate(globalPlaybackRate, currentTimeRef.current);
|
|
37880
37921
|
}, [globalPlaybackRate, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37881
|
-
|
|
37922
|
+
useLayoutEffect19(() => {
|
|
37882
37923
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37883
37924
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37884
37925
|
return;
|
|
37885
37926
|
}
|
|
37886
37927
|
mediaPlayer.setLoop(loop, currentTimeRef.current);
|
|
37887
37928
|
}, [loop, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37888
|
-
|
|
37929
|
+
useLayoutEffect19(() => {
|
|
37889
37930
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37890
37931
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37891
37932
|
return;
|
|
37892
37933
|
}
|
|
37893
37934
|
mediaPlayer.setSequenceDurationInFrames(durationInFrames, currentTimeRef.current);
|
|
37894
37935
|
}, [durationInFrames, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37895
|
-
|
|
37936
|
+
useLayoutEffect19(() => {
|
|
37896
37937
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37897
37938
|
if (!mediaPlayer) {
|
|
37898
37939
|
return;
|
|
37899
37940
|
}
|
|
37900
37941
|
mediaPlayer.setIsPremounting(isPremounting);
|
|
37901
37942
|
}, [isPremounting, mediaPlayerReady, mediaPlayerRef]);
|
|
37902
|
-
|
|
37943
|
+
useLayoutEffect19(() => {
|
|
37903
37944
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37904
37945
|
if (!mediaPlayer) {
|
|
37905
37946
|
return;
|
|
37906
37947
|
}
|
|
37907
37948
|
mediaPlayer.setIsPostmounting(isPostmounting);
|
|
37908
37949
|
}, [isPostmounting, mediaPlayerReady, mediaPlayerRef]);
|
|
37909
|
-
|
|
37950
|
+
useLayoutEffect19(() => {
|
|
37910
37951
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37911
37952
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37912
37953
|
return;
|
|
37913
37954
|
}
|
|
37914
37955
|
mediaPlayer.setFps(fps, currentTimeRef.current);
|
|
37915
37956
|
}, [fps, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37916
|
-
|
|
37957
|
+
useLayoutEffect19(() => {
|
|
37917
37958
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37918
37959
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37919
37960
|
return;
|
|
37920
37961
|
}
|
|
37921
37962
|
mediaPlayer.setSequenceOffset(sequenceOffset, currentTimeRef.current);
|
|
37922
37963
|
}, [sequenceOffset, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37923
|
-
|
|
37964
|
+
useLayoutEffect19(() => {
|
|
37924
37965
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37925
37966
|
if (!mediaPlayer || !mediaPlayerReady)
|
|
37926
37967
|
return;
|
|
@@ -38034,7 +38075,7 @@ var AudioForPreviewAssertedShowing = ({
|
|
|
38034
38075
|
logLevel,
|
|
38035
38076
|
label: "AudioForPreview"
|
|
38036
38077
|
});
|
|
38037
|
-
|
|
38078
|
+
useEffect43(() => {
|
|
38038
38079
|
if (!sharedAudioContext)
|
|
38039
38080
|
return;
|
|
38040
38081
|
if (!sharedAudioContext.audioContext)
|
|
@@ -38224,7 +38265,7 @@ var AudioForPreview2 = ({
|
|
|
38224
38265
|
const frame = useCurrentFrame();
|
|
38225
38266
|
const videoConfig = useVideoConfig();
|
|
38226
38267
|
const currentTime = frame / videoConfig.fps;
|
|
38227
|
-
const showShow =
|
|
38268
|
+
const showShow = useMemo58(() => {
|
|
38228
38269
|
return getTimeInSeconds({
|
|
38229
38270
|
unloopedTimeInSeconds: currentTime,
|
|
38230
38271
|
playbackRate,
|
|
@@ -40874,7 +40915,7 @@ var VideoForRendering2 = ({
|
|
|
40874
40915
|
const { registerRenderAsset, unregisterRenderAsset } = useContext53(Internals.RenderAssetManager);
|
|
40875
40916
|
const startsAt = Internals.useMediaStartsAt();
|
|
40876
40917
|
const sequenceContext = useContext53(Internals.SequenceContext);
|
|
40877
|
-
const id =
|
|
40918
|
+
const id = useMemo57(() => `media-video-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
40878
40919
|
src,
|
|
40879
40920
|
sequenceContext?.cumulatedFrom,
|
|
40880
40921
|
sequenceContext?.relativeFrom,
|
|
@@ -41087,10 +41128,10 @@ var VideoForRendering2 = ({
|
|
|
41087
41128
|
initialRequestInit
|
|
41088
41129
|
]);
|
|
41089
41130
|
warnAboutObjectFitInStyleOrClassName({ style: style2, className: className2, logLevel });
|
|
41090
|
-
const classNameValue =
|
|
41131
|
+
const classNameValue = useMemo57(() => {
|
|
41091
41132
|
return [Internals.OBJECTFIT_CONTAIN_CLASS_NAME, className2].filter(Internals.truthy).join(" ");
|
|
41092
41133
|
}, [className2]);
|
|
41093
|
-
const styleWithObjectFit =
|
|
41134
|
+
const styleWithObjectFit = useMemo57(() => {
|
|
41094
41135
|
return {
|
|
41095
41136
|
...style2,
|
|
41096
41137
|
objectFit: objectFitProp
|
|
@@ -41444,13 +41485,13 @@ var Video = Interactive.withSchema({
|
|
|
41444
41485
|
Internals.addSequenceStackTraces(Video);
|
|
41445
41486
|
|
|
41446
41487
|
// src/components/homepage/Demo/Comp.tsx
|
|
41447
|
-
import { useCallback as useCallback47, useEffect as
|
|
41488
|
+
import { useCallback as useCallback47, useEffect as useEffect49, useMemo as useMemo61, useState as useState48 } from "react";
|
|
41448
41489
|
|
|
41449
41490
|
// src/components/homepage/Demo/Cards.tsx
|
|
41450
41491
|
import {
|
|
41451
41492
|
createRef as createRef4,
|
|
41452
41493
|
useCallback as useCallback46,
|
|
41453
|
-
useEffect as
|
|
41494
|
+
useEffect as useEffect48,
|
|
41454
41495
|
useRef as useRef56,
|
|
41455
41496
|
useState as useState47
|
|
41456
41497
|
} from "react";
|
|
@@ -41818,14 +41859,14 @@ var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
|
|
|
41818
41859
|
import {
|
|
41819
41860
|
forwardRef as forwardRef38,
|
|
41820
41861
|
useCallback as useCallback45,
|
|
41821
|
-
useEffect as
|
|
41862
|
+
useEffect as useEffect47,
|
|
41822
41863
|
useImperativeHandle as useImperativeHandle13,
|
|
41823
41864
|
useRef as useRef55
|
|
41824
41865
|
} from "react";
|
|
41825
41866
|
|
|
41826
41867
|
// ../lottie/dist/esm/index.mjs
|
|
41827
41868
|
import lottie from "lottie-web";
|
|
41828
|
-
import { useEffect as
|
|
41869
|
+
import { useEffect as useEffect45, useRef as useRef53, useState as useState44 } from "react";
|
|
41829
41870
|
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
41830
41871
|
var getLottieMetadata = (animationData) => {
|
|
41831
41872
|
const width2 = animationData.w;
|
|
@@ -41901,14 +41942,14 @@ var Lottie = ({
|
|
|
41901
41942
|
onAnimationLoadedRef.current = onAnimationLoaded;
|
|
41902
41943
|
const { delayRender: delayRender2, continueRender } = useDelayRender();
|
|
41903
41944
|
const [handle] = useState44(() => delayRender2("Waiting for Lottie animation to load"));
|
|
41904
|
-
|
|
41945
|
+
useEffect45(() => {
|
|
41905
41946
|
return () => {
|
|
41906
41947
|
continueRender(handle);
|
|
41907
41948
|
};
|
|
41908
41949
|
}, [handle, continueRender]);
|
|
41909
41950
|
const frame = useCurrentFrame();
|
|
41910
41951
|
currentFrameRef.current = frame;
|
|
41911
|
-
|
|
41952
|
+
useEffect45(() => {
|
|
41912
41953
|
if (!containerRef.current) {
|
|
41913
41954
|
return;
|
|
41914
41955
|
}
|
|
@@ -41953,17 +41994,17 @@ var Lottie = ({
|
|
|
41953
41994
|
renderer,
|
|
41954
41995
|
continueRender
|
|
41955
41996
|
]);
|
|
41956
|
-
|
|
41997
|
+
useEffect45(() => {
|
|
41957
41998
|
if (animationRef.current && direction) {
|
|
41958
41999
|
animationRef.current.setDirection(direction === "backward" ? -1 : 1);
|
|
41959
42000
|
}
|
|
41960
42001
|
}, [direction]);
|
|
41961
|
-
|
|
42002
|
+
useEffect45(() => {
|
|
41962
42003
|
if (animationRef.current && playbackRate) {
|
|
41963
42004
|
animationRef.current.setSpeed(playbackRate);
|
|
41964
42005
|
}
|
|
41965
42006
|
}, [playbackRate]);
|
|
41966
|
-
|
|
42007
|
+
useEffect45(() => {
|
|
41967
42008
|
if (!animationRef.current) {
|
|
41968
42009
|
return;
|
|
41969
42010
|
}
|
|
@@ -41996,14 +42037,14 @@ var Lottie = ({
|
|
|
41996
42037
|
};
|
|
41997
42038
|
|
|
41998
42039
|
// src/components/homepage/Demo/DisplayedEmoji.tsx
|
|
41999
|
-
import { useEffect as
|
|
42040
|
+
import { useEffect as useEffect46, useMemo as useMemo59, useState as useState46 } from "react";
|
|
42000
42041
|
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
42001
42042
|
var DisplayedEmoji = ({ emoji }) => {
|
|
42002
42043
|
const [data, setData] = useState46(null);
|
|
42003
42044
|
const { durationInFrames, fps } = useVideoConfig();
|
|
42004
42045
|
const [browser, setBrowser] = useState46(typeof document !== "undefined");
|
|
42005
42046
|
const { delayRender: delayRender2, continueRender, cancelRender: cancelRender2 } = useDelayRender();
|
|
42006
|
-
const src =
|
|
42047
|
+
const src = useMemo59(() => {
|
|
42007
42048
|
if (emoji === "melting") {
|
|
42008
42049
|
return "https://fonts.gstatic.com/s/e/notoemoji/latest/1fae0/lottie.json";
|
|
42009
42050
|
}
|
|
@@ -42016,7 +42057,7 @@ var DisplayedEmoji = ({ emoji }) => {
|
|
|
42016
42057
|
throw new Error("Unknown emoji");
|
|
42017
42058
|
}, [emoji]);
|
|
42018
42059
|
const [handle] = useState46(() => delayRender2("Loading emojis!"));
|
|
42019
|
-
|
|
42060
|
+
useEffect46(() => {
|
|
42020
42061
|
fetch(src).then((res) => res.json()).then((json) => {
|
|
42021
42062
|
setData({
|
|
42022
42063
|
duration: getLottieMetadata(json)?.durationInSeconds,
|
|
@@ -42027,7 +42068,7 @@ var DisplayedEmoji = ({ emoji }) => {
|
|
|
42027
42068
|
cancelRender2(err);
|
|
42028
42069
|
});
|
|
42029
42070
|
}, [handle, src, continueRender, cancelRender2]);
|
|
42030
|
-
|
|
42071
|
+
useEffect46(() => {
|
|
42031
42072
|
if (typeof document !== "undefined") {
|
|
42032
42073
|
setBrowser(true);
|
|
42033
42074
|
}
|
|
@@ -42123,7 +42164,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
42123
42164
|
transforms: transforms.current
|
|
42124
42165
|
});
|
|
42125
42166
|
}, []);
|
|
42126
|
-
|
|
42167
|
+
useEffect47(() => {
|
|
42127
42168
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
42128
42169
|
return;
|
|
42129
42170
|
}
|
|
@@ -42140,7 +42181,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
42140
42181
|
onRight
|
|
42141
42182
|
};
|
|
42142
42183
|
}, [onLeft, onRight]);
|
|
42143
|
-
|
|
42184
|
+
useEffect47(() => {
|
|
42144
42185
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
42145
42186
|
return;
|
|
42146
42187
|
}
|
|
@@ -42430,7 +42471,7 @@ var Temperature = ({ theme, city, temperatureInCelsius }) => {
|
|
|
42430
42471
|
};
|
|
42431
42472
|
|
|
42432
42473
|
// src/components/homepage/Demo/TrendingRepos.tsx
|
|
42433
|
-
import { useMemo as
|
|
42474
|
+
import { useMemo as useMemo60 } from "react";
|
|
42434
42475
|
import { jsx as jsx81, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
42435
42476
|
var TrendingRepoItem = ({ repo, theme, number }) => {
|
|
42436
42477
|
const frame = useCurrentFrame();
|
|
@@ -42443,7 +42484,7 @@ var TrendingRepoItem = ({ repo, theme, number }) => {
|
|
|
42443
42484
|
},
|
|
42444
42485
|
delay: number * 10 + 20
|
|
42445
42486
|
});
|
|
42446
|
-
const item =
|
|
42487
|
+
const item = useMemo60(() => {
|
|
42447
42488
|
return {
|
|
42448
42489
|
lineHeight: 1.1,
|
|
42449
42490
|
fontFamily: "GTPlanar",
|
|
@@ -42555,7 +42596,7 @@ var Cards = ({
|
|
|
42555
42596
|
const positions = useRef56(getInitialPositions());
|
|
42556
42597
|
const shouldBePositions = useRef56(getInitialPositions());
|
|
42557
42598
|
const { isRendering } = useRemotionEnvironment();
|
|
42558
|
-
|
|
42599
|
+
useEffect48(() => {
|
|
42559
42600
|
const { current } = container4;
|
|
42560
42601
|
if (!current) {
|
|
42561
42602
|
return;
|
|
@@ -42650,7 +42691,7 @@ var HomepageVideoComp = ({
|
|
|
42650
42691
|
setRerenders(rerenders + 1);
|
|
42651
42692
|
updateCardOrder(newIndices);
|
|
42652
42693
|
}, [rerenders, updateCardOrder]);
|
|
42653
|
-
const emoji =
|
|
42694
|
+
const emoji = useMemo61(() => {
|
|
42654
42695
|
if ((emojiIndex + 1e4 * 3) % 3 === 1) {
|
|
42655
42696
|
return "melting";
|
|
42656
42697
|
}
|
|
@@ -42659,7 +42700,7 @@ var HomepageVideoComp = ({
|
|
|
42659
42700
|
}
|
|
42660
42701
|
return "partying-face";
|
|
42661
42702
|
}, [emojiIndex]);
|
|
42662
|
-
const audioSrc =
|
|
42703
|
+
const audioSrc = useMemo61(() => {
|
|
42663
42704
|
if (emoji === "fire") {
|
|
42664
42705
|
return fireAudio;
|
|
42665
42706
|
}
|
|
@@ -42668,7 +42709,7 @@ var HomepageVideoComp = ({
|
|
|
42668
42709
|
}
|
|
42669
42710
|
return sadAudio;
|
|
42670
42711
|
}, [emoji]);
|
|
42671
|
-
|
|
42712
|
+
useEffect49(() => {
|
|
42672
42713
|
const a2 = prefetch(fireAudio);
|
|
42673
42714
|
const b2 = prefetch(partyHornAudio);
|
|
42674
42715
|
const c2 = prefetch(sadAudio);
|
|
@@ -42744,7 +42785,7 @@ import {
|
|
|
42744
42785
|
import { BufferTarget, StreamTarget } from "mediabunny";
|
|
42745
42786
|
|
|
42746
42787
|
// ../core/dist/esm/version.mjs
|
|
42747
|
-
var VERSION2 = "4.0.
|
|
42788
|
+
var VERSION2 = "4.0.486";
|
|
42748
42789
|
|
|
42749
42790
|
// ../web-renderer/dist/esm/index.mjs
|
|
42750
42791
|
import { AudioSample, VideoSample } from "mediabunny";
|
|
@@ -46488,10 +46529,7 @@ var getDefaultTextDecorationThickness = (fontSizePx) => {
|
|
|
46488
46529
|
return Math.max(1, Number.isFinite(fontSizePx) ? fontSizePx / 16 : 1);
|
|
46489
46530
|
};
|
|
46490
46531
|
var getTextDecorationStyle = (style2) => {
|
|
46491
|
-
if (style2 === "wavy") {
|
|
46492
|
-
return null;
|
|
46493
|
-
}
|
|
46494
|
-
if (style2 === "double" || style2 === "dotted" || style2 === "dashed") {
|
|
46532
|
+
if (style2 === "double" || style2 === "dotted" || style2 === "dashed" || style2 === "wavy") {
|
|
46495
46533
|
return style2;
|
|
46496
46534
|
}
|
|
46497
46535
|
return "solid";
|
|
@@ -46501,9 +46539,6 @@ var parseTextDecoration = ({
|
|
|
46501
46539
|
style: style2
|
|
46502
46540
|
}) => {
|
|
46503
46541
|
const textDecorationStyle = getTextDecorationStyle(style2.getPropertyValue("text-decoration-style").trim());
|
|
46504
|
-
if (textDecorationStyle === null) {
|
|
46505
|
-
return null;
|
|
46506
|
-
}
|
|
46507
46542
|
const textDecorationLine = style2.getPropertyValue("text-decoration-line");
|
|
46508
46543
|
const lineParts = textDecorationLine.split(/\s+/);
|
|
46509
46544
|
const lines2 = textDecorationLines.filter((line) => lineParts.includes(line));
|
|
@@ -46577,6 +46612,34 @@ var getTextDecorationLineDashPattern = (style2, thickness) => {
|
|
|
46577
46612
|
}
|
|
46578
46613
|
return [];
|
|
46579
46614
|
};
|
|
46615
|
+
var drawWavyTextDecorationLine = ({
|
|
46616
|
+
contextToDraw,
|
|
46617
|
+
endX,
|
|
46618
|
+
lineY,
|
|
46619
|
+
startX,
|
|
46620
|
+
thickness
|
|
46621
|
+
}) => {
|
|
46622
|
+
const step = Math.max(2, thickness);
|
|
46623
|
+
const amplitude = step;
|
|
46624
|
+
const halfWavelength = step * 2;
|
|
46625
|
+
const wavelength = halfWavelength * 2;
|
|
46626
|
+
const phaseStartX = Math.floor(startX / wavelength) * wavelength;
|
|
46627
|
+
contextToDraw.save();
|
|
46628
|
+
contextToDraw.beginPath();
|
|
46629
|
+
contextToDraw.rect(startX, lineY - amplitude - thickness, endX - startX, (amplitude + thickness) * 2);
|
|
46630
|
+
contextToDraw.clip();
|
|
46631
|
+
contextToDraw.beginPath();
|
|
46632
|
+
contextToDraw.moveTo(phaseStartX, lineY);
|
|
46633
|
+
let x = phaseStartX;
|
|
46634
|
+
let direction = 1;
|
|
46635
|
+
while (x < endX) {
|
|
46636
|
+
contextToDraw.quadraticCurveTo(x + halfWavelength / 2, lineY + direction * amplitude * 2, x + halfWavelength, lineY);
|
|
46637
|
+
x += halfWavelength;
|
|
46638
|
+
direction = -direction;
|
|
46639
|
+
}
|
|
46640
|
+
contextToDraw.stroke();
|
|
46641
|
+
contextToDraw.restore();
|
|
46642
|
+
};
|
|
46580
46643
|
var strokeTextDecorationLine = ({
|
|
46581
46644
|
contextToDraw,
|
|
46582
46645
|
endX,
|
|
@@ -46618,6 +46681,17 @@ var drawTextDecoration = ({
|
|
|
46618
46681
|
thickness: textDecoration.thickness,
|
|
46619
46682
|
fontSizePx
|
|
46620
46683
|
});
|
|
46684
|
+
if (textDecoration.style === "wavy") {
|
|
46685
|
+
contextToDraw.setLineDash([]);
|
|
46686
|
+
drawWavyTextDecorationLine({
|
|
46687
|
+
contextToDraw,
|
|
46688
|
+
endX,
|
|
46689
|
+
lineY,
|
|
46690
|
+
startX,
|
|
46691
|
+
thickness: textDecoration.thickness
|
|
46692
|
+
});
|
|
46693
|
+
continue;
|
|
46694
|
+
}
|
|
46621
46695
|
if (textDecoration.style === "double") {
|
|
46622
46696
|
contextToDraw.setLineDash([]);
|
|
46623
46697
|
strokeTextDecorationLine({
|
|
@@ -47564,7 +47638,7 @@ var renderMediaOnWeb = (options2) => {
|
|
|
47564
47638
|
};
|
|
47565
47639
|
|
|
47566
47640
|
// src/components/homepage/Demo/DemoRender.tsx
|
|
47567
|
-
import
|
|
47641
|
+
import React70, { useCallback as useCallback48 } from "react";
|
|
47568
47642
|
import { z } from "zod";
|
|
47569
47643
|
|
|
47570
47644
|
// src/components/homepage/Demo/DemoErrorIcon.tsx
|
|
@@ -47670,7 +47744,7 @@ var Progress = ({ progress }) => {
|
|
|
47670
47744
|
};
|
|
47671
47745
|
|
|
47672
47746
|
// src/components/homepage/Demo/Spinner.tsx
|
|
47673
|
-
import { useMemo as
|
|
47747
|
+
import { useMemo as useMemo64 } from "react";
|
|
47674
47748
|
import { jsx as jsx97, jsxs as jsxs30, Fragment as Fragment15 } from "react/jsx-runtime";
|
|
47675
47749
|
var viewBox2 = 100;
|
|
47676
47750
|
var lines2 = 8;
|
|
@@ -47678,7 +47752,7 @@ var className2 = "__remotion_spinner_line";
|
|
|
47678
47752
|
var remotionSpinnerAnimation = "__remotion_spinner_animation";
|
|
47679
47753
|
var translated3 = "M 44 0 L 50 0 a 6 6 0 0 1 6 6 L 56 26 a 6 6 0 0 1 -6 6 L 50 32 a 6 6 0 0 1 -6 -6 L 44 6 a 6 6 0 0 1 6 -6 Z";
|
|
47680
47754
|
var Spinner2 = ({ size: size4, duration }) => {
|
|
47681
|
-
const style2 =
|
|
47755
|
+
const style2 = useMemo64(() => {
|
|
47682
47756
|
return {
|
|
47683
47757
|
width: size4,
|
|
47684
47758
|
height: size4
|
|
@@ -47762,7 +47836,7 @@ var style2 = {
|
|
|
47762
47836
|
justifyContent: "center"
|
|
47763
47837
|
};
|
|
47764
47838
|
var RenderButton = ({ renderData, onError, playerRef }) => {
|
|
47765
|
-
const [state, setState] =
|
|
47839
|
+
const [state, setState] = React70.useState({
|
|
47766
47840
|
type: "idle"
|
|
47767
47841
|
});
|
|
47768
47842
|
const triggerRender = useCallback48(async () => {
|
|
@@ -47940,13 +48014,13 @@ var DragAndDropNudge = () => {
|
|
|
47940
48014
|
};
|
|
47941
48015
|
|
|
47942
48016
|
// src/components/homepage/Demo/PlayerSeekBar.tsx
|
|
47943
|
-
import { useCallback as useCallback50, useEffect as
|
|
48017
|
+
import { useCallback as useCallback50, useEffect as useEffect51, useMemo as useMemo67, useRef as useRef57, useState as useState51 } from "react";
|
|
47944
48018
|
|
|
47945
48019
|
// src/components/homepage/layout/use-el-size.ts
|
|
47946
|
-
import { useCallback as useCallback49, useEffect as
|
|
48020
|
+
import { useCallback as useCallback49, useEffect as useEffect50, useMemo as useMemo66, useState as useState50 } from "react";
|
|
47947
48021
|
var useElementSize2 = (ref) => {
|
|
47948
48022
|
const [size4, setSize] = useState50(null);
|
|
47949
|
-
const observer =
|
|
48023
|
+
const observer = useMemo66(() => {
|
|
47950
48024
|
if (typeof ResizeObserver === "undefined") {
|
|
47951
48025
|
return;
|
|
47952
48026
|
}
|
|
@@ -47967,7 +48041,7 @@ var useElementSize2 = (ref) => {
|
|
|
47967
48041
|
height: rect[0].height
|
|
47968
48042
|
});
|
|
47969
48043
|
}, [ref]);
|
|
47970
|
-
|
|
48044
|
+
useEffect50(() => {
|
|
47971
48045
|
updateSize();
|
|
47972
48046
|
if (!observer) {
|
|
47973
48047
|
return;
|
|
@@ -48023,7 +48097,7 @@ var findBodyInWhichDivIsLocated2 = (div) => {
|
|
|
48023
48097
|
};
|
|
48024
48098
|
var useHoverState2 = (ref, hideControlsWhenPointerDoesntMove) => {
|
|
48025
48099
|
const [hovered, setHovered] = useState51(false);
|
|
48026
|
-
|
|
48100
|
+
useEffect51(() => {
|
|
48027
48101
|
const { current } = ref;
|
|
48028
48102
|
if (!current) {
|
|
48029
48103
|
return;
|
|
@@ -48074,7 +48148,7 @@ var PlayerSeekBar2 = ({
|
|
|
48074
48148
|
const size4 = useElementSize2(containerRef.current);
|
|
48075
48149
|
const [playing, setPlaying] = useState51(false);
|
|
48076
48150
|
const [frame, setFrame] = useState51(0);
|
|
48077
|
-
|
|
48151
|
+
useEffect51(() => {
|
|
48078
48152
|
const { current } = playerRef;
|
|
48079
48153
|
if (!current) {
|
|
48080
48154
|
return;
|
|
@@ -48087,7 +48161,7 @@ var PlayerSeekBar2 = ({
|
|
|
48087
48161
|
current.removeEventListener("frameupdate", onFrameUpdate);
|
|
48088
48162
|
};
|
|
48089
48163
|
}, [playerRef]);
|
|
48090
|
-
|
|
48164
|
+
useEffect51(() => {
|
|
48091
48165
|
const { current } = playerRef;
|
|
48092
48166
|
if (!current) {
|
|
48093
48167
|
return;
|
|
@@ -48148,7 +48222,7 @@ var PlayerSeekBar2 = ({
|
|
|
48148
48222
|
}
|
|
48149
48223
|
onSeekEnd();
|
|
48150
48224
|
}, [dragging, onSeekEnd, playerRef]);
|
|
48151
|
-
|
|
48225
|
+
useEffect51(() => {
|
|
48152
48226
|
if (!dragging.dragging) {
|
|
48153
48227
|
return;
|
|
48154
48228
|
}
|
|
@@ -48160,7 +48234,7 @@ var PlayerSeekBar2 = ({
|
|
|
48160
48234
|
body.removeEventListener("pointerup", onPointerUp);
|
|
48161
48235
|
};
|
|
48162
48236
|
}, [dragging.dragging, onPointerMove, onPointerUp]);
|
|
48163
|
-
const knobStyle =
|
|
48237
|
+
const knobStyle = useMemo67(() => {
|
|
48164
48238
|
return {
|
|
48165
48239
|
height: KNOB_SIZE3,
|
|
48166
48240
|
width: KNOB_SIZE3,
|
|
@@ -48174,7 +48248,7 @@ var PlayerSeekBar2 = ({
|
|
|
48174
48248
|
transition: "opacity 0.s ease"
|
|
48175
48249
|
};
|
|
48176
48250
|
}, [barHovered, durationInFrames, frame, width2]);
|
|
48177
|
-
const fillStyle =
|
|
48251
|
+
const fillStyle = useMemo67(() => {
|
|
48178
48252
|
return {
|
|
48179
48253
|
height: BAR_HEIGHT3,
|
|
48180
48254
|
backgroundColor: "var(--ifm-font-color-base)",
|
|
@@ -48183,7 +48257,7 @@ var PlayerSeekBar2 = ({
|
|
|
48183
48257
|
borderRadius: BAR_HEIGHT3 / 2
|
|
48184
48258
|
};
|
|
48185
48259
|
}, [durationInFrames, frame, inFrame]);
|
|
48186
|
-
const active =
|
|
48260
|
+
const active = useMemo67(() => {
|
|
48187
48261
|
return {
|
|
48188
48262
|
height: BAR_HEIGHT3,
|
|
48189
48263
|
backgroundColor: "var(--ifm-font-color-base)",
|
|
@@ -48218,7 +48292,7 @@ var PlayerSeekBar2 = ({
|
|
|
48218
48292
|
};
|
|
48219
48293
|
|
|
48220
48294
|
// src/components/homepage/Demo/PlayerVolume.tsx
|
|
48221
|
-
import { useCallback as useCallback51, useEffect as
|
|
48295
|
+
import { useCallback as useCallback51, useEffect as useEffect53, useRef as useRef58, useState as useState54 } from "react";
|
|
48222
48296
|
|
|
48223
48297
|
// src/components/homepage/Demo/icons.tsx
|
|
48224
48298
|
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
@@ -48279,7 +48353,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
48279
48353
|
const [muted, setIsMuted] = useState54(() => playerRef.current?.isMuted() ?? true);
|
|
48280
48354
|
const [isHovered, setIsHovered] = useState54(false);
|
|
48281
48355
|
const timerRef = useRef58(null);
|
|
48282
|
-
|
|
48356
|
+
useEffect53(() => {
|
|
48283
48357
|
const { current } = playerRef;
|
|
48284
48358
|
if (!current) {
|
|
48285
48359
|
return;
|
|
@@ -48292,7 +48366,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
48292
48366
|
current.removeEventListener("mutechange", onMutedChange);
|
|
48293
48367
|
};
|
|
48294
48368
|
}, [playerRef]);
|
|
48295
|
-
|
|
48369
|
+
useEffect53(() => {
|
|
48296
48370
|
if (isHovered) {
|
|
48297
48371
|
document.body.style.userSelect = "none";
|
|
48298
48372
|
} else {
|
|
@@ -48337,7 +48411,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
48337
48411
|
};
|
|
48338
48412
|
|
|
48339
48413
|
// src/components/homepage/Demo/PlayPauseButton.tsx
|
|
48340
|
-
import
|
|
48414
|
+
import React75, { useCallback as useCallback53, useEffect as useEffect55 } from "react";
|
|
48341
48415
|
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
48342
48416
|
var playerButtonStyle2 = {
|
|
48343
48417
|
appearance: "none",
|
|
@@ -48354,8 +48428,8 @@ var playerButtonStyle2 = {
|
|
|
48354
48428
|
color: PALETTE.TEXT_COLOR
|
|
48355
48429
|
};
|
|
48356
48430
|
var PlayPauseButton = ({ playerRef }) => {
|
|
48357
|
-
const [playing, setPlaying] =
|
|
48358
|
-
|
|
48431
|
+
const [playing, setPlaying] = React75.useState(true);
|
|
48432
|
+
useEffect55(() => {
|
|
48359
48433
|
const { current } = playerRef;
|
|
48360
48434
|
if (!current) {
|
|
48361
48435
|
return;
|
|
@@ -48392,7 +48466,7 @@ var PlayPauseButton = ({ playerRef }) => {
|
|
|
48392
48466
|
};
|
|
48393
48467
|
|
|
48394
48468
|
// src/components/homepage/Demo/TimeDisplay.tsx
|
|
48395
|
-
import
|
|
48469
|
+
import React76, { useEffect as useEffect56 } from "react";
|
|
48396
48470
|
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
48397
48471
|
var formatTime2 = (timeInSeconds) => {
|
|
48398
48472
|
const minutes = Math.floor(timeInSeconds / 60);
|
|
@@ -48400,8 +48474,8 @@ var formatTime2 = (timeInSeconds) => {
|
|
|
48400
48474
|
return `${String(minutes)}:${String(seconds).padStart(2, "0")}`;
|
|
48401
48475
|
};
|
|
48402
48476
|
var TimeDisplay = ({ fps, playerRef }) => {
|
|
48403
|
-
const [time, setTime] =
|
|
48404
|
-
|
|
48477
|
+
const [time, setTime] = React76.useState(0);
|
|
48478
|
+
useEffect56(() => {
|
|
48405
48479
|
const { current } = playerRef;
|
|
48406
48480
|
if (!current) {
|
|
48407
48481
|
return;
|
|
@@ -48479,7 +48553,7 @@ var PlayerControls = ({ playerRef, durationInFrames, fps, children }) => {
|
|
|
48479
48553
|
};
|
|
48480
48554
|
|
|
48481
48555
|
// src/components/homepage/Demo/ThemeNudge.tsx
|
|
48482
|
-
import
|
|
48556
|
+
import React77 from "react";
|
|
48483
48557
|
import { jsx as jsx111, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
48484
48558
|
var origWidth3 = 37;
|
|
48485
48559
|
var scale3 = 0.4;
|
|
@@ -48502,7 +48576,7 @@ var Icon6 = () => {
|
|
|
48502
48576
|
};
|
|
48503
48577
|
var ThemeNudge = () => {
|
|
48504
48578
|
const { colorMode, setColorMode } = useColorMode();
|
|
48505
|
-
const toggleTheme =
|
|
48579
|
+
const toggleTheme = React77.useCallback((e) => {
|
|
48506
48580
|
e.preventDefault();
|
|
48507
48581
|
setColorMode(colorMode === "dark" ? "light" : "dark");
|
|
48508
48582
|
}, [colorMode, setColorMode]);
|
|
@@ -48573,7 +48647,7 @@ var Demo = () => {
|
|
|
48573
48647
|
const [cardOrder, setCardOrder] = useState56([0, 1, 2, 3]);
|
|
48574
48648
|
const [emojiIndex, setEmojiIndex] = useState56(0);
|
|
48575
48649
|
const [error2, setError] = useState56(false);
|
|
48576
|
-
|
|
48650
|
+
useEffect57(() => {
|
|
48577
48651
|
getDataAndProps().then((d2) => {
|
|
48578
48652
|
setData(d2);
|
|
48579
48653
|
}).catch((err) => {
|
|
@@ -48581,7 +48655,7 @@ var Demo = () => {
|
|
|
48581
48655
|
setError(true);
|
|
48582
48656
|
});
|
|
48583
48657
|
}, []);
|
|
48584
|
-
|
|
48658
|
+
useEffect57(() => {
|
|
48585
48659
|
const { current: playerRef } = ref;
|
|
48586
48660
|
if (!playerRef || !data2) {
|
|
48587
48661
|
return;
|
|
@@ -48597,7 +48671,7 @@ var Demo = () => {
|
|
|
48597
48671
|
const updateCardOrder = useCallback55((newCardOrder) => {
|
|
48598
48672
|
setCardOrder(newCardOrder);
|
|
48599
48673
|
}, []);
|
|
48600
|
-
const props =
|
|
48674
|
+
const props = useMemo68(() => {
|
|
48601
48675
|
return {
|
|
48602
48676
|
theme: colorMode,
|
|
48603
48677
|
onToggle: () => {
|
|
@@ -48684,7 +48758,7 @@ var Demo = () => {
|
|
|
48684
48758
|
};
|
|
48685
48759
|
|
|
48686
48760
|
// src/components/homepage/EvaluateRemotion.tsx
|
|
48687
|
-
import { useEffect as
|
|
48761
|
+
import { useEffect as useEffect58, useState as useState57 } from "react";
|
|
48688
48762
|
|
|
48689
48763
|
// src/components/homepage/layout/Button.tsx
|
|
48690
48764
|
import { jsx as jsx117 } from "react/jsx-runtime";
|
|
@@ -48729,7 +48803,7 @@ var BlueButton = (props) => {
|
|
|
48729
48803
|
import { jsx as jsx118, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
48730
48804
|
var EvaluateRemotionSection = () => {
|
|
48731
48805
|
const [dailyAvatars, setDailyAvatars] = useState57([]);
|
|
48732
|
-
|
|
48806
|
+
useEffect58(() => {
|
|
48733
48807
|
const avatars = experts.map((expert) => expert.image);
|
|
48734
48808
|
const selectedAvatars = [];
|
|
48735
48809
|
for (let i = 0;i < 3; i++) {
|
|
@@ -48826,7 +48900,7 @@ var EvaluateRemotionSection = () => {
|
|
|
48826
48900
|
var EvaluateRemotion_default = EvaluateRemotionSection;
|
|
48827
48901
|
|
|
48828
48902
|
// src/components/homepage/IfYouKnowReact.tsx
|
|
48829
|
-
import { useEffect as
|
|
48903
|
+
import { useEffect as useEffect59, useState as useState58 } from "react";
|
|
48830
48904
|
import { jsx as jsx119, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
48831
48905
|
var isWebkit = () => {
|
|
48832
48906
|
if (typeof window === "undefined") {
|
|
@@ -48842,7 +48916,7 @@ var icon3 = {
|
|
|
48842
48916
|
};
|
|
48843
48917
|
var IfYouKnowReact = () => {
|
|
48844
48918
|
const [vid, setVid] = useState58("/img/compose.webm");
|
|
48845
|
-
|
|
48919
|
+
useEffect59(() => {
|
|
48846
48920
|
if (isWebkit()) {
|
|
48847
48921
|
setVid("/img/compose.mp4");
|
|
48848
48922
|
}
|
|
@@ -48989,7 +49063,7 @@ var NewsletterButton = () => {
|
|
|
48989
49063
|
};
|
|
48990
49064
|
|
|
48991
49065
|
// src/components/homepage/ParameterizeAndEdit.tsx
|
|
48992
|
-
import { useEffect as
|
|
49066
|
+
import { useEffect as useEffect60, useRef as useRef60, useState as useState60 } from "react";
|
|
48993
49067
|
import { jsx as jsx121, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
48994
49068
|
var icon4 = {
|
|
48995
49069
|
height: 16,
|
|
@@ -48998,7 +49072,7 @@ var icon4 = {
|
|
|
48998
49072
|
var ParameterizeAndEdit = () => {
|
|
48999
49073
|
const ref = useRef60(null);
|
|
49000
49074
|
const [vid, setVid] = useState60("/img/editing-vp9-chrome.webm");
|
|
49001
|
-
|
|
49075
|
+
useEffect60(() => {
|
|
49002
49076
|
if (isWebkit()) {
|
|
49003
49077
|
setVid("/img/editing-safari.mp4");
|
|
49004
49078
|
}
|
|
@@ -49112,7 +49186,7 @@ var ParameterizeAndEdit = () => {
|
|
|
49112
49186
|
};
|
|
49113
49187
|
|
|
49114
49188
|
// src/components/homepage/RealMp4Videos.tsx
|
|
49115
|
-
import { useEffect as
|
|
49189
|
+
import { useEffect as useEffect61, useRef as useRef61, useState as useState61 } from "react";
|
|
49116
49190
|
import { jsx as jsx125, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
49117
49191
|
var icon5 = {
|
|
49118
49192
|
height: 16,
|
|
@@ -49122,12 +49196,12 @@ var RealMP4Videos = () => {
|
|
|
49122
49196
|
const ref = useRef61(null);
|
|
49123
49197
|
const videoRef = useRef61(null);
|
|
49124
49198
|
const [vid, setVid] = useState61("/img/render-progress.webm");
|
|
49125
|
-
|
|
49199
|
+
useEffect61(() => {
|
|
49126
49200
|
if (isWebkit()) {
|
|
49127
49201
|
setVid("/img/render-progress.mp4");
|
|
49128
49202
|
}
|
|
49129
49203
|
}, []);
|
|
49130
|
-
|
|
49204
|
+
useEffect61(() => {
|
|
49131
49205
|
const { current } = ref;
|
|
49132
49206
|
if (!current) {
|
|
49133
49207
|
return;
|
|
@@ -49377,16 +49451,16 @@ import { useRef as useRef66, useState as useState66 } from "react";
|
|
|
49377
49451
|
|
|
49378
49452
|
// src/components/homepage/MuxVideo.tsx
|
|
49379
49453
|
import Hls2 from "hls.js";
|
|
49380
|
-
import { forwardRef as forwardRef41, useEffect as
|
|
49454
|
+
import { forwardRef as forwardRef41, useEffect as useEffect65, useImperativeHandle as useImperativeHandle15, useRef as useRef65 } from "react";
|
|
49381
49455
|
|
|
49382
49456
|
// src/components/homepage/VideoPlayerWithControls.tsx
|
|
49383
49457
|
import Hls from "hls.js";
|
|
49384
49458
|
import"plyr/dist/plyr.css";
|
|
49385
|
-
import { forwardRef as forwardRef40, useCallback as useCallback57, useEffect as
|
|
49459
|
+
import { forwardRef as forwardRef40, useCallback as useCallback57, useEffect as useEffect63, useRef as useRef63, useState as useState64 } from "react";
|
|
49386
49460
|
import { jsx as jsx128 } from "react/jsx-runtime";
|
|
49387
49461
|
var useCombinedRefs = function(...refs) {
|
|
49388
49462
|
const targetRef = useRef63(null);
|
|
49389
|
-
|
|
49463
|
+
useEffect63(() => {
|
|
49390
49464
|
refs.forEach((ref) => {
|
|
49391
49465
|
if (!ref)
|
|
49392
49466
|
return;
|
|
@@ -49415,12 +49489,12 @@ var VideoPlayerWithControls = forwardRef40(({ playbackId, poster, currentTime, o
|
|
|
49415
49489
|
console.error("Error getting img dimensions", event);
|
|
49416
49490
|
}
|
|
49417
49491
|
}, [onLoaded, onSize]);
|
|
49418
|
-
|
|
49492
|
+
useEffect63(() => {
|
|
49419
49493
|
const img = new Image;
|
|
49420
49494
|
img.onload = (evt) => onImageLoad(evt);
|
|
49421
49495
|
img.src = poster;
|
|
49422
49496
|
}, [onImageLoad, poster]);
|
|
49423
|
-
|
|
49497
|
+
useEffect63(() => {
|
|
49424
49498
|
const video = videoRef.current;
|
|
49425
49499
|
const src = `https://stream.mux.com/${playbackId}.m3u8`;
|
|
49426
49500
|
let hls;
|
|
@@ -49463,7 +49537,7 @@ var VideoPlayerWithControls = forwardRef40(({ playbackId, poster, currentTime, o
|
|
|
49463
49537
|
}
|
|
49464
49538
|
};
|
|
49465
49539
|
}, [playbackId, playerInitTime, videoError, videoRef]);
|
|
49466
|
-
|
|
49540
|
+
useEffect63(() => {
|
|
49467
49541
|
const video = videoRef.current;
|
|
49468
49542
|
if (currentTime && video) {
|
|
49469
49543
|
video.currentTime = currentTime;
|
|
@@ -49490,7 +49564,7 @@ var MuxVideoForward = ({ muxId, ...props }, ref) => {
|
|
|
49490
49564
|
const videoRef = useRef65(null);
|
|
49491
49565
|
const vidUrl = getVideoToPlayUrl(muxId);
|
|
49492
49566
|
useImperativeHandle15(ref, () => videoRef.current, []);
|
|
49493
|
-
|
|
49567
|
+
useEffect65(() => {
|
|
49494
49568
|
let hls;
|
|
49495
49569
|
if (videoRef.current) {
|
|
49496
49570
|
const { current } = videoRef;
|
|
@@ -51121,7 +51195,7 @@ var GithubButton = () => {
|
|
|
51121
51195
|
" ",
|
|
51122
51196
|
/* @__PURE__ */ jsx167("div", {
|
|
51123
51197
|
className: "text-xs inline-block ml-2 leading-none mt-[3px] self-center",
|
|
51124
|
-
children: "
|
|
51198
|
+
children: "52k"
|
|
51125
51199
|
})
|
|
51126
51200
|
]
|
|
51127
51201
|
});
|