@hyperframes/studio 0.9.51 → 0.9.53

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.
Files changed (59) hide show
  1. package/dist/assets/{hyperframes-player-i4dtJlrd.js → hyperframes-player-z7r-N5fm.js} +2 -2
  2. package/dist/assets/{index-Be_pDhIw.js → index-2QPHxCxy.js} +1 -1
  3. package/dist/assets/{index-CU24FmKd.css → index-CRiuMxyq.css} +1 -1
  4. package/dist/assets/{index-Dvlt50yp.js → index-Dpo7Q_9-.js} +160 -160
  5. package/dist/assets/index-Dv67Vrl6.js +74 -0
  6. package/dist/assets/{pausedVideoDecoder-C_20YkSR.js → pausedVideoDecoder-BarDYEAf.js} +1 -1
  7. package/dist/{chunk-67DSVBEI.js → chunk-F6EHWNZU.js} +1 -1
  8. package/dist/{chunk-ZNUWV4FN.js → chunk-G6FJSL7X.js} +16 -8
  9. package/dist/chunk-USW3YBOG.js +70 -0
  10. package/dist/index.d.ts +7 -6
  11. package/dist/index.html +2 -2
  12. package/dist/index.js +49 -79
  13. package/dist/keys.d.ts +72 -1
  14. package/dist/keys.js +5 -4
  15. package/dist/player.js +2 -2
  16. package/dist/styles.css +1 -1
  17. package/dist/ui.d.ts +3 -1
  18. package/dist/ui.js +3 -1
  19. package/package.json +9 -9
  20. package/src/captions/keyboard.ts +1 -1
  21. package/src/components/RightPanelTabs.test.tsx +1 -1
  22. package/src/components/StudioHeader.dom.test.tsx +1 -1
  23. package/src/components/TimelineHistoryButtons.dom.test.tsx +1 -1
  24. package/src/components/TimelineToolbar.tsx +1 -1
  25. package/src/components/editor/SnapToolbar.tsx +1 -1
  26. package/src/components/editor/useDomEditNudge.ts +1 -1
  27. package/src/components/panels/SlideshowPanel.tsx +1 -1
  28. package/src/components/renders/RenderQueue.test.tsx +1 -1
  29. package/src/components/ui/Button.test.tsx +1 -1
  30. package/src/components/ui/Menu.test.tsx +6 -4
  31. package/src/components/ui/Menu.tsx +8 -5
  32. package/src/components/ui/index.ts +1 -0
  33. package/src/components/ui/valueControls.test.tsx +1 -1
  34. package/src/hooks/appHotkeysDispatch.ts +1 -1
  35. package/src/hooks/linkShortcuts.ts +1 -1
  36. package/src/hooks/useAutomationSelectionKeyboard.ts +1 -1
  37. package/src/hooks/useKeyframeKeyboard.ts +1 -1
  38. package/src/index.ts +2 -2
  39. package/src/keys.test.ts +5 -7
  40. package/src/keys.ts +1 -6
  41. package/src/player/components/ShortcutsPanel.tsx +1 -1
  42. package/src/player/components/studioCombo.test.ts +1 -1
  43. package/src/player/components/studioShortcuts.ts +1 -1
  44. package/src/player/lib/playbackShortcuts.ts +3 -28
  45. package/src/ui.ts +1 -0
  46. package/src/utils/studioHelpers.ts +1 -1
  47. package/src/utils/studioPendingEdits.ts +1 -1
  48. package/src/utils/timelineDiscovery.ts +1 -1
  49. package/src/utils/typingTarget.test.ts +1 -1
  50. package/src/webmcp/polyfill.transport.test.ts +13 -3
  51. package/src/webmcp/types.ts +3 -3
  52. package/src/webmcp/useStudioAgentTools.polyfill.test.tsx +89 -121
  53. package/src/webmcp/useStudioAgentTools.test.tsx +2 -2
  54. package/src/webmcp/useStudioAgentTools.ts +2 -3
  55. package/dist/assets/index-BX3KHhGX.js +0 -71
  56. package/dist/chunk-5ZHKYODQ.js +0 -149
  57. package/dist/keys-B163OjLN.d.ts +0 -87
  58. package/src/player/components/studioCombo.ts +0 -108
  59. package/src/utils/typingTarget.ts +0 -56
