unite-lib 1.0.3 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +248 -203
- package/dist/i18n/index.cjs +116 -6
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +12 -3
- package/dist/i18n/index.d.ts +12 -3
- package/dist/i18n/index.global.js +114 -6
- package/dist/i18n/index.global.js.map +1 -1
- package/dist/i18n/index.js +114 -6
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.cjs +112 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.global.js +109 -17
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +109 -17
- package/dist/index.js.map +1 -1
- package/maps/map-groudon/map-groudon@1x.png +0 -0
- package/maps/map-groudon/map-groudon@2x.png +0 -0
- package/maps/map-groudon/map-groudon@4x.png +0 -0
- package/maps/map-kyogre/map-kyogre@1x.png +0 -0
- package/maps/map-kyogre/map-kyogre@2x.png +0 -0
- package/maps/map-kyogre/map-kyogre@4x.png +0 -0
- package/maps/map-rayquaza/map-rayquaza@1x.png +0 -0
- package/maps/map-rayquaza/map-rayquaza@2x.png +0 -0
- package/maps/map-rayquaza/map-rayquaza@4x.png +0 -0
- package/moves/moltres_s11.png +0 -0
- package/moves/moltres_s21.png +0 -0
- package/package.json +66 -47
- package/pokemons/roster-moltres-2x.png +0 -0
- package/pokemons/roster-moltres.png +0 -0
- package/pokemons/stat-moltres.png +0 -0
- package/maps/groudon.png +0 -0
package/dist/index.cjs
CHANGED
|
@@ -24,6 +24,9 @@ __export(src_exports, {
|
|
|
24
24
|
Tag: () => Tag,
|
|
25
25
|
getActivePokemons: () => getActivePokemons,
|
|
26
26
|
getImageUrl: () => getImageUrl,
|
|
27
|
+
getMapDescription: () => getMapDescription,
|
|
28
|
+
getMapImageUrl: () => getMapImageUrl,
|
|
29
|
+
getMapName: () => getMapName,
|
|
27
30
|
getPokemonByDex: () => getPokemonByDex,
|
|
28
31
|
getPokemonByName: () => getPokemonByName,
|
|
29
32
|
getPokemonBySlug: () => getPokemonBySlug,
|
|
@@ -741,6 +744,31 @@ var pokemons = [
|
|
|
741
744
|
],
|
|
742
745
|
"difficulty": 1
|
|
743
746
|
},
|
|
747
|
+
{
|
|
748
|
+
"name": "Moltres",
|
|
749
|
+
"dex": 146,
|
|
750
|
+
"images": {
|
|
751
|
+
"main": "pokemons/roster-moltres.png",
|
|
752
|
+
"big": "pokemons/roster-moltres-2x.png",
|
|
753
|
+
"complete": "pokemons/stat-moltres.png",
|
|
754
|
+
"move_s11": "moves/moltres_s11.png",
|
|
755
|
+
"move_s21": "moves/moltres_s21.png"
|
|
756
|
+
},
|
|
757
|
+
"active": true,
|
|
758
|
+
"battleType": BattleType.ALLROUNDER,
|
|
759
|
+
"stats": {
|
|
760
|
+
"offense": 4,
|
|
761
|
+
"endurance": 2.5,
|
|
762
|
+
"mobility": 2,
|
|
763
|
+
"scoring": 2,
|
|
764
|
+
"support": 2
|
|
765
|
+
},
|
|
766
|
+
"tags": [
|
|
767
|
+
Tag.ALLROUNDER,
|
|
768
|
+
Tag.MELEE
|
|
769
|
+
],
|
|
770
|
+
"difficulty": 2
|
|
771
|
+
},
|
|
744
772
|
{
|
|
745
773
|
"name": "Dragonite",
|
|
746
774
|
"dex": 149,
|
|
@@ -769,7 +797,7 @@ var pokemons = [
|
|
|
769
797
|
"difficulty": 1
|
|
770
798
|
},
|
|
771
799
|
{
|
|
772
|
-
"name": "Mewtwo X",
|
|
800
|
+
"name": "Mega Mewtwo X",
|
|
773
801
|
"dex": 150,
|
|
774
802
|
"images": {
|
|
775
803
|
"main": "pokemons/roster-mewtwox.png",
|
|
@@ -796,7 +824,7 @@ var pokemons = [
|
|
|
796
824
|
"difficulty": 1
|
|
797
825
|
},
|
|
798
826
|
{
|
|
799
|
-
"name": "Mewtwo Y",
|
|
827
|
+
"name": "Mega Mewtwo Y",
|
|
800
828
|
"dex": 150,
|
|
801
829
|
"images": {
|
|
802
830
|
"main": "pokemons/roster-mewtwoy.png",
|
|
@@ -2406,22 +2434,37 @@ var moves_default = moves;
|
|
|
2406
2434
|
// src/maps.ts
|
|
2407
2435
|
var maps = [
|
|
2408
2436
|
{
|
|
2409
|
-
id: "
|
|
2410
|
-
name: "
|
|
2411
|
-
image: "maps/
|
|
2412
|
-
|
|
2437
|
+
id: "map-groudon",
|
|
2438
|
+
name: "Theia Sky Ruins",
|
|
2439
|
+
image: "maps/map-groudon/map-groudon@4x.png",
|
|
2440
|
+
images: {
|
|
2441
|
+
"1": "maps/map-groudon/map-groudon@1x.png",
|
|
2442
|
+
"2": "maps/map-groudon/map-groudon@2x.png",
|
|
2443
|
+
"4": "maps/map-groudon/map-groudon@4x.png"
|
|
2444
|
+
},
|
|
2445
|
+
description: "Map with Groudon."
|
|
2413
2446
|
},
|
|
2414
2447
|
{
|
|
2415
|
-
id: "
|
|
2448
|
+
id: "map-kyogre",
|
|
2416
2449
|
name: "Theia Sky Ruins",
|
|
2417
|
-
image: "maps/
|
|
2418
|
-
|
|
2450
|
+
image: "maps/map-kyogre/map-kyogre@4x.png",
|
|
2451
|
+
images: {
|
|
2452
|
+
"1": "maps/map-kyogre/map-kyogre@1x.png",
|
|
2453
|
+
"2": "maps/map-kyogre/map-kyogre@2x.png",
|
|
2454
|
+
"4": "maps/map-kyogre/map-kyogre@4x.png"
|
|
2455
|
+
},
|
|
2456
|
+
description: "Map with Kyogre."
|
|
2419
2457
|
},
|
|
2420
2458
|
{
|
|
2421
|
-
id: "
|
|
2422
|
-
name: "
|
|
2423
|
-
image: "maps/
|
|
2424
|
-
|
|
2459
|
+
id: "map-rayquaza",
|
|
2460
|
+
name: "Theia Sky Ruins",
|
|
2461
|
+
image: "maps/map-rayquaza/map-rayquaza@4x.png",
|
|
2462
|
+
images: {
|
|
2463
|
+
"1": "maps/map-rayquaza/map-rayquaza@1x.png",
|
|
2464
|
+
"2": "maps/map-rayquaza/map-rayquaza@2x.png",
|
|
2465
|
+
"4": "maps/map-rayquaza/map-rayquaza@4x.png"
|
|
2466
|
+
},
|
|
2467
|
+
description: "Map with Rayquaza."
|
|
2425
2468
|
}
|
|
2426
2469
|
];
|
|
2427
2470
|
var maps_default = maps;
|
|
@@ -2433,6 +2476,12 @@ function getImageUrl(pokemon, imageKey, options) {
|
|
|
2433
2476
|
const base = options?.baseUrl?.replace(/\/$/, "");
|
|
2434
2477
|
return base ? `${base}/${path}` : path;
|
|
2435
2478
|
}
|
|
2479
|
+
function getMapImageUrl(map, resolution, options) {
|
|
2480
|
+
const path = resolution && map.images?.[resolution] != null ? map.images[resolution] : map.image;
|
|
2481
|
+
if (path == null || path === "") return "";
|
|
2482
|
+
const base = options?.baseUrl?.replace(/\/$/, "");
|
|
2483
|
+
return base ? `${base}/${path}` : path;
|
|
2484
|
+
}
|
|
2436
2485
|
function getPokemonByName(name) {
|
|
2437
2486
|
return pokemons_default.find((p) => p.name === name);
|
|
2438
2487
|
}
|
|
@@ -2463,10 +2512,23 @@ var names = {};
|
|
|
2463
2512
|
for (const p of pokemons_default) {
|
|
2464
2513
|
names[slugFromMain(p.images.main)] = p.name;
|
|
2465
2514
|
}
|
|
2515
|
+
for (const m of maps_default) {
|
|
2516
|
+
names[m.id] = m.name;
|
|
2517
|
+
if (m.description) names[`${m.id}.description`] = m.description;
|
|
2518
|
+
}
|
|
2466
2519
|
var en_default = names;
|
|
2467
2520
|
|
|
2468
2521
|
// src/i18n/pt-BR.ts
|
|
2469
|
-
var ptBR = {
|
|
2522
|
+
var ptBR = {
|
|
2523
|
+
...en_default,
|
|
2524
|
+
// Maps — names and descriptions
|
|
2525
|
+
"map-groudon": "Ru\xEDnas Celestes de Theia",
|
|
2526
|
+
"map-groudon.description": "Mapa 5v5 com Groudon.",
|
|
2527
|
+
"map-kyogre": "Ru\xEDnas Celestes de Theia",
|
|
2528
|
+
"map-kyogre.description": "Mapa 5v5 com Kyogre.",
|
|
2529
|
+
"map-rayquaza": "Ru\xEDnas Celestes de Theia",
|
|
2530
|
+
"map-rayquaza.description": "Mapa 5v5 com Rayquaza."
|
|
2531
|
+
};
|
|
2470
2532
|
var pt_BR_default = ptBR;
|
|
2471
2533
|
|
|
2472
2534
|
// src/i18n/ja-JP.ts
|
|
@@ -2557,7 +2619,14 @@ var jaJP = {
|
|
|
2557
2619
|
armarouge: "\u30B0\u30EC\u30F3\u30A2\u30EB\u30DE",
|
|
2558
2620
|
ceruledge: "\u30BD\u30A6\u30D6\u30EC\u30A4\u30BA",
|
|
2559
2621
|
tinkaton: "\u30C7\u30AB\u30CC\u30C1\u30E3\u30F3",
|
|
2560
|
-
miraidon: "\u30DF\u30E9\u30A4\u30C9\u30F3"
|
|
2622
|
+
miraidon: "\u30DF\u30E9\u30A4\u30C9\u30F3",
|
|
2623
|
+
// Maps — names and descriptions
|
|
2624
|
+
"map-groudon": "\u30C6\u30A4\u30A2\u306E\u5929\u7A7A\u907A\u8DE1",
|
|
2625
|
+
"map-groudon.description": "\u30B0\u30E9\u30FC\u30C9\u30F3\u304C\u767B\u5834\u3059\u308B5v5\u30DE\u30C3\u30D7\u3002",
|
|
2626
|
+
"map-kyogre": "\u30C6\u30A4\u30A2\u306E\u5929\u7A7A\u907A\u8DE1",
|
|
2627
|
+
"map-kyogre.description": "\u30AB\u30A4\u30AA\u30FC\u30AC\u304C\u767B\u5834\u3059\u308B5v5\u30DE\u30C3\u30D7\u3002",
|
|
2628
|
+
"map-rayquaza": "\u30C6\u30A4\u30A2\u306E\u5929\u7A7A\u907A\u8DE1",
|
|
2629
|
+
"map-rayquaza.description": "\u30EC\u30C3\u30AF\u30A6\u30B6\u304C\u767B\u5834\u3059\u308B5v5\u30DE\u30C3\u30D7\u3002"
|
|
2561
2630
|
};
|
|
2562
2631
|
var ja_JP_default = jaJP;
|
|
2563
2632
|
|
|
@@ -2649,7 +2718,14 @@ var fr = {
|
|
|
2649
2718
|
armarouge: "Carmadura",
|
|
2650
2719
|
ceruledge: "Malvalame",
|
|
2651
2720
|
tinkaton: "Forgerette",
|
|
2652
|
-
miraidon: "Miraidon"
|
|
2721
|
+
miraidon: "Miraidon",
|
|
2722
|
+
// Maps — names and descriptions
|
|
2723
|
+
"map-groudon": "Ruines C\xE9lestes de Theia",
|
|
2724
|
+
"map-groudon.description": "Carte 5v5 avec Groudon.",
|
|
2725
|
+
"map-kyogre": "Ruines C\xE9lestes de Theia",
|
|
2726
|
+
"map-kyogre.description": "Carte 5v5 avec Kyogre.",
|
|
2727
|
+
"map-rayquaza": "Ruines C\xE9lestes de Theia",
|
|
2728
|
+
"map-rayquaza.description": "Carte 5v5 avec Rayquaza."
|
|
2653
2729
|
};
|
|
2654
2730
|
var fr_default = fr;
|
|
2655
2731
|
|
|
@@ -2741,7 +2817,14 @@ var es = {
|
|
|
2741
2817
|
armarouge: "Armarouge",
|
|
2742
2818
|
ceruledge: "Ceruledge",
|
|
2743
2819
|
tinkaton: "Tinkaton",
|
|
2744
|
-
miraidon: "Miraidon"
|
|
2820
|
+
miraidon: "Miraidon",
|
|
2821
|
+
// Maps — names and descriptions
|
|
2822
|
+
"map-groudon": "Ruinas Celestiales de Theia",
|
|
2823
|
+
"map-groudon.description": "Mapa 5v5 con Groudon.",
|
|
2824
|
+
"map-kyogre": "Ruinas Celestiales de Theia",
|
|
2825
|
+
"map-kyogre.description": "Mapa 5v5 con Kyogre.",
|
|
2826
|
+
"map-rayquaza": "Ruinas Celestiales de Theia",
|
|
2827
|
+
"map-rayquaza.description": "Mapa 5v5 con Rayquaza."
|
|
2745
2828
|
};
|
|
2746
2829
|
var es_default = es;
|
|
2747
2830
|
|
|
@@ -2757,12 +2840,24 @@ function getPokemonName(id, locale = "en") {
|
|
|
2757
2840
|
const map = locales[locale] ?? en_default;
|
|
2758
2841
|
return map[id] ?? en_default[id] ?? id;
|
|
2759
2842
|
}
|
|
2843
|
+
function getMapName(mapId, locale = "en") {
|
|
2844
|
+
const map = locales[locale] ?? en_default;
|
|
2845
|
+
return map[mapId] ?? en_default[mapId] ?? mapId;
|
|
2846
|
+
}
|
|
2847
|
+
function getMapDescription(mapId, locale = "en") {
|
|
2848
|
+
const key = `${mapId}.description`;
|
|
2849
|
+
const map = locales[locale] ?? en_default;
|
|
2850
|
+
return map[key] ?? en_default[key] ?? "";
|
|
2851
|
+
}
|
|
2760
2852
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2761
2853
|
0 && (module.exports = {
|
|
2762
2854
|
BattleType,
|
|
2763
2855
|
Tag,
|
|
2764
2856
|
getActivePokemons,
|
|
2765
2857
|
getImageUrl,
|
|
2858
|
+
getMapDescription,
|
|
2859
|
+
getMapImageUrl,
|
|
2860
|
+
getMapName,
|
|
2766
2861
|
getPokemonByDex,
|
|
2767
2862
|
getPokemonByName,
|
|
2768
2863
|
getPokemonBySlug,
|