create-dubhe 1.2.0-pre.99 → 2.0.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.
Files changed (360) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/cli.js.map +1 -1
  3. package/package.json +16 -16
  4. package/templates/101/sui-template/docker-compose.testnet.yml +73 -0
  5. package/templates/101/sui-template/packages/client/src/app/page.tsx +545 -41
  6. package/templates/101/sui-template/packages/client/src/app/providers.tsx +12 -4
  7. package/templates/101/sui-template/packages/contracts/Pub.localnet.toml +4 -4
  8. package/templates/101/sui-template/packages/contracts/counter.lock.json +20 -0
  9. package/templates/101/sui-template/packages/contracts/deployment.ts +8 -3
  10. package/templates/101/sui-template/packages/contracts/dubhe.config.json +59 -13
  11. package/templates/101/sui-template/packages/contracts/dubhe.config.ts +1 -4
  12. package/templates/101/sui-template/packages/contracts/metadata.json +1015 -68
  13. package/templates/101/sui-template/packages/contracts/package.json +7 -4
  14. package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/dapp_key.move +45 -31
  15. package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/error.move +8 -0
  16. package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/genesis.move +30 -13
  17. package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/init_test.move +19 -14
  18. package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/resources/counter2.move +198 -0
  19. package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/resources/counter2withkey.move +90 -0
  20. package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/resources/value.move +30 -20
  21. package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/user_storage_init.move +26 -0
  22. package/templates/101/sui-template/packages/contracts/src/counter/sources/scripts/deploy_hook.move +6 -11
  23. package/templates/101/sui-template/packages/contracts/src/counter/sources/systems/counter.move +23 -11
  24. package/templates/101/sui-template/packages/contracts/src/counter/sources/tests/counter.move +15 -14
  25. package/templates/101/sui-template/packages/contracts/src/dubhe/Move.lock +33 -30
  26. package/templates/101/sui-template/packages/contracts/src/dubhe/Move.toml +4 -3
  27. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/dapp_key.move +45 -31
  28. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/error.move +170 -0
  29. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/genesis.move +16 -13
  30. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/init_test.move +8 -14
  31. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/core/account_key.move +1 -3
  32. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/core/dapp_service.move +1776 -137
  33. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/core/data_key.move +1 -20
  34. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/core/events.move +864 -25
  35. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/scripts/deploy_hook.move +15 -16
  36. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/scripts/migrate.move +0 -3
  37. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/systems/address_system.move +25 -17
  38. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/systems/dapp_system.move +2802 -343
  39. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/systems/utils.move +1 -1
  40. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/address.move +173 -55
  41. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/dapp_test.move +769 -0
  42. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/fee_test.move +2965 -0
  43. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/integration_test.move +303 -0
  44. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/listing_test.move +1422 -0
  45. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/scene_session_test.move +269 -0
  46. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/session_test.move +624 -0
  47. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/storage_test.move +700 -0
  48. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/typed_object_test.move +177 -0
  49. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/typed_scene_test.move +452 -0
  50. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/tests/user_storage_test.move +160 -0
  51. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/utils/math.move +4 -3
  52. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/utils/type_info.move +2 -2
  53. package/templates/contract/sui-template/dubhe.config.ts +0 -1
  54. package/templates/contract/sui-template/package.json +3 -3
  55. package/templates/contract/sui-template/src/dubhe/Move.lock +33 -30
  56. package/templates/contract/sui-template/src/dubhe/Move.toml +4 -3
  57. package/templates/contract/sui-template/src/dubhe/sources/codegen/dapp_key.move +45 -31
  58. package/templates/contract/sui-template/src/dubhe/sources/codegen/error.move +170 -0
  59. package/templates/contract/sui-template/src/dubhe/sources/codegen/genesis.move +16 -13
  60. package/templates/contract/sui-template/src/dubhe/sources/codegen/init_test.move +8 -14
  61. package/templates/contract/sui-template/src/dubhe/sources/core/account_key.move +1 -3
  62. package/templates/contract/sui-template/src/dubhe/sources/core/dapp_service.move +1776 -137
  63. package/templates/contract/sui-template/src/dubhe/sources/core/data_key.move +1 -20
  64. package/templates/contract/sui-template/src/dubhe/sources/core/events.move +864 -25
  65. package/templates/contract/sui-template/src/dubhe/sources/scripts/deploy_hook.move +15 -16
  66. package/templates/contract/sui-template/src/dubhe/sources/scripts/migrate.move +0 -3
  67. package/templates/contract/sui-template/src/dubhe/sources/systems/address_system.move +25 -17
  68. package/templates/contract/sui-template/src/dubhe/sources/systems/dapp_system.move +2802 -343
  69. package/templates/contract/sui-template/src/dubhe/sources/systems/utils.move +1 -1
  70. package/templates/contract/sui-template/src/dubhe/sources/tests/address.move +173 -55
  71. package/templates/contract/sui-template/src/dubhe/sources/tests/dapp_test.move +769 -0
  72. package/templates/contract/sui-template/src/dubhe/sources/tests/fee_test.move +2965 -0
  73. package/templates/contract/sui-template/src/dubhe/sources/tests/integration_test.move +303 -0
  74. package/templates/contract/sui-template/src/dubhe/sources/tests/listing_test.move +1422 -0
  75. package/templates/contract/sui-template/src/dubhe/sources/tests/scene_session_test.move +269 -0
  76. package/templates/contract/sui-template/src/dubhe/sources/tests/session_test.move +624 -0
  77. package/templates/contract/sui-template/src/dubhe/sources/tests/storage_test.move +700 -0
  78. package/templates/contract/sui-template/src/dubhe/sources/tests/typed_object_test.move +177 -0
  79. package/templates/contract/sui-template/src/dubhe/sources/tests/typed_scene_test.move +452 -0
  80. package/templates/contract/sui-template/src/dubhe/sources/tests/user_storage_test.move +160 -0
  81. package/templates/contract/sui-template/src/dubhe/sources/utils/math.move +4 -3
  82. package/templates/contract/sui-template/src/dubhe/sources/utils/type_info.move +2 -2
  83. package/templates/contract/sui-template/src/template/Move.toml +12 -0
  84. package/templates/contract/sui-template/src/template/sources/codegen/dapp_key.move +47 -0
  85. package/templates/contract/sui-template/src/template/sources/codegen/genesis.move +34 -0
  86. package/templates/contract/sui-template/src/template/sources/codegen/init_test.move +23 -0
  87. package/templates/contract/sui-template/src/template/sources/codegen/user_storage_init.move +27 -0
  88. package/templates/contract/sui-template/src/template/sources/scripts/deploy_hook.move +13 -0
  89. package/templates/contract/sui-template/src/template/sources/scripts/migrate.move +7 -0
  90. package/templates/nextjs/sui-card-duel/.gitignore_ +51 -0
  91. package/templates/nextjs/sui-card-duel/README.md +213 -0
  92. package/templates/nextjs/sui-card-duel/docker-compose.yml +34 -0
  93. package/templates/nextjs/sui-card-duel/mprocs.yaml +17 -0
  94. package/templates/nextjs/sui-card-duel/package.json +43 -0
  95. package/templates/nextjs/sui-card-duel/packages/client/.gitignore_ +48 -0
  96. package/templates/nextjs/sui-card-duel/packages/client/.prettierignore +1 -0
  97. package/templates/nextjs/sui-card-duel/packages/client/.prettierrc.json +8 -0
  98. package/templates/nextjs/sui-card-duel/packages/client/eslint.config.mjs +22 -0
  99. package/templates/nextjs/sui-card-duel/packages/client/next.config.mjs +8 -0
  100. package/templates/nextjs/sui-card-duel/packages/client/package.json +47 -0
  101. package/templates/nextjs/sui-card-duel/packages/client/postcss.config.mjs +8 -0
  102. package/templates/nextjs/sui-card-duel/packages/client/src/app/admin/ArenaPanel.tsx +307 -0
  103. package/templates/nextjs/sui-card-duel/packages/client/src/app/admin/page.tsx +622 -0
  104. package/templates/nextjs/sui-card-duel/packages/client/src/app/brawl/[id]/page.tsx +559 -0
  105. package/templates/nextjs/sui-card-duel/packages/client/src/app/collection/page.tsx +202 -0
  106. package/templates/nextjs/sui-card-duel/packages/client/src/app/components/CardView.tsx +66 -0
  107. package/templates/nextjs/sui-card-duel/packages/client/src/app/components/GameShell.tsx +294 -0
  108. package/templates/nextjs/sui-card-duel/packages/client/src/app/components/icons.tsx +101 -0
  109. package/templates/nextjs/sui-card-duel/packages/client/src/app/duel/[id]/page.tsx +477 -0
  110. package/templates/nextjs/sui-card-duel/packages/client/src/app/favicon.ico +0 -0
  111. package/templates/nextjs/sui-card-duel/packages/client/src/app/globals.css +85 -0
  112. package/templates/nextjs/sui-card-duel/packages/client/src/app/hooks/useGame.ts +313 -0
  113. package/templates/nextjs/sui-card-duel/packages/client/src/app/layout.tsx +24 -0
  114. package/templates/nextjs/sui-card-duel/packages/client/src/app/leaderboard/page.tsx +123 -0
  115. package/templates/nextjs/sui-card-duel/packages/client/src/app/lib/game.ts +77 -0
  116. package/templates/nextjs/sui-card-duel/packages/client/src/app/lib/scenes.ts +226 -0
  117. package/templates/nextjs/sui-card-duel/packages/client/src/app/market/page.tsx +418 -0
  118. package/templates/nextjs/sui-card-duel/packages/client/src/app/page.tsx +427 -0
  119. package/templates/nextjs/sui-card-duel/packages/client/src/app/providers.tsx +69 -0
  120. package/templates/nextjs/sui-card-duel/packages/client/tailwind.config.ts +21 -0
  121. package/templates/nextjs/sui-card-duel/packages/client/tsconfig.json +30 -0
  122. package/templates/nextjs/sui-card-duel/packages/contracts/.gitignore_ +51 -0
  123. package/templates/nextjs/sui-card-duel/packages/contracts/.prettierignore +1 -0
  124. package/templates/nextjs/sui-card-duel/packages/contracts/.prettierrc.json +8 -0
  125. package/templates/nextjs/sui-card-duel/packages/contracts/Dockerfile +5 -0
  126. package/templates/nextjs/sui-card-duel/packages/contracts/Pub.localnet.toml +13 -0
  127. package/templates/nextjs/sui-card-duel/packages/contracts/card_duel.lock.json +66 -0
  128. package/templates/nextjs/sui-card-duel/packages/contracts/docker-compose.yml +34 -0
  129. package/templates/nextjs/sui-card-duel/packages/contracts/dubhe.config.ts +150 -0
  130. package/templates/nextjs/sui-card-duel/packages/contracts/logs/combined.log +31383 -0
  131. package/templates/nextjs/sui-card-duel/packages/contracts/package.json +49 -0
  132. package/templates/nextjs/sui-card-duel/packages/contracts/scripts/config.ts +17 -0
  133. package/templates/nextjs/sui-card-duel/packages/contracts/scripts/e2e-brawl.ts +270 -0
  134. package/templates/nextjs/sui-card-duel/packages/contracts/scripts/e2e-duel.ts +272 -0
  135. package/templates/nextjs/sui-card-duel/packages/contracts/scripts/e2e-lobby.ts +177 -0
  136. package/templates/nextjs/sui-card-duel/packages/contracts/scripts/e2e-market.ts +219 -0
  137. package/templates/nextjs/sui-card-duel/packages/contracts/scripts/e2e-session.ts +342 -0
  138. package/templates/nextjs/sui-card-duel/packages/contracts/scripts/query-dapp-revenue.ts +95 -0
  139. package/templates/nextjs/sui-card-duel/packages/contracts/scripts/seed.ts +92 -0
  140. package/templates/nextjs/sui-card-duel/packages/contracts/scripts/withdraw-dapp-revenue.ts +56 -0
  141. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/Move.toml +15 -0
  142. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/dapp_key.move +46 -0
  143. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/enums/card_kind.move +47 -0
  144. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/enums/match_state.move +37 -0
  145. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/enums/rarity.move +37 -0
  146. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/error.move +126 -0
  147. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/genesis.move +33 -0
  148. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/init_test.move +23 -0
  149. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/objects/arena.move +137 -0
  150. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/permits/brawl_permit.move +125 -0
  151. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/permits/duel_permit.move +125 -0
  152. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/resources/battle_state.move +255 -0
  153. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/resources/card.move +282 -0
  154. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/resources/deck.move +64 -0
  155. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/resources/game_config.move +267 -0
  156. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/resources/gold.move +205 -0
  157. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/resources/profile.move +255 -0
  158. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/scenes/brawl.move +313 -0
  159. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/scenes/duel.move +313 -0
  160. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/codegen/user_storage_init.move +26 -0
  161. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/scripts/deploy_hook.move +32 -0
  162. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/scripts/migrate.move +7 -0
  163. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/systems/arena_system.move +57 -0
  164. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/systems/brawl_system.move +559 -0
  165. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/systems/card_system.move +146 -0
  166. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/systems/duel_system.move +515 -0
  167. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/systems/market_system.move +115 -0
  168. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/systems/player_system.move +37 -0
  169. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/tests/brawl_tests.move +385 -0
  170. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/tests/duel_tests.move +656 -0
  171. package/templates/nextjs/sui-card-duel/packages/contracts/src/card_duel/sources/tests/test_helpers.move +31 -0
  172. package/templates/nextjs/sui-card-duel/packages/contracts/sui-indexer-schema.graphql +5973 -0
  173. package/templates/nextjs/sui-card-duel/pnpm-workspace.yaml +2 -0
  174. package/templates/nextjs/sui-farm/.gitignore_ +51 -0
  175. package/templates/nextjs/sui-farm/README.md +15 -0
  176. package/templates/nextjs/sui-farm/UPGRADE_NOTES.md +97 -0
  177. package/templates/nextjs/sui-farm/docker-compose.yml +34 -0
  178. package/templates/nextjs/sui-farm/mprocs.yaml +17 -0
  179. package/templates/nextjs/sui-farm/package.json +43 -0
  180. package/templates/nextjs/sui-farm/packages/client/.gitignore_ +48 -0
  181. package/templates/nextjs/sui-farm/packages/client/.prettierignore +1 -0
  182. package/templates/nextjs/sui-farm/packages/client/.prettierrc.json +8 -0
  183. package/templates/nextjs/sui-farm/packages/client/eslint.config.mjs +22 -0
  184. package/templates/nextjs/sui-farm/packages/client/next.config.mjs +8 -0
  185. package/templates/nextjs/sui-farm/packages/client/package.json +47 -0
  186. package/templates/nextjs/sui-farm/packages/client/postcss.config.mjs +8 -0
  187. package/templates/nextjs/sui-farm/packages/client/src/app/admin/page.tsx +618 -0
  188. package/templates/nextjs/sui-farm/packages/client/src/app/components/FarmLand.tsx +526 -0
  189. package/templates/nextjs/sui-farm/packages/client/src/app/components/FarmPlotCard.tsx +215 -0
  190. package/templates/nextjs/sui-farm/packages/client/src/app/components/PetAvatar.tsx +868 -0
  191. package/templates/nextjs/sui-farm/packages/client/src/app/components/PetPanel.tsx +1360 -0
  192. package/templates/nextjs/sui-farm/packages/client/src/app/components/PlantModal.tsx +147 -0
  193. package/templates/nextjs/sui-farm/packages/client/src/app/components/ProxyCard.tsx +684 -0
  194. package/templates/nextjs/sui-farm/packages/client/src/app/components/RanchLand.tsx +822 -0
  195. package/templates/nextjs/sui-farm/packages/client/src/app/components/ResourceHUD.tsx +125 -0
  196. package/templates/nextjs/sui-farm/packages/client/src/app/components/ShopPanel.tsx +232 -0
  197. package/templates/nextjs/sui-farm/packages/client/src/app/components/icons/GameIcons.tsx +574 -0
  198. package/templates/nextjs/sui-farm/packages/client/src/app/favicon.ico +0 -0
  199. package/templates/nextjs/sui-farm/packages/client/src/app/globals.css +423 -0
  200. package/templates/nextjs/sui-farm/packages/client/src/app/hooks/useWorldPermitId.ts +66 -0
  201. package/templates/nextjs/sui-farm/packages/client/src/app/layout.tsx +23 -0
  202. package/templates/nextjs/sui-farm/packages/client/src/app/leaderboard/page.tsx +185 -0
  203. package/templates/nextjs/sui-farm/packages/client/src/app/lib/crops.ts +97 -0
  204. package/templates/nextjs/sui-farm/packages/client/src/app/market/page.tsx +763 -0
  205. package/templates/nextjs/sui-farm/packages/client/src/app/page.tsx +1173 -0
  206. package/templates/nextjs/sui-farm/packages/client/src/app/providers.tsx +69 -0
  207. package/templates/nextjs/sui-farm/packages/client/src/app/state/index.tsx +5 -0
  208. package/templates/nextjs/sui-farm/packages/client/tailwind.config.ts +25 -0
  209. package/templates/nextjs/sui-farm/packages/client/tsconfig.json +30 -0
  210. package/templates/nextjs/sui-farm/packages/contracts/.gitignore_ +51 -0
  211. package/templates/nextjs/sui-farm/packages/contracts/.prettierignore +1 -0
  212. package/templates/nextjs/sui-farm/packages/contracts/.prettierrc.json +8 -0
  213. package/templates/nextjs/sui-farm/packages/contracts/Dockerfile +5 -0
  214. package/templates/nextjs/sui-farm/packages/contracts/Pub.localnet.toml +13 -0
  215. package/templates/nextjs/sui-farm/packages/contracts/counter.lock.json +14 -0
  216. package/templates/nextjs/sui-farm/packages/contracts/docker-compose.yml +34 -0
  217. package/templates/nextjs/sui-farm/packages/contracts/dubhe.config.ts +178 -0
  218. package/templates/nextjs/sui-farm/packages/contracts/harvest.lock.json +120 -0
  219. package/templates/nextjs/sui-farm/packages/contracts/package.json +48 -0
  220. package/templates/nextjs/sui-farm/packages/contracts/scripts/config.ts +17 -0
  221. package/templates/nextjs/sui-farm/packages/contracts/scripts/query-dapp-revenue.ts +95 -0
  222. package/templates/nextjs/sui-farm/packages/contracts/scripts/read-permit.ts +72 -0
  223. package/templates/nextjs/sui-farm/packages/contracts/scripts/seed.ts +85 -0
  224. package/templates/nextjs/sui-farm/packages/contracts/scripts/withdraw-dapp-revenue.ts +56 -0
  225. package/templates/nextjs/sui-farm/packages/contracts/src/counter/Move.toml +14 -0
  226. package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/dapp_key.move +31 -0
  227. package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/error.move +10 -0
  228. package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/genesis.move +33 -0
  229. package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/init_test.move +23 -0
  230. package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/resources/counter1.move +64 -0
  231. package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/resources/counter2.move +70 -0
  232. package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/codegen/user_storage_init.move +26 -0
  233. package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/scripts/deploy_hook.move +8 -0
  234. package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/scripts/migrate.move +8 -0
  235. package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/systems/counter.move +13 -0
  236. package/templates/nextjs/sui-farm/packages/contracts/src/counter/sources/tests/counter.move +28 -0
  237. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/Move.toml +14 -0
  238. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/dapp_key.move +46 -0
  239. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/enums/crop_type.move +47 -0
  240. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/enums/egg_type.move +42 -0
  241. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/enums/pet_rarity.move +37 -0
  242. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/enums/pet_species.move +52 -0
  243. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/error.move +110 -0
  244. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/genesis.move +33 -0
  245. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/init_test.move +23 -0
  246. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/permits/world.move +125 -0
  247. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/carrot.move +136 -0
  248. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/carrot_seed.move +80 -0
  249. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/common_egg.move +136 -0
  250. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/corn.move +136 -0
  251. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/corn_seed.move +80 -0
  252. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/crow_charges.move +162 -0
  253. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/crow_damage.move +207 -0
  254. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/farm_plot.move +261 -0
  255. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/gold.move +80 -0
  256. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pet.move +467 -0
  257. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pet_config.move +372 -0
  258. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pet_hatch.move +162 -0
  259. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pet_slot_index.move +83 -0
  260. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pet_slots.move +64 -0
  261. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/profile.move +162 -0
  262. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pumpkin.move +136 -0
  263. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/pumpkin_seed.move +80 -0
  264. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/rare_egg.move +136 -0
  265. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/scarecrow.move +64 -0
  266. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/season_config.move +197 -0
  267. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/season_stats.move +64 -0
  268. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/seasonal_egg.move +136 -0
  269. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/shop_config.move +267 -0
  270. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/trophy.move +245 -0
  271. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/wheat.move +136 -0
  272. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/wheat_seed.move +80 -0
  273. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/resources/world_permit_id.move +64 -0
  274. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/codegen/user_storage_init.move +26 -0
  275. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/scripts/deploy_hook.move +45 -0
  276. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/scripts/migrate.move +7 -0
  277. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/crow_system.move +96 -0
  278. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/farm_system.move +182 -0
  279. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/market_system.move +172 -0
  280. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/pet_system.move +495 -0
  281. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/season_system.move +70 -0
  282. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/shop_system.move +112 -0
  283. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/systems/world_system.move +34 -0
  284. package/templates/nextjs/sui-farm/packages/contracts/src/harvest/sources/tests/farm_tests.move +1192 -0
  285. package/templates/nextjs/sui-farm/pnpm-workspace.yaml +2 -0
  286. package/templates/nextjs/sui-template/packages/client/src/app/components/ProxyCard.tsx +683 -0
  287. package/templates/nextjs/sui-template/packages/client/src/app/page.tsx +510 -5
  288. package/templates/nextjs/sui-template/packages/client/src/app/providers.tsx +13 -5
  289. package/templates/nextjs/sui-template/packages/contracts/Pub.localnet.toml +4 -4
  290. package/templates/nextjs/sui-template/packages/contracts/counter.lock.json +14 -0
  291. package/templates/nextjs/sui-template/packages/contracts/deployment.ts +8 -3
  292. package/templates/nextjs/sui-template/packages/contracts/dubhe.config.json +9 -9
  293. package/templates/nextjs/sui-template/packages/contracts/dubhe.config.ts +0 -4
  294. package/templates/nextjs/sui-template/packages/contracts/metadata.json +180 -124
  295. package/templates/nextjs/sui-template/packages/contracts/package.json +8 -4
  296. package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/dapp_key.move +45 -31
  297. package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/error.move +10 -0
  298. package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/genesis.move +30 -13
  299. package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/init_test.move +19 -14
  300. package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/resources/counter1.move +30 -20
  301. package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/resources/counter2.move +35 -24
  302. package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/user_storage_init.move +26 -0
  303. package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/scripts/deploy_hook.move +6 -10
  304. package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/systems/counter.move +7 -20
  305. package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/tests/counter.move +14 -27
  306. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/Move.lock +33 -30
  307. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/Move.toml +4 -3
  308. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/dapp_key.move +45 -31
  309. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/error.move +170 -0
  310. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/genesis.move +16 -13
  311. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/init_test.move +8 -14
  312. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/core/account_key.move +1 -3
  313. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/core/dapp_service.move +1776 -137
  314. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/core/data_key.move +1 -20
  315. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/core/events.move +864 -25
  316. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/scripts/deploy_hook.move +15 -16
  317. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/scripts/migrate.move +0 -3
  318. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/systems/address_system.move +25 -17
  319. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/systems/dapp_system.move +2802 -343
  320. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/systems/utils.move +1 -1
  321. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/address.move +173 -55
  322. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/dapp_test.move +769 -0
  323. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/fee_test.move +2965 -0
  324. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/integration_test.move +303 -0
  325. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/listing_test.move +1422 -0
  326. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/scene_session_test.move +269 -0
  327. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/session_test.move +624 -0
  328. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/storage_test.move +700 -0
  329. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/typed_object_test.move +177 -0
  330. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/typed_scene_test.move +452 -0
  331. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/tests/user_storage_test.move +160 -0
  332. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/utils/math.move +4 -3
  333. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/utils/type_info.move +2 -2
  334. package/templates/101/sui-template/packages/contracts/src/counter/Move.lock +0 -41
  335. package/templates/101/sui-template/packages/contracts/src/counter/Published.toml +0 -9
  336. package/templates/101/sui-template/packages/contracts/src/counter/sources/codegen/errors.move +0 -12
  337. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/errors.move +0 -140
  338. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dapp_fee_config.move +0 -186
  339. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dapp_fee_state.move +0 -306
  340. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dapp_metadata.move +0 -396
  341. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dubhe_config.move +0 -246
  342. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/core/dapp_store.move +0 -29
  343. package/templates/101/sui-template/packages/contracts/src/dubhe/sources/systems/session_system.move +0 -44
  344. package/templates/contract/sui-template/src/dubhe/sources/codegen/errors.move +0 -140
  345. package/templates/contract/sui-template/src/dubhe/sources/codegen/resources/dapp_fee_config.move +0 -186
  346. package/templates/contract/sui-template/src/dubhe/sources/codegen/resources/dapp_fee_state.move +0 -306
  347. package/templates/contract/sui-template/src/dubhe/sources/codegen/resources/dapp_metadata.move +0 -396
  348. package/templates/contract/sui-template/src/dubhe/sources/codegen/resources/dubhe_config.move +0 -246
  349. package/templates/contract/sui-template/src/dubhe/sources/core/dapp_store.move +0 -29
  350. package/templates/contract/sui-template/src/dubhe/sources/systems/session_system.move +0 -44
  351. package/templates/nextjs/sui-template/packages/contracts/src/counter/Move.lock +0 -47
  352. package/templates/nextjs/sui-template/packages/contracts/src/counter/Published.toml +0 -9
  353. package/templates/nextjs/sui-template/packages/contracts/src/counter/sources/codegen/errors.move +0 -12
  354. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/errors.move +0 -140
  355. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dapp_fee_config.move +0 -186
  356. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dapp_fee_state.move +0 -306
  357. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dapp_metadata.move +0 -396
  358. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/codegen/resources/dubhe_config.move +0 -246
  359. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/core/dapp_store.move +0 -29
  360. package/templates/nextjs/sui-template/packages/contracts/src/dubhe/sources/systems/session_system.move +0 -44
