unite-lib 1.1.0 → 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.
@@ -26,5 +26,15 @@ type Locale = "en" | "pt-BR" | "ja-JP" | "fr" | "es";
26
26
  * Falls back to English if the locale is missing the key, then to the id.
27
27
  */
28
28
  declare function getPokemonName(id: string, locale?: Locale): string;
29
+ /**
30
+ * Returns the localized name for a map by id and locale.
31
+ * Falls back to English, then to the id.
32
+ */
33
+ declare function getMapName(mapId: string, locale?: Locale): string;
34
+ /**
35
+ * Returns the localized description for a map by id and locale.
36
+ * Falls back to English, then to empty string.
37
+ */
38
+ declare function getMapDescription(mapId: string, locale?: Locale): string;
29
39
 
30
- export { type Locale, names as en, es, fr, getPokemonName, jaJP, ptBR };
40
+ export { type Locale, names as en, es, fr, getMapDescription, getMapName, getPokemonName, jaJP, ptBR };
@@ -26,5 +26,15 @@ type Locale = "en" | "pt-BR" | "ja-JP" | "fr" | "es";
26
26
  * Falls back to English if the locale is missing the key, then to the id.
27
27
  */
28
28
  declare function getPokemonName(id: string, locale?: Locale): string;
29
+ /**
30
+ * Returns the localized name for a map by id and locale.
31
+ * Falls back to English, then to the id.
32
+ */
33
+ declare function getMapName(mapId: string, locale?: Locale): string;
34
+ /**
35
+ * Returns the localized description for a map by id and locale.
36
+ * Falls back to English, then to empty string.
37
+ */
38
+ declare function getMapDescription(mapId: string, locale?: Locale): string;
29
39
 
