@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,2385 @@
1
+ {
2
+ "name": "Finance Tracker",
3
+ "version": "1.0.0",
4
+ "orbitals": [
5
+ {
6
+ "name": "TransactionOrbital",
7
+ "entity": {
8
+ "name": "Transaction",
9
+ "persistence": "runtime",
10
+ "fields": [
11
+ {
12
+ "name": "id",
13
+ "type": "string",
14
+ "required": true
15
+ },
16
+ {
17
+ "name": "description",
18
+ "type": "string",
19
+ "required": true
20
+ },
21
+ {
22
+ "name": "amount",
23
+ "type": "number",
24
+ "required": true
25
+ },
26
+ {
27
+ "name": "category",
28
+ "type": "string"
29
+ },
30
+ {
31
+ "name": "date",
32
+ "type": "string"
33
+ }
34
+ ]
35
+ },
36
+ "traits": [
37
+ {
38
+ "name": "TransactionBrowse",
39
+ "linkedEntity": "Transaction",
40
+ "category": "interaction",
41
+ "listens": [
42
+ {
43
+ "event": "TRANSACTION_CREATED",
44
+ "triggers": "TRANSACTION_CREATED"
45
+ },
46
+ {
47
+ "event": "TRANSACTION_UPDATED",
48
+ "triggers": "TRANSACTION_UPDATED"
49
+ }
50
+ ],
51
+ "stateMachine": {
52
+ "states": [
53
+ {
54
+ "name": "browsing",
55
+ "isInitial": true
56
+ },
57
+ {
58
+ "name": "deleting"
59
+ }
60
+ ],
61
+ "events": [
62
+ {
63
+ "key": "INIT",
64
+ "name": "Initialize"
65
+ },
66
+ {
67
+ "key": "CREATE",
68
+ "name": "CREATE"
69
+ },
70
+ {
71
+ "key": "VIEW",
72
+ "name": "VIEW",
73
+ "payload": [
74
+ {
75
+ "name": "id",
76
+ "type": "string",
77
+ "required": true
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "key": "EDIT",
83
+ "name": "EDIT",
84
+ "payload": [
85
+ {
86
+ "name": "id",
87
+ "type": "string",
88
+ "required": true
89
+ }
90
+ ]
91
+ },
92
+ {
93
+ "key": "DELETE",
94
+ "name": "DELETE",
95
+ "payload": [
96
+ {
97
+ "name": "id",
98
+ "type": "string",
99
+ "required": true
100
+ }
101
+ ]
102
+ },
103
+ {
104
+ "key": "TRANSACTION_CREATED",
105
+ "name": "TRANSACTION_CREATED",
106
+ "payload": [
107
+ {
108
+ "name": "data",
109
+ "type": "object",
110
+ "required": true
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ "key": "TRANSACTION_UPDATED",
116
+ "name": "TRANSACTION_UPDATED",
117
+ "payload": [
118
+ {
119
+ "name": "data",
120
+ "type": "object",
121
+ "required": true
122
+ }
123
+ ]
124
+ },
125
+ {
126
+ "key": "CONFIRM_DELETE",
127
+ "name": "Confirm Delete"
128
+ },
129
+ {
130
+ "key": "CANCEL",
131
+ "name": "Cancel"
132
+ },
133
+ {
134
+ "key": "CLOSE",
135
+ "name": "Close"
136
+ }
137
+ ],
138
+ "transitions": [
139
+ {
140
+ "from": "browsing",
141
+ "to": "browsing",
142
+ "event": "INIT",
143
+ "effects": [
144
+ [
145
+ "fetch",
146
+ "Transaction"
147
+ ],
148
+ [
149
+ "render-ui",
150
+ "main",
151
+ {
152
+ "type": "stack",
153
+ "direction": "vertical",
154
+ "gap": "lg",
155
+ "children": [
156
+ {
157
+ "type": "stack",
158
+ "direction": "horizontal",
159
+ "gap": "md",
160
+ "justify": "space-between",
161
+ "children": [
162
+ {
163
+ "type": "stack",
164
+ "direction": "horizontal",
165
+ "gap": "sm",
166
+ "align": "center",
167
+ "children": [
168
+ {
169
+ "type": "icon",
170
+ "name": "credit-card",
171
+ "size": "lg"
172
+ },
173
+ {
174
+ "type": "typography",
175
+ "content": "Transactions",
176
+ "variant": "h2"
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ "type": "stack",
182
+ "direction": "horizontal",
183
+ "gap": "sm",
184
+ "children": [
185
+ {
186
+ "type": "button",
187
+ "label": "Create Transaction",
188
+ "event": "CREATE",
189
+ "variant": "primary",
190
+ "icon": "plus"
191
+ }
192
+ ]
193
+ }
194
+ ]
195
+ },
196
+ {
197
+ "type": "divider"
198
+ },
199
+ {
200
+ "type": "data-grid",
201
+ "entity": "Transaction",
202
+ "emptyIcon": "inbox",
203
+ "emptyTitle": "No transactions yet",
204
+ "emptyDescription": "Create your first transaction to get started.",
205
+ "itemActions": [
206
+ {
207
+ "label": "View",
208
+ "event": "VIEW"
209
+ },
210
+ {
211
+ "label": "Edit",
212
+ "event": "EDIT"
213
+ },
214
+ {
215
+ "label": "Delete",
216
+ "event": "DELETE",
217
+ "variant": "danger"
218
+ }
219
+ ],
220
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
221
+ "children": [
222
+ {
223
+ "type": "stack",
224
+ "direction": "vertical",
225
+ "gap": "sm",
226
+ "children": [
227
+ {
228
+ "type": "stack",
229
+ "direction": "horizontal",
230
+ "justify": "space-between",
231
+ "align": "center",
232
+ "children": [
233
+ {
234
+ "type": "stack",
235
+ "direction": "horizontal",
236
+ "gap": "sm",
237
+ "align": "center",
238
+ "children": [
239
+ {
240
+ "type": "icon",
241
+ "name": "credit-card",
242
+ "size": "sm"
243
+ },
244
+ {
245
+ "type": "typography",
246
+ "variant": "h4",
247
+ "content": "@entity.description"
248
+ }
249
+ ]
250
+ },
251
+ {
252
+ "type": "badge",
253
+ "label": "@entity.amount"
254
+ }
255
+ ]
256
+ },
257
+ {
258
+ "type": "typography",
259
+ "variant": "caption",
260
+ "color": "muted",
261
+ "content": "@entity.category"
262
+ }
263
+ ]
264
+ }
265
+ ]
266
+ }
267
+ ]
268
+ }
269
+ ]
270
+ ]
271
+ },
272
+ {
273
+ "from": "browsing",
274
+ "to": "browsing",
275
+ "event": "TRANSACTION_CREATED",
276
+ "effects": [
277
+ [
278
+ "fetch",
279
+ "Transaction"
280
+ ]
281
+ ]
282
+ },
283
+ {
284
+ "from": "browsing",
285
+ "to": "browsing",
286
+ "event": "TRANSACTION_UPDATED",
287
+ "effects": [
288
+ [
289
+ "fetch",
290
+ "Transaction"
291
+ ]
292
+ ]
293
+ },
294
+ {
295
+ "from": "browsing",
296
+ "to": "deleting",
297
+ "event": "DELETE",
298
+ "effects": [
299
+ [
300
+ "fetch",
301
+ "Transaction",
302
+ "@payload.id"
303
+ ],
304
+ [
305
+ "render-ui",
306
+ "modal",
307
+ {
308
+ "type": "stack",
309
+ "direction": "vertical",
310
+ "gap": "md",
311
+ "children": [
312
+ {
313
+ "type": "stack",
314
+ "direction": "horizontal",
315
+ "gap": "sm",
316
+ "children": [
317
+ {
318
+ "type": "icon",
319
+ "name": "trash-2",
320
+ "size": "md"
321
+ },
322
+ {
323
+ "type": "typography",
324
+ "content": "Delete Transaction",
325
+ "variant": "h3"
326
+ }
327
+ ]
328
+ },
329
+ {
330
+ "type": "divider"
331
+ },
332
+ {
333
+ "type": "typography",
334
+ "content": "Are you sure you want to delete this transaction?",
335
+ "variant": "body"
336
+ },
337
+ {
338
+ "type": "stack",
339
+ "direction": "horizontal",
340
+ "gap": "sm",
341
+ "justify": "end",
342
+ "children": [
343
+ {
344
+ "type": "button",
345
+ "label": "Cancel",
346
+ "event": "CANCEL",
347
+ "variant": "ghost"
348
+ },
349
+ {
350
+ "type": "button",
351
+ "label": "Delete",
352
+ "event": "CONFIRM_DELETE",
353
+ "variant": "danger",
354
+ "icon": "trash"
355
+ }
356
+ ]
357
+ }
358
+ ]
359
+ }
360
+ ]
361
+ ]
362
+ },
363
+ {
364
+ "from": "deleting",
365
+ "to": "browsing",
366
+ "event": "CONFIRM_DELETE",
367
+ "effects": [
368
+ [
369
+ "persist",
370
+ "delete",
371
+ "Transaction",
372
+ "@entity.id"
373
+ ],
374
+ [
375
+ "render-ui",
376
+ "modal",
377
+ null
378
+ ],
379
+ [
380
+ "fetch",
381
+ "Transaction"
382
+ ],
383
+ [
384
+ "notify",
385
+ "Transaction deleted successfully"
386
+ ]
387
+ ]
388
+ },
389
+ {
390
+ "from": "deleting",
391
+ "to": "browsing",
392
+ "event": "CANCEL",
393
+ "effects": [
394
+ [
395
+ "render-ui",
396
+ "modal",
397
+ null
398
+ ]
399
+ ]
400
+ },
401
+ {
402
+ "from": "deleting",
403
+ "to": "browsing",
404
+ "event": "CLOSE",
405
+ "effects": [
406
+ [
407
+ "render-ui",
408
+ "modal",
409
+ null
410
+ ]
411
+ ]
412
+ }
413
+ ]
414
+ }
415
+ },
416
+ {
417
+ "name": "TransactionCreate",
418
+ "linkedEntity": "Transaction",
419
+ "category": "interaction",
420
+ "emits": [
421
+ {
422
+ "event": "TRANSACTION_CREATED"
423
+ }
424
+ ],
425
+ "stateMachine": {
426
+ "states": [
427
+ {
428
+ "name": "closed",
429
+ "isInitial": true
430
+ },
431
+ {
432
+ "name": "open"
433
+ }
434
+ ],
435
+ "events": [
436
+ {
437
+ "key": "INIT",
438
+ "name": "Initialize"
439
+ },
440
+ {
441
+ "key": "CREATE",
442
+ "name": "Open"
443
+ },
444
+ {
445
+ "key": "CLOSE",
446
+ "name": "Close"
447
+ },
448
+ {
449
+ "key": "SAVE",
450
+ "name": "Save",
451
+ "payload": [
452
+ {
453
+ "name": "data",
454
+ "type": "object",
455
+ "required": true
456
+ }
457
+ ]
458
+ }
459
+ ],
460
+ "transitions": [
461
+ {
462
+ "from": "closed",
463
+ "to": "closed",
464
+ "event": "INIT",
465
+ "effects": [
466
+ [
467
+ "fetch",
468
+ "Transaction"
469
+ ]
470
+ ]
471
+ },
472
+ {
473
+ "from": "closed",
474
+ "to": "open",
475
+ "event": "CREATE",
476
+ "effects": [
477
+ [
478
+ "fetch",
479
+ "Transaction"
480
+ ],
481
+ [
482
+ "render-ui",
483
+ "modal",
484
+ {
485
+ "type": "stack",
486
+ "direction": "vertical",
487
+ "gap": "md",
488
+ "children": [
489
+ {
490
+ "type": "stack",
491
+ "direction": "horizontal",
492
+ "gap": "sm",
493
+ "children": [
494
+ {
495
+ "type": "icon",
496
+ "name": "plus-circle",
497
+ "size": "md"
498
+ },
499
+ {
500
+ "type": "typography",
501
+ "content": "Create Transaction",
502
+ "variant": "h3"
503
+ }
504
+ ]
505
+ },
506
+ {
507
+ "type": "divider"
508
+ },
509
+ {
510
+ "type": "form-section",
511
+ "entity": "Transaction",
512
+ "mode": "create",
513
+ "submitEvent": "SAVE",
514
+ "cancelEvent": "CLOSE",
515
+ "fields": [
516
+ "description",
517
+ "amount",
518
+ "category",
519
+ "date"
520
+ ]
521
+ }
522
+ ]
523
+ }
524
+ ]
525
+ ]
526
+ },
527
+ {
528
+ "from": "open",
529
+ "to": "closed",
530
+ "event": "CLOSE",
531
+ "effects": [
532
+ [
533
+ "render-ui",
534
+ "modal",
535
+ null
536
+ ]
537
+ ]
538
+ },
539
+ {
540
+ "from": "open",
541
+ "to": "closed",
542
+ "event": "SAVE",
543
+ "effects": [
544
+ [
545
+ "persist",
546
+ "create",
547
+ "Transaction",
548
+ "@payload.data"
549
+ ],
550
+ [
551
+ "fetch",
552
+ "Transaction"
553
+ ],
554
+ [
555
+ "render-ui",
556
+ "modal",
557
+ null
558
+ ],
559
+ [
560
+ "emit",
561
+ "TRANSACTION_CREATED"
562
+ ],
563
+ [
564
+ "notify",
565
+ "Transaction created successfully"
566
+ ]
567
+ ]
568
+ }
569
+ ]
570
+ }
571
+ },
572
+ {
573
+ "name": "TransactionEdit",
574
+ "linkedEntity": "Transaction",
575
+ "category": "interaction",
576
+ "emits": [
577
+ {
578
+ "event": "TRANSACTION_UPDATED"
579
+ }
580
+ ],
581
+ "stateMachine": {
582
+ "states": [
583
+ {
584
+ "name": "closed",
585
+ "isInitial": true
586
+ },
587
+ {
588
+ "name": "open"
589
+ }
590
+ ],
591
+ "events": [
592
+ {
593
+ "key": "INIT",
594
+ "name": "Initialize"
595
+ },
596
+ {
597
+ "key": "EDIT",
598
+ "name": "Open",
599
+ "payload": [
600
+ {
601
+ "name": "id",
602
+ "type": "string",
603
+ "required": true
604
+ }
605
+ ]
606
+ },
607
+ {
608
+ "key": "CLOSE",
609
+ "name": "Close"
610
+ },
611
+ {
612
+ "key": "SAVE",
613
+ "name": "Save",
614
+ "payload": [
615
+ {
616
+ "name": "data",
617
+ "type": "object",
618
+ "required": true
619
+ }
620
+ ]
621
+ }
622
+ ],
623
+ "transitions": [
624
+ {
625
+ "from": "closed",
626
+ "to": "closed",
627
+ "event": "INIT",
628
+ "effects": [
629
+ [
630
+ "fetch",
631
+ "Transaction"
632
+ ]
633
+ ]
634
+ },
635
+ {
636
+ "from": "closed",
637
+ "to": "open",
638
+ "event": "EDIT",
639
+ "effects": [
640
+ [
641
+ "fetch",
642
+ "Transaction",
643
+ "@payload.id"
644
+ ],
645
+ [
646
+ "render-ui",
647
+ "modal",
648
+ {
649
+ "type": "stack",
650
+ "direction": "vertical",
651
+ "gap": "md",
652
+ "children": [
653
+ {
654
+ "type": "stack",
655
+ "direction": "horizontal",
656
+ "gap": "sm",
657
+ "children": [
658
+ {
659
+ "type": "icon",
660
+ "name": "edit",
661
+ "size": "md"
662
+ },
663
+ {
664
+ "type": "typography",
665
+ "content": "Edit Transaction",
666
+ "variant": "h3"
667
+ }
668
+ ]
669
+ },
670
+ {
671
+ "type": "divider"
672
+ },
673
+ {
674
+ "type": "form-section",
675
+ "entity": "Transaction",
676
+ "mode": "edit",
677
+ "submitEvent": "SAVE",
678
+ "cancelEvent": "CLOSE",
679
+ "fields": [
680
+ "description",
681
+ "amount",
682
+ "category",
683
+ "date"
684
+ ]
685
+ }
686
+ ]
687
+ }
688
+ ]
689
+ ]
690
+ },
691
+ {
692
+ "from": "open",
693
+ "to": "closed",
694
+ "event": "CLOSE",
695
+ "effects": [
696
+ [
697
+ "render-ui",
698
+ "modal",
699
+ null
700
+ ]
701
+ ]
702
+ },
703
+ {
704
+ "from": "open",
705
+ "to": "closed",
706
+ "event": "SAVE",
707
+ "effects": [
708
+ [
709
+ "persist",
710
+ "update",
711
+ "Transaction",
712
+ "@payload.data"
713
+ ],
714
+ [
715
+ "fetch",
716
+ "Transaction"
717
+ ],
718
+ [
719
+ "render-ui",
720
+ "modal",
721
+ null
722
+ ],
723
+ [
724
+ "emit",
725
+ "TRANSACTION_UPDATED"
726
+ ],
727
+ [
728
+ "notify",
729
+ "Transaction updated successfully"
730
+ ]
731
+ ]
732
+ }
733
+ ]
734
+ }
735
+ },
736
+ {
737
+ "name": "TransactionView",
738
+ "linkedEntity": "Transaction",
739
+ "category": "interaction",
740
+ "stateMachine": {
741
+ "states": [
742
+ {
743
+ "name": "closed",
744
+ "isInitial": true
745
+ },
746
+ {
747
+ "name": "open"
748
+ }
749
+ ],
750
+ "events": [
751
+ {
752
+ "key": "INIT",
753
+ "name": "Initialize"
754
+ },
755
+ {
756
+ "key": "VIEW",
757
+ "name": "Open",
758
+ "payload": [
759
+ {
760
+ "name": "id",
761
+ "type": "string",
762
+ "required": true
763
+ }
764
+ ]
765
+ },
766
+ {
767
+ "key": "CLOSE",
768
+ "name": "Close"
769
+ }
770
+ ],
771
+ "transitions": [
772
+ {
773
+ "from": "closed",
774
+ "to": "closed",
775
+ "event": "INIT",
776
+ "effects": [
777
+ [
778
+ "fetch",
779
+ "Transaction"
780
+ ]
781
+ ]
782
+ },
783
+ {
784
+ "from": "closed",
785
+ "to": "open",
786
+ "event": "VIEW",
787
+ "effects": [
788
+ [
789
+ "fetch",
790
+ "Transaction",
791
+ "@payload.id"
792
+ ],
793
+ [
794
+ "render-ui",
795
+ "modal",
796
+ {
797
+ "type": "stack",
798
+ "direction": "vertical",
799
+ "gap": "md",
800
+ "children": [
801
+ {
802
+ "type": "stack",
803
+ "direction": "horizontal",
804
+ "gap": "sm",
805
+ "align": "center",
806
+ "children": [
807
+ {
808
+ "type": "icon",
809
+ "name": "eye",
810
+ "size": "md"
811
+ },
812
+ {
813
+ "type": "typography",
814
+ "variant": "h3",
815
+ "content": "@entity.description"
816
+ }
817
+ ]
818
+ },
819
+ {
820
+ "type": "divider"
821
+ },
822
+ {
823
+ "type": "stack",
824
+ "direction": "horizontal",
825
+ "gap": "md",
826
+ "children": [
827
+ {
828
+ "type": "typography",
829
+ "variant": "caption",
830
+ "content": "Description"
831
+ },
832
+ {
833
+ "type": "typography",
834
+ "variant": "body",
835
+ "content": "@entity.description"
836
+ }
837
+ ]
838
+ },
839
+ {
840
+ "type": "stack",
841
+ "direction": "horizontal",
842
+ "gap": "md",
843
+ "children": [
844
+ {
845
+ "type": "typography",
846
+ "variant": "caption",
847
+ "content": "Amount"
848
+ },
849
+ {
850
+ "type": "typography",
851
+ "variant": "body",
852
+ "content": "@entity.amount"
853
+ }
854
+ ]
855
+ },
856
+ {
857
+ "type": "stack",
858
+ "direction": "horizontal",
859
+ "gap": "md",
860
+ "children": [
861
+ {
862
+ "type": "typography",
863
+ "variant": "caption",
864
+ "content": "Category"
865
+ },
866
+ {
867
+ "type": "typography",
868
+ "variant": "body",
869
+ "content": "@entity.category"
870
+ }
871
+ ]
872
+ },
873
+ {
874
+ "type": "stack",
875
+ "direction": "horizontal",
876
+ "gap": "md",
877
+ "children": [
878
+ {
879
+ "type": "typography",
880
+ "variant": "caption",
881
+ "content": "Date"
882
+ },
883
+ {
884
+ "type": "typography",
885
+ "variant": "body",
886
+ "content": "@entity.date"
887
+ }
888
+ ]
889
+ },
890
+ {
891
+ "type": "divider"
892
+ },
893
+ {
894
+ "type": "stack",
895
+ "direction": "horizontal",
896
+ "gap": "sm",
897
+ "justify": "end",
898
+ "children": [
899
+ {
900
+ "type": "button",
901
+ "label": "Edit",
902
+ "event": "EDIT",
903
+ "variant": "primary",
904
+ "icon": "edit"
905
+ },
906
+ {
907
+ "type": "button",
908
+ "label": "Close",
909
+ "event": "CLOSE",
910
+ "variant": "ghost"
911
+ }
912
+ ]
913
+ }
914
+ ]
915
+ }
916
+ ]
917
+ ]
918
+ },
919
+ {
920
+ "from": "open",
921
+ "to": "closed",
922
+ "event": "CLOSE",
923
+ "effects": [
924
+ [
925
+ "render-ui",
926
+ "modal",
927
+ null
928
+ ]
929
+ ]
930
+ }
931
+ ]
932
+ }
933
+ }
934
+ ],
935
+ "pages": [
936
+ {
937
+ "name": "TransactionsPage",
938
+ "path": "/transactions",
939
+ "isInitial": true,
940
+ "traits": [
941
+ {
942
+ "ref": "TransactionBrowse"
943
+ },
944
+ {
945
+ "ref": "TransactionCreate"
946
+ },
947
+ {
948
+ "ref": "TransactionEdit"
949
+ },
950
+ {
951
+ "ref": "TransactionView"
952
+ }
953
+ ]
954
+ }
955
+ ]
956
+ },
957
+ {
958
+ "name": "FinanceSummaryOrbital",
959
+ "entity": {
960
+ "name": "FinanceSummary",
961
+ "persistence": "runtime",
962
+ "fields": [
963
+ {
964
+ "name": "id",
965
+ "type": "string",
966
+ "required": true
967
+ },
968
+ {
969
+ "name": "totalIncome",
970
+ "type": "number",
971
+ "default": 0
972
+ },
973
+ {
974
+ "name": "totalExpenses",
975
+ "type": "number",
976
+ "default": 0
977
+ },
978
+ {
979
+ "name": "balance",
980
+ "type": "number",
981
+ "default": 0
982
+ },
983
+ {
984
+ "name": "savingsRate",
985
+ "type": "number",
986
+ "default": 0
987
+ }
988
+ ]
989
+ },
990
+ "traits": [
991
+ {
992
+ "name": "FinanceSummaryDisplay",
993
+ "linkedEntity": "FinanceSummary",
994
+ "category": "interaction",
995
+ "stateMachine": {
996
+ "states": [
997
+ {
998
+ "name": "loading",
999
+ "isInitial": true
1000
+ },
1001
+ {
1002
+ "name": "displaying"
1003
+ },
1004
+ {
1005
+ "name": "refreshing"
1006
+ }
1007
+ ],
1008
+ "events": [
1009
+ {
1010
+ "key": "INIT",
1011
+ "name": "Initialize"
1012
+ },
1013
+ {
1014
+ "key": "LOADED",
1015
+ "name": "Loaded"
1016
+ },
1017
+ {
1018
+ "key": "REFRESH",
1019
+ "name": "Refresh"
1020
+ },
1021
+ {
1022
+ "key": "REFRESHED",
1023
+ "name": "Refreshed"
1024
+ }
1025
+ ],
1026
+ "transitions": [
1027
+ {
1028
+ "from": "loading",
1029
+ "to": "displaying",
1030
+ "event": "INIT",
1031
+ "effects": [
1032
+ [
1033
+ "fetch",
1034
+ "FinanceSummary"
1035
+ ],
1036
+ [
1037
+ "render-ui",
1038
+ "main",
1039
+ {
1040
+ "type": "stack",
1041
+ "direction": "vertical",
1042
+ "gap": "lg",
1043
+ "children": [
1044
+ {
1045
+ "type": "stack",
1046
+ "direction": "horizontal",
1047
+ "gap": "md",
1048
+ "justify": "space-between",
1049
+ "children": [
1050
+ {
1051
+ "type": "stack",
1052
+ "direction": "horizontal",
1053
+ "gap": "md",
1054
+ "children": [
1055
+ {
1056
+ "type": "icon",
1057
+ "name": "pie-chart",
1058
+ "size": "lg"
1059
+ },
1060
+ {
1061
+ "type": "typography",
1062
+ "content": "Financial Summary",
1063
+ "variant": "h2"
1064
+ }
1065
+ ]
1066
+ },
1067
+ {
1068
+ "type": "button",
1069
+ "label": "Refresh",
1070
+ "event": "REFRESH",
1071
+ "variant": "secondary",
1072
+ "icon": "refresh-cw"
1073
+ }
1074
+ ]
1075
+ },
1076
+ {
1077
+ "type": "divider"
1078
+ },
1079
+ {
1080
+ "type": "simple-grid",
1081
+ "columns": 3,
1082
+ "children": [
1083
+ {
1084
+ "type": "card",
1085
+ "children": [
1086
+ {
1087
+ "type": "stack",
1088
+ "direction": "vertical",
1089
+ "gap": "sm",
1090
+ "children": [
1091
+ {
1092
+ "type": "typography",
1093
+ "variant": "caption",
1094
+ "content": "TotalIncome"
1095
+ },
1096
+ {
1097
+ "type": "typography",
1098
+ "variant": "h3",
1099
+ "content": "@entity.totalIncome"
1100
+ }
1101
+ ]
1102
+ }
1103
+ ]
1104
+ },
1105
+ {
1106
+ "type": "card",
1107
+ "children": [
1108
+ {
1109
+ "type": "stack",
1110
+ "direction": "vertical",
1111
+ "gap": "sm",
1112
+ "children": [
1113
+ {
1114
+ "type": "typography",
1115
+ "variant": "caption",
1116
+ "content": "TotalExpenses"
1117
+ },
1118
+ {
1119
+ "type": "typography",
1120
+ "variant": "h3",
1121
+ "content": "@entity.totalExpenses"
1122
+ }
1123
+ ]
1124
+ }
1125
+ ]
1126
+ },
1127
+ {
1128
+ "type": "card",
1129
+ "children": [
1130
+ {
1131
+ "type": "stack",
1132
+ "direction": "vertical",
1133
+ "gap": "sm",
1134
+ "children": [
1135
+ {
1136
+ "type": "typography",
1137
+ "variant": "caption",
1138
+ "content": "Balance"
1139
+ },
1140
+ {
1141
+ "type": "typography",
1142
+ "variant": "h3",
1143
+ "content": "@entity.balance"
1144
+ }
1145
+ ]
1146
+ }
1147
+ ]
1148
+ },
1149
+ {
1150
+ "type": "card",
1151
+ "children": [
1152
+ {
1153
+ "type": "stack",
1154
+ "direction": "vertical",
1155
+ "gap": "sm",
1156
+ "children": [
1157
+ {
1158
+ "type": "typography",
1159
+ "variant": "caption",
1160
+ "content": "SavingsRate"
1161
+ },
1162
+ {
1163
+ "type": "typography",
1164
+ "variant": "h3",
1165
+ "content": "@entity.savingsRate"
1166
+ }
1167
+ ]
1168
+ }
1169
+ ]
1170
+ }
1171
+ ]
1172
+ }
1173
+ ]
1174
+ }
1175
+ ]
1176
+ ]
1177
+ },
1178
+ {
1179
+ "from": "loading",
1180
+ "to": "displaying",
1181
+ "event": "LOADED",
1182
+ "effects": [
1183
+ [
1184
+ "fetch",
1185
+ "FinanceSummary"
1186
+ ],
1187
+ [
1188
+ "render-ui",
1189
+ "main",
1190
+ {
1191
+ "type": "stack",
1192
+ "direction": "vertical",
1193
+ "gap": "lg",
1194
+ "children": [
1195
+ {
1196
+ "type": "stack",
1197
+ "direction": "horizontal",
1198
+ "gap": "md",
1199
+ "justify": "space-between",
1200
+ "children": [
1201
+ {
1202
+ "type": "stack",
1203
+ "direction": "horizontal",
1204
+ "gap": "md",
1205
+ "children": [
1206
+ {
1207
+ "type": "icon",
1208
+ "name": "pie-chart",
1209
+ "size": "lg"
1210
+ },
1211
+ {
1212
+ "type": "typography",
1213
+ "content": "Financial Summary",
1214
+ "variant": "h2"
1215
+ }
1216
+ ]
1217
+ },
1218
+ {
1219
+ "type": "button",
1220
+ "label": "Refresh",
1221
+ "event": "REFRESH",
1222
+ "variant": "secondary",
1223
+ "icon": "refresh-cw"
1224
+ }
1225
+ ]
1226
+ },
1227
+ {
1228
+ "type": "divider"
1229
+ },
1230
+ {
1231
+ "type": "simple-grid",
1232
+ "columns": 3,
1233
+ "children": [
1234
+ {
1235
+ "type": "card",
1236
+ "children": [
1237
+ {
1238
+ "type": "stack",
1239
+ "direction": "vertical",
1240
+ "gap": "sm",
1241
+ "children": [
1242
+ {
1243
+ "type": "typography",
1244
+ "variant": "caption",
1245
+ "content": "TotalIncome"
1246
+ },
1247
+ {
1248
+ "type": "typography",
1249
+ "variant": "h3",
1250
+ "content": "@entity.totalIncome"
1251
+ }
1252
+ ]
1253
+ }
1254
+ ]
1255
+ },
1256
+ {
1257
+ "type": "card",
1258
+ "children": [
1259
+ {
1260
+ "type": "stack",
1261
+ "direction": "vertical",
1262
+ "gap": "sm",
1263
+ "children": [
1264
+ {
1265
+ "type": "typography",
1266
+ "variant": "caption",
1267
+ "content": "TotalExpenses"
1268
+ },
1269
+ {
1270
+ "type": "typography",
1271
+ "variant": "h3",
1272
+ "content": "@entity.totalExpenses"
1273
+ }
1274
+ ]
1275
+ }
1276
+ ]
1277
+ },
1278
+ {
1279
+ "type": "card",
1280
+ "children": [
1281
+ {
1282
+ "type": "stack",
1283
+ "direction": "vertical",
1284
+ "gap": "sm",
1285
+ "children": [
1286
+ {
1287
+ "type": "typography",
1288
+ "variant": "caption",
1289
+ "content": "Balance"
1290
+ },
1291
+ {
1292
+ "type": "typography",
1293
+ "variant": "h3",
1294
+ "content": "@entity.balance"
1295
+ }
1296
+ ]
1297
+ }
1298
+ ]
1299
+ },
1300
+ {
1301
+ "type": "card",
1302
+ "children": [
1303
+ {
1304
+ "type": "stack",
1305
+ "direction": "vertical",
1306
+ "gap": "sm",
1307
+ "children": [
1308
+ {
1309
+ "type": "typography",
1310
+ "variant": "caption",
1311
+ "content": "SavingsRate"
1312
+ },
1313
+ {
1314
+ "type": "typography",
1315
+ "variant": "h3",
1316
+ "content": "@entity.savingsRate"
1317
+ }
1318
+ ]
1319
+ }
1320
+ ]
1321
+ }
1322
+ ]
1323
+ }
1324
+ ]
1325
+ }
1326
+ ]
1327
+ ]
1328
+ },
1329
+ {
1330
+ "from": "displaying",
1331
+ "to": "displaying",
1332
+ "event": "INIT",
1333
+ "effects": [
1334
+ [
1335
+ "fetch",
1336
+ "FinanceSummary"
1337
+ ],
1338
+ [
1339
+ "render-ui",
1340
+ "main",
1341
+ {
1342
+ "type": "stack",
1343
+ "direction": "vertical",
1344
+ "gap": "lg",
1345
+ "children": [
1346
+ {
1347
+ "type": "stack",
1348
+ "direction": "horizontal",
1349
+ "gap": "md",
1350
+ "justify": "space-between",
1351
+ "children": [
1352
+ {
1353
+ "type": "stack",
1354
+ "direction": "horizontal",
1355
+ "gap": "md",
1356
+ "children": [
1357
+ {
1358
+ "type": "icon",
1359
+ "name": "pie-chart",
1360
+ "size": "lg"
1361
+ },
1362
+ {
1363
+ "type": "typography",
1364
+ "content": "Financial Summary",
1365
+ "variant": "h2"
1366
+ }
1367
+ ]
1368
+ },
1369
+ {
1370
+ "type": "button",
1371
+ "label": "Refresh",
1372
+ "event": "REFRESH",
1373
+ "variant": "secondary",
1374
+ "icon": "refresh-cw"
1375
+ }
1376
+ ]
1377
+ },
1378
+ {
1379
+ "type": "divider"
1380
+ },
1381
+ {
1382
+ "type": "simple-grid",
1383
+ "columns": 3,
1384
+ "children": [
1385
+ {
1386
+ "type": "card",
1387
+ "children": [
1388
+ {
1389
+ "type": "stack",
1390
+ "direction": "vertical",
1391
+ "gap": "sm",
1392
+ "children": [
1393
+ {
1394
+ "type": "typography",
1395
+ "variant": "caption",
1396
+ "content": "TotalIncome"
1397
+ },
1398
+ {
1399
+ "type": "typography",
1400
+ "variant": "h3",
1401
+ "content": "@entity.totalIncome"
1402
+ }
1403
+ ]
1404
+ }
1405
+ ]
1406
+ },
1407
+ {
1408
+ "type": "card",
1409
+ "children": [
1410
+ {
1411
+ "type": "stack",
1412
+ "direction": "vertical",
1413
+ "gap": "sm",
1414
+ "children": [
1415
+ {
1416
+ "type": "typography",
1417
+ "variant": "caption",
1418
+ "content": "TotalExpenses"
1419
+ },
1420
+ {
1421
+ "type": "typography",
1422
+ "variant": "h3",
1423
+ "content": "@entity.totalExpenses"
1424
+ }
1425
+ ]
1426
+ }
1427
+ ]
1428
+ },
1429
+ {
1430
+ "type": "card",
1431
+ "children": [
1432
+ {
1433
+ "type": "stack",
1434
+ "direction": "vertical",
1435
+ "gap": "sm",
1436
+ "children": [
1437
+ {
1438
+ "type": "typography",
1439
+ "variant": "caption",
1440
+ "content": "Balance"
1441
+ },
1442
+ {
1443
+ "type": "typography",
1444
+ "variant": "h3",
1445
+ "content": "@entity.balance"
1446
+ }
1447
+ ]
1448
+ }
1449
+ ]
1450
+ },
1451
+ {
1452
+ "type": "card",
1453
+ "children": [
1454
+ {
1455
+ "type": "stack",
1456
+ "direction": "vertical",
1457
+ "gap": "sm",
1458
+ "children": [
1459
+ {
1460
+ "type": "typography",
1461
+ "variant": "caption",
1462
+ "content": "SavingsRate"
1463
+ },
1464
+ {
1465
+ "type": "typography",
1466
+ "variant": "h3",
1467
+ "content": "@entity.savingsRate"
1468
+ }
1469
+ ]
1470
+ }
1471
+ ]
1472
+ }
1473
+ ]
1474
+ }
1475
+ ]
1476
+ }
1477
+ ]
1478
+ ]
1479
+ },
1480
+ {
1481
+ "from": "displaying",
1482
+ "to": "refreshing",
1483
+ "event": "REFRESH",
1484
+ "effects": [
1485
+ [
1486
+ "fetch",
1487
+ "FinanceSummary"
1488
+ ],
1489
+ [
1490
+ "render-ui",
1491
+ "main",
1492
+ {
1493
+ "type": "stack",
1494
+ "direction": "vertical",
1495
+ "gap": "lg",
1496
+ "children": [
1497
+ {
1498
+ "type": "stack",
1499
+ "direction": "horizontal",
1500
+ "gap": "md",
1501
+ "justify": "space-between",
1502
+ "children": [
1503
+ {
1504
+ "type": "stack",
1505
+ "direction": "horizontal",
1506
+ "gap": "md",
1507
+ "children": [
1508
+ {
1509
+ "type": "icon",
1510
+ "name": "pie-chart",
1511
+ "size": "lg"
1512
+ },
1513
+ {
1514
+ "type": "typography",
1515
+ "content": "Financial Summary",
1516
+ "variant": "h2"
1517
+ }
1518
+ ]
1519
+ },
1520
+ {
1521
+ "type": "button",
1522
+ "label": "Refresh",
1523
+ "event": "REFRESH",
1524
+ "variant": "secondary",
1525
+ "icon": "refresh-cw"
1526
+ }
1527
+ ]
1528
+ },
1529
+ {
1530
+ "type": "divider"
1531
+ },
1532
+ {
1533
+ "type": "simple-grid",
1534
+ "columns": 3,
1535
+ "children": [
1536
+ {
1537
+ "type": "card",
1538
+ "children": [
1539
+ {
1540
+ "type": "stack",
1541
+ "direction": "vertical",
1542
+ "gap": "sm",
1543
+ "children": [
1544
+ {
1545
+ "type": "typography",
1546
+ "variant": "caption",
1547
+ "content": "TotalIncome"
1548
+ },
1549
+ {
1550
+ "type": "typography",
1551
+ "variant": "h3",
1552
+ "content": "@entity.totalIncome"
1553
+ }
1554
+ ]
1555
+ }
1556
+ ]
1557
+ },
1558
+ {
1559
+ "type": "card",
1560
+ "children": [
1561
+ {
1562
+ "type": "stack",
1563
+ "direction": "vertical",
1564
+ "gap": "sm",
1565
+ "children": [
1566
+ {
1567
+ "type": "typography",
1568
+ "variant": "caption",
1569
+ "content": "TotalExpenses"
1570
+ },
1571
+ {
1572
+ "type": "typography",
1573
+ "variant": "h3",
1574
+ "content": "@entity.totalExpenses"
1575
+ }
1576
+ ]
1577
+ }
1578
+ ]
1579
+ },
1580
+ {
1581
+ "type": "card",
1582
+ "children": [
1583
+ {
1584
+ "type": "stack",
1585
+ "direction": "vertical",
1586
+ "gap": "sm",
1587
+ "children": [
1588
+ {
1589
+ "type": "typography",
1590
+ "variant": "caption",
1591
+ "content": "Balance"
1592
+ },
1593
+ {
1594
+ "type": "typography",
1595
+ "variant": "h3",
1596
+ "content": "@entity.balance"
1597
+ }
1598
+ ]
1599
+ }
1600
+ ]
1601
+ },
1602
+ {
1603
+ "type": "card",
1604
+ "children": [
1605
+ {
1606
+ "type": "stack",
1607
+ "direction": "vertical",
1608
+ "gap": "sm",
1609
+ "children": [
1610
+ {
1611
+ "type": "typography",
1612
+ "variant": "caption",
1613
+ "content": "SavingsRate"
1614
+ },
1615
+ {
1616
+ "type": "typography",
1617
+ "variant": "h3",
1618
+ "content": "@entity.savingsRate"
1619
+ }
1620
+ ]
1621
+ }
1622
+ ]
1623
+ }
1624
+ ]
1625
+ }
1626
+ ]
1627
+ }
1628
+ ]
1629
+ ]
1630
+ },
1631
+ {
1632
+ "from": "refreshing",
1633
+ "to": "displaying",
1634
+ "event": "REFRESHED",
1635
+ "effects": [
1636
+ [
1637
+ "fetch",
1638
+ "FinanceSummary"
1639
+ ],
1640
+ [
1641
+ "render-ui",
1642
+ "main",
1643
+ {
1644
+ "type": "stack",
1645
+ "direction": "vertical",
1646
+ "gap": "lg",
1647
+ "children": [
1648
+ {
1649
+ "type": "stack",
1650
+ "direction": "horizontal",
1651
+ "gap": "md",
1652
+ "justify": "space-between",
1653
+ "children": [
1654
+ {
1655
+ "type": "stack",
1656
+ "direction": "horizontal",
1657
+ "gap": "md",
1658
+ "children": [
1659
+ {
1660
+ "type": "icon",
1661
+ "name": "pie-chart",
1662
+ "size": "lg"
1663
+ },
1664
+ {
1665
+ "type": "typography",
1666
+ "content": "Financial Summary",
1667
+ "variant": "h2"
1668
+ }
1669
+ ]
1670
+ },
1671
+ {
1672
+ "type": "button",
1673
+ "label": "Refresh",
1674
+ "event": "REFRESH",
1675
+ "variant": "secondary",
1676
+ "icon": "refresh-cw"
1677
+ }
1678
+ ]
1679
+ },
1680
+ {
1681
+ "type": "divider"
1682
+ },
1683
+ {
1684
+ "type": "simple-grid",
1685
+ "columns": 3,
1686
+ "children": [
1687
+ {
1688
+ "type": "card",
1689
+ "children": [
1690
+ {
1691
+ "type": "stack",
1692
+ "direction": "vertical",
1693
+ "gap": "sm",
1694
+ "children": [
1695
+ {
1696
+ "type": "typography",
1697
+ "variant": "caption",
1698
+ "content": "TotalIncome"
1699
+ },
1700
+ {
1701
+ "type": "typography",
1702
+ "variant": "h3",
1703
+ "content": "@entity.totalIncome"
1704
+ }
1705
+ ]
1706
+ }
1707
+ ]
1708
+ },
1709
+ {
1710
+ "type": "card",
1711
+ "children": [
1712
+ {
1713
+ "type": "stack",
1714
+ "direction": "vertical",
1715
+ "gap": "sm",
1716
+ "children": [
1717
+ {
1718
+ "type": "typography",
1719
+ "variant": "caption",
1720
+ "content": "TotalExpenses"
1721
+ },
1722
+ {
1723
+ "type": "typography",
1724
+ "variant": "h3",
1725
+ "content": "@entity.totalExpenses"
1726
+ }
1727
+ ]
1728
+ }
1729
+ ]
1730
+ },
1731
+ {
1732
+ "type": "card",
1733
+ "children": [
1734
+ {
1735
+ "type": "stack",
1736
+ "direction": "vertical",
1737
+ "gap": "sm",
1738
+ "children": [
1739
+ {
1740
+ "type": "typography",
1741
+ "variant": "caption",
1742
+ "content": "Balance"
1743
+ },
1744
+ {
1745
+ "type": "typography",
1746
+ "variant": "h3",
1747
+ "content": "@entity.balance"
1748
+ }
1749
+ ]
1750
+ }
1751
+ ]
1752
+ },
1753
+ {
1754
+ "type": "card",
1755
+ "children": [
1756
+ {
1757
+ "type": "stack",
1758
+ "direction": "vertical",
1759
+ "gap": "sm",
1760
+ "children": [
1761
+ {
1762
+ "type": "typography",
1763
+ "variant": "caption",
1764
+ "content": "SavingsRate"
1765
+ },
1766
+ {
1767
+ "type": "typography",
1768
+ "variant": "h3",
1769
+ "content": "@entity.savingsRate"
1770
+ }
1771
+ ]
1772
+ }
1773
+ ]
1774
+ }
1775
+ ]
1776
+ }
1777
+ ]
1778
+ }
1779
+ ]
1780
+ ]
1781
+ }
1782
+ ]
1783
+ }
1784
+ }
1785
+ ],
1786
+ "pages": [
1787
+ {
1788
+ "name": "SummaryPage",
1789
+ "path": "/summary",
1790
+ "traits": [
1791
+ {
1792
+ "ref": "FinanceSummaryDisplay"
1793
+ }
1794
+ ]
1795
+ }
1796
+ ]
1797
+ },
1798
+ {
1799
+ "name": "FinanceReportOrbital",
1800
+ "entity": {
1801
+ "name": "FinanceReport",
1802
+ "persistence": "runtime",
1803
+ "fields": [
1804
+ {
1805
+ "name": "id",
1806
+ "type": "string",
1807
+ "required": true
1808
+ },
1809
+ {
1810
+ "name": "title",
1811
+ "type": "string",
1812
+ "required": true
1813
+ },
1814
+ {
1815
+ "name": "period",
1816
+ "type": "string",
1817
+ "required": true
1818
+ },
1819
+ {
1820
+ "name": "total",
1821
+ "type": "number"
1822
+ },
1823
+ {
1824
+ "name": "generatedAt",
1825
+ "type": "string"
1826
+ }
1827
+ ]
1828
+ },
1829
+ "traits": [
1830
+ {
1831
+ "name": "FinanceReportBrowse",
1832
+ "linkedEntity": "FinanceReport",
1833
+ "category": "interaction",
1834
+ "listens": [
1835
+ {
1836
+ "event": "SAVE",
1837
+ "triggers": "SAVE"
1838
+ }
1839
+ ],
1840
+ "stateMachine": {
1841
+ "states": [
1842
+ {
1843
+ "name": "browsing",
1844
+ "isInitial": true
1845
+ }
1846
+ ],
1847
+ "events": [
1848
+ {
1849
+ "key": "INIT",
1850
+ "name": "Initialize"
1851
+ },
1852
+ {
1853
+ "key": "CREATE",
1854
+ "name": "CREATE"
1855
+ },
1856
+ {
1857
+ "key": "VIEW",
1858
+ "name": "VIEW",
1859
+ "payload": [
1860
+ {
1861
+ "name": "id",
1862
+ "type": "string",
1863
+ "required": true
1864
+ }
1865
+ ]
1866
+ },
1867
+ {
1868
+ "key": "SAVE",
1869
+ "name": "SAVE",
1870
+ "payload": [
1871
+ {
1872
+ "name": "data",
1873
+ "type": "object",
1874
+ "required": true
1875
+ }
1876
+ ]
1877
+ }
1878
+ ],
1879
+ "transitions": [
1880
+ {
1881
+ "from": "browsing",
1882
+ "to": "browsing",
1883
+ "event": "INIT",
1884
+ "effects": [
1885
+ [
1886
+ "fetch",
1887
+ "FinanceReport"
1888
+ ],
1889
+ [
1890
+ "render-ui",
1891
+ "main",
1892
+ {
1893
+ "type": "stack",
1894
+ "direction": "vertical",
1895
+ "gap": "lg",
1896
+ "children": [
1897
+ {
1898
+ "type": "stack",
1899
+ "direction": "horizontal",
1900
+ "gap": "md",
1901
+ "justify": "space-between",
1902
+ "children": [
1903
+ {
1904
+ "type": "stack",
1905
+ "direction": "horizontal",
1906
+ "gap": "sm",
1907
+ "align": "center",
1908
+ "children": [
1909
+ {
1910
+ "type": "icon",
1911
+ "name": "file-text",
1912
+ "size": "lg"
1913
+ },
1914
+ {
1915
+ "type": "typography",
1916
+ "content": "Reports",
1917
+ "variant": "h2"
1918
+ }
1919
+ ]
1920
+ },
1921
+ {
1922
+ "type": "stack",
1923
+ "direction": "horizontal",
1924
+ "gap": "sm",
1925
+ "children": [
1926
+ {
1927
+ "type": "button",
1928
+ "label": "Create FinanceReport",
1929
+ "event": "CREATE",
1930
+ "variant": "primary",
1931
+ "icon": "plus"
1932
+ }
1933
+ ]
1934
+ }
1935
+ ]
1936
+ },
1937
+ {
1938
+ "type": "divider"
1939
+ },
1940
+ {
1941
+ "type": "data-grid",
1942
+ "entity": "FinanceReport",
1943
+ "emptyIcon": "inbox",
1944
+ "emptyTitle": "No financereports yet",
1945
+ "emptyDescription": "Create your first financereport to get started.",
1946
+ "itemActions": [
1947
+ {
1948
+ "label": "View",
1949
+ "event": "VIEW"
1950
+ }
1951
+ ],
1952
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
1953
+ "children": [
1954
+ {
1955
+ "type": "stack",
1956
+ "direction": "vertical",
1957
+ "gap": "sm",
1958
+ "children": [
1959
+ {
1960
+ "type": "stack",
1961
+ "direction": "horizontal",
1962
+ "justify": "space-between",
1963
+ "align": "center",
1964
+ "children": [
1965
+ {
1966
+ "type": "stack",
1967
+ "direction": "horizontal",
1968
+ "gap": "sm",
1969
+ "align": "center",
1970
+ "children": [
1971
+ {
1972
+ "type": "icon",
1973
+ "name": "file-text",
1974
+ "size": "sm"
1975
+ },
1976
+ {
1977
+ "type": "typography",
1978
+ "variant": "h4",
1979
+ "content": "@entity.title"
1980
+ }
1981
+ ]
1982
+ },
1983
+ {
1984
+ "type": "badge",
1985
+ "label": "@entity.period"
1986
+ }
1987
+ ]
1988
+ },
1989
+ {
1990
+ "type": "typography",
1991
+ "variant": "caption",
1992
+ "color": "muted",
1993
+ "content": "@entity.total"
1994
+ }
1995
+ ]
1996
+ }
1997
+ ]
1998
+ }
1999
+ ]
2000
+ }
2001
+ ]
2002
+ ]
2003
+ },
2004
+ {
2005
+ "from": "browsing",
2006
+ "to": "browsing",
2007
+ "event": "SAVE",
2008
+ "effects": [
2009
+ [
2010
+ "fetch",
2011
+ "FinanceReport"
2012
+ ]
2013
+ ]
2014
+ }
2015
+ ]
2016
+ }
2017
+ },
2018
+ {
2019
+ "name": "FinanceReportCreate",
2020
+ "linkedEntity": "FinanceReport",
2021
+ "category": "interaction",
2022
+ "emits": [
2023
+ {
2024
+ "event": "SAVE"
2025
+ }
2026
+ ],
2027
+ "stateMachine": {
2028
+ "states": [
2029
+ {
2030
+ "name": "closed",
2031
+ "isInitial": true
2032
+ },
2033
+ {
2034
+ "name": "open"
2035
+ }
2036
+ ],
2037
+ "events": [
2038
+ {
2039
+ "key": "INIT",
2040
+ "name": "Initialize"
2041
+ },
2042
+ {
2043
+ "key": "CREATE",
2044
+ "name": "Open"
2045
+ },
2046
+ {
2047
+ "key": "CLOSE",
2048
+ "name": "Close"
2049
+ },
2050
+ {
2051
+ "key": "SAVE",
2052
+ "name": "Save",
2053
+ "payload": [
2054
+ {
2055
+ "name": "data",
2056
+ "type": "object",
2057
+ "required": true
2058
+ }
2059
+ ]
2060
+ }
2061
+ ],
2062
+ "transitions": [
2063
+ {
2064
+ "from": "closed",
2065
+ "to": "closed",
2066
+ "event": "INIT",
2067
+ "effects": [
2068
+ [
2069
+ "fetch",
2070
+ "FinanceReport"
2071
+ ]
2072
+ ]
2073
+ },
2074
+ {
2075
+ "from": "closed",
2076
+ "to": "open",
2077
+ "event": "CREATE",
2078
+ "effects": [
2079
+ [
2080
+ "fetch",
2081
+ "FinanceReport"
2082
+ ],
2083
+ [
2084
+ "render-ui",
2085
+ "modal",
2086
+ {
2087
+ "type": "stack",
2088
+ "direction": "vertical",
2089
+ "gap": "md",
2090
+ "children": [
2091
+ {
2092
+ "type": "stack",
2093
+ "direction": "horizontal",
2094
+ "gap": "sm",
2095
+ "children": [
2096
+ {
2097
+ "type": "icon",
2098
+ "name": "plus-circle",
2099
+ "size": "md"
2100
+ },
2101
+ {
2102
+ "type": "typography",
2103
+ "content": "New FinanceReport",
2104
+ "variant": "h3"
2105
+ }
2106
+ ]
2107
+ },
2108
+ {
2109
+ "type": "divider"
2110
+ },
2111
+ {
2112
+ "type": "form-section",
2113
+ "entity": "FinanceReport",
2114
+ "mode": "create",
2115
+ "submitEvent": "SAVE",
2116
+ "cancelEvent": "CLOSE",
2117
+ "fields": [
2118
+ "title",
2119
+ "period",
2120
+ "total",
2121
+ "generatedAt"
2122
+ ]
2123
+ }
2124
+ ]
2125
+ }
2126
+ ]
2127
+ ]
2128
+ },
2129
+ {
2130
+ "from": "open",
2131
+ "to": "closed",
2132
+ "event": "CLOSE",
2133
+ "effects": [
2134
+ [
2135
+ "render-ui",
2136
+ "modal",
2137
+ null
2138
+ ]
2139
+ ]
2140
+ },
2141
+ {
2142
+ "from": "open",
2143
+ "to": "closed",
2144
+ "event": "SAVE",
2145
+ "effects": [
2146
+ [
2147
+ "persist",
2148
+ "create",
2149
+ "FinanceReport",
2150
+ "@payload.data"
2151
+ ],
2152
+ [
2153
+ "fetch",
2154
+ "FinanceReport"
2155
+ ],
2156
+ [
2157
+ "render-ui",
2158
+ "modal",
2159
+ null
2160
+ ],
2161
+ [
2162
+ "emit",
2163
+ "SAVE"
2164
+ ],
2165
+ [
2166
+ "notify",
2167
+ "FinanceReport created successfully"
2168
+ ]
2169
+ ]
2170
+ }
2171
+ ]
2172
+ }
2173
+ },
2174
+ {
2175
+ "name": "FinanceReportView",
2176
+ "linkedEntity": "FinanceReport",
2177
+ "category": "interaction",
2178
+ "stateMachine": {
2179
+ "states": [
2180
+ {
2181
+ "name": "closed",
2182
+ "isInitial": true
2183
+ },
2184
+ {
2185
+ "name": "open"
2186
+ }
2187
+ ],
2188
+ "events": [
2189
+ {
2190
+ "key": "INIT",
2191
+ "name": "Initialize"
2192
+ },
2193
+ {
2194
+ "key": "VIEW",
2195
+ "name": "Open",
2196
+ "payload": [
2197
+ {
2198
+ "name": "id",
2199
+ "type": "string",
2200
+ "required": true
2201
+ }
2202
+ ]
2203
+ },
2204
+ {
2205
+ "key": "CLOSE",
2206
+ "name": "Close"
2207
+ }
2208
+ ],
2209
+ "transitions": [
2210
+ {
2211
+ "from": "closed",
2212
+ "to": "closed",
2213
+ "event": "INIT",
2214
+ "effects": [
2215
+ [
2216
+ "fetch",
2217
+ "FinanceReport"
2218
+ ]
2219
+ ]
2220
+ },
2221
+ {
2222
+ "from": "closed",
2223
+ "to": "open",
2224
+ "event": "VIEW",
2225
+ "effects": [
2226
+ [
2227
+ "fetch",
2228
+ "FinanceReport",
2229
+ "@payload.id"
2230
+ ],
2231
+ [
2232
+ "render-ui",
2233
+ "modal",
2234
+ {
2235
+ "type": "stack",
2236
+ "direction": "vertical",
2237
+ "gap": "md",
2238
+ "children": [
2239
+ {
2240
+ "type": "stack",
2241
+ "direction": "horizontal",
2242
+ "gap": "sm",
2243
+ "align": "center",
2244
+ "children": [
2245
+ {
2246
+ "type": "icon",
2247
+ "name": "eye",
2248
+ "size": "md"
2249
+ },
2250
+ {
2251
+ "type": "typography",
2252
+ "variant": "h3",
2253
+ "content": "@entity.title"
2254
+ }
2255
+ ]
2256
+ },
2257
+ {
2258
+ "type": "divider"
2259
+ },
2260
+ {
2261
+ "type": "stack",
2262
+ "direction": "horizontal",
2263
+ "gap": "md",
2264
+ "children": [
2265
+ {
2266
+ "type": "typography",
2267
+ "variant": "caption",
2268
+ "content": "Title"
2269
+ },
2270
+ {
2271
+ "type": "typography",
2272
+ "variant": "body",
2273
+ "content": "@entity.title"
2274
+ }
2275
+ ]
2276
+ },
2277
+ {
2278
+ "type": "stack",
2279
+ "direction": "horizontal",
2280
+ "gap": "md",
2281
+ "children": [
2282
+ {
2283
+ "type": "typography",
2284
+ "variant": "caption",
2285
+ "content": "Period"
2286
+ },
2287
+ {
2288
+ "type": "typography",
2289
+ "variant": "body",
2290
+ "content": "@entity.period"
2291
+ }
2292
+ ]
2293
+ },
2294
+ {
2295
+ "type": "stack",
2296
+ "direction": "horizontal",
2297
+ "gap": "md",
2298
+ "children": [
2299
+ {
2300
+ "type": "typography",
2301
+ "variant": "caption",
2302
+ "content": "Total"
2303
+ },
2304
+ {
2305
+ "type": "typography",
2306
+ "variant": "body",
2307
+ "content": "@entity.total"
2308
+ }
2309
+ ]
2310
+ },
2311
+ {
2312
+ "type": "stack",
2313
+ "direction": "horizontal",
2314
+ "gap": "md",
2315
+ "children": [
2316
+ {
2317
+ "type": "typography",
2318
+ "variant": "caption",
2319
+ "content": "GeneratedAt"
2320
+ },
2321
+ {
2322
+ "type": "typography",
2323
+ "variant": "body",
2324
+ "content": "@entity.generatedAt"
2325
+ }
2326
+ ]
2327
+ },
2328
+ {
2329
+ "type": "divider"
2330
+ },
2331
+ {
2332
+ "type": "stack",
2333
+ "direction": "horizontal",
2334
+ "gap": "sm",
2335
+ "justify": "end",
2336
+ "children": [
2337
+ {
2338
+ "type": "button",
2339
+ "label": "Close",
2340
+ "event": "CLOSE",
2341
+ "variant": "ghost"
2342
+ }
2343
+ ]
2344
+ }
2345
+ ]
2346
+ }
2347
+ ]
2348
+ ]
2349
+ },
2350
+ {
2351
+ "from": "open",
2352
+ "to": "closed",
2353
+ "event": "CLOSE",
2354
+ "effects": [
2355
+ [
2356
+ "render-ui",
2357
+ "modal",
2358
+ null
2359
+ ]
2360
+ ]
2361
+ }
2362
+ ]
2363
+ }
2364
+ }
2365
+ ],
2366
+ "pages": [
2367
+ {
2368
+ "name": "ReportsPage",
2369
+ "path": "/reports",
2370
+ "traits": [
2371
+ {
2372
+ "ref": "FinanceReportBrowse"
2373
+ },
2374
+ {
2375
+ "ref": "FinanceReportCreate"
2376
+ },
2377
+ {
2378
+ "ref": "FinanceReportView"
2379
+ }
2380
+ ]
2381
+ }
2382
+ ]
2383
+ }
2384
+ ]
2385
+ }