@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,3541 @@
1
+ {
2
+ "name": "CRM",
3
+ "version": "1.0.0",
4
+ "orbitals": [
5
+ {
6
+ "name": "ContactOrbital",
7
+ "entity": {
8
+ "name": "Contact",
9
+ "persistence": "runtime",
10
+ "fields": [
11
+ {
12
+ "name": "id",
13
+ "type": "string",
14
+ "required": true
15
+ },
16
+ {
17
+ "name": "name",
18
+ "type": "string",
19
+ "default": ""
20
+ },
21
+ {
22
+ "name": "company",
23
+ "type": "string",
24
+ "default": ""
25
+ },
26
+ {
27
+ "name": "email",
28
+ "type": "string",
29
+ "default": ""
30
+ },
31
+ {
32
+ "name": "phone",
33
+ "type": "string",
34
+ "default": ""
35
+ },
36
+ {
37
+ "name": "status",
38
+ "type": "string",
39
+ "default": "lead"
40
+ }
41
+ ]
42
+ },
43
+ "traits": [
44
+ {
45
+ "name": "ContactBrowse",
46
+ "linkedEntity": "Contact",
47
+ "category": "interaction",
48
+ "listens": [
49
+ {
50
+ "event": "CONTACT_CREATED",
51
+ "triggers": "CONTACT_CREATED"
52
+ },
53
+ {
54
+ "event": "CONTACT_UPDATED",
55
+ "triggers": "CONTACT_UPDATED"
56
+ }
57
+ ],
58
+ "stateMachine": {
59
+ "states": [
60
+ {
61
+ "name": "browsing",
62
+ "isInitial": true
63
+ },
64
+ {
65
+ "name": "deleting"
66
+ }
67
+ ],
68
+ "events": [
69
+ {
70
+ "key": "INIT",
71
+ "name": "Initialize"
72
+ },
73
+ {
74
+ "key": "CREATE",
75
+ "name": "CREATE"
76
+ },
77
+ {
78
+ "key": "VIEW",
79
+ "name": "VIEW",
80
+ "payload": [
81
+ {
82
+ "name": "id",
83
+ "type": "string",
84
+ "required": true
85
+ }
86
+ ]
87
+ },
88
+ {
89
+ "key": "EDIT",
90
+ "name": "EDIT",
91
+ "payload": [
92
+ {
93
+ "name": "id",
94
+ "type": "string",
95
+ "required": true
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "key": "DELETE",
101
+ "name": "DELETE",
102
+ "payload": [
103
+ {
104
+ "name": "id",
105
+ "type": "string",
106
+ "required": true
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "key": "CONTACT_CREATED",
112
+ "name": "CONTACT_CREATED",
113
+ "payload": [
114
+ {
115
+ "name": "data",
116
+ "type": "object",
117
+ "required": true
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ "key": "CONTACT_UPDATED",
123
+ "name": "CONTACT_UPDATED",
124
+ "payload": [
125
+ {
126
+ "name": "data",
127
+ "type": "object",
128
+ "required": true
129
+ }
130
+ ]
131
+ },
132
+ {
133
+ "key": "CONFIRM_DELETE",
134
+ "name": "Confirm Delete"
135
+ },
136
+ {
137
+ "key": "CANCEL",
138
+ "name": "Cancel"
139
+ },
140
+ {
141
+ "key": "CLOSE",
142
+ "name": "Close"
143
+ }
144
+ ],
145
+ "transitions": [
146
+ {
147
+ "from": "browsing",
148
+ "to": "browsing",
149
+ "event": "INIT",
150
+ "effects": [
151
+ [
152
+ "fetch",
153
+ "Contact"
154
+ ],
155
+ [
156
+ "render-ui",
157
+ "main",
158
+ {
159
+ "type": "stack",
160
+ "direction": "vertical",
161
+ "gap": "lg",
162
+ "children": [
163
+ {
164
+ "type": "stack",
165
+ "direction": "horizontal",
166
+ "gap": "md",
167
+ "justify": "space-between",
168
+ "children": [
169
+ {
170
+ "type": "stack",
171
+ "direction": "horizontal",
172
+ "gap": "sm",
173
+ "align": "center",
174
+ "children": [
175
+ {
176
+ "type": "icon",
177
+ "name": "users",
178
+ "size": "lg"
179
+ },
180
+ {
181
+ "type": "typography",
182
+ "content": "Contacts",
183
+ "variant": "h2"
184
+ }
185
+ ]
186
+ },
187
+ {
188
+ "type": "stack",
189
+ "direction": "horizontal",
190
+ "gap": "sm",
191
+ "children": [
192
+ {
193
+ "type": "button",
194
+ "label": "Add Contact",
195
+ "event": "CREATE",
196
+ "variant": "primary",
197
+ "icon": "plus"
198
+ }
199
+ ]
200
+ }
201
+ ]
202
+ },
203
+ {
204
+ "type": "divider"
205
+ },
206
+ {
207
+ "type": "data-grid",
208
+ "entity": "Contact",
209
+ "emptyIcon": "inbox",
210
+ "emptyTitle": "No contacts yet",
211
+ "emptyDescription": "Create your first contact to get started.",
212
+ "itemActions": [
213
+ {
214
+ "label": "View",
215
+ "event": "VIEW"
216
+ },
217
+ {
218
+ "label": "Edit",
219
+ "event": "EDIT"
220
+ },
221
+ {
222
+ "label": "Delete",
223
+ "event": "DELETE",
224
+ "variant": "danger"
225
+ }
226
+ ],
227
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
228
+ "children": [
229
+ {
230
+ "type": "stack",
231
+ "direction": "vertical",
232
+ "gap": "sm",
233
+ "children": [
234
+ {
235
+ "type": "stack",
236
+ "direction": "horizontal",
237
+ "justify": "space-between",
238
+ "align": "center",
239
+ "children": [
240
+ {
241
+ "type": "stack",
242
+ "direction": "horizontal",
243
+ "gap": "sm",
244
+ "align": "center",
245
+ "children": [
246
+ {
247
+ "type": "icon",
248
+ "name": "users",
249
+ "size": "sm"
250
+ },
251
+ {
252
+ "type": "typography",
253
+ "variant": "h4",
254
+ "content": "@entity.name"
255
+ }
256
+ ]
257
+ },
258
+ {
259
+ "type": "badge",
260
+ "label": "@entity.company"
261
+ }
262
+ ]
263
+ },
264
+ {
265
+ "type": "typography",
266
+ "variant": "caption",
267
+ "color": "muted",
268
+ "content": "@entity.email"
269
+ }
270
+ ]
271
+ }
272
+ ]
273
+ }
274
+ ]
275
+ }
276
+ ]
277
+ ]
278
+ },
279
+ {
280
+ "from": "browsing",
281
+ "to": "browsing",
282
+ "event": "CONTACT_CREATED",
283
+ "effects": [
284
+ [
285
+ "fetch",
286
+ "Contact"
287
+ ]
288
+ ]
289
+ },
290
+ {
291
+ "from": "browsing",
292
+ "to": "browsing",
293
+ "event": "CONTACT_UPDATED",
294
+ "effects": [
295
+ [
296
+ "fetch",
297
+ "Contact"
298
+ ]
299
+ ]
300
+ },
301
+ {
302
+ "from": "browsing",
303
+ "to": "deleting",
304
+ "event": "DELETE",
305
+ "effects": [
306
+ [
307
+ "fetch",
308
+ "Contact",
309
+ "@payload.id"
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": "trash-2",
327
+ "size": "md"
328
+ },
329
+ {
330
+ "type": "typography",
331
+ "content": "Delete Contact",
332
+ "variant": "h3"
333
+ }
334
+ ]
335
+ },
336
+ {
337
+ "type": "divider"
338
+ },
339
+ {
340
+ "type": "typography",
341
+ "content": "Are you sure you want to delete this contact?",
342
+ "variant": "body"
343
+ },
344
+ {
345
+ "type": "stack",
346
+ "direction": "horizontal",
347
+ "gap": "sm",
348
+ "justify": "end",
349
+ "children": [
350
+ {
351
+ "type": "button",
352
+ "label": "Cancel",
353
+ "event": "CANCEL",
354
+ "variant": "ghost"
355
+ },
356
+ {
357
+ "type": "button",
358
+ "label": "Delete",
359
+ "event": "CONFIRM_DELETE",
360
+ "variant": "danger",
361
+ "icon": "trash"
362
+ }
363
+ ]
364
+ }
365
+ ]
366
+ }
367
+ ]
368
+ ]
369
+ },
370
+ {
371
+ "from": "deleting",
372
+ "to": "browsing",
373
+ "event": "CONFIRM_DELETE",
374
+ "effects": [
375
+ [
376
+ "persist",
377
+ "delete",
378
+ "Contact",
379
+ "@entity.id"
380
+ ],
381
+ [
382
+ "render-ui",
383
+ "modal",
384
+ null
385
+ ],
386
+ [
387
+ "fetch",
388
+ "Contact"
389
+ ],
390
+ [
391
+ "notify",
392
+ "Contact deleted successfully"
393
+ ]
394
+ ]
395
+ },
396
+ {
397
+ "from": "deleting",
398
+ "to": "browsing",
399
+ "event": "CANCEL",
400
+ "effects": [
401
+ [
402
+ "render-ui",
403
+ "modal",
404
+ null
405
+ ]
406
+ ]
407
+ },
408
+ {
409
+ "from": "deleting",
410
+ "to": "browsing",
411
+ "event": "CLOSE",
412
+ "effects": [
413
+ [
414
+ "render-ui",
415
+ "modal",
416
+ null
417
+ ]
418
+ ]
419
+ }
420
+ ]
421
+ },
422
+ "emits": [
423
+ {
424
+ "event": "CONVERT_LEAD",
425
+ "description": "Convert contact lead to a deal",
426
+ "payload": [
427
+ {
428
+ "name": "id",
429
+ "type": "string",
430
+ "required": true
431
+ }
432
+ ],
433
+ "scope": "external"
434
+ }
435
+ ]
436
+ },
437
+ {
438
+ "name": "ContactCreate",
439
+ "linkedEntity": "Contact",
440
+ "category": "interaction",
441
+ "emits": [
442
+ {
443
+ "event": "CONTACT_CREATED"
444
+ }
445
+ ],
446
+ "stateMachine": {
447
+ "states": [
448
+ {
449
+ "name": "closed",
450
+ "isInitial": true
451
+ },
452
+ {
453
+ "name": "open"
454
+ }
455
+ ],
456
+ "events": [
457
+ {
458
+ "key": "INIT",
459
+ "name": "Initialize"
460
+ },
461
+ {
462
+ "key": "CREATE",
463
+ "name": "Open"
464
+ },
465
+ {
466
+ "key": "CLOSE",
467
+ "name": "Close"
468
+ },
469
+ {
470
+ "key": "SAVE",
471
+ "name": "Save",
472
+ "payload": [
473
+ {
474
+ "name": "data",
475
+ "type": "object",
476
+ "required": true
477
+ }
478
+ ]
479
+ }
480
+ ],
481
+ "transitions": [
482
+ {
483
+ "from": "closed",
484
+ "to": "closed",
485
+ "event": "INIT",
486
+ "effects": [
487
+ [
488
+ "fetch",
489
+ "Contact"
490
+ ]
491
+ ]
492
+ },
493
+ {
494
+ "from": "closed",
495
+ "to": "open",
496
+ "event": "CREATE",
497
+ "effects": [
498
+ [
499
+ "fetch",
500
+ "Contact"
501
+ ],
502
+ [
503
+ "render-ui",
504
+ "modal",
505
+ {
506
+ "type": "stack",
507
+ "direction": "vertical",
508
+ "gap": "md",
509
+ "children": [
510
+ {
511
+ "type": "stack",
512
+ "direction": "horizontal",
513
+ "gap": "sm",
514
+ "children": [
515
+ {
516
+ "type": "icon",
517
+ "name": "plus-circle",
518
+ "size": "md"
519
+ },
520
+ {
521
+ "type": "typography",
522
+ "content": "New Contact",
523
+ "variant": "h3"
524
+ }
525
+ ]
526
+ },
527
+ {
528
+ "type": "divider"
529
+ },
530
+ {
531
+ "type": "form-section",
532
+ "entity": "Contact",
533
+ "mode": "create",
534
+ "submitEvent": "SAVE",
535
+ "cancelEvent": "CLOSE",
536
+ "fields": [
537
+ "name",
538
+ "company",
539
+ "email",
540
+ "phone",
541
+ "status"
542
+ ]
543
+ }
544
+ ]
545
+ }
546
+ ]
547
+ ]
548
+ },
549
+ {
550
+ "from": "open",
551
+ "to": "closed",
552
+ "event": "CLOSE",
553
+ "effects": [
554
+ [
555
+ "render-ui",
556
+ "modal",
557
+ null
558
+ ]
559
+ ]
560
+ },
561
+ {
562
+ "from": "open",
563
+ "to": "closed",
564
+ "event": "SAVE",
565
+ "effects": [
566
+ [
567
+ "persist",
568
+ "create",
569
+ "Contact",
570
+ "@payload.data"
571
+ ],
572
+ [
573
+ "fetch",
574
+ "Contact"
575
+ ],
576
+ [
577
+ "render-ui",
578
+ "modal",
579
+ null
580
+ ],
581
+ [
582
+ "emit",
583
+ "CONTACT_CREATED"
584
+ ],
585
+ [
586
+ "notify",
587
+ "Contact created successfully"
588
+ ]
589
+ ]
590
+ }
591
+ ]
592
+ }
593
+ },
594
+ {
595
+ "name": "ContactEdit",
596
+ "linkedEntity": "Contact",
597
+ "category": "interaction",
598
+ "emits": [
599
+ {
600
+ "event": "CONTACT_UPDATED"
601
+ }
602
+ ],
603
+ "stateMachine": {
604
+ "states": [
605
+ {
606
+ "name": "closed",
607
+ "isInitial": true
608
+ },
609
+ {
610
+ "name": "open"
611
+ }
612
+ ],
613
+ "events": [
614
+ {
615
+ "key": "INIT",
616
+ "name": "Initialize"
617
+ },
618
+ {
619
+ "key": "EDIT",
620
+ "name": "Open",
621
+ "payload": [
622
+ {
623
+ "name": "id",
624
+ "type": "string",
625
+ "required": true
626
+ }
627
+ ]
628
+ },
629
+ {
630
+ "key": "CLOSE",
631
+ "name": "Close"
632
+ },
633
+ {
634
+ "key": "SAVE",
635
+ "name": "Save",
636
+ "payload": [
637
+ {
638
+ "name": "data",
639
+ "type": "object",
640
+ "required": true
641
+ }
642
+ ]
643
+ }
644
+ ],
645
+ "transitions": [
646
+ {
647
+ "from": "closed",
648
+ "to": "closed",
649
+ "event": "INIT",
650
+ "effects": [
651
+ [
652
+ "fetch",
653
+ "Contact"
654
+ ]
655
+ ]
656
+ },
657
+ {
658
+ "from": "closed",
659
+ "to": "open",
660
+ "event": "EDIT",
661
+ "effects": [
662
+ [
663
+ "fetch",
664
+ "Contact",
665
+ "@payload.id"
666
+ ],
667
+ [
668
+ "render-ui",
669
+ "modal",
670
+ {
671
+ "type": "stack",
672
+ "direction": "vertical",
673
+ "gap": "md",
674
+ "children": [
675
+ {
676
+ "type": "stack",
677
+ "direction": "horizontal",
678
+ "gap": "sm",
679
+ "children": [
680
+ {
681
+ "type": "icon",
682
+ "name": "edit",
683
+ "size": "md"
684
+ },
685
+ {
686
+ "type": "typography",
687
+ "content": "Edit Contact",
688
+ "variant": "h3"
689
+ }
690
+ ]
691
+ },
692
+ {
693
+ "type": "divider"
694
+ },
695
+ {
696
+ "type": "form-section",
697
+ "entity": "Contact",
698
+ "mode": "edit",
699
+ "submitEvent": "SAVE",
700
+ "cancelEvent": "CLOSE",
701
+ "fields": [
702
+ "name",
703
+ "company",
704
+ "email",
705
+ "phone",
706
+ "status"
707
+ ]
708
+ }
709
+ ]
710
+ }
711
+ ]
712
+ ]
713
+ },
714
+ {
715
+ "from": "open",
716
+ "to": "closed",
717
+ "event": "CLOSE",
718
+ "effects": [
719
+ [
720
+ "render-ui",
721
+ "modal",
722
+ null
723
+ ]
724
+ ]
725
+ },
726
+ {
727
+ "from": "open",
728
+ "to": "closed",
729
+ "event": "SAVE",
730
+ "effects": [
731
+ [
732
+ "persist",
733
+ "update",
734
+ "Contact",
735
+ "@payload.data"
736
+ ],
737
+ [
738
+ "fetch",
739
+ "Contact"
740
+ ],
741
+ [
742
+ "render-ui",
743
+ "modal",
744
+ null
745
+ ],
746
+ [
747
+ "emit",
748
+ "CONTACT_UPDATED"
749
+ ],
750
+ [
751
+ "notify",
752
+ "Contact updated successfully"
753
+ ]
754
+ ]
755
+ }
756
+ ]
757
+ }
758
+ },
759
+ {
760
+ "name": "ContactView",
761
+ "linkedEntity": "Contact",
762
+ "category": "interaction",
763
+ "stateMachine": {
764
+ "states": [
765
+ {
766
+ "name": "closed",
767
+ "isInitial": true
768
+ },
769
+ {
770
+ "name": "open"
771
+ }
772
+ ],
773
+ "events": [
774
+ {
775
+ "key": "INIT",
776
+ "name": "Initialize"
777
+ },
778
+ {
779
+ "key": "VIEW",
780
+ "name": "Open",
781
+ "payload": [
782
+ {
783
+ "name": "id",
784
+ "type": "string",
785
+ "required": true
786
+ }
787
+ ]
788
+ },
789
+ {
790
+ "key": "CLOSE",
791
+ "name": "Close"
792
+ }
793
+ ],
794
+ "transitions": [
795
+ {
796
+ "from": "closed",
797
+ "to": "closed",
798
+ "event": "INIT",
799
+ "effects": [
800
+ [
801
+ "fetch",
802
+ "Contact"
803
+ ]
804
+ ]
805
+ },
806
+ {
807
+ "from": "closed",
808
+ "to": "open",
809
+ "event": "VIEW",
810
+ "effects": [
811
+ [
812
+ "fetch",
813
+ "Contact",
814
+ "@payload.id"
815
+ ],
816
+ [
817
+ "render-ui",
818
+ "modal",
819
+ {
820
+ "type": "stack",
821
+ "direction": "vertical",
822
+ "gap": "md",
823
+ "children": [
824
+ {
825
+ "type": "stack",
826
+ "direction": "horizontal",
827
+ "gap": "sm",
828
+ "align": "center",
829
+ "children": [
830
+ {
831
+ "type": "icon",
832
+ "name": "eye",
833
+ "size": "md"
834
+ },
835
+ {
836
+ "type": "typography",
837
+ "variant": "h3",
838
+ "content": "@entity.name"
839
+ }
840
+ ]
841
+ },
842
+ {
843
+ "type": "divider"
844
+ },
845
+ {
846
+ "type": "stack",
847
+ "direction": "horizontal",
848
+ "gap": "md",
849
+ "children": [
850
+ {
851
+ "type": "typography",
852
+ "variant": "caption",
853
+ "content": "Name"
854
+ },
855
+ {
856
+ "type": "typography",
857
+ "variant": "body",
858
+ "content": "@entity.name"
859
+ }
860
+ ]
861
+ },
862
+ {
863
+ "type": "stack",
864
+ "direction": "horizontal",
865
+ "gap": "md",
866
+ "children": [
867
+ {
868
+ "type": "typography",
869
+ "variant": "caption",
870
+ "content": "Company"
871
+ },
872
+ {
873
+ "type": "typography",
874
+ "variant": "body",
875
+ "content": "@entity.company"
876
+ }
877
+ ]
878
+ },
879
+ {
880
+ "type": "stack",
881
+ "direction": "horizontal",
882
+ "gap": "md",
883
+ "children": [
884
+ {
885
+ "type": "typography",
886
+ "variant": "caption",
887
+ "content": "Email"
888
+ },
889
+ {
890
+ "type": "typography",
891
+ "variant": "body",
892
+ "content": "@entity.email"
893
+ }
894
+ ]
895
+ },
896
+ {
897
+ "type": "stack",
898
+ "direction": "horizontal",
899
+ "gap": "md",
900
+ "children": [
901
+ {
902
+ "type": "typography",
903
+ "variant": "caption",
904
+ "content": "Phone"
905
+ },
906
+ {
907
+ "type": "typography",
908
+ "variant": "body",
909
+ "content": "@entity.phone"
910
+ }
911
+ ]
912
+ },
913
+ {
914
+ "type": "stack",
915
+ "direction": "horizontal",
916
+ "gap": "md",
917
+ "children": [
918
+ {
919
+ "type": "typography",
920
+ "variant": "caption",
921
+ "content": "Status"
922
+ },
923
+ {
924
+ "type": "typography",
925
+ "variant": "body",
926
+ "content": "@entity.status"
927
+ }
928
+ ]
929
+ },
930
+ {
931
+ "type": "divider"
932
+ },
933
+ {
934
+ "type": "stack",
935
+ "direction": "horizontal",
936
+ "gap": "sm",
937
+ "justify": "end",
938
+ "children": [
939
+ {
940
+ "type": "button",
941
+ "label": "Edit",
942
+ "event": "EDIT",
943
+ "variant": "primary",
944
+ "icon": "edit"
945
+ },
946
+ {
947
+ "type": "button",
948
+ "label": "Close",
949
+ "event": "CLOSE",
950
+ "variant": "ghost"
951
+ }
952
+ ]
953
+ }
954
+ ]
955
+ }
956
+ ]
957
+ ]
958
+ },
959
+ {
960
+ "from": "open",
961
+ "to": "closed",
962
+ "event": "CLOSE",
963
+ "effects": [
964
+ [
965
+ "render-ui",
966
+ "modal",
967
+ null
968
+ ]
969
+ ]
970
+ }
971
+ ]
972
+ }
973
+ }
974
+ ],
975
+ "pages": [
976
+ {
977
+ "name": "ContactsPage",
978
+ "path": "/contacts",
979
+ "isInitial": true,
980
+ "traits": [
981
+ {
982
+ "ref": "ContactBrowse"
983
+ },
984
+ {
985
+ "ref": "ContactCreate"
986
+ },
987
+ {
988
+ "ref": "ContactEdit"
989
+ },
990
+ {
991
+ "ref": "ContactView"
992
+ }
993
+ ]
994
+ }
995
+ ]
996
+ },
997
+ {
998
+ "name": "DealOrbital",
999
+ "entity": {
1000
+ "name": "Deal",
1001
+ "persistence": "runtime",
1002
+ "fields": [
1003
+ {
1004
+ "name": "id",
1005
+ "type": "string",
1006
+ "required": true
1007
+ },
1008
+ {
1009
+ "name": "title",
1010
+ "type": "string",
1011
+ "default": ""
1012
+ },
1013
+ {
1014
+ "name": "contactId",
1015
+ "type": "string",
1016
+ "default": ""
1017
+ },
1018
+ {
1019
+ "name": "value",
1020
+ "type": "number",
1021
+ "default": 0
1022
+ },
1023
+ {
1024
+ "name": "stage",
1025
+ "type": "string",
1026
+ "default": "prospecting"
1027
+ },
1028
+ {
1029
+ "name": "closedAt",
1030
+ "type": "string",
1031
+ "default": ""
1032
+ }
1033
+ ]
1034
+ },
1035
+ "traits": [
1036
+ {
1037
+ "name": "DealBrowse",
1038
+ "linkedEntity": "Deal",
1039
+ "category": "interaction",
1040
+ "listens": [
1041
+ {
1042
+ "event": "DEAL_CREATED",
1043
+ "triggers": "DEAL_CREATED"
1044
+ },
1045
+ {
1046
+ "event": "DEAL_UPDATED",
1047
+ "triggers": "DEAL_UPDATED"
1048
+ },
1049
+ {
1050
+ "event": "CONVERT_LEAD",
1051
+ "triggers": "INIT",
1052
+ "scope": "external"
1053
+ }
1054
+ ],
1055
+ "stateMachine": {
1056
+ "states": [
1057
+ {
1058
+ "name": "browsing",
1059
+ "isInitial": true
1060
+ },
1061
+ {
1062
+ "name": "deleting"
1063
+ }
1064
+ ],
1065
+ "events": [
1066
+ {
1067
+ "key": "INIT",
1068
+ "name": "Initialize"
1069
+ },
1070
+ {
1071
+ "key": "CREATE",
1072
+ "name": "CREATE"
1073
+ },
1074
+ {
1075
+ "key": "VIEW",
1076
+ "name": "VIEW",
1077
+ "payload": [
1078
+ {
1079
+ "name": "id",
1080
+ "type": "string",
1081
+ "required": true
1082
+ }
1083
+ ]
1084
+ },
1085
+ {
1086
+ "key": "EDIT",
1087
+ "name": "EDIT",
1088
+ "payload": [
1089
+ {
1090
+ "name": "id",
1091
+ "type": "string",
1092
+ "required": true
1093
+ }
1094
+ ]
1095
+ },
1096
+ {
1097
+ "key": "DELETE",
1098
+ "name": "DELETE",
1099
+ "payload": [
1100
+ {
1101
+ "name": "id",
1102
+ "type": "string",
1103
+ "required": true
1104
+ }
1105
+ ]
1106
+ },
1107
+ {
1108
+ "key": "DEAL_CREATED",
1109
+ "name": "DEAL_CREATED",
1110
+ "payload": [
1111
+ {
1112
+ "name": "data",
1113
+ "type": "object",
1114
+ "required": true
1115
+ }
1116
+ ]
1117
+ },
1118
+ {
1119
+ "key": "DEAL_UPDATED",
1120
+ "name": "DEAL_UPDATED",
1121
+ "payload": [
1122
+ {
1123
+ "name": "data",
1124
+ "type": "object",
1125
+ "required": true
1126
+ }
1127
+ ]
1128
+ },
1129
+ {
1130
+ "key": "CONFIRM_DELETE",
1131
+ "name": "Confirm Delete"
1132
+ },
1133
+ {
1134
+ "key": "CANCEL",
1135
+ "name": "Cancel"
1136
+ },
1137
+ {
1138
+ "key": "CLOSE",
1139
+ "name": "Close"
1140
+ }
1141
+ ],
1142
+ "transitions": [
1143
+ {
1144
+ "from": "browsing",
1145
+ "to": "browsing",
1146
+ "event": "INIT",
1147
+ "effects": [
1148
+ [
1149
+ "fetch",
1150
+ "Deal"
1151
+ ],
1152
+ [
1153
+ "render-ui",
1154
+ "main",
1155
+ {
1156
+ "type": "stack",
1157
+ "direction": "vertical",
1158
+ "gap": "lg",
1159
+ "children": [
1160
+ {
1161
+ "type": "stack",
1162
+ "direction": "horizontal",
1163
+ "gap": "md",
1164
+ "justify": "space-between",
1165
+ "children": [
1166
+ {
1167
+ "type": "stack",
1168
+ "direction": "horizontal",
1169
+ "gap": "sm",
1170
+ "align": "center",
1171
+ "children": [
1172
+ {
1173
+ "type": "icon",
1174
+ "name": "briefcase",
1175
+ "size": "lg"
1176
+ },
1177
+ {
1178
+ "type": "typography",
1179
+ "content": "Deals",
1180
+ "variant": "h2"
1181
+ }
1182
+ ]
1183
+ },
1184
+ {
1185
+ "type": "stack",
1186
+ "direction": "horizontal",
1187
+ "gap": "sm",
1188
+ "children": [
1189
+ {
1190
+ "type": "button",
1191
+ "label": "New Deal",
1192
+ "event": "CREATE",
1193
+ "variant": "primary",
1194
+ "icon": "plus"
1195
+ }
1196
+ ]
1197
+ }
1198
+ ]
1199
+ },
1200
+ {
1201
+ "type": "divider"
1202
+ },
1203
+ {
1204
+ "type": "data-grid",
1205
+ "entity": "Deal",
1206
+ "emptyIcon": "inbox",
1207
+ "emptyTitle": "No deals yet",
1208
+ "emptyDescription": "Create your first deal to get started.",
1209
+ "itemActions": [
1210
+ {
1211
+ "label": "View",
1212
+ "event": "VIEW"
1213
+ },
1214
+ {
1215
+ "label": "Edit",
1216
+ "event": "EDIT"
1217
+ },
1218
+ {
1219
+ "label": "Delete",
1220
+ "event": "DELETE",
1221
+ "variant": "danger"
1222
+ }
1223
+ ],
1224
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
1225
+ "children": [
1226
+ {
1227
+ "type": "stack",
1228
+ "direction": "vertical",
1229
+ "gap": "sm",
1230
+ "children": [
1231
+ {
1232
+ "type": "stack",
1233
+ "direction": "horizontal",
1234
+ "justify": "space-between",
1235
+ "align": "center",
1236
+ "children": [
1237
+ {
1238
+ "type": "stack",
1239
+ "direction": "horizontal",
1240
+ "gap": "sm",
1241
+ "align": "center",
1242
+ "children": [
1243
+ {
1244
+ "type": "icon",
1245
+ "name": "briefcase",
1246
+ "size": "sm"
1247
+ },
1248
+ {
1249
+ "type": "typography",
1250
+ "variant": "h4",
1251
+ "content": "@entity.title"
1252
+ }
1253
+ ]
1254
+ },
1255
+ {
1256
+ "type": "badge",
1257
+ "label": "@entity.contactId"
1258
+ }
1259
+ ]
1260
+ },
1261
+ {
1262
+ "type": "typography",
1263
+ "variant": "caption",
1264
+ "color": "muted",
1265
+ "content": "@entity.value"
1266
+ }
1267
+ ]
1268
+ }
1269
+ ]
1270
+ }
1271
+ ]
1272
+ }
1273
+ ]
1274
+ ]
1275
+ },
1276
+ {
1277
+ "from": "browsing",
1278
+ "to": "browsing",
1279
+ "event": "DEAL_CREATED",
1280
+ "effects": [
1281
+ [
1282
+ "fetch",
1283
+ "Deal"
1284
+ ]
1285
+ ]
1286
+ },
1287
+ {
1288
+ "from": "browsing",
1289
+ "to": "browsing",
1290
+ "event": "DEAL_UPDATED",
1291
+ "effects": [
1292
+ [
1293
+ "fetch",
1294
+ "Deal"
1295
+ ]
1296
+ ]
1297
+ },
1298
+ {
1299
+ "from": "browsing",
1300
+ "to": "deleting",
1301
+ "event": "DELETE",
1302
+ "effects": [
1303
+ [
1304
+ "fetch",
1305
+ "Deal",
1306
+ "@payload.id"
1307
+ ],
1308
+ [
1309
+ "render-ui",
1310
+ "modal",
1311
+ {
1312
+ "type": "stack",
1313
+ "direction": "vertical",
1314
+ "gap": "md",
1315
+ "children": [
1316
+ {
1317
+ "type": "stack",
1318
+ "direction": "horizontal",
1319
+ "gap": "sm",
1320
+ "children": [
1321
+ {
1322
+ "type": "icon",
1323
+ "name": "trash-2",
1324
+ "size": "md"
1325
+ },
1326
+ {
1327
+ "type": "typography",
1328
+ "content": "Delete Deal",
1329
+ "variant": "h3"
1330
+ }
1331
+ ]
1332
+ },
1333
+ {
1334
+ "type": "divider"
1335
+ },
1336
+ {
1337
+ "type": "typography",
1338
+ "content": "Are you sure you want to delete this deal?",
1339
+ "variant": "body"
1340
+ },
1341
+ {
1342
+ "type": "stack",
1343
+ "direction": "horizontal",
1344
+ "gap": "sm",
1345
+ "justify": "end",
1346
+ "children": [
1347
+ {
1348
+ "type": "button",
1349
+ "label": "Cancel",
1350
+ "event": "CANCEL",
1351
+ "variant": "ghost"
1352
+ },
1353
+ {
1354
+ "type": "button",
1355
+ "label": "Delete",
1356
+ "event": "CONFIRM_DELETE",
1357
+ "variant": "danger",
1358
+ "icon": "trash"
1359
+ }
1360
+ ]
1361
+ }
1362
+ ]
1363
+ }
1364
+ ]
1365
+ ]
1366
+ },
1367
+ {
1368
+ "from": "deleting",
1369
+ "to": "browsing",
1370
+ "event": "CONFIRM_DELETE",
1371
+ "effects": [
1372
+ [
1373
+ "persist",
1374
+ "delete",
1375
+ "Deal",
1376
+ "@entity.id"
1377
+ ],
1378
+ [
1379
+ "render-ui",
1380
+ "modal",
1381
+ null
1382
+ ],
1383
+ [
1384
+ "fetch",
1385
+ "Deal"
1386
+ ],
1387
+ [
1388
+ "notify",
1389
+ "Deal deleted successfully"
1390
+ ]
1391
+ ]
1392
+ },
1393
+ {
1394
+ "from": "deleting",
1395
+ "to": "browsing",
1396
+ "event": "CANCEL",
1397
+ "effects": [
1398
+ [
1399
+ "render-ui",
1400
+ "modal",
1401
+ null
1402
+ ]
1403
+ ]
1404
+ },
1405
+ {
1406
+ "from": "deleting",
1407
+ "to": "browsing",
1408
+ "event": "CLOSE",
1409
+ "effects": [
1410
+ [
1411
+ "render-ui",
1412
+ "modal",
1413
+ null
1414
+ ]
1415
+ ]
1416
+ }
1417
+ ]
1418
+ },
1419
+ "emits": [
1420
+ {
1421
+ "event": "CLOSE_DEAL",
1422
+ "description": "Close a deal and update pipeline",
1423
+ "payload": [
1424
+ {
1425
+ "name": "id",
1426
+ "type": "string",
1427
+ "required": true
1428
+ }
1429
+ ],
1430
+ "scope": "external"
1431
+ }
1432
+ ]
1433
+ },
1434
+ {
1435
+ "name": "DealCreate",
1436
+ "linkedEntity": "Deal",
1437
+ "category": "interaction",
1438
+ "emits": [
1439
+ {
1440
+ "event": "DEAL_CREATED"
1441
+ }
1442
+ ],
1443
+ "stateMachine": {
1444
+ "states": [
1445
+ {
1446
+ "name": "closed",
1447
+ "isInitial": true
1448
+ },
1449
+ {
1450
+ "name": "open"
1451
+ }
1452
+ ],
1453
+ "events": [
1454
+ {
1455
+ "key": "INIT",
1456
+ "name": "Initialize"
1457
+ },
1458
+ {
1459
+ "key": "CREATE",
1460
+ "name": "Open"
1461
+ },
1462
+ {
1463
+ "key": "CLOSE",
1464
+ "name": "Close"
1465
+ },
1466
+ {
1467
+ "key": "SAVE",
1468
+ "name": "Save",
1469
+ "payload": [
1470
+ {
1471
+ "name": "data",
1472
+ "type": "object",
1473
+ "required": true
1474
+ }
1475
+ ]
1476
+ }
1477
+ ],
1478
+ "transitions": [
1479
+ {
1480
+ "from": "closed",
1481
+ "to": "closed",
1482
+ "event": "INIT",
1483
+ "effects": [
1484
+ [
1485
+ "fetch",
1486
+ "Deal"
1487
+ ]
1488
+ ]
1489
+ },
1490
+ {
1491
+ "from": "closed",
1492
+ "to": "open",
1493
+ "event": "CREATE",
1494
+ "effects": [
1495
+ [
1496
+ "fetch",
1497
+ "Deal"
1498
+ ],
1499
+ [
1500
+ "render-ui",
1501
+ "modal",
1502
+ {
1503
+ "type": "stack",
1504
+ "direction": "vertical",
1505
+ "gap": "md",
1506
+ "children": [
1507
+ {
1508
+ "type": "stack",
1509
+ "direction": "horizontal",
1510
+ "gap": "sm",
1511
+ "children": [
1512
+ {
1513
+ "type": "icon",
1514
+ "name": "plus-circle",
1515
+ "size": "md"
1516
+ },
1517
+ {
1518
+ "type": "typography",
1519
+ "content": "Create Deal",
1520
+ "variant": "h3"
1521
+ }
1522
+ ]
1523
+ },
1524
+ {
1525
+ "type": "divider"
1526
+ },
1527
+ {
1528
+ "type": "form-section",
1529
+ "entity": "Deal",
1530
+ "mode": "create",
1531
+ "submitEvent": "SAVE",
1532
+ "cancelEvent": "CLOSE",
1533
+ "fields": [
1534
+ "title",
1535
+ "contactId",
1536
+ "value",
1537
+ "stage",
1538
+ "closedAt"
1539
+ ]
1540
+ }
1541
+ ]
1542
+ }
1543
+ ]
1544
+ ]
1545
+ },
1546
+ {
1547
+ "from": "open",
1548
+ "to": "closed",
1549
+ "event": "CLOSE",
1550
+ "effects": [
1551
+ [
1552
+ "render-ui",
1553
+ "modal",
1554
+ null
1555
+ ]
1556
+ ]
1557
+ },
1558
+ {
1559
+ "from": "open",
1560
+ "to": "closed",
1561
+ "event": "SAVE",
1562
+ "effects": [
1563
+ [
1564
+ "persist",
1565
+ "create",
1566
+ "Deal",
1567
+ "@payload.data"
1568
+ ],
1569
+ [
1570
+ "fetch",
1571
+ "Deal"
1572
+ ],
1573
+ [
1574
+ "render-ui",
1575
+ "modal",
1576
+ null
1577
+ ],
1578
+ [
1579
+ "emit",
1580
+ "DEAL_CREATED"
1581
+ ],
1582
+ [
1583
+ "notify",
1584
+ "Deal created successfully"
1585
+ ]
1586
+ ]
1587
+ }
1588
+ ]
1589
+ }
1590
+ },
1591
+ {
1592
+ "name": "DealEdit",
1593
+ "linkedEntity": "Deal",
1594
+ "category": "interaction",
1595
+ "emits": [
1596
+ {
1597
+ "event": "DEAL_UPDATED"
1598
+ }
1599
+ ],
1600
+ "stateMachine": {
1601
+ "states": [
1602
+ {
1603
+ "name": "closed",
1604
+ "isInitial": true
1605
+ },
1606
+ {
1607
+ "name": "open"
1608
+ }
1609
+ ],
1610
+ "events": [
1611
+ {
1612
+ "key": "INIT",
1613
+ "name": "Initialize"
1614
+ },
1615
+ {
1616
+ "key": "EDIT",
1617
+ "name": "Open",
1618
+ "payload": [
1619
+ {
1620
+ "name": "id",
1621
+ "type": "string",
1622
+ "required": true
1623
+ }
1624
+ ]
1625
+ },
1626
+ {
1627
+ "key": "CLOSE",
1628
+ "name": "Close"
1629
+ },
1630
+ {
1631
+ "key": "SAVE",
1632
+ "name": "Save",
1633
+ "payload": [
1634
+ {
1635
+ "name": "data",
1636
+ "type": "object",
1637
+ "required": true
1638
+ }
1639
+ ]
1640
+ }
1641
+ ],
1642
+ "transitions": [
1643
+ {
1644
+ "from": "closed",
1645
+ "to": "closed",
1646
+ "event": "INIT",
1647
+ "effects": [
1648
+ [
1649
+ "fetch",
1650
+ "Deal"
1651
+ ]
1652
+ ]
1653
+ },
1654
+ {
1655
+ "from": "closed",
1656
+ "to": "open",
1657
+ "event": "EDIT",
1658
+ "effects": [
1659
+ [
1660
+ "fetch",
1661
+ "Deal",
1662
+ "@payload.id"
1663
+ ],
1664
+ [
1665
+ "render-ui",
1666
+ "modal",
1667
+ {
1668
+ "type": "stack",
1669
+ "direction": "vertical",
1670
+ "gap": "md",
1671
+ "children": [
1672
+ {
1673
+ "type": "stack",
1674
+ "direction": "horizontal",
1675
+ "gap": "sm",
1676
+ "children": [
1677
+ {
1678
+ "type": "icon",
1679
+ "name": "edit",
1680
+ "size": "md"
1681
+ },
1682
+ {
1683
+ "type": "typography",
1684
+ "content": "Edit Deal",
1685
+ "variant": "h3"
1686
+ }
1687
+ ]
1688
+ },
1689
+ {
1690
+ "type": "divider"
1691
+ },
1692
+ {
1693
+ "type": "form-section",
1694
+ "entity": "Deal",
1695
+ "mode": "edit",
1696
+ "submitEvent": "SAVE",
1697
+ "cancelEvent": "CLOSE",
1698
+ "fields": [
1699
+ "title",
1700
+ "contactId",
1701
+ "value",
1702
+ "stage",
1703
+ "closedAt"
1704
+ ]
1705
+ }
1706
+ ]
1707
+ }
1708
+ ]
1709
+ ]
1710
+ },
1711
+ {
1712
+ "from": "open",
1713
+ "to": "closed",
1714
+ "event": "CLOSE",
1715
+ "effects": [
1716
+ [
1717
+ "render-ui",
1718
+ "modal",
1719
+ null
1720
+ ]
1721
+ ]
1722
+ },
1723
+ {
1724
+ "from": "open",
1725
+ "to": "closed",
1726
+ "event": "SAVE",
1727
+ "effects": [
1728
+ [
1729
+ "persist",
1730
+ "update",
1731
+ "Deal",
1732
+ "@payload.data"
1733
+ ],
1734
+ [
1735
+ "fetch",
1736
+ "Deal"
1737
+ ],
1738
+ [
1739
+ "render-ui",
1740
+ "modal",
1741
+ null
1742
+ ],
1743
+ [
1744
+ "emit",
1745
+ "DEAL_UPDATED"
1746
+ ],
1747
+ [
1748
+ "notify",
1749
+ "Deal updated successfully"
1750
+ ]
1751
+ ]
1752
+ }
1753
+ ]
1754
+ }
1755
+ },
1756
+ {
1757
+ "name": "DealView",
1758
+ "linkedEntity": "Deal",
1759
+ "category": "interaction",
1760
+ "stateMachine": {
1761
+ "states": [
1762
+ {
1763
+ "name": "closed",
1764
+ "isInitial": true
1765
+ },
1766
+ {
1767
+ "name": "open"
1768
+ }
1769
+ ],
1770
+ "events": [
1771
+ {
1772
+ "key": "INIT",
1773
+ "name": "Initialize"
1774
+ },
1775
+ {
1776
+ "key": "VIEW",
1777
+ "name": "Open",
1778
+ "payload": [
1779
+ {
1780
+ "name": "id",
1781
+ "type": "string",
1782
+ "required": true
1783
+ }
1784
+ ]
1785
+ },
1786
+ {
1787
+ "key": "CLOSE",
1788
+ "name": "Close"
1789
+ }
1790
+ ],
1791
+ "transitions": [
1792
+ {
1793
+ "from": "closed",
1794
+ "to": "closed",
1795
+ "event": "INIT",
1796
+ "effects": [
1797
+ [
1798
+ "fetch",
1799
+ "Deal"
1800
+ ]
1801
+ ]
1802
+ },
1803
+ {
1804
+ "from": "closed",
1805
+ "to": "open",
1806
+ "event": "VIEW",
1807
+ "effects": [
1808
+ [
1809
+ "fetch",
1810
+ "Deal",
1811
+ "@payload.id"
1812
+ ],
1813
+ [
1814
+ "render-ui",
1815
+ "modal",
1816
+ {
1817
+ "type": "stack",
1818
+ "direction": "vertical",
1819
+ "gap": "md",
1820
+ "children": [
1821
+ {
1822
+ "type": "stack",
1823
+ "direction": "horizontal",
1824
+ "gap": "sm",
1825
+ "align": "center",
1826
+ "children": [
1827
+ {
1828
+ "type": "icon",
1829
+ "name": "eye",
1830
+ "size": "md"
1831
+ },
1832
+ {
1833
+ "type": "typography",
1834
+ "variant": "h3",
1835
+ "content": "@entity.title"
1836
+ }
1837
+ ]
1838
+ },
1839
+ {
1840
+ "type": "divider"
1841
+ },
1842
+ {
1843
+ "type": "stack",
1844
+ "direction": "horizontal",
1845
+ "gap": "md",
1846
+ "children": [
1847
+ {
1848
+ "type": "typography",
1849
+ "variant": "caption",
1850
+ "content": "Title"
1851
+ },
1852
+ {
1853
+ "type": "typography",
1854
+ "variant": "body",
1855
+ "content": "@entity.title"
1856
+ }
1857
+ ]
1858
+ },
1859
+ {
1860
+ "type": "stack",
1861
+ "direction": "horizontal",
1862
+ "gap": "md",
1863
+ "children": [
1864
+ {
1865
+ "type": "typography",
1866
+ "variant": "caption",
1867
+ "content": "ContactId"
1868
+ },
1869
+ {
1870
+ "type": "typography",
1871
+ "variant": "body",
1872
+ "content": "@entity.contactId"
1873
+ }
1874
+ ]
1875
+ },
1876
+ {
1877
+ "type": "stack",
1878
+ "direction": "horizontal",
1879
+ "gap": "md",
1880
+ "children": [
1881
+ {
1882
+ "type": "typography",
1883
+ "variant": "caption",
1884
+ "content": "Value"
1885
+ },
1886
+ {
1887
+ "type": "typography",
1888
+ "variant": "body",
1889
+ "content": "@entity.value"
1890
+ }
1891
+ ]
1892
+ },
1893
+ {
1894
+ "type": "stack",
1895
+ "direction": "horizontal",
1896
+ "gap": "md",
1897
+ "children": [
1898
+ {
1899
+ "type": "typography",
1900
+ "variant": "caption",
1901
+ "content": "Stage"
1902
+ },
1903
+ {
1904
+ "type": "typography",
1905
+ "variant": "body",
1906
+ "content": "@entity.stage"
1907
+ }
1908
+ ]
1909
+ },
1910
+ {
1911
+ "type": "stack",
1912
+ "direction": "horizontal",
1913
+ "gap": "md",
1914
+ "children": [
1915
+ {
1916
+ "type": "typography",
1917
+ "variant": "caption",
1918
+ "content": "ClosedAt"
1919
+ },
1920
+ {
1921
+ "type": "typography",
1922
+ "variant": "body",
1923
+ "content": "@entity.closedAt"
1924
+ }
1925
+ ]
1926
+ },
1927
+ {
1928
+ "type": "divider"
1929
+ },
1930
+ {
1931
+ "type": "stack",
1932
+ "direction": "horizontal",
1933
+ "gap": "sm",
1934
+ "justify": "end",
1935
+ "children": [
1936
+ {
1937
+ "type": "button",
1938
+ "label": "Edit",
1939
+ "event": "EDIT",
1940
+ "variant": "primary",
1941
+ "icon": "edit"
1942
+ },
1943
+ {
1944
+ "type": "button",
1945
+ "label": "Close",
1946
+ "event": "CLOSE",
1947
+ "variant": "ghost"
1948
+ }
1949
+ ]
1950
+ }
1951
+ ]
1952
+ }
1953
+ ]
1954
+ ]
1955
+ },
1956
+ {
1957
+ "from": "open",
1958
+ "to": "closed",
1959
+ "event": "CLOSE",
1960
+ "effects": [
1961
+ [
1962
+ "render-ui",
1963
+ "modal",
1964
+ null
1965
+ ]
1966
+ ]
1967
+ }
1968
+ ]
1969
+ }
1970
+ }
1971
+ ],
1972
+ "pages": [
1973
+ {
1974
+ "name": "DealsPage",
1975
+ "path": "/deals",
1976
+ "traits": [
1977
+ {
1978
+ "ref": "DealBrowse"
1979
+ },
1980
+ {
1981
+ "ref": "DealCreate"
1982
+ },
1983
+ {
1984
+ "ref": "DealEdit"
1985
+ },
1986
+ {
1987
+ "ref": "DealView"
1988
+ }
1989
+ ]
1990
+ }
1991
+ ]
1992
+ },
1993
+ {
1994
+ "name": "PipelineOrbital",
1995
+ "entity": {
1996
+ "name": "Pipeline",
1997
+ "persistence": "runtime",
1998
+ "fields": [
1999
+ {
2000
+ "name": "id",
2001
+ "type": "string",
2002
+ "required": true
2003
+ },
2004
+ {
2005
+ "name": "totalDeals",
2006
+ "type": "number",
2007
+ "default": 0
2008
+ },
2009
+ {
2010
+ "name": "totalValue",
2011
+ "type": "number",
2012
+ "default": 0
2013
+ },
2014
+ {
2015
+ "name": "wonDeals",
2016
+ "type": "number",
2017
+ "default": 0
2018
+ },
2019
+ {
2020
+ "name": "lostDeals",
2021
+ "type": "number",
2022
+ "default": 0
2023
+ },
2024
+ {
2025
+ "name": "conversionRate",
2026
+ "type": "number",
2027
+ "default": 0
2028
+ }
2029
+ ]
2030
+ },
2031
+ "traits": [
2032
+ {
2033
+ "name": "PipelineDisplay",
2034
+ "linkedEntity": "Pipeline",
2035
+ "category": "interaction",
2036
+ "stateMachine": {
2037
+ "states": [
2038
+ {
2039
+ "name": "loading",
2040
+ "isInitial": true
2041
+ },
2042
+ {
2043
+ "name": "displaying"
2044
+ },
2045
+ {
2046
+ "name": "refreshing"
2047
+ }
2048
+ ],
2049
+ "events": [
2050
+ {
2051
+ "key": "INIT",
2052
+ "name": "Initialize"
2053
+ },
2054
+ {
2055
+ "key": "LOADED",
2056
+ "name": "Loaded"
2057
+ },
2058
+ {
2059
+ "key": "REFRESH",
2060
+ "name": "Refresh"
2061
+ },
2062
+ {
2063
+ "key": "REFRESHED",
2064
+ "name": "Refreshed"
2065
+ }
2066
+ ],
2067
+ "transitions": [
2068
+ {
2069
+ "from": "loading",
2070
+ "to": "displaying",
2071
+ "event": "INIT",
2072
+ "effects": [
2073
+ [
2074
+ "fetch",
2075
+ "Pipeline"
2076
+ ],
2077
+ [
2078
+ "render-ui",
2079
+ "main",
2080
+ {
2081
+ "type": "stack",
2082
+ "direction": "vertical",
2083
+ "gap": "lg",
2084
+ "children": [
2085
+ {
2086
+ "type": "stack",
2087
+ "direction": "horizontal",
2088
+ "gap": "md",
2089
+ "justify": "space-between",
2090
+ "children": [
2091
+ {
2092
+ "type": "stack",
2093
+ "direction": "horizontal",
2094
+ "gap": "md",
2095
+ "children": [
2096
+ {
2097
+ "type": "icon",
2098
+ "name": "bar-chart-2",
2099
+ "size": "lg"
2100
+ },
2101
+ {
2102
+ "type": "typography",
2103
+ "content": "Pipeline",
2104
+ "variant": "h2"
2105
+ }
2106
+ ]
2107
+ },
2108
+ {
2109
+ "type": "button",
2110
+ "label": "Refresh",
2111
+ "event": "REFRESH",
2112
+ "variant": "secondary",
2113
+ "icon": "refresh-cw"
2114
+ }
2115
+ ]
2116
+ },
2117
+ {
2118
+ "type": "divider"
2119
+ },
2120
+ {
2121
+ "type": "simple-grid",
2122
+ "columns": 3,
2123
+ "children": [
2124
+ {
2125
+ "type": "card",
2126
+ "children": [
2127
+ {
2128
+ "type": "stack",
2129
+ "direction": "vertical",
2130
+ "gap": "sm",
2131
+ "children": [
2132
+ {
2133
+ "type": "typography",
2134
+ "variant": "caption",
2135
+ "content": "TotalDeals"
2136
+ },
2137
+ {
2138
+ "type": "typography",
2139
+ "variant": "h3",
2140
+ "content": "@entity.totalDeals"
2141
+ }
2142
+ ]
2143
+ }
2144
+ ]
2145
+ },
2146
+ {
2147
+ "type": "card",
2148
+ "children": [
2149
+ {
2150
+ "type": "stack",
2151
+ "direction": "vertical",
2152
+ "gap": "sm",
2153
+ "children": [
2154
+ {
2155
+ "type": "typography",
2156
+ "variant": "caption",
2157
+ "content": "TotalValue"
2158
+ },
2159
+ {
2160
+ "type": "typography",
2161
+ "variant": "h3",
2162
+ "content": "@entity.totalValue"
2163
+ }
2164
+ ]
2165
+ }
2166
+ ]
2167
+ },
2168
+ {
2169
+ "type": "card",
2170
+ "children": [
2171
+ {
2172
+ "type": "stack",
2173
+ "direction": "vertical",
2174
+ "gap": "sm",
2175
+ "children": [
2176
+ {
2177
+ "type": "typography",
2178
+ "variant": "caption",
2179
+ "content": "WonDeals"
2180
+ },
2181
+ {
2182
+ "type": "typography",
2183
+ "variant": "h3",
2184
+ "content": "@entity.wonDeals"
2185
+ }
2186
+ ]
2187
+ }
2188
+ ]
2189
+ },
2190
+ {
2191
+ "type": "card",
2192
+ "children": [
2193
+ {
2194
+ "type": "stack",
2195
+ "direction": "vertical",
2196
+ "gap": "sm",
2197
+ "children": [
2198
+ {
2199
+ "type": "typography",
2200
+ "variant": "caption",
2201
+ "content": "LostDeals"
2202
+ },
2203
+ {
2204
+ "type": "typography",
2205
+ "variant": "h3",
2206
+ "content": "@entity.lostDeals"
2207
+ }
2208
+ ]
2209
+ }
2210
+ ]
2211
+ },
2212
+ {
2213
+ "type": "card",
2214
+ "children": [
2215
+ {
2216
+ "type": "stack",
2217
+ "direction": "vertical",
2218
+ "gap": "sm",
2219
+ "children": [
2220
+ {
2221
+ "type": "typography",
2222
+ "variant": "caption",
2223
+ "content": "ConversionRate"
2224
+ },
2225
+ {
2226
+ "type": "typography",
2227
+ "variant": "h3",
2228
+ "content": "@entity.conversionRate"
2229
+ }
2230
+ ]
2231
+ }
2232
+ ]
2233
+ }
2234
+ ]
2235
+ }
2236
+ ]
2237
+ }
2238
+ ]
2239
+ ]
2240
+ },
2241
+ {
2242
+ "from": "loading",
2243
+ "to": "displaying",
2244
+ "event": "LOADED",
2245
+ "effects": [
2246
+ [
2247
+ "fetch",
2248
+ "Pipeline"
2249
+ ],
2250
+ [
2251
+ "render-ui",
2252
+ "main",
2253
+ {
2254
+ "type": "stack",
2255
+ "direction": "vertical",
2256
+ "gap": "lg",
2257
+ "children": [
2258
+ {
2259
+ "type": "stack",
2260
+ "direction": "horizontal",
2261
+ "gap": "md",
2262
+ "justify": "space-between",
2263
+ "children": [
2264
+ {
2265
+ "type": "stack",
2266
+ "direction": "horizontal",
2267
+ "gap": "md",
2268
+ "children": [
2269
+ {
2270
+ "type": "icon",
2271
+ "name": "bar-chart-2",
2272
+ "size": "lg"
2273
+ },
2274
+ {
2275
+ "type": "typography",
2276
+ "content": "Pipeline",
2277
+ "variant": "h2"
2278
+ }
2279
+ ]
2280
+ },
2281
+ {
2282
+ "type": "button",
2283
+ "label": "Refresh",
2284
+ "event": "REFRESH",
2285
+ "variant": "secondary",
2286
+ "icon": "refresh-cw"
2287
+ }
2288
+ ]
2289
+ },
2290
+ {
2291
+ "type": "divider"
2292
+ },
2293
+ {
2294
+ "type": "simple-grid",
2295
+ "columns": 3,
2296
+ "children": [
2297
+ {
2298
+ "type": "card",
2299
+ "children": [
2300
+ {
2301
+ "type": "stack",
2302
+ "direction": "vertical",
2303
+ "gap": "sm",
2304
+ "children": [
2305
+ {
2306
+ "type": "typography",
2307
+ "variant": "caption",
2308
+ "content": "TotalDeals"
2309
+ },
2310
+ {
2311
+ "type": "typography",
2312
+ "variant": "h3",
2313
+ "content": "@entity.totalDeals"
2314
+ }
2315
+ ]
2316
+ }
2317
+ ]
2318
+ },
2319
+ {
2320
+ "type": "card",
2321
+ "children": [
2322
+ {
2323
+ "type": "stack",
2324
+ "direction": "vertical",
2325
+ "gap": "sm",
2326
+ "children": [
2327
+ {
2328
+ "type": "typography",
2329
+ "variant": "caption",
2330
+ "content": "TotalValue"
2331
+ },
2332
+ {
2333
+ "type": "typography",
2334
+ "variant": "h3",
2335
+ "content": "@entity.totalValue"
2336
+ }
2337
+ ]
2338
+ }
2339
+ ]
2340
+ },
2341
+ {
2342
+ "type": "card",
2343
+ "children": [
2344
+ {
2345
+ "type": "stack",
2346
+ "direction": "vertical",
2347
+ "gap": "sm",
2348
+ "children": [
2349
+ {
2350
+ "type": "typography",
2351
+ "variant": "caption",
2352
+ "content": "WonDeals"
2353
+ },
2354
+ {
2355
+ "type": "typography",
2356
+ "variant": "h3",
2357
+ "content": "@entity.wonDeals"
2358
+ }
2359
+ ]
2360
+ }
2361
+ ]
2362
+ },
2363
+ {
2364
+ "type": "card",
2365
+ "children": [
2366
+ {
2367
+ "type": "stack",
2368
+ "direction": "vertical",
2369
+ "gap": "sm",
2370
+ "children": [
2371
+ {
2372
+ "type": "typography",
2373
+ "variant": "caption",
2374
+ "content": "LostDeals"
2375
+ },
2376
+ {
2377
+ "type": "typography",
2378
+ "variant": "h3",
2379
+ "content": "@entity.lostDeals"
2380
+ }
2381
+ ]
2382
+ }
2383
+ ]
2384
+ },
2385
+ {
2386
+ "type": "card",
2387
+ "children": [
2388
+ {
2389
+ "type": "stack",
2390
+ "direction": "vertical",
2391
+ "gap": "sm",
2392
+ "children": [
2393
+ {
2394
+ "type": "typography",
2395
+ "variant": "caption",
2396
+ "content": "ConversionRate"
2397
+ },
2398
+ {
2399
+ "type": "typography",
2400
+ "variant": "h3",
2401
+ "content": "@entity.conversionRate"
2402
+ }
2403
+ ]
2404
+ }
2405
+ ]
2406
+ }
2407
+ ]
2408
+ }
2409
+ ]
2410
+ }
2411
+ ]
2412
+ ]
2413
+ },
2414
+ {
2415
+ "from": "displaying",
2416
+ "to": "displaying",
2417
+ "event": "INIT",
2418
+ "effects": [
2419
+ [
2420
+ "fetch",
2421
+ "Pipeline"
2422
+ ],
2423
+ [
2424
+ "render-ui",
2425
+ "main",
2426
+ {
2427
+ "type": "stack",
2428
+ "direction": "vertical",
2429
+ "gap": "lg",
2430
+ "children": [
2431
+ {
2432
+ "type": "stack",
2433
+ "direction": "horizontal",
2434
+ "gap": "md",
2435
+ "justify": "space-between",
2436
+ "children": [
2437
+ {
2438
+ "type": "stack",
2439
+ "direction": "horizontal",
2440
+ "gap": "md",
2441
+ "children": [
2442
+ {
2443
+ "type": "icon",
2444
+ "name": "bar-chart-2",
2445
+ "size": "lg"
2446
+ },
2447
+ {
2448
+ "type": "typography",
2449
+ "content": "Pipeline",
2450
+ "variant": "h2"
2451
+ }
2452
+ ]
2453
+ },
2454
+ {
2455
+ "type": "button",
2456
+ "label": "Refresh",
2457
+ "event": "REFRESH",
2458
+ "variant": "secondary",
2459
+ "icon": "refresh-cw"
2460
+ }
2461
+ ]
2462
+ },
2463
+ {
2464
+ "type": "divider"
2465
+ },
2466
+ {
2467
+ "type": "simple-grid",
2468
+ "columns": 3,
2469
+ "children": [
2470
+ {
2471
+ "type": "card",
2472
+ "children": [
2473
+ {
2474
+ "type": "stack",
2475
+ "direction": "vertical",
2476
+ "gap": "sm",
2477
+ "children": [
2478
+ {
2479
+ "type": "typography",
2480
+ "variant": "caption",
2481
+ "content": "TotalDeals"
2482
+ },
2483
+ {
2484
+ "type": "typography",
2485
+ "variant": "h3",
2486
+ "content": "@entity.totalDeals"
2487
+ }
2488
+ ]
2489
+ }
2490
+ ]
2491
+ },
2492
+ {
2493
+ "type": "card",
2494
+ "children": [
2495
+ {
2496
+ "type": "stack",
2497
+ "direction": "vertical",
2498
+ "gap": "sm",
2499
+ "children": [
2500
+ {
2501
+ "type": "typography",
2502
+ "variant": "caption",
2503
+ "content": "TotalValue"
2504
+ },
2505
+ {
2506
+ "type": "typography",
2507
+ "variant": "h3",
2508
+ "content": "@entity.totalValue"
2509
+ }
2510
+ ]
2511
+ }
2512
+ ]
2513
+ },
2514
+ {
2515
+ "type": "card",
2516
+ "children": [
2517
+ {
2518
+ "type": "stack",
2519
+ "direction": "vertical",
2520
+ "gap": "sm",
2521
+ "children": [
2522
+ {
2523
+ "type": "typography",
2524
+ "variant": "caption",
2525
+ "content": "WonDeals"
2526
+ },
2527
+ {
2528
+ "type": "typography",
2529
+ "variant": "h3",
2530
+ "content": "@entity.wonDeals"
2531
+ }
2532
+ ]
2533
+ }
2534
+ ]
2535
+ },
2536
+ {
2537
+ "type": "card",
2538
+ "children": [
2539
+ {
2540
+ "type": "stack",
2541
+ "direction": "vertical",
2542
+ "gap": "sm",
2543
+ "children": [
2544
+ {
2545
+ "type": "typography",
2546
+ "variant": "caption",
2547
+ "content": "LostDeals"
2548
+ },
2549
+ {
2550
+ "type": "typography",
2551
+ "variant": "h3",
2552
+ "content": "@entity.lostDeals"
2553
+ }
2554
+ ]
2555
+ }
2556
+ ]
2557
+ },
2558
+ {
2559
+ "type": "card",
2560
+ "children": [
2561
+ {
2562
+ "type": "stack",
2563
+ "direction": "vertical",
2564
+ "gap": "sm",
2565
+ "children": [
2566
+ {
2567
+ "type": "typography",
2568
+ "variant": "caption",
2569
+ "content": "ConversionRate"
2570
+ },
2571
+ {
2572
+ "type": "typography",
2573
+ "variant": "h3",
2574
+ "content": "@entity.conversionRate"
2575
+ }
2576
+ ]
2577
+ }
2578
+ ]
2579
+ }
2580
+ ]
2581
+ }
2582
+ ]
2583
+ }
2584
+ ]
2585
+ ]
2586
+ },
2587
+ {
2588
+ "from": "displaying",
2589
+ "to": "refreshing",
2590
+ "event": "REFRESH",
2591
+ "effects": [
2592
+ [
2593
+ "fetch",
2594
+ "Pipeline"
2595
+ ],
2596
+ [
2597
+ "render-ui",
2598
+ "main",
2599
+ {
2600
+ "type": "stack",
2601
+ "direction": "vertical",
2602
+ "gap": "lg",
2603
+ "children": [
2604
+ {
2605
+ "type": "stack",
2606
+ "direction": "horizontal",
2607
+ "gap": "md",
2608
+ "justify": "space-between",
2609
+ "children": [
2610
+ {
2611
+ "type": "stack",
2612
+ "direction": "horizontal",
2613
+ "gap": "md",
2614
+ "children": [
2615
+ {
2616
+ "type": "icon",
2617
+ "name": "bar-chart-2",
2618
+ "size": "lg"
2619
+ },
2620
+ {
2621
+ "type": "typography",
2622
+ "content": "Pipeline",
2623
+ "variant": "h2"
2624
+ }
2625
+ ]
2626
+ },
2627
+ {
2628
+ "type": "button",
2629
+ "label": "Refresh",
2630
+ "event": "REFRESH",
2631
+ "variant": "secondary",
2632
+ "icon": "refresh-cw"
2633
+ }
2634
+ ]
2635
+ },
2636
+ {
2637
+ "type": "divider"
2638
+ },
2639
+ {
2640
+ "type": "simple-grid",
2641
+ "columns": 3,
2642
+ "children": [
2643
+ {
2644
+ "type": "card",
2645
+ "children": [
2646
+ {
2647
+ "type": "stack",
2648
+ "direction": "vertical",
2649
+ "gap": "sm",
2650
+ "children": [
2651
+ {
2652
+ "type": "typography",
2653
+ "variant": "caption",
2654
+ "content": "TotalDeals"
2655
+ },
2656
+ {
2657
+ "type": "typography",
2658
+ "variant": "h3",
2659
+ "content": "@entity.totalDeals"
2660
+ }
2661
+ ]
2662
+ }
2663
+ ]
2664
+ },
2665
+ {
2666
+ "type": "card",
2667
+ "children": [
2668
+ {
2669
+ "type": "stack",
2670
+ "direction": "vertical",
2671
+ "gap": "sm",
2672
+ "children": [
2673
+ {
2674
+ "type": "typography",
2675
+ "variant": "caption",
2676
+ "content": "TotalValue"
2677
+ },
2678
+ {
2679
+ "type": "typography",
2680
+ "variant": "h3",
2681
+ "content": "@entity.totalValue"
2682
+ }
2683
+ ]
2684
+ }
2685
+ ]
2686
+ },
2687
+ {
2688
+ "type": "card",
2689
+ "children": [
2690
+ {
2691
+ "type": "stack",
2692
+ "direction": "vertical",
2693
+ "gap": "sm",
2694
+ "children": [
2695
+ {
2696
+ "type": "typography",
2697
+ "variant": "caption",
2698
+ "content": "WonDeals"
2699
+ },
2700
+ {
2701
+ "type": "typography",
2702
+ "variant": "h3",
2703
+ "content": "@entity.wonDeals"
2704
+ }
2705
+ ]
2706
+ }
2707
+ ]
2708
+ },
2709
+ {
2710
+ "type": "card",
2711
+ "children": [
2712
+ {
2713
+ "type": "stack",
2714
+ "direction": "vertical",
2715
+ "gap": "sm",
2716
+ "children": [
2717
+ {
2718
+ "type": "typography",
2719
+ "variant": "caption",
2720
+ "content": "LostDeals"
2721
+ },
2722
+ {
2723
+ "type": "typography",
2724
+ "variant": "h3",
2725
+ "content": "@entity.lostDeals"
2726
+ }
2727
+ ]
2728
+ }
2729
+ ]
2730
+ },
2731
+ {
2732
+ "type": "card",
2733
+ "children": [
2734
+ {
2735
+ "type": "stack",
2736
+ "direction": "vertical",
2737
+ "gap": "sm",
2738
+ "children": [
2739
+ {
2740
+ "type": "typography",
2741
+ "variant": "caption",
2742
+ "content": "ConversionRate"
2743
+ },
2744
+ {
2745
+ "type": "typography",
2746
+ "variant": "h3",
2747
+ "content": "@entity.conversionRate"
2748
+ }
2749
+ ]
2750
+ }
2751
+ ]
2752
+ }
2753
+ ]
2754
+ }
2755
+ ]
2756
+ }
2757
+ ]
2758
+ ]
2759
+ },
2760
+ {
2761
+ "from": "refreshing",
2762
+ "to": "displaying",
2763
+ "event": "REFRESHED",
2764
+ "effects": [
2765
+ [
2766
+ "fetch",
2767
+ "Pipeline"
2768
+ ],
2769
+ [
2770
+ "render-ui",
2771
+ "main",
2772
+ {
2773
+ "type": "stack",
2774
+ "direction": "vertical",
2775
+ "gap": "lg",
2776
+ "children": [
2777
+ {
2778
+ "type": "stack",
2779
+ "direction": "horizontal",
2780
+ "gap": "md",
2781
+ "justify": "space-between",
2782
+ "children": [
2783
+ {
2784
+ "type": "stack",
2785
+ "direction": "horizontal",
2786
+ "gap": "md",
2787
+ "children": [
2788
+ {
2789
+ "type": "icon",
2790
+ "name": "bar-chart-2",
2791
+ "size": "lg"
2792
+ },
2793
+ {
2794
+ "type": "typography",
2795
+ "content": "Pipeline",
2796
+ "variant": "h2"
2797
+ }
2798
+ ]
2799
+ },
2800
+ {
2801
+ "type": "button",
2802
+ "label": "Refresh",
2803
+ "event": "REFRESH",
2804
+ "variant": "secondary",
2805
+ "icon": "refresh-cw"
2806
+ }
2807
+ ]
2808
+ },
2809
+ {
2810
+ "type": "divider"
2811
+ },
2812
+ {
2813
+ "type": "simple-grid",
2814
+ "columns": 3,
2815
+ "children": [
2816
+ {
2817
+ "type": "card",
2818
+ "children": [
2819
+ {
2820
+ "type": "stack",
2821
+ "direction": "vertical",
2822
+ "gap": "sm",
2823
+ "children": [
2824
+ {
2825
+ "type": "typography",
2826
+ "variant": "caption",
2827
+ "content": "TotalDeals"
2828
+ },
2829
+ {
2830
+ "type": "typography",
2831
+ "variant": "h3",
2832
+ "content": "@entity.totalDeals"
2833
+ }
2834
+ ]
2835
+ }
2836
+ ]
2837
+ },
2838
+ {
2839
+ "type": "card",
2840
+ "children": [
2841
+ {
2842
+ "type": "stack",
2843
+ "direction": "vertical",
2844
+ "gap": "sm",
2845
+ "children": [
2846
+ {
2847
+ "type": "typography",
2848
+ "variant": "caption",
2849
+ "content": "TotalValue"
2850
+ },
2851
+ {
2852
+ "type": "typography",
2853
+ "variant": "h3",
2854
+ "content": "@entity.totalValue"
2855
+ }
2856
+ ]
2857
+ }
2858
+ ]
2859
+ },
2860
+ {
2861
+ "type": "card",
2862
+ "children": [
2863
+ {
2864
+ "type": "stack",
2865
+ "direction": "vertical",
2866
+ "gap": "sm",
2867
+ "children": [
2868
+ {
2869
+ "type": "typography",
2870
+ "variant": "caption",
2871
+ "content": "WonDeals"
2872
+ },
2873
+ {
2874
+ "type": "typography",
2875
+ "variant": "h3",
2876
+ "content": "@entity.wonDeals"
2877
+ }
2878
+ ]
2879
+ }
2880
+ ]
2881
+ },
2882
+ {
2883
+ "type": "card",
2884
+ "children": [
2885
+ {
2886
+ "type": "stack",
2887
+ "direction": "vertical",
2888
+ "gap": "sm",
2889
+ "children": [
2890
+ {
2891
+ "type": "typography",
2892
+ "variant": "caption",
2893
+ "content": "LostDeals"
2894
+ },
2895
+ {
2896
+ "type": "typography",
2897
+ "variant": "h3",
2898
+ "content": "@entity.lostDeals"
2899
+ }
2900
+ ]
2901
+ }
2902
+ ]
2903
+ },
2904
+ {
2905
+ "type": "card",
2906
+ "children": [
2907
+ {
2908
+ "type": "stack",
2909
+ "direction": "vertical",
2910
+ "gap": "sm",
2911
+ "children": [
2912
+ {
2913
+ "type": "typography",
2914
+ "variant": "caption",
2915
+ "content": "ConversionRate"
2916
+ },
2917
+ {
2918
+ "type": "typography",
2919
+ "variant": "h3",
2920
+ "content": "@entity.conversionRate"
2921
+ }
2922
+ ]
2923
+ }
2924
+ ]
2925
+ }
2926
+ ]
2927
+ }
2928
+ ]
2929
+ }
2930
+ ]
2931
+ ]
2932
+ }
2933
+ ]
2934
+ },
2935
+ "listens": [
2936
+ {
2937
+ "event": "CLOSE_DEAL",
2938
+ "triggers": "INIT",
2939
+ "scope": "external"
2940
+ }
2941
+ ]
2942
+ }
2943
+ ],
2944
+ "pages": [
2945
+ {
2946
+ "name": "PipelinePage",
2947
+ "path": "/pipeline",
2948
+ "traits": [
2949
+ {
2950
+ "ref": "PipelineDisplay"
2951
+ }
2952
+ ]
2953
+ }
2954
+ ]
2955
+ },
2956
+ {
2957
+ "name": "NoteOrbital",
2958
+ "entity": {
2959
+ "name": "Note",
2960
+ "persistence": "runtime",
2961
+ "fields": [
2962
+ {
2963
+ "name": "id",
2964
+ "type": "string",
2965
+ "required": true
2966
+ },
2967
+ {
2968
+ "name": "subject",
2969
+ "type": "string",
2970
+ "default": ""
2971
+ },
2972
+ {
2973
+ "name": "body",
2974
+ "type": "string",
2975
+ "default": ""
2976
+ },
2977
+ {
2978
+ "name": "author",
2979
+ "type": "string",
2980
+ "default": ""
2981
+ },
2982
+ {
2983
+ "name": "createdAt",
2984
+ "type": "string",
2985
+ "default": ""
2986
+ }
2987
+ ]
2988
+ },
2989
+ "traits": [
2990
+ {
2991
+ "name": "NoteBrowse",
2992
+ "linkedEntity": "Note",
2993
+ "category": "interaction",
2994
+ "listens": [
2995
+ {
2996
+ "event": "SEND",
2997
+ "triggers": "SEND"
2998
+ }
2999
+ ],
3000
+ "stateMachine": {
3001
+ "states": [
3002
+ {
3003
+ "name": "browsing",
3004
+ "isInitial": true
3005
+ }
3006
+ ],
3007
+ "events": [
3008
+ {
3009
+ "key": "INIT",
3010
+ "name": "Initialize"
3011
+ },
3012
+ {
3013
+ "key": "COMPOSE",
3014
+ "name": "COMPOSE"
3015
+ },
3016
+ {
3017
+ "key": "VIEW",
3018
+ "name": "VIEW",
3019
+ "payload": [
3020
+ {
3021
+ "name": "id",
3022
+ "type": "string",
3023
+ "required": true
3024
+ }
3025
+ ]
3026
+ },
3027
+ {
3028
+ "key": "SEND",
3029
+ "name": "SEND",
3030
+ "payload": [
3031
+ {
3032
+ "name": "data",
3033
+ "type": "object",
3034
+ "required": true
3035
+ }
3036
+ ]
3037
+ }
3038
+ ],
3039
+ "transitions": [
3040
+ {
3041
+ "from": "browsing",
3042
+ "to": "browsing",
3043
+ "event": "INIT",
3044
+ "effects": [
3045
+ [
3046
+ "fetch",
3047
+ "Note"
3048
+ ],
3049
+ [
3050
+ "render-ui",
3051
+ "main",
3052
+ {
3053
+ "type": "stack",
3054
+ "direction": "vertical",
3055
+ "gap": "lg",
3056
+ "children": [
3057
+ {
3058
+ "type": "stack",
3059
+ "direction": "horizontal",
3060
+ "gap": "md",
3061
+ "justify": "space-between",
3062
+ "children": [
3063
+ {
3064
+ "type": "stack",
3065
+ "direction": "horizontal",
3066
+ "gap": "sm",
3067
+ "align": "center",
3068
+ "children": [
3069
+ {
3070
+ "type": "icon",
3071
+ "name": "file-text",
3072
+ "size": "lg"
3073
+ },
3074
+ {
3075
+ "type": "typography",
3076
+ "content": "Notes",
3077
+ "variant": "h2"
3078
+ }
3079
+ ]
3080
+ },
3081
+ {
3082
+ "type": "stack",
3083
+ "direction": "horizontal",
3084
+ "gap": "sm",
3085
+ "children": [
3086
+ {
3087
+ "type": "button",
3088
+ "label": "Compose",
3089
+ "event": "COMPOSE",
3090
+ "variant": "primary",
3091
+ "icon": "edit"
3092
+ }
3093
+ ]
3094
+ }
3095
+ ]
3096
+ },
3097
+ {
3098
+ "type": "divider"
3099
+ },
3100
+ {
3101
+ "type": "data-grid",
3102
+ "entity": "Note",
3103
+ "emptyIcon": "inbox",
3104
+ "emptyTitle": "No messages yet",
3105
+ "emptyDescription": "Start a new conversation.",
3106
+ "itemActions": [
3107
+ {
3108
+ "label": "View",
3109
+ "event": "VIEW"
3110
+ }
3111
+ ],
3112
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
3113
+ "children": [
3114
+ {
3115
+ "type": "stack",
3116
+ "direction": "vertical",
3117
+ "gap": "sm",
3118
+ "children": [
3119
+ {
3120
+ "type": "stack",
3121
+ "direction": "horizontal",
3122
+ "justify": "space-between",
3123
+ "align": "center",
3124
+ "children": [
3125
+ {
3126
+ "type": "stack",
3127
+ "direction": "horizontal",
3128
+ "gap": "sm",
3129
+ "align": "center",
3130
+ "children": [
3131
+ {
3132
+ "type": "icon",
3133
+ "name": "file-text",
3134
+ "size": "sm"
3135
+ },
3136
+ {
3137
+ "type": "typography",
3138
+ "variant": "h4",
3139
+ "content": "@entity.subject"
3140
+ }
3141
+ ]
3142
+ },
3143
+ {
3144
+ "type": "badge",
3145
+ "label": "@entity.body"
3146
+ }
3147
+ ]
3148
+ },
3149
+ {
3150
+ "type": "typography",
3151
+ "variant": "caption",
3152
+ "color": "muted",
3153
+ "content": "@entity.author"
3154
+ }
3155
+ ]
3156
+ }
3157
+ ]
3158
+ }
3159
+ ]
3160
+ }
3161
+ ]
3162
+ ]
3163
+ },
3164
+ {
3165
+ "from": "browsing",
3166
+ "to": "browsing",
3167
+ "event": "SEND",
3168
+ "effects": [
3169
+ [
3170
+ "fetch",
3171
+ "Note"
3172
+ ]
3173
+ ]
3174
+ }
3175
+ ]
3176
+ }
3177
+ },
3178
+ {
3179
+ "name": "NoteCompose",
3180
+ "linkedEntity": "Note",
3181
+ "category": "interaction",
3182
+ "emits": [
3183
+ {
3184
+ "event": "SEND"
3185
+ }
3186
+ ],
3187
+ "stateMachine": {
3188
+ "states": [
3189
+ {
3190
+ "name": "closed",
3191
+ "isInitial": true
3192
+ },
3193
+ {
3194
+ "name": "open"
3195
+ }
3196
+ ],
3197
+ "events": [
3198
+ {
3199
+ "key": "INIT",
3200
+ "name": "Initialize"
3201
+ },
3202
+ {
3203
+ "key": "COMPOSE",
3204
+ "name": "Open"
3205
+ },
3206
+ {
3207
+ "key": "CLOSE",
3208
+ "name": "Close"
3209
+ },
3210
+ {
3211
+ "key": "SEND",
3212
+ "name": "Save",
3213
+ "payload": [
3214
+ {
3215
+ "name": "data",
3216
+ "type": "object",
3217
+ "required": true
3218
+ }
3219
+ ]
3220
+ }
3221
+ ],
3222
+ "transitions": [
3223
+ {
3224
+ "from": "closed",
3225
+ "to": "closed",
3226
+ "event": "INIT",
3227
+ "effects": [
3228
+ [
3229
+ "fetch",
3230
+ "Note"
3231
+ ]
3232
+ ]
3233
+ },
3234
+ {
3235
+ "from": "closed",
3236
+ "to": "open",
3237
+ "event": "COMPOSE",
3238
+ "effects": [
3239
+ [
3240
+ "render-ui",
3241
+ "modal",
3242
+ {
3243
+ "type": "stack",
3244
+ "direction": "vertical",
3245
+ "gap": "md",
3246
+ "children": [
3247
+ {
3248
+ "type": "stack",
3249
+ "direction": "horizontal",
3250
+ "gap": "sm",
3251
+ "children": [
3252
+ {
3253
+ "type": "icon",
3254
+ "name": "edit",
3255
+ "size": "md"
3256
+ },
3257
+ {
3258
+ "type": "typography",
3259
+ "content": "New Note",
3260
+ "variant": "h3"
3261
+ }
3262
+ ]
3263
+ },
3264
+ {
3265
+ "type": "divider"
3266
+ },
3267
+ {
3268
+ "type": "form-section",
3269
+ "entity": "Note",
3270
+ "mode": "create",
3271
+ "submitEvent": "SEND",
3272
+ "cancelEvent": "CLOSE",
3273
+ "fields": [
3274
+ "subject",
3275
+ "body",
3276
+ "author",
3277
+ "createdAt"
3278
+ ]
3279
+ }
3280
+ ]
3281
+ }
3282
+ ]
3283
+ ]
3284
+ },
3285
+ {
3286
+ "from": "open",
3287
+ "to": "closed",
3288
+ "event": "CLOSE",
3289
+ "effects": [
3290
+ [
3291
+ "render-ui",
3292
+ "modal",
3293
+ null
3294
+ ]
3295
+ ]
3296
+ },
3297
+ {
3298
+ "from": "open",
3299
+ "to": "closed",
3300
+ "event": "SEND",
3301
+ "effects": [
3302
+ [
3303
+ "persist",
3304
+ "create",
3305
+ "Note",
3306
+ "@payload.data"
3307
+ ],
3308
+ [
3309
+ "fetch",
3310
+ "Note"
3311
+ ],
3312
+ [
3313
+ "render-ui",
3314
+ "modal",
3315
+ null
3316
+ ],
3317
+ [
3318
+ "emit",
3319
+ "SEND"
3320
+ ],
3321
+ [
3322
+ "notify",
3323
+ "Note created successfully"
3324
+ ]
3325
+ ]
3326
+ }
3327
+ ]
3328
+ }
3329
+ },
3330
+ {
3331
+ "name": "NoteView",
3332
+ "linkedEntity": "Note",
3333
+ "category": "interaction",
3334
+ "stateMachine": {
3335
+ "states": [
3336
+ {
3337
+ "name": "closed",
3338
+ "isInitial": true
3339
+ },
3340
+ {
3341
+ "name": "open"
3342
+ }
3343
+ ],
3344
+ "events": [
3345
+ {
3346
+ "key": "INIT",
3347
+ "name": "Initialize"
3348
+ },
3349
+ {
3350
+ "key": "VIEW",
3351
+ "name": "Open",
3352
+ "payload": [
3353
+ {
3354
+ "name": "id",
3355
+ "type": "string",
3356
+ "required": true
3357
+ }
3358
+ ]
3359
+ },
3360
+ {
3361
+ "key": "CLOSE",
3362
+ "name": "Close"
3363
+ }
3364
+ ],
3365
+ "transitions": [
3366
+ {
3367
+ "from": "closed",
3368
+ "to": "closed",
3369
+ "event": "INIT",
3370
+ "effects": [
3371
+ [
3372
+ "fetch",
3373
+ "Note"
3374
+ ]
3375
+ ]
3376
+ },
3377
+ {
3378
+ "from": "closed",
3379
+ "to": "open",
3380
+ "event": "VIEW",
3381
+ "effects": [
3382
+ [
3383
+ "fetch",
3384
+ "Note",
3385
+ "@payload.id"
3386
+ ],
3387
+ [
3388
+ "render-ui",
3389
+ "modal",
3390
+ {
3391
+ "type": "stack",
3392
+ "direction": "vertical",
3393
+ "gap": "md",
3394
+ "children": [
3395
+ {
3396
+ "type": "stack",
3397
+ "direction": "horizontal",
3398
+ "gap": "sm",
3399
+ "align": "center",
3400
+ "children": [
3401
+ {
3402
+ "type": "icon",
3403
+ "name": "eye",
3404
+ "size": "md"
3405
+ },
3406
+ {
3407
+ "type": "typography",
3408
+ "variant": "h3",
3409
+ "content": "@entity.subject"
3410
+ }
3411
+ ]
3412
+ },
3413
+ {
3414
+ "type": "divider"
3415
+ },
3416
+ {
3417
+ "type": "stack",
3418
+ "direction": "horizontal",
3419
+ "gap": "md",
3420
+ "children": [
3421
+ {
3422
+ "type": "typography",
3423
+ "variant": "caption",
3424
+ "content": "Subject"
3425
+ },
3426
+ {
3427
+ "type": "typography",
3428
+ "variant": "body",
3429
+ "content": "@entity.subject"
3430
+ }
3431
+ ]
3432
+ },
3433
+ {
3434
+ "type": "stack",
3435
+ "direction": "horizontal",
3436
+ "gap": "md",
3437
+ "children": [
3438
+ {
3439
+ "type": "typography",
3440
+ "variant": "caption",
3441
+ "content": "Body"
3442
+ },
3443
+ {
3444
+ "type": "typography",
3445
+ "variant": "body",
3446
+ "content": "@entity.body"
3447
+ }
3448
+ ]
3449
+ },
3450
+ {
3451
+ "type": "stack",
3452
+ "direction": "horizontal",
3453
+ "gap": "md",
3454
+ "children": [
3455
+ {
3456
+ "type": "typography",
3457
+ "variant": "caption",
3458
+ "content": "Author"
3459
+ },
3460
+ {
3461
+ "type": "typography",
3462
+ "variant": "body",
3463
+ "content": "@entity.author"
3464
+ }
3465
+ ]
3466
+ },
3467
+ {
3468
+ "type": "stack",
3469
+ "direction": "horizontal",
3470
+ "gap": "md",
3471
+ "children": [
3472
+ {
3473
+ "type": "typography",
3474
+ "variant": "caption",
3475
+ "content": "CreatedAt"
3476
+ },
3477
+ {
3478
+ "type": "typography",
3479
+ "variant": "body",
3480
+ "content": "@entity.createdAt"
3481
+ }
3482
+ ]
3483
+ },
3484
+ {
3485
+ "type": "divider"
3486
+ },
3487
+ {
3488
+ "type": "stack",
3489
+ "direction": "horizontal",
3490
+ "gap": "sm",
3491
+ "justify": "end",
3492
+ "children": [
3493
+ {
3494
+ "type": "button",
3495
+ "label": "Close",
3496
+ "event": "CLOSE",
3497
+ "variant": "ghost"
3498
+ }
3499
+ ]
3500
+ }
3501
+ ]
3502
+ }
3503
+ ]
3504
+ ]
3505
+ },
3506
+ {
3507
+ "from": "open",
3508
+ "to": "closed",
3509
+ "event": "CLOSE",
3510
+ "effects": [
3511
+ [
3512
+ "render-ui",
3513
+ "modal",
3514
+ null
3515
+ ]
3516
+ ]
3517
+ }
3518
+ ]
3519
+ }
3520
+ }
3521
+ ],
3522
+ "pages": [
3523
+ {
3524
+ "name": "NotesPage",
3525
+ "path": "/notes",
3526
+ "traits": [
3527
+ {
3528
+ "ref": "NoteBrowse"
3529
+ },
3530
+ {
3531
+ "ref": "NoteCompose"
3532
+ },
3533
+ {
3534
+ "ref": "NoteView"
3535
+ }
3536
+ ]
3537
+ }
3538
+ ]
3539
+ }
3540
+ ]
3541
+ }