pasika 0.10.138 → 0.10.140
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.
|
@@ -11876,6 +11876,10 @@ function isUnused(symbol, references, moduleContents) {
|
|
|
11876
11876
|
return !references.some((reference) => reference.kind === "keyframes" && reference.name === symbol.name);
|
|
11877
11877
|
}
|
|
11878
11878
|
if (symbol.kind !== "theme-token" || isImplicitThemeToken(symbol.name)) return false;
|
|
11879
|
+
const pairedText = /^(?<base>--text-[\w-]+)--(?:line-height|letter-spacing|font-weight)$/u.exec(symbol.name);
|
|
11880
|
+
if (pairedText && references.some((reference) => reference.kind === "theme-class" && reference.token === pairedText.groups?.base)) {
|
|
11881
|
+
return false;
|
|
11882
|
+
}
|
|
11879
11883
|
if (references.some((reference) => reference.kind === "theme-class" && reference.token === symbol.name)) {
|
|
11880
11884
|
return false;
|
|
11881
11885
|
}
|
|
@@ -12584,7 +12588,7 @@ function numericPart(value) {
|
|
|
12584
12588
|
return sign + number + (match.groups.unit === "%" ? "pct" : match.groups.unit ?? "");
|
|
12585
12589
|
}
|
|
12586
12590
|
function simpleValueSlug(value) {
|
|
12587
|
-
const words = value.trim().replace(/,/gu, "
|
|
12591
|
+
const words = value.trim().replace(/,/gu, "_").split(/[_\s]+/u).filter(Boolean);
|
|
12588
12592
|
if (words.length === 0 || words.length > 8) return void 0;
|
|
12589
12593
|
const parts = [];
|
|
12590
12594
|
for (const word of words) {
|
|
@@ -13351,9 +13355,10 @@ function readInventory(files) {
|
|
|
13351
13355
|
}
|
|
13352
13356
|
for (const plainClass of classSelectors(css2)) plainClasses.add(plainClass);
|
|
13353
13357
|
for (const block of themeBlocks(css2)) {
|
|
13354
|
-
|
|
13355
|
-
if (
|
|
13356
|
-
|
|
13358
|
+
const declarations = block.replace(/\/\*[\s\S]*?\*\//gu, "");
|
|
13359
|
+
if (/--\*\s*:\s*initial\b/.test(declarations)) defaultsReset = true;
|
|
13360
|
+
if (/(?:^|[;{])\s*--spacing\s*:/.test(declarations)) baseSpacing = true;
|
|
13361
|
+
for (const decl of declarations.matchAll(/--(?<namespace>[a-z][a-z0-9]*)-(?<token>[a-z0-9][a-z0-9_-]*)\s*:/g)) {
|
|
13357
13362
|
let namespace = decl.groups?.namespace;
|
|
13358
13363
|
let token = decl.groups?.token;
|
|
13359
13364
|
if (namespace === "background" && token?.startsWith("image-")) {
|