@hyperframes/studio 0.8.204 → 0.8.206
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/assets/hyperframes-player-lCVwx9d3.js +478 -0
- package/dist/assets/{index-DpxSurnJ.js → index-BNuxGFZK.js} +1 -1
- package/dist/assets/{index-DmST2bTJ.js → index-CwreIGoq.js} +132 -132
- package/dist/{chunk-Z5NKM57J.js → chunk-3EAFE522.js} +8 -4
- package/dist/{chunk-2YCKGJFD.js → chunk-DAZTBGYM.js} +1 -1
- package/dist/{chunk-T43DM7Q6.js → chunk-OGIOFEC7.js} +4 -2
- package/dist/{domEditingLayers-WMDSHU5P.js → domEditingLayers-7Z6J4UOK.js} +2 -2
- package/dist/index.d.ts +4 -3
- package/dist/index.html +1 -1
- package/dist/index.js +699 -554
- package/dist/player.js +2 -2
- package/package.json +8 -8
- package/src/components/DesktopGuideCard.tsx +1 -1
- package/src/components/MediaPreview.test.tsx +69 -0
- package/src/components/MediaPreview.tsx +10 -5
- package/src/components/OpenInDesktopButton.dom.test.tsx +27 -5
- package/src/components/editor/domEditLayerWalkCache.test.ts +48 -0
- package/src/components/editor/domEditLayerWalkCache.ts +6 -0
- package/src/components/editor/domEditingLayers.ts +3 -2
- package/src/components/renders/GifLoopInput.tsx +40 -0
- package/src/components/renders/GpuEncodingToggle.tsx +1 -1
- package/src/components/renders/RenderDurationNote.tsx +19 -0
- package/src/components/renders/RenderPreview.tsx +41 -0
- package/src/components/renders/RenderQueue.test.tsx +77 -0
- package/src/components/renders/RenderQueue.tsx +46 -41
- package/src/components/renders/RenderQueueInfo.tsx +61 -0
- package/src/components/renders/RenderQueueItem.test.tsx +46 -0
- package/src/components/renders/RenderQueueItem.tsx +10 -80
- package/src/components/renders/RenderQueuePanel.tsx +2 -1
- package/src/components/renders/renderSettings.ts +61 -2
- package/src/components/renders/useRenderQueue.ts +10 -2
- package/src/components/renders/useRenderQueueComposition.test.tsx +13 -0
- package/src/components/sidebar/PromptPreviewModal.test.tsx +22 -0
- package/src/components/sidebar/PromptPreviewModal.tsx +1 -0
- package/src/player/hooks/previewMessageRouter.test.ts +34 -0
- package/src/player/hooks/previewMessageRouter.ts +14 -3
- package/src/utils/sourceScopedSelectorIndex.ts +5 -2
- package/dist/assets/hyperframes-player-CttA4PW7.js +0 -478
package/dist/index.js
CHANGED
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
whenPreviewBooted,
|
|
55
55
|
writeStudioUiPreferences,
|
|
56
56
|
zoomToSelectedClips
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-DAZTBGYM.js";
|
|
58
58
|
import {
|
|
59
59
|
Button,
|
|
60
60
|
ContextMenu,
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
resolveAllVisualDomEditTargets,
|
|
113
113
|
resolveDomEditSelection,
|
|
114
114
|
serializeDomEditTextFields
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-3EAFE522.js";
|
|
116
116
|
import {
|
|
117
117
|
LAYER_REVEAL_PRIOR_POSITION_ATTR,
|
|
118
118
|
LAYER_REVEAL_PRIOR_Z_ATTR,
|
|
@@ -179,7 +179,7 @@ import {
|
|
|
179
179
|
studioApiFetch,
|
|
180
180
|
toHexColor,
|
|
181
181
|
wrapTimeline
|
|
182
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-OGIOFEC7.js";
|
|
183
183
|
import "./chunk-MLKGABMK.js";
|
|
184
184
|
|
|
185
185
|
// src/components/EditorShell.tsx
|
|
@@ -32294,7 +32294,13 @@ function acceptedPreviewMessage(e, iframe) {
|
|
|
32294
32294
|
if (data?.source !== "hf-preview") return null;
|
|
32295
32295
|
return acceptStudioRuntimeMessage(data) ? data : null;
|
|
32296
32296
|
}
|
|
32297
|
-
function
|
|
32297
|
+
function enrichDue(lastTimelineMessage, enriched) {
|
|
32298
|
+
const now2 = Date.now();
|
|
32299
|
+
if (now2 - lastTimelineMessage <= 500 || now2 - enriched.at <= 500) return false;
|
|
32300
|
+
enriched.at = now2;
|
|
32301
|
+
return true;
|
|
32302
|
+
}
|
|
32303
|
+
function handleStateMessage(deps, iframe, playingHoldsClipListPosts, enriched) {
|
|
32298
32304
|
try {
|
|
32299
32305
|
if (usePlayerStore.getState().elements.length === 0) {
|
|
32300
32306
|
const manifest = iframe?.contentWindow?.__clipManifest;
|
|
@@ -32302,7 +32308,7 @@ function handleStateMessage(deps, iframe, playingHoldsClipListPosts) {
|
|
|
32302
32308
|
deps.processTimelineMessageRef.current(manifest);
|
|
32303
32309
|
}
|
|
32304
32310
|
}
|
|
32305
|
-
if (!playingHoldsClipListPosts &&
|
|
32311
|
+
if (!playingHoldsClipListPosts && enrichDue(deps.lastTimelineMessageRef.current, enriched)) {
|
|
32306
32312
|
deps.enrichMissingCompositionsRef.current();
|
|
32307
32313
|
}
|
|
32308
32314
|
} catch {
|
|
@@ -32339,11 +32345,13 @@ function applyStoreReport(data) {
|
|
|
32339
32345
|
}
|
|
32340
32346
|
}
|
|
32341
32347
|
function createPreviewMessageHandler(deps) {
|
|
32348
|
+
const enriched = { at: 0 };
|
|
32342
32349
|
return (e) => {
|
|
32343
32350
|
const iframe = deps.iframeRef.current;
|
|
32344
32351
|
const data = acceptedPreviewMessage(e, iframe);
|
|
32345
32352
|
if (!data) return;
|
|
32346
|
-
if (data.type === "state")
|
|
32353
|
+
if (data.type === "state")
|
|
32354
|
+
return handleStateMessage(deps, iframe, data.isPlaying === true, enriched);
|
|
32347
32355
|
if (applyStoreReport(data)) return;
|
|
32348
32356
|
if (data.type === "ready") {
|
|
32349
32357
|
const level = usePlayerStore.getState().previewQuality;
|
|
@@ -37672,7 +37680,7 @@ function OffCanvasIndicators({
|
|
|
37672
37680
|
const selectOffCanvas = async () => {
|
|
37673
37681
|
const el = elements.current.get(r.key);
|
|
37674
37682
|
if (!el) return;
|
|
37675
|
-
const { resolveDomEditSelection: resolveDomEditSelection2 } = await import("./domEditingLayers-
|
|
37683
|
+
const { resolveDomEditSelection: resolveDomEditSelection2 } = await import("./domEditingLayers-7Z6J4UOK.js");
|
|
37676
37684
|
const acp = activeCompositionPathRef.current ?? "index.html";
|
|
37677
37685
|
const sel = await resolveDomEditSelection2(el, {
|
|
37678
37686
|
activeCompositionPath: acp,
|
|
@@ -73503,6 +73511,7 @@ function useRenderQueue(projectId, activeCompPathRef) {
|
|
|
73503
73511
|
if (resolution && resolution !== "auto") body.resolution = resolution;
|
|
73504
73512
|
if (composition) body.composition = composition;
|
|
73505
73513
|
if (opts.gpu) body.gpu = true;
|
|
73514
|
+
if (format === "gif" && opts.gifLoop !== void 0) body.gifLoop = opts.gifLoop;
|
|
73506
73515
|
if (opts.variables && Object.keys(opts.variables).length > 0) {
|
|
73507
73516
|
body.variables = opts.variables;
|
|
73508
73517
|
}
|
|
@@ -73539,7 +73548,12 @@ function useRenderQueue(projectId, activeCompPathRef) {
|
|
|
73539
73548
|
return;
|
|
73540
73549
|
}
|
|
73541
73550
|
const { jobId } = await res.json();
|
|
73542
|
-
const FORMAT_EXT = {
|
|
73551
|
+
const FORMAT_EXT = {
|
|
73552
|
+
mp4: ".mp4",
|
|
73553
|
+
webm: ".webm",
|
|
73554
|
+
mov: ".mov",
|
|
73555
|
+
gif: ".gif"
|
|
73556
|
+
};
|
|
73543
73557
|
const ext2 = FORMAT_EXT[format] ?? ".mp4";
|
|
73544
73558
|
const job = {
|
|
73545
73559
|
id: jobId,
|
|
@@ -90307,7 +90321,7 @@ function FrameyGlyph({
|
|
|
90307
90321
|
|
|
90308
90322
|
// src/components/DesktopGuideCard.tsx
|
|
90309
90323
|
import { jsx as jsx208, jsxs as jsxs162 } from "react/jsx-runtime";
|
|
90310
|
-
var platformName = (os) => os === "darwin" ? "Mac" : os === "linux" ? "Linux" : "your computer";
|
|
90324
|
+
var platformName = (os) => os === "darwin" ? "Mac" : os === "linux" ? "Linux" : os === "win32" ? "Windows" : "your computer";
|
|
90311
90325
|
var deviceName = (os) => os === "darwin" ? "Mac" : "computer";
|
|
90312
90326
|
var NOTE = "mt-0.5 text-step-12 text-text-2 text-pretty";
|
|
90313
90327
|
function Swap({ value, children }) {
|
|
@@ -91975,7 +91989,7 @@ import { useMemo as useMemo89 } from "react";
|
|
|
91975
91989
|
import { memo as memo51, useCallback as useCallback172 } from "react";
|
|
91976
91990
|
|
|
91977
91991
|
// src/components/MediaPreview.tsx
|
|
91978
|
-
import { useState as useState137 } from "react";
|
|
91992
|
+
import { useEffect as useEffect138, useState as useState137 } from "react";
|
|
91979
91993
|
import { encodeUrlPath as encodeUrlPath7 } from "@hyperframes/parsers";
|
|
91980
91994
|
import { jsx as jsx214, jsxs as jsxs167 } from "react/jsx-runtime";
|
|
91981
91995
|
function MediaErrorPanel({ name, filePath }) {
|
|
@@ -92006,9 +92020,15 @@ function MediaErrorPanel({ name, filePath }) {
|
|
|
92006
92020
|
function MediaPreview({ projectId, filePath }) {
|
|
92007
92021
|
const serveUrl = buildProjectApiPath(projectId, `/preview/${encodeUrlPath7(filePath)}`);
|
|
92008
92022
|
const name = filePath.split("/").pop() ?? filePath;
|
|
92009
|
-
const [
|
|
92010
|
-
|
|
92011
|
-
|
|
92023
|
+
const [failure, setFailure] = useState137({
|
|
92024
|
+
source: serveUrl,
|
|
92025
|
+
failed: false
|
|
92026
|
+
});
|
|
92027
|
+
useEffect138(() => {
|
|
92028
|
+
setFailure({ source: serveUrl, failed: false });
|
|
92029
|
+
}, [serveUrl]);
|
|
92030
|
+
const failed2 = failure.source === serveUrl && failure.failed;
|
|
92031
|
+
const setFailed = () => setFailure({ source: serveUrl, failed: true });
|
|
92012
92032
|
if (failed2) return /* @__PURE__ */ jsx214(MediaErrorPanel, { name, filePath });
|
|
92013
92033
|
if (IMAGE_EXT.test(filePath)) {
|
|
92014
92034
|
return /* @__PURE__ */ jsxs167("div", { className: "flex flex-col items-center justify-center h-full p-4 bg-neutral-950", children: [
|
|
@@ -92092,7 +92112,7 @@ function MediaPreview({ projectId, filePath }) {
|
|
|
92092
92112
|
}
|
|
92093
92113
|
|
|
92094
92114
|
// src/components/sidebar/AssetsTab.tsx
|
|
92095
|
-
import { memo as memo48, useState as useState143, useCallback as useCallback168, useRef as useRef174, useMemo as useMemo84, useEffect as
|
|
92115
|
+
import { memo as memo48, useState as useState143, useCallback as useCallback168, useRef as useRef174, useMemo as useMemo84, useEffect as useEffect144 } from "react";
|
|
92096
92116
|
|
|
92097
92117
|
// src/components/ui/SearchInput.tsx
|
|
92098
92118
|
import { jsx as jsx215, jsxs as jsxs168 } from "react/jsx-runtime";
|
|
@@ -92203,11 +92223,11 @@ var CATEGORY_LABELS = {
|
|
|
92203
92223
|
var FILTER_ORDER = ["audio", "images", "video", "fonts"];
|
|
92204
92224
|
|
|
92205
92225
|
// src/components/sidebar/AudioRow.tsx
|
|
92206
|
-
import { useState as useState139, useRef as useRef172, useEffect as
|
|
92226
|
+
import { useState as useState139, useRef as useRef172, useEffect as useEffect140, useCallback as useCallback166 } from "react";
|
|
92207
92227
|
import { classifyWebAudioMediaRoute } from "@hyperframes/core/runtime/web-audio-route";
|
|
92208
92228
|
|
|
92209
92229
|
// src/components/sidebar/AssetContextMenu.tsx
|
|
92210
|
-
import { useCallback as useCallback165, useEffect as
|
|
92230
|
+
import { useCallback as useCallback165, useEffect as useEffect139, useLayoutEffect as useLayoutEffect14, useRef as useRef171, useState as useState138 } from "react";
|
|
92211
92231
|
import { Fragment as Fragment59, jsx as jsx216, jsxs as jsxs169 } from "react/jsx-runtime";
|
|
92212
92232
|
function isValidAssetName(name) {
|
|
92213
92233
|
return name.length > 0 && !/[/\\]/.test(name) && !name.includes("..");
|
|
@@ -92237,7 +92257,7 @@ function ContextMenu3({
|
|
|
92237
92257
|
y: Math.min(y, window.innerHeight - rect.height - margin)
|
|
92238
92258
|
});
|
|
92239
92259
|
}, [x, y, mode]);
|
|
92240
|
-
|
|
92260
|
+
useEffect139(() => {
|
|
92241
92261
|
const onKeyDown = (e) => {
|
|
92242
92262
|
if (e.key === "Escape") {
|
|
92243
92263
|
e.stopPropagation();
|
|
@@ -92262,7 +92282,7 @@ function ContextMenu3({
|
|
|
92262
92282
|
document.addEventListener("keydown", onKeyDown, true);
|
|
92263
92283
|
return () => document.removeEventListener("keydown", onKeyDown, true);
|
|
92264
92284
|
}, [mode, onClose]);
|
|
92265
|
-
|
|
92285
|
+
useEffect139(() => {
|
|
92266
92286
|
if (mode === "menu") {
|
|
92267
92287
|
menuRef.current?.querySelector('[role="menuitem"]')?.focus();
|
|
92268
92288
|
}
|
|
@@ -92529,7 +92549,7 @@ function AudioRow({
|
|
|
92529
92549
|
},
|
|
92530
92550
|
[activateRow]
|
|
92531
92551
|
);
|
|
92532
|
-
|
|
92552
|
+
useEffect140(() => {
|
|
92533
92553
|
return () => {
|
|
92534
92554
|
cancelAnimationFrame(animRef.current);
|
|
92535
92555
|
audioRef.current?.pause();
|
|
@@ -92537,7 +92557,7 @@ function AudioRow({
|
|
|
92537
92557
|
if (stopCurrentPreview === stopPlayback) stopCurrentPreview = null;
|
|
92538
92558
|
};
|
|
92539
92559
|
}, [stopPlayback]);
|
|
92540
|
-
|
|
92560
|
+
useEffect140(() => {
|
|
92541
92561
|
if (playing) {
|
|
92542
92562
|
const barCount = 24;
|
|
92543
92563
|
const loop = () => {
|
|
@@ -92704,7 +92724,7 @@ function AudioRow({
|
|
|
92704
92724
|
}
|
|
92705
92725
|
|
|
92706
92726
|
// src/components/sidebar/GlobalAssetsView.tsx
|
|
92707
|
-
import { useEffect as
|
|
92727
|
+
import { useEffect as useEffect141, useMemo as useMemo83, useState as useState140 } from "react";
|
|
92708
92728
|
import { jsx as jsx218, jsxs as jsxs171 } from "react/jsx-runtime";
|
|
92709
92729
|
function globalAssetRows(records, query = "") {
|
|
92710
92730
|
const q = query.trim().toLowerCase();
|
|
@@ -92720,7 +92740,7 @@ function globalAssetRows(records, query = "") {
|
|
|
92720
92740
|
}
|
|
92721
92741
|
function GlobalAssetsView({ searchQuery }) {
|
|
92722
92742
|
const [records, setRecords] = useState140(null);
|
|
92723
|
-
|
|
92743
|
+
useEffect141(() => {
|
|
92724
92744
|
let cancelled = false;
|
|
92725
92745
|
studioApiFetch("/api/assets/global").then((r) => r.ok ? r.json() : { assets: [] }).then((d) => {
|
|
92726
92746
|
if (!cancelled) setRecords(Array.isArray(d.assets) ? d.assets : []);
|
|
@@ -92763,10 +92783,10 @@ function GlobalAssetsView({ searchQuery }) {
|
|
|
92763
92783
|
}
|
|
92764
92784
|
|
|
92765
92785
|
// src/components/sidebar/AssetCard.tsx
|
|
92766
|
-
import { useState as useState142, useEffect as
|
|
92786
|
+
import { useState as useState142, useEffect as useEffect143, useRef as useRef173, useCallback as useCallback167 } from "react";
|
|
92767
92787
|
|
|
92768
92788
|
// src/components/ui/VideoFrameThumbnail.tsx
|
|
92769
|
-
import { useState as useState141, useEffect as
|
|
92789
|
+
import { useState as useState141, useEffect as useEffect142 } from "react";
|
|
92770
92790
|
import { jsx as jsx219 } from "react/jsx-runtime";
|
|
92771
92791
|
function VideoFrameThumbnail({
|
|
92772
92792
|
src,
|
|
@@ -92774,7 +92794,7 @@ function VideoFrameThumbnail({
|
|
|
92774
92794
|
}) {
|
|
92775
92795
|
const [frame3, setFrame] = useState141(null);
|
|
92776
92796
|
const [failed2, setFailed] = useState141(false);
|
|
92777
|
-
|
|
92797
|
+
useEffect142(() => {
|
|
92778
92798
|
setFailed(false);
|
|
92779
92799
|
const video = document.createElement("video");
|
|
92780
92800
|
video.crossOrigin = "anonymous";
|
|
@@ -92841,7 +92861,7 @@ function openAssetContextMenu(e, setContextMenu) {
|
|
|
92841
92861
|
}
|
|
92842
92862
|
function useProbedDuration(src, skip) {
|
|
92843
92863
|
const [duration, setDuration] = useState142(void 0);
|
|
92844
|
-
|
|
92864
|
+
useEffect143(() => {
|
|
92845
92865
|
if (skip) return;
|
|
92846
92866
|
let cancelled = false;
|
|
92847
92867
|
let retryTimer;
|
|
@@ -93240,7 +93260,7 @@ var AssetsTab = memo48(function AssetsTab2({
|
|
|
93240
93260
|
const [manifest, setManifest] = useState143(/* @__PURE__ */ new Map());
|
|
93241
93261
|
const manifest404Ref = useRef174(/* @__PURE__ */ new Set());
|
|
93242
93262
|
const assetsKey = assets.join("|");
|
|
93243
|
-
|
|
93263
|
+
useEffect144(() => {
|
|
93244
93264
|
if (manifest404Ref.current.has(projectId)) return;
|
|
93245
93265
|
let cancelled = false;
|
|
93246
93266
|
studioApiFetch(buildProjectApiPath(projectId, `/preview/.media/manifest.jsonl`)).then((r) => {
|
|
@@ -93497,11 +93517,11 @@ var AssetsTab = memo48(function AssetsTab2({
|
|
|
93497
93517
|
});
|
|
93498
93518
|
|
|
93499
93519
|
// src/components/sidebar/BlocksTab.tsx
|
|
93500
|
-
import { memo as memo49, useState as useState145, useCallback as useCallback170, useRef as useRef176, useEffect as
|
|
93520
|
+
import { memo as memo49, useState as useState145, useCallback as useCallback170, useRef as useRef176, useEffect as useEffect146 } from "react";
|
|
93501
93521
|
import { createPortal as createPortal14 } from "react-dom";
|
|
93502
93522
|
|
|
93503
93523
|
// src/components/sidebar/PromptPreviewModal.tsx
|
|
93504
|
-
import { useState as useState144, useCallback as useCallback169, useEffect as
|
|
93524
|
+
import { useState as useState144, useCallback as useCallback169, useEffect as useEffect145, useRef as useRef175 } from "react";
|
|
93505
93525
|
import { jsx as jsx222, jsxs as jsxs174 } from "react/jsx-runtime";
|
|
93506
93526
|
function PromptPreviewModal({
|
|
93507
93527
|
title,
|
|
@@ -93521,7 +93541,7 @@ function PromptPreviewModal({
|
|
|
93521
93541
|
containerRef,
|
|
93522
93542
|
canClose: () => valueRef.current === prompt
|
|
93523
93543
|
});
|
|
93524
|
-
|
|
93544
|
+
useEffect145(() => {
|
|
93525
93545
|
requestAnimationFrame(() => {
|
|
93526
93546
|
setEntered(true);
|
|
93527
93547
|
textareaRef.current?.focus();
|
|
@@ -93589,6 +93609,7 @@ function PromptPreviewModal({
|
|
|
93589
93609
|
"textarea",
|
|
93590
93610
|
{
|
|
93591
93611
|
ref: textareaRef,
|
|
93612
|
+
"aria-label": "Prompt",
|
|
93592
93613
|
value,
|
|
93593
93614
|
onChange: (e) => setValue(e.target.value),
|
|
93594
93615
|
onKeyDown: (e) => {
|
|
@@ -93827,7 +93848,7 @@ function BlockCard({
|
|
|
93827
93848
|
setHovered(false);
|
|
93828
93849
|
onPreview?.(null);
|
|
93829
93850
|
}, [onPreview]);
|
|
93830
|
-
|
|
93851
|
+
useEffect146(() => {
|
|
93831
93852
|
return () => {
|
|
93832
93853
|
if (hoverTimer.current) clearTimeout(hoverTimer.current);
|
|
93833
93854
|
};
|
|
@@ -93988,7 +94009,7 @@ function BlockCard({
|
|
|
93988
94009
|
}
|
|
93989
94010
|
|
|
93990
94011
|
// src/components/sidebar/CompositionsTab.tsx
|
|
93991
|
-
import { memo as memo50, useCallback as useCallback171, useEffect as
|
|
94012
|
+
import { memo as memo50, useCallback as useCallback171, useEffect as useEffect147, useLayoutEffect as useLayoutEffect15, useMemo as useMemo85, useRef as useRef177, useState as useState146 } from "react";
|
|
93992
94013
|
import { jsx as jsx224, jsxs as jsxs176 } from "react/jsx-runtime";
|
|
93993
94014
|
var DEFAULT_PREVIEW_STAGE = { width: 1920, height: 1080 };
|
|
93994
94015
|
var CARD_W = 80;
|
|
@@ -94067,7 +94088,7 @@ function useLastFrame(request2, snapshot3) {
|
|
|
94067
94088
|
function useNearViewport() {
|
|
94068
94089
|
const [element, setElement] = useState146(null);
|
|
94069
94090
|
const [near4, setNear] = useState146(false);
|
|
94070
|
-
|
|
94091
|
+
useEffect147(() => {
|
|
94071
94092
|
if (!element || near4) return;
|
|
94072
94093
|
if (typeof IntersectionObserver === "undefined") return setNear(true);
|
|
94073
94094
|
const observer = new IntersectionObserver(
|
|
@@ -94148,13 +94169,13 @@ function CompCard({
|
|
|
94148
94169
|
});
|
|
94149
94170
|
const thumbnailOffsetX = (CARD_W - stageSize.width * previewScale) / 2;
|
|
94150
94171
|
const thumbnailOffsetY = (CARD_H - stageSize.height * previewScale) / 2;
|
|
94151
|
-
|
|
94172
|
+
useEffect147(() => {
|
|
94152
94173
|
if (hovered) requestIframePlaybackSync(true);
|
|
94153
94174
|
}, [hovered, requestIframePlaybackSync]);
|
|
94154
|
-
|
|
94175
|
+
useEffect147(() => {
|
|
94155
94176
|
if (livePreviewLoaded) postFrameDisplayScale(iframeRef.current);
|
|
94156
94177
|
}, [livePreviewLoaded, previewScale]);
|
|
94157
|
-
|
|
94178
|
+
useEffect147(() => {
|
|
94158
94179
|
if (!hovered) return;
|
|
94159
94180
|
const onRuntimeReady = (event) => {
|
|
94160
94181
|
const frame3 = iframeRef.current;
|
|
@@ -94165,7 +94186,7 @@ function CompCard({
|
|
|
94165
94186
|
window.addEventListener("message", onRuntimeReady);
|
|
94166
94187
|
return () => window.removeEventListener("message", onRuntimeReady);
|
|
94167
94188
|
}, [hovered]);
|
|
94168
|
-
|
|
94189
|
+
useEffect147(() => {
|
|
94169
94190
|
return () => {
|
|
94170
94191
|
if (hoverTimer.current) clearTimeout(hoverTimer.current);
|
|
94171
94192
|
if (syncTimer.current) clearTimeout(syncTimer.current);
|
|
@@ -94440,7 +94461,7 @@ function getPersistedRenderSettings() {
|
|
|
94440
94461
|
if (raw) {
|
|
94441
94462
|
const parsed = JSON.parse(raw);
|
|
94442
94463
|
return {
|
|
94443
|
-
format: ["mp4", "webm", "mov"].includes(parsed.format) ? parsed.format : "mp4",
|
|
94464
|
+
format: ["mp4", "webm", "mov", "gif"].includes(parsed.format) ? parsed.format : "mp4",
|
|
94444
94465
|
quality: ["draft", "standard", "high"].includes(parsed.quality) ? parsed.quality : "standard",
|
|
94445
94466
|
fps: [24, 30, 60].includes(parsed.fps) ? parsed.fps : 30,
|
|
94446
94467
|
gpu: parsed.gpu === true
|
|
@@ -94456,6 +94477,43 @@ function persistRenderSettings(format, quality, fps, gpu = getPersistedRenderSet
|
|
|
94456
94477
|
} catch {
|
|
94457
94478
|
}
|
|
94458
94479
|
}
|
|
94480
|
+
function resolveRenderFormat(value) {
|
|
94481
|
+
return ["mp4", "webm", "mov", "gif"].find((format) => format === value) ?? "mp4";
|
|
94482
|
+
}
|
|
94483
|
+
function startConfiguredRender(onStartRender, settings) {
|
|
94484
|
+
const { format, quality, resolution, fps, gpu, gifLoop } = settings;
|
|
94485
|
+
if (format === "gif") return onStartRender(format, quality, resolution, fps, false, gifLoop);
|
|
94486
|
+
return onStartRender(format, quality, resolution, fps, gpu);
|
|
94487
|
+
}
|
|
94488
|
+
function isRenderExportBlocked(isRendering, missingFfmpeg, invalidGifLoop) {
|
|
94489
|
+
return isRendering || missingFfmpeg || invalidGifLoop;
|
|
94490
|
+
}
|
|
94491
|
+
var FORMAT_INFO = {
|
|
94492
|
+
gif: { label: "GIF", desc: "Animated image for docs and chat. No audio; up to 30 fps." },
|
|
94493
|
+
mp4: { label: "MP4", desc: "Best for general use. Smallest file, universal playback." },
|
|
94494
|
+
mov: {
|
|
94495
|
+
label: "MOV (ProRes 4444)",
|
|
94496
|
+
desc: "Transparent video. Works in Final Cut Pro, DaVinci Resolve, and most video editors. Large files."
|
|
94497
|
+
},
|
|
94498
|
+
webm: {
|
|
94499
|
+
label: "WebM (VP9)",
|
|
94500
|
+
desc: "Transparent video for web. Smaller than MOV but limited editor support."
|
|
94501
|
+
}
|
|
94502
|
+
};
|
|
94503
|
+
var FPS_OPTIONS = [
|
|
94504
|
+
{ value: "24", label: "24 fps" },
|
|
94505
|
+
{ value: "30", label: "30 fps" },
|
|
94506
|
+
{ value: "60", label: "60 fps" }
|
|
94507
|
+
];
|
|
94508
|
+
function resolveRenderFps(format, fps) {
|
|
94509
|
+
return format === "gif" && fps === 60 ? 30 : fps;
|
|
94510
|
+
}
|
|
94511
|
+
function getRenderFpsOptions(format) {
|
|
94512
|
+
return FPS_OPTIONS.map((option) => ({
|
|
94513
|
+
...option,
|
|
94514
|
+
disabled: format === "gif" && option.value === "60"
|
|
94515
|
+
}));
|
|
94516
|
+
}
|
|
94459
94517
|
|
|
94460
94518
|
// src/components/StudioLeftPanels.tsx
|
|
94461
94519
|
import { Fragment as Fragment63, jsx as jsx227, jsxs as jsxs178 } from "react/jsx-runtime";
|
|
@@ -94607,7 +94665,7 @@ function CodeBody({
|
|
|
94607
94665
|
import { memo as memo62, useCallback as useCallback190 } from "react";
|
|
94608
94666
|
|
|
94609
94667
|
// src/components/editor/LayersPanel.tsx
|
|
94610
|
-
import { memo as memo52, useState as useState148, useCallback as useCallback174, useEffect as
|
|
94668
|
+
import { memo as memo52, useState as useState148, useCallback as useCallback174, useEffect as useEffect148, useRef as useRef179 } from "react";
|
|
94611
94669
|
|
|
94612
94670
|
// src/components/editor/layerKind.ts
|
|
94613
94671
|
function isCompositionHost(el) {
|
|
@@ -94926,10 +94984,10 @@ var LayersPanel = memo52(function LayersPanel2({ host }) {
|
|
|
94926
94984
|
);
|
|
94927
94985
|
setLayers(sortLayersByZIndex(items));
|
|
94928
94986
|
}, [previewIframeRef, activeCompPath, isMasterView, activeGroupElement, setActiveGroupElement]);
|
|
94929
|
-
|
|
94987
|
+
useEffect148(() => {
|
|
94930
94988
|
collectLayers();
|
|
94931
94989
|
}, [collectLayers, refreshKey, zEditVersion, livePreviewIframe]);
|
|
94932
|
-
|
|
94990
|
+
useEffect148(() => {
|
|
94933
94991
|
const iframe = previewIframeRef.current;
|
|
94934
94992
|
if (!iframe) return;
|
|
94935
94993
|
const handleLoad = () => {
|
|
@@ -94938,13 +94996,13 @@ var LayersPanel = memo52(function LayersPanel2({ host }) {
|
|
|
94938
94996
|
};
|
|
94939
94997
|
return onPreviewContentReplaced(iframe, handleLoad);
|
|
94940
94998
|
}, [previewIframeRef, livePreviewIframe, collectLayers]);
|
|
94941
|
-
|
|
94999
|
+
useEffect148(() => {
|
|
94942
95000
|
if (!compositionLoading) {
|
|
94943
95001
|
const timer = setTimeout(collectLayers, 100);
|
|
94944
95002
|
return () => clearTimeout(timer);
|
|
94945
95003
|
}
|
|
94946
95004
|
}, [compositionLoading, collectLayers]);
|
|
94947
|
-
|
|
95005
|
+
useEffect148(() => {
|
|
94948
95006
|
const throttle = createRafThrottle(collectLayers, 100);
|
|
94949
95007
|
const unsubscribe = liveTime.subscribe(throttle.invoke);
|
|
94950
95008
|
return () => {
|
|
@@ -95237,7 +95295,7 @@ import { memo as memo54, useCallback as useCallback176, useState as useState150
|
|
|
95237
95295
|
import { memo as memo53, useCallback as useCallback175 } from "react";
|
|
95238
95296
|
|
|
95239
95297
|
// src/captions/components/shared.tsx
|
|
95240
|
-
import { useEffect as
|
|
95298
|
+
import { useEffect as useEffect149, useRef as useRef180, useState as useState149 } from "react";
|
|
95241
95299
|
import { jsx as jsx229, jsxs as jsxs180 } from "react/jsx-runtime";
|
|
95242
95300
|
var inputCls = "w-full bg-neutral-900 border border-neutral-800 rounded-sm px-1.5 py-0.5 text-2xs text-neutral-200 font-mono outline-hidden focus:border-studio-accent disabled:opacity-40 disabled:cursor-not-allowed";
|
|
95243
95301
|
function Section2({ label, children }) {
|
|
@@ -95264,7 +95322,7 @@ function NumberField2({
|
|
|
95264
95322
|
}) {
|
|
95265
95323
|
const [draft, setDraft] = useState149(null);
|
|
95266
95324
|
const focusedRef = useRef180(false);
|
|
95267
|
-
|
|
95325
|
+
useEffect149(() => {
|
|
95268
95326
|
if (!focusedRef.current) setDraft(null);
|
|
95269
95327
|
}, [value]);
|
|
95270
95328
|
const display2 = draft !== null ? draft : mixed ? "" : String(value ?? 0);
|
|
@@ -95756,7 +95814,7 @@ var CaptionPropertyPanel = memo54(function CaptionPropertyPanel2({
|
|
|
95756
95814
|
});
|
|
95757
95815
|
|
|
95758
95816
|
// src/components/editor/BlockParamsPanel.tsx
|
|
95759
|
-
import { memo as memo55, useCallback as useCallback177, useEffect as
|
|
95817
|
+
import { memo as memo55, useCallback as useCallback177, useEffect as useEffect150, useRef as useRef181, useState as useState151 } from "react";
|
|
95760
95818
|
import { jsx as jsx232, jsxs as jsxs183 } from "react/jsx-runtime";
|
|
95761
95819
|
var BlockParamsPanel = memo55(function BlockParamsPanel2({
|
|
95762
95820
|
blockName,
|
|
@@ -95858,7 +95916,7 @@ var BlockParamsPanel = memo55(function BlockParamsPanel2({
|
|
|
95858
95916
|
}
|
|
95859
95917
|
commitTimersRef.current.clear();
|
|
95860
95918
|
};
|
|
95861
|
-
|
|
95919
|
+
useEffect150(() => () => flushRef.current(), []);
|
|
95862
95920
|
return /* @__PURE__ */ jsxs183("div", { className: "flex flex-col h-full", children: [
|
|
95863
95921
|
/* @__PURE__ */ jsxs183("div", { className: "flex items-center justify-between px-3 py-2 border-b border-neutral-800", children: [
|
|
95864
95922
|
/* @__PURE__ */ jsx232("div", { className: "text-[11px] font-semibold text-neutral-200 truncate", children: blockTitle }),
|
|
@@ -95990,13 +96048,32 @@ function ParamControl({
|
|
|
95990
96048
|
import { memo as memo59 } from "react";
|
|
95991
96049
|
|
|
95992
96050
|
// src/components/renders/RenderQueue.tsx
|
|
95993
|
-
import { memo as memo58, useState as useState154, useRef as useRef183, useEffect as
|
|
96051
|
+
import { memo as memo58, useState as useState154, useRef as useRef183, useEffect as useEffect152, useLayoutEffect as useLayoutEffect16, useId as useId4 } from "react";
|
|
95994
96052
|
import { createPortal as createPortal15 } from "react-dom";
|
|
95995
96053
|
import { CANVAS_DIMENSIONS } from "@hyperframes/parsers";
|
|
95996
96054
|
|
|
96055
|
+
// src/components/renders/RenderDurationNote.tsx
|
|
96056
|
+
import { jsxs as jsxs184 } from "react/jsx-runtime";
|
|
96057
|
+
function formatEta(ms) {
|
|
96058
|
+
const s = Math.round(ms / 1e3);
|
|
96059
|
+
return s < 60 ? `${s}s` : `${Math.floor(s / 60)}m ${s % 60}s`;
|
|
96060
|
+
}
|
|
96061
|
+
function RenderDurationNote({
|
|
96062
|
+
durationMs,
|
|
96063
|
+
isRendering
|
|
96064
|
+
}) {
|
|
96065
|
+
if (durationMs === void 0 || isRendering) return null;
|
|
96066
|
+
return /* @__PURE__ */ jsxs184("p", { className: "text-step-9 text-text-5 text-center -mt-1.5", children: [
|
|
96067
|
+
"Last render took ",
|
|
96068
|
+
formatEta(durationMs)
|
|
96069
|
+
] });
|
|
96070
|
+
}
|
|
96071
|
+
|
|
95997
96072
|
// src/components/renders/RenderQueueItem.tsx
|
|
95998
96073
|
import { memo as memo56, useCallback as useCallback178, useState as useState152 } from "react";
|
|
95999
|
-
|
|
96074
|
+
|
|
96075
|
+
// src/components/renders/RenderQueueInfo.tsx
|
|
96076
|
+
import { jsx as jsx233, jsxs as jsxs185 } from "react/jsx-runtime";
|
|
96000
96077
|
function formatDuration2(ms) {
|
|
96001
96078
|
if (ms < 1e3) return `${ms}ms`;
|
|
96002
96079
|
const s = Math.round(ms / 1e3);
|
|
@@ -96008,6 +96085,85 @@ function formatTimeAgo(timestamp) {
|
|
|
96008
96085
|
if (diff < 36e5) return `${Math.floor(diff / 6e4)}m ago`;
|
|
96009
96086
|
return `${Math.floor(diff / 36e5)}h ago`;
|
|
96010
96087
|
}
|
|
96088
|
+
function RenderQueueInfo({ job }) {
|
|
96089
|
+
const isRendering = job.status === "rendering";
|
|
96090
|
+
return /* @__PURE__ */ jsxs185("div", { className: "flex-1 min-w-0", children: [
|
|
96091
|
+
/* @__PURE__ */ jsxs185("div", { className: "flex items-center gap-1.5", children: [
|
|
96092
|
+
/* @__PURE__ */ jsx233("span", { className: "text-step-11 font-medium text-text-2 truncate", children: job.filename }),
|
|
96093
|
+
job.durationMs && /* @__PURE__ */ jsx233("span", { className: "text-step-9 text-text-5 shrink-0", children: formatDuration2(job.durationMs) })
|
|
96094
|
+
] }),
|
|
96095
|
+
isRendering && /* @__PURE__ */ jsxs185("div", { className: "mt-1", children: [
|
|
96096
|
+
/* @__PURE__ */ jsxs185("div", { className: "flex items-center justify-between mb-0.5", children: [
|
|
96097
|
+
/* @__PURE__ */ jsx233("span", { className: "text-step-9 text-text-4", children: job.stage || "Rendering" }),
|
|
96098
|
+
/* @__PURE__ */ jsxs185("span", { className: "text-step-9 font-mono text-accent-ink", children: [
|
|
96099
|
+
job.progress,
|
|
96100
|
+
"%"
|
|
96101
|
+
] })
|
|
96102
|
+
] }),
|
|
96103
|
+
/* @__PURE__ */ jsx233(
|
|
96104
|
+
"div",
|
|
96105
|
+
{
|
|
96106
|
+
className: "w-full h-1 bg-border rounded-full overflow-hidden",
|
|
96107
|
+
role: "progressbar",
|
|
96108
|
+
"aria-valuenow": job.progress,
|
|
96109
|
+
"aria-valuemin": 0,
|
|
96110
|
+
"aria-valuemax": 100,
|
|
96111
|
+
"aria-label": `Render progress: ${job.progress}%`,
|
|
96112
|
+
children: /* @__PURE__ */ jsx233(
|
|
96113
|
+
"div",
|
|
96114
|
+
{
|
|
96115
|
+
className: "h-full bg-accent rounded-full transition-all duration-300",
|
|
96116
|
+
style: { width: `${job.progress}%` }
|
|
96117
|
+
}
|
|
96118
|
+
)
|
|
96119
|
+
}
|
|
96120
|
+
)
|
|
96121
|
+
] }),
|
|
96122
|
+
job.status === "failed" && job.error && /* @__PURE__ */ jsx233("span", { className: "text-step-9 text-danger-ink mt-0.5 block", children: job.error }),
|
|
96123
|
+
job.status === "cancelled" && /* @__PURE__ */ jsx233("span", { className: "text-step-9 text-text-4 mt-0.5 block", children: "Cancelled" }),
|
|
96124
|
+
!isRendering && /* @__PURE__ */ jsx233("span", { className: "text-step-9 text-text-5", children: formatTimeAgo(job.createdAt) })
|
|
96125
|
+
] });
|
|
96126
|
+
}
|
|
96127
|
+
|
|
96128
|
+
// src/components/renders/RenderPreview.tsx
|
|
96129
|
+
import { Fragment as Fragment64, jsx as jsx234, jsxs as jsxs186 } from "react/jsx-runtime";
|
|
96130
|
+
function RenderPreview({
|
|
96131
|
+
filename: filename2,
|
|
96132
|
+
src,
|
|
96133
|
+
hovered,
|
|
96134
|
+
ready,
|
|
96135
|
+
onReady
|
|
96136
|
+
}) {
|
|
96137
|
+
if (filename2.endsWith(".gif")) {
|
|
96138
|
+
return /* @__PURE__ */ jsx234("img", { src, alt: filename2, className: "w-full h-full object-contain" });
|
|
96139
|
+
}
|
|
96140
|
+
return /* @__PURE__ */ jsxs186(Fragment64, { children: [
|
|
96141
|
+
hovered && /* @__PURE__ */ jsx234(
|
|
96142
|
+
"video",
|
|
96143
|
+
{
|
|
96144
|
+
src,
|
|
96145
|
+
autoPlay: true,
|
|
96146
|
+
muted: true,
|
|
96147
|
+
loop: true,
|
|
96148
|
+
playsInline: true,
|
|
96149
|
+
onCanPlay: onReady,
|
|
96150
|
+
className: "absolute inset-0 w-full h-full object-contain transition-opacity duration-150",
|
|
96151
|
+
style: { opacity: ready ? 1 : 0 }
|
|
96152
|
+
}
|
|
96153
|
+
),
|
|
96154
|
+
/* @__PURE__ */ jsx234(
|
|
96155
|
+
"div",
|
|
96156
|
+
{
|
|
96157
|
+
className: "absolute inset-0 transition-opacity duration-150",
|
|
96158
|
+
style: { opacity: hovered && ready ? 0 : 1 },
|
|
96159
|
+
children: /* @__PURE__ */ jsx234(VideoFrameThumbnail, { src })
|
|
96160
|
+
}
|
|
96161
|
+
)
|
|
96162
|
+
] });
|
|
96163
|
+
}
|
|
96164
|
+
|
|
96165
|
+
// src/components/renders/RenderQueueItem.tsx
|
|
96166
|
+
import { Fragment as Fragment65, jsx as jsx235, jsxs as jsxs187 } from "react/jsx-runtime";
|
|
96011
96167
|
var RenderQueueItem = memo56(function RenderQueueItem2({
|
|
96012
96168
|
job,
|
|
96013
96169
|
projectId,
|
|
@@ -96034,7 +96190,7 @@ var RenderQueueItem = memo56(function RenderQueueItem2({
|
|
|
96034
96190
|
const viewSrc = fileSrc;
|
|
96035
96191
|
const isComplete = job.status === "complete";
|
|
96036
96192
|
const isRendering = job.status === "rendering";
|
|
96037
|
-
return /* @__PURE__ */
|
|
96193
|
+
return /* @__PURE__ */ jsx235(
|
|
96038
96194
|
"div",
|
|
96039
96195
|
{
|
|
96040
96196
|
onPointerEnter: () => setHovered(true),
|
|
@@ -96044,8 +96200,8 @@ var RenderQueueItem = memo56(function RenderQueueItem2({
|
|
|
96044
96200
|
setConfirmingDelete(false);
|
|
96045
96201
|
},
|
|
96046
96202
|
className: "px-3 py-2.5 border-b border-border last:border-0 transition-colors duration-150 hover:bg-hover/30",
|
|
96047
|
-
children: /* @__PURE__ */
|
|
96048
|
-
/* @__PURE__ */
|
|
96203
|
+
children: /* @__PURE__ */ jsxs187("div", { className: "flex items-center gap-2.5", children: [
|
|
96204
|
+
/* @__PURE__ */ jsxs187(
|
|
96049
96205
|
"button",
|
|
96050
96206
|
{
|
|
96051
96207
|
type: "button",
|
|
@@ -96058,72 +96214,24 @@ var RenderQueueItem = memo56(function RenderQueueItem2({
|
|
|
96058
96214
|
isComplete ? "cursor-pointer" : "cursor-default"
|
|
96059
96215
|
].join(" "),
|
|
96060
96216
|
children: [
|
|
96061
|
-
isComplete && /* @__PURE__ */
|
|
96062
|
-
|
|
96063
|
-
|
|
96064
|
-
|
|
96065
|
-
|
|
96066
|
-
|
|
96067
|
-
|
|
96068
|
-
|
|
96069
|
-
|
|
96070
|
-
|
|
96071
|
-
|
|
96072
|
-
|
|
96073
|
-
|
|
96074
|
-
),
|
|
96075
|
-
/* @__PURE__ */ jsx233(
|
|
96076
|
-
"div",
|
|
96077
|
-
{
|
|
96078
|
-
className: "absolute inset-0 transition-opacity duration-150",
|
|
96079
|
-
style: { opacity: hovered && videoReady ? 0 : 1 },
|
|
96080
|
-
children: /* @__PURE__ */ jsx233(VideoFrameThumbnail, { src: viewSrc })
|
|
96081
|
-
}
|
|
96082
|
-
)
|
|
96083
|
-
] }),
|
|
96084
|
-
isRendering && /* @__PURE__ */ jsx233("div", { className: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsx233("div", { className: "w-2 h-2 rounded-full bg-accent animate-pulse motion-reduce:animate-none" }) }),
|
|
96085
|
-
job.status === "failed" && /* @__PURE__ */ jsx233("div", { className: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsx233("div", { className: "w-2 h-2 rounded-full bg-danger-ink" }) }),
|
|
96086
|
-
job.status === "cancelled" && /* @__PURE__ */ jsx233("div", { className: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsx233("div", { className: "w-2 h-2 rounded-full bg-text-5" }) })
|
|
96217
|
+
isComplete && /* @__PURE__ */ jsx235(
|
|
96218
|
+
RenderPreview,
|
|
96219
|
+
{
|
|
96220
|
+
filename: job.filename,
|
|
96221
|
+
src: viewSrc,
|
|
96222
|
+
hovered,
|
|
96223
|
+
ready: videoReady,
|
|
96224
|
+
onReady: () => setVideoReady(true)
|
|
96225
|
+
}
|
|
96226
|
+
),
|
|
96227
|
+
isRendering && /* @__PURE__ */ jsx235("div", { className: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsx235("div", { className: "w-2 h-2 rounded-full bg-accent animate-pulse motion-reduce:animate-none" }) }),
|
|
96228
|
+
job.status === "failed" && /* @__PURE__ */ jsx235("div", { className: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsx235("div", { className: "w-2 h-2 rounded-full bg-danger-ink" }) }),
|
|
96229
|
+
job.status === "cancelled" && /* @__PURE__ */ jsx235("div", { className: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ jsx235("div", { className: "w-2 h-2 rounded-full bg-text-5" }) })
|
|
96087
96230
|
]
|
|
96088
96231
|
}
|
|
96089
96232
|
),
|
|
96090
|
-
/* @__PURE__ */
|
|
96091
|
-
|
|
96092
|
-
/* @__PURE__ */ jsx233("span", { className: "text-step-11 font-medium text-text-2 truncate", children: job.filename }),
|
|
96093
|
-
job.durationMs && /* @__PURE__ */ jsx233("span", { className: "text-step-9 text-text-5 shrink-0", children: formatDuration2(job.durationMs) })
|
|
96094
|
-
] }),
|
|
96095
|
-
isRendering && /* @__PURE__ */ jsxs184("div", { className: "mt-1", children: [
|
|
96096
|
-
/* @__PURE__ */ jsxs184("div", { className: "flex items-center justify-between mb-0.5", children: [
|
|
96097
|
-
/* @__PURE__ */ jsx233("span", { className: "text-step-9 text-text-4", children: job.stage || "Rendering" }),
|
|
96098
|
-
/* @__PURE__ */ jsxs184("span", { className: "text-step-9 font-mono text-accent-ink", children: [
|
|
96099
|
-
job.progress,
|
|
96100
|
-
"%"
|
|
96101
|
-
] })
|
|
96102
|
-
] }),
|
|
96103
|
-
/* @__PURE__ */ jsx233(
|
|
96104
|
-
"div",
|
|
96105
|
-
{
|
|
96106
|
-
className: "w-full h-1 bg-border rounded-full overflow-hidden",
|
|
96107
|
-
role: "progressbar",
|
|
96108
|
-
"aria-valuenow": job.progress,
|
|
96109
|
-
"aria-valuemin": 0,
|
|
96110
|
-
"aria-valuemax": 100,
|
|
96111
|
-
"aria-label": `Render progress: ${job.progress}%`,
|
|
96112
|
-
children: /* @__PURE__ */ jsx233(
|
|
96113
|
-
"div",
|
|
96114
|
-
{
|
|
96115
|
-
className: "h-full bg-accent rounded-full transition-all duration-300",
|
|
96116
|
-
style: { width: `${job.progress}%` }
|
|
96117
|
-
}
|
|
96118
|
-
)
|
|
96119
|
-
}
|
|
96120
|
-
)
|
|
96121
|
-
] }),
|
|
96122
|
-
job.status === "failed" && job.error && /* @__PURE__ */ jsx233("span", { className: "text-step-9 text-danger-ink mt-0.5 block", children: job.error }),
|
|
96123
|
-
job.status === "cancelled" && /* @__PURE__ */ jsx233("span", { className: "text-step-9 text-text-4 mt-0.5 block", children: "Cancelled" }),
|
|
96124
|
-
!isRendering && /* @__PURE__ */ jsx233("span", { className: "text-step-9 text-text-5", children: formatTimeAgo(job.createdAt) })
|
|
96125
|
-
] }),
|
|
96126
|
-
/* @__PURE__ */ jsx233("div", { className: "flex items-center gap-1.5 shrink-0", children: isRendering ? /* @__PURE__ */ jsx233(
|
|
96233
|
+
/* @__PURE__ */ jsx235(RenderQueueInfo, { job }),
|
|
96234
|
+
/* @__PURE__ */ jsx235("div", { className: "flex items-center gap-1.5 shrink-0", children: isRendering ? /* @__PURE__ */ jsx235(
|
|
96127
96235
|
Button,
|
|
96128
96236
|
{
|
|
96129
96237
|
size: "sm",
|
|
@@ -96134,8 +96242,8 @@ var RenderQueueItem = memo56(function RenderQueueItem2({
|
|
|
96134
96242
|
},
|
|
96135
96243
|
children: "Cancel"
|
|
96136
96244
|
}
|
|
96137
|
-
) : confirmingDelete ? /* @__PURE__ */
|
|
96138
|
-
/* @__PURE__ */
|
|
96245
|
+
) : confirmingDelete ? /* @__PURE__ */ jsxs187(Fragment65, { children: [
|
|
96246
|
+
/* @__PURE__ */ jsx235(
|
|
96139
96247
|
Button,
|
|
96140
96248
|
{
|
|
96141
96249
|
size: "sm",
|
|
@@ -96148,7 +96256,7 @@ var RenderQueueItem = memo56(function RenderQueueItem2({
|
|
|
96148
96256
|
children: "Delete?"
|
|
96149
96257
|
}
|
|
96150
96258
|
),
|
|
96151
|
-
/* @__PURE__ */
|
|
96259
|
+
/* @__PURE__ */ jsx235(
|
|
96152
96260
|
Button,
|
|
96153
96261
|
{
|
|
96154
96262
|
size: "sm",
|
|
@@ -96160,15 +96268,15 @@ var RenderQueueItem = memo56(function RenderQueueItem2({
|
|
|
96160
96268
|
children: "Keep"
|
|
96161
96269
|
}
|
|
96162
96270
|
)
|
|
96163
|
-
] }) : /* @__PURE__ */
|
|
96164
|
-
/* @__PURE__ */
|
|
96271
|
+
] }) : /* @__PURE__ */ jsxs187(Fragment65, { children: [
|
|
96272
|
+
/* @__PURE__ */ jsx235(Tooltip, { label: isComplete ? "Download" : "Available when the render finishes", children: /* @__PURE__ */ jsx235(
|
|
96165
96273
|
IconButton,
|
|
96166
96274
|
{
|
|
96167
96275
|
size: "sm",
|
|
96168
96276
|
onClick: handleDownload,
|
|
96169
96277
|
disabled: !isComplete,
|
|
96170
96278
|
"aria-label": `Download ${job.filename}`,
|
|
96171
|
-
icon: /* @__PURE__ */
|
|
96279
|
+
icon: /* @__PURE__ */ jsxs187(
|
|
96172
96280
|
"svg",
|
|
96173
96281
|
{
|
|
96174
96282
|
width: "12",
|
|
@@ -96181,15 +96289,15 @@ var RenderQueueItem = memo56(function RenderQueueItem2({
|
|
|
96181
96289
|
strokeLinejoin: "round",
|
|
96182
96290
|
"aria-hidden": "true",
|
|
96183
96291
|
children: [
|
|
96184
|
-
/* @__PURE__ */
|
|
96185
|
-
/* @__PURE__ */
|
|
96186
|
-
/* @__PURE__ */
|
|
96292
|
+
/* @__PURE__ */ jsx235("path", { d: "M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4" }),
|
|
96293
|
+
/* @__PURE__ */ jsx235("polyline", { points: "7 10 12 15 17 10" }),
|
|
96294
|
+
/* @__PURE__ */ jsx235("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
|
|
96187
96295
|
]
|
|
96188
96296
|
}
|
|
96189
96297
|
)
|
|
96190
96298
|
}
|
|
96191
96299
|
) }),
|
|
96192
|
-
/* @__PURE__ */
|
|
96300
|
+
/* @__PURE__ */ jsx235(Tooltip, { label: "Delete render file", children: /* @__PURE__ */ jsx235(
|
|
96193
96301
|
IconButton,
|
|
96194
96302
|
{
|
|
96195
96303
|
size: "sm",
|
|
@@ -96198,7 +96306,7 @@ var RenderQueueItem = memo56(function RenderQueueItem2({
|
|
|
96198
96306
|
setConfirmingDelete(true);
|
|
96199
96307
|
},
|
|
96200
96308
|
"aria-label": `Delete ${job.filename}`,
|
|
96201
|
-
icon: /* @__PURE__ */
|
|
96309
|
+
icon: /* @__PURE__ */ jsx235(
|
|
96202
96310
|
"svg",
|
|
96203
96311
|
{
|
|
96204
96312
|
width: "12",
|
|
@@ -96209,7 +96317,7 @@ var RenderQueueItem = memo56(function RenderQueueItem2({
|
|
|
96209
96317
|
strokeWidth: "2",
|
|
96210
96318
|
strokeLinecap: "round",
|
|
96211
96319
|
"aria-hidden": "true",
|
|
96212
|
-
children: /* @__PURE__ */
|
|
96320
|
+
children: /* @__PURE__ */ jsx235("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
96213
96321
|
}
|
|
96214
96322
|
)
|
|
96215
96323
|
}
|
|
@@ -96221,8 +96329,8 @@ var RenderQueueItem = memo56(function RenderQueueItem2({
|
|
|
96221
96329
|
});
|
|
96222
96330
|
|
|
96223
96331
|
// src/components/renders/FfmpegRequiredNotice.tsx
|
|
96224
|
-
import { memo as memo57, useEffect as
|
|
96225
|
-
import { jsx as
|
|
96332
|
+
import { memo as memo57, useEffect as useEffect151, useRef as useRef182, useState as useState153 } from "react";
|
|
96333
|
+
import { jsx as jsx236, jsxs as jsxs188 } from "react/jsx-runtime";
|
|
96226
96334
|
var DOWNLOAD_URL = "https://ffmpeg.org/download.html";
|
|
96227
96335
|
var CUE_MS = 1600;
|
|
96228
96336
|
var FOCUS_RING = "outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-studio-accent";
|
|
@@ -96235,35 +96343,35 @@ var FfmpegRequiredNotice = memo57(function FfmpegRequiredNotice2({
|
|
|
96235
96343
|
const [recheckFailed, setRecheckFailed] = useState153(false);
|
|
96236
96344
|
const wasChecking = useRef182(false);
|
|
96237
96345
|
const cueTimer = useRef182(void 0);
|
|
96238
|
-
|
|
96346
|
+
useEffect151(() => {
|
|
96239
96347
|
if (wasChecking.current && !checking) setRecheckFailed(true);
|
|
96240
96348
|
wasChecking.current = checking;
|
|
96241
96349
|
}, [checking]);
|
|
96242
|
-
|
|
96350
|
+
useEffect151(() => {
|
|
96243
96351
|
if (!recheckFailed) return;
|
|
96244
96352
|
cueTimer.current = setTimeout(() => setRecheckFailed(false), CUE_MS);
|
|
96245
96353
|
return () => clearTimeout(cueTimer.current);
|
|
96246
96354
|
}, [recheckFailed]);
|
|
96247
|
-
|
|
96355
|
+
useEffect151(() => () => clearTimeout(cueTimer.current), []);
|
|
96248
96356
|
const copy = async (command) => {
|
|
96249
96357
|
const ok = await copyTextToClipboard(command);
|
|
96250
96358
|
if (!ok) return;
|
|
96251
96359
|
setCopied(true);
|
|
96252
96360
|
window.setTimeout(() => setCopied(false), CUE_MS);
|
|
96253
96361
|
};
|
|
96254
|
-
return /* @__PURE__ */
|
|
96362
|
+
return /* @__PURE__ */ jsxs188(
|
|
96255
96363
|
"div",
|
|
96256
96364
|
{
|
|
96257
96365
|
role: "alert",
|
|
96258
96366
|
className: "flex flex-col gap-2 rounded-xl border border-amber-500/30 bg-amber-500/10 p-2.5",
|
|
96259
96367
|
children: [
|
|
96260
|
-
/* @__PURE__ */
|
|
96261
|
-
/* @__PURE__ */
|
|
96262
|
-
/* @__PURE__ */
|
|
96368
|
+
/* @__PURE__ */ jsxs188("div", { className: "flex flex-col gap-0.5", children: [
|
|
96369
|
+
/* @__PURE__ */ jsx236("span", { className: "text-[11px] font-semibold text-warning-ink", children: status.title ?? "FFmpeg not found" }),
|
|
96370
|
+
/* @__PURE__ */ jsx236("span", { className: "text-[10px] leading-snug text-pretty text-panel-text-2", children: status.detail ?? "FFmpeg is required to encode video." })
|
|
96263
96371
|
] }),
|
|
96264
|
-
status.command ? /* @__PURE__ */
|
|
96265
|
-
/* @__PURE__ */
|
|
96266
|
-
/* @__PURE__ */
|
|
96372
|
+
status.command ? /* @__PURE__ */ jsxs188("div", { className: "flex items-center gap-1.5", children: [
|
|
96373
|
+
/* @__PURE__ */ jsx236("code", { className: "flex-1 overflow-x-auto whitespace-nowrap rounded-xs bg-input px-2 py-1 text-[10px] text-panel-text-2", children: status.command }),
|
|
96374
|
+
/* @__PURE__ */ jsx236(
|
|
96267
96375
|
"button",
|
|
96268
96376
|
{
|
|
96269
96377
|
type: "button",
|
|
@@ -96272,9 +96380,9 @@ var FfmpegRequiredNotice = memo57(function FfmpegRequiredNotice2({
|
|
|
96272
96380
|
children: copied ? "Copied" : "Copy"
|
|
96273
96381
|
}
|
|
96274
96382
|
)
|
|
96275
|
-
] }) : status.hint && /* @__PURE__ */
|
|
96276
|
-
/* @__PURE__ */
|
|
96277
|
-
/* @__PURE__ */
|
|
96383
|
+
] }) : status.hint && /* @__PURE__ */ jsx236("span", { className: "text-[10px] leading-snug text-pretty text-panel-text-2", children: status.hint }),
|
|
96384
|
+
/* @__PURE__ */ jsxs188("div", { className: "flex items-center gap-3", children: [
|
|
96385
|
+
/* @__PURE__ */ jsx236(
|
|
96278
96386
|
"button",
|
|
96279
96387
|
{
|
|
96280
96388
|
type: "button",
|
|
@@ -96284,7 +96392,7 @@ var FfmpegRequiredNotice = memo57(function FfmpegRequiredNotice2({
|
|
|
96284
96392
|
children: checking ? "Checking\u2026" : "Recheck"
|
|
96285
96393
|
}
|
|
96286
96394
|
),
|
|
96287
|
-
/* @__PURE__ */
|
|
96395
|
+
/* @__PURE__ */ jsx236(
|
|
96288
96396
|
"a",
|
|
96289
96397
|
{
|
|
96290
96398
|
href: DOWNLOAD_URL,
|
|
@@ -96294,7 +96402,7 @@ var FfmpegRequiredNotice = memo57(function FfmpegRequiredNotice2({
|
|
|
96294
96402
|
children: "Other install options"
|
|
96295
96403
|
}
|
|
96296
96404
|
),
|
|
96297
|
-
/* @__PURE__ */
|
|
96405
|
+
/* @__PURE__ */ jsx236(
|
|
96298
96406
|
"span",
|
|
96299
96407
|
{
|
|
96300
96408
|
"aria-live": "polite",
|
|
@@ -96309,7 +96417,7 @@ var FfmpegRequiredNotice = memo57(function FfmpegRequiredNotice2({
|
|
|
96309
96417
|
});
|
|
96310
96418
|
|
|
96311
96419
|
// src/components/renders/GpuEncodingToggle.tsx
|
|
96312
|
-
import { jsx as
|
|
96420
|
+
import { jsx as jsx237, jsxs as jsxs189 } from "react/jsx-runtime";
|
|
96313
96421
|
function GpuEncodingToggle({
|
|
96314
96422
|
format,
|
|
96315
96423
|
checked,
|
|
@@ -96317,12 +96425,12 @@ function GpuEncodingToggle({
|
|
|
96317
96425
|
onToggle
|
|
96318
96426
|
}) {
|
|
96319
96427
|
if (format !== "mp4") return null;
|
|
96320
|
-
return /* @__PURE__ */
|
|
96428
|
+
return /* @__PURE__ */ jsxs189(
|
|
96321
96429
|
"label",
|
|
96322
96430
|
{
|
|
96323
96431
|
className: `flex items-center gap-2 text-step-10 text-text-4 ${disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer"}`,
|
|
96324
96432
|
children: [
|
|
96325
|
-
/* @__PURE__ */
|
|
96433
|
+
/* @__PURE__ */ jsx237(
|
|
96326
96434
|
"input",
|
|
96327
96435
|
{
|
|
96328
96436
|
type: "checkbox",
|
|
@@ -96332,14 +96440,50 @@ function GpuEncodingToggle({
|
|
|
96332
96440
|
className: "accent-studio-accent"
|
|
96333
96441
|
}
|
|
96334
96442
|
),
|
|
96335
|
-
/* @__PURE__ */
|
|
96443
|
+
/* @__PURE__ */ jsx237("span", { children: "Use GPU encoding" })
|
|
96336
96444
|
]
|
|
96337
96445
|
}
|
|
96338
96446
|
);
|
|
96339
96447
|
}
|
|
96340
96448
|
|
|
96449
|
+
// src/components/renders/GifLoopInput.tsx
|
|
96450
|
+
import { jsx as jsx238, jsxs as jsxs190 } from "react/jsx-runtime";
|
|
96451
|
+
function isInvalidGifLoop(format, value) {
|
|
96452
|
+
return format === "gif" && !isValidGifLoop(value);
|
|
96453
|
+
}
|
|
96454
|
+
function isValidGifLoop(value) {
|
|
96455
|
+
const count = Number(value);
|
|
96456
|
+
return value.trim() !== "" && Number.isInteger(count) && count >= 0 && count <= 65535;
|
|
96457
|
+
}
|
|
96458
|
+
function GifLoopInput({
|
|
96459
|
+
format,
|
|
96460
|
+
value,
|
|
96461
|
+
disabled,
|
|
96462
|
+
invalid,
|
|
96463
|
+
onChange
|
|
96464
|
+
}) {
|
|
96465
|
+
if (format !== "gif") return null;
|
|
96466
|
+
return /* @__PURE__ */ jsxs190("label", { className: "flex flex-col gap-1 text-step-10 text-text-4", children: [
|
|
96467
|
+
"GIF loop count (0 = forever, max 65535)",
|
|
96468
|
+
/* @__PURE__ */ jsx238(
|
|
96469
|
+
"input",
|
|
96470
|
+
{
|
|
96471
|
+
type: "number",
|
|
96472
|
+
min: 0,
|
|
96473
|
+
max: 65535,
|
|
96474
|
+
step: 1,
|
|
96475
|
+
value,
|
|
96476
|
+
disabled,
|
|
96477
|
+
"aria-invalid": invalid,
|
|
96478
|
+
onChange: (event) => onChange(event.target.value),
|
|
96479
|
+
className: "rounded-sm bg-input border border-border-input px-2 py-1 text-text-1"
|
|
96480
|
+
}
|
|
96481
|
+
)
|
|
96482
|
+
] });
|
|
96483
|
+
}
|
|
96484
|
+
|
|
96341
96485
|
// src/components/renders/RenderQueue.tsx
|
|
96342
|
-
import { jsx as
|
|
96486
|
+
import { jsx as jsx239, jsxs as jsxs191 } from "react/jsx-runtime";
|
|
96343
96487
|
var SCALE_OPTION_ORDER = ["auto", "1080p", "4k"];
|
|
96344
96488
|
var SCALE_LABEL = {
|
|
96345
96489
|
auto: "Auto",
|
|
@@ -96379,18 +96523,7 @@ function scaleOptionLabel(scale, dims) {
|
|
|
96379
96523
|
}
|
|
96380
96524
|
return base2;
|
|
96381
96525
|
}
|
|
96382
|
-
var
|
|
96383
|
-
mp4: { label: "MP4", desc: "Best for general use. Smallest file, universal playback." },
|
|
96384
|
-
mov: {
|
|
96385
|
-
label: "MOV (ProRes 4444)",
|
|
96386
|
-
desc: "Transparent video. Works in Final Cut Pro, DaVinci Resolve, and most video editors. Large files."
|
|
96387
|
-
},
|
|
96388
|
-
webm: {
|
|
96389
|
-
label: "WebM (VP9)",
|
|
96390
|
-
desc: "Transparent video for web. Smaller than MOV but limited editor support."
|
|
96391
|
-
}
|
|
96392
|
-
};
|
|
96393
|
-
var FORMAT_PANEL_SIZE = { width: 208, height: 150 };
|
|
96526
|
+
var FORMAT_PANEL_SIZE = { width: 208, height: 210 };
|
|
96394
96527
|
function FormatInfoTooltip({ format }) {
|
|
96395
96528
|
const [open, setOpen] = useState154(false);
|
|
96396
96529
|
const [position, setPosition] = useState154(null);
|
|
@@ -96404,7 +96537,7 @@ function FormatInfoTooltip({ format }) {
|
|
|
96404
96537
|
const hide = () => {
|
|
96405
96538
|
timeoutRef.current = setTimeout(() => setOpen(false), 120);
|
|
96406
96539
|
};
|
|
96407
|
-
|
|
96540
|
+
useEffect152(() => () => clearTimeout(timeoutRef.current), []);
|
|
96408
96541
|
useLayoutEffect16(() => {
|
|
96409
96542
|
if (!open) return;
|
|
96410
96543
|
const el = triggerRef.current;
|
|
@@ -96418,7 +96551,7 @@ function FormatInfoTooltip({ format }) {
|
|
|
96418
96551
|
)
|
|
96419
96552
|
);
|
|
96420
96553
|
}, [open]);
|
|
96421
|
-
|
|
96554
|
+
useEffect152(() => {
|
|
96422
96555
|
if (!open) return;
|
|
96423
96556
|
const onKeyDown = (e) => {
|
|
96424
96557
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -96427,8 +96560,8 @@ function FormatInfoTooltip({ format }) {
|
|
|
96427
96560
|
return () => document.removeEventListener("keydown", onKeyDown);
|
|
96428
96561
|
}, [open]);
|
|
96429
96562
|
const info = FORMAT_INFO[format];
|
|
96430
|
-
return /* @__PURE__ */
|
|
96431
|
-
/* @__PURE__ */
|
|
96563
|
+
return /* @__PURE__ */ jsxs191("div", { ref: triggerRef, className: "relative", onPointerEnter: show, onPointerLeave: hide, children: [
|
|
96564
|
+
/* @__PURE__ */ jsx239(
|
|
96432
96565
|
"button",
|
|
96433
96566
|
{
|
|
96434
96567
|
type: "button",
|
|
@@ -96439,7 +96572,7 @@ function FormatInfoTooltip({ format }) {
|
|
|
96439
96572
|
onBlur: hide,
|
|
96440
96573
|
onClick: () => setOpen((prev) => !prev),
|
|
96441
96574
|
className: "flex items-center justify-center p-0.5 -m-0.5 rounded-sm text-text-5 hover:text-text-3 transition-colors cursor-help outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-accent",
|
|
96442
|
-
children: /* @__PURE__ */
|
|
96575
|
+
children: /* @__PURE__ */ jsxs191(
|
|
96443
96576
|
"svg",
|
|
96444
96577
|
{
|
|
96445
96578
|
width: "12",
|
|
@@ -96452,16 +96585,16 @@ function FormatInfoTooltip({ format }) {
|
|
|
96452
96585
|
strokeLinejoin: "round",
|
|
96453
96586
|
"aria-hidden": "true",
|
|
96454
96587
|
children: [
|
|
96455
|
-
/* @__PURE__ */
|
|
96456
|
-
/* @__PURE__ */
|
|
96457
|
-
/* @__PURE__ */
|
|
96588
|
+
/* @__PURE__ */ jsx239("circle", { cx: "12", cy: "12", r: "10" }),
|
|
96589
|
+
/* @__PURE__ */ jsx239("path", { d: "M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3" }),
|
|
96590
|
+
/* @__PURE__ */ jsx239("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
96458
96591
|
]
|
|
96459
96592
|
}
|
|
96460
96593
|
)
|
|
96461
96594
|
}
|
|
96462
96595
|
),
|
|
96463
96596
|
open && createPortal15(
|
|
96464
|
-
/* @__PURE__ */
|
|
96597
|
+
/* @__PURE__ */ jsxs191(
|
|
96465
96598
|
"div",
|
|
96466
96599
|
{
|
|
96467
96600
|
id: panelId,
|
|
@@ -96471,10 +96604,10 @@ function FormatInfoTooltip({ format }) {
|
|
|
96471
96604
|
className: "fixed w-52 p-2 rounded-sm bg-input border border-border-input shadow-menu z-200",
|
|
96472
96605
|
style: { left: position?.left ?? -9999, top: position?.top ?? -9999 },
|
|
96473
96606
|
children: [
|
|
96474
|
-
/* @__PURE__ */
|
|
96475
|
-
/* @__PURE__ */
|
|
96476
|
-
/* @__PURE__ */
|
|
96477
|
-
/* @__PURE__ */
|
|
96607
|
+
/* @__PURE__ */ jsx239("p", { className: "text-step-10 font-semibold text-text-1 mb-0.5", children: info.label }),
|
|
96608
|
+
/* @__PURE__ */ jsx239("p", { className: "text-step-9 text-text-3 leading-tight", children: info.desc }),
|
|
96609
|
+
/* @__PURE__ */ jsx239("div", { className: "mt-1.5 pt-1.5 border-t border-border", children: ["mp4", "mov", "webm", "gif"].filter((f) => f !== format).map((f) => /* @__PURE__ */ jsxs191("p", { className: "text-step-9 text-text-4 leading-relaxed", children: [
|
|
96610
|
+
/* @__PURE__ */ jsx239("span", { className: "text-text-3 font-medium", children: FORMAT_INFO[f].label }),
|
|
96478
96611
|
": ",
|
|
96479
96612
|
FORMAT_INFO[f].desc
|
|
96480
96613
|
] }, f)) })
|
|
@@ -96488,22 +96621,14 @@ function FormatInfoTooltip({ format }) {
|
|
|
96488
96621
|
var FORMAT_OPTIONS = [
|
|
96489
96622
|
{ value: "mp4", label: "MP4" },
|
|
96490
96623
|
{ value: "mov", label: "MOV (ProRes)" },
|
|
96491
|
-
{ value: "webm", label: "WebM" }
|
|
96624
|
+
{ value: "webm", label: "WebM" },
|
|
96625
|
+
{ value: "gif", label: "GIF" }
|
|
96492
96626
|
];
|
|
96493
96627
|
var QUALITY_OPTIONS = [
|
|
96494
96628
|
{ value: "draft", label: "Draft" },
|
|
96495
96629
|
{ value: "standard", label: "Standard" },
|
|
96496
96630
|
{ value: "high", label: "High Quality" }
|
|
96497
96631
|
];
|
|
96498
|
-
var FPS_OPTIONS = [
|
|
96499
|
-
{ value: "24", label: "24 fps" },
|
|
96500
|
-
{ value: "30", label: "30 fps" },
|
|
96501
|
-
{ value: "60", label: "60 fps" }
|
|
96502
|
-
];
|
|
96503
|
-
function formatEta(ms) {
|
|
96504
|
-
const s = Math.round(ms / 1e3);
|
|
96505
|
-
return s < 60 ? `${s}s` : `${Math.floor(s / 60)}m ${s % 60}s`;
|
|
96506
|
-
}
|
|
96507
96632
|
function FormatExportButton({
|
|
96508
96633
|
onStartRender,
|
|
96509
96634
|
isRendering,
|
|
@@ -96517,12 +96642,17 @@ function FormatExportButton({
|
|
|
96517
96642
|
const [format, setFormat] = useState154(persisted.format);
|
|
96518
96643
|
const [quality, setQuality] = useState154(persisted.quality);
|
|
96519
96644
|
const [resolution, setResolution] = useState154("auto");
|
|
96520
|
-
const [
|
|
96645
|
+
const [requestedFps, setFps] = useState154(persisted.fps);
|
|
96646
|
+
const fps = resolveRenderFps(format, requestedFps);
|
|
96521
96647
|
const [gpu, setGpu] = useState154(persisted.gpu);
|
|
96648
|
+
const [gifLoop, setGifLoop] = useState154("0");
|
|
96649
|
+
const loopCount = Number(gifLoop);
|
|
96650
|
+
const invalidGifLoop = isInvalidGifLoop(format, gifLoop);
|
|
96522
96651
|
const missingFfmpeg = ffmpeg && !ffmpeg.ok ? ffmpeg : null;
|
|
96652
|
+
const exportBlocked = isRenderExportBlocked(isRendering, missingFfmpeg !== null, invalidGifLoop);
|
|
96523
96653
|
const showQuality = format !== "mov";
|
|
96524
|
-
return /* @__PURE__ */
|
|
96525
|
-
missingFfmpeg && /* @__PURE__ */
|
|
96654
|
+
return /* @__PURE__ */ jsxs191("div", { className: "flex flex-col gap-3", children: [
|
|
96655
|
+
missingFfmpeg && /* @__PURE__ */ jsx239(
|
|
96526
96656
|
FfmpegRequiredNotice,
|
|
96527
96657
|
{
|
|
96528
96658
|
status: missingFfmpeg,
|
|
@@ -96530,13 +96660,13 @@ function FormatExportButton({
|
|
|
96530
96660
|
onRecheck: onRecheckFfmpeg
|
|
96531
96661
|
}
|
|
96532
96662
|
),
|
|
96533
|
-
/* @__PURE__ */
|
|
96534
|
-
/* @__PURE__ */
|
|
96535
|
-
/* @__PURE__ */
|
|
96536
|
-
/* @__PURE__ */
|
|
96537
|
-
/* @__PURE__ */
|
|
96663
|
+
/* @__PURE__ */ jsxs191("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
96664
|
+
/* @__PURE__ */ jsxs191("div", { className: "flex flex-col gap-1", children: [
|
|
96665
|
+
/* @__PURE__ */ jsxs191("div", { className: "flex items-center gap-1", children: [
|
|
96666
|
+
/* @__PURE__ */ jsx239("span", { className: "text-step-10 text-text-4", children: "Format" }),
|
|
96667
|
+
/* @__PURE__ */ jsx239(FormatInfoTooltip, { format })
|
|
96538
96668
|
] }),
|
|
96539
|
-
/* @__PURE__ */
|
|
96669
|
+
/* @__PURE__ */ jsx239(
|
|
96540
96670
|
Select,
|
|
96541
96671
|
{
|
|
96542
96672
|
label: "Format",
|
|
@@ -96544,16 +96674,16 @@ function FormatExportButton({
|
|
|
96544
96674
|
options: FORMAT_OPTIONS,
|
|
96545
96675
|
disabled: isRendering,
|
|
96546
96676
|
onCommit: (next) => {
|
|
96547
|
-
const v = next;
|
|
96677
|
+
const v = resolveRenderFormat(next);
|
|
96548
96678
|
setFormat(v);
|
|
96549
|
-
persistRenderSettings(v, quality,
|
|
96679
|
+
persistRenderSettings(v, quality, resolveRenderFps(v, requestedFps));
|
|
96550
96680
|
}
|
|
96551
96681
|
}
|
|
96552
96682
|
)
|
|
96553
96683
|
] }),
|
|
96554
|
-
/* @__PURE__ */
|
|
96555
|
-
/* @__PURE__ */
|
|
96556
|
-
/* @__PURE__ */
|
|
96684
|
+
/* @__PURE__ */ jsxs191("div", { className: "flex flex-col gap-1", children: [
|
|
96685
|
+
/* @__PURE__ */ jsx239("span", { className: "text-step-10 text-text-4", children: "Resolution" }),
|
|
96686
|
+
/* @__PURE__ */ jsx239(
|
|
96557
96687
|
Select,
|
|
96558
96688
|
{
|
|
96559
96689
|
label: "Resolution",
|
|
@@ -96568,14 +96698,14 @@ function FormatExportButton({
|
|
|
96568
96698
|
}
|
|
96569
96699
|
)
|
|
96570
96700
|
] }),
|
|
96571
|
-
/* @__PURE__ */
|
|
96572
|
-
/* @__PURE__ */
|
|
96573
|
-
/* @__PURE__ */
|
|
96701
|
+
/* @__PURE__ */ jsxs191("div", { className: "flex flex-col gap-1", children: [
|
|
96702
|
+
/* @__PURE__ */ jsx239("span", { className: "text-step-10 text-text-4", children: "Frame rate" }),
|
|
96703
|
+
/* @__PURE__ */ jsx239(
|
|
96574
96704
|
Select,
|
|
96575
96705
|
{
|
|
96576
96706
|
label: "Frame rate",
|
|
96577
96707
|
value: String(fps),
|
|
96578
|
-
options:
|
|
96708
|
+
options: getRenderFpsOptions(format),
|
|
96579
96709
|
disabled: isRendering,
|
|
96580
96710
|
onCommit: (next) => {
|
|
96581
96711
|
const v = Number(next);
|
|
@@ -96585,9 +96715,9 @@ function FormatExportButton({
|
|
|
96585
96715
|
}
|
|
96586
96716
|
)
|
|
96587
96717
|
] }),
|
|
96588
|
-
showQuality && /* @__PURE__ */
|
|
96589
|
-
/* @__PURE__ */
|
|
96590
|
-
/* @__PURE__ */
|
|
96718
|
+
showQuality && /* @__PURE__ */ jsxs191("div", { className: "flex flex-col gap-1", children: [
|
|
96719
|
+
/* @__PURE__ */ jsx239("span", { className: "text-step-10 text-text-4", children: "Quality" }),
|
|
96720
|
+
/* @__PURE__ */ jsx239(
|
|
96591
96721
|
Select,
|
|
96592
96722
|
{
|
|
96593
96723
|
label: "Quality",
|
|
@@ -96603,7 +96733,17 @@ function FormatExportButton({
|
|
|
96603
96733
|
)
|
|
96604
96734
|
] })
|
|
96605
96735
|
] }),
|
|
96606
|
-
/* @__PURE__ */
|
|
96736
|
+
/* @__PURE__ */ jsx239(
|
|
96737
|
+
GifLoopInput,
|
|
96738
|
+
{
|
|
96739
|
+
format,
|
|
96740
|
+
value: gifLoop,
|
|
96741
|
+
disabled: isRendering,
|
|
96742
|
+
invalid: invalidGifLoop,
|
|
96743
|
+
onChange: setGifLoop
|
|
96744
|
+
}
|
|
96745
|
+
),
|
|
96746
|
+
/* @__PURE__ */ jsx239(
|
|
96607
96747
|
GpuEncodingToggle,
|
|
96608
96748
|
{
|
|
96609
96749
|
format,
|
|
@@ -96615,29 +96755,33 @@ function FormatExportButton({
|
|
|
96615
96755
|
}
|
|
96616
96756
|
}
|
|
96617
96757
|
),
|
|
96618
|
-
/* @__PURE__ */
|
|
96758
|
+
/* @__PURE__ */ jsx239(
|
|
96619
96759
|
Button,
|
|
96620
96760
|
{
|
|
96621
96761
|
variant: "primary",
|
|
96622
96762
|
size: "md",
|
|
96623
96763
|
"data-testid": "renders-export",
|
|
96624
96764
|
loading: isRendering,
|
|
96625
|
-
disabled:
|
|
96765
|
+
disabled: exportBlocked,
|
|
96626
96766
|
title: missingFfmpeg ? "Install FFmpeg to export. See the note above." : void 0,
|
|
96627
96767
|
onClick: () => {
|
|
96628
|
-
if (
|
|
96768
|
+
if (exportBlocked) return;
|
|
96629
96769
|
const outputResolution = resolveResolution(resolution, compositionDimensions);
|
|
96630
96770
|
trackStudioEvent("render_start", { format, quality, resolution: outputResolution, fps });
|
|
96631
|
-
void onStartRender
|
|
96771
|
+
void startConfiguredRender(onStartRender, {
|
|
96772
|
+
format,
|
|
96773
|
+
quality,
|
|
96774
|
+
resolution: outputResolution,
|
|
96775
|
+
fps,
|
|
96776
|
+
gpu,
|
|
96777
|
+
gifLoop: loopCount
|
|
96778
|
+
});
|
|
96632
96779
|
},
|
|
96633
96780
|
className: "w-full",
|
|
96634
96781
|
children: isRendering ? "Rendering\u2026" : "Export"
|
|
96635
96782
|
}
|
|
96636
96783
|
),
|
|
96637
|
-
|
|
96638
|
-
"Last render took ",
|
|
96639
|
-
formatEta(lastRenderDurationMs)
|
|
96640
|
-
] })
|
|
96784
|
+
/* @__PURE__ */ jsx239(RenderDurationNote, { durationMs: lastRenderDurationMs, isRendering })
|
|
96641
96785
|
] });
|
|
96642
96786
|
}
|
|
96643
96787
|
var RenderQueue = memo58(function RenderQueue2({
|
|
@@ -96658,15 +96802,15 @@ var RenderQueue = memo58(function RenderQueue2({
|
|
|
96658
96802
|
onRecheckFfmpeg
|
|
96659
96803
|
}) {
|
|
96660
96804
|
const listRef = useRef183(null);
|
|
96661
|
-
|
|
96805
|
+
useEffect152(() => {
|
|
96662
96806
|
if (listRef.current) {
|
|
96663
96807
|
listRef.current.scrollTo({ top: listRef.current.scrollHeight, behavior: "smooth" });
|
|
96664
96808
|
}
|
|
96665
96809
|
}, [jobs.length]);
|
|
96666
96810
|
const completedCount = jobs.filter((j) => j.status !== "rendering").length;
|
|
96667
96811
|
const lastRenderDurationMs = [...jobs].reverse().find((j) => j.status === "complete" && j.durationMs !== void 0)?.durationMs;
|
|
96668
|
-
return /* @__PURE__ */
|
|
96669
|
-
/* @__PURE__ */
|
|
96812
|
+
return /* @__PURE__ */ jsxs191("div", { className: "flex flex-col h-full", children: [
|
|
96813
|
+
/* @__PURE__ */ jsx239("div", { className: "px-3 py-3 border-b border-border shrink-0", children: /* @__PURE__ */ jsx239(
|
|
96670
96814
|
FormatExportButton,
|
|
96671
96815
|
{
|
|
96672
96816
|
onStartRender,
|
|
@@ -96678,21 +96822,21 @@ var RenderQueue = memo58(function RenderQueue2({
|
|
|
96678
96822
|
onRecheckFfmpeg
|
|
96679
96823
|
}
|
|
96680
96824
|
) }),
|
|
96681
|
-
actionError && /* @__PURE__ */
|
|
96825
|
+
actionError && /* @__PURE__ */ jsxs191(
|
|
96682
96826
|
"div",
|
|
96683
96827
|
{
|
|
96684
96828
|
role: "alert",
|
|
96685
96829
|
className: "flex items-start justify-between gap-2 px-3 py-2 border-b border-border bg-danger/10",
|
|
96686
96830
|
children: [
|
|
96687
|
-
/* @__PURE__ */
|
|
96688
|
-
onDismissActionError && /* @__PURE__ */
|
|
96831
|
+
/* @__PURE__ */ jsx239("span", { className: "text-step-10 text-danger-ink", children: actionError }),
|
|
96832
|
+
onDismissActionError && /* @__PURE__ */ jsx239(
|
|
96689
96833
|
IconButton,
|
|
96690
96834
|
{
|
|
96691
96835
|
size: "sm",
|
|
96692
96836
|
onClick: onDismissActionError,
|
|
96693
96837
|
"aria-label": "Dismiss error",
|
|
96694
96838
|
className: "shrink-0",
|
|
96695
|
-
icon: /* @__PURE__ */
|
|
96839
|
+
icon: /* @__PURE__ */ jsx239(
|
|
96696
96840
|
"svg",
|
|
96697
96841
|
{
|
|
96698
96842
|
width: "10",
|
|
@@ -96703,7 +96847,7 @@ var RenderQueue = memo58(function RenderQueue2({
|
|
|
96703
96847
|
strokeWidth: "2",
|
|
96704
96848
|
strokeLinecap: "round",
|
|
96705
96849
|
"aria-hidden": "true",
|
|
96706
|
-
children: /* @__PURE__ */
|
|
96850
|
+
children: /* @__PURE__ */ jsx239("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
96707
96851
|
}
|
|
96708
96852
|
)
|
|
96709
96853
|
}
|
|
@@ -96711,11 +96855,11 @@ var RenderQueue = memo58(function RenderQueue2({
|
|
|
96711
96855
|
]
|
|
96712
96856
|
}
|
|
96713
96857
|
),
|
|
96714
|
-
/* @__PURE__ */
|
|
96715
|
-
/* @__PURE__ */
|
|
96716
|
-
onRetryLoad && /* @__PURE__ */
|
|
96717
|
-
] }) : jobs.length === 0 ? /* @__PURE__ */
|
|
96718
|
-
/* @__PURE__ */
|
|
96858
|
+
/* @__PURE__ */ jsx239("div", { ref: listRef, className: "flex-1 overflow-y-auto", children: loadError && jobs.length === 0 ? /* @__PURE__ */ jsxs191("div", { className: "flex flex-col items-center justify-center h-full px-4 gap-2", role: "alert", children: [
|
|
96859
|
+
/* @__PURE__ */ jsx239("p", { className: "text-step-10 text-danger-ink text-center", children: loadError }),
|
|
96860
|
+
onRetryLoad && /* @__PURE__ */ jsx239(Button, { size: "sm", variant: "secondary", onClick: onRetryLoad, children: "Retry" })
|
|
96861
|
+
] }) : jobs.length === 0 ? /* @__PURE__ */ jsxs191("div", { className: "flex flex-col items-center justify-center h-full px-4 gap-2", children: [
|
|
96862
|
+
/* @__PURE__ */ jsxs191(
|
|
96719
96863
|
"svg",
|
|
96720
96864
|
{
|
|
96721
96865
|
width: "20",
|
|
@@ -96726,7 +96870,7 @@ var RenderQueue = memo58(function RenderQueue2({
|
|
|
96726
96870
|
strokeWidth: "1.5",
|
|
96727
96871
|
className: "text-text-5",
|
|
96728
96872
|
children: [
|
|
96729
|
-
/* @__PURE__ */
|
|
96873
|
+
/* @__PURE__ */ jsx239(
|
|
96730
96874
|
"rect",
|
|
96731
96875
|
{
|
|
96732
96876
|
x: "2",
|
|
@@ -96739,7 +96883,7 @@ var RenderQueue = memo58(function RenderQueue2({
|
|
|
96739
96883
|
strokeLinejoin: "round"
|
|
96740
96884
|
}
|
|
96741
96885
|
),
|
|
96742
|
-
/* @__PURE__ */
|
|
96886
|
+
/* @__PURE__ */ jsx239(
|
|
96743
96887
|
"path",
|
|
96744
96888
|
{
|
|
96745
96889
|
d: "M7 2v20M17 2v20M2 12h20M2 7h5M2 17h5M17 17h5M17 7h5",
|
|
@@ -96750,17 +96894,17 @@ var RenderQueue = memo58(function RenderQueue2({
|
|
|
96750
96894
|
]
|
|
96751
96895
|
}
|
|
96752
96896
|
),
|
|
96753
|
-
/* @__PURE__ */
|
|
96754
|
-
] }) : /* @__PURE__ */
|
|
96755
|
-
completedCount > 0 && /* @__PURE__ */
|
|
96756
|
-
/* @__PURE__ */
|
|
96897
|
+
/* @__PURE__ */ jsx239("p", { className: "text-step-10 text-text-5 text-center", children: "No renders yet" })
|
|
96898
|
+
] }) : /* @__PURE__ */ jsxs191("div", { children: [
|
|
96899
|
+
completedCount > 0 && /* @__PURE__ */ jsxs191("div", { className: "flex items-center justify-between px-3 py-1.5 border-b border-border", children: [
|
|
96900
|
+
/* @__PURE__ */ jsxs191("span", { className: "text-step-10 text-text-4", children: [
|
|
96757
96901
|
jobs.length,
|
|
96758
96902
|
" render",
|
|
96759
96903
|
jobs.length === 1 ? "" : "s"
|
|
96760
96904
|
] }),
|
|
96761
|
-
/* @__PURE__ */
|
|
96905
|
+
/* @__PURE__ */ jsx239(Tooltip, { label: "Hide finished renders from this list (files stay on disk)", children: /* @__PURE__ */ jsx239(Button, { size: "sm", variant: "ghost", onClick: onClearCompleted, children: "Hide finished" }) })
|
|
96762
96906
|
] }),
|
|
96763
|
-
jobs.map((job) => /* @__PURE__ */
|
|
96907
|
+
jobs.map((job) => /* @__PURE__ */ jsx239(
|
|
96764
96908
|
RenderQueueItem,
|
|
96765
96909
|
{
|
|
96766
96910
|
job,
|
|
@@ -96775,10 +96919,10 @@ var RenderQueue = memo58(function RenderQueue2({
|
|
|
96775
96919
|
});
|
|
96776
96920
|
|
|
96777
96921
|
// src/components/renders/RenderQueuePanel.tsx
|
|
96778
|
-
import { jsx as
|
|
96922
|
+
import { jsx as jsx240 } from "react/jsx-runtime";
|
|
96779
96923
|
var RenderQueuePanel = memo59(function RenderQueuePanel2() {
|
|
96780
96924
|
const { projectId, compositionDimensions, waitForPendingDomEditSaves, renderQueue } = useStudioShellContext();
|
|
96781
|
-
return /* @__PURE__ */
|
|
96925
|
+
return /* @__PURE__ */ jsx240(
|
|
96782
96926
|
RenderQueue,
|
|
96783
96927
|
{
|
|
96784
96928
|
jobs: renderQueue.jobs,
|
|
@@ -96793,7 +96937,7 @@ var RenderQueuePanel = memo59(function RenderQueuePanel2() {
|
|
|
96793
96937
|
ffmpeg: renderQueue.ffmpeg,
|
|
96794
96938
|
ffmpegChecking: renderQueue.ffmpegChecking,
|
|
96795
96939
|
onRecheckFfmpeg: renderQueue.recheckFfmpeg,
|
|
96796
|
-
onStartRender: async (format, quality, resolution, fps, gpu) => {
|
|
96940
|
+
onStartRender: async (format, quality, resolution, fps, gpu, gifLoop) => {
|
|
96797
96941
|
await waitForPendingDomEditSaves();
|
|
96798
96942
|
await renderQueue.startRender({
|
|
96799
96943
|
fps,
|
|
@@ -96801,6 +96945,7 @@ var RenderQueuePanel = memo59(function RenderQueuePanel2() {
|
|
|
96801
96945
|
format,
|
|
96802
96946
|
resolution,
|
|
96803
96947
|
gpu,
|
|
96948
|
+
gifLoop,
|
|
96804
96949
|
// Render what the user is previewing: active variable overrides
|
|
96805
96950
|
// from the Variables panel ride along (undefined = defaults).
|
|
96806
96951
|
variables: usePreviewVariablesStore.getState().values ?? void 0
|
|
@@ -96813,18 +96958,18 @@ var RenderQueuePanel = memo59(function RenderQueuePanel2() {
|
|
|
96813
96958
|
});
|
|
96814
96959
|
|
|
96815
96960
|
// src/components/panels/SlideshowPanel.tsx
|
|
96816
|
-
import { useState as useState156, useEffect as
|
|
96961
|
+
import { useState as useState156, useEffect as useEffect153, useCallback as useCallback180, useRef as useRef184 } from "react";
|
|
96817
96962
|
import { parseSlideshowManifest } from "@hyperframes/core/slideshow";
|
|
96818
96963
|
|
|
96819
96964
|
// src/components/panels/SlideshowSubPanels.tsx
|
|
96820
96965
|
import { useState as useState155, useCallback as useCallback179, useId as useId5 } from "react";
|
|
96821
|
-
import { jsx as
|
|
96966
|
+
import { jsx as jsx241, jsxs as jsxs192 } from "react/jsx-runtime";
|
|
96822
96967
|
function SectionHeader({
|
|
96823
96968
|
children,
|
|
96824
96969
|
expanded,
|
|
96825
96970
|
onToggle
|
|
96826
96971
|
}) {
|
|
96827
|
-
return /* @__PURE__ */
|
|
96972
|
+
return /* @__PURE__ */ jsxs192(
|
|
96828
96973
|
"button",
|
|
96829
96974
|
{
|
|
96830
96975
|
type: "button",
|
|
@@ -96832,8 +96977,8 @@ function SectionHeader({
|
|
|
96832
96977
|
onClick: onToggle,
|
|
96833
96978
|
"aria-expanded": expanded,
|
|
96834
96979
|
children: [
|
|
96835
|
-
/* @__PURE__ */
|
|
96836
|
-
/* @__PURE__ */
|
|
96980
|
+
/* @__PURE__ */ jsx241("span", { children }),
|
|
96981
|
+
/* @__PURE__ */ jsx241("span", { className: "text-[10px] text-neutral-600", children: expanded ? "\u25B2" : "\u25BC" })
|
|
96837
96982
|
]
|
|
96838
96983
|
}
|
|
96839
96984
|
);
|
|
@@ -96851,12 +96996,12 @@ function SlideList({
|
|
|
96851
96996
|
const orderedSlideScenes = slides.map((sl) => sceneById.get(sl.sceneId)).filter((s) => s !== void 0);
|
|
96852
96997
|
const nonSlideScenes = scenes.filter((sc) => !slideIds.has(sc.id));
|
|
96853
96998
|
const rows = [...orderedSlideScenes, ...nonSlideScenes];
|
|
96854
|
-
return /* @__PURE__ */
|
|
96999
|
+
return /* @__PURE__ */ jsxs192("div", { className: "flex flex-col gap-px", children: [
|
|
96855
97000
|
rows.map((scene) => {
|
|
96856
97001
|
const isSlide = slideIds.has(scene.id);
|
|
96857
97002
|
const isSelected2 = selectedSceneId === scene.id;
|
|
96858
97003
|
const slideIndex = slides.findIndex((s) => s.sceneId === scene.id);
|
|
96859
|
-
return /* @__PURE__ */
|
|
97004
|
+
return /* @__PURE__ */ jsxs192(
|
|
96860
97005
|
"div",
|
|
96861
97006
|
{
|
|
96862
97007
|
role: "button",
|
|
@@ -96871,7 +97016,7 @@ function SlideList({
|
|
|
96871
97016
|
}
|
|
96872
97017
|
},
|
|
96873
97018
|
children: [
|
|
96874
|
-
/* @__PURE__ */
|
|
97019
|
+
/* @__PURE__ */ jsx241(
|
|
96875
97020
|
"input",
|
|
96876
97021
|
{
|
|
96877
97022
|
type: "checkbox",
|
|
@@ -96882,9 +97027,9 @@ function SlideList({
|
|
|
96882
97027
|
className: "accent-studio-accent shrink-0"
|
|
96883
97028
|
}
|
|
96884
97029
|
),
|
|
96885
|
-
/* @__PURE__ */
|
|
96886
|
-
isSlide && /* @__PURE__ */
|
|
96887
|
-
/* @__PURE__ */
|
|
97030
|
+
/* @__PURE__ */ jsx241("span", { className: "flex-1 truncate", children: scene.label || scene.id }),
|
|
97031
|
+
isSlide && /* @__PURE__ */ jsxs192("span", { className: "flex gap-0.5 shrink-0", children: [
|
|
97032
|
+
/* @__PURE__ */ jsx241(
|
|
96888
97033
|
"button",
|
|
96889
97034
|
{
|
|
96890
97035
|
type: "button",
|
|
@@ -96899,7 +97044,7 @@ function SlideList({
|
|
|
96899
97044
|
children: "\u25B2"
|
|
96900
97045
|
}
|
|
96901
97046
|
),
|
|
96902
|
-
/* @__PURE__ */
|
|
97047
|
+
/* @__PURE__ */ jsx241(
|
|
96903
97048
|
"button",
|
|
96904
97049
|
{
|
|
96905
97050
|
type: "button",
|
|
@@ -96920,7 +97065,7 @@ function SlideList({
|
|
|
96920
97065
|
scene.id
|
|
96921
97066
|
);
|
|
96922
97067
|
}),
|
|
96923
|
-
scenes.length === 0 && /* @__PURE__ */
|
|
97068
|
+
scenes.length === 0 && /* @__PURE__ */ jsx241("p", { className: "px-3 py-2 text-[11px] text-neutral-500 italic", children: "No scenes found" })
|
|
96924
97069
|
] });
|
|
96925
97070
|
}
|
|
96926
97071
|
function SlideInspector({
|
|
@@ -96932,14 +97077,14 @@ function SlideInspector({
|
|
|
96932
97077
|
onRemoveFragment
|
|
96933
97078
|
}) {
|
|
96934
97079
|
const fragments = slide?.fragments ?? [];
|
|
96935
|
-
return /* @__PURE__ */
|
|
96936
|
-
/* @__PURE__ */
|
|
97080
|
+
return /* @__PURE__ */ jsxs192("div", { className: "flex flex-col gap-3 px-3 py-2", children: [
|
|
97081
|
+
/* @__PURE__ */ jsxs192("p", { className: "text-[10px] text-neutral-500 font-medium uppercase tracking-wide truncate", children: [
|
|
96937
97082
|
"Scene: ",
|
|
96938
97083
|
sceneId
|
|
96939
97084
|
] }),
|
|
96940
|
-
/* @__PURE__ */
|
|
96941
|
-
/* @__PURE__ */
|
|
96942
|
-
/* @__PURE__ */
|
|
97085
|
+
/* @__PURE__ */ jsxs192("div", { className: "flex flex-col gap-1", children: [
|
|
97086
|
+
/* @__PURE__ */ jsx241("label", { className: "text-[11px] text-neutral-400", children: "Notes" }),
|
|
97087
|
+
/* @__PURE__ */ jsx241(
|
|
96943
97088
|
"textarea",
|
|
96944
97089
|
{
|
|
96945
97090
|
className: "bg-neutral-800 border border-neutral-700 rounded-sm px-2 py-1.5 text-[11px] text-text-0 resize-none placeholder-neutral-600 focus:border-studio-accent/60 focus:outline-hidden",
|
|
@@ -96950,10 +97095,10 @@ function SlideInspector({
|
|
|
96950
97095
|
}
|
|
96951
97096
|
)
|
|
96952
97097
|
] }),
|
|
96953
|
-
/* @__PURE__ */
|
|
96954
|
-
/* @__PURE__ */
|
|
96955
|
-
/* @__PURE__ */
|
|
96956
|
-
/* @__PURE__ */
|
|
97098
|
+
/* @__PURE__ */ jsxs192("div", { className: "flex flex-col gap-1.5", children: [
|
|
97099
|
+
/* @__PURE__ */ jsxs192("div", { className: "flex items-center justify-between", children: [
|
|
97100
|
+
/* @__PURE__ */ jsx241("span", { className: "text-[11px] text-neutral-400", children: "Fragment hold-points" }),
|
|
97101
|
+
/* @__PURE__ */ jsxs192(
|
|
96957
97102
|
"button",
|
|
96958
97103
|
{
|
|
96959
97104
|
type: "button",
|
|
@@ -96968,14 +97113,14 @@ function SlideInspector({
|
|
|
96968
97113
|
}
|
|
96969
97114
|
)
|
|
96970
97115
|
] }),
|
|
96971
|
-
fragments.length > 0 ? /* @__PURE__ */
|
|
97116
|
+
fragments.length > 0 ? /* @__PURE__ */ jsx241("div", { className: "flex flex-wrap gap-1", children: fragments.map((t2, i) => /* @__PURE__ */ jsxs192(
|
|
96972
97117
|
"span",
|
|
96973
97118
|
{
|
|
96974
97119
|
className: "inline-flex items-center gap-1 bg-neutral-700 rounded-sm px-1.5 py-0.5 text-[10px] text-neutral-200",
|
|
96975
97120
|
children: [
|
|
96976
97121
|
t2.toFixed(2),
|
|
96977
97122
|
"s",
|
|
96978
|
-
/* @__PURE__ */
|
|
97123
|
+
/* @__PURE__ */ jsx241(
|
|
96979
97124
|
"button",
|
|
96980
97125
|
{
|
|
96981
97126
|
type: "button",
|
|
@@ -96988,7 +97133,7 @@ function SlideInspector({
|
|
|
96988
97133
|
]
|
|
96989
97134
|
},
|
|
96990
97135
|
`frag-${i}`
|
|
96991
|
-
)) }) : /* @__PURE__ */
|
|
97136
|
+
)) }) : /* @__PURE__ */ jsx241("p", { className: "text-[10px] text-neutral-600 italic", children: "No hold-points yet" })
|
|
96992
97137
|
] })
|
|
96993
97138
|
] });
|
|
96994
97139
|
}
|
|
@@ -97011,9 +97156,9 @@ function BranchTree({
|
|
|
97011
97156
|
onCreateSequence(label);
|
|
97012
97157
|
setNewLabel("");
|
|
97013
97158
|
}, [newLabel, onCreateSequence]);
|
|
97014
|
-
return /* @__PURE__ */
|
|
97015
|
-
/* @__PURE__ */
|
|
97016
|
-
/* @__PURE__ */
|
|
97159
|
+
return /* @__PURE__ */ jsxs192("div", { className: "flex flex-col gap-3 px-3 py-2", children: [
|
|
97160
|
+
/* @__PURE__ */ jsxs192("div", { className: "flex gap-1.5", children: [
|
|
97161
|
+
/* @__PURE__ */ jsx241(
|
|
97017
97162
|
"input",
|
|
97018
97163
|
{
|
|
97019
97164
|
id: inputId,
|
|
@@ -97028,7 +97173,7 @@ function BranchTree({
|
|
|
97028
97173
|
"aria-label": "New branch sequence name"
|
|
97029
97174
|
}
|
|
97030
97175
|
),
|
|
97031
|
-
/* @__PURE__ */
|
|
97176
|
+
/* @__PURE__ */ jsx241(
|
|
97032
97177
|
"button",
|
|
97033
97178
|
{
|
|
97034
97179
|
type: "button",
|
|
@@ -97038,7 +97183,7 @@ function BranchTree({
|
|
|
97038
97183
|
}
|
|
97039
97184
|
)
|
|
97040
97185
|
] }),
|
|
97041
|
-
sequences.length === 0 ? /* @__PURE__ */
|
|
97186
|
+
sequences.length === 0 ? /* @__PURE__ */ jsx241("p", { className: "text-[10px] text-neutral-600 italic", children: "No branches yet" }) : /* @__PURE__ */ jsx241("div", { className: "flex flex-col gap-3", children: sequences.map((seq) => /* @__PURE__ */ jsx241(
|
|
97042
97187
|
BranchItem,
|
|
97043
97188
|
{
|
|
97044
97189
|
seq,
|
|
@@ -97072,9 +97217,9 @@ function BranchItem({
|
|
|
97072
97217
|
if (label && label !== seq.label) onRename(seq.id, label);
|
|
97073
97218
|
setEditing(false);
|
|
97074
97219
|
}, [draft, onRename, seq.id, seq.label]);
|
|
97075
|
-
return /* @__PURE__ */
|
|
97076
|
-
/* @__PURE__ */
|
|
97077
|
-
editing ? /* @__PURE__ */
|
|
97220
|
+
return /* @__PURE__ */ jsxs192("div", { className: "border border-neutral-700/60 rounded-sm p-2 flex flex-col gap-2", children: [
|
|
97221
|
+
/* @__PURE__ */ jsxs192("div", { className: "flex items-center gap-1", children: [
|
|
97222
|
+
editing ? /* @__PURE__ */ jsx241(
|
|
97078
97223
|
"input",
|
|
97079
97224
|
{
|
|
97080
97225
|
className: "flex-1 bg-neutral-800 border border-neutral-600 rounded-sm px-1.5 py-0.5 text-[11px] text-text-0 focus:border-studio-accent/60 focus:outline-hidden",
|
|
@@ -97088,7 +97233,7 @@ function BranchItem({
|
|
|
97088
97233
|
},
|
|
97089
97234
|
"aria-label": `Rename branch ${seq.label}`
|
|
97090
97235
|
}
|
|
97091
|
-
) : /* @__PURE__ */
|
|
97236
|
+
) : /* @__PURE__ */ jsx241(
|
|
97092
97237
|
"span",
|
|
97093
97238
|
{
|
|
97094
97239
|
role: "button",
|
|
@@ -97105,7 +97250,7 @@ function BranchItem({
|
|
|
97105
97250
|
children: seq.label
|
|
97106
97251
|
}
|
|
97107
97252
|
),
|
|
97108
|
-
/* @__PURE__ */
|
|
97253
|
+
/* @__PURE__ */ jsx241(
|
|
97109
97254
|
"button",
|
|
97110
97255
|
{
|
|
97111
97256
|
type: "button",
|
|
@@ -97116,16 +97261,16 @@ function BranchItem({
|
|
|
97116
97261
|
}
|
|
97117
97262
|
)
|
|
97118
97263
|
] }),
|
|
97119
|
-
confirmingDelete && /* @__PURE__ */
|
|
97120
|
-
/* @__PURE__ */
|
|
97264
|
+
confirmingDelete && /* @__PURE__ */ jsxs192("div", { className: "px-2 py-1.5 bg-danger/15 border-l-2 border-red-500 flex flex-col gap-1 rounded-xs", children: [
|
|
97265
|
+
/* @__PURE__ */ jsxs192("span", { className: "text-[10px] text-danger-ink", children: [
|
|
97121
97266
|
"Delete branch \u201C",
|
|
97122
97267
|
seq.label,
|
|
97123
97268
|
"\u201D",
|
|
97124
97269
|
seq.slides.length > 0 ? ` and its ${seq.slides.length} slide${seq.slides.length === 1 ? "" : "s"}` : "",
|
|
97125
97270
|
"? Hotspots pointing to it will no longer resolve."
|
|
97126
97271
|
] }),
|
|
97127
|
-
/* @__PURE__ */
|
|
97128
|
-
/* @__PURE__ */
|
|
97272
|
+
/* @__PURE__ */ jsxs192("div", { className: "flex items-center justify-end gap-1", children: [
|
|
97273
|
+
/* @__PURE__ */ jsx241(
|
|
97129
97274
|
"button",
|
|
97130
97275
|
{
|
|
97131
97276
|
type: "button",
|
|
@@ -97137,7 +97282,7 @@ function BranchItem({
|
|
|
97137
97282
|
children: "Delete"
|
|
97138
97283
|
}
|
|
97139
97284
|
),
|
|
97140
|
-
/* @__PURE__ */
|
|
97285
|
+
/* @__PURE__ */ jsx241(
|
|
97141
97286
|
"button",
|
|
97142
97287
|
{
|
|
97143
97288
|
type: "button",
|
|
@@ -97148,16 +97293,16 @@ function BranchItem({
|
|
|
97148
97293
|
)
|
|
97149
97294
|
] })
|
|
97150
97295
|
] }),
|
|
97151
|
-
/* @__PURE__ */
|
|
97296
|
+
/* @__PURE__ */ jsxs192("div", { className: "flex flex-col gap-px pl-2", children: [
|
|
97152
97297
|
scenes.map((scene) => {
|
|
97153
97298
|
const assigned = seq.slides.some((s) => s.sceneId === scene.id);
|
|
97154
97299
|
const isSelected2 = selectedSequenceId === seq.id && selectedSceneId === scene.id;
|
|
97155
|
-
return /* @__PURE__ */
|
|
97300
|
+
return /* @__PURE__ */ jsxs192(
|
|
97156
97301
|
"div",
|
|
97157
97302
|
{
|
|
97158
97303
|
className: "flex items-center gap-1.5 py-0.5 text-[11px] text-neutral-400",
|
|
97159
97304
|
children: [
|
|
97160
|
-
/* @__PURE__ */
|
|
97305
|
+
/* @__PURE__ */ jsx241(
|
|
97161
97306
|
"input",
|
|
97162
97307
|
{
|
|
97163
97308
|
type: "checkbox",
|
|
@@ -97167,7 +97312,7 @@ function BranchItem({
|
|
|
97167
97312
|
className: "accent-studio-accent shrink-0"
|
|
97168
97313
|
}
|
|
97169
97314
|
),
|
|
97170
|
-
assigned ? /* @__PURE__ */
|
|
97315
|
+
assigned ? /* @__PURE__ */ jsx241(
|
|
97171
97316
|
"button",
|
|
97172
97317
|
{
|
|
97173
97318
|
type: "button",
|
|
@@ -97176,13 +97321,13 @@ function BranchItem({
|
|
|
97176
97321
|
onClick: () => onSelectBranchSlide(seq.id, scene.id),
|
|
97177
97322
|
children: scene.label || scene.id
|
|
97178
97323
|
}
|
|
97179
|
-
) : /* @__PURE__ */
|
|
97324
|
+
) : /* @__PURE__ */ jsx241("span", { className: "flex-1 truncate", children: scene.label || scene.id })
|
|
97180
97325
|
]
|
|
97181
97326
|
},
|
|
97182
97327
|
scene.id
|
|
97183
97328
|
);
|
|
97184
97329
|
}),
|
|
97185
|
-
scenes.length === 0 && /* @__PURE__ */
|
|
97330
|
+
scenes.length === 0 && /* @__PURE__ */ jsx241("p", { className: "text-[10px] text-neutral-600 italic", children: "No scenes" })
|
|
97186
97331
|
] })
|
|
97187
97332
|
] });
|
|
97188
97333
|
}
|
|
@@ -97208,19 +97353,19 @@ function HotspotTool({
|
|
|
97208
97353
|
setHotspotLabel("");
|
|
97209
97354
|
}, [selectedSceneId, targetSequenceId, elementKey3, hotspotLabel, onAddHotspot]);
|
|
97210
97355
|
if (!selectedSceneId) {
|
|
97211
|
-
return /* @__PURE__ */
|
|
97356
|
+
return /* @__PURE__ */ jsx241("div", { className: "px-3 py-2", children: /* @__PURE__ */ jsx241("p", { className: "text-[11px] text-neutral-500 italic", children: "Select a scene in the Slides list" }) });
|
|
97212
97357
|
}
|
|
97213
|
-
return /* @__PURE__ */
|
|
97214
|
-
/* @__PURE__ */
|
|
97215
|
-
/* @__PURE__ */
|
|
97358
|
+
return /* @__PURE__ */ jsxs192("div", { className: "flex flex-col gap-3 px-3 py-2", children: [
|
|
97359
|
+
/* @__PURE__ */ jsxs192("div", { className: "flex flex-col gap-1.5", children: [
|
|
97360
|
+
/* @__PURE__ */ jsxs192("p", { className: "text-[11px] text-neutral-400", children: [
|
|
97216
97361
|
"Selected element:",
|
|
97217
97362
|
" ",
|
|
97218
|
-
/* @__PURE__ */
|
|
97363
|
+
/* @__PURE__ */ jsx241("span", { className: "text-neutral-200 font-mono", children: elementKey3 ?? "none" })
|
|
97219
97364
|
] }),
|
|
97220
|
-
!elementKey3 && /* @__PURE__ */
|
|
97221
|
-
sequences.length === 0 && /* @__PURE__ */
|
|
97222
|
-
/* @__PURE__ */
|
|
97223
|
-
/* @__PURE__ */
|
|
97365
|
+
!elementKey3 && /* @__PURE__ */ jsx241("p", { className: "text-[10px] text-neutral-500 italic", children: "Click an element on the canvas to choose the hotspot target." }),
|
|
97366
|
+
sequences.length === 0 && /* @__PURE__ */ jsx241("p", { className: "text-[10px] text-neutral-500 italic", children: "Create a branch in the Branches section first. Hotspots jump to a branch." }),
|
|
97367
|
+
/* @__PURE__ */ jsx241("label", { className: "text-[11px] text-neutral-400", children: "Hotspot label" }),
|
|
97368
|
+
/* @__PURE__ */ jsx241(
|
|
97224
97369
|
"input",
|
|
97225
97370
|
{
|
|
97226
97371
|
type: "text",
|
|
@@ -97231,8 +97376,8 @@ function HotspotTool({
|
|
|
97231
97376
|
"aria-label": "Hotspot label"
|
|
97232
97377
|
}
|
|
97233
97378
|
),
|
|
97234
|
-
/* @__PURE__ */
|
|
97235
|
-
/* @__PURE__ */
|
|
97379
|
+
/* @__PURE__ */ jsx241("label", { className: "text-[11px] text-neutral-400", children: "Target branch" }),
|
|
97380
|
+
/* @__PURE__ */ jsxs192(
|
|
97236
97381
|
"select",
|
|
97237
97382
|
{
|
|
97238
97383
|
className: "bg-neutral-800 border border-neutral-700 rounded-sm px-2 py-1 text-[11px] text-text-0 focus:border-studio-accent/60 focus:outline-hidden",
|
|
@@ -97240,12 +97385,12 @@ function HotspotTool({
|
|
|
97240
97385
|
onChange: (e) => setTargetSequenceId(e.target.value),
|
|
97241
97386
|
"aria-label": "Target branch sequence",
|
|
97242
97387
|
children: [
|
|
97243
|
-
/* @__PURE__ */
|
|
97244
|
-
sequences.map((seq) => /* @__PURE__ */
|
|
97388
|
+
/* @__PURE__ */ jsx241("option", { value: "", children: "Select branch" }),
|
|
97389
|
+
sequences.map((seq) => /* @__PURE__ */ jsx241("option", { value: seq.id, children: seq.label }, seq.id))
|
|
97245
97390
|
]
|
|
97246
97391
|
}
|
|
97247
97392
|
),
|
|
97248
|
-
/* @__PURE__ */
|
|
97393
|
+
/* @__PURE__ */ jsx241(
|
|
97249
97394
|
"button",
|
|
97250
97395
|
{
|
|
97251
97396
|
type: "button",
|
|
@@ -97257,21 +97402,21 @@ function HotspotTool({
|
|
|
97257
97402
|
}
|
|
97258
97403
|
)
|
|
97259
97404
|
] }),
|
|
97260
|
-
hotspots.length > 0 && /* @__PURE__ */
|
|
97261
|
-
/* @__PURE__ */
|
|
97405
|
+
hotspots.length > 0 && /* @__PURE__ */ jsxs192("div", { className: "flex flex-col gap-1.5", children: [
|
|
97406
|
+
/* @__PURE__ */ jsx241("p", { className: "text-[11px] text-neutral-400 font-medium", children: "Hotspots on this slide" }),
|
|
97262
97407
|
hotspots.map((h) => {
|
|
97263
97408
|
const seqLabel = sequences.find((s) => s.id === h.target)?.label ?? h.target;
|
|
97264
|
-
return /* @__PURE__ */
|
|
97409
|
+
return /* @__PURE__ */ jsxs192(
|
|
97265
97410
|
"div",
|
|
97266
97411
|
{
|
|
97267
97412
|
className: "flex items-center gap-2 bg-neutral-800 rounded-sm px-2 py-1",
|
|
97268
97413
|
children: [
|
|
97269
|
-
/* @__PURE__ */
|
|
97414
|
+
/* @__PURE__ */ jsxs192("span", { className: "flex-1 text-[11px] text-neutral-200 truncate", children: [
|
|
97270
97415
|
h.label,
|
|
97271
97416
|
" \u2192 ",
|
|
97272
|
-
/* @__PURE__ */
|
|
97417
|
+
/* @__PURE__ */ jsx241("span", { className: "text-neutral-400", children: seqLabel })
|
|
97273
97418
|
] }),
|
|
97274
|
-
/* @__PURE__ */
|
|
97419
|
+
/* @__PURE__ */ jsx241(
|
|
97275
97420
|
"button",
|
|
97276
97421
|
{
|
|
97277
97422
|
type: "button",
|
|
@@ -97421,7 +97566,7 @@ function removeHotspot(manifest, sceneId, hotspotId, sequenceId) {
|
|
|
97421
97566
|
}
|
|
97422
97567
|
|
|
97423
97568
|
// src/components/panels/SlideshowPanel.tsx
|
|
97424
|
-
import { Fragment as
|
|
97569
|
+
import { Fragment as Fragment66, jsx as jsx242, jsxs as jsxs193 } from "react/jsx-runtime";
|
|
97425
97570
|
function safeParseManifest(html2) {
|
|
97426
97571
|
try {
|
|
97427
97572
|
return parseSlideshowManifest(html2) ?? { slides: [] };
|
|
@@ -97509,7 +97654,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97509
97654
|
const { domEditSelection } = useDomEditSelectionContext();
|
|
97510
97655
|
const manifestRef = useRef184(manifest);
|
|
97511
97656
|
const notesCtrlRef = useRef184(makeSlideshowNotesController());
|
|
97512
|
-
|
|
97657
|
+
useEffect153(() => {
|
|
97513
97658
|
if (!compHtml) {
|
|
97514
97659
|
notesCtrlRef.current.flush();
|
|
97515
97660
|
setManifest({ slides: [] });
|
|
@@ -97571,7 +97716,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97571
97716
|
},
|
|
97572
97717
|
[onPersistNotes]
|
|
97573
97718
|
);
|
|
97574
|
-
|
|
97719
|
+
useEffect153(() => {
|
|
97575
97720
|
const ctrl = notesCtrlRef.current;
|
|
97576
97721
|
return () => {
|
|
97577
97722
|
ctrl.flush();
|
|
@@ -97689,7 +97834,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97689
97834
|
},
|
|
97690
97835
|
[selectedSequenceId, applyManifest]
|
|
97691
97836
|
);
|
|
97692
|
-
return /* @__PURE__ */
|
|
97837
|
+
return /* @__PURE__ */ jsxs193(
|
|
97693
97838
|
"div",
|
|
97694
97839
|
{
|
|
97695
97840
|
className: "flex flex-col h-full overflow-y-auto text-text-0",
|
|
@@ -97700,14 +97845,14 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97700
97845
|
handleUndo();
|
|
97701
97846
|
},
|
|
97702
97847
|
children: [
|
|
97703
|
-
persistError && /* @__PURE__ */
|
|
97848
|
+
persistError && /* @__PURE__ */ jsxs193(
|
|
97704
97849
|
"div",
|
|
97705
97850
|
{
|
|
97706
97851
|
role: "alert",
|
|
97707
97852
|
className: "flex items-center justify-between gap-2 px-3 py-2 bg-danger/15 border-b border-red-500/40",
|
|
97708
97853
|
children: [
|
|
97709
|
-
/* @__PURE__ */
|
|
97710
|
-
/* @__PURE__ */
|
|
97854
|
+
/* @__PURE__ */ jsx242("span", { className: "text-[11px] text-danger-ink", children: "Changes not saved" }),
|
|
97855
|
+
/* @__PURE__ */ jsx242(
|
|
97711
97856
|
"button",
|
|
97712
97857
|
{
|
|
97713
97858
|
type: "button",
|
|
@@ -97720,7 +97865,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97720
97865
|
]
|
|
97721
97866
|
}
|
|
97722
97867
|
),
|
|
97723
|
-
undoDepth > 0 && /* @__PURE__ */
|
|
97868
|
+
undoDepth > 0 && /* @__PURE__ */ jsx242("div", { className: "flex items-center justify-end px-3 py-1 border-b border-neutral-800/60", children: /* @__PURE__ */ jsxs193(
|
|
97724
97869
|
"button",
|
|
97725
97870
|
{
|
|
97726
97871
|
type: "button",
|
|
@@ -97734,7 +97879,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97734
97879
|
]
|
|
97735
97880
|
}
|
|
97736
97881
|
) }),
|
|
97737
|
-
/* @__PURE__ */
|
|
97882
|
+
/* @__PURE__ */ jsxs193(
|
|
97738
97883
|
SectionHeader,
|
|
97739
97884
|
{
|
|
97740
97885
|
expanded: expandedSections.has("slides"),
|
|
@@ -97746,7 +97891,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97746
97891
|
]
|
|
97747
97892
|
}
|
|
97748
97893
|
),
|
|
97749
|
-
expandedSections.has("slides") && /* @__PURE__ */
|
|
97894
|
+
expandedSections.has("slides") && /* @__PURE__ */ jsx242("div", { className: "py-1", children: /* @__PURE__ */ jsx242(
|
|
97750
97895
|
SlideList,
|
|
97751
97896
|
{
|
|
97752
97897
|
scenes,
|
|
@@ -97760,7 +97905,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97760
97905
|
onReorder: handleReorder
|
|
97761
97906
|
}
|
|
97762
97907
|
) }),
|
|
97763
|
-
/* @__PURE__ */
|
|
97908
|
+
/* @__PURE__ */ jsx242(
|
|
97764
97909
|
SectionHeader,
|
|
97765
97910
|
{
|
|
97766
97911
|
expanded: expandedSections.has("inspector"),
|
|
@@ -97768,7 +97913,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97768
97913
|
children: "Slide Inspector"
|
|
97769
97914
|
}
|
|
97770
97915
|
),
|
|
97771
|
-
expandedSections.has("inspector") && /* @__PURE__ */
|
|
97916
|
+
expandedSections.has("inspector") && /* @__PURE__ */ jsx242(Fragment66, { children: selectedSceneId ? /* @__PURE__ */ jsx242(
|
|
97772
97917
|
SlideInspector,
|
|
97773
97918
|
{
|
|
97774
97919
|
sceneId: selectedSceneId,
|
|
@@ -97778,8 +97923,8 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97778
97923
|
onMarkFragment: handleMarkFragment,
|
|
97779
97924
|
onRemoveFragment: handleRemoveFragment
|
|
97780
97925
|
}
|
|
97781
|
-
) : /* @__PURE__ */
|
|
97782
|
-
/* @__PURE__ */
|
|
97926
|
+
) : /* @__PURE__ */ jsx242("p", { className: "px-3 py-2 text-[11px] text-neutral-500 italic", children: "Select a scene above to inspect" }) }),
|
|
97927
|
+
/* @__PURE__ */ jsxs193(
|
|
97783
97928
|
SectionHeader,
|
|
97784
97929
|
{
|
|
97785
97930
|
expanded: expandedSections.has("branches"),
|
|
@@ -97791,7 +97936,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97791
97936
|
]
|
|
97792
97937
|
}
|
|
97793
97938
|
),
|
|
97794
|
-
expandedSections.has("branches") && /* @__PURE__ */
|
|
97939
|
+
expandedSections.has("branches") && /* @__PURE__ */ jsx242(
|
|
97795
97940
|
BranchTree,
|
|
97796
97941
|
{
|
|
97797
97942
|
sequences,
|
|
@@ -97805,7 +97950,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97805
97950
|
onSelectBranchSlide: handleSelectBranchSlide
|
|
97806
97951
|
}
|
|
97807
97952
|
),
|
|
97808
|
-
/* @__PURE__ */
|
|
97953
|
+
/* @__PURE__ */ jsx242(
|
|
97809
97954
|
SectionHeader,
|
|
97810
97955
|
{
|
|
97811
97956
|
expanded: expandedSections.has("hotspot"),
|
|
@@ -97813,7 +97958,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97813
97958
|
children: "Hotspot Tool"
|
|
97814
97959
|
}
|
|
97815
97960
|
),
|
|
97816
|
-
expandedSections.has("hotspot") && /* @__PURE__ */
|
|
97961
|
+
expandedSections.has("hotspot") && /* @__PURE__ */ jsx242(
|
|
97817
97962
|
HotspotTool,
|
|
97818
97963
|
{
|
|
97819
97964
|
selectedSceneId,
|
|
@@ -97830,7 +97975,7 @@ function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
|
|
|
97830
97975
|
}
|
|
97831
97976
|
|
|
97832
97977
|
// src/components/panels/VariablesPanel.tsx
|
|
97833
|
-
import { memo as memo60, useCallback as useCallback184, useEffect as
|
|
97978
|
+
import { memo as memo60, useCallback as useCallback184, useEffect as useEffect155, useMemo as useMemo86, useState as useState160 } from "react";
|
|
97834
97979
|
|
|
97835
97980
|
// src/hooks/useVariablesPersist.ts
|
|
97836
97981
|
import { useCallback as useCallback181 } from "react";
|
|
@@ -97881,7 +98026,7 @@ function useVariablesPersist({
|
|
|
97881
98026
|
import { useCallback as useCallback183, useState as useState159 } from "react";
|
|
97882
98027
|
|
|
97883
98028
|
// src/hooks/useProjectCompositionVariables.ts
|
|
97884
|
-
import { useCallback as useCallback182, useEffect as
|
|
98029
|
+
import { useCallback as useCallback182, useEffect as useEffect154, useState as useState157 } from "react";
|
|
97885
98030
|
import { openComposition as openComposition4 } from "@hyperframes/sdk";
|
|
97886
98031
|
async function readGroup(path, readProjectFile) {
|
|
97887
98032
|
let content;
|
|
@@ -97905,7 +98050,7 @@ async function readGroup(path, readProjectFile) {
|
|
|
97905
98050
|
}
|
|
97906
98051
|
function useProjectCompositionVariables(compositionPaths, excludePath, readProjectFile, refreshKey) {
|
|
97907
98052
|
const [groups, setGroups] = useState157([]);
|
|
97908
|
-
|
|
98053
|
+
useEffect154(() => {
|
|
97909
98054
|
let cancelled = false;
|
|
97910
98055
|
const htmlFiles = compositionPaths.filter((p) => p !== excludePath);
|
|
97911
98056
|
void (async () => {
|
|
@@ -97955,7 +98100,7 @@ function useEditVariablesInFile(deps) {
|
|
|
97955
98100
|
|
|
97956
98101
|
// src/components/panels/VariablesDeclarationForm.tsx
|
|
97957
98102
|
import { useState as useState158 } from "react";
|
|
97958
|
-
import { jsx as
|
|
98103
|
+
import { jsx as jsx243, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
97959
98104
|
var VARIABLE_TYPES = [
|
|
97960
98105
|
"string",
|
|
97961
98106
|
"number",
|
|
@@ -98074,8 +98219,8 @@ function declarationFromDraft(draft) {
|
|
|
98074
98219
|
}
|
|
98075
98220
|
}
|
|
98076
98221
|
function Field({ label, children }) {
|
|
98077
|
-
return /* @__PURE__ */
|
|
98078
|
-
/* @__PURE__ */
|
|
98222
|
+
return /* @__PURE__ */ jsxs194("div", { className: "space-y-1", children: [
|
|
98223
|
+
/* @__PURE__ */ jsx243("label", { className: "text-[9px] font-medium text-neutral-500", children: label }),
|
|
98079
98224
|
children
|
|
98080
98225
|
] });
|
|
98081
98226
|
}
|
|
@@ -98084,20 +98229,20 @@ function DefaultField({
|
|
|
98084
98229
|
onChange
|
|
98085
98230
|
}) {
|
|
98086
98231
|
if (draft.type === "boolean") {
|
|
98087
|
-
return /* @__PURE__ */
|
|
98232
|
+
return /* @__PURE__ */ jsxs194(
|
|
98088
98233
|
"select",
|
|
98089
98234
|
{
|
|
98090
98235
|
value: draft.defaultRaw === "true" ? "true" : "false",
|
|
98091
98236
|
onChange: (e) => onChange(e.target.value),
|
|
98092
98237
|
className: VARIABLES_INPUT_CLASS,
|
|
98093
98238
|
children: [
|
|
98094
|
-
/* @__PURE__ */
|
|
98095
|
-
/* @__PURE__ */
|
|
98239
|
+
/* @__PURE__ */ jsx243("option", { value: "false", children: "false" }),
|
|
98240
|
+
/* @__PURE__ */ jsx243("option", { value: "true", children: "true" })
|
|
98096
98241
|
]
|
|
98097
98242
|
}
|
|
98098
98243
|
);
|
|
98099
98244
|
}
|
|
98100
|
-
return /* @__PURE__ */
|
|
98245
|
+
return /* @__PURE__ */ jsx243(
|
|
98101
98246
|
"input",
|
|
98102
98247
|
{
|
|
98103
98248
|
type: "text",
|
|
@@ -98126,9 +98271,9 @@ function DeclarationForm({
|
|
|
98126
98271
|
setError(null);
|
|
98127
98272
|
onSubmit(result);
|
|
98128
98273
|
};
|
|
98129
|
-
return /* @__PURE__ */
|
|
98130
|
-
/* @__PURE__ */
|
|
98131
|
-
/* @__PURE__ */
|
|
98274
|
+
return /* @__PURE__ */ jsxs194("div", { className: "space-y-2 rounded-lg border border-neutral-800 bg-neutral-900/60 p-2", children: [
|
|
98275
|
+
/* @__PURE__ */ jsxs194("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
98276
|
+
/* @__PURE__ */ jsx243(Field, { label: "ID", children: /* @__PURE__ */ jsx243(
|
|
98132
98277
|
"input",
|
|
98133
98278
|
{
|
|
98134
98279
|
type: "text",
|
|
@@ -98139,7 +98284,7 @@ function DeclarationForm({
|
|
|
98139
98284
|
className: `${VARIABLES_INPUT_CLASS} font-mono disabled:opacity-50`
|
|
98140
98285
|
}
|
|
98141
98286
|
) }),
|
|
98142
|
-
/* @__PURE__ */
|
|
98287
|
+
/* @__PURE__ */ jsx243(Field, { label: "Label", children: /* @__PURE__ */ jsx243(
|
|
98143
98288
|
"input",
|
|
98144
98289
|
{
|
|
98145
98290
|
type: "text",
|
|
@@ -98150,8 +98295,8 @@ function DeclarationForm({
|
|
|
98150
98295
|
}
|
|
98151
98296
|
) })
|
|
98152
98297
|
] }),
|
|
98153
|
-
/* @__PURE__ */
|
|
98154
|
-
/* @__PURE__ */
|
|
98298
|
+
/* @__PURE__ */ jsxs194("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
98299
|
+
/* @__PURE__ */ jsx243(Field, { label: "Type", children: /* @__PURE__ */ jsx243(
|
|
98155
98300
|
"select",
|
|
98156
98301
|
{
|
|
98157
98302
|
value: draft.type,
|
|
@@ -98160,12 +98305,12 @@ function DeclarationForm({
|
|
|
98160
98305
|
if (type) set({ type });
|
|
98161
98306
|
},
|
|
98162
98307
|
className: VARIABLES_INPUT_CLASS,
|
|
98163
|
-
children: VARIABLE_TYPES.map((t2) => /* @__PURE__ */
|
|
98308
|
+
children: VARIABLE_TYPES.map((t2) => /* @__PURE__ */ jsx243("option", { value: t2, children: t2 }, t2))
|
|
98164
98309
|
}
|
|
98165
98310
|
) }),
|
|
98166
|
-
/* @__PURE__ */
|
|
98311
|
+
/* @__PURE__ */ jsx243(Field, { label: "Default", children: /* @__PURE__ */ jsx243(DefaultField, { draft, onChange: (defaultRaw) => set({ defaultRaw }) }) })
|
|
98167
98312
|
] }),
|
|
98168
|
-
draft.type === "number" && /* @__PURE__ */
|
|
98313
|
+
draft.type === "number" && /* @__PURE__ */ jsx243("div", { className: "grid grid-cols-3 gap-2", children: ["min", "max", "step"].map((key2) => /* @__PURE__ */ jsx243(Field, { label: key2, children: /* @__PURE__ */ jsx243(
|
|
98169
98314
|
"input",
|
|
98170
98315
|
{
|
|
98171
98316
|
type: "text",
|
|
@@ -98174,7 +98319,7 @@ function DeclarationForm({
|
|
|
98174
98319
|
className: `${VARIABLES_INPUT_CLASS} tabular-nums`
|
|
98175
98320
|
}
|
|
98176
98321
|
) }, key2)) }),
|
|
98177
|
-
draft.type === "enum" && /* @__PURE__ */
|
|
98322
|
+
draft.type === "enum" && /* @__PURE__ */ jsx243(Field, { label: "Options (one per line, value:Label)", children: /* @__PURE__ */ jsx243(
|
|
98178
98323
|
"textarea",
|
|
98179
98324
|
{
|
|
98180
98325
|
value: draft.optionsRaw,
|
|
@@ -98183,7 +98328,7 @@ function DeclarationForm({
|
|
|
98183
98328
|
className: `${VARIABLES_INPUT_CLASS} resize-y font-mono`
|
|
98184
98329
|
}
|
|
98185
98330
|
) }),
|
|
98186
|
-
/* @__PURE__ */
|
|
98331
|
+
/* @__PURE__ */ jsx243(Field, { label: "Description (optional)", children: /* @__PURE__ */ jsx243(
|
|
98187
98332
|
"input",
|
|
98188
98333
|
{
|
|
98189
98334
|
type: "text",
|
|
@@ -98192,9 +98337,9 @@ function DeclarationForm({
|
|
|
98192
98337
|
className: VARIABLES_INPUT_CLASS
|
|
98193
98338
|
}
|
|
98194
98339
|
) }),
|
|
98195
|
-
error && /* @__PURE__ */
|
|
98196
|
-
/* @__PURE__ */
|
|
98197
|
-
/* @__PURE__ */
|
|
98340
|
+
error && /* @__PURE__ */ jsx243("p", { className: "text-[10px] text-danger-ink", children: error }),
|
|
98341
|
+
/* @__PURE__ */ jsxs194("div", { className: "flex items-center justify-end gap-2 pt-1", children: [
|
|
98342
|
+
/* @__PURE__ */ jsx243(
|
|
98198
98343
|
"button",
|
|
98199
98344
|
{
|
|
98200
98345
|
type: "button",
|
|
@@ -98203,7 +98348,7 @@ function DeclarationForm({
|
|
|
98203
98348
|
children: "Cancel"
|
|
98204
98349
|
}
|
|
98205
98350
|
),
|
|
98206
|
-
/* @__PURE__ */
|
|
98351
|
+
/* @__PURE__ */ jsx243(
|
|
98207
98352
|
"button",
|
|
98208
98353
|
{
|
|
98209
98354
|
type: "button",
|
|
@@ -98217,14 +98362,14 @@ function DeclarationForm({
|
|
|
98217
98362
|
}
|
|
98218
98363
|
|
|
98219
98364
|
// src/components/panels/VariablesRowAction.tsx
|
|
98220
|
-
import { jsx as
|
|
98365
|
+
import { jsx as jsx244 } from "react/jsx-runtime";
|
|
98221
98366
|
function RowAction({
|
|
98222
98367
|
label,
|
|
98223
98368
|
title,
|
|
98224
98369
|
danger,
|
|
98225
98370
|
onClick
|
|
98226
98371
|
}) {
|
|
98227
|
-
return /* @__PURE__ */
|
|
98372
|
+
return /* @__PURE__ */ jsx244(
|
|
98228
98373
|
"button",
|
|
98229
98374
|
{
|
|
98230
98375
|
type: "button",
|
|
@@ -98237,7 +98382,7 @@ function RowAction({
|
|
|
98237
98382
|
}
|
|
98238
98383
|
|
|
98239
98384
|
// src/components/panels/VariablesOtherCompositions.tsx
|
|
98240
|
-
import { jsx as
|
|
98385
|
+
import { jsx as jsx245, jsxs as jsxs195 } from "react/jsx-runtime";
|
|
98241
98386
|
function CompositionSection({
|
|
98242
98387
|
group,
|
|
98243
98388
|
editingKey,
|
|
@@ -98245,8 +98390,8 @@ function CompositionSection({
|
|
|
98245
98390
|
onSave,
|
|
98246
98391
|
onRemove
|
|
98247
98392
|
}) {
|
|
98248
|
-
return /* @__PURE__ */
|
|
98249
|
-
/* @__PURE__ */
|
|
98393
|
+
return /* @__PURE__ */ jsxs195("div", { className: "space-y-1.5", children: [
|
|
98394
|
+
/* @__PURE__ */ jsx245(
|
|
98250
98395
|
"p",
|
|
98251
98396
|
{
|
|
98252
98397
|
className: "truncate text-[9px] font-medium uppercase tracking-wider text-neutral-500",
|
|
@@ -98257,12 +98402,12 @@ function CompositionSection({
|
|
|
98257
98402
|
group.variables.map((decl) => {
|
|
98258
98403
|
const key2 = `${group.path}::${decl.id}`;
|
|
98259
98404
|
const editing = editingKey === key2;
|
|
98260
|
-
return /* @__PURE__ */
|
|
98261
|
-
/* @__PURE__ */
|
|
98262
|
-
/* @__PURE__ */
|
|
98263
|
-
/* @__PURE__ */
|
|
98264
|
-
/* @__PURE__ */
|
|
98265
|
-
/* @__PURE__ */
|
|
98405
|
+
return /* @__PURE__ */ jsxs195("div", { className: "space-y-1.5 rounded-lg border border-neutral-800/70 p-2", children: [
|
|
98406
|
+
/* @__PURE__ */ jsxs195("div", { className: "flex items-center gap-1.5", children: [
|
|
98407
|
+
/* @__PURE__ */ jsx245("span", { className: "truncate text-[10px] font-medium text-neutral-300", children: decl.label }),
|
|
98408
|
+
/* @__PURE__ */ jsx245("span", { className: "rounded-sm bg-neutral-800 px-1 py-px font-mono text-[8px] text-neutral-500", children: decl.type }),
|
|
98409
|
+
/* @__PURE__ */ jsxs195("span", { className: "ml-auto flex items-center gap-1", children: [
|
|
98410
|
+
/* @__PURE__ */ jsx245(
|
|
98266
98411
|
RowAction,
|
|
98267
98412
|
{
|
|
98268
98413
|
label: "Edit",
|
|
@@ -98270,7 +98415,7 @@ function CompositionSection({
|
|
|
98270
98415
|
onClick: () => onToggleEdit(editing ? null : key2)
|
|
98271
98416
|
}
|
|
98272
98417
|
),
|
|
98273
|
-
/* @__PURE__ */
|
|
98418
|
+
/* @__PURE__ */ jsx245(
|
|
98274
98419
|
RowAction,
|
|
98275
98420
|
{
|
|
98276
98421
|
label: "\u2715",
|
|
@@ -98281,8 +98426,8 @@ function CompositionSection({
|
|
|
98281
98426
|
)
|
|
98282
98427
|
] })
|
|
98283
98428
|
] }),
|
|
98284
|
-
decl.description && /* @__PURE__ */
|
|
98285
|
-
editing && /* @__PURE__ */
|
|
98429
|
+
decl.description && /* @__PURE__ */ jsx245("p", { className: "text-[9px] text-neutral-500", children: decl.description }),
|
|
98430
|
+
editing && /* @__PURE__ */ jsx245(
|
|
98286
98431
|
DeclarationForm,
|
|
98287
98432
|
{
|
|
98288
98433
|
initial: draftFromDeclaration(decl),
|
|
@@ -98340,9 +98485,9 @@ function VariablesOtherCompositions({
|
|
|
98340
98485
|
[editInFile]
|
|
98341
98486
|
);
|
|
98342
98487
|
if (groups.length === 0) return null;
|
|
98343
|
-
return /* @__PURE__ */
|
|
98344
|
-
/* @__PURE__ */
|
|
98345
|
-
groups.map((group) => /* @__PURE__ */
|
|
98488
|
+
return /* @__PURE__ */ jsxs195("div", { className: "space-y-3 border-t border-neutral-800 pt-3", children: [
|
|
98489
|
+
/* @__PURE__ */ jsx245("p", { className: "text-[9px] font-medium uppercase tracking-wider text-neutral-600", children: "Other compositions" }),
|
|
98490
|
+
groups.map((group) => /* @__PURE__ */ jsx245(
|
|
98346
98491
|
CompositionSection,
|
|
98347
98492
|
{
|
|
98348
98493
|
group,
|
|
@@ -98358,7 +98503,7 @@ function VariablesOtherCompositions({
|
|
|
98358
98503
|
|
|
98359
98504
|
// src/components/panels/VariablesPanel.tsx
|
|
98360
98505
|
import { isScalarVariableValue as isScalar } from "@hyperframes/core/variables";
|
|
98361
|
-
import { jsx as
|
|
98506
|
+
import { jsx as jsx246, jsxs as jsxs196 } from "react/jsx-runtime";
|
|
98362
98507
|
function shellSingleQuote(value) {
|
|
98363
98508
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
98364
98509
|
}
|
|
@@ -98374,7 +98519,7 @@ function formatIssue(issue) {
|
|
|
98374
98519
|
}
|
|
98375
98520
|
function ValidationStrip({ issues }) {
|
|
98376
98521
|
if (issues.length === 0) return null;
|
|
98377
|
-
return /* @__PURE__ */
|
|
98522
|
+
return /* @__PURE__ */ jsx246("div", { className: "space-y-1 rounded-lg border border-danger/40 bg-danger/15 p-2", children: issues.map((issue) => /* @__PURE__ */ jsx246("p", { className: "text-[10px] text-danger-ink", children: formatIssue(issue) }, `${issue.kind}:${issue.variableId}`)) });
|
|
98378
98523
|
}
|
|
98379
98524
|
function VariableRow({
|
|
98380
98525
|
decl,
|
|
@@ -98388,11 +98533,11 @@ function VariableRow({
|
|
|
98388
98533
|
onSaveEdit,
|
|
98389
98534
|
onRemove
|
|
98390
98535
|
}) {
|
|
98391
|
-
return /* @__PURE__ */
|
|
98392
|
-
/* @__PURE__ */
|
|
98393
|
-
/* @__PURE__ */
|
|
98394
|
-
/* @__PURE__ */
|
|
98395
|
-
unused && /* @__PURE__ */
|
|
98536
|
+
return /* @__PURE__ */ jsxs196("div", { className: "space-y-1.5 rounded-lg border border-neutral-800/70 p-2", children: [
|
|
98537
|
+
/* @__PURE__ */ jsxs196("div", { className: "flex items-center gap-1.5", children: [
|
|
98538
|
+
/* @__PURE__ */ jsx246("span", { className: "truncate text-[10px] font-medium text-neutral-300", children: decl.label }),
|
|
98539
|
+
/* @__PURE__ */ jsx246("span", { className: "rounded-sm bg-neutral-800 px-1 py-px font-mono text-[8px] text-neutral-500", children: decl.type }),
|
|
98540
|
+
unused && /* @__PURE__ */ jsx246(
|
|
98396
98541
|
"span",
|
|
98397
98542
|
{
|
|
98398
98543
|
className: "rounded-sm bg-amber-500/15 px-1 py-px text-[8px] text-warning-ink",
|
|
@@ -98400,9 +98545,9 @@ function VariableRow({
|
|
|
98400
98545
|
children: "unused"
|
|
98401
98546
|
}
|
|
98402
98547
|
),
|
|
98403
|
-
overridden && /* @__PURE__ */
|
|
98404
|
-
/* @__PURE__ */
|
|
98405
|
-
overridden && isScalar(value) && /* @__PURE__ */
|
|
98548
|
+
overridden && /* @__PURE__ */ jsx246("span", { className: "h-1.5 w-1.5 rounded-full bg-studio-accent" }),
|
|
98549
|
+
/* @__PURE__ */ jsxs196("span", { className: "ml-auto flex items-center gap-1", children: [
|
|
98550
|
+
overridden && isScalar(value) && /* @__PURE__ */ jsx246(
|
|
98406
98551
|
RowAction,
|
|
98407
98552
|
{
|
|
98408
98553
|
label: "Set default",
|
|
@@ -98410,12 +98555,12 @@ function VariableRow({
|
|
|
98410
98555
|
onClick: () => onSetDefault(value)
|
|
98411
98556
|
}
|
|
98412
98557
|
),
|
|
98413
|
-
/* @__PURE__ */
|
|
98414
|
-
/* @__PURE__ */
|
|
98558
|
+
/* @__PURE__ */ jsx246(RowAction, { label: "Edit", title: "Edit declaration", onClick: onToggleEdit }),
|
|
98559
|
+
/* @__PURE__ */ jsx246(RowAction, { label: "\u2715", title: "Remove declaration", danger: true, onClick: onRemove })
|
|
98415
98560
|
] })
|
|
98416
98561
|
] }),
|
|
98417
|
-
decl.description && /* @__PURE__ */
|
|
98418
|
-
editing ? /* @__PURE__ */
|
|
98562
|
+
decl.description && /* @__PURE__ */ jsx246("p", { className: "text-[9px] text-neutral-500", children: decl.description }),
|
|
98563
|
+
editing ? /* @__PURE__ */ jsx246(
|
|
98419
98564
|
DeclarationForm,
|
|
98420
98565
|
{
|
|
98421
98566
|
initial: draftFromDeclaration(decl),
|
|
@@ -98423,7 +98568,7 @@ function VariableRow({
|
|
|
98423
98568
|
onSubmit: (edited) => onSaveEdit(mergeDeclarationEdit(decl, edited)),
|
|
98424
98569
|
onCancel: onToggleEdit
|
|
98425
98570
|
}
|
|
98426
|
-
) : /* @__PURE__ */
|
|
98571
|
+
) : /* @__PURE__ */ jsx246(PreviewValueControl, { decl, value, onCommit: onCommitPreview })
|
|
98427
98572
|
] });
|
|
98428
98573
|
}
|
|
98429
98574
|
function UndeclaredReads({
|
|
@@ -98431,11 +98576,11 @@ function UndeclaredReads({
|
|
|
98431
98576
|
onDeclare
|
|
98432
98577
|
}) {
|
|
98433
98578
|
if (!usage || usage.undeclaredReads.length === 0) return null;
|
|
98434
|
-
return /* @__PURE__ */
|
|
98435
|
-
/* @__PURE__ */
|
|
98436
|
-
usage.undeclaredReads.map((id) => /* @__PURE__ */
|
|
98437
|
-
/* @__PURE__ */
|
|
98438
|
-
/* @__PURE__ */
|
|
98579
|
+
return /* @__PURE__ */ jsxs196("div", { className: "space-y-1 rounded-lg border border-neutral-800/70 bg-neutral-900/40 p-2", children: [
|
|
98580
|
+
/* @__PURE__ */ jsx246("p", { className: "text-[9px] font-medium uppercase tracking-wider text-neutral-500", children: "Read by scripts, not declared" }),
|
|
98581
|
+
usage.undeclaredReads.map((id) => /* @__PURE__ */ jsxs196("div", { className: "flex items-center gap-2", children: [
|
|
98582
|
+
/* @__PURE__ */ jsx246("code", { className: "font-mono text-[10px] text-neutral-400", children: id }),
|
|
98583
|
+
/* @__PURE__ */ jsx246(
|
|
98439
98584
|
RowAction,
|
|
98440
98585
|
{
|
|
98441
98586
|
label: "Declare",
|
|
@@ -98451,10 +98596,10 @@ function PreviewModeHeader({
|
|
|
98451
98596
|
onReset
|
|
98452
98597
|
}) {
|
|
98453
98598
|
const hasOverrides = overrideCount > 0;
|
|
98454
|
-
return /* @__PURE__ */
|
|
98455
|
-
/* @__PURE__ */
|
|
98456
|
-
/* @__PURE__ */
|
|
98457
|
-
/* @__PURE__ */
|
|
98599
|
+
return /* @__PURE__ */ jsxs196("div", { className: "flex items-center justify-between border-b border-neutral-800 px-3 py-2", children: [
|
|
98600
|
+
/* @__PURE__ */ jsxs196("div", { className: "flex items-center gap-2", children: [
|
|
98601
|
+
/* @__PURE__ */ jsx246("span", { className: "text-[11px] font-semibold text-neutral-200", children: "Variables" }),
|
|
98602
|
+
/* @__PURE__ */ jsx246(
|
|
98458
98603
|
"span",
|
|
98459
98604
|
{
|
|
98460
98605
|
className: `rounded-full px-2 py-0.5 text-[9px] font-medium ${hasOverrides ? "bg-studio-accent/20 text-accent-ink" : "bg-neutral-800 text-neutral-500"}`,
|
|
@@ -98462,7 +98607,7 @@ function PreviewModeHeader({
|
|
|
98462
98607
|
}
|
|
98463
98608
|
)
|
|
98464
98609
|
] }),
|
|
98465
|
-
hasOverrides && /* @__PURE__ */
|
|
98610
|
+
hasOverrides && /* @__PURE__ */ jsx246(
|
|
98466
98611
|
"button",
|
|
98467
98612
|
{
|
|
98468
98613
|
type: "button",
|
|
@@ -98480,11 +98625,11 @@ function HandoffFooter({
|
|
|
98480
98625
|
}) {
|
|
98481
98626
|
const json = JSON.stringify(effectiveValues);
|
|
98482
98627
|
const command = `npx hyperframes render ${shellSingleQuote(compPath)} --variables ${shellSingleQuote(json)}`;
|
|
98483
|
-
return /* @__PURE__ */
|
|
98484
|
-
/* @__PURE__ */
|
|
98485
|
-
/* @__PURE__ */
|
|
98486
|
-
/* @__PURE__ */
|
|
98487
|
-
/* @__PURE__ */
|
|
98628
|
+
return /* @__PURE__ */ jsxs196("div", { className: "space-y-1.5 rounded-lg border border-neutral-800/70 bg-neutral-900/40 p-2", children: [
|
|
98629
|
+
/* @__PURE__ */ jsx246("p", { className: "text-[9px] font-medium uppercase tracking-wider text-neutral-500", children: "Use this template" }),
|
|
98630
|
+
/* @__PURE__ */ jsx246("code", { className: "block truncate font-mono text-[9px] text-neutral-500", title: command, children: command }),
|
|
98631
|
+
/* @__PURE__ */ jsxs196("div", { className: "flex items-center gap-2", children: [
|
|
98632
|
+
/* @__PURE__ */ jsx246(
|
|
98488
98633
|
RowAction,
|
|
98489
98634
|
{
|
|
98490
98635
|
label: "Copy render command",
|
|
@@ -98492,7 +98637,7 @@ function HandoffFooter({
|
|
|
98492
98637
|
onClick: () => onCopy(command, "Render command")
|
|
98493
98638
|
}
|
|
98494
98639
|
),
|
|
98495
|
-
/* @__PURE__ */
|
|
98640
|
+
/* @__PURE__ */ jsx246(
|
|
98496
98641
|
RowAction,
|
|
98497
98642
|
{
|
|
98498
98643
|
label: "Copy values JSON",
|
|
@@ -98503,15 +98648,15 @@ function HandoffFooter({
|
|
|
98503
98648
|
] })
|
|
98504
98649
|
] });
|
|
98505
98650
|
}
|
|
98506
|
-
var EMPTY_STATE = /* @__PURE__ */
|
|
98651
|
+
var EMPTY_STATE = /* @__PURE__ */ jsxs196("p", { className: "text-[10px] leading-relaxed text-neutral-500", children: [
|
|
98507
98652
|
"No variables declared. Variables make parts of this composition dynamic. Declare them here (or in ",
|
|
98508
|
-
/* @__PURE__ */
|
|
98653
|
+
/* @__PURE__ */ jsx246("code", { className: "font-mono", children: "data-composition-variables" }),
|
|
98509
98654
|
"), read them with",
|
|
98510
98655
|
" ",
|
|
98511
|
-
/* @__PURE__ */
|
|
98656
|
+
/* @__PURE__ */ jsx246("code", { className: "font-mono", children: "getVariables()" }),
|
|
98512
98657
|
", and pass values at render time with",
|
|
98513
98658
|
" ",
|
|
98514
|
-
/* @__PURE__ */
|
|
98659
|
+
/* @__PURE__ */ jsx246("code", { className: "font-mono", children: "--variables" }),
|
|
98515
98660
|
"."
|
|
98516
98661
|
] });
|
|
98517
98662
|
var VariablesPanel = memo60(function VariablesPanel2({
|
|
@@ -98528,7 +98673,7 @@ var VariablesPanel = memo60(function VariablesPanel2({
|
|
|
98528
98673
|
const previewValues = usePreviewVariablesStore((s) => s.values);
|
|
98529
98674
|
const setPreviewValues = usePreviewVariablesStore((s) => s.setValues);
|
|
98530
98675
|
const [revision, setRevision] = useState160(0);
|
|
98531
|
-
|
|
98676
|
+
useEffect155(() => {
|
|
98532
98677
|
if (!sdkSession) return;
|
|
98533
98678
|
return sdkSession.on("change", () => setRevision((r) => r + 1));
|
|
98534
98679
|
}, [sdkSession]);
|
|
@@ -98695,18 +98840,18 @@ var VariablesPanel = memo60(function VariablesPanel2({
|
|
|
98695
98840
|
);
|
|
98696
98841
|
const bindableSelection = domEditSelection?.hfId && domEditSelection.sourceFile === (activeCompPath ?? "index.html") ? domEditSelection : null;
|
|
98697
98842
|
if (!sdkSession) {
|
|
98698
|
-
return /* @__PURE__ */
|
|
98843
|
+
return /* @__PURE__ */ jsx246("div", { className: "flex h-full items-center justify-center px-6 text-center", children: /* @__PURE__ */ jsx246("p", { className: "text-xs text-neutral-500", children: "Open a composition to manage its variables." }) });
|
|
98699
98844
|
}
|
|
98700
|
-
return /* @__PURE__ */
|
|
98701
|
-
/* @__PURE__ */
|
|
98845
|
+
return /* @__PURE__ */ jsxs196("div", { className: "flex h-full flex-col", children: [
|
|
98846
|
+
/* @__PURE__ */ jsx246(
|
|
98702
98847
|
PreviewModeHeader,
|
|
98703
98848
|
{
|
|
98704
98849
|
overrideCount: previewValues ? Object.keys(previewValues).length : 0,
|
|
98705
98850
|
onReset: resetPreview
|
|
98706
98851
|
}
|
|
98707
98852
|
),
|
|
98708
|
-
/* @__PURE__ */
|
|
98709
|
-
bindableSelection && /* @__PURE__ */
|
|
98853
|
+
/* @__PURE__ */ jsxs196("div", { className: "flex-1 space-y-3 overflow-y-auto p-3", children: [
|
|
98854
|
+
bindableSelection && /* @__PURE__ */ jsx246(
|
|
98710
98855
|
VariablesBindElement,
|
|
98711
98856
|
{
|
|
98712
98857
|
selection: bindableSelection,
|
|
@@ -98715,9 +98860,9 @@ var VariablesPanel = memo60(function VariablesPanel2({
|
|
|
98715
98860
|
},
|
|
98716
98861
|
bindableSelection.hfId
|
|
98717
98862
|
),
|
|
98718
|
-
/* @__PURE__ */
|
|
98863
|
+
/* @__PURE__ */ jsx246(ValidationStrip, { issues }),
|
|
98719
98864
|
declarations.length === 0 && !addOpen && EMPTY_STATE,
|
|
98720
|
-
declarations.map((decl) => /* @__PURE__ */
|
|
98865
|
+
declarations.map((decl) => /* @__PURE__ */ jsx246(
|
|
98721
98866
|
VariableRow,
|
|
98722
98867
|
{
|
|
98723
98868
|
decl,
|
|
@@ -98733,15 +98878,15 @@ var VariablesPanel = memo60(function VariablesPanel2({
|
|
|
98733
98878
|
},
|
|
98734
98879
|
decl.id
|
|
98735
98880
|
)),
|
|
98736
|
-
/* @__PURE__ */
|
|
98881
|
+
/* @__PURE__ */ jsx246(
|
|
98737
98882
|
UndeclaredReads,
|
|
98738
98883
|
{
|
|
98739
98884
|
usage,
|
|
98740
98885
|
onDeclare: (id) => handleAdd({ id, type: "string", label: id, default: "" })
|
|
98741
98886
|
}
|
|
98742
98887
|
),
|
|
98743
|
-
usage?.scanIncomplete && /* @__PURE__ */
|
|
98744
|
-
declarations.length > 0 && /* @__PURE__ */
|
|
98888
|
+
usage?.scanIncomplete && /* @__PURE__ */ jsx246("p", { className: "text-[9px] text-neutral-600", children: "Scripts access variables dynamically, so usage info may be incomplete." }),
|
|
98889
|
+
declarations.length > 0 && /* @__PURE__ */ jsx246(
|
|
98745
98890
|
HandoffFooter,
|
|
98746
98891
|
{
|
|
98747
98892
|
effectiveValues,
|
|
@@ -98749,7 +98894,7 @@ var VariablesPanel = memo60(function VariablesPanel2({
|
|
|
98749
98894
|
onCopy: copyToClipboard
|
|
98750
98895
|
}
|
|
98751
98896
|
),
|
|
98752
|
-
addOpen ? /* @__PURE__ */
|
|
98897
|
+
addOpen ? /* @__PURE__ */ jsx246(
|
|
98753
98898
|
DeclarationForm,
|
|
98754
98899
|
{
|
|
98755
98900
|
initial: EMPTY_DRAFT,
|
|
@@ -98757,7 +98902,7 @@ var VariablesPanel = memo60(function VariablesPanel2({
|
|
|
98757
98902
|
onSubmit: handleAdd,
|
|
98758
98903
|
onCancel: () => setAddOpen(false)
|
|
98759
98904
|
}
|
|
98760
|
-
) : /* @__PURE__ */
|
|
98905
|
+
) : /* @__PURE__ */ jsx246(
|
|
98761
98906
|
"button",
|
|
98762
98907
|
{
|
|
98763
98908
|
type: "button",
|
|
@@ -98766,7 +98911,7 @@ var VariablesPanel = memo60(function VariablesPanel2({
|
|
|
98766
98911
|
children: "+ Add variable"
|
|
98767
98912
|
}
|
|
98768
98913
|
),
|
|
98769
|
-
/* @__PURE__ */
|
|
98914
|
+
/* @__PURE__ */ jsx246(
|
|
98770
98915
|
VariablesOtherCompositions,
|
|
98771
98916
|
{
|
|
98772
98917
|
compositionPaths: compositions,
|
|
@@ -98783,7 +98928,7 @@ var VariablesPanel = memo60(function VariablesPanel2({
|
|
|
98783
98928
|
});
|
|
98784
98929
|
|
|
98785
98930
|
// src/components/panels/MotionBlurPanel.tsx
|
|
98786
|
-
import { memo as memo61, useCallback as useCallback185, useEffect as
|
|
98931
|
+
import { memo as memo61, useCallback as useCallback185, useEffect as useEffect156, useMemo as useMemo87, useReducer as useReducer2, useRef as useRef185, useState as useState161 } from "react";
|
|
98787
98932
|
|
|
98788
98933
|
// src/components/panels/motionBlurPanelModel.ts
|
|
98789
98934
|
import {
|
|
@@ -98845,7 +98990,7 @@ function patchForLevel(level) {
|
|
|
98845
98990
|
}
|
|
98846
98991
|
|
|
98847
98992
|
// src/components/panels/MotionBlurPanel.tsx
|
|
98848
|
-
import { jsx as
|
|
98993
|
+
import { jsx as jsx247, jsxs as jsxs197 } from "react/jsx-runtime";
|
|
98849
98994
|
var POLL_MS2 = 500;
|
|
98850
98995
|
var SETTLE_MS = 1500;
|
|
98851
98996
|
var NothingToChange = class extends Error {
|
|
@@ -98853,7 +98998,7 @@ var NothingToChange = class extends Error {
|
|
|
98853
98998
|
function useLivePreviewAttributes(previewIframeRef, refreshKey) {
|
|
98854
98999
|
const [live, setLive] = useState161(null);
|
|
98855
99000
|
const holdUntil = useRef185(0);
|
|
98856
|
-
|
|
99001
|
+
useEffect156(() => {
|
|
98857
99002
|
const read2 = () => {
|
|
98858
99003
|
const found = readPreviewRootAttributes(previewIframeRef.current);
|
|
98859
99004
|
if (found && Date.now() >= holdUntil.current) {
|
|
@@ -98881,7 +99026,7 @@ var MotionBlurPanel = memo61(function MotionBlurPanel2({
|
|
|
98881
99026
|
const { readProjectFile, writeProjectFile, compositions } = useFileManagerContext();
|
|
98882
99027
|
const [, rerender] = useReducer2((n) => n + 1, 0);
|
|
98883
99028
|
const [live, hold] = useLivePreviewAttributes(previewIframeRef, refreshKey);
|
|
98884
|
-
|
|
99029
|
+
useEffect156(() => sdkSession?.on("change", rerender), [sdkSession]);
|
|
98885
99030
|
const root = sdkSession ? findCompositionRoot(sdkSession.getRootElements()) : null;
|
|
98886
99031
|
const attributes = live ?? root?.attributes ?? null;
|
|
98887
99032
|
const settings = useMemo87(() => attributes ? settingsOf(attributes) : null, [attributes]);
|
|
@@ -98925,13 +99070,13 @@ var MotionBlurPanel = memo61(function MotionBlurPanel2({
|
|
|
98925
99070
|
[attributes, persist2, hold, showToast]
|
|
98926
99071
|
);
|
|
98927
99072
|
if (!settings) {
|
|
98928
|
-
return /* @__PURE__ */
|
|
99073
|
+
return /* @__PURE__ */ jsx247("p", { className: "p-3 text-[10px] leading-relaxed text-neutral-500", children: "Open a composition to set up motion blur." });
|
|
98929
99074
|
}
|
|
98930
99075
|
const locked = !isMain;
|
|
98931
99076
|
const current = locked ? null : levelOf(settings);
|
|
98932
|
-
return /* @__PURE__ */
|
|
98933
|
-
/* @__PURE__ */
|
|
98934
|
-
/* @__PURE__ */
|
|
99077
|
+
return /* @__PURE__ */ jsxs197("div", { className: "flex h-full flex-col gap-3 overflow-y-auto p-3 text-[11px] text-neutral-300", children: [
|
|
99078
|
+
/* @__PURE__ */ jsx247("span", { className: "text-[12px] font-medium text-neutral-100", children: "Motion blur" }),
|
|
99079
|
+
/* @__PURE__ */ jsx247("div", { role: "radiogroup", "aria-label": "Motion blur", className: "flex gap-1.5", children: BLUR_LEVELS.map(({ level, label }) => /* @__PURE__ */ jsx247(
|
|
98935
99080
|
Button,
|
|
98936
99081
|
{
|
|
98937
99082
|
role: "radio",
|
|
@@ -98945,7 +99090,7 @@ var MotionBlurPanel = memo61(function MotionBlurPanel2({
|
|
|
98945
99090
|
},
|
|
98946
99091
|
level
|
|
98947
99092
|
)) }),
|
|
98948
|
-
locked ? /* @__PURE__ */
|
|
99093
|
+
locked ? /* @__PURE__ */ jsx247("p", { className: "text-[10px] leading-relaxed text-amber-400/90", children: "Motion blur is read from the main composition. Open it to change this setting." }) : null
|
|
98949
99094
|
] });
|
|
98950
99095
|
});
|
|
98951
99096
|
|
|
@@ -99066,7 +99211,7 @@ function useSlideshowTabState(params) {
|
|
|
99066
99211
|
|
|
99067
99212
|
// src/components/DesignPanelPromoteProvider.tsx
|
|
99068
99213
|
import { useCallback as useCallback187 } from "react";
|
|
99069
|
-
import { jsx as
|
|
99214
|
+
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
99070
99215
|
function DesignPanelPromoteProvider({
|
|
99071
99216
|
selection,
|
|
99072
99217
|
projectId,
|
|
@@ -99096,7 +99241,7 @@ function DesignPanelPromoteProvider({
|
|
|
99096
99241
|
(error) => showToast(getStudioSaveErrorMessage(error), "error"),
|
|
99097
99242
|
[showToast]
|
|
99098
99243
|
);
|
|
99099
|
-
return /* @__PURE__ */
|
|
99244
|
+
return /* @__PURE__ */ jsx248(
|
|
99100
99245
|
VariablePromoteProvider,
|
|
99101
99246
|
{
|
|
99102
99247
|
session: handle.session,
|
|
@@ -99109,7 +99254,7 @@ function DesignPanelPromoteProvider({
|
|
|
99109
99254
|
}
|
|
99110
99255
|
|
|
99111
99256
|
// src/hooks/useRemoveBackground.ts
|
|
99112
|
-
import { useCallback as useCallback188, useEffect as
|
|
99257
|
+
import { useCallback as useCallback188, useEffect as useEffect157, useRef as useRef186 } from "react";
|
|
99113
99258
|
|
|
99114
99259
|
// src/components/studioMediaJobs.ts
|
|
99115
99260
|
var MEDIA_JOB_RECONNECT_TIMEOUT_MS = 15e3;
|
|
@@ -99216,7 +99361,7 @@ function waitForMediaJob(jobId, onProgress, signal) {
|
|
|
99216
99361
|
// src/hooks/useRemoveBackground.ts
|
|
99217
99362
|
function useRemoveBackground(projectId, refreshFileTree, showToast) {
|
|
99218
99363
|
const abortRef = useRef186(null);
|
|
99219
|
-
|
|
99364
|
+
useEffect157(
|
|
99220
99365
|
() => () => {
|
|
99221
99366
|
abortRef.current?.abort();
|
|
99222
99367
|
},
|
|
@@ -99401,7 +99546,7 @@ function useApplyColorGradingScope(recordEdit, reloadPreview) {
|
|
|
99401
99546
|
}
|
|
99402
99547
|
|
|
99403
99548
|
// src/components/StudioRightPanels.tsx
|
|
99404
|
-
import { Fragment as
|
|
99549
|
+
import { Fragment as Fragment67, jsx as jsx249, jsxs as jsxs198 } from "react/jsx-runtime";
|
|
99405
99550
|
var seekToTime = (t2) => usePlayerStore.getState().requestSeek(t2);
|
|
99406
99551
|
var StudioRightPanels = memo62(function StudioRightPanels2({
|
|
99407
99552
|
activeBlockParams,
|
|
@@ -99530,7 +99675,7 @@ var StudioRightPanels = memo62(function StudioRightPanels2({
|
|
|
99530
99675
|
(animId, duration) => handleGsapConvertToKeyframes(animId, void 0, duration),
|
|
99531
99676
|
[handleGsapConvertToKeyframes]
|
|
99532
99677
|
);
|
|
99533
|
-
const propertyPanel = /* @__PURE__ */
|
|
99678
|
+
const propertyPanel = /* @__PURE__ */ jsx249(
|
|
99534
99679
|
DesignPanelPromoteProvider,
|
|
99535
99680
|
{
|
|
99536
99681
|
selection: domEditGroupSelections.length > 1 ? null : domEditSelection,
|
|
@@ -99542,7 +99687,7 @@ var StudioRightPanels = memo62(function StudioRightPanels2({
|
|
|
99542
99687
|
recordEdit,
|
|
99543
99688
|
reloadPreview,
|
|
99544
99689
|
forceReloadSharedSdkSession: forceReloadSdkSession,
|
|
99545
|
-
children: /* @__PURE__ */
|
|
99690
|
+
children: /* @__PURE__ */ jsx249(
|
|
99546
99691
|
PropertyPanel,
|
|
99547
99692
|
{
|
|
99548
99693
|
projectId,
|
|
@@ -99613,9 +99758,9 @@ var StudioRightPanels = memo62(function StudioRightPanels2({
|
|
|
99613
99758
|
);
|
|
99614
99759
|
let designBody = propertyPanel;
|
|
99615
99760
|
if (captionEditMode) {
|
|
99616
|
-
designBody = /* @__PURE__ */
|
|
99761
|
+
designBody = /* @__PURE__ */ jsx249(CaptionPropertyPanel, { iframeRef: previewIframeRef });
|
|
99617
99762
|
} else if (activeBlockParams) {
|
|
99618
|
-
designBody = /* @__PURE__ */
|
|
99763
|
+
designBody = /* @__PURE__ */ jsx249(
|
|
99619
99764
|
BlockParamsPanel,
|
|
99620
99765
|
{
|
|
99621
99766
|
blockName: activeBlockParams.blockName,
|
|
@@ -99627,18 +99772,18 @@ var StudioRightPanels = memo62(function StudioRightPanels2({
|
|
|
99627
99772
|
}
|
|
99628
99773
|
);
|
|
99629
99774
|
}
|
|
99630
|
-
return /* @__PURE__ */
|
|
99631
|
-
/* @__PURE__ */
|
|
99632
|
-
/* @__PURE__ */
|
|
99633
|
-
/* @__PURE__ */
|
|
99775
|
+
return /* @__PURE__ */ jsxs198(Fragment67, { children: [
|
|
99776
|
+
/* @__PURE__ */ jsx249(Dock.Panel, { id: "design", children: designBody }),
|
|
99777
|
+
/* @__PURE__ */ jsx249(Dock.Panel, { id: "layers", children: /* @__PURE__ */ jsx249(LayersPanel, {}) }),
|
|
99778
|
+
/* @__PURE__ */ jsx249(
|
|
99634
99779
|
Dock.Panel,
|
|
99635
99780
|
{
|
|
99636
99781
|
id: "renders",
|
|
99637
99782
|
title: renderJobs.length > 0 ? `Renders (${renderJobs.length})` : void 0,
|
|
99638
|
-
children: /* @__PURE__ */
|
|
99783
|
+
children: /* @__PURE__ */ jsx249(RenderQueuePanel, {})
|
|
99639
99784
|
}
|
|
99640
99785
|
),
|
|
99641
|
-
/* @__PURE__ */
|
|
99786
|
+
/* @__PURE__ */ jsx249(Dock.Panel, { id: "variables", children: /* @__PURE__ */ jsx249(
|
|
99642
99787
|
VariablesPanel,
|
|
99643
99788
|
{
|
|
99644
99789
|
sdkSession,
|
|
@@ -99647,7 +99792,7 @@ var StudioRightPanels = memo62(function StudioRightPanels2({
|
|
|
99647
99792
|
recordEdit
|
|
99648
99793
|
}
|
|
99649
99794
|
) }),
|
|
99650
|
-
/* @__PURE__ */
|
|
99795
|
+
/* @__PURE__ */ jsx249(Dock.Panel, { id: "motionBlur", children: /* @__PURE__ */ jsx249(
|
|
99651
99796
|
MotionBlurPanel,
|
|
99652
99797
|
{
|
|
99653
99798
|
sdkSession,
|
|
@@ -99656,7 +99801,7 @@ var StudioRightPanels = memo62(function StudioRightPanels2({
|
|
|
99656
99801
|
recordEdit
|
|
99657
99802
|
}
|
|
99658
99803
|
) }),
|
|
99659
|
-
/* @__PURE__ */
|
|
99804
|
+
/* @__PURE__ */ jsx249(Dock.Panel, { id: "slideshow", children: /* @__PURE__ */ jsx249(
|
|
99660
99805
|
SlideshowPanel,
|
|
99661
99806
|
{
|
|
99662
99807
|
scenes: slideshowScenes,
|
|
@@ -99668,21 +99813,21 @@ var StudioRightPanels = memo62(function StudioRightPanels2({
|
|
|
99668
99813
|
});
|
|
99669
99814
|
|
|
99670
99815
|
// src/hooks/useStudioSidePanels.tsx
|
|
99671
|
-
import { Fragment as
|
|
99816
|
+
import { Fragment as Fragment68, jsx as jsx250, jsxs as jsxs199 } from "react/jsx-runtime";
|
|
99672
99817
|
function useStudioSidePanels(left, right, projectId) {
|
|
99673
99818
|
const stableLeft = useStableHandlers(left, projectId);
|
|
99674
99819
|
const stableRight = useStableHandlers(right, projectId);
|
|
99675
99820
|
return useMemo89(
|
|
99676
|
-
() => /* @__PURE__ */
|
|
99677
|
-
/* @__PURE__ */
|
|
99678
|
-
/* @__PURE__ */
|
|
99821
|
+
() => /* @__PURE__ */ jsxs199(Fragment68, { children: [
|
|
99822
|
+
/* @__PURE__ */ jsx250(StudioLeftPanels, { ...stableLeft }),
|
|
99823
|
+
/* @__PURE__ */ jsx250(StudioRightPanels, { ...stableRight })
|
|
99679
99824
|
] }),
|
|
99680
99825
|
[stableLeft, stableRight]
|
|
99681
99826
|
);
|
|
99682
99827
|
}
|
|
99683
99828
|
|
|
99684
99829
|
// src/components/TimelineToolbar.tsx
|
|
99685
|
-
import { memo as memo63, useEffect as
|
|
99830
|
+
import { memo as memo63, useEffect as useEffect159, useRef as useRef187 } from "react";
|
|
99686
99831
|
import {
|
|
99687
99832
|
ArrowsOutLineHorizontal,
|
|
99688
99833
|
FrameCorners as FrameCorners2,
|
|
@@ -99693,7 +99838,7 @@ import {
|
|
|
99693
99838
|
} from "@phosphor-icons/react";
|
|
99694
99839
|
|
|
99695
99840
|
// src/hooks/useKeyframeKeyboard.ts
|
|
99696
|
-
import { useEffect as
|
|
99841
|
+
import { useEffect as useEffect158, useCallback as useCallback191 } from "react";
|
|
99697
99842
|
function useKeyframeKeyboard({ enabled, onAddKeyframe }) {
|
|
99698
99843
|
const handler = useCallback191(
|
|
99699
99844
|
(e) => {
|
|
@@ -99707,7 +99852,7 @@ function useKeyframeKeyboard({ enabled, onAddKeyframe }) {
|
|
|
99707
99852
|
},
|
|
99708
99853
|
[enabled, onAddKeyframe]
|
|
99709
99854
|
);
|
|
99710
|
-
|
|
99855
|
+
useEffect158(() => {
|
|
99711
99856
|
if (!enabled) return;
|
|
99712
99857
|
window.addEventListener("keydown", handler, { capture: true });
|
|
99713
99858
|
return () => window.removeEventListener("keydown", handler, { capture: true });
|
|
@@ -99715,9 +99860,9 @@ function useKeyframeKeyboard({ enabled, onAddKeyframe }) {
|
|
|
99715
99860
|
}
|
|
99716
99861
|
|
|
99717
99862
|
// src/components/icons/AudioMetersIcon.tsx
|
|
99718
|
-
import { jsx as
|
|
99863
|
+
import { jsx as jsx251 } from "react/jsx-runtime";
|
|
99719
99864
|
function AudioMetersIcon({ size = 16 }) {
|
|
99720
|
-
return /* @__PURE__ */
|
|
99865
|
+
return /* @__PURE__ */ jsx251(
|
|
99721
99866
|
"svg",
|
|
99722
99867
|
{
|
|
99723
99868
|
width: size,
|
|
@@ -99728,15 +99873,15 @@ function AudioMetersIcon({ size = 16 }) {
|
|
|
99728
99873
|
strokeWidth: 1.5,
|
|
99729
99874
|
strokeLinecap: "round",
|
|
99730
99875
|
"aria-hidden": "true",
|
|
99731
|
-
children: /* @__PURE__ */
|
|
99876
|
+
children: /* @__PURE__ */ jsx251("path", { d: "M2.5 13h2m-2-3h2M7 13h2m-2-3h2m-2-3h2m-2-3h2M11.5 13h2m-2-3h2m-2-3h2" })
|
|
99732
99877
|
}
|
|
99733
99878
|
);
|
|
99734
99879
|
}
|
|
99735
99880
|
|
|
99736
99881
|
// src/components/icons/RippleEditIcon.tsx
|
|
99737
|
-
import { jsx as
|
|
99882
|
+
import { jsx as jsx252, jsxs as jsxs200 } from "react/jsx-runtime";
|
|
99738
99883
|
function RippleEditIcon({ size = 16 }) {
|
|
99739
|
-
return /* @__PURE__ */
|
|
99884
|
+
return /* @__PURE__ */ jsxs200(
|
|
99740
99885
|
"svg",
|
|
99741
99886
|
{
|
|
99742
99887
|
width: size,
|
|
@@ -99749,20 +99894,20 @@ function RippleEditIcon({ size = 16 }) {
|
|
|
99749
99894
|
strokeLinejoin: "round",
|
|
99750
99895
|
"aria-hidden": "true",
|
|
99751
99896
|
children: [
|
|
99752
|
-
/* @__PURE__ */
|
|
99753
|
-
/* @__PURE__ */
|
|
99754
|
-
/* @__PURE__ */
|
|
99897
|
+
/* @__PURE__ */ jsx252("rect", { x: "1.5", y: "8", width: "4", height: "5", rx: "0.5" }),
|
|
99898
|
+
/* @__PURE__ */ jsx252("rect", { x: "10.5", y: "8", width: "4", height: "5", rx: "0.5" }),
|
|
99899
|
+
/* @__PURE__ */ jsx252("path", { d: "M13 4H6m2-2L6 4l2 2" })
|
|
99755
99900
|
]
|
|
99756
99901
|
}
|
|
99757
99902
|
);
|
|
99758
99903
|
}
|
|
99759
99904
|
|
|
99760
99905
|
// src/components/TimelineHistoryButtons.tsx
|
|
99761
|
-
import { Fragment as
|
|
99906
|
+
import { Fragment as Fragment69, jsx as jsx253, jsxs as jsxs201 } from "react/jsx-runtime";
|
|
99762
99907
|
function HistoryButton({ action, can, label, onClick }) {
|
|
99763
99908
|
const Icon = action === "undo" ? RotateCcw : RotateCw;
|
|
99764
99909
|
const enabled = Boolean(onClick) && can;
|
|
99765
|
-
return /* @__PURE__ */
|
|
99910
|
+
return /* @__PURE__ */ jsx253(Tooltip, { label: historyTooltipLabel(action, label), children: /* @__PURE__ */ jsx253(
|
|
99766
99911
|
"button",
|
|
99767
99912
|
{
|
|
99768
99913
|
type: "button",
|
|
@@ -99773,7 +99918,7 @@ function HistoryButton({ action, can, label, onClick }) {
|
|
|
99773
99918
|
trackStudioEvent("toolbar_action", { action });
|
|
99774
99919
|
void onClick?.();
|
|
99775
99920
|
},
|
|
99776
|
-
children: /* @__PURE__ */
|
|
99921
|
+
children: /* @__PURE__ */ jsx253(Icon, { size: 16 })
|
|
99777
99922
|
}
|
|
99778
99923
|
) });
|
|
99779
99924
|
}
|
|
@@ -99781,8 +99926,8 @@ function TimelineHistoryButtons(props) {
|
|
|
99781
99926
|
const shell = useStudioShellContextOptional();
|
|
99782
99927
|
const onUndo = props.onUndo ?? shell?.handleUndo;
|
|
99783
99928
|
const onRedo = props.onRedo ?? shell?.handleRedo;
|
|
99784
|
-
return /* @__PURE__ */
|
|
99785
|
-
/* @__PURE__ */
|
|
99929
|
+
return /* @__PURE__ */ jsxs201(Fragment69, { children: [
|
|
99930
|
+
/* @__PURE__ */ jsx253(
|
|
99786
99931
|
HistoryButton,
|
|
99787
99932
|
{
|
|
99788
99933
|
action: "undo",
|
|
@@ -99791,7 +99936,7 @@ function TimelineHistoryButtons(props) {
|
|
|
99791
99936
|
onClick: onUndo
|
|
99792
99937
|
}
|
|
99793
99938
|
),
|
|
99794
|
-
/* @__PURE__ */
|
|
99939
|
+
/* @__PURE__ */ jsx253(
|
|
99795
99940
|
HistoryButton,
|
|
99796
99941
|
{
|
|
99797
99942
|
action: "redo",
|
|
@@ -99805,9 +99950,9 @@ function TimelineHistoryButtons(props) {
|
|
|
99805
99950
|
|
|
99806
99951
|
// src/components/TimelineToolPicker.tsx
|
|
99807
99952
|
import { ArrowLineLeft, ArrowLineRight, CaretDown } from "@phosphor-icons/react";
|
|
99808
|
-
import { jsx as
|
|
99953
|
+
import { jsx as jsx254, jsxs as jsxs202 } from "react/jsx-runtime";
|
|
99809
99954
|
function SelectIcon() {
|
|
99810
|
-
return /* @__PURE__ */
|
|
99955
|
+
return /* @__PURE__ */ jsx254("svg", { width: "16", height: "16", viewBox: "0 0 12 12", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx254("path", { d: "M2 0.5L10 6L6.5 6.5L8.5 11L6.5 11.5L4.5 7L2 9Z" }) });
|
|
99811
99956
|
}
|
|
99812
99957
|
function TimelineToolPicker({ showSelectAroundPlayhead = true }) {
|
|
99813
99958
|
const activeTool = usePlayerStore((s) => s.activeTool);
|
|
@@ -99816,14 +99961,14 @@ function TimelineToolPicker({ showSelectAroundPlayhead = true }) {
|
|
|
99816
99961
|
{
|
|
99817
99962
|
label: "Select",
|
|
99818
99963
|
shortcut: "V",
|
|
99819
|
-
icon: /* @__PURE__ */
|
|
99964
|
+
icon: /* @__PURE__ */ jsx254(SelectIcon, {}),
|
|
99820
99965
|
active: activeTool === "select",
|
|
99821
99966
|
run: () => store().setActiveTool("select")
|
|
99822
99967
|
},
|
|
99823
99968
|
{
|
|
99824
99969
|
label: "Split",
|
|
99825
99970
|
shortcut: "B",
|
|
99826
|
-
icon: /* @__PURE__ */
|
|
99971
|
+
icon: /* @__PURE__ */ jsx254(Scissors, { size: 16 }),
|
|
99827
99972
|
active: activeTool === "razor",
|
|
99828
99973
|
run: () => store().setActiveTool("razor")
|
|
99829
99974
|
}
|
|
@@ -99833,25 +99978,25 @@ function TimelineToolPicker({ showSelectAroundPlayhead = true }) {
|
|
|
99833
99978
|
{
|
|
99834
99979
|
label: "Select leftward",
|
|
99835
99980
|
shortcut: "[",
|
|
99836
|
-
icon: /* @__PURE__ */
|
|
99981
|
+
icon: /* @__PURE__ */ jsx254(ArrowLineLeft, { size: 16, "aria-hidden": "true" }),
|
|
99837
99982
|
active: false,
|
|
99838
99983
|
run: () => store().selectLeftward()
|
|
99839
99984
|
},
|
|
99840
99985
|
{
|
|
99841
99986
|
label: "Select rightward",
|
|
99842
99987
|
shortcut: "]",
|
|
99843
|
-
icon: /* @__PURE__ */
|
|
99988
|
+
icon: /* @__PURE__ */ jsx254(ArrowLineRight, { size: 16, "aria-hidden": "true" }),
|
|
99844
99989
|
active: false,
|
|
99845
99990
|
run: () => store().selectRightward()
|
|
99846
99991
|
}
|
|
99847
99992
|
);
|
|
99848
99993
|
}
|
|
99849
99994
|
const current = rows.find((row) => row.active) ?? rows[0];
|
|
99850
|
-
return /* @__PURE__ */
|
|
99995
|
+
return /* @__PURE__ */ jsx254(
|
|
99851
99996
|
Menu,
|
|
99852
99997
|
{
|
|
99853
99998
|
"aria-label": "Timeline tools",
|
|
99854
|
-
trigger: /* @__PURE__ */
|
|
99999
|
+
trigger: /* @__PURE__ */ jsxs202(
|
|
99855
100000
|
"button",
|
|
99856
100001
|
{
|
|
99857
100002
|
type: "button",
|
|
@@ -99859,18 +100004,18 @@ function TimelineToolPicker({ showSelectAroundPlayhead = true }) {
|
|
|
99859
100004
|
className: cn(flatIdle, "gap-0.5"),
|
|
99860
100005
|
children: [
|
|
99861
100006
|
current.icon,
|
|
99862
|
-
/* @__PURE__ */
|
|
100007
|
+
/* @__PURE__ */ jsx254(CaretDown, { size: 10, weight: "bold", "aria-hidden": "true" })
|
|
99863
100008
|
]
|
|
99864
100009
|
}
|
|
99865
100010
|
),
|
|
99866
|
-
children: rows.map((row) => /* @__PURE__ */
|
|
100011
|
+
children: rows.map((row) => /* @__PURE__ */ jsx254(
|
|
99867
100012
|
MenuItem,
|
|
99868
100013
|
{
|
|
99869
100014
|
shortcut: row.shortcut,
|
|
99870
100015
|
onClick: row.run,
|
|
99871
100016
|
"data-active": row.active || void 0,
|
|
99872
100017
|
className: row.active ? "bg-press text-text-0" : void 0,
|
|
99873
|
-
children: /* @__PURE__ */
|
|
100018
|
+
children: /* @__PURE__ */ jsxs202("span", { className: "flex items-center gap-2", children: [
|
|
99874
100019
|
row.icon,
|
|
99875
100020
|
row.label
|
|
99876
100021
|
] })
|
|
@@ -99885,14 +100030,14 @@ function TimelineToolPicker({ showSelectAroundPlayhead = true }) {
|
|
|
99885
100030
|
import { useCallback as useCallback192, useState as useState162 } from "react";
|
|
99886
100031
|
import { createPortal as createPortal16 } from "react-dom";
|
|
99887
100032
|
import { LinkSimple } from "@phosphor-icons/react";
|
|
99888
|
-
import { Fragment as
|
|
100033
|
+
import { Fragment as Fragment70, jsx as jsx255, jsxs as jsxs203 } from "react/jsx-runtime";
|
|
99889
100034
|
function SyncIndicatorMenu({ x, y, onClose }) {
|
|
99890
100035
|
const menuRef = useContextMenuDismiss(onClose);
|
|
99891
100036
|
useMenuKeyboardNav(menuRef);
|
|
99892
100037
|
const visible = useLinkedClipPreferences((s) => s.syncIndicatorsVisible);
|
|
99893
100038
|
const setVisible = useLinkedClipPreferences((s) => s.setSyncIndicatorsVisible);
|
|
99894
100039
|
return createPortal16(
|
|
99895
|
-
/* @__PURE__ */
|
|
100040
|
+
/* @__PURE__ */ jsx255(
|
|
99896
100041
|
"div",
|
|
99897
100042
|
{
|
|
99898
100043
|
ref: menuRef,
|
|
@@ -99900,7 +100045,7 @@ function SyncIndicatorMenu({ x, y, onClose }) {
|
|
|
99900
100045
|
"aria-label": "Linked clips",
|
|
99901
100046
|
className: `${menuClasses.panel} fixed z-200 min-w-[200px]`,
|
|
99902
100047
|
style: { left: x, top: y },
|
|
99903
|
-
children: /* @__PURE__ */
|
|
100048
|
+
children: /* @__PURE__ */ jsxs203(
|
|
99904
100049
|
"button",
|
|
99905
100050
|
{
|
|
99906
100051
|
type: "button",
|
|
@@ -99912,7 +100057,7 @@ function SyncIndicatorMenu({ x, y, onClose }) {
|
|
|
99912
100057
|
onClose();
|
|
99913
100058
|
},
|
|
99914
100059
|
children: [
|
|
99915
|
-
/* @__PURE__ */
|
|
100060
|
+
/* @__PURE__ */ jsx255("span", { className: "w-3 text-studio-accent", children: visible ? "\u2713" : "" }),
|
|
99916
100061
|
"Show out-of-sync indicators"
|
|
99917
100062
|
]
|
|
99918
100063
|
}
|
|
@@ -99927,12 +100072,12 @@ function LinkedSelectionToggle() {
|
|
|
99927
100072
|
const setLinkedSelection = useLinkedClipPreferences((s) => s.setLinkedSelection);
|
|
99928
100073
|
const [menuAt, setMenuAt] = useState162(null);
|
|
99929
100074
|
const closeMenu = useCallback192(() => setMenuAt(null), []);
|
|
99930
|
-
return /* @__PURE__ */
|
|
99931
|
-
/* @__PURE__ */
|
|
100075
|
+
return /* @__PURE__ */ jsxs203(Fragment70, { children: [
|
|
100076
|
+
/* @__PURE__ */ jsx255(
|
|
99932
100077
|
Tooltip,
|
|
99933
100078
|
{
|
|
99934
100079
|
label: linkedSelection ? "Linked Selection on: a click selects both halves (\u2325-click for one)" : "Linked Selection off: a click selects one clip",
|
|
99935
|
-
children: /* @__PURE__ */
|
|
100080
|
+
children: /* @__PURE__ */ jsx255(
|
|
99936
100081
|
"button",
|
|
99937
100082
|
{
|
|
99938
100083
|
type: "button",
|
|
@@ -99944,17 +100089,17 @@ function LinkedSelectionToggle() {
|
|
|
99944
100089
|
"aria-label": "Linked Selection",
|
|
99945
100090
|
"aria-pressed": linkedSelection,
|
|
99946
100091
|
className: linkedSelection ? flatActive : flatIdle,
|
|
99947
|
-
children: /* @__PURE__ */
|
|
100092
|
+
children: /* @__PURE__ */ jsx255(LinkSimple, { size: 16, weight: "bold", "aria-hidden": "true" })
|
|
99948
100093
|
}
|
|
99949
100094
|
)
|
|
99950
100095
|
}
|
|
99951
100096
|
),
|
|
99952
|
-
menuAt && /* @__PURE__ */
|
|
100097
|
+
menuAt && /* @__PURE__ */ jsx255(SyncIndicatorMenu, { x: menuAt.x, y: menuAt.y, onClose: closeMenu })
|
|
99953
100098
|
] });
|
|
99954
100099
|
}
|
|
99955
100100
|
|
|
99956
100101
|
// src/components/TimelineToolbar.tsx
|
|
99957
|
-
import { Fragment as
|
|
100102
|
+
import { Fragment as Fragment71, jsx as jsx256, jsxs as jsxs204 } from "react/jsx-runtime";
|
|
99958
100103
|
var NO_KEYFRAME_TOGGLE = {
|
|
99959
100104
|
state: "none",
|
|
99960
100105
|
isMotionPath: false,
|
|
@@ -100059,10 +100204,10 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100059
100204
|
enabled: showKeyframes && Boolean(onToggleKeyframe),
|
|
100060
100205
|
onAddKeyframe: onToggleKeyframe
|
|
100061
100206
|
});
|
|
100062
|
-
|
|
100207
|
+
useEffect159(() => {
|
|
100063
100208
|
if (!showKeyframes) setAutoKeyframeEnabled(false);
|
|
100064
100209
|
}, [showKeyframes, setAutoKeyframeEnabled]);
|
|
100065
|
-
|
|
100210
|
+
useEffect159(() => {
|
|
100066
100211
|
const onKeyDown = (e) => {
|
|
100067
100212
|
if (e.key !== "n" && e.key !== "N") return;
|
|
100068
100213
|
if (e.metaKey || e.ctrlKey || e.altKey) return;
|
|
@@ -100073,13 +100218,13 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100073
100218
|
window.addEventListener("keydown", onKeyDown);
|
|
100074
100219
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
100075
100220
|
}, []);
|
|
100076
|
-
return /* @__PURE__ */
|
|
100077
|
-
/* @__PURE__ */
|
|
100078
|
-
showHistory && /* @__PURE__ */
|
|
100079
|
-
/* @__PURE__ */
|
|
100080
|
-
/* @__PURE__ */
|
|
100081
|
-
/* @__PURE__ */
|
|
100082
|
-
/* @__PURE__ */
|
|
100221
|
+
return /* @__PURE__ */ jsx256("div", { className: "border-b border-neutral-800/60", children: /* @__PURE__ */ jsxs204("div", { className: "flex items-center justify-between px-2 py-0.5", children: [
|
|
100222
|
+
/* @__PURE__ */ jsxs204("div", { className: "flex items-center gap-0.5", children: [
|
|
100223
|
+
showHistory && /* @__PURE__ */ jsx256(TimelineHistoryButtons, { ...history2 }),
|
|
100224
|
+
/* @__PURE__ */ jsx256(TimelineToolPicker, { showSelectAroundPlayhead }),
|
|
100225
|
+
/* @__PURE__ */ jsx256("div", { "aria-hidden": "true", className: "mx-1 h-4 w-px bg-neutral-800" }),
|
|
100226
|
+
/* @__PURE__ */ jsx256(LinkedSelectionToggle, {}),
|
|
100227
|
+
/* @__PURE__ */ jsx256(Tooltip, { label: timelineSnapEnabled ? "Snapping on (N)" : "Snapping off (N)", children: /* @__PURE__ */ jsx256(
|
|
100083
100228
|
"button",
|
|
100084
100229
|
{
|
|
100085
100230
|
type: "button",
|
|
@@ -100087,14 +100232,14 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100087
100232
|
"aria-label": "Toggle timeline snapping",
|
|
100088
100233
|
"aria-pressed": timelineSnapEnabled,
|
|
100089
100234
|
className: timelineSnapEnabled ? flatActive : flatIdle,
|
|
100090
|
-
children: /* @__PURE__ */
|
|
100235
|
+
children: /* @__PURE__ */ jsx256(Magnet, { size: 16, weight: "bold", "aria-hidden": "true" })
|
|
100091
100236
|
}
|
|
100092
100237
|
) }),
|
|
100093
|
-
/* @__PURE__ */
|
|
100238
|
+
/* @__PURE__ */ jsx256(
|
|
100094
100239
|
Tooltip,
|
|
100095
100240
|
{
|
|
100096
100241
|
label: rippleEditEnabled ? "Ripple on: keeps the main track gapless" : "Ripple off: deleting a main-track clip leaves a gap",
|
|
100097
|
-
children: /* @__PURE__ */
|
|
100242
|
+
children: /* @__PURE__ */ jsx256(
|
|
100098
100243
|
"button",
|
|
100099
100244
|
{
|
|
100100
100245
|
type: "button",
|
|
@@ -100102,12 +100247,12 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100102
100247
|
"aria-label": "Toggle ripple edit",
|
|
100103
100248
|
"aria-pressed": rippleEditEnabled,
|
|
100104
100249
|
className: rippleEditEnabled ? flatActive : flatIdle,
|
|
100105
|
-
children: /* @__PURE__ */
|
|
100250
|
+
children: /* @__PURE__ */ jsx256(RippleEditIcon, { size: 16 })
|
|
100106
100251
|
}
|
|
100107
100252
|
)
|
|
100108
100253
|
}
|
|
100109
100254
|
),
|
|
100110
|
-
projectHasAudio && /* @__PURE__ */
|
|
100255
|
+
projectHasAudio && /* @__PURE__ */ jsx256(Tooltip, { label: audioMetersVisible ? "Hide audio meters" : "Show audio meters", children: /* @__PURE__ */ jsx256(
|
|
100111
100256
|
"button",
|
|
100112
100257
|
{
|
|
100113
100258
|
type: "button",
|
|
@@ -100115,15 +100260,15 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100115
100260
|
"aria-label": "Toggle audio meters",
|
|
100116
100261
|
"aria-pressed": audioMetersVisible,
|
|
100117
100262
|
className: audioMetersVisible ? flatActive : flatIdle,
|
|
100118
|
-
children: /* @__PURE__ */
|
|
100263
|
+
children: /* @__PURE__ */ jsx256(AudioMetersIcon, { size: 16 })
|
|
100119
100264
|
}
|
|
100120
100265
|
) }),
|
|
100121
|
-
showKeyframes && /* @__PURE__ */
|
|
100122
|
-
/* @__PURE__ */
|
|
100266
|
+
showKeyframes && /* @__PURE__ */ jsxs204(Fragment71, { children: [
|
|
100267
|
+
/* @__PURE__ */ jsx256(
|
|
100123
100268
|
Tooltip,
|
|
100124
100269
|
{
|
|
100125
100270
|
label: keyframePathEndpoint ? "Motion path endpoints cannot be removed" : !onToggleKeyframe ? "Select an animated element to add keyframes" : keyframeIsMotionPath ? keyframeWillExtend ? "Extend motion path to playhead (K)" : keyframeState === "active" ? "Remove waypoint from motion path (K)" : "Add waypoint to motion path (K)" : keyframeState === "active" ? "Remove keyframe at playhead (K)" : keyframeState === "inactive" ? keyframeWillExtend ? "Add keyframe at playhead, extends animation (K)" : "Add keyframe at playhead (K)" : "Add keyframe (K)",
|
|
100126
|
-
children: /* @__PURE__ */
|
|
100271
|
+
children: /* @__PURE__ */ jsx256(
|
|
100127
100272
|
"button",
|
|
100128
100273
|
{
|
|
100129
100274
|
type: "button",
|
|
@@ -100131,7 +100276,7 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100131
100276
|
onClick: onToggleKeyframe,
|
|
100132
100277
|
"aria-label": keyframePathEndpoint ? "Motion path endpoint" : keyframeIsMotionPath ? keyframeState === "active" ? "Remove motion path waypoint" : keyframeWillExtend ? "Extend motion path to playhead" : "Add motion path waypoint" : keyframeState === "active" ? "Remove keyframe at playhead" : "Add keyframe at playhead",
|
|
100133
100278
|
className: !onToggleKeyframe ? flatDisabled : `${flatBtn} active:scale-[0.98] hover:bg-hover ${keyframeState === "active" ? "text-accent-ink" : keyframeState === "inactive" ? "text-neutral-400 hover:text-accent-ink" : "text-neutral-600 hover:text-neutral-400"}`,
|
|
100134
|
-
children: /* @__PURE__ */
|
|
100279
|
+
children: /* @__PURE__ */ jsx256("svg", { width: "16", height: "16", viewBox: "0 0 10 10", fill: "currentColor", children: keyframeState === "active" ? /* @__PURE__ */ jsx256("path", { d: "M5 0.5L9.5 5L5 9.5L0.5 5Z" }) : /* @__PURE__ */ jsx256(
|
|
100135
100280
|
"path",
|
|
100136
100281
|
{
|
|
100137
100282
|
d: "M5 1.2L8.8 5L5 8.8L1.2 5Z",
|
|
@@ -100144,11 +100289,11 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100144
100289
|
)
|
|
100145
100290
|
}
|
|
100146
100291
|
),
|
|
100147
|
-
/* @__PURE__ */
|
|
100292
|
+
/* @__PURE__ */ jsx256(
|
|
100148
100293
|
Tooltip,
|
|
100149
100294
|
{
|
|
100150
100295
|
label: autoKeyframeEnabled ? "Auto-record manual edits as keyframes (click to turn off)" : "Manual edits will not be recorded as keyframes (click to turn on)",
|
|
100151
|
-
children: /* @__PURE__ */
|
|
100296
|
+
children: /* @__PURE__ */ jsx256(
|
|
100152
100297
|
"button",
|
|
100153
100298
|
{
|
|
100154
100299
|
type: "button",
|
|
@@ -100156,9 +100301,9 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100156
100301
|
"aria-label": "Auto-record manual edits as keyframes",
|
|
100157
100302
|
"aria-pressed": autoKeyframeEnabled,
|
|
100158
100303
|
className: `${flatBtn} active:scale-[0.98] hover:bg-hover ${autoKeyframeEnabled ? "text-danger-ink" : "text-neutral-600 hover:text-neutral-400"}`,
|
|
100159
|
-
children: /* @__PURE__ */
|
|
100160
|
-
/* @__PURE__ */
|
|
100161
|
-
/* @__PURE__ */
|
|
100304
|
+
children: /* @__PURE__ */ jsxs204("svg", { width: "16", height: "16", viewBox: "0 0 10 10", fill: "none", children: [
|
|
100305
|
+
/* @__PURE__ */ jsx256("path", { d: "M5 0.7L9.3 5L5 9.3L0.7 5Z", stroke: "currentColor", strokeWidth: "1" }),
|
|
100306
|
+
/* @__PURE__ */ jsx256(
|
|
100162
100307
|
"circle",
|
|
100163
100308
|
{
|
|
100164
100309
|
cx: "5",
|
|
@@ -100179,11 +100324,11 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100179
100324
|
const el = selectedElementId ? elements.find((e) => (e.key ?? e.id) === selectedElementId) : null;
|
|
100180
100325
|
const splittable = el != null && canSplitElement(el);
|
|
100181
100326
|
const canSplit = splittable && currentTime > el.start && currentTime < el.start + el.duration;
|
|
100182
|
-
return /* @__PURE__ */
|
|
100327
|
+
return /* @__PURE__ */ jsx256(
|
|
100183
100328
|
Tooltip,
|
|
100184
100329
|
{
|
|
100185
100330
|
label: canSplit ? `Split at playhead (${splitShortcut})` : splittable ? "Move the playhead inside the clip to split" : "Select a clip to split",
|
|
100186
|
-
children: /* @__PURE__ */
|
|
100331
|
+
children: /* @__PURE__ */ jsx256(
|
|
100187
100332
|
"button",
|
|
100188
100333
|
{
|
|
100189
100334
|
type: "button",
|
|
@@ -100193,7 +100338,7 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100193
100338
|
if (canSplit && el) onSplitElement(el, currentTime);
|
|
100194
100339
|
},
|
|
100195
100340
|
className: canSplit ? flatIdle : flatDisabled,
|
|
100196
|
-
children: /* @__PURE__ */
|
|
100341
|
+
children: /* @__PURE__ */ jsxs204(
|
|
100197
100342
|
"svg",
|
|
100198
100343
|
{
|
|
100199
100344
|
width: "16",
|
|
@@ -100206,8 +100351,8 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100206
100351
|
strokeLinejoin: "round",
|
|
100207
100352
|
"aria-hidden": "true",
|
|
100208
100353
|
children: [
|
|
100209
|
-
/* @__PURE__ */
|
|
100210
|
-
/* @__PURE__ */
|
|
100354
|
+
/* @__PURE__ */ jsx256("path", { d: "M5 3 L7 3 L7 13 L5 13" }),
|
|
100355
|
+
/* @__PURE__ */ jsx256("path", { d: "M11 3 L9 3 L9 13 L11 13" })
|
|
100211
100356
|
]
|
|
100212
100357
|
}
|
|
100213
100358
|
)
|
|
@@ -100219,11 +100364,11 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100219
100364
|
(() => {
|
|
100220
100365
|
if (!showAddBeat) return null;
|
|
100221
100366
|
const canAdd = beatAnalysisReady && canAddBeatAt(currentTime);
|
|
100222
|
-
return /* @__PURE__ */
|
|
100367
|
+
return /* @__PURE__ */ jsx256(
|
|
100223
100368
|
Tooltip,
|
|
100224
100369
|
{
|
|
100225
100370
|
label: !beatAnalysisReady ? "Add a music track with beat analysis to place beats" : canAdd ? "Add beat at playhead" : "A beat already exists at the playhead",
|
|
100226
|
-
children: /* @__PURE__ */
|
|
100371
|
+
children: /* @__PURE__ */ jsx256(
|
|
100227
100372
|
"button",
|
|
100228
100373
|
{
|
|
100229
100374
|
type: "button",
|
|
@@ -100233,7 +100378,7 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100233
100378
|
if (canAdd) addBeatAtCompositionTime(currentTime);
|
|
100234
100379
|
},
|
|
100235
100380
|
className: canAdd ? `${flatBtn} text-text-2 hover:bg-hover hover:text-accent-ink active:scale-[0.98]` : flatDisabled,
|
|
100236
|
-
children: /* @__PURE__ */
|
|
100381
|
+
children: /* @__PURE__ */ jsx256("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx256(
|
|
100237
100382
|
"path",
|
|
100238
100383
|
{
|
|
100239
100384
|
d: "M21 10C21 12.2091 16.9706 14 12 14M21 10C21 7.79086 16.9706 6 12 6C7.02944 6 3 7.79086 3 10M21 10V16C21 18.2091 16.9706 20 12 20M12 14C7.02944 14 3 12.2091 3 10M12 14V20M3 10V16C3 18.2091 7.02944 20 12 20M7 19.3264V13.3264M17 19.3264V13.3264M12 10L20 4",
|
|
@@ -100249,13 +100394,13 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100249
100394
|
);
|
|
100250
100395
|
})()
|
|
100251
100396
|
] }),
|
|
100252
|
-
/* @__PURE__ */
|
|
100397
|
+
/* @__PURE__ */ jsxs204("div", { className: "flex items-center gap-0.5", children: [
|
|
100253
100398
|
rightActions,
|
|
100254
|
-
/* @__PURE__ */
|
|
100399
|
+
/* @__PURE__ */ jsx256(
|
|
100255
100400
|
Tooltip,
|
|
100256
100401
|
{
|
|
100257
100402
|
label: thumbnailsVisible ? "Hide thumbnails: labels only" : "Show thumbnails: posters stay visible; richer previews appear on interaction",
|
|
100258
|
-
children: /* @__PURE__ */
|
|
100403
|
+
children: /* @__PURE__ */ jsx256(
|
|
100259
100404
|
"button",
|
|
100260
100405
|
{
|
|
100261
100406
|
type: "button",
|
|
@@ -100263,16 +100408,16 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100263
100408
|
"aria-pressed": thumbnailsVisible,
|
|
100264
100409
|
onClick: () => setThumbnailMode(thumbnailsVisible ? "hidden" : "adaptive"),
|
|
100265
100410
|
className: `h-7 px-2 rounded-md text-[11px] font-medium transition-colors ${thumbnailsVisible ? "bg-studio-accent/10 text-accent-ink" : "text-neutral-400 hover:bg-hover hover:text-neutral-200"}`,
|
|
100266
|
-
children: /* @__PURE__ */
|
|
100411
|
+
children: /* @__PURE__ */ jsx256(Image3, { size: 16, "aria-hidden": "true" })
|
|
100267
100412
|
}
|
|
100268
100413
|
)
|
|
100269
100414
|
}
|
|
100270
100415
|
),
|
|
100271
|
-
/* @__PURE__ */
|
|
100416
|
+
/* @__PURE__ */ jsx256(
|
|
100272
100417
|
Tooltip,
|
|
100273
100418
|
{
|
|
100274
100419
|
label: canZoomSelection ? `Zoom to selected clips (${ZOOM_SELECTION_SHORTCUT_HINT})` : "Select a clip to zoom the timeline",
|
|
100275
|
-
children: /* @__PURE__ */
|
|
100420
|
+
children: /* @__PURE__ */ jsx256(
|
|
100276
100421
|
"button",
|
|
100277
100422
|
{
|
|
100278
100423
|
type: "button",
|
|
@@ -100280,12 +100425,12 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100280
100425
|
"aria-label": canZoomSelection ? "Zoom to selected clips" : "Select a clip to zoom the timeline",
|
|
100281
100426
|
onClick: () => zoomTimelineToSelectedClips(),
|
|
100282
100427
|
className: canZoomSelection ? flatIdle : flatDisabled,
|
|
100283
|
-
children: /* @__PURE__ */
|
|
100428
|
+
children: /* @__PURE__ */ jsx256(FrameCorners2, { size: 16, "aria-hidden": "true" })
|
|
100284
100429
|
}
|
|
100285
100430
|
)
|
|
100286
100431
|
}
|
|
100287
100432
|
),
|
|
100288
|
-
/* @__PURE__ */
|
|
100433
|
+
/* @__PURE__ */ jsx256(Tooltip, { label: "Fit timeline to width", children: /* @__PURE__ */ jsx256(
|
|
100289
100434
|
"button",
|
|
100290
100435
|
{
|
|
100291
100436
|
type: "button",
|
|
@@ -100293,20 +100438,20 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100293
100438
|
"aria-label": "Fit timeline to width",
|
|
100294
100439
|
"aria-pressed": zoomMode === "fit",
|
|
100295
100440
|
className: `h-7 px-2 rounded-md text-[11px] font-medium transition-colors ${zoomMode === "fit" ? "bg-studio-accent/10 text-accent-ink" : "text-neutral-400 hover:bg-hover hover:text-neutral-200"}`,
|
|
100296
|
-
children: /* @__PURE__ */
|
|
100441
|
+
children: /* @__PURE__ */ jsx256(ArrowsOutLineHorizontal, { size: 16, "aria-hidden": "true" })
|
|
100297
100442
|
}
|
|
100298
100443
|
) }),
|
|
100299
|
-
/* @__PURE__ */
|
|
100444
|
+
/* @__PURE__ */ jsx256(Tooltip, { label: "Zoom out", children: /* @__PURE__ */ jsx256(
|
|
100300
100445
|
"button",
|
|
100301
100446
|
{
|
|
100302
100447
|
type: "button",
|
|
100303
100448
|
"aria-label": "Zoom out",
|
|
100304
100449
|
onClick: () => zoomTimelineStep("out"),
|
|
100305
100450
|
className: flatIdle,
|
|
100306
|
-
children: /* @__PURE__ */
|
|
100451
|
+
children: /* @__PURE__ */ jsx256(MagnifyingGlassMinus, { size: 16, "aria-hidden": "true" })
|
|
100307
100452
|
}
|
|
100308
100453
|
) }),
|
|
100309
|
-
/* @__PURE__ */
|
|
100454
|
+
/* @__PURE__ */ jsx256(
|
|
100310
100455
|
"input",
|
|
100311
100456
|
{
|
|
100312
100457
|
type: "range",
|
|
@@ -100321,17 +100466,17 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100321
100466
|
className: "mx-1 h-6 w-[96px] cursor-pointer appearance-none bg-transparent [&::-webkit-slider-runnable-track]:h-[2px] [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-neutral-700 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-text-0 [&::-webkit-slider-thumb]:-mt-1 [&::-webkit-slider-thumb]:shadow-[0_0_0_2px_#0a0a0a,0_1px_3px_rgba(0,0,0,0.5)] [&::-webkit-slider-thumb]:cursor-grab [&::-webkit-slider-thumb:active]:cursor-grabbing"
|
|
100322
100467
|
}
|
|
100323
100468
|
),
|
|
100324
|
-
/* @__PURE__ */
|
|
100469
|
+
/* @__PURE__ */ jsx256(Tooltip, { label: "Zoom in", children: /* @__PURE__ */ jsx256(
|
|
100325
100470
|
"button",
|
|
100326
100471
|
{
|
|
100327
100472
|
type: "button",
|
|
100328
100473
|
"aria-label": "Zoom in",
|
|
100329
100474
|
onClick: () => zoomTimelineStep("in"),
|
|
100330
100475
|
className: flatIdle,
|
|
100331
|
-
children: /* @__PURE__ */
|
|
100476
|
+
children: /* @__PURE__ */ jsx256(MagnifyingGlassPlus, { size: 16, "aria-hidden": "true" })
|
|
100332
100477
|
}
|
|
100333
100478
|
) }),
|
|
100334
|
-
/* @__PURE__ */
|
|
100479
|
+
/* @__PURE__ */ jsx256(
|
|
100335
100480
|
"span",
|
|
100336
100481
|
{
|
|
100337
100482
|
className: "ml-1 w-[38px] text-right font-mono text-[11px] tabular-nums text-neutral-500 select-none",
|
|
@@ -100344,23 +100489,23 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
|
|
|
100344
100489
|
});
|
|
100345
100490
|
|
|
100346
100491
|
// src/components/StudioSplash.tsx
|
|
100347
|
-
import { jsx as
|
|
100492
|
+
import { jsx as jsx257, jsxs as jsxs205 } from "react/jsx-runtime";
|
|
100348
100493
|
function StudioSplash({ waiting }) {
|
|
100349
|
-
return /* @__PURE__ */
|
|
100350
|
-
/* @__PURE__ */
|
|
100351
|
-
/* @__PURE__ */
|
|
100494
|
+
return /* @__PURE__ */ jsx257("div", { className: "h-full w-full bg-neutral-950 flex items-center justify-center", children: waiting ? /* @__PURE__ */ jsxs205("div", { className: "flex flex-col items-center gap-3 text-center px-6", role: "status", children: [
|
|
100495
|
+
/* @__PURE__ */ jsx257("div", { className: "w-4 h-4 rounded-full border-2 border-neutral-700 border-t-neutral-500 animate-spin motion-reduce:animate-none" }),
|
|
100496
|
+
/* @__PURE__ */ jsxs205("p", { className: "text-xs text-neutral-600", children: [
|
|
100352
100497
|
"Waiting for preview server\u2026 run",
|
|
100353
100498
|
" ",
|
|
100354
|
-
/* @__PURE__ */
|
|
100499
|
+
/* @__PURE__ */ jsx257("code", { className: "text-neutral-500 font-mono", children: "npm run dev" })
|
|
100355
100500
|
] })
|
|
100356
|
-
] }) : /* @__PURE__ */
|
|
100357
|
-
/* @__PURE__ */
|
|
100358
|
-
/* @__PURE__ */
|
|
100501
|
+
] }) : /* @__PURE__ */ jsxs205("div", { className: "flex flex-col items-center gap-3 text-center px-6", role: "status", children: [
|
|
100502
|
+
/* @__PURE__ */ jsx257("div", { className: "w-4 h-4 rounded-full bg-studio-accent animate-pulse motion-reduce:animate-none" }),
|
|
100503
|
+
/* @__PURE__ */ jsx257("p", { className: "text-xs text-neutral-600", children: "Connecting to project\u2026" })
|
|
100359
100504
|
] }) });
|
|
100360
100505
|
}
|
|
100361
100506
|
|
|
100362
100507
|
// src/hooks/useServerConnection.ts
|
|
100363
|
-
import { useEffect as
|
|
100508
|
+
import { useEffect as useEffect160, useState as useState163 } from "react";
|
|
100364
100509
|
async function resolveHashProject(id) {
|
|
100365
100510
|
try {
|
|
100366
100511
|
const res = await studioApiFetch(`/api/projects/${encodeURIComponent(id)}`);
|
|
@@ -100434,7 +100579,7 @@ function useServerConnection() {
|
|
|
100434
100579
|
if (retryTimer !== null) clearTimeout(retryTimer);
|
|
100435
100580
|
};
|
|
100436
100581
|
});
|
|
100437
|
-
|
|
100582
|
+
useEffect160(() => {
|
|
100438
100583
|
const onHashChange = () => {
|
|
100439
100584
|
const next = parseProjectIdFromHash(window.location.hash);
|
|
100440
100585
|
if (!next || next === projectId) return;
|
|
@@ -100460,9 +100605,9 @@ function useServerConnection() {
|
|
|
100460
100605
|
}
|
|
100461
100606
|
|
|
100462
100607
|
// src/hooks/useStudioSessionStart.ts
|
|
100463
|
-
import { useEffect as
|
|
100608
|
+
import { useEffect as useEffect161 } from "react";
|
|
100464
100609
|
function useStudioSessionStart(projectId, resolving, waitingForServer) {
|
|
100465
|
-
|
|
100610
|
+
useEffect161(() => {
|
|
100466
100611
|
if (resolving || waitingForServer || hasFiredSessionStart()) return;
|
|
100467
100612
|
markSessionStartFired();
|
|
100468
100613
|
trackStudioSessionStart({ has_project: projectId != null });
|
|
@@ -100489,7 +100634,7 @@ function useTimelineAddAtPlayhead(addAsset, addComposition, projectId) {
|
|
|
100489
100634
|
import { useState as useState164 } from "react";
|
|
100490
100635
|
|
|
100491
100636
|
// src/hooks/useHydrateActiveCompPathFromUrl.ts
|
|
100492
|
-
import { useEffect as
|
|
100637
|
+
import { useEffect as useEffect162 } from "react";
|
|
100493
100638
|
function useHydrateActiveCompPathFromUrl({
|
|
100494
100639
|
hydrated,
|
|
100495
100640
|
fileTreeLoaded,
|
|
@@ -100498,7 +100643,7 @@ function useHydrateActiveCompPathFromUrl({
|
|
|
100498
100643
|
setActiveCompPath,
|
|
100499
100644
|
setHydrated
|
|
100500
100645
|
}) {
|
|
100501
|
-
|
|
100646
|
+
useEffect162(() => {
|
|
100502
100647
|
if (hydrated) return;
|
|
100503
100648
|
if (!fileTreeLoaded) return;
|
|
100504
100649
|
const nextCompPath = normalizeStudioCompositionPath(
|
|
@@ -100511,7 +100656,7 @@ function useHydrateActiveCompPathFromUrl({
|
|
|
100511
100656
|
}
|
|
100512
100657
|
|
|
100513
100658
|
// src/hooks/useAutoOpenRootComposition.ts
|
|
100514
|
-
import { useEffect as
|
|
100659
|
+
import { useEffect as useEffect163, useRef as useRef188 } from "react";
|
|
100515
100660
|
function useAutoOpenRootComposition({
|
|
100516
100661
|
projectId,
|
|
100517
100662
|
activeCompPath,
|
|
@@ -100520,7 +100665,7 @@ function useAutoOpenRootComposition({
|
|
|
100520
100665
|
onSelectComposition
|
|
100521
100666
|
}) {
|
|
100522
100667
|
const settledForProjectRef = useRef188(void 0);
|
|
100523
|
-
|
|
100668
|
+
useEffect163(() => {
|
|
100524
100669
|
if (settledForProjectRef.current === projectId) return;
|
|
100525
100670
|
if (!activeCompPathHydrated) return;
|
|
100526
100671
|
if (activeCompPath !== null) {
|
|
@@ -100625,7 +100770,7 @@ function useActiveComposition({
|
|
|
100625
100770
|
}
|
|
100626
100771
|
|
|
100627
100772
|
// src/App.tsx
|
|
100628
|
-
import { jsx as
|
|
100773
|
+
import { jsx as jsx258, jsxs as jsxs206 } from "react/jsx-runtime";
|
|
100629
100774
|
var getTimelineSelectionSet = () => usePlayerStore.getState().selectedElementIds;
|
|
100630
100775
|
function StudioApp({ readOnlyPreview = false, readOnlyPreviewReason } = {}) {
|
|
100631
100776
|
const { projectId, resolving, waitingForServer } = useServerConnection();
|
|
@@ -100996,7 +101141,7 @@ function StudioApp({ readOnlyPreview = false, readOnlyPreviewReason } = {}) {
|
|
|
100996
101141
|
refreshPreviewDocumentVersion
|
|
100997
101142
|
});
|
|
100998
101143
|
const timelineToolbar = useMemo90(
|
|
100999
|
-
() => /* @__PURE__ */
|
|
101144
|
+
() => /* @__PURE__ */ jsx258(
|
|
101000
101145
|
TimelineToolbar,
|
|
101001
101146
|
{
|
|
101002
101147
|
domEditSession: toolbarSession,
|
|
@@ -101044,15 +101189,15 @@ function StudioApp({ readOnlyPreview = false, readOnlyPreviewReason } = {}) {
|
|
|
101044
101189
|
projectId
|
|
101045
101190
|
);
|
|
101046
101191
|
if (resolving || waitingForServer || !projectId)
|
|
101047
|
-
return /* @__PURE__ */
|
|
101048
|
-
return /* @__PURE__ */
|
|
101192
|
+
return /* @__PURE__ */ jsx258(StudioSplash, { waiting: waitingForServer });
|
|
101193
|
+
return /* @__PURE__ */ jsx258(StudioShellProvider, { value: studioCtxValue, children: /* @__PURE__ */ jsx258(StudioPlaybackProvider, { value: studioCtxValue, children: /* @__PURE__ */ jsx258(PanelLayoutProvider, { value: layout, children: /* @__PURE__ */ jsx258(FileManagerProvider, { value: fileManager, children: /* @__PURE__ */ jsx258(DomEditProvider, { value: domEditSession, children: /* @__PURE__ */ jsxs206(
|
|
101049
101194
|
"div",
|
|
101050
101195
|
{
|
|
101051
101196
|
className: "flex flex-col h-full w-full bg-neutral-950 relative",
|
|
101052
101197
|
onDragOver: fileDrop.onDragOver,
|
|
101053
101198
|
onDrop: fileDrop.onDrop,
|
|
101054
101199
|
children: [
|
|
101055
|
-
/* @__PURE__ */
|
|
101200
|
+
/* @__PURE__ */ jsx258(
|
|
101056
101201
|
StudioHeader,
|
|
101057
101202
|
{
|
|
101058
101203
|
captureFrameHref: frameCapture.captureFrameHref,
|
|
@@ -101065,17 +101210,17 @@ function StudioApp({ readOnlyPreview = false, readOnlyPreviewReason } = {}) {
|
|
|
101065
101210
|
onExport: handleExport
|
|
101066
101211
|
}
|
|
101067
101212
|
),
|
|
101068
|
-
previewPersistence.domEditSaveQueuePaused && !externalFileChanges.blocked && /* @__PURE__ */
|
|
101213
|
+
previewPersistence.domEditSaveQueuePaused && !externalFileChanges.blocked && /* @__PURE__ */ jsx258(
|
|
101069
101214
|
SaveQueuePausedBanner,
|
|
101070
101215
|
{
|
|
101071
101216
|
message: previewPersistence.domEditSaveQueuePaused,
|
|
101072
101217
|
onRetry: previewPersistence.resetDomEditSaveQueueBreaker
|
|
101073
101218
|
}
|
|
101074
101219
|
),
|
|
101075
|
-
/* @__PURE__ */
|
|
101076
|
-
sdkHandle.unreachableProject && /* @__PURE__ */
|
|
101077
|
-
sdkHandle.compositionMissing && activeCompPath && /* @__PURE__ */
|
|
101078
|
-
/* @__PURE__ */
|
|
101220
|
+
/* @__PURE__ */ jsx258(ExternalFileConflictBanner, { coordinator: externalFileChanges }),
|
|
101221
|
+
sdkHandle.unreachableProject && /* @__PURE__ */ jsx258(ProjectUnreachableBanner, { projectId: sdkHandle.unreachableProject }),
|
|
101222
|
+
sdkHandle.compositionMissing && activeCompPath && /* @__PURE__ */ jsx258(CompositionMissingBanner, { path: activeCompPath }),
|
|
101223
|
+
/* @__PURE__ */ jsx258(
|
|
101079
101224
|
EditorShell,
|
|
101080
101225
|
{
|
|
101081
101226
|
readOnlyPreview,
|
|
@@ -101119,7 +101264,7 @@ function StudioApp({ readOnlyPreview = false, readOnlyPreviewReason } = {}) {
|
|
|
101119
101264
|
gestureOverlay
|
|
101120
101265
|
}
|
|
101121
101266
|
),
|
|
101122
|
-
/* @__PURE__ */
|
|
101267
|
+
/* @__PURE__ */ jsx258(
|
|
101123
101268
|
StudioOverlays,
|
|
101124
101269
|
{
|
|
101125
101270
|
projectId,
|