fix: address review feedback — observability, dedup, query-strip, catalog

Review items addressed:

1. Mirror video-failure warning in beginFrame path (was screenshot-only)
2. Fix resolveProjectRelativeSrc escape-fallback to use query-stripped
   cleanSrc instead of raw src for the normalize/strip arm
3. Export prepareFlattenedInnerRoot from @hyperframes/core/compiler and
   consume in the producer instead of duplicating the implementation
4. Use typed Window cast instead of (window as any) for __hfForceTimelineRebind
5. Regenerate docs/public/catalog-index.json with all 6 map blocks
6. Restore Maps nav group in docs.json (catalog generator had merged
   them into Data)
This commit is contained in:
Miguel Ángel
2026-05-18 01:41:15 -04:00
parent cf2addfb92
commit 0f1c64dcae
7 changed files with 125 additions and 33 deletions
+2 -2
View File
@@ -368,7 +368,7 @@ function parseHostVariableValues(host: Element): Record<string, unknown> {
return parsed as Record<string, unknown>;
}
const FLATTENED_INNER_ROOT_STRIP_ATTRS = [
export const FLATTENED_INNER_ROOT_STRIP_ATTRS = [
"data-composition-id",
"data-composition-file",
"data-start",
@@ -381,7 +381,7 @@ const FLATTENED_INNER_ROOT_STRIP_ATTRS = [
"data-hf-authored-end",
];
function prepareFlattenedInnerRoot(innerRoot: Element): Element {
export function prepareFlattenedInnerRoot(innerRoot: Element): Element {
const prepared = innerRoot.cloneNode(true) as Element;
const authoredRootId = prepared.getAttribute("id")?.trim();
for (const attrName of FLATTENED_INNER_ROOT_STRIP_ATTRS) {
+6 -1
View File
@@ -15,7 +15,12 @@ export {
export { compileHtml, type MediaDurationProber } from "./htmlCompiler";
// HTML bundler (Node.js — requires fs, linkedom, esbuild)
export { bundleToSingleHtml, type BundleOptions } from "./htmlBundler";
export {
bundleToSingleHtml,
type BundleOptions,
prepareFlattenedInnerRoot,
FLATTENED_INNER_ROOT_STRIP_ATTRS,
} from "./htmlBundler";
export {
RUNTIME_BOOTSTRAP_ATTR,
+1 -1
View File
@@ -964,7 +964,7 @@ export function initSandboxRuntimeModular(): void {
return true;
};
(window as any).__hfForceTimelineRebind = () => {
(window as Window & { __hfForceTimelineRebind?: () => void }).__hfForceTimelineRebind = () => {
childrenBound = false;
bindRootTimelineIfAvailable();
};