@hyperframes/studio 0.9.38 → 0.9.40
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/{codec-Dz2VdhdD.js → codec-BPK_2CLL.js} +1 -1
- package/dist/assets/{hyperframes-player-BkaWdGLq.js → hyperframes-player-D7qTTDIp.js} +1 -1
- package/dist/assets/{index-BJTCbv8z.css → index-4VGEAZyf.css} +1 -1
- package/dist/assets/{index-DsNxqAwr.js → index-CdA00Ybn.js} +145 -145
- package/dist/assets/{index-DONaC7VF.js → index-QS-DuxAU.js} +1 -1
- package/dist/assets/{pausedVideoDecoder-BGN2jKrN.js → pausedVideoDecoder-Byzz98Gb.js} +1 -1
- package/dist/{chunk-63DH4LRB.js → chunk-AV2PV7NE.js} +15 -68
- package/dist/chunk-FQ3VRKMC.js +148 -0
- package/dist/{chunk-YKBN653R.js → chunk-KF6YVXJP.js} +258 -1
- package/dist/{chunk-45KKBU63.js → chunk-VZ5MD32A.js} +1 -1
- package/dist/{domEditingLayers-7Q56QAU5.js → domEditingLayers-4KRREI5C.js} +2 -2
- package/dist/index.d.ts +3 -85
- package/dist/index.html +2 -2
- package/dist/index.js +321 -341
- package/dist/keys-CaWcxUST.d.ts +86 -0
- package/dist/keys.d.ts +1 -0
- package/dist/keys.js +11 -0
- package/dist/player.js +2 -2
- package/dist/styles.css +1 -1
- package/package.json +12 -8
- package/src/components/editor/DomEditGestureReadout.test.tsx +204 -20
- package/src/components/editor/DomEditGestureReadout.tsx +36 -18
- package/src/components/editor/InlineTextToolbar.tsx +2 -2
- package/src/components/editor/domEditGestureReadoutPlacement.ts +144 -0
- package/src/components/editor/domEditGestureReadoutState.ts +18 -8
- package/src/components/editor/domEditingDom.ts +23 -104
- package/src/components/editor/useDomEditCompositionRect.ts +13 -4
- package/src/components/editor/useDomEditOverlayGestures.ts +1 -1
- package/src/components/editor/usePreviewCompositionRect.test.tsx +39 -0
- package/src/hooks/elementPickerStyles.ts +53 -0
- package/src/hooks/useElementPicker.test.ts +83 -3
- package/src/hooks/useElementPicker.ts +27 -66
- package/src/keys.test.ts +53 -0
- package/src/keys.ts +11 -0
- package/src/player/components/Player.tsx +2 -0
- package/src/player/components/studioKeyDefaults.ts +68 -0
- package/src/player/components/studioShortcuts.ts +2 -67
- package/src/player/hooks/playbackAdapterResolution.ts +15 -0
- package/src/player/hooks/previewMessageRouter.manifest.test.ts +67 -0
- package/src/player/hooks/previewMessageRouter.ts +38 -8
- package/src/player/hooks/timelinePlayerTestHarness.ts +26 -1
- package/src/player/hooks/useShadowPreviewReload.ts +4 -1
- package/src/player/hooks/useTimelinePlayer.ts +5 -9
- package/src/player/lib/bridgePlayback.ts +156 -0
- package/src/player/lib/previewChannel.test.ts +260 -0
- package/src/player/lib/previewChannel.ts +115 -0
- package/src/player/lib/previewElements.test.ts +167 -0
- package/src/player/lib/previewElements.ts +117 -0
- package/src/player/sceneSwap.test.ts +12 -0
- package/src/player/sceneSwap.ts +2 -0
package/src/player/sceneSwap.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { studioApiFetch } from "../utils/studioApiFetch";
|
|
|
2
2
|
import { studioFileRevision } from "../utils/studioFileVersion";
|
|
3
3
|
import { logReload } from "../utils/reloadDebug";
|
|
4
4
|
import { whileScriptWrites } from "./previewReloading";
|
|
5
|
+
import { previewFrameOpaque } from "./lib/previewChannel";
|
|
5
6
|
|
|
6
7
|
type SwapWindow = Window & {
|
|
7
8
|
__hfSwapScenes?: (html: string, signal?: AbortSignal) => Promise<void>;
|
|
@@ -114,6 +115,7 @@ export function swapFreshly(
|
|
|
114
115
|
export function sceneSwapFor(
|
|
115
116
|
iframe: HTMLIFrameElement,
|
|
116
117
|
): ((url: string, isCurrent: () => boolean, cancel?: AbortSignal) => Promise<void>) | null {
|
|
118
|
+
if (previewFrameOpaque(iframe)) return null;
|
|
117
119
|
const win = iframe.contentWindow as SwapWindow | null;
|
|
118
120
|
const swap = win?.__hfSwapScenes;
|
|
119
121
|
if (typeof swap !== "function") return null;
|