@almadar/std 6.5.2 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/behaviors/registry/atoms/std-agent-activity-log.orb +240 -227
  2. package/behaviors/registry/atoms/std-agent-chat-thread.orb +296 -199
  3. package/behaviors/registry/atoms/std-agent-classifier.orb +384 -133
  4. package/behaviors/registry/atoms/std-agent-completion.orb +404 -141
  5. package/behaviors/registry/atoms/std-agent-context-window.orb +904 -607
  6. package/behaviors/registry/atoms/std-agent-conversation.orb +443 -234
  7. package/behaviors/registry/atoms/std-agent-memory.orb +584 -150
  8. package/behaviors/registry/atoms/std-agent-provider.orb +431 -174
  9. package/behaviors/registry/atoms/std-agent-search.orb +217 -61
  10. package/behaviors/registry/atoms/std-agent-session.orb +406 -159
  11. package/behaviors/registry/atoms/std-agent-step-progress.orb +314 -294
  12. package/behaviors/registry/atoms/std-agent-token-gauge.orb +577 -500
  13. package/behaviors/registry/atoms/std-agent-tool-call.orb +328 -138
  14. package/behaviors/registry/atoms/std-async.orb +147 -86
  15. package/behaviors/registry/atoms/std-autoregressive.orb +64 -73
  16. package/behaviors/registry/atoms/std-browse.orb +260 -126
  17. package/behaviors/registry/atoms/std-cache-aside.orb +358 -259
  18. package/behaviors/registry/atoms/std-calendar.orb +280 -215
  19. package/behaviors/registry/atoms/std-circuit-breaker.orb +295 -234
  20. package/behaviors/registry/atoms/std-collision.orb +136 -135
  21. package/behaviors/registry/atoms/std-combat-log.orb +108 -90
  22. package/behaviors/registry/atoms/std-combat.orb +171 -98
  23. package/behaviors/registry/atoms/std-confirmation.orb +28 -300
  24. package/behaviors/registry/atoms/std-dialogue-box.orb +111 -30
  25. package/behaviors/registry/atoms/std-display.orb +491 -587
  26. package/behaviors/registry/atoms/std-drawer.orb +194 -121
  27. package/behaviors/registry/atoms/std-filter.orb +311 -326
  28. package/behaviors/registry/atoms/std-flip-card.orb +223 -177
  29. package/behaviors/registry/atoms/std-gallery.orb +130 -151
  30. package/behaviors/registry/atoms/std-game-audio.orb +133 -72
  31. package/behaviors/registry/atoms/std-game-canvas2d.orb +112 -52
  32. package/behaviors/registry/atoms/std-game-canvas3d.orb +150 -107
  33. package/behaviors/registry/atoms/std-game-hud.orb +87 -20
  34. package/behaviors/registry/atoms/std-game-menu.orb +32 -32
  35. package/behaviors/registry/atoms/std-game-over-screen.orb +100 -33
  36. package/behaviors/registry/atoms/std-gameflow.orb +147 -80
  37. package/behaviors/registry/atoms/std-input.orb +128 -393
  38. package/behaviors/registry/atoms/std-inventory-panel.orb +108 -71
  39. package/behaviors/registry/atoms/std-isometric-canvas.orb +156 -407
  40. package/behaviors/registry/atoms/std-loading.orb +127 -126
  41. package/behaviors/registry/atoms/std-modal.orb +30 -267
  42. package/behaviors/registry/atoms/std-movement.orb +391 -292
  43. package/behaviors/registry/atoms/std-notification.orb +133 -75
  44. package/behaviors/registry/atoms/std-overworld.orb +194 -121
  45. package/behaviors/registry/atoms/std-pagination.orb +120 -53
  46. package/behaviors/registry/atoms/std-physics2d.orb +94 -93
  47. package/behaviors/registry/atoms/std-platformer-canvas.orb +110 -98
  48. package/behaviors/registry/atoms/std-push.orb +172 -36
  49. package/behaviors/registry/atoms/std-quest.orb +552 -449
  50. package/behaviors/registry/atoms/std-rate-limiter.orb +242 -241
  51. package/behaviors/registry/atoms/std-rating.orb +123 -65
  52. package/behaviors/registry/atoms/std-related.orb +202 -26
  53. package/behaviors/registry/atoms/std-score-board.orb +109 -28
  54. package/behaviors/registry/atoms/std-score.orb +210 -146
  55. package/behaviors/registry/atoms/std-search.orb +265 -138
  56. package/behaviors/registry/atoms/std-selection.orb +311 -220
  57. package/behaviors/registry/atoms/std-service-custom-bearer.orb +199 -110
  58. package/behaviors/registry/atoms/std-service-custom-header.orb +206 -117
  59. package/behaviors/registry/atoms/std-service-custom-noauth.orb +197 -108
  60. package/behaviors/registry/atoms/std-service-custom-query.orb +193 -104
  61. package/behaviors/registry/atoms/std-service-email.orb +195 -107
  62. package/behaviors/registry/atoms/std-service-github.orb +216 -122
  63. package/behaviors/registry/atoms/std-service-llm.orb +204 -122
  64. package/behaviors/registry/atoms/std-service-oauth.orb +290 -204
  65. package/behaviors/registry/atoms/std-service-redis.orb +177 -92
  66. package/behaviors/registry/atoms/std-service-storage.orb +211 -122
  67. package/behaviors/registry/atoms/std-service-stripe.orb +236 -154
  68. package/behaviors/registry/atoms/std-service-twilio.orb +221 -137
  69. package/behaviors/registry/atoms/std-service-youtube.orb +327 -241
  70. package/behaviors/registry/atoms/std-simulation-canvas.orb +97 -36
  71. package/behaviors/registry/atoms/std-sort.orb +284 -207
  72. package/behaviors/registry/atoms/std-sprite.orb +150 -74
  73. package/behaviors/registry/atoms/std-tabs.orb +129 -62
  74. package/behaviors/registry/atoms/std-text-effects.orb +251 -190
  75. package/behaviors/registry/atoms/std-theme.orb +193 -135
  76. package/behaviors/registry/atoms/std-timer.orb +320 -344
  77. package/behaviors/registry/atoms/std-undo.orb +278 -199
  78. package/behaviors/registry/atoms/std-upload.orb +112 -111
  79. package/behaviors/registry/atoms/std-validate-on-save.orb +159 -151
  80. package/behaviors/registry/atoms/std-wizard.orb +445 -336
  81. package/behaviors/registry/molecules/std-agent-fix-loop.orb +876 -857
  82. package/behaviors/registry/molecules/std-agent-learner.orb +635 -654
  83. package/behaviors/registry/molecules/std-agent-planner.orb +581 -548
  84. package/behaviors/registry/molecules/std-agent-rag.orb +414 -410
  85. package/behaviors/registry/molecules/std-agent-tool-loop.orb +716 -711
  86. package/behaviors/registry/molecules/std-batch-selected-list.orb +28 -12
  87. package/behaviors/registry/molecules/std-builder-game.orb +86 -28
  88. package/behaviors/registry/molecules/std-calendar-booking.orb +32 -8
  89. package/behaviors/registry/molecules/std-cart.orb +347 -406
  90. package/behaviors/registry/molecules/std-classifier-game.orb +95 -37
  91. package/behaviors/registry/molecules/std-dashboard-tabbed.orb +16 -10
  92. package/behaviors/registry/molecules/std-debugger-game.orb +95 -37
  93. package/behaviors/registry/molecules/std-detail.orb +133 -138
  94. package/behaviors/registry/molecules/std-drawer-master-list.orb +12 -6
  95. package/behaviors/registry/molecules/std-event-handler-game.orb +91 -33
  96. package/behaviors/registry/molecules/std-filtered-list.orb +14 -8
  97. package/behaviors/registry/molecules/std-form-advanced.orb +242 -153
  98. package/behaviors/registry/molecules/std-gallery-filtered.orb +16 -10
  99. package/behaviors/registry/molecules/std-geospatial.orb +175 -122
  100. package/behaviors/registry/molecules/std-inventory.orb +216 -170
  101. package/behaviors/registry/molecules/std-list.orb +280 -205
  102. package/behaviors/registry/molecules/std-messaging.orb +146 -99
  103. package/behaviors/registry/molecules/std-negotiator-game.orb +95 -37
  104. package/behaviors/registry/molecules/std-platformer-game.orb +300 -171
  105. package/behaviors/registry/molecules/std-push-activity-log.orb +32 -8
  106. package/behaviors/registry/molecules/std-puzzle-game.orb +287 -146
  107. package/behaviors/registry/molecules/std-quiz.orb +322 -263
  108. package/behaviors/registry/molecules/std-related-master-detail.orb +21 -15
  109. package/behaviors/registry/molecules/std-sequencer-game.orb +92 -34
  110. package/behaviors/registry/molecules/std-service-content-pipeline.orb +268 -267
  111. package/behaviors/registry/molecules/std-service-custom-api-tester.orb +245 -152
  112. package/behaviors/registry/molecules/std-service-devops-toolkit.orb +633 -294
  113. package/behaviors/registry/molecules/std-service-notification-hub.orb +237 -152
  114. package/behaviors/registry/molecules/std-service-payment-flow.orb +310 -180
  115. package/behaviors/registry/molecules/std-simulator-game.orb +96 -38
  116. package/behaviors/registry/molecules/std-turn-based-battle.orb +247 -137
  117. package/behaviors/registry/molecules/std-wizard-form.orb +60 -9
  118. package/behaviors/registry/organisms/std-agent-assistant.orb +2810 -1833
  119. package/behaviors/registry/organisms/std-agent-builder.orb +6401 -4539
  120. package/behaviors/registry/organisms/std-agent-pipeline.orb +5028 -3497
  121. package/behaviors/registry/organisms/std-agent-reviewer.orb +2219 -1406
  122. package/behaviors/registry/organisms/std-agent-tutor.orb +2069 -1384
  123. package/behaviors/registry/organisms/std-api-gateway.orb +1419 -870
  124. package/behaviors/registry/organisms/std-arcade-game.orb +488 -231
  125. package/behaviors/registry/organisms/std-booking-system.orb +2457 -1467
  126. package/behaviors/registry/organisms/std-cicd-pipeline.orb +1367 -825
  127. package/behaviors/registry/organisms/std-cms.orb +1549 -566
  128. package/behaviors/registry/organisms/std-coding-academy.orb +744 -495
  129. package/behaviors/registry/organisms/std-crm.orb +1997 -1014
  130. package/behaviors/registry/organisms/std-devops-dashboard.orb +2160 -1606
  131. package/behaviors/registry/organisms/std-ecommerce.orb +2279 -1153
  132. package/behaviors/registry/organisms/std-finance-tracker.orb +1375 -727
  133. package/behaviors/registry/organisms/std-healthcare.orb +2940 -1703
  134. package/behaviors/registry/organisms/std-helpdesk.orb +1443 -781
  135. package/behaviors/registry/organisms/std-hr-portal.orb +2361 -1440
  136. package/behaviors/registry/organisms/std-iot-dashboard.orb +1491 -1026
  137. package/behaviors/registry/organisms/std-lms.orb +1629 -1046
  138. package/behaviors/registry/organisms/std-logic-training.orb +321 -134
  139. package/behaviors/registry/organisms/std-platformer-app.orb +855 -417
  140. package/behaviors/registry/organisms/std-project-manager.orb +1795 -877
  141. package/behaviors/registry/organisms/std-puzzle-app.orb +407 -206
  142. package/behaviors/registry/organisms/std-realtime-chat.orb +1436 -844
  143. package/behaviors/registry/organisms/std-rpg-game.orb +1522 -1007
  144. package/behaviors/registry/organisms/std-service-marketplace.orb +2110 -1204
  145. package/behaviors/registry/organisms/std-service-research-assistant.orb +1285 -1078
  146. package/behaviors/registry/organisms/std-social-feed.orb +612 -252
  147. package/behaviors/registry/organisms/std-stem-lab.orb +642 -450
  148. package/behaviors/registry/organisms/std-strategy-game.orb +893 -650
  149. package/behaviors/registry/organisms/std-trading-dashboard.orb +1271 -805
  150. package/dist/behaviors/registry/atoms/std-agent-activity-log.orb +240 -227
  151. package/dist/behaviors/registry/atoms/std-agent-chat-thread.orb +296 -199
  152. package/dist/behaviors/registry/atoms/std-agent-classifier.orb +384 -133
  153. package/dist/behaviors/registry/atoms/std-agent-completion.orb +404 -141
  154. package/dist/behaviors/registry/atoms/std-agent-context-window.orb +904 -607
  155. package/dist/behaviors/registry/atoms/std-agent-conversation.orb +443 -234
  156. package/dist/behaviors/registry/atoms/std-agent-memory.orb +584 -150
  157. package/dist/behaviors/registry/atoms/std-agent-provider.orb +431 -174
  158. package/dist/behaviors/registry/atoms/std-agent-search.orb +217 -61
  159. package/dist/behaviors/registry/atoms/std-agent-session.orb +406 -159
  160. package/dist/behaviors/registry/atoms/std-agent-step-progress.orb +314 -294
  161. package/dist/behaviors/registry/atoms/std-agent-token-gauge.orb +577 -500
  162. package/dist/behaviors/registry/atoms/std-agent-tool-call.orb +328 -138
  163. package/dist/behaviors/registry/atoms/std-async.orb +147 -86
  164. package/dist/behaviors/registry/atoms/std-autoregressive.orb +64 -73
  165. package/dist/behaviors/registry/atoms/std-browse.orb +260 -126
  166. package/dist/behaviors/registry/atoms/std-cache-aside.orb +358 -259
  167. package/dist/behaviors/registry/atoms/std-calendar.orb +280 -215
  168. package/dist/behaviors/registry/atoms/std-circuit-breaker.orb +295 -234
  169. package/dist/behaviors/registry/atoms/std-collision.orb +136 -135
  170. package/dist/behaviors/registry/atoms/std-combat-log.orb +108 -90
  171. package/dist/behaviors/registry/atoms/std-combat.orb +171 -98
  172. package/dist/behaviors/registry/atoms/std-confirmation.orb +28 -300
  173. package/dist/behaviors/registry/atoms/std-dialogue-box.orb +111 -30
  174. package/dist/behaviors/registry/atoms/std-display.orb +491 -587
  175. package/dist/behaviors/registry/atoms/std-drawer.orb +194 -121
  176. package/dist/behaviors/registry/atoms/std-filter.orb +311 -326
  177. package/dist/behaviors/registry/atoms/std-flip-card.orb +223 -177
  178. package/dist/behaviors/registry/atoms/std-gallery.orb +130 -151
  179. package/dist/behaviors/registry/atoms/std-game-audio.orb +133 -72
  180. package/dist/behaviors/registry/atoms/std-game-canvas2d.orb +112 -52
  181. package/dist/behaviors/registry/atoms/std-game-canvas3d.orb +150 -107
  182. package/dist/behaviors/registry/atoms/std-game-hud.orb +87 -20
  183. package/dist/behaviors/registry/atoms/std-game-menu.orb +32 -32
  184. package/dist/behaviors/registry/atoms/std-game-over-screen.orb +100 -33
  185. package/dist/behaviors/registry/atoms/std-gameflow.orb +147 -80
  186. package/dist/behaviors/registry/atoms/std-input.orb +128 -393
  187. package/dist/behaviors/registry/atoms/std-inventory-panel.orb +108 -71
  188. package/dist/behaviors/registry/atoms/std-isometric-canvas.orb +156 -407
  189. package/dist/behaviors/registry/atoms/std-loading.orb +127 -126
  190. package/dist/behaviors/registry/atoms/std-modal.orb +30 -267
  191. package/dist/behaviors/registry/atoms/std-movement.orb +391 -292
  192. package/dist/behaviors/registry/atoms/std-notification.orb +133 -75
  193. package/dist/behaviors/registry/atoms/std-overworld.orb +194 -121
  194. package/dist/behaviors/registry/atoms/std-pagination.orb +120 -53
  195. package/dist/behaviors/registry/atoms/std-physics2d.orb +94 -93
  196. package/dist/behaviors/registry/atoms/std-platformer-canvas.orb +110 -98
  197. package/dist/behaviors/registry/atoms/std-push.orb +172 -36
  198. package/dist/behaviors/registry/atoms/std-quest.orb +552 -449
  199. package/dist/behaviors/registry/atoms/std-rate-limiter.orb +242 -241
  200. package/dist/behaviors/registry/atoms/std-rating.orb +123 -65
  201. package/dist/behaviors/registry/atoms/std-related.orb +202 -26
  202. package/dist/behaviors/registry/atoms/std-score-board.orb +109 -28
  203. package/dist/behaviors/registry/atoms/std-score.orb +210 -146
  204. package/dist/behaviors/registry/atoms/std-search.orb +265 -138
  205. package/dist/behaviors/registry/atoms/std-selection.orb +311 -220
  206. package/dist/behaviors/registry/atoms/std-service-custom-bearer.orb +199 -110
  207. package/dist/behaviors/registry/atoms/std-service-custom-header.orb +206 -117
  208. package/dist/behaviors/registry/atoms/std-service-custom-noauth.orb +197 -108
  209. package/dist/behaviors/registry/atoms/std-service-custom-query.orb +193 -104
  210. package/dist/behaviors/registry/atoms/std-service-email.orb +195 -107
  211. package/dist/behaviors/registry/atoms/std-service-github.orb +216 -122
  212. package/dist/behaviors/registry/atoms/std-service-llm.orb +204 -122
  213. package/dist/behaviors/registry/atoms/std-service-oauth.orb +290 -204
  214. package/dist/behaviors/registry/atoms/std-service-redis.orb +177 -92
  215. package/dist/behaviors/registry/atoms/std-service-storage.orb +211 -122
  216. package/dist/behaviors/registry/atoms/std-service-stripe.orb +236 -154
  217. package/dist/behaviors/registry/atoms/std-service-twilio.orb +221 -137
  218. package/dist/behaviors/registry/atoms/std-service-youtube.orb +327 -241
  219. package/dist/behaviors/registry/atoms/std-simulation-canvas.orb +97 -36
  220. package/dist/behaviors/registry/atoms/std-sort.orb +284 -207
  221. package/dist/behaviors/registry/atoms/std-sprite.orb +150 -74
  222. package/dist/behaviors/registry/atoms/std-tabs.orb +129 -62
  223. package/dist/behaviors/registry/atoms/std-text-effects.orb +251 -190
  224. package/dist/behaviors/registry/atoms/std-theme.orb +193 -135
  225. package/dist/behaviors/registry/atoms/std-timer.orb +320 -344
  226. package/dist/behaviors/registry/atoms/std-undo.orb +278 -199
  227. package/dist/behaviors/registry/atoms/std-upload.orb +112 -111
  228. package/dist/behaviors/registry/atoms/std-validate-on-save.orb +159 -151
  229. package/dist/behaviors/registry/atoms/std-wizard.orb +445 -336
  230. package/dist/behaviors/registry/molecules/std-agent-fix-loop.orb +876 -857
  231. package/dist/behaviors/registry/molecules/std-agent-learner.orb +635 -654
  232. package/dist/behaviors/registry/molecules/std-agent-planner.orb +581 -548
  233. package/dist/behaviors/registry/molecules/std-agent-rag.orb +414 -410
  234. package/dist/behaviors/registry/molecules/std-agent-tool-loop.orb +716 -711
  235. package/dist/behaviors/registry/molecules/std-batch-selected-list.orb +28 -12
  236. package/dist/behaviors/registry/molecules/std-builder-game.orb +86 -28
  237. package/dist/behaviors/registry/molecules/std-calendar-booking.orb +32 -8
  238. package/dist/behaviors/registry/molecules/std-cart.orb +347 -406
  239. package/dist/behaviors/registry/molecules/std-classifier-game.orb +95 -37
  240. package/dist/behaviors/registry/molecules/std-dashboard-tabbed.orb +16 -10
  241. package/dist/behaviors/registry/molecules/std-debugger-game.orb +95 -37
  242. package/dist/behaviors/registry/molecules/std-detail.orb +133 -138
  243. package/dist/behaviors/registry/molecules/std-drawer-master-list.orb +12 -6
  244. package/dist/behaviors/registry/molecules/std-event-handler-game.orb +91 -33
  245. package/dist/behaviors/registry/molecules/std-filtered-list.orb +14 -8
  246. package/dist/behaviors/registry/molecules/std-form-advanced.orb +242 -153
  247. package/dist/behaviors/registry/molecules/std-gallery-filtered.orb +16 -10
  248. package/dist/behaviors/registry/molecules/std-geospatial.orb +175 -122
  249. package/dist/behaviors/registry/molecules/std-inventory.orb +216 -170
  250. package/dist/behaviors/registry/molecules/std-list.orb +280 -205
  251. package/dist/behaviors/registry/molecules/std-messaging.orb +146 -99
  252. package/dist/behaviors/registry/molecules/std-negotiator-game.orb +95 -37
  253. package/dist/behaviors/registry/molecules/std-platformer-game.orb +300 -171
  254. package/dist/behaviors/registry/molecules/std-push-activity-log.orb +32 -8
  255. package/dist/behaviors/registry/molecules/std-puzzle-game.orb +287 -146
  256. package/dist/behaviors/registry/molecules/std-quiz.orb +322 -263
  257. package/dist/behaviors/registry/molecules/std-related-master-detail.orb +21 -15
  258. package/dist/behaviors/registry/molecules/std-sequencer-game.orb +92 -34
  259. package/dist/behaviors/registry/molecules/std-service-content-pipeline.orb +268 -267
  260. package/dist/behaviors/registry/molecules/std-service-custom-api-tester.orb +245 -152
  261. package/dist/behaviors/registry/molecules/std-service-devops-toolkit.orb +633 -294
  262. package/dist/behaviors/registry/molecules/std-service-notification-hub.orb +237 -152
  263. package/dist/behaviors/registry/molecules/std-service-payment-flow.orb +310 -180
  264. package/dist/behaviors/registry/molecules/std-simulator-game.orb +96 -38
  265. package/dist/behaviors/registry/molecules/std-turn-based-battle.orb +247 -137
  266. package/dist/behaviors/registry/molecules/std-wizard-form.orb +60 -9
  267. package/dist/behaviors/registry/organisms/std-agent-assistant.orb +2810 -1833
  268. package/dist/behaviors/registry/organisms/std-agent-builder.orb +6401 -4539
  269. package/dist/behaviors/registry/organisms/std-agent-pipeline.orb +5028 -3497
  270. package/dist/behaviors/registry/organisms/std-agent-reviewer.orb +2219 -1406
  271. package/dist/behaviors/registry/organisms/std-agent-tutor.orb +2069 -1384
  272. package/dist/behaviors/registry/organisms/std-api-gateway.orb +1419 -870
  273. package/dist/behaviors/registry/organisms/std-arcade-game.orb +488 -231
  274. package/dist/behaviors/registry/organisms/std-booking-system.orb +2457 -1467
  275. package/dist/behaviors/registry/organisms/std-cicd-pipeline.orb +1367 -825
  276. package/dist/behaviors/registry/organisms/std-cms.orb +1549 -566
  277. package/dist/behaviors/registry/organisms/std-coding-academy.orb +744 -495
  278. package/dist/behaviors/registry/organisms/std-crm.orb +1997 -1014
  279. package/dist/behaviors/registry/organisms/std-devops-dashboard.orb +2160 -1606
  280. package/dist/behaviors/registry/organisms/std-ecommerce.orb +2279 -1153
  281. package/dist/behaviors/registry/organisms/std-finance-tracker.orb +1375 -727
  282. package/dist/behaviors/registry/organisms/std-healthcare.orb +2940 -1703
  283. package/dist/behaviors/registry/organisms/std-helpdesk.orb +1443 -781
  284. package/dist/behaviors/registry/organisms/std-hr-portal.orb +2361 -1440
  285. package/dist/behaviors/registry/organisms/std-iot-dashboard.orb +1491 -1026
  286. package/dist/behaviors/registry/organisms/std-lms.orb +1629 -1046
  287. package/dist/behaviors/registry/organisms/std-logic-training.orb +321 -134
  288. package/dist/behaviors/registry/organisms/std-platformer-app.orb +855 -417
  289. package/dist/behaviors/registry/organisms/std-project-manager.orb +1795 -877
  290. package/dist/behaviors/registry/organisms/std-puzzle-app.orb +407 -206
  291. package/dist/behaviors/registry/organisms/std-realtime-chat.orb +1436 -844
  292. package/dist/behaviors/registry/organisms/std-rpg-game.orb +1522 -1007
  293. package/dist/behaviors/registry/organisms/std-service-marketplace.orb +2110 -1204
  294. package/dist/behaviors/registry/organisms/std-service-research-assistant.orb +1285 -1078
  295. package/dist/behaviors/registry/organisms/std-social-feed.orb +612 -252
  296. package/dist/behaviors/registry/organisms/std-stem-lab.orb +642 -450
  297. package/dist/behaviors/registry/organisms/std-strategy-game.orb +893 -650
  298. package/dist/behaviors/registry/organisms/std-trading-dashboard.orb +1271 -805
  299. package/dist/index.js +16 -4
  300. package/dist/index.js.map +1 -1
  301. package/dist/modules/core.js +16 -4
  302. package/dist/modules/core.js.map +1 -1
  303. package/dist/modules/index.js +16 -4
  304. package/dist/modules/index.js.map +1 -1
  305. package/dist/registry.js +16 -4
  306. package/dist/registry.js.map +1 -1
  307. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-rpg-game",
