@hyperframes/studio 0.8.205 → 0.8.207
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-Cm5aBiKq.js +478 -0
- package/dist/assets/{index-dy6GQJn4.js → index-BF9YeBnC.js} +142 -142
- package/dist/assets/{index-C8hp9Y7c.js → index-BrqAmMRt.js} +1 -1
- package/dist/{chunk-Z5NKM57J.js → chunk-3EAFE522.js} +8 -4
- package/dist/{chunk-2YCKGJFD.js → chunk-HPIJDMWG.js} +5 -5
- 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 +1 -0
- package/dist/index.html +1 -1
- package/dist/index.js +235 -127
- package/dist/player.js +2 -2
- package/package.json +8 -8
- package/src/components/MediaPreview.test.tsx +69 -0
- package/src/components/MediaPreview.tsx +10 -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/sidebar/PromptPreviewModal.test.tsx +22 -0
- package/src/components/sidebar/PromptPreviewModal.tsx +1 -0
- package/src/hooks/timelineEditingHelpers.test.ts +59 -0
- package/src/hooks/timelineEditingHelpers.ts +4 -5
- package/src/hooks/useGestureRecording.ts +5 -3
- package/src/player/components/PlayerControls.tsx +5 -2
- package/src/player/components/ShortcutsPanel.tsx +4 -2
- package/src/player/components/Timeline.test.ts +12 -0
- package/src/player/components/TimelineProvider.tsx +1 -0
- package/src/player/components/TimelineRuler.tsx +4 -7
- package/src/player/components/TimelineRulerPart.tsx +1 -0
- package/src/player/components/timelineClipDragPreview.test.ts +10 -0
- package/src/player/components/timelineClipDragPreview.ts +4 -5
- package/src/player/components/timelineRulerGeometry.ts +14 -3
- package/src/player/components/useTimelineClipDrag.ts +5 -2
- package/src/player/components/useTimelineProviderState.tsx +2 -1
- package/src/player/components/useTimelineTicks.ts +4 -1
- package/src/player/hooks/previewMessageRouter.test.ts +34 -0
- package/src/player/hooks/previewMessageRouter.ts +14 -3
- package/src/player/hooks/usePlaybackKeyboard.test.ts +19 -0
- package/src/player/hooks/usePlaybackKeyboard.ts +5 -2
- package/src/player/hooks/useShadowPreviewReload.ts +4 -1
- package/src/player/hooks/useTimelinePlayer.shadowReload.test.ts +21 -0
- package/src/player/lib/mediaFetch.test.ts +163 -0
- package/src/player/lib/mediaFetch.ts +98 -0
- package/src/player/lib/mediaProbe.test.ts +21 -1
- package/src/player/lib/mediaProbe.ts +4 -2
- package/src/player/lib/thumbnailVideoDecoder.test.ts +24 -1
- package/src/player/lib/thumbnailVideoDecoder.ts +3 -1
- package/src/player/lib/time.test.ts +13 -13
- package/src/player/lib/time.ts +4 -4
- package/src/utils/linkedClipPreferences.ts +2 -0
- package/src/utils/sourceScopedSelectorIndex.ts +5 -2
- package/dist/assets/hyperframes-player-DzdSmJdB.js +0 -478
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
querySelectorAllSafely,
|
|
20
20
|
studioApiFetch,
|
|
21
21
|
withSelectorIndexPass
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OGIOFEC7.js";
|
|
23
23
|
|
|
24
24
|
// src/components/editor/domEditingLayers.ts
|
|
25
25
|
import { isClipHiddenByRuntime, PREVIEW_ONLY_ATTRS } from "@hyperframes/core/studio-preview-mark";
|
|
@@ -349,9 +349,11 @@ function createDomEditLayerWalkCache() {
|
|
|
349
349
|
let presence = /* @__PURE__ */ new WeakMap();
|
|
350
350
|
let identities = /* @__PURE__ */ new WeakMap();
|
|
351
351
|
let scope = null;
|
|
352
|
+
const selectorIndex = /* @__PURE__ */ new Map();
|
|
352
353
|
const invalidateAll = () => {
|
|
353
354
|
presence = /* @__PURE__ */ new WeakMap();
|
|
354
355
|
identities = /* @__PURE__ */ new WeakMap();
|
|
356
|
+
selectorIndex.clear();
|
|
355
357
|
};
|
|
356
358
|
const drop = (el) => {
|
|
357
359
|
if (el) presence.delete(el);
|
|
@@ -425,7 +427,8 @@ function createDomEditLayerWalkCache() {
|
|
|
425
427
|
}
|
|
426
428
|
}
|
|
427
429
|
},
|
|
428
|
-
invalidateAll
|
|
430
|
+
invalidateAll,
|
|
431
|
+
selectorIndex
|
|
429
432
|
};
|
|
430
433
|
}
|
|
431
434
|
function readDomEditLayerWalkEntry(el, activeCompositionPath, cache) {
|
|
@@ -749,9 +752,10 @@ function collectDomEditLayerItems(root, options, maxItems = Number.POSITIVE_INFI
|
|
|
749
752
|
if (items.length >= maxItems) return;
|
|
750
753
|
}
|
|
751
754
|
};
|
|
752
|
-
|
|
755
|
+
const walkRoots = () => {
|
|
753
756
|
for (const el of groupScopedLayerRoots(root, options.activeGroupElement ?? null)) visit(el, 0);
|
|
754
|
-
}
|
|
757
|
+
};
|
|
758
|
+
withSelectorIndexPass(root.ownerDocument, walkRoots, cache?.selectorIndex);
|
|
755
759
|
return items;
|
|
756
760
|
}
|
|
757
761
|
function liveLayerElement(layer, doc, activeCompositionPath) {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
buildProjectApiPath,
|
|
6
6
|
splitTimelineElementKey,
|
|
7
7
|
studioApiFetch
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OGIOFEC7.js";
|
|
9
9
|
|
|
10
10
|
// src/player/lib/time.ts
|
|
11
11
|
var STUDIO_PREVIEW_FPS = 30;
|
|
@@ -16,22 +16,22 @@ function formatTime(time) {
|
|
|
16
16
|
const secs = Math.floor(time % 60);
|
|
17
17
|
return `${mins.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
|
|
18
18
|
}
|
|
19
|
-
function secondsToFrame(time, fps
|
|
19
|
+
function secondsToFrame(time, fps) {
|
|
20
20
|
if (!Number.isFinite(time) || time <= 0) return 0;
|
|
21
21
|
if (!Number.isFinite(fps) || fps <= 0) return 0;
|
|
22
22
|
return Math.round(time * fps);
|
|
23
23
|
}
|
|
24
|
-
function frameToSeconds(frame, fps
|
|
24
|
+
function frameToSeconds(frame, fps) {
|
|
25
25
|
if (!Number.isFinite(frame) || frame <= 0) return 0;
|
|
26
26
|
if (!Number.isFinite(fps) || fps <= 0) return 0;
|
|
27
27
|
return frame / fps;
|
|
28
28
|
}
|
|
29
|
-
function stepFrameTime(time, deltaFrames, fps
|
|
29
|
+
function stepFrameTime(time, deltaFrames, fps) {
|
|
30
30
|
const currentFrame = secondsToFrame(time, fps);
|
|
31
31
|
const nextFrame = Math.max(0, currentFrame + deltaFrames);
|
|
32
32
|
return frameToSeconds(nextFrame, fps);
|
|
33
33
|
}
|
|
34
|
-
function formatFrameTime(time, duration, fps
|
|
34
|
+
function formatFrameTime(time, duration, fps) {
|
|
35
35
|
const currentFrame = secondsToFrame(time, fps);
|
|
36
36
|
const totalFrames = secondsToFrame(duration, fps);
|
|
37
37
|
return `${currentFrame}f / ${totalFrames}f`;
|
|
@@ -4,9 +4,11 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// src/utils/sourceScopedSelectorIndex.ts
|
|
6
6
|
var activePass = null;
|
|
7
|
-
function withSelectorIndexPass(doc, run) {
|
|
7
|
+
function withSelectorIndexPass(doc, run, kept) {
|
|
8
8
|
const previous = activePass;
|
|
9
|
-
|
|
9
|
+
const bySelector = kept?.get(doc) ?? /* @__PURE__ */ new Map();
|
|
10
|
+
kept?.set(doc, bySelector);
|
|
11
|
+
activePass = { doc, bySelector };
|
|
10
12
|
try {
|
|
11
13
|
return run();
|
|
12
14
|
} finally {
|
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
resolveDomEditCapabilities,
|
|
20
20
|
resolveDomEditSelection,
|
|
21
21
|
serializeDomEditTextFields
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-3EAFE522.js";
|
|
23
|
+
import "./chunk-OGIOFEC7.js";
|
|
24
24
|
import "./chunk-MLKGABMK.js";
|
|
25
25
|
export {
|
|
26
26
|
buildDefaultDomEditTextField,
|
package/dist/index.d.ts
CHANGED
|
@@ -1735,6 +1735,7 @@ type TimelineCanvasState = Omit<TimelineLaneBaseProps, "setRangeSelection" | "se
|
|
|
1735
1735
|
totalH: number;
|
|
1736
1736
|
effectiveDuration: number;
|
|
1737
1737
|
majorTickInterval: number;
|
|
1738
|
+
tickFrameRate: number | undefined;
|
|
1738
1739
|
rangeSelection: TimelineRangeSelection | null;
|
|
1739
1740
|
marqueeRect: Rect$1 | null;
|
|
1740
1741
|
resizingClip: ResizingClipState | null;
|
package/dist/index.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
document.documentElement.dataset.theme = "paper";
|
|
15
15
|
}
|
|
16
16
|
</script>
|
|
17
|
-
<script type="module" crossorigin src="/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/assets/index-BF9YeBnC.js"></script>
|
|
18
18
|
<link rel="stylesheet" crossorigin href="/assets/index-CYbvOVp-.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|