@almadar/std 16.183.0 → 16.184.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 (44) hide show
  1. package/behaviors/lolo/ui/core/.hand-authored.json +4 -0
  2. package/behaviors/lolo/ui/core/atoms/std-browse.lolo +11 -0
  3. package/behaviors/lolo/ui/core/atoms/std-related.lolo +86 -9
  4. package/behaviors/lolo/ui/core/atoms/std-rich-editor.lolo +115 -1
  5. package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +62 -2
  6. package/behaviors/lolo/ui/core/atoms/std-thread.lolo +43 -2
  7. package/behaviors/lolo/ui/core/atoms/std-tree.lolo +247 -0
  8. package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +110 -2
  9. package/behaviors/lolo/ui/core/molecules/ui-file-tree.lolo +18 -2
  10. package/behaviors/lolo/ui/core/organisms/ui-detail-panel.lolo +6 -2
  11. package/behaviors/lolo/ui/core/organisms/ui-form-section.lolo +2 -2
  12. package/behaviors/lolo/ui/core/organisms/ui-form.lolo +2 -2
  13. package/behaviors/lolo/ui/game/atoms/std-tutorial-autodemo.lolo +136 -0
  14. package/behaviors/lolo/ui/game/atoms/std-tutorial-overlay.lolo +41 -8
  15. package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +3 -3
  16. package/behaviors/registry/ui/core/atoms/std-browse.orb +17 -0
  17. package/behaviors/registry/ui/core/atoms/std-related.orb +256 -3
  18. package/behaviors/registry/ui/core/atoms/std-rich-editor.orb +407 -1
  19. package/behaviors/registry/ui/core/atoms/std-tag-taxonomy.orb +240 -8
  20. package/behaviors/registry/ui/core/atoms/std-thread.orb +254 -4
  21. package/behaviors/registry/ui/core/atoms/std-tree.orb +656 -0
  22. package/behaviors/registry/ui/core/atoms/std-version-history.orb +479 -6
  23. package/behaviors/registry/ui/core/molecules/ui-file-tree.orb +43 -19
  24. package/behaviors/registry/ui/core/organisms/ui-detail-panel.orb +28 -3
  25. package/behaviors/registry/ui/core/organisms/ui-form-section.orb +8 -2
  26. package/behaviors/registry/ui/core/organisms/ui-form.orb +8 -2
  27. package/behaviors/registry/ui/game/atoms/std-tutorial-autodemo.orb +732 -0
  28. package/behaviors/registry/ui/game/atoms/std-tutorial-overlay.orb +305 -153
  29. package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +26 -0
  30. package/dist/behaviors/exports-reader.js +4320 -2060
  31. package/dist/behaviors/functions/index.d.ts +259 -44
  32. package/dist/behaviors/functions/index.js +4306 -2058
  33. package/dist/behaviors/index.d.ts +1 -1
  34. package/dist/behaviors/index.js +4321 -2061
  35. package/dist/behaviors/query.js +4320 -2060
  36. package/dist/behaviors-embeddings.hash.json +3 -3
  37. package/dist/behaviors-embeddings.json +274 -266
  38. package/dist/behaviors-registry.json +820 -33
  39. package/dist/index.d.ts +1 -1
  40. package/dist/index.js +4321 -2061
  41. package/dist/knob-embeddings.hash.json +3 -3
  42. package/dist/knob-embeddings.json +1 -1
  43. package/dist/registry/factory-signatures.json +1 -1
  44. package/package.json +2 -2
@@ -1,12 +1,11 @@
1
1
  app std-tutorial-overlay "1.0.0"
