@almadar/std 16.179.0 → 16.180.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.
@@ -0,0 +1,82 @@
1
+ app std-detail-layout "1.0.0"
2
+ "std-detail-layout — detail-page chrome band (back button + navigation-stack breadcrumb trail) above a single contentTrait slot. Use as the contentTrait of a detail page's AppShell binding: the band renders `← Back | Contracts › Contract details` from the orbital-scoped client navigation stack (session history, seeded from declared page-path ancestry on cold loads — the trail is never empty), and the consumer's detail trait renders below it. Back pops the stack; crumb clicks navigate to their level; a list router's `(navigate path payload { crumb: ?row.title })` labels the detail crumb with the real record title. Bind once per detail page — `XDetailLayout = DetailShell.traits.DetailLayout` with `contentTrait: @trait.XDetail`."
3
+ ;; @capabilities "detail page shell, breadcrumb trail, back navigation, record detail chrome, navigation stack, drill-down hierarchy"
4
+ orbital DetailLayoutOrbital {
5
+ entity DetailLayoutData [runtime] {
6
+ id : string!
7
+ }
8
+
9
+ trait DetailLayout -> @rebindable DetailLayoutData [interaction, instance] {
10
+ initial: composing
11
+
12
+ state composing {
13
+ INIT -> composing
14
+ (render-ui main {
15
+ type: stack
16
+ direction: vertical
17
+ gap: lg
18
+ className: "w-full"
19
+ children: [{
20
+ type: stack
21
+ direction: horizontal
22
+ align: center
23
+ gap: sm
24
+ className: "w-full border-b border-border pb-3"
25
+ children: [{
26
+ type: button
27
+ variant: ghost
28
+ size: sm
29
+ icon: arrow-left
30
+ label: @config.backLabel
31
+ action: BACK
32
+ }, {
33
+ type: breadcrumb
34
+ fromNavStack: true
35
+ itemEvent: CRUMB_NAV
36
+ }]
37
+ },
38
+ @config.contentTrait]
39
+ })
40
+ BACK -> composing
41
+ (navigate-back)
42
+ CRUMB_NAV -> composing
43
+ (navigate ?href)
44
+ }
45
+
46
+ emits {
47
+ BACK
48
+ @description "The shell's back affordance was pressed; the layout pops the navigation stack."
49
+ @synonyms "go back, return, previous page, up one level"
50
+ @tier "internal"
51
+ CRUMB_NAV
52
+ @description "A breadcrumb level was clicked; the layout navigates to that level's href."
53
+ @synonyms "breadcrumb click, jump to level, trail navigation"
54
+ @tier "internal"
55
+ }
56
+
57
+ listens {
58
+ CRUMB_NAV {
59
+ label : string
60
+ href : string!
61
+ index : number
62
+ }
63
+ @description "Breadcrumb level picked from the navigation-stack trail."
64
+ @synonyms "breadcrumb click, trail navigation"
65
+ @tier "internal"
66
+ }
67
+
68
+ config {
69
+ contentTrait : trait
70
+ @label "Content trait"
71
+ @description "The detail trait rendered below the navigation band (the DetailPanel + sections view)."
72
+ @tier "presentation"
73
+ backLabel : string = Back
74
+ @label "Back button label"
75
+ @description "Label on the band's back button, e.g. \"Back to contracts\"."
76
+ @synonyms "back text, return label"
77
+ @tier "presentation"
78
+ }
79
+ }
80
+
81
+ page "/detail-layout" as DetailLayoutPage -> DetailLayout
82
+ }
@@ -21,6 +21,8 @@ orbital BreadcrumbOrbital {
21
21
  INIT -> idle
22
22
  (render-ui main {
23
23
  items: @config.items
24
+ fromNavStack: @config.fromNavStack
25
+ itemEvent: @config.itemEvent
24
26
  separator: @config.separator
25
27
  maxItems: @config.maxItems
26
28
  className: @config.className
@@ -28,10 +30,26 @@ orbital BreadcrumbOrbital {
28
30
  })
29
31
  }
30
32
 
33
+ emits {
34
+ @config.itemEvent -> external {
35
+ id : string
36
+ }
37
+ @description "Event emitted when a non-current crumb is clicked, with payload `{ label, href, index }` — the trait handles it with `(navigate ?href)`. Without it, stack crumbs navigate directly."
38
+ @tier "essential"
39
+ }
40
+
31
41
  config {
32
- items : [BreadcrumbItemsItem] = [{ label: "Label", href: "Href", path: "Path", icon: "circle", isCurrent: false }, { label: "Label 2", href: "Href 2", path: "Path 2", icon: "circle", isCurrent: true }]
42
+ items : [BreadcrumbItemsItem] = []
33
43
  @label "Items"
34
- @description "Breadcrumb items"
44
+ @description "Breadcrumb items. Omit together with `fromNavStack` to render the orbital-scoped navigation stack instead of an authored trail."
45
+ @tier "presentation"
46
+ fromNavStack : boolean = false
47
+ @label "From Nav Stack"
48
+ @description "Render the current orbital's navigation stack (NavStackProvider) as the trail: one crumb per visited/declared level, last entry current. The stack is client-session state both execution paths maintain; outside a provider this renders nothing."
49
+ @tier "presentation"
50
+ itemEvent : string = "ITEM"
51
+ @label "Item Event"
52
+ @description "Event emitted when a non-current crumb is clicked, with payload `{ label, href, index }` — the trait handles it with `(navigate ?href)`. Without it, stack crumbs navigate directly."
35
53
  @tier "presentation"
36
54
  separator : icon
37
55
  @label "Separator"
@@ -79,6 +79,7 @@ orbital DetailPanelOrbital {
79
79
  avatar: @config.avatar
80
80
  sections: @config.sections
81
81
  actions: @config.actions
82
+ maxInlineActions: @config.maxInlineActions
82
83
  backAction: @config.backAction
83
84
  footer: @config.footer
84
85
  slideOver: @config.slideOver
@@ -113,6 +114,7 @@ orbital DetailPanelOrbital {
113
114
  avatar: @config.avatar
114
115
  sections: @config.sections
115
116
  actions: @config.actions
117
+ maxInlineActions: @config.maxInlineActions
116
118
  backAction: @config.backAction
117
119
  footer: @config.footer
118
120
  slideOver: @config.slideOver
@@ -206,6 +208,10 @@ orbital DetailPanelOrbital {
206
208
  @label "Actions"
207
209
  @description "Unified actions array - first action with variant='primary' is the main action"
208
210
  @tier "presentation"
211
+ maxInlineActions : number
212
+ @label "Max Inline Actions"
213
+ @description "Max inline action buttons before the rest collapse into a '⋯' overflow menu (mirrors DataGrid's maxInlineActions). Omit = all inline."
214
+ @tier "presentation"
209
215
  backAction : DetailPanelBackAction
210
216
  @label "Back Action"
211
217
  @description "Navigation-back affordance. Renders top-LEFT before the title (OS/back convention — Almadar_UX §8.4), spatially separated from the right-aligned action buttons + close X. Never inferred from actions[] labels."
@@ -0,0 +1,265 @@
1
+ {
2
+ "description": "std-detail-layout — detail-page chrome band (back button + navigation-stack breadcrumb trail) above a single contentTrait slot. Use as the contentTrait of a detail page's AppShell binding: the band renders `← Back | Contracts › Contract details` from the orbital-scoped client navigation stack (session history, seeded from declared page-path ancestry on cold loads — the trail is never empty), and the consumer's detail trait renders below it. Back pops the stack; crumb clicks navigate to their level; a list router's `(navigate path payload { crumb: ?row.title })` labels the detail crumb with the real record title. Bind once per detail page — `XDetailLayout = DetailShell.traits.DetailLayout` with `contentTrait: @trait.XDetail`.",
3
+ "ledger": {
4
+ "entries": {
5
+ "ent_01M0J07QZHFKDT9JQZ42HBVNQQ": {
6
+ "bakedName": "DetailLayoutData",
7
+ "curName": "DetailLayoutData",
8
+ "id": "ent_01M0J07QZHFKDT9JQZ42HBVNQQ",
9
+ "kind": "entity",
10
+ "owner": "workspace",
11
+ "renames": []
12
+ },
13
+ "evt_01M0J07QZHF7RM3JBVCVWSV7B4": {
14
+ "bakedName": "INIT",
15
+ "curName": "INIT",
16
+ "id": "evt_01M0J07QZHF7RM3JBVCVWSV7B4",
17
+ "kind": "event",
18
+ "owner": "workspace",
19
+ "parent": "trt_01M0J07QZH6N0G9CKFXKBJ3AC6",
20
+ "renames": []
21
+ },
22
+ "evt_01M0J07QZKCG5P5AGK0VHN2N9G": {
23
+ "bakedName": "BACK",
24
+ "curName": "BACK",
25
+ "id": "evt_01M0J07QZKCG5P5AGK0VHN2N9G",
26
+ "kind": "event",
27
+ "owner": "workspace",
28
+ "parent": "trt_01M0J07QZH6N0G9CKFXKBJ3AC6",
29
+ "renames": []
30
+ },
31
+ "evt_01M0J07QZKF2YJ9MMQ69KZ3CVB": {
32
+ "bakedName": "CRUMB_NAV",
33
+ "curName": "CRUMB_NAV",
34
+ "id": "evt_01M0J07QZKF2YJ9MMQ69KZ3CVB",
35
+ "kind": "event",
36
+ "owner": "workspace",
37
+ "parent": "trt_01M0J07QZH6N0G9CKFXKBJ3AC6",
38
+ "renames": []
39
+ },
40
+ "orb_01M0J07QZHNJF5BJSSEKF13PVV": {
41
+ "bakedName": "DetailLayoutOrbital",
42
+ "curName": "DetailLayoutOrbital",
43
+ "id": "orb_01M0J07QZHNJF5BJSSEKF13PVV",
44
+ "kind": "orbital",
45
+ "owner": "workspace",
46
+ "renames": []
47
+ },
48
+ "pag_01M0J07QZKPKTYGMZR1DDDDFC1": {
49
+ "bakedName": "DetailLayoutPage",
50
+ "curName": "DetailLayoutPage",
51
+ "id": "pag_01M0J07QZKPKTYGMZR1DDDDFC1",
52
+ "kind": "page",
53
+ "owner": "workspace",
54
+ "renames": []
55
+ },
56
+ "trt_01M0J07QZH6N0G9CKFXKBJ3AC6": {
57
+ "bakedName": "DetailLayout",
58
+ "curName": "DetailLayout",
59
+ "id": "trt_01M0J07QZH6N0G9CKFXKBJ3AC6",
60
+ "kind": "trait",
61
+ "owner": "workspace",
62
+ "renames": []
63
+ }
64
+ },
65
+ "schemaVersion": 1
66
+ },
67
+ "name": "std-detail-layout",
68
+ "orbitals": [
69
+ {
70
+ "entity": {
71
+ "fields": [
72
+ {
73
+ "name": "id",
74
+ "required": true,
75
+ "type": "string"
76
+ }
77
+ ],
78
+ "id": "ent_01M0J07QZHFKDT9JQZ42HBVNQQ",
79
+ "name": "DetailLayoutData",
80
+ "persistence": "runtime"
81
+ },
82
+ "id": "orb_01M0J07QZHNJF5BJSSEKF13PVV",
83
+ "name": "DetailLayoutOrbital",
84
+ "pages": [
85
+ {
86
+ "id": "pag_01M0J07QZKPKTYGMZR1DDDDFC1",
87
+ "name": "DetailLayoutPage",
88
+ "path": "/detail-layout",
89
+ "traits": [
90
+ {
91
+ "ref": "DetailLayout",
92
+ "refId": "trt_01M0J07QZH6N0G9CKFXKBJ3AC6"
93
+ }
94
+ ]
95
+ }
96
+ ],
97
+ "traits": [
98
+ {
99
+ "category": "interaction",
100
+ "config": {
101
+ "backLabel": {
102
+ "default": "Back",
103
+ "description": "Label on the band's back button, e.g. \"Back to contracts\".",
104
+ "label": "Back button label",
105
+ "synonyms": "back text, return label",
106
+ "tier": "presentation",
107
+ "type": "string"
108
+ },
109
+ "contentTrait": {
110
+ "description": "The detail trait rendered below the navigation band (the DetailPanel + sections view).",
111
+ "label": "Content trait",
112
+ "tier": "presentation",
113
+ "type": "trait"
114
+ }
115
+ },
116
+ "emits": [
117
+ {
118
+ "description": "The shell's back affordance was pressed; the layout pops the navigation stack.",
119
+ "event": "BACK",
120
+ "eventId": "evt_01M0J07QZKCG5P5AGK0VHN2N9G",
121
+ "synonyms": "go back, return, previous page, up one level",
122
+ "tier": "internal"
123
+ },
124
+ {
125
+ "description": "A breadcrumb level was clicked; the layout navigates to that level's href.",
126
+ "event": "CRUMB_NAV",
127
+ "eventId": "evt_01M0J07QZKF2YJ9MMQ69KZ3CVB",
128
+ "synonyms": "breadcrumb click, jump to level, trail navigation",
129
+ "tier": "internal"
130
+ }
131
+ ],
132
+ "entityContract": {
133
+ "provides": [],
134
+ "requires": []
135
+ },
136
+ "entityRebindable": true,
137
+ "entityRefIds": {
138
+ "DetailLayoutData": "ent_01M0J07QZHFKDT9JQZ42HBVNQQ"
139
+ },
140
+ "id": "trt_01M0J07QZH6N0G9CKFXKBJ3AC6",
141
+ "linkedEntity": "DetailLayoutData",
142
+ "linkedEntityId": "ent_01M0J07QZHFKDT9JQZ42HBVNQQ",
143
+ "name": "DetailLayout",
144
+ "scope": "instance",
145
+ "stateMachine": {
146
+ "events": [
147
+ {
148
+ "id": "evt_01M0J07QZHF7RM3JBVCVWSV7B4",
149
+ "key": "INIT",
150
+ "name": "Initialize"
151
+ },
152
+ {
153
+ "description": "The shell's back affordance was pressed; the layout pops the navigation stack.",
154
+ "id": "evt_01M0J07QZKCG5P5AGK0VHN2N9G",
155
+ "key": "BACK",
156
+ "name": "Back",
157
+ "synonyms": "go back, return, previous page, up one level",
158
+ "tier": "internal"
159
+ },
160
+ {
161
+ "description": "A breadcrumb level was clicked; the layout navigates to that level's href.",
162
+ "id": "evt_01M0J07QZKF2YJ9MMQ69KZ3CVB",
163
+ "key": "CRUMB_NAV",
164
+ "name": "Crumb Nav",
165
+ "payloadSchema": [
166
+ {
167
+ "name": "label",
168
+ "type": "string"
169
+ },
170
+ {
171
+ "name": "href",
172
+ "required": true,
173
+ "type": "string"
174
+ },
175
+ {
176
+ "name": "index",
177
+ "type": "number"
178
+ }
179
+ ],
180
+ "synonyms": "breadcrumb click, jump to level, trail navigation",
181
+ "tier": "internal"
182
+ }
183
+ ],
184
+ "states": [
185
+ {
186
+ "isInitial": true,
187
+ "name": "composing"
188
+ }
189
+ ],
190
+ "transitions": [
191
+ {
192
+ "effects": [
193
+ [
194
+ "render-ui",
195
+ "main",
196
+ {
197
+ "children": [
198
+ {
199
+ "align": "center",
200
+ "children": [
201
+ {
202
+ "action": "BACK",
203
+ "icon": "arrow-left",
204
+ "label": "@config.backLabel",
205
+ "size": "sm",
206
+ "type": "button",
207
+ "variant": "ghost"
208
+ },
209
+ {
210
+ "fromNavStack": true,
211
+ "itemEvent": "CRUMB_NAV",
212
+ "type": "breadcrumb"
213
+ }
214
+ ],
215
+ "className": "w-full border-b border-border pb-3",
216
+ "direction": "horizontal",
217
+ "gap": "sm",
218
+ "type": "stack"
219
+ },
220
+ "@config.contentTrait"
221
+ ],
222
+ "className": "w-full",
223
+ "direction": "vertical",
224
+ "gap": "lg",
225
+ "type": "stack"
226
+ }
227
+ ]
228
+ ],
229
+ "event": "INIT",
230
+ "eventId": "evt_01M0J07QZHF7RM3JBVCVWSV7B4",
231
+ "from": "composing",
232
+ "to": "composing"
233
+ },
234
+ {
235
+ "effects": [
236
+ [
237
+ "navigate-back"
238
+ ]
239
+ ],
240
+ "event": "BACK",
241
+ "eventId": "evt_01M0J07QZKCG5P5AGK0VHN2N9G",
242
+ "from": "composing",
243
+ "to": "composing"
244
+ },
245
+ {
246
+ "effects": [
247
+ [
248
+ "navigate",
249
+ "@payload.href"
250
+ ]
251
+ ],
252
+ "event": "CRUMB_NAV",
253
+ "eventId": "evt_01M0J07QZKF2YJ9MMQ69KZ3CVB",
254
+ "from": "composing",
255
+ "to": "composing"
256
+ }
257
+ ]
258
+ }
259
+ }
260
+ ]
261
+ }
262
+ ],
263
+ "schemaVersion": 1,
264
+ "version": "1.0.0"
265
+ }
@@ -19,6 +19,15 @@
19
19
  "parent": "trt_01KXG04MX6C96QT73HKMXSSXW9",
20
20
  "renames": []
21
21
  },
22
+ "evt_01M0HZ7JXZT1B3WE2JVP75FDGK": {
23
+ "bakedName": "@config.itemEvent",
24
+ "curName": "@config.itemEvent",
25
+ "id": "evt_01M0HZ7JXZT1B3WE2JVP75FDGK",
26
+ "kind": "event",
27
+ "owner": "workspace",
28
+ "parent": "trt_01KXG04MX6C96QT73HKMXSSXW9",
29
+ "renames": []
30
+ },
22
31
  "orb_01KXG04MX6C39A82D7NECQJ0X8": {
23
32
  "bakedName": "BreadcrumbOrbital",
24
33
  "curName": "BreadcrumbOrbital",
@@ -86,24 +95,23 @@
86
95
  "tier": "presentation",
87
96
  "type": "string"
88
97
  },
98
+ "fromNavStack": {
99
+ "default": false,
100
+ "description": "Render the current orbital's navigation stack (NavStackProvider) as the trail: one crumb per visited/declared level, last entry current. The stack is client-session state both execution paths maintain; outside a provider this renders nothing.",
101
+ "label": "From Nav Stack",
102
+ "tier": "presentation",
103
+ "type": "boolean"
104
+ },
105
+ "itemEvent": {
106
+ "default": "ITEM",
107
+ "description": "Event emitted when a non-current crumb is clicked, with payload `{ label, href, index }` — the trait handles it with `(navigate ?href)`. Without it, stack crumbs navigate directly.",
108
+ "label": "Item Event",
109
+ "tier": "presentation",
110
+ "type": "string"
111
+ },
89
112
  "items": {
90
- "default": [
91
- {
92
- "href": "Href",
93
- "icon": "circle",
94
- "isCurrent": false,
95
- "label": "Label",
96
- "path": "Path"
97
- },
98
- {
99
- "href": "Href 2",
100
- "icon": "circle",
101
- "isCurrent": true,
102
- "label": "Label 2",
103
- "path": "Path 2"
104
- }
105
- ],
106
- "description": "Breadcrumb items",
113
+ "default": [],
114
+ "description": "Breadcrumb items. Omit together with `fromNavStack` to render the orbital-scoped navigation stack instead of an authored trail.",
107
115
  "items": {
108
116
  "properties": {
109
117
  "event": {
@@ -156,6 +164,21 @@
156
164
  "type": "icon"
157
165
  }
158
166
  },
167
+ "emits": [
168
+ {
169
+ "description": "Event emitted when a non-current crumb is clicked, with payload `{ label, href, index }` — the trait handles it with `(navigate ?href)`. Without it, stack crumbs navigate directly.",
170
+ "event": "@config.itemEvent",
171
+ "eventId": "evt_01M0HZ7JXZT1B3WE2JVP75FDGK",
172
+ "payloadSchema": [
173
+ {
174
+ "name": "id",
175
+ "type": "string"
176
+ }
177
+ ],
178
+ "scope": "external",
179
+ "tier": "essential"
180
+ }
181
+ ],
159
182
  "entityContract": {
160
183
  "provides": [],
161
184
  "requires": []
@@ -175,6 +198,19 @@
175
198
  "id": "evt_01KXG04MX61JX4AMH0MQK0YQ6W",
176
199
  "key": "INIT",
177
200
  "name": "Initialize"
201
+ },
202
+ {
203
+ "description": "Event emitted when a non-current crumb is clicked, with payload `{ label, href, index }` — the trait handles it with `(navigate ?href)`. Without it, stack crumbs navigate directly.",
204
+ "id": "evt_01M0HZ7JXZT1B3WE2JVP75FDGK",
205
+ "key": "@config.itemEvent",
206
+ "name": "@config.item event",
207
+ "payloadSchema": [
208
+ {
209
+ "name": "id",
210
+ "type": "string"
211
+ }
212
+ ],
213
+ "tier": "essential"
178
214
  }
179
215
  ],
180
216
  "states": [
@@ -191,6 +227,8 @@
191
227
  "main",
192
228
  {
193
229
  "className": "@config.className",
230
+ "fromNavStack": "@config.fromNavStack",
231
+ "itemEvent": "@config.itemEvent",
194
232
  "items": "@config.items",
195
233
  "maxItems": "@config.maxItems",
196
234
  "separator": "@config.separator",
@@ -315,6 +315,12 @@
315
315
  "tier": "presentation",
316
316
  "type": "boolean"
317
317
  },
318
+ "maxInlineActions": {
319
+ "description": "Max inline action buttons before the rest collapse into a '⋯' overflow menu (mirrors DataGrid's maxInlineActions). Omit = all inline.",
320
+ "label": "Max Inline Actions",
321
+ "tier": "presentation",
322
+ "type": "number"
323
+ },
318
324
  "mode": {
319
325
  "description": "Display mode (passed by compiler)",
320
326
  "label": "Mode",
@@ -609,6 +615,7 @@
609
615
  "footer": "@config.footer",
610
616
  "initialData": "@entity",
611
617
  "isLoading": "@config.isLoading",
618
+ "maxInlineActions": "@config.maxInlineActions",
612
619
  "mode": "@config.mode",
613
620
  "page": "@config.pageProp",
614
621
  "pageSize": "@config.pageSize",
@@ -654,6 +661,7 @@
654
661
  "footer": "@config.footer",
655
662
  "initialData": "@payload.data",
656
663
  "isLoading": "@config.isLoading",
664
+ "maxInlineActions": "@config.maxInlineActions",
657
665
  "mode": "@config.mode",
658
666
  "page": "@config.pageProp",
659
667
  "pageSize": "@config.pageSize",
@@ -1929,15 +1929,27 @@
1929
1929
  "navigate": {
1930
1930
  "category": "effect",
1931
1931
  "minArity": 1,
1932
- "maxArity": 2,
1932
+ "maxArity": 3,
1933
1933
  "returnType": "void",
1934
- "description": "Navigate to a route",
1934
+ "description": "Navigate to a route: (navigate path payload? options?) — options carries { crumb } labelling the navigation-stack entry for the target page",
1935
1935
  "module": "core",
1936
1936
  "hasSideEffects": true,
1937
1937
  "effect": {
1938
1938
  "kind": "navigate"
1939
1939
  }
1940
1940
  },
1941
+ "navigate-back": {
1942
+ "category": "effect",
1943
+ "minArity": 0,
1944
+ "maxArity": 0,
1945
+ "returnType": "void",
1946
+ "description": "Pop the orbital-scoped navigation stack and return to the previous entry",
1947
+ "module": "core",
1948
+ "hasSideEffects": true,
1949
+ "effect": {
1950
+ "kind": "navigate-back"
1951
+ }
1952
+ },
1941
1953
  "nn/batchnorm": {
1942
1954
  "category": "ml-arch",
1943
1955
  "minArity": 1,