typedump 0.1.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.
Files changed (307) hide show
  1. package/README.md +116 -0
  2. package/data/fonts-data.json +15822 -0
  3. package/dist/chunk-D7LJ3A3P.js +254 -0
  4. package/dist/index.d.ts +59 -0
  5. package/dist/index.js +19 -0
  6. package/dist/mcp/server.d.ts +2 -0
  7. package/dist/mcp/server.js +177 -0
  8. package/fonts/ARK-ES-DenseBold.woff2 +0 -0
  9. package/fonts/ARK-ES-DenseLight.woff2 +0 -0
  10. package/fonts/ARK-ES-DenseMedium.woff2 +0 -0
  11. package/fonts/ARK-ES-DenseRegular.woff2 +0 -0
  12. package/fonts/ARK-ES-SolidBold.woff2 +0 -0
  13. package/fonts/ARK-ES-SolidLight.woff2 +0 -0
  14. package/fonts/ARK-ES-SolidMedium.woff2 +0 -0
  15. package/fonts/ARK-ES-SolidRegular.woff2 +0 -0
  16. package/fonts/AlphaLyrae-Medium.woff2 +0 -0
  17. package/fonts/Amiamie-Black.woff2 +0 -0
  18. package/fonts/Amiamie-BlackItalic.woff2 +0 -0
  19. package/fonts/Amiamie-BlackItalicRound.woff2 +0 -0
  20. package/fonts/Amiamie-BlackRound.woff2 +0 -0
  21. package/fonts/Amiamie-Italic.woff2 +0 -0
  22. package/fonts/Amiamie-ItalicRound.woff2 +0 -0
  23. package/fonts/Amiamie-Light.woff2 +0 -0
  24. package/fonts/Amiamie-LightItalic.woff2 +0 -0
  25. package/fonts/Amiamie-Regular.woff2 +0 -0
  26. package/fonts/Amiamie-RegularRound.woff2 +0 -0
  27. package/fonts/Anthony.woff2 +0 -0
  28. package/fonts/AntiqueSerie-Regular.woff2 +0 -0
  29. package/fonts/ApfelGrotezk-Brukt.woff2 +0 -0
  30. package/fonts/ApfelGrotezk-Fett.woff2 +0 -0
  31. package/fonts/ApfelGrotezk-Mittel.woff2 +0 -0
  32. package/fonts/ApfelGrotezk-Regular.woff2 +0 -0
  33. package/fonts/ApfelGrotezk-Satt.woff2 +0 -0
  34. package/fonts/AspektaVF.woff2 +0 -0
  35. package/fonts/Astloch-Bold.woff2 +0 -0
  36. package/fonts/Astloch-Regular.woff2 +0 -0
  37. package/fonts/Aujournuit-VariableVF.woff2 +0 -0
  38. package/fonts/Azabache-Regular.woff2 +0 -0
  39. package/fonts/AzeretMonoVF_sm01.woff2 +0 -0
  40. package/fonts/BDLifelessGrotesk_Variable_sm01.woff2 +0 -0
  41. package/fonts/BDOGrotesk-VF FREE.woff2 +0 -0
  42. package/fonts/BagelFatOne-Regular.woff2 +0 -0
  43. package/fonts/Baskervville-Italic[wght].woff2 +0 -0
  44. package/fonts/Baskervville[wght].woff2 +0 -0
  45. package/fonts/Basteleur-Bold.woff2 +0 -0
  46. package/fonts/Basteleur-Moonlight.woff2 +0 -0
  47. package/fonts/BicepsGrotesk-Regular.woff2 +0 -0
  48. package/fonts/Block-font.woff2 +0 -0
  49. package/fonts/Boldonse-Regular FREE.woff2 +0 -0
  50. package/fonts/Boxing-Regular FREE.woff2 +0 -0
  51. package/fonts/C059-BdIta.woff2 +0 -0
  52. package/fonts/C059-Bold.woff2 +0 -0
  53. package/fonts/C059-Italic.woff2 +0 -0
  54. package/fonts/C059-Roman.woff2 +0 -0
  55. package/fonts/CabinetGrotesk-Variable.woff2 +0 -0
  56. package/fonts/Canarina-Regular.woff2 +0 -0
  57. package/fonts/Carattere-Regular.woff2 +0 -0
  58. package/fonts/ChaumontScript-Regular.woff2 +0 -0
  59. package/fonts/Chillax-Variable.woff2 +0 -0
  60. package/fonts/Comico-Regular FREE.woff2 +0 -0
  61. package/fonts/Commissioner-Black.woff2 +0 -0
  62. package/fonts/Commissioner-Bold.woff2 +0 -0
  63. package/fonts/Commissioner-ExtraBold.woff2 +0 -0
  64. package/fonts/Commissioner-ExtraLight.woff2 +0 -0
  65. package/fonts/Commissioner-Light.woff2 +0 -0
  66. package/fonts/Commissioner-Medium.woff2 +0 -0
  67. package/fonts/Commissioner-Regular.woff2 +0 -0
  68. package/fonts/Commissioner-SemiBold.woff2 +0 -0
  69. package/fonts/Commissioner-Thin.woff2 +0 -0
  70. package/fonts/Compagnon-Bold.woff2 +0 -0
  71. package/fonts/Cooper-Black.woff2 +0 -0
  72. package/fonts/Cooper-BlackItalic.woff2 +0 -0
  73. package/fonts/Cooper-Bold.woff2 +0 -0
  74. package/fonts/Cooper-BoldItalic.woff2 +0 -0
  75. package/fonts/Cooper-ExtraBold.woff2 +0 -0
  76. package/fonts/Cooper-ExtraBoldItalic.woff2 +0 -0
  77. package/fonts/Cooper-Italic.woff2 +0 -0
  78. package/fonts/Cooper-Medium.woff2 +0 -0
  79. package/fonts/Cooper-MediumItalic.woff2 +0 -0
  80. package/fonts/Cooper-Regular.woff2 +0 -0
  81. package/fonts/Cooper-SemiBold.woff2 +0 -0
  82. package/fonts/Cooper-SemiBoldItalic.woff2 +0 -0
  83. package/fonts/Cormorant-Italic-VariableFont_wght.woff2 +0 -0
  84. package/fonts/Cormorant-VariableFont_wght.woff2 +0 -0
  85. package/fonts/CormorantUnicase-Bold.woff2 +0 -0
  86. package/fonts/CormorantUnicase-Light.woff2 +0 -0
  87. package/fonts/CormorantUnicase-Medium.woff2 +0 -0
  88. package/fonts/CormorantUnicase-Regular.woff2 +0 -0
  89. package/fonts/CormorantUnicase-SemiBold.woff2 +0 -0
  90. package/fonts/CossetteTexte-Bold.woff2 +0 -0
  91. package/fonts/CossetteTexte-Regular.woff2 +0 -0
  92. package/fonts/CossetteTitre-Bold.woff2 +0 -0
  93. package/fonts/CossetteTitre-Regular.woff2 +0 -0
  94. package/fonts/Crewmate-Regular.woff2 +0 -0
  95. package/fonts/Crozet-Regular.woff2 +0 -0
  96. package/fonts/Cr/303/251dible-Regular.woff2 +0 -0
  97. package/fonts/CyGrotesk-GrandDark.woff2 +0 -0
  98. package/fonts/DINdong.woff2 +0 -0
  99. package/fonts/DatDot-Bold.woff2 +0 -0
  100. package/fonts/DatDot-Light.woff2 +0 -0
  101. package/fonts/DatDot-Regular.woff2 +0 -0
  102. package/fonts/DelaGothicOne-Regular.woff2 +0 -0
  103. package/fonts/DepartureMono-Regular.woff2 +0 -0
  104. package/fonts/Director-Light FREE.woff2 +0 -0
  105. package/fonts/Director-Regular FREE.woff2 +0 -0
  106. package/fonts/Director-bold FREE.woff2 +0 -0
  107. package/fonts/Elevatia FREE.woff2 +0 -0
  108. package/fonts/ElevatiaItalic FREE.woff2 +0 -0
  109. package/fonts/Excessive-ExtraCondensed.woff2 +0 -0
  110. package/fonts/FA-1-Regular.woff2 +0 -0
  111. package/fonts/FRANKINITY.woff2 +0 -0
  112. package/fonts/Fat Porn Font.woff2 +0 -0
  113. package/fonts/Format 1452 FREE.woff2 +0 -0
  114. package/fonts/Format-Bold.woff2 +0 -0
  115. package/fonts/Format-Italic.woff2 +0 -0
  116. package/fonts/Format-Regular.woff2 +0 -0
  117. package/fonts/Format-SemiBold.woff2 +0 -0
  118. package/fonts/Freeman-Regular.woff2 +0 -0
  119. package/fonts/FunnelSans-Italic-VariableFont_wght.woff2 +0 -0
  120. package/fonts/FunnelSans-VariableFont_wght.woff2 +0 -0
  121. package/fonts/GalgoVF.woff2 +0 -0
  122. package/fonts/Geist-VariableFont_wght.woff2 +0 -0
  123. package/fonts/GeistMono-VariableFont_wght.woff2 +0 -0
  124. package/fonts/GeneralSans-Variable.woff2 +0 -0
  125. package/fonts/GeneralSans-VariableItalic.woff2 +0 -0
  126. package/fonts/GranturismoGX.woff2 +0 -0
  127. package/fonts/Handjet[EGRD,ESHP,wght].woff2 +0 -0
  128. package/fonts/Havana-Regular.woff2 +0 -0
  129. package/fonts/HedvigLettersSans-Regular.woff2 +0 -0
  130. package/fonts/HedvigLettersSerif[opsz].woff2 +0 -0
  131. package/fonts/HostGrotesk-Italic-VariableFont_wght.woff2 +0 -0
  132. package/fonts/HostGrotesk-VariableFont_wght.woff2 +0 -0
  133. package/fonts/HubotSans-Italic-VariableFont_wdth,wght.woff2 +0 -0
  134. package/fonts/HubotSans-VariableFont_wdth,wght.woff2 +0 -0
  135. package/fonts/Insolente-Regular.woff2 +0 -0
  136. package/fonts/InstrumentSans-Italic-VariableFont_wdth,wght.woff2 +0 -0
  137. package/fonts/InstrumentSans-VariableFont_wdth,wght.woff2 +0 -0
  138. package/fonts/IntraNetRegular.woff2 +0 -0
  139. package/fonts/Isenheim_Fin.woff2 +0 -0
  140. package/fonts/Isenheim_Regulier.woff2 +0 -0
  141. package/fonts/Jakob-Semi-Condensed.woff2 +0 -0
  142. package/fonts/Jaro-Regular-VariableFont_opsz.woff2 +0 -0
  143. package/fonts/JetBrainsMono-Italic-VariableFont_wght.woff2 +0 -0
  144. package/fonts/JetBrainsMono-VariableFont_wght.woff2 +0 -0
  145. package/fonts/Jost-200-Thin.woff2 +0 -0
  146. package/fonts/Jost-200-ThinItalic.woff2 +0 -0
  147. package/fonts/Jost-300-Light.woff2 +0 -0
  148. package/fonts/Jost-300-LightItalic.woff2 +0 -0
  149. package/fonts/Jost-400-Book.woff2 +0 -0
  150. package/fonts/Jost-400-BookItalic.woff2 +0 -0
  151. package/fonts/Jost-500-Medium.woff2 +0 -0
  152. package/fonts/Jost-500-MediumItalic.woff2 +0 -0
  153. package/fonts/Jost-600-Semi.woff2 +0 -0
  154. package/fonts/Jost-600-SemiItalic.woff2 +0 -0
  155. package/fonts/Jost-700-Bold.woff2 +0 -0
  156. package/fonts/Jost-900-Black.woff2 +0 -0
  157. package/fonts/Jost-900-BlackItalic.woff2 +0 -0
  158. package/fonts/KnackVF.woff2 +0 -0
  159. package/fonts/KobataGX.woff2 +0 -0
  160. package/fonts/Kultur/303/253 Type.woff2 +0 -0
  161. package/fonts/LCTIptex-VF FREE.woff2 +0 -0
  162. package/fonts/LCTMogi-VF.woff2 +0 -0
  163. package/fonts/LTMuseum-Black.woff2 +0 -0
  164. package/fonts/LTMuseum-BlackItalic.woff2 +0 -0
  165. package/fonts/LTMuseum-Bold.woff2 +0 -0
  166. package/fonts/LTMuseum-BoldItalic.woff2 +0 -0
  167. package/fonts/LTMuseum-Light.woff2 +0 -0
  168. package/fonts/LTMuseum-LightItalic.woff2 +0 -0
  169. package/fonts/LTMuseum-Medium.woff2 +0 -0
  170. package/fonts/LTMuseum-MediumItalic.woff2 +0 -0
  171. package/fonts/LibertinusSans-Bold.woff2 +0 -0
  172. package/fonts/LibertinusSans-Italic.woff2 +0 -0
  173. package/fonts/LibertinusSans-Regular.woff2 +0 -0
  174. package/fonts/Louise-Regular.woff2 +0 -0
  175. package/fonts/MonaSans-Italic-VariableFont_wdth,wght.woff2 +0 -0
  176. package/fonts/MonaSans-VariableFont_wdth,wght.woff2 +0 -0
  177. package/fonts/MontaguSlab-VariableFont_opsz,wght.woff2 +0 -0
  178. package/fonts/Neo-castel.woff2 +0 -0
  179. package/fonts/NouvelleGrotesquerie-Regular.woff2 +0 -0
  180. package/fonts/Nudles-Bold.woff2 +0 -0
  181. package/fonts/Nudles-Fat.woff2 +0 -0
  182. package/fonts/Nudles-Hairline.woff2 +0 -0
  183. package/fonts/Nudles-Regular.woff2 +0 -0
  184. package/fonts/Nudles-Thin.woff2 +0 -0
  185. package/fonts/NyghtSerif-Bold.woff2 +0 -0
  186. package/fonts/NyghtSerif-BoldItalic.woff2 +0 -0
  187. package/fonts/NyghtSerif-Dark.woff2 +0 -0
  188. package/fonts/NyghtSerif-DarkItalic.woff2 +0 -0
  189. package/fonts/NyghtSerif-Light.woff2 +0 -0
  190. package/fonts/NyghtSerif-LightItalic.woff2 +0 -0
  191. package/fonts/NyghtSerif-Medium.woff2 +0 -0
  192. package/fonts/NyghtSerif-MediumItalic.woff2 +0 -0
  193. package/fonts/NyghtSerif-Regular.woff2 +0 -0
  194. package/fonts/NyghtSerif-RegularItalic.woff2 +0 -0
  195. package/fonts/Oi-Regular.woff2 +0 -0
  196. package/fonts/OpenSauceSans-Black.woff2 +0 -0
  197. package/fonts/OpenSauceSans-Bold.woff2 +0 -0
  198. package/fonts/OpenSauceSans-ExtraBold.woff2 +0 -0
  199. package/fonts/OpenSauceSans-Light.woff2 +0 -0
  200. package/fonts/OpenSauceSans-Medium.woff2 +0 -0
  201. package/fonts/OpenSauceSans-Regular.woff2 +0 -0
  202. package/fonts/OpenSauceSans-SemiBold.woff2 +0 -0
  203. package/fonts/OrticaAngular-Bold.woff2 +0 -0
  204. package/fonts/OrticaLinear-Bold.woff2 +0 -0
  205. package/fonts/OrticaLinear-Light.woff2 +0 -0
  206. package/fonts/OrticaLinear-Regular.woff2 +0 -0
  207. package/fonts/Oswald-VariableFont_wght.woff2 +0 -0
  208. package/fonts/Outfit[wght] FREE.woff2 +0 -0
  209. package/fonts/OverusedGrotesk-VF.woff2 +0 -0
  210. package/fonts/P95-CYR-Regular.woff2 +0 -0
  211. package/fonts/Pencerio-Hairline FREE.woff2 +0 -0
  212. package/fonts/PhospheneFont-Regular.woff2 +0 -0
  213. package/fonts/PicNic-Regular.woff2 +0 -0
  214. package/fonts/Pilowlava-Atome.woff2 +0 -0
  215. package/fonts/Pilowlava-Regular.woff2 +0 -0
  216. package/fonts/Piscolabis-Regular.woff2 +0 -0
  217. package/fonts/PlaypenSans-VariableFont_wght.woff2 +0 -0
  218. package/fonts/PlusJakartaSans-Variable FREE.woff2 +0 -0
  219. package/fonts/PlusJakartaSans-VariableItalic FREE.woff2 +0 -0
  220. package/fonts/RT Obligat FREE.woff2 +0 -0
  221. package/fonts/Ranade-Variable.woff2 +0 -0
  222. package/fonts/Ranade-VariableItalic.woff2 +0 -0
  223. package/fonts/Ranga-Bold.woff2 +0 -0
  224. package/fonts/Ranga-Regular.woff2 +0 -0
  225. package/fonts/Redaction-Bold.woff2 +0 -0
  226. package/fonts/Redaction-Italic.woff2 +0 -0
  227. package/fonts/Redaction-Regular.woff2 +0 -0
  228. package/fonts/Redaction10-Bold.woff2 +0 -0
  229. package/fonts/Redaction10-Italic.woff2 +0 -0
  230. package/fonts/Redaction10-Regular.woff2 +0 -0
  231. package/fonts/Redaction100-Bold.woff2 +0 -0
  232. package/fonts/Redaction100-Italic.woff2 +0 -0
  233. package/fonts/Redaction100-Regular.woff2 +0 -0
  234. package/fonts/Redaction20-Bold.woff2 +0 -0
  235. package/fonts/Redaction20-Italic.woff2 +0 -0
  236. package/fonts/Redaction20-Regular.woff2 +0 -0
  237. package/fonts/Redaction35-Bold.woff2 +0 -0
  238. package/fonts/Redaction35-Italic.woff2 +0 -0
  239. package/fonts/Redaction35-Regular.woff2 +0 -0
  240. package/fonts/Redaction50-Bold.woff2 +0 -0
  241. package/fonts/Redaction50-Italic.woff2 +0 -0
  242. package/fonts/Redaction50-Regular.woff2 +0 -0
  243. package/fonts/Redaction70-Bold.woff2 +0 -0
  244. package/fonts/Redaction70-Italic.woff2 +0 -0
  245. package/fonts/Redaction70-Regular.woff2 +0 -0
  246. package/fonts/Reglo-Bold.woff2 +0 -0
  247. package/fonts/Roberte-Regular.woff2 +0 -0
  248. package/fonts/Ronzino-Bold.woff2 +0 -0
  249. package/fonts/Ronzino-Medium.woff2 +0 -0
  250. package/fonts/Ronzino-Oblique.woff2 +0 -0
  251. package/fonts/Ronzino-Regular.woff2 +0 -0
  252. package/fonts/Saint Regular.woff2 +0 -0
  253. package/fonts/Satoshi-Variable.woff2 +0 -0
  254. package/fonts/Satoshi-VariableItalic.woff2 +0 -0
  255. package/fonts/SchibstedGrotesk-Italic-VariableFont_wght.woff2 +0 -0
  256. package/fonts/SchibstedGrotesk-VariableFont_wght.woff2 +0 -0
  257. package/fonts/ShantellSans-Italic-VariableFont_BNCE,INFM,SPAC,wght.woff2 +0 -0
  258. package/fonts/ShantellSans-VariableFont_BNCE,INFM,SPAC,wght.woff2 +0 -0
  259. package/fonts/Sharpie-Variable FREE.woff2 +0 -0
  260. package/fonts/SinistreVF.woff2 +0 -0
  261. package/fonts/SligoilVF.woff2 +0 -0
  262. package/fonts/SpaceGrotesk-VariableFont_wght.woff2 +0 -0
  263. package/fonts/SpaceMono-Bold.woff2 +0 -0
  264. package/fonts/SpaceMono-BoldItalic.woff2 +0 -0
  265. package/fonts/SpaceMono-Italic.woff2 +0 -0
  266. package/fonts/SpaceMono-Regular.woff2 +0 -0
  267. package/fonts/Sprat-Variable.woff2 +0 -0
  268. package/fonts/Srisakdi-Bold.woff2 +0 -0
  269. package/fonts/Srisakdi-Regular.woff2 +0 -0
  270. package/fonts/Supreme-Variable FREE.woff2 +0 -0
  271. package/fonts/Supreme-VariableItalic FREE.woff2 +0 -0
  272. package/fonts/Switzer-Variable.woff2 +0 -0
  273. package/fonts/Switzer-VariableItalic.woff2 +0 -0
  274. package/fonts/TASAExplorer-Bold.woff2 +0 -0
  275. package/fonts/TASAExplorer-ExtraBold.woff2 +0 -0
  276. package/fonts/TASAExplorer-Medium.woff2 +0 -0
  277. package/fonts/TASAExplorer-Regular.woff2 +0 -0
  278. package/fonts/TASAExplorer-SemiBold.woff2 +0 -0
  279. package/fonts/TASAExplorer-VariableFont_wght.woff2 +0 -0
  280. package/fonts/ThestralNeue-Bold.woff2 +0 -0
  281. package/fonts/Thunder-VF.woff2 +0 -0
  282. package/fonts/TikTokSans-VariableFont_opsz,slnt,wdth,wght.woff2 +0 -0
  283. package/fonts/Tillana-Bold.woff2 +0 -0
  284. package/fonts/Tillana-ExtraBold.woff2 +0 -0
  285. package/fonts/Tillana-Medium.woff2 +0 -0
  286. package/fonts/Tillana-Regular.woff2 +0 -0
  287. package/fonts/Tillana-SemiBold.woff2 +0 -0
  288. package/fonts/TimesNewerRoman-Bold.woff2 +0 -0
  289. package/fonts/TimesNewerRoman-BoldItalic.woff2 +0 -0
  290. package/fonts/TimesNewerRoman-Italic.woff2 +0 -0
  291. package/fonts/TimesNewerRoman-Regular.woff2 +0 -0
  292. package/fonts/Ultra-Regular.woff2 +0 -0
  293. package/fonts/Uncut-Sans-VF.woff2 +0 -0
  294. package/fonts/VampiroOne-Regular.woff2 +0 -0
  295. package/fonts/Zodiak-Variable FREE.woff2 +0 -0
  296. package/fonts/Zodiak-VariableItalic FREE.woff2 +0 -0
  297. package/fonts/am_xix FREE.woff2 +0 -0
  298. package/fonts/enjoyplease2-Regular.woff2 +0 -0
  299. package/fonts/milkman.woff2 +0 -0
  300. package/fonts/outward-block.woff2 +0 -0
  301. package/fonts/outward-borders.woff2 +0 -0
  302. package/fonts/outward-round.woff2 +0 -0
  303. package/fonts/standard-bold.woff2 +0 -0
  304. package/fonts/standard-book.woff2 +0 -0
  305. package/fonts/terminal-grotesque.woff2 +0 -0
  306. package/fonts/terminal-grotesque_open.woff2 +0 -0
  307. package/package.json +46 -0