3
3
  "version": "1.0.0",
4
- "description": "RPG game organism. Composes: stdTurnBasedBattle(BattleState) + stdOverworld(WorldZone) + stdInventory(RpgItem) + stdQuest(Mission)",
4
+ "description": "std-rpg-game as a Function",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "BattleStateOrbital",
@@ -17,12 +17,12 @@
17
17
  {
18
18
  "name": "turn",
19
19
  "type": "number",
20
- "default": 0
20
+ "default": 0.0
21
21
  },
22
22
  {
23
23
  "name": "score",
24
24
  "type": "number",
25
- "default": 0
25
+ "default": 0.0
26
26
  },
27
27
  {
28
28
  "name": "phase",
@@ -33,39 +33,73 @@
33
33
  "name": "outcome",
34
34
  "type": "string"
35
35
  }
36
- ],
37
- "instances": [
38
- {
39
- "id": "unit-1",
40
- "name": "Knight",
41
- "description": "Armored warrior",
42
- "status": "active",
43
- "turn": 0,
44
- "score": 0
45
- },
46
- {
47
- "id": "unit-2",
48
- "name": "Archer",
49
- "description": "Ranged attacker",
50
- "status": "active",
51
- "turn": 0,
52
- "score": 0
53
- },
54
- {
55
- "id": "unit-3",
56
- "name": "Mage",
57
- "description": "Magic caster",
58
- "status": "active",
59
- "turn": 0,
60
- "score": 0
61
- }
62
36
  ]
63
37
  },
64
38
  "traits": [
65
39
  {
66
40
  "name": "BattleStateBattleFlow",
67
- "linkedEntity": "BattleState",
68
41
  "category": "interaction",
42
+ "linkedEntity": "BattleState",
43
+ "emits": [
44
+ {
45
+ "event": "LOOT_DROPPED",
46
+ "scope": "external",
47
+ "payload": [
48
+ {
49
+ "name": "itemId",
50
+ "type": "string"
51
+ }
52
+ ]
53
+ },
54
+ {
55
+ "event": "BattleStateLoaded",
56
+ "description": "Fired when BattleState finishes loading",
57
+ "scope": "internal",
58
+ "payload": [
59
+ {
60
+ "name": "id",
61
+ "type": "string",
62
+ "required": true
63
+ },
64
+ {
65
+ "name": "turn",
66
+ "type": "number"
67
+ },
68
+ {
69
+ "name": "score",
70
+ "type": "number"
71
+ },
72
+ {
73
+ "name": "phase",
74
+ "type": "string"
75
+ },
76
+ {
77
+ "name": "outcome",
78
+ "type": "string"
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "event": "BattleStateLoadFailed",
84
+ "description": "Fired when BattleState fails to load",
85
+ "scope": "internal",
86
+ "payload": [
87
+ {
88
+ "name": "message",
89
+ "type": "string"
90
+ }
91
+ ]
92
+ }
93
+ ],
94
+ "listens": [
95
+ {
96
+ "event": "ENCOUNTER_STARTED",
97
+ "triggers": "START",
98
+ "source": {
99
+ "kind": "any"
100
+ }
101
+ }
102
+ ],
69
103
  "stateMachine": {
70
104
  "states": [
71
105
  {
@@ -89,7 +123,11 @@
89
123
  },
90
124
  {
91
125
  "key": "START",
92
- "name": "Start Battle"
126
+ "name": "Start"
127
+ },
128
+ {
129
+ "key": "NAVIGATE",
130
+ "name": "Navigate"
93
131
  },
94
132
  {
95
133
  "key": "END_TURN",
@@ -99,25 +137,39 @@
99
137
  "key": "PAUSE",
100
138
  "name": "Pause"
101
139
  },
140
+ {
141
+ "key": "GAME_OVER",
142
+ "name": "Game Over"
143
+ },
102
144
  {
103
145
  "key": "RESUME",
104
146
  "name": "Resume"
105
147
  },
106
148
  {
107
- "key": "GAME_OVER",
108
- "name": "Game Over"
149
+ "key": "CLOSE",
150
+ "name": "Close"
109
151
  },
110
152
  {
111
153
  "key": "RESTART",
112
154
  "name": "Restart"
113
155
  },
114
156
  {
115
- "key": "CLOSE",
116
- "name": "Close"
157
+ "key": "LOOT_DROPPED",
158
+ "name": "Loot Dropped"
117
159
  },
118
160
  {
119
- "key": "NAVIGATE",
120
- "name": "Navigate"
161
+ "key": "BattleStateLoaded",
162
+ "name": "BattleState loaded"
163
+ },
164
+ {
165
+ "key": "BattleStateLoadFailed",
166
+ "name": "BattleState load failed",
167
+ "payload": [
168
+ {
169
+ "name": "message",
170
+ "type": "string"
171
+ }
172
+ ]
121
173
  }
122
174
  ],
123
175
  "transitions": [
@@ -128,29 +180,35 @@
128
180
  "effects": [
129
181
  [
130
182
  "fetch",
131
- "BattleState"
183
+ "BattleState",
184
+ {
185
+ "emit": {
186
+ "success": "BattleStateLoaded",
187
+ "failure": "BattleStateLoadFailed"
188
+ }
189
+ }
132
190
  ],
133
191
  [
134
192
  "render-ui",
135
193
  "main",
136
194
  {
137
195
  "type": "game-shell",
138
- "appName": "RPG Game",
139
- "showTopBar": true,
140
196
  "children": [
141
197
  {
142
- "type": "game-menu",
143
- "title": "Battle Arena",
144
- "subtitle": "Turn-Based Strategy",
145
198
  "menuItems": [
146
199
  {
147
200
  "label": "Start Battle",
148
- "event": "START",
149
- "variant": "primary"
201
+ "variant": "primary",
202
+ "event": "START"
150
203
  }
151
- ]
204
+ ],
205
+ "title": "Battle Arena",
206
+ "subtitle": "Turn-Based Strategy",
207
+ "type": "game-menu"
152
208
  }
153
- ]
209
+ ],
210
+ "showTopBar": true,
211
+ "appName": "RPG Game"
154
212
  }
155
213
  ]
156
214
  ]
@@ -164,28 +222,33 @@
164
222
  "render-ui",
165
223
  "main",
166
224
  {
167
- "type": "game-shell",
168
- "appName": "RPG Game",
169
- "showTopBar": true,
170
225
  "children": [
171
226
  {
172
- "type": "game-hud",
173
227
  "stats": [
174
228
  {
175
- "label": "Turn",
176
- "value": "@entity.turn"
229
+ "value": "@entity.turn",
230
+ "label": "Turn"
177
231
  },
178
232
  {
179
233
  "label": "Score",
180
234
  "value": "@entity.score"
181
235
  }
182
- ]
236
+ ],
237
+ "type": "game-hud"
183
238
  }
184
- ]
239
+ ],
240
+ "type": "game-shell",
241
+ "appName": "RPG Game",
242
+ "showTopBar": true
185
243
  }
186
244
  ]
187
245
  ]
188
246
  },
247
+ {
248
+ "from": "menu",
249
+ "to": "menu",
250
+ "event": "NAVIGATE"
251
+ },
189
252
  {
190
253
  "from": "playing",
191
254
  "to": "playing",
@@ -197,47 +260,35 @@
197
260
  [
198
261
  "+",
199
262
  "@entity.turn",
200
- 1
263
+ 1.0
201
264
  ]
202
265
  ],
203
266
  [
204
267
  "render-ui",
205
268
  "main",
206
269
  {
207
- "type": "game-shell",
208
- "appName": "RPG Game",
209
- "showTopBar": true,
210
270
  "children": [
211
271
  {
212
- "type": "game-hud",
213
272
  "stats": [
214
273
  {
215
274
  "label": "Turn",
216
275
  "value": "@entity.turn"
217
276
  },
218
277
  {
219
- "label": "Score",
220
- "value": "@entity.score"
278
+ "value": "@entity.score",
279
+ "label": "Score"
221
280
  }
222
- ]
281
+ ],
282
+ "type": "game-hud"
223
283
  }
224
- ]
284
+ ],
285
+ "showTopBar": true,
286
+ "type": "game-shell",
287
+ "appName": "RPG Game"
225
288
  }
226
289
  ]
227
290
  ]
228
291
  },
229
- {
230
- "from": "menu",
231
- "to": "menu",
232
- "event": "NAVIGATE",
233
- "effects": []
234
- },
235
- {
236
- "from": "paused",
237
- "to": "paused",
238
- "event": "NAVIGATE",
239
- "effects": []
240
- },
241
292
  {
242
293
  "from": "playing",
243
294
  "to": "paused",
@@ -247,64 +298,77 @@
247
298
  "render-ui",
248
299
  "modal",
249
300
  {
250
- "type": "game-menu",
251
301
  "title": "Paused",
252
302
  "menuItems": [
253
303
  {
254
- "label": "Resume",
255
304
  "event": "RESUME",
305
+ "label": "Resume",
256
306
  "variant": "primary"
257
307
  },
258
308
  {
259
- "label": "Quit",
260
309
  "event": "RESTART",
261
- "variant": "ghost"
310
+ "variant": "ghost",
311
+ "label": "Quit"
262
312
  }
263
- ]
313
+ ],
314
+ "type": "game-menu"
264
315
  }
265
316
  ]
266
317
  ]
267
318
  },
268
319
  {
269
- "from": "paused",
270
- "to": "playing",
271
- "event": "RESUME",
320
+ "from": "playing",
321
+ "to": "gameover",
322
+ "event": "GAME_OVER",
272
323
  "effects": [
273
- [
274
- "render-ui",
275
- "modal",
276
- null
277
- ],
278
324
  [
279
325
  "render-ui",
280
326
  "main",
281
327
  {
282
328
  "type": "game-shell",
283
- "appName": "RPG Game",
284
329
  "showTopBar": true,
330
+ "appName": "RPG Game",
285
331
  "children": [
286
332
  {
287
- "type": "game-hud",
333
+ "title": "Battle Over",
288
334
  "stats": [
289
335
  {
290
- "label": "Turn",
336
+ "label": "Turns",
291
337
  "value": "@entity.turn"
292
338
  },
293
339
  {
294
340
  "label": "Score",
295
341
  "value": "@entity.score"
296
342
  }
297
- ]
343
+ ],
344
+ "menuItems": [
345
+ {
346
+ "variant": "primary",
347
+ "label": "Play Again",
348
+ "event": "RESTART"
349
+ },
350
+ {
351
+ "event": "RESTART",
352
+ "variant": "secondary",
353
+ "label": "Main Menu"
354
+ }
355
+ ],
356
+ "type": "game-over-screen"
298
357
  }
299
358
  ]
300
359
  }
301
360
  ]
302
361
  ]
303
362
  },
