@hyperframes/lint 0.7.21 → 0.7.22
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/browser.js +17 -4
- package/dist/browser.js.map +1 -1
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1127,6 +1127,7 @@ async function loadParseGsapScript() {
|
|
|
1127
1127
|
return mod.parseGsapScriptAcorn;
|
|
1128
1128
|
}
|
|
1129
1129
|
var SCENE_BOUNDARY_EPSILON_SECONDS = 0.05;
|
|
1130
|
+
var UNRESOLVED_TARGET = "__unresolved__";
|
|
1130
1131
|
function countClassUsage(tags) {
|
|
1131
1132
|
const counts = /* @__PURE__ */ new Map();
|
|
1132
1133
|
for (const tag of tags) {
|
|
@@ -1489,6 +1490,7 @@ var gsapRules = [
|
|
|
1489
1490
|
const left = gsapWindows[i];
|
|
1490
1491
|
if (!left) continue;
|
|
1491
1492
|
if (left.end <= left.position) continue;
|
|
1493
|
+
if (left.targetSelector === UNRESOLVED_TARGET) continue;
|
|
1492
1494
|
for (let j = i + 1; j < gsapWindows.length; j++) {
|
|
1493
1495
|
const right = gsapWindows[j];
|
|
1494
1496
|
if (!right) continue;
|
|
@@ -1515,6 +1517,7 @@ ${right.raw}`)
|
|
|
1515
1517
|
}
|
|
1516
1518
|
if (clipStartBoundaries.length > 0) {
|
|
1517
1519
|
for (const win of gsapWindows) {
|
|
1520
|
+
if (win.targetSelector === UNRESOLVED_TARGET) continue;
|
|
1518
1521
|
if (!isSceneBoundaryExit(win)) continue;
|
|
1519
1522
|
const boundary = findMatchingSceneBoundary(win.end, clipStartBoundaries);
|
|
1520
1523
|
if (boundary == null) continue;
|
|
@@ -2751,7 +2754,7 @@ var adapterRules = [
|
|
|
2751
2754
|
(t) => /["']three["']/.test(t) && /importmap/.test(scripts.find((s) => s.content === t)?.attrs || "")
|
|
2752
2755
|
);
|
|
2753
2756
|
const hasThreeModuleImport = texts.some(
|
|
2754
|
-
(t) => /\
|
|
2757
|
+
(t) => /\b(?:import|from)\s*[^;\n]*['"][^'"]*three[^'"]*['"]/i.test(t)
|
|
2755
2758
|
);
|
|
2756
2759
|
if (!usesThree || hasThreeScript || hasThreeImportMap || hasThreeModuleImport) return [];
|
|
2757
2760
|
return [
|
|
@@ -2958,6 +2961,12 @@ var GENERIC_FAMILIES = /* @__PURE__ */ new Set([
|
|
|
2958
2961
|
"math",
|
|
2959
2962
|
"emoji",
|
|
2960
2963
|
"fangsong",
|
|
2964
|
+
// Vendor-prefixed system-font keywords. Like `system-ui`, the engine resolves
|
|
2965
|
+
// these to the OS UI font — they are never installable files and must not be
|
|
2966
|
+
// flagged as a missing @font-face, even when a generic fallback follows them
|
|
2967
|
+
// (e.g. `-apple-system, system-ui, sans-serif`).
|
|
2968
|
+
"-apple-system",
|
|
2969
|
+
"blinkmacsystemfont",
|
|
2961
2970
|
"inherit",
|
|
2962
2971
|
"initial",
|
|
2963
2972
|
"unset",
|
|
@@ -2982,6 +2991,11 @@ function extractFontFaceFamilies(styles) {
|
|
|
2982
2991
|
}
|
|
2983
2992
|
return families;
|
|
2984
2993
|
}
|
|
2994
|
+
function normalizeUsedFontName(part) {
|
|
2995
|
+
const name = part.trim().replace(/^['"]|['"]$/g, "").trim().toLowerCase();
|
|
2996
|
+
if (!name || name.includes("(") || name.includes(")")) return null;
|
|
2997
|
+
return name;
|
|
2998
|
+
}
|
|
2985
2999
|
function extractUsedFontFamilies(styles) {
|
|
2986
3000
|
const used = [];
|
|
2987
3001
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -2990,9 +3004,8 @@ function extractUsedFontFamilies(styles) {
|
|
|
2990
3004
|
const withoutFontFace = stripCssComments(style.content).replace(/@font-face\s*\{[^}]*\}/gi, "");
|
|
2991
3005
|
let match;
|
|
2992
3006
|
while ((match = propRe.exec(withoutFontFace)) !== null) {
|
|
2993
|
-
const
|
|
2994
|
-
|
|
2995
|
-
const name = part.trim().replace(/^['"]|['"]$/g, "").trim().toLowerCase();
|
|
3007
|
+
for (const part of match[1].split(",")) {
|
|
3008
|
+
const name = normalizeUsedFontName(part);
|
|
2996
3009
|
if (name && !GENERIC_FAMILIES.has(name) && !seen.has(name)) {
|
|
2997
3010
|
seen.add(name);
|
|
2998
3011
|
used.push(name);
|