@zalify/storefront-kit 0.1.4 → 0.1.5
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.
|
@@ -29,10 +29,10 @@ export function parseFontHandle(handle) {
|
|
|
29
29
|
}
|
|
30
30
|
export function googleFontsHref(family, axes = 'ital,wght@0,400;0,500;0,700;1,400') {
|
|
31
31
|
const param = family.trim().replace(/ /g, '+');
|
|
32
|
-
// display=
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
return `https://fonts.googleapis.com/css2?family=${param}:${axes}&display=
|
|
32
|
+
// display=swap so the brand font always applies once it arrives, even
|
|
33
|
+
// after first paint (optional was tried and skipped cold loads
|
|
34
|
+
// entirely). The swap reflow is a small CLS cost; the catastrophic
|
|
35
|
+
// shifts once blamed on it were actually the hydration mismatch fixed
|
|
36
|
+
// in CssVariables' loader.
|
|
37
|
+
return `https://fonts.googleapis.com/css2?family=${param}:${axes}&display=swap`;
|
|
38
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zalify/storefront-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The Zalify storefront SDK: framework-agnostic commerce logic (/commerce), the theme contract types and validators (/schemas), the canvas-editor bridge (/editor), and the React theme engine + shared components (/ui, /react/server). Consumed as TypeScript source inside the zalify-storefronts monorepo; published as compiled ESM + d.ts.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -38,10 +38,10 @@ export function googleFontsHref(
|
|
|
38
38
|
axes = 'ital,wght@0,400;0,500;0,700;1,400',
|
|
39
39
|
): string {
|
|
40
40
|
const param = family.trim().replace(/ /g, '+');
|
|
41
|
-
// display=
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
return `https://fonts.googleapis.com/css2?family=${param}:${axes}&display=
|
|
41
|
+
// display=swap so the brand font always applies once it arrives, even
|
|
42
|
+
// after first paint (optional was tried and skipped cold loads
|
|
43
|
+
// entirely). The swap reflow is a small CLS cost; the catastrophic
|
|
44
|
+
// shifts once blamed on it were actually the hydration mismatch fixed
|
|
45
|
+
// in CssVariables' loader.
|
|
46
|
+
return `https://fonts.googleapis.com/css2?family=${param}:${axes}&display=swap`;
|
|
47
47
|
}
|