@@ -0,0 +1,868 @@
1
+ /**
2
+ * PetAvatar — pixel-art SVG pet portraits.
3
+ * Each species has 3 visual stages keyed by level:
4
+ * Stage 0 (Lv 1-3) : baby — small, round, big eyes
5
+ * Stage 1 (Lv 4-6) : young — medium size, recognisable features
6
+ * Stage 2 (Lv 7-10) : adult — full size, glowing accent pixels
7
+ *
8
+ * All on a 16×16 viewBox. No external assets required.
9
+ */
10
+
11
+ interface AvatarProps {
12
+ size?: number;
13
+ className?: string;
14
+ }
15
+ function R({ x, y, w = 1, h = 1, c }: { x: number; y: number; w?: number; h?: number; c: string }) {
16
+ return <rect x={x} y={y} width={w} height={h} fill={c} />;
17
+ }
18
+ const ISO: React.CSSProperties = { imageRendering: 'pixelated', display: 'block' };
19
+
20
+ // ─── BUNNY ───────────────────────────────────────────────────────────────────
21
+
22
+ function BunnyBaby({ size }: { size: number }) {
23
+ return (
24
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
25
+ {/* Ears (tiny) */}
26
+ <R x={5} y={2} w={1} h={3} c="#FFCCCC" />
27
+ <R x={10} y={2} w={1} h={3} c="#FFCCCC" />
28
+ {/* Head */}
29
+ <R x={4} y={5} w={8} h={6} c="#F5F5F5" />
30
+ <R x={3} y={6} w={10} h={4} c="#F5F5F5" />
31
+ {/* Eyes */}
32
+ <R x={5} y={7} w={2} h={2} c="#FF6B9D" />
33
+ <R x={9} y={7} w={2} h={2} c="#FF6B9D" />
34
+ {/* Nose */}
35
+ <R x={7} y={10} w={2} h={1} c="#FF9BB5" />
36
+ {/* Body (small blob) */}
37
+ <R x={5} y={11} w={6} h={3} c="#F0F0F0" />
38
+ {/* Shadow */}
39
+ <R x={5} y={14} w={6} h={1} c="#D0D0D0" />
40
+ </svg>
41
+ );
42
+ }
43
+
44
+ function BunnyYoung({ size }: { size: number }) {
45
+ return (
46
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
47
+ {/* Ears (longer) */}
48
+ <R x={4} y={1} w={2} h={5} c="#F0D8D8" />
49
+ <R x={10} y={1} w={2} h={5} c="#F0D8D8" />
50
+ <R x={5} y={2} w={1} h={3} c="#FFAABB" />
51
+ <R x={10} y={2} w={1} h={3} c="#FFAABB" />
52
+ {/* Head */}
53
+ <R x={3} y={5} w={10} h={7} c="#F5F5F5" />
54
+ <R x={2} y={6} w={12} h={5} c="#F5F5F5" />
55
+ {/* Eyes */}
56
+ <R x={4} y={7} w={2} h={2} c="#FF6B9D" />
57
+ <R x={10} y={7} w={2} h={2} c="#FF6B9D" />
58
+ <R x={4} y={7} w={1} h={1} c="#FFFFFF" />
59
+ <R x={10} y={7} w={1} h={1} c="#FFFFFF" />
60
+ {/* Nose + mouth */}
61
+ <R x={7} y={10} w={2} h={1} c="#FF9BB5" />
62
+ <R x={6} y={11} w={1} h={1} c="#FF9BB5" />
63
+ <R x={9} y={11} w={1} h={1} c="#FF9BB5" />
64
+ {/* Body */}
65
+ <R x={4} y={12} w={8} h={3} c="#F0F0F0" />
66
+ <R x={3} y={13} w={10} h={1} c="#F5F5F5" />
67
+ </svg>
68
+ );
69
+ }
70
+
71
+ function BunnyAdult({ size }: { size: number }) {
72
+ return (
73
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
74
+ {/* Tall pointed ears */}
75
+ <R x={3} y={0} w={2} h={6} c="#F0D8D8" />
76
+ <R x={11} y={0} w={2} h={6} c="#F0D8D8" />
77
+ <R x={4} y={1} w={1} h={4} c="#FF99BB" />
78
+ <R x={11} y={1} w={1} h={4} c="#FF99BB" />
79
+ {/* Glowing ear tips */}
80
+ <R x={3} y={0} w={2} h={1} c="#FFD0E8" />
81
+ <R x={11} y={0} w={2} h={1} c="#FFD0E8" />
82
+ {/* Head */}
83
+ <R x={2} y={5} w={12} h={7} c="#FFFFFF" />
84
+ <R x={1} y={6} w={14} h={5} c="#FFFFFF" />
85
+ {/* Eyes */}
86
+ <R x={3} y={7} w={3} h={2} c="#FF3388" />
87
+ <R x={10} y={7} w={3} h={2} c="#FF3388" />
88
+ <R x={3} y={7} w={1} h={1} c="#FFFFFF" />
89
+ <R x={10} y={7} w={1} h={1} c="#FFFFFF" />
90
+ {/* Nose */}
91
+ <R x={7} y={10} w={2} h={1} c="#FF99BB" />
92
+ <R x={5} y={11} w={2} h={1} c="#FFB8CC" />
93
+ <R x={9} y={11} w={2} h={1} c="#FFB8CC" />
94
+ {/* Body */}
95
+ <R x={3} y={12} w={10} h={3} c="#F8F8F8" />
96
+ <R x={2} y={13} w={12} h={2} c="#F0F0F0" />
97
+ {/* Tummy */}
98
+ <R x={6} y={13} w={4} h={2} c="#FFE8EE" />
99
+ </svg>
100
+ );
101
+ }
102
+
103
+ // ─── CHICK ───────────────────────────────────────────────────────────────────
104
+
105
+ function ChickBaby({ size }: { size: number }) {
106
+ return (
107
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
108
+ {/* Round yellow body */}
109
+ <R x={5} y={5} w={6} h={6} c="#FFE066" />
110
+ <R x={4} y={6} w={8} h={4} c="#FFE066" />
111
+ {/* Wing nubs */}
112
+ <R x={3} y={7} w={2} h={2} c="#FFC840" />
113
+ <R x={11} y={7} w={2} h={2} c="#FFC840" />
114
+ {/* Eyes */}
115
+ <R x={6} y={7} w={1} h={1} c="#1A1A1A" />
116
+ <R x={9} y={7} w={1} h={1} c="#1A1A1A" />
117
+ {/* Beak */}
118
+ <R x={7} y={9} w={2} h={1} c="#FF8C00" />
119
+ {/* Comb */}
120
+ <R x={7} y={4} w={2} h={2} c="#FF4444" />
121
+ <R x={6} y={4} w={1} h={1} c="#FF4444" />
122
+ {/* Feet */}
123
+ <R x={6} y={11} w={1} h={2} c="#FF8C00" />
124
+ <R x={9} y={11} w={1} h={2} c="#FF8C00" />
125
+ <R x={5} y={13} w={2} h={1} c="#FF8C00" />
126
+ <R x={9} y={13} w={2} h={1} c="#FF8C00" />
127
+ </svg>
128
+ );
129
+ }
130
+
131
+ function ChickYoung({ size }: { size: number }) {
132
+ return (
133
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
134
+ {/* Body */}
135
+ <R x={4} y={6} w={8} h={7} c="#FFD633" />
136
+ <R x={3} y={7} w={10} h={5} c="#FFD633" />
137
+ {/* Wings */}
138
+ <R x={2} y={8} w={2} h={3} c="#FFC020" />
139
+ <R x={12} y={8} w={2} h={3} c="#FFC020" />
140
+ <R x={2} y={9} w={1} h={1} c="#FFAA00" />
141
+ <R x={13} y={9} w={1} h={1} c="#FFAA00" />
142
+ {/* Head */}
143
+ <R x={5} y={3} w={6} h={5} c="#FFE066" />
144
+ <R x={4} y={4} w={8} h={4} c="#FFE066" />
145
+ {/* Comb */}
146
+ <R x={6} y={2} w={1} h={2} c="#FF3333" />
147
+ <R x={8} y={1} w={2} h={3} c="#FF3333" />
148
+ {/* Eyes */}
149
+ <R x={5} y={5} w={2} h={2} c="#1A1A1A" />
150
+ <R x={9} y={5} w={2} h={2} c="#1A1A1A" />
151
+ <R x={5} y={5} w={1} h={1} c="#FFFFFF" />
152
+ <R x={9} y={5} w={1} h={1} c="#FFFFFF" />
153
+ {/* Beak */}
154
+ <R x={7} y={7} w={2} h={2} c="#FF7700" />
155
+ {/* Feet */}
156
+ <R x={5} y={13} w={2} h={2} c="#FF8C00" />
157
+ <R x={9} y={13} w={2} h={2} c="#FF8C00" />
158
+ <R x={4} y={15} w={3} h={1} c="#FF8C00" />
159
+ <R x={9} y={15} w={3} h={1} c="#FF8C00" />
160
+ </svg>
161
+ );
162
+ }
163
+
164
+ function ChickAdult({ size }: { size: number }) {
165
+ return (
166
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
167
+ {/* Body */}
168
+ <R x={3} y={7} w={10} h={7} c="#FFC800" />
169
+ <R x={2} y={8} w={12} h={5} c="#FFC800" />
170
+ {/* Wings spread */}
171
+ <R x={1} y={8} w={2} h={4} c="#E8A800" />
172
+ <R x={13} y={8} w={2} h={4} c="#E8A800" />
173
+ <R x={0} y={9} w={2} h={2} c="#D09000" />
174
+ <R x={14} y={9} w={2} h={2} c="#D09000" />
175
+ {/* Tail feathers */}
176
+ <R x={4} y={13} w={1} h={3} c="#FF9900" />
177
+ <R x={7} y={14} w={2} h={2} c="#FF9900" />
178
+ <R x={11} y={13} w={1} h={3} c="#FF9900" />
179
+ {/* Head */}
180
+ <R x={4} y={2} w={8} h={6} c="#FFD833" />
181
+ <R x={3} y={3} w={10} h={5} c="#FFD833" />
182
+ {/* Big comb */}
183
+ <R x={5} y={0} w={2} h={3} c="#FF2222" />
184
+ <R x={8} y={1} w={2} h={4} c="#FF2222" />
185
+ <R x={11} y={0} w={2} h={3} c="#FF2222" />
186
+ {/* Eyes */}
187
+ <R x={4} y={4} w={3} h={2} c="#1A1A1A" />
188
+ <R x={9} y={4} w={3} h={2} c="#1A1A1A" />
189
+ <R x={4} y={4} w={1} h={1} c="#FFFFFF" />
190
+ <R x={9} y={4} w={1} h={1} c="#FFFFFF" />
191
+ {/* Beak */}
192
+ <R x={6} y={6} w={4} h={2} c="#FF6600" />
193
+ {/* Accent glow */}
194
+ <R x={6} y={8} w={4} h={1} c="#FFE080" />
195
+ </svg>
196
+ );
197
+ }
198
+
199
+ // ─── FOX ─────────────────────────────────────────────────────────────────────
200
+
201
+ function FoxBaby({ size }: { size: number }) {
202
+ return (
203
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
204
+ {/* Ears */}
205
+ <R x={3} y={3} w={3} h={3} c="#E8650A" />
206
+ <R x={10} y={3} w={3} h={3} c="#E8650A" />
207
+ <R x={4} y={4} w={1} h={2} c="#FFCCAA" />
208
+ <R x={11} y={4} w={1} h={2} c="#FFCCAA" />
209
+ {/* Head */}
210
+ <R x={4} y={5} w={8} h={6} c="#E8730A" />
211
+ <R x={3} y={6} w={10} h={4} c="#E8730A" />
212
+ {/* White muzzle */}
213
+ <R x={5} y={9} w={6} h={2} c="#FFEECC" />
214
+ {/* Eyes */}
215
+ <R x={5} y={7} w={2} h={2} c="#1A1A1A" />
216
+ <R x={9} y={7} w={2} h={2} c="#1A1A1A" />
217
+ <R x={5} y={7} w={1} h={1} c="#FFFFFF" />
218
+ <R x={9} y={7} w={1} h={1} c="#FFFFFF" />
219
+ {/* Nose */}
220
+ <R x={7} y={9} w={2} h={1} c="#331A00" />
221
+ {/* Body */}
222
+ <R x={5} y={11} w={6} h={4} c="#E07008" />
223
+ {/* Tail */}
224
+ <R x={11} y={12} w={3} h={2} c="#E07008" />
225
+ <R x={13} y={11} w={2} h={1} c="#FFFFFF" />
226
+ </svg>
227
+ );
228
+ }
229
+
230
+ function FoxYoung({ size }: { size: number }) {
231
+ return (
232
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
233
+ {/* Pointed ears */}
234
+ <R x={2} y={2} w={3} h={4} c="#D86808" />
235
+ <R x={11} y={2} w={3} h={4} c="#D86808" />
236
+ <R x={3} y={3} w={1} h={3} c="#FFBBAA" />
237
+ <R x={12} y={3} w={1} h={3} c="#FFBBAA" />
238
+ {/* Head */}
239
+ <R x={2} y={5} w={12} h={7} c="#E8720A" />
240
+ <R x={1} y={6} w={14} h={5} c="#E8720A" />
241
+ {/* White face patch */}
242
+ <R x={3} y={7} w={4} h={4} c="#FFF0DD" />
243
+ <R x={9} y={7} w={4} h={4} c="#FFF0DD" />
244
+ {/* Eyes */}
245
+ <R x={4} y={7} w={2} h={2} c="#1A1A1A" />
246
+ <R x={10} y={7} w={2} h={2} c="#1A1A1A" />
247
+ <R x={4} y={7} w={1} h={1} c="#FFFFFF" />
248
+ <R x={10} y={7} w={1} h={1} c="#FFFFFF" />
249
+ {/* Nose */}
250
+ <R x={7} y={10} w={2} h={1} c="#331A00" />
251
+ {/* Body */}
252
+ <R x={3} y={12} w={10} h={3} c="#D86808" />
253
+ <R x={12} y={11} w={4} h={3} c="#D86808" />
254
+ <R x={14} y={9} w={2} h={3} c="#FFFFFF" />
255
+ </svg>
256
+ );
257
+ }
258
+
259
+ function FoxAdult({ size }: { size: number }) {
260
+ return (
261
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
262
+ {/* Tall pointed ears */}
263
+ <R x={1} y={0} w={4} h={5} c="#CC5500" />
264
+ <R x={11} y={0} w={4} h={5} c="#CC5500" />
265
+ <R x={2} y={1} w={2} h={4} c="#FFAA88" />
266
+ <R x={12} y={1} w={2} h={4} c="#FFAA88" />
267
+ {/* Ear glow */}
268
+ <R x={2} y={0} w={2} h={1} c="#FF8844" />
269
+ <R x={12} y={0} w={2} h={1} c="#FF8844" />
270
+ {/* Head */}
271
+ <R x={1} y={4} w={14} h={8} c="#E06800" />
272
+ <R x={0} y={5} w={16} h={6} c="#E06800" />
273
+ {/* Bold white muzzle */}
274
+ <R x={3} y={8} w={10} h={4} c="#FFEECC" />
275
+ {/* Eyes */}
276
+ <R x={2} y={5} w={4} h={3} c="#1A1A1A" />
277
+ <R x={10} y={5} w={4} h={3} c="#1A1A1A" />
278
+ <R x={2} y={5} w={1} h={1} c="#FFFFFF" />
279
+ <R x={10} y={5} w={1} h={1} c="#FFFFFF" />
280
+ {/* Pupils */}
281
+ <R x={3} y={6} w={2} h={1} c="#440000" />
282
+ <R x={11} y={6} w={2} h={1} c="#440000" />
283
+ {/* Nose */}
284
+ <R x={6} y={9} w={4} h={2} c="#330000" />
285
+ {/* Body */}
286
+ <R x={2} y={12} w={12} h={3} c="#CC6000" />
287
+ {/* Fluffy tail */}
288
+ <R x={13} y={9} w={3} h={5} c="#CC6000" />
289
+ <R x={14} y={7} w={2} h={3} c="#CC6000" />
290
+ <R x={14} y={7} w={2} h={2} c="#FFEECC" />
291
+ </svg>
292
+ );
293
+ }
294
+
295
+ // ─── DEER ────────────────────────────────────────────────────────────────────
296
+
297
+ function DeerBaby({ size }: { size: number }) {
298
+ return (
299
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
300
+ {/* Head */}
301
+ <R x={4} y={4} w={8} h={6} c="#C88040" />
302
+ <R x={3} y={5} w={10} h={4} c="#C88040" />
303
+ {/* Big eyes */}
304
+ <R x={5} y={6} w={2} h={2} c="#331A00" />
305
+ <R x={9} y={6} w={2} h={2} c="#331A00" />
306
+ <R x={5} y={6} w={1} h={1} c="#FFFFFF" />
307
+ <R x={9} y={6} w={1} h={1} c="#FFFFFF" />
308
+ {/* Muzzle */}
309
+ <R x={6} y={8} w={4} h={2} c="#E8A060" />
310
+ <R x={7} y={9} w={2} h={1} c="#BB6030" />
311
+ {/* Ears */}
312
+ <R x={2} y={5} w={2} h={3} c="#C88040" />
313
+ <R x={12} y={5} w={2} h={3} c="#C88040" />
314
+ <R x={2} y={5} w={1} h={2} c="#E8A060" />
315
+ <R x={13} y={5} w={1} h={2} c="#E8A060" />
316
+ {/* Body */}
317
+ <R x={5} y={10} w={6} h={4} c="#B87030" />
318
+ {/* Spots */}
319
+ <R x={6} y={11} w={1} h={1} c="#DDAA60" />
320
+ <R x={9} y={12} w={1} h={1} c="#DDAA60" />
321
+ </svg>
322
+ );
323
+ }
324
+
325
+ function DeerYoung({ size }: { size: number }) {
326
+ return (
327
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
328
+ {/* Antler nubs */}
329
+ <R x={4} y={1} w={1} h={3} c="#8B5520" />
330
+ <R x={11} y={1} w={1} h={3} c="#8B5520" />
331
+ {/* Head */}
332
+ <R x={3} y={4} w={10} h={7} c="#C88040" />
333
+ <R x={2} y={5} w={12} h={5} c="#C88040" />
334
+ {/* Eyes */}
335
+ <R x={4} y={6} w={2} h={2} c="#331A00" />
336
+ <R x={10} y={6} w={2} h={2} c="#331A00" />
337
+ <R x={4} y={6} w={1} h={1} c="#FFFFFF" />
338
+ <R x={10} y={6} w={1} h={1} c="#FFFFFF" />
339
+ {/* Muzzle */}
340
+ <R x={5} y={8} w={6} h={3} c="#E0A060" />
341
+ <R x={7} y={10} w={2} h={1} c="#AA5020" />
342
+ {/* Ears */}
343
+ <R x={1} y={4} w={2} h={4} c="#C88040" />
344
+ <R x={13} y={4} w={2} h={4} c="#C88040" />
345
+ {/* Body */}
346
+ <R x={4} y={11} w={8} h={4} c="#B07030" />
347
+ <R x={3} y={12} w={10} h={3} c="#B07030" />
348
+ {/* Spots */}
349
+ <R x={5} y={12} w={1} h={1} c="#DDAA60" />
350
+ <R x={8} y={13} w={1} h={1} c="#DDAA60" />
351
+ <R x={11} y={12} w={1} h={1} c="#DDAA60" />
352
+ </svg>
353
+ );
354
+ }
355
+
356
+ function DeerAdult({ size }: { size: number }) {
357
+ return (
358
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
359
+ {/* Full antlers */}
360
+ <R x={3} y={0} w={1} h={4} c="#7A4820" />
361
+ <R x={12} y={0} w={1} h={4} c="#7A4820" />
362
+ <R x={2} y={1} w={2} h={1} c="#7A4820" />
363
+ <R x={12} y={1} w={2} h={1} c="#7A4820" />
364
+ <R x={1} y={2} w={2} h={1} c="#7A4820" />
365
+ <R x={13} y={2} w={2} h={1} c="#7A4820" />
366
+ <R x={4} y={2} w={2} h={1} c="#7A4820" />
367
+ <R x={10} y={2} w={2} h={1} c="#7A4820" />
368
+ {/* Head */}
369
+ <R x={2} y={4} w={12} h={7} c="#C07830" />
370
+ <R x={1} y={5} w={14} h={5} c="#C07830" />
371
+ {/* Eyes (glowing amber) */}
372
+ <R x={3} y={5} w={3} h={3} c="#331A00" />
373
+ <R x={10} y={5} w={3} h={3} c="#331A00" />
374
+ <R x={3} y={5} w={1} h={1} c="#FFCC44" />
375
+ <R x={10} y={5} w={1} h={1} c="#FFCC44" />
376
+ {/* Broad muzzle */}
377
+ <R x={4} y={8} w={8} h={3} c="#DDA060" />
378
+ <R x={6} y={10} w={4} h={1} c="#996633" />
379
+ {/* Ears */}
380
+ <R x={0} y={4} w={2} h={5} c="#C07830" />
381
+ <R x={14} y={4} w={2} h={5} c="#C07830" />
382
+ <R x={0} y={5} w={1} h={3} c="#E8A060" />
383
+ <R x={15} y={5} w={1} h={3} c="#E8A060" />
384
+ {/* Body */}
385
+ <R x={2} y={11} w={12} h={4} c="#A86820" />
386
+ <R x={1} y={12} w={14} h={3} c="#A86820" />
387
+ {/* White belly spots */}
388
+ <R x={5} y={12} w={2} h={2} c="#E8C888" />
389
+ <R x={9} y={12} w={2} h={2} c="#E8C888" />
390
+ </svg>
391
+ );
392
+ }
393
+
394
+ // ─── DRAGON ──────────────────────────────────────────────────────────────────
395
+
396
+ function DragonBaby({ size }: { size: number }) {
397
+ return (
398
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
399
+ {/* Head (round) */}
400
+ <R x={4} y={4} w={8} h={7} c="#5A8A3C" />
401
+ <R x={3} y={5} w={10} h={5} c="#5A8A3C" />
402
+ {/* Small horns */}
403
+ <R x={5} y={3} w={1} h={2} c="#3A6820" />
404
+ <R x={10} y={3} w={1} h={2} c="#3A6820" />
405
+ {/* Eyes (glowing yellow) */}
406
+ <R x={5} y={6} w={2} h={2} c="#FFD700" />
407
+ <R x={9} y={6} w={2} h={2} c="#FFD700" />
408
+ <R x={5} y={6} w={1} h={1} c="#FFFFFF" />
409
+ <R x={9} y={6} w={1} h={1} c="#FFFFFF" />
410
+ {/* Nostrils */}
411
+ <R x={7} y={9} w={1} h={1} c="#2A5010" />
412
+ <R x={8} y={9} w={1} h={1} c="#2A5010" />
413
+ {/* Body (chubby) */}
414
+ <R x={5} y={11} w={6} h={4} c="#4A7A30" />
415
+ {/* Tail */}
416
+ <R x={10} y={12} w={4} h={2} c="#4A7A30" />
417
+ <R x={13} y={11} w={2} h={2} c="#3A6820" />
418
+ {/* Tummy */}
419
+ <R x={6} y={12} w={4} h={2} c="#88CC66" />
420
+ </svg>
421
+ );
422
+ }
423
+
424
+ function DragonYoung({ size }: { size: number }) {
425
+ return (
426
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
427
+ {/* Head */}
428
+ <R x={3} y={3} w={10} h={7} c="#4A8838" />
429
+ <R x={2} y={4} w={12} h={5} c="#4A8838" />
430
+ {/* Horns with tip */}
431
+ <R x={4} y={1} w={2} h={3} c="#2A5818" />
432
+ <R x={10} y={1} w={2} h={3} c="#2A5818" />
433
+ <R x={5} y={0} w={1} h={2} c="#88CC44" />
434
+ <R x={10} y={0} w={1} h={2} c="#88CC44" />
435
+ {/* Eyes */}
436
+ <R x={4} y={5} w={3} h={2} c="#FFD700" />
437
+ <R x={9} y={5} w={3} h={2} c="#FFD700" />
438
+ <R x={5} y={5} w={1} h={2} c="#FF6600" />
439
+ <R x={10} y={5} w={1} h={2} c="#FF6600" />
440
+ {/* Mouth fire hint */}
441
+ <R x={6} y={8} w={4} h={2} c="#2A5818" />
442
+ <R x={7} y={9} w={2} h={1} c="#FF8822" />
443
+ {/* Body + wings */}
444
+ <R x={3} y={10} w={10} h={5} c="#3A7828" />
445
+ <R x={1} y={9} w={3} h={4} c="#558833" />
446
+ <R x={12} y={9} w={3} h={4} c="#558833" />
447
+ {/* Tummy */}
448
+ <R x={5} y={11} w={6} h={3} c="#77BB55" />
449
+ {/* Tail */}
450
+ <R x={12} y={13} w={4} h={2} c="#3A6820" />
451
+ </svg>
452
+ );
453
+ }
454
+
455
+ function DragonAdult({ size }: { size: number }) {
456
+ return (
457
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
458
+ {/* Head */}
459
+ <R x={2} y={3} w={12} h={7} c="#3A7820" />
460
+ <R x={1} y={4} w={14} h={5} c="#3A7820" />
461
+ {/* Dramatic horns */}
462
+ <R x={3} y={0} w={2} h={4} c="#224810" />
463
+ <R x={11} y={0} w={2} h={4} c="#224810" />
464
+ <R x={2} y={1} w={2} h={2} c="#224810" />
465
+ <R x={12} y={1} w={2} h={2} c="#224810" />
466
+ <R x={4} y={0} w={1} h={1} c="#AAFF44" />
467
+ <R x={11} y={0} w={1} h={1} c="#AAFF44" />
468
+ {/* Glowing eyes */}
469
+ <R x={2} y={4} w={4} h={3} c="#FF8800" />
470
+ <R x={10} y={4} w={4} h={3} c="#FF8800" />
471
+ <R x={3} y={5} w={2} h={1} c="#FFFF00" />
472
+ <R x={11} y={5} w={2} h={1} c="#FFFF00" />
473
+ <R x={2} y={4} w={1} h={1} c="#FFFFFF" />
474
+ <R x={10} y={4} w={1} h={1} c="#FFFFFF" />
475
+ {/* Jaw + fire breath */}
476
+ <R x={3} y={7} w={10} h={3} c="#224810" />
477
+ <R x={5} y={9} w={6} h={2} c="#FF6600" />
478
+ <R x={6} y={10} w={4} h={2} c="#FF4400" />
479
+ <R x={7} y={11} w={2} h={2} c="#FFCC00" />
480
+ {/* Body */}
481
+ <R x={1} y={10} w={14} h={5} c="#2A6818" />
482
+ {/* Scale ridge */}
483
+ <R x={7} y={10} w={2} h={5} c="#1A5010" />
484
+ {/* Wings */}
485
+ <R x={0} y={8} w={2} h={5} c="#336622" />
486
+ <R x={14} y={8} w={2} h={5} c="#336622" />
487
+ <R x={0} y={6} w={1} h={4} c="#448833" />
488
+ <R x={15} y={6} w={1} h={4} c="#448833" />
489
+ {/* Tummy glow */}
490
+ <R x={4} y={11} w={8} h={3} c="#66CC44" />
491
+ <R x={6} y={12} w={4} h={1} c="#AAFF66" />
492
+ </svg>
493
+ );
494
+ }
495
+
496
+ // ─── EGGS ────────────────────────────────────────────────────────────────────
497
+
498
+ function EggCommon({ size }: { size: number }) {
499
+ return (
500
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
501
+ <R x={5} y={2} w={6} h={1} c="#E8D8B8" />
502
+ <R x={3} y={3} w={10} h={1} c="#E8D8B8" />
503
+ <R x={2} y={4} w={12} h={7} c="#F0E0C0" />
504
+ <R x={3} y={11} w={10} h={2} c="#E8D8B8" />
505
+ <R x={5} y={13} w={6} h={1} c="#D8C8A8" />
506
+ {/* Shine */}
507
+ <R x={4} y={5} w={3} h={2} c="#FFFBF0" />
508
+ </svg>
509
+ );
510
+ }
511
+
512
+ function EggRare({ size }: { size: number }) {
513
+ return (
514
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
515
+ <R x={5} y={2} w={6} h={1} c="#9080F0" />
516
+ <R x={3} y={3} w={10} h={1} c="#A090FF" />
517
+ <R x={2} y={4} w={12} h={7} c="#B0A0FF" />
518
+ <R x={3} y={11} w={10} h={2} c="#9080F0" />
519
+ <R x={5} y={13} w={6} h={1} c="#7060D0" />
520
+ {/* Stars on egg */}
521
+ <R x={5} y={6} w={1} h={1} c="#FFFFFF" />
522
+ <R x={10} y={5} w={1} h={1} c="#FFFFFF" />
523
+ <R x={8} y={8} w={1} h={1} c="#FFFFFF" />
524
+ {/* Shine */}
525
+ <R x={4} y={5} w={2} h={2} c="#D8D0FF" />
526
+ </svg>
527
+ );
528
+ }
529
+
530
+ function EggSeasonal({ size }: { size: number }) {
531
+ return (
532
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
533
+ <R x={5} y={2} w={6} h={1} c="#D0A000" />
534
+ <R x={3} y={3} w={10} h={1} c="#E8B800" />
535
+ <R x={2} y={4} w={12} h={7} c="#F8D020" />
536
+ <R x={3} y={11} w={10} h={2} c="#E8B800" />
537
+ <R x={5} y={13} w={6} h={1} c="#C09000" />
538
+ {/* Swirl decoration */}
539
+ <R x={5} y={5} w={3} h={1} c="#E87800" />
540
+ <R x={8} y={6} w={2} h={1} c="#E87800" />
541
+ <R x={6} y={7} w={3} h={1} c="#E87800" />
542
+ <R x={5} y={8} w={2} h={1} c="#E87800" />
543
+ <R x={9} y={8} w={2} h={1} c="#E87800" />
544
+ {/* Shine */}
545
+ <R x={4} y={5} w={2} h={2} c="#FFFBE0" />
546
+ </svg>
547
+ );
548
+ }
549
+
550
+ // ─── UI ICONS ─────────────────────────────────────────────────────────────────
551
+
552
+ /** Paw icon — used for the PETS panel header */
553
+ export function IconPaw({ size = 20, className }: { size?: number; className?: string }) {
554
+ return (
555
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
556
+ {/* Toes */}
557
+ <R x={2} y={2} w={3} h={3} c="#C88060" />
558
+ <R x={6} y={1} w={3} h={3} c="#C88060" />
559
+ <R x={10} y={1} w={3} h={3} c="#C88060" />
560
+ <R x={12} y={4} w={2} h={2} c="#C88060" />
561
+ {/* Pad */}
562
+ <R x={3} y={5} w={10} h={7} c="#C88060" />
563
+ <R x={2} y={7} w={12} h={5} c="#C88060" />
564
+ {/* Inner pad */}
565
+ <R x={5} y={7} w={6} h={4} c="#A86050" />
566
+ </svg>
567
+ );
568
+ }
569
+
570
+ /** Trophy icon */
571
+ export function IconTrophy({ size = 20, className }: { size?: number; className?: string }) {
572
+ return (
573
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
574
+ <R x={5} y={14} w={6} h={1} c="#8B6914" />
575
+ <R x={6} y={13} w={4} h={2} c="#C8A030" />
576
+ <R x={3} y={2} w={10} h={9} c="#FFD700" />
577
+ <R x={1} y={3} w={2} h={5} c="#FFD700" />
578
+ <R x={13} y={3} w={2} h={5} c="#FFD700" />
579
+ <R x={1} y={8} w={2} h={1} c="#B8860B" />
580
+ <R x={13} y={8} w={2} h={1} c="#B8860B" />
581
+ <R x={5} y={2} w={6} h={1} c="#FFF176" />
582
+ <R x={4} y={3} w={2} h={2} c="#FFF176" />
583
+ <R x={6} y={6} w={2} h={2} c="#B8860B" />
584
+ <R x={3} y={11} w={10} h={2} c="#DAA520" />
585
+ </svg>
586
+ );
587
+ }
588
+
589
+ /** Shop / market stall icon */
590
+ export function IconShop({ size = 20, className }: { size?: number; className?: string }) {
591
+ return (
592
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
593
+ {/* Roof awning */}
594
+ <R x={1} y={3} w={14} h={2} c="#CC3322" />
595
+ <R x={0} y={5} w={16} h={1} c="#AA2211" />
596
+ {/* Stripes */}
597
+ <R x={3} y={3} w={2} h={2} c="#FFFFFF" />
598
+ <R x={7} y={3} w={2} h={2} c="#FFFFFF" />
599
+ <R x={11} y={3} w={2} h={2} c="#FFFFFF" />
600
+ {/* Facade */}
601
+ <R x={1} y={6} w={14} h={9} c="#E8D0A0" />
602
+ {/* Door */}
603
+ <R x={6} y={10} w={4} h={5} c="#8B6914" />
604
+ <R x={7} y={11} w={1} h={1} c="#FFD700" />
605
+ {/* Windows */}
606
+ <R x={2} y={8} w={3} h={3} c="#88CCFF" />
607
+ <R x={11} y={8} w={3} h={3} c="#88CCFF" />
608
+ <R x={2} y={7} w={3} h={1} c="#C89040" />
609
+ <R x={11} y={7} w={3} h={1} c="#C89040" />
610
+ </svg>
611
+ );
612
+ }
613
+
614
+ /** Warning triangle */
615
+ export function IconWarning({ size = 16, className }: { size?: number; className?: string }) {
616
+ return (
617
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
618
+ <R x={7} y={1} w={2} h={1} c="#FF4400" />
619
+ <R x={6} y={2} w={4} h={1} c="#FF4400" />
620
+ <R x={5} y={3} w={6} h={1} c="#FF4400" />
621
+ <R x={4} y={4} w={8} h={1} c="#FF4400" />
622
+ <R x={3} y={5} w={10} h={1} c="#FF4400" />
623
+ <R x={2} y={6} w={12} h={1} c="#FF4400" />
624
+ <R x={1} y={7} w={14} h={1} c="#FF4400" />
625
+ <R x={0} y={8} w={16} h={1} c="#FF4400" />
626
+ <R x={1} y={9} w={14} h={2} c="#FF4400" />
627
+ <R x={0} y={11} w={16} h={2} c="#FF4400" />
628
+ <R x={1} y={13} w={14} h={1} c="#FF4400" />
629
+ {/* Inner fill */}
630
+ <R x={4} y={6} w={8} h={1} c="#FFD700" />
631
+ <R x={3} y={7} w={10} h={1} c="#FFD700" />
632
+ <R x={2} y={8} w={12} h={1} c="#FFD700" />
633
+ <R x={3} y={9} w={10} h={2} c="#FFD700" />
634
+ <R x={2} y={11} w={12} h={2} c="#FFD700" />
635
+ {/* ! mark */}
636
+ <R x={7} y={7} w={2} h={4} c="#331A00" />
637
+ <R x={7} y={12} w={2} h={1} c="#331A00" />
638
+ </svg>
639
+ );
640
+ }
641
+
642
+ /** Tag / list icon */
643
+ export function IconTag({ size = 16, className }: { size?: number; className?: string }) {
644
+ return (
645
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
646
+ <R x={2} y={2} w={8} h={1} c="#C0A060" />
647
+ <R x={1} y={3} w={9} h={8} c="#D0B070" />
648
+ <R x={9} y={5} w={2} h={2} c="#D0B070" />
649
+ <R x={10} y={6} w={2} h={4} c="#D0B070" />
650
+ <R x={11} y={7} w={2} h={5} c="#D0B070" />
651
+ <R x={10} y={5} w={1} h={1} c="#D0B070" />
652
+ {/* Arrow tip */}
653
+ <R x={12} y={9} w={2} h={2} c="#D0B070" />
654
+ <R x={13} y={10} w={2} h={2} c="#D0B070" />
655
+ <R x={14} y={11} w={1} h={1} c="#D0B070" />
656
+ {/* Hole */}
657
+ <R x={4} y={5} w={2} h={2} c="#7A5020" />
658
+ {/* Text lines */}
659
+ <R x={3} y={9} w={5} h={1} c="#A07840" />
660
+ <R x={3} y={7} w={4} h={1} c="#A07840" />
661
+ <R x={1} y={11} w={9} h={1} c="#C0A060" />
662
+ </svg>
663
+ );
664
+ }
665
+
666
+ /** Fork / feed bowl icon */
667
+ export function IconFeed({ size = 16, className }: { size?: number; className?: string }) {
668
+ return (
669
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
670
+ {/* Bowl */}
671
+ <R x={2} y={9} w={12} h={1} c="#8B6914" />
672
+ <R x={1} y={10} w={14} h={3} c="#C8A040" />
673
+ <R x={2} y={13} w={12} h={1} c="#8B6914" />
674
+ {/* Food in bowl */}
675
+ <R x={3} y={10} w={10} h={2} c="#E8B060" />
676
+ <R x={5} y={9} w={2} h={1} c="#CC6800" />
677
+ <R x={9} y={9} w={2} h={1} c="#5A9A3C" />
678
+ {/* Fork */}
679
+ <R x={4} y={2} w={1} h={7} c="#C0C0C0" />
680
+ <R x={4} y={2} w={1} h={3} c="#D0D0D0" />
681
+ <R x={3} y={2} w={1} h={2} c="#C0C0C0" />
682
+ <R x={5} y={2} w={1} h={2} c="#C0C0C0" />
683
+ {/* Spoon */}
684
+ <R x={11} y={5} w={2} h={5} c="#C0C0C0" />
685
+ <R x={10} y={2} w={4} h={4} c="#D0D0D0" />
686
+ <R x={11} y={3} w={2} h={2} c="#B8B8B8" />
687
+ </svg>
688
+ );
689
+ }
690
+
691
+ /** Key icon (for session) */
692
+ export function IconKey({ size = 20, className }: { size?: number; className?: string }) {
693
+ return (
694
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
695
+ <R x={1} y={5} w={8} h={8} c="#FFD700" />
696
+ <R x={2} y={4} w={6} h={10} c="#FFD700" />
697
+ <R x={3} y={3} w={4} h={12} c="#FFD700" />
698
+ <R x={2} y={5} w={8} h={6} c="#FFD700" />
699
+ <R x={3} y={6} w={6} h={4} c="#D4A000" />
700
+ {/* Handle hole */}
701
+ <R x={4} y={7} w={3} h={2} c="#8B4914" />
702
+ {/* Teeth */}
703
+ <R x={9} y={9} w={7} h={2} c="#FFD700" />
704
+ <R x={11} y={11} w={2} h={2} c="#FFD700" />
705
+ <R x={14} y={11} w={2} h={2} c="#FFD700" />
706
+ </svg>
707
+ );
708
+ }
709
+
710
+ /** Star (for level up) */
711
+ export function IconStar({ size = 16, className }: { size?: number; className?: string }) {
712
+ return (
713
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
714
+ <R x={7} y={1} w={2} h={3} c="#FFD700" />
715
+ <R x={7} y={4} w={2} h={8} c="#FFD700" />
716
+ <R x={4} y={7} w={8} h={2} c="#FFD700" />
717
+ <R x={3} y={4} w={3} h={3} c="#FFD700" />
718
+ <R x={10} y={4} w={3} h={3} c="#FFD700" />
719
+ <R x={3} y={9} w={3} h={3} c="#FFD700" />
720
+ <R x={10} y={9} w={3} h={3} c="#FFD700" />
721
+ <R x={6} y={3} w={4} h={10} c="#FFD700" />
722
+ <R x={3} y={6} w={10} h={4} c="#FFD700" />
723
+ </svg>
724
+ );
725
+ }
726
+
727
+ /** Heart (for happiness) */
728
+ export function IconHeart({ size = 16, className }: { size?: number; className?: string }) {
729
+ return (
730
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO} className={className}>
731
+ <R x={2} y={3} w={4} h={2} c="#FF6688" />
732
+ <R x={10} y={3} w={4} h={2} c="#FF6688" />
733
+ <R x={1} y={5} w={6} h={4} c="#FF6688" />
734
+ <R x={9} y={5} w={6} h={4} c="#FF6688" />
735
+ <R x={2} y={9} w={12} h={3} c="#FF6688" />
736
+ <R x={4} y={12} w={8} h={2} c="#FF6688" />
737
+ <R x={6} y={14} w={4} h={1} c="#FF6688" />
738
+ <R x={7} y={15} w={2} h={1} c="#FF6688" />
739
+ {/* Shine */}
740
+ <R x={3} y={5} w={2} h={2} c="#FFB0C8" />
741
+ </svg>
742
+ );
743
+ }
744
+
745
+ /** Wheat seedling (splash screen) */
746
+ export function IconFarm({ size = 64, className }: { size?: number; className?: string }) {
747
+ return (
748
+ <svg width={size} height={size} viewBox="0 0 32 32" style={ISO} className={className}>
749
+ {/* Stalk */}
750
+ <R x={15} y={8} w={2} h={18} c="#8B6914" />
751
+ {/* Golden grain head */}
752
+ <R x={12} y={2} w={8} h={2} c="#F5C518" />
753
+ <R x={10} y={4} w={12} h={4} c="#F5C518" />
754
+ <R x={12} y={8} w={8} h={4} c="#DAA520" />
755
+ {/* Leaves */}
756
+ <R x={6} y={14} w={8} h={4} c="#5A8A3C" />
757
+ <R x={18} y={18} w={8} h={4} c="#5A8A3C" />
758
+ {/* Shine */}
759
+ <R x={10} y={4} w={4} h={2} c="#FFF176" />
760
+ {/* Ground */}
761
+ <R x={6} y={26} w={20} h={2} c="#5C3D1A" />
762
+ <R x={4} y={28} w={24} h={2} c="#4A2E10" />
763
+ </svg>
764
+ );
765
+ }
766
+
767
+ /** Small sprout (registration screen) */
768
+ export function IconSprout({ size = 64, className }: { size?: number; className?: string }) {
769
+ return (
770
+ <svg width={size} height={size} viewBox="0 0 32 32" style={ISO} className={className}>
771
+ <R x={15} y={16} w={2} h={10} c="#5A8A3C" />
772
+ <R x={14} y={12} w={4} h={6} c="#68A040" />
773
+ <R x={8} y={14} w={6} h={4} c="#4A7C3F" />
774
+ <R x={18} y={10} w={6} h={4} c="#5A8A3C" />
775
+ <R x={12} y={10} w={2} h={4} c="#68A040" />
776
+ <R x={6} y={26} w={20} h={2} c="#5C3D1A" />
777
+ </svg>
778
+ );
779
+ }
780
+
781
+ /** Medal icons (rank 1/2/3) */
782
+ export function IconMedal({ rank, size = 24 }: { rank: 1 | 2 | 3; size?: number }) {
783
+ const c = rank === 1 ? '#FFD700' : rank === 2 ? '#C0C0C0' : '#CD7F32';
784
+ const shade = rank === 1 ? '#B8860B' : rank === 2 ? '#909090' : '#A05020';
785
+ return (
786
+ <svg width={size} height={size} viewBox="0 0 16 16" style={ISO}>
787
+ {/* Ribbon */}
788
+ <R x={5} y={0} w={2} h={5} c={rank === 1 ? '#CC2200' : rank === 2 ? '#4488CC' : '#228844'} />
789
+ <R x={9} y={0} w={2} h={5} c={rank === 1 ? '#CC2200' : rank === 2 ? '#4488CC' : '#228844'} />
790
+ {/* Circle */}
791
+ <R x={3} y={4} w={10} h={10} c={c} />
792
+ <R x={2} y={5} w={12} h={8} c={c} />
793
+ <R x={4} y={3} w={8} h={1} c={c} />
794
+ <R x={4} y={12} w={8} h={1} c={c} />
795
+ {/* Shine + shade */}
796
+ <R x={4} y={5} w={3} h={3} c={rank === 1 ? '#FFF8A0' : rank === 2 ? '#FFFFFF' : '#E8A060'} />
797
+ <R x={10} y={10} w={2} h={2} c={shade} />
798
+ {/* Number */}
799
+ <R x={7} y={7} w={2} h={4} c={shade} />
800
+ {rank === 1 && (
801
+ <>
802
+ <R x={6} y={7} w={2} h={1} c={shade} />
803
+ </>
804
+ )}
805
+ {rank === 2 && (
806
+ <>
807
+ <R x={6} y={7} w={4} h={1} c={shade} />
808
+ <R x={6} y={9} w={2} h={1} c={shade} />
809
+ <R x={6} y={11} w={4} h={1} c={shade} />
810
+ </>
811
+ )}
812
+ {rank === 3 && (
813
+ <>
814
+ <R x={6} y={7} w={4} h={1} c={shade} />
815
+ <R x={8} y={9} w={2} h={1} c={shade} />
816
+ <R x={6} y={11} w={4} h={1} c={shade} />
817
+ </>
818
+ )}
819
+ </svg>
820
+ );
821
+ }
822
+
823
+ // ─── PUBLIC API ───────────────────────────────────────────────────────────────
824
+
825
+ export function PetAvatar({
826
+ species,
827
+ level,
828
+ size = 48,
829
+ className
830
+ }: {
831
+ species: number;
832
+ level: number;
833
+ size?: number;
834
+ className?: string;
835
+ }) {
836
+ const stage = level >= 7 ? 2 : level >= 4 ? 1 : 0;
837
+ const key = `${species}-${stage}`;
838
+
839
+ const components: Record<string, JSX.Element> = {
840
+ '1-0': <BunnyBaby size={size} />,
841
+ '1-1': <BunnyYoung size={size} />,
842
+ '1-2': <BunnyAdult size={size} />,
843
+ '2-0': <ChickBaby size={size} />,
844
+ '2-1': <ChickYoung size={size} />,
845
+ '2-2': <ChickAdult size={size} />,
846
+ '3-0': <FoxBaby size={size} />,
847
+ '3-1': <FoxYoung size={size} />,
848
+ '3-2': <FoxAdult size={size} />,
849
+ '4-0': <DeerBaby size={size} />,
850
+ '4-1': <DeerYoung size={size} />,
851
+ '4-2': <DeerAdult size={size} />,
852
+ '5-0': <DragonBaby size={size} />,
853
+ '5-1': <DragonYoung size={size} />,
854
+ '5-2': <DragonAdult size={size} />
855
+ };
856
+
857
+ return (
858
+ <span className={className} style={{ display: 'inline-block' }}>
859
+ {components[key] ?? <BunnyBaby size={size} />}
860
+ </span>
861
+ );
862
+ }
863
+
864
+ export function EggIcon({ eggType, size = 32 }: { eggType: number; size?: number }) {
865
+ if (eggType === 2) return <EggRare size={size} />;
866
+ if (eggType === 3) return <EggSeasonal size={size} />;
867
+ return <EggCommon size={size} />;
868
+ }