arevdata 0.1.17

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 (289) hide show
  1. package/README.md +499 -0
  2. package/dist/arevdata.cjs +38955 -0
  3. package/dist/arevdata.cjs.map +1 -0
  4. package/dist/arevdata.js +38955 -0
  5. package/dist/arevdata.js.map +1 -0
  6. package/dist/assets/flags/LICENSE.flag-icons.txt +21 -0
  7. package/dist/assets/flags/README.md +11 -0
  8. package/dist/assets/flags/index.html +88 -0
  9. package/dist/assets/flags/overrides/xn.svg +6 -0
  10. package/dist/assets/flags/svg/ad.svg +150 -0
  11. package/dist/assets/flags/svg/ae.svg +6 -0
  12. package/dist/assets/flags/svg/af.svg +81 -0
  13. package/dist/assets/flags/svg/ag.svg +14 -0
  14. package/dist/assets/flags/svg/al.svg +5 -0
  15. package/dist/assets/flags/svg/am.svg +5 -0
  16. package/dist/assets/flags/svg/ao.svg +13 -0
  17. package/dist/assets/flags/svg/ar.svg +32 -0
  18. package/dist/assets/flags/svg/at.svg +4 -0
  19. package/dist/assets/flags/svg/au.svg +8 -0
  20. package/dist/assets/flags/svg/az.svg +8 -0
  21. package/dist/assets/flags/svg/ba.svg +12 -0
  22. package/dist/assets/flags/svg/bb.svg +6 -0
  23. package/dist/assets/flags/svg/bd.svg +4 -0
  24. package/dist/assets/flags/svg/be.svg +7 -0
  25. package/dist/assets/flags/svg/bf.svg +7 -0
  26. package/dist/assets/flags/svg/bg.svg +5 -0
  27. package/dist/assets/flags/svg/bh.svg +4 -0
  28. package/dist/assets/flags/svg/bi.svg +15 -0
  29. package/dist/assets/flags/svg/bj.svg +14 -0
  30. package/dist/assets/flags/svg/bn.svg +36 -0
  31. package/dist/assets/flags/svg/bo.svg +673 -0
  32. package/dist/assets/flags/svg/br.svg +45 -0
  33. package/dist/assets/flags/svg/bs.svg +13 -0
  34. package/dist/assets/flags/svg/bt.svg +89 -0
  35. package/dist/assets/flags/svg/bw.svg +7 -0
  36. package/dist/assets/flags/svg/by.svg +18 -0
  37. package/dist/assets/flags/svg/bz.svg +145 -0
  38. package/dist/assets/flags/svg/ca.svg +4 -0
  39. package/dist/assets/flags/svg/cd.svg +5 -0
  40. package/dist/assets/flags/svg/cf.svg +15 -0
  41. package/dist/assets/flags/svg/cg.svg +12 -0
  42. package/dist/assets/flags/svg/ch.svg +9 -0
  43. package/dist/assets/flags/svg/cl.svg +13 -0
  44. package/dist/assets/flags/svg/cm.svg +15 -0
  45. package/dist/assets/flags/svg/cn.svg +11 -0
  46. package/dist/assets/flags/svg/co.svg +7 -0
  47. package/dist/assets/flags/svg/cr.svg +7 -0
  48. package/dist/assets/flags/svg/cu.svg +13 -0
  49. package/dist/assets/flags/svg/cv.svg +13 -0
  50. package/dist/assets/flags/svg/cy.svg +6 -0
  51. package/dist/assets/flags/svg/cz.svg +5 -0
  52. package/dist/assets/flags/svg/de.svg +5 -0
  53. package/dist/assets/flags/svg/dj.svg +13 -0
  54. package/dist/assets/flags/svg/dk.svg +5 -0
  55. package/dist/assets/flags/svg/dm.svg +152 -0
  56. package/dist/assets/flags/svg/do.svg +121 -0
  57. package/dist/assets/flags/svg/dz.svg +5 -0
  58. package/dist/assets/flags/svg/ec.svg +138 -0
  59. package/dist/assets/flags/svg/ee.svg +5 -0
  60. package/dist/assets/flags/svg/eg.svg +38 -0
  61. package/dist/assets/flags/svg/er.svg +8 -0
  62. package/dist/assets/flags/svg/es.svg +544 -0
  63. package/dist/assets/flags/svg/et.svg +14 -0
  64. package/dist/assets/flags/svg/fi.svg +5 -0
  65. package/dist/assets/flags/svg/fj.svg +120 -0
  66. package/dist/assets/flags/svg/fm.svg +11 -0
  67. package/dist/assets/flags/svg/fr.svg +5 -0
  68. package/dist/assets/flags/svg/ga.svg +7 -0
  69. package/dist/assets/flags/svg/gb.svg +7 -0
  70. package/dist/assets/flags/svg/gd.svg +27 -0
  71. package/dist/assets/flags/svg/ge.svg +6 -0
  72. package/dist/assets/flags/svg/gh.svg +6 -0
  73. package/dist/assets/flags/svg/gm.svg +14 -0
  74. package/dist/assets/flags/svg/gn.svg +7 -0
  75. package/dist/assets/flags/svg/gq.svg +23 -0
  76. package/dist/assets/flags/svg/gr.svg +16 -0
  77. package/dist/assets/flags/svg/gt.svg +204 -0
  78. package/dist/assets/flags/svg/gw.svg +13 -0
  79. package/dist/assets/flags/svg/gy.svg +9 -0
  80. package/dist/assets/flags/svg/hn.svg +18 -0
  81. package/dist/assets/flags/svg/hr.svg +58 -0
  82. package/dist/assets/flags/svg/ht.svg +116 -0
  83. package/dist/assets/flags/svg/hu.svg +7 -0
  84. package/dist/assets/flags/svg/id.svg +4 -0
  85. package/dist/assets/flags/svg/ie.svg +7 -0
  86. package/dist/assets/flags/svg/il.svg +14 -0
  87. package/dist/assets/flags/svg/in.svg +25 -0
  88. package/dist/assets/flags/svg/iq.svg +10 -0
  89. package/dist/assets/flags/svg/ir.svg +219 -0
  90. package/dist/assets/flags/svg/is.svg +12 -0
  91. package/dist/assets/flags/svg/it.svg +7 -0
  92. package/dist/assets/flags/svg/jm.svg +8 -0
  93. package/dist/assets/flags/svg/jo.svg +16 -0
  94. package/dist/assets/flags/svg/jp.svg +11 -0
  95. package/dist/assets/flags/svg/ke.svg +23 -0
  96. package/dist/assets/flags/svg/kg.svg +4 -0
  97. package/dist/assets/flags/svg/kh.svg +61 -0
  98. package/dist/assets/flags/svg/ki.svg +36 -0
  99. package/dist/assets/flags/svg/km.svg +16 -0
  100. package/dist/assets/flags/svg/kn.svg +14 -0
  101. package/dist/assets/flags/svg/kp.svg +15 -0
  102. package/dist/assets/flags/svg/kr.svg +24 -0
  103. package/dist/assets/flags/svg/kw.svg +13 -0
  104. package/dist/assets/flags/svg/kz.svg +36 -0
  105. package/dist/assets/flags/svg/la.svg +12 -0
  106. package/dist/assets/flags/svg/lb.svg +15 -0
  107. package/dist/assets/flags/svg/lc.svg +8 -0
  108. package/dist/assets/flags/svg/li.svg +43 -0
  109. package/dist/assets/flags/svg/lk.svg +22 -0
  110. package/dist/assets/flags/svg/lr.svg +14 -0
  111. package/dist/assets/flags/svg/ls.svg +8 -0
  112. package/dist/assets/flags/svg/lt.svg +7 -0
  113. package/dist/assets/flags/svg/lu.svg +5 -0
  114. package/dist/assets/flags/svg/lv.svg +6 -0
  115. package/dist/assets/flags/svg/ly.svg +13 -0
  116. package/dist/assets/flags/svg/ma.svg +4 -0
  117. package/dist/assets/flags/svg/mc.svg +6 -0
  118. package/dist/assets/flags/svg/md.svg +70 -0
  119. package/dist/assets/flags/svg/me.svg +116 -0
  120. package/dist/assets/flags/svg/mg.svg +7 -0
  121. package/dist/assets/flags/svg/mh.svg +7 -0
  122. package/dist/assets/flags/svg/mk.svg +5 -0
  123. package/dist/assets/flags/svg/ml.svg +7 -0
  124. package/dist/assets/flags/svg/mm.svg +12 -0
  125. package/dist/assets/flags/svg/mn.svg +14 -0
  126. package/dist/assets/flags/svg/mr.svg +6 -0
  127. package/dist/assets/flags/svg/mt.svg +58 -0
  128. package/dist/assets/flags/svg/mu.svg +8 -0
  129. package/dist/assets/flags/svg/mv.svg +6 -0
  130. package/dist/assets/flags/svg/mw.svg +10 -0
  131. package/dist/assets/flags/svg/mx.svg +382 -0
  132. package/dist/assets/flags/svg/my.svg +26 -0
  133. package/dist/assets/flags/svg/mz.svg +21 -0
  134. package/dist/assets/flags/svg/na.svg +16 -0
  135. package/dist/assets/flags/svg/ne.svg +6 -0
  136. package/dist/assets/flags/svg/ng.svg +6 -0
  137. package/dist/assets/flags/svg/ni.svg +129 -0
  138. package/dist/assets/flags/svg/nl.svg +5 -0
  139. package/dist/assets/flags/svg/no.svg +7 -0
  140. package/dist/assets/flags/svg/np.svg +13 -0
  141. package/dist/assets/flags/svg/nr.svg +12 -0
  142. package/dist/assets/flags/svg/nz.svg +36 -0
  143. package/dist/assets/flags/svg/om.svg +115 -0
  144. package/dist/assets/flags/svg/pa.svg +14 -0
  145. package/dist/assets/flags/svg/pe.svg +4 -0
  146. package/dist/assets/flags/svg/pg.svg +9 -0
  147. package/dist/assets/flags/svg/ph.svg +6 -0
  148. package/dist/assets/flags/svg/pk.svg +15 -0
  149. package/dist/assets/flags/svg/pl.svg +6 -0
  150. package/dist/assets/flags/svg/ps.svg +6 -0
  151. package/dist/assets/flags/svg/pt.svg +57 -0
  152. package/dist/assets/flags/svg/pw.svg +11 -0
  153. package/dist/assets/flags/svg/py.svg +157 -0
  154. package/dist/assets/flags/svg/qa.svg +4 -0
  155. package/dist/assets/flags/svg/ro.svg +7 -0
  156. package/dist/assets/flags/svg/rs.svg +292 -0
  157. package/dist/assets/flags/svg/ru.svg +5 -0
  158. package/dist/assets/flags/svg/rw.svg +13 -0
  159. package/dist/assets/flags/svg/sa.svg +25 -0
  160. package/dist/assets/flags/svg/sb.svg +13 -0
  161. package/dist/assets/flags/svg/sc.svg +7 -0
  162. package/dist/assets/flags/svg/sd.svg +13 -0
  163. package/dist/assets/flags/svg/se.svg +4 -0
  164. package/dist/assets/flags/svg/sg.svg +13 -0
  165. package/dist/assets/flags/svg/si.svg +18 -0
  166. package/dist/assets/flags/svg/sk.svg +9 -0
  167. package/dist/assets/flags/svg/sl.svg +7 -0
  168. package/dist/assets/flags/svg/sm.svg +75 -0
  169. package/dist/assets/flags/svg/sn.svg +8 -0
  170. package/dist/assets/flags/svg/so.svg +11 -0
  171. package/dist/assets/flags/svg/sr.svg +6 -0
  172. package/dist/assets/flags/svg/ss.svg +8 -0
  173. package/dist/assets/flags/svg/st.svg +16 -0
  174. package/dist/assets/flags/svg/sv.svg +593 -0
  175. package/dist/assets/flags/svg/sy.svg +6 -0
  176. package/dist/assets/flags/svg/sz.svg +34 -0
  177. package/dist/assets/flags/svg/td.svg +7 -0
  178. package/dist/assets/flags/svg/tg.svg +14 -0
  179. package/dist/assets/flags/svg/th.svg +7 -0
  180. package/dist/assets/flags/svg/tj.svg +22 -0
  181. package/dist/assets/flags/svg/tl.svg +13 -0
  182. package/dist/assets/flags/svg/tm.svg +204 -0
  183. package/dist/assets/flags/svg/tn.svg +4 -0
  184. package/dist/assets/flags/svg/to.svg +10 -0
  185. package/dist/assets/flags/svg/tr.svg +8 -0
  186. package/dist/assets/flags/svg/tt.svg +5 -0
  187. package/dist/assets/flags/svg/tv.svg +9 -0
  188. package/dist/assets/flags/svg/tw.svg +34 -0
  189. package/dist/assets/flags/svg/tz.svg +13 -0
  190. package/dist/assets/flags/svg/ua.svg +6 -0
  191. package/dist/assets/flags/svg/ug.svg +30 -0
  192. package/dist/assets/flags/svg/us.svg +9 -0
  193. package/dist/assets/flags/svg/uy.svg +28 -0
  194. package/dist/assets/flags/svg/uz.svg +30 -0
  195. package/dist/assets/flags/svg/va.svg +190 -0
  196. package/dist/assets/flags/svg/vc.svg +8 -0
  197. package/dist/assets/flags/svg/ve.svg +26 -0
  198. package/dist/assets/flags/svg/vn.svg +11 -0
  199. package/dist/assets/flags/svg/vu.svg +21 -0
  200. package/dist/assets/flags/svg/ws.svg +7 -0
  201. package/dist/assets/flags/svg/xk.svg +5 -0
  202. package/dist/assets/flags/svg/xn.svg +6 -0
  203. package/dist/assets/flags/svg/ye.svg +7 -0
  204. package/dist/assets/flags/svg/za.svg +17 -0
  205. package/dist/assets/flags/svg/zm.svg +27 -0
  206. package/dist/assets/flags/svg/zw.svg +21 -0
  207. package/dist/data/languages/index.html +86 -0
  208. package/dist/docs/api-worker-plan/index.html +439 -0
  209. package/dist/docs/cities/index.html +193 -0
  210. package/dist/docs/continents-currencies/index.html +306 -0
  211. package/dist/docs/countries/index.html +274 -0
  212. package/dist/docs/country-maps/index.html +262 -0
  213. package/dist/docs/flags/index.html +300 -0
  214. package/dist/docs/geography/index.html +454 -0
  215. package/dist/docs/languages/index.html +304 -0
  216. package/dist/docs/phone-codes/index.html +152 -0
  217. package/dist/docs/states/index.html +334 -0
  218. package/dist/docs/world-map/index.html +345 -0
  219. package/dist/examples/vue-app/index.html +208 -0
  220. package/dist/index.html +784 -0
  221. package/dist/robots.txt +2 -0
  222. package/dist/style/app.css +1 -0
  223. package/dist/types/__tests__/cities.test.d.ts +1 -0
  224. package/dist/types/__tests__/continents.test.d.ts +1 -0
  225. package/dist/types/__tests__/countries.test.d.ts +1 -0
  226. package/dist/types/__tests__/countryMaps.test.d.ts +1 -0
  227. package/dist/types/__tests__/geography.test.d.ts +1 -0
  228. package/dist/types/__tests__/index.test.d.ts +1 -0
  229. package/dist/types/__tests__/phoneCodes.test.d.ts +1 -0
  230. package/dist/types/__tests__/states.test.d.ts +1 -0
  231. package/dist/types/__tests__/translations.test.d.ts +1 -0
  232. package/dist/types/api/index.d.ts +5 -0
  233. package/dist/types/api/index.test.d.ts +1 -0
  234. package/dist/types/api/query.d.ts +3 -0
  235. package/dist/types/api/response.d.ts +16 -0
  236. package/dist/types/api/router.d.ts +1 -0
  237. package/dist/types/api/routes/cities.d.ts +2 -0
  238. package/dist/types/api/routes/countries.d.ts +2 -0
  239. package/dist/types/api/routes/health.d.ts +1 -0
  240. package/dist/types/api/routes/maps.d.ts +1 -0
  241. package/dist/types/api/routes/meta.d.ts +1 -0
  242. package/dist/types/api/routes/phoneCodes.d.ts +1 -0
  243. package/dist/types/data/cities.d.ts +22 -0
  244. package/dist/types/data/continents.d.ts +9 -0
  245. package/dist/types/data/countries.d.ts +23 -0
  246. package/dist/types/data/countryMaps.d.ts +104 -0
  247. package/dist/types/data/currencies.d.ts +13 -0
  248. package/dist/types/data/flags.d.ts +37 -0
  249. package/dist/types/data/geography.d.ts +48 -0
  250. package/dist/types/data/languages/index.d.ts +2 -0
  251. package/dist/types/data/languages/language.test.d.ts +1 -0
  252. package/dist/types/data/languages/languageData.d.ts +6 -0
  253. package/dist/types/data/languages/languageFunctions.d.ts +43 -0
  254. package/dist/types/data/languages/translations/ar.d.ts +1189 -0
  255. package/dist/types/data/languages/translations/de.d.ts +1189 -0
  256. package/dist/types/data/languages/translations/es.d.ts +1189 -0
  257. package/dist/types/data/languages/translations/fr.d.ts +1189 -0
  258. package/dist/types/data/languages/translations/hi.d.ts +1189 -0
  259. package/dist/types/data/languages/translations/it.d.ts +1189 -0
  260. package/dist/types/data/languages/translations/ja.d.ts +1189 -0
  261. package/dist/types/data/languages/translations/ko.d.ts +1189 -0
  262. package/dist/types/data/languages/translations/nl.d.ts +1189 -0
  263. package/dist/types/data/languages/translations/pl.d.ts +1189 -0
  264. package/dist/types/data/languages/translations/pt.d.ts +1189 -0
  265. package/dist/types/data/languages/translations/ru.d.ts +1189 -0
  266. package/dist/types/data/languages/translations/tr.d.ts +1189 -0
  267. package/dist/types/data/languages/translations/zh.d.ts +1189 -0
  268. package/dist/types/data/phoneCodes.d.ts +16 -0
  269. package/dist/types/data/states.d.ts +18 -0
  270. package/dist/types/data/translations/ar.d.ts +1832 -0
  271. package/dist/types/data/translations/de.d.ts +2005 -0
  272. package/dist/types/data/translations/es.d.ts +1852 -0
  273. package/dist/types/data/translations/fr.d.ts +1860 -0
  274. package/dist/types/data/translations/hi.d.ts +1816 -0
  275. package/dist/types/data/translations/it.d.ts +1824 -0
  276. package/dist/types/data/translations/ja.d.ts +1833 -0
  277. package/dist/types/data/translations/ko.d.ts +1832 -0
  278. package/dist/types/data/translations/nl.d.ts +1826 -0
  279. package/dist/types/data/translations/pl.d.ts +1818 -0
  280. package/dist/types/data/translations/pt.d.ts +1829 -0
  281. package/dist/types/data/translations/ru.d.ts +1838 -0
  282. package/dist/types/data/translations/tr.d.ts +1818 -0
  283. package/dist/types/data/translations/zh.d.ts +1834 -0
  284. package/dist/types/data/translations.d.ts +73 -0
  285. package/dist/types/data/worldMap.d.ts +122 -0
  286. package/dist/types/index.d.ts +33 -0
  287. package/dist/types/types/index.d.ts +348 -0
  288. package/dist/types/utils/geo.d.ts +101 -0
  289. package/package.json +67 -0
