Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Resolve source files for fonts, remove hack (#5454)

* Resolve source files for fonts, remove hack

* Prettier

* Prettier, add to hook

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>

authored by

Eric Bailey
Dan Abramov
and committed by
GitHub
5e333d4d 87d601e6

+15 -52
+3 -1
package.json
··· 338 338 }, 339 339 "lint-staged": { 340 340 "*{.js,.jsx,.ts,.tsx}": [ 341 - "eslint --cache --fix", 341 + "eslint --cache --fix" 342 + ], 343 + "*{.js,.jsx,.ts,.tsx,.css}": [ 342 344 "prettier --cache --write --ignore-unknown" 343 345 ] 344 346 }
-35
src/alf/fonts.ts
··· 1 - import {useFonts as defaultUseFonts} from 'expo-font' 2 - 3 1 import {isWeb} from '#/platform/detection' 4 2 import {Device, device} from '#/storage' 5 3 ··· 32 30 33 31 export function setFontFamily(fontFamily: Device['fontFamily']) { 34 32 device.set(['fontFamily'], fontFamily) 35 - } 36 - 37 - /* 38 - * IMPORTANT: This is unused. Expo statically extracts these fonts, but we load 39 - * them manually so that we can parallelize the loading along with the JS 40 - * bundle. 41 - * 42 - * See `#/alf/util/useFonts` for the actually used hooks. 43 - * 44 - * All used fonts MUST be configured here. Unused fonts are commented out, but 45 - * the files are there if we need them. 46 - */ 47 - export function DO_NOT_USE() { 48 - return defaultUseFonts({ 49 - // 'Inter-Thin': require('../../assets/fonts/inter/Inter-Thin.otf'), 50 - // 'Inter-ThinItalic': require('../../assets/fonts/inter/Inter-ThinItalic.otf'), 51 - // 'Inter-ExtraLight': require('../../assets/fonts/inter/Inter-ExtraLight.otf'), 52 - // 'Inter-ExtraLightItalic': require('../../assets/fonts/inter/Inter-ExtraLightItalic.otf'), 53 - // 'Inter-Light': require('../../assets/fonts/inter/Inter-Light.otf'), 54 - // 'Inter-LightItalic': require('../../assets/fonts/inter/Inter-LightItalic.otf'), 55 - 'Inter-Regular': require('../../assets/fonts/inter/Inter-Regular.otf'), 56 - 'Inter-Italic': require('../../assets/fonts/inter/Inter-Italic.otf'), 57 - // 'Inter-Medium': require('../../assets/fonts/inter/Inter-Medium.otf'), 58 - // 'Inter-MediumItalic': require('../../assets/fonts/inter/Inter-MediumItalic.otf'), 59 - 'Inter-SemiBold': require('../../assets/fonts/inter/Inter-SemiBold.otf'), 60 - 'Inter-SemiBoldItalic': require('../../assets/fonts/inter/Inter-SemiBoldItalic.otf'), 61 - // 'Inter-Bold': require('../../assets/fonts/inter/Inter-Bold.otf'), 62 - // 'Inter-BoldItalic': require('../../assets/fonts/inter/Inter-BoldItalic.otf'), 63 - 'Inter-ExtraBold': require('../../assets/fonts/inter/Inter-ExtraBold.otf'), 64 - 'Inter-ExtraBoldItalic': require('../../assets/fonts/inter/Inter-ExtraBoldItalic.otf'), 65 - // 'Inter-Black': require('../../assets/fonts/inter/Inter-Black.otf'), 66 - // 'Inter-BlackItalic': require('../../assets/fonts/inter/Inter-BlackItalic.otf'), 67 - }) 68 33 } 69 34 70 35 /*
+12 -16
src/style.css
··· 1 1 @font-face { 2 2 font-family: 'Inter-Regular'; 3 3 src: local('Inter-Regular'), 4 - url(/static/media/Inter-Regular.1f5ed03b6dd9fd1f9982.otf) format('font/otf'); 4 + url(/assets/fonts/inter/Inter-Regular.otf) format('font/otf'); 5 5 font-weight: 400; 6 6 font-style: normal; 7 7 font-display: swap; ··· 9 9 @font-face { 10 10 font-family: 'Inter-Italic'; 11 11 src: local('Inter-Italic'), 12 - url(/static/media/Inter-Italic.95778eb0c75dc956257e.otf) format('font/otf'); 12 + url(/assets/fonts/inter/Inter-Italic.otf) format('font/otf'); 13 13 font-weight: 400; 14 14 font-style: italic; 15 15 font-display: swap; ··· 17 17 /* 18 18 @font-face { 19 19 font-family: "Inter-Medium"; 20 - src: local("Inter-Medium"), url(/static/media/Inter-Medium.296aa2d65964269836b3.otf) format("font/otf"); 20 + src: local("Inter-Medium"), url(/assets/fonts/inter/Inter-Medium.otf) format("font/otf"); 21 21 font-weight: 500; 22 22 font-style: normal; 23 23 font-display: swap; 24 24 } 25 25 @font-face { 26 26 font-family: "Inter-MediumItalic"; 27 - src: local("Inter-MediumItalic"), url(/static/media/Inter-MediumItalic.0e57e17a6311368e2114.otf) format("font/otf"); 27 + src: local("Inter-MediumItalic"), url(/assets/fonts/inter/Inter-MediumItalic.otf) format("font/otf"); 28 28 font-weight: 500; 29 29 font-style: italic; 30 30 font-display: swap; ··· 33 33 @font-face { 34 34 font-family: 'Inter-SemiBold'; 35 35 src: local('Inter-SemiBold'), 36 - url(/static/media/Inter-SemiBold.2277990330981b8409bb.otf) 37 - format('font/otf'); 36 + url(/assets/fonts/inter/Inter-SemiBold.otf) format('font/otf'); 38 37 font-weight: 600; 39 38 font-style: normal; 40 39 font-display: swap; ··· 42 41 @font-face { 43 42 font-family: 'Inter-SemiBoldItalic'; 44 43 src: local('Inter-SemiBoldItalic'), 45 - url(/static/media/Inter-SemiBoldItalic.f62fea3df3a521d6c8a7.otf) 46 - format('font/otf'); 44 + url(/assets/fonts/inter/Inter-SemiBoldItalic.otf) format('font/otf'); 47 45 font-weight: 600; 48 46 font-style: italic; 49 47 font-display: swap; ··· 51 49 /* 52 50 @font-face { 53 51 font-family: "Inter-Bold"; 54 - src: local("Inter-Bold"), url(/static/media/Inter-Bold.8d330503e1d034ad68de.otf) format("font/otf"); 52 + src: local("Inter-Bold"), url(/assets/fonts/inter/Inter-Bold.otf) format("font/otf"); 55 53 font-weight: 700; 56 54 font-style: normal; 57 55 font-display: swap; 58 56 } 59 57 @font-face { 60 58 font-family: "Inter-BoldItalic"; 61 - src: local("Inter-BoldItalic"), url(/static/media/Inter-BoldItalic.bb17e63f9baa0d861a20.otf) format("font/otf"); 59 + src: local("Inter-BoldItalic"), url(/assets/fonts/inter/Inter-BoldItalic.otf) format("font/otf"); 62 60 font-weight: 700; 63 61 font-style: italic; 64 62 font-display: swap; ··· 67 65 @font-face { 68 66 font-family: 'Inter-ExtraBold'; 69 67 src: local('Inter-ExtraBold'), 70 - url(/static/media/Inter-ExtraBold.ff2581a193bf6b7e0b06.otf) 71 - format('font/otf'); 68 + url(/assets/fonts/inter/Inter-ExtraBold.otf) format('font/otf'); 72 69 font-weight: 800; 73 70 font-style: normal; 74 71 font-display: swap; ··· 76 73 @font-face { 77 74 font-family: 'Inter-ExtraBoldItalic'; 78 75 src: local('Inter-ExtraBoldItalic'), 79 - url(/static/media/Inter-ExtraBoldItalic.0e50b40728d24d40fdf4.otf) 80 - format('font/otf'); 76 + url(/assets/fonts/inter/Inter-ExtraBoldItalic.otf) format('font/otf'); 81 77 font-weight: 800; 82 78 font-style: italic; 83 79 font-display: swap; ··· 85 81 /* 86 82 @font-face { 87 83 font-family: "Inter-Black"; 88 - src: local("Inter-Black"), url(/static/media/Inter-Black.66e9a87f1c921e844ed4.otf) format("font/otf"); 84 + src: local("Inter-Black"), url(/assets/fonts/inter/Inter-Black.otf) format("font/otf"); 89 85 font-weight: 900; 90 86 font-style: normal; 91 87 font-display: swap; 92 88 } 93 89 @font-face { 94 90 font-family: "Inter-BlackItalic"; 95 - src: local("Inter-BlackItalic"), url(/static/media/Inter-BlackItalic.27b9f0ad06fd13a7b9da.otf) format("font/otf"); 91 + src: local("Inter-BlackItalic"), url(/assets/fonts/inter/Inter-BlackItalic.otf) format("font/otf"); 96 92 font-weight: 900; 97 93 font-style: italic; 98 94 font-display: swap;