@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,1221 @@
1
+ {
2
+ "name": "SocialFeed",
3
+ "version": "1.0.0",
4
+ "orbitals": [
5
+ {
6
+ "name": "PostOrbital",
7
+ "entity": {
8
+ "name": "Post",
9
+ "persistence": "runtime",
10
+ "fields": [
11
+ {
12
+ "name": "id",
13
+ "type": "string",
14
+ "required": true
15
+ },
16
+ {
17
+ "name": "title",
18
+ "type": "string",
19
+ "default": ""
20
+ },
21
+ {
22
+ "name": "content",
23
+ "type": "string",
24
+ "default": ""
25
+ },
26
+ {
27
+ "name": "author",
28
+ "type": "string",
29
+ "default": ""
30
+ },
31
+ {
32
+ "name": "createdAt",
33
+ "type": "string",
34
+ "default": ""
35
+ },
36
+ {
37
+ "name": "likes",
38
+ "type": "number",
39
+ "default": 0
40
+ }
41
+ ]
42
+ },
43
+ "traits": [
44
+ {
45
+ "name": "PostBrowse",
46
+ "linkedEntity": "Post",
47
+ "category": "interaction",
48
+ "listens": [
49
+ {
50
+ "event": "SAVE",
51
+ "triggers": "SAVE"
52
+ }
53
+ ],
54
+ "stateMachine": {
55
+ "states": [
56
+ {
57
+ "name": "browsing",
58
+ "isInitial": true
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": "SAVE",
83
+ "name": "SAVE",
84
+ "payload": [
85
+ {
86
+ "name": "data",
87
+ "type": "object",
88
+ "required": true
89
+ }
90
+ ]
91
+ }
92
+ ],
93
+ "transitions": [
94
+ {
95
+ "from": "browsing",
96
+ "to": "browsing",
97
+ "event": "INIT",
98
+ "effects": [
99
+ [
100
+ "fetch",
101
+ "Post"
102
+ ],
103
+ [
104
+ "render-ui",
105
+ "main",
106
+ {
107
+ "type": "stack",
108
+ "direction": "vertical",
109
+ "gap": "lg",
110
+ "children": [
111
+ {
112
+ "type": "stack",
113
+ "direction": "horizontal",
114
+ "gap": "md",
115
+ "justify": "space-between",
116
+ "children": [
117
+ {
118
+ "type": "stack",
119
+ "direction": "horizontal",
120
+ "gap": "sm",
121
+ "align": "center",
122
+ "children": [
123
+ {
124
+ "type": "icon",
125
+ "name": "rss",
126
+ "size": "lg"
127
+ },
128
+ {
129
+ "type": "typography",
130
+ "content": "Feed",
131
+ "variant": "h2"
132
+ }
133
+ ]
134
+ },
135
+ {
136
+ "type": "stack",
137
+ "direction": "horizontal",
138
+ "gap": "sm",
139
+ "children": [
140
+ {
141
+ "type": "button",
142
+ "label": "New Post",
143
+ "event": "CREATE",
144
+ "variant": "primary",
145
+ "icon": "plus"
146
+ }
147
+ ]
148
+ }
149
+ ]
150
+ },
151
+ {
152
+ "type": "divider"
153
+ },
154
+ {
155
+ "type": "data-grid",
156
+ "entity": "Post",
157
+ "emptyIcon": "inbox",
158
+ "emptyTitle": "No posts yet",
159
+ "emptyDescription": "Create your first post to get started.",
160
+ "itemActions": [
161
+ {
162
+ "label": "View",
163
+ "event": "VIEW"
164
+ }
165
+ ],
166
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
167
+ "children": [
168
+ {
169
+ "type": "stack",
170
+ "direction": "vertical",
171
+ "gap": "sm",
172
+ "children": [
173
+ {
174
+ "type": "stack",
175
+ "direction": "horizontal",
176
+ "justify": "space-between",
177
+ "align": "center",
178
+ "children": [
179
+ {
180
+ "type": "stack",
181
+ "direction": "horizontal",
182
+ "gap": "sm",
183
+ "align": "center",
184
+ "children": [
185
+ {
186
+ "type": "icon",
187
+ "name": "rss",
188
+ "size": "sm"
189
+ },
190
+ {
191
+ "type": "typography",
192
+ "variant": "h4",
193
+ "content": "@entity.title"
194
+ }
195
+ ]
196
+ },
197
+ {
198
+ "type": "badge",
199
+ "label": "@entity.content"
200
+ }
201
+ ]
202
+ },
203
+ {
204
+ "type": "typography",
205
+ "variant": "caption",
206
+ "color": "muted",
207
+ "content": "@entity.author"
208
+ }
209
+ ]
210
+ }
211
+ ]
212
+ }
213
+ ]
214
+ }
215
+ ]
216
+ ]
217
+ },
218
+ {
219
+ "from": "browsing",
220
+ "to": "browsing",
221
+ "event": "SAVE",
222
+ "effects": [
223
+ [
224
+ "fetch",
225
+ "Post"
226
+ ]
227
+ ]
228
+ }
229
+ ]
230
+ },
231
+ "emits": [
232
+ {
233
+ "event": "COMMENT",
234
+ "description": "Navigate to comments for a post",
235
+ "payload": [
236
+ {
237
+ "name": "id",
238
+ "type": "string",
239
+ "required": true
240
+ }
241
+ ],
242
+ "scope": "external"
243
+ }
244
+ ]
245
+ },
246
+ {
247
+ "name": "PostCreate",
248
+ "linkedEntity": "Post",
249
+ "category": "interaction",
250
+ "emits": [
251
+ {
252
+ "event": "SAVE"
253
+ }
254
+ ],
255
+ "stateMachine": {
256
+ "states": [
257
+ {
258
+ "name": "closed",
259
+ "isInitial": true
260
+ },
261
+ {
262
+ "name": "open"
263
+ }
264
+ ],
265
+ "events": [
266
+ {
267
+ "key": "INIT",
268
+ "name": "Initialize"
269
+ },
270
+ {
271
+ "key": "CREATE",
272
+ "name": "Open"
273
+ },
274
+ {
275
+ "key": "CLOSE",
276
+ "name": "Close"
277
+ },
278
+ {
279
+ "key": "SAVE",
280
+ "name": "Save",
281
+ "payload": [
282
+ {
283
+ "name": "data",
284
+ "type": "object",
285
+ "required": true
286
+ }
287
+ ]
288
+ }
289
+ ],
290
+ "transitions": [
291
+ {
292
+ "from": "closed",
293
+ "to": "closed",
294
+ "event": "INIT",
295
+ "effects": [
296
+ [
297
+ "fetch",
298
+ "Post"
299
+ ]
300
+ ]
301
+ },
302
+ {
303
+ "from": "closed",
304
+ "to": "open",
305
+ "event": "CREATE",
306
+ "effects": [
307
+ [
308
+ "fetch",
309
+ "Post"
310
+ ],
311
+ [
312
+ "render-ui",
313
+ "modal",
314
+ {
315
+ "type": "stack",
316
+ "direction": "vertical",
317
+ "gap": "md",
318
+ "children": [
319
+ {
320
+ "type": "stack",
321
+ "direction": "horizontal",
322
+ "gap": "sm",
323
+ "children": [
324
+ {
325
+ "type": "icon",
326
+ "name": "plus-circle",
327
+ "size": "md"
328
+ },
329
+ {
330
+ "type": "typography",
331
+ "content": "Create Post",
332
+ "variant": "h3"
333
+ }
334
+ ]
335
+ },
336
+ {
337
+ "type": "divider"
338
+ },
339
+ {
340
+ "type": "form-section",
341
+ "entity": "Post",
342
+ "mode": "create",
343
+ "submitEvent": "SAVE",
344
+ "cancelEvent": "CLOSE",
345
+ "fields": [
346
+ "title",
347
+ "content",
348
+ "author",
349
+ "createdAt",
350
+ "likes"
351
+ ]
352
+ }
353
+ ]
354
+ }
355
+ ]
356
+ ]
357
+ },
358
+ {
359
+ "from": "open",
360
+ "to": "closed",
361
+ "event": "CLOSE",
362
+ "effects": [
363
+ [
364
+ "render-ui",
365
+ "modal",
366
+ null
367
+ ]
368
+ ]
369
+ },
370
+ {
371
+ "from": "open",
372
+ "to": "closed",
373
+ "event": "SAVE",
374
+ "effects": [
375
+ [
376
+ "persist",
377
+ "create",
378
+ "Post",
379
+ "@payload.data"
380
+ ],
381
+ [
382
+ "fetch",
383
+ "Post"
384
+ ],
385
+ [
386
+ "render-ui",
387
+ "modal",
388
+ null
389
+ ],
390
+ [
391
+ "emit",
392
+ "SAVE"
393
+ ],
394
+ [
395
+ "notify",
396
+ "Post created successfully"
397
+ ]
398
+ ]
399
+ }
400
+ ]
401
+ }
402
+ },
403
+ {
404
+ "name": "PostView",
405
+ "linkedEntity": "Post",
406
+ "category": "interaction",
407
+ "stateMachine": {
408
+ "states": [
409
+ {
410
+ "name": "closed",
411
+ "isInitial": true
412
+ },
413
+ {
414
+ "name": "open"
415
+ }
416
+ ],
417
+ "events": [
418
+ {
419
+ "key": "INIT",
420
+ "name": "Initialize"
421
+ },
422
+ {
423
+ "key": "VIEW",
424
+ "name": "Open",
425
+ "payload": [
426
+ {
427
+ "name": "id",
428
+ "type": "string",
429
+ "required": true
430
+ }
431
+ ]
432
+ },
433
+ {
434
+ "key": "CLOSE",
435
+ "name": "Close"
436
+ }
437
+ ],
438
+ "transitions": [
439
+ {
440
+ "from": "closed",
441
+ "to": "closed",
442
+ "event": "INIT",
443
+ "effects": [
444
+ [
445
+ "fetch",
446
+ "Post"
447
+ ]
448
+ ]
449
+ },
450
+ {
451
+ "from": "closed",
452
+ "to": "open",
453
+ "event": "VIEW",
454
+ "effects": [
455
+ [
456
+ "fetch",
457
+ "Post",
458
+ "@payload.id"
459
+ ],
460
+ [
461
+ "render-ui",
462
+ "modal",
463
+ {
464
+ "type": "stack",
465
+ "direction": "vertical",
466
+ "gap": "md",
467
+ "children": [
468
+ {
469
+ "type": "stack",
470
+ "direction": "horizontal",
471
+ "gap": "sm",
472
+ "align": "center",
473
+ "children": [
474
+ {
475
+ "type": "icon",
476
+ "name": "eye",
477
+ "size": "md"
478
+ },
479
+ {
480
+ "type": "typography",
481
+ "variant": "h3",
482
+ "content": "@entity.title"
483
+ }
484
+ ]
485
+ },
486
+ {
487
+ "type": "divider"
488
+ },
489
+ {
490
+ "type": "stack",
491
+ "direction": "horizontal",
492
+ "gap": "md",
493
+ "children": [
494
+ {
495
+ "type": "typography",
496
+ "variant": "caption",
497
+ "content": "Title"
498
+ },
499
+ {
500
+ "type": "typography",
501
+ "variant": "body",
502
+ "content": "@entity.title"
503
+ }
504
+ ]
505
+ },
506
+ {
507
+ "type": "stack",
508
+ "direction": "horizontal",
509
+ "gap": "md",
510
+ "children": [
511
+ {
512
+ "type": "typography",
513
+ "variant": "caption",
514
+ "content": "Content"
515
+ },
516
+ {
517
+ "type": "typography",
518
+ "variant": "body",
519
+ "content": "@entity.content"
520
+ }
521
+ ]
522
+ },
523
+ {
524
+ "type": "stack",
525
+ "direction": "horizontal",
526
+ "gap": "md",
527
+ "children": [
528
+ {
529
+ "type": "typography",
530
+ "variant": "caption",
531
+ "content": "Author"
532
+ },
533
+ {
534
+ "type": "typography",
535
+ "variant": "body",
536
+ "content": "@entity.author"
537
+ }
538
+ ]
539
+ },
540
+ {
541
+ "type": "stack",
542
+ "direction": "horizontal",
543
+ "gap": "md",
544
+ "children": [
545
+ {
546
+ "type": "typography",
547
+ "variant": "caption",
548
+ "content": "CreatedAt"
549
+ },
550
+ {
551
+ "type": "typography",
552
+ "variant": "body",
553
+ "content": "@entity.createdAt"
554
+ }
555
+ ]
556
+ },
557
+ {
558
+ "type": "stack",
559
+ "direction": "horizontal",
560
+ "gap": "md",
561
+ "children": [
562
+ {
563
+ "type": "typography",
564
+ "variant": "caption",
565
+ "content": "Likes"
566
+ },
567
+ {
568
+ "type": "typography",
569
+ "variant": "body",
570
+ "content": "@entity.likes"
571
+ }
572
+ ]
573
+ },
574
+ {
575
+ "type": "divider"
576
+ },
577
+ {
578
+ "type": "stack",
579
+ "direction": "horizontal",
580
+ "gap": "sm",
581
+ "justify": "end",
582
+ "children": [
583
+ {
584
+ "type": "button",
585
+ "label": "Close",
586
+ "event": "CLOSE",
587
+ "variant": "ghost"
588
+ }
589
+ ]
590
+ }
591
+ ]
592
+ }
593
+ ]
594
+ ]
595
+ },
596
+ {
597
+ "from": "open",
598
+ "to": "closed",
599
+ "event": "CLOSE",
600
+ "effects": [
601
+ [
602
+ "render-ui",
603
+ "modal",
604
+ null
605
+ ]
606
+ ]
607
+ }
608
+ ]
609
+ }
610
+ }
611
+ ],
612
+ "pages": [
613
+ {
614
+ "name": "FeedPage",
615
+ "path": "/feed",
616
+ "isInitial": true,
617
+ "traits": [
618
+ {
619
+ "ref": "PostBrowse"
620
+ },
621
+ {
622
+ "ref": "PostCreate"
623
+ },
624
+ {
625
+ "ref": "PostView"
626
+ }
627
+ ]
628
+ }
629
+ ]
630
+ },
631
+ {
632
+ "name": "CommentOrbital",
633
+ "entity": {
634
+ "name": "Comment",
635
+ "persistence": "runtime",
636
+ "fields": [
637
+ {
638
+ "name": "id",
639
+ "type": "string",
640
+ "required": true
641
+ },
642
+ {
643
+ "name": "body",
644
+ "type": "string",
645
+ "default": ""
646
+ },
647
+ {
648
+ "name": "author",
649
+ "type": "string",
650
+ "default": ""
651
+ },
652
+ {
653
+ "name": "postId",
654
+ "type": "string",
655
+ "default": ""
656
+ },
657
+ {
658
+ "name": "createdAt",
659
+ "type": "string",
660
+ "default": ""
661
+ }
662
+ ]
663
+ },
664
+ "traits": [
665
+ {
666
+ "name": "CommentBrowse",
667
+ "linkedEntity": "Comment",
668
+ "category": "interaction",
669
+ "listens": [
670
+ {
671
+ "event": "SEND",
672
+ "triggers": "SEND"
673
+ },
674
+ {
675
+ "event": "COMMENT",
676
+ "triggers": "INIT",
677
+ "scope": "external"
678
+ }
679
+ ],
680
+ "stateMachine": {
681
+ "states": [
682
+ {
683
+ "name": "browsing",
684
+ "isInitial": true
685
+ }
686
+ ],
687
+ "events": [
688
+ {
689
+ "key": "INIT",
690
+ "name": "Initialize"
691
+ },
692
+ {
693
+ "key": "COMPOSE",
694
+ "name": "COMPOSE"
695
+ },
696
+ {
697
+ "key": "VIEW",
698
+ "name": "VIEW",
699
+ "payload": [
700
+ {
701
+ "name": "id",
702
+ "type": "string",
703
+ "required": true
704
+ }
705
+ ]
706
+ },
707
+ {
708
+ "key": "SEND",
709
+ "name": "SEND",
710
+ "payload": [
711
+ {
712
+ "name": "data",
713
+ "type": "object",
714
+ "required": true
715
+ }
716
+ ]
717
+ }
718
+ ],
719
+ "transitions": [
720
+ {
721
+ "from": "browsing",
722
+ "to": "browsing",
723
+ "event": "INIT",
724
+ "effects": [
725
+ [
726
+ "fetch",
727
+ "Comment"
728
+ ],
729
+ [
730
+ "render-ui",
731
+ "main",
732
+ {
733
+ "type": "stack",
734
+ "direction": "vertical",
735
+ "gap": "lg",
736
+ "children": [
737
+ {
738
+ "type": "stack",
739
+ "direction": "horizontal",
740
+ "gap": "md",
741
+ "justify": "space-between",
742
+ "children": [
743
+ {
744
+ "type": "stack",
745
+ "direction": "horizontal",
746
+ "gap": "sm",
747
+ "align": "center",
748
+ "children": [
749
+ {
750
+ "type": "icon",
751
+ "name": "message-circle",
752
+ "size": "lg"
753
+ },
754
+ {
755
+ "type": "typography",
756
+ "content": "Messages",
757
+ "variant": "h2"
758
+ }
759
+ ]
760
+ },
761
+ {
762
+ "type": "stack",
763
+ "direction": "horizontal",
764
+ "gap": "sm",
765
+ "children": [
766
+ {
767
+ "type": "button",
768
+ "label": "Compose",
769
+ "event": "COMPOSE",
770
+ "variant": "primary",
771
+ "icon": "edit"
772
+ }
773
+ ]
774
+ }
775
+ ]
776
+ },
777
+ {
778
+ "type": "divider"
779
+ },
780
+ {
781
+ "type": "data-grid",
782
+ "entity": "Comment",
783
+ "emptyIcon": "inbox",
784
+ "emptyTitle": "No messages yet",
785
+ "emptyDescription": "Start a new conversation.",
786
+ "itemActions": [
787
+ {
788
+ "label": "View",
789
+ "event": "VIEW"
790
+ }
791
+ ],
792
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
793
+ "children": [
794
+ {
795
+ "type": "stack",
796
+ "direction": "vertical",
797
+ "gap": "sm",
798
+ "children": [
799
+ {
800
+ "type": "stack",
801
+ "direction": "horizontal",
802
+ "justify": "space-between",
803
+ "align": "center",
804
+ "children": [
805
+ {
806
+ "type": "stack",
807
+ "direction": "horizontal",
808
+ "gap": "sm",
809
+ "align": "center",
810
+ "children": [
811
+ {
812
+ "type": "icon",
813
+ "name": "message-circle",
814
+ "size": "sm"
815
+ },
816
+ {
817
+ "type": "typography",
818
+ "variant": "h4",
819
+ "content": "@entity.body"
820
+ }
821
+ ]
822
+ },
823
+ {
824
+ "type": "badge",
825
+ "label": "@entity.author"
826
+ }
827
+ ]
828
+ },
829
+ {
830
+ "type": "typography",
831
+ "variant": "caption",
832
+ "color": "muted",
833
+ "content": "@entity.postId"
834
+ }
835
+ ]
836
+ }
837
+ ]
838
+ }
839
+ ]
840
+ }
841
+ ]
842
+ ]
843
+ },
844
+ {
845
+ "from": "browsing",
846
+ "to": "browsing",
847
+ "event": "SEND",
848
+ "effects": [
849
+ [
850
+ "fetch",
851
+ "Comment"
852
+ ]
853
+ ]
854
+ }
855
+ ]
856
+ }
857
+ },
858
+ {
859
+ "name": "CommentCompose",
860
+ "linkedEntity": "Comment",
861
+ "category": "interaction",
862
+ "emits": [
863
+ {
864
+ "event": "SEND"
865
+ }
866
+ ],
867
+ "stateMachine": {
868
+ "states": [
869
+ {
870
+ "name": "closed",
871
+ "isInitial": true
872
+ },
873
+ {
874
+ "name": "open"
875
+ }
876
+ ],
877
+ "events": [
878
+ {
879
+ "key": "INIT",
880
+ "name": "Initialize"
881
+ },
882
+ {
883
+ "key": "COMPOSE",
884
+ "name": "Open"
885
+ },
886
+ {
887
+ "key": "CLOSE",
888
+ "name": "Close"
889
+ },
890
+ {
891
+ "key": "SEND",
892
+ "name": "Save",
893
+ "payload": [
894
+ {
895
+ "name": "data",
896
+ "type": "object",
897
+ "required": true
898
+ }
899
+ ]
900
+ }
901
+ ],
902
+ "transitions": [
903
+ {
904
+ "from": "closed",
905
+ "to": "closed",
906
+ "event": "INIT",
907
+ "effects": [
908
+ [
909
+ "fetch",
910
+ "Comment"
911
+ ]
912
+ ]
913
+ },
914
+ {
915
+ "from": "closed",
916
+ "to": "open",
917
+ "event": "COMPOSE",
918
+ "effects": [
919
+ [
920
+ "render-ui",
921
+ "modal",
922
+ {
923
+ "type": "stack",
924
+ "direction": "vertical",
925
+ "gap": "md",
926
+ "children": [
927
+ {
928
+ "type": "stack",
929
+ "direction": "horizontal",
930
+ "gap": "sm",
931
+ "children": [
932
+ {
933
+ "type": "icon",
934
+ "name": "edit",
935
+ "size": "md"
936
+ },
937
+ {
938
+ "type": "typography",
939
+ "content": "New Comment",
940
+ "variant": "h3"
941
+ }
942
+ ]
943
+ },
944
+ {
945
+ "type": "divider"
946
+ },
947
+ {
948
+ "type": "form-section",
949
+ "entity": "Comment",
950
+ "mode": "create",
951
+ "submitEvent": "SEND",
952
+ "cancelEvent": "CLOSE",
953
+ "fields": [
954
+ "body",
955
+ "author",
956
+ "postId",
957
+ "createdAt"
958
+ ]
959
+ }
960
+ ]
961
+ }
962
+ ]
963
+ ]
964
+ },
965
+ {
966
+ "from": "open",
967
+ "to": "closed",
968
+ "event": "CLOSE",
969
+ "effects": [
970
+ [
971
+ "render-ui",
972
+ "modal",
973
+ null
974
+ ]
975
+ ]
976
+ },
977
+ {
978
+ "from": "open",
979
+ "to": "closed",
980
+ "event": "SEND",
981
+ "effects": [
982
+ [
983
+ "persist",
984
+ "create",
985
+ "Comment",
986
+ "@payload.data"
987
+ ],
988
+ [
989
+ "fetch",
990
+ "Comment"
991
+ ],
992
+ [
993
+ "render-ui",
994
+ "modal",
995
+ null
996
+ ],
997
+ [
998
+ "emit",
999
+ "SEND"
1000
+ ],
1001
+ [
1002
+ "notify",
1003
+ "Comment created successfully"
1004
+ ]
1005
+ ]
1006
+ }
1007
+ ]
1008
+ }
1009
+ },
1010
+ {
1011
+ "name": "CommentView",
1012
+ "linkedEntity": "Comment",
1013
+ "category": "interaction",
1014
+ "stateMachine": {
1015
+ "states": [
1016
+ {
1017
+ "name": "closed",
1018
+ "isInitial": true
1019
+ },
1020
+ {
1021
+ "name": "open"
1022
+ }
1023
+ ],
1024
+ "events": [
1025
+ {
1026
+ "key": "INIT",
1027
+ "name": "Initialize"
1028
+ },
1029
+ {
1030
+ "key": "VIEW",
1031
+ "name": "Open",
1032
+ "payload": [
1033
+ {
1034
+ "name": "id",
1035
+ "type": "string",
1036
+ "required": true
1037
+ }
1038
+ ]
1039
+ },
1040
+ {
1041
+ "key": "CLOSE",
1042
+ "name": "Close"
1043
+ }
1044
+ ],
1045
+ "transitions": [
1046
+ {
1047
+ "from": "closed",
1048
+ "to": "closed",
1049
+ "event": "INIT",
1050
+ "effects": [
1051
+ [
1052
+ "fetch",
1053
+ "Comment"
1054
+ ]
1055
+ ]
1056
+ },
1057
+ {
1058
+ "from": "closed",
1059
+ "to": "open",
1060
+ "event": "VIEW",
1061
+ "effects": [
1062
+ [
1063
+ "fetch",
1064
+ "Comment",
1065
+ "@payload.id"
1066
+ ],
1067
+ [
1068
+ "render-ui",
1069
+ "modal",
1070
+ {
1071
+ "type": "stack",
1072
+ "direction": "vertical",
1073
+ "gap": "md",
1074
+ "children": [
1075
+ {
1076
+ "type": "stack",
1077
+ "direction": "horizontal",
1078
+ "gap": "sm",
1079
+ "align": "center",
1080
+ "children": [
1081
+ {
1082
+ "type": "icon",
1083
+ "name": "eye",
1084
+ "size": "md"
1085
+ },
1086
+ {
1087
+ "type": "typography",
1088
+ "variant": "h3",
1089
+ "content": "@entity.body"
1090
+ }
1091
+ ]
1092
+ },
1093
+ {
1094
+ "type": "divider"
1095
+ },
1096
+ {
1097
+ "type": "stack",
1098
+ "direction": "horizontal",
1099
+ "gap": "md",
1100
+ "children": [
1101
+ {
1102
+ "type": "typography",
1103
+ "variant": "caption",
1104
+ "content": "Body"
1105
+ },
1106
+ {
1107
+ "type": "typography",
1108
+ "variant": "body",
1109
+ "content": "@entity.body"
1110
+ }
1111
+ ]
1112
+ },
1113
+ {
1114
+ "type": "stack",
1115
+ "direction": "horizontal",
1116
+ "gap": "md",
1117
+ "children": [
1118
+ {
1119
+ "type": "typography",
1120
+ "variant": "caption",
1121
+ "content": "Author"
1122
+ },
1123
+ {
1124
+ "type": "typography",
1125
+ "variant": "body",
1126
+ "content": "@entity.author"
1127
+ }
1128
+ ]
1129
+ },
1130
+ {
1131
+ "type": "stack",
1132
+ "direction": "horizontal",
1133
+ "gap": "md",
1134
+ "children": [
1135
+ {
1136
+ "type": "typography",
1137
+ "variant": "caption",
1138
+ "content": "PostId"
1139
+ },
1140
+ {
1141
+ "type": "typography",
1142
+ "variant": "body",
1143
+ "content": "@entity.postId"
1144
+ }
1145
+ ]
1146
+ },
1147
+ {
1148
+ "type": "stack",
1149
+ "direction": "horizontal",
1150
+ "gap": "md",
1151
+ "children": [
1152
+ {
1153
+ "type": "typography",
1154
+ "variant": "caption",
1155
+ "content": "CreatedAt"
1156
+ },
1157
+ {
1158
+ "type": "typography",
1159
+ "variant": "body",
1160
+ "content": "@entity.createdAt"
1161
+ }
1162
+ ]
1163
+ },
1164
+ {
1165
+ "type": "divider"
1166
+ },
1167
+ {
1168
+ "type": "stack",
1169
+ "direction": "horizontal",
1170
+ "gap": "sm",
1171
+ "justify": "end",
1172
+ "children": [
1173
+ {
1174
+ "type": "button",
1175
+ "label": "Close",
1176
+ "event": "CLOSE",
1177
+ "variant": "ghost"
1178
+ }
1179
+ ]
1180
+ }
1181
+ ]
1182
+ }
1183
+ ]
1184
+ ]
1185
+ },
1186
+ {
1187
+ "from": "open",
1188
+ "to": "closed",
1189
+ "event": "CLOSE",
1190
+ "effects": [
1191
+ [
1192
+ "render-ui",
1193
+ "modal",
1194
+ null
1195
+ ]
1196
+ ]
1197
+ }
1198
+ ]
1199
+ }
1200
+ }
1201
+ ],
1202
+ "pages": [
1203
+ {
1204
+ "name": "MessagesPage",
1205
+ "path": "/messages",
1206
+ "traits": [
1207
+ {
1208
+ "ref": "CommentBrowse"
1209
+ },
1210
+ {
1211
+ "ref": "CommentCompose"
1212
+ },
1213
+ {
1214
+ "ref": "CommentView"
1215
+ }
1216
+ ]
1217
+ }
1218
+ ]
1219
+ }
1220
+ ]
1221
+ }