@hyperframes/studio 0.9.37 → 0.9.39
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-BP7F-7Jx.js → codec-CY6KnWXa.js} +1 -1
- package/dist/assets/{hyperframes-player-_QnPoHup.js → hyperframes-player-B9-CuG_h.js} +1 -1
- package/dist/assets/{index-BJTCbv8z.css → index-4VGEAZyf.css} +1 -1
- package/dist/assets/{index-D6ePWUpc.js → index-Bjz2UaYv.js} +1 -1
- package/dist/assets/{index-tjhfci4N.js → index-_pkzoYYF.js} +166 -166
- package/dist/assets/{pausedVideoDecoder-B7U86zDa.js → pausedVideoDecoder-Dr7nKUUu.js} +1 -1
- package/dist/{chunk-63DH4LRB.js → chunk-44VRMER6.js} +2 -11
- package/dist/{chunk-45KKBU63.js → chunk-ATDO3YLX.js} +1 -1
- package/dist/chunk-FQ3VRKMC.js +148 -0
- package/dist/{chunk-YKBN653R.js → chunk-NBULUIWH.js} +252 -1
- package/dist/{domEditingLayers-7Q56QAU5.js → domEditingLayers-FRVHP6IB.js} +2 -2
- package/dist/index.d.ts +3 -85
- package/dist/index.html +2 -2
- package/dist/index.js +379 -400
- 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 +2 -15
- package/src/components/editor/propertyPanelFlatMediaSection.test.tsx +7 -36
- package/src/components/editor/propertyPanelFlatMediaSection.tsx +9 -32
- 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/components/editor/useVolumeAutomation.test.tsx +0 -69
- package/src/components/editor/useVolumeAutomation.ts +0 -4
- package/src/hooks/elementPickerStyles.ts +53 -0
- package/src/hooks/gsapScriptCommitTypes.ts +2 -6
- package/src/hooks/timelineEditingHelpers.test.ts +39 -0
- package/src/hooks/timelineEditingHelpers.ts +13 -0
- package/src/hooks/useDomEditCommits.ts +4 -9
- package/src/hooks/useDomEditPersist.ts +2 -12
- package/src/hooks/useElementPicker.test.ts +83 -3
- package/src/hooks/useElementPicker.ts +27 -66
- package/src/hooks/useGsapScriptCommits.test.tsx +21 -0
- package/src/hooks/useGsapScriptCommits.ts +7 -3
- package/src/keys.test.ts +53 -0
- package/src/keys.ts +11 -0
- package/src/player/components/Player.test.ts +15 -0
- package/src/player/components/Player.tsx +6 -4
- package/src/player/components/audioGainApply.test.ts +13 -0
- package/src/player/components/audioGainApply.ts +0 -3
- 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 +27 -1
- package/src/player/hooks/useShadowPreviewReload.ts +24 -6
- package/src/player/hooks/useTimelinePlayer.shadowReload.test.ts +46 -0
- 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 +100 -0
- package/src/player/sceneSwap.test.ts +12 -0
- package/src/player/sceneSwap.ts +2 -0
- package/src/utils/studioFileHistory.test.ts +29 -1
- package/src/utils/studioFileHistory.ts +24 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as V}from"./index-
|
|
1
|
+
import{l as V}from"./index-_pkzoYYF.js";import{bw as G,bN as K,cH as Q,bE as X}from"./codec-CY6KnWXa.js";const x=1e-5,k=1e-9,T=h=>!h.variableFrameRate&&(h.frameRate??0)>0;function Y(h,i){const{sourceLead:r,inputLead:l,timeResolution:w,frameRate:p=0}=i;if(!T(i))return Math.max(l,h-r+l)+k;const d=Math.max(0,Math.floor((h-r)*p+k)),f=l+d/p;return(w>0?Math.round(f*w)/w:f)+x}function J(h,i,r){const{frameRate:l=0,sourceLead:w,inputLead:p}=r,d=T(r)?Math.round((h-p)*l)/l+w:h-p+w,f=Math.min(i,d);return{timestamp:f,duration:Math.max(T(r)?1/l:0,i-f+x)}}const E=64*1024*1024,M=4,Z=.5,$=2e3;async function q(h,i){if(!h.transparent)return h.sink.getSample(i);let r=null;try{for await(const l of h.sink.samplesAtTimestamps([i]))r==null||r.close(),r=l;return r}catch(l){throw r==null||r.close(),l}}function ot(h){const i=new Map,r=new Map,l=new Map,w=new Map,p=new Map;let d=0,f=!1;const _=t=>{var o,n;let e=new URL(t,location.href).pathname;try{e=decodeURIComponent(e)}catch{}return(n=Object.entries(((o=h.contentWindow)==null?void 0:o.__HF_MEDIA_SOURCE_FACTS__)??{}).filter(([s])=>e.endsWith(s)).sort(([s],[a])=>a.length-s.length)[0])==null?void 0:n[1]},g=(t=E)=>{for(const[e,o]of p){if(d<=t)break;e.pins>0||(p.delete(e),o.cache.delete(e.timestamp),d-=e.bytes,e.image.close())}},v=async t=>{if(t.disposed)return;t.disposed=!0,clearTimeout(t.idleTimer),r.get(t.key)===t&&r.delete(t.key);const e=(async()=>{t.transparent&&await t.tail,t.cancelReads(),t.input.dispose(),await y(t).catch(()=>{});for(const o of t.cache.values())p.delete(o),d-=o.bytes,o.image.close();t.cache.clear(),t.canvas.width=t.canvas.height=0})();return t.transparent?new Promise((o,n)=>{const s=setTimeout(()=>{t.cancelReads(),o()},$);e.then(o,n).finally(()=>clearTimeout(s))}):e},P=t=>{clearTimeout(t.idleTimer),!(t.disposed||t.users>0||[...t.cache.values()].some(e=>e.pins>0))&&(t.idleTimer=setTimeout(()=>{t.users>0||[...t.cache.values()].some(e=>e.pins>0)||r.get(t.key)===t&&(i.delete(t.key),v(t))},1e4))},D=async t=>{const e=V("thumbnail"),o=new G({source:new Q(t,e),formats:K});l.set(o,e.cancelReads);try{const n=await o.getPrimaryVideoTrack();if(!n||f)throw new Error("Preview video unavailable");const[s,a,u,c,m,S,F,B,j]=await Promise.all([n.getDisplayWidth(),n.getDisplayHeight(),n.getFirstTimestamp(),n.getTimeResolution(),n.getSquarePixelWidth(),n.getSquarePixelHeight(),n.getRotation(),n.getFlip(),n.canBeTransparent()]),b=document.createElement("canvas");b.width=Math.max(1,Math.ceil(s));const z=F%180===0?m/S:S/m;return b.height=Math.max(1,Math.round(b.width/z)),{key:t,input:o,cancelReads:e.cancelReads,sink:new X(n),canvas:b,rotation:F,flip:B,width:s,height:a,lead:u,ticks:c,transparent:j,tail:Promise.resolve(),iterator:null,iteratorEnd:0,lastTime:-1/0,cache:new Map,users:0,disposed:!1}}catch(n){throw o.dispose(),e.cancelReads(),n}finally{l.delete(o)}},I=()=>{for(const[t]of i){if(i.size<M)break;const e=r.get(t);e&&e.users===0&&![...e.cache.values()].some(o=>o.pins>0)&&(i.delete(t),v(e))}if(i.size>=M)throw new Error("Preview decoder budget reached")},L=async t=>{const e=t;if((w.get(e)??0)>performance.now())throw new Error("Preview decoder cooling down");let o=i.get(e);o||(I(),o=D(t),i.set(e,o)),i.delete(e),i.set(e,o);let n;try{n=await o}catch(s){throw i.get(e)===o&&(i.delete(e),w.set(e,performance.now()+5e3)),s}if(f||n.disposed)throw new DOMException("Preview disposed","AbortError");return r.set(e,n),n.users++,clearTimeout(n.idleTimer),n},y=async t=>{const e=t.iterator;t.iterator=null,await(e==null?void 0:e.return())},R=(t,e)=>{if(e.throwIfAborted(),f||t.disposed)throw new Error("Preview disposed")},O=async(t,e,o)=>{for(t.iterator||(t.iteratorEnd=e+8,t.iterator=t.sink.samples(e,t.iteratorEnd));;){R(t,o);const n=await t.iterator.next();if(n.done)return null;const s=n.value;let a=!1;try{if(R(t,o),s.timestamp>e+1e-6)return null;if(a=s.timestamp+s.duration>e+1e-6,a)return s}finally{a||s.close()}}},A=(t,e)=>(e.pins++,p.delete(e),p.set(e,t),e),W=async(t,e,o,n,s)=>{const a=t.canvas.getContext("2d",{alpha:!0});if(!a)throw new Error("Preview canvas unavailable");a.clearRect(0,0,t.canvas.width,t.canvas.height),a.imageSmoothingQuality="high",e.drawWithFit(a,{fit:"fill",rotation:t.rotation,flip:t.flip});const u=await createImageBitmap(t.canvas);if(s.aborted||f||t.disposed)throw u.close(),s.throwIfAborted(),new Error("Preview disposed");const c={image:u,...J(e.timestamp,o,n),bytes:u.width*u.height*4,pins:1},m=t.cache.get(c.timestamp);if(m)return m.duration=Math.max(m.duration,c.duration),u.close(),A(t,m);if(g(E-c.bytes),d+c.bytes>E)throw u.close(),new Error("Preview frame budget reached");return t.cache.set(c.timestamp,c),p.set(c,t),d+=c.bytes,c},H=(t,e,o)=>!t.transparent&&!o.variableFrameRate&&(o.frameRate??0)>0&&e>t.lastTime+1e-6&&e-t.lastTime<=Z,N=async(t,e,o,n)=>{R(t,n);const s=[...t.cache.values()].find(m=>e>=m.timestamp-1e-6&&e<m.timestamp+m.duration-1e-6);if(s)return A(t,s);const a=Y(e,o),u=H(t,e,o);let c=null;try{if((!u||a>=t.iteratorEnd)&&await y(t),c=u?await O(t,a,n):null,c||(await y(t),c=await q(t,a)),!c)throw new Error("No preview frame at requested time");return R(t,n),t.lastTime=e,await W(t,c,e,o,n)}finally{c==null||c.close(),(n.aborted||f)&&await y(t).catch(()=>{})}},U=(t,e)=>{const o=_(t.source);return{frameRate:o==null?void 0:o.frameRate,variableFrameRate:o==null?void 0:o.variableFrameRate,sourceLead:e.lead,inputLead:e.lead,timeResolution:e.ticks}},C=async(t,e)=>{e.throwIfAborted();const o=t.source;if(!o)throw new Error("Preview source unavailable");const n=await L(o);try{const s=U(t,n),a=n.tail.then(()=>N(n,t.time,s,e));n.tail=a.then(()=>{},()=>{});const u=await a;let c=!1;return g(),{source:u.image,timestamp:u.timestamp,duration:u.duration,width:n.width,height:n.height,release(){c||(c=!0,u.pins--,g(),P(n))}}}finally{n.users--,P(n)}};return{async decode(t,e){if(f)throw new DOMException("Preview disposed","AbortError");if(new Set(t.map(({source:a})=>a)).size>M)throw new Error("Preview decoder budget reached");const o=await Promise.allSettled(t.map(a=>C(a,e))),n=o.find(a=>a.status==="rejected"),s=o.flatMap(a=>a.status==="fulfilled"?[a.value]:[]);if(n||f||e.aborted){for(const a of s)a.release();throw n?n.reason:new DOMException("Preview cancelled","AbortError")}return s},async suspend(){const t=[...i.values()].map(e=>e.then(v).catch(()=>{}));i.clear();for(const[e,o]of l)o(),e.dispose();await Promise.all(t)},dispose(){if(!f){f=!0;for(const[t,e]of l)e(),t.dispose();for(const t of i.values())t.then(v).catch(()=>{});i.clear(),w.clear()}}}}export{ot as createPausedVideoDecoder};
|
|
@@ -45,10 +45,7 @@ function getSourceScopedSelectorIndex(doc, el, selector, sourceFile, resolveSour
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
// src/components/editor/domEditingDom.ts
|
|
48
|
-
import {
|
|
49
|
-
PREVIEW_VIDEO_FRAME_ATTR,
|
|
50
|
-
PREVIEW_VIDEO_CANVAS_ATTR
|
|
51
|
-
} from "@hyperframes/core/studio-preview-mark";
|
|
48
|
+
import { getLogicalOpacity } from "@hyperframes/core/studio-preview-mark";
|
|
52
49
|
import { COLOR_GRADING_SOURCE_HIDDEN_ATTR } from "@hyperframes/core/color-grading";
|
|
53
50
|
|
|
54
51
|
// src/components/editor/domEditingTypes.ts
|
|
@@ -109,12 +106,6 @@ function isTextBearingTag(tagName) {
|
|
|
109
106
|
function isEditableTextLeaf(el) {
|
|
110
107
|
return isTextBearingTag(el.tagName.toLowerCase()) && el.children.length === 0;
|
|
111
108
|
}
|
|
112
|
-
function getLogicalOpacity(el, computed) {
|
|
113
|
-
const overlay = el.previousElementSibling;
|
|
114
|
-
if (el.hasAttribute(PREVIEW_VIDEO_FRAME_ATTR) && overlay?.localName === "canvas" && overlay.hasAttribute(PREVIEW_VIDEO_CANVAS_ATTR))
|
|
115
|
-
return el.ownerDocument.defaultView?.getComputedStyle(overlay).opacity ?? computed.opacity;
|
|
116
|
-
return computed.opacity;
|
|
117
|
-
}
|
|
118
109
|
function elementRendersItself(win, el) {
|
|
119
110
|
const computed = win.getComputedStyle(el);
|
|
120
111
|
if (computed.display === "none" || computed.visibility === "hidden") return false;
|
|
@@ -1152,9 +1143,9 @@ export {
|
|
|
1152
1143
|
rgbToHsv,
|
|
1153
1144
|
hsvToRgb,
|
|
1154
1145
|
withSelectorIndexPass,
|
|
1146
|
+
getLogicalOpacity,
|
|
1155
1147
|
isHtmlElement,
|
|
1156
1148
|
isEditableTextLeaf,
|
|
1157
|
-
getLogicalOpacity,
|
|
1158
1149
|
isElementVisibleThroughAncestors,
|
|
1159
1150
|
getCuratedComputedStyles,
|
|
1160
1151
|
getInlineStyles,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
querySelectorAllSafely,
|
|
20
20
|
studioApiFetch,
|
|
21
21
|
withSelectorIndexPass
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-44VRMER6.js";
|
|
23
23
|
|
|
24
24
|
// src/components/editor/domEditingLayers.ts
|
|
25
25
|
import { isClipHiddenByRuntime, PREVIEW_ONLY_ATTRS } from "@hyperframes/core/studio-preview-mark";
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
// src/player/components/studioCombo.ts
|
|
2
|
+
var NAMED = /* @__PURE__ */ new Set([
|
|
3
|
+
"Space",
|
|
4
|
+
"ArrowLeft",
|
|
5
|
+
"ArrowRight",
|
|
6
|
+
"ArrowUp",
|
|
7
|
+
"ArrowDown",
|
|
8
|
+
"Home",
|
|
9
|
+
"End",
|
|
10
|
+
"PageUp",
|
|
11
|
+
"PageDown",
|
|
12
|
+
"Delete",
|
|
13
|
+
"Backspace",
|
|
14
|
+
"Escape",
|
|
15
|
+
"Enter",
|
|
16
|
+
"Tab"
|
|
17
|
+
]);
|
|
18
|
+
var SYMBOL = {
|
|
19
|
+
ArrowLeft: "\u2190",
|
|
20
|
+
ArrowRight: "\u2192",
|
|
21
|
+
ArrowUp: "\u2191",
|
|
22
|
+
ArrowDown: "\u2193",
|
|
23
|
+
Delete: "Del",
|
|
24
|
+
Backspace: "\u232B",
|
|
25
|
+
Escape: "Esc"
|
|
26
|
+
};
|
|
27
|
+
var MODIFIERS = /* @__PURE__ */ new Set(["mod", "cmd", "ctrl", "shift", "alt"]);
|
|
28
|
+
function parseCombo(text) {
|
|
29
|
+
const split = text.length > 1 ? text.slice(0, -1).lastIndexOf("+") : -1;
|
|
30
|
+
const tokens = split < 0 ? [] : text.slice(0, split).split("+").map((t) => t.toLowerCase());
|
|
31
|
+
const key = text.slice(split + 1);
|
|
32
|
+
const named = NAMED.has(key);
|
|
33
|
+
const symbol = !named && !/^[A-Za-z]$/.test(key);
|
|
34
|
+
if (tokens.some((t) => !MODIFIERS.has(t)) || !named && [...key].length !== 1) return null;
|
|
35
|
+
if (symbol && tokens.includes("shift")) return null;
|
|
36
|
+
const combo = {
|
|
37
|
+
mod: tokens.includes("mod"),
|
|
38
|
+
meta: tokens.includes("cmd"),
|
|
39
|
+
ctrl: tokens.includes("ctrl"),
|
|
40
|
+
shift: tokens.includes("shift"),
|
|
41
|
+
alt: tokens.includes("alt"),
|
|
42
|
+
key: named ? key : key.toLowerCase(),
|
|
43
|
+
named
|
|
44
|
+
};
|
|
45
|
+
return combo.alt && (combo.ctrl || combo.mod) ? null : combo;
|
|
46
|
+
}
|
|
47
|
+
function comboText(c) {
|
|
48
|
+
const mods = [
|
|
49
|
+
c.mod && "mod",
|
|
50
|
+
c.meta && "cmd",
|
|
51
|
+
c.ctrl && "ctrl",
|
|
52
|
+
c.alt && "alt",
|
|
53
|
+
c.shift && "shift"
|
|
54
|
+
];
|
|
55
|
+
return [...mods.filter(Boolean), c.key].join("+");
|
|
56
|
+
}
|
|
57
|
+
var namedMatches = (e, name) => e.code === name || e.key === (name === "Space" ? " " : name);
|
|
58
|
+
function charMatches(e, c) {
|
|
59
|
+
if (e.key.toLowerCase() === c.key) return true;
|
|
60
|
+
const code = /^[0-9]$/.test(c.key) ? `Digit${c.key}` : `Key${c.key.toUpperCase()}`;
|
|
61
|
+
return e.altKey && /^[a-z0-9]$/.test(c.key) && e.code === code;
|
|
62
|
+
}
|
|
63
|
+
function matchCombo(e, c) {
|
|
64
|
+
const symbol = !c.named && !/^[a-z]$/.test(c.key);
|
|
65
|
+
if (!symbol && !!e.shiftKey !== c.shift || !!e.altKey !== c.alt) return false;
|
|
66
|
+
const modsOk = c.mod ? e.metaKey || e.ctrlKey : !!e.metaKey === c.meta && !!e.ctrlKey === c.ctrl;
|
|
67
|
+
return modsOk && (c.named ? namedMatches(e, c.key) : charMatches(e, c));
|
|
68
|
+
}
|
|
69
|
+
function formatCombo(c) {
|
|
70
|
+
const mods = `${c.ctrl ? "\u2303" : ""}${c.alt ? "\u2325" : ""}${c.mod || c.meta ? "\u2318" : ""}${c.shift ? "\u21E7" : ""}`;
|
|
71
|
+
return mods + (SYMBOL[c.key] ?? (c.named ? c.key : c.key.toUpperCase()));
|
|
72
|
+
}
|
|
73
|
+
var comboClashKey = (c) => [c.mod || c.meta || c.ctrl, c.alt, c.shift, c.key].join("|");
|
|
74
|
+
|
|
75
|
+
// src/player/components/studioKeyDefaults.ts
|
|
76
|
+
var DEFAULT_STUDIO_KEYS = {
|
|
77
|
+
fullscreen: "f",
|
|
78
|
+
split: "s",
|
|
79
|
+
record: "r",
|
|
80
|
+
addKeyframe: "k",
|
|
81
|
+
audioGain: "g",
|
|
82
|
+
zoomSelection: "z",
|
|
83
|
+
mute: "m",
|
|
84
|
+
pause: "k",
|
|
85
|
+
shuttleBack: "j",
|
|
86
|
+
shuttleForward: "l",
|
|
87
|
+
inPoint: "i",
|
|
88
|
+
outPoint: "o",
|
|
89
|
+
seekToIn: "a",
|
|
90
|
+
seekToOut: "e",
|
|
91
|
+
selectTool: "v",
|
|
92
|
+
razorTool: "b",
|
|
93
|
+
selectLeftward: "[",
|
|
94
|
+
selectRightward: "]",
|
|
95
|
+
exitRazor: "a",
|
|
96
|
+
snap: "s",
|
|
97
|
+
grid: "g",
|
|
98
|
+
timelineSnap: "n",
|
|
99
|
+
playPause: "Space",
|
|
100
|
+
frameBack: "ArrowLeft",
|
|
101
|
+
frameForward: "ArrowRight",
|
|
102
|
+
frameBackTen: "shift+ArrowLeft",
|
|
103
|
+
frameForwardTen: "shift+ArrowRight",
|
|
104
|
+
loop: "shift+l",
|
|
105
|
+
clearInPoint: "shift+i",
|
|
106
|
+
clearOutPoint: "shift+o",
|
|
107
|
+
undo: "mod+z",
|
|
108
|
+
redo: "mod+shift+z",
|
|
109
|
+
redoAlt: "ctrl+y",
|
|
110
|
+
tabCompositions: "mod+1",
|
|
111
|
+
tabAssets: "mod+2",
|
|
112
|
+
group: "mod+g",
|
|
113
|
+
ungroup: "mod+shift+g",
|
|
114
|
+
copy: "mod+c",
|
|
115
|
+
paste: "mod+v",
|
|
116
|
+
cut: "mod+x",
|
|
117
|
+
duplicate: "mod+d",
|
|
118
|
+
linkToggle: "mod+l",
|
|
119
|
+
detachAudio: "alt+shift+d",
|
|
120
|
+
deleteLinked: "alt+Backspace",
|
|
121
|
+
deleteLinkedAlt: "alt+Delete",
|
|
122
|
+
deleteSelected: "Delete",
|
|
123
|
+
deleteSelectedAlt: "Backspace",
|
|
124
|
+
resetKeyframes: "Backspace",
|
|
125
|
+
nudgeLeft: "ArrowLeft",
|
|
126
|
+
nudgeRight: "ArrowRight",
|
|
127
|
+
nudgeUp: "ArrowUp",
|
|
128
|
+
nudgeDown: "ArrowDown",
|
|
129
|
+
nudgeLeftTen: "shift+ArrowLeft",
|
|
130
|
+
nudgeRightTen: "shift+ArrowRight",
|
|
131
|
+
nudgeUpTen: "shift+ArrowUp",
|
|
132
|
+
nudgeDownTen: "shift+ArrowDown",
|
|
133
|
+
captionSelectAll: "mod+a",
|
|
134
|
+
pickupClip: "Space",
|
|
135
|
+
pickupUp: "ArrowUp",
|
|
136
|
+
pickupDown: "ArrowDown",
|
|
137
|
+
pickupDrop: "Enter",
|
|
138
|
+
cancel: "Escape"
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export {
|
|
142
|
+
parseCombo,
|
|
143
|
+
comboText,
|
|
144
|
+
matchCombo,
|
|
145
|
+
formatCombo,
|
|
146
|
+
comboClashKey,
|
|
147
|
+
DEFAULT_STUDIO_KEYS
|
|
148
|
+
};
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
buildProjectApiPath,
|
|
6
6
|
splitTimelineElementKey,
|
|
7
7
|
studioApiFetch
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-44VRMER6.js";
|
|
9
9
|
|
|
10
10
|
// src/player/lib/time.ts
|
|
11
11
|
var STUDIO_PREVIEW_FPS = 30;
|
|
@@ -1689,6 +1689,88 @@ function isPreviewChanging() {
|
|
|
1689
1689
|
return changing() && !givenUp;
|
|
1690
1690
|
}
|
|
1691
1691
|
|
|
1692
|
+
// src/player/lib/previewChannel.ts
|
|
1693
|
+
import {
|
|
1694
|
+
createEditingPortClient
|
|
1695
|
+
} from "@hyperframes/core/runtime/editing-port";
|
|
1696
|
+
var clients = /* @__PURE__ */ new WeakMap();
|
|
1697
|
+
var loopStarts = /* @__PURE__ */ new WeakMap();
|
|
1698
|
+
function previewFrameOpaque(iframe) {
|
|
1699
|
+
const win = iframe.contentWindow;
|
|
1700
|
+
if (!win) return false;
|
|
1701
|
+
try {
|
|
1702
|
+
void win.document;
|
|
1703
|
+
return false;
|
|
1704
|
+
} catch {
|
|
1705
|
+
return true;
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
function previewEditingClient(iframe) {
|
|
1709
|
+
const open = clients.get(iframe);
|
|
1710
|
+
if (open) return open;
|
|
1711
|
+
const client = createEditingPortClient({ iframe });
|
|
1712
|
+
clients.set(iframe, client);
|
|
1713
|
+
const onLoad = () => {
|
|
1714
|
+
client.dispose();
|
|
1715
|
+
if (clients.get(iframe) === client) clients.delete(iframe);
|
|
1716
|
+
};
|
|
1717
|
+
iframe.addEventListener("load", onLoad, { once: true });
|
|
1718
|
+
return client;
|
|
1719
|
+
}
|
|
1720
|
+
function setFrameLoopStart(iframe, seconds) {
|
|
1721
|
+
if (!previewFrameOpaque(iframe)) {
|
|
1722
|
+
try {
|
|
1723
|
+
iframe.contentWindow?.__hf?.setLoopStart?.(seconds);
|
|
1724
|
+
} catch {
|
|
1725
|
+
}
|
|
1726
|
+
return;
|
|
1727
|
+
}
|
|
1728
|
+
const client = previewEditingClient(iframe);
|
|
1729
|
+
if (loopStarts.has(client) && loopStarts.get(client) === seconds) return;
|
|
1730
|
+
loopStarts.set(client, seconds);
|
|
1731
|
+
client.request("set-loop-start", { seconds }).catch(() => {
|
|
1732
|
+
if (loopStarts.get(client) === seconds) loopStarts.delete(client);
|
|
1733
|
+
});
|
|
1734
|
+
}
|
|
1735
|
+
var AGENT_PROBE_MS = 1e3;
|
|
1736
|
+
async function previewSeekPainted(iframe, timeoutMs) {
|
|
1737
|
+
const client = previewEditingClient(iframe);
|
|
1738
|
+
let timer;
|
|
1739
|
+
const probe = new Promise(
|
|
1740
|
+
(resolve) => timer = setTimeout(resolve, AGENT_PROBE_MS, false)
|
|
1741
|
+
);
|
|
1742
|
+
const connected = await Promise.race([
|
|
1743
|
+
client.ready.then(
|
|
1744
|
+
() => true,
|
|
1745
|
+
() => false
|
|
1746
|
+
),
|
|
1747
|
+
probe
|
|
1748
|
+
]);
|
|
1749
|
+
clearTimeout(timer);
|
|
1750
|
+
if (connected) await client.request("wait-for-seek", {}, { timeoutMs }).catch(() => {
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1753
|
+
async function previewClipManifest(iframe) {
|
|
1754
|
+
const snapshot = await previewEditingClient(iframe).request("runtime-snapshot", {});
|
|
1755
|
+
const manifest = snapshot?.clipManifest;
|
|
1756
|
+
if (typeof manifest !== "object" || manifest === null) return null;
|
|
1757
|
+
const { clips, durationInFrames } = manifest;
|
|
1758
|
+
if (!Array.isArray(clips) || typeof durationInFrames !== "number") return null;
|
|
1759
|
+
if (!Number.isFinite(durationInFrames)) return null;
|
|
1760
|
+
return manifest;
|
|
1761
|
+
}
|
|
1762
|
+
async function previewComputedStyles(iframe, selector, properties) {
|
|
1763
|
+
const reply = await previewEditingClient(iframe).request("computed-styles", { selector, properties }).catch(() => null);
|
|
1764
|
+
const styles = reply?.styles;
|
|
1765
|
+
if (typeof styles !== "object" || styles === null) return null;
|
|
1766
|
+
const read = {};
|
|
1767
|
+
for (const name of properties) {
|
|
1768
|
+
const value = Object.getOwnPropertyDescriptor(styles, name)?.value;
|
|
1769
|
+
if (typeof value === "string" && value) read[name] = value;
|
|
1770
|
+
}
|
|
1771
|
+
return read;
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1692
1774
|
// src/player/sceneSwap.ts
|
|
1693
1775
|
var SCENES_SWAPPED = "hf-scenes-swapped";
|
|
1694
1776
|
var SCENE_SWAP_MS = 5e3;
|
|
@@ -1760,6 +1842,7 @@ function swapFreshly(swap, url, isCurrent, cancel, reloadWholeFilm, attempt = 0)
|
|
|
1760
1842
|
});
|
|
1761
1843
|
}
|
|
1762
1844
|
function sceneSwapFor(iframe) {
|
|
1845
|
+
if (previewFrameOpaque(iframe)) return null;
|
|
1763
1846
|
const win = iframe.contentWindow;
|
|
1764
1847
|
const swap = win?.__hfSwapScenes;
|
|
1765
1848
|
if (typeof swap !== "function") return null;
|
|
@@ -1818,6 +1901,160 @@ function applyPreviewVariablesToUrl(url) {
|
|
|
1818
1901
|
}
|
|
1819
1902
|
}
|
|
1820
1903
|
|
|
1904
|
+
// src/player/lib/runtimeProtocol.ts
|
|
1905
|
+
import {
|
|
1906
|
+
frameDisplayScale,
|
|
1907
|
+
inspectRuntimeProtocol,
|
|
1908
|
+
runtimeProtocolMetadata
|
|
1909
|
+
} from "@hyperframes/core/runtime/protocol";
|
|
1910
|
+
function createRuntimeControlMessage(action, payload = {}, fps = 30) {
|
|
1911
|
+
return {
|
|
1912
|
+
...payload,
|
|
1913
|
+
source: "hf-parent",
|
|
1914
|
+
type: "control",
|
|
1915
|
+
action,
|
|
1916
|
+
...runtimeProtocolMetadata(fps)
|
|
1917
|
+
};
|
|
1918
|
+
}
|
|
1919
|
+
function postRuntimeControlMessage(target, action, payload = {}, fps = 30) {
|
|
1920
|
+
target?.postMessage(createRuntimeControlMessage(action, payload, fps), "*");
|
|
1921
|
+
}
|
|
1922
|
+
function postFrameDisplayScale(iframe) {
|
|
1923
|
+
const scale = iframe && frameDisplayScale(iframe);
|
|
1924
|
+
if (scale) postRuntimeControlMessage(iframe.contentWindow, "set-display-scale", { scale });
|
|
1925
|
+
}
|
|
1926
|
+
function inspectStudioRuntimeMessage(value) {
|
|
1927
|
+
return inspectRuntimeProtocol(value, 30);
|
|
1928
|
+
}
|
|
1929
|
+
function dispatchRuntimeProtocolError(inspection) {
|
|
1930
|
+
if (inspection.status !== "unsupported") return;
|
|
1931
|
+
window.dispatchEvent(
|
|
1932
|
+
new CustomEvent("runtimeprotocolerror", {
|
|
1933
|
+
detail: {
|
|
1934
|
+
code: inspection.code,
|
|
1935
|
+
receivedVersion: inspection.receivedVersion
|
|
1936
|
+
}
|
|
1937
|
+
})
|
|
1938
|
+
);
|
|
1939
|
+
}
|
|
1940
|
+
function acceptStudioRuntimeMessage(value) {
|
|
1941
|
+
const inspection = inspectStudioRuntimeMessage(value);
|
|
1942
|
+
if (inspection.status !== "unsupported") return inspection;
|
|
1943
|
+
dispatchRuntimeProtocolError(inspection);
|
|
1944
|
+
return null;
|
|
1945
|
+
}
|
|
1946
|
+
function acceptedRuntimeMessageFps(value) {
|
|
1947
|
+
const inspection = inspectStudioRuntimeMessage(value);
|
|
1948
|
+
return inspection.status === "supported" ? inspection.fps : 30;
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
// src/player/lib/bridgePlayback.ts
|
|
1952
|
+
var SEEK_CONFIRM_MS = 500;
|
|
1953
|
+
var LOWEST_FPS = 1;
|
|
1954
|
+
var mirrors = /* @__PURE__ */ new WeakMap();
|
|
1955
|
+
function mirrorOf(iframe) {
|
|
1956
|
+
const frame = iframe.contentWindow;
|
|
1957
|
+
if (!frame) return null;
|
|
1958
|
+
let mirror = mirrors.get(frame);
|
|
1959
|
+
if (!mirror) {
|
|
1960
|
+
mirror = {
|
|
1961
|
+
iframe,
|
|
1962
|
+
time: 0,
|
|
1963
|
+
duration: 0,
|
|
1964
|
+
playing: false,
|
|
1965
|
+
seekTo: null,
|
|
1966
|
+
seekUntil: 0,
|
|
1967
|
+
stageSize: null
|
|
1968
|
+
};
|
|
1969
|
+
mirrors.set(frame, mirror);
|
|
1970
|
+
}
|
|
1971
|
+
mirror.iframe = iframe;
|
|
1972
|
+
return mirror;
|
|
1973
|
+
}
|
|
1974
|
+
function watchPreviewFrame(iframe) {
|
|
1975
|
+
mirrorOf(iframe);
|
|
1976
|
+
}
|
|
1977
|
+
function previewStageSize(iframe) {
|
|
1978
|
+
const frame = iframe.contentWindow;
|
|
1979
|
+
return (frame && mirrors.get(frame)?.stageSize) ?? null;
|
|
1980
|
+
}
|
|
1981
|
+
function frameOrigins(iframe) {
|
|
1982
|
+
const sandbox = iframe.getAttribute("sandbox")?.toLowerCase().split(/\s+/);
|
|
1983
|
+
if (sandbox && !sandbox.includes("allow-same-origin")) return ["null"];
|
|
1984
|
+
const src = iframe.getAttribute("src");
|
|
1985
|
+
if (iframe.hasAttribute("srcdoc") || !src) return [window.location.origin];
|
|
1986
|
+
try {
|
|
1987
|
+
const url = new URL(src, window.location.href);
|
|
1988
|
+
if (url.protocol === "about:") return [window.location.origin];
|
|
1989
|
+
return [url.protocol === "data:" ? "null" : url.origin];
|
|
1990
|
+
} catch {
|
|
1991
|
+
return [];
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
var finiteAtLeastZero = (value) => typeof value === "number" && Number.isFinite(value) && value >= 0;
|
|
1995
|
+
var finitePositive = (value) => finiteAtLeastZero(value) && value > 0;
|
|
1996
|
+
function confirmsSeek(currentTime, seekTo, fps) {
|
|
1997
|
+
if (fps === null) return Math.abs(currentTime - seekTo) <= 0.5 / LOWEST_FPS;
|
|
1998
|
+
return Math.abs(currentTime - Math.floor(seekTo * fps + 1e-9) / fps) < 0.5 / fps;
|
|
1999
|
+
}
|
|
2000
|
+
function runtimePost(data) {
|
|
2001
|
+
if (typeof data !== "object" || data === null) return null;
|
|
2002
|
+
const message = data;
|
|
2003
|
+
if (message.source !== "hf-preview") return null;
|
|
2004
|
+
const inspection = inspectStudioRuntimeMessage(message);
|
|
2005
|
+
if (inspection.status === "unsupported") return null;
|
|
2006
|
+
return { message, fps: inspection.status === "supported" ? inspection.fps : null };
|
|
2007
|
+
}
|
|
2008
|
+
function mirrorState(mirror, currentTime, playing, fps) {
|
|
2009
|
+
const { seekTo } = mirror;
|
|
2010
|
+
const waiting = seekTo !== null && performance.now() < mirror.seekUntil;
|
|
2011
|
+
if (waiting && !confirmsSeek(currentTime, seekTo, fps)) return;
|
|
2012
|
+
mirror.seekTo = null;
|
|
2013
|
+
mirror.time = currentTime;
|
|
2014
|
+
mirror.playing = playing;
|
|
2015
|
+
}
|
|
2016
|
+
function mirrorPost(mirror, message, fps) {
|
|
2017
|
+
if (message.type === "timeline" && finiteAtLeastZero(message.durationSeconds)) {
|
|
2018
|
+
mirror.duration = message.durationSeconds;
|
|
2019
|
+
} else if (message.type === "state" && finiteAtLeastZero(message.currentTime)) {
|
|
2020
|
+
mirrorState(mirror, message.currentTime, message.isPlaying === true, fps);
|
|
2021
|
+
} else if (message.type === "stage-size") {
|
|
2022
|
+
const { width, height } = message;
|
|
2023
|
+
if (finitePositive(width) && finitePositive(height)) mirror.stageSize = { width, height };
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
function mirrorRuntimePlayback(event) {
|
|
2027
|
+
const mirror = event.source ? mirrors.get(event.source) : void 0;
|
|
2028
|
+
if (!mirror || !frameOrigins(mirror.iframe).includes(event.origin)) return;
|
|
2029
|
+
const post = runtimePost(event.data);
|
|
2030
|
+
if (post) mirrorPost(mirror, post.message, post.fps);
|
|
2031
|
+
}
|
|
2032
|
+
if (typeof window !== "undefined") window.addEventListener("message", mirrorRuntimePlayback);
|
|
2033
|
+
function bridgePlaybackAdapter(iframe) {
|
|
2034
|
+
const frame = iframe.contentWindow;
|
|
2035
|
+
const mirror = mirrorOf(iframe);
|
|
2036
|
+
if (!frame || !mirror) return null;
|
|
2037
|
+
const send = (action, payload) => postRuntimeControlMessage(frame, action, payload);
|
|
2038
|
+
return {
|
|
2039
|
+
play: () => {
|
|
2040
|
+
send("play");
|
|
2041
|
+
mirror.playing = true;
|
|
2042
|
+
},
|
|
2043
|
+
pause: () => {
|
|
2044
|
+
send("pause");
|
|
2045
|
+
mirror.playing = false;
|
|
2046
|
+
},
|
|
2047
|
+
// The bridge's seek takes no keepPlaying or settled option yet.
|
|
2048
|
+
seek: (time) => {
|
|
2049
|
+
send("seek", { timeSeconds: time });
|
|
2050
|
+
Object.assign(mirror, { time, seekTo: time, seekUntil: performance.now() + SEEK_CONFIRM_MS });
|
|
2051
|
+
},
|
|
2052
|
+
getTime: () => mirror.time,
|
|
2053
|
+
getDuration: () => mirror.duration,
|
|
2054
|
+
isPlaying: () => mirror.playing
|
|
2055
|
+
};
|
|
2056
|
+
}
|
|
2057
|
+
|
|
1821
2058
|
// src/player/components/Player.tsx
|
|
1822
2059
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
1823
2060
|
var playerModule = null;
|
|
@@ -2054,6 +2291,7 @@ var Player = forwardRef(
|
|
|
2054
2291
|
loadIdRef.current += 1;
|
|
2055
2292
|
player.setAttribute("src", src);
|
|
2056
2293
|
container.appendChild(player);
|
|
2294
|
+
watchPreviewFrame(iframe);
|
|
2057
2295
|
enableInteractiveIframe(player);
|
|
2058
2296
|
cleanup = () => {
|
|
2059
2297
|
iframe.removeEventListener("load", handleLoad);
|
|
@@ -2306,6 +2544,11 @@ export {
|
|
|
2306
2544
|
previewReloadBegun,
|
|
2307
2545
|
whileScriptWrites,
|
|
2308
2546
|
isPreviewChanging,
|
|
2547
|
+
previewFrameOpaque,
|
|
2548
|
+
setFrameLoopStart,
|
|
2549
|
+
previewSeekPainted,
|
|
2550
|
+
previewClipManifest,
|
|
2551
|
+
previewComputedStyles,
|
|
2309
2552
|
announcePreviewDocumentLoaded,
|
|
2310
2553
|
onPreviewDocumentLoaded,
|
|
2311
2554
|
onPreviewContentReplaced,
|
|
@@ -2315,5 +2558,13 @@ export {
|
|
|
2315
2558
|
supersededByNewerEdit,
|
|
2316
2559
|
swapFreshly,
|
|
2317
2560
|
sceneSwapFor,
|
|
2561
|
+
postRuntimeControlMessage,
|
|
2562
|
+
postFrameDisplayScale,
|
|
2563
|
+
inspectStudioRuntimeMessage,
|
|
2564
|
+
acceptStudioRuntimeMessage,
|
|
2565
|
+
acceptedRuntimeMessageFps,
|
|
2566
|
+
previewStageSize,
|
|
2567
|
+
frameOrigins,
|
|
2568
|
+
bridgePlaybackAdapter,
|
|
2318
2569
|
Player
|
|
2319
2570
|
};
|
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
resolveDomEditCapabilities,
|
|
20
20
|
resolveDomEditSelection,
|
|
21
21
|
serializeDomEditTextFields
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-ATDO3YLX.js";
|
|
23
|
+
import "./chunk-44VRMER6.js";
|
|
24
24
|
import "./chunk-MLKGABMK.js";
|
|
25
25
|
export {
|
|
26
26
|
buildDefaultDomEditTextField,
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import { GsapAnimation, ParsedGsap, PropertyGroupName } from '@hyperframes/core/
|
|
|
6
6
|
import { GsapAnimation as GsapAnimation$1, ArcPathSegment } from '@hyperframes/parsers/gsap-parser';
|
|
7
7
|
import { Composition } from '@hyperframes/sdk';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
|
+
import { S as StudioKeys, a as StudioKeyAction } from './keys-CaWcxUST.js';
|
|
10
|
+
export { C as Combo, D as DEFAULT_STUDIO_KEYS, f as formatCombo, m as matchCombo, p as parseCombo } from './keys-CaWcxUST.js';
|
|
9
11
|
import * as zustand from 'zustand';
|
|
10
12
|
import { StoreApi } from 'zustand';
|
|
11
13
|
export { Player } from './player.js';
|
|
@@ -23,90 +25,6 @@ import '@base-ui/react/context-menu';
|
|
|
23
25
|
import '@base-ui/react/menu';
|
|
24
26
|
import '@base-ui/react/popover';
|
|
25
27
|
|
|
26
|
-
interface Combo {
|
|
27
|
-
mod: boolean;
|
|
28
|
-
meta: boolean;
|
|
29
|
-
ctrl: boolean;
|
|
30
|
-
shift: boolean;
|
|
31
|
-
alt: boolean;
|
|
32
|
-
key: string;
|
|
33
|
-
named: boolean;
|
|
34
|
-
}
|
|
35
|
-
/** "mod+shift+z", "Space", "b": mod is Cmd or Ctrl; Ctrl+Alt is refused because Windows sends AltGr as Ctrl+Alt. */
|
|
36
|
-
declare function parseCombo(text: string): Combo | null;
|
|
37
|
-
type ComboEvent = Pick<KeyboardEvent, "key" | "altKey" | "ctrlKey" | "metaKey" | "shiftKey"> & {
|
|
38
|
-
code?: string;
|
|
39
|
-
};
|
|
40
|
-
declare function matchCombo(e: ComboEvent, c: Combo): boolean;
|
|
41
|
-
declare function formatCombo(c: Combo): string;
|
|
42
|
-
|
|
43
|
-
/** Every single-character bare key Studio answers, by action. */
|
|
44
|
-
declare const DEFAULT_STUDIO_KEYS: {
|
|
45
|
-
fullscreen: string;
|
|
46
|
-
split: string;
|
|
47
|
-
record: string;
|
|
48
|
-
addKeyframe: string;
|
|
49
|
-
audioGain: string;
|
|
50
|
-
zoomSelection: string;
|
|
51
|
-
mute: string;
|
|
52
|
-
pause: string;
|
|
53
|
-
shuttleBack: string;
|
|
54
|
-
shuttleForward: string;
|
|
55
|
-
inPoint: string;
|
|
56
|
-
outPoint: string;
|
|
57
|
-
seekToIn: string;
|
|
58
|
-
seekToOut: string;
|
|
59
|
-
selectTool: string;
|
|
60
|
-
razorTool: string;
|
|
61
|
-
selectLeftward: string;
|
|
62
|
-
selectRightward: string;
|
|
63
|
-
exitRazor: string;
|
|
64
|
-
snap: string;
|
|
65
|
-
grid: string;
|
|
66
|
-
timelineSnap: string;
|
|
67
|
-
playPause: string;
|
|
68
|
-
frameBack: string;
|
|
69
|
-
frameForward: string;
|
|
70
|
-
frameBackTen: string;
|
|
71
|
-
frameForwardTen: string;
|
|
72
|
-
loop: string;
|
|
73
|
-
clearInPoint: string;
|
|
74
|
-
clearOutPoint: string;
|
|
75
|
-
undo: string;
|
|
76
|
-
redo: string;
|
|
77
|
-
redoAlt: string;
|
|
78
|
-
tabCompositions: string;
|
|
79
|
-
tabAssets: string;
|
|
80
|
-
group: string;
|
|
81
|
-
ungroup: string;
|
|
82
|
-
copy: string;
|
|
83
|
-
paste: string;
|
|
84
|
-
cut: string;
|
|
85
|
-
duplicate: string;
|
|
86
|
-
linkToggle: string;
|
|
87
|
-
detachAudio: string;
|
|
88
|
-
deleteLinked: string;
|
|
89
|
-
deleteLinkedAlt: string;
|
|
90
|
-
deleteSelected: string;
|
|
91
|
-
deleteSelectedAlt: string;
|
|
92
|
-
resetKeyframes: string;
|
|
93
|
-
nudgeLeft: string;
|
|
94
|
-
nudgeRight: string;
|
|
95
|
-
nudgeUp: string;
|
|
96
|
-
nudgeDown: string;
|
|
97
|
-
nudgeLeftTen: string;
|
|
98
|
-
nudgeRightTen: string;
|
|
99
|
-
nudgeUpTen: string;
|
|
100
|
-
nudgeDownTen: string;
|
|
101
|
-
captionSelectAll: string;
|
|
102
|
-
pickupClip: string;
|
|
103
|
-
pickupUp: string;
|
|
104
|
-
pickupDown: string;
|
|
105
|
-
pickupDrop: string;
|
|
106
|
-
cancel: string;
|
|
107
|
-
};
|
|
108
|
-
type StudioKeyAction = keyof typeof DEFAULT_STUDIO_KEYS;
|
|
109
|
-
type StudioKeys = Readonly<Record<StudioKeyAction, string>>;
|
|
110
28
|
declare function studioKeyClash(action: StudioKeyAction, text: string, keys?: StudioKeys): StudioKeyAction | null;
|
|
111
29
|
/** Replaces the host key map; a bad map is refused whole. null restores the defaults. */
|
|
112
30
|
declare function setStudioKeys(overrides: Partial<Record<StudioKeyAction, string>> | null): void;
|
|
@@ -4480,4 +4398,4 @@ declare function buildStudioTools(depsRef: {
|
|
|
4480
4398
|
readonly current: StudioAgentToolsDeps;
|
|
4481
4399
|
}): ModelContextTool[];
|
|
4482
4400
|
|
|
4483
|
-
export { type AgentModalAnchorPoint, type AgentPromptElementInfo, AskAgentModal, type AskAgentModalProps, AudioMeterStrip, type AudioMeterStripProps, AudioWaveform, type AudioWaveformProps, type BlockedTimelineEditIntent, type CanEditTimelineElement, ColorField,
|
|
4401
|
+
export { type AgentModalAnchorPoint, type AgentPromptElementInfo, AskAgentModal, type AskAgentModalProps, AudioMeterStrip, type AudioMeterStripProps, AudioWaveform, type AudioWaveformProps, type BlockedTimelineEditIntent, type CanEditTimelineElement, ColorField, CompositionBreadcrumb, type CompositionDimensions, type CompositionLevel, CompositionThumbnail, ConnectedDomEditOverlay, type ConnectedDomEditOverlayProps, DEFAULT_SHORTCUT_SECTIONS, Dock, type DockController, type DomEditCapabilities, type DomEditCommitDeclineReason, type DomEditCommitOutcome, type DomEditGroupPathOffsetCommit, DomEditOverlay, type DomEditOverlayProps, DomEditProvider, type DomEditSelection, type DomEditZOrder, type DomGeometryCommits, type EditHistoryHandle, EditorShell, type EditorShellProps, type ExternalFileChangeBlockedState, type ExternalFileChangeCoordinatorHandle, ExternalFileConflictBanner, type FadeEdge, type FadeHandleBox, type FadeHandleClipBox, type FfmpegStatus, FileTree, GradientField, GridOverlay, ImageThumbnail, type ImageThumbnailProps, LayersPanel, type LayersPanelHost, type LinkShortcutCallbacks, type MarqueeBand, type MarqueeGestures, type MarqueeGesturesDeps, MarqueeOverlay, type MarqueeOverlayProps, type Rect$1 as MarqueeRect, type MarqueeSelectionMode, type ModelContextTool, NLEPreview, type PanelId, type PatchOperation, type PersistedRenderSettings, type PickedElement, type PlaybackHealth, PlayerControls, type PlayerHandle, type PlayerHandleElement, type PlayerHandleListener, type PlayerHandleTimeListener, type DomEditCompositionRect as PreviewCompositionRect, type PreviewCopies, type PreviewFacts, PreviewGuides, PreviewOverlayProvider, type PreviewOverlayProviderProps, type PreviewPromotion, type PreviewQualityChosenBy, PreviewReadOnlyProvider, type PreviewSnapPreferences, PropertyPanel, type RenderJob, RenderQueue, type RenderQueueProps, type ResolutionPreset, SNAP_THRESHOLD_PX, type ShortcutHint, type ShortcutSection, ShortcutsButton, type ShortcutsButtonProps, type SnapContext, type SnapEdge, type SnapGuide, SnapGuideOverlay, type SnapGuideOverlayProps, type SnapGuidesState, type Rect as SnapRect, type SnapResult, type SnapTarget, SnapToolbar, SourceEditor, type SpacingGuide, type StartRenderOptions, type StudioAgentToolsDeps, StudioApp, StudioFileConflictError, StudioKeyAction, StudioKeys, type StudioLookSnapshot, type StudioPendingEditsDrainResult, TRACK_H, type ThumbnailPriority, type ThumbnailStill, Timeline, TimelineClipMenu, type TimelineClipMenuItem, type TimelineClipRenderContext, type TimelineEditCallbacks, type TimelineEditOutcome, type TimelineEditPermission, TimelineEditPopover, TimelineEditProvider, type TimelineElement, TimelineEmptyStatePart, TimelineFrame, TimelineGapMenu, TimelineHistoryButtons, type TimelineHistoryButtonsProps, TimelineKeyframeMenu, TimelineLanes, TimelineOverlays, TimelinePane, type TimelinePaneProps, TimelinePlayhead, TimelineProvider, TimelineRazorGuide, TimelineRuler, TimelineShortcutHint, type TimelineTheme, type TimelineTimeRange$1 as TimelineTimeRange, TimelineToolbar, type TimelineToolbarProps, type TimelineTrackPadding, type TimelineZIndexReorderCommit, type ToolResult, type UseClipboardOptions, type UseDomEditSessionParams, type UseDomGeometryCommitOptions, type UseDomStyleCommitOptions, type UseEditHistoryActionsOptions, type UsePersistentEditHistoryOptions, type UsePreviewPersistenceParams, type UseProjectFileWriterOptions, type UseRenderClipContentOptions, type UseThumbnailStillOptions, type UseTimelineEditingOptions, VideoThumbnail, type ZOrderAction, announcePreviewDocumentLoaded, applyPatch, buildCompositionSnapTarget, buildGridSnapEdges, buildPickerAgentContextPreview, buildPickerAgentPrompt, buildShortcutSections, buildStudioTools, cancelNewestStudioWaitingPress, collectSnapContext, collectStudioLookScene, currentTimelineRange, dispatchLinkShortcut, displayTrackOrder, extractSnapTargets, fadeHandleBoxes, findElementBlock, flushStudioPendingEdits, formatTime, getPersistedRenderSettings, getStudioKeys, liveTime, mergeStyleIntoTag, openAudioGainDialog, parseStyleString, persistRenderSettings, resolveDomEditSelection, resolveEquidistanceGuides, resolveGuideLineRect, resolveIframe, resolveMarqueeMode, resolveSnapAdjustment, resolveSourceFile, revertNewestStudioPendingEdit, setStudioKeys, snapEngagedForTravel, studioKeyClash, useAudioGainDialogStore, useAudioMetersVisible, useClipboard, useCompositionStack, useDockLayoutStore, useDomEditSelectionContext, useDomEditSession, useDomEditZOrder, useDomGeometryCommit, useDomStyleCommit, useEditHistoryActions, useElementPicker, useLivePreviewIframe, useMarqueeGestures, usePersistentEditHistory, usePlayerHandle, usePlayerStore, usePreviewCompositionRect, usePreviewGuidesStore, usePreviewIframeStore, usePreviewOverlayContext, usePreviewPersistence, useProjectFileWriter, useRenderClipContent, useRenderQueue, useStudioKeys, useThumbnailStill, useTimelineContext, useTimelineEditing, useTimelinePlayer, zoomTimelineToRange };
|
package/dist/index.html
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
document.documentElement.dataset.theme = "paper";
|
|
15
15
|
}
|
|
16
16
|
</script>
|
|
17
|
-
<script type="module" crossorigin src="/assets/index-
|
|
18
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/assets/index-_pkzoYYF.js"></script>
|
|
18
|
+
<link rel="stylesheet" crossorigin href="/assets/index-4VGEAZyf.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|
|
21
21
|
<div data-hf-id="hf-aph5" id="root"></div>
|