@tamagui/font-dm-serif-display 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/font-dm-serif-display",
3
- "version": "1.124.17",
3
+ "version": "1.124.18",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -17,8 +17,8 @@
17
17
  "clean:build": "tamagui-build clean:build"
18
18
  },
19
19
  "devDependencies": {
20
- "@tamagui/build": "1.124.17",
21
- "@tamagui/core": "1.124.17",
20
+ "@tamagui/build": "1.124.18",
21
+ "@tamagui/core": "1.124.18",
22
22
  "subset-font": "^2.1.0"
23
23
  }
24
24
  }
package/types/index.d.ts CHANGED
@@ -1,26 +1,27 @@
1
- import type { FillInFont, GenericFont } from '@tamagui/core';
2
- export declare const createDmSerifDisplayFont: <A extends GenericFont>(font?: Partial<A>, { sizeLineHeight, sizeSize, }?: {
3
- sizeLineHeight?: (fontSize: number) => number;
4
- sizeSize?: (size: number) => number;
1
+ import type { FillInFont, GenericFont } from "@tamagui/core";
2
+ export declare const createDmSerifDisplayFont: <A extends GenericFont>(font?: Partial<A>, { sizeLineHeight, sizeSize }?: {
3
+ sizeLineHeight?: (fontSize: number) => number;
4
+ sizeSize?: (size: number) => number;
5
5
  }) => FillInFont<A, keyof typeof defaultSizes>;
6
6
  declare const defaultSizes: {
7
- readonly 1: 11;
8
- readonly 2: 12;
9
- readonly 3: 13;
10
- readonly 4: 14;
11
- readonly true: 14;
12
- readonly 5: 18;
13
- readonly 6: 22;
14
- readonly 7: 26;
15
- readonly 8: 30;
16
- readonly 9: 38;
17
- readonly 10: 46;
18
- readonly 11: 55;
19
- readonly 12: 62;
20
- readonly 13: 72;
21
- readonly 14: 92;
22
- readonly 15: 114;
23
- readonly 16: 134;
7
+ readonly 1: 11;
8
+ readonly 2: 12;
9
+ readonly 3: 13;
10
+ readonly 4: 14;
11
+ readonly true: 14;
12
+ readonly 5: 18;
13
+ readonly 6: 22;
14
+ readonly 7: 26;
15
+ readonly 8: 30;
16
+ readonly 9: 38;
17
+ readonly 10: 46;
18
+ readonly 11: 55;
19
+ readonly 12: 62;
20
+ readonly 13: 72;
21
+ readonly 14: 92;
22
+ readonly 15: 114;
23
+ readonly 16: 134;
24
24
  };
25
25
  export {};
26
+
26
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1,15 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAK5D,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,WAAW,SACtD,OAAO,CAAC,CAAC,CAAC,kCAIb;IACD,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;IAC7C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CACpC,KACA,UAAU,CAAC,CAAC,EAAE,MAAM,OAAO,YAAY,CA2BzC,CAAA;AAED,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;CAkBR,CAAA"}
1
+ {
2
+ "mappings": "AAAA,cAAc,YAAY,mBAAmB,eAAe;AAK5D,OAAO,cAAM,2BAA4B,UAAU,aACjDA,OAAM,QAAQ,IACd,EACE,gBACA,UAID,GAHE;CACD,kBAAkBC;CAClB,YAAYC;AACb,MACA,WAAW,gBAAgB;AA6B9B,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\nconst LINE_HEIGHT = 1.2\n\nexport const createDmSerifDisplayFont = <A extends GenericFont>(\n font: Partial<A> = {},\n {\n sizeLineHeight = (size) => size,\n sizeSize = (size) => size,\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 ? '\"DM Serif Display\", -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'\n : 'DM Serif Display',\n lineHeight: Object.fromEntries(\n Object.entries(size).map(([k, v]) => [\n k,\n sizeLineHeight(getVariableValue(v) * LINE_HEIGHT),\n ])\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: 18,\n 6: 22,\n 7: 26,\n 8: 30,\n 9: 38,\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
+ }