2
- "Tutorial modal with media steps for game boards and learning shells: a paged overlay — title, an animated GIF/clip showing exactly how the mechanic is done, one line of body copy, a step counter, and Back / Next / Skip — composed entirely from registered render types (stack + text + image + button) into the overlay slot, so no new UI component is needed. autoShow opens it on INIT for first-time players; a board's help button re-opens it any time via SHOW (which rewinds to step one). DISMISS (or finishing the last step) marks the run done, clears the overlay, and emits TUTORIAL_DONE so the board can unpause or log. Steps are pure config — a board teaches a new mechanic by adding one { id, title, body, media } row."
2
+ "Tutorial modal with live-demo steps for game boards and learning shells: a paged overlay — title, a live previewTrait frame playing the mechanic via std-tutorial-autodemo (a bare game canvas, no shell chrome), one line of body copy, a step counter, and Back / Next / Skip — composed entirely from registered render types (stack + text + button + trait frame) into the overlay slot, so no new UI component is needed. autoShow opens it on INIT for first-time players; a board's help button re-opens it any time via SHOW (which rewinds to step one). DISMISS (or finishing the last step) marks the run done, clears the overlay, and emits TUTORIAL_DONE so the board can unpause or log. Steps are pure config — a board teaches a new mechanic by adding one { id, title, body, demoId } row plus a previewTrait binding."
3
3
  orbital TutorialOverlayOrbital {
4
4
  type TutorialStep = {
5
5
  id : string!
6
6
  title : string!
7
7
  body : string
8
- media : string
9
- mediaAlt : string
8
+ demoId : string
10
9
  }
11
10
 
12
11
  entity TutorialState [runtime, shared] {
@@ -15,6 +14,15 @@ orbital TutorialOverlayOrbital {
15
14
  done : boolean = false
16
15
  }
17
16
 
17
+ trait TutorialEmptyPreview -> TutorialState [interaction, instance] {
18
+ initial: idle
19
+
20
+ state idle {
21
+ INIT -> idle
22
+ (render-ui overlay null)
23
+ }
24
+ }
25
+
18
26
  trait TutorialOverlay -> @rebindable TutorialState [interaction, instance] {
19
27
  initial: hidden
20
28
 
@@ -32,7 +40,7 @@ orbital TutorialOverlayOrbital {
32
40
  className: "bg-card text-card-foreground border border-border rounded-lg shadow-lg p-6 max-w-md mx-auto mt-16"
33
41
  children: [
34
42
  { type: typography, content: (object/get (array/nth @config.steps 0) title), variant: "h4", weight: "bold" }
35
- { type: atlas-image, asset: { url: (object/get (array/nth @config.steps 0) media), name: (object/get (array/nth @config.steps 0) id), category: "tutorial" }, fit: "contain", alt: (object/get (array/nth @config.steps 0) mediaAlt), className: "rounded-md" }
43
+ @config.previewTrait
36
44
  { type: typography, content: (object/get (array/nth @config.steps 0) body), variant: "body" }
37
45
  { type: typography, content: (str/concat "1 / " (array/len @config.steps)), variant: "caption", align: "center" }
38
46
  { type: stack, direction: horizontal, justify: "center", className: "pt-2", children: [
@@ -41,6 +49,8 @@ orbital TutorialOverlayOrbital {
41
49
  ] }
42
50
  ]
43
51
  })
52
+ (when (!= (object/get (array/nth @config.steps 0) demoId "") "")
53
+ (do (emit TUTORIAL_DEMO_START { demoId: (object/get (array/nth @config.steps 0) demoId "") })))
44
54
 
45
55
  SHOW -> showing
46
56
  (set @entity.step 0)
@@ -50,7 +60,7 @@ orbital TutorialOverlayOrbital {
50
60
  className: "bg-card text-card-foreground border border-border rounded-lg shadow-lg p-6 max-w-md mx-auto mt-16"
51
61
  children: [
52
62
  { type: typography, content: (object/get (array/nth @config.steps 0) title), variant: "h4", weight: "bold" }
53
- { type: atlas-image, asset: { url: (object/get (array/nth @config.steps 0) media), name: (object/get (array/nth @config.steps 0) id), category: "tutorial" }, fit: "contain", alt: (object/get (array/nth @config.steps 0) mediaAlt), className: "rounded-md" }
63
+ @config.previewTrait
54
64
  { type: typography, content: (object/get (array/nth @config.steps 0) body), variant: "body" }
55
65
  { type: typography, content: (str/concat "1 / " (array/len @config.steps)), variant: "caption", align: "center" }
56
66
  { type: stack, direction: horizontal, justify: "center", className: "pt-2", children: [
@@ -59,6 +69,8 @@ orbital TutorialOverlayOrbital {
59
69
  ] }
60
70
  ]
61
71
  })
72
+ (when (!= (object/get (array/nth @config.steps 0) demoId "") "")
73
+ (do (emit TUTORIAL_DEMO_START { demoId: (object/get (array/nth @config.steps 0) demoId "") })))
62
74
  }
63
75
 
64
76
  state showing {
@@ -70,7 +82,7 @@ orbital TutorialOverlayOrbital {
70
82
  className: "bg-card text-card-foreground border border-border rounded-lg shadow-lg p-6 max-w-md mx-auto mt-16"
71
83
  children: [
72
84
  { type: typography, content: (object/get (array/nth @config.steps @entity.step) title), variant: "h4", weight: "bold" }
73
- { type: atlas-image, asset: { url: (object/get (array/nth @config.steps @entity.step) media), name: (object/get (array/nth @config.steps @entity.step) id), category: "tutorial" }, fit: "contain", alt: (object/get (array/nth @config.steps @entity.step) mediaAlt), className: "rounded-md" }
85
+ @config.previewTrait
74
86
  { type: typography, content: (object/get (array/nth @config.steps @entity.step) body), variant: "body" }
75
87
  { type: typography, content: (str/concat (+ @entity.step 1) " / " (array/len @config.steps)), variant: "caption", align: "center" }
76
88
  { type: stack, direction: horizontal, justify: "center", className: "pt-2", children: [
@@ -80,10 +92,14 @@ orbital TutorialOverlayOrbital {
80
92
  ] }
81
93
  ]
82
94
  })
95
+ (emit TUTORIAL_DEMO_STOP {})
96
+ (when (!= (object/get (array/nth @config.steps @entity.step) demoId "") "")
97
+ (do (emit TUTORIAL_DEMO_START { demoId: (object/get (array/nth @config.steps @entity.step) demoId "") })))
83
98
 
84
99
  TUT_NEXT -> hidden when (>= (+ @entity.step 1) (array/len @config.steps))
85
100
  (set @entity.done true)
86
101
  (render-ui overlay null)
102
+ (emit TUTORIAL_DEMO_STOP {})
87
103
  (emit TUTORIAL_DONE { id: "tutorial" })
88
104
 
89
105
  TUT_BACK -> showing when (> @entity.step 0)
@@ -94,7 +110,7 @@ orbital TutorialOverlayOrbital {
94
110
  className: "bg-card text-card-foreground border border-border rounded-lg shadow-lg p-6 max-w-md mx-auto mt-16"
95
111
  children: [
96
112
  { type: typography, content: (object/get (array/nth @config.steps @entity.step) title), variant: "h4", weight: "bold" }
97
- { type: atlas-image, asset: { url: (object/get (array/nth @config.steps @entity.step) media), name: (object/get (array/nth @config.steps @entity.step) id), category: "tutorial" }, fit: "contain", alt: (object/get (array/nth @config.steps @entity.step) mediaAlt), className: "rounded-md" }
113
+ @config.previewTrait
98
114
  { type: typography, content: (object/get (array/nth @config.steps @entity.step) body), variant: "body" }
99
115
  { type: typography, content: (str/concat (+ @entity.step 1) " / " (array/len @config.steps)), variant: "caption", align: "center" }
100
116
  { type: stack, direction: horizontal, justify: "center", className: "pt-2", children: [
@@ -104,10 +120,14 @@ orbital TutorialOverlayOrbital {
104
120
  ] }
105
121
  ]
106
122
  })
123
+ (emit TUTORIAL_DEMO_STOP {})
124
+ (when (!= (object/get (array/nth @config.steps @entity.step) demoId "") "")
125
+ (do (emit TUTORIAL_DEMO_START { demoId: (object/get (array/nth @config.steps @entity.step) demoId "") })))
107
126
 
108
127
  TUT_DISMISS -> hidden
109
128
  (set @entity.done true)
110
129
  (render-ui overlay null)
130
+ (emit TUTORIAL_DEMO_STOP {})
111
131
  (emit TUTORIAL_DONE { id: "tutorial" })
112
132
  }
113
133
 
@@ -142,6 +162,15 @@ orbital TutorialOverlayOrbital {
142
162
  }
143
163
  @description "The tutorial was finished or skipped; boards unpause or log completion."
144
164
  @tier "domain"
165
+ TUTORIAL_DEMO_START -> external {
166
+ demoId : string!
167
+ }
168
+ @description "Emitted when a tutorial step carrying a demoId is shown; the composed std-tutorial-autodemo atom plays that scripted demo."
169
+ @tier "domain"
170
+ TUTORIAL_DEMO_STOP -> external {
171
+ }
172
+ @description "Emitted when the tutorial leaves a demo step (next/back) or is dismissed/finished; the autodemo atom stops and releases control."
173
+ @tier "domain"
145
174
  }
146
175
 
147
176
  listens {
@@ -151,7 +180,11 @@ orbital TutorialOverlayOrbital {
151
180
  config {
152
181
  steps : [TutorialStep] = []
153
182
  @label "Steps"
154
- @description "One row per tutorial page: title, one line of body copy, and media — the URL of an animated GIF/clip showing exactly how the mechanic is performed (recorded from real gameplay)."
183
+ @description "One row per tutorial page: title, one line of body copy, and an optional demoId that plays a scripted live demo (std-tutorial-autodemo) for the mechanic being taught."
184
+ @tier "presentation"
185
+ previewTrait : trait = @trait.TutorialEmptyPreview
186
+ @label "Preview trait"
187
+ @description "Trait rendered in the media position of the modal — the live, demo-driven preview of the mechanic (a bare game canvas, no shell chrome). '@trait.TutorialEmptyPreview' leaves the slot blank. Override with '@trait.<TraitName>' to show a board's live frame."
155
188
  @tier "presentation"
156
189
  autoShow : boolean = true
157
190
  @label "Auto Show"
@@ -307,15 +307,15 @@ orbital MathCanvasOrbital {
307
307
  @tier "presentation"
308
308
  backgroundColor : string
309
309
  @label "Background Color"
310
- @description "Canvas fill color; accepts theme-token refs like var(--color-background, transparent) — resolved against the active theme at draw time. Default transparent."
310
+ @description "Canvas fill color; `var(--token, fallback)` strings resolve against the active theme. Default transparent."
311
311
  @tier "presentation"
312
312
  gridColor : string = "var(--color-border, #9ca3af)"
313
313
  @label "Grid Color"
314
- @description "Grid line color; theme-token aware (defaults to the active theme's border color at 35% opacity, falling back to neutral gray)."
314
+ @description "Grid line color; resolves theme tokens (default `var(--color-border, #9ca3af)`)."
315
315
  @tier "presentation"
316
316
  axisColor : string = "var(--color-muted-foreground, #374151)"
317
317
  @label "Axis Color"
318
- @description "Axis line color; theme-token aware (defaults to the active theme's muted-foreground, falling back to slate)."
318
+ @description "Axis line color; resolves theme tokens (default `var(--color-muted-foreground, #374151)`)."
319
319
  @tier "presentation"
320
320
  showTickLabels : boolean = false
321
321
  @label "Show Tick Labels"
@@ -945,6 +945,17 @@
945
945
  "tier": "internal",
946
946
  "type": "string"
947
947
  },
948
+ "include": {
949
+ "default": [],
950
+ "description": "Entity relation field names to hydrate on fetch (e.g. a `tag : Category` field named `tag`), so grid columns can use dot-paths like tag.name. Empty = no hydration, the default.",
951
+ "items": {
952
+ "type": "string"
953
+ },
954
+ "label": "Which relation fields to hydrate?",
955
+ "synonyms": "relation hydration, populate relations, joined fields, hydrate relations",
956
+ "tier": "internal",
957
+ "type": "[string]"
958
+ },
948
959
  "initialFilterField": {
949
960
  "default": "",
950
961
  "description": "Name the field the INITIAL load filters on, paired with initialFilterValue. This is the detail half of a list-detail pair: a thread that must wait for a conversation to be picked sets the field to its parent key and leaves the value blank, so the first load matches nothing and the empty state shows instead of every record in the table. REFETCH_FILTER then supplies the real selection. Left blank the first load is unfiltered, which is the default.",
@@ -1727,6 +1738,7 @@
1727
1738
  ]
1728
1739
  ]
1729
1740
  ],
1741
+ "include": "@config.include",
1730
1742
  "limit": "@config.pageSize",
1731
1743
  "offset": 0.0
1732
1744
  }
@@ -1888,6 +1900,7 @@
1888
1900
  ]
