unite-lib 1.3.3 → 1.4.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/dist/index.cjs +443 -395
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.global.js +440 -395
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +440 -395
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -145,6 +145,21 @@ declare function getMapImageUrl(map: Map, resolution?: MapResolution, options?:
|
|
|
145
145
|
* Returns spawns for a given map id (e.g. "map-groudon", "map-kyogre", "map-rayquaza").
|
|
146
146
|
*/
|
|
147
147
|
declare function getSpawnsByMap(mapId: string): MapSpawn[];
|
|
148
|
+
/**
|
|
149
|
+
* Parses game clock "MM:SS" to seconds remaining (e.g. "10:00" → 600, "02:00" → 120).
|
|
150
|
+
*/
|
|
151
|
+
declare function parseGameClockToSeconds(clock: string): number;
|
|
152
|
+
/**
|
|
153
|
+
* Returns whether a spawn is visible at the given game clock (seconds remaining).
|
|
154
|
+
* Considers both spawnTime (spawn appears when clock ≤ spawnTime) and despawnTime
|
|
155
|
+
* (spawn disappears when clock ≤ despawnTime, e.g. center Natu/Altaria when boss spawns at 02:00).
|
|
156
|
+
*/
|
|
157
|
+
declare function isSpawnVisibleAtGameClock(spawn: MapSpawn, gameClockSeconds: number): boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Returns spawns for a map that are visible at the given game clock (seconds remaining).
|
|
160
|
+
* Use this when you need to show only spawns that have already appeared and not yet despawned.
|
|
161
|
+
*/
|
|
162
|
+
declare function getSpawnsByMapVisibleAt(mapId: string, gameClockSeconds: number): MapSpawn[];
|
|
148
163
|
/**
|
|
149
164
|
* Returns the neutral by id, or undefined if not found.
|
|
150
165
|
*/
|
|
@@ -165,4 +180,4 @@ declare function getPokemonsByBattleType(battleType: BattleType): Pokemon[];
|
|
|
165
180
|
declare function getPokemonsByTag(tag: Tag): Pokemon[];
|
|
166
181
|
declare function getActivePokemons(): Pokemon[];
|
|
167
182
|
|
|
168
|
-
export { BattleType, type GetImageUrlOptions, type Map, type MapResolution, type MapSpawn, type Move, type MoveSlotId, type Neutral, type Pokemon, type PokemonImages, type PokemonStats, Tag, getActivePokemons, getImageUrl, getMapImageUrl, getNeutralById, getNeutralImageUrl, getPokemonByDex, getPokemonByName, getPokemonBySlug, getPokemonSlug, getPokemonsByBattleType, getPokemonsByTag, getSpawnsByMap, maps, moves, neutrals, pokemons, spawns };
|
|
183
|
+
export { BattleType, type GetImageUrlOptions, type Map, type MapResolution, type MapSpawn, type Move, type MoveSlotId, type Neutral, type Pokemon, type PokemonImages, type PokemonStats, Tag, getActivePokemons, getImageUrl, getMapImageUrl, getNeutralById, getNeutralImageUrl, getPokemonByDex, getPokemonByName, getPokemonBySlug, getPokemonSlug, getPokemonsByBattleType, getPokemonsByTag, getSpawnsByMap, getSpawnsByMapVisibleAt, isSpawnVisibleAtGameClock, maps, moves, neutrals, parseGameClockToSeconds, pokemons, spawns };
|
package/dist/index.d.ts
CHANGED
|
@@ -145,6 +145,21 @@ declare function getMapImageUrl(map: Map, resolution?: MapResolution, options?:
|
|
|
145
145
|
* Returns spawns for a given map id (e.g. "map-groudon", "map-kyogre", "map-rayquaza").
|
|
146
146
|
*/
|
|
147
147
|
declare function getSpawnsByMap(mapId: string): MapSpawn[];
|
|
148
|
+
/**
|
|
149
|
+
* Parses game clock "MM:SS" to seconds remaining (e.g. "10:00" → 600, "02:00" → 120).
|
|
150
|
+
*/
|
|
151
|
+
declare function parseGameClockToSeconds(clock: string): number;
|
|
152
|
+
/**
|
|
153
|
+
* Returns whether a spawn is visible at the given game clock (seconds remaining).
|
|
154
|
+
* Considers both spawnTime (spawn appears when clock ≤ spawnTime) and despawnTime
|
|
155
|
+
* (spawn disappears when clock ≤ despawnTime, e.g. center Natu/Altaria when boss spawns at 02:00).
|
|
156
|
+
*/
|
|
157
|
+
declare function isSpawnVisibleAtGameClock(spawn: MapSpawn, gameClockSeconds: number): boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Returns spawns for a map that are visible at the given game clock (seconds remaining).
|
|
160
|
+
* Use this when you need to show only spawns that have already appeared and not yet despawned.
|
|
161
|
+
*/
|
|
162
|
+
declare function getSpawnsByMapVisibleAt(mapId: string, gameClockSeconds: number): MapSpawn[];
|
|
148
163
|
/**
|
|
149
164
|
* Returns the neutral by id, or undefined if not found.
|
|
150
165
|
*/
|
|
@@ -165,4 +180,4 @@ declare function getPokemonsByBattleType(battleType: BattleType): Pokemon[];
|
|
|
165
180
|
declare function getPokemonsByTag(tag: Tag): Pokemon[];
|
|
166
181
|
declare function getActivePokemons(): Pokemon[];
|
|
167
182
|
|
|
168
|
-
export { BattleType, type GetImageUrlOptions, type Map, type MapResolution, type MapSpawn, type Move, type MoveSlotId, type Neutral, type Pokemon, type PokemonImages, type PokemonStats, Tag, getActivePokemons, getImageUrl, getMapImageUrl, getNeutralById, getNeutralImageUrl, getPokemonByDex, getPokemonByName, getPokemonBySlug, getPokemonSlug, getPokemonsByBattleType, getPokemonsByTag, getSpawnsByMap, maps, moves, neutrals, pokemons, spawns };
|
|
183
|
+
export { BattleType, type GetImageUrlOptions, type Map, type MapResolution, type MapSpawn, type Move, type MoveSlotId, type Neutral, type Pokemon, type PokemonImages, type PokemonStats, Tag, getActivePokemons, getImageUrl, getMapImageUrl, getNeutralById, getNeutralImageUrl, getPokemonByDex, getPokemonByName, getPokemonBySlug, getPokemonSlug, getPokemonsByBattleType, getPokemonsByTag, getSpawnsByMap, getSpawnsByMapVisibleAt, isSpawnVisibleAtGameClock, maps, moves, neutrals, parseGameClockToSeconds, pokemons, spawns };
|