@c3d.gg/mwi-types 1.7.0 → 1.8.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 (98) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +19 -134
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/domains/items/index.d.ts +0 -1
  5. package/dist/domains/items/index.d.ts.map +1 -1
  6. package/dist/domains/items/index.js +0 -1
  7. package/dist/domains/items/index.js.map +1 -1
  8. package/package.json +132 -160
  9. package/dist/domains/abilities/abilities.json +0 -3331
  10. package/dist/domains/actions/action_categories.json +0 -356
  11. package/dist/domains/actions/action_types.json +0 -57
  12. package/dist/domains/actions/actions.json +0 -41966
  13. package/dist/domains/actions/utils.d.ts +0 -9
  14. package/dist/domains/actions/utils.d.ts.map +0 -1
  15. package/dist/domains/actions/utils.js +0 -27
  16. package/dist/domains/actions/utils.js.map +0 -1
  17. package/dist/domains/avatar/avatar_outfits.json +0 -572
  18. package/dist/domains/avatar/avatars.json +0 -512
  19. package/dist/domains/buffs/buff_types.json +0 -474
  20. package/dist/domains/buffs/community_buff_types.json +0 -119
  21. package/dist/domains/chat/chat_channel_types.json +0 -128
  22. package/dist/domains/chat/chat_icons.json +0 -4352
  23. package/dist/domains/combat/combat_style.json +0 -68
  24. package/dist/domains/combat/combat_trigger_comparator.json +0 -26
  25. package/dist/domains/combat/combat_trigger_condition.json +0 -596
  26. package/dist/domains/combat/combat_trigger_dependency.json +0 -30
  27. package/dist/domains/combat/damage_type.json +0 -22
  28. package/dist/domains/game-mode/game_mode.json +0 -32
  29. package/dist/domains/guild/guild_character_role.json +0 -58
  30. package/dist/domains/house/house_rooms.json +0 -5553
  31. package/dist/domains/items/equipment_types.json +0 -152
  32. package/dist/domains/items/item_categories.json +0 -50
  33. package/dist/domains/items/item_locations.json +0 -220
  34. package/dist/domains/items/items.json +0 -65871
  35. package/dist/domains/items/utils.d.ts +0 -12
  36. package/dist/domains/items/utils.d.ts.map +0 -1
  37. package/dist/domains/items/utils.js +0 -44
  38. package/dist/domains/items/utils.js.map +0 -1
  39. package/dist/domains/leaderboard/leaderboard_categories.json +0 -149
  40. package/dist/domains/leaderboard/leaderboard_types.json +0 -56
  41. package/dist/domains/monsters/monsters.json +0 -9313
  42. package/dist/domains/monsters/utils.d.ts +0 -6
  43. package/dist/domains/monsters/utils.d.ts.map +0 -1
  44. package/dist/domains/monsters/utils.js +0 -21
  45. package/dist/domains/monsters/utils.js.map +0 -1
  46. package/dist/domains/name/name_colors.json +0 -975
  47. package/dist/domains/recipes/recipes.json +0 -21268
  48. package/dist/domains/recipes/utils.d.ts +0 -11
  49. package/dist/domains/recipes/utils.d.ts.map +0 -1
  50. package/dist/domains/recipes/utils.js +0 -88
  51. package/dist/domains/recipes/utils.js.map +0 -1
  52. package/dist/domains/shared/openable_loot_drop.json +0 -1276
  53. package/dist/domains/shop/buyable_upgrades.json +0 -338
  54. package/dist/domains/shop/purchase_bundles.json +0 -226
  55. package/dist/domains/shop/shop_categories.json +0 -12
  56. package/dist/domains/shop/shop_items.json +0 -758
  57. package/dist/domains/skills/skills.json +0 -128
  58. package/dist/domains/skills/utils.d.ts +0 -3
  59. package/dist/domains/skills/utils.d.ts.map +0 -1
  60. package/dist/domains/skills/utils.js +0 -7
  61. package/dist/domains/skills/utils.js.map +0 -1
  62. package/dist/domains/tasks/random_task_type.json +0 -56
  63. package/dist/domains/tasks/task_shop_items.json +0 -42
  64. package/src/domains/abilities/abilities.json +0 -3331
  65. package/src/domains/actions/action_categories.json +0 -356
  66. package/src/domains/actions/action_types.json +0 -57
  67. package/src/domains/actions/actions.json +0 -41966
  68. package/src/domains/avatar/avatar_outfits.json +0 -572
  69. package/src/domains/avatar/avatars.json +0 -512
  70. package/src/domains/buffs/buff_types.json +0 -474
  71. package/src/domains/buffs/community_buff_types.json +0 -119
  72. package/src/domains/chat/chat_channel_types.json +0 -128
  73. package/src/domains/chat/chat_icons.json +0 -4352
  74. package/src/domains/combat/combat_style.json +0 -68
  75. package/src/domains/combat/combat_trigger_comparator.json +0 -26
  76. package/src/domains/combat/combat_trigger_condition.json +0 -596
  77. package/src/domains/combat/combat_trigger_dependency.json +0 -30
  78. package/src/domains/combat/damage_type.json +0 -22
  79. package/src/domains/game-mode/game_mode.json +0 -32
  80. package/src/domains/guild/guild_character_role.json +0 -58
  81. package/src/domains/house/house_rooms.json +0 -5553
  82. package/src/domains/items/equipment_types.json +0 -152
  83. package/src/domains/items/item_categories.json +0 -50
  84. package/src/domains/items/item_locations.json +0 -220
  85. package/src/domains/items/items.json +0 -65871
  86. package/src/domains/leaderboard/leaderboard_categories.json +0 -149
  87. package/src/domains/leaderboard/leaderboard_types.json +0 -56
  88. package/src/domains/monsters/monsters.json +0 -9313
  89. package/src/domains/name/name_colors.json +0 -975
  90. package/src/domains/recipes/recipes.json +0 -21268
  91. package/src/domains/shared/openable_loot_drop.json +0 -1276
  92. package/src/domains/shop/buyable_upgrades.json +0 -338
  93. package/src/domains/shop/purchase_bundles.json +0 -226
  94. package/src/domains/shop/shop_categories.json +0 -12
  95. package/src/domains/shop/shop_items.json +0 -758
  96. package/src/domains/skills/skills.json +0 -128
  97. package/src/domains/tasks/random_task_type.json +0 -56
  98. package/src/domains/tasks/task_shop_items.json +0 -42
