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