soaring-symbols 0.1.0-alpha.8 → 0.2.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 (227) hide show
  1. package/AIRLINES.md +44 -8
  2. package/API.md +151 -62
  3. package/README.md +48 -35
  4. package/dist/airlines.json +2443 -575
  5. package/dist/assets/aer-lingus/icon.svg +1 -1
  6. package/dist/assets/aerolineas-argentinas/icon-mono.svg +1 -0
  7. package/dist/assets/aerolineas-argentinas/logo-mono.svg +1 -0
  8. package/dist/assets/aeromexico/icon-mono.svg +1 -0
  9. package/dist/assets/aeromexico/logo-mono.svg +1 -0
  10. package/dist/assets/air-algerie/icon-mono.svg +1 -0
  11. package/dist/assets/air-algerie/logo-mono.svg +1 -0
  12. package/dist/assets/air-arabia/icon-mono.svg +1 -0
  13. package/dist/assets/air-arabia/icon.svg +1 -0
  14. package/dist/assets/air-arabia/logo-mono.svg +1 -0
  15. package/dist/assets/air-arabia/logo.svg +1 -0
  16. package/dist/assets/air-astana/icon-mono.svg +1 -0
  17. package/dist/assets/air-astana/logo-mono.svg +1 -0
  18. package/dist/assets/air-astana/logo.svg +1 -0
  19. package/dist/assets/air-berlin/icon-mono.svg +1 -0
  20. package/dist/assets/air-berlin/icon.svg +1 -0
  21. package/dist/assets/air-berlin/logo-mono.svg +1 -0
  22. package/dist/assets/air-berlin/logo.svg +1 -0
  23. package/dist/assets/air-canada/icon-mono.svg +1 -0
  24. package/dist/assets/air-china/icon-mono.svg +1 -0
  25. package/dist/assets/air-china/icon.svg +1 -0
  26. package/dist/assets/air-china/logo-mono.svg +1 -0
  27. package/dist/assets/air-china/logo.svg +1 -0
  28. package/dist/assets/air-dolomiti/icon-mono.svg +1 -0
  29. package/dist/assets/air-dolomiti/logo-mono.svg +1 -0
  30. package/dist/assets/air-dolomiti/logo.svg +1 -0
  31. package/dist/assets/air-europa/icon-mono.svg +1 -0
  32. package/dist/assets/air-europa/logo-mono.svg +1 -0
  33. package/dist/assets/air-france/icon-mono.svg +1 -0
  34. package/dist/assets/air-mauritius/icon-mono.svg +1 -0
  35. package/dist/assets/air-mauritius/logo-mono.svg +1 -0
  36. package/dist/assets/air-new-zealand/icon-mono.svg +1 -0
  37. package/dist/assets/air-new-zealand/logo-mono.svg +1 -0
  38. package/dist/assets/air-serbia/icon-mono.svg +1 -0
  39. package/dist/assets/air-serbia/logo-mono.svg +1 -0
  40. package/dist/assets/air-transat/icon-mono.svg +1 -0
  41. package/dist/assets/airasia/logo-mono.svg +1 -0
  42. package/dist/assets/airbaltic/logo-mono.svg +1 -0
  43. package/dist/assets/akasa-air/icon-mono.svg +1 -0
  44. package/dist/assets/alaska-airlines/logo-mono.svg +1 -0
  45. package/dist/assets/all-nippon-airways/logo.svg +1 -0
  46. package/dist/assets/american-airlines/icon-mono.svg +1 -0
  47. package/dist/assets/american-airlines/icon.svg +1 -0
  48. package/dist/assets/american-airlines/logo-mono.svg +1 -0
  49. package/dist/assets/american-airlines/logo.svg +1 -0
  50. package/dist/assets/asiana-airlines/icon-mono.svg +1 -0
  51. package/dist/assets/austrian-airlines/icon-mono.svg +1 -0
  52. package/dist/assets/austrian-airlines/icon.svg +1 -0
  53. package/dist/assets/austrian-airlines/logo.svg +1 -0
  54. package/dist/assets/avianca/icon-mono.svg +1 -0
  55. package/dist/assets/avianca/logo-mono.svg +1 -0
  56. package/dist/assets/azul/icon.svg +1 -0
  57. package/dist/assets/azul/logo.svg +1 -0
  58. package/dist/assets/brussels-airlines/icon-mono.svg +1 -0
  59. package/dist/assets/cathay-pacific/icon-mono.svg +1 -0
  60. package/dist/assets/cathay-pacific/logo-mono.svg +1 -0
  61. package/dist/assets/cebu-pacific/icon-mono.svg +1 -0
  62. package/dist/assets/cebu-pacific/icon.svg +1 -0
  63. package/dist/assets/cebu-pacific/logo-mono.svg +1 -0
  64. package/dist/assets/cebu-pacific/logo.svg +1 -0
  65. package/dist/assets/china-airlines/icon.svg +1 -0
  66. package/dist/assets/china-airlines/logo.svg +1 -0
  67. package/dist/assets/china-eastern-airlines/icon.svg +1 -0
  68. package/dist/assets/china-eastern-airlines/logo.svg +1 -0
  69. package/dist/assets/china-southern-airlines/icon.svg +1 -0
  70. package/dist/assets/china-southern-airlines/logo-mono.svg +1 -0
  71. package/dist/assets/china-southern-airlines/logo.svg +1 -0
  72. package/dist/assets/china-southern-airlines/tail.svg +1 -0
  73. package/dist/assets/condor/icon-mono.svg +1 -0
  74. package/dist/assets/condor/icon.svg +1 -0
  75. package/dist/assets/condor/logo-mono.svg +1 -0
  76. package/dist/assets/condor/logo.svg +1 -0
  77. package/dist/assets/copa-airlines/icon-mono.svg +1 -0
  78. package/dist/assets/copa-airlines/logo-mono.svg +1 -0
  79. package/dist/assets/delta-air-lines/icon-mono.svg +1 -0
  80. package/dist/assets/delta-air-lines/icon.svg +1 -0
  81. package/dist/assets/delta-air-lines/logo-mono.svg +1 -0
  82. package/dist/assets/delta-air-lines/logo.svg +1 -0
  83. package/dist/assets/easyjet/icon.svg +1 -0
  84. package/dist/assets/easyjet/logo-mono.svg +1 -0
  85. package/dist/assets/easyjet/logo.svg +1 -0
  86. package/dist/assets/egyptair/icon-mono.svg +1 -0
  87. package/dist/assets/egyptair/icon.svg +1 -0
  88. package/dist/assets/egyptair/logo-mono.svg +1 -0
  89. package/dist/assets/egyptair/logo.svg +1 -0
  90. package/dist/assets/emirates/icon-mono.svg +1 -0
  91. package/dist/assets/emirates/logo-mono.svg +1 -0
  92. package/dist/assets/etihad-airways/logo-mono.svg +1 -0
  93. package/dist/assets/etihad-airways/logo.svg +1 -1
  94. package/dist/assets/eva-air/icon.svg +1 -0
  95. package/dist/assets/eva-air/logo-mono.svg +1 -0
  96. package/dist/assets/eva-air/logo.svg +1 -0
  97. package/dist/assets/eva-air/tail.svg +1 -0
  98. package/dist/assets/ewa-air/logo-mono.svg +1 -0
  99. package/dist/assets/fiji-airways/icon-mono.svg +1 -0
  100. package/dist/assets/fiji-airways/logo-mono.svg +1 -0
  101. package/dist/assets/fiji-airways/logo.svg +1 -0
  102. package/dist/assets/finnair/icon-mono.svg +1 -0
  103. package/dist/assets/finnair/icon.svg +1 -0
  104. package/dist/assets/finnair/logo-mono.svg +1 -0
  105. package/dist/assets/finnair/logo.svg +1 -0
  106. package/dist/assets/flybe/logo-mono.svg +1 -0
  107. package/dist/assets/flybe/logo.svg +1 -0
  108. package/dist/assets/flydubai/logo.svg +1 -0
  109. package/dist/assets/flynas/icon-mono.svg +1 -0
  110. package/dist/assets/flynas/logo-mono.svg +1 -0
  111. package/dist/assets/frontier-airlines/icon-mono.svg +1 -0
  112. package/dist/assets/frontier-airlines/icon.svg +1 -0
  113. package/dist/assets/frontier-airlines/logo-mono.svg +1 -0
  114. package/dist/assets/frontier-airlines/logo.svg +1 -0
  115. package/dist/assets/gol/icon.svg +1 -0
  116. package/dist/assets/gol/logo.svg +1 -0
  117. package/dist/assets/hainan-airlines/icon-mono.svg +1 -0
  118. package/dist/assets/hainan-airlines/icon.svg +1 -0
  119. package/dist/assets/hainan-airlines/logo-mono.svg +1 -0
  120. package/dist/assets/hainan-airlines/logo.svg +1 -0
  121. package/dist/assets/hawaiian-airlines/icon.svg +1 -0
  122. package/dist/assets/hawaiian-airlines/logo.svg +1 -0
  123. package/dist/assets/icelandair/icon-mono.svg +1 -0
  124. package/dist/assets/icelandair/logo-mono.svg +1 -0
  125. package/dist/assets/icelandair/tail-mono.svg +1 -0
  126. package/dist/assets/indigo/icon-mono.svg +1 -0
  127. package/dist/assets/indigo/logo-mono.svg +1 -0
  128. package/dist/assets/ita-airways/logo.svg +1 -0
  129. package/dist/assets/japan-airlines/icon-mono.svg +1 -0
  130. package/dist/assets/jet2com/icon-mono.svg +1 -0
  131. package/dist/assets/jet2com/icon.svg +1 -0
  132. package/dist/assets/jet2com/logo-mono.svg +1 -0
  133. package/dist/assets/jet2com/logo.svg +1 -0
  134. package/dist/assets/jetblue-airways/logo-mono.svg +1 -0
  135. package/dist/assets/jetblue-airways/logo.svg +1 -0
  136. package/dist/assets/jetstar/icon-mono.svg +1 -0
  137. package/dist/assets/jetstar/icon.svg +1 -1
  138. package/dist/assets/jetstar/logo-mono.svg +1 -1
  139. package/dist/assets/jetstar/logo.svg +1 -1
  140. package/dist/assets/kenya-airways/icon-mono.svg +1 -0
  141. package/dist/assets/kenya-airways/logo-mono.svg +1 -0
  142. package/dist/assets/klm/icon-mono.svg +1 -0
  143. package/dist/assets/klm/logo-mono.svg +1 -0
  144. package/dist/assets/korean-air/icon-mono.svg +1 -0
  145. package/dist/assets/korean-air/logo-mono.svg +1 -0
  146. package/dist/assets/kuwait-airways/icon-mono.svg +1 -0
  147. package/dist/assets/kuwait-airways/logo-mono.svg +1 -0
  148. package/dist/assets/lion-air/icon-mono.svg +1 -0
  149. package/dist/assets/lion-air/icon.svg +1 -0
  150. package/dist/assets/lion-air/logo-mono.svg +1 -0
  151. package/dist/assets/lion-air/logo.svg +1 -0
  152. package/dist/assets/lot-polish-airlines/icon-mono.svg +1 -0
  153. package/dist/assets/lot-polish-airlines/logo-mono.svg +1 -0
  154. package/dist/assets/lufthansa/icon-mono.svg +1 -0
  155. package/dist/assets/lufthansa/logo-mono.svg +1 -0
  156. package/dist/assets/malaysia-airlines/icon-mono.svg +1 -0
  157. package/dist/assets/malaysia-airlines/logo-mono.svg +1 -0
  158. package/dist/assets/myanmar-national-airlines/icon-mono.svg +1 -0
  159. package/dist/assets/norwegian-air-shuttle/icon.svg +1 -0
  160. package/dist/assets/norwegian-air-shuttle/logo-mono.svg +1 -0
  161. package/dist/assets/norwegian-air-shuttle/logo.svg +1 -0
  162. package/dist/assets/pacific-airlines/icon-mono.svg +1 -0
  163. package/dist/assets/pacific-airlines/icon.svg +1 -0
  164. package/dist/assets/pacific-airlines/logo-mono.svg +1 -0
  165. package/dist/assets/pacific-airlines/logo.svg +1 -0
  166. package/dist/assets/paranair/icon-mono.svg +1 -0
  167. package/dist/assets/peach-aviation/logo-mono.svg +1 -0
  168. package/dist/assets/pegasus-airlines/icon-mono.svg +1 -0
  169. package/dist/assets/pegasus-airlines/icon.svg +1 -0
  170. package/dist/assets/pegasus-airlines/logo-mono.svg +1 -0
  171. package/dist/assets/pegasus-airlines/logo.svg +1 -0
  172. package/dist/assets/qantas/logo.svg +1 -0
  173. package/dist/assets/riyadh-air/icon-mono.svg +1 -0
  174. package/dist/assets/riyadh-air/logo-mono.svg +1 -0
  175. package/dist/assets/royal-air-maroc/icon-mono.svg +1 -0
  176. package/dist/assets/royal-air-maroc/logo-mono.svg +1 -0
  177. package/dist/assets/ryanair/icon-mono.svg +1 -0
  178. package/dist/assets/saudia/icon-mono.svg +1 -0
  179. package/dist/assets/saudia/logo-mono.svg +1 -0
  180. package/dist/assets/saudia/logo.svg +1 -0
  181. package/dist/assets/scandinavian-airlines/logo-mono.svg +1 -0
  182. package/dist/assets/singapore-airlines/icon-mono.svg +1 -0
  183. package/dist/assets/spirit-airlines/logo-mono.svg +1 -0
  184. package/dist/assets/spirit-airlines/logo.svg +1 -0
  185. package/dist/assets/sun-phuquoc-airways/icon-mono.svg +1 -0
  186. package/dist/assets/swiss/icon-mono.svg +1 -0
  187. package/dist/assets/swiss/logo-mono.svg +1 -0
  188. package/dist/assets/tarom/icon-mono.svg +1 -0
  189. package/dist/assets/tarom/logo-mono.svg +1 -0
  190. package/dist/assets/tarom/tail-mono.svg +1 -0
  191. package/dist/assets/thai-airways/logo-mono.svg +1 -0
  192. package/dist/assets/thai-airways/logo.svg +1 -0
  193. package/dist/assets/transavia/icon-mono.svg +1 -0
  194. package/dist/assets/transavia/logo-mono.svg +1 -0
  195. package/dist/assets/united-airlines/icon-mono.svg +1 -0
  196. package/dist/assets/united-airlines/logo-mono.svg +1 -0
  197. package/dist/assets/vietjet-air/logo-mono.svg +1 -0
  198. package/dist/assets/vietjet-air/logo.svg +1 -1
  199. package/dist/assets/vietnam-airlines/icon-mono.svg +1 -0
  200. package/dist/assets/vietravel-airlines/icon-mono.svg +1 -0
  201. package/dist/assets/vietravel-airlines/icon.svg +1 -0
  202. package/dist/assets/vietravel-airlines/logo-mono.svg +1 -0
  203. package/dist/assets/vietravel-airlines/logo.svg +1 -0
  204. package/dist/assets/virgin-australia/icon-mono.svg +1 -0
  205. package/dist/assets/viva/icon-mono.svg +1 -0
  206. package/dist/assets/viva/icon.svg +1 -0
  207. package/dist/assets/viva/logo-mono.svg +1 -0
  208. package/dist/assets/viva/logo.svg +1 -0
  209. package/dist/assets/volaris/icon.svg +1 -0
  210. package/dist/assets/volaris/logo.svg +1 -0
  211. package/dist/assets/volotea/icon-mono.svg +1 -0
  212. package/dist/assets/volotea/icon.svg +1 -0
  213. package/dist/assets/volotea/logo-mono.svg +1 -0
  214. package/dist/assets/volotea/logo.svg +1 -0
  215. package/dist/assets/vueling/logo.svg +1 -0
  216. package/dist/assets/wizz-air/logo-mono.svg +1 -0
  217. package/dist/assets/xiamenair/icon-mono.svg +1 -0
  218. package/dist/index.cjs +45 -62
  219. package/dist/index.d.cts +63 -0
  220. package/dist/index.d.ts +52 -41
  221. package/dist/index.js +46 -67
  222. package/dist/svg-validator.cjs +164 -0
  223. package/dist/svg-validator.d.cts +11 -0
  224. package/dist/svg-validator.d.ts +11 -0
  225. package/dist/svg-validator.js +162 -0
  226. package/package.json +46 -14
  227. package/dist/utils/index.js +0 -63
