@hyperframes/producer 0.9.63 → 0.9.64

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/index.js CHANGED
@@ -8133,16 +8133,23 @@ function assertOutsideMarkupAsked(projectDir, filePath, srcPath, assetRoot, outs
8133
8133
  }
8134
8134
  }
8135
8135
  var isPrivateCompositionFile = (projectDir, filePath) => isPrivateFileUnder2(projectDir, filePath, isStudioPrivatePath2);
8136
- var mountSrcsUnder = (root) => [...root.querySelectorAll("[data-composition-src]")].map((el) => el.getAttribute("data-composition-src")).filter((srcPath) => !!srcPath && !isUnresolvedAssetPlaceholder(srcPath));
8137
8136
  function compositionSrcsIn(html) {
8138
8137
  const { document: document2 } = parseHTML5(html);
8138
+ const mounts = [];
8139
8139
  const templated = [];
8140
- const templates = [...document2.querySelectorAll("template")];
8141
- for (let template = templates.pop(); template; template = templates.pop()) {
8142
- templated.push(...mountSrcsUnder(template.content));
8143
- templates.push(...template.content.querySelectorAll("template"));
8140
+ const stack = [...document2.children].reverse().map((el) => [el, false]);
8141
+ for (let next = stack.pop(); next; next = stack.pop()) {
8142
+ const [el, inTemplate] = next;
8143
+ const srcPath = el.getAttribute("data-composition-src");
8144
+ if (srcPath && !isUnresolvedAssetPlaceholder(srcPath)) {
8145
+ (inTemplate ? templated : mounts).push(srcPath);
8146
+ }
8147
+ const childrenInTemplate = inTemplate || el.localName === "template";
8148
+ const children = [...el.children];
8149
+ for (let i = children.length - 1; i >= 0; i -= 1)
8150
+ stack.push([children[i], childrenInTemplate]);
8144
8151
  }
8145
- return { mounts: mountSrcsUnder(document2), templated };
8152
+ return { mounts, templated };
8146
8153
  }
8147
8154
  function compositionPathProblem(projectDir, filePath, assetRoot, outsideFiles) {
8148
8155
  if (outsideAssetRefusal(projectDir, filePath) === "blocklisted") {
@@ -8148,16 +8148,23 @@ function assertOutsideMarkupAsked(projectDir, filePath, srcPath, assetRoot, outs
8148
8148
  }
8149
8149
  }
8150
8150
  var isPrivateCompositionFile = (projectDir, filePath) => isPrivateFileUnder2(projectDir, filePath, isStudioPrivatePath2);
8151
- var mountSrcsUnder = (root) => [...root.querySelectorAll("[data-composition-src]")].map((el) => el.getAttribute("data-composition-src")).filter((srcPath) => !!srcPath && !isUnresolvedAssetPlaceholder(srcPath));
8152
8151
  function compositionSrcsIn(html) {
8153
8152
  const { document: document2 } = parseHTML5(html);
8153
+ const mounts = [];
8154
8154
  const templated = [];
8155
- const templates = [...document2.querySelectorAll("template")];
8156
- for (let template = templates.pop(); template; template = templates.pop()) {
8157
- templated.push(...mountSrcsUnder(template.content));
8158
- templates.push(...template.content.querySelectorAll("template"));
8155
+ const stack = [...document2.children].reverse().map((el) => [el, false]);
8156
+ for (let next = stack.pop(); next; next = stack.pop()) {
8157
+ const [el, inTemplate] = next;
8158
+ const srcPath = el.getAttribute("data-composition-src");
8159
+ if (srcPath && !isUnresolvedAssetPlaceholder(srcPath)) {
8160
+ (inTemplate ? templated : mounts).push(srcPath);
8161
+ }
8162
+ const childrenInTemplate = inTemplate || el.localName === "template";
8163
+ const children = [...el.children];
8164
+ for (let i = children.length - 1; i >= 0; i -= 1)
8165
+ stack.push([children[i], childrenInTemplate]);
8159
8166
  }
8160
- return { mounts: mountSrcsUnder(document2), templated };
8167
+ return { mounts, templated };
8161
8168
  }
8162
8169
  function compositionPathProblem(projectDir, filePath, assetRoot, outsideFiles) {
8163
8170
  if (outsideAssetRefusal(projectDir, filePath) === "blocklisted") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/producer",
3
- "version": "0.9.63",
3
+ "version": "0.9.64",
4
4
  "description": "HTML-to-video rendering engine using Chrome's BeginFrame API",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,11 +35,11 @@
35
35
  "postcss": "^8.4.0",
36
36
  "puppeteer": "~25.13.0",
37
37
  "puppeteer-core": "^25.13.0",
38
- "@hyperframes/engine": "0.9.63",
39
- "@hyperframes/core": "0.9.63",
40
- "@hyperframes/lint": "0.9.63",
41
- "@hyperframes/studio-server": "0.9.63",
42
- "@hyperframes/parsers": "0.9.63"
38
+ "@hyperframes/engine": "0.9.64",
39
+ "@hyperframes/lint": "0.9.64",
40
+ "@hyperframes/core": "0.9.64",
41
+ "@hyperframes/parsers": "0.9.64",
42
+ "@hyperframes/studio-server": "0.9.64"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "^25.0.10",
@@ -48,7 +48,7 @@
48
48
  "tsx": "^4.21.0",
49
49
  "typescript": "^5.7.2",
50
50
  "vitest": "^4.1.12",
51
- "@hyperframes/aws-lambda": "0.9.63"
51
+ "@hyperframes/aws-lambda": "0.9.64"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=22"