@tamagui/font-inter 1.124.17 → 1.124.18
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/package.json +3 -3
- package/types/index.d.ts +23 -22
- package/types/index.d.ts.map +15 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/font-inter",
|
|
3
|
-
"version": "1.124.
|
|
3
|
+
"version": "1.124.18",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"clean:build": "tamagui-build clean:build"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@tamagui/core": "1.124.
|
|
64
|
+
"@tamagui/core": "1.124.18"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@tamagui/build": "1.124.
|
|
67
|
+
"@tamagui/build": "1.124.18",
|
|
68
68
|
"subset-font": "^2.1.0"
|
|
69
69
|
},
|
|
70
70
|
"publishConfig": {
|
package/types/index.d.ts
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import type { FillInFont, GenericFont } from
|
|
2
|
-
export type
|
|
3
|
-
export declare const createInterFont: <A extends GenericFont>(font?: Partial<A>, { sizeLineHeight, sizeSize
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { FillInFont, GenericFont } from "@tamagui/core";
|
|
2
|
+
export type { GenericFont, FillInFont } from "@tamagui/core";
|
|
3
|
+
export declare const createInterFont: <A extends GenericFont>(font?: Partial<A>, { sizeLineHeight, sizeSize }?: {
|
|
4
|
+
sizeLineHeight?: (fontSize: number) => number;
|
|
5
|
+
sizeSize?: (size: number) => number;
|
|
6
6
|
}) => FillInFont<A, keyof typeof defaultSizes>;
|
|
7
7
|
declare const defaultSizes: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
readonly 1: 11;
|
|
9
|
+
readonly 2: 12;
|
|
10
|
+
readonly 3: 13;
|
|
11
|
+
readonly 4: 14;
|
|
12
|
+
readonly true: 14;
|
|
13
|
+
readonly 5: 16;
|
|
14
|
+
readonly 6: 18;
|
|
15
|
+
readonly 7: 20;
|
|
16
|
+
readonly 8: 23;
|
|
17
|
+
readonly 9: 30;
|
|
18
|
+
readonly 10: 46;
|
|
19
|
+
readonly 11: 55;
|
|
20
|
+
readonly 12: 62;
|
|
21
|
+
readonly 13: 72;
|
|
22
|
+
readonly 14: 92;
|
|
23
|
+
readonly 15: 114;
|
|
24
|
+
readonly 16: 134;
|
|
25
25
|
};
|
|
26
|
+
|
|
26
27
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAAA,cAAc,YAAY,mBAAmB,eAAe;AAI5D,eAAc,aAAa,kBAAkB;AAE7C,OAAO,cAAM,kBAAmB,UAAU,aACxCA,OAAM,QAAQ,IACd,EACE,gBACA,UAID,GAHE;CACD,kBAAkBC;CAClB,YAAYC;AACb,MACA,WAAW,gBAAgB;AA0B9B,cAAM;UACJ,GAAG;UACH,GAAG;UACH,GAAG;UACH,GAAG;UACH,MAAM;UACN,GAAG;UACH,GAAG;UACH,GAAG;UACH,GAAG;UACH,GAAG;UACH,IAAI;UACJ,IAAI;UACJ,IAAI;UACJ,IAAI;UACJ,IAAI;UACJ,IAAI;UACJ,IAAI",
|
|
3
|
+
"names": [
|
|
4
|
+
"font: Partial<A>",
|
|
5
|
+
"fontSize: number",
|
|
6
|
+
"size: number"
|
|
7
|
+
],
|
|
8
|
+
"sources": [
|
|
9
|
+
"src/index.ts"
|
|
10
|
+
],
|
|
11
|
+
"sourcesContent": [
|
|
12
|
+
"import type { FillInFont, GenericFont } from '@tamagui/core'\nimport { createFont, getVariableValue, isWeb } from '@tamagui/core'\n\n// fix type portability issue?\nexport type { GenericFont, FillInFont } from '@tamagui/core'\n\nexport const createInterFont = <A extends GenericFont>(\n font: Partial<A> = {},\n {\n sizeLineHeight = (size) => size + 10,\n sizeSize = (size) => size * 1,\n }: {\n sizeLineHeight?: (fontSize: number) => number\n sizeSize?: (size: number) => number\n } = {}\n): FillInFont<A, keyof typeof defaultSizes> => {\n // merge to allow individual overrides\n const size = Object.fromEntries(\n Object.entries({\n ...defaultSizes,\n ...font.size,\n }).map(([k, v]) => [k, sizeSize(+v)])\n )\n return createFont({\n family: isWeb\n ? 'Inter, -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'\n : 'Inter',\n lineHeight: Object.fromEntries(\n Object.entries(size).map(([k, v]) => [k, sizeLineHeight(getVariableValue(v))])\n ),\n weight: {\n 4: '300',\n },\n letterSpacing: {\n 4: 0,\n },\n ...(font as any),\n size,\n })\n}\n\nconst defaultSizes = {\n 1: 11,\n 2: 12,\n 3: 13,\n 4: 14,\n true: 14,\n 5: 16,\n 6: 18,\n 7: 20,\n 8: 23,\n 9: 30,\n 10: 46,\n 11: 55,\n 12: 62,\n 13: 72,\n 14: 92,\n 15: 114,\n 16: 134,\n} as const\n"
|
|
13
|
+
],
|
|
14
|
+
"version": 3
|
|
15
|
+
}
|