@almadar/std 16.235.0 → 16.237.0

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 (283) hide show
  1. package/behaviors/behaviors-registry.json +5621 -1993
  2. package/behaviors/lolo/infra/atoms/std-approval-gate.lolo +32 -41
  3. package/behaviors/lolo/infra/atoms/std-audit-capture.lolo +0 -5
  4. package/behaviors/lolo/infra/atoms/std-cache-aside.lolo +0 -24
  5. package/behaviors/lolo/infra/atoms/std-circuit-breaker.lolo +1 -17
  6. package/behaviors/lolo/infra/atoms/std-data-erasure.lolo +17 -24
  7. package/behaviors/lolo/infra/atoms/std-data-import.lolo +8 -11
  8. package/behaviors/lolo/infra/atoms/std-game-clock.lolo +2 -0
  9. package/behaviors/lolo/infra/atoms/std-knowledge-loop.lolo +0 -5
  10. package/behaviors/lolo/infra/atoms/std-lifecycle.lolo +3 -1
  11. package/behaviors/lolo/infra/atoms/std-migration-job.lolo +2 -2
  12. package/behaviors/lolo/infra/atoms/std-mod-queue.lolo +40 -18
  13. package/behaviors/lolo/infra/atoms/std-notification-preferences.lolo +25 -11
  14. package/behaviors/lolo/infra/atoms/std-notify-on-event.lolo +0 -5
  15. package/behaviors/lolo/infra/atoms/std-permission-matrix.lolo +28 -11
  16. package/behaviors/lolo/infra/atoms/std-rate-limiter.lolo +84 -22
  17. package/behaviors/lolo/infra/atoms/std-status-lifecycle.lolo +1 -6
  18. package/behaviors/lolo/ml/atoms/std-graph-builder.lolo +3 -1
  19. package/behaviors/lolo/ml/atoms/std-ml-classify.lolo +0 -4
  20. package/behaviors/lolo/ml/atoms/std-ml-similarity.lolo +0 -4
  21. package/behaviors/lolo/ui/avl/atoms/ui-avl-state-machine.lolo +12 -0
  22. package/behaviors/lolo/ui/core/atoms/std-app-layout.lolo +55 -9
  23. package/behaviors/lolo/ui/core/atoms/std-app-search.lolo +6 -2
  24. package/behaviors/lolo/ui/core/atoms/std-billable-hour.lolo +19 -14
  25. package/behaviors/lolo/ui/core/atoms/std-board.lolo +77 -27
  26. package/behaviors/lolo/ui/core/atoms/std-browse.lolo +76 -33
  27. package/behaviors/lolo/ui/core/atoms/std-calendar.lolo +7 -3
  28. package/behaviors/lolo/ui/core/atoms/std-esign-flow.lolo +25 -13
  29. package/behaviors/lolo/ui/core/atoms/std-esign-request.lolo +5 -0
  30. package/behaviors/lolo/ui/core/atoms/std-event-log.lolo +32 -5
  31. package/behaviors/lolo/ui/core/atoms/std-export.lolo +0 -10
  32. package/behaviors/lolo/ui/core/atoms/std-file-store.lolo +15 -4
  33. package/behaviors/lolo/ui/core/atoms/std-form-advanced.lolo +1 -6
  34. package/behaviors/lolo/ui/core/atoms/std-gantt-schedule.lolo +8 -1
  35. package/behaviors/lolo/ui/core/atoms/std-geosearch.lolo +1 -0
  36. package/behaviors/lolo/ui/core/atoms/std-graphs.lolo +20 -4
  37. package/behaviors/lolo/ui/core/atoms/std-image-upload-multi.lolo +2 -2
  38. package/behaviors/lolo/ui/core/atoms/std-import.lolo +0 -5
  39. package/behaviors/lolo/ui/core/atoms/std-list.lolo +53 -32
  40. package/behaviors/lolo/ui/core/atoms/std-modal-editor.lolo +2 -2
  41. package/behaviors/lolo/ui/core/atoms/std-multi-party-flow.lolo +24 -0
  42. package/behaviors/lolo/ui/core/atoms/std-rating-review.lolo +12 -13
  43. package/behaviors/lolo/ui/core/atoms/std-record-detail.lolo +29 -13
  44. package/behaviors/lolo/ui/core/atoms/std-recurrence.lolo +14 -1
  45. package/behaviors/lolo/ui/core/atoms/std-role-gate.lolo +39 -0
  46. package/behaviors/lolo/ui/core/atoms/std-saved-search.lolo +84 -16
  47. package/behaviors/lolo/ui/core/atoms/std-selection.lolo +22 -10
  48. package/behaviors/lolo/ui/core/atoms/std-stats.lolo +5 -5
  49. package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +3 -0
  50. package/behaviors/lolo/ui/core/atoms/std-thread.lolo +41 -73
  51. package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +27 -12
  52. package/behaviors/lolo/ui/core/atoms/std-vote.lolo +0 -4
  53. package/behaviors/lolo/ui/core/atoms/std-wizard.lolo +3 -3
  54. package/behaviors/lolo/ui/core/atoms/ui-presence.lolo +21 -0
  55. package/behaviors/lolo/ui/core/atoms/ui-time-slot-cell.lolo +36 -0
  56. package/behaviors/lolo/ui/core/atoms/ui-typography.lolo +5 -0
  57. package/behaviors/lolo/ui/core/molecules/ui-alert.lolo +5 -0
  58. package/behaviors/lolo/ui/core/molecules/ui-animated-counter.lolo +1 -1
  59. package/behaviors/lolo/ui/core/molecules/ui-breadcrumb.lolo +6 -1
  60. package/behaviors/lolo/ui/core/molecules/ui-chart.lolo +11 -1
  61. package/behaviors/lolo/ui/core/molecules/ui-code-block.lolo +13 -8
  62. package/behaviors/lolo/ui/core/molecules/ui-command-palette.lolo +11 -6
  63. package/behaviors/lolo/ui/core/molecules/ui-commit-row.lolo +2 -2
  64. package/behaviors/lolo/ui/core/molecules/ui-confirm-dialog.lolo +8 -0
  65. package/behaviors/lolo/ui/core/molecules/ui-data-grid.lolo +60 -5
  66. package/behaviors/lolo/ui/core/molecules/ui-data-list.lolo +47 -3
  67. package/behaviors/lolo/ui/core/molecules/ui-date-range-picker.lolo +3 -3
  68. package/behaviors/lolo/ui/core/molecules/ui-document-details.lolo +31 -9
  69. package/behaviors/lolo/ui/core/molecules/ui-document-panel.lolo +8 -3
  70. package/behaviors/lolo/ui/core/molecules/ui-document-viewer.lolo +6 -1
  71. package/behaviors/lolo/ui/core/molecules/ui-drawer.lolo +13 -0
  72. package/behaviors/lolo/ui/core/molecules/ui-emoji-picker.lolo +1 -1
  73. package/behaviors/lolo/ui/core/molecules/ui-feature-card.lolo +1 -1
  74. package/behaviors/lolo/ui/core/molecules/ui-floating-action-button.lolo +6 -1
  75. package/behaviors/lolo/ui/core/molecules/ui-floating-toolbar.lolo +6 -1
  76. package/behaviors/lolo/ui/core/molecules/ui-form-actions.lolo +6 -1
  77. package/behaviors/lolo/ui/core/molecules/ui-gantt.lolo +9 -1
  78. package/behaviors/lolo/ui/core/molecules/ui-graph-canvas.lolo +6 -1
  79. package/behaviors/lolo/ui/core/molecules/ui-import-preview-tree.lolo +3 -2
  80. package/behaviors/lolo/ui/core/molecules/ui-likert-scale.lolo +1 -1
  81. package/behaviors/lolo/ui/core/molecules/ui-menu.lolo +7 -1
  82. package/behaviors/lolo/ui/core/molecules/ui-meter.lolo +6 -1
  83. package/behaviors/lolo/ui/core/molecules/ui-modal.lolo +5 -0
  84. package/behaviors/lolo/ui/core/molecules/ui-page-header.lolo +11 -1
  85. package/behaviors/lolo/ui/core/molecules/ui-page-transition.lolo +1 -1
  86. package/behaviors/lolo/ui/core/molecules/ui-swipeable-row.lolo +44 -15
  87. package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +57 -5
  88. package/behaviors/lolo/ui/core/molecules/ui-tabs.lolo +8 -2
  89. package/behaviors/lolo/ui/core/organisms/ui-detail-panel.lolo +87 -16
  90. package/behaviors/lolo/ui/core/organisms/ui-entity-cards.lolo +37 -10
  91. package/behaviors/lolo/ui/core/organisms/ui-entity-list.lolo +46 -8
  92. package/behaviors/lolo/ui/core/organisms/ui-entity-table.lolo +36 -10
  93. package/behaviors/lolo/ui/core/organisms/ui-form-section.lolo +57 -10
  94. package/behaviors/lolo/ui/core/organisms/ui-form.lolo +57 -10
  95. package/behaviors/lolo/ui/core/organisms/ui-media-gallery.lolo +22 -3
  96. package/behaviors/lolo/ui/core/organisms/ui-stat-card.lolo +6 -0
  97. package/behaviors/lolo/ui/core/organisms/ui-state-machine-view.lolo +12 -0
  98. package/behaviors/lolo/ui/core/organisms/ui-timeline.lolo +38 -5
  99. package/behaviors/lolo/ui/core/templates/ui-auth-layout.lolo +1 -1
  100. package/behaviors/lolo/ui/core/templates/ui-counter-template.lolo +3 -45
  101. package/behaviors/lolo/ui/core/templates/ui-dashboard-layout.lolo +7 -2
  102. package/behaviors/lolo/ui/core/templates/ui-generic-app-template.lolo +2 -37
  103. package/behaviors/lolo/ui/game/.hand-authored.json +2 -2
  104. package/behaviors/lolo/ui/game/atoms/ui-choice-button.lolo +1 -1
  105. package/behaviors/lolo/ui/game/atoms/ui-dialogue-bubble.lolo +2 -2
  106. package/behaviors/lolo/ui/game/atoms/ui-game-menu.lolo +9 -3
  107. package/behaviors/lolo/ui/game/atoms/ui-score-display.lolo +1 -1
  108. package/behaviors/lolo/ui/game/organisms/std-arcade-board-3d.lolo +2 -2
  109. package/behaviors/lolo/ui/game/organisms/std-crew-board-2d.lolo +0 -4
  110. package/behaviors/lolo/ui/game/organisms/std-platformer-puzzle.lolo +2 -66
  111. package/behaviors/lolo/ui/game/organisms/std-tactics-board-2d.lolo +0 -4
  112. package/behaviors/lolo/ui/game/organisms/std-worldmap-board-2d.lolo +0 -4
  113. package/behaviors/lolo/ui/learning/atoms/std-learn-stepper.lolo +6 -6
  114. package/behaviors/lolo-behavior-contracts.json +1 -1
  115. package/behaviors/registry/factory-signatures.json +1 -1
  116. package/behaviors/registry/infra/atoms/std-approval-gate.orb +194 -67
  117. package/behaviors/registry/infra/atoms/std-audit-capture.orb +0 -8
  118. package/behaviors/registry/infra/atoms/std-cache-aside.orb +0 -84
  119. package/behaviors/registry/infra/atoms/std-circuit-breaker.orb +1 -44
  120. package/behaviors/registry/infra/atoms/std-data-erasure.orb +124 -55
  121. package/behaviors/registry/infra/atoms/std-data-import.orb +12 -11
  122. package/behaviors/registry/infra/atoms/std-game-clock.orb +31 -0
  123. package/behaviors/registry/infra/atoms/std-knowledge-loop.orb +0 -57
  124. package/behaviors/registry/infra/atoms/std-lifecycle.orb +43 -0
  125. package/behaviors/registry/infra/atoms/std-migration-job.orb +26 -1
  126. package/behaviors/registry/infra/atoms/std-mod-queue.orb +379 -103
  127. package/behaviors/registry/infra/atoms/std-notification-preferences.orb +135 -12
  128. package/behaviors/registry/infra/atoms/std-notify-on-event.orb +0 -11
  129. package/behaviors/registry/infra/atoms/std-permission-matrix.orb +137 -12
  130. package/behaviors/registry/infra/atoms/std-rate-limiter.orb +287 -72
  131. package/behaviors/registry/infra/atoms/std-status-lifecycle.orb +5 -8
  132. package/behaviors/registry/ml/atoms/std-graph-builder.orb +11 -0
  133. package/behaviors/registry/ml/atoms/std-ml-classify.orb +0 -7
  134. package/behaviors/registry/ml/atoms/std-ml-similarity.orb +0 -7
  135. package/behaviors/registry/ui/avl/atoms/ui-avl-state-machine.orb +82 -0
  136. package/behaviors/registry/ui/core/atoms/std-app-layout.orb +417 -9
  137. package/behaviors/registry/ui/core/atoms/std-app-search.orb +53 -1
  138. package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +209 -19
  139. package/behaviors/registry/ui/core/atoms/std-board.orb +242 -61
  140. package/behaviors/registry/ui/core/atoms/std-browse.orb +499 -49
  141. package/behaviors/registry/ui/core/atoms/std-calendar.orb +96 -2
  142. package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +122 -15
  143. package/behaviors/registry/ui/core/atoms/std-esign-request.orb +11 -0
  144. package/behaviors/registry/ui/core/atoms/std-event-log.orb +42 -6
  145. package/behaviors/registry/ui/core/atoms/std-export.orb +0 -16
  146. package/behaviors/registry/ui/core/atoms/std-file-store.orb +121 -3
  147. package/behaviors/registry/ui/core/atoms/std-form-advanced.orb +1 -43
  148. package/behaviors/registry/ui/core/atoms/std-gantt-schedule.orb +25 -1
  149. package/behaviors/registry/ui/core/atoms/std-geosearch.orb +5 -0
  150. package/behaviors/registry/ui/core/atoms/std-graphs.orb +173 -66
  151. package/behaviors/registry/ui/core/atoms/std-image-upload-multi.orb +4 -0
  152. package/behaviors/registry/ui/core/atoms/std-import.orb +0 -8
  153. package/behaviors/registry/ui/core/atoms/std-list.orb +237 -34
  154. package/behaviors/registry/ui/core/atoms/std-modal-editor.orb +10 -1
  155. package/behaviors/registry/ui/core/atoms/std-multi-party-flow.orb +24 -0
  156. package/behaviors/registry/ui/core/atoms/std-rating-review.orb +37 -19
  157. package/behaviors/registry/ui/core/atoms/std-record-detail.orb +275 -14
  158. package/behaviors/registry/ui/core/atoms/std-recurrence.orb +93 -4
  159. package/behaviors/registry/ui/core/atoms/std-role-gate.orb +217 -0
  160. package/behaviors/registry/ui/core/atoms/std-saved-search.orb +473 -19
  161. package/behaviors/registry/ui/core/atoms/std-selection.orb +179 -10
  162. package/behaviors/registry/ui/core/atoms/std-stats.orb +73 -1
  163. package/behaviors/registry/ui/core/atoms/std-tag-taxonomy.orb +3 -0
  164. package/behaviors/registry/ui/core/atoms/std-thread.orb +190 -115
  165. package/behaviors/registry/ui/core/atoms/std-version-history.orb +138 -14
  166. package/behaviors/registry/ui/core/atoms/std-vote.orb +0 -9
  167. package/behaviors/registry/ui/core/atoms/std-wizard.orb +33 -3
  168. package/behaviors/registry/ui/core/atoms/ui-presence.orb +59 -0
  169. package/behaviors/registry/ui/core/atoms/ui-time-slot-cell.orb +132 -0
  170. package/behaviors/registry/ui/core/atoms/ui-typography.orb +7 -0
  171. package/behaviors/registry/ui/core/molecules/ui-alert.orb +7 -0
  172. package/behaviors/registry/ui/core/molecules/ui-animated-counter.orb +1 -1
  173. package/behaviors/registry/ui/core/molecules/ui-breadcrumb.orb +53 -1
  174. package/behaviors/registry/ui/core/molecules/ui-chart.orb +68 -1
  175. package/behaviors/registry/ui/core/molecules/ui-code-block.orb +291 -8
  176. package/behaviors/registry/ui/core/molecules/ui-command-palette.orb +89 -6
  177. package/behaviors/registry/ui/core/molecules/ui-commit-row.orb +3 -2
  178. package/behaviors/registry/ui/core/molecules/ui-confirm-dialog.orb +32 -0
  179. package/behaviors/registry/ui/core/molecules/ui-data-grid.orb +297 -5
  180. package/behaviors/registry/ui/core/molecules/ui-data-list.orb +261 -3
  181. package/behaviors/registry/ui/core/molecules/ui-date-range-picker.orb +1 -3
  182. package/behaviors/registry/ui/core/molecules/ui-document-details.orb +93 -24
  183. package/behaviors/registry/ui/core/molecules/ui-document-panel.orb +121 -3
  184. package/behaviors/registry/ui/core/molecules/ui-document-viewer.orb +53 -1
  185. package/behaviors/registry/ui/core/molecules/ui-drawer.orb +40 -0
  186. package/behaviors/registry/ui/core/molecules/ui-emoji-picker.orb +0 -1
  187. package/behaviors/registry/ui/core/molecules/ui-feature-card.orb +0 -1
  188. package/behaviors/registry/ui/core/molecules/ui-floating-action-button.orb +53 -1
  189. package/behaviors/registry/ui/core/molecules/ui-floating-toolbar.orb +53 -1
  190. package/behaviors/registry/ui/core/molecules/ui-form-actions.orb +53 -1
  191. package/behaviors/registry/ui/core/molecules/ui-gantt.orb +28 -1
  192. package/behaviors/registry/ui/core/molecules/ui-graph-canvas.orb +53 -1
  193. package/behaviors/registry/ui/core/molecules/ui-import-preview-tree.orb +9 -2
  194. package/behaviors/registry/ui/core/molecules/ui-likert-scale.orb +1 -1
  195. package/behaviors/registry/ui/core/molecules/ui-menu.orb +74 -1
  196. package/behaviors/registry/ui/core/molecules/ui-meter.orb +53 -1
  197. package/behaviors/registry/ui/core/molecules/ui-modal.orb +8 -0
  198. package/behaviors/registry/ui/core/molecules/ui-page-header.orb +60 -1
  199. package/behaviors/registry/ui/core/molecules/ui-page-transition.orb +1 -1
  200. package/behaviors/registry/ui/core/molecules/ui-swipeable-row.orb +393 -23
  201. package/behaviors/registry/ui/core/molecules/ui-table-view.orb +337 -5
  202. package/behaviors/registry/ui/core/molecules/ui-tabs.orb +99 -2
  203. package/behaviors/registry/ui/core/organisms/ui-detail-panel.orb +415 -33
  204. package/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +340 -29
  205. package/behaviors/registry/ui/core/organisms/ui-entity-list.orb +296 -20
  206. package/behaviors/registry/ui/core/organisms/ui-entity-table.orb +489 -9
  207. package/behaviors/registry/ui/core/organisms/ui-form-section.orb +132 -13
  208. package/behaviors/registry/ui/core/organisms/ui-form.orb +132 -13
  209. package/behaviors/registry/ui/core/organisms/ui-media-gallery.orb +141 -3
  210. package/behaviors/registry/ui/core/organisms/ui-stat-card.orb +58 -0
  211. package/behaviors/registry/ui/core/organisms/ui-state-machine-view.orb +82 -0
  212. package/behaviors/registry/ui/core/organisms/ui-timeline.orb +159 -8
  213. package/behaviors/registry/ui/core/templates/ui-auth-layout.orb +0 -1
  214. package/behaviors/registry/ui/core/templates/ui-counter-template.orb +1 -173
  215. package/behaviors/registry/ui/core/templates/ui-dashboard-layout.orb +53 -2
  216. package/behaviors/registry/ui/core/templates/ui-generic-app-template.orb +1 -116
  217. package/behaviors/registry/ui/game/atoms/ui-choice-button.orb +1 -1
  218. package/behaviors/registry/ui/game/atoms/ui-dialogue-bubble.orb +1 -2
  219. package/behaviors/registry/ui/game/atoms/ui-game-menu.orb +100 -3
  220. package/behaviors/registry/ui/game/atoms/ui-score-display.orb +0 -1
  221. package/behaviors/registry/ui/game/organisms/std-arcade-board-3d.orb +10 -0
  222. package/behaviors/registry/ui/game/organisms/std-crew-board-2d.orb +0 -7
  223. package/behaviors/registry/ui/game/organisms/std-platformer-puzzle.orb +1 -807
  224. package/behaviors/registry/ui/game/organisms/std-tactics-board-2d.orb +0 -7
  225. package/behaviors/registry/ui/game/organisms/std-worldmap-board-2d.orb +0 -7
  226. package/behaviors/registry/ui/learning/atoms/std-learn-stepper.orb +6 -0
  227. package/canonical-operators.json +18 -1
  228. package/dist/behaviors/exports-reader.js +8942 -3946
  229. package/dist/behaviors/functions/index.d.ts +419 -132
  230. package/dist/behaviors/functions/index.js +8931 -3946
  231. package/dist/behaviors/index.d.ts +1 -1
  232. package/dist/behaviors/index.js +8943 -3947
  233. package/dist/behaviors/query.js +8942 -3946
  234. package/dist/behaviors-embeddings.hash.json +3 -3
  235. package/dist/behaviors-embeddings.json +49 -41
  236. package/dist/behaviors-registry.json +5621 -1993
  237. package/dist/index.d.ts +3 -3
  238. package/dist/index.js +8960 -3947
  239. package/dist/knob-embeddings.hash.json +3 -3
  240. package/dist/knob-embeddings.json +774 -374
  241. package/dist/modules/anim.d.ts +1 -1
  242. package/dist/modules/array.d.ts +1 -1
  243. package/dist/modules/array.js +15 -0
  244. package/dist/modules/async.d.ts +1 -1
  245. package/dist/modules/behavior.d.ts +1 -1
  246. package/dist/modules/browser.d.ts +1 -1
  247. package/dist/modules/composition.d.ts +1 -1
  248. package/dist/modules/contract.d.ts +1 -1
  249. package/dist/modules/core.d.ts +1 -1
  250. package/dist/modules/core.js +2 -0
  251. package/dist/modules/data.d.ts +1 -1
  252. package/dist/modules/ease.d.ts +1 -1
  253. package/dist/modules/format.d.ts +1 -1
  254. package/dist/modules/geo.d.ts +1 -1
  255. package/dist/modules/graph.d.ts +1 -1
  256. package/dist/modules/grid.d.ts +1 -1
  257. package/dist/modules/index.d.ts +1 -1
  258. package/dist/modules/index.js +17 -0
  259. package/dist/modules/integration.d.ts +1 -1
  260. package/dist/modules/json.d.ts +1 -1
  261. package/dist/modules/llm.d.ts +1 -1
  262. package/dist/modules/math.d.ts +1 -1
  263. package/dist/modules/memory.d.ts +1 -1
  264. package/dist/modules/nn.d.ts +1 -1
  265. package/dist/modules/noise.d.ts +1 -1
  266. package/dist/modules/object.d.ts +1 -1
  267. package/dist/modules/os.d.ts +1 -1
  268. package/dist/modules/path.d.ts +1 -1
  269. package/dist/modules/prob.d.ts +1 -1
  270. package/dist/modules/session.d.ts +1 -1
  271. package/dist/modules/str.d.ts +1 -1
  272. package/dist/modules/tensor.d.ts +1 -1
  273. package/dist/modules/time.d.ts +1 -1
  274. package/dist/modules/trace.d.ts +1 -1
  275. package/dist/modules/train.d.ts +1 -1
  276. package/dist/modules/validate.d.ts +1 -1
  277. package/dist/modules/vector.d.ts +1 -1
  278. package/dist/modules/workspace.d.ts +1 -1
  279. package/dist/registry/factory-signatures.json +1 -1
  280. package/dist/registry.d.ts +2 -2
  281. package/dist/registry.js +17 -0
  282. package/dist/{types-Ggla7OK7.d.ts → types-DLx38UFZ.d.ts} +23 -3
  283. package/package.json +3 -3
