@almadar/std 3.1.0 → 3.1.2

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 (256) hide show
  1. package/behaviors/exports/atoms/std-async.orb +2 -1
  2. package/behaviors/exports/atoms/std-browse.orb +2 -1
  3. package/behaviors/exports/atoms/std-cache-aside.orb +2 -1
  4. package/behaviors/exports/atoms/std-circuit-breaker.orb +2 -1
  5. package/behaviors/exports/atoms/std-collision.orb +2 -1
  6. package/behaviors/exports/atoms/std-combat-log.orb +2 -1
  7. package/behaviors/exports/atoms/std-combat.orb +2 -1
  8. package/behaviors/exports/atoms/std-confirmation.orb +2 -1
  9. package/behaviors/exports/atoms/std-dialogue-box.orb +2 -1
  10. package/behaviors/exports/atoms/std-display.orb +2 -1
  11. package/behaviors/exports/atoms/std-drawer.orb +2 -1
  12. package/behaviors/exports/atoms/std-filter.orb +2 -1
  13. package/behaviors/exports/atoms/std-game-audio.orb +2 -1
  14. package/behaviors/exports/atoms/std-game-hud.orb +2 -1
  15. package/behaviors/exports/atoms/std-game-menu.orb +2 -1
  16. package/behaviors/exports/atoms/std-game-over-screen.orb +2 -1
  17. package/behaviors/exports/atoms/std-gameflow.orb +2 -1
  18. package/behaviors/exports/atoms/std-input.orb +2 -1
  19. package/behaviors/exports/atoms/std-inventory-panel.orb +2 -1
  20. package/behaviors/exports/atoms/std-isometric-canvas.orb +2 -1
  21. package/behaviors/exports/atoms/std-loading.orb +2 -1
  22. package/behaviors/exports/atoms/std-modal.orb +2 -1
  23. package/behaviors/exports/atoms/std-movement.orb +2 -1
  24. package/behaviors/exports/atoms/std-notification.orb +2 -1
  25. package/behaviors/exports/atoms/std-overworld.orb +2 -1
  26. package/behaviors/exports/atoms/std-pagination.orb +2 -1
  27. package/behaviors/exports/atoms/std-physics2d.orb +2 -1
  28. package/behaviors/exports/atoms/std-platformer-canvas.orb +2 -1
  29. package/behaviors/exports/atoms/std-quest.orb +2 -1
  30. package/behaviors/exports/atoms/std-rate-limiter.orb +2 -1
  31. package/behaviors/exports/atoms/std-score-board.orb +2 -1
  32. package/behaviors/exports/atoms/std-score.orb +2 -1
  33. package/behaviors/exports/atoms/std-search.orb +2 -1
  34. package/behaviors/exports/atoms/std-selection.orb +2 -1
  35. package/behaviors/exports/atoms/std-simulation-canvas.orb +2 -1
  36. package/behaviors/exports/atoms/std-sort.orb +2 -1
  37. package/behaviors/exports/atoms/std-sprite.orb +2 -1
  38. package/behaviors/exports/atoms/std-tabs.orb +2 -1
  39. package/behaviors/exports/atoms/std-timer.orb +2 -1
  40. package/behaviors/exports/atoms/std-undo.orb +2 -1
  41. package/behaviors/exports/atoms/std-wizard.orb +2 -1
  42. package/behaviors/exports/molecules/std-builder-game.orb +2 -1
  43. package/behaviors/exports/molecules/std-cart.orb +2 -1
  44. package/behaviors/exports/molecules/std-classifier-game.orb +2 -1
  45. package/behaviors/exports/molecules/std-debugger-game.orb +2 -1
  46. package/behaviors/exports/molecules/std-detail.orb +2 -1
  47. package/behaviors/exports/molecules/std-event-handler-game.orb +2 -1
  48. package/behaviors/exports/molecules/std-geospatial.orb +2 -1
  49. package/behaviors/exports/molecules/std-inventory.orb +2 -1
  50. package/behaviors/exports/molecules/std-list.orb +2 -1
  51. package/behaviors/exports/molecules/std-messaging.orb +2 -1
  52. package/behaviors/exports/molecules/std-negotiator-game.orb +2 -1
  53. package/behaviors/exports/molecules/std-platformer-game.orb +2 -1
  54. package/behaviors/exports/molecules/std-puzzle-game.orb +2 -1
  55. package/behaviors/exports/molecules/std-sequencer-game.orb +2 -1
  56. package/behaviors/exports/molecules/std-simulator-game.orb +2 -1
  57. package/behaviors/exports/molecules/std-turn-based-battle.orb +2 -1
  58. package/behaviors/exports/organisms/std-api-gateway.orb +2 -1
  59. package/behaviors/exports/organisms/std-arcade-game.orb +2 -1
  60. package/behaviors/exports/organisms/std-booking-system.orb +2 -1
  61. package/behaviors/exports/organisms/std-cicd-pipeline.orb +2 -1
  62. package/behaviors/exports/organisms/std-cms.orb +2 -1
  63. package/behaviors/exports/organisms/std-coding-academy.orb +2 -1
  64. package/behaviors/exports/organisms/std-crm.orb +2 -1
  65. package/behaviors/exports/organisms/std-devops-dashboard.orb +2 -1
  66. package/behaviors/exports/organisms/std-ecommerce.orb +2 -1
  67. package/behaviors/exports/organisms/std-finance-tracker.orb +2 -1
  68. package/behaviors/exports/organisms/std-healthcare.orb +2 -1
  69. package/behaviors/exports/organisms/std-helpdesk.orb +2 -1
  70. package/behaviors/exports/organisms/std-hr-portal.orb +2 -1
  71. package/behaviors/exports/organisms/std-iot-dashboard.orb +2 -1
  72. package/behaviors/exports/organisms/std-lms.orb +2 -1
  73. package/behaviors/exports/organisms/std-logic-training.orb +2 -1
  74. package/behaviors/exports/organisms/std-platformer-app.orb +2 -1
  75. package/behaviors/exports/organisms/std-project-manager.orb +2 -1
  76. package/behaviors/exports/organisms/std-puzzle-app.orb +2 -1
  77. package/behaviors/exports/organisms/std-realtime-chat.orb +2 -1
  78. package/behaviors/exports/organisms/std-rpg-game.orb +2 -1
  79. package/behaviors/exports/organisms/std-social-feed.orb +2 -1
  80. package/behaviors/exports/organisms/std-stem-lab.orb +2 -1
  81. package/behaviors/exports/organisms/std-strategy-game.orb +2 -1
  82. package/behaviors/exports/organisms/std-trading-dashboard.orb +2 -1
  83. package/dist/behaviors/exports/atoms/std-async.orb +421 -0
  84. package/dist/behaviors/exports/atoms/std-browse.orb +174 -0
  85. package/dist/behaviors/exports/atoms/std-cache-aside.orb +882 -0
  86. package/dist/behaviors/exports/atoms/std-circuit-breaker.orb +502 -0
  87. package/dist/behaviors/exports/atoms/std-collision.orb +617 -0
  88. package/dist/behaviors/exports/atoms/std-combat-log.orb +146 -0
  89. package/dist/behaviors/exports/atoms/std-combat.orb +411 -0
  90. package/dist/behaviors/exports/atoms/std-confirmation.orb +283 -0
  91. package/dist/behaviors/exports/atoms/std-dialogue-box.orb +239 -0
  92. package/dist/behaviors/exports/atoms/std-display.orb +843 -0
  93. package/dist/behaviors/exports/atoms/std-drawer.orb +317 -0
  94. package/dist/behaviors/exports/atoms/std-filter.orb +443 -0
  95. package/dist/behaviors/exports/atoms/std-game-audio.orb +114 -0
  96. package/dist/behaviors/exports/atoms/std-game-hud.orb +152 -0
  97. package/dist/behaviors/exports/atoms/std-game-menu.orb +212 -0
  98. package/dist/behaviors/exports/atoms/std-game-over-screen.orb +196 -0
  99. package/dist/behaviors/exports/atoms/std-gameflow.orb +319 -0
  100. package/dist/behaviors/exports/atoms/std-input.orb +630 -0
  101. package/dist/behaviors/exports/atoms/std-inventory-panel.orb +256 -0
  102. package/dist/behaviors/exports/atoms/std-isometric-canvas.orb +632 -0
  103. package/dist/behaviors/exports/atoms/std-loading.orb +512 -0
  104. package/dist/behaviors/exports/atoms/std-modal.orb +271 -0
  105. package/dist/behaviors/exports/atoms/std-movement.orb +1038 -0
  106. package/dist/behaviors/exports/atoms/std-notification.orb +419 -0
  107. package/dist/behaviors/exports/atoms/std-overworld.orb +484 -0
  108. package/dist/behaviors/exports/atoms/std-pagination.orb +332 -0
  109. package/dist/behaviors/exports/atoms/std-physics2d.orb +420 -0
  110. package/dist/behaviors/exports/atoms/std-platformer-canvas.orb +258 -0
  111. package/dist/behaviors/exports/atoms/std-quest.orb +981 -0
  112. package/dist/behaviors/exports/atoms/std-rate-limiter.orb +639 -0
  113. package/dist/behaviors/exports/atoms/std-score-board.orb +239 -0
  114. package/dist/behaviors/exports/atoms/std-score.orb +467 -0
  115. package/dist/behaviors/exports/atoms/std-search.orb +374 -0
  116. package/dist/behaviors/exports/atoms/std-selection.orb +760 -0
  117. package/dist/behaviors/exports/atoms/std-simulation-canvas.orb +184 -0
  118. package/dist/behaviors/exports/atoms/std-sort.orb +579 -0
  119. package/dist/behaviors/exports/atoms/std-sprite.orb +157 -0
  120. package/dist/behaviors/exports/atoms/std-tabs.orb +275 -0
  121. package/dist/behaviors/exports/atoms/std-timer.orb +1031 -0
  122. package/dist/behaviors/exports/atoms/std-undo.orb +695 -0
  123. package/dist/behaviors/exports/atoms/std-wizard.orb +667 -0
  124. package/dist/behaviors/exports/molecules/std-builder-game.orb +184 -0
  125. package/dist/behaviors/exports/molecules/std-cart.orb +592 -0
  126. package/dist/behaviors/exports/molecules/std-classifier-game.orb +184 -0
  127. package/dist/behaviors/exports/molecules/std-debugger-game.orb +184 -0
  128. package/dist/behaviors/exports/molecules/std-detail.orb +590 -0
  129. package/dist/behaviors/exports/molecules/std-event-handler-game.orb +184 -0
  130. package/dist/behaviors/exports/molecules/std-geospatial.orb +650 -0
  131. package/dist/behaviors/exports/molecules/std-inventory.orb +854 -0
  132. package/dist/behaviors/exports/molecules/std-list.orb +955 -0
  133. package/dist/behaviors/exports/molecules/std-messaging.orb +586 -0
  134. package/dist/behaviors/exports/molecules/std-negotiator-game.orb +184 -0
  135. package/dist/behaviors/exports/molecules/std-platformer-game.orb +497 -0
  136. package/dist/behaviors/exports/molecules/std-puzzle-game.orb +528 -0
  137. package/dist/behaviors/exports/molecules/std-sequencer-game.orb +184 -0
  138. package/dist/behaviors/exports/molecules/std-simulator-game.orb +184 -0
  139. package/dist/behaviors/exports/molecules/std-turn-based-battle.orb +444 -0
  140. package/dist/behaviors/exports/organisms/std-api-gateway.orb +2297 -0
  141. package/dist/behaviors/exports/organisms/std-arcade-game.orb +834 -0
  142. package/dist/behaviors/exports/organisms/std-booking-system.orb +3978 -0
  143. package/dist/behaviors/exports/organisms/std-cicd-pipeline.orb +2215 -0
  144. package/dist/behaviors/exports/organisms/std-cms.orb +2645 -0
  145. package/dist/behaviors/exports/organisms/std-coding-academy.orb +1395 -0
  146. package/dist/behaviors/exports/organisms/std-crm.orb +3542 -0
  147. package/dist/behaviors/exports/organisms/std-devops-dashboard.orb +3135 -0
  148. package/dist/behaviors/exports/organisms/std-ecommerce.orb +3744 -0
  149. package/dist/behaviors/exports/organisms/std-finance-tracker.orb +2386 -0
  150. package/dist/behaviors/exports/organisms/std-healthcare.orb +4680 -0
  151. package/dist/behaviors/exports/organisms/std-helpdesk.orb +2565 -0
  152. package/dist/behaviors/exports/organisms/std-hr-portal.orb +4030 -0
  153. package/dist/behaviors/exports/organisms/std-iot-dashboard.orb +2298 -0
  154. package/dist/behaviors/exports/organisms/std-lms.orb +2855 -0
  155. package/dist/behaviors/exports/organisms/std-logic-training.orb +599 -0
  156. package/dist/behaviors/exports/organisms/std-platformer-app.orb +1570 -0
  157. package/dist/behaviors/exports/organisms/std-project-manager.orb +3022 -0
  158. package/dist/behaviors/exports/organisms/std-puzzle-app.orb +744 -0
  159. package/dist/behaviors/exports/organisms/std-realtime-chat.orb +2381 -0
  160. package/dist/behaviors/exports/organisms/std-rpg-game.orb +2805 -0
  161. package/dist/behaviors/exports/organisms/std-social-feed.orb +1222 -0
  162. package/dist/behaviors/exports/organisms/std-stem-lab.orb +1211 -0
  163. package/dist/behaviors/exports/organisms/std-strategy-game.orb +1762 -0
  164. package/dist/behaviors/exports/organisms/std-trading-dashboard.orb +2218 -0
  165. package/dist/behaviors/exports-reader.d.ts +2 -0
  166. package/dist/behaviors/exports-reader.js +5 -3
  167. package/dist/behaviors/exports-reader.js.map +1 -1
  168. package/dist/behaviors/index.js +5 -3
  169. package/dist/behaviors/index.js.map +1 -1
  170. package/dist/exports/atoms/std-async.orb +421 -0
  171. package/dist/exports/atoms/std-browse.orb +174 -0
  172. package/dist/exports/atoms/std-cache-aside.orb +882 -0
  173. package/dist/exports/atoms/std-circuit-breaker.orb +502 -0
  174. package/dist/exports/atoms/std-collision.orb +617 -0
  175. package/dist/exports/atoms/std-combat-log.orb +146 -0
  176. package/dist/exports/atoms/std-combat.orb +411 -0
  177. package/dist/exports/atoms/std-confirmation.orb +283 -0
  178. package/dist/exports/atoms/std-dialogue-box.orb +239 -0
  179. package/dist/exports/atoms/std-display.orb +843 -0
  180. package/dist/exports/atoms/std-drawer.orb +317 -0
  181. package/dist/exports/atoms/std-filter.orb +443 -0
  182. package/dist/exports/atoms/std-game-audio.orb +114 -0
  183. package/dist/exports/atoms/std-game-hud.orb +152 -0
  184. package/dist/exports/atoms/std-game-menu.orb +212 -0
  185. package/dist/exports/atoms/std-game-over-screen.orb +196 -0
  186. package/dist/exports/atoms/std-gameflow.orb +319 -0
  187. package/dist/exports/atoms/std-input.orb +630 -0
  188. package/dist/exports/atoms/std-inventory-panel.orb +256 -0
  189. package/dist/exports/atoms/std-isometric-canvas.orb +632 -0
  190. package/dist/exports/atoms/std-loading.orb +512 -0
  191. package/dist/exports/atoms/std-modal.orb +271 -0
  192. package/dist/exports/atoms/std-movement.orb +1038 -0
  193. package/dist/exports/atoms/std-notification.orb +419 -0
  194. package/dist/exports/atoms/std-overworld.orb +484 -0
  195. package/dist/exports/atoms/std-pagination.orb +332 -0
  196. package/dist/exports/atoms/std-physics2d.orb +420 -0
  197. package/dist/exports/atoms/std-platformer-canvas.orb +258 -0
  198. package/dist/exports/atoms/std-quest.orb +981 -0
  199. package/dist/exports/atoms/std-rate-limiter.orb +639 -0
  200. package/dist/exports/atoms/std-score-board.orb +239 -0
  201. package/dist/exports/atoms/std-score.orb +467 -0
  202. package/dist/exports/atoms/std-search.orb +374 -0
  203. package/dist/exports/atoms/std-selection.orb +760 -0
  204. package/dist/exports/atoms/std-simulation-canvas.orb +184 -0
  205. package/dist/exports/atoms/std-sort.orb +579 -0
  206. package/dist/exports/atoms/std-sprite.orb +157 -0
  207. package/dist/exports/atoms/std-tabs.orb +275 -0
  208. package/dist/exports/atoms/std-timer.orb +1031 -0
  209. package/dist/exports/atoms/std-undo.orb +695 -0
  210. package/dist/exports/atoms/std-wizard.orb +667 -0
  211. package/dist/exports/molecules/std-builder-game.orb +184 -0
  212. package/dist/exports/molecules/std-cart.orb +592 -0
  213. package/dist/exports/molecules/std-classifier-game.orb +184 -0
  214. package/dist/exports/molecules/std-debugger-game.orb +184 -0
  215. package/dist/exports/molecules/std-detail.orb +590 -0
  216. package/dist/exports/molecules/std-event-handler-game.orb +184 -0
  217. package/dist/exports/molecules/std-geospatial.orb +650 -0
  218. package/dist/exports/molecules/std-inventory.orb +854 -0
  219. package/dist/exports/molecules/std-list.orb +955 -0
  220. package/dist/exports/molecules/std-messaging.orb +586 -0
  221. package/dist/exports/molecules/std-negotiator-game.orb +184 -0
  222. package/dist/exports/molecules/std-platformer-game.orb +497 -0
  223. package/dist/exports/molecules/std-puzzle-game.orb +528 -0
  224. package/dist/exports/molecules/std-sequencer-game.orb +184 -0
  225. package/dist/exports/molecules/std-simulator-game.orb +184 -0
  226. package/dist/exports/molecules/std-turn-based-battle.orb +444 -0
  227. package/dist/exports/organisms/std-api-gateway.orb +2297 -0
  228. package/dist/exports/organisms/std-arcade-game.orb +834 -0
  229. package/dist/exports/organisms/std-booking-system.orb +3978 -0
  230. package/dist/exports/organisms/std-cicd-pipeline.orb +2215 -0
  231. package/dist/exports/organisms/std-cms.orb +2645 -0
  232. package/dist/exports/organisms/std-coding-academy.orb +1395 -0
  233. package/dist/exports/organisms/std-crm.orb +3542 -0
  234. package/dist/exports/organisms/std-devops-dashboard.orb +3135 -0
  235. package/dist/exports/organisms/std-ecommerce.orb +3744 -0
  236. package/dist/exports/organisms/std-finance-tracker.orb +2386 -0
  237. package/dist/exports/organisms/std-healthcare.orb +4680 -0
  238. package/dist/exports/organisms/std-helpdesk.orb +2565 -0
  239. package/dist/exports/organisms/std-hr-portal.orb +4030 -0
  240. package/dist/exports/organisms/std-iot-dashboard.orb +2298 -0
  241. package/dist/exports/organisms/std-lms.orb +2855 -0
  242. package/dist/exports/organisms/std-logic-training.orb +599 -0
  243. package/dist/exports/organisms/std-platformer-app.orb +1570 -0
  244. package/dist/exports/organisms/std-project-manager.orb +3022 -0
  245. package/dist/exports/organisms/std-puzzle-app.orb +744 -0
  246. package/dist/exports/organisms/std-realtime-chat.orb +2381 -0
  247. package/dist/exports/organisms/std-rpg-game.orb +2805 -0
  248. package/dist/exports/organisms/std-social-feed.orb +1222 -0
  249. package/dist/exports/organisms/std-stem-lab.orb +1211 -0
  250. package/dist/exports/organisms/std-strategy-game.orb +1762 -0
  251. package/dist/exports/organisms/std-trading-dashboard.orb +2218 -0
  252. package/dist/index.js +5 -3
  253. package/dist/index.js.map +1 -1
  254. package/package.json +1 -1
  255. package/behaviors/exports/atoms/std-game-canvas-2d.orb +0 -135
  256. package/behaviors/exports/atoms/std-game-canvas-3d.orb +0 -224
