@hyperframes/core 0.8.194 → 0.8.195
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/compiler/htmlBundler.js +6 -5
- package/dist/generated/runtime-inline.js +1 -1
- package/dist/gsapCdn.d.ts +3 -0
- package/dist/gsapCdn.js +25 -1
- package/dist/hyperframe.runtime.iife.js +61 -61
- package/dist/runtime/clipReveal.d.ts +8 -0
- package/dist/runtime/clipReveal.js +23 -0
- package/dist/runtime/timedClipHide.d.ts +4 -2
- package/dist/runtime/timedClipHide.js +28 -13
- package/package.json +8 -4
|
@@ -221,7 +221,7 @@ function rebaseEntryAuthoredAssetPaths(document, sourceDir, projectDir) {
|
|
|
221
221
|
el.setAttribute(HF_COLOR_GRADING_ATTR, rebaseColorGradingLutPath(value, sourceDir, projectDir));
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
function inlineCssFile(css, cssFileDir, projectDir,
|
|
224
|
+
function inlineCssFile(css, cssFileDir, projectDir, activeImports) {
|
|
225
225
|
const { result: strippedCss, restore: restoreComments } = withCommentsStripped(css, (s) => s);
|
|
226
226
|
const importPlaceholders = [];
|
|
227
227
|
const withPlaceholders = strippedCss.replace(CSS_IMPORT_RE, (full, _q1, urlPath, _q2, barePath, mediaQuery) => {
|
|
@@ -233,13 +233,14 @@ function inlineCssFile(css, cssFileDir, projectDir, visited = new Set()) {
|
|
|
233
233
|
// project root; isSafePath also blocks symlink escapes (content is inlined).
|
|
234
234
|
if (!isSafePath(projectDir, resolved))
|
|
235
235
|
return full;
|
|
236
|
-
if (
|
|
236
|
+
if (activeImports.has(resolved))
|
|
237
237
|
return "";
|
|
238
238
|
const content = safeReadFile(resolved);
|
|
239
239
|
if (content == null)
|
|
240
240
|
return full;
|
|
241
|
-
|
|
242
|
-
const inlined = inlineCssFile(content, dirname(resolved), projectDir,
|
|
241
|
+
activeImports.add(resolved);
|
|
242
|
+
const inlined = inlineCssFile(content, dirname(resolved), projectDir, activeImports);
|
|
243
|
+
activeImports.delete(resolved);
|
|
243
244
|
const trimmedMedia = (mediaQuery || "").trim();
|
|
244
245
|
const block = trimmedMedia ? `@media ${trimmedMedia} {\n${inlined}\n}\n` : inlined + "\n";
|
|
245
246
|
const idx = importPlaceholders.length;
|
|
@@ -951,7 +952,7 @@ async function bundleProject(projectDir, options) {
|
|
|
951
952
|
if (value !== null)
|
|
952
953
|
style.setAttribute(name, value);
|
|
953
954
|
}
|
|
954
|
-
style.textContent = inlineCssFile(css, dirname(cssPath), projectDir);
|
|
955
|
+
style.textContent = inlineCssFile(css, dirname(cssPath), projectDir, new Set([cssPath]));
|
|
955
956
|
el.replaceWith(style);
|
|
956
957
|
}
|
|
957
958
|
// Read before sub-compositions add theirs: only the root's own scripts can reach into scenes.
|