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