@@ -0,0 +1,254 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/data.ts
4
+ import { createRequire } from "module";
5
+ var require2 = createRequire(import.meta.url);
6
+ var raw = require2("../data/fonts-data.json");
7
+ var fonts = raw.families.filter((f) => f.name && f.variants?.length);
8
+ function findFont(name) {
9
+ const lower = name.toLowerCase();
10
+ return fonts.find((f) => f.name.toLowerCase() === lower) ?? fonts.find((f) => f.name.toLowerCase().includes(lower));
11
+ }
12
+
13
+ // src/search.ts
14
+ function search(query, filters) {
15
+ const q = query.toLowerCase();
16
+ let results = fonts;
17
+ if (filters?.collection) {
18
+ results = results.filter((f) => f.collection === filters.collection);
19
+ }
20
+ if (filters?.useCase) {
21
+ const uc = filters.useCase.toLowerCase();
22
+ results = results.filter((f) => f.useCases?.some((u) => u.toLowerCase().includes(uc)));
23
+ }
24
+ if (filters?.category) {
25
+ const cat = filters.category.toLowerCase();
26
+ results = results.filter((f) => f.category?.some((c) => c.toLowerCase().includes(cat)));
27
+ }
28
+ if (filters?.isVariable !== void 0) {
29
+ results = results.filter((f) => f.isVariable === filters.isVariable);
30
+ }
31
+ if (filters?.language) {
32
+ const lang = filters.language.toLowerCase();
33
+ results = results.filter((f) => f.languages?.some((l) => l.toLowerCase().includes(lang)));
34
+ }
35
+ if (!q) return results;
36
+ return results.filter(
37
+ (f) => f.name.toLowerCase().includes(q) || f.foundry?.toLowerCase().includes(q) || f.useCases?.some((u) => u.toLowerCase().includes(q)) || f.styleTags?.some((t) => t.toLowerCase().includes(q)) || f.category?.some((c) => c.toLowerCase().includes(q))
38
+ );
39
+ }
40
+
41
+ // src/suggest.ts
42
+ var USE_CASE_KEYWORDS = {
43
+ "Interface": ["ui", "interface", "app", "dashboard", "product", "saas", "admin", "system", "neutral", "clean"],
44
+ "Interface Warm": ["warm", "friendly", "humanist", "readable"],
45
+ "Editorial / Ecommerce": ["ecommerce", "shop", "store", "editorial", "magazine", "blog", "article", "brand", "landing"],
46
+ "Editorial": ["editorial", "reading", "longform", "text", "body", "newspaper", "book", "serif"],
47
+ "Code / Data": ["code", "mono", "monospace", "data", "terminal", "developer", "programming", "table"],
48
+ "Tech": ["tech", "technical", "inktrap", "space"],
49
+ "Brand Headline": ["headline", "heading", "brand", "logo", "title", "display", "marketing"],
50
+ "Poster": ["poster", "bold", "big", "impactful", "fatface", "condensed", "attention"],
51
+ "Culture": ["culture", "zine", "art", "independent", "underground", "print", "identity"],
52
+ "Tech / Digital": ["pixel", "digital", "retro", "screen", "game", "matrix", "cyber"],
53
+ "Handwritten / Script": ["script", "handwritten", "calligraphy", "wedding", "personal", "organic"],
54
+ "Experimental": ["experimental", "avant-garde", "brutal", "weird", "unique", "provocative", "art"]
55
+ };
56
+ function scoreFont(font, keywords) {
57
+ let score = 0;
58
+ const lk = keywords.map((k) => k.toLowerCase());
59
+ for (const uc of font.useCases ?? []) {
60
+ const ucLower = uc.toLowerCase();
61
+ const ucKeywords = USE_CASE_KEYWORDS[uc] ?? [];
62
+ if (lk.some((k) => ucLower.includes(k) || ucKeywords.includes(k))) score += 4;
63
+ if (lk.some((k) => ucKeywords.some((uk) => uk.includes(k)))) score += 2;
64
+ }
65
+ for (const tag of font.styleTags ?? []) {
66
+ if (lk.some((k) => tag.toLowerCase().includes(k))) score += 2;
67
+ }
68
+ for (const cat of font.category ?? []) {
69
+ if (lk.some((k) => cat.toLowerCase().includes(k))) score += 1;
70
+ }
71
+ if (lk.some((k) => font.name.toLowerCase().includes(k))) score += 3;
72
+ if (font.isVariable) score += 1;
73
+ return score;
74
+ }
75
+ function suggest(description, count = 5) {
76
+ const keywords = description.toLowerCase().split(/\s+/).filter((k) => k.length > 2);
77
+ return fonts.map((f) => ({ font: f, score: scoreFont(f, keywords) })).filter(({ score }) => score > 0).sort((a, b) => b.score - a.score).slice(0, count).map(({ font }) => font);
78
+ }
79
+
80
+ // src/similar.ts
81
+ function similarity(a, b) {
82
+ if (a.name === b.name) return -1;
83
+ let score = 0;
84
+ const sharedUseCases = a.useCases?.filter((u) => b.useCases?.includes(u)) ?? [];
85
+ score += sharedUseCases.length * 4;
86
+ const sharedTags = a.styleTags?.filter((t) => b.styleTags?.includes(t)) ?? [];
87
+ score += sharedTags.length * 2;
88
+ const sharedCats = a.category?.filter((c) => b.category?.includes(c)) ?? [];
89
+ score += sharedCats.length * 2;
90
+ if (a.collection === b.collection) score += 1;
91
+ if (a.isVariable === b.isVariable) score += 1;
92
+ return score;
93
+ }
94
+ function findSimilar(name, count = 5) {
95
+ const source = findFont(name);
96
+ if (!source) return [];
97
+ return fonts.map((f) => ({ font: f, score: similarity(source, f) })).filter(({ score }) => score > 0).sort((a, b) => b.score - a.score).slice(0, count).map(({ font }) => font);
98
+ }
99
+
100
+ // src/pair.ts
101
+ var HEADLINE_USE_CASES = ["Brand Headline", "Poster", "Culture", "Tech / Digital"];
102
+ var BODY_USE_CASES = ["Interface", "Editorial / Ecommerce", "Editorial", "Interface Warm"];
103
+ function isHeadline(f) {
104
+ return f.useCases?.some((u) => HEADLINE_USE_CASES.includes(u));
105
+ }
106
+ function isBody(f) {
107
+ return f.useCases?.some((u) => BODY_USE_CASES.includes(u));
108
+ }
109
+ function contrastScore(h, b) {
110
+ let score = 0;
111
+ const hCats = h.category ?? [];
112
+ const bCats = b.category ?? [];
113
+ if (hCats.some((c) => c.includes("Serif")) && bCats.some((c) => c.includes("Sans"))) score += 3;
114
+ if (hCats.some((c) => c.includes("Sans")) && bCats.some((c) => c.includes("Serif"))) score += 3;
115
+ if (hCats.some((c) => c.includes("Sans")) && bCats.some((c) => c.includes("Sans"))) score += 1;
116
+ if (b.isVariable) score += 2;
117
+ if (h.foundry && b.foundry && h.foundry === b.foundry) score -= 1;
118
+ return score;
119
+ }
120
+ function pairFonts(anchorName, count = 3) {
121
+ const anchor = anchorName ? findFont(anchorName) : void 0;
122
+ const pairings = [];
123
+ if (anchor && isBody(anchor)) {
124
+ const headlines = fonts.filter(isHeadline);
125
+ headlines.map((h) => ({ h, score: contrastScore(h, anchor) })).sort((a, b) => b.score - a.score).slice(0, count).forEach(({ h }) => {
126
+ pairings.push({
127
+ headline: h,
128
+ body: anchor,
129
+ rationale: buildRationale(h, anchor)
130
+ });
131
+ });
132
+ } else if (anchor && isHeadline(anchor)) {
133
+ const bodies = fonts.filter(isBody);
134
+ bodies.map((b) => ({ b, score: contrastScore(anchor, b) })).sort((a, b) => b.score - a.score).slice(0, count).forEach(({ b }) => {
135
+ pairings.push({
136
+ headline: anchor,
137
+ body: b,
138
+ rationale: buildRationale(anchor, b)
139
+ });
140
+ });
141
+ } else {
142
+ const headlines = fonts.filter(isHeadline).slice(0, 10);
143
+ const bodies = fonts.filter((f) => isBody(f) && f.isVariable).slice(0, 10);
144
+ for (const h of headlines.slice(0, count)) {
145
+ const best = bodies.map((b) => ({ b, score: contrastScore(h, b) })).sort((a, b) => b.score - a.score)[0];
146
+ if (best) {
147
+ pairings.push({ headline: h, body: best.b, rationale: buildRationale(h, best.b) });
148
+ }
149
+ }
150
+ }
151
+ return pairings.slice(0, count);
152
+ }
153
+ function buildRationale(h, b) {
154
+ const hStyle = h.styleTags?.[0] ?? h.category?.[0] ?? "display";
155
+ const bStyle = b.styleTags?.[0] ?? b.category?.[0] ?? "text";
156
+ return `${h.name} (${hStyle.toLowerCase()}) as headline, ${b.name} (${bStyle.toLowerCase()}) as body \u2014 ${h.isVariable || b.isVariable ? "both support variable weights" : "good contrast in style"}.`;
157
+ }
158
+
159
+ // src/getCode.ts
160
+ function pickVariant(font) {
161
+ return font.variants.find((v) => v.isVariable) ?? font.variants.find((v) => v.weight === 400 && !v.isItalic) ?? font.variants[0];
162
+ }
163
+ function woff2(variant) {
164
+ return variant.filename.replace(/\.(ttf|otf)$/, ".woff2");
165
+ }
166
+ function cssVarName(name) {
167
+ return name.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
168
+ }
169
+ function jsVarName(name) {
170
+ return name.split(/\s+/).map((w, i) => i === 0 ? w.toLowerCase() : w[0].toUpperCase() + w.slice(1).toLowerCase()).join("").replace(/[^a-zA-Z0-9]/g, "");
171
+ }
172
+ function getCode(fontName, stack) {
173
+ const font = findFont(fontName);
174
+ if (!font) return `Font "${fontName}" not found in TypeDump.`;
175
+ const variant = pickVariant(font);
176
+ const file = woff2(variant);
177
+ const wghtAxis = variant.variableAxes?.find((a) => a.tag === "wght");
178
+ const weightRange = wghtAxis ? `${wghtAxis.min} ${wghtAxis.max}` : String(variant.weight);
179
+ const cssVar = cssVarName(font.name);
180
+ const jsVar = jsVarName(font.name);
181
+ if (stack === "css") {
182
+ return `/* 1. Copy font file to your project */
183
+ /* cp ./node_modules/typedump/fonts/${file} ./public/fonts/ */
184
+
185
+ @font-face {
186
+ font-family: '${font.name}';
187
+ src: url('/fonts/${file}') format('woff2');
188
+ font-weight: ${weightRange};
189
+ font-style: normal;
190
+ font-display: swap;
191
+ }
192
+
193
+ :root {
194
+ --font-${cssVar}: '${font.name}', ${font.category?.includes("Mono") ? "monospace" : font.category?.includes("Serif") ? "serif" : "sans-serif"};
195
+ }
196
+
197
+ body {
198
+ font-family: var(--font-${cssVar});
199
+ }`;
200
+ }
201
+ if (stack === "nextjs") {
202
+ return `// app/fonts.ts
203
+ import localFont from 'next/font/local'
204
+
205
+ export const ${jsVar} = localFont({
206
+ src: '../node_modules/typedump/fonts/${file}',
207
+ variable: '--font-${cssVar}',
208
+ weight: '${weightRange}',
209
+ display: 'swap',
210
+ })
211
+
212
+ // app/layout.tsx
213
+ import { ${jsVar} } from './fonts'
214
+
215
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
216
+ return (
217
+ <html lang="en" className={\`\${${jsVar}.variable}\`}>
218
+ <body style={{ fontFamily: 'var(--font-${cssVar})' }}>{children}</body>
219
+ </html>
220
+ )
221
+ }`;
222
+ }
223
+ if (stack === "tailwind") {
224
+ return `// tailwind.config.ts
225
+ import type { Config } from 'tailwindcss'
226
+
227
+ const config: Config = {
228
+ theme: {
229
+ extend: {
230
+ fontFamily: {
231
+ '${cssVar}': ['var(--font-${cssVar})', ${font.category?.includes("Mono") ? "'monospace'" : font.category?.includes("Serif") ? "'serif'" : "'sans-serif'"}],
232
+ },
233
+ },
234
+ },
235
+ }
236
+ export default config
237
+
238
+ // Usage in className:
239
+ // <p className="font-${cssVar}">Your text</p>
240
+
241
+ // Note: pair with Next.js setup above to inject the CSS variable`;
242
+ }
243
+ return "";
244
+ }
245
+
246
+ export {
247
+ fonts,
248
+ findFont,
249
+ search,
250
+ suggest,
251
+ findSimilar,
252
+ pairFonts,
253
+ getCode
254
+ };
@@ -0,0 +1,59 @@
1
+ interface VariableAxis {
2
+ name: string;
3
+ tag: string;
4
+ min: number;
5
+ max: number;
6
+ default: number;
7
+ }
8
+ interface FontVariant {
9
+ filename: string;
10
+ weight: number;
11
+ styleName: string;
12
+ isItalic: boolean;
13
+ isVariable: boolean;
14
+ variableAxes?: VariableAxis[];
15
+ openTypeFeatures?: string[];
16
+ }
17
+ interface FontFamily {
18
+ id: string;
19
+ name: string;
20
+ collection: 'Text' | 'Display' | 'Brutal';
21
+ category: string[];
22
+ styleTags: string[];
23
+ useCases: string[];
24
+ languages: string[];
25
+ foundry: string;
26
+ isVariable: boolean;
27
+ downloadLink?: string;
28
+ description?: string;
29
+ licenseInfo?: string;
30
+ variants: FontVariant[];
31
+ }
32
+ type CodeStack = 'css' | 'nextjs' | 'tailwind';
33
+
34
+ declare const fonts: FontFamily[];
35
+ declare function findFont(name: string): FontFamily | undefined;
36
+
37
+ interface SearchFilters {
38
+ collection?: 'Text' | 'Display' | 'Brutal';
39
+ useCase?: string;
40
+ category?: string;
41
+ isVariable?: boolean;
42
+ language?: string;
43
+ }
44
+ declare function search(query: string, filters?: SearchFilters): FontFamily[];
45
+
46
+ declare function suggest(description: string, count?: number): FontFamily[];
47
+
48
+ declare function findSimilar(name: string, count?: number): FontFamily[];
49
+
50
+ interface FontPairing {
51
+ headline: FontFamily;
52
+ body: FontFamily;
53
+ rationale: string;
54
+ }
55
+ declare function pairFonts(anchorName?: string, count?: number): FontPairing[];
56
+
57
+ declare function getCode(fontName: string, stack: CodeStack): string;
58
+
59
+ export { type CodeStack, type FontFamily, type FontPairing, type FontVariant, type SearchFilters, type VariableAxis, findFont, findSimilar, fonts, getCode, pairFonts, search, suggest };
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ findFont,
4
+ findSimilar,
5
+ fonts,
6
+ getCode,
7
+ pairFonts,
8
+ search,
9
+ suggest
10
+ } from "./chunk-D7LJ3A3P.js";
11
+ export {
12
+ findFont,
13
+ findSimilar,
14
+ fonts,
15
+ getCode,
16
+ pairFonts,
17
+ search,
18
+ suggest
19
+ };
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,177 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ findFont,
4
+ findSimilar,
5
+ getCode,
6
+ pairFonts,
7
+ search,
8
+ suggest
9
+ } from "../chunk-D7LJ3A3P.js";
10
+
11
+ // src/mcp/server.ts
12
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
13
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
14
+ import {
15
+ CallToolRequestSchema,
16
+ ListToolsRequestSchema
17
+ } from "@modelcontextprotocol/sdk/types.js";
18
+ var server = new Server(
19
+ { name: "typedump", version: "0.1.0" },
20
+ { capabilities: { tools: {} } }
21
+ );
22
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
23
+ tools: [
24
+ {
25
+ name: "search_fonts",
26
+ description: "Search TypeDump font catalog by name, style, use case, or category. Returns matching fonts with metadata.",
27
+ inputSchema: {
28
+ type: "object",
29
+ properties: {
30
+ query: { type: "string", description: "Search query (name, style, tag)" },
31
+ collection: { type: "string", enum: ["Text", "Display", "Brutal"], description: "Filter by collection" },
32
+ useCase: { type: "string", description: "Filter by use case: Interface, Editorial, Ecommerce, Code / Data, Brand Headline, Poster, Culture, Tech / Digital, Handwritten / Script, Experimental" },
33
+ isVariable: { type: "boolean", description: "Filter variable fonts only" }
34
+ }
35
+ }
36
+ },
37
+ {
38
+ name: "get_font",
39
+ description: "Get full details for a specific font: variants, variable axes, OpenType features, use cases, download info.",
40
+ inputSchema: {
41
+ type: "object",
42
+ required: ["name"],
43
+ properties: {
44
+ name: { type: "string", description: "Font family name" }
45
+ }
46
+ }
47
+ },
48
+ {
49
+ name: "suggest_font",
50
+ description: 'Suggest fonts for a use case described in natural language. E.g. "neutral sans for a fintech dashboard" or "bold display for a culture zine".',
51
+ inputSchema: {
52
+ type: "object",
53
+ required: ["description"],
54
+ properties: {
55
+ description: { type: "string", description: "What the font needs to do or feel like" },
56
+ count: { type: "number", description: "How many suggestions to return (default 5)" }
57
+ }
58
+ }
59
+ },
60
+ {
61
+ name: "find_similar",
62
+ description: "Find fonts visually or stylistically similar to a given font.",
63
+ inputSchema: {
64
+ type: "object",
65
+ required: ["name"],
66
+ properties: {
67
+ name: { type: "string", description: "Font name to find similar fonts for" },
68
+ count: { type: "number", description: "How many results (default 5)" }
69
+ }
70
+ }
71
+ },
72
+ {
73
+ name: "pair_fonts",
74
+ description: "Suggest headline + body font pairings. Optionally anchor to a font you already want to use.",
75
+ inputSchema: {
76
+ type: "object",
77
+ properties: {
78
+ anchor: { type: "string", description: "A font you already want to use (will suggest what pairs with it)" },
79
+ count: { type: "number", description: "How many pairings to suggest (default 3)" }
80
+ }
81
+ }
82
+ },
83
+ {
84
+ name: "get_code",
85
+ description: "Get ready-to-use code for a font. Returns @font-face CSS, Next.js localFont config, or Tailwind fontFamily config.",
86
+ inputSchema: {
87
+ type: "object",
88
+ required: ["name", "stack"],
89
+ properties: {
90
+ name: { type: "string", description: "Font family name" },
91
+ stack: { type: "string", enum: ["css", "nextjs", "tailwind"], description: "Target stack" }
92
+ }
93
+ }
94
+ }
95
+ ]
96
+ }));
97
+ server.setRequestHandler(CallToolRequestSchema, async (req) => {
98
+ const { name } = req.params;
99
+ const args = req.params.arguments ?? {};
100
+ try {
101
+ if (name === "search_fonts") {
102
+ const results = search(args.query ?? "", {
103
+ collection: args.collection,
104
+ useCase: args.useCase,
105
+ isVariable: args.isVariable
106
+ });
107
+ const summary = results.slice(0, 20).map(
108
+ (f) => `\u2022 ${f.name} [${f.collection}] \u2014 ${f.useCases?.join(", ")} | ${f.category?.join(", ")}${f.isVariable ? " \xB7 variable" : ""}`
109
+ ).join("\n");
110
+ return { content: [{ type: "text", text: results.length === 0 ? "No fonts found matching that query." : `Found ${results.length} font${results.length === 1 ? "" : "s"}:
111
+
112
+ ${summary}` }] };
113
+ }
114
+ if (name === "get_font") {
115
+ const font = findFont(args.name);
116
+ if (!font) return { content: [{ type: "text", text: `Font "${args.name}" not found.` }] };
117
+ const axes = font.variants.find((v) => v.isVariable)?.variableAxes;
118
+ const features = font.variants[0]?.openTypeFeatures;
119
+ const text = [
120
+ `**${font.name}**`,
121
+ `Collection: ${font.collection}`,
122
+ `Category: ${font.category?.join(", ")}`,
123
+ `Use cases: ${font.useCases?.join(", ")}`,
124
+ `Style tags: ${font.styleTags?.join(", ") || "\u2014"}`,
125
+ `Foundry: ${font.foundry}`,
126
+ `Variable: ${font.isVariable ? "Yes" : "No"}`,
127
+ `Languages: ${font.languages?.join(", ")}`,
128
+ axes?.length ? `Variable axes: ${axes.map((a) => `${a.name} (${a.tag}) ${a.min}\u2013${a.max}`).join(", ")}` : null,
129
+ features?.length ? `OpenType features: ${features.slice(0, 8).join(", ")}` : null,
130
+ `Variants: ${font.variants.map((v) => v.styleName).join(", ")}`
131
+ ].filter(Boolean).join("\n");
132
+ return { content: [{ type: "text", text }] };
133
+ }
134
+ if (name === "suggest_font") {
135
+ const results = suggest(args.description ?? "", args.count ?? 5);
136
+ if (!results.length) return { content: [{ type: "text", text: "No matching fonts found for that description." }] };
137
+ const text = `Top ${results.length} suggestions for "${args.description}":
138
+
139
+ ` + results.map(
140
+ (f, i) => `${i + 1}. **${f.name}** [${f.collection}]
141
+ Use cases: ${f.useCases?.join(", ")}
142
+ ${f.category?.join(", ")}${f.isVariable ? " \xB7 variable" : ""} \xB7 ${f.styleTags?.slice(0, 3).join(", ")}`
143
+ ).join("\n\n");
144
+ return { content: [{ type: "text", text }] };
145
+ }
146
+ if (name === "find_similar") {
147
+ const results = findSimilar(args.name, args.count ?? 5);
148
+ if (!results.length) return { content: [{ type: "text", text: `No similar fonts found for "${args.name}".` }] };
149
+ const text = `Fonts similar to **${args.name}**:
150
+
151
+ ` + results.map(
152
+ (f) => `\u2022 ${f.name} [${f.collection}] \u2014 ${f.useCases?.join(", ")} | ${f.styleTags?.slice(0, 3).join(", ")}`
153
+ ).join("\n");
154
+ return { content: [{ type: "text", text }] };
155
+ }
156
+ if (name === "pair_fonts") {
157
+ const pairings = pairFonts(args.anchor, args.count ?? 3);
158
+ if (!pairings.length) return { content: [{ type: "text", text: "Could not generate pairings." }] };
159
+ const text = `Font pairings${args.anchor ? ` with ${args.anchor}` : ""}:
160
+
161
+ ` + pairings.map(
162
+ (p, i) => `${i + 1}. Headline: **${p.headline.name}** \xB7 Body: **${p.body.name}**
163
+ ${p.rationale}`
164
+ ).join("\n\n");
165
+ return { content: [{ type: "text", text }] };
166
+ }
167
+ if (name === "get_code") {
168
+ const code = getCode(args.name, args.stack);
169
+ return { content: [{ type: "text", text: code }] };
170
+ }
171
+ return { content: [{ type: "text", text: `Unknown tool: ${name}` }] };
172
+ } catch (err) {
173
+ return { content: [{ type: "text", text: `Error: ${err instanceof Error ? err.message : String(err)}` }] };
174
+ }
175
+ });
176
+ var transport = new StdioServerTransport();
177
+ await server.connect(transport);
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file