@@ -1 +1 @@
1
- import{Input as V,ALL_FORMATS as G,UrlSource as K,VideoSampleSink as Q}from"./index-Be_pDhIw.js";import{l as X}from"./index-Dvlt50yp.js";const x=1e-5,k=1e-9,T=h=>!h.variableFrameRate&&(h.frameRate??0)>0;function Y(h,s){const{sourceLead:r,inputLead:l,timeResolution:d,frameRate:p=0}=s;if(!T(s))return Math.max(l,h-r+l)+k;const w=Math.max(0,Math.floor((h-r)*p+k)),f=l+w/p;return(d>0?Math.round(f*d)/d:f)+x}function J(h,s,r){const{frameRate:l=0,sourceLead:d,inputLead:p}=r,w=T(r)?Math.round((h-p)*l)/l+d:h-p+d,f=Math.min(s,w);return{timestamp:f,duration:Math.max(T(r)?1/l:0,s-f+x)}}const E=64*1024*1024,M=4,Z=.5,$=2e3;async function q(h,s){if(!h.transparent)return h.sink.getSample(s);let r=null;try{for await(const l of h.sink.samplesAtTimestamps([s]))r==null||r.close(),r=l;return r}catch(l){throw r==null||r.close(),l}}function ot(h){const s=new Map,r=new Map,l=new Map,d=new Map,p=new Map;let w=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(([i])=>e.endsWith(i)).sort(([i],[a])=>a.length-i.length)[0])==null?void 0:n[1]},b=(t=E)=>{for(const[e,o]of p){if(w<=t)break;e.pins>0||(p.delete(e),o.cache.delete(e.timestamp),w-=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),w-=o.bytes,o.image.close();t.cache.clear(),t.canvas.width=t.canvas.height=0})();return t.transparent?new Promise((o,n)=>{const i=setTimeout(()=>{t.cancelReads(),o()},$);e.then(o,n).finally(()=>clearTimeout(i))}):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&&(s.delete(t.key),v(t))},1e4))},D=async t=>{const e=X("thumbnail"),o=new V({source:new K(t,e),formats:G});l.set(o,e.cancelReads);try{const n=await o.getPrimaryVideoTrack();if(!n||f)throw new Error("Preview video unavailable");const[i,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()]),g=document.createElement("canvas");g.width=Math.max(1,Math.ceil(i));const z=F%180===0?m/S:S/m;return g.height=Math.max(1,Math.round(g.width/z)),{key:t,input:o,cancelReads:e.cancelReads,sink:new Q(n),canvas:g,rotation:F,flip:B,width:i,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 s){if(s.size<M)break;const e=r.get(t);e&&e.users===0&&![...e.cache.values()].some(o=>o.pins>0)&&(s.delete(t),v(e))}if(s.size>=M)throw new Error("Preview decoder budget reached")},L=async t=>{const e=t;if((d.get(e)??0)>performance.now())throw new Error("Preview decoder cooling down");let o=s.get(e);o||(I(),o=D(t),s.set(e,o)),s.delete(e),s.set(e,o);let n;try{n=await o}catch(i){throw s.get(e)===o&&(s.delete(e),d.set(e,performance.now()+5e3)),i}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 i=n.value;let a=!1;try{if(R(t,o),i.timestamp>e+1e-6)return null;if(a=i.timestamp+i.duration>e+1e-6,a)return i}finally{a||i.close()}}},A=(t,e)=>(e.pins++,p.delete(e),p.set(e,t),e),W=async(t,e,o,n,i)=>{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(i.aborted||f||t.disposed)throw u.close(),i.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(b(E-c.bytes),w+c.bytes>E)throw u.close(),new Error("Preview frame budget reached");return t.cache.set(c.timestamp,c),p.set(c,t),w+=c.bytes,c},U=(t,e,o)=>!t.transparent&&!o.variableFrameRate&&(o.frameRate??0)>0&&e>t.lastTime+1e-6&&e-t.lastTime<=Z,C=async(t,e,o,n)=>{R(t,n);const i=[...t.cache.values()].find(m=>e>=m.timestamp-1e-6&&e<m.timestamp+m.duration-1e-6);if(i)return A(t,i);const a=Y(e,o),u=U(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(()=>{})}},H=(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}},N=async(t,e)=>{e.throwIfAborted();const o=t.source;if(!o)throw new Error("Preview source unavailable");const n=await L(o);try{const i=H(t,n),a=n.tail.then(()=>C(n,t.time,i,e));n.tail=a.then(()=>{},()=>{});const u=await a;let c=!1;return b(),{source:u.image,timestamp:u.timestamp,duration:u.duration,width:n.width,height:n.height,release(){c||(c=!0,u.pins--,b(),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=>N(a,e))),n=o.find(a=>a.status==="rejected"),i=o.flatMap(a=>a.status==="fulfilled"?[a.value]:[]);if(n||f||e.aborted){for(const a of i)a.release();throw n?n.reason:new DOMException("Preview cancelled","AbortError")}return i},async suspend(){const t=[...s.values()].map(e=>e.then(v).catch(()=>{}));s.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 s.values())t.then(v).catch(()=>{});s.clear(),d.clear()}}}}export{ot as createPausedVideoDecoder};
1
+ import{Input as V,ALL_FORMATS as G,UrlSource as K,VideoSampleSink as Q}from"./index-2QPHxCxy.js";import{l as X}from"./index-Dpo7Q_9-.js";const x=1e-5,k=1e-9,T=h=>!h.variableFrameRate&&(h.frameRate??0)>0;function Y(h,s){const{sourceLead:r,inputLead:l,timeResolution:d,frameRate:p=0}=s;if(!T(s))return Math.max(l,h-r+l)+k;const w=Math.max(0,Math.floor((h-r)*p+k)),f=l+w/p;return(d>0?Math.round(f*d)/d:f)+x}function J(h,s,r){const{frameRate:l=0,sourceLead:d,inputLead:p}=r,w=T(r)?Math.round((h-p)*l)/l+d:h-p+d,f=Math.min(s,w);return{timestamp:f,duration:Math.max(T(r)?1/l:0,s-f+x)}}const E=64*1024*1024,M=4,Z=.5,$=2e3;async function q(h,s){if(!h.transparent)return h.sink.getSample(s);let r=null;try{for await(const l of h.sink.samplesAtTimestamps([s]))r==null||r.close(),r=l;return r}catch(l){throw r==null||r.close(),l}}function ot(h){const s=new Map,r=new Map,l=new Map,d=new Map,p=new Map;let w=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(([i])=>e.endsWith(i)).sort(([i],[a])=>a.length-i.length)[0])==null?void 0:n[1]},b=(t=E)=>{for(const[e,o]of p){if(w<=t)break;e.pins>0||(p.delete(e),o.cache.delete(e.timestamp),w-=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),w-=o.bytes,o.image.close();t.cache.clear(),t.canvas.width=t.canvas.height=0})();return t.transparent?new Promise((o,n)=>{const i=setTimeout(()=>{t.cancelReads(),o()},$);e.then(o,n).finally(()=>clearTimeout(i))}):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&&(s.delete(t.key),v(t))},1e4))},D=async t=>{const e=X("thumbnail"),o=new V({source:new K(t,e),formats:G});l.set(o,e.cancelReads);try{const n=await o.getPrimaryVideoTrack();if(!n||f)throw new Error("Preview video unavailable");const[i,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()]),g=document.createElement("canvas");g.width=Math.max(1,Math.ceil(i));const z=F%180===0?m/S:S/m;return g.height=Math.max(1,Math.round(g.width/z)),{key:t,input:o,cancelReads:e.cancelReads,sink:new Q(n),canvas:g,rotation:F,flip:B,width:i,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 s){if(s.size<M)break;const e=r.get(t);e&&e.users===0&&![...e.cache.values()].some(o=>o.pins>0)&&(s.delete(t),v(e))}if(s.size>=M)throw new Error("Preview decoder budget reached")},L=async t=>{const e=t;if((d.get(e)??0)>performance.now())throw new Error("Preview decoder cooling down");let o=s.get(e);o||(I(),o=D(t),s.set(e,o)),s.delete(e),s.set(e,o);let n;try{n=await o}catch(i){throw s.get(e)===o&&(s.delete(e),d.set(e,performance.now()+5e3)),i}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 i=n.value;let a=!1;try{if(R(t,o),i.timestamp>e+1e-6)return null;if(a=i.timestamp+i.duration>e+1e-6,a)return i}finally{a||i.close()}}},A=(t,e)=>(e.pins++,p.delete(e),p.set(e,t),e),W=async(t,e,o,n,i)=>{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(i.aborted||f||t.disposed)throw u.close(),i.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(b(E-c.bytes),w+c.bytes>E)throw u.close(),new Error("Preview frame budget reached");return t.cache.set(c.timestamp,c),p.set(c,t),w+=c.bytes,c},U=(t,e,o)=>!t.transparent&&!o.variableFrameRate&&(o.frameRate??0)>0&&e>t.lastTime+1e-6&&e-t.lastTime<=Z,C=async(t,e,o,n)=>{R(t,n);const i=[...t.cache.values()].find(m=>e>=m.timestamp-1e-6&&e<m.timestamp+m.duration-1e-6);if(i)return A(t,i);const a=Y(e,o),u=U(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(()=>{})}},H=(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}},N=async(t,e)=>{e.throwIfAborted();const o=t.source;if(!o)throw new Error("Preview source unavailable");const n=await L(o);try{const i=H(t,n),a=n.tail.then(()=>C(n,t.time,i,e));n.tail=a.then(()=>{},()=>{});const u=await a;let c=!1;return b(),{source:u.image,timestamp:u.timestamp,duration:u.duration,width:n.width,height:n.height,release(){c||(c=!0,u.pins--,b(),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=>N(a,e))),n=o.find(a=>a.status==="rejected"),i=o.flatMap(a=>a.status==="fulfilled"?[a.value]:[]);if(n||f||e.aborted){for(const a of i)a.release();throw n?n.reason:new DOMException("Preview cancelled","AbortError")}return i},async suspend(){const t=[...s.values()].map(e=>e.then(v).catch(()=>{}));s.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 s.values())t.then(v).catch(()=>{});s.clear(),d.clear()}}}}export{ot as createPausedVideoDecoder};
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HyperframesLoader
3
- } from "./chunk-ZNUWV4FN.js";
3
+ } from "./chunk-G6FJSL7X.js";
4
4
  import {
5
5
  buildProjectApiPath,
6
6
  splitTimelineElementKey,
@@ -302,8 +302,8 @@ var popupSurface = cn(
302
302
  );
303
303
  var POPUP_LAYER = "z-200";
304
304
  var menuPopup = cn(popupSurface, "min-w-36 p-1 shadow-menu");
305
- var itemBase = cn(
306
- "flex cursor-default select-none items-center justify-between gap-6 rounded-[calc(var(--radius-lg)+6px)] px-2 py-1.5",
305
+ var menuItemBase = cn(
306
+ "flex cursor-default select-none items-center justify-between gap-6 rounded-[calc(var(--radius-lg)-4px)] px-2 py-1.5",
307
307
  "text-step-11 whitespace-nowrap text-text-1",
308
308
  "outline-hidden transition-colors ease-out-quint duration-hover",
309
309
  "data-[highlighted]:bg-hover data-[highlighted]:text-text-0",
@@ -385,16 +385,23 @@ function MenuShortcut({ className, ...props }) {
385
385
  );
386
386
  }
387
387
  function MenuItem({ shortcut, tone, className, children, ...props }) {
388
- return /* @__PURE__ */ jsxs4(BaseMenu.Item, { className: cn(itemBase, tone === "danger" && itemDanger, className), ...props, children: [
389
- /* @__PURE__ */ jsx6("span", { className: "truncate", children }),
390
- shortcut ? /* @__PURE__ */ jsx6(MenuShortcut, { children: shortcut }) : null
391
- ] });
388
+ return /* @__PURE__ */ jsxs4(
389
+ BaseMenu.Item,
390
+ {
391
+ className: cn(menuItemBase, tone === "danger" && itemDanger, className),
392
+ ...props,
393
+ children: [
394
+ /* @__PURE__ */ jsx6("span", { className: "truncate", children }),
395
+ shortcut ? /* @__PURE__ */ jsx6(MenuShortcut, { children: shortcut }) : null
396
+ ]
397
+ }
398
+ );
392
399
  }
393
400
  function MenuRadioGroup(props) {
394
401
  return /* @__PURE__ */ jsx6(BaseMenu.RadioGroup, { ...props });
395
402
  }
396
403
  function MenuRadioItem({ className, children, ...props }) {
397
- return /* @__PURE__ */ jsxs4(BaseMenu.RadioItem, { className: cn(itemBase, className), ...props, children: [
404
+ return /* @__PURE__ */ jsxs4(BaseMenu.RadioItem, { className: cn(menuItemBase, className), ...props, children: [
398
405
  /* @__PURE__ */ jsx6("span", { className: "truncate", children }),
399
406
  /* @__PURE__ */ jsx6("span", { className: "flex size-3 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx6(BaseMenu.RadioItemIndicator, { className: "size-1.5 rounded-full bg-accent" }) })
400
407
  ] });
@@ -404,7 +411,7 @@ function MenuCheckboxItem({
404
411
  children,
405
412
  ...props
406
413
  }) {
407
- return /* @__PURE__ */ jsxs4(BaseMenu.CheckboxItem, { className: cn(itemBase, className), ...props, children: [
414
+ return /* @__PURE__ */ jsxs4(BaseMenu.CheckboxItem, { className: cn(menuItemBase, className), ...props, children: [
408
415
  /* @__PURE__ */ jsx6("span", { className: "truncate", children }),
409
416
  /* @__PURE__ */ jsx6("span", { className: "flex size-3 shrink-0 items-center justify-center text-accent-ink", children: /* @__PURE__ */ jsx6(BaseMenu.CheckboxItemIndicator, { children: "\u2713" }) })
410
417
  ] });
@@ -969,6 +976,7 @@ export {
969
976
  HyperframesMark,
970
977
  HyperframesLoader,
971
978
  popupSurface,
979
+ menuItemBase,
972
980
  Menu,
973
981
  ContextMenu,
974
982
  MenuShortcut,
@@ -0,0 +1,70 @@
1
+ // src/player/components/studioKeyDefaults.ts
2
+ var DEFAULT_STUDIO_KEYS = {
3
+ fullscreen: "f",
4
+ split: "s",
5
+ record: "r",
6
+ addKeyframe: "k",
7
+ audioGain: "g",
8
+ zoomSelection: "z",
9
+ mute: "m",
10
+ pause: "k",
11
+ shuttleBack: "j",
12
+ shuttleForward: "l",
13
+ inPoint: "i",
14
+ outPoint: "o",
15
+ seekToIn: "a",
16
+ seekToOut: "e",
17
+ selectTool: "v",
18
+ razorTool: "b",
19
+ selectLeftward: "[",
20
+ selectRightward: "]",
21
+ exitRazor: "a",
22
+ snap: "s",
23
+ grid: "g",
24
+ timelineSnap: "n",
25
+ shortcuts: "?",
26
+ playPause: "Space",
27
+ frameBack: "ArrowLeft",
28
+ frameForward: "ArrowRight",
29
+ frameBackTen: "shift+ArrowLeft",
30
+ frameForwardTen: "shift+ArrowRight",
31
+ loop: "shift+l",
32
+ clearInPoint: "shift+i",
33
+ clearOutPoint: "shift+o",
34
+ undo: "mod+z",
35
+ redo: "mod+shift+z",
36
+ redoAlt: "ctrl+y",
37
+ tabCompositions: "mod+1",
38
+ tabAssets: "mod+2",
39
+ group: "mod+g",
40
+ ungroup: "mod+shift+g",
41
+ copy: "mod+c",
42
+ paste: "mod+v",
43
+ cut: "mod+x",
44
+ duplicate: "mod+d",
45
+ linkToggle: "mod+l",
46
+ detachAudio: "alt+shift+d",
47
+ deleteLinked: "alt+Backspace",
48
+ deleteLinkedAlt: "alt+Delete",
49
+ deleteSelected: "Delete",
50
+ deleteSelectedAlt: "Backspace",
51
+ resetKeyframes: "Backspace",
52
+ nudgeLeft: "ArrowLeft",
53
+ nudgeRight: "ArrowRight",
54
+ nudgeUp: "ArrowUp",
55
+ nudgeDown: "ArrowDown",
56
+ nudgeLeftTen: "shift+ArrowLeft",
57
+ nudgeRightTen: "shift+ArrowRight",
58
+ nudgeUpTen: "shift+ArrowUp",
59
+ nudgeDownTen: "shift+ArrowDown",
60
+ captionSelectAll: "mod+a",
61
+ pickupClip: "Space",
62
+ pickupUp: "ArrowUp",
63
+ pickupDown: "ArrowDown",
64
+ pickupDrop: "Enter",
65
+ cancel: "Escape"
66
+ };
67
+
68
+ export {
69
+ DEFAULT_STUDIO_KEYS
70
+ };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { Button, ButtonSize, ButtonVariant, ContextMenu, HyperframesLoader, HyperframesLoaderProps, HyperframesLogo, IconButton, Input, InputProps, Menu, MenuItem, MenuItemTone, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, NumberField, NumberFieldProps, Popover, PopupPreviewState, PreviewState, Select, SelectOption, SelectProps, Slider, SliderProps, Tab, TabPanel, Tabs, TabsList, Toggle, ToggleProps, Tooltip, buttonBase, buttonSizes, buttonVariants, cn, fieldBase, fieldText, popupSurface } from './ui.js';
1
+ export { Button, ButtonSize, ButtonVariant, ContextMenu, HyperframesLoader, HyperframesLoaderProps, HyperframesLogo, IconButton, Input, InputProps, Menu, MenuItem, MenuItemTone, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, NumberField, NumberFieldProps, Popover, PopupPreviewState, PreviewState, Select, SelectOption, SelectProps, Slider, SliderProps, Tab, TabPanel, Tabs, TabsList, Toggle, ToggleProps, Tooltip, buttonBase, buttonSizes, buttonVariants, cn, fieldBase, fieldText, menuItemBase, popupSurface } from './ui.js';
2
2
  import * as react from 'react';
3
3
  import { RefObject, MutableRefObject, ReactNode, DragEventHandler, ComponentProps, RefCallback, MouseEvent, CSSProperties, UIEvent, PointerEvent } from 'react';
4
4
  import { RuntimeTimelineClipIdentity, PlaybackHeldBy, HyperframePickerElementInfo } from '@hyperframes/core';
@@ -7,8 +7,9 @@ import { GsapAnimation as GsapAnimation$1, ArcPathSegment } from '@hyperframes/p
7
7
  import { EditingElementHandle, LayerKind } from '@hyperframes/core/runtime/editing-port';
8
8
  import { Composition } from '@hyperframes/sdk';
9
9
  import * as react_jsx_runtime from 'react/jsx-runtime';
10
- import { S as StudioKeys, a as StudioKeyAction } from './keys-B163OjLN.js';
11
- export { C as Combo, D as DEFAULT_STUDIO_KEYS, f as formatCombo, m as matchCombo, p as parseCombo } from './keys-B163OjLN.js';
10
+ import { StudioKeys, StudioKeyAction } from './keys.js';
11
+ export { DEFAULT_STUDIO_KEYS } from './keys.js';
12
+ export { Combo, formatCombo, matchCombo, parseCombo } from '@hyperframes/core/key-combo';
12
13
  import * as zustand from 'zustand';
13
14
  import { StoreApi } from 'zustand';
14
15
  export { Player } from './player.js';
@@ -4091,8 +4092,8 @@ declare function MarqueeOverlay({ candidateRects, marqueeRect }: MarqueeOverlayP
4091
4092
  * Only the surface Studio registers against is declared. `getTools` and
4092
4093
  * `executeTool` are the consumer side; Studio registers, it does not call.
4093
4094
  *
4094
- * These stay hand-written rather than imported from `@mcp-b/webmcp-types`,
4095
- * which the polyfill pulls in. That package's `registerTool` is overloaded to
4095
+ * These stay hand-written rather than imported from `webmcp-types`, which
4096
+ * the polyfill pulls in. That package's `registerTool` is overloaded to
4096
4097
  * infer argument types from a literal `inputSchema`, which is useful when you
4097
4098
  * register one tool inline and actively hostile when you register a uniform
4098
4099
  * list of them, as `registerStudioTools` does. Narrower is the safe operation
@@ -4133,7 +4134,7 @@ interface ModelContextTool {
4133
4134
  * instead. See `toolResult.ts`.
4134
4135
  *
4135
4136
  * `options` is optional here although the spec always passes it: the
4136
- * `@mcp-b/global` polyfill (through 5.1.0) calls `execute(input)` with no
4137
+ * `@mcp-b/global` polyfill before 6.0 called `execute(input)` with no
4137
4138
  * second argument, so a Studio handler must not depend on receiving one.
4138
4139
  */
4139
4140
  execute: (input: object, options?: ToolExecuteCallbackOptions) => Promise<unknown>;
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-Dvlt50yp.js"></script>
18
- <link rel="stylesheet" crossorigin href="/assets/index-CU24FmKd.css">
17
+ <script type="module" crossorigin src="/assets/index-Dpo7Q_9-.js"></script>
18
+ <link rel="stylesheet" crossorigin href="/assets/index-CRiuMxyq.css">
19
19
  </head>
20
20
  <body>
21
21
  <div data-hf-id="hf-aph5" id="root"></div>
package/dist/index.js CHANGED
@@ -89,7 +89,7 @@ import {
89
89
  whileScriptWrites,
90
90
  writeStudioUiPreferences,
91
91
  zoomToSelectedClips
92
- } from "./chunk-67DSVBEI.js";
92
+ } from "./chunk-F6EHWNZU.js";
93
93
  import {
94
94
  Button,
95
95
  ContextMenu,
@@ -120,16 +120,12 @@ import {
120
120
  cn,
121
121
  fieldBase,
122
122
  fieldText,
123
+ menuItemBase,
123
124
  popupSurface
124
- } from "./chunk-ZNUWV4FN.js";
125
+ } from "./chunk-G6FJSL7X.js";
125
126
  import {
126
- DEFAULT_STUDIO_KEYS,
127
- comboClashKey,
128
- comboText,
129
- formatCombo,
130
- matchCombo,
131
- parseCombo
132
- } from "./chunk-5ZHKYODQ.js";
127
+ DEFAULT_STUDIO_KEYS
128
+ } from "./chunk-USW3YBOG.js";
133
129
  import {
134
130
  DOM_EDIT_LAYER_OBSERVER_INIT,
135
131
  buildDefaultDomEditTextField,
@@ -247,6 +243,13 @@ import { memo as memo35, useCallback as useCallback78 } from "react";
247
243
 
248
244
  // src/player/components/studioShortcuts.ts
249
245
  import { useSyncExternalStore } from "react";
246
+ import {
247
+ comboClashKey,
248
+ comboText,
249
+ formatCombo,
250
+ matchCombo,
251
+ parseCombo
252
+ } from "@hyperframes/core/key-combo";
250
253
  var SHARED_BY_DESIGN = [
251
254
  ["pause", "addKeyframe"],
252
255
  ["seekToIn", "exitRazor"],
@@ -853,39 +856,8 @@ var flatIdle = `${flatBtn} text-text-2 hover:bg-hover hover:text-text-0 active:b
853
856
  var flatActive = `${flatBtn} bg-on text-text-0 hover:bg-on-hover active:scale-[0.98]`;
854
857
  var flatDisabled = `${flatBtn} text-text-off cursor-not-allowed`;
855
858
 
856
- // src/utils/typingTarget.ts
857
- function isTypingTarget(target) {
858
- const element = asElement(target);
859
- if (!element) return false;
860
- if (element.isContentEditable) return true;
861
- return element.closest(TYPING_SELECTOR) !== null;
862
- }
863
- function ownsPlainKeys(target) {
864
- return isTypingTarget(target) || asElement(target)?.closest(KEY_OWNING_CONTROLS) != null;
865
- }
866
- var KEY_OWNING_CONTROLS = "[role='slider'],video[controls],audio[controls]";
867
- var TYPING_SELECTOR = [
868
- "input",
869
- "textarea",
870
- "select",
871
- "[contenteditable]:not([contenteditable='false'])",
872
- "[role='textbox']",
873
- "[role='searchbox']",
874
- "[role='combobox']",
875
- // A switch is a button in the DOM, but the native checkbox it replaces was an
876
- // `input` and matched above. Without this row the shared Toggle would let a
877
- // global shortcut claim Space instead of flipping the control (KTD13).
878
- "[role='switch']",
879
- "[role='dialog'][aria-modal='true']",
880
- ".cm-editor"
881
- ].join(",");
882
- function asElement(target) {
883
- if (!target || typeof target !== "object") return null;
884
- const candidate = target;
885
- return typeof candidate.closest === "function" ? target : null;
886
- }
887
-
888
859
  // src/player/components/ShortcutsPanel.tsx
860
+ import { isTypingTarget } from "@hyperframes/core/typing-target";
889
861
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
890
862
  var STAY_ABOVE = { side: "none", align: "shift", fallbackAxisSide: "none" };
891
863
  function useShortcutsOpen() {
@@ -10068,6 +10040,7 @@ async function retryStudioSave(operation, options = {}) {
10068
10040
  }
10069
10041
 
10070
10042
  // src/utils/studioPendingEdits.ts
10043
+ import { isTypingTarget as isTypingTarget2 } from "@hyperframes/core/typing-target";
10071
10044
  var STUDIO_FLUSH_PENDING_EDITS_EVENT = "hf-studio-flush-pending-edits";
10072
10045
  var pendingEdits = /* @__PURE__ */ new Map();
10073
10046
  var historyClaims = () => 0;
@@ -10100,7 +10073,7 @@ function inspectDrainFailures(results) {
10100
10073
  }
10101
10074
  function focusedField() {
10102
10075
  const active = document.activeElement;
10103
- return active instanceof HTMLElement && isTypingTarget(active) ? active : null;
10076
+ return active instanceof HTMLElement && isTypingTarget2(active) ? active : null;
10104
10077
  }
10105
10078
  function hasStudioPendingEdits() {
10106
10079
  return pendingEdits.size > 0 || focusedField() !== null;
@@ -21660,6 +21633,7 @@ import {
21660
21633
  } from "@hyperframes/core/audio-automation";
21661
21634
 
21662
21635
  // src/utils/studioHelpers.ts
21636
+ import { isTypingTarget as isTypingTarget3 } from "@hyperframes/core/typing-target";
21663
21637
  import { encodeUrlPath as encodeUrlPath2 } from "@hyperframes/parsers";
21664
21638
  function getTimelineElementLabel(element) {
21665
21639
  return element.label || element.id || element.tag;
@@ -21710,7 +21684,7 @@ function isManualGeometryStyleProperty(property) {
21710
21684
  return property === "left" || property === "top" || property === "width" || property === "height";
21711
21685
  }
21712
21686
  function shouldIgnoreHistoryShortcut(target) {
21713
- return isTypingTarget(target);
21687
+ return isTypingTarget3(target);
21714
21688
  }
21715
21689
  function getHistoryShortcutLabel(action) {
21716
21690
  const isMac = typeof navigator !== "undefined" && /Mac|iPhone|iPad|iPod/i.test(navigator.platform);
@@ -21865,6 +21839,7 @@ async function resolveAssetHasAudio(projectId, assetPath) {
21865
21839
  }
21866
21840
 
21867
21841
  // src/hooks/useAutomationSelectionKeyboard.ts
21842
+ import { isTypingTarget as isTypingTarget4 } from "@hyperframes/core/typing-target";
21868
21843
  function elementKeyOf(element) {
21869
21844
  return element.key ?? element.id;
21870
21845
  }
@@ -21964,7 +21939,7 @@ function handleCopy(e, state, lanes, sel) {
21964
21939
  return true;
21965
21940
  }
21966
21941
  function automationOwnsKey(e) {
21967
- if (isTypingTarget(document.activeElement)) return false;
21942
+ if (isTypingTarget4(document.activeElement)) return false;
21968
21943
  const state = usePlayerStore.getState();
21969
21944
  if (matchesKey(e, "copy")) return state.automationSelection !== null;
21970
21945
  if (!matchesKey(e, "paste")) return false;
@@ -21988,7 +21963,7 @@ function useAutomationSelectionKeyboard({
21988
21963
  }) {
21989
21964
  useEffect28(() => {
21990
21965
  const handler = (e) => {
21991
- if (isTypingTarget(document.activeElement)) return;
21966
+ if (isTypingTarget4(document.activeElement)) return;
21992
21967
  if (e.defaultPrevented) return;
21993
21968
  const state = usePlayerStore.getState();
21994
21969
  if (handlePaste(e, state, lanes)) return;
@@ -29165,33 +29140,13 @@ var useCaptionStore = create6((set, get) => ({
29165
29140
  }));
29166
29141
 
29167
29142
  // src/player/lib/playbackShortcuts.ts
29143
+ import { shouldIgnorePlaybackShortcutTarget } from "@hyperframes/core/typing-target";
29168
29144
  var FRAME_STEP_ACTIONS = [
29169
29145
  "frameBack",
29170
29146
  "frameForward",
29171
29147
  "frameBackTen",
29172
29148
  "frameForwardTen"
29173
29149
  ];
29174
- var PLAYBACK_SHORTCUT_IGNORED_SELECTOR = [
29175
- "button",
29176
- "a[href]",
29177
- "[role='button']",
29178
- "[role='checkbox']",
29179
- "[role='menuitem']",
29180
- // Base UI's menu radio item is a `<div>`, so `button` above no longer catches it.
29181
- "[role='menuitemradio']",
29182
- "[role='radio']",
29183
- "[role='spinbutton']"
29184
- ].join(",");
29185
- function shouldIgnorePlaybackShortcutTarget(target) {
29186
- if (ownsPlainKeys(target)) return true;
29187
- if (!target || typeof target !== "object") return false;
29188
- const candidate = target;
29189
- if (typeof candidate.closest !== "function") return false;
29190
- return candidate.closest.call(
29191
- target,
29192
- PLAYBACK_SHORTCUT_IGNORED_SELECTOR
29193
- ) !== null;
29194
- }
29195
29150
  var MODAL_DIALOG_SELECTOR = "[role=dialog][aria-modal=true]";
29196
29151
  function isModalDialogOpen() {
29197
29152
  const doc = globalThis.document;
@@ -37090,7 +37045,11 @@ import { useCallback as useCallback70 } from "react";
37090
37045
  // src/captions/components/CaptionOverlay.tsx
37091
37046
  import { memo as memo27, useEffect as useEffect50, useState as useState49, useCallback as useCallback57, useRef as useRef66 } from "react";
37092
37047
 
37048
+ // src/utils/timelineDiscovery.ts
37049
+ import { isTypingTarget as isTypingTarget5 } from "@hyperframes/core/typing-target";
37050
+
37093
37051
  // src/captions/keyboard.ts
37052
+ import { ownsPlainKeys } from "@hyperframes/core/typing-target";
37094
37053
  function resolveCaptionNudge(event, target) {
37095
37054
  if (target != null && ownsPlainKeys(target)) return null;
37096
37055
  return resolveCanvasNudgeDelta(event);
@@ -37396,7 +37355,7 @@ var CaptionOverlay = memo27(function CaptionOverlay2({ iframeRef }) {
37396
37355
  }
37397
37356
  return;
37398
37357
  }
37399
- if (matchesKey(e, "captionSelectAll") && !isTypingTarget(e.target)) {
37358
+ if (matchesKey(e, "captionSelectAll") && !isTypingTarget5(e.target)) {
37400
37359
  e.preventDefault();
37401
37360
  store.selectAll();
37402
37361
  return;
@@ -42957,6 +42916,7 @@ function createDomEditOverlayGestureHandlers(opts) {
42957
42916
 
42958
42917
  // src/components/editor/useDomEditNudge.ts
42959
42918
  import { useCallback as useCallback61, useEffect as useEffect54, useRef as useRef70 } from "react";
42919
+ import { ownsPlainKeys as ownsPlainKeys2 } from "@hyperframes/core/typing-target";
42960
42920
  function selectionIdentityKey(selection) {
42961
42921
  if (!selection) return "";
42962
42922
  return [
@@ -42983,7 +42943,7 @@ function resolveSingleNudgeTarget(sel, rect) {
42983
42943
  function shouldIgnoreNudgeKey(p, event) {
42984
42944
  if (!p.allowCanvasMovement || event.defaultPrevented) return true;
42985
42945
  if (p.gestureRef.current || p.groupGestureRef.current || p.blockedMoveRef.current) return true;
42986
- return ownsPlainKeys(event.target);
42946
+ return ownsPlainKeys2(event.target);
42987
42947
  }
42988
42948
  function useDomEditNudge(params) {
42989
42949
  const sessionRef = useRef70(null);
@@ -50908,6 +50868,7 @@ var MotionPathOverlay = memo31(function MotionPathOverlay2({
50908
50868
  // src/components/editor/SnapToolbar.tsx
50909
50869
  import { memo as memo32, useCallback as useCallback69, useEffect as useEffect67, useRef as useRef83, useState as useState62 } from "react";
50910
50870
  import { MagnetStraight, GridFour, Path, Ruler, FrameCorners } from "@phosphor-icons/react";
50871
+ import { ownsPlainKeys as ownsPlainKeys3 } from "@hyperframes/core/typing-target";
50911
50872
  import { jsx as jsx117, jsxs as jsxs82 } from "react/jsx-runtime";
50912
50873
  var SnapToolbar = memo32(function SnapToolbar2() {
50913
50874
  const keys = useStudioKeys();
@@ -50946,7 +50907,7 @@ var SnapToolbar = memo32(function SnapToolbar2() {
50946
50907
  useEffect67(() => {
50947
50908
  const handleKeyDown = (e) => {
50948
50909
  if (e.defaultPrevented) return;
50949
- if (ownsPlainKeys(e.target)) return;
50910
+ if (ownsPlainKeys3(e.target)) return;
50950
50911
  if (e.target instanceof HTMLIFrameElement) return;
50951
50912
  if (matchesKey(e, "snap")) {
50952
50913
  e.preventDefault();
@@ -55147,7 +55108,11 @@ function EditorShellBody({
55147
55108
  );
55148
55109
  }
55149
55110
 
55111
+ // src/index.ts
55112
+ import { formatCombo as formatCombo2, matchCombo as matchCombo2, parseCombo as parseCombo2 } from "@hyperframes/core/key-combo";
55113
+
55150
55114
  // src/hooks/linkShortcuts.ts
55115
+ import { isTypingTarget as isTypingTarget6 } from "@hyperframes/core/typing-target";
55151
55116
  var ACTIONS = [
55152
55117
  ["linkToggle", "linkToggle"],
55153
55118
  ["detachAudio", "detachAudio"],
@@ -55159,7 +55124,7 @@ var shortcutOf = (event) => {
55159
55124
  return hit ? keyHint(hit[1]) : null;
55160
55125
  };
55161
55126
  function dispatchLinkShortcut(event, cb) {
55162
- if (isTypingTarget(event.target)) return false;
55127
+ if (isTypingTarget6(event.target)) return false;
55163
55128
  const shortcut = shortcutOf(event);
55164
55129
  if (!shortcut) return false;
55165
55130
  const { elements, selectedElementId, selectedElementIds } = usePlayerStore.getState();
@@ -90500,6 +90465,7 @@ function useBlockHandlers({
90500
90465
  import { useCallback as useCallback159, useEffect as useEffect135, useRef as useRef165 } from "react";
90501
90466
 
90502
90467
  // src/hooks/appHotkeysDispatch.ts
90468
+ import { isTypingTarget as isTypingTarget7, ownsPlainKeys as ownsPlainKeys4 } from "@hyperframes/core/typing-target";
90503
90469
  function handleUndoRedoKey(event, onUndo, onRedo) {
90504
90470
  const isUndo = matchesKey(event, "undo");
90505
90471
  if (!isUndo && !matchesKey(event, "redo") && !matchesKey(event, "redoAlt")) return false;
@@ -90521,7 +90487,7 @@ function dispatchTabKey(event) {
90521
90487
  function dispatchGroupKey(event, cb) {
90522
90488
  const group = matchesKey(event, "group");
90523
90489
  if (!group && !matchesKey(event, "ungroup")) return false;
90524
- if (isTypingTarget(event.target)) return false;
90490
+ if (isTypingTarget7(event.target)) return false;
90525
90491
  event.preventDefault();
90526
90492
  if (cb.readOnlyPreview) return true;
90527
90493
  if (group) cb.onGroupSelection?.();
@@ -90529,7 +90495,7 @@ function dispatchGroupKey(event, cb) {
90529
90495
  return true;
90530
90496
  }
90531
90497
  function dispatchClipboardKey(event, cb) {
90532
- if (isTypingTarget(event.target)) return false;
90498
+ if (isTypingTarget5(event.target)) return false;
90533
90499
  const copy = matchesKey(event, "copy");
90534
90500
  const paste = matchesKey(event, "paste");
90535
90501
  const cut = matchesKey(event, "cut");
@@ -90583,7 +90549,7 @@ function dispatchModifierKey(event, _key, cb) {
90583
90549
  return dispatchTabKey(event) || dispatchGroupKey(event, cb) || dispatchClipboardKey(event, cb);
90584
90550
  }
90585
90551
  function dispatchPlainKey(event, _key, cb) {
90586
- if (ownsPlainKeys(event.target)) return;
90552
+ if (ownsPlainKeys4(event.target)) return;
90587
90553
  const keys = getStudioKeys();
90588
90554
  if (matchesKey(event, "zoomSelection")) {
90589
90555
  if (!zoomTimelineToSelectedClips()) return;
@@ -99526,6 +99492,7 @@ var RenderQueuePanel = memo59(function RenderQueuePanel2() {
99526
99492
  // src/components/panels/SlideshowPanel.tsx
99527
99493
  import { useState as useState161, useEffect as useEffect157, useCallback as useCallback182, useRef as useRef189 } from "react";
99528
99494
  import { parseSlideshowManifest } from "@hyperframes/core/slideshow";
99495
+ import { isTypingTarget as isTypingTarget8 } from "@hyperframes/core/typing-target";
99529
99496
 
99530
99497
  // src/components/panels/SlideshowSubPanels.tsx
99531
99498
  import { useState as useState160, useCallback as useCallback181, useId as useId5 } from "react";
@@ -100198,7 +100165,7 @@ function makeSlideshowNotesController() {
100198
100165
  }
100199
100166
  function isPanelUndoKey(e) {
100200
100167
  if (!(e.metaKey || e.ctrlKey) || e.shiftKey || e.key.toLowerCase() !== "z") return false;
100201
- return !isTypingTarget(e.target);
100168
+ return !isTypingTarget8(e.target);
100202
100169
  }
100203
100170
  function SlideshowPanel({ scenes, onPersist, onPersistNotes }) {
100204
100171
  const { editingFile } = useFileManagerContext();
@@ -102405,11 +102372,12 @@ import {
102405
102372
 
102406
102373
  // src/hooks/useKeyframeKeyboard.ts
102407
102374
  import { useEffect as useEffect162, useCallback as useCallback193 } from "react";
102375
+ import { isTypingTarget as isTypingTarget9 } from "@hyperframes/core/typing-target";
102408
102376
  function useKeyframeKeyboard({ enabled, onAddKeyframe }) {
102409
102377
  const handler = useCallback193(
102410
102378
  (e) => {
102411
102379
  if (!enabled || !onAddKeyframe) return;
102412
- if (isTypingTarget(document.activeElement)) return;
102380
+ if (isTypingTarget9(document.activeElement)) return;
102413
102381
  if (!matchesKey(e, "addKeyframe")) return;
102414
102382
  e.preventDefault();
102415
102383
  e.stopImmediatePropagation();
@@ -102665,6 +102633,7 @@ function LinkedSelectionToggle() {
102665
102633
  }
102666
102634
 
102667
102635
  // src/components/TimelineToolbar.tsx
102636
+ import { isTypingTarget as isTypingTarget10 } from "@hyperframes/core/typing-target";
102668
102637
  import { Fragment as Fragment73, jsx as jsx263, jsxs as jsxs209 } from "react/jsx-runtime";
102669
102638
  var NO_KEYFRAME_TOGGLE = {
102670
102639
  state: "none",
@@ -102778,7 +102747,7 @@ var TimelineToolbar = memo63(function TimelineToolbar2({
102778
102747
  useEffect163(() => {
102779
102748
  const onKeyDown = (e) => {
102780
102749
  if (!matchesKey(e, "timelineSnap")) return;
102781
- if (isTypingTarget(e.target)) return;
102750
+ if (isTypingTarget10(e.target)) return;
102782
102751
  const store = usePlayerStore.getState();
102783
102752
  store.setTimelineSnapEnabled(!store.timelineSnapEnabled);
102784
102753
  };
@@ -104788,15 +104757,16 @@ export {
104788
104757
  fieldText,
104789
104758
  findElementBlock,
104790
104759
  flushStudioPendingEdits,
104791
- formatCombo,
104760
+ formatCombo2 as formatCombo,
104792
104761
  formatTime,
104793
104762
  getPersistedRenderSettings,
104794
104763
  getStudioKeys,
104795
104764
  liveTime,
104796
- matchCombo,
104765
+ matchCombo2 as matchCombo,
104766
+ menuItemBase,
104797
104767
  mergeStyleIntoTag,
104798
104768
  openAudioGainDialog,
104799
- parseCombo,
104769
+ parseCombo2 as parseCombo,
104800
104770
  parseStyleString,
104801
104771
  persistRenderSettings,
104802
104772
  playSeamTransitionLoop,
package/dist/keys.d.ts CHANGED
@@ -1 +1,72 @@
1
- export { C as Combo, b as ComboEvent, D as DEFAULT_STUDIO_KEYS, a as StudioKeyAction, S as StudioKeys, m as matchCombo, p as parseCombo } from './keys-B163OjLN.js';
1
+ export { Combo, ComboEvent, matchCombo, parseCombo } from '@hyperframes/core/key-combo';
2
+
3
+ /** Every single-character bare key Studio answers, by action. */
4
+ declare const DEFAULT_STUDIO_KEYS: {
5
+ fullscreen: string;
6
+ split: string;
7
+ record: string;
8
+ addKeyframe: string;
9
+ audioGain: string;
10
+ zoomSelection: string;
11
+ mute: string;
12
+ pause: string;
13
+ shuttleBack: string;
14
+ shuttleForward: string;
15
+ inPoint: string;
16
+ outPoint: string;
17
+ seekToIn: string;
18
+ seekToOut: string;
19
+ selectTool: string;
20
+ razorTool: string;
21
+ selectLeftward: string;
22
+ selectRightward: string;
23
+ exitRazor: string;
24
+ snap: string;
25
+ grid: string;
26
+ timelineSnap: string;
27
+ shortcuts: string;
28
+ playPause: string;
29
+ frameBack: string;
30
+ frameForward: string;
31
+ frameBackTen: string;
32
+ frameForwardTen: string;
33
+ loop: string;
34
+ clearInPoint: string;
35
+ clearOutPoint: string;
36
+ undo: string;
37
+ redo: string;
38
+ redoAlt: string;
39
+ tabCompositions: string;
40
+ tabAssets: string;
41
+ group: string;
42
+ ungroup: string;
43
+ copy: string;
44
+ paste: string;
45
+ cut: string;
46
+ duplicate: string;
47
+ linkToggle: string;
48
+ detachAudio: string;
49
+ deleteLinked: string;
50
+ deleteLinkedAlt: string;
51
+ deleteSelected: string;
52
+ deleteSelectedAlt: string;
53
+ resetKeyframes: string;
54
+ nudgeLeft: string;
55
+ nudgeRight: string;
56
+ nudgeUp: string;
57
+ nudgeDown: string;
58
+ nudgeLeftTen: string;
59
+ nudgeRightTen: string;
60
+ nudgeUpTen: string;
61
+ nudgeDownTen: string;
62
+ captionSelectAll: string;
63
+ pickupClip: string;
64
+ pickupUp: string;
65
+ pickupDown: string;
66
+ pickupDrop: string;
67
+ cancel: string;
68
+ };
69
+ type StudioKeyAction = keyof typeof DEFAULT_STUDIO_KEYS;
70
+ type StudioKeys = Readonly<Record<StudioKeyAction, string>>;
71
+
72
+ export { DEFAULT_STUDIO_KEYS, type StudioKeyAction, type StudioKeys };
package/dist/keys.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import {
2
- DEFAULT_STUDIO_KEYS,
3
- matchCombo,
4
- parseCombo
5
- } from "./chunk-5ZHKYODQ.js";
2
+ DEFAULT_STUDIO_KEYS
3
+ } from "./chunk-USW3YBOG.js";
6
4
  import "./chunk-MLKGABMK.js";
5
+
6
+ // src/keys.ts
7
+ import { matchCombo, parseCombo } from "@hyperframes/core/key-combo";
7
8
  export {
8
9
  DEFAULT_STUDIO_KEYS,
9
10
  matchCombo,