@remotion/promo-pages 4.0.490 → 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 +729 -405
- package/dist/components/Homepage.js +8 -4
- package/dist/components/homepage/CanvasSectionTitle.d.ts +4 -0
- package/dist/components/homepage/CanvasSectionTitle.js +14 -0
- package/dist/components/homepage/CommunityStatsItems.js +1 -1
- package/dist/components/homepage/Demo/Card.d.ts +3 -3
- package/dist/components/homepage/Demo/DisplayedEmoji.js +9 -3
- package/dist/components/homepage/EditorStarterSection.d.ts +3 -0
- package/dist/components/homepage/EditorStarterSection.js +8 -0
- package/dist/components/homepage/Pricing.d.ts +3 -0
- package/dist/components/homepage/Pricing.js +8 -2
- package/dist/components/homepage/WriteInReact.js +1 -2
- package/dist/design.js +262 -147
- package/dist/experts.js +247 -132
- package/dist/homepage/Pricing.js +279 -164
- package/dist/prompts/PromptsGallery.js +259 -144
- package/dist/prompts/PromptsShow.js +265 -150
- package/dist/prompts/PromptsSubmit.js +251 -136
- package/dist/team.js +236 -121
- package/dist/template-modal-content.js +279 -164
- package/dist/templates.js +279 -162
- 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 {
|
|
@@ -22899,7 +22898,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
22899
22898
|
var addSequenceStackTraces = (component) => {
|
|
22900
22899
|
componentsToAddStacksTo.push(component);
|
|
22901
22900
|
};
|
|
22902
|
-
var VERSION = "4.0.
|
|
22901
|
+
var VERSION = "4.0.491";
|
|
22903
22902
|
var checkMultipleRemotionVersions = () => {
|
|
22904
22903
|
if (typeof globalThis === "undefined") {
|
|
22905
22904
|
return;
|
|
@@ -23512,7 +23511,7 @@ var SequenceManagerRefContext = React11.createContext({
|
|
|
23512
23511
|
current: []
|
|
23513
23512
|
});
|
|
23514
23513
|
var makeSequencePropsSubscriptionKey = (key) => {
|
|
23515
|
-
return `${key.nodePath.join(".")}
|
|
23514
|
+
return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
23516
23515
|
};
|
|
23517
23516
|
var VisualModePropStatusesContext = React11.createContext({
|
|
23518
23517
|
propStatuses: {}
|
|
@@ -26125,6 +26124,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26125
26124
|
src: isMedia.data.src,
|
|
26126
26125
|
getStack: () => stackRef.current,
|
|
26127
26126
|
startMediaFrom: startMediaFrom ?? isMedia.data.startMediaFrom,
|
|
26127
|
+
mediaFrameAtSequenceZero,
|
|
26128
26128
|
volume: isMedia.data.volumes,
|
|
26129
26129
|
refForOutline: refForOutline ?? null,
|
|
26130
26130
|
isInsideSeries,
|
|
@@ -26188,6 +26188,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26188
26188
|
isInsideSeries,
|
|
26189
26189
|
registeredFrozenFrame,
|
|
26190
26190
|
startMediaFrom,
|
|
26191
|
+
mediaFrameAtSequenceZero,
|
|
26191
26192
|
frozenMediaFrame
|
|
26192
26193
|
]);
|
|
26193
26194
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
@@ -28138,7 +28139,9 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28138
28139
|
return;
|
|
28139
28140
|
}
|
|
28140
28141
|
if (data === undefined) {
|
|
28141
|
-
current.src
|
|
28142
|
+
if (current.src !== EMPTY_AUDIO) {
|
|
28143
|
+
current.src = EMPTY_AUDIO;
|
|
28144
|
+
}
|
|
28142
28145
|
return;
|
|
28143
28146
|
}
|
|
28144
28147
|
if (!data) {
|
|
@@ -28207,7 +28210,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28207
28210
|
if (prevA.id === id) {
|
|
28208
28211
|
const isTheSame = compareProps(aud, prevA.props) && prevA.premounting === premounting && prevA.postmounting === postmounting;
|
|
28209
28212
|
if (isTheSame) {
|
|
28210
|
-
return prevA;
|
|
28213
|
+
return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
|
|
28211
28214
|
}
|
|
28212
28215
|
changed = true;
|
|
28213
28216
|
return {
|
|
@@ -28219,7 +28222,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28219
28222
|
audioMounted
|
|
28220
28223
|
};
|
|
28221
28224
|
}
|
|
28222
|
-
return prevA;
|
|
28225
|
+
return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
|
|
28223
28226
|
});
|
|
28224
28227
|
if (changed) {
|
|
28225
28228
|
rerenderAudios();
|
|
@@ -28258,16 +28261,19 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28258
28261
|
unregisterAudio,
|
|
28259
28262
|
updateAudio
|
|
28260
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]);
|
|
28261
28273
|
return /* @__PURE__ */ jsxs2(SharedAudioTagsContext.Provider, {
|
|
28262
28274
|
value: audioTagsValue,
|
|
28263
28275
|
children: [
|
|
28264
|
-
|
|
28265
|
-
return /* @__PURE__ */ jsx19("audio", {
|
|
28266
|
-
ref,
|
|
28267
|
-
preload: "metadata",
|
|
28268
|
-
src: EMPTY_AUDIO
|
|
28269
|
-
}, id);
|
|
28270
|
-
}),
|
|
28276
|
+
sharedAudioTagElements,
|
|
28271
28277
|
children
|
|
28272
28278
|
]
|
|
28273
28279
|
});
|
|
@@ -28728,6 +28734,7 @@ var useMediaInTimeline = ({
|
|
|
28728
28734
|
showInTimeline: true,
|
|
28729
28735
|
nonce: nonce.get(),
|
|
28730
28736
|
startMediaFrom: 0 - startsAt,
|
|
28737
|
+
mediaFrameAtSequenceZero: null,
|
|
28731
28738
|
doesVolumeChange,
|
|
28732
28739
|
loopDisplay,
|
|
28733
28740
|
playbackRate,
|
|
@@ -30361,16 +30368,16 @@ var isMissingPaintRecordError = (error2) => {
|
|
|
30361
30368
|
return error2 instanceof DOMException && error2.name === "InvalidStateError";
|
|
30362
30369
|
};
|
|
30363
30370
|
var missingPaintRecordMessage = "HtmlInCanvas: Expected the element to be inside the viewport during rendering, but Chrome had no cached paint record for it.";
|
|
30364
|
-
var
|
|
30365
|
-
|
|
30371
|
+
var resizePaintTarget = ({
|
|
30372
|
+
target,
|
|
30366
30373
|
width,
|
|
30367
30374
|
height
|
|
30368
30375
|
}) => {
|
|
30369
|
-
if (
|
|
30370
|
-
|
|
30376
|
+
if (target.width !== width) {
|
|
30377
|
+
target.width = width;
|
|
30371
30378
|
}
|
|
30372
|
-
if (
|
|
30373
|
-
|
|
30379
|
+
if (target.height !== height) {
|
|
30380
|
+
target.height = height;
|
|
30374
30381
|
}
|
|
30375
30382
|
};
|
|
30376
30383
|
var defaultOnPaint = ({
|
|
@@ -30386,7 +30393,7 @@ var defaultOnPaint = ({
|
|
|
30386
30393
|
const transform = ctx.drawElementImage(elementImage, 0, 0);
|
|
30387
30394
|
element.style.transform = transform.toString();
|
|
30388
30395
|
};
|
|
30389
|
-
var HtmlInCanvasAncestorContext = createContext23(
|
|
30396
|
+
var HtmlInCanvasAncestorContext = createContext23(null);
|
|
30390
30397
|
var HtmlInCanvasContent = forwardRef9(({
|
|
30391
30398
|
width,
|
|
30392
30399
|
height,
|
|
@@ -30398,20 +30405,22 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30398
30405
|
controls,
|
|
30399
30406
|
style
|
|
30400
30407
|
}, ref) => {
|
|
30401
|
-
const
|
|
30408
|
+
const ancestor = useContext31(HtmlInCanvasAncestorContext);
|
|
30402
30409
|
assertHtmlInCanvasDimensions(width, height);
|
|
30403
30410
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
30404
30411
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
30405
30412
|
const canvasHeight = Math.ceil(height * resolvedPixelDensity);
|
|
30406
30413
|
const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
30407
|
-
const { isRendering } = useRemotionEnvironment();
|
|
30414
|
+
const { isClientSideRendering, isRendering } = useRemotionEnvironment();
|
|
30415
|
+
const canRetryMissingPaintRecord = !isRendering || isClientSideRendering;
|
|
30416
|
+
const usesDirectLayoutCanvas = onPaint === undefined && onInit === undefined;
|
|
30408
30417
|
if (!isHtmlInCanvasSupported()) {
|
|
30409
30418
|
cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
|
|
30410
30419
|
}
|
|
30411
30420
|
const canvas2dRef = useRef22(null);
|
|
30412
|
-
const
|
|
30421
|
+
const paintTargetRef = useRef22(null);
|
|
30413
30422
|
const divRef = useRef22(null);
|
|
30414
|
-
const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
|
|
30423
|
+
const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}-${usesDirectLayoutCanvas ? "direct" : "offscreen"}`;
|
|
30415
30424
|
const setLayoutCanvasRef = useCallback16((node) => {
|
|
30416
30425
|
canvas2dRef.current = node;
|
|
30417
30426
|
if (typeof ref === "function") {
|
|
@@ -30434,17 +30443,19 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30434
30443
|
const initializedRef = useRef22(false);
|
|
30435
30444
|
const onInitCleanupRef = useRef22(null);
|
|
30436
30445
|
const unmountedRef = useRef22(false);
|
|
30446
|
+
const ancestorRef = useRef22(ancestor);
|
|
30447
|
+
ancestorRef.current = ancestor;
|
|
30437
30448
|
const onPaintCb = useCallback16(async () => {
|
|
30438
30449
|
const element = divRef.current;
|
|
30439
30450
|
if (!element) {
|
|
30440
30451
|
throw new Error("Canvas or scene element not found");
|
|
30441
30452
|
}
|
|
30442
|
-
const
|
|
30443
|
-
if (!
|
|
30444
|
-
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");
|
|
30445
30456
|
}
|
|
30446
|
-
|
|
30447
|
-
|
|
30457
|
+
resizePaintTarget({
|
|
30458
|
+
target: paintTarget,
|
|
30448
30459
|
width: canvasWidth,
|
|
30449
30460
|
height: canvasHeight
|
|
30450
30461
|
});
|
|
@@ -30455,22 +30466,30 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30455
30466
|
}
|
|
30456
30467
|
const handle = delayRender("onPaint");
|
|
30457
30468
|
if (!initializedRef.current) {
|
|
30458
|
-
|
|
30459
|
-
|
|
30460
|
-
|
|
30461
|
-
}
|
|
30462
|
-
|
|
30463
|
-
|
|
30464
|
-
|
|
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
|
+
}
|
|
30465
30484
|
throw error2;
|
|
30466
30485
|
}
|
|
30467
|
-
}
|
|
30468
|
-
if (initImage) {
|
|
30469
30486
|
initializedRef.current = true;
|
|
30470
|
-
|
|
30471
|
-
|
|
30487
|
+
try {
|
|
30488
|
+
if (paintTarget instanceof HTMLCanvasElement) {
|
|
30489
|
+
throw new Error("HtmlInCanvas: onInit requires an OffscreenCanvas paint target");
|
|
30490
|
+
}
|
|
30472
30491
|
const cleanup = await currentOnInit({
|
|
30473
|
-
canvas:
|
|
30492
|
+
canvas: paintTarget,
|
|
30474
30493
|
element,
|
|
30475
30494
|
elementImage: initImage,
|
|
30476
30495
|
pixelDensity: resolvedPixelDensity
|
|
@@ -30483,15 +30502,16 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30483
30502
|
} else {
|
|
30484
30503
|
onInitCleanupRef.current = cleanup;
|
|
30485
30504
|
}
|
|
30505
|
+
} finally {
|
|
30506
|
+
initImage.close();
|
|
30486
30507
|
}
|
|
30487
30508
|
}
|
|
30488
30509
|
}
|
|
30489
|
-
const handler = onPaintRef.current ?? defaultOnPaint;
|
|
30490
30510
|
let elImage;
|
|
30491
30511
|
try {
|
|
30492
30512
|
elImage = placeholderCanvas.captureElementImage(element);
|
|
30493
30513
|
} catch (error2) {
|
|
30494
|
-
if (isMissingPaintRecordError(error2) &&
|
|
30514
|
+
if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
|
|
30495
30515
|
continueRender2(handle);
|
|
30496
30516
|
return;
|
|
30497
30517
|
}
|
|
@@ -30500,20 +30520,41 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30500
30520
|
}
|
|
30501
30521
|
throw error2;
|
|
30502
30522
|
}
|
|
30503
|
-
|
|
30504
|
-
|
|
30505
|
-
|
|
30506
|
-
|
|
30507
|
-
|
|
30508
|
-
|
|
30509
|
-
|
|
30510
|
-
|
|
30511
|
-
|
|
30512
|
-
|
|
30513
|
-
|
|
30514
|
-
|
|
30515
|
-
|
|
30516
|
-
|
|
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();
|
|
30517
30558
|
continueRender2(handle);
|
|
30518
30559
|
} catch (error2) {
|
|
30519
30560
|
cancelRender2(error2);
|
|
@@ -30525,7 +30566,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30525
30566
|
continueRender2,
|
|
30526
30567
|
cancelRender2,
|
|
30527
30568
|
resolvedPixelDensity,
|
|
30528
|
-
|
|
30569
|
+
canRetryMissingPaintRecord
|
|
30529
30570
|
]);
|
|
30530
30571
|
useLayoutEffect9(() => {
|
|
30531
30572
|
const placeholder = canvas2dRef.current;
|
|
@@ -30533,10 +30574,10 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30533
30574
|
throw new Error("Canvas not found");
|
|
30534
30575
|
}
|
|
30535
30576
|
placeholder.layoutSubtree = true;
|
|
30536
|
-
const
|
|
30537
|
-
|
|
30538
|
-
|
|
30539
|
-
|
|
30577
|
+
const paintTarget = usesDirectLayoutCanvas ? placeholder : placeholder.transferControlToOffscreen();
|
|
30578
|
+
paintTargetRef.current = paintTarget;
|
|
30579
|
+
resizePaintTarget({
|
|
30580
|
+
target: paintTarget,
|
|
30540
30581
|
width: canvasWidth,
|
|
30541
30582
|
height: canvasHeight
|
|
30542
30583
|
});
|
|
@@ -30545,13 +30586,19 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30545
30586
|
placeholder.addEventListener("paint", onPaintCb);
|
|
30546
30587
|
return () => {
|
|
30547
30588
|
placeholder.removeEventListener("paint", onPaintCb);
|
|
30548
|
-
|
|
30589
|
+
paintTargetRef.current = null;
|
|
30549
30590
|
initializedRef.current = false;
|
|
30550
30591
|
unmountedRef.current = true;
|
|
30551
30592
|
onInitCleanupRef.current?.();
|
|
30552
30593
|
onInitCleanupRef.current = null;
|
|
30553
30594
|
};
|
|
30554
|
-
}, [
|
|
30595
|
+
}, [
|
|
30596
|
+
onPaintCb,
|
|
30597
|
+
cancelRender2,
|
|
30598
|
+
canvasWidth,
|
|
30599
|
+
canvasHeight,
|
|
30600
|
+
usesDirectLayoutCanvas
|
|
30601
|
+
]);
|
|
30555
30602
|
const onPaintChangedRef = useRef22(false);
|
|
30556
30603
|
useLayoutEffect9(() => {
|
|
30557
30604
|
if (!onPaintChangedRef.current) {
|
|
@@ -30590,11 +30637,15 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
30590
30637
|
...style ?? {}
|
|
30591
30638
|
};
|
|
30592
30639
|
}, [height, style, width]);
|
|
30593
|
-
|
|
30594
|
-
|
|
30595
|
-
|
|
30640
|
+
const ancestorValue = useMemo30(() => {
|
|
30641
|
+
return {
|
|
30642
|
+
requestParentPaint: () => {
|
|
30643
|
+
canvas2dRef.current?.requestPaint?.();
|
|
30644
|
+
}
|
|
30645
|
+
};
|
|
30646
|
+
}, []);
|
|
30596
30647
|
return /* @__PURE__ */ jsx25(HtmlInCanvasAncestorContext.Provider, {
|
|
30597
|
-
value:
|
|
30648
|
+
value: ancestorValue,
|
|
30598
30649
|
children: /* @__PURE__ */ jsx25("canvas", {
|
|
30599
30650
|
ref: setLayoutCanvasRef,
|
|
30600
30651
|
width: canvasWidth,
|
|
@@ -32964,66 +33015,130 @@ var flattenChildren = (children) => {
|
|
|
32964
33015
|
return flatChildren;
|
|
32965
33016
|
}, []);
|
|
32966
33017
|
};
|
|
32967
|
-
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) => {
|
|
32968
33033
|
useRequireToBeInsideSeries();
|
|
33034
|
+
if (_remotionInternalRender) {
|
|
33035
|
+
return _remotionInternalRender({ ...props2, offset, className: className || undefined, stack }, ref);
|
|
33036
|
+
}
|
|
32969
33037
|
return /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
|
|
32970
|
-
children
|
|
33038
|
+
children: props2.children
|
|
32971
33039
|
});
|
|
32972
|
-
};
|
|
32973
|
-
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
|
+
});
|
|
32974
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
|
+
};
|
|
32975
33074
|
var SeriesInner = (props2) => {
|
|
32976
33075
|
const childrenValue = useMemo38(() => {
|
|
32977
|
-
let startFrame = 0;
|
|
32978
33076
|
const flattenedChildren = flattenChildren(props2.children);
|
|
32979
|
-
|
|
33077
|
+
const renderChildren = (i, startFrame) => {
|
|
33078
|
+
if (i === flattenedChildren.length) {
|
|
33079
|
+
return null;
|
|
33080
|
+
}
|
|
33081
|
+
const child = flattenedChildren[i];
|
|
32980
33082
|
const castedChild = child;
|
|
32981
33083
|
if (typeof castedChild === "string") {
|
|
32982
33084
|
if (castedChild.trim() === "") {
|
|
32983
|
-
return
|
|
33085
|
+
return renderChildren(i + 1, startFrame);
|
|
32984
33086
|
}
|
|
32985
33087
|
throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string "${castedChild}"`);
|
|
32986
33088
|
}
|
|
32987
33089
|
if (castedChild.type !== SeriesSequence) {
|
|
32988
33090
|
throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
|
|
32989
33091
|
}
|
|
32990
|
-
const
|
|
32991
|
-
|
|
32992
|
-
|
|
32993
|
-
|
|
32994
|
-
|
|
32995
|
-
|
|
32996
|
-
name,
|
|
32997
|
-
...passedProps
|
|
32998
|
-
} = castedChild.props;
|
|
32999
|
-
if (i !== flattenedChildren.length - 1 || durationInFramesProp !== Infinity) {
|
|
33000
|
-
validateDurationInFrames(durationInFramesProp, {
|
|
33001
|
-
component: `of a <Series.Sequence /> component`,
|
|
33002
|
-
allowFloats: true
|
|
33003
|
-
});
|
|
33004
|
-
}
|
|
33005
|
-
const offset = castedChild.props.offset ?? 0;
|
|
33006
|
-
if (Number.isNaN(offset)) {
|
|
33007
|
-
throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
|
|
33008
|
-
}
|
|
33009
|
-
if (!Number.isFinite(offset)) {
|
|
33010
|
-
throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
33011
|
-
}
|
|
33012
|
-
if (offset % 1 !== 0) {
|
|
33013
|
-
throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
|
|
33014
|
-
}
|
|
33015
|
-
const currentStartFrame = startFrame + offset;
|
|
33016
|
-
startFrame += durationInFramesProp + offset;
|
|
33017
|
-
return /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
|
|
33018
|
-
ref: castedChild.ref,
|
|
33019
|
-
name: name || "<Series.Sequence>",
|
|
33020
|
-
_remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
|
|
33021
|
-
from: currentStartFrame,
|
|
33022
|
-
durationInFrames: durationInFramesProp,
|
|
33023
|
-
...passedProps,
|
|
33024
|
-
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
|
|
33025
33098
|
});
|
|
33026
|
-
|
|
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);
|
|
33027
33142
|
}, [props2.children]);
|
|
33028
33143
|
return /* @__PURE__ */ jsx37(IsInsideSeriesContainer, {
|
|
33029
33144
|
children: /* @__PURE__ */ jsx37(Sequence, {
|
|
@@ -33624,7 +33739,7 @@ addSequenceStackTraces(Folder);
|
|
|
33624
33739
|
// ../shapes/dist/esm/index.mjs
|
|
33625
33740
|
import React, { useCallback as useCallback26, useMemo as useMemo40, useRef as useRef29 } from "react";
|
|
33626
33741
|
import { version } from "react-dom";
|
|
33627
|
-
import { jsx as jsx40, jsxs as
|
|
33742
|
+
import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
33628
33743
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
33629
33744
|
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
33630
33745
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
@@ -33826,7 +33941,7 @@ var RenderSvg = ({
|
|
|
33826
33941
|
const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(effects);
|
|
33827
33942
|
const videoConfig = Internals.useUnsafeVideoConfig();
|
|
33828
33943
|
const reactSupportsTransformOrigin = doesReactSupportTransformOriginProperty(version);
|
|
33829
|
-
const svg = /* @__PURE__ */
|
|
33944
|
+
const svg = /* @__PURE__ */ jsxs4("svg", {
|
|
33830
33945
|
ref: effects.length === 0 || !videoConfig ? setSvgRef : undefined,
|
|
33831
33946
|
width,
|
|
33832
33947
|
height,
|
|
@@ -33852,7 +33967,7 @@ var RenderSvg = ({
|
|
|
33852
33967
|
}
|
|
33853
33968
|
const prevX = prevInstruction.x;
|
|
33854
33969
|
const prevY = prevInstruction.y;
|
|
33855
|
-
return /* @__PURE__ */
|
|
33970
|
+
return /* @__PURE__ */ jsxs4(React.Fragment, {
|
|
33856
33971
|
children: [
|
|
33857
33972
|
/* @__PURE__ */ jsx40("path", {
|
|
33858
33973
|
d: `M ${prevX} ${prevY} ${i.cp1x} ${i.cp1y}`,
|
|
@@ -36534,7 +36649,7 @@ var extrudeAndTransformElement = (options) => {
|
|
|
36534
36649
|
|
|
36535
36650
|
// ../design/dist/esm/index.mjs
|
|
36536
36651
|
import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
36537
|
-
import { jsx as jsx312, jsxs as
|
|
36652
|
+
import { jsx as jsx312, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
36538
36653
|
import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef31 } from "react";
|
|
36539
36654
|
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
36540
36655
|
import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
@@ -36593,11 +36708,11 @@ import * as React302 from "react";
|
|
|
36593
36708
|
import * as React342 from "react";
|
|
36594
36709
|
import * as React332 from "react";
|
|
36595
36710
|
import * as React322 from "react";
|
|
36596
|
-
import { Fragment as Fragment8, jsx as jsx242, jsxs as
|
|
36711
|
+
import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
36597
36712
|
import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
|
|
36598
36713
|
import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
|
|
36599
36714
|
import * as React372 from "react";
|
|
36600
|
-
import { jsx as jsx252, jsxs as
|
|
36715
|
+
import { jsx as jsx252, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
36601
36716
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
36602
36717
|
import * as React49 from "react";
|
|
36603
36718
|
import * as React38 from "react";
|
|
@@ -36605,12 +36720,12 @@ import { jsx as jsx272 } from "react/jsx-runtime";
|
|
|
36605
36720
|
import * as React47 from "react";
|
|
36606
36721
|
import React402 from "react";
|
|
36607
36722
|
import * as React392 from "react";
|
|
36608
|
-
import { Fragment as
|
|
36723
|
+
import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
|
|
36609
36724
|
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
36610
36725
|
import React210 from "react";
|
|
36611
36726
|
import { jsx as jsx2102 } from "react/jsx-runtime";
|
|
36612
36727
|
import * as React422 from "react";
|
|
36613
|
-
import * as
|
|
36728
|
+
import * as React412 from "react";
|
|
36614
36729
|
import * as React43 from "react";
|
|
36615
36730
|
import * as ReactDOM5 from "react-dom";
|
|
36616
36731
|
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
@@ -36720,7 +36835,7 @@ function createSlotClone(ownerName) {
|
|
|
36720
36835
|
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
36721
36836
|
function createSlottable(ownerName) {
|
|
36722
36837
|
const Slottable2 = ({ children }) => {
|
|
36723
|
-
return /* @__PURE__ */ jsx43(
|
|
36838
|
+
return /* @__PURE__ */ jsx43(Fragment22, { children });
|
|
36724
36839
|
};
|
|
36725
36840
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
36726
36841
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -37017,7 +37132,7 @@ var Outer = ({
|
|
|
37017
37132
|
description: "rect",
|
|
37018
37133
|
transformations: centerOriented
|
|
37019
37134
|
});
|
|
37020
|
-
return /* @__PURE__ */
|
|
37135
|
+
return /* @__PURE__ */ jsxs6("div", {
|
|
37021
37136
|
className: "relative",
|
|
37022
37137
|
style: { width, height },
|
|
37023
37138
|
children: [
|
|
@@ -41065,7 +41180,7 @@ var Select = (props) => {
|
|
|
41065
41180
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
41066
41181
|
const [nativeOptionsSet, setNativeOptionsSet] = React36.useState(/* @__PURE__ */ new Set);
|
|
41067
41182
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
41068
|
-
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */
|
|
41183
|
+
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
|
|
41069
41184
|
required,
|
|
41070
41185
|
scope: __scopeSelect,
|
|
41071
41186
|
trigger,
|
|
@@ -41097,7 +41212,7 @@ var Select = (props) => {
|
|
|
41097
41212
|
}, []),
|
|
41098
41213
|
children
|
|
41099
41214
|
}) }),
|
|
41100
|
-
isFormControl ? /* @__PURE__ */
|
|
41215
|
+
isFormControl ? /* @__PURE__ */ jsxs42(BubbleSelect, {
|
|
41101
41216
|
"aria-hidden": true,
|
|
41102
41217
|
required,
|
|
41103
41218
|
tabIndex: -1,
|
|
@@ -41605,7 +41720,7 @@ var SelectViewport = React36.forwardRef((props, forwardedRef) => {
|
|
|
41605
41720
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
41606
41721
|
const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
|
|
41607
41722
|
const prevScrollTopRef = React36.useRef(0);
|
|
41608
|
-
return /* @__PURE__ */
|
|
41723
|
+
return /* @__PURE__ */ jsxs42(Fragment8, { children: [
|
|
41609
41724
|
/* @__PURE__ */ jsx242("style", {
|
|
41610
41725
|
dangerouslySetInnerHTML: {
|
|
41611
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}`
|
|
@@ -41762,7 +41877,7 @@ var SelectItemText = React36.forwardRef((props, forwardedRef) => {
|
|
|
41762
41877
|
onNativeOptionAdd(nativeOption);
|
|
41763
41878
|
return () => onNativeOptionRemove(nativeOption);
|
|
41764
41879
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
41765
|
-
return /* @__PURE__ */
|
|
41880
|
+
return /* @__PURE__ */ jsxs42(Fragment8, { children: [
|
|
41766
41881
|
/* @__PURE__ */ jsx242(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
41767
41882
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM4.createPortal(itemTextProps.children, context.valueNode) : null
|
|
41768
41883
|
] });
|
|
@@ -42021,7 +42136,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
42021
42136
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
42022
42137
|
var Select2 = Root222;
|
|
42023
42138
|
var SelectValue2 = Value;
|
|
42024
|
-
var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
42139
|
+
var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
42025
42140
|
ref,
|
|
42026
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),
|
|
42027
42142
|
...props,
|
|
@@ -42055,7 +42170,7 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
|
|
|
42055
42170
|
}));
|
|
42056
42171
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
42057
42172
|
var SelectContent2 = React372.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
|
|
42058
|
-
children: /* @__PURE__ */
|
|
42173
|
+
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
42059
42174
|
ref,
|
|
42060
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),
|
|
42061
42176
|
position,
|
|
@@ -42077,7 +42192,7 @@ var SelectLabel2 = React372.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
42077
42192
|
...props
|
|
42078
42193
|
}));
|
|
42079
42194
|
SelectLabel2.displayName = Label.displayName;
|
|
42080
|
-
var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
42195
|
+
var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
42081
42196
|
ref,
|
|
42082
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),
|
|
42083
42198
|
...props,
|
|
@@ -42619,7 +42734,7 @@ function toSafeIndex(array, index2) {
|
|
|
42619
42734
|
function toSafeInteger(number) {
|
|
42620
42735
|
return number !== number || number === 0 ? 0 : Math.trunc(number);
|
|
42621
42736
|
}
|
|
42622
|
-
var useLayoutEffect222 = globalThis?.document ?
|
|
42737
|
+
var useLayoutEffect222 = globalThis?.document ? React412.useLayoutEffect : () => {};
|
|
42623
42738
|
var useReactId2 = React422[" useId ".trim().toString()] || (() => {
|
|
42624
42739
|
return;
|
|
42625
42740
|
});
|
|
@@ -43254,7 +43369,7 @@ var ClipboardIcon = ({ size: size4 = 16, color = "currentColor" }) => {
|
|
|
43254
43369
|
};
|
|
43255
43370
|
|
|
43256
43371
|
// src/components/prompts/CopyPromptButton.tsx
|
|
43257
|
-
import { jsx as jsx46, jsxs as
|
|
43372
|
+
import { jsx as jsx46, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
43258
43373
|
var CopyPromptButton = ({ prompt }) => {
|
|
43259
43374
|
const [copied, setCopied] = useState40(false);
|
|
43260
43375
|
const onCopy = useCallback38(() => {
|
|
@@ -43267,7 +43382,7 @@ var CopyPromptButton = ({ prompt }) => {
|
|
|
43267
43382
|
onClick: onCopy,
|
|
43268
43383
|
style: { width: 160 },
|
|
43269
43384
|
depth: 0.6,
|
|
43270
|
-
children: /* @__PURE__ */
|
|
43385
|
+
children: /* @__PURE__ */ jsxs7("div", {
|
|
43271
43386
|
className: "flex items-center flex-row flex-1 w-[130px]",
|
|
43272
43387
|
children: [
|
|
43273
43388
|
/* @__PURE__ */ jsx46(ClipboardIcon, {
|
|
@@ -43392,7 +43507,7 @@ var useHeartAnimation = () => {
|
|
|
43392
43507
|
};
|
|
43393
43508
|
|
|
43394
43509
|
// src/components/prompts/LikeButton.tsx
|
|
43395
|
-
import { jsx as jsx47, jsxs as
|
|
43510
|
+
import { jsx as jsx47, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
43396
43511
|
var LikeButton = ({ submissionId, initialLikeCount }) => {
|
|
43397
43512
|
const [liked, setLiked] = useState42(false);
|
|
43398
43513
|
const [likeCount, setLikeCount] = useState42(initialLikeCount);
|
|
@@ -43430,7 +43545,7 @@ var LikeButton = ({ submissionId, initialLikeCount }) => {
|
|
|
43430
43545
|
className: `font-brand rounded-full flex items-center ${liked ? "bg-brand text-white" : ""}`,
|
|
43431
43546
|
onClick,
|
|
43432
43547
|
style: { width: 90 },
|
|
43433
|
-
children: /* @__PURE__ */
|
|
43548
|
+
children: /* @__PURE__ */ jsxs8("div", {
|
|
43434
43549
|
className: "flex items-center flex-row flex-1 w-[40px] justify-center",
|
|
43435
43550
|
children: [
|
|
43436
43551
|
/* @__PURE__ */ jsx47(Heart, {
|
|
@@ -45922,14 +46037,14 @@ import"react-dom";
|
|
|
45922
46037
|
|
|
45923
46038
|
// src/components/prompts/MuxPlayer.tsx
|
|
45924
46039
|
import { useCallback as useCallback42 } from "react";
|
|
45925
|
-
import { jsx as jsx48, jsxs as
|
|
46040
|
+
import { jsx as jsx48, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
45926
46041
|
var MuxPlayer = ({ playbackId, title, rounded = true }) => {
|
|
45927
46042
|
const onProviderChange = useCallback42((provider2, _e) => {
|
|
45928
46043
|
if (isHLSProvider(provider2)) {
|
|
45929
46044
|
provider2.library = () => import("hls.js");
|
|
45930
46045
|
}
|
|
45931
46046
|
}, []);
|
|
45932
|
-
return /* @__PURE__ */
|
|
46047
|
+
return /* @__PURE__ */ jsxs9(MediaPlayer2, {
|
|
45933
46048
|
src: `https://stream.mux.com/${playbackId}.m3u8`,
|
|
45934
46049
|
crossOrigin: true,
|
|
45935
46050
|
playsInline: true,
|
|
@@ -45955,7 +46070,7 @@ var MuxPlayer = ({ playbackId, title, rounded = true }) => {
|
|
|
45955
46070
|
};
|
|
45956
46071
|
|
|
45957
46072
|
// src/components/prompts/NewBackButton.tsx
|
|
45958
|
-
import { jsx as jsx49, jsxs as
|
|
46073
|
+
import { jsx as jsx49, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
45959
46074
|
var NewBackButton = ({ text, link }) => {
|
|
45960
46075
|
return /* @__PURE__ */ jsx49("div", {
|
|
45961
46076
|
className: "justify-center items-center font-medium mb-4 block text-text",
|
|
@@ -45966,7 +46081,7 @@ var NewBackButton = ({ text, link }) => {
|
|
|
45966
46081
|
children: /* @__PURE__ */ jsx49(Button, {
|
|
45967
46082
|
href: link,
|
|
45968
46083
|
className: "px-8 rounded-full text-sm h-10",
|
|
45969
|
-
children: /* @__PURE__ */
|
|
46084
|
+
children: /* @__PURE__ */ jsxs10("div", {
|
|
45970
46085
|
className: "flex row items-center justify-start font-normal",
|
|
45971
46086
|
children: [
|
|
45972
46087
|
/* @__PURE__ */ jsx49("svg", {
|
|
@@ -46000,14 +46115,14 @@ var Page = ({ children, className, onDrop, onDragOver }) => {
|
|
|
46000
46115
|
};
|
|
46001
46116
|
|
|
46002
46117
|
// src/components/prompts/PromptsShow.tsx
|
|
46003
|
-
import { jsx as jsx51, jsxs as
|
|
46118
|
+
import { jsx as jsx51, jsxs as jsxs11, Fragment as Fragment13 } from "react/jsx-runtime";
|
|
46004
46119
|
var PromptsShowPage = ({ promptSubmission }) => {
|
|
46005
46120
|
const avatarUrl = getAvatarUrl(promptSubmission);
|
|
46006
46121
|
const authorName = getAuthorName(promptSubmission);
|
|
46007
46122
|
const authorLink = promptSubmission.githubUsername ? `https://github.com/${promptSubmission.githubUsername}` : promptSubmission.xUsername ? `https://x.com/${promptSubmission.xUsername}` : null;
|
|
46008
46123
|
return /* @__PURE__ */ jsx51(Page, {
|
|
46009
46124
|
className: "flex-col",
|
|
46010
|
-
children: /* @__PURE__ */
|
|
46125
|
+
children: /* @__PURE__ */ jsxs11("div", {
|
|
46011
46126
|
className: "m-auto max-w-[800px] w-full px-4 py-12",
|
|
46012
46127
|
children: [
|
|
46013
46128
|
/* @__PURE__ */ jsx51(NewBackButton, {
|
|
@@ -46021,9 +46136,9 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
46021
46136
|
className: "text-2xl font-brand font-black",
|
|
46022
46137
|
children: promptSubmission.title
|
|
46023
46138
|
}),
|
|
46024
|
-
/* @__PURE__ */
|
|
46139
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46025
46140
|
children: [
|
|
46026
|
-
/* @__PURE__ */
|
|
46141
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46027
46142
|
className: "flex items-center gap-3 mt-4 mb-4",
|
|
46028
46143
|
children: [
|
|
46029
46144
|
avatarUrl && /* @__PURE__ */ jsx51("img", {
|
|
@@ -46033,9 +46148,9 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
46033
46148
|
className: "rounded-full",
|
|
46034
46149
|
alt: authorName ? `${authorName}'s avatar` : "Author avatar"
|
|
46035
46150
|
}),
|
|
46036
|
-
/* @__PURE__ */
|
|
46151
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46037
46152
|
children: [
|
|
46038
|
-
/* @__PURE__ */
|
|
46153
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46039
46154
|
className: "text-sm font-brand",
|
|
46040
46155
|
children: [
|
|
46041
46156
|
"Prompted by",
|
|
@@ -46061,14 +46176,14 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
46061
46176
|
})
|
|
46062
46177
|
]
|
|
46063
46178
|
}),
|
|
46064
|
-
/* @__PURE__ */
|
|
46179
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46065
46180
|
children: [
|
|
46066
46181
|
/* @__PURE__ */ jsx51(MuxPlayer, {
|
|
46067
46182
|
playbackId: promptSubmission.muxPlaybackId,
|
|
46068
46183
|
title: promptSubmission.title,
|
|
46069
46184
|
rounded: false
|
|
46070
46185
|
}),
|
|
46071
|
-
promptSubmission.toolUsed && /* @__PURE__ */
|
|
46186
|
+
promptSubmission.toolUsed && /* @__PURE__ */ jsxs11(Fragment13, {
|
|
46072
46187
|
children: [
|
|
46073
46188
|
/* @__PURE__ */ jsx51("h2", {
|
|
46074
46189
|
className: "font-brand font-bold mt-6 mb-2",
|
|
@@ -46080,7 +46195,7 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
46080
46195
|
})
|
|
46081
46196
|
]
|
|
46082
46197
|
}),
|
|
46083
|
-
promptSubmission.modelUsed && /* @__PURE__ */
|
|
46198
|
+
promptSubmission.modelUsed && /* @__PURE__ */ jsxs11(Fragment13, {
|
|
46084
46199
|
children: [
|
|
46085
46200
|
/* @__PURE__ */ jsx51("h2", {
|
|
46086
46201
|
className: "font-brand font-bold mt-6 mb-2",
|
|
@@ -46101,7 +46216,7 @@ var PromptsShowPage = ({ promptSubmission }) => {
|
|
|
46101
46216
|
style: { backgroundColor: "#272A36" },
|
|
46102
46217
|
children: promptSubmission.prompt
|
|
46103
46218
|
}),
|
|
46104
|
-
/* @__PURE__ */
|
|
46219
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
46105
46220
|
className: "mt-6 flex items-center gap-2",
|
|
46106
46221
|
children: [
|
|
46107
46222
|
/* @__PURE__ */ jsx51(LikeButton, {
|