@sveltia/ui 0.77.0 → 0.77.1
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.
|
@@ -129,7 +129,8 @@ export const getFontFaceDescriptors = ({ weight, display, unicodeRange, sizeAdju
|
|
|
129
129
|
* Call it before the `AppShell` component is mounted, so no font is fetched from the CDN first.
|
|
130
130
|
* @param {Record<string, string>} urls URLs keyed with the Fontsource file name, e.g.
|
|
131
131
|
* `source-sans-3-latin-wght-normal.woff2`. Any font omitted, or whose file fails to load, is still
|
|
132
|
-
* loaded from the CDN
|
|
132
|
+
* loaded from the CDN, unless the app has removed the `@font-face` rules for it; a failure is
|
|
133
|
+
* reported in the console.
|
|
133
134
|
*/
|
|
134
135
|
export const setFontURLs = (urls) => {
|
|
135
136
|
if (typeof document === 'undefined' || !document.fonts) {
|
|
@@ -153,13 +154,13 @@ export const setFontURLs = (urls) => {
|
|
|
153
154
|
|
|
154
155
|
document.fonts.add(fontFace);
|
|
155
156
|
|
|
156
|
-
// The browser falls back to the `@font-face` rule for the CDN if the file can’t be loaded,
|
|
157
|
-
//
|
|
158
|
-
// download
|
|
157
|
+
// The browser falls back to the `@font-face` rule for the CDN if the file can’t be loaded, or
|
|
158
|
+
// to another font if the app has removed the rule, which goes unnoticed otherwise. `loaded`
|
|
159
|
+
// settles once the font is used, without forcing a download
|
|
159
160
|
fontFace.loaded.catch(() => {
|
|
160
161
|
// eslint-disable-next-line no-console
|
|
161
162
|
console.warn(
|
|
162
|
-
`Failed to load the ${font.family} font from ${url}.
|
|
163
|
+
`Failed to load the ${font.family} font from ${url}. A fallback font is used instead.`,
|
|
163
164
|
);
|
|
164
165
|
});
|
|
165
166
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltia/ui",
|
|
3
|
-
"version": "0.77.
|
|
3
|
+
"version": "0.77.1",
|
|
4
4
|
"description": "A collection of Svelte components and utilities for building user interfaces.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
"@sveltejs/adapter-auto": "^7.0.1",
|
|
69
69
|
"@sveltejs/kit": "^2.70.3",
|
|
70
70
|
"@sveltejs/package": "^2.5.8",
|
|
71
|
-
"@sveltejs/vite-plugin-svelte": "^7.3.
|
|
72
|
-
"@vitest/browser-playwright": "^5.0.
|
|
73
|
-
"@vitest/coverage-v8": "^5.0.
|
|
74
|
-
"cspell": "^10.3.
|
|
71
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
72
|
+
"@vitest/browser-playwright": "^5.0.2",
|
|
73
|
+
"@vitest/coverage-v8": "^5.0.2",
|
|
74
|
+
"cspell": "^10.3.4",
|
|
75
75
|
"eslint": "^9.39.5",
|
|
76
76
|
"eslint-config-airbnb-extended": "^3.2.0",
|
|
77
77
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
"playwright": "^1.63.0",
|
|
86
86
|
"postcss": "^8.5.28",
|
|
87
87
|
"postcss-html": "^2.0.0",
|
|
88
|
-
"prettier": "^3.9.
|
|
88
|
+
"prettier": "^3.9.9",
|
|
89
89
|
"prettier-plugin-svelte": "^4.1.1",
|
|
90
|
-
"rolldown": "^1.2.
|
|
90
|
+
"rolldown": "^1.2.11",
|
|
91
91
|
"sass": "^1.105.0",
|
|
92
92
|
"shiki": "^4.4.3",
|
|
93
93
|
"stylelint": "^17.15.0",
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"svelte-check": "^4.7.6",
|
|
98
98
|
"svelte-preprocess": "^6.0.5",
|
|
99
99
|
"tslib": "^2.8.1",
|
|
100
|
-
"vite": "^8.3.
|
|
101
|
-
"vitest": "^5.0.
|
|
100
|
+
"vite": "^8.3.1",
|
|
101
|
+
"vitest": "^5.0.2",
|
|
102
102
|
"vitest-browser-svelte": "^3.1.0"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|