1889
1901
  ]
1890
1902
  ],
1903
+ "include": "@config.include",
1891
1904
  "limit": "@config.pageSize",
1892
1905
  "offset": 0.0
1893
1906
  }
@@ -1945,6 +1958,7 @@
1945
1958
  ]
1946
1959
  ]
1947
1960
  ],
1961
+ "include": "@config.include",
1948
1962
  "limit": "@config.pageSize",
1949
1963
  "offset": 0.0
1950
1964
  }
@@ -2002,6 +2016,7 @@
2002
2016
  ]
2003
2017
  ]
2004
2018
  ],
2019
+ "include": "@config.include",
2005
2020
  "limit": "@config.pageSize",
2006
2021
  "offset": 0.0
2007
2022
  }
@@ -2039,6 +2054,7 @@
2039
2054
  "@user.id"
2040
2055
  ]
2041
2056
  ],
2057
+ "include": "@config.include",
2042
2058
  "limit": "@config.pageSize",
2043
2059
  "offset": [
2044
2060
  "*",
@@ -2218,6 +2234,7 @@
2218
2234
  ]
2219
2235
  ]
2220
2236
  ],
2237
+ "include": "@config.include",
2221
2238
  "limit": "@config.pageSize",
2222
2239
  "offset": 0.0
2223
2240
  }
