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.
- package/AIRLINES.md +43 -9
- package/API.md +151 -91
- package/README.md +49 -54
- package/dist/airlines.json +1 -1943
- package/dist/assets/aer-lingus/icon.svg +1 -1
- package/dist/assets/aerolineas-argentinas/icon-mono.svg +1 -0
- package/dist/assets/aerolineas-argentinas/logo-mono.svg +1 -0
- package/dist/assets/aeromexico/icon-mono.svg +1 -0
- package/dist/assets/aeromexico/logo-mono.svg +1 -0
- package/dist/assets/air-algerie/icon-mono.svg +1 -0
- package/dist/assets/air-algerie/logo-mono.svg +1 -0
- package/dist/assets/air-arabia/icon-mono.svg +1 -0
- package/dist/assets/air-arabia/icon.svg +1 -0
- package/dist/assets/air-arabia/logo-mono.svg +1 -0
- package/dist/assets/air-arabia/logo.svg +1 -0
- package/dist/assets/air-astana/icon-mono.svg +1 -0
- package/dist/assets/air-astana/logo-mono.svg +1 -0
- package/dist/assets/air-astana/logo.svg +1 -0
- package/dist/assets/air-berlin/icon-mono.svg +1 -0
- package/dist/assets/air-berlin/icon.svg +1 -0
- package/dist/assets/air-berlin/logo-mono.svg +1 -0
- package/dist/assets/air-berlin/logo.svg +1 -0
- package/dist/assets/air-canada/icon-mono.svg +1 -0
- package/dist/assets/air-china/icon-mono.svg +1 -0
- package/dist/assets/air-china/icon.svg +1 -0
- package/dist/assets/air-china/logo-mono.svg +1 -0
- package/dist/assets/air-china/logo.svg +1 -0
- package/dist/assets/air-dolomiti/icon-mono.svg +1 -0
- package/dist/assets/air-dolomiti/logo-mono.svg +1 -0
- package/dist/assets/air-dolomiti/logo.svg +1 -0
- package/dist/assets/air-europa/icon-mono.svg +1 -0
- package/dist/assets/air-europa/logo-mono.svg +1 -0
- package/dist/assets/air-france/icon-mono.svg +1 -0
- package/dist/assets/air-france/icon.svg +1 -1
- package/dist/assets/air-france/logo.svg +1 -1
- package/dist/assets/air-india/icon.svg +1 -1
- package/dist/assets/air-india/logo.svg +1 -1
- package/dist/assets/air-mauritius/icon-mono.svg +1 -0
- package/dist/assets/air-mauritius/logo-mono.svg +1 -0
- package/dist/assets/air-new-zealand/icon-mono.svg +1 -0
- package/dist/assets/air-new-zealand/logo-mono.svg +1 -0
- package/dist/assets/air-serbia/icon-mono.svg +1 -0
- package/dist/assets/air-serbia/logo-mono.svg +1 -0
- package/dist/assets/air-transat/icon-mono.svg +1 -0
- package/dist/assets/airasia/logo-mono.svg +1 -0
- package/dist/assets/airbaltic/logo-mono.svg +1 -0
- package/dist/assets/akasa-air/icon-mono.svg +1 -0
- package/dist/assets/alaska-airlines/logo-mono.svg +1 -0
- package/dist/assets/all-nippon-airways/logo.svg +1 -1
- package/dist/assets/american-airlines/icon-mono.svg +1 -0
- package/dist/assets/american-airlines/icon.svg +1 -0
- package/dist/assets/american-airlines/logo-mono.svg +1 -0
- package/dist/assets/american-airlines/logo.svg +1 -0
- package/dist/assets/asiana-airlines/icon-mono.svg +1 -0
- package/dist/assets/austrian-airlines/icon-mono.svg +1 -0
- package/dist/assets/austrian-airlines/icon.svg +1 -0
- package/dist/assets/austrian-airlines/logo.svg +1 -0
- package/dist/assets/avianca/icon-mono.svg +1 -0
- package/dist/assets/avianca/logo-mono.svg +1 -0
- package/dist/assets/azul/icon.svg +1 -0
- package/dist/assets/azul/logo.svg +1 -0
- package/dist/assets/british-airways/logo.svg +1 -1
- package/dist/assets/brussels-airlines/icon-mono.svg +1 -0
- package/dist/assets/cathay-pacific/icon-mono.svg +1 -0
- package/dist/assets/cathay-pacific/logo-mono.svg +1 -0
- package/dist/assets/cebu-pacific/icon-mono.svg +1 -0
- package/dist/assets/cebu-pacific/icon.svg +1 -0
- package/dist/assets/cebu-pacific/logo-mono.svg +1 -0
- package/dist/assets/cebu-pacific/logo.svg +1 -0
- package/dist/assets/china-airlines/icon.svg +1 -0
- package/dist/assets/china-airlines/logo.svg +1 -0
- package/dist/assets/china-eastern-airlines/icon.svg +1 -0
- package/dist/assets/china-eastern-airlines/logo.svg +1 -0
- package/dist/assets/china-southern-airlines/icon.svg +1 -0
- package/dist/assets/china-southern-airlines/logo-mono.svg +1 -0
- package/dist/assets/china-southern-airlines/logo.svg +1 -0
- package/dist/assets/china-southern-airlines/tail.svg +1 -0
- package/dist/assets/condor/icon-mono.svg +1 -0
- package/dist/assets/condor/icon.svg +1 -0
- package/dist/assets/condor/logo-mono.svg +1 -0
- package/dist/assets/condor/logo.svg +1 -0
- package/dist/assets/copa-airlines/icon-mono.svg +1 -0
- package/dist/assets/copa-airlines/logo-mono.svg +1 -0
- package/dist/assets/delta-air-lines/icon-mono.svg +1 -0
- package/dist/assets/delta-air-lines/icon.svg +1 -0
- package/dist/assets/delta-air-lines/logo-mono.svg +1 -0
- package/dist/assets/delta-air-lines/logo.svg +1 -0
- package/dist/assets/easyjet/icon.svg +1 -0
- package/dist/assets/easyjet/logo-mono.svg +1 -0
- package/dist/assets/easyjet/logo.svg +1 -0
- package/dist/assets/egyptair/icon-mono.svg +1 -0
- package/dist/assets/egyptair/icon.svg +1 -0
- package/dist/assets/egyptair/logo-mono.svg +1 -0
- package/dist/assets/egyptair/logo.svg +1 -0
- package/dist/assets/emirates/icon-mono.svg +1 -0
- package/dist/assets/emirates/logo-mono.svg +1 -0
- package/dist/assets/etihad-airways/logo-mono.svg +1 -0
- package/dist/assets/etihad-airways/logo.svg +1 -1
- package/dist/assets/eva-air/icon.svg +1 -0
- package/dist/assets/eva-air/logo-mono.svg +1 -0
- package/dist/assets/eva-air/logo.svg +1 -0
- package/dist/assets/eva-air/tail.svg +1 -0
- package/dist/assets/ewa-air/logo-mono.svg +1 -0
- package/dist/assets/fiji-airways/icon-mono.svg +1 -0
- package/dist/assets/fiji-airways/logo-mono.svg +1 -0
- package/dist/assets/fiji-airways/logo.svg +1 -0
- package/dist/assets/finnair/icon-mono.svg +1 -0
- package/dist/assets/finnair/logo-mono.svg +1 -0
- package/dist/assets/flybe/logo-mono.svg +1 -0
- package/dist/assets/flybe/logo.svg +1 -0
- package/dist/assets/flydubai/logo.svg +1 -0
- package/dist/assets/flynas/icon-mono.svg +1 -0
- package/dist/assets/flynas/logo-mono.svg +1 -0
- package/dist/assets/frontier-airlines/icon-mono.svg +1 -0
- package/dist/assets/frontier-airlines/icon.svg +1 -0
- package/dist/assets/frontier-airlines/logo-mono.svg +1 -0
- package/dist/assets/frontier-airlines/logo.svg +1 -0
- package/dist/assets/gol/icon.svg +1 -0
- package/dist/assets/gol/logo.svg +1 -0
- package/dist/assets/hainan-airlines/icon-mono.svg +1 -0
- package/dist/assets/hainan-airlines/icon.svg +1 -0
- package/dist/assets/hainan-airlines/logo-mono.svg +1 -0
- package/dist/assets/hainan-airlines/logo.svg +1 -0
- package/dist/assets/hawaiian-airlines/icon.svg +1 -0
- package/dist/assets/hawaiian-airlines/logo.svg +1 -0
- package/dist/assets/icelandair/icon-mono.svg +1 -0
- package/dist/assets/icelandair/logo-mono.svg +1 -0
- package/dist/assets/icelandair/tail-mono.svg +1 -0
- package/dist/assets/indigo/icon-mono.svg +1 -0
- package/dist/assets/indigo/logo-mono.svg +1 -0
- package/dist/assets/ita-airways/logo.svg +1 -0
- package/dist/assets/japan-airlines/icon-mono.svg +1 -0
- package/dist/assets/jet2com/icon-mono.svg +1 -0
- package/dist/assets/jet2com/icon.svg +1 -0
- package/dist/assets/jet2com/logo-mono.svg +1 -0
- package/dist/assets/jet2com/logo.svg +1 -0
- package/dist/assets/jetblue-airways/logo-mono.svg +1 -0
- package/dist/assets/jetblue-airways/logo.svg +1 -0
- package/dist/assets/jetstar/icon-mono.svg +1 -0
- package/dist/assets/jetstar/icon.svg +1 -1
- package/dist/assets/jetstar/logo-mono.svg +1 -1
- package/dist/assets/jetstar/logo.svg +1 -1
- package/dist/assets/kenya-airways/icon-mono.svg +1 -0
- package/dist/assets/kenya-airways/logo-mono.svg +1 -0
- package/dist/assets/klm/icon-mono.svg +1 -0
- package/dist/assets/klm/logo-mono.svg +1 -0
- package/dist/assets/korean-air/icon-mono.svg +1 -0
- package/dist/assets/korean-air/logo-mono.svg +1 -0
- package/dist/assets/kuwait-airways/icon-mono.svg +1 -0
- package/dist/assets/kuwait-airways/logo-mono.svg +1 -0
- package/dist/assets/lion-air/icon-mono.svg +1 -0
- package/dist/assets/lion-air/icon.svg +1 -0
- package/dist/assets/lion-air/logo-mono.svg +1 -0
- package/dist/assets/lion-air/logo.svg +1 -0
- package/dist/assets/lot-polish-airlines/icon-mono.svg +1 -0
- package/dist/assets/lot-polish-airlines/logo-mono.svg +1 -0
- package/dist/assets/lufthansa/icon-mono.svg +1 -0
- package/dist/assets/lufthansa/logo-mono.svg +1 -0
- package/dist/assets/malaysia-airlines/icon-mono.svg +1 -0
- package/dist/assets/malaysia-airlines/logo-mono.svg +1 -0
- package/dist/assets/myanmar-national-airlines/icon-mono.svg +1 -0
- package/dist/assets/norwegian-air-shuttle/icon.svg +1 -0
- package/dist/assets/norwegian-air-shuttle/logo-mono.svg +1 -0
- package/dist/assets/norwegian-air-shuttle/logo.svg +1 -0
- package/dist/assets/pacific-airlines/icon-mono.svg +1 -0
- package/dist/assets/pacific-airlines/icon.svg +1 -0
- package/dist/assets/pacific-airlines/logo-mono.svg +1 -0
- package/dist/assets/pacific-airlines/logo.svg +1 -0
- package/dist/assets/paranair/icon-mono.svg +1 -0
- package/dist/assets/peach-aviation/logo-mono.svg +1 -0
- package/dist/assets/pegasus-airlines/icon-mono.svg +1 -0
- package/dist/assets/pegasus-airlines/icon.svg +1 -0
- package/dist/assets/pegasus-airlines/logo-mono.svg +1 -0
- package/dist/assets/pegasus-airlines/logo.svg +1 -0
- package/dist/assets/qantas/logo.svg +1 -0
- package/dist/assets/riyadh-air/icon-mono.svg +1 -0
- package/dist/assets/riyadh-air/logo-mono.svg +1 -0
- package/dist/assets/royal-air-maroc/icon-mono.svg +1 -0
- package/dist/assets/royal-air-maroc/logo-mono.svg +1 -0
- package/dist/assets/ryanair/icon-mono.svg +1 -0
- package/dist/assets/saudia/icon-mono.svg +1 -0
- package/dist/assets/saudia/logo-mono.svg +1 -0
- package/dist/assets/saudia/logo.svg +1 -0
- package/dist/assets/scandinavian-airlines/logo-mono.svg +1 -0
- package/dist/assets/singapore-airlines/icon-mono.svg +1 -0
- package/dist/assets/spirit-airlines/logo-mono.svg +1 -0
- package/dist/assets/spirit-airlines/logo.svg +1 -0
- package/dist/assets/sun-phuquoc-airways/icon-mono.svg +1 -0
- package/dist/assets/swiss/icon-mono.svg +1 -0
- package/dist/assets/swiss/logo-mono.svg +1 -0
- package/dist/assets/tarom/icon-mono.svg +1 -0
- package/dist/assets/tarom/logo-mono.svg +1 -0
- package/dist/assets/tarom/tail-mono.svg +1 -0
- package/dist/assets/thai-airways/icon.svg +1 -1
- package/dist/assets/thai-airways/logo-mono.svg +1 -0
- package/dist/assets/thai-airways/logo.svg +1 -0
- package/dist/assets/transavia/icon-mono.svg +1 -0
- package/dist/assets/transavia/logo-mono.svg +1 -0
- package/dist/assets/united-airlines/icon-mono.svg +1 -0
- package/dist/assets/united-airlines/logo-mono.svg +1 -0
- package/dist/assets/vietjet-air/logo-mono.svg +1 -0
- package/dist/assets/vietjet-air/logo.svg +1 -1
- package/dist/assets/vietnam-airlines/icon-mono.svg +1 -0
- package/dist/assets/vietravel-airlines/icon-mono.svg +1 -0
- package/dist/assets/vietravel-airlines/icon.svg +1 -0
- package/dist/assets/vietravel-airlines/logo-mono.svg +1 -0
- package/dist/assets/vietravel-airlines/logo.svg +1 -0
- package/dist/assets/virgin-australia/icon-mono.svg +1 -0
- package/dist/assets/viva/icon-mono.svg +1 -0
- package/dist/assets/viva/icon.svg +1 -0
- package/dist/assets/viva/logo-mono.svg +1 -0
- package/dist/assets/viva/logo.svg +1 -0
- package/dist/assets/volaris/icon.svg +1 -0
- package/dist/assets/volaris/logo.svg +1 -0
- package/dist/assets/volotea/icon-mono.svg +1 -0
- package/dist/assets/volotea/icon.svg +1 -0
- package/dist/assets/volotea/logo-mono.svg +1 -0
- package/dist/assets/volotea/logo.svg +1 -0
- package/dist/assets/vueling/logo.svg +1 -0
- package/dist/assets/westjet/icon.svg +1 -1
- package/dist/assets/wizz-air/logo-mono.svg +1 -0
- package/dist/assets/xiamenair/icon-mono.svg +1 -0
- package/dist/index.cjs +54 -111
- package/dist/index.d.cts +76 -0
- package/dist/index.d.ts +65 -56
- package/dist/index.js +55 -120
- package/dist/svg-validator.cjs +37 -13
- package/dist/svg-validator.d.cts +11 -0
- package/dist/svg-validator.d.ts +9 -9
- package/dist/svg-validator.js +36 -12
- package/package.json +47 -19
- 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 |  | ✅ | ✅ | |
|
|
11
11
|
| [Air Albania](https://www.airalbania.com.al) 🇦🇱 | AL | ZB | ABN | |  | ✅ | ✅ | |
|
|
12
12
|
| [Air Algérie](https://airalgerie.dz) 🇩🇿 | DZ | AH | DAH | |  | ✅ | ✅ | |
|
|
13
|
-
| [Air
|
|
13
|
+
| [Air Arabia](https://www.airarabia.com) | AE | G9 | ABY | |  | ✅ | ✅ | |
|
|
14
|
+
| [Air Astana](https://airastana.com) 🇰🇿 | KZ | KC | KZR | |  | ✅ | ✅ | |
|
|
15
|
+
| [Air Berlin](https://www.airberlin.com) | DE | AB | BER | oneworld |  | ✅ | ✅ | |
|
|
14
16
|
| [Air Canada](https://www.aircanada.com) 🇨🇦 | CA | AC | ACA | Star Alliance |  | ✅ | ✅ | |
|
|
15
|
-
| [Air
|
|
17
|
+
| [Air China](https://www.airchina.com) 🇨🇳 | CN | CA | CCA | Star Alliance |  | ✅ | ✅ | |
|
|
18
|
+
| [Air Dolomiti](https://www.airdolomiti.eu) | IT | EN | DLA | |  | ✅ | ✅ | |
|
|
16
19
|
| [Air Europa](https://www.aireuropa.com) | ES | UX | AEA | SkyTeam |  | ✅ | ✅ | |
|
|
17
20
|
| [Air France](https://airfrance.com) 🇫🇷 | FR | AF | AFR | SkyTeam |  | ✅ | ✅ | |
|
|
18
21
|
| [Air India](https://www.airindia.com) 🇮🇳 | IN | AI | AIC | Star Alliance |  | ✅ | ✅ | |
|
|
@@ -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 | |  | ✅ | ✅ | |
|
|
30
33
|
| [Alaska Airlines](https://www.alaskaair.com) | US | AS | ASA | oneworld |  | | ✅ | |
|
|
31
34
|
| [All Nippon Airways](https://www.ana.co.jp) | JP | NH | ANA | Star Alliance |  | | ☑️ | |
|
|
35
|
+
| [American Airlines](https://www.aa.com) | US | AA | AAL | oneworld |  | ✅ | ✅ | |
|
|
32
36
|
| [Asiana Airlines](https://flyasiana.com) | KR | OZ | AAR | Star Alliance |  | ✅ | ✅ | |
|
|
33
37
|
| [Atlantic Airways](https://www.atlanticairways.com) 🇫🇴 | FO | RC | FLI | |  | ✅ | ✅ | |
|
|
38
|
+
| [Austrian Airlines](https://www.austrian.com) 🇦🇹 | AT | OS | AUA | Star Alliance |  | ✅ | ☑️ | |
|
|
34
39
|
| [avianca](https://www.avianca.com) 🇨🇴 | CO | AV | AVA | Star Alliance |  | ✅ | ✅ | |
|
|
35
40
|
| Avianca Costa Rica 🇨🇷 | CR | LR | LRC | |  | ✅ | ✅ | |
|
|
36
41
|
| Avianca Ecuador | EC | 2K | GLG | |  | ✅ | ✅ | |
|
|
37
42
|
| Avianca El Salvador 🇸🇻 | SV | TA | TAI | |  | ✅ | ✅ | |
|
|
38
43
|
| [Azerbaijan Airlines](https://azal.az) 🇦🇿 | AZ | J2 | AHY | |  | ✅ | ✅ | |
|
|
44
|
+
| [Azul](https://www.voeazul.com.br) | BR | AD | AZU | |  | ☑️ | ☑️ | |
|
|
39
45
|
| [Bamboo Airways](https://www.bambooairways.com) | VN | QH | BAV | |  | ☑️ | ☑️ | |
|
|
40
46
|
| [Bangkok Airways](https://www.bangkokair.com) | TH | PG | BKP | |  | ✅ | ✅ | |
|
|
41
47
|
| [British Airways](https://www.britishairways.com) 🇬🇧 | GB | BA | BAW | oneworld |  | ✅ | ✅ | |
|
|
42
48
|
| [Brussels Airlines](https://www.brusselsairlines.com) 🇧🇪 | BE | SN | BEL | Star Alliance |  | ✅ | ✅ | |
|
|
43
49
|
| [Cathay Pacific](https://www.cathaypacific.com) 🇭🇰 | HK | CX | CPA | oneworld |  | ✅ | ✅ | |
|
|
50
|
+
| [Cebu Pacific](https://www.cebupacificair.com) | PH | 5J | CEB | |  | ✅ | ✅ | |
|
|
51
|
+
| [China Airlines](https://www.china-airlines.com) 🇹🇼 | TW | CI | CAL | SkyTeam |  | ☑️ | ☑️ | |
|
|
52
|
+
| [China Eastern Airlines](https://www.ceair.com) | CN | MU | CES | SkyTeam |  | ☑️ | ☑️ | |
|
|
53
|
+
| [China Southern Airlines](https://www.csair.com) | CN | CZ | CSN | |  | ☑️ | ✅ | ☑️ |
|
|
54
|
+
| [Condor](https://www.condor.com) | DE | DE | CFG | |  | ✅ | ✅ | |
|
|
44
55
|
| [Copa Airlines](https://www.copaair.com) 🇵🇦 | PA | CM | CMP | Star Alliance |  | ✅ | ✅ | |
|
|
56
|
+
| [Delta Air Lines](https://www.delta.com) | US | DL | DAL | SkyTeam |  | ✅ | ✅ | |
|
|
57
|
+
| [easyJet](https://www.easyjet.com) | GB | U2 | EZY | |  | ☑️ | ✅ | |
|
|
58
|
+
| [EgyptAir](https://www.egyptair.com) 🇪🇬 | EG | MS | MSR | Star Alliance |  | ✅ | ✅ | |
|
|
45
59
|
| [Emirates](https://www.emirates.com) 🇦🇪 | AE | EK | UAE | |  | ✅ | ✅ | |
|
|
46
60
|
| [Ethiopian Airlines](https://www.ethiopianairlines.com) 🇪🇹 | ET | ET | ETH | Star Alliance |  | ✅ | ✅ | |
|
|
47
61
|
| [Etihad Airways](https://www.etihad.com) 🇦🇪 | AE | EY | ETD | |  | | ✅ | |
|
|
48
62
|
| [Eurowings](https://www.eurowings.com) | DE | EW | EWG | |  | ✅ | ✅ | |
|
|
63
|
+
| [EVA Air](https://www.evaair.com) | TW | BR | EVA | Star Alliance |  | ☑️ | ✅ | ☑️ |
|
|
49
64
|
| [Ewa Air](https://ewa-air.com) | FR | ZD | EWR | |  | | ✅ | |
|
|
50
|
-
| [Fiji Airways](https://www.fijiairways.com) 🇫🇯 | FJ | FJ | FJI | oneworld |  | ✅ |
|
|
51
|
-
| [Finnair](
|
|
65
|
+
| [Fiji Airways](https://www.fijiairways.com) 🇫🇯 | FJ | FJ | FJI | oneworld |  | ✅ | ✅ | |
|
|
66
|
+
| [Finnair](https://www.finnair.com) 🇫🇮 | FI | AY | FIN | oneworld |  | ✅ | ✅ | |
|
|
52
67
|
| [Firefly](https://www.fireflyz.com.my) | MY | FY | FFM | |  | ✅ | ✅ | |
|
|
68
|
+
| [Flybe](https://www.flybe.com) | GB | BE | BEE | |  | | ✅ | |
|
|
69
|
+
| [flydubai](https://www.flydubai.com) | AE | FZ | FDB | |  | | ☑️ | |
|
|
53
70
|
| [flynas](https://www.flynas.com) | SA | XY | KNE | |  | ✅ | ✅ | |
|
|
71
|
+
| [Frontier Airlines](https://www.flyfrontier.com) | US | F9 | FFT | |  | ✅ | ✅ | |
|
|
54
72
|
| [Garuda Indonesia](https://www.garuda-indonesia.com) 🇮🇩 | ID | GA | GIA | SkyTeam |  | ✅ | ✅ | |
|
|
73
|
+
| [GOL](https://www.voegol.com.br) | BR | G3 | GLO | |  | ☑️ | ☑️ | |
|
|
74
|
+
| [Hainan Airlines](https://www.hainanairlines.com) | CN | HU | CHH | |  | ✅ | ✅ | |
|
|
75
|
+
| [Hawaiian Airlines](https://www.hawaiianairlines.com) | US | HA | HAL | oneworld |  | ☑️ | ☑️ | |
|
|
55
76
|
| [HK Express](https://www.hkexpress.com) | HK | UO | HKE | |  | ✅ | ✅ | |
|
|
56
|
-
| [Iberia](https://www.iberia.com) 🇪🇸 | ES | IB | IBE | oneworld |
|
|
77
|
+
| [Iberia](https://www.iberia.com) 🇪🇸 | ES | IB | IBE | oneworld |  | ✅ | ✅ | |
|
|
57
78
|
| [Icelandair](https://www.icelandair.com) 🇮🇸 | IS | FI | ICE | |  | ✅ | ✅ | ✅ |
|
|
58
79
|
| [IndiGo](https://www.goindigo.in) | IN | 6E | IGO | |  | ✅ | ✅ | |
|
|
80
|
+
| [ITA Airways](https://www.ita-airways.com) 🇮🇹 | IT | AZ | ITY | Star Alliance |  | | ☑️ | |
|
|
59
81
|
| [Japan Airlines](https://www.jal.co.jp) 🇯🇵 | JP | JL | JAL | oneworld |  | ✅ | ✅ | |
|
|
82
|
+
| [Jet2.com](https://www.jet2.com) | GB | LS | EXS | |  | ✅ | ✅ | |
|
|
83
|
+
| [JetBlue Airways](https://www.jetblue.com) | US | B6 | JBU | |  | | ✅ | |
|
|
60
84
|
| [Jetstar](https://www.jetstar.com) | AU | JQ | JST | |  | ✅ | ✅ | |
|
|
61
85
|
| Jetstar Japan | JP | GK | JJP | |  | ✅ | ✅ | |
|
|
62
86
|
| [Kenya Airways](https://www.kenya-airways.com) 🇰🇪 | KE | KQ | KQA | SkyTeam |  | ✅ | ✅ | |
|
|
@@ -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 | |  | ✅ | ✅ | |
|
|
70
94
|
| LATAM Airlines Perú | PE | LP | LPE | |  | ✅ | ✅ | |
|
|
71
95
|
| LATAM Airlines Paraguay | PY | PZ | LAP | |  | ✅ | ✅ | |
|
|
96
|
+
| [Lion Air](https://www.lionair.co.id) | ID | JT | LNI | |  | ✅ | ✅ | |
|
|
72
97
|
| [LOT Polish Airlines](https://www.lot.com) 🇵🇱 | PL | LO | LOT | Star Alliance |  | ✅ | ✅ | |
|
|
73
98
|
| [Lufthansa](https://www.lufthansa.com) 🇩🇪 | DE | LH | DLH | Star Alliance |  | ✅ | ✅ | |
|
|
74
99
|
| [Malaysia Airlines](https://www.malaysiaairlines.com) 🇲🇾 | MY | MH | MAS | oneworld |  | ✅ | ✅ | |
|
|
75
100
|
| [Myanmar National Airlines](https://www.flymna.com) 🇲🇲 | MM | UB | UBA | |  | ✅ | ✅ | |
|
|
101
|
+
| [Norwegian Air Shuttle](https://www.norwegian.com) | NO | DY | NOZ | |  | ☑️ | ✅ | |
|
|
76
102
|
| [Oman Air](https://www.omanair.com) 🇴🇲 | OM | WY | OMA | oneworld |  | ✅ | ✅ | |
|
|
103
|
+
| [Pacific Airlines](https://www.pacificairlines.com) | VN | BL | PIC | |  | ✅ | ✅ | |
|
|
77
104
|
| [Paranair](https://www.paranair.com) | PY | ZP | AZP | |  | ✅ | ✅ | |
|
|
78
105
|
| [Peach Aviation](https://www.flypeach.com) | JP | MM | APJ | |  | | ✅ | |
|
|
106
|
+
| [Pegasus Airlines](https://www.flypgs.com) | TR | PC | PGT | |  | ✅ | ✅ | |
|
|
79
107
|
| [Philippine Airlines](https://www.philippineairlines.com) 🇵🇭 | PH | PR | PAL | |  | ✅ | ✅ | |
|
|
80
|
-
| [Qantas](https://www.qantas.com) 🇦🇺 | AU | QF | QFA | oneworld |
|
|
108
|
+
| [Qantas](https://www.qantas.com) 🇦🇺 | AU | QF | QFA | oneworld |  | ☑️ | ✅ | |
|
|
81
109
|
| [Qatar Airways](https://www.qatarairways.com) 🇶🇦 | QA | QR | QTR | oneworld |  | ✅ | ✅ | |
|
|
82
110
|
| [Riyadh Air](https://www.riyadhair.com) 🇸🇦 | SA | RX | RXI | |  | ✅ | ✅ | |
|
|
83
111
|
| [Royal Air Maroc](https://www.royalairmaroc.com) 🇲🇦 | MA | AT | RAM | SkyTeam |  | ✅ | ✅ | ☑️ |
|
|
84
112
|
| [Royal Brunei Airlines](https://www.flyroyalbrunei.com) | BN | BI | RBA | |  | | ☑️ | |
|
|
85
113
|
| [Ryanair](https://www.ryanair.com) | IE | FR | RYR | |  | ✅ | ✅ | |
|
|
86
|
-
| [Saudia](https://www.saudia.com) 🇸🇦 | SA | SV | SVA | SkyTeam |  | ✅ |
|
|
114
|
+
| [Saudia](https://www.saudia.com) 🇸🇦 | SA | SV | SVA | SkyTeam |  | ✅ | ✅ | |
|
|
87
115
|
| [Scandinavian Airlines](https://www.flysas.com) 🇩🇰 🇳🇴 🇸🇪 | DK,NO,SE | SK | SAS | Star Alliance |  | | ✅ | |
|
|
88
116
|
| SAS Connect | IE | SL | SZS | |  | | ✅ | |
|
|
89
117
|
| [Scoot](https://www.flyscoot.com) | SG | TR | TGW | Value Alliance |  | | ☑️ | |
|
|
90
118
|
| [Singapore Airlines](https://www.singaporeair.com) 🇸🇬 | SG | SQ | SIA | Star Alliance |  | ✅ | ✅ | |
|
|
91
|
-
| [Southwest Airlines](https://www.southwest.com) | US | WN | SWA | |  |
|
|
119
|
+
| [Southwest Airlines](https://www.southwest.com) | US | WN | SWA | |  | ☑️ | ☑️ | |
|
|
120
|
+
| [Spirit Airlines](https://www.spirit.com) | US | NK | NKS | |  | | ✅ | |
|
|
92
121
|
| [Starlux Airlines](https://www.starlux-airlines.com) | TW | JX | SJX | |  | ✅ | ✅ | |
|
|
93
122
|
| [Sun PhuQuoc Airways](https://www.sunphuquocairways.com) | VN | 9G | SPQ | |  | ✅ | ✅ | |
|
|
94
123
|
| [SWISS](https://www.swiss.com) 🇨🇭 | CH | LX | SWR | Star Alliance |  | ✅ | ✅ | |
|
|
95
124
|
| [T'way Air](https://www.twayair.com) | KR | TW | TWB | |  | | ✅ | |
|
|
96
125
|
| [TAP Air Portugal](https://www.tapairportugal.com) 🇵🇹 | PT | TP | TAP | Star Alliance |  | ☑️ | ☑️ | |
|
|
97
126
|
| [TAROM](https://www.tarom.ro) 🇷🇴 | RO | RO | ROT | SkyTeam |  | ✅ | ✅ | ✅ |
|
|
98
|
-
| [Thai Airways](https://www.thaiairways.com) 🇹🇭 | TH | TG | THA | Star Alliance |  🇹🇭 | TH | TG | THA | Star Alliance |  | ☑️ | ✅ | |
|
|
99
128
|
| [Transavia](https://www.transavia.com) | NL | HV | TRA | |  | ✅ | ✅ | |
|
|
100
129
|
| [Turkish Airlines](https://www.turkishairlines.com) 🇹🇷 | TR | TK | THY | Star Alliance |  | ✅ | ✅ | |
|
|
101
130
|
| [United Airlines](https://www.united.com) | US | UA | UAL | Star Alliance |  | ✅ | ✅ | |
|
|
102
131
|
| [VietJet Air](https://www.vietjetair.com) | VN | VJ | VJC | |  | | ✅ | |
|
|
103
132
|
| [Vietnam Airlines](https://www.vietnamairlines.com) 🇻🇳 | VN | VN | HVN | SkyTeam |  | ✅ | ✅ | |
|
|
133
|
+
| [Vietravel Airlines](https://www.vietravelairlines.com) | VN | VU | VAG | |  | ✅ | ✅ | |
|
|
104
134
|
| [Virgin Atlantic](https://www.virginatlantic.com) | GB | VS | VIR | SkyTeam |  | ✅ | ✅ | |
|
|
105
135
|
| [Virgin Australia](https://www.virginaustralia.com) | AU | VA | VOZ | |  | ✅ | ✅ | |
|
|
136
|
+
| [Viva](https://www.vivaaerobus.com) | MX | VB | VIV | |  | ✅ | ✅ | |
|
|
137
|
+
| [Volaris](https://www.volaris.com) | MX | Y4 | VOI | |  | ☑️ | ☑️ | |
|
|
138
|
+
| [Volotea](https://www.volotea.com) | ES | V7 | VOE | |  | ✅ | ✅ | |
|
|
139
|
+
| [Vueling](https://www.vueling.com) | ES | VY | VLG | |  | | ☑️ | |
|
|
106
140
|
| [WestJet](https://www.westjet.com) | CA | WS | WJA | |  | ✅ | ✅ | |
|
|
107
141
|
| [Wizz Air](https://www.wizzair.com) | HU | W6 | WZZ | |  | | ✅ | |
|
|
108
142
|
| Wizz Air Abu Dhabi | AE | 5W | WAZ | |  | | ✅ | |
|
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
|
|
15
|
+
Returns every airline, sorted by name.
|
|
16
|
+
|
|
17
|
+
- **Returns:** `Airline[]` (see [Airline](#airline))
|
|
10
18
|
|
|
11
|
-
|
|
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
|
-
|
|
21
|
+
```js
|
|
22
|
+
const all = listAirlines()
|
|
23
|
+
const skyTeam = all.filter((airline) => airline.alliance === 'SkyTeam')
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### `getAirline(query)`
|
|
14
27
|
|
|
15
|
-
|
|
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
|
-
|
|
18
|
-
|
|
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
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
### `
|
|
45
|
+
### `getAssetPath(airline, type, options?)`
|
|
29
46
|
|
|
30
|
-
|
|
47
|
+
Returns the package path of one SVG file, ready to pass to `require.resolve`, `import.meta.resolve` or your bundler.
|
|
31
48
|
|
|
32
|
-
- **
|
|
33
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
61
|
+
#### Using the path
|
|
40
62
|
|
|
41
|
-
|
|
63
|
+
```js
|
|
64
|
+
// Node: read the SVG markup
|
|
65
|
+
import { readFileSync } from 'node:fs'
|
|
66
|
+
import { fileURLToPath } from 'node:url'
|
|
42
67
|
|
|
43
|
-
|
|
44
|
-
|
|
68
|
+
const svg = readFileSync(
|
|
69
|
+
fileURLToPath(import.meta.resolve(getAssetPath('VN', 'logo'))),
|
|
70
|
+
'utf8',
|
|
71
|
+
)
|
|
45
72
|
|
|
46
|
-
|
|
47
|
-
const
|
|
73
|
+
// CommonJS
|
|
74
|
+
const svg = readFileSync(require.resolve(getAssetPath('VN', 'logo')), 'utf8')
|
|
48
75
|
|
|
49
|
-
//
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
|
88
|
+
### Airline
|
|
69
89
|
|
|
70
|
-
The
|
|
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
|
-
"
|
|
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
|
-
|
|
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
|
-
|
|
163
|
+
## Migrating from the old API
|
|
93
164
|
|
|
94
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
|
|
180
|
+
Two behaviors changed along the way:
|
|
119
181
|
|
|
120
|
-
|
|
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
|
-
|
|
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
|
-
|
|
187
|
+
Before:
|
|
130
188
|
|
|
131
|
-
|
|
189
|
+
```js
|
|
190
|
+
import { listAirlines, getAssetContent } from 'soaring-symbols'
|
|
132
191
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
198
|
+
After:
|
|
141
199
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
|
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
|
-
##
|
|
14
|
+
## Website
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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,
|
|
69
|
+
import { listAirlines, getAirline, getAssetPath } from 'soaring-symbols'
|
|
47
70
|
|
|
48
|
-
//
|
|
71
|
+
// Every airline, sorted by name
|
|
49
72
|
const all = listAirlines()
|
|
50
73
|
|
|
51
|
-
//
|
|
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
|
-
//
|
|
98
|
-
|
|
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
|
-
|
|
101
|
-
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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/
|
|
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
|
|