363
+ {
364
+ "from": "paused",
365
+ "to": "paused",
366
+ "event": "NAVIGATE"
367
+ },
304
368
  {
305
369
  "from": "paused",
306
370
  "to": "playing",
307
- "event": "CLOSE",
371
+ "event": "RESUME",
308
372
  "effects": [
309
373
  [
310
374
  "render-ui",
@@ -315,131 +379,123 @@
315
379
  "render-ui",
316
380
  "main",
317
381
  {
318
- "type": "game-shell",
319
- "appName": "RPG Game",
320
- "showTopBar": true,
321
382
  "children": [
322
383
  {
323
384
  "type": "game-hud",
324
385
  "stats": [
325
386
  {
326
- "label": "Turn",
327
- "value": "@entity.turn"
387
+ "value": "@entity.turn",
388
+ "label": "Turn"
328
389
  },
329
390
  {
330
- "label": "Score",
331
- "value": "@entity.score"
391
+ "value": "@entity.score",
392
+ "label": "Score"
332
393
  }
333
394
  ]
334
395
  }
335
- ]
396
+ ],
397
+ "appName": "RPG Game",
398
+ "type": "game-shell",
399
+ "showTopBar": true
336
400
  }
337
401
  ]
338
402
  ]
339
403
  },
340
404
  {
341
- "from": "playing",
342
- "to": "gameover",
343
- "event": "GAME_OVER",
405
+ "from": "paused",
406
+ "to": "playing",
407
+ "event": "CLOSE",
344
408
  "effects": [
409
+ [
410
+ "render-ui",
411
+ "modal",
412
+ null
413
+ ],
345
414
  [
346
415
  "render-ui",
347
416
  "main",
348
417
  {
349
418
  "type": "game-shell",
350
- "appName": "RPG Game",
351
419
  "showTopBar": true,
352
420
  "children": [
353
421
  {
354
- "type": "game-over-screen",
355
- "title": "Battle Over",
356
422
  "stats": [
357
423
  {
358
- "label": "Turns",
424
+ "label": "Turn",
359
425
  "value": "@entity.turn"
360
426
  },
361
427
  {
362
- "label": "Score",
363
- "value": "@entity.score"
428
+ "value": "@entity.score",
429
+ "label": "Score"
364
430
  }
365
431
  ],
366
- "menuItems": [
367
- {
368
- "label": "Play Again",
369
- "event": "RESTART",
370
- "variant": "primary"
371
- },
372
- {
373
- "label": "Main Menu",
374
- "event": "RESTART",
375
- "variant": "secondary"
376
- }
377
- ]
432
+ "type": "game-hud"
378
433
  }
379
- ]
434
+ ],
435
+ "appName": "RPG Game"
380
436
  }
381
437
  ]
382
438
  ]
383
439
  },
384
440
  {
385
- "from": "gameover",
441
+ "from": "paused",
386
442
  "to": "menu",
387
443
  "event": "RESTART",
388
444
  "effects": [
445
+ [
446
+ "render-ui",
447
+ "modal",
448
+ null
449
+ ],
389
450
  [
390
451
  "render-ui",
391
452
  "main",
392
453
  {
393
454
  "type": "game-shell",
394
455
  "appName": "RPG Game",
395
- "showTopBar": true,
396
456
  "children": [
397
457
  {
398
- "type": "game-menu",
399
- "title": "Battle Arena",
400
- "subtitle": "Turn-Based Strategy",
401
458
  "menuItems": [
402
459
  {
403
460
  "label": "Start Battle",
404
461
  "event": "START",
405
462
  "variant": "primary"
406
463
  }
407
- ]
464
+ ],
465
+ "subtitle": "Turn-Based Strategy",
466
+ "type": "game-menu",
467
+ "title": "Battle Arena"
408
468
  }
409
- ]
469
+ ],
470
+ "showTopBar": true
410
471
  }
411
472
  ]
412
473
  ]
413
474
  },
414
475
  {
415
- "from": "paused",
476
+ "from": "gameover",
416
477
  "to": "menu",
417
478
  "event": "RESTART",
418
479
  "effects": [
419
- [
420
- "render-ui",
421
- "modal",
422
- null
423
- ],
424
480
  [
425
481
  "render-ui",
426
482
  "main",
427
483
  {
428
- "type": "game-shell",
429
- "appName": "RPG Game",
430
484
  "showTopBar": true,
485
+ "appName": "RPG Game",
486
+ "type": "game-shell",
431
487
  "children": [
432
488
  {
433
- "type": "game-menu",
434
489
  "title": "Battle Arena",
435
490
  "subtitle": "Turn-Based Strategy",
436
491
  "menuItems": [
437
492
  {
438
493
  "label": "Start Battle",
439
- "event": "START",
440
- "variant": "primary"
494
+ "variant": "primary",
495
+ "event": "START"
441
496
  }
442
- ]
497
+ ],
498
+ "type": "game-menu"
443
499
  }
444
500
  ]
445
501
  }
@@ -448,31 +504,53 @@
448
504
  }
449
505
  ]
450
506
  },
451
- "listens": [
452
- {
453
- "event": "ENCOUNTER_STARTED",
454
- "triggers": "START",
455
- "scope": "external"
456
- }
457
- ],
507
+ "scope": "collection"
508
+ },
509
+ {
510
+ "name": "BattleStateCombatLog",
511
+ "category": "interaction",
512
+ "linkedEntity": "BattleState",
458
513
  "emits": [
459
514
  {
460
- "event": "LOOT_DROPPED",
515
+ "event": "BattleStateLoaded",
516
+ "description": "Fired when BattleState finishes loading",
517
+ "scope": "internal",
461
518
  "payload": [
462
519
  {
463
- "name": "itemId",
520
+ "name": "id",
464
521
  "type": "string",
465
522
  "required": true
523
+ },
524
+ {
525
+ "name": "turn",
526
+ "type": "number"
527
+ },
528
+ {
529
+ "name": "score",
530
+ "type": "number"
531
+ },
532
+ {
533
+ "name": "phase",
534
+ "type": "string"
535
+ },
536
+ {
537
+ "name": "outcome",
538
+ "type": "string"
539
+ }
540
+ ]
541
+ },
542
+ {
543
+ "event": "BattleStateLoadFailed",
544
+ "description": "Fired when BattleState fails to load",
545
+ "scope": "internal",
546
+ "payload": [
547
+ {
548
+ "name": "message",
549
+ "type": "string"
466
550
  }
467
- ],
468
- "scope": "external"
551
+ ]
469
552
  }
470
- ]
471
- },
472
- {
473
- "name": "BattleStateCombatLog",
474
- "linkedEntity": "BattleState",
475
- "category": "interaction",
553
+ ],
476
554
  "stateMachine": {
477
555
  "states": [
478
556
  {
@@ -499,17 +577,37 @@
499
577
  {
500
578
  "key": "CLEAR",
501
579
  "name": "Clear"
502
- }
503
- ],
504
- "transitions": [
580
+ },
505
581
  {
506
- "from": "idle",
507
- "to": "idle",
508
- "event": "INIT",
582
+ "key": "BattleStateLoaded",
583
+ "name": "BattleState loaded"
584
+ },
585
+ {
586
+ "key": "BattleStateLoadFailed",
587
+ "name": "BattleState load failed",
588
+ "payload": [
589
+ {
590
+ "name": "message",
591
+ "type": "string"
592
+ }
593
+ ]
594
+ }
595
+ ],
596
+ "transitions": [
597
+ {
598
+ "from": "idle",
599
+ "to": "idle",
600
+ "event": "INIT",
509
601
  "effects": [
510
602
  [
511
603
  "fetch",
512
- "BattleState"
604
+ "BattleState",
605
+ {
606
+ "emit": {
607
+ "failure": "BattleStateLoadFailed",
608
+ "success": "BattleStateLoaded"
609
+ }
610
+ }
513
611
  ]
514
612
  ]
515
613
  },
@@ -522,14 +620,14 @@
522
620
  "render-ui",
523
621
  "main",
524
622
  {
525
- "type": "game-shell",
526
623
  "appName": "RPG Game",
527
624
  "showTopBar": true,
625
+ "type": "game-shell",
528
626
  "children": [
529
627
  {
530
- "type": "combat-log",
628
+ "maxVisible": 10.0,
531
629
  "events": "@BattleState",
532
- "maxVisible": 10,
630
+ "type": "combat-log",
533
631
  "autoScroll": true,
534
632
  "showTimestamps": true,
535
633
  "title": "Combat Log"
@@ -548,25 +646,26 @@
548
646
  "render-ui",
549
647
  "main",
550
648
  {
551
- "type": "game-shell",
552
- "appName": "RPG Game",
553
649
  "showTopBar": true,
554
650
  "children": [
555
651
  {
556
652
  "type": "combat-log",
557
- "events": "@BattleState",
558
- "maxVisible": 10,
653
+ "title": "Combat Log",
559
654
  "autoScroll": true,
560
- "showTimestamps": true,
561
- "title": "Combat Log"
655
+ "events": "@BattleState",
656
+ "maxVisible": 10.0,
657
+ "showTimestamps": true
562
658
  }
563
- ]
659
+ ],
660
+ "type": "game-shell",
661
+ "appName": "RPG Game"
564
662
  }
565
663
  ]
566
664
  ]
567
665
  }
568
666
  ]
569
- }
667
+ },
668
+ "scope": "collection"
570
669
  }
571
670
  ],
572
671
  "pages": [
@@ -606,21 +705,81 @@
606
705
  },
607
706
  {
608
707
  "name": "level",
609
- "type": "number",
610
- "default": 1
708
+ "type": "number"
611
709
  },
612
710
  {
613
711
  "name": "explored",
614
- "type": "boolean",
615
- "default": false
712
+ "type": "boolean"
616
713
  }
617
714
  ]
618
715
  },
619
716
  "traits": [
620
717
  {
621
718
  "name": "WorldZoneNavigation",
622
- "linkedEntity": "WorldZone",
623
719
  "category": "interaction",
720
+ "linkedEntity": "WorldZone",
721
+ "emits": [
722
+ {
723
+ "event": "ENCOUNTER_STARTED",
724
+ "scope": "external",
725
+ "payload": [
726
+ {
727
+ "name": "zoneId",
728
+ "type": "string"
729
+ }
730
+ ]
731
+ },
732
+ {
733
+ "event": "QUEST_ACCEPTED",
734
+ "scope": "external",
735
+ "payload": [
736
+ {
737
+ "name": "questId",
738
+ "type": "string"
739
+ }
740
+ ]
741
+ },
742
+ {
743
+ "event": "WorldZoneLoaded",
744
+ "description": "Fired when WorldZone finishes loading",
745
+ "scope": "internal",
746
+ "payload": [
747
+ {
748
+ "name": "id",
749
+ "type": "string",
750
+ "required": true
751
+ },
752
+ {
753
+ "name": "name",
754
+ "type": "string",
755
+ "required": true
756
+ },
757
+ {
758
+ "name": "description",
759
+ "type": "string"
760
+ },
761
+ {
762
+ "name": "level",
763
+ "type": "number"
764
+ },
765
+ {
766
+ "name": "explored",
767
+ "type": "boolean"
768
+ }
769
+ ]
770
+ },
771
+ {
772
+ "event": "WorldZoneLoadFailed",
773
+ "description": "Fired when WorldZone fails to load",
774
+ "scope": "internal",
775
+ "payload": [
776
+ {
777
+ "name": "message",
778
+ "type": "string"
779
+ }
780
+ ]
781
+ }
782
+ ],
624
783
  "stateMachine": {
625
784
  "states": [
626
785
  {
@@ -641,14 +800,7 @@
641
800
  },
642
801
  {
643
802
  "key": "TRAVEL",
644
- "name": "Travel",
645
- "payload": [
646
- {
647
- "name": "zoneId",
648
- "type": "string",
649
- "required": true
650
- }
651
- ]
803
+ "name": "Travel"
652
804
  },
653
805
  {
654
806
  "key": "ARRIVE",
@@ -657,6 +809,28 @@
657
809
  {
658
810
  "key": "BACK",
659
811
  "name": "Back"
812
+ },
813
+ {
814
+ "key": "ENCOUNTER_STARTED",
815
+ "name": "Encounter Started"
816
+ },
817
+ {
818
+ "key": "QUEST_ACCEPTED",
819
+ "name": "Quest Accepted"
820
+ },
821
+ {
822
+ "key": "WorldZoneLoaded",
823
+ "name": "WorldZone loaded"
824
+ },
825
+ {
826
+ "key": "WorldZoneLoadFailed",
827
+ "name": "WorldZone load failed",
828
+ "payload": [
829
+ {
830
+ "name": "message",
831
+ "type": "string"
832
+ }
833
+ ]
660
834
  }
661
835
  ],
662
836
  "transitions": [
@@ -667,66 +841,66 @@
667
841
  "effects": [
668
842
  [
669
843
  "fetch",
670
- "WorldZone"
844
+ "WorldZone",
845
+ {
846
+ "emit": {
847
+ "success": "WorldZoneLoaded",
848
+ "failure": "WorldZoneLoadFailed"
849
+ }
850
+ }
671
851
  ],
672
852
  [
673
853
  "render-ui",
674
854
  "main",
675
855
  {
676
- "type": "game-shell",
677
- "appName": "RPG Game",
678
856
  "showTopBar": true,
679
857
  "children": [
680
858
  {
681
- "type": "stack",
682
859
  "direction": "vertical",
860
+ "type": "stack",
683
861
  "gap": "lg",
684
862
  "children": [
685
863
  {
686
- "type": "stack",
687
864
  "direction": "horizontal",
688
- "gap": "md",
689
865
  "justify": "space-between",
690
866
  "children": [
691
867
  {
692
868
  "type": "stack",
693
- "direction": "horizontal",
694
- "gap": "md",
695
869
  "children": [
696
870
  {
697
- "type": "icon",
698
871
  "name": "map",
872
+ "type": "icon",
699
873
  "size": "lg"
700
874
  },
701
875
  {
702
- "type": "typography",
703
876
  "content": "World Map",
704
- "variant": "h2"
877
+ "variant": "h2",
878
+ "type": "typography"
705
879
  }
706
- ]
880
+ ],
881
+ "direction": "horizontal",
882
+ "gap": "md"
707
883
  },
708
884
  {
709
- "type": "status-dot",
710
885
  "status": "active",
886
+ "type": "status-dot",
711
887
  "pulse": false,
712
888
  "label": "Exploring"
713
889
  }
714
- ]
890
+ ],
891
+ "gap": "md",
892
+ "type": "stack"
715
893
  },
716
894
  {
717
895
  "type": "divider"
718
896
  },
719
897
  {
720
- "type": "map-view",
721
898
  "markers": [],
722
899
  "height": "200px",
723
- "zoom": 10
900
+ "type": "map-view",
901
+ "zoom": 10.0
724
902
  },
725
903
  {
726
- "type": "data-grid",
727
- "entity": "WorldZone",
728
- "emptyIcon": "compass",
729
- "emptyTitle": "No worldzones discovered",
730
904
  "emptyDescription": "Explore to discover new worldzones.",
731
905
  "itemActions": [
732
906
  {
@@ -734,56 +908,62 @@
734
908
  "event": "TRAVEL"
735
909
  }
736
910
  ],
911
+ "emptyIcon": "compass",
737
912
  "renderItem": [
738
913
  "fn",
739
914
  "item",
740
915
  {
741
- "type": "stack",
742
- "direction": "vertical",
743
- "gap": "sm",
744
916
  "children": [
745
917
  {
746
- "type": "stack",
747
- "direction": "horizontal",
748
- "justify": "space-between",
749
- "align": "center",
750
918
  "children": [
751
919
  {
752
- "type": "stack",
753
- "direction": "horizontal",
754
920
  "gap": "sm",
755
- "align": "center",
921
+ "type": "stack",
756
922
  "children": [
757
923
  {
924
+ "size": "sm",
758
925
  "type": "icon",
759
- "name": "map-pin",
760
- "size": "sm"
926
+ "name": "map-pin"
761
927
  },
762
928
  {
763
- "type": "typography",
764
929
  "variant": "h4",
930
+ "type": "typography",
765
931
  "content": "@item.name"
766
932
  }
767
- ]
933
+ ],
934
+ "direction": "horizontal",
935
+ "align": "center"
768
936
  },
769
937
  {
770
938
  "type": "badge",
771
939
  "label": "@item.description"
772
940
  }
773
- ]
941
+ ],
942
+ "direction": "horizontal",
943
+ "justify": "space-between",
944
+ "type": "stack",
945
+ "align": "center"
774
946
  },
775
947
  {
776
948
  "type": "typography",
777
- "variant": "caption",
778
- "content": "@item.level"
949
+ "content": "@item.level",
950
+ "variant": "caption"
779
951
  }
780
- ]
952
+ ],
953
+ "type": "stack",
954
+ "direction": "vertical",
955
+ "gap": "sm"
781
956
  }
782
- ]
957
+ ],
958
+ "emptyTitle": "No worldzones discovered",
959
+ "type": "data-grid",
960
+ "entity": "WorldZone"
783
961
  }
784
962
  ]
785
963
  }
786
- ]
964
+ ],
965
+ "appName": "RPG Game",
966
+ "type": "game-shell"
787
967
  }
788
968
  ]
789
969
  ]
@@ -797,32 +977,31 @@
797
977
  "render-ui",
798
978
  "main",
799
979
  {
800
- "type": "game-shell",
801
- "appName": "RPG Game",
802
980
  "showTopBar": true,
981
+ "appName": "RPG Game",
982
+ "type": "game-shell",
803
983
  "children": [
804
984
  {
805
985
  "type": "stack",
806
986
  "direction": "vertical",
807
987
  "gap": "lg",
808
- "align": "center",
809
988
  "children": [
810
989
  {
811
- "type": "stack",
812
- "direction": "horizontal",
813
990
  "gap": "md",
991
+ "direction": "horizontal",
814
992
  "children": [
815
993
  {
816
- "type": "icon",
994
+ "size": "lg",
817
995
  "name": "loader",
818
- "size": "lg"
996
+ "type": "icon"
819
997
  },
820
998
  {
821
- "type": "typography",
822
999
  "content": "Traveling...",
823
- "variant": "h2"
1000
+ "variant": "h2",
1001
+ "type": "typography"
824
1002
  }
825
- ]
1003
+ ],
1004
+ "type": "stack"
826
1005
  },
827
1006
  {
828
1007
  "type": "divider"
@@ -832,7 +1011,8 @@
832
1011
  "content": "Traveling to the destination worldzones map.",
833
1012
  "variant": "body"
834
1013
  }
835
- ]
1014
+ ],
1015
+ "align": "center"
836
1016
  }
837
1017
  ]
838
1018
  }