@@ -46,6 +46,24 @@
46
46
  "parent": "trt_01KXG04HAWB43BWZ07VSETQEW3",
47
47
  "renames": []
48
48
  },
49
+ "evt_01M0RY3YKG5AXYCBSMYMGG5B4E": {
50
+ "bakedName": "SHOW_RELATED",
51
+ "curName": "SHOW_RELATED",
52
+ "id": "evt_01M0RY3YKG5AXYCBSMYMGG5B4E",
53
+ "kind": "event",
54
+ "owner": "workspace",
55
+ "parent": "trt_01KXG04HAWB43BWZ07VSETQEW3",
56
+ "renames": []
57
+ },
58
+ "evt_01M0RY3YKG814RWTP8NGJZCGG7": {
59
+ "bakedName": "SELECT_RELATED",
60
+ "curName": "SELECT_RELATED",
61
+ "id": "evt_01M0RY3YKG814RWTP8NGJZCGG7",
62
+ "kind": "event",
63
+ "owner": "workspace",
64
+ "parent": "trt_01KXG04HAWB43BWZ07VSETQEW3",
65
+ "renames": []
66
+ },
49
67
  "orb_01KXG04HAW4F728HDBS2FDVGF1": {
50
68
  "bakedName": "RelatedItemOrbital",
51
69
  "curName": "RelatedItemOrbital",
@@ -114,6 +132,13 @@
114
132
  {
115
133
  "category": "interaction",
116
134
  "config": {
135
+ "relationField": {
136
+ "default": "",
137
+ "description": "RelatedItem field compared against SHOW_RELATED's key to scope the fetch to one parent document; empty renders the full unfiltered collection (default).",
138
+ "label": "Relation field",
139
+ "tier": "domain",
140
+ "type": "string"
141
+ },
117
142
  "tableLook": {
118
143
  "default": "dense",
119
144
  "description": "Layer 2 visual treatment for the data table rendered by this atom.",
@@ -127,6 +152,13 @@
127
152
  "borderless",
128
153
  "card-rows"
129
154
  ]
155
+ },
156
+ "title": {
157
+ "default": "Related",
158
+ "description": "Heading shown above the related list.",
159
+ "label": "Section title",
160
+ "tier": "presentation",
161
+ "type": "string"
130
162
  }
131
163
  },
132
164
  "emits": [
@@ -161,6 +193,25 @@
161
193
  "scope": "internal",
162
194
  "synonyms": "error, failure, problem, unsuccessful",
163
195
  "tier": "internal"
196
+ },
197
+ {
198
+ "description": "Signals a related item was selected to drive a detail view.",
199
+ "event": "SELECT_RELATED",
200
+ "eventId": "evt_01M0RY3YKG814RWTP8NGJZCGG7",
201
+ "payloadSchema": [
202
+ {
203
+ "name": "id",
204
+ "required": true,
205
+ "type": "string"
206
+ },
207
+ {
208
+ "name": "name",
209
+ "type": "string"
210
+ }
211
+ ],
212
+ "scope": "external",
213
+ "synonyms": "select, choose, open, view",
214
+ "tier": "domain"
164
215
  }
165
216
  ],
