@remotion/promo-pages 4.0.489 → 4.0.491
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 +1018 -556
- package/dist/components/Homepage.js +5 -17
- package/dist/components/homepage/CommunityStatsItems.js +1 -1
- package/dist/components/homepage/Demo/Card.d.ts +3 -3
- package/dist/components/homepage/Demo/DemoRender.d.ts +1 -1
- package/dist/components/homepage/Demo/DisplayedEmoji.js +12 -4
- package/dist/components/homepage/Demo/math.d.ts +1 -1
- package/dist/components/homepage/GitHubButton.js +1 -1
- package/dist/components/homepage/MakeVideosAgentically.d.ts +1 -0
- package/dist/components/homepage/MakeVideosAgentically.js +4 -6
- package/dist/components/homepage/MakeVideosInteractively.d.ts +2 -0
- package/dist/components/homepage/MakeVideosInteractively.js +3 -6
- package/dist/components/homepage/MakeVideosLinks.js +1 -1
- package/dist/components/homepage/MakeVideosProgrammatically.d.ts +2 -0
- package/dist/components/homepage/MakeVideosProgrammatically.js +2 -5
- package/dist/components/homepage/Pricing.d.ts +6 -1
- package/dist/components/homepage/Pricing.js +12 -2
- package/dist/components/homepage/WriteInReact.js +1 -1
- package/dist/components/team/TrustSection.js +1 -1
- package/dist/design.js +355 -194
- package/dist/experts.js +340 -168
- package/dist/homepage/Pricing.js +372 -211
- package/dist/prompts/PromptsGallery.js +352 -191
- package/dist/prompts/PromptsShow.js +358 -197
- package/dist/prompts/PromptsSubmit.js +344 -183
- package/dist/team.js +329 -168
- package/dist/template-modal-content.js +372 -211
- package/dist/templates.js +373 -209
- package/package.json +13 -13
|
@@ -17369,7 +17369,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
17369
17369
|
// ../design/dist/esm/index.mjs
|
|
17370
17370
|
import * as React23 from "react";
|
|
17371
17371
|
import * as React3 from "react";
|
|
17372
|
-
import { Fragment as
|
|
17372
|
+
import { Fragment as Fragment22, jsx as jsx43 } from "react/jsx-runtime";
|
|
17373
17373
|
import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
|
|
17374
17374
|
|
|
17375
17375
|
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
@@ -21717,13 +21717,12 @@ import { jsx as jsx34 } from "react/jsx-runtime";
|
|
|
21717
21717
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
21718
21718
|
import React39, { useMemo as useMemo37 } from "react";
|
|
21719
21719
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
21720
|
-
import {
|
|
21721
|
-
Children,
|
|
21720
|
+
import React41, {
|
|
21722
21721
|
forwardRef as forwardRef14,
|
|
21723
21722
|
useMemo as useMemo38
|
|
21724
21723
|
} from "react";
|
|
21725
21724
|
import React40 from "react";
|
|
21726
|
-
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
21725
|
+
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
21727
21726
|
import React42 from "react";
|
|
21728
21727
|
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
|
|
21729
21728
|
import {
|
|
@@ -22613,26 +22612,20 @@ var continueRenderInternal = ({
|
|
|
22613
22612
|
if (typeof handle !== "number") {
|
|
22614
22613
|
throw new TypeError("The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: " + JSON.stringify(handle));
|
|
22615
22614
|
}
|
|
22616
|
-
|
|
22617
|
-
|
|
22618
|
-
|
|
22619
|
-
|
|
22620
|
-
|
|
22621
|
-
|
|
22622
|
-
|
|
22623
|
-
|
|
22624
|
-
|
|
22625
|
-
|
|
22626
|
-
|
|
22627
|
-
|
|
22628
|
-
|
|
22629
|
-
|
|
22630
|
-
delete scope.remotion_delayRenderTimeouts[handle];
|
|
22631
|
-
}
|
|
22632
|
-
return false;
|
|
22633
|
-
}
|
|
22634
|
-
return true;
|
|
22635
|
-
});
|
|
22615
|
+
const handleExists = scope.remotion_delayRenderHandles.includes(handle);
|
|
22616
|
+
const timeoutEntry = scope.remotion_delayRenderTimeouts[handle];
|
|
22617
|
+
if (handleExists && environment.isRendering && timeoutEntry) {
|
|
22618
|
+
const { label: label2, startTime, timeout } = timeoutEntry;
|
|
22619
|
+
clearTimeout(timeout);
|
|
22620
|
+
const message = [
|
|
22621
|
+
label2 ? `"${label2}"` : "A handle",
|
|
22622
|
+
DELAY_RENDER_CLEAR_TOKEN,
|
|
22623
|
+
`${Date.now() - startTime}ms`
|
|
22624
|
+
].filter(truthy).join(" ");
|
|
22625
|
+
Log.verbose({ logLevel, tag: "delayRender()" }, message);
|
|
22626
|
+
delete scope.remotion_delayRenderTimeouts[handle];
|
|
22627
|
+
}
|
|
22628
|
+
scope.remotion_delayRenderHandles = scope.remotion_delayRenderHandles.filter((h) => h !== handle);
|
|
22636
22629
|
if (scope.remotion_delayRenderHandles.length === 0) {
|
|
22637
22630
|
scope.remotion_renderReady = true;
|
|
22638
22631
|
}
|
|
@@ -22905,7 +22898,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
22905
22898
|
var addSequenceStackTraces = (component) => {
|
|
22906
22899
|
componentsToAddStacksTo.push(component);
|
|
22907
22900
|
};
|
|
22908
|
-
var VERSION = "4.0.
|
|
22901
|
+
var VERSION = "4.0.491";
|
|
22909
22902
|
var checkMultipleRemotionVersions = () => {
|
|
22910
22903
|
if (typeof globalThis === "undefined") {
|
|
22911
22904
|
return;
|
|
@@ -23286,7 +23279,8 @@ var transformSchema = {
|
|
|
23286
23279
|
max: 100,
|
|
23287
23280
|
step: 0.01,
|
|
23288
23281
|
default: 1,
|
|
23289
|
-
description: "Scale"
|
|
23282
|
+
description: "Scale",
|
|
23283
|
+
defaultKeyframeOutput: "perceptual-scale"
|
|
23290
23284
|
},
|
|
23291
23285
|
"style.rotate": {
|
|
23292
23286
|
type: "rotation-css",
|
|
@@ -23517,7 +23511,7 @@ var SequenceManagerRefContext = React11.createContext({
|
|
|
23517
23511
|
current: []
|
|
23518
23512
|
});
|
|
23519
23513
|
var makeSequencePropsSubscriptionKey = (key) => {
|
|
23520
|
-
return `${key.nodePath.join(".")}
|
|
23514
|
+
return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
23521
23515
|
};
|
|
23522
23516
|
var VisualModePropStatusesContext = React11.createContext({
|
|
23523
23517
|
propStatuses: {}
|
|
@@ -24090,8 +24084,20 @@ var serializeStringInterpolationValue = ({
|
|
|
24090
24084
|
}
|
|
24091
24085
|
return values.slice(0, dimensions).map((value, index) => `${stringifyNumber(value)}${units[index]}`).join(" ");
|
|
24092
24086
|
};
|
|
24087
|
+
var toSignedArea = (scale) => {
|
|
24088
|
+
if (scale === 0) {
|
|
24089
|
+
return 0;
|
|
24090
|
+
}
|
|
24091
|
+
return Math.sign(scale) * scale * scale;
|
|
24092
|
+
};
|
|
24093
|
+
var fromSignedArea = (area) => {
|
|
24094
|
+
if (area === 0) {
|
|
24095
|
+
return 0;
|
|
24096
|
+
}
|
|
24097
|
+
return Math.sign(area) * Math.sqrt(Math.abs(area));
|
|
24098
|
+
};
|
|
24093
24099
|
function interpolateFunction(input, inputRange, outputRange, options) {
|
|
24094
|
-
const { extrapolateLeft, extrapolateRight, easing } = options;
|
|
24100
|
+
const { extrapolateLeft, extrapolateRight, easing, output } = options;
|
|
24095
24101
|
let result = input;
|
|
24096
24102
|
const [inputMin, inputMax] = inputRange;
|
|
24097
24103
|
const [outputMin, outputMax] = outputRange;
|
|
@@ -24122,7 +24128,13 @@ function interpolateFunction(input, inputRange, outputRange, options) {
|
|
|
24122
24128
|
}
|
|
24123
24129
|
result = (result - inputMin) / (inputMax - inputMin);
|
|
24124
24130
|
result = easing(result);
|
|
24125
|
-
|
|
24131
|
+
if (output === "perceptual-scale") {
|
|
24132
|
+
const signedAreaMin = toSignedArea(outputMin);
|
|
24133
|
+
const signedAreaMax = toSignedArea(outputMax);
|
|
24134
|
+
result = fromSignedArea(result * (signedAreaMax - signedAreaMin) + signedAreaMin);
|
|
24135
|
+
} else {
|
|
24136
|
+
result = result * (outputMax - outputMin) + outputMin;
|
|
24137
|
+
}
|
|
24126
24138
|
return result;
|
|
24127
24139
|
}
|
|
24128
24140
|
function findRange(input, inputRange) {
|
|
@@ -24135,6 +24147,9 @@ function findRange(input, inputRange) {
|
|
|
24135
24147
|
return i - 1;
|
|
24136
24148
|
}
|
|
24137
24149
|
var defaultEasing = (num) => num;
|
|
24150
|
+
var resolveOutputOption = (output) => {
|
|
24151
|
+
return output ?? "linear";
|
|
24152
|
+
};
|
|
24138
24153
|
var shouldExtendRightForEasing = (easing) => {
|
|
24139
24154
|
return easing.remotionShouldExtendRight === true;
|
|
24140
24155
|
};
|
|
@@ -24156,12 +24171,14 @@ var interpolateSegment = ({
|
|
|
24156
24171
|
outputRange,
|
|
24157
24172
|
easing,
|
|
24158
24173
|
extrapolateLeft,
|
|
24159
|
-
extrapolateRight
|
|
24174
|
+
extrapolateRight,
|
|
24175
|
+
output
|
|
24160
24176
|
}) => {
|
|
24161
24177
|
return interpolateFunction(input, inputRange, outputRange, {
|
|
24162
24178
|
easing,
|
|
24163
24179
|
extrapolateLeft,
|
|
24164
|
-
extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight
|
|
24180
|
+
extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight,
|
|
24181
|
+
output
|
|
24165
24182
|
});
|
|
24166
24183
|
};
|
|
24167
24184
|
var interpolateNumber = ({
|
|
@@ -24170,6 +24187,7 @@ var interpolateNumber = ({
|
|
|
24170
24187
|
outputRange,
|
|
24171
24188
|
options
|
|
24172
24189
|
}) => {
|
|
24190
|
+
const output = resolveOutputOption(options?.output);
|
|
24173
24191
|
if (inputRange.length === 1) {
|
|
24174
24192
|
return outputRange[0];
|
|
24175
24193
|
}
|
|
@@ -24194,7 +24212,8 @@ var interpolateNumber = ({
|
|
|
24194
24212
|
outputRange: [outputRange[range], outputRange[range + 1]],
|
|
24195
24213
|
easing,
|
|
24196
24214
|
extrapolateLeft,
|
|
24197
|
-
extrapolateRight
|
|
24215
|
+
extrapolateRight,
|
|
24216
|
+
output
|
|
24198
24217
|
});
|
|
24199
24218
|
for (let segmentIndex = 0;segmentIndex < range; segmentIndex++) {
|
|
24200
24219
|
const previousEasing = resolveEasingForSegment({
|
|
@@ -24214,7 +24233,8 @@ var interpolateNumber = ({
|
|
|
24214
24233
|
outputRange: [outputRange[segmentIndex], outputRange[segmentIndex + 1]],
|
|
24215
24234
|
easing: previousEasing,
|
|
24216
24235
|
extrapolateLeft,
|
|
24217
|
-
extrapolateRight: "extend"
|
|
24236
|
+
extrapolateRight: "extend",
|
|
24237
|
+
output
|
|
24218
24238
|
});
|
|
24219
24239
|
result += continuedSegmentValue - outputRange[segmentIndex + 1];
|
|
24220
24240
|
}
|
|
@@ -24262,14 +24282,18 @@ var interpolateString = ({
|
|
|
24262
24282
|
}
|
|
24263
24283
|
}
|
|
24264
24284
|
}
|
|
24265
|
-
|
|
24266
|
-
|
|
24267
|
-
values
|
|
24285
|
+
const values = [0, 0, 0];
|
|
24286
|
+
for (let axis = 0;axis < dimensions; axis++) {
|
|
24287
|
+
values[axis] = interpolateNumber({
|
|
24268
24288
|
input,
|
|
24269
24289
|
inputRange,
|
|
24270
24290
|
outputRange: parsedOutputRange.map((parsed) => parsed.values[axis]),
|
|
24271
24291
|
options
|
|
24272
|
-
})
|
|
24292
|
+
});
|
|
24293
|
+
}
|
|
24294
|
+
return serializeStringInterpolationValue({
|
|
24295
|
+
kind,
|
|
24296
|
+
values,
|
|
24273
24297
|
units,
|
|
24274
24298
|
dimensions
|
|
24275
24299
|
});
|
|
@@ -24353,6 +24377,12 @@ function assertValidInterpolatePosterizeOption(posterize) {
|
|
|
24353
24377
|
throw new Error(`posterize must be a positive finite number, but got ${posterize}`);
|
|
24354
24378
|
}
|
|
24355
24379
|
}
|
|
24380
|
+
function assertValidInterpolateOutputOption(output) {
|
|
24381
|
+
if (output === undefined || output === "linear" || output === "perceptual-scale") {
|
|
24382
|
+
return;
|
|
24383
|
+
}
|
|
24384
|
+
throw new Error(`output must be "linear" or "perceptual-scale", but got ${String(output)}`);
|
|
24385
|
+
}
|
|
24356
24386
|
function interpolate(input, inputRange, outputRange, options) {
|
|
24357
24387
|
if (typeof input === "undefined") {
|
|
24358
24388
|
throw new Error("input can not be undefined");
|
|
@@ -24370,6 +24400,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
24370
24400
|
checkValidInputRange(inputRange);
|
|
24371
24401
|
assertValidInterpolateEasingOption(options?.easing, inputRange.length);
|
|
24372
24402
|
assertValidInterpolatePosterizeOption(options?.posterize);
|
|
24403
|
+
assertValidInterpolateOutputOption(options?.output);
|
|
24373
24404
|
if (typeof input !== "number") {
|
|
24374
24405
|
throw new TypeError("Cannot interpolate an input which is not a number");
|
|
24375
24406
|
}
|
|
@@ -25314,6 +25345,7 @@ var interpolateKeyframedStatus = ({
|
|
|
25314
25345
|
easing: easing.map((e) => easingToFn({ easing: e, forceSpringAllowTail })),
|
|
25315
25346
|
extrapolateLeft: clamping.left,
|
|
25316
25347
|
extrapolateRight: clamping.right,
|
|
25348
|
+
output: status.output,
|
|
25317
25349
|
posterize: status.posterize
|
|
25318
25350
|
});
|
|
25319
25351
|
} catch {
|
|
@@ -25554,7 +25586,7 @@ var getFlatSchemaWithAllKeys = (schema) => {
|
|
|
25554
25586
|
const out = {};
|
|
25555
25587
|
const addKey = (key, field) => {
|
|
25556
25588
|
if (key in out) {
|
|
25557
|
-
|
|
25589
|
+
return;
|
|
25558
25590
|
}
|
|
25559
25591
|
out[key] = field;
|
|
25560
25592
|
};
|
|
@@ -26092,6 +26124,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26092
26124
|
src: isMedia.data.src,
|
|
26093
26125
|
getStack: () => stackRef.current,
|
|
26094
26126
|
startMediaFrom: startMediaFrom ?? isMedia.data.startMediaFrom,
|
|
26127
|
+
mediaFrameAtSequenceZero,
|
|
26095
26128
|
volume: isMedia.data.volumes,
|
|
26096
26129
|
refForOutline: refForOutline ?? null,
|
|
26097
26130
|
isInsideSeries,
|
|
@@ -26155,6 +26188,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26155
26188
|
isInsideSeries,
|
|
26156
26189
|
registeredFrozenFrame,
|
|
26157
26190
|
startMediaFrom,
|
|
26191
|
+
mediaFrameAtSequenceZero,
|
|
26158
26192
|
frozenMediaFrame
|
|
26159
26193
|
]);
|
|
26160
26194
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
@@ -28105,7 +28139,9 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28105
28139
|
return;
|
|
28106
28140
|
}
|
|
28107
28141
|
if (data === undefined) {
|
|
28108
|
-
current.src
|
|
28142
|
+
if (current.src !== EMPTY_AUDIO) {
|
|
28143
|
+
current.src = EMPTY_AUDIO;
|
|
28144
|
+
}
|
|
28109
28145
|
return;
|
|
28110
28146
|
}
|
|
28111
28147
|
if (!data) {
|
|
@@ -28174,7 +28210,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28174
28210
|
if (prevA.id === id) {
|
|
28175
28211
|
const isTheSame = compareProps(aud, prevA.props) && prevA.premounting === premounting && prevA.postmounting === postmounting;
|
|
28176
28212
|
if (isTheSame) {
|
|
28177
|
-
return prevA;
|
|
28213
|
+
return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
|
|
28178
28214
|
}
|
|
28179
28215
|
changed = true;
|
|
28180
28216
|
return {
|
|
@@ -28186,7 +28222,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28186
28222
|
audioMounted
|
|
28187
28223
|
};
|
|
28188
28224
|
}
|
|
28189
|
-
return prevA;
|
|
28225
|
+
return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
|
|
28190
28226
|
});
|
|
28191
28227
|
if (changed) {
|
|
28192
28228
|
rerenderAudios();
|
|
@@ -28225,16 +28261,19 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28225
28261
|
unregisterAudio,
|
|
28226
28262
|
updateAudio
|
|
28227
28263
|
]);
|
|
28264
|
+
const sharedAudioTagElements = useMemo21(() => {
|
|
28265
|
+
return refs.map(({ id, ref }) => {
|
|
28266
|
+
return /* @__PURE__ */ jsx19("audio", {
|
|
28267
|
+
ref,
|
|
28268
|
+
preload: "metadata",
|
|
28269
|
+
src: EMPTY_AUDIO
|
|
28270
|
+
}, id);
|
|
28271
|
+
});
|
|
28272
|
+
}, [refs]);
|
|
28228
28273
|
return /* @__PURE__ */ jsxs2(SharedAudioTagsContext.Provider, {
|
|
28229
28274
|
value: audioTagsValue,
|
|
28230
28275
|
children: [
|
|
28231
|
-
|
|
28232
|
-
return /* @__PURE__ */ jsx19("audio", {
|
|
28233
|
-
ref,
|
|
28234
|
-
preload: "metadata",
|
|
28235
|
-
src: EMPTY_AUDIO
|
|
28236
|
-
}, id);
|
|
28237
|
-
}),
|
|
28276
|
+
sharedAudioTagElements,
|
|
28238
28277
|
children
|
|
28239
28278
|
]
|
|
28240
28279
|
});
|
|
@@ -28695,6 +28734,7 @@ var useMediaInTimeline = ({
|
|
|
28695
28734
|
showInTimeline: true,
|
|
28696
28735
|
nonce: nonce.get(),
|
|
28697
28736
|
startMediaFrom: 0 - startsAt,
|
|
28737
|
+
mediaFrameAtSequenceZero: null,
|
|
28698
28738
|
doesVolumeChange,
|
|
28699
28739
|
loopDisplay,
|
|
28700
28740
|
playbackRate,
|
|
@@ -30328,16 +30368,16 @@ var isMissingPaintRecordError = (error2) => {
|
|
|
30328
30368
|
return error2 instanceof DOMException && error2.name === "InvalidStateError";
|
|
30329
30369
|
};
|
|
30330
30370
|
var missingPaintRecordMessage = "HtmlInCanvas: Expected the element to be inside the viewport during rendering, but Chrome had no cached paint record for it.";
|
|
30331
|
-
var
|
|
30332
|
-
|
|
30371
|
+
var resizePaintTarget = ({
|
|
30372
|
+
target,
|
|
30333
30373
|
width,
|
|
30334
30374
|
height
|
|
30335
30375
|
}) => {
|
|
30336
|
-
if (
|
|
30337
|
-
|
|
30376
|
+
if (target.width !== width) {
|
|
30377
|
+
target.width = width;
|
|
30338
30378
|
}
|
|
30339
|
-
if (
|
|
30340
|
-
|
|
30379
|
+
if (target.height !== height) {
|
|
30380
|
+
target.height = height;
|
|
30341
30381
|
}
|
|
30342
30382
|
};
|
|
30343
30383
|
var defaultOnPaint = ({
|
|
@@ -30353,7 +30393,7 @@ var defaultOnPaint = ({
|
|
|
30353
30393
|
const transform = ctx.drawElementImage(elementImage, 0, 0);
|
|
30354
30394
|
element.style.transform = transform.toString();
|
|
30355
30395
|
};
|
|
30356
|
-
var HtmlInCanvasAncestorContext = createContext23(
|
|
30396
|
+
var HtmlInCanvasAncestorContext = createContext23(null);
|
|
30357
30397
|
var HtmlInCanvasContent = forwardRef9(({
|
|
30358
30398
|
width,
|
|
30359
30399
|
height,
|
|
@@ -30365,20 +30405,22 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30365
30405
|
controls,
|
|
30366
30406
|
style
|
|
30367
30407
|
}, ref) => {
|
|
30368
|
-
const
|
|
30408
|
+
const ancestor = useContext31(HtmlInCanvasAncestorContext);
|
|
30369
30409
|
assertHtmlInCanvasDimensions(width, height);
|
|
30370
30410
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
30371
30411
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
30372
30412
|
const canvasHeight = Math.ceil(height * resolvedPixelDensity);
|
|
30373
30413
|
const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
30374
|
-
const { isRendering } = useRemotionEnvironment();
|
|
30414
|
+
const { isClientSideRendering, isRendering } = useRemotionEnvironment();
|
|
30415
|
+
const canRetryMissingPaintRecord = !isRendering || isClientSideRendering;
|
|
30416
|
+
const usesDirectLayoutCanvas = onPaint === undefined && onInit === undefined;
|
|
30375
30417
|
if (!isHtmlInCanvasSupported()) {
|
|
30376
30418
|
cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
|
|
30377
30419
|
}
|
|
30378
30420
|
const canvas2dRef = useRef22(null);
|
|
30379
|
-
const
|
|
30421
|
+
const paintTargetRef = useRef22(null);
|
|
30380
30422
|
const divRef = useRef22(null);
|
|
30381
|
-
const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
|
|
30423
|
+
const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}-${usesDirectLayoutCanvas ? "direct" : "offscreen"}`;
|
|
30382
30424
|
const setLayoutCanvasRef = useCallback16((node) => {
|
|
30383
30425
|
canvas2dRef.current = node;
|
|
30384
30426
|
if (typeof ref === "function") {
|
|
@@ -30401,17 +30443,19 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30401
30443
|
const initializedRef = useRef22(false);
|
|
30402
30444
|
const onInitCleanupRef = useRef22(null);
|
|
30403
30445
|
const unmountedRef = useRef22(false);
|
|
30446
|
+
const ancestorRef = useRef22(ancestor);
|
|
30447
|
+
ancestorRef.current = ancestor;
|
|
30404
30448
|
const onPaintCb = useCallback16(async () => {
|
|
30405
30449
|
const element = divRef.current;
|
|
30406
30450
|
if (!element) {
|
|
30407
30451
|
throw new Error("Canvas or scene element not found");
|
|
30408
30452
|
}
|
|
30409
|
-
const
|
|
30410
|
-
if (!
|
|
30411
|
-
throw new Error("HtmlInCanvas:
|
|
30453
|
+
const paintTarget = paintTargetRef.current;
|
|
30454
|
+
if (!paintTarget) {
|
|
30455
|
+
throw new Error("HtmlInCanvas: paint target is not ready because the canvas is remounting");
|
|
30412
30456
|
}
|
|
30413
|
-
|
|
30414
|
-
|
|
30457
|
+
resizePaintTarget({
|
|
30458
|
+
target: paintTarget,
|
|
30415
30459
|
width: canvasWidth,
|
|
30416
30460
|
height: canvasHeight
|
|
30417
30461
|
});
|
|
@@ -30422,22 +30466,30 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30422
30466
|
}
|
|
30423
30467
|
const handle = delayRender("onPaint");
|
|
30424
30468
|
if (!initializedRef.current) {
|
|
30425
|
-
|
|
30426
|
-
|
|
30427
|
-
|
|
30428
|
-
}
|
|
30429
|
-
|
|
30430
|
-
|
|
30431
|
-
|
|
30469
|
+
const currentOnInit = onInitRef.current;
|
|
30470
|
+
if (!currentOnInit) {
|
|
30471
|
+
initializedRef.current = true;
|
|
30472
|
+
} else {
|
|
30473
|
+
let initImage;
|
|
30474
|
+
try {
|
|
30475
|
+
initImage = placeholderCanvas.captureElementImage(element);
|
|
30476
|
+
} catch (error2) {
|
|
30477
|
+
if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
|
|
30478
|
+
continueRender2(handle);
|
|
30479
|
+
return;
|
|
30480
|
+
}
|
|
30481
|
+
if (isMissingPaintRecordError(error2)) {
|
|
30482
|
+
throw new Error(missingPaintRecordMessage);
|
|
30483
|
+
}
|
|
30432
30484
|
throw error2;
|
|
30433
30485
|
}
|
|
30434
|
-
}
|
|
30435
|
-
if (initImage) {
|
|
30436
30486
|
initializedRef.current = true;
|
|
30437
|
-
|
|
30438
|
-
|
|
30487
|
+
try {
|
|
30488
|
+
if (paintTarget instanceof HTMLCanvasElement) {
|
|
30489
|
+
throw new Error("HtmlInCanvas: onInit requires an OffscreenCanvas paint target");
|
|
30490
|
+
}
|
|
30439
30491
|
const cleanup = await currentOnInit({
|
|
30440
|
-
canvas:
|
|
30492
|
+
canvas: paintTarget,
|
|
30441
30493
|
element,
|
|
30442
30494
|
elementImage: initImage,
|
|
30443
30495
|
pixelDensity: resolvedPixelDensity
|
|
@@ -30450,15 +30502,16 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30450
30502
|
} else {
|
|
30451
30503
|
onInitCleanupRef.current = cleanup;
|
|
30452
30504
|
}
|
|
30505
|
+
} finally {
|
|
30506
|
+
initImage.close();
|
|
30453
30507
|
}
|
|
30454
30508
|
}
|
|
30455
30509
|
}
|
|
30456
|
-
const handler = onPaintRef.current ?? defaultOnPaint;
|
|
30457
30510
|
let elImage;
|
|
30458
30511
|
try {
|
|
30459
30512
|
elImage = placeholderCanvas.captureElementImage(element);
|
|
30460
30513
|
} catch (error2) {
|
|
30461
|
-
if (isMissingPaintRecordError(error2) &&
|
|
30514
|
+
if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
|
|
30462
30515
|
continueRender2(handle);
|
|
30463
30516
|
return;
|
|
30464
30517
|
}
|
|
@@ -30467,20 +30520,41 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30467
30520
|
}
|
|
30468
30521
|
throw error2;
|
|
30469
30522
|
}
|
|
30470
|
-
|
|
30471
|
-
|
|
30472
|
-
|
|
30473
|
-
|
|
30474
|
-
|
|
30475
|
-
|
|
30476
|
-
|
|
30477
|
-
|
|
30478
|
-
|
|
30479
|
-
|
|
30480
|
-
|
|
30481
|
-
|
|
30482
|
-
|
|
30483
|
-
|
|
30523
|
+
try {
|
|
30524
|
+
const currentOnPaint = onPaintRef.current;
|
|
30525
|
+
if (currentOnPaint) {
|
|
30526
|
+
if (paintTarget instanceof HTMLCanvasElement) {
|
|
30527
|
+
throw new Error("HtmlInCanvas: onPaint requires an OffscreenCanvas paint target");
|
|
30528
|
+
}
|
|
30529
|
+
const paintResult = currentOnPaint({
|
|
30530
|
+
canvas: paintTarget,
|
|
30531
|
+
element,
|
|
30532
|
+
elementImage: elImage,
|
|
30533
|
+
pixelDensity: resolvedPixelDensity
|
|
30534
|
+
});
|
|
30535
|
+
if (paintResult) {
|
|
30536
|
+
await paintResult;
|
|
30537
|
+
}
|
|
30538
|
+
} else {
|
|
30539
|
+
defaultOnPaint({
|
|
30540
|
+
canvas: paintTarget,
|
|
30541
|
+
element,
|
|
30542
|
+
elementImage: elImage,
|
|
30543
|
+
pixelDensity: resolvedPixelDensity
|
|
30544
|
+
});
|
|
30545
|
+
}
|
|
30546
|
+
await runEffectChain({
|
|
30547
|
+
state: chainState.get(canvasWidth, canvasHeight),
|
|
30548
|
+
source: paintTarget,
|
|
30549
|
+
effects: effectsRef.current,
|
|
30550
|
+
output: paintTarget,
|
|
30551
|
+
width: canvasWidth,
|
|
30552
|
+
height: canvasHeight
|
|
30553
|
+
});
|
|
30554
|
+
} finally {
|
|
30555
|
+
elImage.close();
|
|
30556
|
+
}
|
|
30557
|
+
ancestorRef.current?.requestParentPaint();
|
|
30484
30558
|
continueRender2(handle);
|
|
30485
30559
|
} catch (error2) {
|
|
30486
30560
|
cancelRender2(error2);
|
|
@@ -30492,7 +30566,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30492
30566
|
continueRender2,
|
|
30493
30567
|
cancelRender2,
|
|
30494
30568
|
resolvedPixelDensity,
|
|
30495
|
-
|
|
30569
|
+
canRetryMissingPaintRecord
|
|
30496
30570
|
]);
|
|
30497
30571
|
useLayoutEffect9(() => {
|
|
30498
30572
|
const placeholder = canvas2dRef.current;
|
|
@@ -30500,10 +30574,10 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30500
30574
|
throw new Error("Canvas not found");
|
|
30501
30575
|
}
|
|
30502
30576
|
placeholder.layoutSubtree = true;
|
|
30503
|
-
const
|
|
30504
|
-
|
|
30505
|
-
|
|
30506
|
-
|
|
30577
|
+
const paintTarget = usesDirectLayoutCanvas ? placeholder : placeholder.transferControlToOffscreen();
|
|
30578
|
+
paintTargetRef.current = paintTarget;
|
|
30579
|
+
resizePaintTarget({
|
|
30580
|
+
target: paintTarget,
|
|
30507
30581
|
width: canvasWidth,
|
|
30508
30582
|
height: canvasHeight
|
|
30509
30583
|
});
|
|
@@ -30512,13 +30586,19 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30512
30586
|
placeholder.addEventListener("paint", onPaintCb);
|
|
30513
30587
|
return () => {
|
|
30514
30588
|
placeholder.removeEventListener("paint", onPaintCb);
|
|
30515
|
-
|
|
30589
|
+
paintTargetRef.current = null;
|
|
30516
30590
|
initializedRef.current = false;
|
|
30517
30591
|
unmountedRef.current = true;
|
|
30518
30592
|
onInitCleanupRef.current?.();
|
|
30519
30593
|
onInitCleanupRef.current = null;
|
|
30520
30594
|
};
|
|
30521
|
-
}, [
|
|
30595
|
+
}, [
|
|
30596
|
+
onPaintCb,
|
|
30597
|
+
cancelRender2,
|
|
30598
|
+
canvasWidth,
|
|
30599
|
+
canvasHeight,
|
|
30600
|
+
usesDirectLayoutCanvas
|
|
30601
|
+
]);
|
|
30522
30602
|
const onPaintChangedRef = useRef22(false);
|
|
30523
30603
|
useLayoutEffect9(() => {
|
|
30524
30604
|
if (!onPaintChangedRef.current) {
|
|
@@ -30557,11 +30637,15 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30557
30637
|
...style ?? {}
|
|
30558
30638
|
};
|
|
30559
30639
|
}, [height, style, width]);
|
|
30560
|
-
|
|
30561
|
-
|
|
30562
|
-
|
|
30640
|
+
const ancestorValue = useMemo30(() => {
|
|
30641
|
+
return {
|
|
30642
|
+
requestParentPaint: () => {
|
|
30643
|
+
canvas2dRef.current?.requestPaint?.();
|
|
30644
|
+
}
|
|
30645
|
+
};
|
|
30646
|
+
}, []);
|
|
30563
30647
|
return /* @__PURE__ */ jsx25(HtmlInCanvasAncestorContext.Provider, {
|
|
30564
|
-
value:
|
|
30648
|
+
value: ancestorValue,
|
|
30565
30649
|
children: /* @__PURE__ */ jsx25("canvas", {
|
|
30566
30650
|
ref: setLayoutCanvasRef,
|
|
30567
30651
|
width: canvasWidth,
|
|
@@ -31433,6 +31517,22 @@ var Img = withInteractivitySchema({
|
|
|
31433
31517
|
supportsEffects: true
|
|
31434
31518
|
});
|
|
31435
31519
|
addSequenceStackTraces(Img);
|
|
31520
|
+
var sourcePathToIdentityPrefix = (packageName) => {
|
|
31521
|
+
if (packageName === "remotion") {
|
|
31522
|
+
return "dev.remotion.remotion";
|
|
31523
|
+
}
|
|
31524
|
+
if (packageName.startsWith("@remotion/")) {
|
|
31525
|
+
const normalizedPackageName = packageName.slice("@remotion/".length).replace(/-([a-z])/g, (_, char) => char.toUpperCase());
|
|
31526
|
+
return `dev.remotion.${normalizedPackageName}`;
|
|
31527
|
+
}
|
|
31528
|
+
throw new Error(`Unsupported Remotion package name: ${packageName}`);
|
|
31529
|
+
};
|
|
31530
|
+
var makeRemotionComponentIdentity = ({
|
|
31531
|
+
packageName,
|
|
31532
|
+
componentName
|
|
31533
|
+
}) => {
|
|
31534
|
+
return `${sourcePathToIdentityPrefix(packageName)}.${componentName}`;
|
|
31535
|
+
};
|
|
31436
31536
|
var interactiveElementSchema = {
|
|
31437
31537
|
...baseSchema,
|
|
31438
31538
|
...transformSchema,
|
|
@@ -31446,6 +31546,11 @@ var setRef = (ref, value) => {
|
|
|
31446
31546
|
ref.current = value;
|
|
31447
31547
|
}
|
|
31448
31548
|
};
|
|
31549
|
+
var withSchema = (options) => {
|
|
31550
|
+
const Wrapped = withInteractivitySchema(options);
|
|
31551
|
+
addSequenceStackTraces(Wrapped);
|
|
31552
|
+
return Wrapped;
|
|
31553
|
+
};
|
|
31449
31554
|
var makeInteractiveElement = (tag, displayName) => {
|
|
31450
31555
|
const Inner = forwardRef12((propsWithControls, ref) => {
|
|
31451
31556
|
const {
|
|
@@ -31485,15 +31590,17 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
31485
31590
|
});
|
|
31486
31591
|
});
|
|
31487
31592
|
Inner.displayName = displayName;
|
|
31488
|
-
const Wrapped =
|
|
31593
|
+
const Wrapped = withSchema({
|
|
31489
31594
|
Component: Inner,
|
|
31490
31595
|
componentName: displayName,
|
|
31491
|
-
componentIdentity:
|
|
31596
|
+
componentIdentity: makeRemotionComponentIdentity({
|
|
31597
|
+
packageName: "remotion",
|
|
31598
|
+
componentName: displayName.slice(1, -1)
|
|
31599
|
+
}),
|
|
31492
31600
|
schema: interactiveElementSchema,
|
|
31493
31601
|
supportsEffects: false
|
|
31494
31602
|
});
|
|
31495
31603
|
Wrapped.displayName = displayName;
|
|
31496
|
-
addSequenceStackTraces(Wrapped);
|
|
31497
31604
|
return Wrapped;
|
|
31498
31605
|
};
|
|
31499
31606
|
var Interactive = {
|
|
@@ -31502,7 +31609,8 @@ var Interactive = {
|
|
|
31502
31609
|
textSchema,
|
|
31503
31610
|
premountSchema,
|
|
31504
31611
|
sequenceSchema,
|
|
31505
|
-
withSchema
|
|
31612
|
+
withSchema,
|
|
31613
|
+
_internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
|
|
31506
31614
|
A: makeInteractiveElement("a", "<Interactive.A>"),
|
|
31507
31615
|
Article: makeInteractiveElement("article", "<Interactive.Article>"),
|
|
31508
31616
|
Aside: makeInteractiveElement("aside", "<Interactive.Aside>"),
|
|
@@ -32907,66 +33015,130 @@ var flattenChildren = (children) => {
|
|
|
32907
33015
|
return flatChildren;
|
|
32908
33016
|
}, []);
|
|
32909
33017
|
};
|
|
32910
|
-
var
|
|
33018
|
+
var seriesSequenceSchema = {
|
|
33019
|
+
durationInFrames: Interactive.baseSchema.durationInFrames,
|
|
33020
|
+
name: Interactive.sequenceSchema.name,
|
|
33021
|
+
hidden: Interactive.sequenceSchema.hidden,
|
|
33022
|
+
showInTimeline: Interactive.sequenceSchema.showInTimeline,
|
|
33023
|
+
freeze: Interactive.baseSchema.freeze,
|
|
33024
|
+
layout: Interactive.sequenceSchema.layout
|
|
33025
|
+
};
|
|
33026
|
+
var SeriesSequenceInner = forwardRef14(({
|
|
33027
|
+
offset = 0,
|
|
33028
|
+
className = "",
|
|
33029
|
+
stack = null,
|
|
33030
|
+
_remotionInternalRender = null,
|
|
33031
|
+
...props2
|
|
33032
|
+
}, ref) => {
|
|
32911
33033
|
useRequireToBeInsideSeries();
|
|
33034
|
+
if (_remotionInternalRender) {
|
|
33035
|
+
return _remotionInternalRender({ ...props2, offset, className: className || undefined, stack }, ref);
|
|
33036
|
+
}
|
|
32912
33037
|
return /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
|
|
32913
|
-
children
|
|
33038
|
+
children: props2.children
|
|
32914
33039
|
});
|
|
32915
|
-
};
|
|
32916
|
-
var SeriesSequence =
|
|
33040
|
+
});
|
|
33041
|
+
var SeriesSequence = Interactive.withSchema({
|
|
33042
|
+
Component: SeriesSequenceInner,
|
|
33043
|
+
componentName: "<Series.Sequence>",
|
|
33044
|
+
componentIdentity: "dev.remotion.remotion.Series.Sequence",
|
|
33045
|
+
schema: seriesSequenceSchema,
|
|
33046
|
+
supportsEffects: false
|
|
33047
|
+
});
|
|
32917
33048
|
var SequenceWithoutSchemaWithRef = SequenceWithoutSchema;
|
|
33049
|
+
var validateSeriesSequenceProps = ({
|
|
33050
|
+
durationInFrames,
|
|
33051
|
+
offset: offsetProp,
|
|
33052
|
+
index,
|
|
33053
|
+
childrenLength
|
|
33054
|
+
}) => {
|
|
33055
|
+
const debugInfo = `index = ${index}, duration = ${durationInFrames}`;
|
|
33056
|
+
if (index !== childrenLength - 1 || durationInFrames !== Infinity) {
|
|
33057
|
+
validateDurationInFrames(durationInFrames, {
|
|
33058
|
+
component: `of a <Series.Sequence /> component`,
|
|
33059
|
+
allowFloats: true
|
|
33060
|
+
});
|
|
33061
|
+
}
|
|
33062
|
+
const offset = offsetProp ?? 0;
|
|
33063
|
+
if (Number.isNaN(offset)) {
|
|
33064
|
+
throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
|
|
33065
|
+
}
|
|
33066
|
+
if (!Number.isFinite(offset)) {
|
|
33067
|
+
throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
33068
|
+
}
|
|
33069
|
+
if (offset % 1 !== 0) {
|
|
33070
|
+
throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
33071
|
+
}
|
|
33072
|
+
return offset;
|
|
33073
|
+
};
|
|
32918
33074
|
var SeriesInner = (props2) => {
|
|
32919
33075
|
const childrenValue = useMemo38(() => {
|
|
32920
|
-
let startFrame = 0;
|
|
32921
33076
|
const flattenedChildren = flattenChildren(props2.children);
|
|
32922
|
-
|
|
33077
|
+
const renderChildren = (i, startFrame) => {
|
|
33078
|
+
if (i === flattenedChildren.length) {
|
|
33079
|
+
return null;
|
|
33080
|
+
}
|
|
33081
|
+
const child = flattenedChildren[i];
|
|
32923
33082
|
const castedChild = child;
|
|
32924
33083
|
if (typeof castedChild === "string") {
|
|
32925
33084
|
if (castedChild.trim() === "") {
|
|
32926
|
-
return
|
|
33085
|
+
return renderChildren(i + 1, startFrame);
|
|
32927
33086
|
}
|
|
32928
33087
|
throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string "${castedChild}"`);
|
|
32929
33088
|
}
|
|
32930
33089
|
if (castedChild.type !== SeriesSequence) {
|
|
32931
33090
|
throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
|
|
32932
33091
|
}
|
|
32933
|
-
const
|
|
32934
|
-
|
|
32935
|
-
|
|
32936
|
-
|
|
32937
|
-
|
|
32938
|
-
|
|
32939
|
-
name,
|
|
32940
|
-
...passedProps
|
|
32941
|
-
} = castedChild.props;
|
|
32942
|
-
if (i !== flattenedChildren.length - 1 || durationInFramesProp !== Infinity) {
|
|
32943
|
-
validateDurationInFrames(durationInFramesProp, {
|
|
32944
|
-
component: `of a <Series.Sequence /> component`,
|
|
32945
|
-
allowFloats: true
|
|
32946
|
-
});
|
|
32947
|
-
}
|
|
32948
|
-
const offset = castedChild.props.offset ?? 0;
|
|
32949
|
-
if (Number.isNaN(offset)) {
|
|
32950
|
-
throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
|
|
32951
|
-
}
|
|
32952
|
-
if (!Number.isFinite(offset)) {
|
|
32953
|
-
throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
32954
|
-
}
|
|
32955
|
-
if (offset % 1 !== 0) {
|
|
32956
|
-
throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
32957
|
-
}
|
|
32958
|
-
const currentStartFrame = startFrame + offset;
|
|
32959
|
-
startFrame += durationInFramesProp + offset;
|
|
32960
|
-
return /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
|
|
32961
|
-
ref: castedChild.ref,
|
|
32962
|
-
name: name || "<Series.Sequence>",
|
|
32963
|
-
_remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
|
|
32964
|
-
from: currentStartFrame,
|
|
32965
|
-
durationInFrames: durationInFramesProp,
|
|
32966
|
-
...passedProps,
|
|
32967
|
-
children: child
|
|
33092
|
+
const castedElement = castedChild;
|
|
33093
|
+
validateSeriesSequenceProps({
|
|
33094
|
+
durationInFrames: castedElement.props.durationInFrames,
|
|
33095
|
+
offset: castedElement.props.offset,
|
|
33096
|
+
index: i,
|
|
33097
|
+
childrenLength: flattenedChildren.length
|
|
32968
33098
|
});
|
|
32969
|
-
|
|
33099
|
+
return React41.cloneElement(castedElement, {
|
|
33100
|
+
_remotionInternalRender: (resolvedProps, ref) => {
|
|
33101
|
+
const durationInFramesProp = resolvedProps.durationInFrames;
|
|
33102
|
+
const {
|
|
33103
|
+
durationInFrames: _durationInFrames,
|
|
33104
|
+
children: sequenceChildren,
|
|
33105
|
+
offset: offsetProp,
|
|
33106
|
+
controls,
|
|
33107
|
+
stack,
|
|
33108
|
+
from: _from,
|
|
33109
|
+
name,
|
|
33110
|
+
...passedProps
|
|
33111
|
+
} = resolvedProps;
|
|
33112
|
+
const offset = validateSeriesSequenceProps({
|
|
33113
|
+
durationInFrames: durationInFramesProp,
|
|
33114
|
+
offset: offsetProp,
|
|
33115
|
+
index: i,
|
|
33116
|
+
childrenLength: flattenedChildren.length
|
|
33117
|
+
});
|
|
33118
|
+
const currentStartFrame = startFrame + offset;
|
|
33119
|
+
const nextStartFrame = startFrame + durationInFramesProp + offset;
|
|
33120
|
+
return /* @__PURE__ */ jsxs3(Fragment, {
|
|
33121
|
+
children: [
|
|
33122
|
+
/* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
|
|
33123
|
+
ref,
|
|
33124
|
+
name: name || "<Series.Sequence>",
|
|
33125
|
+
_remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
|
|
33126
|
+
_remotionInternalStack: stack ?? undefined,
|
|
33127
|
+
controls: controls ?? undefined,
|
|
33128
|
+
from: currentStartFrame,
|
|
33129
|
+
durationInFrames: durationInFramesProp,
|
|
33130
|
+
...passedProps,
|
|
33131
|
+
children: /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
|
|
33132
|
+
children: sequenceChildren
|
|
33133
|
+
})
|
|
33134
|
+
}),
|
|
33135
|
+
renderChildren(i + 1, nextStartFrame)
|
|
33136
|
+
]
|
|
33137
|
+
});
|
|
33138
|
+
}
|
|
33139
|
+
});
|
|
33140
|
+
};
|
|
33141
|
+
return renderChildren(0, 0);
|
|
32970
33142
|
}, [props2.children]);
|
|
32971
33143
|
return /* @__PURE__ */ jsx37(IsInsideSeriesContainer, {
|
|
32972
33144
|
children: /* @__PURE__ */ jsx37(Sequence, {
|
|
@@ -33567,7 +33739,7 @@ addSequenceStackTraces(Folder);
|
|
|
33567
33739
|
// ../shapes/dist/esm/index.mjs
|
|
33568
33740
|
import React, { useCallback as useCallback26, useMemo as useMemo40, useRef as useRef29 } from "react";
|
|
33569
33741
|
import { version } from "react-dom";
|
|
33570
|
-
import { jsx as jsx40, jsxs as
|
|
33742
|
+
import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
33571
33743
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
33572
33744
|
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
33573
33745
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
@@ -33769,7 +33941,7 @@ var RenderSvg = ({
|
|
|
33769
33941
|
const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(effects);
|
|
33770
33942
|
const videoConfig = Internals.useUnsafeVideoConfig();
|
|
33771
33943
|
const reactSupportsTransformOrigin = doesReactSupportTransformOriginProperty(version);
|
|
33772
|
-
const svg = /* @__PURE__ */
|
|
33944
|
+
const svg = /* @__PURE__ */ jsxs4("svg", {
|
|
33773
33945
|
ref: effects.length === 0 || !videoConfig ? setSvgRef : undefined,
|
|
33774
33946
|
width,
|
|
33775
33947
|
height,
|
|
@@ -33795,7 +33967,7 @@ var RenderSvg = ({
|
|
|
33795
33967
|
}
|
|
33796
33968
|
const prevX = prevInstruction.x;
|
|
33797
33969
|
const prevY = prevInstruction.y;
|
|
33798
|
-
return /* @__PURE__ */
|
|
33970
|
+
return /* @__PURE__ */ jsxs4(React.Fragment, {
|
|
33799
33971
|
children: [
|
|
33800
33972
|
/* @__PURE__ */ jsx40("path", {
|
|
33801
33973
|
d: `M ${prevX} ${prevY} ${i.cp1x} ${i.cp1y}`,
|
|
@@ -33985,7 +34157,6 @@ var Arrow = Interactive.withSchema({
|
|
|
33985
34157
|
schema: arrowSchema,
|
|
33986
34158
|
supportsEffects: true
|
|
33987
34159
|
});
|
|
33988
|
-
Internals.addSequenceStackTraces(Arrow);
|
|
33989
34160
|
var shortenVector = (vector, radius) => {
|
|
33990
34161
|
const [x, y] = vector;
|
|
33991
34162
|
const currentLength = Math.sqrt(x * x + y * y);
|
|
@@ -34410,7 +34581,6 @@ var Callout = Interactive.withSchema({
|
|
|
34410
34581
|
schema: calloutSchema,
|
|
34411
34582
|
supportsEffects: true
|
|
34412
34583
|
});
|
|
34413
|
-
Internals.addSequenceStackTraces(Callout);
|
|
34414
34584
|
var makeCircle = ({ radius }) => {
|
|
34415
34585
|
const instructions = [
|
|
34416
34586
|
{
|
|
@@ -34473,7 +34643,6 @@ var Circle = Interactive.withSchema({
|
|
|
34473
34643
|
schema: circleSchema,
|
|
34474
34644
|
supportsEffects: true
|
|
34475
34645
|
});
|
|
34476
|
-
Internals.addSequenceStackTraces(Circle);
|
|
34477
34646
|
var makeEllipse = ({ rx, ry }) => {
|
|
34478
34647
|
const instructions = [
|
|
34479
34648
|
{
|
|
@@ -34531,7 +34700,6 @@ var Ellipse = Interactive.withSchema({
|
|
|
34531
34700
|
schema: ellipseSchema,
|
|
34532
34701
|
supportsEffects: true
|
|
34533
34702
|
});
|
|
34534
|
-
Internals.addSequenceStackTraces(Ellipse);
|
|
34535
34703
|
var makeHeart = ({
|
|
34536
34704
|
height,
|
|
34537
34705
|
aspectRatio = 1.1,
|
|
@@ -34670,7 +34838,6 @@ var Heart = Interactive.withSchema({
|
|
|
34670
34838
|
schema: heartSchema,
|
|
34671
34839
|
supportsEffects: true
|
|
34672
34840
|
});
|
|
34673
|
-
Internals.addSequenceStackTraces(Heart);
|
|
34674
34841
|
var getCoord = ({
|
|
34675
34842
|
counterClockwise,
|
|
34676
34843
|
actualProgress,
|
|
@@ -34825,7 +34992,6 @@ var Pie = Interactive.withSchema({
|
|
|
34825
34992
|
schema: pieSchema,
|
|
34826
34993
|
supportsEffects: true
|
|
34827
34994
|
});
|
|
34828
|
-
Internals.addSequenceStackTraces(Pie);
|
|
34829
34995
|
function polygon({
|
|
34830
34996
|
points,
|
|
34831
34997
|
radius,
|
|
@@ -34925,7 +35091,6 @@ var Polygon = Interactive.withSchema({
|
|
|
34925
35091
|
schema: polygonSchema,
|
|
34926
35092
|
supportsEffects: true
|
|
34927
35093
|
});
|
|
34928
|
-
Internals.addSequenceStackTraces(Polygon);
|
|
34929
35094
|
var makeRect = ({
|
|
34930
35095
|
width,
|
|
34931
35096
|
height,
|
|
@@ -34992,7 +35157,6 @@ var Rect = Interactive.withSchema({
|
|
|
34992
35157
|
schema: rectSchema,
|
|
34993
35158
|
supportsEffects: true
|
|
34994
35159
|
});
|
|
34995
|
-
Internals.addSequenceStackTraces(Rect);
|
|
34996
35160
|
var KAPPA = 0.5522847498307936;
|
|
34997
35161
|
var CAP_HANDLE = 4 / 3;
|
|
34998
35162
|
var curve = ({
|
|
@@ -35204,7 +35368,6 @@ var Spark = Interactive.withSchema({
|
|
|
35204
35368
|
schema: sparkSchema,
|
|
35205
35369
|
supportsEffects: true
|
|
35206
35370
|
});
|
|
35207
|
-
Internals.addSequenceStackTraces(Spark);
|
|
35208
35371
|
var star = ({
|
|
35209
35372
|
centerX,
|
|
35210
35373
|
centerY,
|
|
@@ -35315,7 +35478,6 @@ var Star = Interactive.withSchema({
|
|
|
35315
35478
|
schema: starSchema,
|
|
35316
35479
|
supportsEffects: true
|
|
35317
35480
|
});
|
|
35318
|
-
Internals.addSequenceStackTraces(Star);
|
|
35319
35481
|
var makeTriangle = ({
|
|
35320
35482
|
length: length2,
|
|
35321
35483
|
direction = "right",
|
|
@@ -35422,7 +35584,6 @@ var Triangle = Interactive.withSchema({
|
|
|
35422
35584
|
schema: triangleSchema,
|
|
35423
35585
|
supportsEffects: true
|
|
35424
35586
|
});
|
|
35425
|
-
Internals.addSequenceStackTraces(Triangle);
|
|
35426
35587
|
|
|
35427
35588
|
// ../svg-3d-engine/dist/esm/index.mjs
|
|
35428
35589
|
function truthy2(value) {
|
|
@@ -36488,7 +36649,7 @@ var extrudeAndTransformElement = (options) => {
|
|
|
36488
36649
|
|
|
36489
36650
|
// ../design/dist/esm/index.mjs
|
|
36490
36651
|
import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
36491
|
-
import { jsx as jsx312, jsxs as
|
|
36652
|
+
import { jsx as jsx312, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
36492
36653
|
import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef31 } from "react";
|
|
36493
36654
|
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
36494
36655
|
import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
@@ -36547,11 +36708,11 @@ import * as React302 from "react";
|
|
|
36547
36708
|
import * as React342 from "react";
|
|
36548
36709
|
import * as React332 from "react";
|
|
36549
36710
|
import * as React322 from "react";
|
|
36550
|
-
import { Fragment as Fragment8, jsx as jsx242, jsxs as
|
|
36711
|
+
import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
36551
36712
|
import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
|
|
36552
36713
|
import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
|
|
36553
36714
|
import * as React372 from "react";
|
|
36554
|
-
import { jsx as jsx252, jsxs as
|
|
36715
|
+
import { jsx as jsx252, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
36555
36716
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
36556
36717
|
import * as React49 from "react";
|
|
36557
36718
|
import * as React38 from "react";
|
|
@@ -36559,12 +36720,12 @@ import { jsx as jsx272 } from "react/jsx-runtime";
|
|
|
36559
36720
|
import * as React47 from "react";
|
|
36560
36721
|
import React402 from "react";
|
|
36561
36722
|
import * as React392 from "react";
|
|
36562
|
-
import { Fragment as
|
|
36723
|
+
import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
|
|
36563
36724
|
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
36564
36725
|
import React210 from "react";
|
|
36565
36726
|
import { jsx as jsx2102 } from "react/jsx-runtime";
|
|
36566
36727
|
import * as React422 from "react";
|
|
36567
|
-
import * as
|
|
36728
|
+
import * as React412 from "react";
|
|
36568
36729
|
import * as React43 from "react";
|
|
36569
36730
|
import * as ReactDOM5 from "react-dom";
|
|
36570
36731
|
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
@@ -36674,7 +36835,7 @@ function createSlotClone(ownerName) {
|
|
|
36674
36835
|
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
36675
36836
|
function createSlottable(ownerName) {
|
|
36676
36837
|
const Slottable2 = ({ children }) => {
|
|
36677
|
-
return /* @__PURE__ */ jsx43(
|
|
36838
|
+
return /* @__PURE__ */ jsx43(Fragment22, { children });
|
|
36678
36839
|
};
|
|
36679
36840
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
36680
36841
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -36971,7 +37132,7 @@ var Outer = ({
|
|
|
36971
37132
|
description: "rect",
|
|
36972
37133
|
transformations: centerOriented
|
|
36973
37134
|
});
|
|
36974
|
-
return /* @__PURE__ */
|
|
37135
|
+
return /* @__PURE__ */ jsxs6("div", {
|
|
36975
37136
|
className: "relative",
|
|
36976
37137
|
style: { width, height },
|
|
36977
37138
|
children: [
|
|
@@ -41019,7 +41180,7 @@ var Select = (props) => {
|
|
|
41019
41180
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
41020
41181
|
const [nativeOptionsSet, setNativeOptionsSet] = React36.useState(/* @__PURE__ */ new Set);
|
|
41021
41182
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
41022
|
-
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */
|
|
41183
|
+
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
|
|
41023
41184
|
required,
|
|
41024
41185
|
scope: __scopeSelect,
|
|
41025
41186
|
trigger,
|
|
@@ -41051,7 +41212,7 @@ var Select = (props) => {
|
|
|
41051
41212
|
}, []),
|
|
41052
41213
|
children
|
|
41053
41214
|
}) }),
|
|
41054
|
-
isFormControl ? /* @__PURE__ */
|
|
41215
|
+
isFormControl ? /* @__PURE__ */ jsxs42(BubbleSelect, {
|
|
41055
41216
|
"aria-hidden": true,
|
|
41056
41217
|
required,
|
|
41057
41218
|
tabIndex: -1,
|
|
@@ -41559,7 +41720,7 @@ var SelectViewport = React36.forwardRef((props, forwardedRef) => {
|
|
|
41559
41720
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
41560
41721
|
const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
|
|
41561
41722
|
const prevScrollTopRef = React36.useRef(0);
|
|
41562
|
-
return /* @__PURE__ */
|
|
41723
|
+
return /* @__PURE__ */ jsxs42(Fragment8, { children: [
|
|
41563
41724
|
/* @__PURE__ */ jsx242("style", {
|
|
41564
41725
|
dangerouslySetInnerHTML: {
|
|
41565
41726
|
__html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`
|
|
@@ -41716,7 +41877,7 @@ var SelectItemText = React36.forwardRef((props, forwardedRef) => {
|
|
|
41716
41877
|
onNativeOptionAdd(nativeOption);
|
|
41717
41878
|
return () => onNativeOptionRemove(nativeOption);
|
|
41718
41879
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
41719
|
-
return /* @__PURE__ */
|
|
41880
|
+
return /* @__PURE__ */ jsxs42(Fragment8, { children: [
|
|
41720
41881
|
/* @__PURE__ */ jsx242(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
41721
41882
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM4.createPortal(itemTextProps.children, context.valueNode) : null
|
|
41722
41883
|
] });
|
|
@@ -41975,7 +42136,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
41975
42136
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
41976
42137
|
var Select2 = Root222;
|
|
41977
42138
|
var SelectValue2 = Value;
|
|
41978
|
-
var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
42139
|
+
var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
41979
42140
|
ref,
|
|
41980
42141
|
className: cn("flex h-10 w-full items-center justify-between rounded-md border-black border-2 border-b-4 bg-card-bg px-3 py-5 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 font-brand", className),
|
|
41981
42142
|
...props,
|
|
@@ -42009,7 +42170,7 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
|
|
|
42009
42170
|
}));
|
|
42010
42171
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
42011
42172
|
var SelectContent2 = React372.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
|
|
42012
|
-
children: /* @__PURE__ */
|
|
42173
|
+
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
42013
42174
|
ref,
|
|
42014
42175
|
className: cn(" border-2 border-black relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md font-brand bg-card-bg text-text shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
42015
42176
|
position,
|
|
@@ -42031,7 +42192,7 @@ var SelectLabel2 = React372.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
42031
42192
|
...props
|
|
42032
42193
|
}));
|
|
42033
42194
|
SelectLabel2.displayName = Label.displayName;
|
|
42034
|
-
var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
42195
|
+
var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
42035
42196
|
ref,
|
|
42036
42197
|
className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-slate-200 dark:focus:bg-white/10 data-disabled:pointer-events-none data-disabled:opacity-50 font-brand", className),
|
|
42037
42198
|
...props,
|
|
@@ -42573,7 +42734,7 @@ function toSafeIndex(array, index2) {
|
|
|
42573
42734
|
function toSafeInteger(number) {
|
|
42574
42735
|
return number !== number || number === 0 ? 0 : Math.trunc(number);
|
|
42575
42736
|
}
|
|
42576
|
-
var useLayoutEffect222 = globalThis?.document ?
|
|
42737
|
+
var useLayoutEffect222 = globalThis?.document ? React412.useLayoutEffect : () => {};
|
|
42577
42738
|
var useReactId2 = React422[" useId ".trim().toString()] || (() => {
|
|
42578
42739
|
return;
|
|
42579
42740
|
});
|
|
@@ -43208,7 +43369,7 @@ var ClipboardIcon = ({ size: size4 = 16, color = "currentColor" }) => {
|
|
|
43208
43369
|
};
|
|
43209
43370
|
|
|
43210
43371
|
// src/components/prompts/CopyPromptButton.tsx
|
|
43211
|
-
import { jsx as jsx46, jsxs as
|
|
43372
|
+
import { jsx as jsx46, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
43212
43373
|
var CopyPromptButton = ({ prompt }) => {
|
|
43213
43374
|
const [copied, setCopied] = useState40(false);
|
|
43214
43375
|
const onCopy = useCallback38(() => {
|
|
@@ -43221,7 +43382,7 @@ var CopyPromptButton = ({ prompt }) => {
|
|
|
43221
43382
|
onClick: onCopy,
|
|
43222
43383
|
style: { width: 160 },
|
|
43223
43384
|
depth: 0.6,
|
|
43224
|
-
children: /* @__PURE__ */
|
|
43385
|
+
children: /* @__PURE__ */ jsxs7("div", {
|
|
43225
43386
|
className: "flex items-center flex-row flex-1 w-[130px]",
|
|
43226
43387
|
children: [
|
|
43227
43388
|
/* @__PURE__ */ jsx46(ClipboardIcon, {
|
|
@@ -43346,7 +43507,7 @@ var useHeartAnimation = () => {
|
|
|
43346
43507
|
};
|
|
43347
43508
|
|
|
43348
43509
|
// src/components/prompts/LikeButton.tsx
|
|
43349
|
-
import { jsx as jsx47, jsxs as
|
|
43510
|
+
import { jsx as jsx47, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
43350
43511
|
var LikeButton = ({ submissionId, initialLikeCount }) => {
|
|
43351
43512
|
const [liked, setLiked] = useState42(false);
|
|
43352
43513
|
const [likeCount, setLikeCount] = useState42(initialLikeCount);
|
|
@@ -43384,7 +43545,7 @@ var LikeButton = ({ submissionId, initialLikeCount }) => {
|
|
|
43384
43545
|
className: `font-brand rounded-full flex items-center ${liked ? "bg-brand text-white" : ""}`,
|
|
43385
43546
|
onClick,
|
|
43386
43547
|
style: { width: 90 },
|
|
43387
|
-
children: /* @__PURE__ */
|
|
43548
|
+
children: /* @__PURE__ */ jsxs8("div", {
|
|
43388
43549
|
className: "flex items-center flex-row flex-1 w-[40px] justify-center",
|
|
43389
43550
|
children: [
|
|
43390
43551
|
/* @__PURE__ */ jsx47(Heart, {
|
|
@@ -45876,14 +46037,14 @@ import"react-dom";
|
|
|
45876
46037
|
|
|
45877
46038
|
// src/components/prompts/MuxPlayer.tsx
|
|
45878
46039
|
import { useCallback as useCallback42 } from "react";
|
|
45879
|
-
import { jsx as jsx48, jsxs as
|
|
46040
|
+
import { jsx as jsx48, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
45880
46041
|
var MuxPlayer = ({ playbackId, title, rounded = true }) => {
|
|
45881
46042
|
const onProviderChange = useCallback42((provider2, _e) => {
|
|
45882
46043
|
if (isHLSProvider(provider2)) {
|
|
45883
46044
|
provider2.library = () => import("hls.js");
|
|
45884
46045
|
}
|
|
45885
46046
|
}, []);
|
|
45886
|
-
return /* @__PURE__ */
|
|
46047
|
+
return /* @__PURE__ */ jsxs9(MediaPlayer2, {
|
|
45887
46048
|
src: `https://stream.mux.com/${playbackId}.m3u8`,
|
|
45888
46049
|
crossOrigin: true,
|
|
45889
46050
|
playsInline: true,
|
|
@@ -45909,7 +46070,7 @@ var MuxPlayer = ({ playbackId, title, rounded = true }) => {
|
|
|
45909
46070
|
};
|
|
45910
46071
|
|
|
45911
46072
|
// src/components/prompts/NewBackButton.tsx
|
|
45912
|
-
import { jsx as jsx49, jsxs as
|
|
46073
|
+
import { jsx as jsx49, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
45913
46074
|
var NewBackButton = ({ text, link }) => {
|
|
45914
46075
|
return /* @__PURE__ */ jsx49("div", {
|
|
45915
46076
|
className: "justify-center items-center font-medium mb-4 block text-text",
|
|
@@ -45920,7 +46081,7 @@ var NewBackButton = ({ text, link }) => {
|
|
|
45920
46081
|
children: /* @__PURE__ */ jsx49(Button, {
|
|
45921
46082
|
href: link,
|
|
45922
46083
|
className: "px-8 rounded-full text-sm h-10",
|
|
45923
|
-
children: /* @__PURE__ */
|
|
46084
|
+
children: /* @__PURE__ */ jsxs10("div", {
|
|
45924
46085
|
className: "flex row items-center justify-start font-normal",
|
|
45925
46086
|
children: [
|
|
45926
46087
|
/* @__PURE__ */ jsx49("svg", {
|
|
@@ -45954,14 +46115,14 @@ var Page = ({ children, className, onDrop, onDragOver }) => {
|
|
|
45954
46115
|
};
|
|
45955
46116
|
|
|
45956
46117
|
// src/components/prompts/PromptsShow.tsx
|
|
45957
|
-
import { jsx as jsx51, jsxs as
|
|
46118
|
+
import { jsx as jsx51, jsxs as jsxs11, Fragment as Fragment13 } from "react/jsx-runtime";
|
|
45958
46119
|
var PromptsShowPage = ({ promptSubmission }) => {
|
|
45959
46120
|
const avatarUrl = getAvatarUrl(promptSubmission);
|
|
45960
46121
|
const authorName = getAuthorName(promptSubmission);
|
|
45961
46122
|
const authorLink = promptSubmission.githubUsername ? `https://github.com/${promptSubmission.githubUsername}` : promptSubmission.xUsername ? `https://x.com/${promptSubmission.xUsername}` : null;
|
|
45962
46123
|
return /* @__PURE__ */ jsx51(Page, {
|
|
45963
46124
|
className: "flex-col",
|
|
45964
|
-
children: /* @__PURE__ */
|
|
46125
|
+
children: /* @__PURE__ */ jsxs11("div", {
|
|
45965
46126
|
className: "m-auto max-w-[800px] w-full px-4 py-12",
|
|
45966
46127
|
children: [
|
|
45967
46128
|
/* @__PURE__ */ jsx51(NewBackButton, {
|
|
@@ -45975,9 +46136,9 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
45975
46136
|
className: "text-2xl font-brand font-black",
|
|
45976
46137
|
children: promptSubmission.title
|
|
45977
46138
|
}),
|
|
45978
|
-
/* @__PURE__ */
|
|
46139
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
45979
46140
|
children: [
|
|
45980
|
-
/* @__PURE__ */
|
|
46141
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
45981
46142
|
className: "flex items-center gap-3 mt-4 mb-4",
|
|
45982
46143
|
children: [
|
|
45983
46144
|
avatarUrl && /* @__PURE__ */ jsx51("img", {
|
|
@@ -45987,9 +46148,9 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
45987
46148
|
className: "rounded-full",
|
|
45988
46149
|
alt: authorName ? `${authorName}'s avatar` : "Author avatar"
|
|
45989
46150
|
}),
|
|
45990
|
-
/* @__PURE__ */
|
|
46151
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
45991
46152
|
children: [
|
|
45992
|
-
/* @__PURE__ */
|
|
46153
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
45993
46154
|
className: "text-sm font-brand",
|
|
45994
46155
|
children: [
|
|
45995
46156
|
"Prompted by",
|
|
@@ -46015,14 +46176,14 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
46015
46176
|
})
|
|
46016
46177
|
]
|
|
46017
46178
|
}),
|
|
46018
|
-
/* @__PURE__ */
|
|
46179
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46019
46180
|
children: [
|
|
46020
46181
|
/* @__PURE__ */ jsx51(MuxPlayer, {
|
|
46021
46182
|
playbackId: promptSubmission.muxPlaybackId,
|
|
46022
46183
|
title: promptSubmission.title,
|
|
46023
46184
|
rounded: false
|
|
46024
46185
|
}),
|
|
46025
|
-
promptSubmission.toolUsed && /* @__PURE__ */
|
|
46186
|
+
promptSubmission.toolUsed && /* @__PURE__ */ jsxs11(Fragment13, {
|
|
46026
46187
|
children: [
|
|
46027
46188
|
/* @__PURE__ */ jsx51("h2", {
|
|
46028
46189
|
className: "font-brand font-bold mt-6 mb-2",
|
|
@@ -46034,7 +46195,7 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
46034
46195
|
})
|
|
46035
46196
|
]
|
|
46036
46197
|
}),
|
|
46037
|
-
promptSubmission.modelUsed && /* @__PURE__ */
|
|
46198
|
+
promptSubmission.modelUsed && /* @__PURE__ */ jsxs11(Fragment13, {
|
|
46038
46199
|
children: [
|
|
46039
46200
|
/* @__PURE__ */ jsx51("h2", {
|
|
46040
46201
|
className: "font-brand font-bold mt-6 mb-2",
|
|
@@ -46055,7 +46216,7 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
46055
46216
|
style: { backgroundColor: "#272A36" },
|
|
46056
46217
|
children: promptSubmission.prompt
|
|
46057
46218
|
}),
|
|
46058
|
-
/* @__PURE__ */
|
|
46219
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46059
46220
|
className: "mt-6 flex items-center gap-2",
|
|
46060
46221
|
children: [
|
|
46061
46222
|
/* @__PURE__ */ jsx51(LikeButton, {
|