@@ -0,0 +1,73 @@
1
+ import type { Country, City, Continent, Currency } from "../types/index.js";
2
+ /**
3
+ * Translation record for a single country.
4
+ */
5
+ export interface CountryTranslation {
6
+ /** Translated country name */
7
+ name: string;
8
+ /** Translated capital city name (optional; omit if same as the English name) */
9
+ capital?: string;
10
+ }
11
+ /**
12
+ * All translations for a single language.
13
+ */
14
+ export interface TranslationMap {
15
+ /** Country translations keyed by ISO 3166-1 alpha-2 code */
16
+ countries: Record<string, CountryTranslation>;
17
+ /** Continent translations keyed by two-letter continent code */
18
+ continents: Record<string, string>;
19
+ /** City name translations keyed by English city name */
20
+ cities: Record<string, string>;
21
+ /** Currency name translations keyed by ISO 4217 code */
22
+ currencies: Record<string, string>;
23
+ /** Language and locale-variant display names keyed by canonical BCP 47 code */
24
+ languages: Record<string, string>;
25
+ }
26
+ /**
27
+ * All supported translation language codes (BCP 47 language tags).
28
+ * English ("en") is the default and is always derived from the source data.
29
+ */
30
+ export type TranslationLanguage = "en" | "ar" | "de" | "es" | "fr" | "hi" | "it" | "ja" | "ko" | "nl" | "pl" | "pt" | "ru" | "tr" | "zh";
31
+ /**
32
+ * Translation data for all supported languages.
33
+ * Each language is defined in its own file under src/data/translations/.
34
+ * English ("en") is intentionally omitted – the source data already contains English strings.
35
+ */
36
+ export declare const translations: Record<string, TranslationMap>;
37
+ /**
38
+ * Return the list of BCP 47 language codes that have translation data.
39
+ * "en" is always included because the source data is in English.
40
+ */
41
+ export declare function getSupportedLanguages(): TranslationLanguage[];
42
+ /**
43
+ * Retrieve the full translation map for a given language code.
44
+ * Returns `undefined` for unsupported languages (including "en", which uses the
45
+ * source data directly).
46
+ */
47
+ export declare function getTranslations(lang: string): TranslationMap | undefined;
48
+ /**
49
+ * Return a shallow copy of `country` with `name` (and optionally `capital`)
50
+ * replaced by the translated values for `lang`.
51
+ * Falls back to the original English values when no translation is found.
52
+ */
53
+ export declare function translateCountry(country: Country, lang: string): Country;
54
+ /**
55
+ * Return a shallow copy of `city` with `name` replaced by the translated value
56
+ * for `lang`. Falls back to the original English name when no translation exists.
57
+ */
58
+ export declare function translateCity(city: City, lang: string): City;
59
+ /**
60
+ * Return a shallow copy of `continent` with `name` replaced by the translated
61
+ * value for `lang`. Falls back to the original English name when no translation exists.
62
+ */
63
+ export declare function translateContinent(continent: Continent, lang: string): Continent;
64
+ /**
65
+ * Return a shallow copy of `currency` with `name` replaced by the translated
66
+ * value for `lang`. Falls back to the original English name when no translation exists.
67
+ */
68
+ export declare function translateCurrency(currency: Currency, lang: string): Currency;
69
+ /**
70
+ * Return the translated display name for a language or locale code.
71
+ * Falls back to the provided English name when no translation exists.
72
+ */
73
+ export declare function translateLanguageName(code: string, englishName: string, lang: string): string;
@@ -0,0 +1,122 @@
1
+ /**
2
+ * World map SVG utilities.
3
+ *
4
+ * Provides the vector path data for 251 countries (ISO 3166-1 alpha-2 IDs)
5
+ * and helper functions to generate, style, and highlight countries in SVG format.
6
+ *
7
+ * Path data sourced from the MapSVG world map (http://mapsvg.com).
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import { getWorldMapSvg, highlightCountries } from "arevdata";
12
+ *
13
+ * // Render a plain world map
14
+ * document.getElementById("map").innerHTML = getWorldMapSvg({ fill: "#e0e0e0" });
15
+ *
16
+ * // Highlight specific countries
17
+ * document.getElementById("map").innerHTML = highlightCountries(
18
+ * [{ code: "US", fill: "#4a90e2" }, { code: "DE", fill: "#e24a4a" }],
19
+ * { fill: "#d0d0d0" }
20
+ * );
21
+ * ```
22
+ */
23
+ import type { WorldMapCountry, WorldMapOptions, WorldMapHighlight } from "../types/index.js";
24
+ /** ViewBox for the world map SVG canvas ("0 0 1009.6727 665.96301"). */
25
+ export declare const WORLD_MAP_VIEWBOX = "0 0 1009.6727 665.96301";
26
+ /**
27
+ * Default styling applied when no options are supplied.
28
+ */
29
+ export declare const WORLD_MAP_DEFAULTS: Required<WorldMapOptions>;
30
+ /**
31
+ * SVG path data for every country on the world map.
32
+ * Paths use ISO 3166-1 alpha-2 codes as identifiers.
33
+ * All 251 entries include drawable SVG paths.
34
+ */
35
+ export declare const worldMapCountries: WorldMapCountry[];
36
+ /**
37
+ * Look up the SVG path data for a single country by its ISO alpha-2 code.
38
+ * The look-up is case-insensitive.
39
+ *
40
+ * @param code ISO 3166-1 alpha-2 code (e.g. "US", "de")
41
+ * @returns The matching {@link WorldMapCountry} entry, or `undefined` if not found.
42
+ *
43
+ * @example
44
+ * const germany = getCountryMapData("DE");
45
+ * // { code: "DE", name: "Germany", paths: ["M..."] }
46
+ */
47
+ export declare function getCountryMapData(code: string): WorldMapCountry | undefined;
48
+ /**
49
+ * Return all countries whose names contain the given search string
50
+ * (case-insensitive).
51
+ *
52
+ * @param name Full or partial country name
53
+ * @returns Array of matching {@link WorldMapCountry} entries.
54
+ *
55
+ * @example
56
+ * searchWorldMapCountries("land"); // → Greenland, Iceland, Finland, New Zealand, …
57
+ */
58
+ export declare function searchWorldMapCountries(name: string): WorldMapCountry[];
59
+ /**
60
+ * Generate a complete SVG world map string.
61
+ *
62
+ * Each country `<path>` element is given:
63
+ * - `id` set to its ISO alpha-2 code (e.g. `id="DE"`)
64
+ * - `data-code` – same ISO alpha-2 code
65
+ * - `data-name` – common country name
66
+ *
67
+ * This makes it straightforward to select and style countries via CSS or JavaScript:
68
+ * ```css
69
+ * #DE { fill: steelblue; }
70
+ * ```
71
+ * ```js
72
+ * document.getElementById("FR").style.fill = "red";
73
+ * ```
74
+ *
75
+ * @param options Optional styling overrides (merged with {@link WORLD_MAP_DEFAULTS}).
76
+ * @returns A complete `<svg>…</svg>` string ready for insertion into the DOM.
77
+ *
78
+ * @example
79
+ * const svg = getWorldMapSvg({ fill: "#e8f4f8", stroke: "#aaa", hoverFill: "#4a90e2" });
80
+ * document.getElementById("map").innerHTML = svg;
81
+ */
82
+ export declare function getWorldMapSvg(options?: WorldMapOptions): string;
83
+ /**
84
+ * Generate a world map SVG with specific countries highlighted in custom colours.
85
+ *
86
+ * All other countries keep the base fill from `options`. Each highlighted
87
+ * country can optionally carry an accessible `<title>` (via `highlight.label`).
88
+ *
89
+ * @param highlights Array of {@link WorldMapHighlight} descriptors.
90
+ * @param options Optional base styling (merged with {@link WORLD_MAP_DEFAULTS}).
91
+ * @returns A complete `<svg>…</svg>` string.
92
+ *
93
+ * @example
94
+ * const svg = highlightCountries(
95
+ * [
96
+ * { code: "US", fill: "#4a90e2", label: "United States" },
97
+ * { code: "CA", fill: "#e24a4a" },
98
+ * ],
99
+ * { fill: "#eeeeee" }
100
+ * );
101
+ */
102
+ export declare function highlightCountries(highlights: WorldMapHighlight[], options?: WorldMapOptions): string;
103
+ /**
104
+ * Generate a world map SVG where countries are coloured by group.
105
+ *
106
+ * Useful for choropleth-style maps (e.g. continent groupings, data categories).
107
+ * Countries not present in any group get the base `options.fill`.
108
+ *
109
+ * @param groups Map from a fill colour to an array of ISO alpha-2 codes.
110
+ * @param options Optional base styling.
111
+ * @returns A complete `<svg>…</svg>` string.
112
+ *
113
+ * @example
114
+ * const svg = colorizeWorldMap(
115
+ * {
116
+ * "#4a90e2": ["US", "CA", "MX"],
117
+ * "#e24a4a": ["GB", "DE", "FR"],
118
+ * },
119
+ * { fill: "#dddddd" }
120
+ * );
121
+ */
122
+ export declare function colorizeWorldMap(groups: Record<string, string[]>, options?: WorldMapOptions): string;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * arev
3
+ *
4
+ * A comprehensive collection of reusable world data:
5
+ * countries, phone codes, flags, cities, states, provinces, currencies, and more.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { phoneCountryCodes, countries, cities } from "arevdata";
10
+ *
11
+ * // Use phone country codes in a select input
12
+ * const options = phoneCountryCodes.map(p => ({
13
+ * label: `${p.flag} ${p.country} (${p.phoneCode})`,
14
+ * value: p.phoneCode,
15
+ * }));
16
+ * ```
17
+ */
18
+ export type { Country, Language, LanguageNameLocale, LanguageOfficialCountry, LanguageOfficialStatus, LanguageType, PhoneCountryCode, City, State, StateType, Continent, ContinentName, Currency, CountryGeography, CountryBounds, ClimateZone, FlagInfo, FlagColor, CardinalDirection, WorldMapCountry, WorldMapOptions, WorldMapHighlight, ReligionBreakdown, EthnicGroup, CountryDemographics, CountryMapOptions, } from "./types/index.js";
19
+ export type { CountryTranslation, TranslationMap, TranslationLanguage, } from "./data/translations.js";
20
+ export { translations, getSupportedLanguages, getTranslations, translateCountry, translateCity, translateContinent, translateCurrency, translateLanguageName, } from "./data/translations.js";
21
+ export { allLanguages, canonicalizeLanguageCode, getLanguageByCode, getLanguageName, getLanguagesBySpeakerCount, getLanguageVariants, getOfficialLanguageCountries, getOfficialLanguagesByCountry, languageCodeAliases, languageNameLocales, languageVariants, languages, officialLanguagesByCountry, searchLanguages, } from "./data/languages/index.js";
22
+ export { countries, getCountryByCode, getCountriesByContinent, getCountryFlag, getRecognizedCountries, } from "./data/countries.js";
23
+ export { phoneCountryCodes, getPhoneCodeByCountry, getCountriesByPhoneCode, } from "./data/phoneCodes.js";
24
+ export { cities, getCitiesByCountry, getCapitalCity, getCitiesByPopulation, searchCities, } from "./data/cities.js";
25
+ export { states, getStatesByCountry, getStateByCode, getStatesByType, } from "./data/states.js";
26
+ export { continents, getContinentByCode } from "./data/continents.js";
27
+ export { currencies, getCurrencyByCode, getCurrencyByCountry, } from "./data/currencies.js";
28
+ export { countryGeography, getCountryGeography, getLandlockedCountries, getCountriesByClimate, getNeighbors, doCountriesBorder, } from "./data/geography.js";
29
+ export { flagData, getFlagData, getFlagsByColor, getSimilarFlags, getFlagSvgUrl, getFlagPngUrl, getCountryMapSvgUrl, } from "./data/flags.js";
30
+ export { haversineDistance, bearing, bearingToCardinal, getDistanceBetweenCountries, getDirectionBetweenCountries, compareTemperature, compareSize, getHemisphere, getGeoHints, } from "./utils/geo.js";
31
+ export type { GeoHint, Hemisphere } from "./utils/geo.js";
32
+ export { WORLD_MAP_VIEWBOX, WORLD_MAP_DEFAULTS, worldMapCountries, getCountryMapData, searchWorldMapCountries, getWorldMapSvg, highlightCountries, colorizeWorldMap, } from "./data/worldMap.js";
33
+ export { COUNTRY_MAP_DEFAULTS, latLonToMapPoint, getCountrySvg, getCountrySubdivisionMapUrl, } from "./data/countryMaps.js";
@@ -0,0 +1,348 @@
1
+ /**
2
+ * Represents a country with standard ISO codes and metadata.
3
+ */
4
+ export interface Country {
5
+ /** Full official name of the country */
6
+ name: string;
7
+ /** Common/short name of the country */
8
+ nativeName?: string;
9
+ /** ISO 3166-1 alpha-2 code (e.g., "US") */
10
+ alpha2: string;
11
+ /** ISO 3166-1 alpha-3 code (e.g., "USA") */
12
+ alpha3: string;
13
+ /** ISO 3166-1 numeric code (e.g., "840") */
14
+ numeric: string;
15
+ /** Unicode emoji flag */
16
+ flag: string;
17
+ /** International dialing code (e.g., "+1") */
18
+ phoneCode: string;
19
+ /** Capital city name */
20
+ capital: string;
21
+ /** Continent name */
22
+ continent: ContinentName;
23
+ /** ISO 4217 currency code (e.g., "USD") */
24
+ currency: string;
25
+ /** Full currency name, optionally translated (e.g., "US Dollar", "US-Dollar") */
26
+ currencyName?: string;
27
+ /** Currency symbol (e.g., "$") */
28
+ currencySymbol?: string;
29
+ /** Primary language(s) spoken */
30
+ languages: string[];
31
+ /** Top-level domain (e.g., ".us") */
32
+ tld?: string;
33
+ /**
34
+ * Whether the country is officially recognized as a sovereign state.
35
+ * `false` for disputed or unrecognized territories (e.g., Kosovo, Nagorno-Karabakh)
36
+ * that use user-assigned ISO codes not endorsed by the UN.
37
+ */
38
+ recognized: boolean;
39
+ }
40
+ /**
41
+ * Supported locales used for translated display names in this package.
42
+ */
43
+ export type LanguageNameLocale = "en" | "ar" | "de" | "es" | "fr" | "hi" | "it" | "ja" | "ko" | "nl" | "pl" | "pt" | "ru" | "tr" | "zh";
44
+ /**
45
+ * Whether a language entry is a base language code or a more specific locale variant.
46
+ */
47
+ export type LanguageType = "language" | "variant";
48
+ /**
49
+ * Official-language statuses used by CLDR territory population data.
50
+ */
51
+ export type LanguageOfficialStatus = "official" | "de_facto_official" | "official_regional";
52
+ /**
53
+ * Country-level official-language metadata for a single language.
54
+ */
55
+ export interface LanguageOfficialCountry {
56
+ /** ISO 3166-1 alpha-2 country code */
57
+ countryCode: string;
58
+ /** Official status in the territory */
59
+ officialStatus: LanguageOfficialStatus;
60
+ /** Approximate share of the territory population that speaks the language */
61
+ populationPercent: number;
62
+ }
63
+ /**
64
+ * A language or locale variant with translated names and speaker estimates.
65
+ */
66
+ export interface Language {
67
+ /** Canonical BCP 47 language or locale code */
68
+ code: string;
69
+ /** The canonical base language code, e.g. "en" for "en-GB" */
70
+ baseCode: string;
71
+ /** Whether this is a base language or a locale variant */
72
+ type: LanguageType;
73
+ /** English display name */
74
+ name: string;
75
+ /**
76
+ * Estimated speaker count derived from CLDR territory population percentages.
77
+ * For variants this is a locale-scoped estimate where possible.
78
+ */
79
+ estimatedSpeakers: number;
80
+ /** Countries or territories where this language has an official status in CLDR */
81
+ officialCountries: LanguageOfficialCountry[];
82
+ /** Script subtag for variants such as "sr-Latn" */
83
+ script?: string;
84
+ /** Region subtag for variants such as "en-GB" */
85
+ region?: string;
86
+ /** Additional locale variant subtags, e.g. ["valencia"] */
87
+ variants?: string[];
88
+ }
89
+ /**
90
+ * Continent names
91
+ */
92
+ export type ContinentName = "Africa" | "Antarctica" | "Asia" | "Europe" | "North America" | "Oceania" | "South America";
93
+ /**
94
+ * Phone country code entry, suitable for use in phone number inputs.
95
+ */
96
+ export interface PhoneCountryCode {
97
+ /** Country name */
98
+ country: string;
99
+ /** ISO 3166-1 alpha-2 code */
100
+ code: string;
101
+ /** International dialing code with + prefix (e.g., "+1") */
102
+ phoneCode: string;
103
+ /** Unicode emoji flag */
104
+ flag: string;
105
+ /** Example number format (without country code) */
106
+ example?: string;
107
+ }
108
+ /**
109
+ * Represents a city with geographic and demographic data.
110
+ */
111
+ export interface City {
112
+ /** City name */
113
+ name: string;
114
+ /** ISO 3166-1 alpha-2 country code */
115
+ country: string;
116
+ /** State, province, or region */
117
+ state?: string;
118
+ /** Approximate population */
119
+ population?: number;
120
+ /** Latitude */
121
+ lat: number;
122
+ /** Longitude */
123
+ lon: number;
124
+ /** Whether this is the capital of the country */
125
+ capital?: boolean;
126
+ }
127
+ /**
128
+ * Represents a state, province, or other administrative division.
129
+ */
130
+ export interface State {
131
+ /** Full name of the state/province */
132
+ name: string;
133
+ /** State/province abbreviation code */
134
+ code: string;
135
+ /** ISO 3166-1 alpha-2 country code */
136
+ country: string;
137
+ /** Type of administrative division */
138
+ type: StateType;
139
+ }
140
+ /**
141
+ * Types of administrative divisions
142
+ */
143
+ export type StateType = "state" | "province" | "territory" | "autonomous region" | "district" | "department" | "region" | "county" | "emirate" | "canton";
144
+ /**
145
+ * Continent with metadata
146
+ */
147
+ export interface Continent {
148
+ /** Continent name */
149
+ name: ContinentName;
150
+ /** Two-letter continent code */
151
+ code: string;
152
+ /** Approximate population */
153
+ population: number;
154
+ /** Area in square kilometers */
155
+ area: number;
156
+ /** Number of countries */
157
+ countries: number;
158
+ }
159
+ /**
160
+ * Currency information
161
+ */
162
+ export interface Currency {
163
+ /** ISO 4217 currency code */
164
+ code: string;
165
+ /** Currency name */
166
+ name: string;
167
+ /** Currency symbol */
168
+ symbol: string;
169
+ /** Countries using this currency (alpha-2 codes) */
170
+ countries: string[];
171
+ }
172
+ /**
173
+ * Climate zones based on the Köppen climate classification (simplified).
174
+ */
175
+ export type ClimateZone = "tropical" | "subtropical" | "arid" | "mediterranean" | "temperate" | "continental" | "subarctic" | "arctic";
176
+ /**
177
+ * Geographic bounding box of a country.
178
+ */
179
+ export interface CountryBounds {
180
+ /** Northernmost latitude */
181
+ north: number;
182
+ /** Southernmost latitude */
183
+ south: number;
184
+ /** Easternmost longitude */
185
+ east: number;
186
+ /** Westernmost longitude */
187
+ west: number;
188
+ }
189
+ /**
190
+ * Geographic and climate data for a country, useful for geography games.
191
+ */
192
+ export interface CountryGeography {
193
+ /** ISO 3166-1 alpha-2 code */
194
+ alpha2: string;
195
+ /** Centroid latitude of the country */
196
+ lat: number;
197
+ /** Centroid longitude of the country */
198
+ lon: number;
199
+ /** Approximate bounding box */
200
+ bounds: CountryBounds;
201
+ /** Land area in km² */
202
+ area: number;
203
+ /** Whether the country is landlocked (has no coastline) */
204
+ landlocked: boolean;
205
+ /** Neighboring country alpha-2 codes */
206
+ neighbors: string[];
207
+ /** Primary climate zone */
208
+ climate: ClimateZone;
209
+ /** Average annual temperature in Celsius */
210
+ avgTemperature: number;
211
+ }
212
+ /**
213
+ * Primary colors that can appear on a country flag.
214
+ */
215
+ export type FlagColor = "red" | "dark-red" | "white" | "blue" | "green" | "yellow" | "orange" | "black" | "gold" | "light-blue" | "dark-blue" | "dark-green" | "purple" | "brown";
216
+ /**
217
+ * Flag metadata for a country, including visual similarity data for geography games.
218
+ */
219
+ export interface FlagInfo {
220
+ /** ISO 3166-1 alpha-2 code */
221
+ alpha2: string;
222
+ /** URL to the hosted SVG flag image */
223
+ svgUrl: string;
224
+ /** URL to a hosted 4×3 PNG flag image */
225
+ pngUrl: string;
226
+ /** Primary colors present on the flag (up to 4, most prominent first) */
227
+ colors: FlagColor[];
228
+ /**
229
+ * Alpha-2 codes of countries whose flags look visually similar.
230
+ * Useful for building "guess the flag" games with confusing options.
231
+ */
232
+ similar: string[];
233
+ }
234
+ /**
235
+ * 8-point cardinal / intercardinal compass directions.
236
+ */
237
+ export type CardinalDirection = "N" | "NE" | "E" | "SE" | "S" | "SW" | "W" | "NW";
238
+ /**
239
+ * SVG path data for a single country on the world map.
240
+ * A country may consist of multiple disjoint polygons (e.g. islands).
241
+ */
242
+ export interface WorldMapCountry {
243
+ /** ISO 3166-1 alpha-2 code (e.g. "US") */
244
+ code: string;
245
+ /** Common country name */
246
+ name: string;
247
+ /** One or more SVG path `d` attribute strings */
248
+ paths: string[];
249
+ }
250
+ /**
251
+ * Styling options for rendering the world map SVG.
252
+ */
253
+ export interface WorldMapOptions {
254
+ /** Fill color for all country shapes. Default: "#d0d0d0" */
255
+ fill?: string;
256
+ /** Stroke (border) color between countries. Default: "#ffffff" */
257
+ stroke?: string;
258
+ /** Stroke width in SVG units. Default: 0.5 */
259
+ strokeWidth?: number;
260
+ /** Fill color applied to a country on hover. Default: "#a0a0a0" */
261
+ hoverFill?: string;
262
+ /** SVG element width attribute (e.g. "100%", 800). Default: "100%" */
263
+ width?: string | number;
264
+ /** SVG element height attribute (e.g. "auto", 400). Default: "auto" */
265
+ height?: string | number;
266
+ /** Optional CSS class added to the `<svg>` element. */
267
+ className?: string;
268
+ }
269
+ /**
270
+ * A single religion and its approximate share of a country's population.
271
+ */
272
+ export interface ReligionBreakdown {
273
+ /** Religion name (e.g., "Christianity", "Islam", "Hinduism") */
274
+ name: string;
275
+ /** Percentage of the population (0–100) */
276
+ percentage: number;
277
+ }
278
+ /**
279
+ * A single ethnic group and its approximate share of a country's population.
280
+ */
281
+ export interface EthnicGroup {
282
+ /** Ethnic group name (e.g., "Han Chinese", "White", "Mestizo") */
283
+ name: string;
284
+ /** Percentage of the population (0–100) */
285
+ percentage: number;
286
+ }
287
+ /**
288
+ * Demographic data for a country: population, religions, and ethnic makeup.
289
+ * Data is sourced from the CIA World Factbook, Pew Research Center, and UN estimates.
290
+ */
291
+ export interface CountryDemographics {
292
+ /** ISO 3166-1 alpha-2 code */
293
+ alpha2: string;
294
+ /** Approximate total population */
295
+ population: number;
296
+ /** Year of the population estimate */
297
+ populationYear: number;
298
+ /**
299
+ * Religious breakdown, sorted by percentage descending.
300
+ * Percentages may not sum to exactly 100 due to rounding or "other/unspecified" omissions.
301
+ */
302
+ religions: ReligionBreakdown[];
303
+ /**
304
+ * Ethnic group breakdown, sorted by percentage descending.
305
+ * Percentages may not sum to exactly 100 due to rounding or "other/unspecified" omissions.
306
+ */
307
+ ethnicGroups: EthnicGroup[];
308
+ }
309
+ /**
310
+ * Describes a highlighted country on the world map.
311
+ */
312
+ export interface WorldMapHighlight {
313
+ /** ISO 3166-1 alpha-2 code of the country to highlight */
314
+ code: string;
315
+ /** Fill color to use for this country. Overrides the default fill. */
316
+ fill: string;
317
+ /** Optional accessible label (written as a `<title>` element). */
318
+ label?: string;
319
+ }
320
+ /**
321
+ * Styling and display options for rendering a single-country SVG map.
322
+ */
323
+ export interface CountryMapOptions {
324
+ /** Fill color for the country shape. Default: "#d0d0d0" */
325
+ fill?: string;
326
+ /** Stroke (border) color for the country outline. Default: "#ffffff" */
327
+ stroke?: string;
328
+ /** Stroke width in SVG units. Default: 0.5 */
329
+ strokeWidth?: number;
330
+ /** SVG element width attribute (e.g. "100%", 800). Default: "100%" */
331
+ width?: string | number;
332
+ /** SVG element height attribute (e.g. "auto", 400). Default: "auto" */
333
+ height?: string | number;
334
+ /** Optional CSS class added to the `<svg>` element. */
335
+ className?: string;
336
+ /** Whether to show city marker dots. Default: true */
337
+ showCities?: boolean;
338
+ /** Fill color for regular city markers. Default: "#555555" */
339
+ cityColor?: string;
340
+ /** Fill color for the capital city marker. Default: "#cc2222" */
341
+ capitalColor?: string;
342
+ /** Radius of regular city markers in SVG units. Default: 3 */
343
+ cityRadius?: number;
344
+ /** Radius of the capital city marker in SVG units. Default: 5 */
345
+ capitalRadius?: number;
346
+ /** Extra space (in SVG units) added around the country outline. Default: 5 */
347
+ padding?: number;
348
+ }
@@ -0,0 +1,101 @@
1
+ import type { CardinalDirection, ClimateZone } from "../types/index.js";
2
+ /**
3
+ * Calculate the great-circle distance in kilometres between two geographic
4
+ * coordinates using the Haversine formula.
5
+ */
6
+ export declare function haversineDistance(lat1: number, lon1: number, lat2: number, lon2: number): number;
7
+ /**
8
+ * Calculate the initial bearing (in degrees, 0 = north, clockwise) from one
9
+ * coordinate to another.
10
+ */
11
+ export declare function bearing(lat1: number, lon1: number, lat2: number, lon2: number): number;
12
+ /**
13
+ * Convert a bearing in degrees to an 8-point cardinal/intercardinal direction.
14
+ */
15
+ export declare function bearingToCardinal(deg: number): CardinalDirection;
16
+ /**
17
+ * Get the great-circle distance in km between two countries (by alpha-2 code),
18
+ * measured between their geographic centroids.
19
+ *
20
+ * Returns `null` if either country code is unknown.
21
+ */
22
+ export declare function getDistanceBetweenCountries(alpha2A: string, alpha2B: string): number | null;
23
+ /**
24
+ * Get the compass direction FROM country A TO country B (by alpha-2 code).
25
+ *
26
+ * For example, `getDirectionBetweenCountries("FR", "DE")` returns `"NE"`.
27
+ * Returns `null` if either country code is unknown.
28
+ */
29
+ export declare function getDirectionBetweenCountries(fromAlpha2: string, toAlpha2: string): CardinalDirection | null;
30
+ /**
31
+ * Compare the average annual temperature of two countries.
32
+ *
33
+ * Returns `"hotter"` if country B is warmer, `"colder"` if cooler, or
34
+ * `"similar"` if the difference is ≤ 3 °C.
35
+ *
36
+ * Useful in geography games: "The target country is hotter than your guess."
37
+ */
38
+ export declare function compareTemperature(guessAlpha2: string, targetAlpha2: string): "hotter" | "colder" | "similar" | null;
39
+ /**
40
+ * Compare the size (area) of two countries.
41
+ *
42
+ * Returns `"larger"` if the target country is bigger, `"smaller"` if smaller,
43
+ * or `"similar"` if within 20 % of each other.
44
+ */
45
+ export declare function compareSize(guessAlpha2: string, targetAlpha2: string): "larger" | "smaller" | "similar" | null;
46
+ /**
47
+ * Return a human-readable hemisphere description for a country's centroid.
48
+ *
49
+ * e.g. `"Northern"` | `"Southern"` | `"Eastern"` | `"Western"`
50
+ */
51
+ export declare function getHemisphere(alpha2: string): Hemisphere | null;
52
+ /**
53
+ * Hemisphere of a country: north/south and east/west of the prime meridian/equator.
54
+ */
55
+ export interface Hemisphere {
56
+ /** "Northern" if centroid latitude ≥ 0, otherwise "Southern" */
57
+ ns: "Northern" | "Southern";
58
+ /** "Eastern" if centroid longitude ≥ 0, otherwise "Western" */
59
+ ew: "Eastern" | "Western";
60
+ }
61
+ /**
62
+ * A structured hint object for a geography guessing game.
63
+ *
64
+ * Given a player's guess and the secret target, produces all relevant hints.
65
+ */
66
+ export interface GeoHint {
67
+ /** Distance from guessed country centroid to target centroid (km) */
68
+ distanceKm: number;
69
+ /** Compass direction from guess toward target */
70
+ direction: CardinalDirection;
71
+ /** Whether the target is hotter, colder, or similar in temperature */
72
+ temperature: "hotter" | "colder" | "similar";
73
+ /** Whether the target is larger, smaller, or similar in area */
74
+ size: "larger" | "smaller" | "similar";
75
+ /** Hemisphere of the target country */
76
+ hemisphere: Hemisphere;
77
+ /** Whether the target is landlocked */
78
+ landlocked: boolean;
79
+ /** Climate zone of the target */
80
+ climate: ClimateZone;
81
+ }
82
+ /**
83
+ * Generate all geography game hints comparing a player's guess to the target.
84
+ *
85
+ * Returns `null` if either alpha-2 code is not found in the dataset.
86
+ *
87
+ * @example
88
+ * ```ts
89
+ * const hints = getGeoHints("NL", "DE");
90
+ * // {
91
+ * // distanceKm: 531,
92
+ * // direction: "E",
93
+ * // temperature: "similar",
94
+ * // size: "larger",
95
+ * // hemisphere: { ns: "Northern", ew: "Eastern" },
96
+ * // landlocked: false,
97
+ * // climate: "temperate",
98
+ * // }
99
+ * ```
100
+ */
101
+ export declare function getGeoHints(guessAlpha2: string, targetAlpha2: string): GeoHint | null;