@hyperframes/core 0.9.31 → 0.9.33

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.
@@ -3,6 +3,7 @@ export { compileTimingAttrs, injectDurations, extractResolvedMedia, clampDuratio
3
3
  export { compileHtml, type MediaDurationProber } from "./htmlCompiler.js";
4
4
  export { assignBundledRuntimeCompositionIds, type BundledHostCompositionIdentity, bundleToSingleHtml, type BundleOptions, type BundleScriptProvenance, prepareFlattenedInnerRoot, FLATTENED_INNER_ROOT_STRIP_ATTRS, emitRootCompositionVariableStyles, parsesAsScript, } from "./htmlBundler.js";
5
5
  export { readDeclaredDefaults, parseHostVariableValues } from "../runtime/getVariables.js";
6
+ export { boundMediaSrc } from "../runtime/applyVariableBindings.js";
6
7
  export { extractCompiledHtmlParityContract, type CompiledHtmlParityContract, type HtmlParityComposition, type HtmlParityResource, type HtmlParityTimedElement, } from "./htmlParityContract.js";
7
8
  export { RUNTIME_BOOTSTRAP_ATTR, injectScriptsAtHeadStart, injectTagsAtHeadStart, injectScriptsIntoHtml, insertBeforeCloseTag, insertRuntimeTag, isRuntimeFileUrl, parseHTMLContent, stripEmbeddedRuntimeScripts, } from "./htmlDocument.js";
8
9
  export { addScenePartsManifest } from "./scenePartsManifest.js";
@@ -8,6 +8,7 @@ export { compileHtml } from "./htmlCompiler.js";
8
8
  // HTML bundler (Node.js — requires fs, linkedom, esbuild)
9
9
  export { assignBundledRuntimeCompositionIds, bundleToSingleHtml, prepareFlattenedInnerRoot, FLATTENED_INNER_ROOT_STRIP_ATTRS, emitRootCompositionVariableStyles, parsesAsScript, } from "./htmlBundler.js";
10
10
  export { readDeclaredDefaults, parseHostVariableValues } from "../runtime/getVariables.js";
11
+ export { boundMediaSrc } from "../runtime/applyVariableBindings.js";
11
12
  export { extractCompiledHtmlParityContract, } from "./htmlParityContract.js";
12
13
  export { RUNTIME_BOOTSTRAP_ATTR, injectScriptsAtHeadStart, injectTagsAtHeadStart, injectScriptsIntoHtml, insertBeforeCloseTag, insertRuntimeTag, isRuntimeFileUrl, parseHTMLContent, stripEmbeddedRuntimeScripts, } from "./htmlDocument.js";
13
14
  export { addScenePartsManifest } from "./scenePartsManifest.js";
@@ -282,11 +282,12 @@ function decodeCssEscape(hex, char) {
282
282
  const invalid = cp === 0 || cp > 0x10ffff || (cp >= 0xd800 && cp <= 0xdfff);
283
283
  return invalid ? "�" : String.fromCodePoint(cp);
284
284
  }
285
- // A browser reads `\75 rl(` as `url(`, so every check runs on escape-decoded, lowercased text.
286
- // Comments stay in: CSS never lets one join a function name or `@import`, only split tokens.
285
+ // A browser folds CR LF, CR and FF to one newline, then reads `\75 rl(` as `url(`, so every check
286
+ // runs on that decoded, lowercased text. Comments stay in: CSS never lets one join a function name.
287
287
  function canonicalCss(text) {
288
288
  return text
289
- .replace(/\\([0-9a-f]{1,6})[ \t\n\r\f]?|\\([\s\S])/gi, (_, hex, char) => decodeCssEscape(hex, char))
289
+ .replace(/\r\n?|\f/g, "\n")
290
+ .replace(/\\([0-9a-f]{1,6})[ \t\n]?|\\([\s\S])/gi, (_, hex, char) => decodeCssEscape(hex, char))
290
291
  .toLowerCase();
291
292
  }
292
293
  // The scans below are single-pass indexOf loops, not regexes: the input is attacker-controlled