package/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ MIT License
2
+
3
+ NOTE: This license applies to the SOURCE CODE only. Historical market data
4
+ served by the API is separately licensed under DATA_LICENSE.md (All Rights Reserved).
5
+
6
+ Copyright (c) 2026 c3d.gg
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in all
16
+ copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ SOFTWARE.
package/README.md CHANGED
@@ -1,16 +1,16 @@
1
1
  # @c3d.gg/mwi-types
2
2
 
3
- TypeScript types for Milky Way Idle game data.
3
+ TypeScript types and constants for Milky Way Idle game data.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- bun add @c3d.gg/mwi-types
8
+ pnpm add @c3d.gg/mwi-types
9
9
  ```
10
10
 
11
11
  ## Import Patterns
12
12
 
13
- ### Types Only (lean, ~0KB runtime)
13
+ ### Types Only (~0KB runtime)
14
14
 
15
15
  ```typescript
16
16
  import type { Item, ItemHrid } from '@c3d.gg/mwi-types/items'
@@ -28,141 +28,26 @@ import { RECIPE_HRIDS, RECIPES_BY_OUTPUT } from '@c3d.gg/mwi-types/recipes'
28
28
  import { ACTION_HRIDS, ACTIONS_BY_SKILL } from '@c3d.gg/mwi-types/actions'
