@hyperframes/producer 0.9.102 → 0.9.104
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/compileWorker.js +2 -2
- package/dist/distributed.js +5 -4
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +71 -71
- package/dist/index.js +103 -85
- package/dist/public-server.js +70 -52
- package/package.json +8 -8
package/dist/compileWorker.js
CHANGED
|
@@ -30,6 +30,7 @@ import { createHash as createHash3 } from "node:crypto";
|
|
|
30
30
|
import { createReadStream, existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync4, statSync as statSync4 } from "fs";
|
|
31
31
|
import { join as join5, dirname as dirname3, resolve as resolve3, basename as basename3, relative, sep as sep2 } from "path";
|
|
32
32
|
import { parseHTML as parseHTML4 } from "@hyperframes/parsers/linkedom";
|
|
33
|
+
import { compositionRootSize } from "@hyperframes/parsers";
|
|
33
34
|
|
|
34
35
|
// src/services/bundledScripts.ts
|
|
35
36
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -3204,8 +3205,7 @@ async function compileWithAssets(projectDir2, htmlPath2, downloadDir2, options2,
|
|
|
3204
3205
|
}
|
|
3205
3206
|
const { document: document2 } = parseHTML4(html);
|
|
3206
3207
|
const rootEl = document2.querySelector("[data-composition-id]");
|
|
3207
|
-
const width
|
|
3208
|
-
const height = rootEl ? parseInt(rootEl.getAttribute("data-height") || "1920", 10) : 1920;
|
|
3208
|
+
const { width, height } = compositionRootSize(rootEl);
|
|
3209
3209
|
const staticDuration = rootEl ? parseStrictFiniteTimingNumber(rootEl.getAttribute("data-duration")) ?? parseStrictFiniteTimingNumber(rootEl.getAttribute("data-composition-duration")) ?? 0 : 0;
|
|
3210
3210
|
return {
|
|
3211
3211
|
html,
|
package/dist/distributed.js
CHANGED
|
@@ -498,7 +498,7 @@ function servedPath(urlPath) {
|
|
|
498
498
|
}
|
|
499
499
|
|
|
500
500
|
// src/generated/hf-early-stub-inline.ts
|
|
501
|
-
var HF_EARLY_STUB_IIFE = '"use strict";(()=>{var
|
|
501
|
+
var HF_EARLY_STUB_IIFE = '"use strict";(()=>{var b=100,A=[],s=[],c=!1,l=!1,k=new Set;function h(n){let e=window.__HF_VIRTUAL_TIME__?.originalRequestAnimationFrame;return typeof e=="function"?e(n):requestAnimationFrame(n)}function P(n){let e=window.__HF_VIRTUAL_TIME__?.originalSetTimeout;if(typeof e=="function"){e(n,0);return}setTimeout(n,0)}function v(n){return n!==null&&typeof n=="object"&&"__hfIsProxy"in n?n.__hfReal:n}function d(n,e){n!=="add"&&x(e)}function T(n){if(n===null||typeof n!="object"||Array.isArray(n))return!1;let e=n;return"rotationX"in e||"rotationY"in e||"transformPerspective"in e}var w=new Set;function x(n){let e=n[0];if(e==null)return;let o=window;w.has(e)||(w.add(e),o.__hfAllTweenTargets=Array.from(w)),(T(n[1])||T(n[2]))&&(k.add(e),o.__hf3dTweenTargets=Array.from(k))}function _(n){let e=n.proxy.__hfReal,o=e[n.method];if(typeof o=="function"){let i=n.method==="add"?n.args.map(v):n.args;o.call(e,...i)}}function S(n,e,o){d(e,o);let i={proxy:n,method:e,args:o};return n.__hfQueue.push(i),s.push(i),E(),n}function y(n){let e=n.proxy.__hfQueue.indexOf(n);e>=0&&n.proxy.__hfQueue.splice(e,1)}function a(){for(;s.length>0;){let n=s.shift();n&&(y(n),_(n))}R()}function m(){l=!1,window.__hfTimelinesBuilding=!1;try{window.dispatchEvent(new CustomEvent("hf-timelines-built"))}catch{}}function R(){l||(l=!0,P(()=>{s.length===0?m():l=!1}))}function g(){c=!1;let n=s.splice(0,b);for(let e of n)y(e),_(e);s.length>0?(c=!0,h(g)):m()}function E(){c||(c=!0,window.__hfTimelinesBuilding=!0,h(g))}var O=["to","from","fromTo","set","add"],I=new Set(O),C=["pause","play","seek"],G=["totalTime","time","duration","paused","timeScale"];function B(n,e){let o=e;for(;o!==null&&o!==Object.prototype;){for(let i of Object.getOwnPropertyNames(o)){if(i==="constructor"||i==="then"||i in n||I.has(i)||i.charAt(0)==="_")continue;let u=Object.getOwnPropertyDescriptor(o,i);if(!u||typeof u.value!="function")continue;let r=u.value;n[i]=function(...t){a();let f=r.call(e,...t);return f===e?n:f}}o=Object.getPrototypeOf(o)}}function M(n){let e={__hfReal:n,__hfQueue:[],__hfIsProxy:!0};for(let o of O)typeof n[o]=="function"&&(e[o]=(...i)=>S(e,o,i));for(let o of C)typeof n[o]=="function"&&(e[o]=(...i)=>(a(),n[o].apply(n,i),e));for(let o of G)typeof n[o]=="function"&&(e[o]=(...i)=>{a();let u=n[o];return i.length>0?(u.apply(n,i),e):u.call(n)});return typeof n.getChildren=="function"&&(e.getChildren=(...o)=>{a();let i=n.getChildren(...o);return Array.isArray(i)?i:[]}),typeof n.kill=="function"&&(e.kill=()=>{a(),n.kill()}),B(e,n),A.push(e),e}if(typeof window<"u"){window.__hf||(window.__hf={}),window.__hfTimelinesBuilding=!1,window.__hfFlushSync=()=>{a(),s.length===0&&window.__hfTimelinesBuilding&&m()};let n=null,e=new WeakSet;try{Object.defineProperty(window,"gsap",{configurable:!0,enumerable:!0,get(){return n},set(o){if(n=o,!o||typeof o.timeline!="function"||e.has(o))return;e.add(o);let i=o.timeline.bind(o);o.timeline=r=>{let t=i(r);return t&&(typeof t=="object"||typeof t=="function")?M(t):t};for(let r of["to","from","set"]){let t=o[r];if(typeof t!="function")continue;let f=t.bind(o);o[r]=(...p)=>(d(r,p),f(...p))}let u=o.fromTo;if(typeof u=="function"){let r=u.bind(o);o.fromTo=(...t)=>(d("fromTo",t),r(...t))}}})}catch{}}})();\n';
|
|
502
502
|
function getHfEarlyStub() {
|
|
503
503
|
return HF_EARLY_STUB_IIFE;
|
|
504
504
|
}
|
|
@@ -1596,6 +1596,7 @@ function encoderFailureError(prefix, result) {
|
|
|
1596
1596
|
}
|
|
1597
1597
|
|
|
1598
1598
|
// src/services/render/artifactTransaction.ts
|
|
1599
|
+
import { toWin32LongPath as toWin32LongPath2 } from "@hyperframes/core/atomic-file";
|
|
1599
1600
|
import { HLS_MASTER_PLAYLIST, HLS_VIDEO_PLAYLIST, renameWithRetry } from "@hyperframes/engine";
|
|
1600
1601
|
|
|
1601
1602
|
// src/utils/ffprobe.ts
|
|
@@ -1607,7 +1608,7 @@ import {
|
|
|
1607
1608
|
|
|
1608
1609
|
// src/services/render/renderDirOwner.ts
|
|
1609
1610
|
import { RENDER_TEMP_DIR } from "@hyperframes/core/project-folders";
|
|
1610
|
-
import { createStagingDir } from "@hyperframes/core/atomic-file";
|
|
1611
|
+
import { createStagingDir, toWin32LongPath } from "@hyperframes/core/atomic-file";
|
|
1611
1612
|
|
|
1612
1613
|
// src/services/render/capturePlan.ts
|
|
1613
1614
|
function assertWorkerCount(workerCount) {
|
|
@@ -2545,6 +2546,7 @@ import { createHash as createHash5 } from "node:crypto";
|
|
|
2545
2546
|
import { createReadStream as createReadStream2, existsSync as existsSync7, mkdirSync as mkdirSync4, readFileSync as readFileSync5, statSync as statSync5 } from "fs";
|
|
2546
2547
|
import { join as join9, dirname as dirname7, resolve as resolve6, basename as basename3, relative as relative2, sep as sep3 } from "path";
|
|
2547
2548
|
import { parseHTML as parseHTML5 } from "@hyperframes/parsers/linkedom";
|
|
2549
|
+
import { compositionRootSize } from "@hyperframes/parsers";
|
|
2548
2550
|
|
|
2549
2551
|
// src/services/bundledScripts.ts
|
|
2550
2552
|
import { existsSync as existsSync4, readFileSync as readFileSync2 } from "node:fs";
|
|
@@ -5516,8 +5518,7 @@ async function compileWithAssets(projectDir, htmlPath, downloadDir, options, ass
|
|
|
5516
5518
|
}
|
|
5517
5519
|
const { document: document2 } = parseHTML5(html);
|
|
5518
5520
|
const rootEl = document2.querySelector("[data-composition-id]");
|
|
5519
|
-
const width
|
|
5520
|
-
const height = rootEl ? parseInt(rootEl.getAttribute("data-height") || "1920", 10) : 1920;
|
|
5521
|
+
const { width, height } = compositionRootSize(rootEl);
|
|
5521
5522
|
const staticDuration = rootEl ? parseStrictFiniteTimingNumber(rootEl.getAttribute("data-duration")) ?? parseStrictFiniteTimingNumber(rootEl.getAttribute("data-composition-duration")) ?? 0 : 0;
|
|
5522
5523
|
return {
|
|
5523
5524
|
html,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.1.0",
|
|
3
3
|
"buildId": "dev",
|
|
4
|
-
"sha256": "
|
|
4
|
+
"sha256": "47bb4136d2ce3de79ca8146d9df816608a75c9f15866109673b80a724003c8f2",
|
|
5
5
|
"artifacts": {
|
|
6
6
|
"iife": "hyperframe.runtime.iife.js",
|
|
7
7
|
"esm": "hyperframe.runtime.mjs"
|