@@ -846,126 +1026,132 @@
846
1026
  "effects": [
847
1027
  [
848
1028
  "fetch",
849
- "WorldZone"
1029
+ "WorldZone",
1030
+ {
1031
+ "emit": {
1032
+ "success": "WorldZoneLoaded",
1033
+ "failure": "WorldZoneLoadFailed"
1034
+ }
1035
+ }
850
1036
  ],
851
1037
  [
852
1038
  "render-ui",
853
1039
  "main",
854
1040
  {
855
- "type": "game-shell",
856
1041
  "appName": "RPG Game",
857
1042
  "showTopBar": true,
1043
+ "type": "game-shell",
858
1044
  "children": [
859
1045
  {
860
- "type": "stack",
861
- "direction": "vertical",
862
- "gap": "lg",
863
1046
  "children": [
864
1047
  {
865
- "type": "stack",
866
- "direction": "horizontal",
867
- "gap": "md",
868
- "justify": "space-between",
869
1048
  "children": [
870
1049
  {
871
1050
  "type": "stack",
872
- "direction": "horizontal",
873
- "gap": "md",
874
1051
  "children": [
875
1052
  {
1053
+ "size": "lg",
876
1054
  "type": "icon",
877
- "name": "map",
878
- "size": "lg"
1055
+ "name": "map"
879
1056
  },
880
1057
  {
881
1058
  "type": "typography",
882
1059
  "content": "WorldZones Map",
883
1060
  "variant": "h2"
884
1061
  }
885
- ]
1062
+ ],
1063
+ "gap": "md",
1064
+ "direction": "horizontal"
886
1065
  },
887
1066
  {
888
- "type": "status-dot",
889
1067
  "status": "success",
890
- "label": "Entered"
1068
+ "label": "Entered",
1069
+ "type": "status-dot"
891
1070
  }
892
- ]
1071
+ ],
1072
+ "gap": "md",
1073
+ "type": "stack",
1074
+ "direction": "horizontal",
1075
+ "justify": "space-between"
893
1076
  },
894
1077
  {
895
1078
  "type": "divider"
896
1079
  },
897
1080
  {
898
- "type": "data-grid",
899
- "entity": "WorldZone",
900
- "emptyIcon": "inbox",
901
- "emptyTitle": "Nothing here",
902
- "emptyDescription": "This zone is empty.",
903
1081
  "renderItem": [
904
1082
  "fn",
905
1083
  "item",
906
1084
  {
907
1085
  "type": "stack",
908
- "direction": "vertical",
909
1086
  "gap": "sm",
910
1087
  "children": [
911
1088
  {
912
- "type": "stack",
913
- "direction": "horizontal",
914
- "justify": "space-between",
915
- "align": "center",
916
1089
  "children": [
917
1090
  {
918
- "type": "stack",
919
- "direction": "horizontal",
920
1091
  "gap": "sm",
921
1092
  "align": "center",
1093
+ "type": "stack",
922
1094
  "children": [
923
1095
  {
924
1096
  "type": "icon",
925
- "name": "map-pin",
926
- "size": "sm"
1097
+ "size": "sm",
1098
+ "name": "map-pin"
927
1099
  },
928
1100
  {
929
1101
  "type": "typography",
930
1102
  "variant": "h4",
931
1103
  "content": "@item.name"
932
1104
  }
933
- ]
1105
+ ],
1106
+ "direction": "horizontal"
934
1107
  },
935
1108
  {
936
- "type": "badge",
937
- "label": "@item.description"
1109
+ "label": "@item.description",
1110
+ "type": "badge"
938
1111
  }
939
- ]
1112
+ ],
1113
+ "direction": "horizontal",
1114
+ "justify": "space-between",
1115
+ "type": "stack",
1116
+ "align": "center"
940
1117
  },
941
1118
  {
942
- "type": "typography",
943
1119
  "variant": "caption",
944
- "content": "@item.level"
1120
+ "content": "@item.level",
1121
+ "type": "typography"
945
1122
  }
946
- ]
1123
+ ],
1124
+ "direction": "vertical"
947
1125
  }
948
- ]
1126
+ ],
1127
+ "emptyIcon": "inbox",
1128
+ "entity": "WorldZone",
1129
+ "emptyTitle": "Nothing here",
1130
+ "emptyDescription": "This zone is empty.",
1131
+ "type": "data-grid"
949
1132
  },
950
1133
  {
951
1134
  "type": "divider"
952
1135
  },
953
1136
  {
1137
+ "justify": "end",
954
1138
  "type": "stack",
955
1139
  "direction": "horizontal",
956
1140
  "gap": "sm",
957
- "justify": "end",
958
1141
  "children": [
959
1142
  {
960
1143
  "type": "button",
961
- "label": "Back to Map",
962
1144
  "event": "BACK",
1145
+ "icon": "arrow-left",
963
1146
  "variant": "ghost",
964
- "icon": "arrow-left"
1147
+ "label": "Back to Map"
965
1148
  }
966
1149
  ]
967
1150
  }
968
- ]
1151
+ ],
1152
+ "direction": "vertical",
1153
+ "type": "stack",
1154
+ "gap": "lg"
969
1155
  }
970
1156
  ]
971
1157
  }
@@ -979,110 +1165,102 @@
979
1165
  "effects": [
980
1166
  [
981
1167
  "fetch",
982
- "WorldZone"
1168
+ "WorldZone",
1169
+ {
1170
+ "emit": {
1171
+ "failure": "WorldZoneLoadFailed",
1172
+ "success": "WorldZoneLoaded"
1173
+ }
1174
+ }
983
1175
  ],
984
1176
  [
985
1177
  "render-ui",
986
1178
  "main",
987
1179
  {
988
- "type": "game-shell",
989
- "appName": "RPG Game",
990
1180
  "showTopBar": true,
991
1181
  "children": [
992
1182
  {
993
- "type": "stack",
994
- "direction": "vertical",
995
1183
  "gap": "lg",
1184
+ "direction": "vertical",
996
1185
  "children": [
997
1186
  {
998
- "type": "stack",
999
1187
  "direction": "horizontal",
1000
1188
  "gap": "md",
1001
- "justify": "space-between",
1002
1189
  "children": [
1003
1190
  {
1004
- "type": "stack",
1005
- "direction": "horizontal",
1006
- "gap": "md",
1007
1191
  "children": [
1008
1192
  {
1009
- "type": "icon",
1193
+ "size": "lg",
1010
1194
  "name": "map",
1011
- "size": "lg"
1195
+ "type": "icon"
1012
1196
  },
1013
1197
  {
1014
- "type": "typography",
1015
1198
  "content": "World Map",
1199
+ "type": "typography",
1016
1200
  "variant": "h2"
1017
1201
  }
1018
- ]
1202
+ ],
1203
+ "direction": "horizontal",
1204
+ "gap": "md",
1205
+ "type": "stack"
1019
1206
  },
1020
1207
  {
1021
- "type": "status-dot",
1022
1208
  "status": "active",
1023
1209
  "pulse": false,
1210
+ "type": "status-dot",
1024
1211
  "label": "Exploring"
1025
1212
  }
1026
- ]
1213
+ ],
1214
+ "justify": "space-between",
1215
+ "type": "stack"
1027
1216
  },
1028
1217
  {
1029
1218
  "type": "divider"
1030
1219
  },
1031
1220
  {
1032
- "type": "map-view",
1033
1221
  "markers": [],
1034
1222
  "height": "200px",
1035
- "zoom": 10
1223
+ "type": "map-view",
1224
+ "zoom": 10.0
1036
1225
  },
1037
1226
  {
1038
- "type": "data-grid",
1039
- "entity": "WorldZone",
1040
- "emptyIcon": "compass",
1041
- "emptyTitle": "No worldzones discovered",
1042
- "emptyDescription": "Explore to discover new worldzones.",
1043
- "itemActions": [
1044
- {
1045
- "label": "Travel",
1046
- "event": "TRAVEL"
1047
- }
1048
- ],
1049
1227
  "renderItem": [
1050
1228
  "fn",
1051
1229
  "item",
1052
1230
  {
1231
+ "gap": "sm",
1053
1232
  "type": "stack",
1054
1233
  "direction": "vertical",
1055
- "gap": "sm",
1056
1234
  "children": [
1057
1235
  {
1058
- "type": "stack",
1059
- "direction": "horizontal",
1060
1236
  "justify": "space-between",
1061
- "align": "center",
1062
1237
  "children": [
1063
1238
  {
1064
- "type": "stack",
1065
- "direction": "horizontal",
1066
1239
  "gap": "sm",
1240
+ "direction": "horizontal",
1241
+ "type": "stack",
1067
1242
  "align": "center",
1068
1243
  "children": [
1069
1244
  {
1245
+ "size": "sm",
1070
1246
  "type": "icon",
1071
- "name": "map-pin",
1072
- "size": "sm"
1247
+ "name": "map-pin"
1073
1248
  },
1074
1249
  {
1250
+ "content": "@item.name",
1075
1251
  "type": "typography",
1076
- "variant": "h4",
1077
- "content": "@item.name"
1252
+ "variant": "h4"
1078
1253
  }
1079
1254
  ]
1080
1255
  },
1081
1256
  {
1082
- "type": "badge",
1083
- "label": "@item.description"
1257
+ "label": "@item.description",
1258
+ "type": "badge"
1084
1259
  }
1085
- ]
1260
+ ],
1261
+ "direction": "horizontal",
1262
+ "type": "stack",
1263
+ "align": "center"
1086
1264
  },
1087
1265
  {
1088
1266
  "type": "typography",
@@ -1091,48 +1269,38 @@
1091
1269
  }
1092
1270
  ]
1093
1271
  }
1094
- ]
1272
+ ],
1273
+ "emptyIcon": "compass",
1274
+ "entity": "WorldZone",
1275
+ "emptyTitle": "No worldzones discovered",
1276
+ "itemActions": [
1277
+ {
1278
+ "event": "TRAVEL",
1279
+ "label": "Travel"
1280
+ }
1281
+ ],
1282
+ "type": "data-grid",
1283
+ "emptyDescription": "Explore to discover new worldzones."
1095
1284
  }
1096
- ]
1285
+ ],
1286
+ "type": "stack"
1097
1287
  }
1098
- ]
1288
+ ],
1289
+ "appName": "RPG Game",
1290
+ "type": "game-shell"
1099
1291
  }
1100
1292
  ]
1101
1293
  ]
1102
1294
  }
1103
1295
  ]
1104
1296
  },
1105
- "emits": [
1106
- {
1107
- "event": "ENCOUNTER_STARTED",
1108
- "payload": [
1109
- {
1110
- "name": "zoneId",
1111
- "type": "string",
1112
- "required": true
1113
- }
1114
- ],
1115
- "scope": "external"
1116
- },
1117
- {
1118
- "event": "QUEST_ACCEPTED",
1119
- "payload": [
1120
- {
1121
- "name": "questId",
1122
- "type": "string",
1123
- "required": true
1124
- }
1125
- ],
1126
- "scope": "external"
1127
- }
1128
- ]
1297
+ "scope": "collection"
1129
1298
  }
1130
1299
  ],
1131
1300
  "pages": [
1132
1301
  {
1133
- "name": "WorldPage",
1302
+ "name": "World",
1134
1303
  "path": "/world",
1135
- "isInitial": true,
1136
1304
  "traits": [
1137
1305
  {
1138
1306
  "ref": "WorldZoneNavigation"
@@ -1145,8 +1313,8 @@
1145
1313
  "name": "RpgItemOrbital",
1146
1314
  "entity": {
1147
1315
  "name": "RpgItem",
1148
- "persistence": "persistent",
1149
1316
  "collection": "rpgitems",
1317
+ "persistence": "persistent",
1150
1318
  "fields": [
1151
1319
  {
1152
1320
  "name": "id",
@@ -1165,69 +1333,101 @@
1165
1333
  },
1166
1334
  {
1167
1335
  "name": "quantity",
1168
- "type": "number",
1169
- "default": 1
1336
+ "type": "number"
1170
1337
  },
1171
1338
  {
1172
1339
  "name": "rarity",
1173
- "type": "string",
1174
- "default": "common"
1340
+ "type": "string"
1175
1341
  },
1176
1342
  {
1177
1343
  "name": "pendingId",
1178
- "type": "string",
1179
- "default": ""
1180
- }
1181
- ],
1182
- "instances": [
1183
- {
1184
- "id": "item-1",
1185
- "name": "Health Potion",
1186
- "description": "Restores 50 HP",
1187
- "status": "active",
1188
- "pendingId": ""
1189
- },
1190
- {
1191
- "id": "item-2",
1192
- "name": "Iron Sword",
1193
- "description": "A sturdy blade",
1194
- "status": "active",
1195
- "pendingId": ""
1196
- },
1197
- {
1198
- "id": "item-3",
1199
- "name": "Wooden Shield",
1200
- "description": "Basic protection",
1201
- "status": "active",
1202
- "pendingId": ""
1344
+ "type": "string"
1203
1345
  }
1204
1346
  ]
1205
1347
  },
1206
1348
  "traits": [
1207
1349
  {
1208
1350
  "name": "RpgItemBrowse",
1209
- "linkedEntity": "RpgItem",
1210
1351
  "category": "interaction",
1352
+ "linkedEntity": "RpgItem",
1353
+ "emits": [
1354
+ {
1355
+ "event": "RpgItemLoaded",
1356
+ "description": "Fired when RpgItem finishes loading",
1357
+ "scope": "internal",
1358
+ "payload": [
1359
+ {
1360
+ "name": "id",
1361
+ "type": "string",
1362
+ "required": true
1363
+ },
1364
+ {
1365
+ "name": "name",
1366
+ "type": "string",
1367
+ "required": true
1368
+ },
1369
+ {
1370
+ "name": "type",
1371
+ "type": "string",
1372
+ "required": true
1373
+ },
1374
+ {
1375
+ "name": "quantity",
1376
+ "type": "number"
1377
+ },
1378
+ {
1379
+ "name": "rarity",
1380
+ "type": "string"
1381
+ },
1382
+ {
1383
+ "name": "pendingId",
1384
+ "type": "string"
1385
+ }
1386
+ ]
1387
+ },
1388
+ {
1389
+ "event": "RpgItemLoadFailed",
1390
+ "description": "Fired when RpgItem fails to load",
1391
+ "scope": "internal",
1392
+ "payload": [
1393
+ {
1394
+ "name": "message",
1395
+ "type": "string"
1396
+ }
1397
+ ]
1398
+ }
1399
+ ],
1211
1400
  "listens": [
1212
1401
  {
1213
1402
  "event": "ITEM_ADDED",
1214
1403
  "triggers": "INIT",
1215
- "scope": "external"
1404
+ "source": {
1405
+ "kind": "trait",
1406
+ "trait": "RpgItemAdd"
1407
+ }
1216
1408
  },
1217
1409
  {
1218
1410
  "event": "ITEM_USED",
1219
1411
  "triggers": "INIT",
1220
- "scope": "internal"
1412
+ "source": {
1413
+ "kind": "trait",
1414
+ "trait": "RpgItemUse"
1415
+ }
1221
1416
  },
1222
1417
  {
1223
1418
  "event": "CONFIRM_DROP",
1224
1419
  "triggers": "INIT",
1225
- "scope": "internal"
1420
+ "source": {
1421
+ "kind": "trait",
1422
+ "trait": "RpgItemDrop"
1423
+ }
1226
1424
  },
1227
1425
  {
1228
1426
  "event": "LOOT_DROPPED",
1229
1427
  "triggers": "INIT",
1230
- "scope": "external"
1428
+ "source": {
1429
+ "kind": "any"
1430
+ }
1231
1431
  }
1232
1432
  ],
1233
1433
  "stateMachine": {
@@ -1243,36 +1443,16 @@
1243
1443
  "name": "Initialize"
1244
1444
  },
1245
1445
  {
1246
- "key": "ADD_ITEM",
1247
- "name": "ADD_ITEM"
1248
- },
1249
- {
1250
- "key": "USE_ITEM",
1251
- "name": "USE_ITEM",
1252
- "payload": [
1253
- {
1254
- "name": "id",
1255
- "type": "string",
1256
- "required": true
1257
- },
1258
- {
1259
- "name": "row",
1260
- "type": "object"
1261
- }
1262
- ]
1446
+ "key": "RpgItemLoaded",
1447
+ "name": "RpgItem loaded"
1263
1448
  },
1264
1449
  {
1265
- "key": "DROP",
1266
- "name": "DROP",
1450
+ "key": "RpgItemLoadFailed",
1451
+ "name": "RpgItem load failed",
1267
1452
  "payload": [
1268
1453
  {
1269
- "name": "id",
1270
- "type": "string",
1271
- "required": true
1272
- },
1273
- {
1274
- "name": "row",
1275
- "type": "object"
1454
+ "name": "message",
1455
+ "type": "string"
1276
1456
  }
1277
1457
  ]
1278
1458
  }
@@ -1293,25 +1473,14 @@
1293
1473
  {
1294
1474
  "type": "game-shell",
1295
1475
  "appName": "RPG Game",
1296
- "showTopBar": true,
1297
1476
  "children": [
1298
1477
  {
1299
1478
  "type": "stack",
1300
- "direction": "vertical",
1301
- "gap": "lg",
1302
1479
  "className": "max-w-5xl mx-auto w-full",
1303
1480
  "children": [
1304
1481
  {
1305
- "type": "stack",
1306
- "direction": "horizontal",
1307
- "gap": "md",
1308
- "justify": "space-between",
1309
- "align": "center",
1310
1482
  "children": [
1311
1483
  {
1312
- "type": "stack",
1313
- "direction": "horizontal",
1314
- "gap": "sm",
1315
1484
  "align": "center",
1316
1485
  "children": [
1317
1486
  {
@@ -1321,10 +1490,13 @@
1321
1490
  },
1322
1491
  {
1323
1492
  "type": "typography",
1324
- "content": "Inventory",
1325
- "variant": "h2"
1493
+ "variant": "h2",
1494
+ "content": "Inventory"
1326
1495
  }
1327
- ]
1496
+ ],
1497
+ "gap": "sm",
1498
+ "type": "stack",
1499
+ "direction": "horizontal"
1328
1500
  },
1329
1501
  {
1330
1502
  "type": "stack",
@@ -1332,94 +1504,143 @@
1332
1504
  "gap": "sm",
1333
1505
  "children": [
1334
1506
  {
1335
- "type": "button",
1336
- "label": "Add RpgItem",
1337
1507
  "event": "ADD_ITEM",
1508
+ "icon": "plus",
1509
+ "type": "button",
1338
1510
  "variant": "primary",
1339
- "icon": "plus"
1511
+ "label": "Add RpgItem"
1340
1512
  }
1341
1513
  ]
1342
1514
  }
1343
- ]
1515
+ ],
1516
+ "gap": "md",
1517
+ "align": "center",
1518
+ "direction": "horizontal",
1519
+ "justify": "space-between",
1520
+ "type": "stack"
1344
1521
  },
1345
1522
  {
1346
1523
  "type": "divider"
1347
1524
  },
1348
1525
  {
1349
- "type": "data-grid",
1350
- "entity": "RpgItem",
1351
- "emptyIcon": "inbox",
1352
- "emptyTitle": "No items yet",
1353
- "emptyDescription": "Add your first item to get started.",
1354
- "itemActions": [
1355
- {
1356
- "label": "Use",
1357
- "event": "USE_ITEM",
1358
- "variant": "ghost",
1359
- "size": "sm"
1360
- },
1361
- {
1362
- "label": "Drop",
1363
- "event": "DROP",
1364
- "variant": "danger",
1365
- "size": "sm"
1366
- }
1367
- ],
1368
1526
  "columns": [
1369
1527
  {
1370
- "name": "name",
1371
1528
  "label": "Name",
1372
1529
  "variant": "h4",
1530
+ "name": "name",
1373
1531
  "icon": "briefcase"
1374
1532
  },
1375
1533
  {
1376
- "name": "type",
1377
- "label": "Type",
1378
- "variant": "badge",
1379
1534
  "colorMap": {
1380
- "active": "success",
1381
- "completed": "success",
1382
1535
  "done": "success",
1383
- "pending": "warning",
1384
- "draft": "warning",
1385
1536
  "scheduled": "warning",
1537
+ "failed": "destructive",
1538
+ "active": "success",
1539
+ "draft": "warning",
1386
1540
  "inactive": "neutral",
1387
1541
  "archived": "neutral",
1388
1542
  "disabled": "neutral",
1389
- "error": "destructive",
1543
+ "pending": "warning",
1544
+ "completed": "success",
1390
1545
  "cancelled": "destructive",
1391
- "failed": "destructive"
1392
- }
1546
+ "error": "destructive"
1547
+ },
1548
+ "label": "Type",
1549
+ "name": "type",
1550
+ "variant": "badge"
1393
1551
  },
1394
1552
  {
1395
- "name": "quantity",
1396
1553
  "label": "Quantity",
1554
+ "name": "quantity",
1397
1555
  "variant": "caption"
1398
1556
  }
1399
- ]
1557
+ ],
1558
+ "entity": "RpgItem",
1559
+ "itemActions": [
1560
+ {
1561
+ "size": "sm",
1562
+ "label": "Use",
1563
+ "variant": "ghost",
1564
+ "event": "USE_ITEM"
1565
+ },
1566
+ {
1567
+ "label": "Drop",
1568
+ "variant": "danger",
1569
+ "size": "sm",
1570
+ "event": "DROP"
1571
+ }
1572
+ ],
1573
+ "emptyIcon": "inbox",
1574
+ "emptyTitle": "No items yet",
1575
+ "type": "data-grid",
1576
+ "emptyDescription": "Add your first item to get started."
1400
1577
  }
1401
- ]
1578
+ ],
1579
+ "direction": "vertical",
1580
+ "gap": "lg"
1402
1581
  }
1403
- ]
1582
+ ],
1583
+ "showTopBar": true
1404
1584
  }