30
- export { type Locale, names as en, es, fr, getPokemonName, jaJP, ptBR };
40
+ export { type Locale, names as en, es, fr, getMapDescription, getMapName, getPokemonName, jaJP, ptBR };
@@ -24,6 +24,8 @@ var UniteLib = (() => {
24
24
  en: () => en_default,
25
25
  es: () => es_default,
26
26
  fr: () => fr_default,
27
+ getMapDescription: () => getMapDescription,
28
+ getMapName: () => getMapName,
27
29
  getPokemonName: () => getPokemonName,
28
30
  jaJP: () => ja_JP_default,
29
31
  ptBR: () => pt_BR_default
@@ -2397,6 +2399,44 @@ var UniteLib = (() => {
2397
2399
  ];
2398
2400
  var pokemons_default = pokemons;
2399
2401
 
2402
+ // src/maps.ts
2403
+ var maps = [
2404
+ {
2405
+ id: "map-groudon",
2406
+ name: "Theia Sky Ruins",
2407
+ image: "maps/map-groudon/map-groudon@4x.png",
2408
+ images: {
2409
+ "1": "maps/map-groudon/map-groudon@1x.png",
2410
+ "2": "maps/map-groudon/map-groudon@2x.png",
2411
+ "4": "maps/map-groudon/map-groudon@4x.png"
2412
+ },
2413
+ description: "Map with Groudon."
2414
+ },
2415
+ {
2416
+ id: "map-kyogre",
2417
+ name: "Theia Sky Ruins",
2418
+ image: "maps/map-kyogre/map-kyogre@4x.png",
2419
+ images: {
2420
+ "1": "maps/map-kyogre/map-kyogre@1x.png",
2421
+ "2": "maps/map-kyogre/map-kyogre@2x.png",
2422
+ "4": "maps/map-kyogre/map-kyogre@4x.png"
2423
+ },
2424
+ description: "Map with Kyogre."
2425
+ },
2426
+ {
2427
+ id: "map-rayquaza",
2428
+ name: "Theia Sky Ruins",
2429
+ image: "maps/map-rayquaza/map-rayquaza@4x.png",
2430
+ images: {
2431
+ "1": "maps/map-rayquaza/map-rayquaza@1x.png",
2432
+ "2": "maps/map-rayquaza/map-rayquaza@2x.png",
2433
+ "4": "maps/map-rayquaza/map-rayquaza@4x.png"
2434
+ },
2435
+ description: "Map with Rayquaza."
2436
+ }
2437
+ ];
2438
+ var maps_default = maps;
2439
+
2400
2440
  // src/i18n/en.ts
2401
2441
  function slugFromMain(mainPath) {
2402
2442
  return mainPath.replace(/^pokemons\/roster-/, "").replace(/\.png$/, "");
@@ -2405,10 +2445,23 @@ var UniteLib = (() => {
2405
2445
  for (const p of pokemons_default) {
2406
2446
  names[slugFromMain(p.images.main)] = p.name;
2407
2447
  }
2448
+ for (const m of maps_default) {
2449
+ names[m.id] = m.name;
2450
+ if (m.description) names[`${m.id}.description`] = m.description;
2451
+ }
2408
2452
  var en_default = names;
2409
2453
 
2410
2454
  // src/i18n/pt-BR.ts
2411
- var ptBR = { ...en_default };
2455
+ var ptBR = {
2456
+ ...en_default,
2457
+ // Maps — names and descriptions
2458
+ "map-groudon": "Ru\xEDnas Celestes de Theia",
2459
+ "map-groudon.description": "Mapa 5v5 com Groudon.",
2460
+ "map-kyogre": "Ru\xEDnas Celestes de Theia",
2461
+ "map-kyogre.description": "Mapa 5v5 com Kyogre.",
2462
+ "map-rayquaza": "Ru\xEDnas Celestes de Theia",
2463
+ "map-rayquaza.description": "Mapa 5v5 com Rayquaza."
2464
+ };
2412
2465
  var pt_BR_default = ptBR;
2413
2466
 
2414
2467
  // src/i18n/ja-JP.ts
@@ -2499,7 +2552,14 @@ var UniteLib = (() => {
2499
2552
  armarouge: "\u30B0\u30EC\u30F3\u30A2\u30EB\u30DE",
2500
2553
  ceruledge: "\u30BD\u30A6\u30D6\u30EC\u30A4\u30BA",
2501
2554
  tinkaton: "\u30C7\u30AB\u30CC\u30C1\u30E3\u30F3",
2502
- miraidon: "\u30DF\u30E9\u30A4\u30C9\u30F3"
2555
+ miraidon: "\u30DF\u30E9\u30A4\u30C9\u30F3",
2556
+ // Maps — names and descriptions
2557
+ "map-groudon": "\u30C6\u30A4\u30A2\u306E\u5929\u7A7A\u907A\u8DE1",
2558
+ "map-groudon.description": "\u30B0\u30E9\u30FC\u30C9\u30F3\u304C\u767B\u5834\u3059\u308B5v5\u30DE\u30C3\u30D7\u3002",
2559
+ "map-kyogre": "\u30C6\u30A4\u30A2\u306E\u5929\u7A7A\u907A\u8DE1",
2560
+ "map-kyogre.description": "\u30AB\u30A4\u30AA\u30FC\u30AC\u304C\u767B\u5834\u3059\u308B5v5\u30DE\u30C3\u30D7\u3002",
2561
+ "map-rayquaza": "\u30C6\u30A4\u30A2\u306E\u5929\u7A7A\u907A\u8DE1",
2562
+ "map-rayquaza.description": "\u30EC\u30C3\u30AF\u30A6\u30B6\u304C\u767B\u5834\u3059\u308B5v5\u30DE\u30C3\u30D7\u3002"
2503
2563
  };
2504
2564
  var ja_JP_default = jaJP;
2505
2565
 
@@ -2591,7 +2651,14 @@ var UniteLib = (() => {
2591
2651
  armarouge: "Carmadura",
2592
2652
  ceruledge: "Malvalame",
2593
2653
  tinkaton: "Forgerette",
2594
- miraidon: "Miraidon"
2654
+ miraidon: "Miraidon",
2655
+ // Maps — names and descriptions
2656
+ "map-groudon": "Ruines C\xE9lestes de Theia",
2657
+ "map-groudon.description": "Carte 5v5 avec Groudon.",
2658
+ "map-kyogre": "Ruines C\xE9lestes de Theia",
2659
+ "map-kyogre.description": "Carte 5v5 avec Kyogre.",
2660
+ "map-rayquaza": "Ruines C\xE9lestes de Theia",
2661
+ "map-rayquaza.description": "Carte 5v5 avec Rayquaza."
2595
2662
  };
2596
2663
  var fr_default = fr;
2597
2664
 
@@ -2683,7 +2750,14 @@ var UniteLib = (() => {
2683
2750
  armarouge: "Armarouge",
2684
2751
  ceruledge: "Ceruledge",
2685
2752
  tinkaton: "Tinkaton",
2686
- miraidon: "Miraidon"
2753
+ miraidon: "Miraidon",
2754
+ // Maps — names and descriptions
2755
+ "map-groudon": "Ruinas Celestiales de Theia",
2756
+ "map-groudon.description": "Mapa 5v5 con Groudon.",
2757
+ "map-kyogre": "Ruinas Celestiales de Theia",
2758
+ "map-kyogre.description": "Mapa 5v5 con Kyogre.",
2759
+ "map-rayquaza": "Ruinas Celestiales de Theia",
2760
+ "map-rayquaza.description": "Mapa 5v5 con Rayquaza."
2687
2761
  };
2688
2762
  var es_default = es;
2689
2763
 
@@ -2699,6 +2773,15 @@ var UniteLib = (() => {
2699
2773
  const map = locales[locale] ?? en_default;
2700
2774
  return map[id] ?? en_default[id] ?? id;
2701
2775
  }
2776
+ function getMapName(mapId, locale = "en") {
2777
+ const map = locales[locale] ?? en_default;
2778
+ return map[mapId] ?? en_default[mapId] ?? mapId;
2779
+ }
2780
+ function getMapDescription(mapId, locale = "en") {
2781
+ const key = `${mapId}.description`;
2782
+ const map = locales[locale] ?? en_default;
2783
+ return map[key] ?? en_default[key] ?? "";
2784
+ }
2702
2785
  return __toCommonJS(i18n_exports);
2703
2786
  })();
2704
2787
  //# sourceMappingURL=index.global.js.map