package/AIRLINES.md CHANGED
@@ -10,9 +10,12 @@ This file provides an overview of the airlines included in the Soaring Symbols p
10
10
  | [Aeroméxico](https://www.aeromexico.com) 🇲🇽 | MX | AM | AMX | SkyTeam | ![#020c41](https://place-hold.it/10x10/020c41/020c41.png) | ✅ | ✅ | |
11
11
  | [Air Albania](https://www.airalbania.com.al) 🇦🇱 | AL | ZB | ABN | | ![#ce1f2e](https://place-hold.it/10x10/ce1f2e/ce1f2e.png) | ✅ | ✅ | |
12
12
  | [Air Algérie](https://airalgerie.dz) 🇩🇿 | DZ | AH | DAH | | ![#e2231a](https://place-hold.it/10x10/e2231a/e2231a.png) | ✅ | ✅ | |
13
- | [Air Astana](https://airastana.com) 🇰🇿 | KZ | KC | KZR | | ![#a48c5d](https://place-hold.it/10x10/a48c5d/a48c5d.png) | ✅ | | |
13
+ | [Air Arabia](https://www.airarabia.com) | AE | G9 | ABY | | ![#ed1b48](https://place-hold.it/10x10/ed1b48/ed1b48.png) | ✅ | ✅ | |
14
+ | [Air Astana](https://airastana.com) 🇰🇿 | KZ | KC | KZR | | ![#a48c5d](https://place-hold.it/10x10/a48c5d/a48c5d.png) | ✅ | ✅ | |
15
+ | [Air Berlin](https://www.airberlin.com) | DE | AB | BER | oneworld | ![#cc2234](https://place-hold.it/10x10/cc2234/cc2234.png) | ✅ | ✅ | |
14
16
  | [Air Canada](https://www.aircanada.com) 🇨🇦 | CA | AC | ACA | Star Alliance | ![#f01428](https://place-hold.it/10x10/f01428/f01428.png) | ✅ | ✅ | |
15
- | [Air Dolomiti](https://www.airdolomiti.eu) | IT | EN | DLA | | ![#009eb3](https://place-hold.it/10x10/009eb3/009eb3.png) | ✅ | | |
17
+ | [Air China](https://www.airchina.com) 🇨🇳 | CN | CA | CCA | Star Alliance | ![#ED1C24](https://place-hold.it/10x10/ED1C24/ED1C24.png) | ✅ | ✅ | |
18
+ | [Air Dolomiti](https://www.airdolomiti.eu) | IT | EN | DLA | | ![#009eb3](https://place-hold.it/10x10/009eb3/009eb3.png) | ✅ | ✅ | |
16
19
  | [Air Europa](https://www.aireuropa.com) | ES | UX | AEA | SkyTeam | ![#006fde](https://place-hold.it/10x10/006fde/006fde.png) | ✅ | ✅ | |
17
20
  | [Air France](https://airfrance.com) 🇫🇷 | FR | AF | AFR | SkyTeam | ![#051039](https://place-hold.it/10x10/051039/051039.png) | ✅ | ✅ | |
18
21
  | [Air India](https://www.airindia.com) 🇮🇳 | IN | AI | AIC | Star Alliance | ![#da0e29](https://place-hold.it/10x10/da0e29/da0e29.png) | ✅ | ✅ | |
@@ -28,33 +31,56 @@ This file provides an overview of the airlines included in the Soaring Symbols p
28
31
  | [airBaltic](https://www.airbaltic.com) 🇱🇻 | LV | BT | BTI | | ![#152649](https://place-hold.it/10x10/152649/152649.png) | | ✅ | |
29
32
  | [Akasa Air](https://www.akasaair.com) | IN | QP | AKJ | | ![#ff6300](https://place-hold.it/10x10/ff6300/ff6300.png) | ✅ | ✅ | |
30
33
  | [Alaska Airlines](https://www.alaskaair.com) | US | AS | ASA | oneworld | ![#01426a](https://place-hold.it/10x10/01426a/01426a.png) | | ✅ | |
34
+ | [All Nippon Airways](https://www.ana.co.jp) | JP | NH | ANA | Star Alliance | ![#00146e](https://place-hold.it/10x10/00146e/00146e.png) | | ☑️ | |
35
+ | [American Airlines](https://www.aa.com) | US | AA | AAL | oneworld | ![#0078d2](https://place-hold.it/10x10/0078d2/0078d2.png) | ✅ | ✅ | |
31
36
  | [Asiana Airlines](https://flyasiana.com) | KR | OZ | AAR | Star Alliance | ![#4a4f54](https://place-hold.it/10x10/4a4f54/4a4f54.png) | ✅ | ✅ | |
32
37
  | [Atlantic Airways](https://www.atlanticairways.com) 🇫🇴 | FO | RC | FLI | | ![#004c93](https://place-hold.it/10x10/004c93/004c93.png) | ✅ | ✅ | |
38
+ | [Austrian Airlines](https://www.austrian.com) 🇦🇹 | AT | OS | AUA | Star Alliance | ![#d81824](https://place-hold.it/10x10/d81824/d81824.png) | ✅ | ☑️ | |
33
39
  | [avianca](https://www.avianca.com) 🇨🇴 | CO | AV | AVA | Star Alliance | ![#ff0000](https://place-hold.it/10x10/ff0000/ff0000.png) | ✅ | ✅ | |
34
40
  | Avianca Costa Rica 🇨🇷 | CR | LR | LRC | | ![#ff0000](https://place-hold.it/10x10/ff0000/ff0000.png) | ✅ | ✅ | |
35
41
  | Avianca Ecuador | EC | 2K | GLG | | ![#ff0000](https://place-hold.it/10x10/ff0000/ff0000.png) | ✅ | ✅ | |
36
42
  | Avianca El Salvador 🇸🇻 | SV | TA | TAI | | ![#ff0000](https://place-hold.it/10x10/ff0000/ff0000.png) | ✅ | ✅ | |
37
43
  | [Azerbaijan Airlines](https://azal.az) 🇦🇿 | AZ | J2 | AHY | | ![#082e6a](https://place-hold.it/10x10/082e6a/082e6a.png) | ✅ | ✅ | |
44
+ | [Azul](https://www.voeazul.com.br) | BR | AD | AZU | | ![#005baa](https://place-hold.it/10x10/005baa/005baa.png) | ☑️ | ☑️ | |
38
45
  | [Bamboo Airways](https://www.bambooairways.com) | VN | QH | BAV | | ![#64ae53](https://place-hold.it/10x10/64ae53/64ae53.png) | ☑️ | ☑️ | |
39
46
  | [Bangkok Airways](https://www.bangkokair.com) | TH | PG | BKP | | ![#000f8f](https://place-hold.it/10x10/000f8f/000f8f.png) | ✅ | ✅ | |
40
47
  | [British Airways](https://www.britishairways.com) 🇬🇧 | GB | BA | BAW | oneworld | ![#2e5c99](https://place-hold.it/10x10/2e5c99/2e5c99.png) | ✅ | ✅ | |
41
48
  | [Brussels Airlines](https://www.brusselsairlines.com) 🇧🇪 | BE | SN | BEL | Star Alliance | ![#051446](https://place-hold.it/10x10/051446/051446.png) | ✅ | ✅ | |
42
49
  | [Cathay Pacific](https://www.cathaypacific.com) 🇭🇰 | HK | CX | CPA | oneworld | ![#005d63](https://place-hold.it/10x10/005d63/005d63.png) | ✅ | ✅ | |
50
+ | [Cebu Pacific](https://www.cebupacificair.com) | PH | 5J | CEB | | ![#0096d6](https://place-hold.it/10x10/0096d6/0096d6.png) | ✅ | ✅ | |
51
+ | [China Airlines](https://www.china-airlines.com) 🇹🇼 | TW | CI | CAL | SkyTeam | ![#2b3088](https://place-hold.it/10x10/2b3088/2b3088.png) | ☑️ | ☑️ | |
52
+ | [China Eastern Airlines](https://www.ceair.com) | CN | MU | CES | SkyTeam | ![#1a4fa3](https://place-hold.it/10x10/1a4fa3/1a4fa3.png) | ☑️ | ☑️ | |
53
+ | [China Southern Airlines](https://www.csair.com) | CN | CZ | CSN | | ![#0093D0](https://place-hold.it/10x10/0093D0/0093D0.png) | ☑️ | ✅ | ☑️ |
54
+ | [Condor](https://www.condor.com) | DE | DE | CFG | | ![#000000](https://place-hold.it/10x10/000000/000000.png) | ✅ | ✅ | |
43
55
  | [Copa Airlines](https://www.copaair.com) 🇵🇦 | PA | CM | CMP | Star Alliance | ![#0032a0](https://place-hold.it/10x10/0032a0/0032a0.png) | ✅ | ✅ | |
56
+ | [Delta Air Lines](https://www.delta.com) | US | DL | DAL | SkyTeam | ![#E31837](https://place-hold.it/10x10/E31837/E31837.png) | ✅ | ✅ | |
57
+ | [easyJet](https://www.easyjet.com) | GB | U2 | EZY | | ![#ff6600](https://place-hold.it/10x10/ff6600/ff6600.png) | ☑️ | ✅ | |
58
+ | [EgyptAir](https://www.egyptair.com) 🇪🇬 | EG | MS | MSR | Star Alliance | ![#002855](https://place-hold.it/10x10/002855/002855.png) | ✅ | ✅ | |
44
59
  | [Emirates](https://www.emirates.com) 🇦🇪 | AE | EK | UAE | | ![#d71921](https://place-hold.it/10x10/d71921/d71921.png) | ✅ | ✅ | |
45
60
  | [Ethiopian Airlines](https://www.ethiopianairlines.com) 🇪🇹 | ET | ET | ETH | Star Alliance | ![#b71d20](https://place-hold.it/10x10/b71d20/b71d20.png) | ✅ | ✅ | |
46
61
  | [Etihad Airways](https://www.etihad.com) 🇦🇪 | AE | EY | ETD | | ![#bd8b13](https://place-hold.it/10x10/bd8b13/bd8b13.png) | | ✅ | |
47
62
  | [Eurowings](https://www.eurowings.com) | DE | EW | EWG | | ![#7c2045](https://place-hold.it/10x10/7c2045/7c2045.png) | ✅ | ✅ | |
63
+ | [EVA Air](https://www.evaair.com) | TW | BR | EVA | Star Alliance | ![#00a64f](https://place-hold.it/10x10/00a64f/00a64f.png) | ☑️ | ✅ | ☑️ |
48
64
  | [Ewa Air](https://ewa-air.com) | FR | ZD | EWR | | ![#e1251b](https://place-hold.it/10x10/e1251b/e1251b.png) | | ✅ | |
49
- | [Fiji Airways](https://www.fijiairways.com) 🇫🇯 | FJ | FJ | FJI | oneworld | ![#473729](https://place-hold.it/10x10/473729/473729.png) | ✅ | | |
65
+ | [Fiji Airways](https://www.fijiairways.com) 🇫🇯 | FJ | FJ | FJI | oneworld | ![#473729](https://place-hold.it/10x10/473729/473729.png) | ✅ | ✅ | |
66
+ | [Finnair](http://www.finnair.com) 🇫🇮 | FI | AY | FIN | oneworld | ![#0c0243](https://place-hold.it/10x10/0c0243/0c0243.png) | ✅ | ✅ | |
50
67
  | [Firefly](https://www.fireflyz.com.my) | MY | FY | FFM | | ![#ef5713](https://place-hold.it/10x10/ef5713/ef5713.png) | ✅ | ✅ | |
68
+ | [Flybe](https://www.flybe.com) | GB | BE | BEE | | ![#5a3f99](https://place-hold.it/10x10/5a3f99/5a3f99.png) | | ✅ | |
69
+ | [flydubai](https://www.flydubai.com) | AE | FZ | FDB | | ![#ff8200](https://place-hold.it/10x10/ff8200/ff8200.png) | | ☑️ | |
51
70
  | [flynas](https://www.flynas.com) | SA | XY | KNE | | ![#00b7ac](https://place-hold.it/10x10/00b7ac/00b7ac.png) | ✅ | ✅ | |
71
+ | [Frontier Airlines](https://www.flyfrontier.com) | US | F9 | FFT | | ![#008c44](https://place-hold.it/10x10/008c44/008c44.png) | ✅ | ✅ | |
52
72
  | [Garuda Indonesia](https://www.garuda-indonesia.com) 🇮🇩 | ID | GA | GIA | SkyTeam | ![#002560](https://place-hold.it/10x10/002560/002560.png) | ✅ | ✅ | |
73
+ | [GOL](https://www.voegol.com.br) | BR | G3 | GLO | | ![#f58220](https://place-hold.it/10x10/f58220/f58220.png) | ☑️ | ☑️ | |
74
+ | [Hainan Airlines](https://www.hainanairlines.com) | CN | HU | CHH | | ![#d71920](https://place-hold.it/10x10/d71920/d71920.png) | ✅ | ✅ | |
75
+ | [Hawaiian Airlines](https://www.hawaiianairlines.com) | US | HA | HAL | oneworld | ![#4e2582](https://place-hold.it/10x10/4e2582/4e2582.png) | ☑️ | ☑️ | |
53
76
  | [HK Express](https://www.hkexpress.com) | HK | UO | HKE | | ![#702b91](https://place-hold.it/10x10/702b91/702b91.png) | ✅ | ✅ | |
54
- | [Iberia](https://www.iberia.com) 🇪🇸 | ES | IB | IBE | oneworld | | ☑️ | ☑️ | |
77
+ | [Iberia](https://www.iberia.com) 🇪🇸 | ES | IB | IBE | oneworld | | ✅ | ✅ | |
55
78
  | [Icelandair](https://www.icelandair.com) 🇮🇸 | IS | FI | ICE | | ![#0c0243](https://place-hold.it/10x10/0c0243/0c0243.png) | ✅ | ✅ | ✅ |
56
79
  | [IndiGo](https://www.goindigo.in) | IN | 6E | IGO | | ![#001b94](https://place-hold.it/10x10/001b94/001b94.png) | ✅ | ✅ | |
80
+ | [ITA Airways](https://www.ita-airways.com) 🇮🇹 | IT | AZ | ITY | Star Alliance | ![#006643](https://place-hold.it/10x10/006643/006643.png) | | ☑️ | |
57
81
  | [Japan Airlines](https://www.jal.co.jp) 🇯🇵 | JP | JL | JAL | oneworld | ![#e50012](https://place-hold.it/10x10/e50012/e50012.png) | ✅ | ✅ | |
82
+ | [Jet2.com](https://www.jet2.com) | GB | LS | EXS | | ![#d71920](https://place-hold.it/10x10/d71920/d71920.png) | ✅ | ✅ | |
83
+ | [JetBlue Airways](https://www.jetblue.com) | US | B6 | JBU | | ![#003876](https://place-hold.it/10x10/003876/003876.png) | | ✅ | |
58
84
  | [Jetstar](https://www.jetstar.com) | AU | JQ | JST | | ![#ff5111](https://place-hold.it/10x10/ff5111/ff5111.png) | ✅ | ✅ | |
59
85
  | Jetstar Japan | JP | GK | JJP | | ![#ff5111](https://place-hold.it/10x10/ff5111/ff5111.png) | ✅ | ✅ | |
60
86
  | [Kenya Airways](https://www.kenya-airways.com) 🇰🇪 | KE | KQ | KQA | SkyTeam | ![#ed1c24](https://place-hold.it/10x10/ed1c24/ed1c24.png) | ✅ | ✅ | |
@@ -67,40 +93,50 @@ This file provides an overview of the airlines included in the Soaring Symbols p
67
93
  | LATAM Airlines Ecuador | EC | XL | LNE | | ![#1b0088](https://place-hold.it/10x10/1b0088/1b0088.png) | ✅ | ✅ | |
68
94
  | LATAM Airlines Perú | PE | LP | LPE | | ![#1b0088](https://place-hold.it/10x10/1b0088/1b0088.png) | ✅ | ✅ | |
69
95
  | LATAM Airlines Paraguay | PY | PZ | LAP | | ![#1b0088](https://place-hold.it/10x10/1b0088/1b0088.png) | ✅ | ✅ | |
96
+ | [Lion Air](https://www.lionair.co.id) | ID | JT | LNI | | ![#ed1b2f](https://place-hold.it/10x10/ed1b2f/ed1b2f.png) | ✅ | ✅ | |
70
97
  | [LOT Polish Airlines](https://www.lot.com) 🇵🇱 | PL | LO | LOT | Star Alliance | ![#252668](https://place-hold.it/10x10/252668/252668.png) | ✅ | ✅ | |
71
98
  | [Lufthansa](https://www.lufthansa.com) 🇩🇪 | DE | LH | DLH | Star Alliance | ![#05164d](https://place-hold.it/10x10/05164d/05164d.png) | ✅ | ✅ | |
72
99
  | [Malaysia Airlines](https://www.malaysiaairlines.com) 🇲🇾 | MY | MH | MAS | oneworld | ![#174887](https://place-hold.it/10x10/174887/174887.png) | ✅ | ✅ | |
73
100
  | [Myanmar National Airlines](https://www.flymna.com) 🇲🇲 | MM | UB | UBA | | ![#fdb515](https://place-hold.it/10x10/fdb515/fdb515.png) | ✅ | ✅ | |
101
+ | [Norwegian Air Shuttle](https://www.norwegian.com) | NO | DY | NOZ | | ![#d81939](https://place-hold.it/10x10/d81939/d81939.png) | ☑️ | ✅ | |
74
102
  | [Oman Air](https://www.omanair.com) 🇴🇲 | OM | WY | OMA | oneworld | ![#b39759](https://place-hold.it/10x10/b39759/b39759.png) | ✅ | ✅ | |
103
+ | [Pacific Airlines](https://www.pacificairlines.com) | VN | BL | PIC | | ![#324471](https://place-hold.it/10x10/324471/324471.png) | ✅ | ✅ | |
75
104
  | [Paranair](https://www.paranair.com) | PY | ZP | AZP | | ![#0037a2](https://place-hold.it/10x10/0037a2/0037a2.png) | ✅ | ✅ | |
76
105
  | [Peach Aviation](https://www.flypeach.com) | JP | MM | APJ | | ![#9b308c](https://place-hold.it/10x10/9b308c/9b308c.png) | | ✅ | |
106
+ | [Pegasus Airlines](https://www.flypgs.com) | TR | PC | PGT | | ![#fdb913](https://place-hold.it/10x10/fdb913/fdb913.png) | ✅ | ✅ | |
77
107
  | [Philippine Airlines](https://www.philippineairlines.com) 🇵🇭 | PH | PR | PAL | | ![#001f60](https://place-hold.it/10x10/001f60/001f60.png) | ✅ | ✅ | |
78
- | [Qantas](https://www.qantas.com) 🇦🇺 | AU | QF | QFA | oneworld | | ✅ | ✅ | |
108
+ | [Qantas](https://www.qantas.com) 🇦🇺 | AU | QF | QFA | oneworld | | ☑️ | ✅ | |
79
109
  | [Qatar Airways](https://www.qatarairways.com) 🇶🇦 | QA | QR | QTR | oneworld | ![#662046](https://place-hold.it/10x10/662046/662046.png) | ✅ | ✅ | |
80
110
  | [Riyadh Air](https://www.riyadhair.com) 🇸🇦 | SA | RX | RXI | | ![#240852](https://place-hold.it/10x10/240852/240852.png) | ✅ | ✅ | |
81
111
  | [Royal Air Maroc](https://www.royalairmaroc.com) 🇲🇦 | MA | AT | RAM | SkyTeam | ![#c20831](https://place-hold.it/10x10/c20831/c20831.png) | ✅ | ✅ | ☑️ |
82
112
  | [Royal Brunei Airlines](https://www.flyroyalbrunei.com) | BN | BI | RBA | | ![#ffe600](https://place-hold.it/10x10/ffe600/ffe600.png) | | ☑️ | |
83
113
  | [Ryanair](https://www.ryanair.com) | IE | FR | RYR | | ![#073590](https://place-hold.it/10x10/073590/073590.png) | ✅ | ✅ | |
84
- | [Saudia](https://www.saudia.com) 🇸🇦 | SA | SV | SVA | SkyTeam | ![#0a6937](https://place-hold.it/10x10/0a6937/0a6937.png) | ✅ | | |
114
+ | [Saudia](https://www.saudia.com) 🇸🇦 | SA | SV | SVA | SkyTeam | ![#0a6937](https://place-hold.it/10x10/0a6937/0a6937.png) | ✅ | ✅ | |
85
115
  | [Scandinavian Airlines](https://www.flysas.com) 🇩🇰 🇳🇴 🇸🇪 | DK,NO,SE | SK | SAS | Star Alliance | ![#000099](https://place-hold.it/10x10/000099/000099.png) | | ✅ | |
86
116
  | SAS Connect | IE | SL | SZS | | ![#000099](https://place-hold.it/10x10/000099/000099.png) | | ✅ | |
87
117
  | [Scoot](https://www.flyscoot.com) | SG | TR | TGW | Value Alliance | ![#ffe900](https://place-hold.it/10x10/ffe900/ffe900.png) | | ☑️ | |
88
118
  | [Singapore Airlines](https://www.singaporeair.com) 🇸🇬 | SG | SQ | SIA | Star Alliance | ![#232f67](https://place-hold.it/10x10/232f67/232f67.png) | ✅ | ✅ | |
89
- | [Southwest Airlines](https://www.southwest.com) | US | WN | SWA | | ![#304cb2](https://place-hold.it/10x10/304cb2/304cb2.png) | ✅ | ☑️ | |
119
+ | [Southwest Airlines](https://www.southwest.com) | US | WN | SWA | | ![#304cb2](https://place-hold.it/10x10/304cb2/304cb2.png) | ☑️ | ☑️ | |
120
+ | [Spirit Airlines](https://www.spirit.com) | US | NK | NKS | | ![#ffec00](https://place-hold.it/10x10/ffec00/ffec00.png) | | ✅ | |
90
121
  | [Starlux Airlines](https://www.starlux-airlines.com) | TW | JX | SJX | | ![#996a4e](https://place-hold.it/10x10/996a4e/996a4e.png) | ✅ | ✅ | |
91
122
  | [Sun PhuQuoc Airways](https://www.sunphuquocairways.com) | VN | 9G | SPQ | | ![#ca1c2a](https://place-hold.it/10x10/ca1c2a/ca1c2a.png) | ✅ | ✅ | |
92
123
  | [SWISS](https://www.swiss.com) 🇨🇭 | CH | LX | SWR | Star Alliance | ![#cf0a2c](https://place-hold.it/10x10/cf0a2c/cf0a2c.png) | ✅ | ✅ | |
93
124
  | [T'way Air](https://www.twayair.com) | KR | TW | TWB | | ![#d22c25](https://place-hold.it/10x10/d22c25/d22c25.png) | | ✅ | |
94
125
  | [TAP Air Portugal](https://www.tapairportugal.com) 🇵🇹 | PT | TP | TAP | Star Alliance | ![#bfd730](https://place-hold.it/10x10/bfd730/bfd730.png) | ☑️ | ☑️ | |
95
126
  | [TAROM](https://www.tarom.ro) 🇷🇴 | RO | RO | ROT | SkyTeam | ![#003366](https://place-hold.it/10x10/003366/003366.png) | ✅ | ✅ | ✅ |
96
- | [Thai Airways](https://www.thaiairways.com) 🇹🇭 | TH | TG | THA | Star Alliance | ![#306](https://place-hold.it/10x10/306/306.png) | ☑️ | | |
127
+ | [Thai Airways](https://www.thaiairways.com) 🇹🇭 | TH | TG | THA | Star Alliance | ![#306](https://place-hold.it/10x10/306/306.png) | ☑️ | ✅ | |
97
128
  | [Transavia](https://www.transavia.com) | NL | HV | TRA | | ![#00d66c](https://place-hold.it/10x10/00d66c/00d66c.png) | ✅ | ✅ | |
98
129
  | [Turkish Airlines](https://www.turkishairlines.com) 🇹🇷 | TR | TK | THY | Star Alliance | ![#c90019](https://place-hold.it/10x10/c90019/c90019.png) | ✅ | ✅ | |
99
130
  | [United Airlines](https://www.united.com) | US | UA | UAL | Star Alliance | ![#1414d2](https://place-hold.it/10x10/1414d2/1414d2.png) | ✅ | ✅ | |
100
131
  | [VietJet Air](https://www.vietjetair.com) | VN | VJ | VJC | | ![#e12127](https://place-hold.it/10x10/e12127/e12127.png) | | ✅ | |
101
132
  | [Vietnam Airlines](https://www.vietnamairlines.com) 🇻🇳 | VN | VN | HVN | SkyTeam | ![#d99e09](https://place-hold.it/10x10/d99e09/d99e09.png) | ✅ | ✅ | |
133
+ | [Vietravel Airlines](https://www.vietravelairlines.com) | VN | VU | VAG | | ![#0066b3](https://place-hold.it/10x10/0066b3/0066b3.png) | ✅ | ✅ | |
102
134
  | [Virgin Atlantic](https://www.virginatlantic.com) | GB | VS | VIR | SkyTeam | ![#da0530](https://place-hold.it/10x10/da0530/da0530.png) | ✅ | ✅ | |
103
135
  | [Virgin Australia](https://www.virginaustralia.com) | AU | VA | VOZ | | ![#e31e23](https://place-hold.it/10x10/e31e23/e31e23.png) | ✅ | ✅ | |
136
+ | [Viva](https://www.vivaaerobus.com) | MX | VB | VIV | | ![#00ae44](https://place-hold.it/10x10/00ae44/00ae44.png) | ✅ | ✅ | |
137
+ | [Volaris](https://www.volaris.com) | MX | Y4 | VOI | | ![#5b2d82](https://place-hold.it/10x10/5b2d82/5b2d82.png) | ☑️ | ☑️ | |
138
+ | [Volotea](https://www.volotea.com) | ES | V7 | VOE | | ![#ed164a](https://place-hold.it/10x10/ed164a/ed164a.png) | ✅ | ✅ | |
139
+ | [Vueling](https://www.vueling.com) | ES | VY | VLG | | ![#ffcc00](https://place-hold.it/10x10/ffcc00/ffcc00.png) | | ☑️ | |
104
140
  | [WestJet](https://www.westjet.com) | CA | WS | WJA | | ![#00aaa6](https://place-hold.it/10x10/00aaa6/00aaa6.png) | ✅ | ✅ | |
105
141
  | [Wizz Air](https://www.wizzair.com) | HU | W6 | WZZ | | ![#c6007e](https://place-hold.it/10x10/c6007e/c6007e.png) | | ✅ | |
106
142
  | Wizz Air Abu Dhabi | AE | 5W | WAZ | | ![#c6007e](https://place-hold.it/10x10/c6007e/c6007e.png) | | ✅ | |
package/API.md CHANGED
@@ -1,46 +1,91 @@
1
1
  # Soaring Symbols: API Reference
2
2
 
3
- This document details the functions exported by the `soaring-symbols` package and the data structures they return.
3
+ This document details the functions exported by the `soaring-symbols` package and the data structures they return. Upgrading from `0.1.0-alpha.14` or earlier? See [Migrating from the old API](#migrating-from-the-old-api).
4
+
5
+ ```js
6
+ import { listAirlines, getAirline, getAssetPath } from 'soaring-symbols'
7
+ ```
8
+
9
+ The package works in both ESM (`import`) and CommonJS (`require`). The library itself only reads the bundled `airlines.json`, so it runs in Node, in the browser and in edge runtimes alike.
4
10
 
5
11
  ## Functions
6
12
 
7
13
  ### `listAirlines()`
8
14
 
9
- Returns an array of all airline objects.
15
+ Returns every airline, sorted by name.
16
+
17
+ - **Returns:** `Airline[]` (see [Airline](#airline))
18
+
19
+ The array is a fresh copy on each call, so you can sort or filter it in place. The airline objects inside are frozen; copy one (`{ ...airline }`) before changing it.
20
+
21
+ ```js
22
+ const all = listAirlines()
23
+ const skyTeam = all.filter((airline) => airline.alliance === 'SkyTeam')
24
+ ```
25
+
26
+ ### `getAirline(query)`
10
27
 
11
- - **Returns:** `Airline[]`
28
+ Finds one airline. `query` is matched, ignoring case and surrounding whitespace, against the IATA code, then the ICAO code, then the slug, then the full name.
12
29
 
13
- ### `getAirline(identifier)`
30
+ - **Argument:** `query` (string)
31
+ - **Returns:** `Airline`, or `undefined` if nothing matches.
14
32
 
15
- Retrieves a single airline object. The `identifier` can be the airline's IATA code, ICAO code, full name, or URL-friendly slug.
33
+ ```js
34
+ // All of these find Vietnam Airlines
35
+ getAirline('VN')
36
+ getAirline('hvn')
37
+ getAirline('vietnam-airlines')
38
+ getAirline('Vietnam Airlines')
39
+
40
+ getAirline('XX') // undefined
41
+ ```
42
+
43
+ ### `getAssetPath(airline, type, options?)`
44
+
45
+ Returns the package path of one SVG file, ready to pass to `require.resolve`, `import.meta.resolve` or your bundler.
16
46
 
17
- - **Argument:** `identifier` (string)
18
- - **Returns:** `Airline` (see [Airline Data Model](#airline-data-model)) or `undefined` if not found.
47
+ - **Arguments:**
48
+ - `airline`: an `Airline` object, or any `query` accepted by `getAirline()`
49
+ - `type`: `'icon'`, `'logo'` or `'tail'` (any other value throws a `TypeError`)
50
+ - `options.mono` (boolean, default `false`): return the `-mono.svg` variant
51
+ - **Returns:** `string`, or `undefined` if the airline is unknown or that file does not exist.
19
52
 
20
53
  ```js
21
- // All of these will find Vietnam Airlines
22
- const vna = getAirline('VN')
23
- const vna = getAirline('HVN')
24
- const vna = getAirline('Vietnam Airlines')
25
- const vna = getAirline('vietnam-airlines')
54
+ getAssetPath('VN', 'logo') // 'soaring-symbols/assets/vietnam-airlines/logo.svg'
55
+ getAssetPath('VN', 'logo', { mono: true }) // 'soaring-symbols/assets/vietnam-airlines/logo-mono.svg'
56
+ getAssetPath('VN', 'tail') // undefined: Vietnam Airlines has no tail asset
26
57
  ```
27
58
 
28
- ### `getAssets(identifier)`
59
+ #### Using the path
29
60
 
30
- Retrieves an object containing relative paths and metadata for an airline's visual assets. Uses the same `identifier` lookup as `getAirline()`.
61
+ ```js
62
+ // Node: read the SVG markup
63
+ import { readFileSync } from 'node:fs'
64
+ import { fileURLToPath } from 'node:url'
65
+
66
+ const svg = readFileSync(
67
+ fileURLToPath(import.meta.resolve(getAssetPath('VN', 'logo'))),
68
+ 'utf8',
69
+ )
70
+
71
+ // CommonJS
72
+ const svg = readFileSync(require.resolve(getAssetPath('VN', 'logo')), 'utf8')
73
+
74
+ // Bundlers (Vite, webpack, ...) take the same path as a static import
75
+ import logoUrl from 'soaring-symbols/assets/vietnam-airlines/logo.svg'
76
+ ```
31
77
 
32
- - **Argument:** `identifier` (string)
33
- - **Returns:** `AssetPaths` (see [Asset Data Model](#asset-data-model)) or `undefined` if not found.
78
+ For a URL in the browser, link the file from jsDelivr with the airline's `slug`; you don't need the package installed:
34
79
 
35
80
  ```js
36
- const assets = getAssets('VN')
81
+ const url = `https://cdn.jsdelivr.net/npm/soaring-symbols/dist/assets/${airline.slug}/logo.svg`
37
82
  ```
38
83
 
39
84
  ## Data Models
40
85
 
41
- ### Airline Data Model
86
+ ### Airline
42
87
 
43
- The main object returned by `getAirline()` and found in the array from `listAirlines()`.
88
+ The object returned by `getAirline()` and found in the array from `listAirlines()`.
44
89
 
45
90
  ```json
46
91
  {
@@ -51,63 +96,107 @@ The main object returned by `getAirline()` and found in the array from `listAirl
51
96
  "flag_carrier": true,
52
97
  "website": "https://www.vietnamairlines.com",
53
98
  "alliance": "SkyTeam",
54
- "slug": "vietnam-airlines",
55
99
  "branding": {
56
100
  "primary_color": "#d99e09",
57
101
  "tagline": "Reach Further",
58
102
  "guidelines": "https://www.vietnamairlines.com/~/media/FilesDownload/AboutUs/Corporate-Identity/GSM-2017-Web1.pdf"
103
+ },
104
+ "slug": "vietnam-airlines",
105
+ "assets": {
106
+ "icon": { "color": true, "mono": true, "colors": ["#d99e09"] },
107
+ "logo": {
108
+ "color": true,
109
+ "mono": true,
110
+ "colors": ["#d99e09", "#005e80"]
111
+ }
59
112
  }
60
113
  }
61
114
  ```
62
115
 
63
- ### Asset Data Model
116
+ | Field | Type | Description |
117
+ | :------------- | :-------------- | :---------------------------------------------------------------------------------------------------------------------------------- |
118
+ | `name` | `string` | Full airline name. |
119
+ | `iata` | `string` | 2-character IATA code. |
120
+ | `icao` | `string` | 3-letter ICAO code. |
121
+ | `country` | `string` | ISO 3166-1 alpha-2 code; comma-separated when the airline belongs to several. |
122
+ | `slug` | `string` | URL-friendly name, also the asset folder name. |
123
+ | `website` | `string?` | Official website. |
124
+ | `flag_carrier` | `boolean?` | `true` for a national flag carrier. |
125
+ | `alliance` | `string?` | `"oneworld"`, `"SkyTeam"` or `"Star Alliance"`. |
126
+ | `defunct` | `boolean?` | `true` if the airline has ceased operations. |
127
+ | `vectorized` | `boolean?` | `true` if the SVG was vectorized by hand. |
128
+ | `branding` | `object?` | `primary_color`, `tagline` and `guidelines` (link to the brand guidelines), each optional. |
129
+ | `assets` | `object` | One [`AssetInfo`](#assetinfo) per available type (`icon`, `logo`, `tail`). Missing types have no key. |
130
+ | `subsidiaries` | `Subsidiary[]?` | Airlines sharing this airline's marks: `name`, `iata`, `icao`, `country`, `flag_carrier?`. They are not returned by `getAirline()`. |
131
+
132
+ ### AssetInfo
133
+
134
+ Describes which files exist for one asset type.
135
+
136
+ | Field | Type | Description |
137
+ | :------- | :--------- | :--------------------------------------------------------------------------------------------------------------------- |
138
+ | `color` | `boolean` | `<type>.svg`, the full-color version, exists. |
139
+ | `mono` | `boolean` | `<type>-mono.svg`, the monochrome version (drawn in `currentColor`), exists. Always `true` for single-color assets. |
140
+ | `colors` | `string[]` | Lowercase hex colors the color file paints with: fills, strokes and gradient stops. Empty when there is no color file. |
141
+
142
+ Every single-color asset ships a `-mono.svg`, generated from its color file. Multi-color assets have one only when it was drawn by hand, so check `mono` (or whether `getAssetPath(..., { mono: true })` returns a path) before offering a monochrome version.
143
+
144
+ The asset folder follows this structure:
145
+
146
+ ```plaintext
147
+ assets/<slug>/
148
+ ├── icon.svg
149
+ ├── icon-mono.svg # generated when icon.svg is single-color
150
+ ├── logo.svg
151
+ └── logo-mono.svg # hand-made for a multi-color logo, optional
152
+ ```
64
153
 
65
- The object returned by `getAssets()`. Each key represents an asset type (e.g., `icon`, `logo`).
154
+ ## Migrating from the old API
66
155
 
67
- If a monochrome variant (`-mono.svg`) does not exist for an asset, its `monochrome` property will be `null`.
156
+ Versions up to `0.1.0-alpha.14` exported `getAssets()`, `getAssetContent()`, a default export and a `soaring-symbols/utils` subpath. They are gone; the asset information now ships precomputed in each airline's `assets` field, so the library no longer touches the file system.
68
157
 
69
- ```json
70
- {
71
- "icon": {
72
- "color": "assets/vietnam-airlines/icon.svg",
73
- "monochrome": null,
74
- "color_model": "single",
75
- "colors": [
76
- "#d99e09"
77
- ]
78
- },
79
- "logo": {
80
- "color": "assets/vietnam-airlines/logo.svg",
81
- "monochrome": "assets/vietnam-airlines/logo-mono.svg",
82
- "color_model": "multi",
83
- "colors": [
84
- "#d99e09",
85
- "#005e80"
86
- ]
87
- }
88
- }
89
- ```
158
+ | Old | New |
159
+ | :----------------------------------------------- | :------------------------------------------------------------------------- |
160
+ | `getAirline(key)` returns `null` when missing | Returns `undefined`. |
161
+ | `airline.branding.colors.logo` | `airline.assets.logo.colors` |
162
+ | `getAssets(key)` | `getAirline(key).assets` for metadata, `getAssetPath()` for file paths. |
163
+ | `getAssets(key).logo.color` | `getAssetPath(key, 'logo')` |
164
+ | `getAssets(key).logo.monochrome` | `getAssetPath(key, 'logo', { mono: true })` |
165
+ | `getAssets(key).logo.colors` | `getAirline(key).assets.logo.colors` |
166
+ | `getAssets(key).logo.color_model` | `assets.logo.colors.length > 1 ? 'multi' : 'single'` |
167
+ | `getAssetContent(key).logo.color` | Read the file yourself, see [Using the path](#using-the-path). |
168
+ | `import soaringSymbols from 'soaring-symbols'` | `import { listAirlines, getAirline, getAssetPath } from 'soaring-symbols'` |
169
+ | `import { toSlug } from 'soaring-symbols/utils'` | Use `airline.slug`; look an airline up by name with `getAirline(name)`. |
90
170
 
91
- ### Asset Metadata Fields
171
+ Two behaviors changed along the way:
92
172
 
93
- Each asset entry in `AssetPaths` contains these fields:
173
+ - **Paths are package paths.** `getAssets()` returned `assets/<slug>/logo.svg`, relative to the package's `dist/` folder. `getAssetPath()` returns `soaring-symbols/assets/<slug>/logo.svg`, which `require.resolve`, `import.meta.resolve` and bundlers resolve directly.
174
+ - **No path for a missing file.** `getAssets()` always set `color`, even for an asset with only a `-mono.svg` file (for example the Qantas icon). `getAssetPath()` returns `undefined` instead.
94
175
 
95
- | Field | Type | Description |
96
- | ------------- | --------------------- | ------------------------------------------------------------------------------- |
97
- | `color` | `string` | Relative path to the full-color SVG. |
98
- | `monochrome` | `string \| null` | Relative path to the monochrome (`-mono.svg`) variant, if available. |
99
- | `color_model` | `"single" \| "multi"` | `"single"` if the SVG uses one color; `"multi"` if it contains multiple colors. |
100
- | `colors` | `string[]` | Array of hex colors extracted from the SVG. |
176
+ ### Example: reading every logo
101
177
 
102
- **Notes:**
178
+ Before:
103
179
 
104
- - `color_model` is determined from the color version of the SVG.
105
- - If `color_model` is `"single"`, the SVG can be treated as monochrome even without a `-mono.svg` variant (e.g., use `fill: currentColor`).
106
- - The assets directory typically follows this structure:
180
+ ```js
181
+ import { listAirlines, getAssetContent } from 'soaring-symbols'
182
+
183
+ for (const airline of listAirlines()) {
184
+ const svg = getAssetContent(airline.slug)?.logo?.color
185
+ if (svg) save(airline.slug, svg)
186
+ }
187
+ ```
188
+
189
+ After:
107
190
 
108
- ```plaintext
109
- assets/<slug>/
110
- ├── icon.svg
111
- ├── logo.svg
112
- └── logo-mono.svg # optional
113
- ```
191
+ ```js
192
+ import { readFileSync } from 'node:fs'
193
+ import { createRequire } from 'node:module'
194
+ import { listAirlines, getAssetPath } from 'soaring-symbols'
195
+
196
+ const require = createRequire(import.meta.url)
197
+
198
+ for (const airline of listAirlines()) {
199
+ const path = getAssetPath(airline, 'logo')
200
+ if (path) save(airline.slug, readFileSync(require.resolve(path), 'utf8'))
201
+ }
202
+ ```
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Soaring Symbols
2
2
 
3
- This project aims to create a meticulously curated collection of airline logos and icons entirely in SVG format, serving as a valuable resource for travelers, aviation enthusiasts, and designers.
3
+ This project aims to create a meticulously curated collection of airline logos, icons and tail designs entirely in SVG format, serving as a valuable resource for travelers, aviation enthusiasts, and designers.
4
4
 
5
5
  > [!IMPORTANT]
6
6
  > "Soaring Symbols" provides airline logos/icons in SVG for informational and reference purposes only. We do not claim ownership of any trademarks or copyrighted materials. The logos remain the intellectual property of their respective airlines.
@@ -11,11 +11,23 @@ The initial phase will focus on building a core collection of high-quality SVG l
11
11
 
12
12
  The inclusion of monochrome versions will depend on the airline's brand guidelines and the feasibility of converting their original logos to a simple, one-color format.
13
13
 
14
- ## TODO / Roadmap
14
+ ## Website
15
15
 
16
- - [ ] Nuxt Homepage
17
- - [ ] Launch a Nuxt-powered homepage showcasing the catalog, search, and usage examples.
18
- - [ ] Include live previews, install instructions, and API docs (pulling from `API.md`).
16
+ Browse the collection, open a page for any airline to download its marks, and check new SVGs against the contribution guidelines at <https://soaring-symbols.anhthang.workers.dev>. The site's source lives in [soaring-symbols/website](https://github.com/soaring-symbols/website).
17
+
18
+ ## Roadmap
19
+
20
+ - [x] npm package
21
+ - [x] Website with a browsable catalog, a page per airline and an SVG validator
22
+ - [x] Raycast extension
23
+ - [x] jsDelivr CDN
24
+ - [ ] Iconify icon set, for Iconify, Nuxt Icon, UnoCSS, Tailwind and Astro
25
+ - [ ] Figma plugin, to search airlines by name or IATA code and drop their marks into designs
26
+ - [ ] Swift Package, with an asset catalog and a SwiftUI view
27
+ - [ ] JSON API on the website, such as `/api/airlines/VN`
28
+ - [ ] A `branding.primary_color` for every airline (Iberia and Qantas have none yet)
29
+
30
+ Plans for the website itself are tracked in the [website's README](https://github.com/soaring-symbols/website#roadmap).
19
31
 
20
32
  ## Installation
21
33
 
@@ -39,17 +51,26 @@ bun add soaring-symbols
39
51
  | :-- | :-- |
40
52
  | [npm Package](https://www.npmjs.com/package/soaring-symbols) <img src="https://cdn.simpleicons.org/npm/000/CB3837" alt="npm" align=left width=24 height=24 /> | [anhthang]|
41
53
  | [Raycast Extension](https://www.raycast.com/anhthang/soaring-symbols) <img src="https://cdn.simpleicons.org/raycast/000/FF6363" alt="Raycast" align=left width=24 height=24 /> | [anhthang]|
54
+ | [jsDelivr CDN](https://www.jsdelivr.com/package/npm/soaring-symbols) <img src="https://cdn.simpleicons.org/jsdelivr/000/E84D3D" alt="jsDelivr" align=left width=24 height=24 /> | [jsDelivr](https://www.jsdelivr.com) |
55
+
56
+ ### CDN
57
+
58
+ Link any mark straight from the npm package through jsDelivr, with nothing to install. `<slug>` is the airline's name in lowercase with hyphens (e.g. `vietnam-airlines`, see [AIRLINES.md](./AIRLINES.md)); swap `logo` for `icon` or `tail` to get the other marks.
59
+
60
+ ```text
61
+ https://cdn.jsdelivr.net/npm/soaring-symbols/dist/assets/<slug>/logo.svg
62
+ ```
42
63
 
43
64
  ## Usage
44
65
 
45
66
  ```js
46
- import { listAirlines, getAirline, getAssets } from 'soaring-symbols'
67
+ import { listAirlines, getAirline, getAssetPath } from 'soaring-symbols'
47
68
 
48
- // Get a list of all airlines
69
+ // Every airline, sorted by name
49
70
  const all = listAirlines()
50
71
 
51
- // Get a specific airline's data
52
- const vna = getAirline('VN')
72
+ // One airline, by IATA code, ICAO code, slug or name
73
+ const vna = getAirline('VN')
53
74
 
54
75
  /* output example
55
76
  {
@@ -65,43 +86,35 @@ const vna = getAirline('VN')
65
86
  "tagline": "Reach Further",
66
87
  "guidelines": "https://www.vietnamairlines.com/~/media/FilesDownload/AboutUs/Corporate-Identity/GSM-2017-Web1.pdf"
67
88
  },
68
- "slug": "vietnam-airlines"
89
+ "slug": "vietnam-airlines",
90
+ "assets": {
91
+ "icon": { "color": true, "mono": true, "colors": ["#d99e09"] },
92
+ "logo": { "color": true, "mono": true, "colors": ["#d99e09", "#005e80"] }
93
+ }
69
94
  }
70
95
  */
71
96
 
72
- // Get asset paths for an airline
73
- const assets = getAssets('VN')
97
+ // Package path of an SVG, or undefined if the airline has no such file
98
+ getAssetPath('VN', 'logo') // 'soaring-symbols/assets/vietnam-airlines/logo.svg'
99
+ getAssetPath('VN', 'logo', { mono: true }) // '.../logo-mono.svg'
74
100
 
75
- /* output example
76
- {
77
- "icon": {
78
- "color": "assets/vietnam-airlines/icon.svg",
79
- "monochrome": null,
80
- "color_model": "single",
81
- "colors": [
82
- "#d99e09"
83
- ]
84
- },
85
- "logo": {
86
- "color": "assets/vietnam-airlines/logo.svg",
87
- "monochrome": "assets/vietnam-airlines/logo-mono.svg",
88
- "color_model": "multi",
89
- "colors": [
90
- "#d99e09",
91
- "#005e80"
92
- ]
93
- }
94
- }
95
- */
101
+ // Read the markup in Node
102
+ import { readFileSync } from 'node:fs'
103
+ import { fileURLToPath } from 'node:url'
104
+
105
+ const svg = readFileSync(
106
+ fileURLToPath(import.meta.resolve(getAssetPath('VN', 'logo'))),
107
+ 'utf8',
108
+ )
96
109
  ```
97
110
 
98
- For a full list of functions and the data structures they return, please see the [API Reference](./API.md).
111
+ For a full list of functions and the data structures they return, please see the [API Reference](./API.md). Upgrading from `0.1.0-alpha.14` or earlier, which had `getAssets()` and `getAssetContent()`? The reference has a [migration guide](./API.md#migrating-from-the-old-api).
99
112
 
100
113
  ## Contributing
101
114
 
102
115
  Contributions are welcome!
103
116
 
104
- Whether through adding new logos, improving existing ones, or suggesting features to enhance usability. Please refer to our [Contribution Guidelines](https://github.com/anhthang/soaring-symbols/blob/main/CONTRIBUTING.md) for detailed instructions on how to contribute effectively.
117
+ Whether through adding new logos, improving existing ones, or suggesting features to enhance usability. Please refer to our [Contribution Guidelines](https://github.com/soaring-symbols/soaring-symbols/blob/main/CONTRIBUTING.md) for detailed instructions on how to contribute effectively.
105
118
 
106
119
  ## License
107
120