refactor(core): trim color grading api surface

This commit is contained in:
ukimsanov
2026-06-16 13:41:28 -07:00
parent 90582d7faa
commit 8aaaaf1812
4 changed files with 12 additions and 24 deletions
+5 -2
View File
@@ -222,7 +222,7 @@ function maybeInlineRelativeAssetUrl(urlValue: string, projectDir: string): stri
}
// fallow-ignore-next-line complexity
function rewriteLookLutWithInlinedAssets(value: string, projectDir: string): string {
function rewriteColorGradingLutWithInlinedAssets(value: string, projectDir: string): string {
if (!value.trim().startsWith("{")) return value;
let parsed: unknown;
try {
@@ -979,7 +979,10 @@ export async function bundleToSingleHtml(
for (const el of [...document.querySelectorAll(`[${HF_COLOR_GRADING_ATTR}]`)]) {
const value = el.getAttribute(HF_COLOR_GRADING_ATTR);
if (value) {
el.setAttribute(HF_COLOR_GRADING_ATTR, rewriteLookLutWithInlinedAssets(value, projectDir));
el.setAttribute(
HF_COLOR_GRADING_ATTR,
rewriteColorGradingLutWithInlinedAssets(value, projectDir),
);
}
}