166
217
  "entityContract": {
@@ -183,6 +234,21 @@
183
234
  "key": "INIT",
184
235
  "name": "Initialize"
185
236
  },
237
+ {
238
+ "description": "Scopes the related fetch to rows whose relationField equals key.",
239
+ "id": "evt_01M0RY3YKG5AXYCBSMYMGG5B4E",
240
+ "key": "SHOW_RELATED",
241
+ "name": "Show Related",
242
+ "payloadSchema": [
243
+ {
244
+ "name": "key",
245
+ "required": true,
246
+ "type": "string"
247
+ }
248
+ ],
249
+ "synonyms": "scope, filter, focus, target",
250
+ "tier": "domain"
251
+ },
186
252
  {
187
253
  "description": "Signals that related items have been successfully loaded.",
188
254
  "id": "evt_01KXG04HB00F39QDW8TJMSKNJ9",
@@ -215,6 +281,25 @@
215
281
  "synonyms": "error, failure, problem, unsuccessful",
216
282
  "tier": "internal"
217
283
  },
284
+ {
285
+ "description": "Signals a related item was selected to drive a detail view.",
286
+ "id": "evt_01M0RY3YKG814RWTP8NGJZCGG7",
287
+ "key": "SELECT_RELATED",
288
+ "name": "Select Related",
289
+ "payloadSchema": [
290
+ {
291
+ "name": "id",
292
+ "required": true,
293
+ "type": "string"
294
+ },
295
+ {
296
+ "name": "name",
297
+ "type": "string"
298
+ }
299
+ ],
300
+ "synonyms": "select, choose, open, view",
301
+ "tier": "domain"
302
+ },
218
303
  {
219
304
  "id": "evt_01KYXKHATCCRC9NH1SPH7KH8BC",
220
305
  "key": "RETRY",
@@ -274,6 +359,63 @@
274
359
  "from": "loading",
275
360
  "to": "loading"
276
361
  },
