@koda-sl/baker-cli 0.158.0 → 0.158.2
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/cli.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
toModelSafeImage,
|
|
37
37
|
ulid,
|
|
38
38
|
validateCanvasDeep
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-CG6OTNUU.js";
|
|
40
40
|
import {
|
|
41
41
|
csvOrJson,
|
|
42
42
|
daysAgoIso,
|
|
@@ -16618,7 +16618,10 @@ function fontFileName(face) {
|
|
|
16618
16618
|
const style = face.style === "italic" ? "italic" : "";
|
|
16619
16619
|
return `${family}-${face.weight}${style}-${face.subset}.woff2`;
|
|
16620
16620
|
}
|
|
16621
|
-
function
|
|
16621
|
+
function fontFaceHref(face) {
|
|
16622
|
+
return `../brand/fonts/${fontFileName(face)}`;
|
|
16623
|
+
}
|
|
16624
|
+
function renderFontFaceCss(faces) {
|
|
16622
16625
|
return faces.map(
|
|
16623
16626
|
(face) => [
|
|
16624
16627
|
"@font-face {",
|
|
@@ -16626,7 +16629,7 @@ function renderFontFaceCss(faces, hrefFor) {
|
|
|
16626
16629
|
` font-style: ${face.style};`,
|
|
16627
16630
|
` font-weight: ${face.weight};`,
|
|
16628
16631
|
" font-display: swap;",
|
|
16629
|
-
` src: url('${
|
|
16632
|
+
` src: url('${fontFaceHref(face)}') format('woff2');`,
|
|
16630
16633
|
...face.unicodeRange ? [` unicode-range: ${face.unicodeRange};`] : [],
|
|
16631
16634
|
"}"
|
|
16632
16635
|
].join("\n")
|
|
@@ -16866,7 +16869,7 @@ var fontsFetchCommand = defineCommand86({
|
|
|
16866
16869
|
explanation: "The font stylesheet resolved but the font files themselves did not download."
|
|
16867
16870
|
});
|
|
16868
16871
|
}
|
|
16869
|
-
const fontFace = renderFontFaceCss(downloaded
|
|
16872
|
+
const fontFace = renderFontFaceCss(downloaded);
|
|
16870
16873
|
const downloadedWeights = [...new Set(downloaded.map((f) => f.weight))].sort((a, b) => a - b);
|
|
16871
16874
|
const incomplete = weights.filter((w) => !downloadedWeights.includes(w));
|
|
16872
16875
|
writeJson({
|