hyperframes 0.8.19 → 0.8.20
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/cli.js +1 -1
- package/dist/fontLocalizeCli.js +2 -2
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/studio/assets/{hyperframes-player-BA-QO9CQ.js → hyperframes-player-BEKxuimO.js} +1 -1
- package/dist/studio/assets/{index-Dd0fsIIL.js → index-BL1zYTW0.js} +1 -1
- package/dist/studio/assets/{index-Bjd2hioj.js → index-CBSKXKAr.js} +118 -118
- package/dist/studio/assets/{index-DxccOrkZ.js → index-Cehosfnu.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/studio/index.js +36 -7
- package/dist/studio/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
package/dist/fontLocalizeCli.js
CHANGED
|
@@ -97589,8 +97589,8 @@ async function runFontLocalize(io, localize) {
|
|
|
97589
97589
|
}
|
|
97590
97590
|
|
|
97591
97591
|
// src/version.ts
|
|
97592
|
-
var VERSION = true ? "0.8.
|
|
97593
|
-
var PRODUCER_VERSION = true ? "0.8.
|
|
97592
|
+
var VERSION = true ? "0.8.20" : "0.0.0-dev";
|
|
97593
|
+
var PRODUCER_VERSION = true ? "0.8.20" : "0.0.0-dev";
|
|
97594
97594
|
|
|
97595
97595
|
// src/fontLocalizeCli.ts
|
|
97596
97596
|
async function readStdin() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var HyperframesPlayer=(()=>{var K=Object.defineProperty;var Ze=Object.getOwnPropertyDescriptor;var Qe=Object.getOwnPropertyNames;var Je=Object.prototype.hasOwnProperty;var Ke=(i,e)=>{for(var t in e)K(i,t,{get:e[t],enumerable:!0})},et=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Qe(e))!Je.call(i,n)&&n!==t&&K(i,n,{get:()=>e[n],enumerable:!(r=Ze(e,n))||r.enumerable});return i};var tt=i=>et(K({},"__esModule",{value:!0}),i);var Pt={};Ke(Pt,{HyperframesPlayer:()=>J,SPEED_PRESETS:()=>re,formatSpeed:()=>N,formatTime:()=>B});function Ee(i){return i.hasRuntime||i.runtimeInjected?!1:!!(i.hasNestedCompositions||i.hasTimelines&&i.attempts>=5)}function I(i){return typeof i=="object"&&i!==null}function Se(i){return I(i)&&typeof i.getDuration=="function"}function Te(i){return I(i)&&typeof i.duration=="function"&&typeof i.time=="function"&&typeof i.seek=="function"&&typeof i.play=="function"&&typeof i.pause=="function"}var $="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.
|
|
1
|
+
"use strict";var HyperframesPlayer=(()=>{var K=Object.defineProperty;var Ze=Object.getOwnPropertyDescriptor;var Qe=Object.getOwnPropertyNames;var Je=Object.prototype.hasOwnProperty;var Ke=(i,e)=>{for(var t in e)K(i,t,{get:e[t],enumerable:!0})},et=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Qe(e))!Je.call(i,n)&&n!==t&&K(i,n,{get:()=>e[n],enumerable:!(r=Ze(e,n))||r.enumerable});return i};var tt=i=>et(K({},"__esModule",{value:!0}),i);var Pt={};Ke(Pt,{HyperframesPlayer:()=>J,SPEED_PRESETS:()=>re,formatSpeed:()=>N,formatTime:()=>B});function Ee(i){return i.hasRuntime||i.runtimeInjected?!1:!!(i.hasNestedCompositions||i.hasTimelines&&i.attempts>=5)}function I(i){return typeof i=="object"&&i!==null}function Se(i){return I(i)&&typeof i.getDuration=="function"}function Te(i){return I(i)&&typeof i.duration=="function"&&typeof i.time=="function"&&typeof i.seek=="function"&&typeof i.play=="function"&&typeof i.pause=="function"}var $="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.20/dist/hyperframe.runtime.iife.js";function D(i){if(i===null)return null;let e=Number.parseInt(i,10);return Number.isFinite(e)&&e>0?e:null}function rt(i){let e=i?.querySelector("[data-composition-id][data-width][data-height]")??i?.querySelector("[data-width][data-height]");if(!e)return null;let t=D(e.getAttribute("data-width")),r=D(e.getAttribute("data-height"));return t!==null&&r!==null?{width:t,height:r}:null}var j=class{constructor(e,t){this._iframe=e;this._callbacks=t}_iframe;_callbacks;_interval=null;_runtimeInjected=!1;get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._runtimeInjected=!1;let e=0;this._interval=setInterval(()=>{e++;try{let t=this._iframe.contentWindow;if(!t)return;let r=!!(t.__hf||t.__player),n=!!(t.__timelines&&Object.keys(t.__timelines).length>0),o=!!this._iframe.contentDocument?.querySelector("[data-composition-src]");if(Ee({hasRuntime:r,hasTimelines:n,hasNestedCompositions:o,runtimeInjected:this._runtimeInjected,attempts:e})){this._injectRuntime();return}if(this._runtimeInjected&&!r)return;let s=this._resolvePlaybackDurationAdapter(t);if(s&&s.getDuration()>0){this.stop();let d=rt(this._iframe.contentDocument);this._callbacks.onReady({duration:s.getDuration(),adapter:s,compositionSize:d});return}}catch{}e>=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{let e=this._iframe.contentWindow;return e?this._resolveDirectTimelineAdapterFromWindow(e):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(e){return this._resolveDirectTimelineAdapterFromWindow(e)}hasRuntimeBridge(e){return Reflect.get(e,"__hf")!==void 0||I(Reflect.get(e,"__player"))}_injectRuntime(){this._runtimeInjected=!0;try{let e=this._iframe.contentDocument;if(!e)return;let t=e.createElement("script");t.src=$,(e.head||e.documentElement).appendChild(t),this._callbacks.onRuntimeInjected?.()}catch{}}_resolveDirectTimelineAdapterFromWindow(e){if(this.hasRuntimeBridge(e))return null;let t=Reflect.get(e,"__timelines");if(!I(t))return null;let r=Object.keys(t);if(r.length===0)return null;let n=this._iframe.contentDocument?.querySelector("[data-composition-id]")?.getAttribute("data-composition-id"),o=n&&n in t?n:r[r.length-1],s=t[o];return Te(s)?s:null}_resolvePlaybackDurationAdapter(e){let t=Reflect.get(e,"__player");if(Se(t))return{kind:"runtime",getDuration:()=>t.getDuration()};let r=this._resolveDirectTimelineAdapterFromWindow(e);return r?{kind:"direct-timeline",timeline:r,getDuration:()=>r.duration()}:null}};var we=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|
package/dist/studio/assets/{hyperframes-player-BA-QO9CQ.js → hyperframes-player-BEKxuimO.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var fe=Object.defineProperty;var _e=(r,t,e)=>t in r?fe(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var u=(r,t,e)=>_e(r,typeof t!="symbol"?t+"":t,e);import{r as se,i as ge,a as ye}from"./index-
|
|
1
|
+
var fe=Object.defineProperty;var _e=(r,t,e)=>t in r?fe(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var u=(r,t,e)=>_e(r,typeof t!="symbol"?t+"":t,e);import{r as se,i as ge,a as ye}from"./index-CBSKXKAr.js";function ve(r){return r.hasRuntime||r.runtimeInjected?!1:!!(r.hasNestedCompositions||r.hasTimelines&&r.attempts>=5)}function F(r){return typeof r=="object"&&r!==null}function be(r){return F(r)&&typeof r.getDuration=="function"}function we(r){return F(r)&&typeof r.duration=="function"&&typeof r.time=="function"&&typeof r.seek=="function"&&typeof r.play=="function"&&typeof r.pause=="function"}function Ee(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 pe=typeof __HYPERFRAMES_RUNTIME_CDN_URL__=="string"?__HYPERFRAMES_RUNTIME_CDN_URL__:Ee("0.0.0-dev");function H(r){if(r===null)return null;const t=Number.parseInt(r,10);return Number.isFinite(t)&&t>0?t:null}function Ae(r){const t=(r==null?void 0:r.querySelector("[data-composition-id][data-width][data-height]"))??(r==null?void 0:r.querySelector("[data-width][data-height]"));if(!t)return null;const e=H(t.getAttribute("data-width")),i=H(t.getAttribute("data-height"));return e!==null&&i!==null?{width:e,height:i}:null}class Ce{constructor(t,e){u(this,"_interval",null);u(this,"_runtimeInjected",!1);this._iframe=t,this._callbacks=e}get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._runtimeInjected=!1;let t=0;this._interval=setInterval(()=>{var e;t++;try{const i=this._iframe.contentWindow;if(!i)return;const n=!!(i.__hf||i.__player),s=!!(i.__timelines&&Object.keys(i.__timelines).length>0),a=!!((e=this._iframe.contentDocument)!=null&&e.querySelector("[data-composition-src]"));if(ve({hasRuntime:n,hasTimelines:s,hasNestedCompositions:a,runtimeInjected:this._runtimeInjected,attempts:t})){this._injectRuntime();return}if(this._runtimeInjected&&!n)return;const d=this._resolvePlaybackDurationAdapter(i);if(d&&d.getDuration()>0){this.stop();const h=Ae(this._iframe.contentDocument);this._callbacks.onReady({duration:d.getDuration(),adapter:d,compositionSize:h});return}}catch{}t>=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 t=this._iframe.contentWindow;return t?this._resolveDirectTimelineAdapterFromWindow(t):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(t){return this._resolveDirectTimelineAdapterFromWindow(t)}hasRuntimeBridge(t){return Reflect.get(t,"__hf")!==void 0||F(Reflect.get(t,"__player"))}_injectRuntime(){var t,e;this._runtimeInjected=!0;try{const i=this._iframe.contentDocument;if(!i)return;const n=i.createElement("script");n.src=pe,(i.head||i.documentElement).appendChild(n),(e=(t=this._callbacks).onRuntimeInjected)==null||e.call(t)}catch{}}_resolveDirectTimelineAdapterFromWindow(t){var d,h;if(this.hasRuntimeBridge(t))return null;const e=Reflect.get(t,"__timelines");if(!F(e))return null;const i=Object.keys(e);if(i.length===0)return null;const n=(h=(d=this._iframe.contentDocument)==null?void 0:d.querySelector("[data-composition-id]"))==null?void 0:h.getAttribute("data-composition-id"),s=n&&n in e?n:i[i.length-1],a=e[s];return we(a)?a:null}_resolvePlaybackDurationAdapter(t){const e=Reflect.get(t,"__player");if(be(e))return{kind:"runtime",getDuration:()=>e.getDuration()};const i=this._resolveDirectTimelineAdapterFromWindow(t);return i?{kind:"direct-timeline",timeline:i,getDuration:()=>i.duration()}:null}}const Te=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|