soaring-symbols 0.1.0-alpha.9 → 0.2.1

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 (232) hide show
  1. package/AIRLINES.md +43 -9
  2. package/API.md +151 -91
  3. package/README.md +49 -54
  4. package/dist/airlines.json +1 -1943
  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-france/icon.svg +1 -1
  35. package/dist/assets/air-france/logo.svg +1 -1
  36. package/dist/assets/air-india/icon.svg +1 -1
  37. package/dist/assets/air-india/logo.svg +1 -1
  38. package/dist/assets/air-mauritius/icon-mono.svg +1 -0
  39. package/dist/assets/air-mauritius/logo-mono.svg +1 -0
  40. package/dist/assets/air-new-zealand/icon-mono.svg +1 -0
  41. package/dist/assets/air-new-zealand/logo-mono.svg +1 -0
  42. package/dist/assets/air-serbia/icon-mono.svg +1 -0
  43. package/dist/assets/air-serbia/logo-mono.svg +1 -0
  44. package/dist/assets/air-transat/icon-mono.svg +1 -0
  45. package/dist/assets/airasia/logo-mono.svg +1 -0
  46. package/dist/assets/airbaltic/logo-mono.svg +1 -0
  47. package/dist/assets/akasa-air/icon-mono.svg +1 -0
  48. package/dist/assets/alaska-airlines/logo-mono.svg +1 -0
  49. package/dist/assets/all-nippon-airways/logo.svg +1 -1
  50. package/dist/assets/american-airlines/icon-mono.svg +1 -0
  51. package/dist/assets/american-airlines/icon.svg +1 -0
  52. package/dist/assets/american-airlines/logo-mono.svg +1 -0
  53. package/dist/assets/american-airlines/logo.svg +1 -0
  54. package/dist/assets/asiana-airlines/icon-mono.svg +1 -0
  55. package/dist/assets/austrian-airlines/icon-mono.svg +1 -0
  56. package/dist/assets/austrian-airlines/icon.svg +1 -0
  57. package/dist/assets/austrian-airlines/logo.svg +1 -0
  58. package/dist/assets/avianca/icon-mono.svg +1 -0
  59. package/dist/assets/avianca/logo-mono.svg +1 -0
  60. package/dist/assets/azul/icon.svg +1 -0
  61. package/dist/assets/azul/logo.svg +1 -0
  62. package/dist/assets/british-airways/logo.svg +1 -1
  63. package/dist/assets/brussels-airlines/icon-mono.svg +1 -0
  64. package/dist/assets/cathay-pacific/icon-mono.svg +1 -0
  65. package/dist/assets/cathay-pacific/logo-mono.svg +1 -0
  66. package/dist/assets/cebu-pacific/icon-mono.svg +1 -0
  67. package/dist/assets/cebu-pacific/icon.svg +1 -0
  68. package/dist/assets/cebu-pacific/logo-mono.svg +1 -0
  69. package/dist/assets/cebu-pacific/logo.svg +1 -0
  70. package/dist/assets/china-airlines/icon.svg +1 -0
  71. package/dist/assets/china-airlines/logo.svg +1 -0
  72. package/dist/assets/china-eastern-airlines/icon.svg +1 -0
  73. package/dist/assets/china-eastern-airlines/logo.svg +1 -0
  74. package/dist/assets/china-southern-airlines/icon.svg +1 -0
  75. package/dist/assets/china-southern-airlines/logo-mono.svg +1 -0
  76. package/dist/assets/china-southern-airlines/logo.svg +1 -0
  77. package/dist/assets/china-southern-airlines/tail.svg +1 -0
  78. package/dist/assets/condor/icon-mono.svg +1 -0
  79. package/dist/assets/condor/icon.svg +1 -0
  80. package/dist/assets/condor/logo-mono.svg +1 -0
  81. package/dist/assets/condor/logo.svg +1 -0
  82. package/dist/assets/copa-airlines/icon-mono.svg +1 -0
  83. package/dist/assets/copa-airlines/logo-mono.svg +1 -0
  84. package/dist/assets/delta-air-lines/icon-mono.svg +1 -0
  85. package/dist/assets/delta-air-lines/icon.svg +1 -0
  86. package/dist/assets/delta-air-lines/logo-mono.svg +1 -0
  87. package/dist/assets/delta-air-lines/logo.svg +1 -0
  88. package/dist/assets/easyjet/icon.svg +1 -0
  89. package/dist/assets/easyjet/logo-mono.svg +1 -0
  90. package/dist/assets/easyjet/logo.svg +1 -0
  91. package/dist/assets/egyptair/icon-mono.svg +1 -0
  92. package/dist/assets/egyptair/icon.svg +1 -0
  93. package/dist/assets/egyptair/logo-mono.svg +1 -0
  94. package/dist/assets/egyptair/logo.svg +1 -0
  95. package/dist/assets/emirates/icon-mono.svg +1 -0
  96. package/dist/assets/emirates/logo-mono.svg +1 -0
  97. package/dist/assets/etihad-airways/logo-mono.svg +1 -0
  98. package/dist/assets/etihad-airways/logo.svg +1 -1
  99. package/dist/assets/eva-air/icon.svg +1 -0
  100. package/dist/assets/eva-air/logo-mono.svg +1 -0
  101. package/dist/assets/eva-air/logo.svg +1 -0
  102. package/dist/assets/eva-air/tail.svg +1 -0
  103. package/dist/assets/ewa-air/logo-mono.svg +1 -0
  104. package/dist/assets/fiji-airways/icon-mono.svg +1 -0
  105. package/dist/assets/fiji-airways/logo-mono.svg +1 -0
  106. package/dist/assets/fiji-airways/logo.svg +1 -0
  107. package/dist/assets/finnair/icon-mono.svg +1 -0
  108. package/dist/assets/finnair/logo-mono.svg +1 -0
  109. package/dist/assets/flybe/logo-mono.svg +1 -0
  110. package/dist/assets/flybe/logo.svg +1 -0
  111. package/dist/assets/flydubai/logo.svg +1 -0
  112. package/dist/assets/flynas/icon-mono.svg +1 -0
  113. package/dist/assets/flynas/logo-mono.svg +1 -0
  114. package/dist/assets/frontier-airlines/icon-mono.svg +1 -0
  115. package/dist/assets/frontier-airlines/icon.svg +1 -0
  116. package/dist/assets/frontier-airlines/logo-mono.svg +1 -0
  117. package/dist/assets/frontier-airlines/logo.svg +1 -0
  118. package/dist/assets/gol/icon.svg +1 -0
  119. package/dist/assets/gol/logo.svg +1 -0
  120. package/dist/assets/hainan-airlines/icon-mono.svg +1 -0
  121. package/dist/assets/hainan-airlines/icon.svg +1 -0
  122. package/dist/assets/hainan-airlines/logo-mono.svg +1 -0
  123. package/dist/assets/hainan-airlines/logo.svg +1 -0
  124. package/dist/assets/hawaiian-airlines/icon.svg +1 -0
  125. package/dist/assets/hawaiian-airlines/logo.svg +1 -0
  126. package/dist/assets/icelandair/icon-mono.svg +1 -0
  127. package/dist/assets/icelandair/logo-mono.svg +1 -0
  128. package/dist/assets/icelandair/tail-mono.svg +1 -0
  129. package/dist/assets/indigo/icon-mono.svg +1 -0
  130. package/dist/assets/indigo/logo-mono.svg +1 -0
  131. package/dist/assets/ita-airways/logo.svg +1 -0
  132. package/dist/assets/japan-airlines/icon-mono.svg +1 -0
  133. package/dist/assets/jet2com/icon-mono.svg +1 -0
  134. package/dist/assets/jet2com/icon.svg +1 -0
  135. package/dist/assets/jet2com/logo-mono.svg +1 -0
  136. package/dist/assets/jet2com/logo.svg +1 -0
  137. package/dist/assets/jetblue-airways/logo-mono.svg +1 -0
  138. package/dist/assets/jetblue-airways/logo.svg +1 -0
  139. package/dist/assets/jetstar/icon-mono.svg +1 -0
  140. package/dist/assets/jetstar/icon.svg +1 -1
  141. package/dist/assets/jetstar/logo-mono.svg +1 -1
  142. package/dist/assets/jetstar/logo.svg +1 -1
  143. package/dist/assets/kenya-airways/icon-mono.svg +1 -0
  144. package/dist/assets/kenya-airways/logo-mono.svg +1 -0
  145. package/dist/assets/klm/icon-mono.svg +1 -0
  146. package/dist/assets/klm/logo-mono.svg +1 -0
  147. package/dist/assets/korean-air/icon-mono.svg +1 -0
  148. package/dist/assets/korean-air/logo-mono.svg +1 -0
  149. package/dist/assets/kuwait-airways/icon-mono.svg +1 -0
  150. package/dist/assets/kuwait-airways/logo-mono.svg +1 -0
  151. package/dist/assets/lion-air/icon-mono.svg +1 -0
  152. package/dist/assets/lion-air/icon.svg +1 -0
  153. package/dist/assets/lion-air/logo-mono.svg +1 -0
  154. package/dist/assets/lion-air/logo.svg +1 -0
  155. package/dist/assets/lot-polish-airlines/icon-mono.svg +1 -0
  156. package/dist/assets/lot-polish-airlines/logo-mono.svg +1 -0
  157. package/dist/assets/lufthansa/icon-mono.svg +1 -0
  158. package/dist/assets/lufthansa/logo-mono.svg +1 -0
  159. package/dist/assets/malaysia-airlines/icon-mono.svg +1 -0
  160. package/dist/assets/malaysia-airlines/logo-mono.svg +1 -0
  161. package/dist/assets/myanmar-national-airlines/icon-mono.svg +1 -0
  162. package/dist/assets/norwegian-air-shuttle/icon.svg +1 -0
  163. package/dist/assets/norwegian-air-shuttle/logo-mono.svg +1 -0
  164. package/dist/assets/norwegian-air-shuttle/logo.svg +1 -0
  165. package/dist/assets/pacific-airlines/icon-mono.svg +1 -0
  166. package/dist/assets/pacific-airlines/icon.svg +1 -0
  167. package/dist/assets/pacific-airlines/logo-mono.svg +1 -0
  168. package/dist/assets/pacific-airlines/logo.svg +1 -0
  169. package/dist/assets/paranair/icon-mono.svg +1 -0
  170. package/dist/assets/peach-aviation/logo-mono.svg +1 -0
  171. package/dist/assets/pegasus-airlines/icon-mono.svg +1 -0
  172. package/dist/assets/pegasus-airlines/icon.svg +1 -0
  173. package/dist/assets/pegasus-airlines/logo-mono.svg +1 -0
  174. package/dist/assets/pegasus-airlines/logo.svg +1 -0
  175. package/dist/assets/qantas/logo.svg +1 -0
  176. package/dist/assets/riyadh-air/icon-mono.svg +1 -0
  177. package/dist/assets/riyadh-air/logo-mono.svg +1 -0
  178. package/dist/assets/royal-air-maroc/icon-mono.svg +1 -0
  179. package/dist/assets/royal-air-maroc/logo-mono.svg +1 -0
  180. package/dist/assets/ryanair/icon-mono.svg +1 -0
  181. package/dist/assets/saudia/icon-mono.svg +1 -0
  182. package/dist/assets/saudia/logo-mono.svg +1 -0
  183. package/dist/assets/saudia/logo.svg +1 -0
  184. package/dist/assets/scandinavian-airlines/logo-mono.svg +1 -0
  185. package/dist/assets/singapore-airlines/icon-mono.svg +1 -0
  186. package/dist/assets/spirit-airlines/logo-mono.svg +1 -0
  187. package/dist/assets/spirit-airlines/logo.svg +1 -0
  188. package/dist/assets/sun-phuquoc-airways/icon-mono.svg +1 -0
  189. package/dist/assets/swiss/icon-mono.svg +1 -0
  190. package/dist/assets/swiss/logo-mono.svg +1 -0
  191. package/dist/assets/tarom/icon-mono.svg +1 -0
  192. package/dist/assets/tarom/logo-mono.svg +1 -0
  193. package/dist/assets/tarom/tail-mono.svg +1 -0
  194. package/dist/assets/thai-airways/icon.svg +1 -1
  195. package/dist/assets/thai-airways/logo-mono.svg +1 -0
  196. package/dist/assets/thai-airways/logo.svg +1 -0
  197. package/dist/assets/transavia/icon-mono.svg +1 -0
  198. package/dist/assets/transavia/logo-mono.svg +1 -0
  199. package/dist/assets/united-airlines/icon-mono.svg +1 -0
  200. package/dist/assets/united-airlines/logo-mono.svg +1 -0
  201. package/dist/assets/vietjet-air/logo-mono.svg +1 -0
  202. package/dist/assets/vietjet-air/logo.svg +1 -1
  203. package/dist/assets/vietnam-airlines/icon-mono.svg +1 -0
  204. package/dist/assets/vietravel-airlines/icon-mono.svg +1 -0
  205. package/dist/assets/vietravel-airlines/icon.svg +1 -0
  206. package/dist/assets/vietravel-airlines/logo-mono.svg +1 -0
  207. package/dist/assets/vietravel-airlines/logo.svg +1 -0
  208. package/dist/assets/virgin-australia/icon-mono.svg +1 -0
  209. package/dist/assets/viva/icon-mono.svg +1 -0
  210. package/dist/assets/viva/icon.svg +1 -0
  211. package/dist/assets/viva/logo-mono.svg +1 -0
  212. package/dist/assets/viva/logo.svg +1 -0
  213. package/dist/assets/volaris/icon.svg +1 -0
  214. package/dist/assets/volaris/logo.svg +1 -0
  215. package/dist/assets/volotea/icon-mono.svg +1 -0
  216. package/dist/assets/volotea/icon.svg +1 -0
  217. package/dist/assets/volotea/logo-mono.svg +1 -0
  218. package/dist/assets/volotea/logo.svg +1 -0
  219. package/dist/assets/vueling/logo.svg +1 -0
  220. package/dist/assets/westjet/icon.svg +1 -1
  221. package/dist/assets/wizz-air/logo-mono.svg +1 -0
  222. package/dist/assets/xiamenair/icon-mono.svg +1 -0
  223. package/dist/index.cjs +54 -111
  224. package/dist/index.d.cts +76 -0
  225. package/dist/index.d.ts +65 -56
  226. package/dist/index.js +55 -120
  227. package/dist/svg-validator.cjs +37 -13
  228. package/dist/svg-validator.d.cts +11 -0
  229. package/dist/svg-validator.d.ts +9 -9
  230. package/dist/svg-validator.js +36 -12
  231. package/package.json +47 -19
  232. 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) | ✅ | ✅ | |
