@tamagui/config-base 1.0.1-rc.5 → 1.0.1-rc.6
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/createGenericFont.ts"],
|
|
4
|
-
"sourcesContent": ["import { GenericFont, createFont } from '@tamagui/core'\n\nconst genericFontSizes = {\n 1: 10,\n 2: 11,\n 3: 12,\n 4: 14,\n 5: 15,\n 6: 16,\n 7: 20,\n 8: 22,\n 9: 30,\n 10: 42,\n 11: 52,\n 12: 62,\n 13: 72,\n 14: 92,\n 15: 114,\n 16: 124,\n} as const\n\nexport function createGenericFont
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwC;AAExC,MAAM,mBAAmB;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,SAAS,
|
|
4
|
+
"sourcesContent": ["import { GenericFont, createFont } from '@tamagui/core'\n\nconst genericFontSizes = {\n 1: 10,\n 2: 11,\n 3: 12,\n 4: 14,\n 5: 15,\n 6: 16,\n 7: 20,\n 8: 22,\n 9: 30,\n 10: 42,\n 11: 52,\n 12: 62,\n 13: 72,\n 14: 92,\n 15: 114,\n 16: 124,\n} as const\n\nexport function createGenericFont<\n A extends GenericFont<keyof typeof genericFontSizes>,\n>(\n family: string,\n font: Partial<A> = {},\n {\n sizeLineHeight = (val) => val * 1.35,\n }: {\n sizeLineHeight?: (val: number) => number\n } = {},\n): A {\n const size = font.size || genericFontSizes\n return createFont({\n family,\n size,\n lineHeight: Object.fromEntries(\n Object.entries(size).map(([k, v]) => [k, sizeLineHeight(+v)]),\n ) as typeof size,\n weight: { 0: '300' },\n letterSpacing: { 4: 0 },\n ...(font as any),\n })\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwC;AAExC,MAAM,mBAAmB;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,SAAS,kBAGd,QACA,OAAmB,CAAC,GACpB;AAAA,EACE,iBAAiB,CAAC,QAAQ,MAAM;AAClC,IAEI,CAAC,GACF;AACH,QAAM,OAAO,KAAK,QAAQ;AAC1B,aAAO,wBAAW;AAAA,IAChB;AAAA,IACA;AAAA,IACA,YAAY,OAAO;AAAA,MACjB,OAAO,QAAQ,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;AAAA,IAC9D;AAAA,IACA,QAAQ,EAAE,GAAG,MAAM;AAAA,IACnB,eAAe,EAAE,GAAG,EAAE;AAAA,IACtB,GAAI;AAAA,EACN,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tamagui.config.ts"],
|
|
4
|
-
"sourcesContent": ["import { createInterFont } from '@tamagui/font-inter'\nimport { createSilkscreenFont } from '@tamagui/font-silkscreen'\nimport { shorthands } from '@tamagui/shorthands'\nimport { themes, tokens } from '@tamagui/theme-base'\n\nimport { animations } from './animations'\nimport { createGenericFont } from './createGenericFont'\nimport { media, mediaQueryDefaultActive } from './media'\n\nexport * from './animations'\n\nconst systemFamily =\n process.env.TAMAGUI_TARGET === 'native'\n ? 'Inter'\n : '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"'\n\nconst silkscreenFont = createSilkscreenFont()\nconst headingFont = createInterFont(\n {\n size: {\n 5: 13,\n 6: 15,\n },\n transform: {\n 6: 'uppercase',\n 7: 'none',\n },\n weight: {\n 6: '400',\n 7: '700',\n },\n color: {\n 6: '$colorFocus',\n 7: '$color',\n },\n letterSpacing: {\n 5: 2,\n 6: 1,\n 7: 0,\n 8: 0,\n 9: -1,\n 10: -1.5,\n 12: -2,\n 14: -3,\n 15: -4,\n },\n // for native\n face: {\n 700: { normal: 'InterBold' },\n 800: { normal: 'InterBold' },\n 900: { normal: 'InterBold' },\n },\n },\n { sizeLineHeight: (size) => Math.round(size * 1.1 + (size < 30 ? 10 : 5)) }
|
|
4
|
+
"sourcesContent": ["import { createInterFont } from '@tamagui/font-inter'\nimport { createSilkscreenFont } from '@tamagui/font-silkscreen'\nimport { shorthands } from '@tamagui/shorthands'\nimport { themes, tokens } from '@tamagui/theme-base'\n\nimport { animations } from './animations'\nimport { createGenericFont } from './createGenericFont'\nimport { media, mediaQueryDefaultActive } from './media'\n\nexport * from './animations'\n\nconst systemFamily =\n process.env.TAMAGUI_TARGET === 'native'\n ? 'Inter'\n : '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"'\n\nconst silkscreenFont = createSilkscreenFont()\nconst headingFont = createInterFont(\n {\n size: {\n 5: 13,\n 6: 15,\n },\n transform: {\n 6: 'uppercase',\n 7: 'none',\n },\n weight: {\n 6: '400',\n 7: '700',\n },\n color: {\n 6: '$colorFocus',\n 7: '$color',\n },\n letterSpacing: {\n 5: 2,\n 6: 1,\n 7: 0,\n 8: 0,\n 9: -1,\n 10: -1.5,\n 12: -2,\n 14: -3,\n 15: -4,\n },\n // for native\n face: {\n 700: { normal: 'InterBold' },\n 800: { normal: 'InterBold' },\n 900: { normal: 'InterBold' },\n },\n },\n { sizeLineHeight: (size) => Math.round(size * 1.1 + (size < 30 ? 10 : 5)) },\n)\nconst bodyFont = createInterFont(\n {\n family: systemFamily,\n weight: {\n 1: '500',\n 7: '600',\n },\n },\n {\n sizeSize: (size) => Math.round(size),\n sizeLineHeight: (size) => Math.round(size * 1.1 + (size >= 12 ? 8 : 4)),\n },\n)\n\nconst monoFont = createGenericFont(\n `\"ui-monospace\", \"SFMono-Regular\", \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace`,\n {\n weight: {\n 1: '500',\n },\n size: {\n 1: 11,\n 2: 12,\n 3: 13,\n 4: 14,\n 5: 16,\n 6: 18,\n 7: 20,\n 8: 22,\n 9: 30,\n 10: 42,\n 11: 52,\n 12: 62,\n 13: 72,\n 14: 92,\n 15: 114,\n 16: 124,\n },\n },\n {\n sizeLineHeight: (x) => x * 1.5,\n },\n)\n\nexport const config = {\n shouldAddPrefersColorThemes: true,\n themeClassNameOnRoot: true,\n animations,\n media,\n shorthands,\n themes,\n tokens,\n fonts: {\n // noto: notoFont as any,\n heading: headingFont,\n body: bodyFont,\n mono: monoFont,\n silkscreen: silkscreenFont,\n },\n}\n\n// @ts-ignore bad types\nconfig.mediaQueryDefaultActive = mediaQueryDefaultActive\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAgC;AAChC,6BAAqC;AACrC,wBAA2B;AAC3B,wBAA+B;AAE/B,wBAA2B;AAC3B,+BAAkC;AAClC,mBAA+C;AAE/C,mCAAc,yBATd;AAWA,MAAM,eACJ,QAAQ,IAAI,mBAAmB,WAC3B,UACA;AAEN,MAAM,qBAAiB,6CAAqB;AAC5C,MAAM,kBAAc;AAAA,EAClB;AAAA,IACE,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,WAAW;AAAA,MACT,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,OAAO;AAAA,MACL,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,eAAe;AAAA,MACb,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,IAEA,MAAM;AAAA,MACJ,KAAK,EAAE,QAAQ,YAAY;AAAA,MAC3B,KAAK,EAAE,QAAQ,YAAY;AAAA,MAC3B,KAAK,EAAE,QAAQ,YAAY;AAAA,IAC7B;AAAA,EACF;AAAA,EACA,EAAE,gBAAgB,CAAC,SAAS,KAAK,MAAM,OAAO,OAAO,OAAO,KAAK,KAAK,EAAE,EAAE;AAC5E;AACA,MAAM,eAAW;AAAA,EACf;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU,CAAC,SAAS,KAAK,MAAM,IAAI;AAAA,IACnC,gBAAgB,CAAC,SAAS,KAAK,MAAM,OAAO,OAAO,QAAQ,KAAK,IAAI,EAAE;AAAA,EACxE;AACF;AAEA,MAAM,eAAW;AAAA,EACf;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,MACN,GAAG;AAAA,IACL;AAAA,IACA,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA;AAAA,IACE,gBAAgB,CAAC,MAAM,IAAI;AAAA,EAC7B;AACF;AAEO,MAAM,SAAS;AAAA,EACpB,6BAA6B;AAAA,EAC7B,sBAAsB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,IAEL,SAAS;AAAA,IACT,MAAM;AAAA,IACN,MAAM;AAAA,IACN,YAAY;AAAA,EACd;AACF;AAGA,OAAO,0BAA0B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/createGenericFont.ts"],
|
|
4
|
-
"sourcesContent": ["import { GenericFont, createFont } from '@tamagui/core'\n\nconst genericFontSizes = {\n 1: 10,\n 2: 11,\n 3: 12,\n 4: 14,\n 5: 15,\n 6: 16,\n 7: 20,\n 8: 22,\n 9: 30,\n 10: 42,\n 11: 52,\n 12: 62,\n 13: 72,\n 14: 92,\n 15: 114,\n 16: 124,\n} as const\n\nexport function createGenericFont
|
|
5
|
-
"mappings": "AAAA,SAAsB,kBAAkB;AAExC,MAAM,mBAAmB;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,SAAS,
|
|
4
|
+
"sourcesContent": ["import { GenericFont, createFont } from '@tamagui/core'\n\nconst genericFontSizes = {\n 1: 10,\n 2: 11,\n 3: 12,\n 4: 14,\n 5: 15,\n 6: 16,\n 7: 20,\n 8: 22,\n 9: 30,\n 10: 42,\n 11: 52,\n 12: 62,\n 13: 72,\n 14: 92,\n 15: 114,\n 16: 124,\n} as const\n\nexport function createGenericFont<\n A extends GenericFont<keyof typeof genericFontSizes>,\n>(\n family: string,\n font: Partial<A> = {},\n {\n sizeLineHeight = (val) => val * 1.35,\n }: {\n sizeLineHeight?: (val: number) => number\n } = {},\n): A {\n const size = font.size || genericFontSizes\n return createFont({\n family,\n size,\n lineHeight: Object.fromEntries(\n Object.entries(size).map(([k, v]) => [k, sizeLineHeight(+v)]),\n ) as typeof size,\n weight: { 0: '300' },\n letterSpacing: { 4: 0 },\n ...(font as any),\n })\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAsB,kBAAkB;AAExC,MAAM,mBAAmB;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,SAAS,kBAGd,QACA,OAAmB,CAAC,GACpB;AAAA,EACE,iBAAiB,CAAC,QAAQ,MAAM;AAClC,IAEI,CAAC,GACF;AACH,QAAM,OAAO,KAAK,QAAQ;AAC1B,SAAO,WAAW;AAAA,IAChB;AAAA,IACA;AAAA,IACA,YAAY,OAAO;AAAA,MACjB,OAAO,QAAQ,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;AAAA,IAC9D;AAAA,IACA,QAAQ,EAAE,GAAG,MAAM;AAAA,IACnB,eAAe,EAAE,GAAG,EAAE;AAAA,IACtB,GAAI;AAAA,EACN,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tamagui.config.ts"],
|
|
4
|
-
"sourcesContent": ["import { createInterFont } from '@tamagui/font-inter'\nimport { createSilkscreenFont } from '@tamagui/font-silkscreen'\nimport { shorthands } from '@tamagui/shorthands'\nimport { themes, tokens } from '@tamagui/theme-base'\n\nimport { animations } from './animations'\nimport { createGenericFont } from './createGenericFont'\nimport { media, mediaQueryDefaultActive } from './media'\n\nexport * from './animations'\n\nconst systemFamily =\n process.env.TAMAGUI_TARGET === 'native'\n ? 'Inter'\n : '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"'\n\nconst silkscreenFont = createSilkscreenFont()\nconst headingFont = createInterFont(\n {\n size: {\n 5: 13,\n 6: 15,\n },\n transform: {\n 6: 'uppercase',\n 7: 'none',\n },\n weight: {\n 6: '400',\n 7: '700',\n },\n color: {\n 6: '$colorFocus',\n 7: '$color',\n },\n letterSpacing: {\n 5: 2,\n 6: 1,\n 7: 0,\n 8: 0,\n 9: -1,\n 10: -1.5,\n 12: -2,\n 14: -3,\n 15: -4,\n },\n // for native\n face: {\n 700: { normal: 'InterBold' },\n 800: { normal: 'InterBold' },\n 900: { normal: 'InterBold' },\n },\n },\n { sizeLineHeight: (size) => Math.round(size * 1.1 + (size < 30 ? 10 : 5)) }
|
|
4
|
+
"sourcesContent": ["import { createInterFont } from '@tamagui/font-inter'\nimport { createSilkscreenFont } from '@tamagui/font-silkscreen'\nimport { shorthands } from '@tamagui/shorthands'\nimport { themes, tokens } from '@tamagui/theme-base'\n\nimport { animations } from './animations'\nimport { createGenericFont } from './createGenericFont'\nimport { media, mediaQueryDefaultActive } from './media'\n\nexport * from './animations'\n\nconst systemFamily =\n process.env.TAMAGUI_TARGET === 'native'\n ? 'Inter'\n : '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"'\n\nconst silkscreenFont = createSilkscreenFont()\nconst headingFont = createInterFont(\n {\n size: {\n 5: 13,\n 6: 15,\n },\n transform: {\n 6: 'uppercase',\n 7: 'none',\n },\n weight: {\n 6: '400',\n 7: '700',\n },\n color: {\n 6: '$colorFocus',\n 7: '$color',\n },\n letterSpacing: {\n 5: 2,\n 6: 1,\n 7: 0,\n 8: 0,\n 9: -1,\n 10: -1.5,\n 12: -2,\n 14: -3,\n 15: -4,\n },\n // for native\n face: {\n 700: { normal: 'InterBold' },\n 800: { normal: 'InterBold' },\n 900: { normal: 'InterBold' },\n },\n },\n { sizeLineHeight: (size) => Math.round(size * 1.1 + (size < 30 ? 10 : 5)) },\n)\nconst bodyFont = createInterFont(\n {\n family: systemFamily,\n weight: {\n 1: '500',\n 7: '600',\n },\n },\n {\n sizeSize: (size) => Math.round(size),\n sizeLineHeight: (size) => Math.round(size * 1.1 + (size >= 12 ? 8 : 4)),\n },\n)\n\nconst monoFont = createGenericFont(\n `\"ui-monospace\", \"SFMono-Regular\", \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace`,\n {\n weight: {\n 1: '500',\n },\n size: {\n 1: 11,\n 2: 12,\n 3: 13,\n 4: 14,\n 5: 16,\n 6: 18,\n 7: 20,\n 8: 22,\n 9: 30,\n 10: 42,\n 11: 52,\n 12: 62,\n 13: 72,\n 14: 92,\n 15: 114,\n 16: 124,\n },\n },\n {\n sizeLineHeight: (x) => x * 1.5,\n },\n)\n\nexport const config = {\n shouldAddPrefersColorThemes: true,\n themeClassNameOnRoot: true,\n animations,\n media,\n shorthands,\n themes,\n tokens,\n fonts: {\n // noto: notoFont as any,\n heading: headingFont,\n body: bodyFont,\n mono: monoFont,\n silkscreen: silkscreenFont,\n },\n}\n\n// @ts-ignore bad types\nconfig.mediaQueryDefaultActive = mediaQueryDefaultActive\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,uBAAuB;AAChC,SAAS,4BAA4B;AACrC,SAAS,kBAAkB;AAC3B,SAAS,QAAQ,cAAc;AAE/B,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAClC,SAAS,OAAO,+BAA+B;AAE/C,cAAc;AAEd,MAAM,eACJ,QAAQ,IAAI,mBAAmB,WAC3B,UACA;AAEN,MAAM,iBAAiB,qBAAqB;AAC5C,MAAM,cAAc;AAAA,EAClB;AAAA,IACE,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,WAAW;AAAA,MACT,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,OAAO;AAAA,MACL,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,eAAe;AAAA,MACb,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,IAEA,MAAM;AAAA,MACJ,KAAK,EAAE,QAAQ,YAAY;AAAA,MAC3B,KAAK,EAAE,QAAQ,YAAY;AAAA,MAC3B,KAAK,EAAE,QAAQ,YAAY;AAAA,IAC7B;AAAA,EACF;AAAA,EACA,EAAE,gBAAgB,CAAC,SAAS,KAAK,MAAM,OAAO,OAAO,OAAO,KAAK,KAAK,EAAE,EAAE;AAC5E;AACA,MAAM,WAAW;AAAA,EACf;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU,CAAC,SAAS,KAAK,MAAM,IAAI;AAAA,IACnC,gBAAgB,CAAC,SAAS,KAAK,MAAM,OAAO,OAAO,QAAQ,KAAK,IAAI,EAAE;AAAA,EACxE;AACF;AAEA,MAAM,WAAW;AAAA,EACf;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,MACN,GAAG;AAAA,IACL;AAAA,IACA,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA;AAAA,IACE,gBAAgB,CAAC,MAAM,IAAI;AAAA,EAC7B;AACF;AAEO,MAAM,SAAS;AAAA,EACpB,6BAA6B;AAAA,EAC7B,sBAAsB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,IAEL,SAAS;AAAA,IACT,MAAM;AAAA,IACN,MAAM;AAAA,IACN,YAAY;AAAA,EACd;AACF;AAGA,OAAO,0BAA0B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/config-base",
|
|
3
|
-
"version": "1.0.1-rc.
|
|
3
|
+
"version": "1.0.1-rc.6",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "tamagui-build",
|
|
15
15
|
"watch": "tamagui-build --watch",
|
|
16
|
-
"lint": "
|
|
17
|
-
"lint:fix": "
|
|
16
|
+
"lint": "../../node_modules/.bin/rome check src",
|
|
17
|
+
"lint:fix": "../../node_modules/.bin/rome check --apply-suggested src",
|
|
18
18
|
"clean": "tamagui-build clean",
|
|
19
19
|
"clean:build": "tamagui-build clean:build"
|
|
20
20
|
},
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@tamagui/animations-css": "^1.0.1-rc.
|
|
30
|
-
"@tamagui/animations-react-native": "^1.0.1-rc.
|
|
31
|
-
"@tamagui/colors": "^1.0.1-rc.
|
|
32
|
-
"@tamagui/core": "^1.0.1-rc.
|
|
33
|
-
"@tamagui/font-inter": "^1.0.1-rc.
|
|
34
|
-
"@tamagui/font-silkscreen": "^1.0.1-rc.
|
|
35
|
-
"@tamagui/shorthands": "^1.0.1-rc.
|
|
36
|
-
"@tamagui/theme-base": "^1.0.1-rc.
|
|
29
|
+
"@tamagui/animations-css": "^1.0.1-rc.6",
|
|
30
|
+
"@tamagui/animations-react-native": "^1.0.1-rc.6",
|
|
31
|
+
"@tamagui/colors": "^1.0.1-rc.6",
|
|
32
|
+
"@tamagui/core": "^1.0.1-rc.6",
|
|
33
|
+
"@tamagui/font-inter": "^1.0.1-rc.6",
|
|
34
|
+
"@tamagui/font-silkscreen": "^1.0.1-rc.6",
|
|
35
|
+
"@tamagui/shorthands": "^1.0.1-rc.6",
|
|
36
|
+
"@tamagui/theme-base": "^1.0.1-rc.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@tamagui/build": "^1.0.1-rc.
|
|
39
|
+
"@tamagui/build": "^1.0.1-rc.6"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
package/src/createGenericFont.ts
CHANGED
|
@@ -19,21 +19,23 @@ const genericFontSizes = {
|
|
|
19
19
|
16: 124,
|
|
20
20
|
} as const
|
|
21
21
|
|
|
22
|
-
export function createGenericFont<
|
|
22
|
+
export function createGenericFont<
|
|
23
|
+
A extends GenericFont<keyof typeof genericFontSizes>,
|
|
24
|
+
>(
|
|
23
25
|
family: string,
|
|
24
26
|
font: Partial<A> = {},
|
|
25
27
|
{
|
|
26
28
|
sizeLineHeight = (val) => val * 1.35,
|
|
27
29
|
}: {
|
|
28
30
|
sizeLineHeight?: (val: number) => number
|
|
29
|
-
} = {}
|
|
31
|
+
} = {},
|
|
30
32
|
): A {
|
|
31
33
|
const size = font.size || genericFontSizes
|
|
32
34
|
return createFont({
|
|
33
35
|
family,
|
|
34
36
|
size,
|
|
35
37
|
lineHeight: Object.fromEntries(
|
|
36
|
-
Object.entries(size).map(([k, v]) => [k, sizeLineHeight(+v)])
|
|
38
|
+
Object.entries(size).map(([k, v]) => [k, sizeLineHeight(+v)]),
|
|
37
39
|
) as typeof size,
|
|
38
40
|
weight: { 0: '300' },
|
|
39
41
|
letterSpacing: { 4: 0 },
|
package/src/tamagui.config.ts
CHANGED
|
@@ -51,7 +51,7 @@ const headingFont = createInterFont(
|
|
|
51
51
|
900: { normal: 'InterBold' },
|
|
52
52
|
},
|
|
53
53
|
},
|
|
54
|
-
{ sizeLineHeight: (size) => Math.round(size * 1.1 + (size < 30 ? 10 : 5)) }
|
|
54
|
+
{ sizeLineHeight: (size) => Math.round(size * 1.1 + (size < 30 ? 10 : 5)) },
|
|
55
55
|
)
|
|
56
56
|
const bodyFont = createInterFont(
|
|
57
57
|
{
|
|
@@ -64,7 +64,7 @@ const bodyFont = createInterFont(
|
|
|
64
64
|
{
|
|
65
65
|
sizeSize: (size) => Math.round(size),
|
|
66
66
|
sizeLineHeight: (size) => Math.round(size * 1.1 + (size >= 12 ? 8 : 4)),
|
|
67
|
-
}
|
|
67
|
+
},
|
|
68
68
|
)
|
|
69
69
|
|
|
70
70
|
const monoFont = createGenericFont(
|
|
@@ -94,7 +94,7 @@ const monoFont = createGenericFont(
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
sizeLineHeight: (x) => x * 1.5,
|
|
97
|
-
}
|
|
97
|
+
},
|
|
98
98
|
)
|
|
99
99
|
|
|
100
100
|
export const config = {
|