@@ -10,23 +10,33 @@ orbital EntityCardsOrbital {
10
10
  stack : string
11
11
  }
12
12
  type EntityCardsFieldsItem = {
13
- key : string
14
- header : string
15
- name : string
13
+ name : string!
16
14
  label : string
15
+ icon : icon
16
+ variant : "h3" | "h4" | "body" | "caption" | "badge" | "small" | "progress"
17
+ format : "date" | "currency" | "number" | "boolean" | "percent"
18
+ colorMap : Map string EntityCardsFieldsItemColorMapValue
19
+ labels : Map string string
17
20
  }
21
+ type EntityCardsFieldsItemColorMapValue = "default" | "primary" | "secondary" | "success" | "warning" | "danger" | "error" | "info" | "neutral" | "destructive"
18
22
  type EntityCardsColumnsItem = {
19
- key : string
20
- header : string
21
- name : string
23
+ name : string!
22
24
  label : string
25
+ icon : icon
26
+ variant : "h3" | "h4" | "body" | "caption" | "badge" | "small" | "progress"
27
+ format : "date" | "currency" | "number" | "boolean" | "percent"
28
+ colorMap : Map string EntityCardsColumnsItemColorMapValue
29
+ labels : Map string string
23
30
  }
31
+ type EntityCardsColumnsItemColorMapValue = "default" | "primary" | "secondary" | "success" | "warning" | "danger" | "error" | "info" | "neutral" | "destructive"
24
32
  type EntityCardsItemActionsItem = {
25
33
  label : string!
26
34
  event : event
27
35
  navigatesTo : string
28
36
  placement : string
29
37
  variant : string
38
+ when : SExpr
39
+ roles : [string]
30
40
  }