1405
1585
  ]
1406
1586
  ]
1407
1587
  }
1408
1588
  ]
1409
- }
1589
+ },
1590
+ "scope": "collection"
1410
1591
  },
1411
1592
  {
1412
1593
  "name": "RpgItemAdd",
1413
- "linkedEntity": "RpgItem",
1414
1594
  "category": "interaction",
1595
+ "linkedEntity": "RpgItem",
1415
1596
  "emits": [
1416
1597
  {
1417
- "event": "SAVE",
1418
- "scope": "internal"
1598
+ "event": "ITEM_ADDED"
1419
1599
  },
1420
1600
  {
1421
- "event": "ITEM_ADDED",
1422
- "scope": "external"
1601
+ "event": "RpgItemLoaded",
1602
+ "description": "Fired when RpgItem finishes loading",
1603
+ "scope": "internal",
1604
+ "payload": [
1605
+ {
1606
+ "name": "id",
1607
+ "type": "string",
1608
+ "required": true
1609
+ },
1610
+ {
1611
+ "name": "name",
1612
+ "type": "string",
1613
+ "required": true
1614
+ },
1615
+ {
1616
+ "name": "type",
1617
+ "type": "string",
1618
+ "required": true
1619
+ },
1620
+ {
1621
+ "name": "quantity",
1622
+ "type": "number"
1623
+ },
1624
+ {
1625
+ "name": "rarity",
1626
+ "type": "string"
1627
+ },
1628
+ {
1629
+ "name": "pendingId",
1630
+ "type": "string"
1631
+ }
1632
+ ]
1633
+ },
1634
+ {
1635
+ "event": "RpgItemLoadFailed",
1636
+ "description": "Fired when RpgItem fails to load",
1637
+ "scope": "internal",
1638
+ "payload": [
1639
+ {
1640
+ "name": "message",
1641
+ "type": "string"
1642
+ }
1643
+ ]
1423
1644
  }
1424
1645
  ],
1425
1646
  "stateMachine": {
@@ -1439,7 +1660,7 @@
1439
1660
  },
1440
1661
  {
1441
1662
  "key": "ADD_ITEM",
1442
- "name": "Open"
1663
+ "name": "Add Item"
1443
1664
  },
1444
1665
  {
1445
1666
  "key": "CLOSE",
@@ -1451,8 +1672,25 @@
1451
1672
  "payload": [
1452
1673
  {
1453
1674
  "name": "data",
1454
- "type": "object",
1455
- "required": true
1675
+ "type": "string"
1676
+ }
1677
+ ]
1678
+ },
1679
+ {
1680
+ "key": "ITEM_ADDED",
1681
+ "name": "Item Added"
1682
+ },
1683
+ {
1684
+ "key": "RpgItemLoaded",
1685
+ "name": "RpgItem loaded"
1686
+ },
1687
+ {
1688
+ "key": "RpgItemLoadFailed",
1689
+ "name": "RpgItem load failed",
1690
+ "payload": [
1691
+ {
1692
+ "name": "message",
1693
+ "type": "string"
1456
1694
  }
1457
1695
  ]
1458
1696
  }
@@ -1476,7 +1714,13 @@
1476
1714
  "effects": [
1477
1715
  [
1478
1716
  "fetch",
1479
- "RpgItem"
1717
+ "RpgItem",
1718
+ {
1719
+ "emit": {
1720
+ "success": "RpgItemLoaded",
1721
+ "failure": "RpgItemLoadFailed"
1722
+ }
1723
+ }
1480
1724
  ],
1481
1725
  [
1482
1726
  "render-ui",
@@ -1488,36 +1732,36 @@
1488
1732
  "children": [
1489
1733
  {
1490
1734
  "type": "stack",
1491
- "direction": "horizontal",
1492
- "gap": "sm",
1493
1735
  "children": [
1494
1736
  {
1495
- "type": "icon",
1737
+ "size": "md",
1496
1738
  "name": "plus-circle",
1497
- "size": "md"
1739
+ "type": "icon"
1498
1740
  },
1499
1741
  {
1500
- "type": "typography",
1742
+ "variant": "h3",
1501
1743
  "content": "Add RpgItem",
1502
- "variant": "h3"
1744
+ "type": "typography"
1503
1745
  }
1504
- ]
1746
+ ],
1747
+ "direction": "horizontal",
1748
+ "gap": "sm"
1505
1749
  },
1506
1750
  {
1507
1751
  "type": "divider"
1508
1752
  },
1509
1753
  {
1510
- "type": "form-section",
1511
- "entity": "RpgItem",
1512
- "mode": "create",
1513
- "submitEvent": "SAVE",
1514
- "cancelEvent": "CLOSE",
1515
1754
  "fields": [
1516
1755
  "name",
1517
1756
  "type",
1518
1757
  "quantity",
1519
1758
  "rarity"
1520
- ]
1759
+ ],
1760
+ "mode": "create",
1761
+ "type": "form-section",
1762
+ "cancelEvent": "CLOSE",
1763
+ "entity": "RpgItem",
1764
+ "submitEvent": "SAVE"
1521
1765
  }
1522
1766
  ]
1523
1767
  }
@@ -1534,6 +1778,13 @@
1534
1778
  "modal",
1535
1779
  null
1536
1780
  ],
1781
+ [
1782
+ "render-ui",
1783
+ "main",
1784
+ {
1785
+ "type": "box"
1786
+ }
1787
+ ],
1537
1788
  [
1538
1789
  "notify",
1539
1790
  "Cancelled",
@@ -1557,6 +1808,13 @@
1557
1808
  "modal",
1558
1809
  null
1559
1810
  ],
1811
+ [
1812
+ "render-ui",
1813
+ "main",
1814
+ {
1815
+ "type": "box"
1816
+ }
1817
+ ],
1560
1818
  [
1561
1819
  "emit",
1562
1820
  "ITEM_ADDED"
@@ -1564,24 +1822,65 @@
1564
1822
  ]
1565
1823
  }
1566
1824
  ]
1567
- }
1825
+ },
1826
+ "scope": "collection"
1568
1827
  },
1569
1828
  {
1570
1829
  "name": "RpgItemUse",
1571
- "linkedEntity": "RpgItem",
1572
1830
  "category": "interaction",
1831
+ "linkedEntity": "RpgItem",
1573
1832
  "emits": [
1574
1833
  {
1575
- "event": "SAVE",
1576
- "scope": "internal"
1834
+ "event": "ITEM_USED"
1577
1835
  },
1578
1836
  {
1579
- "event": "ITEM_USED",
1580
- "scope": "internal"
1581
- }
1582
- ],
1583
- "stateMachine": {
1584
- "states": [
1837
+ "event": "RpgItemLoaded",
1838
+ "description": "Fired when RpgItem finishes loading",
1839
+ "scope": "internal",
1840
+ "payload": [
1841
+ {
1842
+ "name": "id",
1843
+ "type": "string",
1844
+ "required": true
1845
+ },
1846
+ {
1847
+ "name": "name",
1848
+ "type": "string",
1849
+ "required": true
1850
+ },
1851
+ {
1852
+ "name": "type",
1853
+ "type": "string",
1854
+ "required": true
1855
+ },
1856
+ {
1857
+ "name": "quantity",
1858
+ "type": "number"
1859
+ },
1860
+ {
1861
+ "name": "rarity",
1862
+ "type": "string"
1863
+ },
1864
+ {
1865
+ "name": "pendingId",
1866
+ "type": "string"
1867
+ }
1868
+ ]
1869
+ },
1870
+ {
1871
+ "event": "RpgItemLoadFailed",
1872
+ "description": "Fired when RpgItem fails to load",
1873
+ "scope": "internal",
1874
+ "payload": [
1875
+ {
1876
+ "name": "message",
1877
+ "type": "string"
1878
+ }
1879
+ ]
1880
+ }
1881
+ ],
1882
+ "stateMachine": {
1883
+ "states": [
1585
1884
  {
1586
1885
  "name": "closed",
1587
1886
  "isInitial": true
@@ -1597,12 +1896,11 @@
1597
1896
  },
1598
1897
  {
1599
1898
  "key": "USE_ITEM",
1600
- "name": "Open",
1899
+ "name": "Use Item",
1601
1900
  "payload": [
1602
1901
  {
1603
1902
  "name": "id",
1604
- "type": "string",
1605
- "required": true
1903
+ "type": "string"
1606
1904
  }
1607
1905
  ]
1608
1906
  },
@@ -1616,8 +1914,25 @@
1616
1914
  "payload": [
1617
1915
  {
1618
1916
  "name": "data",
1619
- "type": "object",
1620
- "required": true
1917
+ "type": "string"
1918
+ }
1919
+ ]
1920
+ },
1921
+ {
1922
+ "key": "ITEM_USED",
1923
+ "name": "Item Used"
1924
+ },
1925
+ {
1926
+ "key": "RpgItemLoaded",
1927
+ "name": "RpgItem loaded"
1928
+ },
1929
+ {
1930
+ "key": "RpgItemLoadFailed",
1931
+ "name": "RpgItem load failed",
1932
+ "payload": [
1933
+ {
1934
+ "name": "message",
1935
+ "type": "string"
1621
1936
  }
1622
1937
  ]
1623
1938
  }
@@ -1643,6 +1958,10 @@
1643
1958
  "fetch",
1644
1959
  "RpgItem",
1645
1960
  {
1961
+ "emit": {
1962
+ "success": "RpgItemLoaded",
1963
+ "failure": "RpgItemLoadFailed"
1964
+ },
1646
1965
  "id": "@payload.id"
1647
1966
  }
1648
1967
  ],
@@ -1650,36 +1969,36 @@
1650
1969
  "render-ui",
1651
1970
  "modal",
1652
1971
  {
1972
+ "align": "center",
1653
1973
  "type": "stack",
1654
- "direction": "vertical",
1655
1974
  "gap": "md",
1656
- "align": "center",
1975
+ "direction": "vertical",
1657
1976
  "children": [
1658
1977
  {
1659
- "type": "stack",
1660
- "direction": "horizontal",
1661
- "gap": "sm",
1662
- "align": "center",
1663
1978
  "children": [
1664
1979
  {
1980
+ "size": "md",
1665
1981
  "type": "icon",
1666
- "name": "zap",
1667
- "size": "md"
1982
+ "name": "zap"
1668
1983
  },
1669
1984
  {
1670
- "type": "typography",
1985
+ "variant": "h3",
1671
1986
  "content": "Use RpgItem",
1672
- "variant": "h3"
1987
+ "type": "typography"
1673
1988
  }
1674
- ]
1989
+ ],
1990
+ "type": "stack",
1991
+ "gap": "sm",
1992
+ "align": "center",
1993
+ "direction": "horizontal"
1675
1994
  },
1676
1995
  {
1677
1996
  "type": "divider"
1678
1997
  },
1679
1998
  {
1680
- "type": "typography",
1681
1999
  "content": "@entity.name",
1682
- "variant": "body"
2000
+ "variant": "body",
2001
+ "type": "typography"
1683
2002
  },
1684
2003
  {
1685
2004
  "type": "stack",
@@ -1688,16 +2007,16 @@
1688
2007
  "justify": "center",
1689
2008
  "children": [
1690
2009
  {
1691
- "type": "button",
1692
- "label": "Cancel",
2010
+ "variant": "ghost",
1693
2011
  "event": "CLOSE",
1694
- "variant": "ghost"
2012
+ "type": "button",
2013
+ "label": "Cancel"
1695
2014
  },
1696
2015
  {
1697
- "type": "button",
1698
2016
  "label": "Confirm Use",
1699
- "event": "SAVE",
1700
2017
  "variant": "primary",
2018
+ "type": "button",
2019
+ "event": "SAVE",
1701
2020
  "icon": "check"
1702
2021
  }
1703
2022
  ]
@@ -1717,6 +2036,13 @@
1717
2036
  "modal",
1718
2037
  null
1719
2038
  ],
2039
+ [
2040
+ "render-ui",
2041
+ "main",
2042
+ {
2043
+ "type": "box"
2044
+ }
2045
+ ],
1720
2046
  [
1721
2047
  "notify",
1722
2048
  "Cancelled",
@@ -1740,6 +2066,13 @@
1740
2066
  "modal",
1741
2067
  null
1742
2068
  ],
2069
+ [
2070
+ "render-ui",
2071
+ "main",
2072
+ {
2073
+ "type": "box"
2074
+ }
2075
+ ],
1743
2076
  [
1744
2077
  "emit",
1745
2078
  "ITEM_USED"
@@ -1747,16 +2080,61 @@
1747
2080
  ]
1748
2081
  }
1749
2082
  ]
1750
- }
2083
+ },
2084
+ "scope": "collection"
1751
2085
  },