362
+ {
363
+ "effects": [
364
+ [
365
+ "fetch",
366
+ "RelatedItem",
367
+ {
368
+ "emit": {
369
+ "failure": "RelatedItemLoadFailed",
370
+ "success": "RelatedItemLoaded"
371
+ },
372
+ "filter": [
373
+ "or",
374
+ [
375
+ "=",
376
+ "@config.relationField",
377
+ ""
378
+ ],
379
+ [
380
+ "=",
381
+ [
382
+ "object/get",
383
+ "@entity",
384
+ "@config.relationField"
385
+ ],
386
+ "@payload.key"
387
+ ]
388
+ ]
389
+ }
390
+ ],
391
+ [
392
+ "render-ui",
393
+ "main",
394
+ {
395
+ "align": "center",
396
+ "children": [
397
+ {
398
+ "type": "spinner"
399
+ },
400
+ {
401
+ "color": "muted",
402
+ "content": "Loading related…",
403
+ "type": "typography",
404
+ "variant": "caption"
405
+ }
406
+ ],
407
+ "className": "py-8",
408
+ "direction": "vertical",
409
+ "gap": "sm",
410
+ "type": "stack"
411
+ }
412
+ ]
413
+ ],
414
+ "event": "SHOW_RELATED",
415
+ "eventId": "evt_01M0RY3YKG5AXYCBSMYMGG5B4E",
416
+ "from": "loading",
417
+ "to": "loading"
418
+ },
277
419
  {
278
420
  "effects": [
279
421
  [
@@ -289,7 +431,7 @@
289
431
  "type": "icon"
290
432
  },
291
433
  {
292
- "content": "Related",
434
+ "content": "@config.title",
293
435
  "type": "typography",
294
436
  "variant": "h3"
295
437
  }
@@ -309,15 +451,29 @@
309
451
  "fn",
310
452
  "item",
311
453
  {
454
+ "align": "center",
312
455
  "children": [
313
456
  {
314
457
  "content": "@item.name",
315
458
  "type": "typography",
316
459
  "variant": "body"
460
+ },
461
+ {
462
+ "action": "SELECT_RELATED",
463
+ "actionPayload": {
464
+ "id": "@item.id",
465
+ "name": "@item.name"
466
+ },
467
+ "icon": "chevron-right",
468
+ "label": "Open",
469
+ "size": "sm",
470
+ "type": "button",
471
+ "variant": "ghost"
317
472
  }
318
473
  ],
319
- "direction": "vertical",
474
+ "direction": "horizontal",
320
475
  "gap": "xs",
476
+ "justify": "between",
321
477
  "type": "stack"
322
478
  }
323
479
  ],
@@ -404,6 +560,61 @@
404
560
  "from": "loaded",
405
561
  "to": "loading"
406
562
  },