@@ -29,34 +32,55 @@ This file provides an overview of the airlines included in the Soaring Symbols p
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) | | ✅ | |
31
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) | ✅ | ✅ | |
32
36
  | [Asiana Airlines](https://flyasiana.com) | KR | OZ | AAR | Star Alliance | ![#4a4f54](https://place-hold.it/10x10/4a4f54/4a4f54.png) | ✅ | ✅ | |
33
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) | ✅ | ☑️ | |
34
39
  | [avianca](https://www.avianca.com) 🇨🇴 | CO | AV | AVA | Star Alliance | ![#ff0000](https://place-hold.it/10x10/ff0000/ff0000.png) | ✅ | ✅ | |
35
40
  | Avianca Costa Rica 🇨🇷 | CR | LR | LRC | | ![#ff0000](https://place-hold.it/10x10/ff0000/ff0000.png) | ✅ | ✅ | |
36
41
  | Avianca Ecuador | EC | 2K | GLG | | ![#ff0000](https://place-hold.it/10x10/ff0000/ff0000.png) | ✅ | ✅ | |
37
42
  | Avianca El Salvador 🇸🇻 | SV | TA | TAI | | ![#ff0000](https://place-hold.it/10x10/ff0000/ff0000.png) | ✅ | ✅ | |
38
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) | ☑️ | ☑️ | |
39
45
  | [Bamboo Airways](https://www.bambooairways.com) | VN | QH | BAV | | ![#64ae53](https://place-hold.it/10x10/64ae53/64ae53.png) | ☑️ | ☑️ | |
40
46
  | [Bangkok Airways](https://www.bangkokair.com) | TH | PG | BKP | | ![#000f8f](https://place-hold.it/10x10/000f8f/000f8f.png) | ✅ | ✅ | |
41
47
  | [British Airways](https://www.britishairways.com) 🇬🇧 | GB | BA | BAW | oneworld | ![#2e5c99](https://place-hold.it/10x10/2e5c99/2e5c99.png) | ✅ | ✅ | |
42
48
  | [Brussels Airlines](https://www.brusselsairlines.com) 🇧🇪 | BE | SN | BEL | Star Alliance | ![#051446](https://place-hold.it/10x10/051446/051446.png) | ✅ | ✅ | |
43
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) | ✅ | ✅ | |
44
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) | ✅ | ✅ | |
45
59
  | [Emirates](https://www.emirates.com) 🇦🇪 | AE | EK | UAE | | ![#d71921](https://place-hold.it/10x10/d71921/d71921.png) | ✅ | ✅ | |
46
60
  | [Ethiopian Airlines](https://www.ethiopianairlines.com) 🇪🇹 | ET | ET | ETH | Star Alliance | ![#b71d20](https://place-hold.it/10x10/b71d20/b71d20.png) | ✅ | ✅ | |
47
61
  | [Etihad Airways](https://www.etihad.com) 🇦🇪 | AE | EY | ETD | | ![#bd8b13](https://place-hold.it/10x10/bd8b13/bd8b13.png) | | ✅ | |
48
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) | ☑️ | ✅ | ☑️ |
49
64
  | [Ewa Air](https://ewa-air.com) | FR | ZD | EWR | | ![#e1251b](https://place-hold.it/10x10/e1251b/e1251b.png) | | ✅ | |
50
- | [Fiji Airways](https://www.fijiairways.com) 🇫🇯 | FJ | FJ | FJI | oneworld | ![#473729](https://place-hold.it/10x10/473729/473729.png) | ✅ | | |
51
- | [Finnair](http://www.finnair.com) 🇫🇮 | FI | AY | FIN | oneworld | ![#0c0243](https://place-hold.it/10x10/0c0243/0c0243.png) | ✅ | ✅ | |
65
+ | [Fiji Airways](https://www.fijiairways.com) 🇫🇯 | FJ | FJ | FJI | oneworld | ![#473729](https://place-hold.it/10x10/473729/473729.png) | ✅ | ✅ | |
66
+ | [Finnair](https://www.finnair.com) 🇫🇮 | FI | AY | FIN | oneworld | ![#0c0243](https://place-hold.it/10x10/0c0243/0c0243.png) | ✅ | ✅ | |
52
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) | | ☑️ | |
53
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) | ✅ | ✅ | |
54
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) | ☑️ | ☑️ | |
55
76
  | [HK Express](https://www.hkexpress.com) | HK | UO | HKE | | ![#702b91](https://place-hold.it/10x10/702b91/702b91.png) | ✅ | ✅ | |
56
- | [Iberia](https://www.iberia.com) 🇪🇸 | ES | IB | IBE | oneworld | | ☑️ | ☑️ | |
77
+ | [Iberia](https://www.iberia.com) 🇪🇸 | ES | IB | IBE | oneworld | ![#dc1c2e](https://place-hold.it/10x10/dc1c2e/dc1c2e.png) | ✅ | ✅ | |
57
78
  | [Icelandair](https://www.icelandair.com) 🇮🇸 | IS | FI | ICE | | ![#0c0243](https://place-hold.it/10x10/0c0243/0c0243.png) | ✅ | ✅ | ✅ |
58
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) | | ☑️ | |
59
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) | | ✅ | |
60
84
  | [Jetstar](https://www.jetstar.com) | AU | JQ | JST | | ![#ff5111](https://place-hold.it/10x10/ff5111/ff5111.png) | ✅ | ✅ | |
61
85
  | Jetstar Japan | JP | GK | JJP | | ![#ff5111](https://place-hold.it/10x10/ff5111/ff5111.png) | ✅ | ✅ | |
62
86
  | [Kenya Airways](https://www.kenya-airways.com) 🇰🇪 | KE | KQ | KQA | SkyTeam | ![#ed1c24](https://place-hold.it/10x10/ed1c24/ed1c24.png) | ✅ | ✅ | |
@@ -69,40 +93,50 @@ This file provides an overview of the airlines included in the Soaring Symbols p
69
93
  | LATAM Airlines Ecuador | EC | XL | LNE | | ![#1b0088](https://place-hold.it/10x10/1b0088/1b0088.png) | ✅ | ✅ | |
70
94
  | LATAM Airlines Perú | PE | LP | LPE | | ![#1b0088](https://place-hold.it/10x10/1b0088/1b0088.png) | ✅ | ✅ | |
71
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) | ✅ | ✅ | |
72
97
  | [LOT Polish Airlines](https://www.lot.com) 🇵🇱 | PL | LO | LOT | Star Alliance | ![#252668](https://place-hold.it/10x10/252668/252668.png) | ✅ | ✅ | |
73
98
  | [Lufthansa](https://www.lufthansa.com) 🇩🇪 | DE | LH | DLH | Star Alliance | ![#05164d](https://place-hold.it/10x10/05164d/05164d.png) | ✅ | ✅ | |
74
99
  | [Malaysia Airlines](https://www.malaysiaairlines.com) 🇲🇾 | MY | MH | MAS | oneworld | ![#174887](https://place-hold.it/10x10/174887/174887.png) | ✅ | ✅ | |
75
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) | ☑️ | ✅ | |
76
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) | ✅ | ✅ | |
77
104
  | [Paranair](https://www.paranair.com) | PY | ZP | AZP | | ![#0037a2](https://place-hold.it/10x10/0037a2/0037a2.png) | ✅ | ✅ | |
78
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) | ✅ | ✅ | |
79
107
  | [Philippine Airlines](https://www.philippineairlines.com) 🇵🇭 | PH | PR | PAL | | ![#001f60](https://place-hold.it/10x10/001f60/001f60.png) | ✅ | ✅ | |
80
- | [Qantas](https://www.qantas.com) 🇦🇺 | AU | QF | QFA | oneworld | | ☑️ | ☑️ | |
108
+ | [Qantas](https://www.qantas.com) 🇦🇺 | AU | QF | QFA | oneworld | ![#e40000](https://place-hold.it/10x10/e40000/e40000.png) | ☑️ | ✅ | |
81
109
  | [Qatar Airways](https://www.qatarairways.com) 🇶🇦 | QA | QR | QTR | oneworld | ![#662046](https://place-hold.it/10x10/662046/662046.png) | ✅ | ✅ | |
82
110
  | [Riyadh Air](https://www.riyadhair.com) 🇸🇦 | SA | RX | RXI | | ![#240852](https://place-hold.it/10x10/240852/240852.png) | ✅ | ✅ | |
83
111
  | [Royal Air Maroc](https://www.royalairmaroc.com) 🇲🇦 | MA | AT | RAM | SkyTeam | ![#c20831](https://place-hold.it/10x10/c20831/c20831.png) | ✅ | ✅ | ☑️ |
84
112
  | [Royal Brunei Airlines](https://www.flyroyalbrunei.com) | BN | BI | RBA | | ![#ffe600](https://place-hold.it/10x10/ffe600/ffe600.png) | | ☑️ | |
85
113
  | [Ryanair](https://www.ryanair.com) | IE | FR | RYR | | ![#073590](https://place-hold.it/10x10/073590/073590.png) | ✅ | ✅ | |
86
- | [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) | ✅ | ✅ | |
87
115
  | [Scandinavian Airlines](https://www.flysas.com) 🇩🇰 🇳🇴 🇸🇪 | DK,NO,SE | SK | SAS | Star Alliance | ![#000099](https://place-hold.it/10x10/000099/000099.png) | | ✅ | |
88
116
  | SAS Connect | IE | SL | SZS | | ![#000099](https://place-hold.it/10x10/000099/000099.png) | | ✅ | |
89
117
  | [Scoot](https://www.flyscoot.com) | SG | TR | TGW | Value Alliance | ![#ffe900](https://place-hold.it/10x10/ffe900/ffe900.png) | | ☑️ | |
90
118
  | [Singapore Airlines](https://www.singaporeair.com) 🇸🇬 | SG | SQ | SIA | Star Alliance | ![#232f67](https://place-hold.it/10x10/232f67/232f67.png) | ✅ | ✅ | |
91
- | [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) | | ✅ | |
92
121
  | [Starlux Airlines](https://www.starlux-airlines.com) | TW | JX | SJX | | ![#996a4e](https://place-hold.it/10x10/996a4e/996a4e.png) | ✅ | ✅ | |
93
122
  | [Sun PhuQuoc Airways](https://www.sunphuquocairways.com) | VN | 9G | SPQ | | ![#ca1c2a](https://place-hold.it/10x10/ca1c2a/ca1c2a.png) | ✅ | ✅ | |
94
123
  | [SWISS](https://www.swiss.com) 🇨🇭 | CH | LX | SWR | Star Alliance | ![#cf0a2c](https://place-hold.it/10x10/cf0a2c/cf0a2c.png) | ✅ | ✅ | |
95
124
  | [T'way Air](https://www.twayair.com) | KR | TW | TWB | | ![#d22c25](https://place-hold.it/10x10/d22c25/d22c25.png) | | ✅ | |
96
125
  | [TAP Air Portugal](https://www.tapairportugal.com) 🇵🇹 | PT | TP | TAP | Star Alliance | ![#bfd730](https://place-hold.it/10x10/bfd730/bfd730.png) | ☑️ | ☑️ | |
97
126
  | [TAROM](https://www.tarom.ro) 🇷🇴 | RO | RO | ROT | SkyTeam | ![#003366](https://place-hold.it/10x10/003366/003366.png) | ✅ | ✅ | ✅ |
98
- | [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 | ![#330066](https://place-hold.it/10x10/330066/330066.png) | ☑️ | ✅ | |
99
128
  | [Transavia](https://www.transavia.com) | NL | HV | TRA | | ![#00d66c](https://place-hold.it/10x10/00d66c/00d66c.png) | ✅ | ✅ | |
100
129
  | [Turkish Airlines](https://www.turkishairlines.com) 🇹🇷 | TR | TK | THY | Star Alliance | ![#c90019](https://place-hold.it/10x10/c90019/c90019.png) | ✅ | ✅ | |
101
130
  | [United Airlines](https://www.united.com) | US | UA | UAL | Star Alliance | ![#1414d2](https://place-hold.it/10x10/1414d2/1414d2.png) | ✅ | ✅ | |
102
131
  | [VietJet Air](https://www.vietjetair.com) | VN | VJ | VJC | | ![#e12127](https://place-hold.it/10x10/e12127/e12127.png) | | ✅ | |
103
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) | ✅ | ✅ | |
104
134
  | [Virgin Atlantic](https://www.virginatlantic.com) | GB | VS | VIR | SkyTeam | ![#da0530](https://place-hold.it/10x10/da0530/da0530.png) | ✅ | ✅ | |
105
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) | | ☑️ | |
106
140
  | [WestJet](https://www.westjet.com) | CA | WS | WJA | | ![#00aaa6](https://place-hold.it/10x10/00aaa6/00aaa6.png) | ✅ | ✅ | |
107
141
  | [Wizz Air](https://www.wizzair.com) | HU | W6 | WZZ | | ![#c6007e](https://place-hold.it/10x10/c6007e/c6007e.png) | | ✅ | |
108
142
  | Wizz Air Abu Dhabi | AE | 5W | WAZ | | ![#c6007e](https://place-hold.it/10x10/c6007e/c6007e.png) | | ✅ | |
package/API.md CHANGED
@@ -1,151 +1,211 @@
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))
10
18
 
11
- - **Returns:** `Airline[]`
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.
12
20
 
13
- ### `getAirline(identifier)`
21
+ ```js
22
+ const all = listAirlines()
23
+ const skyTeam = all.filter((airline) => airline.alliance === 'SkyTeam')
24
+ ```
25
+
26
+ ### `getAirline(query)`
14
27
 
15
- Retrieves a single airline object. The `identifier` can be the airline's IATA code, ICAO code, full name, or URL-friendly slug.
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.
16
29
 
17
- - **Argument:** `identifier` (string)
18
- - **Returns:** `Airline` (see [Airline Data Model](#airline-data-model)) or `undefined` if not found.
30
+ Codes of airlines that ceased operations get reassigned. When a code belongs to both an active airline and a defunct one (`defunct: true`), the code finds the active airline; find the defunct one by its slug or name.
31
+
32
+ - **Argument:** `query` (string)
33
+ - **Returns:** `Airline`, or `undefined` if nothing matches.
19
34
 
20
35
  ```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')
36
+ // All of these find Vietnam Airlines
37
+ getAirline('VN')
38
+ getAirline('hvn')
39
+ getAirline('vietnam-airlines')
40
+ getAirline('Vietnam Airlines')
41
+
42
+ getAirline('XX') // undefined
26
43
  ```
27
44
 
28
- ### `getAssets(identifier)`
45
+ ### `getAssetPath(airline, type, options?)`
29
46
 
30
- Retrieves an object containing relative paths and metadata for an airline's visual assets. Uses the same `identifier` lookup as `getAirline()`.
47
+ Returns the package path of one SVG file, ready to pass to `require.resolve`, `import.meta.resolve` or your bundler.
31
48
 
32
- - **Argument:** `identifier` (string)
33
- - **Returns:** `AssetPaths` (see [Asset Data Model](#asset-data-model)) or `undefined` if not found.
49
+ - **Arguments:**
50
+ - `airline`: an `Airline` object, or any `query` accepted by `getAirline()`
51
+ - `type`: `'icon'`, `'logo'` or `'tail'` (any other value throws a `TypeError`)
52
+ - `options.mono` (boolean, default `false`): return the `-mono.svg` variant
53
+ - **Returns:** `string`, or `undefined` if the airline is unknown or that file does not exist.
34
54
 
35
55
  ```js
36
- const assets = getAssets('VN')
56
+ getAssetPath('VN', 'logo') // 'soaring-symbols/assets/vietnam-airlines/logo.svg'
57
+ getAssetPath('VN', 'logo', { mono: true }) // 'soaring-symbols/assets/vietnam-airlines/logo-mono.svg'
58
+ getAssetPath('VN', 'tail') // undefined: Vietnam Airlines has no tail asset
37
59
  ```
38
60
 
39
- ### `getAssetContent(identifier)`
61
+ #### Using the path
40
62
 
41
- Retrieves an object containing the actual SVG content for an airline's visual assets. Uses the same `identifier` lookup as `getAirline()`.
63
+ ```js
64
+ // Node: read the SVG markup
65
+ import { readFileSync } from 'node:fs'
66
+ import { fileURLToPath } from 'node:url'
42
67
 
43
- - **Argument:** `identifier` (string)
44
- - **Returns:** `AssetContent` (see [Asset Content Model](#asset-content-model)) or `undefined` if not found.
68
+ const svg = readFileSync(
69
+ fileURLToPath(import.meta.resolve(getAssetPath('VN', 'logo'))),
70
+ 'utf8',
71
+ )
45
72
 
46
- ```js
47
- const content = getAssetContent('VN')
73
+ // CommonJS
74
+ const svg = readFileSync(require.resolve(getAssetPath('VN', 'logo')), 'utf8')
48
75
 
49
- // Result structure
50
- {
51
- "icon": {
52
- "color": "<svg>...</svg>", // SVG content
53
- "monochrome": null, // SVG content or null if not available
54
- "color_model": "single",
55
- "colors": ["#d99e09"]
56
- },
57
- "logo": {
58
- "color": "<svg>...</svg>",
59
- "monochrome": "<svg>...</svg>",
60
- "color_model": "multi",
61
- "colors": ["#d99e09", "#005e80"]
62
- }
63
- }
76
+ // Bundlers (Vite, webpack, ...) take the same path as a static import
77
+ import logoUrl from 'soaring-symbols/assets/vietnam-airlines/logo.svg'
78
+ ```
79
+
80
+ For a URL in the browser, link the file from jsDelivr with the airline's `slug`; you don't need the package installed:
81
+
82
+ ```js
83
+ const url = `https://cdn.jsdelivr.net/npm/soaring-symbols/dist/assets/${airline.slug}/logo.svg`
64
84
  ```
65
85
 
66
86
  ## Data Models
67
87
 
68
- ### Airline Data Model
88
+ ### Airline
69
89
 
70
- The main object returned by `getAirline()` and found in the array from `listAirlines()`.
90
+ The object returned by `getAirline()` and found in the array from `listAirlines()`.
71
91
 
72
92
  ```json
73
93
  {
74
94
  "name": "Vietnam Airlines",
75
95
  "iata": "VN",
76
96
  "icao": "HVN",
97
+ "callsign": "VIET NAM AIRLINES",
77
98
  "country": "VN",
78
99
  "flag_carrier": true,
79
100
  "website": "https://www.vietnamairlines.com",
80
101
  "alliance": "SkyTeam",
81
- "slug": "vietnam-airlines",
102
+ "hubs": ["HAN", "SGN"],
103
+ "founded": 1956,
82
104
  "branding": {
83
105
  "primary_color": "#d99e09",
84
106
  "tagline": "Reach Further",
85
107
  "guidelines": "https://www.vietnamairlines.com/~/media/FilesDownload/AboutUs/Corporate-Identity/GSM-2017-Web1.pdf"
108
+ },
109
+ "slug": "vietnam-airlines",
110
+ "assets": {
111
+ "icon": { "color": true, "mono": true, "colors": ["#d99e09"] },
112
+ "logo": {
113
+ "color": true,
114
+ "mono": true,
115
+ "colors": ["#d99e09", "#005e80"]
116
+ }
86
117
  }
87
118
  }
88
119
  ```
89
120
 
90
- ### Asset Data Model
121
+ | Field | Type | Description |
122
+ | :------------- | :-------------- | :---------------------------------------------------------------------------------------------------------------------------------- |
123
+ | `name` | `string` | Full airline name. |
124
+ | `iata` | `string` | 2-character IATA code. |
125
+ | `icao` | `string` | 3-letter ICAO code. |
126
+ | `callsign` | `string?` | ICAO radiotelephony callsign, uppercase, e.g. `"VIET NAM AIRLINES"`. |
127
+ | `country` | `string` | ISO 3166-1 alpha-2 code; comma-separated when the airline belongs to several. |
128
+ | `slug` | `string` | URL-friendly name, also the asset folder name. |
129
+ | `website` | `string?` | Official website. |
130
+ | `flag_carrier` | `boolean?` | `true` for a national flag carrier. |
131
+ | `alliance` | `string?` | `"oneworld"`, `"SkyTeam"` or `"Star Alliance"`. |
132
+ | `hubs` | `string[]?` | IATA codes of its hub airports, e.g. `["HAN", "SGN"]`. Low-cost carriers often have bases rather than hubs, and none listed. |
133
+ | `founded` | `number?` | Year founded, counting from the predecessor its history starts with (e.g. 1956 for Vietnam Airlines). |
134
+ | `defunct` | `boolean?` | `true` if the airline has ceased operations. |
135
+ | `ceased` | `number?` | Year a defunct airline ceased operations. |
136
+ | `vectorized` | `boolean?` | `true` if the SVG was vectorized by hand. |
137
+ | `branding` | `object?` | `primary_color`, `tagline` and `guidelines` (link to the brand guidelines), each optional. |
138
+ | `assets` | `object` | One [`AssetInfo`](#assetinfo) per available type (`icon`, `logo`, `tail`). Missing types have no key. |
139
+ | `subsidiaries` | `Subsidiary[]?` | Airlines sharing this airline's marks: `name`, `iata`, `icao`, `country`, `flag_carrier?`. They are not returned by `getAirline()`. |
140
+
141
+ ### AssetInfo
142
+
143
+ Describes which files exist for one asset type.
144
+
145
+ | Field | Type | Description |
146
+ | :------- | :--------- | :--------------------------------------------------------------------------------------------------------------------- |
147
+ | `color` | `boolean` | `<type>.svg`, the full-color version, exists. |
148
+ | `mono` | `boolean` | `<type>-mono.svg`, the monochrome version (drawn in `currentColor`), exists. Always `true` for single-color assets. |
149
+ | `colors` | `string[]` | Lowercase hex colors the color file paints with: fills, strokes and gradient stops. Empty when there is no color file. |
150
+
151
+ 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.
152
+
153
+ The asset folder follows this structure:
154
+
155
+ ```plaintext
156
+ assets/<slug>/
157
+ ├── icon.svg
158
+ ├── icon-mono.svg # generated when icon.svg is single-color
159
+ ├── logo.svg
160
+ └── logo-mono.svg # hand-made for a multi-color logo, optional
161
+ ```
91
162
 
92
- The object returned by `getAssets()`. Each key represents an asset type (e.g., `icon`, `logo`).
163
+ ## Migrating from the old API
93
164
 
94
- If a monochrome variant (`-mono.svg`) does not exist for an asset, its `monochrome` property will be `null`.
165
+ 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.
95
166
 
96
- ```json
97
- {
98
- "icon": {
99
- "color": "assets/vietnam-airlines/icon.svg",
100
- "monochrome": null,
101
- "color_model": "single",
102
- "colors": [
103
- "#d99e09"
104
- ]
105
- },
106
- "logo": {
107
- "color": "assets/vietnam-airlines/logo.svg",
108
- "monochrome": "assets/vietnam-airlines/logo-mono.svg",
109
- "color_model": "multi",
110
- "colors": [
111
- "#d99e09",
112
- "#005e80"
113
- ]
114
- }
115
- }
116
- ```
167
+ | Old | New |
168
+ | :----------------------------------------------- | :------------------------------------------------------------------------- |
169
+ | `getAirline(key)` returns `null` when missing | Returns `undefined`. |
170
+ | `airline.branding.colors.logo` | `airline.assets.logo.colors` |
171
+ | `getAssets(key)` | `getAirline(key).assets` for metadata, `getAssetPath()` for file paths. |
172
+ | `getAssets(key).logo.color` | `getAssetPath(key, 'logo')` |
173
+ | `getAssets(key).logo.monochrome` | `getAssetPath(key, 'logo', { mono: true })` |
174
+ | `getAssets(key).logo.colors` | `getAirline(key).assets.logo.colors` |
175
+ | `getAssets(key).logo.color_model` | `assets.logo.colors.length > 1 ? 'multi' : 'single'` |
176
+ | `getAssetContent(key).logo.color` | Read the file yourself, see [Using the path](#using-the-path). |
177
+ | `import soaringSymbols from 'soaring-symbols'` | `import { listAirlines, getAirline, getAssetPath } from 'soaring-symbols'` |
178
+ | `import { toSlug } from 'soaring-symbols/utils'` | Use `airline.slug`; look an airline up by name with `getAirline(name)`. |
117
179
 
118
- ### Asset Content Model
180
+ Two behaviors changed along the way:
119
181
 
120
- The object returned by `getAssetContent()` follows a similar structure to `getAssets()`, but instead of paths, it contains the actual SVG content:
182
+ - **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.
183
+ - **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.
121
184
 
122
- | Field | Type | Description |
123
- | ------------- | --------------------- | ------------------------------------------------------------------------------- |
124
- | `color` | `string` | Full SVG content of the color variant. |
125
- | `monochrome` | `string \| null` | Full SVG content of the monochrome variant, if available. |
126
- | `color_model` | `"single" \| "multi"` | `"single"` if the SVG uses one color; `"multi"` if it contains multiple colors. |
127
- | `colors` | `string[]` | Array of hex colors extracted from the SVG. |
185
+ ### Example: reading every logo
128
186
 
129
- ### Asset Path Fields
187
+ Before:
130
188
 
131
- Each asset entry in `AssetPaths` contains these fields:
189
+ ```js
190
+ import { listAirlines, getAssetContent } from 'soaring-symbols'
132
191
 
133
- | Field | Type | Description |
134
- | ------------- | --------------------- | ------------------------------------------------------------------------------- |
135
- | `color` | `string` | Relative path to the full-color SVG. |
136
- | `monochrome` | `string \| null` | Relative path to the monochrome (`-mono.svg`) variant, if available. |
137
- | `color_model` | `"single" \| "multi"` | `"single"` if the SVG uses one color; `"multi"` if it contains multiple colors. |
138
- | `colors` | `string[]` | Array of hex colors extracted from the SVG. |
192
+ for (const airline of listAirlines()) {
193
+ const svg = getAssetContent(airline.slug)?.logo?.color
194
+ if (svg) save(airline.slug, svg)
195
+ }
196
+ ```
139
197
 
140
- **Notes:**
198
+ After:
141
199
 
142
- - `color_model` is determined from the color version of the SVG.
143
- - If `color_model` is `"single"`, the SVG can be treated as monochrome even without a `-mono.svg` variant (e.g., use `fill: currentColor`).
144
- - The assets directory typically follows this structure:
200
+ ```js
201
+ import { readFileSync } from 'node:fs'
202
+ import { createRequire } from 'node:module'
203
+ import { listAirlines, getAssetPath } from 'soaring-symbols'
204
+
205
+ const require = createRequire(import.meta.url)
145
206
 
146
- ```plaintext
147
- assets/<slug>/
148
- ├── icon.svg
149
- ├── logo.svg
150
- └── logo-mono.svg # optional
151
- ```
207
+ for (const airline of listAirlines()) {
208
+ const path = getAssetPath(airline, 'logo')
209
+ if (path) save(airline.slug, readFileSync(require.resolve(path), 'utf8'))
210
+ }
211
+ ```
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://soaringsymbols.org>. 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,28 @@ 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
+ The Raycast extension also works in launchers that run Raycast extensions, such as [Vicinae](https://www.vicinae.com), [SuperCmd](https://supercmd.sh) and [Tinycast](https://tinycast.dev). See the [ecosystem section on the website](https://soaringsymbols.org/#ecosystem) for how to use each one.
57
+
58
+ ### CDN
59
+
60
+ 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.
61
+
62
+ ```text
63
+ https://cdn.jsdelivr.net/npm/soaring-symbols/dist/assets/<slug>/logo.svg
64
+ ```
42
65
 
43
66
  ## Usage
44
67
 
45
68
  ```js
46
- import { listAirlines, getAirline, getAssets, getAssetContent } from 'soaring-symbols'
69
+ import { listAirlines, getAirline, getAssetPath } from 'soaring-symbols'
47
70
 
48
- // Get a list of all airlines
71
+ // Every airline, sorted by name
49
72
  const all = listAirlines()
50
73
 
51
- // Get a specific airline's data
52
- const vna = getAirline('VN')
74
+ // One airline, by IATA code, ICAO code, slug or name
75
+ const vna = getAirline('VN')
53
76
 
54
77
  /* output example
55
78
  {
@@ -65,63 +88,35 @@ const vna = getAirline('VN')
65
88
  "tagline": "Reach Further",
66
89
  "guidelines": "https://www.vietnamairlines.com/~/media/FilesDownload/AboutUs/Corporate-Identity/GSM-2017-Web1.pdf"
67
90
  },
68
- "slug": "vietnam-airlines"
69
- }
70
- */
71
-
72
- // Get asset paths for an airline
73
- const assets = getAssets('VN')
74
-
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
- ]
91
+ "slug": "vietnam-airlines",
92
+ "assets": {
93
+ "icon": { "color": true, "mono": true, "colors": ["#d99e09"] },
94
+ "logo": { "color": true, "mono": true, "colors": ["#d99e09", "#005e80"] }
93
95
  }
94
96
  }
95
97
  */
96
98
 
97
- // Get SVG content for an airline
98
- const content = getAssetContent('VN')
99
+ // Package path of an SVG, or undefined if the airline has no such file
100
+ getAssetPath('VN', 'logo') // 'soaring-symbols/assets/vietnam-airlines/logo.svg'
101
+ getAssetPath('VN', 'logo', { mono: true }) // '.../logo-mono.svg'
99
102
 
100
- /* output example - SVG content is truncated for brevity
101
- {
102
- "icon": {
103
- "color": "<svg>...</svg>",
104
- "monochrome": null,
105
- "color_model": "single",
106
- "colors": ["#d99e09"]
107
- },
108
- "logo": {
109
- "color": "<svg>...</svg>",
110
- "monochrome": "<svg>...</svg>",
111
- "color_model": "multi",
112
- "colors": ["#d99e09", "#005e80"]
113
- }
114
- }
115
- */
103
+ // Read the markup in Node
104
+ import { readFileSync } from 'node:fs'
105
+ import { fileURLToPath } from 'node:url'
106
+
107
+ const svg = readFileSync(
108
+ fileURLToPath(import.meta.resolve(getAssetPath('VN', 'logo'))),
109
+ 'utf8',
110
+ )
116
111
  ```
117
112
 
118
- For a full list of functions and the data structures they return, please see the [API Reference](./API.md).
113
+ 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).
119
114
 
120
115
  ## Contributing
121
116
 
122
117
  Contributions are welcome!
123
118
 
124
- 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.
119
+ 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.
125
120
 
126
121
  ## License
127
122