@hyperframes/producer 0.9.103 → 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.
@@ -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 = rootEl ? parseInt(rootEl.getAttribute("data-width") || "1080", 10) : 1080;
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,
@@ -2546,6 +2546,7 @@ import { createHash as createHash5 } from "node:crypto";
2546
2546
  import { createReadStream as createReadStream2, existsSync as existsSync7, mkdirSync as mkdirSync4, readFileSync as readFileSync5, statSync as statSync5 } from "fs";
2547
2547
  import { join as join9, dirname as dirname7, resolve as resolve6, basename as basename3, relative as relative2, sep as sep3 } from "path";
2548
2548
  import { parseHTML as parseHTML5 } from "@hyperframes/parsers/linkedom";
2549
+ import { compositionRootSize } from "@hyperframes/parsers";
2549
2550
 
2550
2551
  // src/services/bundledScripts.ts
2551
2552
  import { existsSync as existsSync4, readFileSync as readFileSync2 } from "node:fs";
@@ -5517,8 +5518,7 @@ async function compileWithAssets(projectDir, htmlPath, downloadDir, options, ass
5517
5518
  }
5518
5519
  const { document: document2 } = parseHTML5(html);
5519
5520
  const rootEl = document2.querySelector("[data-composition-id]");
5520
- const width = rootEl ? parseInt(rootEl.getAttribute("data-width") || "1080", 10) : 1080;
5521
- const height = rootEl ? parseInt(rootEl.getAttribute("data-height") || "1920", 10) : 1920;
5521
+ const { width, height } = compositionRootSize(rootEl);
5522
5522
  const staticDuration = rootEl ? parseStrictFiniteTimingNumber(rootEl.getAttribute("data-duration")) ?? parseStrictFiniteTimingNumber(rootEl.getAttribute("data-composition-duration")) ?? 0 : 0;
5523
5523
  return {
5524
5524
  html,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": "0.1.0",
3
3
  "buildId": "dev",
4
- "sha256": "6eec9f9bfd167db402bd46587d42f6a367082aa2db1227ad28a2b716470871f1",
4
+ "sha256": "47bb4136d2ce3de79ca8146d9df816608a75c9f15866109673b80a724003c8f2",
5
5
  "artifacts": {
6
6
  "iife": "hyperframe.runtime.iife.js",
7
7
  "esm": "hyperframe.runtime.mjs"