1752
2086
  {
1753
2087
  "name": "RpgItemDrop",
1754
- "linkedEntity": "RpgItem",
1755
2088
  "category": "interaction",
2089
+ "linkedEntity": "RpgItem",
1756
2090
  "emits": [
1757
2091
  {
1758
- "event": "CONFIRM_DROP",
1759
- "scope": "internal"
2092
+ "event": "CONFIRM_DROP"
2093
+ },
2094
+ {
2095
+ "event": "RpgItemLoaded",
2096
+ "description": "Fired when RpgItem finishes loading",
2097
+ "scope": "internal",
2098
+ "payload": [
2099
+ {
2100
+ "name": "id",
2101
+ "type": "string",
2102
+ "required": true
2103
+ },
2104
+ {
2105
+ "name": "name",
2106
+ "type": "string",
2107
+ "required": true
2108
+ },
2109
+ {
2110
+ "name": "type",
2111
+ "type": "string",
2112
+ "required": true
2113
+ },
2114
+ {
2115
+ "name": "quantity",
2116
+ "type": "number"
2117
+ },
2118
+ {
2119
+ "name": "rarity",
2120
+ "type": "string"
2121
+ },
2122
+ {
2123
+ "name": "pendingId",
2124
+ "type": "string"
2125
+ }
2126
+ ]
2127
+ },
2128
+ {
2129
+ "event": "RpgItemLoadFailed",
2130
+ "description": "Fired when RpgItem fails to load",
2131
+ "scope": "internal",
2132
+ "payload": [
2133
+ {
2134
+ "name": "message",
2135
+ "type": "string"
2136
+ }
2137
+ ]
1760
2138
  }
1761
2139
  ],
1762
2140
  "stateMachine": {
@@ -1776,18 +2154,17 @@
1776
2154
  },
1777
2155
  {
1778
2156
  "key": "DROP",
1779
- "name": "Request Confirmation",
2157
+ "name": "Drop",
1780
2158
  "payload": [
1781
2159
  {
1782
2160
  "name": "id",
1783
- "type": "string",
1784
- "required": true
2161
+ "type": "string"
1785
2162
  }
1786
2163
  ]
1787
2164
  },
1788
2165
  {
1789
2166
  "key": "CONFIRM_DROP",
1790
- "name": "Confirm"
2167
+ "name": "Confirm Drop"
1791
2168
  },
1792
2169
  {
1793
2170
  "key": "CANCEL",
@@ -1796,6 +2173,20 @@
1796
2173
  {
1797
2174
  "key": "CLOSE",
1798
2175
  "name": "Close"
2176
+ },
2177
+ {
2178
+ "key": "RpgItemLoaded",
2179
+ "name": "RpgItem loaded"
2180
+ },
2181
+ {
2182
+ "key": "RpgItemLoadFailed",
2183
+ "name": "RpgItem load failed",
2184
+ "payload": [
2185
+ {
2186
+ "name": "message",
2187
+ "type": "string"
2188
+ }
2189
+ ]
1799
2190
  }
1800
2191
  ],
1801
2192
  "transitions": [
@@ -1824,32 +2215,36 @@
1824
2215
  "fetch",
1825
2216
  "RpgItem",
1826
2217
  {
1827
- "id": "@payload.id"
2218
+ "id": "@payload.id",
2219
+ "emit": {
2220
+ "success": "RpgItemLoaded",
2221
+ "failure": "RpgItemLoadFailed"
2222
+ }
1828
2223
  }
1829
2224
  ],
1830
2225
  [
1831
2226
  "render-ui",
1832
2227
  "modal",
1833
2228
  {
1834
- "type": "stack",
1835
- "direction": "vertical",
1836
2229
  "gap": "md",
2230
+ "direction": "vertical",
2231
+ "type": "stack",
1837
2232
  "children": [
1838
2233
  {
1839
- "type": "stack",
2234
+ "align": "center",
1840
2235
  "direction": "horizontal",
2236
+ "type": "stack",
1841
2237
  "gap": "sm",
1842
- "align": "center",
1843
2238
  "children": [
1844
2239
  {
1845
- "type": "icon",
1846
2240
  "name": "alert-triangle",
2241
+ "type": "icon",
1847
2242
  "size": "md"
1848
2243
  },
1849
2244
  {
1850
2245
  "type": "typography",
1851
- "content": "Drop RpgItem",
1852
- "variant": "h3"
2246
+ "variant": "h3",
2247
+ "content": "Drop RpgItem"
1853
2248
  }
1854
2249
  ]
1855
2250
  },
@@ -1862,20 +2257,20 @@
1862
2257
  "message": "Are you sure you want to drop this rpgitem?"
1863
2258
  },
1864
2259
  {
1865
- "type": "stack",
1866
2260
  "direction": "horizontal",
2261
+ "type": "stack",
1867
2262
  "gap": "sm",
1868
2263
  "justify": "end",
1869
2264
  "children": [
1870
2265
  {
1871
- "type": "button",
1872
2266
  "label": "Cancel",
1873
- "event": "CANCEL",
1874
- "variant": "ghost"
2267
+ "type": "button",
2268
+ "variant": "ghost",
2269
+ "event": "CANCEL"
1875
2270
  },
1876
2271
  {
1877
- "type": "button",
1878
2272
  "label": "Drop",
2273
+ "type": "button",
1879
2274
  "event": "CONFIRM_DROP",
1880
2275
  "variant": "danger",
1881
2276
  "icon": "check"
@@ -1903,6 +2298,13 @@
1903
2298
  "modal",
1904
2299
  null
1905
2300
  ],
2301
+ [
2302
+ "render-ui",
2303
+ "main",
2304
+ {
2305
+ "type": "box"
2306
+ }
2307
+ ],
1906
2308
  [
1907
2309
  "ref",
1908
2310
  "RpgItem"
@@ -1919,6 +2321,13 @@
1919
2321
  "modal",
1920
2322
  null
1921
2323
  ],
2324
+ [
2325
+ "render-ui",
2326
+ "main",
2327
+ {
2328
+ "type": "box"
2329
+ }
2330
+ ],
1922
2331
  [
1923
2332
  "ref",
1924
2333
  "RpgItem"
@@ -1935,6 +2344,13 @@
1935
2344
  "modal",
1936
2345
  null
1937
2346
  ],
2347
+ [
2348
+ "render-ui",
2349
+ "main",
2350
+ {
2351
+ "type": "box"
2352
+ }
2353
+ ],
1938
2354
  [
1939
2355
  "ref",
1940
2356
  "RpgItem"
@@ -1942,12 +2358,13 @@
1942
2358
  ]
1943
2359
  }
1944
2360
  ]
1945
- }
2361
+ },
2362
+ "scope": "collection"
1946
2363
  }
1947
2364
  ],
1948
2365
  "pages": [
1949
2366
  {
1950
- "name": "InventoryPage",
2367
+ "name": "Inventory",
1951
2368
  "path": "/inventory",
1952
2369
  "traits": [
1953
2370
  {
@@ -1988,8 +2405,7 @@
1988
2405
  },
1989
2406
  {
1990
2407
  "name": "status",
1991
- "type": "string",
1992
- "default": "available"
2408
+ "type": "string"
1993
2409
  },
1994
2410
  {
1995
2411
  "name": "reward",
@@ -2000,8 +2416,59 @@
2000
2416
  "traits": [
2001
2417
  {
2002
2418
  "name": "MissionTracking",
2003
- "linkedEntity": "Mission",
2004
2419
  "category": "interaction",
2420
+ "linkedEntity": "Mission",
2421
+ "emits": [
2422
+ {
2423
+ "event": "MissionLoaded",
2424
+ "description": "Fired when Mission finishes loading",
2425
+ "scope": "internal",
2426
+ "payload": [
2427
+ {
2428
+ "name": "id",
2429
+ "type": "string",
2430
+ "required": true
2431
+ },
2432
+ {
2433
+ "name": "title",
2434
+ "type": "string",
2435
+ "required": true
2436
+ },
2437
+ {
2438
+ "name": "description",
2439
+ "type": "string"
2440
+ },
2441
+ {
2442
+ "name": "status",
2443
+ "type": "string"
2444
+ },
2445
+ {
2446
+ "name": "reward",
2447
+ "type": "string"
2448
+ }
2449
+ ]
2450
+ },
2451
+ {
2452
+ "event": "MissionLoadFailed",
2453
+ "description": "Fired when Mission fails to load",
2454
+ "scope": "internal",
2455
+ "payload": [
2456
+ {
2457
+ "name": "message",
2458
+ "type": "string"
2459
+ }
2460
+ ]
2461
+ }
2462
+ ],
2463
+ "listens": [
2464
+ {
2465
+ "event": "QUEST_ACCEPTED",
2466
+ "triggers": "INIT",
2467
+ "source": {
2468
+ "kind": "any"
2469
+ }
2470
+ }
2471
+ ],
2005
2472
  "stateMachine": {
2006
2473
  "states": [
2007
2474
  {
@@ -2032,14 +2499,15 @@
2032
2499
  },
2033
2500
  {
2034
2501
  "key": "PROGRESS",
2035
- "name": "Progress",
2036
- "payload": [
2037
- {
2038
- "name": "data",
2039
- "type": "object",
2040
- "required": true
2041
- }
2042
- ]
2502
+ "name": "Progress"
2503
+ },
2504
+ {
2505
+ "key": "COMPLETE",
2506
+ "name": "Complete"
2507
+ },
2508
+ {
2509
+ "key": "FAIL",
2510
+ "name": "Fail"
2043
2511
  },
2044
2512
  {
2045
2513
  "key": "SAVE",
@@ -2047,30 +2515,35 @@
2047
2515
  "payload": [
2048
2516
  {
2049
2517
  "name": "data",
2050
- "type": "object",
2051
- "required": true
2518
+ "type": "string"
2052
2519
  }
2053
2520
  ]
2054
2521
  },
2055
2522
  {
2056
- "key": "COMPLETE",
2057
- "name": "Complete"
2523
+ "key": "CANCEL",
2524
+ "name": "Cancel"
2058
2525
  },
2059
2526
  {
2060
- "key": "FAIL",
2061
- "name": "Fail"
2527
+ "key": "CLOSE",
2528
+ "name": "Close"
2062
2529
  },
2063
2530
  {
2064
2531
  "key": "RESET",
2065
2532
  "name": "Reset"
2066
2533
  },
2067
2534
  {
2068
- "key": "CANCEL",
2069
- "name": "Cancel"
2535
+ "key": "MissionLoaded",
2536
+ "name": "Mission loaded"
2070
2537
  },
2071
2538
  {
2072
- "key": "CLOSE",
2073
- "name": "Close"
2539
+ "key": "MissionLoadFailed",
2540
+ "name": "Mission load failed",
2541
+ "payload": [
2542
+ {
2543
+ "name": "message",
2544
+ "type": "string"
2545
+ }
2546
+ ]
2074
2547
  }
2075
2548
  ],
2076
2549
  "transitions": [
@@ -2081,56 +2554,56 @@
2081
2554
  "effects": [
2082
2555
  [
2083
2556
  "fetch",
2084
- "Mission"
2557
+ "Mission",
2558
+ {
2559
+ "emit": {
2560
+ "success": "MissionLoaded",
2561
+ "failure": "MissionLoadFailed"
2562
+ }
2563
+ }
2085
2564
  ],
2086
2565
  [
2087
2566
  "render-ui",
2088
2567
  "main",
2089
2568
  {
2569
+ "showTopBar": true,
2090
2570
  "type": "game-shell",
2091
2571
  "appName": "RPG Game",
2092
- "showTopBar": true,
2093
2572
  "children": [
2094
2573
  {
2095
- "type": "stack",
2096
- "direction": "vertical",
2097
- "gap": "lg",
2098
2574
  "children": [
2099
2575
  {
2100
- "type": "stack",
2101
- "direction": "horizontal",
2102
2576
  "gap": "md",
2103
- "justify": "space-between",
2104
2577
  "children": [
2105
2578
  {
2106
- "type": "stack",
2107
2579
  "direction": "horizontal",
2108
- "gap": "md",
2109
2580
  "children": [
2110
2581
  {
2111
- "type": "icon",
2582
+ "size": "lg",
2112
2583
  "name": "flag",
2113
- "size": "lg"
2584
+ "type": "icon"
2114
2585
  },
2115
2586
  {
2116
- "type": "typography",
2117
2587
  "content": "Missions Board",
2118
- "variant": "h2"
2588
+ "variant": "h2",
2589
+ "type": "typography"
2119
2590
  }
2120
- ]
2591
+ ],
2592
+ "type": "stack",
2593
+ "gap": "md"
2121
2594
  }
2122
- ]
2595
+ ],
2596
+ "type": "stack",
2597
+ "direction": "horizontal",
2598
+ "justify": "space-between"
2123
2599
  },
2124
2600
  {
2125
2601
  "type": "divider"
2126
2602
  },
2127
2603
  {
2128
- "type": "data-list",
2129
2604
  "entity": "Mission",
2605
+ "type": "data-list",
2130
2606
  "groupBy": "status",
2131
- "emptyIcon": "inbox",
2132
- "emptyTitle": "No missions available",
2133
- "emptyDescription": "Check back later for new missions.",
2134
2607
  "itemActions": [
2135
2608
  {
2136
2609
  "label": "Accept",
@@ -2141,25 +2614,17 @@
2141
2614
  "fn",
2142
2615
  "item",
2143
2616
  {
2144
- "type": "stack",
2145
2617
  "direction": "vertical",
2146
2618
  "gap": "sm",
2147
2619
  "children": [
2148
2620
  {
2149
- "type": "stack",
2150
- "direction": "horizontal",
2151
2621
  "justify": "space-between",
2152
- "align": "center",
2153
2622
  "children": [
2154
2623
  {
2155
- "type": "stack",
2156
- "direction": "horizontal",
2157
- "gap": "sm",
2158
- "align": "center",
2159
2624
  "children": [
2160
2625
  {
2161
- "type": "icon",
2162
2626
  "name": "flag",
2627
+ "type": "icon",
2163
2628
  "size": "sm"
2164
2629
  },
2165
2630
  {
@@ -2167,24 +2632,38 @@
2167
2632
  "variant": "h4",
2168
2633
  "content": "@item.title"
2169
2634
  }
2170
- ]
2635
+ ],
2636
+ "gap": "sm",
2637
+ "direction": "horizontal",
2638
+ "type": "stack",
2639
+ "align": "center"
2171
2640
  },
2172
2641
  {
2173
2642
  "type": "badge",
2174
2643
  "label": "@item.description"
2175
2644
  }
2176
- ]
2645
+ ],
2646
+ "type": "stack",
2647
+ "align": "center",
2648
+ "direction": "horizontal"
2177
2649
  },
2178
2650
  {
2179
2651
  "type": "typography",
2180
2652
  "variant": "caption",
2181
2653
  "content": "@item.status"
2182
2654
  }
2183
- ]
2655
+ ],
2656
+ "type": "stack"
2184
2657
  }
2185
- ]
2186
- }
2187
- ]
2658
+ ],
2659
+ "emptyTitle": "No missions available",
2660
+ "emptyDescription": "Check back later for new missions.",
2661
+ "emptyIcon": "inbox"
2662
+ }
2663
+ ],
2664
+ "direction": "vertical",
2665
+ "gap": "lg",
2666
+ "type": "stack"
2188
2667
  }
2189
2668
  ]
2190
2669
  }
@@ -2198,43 +2677,44 @@
2198
2677
  "effects": [
2199
2678
  [
2200
2679
  "fetch",
2201
- "Mission"
2680
+ "Mission",
2681
+ {
2682
+ "emit": {
2683
+ "success": "MissionLoaded",
2684
+ "failure": "MissionLoadFailed"
2685
+ }
2686
+ }
2202
2687
  ],
2203
2688
  [
2204
2689
  "render-ui",
2205
2690
  "main",
2206
2691
  {
2207
- "type": "game-shell",
2208
- "appName": "RPG Game",
2209
- "showTopBar": true,
2210
2692
  "children": [
2211
2693
  {
2212
- "type": "stack",
2213
- "direction": "vertical",
2214
2694
  "gap": "lg",
2215
2695
  "children": [
2216
2696
  {
2217
- "type": "stack",
2218
- "direction": "horizontal",
2219
2697
  "gap": "md",
2698
+ "direction": "horizontal",
2220
2699
  "justify": "space-between",
2700
+ "type": "stack",
2221
2701
  "children": [
2222
2702
  {
2223
- "type": "stack",
2224
- "direction": "horizontal",
2225
- "gap": "md",
2226
2703
  "children": [
2227
2704
  {
2228
2705
  "type": "icon",
2229
- "name": "flag",
2230
- "size": "lg"
2706
+ "size": "lg",
2707
+ "name": "flag"
2231
2708
  },
2232
2709
  {
2710
+ "variant": "h2",
2233
2711
  "type": "typography",
2234
- "content": "Missions Board",
2235
- "variant": "h2"
2712
+ "content": "Missions Board"
2236
2713
  }
2237
- ]
2714
+ ],
2715
+ "direction": "horizontal",
2716
+ "gap": "md",
2717
+ "type": "stack"
2238
2718
  },
2239
2719
  {
2240
2720
  "type": "badge",
@@ -2246,81 +2726,86 @@
2246
2726
  "type": "divider"
2247
2727
  },
2248
2728
  {
2729
+ "showPercentage": true,
2249
2730
  "type": "progress-bar",
2250
- "value": 50,
2251
- "showPercentage": true
2731
+ "value": 50.0
2252
2732
  },
2253
2733
  {
2254
2734
  "type": "data-grid",
2255
- "entity": "Mission",
2256
- "emptyIcon": "inbox",
2257
2735
  "emptyTitle": "No active quests",
2258
- "emptyDescription": "Accept a quest to begin.",
2259
- "itemActions": [
2260
- {
2261
- "label": "Progress",
2262
- "event": "PROGRESS"
2263
- },
2264
- {
2265
- "label": "Complete",
2266
- "event": "COMPLETE"
2267
- },
2268
- {
2269
- "label": "Fail",
2270
- "event": "FAIL",
2271
- "variant": "danger"
2272
- }
2273
- ],
2274
2736
  "renderItem": [
2275
2737
  "fn",
2276
2738
  "item",
2277
2739
  {
2278
- "type": "stack",
2279
- "direction": "vertical",
2280
2740
  "gap": "sm",
2281
2741
  "children": [
2282
2742
  {
2283
- "type": "stack",
2284
- "direction": "horizontal",
2285
- "justify": "space-between",
2286
- "align": "center",
2287
2743
  "children": [
2288
2744
  {
2289
2745
  "type": "stack",
2290
- "direction": "horizontal",
2291
2746
  "gap": "sm",
2292
2747
  "align": "center",
2293
2748
  "children": [
2294
2749
  {
2295
- "type": "icon",
2296
2750
  "name": "flag",
2297
- "size": "sm"
2751
+ "size": "sm",
2752
+ "type": "icon"
2298
2753
  },
2299
2754
  {
2300
2755
  "type": "typography",
2301
- "variant": "h4",
2302
- "content": "@item.title"
2756
+ "content": "@item.title",
2757
+ "variant": "h4"
2303
2758
  }
2304
- ]
2759
+ ],
2760
+ "direction": "horizontal"
2305
2761
  },
2306
2762
  {
2307
2763
  "type": "badge",
2308
2764
  "label": "@item.description"
2309
2765
  }
2310
- ]
2766
+ ],
2767
+ "type": "stack",
2768
+ "align": "center",
2769
+ "justify": "space-between",
2770
+ "direction": "horizontal"
2311
2771
  },
2312
2772
  {
2313
- "type": "typography",
2314
2773
  "variant": "caption",
2774
+ "type": "typography",
2315
2775
  "content": "@item.status"
2316
2776
  }
2317
- ]
2777
+ ],
2778
+ "type": "stack",
2779
+ "direction": "vertical"
2318
2780
  }
2319
- ]
2781
+ ],
2782
+ "emptyIcon": "inbox",
2783
+ "entity": "Mission",
2784
+ "itemActions": [
2785
+ {
2786
+ "event": "PROGRESS",
2787
+ "label": "Progress"
2788
+ },
2789
+ {
2790
+ "event": "COMPLETE",
2791
+ "label": "Complete"
2792
+ },
2793
+ {
2794
+ "label": "Fail",
2795
+ "variant": "danger",
2796
+ "event": "FAIL"
2797
+ }
2798
+ ],
2799
+ "emptyDescription": "Accept a quest to begin."
2320
2800
  }
2321
- ]
2801
+ ],
2802
+ "type": "stack",
2803
+ "direction": "vertical"
2322
2804
  }
2323
- ]
2805
+ ],
2806
+ "type": "game-shell",
2807
+ "appName": "RPG Game",
2808
+ "showTopBar": true
2324
2809
  }