563
+ {
564
+ "effects": [
565
+ [
566
+ "set",
567
+ "@entity.id",
568
+ "@payload.id"
569
+ ]
570
+ ],
571
+ "event": "SELECT_RELATED",
572
+ "eventId": "evt_01M0RY3YKG814RWTP8NGJZCGG7",
573
+ "from": "loaded",
574
+ "to": "loaded"
575
+ },
576
+ {
577
+ "effects": [
578
+ [
579
+ "fetch",
580
+ "RelatedItem",
581
+ {
582
+ "emit": {
583
+ "failure": "RelatedItemLoadFailed",
584
+ "success": "RelatedItemLoaded"
585
+ },
586
+ "filter": [
587
+ "or",
588
+ [
589
+ "=",
590
+ "@config.relationField",
591
+ ""
592
+ ],
593
+ [
594
+ "=",
595
+ [
596
+ "object/get",
597
+ "@entity",
598
+ "@config.relationField"
599
+ ],
600
+ "@payload.key"
601
+ ]
602
+ ]
603
+ }
604
+ ],
605
+ [
606
+ "render-ui",
607
+ "main",
608
+ {
609
+ "type": "spinner"
610
+ }
611
+ ]
612
+ ],
613
+ "event": "SHOW_RELATED",
614
+ "eventId": "evt_01M0RY3YKG5AXYCBSMYMGG5B4E",
615
+ "from": "loaded",
616
+ "to": "loading"
617
+ },
407
618
  {
408
619
  "effects": [
409
620
  [
@@ -453,6 +664,48 @@
453
664
  "eventId": "evt_01KYXKHATCCRC9NH1SPH7KH8BC",
454
665
  "from": "error",
455
666
  "to": "loading"
667
+ },
668
+ {
669
+ "effects": [
670
+ [
671
+ "fetch",
672
+ "RelatedItem",
673
+ {
674
+ "emit": {
675
+ "failure": "RelatedItemLoadFailed",
676
+ "success": "RelatedItemLoaded"
677
+ },
678
+ "filter": [
679
+ "or",
680
+ [
681
+ "=",
682
+ "@config.relationField",
683
+ ""
684
+ ],
685
+ [
686
+ "=",
687
+ [
688
+ "object/get",
689
+ "@entity",
690
+ "@config.relationField"
691
+ ],
692
+ "@payload.key"
693
+ ]
694
+ ]
695
+ }
696
+ ],
697
+ [
698
+ "render-ui",
699
+ "main",
700
+ {
701
+ "type": "spinner"
702
+ }
703
+ ]
704
+ ],
705
+ "event": "SHOW_RELATED",
706
+ "eventId": "evt_01M0RY3YKG5AXYCBSMYMGG5B4E",
707
+ "from": "error",
708
+ "to": "loading"
456
709
  }
457
710
  ]
458
711
  }
@@ -461,5 +714,5 @@
461
714
  }
462
715
  ],
463
716
  "schemaVersion": 1,
464
- "version": "1.0.0"
717
+ "version": "1.1.0"
465
718
  }