@jeremyckahn/farmhand 1.23.3 → 1.24.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 (130) hide show
  1. package/README.md +5 -0
  2. package/dist/assets/index-BZUcLFKn.js +413 -0
  3. package/dist/assets/index-BZUcLFKn.js.map +1 -0
  4. package/dist/assets/index-CaYdR-lC.css +1 -0
  5. package/dist/assets/jersey-10-latin-400-normal-DrL73VYW.woff2 +0 -0
  6. package/dist/assets/jersey-10-latin-ext-400-normal-uIKqQSaG.woff2 +0 -0
  7. package/dist/assets/jersey-20-latin-400-normal-bNi78tgO.woff2 +0 -0
  8. package/dist/assets/jersey-20-latin-ext-400-normal-BO3lmWef.woff2 +0 -0
  9. package/dist/assets/jersey-25-latin-400-normal-BuYJnnt7.woff2 +0 -0
  10. package/dist/assets/jersey-25-latin-ext-400-normal-CP5Jl3WN.woff2 +0 -0
  11. package/dist/index.html +2 -2
  12. package/dist/service-worker.js +1 -1
  13. package/dist/service-worker.js.map +1 -1
  14. package/package.json +11 -14
  15. package/src/components/AccountingView/AccountingView.tsx +31 -23
  16. package/src/components/Achievement/Achievement.tsx +2 -2
  17. package/src/components/AchievementsView/AchievementsView.tsx +1 -1
  18. package/src/components/AppBar/AppBar.tsx +21 -7
  19. package/src/components/Cellar/CellarInventoryTabPanel.tsx +4 -5
  20. package/src/components/Cellar/FermentationTabPanel.tsx +4 -5
  21. package/src/components/Cellar/WinemakingTabPanel.tsx +4 -5
  22. package/src/components/ContextPane/ContextPane.test.tsx +15 -0
  23. package/src/components/ContextPane/ContextPane.tsx +3 -0
  24. package/src/components/CowCard/Bloodline/Bloodline.tsx +1 -2
  25. package/src/components/CowCard/CowCard.tsx +7 -13
  26. package/src/components/CowCard/Subheader/Subheader.tsx +10 -18
  27. package/src/components/CowPen/Cow.tsx +6 -12
  28. package/src/components/CowPen/CowPen.test.tsx +13 -9
  29. package/src/components/CowPen/CowPen.tsx +2 -2
  30. package/src/components/CowPenContextMenu/CowPenContextMenu.tsx +3 -3
  31. package/src/components/Elements/index.ts +1 -0
  32. package/src/components/Farmhand/Farmhand.context.tsx +10 -0
  33. package/src/components/Farmhand/Farmhand.tsx +55 -36
  34. package/src/components/Farmhand/FarmhandReducers.tsx +12 -0
  35. package/src/components/Farmhand/useFarmhand.test.ts +13 -6
  36. package/src/components/Farmhand/useFarmhand.ts +46 -4
  37. package/src/components/FarmhandShuffleContextMenu/FarmhandShuffleContextMenu.test.tsx +131 -0
  38. package/src/components/FarmhandShuffleContextMenu/FarmhandShuffleContextMenu.tsx +122 -0
  39. package/src/components/FarmhandShuffleContextMenu/index.ts +1 -0
  40. package/src/components/FarmhandShuffleView/FarmhandShuffleView.test.tsx +429 -0
  41. package/src/components/FarmhandShuffleView/FarmhandShuffleView.tsx +511 -0
  42. package/src/components/FarmhandShuffleView/index.ts +1 -0
  43. package/src/components/Field/Field.tsx +19 -14
  44. package/src/components/Home/Home.tsx +21 -35
  45. package/src/components/IngredientsList/IngredientsList.tsx +1 -1
  46. package/src/components/Inventory/Inventory.test.tsx +7 -2
  47. package/src/components/Inventory/Inventory.tsx +2 -1
  48. package/src/components/Item/Item.tsx +11 -8
  49. package/src/components/ItemList/ItemList.tsx +1 -1
  50. package/src/components/KeybindingsView/KeybindingsView.tsx +2 -2
  51. package/src/components/LogView/LogView.tsx +13 -27
  52. package/src/components/Markdown/Markdown.tsx +17 -0
  53. package/src/components/Markdown/index.ts +1 -0
  54. package/src/components/Navigation/DayAndProgressContainer.tsx +0 -1
  55. package/src/components/Navigation/Navigation.tsx +14 -12
  56. package/src/components/NotificationSystem/NotificationSystem.test.tsx +49 -6
  57. package/src/components/NotificationSystem/NotificationSystem.tsx +88 -27
  58. package/src/components/OnlinePeersView/OnlinePeersView.tsx +9 -5
  59. package/src/components/PixelIcon/createPixelIcon.test.tsx +59 -0
  60. package/src/components/PixelIcon/createPixelIcon.tsx +97 -0
  61. package/src/components/PixelIcon/icons.ts +445 -0
  62. package/src/components/PixelIcon/index.ts +3 -0
  63. package/src/components/PriceEventView/PriceEventView.tsx +2 -2
  64. package/src/components/ProgressBar/ProgressBar.tsx +9 -3
  65. package/src/components/QuantityInput/QuantityInput.tsx +28 -27
  66. package/src/components/SearchBar/SearchBar.tsx +4 -4
  67. package/src/components/SettingsView/SettingsView.test.tsx +26 -0
  68. package/src/components/SettingsView/SettingsView.tsx +34 -17
  69. package/src/components/Stage/Stage.test.tsx +12 -0
  70. package/src/components/Stage/Stage.tsx +36 -1
  71. package/src/components/StatsView/StatsView.tsx +1 -4
  72. package/src/components/Toolbelt/Toolbelt.tsx +11 -14
  73. package/src/components/UpdateNotifier/UpdateNotifier.tsx +33 -5
  74. package/src/components/Workshop/ForgeTabPanel.tsx +4 -5
  75. package/src/components/Workshop/KitchenTabPanel.tsx +4 -5
  76. package/src/components/Workshop/RecyclingTabPanel.tsx +4 -5
  77. package/src/components/Workshop/WoodChipperTabPanel.tsx +4 -5
  78. package/src/constants.ts +13 -1
  79. package/src/data/achievements.test.ts +88 -0
  80. package/src/data/achievements.ts +54 -0
  81. package/src/data/levels.ts +4 -0
  82. package/src/enums.ts +1 -0
  83. package/src/farmhand.d.ts +47 -1
  84. package/src/game-logic/item-sell.test.ts +3 -3
  85. package/src/game-logic/reducers/index.ts +4 -0
  86. package/src/game-logic/reducers/placeFarmhandShuffleWager.test.ts +95 -0
  87. package/src/game-logic/reducers/placeFarmhandShuffleWager.ts +39 -0
  88. package/src/game-logic/reducers/refundUnresumableFarmhandShuffleMatch.test.ts +47 -0
  89. package/src/game-logic/reducers/refundUnresumableFarmhandShuffleMatch.ts +39 -0
  90. package/src/game-logic/reducers/saveFarmhandShuffleMatch.test.ts +41 -0
  91. package/src/game-logic/reducers/saveFarmhandShuffleMatch.ts +21 -0
  92. package/src/game-logic/reducers/settleFarmhandShuffleMatch.test.ts +144 -0
  93. package/src/game-logic/reducers/settleFarmhandShuffleMatch.ts +71 -0
  94. package/src/game-logic/reducers/showNotification.test.ts +20 -0
  95. package/src/game-logic/reducers/showNotification.ts +4 -2
  96. package/src/handlers/ui-events.tsx +38 -3
  97. package/src/img/ui/hay-bg.piskel +1 -0
  98. package/src/img/ui/hay-bg.png +0 -0
  99. package/src/index.tsx +6 -6
  100. package/src/mui-theme.ts +255 -35
  101. package/src/setupTests.ts +18 -12
  102. package/src/shell/bootup.test.ts +37 -25
  103. package/src/shell/notifications.test.ts +26 -12
  104. package/src/strings.ts +1 -1
  105. package/src/styles/fonts.ts +73 -0
  106. package/src/styles/pixel.ts +151 -0
  107. package/src/styles/sx.ts +17 -8
  108. package/src/styles/tokens.ts +11 -0
  109. package/src/test-utils/index.ts +10 -0
  110. package/src/utils/getCowImage.ts +0 -11
  111. package/src/utils/getValidatedStageFocusFromHash.test.ts +23 -1
  112. package/src/utils/getValidatedStageFocusFromHash.ts +7 -2
  113. package/src/utils/getViewList.test.ts +38 -2
  114. package/src/utils/getViewList.ts +14 -1
  115. package/dist/assets/francois-one-latin-400-normal-DD1rFI7H.woff2 +0 -0
  116. package/dist/assets/francois-one-latin-400-normal-DNXs7uOx.woff +0 -0
  117. package/dist/assets/francois-one-latin-ext-400-normal-CwRdWRZD.woff2 +0 -0
  118. package/dist/assets/francois-one-latin-ext-400-normal-JvkpT0Av.woff +0 -0
  119. package/dist/assets/francois-one-vietnamese-400-normal-BLIKeG5Y.woff2 +0 -0
  120. package/dist/assets/francois-one-vietnamese-400-normal-CuWeHlXs.woff +0 -0
  121. package/dist/assets/index-CNcrTYN-.css +0 -1
  122. package/dist/assets/index-Dihg7UqQ.js +0 -844
  123. package/dist/assets/index-Dihg7UqQ.js.map +0 -1
  124. package/dist/assets/public-sans-latin-400-normal-8Rpg0ruU.woff2 +0 -0
  125. package/dist/assets/public-sans-latin-400-normal-SBbinRkI.woff +0 -0
  126. package/dist/assets/public-sans-latin-ext-400-normal-B02wwOdZ.woff +0 -0
  127. package/dist/assets/public-sans-latin-ext-400-normal-mk90oQqJ.woff2 +0 -0
  128. package/dist/assets/public-sans-vietnamese-400-normal-BO1meqcx.woff +0 -0
  129. package/dist/assets/public-sans-vietnamese-400-normal-TxZB8OSn.woff2 +0 -0
  130. package/src/fontsource.d.ts +0 -3