2325
2810
  ]
2326
2811
  ]
@@ -2332,7 +2817,13 @@
2332
2817
  "effects": [
2333
2818
  [
2334
2819
  "fetch",
2335
- "Mission"
2820
+ "Mission",
2821
+ {
2822
+ "emit": {
2823
+ "failure": "MissionLoadFailed",
2824
+ "success": "MissionLoaded"
2825
+ }
2826
+ }
2336
2827
  ],
2337
2828
  [
2338
2829
  "render-ui",
@@ -2343,19 +2834,17 @@
2343
2834
  "showTopBar": true,
2344
2835
  "children": [
2345
2836
  {
2837
+ "gap": "lg",
2346
2838
  "type": "stack",
2347
2839
  "direction": "vertical",
2348
- "gap": "lg",
2349
2840
  "children": [
2350
2841
  {
2351
- "type": "stack",
2352
2842
  "direction": "horizontal",
2353
- "gap": "md",
2354
2843
  "justify": "space-between",
2844
+ "gap": "md",
2845
+ "type": "stack",
2355
2846
  "children": [
2356
2847
  {
2357
- "type": "stack",
2358
- "direction": "horizontal",
2359
2848
  "gap": "md",
2360
2849
  "children": [
2361
2850
  {
@@ -2368,11 +2857,13 @@
2368
2857
  "content": "Missions Board",
2369
2858
  "variant": "h2"
2370
2859
  }
2371
- ]
2860
+ ],
2861
+ "direction": "horizontal",
2862
+ "type": "stack"
2372
2863
  },
2373
2864
  {
2374
- "type": "badge",
2375
- "label": "Active"
2865
+ "label": "Active",
2866
+ "type": "badge"
2376
2867
  }
2377
2868
  ]
2378
2869
  },
@@ -2380,24 +2871,19 @@
2380
2871
  "type": "divider"
2381
2872
  },
2382
2873
  {
2874
+ "showPercentage": true,
2383
2875
  "type": "progress-bar",
2384
- "value": 50,
2385
- "showPercentage": true
2876
+ "value": 50.0
2386
2877
  },
2387
2878
  {
2388
- "type": "data-grid",
2389
- "entity": "Mission",
2390
- "emptyIcon": "inbox",
2391
- "emptyTitle": "No active quests",
2392
- "emptyDescription": "Accept a quest to begin.",
2393
2879
  "itemActions": [
2394
2880
  {
2395
2881
  "label": "Progress",
2396
2882
  "event": "PROGRESS"
2397
2883
  },
2398
2884
  {
2399
- "label": "Complete",
2400
- "event": "COMPLETE"
2885
+ "event": "COMPLETE",
2886
+ "label": "Complete"
2401
2887
  },
2402
2888
  {
2403
2889
  "label": "Fail",
@@ -2405,52 +2891,57 @@
2405
2891
  "variant": "danger"
2406
2892
  }
2407
2893
  ],
2894
+ "emptyIcon": "inbox",
2895
+ "emptyTitle": "No active quests",
2408
2896
  "renderItem": [
2409
2897
  "fn",
2410
2898
  "item",
2411
2899
  {
2412
- "type": "stack",
2413
- "direction": "vertical",
2414
2900
  "gap": "sm",
2901
+ "direction": "vertical",
2415
2902
  "children": [
2416
2903
  {
2417
2904
  "type": "stack",
2418
2905
  "direction": "horizontal",
2419
- "justify": "space-between",
2420
2906
  "align": "center",
2421
2907
  "children": [
2422
2908
  {
2423
- "type": "stack",
2424
- "direction": "horizontal",
2425
- "gap": "sm",
2426
2909
  "align": "center",
2427
2910
  "children": [
2428
2911
  {
2429
- "type": "icon",
2430
2912
  "name": "flag",
2913
+ "type": "icon",
2431
2914
  "size": "sm"
2432
2915
  },
2433
2916
  {
2434
- "type": "typography",
2917
+ "content": "@item.title",
2435
2918
  "variant": "h4",
2436
- "content": "@item.title"
2919
+ "type": "typography"
2437
2920
  }
2438
- ]
2921
+ ],
2922
+ "direction": "horizontal",
2923
+ "type": "stack",
2924
+ "gap": "sm"
2439
2925
  },
2440
2926
  {
2441
- "type": "badge",
2442
- "label": "@item.description"
2927
+ "label": "@item.description",
2928
+ "type": "badge"
2443
2929
  }
2444
- ]
2930
+ ],
2931
+ "justify": "space-between"
2445
2932
  },
2446
2933
  {
2447
- "type": "typography",
2934
+ "content": "@item.status",
2448
2935
  "variant": "caption",
2449
- "content": "@item.status"
2936
+ "type": "typography"
2450
2937
  }
2451
- ]
2938
+ ],
2939
+ "type": "stack"
2452
2940
  }
2453
- ]
2941
+ ],
2942
+ "emptyDescription": "Accept a quest to begin.",
2943
+ "type": "data-grid",
2944
+ "entity": "Mission"
2454
2945
  }
2455
2946
  ]
2456
2947
  }
@@ -2468,9 +2959,8 @@
2468
2959
  "render-ui",
2469
2960
  "modal",
2470
2961
  {
2471
- "type": "stack",
2472
2962
  "direction": "vertical",
2473
- "gap": "md",
2963
+ "type": "stack",
2474
2964
  "children": [
2475
2965
  {
2476
2966
  "type": "stack",
@@ -2478,9 +2968,9 @@
2478
2968
  "gap": "sm",
2479
2969
  "children": [
2480
2970
  {
2971
+ "size": "md",
2481
2972
  "type": "icon",
2482
- "name": "trending-up",
2483
- "size": "md"
2973
+ "name": "trending-up"
2484
2974
  },
2485
2975
  {
2486
2976
  "type": "typography",
@@ -2505,11 +2995,108 @@
2505
2995
  "reward"
2506
2996
  ]
2507
2997
  }
2998
+ ],
2999
+ "gap": "md"
3000
+ }
3001
+ ]
3002
+ ]
3003
+ },
3004
+ {
3005
+ "from": "active",
3006
+ "to": "complete",
3007
+ "event": "COMPLETE",
3008
+ "effects": [
3009
+ [
3010
+ "render-ui",
3011
+ "main",
3012
+ {
3013
+ "showTopBar": true,
3014
+ "type": "game-shell",
3015
+ "appName": "RPG Game",
3016
+ "children": [
3017
+ {
3018
+ "align": "center",
3019
+ "type": "stack",
3020
+ "direction": "vertical",
3021
+ "gap": "lg",
3022
+ "children": [
3023
+ {
3024
+ "name": "check-circle",
3025
+ "type": "icon",
3026
+ "size": "lg"
3027
+ },
3028
+ {
3029
+ "content": "Quest Complete",
3030
+ "type": "typography",
3031
+ "variant": "h2"
3032
+ },
3033
+ {
3034
+ "message": "Congratulations! The quest has been completed.",
3035
+ "variant": "success",
3036
+ "type": "alert"
3037
+ },
3038
+ {
3039
+ "label": "View Quests",
3040
+ "event": "RESET",
3041
+ "variant": "primary",
3042
+ "icon": "arrow-left",
3043
+ "type": "button"
3044
+ }
3045
+ ]
3046
+ }
2508
3047
  ]
2509
3048
  }
2510
3049
  ]
2511
3050
  ]
2512
3051
  },
3052
+ {
3053
+ "from": "active",
3054
+ "to": "failed",
3055
+ "event": "FAIL",
3056
+ "effects": [
3057
+ [
3058
+ "render-ui",
3059
+ "main",
3060
+ {
3061
+ "showTopBar": true,
3062
+ "appName": "RPG Game",
3063
+ "children": [
3064
+ {
3065
+ "align": "center",
3066
+ "gap": "lg",
3067
+ "direction": "vertical",
3068
+ "children": [
3069
+ {
3070
+ "name": "x-circle",
3071
+ "size": "lg",
3072
+ "type": "icon"
3073
+ },
3074
+ {
3075
+ "variant": "h2",
3076
+ "type": "typography",
3077
+ "content": "Quest Failed"
3078
+ },
3079
+ {
3080
+ "variant": "danger",
3081
+ "message": "The quest was not completed. You can try again.",
3082
+ "type": "alert"
3083
+ },
3084
+ {
3085
+ "variant": "primary",
3086
+ "icon": "arrow-left",
3087
+ "type": "button",
3088
+ "label": "View Quests",
3089
+ "event": "RESET"
3090
+ }
3091
+ ],
3092
+ "type": "stack"
3093
+ }
3094
+ ],
3095
+ "type": "game-shell"
3096
+ }
3097
+ ]
3098
+ ]
3099
+ },
2513
3100
  {
2514
3101
  "from": "progressing",
2515
3102
  "to": "active",
@@ -2528,129 +3115,135 @@
2528
3115
  ],
2529
3116
  [
2530
3117
  "fetch",
2531
- "Mission"
3118
+ "Mission",
3119
+ {
3120
+ "emit": {
3121
+ "failure": "MissionLoadFailed",
3122
+ "success": "MissionLoaded"
3123
+ }
3124
+ }
2532
3125
  ],
2533
3126
  [
2534
3127
  "render-ui",
2535
3128
  "main",
2536
3129
  {
2537
- "type": "game-shell",
2538
- "appName": "RPG Game",
2539
3130
  "showTopBar": true,
3131
+ "type": "game-shell",
2540
3132
  "children": [
2541
3133
  {
2542
- "type": "stack",
2543
- "direction": "vertical",
2544
- "gap": "lg",
2545
3134
  "children": [
2546
3135
  {
2547
- "type": "stack",
2548
- "direction": "horizontal",
2549
- "gap": "md",
2550
- "justify": "space-between",
2551
3136
  "children": [
2552
3137
  {
2553
3138
  "type": "stack",
2554
- "direction": "horizontal",
2555
- "gap": "md",
2556
3139
  "children": [
2557
3140
  {
3141
+ "size": "lg",
2558
3142
  "type": "icon",
2559
- "name": "flag",
2560
- "size": "lg"
3143
+ "name": "flag"
2561
3144
  },
2562
3145
  {
3146
+ "variant": "h2",
2563
3147
  "type": "typography",
2564
- "content": "Missions Board",
2565
- "variant": "h2"
3148
+ "content": "Missions Board"
2566
3149
  }
2567
- ]
3150
+ ],
3151
+ "direction": "horizontal",
3152
+ "gap": "md"
2568
3153
  },
2569
3154
  {
2570
- "type": "badge",
2571
- "label": "Active"
3155
+ "label": "Active",
3156
+ "type": "badge"
2572
3157
  }
2573
- ]
3158
+ ],
3159
+ "gap": "md",
3160
+ "direction": "horizontal",
3161
+ "justify": "space-between",
3162
+ "type": "stack"
2574
3163
  },
2575
3164
  {
2576
3165
  "type": "divider"
2577
3166
  },
2578
3167
  {
2579
3168
  "type": "progress-bar",
2580
- "value": 50,
3169
+ "value": 50.0,
2581
3170
  "showPercentage": true
2582
3171
  },
2583
3172
  {
2584
3173
  "type": "data-grid",
2585
- "entity": "Mission",
2586
- "emptyIcon": "inbox",
2587
- "emptyTitle": "No active quests",
2588
3174
  "emptyDescription": "Accept a quest to begin.",
2589
- "itemActions": [
2590
- {
2591
- "label": "Progress",
2592
- "event": "PROGRESS"
2593
- },
2594
- {
2595
- "label": "Complete",
2596
- "event": "COMPLETE"
2597
- },
2598
- {
2599
- "label": "Fail",
2600
- "event": "FAIL",
2601
- "variant": "danger"
2602
- }
2603
- ],
3175
+ "entity": "Mission",
2604
3176
  "renderItem": [
2605
3177
  "fn",
2606
3178
  "item",
2607
3179
  {
2608
- "type": "stack",
2609
- "direction": "vertical",
2610
- "gap": "sm",
2611
3180
  "children": [
2612
3181
  {
2613
3182
  "type": "stack",
2614
- "direction": "horizontal",
2615
3183
  "justify": "space-between",
2616
3184
  "align": "center",
2617
3185
  "children": [
2618
3186
  {
2619
- "type": "stack",
3187
+ "align": "center",
2620
3188
  "direction": "horizontal",
2621
3189
  "gap": "sm",
2622
- "align": "center",
2623
3190
  "children": [
2624
3191
  {
2625
3192
  "type": "icon",
2626
- "name": "flag",
2627
- "size": "sm"
3193
+ "size": "sm",
3194
+ "name": "flag"
2628
3195
  },
2629
3196
  {
2630
- "type": "typography",
2631
3197
  "variant": "h4",
2632
- "content": "@item.title"
3198
+ "content": "@item.title",
3199
+ "type": "typography"
2633
3200
  }
2634
- ]
3201
+ ],
3202
+ "type": "stack"
2635
3203
  },
2636
3204
  {
2637
3205
  "type": "badge",
2638
3206
  "label": "@item.description"
2639
3207
  }
2640
- ]
3208
+ ],
3209
+ "direction": "horizontal"
2641
3210
  },
2642
3211
  {
2643
- "type": "typography",
2644
3212
  "variant": "caption",
3213
+ "type": "typography",
2645
3214
  "content": "@item.status"
2646
3215
  }
2647
- ]
3216
+ ],
3217
+ "type": "stack",
3218
+ "gap": "sm",
3219
+ "direction": "vertical"
2648
3220
  }
2649
- ]
3221
+ ],
3222
+ "itemActions": [
3223
+ {
3224
+ "event": "PROGRESS",
3225
+ "label": "Progress"
3226
+ },
3227
+ {
3228
+ "event": "COMPLETE",
3229
+ "label": "Complete"
3230
+ },
3231
+ {
3232
+ "variant": "danger",
3233
+ "label": "Fail",
3234
+ "event": "FAIL"
3235
+ }
3236
+ ],
3237
+ "emptyTitle": "No active quests",
3238
+ "emptyIcon": "inbox"
2650
3239
  }
2651
- ]
3240
+ ],
3241
+ "type": "stack",
3242
+ "direction": "vertical",
3243
+ "gap": "lg"
2652
3244
  }
2653
- ]
3245
+ ],
3246
+ "appName": "RPG Game"
2654
3247
  }
2655
3248
  ]
2656
3249
  ]
@@ -2667,68 +3260,65 @@
2667
3260
  ],
2668
3261
  [
2669
3262
  "fetch",
2670
- "Mission"
3263
+ "Mission",
3264
+ {
3265
+ "emit": {
3266
+ "success": "MissionLoaded",
3267
+ "failure": "MissionLoadFailed"
3268
+ }
3269
+ }
2671
3270
  ],
2672
3271
  [
2673
3272
  "render-ui",
2674
3273
  "main",
2675
3274
  {
2676
- "type": "game-shell",
2677
3275
  "appName": "RPG Game",
2678
- "showTopBar": true,
2679
3276
  "children": [
2680
3277
  {
2681
- "type": "stack",
2682
- "direction": "vertical",
2683
- "gap": "lg",
2684
3278
  "children": [
2685
3279
  {
2686
- "type": "stack",
2687
- "direction": "horizontal",
2688
- "gap": "md",
2689
3280
  "justify": "space-between",
3281
+ "direction": "horizontal",
3282
+ "type": "stack",
2690
3283
  "children": [
2691
3284
  {
2692
- "type": "stack",
2693
- "direction": "horizontal",
2694
- "gap": "md",
2695
3285
  "children": [
2696
3286
  {
2697
3287
  "type": "icon",
2698
- "name": "flag",
2699
- "size": "lg"
3288
+ "size": "lg",
3289
+ "name": "flag"
2700
3290
  },
2701
3291
  {
2702
- "type": "typography",
3292
+ "variant": "h2",
2703
3293
  "content": "Missions Board",
2704
- "variant": "h2"
3294
+ "type": "typography"
2705
3295
  }
2706
- ]
3296
+ ],
3297
+ "direction": "horizontal",
3298
+ "gap": "md",
3299
+ "type": "stack"
2707
3300
  },
2708
3301
  {
2709
3302
  "type": "badge",
2710
3303
  "label": "Active"
2711
3304
  }
2712
- ]
3305
+ ],
3306
+ "gap": "md"
2713
3307
  },
2714
3308
  {
2715
3309
  "type": "divider"
2716
3310
  },
2717
3311
  {
3312
+ "value": 50.0,
2718
3313
  "type": "progress-bar",
2719
- "value": 50,
2720
3314
  "showPercentage": true
2721
3315
  },
2722
3316
  {
2723
- "type": "data-grid",
2724
- "entity": "Mission",
2725
3317
  "emptyIcon": "inbox",
2726
- "emptyTitle": "No active quests",
2727
- "emptyDescription": "Accept a quest to begin.",
2728
3318
  "itemActions": [
2729
3319
  {
2730
- "label": "Progress",
2731
- "event": "PROGRESS"
3320
+ "event": "PROGRESS",
3321
+ "label": "Progress"
2732
3322
  },
2733
3323
  {
2734
3324
  "label": "Complete",
@@ -2740,56 +3330,65 @@
2740
3330
  "variant": "danger"
2741
3331
  }
2742
3332
  ],
3333
+ "type": "data-grid",
3334
+ "emptyTitle": "No active quests",
3335
+ "entity": "Mission",
3336
+ "emptyDescription": "Accept a quest to begin.",
2743
3337
  "renderItem": [
2744
3338
  "fn",
2745
3339
  "item",
2746
3340
  {
2747
3341
  "type": "stack",
2748
3342
  "direction": "vertical",
2749
- "gap": "sm",
2750
3343
  "children": [
2751
3344
  {
2752
- "type": "stack",
2753
3345
  "direction": "horizontal",
2754
- "justify": "space-between",
2755
- "align": "center",
2756
3346
  "children": [
2757
3347
  {
2758
- "type": "stack",
2759
- "direction": "horizontal",
2760
- "gap": "sm",
2761
3348
  "align": "center",
3349
+ "gap": "sm",
2762
3350
  "children": [
2763
3351
  {
2764
- "type": "icon",
2765
3352
  "name": "flag",
2766
- "size": "sm"
3353
+ "size": "sm",
3354
+ "type": "icon"
2767
3355
  },
2768
3356
  {
3357
+ "content": "@item.title",
2769
3358
  "type": "typography",
2770
- "variant": "h4",
2771
- "content": "@item.title"
3359
+ "variant": "h4"
2772
3360
  }
2773
- ]
3361
+ ],
3362
+ "type": "stack",
3363
+ "direction": "horizontal"
2774
3364
  },
2775
3365
  {
2776
3366
  "type": "badge",
2777
3367
  "label": "@item.description"
2778
3368
  }
2779
- ]
3369
+ ],
3370
+ "justify": "space-between",
3371
+ "type": "stack",
3372
+ "align": "center"
2780
3373
  },
2781
3374
  {
2782
3375
  "type": "typography",
2783
- "variant": "caption",
2784
- "content": "@item.status"
3376
+ "content": "@item.status",
3377
+ "variant": "caption"
2785
3378
  }
2786
- ]
3379
+ ],
3380
+ "gap": "sm"
2787
3381
  }
2788
3382
  ]
2789
3383
  }