31
41
 
32
42
  entity EntityCardsItem [runtime] {
@@ -60,7 +70,8 @@ orbital EntityCardsOrbital {
60
70
  fields: @config.fields
61
71
  fieldNames: @config.fieldNames
62
72
  columns: @config.columns
63
- itemActions: @config.itemActions
73
+ itemClickEvent: @config.itemClickEvent
74
+ itemActions: (array/filter @config.itemActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
64
75
  showTotal: @config.showTotal
65
76
  showAvatar: @config.showAvatar
66
77
  variant: @config.variant
@@ -89,7 +100,8 @@ orbital EntityCardsOrbital {
89
100
  fields: @config.fields
90
101
  fieldNames: @config.fieldNames
91
102
  columns: @config.columns
92
- itemActions: @config.itemActions
103
+ itemClickEvent: @config.itemClickEvent
104
+ itemActions: (array/filter @config.itemActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
93
105
  showTotal: @config.showTotal
94
106
  showAvatar: @config.showAvatar
95
107
  variant: @config.variant
@@ -118,7 +130,8 @@ orbital EntityCardsOrbital {
118
130
  fields: @config.fields
119
131
  fieldNames: @config.fieldNames
120
132
  columns: @config.columns
121
- itemActions: @config.itemActions
133
+ itemClickEvent: @config.itemClickEvent
134
+ itemActions: (array/filter @config.itemActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
122
135
  showTotal: @config.showTotal
123
136
  showAvatar: @config.showAvatar
124
137
  variant: @config.variant
@@ -128,6 +141,12 @@ orbital EntityCardsOrbital {
128
141
  }
129
142
 
130
143
  emits {
144
+ @config.itemClickEvent -> external {
145
+ id : string!
146
+ row : @entity!
147
+ }
148
+ @description "When set, clicking a card emits UI:{itemClickEvent} with { id, row }. Omit = cards are not clickable."
149
+ @tier "essential"
131
150
  VIEW -> external {
132
151
  id : string!
133
152
  row : @entity!
@@ -206,7 +225,7 @@ orbital EntityCardsOrbital {
206
225
  @label "Children"
207
226
  @description "Children elements (cards) - optional when using entity prop"
208
227
  @tier "presentation"
209
- fields : [EntityCardsFieldsItem] = [{ key: "Key", header: "Header", name: "Name", label: "Label" }, { key: "Key 2", header: "Header 2", name: "Name 2", label: "Label 2" }]
228
+ fields : [EntityCardsFieldsItem] = [{ name: "Name", label: "Label", icon: "circle", variant: h3, format: date }, { name: "Name 2", label: "Label 2", icon: "circle", variant: h4, format: currency }]
210
229
  @label "Fields"
211
230
  @description "Fields to display - required for schema-driven rendering"
212
231
  @tier "presentation"
@@ -218,6 +237,10 @@ orbital EntityCardsOrbital {
218
237
  @label "Columns"
219
238
  @description "Alias for fields - backwards compatibility"
220
239
  @tier "presentation"
240
+ itemClickEvent : event = "ITEM_CLICK"
241
+ @label "Item Click Event"
242
+ @description "When set, clicking a card emits UI:{itemClickEvent} with { id, row }. Omit = cards are not clickable."
243
+ @tier "presentation"
221
244
  itemActions : [EntityCardsItemActionsItem] = [{ event: VIEW, label: View, variant: ghost }]
222
245
  @label "Item Actions"
223
246
  @description "Actions for each card item (schema-driven)"
@@ -238,6 +261,10 @@ orbital EntityCardsOrbital {
238
261
  @label "Image Field"
239
262
  @description "Entity field name containing an image URL to display as card thumbnail"
240
263
  @tier "presentation"
264
+ viewerRole : string = ""
265
+ @label "Viewer's role"
266
+ @description "The viewer's role that each action's `roles` is checked against; bind it at the call site (e.g. `viewerRole: @user.role`). Empty = only actions with no `roles` show."
267
+ @tier "policy"
241
268
  selfFetch : boolean = true
242
269
  @label "Fetch its own rows on mount?"
243
270
  @description "true (default) = standalone mount self-populates on INIT. false = a composing atom owns the fetch and routes its loaded event here — suppresses the wrapper's own un-hydrated fetch so it cannot race the composer's."
@@ -10,17 +10,24 @@ orbital EntityListOrbital {
10
10
  stack : string
11
11
  }
12
12
  type EntityListFieldsItem = {
13
- key : string
14
- header : string
15
- name : string
13
+ name : string!
16
14
  label : string
15
+ icon : icon
16
+ variant : "h3" | "h4" | "body" | "caption" | "badge" | "small" | "progress"
17
+ format : "date" | "currency" | "number" | "boolean" | "percent"
18
+ colorMap : Map string EntityListFieldsItemColorMapValue
19
+ labels : Map string string
17
20
  }
21
+ type EntityListFieldsItemColorMapValue = "default" | "primary" | "secondary" | "success" | "warning" | "danger" | "error" | "info" | "neutral" | "destructive"
18
22
  type EntityListItemActionsItem = {
19
23
  label : string!
20
24
  event : event
21
25
  navigatesTo : string
22
26
  placement : string
23
27
  variant : "primary" | "secondary" | "ghost" | "danger" | "default"
28
+ icon : icon
29
+ when : SExpr
30
+ roles : [string]
24
31
  }
25
32
 
26
33
  entity EntityListItem [runtime] {
@@ -48,13 +55,16 @@ orbital EntityListOrbital {
48
55
  entity: @entity
49
56
  entityType: @config.entityType
50
57
  selectable: @config.selectable
51
- itemActions: @config.itemActions
58
+ itemActions: (array/filter @config.itemActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
52
59
  showDividers: @config.showDividers
53
60
  variant: @config.variant
54
61
  emptyMessage: @config.emptyMessage
55
62
  children: @config.children
56
63
  fields: @config.fields
57
64
  fieldNames: @config.fieldNames
65
+ itemClickEvent: @config.itemClickEvent
66
+ completedField: @config.completedField
67
+ disabledField: @config.disabledField
58
68
  type: entity-list
59
69
  })
60
70
  INIT -> idle when (not @config.selfFetch)
@@ -73,13 +83,16 @@ orbital EntityListOrbital {
73
83
  entity: @entity
74
84
  entityType: @config.entityType
75
85
  selectable: @config.selectable
76
- itemActions: @config.itemActions
86
+ itemActions: (array/filter @config.itemActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
77
87
  showDividers: @config.showDividers
78
88
  variant: @config.variant
79
89
  emptyMessage: @config.emptyMessage
80
90
  children: @config.children
81
91
  fields: @config.fields
82
92
  fieldNames: @config.fieldNames
93
+ itemClickEvent: @config.itemClickEvent
94
+ completedField: @config.completedField
95
+ disabledField: @config.disabledField
83
96
  type: entity-list
84
97
  })
85
98
  EntityListLoaded -> idle
@@ -98,13 +111,16 @@ orbital EntityListOrbital {
98
111
  entity: @payload.data
99
112
  entityType: @config.entityType
100
113
  selectable: @config.selectable
101
- itemActions: @config.itemActions
114
+ itemActions: (array/filter @config.itemActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
102
115
  showDividers: @config.showDividers
103
116
  variant: @config.variant
104
117
  emptyMessage: @config.emptyMessage
105
118
  children: @config.children
106
119
  fields: @config.fields
107
120
  fieldNames: @config.fieldNames
121
+ itemClickEvent: @config.itemClickEvent
122
+ completedField: @config.completedField
123
+ disabledField: @config.disabledField
108
124
  type: entity-list
109
125
  })
110
126
  }
@@ -113,6 +129,12 @@ orbital EntityListOrbital {
113
129
  ITEM_ACTIONS -> external { }
114
130
  @description "Item actions - schema-driven or function-based"
115
131
  @tier "essential"
132
+ @config.itemClickEvent -> external {
133
+ id : string!
134
+ row : @entity!
135
+ }
136
+ @description "When set, clicking a row emits UI:{itemClickEvent} with { id, row }. Omit = rows are not clickable."
137
+ @tier "essential"
116
138
  VIEW -> external {
117
139
  id : string!
118
140
  row : @entity!
@@ -199,14 +221,30 @@ orbital EntityListOrbital {
199
221
  @label "Children"
200
222
  @description "children prop"
201
223
  @tier "presentation"
202
- fields : [EntityListFieldsItem] = [{ key: "Key", header: "Header", name: "Name", label: "Label" }, { key: "Key 2", header: "Header 2", name: "Name 2", label: "Label 2" }]
224
+ fields : [EntityListFieldsItem] = [{ name: "Name", label: "Label", icon: "circle", variant: h3, format: date }, { name: "Name 2", label: "Label 2", icon: "circle", variant: h4, format: currency }]
203
225
  @label "Fields"
204
- @description "Fields to display - accepts string[] or {key, header}[] for unified interface"
226
+ @description "Fields to display: field names, or declared fields ({ name, label, variant, format, colorMap, labels })"
205
227
  @tier "presentation"
206
228
  fieldNames : [string] = []
207
229
  @label "Field Names"
208
230
  @description "Alias for fields - backwards compatibility"
209
231
  @tier "presentation"
232
+ itemClickEvent : event = "ITEM_CLICK"
233
+ @label "Item Click Event"
234
+ @description "When set, clicking a row emits UI:{itemClickEvent} with { id, row }. Omit = rows are not clickable."
235
+ @tier "presentation"
236
+ completedField : string
237
+ @label "Completed Field"
238
+ @description "Row field that marks an item completed (`true` strikes its title through)"
239
+ @tier "presentation"
240
+ disabledField : string
241
+ @label "Disabled Field"
242
+ @description "Row field that marks an item disabled (`true` dims the row and disables its click)"
243
+ @tier "presentation"
244
+ viewerRole : string = ""
245
+ @label "Viewer's role"
246
+ @description "The viewer's role that each action's `roles` is checked against; bind it at the call site (e.g. `viewerRole: @user.role`). Empty = only actions with no `roles` show."
247
+ @tier "policy"
210
248
  selfFetch : boolean = true
211
249
  @label "Fetch its own rows on mount?"
212
250
  @description "true (default) = standalone mount self-populates on INIT. false = a composing atom owns the fetch and routes its loaded event here — suppresses the wrapper's own un-hydrated fetch so it cannot race the composer's."
@@ -16,6 +16,8 @@ orbital EntityTableOrbital {
16
16
  label : string
17
17
  width : string
18
18
  sortable : boolean
19
+ align : "left" | "center" | "right"
20
+ format : "date" | "currency" | "number" | "boolean" | "percent"
19
21
  }
20
22
  type EntityTableColumnsItem = {
21
23
  key : string
@@ -24,6 +26,8 @@ orbital EntityTableOrbital {
24
26
  label : string
25
27
  width : string
26
28
  sortable : boolean
29
+ align : "left" | "center" | "right"
30
+ format : "date" | "currency" | "number" | "boolean" | "percent"
27
31
  }
28
32
  type EntityTableItemActionsItem = {
29
33
  label : string!
@@ -32,6 +36,8 @@ orbital EntityTableOrbital {
32
36
  placement : string
33
37
  icon : icon
34
38
  variant : string
39
+ when : SExpr
40
+ roles : [string]
35
41
  }
36
42
  type EntityTableEmptyAction = {
37
43
  label : string!
@@ -42,12 +48,15 @@ orbital EntityTableOrbital {
42
48
  icon : icon
43
49
  variant : "default" | "danger"
44
50
  event : event
51
+ when : SExpr
52
+ roles : [string]
45
53
  }
46
54
  type EntityTableBulkActionsItem = {
47
55
  label : string!
48
56
  icon : icon
49
57
  variant : "default" | "danger"
50
58
  event : event
59
+ roles : [string]
51
60
  }
52
61
  type EntityTableRelationsDataValueItem = {
53
62
  value : string!
@@ -81,7 +90,8 @@ orbital EntityTableOrbital {
81
90
  entity: @entity
82
91
  fields: @config.fields
83
92
  columns: @config.columns
84
- itemActions: @config.itemActions
93
+ itemClickEvent: @config.itemClickEvent
94
+ itemActions: (array/filter @config.itemActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
85
95
  emptyIcon: @config.emptyIcon
86
96
  emptyTitle: @config.emptyTitle
87
97
  emptyDescription: @config.emptyDescription
@@ -89,8 +99,8 @@ orbital EntityTableOrbital {
89
99
  selectable: @config.selectable
90
100
  searchable: @config.searchable
91
101
  searchPlaceholder: @config.searchPlaceholder
92
- rowActions: @config.rowActions
93
- bulkActions: @config.bulkActions
102
+ rowActions: (array/filter @config.rowActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
103
+ bulkActions: (array/filter @config.bulkActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
94
104
  headerActions: @config.headerActions
95
105
  showTotal: @config.showTotal
96
106
  look: @config.look
@@ -113,7 +123,8 @@ orbital EntityTableOrbital {
113
123
  entity: @entity
114
124
  fields: @config.fields
115
125
  columns: @config.columns
116
- itemActions: @config.itemActions
126
+ itemClickEvent: @config.itemClickEvent
127
+ itemActions: (array/filter @config.itemActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
117
128
  emptyIcon: @config.emptyIcon
118
129
  emptyTitle: @config.emptyTitle
119
130
  emptyDescription: @config.emptyDescription
@@ -121,8 +132,8 @@ orbital EntityTableOrbital {
121
132
  selectable: @config.selectable
122
133
  searchable: @config.searchable
123
134
  searchPlaceholder: @config.searchPlaceholder
124
- rowActions: @config.rowActions
125
- bulkActions: @config.bulkActions
135
+ rowActions: (array/filter @config.rowActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
136
+ bulkActions: (array/filter @config.bulkActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
126
137
  headerActions: @config.headerActions
127
138
  showTotal: @config.showTotal
128
139
  look: @config.look
@@ -145,7 +156,8 @@ orbital EntityTableOrbital {
145
156
  entity: @payload.data
146
157
  fields: @config.fields
147
158
  columns: @config.columns
148
- itemActions: @config.itemActions
159
+ itemClickEvent: @config.itemClickEvent
160
+ itemActions: (array/filter @config.itemActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
149
161
  emptyIcon: @config.emptyIcon
150
162
  emptyTitle: @config.emptyTitle
151
163
  emptyDescription: @config.emptyDescription
@@ -153,8 +165,8 @@ orbital EntityTableOrbital {
153
165
  selectable: @config.selectable
154
166
  searchable: @config.searchable
155
167
  searchPlaceholder: @config.searchPlaceholder
156
- rowActions: @config.rowActions
157
- bulkActions: @config.bulkActions
168
+ rowActions: (array/filter @config.rowActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
169
+ bulkActions: (array/filter @config.bulkActions (fn action (or (= (array/len (object/get @action roles [])) 0) (array/includes (object/get @action roles []) @config.viewerRole))))
158
170
  headerActions: @config.headerActions
159
171
  showTotal: @config.showTotal
160
172
  look: @config.look
@@ -164,6 +176,12 @@ orbital EntityTableOrbital {
164
176
  }
165
177
 
166
178
  emits {
179
+ @config.itemClickEvent -> external {
180
+ id : string!
181
+ row : @entity!
182
+ }
183
+ @description "When set, rows are activatable and emit UI:{itemClickEvent} with { id, row }"
184
+ @tier "essential"
167
185
  VIEW -> external {
168
186
  id : string!
169
187
  row : @entity!
@@ -222,7 +240,7 @@ orbital EntityTableOrbital {
222
240
  @label "Selected Ids"
223
241
  @description "Currently selected item IDs"
224
242
  @tier "presentation"
225
- fields : [EntityTableFieldsItem] = [{ key: "Key", header: "Header", name: "Name", label: "Label", width: "Width", sortable: false }, { key: "Key 2", header: "Header 2", name: "Name 2", label: "Label 2", width: "Width 2", sortable: true }]
243
+ fields : [EntityTableFieldsItem] = [{ key: "Key", header: "Header", name: "Name", label: "Label", width: "Width", sortable: false, align: left, format: date }, { key: "Key 2", header: "Header 2", name: "Name 2", label: "Label 2", width: "Width 2", sortable: true, align: center, format: currency }]
226
244
  @label "Fields"
227
245
  @description "Fields to display - accepts string[] or Column[] for unified interface. Alias for columns"
228
246
  @tier "presentation"
@@ -230,6 +248,10 @@ orbital EntityTableOrbital {
230
248
  @label "Columns"
231
249
  @description "Columns can be Column objects or simple string field names"
232
250
  @tier "presentation"
251
+ itemClickEvent : event = "ITEM_CLICK"
252
+ @label "Item Click Event"
253
+ @description "When set, rows are activatable and emit UI:{itemClickEvent} with { id, row }"
254
+ @tier "presentation"
233
255
  itemActions : [EntityTableItemActionsItem] = [{ event: VIEW, label: View, variant: ghost }]
234
256
  @label "Item Actions"
235
257
  @description "Item actions from generated code - maps to rowActions"
@@ -286,6 +308,10 @@ orbital EntityTableOrbital {
286
308
  @label "Relations Data"
287
309
  @description "Relation display data: { fieldName: [{value, label}] } — injected server-side by the runtime (relation-option injection) or bound by compiled codegen; resolves stored foreign ids to display names for a column whose field is relation-typed. Same contract DetailPanel takes."
288
310
  @tier "presentation"
311
+ viewerRole : string = ""
312
+ @label "Viewer's role"
313
+ @description "The viewer's role that each action's `roles` is checked against; bind it at the call site (e.g. `viewerRole: @user.role`). Empty = only actions with no `roles` show."
314
+ @tier "policy"
289
315
  selfFetch : boolean = true
290
316
  @label "Fetch its own rows on mount?"
291
317
  @description "true (default) = standalone mount self-populates on INIT. false = a composing atom owns the fetch and routes its loaded event here — suppresses the wrapper's own un-hydrated fetch so it cannot race the composer's."
@@ -2,7 +2,7 @@ app ui-form-section "1.0.0"
2
2
  "FormSection — UI factory (1:1 with the @almadar/ui form-section pattern)."
3
3
  ;; @pattern "form-section"
4
4
  orbital FormSectionOrbital {
5
- type FormSectionLoaded = Event { data : [FormSectionItem] } "FormSection rows finished loading; payload.data holds the collection"
5
+ type FormSectionLoaded = Event { data : FormSectionItem } "FormSection row finished loading; payload.data holds the single row"
6
6
  type FormSectionFieldsItem = {
7
7
  name : string
8
8
  field : string
@@ -14,6 +14,7 @@ orbital FormSectionOrbital {
14
14
  defaultValue : ControlValue
15
15
  options : [FormSectionFieldsItemOptionsItem]
16
16
  values : [string]
17
+ labels : Map string string
17
18
  relation : FormSectionFieldsItemRelation
18
19
  min : number
19
20
  max : number
@@ -100,6 +101,7 @@ orbital FormSectionOrbital {
100
101
  defaultValue : ControlValue
101
102
  options : [FormSectionSectionsItemFieldsItemOptionsItem]
102
103
  values : [string]
104
+ labels : Map string string
103
105
  relation : FormSectionSectionsItemFieldsItemRelation
104
106
  min : number
105
107
  max : number
@@ -138,11 +140,45 @@ orbital FormSectionOrbital {
138
140
  }
139
141
 
140
142
  trait FormSectionRender -> @rebindable FormSectionItem [interaction, instance] {
141
- initial: idle
143
+ initial: resolving
142
144
 
143
- state idle {
144
- INIT -> idle when @config.selfFetch
145
- (fetch FormSectionItem { emit: { success: FormSectionLoaded } })
145
+ state resolving {
146
+ INIT -> idle when (and @config.selfFetch (!= (str/default ?id "") "") (!= @config.mode "create"))
147
+ (fetch FormSectionItem { id: ?id, emit: { success: FormSectionLoaded } })
148
+ (render-ui main {
149
+ children: @config.children
150
+ onSubmit: @config.onSubmit
151
+ onCancel: @config.onCancel
152
+ layout: @config.layout
153
+ gap: @config.gap
154
+ className: @config.className
155
+ entity: @entity
156
+ mode: @config.mode
157
+ fields: @config.fields
158
+ initialData: @entity
159
+ isLoading: @config.isLoading
160
+ error: @config.error
161
+ submitLabel: @config.submitLabel
162
+ cancelLabel: @config.cancelLabel
163
+ showCancel: @config.showCancel
164
+ showSubmit: @config.showSubmit
165
+ title: @config.title
166
+ submitEvent: @config.submitEvent
167
+ cancelEvent: @config.cancelEvent
168
+ relationsData: @config.relationsData
169
+ relationsLoading: @config.relationsLoading
170
+ fieldOverrides: @config.fieldOverrides
171
+ conditionalFields: @config.conditionalFields
172
+ hiddenCalculations: @config.hiddenCalculations
173
+ violationTriggers: @config.violationTriggers
174
+ evaluationContext: @config.evaluationContext
175
+ sections: @config.sections
176
+ onFieldChange: @config.onFieldChange
177
+ configPath: @config.configPath
178
+ repeatable: @config.repeatable
179
+ type: form-section
180
+ })
181
+ INIT -> idle when (not (and @config.selfFetch (!= (str/default ?id "") "") (!= @config.mode "create")))
146
182
  (render-ui main {
147
183
  children: @config.children
148
184
  onSubmit: @config.onSubmit
@@ -176,7 +212,10 @@ orbital FormSectionOrbital {
176
212
  repeatable: @config.repeatable
177
213
  type: form-section
178
214
  })
179
- INIT -> idle when (not @config.selfFetch)
215
+ }
216
+
217
+ state idle {
218
+ INIT -> idle
180
219
  (render-ui main {
181
220
  children: @config.children
182
221
  onSubmit: @config.onSubmit
@@ -218,7 +257,7 @@ orbital FormSectionOrbital {
218
257
  layout: @config.layout
219
258
  gap: @config.gap
220
259
  className: @config.className
221
- entity: @payload.data
260
+ entity: @entity
222
261
  mode: @config.mode
223
262
  fields: @config.fields
224
263
  initialData: @payload.data
@@ -261,11 +300,19 @@ orbital FormSectionOrbital {
261
300
  @description "Callback when any field value changes"
262
301
  @tier "essential"
263
302
  FormSectionLoaded
264
- @description "FormSection rows finished loading; payload.data holds the collection."
303
+ @description "FormSection row finished loading; payload.data holds the single row."
265
304
  @synonyms "loaded, fetched, retrieved"
266
305
  @tier "essential"
267
306
  }
268
307
 
308
+ listens {
309
+ INIT {
310
+ id : string
311
+ }
312
+ @description "Mount payload; a host that routes to this panel by id (a :id page param) passes it here."
313
+ @tier "internal"
314
+ }
315
+
269
316
  config {
270
317
  children : node
271
318
  @label "Children"
@@ -380,8 +427,8 @@ orbital FormSectionOrbital {
380
427
  @description "Whether the form supports repeatable entries"
381
428
  @tier "presentation"
382
429
  selfFetch : boolean = true
383
- @label "Fetch its own rows on mount?"
384
- @description "true (default) = standalone mount self-populates on INIT. false = a composing atom owns the fetch and routes its loaded event here — suppresses the wrapper's own un-hydrated fetch so it cannot race the composer's."
430
+ @label "Fetch its own row on mount?"
431
+ @description "true (default) = a mount that carries an id loads that one row (never the collection); a create-mode mount skips the load. false = a composing atom owns the load."
385
432
  @tier "internal"
386
433
  }
387
434
  }
@@ -2,7 +2,7 @@ app ui-form "1.0.0"
2
2
  "Form — UI factory (1:1 with the @almadar/ui form pattern)."
3
3
  ;; @pattern "form"
4
4
  orbital FormOrbital {
5
- type FormLoaded = Event { data : [FormItem] } "Form rows finished loading; payload.data holds the collection"
5
+ type FormLoaded = Event { data : FormItem } "Form row finished loading; payload.data holds the single row"
6
6
  type FormFieldsItem = {
7
7
  name : string
8
8
  field : string
@@ -14,6 +14,7 @@ orbital FormOrbital {
14
14
  defaultValue : ControlValue
15
15
  options : [FormFieldsItemOptionsItem]
16
16
  values : [string]
17
+ labels : Map string string
17
18
  relation : FormFieldsItemRelation
18
19
  min : number
19
20
  max : number
@@ -100,6 +101,7 @@ orbital FormOrbital {
100
101
  defaultValue : ControlValue
101
102
  options : [FormSectionsItemFieldsItemOptionsItem]
102
103
  values : [string]
104
+ labels : Map string string
103
105
  relation : FormSectionsItemFieldsItemRelation
104
106
  min : number
105
107
  max : number
@@ -138,11 +140,45 @@ orbital FormOrbital {
138
140
  }
139
141
 
140
142
  trait FormRender -> @rebindable FormItem [interaction, instance] {
141
- initial: idle
143
+ initial: resolving
142
144
 
143
- state idle {
144
- INIT -> idle when @config.selfFetch
145
- (fetch FormItem { emit: { success: FormLoaded } })
145
+ state resolving {
146
+ INIT -> idle when (and @config.selfFetch (!= (str/default ?id "") "") (!= @config.mode "create"))
147
+ (fetch FormItem { id: ?id, emit: { success: FormLoaded } })
148
+ (render-ui main {
149
+ children: @config.children
150
+ onSubmit: @config.onSubmit
151
+ onCancel: @config.onCancel
152
+ layout: @config.layout
153
+ gap: @config.gap
154
+ className: @config.className
155
+ entity: @entity
156
+ mode: @config.mode
157
+ fields: @config.fields
158
+ initialData: @entity
159
+ isLoading: @config.isLoading
160
+ error: @config.error
161
+ submitLabel: @config.submitLabel
162
+ cancelLabel: @config.cancelLabel
163
+ showCancel: @config.showCancel
164
+ showSubmit: @config.showSubmit
165
+ title: @config.title
166
+ submitEvent: @config.submitEvent
167
+ cancelEvent: @config.cancelEvent
168
+ relationsData: @config.relationsData
169
+ relationsLoading: @config.relationsLoading
170
+ fieldOverrides: @config.fieldOverrides
171
+ conditionalFields: @config.conditionalFields
172
+ hiddenCalculations: @config.hiddenCalculations
173
+ violationTriggers: @config.violationTriggers
174
+ evaluationContext: @config.evaluationContext
175
+ sections: @config.sections
176
+ onFieldChange: @config.onFieldChange
177
+ configPath: @config.configPath
178
+ repeatable: @config.repeatable
179
+ type: form
180
+ })
181
+ INIT -> idle when (not (and @config.selfFetch (!= (str/default ?id "") "") (!= @config.mode "create")))
146
182
  (render-ui main {
147
183
  children: @config.children
148
184
  onSubmit: @config.onSubmit
@@ -176,7 +212,10 @@ orbital FormOrbital {
176
212
  repeatable: @config.repeatable
177
213
  type: form
178
214
  })
179
- INIT -> idle when (not @config.selfFetch)
215
+ }
216
+
217
+ state idle {
218
+ INIT -> idle
180
219
  (render-ui main {
181
220
  children: @config.children
182
221
  onSubmit: @config.onSubmit
@@ -218,7 +257,7 @@ orbital FormOrbital {
218
257
  layout: @config.layout
219
258
  gap: @config.gap
220
259
  className: @config.className
221
- entity: @payload.data
260
+ entity: @entity
222
261
  mode: @config.mode
223
262
  fields: @config.fields
224
263
  initialData: @payload.data
@@ -261,11 +300,19 @@ orbital FormOrbital {
261
300
  @description "Callback when any field value changes"
262
301
  @tier "essential"
263
302
  FormLoaded
264
- @description "Form rows finished loading; payload.data holds the collection."
303
+ @description "Form row finished loading; payload.data holds the single row."
265
304
  @synonyms "loaded, fetched, retrieved"
266
305
  @tier "essential"
267
306
  }
268
307
 
308
+ listens {
309
+ INIT {
310
+ id : string
311
+ }
312
+ @description "Mount payload; a host that routes to this panel by id (a :id page param) passes it here."
313
+ @tier "internal"
314
+ }
315
+
269
316
  config {
270
317
  children : node
271
318
  @label "Children"
@@ -380,8 +427,8 @@ orbital FormOrbital {
380
427
  @description "Whether the form supports repeatable entries"
381
428
  @tier "presentation"
382
429
  selfFetch : boolean = true
383
- @label "Fetch its own rows on mount?"
384
- @description "true (default) = standalone mount self-populates on INIT. false = a composing atom owns the fetch and routes its loaded event here — suppresses the wrapper's own un-hydrated fetch so it cannot race the composer's."
430
+ @label "Fetch its own row on mount?"
431
+ @description "true (default) = a mount that carries an id loads that one row (never the collection); a create-mode mount skips the load. false = a composing atom owns the load."
385
432
  @tier "internal"
386
433
  }
387
434
  }