@fkui/font-default 6.34.1 → 6.36.0

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/metadata.d.mts CHANGED
@@ -1,7 +1,16 @@
1
1
  export interface Asset {
2
+ /** Name of the font file */
3
+ name: string;
4
+ /** Relative path to the font file */
2
5
  filename: string;
6
+ /** Full path to the font file */
7
+ filePath: string;
3
8
  }
4
9
 
5
- declare const assets: Asset[];
10
+ /** Absolute path to the folder containing the font files */
11
+ export declare const fontDir: string;
12
+
13
+ /** List of available font assets */
14
+ export declare const assets: Asset[];
6
15
 
7
16
  export default assets;
package/metadata.mjs CHANGED
@@ -1,15 +1,33 @@
1
+ import path from "node:path";
2
+
1
3
  /**
2
4
  * @typedef {Object} Asset {
5
+ * @property {string} name
3
6
  * @property {string} filename
7
+ * @property {string} filePath
8
+ */
9
+
10
+ export const fontDir = path.join(import.meta.dirname, "fonts");
11
+
12
+ /**
13
+ * @param {string} name
14
+ * @returns {Asset}
4
15
  */
16
+ function defineAsset(name) {
17
+ return {
18
+ name,
19
+ filename: `fonts/${name}`,
20
+ filePath: path.join(fontDir, name),
21
+ };
22
+ }
5
23
 
6
24
  /** @type {Asset[]} */
7
- const assets = [
8
- { filename: "fonts/Inter-Bold.woff2" },
9
- { filename: "fonts/Inter-Light.woff2" },
10
- { filename: "fonts/Inter-Medium.woff2" },
11
- { filename: "fonts/Inter-Regular.woff2" },
12
- { filename: "fonts/Inter-SemiBold.woff2" },
25
+ export const assets = [
26
+ defineAsset("Inter-Bold.woff2"),
27
+ defineAsset("Inter-Light.woff2"),
28
+ defineAsset("Inter-Medium.woff2"),
29
+ defineAsset("Inter-Regular.woff2"),
30
+ defineAsset("Inter-SemiBold.woff2"),
13
31
  ];
14
32
 
15
33
  export default assets;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fkui/font-default",
3
- "version": "6.34.1",
3
+ "version": "6.36.0",
4
4
  "description": "Försäkringskassan standardfont",
5
5
  "keywords": [
6
6
  "fkui",
@@ -49,5 +49,5 @@
49
49
  "npm": ">= 7"
50
50
  },
51
51
  "sass": "./src/font.scss",
52
- "gitHead": "0dd21494f3870c35b228551fafdae85c64a14a67"
52
+ "gitHead": "b5bbd381af90d68b52b3a60e3b5e6a46972cd62c"
53
53
  }