@hyperframes/studio 0.8.76 → 0.8.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{hyperframes-player-BkDxgSKG.js → hyperframes-player-BSDTJ9EF.js} +1 -1
- package/dist/assets/{index-DeHir1up.js → index-2GgHjQq-.js} +148 -148
- package/dist/assets/{index-0w6iIlwZ.css → index-BWJqxeaH.css} +1 -1
- package/dist/assets/{index-COX0scwJ.js → index-CsFCRdMo.js} +1 -1
- package/dist/assets/{index-FmKUmYhC.js → index-DcxWQ7Za.js} +1 -1
- package/dist/{chunk-IYDE66BY.js → chunk-5VANA2TG.js} +7 -1
- package/dist/{chunk-IYDE66BY.js.map → chunk-5VANA2TG.js.map} +1 -1
- package/dist/{domEditingLayers-2XBFXXSW.js → domEditingLayers-IGPLTI5E.js} +2 -2
- package/dist/index.html +2 -2
- package/dist/index.js +4125 -4009
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +7 -7
- package/src/components/editor/domEditingElement.ts +13 -0
- package/src/components/editor/gsapLivePreview.test.ts +63 -0
- package/src/components/editor/gsapLivePreview.ts +2 -14
- package/src/components/editor/propertyPanelHelpers.ts +4 -6
- package/src/components/nle/NLEPreview.test.ts +110 -7
- package/src/components/nle/NLEPreview.tsx +51 -46
- package/src/components/nle/PreviewZoomOverlay.tsx +111 -0
- package/src/components/nle/previewZoom.test.ts +42 -0
- package/src/components/nle/previewZoom.ts +33 -0
- package/src/hooks/useDomEditWiring.ts +1 -3
- package/src/hooks/useGestureRecording.test.tsx +1 -1
- package/src/hooks/useGestureRecording.ts +6 -10
- package/src/hooks/useGsapTweenCache.element.test.tsx +39 -0
- package/src/hooks/useGsapTweenCache.ts +5 -13
- package/src/player/lib/automationStoreSync.test.ts +24 -0
- package/src/player/lib/automationStoreSync.ts +3 -9
- package/src/player/lib/playbackScrub.ts +1 -1
- package/src/player/lib/timelineDOM.test.ts +28 -0
- package/src/player/lib/timelineDOM.ts +4 -2
- package/src/player/lib/timelineElementHelpers.ts +33 -0
- package/src/player/lib/timelineIframeHelpers.test.ts +49 -5
- package/src/player/lib/timelineIframeHelpers.ts +13 -12
- package/src/utils/studioUiPreferences.test.ts +9 -3
- package/src/utils/studioUiPreferences.ts +0 -20
- /package/dist/{domEditingLayers-2XBFXXSW.js.map → domEditingLayers-IGPLTI5E.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ce=Object.defineProperty;var Te=(r,i,e)=>i in r?Ce(r,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[i]=e;var l=(r,i,e)=>Te(r,typeof i!="symbol"?i+"":i,e);import{r as pe,i as Re,a as w,b as me,c as Se,d as Le,s as Me,e as xe,F as De}from"./index-
|
|
1
|
+
var Ce=Object.defineProperty;var Te=(r,i,e)=>i in r?Ce(r,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[i]=e;var l=(r,i,e)=>Te(r,typeof i!="symbol"?i+"":i,e);import{r as pe,i as Re,a as w,b as me,c as Se,d as Le,s as Me,e as xe,F as De}from"./index-2GgHjQq-.js";function Pe(r){return r.hasRuntime||r.runtimeInjected?!1:!!(r.hasNestedCompositions||r.hasTimelines&&r.attempts>=5)}function W(r){return typeof r=="object"&&r!==null}function ke(r){return W(r)&&typeof r.getDuration=="function"}function Ie(r){return W(r)&&typeof r.duration=="function"&&typeof r.time=="function"&&typeof r.seek=="function"&&typeof r.play=="function"&&typeof r.pause=="function"}function Oe(r){if(!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(r))throw new Error(`Invalid HyperFrames runtime version: ${r}`);return`https://cdn.jsdelivr.net/npm/@hyperframes/core@${r}/dist/hyperframe.runtime.iife.js`}const $=typeof __HYPERFRAMES_RUNTIME_CDN_URL__=="string"?__HYPERFRAMES_RUNTIME_CDN_URL__:Oe("0.0.0-dev");function z(r){if(r===null)return null;const i=Number.parseInt(r,10);return Number.isFinite(i)&&i>0?i:null}function Ne(r){const i=(r==null?void 0:r.querySelector("[data-composition-id][data-width][data-height]"))??(r==null?void 0:r.querySelector("[data-width][data-height]"));if(!i)return null;const e=z(i.getAttribute("data-width")),t=z(i.getAttribute("data-height"));return e!==null&&t!==null?{width:e,height:t}:null}class Fe{constructor(i,e){l(this,"_interval",null);l(this,"_runtimeInjected",!1);this._iframe=i,this._callbacks=e}get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._runtimeInjected=!1;let i=0;this._interval=setInterval(()=>{var e;i++;try{const t=this._iframe.contentWindow;if(!t)return;const s=!!(t.__hf||t.__player),n=!!(t.__timelines&&Object.keys(t.__timelines).length>0),o=!!((e=this._iframe.contentDocument)!=null&&e.querySelector("[data-composition-src]"));if(Pe({hasRuntime:s,hasTimelines:n,hasNestedCompositions:o,runtimeInjected:this._runtimeInjected,attempts:i})){this._injectRuntime();return}if(this._runtimeInjected&&!s)return;const d=this._resolvePlaybackDurationAdapter(t);if(d&&d.getDuration()>0){this.stop();const c=Ne(this._iframe.contentDocument);this._callbacks.onReady({duration:d.getDuration(),adapter:d,compositionSize:c});return}}catch{}i>=40&&(this.stop(),this._callbacks.onError("Composition timeline not found after 8s"))},200)}stop(){this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{const i=this._iframe.contentWindow;return i?this._resolveDirectTimelineAdapterFromWindow(i):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(i){return this._resolveDirectTimelineAdapterFromWindow(i)}hasRuntimeBridge(i){return Reflect.get(i,"__hf")!==void 0||W(Reflect.get(i,"__player"))}_injectRuntime(){var i,e;this._runtimeInjected=!0;try{const t=this._iframe.contentDocument;if(!t)return;const s=t.createElement("script");s.src=$,(t.head||t.documentElement).appendChild(s),(e=(i=this._callbacks).onRuntimeInjected)==null||e.call(i)}catch{}}_resolveDirectTimelineAdapterFromWindow(i){var d,c;if(this.hasRuntimeBridge(i))return null;const e=Reflect.get(i,"__timelines");if(!W(e))return null;const t=Object.keys(e);if(t.length===0)return null;const s=(c=(d=this._iframe.contentDocument)==null?void 0:d.querySelector("[data-composition-id]"))==null?void 0:c.getAttribute("data-composition-id"),n=s&&s in e?s:t[t.length-1],o=e[n];return Ie(o)?o:null}_resolvePlaybackDurationAdapter(i){const e=Reflect.get(i,"__player");if(ke(e))return{kind:"runtime",getDuration:()=>e.getDuration()};const t=this._resolveDirectTimelineAdapterFromWindow(i);return t?{kind:"direct-timeline",timeline:t,getDuration:()=>t.duration()}:null}}const He=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|