package/README.md CHANGED
@@ -58,6 +58,7 @@ Farmhand uses a [SemVer](https://semver.org/)-like versioning system. It differs
58
58
 
59
59
  - This project uses [Vite](https://vitejs.dev/), so please refer to the documentation of that project to learn about the development toolchain.
60
60
  - Farmhand uses [Piskel](https://www.piskelapp.com/) for the art assets.
61
+ - The Farmhand Shuffle minigame lives in a separate repository and is embedded here. See [the Farmhand Shuffle guide](doc/farmhand-shuffle.md) for local setup, making changes, and deployment.
61
62
 
62
63
  ## Debugging
63
64
 
@@ -139,6 +140,10 @@ In this case, the local app will be using the Production API, database, and pair
139
140
  - Art style is inherently subjective, but new assets should stay visually consistent with the game's existing art - bold outlines, minimal/simple shading, and a transparent (not filled) background.
140
141
  - Filenames should match the identifier used for that item/tile in the game data (e.g. the `apple` item ID backs `apple.png`/`apple.piskel`, and its `growsInto`/growth-stage IDs back `apple-tree-grown.png`, etc.), so an asset can be traced back to the code that references it.
141
142
 
143
+ ### UI theme conventions
144
+
145
+ The UI's retro pixel art look (9-slice frames, pixel icons and pixel fonts) is built with some nonstandard techniques. Before changing UI styling, icons or fonts, read [ADR 7: Pixel Art UI Theme](doc/adr/0007-pixel-art-ui-theme.md). Some of the rules there are easy to break by accident, for example using `backgroundColor` instead of `background` on framed elements.
146
+
142
147
  ### Testing Guidelines
143
148
 
144
149
  When writing tests for Farmhand, please follow the guidelines documented in [`.rules`](.rules). Key points: