@almadar/std 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/dist/behaviors/exports/atoms/std-async.orb +420 -0
  2. package/dist/behaviors/exports/atoms/std-browse.orb +173 -0
  3. package/dist/behaviors/exports/atoms/std-cache-aside.orb +881 -0
  4. package/dist/behaviors/exports/atoms/std-circuit-breaker.orb +501 -0
  5. package/dist/behaviors/exports/atoms/std-collision.orb +616 -0
  6. package/dist/behaviors/exports/atoms/std-combat-log.orb +145 -0
  7. package/dist/behaviors/exports/atoms/std-combat.orb +410 -0
  8. package/dist/behaviors/exports/atoms/std-confirmation.orb +282 -0
  9. package/dist/behaviors/exports/atoms/std-dialogue-box.orb +238 -0
  10. package/dist/behaviors/exports/atoms/std-display.orb +842 -0
  11. package/dist/behaviors/exports/atoms/std-drawer.orb +316 -0
  12. package/dist/behaviors/exports/atoms/std-filter.orb +442 -0
  13. package/dist/behaviors/exports/atoms/std-game-audio.orb +113 -0
  14. package/dist/behaviors/exports/atoms/std-game-canvas-2d.orb +135 -0
  15. package/dist/behaviors/exports/atoms/std-game-canvas-3d.orb +224 -0
  16. package/dist/behaviors/exports/atoms/std-game-hud.orb +151 -0
  17. package/dist/behaviors/exports/atoms/std-game-menu.orb +211 -0
  18. package/dist/behaviors/exports/atoms/std-game-over-screen.orb +195 -0
  19. package/dist/behaviors/exports/atoms/std-gameflow.orb +318 -0
  20. package/dist/behaviors/exports/atoms/std-input.orb +629 -0
  21. package/dist/behaviors/exports/atoms/std-inventory-panel.orb +255 -0
  22. package/dist/behaviors/exports/atoms/std-isometric-canvas.orb +631 -0
  23. package/dist/behaviors/exports/atoms/std-loading.orb +511 -0
  24. package/dist/behaviors/exports/atoms/std-modal.orb +270 -0
  25. package/dist/behaviors/exports/atoms/std-movement.orb +1037 -0
  26. package/dist/behaviors/exports/atoms/std-notification.orb +418 -0
  27. package/dist/behaviors/exports/atoms/std-overworld.orb +483 -0
  28. package/dist/behaviors/exports/atoms/std-pagination.orb +331 -0
  29. package/dist/behaviors/exports/atoms/std-physics2d.orb +419 -0
  30. package/dist/behaviors/exports/atoms/std-platformer-canvas.orb +257 -0
  31. package/dist/behaviors/exports/atoms/std-quest.orb +980 -0
  32. package/dist/behaviors/exports/atoms/std-rate-limiter.orb +638 -0
  33. package/dist/behaviors/exports/atoms/std-score-board.orb +238 -0
  34. package/dist/behaviors/exports/atoms/std-score.orb +466 -0
  35. package/dist/behaviors/exports/atoms/std-search.orb +373 -0
  36. package/dist/behaviors/exports/atoms/std-selection.orb +759 -0
  37. package/dist/behaviors/exports/atoms/std-simulation-canvas.orb +183 -0
  38. package/dist/behaviors/exports/atoms/std-sort.orb +578 -0
  39. package/dist/behaviors/exports/atoms/std-sprite.orb +156 -0
  40. package/dist/behaviors/exports/atoms/std-tabs.orb +274 -0
  41. package/dist/behaviors/exports/atoms/std-timer.orb +1030 -0
  42. package/dist/behaviors/exports/atoms/std-undo.orb +694 -0
  43. package/dist/behaviors/exports/atoms/std-wizard.orb +666 -0
  44. package/dist/behaviors/exports/molecules/std-builder-game.orb +183 -0
  45. package/dist/behaviors/exports/molecules/std-cart.orb +591 -0
  46. package/dist/behaviors/exports/molecules/std-classifier-game.orb +183 -0
  47. package/dist/behaviors/exports/molecules/std-debugger-game.orb +183 -0
  48. package/dist/behaviors/exports/molecules/std-detail.orb +589 -0
  49. package/dist/behaviors/exports/molecules/std-event-handler-game.orb +183 -0
  50. package/dist/behaviors/exports/molecules/std-geospatial.orb +649 -0
  51. package/dist/behaviors/exports/molecules/std-inventory.orb +853 -0
  52. package/dist/behaviors/exports/molecules/std-list.orb +954 -0
  53. package/dist/behaviors/exports/molecules/std-messaging.orb +585 -0
  54. package/dist/behaviors/exports/molecules/std-negotiator-game.orb +183 -0
  55. package/dist/behaviors/exports/molecules/std-platformer-game.orb +496 -0
  56. package/dist/behaviors/exports/molecules/std-puzzle-game.orb +527 -0
  57. package/dist/behaviors/exports/molecules/std-sequencer-game.orb +183 -0
  58. package/dist/behaviors/exports/molecules/std-simulator-game.orb +183 -0
  59. package/dist/behaviors/exports/molecules/std-turn-based-battle.orb +443 -0
  60. package/dist/behaviors/exports/organisms/std-api-gateway.orb +2296 -0
  61. package/dist/behaviors/exports/organisms/std-arcade-game.orb +833 -0
  62. package/dist/behaviors/exports/organisms/std-booking-system.orb +3977 -0
  63. package/dist/behaviors/exports/organisms/std-cicd-pipeline.orb +2214 -0
  64. package/dist/behaviors/exports/organisms/std-cms.orb +2644 -0
  65. package/dist/behaviors/exports/organisms/std-coding-academy.orb +1394 -0
  66. package/dist/behaviors/exports/organisms/std-crm.orb +3541 -0
  67. package/dist/behaviors/exports/organisms/std-devops-dashboard.orb +3134 -0
  68. package/dist/behaviors/exports/organisms/std-ecommerce.orb +3743 -0
  69. package/dist/behaviors/exports/organisms/std-finance-tracker.orb +2385 -0
  70. package/dist/behaviors/exports/organisms/std-healthcare.orb +4679 -0
  71. package/dist/behaviors/exports/organisms/std-helpdesk.orb +2564 -0
  72. package/dist/behaviors/exports/organisms/std-hr-portal.orb +4029 -0
  73. package/dist/behaviors/exports/organisms/std-iot-dashboard.orb +2297 -0
  74. package/dist/behaviors/exports/organisms/std-lms.orb +2854 -0
  75. package/dist/behaviors/exports/organisms/std-logic-training.orb +598 -0
  76. package/dist/behaviors/exports/organisms/std-platformer-app.orb +1569 -0
  77. package/dist/behaviors/exports/organisms/std-project-manager.orb +3021 -0
  78. package/dist/behaviors/exports/organisms/std-puzzle-app.orb +743 -0
  79. package/dist/behaviors/exports/organisms/std-realtime-chat.orb +2380 -0
  80. package/dist/behaviors/exports/organisms/std-rpg-game.orb +2804 -0
  81. package/dist/behaviors/exports/organisms/std-social-feed.orb +1221 -0
  82. package/dist/behaviors/exports/organisms/std-stem-lab.orb +1210 -0
  83. package/dist/behaviors/exports/organisms/std-strategy-game.orb +1761 -0
  84. package/dist/behaviors/exports/organisms/std-trading-dashboard.orb +2217 -0
  85. package/dist/behaviors/exports-reader.d.ts +2 -0
  86. package/dist/behaviors/exports-reader.js +5 -3
  87. package/dist/behaviors/exports-reader.js.map +1 -1
  88. package/dist/behaviors/index.js +5 -3
  89. package/dist/behaviors/index.js.map +1 -1
  90. package/dist/exports/atoms/std-async.orb +420 -0
  91. package/dist/exports/atoms/std-browse.orb +173 -0
  92. package/dist/exports/atoms/std-cache-aside.orb +881 -0
  93. package/dist/exports/atoms/std-circuit-breaker.orb +501 -0
  94. package/dist/exports/atoms/std-collision.orb +616 -0
  95. package/dist/exports/atoms/std-combat-log.orb +145 -0
  96. package/dist/exports/atoms/std-combat.orb +410 -0
  97. package/dist/exports/atoms/std-confirmation.orb +282 -0
  98. package/dist/exports/atoms/std-dialogue-box.orb +238 -0
  99. package/dist/exports/atoms/std-display.orb +842 -0
  100. package/dist/exports/atoms/std-drawer.orb +316 -0
  101. package/dist/exports/atoms/std-filter.orb +442 -0
  102. package/dist/exports/atoms/std-game-audio.orb +113 -0
  103. package/dist/exports/atoms/std-game-canvas-2d.orb +135 -0
  104. package/dist/exports/atoms/std-game-canvas-3d.orb +224 -0
  105. package/dist/exports/atoms/std-game-hud.orb +151 -0
  106. package/dist/exports/atoms/std-game-menu.orb +211 -0
  107. package/dist/exports/atoms/std-game-over-screen.orb +195 -0
  108. package/dist/exports/atoms/std-gameflow.orb +318 -0
  109. package/dist/exports/atoms/std-input.orb +629 -0
  110. package/dist/exports/atoms/std-inventory-panel.orb +255 -0
  111. package/dist/exports/atoms/std-isometric-canvas.orb +631 -0
  112. package/dist/exports/atoms/std-loading.orb +511 -0
  113. package/dist/exports/atoms/std-modal.orb +270 -0
  114. package/dist/exports/atoms/std-movement.orb +1037 -0
  115. package/dist/exports/atoms/std-notification.orb +418 -0
  116. package/dist/exports/atoms/std-overworld.orb +483 -0
  117. package/dist/exports/atoms/std-pagination.orb +331 -0
  118. package/dist/exports/atoms/std-physics2d.orb +419 -0
  119. package/dist/exports/atoms/std-platformer-canvas.orb +257 -0
  120. package/dist/exports/atoms/std-quest.orb +980 -0
  121. package/dist/exports/atoms/std-rate-limiter.orb +638 -0
  122. package/dist/exports/atoms/std-score-board.orb +238 -0
  123. package/dist/exports/atoms/std-score.orb +466 -0
  124. package/dist/exports/atoms/std-search.orb +373 -0
  125. package/dist/exports/atoms/std-selection.orb +759 -0
  126. package/dist/exports/atoms/std-simulation-canvas.orb +183 -0
  127. package/dist/exports/atoms/std-sort.orb +578 -0
  128. package/dist/exports/atoms/std-sprite.orb +156 -0
  129. package/dist/exports/atoms/std-tabs.orb +274 -0
  130. package/dist/exports/atoms/std-timer.orb +1030 -0
  131. package/dist/exports/atoms/std-undo.orb +694 -0
  132. package/dist/exports/atoms/std-wizard.orb +666 -0
  133. package/dist/exports/molecules/std-builder-game.orb +183 -0
  134. package/dist/exports/molecules/std-cart.orb +591 -0
  135. package/dist/exports/molecules/std-classifier-game.orb +183 -0
  136. package/dist/exports/molecules/std-debugger-game.orb +183 -0
  137. package/dist/exports/molecules/std-detail.orb +589 -0
  138. package/dist/exports/molecules/std-event-handler-game.orb +183 -0
  139. package/dist/exports/molecules/std-geospatial.orb +649 -0
  140. package/dist/exports/molecules/std-inventory.orb +853 -0
  141. package/dist/exports/molecules/std-list.orb +954 -0
  142. package/dist/exports/molecules/std-messaging.orb +585 -0
  143. package/dist/exports/molecules/std-negotiator-game.orb +183 -0
  144. package/dist/exports/molecules/std-platformer-game.orb +496 -0
  145. package/dist/exports/molecules/std-puzzle-game.orb +527 -0
  146. package/dist/exports/molecules/std-sequencer-game.orb +183 -0
  147. package/dist/exports/molecules/std-simulator-game.orb +183 -0
  148. package/dist/exports/molecules/std-turn-based-battle.orb +443 -0
  149. package/dist/exports/organisms/std-api-gateway.orb +2296 -0
  150. package/dist/exports/organisms/std-arcade-game.orb +833 -0
  151. package/dist/exports/organisms/std-booking-system.orb +3977 -0
  152. package/dist/exports/organisms/std-cicd-pipeline.orb +2214 -0
  153. package/dist/exports/organisms/std-cms.orb +2644 -0
  154. package/dist/exports/organisms/std-coding-academy.orb +1394 -0
  155. package/dist/exports/organisms/std-crm.orb +3541 -0
  156. package/dist/exports/organisms/std-devops-dashboard.orb +3134 -0
  157. package/dist/exports/organisms/std-ecommerce.orb +3743 -0
  158. package/dist/exports/organisms/std-finance-tracker.orb +2385 -0
  159. package/dist/exports/organisms/std-healthcare.orb +4679 -0
  160. package/dist/exports/organisms/std-helpdesk.orb +2564 -0
  161. package/dist/exports/organisms/std-hr-portal.orb +4029 -0
  162. package/dist/exports/organisms/std-iot-dashboard.orb +2297 -0
  163. package/dist/exports/organisms/std-lms.orb +2854 -0
  164. package/dist/exports/organisms/std-logic-training.orb +598 -0
  165. package/dist/exports/organisms/std-platformer-app.orb +1569 -0
  166. package/dist/exports/organisms/std-project-manager.orb +3021 -0
  167. package/dist/exports/organisms/std-puzzle-app.orb +743 -0
  168. package/dist/exports/organisms/std-realtime-chat.orb +2380 -0
  169. package/dist/exports/organisms/std-rpg-game.orb +2804 -0
  170. package/dist/exports/organisms/std-social-feed.orb +1221 -0
  171. package/dist/exports/organisms/std-stem-lab.orb +1210 -0
  172. package/dist/exports/organisms/std-strategy-game.orb +1761 -0
  173. package/dist/exports/organisms/std-trading-dashboard.orb +2217 -0
  174. package/dist/index.js +5 -3
  175. package/dist/index.js.map +1 -1
  176. package/package.json +1 -1