2790
- ]
3384
+ ],
3385
+ "gap": "lg",
3386
+ "type": "stack",
3387
+ "direction": "vertical"
2791
3388
  }
2792
- ]
3389
+ ],
3390
+ "type": "game-shell",
3391
+ "showTopBar": true
2793
3392
  }
2794
3393
  ]
2795
3394
  ]
@@ -2806,68 +3405,68 @@
2806
3405
  ],
2807
3406
  [
2808
3407
  "fetch",
2809
- "Mission"
3408
+ "Mission",
3409
+ {
3410
+ "emit": {
3411
+ "failure": "MissionLoadFailed",
3412
+ "success": "MissionLoaded"
3413
+ }
3414
+ }
2810
3415
  ],
2811
3416
  [
2812
3417
  "render-ui",
2813
3418
  "main",
2814
3419
  {
2815
- "type": "game-shell",
2816
- "appName": "RPG Game",
2817
- "showTopBar": true,
2818
3420
  "children": [
2819
3421
  {
2820
- "type": "stack",
2821
- "direction": "vertical",
2822
- "gap": "lg",
2823
3422
  "children": [
2824
3423
  {
2825
3424
  "type": "stack",
2826
- "direction": "horizontal",
2827
- "gap": "md",
2828
- "justify": "space-between",
2829
3425
  "children": [
2830
3426
  {
2831
- "type": "stack",
2832
3427
  "direction": "horizontal",
2833
3428
  "gap": "md",
2834
3429
  "children": [
2835
3430
  {
3431
+ "size": "lg",
2836
3432
  "type": "icon",
2837
- "name": "flag",
2838
- "size": "lg"
3433
+ "name": "flag"
2839
3434
  },
2840
3435
  {
2841
- "type": "typography",
2842
3436
  "content": "Missions Board",
3437
+ "type": "typography",
2843
3438
  "variant": "h2"
2844
3439
  }
2845
- ]
3440
+ ],
3441
+ "type": "stack"
2846
3442
  },
2847
3443
  {
2848
- "type": "badge",
2849
- "label": "Active"
3444
+ "label": "Active",
3445
+ "type": "badge"
2850
3446
  }
2851
- ]
3447
+ ],
3448
+ "direction": "horizontal",
3449
+ "justify": "space-between",
3450
+ "gap": "md"
2852
3451
  },
2853
3452
  {
2854
3453
  "type": "divider"
2855
3454
  },
2856
3455
  {
2857
3456
  "type": "progress-bar",
2858
- "value": 50,
2859
- "showPercentage": true
3457
+ "showPercentage": true,
3458
+ "value": 50.0
2860
3459
  },
2861
3460
  {
2862
- "type": "data-grid",
2863
- "entity": "Mission",
2864
3461
  "emptyIcon": "inbox",
2865
- "emptyTitle": "No active quests",
3462
+ "type": "data-grid",
2866
3463
  "emptyDescription": "Accept a quest to begin.",
3464
+ "emptyTitle": "No active quests",
3465
+ "entity": "Mission",
2867
3466
  "itemActions": [
2868
3467
  {
2869
- "label": "Progress",
2870
- "event": "PROGRESS"
3468
+ "event": "PROGRESS",
3469
+ "label": "Progress"
2871
3470
  },
2872
3471
  {
2873
3472
  "label": "Complete",
@@ -2884,20 +3483,14 @@
2884
3483
  "item",
2885
3484
  {
2886
3485
  "type": "stack",
2887
- "direction": "vertical",
2888
- "gap": "sm",
2889
3486
  "children": [
2890
3487
  {
2891
- "type": "stack",
2892
- "direction": "horizontal",
2893
3488
  "justify": "space-between",
3489
+ "direction": "horizontal",
2894
3490
  "align": "center",
3491
+ "type": "stack",
2895
3492
  "children": [
2896
3493
  {
2897
- "type": "stack",
2898
- "direction": "horizontal",
2899
- "gap": "sm",
2900
- "align": "center",
2901
3494
  "children": [
2902
3495
  {
2903
3496
  "type": "icon",
@@ -2905,126 +3498,42 @@
2905
3498
  "size": "sm"
2906
3499
  },
2907
3500
  {
2908
- "type": "typography",
2909
3501
  "variant": "h4",
3502
+ "type": "typography",
2910
3503
  "content": "@item.title"
2911
3504
  }
2912
- ]
3505
+ ],
3506
+ "type": "stack",
3507
+ "direction": "horizontal",
3508
+ "align": "center",
3509
+ "gap": "sm"
2913
3510
  },
2914
3511
  {
2915
- "type": "badge",
2916
- "label": "@item.description"
3512
+ "label": "@item.description",
3513
+ "type": "badge"
2917
3514
  }
2918
3515
  ]
2919
3516
  },
2920
3517
  {
3518
+ "content": "@item.status",
2921
3519
  "type": "typography",
2922
- "variant": "caption",
2923
- "content": "@item.status"
3520
+ "variant": "caption"
2924
3521
  }
2925
- ]
3522
+ ],
3523
+ "direction": "vertical",
3524
+ "gap": "sm"
2926
3525
  }
2927
3526
  ]
2928
3527
  }
2929
- ]
2930
- }
2931
- ]
2932
- }
2933
- ]
2934
- ]
2935
- },
2936
- {
2937
- "from": "active",
2938
- "to": "complete",
2939
- "event": "COMPLETE",
2940
- "effects": [
2941
- [
2942
- "render-ui",
2943
- "main",
2944
- {
2945
- "type": "game-shell",
2946
- "appName": "RPG Game",
2947
- "showTopBar": true,
2948
- "children": [
2949
- {
2950
- "type": "stack",
2951
- "direction": "vertical",
3528
+ ],
2952
3529
  "gap": "lg",
2953
- "align": "center",
2954
- "children": [
2955
- {
2956
- "type": "icon",
2957
- "name": "check-circle",
2958
- "size": "lg"
2959
- },
2960
- {
2961
- "type": "typography",
2962
- "content": "Quest Complete",
2963
- "variant": "h2"
2964
- },
2965
- {
2966
- "type": "alert",
2967
- "variant": "success",
2968
- "message": "Congratulations! The quest has been completed."
2969
- },
2970
- {
2971
- "type": "button",
2972
- "label": "View Quests",
2973
- "event": "RESET",
2974
- "variant": "primary",
2975
- "icon": "arrow-left"
2976
- }
2977
- ]
3530
+ "type": "stack",
3531
+ "direction": "vertical"
2978
3532
  }
2979
- ]
2980
- }
2981
- ]
2982
- ]
2983
- },
2984
- {
2985
- "from": "active",
2986
- "to": "failed",
2987
- "event": "FAIL",
2988
- "effects": [
2989
- [
2990
- "render-ui",
2991
- "main",
2992
- {
3533
+ ],
2993
3534
  "type": "game-shell",
2994
- "appName": "RPG Game",
2995
3535
  "showTopBar": true,
2996
- "children": [
2997
- {
2998
- "type": "stack",
2999
- "direction": "vertical",
3000
- "gap": "lg",
3001
- "align": "center",
3002
- "children": [
3003
- {
3004
- "type": "icon",
3005
- "name": "x-circle",
3006
- "size": "lg"
3007
- },
3008
- {
3009
- "type": "typography",
3010
- "content": "Quest Failed",
3011
- "variant": "h2"
3012
- },
3013
- {
3014
- "type": "alert",
3015
- "variant": "danger",
3016
- "message": "The quest was not completed. You can try again."
3017
- },
3018
- {
3019
- "type": "button",
3020
- "label": "View Quests",
3021
- "event": "RESET",
3022
- "variant": "primary",
3023
- "icon": "arrow-left"
3024
- }
3025
- ]
3026
- }
3027
- ]
3536
+ "appName": "RPG Game"
3028
3537
  }
3029
3538
  ]
3030
3539
  ]
@@ -3036,7 +3545,13 @@
3036
3545
  "effects": [
3037
3546
  [
3038
3547
  "fetch",
3039
- "Mission"
3548
+ "Mission",
3549
+ {
3550
+ "emit": {
3551
+ "success": "MissionLoaded",
3552
+ "failure": "MissionLoadFailed"
3553
+ }
3554
+ }
3040
3555
  ],
3041
3556
  [
3042
3557
  "render-ui",
@@ -3048,44 +3563,42 @@
3048
3563
  "children": [
3049
3564
  {
3050
3565
  "type": "stack",
3051
- "direction": "vertical",
3052
- "gap": "lg",
3053
3566
  "children": [
3054
3567
  {
3055
- "type": "stack",
3056
3568
  "direction": "horizontal",
3057
- "gap": "md",
3058
- "justify": "space-between",
3059
3569
  "children": [
3060
3570
  {
3061
3571
  "type": "stack",
3062
- "direction": "horizontal",
3063
3572
  "gap": "md",
3573
+ "direction": "horizontal",
3064
3574
  "children": [
3065
3575
  {
3576
+ "size": "lg",
3066
3577
  "type": "icon",
3067
- "name": "flag",
3068
- "size": "lg"
3578
+ "name": "flag"
3069
3579
  },
3070
3580
  {
3071
3581
  "type": "typography",
3072
- "content": "Missions Board",
3073
- "variant": "h2"
3582
+ "variant": "h2",
3583
+ "content": "Missions Board"
3074
3584
  }
3075
3585
  ]
3076
3586
  }
3077
- ]
3587
+ ],
3588
+ "gap": "md",
3589
+ "justify": "space-between",
3590
+ "type": "stack"
3078
3591
  },
3079
3592
  {
3080
3593
  "type": "divider"
3081
3594
  },
3082
3595
  {
3083
- "type": "data-list",
3084
3596
  "entity": "Mission",
3085
3597
  "groupBy": "status",
3598
+ "emptyDescription": "Check back later for new missions.",
3086
3599
  "emptyIcon": "inbox",
3087
3600
  "emptyTitle": "No missions available",
3088
- "emptyDescription": "Check back later for new missions.",
3601
+ "type": "data-list",
3089
3602
  "itemActions": [
3090
3603
  {
3091
3604
  "label": "Accept",
@@ -3096,31 +3609,26 @@
3096
3609
  "fn",
3097
3610
  "item",
3098
3611
  {
3099
- "type": "stack",
3100
3612
  "direction": "vertical",
3101
3613
  "gap": "sm",
3102
3614
  "children": [
3103
3615
  {
3104
- "type": "stack",
3105
- "direction": "horizontal",
3106
- "justify": "space-between",
3107
- "align": "center",
3108
3616
  "children": [
3109
3617
  {
3110
3618
  "type": "stack",
3111
- "direction": "horizontal",
3112
3619
  "gap": "sm",
3113
3620
  "align": "center",
3621
+ "direction": "horizontal",
3114
3622
  "children": [
3115
3623
  {
3624
+ "size": "sm",
3116
3625
  "type": "icon",
3117
- "name": "flag",
3118
- "size": "sm"
3626
+ "name": "flag"
3119
3627
  },
3120
3628
  {
3121
- "type": "typography",
3629
+ "content": "@item.title",
3122
3630
  "variant": "h4",
3123
- "content": "@item.title"
3631
+ "type": "typography"
3124
3632
  }
3125
3633
  ]
3126
3634
  },
@@ -3128,18 +3636,25 @@
3128
3636
  "type": "badge",
3129
3637
  "label": "@item.description"
3130
3638
  }
3131
- ]
3639
+ ],
3640
+ "type": "stack",
3641
+ "align": "center",
3642
+ "direction": "horizontal",
3643
+ "justify": "space-between"
3132
3644
  },
3133
3645
  {
3134
- "type": "typography",
3135
3646
  "variant": "caption",
3136
- "content": "@item.status"
3647
+ "content": "@item.status",
3648
+ "type": "typography"
3137
3649
  }
3138
- ]
3650
+ ],
3651
+ "type": "stack"
3139
3652
  }
3140
3653
  ]
3141
3654
  }
3142
- ]
3655
+ ],
3656
+ "direction": "vertical",
3657
+ "gap": "lg"
3143
3658
  }
3144
3659
  ]
3145
3660
  }
@@ -3153,56 +3668,52 @@
3153
3668
  "effects": [
3154
3669
  [
3155
3670
  "fetch",
3156
- "Mission"
3671
+ "Mission",
3672
+ {
3673
+ "emit": {
3674
+ "success": "MissionLoaded",
3675
+ "failure": "MissionLoadFailed"
3676
+ }
3677
+ }
3157
3678
  ],
3158
3679
  [
3159
3680
  "render-ui",
3160
3681
  "main",
3161
3682
  {
3162
- "type": "game-shell",
3163
- "appName": "RPG Game",
3164
- "showTopBar": true,
3165
3683
  "children": [
3166
3684
  {
3167
- "type": "stack",
3168
- "direction": "vertical",
3169
3685
  "gap": "lg",
3686
+ "type": "stack",
3170
3687
  "children": [
3171
3688
  {
3172
3689
  "type": "stack",
3173
- "direction": "horizontal",
3174
- "gap": "md",
3175
3690
  "justify": "space-between",
3176
3691
  "children": [
3177
3692
  {
3178
- "type": "stack",
3179
- "direction": "horizontal",
3180
- "gap": "md",
3181
3693
  "children": [
3182
3694
  {
3183
- "type": "icon",
3695
+ "size": "lg",
3184
3696
  "name": "flag",
3185
- "size": "lg"
3697
+ "type": "icon"
3186
3698
  },
3187
3699
  {
3188
- "type": "typography",
3189
3700
  "content": "Missions Board",
3190
- "variant": "h2"
3701
+ "variant": "h2",
3702
+ "type": "typography"
3191
3703
  }
3192
- ]
3704
+ ],
3705
+ "gap": "md",
3706
+ "direction": "horizontal",
3707
+ "type": "stack"
3193
3708
  }
3194
- ]
3709
+ ],
3710
+ "direction": "horizontal",
3711
+ "gap": "md"
3195
3712
  },
3196
3713
  {
3197
3714
  "type": "divider"
3198
3715
  },
3199
3716
  {
3200
- "type": "data-list",
3201
- "entity": "Mission",
3202
- "groupBy": "status",
3203
- "emptyIcon": "inbox",
3204
- "emptyTitle": "No missions available",
3205
- "emptyDescription": "Check back later for new missions.",
3206
3717
  "itemActions": [
3207
3718
  {
3208
3719
  "label": "Accept",
@@ -3213,31 +3724,29 @@
3213
3724
  "fn",
3214
3725
  "item",
3215
3726
  {
3216
- "type": "stack",
3217
3727
  "direction": "vertical",
3218
- "gap": "sm",
3728
+ "type": "stack",
3219
3729
  "children": [
3220
3730
  {
3221
- "type": "stack",
3731
+ "align": "center",
3222
3732
  "direction": "horizontal",
3223
3733
  "justify": "space-between",
3224
- "align": "center",
3225
3734
  "children": [
3226
3735
  {
3227
- "type": "stack",
3228
- "direction": "horizontal",
3229
3736
  "gap": "sm",
3737
+ "direction": "horizontal",
3738
+ "type": "stack",
3230
3739
  "align": "center",
3231
3740
  "children": [
3232
3741
  {
3233
- "type": "icon",
3234
3742
  "name": "flag",
3235
- "size": "sm"
3743
+ "size": "sm",
3744
+ "type": "icon"
3236
3745
  },
3237
3746
  {
3747
+ "content": "@item.title",
3238
3748
  "type": "typography",
3239
- "variant": "h4",
3240
- "content": "@item.title"
3749
+ "variant": "h4"
3241
3750
  }
3242
3751
  ]
3243
3752
  },
@@ -3245,38 +3754,44 @@
3245
3754
  "type": "badge",
3246
3755
  "label": "@item.description"
3247
3756
  }
3248
- ]
3757
+ ],
3758
+ "type": "stack"
3249
3759
  },
3250
3760
  {
3251
3761
  "type": "typography",
3252
3762
  "variant": "caption",
3253
3763
  "content": "@item.status"
3254
3764
  }
3255
- ]
3765
+ ],
3766
+ "gap": "sm"
3256
3767
  }
3257
- ]
3768
+ ],
3769
+ "groupBy": "status",
3770
+ "emptyIcon": "inbox",
3771
+ "emptyTitle": "No missions available",
3772
+ "entity": "Mission",
3773
+ "type": "data-list",
3774
+ "emptyDescription": "Check back later for new missions."
3258
3775
  }
3259
- ]
3776
+ ],
3777
+ "direction": "vertical"
3260
3778
  }
3261
- ]
3779
+ ],
3780
+ "type": "game-shell",
3781
+ "appName": "RPG Game",
3782
+ "showTopBar": true
3262
3783
  }
3263
3784
  ]
3264
3785
  ]
3265
3786
  }
3266
3787
  ]
3267
3788
  },
3268
- "listens": [
3269
- {
3270
- "event": "QUEST_ACCEPTED",
3271
- "triggers": "INIT",
3272
- "scope": "external"
3273
- }
3274
- ]
3789
+ "scope": "collection"
3275
3790
  }
3276
3791
  ],
3277
3792
  "pages": [
3278
3793
  {
3279
- "name": "QuestsPage",
3794
+ "name": "Quests",
3280
3795
  "path": "/quests",
3281
3796
  "traits": [
3282
3797
  {
@@ -3287,4 +3802,4 @@
3287
3802
  ]
3288
3803
  }
3289
3804
  ]
3290
- }
3805
+ }