@@ -0,0 +1,695 @@
1
+ {
2
+ "name": "ItemOrbital",
3
+ "orbitals": [
4
+ {
5
+ "name": "ItemOrbital",
6
+ "entity": {
7
+ "name": "Item",
8
+ "persistence": "runtime",
9
+ "fields": [
10
+ {
11
+ "name": "id",
12
+ "type": "string"
13
+ },
14
+ {
15
+ "name": "name",
16
+ "type": "string"
17
+ },
18
+ {
19
+ "name": "description",
20
+ "type": "string"
21
+ },
22
+ {
23
+ "name": "status",
24
+ "type": "string",
25
+ "default": "active"
26
+ },
27
+ {
28
+ "name": "createdAt",
29
+ "type": "string"
30
+ },
31
+ {
32
+ "name": "undoStack",
33
+ "type": "array",
34
+ "default": []
35
+ },
36
+ {
37
+ "name": "redoStack",
38
+ "type": "array",
39
+ "default": []
40
+ },
41
+ {
42
+ "name": "current",
43
+ "type": "string",
44
+ "default": ""
45
+ }
46
+ ]
47
+ },
48
+ "traits": [
49
+ {
50
+ "name": "ItemUndo",
51
+ "linkedEntity": "Item",
52
+ "category": "interaction",
53
+ "stateMachine": {
54
+ "states": [
55
+ {
56
+ "name": "idle",
57
+ "isInitial": true
58
+ }
59
+ ],
60
+ "events": [
61
+ {
62
+ "key": "INIT",
63
+ "name": "Initialize"
64
+ },
65
+ {
66
+ "key": "PUSH",
67
+ "name": "Push",
68
+ "payload": [
69
+ {
70
+ "name": "data",
71
+ "type": "string",
72
+ "required": true
73
+ }
74
+ ]
75
+ },
76
+ {
77
+ "key": "UNDO",
78
+ "name": "Undo"
79
+ },
80
+ {
81
+ "key": "REDO",
82
+ "name": "Redo"
83
+ },
84
+ {
85
+ "key": "CLEAR",
86
+ "name": "Clear"
87
+ }
88
+ ],
89
+ "transitions": [
90
+ {
91
+ "from": "idle",
92
+ "to": "idle",
93
+ "event": "INIT",
94
+ "effects": [
95
+ [
96
+ "fetch",
97
+ "Item"
98
+ ],
99
+ [
100
+ "render-ui",
101
+ "main",
102
+ {
103
+ "type": "stack",
104
+ "direction": "vertical",
105
+ "gap": "lg",
106
+ "children": [
107
+ {
108
+ "type": "stack",
109
+ "direction": "horizontal",
110
+ "gap": "md",
111
+ "justify": "space-between",
112
+ "align": "center",
113
+ "children": [
114
+ {
115
+ "type": "stack",
116
+ "direction": "horizontal",
117
+ "gap": "sm",
118
+ "align": "center",
119
+ "children": [
120
+ {
121
+ "type": "icon",
122
+ "name": "history",
123
+ "size": "lg"
124
+ },
125
+ {
126
+ "type": "typography",
127
+ "content": "History",
128
+ "variant": "h2"
129
+ }
130
+ ]
131
+ },
132
+ {
133
+ "type": "stack",
134
+ "direction": "horizontal",
135
+ "gap": "sm",
136
+ "align": "center",
137
+ "children": [
138
+ {
139
+ "type": "button",
140
+ "label": "Undo",
141
+ "event": "UNDO",
142
+ "variant": "ghost",
143
+ "icon": "undo"
144
+ },
145
+ {
146
+ "type": "button",
147
+ "label": "Redo",
148
+ "event": "REDO",
149
+ "variant": "ghost",
150
+ "icon": "redo"
151
+ },
152
+ {
153
+ "type": "divider",
154
+ "orientation": "vertical"
155
+ },
156
+ {
157
+ "type": "button",
158
+ "label": "Clear",
159
+ "event": "CLEAR",
160
+ "variant": "ghost",
161
+ "icon": "trash-2"
162
+ }
163
+ ]
164
+ }
165
+ ]
166
+ },
167
+ {
168
+ "type": "divider"
169
+ },
170
+ {
171
+ "type": "stack",
172
+ "direction": "horizontal",
173
+ "gap": "md",
174
+ "align": "center",
175
+ "children": [
176
+ {
177
+ "type": "typography",
178
+ "variant": "caption",
179
+ "color": "muted",
180
+ "content": "Last action:"
181
+ },
182
+ {
183
+ "type": "badge",
184
+ "label": "@entity.current"
185
+ }
186
+ ]
187
+ }
188
+ ]
189
+ }
190
+ ]
191
+ ]
192
+ },
193
+ {
194
+ "from": "idle",
195
+ "to": "idle",
196
+ "event": "PUSH",
197
+ "effects": [
198
+ [
199
+ "set",
200
+ "@entity.undoStack",
201
+ [
202
+ "array/append",
203
+ "@entity.undoStack",
204
+ "@entity.current"
205
+ ]
206
+ ],
207
+ [
208
+ "set",
209
+ "@entity.current",
210
+ "@payload.data"
211
+ ],
212
+ [
213
+ "set",
214
+ "@entity.redoStack",
215
+ []
216
+ ],
217
+ [
218
+ "render-ui",
219
+ "main",
220
+ {
221
+ "type": "stack",
222
+ "direction": "vertical",
223
+ "gap": "lg",
224
+ "children": [
225
+ {
226
+ "type": "stack",
227
+ "direction": "horizontal",
228
+ "gap": "md",
229
+ "justify": "space-between",
230
+ "align": "center",
231
+ "children": [
232
+ {
233
+ "type": "stack",
234
+ "direction": "horizontal",
235
+ "gap": "sm",
236
+ "align": "center",
237
+ "children": [
238
+ {
239
+ "type": "icon",
240
+ "name": "history",
241
+ "size": "lg"
242
+ },
243
+ {
244
+ "type": "typography",
245
+ "content": "History",
246
+ "variant": "h2"
247
+ }
248
+ ]
249
+ },
250
+ {
251
+ "type": "stack",
252
+ "direction": "horizontal",
253
+ "gap": "sm",
254
+ "align": "center",
255
+ "children": [
256
+ {
257
+ "type": "button",
258
+ "label": "Undo",
259
+ "event": "UNDO",
260
+ "variant": "ghost",
261
+ "icon": "undo"
262
+ },
263
+ {
264
+ "type": "button",
265
+ "label": "Redo",
266
+ "event": "REDO",
267
+ "variant": "ghost",
268
+ "icon": "redo"
269
+ },
270
+ {
271
+ "type": "divider",
272
+ "orientation": "vertical"
273
+ },
274
+ {
275
+ "type": "button",
276
+ "label": "Clear",
277
+ "event": "CLEAR",
278
+ "variant": "ghost",
279
+ "icon": "trash-2"
280
+ }
281
+ ]
282
+ }
283
+ ]
284
+ },
285
+ {
286
+ "type": "divider"
287
+ },
288
+ {
289
+ "type": "stack",
290
+ "direction": "horizontal",
291
+ "gap": "md",
292
+ "align": "center",
293
+ "children": [
294
+ {
295
+ "type": "typography",
296
+ "variant": "caption",
297
+ "color": "muted",
298
+ "content": "Last action:"
299
+ },
300
+ {
301
+ "type": "badge",
302
+ "label": "@entity.current"
303
+ }
304
+ ]
305
+ }
306
+ ]
307
+ }
308
+ ]
309
+ ]
310
+ },
311
+ {
312
+ "from": "idle",
313
+ "to": "idle",
314
+ "event": "UNDO",
315
+ "effects": [
316
+ [
317
+ "set",
318
+ "@entity.redoStack",
319
+ [
320
+ "array/append",
321
+ "@entity.redoStack",
322
+ "@entity.current"
323
+ ]
324
+ ],
325
+ [
326
+ "set",
327
+ "@entity.current",
328
+ [
329
+ "array/last",
330
+ "@entity.undoStack"
331
+ ]
332
+ ],
333
+ [
334
+ "set",
335
+ "@entity.undoStack",
336
+ [
337
+ "array/slice",
338
+ "@entity.undoStack",
339
+ 0,
340
+ -1
341
+ ]
342
+ ],
343
+ [
344
+ "render-ui",
345
+ "main",
346
+ {
347
+ "type": "stack",
348
+ "direction": "vertical",
349
+ "gap": "lg",
350
+ "children": [
351
+ {
352
+ "type": "stack",
353
+ "direction": "horizontal",
354
+ "gap": "md",
355
+ "justify": "space-between",
356
+ "align": "center",
357
+ "children": [
358
+ {
359
+ "type": "stack",
360
+ "direction": "horizontal",
361
+ "gap": "sm",
362
+ "align": "center",
363
+ "children": [
364
+ {
365
+ "type": "icon",
366
+ "name": "history",
367
+ "size": "lg"
368
+ },
369
+ {
370
+ "type": "typography",
371
+ "content": "History",
372
+ "variant": "h2"
373
+ }
374
+ ]
375
+ },
376
+ {
377
+ "type": "stack",
378
+ "direction": "horizontal",
379
+ "gap": "sm",
380
+ "align": "center",
381
+ "children": [
382
+ {
383
+ "type": "button",
384
+ "label": "Undo",
385
+ "event": "UNDO",
386
+ "variant": "ghost",
387
+ "icon": "undo"
388
+ },
389
+ {
390
+ "type": "button",
391
+ "label": "Redo",
392
+ "event": "REDO",
393
+ "variant": "ghost",
394
+ "icon": "redo"
395
+ },
396
+ {
397
+ "type": "divider",
398
+ "orientation": "vertical"
399
+ },
400
+ {
401
+ "type": "button",
402
+ "label": "Clear",
403
+ "event": "CLEAR",
404
+ "variant": "ghost",
405
+ "icon": "trash-2"
406
+ }
407
+ ]
408
+ }
409
+ ]
410
+ },
411
+ {
412
+ "type": "divider"
413
+ },
414
+ {
415
+ "type": "stack",
416
+ "direction": "horizontal",
417
+ "gap": "md",
418
+ "align": "center",
419
+ "children": [
420
+ {
421
+ "type": "typography",
422
+ "variant": "caption",
423
+ "color": "muted",
424
+ "content": "Last action:"
425
+ },
426
+ {
427
+ "type": "badge",
428
+ "label": "@entity.current"
429
+ }
430
+ ]
431
+ }
432
+ ]
433
+ }
434
+ ]
435
+ ]
436
+ },
437
+ {
438
+ "from": "idle",
439
+ "to": "idle",
440
+ "event": "REDO",
441
+ "effects": [
442
+ [
443
+ "set",
444
+ "@entity.undoStack",
445
+ [
446
+ "array/append",
447
+ "@entity.undoStack",
448
+ "@entity.current"
449
+ ]
450
+ ],
451
+ [
452
+ "set",
453
+ "@entity.current",
454
+ [
455
+ "array/last",
456
+ "@entity.redoStack"
457
+ ]
458
+ ],
459
+ [
460
+ "set",
461
+ "@entity.redoStack",
462
+ [
463
+ "array/slice",
464
+ "@entity.redoStack",
465
+ 0,
466
+ -1
467
+ ]
468
+ ],
469
+ [
470
+ "render-ui",
471
+ "main",
472
+ {
473
+ "type": "stack",
474
+ "direction": "vertical",
475
+ "gap": "lg",
476
+ "children": [
477
+ {
478
+ "type": "stack",
479
+ "direction": "horizontal",
480
+ "gap": "md",
481
+ "justify": "space-between",
482
+ "align": "center",
483
+ "children": [
484
+ {
485
+ "type": "stack",
486
+ "direction": "horizontal",
487
+ "gap": "sm",
488
+ "align": "center",
489
+ "children": [
490
+ {
491
+ "type": "icon",
492
+ "name": "history",
493
+ "size": "lg"
494
+ },
495
+ {
496
+ "type": "typography",
497
+ "content": "History",
498
+ "variant": "h2"
499
+ }
500
+ ]
501
+ },
502
+ {
503
+ "type": "stack",
504
+ "direction": "horizontal",
505
+ "gap": "sm",
506
+ "align": "center",
507
+ "children": [
508
+ {
509
+ "type": "button",
510
+ "label": "Undo",
511
+ "event": "UNDO",
512
+ "variant": "ghost",
513
+ "icon": "undo"
514
+ },
515
+ {
516
+ "type": "button",
517
+ "label": "Redo",
518
+ "event": "REDO",
519
+ "variant": "ghost",
520
+ "icon": "redo"
521
+ },
522
+ {
523
+ "type": "divider",
524
+ "orientation": "vertical"
525
+ },
526
+ {
527
+ "type": "button",
528
+ "label": "Clear",
529
+ "event": "CLEAR",
530
+ "variant": "ghost",
531
+ "icon": "trash-2"
532
+ }
533
+ ]
534
+ }
535
+ ]
536
+ },
537
+ {
538
+ "type": "divider"
539
+ },
540
+ {
541
+ "type": "stack",
542
+ "direction": "horizontal",
543
+ "gap": "md",
544
+ "align": "center",
545
+ "children": [
546
+ {
547
+ "type": "typography",
548
+ "variant": "caption",
549
+ "color": "muted",
550
+ "content": "Last action:"
551
+ },
552
+ {
553
+ "type": "badge",
554
+ "label": "@entity.current"
555
+ }
556
+ ]
557
+ }
558
+ ]
559
+ }
560
+ ]
561
+ ]
562
+ },
563
+ {
564
+ "from": "idle",
565
+ "to": "idle",
566
+ "event": "CLEAR",
567
+ "effects": [
568
+ [
569
+ "set",
570
+ "@entity.undoStack",
571
+ []
572
+ ],
573
+ [
574
+ "set",
575
+ "@entity.redoStack",
576
+ []
577
+ ],
578
+ [
579
+ "set",
580
+ "@entity.current",
581
+ ""
582
+ ],
583
+ [
584
+ "render-ui",
585
+ "main",
586
+ {
587
+ "type": "stack",
588
+ "direction": "vertical",
589
+ "gap": "lg",
590
+ "children": [
591
+ {
592
+ "type": "stack",
593
+ "direction": "horizontal",
594
+ "gap": "md",
595
+ "justify": "space-between",
596
+ "align": "center",
597
+ "children": [
598
+ {
599
+ "type": "stack",
600
+ "direction": "horizontal",
601
+ "gap": "sm",
602
+ "align": "center",
603
+ "children": [
604
+ {
605
+ "type": "icon",
606
+ "name": "history",
607
+ "size": "lg"
608
+ },
609
+ {
610
+ "type": "typography",
611
+ "content": "History",
612
+ "variant": "h2"
613
+ }
614
+ ]
615
+ },
616
+ {
617
+ "type": "stack",
618
+ "direction": "horizontal",
619
+ "gap": "sm",
620
+ "align": "center",
621
+ "children": [
622
+ {
623
+ "type": "button",
624
+ "label": "Undo",
625
+ "event": "UNDO",
626
+ "variant": "ghost",
627
+ "icon": "undo"
628
+ },
629
+ {
630
+ "type": "button",
631
+ "label": "Redo",
632
+ "event": "REDO",
633
+ "variant": "ghost",
634
+ "icon": "redo"
635
+ },
636
+ {
637
+ "type": "divider",
638
+ "orientation": "vertical"
639
+ },
640
+ {
641
+ "type": "button",
642
+ "label": "Clear",
643
+ "event": "CLEAR",
644
+ "variant": "ghost",
645
+ "icon": "trash-2"
646
+ }
647
+ ]
648
+ }
649
+ ]
650
+ },
651
+ {
652
+ "type": "divider"
653
+ },
654
+ {
655
+ "type": "stack",
656
+ "direction": "horizontal",
657
+ "gap": "md",
658
+ "align": "center",
659
+ "children": [
660
+ {
661
+ "type": "typography",
662
+ "variant": "caption",
663
+ "color": "muted",
664
+ "content": "Last action:"
665
+ },
666
+ {
667
+ "type": "badge",
668
+ "label": "@entity.current"
669
+ }
670
+ ]
671
+ }
672
+ ]
673
+ }
674
+ ]
675
+ ]
676
+ }
677
+ ]
678
+ }
679
+ }
680
+ ],
681
+ "pages": [
682
+ {
683
+ "name": "ItemUndoPage",
684
+ "path": "/items/undo",
685
+ "traits": [
686
+ {
687
+ "ref": "ItemUndo"
688
+ }
689
+ ]
690
+ }
691
+ ]
692
+ }
693
+ ],
694
+ "description": "Undo/Redo atom using array operators as a stack. - PUSH: appends to undoStack, clears redoStack - UNDO: pops from undoStack, pushes to redoStack - REDO: pops from redoStack, pushes to undoStack - CLEAR: empties both stacks Entity fields: undoStack (array), redoStack (array), current (string)"
695
+ }