29
29
  ```
30
30
 
31
- ### Raw JSON Data (custom processing)
32
-
33
- ```typescript
34
- import itemsJson from '@c3d.gg/mwi-types/items/data'
35
- import recipesJson from '@c3d.gg/mwi-types/recipes/data'
36
- ```
37
-
38
- ### Utils (lazy-loaded data + type guards)
39
-
40
- ```typescript
41
- // Items
42
- import { getItem, getAllItems, getItemsByCategory, isItemHrid, isEquipment, isTradable } from '@c3d.gg/mwi-types/items/utils'
43
-
44
- // Recipes
45
- import { getRecipe, getAllRecipes, getRecipesForOutput, buildRecipeTree, getTotalMaterials, isRecipeHrid } from '@c3d.gg/mwi-types/recipes/utils'
46
-
47
- // Actions
48
- import { getAction, getActionsBySkill, isProductionAction, isCombatAction, isActionHrid } from '@c3d.gg/mwi-types/actions/utils'
49
-
50
- // Monsters
51
- import { getMonster, getMonstersByCombatLevel, isMonsterHrid } from '@c3d.gg/mwi-types/monsters/utils'
52
-
53
- // Skills
54
- import { isSkillHrid } from '@c3d.gg/mwi-types/skills/utils'
55
- ```
56
-
57
- ## Utils Reference
58
-
59
- ### items/utils
60
-
61
- | Function | Description |
62
- |----------|-------------|
63
- | `getItem(hrid)` | Get item by HRID, returns undefined if not found |
64
- | `requireItem(hrid)` | Get item or throw |
65
- | `getAllItems()` | Get all items as array |
66
- | `getItemsByCategory(categoryHrid)` | Filter items by category |
67
- | `isEquipment(item)` | Check if item has equipment stats |
68
- | `isTradable(item)` | Check if item can be traded |
69
- | `isItemHrid(value)` | Type guard for ItemHrid |
70
-
71
- ### recipes/utils
72
-
73
- | Function | Description |
74
- |----------|-------------|
75
- | `getRecipe(hrid)` | Get recipe by HRID |
76
- | `requireRecipe(hrid)` | Get recipe or throw |
77
- | `getAllRecipes()` | Get all recipes as array |
78
- | `getRecipesForOutput(itemHrid)` | Find recipes that produce an item |
79
- | `buildRecipeTree(itemHrid, qty)` | Build full dependency tree |
80
- | `getTotalMaterials(node)` | Sum base materials from tree |
81
- | `isRecipeHrid(value)` | Type guard for RecipeHrid |
82
-
83
- ### actions/utils
84
-
85
- | Function | Description |
86
- |----------|-------------|
87
- | `getAction(hrid)` | Get action by HRID |
88
- | `getActionsBySkill(skillHrid)` | Filter actions by skill requirement |
89
- | `isProductionAction(action)` | Check if production action |
90
- | `isCombatAction(action)` | Check if combat action |
91
- | `isActionHrid(value)` | Type guard for ActionHrid |
92
-
93
- ### monsters/utils
94
-
95
- | Function | Description |
96
- |----------|-------------|
97
- | `getMonster(hrid)` | Get monster by HRID |
98
- | `getMonstersByCombatLevel(level)` | Filter by exact combat level |
99
- | `isMonsterHrid(value)` | Type guard for MonsterHrid |
100
-
101
- ### skills/utils
102
-
103
- | Function | Description |
104
- |----------|-------------|
105
- | `isSkillHrid(value)` | Type guard for SkillHrid |
106
-
107
- ## Usage Examples
108
-
109
- ### Type Guards
110
-
111
- ```typescript
112
- import { isItemHrid } from '@c3d.gg/mwi-types/items/utils'
113
- import { isRecipeHrid } from '@c3d.gg/mwi-types/recipes/utils'
114
-
115
- function processHrid(value: string) {
116
- if (isItemHrid(value)) {
117
- // value is now typed as ItemHrid
118
- }
119
- if (isRecipeHrid(value)) {
120
- // value is now typed as RecipeHrid
121
- }
122
- }
123
- ```
124
-
125
- ### Recipe Tree
126
-
127
- ```typescript
128
- import { buildRecipeTree, getTotalMaterials } from '@c3d.gg/mwi-types/recipes/utils'
129
- import type { ItemHrid } from '@c3d.gg/mwi-types/items'
130
-
131
- const tree = buildRecipeTree('/items/cheese' as ItemHrid, 10)
132
- const materials = getTotalMaterials(tree)
133
- // Map<ItemHrid, number> of base materials needed
134
- ```
135
-
136
- ### Item Lookup
137
-
138
- ```typescript
139
- import { getItem, getItemsByCategory } from '@c3d.gg/mwi-types/items/utils'
140
- import type { ItemHrid, ItemCategoryHrid } from '@c3d.gg/mwi-types/items'
141
-
142
- const milk = getItem('/items/milk' as ItemHrid)
143
- const foods = getItemsByCategory('/item_categories/food' as ItemCategoryHrid)
144
- ```
145
-
146
31
  ## Available Domains
147
32
 
148
- | Domain | Types | Constants | Utils |
149
- |--------|-------|-----------|-------|
150
- | `/items` | Item, ItemHrid, ItemCategory, etc. | ITEM_HRIDS, ITEMS_BY_CATEGORY | Yes |
151
- | `/recipes` | Recipe, RecipeHrid, RecipeTreeNode | RECIPE_HRIDS, RECIPES_BY_OUTPUT | Yes |
152
- | `/actions` | Action, ActionHrid, ActionCategory | ACTION_HRIDS, ACTIONS_BY_SKILL | Yes |
153
- | `/monsters` | Monster, MonsterHrid | MONSTER_HRIDS | Yes |
154
- | `/skills` | Skill, SkillHrid | SKILL_HRIDS | Yes |
155
- | `/abilities` | Ability, AbilityHrid | ABILITY_HRIDS | No |
156
- | `/buffs` | Buff, BuffType | BUFF_TYPES_HRIDS | No |
157
- | `/combat` | CombatStyle, DamageType | COMBAT_STYLE_HRIDS | No |
158
- | `/house` | HouseRoom, HouseRoomHrid | HOUSE_ROOM_HRIDS | No |
159
- | `/shop` | ShopItem, PurchaseBundle | SHOP_ITEMS_HRIDS | No |
160
- | `/tasks` | RandomTaskType | RANDOM_TASK_TYPE_HRIDS | No |
161
- | `/leaderboard` | LeaderboardCategory | LEADERBOARD_CATEGORY_HRIDS | No |
33
+ | Domain | Types | Constants |
34
+ |--------|-------|-----------|
35
+ | `/items` | Item, ItemHrid, ItemCategory | ITEM_HRIDS, ITEMS_BY_CATEGORY |
36
+ | `/recipes` | Recipe, RecipeHrid | RECIPE_HRIDS, RECIPES_BY_OUTPUT |
37
+ | `/actions` | Action, ActionHrid, ActionCategory | ACTION_HRIDS, ACTIONS_BY_SKILL |
38
+ | `/monsters` | Monster, MonsterHrid | MONSTER_HRIDS |
39
+ | `/skills` | Skill, SkillHrid | SKILL_HRIDS |
40
+ | `/abilities` | Ability, AbilityHrid | ABILITY_HRIDS |
41
+ | `/buffs` | Buff, BuffType | BUFF_TYPES_HRIDS |
42
+ | `/combat` | CombatStyle, DamageType | COMBAT_STYLE_HRIDS |
43
+ | `/house` | HouseRoom, HouseRoomHrid | HOUSE_ROOM_HRIDS |
44
+ | `/shop` | ShopItem, PurchaseBundle | SHOP_ITEMS_HRIDS |
45
+ | `/tasks` | RandomTaskType | RANDOM_TASK_TYPE_HRIDS |
46
+ | `/leaderboard` | LeaderboardCategory | LEADERBOARD_CATEGORY_HRIDS |
162
47
 
163
48
  ## Main Entry Point
164
49
 
165
- For convenience, types and constants (but not utils) are re-exported from the root:
50
+ Types and constants re-exported from root:
166
51
 
167
52
  ```typescript
168
53
  import { ITEM_HRIDS, SKILL_HRIDS, type Item, type Skill } from '@c3d.gg/mwi-types'
@@ -170,7 +55,7 @@ import { ITEM_HRIDS, SKILL_HRIDS, type Item, type Skill } from '@c3d.gg/mwi-type
170
55
 
171
56
  ## Auto-Generated
172
57
 
173
- This package is generated from Milky Way Idle game data. Do not edit `dist/` files.
58
+ Generated from Milky Way Idle game data. Do not edit `dist/` files.
174
59
 
175
60
  ## License
176
61