boss-css 0.0.5 → 0.0.6
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.
|
@@ -89,6 +89,11 @@ const buildPackageName = (font, entry) => {
|
|
|
89
89
|
const id = entry?.id ?? normalizeFontName(font.name);
|
|
90
90
|
return font.variable ? `@fontsource-variable/${id}` : `@fontsource/${id}`;
|
|
91
91
|
};
|
|
92
|
+
const resolveTokenFamily = (font, entry) => {
|
|
93
|
+
if (!entry) return font.name;
|
|
94
|
+
if (font.variable && entry.family.startsWith("Material Symbols")) return `${entry.family} Variable`;
|
|
95
|
+
return entry.family;
|
|
96
|
+
};
|
|
92
97
|
const toVariationSettings = (axes) => {
|
|
93
98
|
if (!axes) return null;
|
|
94
99
|
const pairs = [];
|
|
@@ -258,7 +263,7 @@ const onBoot = async (api) => {
|
|
|
258
263
|
const cssFiles = buildCssFiles(font, entry);
|
|
259
264
|
const axes = font.variable ? font.variableAxes : void 0;
|
|
260
265
|
const fontFolder = isLocal ? buildFontFolderName(id, resolvedVersion, font.variable === true) : null;
|
|
261
|
-
if (font.token) fontTokens[font.token] = entry
|
|
266
|
+
if (font.token) fontTokens[font.token] = resolveTokenFamily(font, entry);
|
|
262
267
|
for (const file of cssFiles) {
|
|
263
268
|
const cssUrl = `${CDN_NPM_BASE}/${packageName}@${resolvedVersion}/${file}`;
|
|
264
269
|
if (isLocal) {
|
|
@@ -87,6 +87,11 @@ const buildPackageName = (font, entry) => {
|
|
|
87
87
|
const id = entry?.id ?? normalizeFontName(font.name);
|
|
88
88
|
return font.variable ? `@fontsource-variable/${id}` : `@fontsource/${id}`;
|
|
89
89
|
};
|
|
90
|
+
const resolveTokenFamily = (font, entry) => {
|
|
91
|
+
if (!entry) return font.name;
|
|
92
|
+
if (font.variable && entry.family.startsWith("Material Symbols")) return `${entry.family} Variable`;
|
|
93
|
+
return entry.family;
|
|
94
|
+
};
|
|
90
95
|
const toVariationSettings = (axes) => {
|
|
91
96
|
if (!axes) return null;
|
|
92
97
|
const pairs = [];
|
|
@@ -256,7 +261,7 @@ const onBoot = async (api) => {
|
|
|
256
261
|
const cssFiles = buildCssFiles(font, entry);
|
|
257
262
|
const axes = font.variable ? font.variableAxes : void 0;
|
|
258
263
|
const fontFolder = isLocal ? buildFontFolderName(id, resolvedVersion, font.variable === true) : null;
|
|
259
|
-
if (font.token) fontTokens[font.token] = entry
|
|
264
|
+
if (font.token) fontTokens[font.token] = resolveTokenFamily(font, entry);
|
|
260
265
|
for (const file of cssFiles) {
|
|
261
266
|
const cssUrl = `${CDN_NPM_BASE}/${packageName}@${resolvedVersion}/${file}`;
|
|
262
267
|
if (isLocal) {
|