@@ -0,0 +1,2804 @@
1
+ {
2
+ "name": "RPG Game",
3
+ "version": "1.0.0",
4
+ "orbitals": [
5
+ {
6
+ "name": "BattleStateOrbital",
7
+ "entity": {
8
+ "name": "BattleState",
9
+ "persistence": "runtime",
10
+ "fields": [
11
+ {
12
+ "name": "id",
13
+ "type": "string",
14
+ "required": true
15
+ },
16
+ {
17
+ "name": "turn",
18
+ "type": "number",
19
+ "default": 0
20
+ },
21
+ {
22
+ "name": "score",
23
+ "type": "number",
24
+ "default": 0
25
+ },
26
+ {
27
+ "name": "phase",
28
+ "type": "string",
29
+ "default": "setup"
30
+ },
31
+ {
32
+ "name": "outcome",
33
+ "type": "string"
34
+ }
35
+ ]
36
+ },
37
+ "traits": [
38
+ {
39
+ "name": "BattleStateBattleFlow",
40
+ "linkedEntity": "BattleState",
41
+ "category": "interaction",
42
+ "stateMachine": {
43
+ "states": [
44
+ {
45
+ "name": "menu",
46
+ "isInitial": true
47
+ },
48
+ {
49
+ "name": "playing"
50
+ },
51
+ {
52
+ "name": "paused"
53
+ },
54
+ {
55
+ "name": "gameover"
56
+ }
57
+ ],
58
+ "events": [
59
+ {
60
+ "key": "INIT",
61
+ "name": "Initialize"
62
+ },
63
+ {
64
+ "key": "START",
65
+ "name": "Start Battle"
66
+ },
67
+ {
68
+ "key": "END_TURN",
69
+ "name": "End Turn"
70
+ },
71
+ {
72
+ "key": "PAUSE",
73
+ "name": "Pause"
74
+ },
75
+ {
76
+ "key": "RESUME",
77
+ "name": "Resume"
78
+ },
79
+ {
80
+ "key": "GAME_OVER",
81
+ "name": "Game Over"
82
+ },
83
+ {
84
+ "key": "RESTART",
85
+ "name": "Restart"
86
+ },
87
+ {
88
+ "key": "CLOSE",
89
+ "name": "Close"
90
+ },
91
+ {
92
+ "key": "NAVIGATE",
93
+ "name": "Navigate"
94
+ }
95
+ ],
96
+ "transitions": [
97
+ {
98
+ "from": "menu",
99
+ "to": "menu",
100
+ "event": "INIT",
101
+ "effects": [
102
+ [
103
+ "fetch",
104
+ "BattleState"
105
+ ],
106
+ [
107
+ "render-ui",
108
+ "main",
109
+ {
110
+ "type": "game-menu",
111
+ "title": "Battle Arena",
112
+ "subtitle": "Turn-Based Strategy",
113
+ "menuItems": [
114
+ {
115
+ "label": "Start Battle",
116
+ "event": "START",
117
+ "variant": "primary"
118
+ }
119
+ ]
120
+ }
121
+ ]
122
+ ]
123
+ },
124
+ {
125
+ "from": "menu",
126
+ "to": "playing",
127
+ "event": "START",
128
+ "effects": [
129
+ [
130
+ "render-ui",
131
+ "main",
132
+ {
133
+ "type": "game-hud",
134
+ "stats": [
135
+ {
136
+ "label": "Turn",
137
+ "value": "@entity.turn"
138
+ },
139
+ {
140
+ "label": "Score",
141
+ "value": "@entity.score"
142
+ }
143
+ ]
144
+ }
145
+ ]
146
+ ]
147
+ },
148
+ {
149
+ "from": "playing",
150
+ "to": "playing",
151
+ "event": "END_TURN",
152
+ "effects": [
153
+ [
154
+ "set",
155
+ "@entity.turn",
156
+ [
157
+ "+",
158
+ "@entity.turn",
159
+ 1
160
+ ]
161
+ ],
162
+ [
163
+ "render-ui",
164
+ "main",
165
+ {
166
+ "type": "game-hud",
167
+ "stats": [
168
+ {
169
+ "label": "Turn",
170
+ "value": "@entity.turn"
171
+ },
172
+ {
173
+ "label": "Score",
174
+ "value": "@entity.score"
175
+ }
176
+ ]
177
+ }
178
+ ]
179
+ ]
180
+ },
181
+ {
182
+ "from": "menu",
183
+ "to": "menu",
184
+ "event": "NAVIGATE",
185
+ "effects": []
186
+ },
187
+ {
188
+ "from": "paused",
189
+ "to": "paused",
190
+ "event": "NAVIGATE",
191
+ "effects": []
192
+ },
193
+ {
194
+ "from": "playing",
195
+ "to": "paused",
196
+ "event": "PAUSE",
197
+ "effects": [
198
+ [
199
+ "render-ui",
200
+ "modal",
201
+ {
202
+ "type": "game-menu",
203
+ "title": "Paused",
204
+ "menuItems": [
205
+ {
206
+ "label": "Resume",
207
+ "event": "RESUME",
208
+ "variant": "primary"
209
+ },
210
+ {
211
+ "label": "Quit",
212
+ "event": "RESTART",
213
+ "variant": "ghost"
214
+ }
215
+ ]
216
+ }
217
+ ]
218
+ ]
219
+ },
220
+ {
221
+ "from": "paused",
222
+ "to": "playing",
223
+ "event": "RESUME",
224
+ "effects": [
225
+ [
226
+ "render-ui",
227
+ "modal",
228
+ null
229
+ ]
230
+ ]
231
+ },
232
+ {
233
+ "from": "paused",
234
+ "to": "playing",
235
+ "event": "CLOSE",
236
+ "effects": [
237
+ [
238
+ "render-ui",
239
+ "modal",
240
+ null
241
+ ]
242
+ ]
243
+ },
244
+ {
245
+ "from": "playing",
246
+ "to": "gameover",
247
+ "event": "GAME_OVER",
248
+ "effects": [
249
+ [
250
+ "render-ui",
251
+ "main",
252
+ {
253
+ "type": "game-over-screen",
254
+ "title": "Battle Over",
255
+ "stats": [
256
+ {
257
+ "label": "Turns",
258
+ "value": "@entity.turn"
259
+ },
260
+ {
261
+ "label": "Score",
262
+ "value": "@entity.score"
263
+ }
264
+ ],
265
+ "menuItems": [
266
+ {
267
+ "label": "Play Again",
268
+ "event": "RESTART",
269
+ "variant": "primary"
270
+ },
271
+ {
272
+ "label": "Main Menu",
273
+ "event": "RESTART",
274
+ "variant": "secondary"
275
+ }
276
+ ]
277
+ }
278
+ ]
279
+ ]
280
+ },
281
+ {
282
+ "from": "gameover",
283
+ "to": "menu",
284
+ "event": "RESTART",
285
+ "effects": [
286
+ [
287
+ "render-ui",
288
+ "main",
289
+ {
290
+ "type": "game-menu",
291
+ "title": "Battle Arena",
292
+ "subtitle": "Turn-Based Strategy",
293
+ "menuItems": [
294
+ {
295
+ "label": "Start Battle",
296
+ "event": "START",
297
+ "variant": "primary"
298
+ }
299
+ ]
300
+ }
301
+ ]
302
+ ]
303
+ },
304
+ {
305
+ "from": "paused",
306
+ "to": "menu",
307
+ "event": "RESTART",
308
+ "effects": [
309
+ [
310
+ "render-ui",
311
+ "modal",
312
+ null
313
+ ],
314
+ [
315
+ "render-ui",
316
+ "main",
317
+ {
318
+ "type": "game-menu",
319
+ "title": "Battle Arena",
320
+ "subtitle": "Turn-Based Strategy",
321
+ "menuItems": [
322
+ {
323
+ "label": "Start Battle",
324
+ "event": "START",
325
+ "variant": "primary"
326
+ }
327
+ ]
328
+ }
329
+ ]
330
+ ]
331
+ }
332
+ ]
333
+ },
334
+ "listens": [
335
+ {
336
+ "event": "ENCOUNTER_STARTED",
337
+ "triggers": "START",
338
+ "scope": "external"
339
+ }
340
+ ],
341
+ "emits": [
342
+ {
343
+ "event": "LOOT_DROPPED",
344
+ "payload": [
345
+ {
346
+ "name": "itemId",
347
+ "type": "string",
348
+ "required": true
349
+ }
350
+ ],
351
+ "scope": "external"
352
+ }
353
+ ]
354
+ },
355
+ {
356
+ "name": "BattleStateCombatLog",
357
+ "linkedEntity": "BattleState",
358
+ "category": "interaction",
359
+ "stateMachine": {
360
+ "states": [
361
+ {
362
+ "name": "idle",
363
+ "isInitial": true
364
+ }
365
+ ],
366
+ "events": [
367
+ {
368
+ "key": "INIT",
369
+ "name": "Initialize"
370
+ },
371
+ {
372
+ "key": "LOG_EVENT",
373
+ "name": "Log Event",
374
+ "payload": [
375
+ {
376
+ "name": "data",
377
+ "type": "object",
378
+ "required": true
379
+ }
380
+ ]
381
+ },
382
+ {
383
+ "key": "CLEAR",
384
+ "name": "Clear"
385
+ }
386
+ ],
387
+ "transitions": [
388
+ {
389
+ "from": "idle",
390
+ "to": "idle",
391
+ "event": "INIT",
392
+ "effects": [
393
+ [
394
+ "fetch",
395
+ "BattleState"
396
+ ]
397
+ ]
398
+ },
399
+ {
400
+ "from": "idle",
401
+ "to": "idle",
402
+ "event": "LOG_EVENT",
403
+ "effects": [
404
+ [
405
+ "render-ui",
406
+ "main",
407
+ {
408
+ "type": "combat-log",
409
+ "events": "@BattleState",
410
+ "maxVisible": 10,
411
+ "autoScroll": true,
412
+ "showTimestamps": true,
413
+ "title": "Combat Log"
414
+ }
415
+ ]
416
+ ]
417
+ },
418
+ {
419
+ "from": "idle",
420
+ "to": "idle",
421
+ "event": "CLEAR",
422
+ "effects": [
423
+ [
424
+ "render-ui",
425
+ "main",
426
+ {
427
+ "type": "combat-log",
428
+ "events": "@BattleState",
429
+ "maxVisible": 10,
430
+ "autoScroll": true,
431
+ "showTimestamps": true,
432
+ "title": "Combat Log"
433
+ }
434
+ ]
435
+ ]
436
+ }
437
+ ]
438
+ }
439
+ }
440
+ ],
441
+ "pages": [
442
+ {
443
+ "name": "BattlePage",
444
+ "path": "/battle",
445
+ "traits": [
446
+ {
447
+ "ref": "BattleStateBattleFlow"
448
+ },
449
+ {
450
+ "ref": "BattleStateCombatLog"
451
+ }
452
+ ]
453
+ }
454
+ ]
455
+ },
456
+ {
457
+ "name": "WorldZoneOrbital",
458
+ "entity": {
459
+ "name": "WorldZone",
460
+ "persistence": "runtime",
461
+ "fields": [
462
+ {
463
+ "name": "id",
464
+ "type": "string",
465
+ "required": true
466
+ },
467
+ {
468
+ "name": "name",
469
+ "type": "string",
470
+ "required": true
471
+ },
472
+ {
473
+ "name": "description",
474
+ "type": "string"
475
+ },
476
+ {
477
+ "name": "level",
478
+ "type": "number",
479
+ "default": 1
480
+ },
481
+ {
482
+ "name": "explored",
483
+ "type": "boolean",
484
+ "default": false
485
+ }
486
+ ]
487
+ },
488
+ "traits": [
489
+ {
490
+ "name": "WorldZoneNavigation",
491
+ "linkedEntity": "WorldZone",
492
+ "category": "interaction",
493
+ "stateMachine": {
494
+ "states": [
495
+ {
496
+ "name": "exploring",
497
+ "isInitial": true
498
+ },
499
+ {
500
+ "name": "transitioning"
501
+ },
502
+ {
503
+ "name": "entered"
504
+ }
505
+ ],
506
+ "events": [
507
+ {
508
+ "key": "INIT",
509
+ "name": "Initialize"
510
+ },
511
+ {
512
+ "key": "TRAVEL",
513
+ "name": "Travel",
514
+ "payload": [
515
+ {
516
+ "name": "zoneId",
517
+ "type": "string",
518
+ "required": true
519
+ }
520
+ ]
521
+ },
522
+ {
523
+ "key": "ARRIVE",
524
+ "name": "Arrive"
525
+ },
526
+ {
527
+ "key": "BACK",
528
+ "name": "Back"
529
+ }
530
+ ],
531
+ "transitions": [
532
+ {
533
+ "from": "exploring",
534
+ "to": "exploring",
535
+ "event": "INIT",
536
+ "effects": [
537
+ [
538
+ "fetch",
539
+ "WorldZone"
540
+ ],
541
+ [
542
+ "render-ui",
543
+ "main",
544
+ {
545
+ "type": "stack",
546
+ "direction": "vertical",
547
+ "gap": "lg",
548
+ "children": [
549
+ {
550
+ "type": "stack",
551
+ "direction": "horizontal",
552
+ "gap": "md",
553
+ "justify": "space-between",
554
+ "children": [
555
+ {
556
+ "type": "stack",
557
+ "direction": "horizontal",
558
+ "gap": "md",
559
+ "children": [
560
+ {
561
+ "type": "icon",
562
+ "name": "map",
563
+ "size": "lg"
564
+ },
565
+ {
566
+ "type": "typography",
567
+ "content": "World Map",
568
+ "variant": "h2"
569
+ }
570
+ ]
571
+ },
572
+ {
573
+ "type": "badge",
574
+ "label": "Exploring"
575
+ }
576
+ ]
577
+ },
578
+ {
579
+ "type": "divider"
580
+ },
581
+ {
582
+ "type": "data-grid",
583
+ "entity": "WorldZone",
584
+ "emptyIcon": "compass",
585
+ "emptyTitle": "No worldzones discovered",
586
+ "emptyDescription": "Explore to discover new worldzones.",
587
+ "itemActions": [
588
+ {
589
+ "label": "Travel",
590
+ "event": "TRAVEL"
591
+ }
592
+ ],
593
+ "children": [
594
+ {
595
+ "type": "stack",
596
+ "direction": "vertical",
597
+ "gap": "sm",
598
+ "children": [
599
+ {
600
+ "type": "stack",
601
+ "direction": "horizontal",
602
+ "justify": "space-between",
603
+ "align": "center",
604
+ "children": [
605
+ {
606
+ "type": "stack",
607
+ "direction": "horizontal",
608
+ "gap": "sm",
609
+ "align": "center",
610
+ "children": [
611
+ {
612
+ "type": "icon",
613
+ "name": "map-pin",
614
+ "size": "sm"
615
+ },
616
+ {
617
+ "type": "typography",
618
+ "variant": "h4",
619
+ "content": "@entity.name"
620
+ }
621
+ ]
622
+ },
623
+ {
624
+ "type": "badge",
625
+ "label": "@entity.description"
626
+ }
627
+ ]
628
+ },
629
+ {
630
+ "type": "typography",
631
+ "variant": "caption",
632
+ "content": "@entity.level"
633
+ }
634
+ ]
635
+ }
636
+ ]
637
+ }
638
+ ]
639
+ }
640
+ ]
641
+ ]
642
+ },
643
+ {
644
+ "from": "exploring",
645
+ "to": "transitioning",
646
+ "event": "TRAVEL",
647
+ "effects": [
648
+ [
649
+ "render-ui",
650
+ "main",
651
+ {
652
+ "type": "stack",
653
+ "direction": "vertical",
654
+ "gap": "lg",
655
+ "align": "center",
656
+ "children": [
657
+ {
658
+ "type": "stack",
659
+ "direction": "horizontal",
660
+ "gap": "md",
661
+ "children": [
662
+ {
663
+ "type": "icon",
664
+ "name": "loader",
665
+ "size": "lg"
666
+ },
667
+ {
668
+ "type": "typography",
669
+ "content": "Traveling...",
670
+ "variant": "h2"
671
+ }
672
+ ]
673
+ },
674
+ {
675
+ "type": "divider"
676
+ },
677
+ {
678
+ "type": "typography",
679
+ "content": "Traveling to the destination worldzones map.",
680
+ "variant": "body"
681
+ }
682
+ ]
683
+ }
684
+ ]
685
+ ]
686
+ },
687
+ {
688
+ "from": "transitioning",
689
+ "to": "entered",
690
+ "event": "ARRIVE",
691
+ "effects": [
692
+ [
693
+ "fetch",
694
+ "WorldZone"
695
+ ],
696
+ [
697
+ "render-ui",
698
+ "main",
699
+ {
700
+ "type": "stack",
701
+ "direction": "vertical",
702
+ "gap": "lg",
703
+ "children": [
704
+ {
705
+ "type": "stack",
706
+ "direction": "horizontal",
707
+ "gap": "md",
708
+ "justify": "space-between",
709
+ "children": [
710
+ {
711
+ "type": "stack",
712
+ "direction": "horizontal",
713
+ "gap": "md",
714
+ "children": [
715
+ {
716
+ "type": "icon",
717
+ "name": "map",
718
+ "size": "lg"
719
+ },
720
+ {
721
+ "type": "typography",
722
+ "content": "WorldZones Map",
723
+ "variant": "h2"
724
+ }
725
+ ]
726
+ },
727
+ {
728
+ "type": "badge",
729
+ "label": "Entered"
730
+ }
731
+ ]
732
+ },
733
+ {
734
+ "type": "divider"
735
+ },
736
+ {
737
+ "type": "data-grid",
738
+ "entity": "WorldZone",
739
+ "emptyIcon": "inbox",
740
+ "emptyTitle": "Nothing here",
741
+ "emptyDescription": "This zone is empty.",
742
+ "children": [
743
+ {
744
+ "type": "stack",
745
+ "direction": "vertical",
746
+ "gap": "sm",
747
+ "children": [
748
+ {
749
+ "type": "stack",
750
+ "direction": "horizontal",
751
+ "justify": "space-between",
752
+ "align": "center",
753
+ "children": [
754
+ {
755
+ "type": "stack",
756
+ "direction": "horizontal",
757
+ "gap": "sm",
758
+ "align": "center",
759
+ "children": [
760
+ {
761
+ "type": "icon",
762
+ "name": "map-pin",
763
+ "size": "sm"
764
+ },
765
+ {
766
+ "type": "typography",
767
+ "variant": "h4",
768
+ "content": "@entity.name"
769
+ }
770
+ ]
771
+ },
772
+ {
773
+ "type": "badge",
774
+ "label": "@entity.description"
775
+ }
776
+ ]
777
+ },
778
+ {
779
+ "type": "typography",
780
+ "variant": "caption",
781
+ "content": "@entity.level"
782
+ }
783
+ ]
784
+ }
785
+ ]
786
+ },
787
+ {
788
+ "type": "divider"
789
+ },
790
+ {
791
+ "type": "stack",
792
+ "direction": "horizontal",
793
+ "gap": "sm",
794
+ "justify": "end",
795
+ "children": [
796
+ {
797
+ "type": "button",
798
+ "label": "Back to Map",
799
+ "event": "BACK",
800
+ "variant": "ghost",
801
+ "icon": "arrow-left"
802
+ }
803
+ ]
804
+ }
805
+ ]
806
+ }
807
+ ]
808
+ ]
809
+ },
810
+ {
811
+ "from": "entered",
812
+ "to": "exploring",
813
+ "event": "BACK",
814
+ "effects": [
815
+ [
816
+ "fetch",
817
+ "WorldZone"
818
+ ],
819
+ [
820
+ "render-ui",
821
+ "main",
822
+ {
823
+ "type": "stack",
824
+ "direction": "vertical",
825
+ "gap": "lg",
826
+ "children": [
827
+ {
828
+ "type": "stack",
829
+ "direction": "horizontal",
830
+ "gap": "md",
831
+ "justify": "space-between",
832
+ "children": [
833
+ {
834
+ "type": "stack",
835
+ "direction": "horizontal",
836
+ "gap": "md",
837
+ "children": [
838
+ {
839
+ "type": "icon",
840
+ "name": "map",
841
+ "size": "lg"
842
+ },
843
+ {
844
+ "type": "typography",
845
+ "content": "World Map",
846
+ "variant": "h2"
847
+ }
848
+ ]
849
+ },
850
+ {
851
+ "type": "badge",
852
+ "label": "Exploring"
853
+ }
854
+ ]
855
+ },
856
+ {
857
+ "type": "divider"
858
+ },
859
+ {
860
+ "type": "data-grid",
861
+ "entity": "WorldZone",
862
+ "emptyIcon": "compass",
863
+ "emptyTitle": "No worldzones discovered",
864
+ "emptyDescription": "Explore to discover new worldzones.",
865
+ "itemActions": [
866
+ {
867
+ "label": "Travel",
868
+ "event": "TRAVEL"
869
+ }
870
+ ],
871
+ "children": [
872
+ {
873
+ "type": "stack",
874
+ "direction": "vertical",
875
+ "gap": "sm",
876
+ "children": [
877
+ {
878
+ "type": "stack",
879
+ "direction": "horizontal",
880
+ "justify": "space-between",
881
+ "align": "center",
882
+ "children": [
883
+ {
884
+ "type": "stack",
885
+ "direction": "horizontal",
886
+ "gap": "sm",
887
+ "align": "center",
888
+ "children": [
889
+ {
890
+ "type": "icon",
891
+ "name": "map-pin",
892
+ "size": "sm"
893
+ },
894
+ {
895
+ "type": "typography",
896
+ "variant": "h4",
897
+ "content": "@entity.name"
898
+ }
899
+ ]
900
+ },
901
+ {
902
+ "type": "badge",
903
+ "label": "@entity.description"
904
+ }
905
+ ]
906
+ },
907
+ {
908
+ "type": "typography",
909
+ "variant": "caption",
910
+ "content": "@entity.level"
911
+ }
912
+ ]
913
+ }
914
+ ]
915
+ }
916
+ ]
917
+ }
918
+ ]
919
+ ]
920
+ }
921
+ ]
922
+ },
923
+ "emits": [
924
+ {
925
+ "event": "ENCOUNTER_STARTED",
926
+ "payload": [
927
+ {
928
+ "name": "zoneId",
929
+ "type": "string",
930
+ "required": true
931
+ }
932
+ ],
933
+ "scope": "external"
934
+ },
935
+ {
936
+ "event": "QUEST_ACCEPTED",
937
+ "payload": [
938
+ {
939
+ "name": "questId",
940
+ "type": "string",
941
+ "required": true
942
+ }
943
+ ],
944
+ "scope": "external"
945
+ }
946
+ ]
947
+ }
948
+ ],
949
+ "pages": [
950
+ {
951
+ "name": "WorldPage",
952
+ "path": "/world",
953
+ "isInitial": true,
954
+ "traits": [
955
+ {
956
+ "ref": "WorldZoneNavigation"
957
+ }
958
+ ]
959
+ }
960
+ ]
961
+ },
962
+ {
963
+ "name": "RpgItemOrbital",
964
+ "entity": {
965
+ "name": "RpgItem",
966
+ "persistence": "runtime",
967
+ "fields": [
968
+ {
969
+ "name": "id",
970
+ "type": "string",
971
+ "required": true
972
+ },
973
+ {
974
+ "name": "name",
975
+ "type": "string",
976
+ "required": true
977
+ },
978
+ {
979
+ "name": "type",
980
+ "type": "string",
981
+ "required": true
982
+ },
983
+ {
984
+ "name": "quantity",
985
+ "type": "number",
986
+ "default": 1
987
+ },
988
+ {
989
+ "name": "rarity",
990
+ "type": "string",
991
+ "default": "common"
992
+ },
993
+ {
994
+ "name": "pendingId",
995
+ "type": "string",
996
+ "default": ""
997
+ }
998
+ ]
999
+ },
1000
+ "traits": [
1001
+ {
1002
+ "name": "RpgItemBrowse",
1003
+ "linkedEntity": "RpgItem",
1004
+ "category": "interaction",
1005
+ "listens": [
1006
+ {
1007
+ "event": "ITEM_ADDED",
1008
+ "triggers": "ITEM_ADDED"
1009
+ },
1010
+ {
1011
+ "event": "ITEM_USED",
1012
+ "triggers": "ITEM_USED"
1013
+ },
1014
+ {
1015
+ "event": "CONFIRM_DROP",
1016
+ "triggers": "CONFIRM_DROP"
1017
+ },
1018
+ {
1019
+ "event": "LOOT_DROPPED",
1020
+ "triggers": "INIT",
1021
+ "scope": "external"
1022
+ }
1023
+ ],
1024
+ "stateMachine": {
1025
+ "states": [
1026
+ {
1027
+ "name": "browsing",
1028
+ "isInitial": true
1029
+ }
1030
+ ],
1031
+ "events": [
1032
+ {
1033
+ "key": "INIT",
1034
+ "name": "Initialize"
1035
+ },
1036
+ {
1037
+ "key": "ADD_ITEM",
1038
+ "name": "ADD_ITEM"
1039
+ },
1040
+ {
1041
+ "key": "USE_ITEM",
1042
+ "name": "USE_ITEM",
1043
+ "payload": [
1044
+ {
1045
+ "name": "id",
1046
+ "type": "string",
1047
+ "required": true
1048
+ }
1049
+ ]
1050
+ },
1051
+ {
1052
+ "key": "DROP",
1053
+ "name": "DROP",
1054
+ "payload": [
1055
+ {
1056
+ "name": "id",
1057
+ "type": "string",
1058
+ "required": true
1059
+ }
1060
+ ]
1061
+ },
1062
+ {
1063
+ "key": "ITEM_ADDED",
1064
+ "name": "ITEM_ADDED",
1065
+ "payload": [
1066
+ {
1067
+ "name": "data",
1068
+ "type": "object",
1069
+ "required": true
1070
+ }
1071
+ ]
1072
+ },
1073
+ {
1074
+ "key": "ITEM_USED",
1075
+ "name": "ITEM_USED",
1076
+ "payload": [
1077
+ {
1078
+ "name": "data",
1079
+ "type": "object",
1080
+ "required": true
1081
+ }
1082
+ ]
1083
+ },
1084
+ {
1085
+ "key": "CONFIRM_DROP",
1086
+ "name": "CONFIRM_DROP",
1087
+ "payload": [
1088
+ {
1089
+ "name": "data",
1090
+ "type": "object",
1091
+ "required": true
1092
+ }
1093
+ ]
1094
+ }
1095
+ ],
1096
+ "transitions": [
1097
+ {
1098
+ "from": "browsing",
1099
+ "to": "browsing",
1100
+ "event": "INIT",
1101
+ "effects": [
1102
+ [
1103
+ "fetch",
1104
+ "RpgItem"
1105
+ ],
1106
+ [
1107
+ "render-ui",
1108
+ "main",
1109
+ {
1110
+ "type": "stack",
1111
+ "direction": "vertical",
1112
+ "gap": "lg",
1113
+ "children": [
1114
+ {
1115
+ "type": "stack",
1116
+ "direction": "horizontal",
1117
+ "gap": "md",
1118
+ "justify": "space-between",
1119
+ "children": [
1120
+ {
1121
+ "type": "stack",
1122
+ "direction": "horizontal",
1123
+ "gap": "sm",
1124
+ "align": "center",
1125
+ "children": [
1126
+ {
1127
+ "type": "icon",
1128
+ "name": "briefcase",
1129
+ "size": "lg"
1130
+ },
1131
+ {
1132
+ "type": "typography",
1133
+ "content": "Inventory",
1134
+ "variant": "h2"
1135
+ }
1136
+ ]
1137
+ },
1138
+ {
1139
+ "type": "stack",
1140
+ "direction": "horizontal",
1141
+ "gap": "sm",
1142
+ "children": [
1143
+ {
1144
+ "type": "button",
1145
+ "label": "Add RpgItem",
1146
+ "event": "ADD_ITEM",
1147
+ "variant": "primary",
1148
+ "icon": "plus"
1149
+ }
1150
+ ]
1151
+ }
1152
+ ]
1153
+ },
1154
+ {
1155
+ "type": "divider"
1156
+ },
1157
+ {
1158
+ "type": "data-grid",
1159
+ "entity": "RpgItem",
1160
+ "emptyIcon": "inbox",
1161
+ "emptyTitle": "No items yet",
1162
+ "emptyDescription": "Add your first item to get started.",
1163
+ "itemActions": [
1164
+ {
1165
+ "label": "Use",
1166
+ "event": "USE_ITEM"
1167
+ },
1168
+ {
1169
+ "label": "Drop",
1170
+ "event": "DROP",
1171
+ "variant": "danger"
1172
+ }
1173
+ ],
1174
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
1175
+ "children": [
1176
+ {
1177
+ "type": "stack",
1178
+ "direction": "vertical",
1179
+ "gap": "sm",
1180
+ "children": [
1181
+ {
1182
+ "type": "stack",
1183
+ "direction": "horizontal",
1184
+ "justify": "space-between",
1185
+ "align": "center",
1186
+ "children": [
1187
+ {
1188
+ "type": "stack",
1189
+ "direction": "horizontal",
1190
+ "gap": "sm",
1191
+ "align": "center",
1192
+ "children": [
1193
+ {
1194
+ "type": "icon",
1195
+ "name": "briefcase",
1196
+ "size": "sm"
1197
+ },
1198
+ {
1199
+ "type": "typography",
1200
+ "variant": "h4",
1201
+ "content": "@entity.name"
1202
+ }
1203
+ ]
1204
+ },
1205
+ {
1206
+ "type": "badge",
1207
+ "label": "@entity.type"
1208
+ }
1209
+ ]
1210
+ },
1211
+ {
1212
+ "type": "typography",
1213
+ "variant": "caption",
1214
+ "color": "muted",
1215
+ "content": "@entity.quantity"
1216
+ }
1217
+ ]
1218
+ }
1219
+ ]
1220
+ }
1221
+ ]
1222
+ }
1223
+ ]
1224
+ ]
1225
+ },
1226
+ {
1227
+ "from": "browsing",
1228
+ "to": "browsing",
1229
+ "event": "ITEM_ADDED",
1230
+ "effects": [
1231
+ [
1232
+ "fetch",
1233
+ "RpgItem"
1234
+ ]
1235
+ ]
1236
+ },
1237
+ {
1238
+ "from": "browsing",
1239
+ "to": "browsing",
1240
+ "event": "ITEM_USED",
1241
+ "effects": [
1242
+ [
1243
+ "fetch",
1244
+ "RpgItem"
1245
+ ]
1246
+ ]
1247
+ },
1248
+ {
1249
+ "from": "browsing",
1250
+ "to": "browsing",
1251
+ "event": "CONFIRM_DROP",
1252
+ "effects": [
1253
+ [
1254
+ "fetch",
1255
+ "RpgItem"
1256
+ ]
1257
+ ]
1258
+ }
1259
+ ]
1260
+ }
1261
+ },
1262
+ {
1263
+ "name": "RpgItemAdd",
1264
+ "linkedEntity": "RpgItem",
1265
+ "category": "interaction",
1266
+ "emits": [
1267
+ {
1268
+ "event": "ITEM_ADDED"
1269
+ }
1270
+ ],
1271
+ "stateMachine": {
1272
+ "states": [
1273
+ {
1274
+ "name": "closed",
1275
+ "isInitial": true
1276
+ },
1277
+ {
1278
+ "name": "open"
1279
+ }
1280
+ ],
1281
+ "events": [
1282
+ {
1283
+ "key": "INIT",
1284
+ "name": "Initialize"
1285
+ },
1286
+ {
1287
+ "key": "ADD_ITEM",
1288
+ "name": "Open"
1289
+ },
1290
+ {
1291
+ "key": "CLOSE",
1292
+ "name": "Close"
1293
+ },
1294
+ {
1295
+ "key": "SAVE",
1296
+ "name": "Save",
1297
+ "payload": [
1298
+ {
1299
+ "name": "data",
1300
+ "type": "object",
1301
+ "required": true
1302
+ }
1303
+ ]
1304
+ }
1305
+ ],
1306
+ "transitions": [
1307
+ {
1308
+ "from": "closed",
1309
+ "to": "closed",
1310
+ "event": "INIT",
1311
+ "effects": [
1312
+ [
1313
+ "fetch",
1314
+ "RpgItem"
1315
+ ]
1316
+ ]
1317
+ },
1318
+ {
1319
+ "from": "closed",
1320
+ "to": "open",
1321
+ "event": "ADD_ITEM",
1322
+ "effects": [
1323
+ [
1324
+ "fetch",
1325
+ "RpgItem"
1326
+ ],
1327
+ [
1328
+ "render-ui",
1329
+ "modal",
1330
+ {
1331
+ "type": "stack",
1332
+ "direction": "vertical",
1333
+ "gap": "md",
1334
+ "children": [
1335
+ {
1336
+ "type": "stack",
1337
+ "direction": "horizontal",
1338
+ "gap": "sm",
1339
+ "children": [
1340
+ {
1341
+ "type": "icon",
1342
+ "name": "plus-circle",
1343
+ "size": "md"
1344
+ },
1345
+ {
1346
+ "type": "typography",
1347
+ "content": "Add RpgItem",
1348
+ "variant": "h3"
1349
+ }
1350
+ ]
1351
+ },
1352
+ {
1353
+ "type": "divider"
1354
+ },
1355
+ {
1356
+ "type": "form-section",
1357
+ "entity": "RpgItem",
1358
+ "mode": "create",
1359
+ "submitEvent": "SAVE",
1360
+ "cancelEvent": "CLOSE",
1361
+ "fields": [
1362
+ "name",
1363
+ "type",
1364
+ "quantity",
1365
+ "rarity",
1366
+ "pendingId"
1367
+ ]
1368
+ }
1369
+ ]
1370
+ }
1371
+ ]
1372
+ ]
1373
+ },
1374
+ {
1375
+ "from": "open",
1376
+ "to": "closed",
1377
+ "event": "CLOSE",
1378
+ "effects": [
1379
+ [
1380
+ "render-ui",
1381
+ "modal",
1382
+ null
1383
+ ]
1384
+ ]
1385
+ },
1386
+ {
1387
+ "from": "open",
1388
+ "to": "closed",
1389
+ "event": "SAVE",
1390
+ "effects": [
1391
+ [
1392
+ "persist",
1393
+ "create",
1394
+ "RpgItem",
1395
+ "@payload.data"
1396
+ ],
1397
+ [
1398
+ "fetch",
1399
+ "RpgItem"
1400
+ ],
1401
+ [
1402
+ "render-ui",
1403
+ "modal",
1404
+ null
1405
+ ],
1406
+ [
1407
+ "emit",
1408
+ "ITEM_ADDED"
1409
+ ],
1410
+ [
1411
+ "notify",
1412
+ "RpgItem created successfully"
1413
+ ]
1414
+ ]
1415
+ }
1416
+ ]
1417
+ }
1418
+ },
1419
+ {
1420
+ "name": "RpgItemUse",
1421
+ "linkedEntity": "RpgItem",
1422
+ "category": "interaction",
1423
+ "emits": [
1424
+ {
1425
+ "event": "ITEM_USED"
1426
+ }
1427
+ ],
1428
+ "stateMachine": {
1429
+ "states": [
1430
+ {
1431
+ "name": "closed",
1432
+ "isInitial": true
1433
+ },
1434
+ {
1435
+ "name": "open"
1436
+ }
1437
+ ],
1438
+ "events": [
1439
+ {
1440
+ "key": "INIT",
1441
+ "name": "Initialize"
1442
+ },
1443
+ {
1444
+ "key": "USE_ITEM",
1445
+ "name": "Open",
1446
+ "payload": [
1447
+ {
1448
+ "name": "id",
1449
+ "type": "string",
1450
+ "required": true
1451
+ }
1452
+ ]
1453
+ },
1454
+ {
1455
+ "key": "CLOSE",
1456
+ "name": "Close"
1457
+ },
1458
+ {
1459
+ "key": "SAVE",
1460
+ "name": "Save",
1461
+ "payload": [
1462
+ {
1463
+ "name": "data",
1464
+ "type": "object",
1465
+ "required": true
1466
+ }
1467
+ ]
1468
+ }
1469
+ ],
1470
+ "transitions": [
1471
+ {
1472
+ "from": "closed",
1473
+ "to": "closed",
1474
+ "event": "INIT",
1475
+ "effects": [
1476
+ [
1477
+ "fetch",
1478
+ "RpgItem"
1479
+ ]
1480
+ ]
1481
+ },
1482
+ {
1483
+ "from": "closed",
1484
+ "to": "open",
1485
+ "event": "USE_ITEM",
1486
+ "effects": [
1487
+ [
1488
+ "fetch",
1489
+ "RpgItem",
1490
+ "@payload.id"
1491
+ ],
1492
+ [
1493
+ "render-ui",
1494
+ "modal",
1495
+ {
1496
+ "type": "stack",
1497
+ "direction": "vertical",
1498
+ "gap": "md",
1499
+ "align": "center",
1500
+ "children": [
1501
+ {
1502
+ "type": "stack",
1503
+ "direction": "horizontal",
1504
+ "gap": "sm",
1505
+ "align": "center",
1506
+ "children": [
1507
+ {
1508
+ "type": "icon",
1509
+ "name": "zap",
1510
+ "size": "md"
1511
+ },
1512
+ {
1513
+ "type": "typography",
1514
+ "content": "Use RpgItem",
1515
+ "variant": "h3"
1516
+ }
1517
+ ]
1518
+ },
1519
+ {
1520
+ "type": "divider"
1521
+ },
1522
+ {
1523
+ "type": "typography",
1524
+ "content": "@entity.name",
1525
+ "variant": "body"
1526
+ },
1527
+ {
1528
+ "type": "stack",
1529
+ "direction": "horizontal",
1530
+ "gap": "sm",
1531
+ "justify": "center",
1532
+ "children": [
1533
+ {
1534
+ "type": "button",
1535
+ "label": "Cancel",
1536
+ "event": "CLOSE",
1537
+ "variant": "ghost"
1538
+ },
1539
+ {
1540
+ "type": "button",
1541
+ "label": "Confirm Use",
1542
+ "event": "SAVE",
1543
+ "variant": "primary",
1544
+ "icon": "check"
1545
+ }
1546
+ ]
1547
+ }
1548
+ ]
1549
+ }
1550
+ ]
1551
+ ]
1552
+ },
1553
+ {
1554
+ "from": "open",
1555
+ "to": "closed",
1556
+ "event": "CLOSE",
1557
+ "effects": [
1558
+ [
1559
+ "render-ui",
1560
+ "modal",
1561
+ null
1562
+ ]
1563
+ ]
1564
+ },
1565
+ {
1566
+ "from": "open",
1567
+ "to": "closed",
1568
+ "event": "SAVE",
1569
+ "effects": [
1570
+ [
1571
+ "persist",
1572
+ "update",
1573
+ "RpgItem",
1574
+ "@payload.data"
1575
+ ],
1576
+ [
1577
+ "fetch",
1578
+ "RpgItem"
1579
+ ],
1580
+ [
1581
+ "render-ui",
1582
+ "modal",
1583
+ null
1584
+ ],
1585
+ [
1586
+ "emit",
1587
+ "ITEM_USED"
1588
+ ],
1589
+ [
1590
+ "notify",
1591
+ "RpgItem updated successfully"
1592
+ ]
1593
+ ]
1594
+ }
1595
+ ]
1596
+ }
1597
+ },
1598
+ {
1599
+ "name": "RpgItemDrop",
1600
+ "linkedEntity": "RpgItem",
1601
+ "category": "interaction",
1602
+ "emits": [
1603
+ {
1604
+ "event": "CONFIRM_DROP"
1605
+ }
1606
+ ],
1607
+ "stateMachine": {
1608
+ "states": [
1609
+ {
1610
+ "name": "idle",
1611
+ "isInitial": true
1612
+ },
1613
+ {
1614
+ "name": "confirming"
1615
+ }
1616
+ ],
1617
+ "events": [
1618
+ {
1619
+ "key": "INIT",
1620
+ "name": "Initialize"
1621
+ },
1622
+ {
1623
+ "key": "DROP",
1624
+ "name": "Request Confirmation",
1625
+ "payload": [
1626
+ {
1627
+ "name": "id",
1628
+ "type": "string",
1629
+ "required": true
1630
+ }
1631
+ ]
1632
+ },
1633
+ {
1634
+ "key": "CONFIRM_DROP",
1635
+ "name": "Confirm",
1636
+ "payload": [
1637
+ {
1638
+ "name": "id",
1639
+ "type": "string",
1640
+ "required": true
1641
+ }
1642
+ ]
1643
+ },
1644
+ {
1645
+ "key": "CANCEL",
1646
+ "name": "Cancel"
1647
+ },
1648
+ {
1649
+ "key": "CLOSE",
1650
+ "name": "Close"
1651
+ }
1652
+ ],
1653
+ "transitions": [
1654
+ {
1655
+ "from": "idle",
1656
+ "to": "idle",
1657
+ "event": "INIT",
1658
+ "effects": [
1659
+ [
1660
+ "fetch",
1661
+ "RpgItem"
1662
+ ]
1663
+ ]
1664
+ },
1665
+ {
1666
+ "from": "idle",
1667
+ "to": "confirming",
1668
+ "event": "DROP",
1669
+ "effects": [
1670
+ [
1671
+ "set",
1672
+ "@entity.pendingId",
1673
+ "@payload.id"
1674
+ ],
1675
+ [
1676
+ "fetch",
1677
+ "RpgItem",
1678
+ "@payload.id"
1679
+ ],
1680
+ [
1681
+ "render-ui",
1682
+ "modal",
1683
+ {
1684
+ "type": "stack",
1685
+ "direction": "vertical",
1686
+ "gap": "md",
1687
+ "children": [
1688
+ {
1689
+ "type": "stack",
1690
+ "direction": "horizontal",
1691
+ "gap": "sm",
1692
+ "align": "center",
1693
+ "children": [
1694
+ {
1695
+ "type": "icon",
1696
+ "name": "trash-2",
1697
+ "size": "md"
1698
+ },
1699
+ {
1700
+ "type": "typography",
1701
+ "content": "Drop RpgItem",
1702
+ "variant": "h3"
1703
+ }
1704
+ ]
1705
+ },
1706
+ {
1707
+ "type": "divider"
1708
+ },
1709
+ {
1710
+ "type": "typography",
1711
+ "content": "Are you sure you want to drop this rpgitem?",
1712
+ "variant": "body"
1713
+ },
1714
+ {
1715
+ "type": "stack",
1716
+ "direction": "horizontal",
1717
+ "gap": "sm",
1718
+ "justify": "end",
1719
+ "children": [
1720
+ {
1721
+ "type": "button",
1722
+ "label": "Cancel",
1723
+ "event": "CANCEL",
1724
+ "variant": "ghost"
1725
+ },
1726
+ {
1727
+ "type": "button",
1728
+ "label": "Drop",
1729
+ "event": "CONFIRM_DROP",
1730
+ "variant": "danger",
1731
+ "icon": "check"
1732
+ }
1733
+ ]
1734
+ }
1735
+ ]
1736
+ }
1737
+ ]
1738
+ ]
1739
+ },
1740
+ {
1741
+ "from": "confirming",
1742
+ "to": "idle",
1743
+ "event": "CONFIRM_DROP",
1744
+ "effects": [
1745
+ [
1746
+ "persist",
1747
+ "delete",
1748
+ "RpgItem",
1749
+ "@payload.id"
1750
+ ],
1751
+ [
1752
+ "fetch",
1753
+ "RpgItem"
1754
+ ],
1755
+ [
1756
+ "render-ui",
1757
+ "modal",
1758
+ null
1759
+ ],
1760
+ [
1761
+ "emit",
1762
+ "CONFIRM_DROP"
1763
+ ],
1764
+ [
1765
+ "notify",
1766
+ "RpgItem deleted successfully"
1767
+ ]
1768
+ ]
1769
+ },
1770
+ {
1771
+ "from": "confirming",
1772
+ "to": "idle",
1773
+ "event": "CANCEL",
1774
+ "effects": [
1775
+ [
1776
+ "render-ui",
1777
+ "modal",
1778
+ null
1779
+ ]
1780
+ ]
1781
+ },
1782
+ {
1783
+ "from": "confirming",
1784
+ "to": "idle",
1785
+ "event": "CLOSE",
1786
+ "effects": [
1787
+ [
1788
+ "render-ui",
1789
+ "modal",
1790
+ null
1791
+ ]
1792
+ ]
1793
+ }
1794
+ ]
1795
+ }
1796
+ }
1797
+ ],
1798
+ "pages": [
1799
+ {
1800
+ "name": "InventoryPage",
1801
+ "path": "/inventory",
1802
+ "traits": [
1803
+ {
1804
+ "ref": "RpgItemBrowse"
1805
+ },
1806
+ {
1807
+ "ref": "RpgItemAdd"
1808
+ },
1809
+ {
1810
+ "ref": "RpgItemUse"
1811
+ },
1812
+ {
1813
+ "ref": "RpgItemDrop"
1814
+ }
1815
+ ]
1816
+ }
1817
+ ]
1818
+ },
1819
+ {
1820
+ "name": "MissionOrbital",
1821
+ "entity": {
1822
+ "name": "Mission",
1823
+ "persistence": "runtime",
1824
+ "fields": [
1825
+ {
1826
+ "name": "id",
1827
+ "type": "string",
1828
+ "required": true
1829
+ },
1830
+ {
1831
+ "name": "title",
1832
+ "type": "string",
1833
+ "required": true
1834
+ },
1835
+ {
1836
+ "name": "description",
1837
+ "type": "string"
1838
+ },
1839
+ {
1840
+ "name": "status",
1841
+ "type": "string",
1842
+ "default": "available"
1843
+ },
1844
+ {
1845
+ "name": "reward",
1846
+ "type": "string"
1847
+ }
1848
+ ]
1849
+ },
1850
+ "traits": [
1851
+ {
1852
+ "name": "MissionTracking",
1853
+ "linkedEntity": "Mission",
1854
+ "category": "interaction",
1855
+ "stateMachine": {
1856
+ "states": [
1857
+ {
1858
+ "name": "available",
1859
+ "isInitial": true
1860
+ },
1861
+ {
1862
+ "name": "active"
1863
+ },
1864
+ {
1865
+ "name": "progressing"
1866
+ },
1867
+ {
1868
+ "name": "complete"
1869
+ },
1870
+ {
1871
+ "name": "failed"
1872
+ }
1873
+ ],
1874
+ "events": [
1875
+ {
1876
+ "key": "INIT",
1877
+ "name": "Initialize"
1878
+ },
1879
+ {
1880
+ "key": "ACCEPT",
1881
+ "name": "Accept"
1882
+ },
1883
+ {
1884
+ "key": "PROGRESS",
1885
+ "name": "Progress",
1886
+ "payload": [
1887
+ {
1888
+ "name": "data",
1889
+ "type": "object",
1890
+ "required": true
1891
+ }
1892
+ ]
1893
+ },
1894
+ {
1895
+ "key": "SAVE",
1896
+ "name": "Save",
1897
+ "payload": [
1898
+ {
1899
+ "name": "data",
1900
+ "type": "object",
1901
+ "required": true
1902
+ }
1903
+ ]
1904
+ },
1905
+ {
1906
+ "key": "COMPLETE",
1907
+ "name": "Complete"
1908
+ },
1909
+ {
1910
+ "key": "FAIL",
1911
+ "name": "Fail"
1912
+ },
1913
+ {
1914
+ "key": "RESET",
1915
+ "name": "Reset"
1916
+ },
1917
+ {
1918
+ "key": "CANCEL",
1919
+ "name": "Cancel"
1920
+ },
1921
+ {
1922
+ "key": "CLOSE",
1923
+ "name": "Close"
1924
+ }
1925
+ ],
1926
+ "transitions": [
1927
+ {
1928
+ "from": "available",
1929
+ "to": "available",
1930
+ "event": "INIT",
1931
+ "effects": [
1932
+ [
1933
+ "fetch",
1934
+ "Mission"
1935
+ ],
1936
+ [
1937
+ "render-ui",
1938
+ "main",
1939
+ {
1940
+ "type": "stack",
1941
+ "direction": "vertical",
1942
+ "gap": "lg",
1943
+ "children": [
1944
+ {
1945
+ "type": "stack",
1946
+ "direction": "horizontal",
1947
+ "gap": "md",
1948
+ "justify": "space-between",
1949
+ "children": [
1950
+ {
1951
+ "type": "stack",
1952
+ "direction": "horizontal",
1953
+ "gap": "md",
1954
+ "children": [
1955
+ {
1956
+ "type": "icon",
1957
+ "name": "flag",
1958
+ "size": "lg"
1959
+ },
1960
+ {
1961
+ "type": "typography",
1962
+ "content": "Missions Board",
1963
+ "variant": "h2"
1964
+ }
1965
+ ]
1966
+ }
1967
+ ]
1968
+ },
1969
+ {
1970
+ "type": "divider"
1971
+ },
1972
+ {
1973
+ "type": "data-grid",
1974
+ "entity": "Mission",
1975
+ "emptyIcon": "inbox",
1976
+ "emptyTitle": "No missions available",
1977
+ "emptyDescription": "Check back later for new missions.",
1978
+ "itemActions": [
1979
+ {
1980
+ "label": "Accept",
1981
+ "event": "ACCEPT"
1982
+ }
1983
+ ],
1984
+ "children": [
1985
+ {
1986
+ "type": "stack",
1987
+ "direction": "vertical",
1988
+ "gap": "sm",
1989
+ "children": [
1990
+ {
1991
+ "type": "stack",
1992
+ "direction": "horizontal",
1993
+ "justify": "space-between",
1994
+ "align": "center",
1995
+ "children": [
1996
+ {
1997
+ "type": "stack",
1998
+ "direction": "horizontal",
1999
+ "gap": "sm",
2000
+ "align": "center",
2001
+ "children": [
2002
+ {
2003
+ "type": "icon",
2004
+ "name": "flag",
2005
+ "size": "sm"
2006
+ },
2007
+ {
2008
+ "type": "typography",
2009
+ "variant": "h4",
2010
+ "content": "@entity.title"
2011
+ }
2012
+ ]
2013
+ },
2014
+ {
2015
+ "type": "badge",
2016
+ "label": "@entity.description"
2017
+ }
2018
+ ]
2019
+ },
2020
+ {
2021
+ "type": "typography",
2022
+ "variant": "caption",
2023
+ "content": "@entity.status"
2024
+ }
2025
+ ]
2026
+ }
2027
+ ]
2028
+ }
2029
+ ]
2030
+ }
2031
+ ]
2032
+ ]
2033
+ },
2034
+ {
2035
+ "from": "available",
2036
+ "to": "active",
2037
+ "event": "ACCEPT",
2038
+ "effects": [
2039
+ [
2040
+ "fetch",
2041
+ "Mission"
2042
+ ],
2043
+ [
2044
+ "render-ui",
2045
+ "main",
2046
+ {
2047
+ "type": "stack",
2048
+ "direction": "vertical",
2049
+ "gap": "lg",
2050
+ "children": [
2051
+ {
2052
+ "type": "stack",
2053
+ "direction": "horizontal",
2054
+ "gap": "md",
2055
+ "justify": "space-between",
2056
+ "children": [
2057
+ {
2058
+ "type": "stack",
2059
+ "direction": "horizontal",
2060
+ "gap": "md",
2061
+ "children": [
2062
+ {
2063
+ "type": "icon",
2064
+ "name": "flag",
2065
+ "size": "lg"
2066
+ },
2067
+ {
2068
+ "type": "typography",
2069
+ "content": "Missions Board",
2070
+ "variant": "h2"
2071
+ }
2072
+ ]
2073
+ },
2074
+ {
2075
+ "type": "badge",
2076
+ "label": "Active"
2077
+ }
2078
+ ]
2079
+ },
2080
+ {
2081
+ "type": "divider"
2082
+ },
2083
+ {
2084
+ "type": "data-grid",
2085
+ "entity": "Mission",
2086
+ "emptyIcon": "inbox",
2087
+ "emptyTitle": "No active quests",
2088
+ "emptyDescription": "Accept a quest to begin.",
2089
+ "itemActions": [
2090
+ {
2091
+ "label": "Progress",
2092
+ "event": "PROGRESS"
2093
+ },
2094
+ {
2095
+ "label": "Complete",
2096
+ "event": "COMPLETE"
2097
+ },
2098
+ {
2099
+ "label": "Fail",
2100
+ "event": "FAIL",
2101
+ "variant": "danger"
2102
+ }
2103
+ ],
2104
+ "children": [
2105
+ {
2106
+ "type": "stack",
2107
+ "direction": "vertical",
2108
+ "gap": "sm",
2109
+ "children": [
2110
+ {
2111
+ "type": "stack",
2112
+ "direction": "horizontal",
2113
+ "justify": "space-between",
2114
+ "align": "center",
2115
+ "children": [
2116
+ {
2117
+ "type": "stack",
2118
+ "direction": "horizontal",
2119
+ "gap": "sm",
2120
+ "align": "center",
2121
+ "children": [
2122
+ {
2123
+ "type": "icon",
2124
+ "name": "flag",
2125
+ "size": "sm"
2126
+ },
2127
+ {
2128
+ "type": "typography",
2129
+ "variant": "h4",
2130
+ "content": "@entity.title"
2131
+ }
2132
+ ]
2133
+ },
2134
+ {
2135
+ "type": "badge",
2136
+ "label": "@entity.description"
2137
+ }
2138
+ ]
2139
+ },
2140
+ {
2141
+ "type": "typography",
2142
+ "variant": "caption",
2143
+ "content": "@entity.status"
2144
+ }
2145
+ ]
2146
+ }
2147
+ ]
2148
+ }
2149
+ ]
2150
+ }
2151
+ ]
2152
+ ]
2153
+ },
2154
+ {
2155
+ "from": "active",
2156
+ "to": "active",
2157
+ "event": "INIT",
2158
+ "effects": [
2159
+ [
2160
+ "fetch",
2161
+ "Mission"
2162
+ ],
2163
+ [
2164
+ "render-ui",
2165
+ "main",
2166
+ {
2167
+ "type": "stack",
2168
+ "direction": "vertical",
2169
+ "gap": "lg",
2170
+ "children": [
2171
+ {
2172
+ "type": "stack",
2173
+ "direction": "horizontal",
2174
+ "gap": "md",
2175
+ "justify": "space-between",
2176
+ "children": [
2177
+ {
2178
+ "type": "stack",
2179
+ "direction": "horizontal",
2180
+ "gap": "md",
2181
+ "children": [
2182
+ {
2183
+ "type": "icon",
2184
+ "name": "flag",
2185
+ "size": "lg"
2186
+ },
2187
+ {
2188
+ "type": "typography",
2189
+ "content": "Missions Board",
2190
+ "variant": "h2"
2191
+ }
2192
+ ]
2193
+ },
2194
+ {
2195
+ "type": "badge",
2196
+ "label": "Active"
2197
+ }
2198
+ ]
2199
+ },
2200
+ {
2201
+ "type": "divider"
2202
+ },
2203
+ {
2204
+ "type": "data-grid",
2205
+ "entity": "Mission",
2206
+ "emptyIcon": "inbox",
2207
+ "emptyTitle": "No active quests",
2208
+ "emptyDescription": "Accept a quest to begin.",
2209
+ "itemActions": [
2210
+ {
2211
+ "label": "Progress",
2212
+ "event": "PROGRESS"
2213
+ },
2214
+ {
2215
+ "label": "Complete",
2216
+ "event": "COMPLETE"
2217
+ },
2218
+ {
2219
+ "label": "Fail",
2220
+ "event": "FAIL",
2221
+ "variant": "danger"
2222
+ }
2223
+ ],
2224
+ "children": [
2225
+ {
2226
+ "type": "stack",
2227
+ "direction": "vertical",
2228
+ "gap": "sm",
2229
+ "children": [
2230
+ {
2231
+ "type": "stack",
2232
+ "direction": "horizontal",
2233
+ "justify": "space-between",
2234
+ "align": "center",
2235
+ "children": [
2236
+ {
2237
+ "type": "stack",
2238
+ "direction": "horizontal",
2239
+ "gap": "sm",
2240
+ "align": "center",
2241
+ "children": [
2242
+ {
2243
+ "type": "icon",
2244
+ "name": "flag",
2245
+ "size": "sm"
2246
+ },
2247
+ {
2248
+ "type": "typography",
2249
+ "variant": "h4",
2250
+ "content": "@entity.title"
2251
+ }
2252
+ ]
2253
+ },
2254
+ {
2255
+ "type": "badge",
2256
+ "label": "@entity.description"
2257
+ }
2258
+ ]
2259
+ },
2260
+ {
2261
+ "type": "typography",
2262
+ "variant": "caption",
2263
+ "content": "@entity.status"
2264
+ }
2265
+ ]
2266
+ }
2267
+ ]
2268
+ }
2269
+ ]
2270
+ }
2271
+ ]
2272
+ ]
2273
+ },
2274
+ {
2275
+ "from": "active",
2276
+ "to": "progressing",
2277
+ "event": "PROGRESS",
2278
+ "effects": [
2279
+ [
2280
+ "render-ui",
2281
+ "modal",
2282
+ {
2283
+ "type": "stack",
2284
+ "direction": "vertical",
2285
+ "gap": "md",
2286
+ "children": [
2287
+ {
2288
+ "type": "stack",
2289
+ "direction": "horizontal",
2290
+ "gap": "sm",
2291
+ "children": [
2292
+ {
2293
+ "type": "icon",
2294
+ "name": "trending-up",
2295
+ "size": "md"
2296
+ },
2297
+ {
2298
+ "type": "typography",
2299
+ "content": "Update Progress",
2300
+ "variant": "h3"
2301
+ }
2302
+ ]
2303
+ },
2304
+ {
2305
+ "type": "divider"
2306
+ },
2307
+ {
2308
+ "type": "form-section",
2309
+ "entity": "Mission",
2310
+ "mode": "edit",
2311
+ "submitEvent": "SAVE",
2312
+ "cancelEvent": "CANCEL",
2313
+ "fields": [
2314
+ "title",
2315
+ "description",
2316
+ "status",
2317
+ "reward"
2318
+ ]
2319
+ }
2320
+ ]
2321
+ }
2322
+ ]
2323
+ ]
2324
+ },
2325
+ {
2326
+ "from": "progressing",
2327
+ "to": "active",
2328
+ "event": "SAVE",
2329
+ "effects": [
2330
+ [
2331
+ "persist",
2332
+ "update",
2333
+ "Mission",
2334
+ "@payload.data"
2335
+ ],
2336
+ [
2337
+ "render-ui",
2338
+ "modal",
2339
+ null
2340
+ ],
2341
+ [
2342
+ "fetch",
2343
+ "Mission"
2344
+ ],
2345
+ [
2346
+ "render-ui",
2347
+ "main",
2348
+ {
2349
+ "type": "stack",
2350
+ "direction": "vertical",
2351
+ "gap": "lg",
2352
+ "children": [
2353
+ {
2354
+ "type": "stack",
2355
+ "direction": "horizontal",
2356
+ "gap": "md",
2357
+ "justify": "space-between",
2358
+ "children": [
2359
+ {
2360
+ "type": "stack",
2361
+ "direction": "horizontal",
2362
+ "gap": "md",
2363
+ "children": [
2364
+ {
2365
+ "type": "icon",
2366
+ "name": "flag",
2367
+ "size": "lg"
2368
+ },
2369
+ {
2370
+ "type": "typography",
2371
+ "content": "Missions Board",
2372
+ "variant": "h2"
2373
+ }
2374
+ ]
2375
+ },
2376
+ {
2377
+ "type": "badge",
2378
+ "label": "Active"
2379
+ }
2380
+ ]
2381
+ },
2382
+ {
2383
+ "type": "divider"
2384
+ },
2385
+ {
2386
+ "type": "data-grid",
2387
+ "entity": "Mission",
2388
+ "emptyIcon": "inbox",
2389
+ "emptyTitle": "No active quests",
2390
+ "emptyDescription": "Accept a quest to begin.",
2391
+ "itemActions": [
2392
+ {
2393
+ "label": "Progress",
2394
+ "event": "PROGRESS"
2395
+ },
2396
+ {
2397
+ "label": "Complete",
2398
+ "event": "COMPLETE"
2399
+ },
2400
+ {
2401
+ "label": "Fail",
2402
+ "event": "FAIL",
2403
+ "variant": "danger"
2404
+ }
2405
+ ],
2406
+ "children": [
2407
+ {
2408
+ "type": "stack",
2409
+ "direction": "vertical",
2410
+ "gap": "sm",
2411
+ "children": [
2412
+ {
2413
+ "type": "stack",
2414
+ "direction": "horizontal",
2415
+ "justify": "space-between",
2416
+ "align": "center",
2417
+ "children": [
2418
+ {
2419
+ "type": "stack",
2420
+ "direction": "horizontal",
2421
+ "gap": "sm",
2422
+ "align": "center",
2423
+ "children": [
2424
+ {
2425
+ "type": "icon",
2426
+ "name": "flag",
2427
+ "size": "sm"
2428
+ },
2429
+ {
2430
+ "type": "typography",
2431
+ "variant": "h4",
2432
+ "content": "@entity.title"
2433
+ }
2434
+ ]
2435
+ },
2436
+ {
2437
+ "type": "badge",
2438
+ "label": "@entity.description"
2439
+ }
2440
+ ]
2441
+ },
2442
+ {
2443
+ "type": "typography",
2444
+ "variant": "caption",
2445
+ "content": "@entity.status"
2446
+ }
2447
+ ]
2448
+ }
2449
+ ]
2450
+ }
2451
+ ]
2452
+ }
2453
+ ],
2454
+ [
2455
+ "notify",
2456
+ "Mission updated successfully"
2457
+ ]
2458
+ ]
2459
+ },
2460
+ {
2461
+ "from": "progressing",
2462
+ "to": "active",
2463
+ "event": "CANCEL",
2464
+ "effects": [
2465
+ [
2466
+ "render-ui",
2467
+ "modal",
2468
+ null
2469
+ ]
2470
+ ]
2471
+ },
2472
+ {
2473
+ "from": "progressing",
2474
+ "to": "active",
2475
+ "event": "CLOSE",
2476
+ "effects": [
2477
+ [
2478
+ "render-ui",
2479
+ "modal",
2480
+ null
2481
+ ]
2482
+ ]
2483
+ },
2484
+ {
2485
+ "from": "active",
2486
+ "to": "complete",
2487
+ "event": "COMPLETE",
2488
+ "effects": [
2489
+ [
2490
+ "render-ui",
2491
+ "main",
2492
+ {
2493
+ "type": "stack",
2494
+ "direction": "vertical",
2495
+ "gap": "lg",
2496
+ "align": "center",
2497
+ "children": [
2498
+ {
2499
+ "type": "icon",
2500
+ "name": "check-circle",
2501
+ "size": "lg"
2502
+ },
2503
+ {
2504
+ "type": "typography",
2505
+ "content": "Quest Complete",
2506
+ "variant": "h2"
2507
+ },
2508
+ {
2509
+ "type": "typography",
2510
+ "content": "Congratulations! The quest has been completed.",
2511
+ "variant": "body"
2512
+ },
2513
+ {
2514
+ "type": "button",
2515
+ "label": "View Quests",
2516
+ "event": "RESET",
2517
+ "variant": "primary",
2518
+ "icon": "arrow-left"
2519
+ }
2520
+ ]
2521
+ }
2522
+ ]
2523
+ ]
2524
+ },
2525
+ {
2526
+ "from": "active",
2527
+ "to": "failed",
2528
+ "event": "FAIL",
2529
+ "effects": [
2530
+ [
2531
+ "render-ui",
2532
+ "main",
2533
+ {
2534
+ "type": "stack",
2535
+ "direction": "vertical",
2536
+ "gap": "lg",
2537
+ "align": "center",
2538
+ "children": [
2539
+ {
2540
+ "type": "icon",
2541
+ "name": "x-circle",
2542
+ "size": "lg"
2543
+ },
2544
+ {
2545
+ "type": "typography",
2546
+ "content": "Quest Failed",
2547
+ "variant": "h2"
2548
+ },
2549
+ {
2550
+ "type": "typography",
2551
+ "content": "The quest was not completed. You can try again.",
2552
+ "variant": "body"
2553
+ },
2554
+ {
2555
+ "type": "button",
2556
+ "label": "View Quests",
2557
+ "event": "RESET",
2558
+ "variant": "primary",
2559
+ "icon": "arrow-left"
2560
+ }
2561
+ ]
2562
+ }
2563
+ ]
2564
+ ]
2565
+ },
2566
+ {
2567
+ "from": "complete",
2568
+ "to": "available",
2569
+ "event": "RESET",
2570
+ "effects": [
2571
+ [
2572
+ "fetch",
2573
+ "Mission"
2574
+ ],
2575
+ [
2576
+ "render-ui",
2577
+ "main",
2578
+ {
2579
+ "type": "stack",
2580
+ "direction": "vertical",
2581
+ "gap": "lg",
2582
+ "children": [
2583
+ {
2584
+ "type": "stack",
2585
+ "direction": "horizontal",
2586
+ "gap": "md",
2587
+ "justify": "space-between",
2588
+ "children": [
2589
+ {
2590
+ "type": "stack",
2591
+ "direction": "horizontal",
2592
+ "gap": "md",
2593
+ "children": [
2594
+ {
2595
+ "type": "icon",
2596
+ "name": "flag",
2597
+ "size": "lg"
2598
+ },
2599
+ {
2600
+ "type": "typography",
2601
+ "content": "Missions Board",
2602
+ "variant": "h2"
2603
+ }
2604
+ ]
2605
+ }
2606
+ ]
2607
+ },
2608
+ {
2609
+ "type": "divider"
2610
+ },
2611
+ {
2612
+ "type": "data-grid",
2613
+ "entity": "Mission",
2614
+ "emptyIcon": "inbox",
2615
+ "emptyTitle": "No missions available",
2616
+ "emptyDescription": "Check back later for new missions.",
2617
+ "itemActions": [
2618
+ {
2619
+ "label": "Accept",
2620
+ "event": "ACCEPT"
2621
+ }
2622
+ ],
2623
+ "children": [
2624
+ {
2625
+ "type": "stack",
2626
+ "direction": "vertical",
2627
+ "gap": "sm",
2628
+ "children": [
2629
+ {
2630
+ "type": "stack",
2631
+ "direction": "horizontal",
2632
+ "justify": "space-between",
2633
+ "align": "center",
2634
+ "children": [
2635
+ {
2636
+ "type": "stack",
2637
+ "direction": "horizontal",
2638
+ "gap": "sm",
2639
+ "align": "center",
2640
+ "children": [
2641
+ {
2642
+ "type": "icon",
2643
+ "name": "flag",
2644
+ "size": "sm"
2645
+ },
2646
+ {
2647
+ "type": "typography",
2648
+ "variant": "h4",
2649
+ "content": "@entity.title"
2650
+ }
2651
+ ]
2652
+ },
2653
+ {
2654
+ "type": "badge",
2655
+ "label": "@entity.description"
2656
+ }
2657
+ ]
2658
+ },
2659
+ {
2660
+ "type": "typography",
2661
+ "variant": "caption",
2662
+ "content": "@entity.status"
2663
+ }
2664
+ ]
2665
+ }
2666
+ ]
2667
+ }
2668
+ ]
2669
+ }
2670
+ ]
2671
+ ]
2672
+ },
2673
+ {
2674
+ "from": "failed",
2675
+ "to": "available",
2676
+ "event": "RESET",
2677
+ "effects": [
2678
+ [
2679
+ "fetch",
2680
+ "Mission"
2681
+ ],
2682
+ [
2683
+ "render-ui",
2684
+ "main",
2685
+ {
2686
+ "type": "stack",
2687
+ "direction": "vertical",
2688
+ "gap": "lg",
2689
+ "children": [
2690
+ {
2691
+ "type": "stack",
2692
+ "direction": "horizontal",
2693
+ "gap": "md",
2694
+ "justify": "space-between",
2695
+ "children": [
2696
+ {
2697
+ "type": "stack",
2698
+ "direction": "horizontal",
2699
+ "gap": "md",
2700
+ "children": [
2701
+ {
2702
+ "type": "icon",
2703
+ "name": "flag",
2704
+ "size": "lg"
2705
+ },
2706
+ {
2707
+ "type": "typography",
2708
+ "content": "Missions Board",
2709
+ "variant": "h2"
2710
+ }
2711
+ ]
2712
+ }
2713
+ ]
2714
+ },
2715
+ {
2716
+ "type": "divider"
2717
+ },
2718
+ {
2719
+ "type": "data-grid",
2720
+ "entity": "Mission",
2721
+ "emptyIcon": "inbox",
2722
+ "emptyTitle": "No missions available",
2723
+ "emptyDescription": "Check back later for new missions.",
2724
+ "itemActions": [
2725
+ {
2726
+ "label": "Accept",
2727
+ "event": "ACCEPT"
2728
+ }
2729
+ ],
2730
+ "children": [
2731
+ {
2732
+ "type": "stack",
2733
+ "direction": "vertical",
2734
+ "gap": "sm",
2735
+ "children": [
2736
+ {
2737
+ "type": "stack",
2738
+ "direction": "horizontal",
2739
+ "justify": "space-between",
2740
+ "align": "center",
2741
+ "children": [
2742
+ {
2743
+ "type": "stack",
2744
+ "direction": "horizontal",
2745
+ "gap": "sm",
2746
+ "align": "center",
2747
+ "children": [
2748
+ {
2749
+ "type": "icon",
2750
+ "name": "flag",
2751
+ "size": "sm"
2752
+ },
2753
+ {
2754
+ "type": "typography",
2755
+ "variant": "h4",
2756
+ "content": "@entity.title"
2757
+ }
2758
+ ]
2759
+ },
2760
+ {
2761
+ "type": "badge",
2762
+ "label": "@entity.description"
2763
+ }
2764
+ ]
2765
+ },
2766
+ {
2767
+ "type": "typography",
2768
+ "variant": "caption",
2769
+ "content": "@entity.status"
2770
+ }
2771
+ ]
2772
+ }
2773
+ ]
2774
+ }
2775
+ ]
2776
+ }
2777
+ ]
2778
+ ]
2779
+ }
2780
+ ]
2781
+ },
2782
+ "listens": [
2783
+ {
2784
+ "event": "QUEST_ACCEPTED",
2785
+ "triggers": "INIT",
2786
+ "scope": "external"
2787
+ }
2788
+ ]
2789
+ }
2790
+ ],
2791
+ "pages": [
2792
+ {
2793
+ "name": "QuestsPage",
2794
+ "path": "/quests",
2795
+ "traits": [
2796
+ {
2797
+ "ref": "MissionTracking"
2798
+ }
2799
+ ]
2800
+ }
2801
+ ]
2802
+ }
2803
+ ]
2804
+ }