@almadar/std 13.12.0 → 13.13.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-display",
3
3
  "version": "1.1.0",
4
- "description": "std-display — DEPRECATED. The earlier shape inlined a hard-coded\nchart + graph-view + several stat cards into a single render-ui spec\nwith @entity.X bindings that no transition explicitly set, which\nviolates the explicit-binding rule (gap #25 in\ndocs/Almadar_Std_Verification.md). The chart payload was hand-\nauthored literal data, not aggregated from a real entity stream.\n\nUse these instead:\n std-stats embeddable stat-card aggregations (count / sum / avg\n / min / max / distinct), ITEMS_LOADED listener.\n std-graphs embeddable charts (bar / line / pie / area / donut),\n config-driven categoryField + aggregation, same\n ITEMS_LOADED listener shape.\n\nCompose them in a molecule alongside std-browse the same way\nstd-filtered-list composes std-search / std-filter / std-browse /\nstd-pagination. See std-dashboard.lolo for the canonical pattern.\n\nThis file is preserved (and still embedded) so existing projects\nthat import `std/behaviors/std-display` keep loading; new dashboards\nshould target std-stats + std-graphs.",
4
+ "description": "std-display — DEPRECATED. Use std-stats (stat-cards) + std-graphs (charts) composed in a molecule (see std-dashboard); the original violated the explicit-binding rule. Preserved so existing imports keep loading.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "DisplayItemOrbital",
@@ -44,10 +44,10 @@
44
44
  "render-ui",
45
45
  "main",
46
46
  {
47
+ "title": "std-display is deprecated",
47
48
  "message": "@config.message",
48
- "variant": "warning",
49
49
  "type": "alert",
50
- "title": "std-display is deprecated"
50
+ "variant": "warning"
51
51
  }
52
52
  ]
53
53
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-filter",
3
3
  "version": "1.0.0",
4
- "description": "std-filter as a Function — single primitive: filter-group. The atom's\nown FilterTarget entity is the UI-state container — every FILTER\ntransition persists field/value into the entity. Visual reflection of\nthe persisted value (filter-group `value` prop) is a follow-up that\nneeds the pattern registry + UI component to accept a `value` prop;\nthe persistence side is done.",
4
+ "description": "std-filter — single primitive: filter-group. Owns a FilterTarget runtime entity; every FILTER transition persists field/value so cross-trait listeners can route the latest selection into data atoms.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "FilterTargetOrbital",
@@ -94,9 +94,9 @@
94
94
  "render-ui",
95
95
  "main",
96
96
  {
97
- "filters": "@config.filters",
98
97
  "entity": "FilterTarget",
99
- "type": "filter-group"
98
+ "type": "filter-group",
99
+ "filters": "@config.filters"
100
100
  }
101
101
  ]
102
102
  ]
@@ -121,8 +121,8 @@
121
121
  "main",
122
122
  {
123
123
  "type": "filter-group",
124
- "entity": "FilterTarget",
125
- "filters": "@config.filters"
124
+ "filters": "@config.filters",
125
+ "entity": "FilterTarget"
126
126
  }
127
127
  ]
128
128
  ]
@@ -146,17 +146,17 @@
146
146
  "emit",
147
147
  "FILTER",
148
148
  {
149
- "field": "",
150
- "value": ""
149
+ "value": "",
150
+ "field": ""
151
151
  }
152
152
  ],
153
153
  [
154
154
  "render-ui",
155
155
  "main",
156
156
  {
157
+ "type": "filter-group",
157
158
  "entity": "FilterTarget",
158
- "filters": "@config.filters",
159
- "type": "filter-group"
159
+ "filters": "@config.filters"
160
160
  }
161
161
  ]
162
162
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-graphs",
3
3
  "version": "1.0.0",
4
- "description": "std-graphs — embeddable chart atom. Drops into a dashboard molecule\nalongside std-stats / std-browse; wire its ITEMS_LOADED listener to\nthe upstream collection's success emit, then configure `chartType` +\n`categoryField` + (`valueField` | `aggregation`) per call-site to\ndeclare WHAT to chart.\n\nAggregation runs in the lolo state machine: ITEMS_LOADED groups\n@payload.data by @config.categoryField (array/groupBy returns\n{<category>: [<rows>]}) then array/maps over (object/entries result)\nto apply the configured aggregation (count | sum | avg | min | max)\nper bucket. The resulting chart-data array of {label, value} drops\ninto the existing chart pattern with no aggregator component required.\n\nThe `ChartPoint` type alias narrows the entity field to the exact\nshape the `chart` pattern's `data` prop expects (`{label, value}`),\nso no `Record<string, unknown>` cast lands at the call site —\nschema authors keep strict typing end-to-end.",
4
+ "description": "std-graphs — embeddable chart atom. ITEMS_LOADED groups @payload.data by @config.categoryField and applies the configured aggregation (count|sum|avg|min|max) per bucket, emitting {label,value} points into the chart pattern. Drop into a dashboard alongside std-stats / std-browse.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "GraphItemOrbital",
@@ -21,13 +21,13 @@
21
21
  "items": {
22
22
  "type": "object",
23
23
  "properties": {
24
- "value": {
25
- "name": "value",
26
- "type": "number"
27
- },
28
24
  "label": {
29
25
  "name": "label",
30
26
  "type": "string"
27
+ },
28
+ "value": {
29
+ "name": "value",
30
+ "type": "number"
31
31
  }
32
32
  }
33
33
  }
@@ -81,14 +81,14 @@
81
81
  "render-ui",
82
82
  "main",
83
83
  {
84
- "data": "@entity.chartData",
85
- "chartType": "@config.chartType",
86
84
  "subtitle": "@config.subtitle",
87
- "type": "chart",
88
- "showValues": "@config.showValues",
85
+ "chartType": "@config.chartType",
86
+ "showLegend": "@config.showLegend",
89
87
  "title": "@config.title",
90
- "height": "@config.height",
91
- "showLegend": "@config.showLegend"
88
+ "data": "@entity.chartData",
89
+ "showValues": "@config.showValues",
90
+ "type": "chart",
91
+ "height": "@config.height"
92
92
  }
93
93
  ]
94
94
  ]
@@ -207,11 +207,11 @@
207
207
  "chartType": "@config.chartType",
208
208
  "data": "@entity.chartData",
209
209
  "height": "@config.height",
210
+ "showValues": "@config.showValues",
210
211
  "type": "chart",
212
+ "showLegend": "@config.showLegend",
211
213
  "title": "@config.title",
212
- "subtitle": "@config.subtitle",
213
- "showValues": "@config.showValues",
214
- "showLegend": "@config.showLegend"
214
+ "subtitle": "@config.subtitle"
215
215
  }
216
216
  ]
217
217
  ]
@@ -219,13 +219,28 @@
219
219
  ]
220
220
  },
221
221
  "config": {
222
- "categoryField": {
222
+ "chartType": {
223
+ "type": "string",
224
+ "default": "bar",
225
+ "values": [
226
+ "bar",
227
+ "line",
228
+ "pie",
229
+ "area",
230
+ "donut"
231
+ ]
232
+ },
233
+ "showLegend": {
234
+ "type": "boolean",
235
+ "default": true
236
+ },
237
+ "subtitle": {
223
238
  "type": "string",
224
239
  "default": ""
225
240
  },
226
- "height": {
227
- "type": "number",
228
- "default": 280.0
241
+ "valueField": {
242
+ "type": "string",
243
+ "default": ""
229
244
  },
230
245
  "showValues": {
231
246
  "type": "boolean",
@@ -242,32 +257,17 @@
242
257
  "max"
243
258
  ]
244
259
  },
245
- "title": {
260
+ "categoryField": {
246
261
  "type": "string",
247
262
  "default": ""
248
263
  },
249
- "subtitle": {
250
- "type": "string",
251
- "default": ""
264
+ "height": {
265
+ "type": "number",
266
+ "default": 280.0
252
267
  },
253
- "valueField": {
268
+ "title": {
254
269
  "type": "string",
255
270
  "default": ""
256
- },
257
- "chartType": {
258
- "type": "string",
259
- "default": "bar",
260
- "values": [
261
- "bar",
262
- "line",
263
- "pie",
264
- "area",
265
- "donut"
266
- ]
267
- },
268
- "showLegend": {
269
- "type": "boolean",
270
- "default": true
271
271
  }
272
272
  },
273
273
  "scope": "instance"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-pagination",
3
3
  "version": "1.0.0",
4
- "description": "std-pagination as a Function — single primitive: pagination control.\nThe Pagination UI component emits `{page}` for page changes; the atom's\nPAGE event payload matches that shape. ITEMS_LOADED accepts an upstream\ndata-loaded event payload `{data : [object]}` and derives totalPages =\nceil(len(data) / pageSize). Molecules wire e.g.\n`FilteredItemBrowse.BrowseItemLoaded -> ITEMS_LOADED` to keep the\npagination control in lockstep with the data hub. The PagedItem entity\npersists currentPage and the derived totalPages so reads from\n@entity.totalPages reflect the latest row count.",
4
+ "description": "std-pagination — single primitive: pagination control. PAGE accepts the Pagination component's `{page}` emit; ITEMS_LOADED accepts an upstream `{data:[object]}` payload and derives totalPages = ceil(len/pageSize). Molecules wire `BrowseItemLoaded -> ITEMS_LOADED` to keep it in lockstep with the data hub.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "PagedItemOrbital",
@@ -130,10 +130,10 @@
130
130
  "main",
131
131
  {
132
132
  "type": "pagination",
133
- "totalPages": "@entity.totalPages",
134
133
  "pageChangeEvent": "@config.event",
135
- "showPageSize": false,
136
- "currentPage": "@entity.currentPage"
134
+ "currentPage": "@entity.currentPage",
135
+ "totalPages": "@entity.totalPages",
136
+ "showPageSize": false
137
137
  }
138
138
  ]
139
139
  ]
@@ -148,10 +148,10 @@
148
148
  "main",
149
149
  {
150
150
  "type": "pagination",
151
- "pageChangeEvent": "@config.event",
152
- "showPageSize": false,
153
151
  "totalPages": "@entity.totalPages",
154
- "currentPage": "@entity.currentPage"
152
+ "pageChangeEvent": "@config.event",
153
+ "currentPage": "@entity.currentPage",
154
+ "showPageSize": false
155
155
  }
156
156
  ]
157
157
  ]
@@ -170,11 +170,11 @@
170
170
  "render-ui",
171
171
  "main",
172
172
  {
173
+ "currentPage": "@entity.currentPage",
174
+ "showPageSize": false,
173
175
  "totalPages": "@entity.totalPages",
174
176
  "type": "pagination",
175
- "pageChangeEvent": "@config.event",
176
- "currentPage": "@entity.currentPage",
177
- "showPageSize": false
177
+ "pageChangeEvent": "@config.event"
178
178
  }
179
179
  ]
180
180
  ]
@@ -200,11 +200,11 @@
200
200
  "render-ui",
201
201
  "main",
202
202
  {
203
- "pageChangeEvent": "@config.event",
204
- "showPageSize": false,
203
+ "type": "pagination",
205
204
  "currentPage": "@entity.currentPage",
205
+ "pageChangeEvent": "@config.event",
206
206
  "totalPages": "@entity.totalPages",
207
- "type": "pagination"
207
+ "showPageSize": false
208
208
  }
209
209
  ]
210
210
  ]
@@ -212,13 +212,13 @@
212
212
  ]
213
213
  },
214
214
  "config": {
215
- "event": {
216
- "type": "string",
217
- "default": "PAGE"
218
- },
219
215
  "pageSize": {
220
216
  "type": "number",
221
217
  "default": 10.0
218
+ },
219
+ "event": {
220
+ "type": "string",
221
+ "default": "PAGE"
222
222
  }
223
223
  },
224
224
  "scope": "instance"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-search",
3
3
  "version": "1.0.0",
4
- "description": "std-search as a Function — single primitive: search-input. The atom's\nown SearchResult entity is the UI-state container — SEARCH persists\n@payload.searchTerm (matching the SearchInput component's emit shape)\ninto @entity.searchTerm. Cross-trait listeners route the same payload\nfield to data atoms (Browse REFETCH_QUERY).",
4
+ "description": "std-search — single primitive: search-input. Owns a SearchResult runtime entity; SEARCH persists @payload.searchTerm (matching SearchInput's emit shape) so cross-trait listeners can route it into data atoms (Browse REFETCH_QUERY).",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "SearchResultOrbital",
@@ -71,9 +71,9 @@
71
71
  "render-ui",
72
72
  "main",
73
73
  {
74
- "event": "@config.event",
75
74
  "placeholder": "@config.placeholder",
76
- "type": "search-input"
75
+ "type": "search-input",
76
+ "event": "@config.event"
77
77
  }
78
78
  ]
79
79
  ]
@@ -93,8 +93,8 @@
93
93
  "main",
94
94
  {
95
95
  "placeholder": "@config.placeholder",
96
- "type": "search-input",
97
- "event": "@config.event"
96
+ "event": "@config.event",
97
+ "type": "search-input"
98
98
  }
99
99
  ]
100
100
  ]
@@ -102,13 +102,13 @@
102
102
  ]
103
103
  },
104
104
  "config": {
105
- "placeholder": {
106
- "type": "string",
107
- "default": "Search…"
108
- },
109
105
  "event": {
110
106
  "type": "string",
111
107
  "default": "SEARCH"
108
+ },
109
+ "placeholder": {
110
+ "type": "string",
111
+ "default": "Search…"
112
112
  }
113
113
  },
114
114
  "scope": "instance"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-stats",
3
3
  "version": "2.0.0",
4
- "description": "std-stats — embeddable analytics-card atom. Drop into a dashboard\nmolecule alongside std-browse / std-search / std-filter; wire its\nITEMS_LOADED listener to the upstream collection's success emit, then\nconfigure `metrics` per call-site to declare WHICH aggregations to\nshow.\n\nAggregation runs in the lolo state machine (no custom React component\nbeyond stat-display): the ITEMS_LOADED transition uses array/map over\n@config.metrics, applies the per-metric `filter` predicate to\n@payload.data, then dispatches the chosen aggregation kind. Cards\ndrop into a data-list whose renderItem maps each card to a\nstat-display pattern. The atom owns an auxiliary entity (StatsItem)\nfor UI state — explicit-binding rule applies: every @entity.X is set\nexplicitly via (set @entity.X ...) on each transition.\n\nEach entry in `metrics` (all but `label` optional):\n- label string! card title\n- aggregation count|sum|avg|min|max default count what to compute\n- field string numeric entity field for sum/avg/min/max\n- filter SExpression row predicate (e.g. fn-form testing @row.status). Drops non-matching\n rows BEFORE aggregation. Omitted = all rows. Compiler statically\n unrolls array/map over @config.metrics so the fn-form is fully\n specialized into pure TS at codegen time.\n- format number|currency|percent default number value formatting\n- variant default|primary|success|warning|error|info color\n- icon string lucide icon name\n- prefix string prepended to displayed value (e.g. \"≈ \")\n- suffix string appended (e.g. \" /mo\", \" ms\")\n- max number optional denominator. >0 renders \"value / max\".\n- target number optional progress target. >0 renders a progress bar.\n- trend number signed delta vs previous period. >0 ↑ green, <0 ↓ red.\n\nFor dynamic max/target/trend (computed against @payload.data),\nschema authors today must precompute and pass literal numbers; an\nSExpression-evaluating slot is a future extension.",
4
+ "description": "std-stats — embeddable analytics-card atom. ITEMS_LOADED aggregates @payload.data per @config.metrics (count|sum|avg|min|max with optional filter, format, icon, max, target, trend) and renders one stat-display per entry. Drop into a dashboard alongside std-browse / std-search / std-filter.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "StatsItemOrbital",
@@ -21,35 +21,6 @@
21
21
  "items": {
22
22
  "type": "object",
23
23
  "properties": {
24
- "format": {
25
- "name": "format",
26
- "type": "string",
27
- "values": [
28
- "number",
29
- "currency",
30
- "percent"
31
- ]
32
- },
33
- "value": {
34
- "name": "value",
35
- "type": "number"
36
- },
37
- "suffix": {
38
- "name": "suffix",
39
- "type": "string"
40
- },
41
- "prefix": {
42
- "name": "prefix",
43
- "type": "string"
44
- },
45
- "trend": {
46
- "name": "trend",
47
- "type": "number"
48
- },
49
- "max": {
50
- "name": "max",
51
- "type": "number"
52
- },
53
24
  "label": {
54
25
  "name": "label",
55
26
  "type": "string"
@@ -70,9 +41,38 @@
70
41
  "info"
71
42
  ]
72
43
  },
44
+ "trend": {
45
+ "name": "trend",
46
+ "type": "number"
47
+ },
48
+ "suffix": {
49
+ "name": "suffix",
50
+ "type": "string"
51
+ },
52
+ "max": {
53
+ "name": "max",
54
+ "type": "number"
55
+ },
73
56
  "target": {
74
57
  "name": "target",
75
58
  "type": "number"
59
+ },
60
+ "value": {
61
+ "name": "value",
62
+ "type": "number"
63
+ },
64
+ "format": {
65
+ "name": "format",
66
+ "type": "string",
67
+ "values": [
68
+ "number",
69
+ "currency",
70
+ "percent"
71
+ ]
72
+ },
73
+ "prefix": {
74
+ "name": "prefix",
75
+ "type": "string"
76
76
  }
77
77
  }
78
78
  }
@@ -126,22 +126,22 @@
126
126
  "render-ui",
127
127
  "main",
128
128
  {
129
- "entity": "@entity.cards",
130
- "type": "data-grid",
131
- "fields": [],
132
129
  "renderItem": [
133
130
  "fn",
134
131
  "card",
135
132
  {
136
- "label": "@card.label",
137
- "format": "@card.format",
138
- "variant": "@card.variant",
139
- "max": "@card.max",
140
133
  "type": "stat-display",
141
134
  "value": "@card.value",
142
- "icon": "@card.icon"
135
+ "label": "@card.label",
136
+ "max": "@card.max",
137
+ "icon": "@card.icon",
138
+ "variant": "@card.variant",
139
+ "format": "@card.format"
143
140
  }
144
- ]
141
+ ],
142
+ "entity": "@entity.cards",
143
+ "fields": [],
144
+ "type": "data-grid"
145
145
  }
146
146
  ]
147
147
  ]
@@ -161,23 +161,10 @@
161
161
  "fn",
162
162
  "metric",
163
163
  {
164
- "format": [
165
- "object/get",
166
- "@metric",
167
- "format",
168
- "number"
169
- ],
170
- "variant": [
171
- "object/get",
172
- "@metric",
173
- "variant",
174
- "default"
175
- ],
176
- "target": [
164
+ "label": [
177
165
  "object/get",
178
166
  "@metric",
179
- "target",
180
- 0.0
167
+ "label"
181
168
  ],
182
169
  "max": [
183
170
  "object/get",
@@ -191,17 +178,17 @@
191
178
  "trend",
192
179
  0.0
193
180
  ],
194
- "icon": [
181
+ "prefix": [
195
182
  "object/get",
196
183
  "@metric",
197
- "icon",
184
+ "prefix",
198
185
  ""
199
186
  ],
200
- "prefix": [
187
+ "format": [
201
188
  "object/get",
202
189
  "@metric",
203
- "prefix",
204
- ""
190
+ "format",
191
+ "number"
205
192
  ],
206
193
  "suffix": [
207
194
  "object/get",
@@ -209,10 +196,23 @@
209
196
  "suffix",
210
197
  ""
211
198
  ],
212
- "label": [
199
+ "variant": [
213
200
  "object/get",
214
201
  "@metric",
215
- "label"
202
+ "variant",
203
+ "default"
204
+ ],
205
+ "icon": [
206
+ "object/get",
207
+ "@metric",
208
+ "icon",
209
+ ""
210
+ ],
211
+ "target": [
212
+ "object/get",
213
+ "@metric",
214
+ "target",
215
+ 0.0
216
216
  ],
217
217
  "value": [
218
218
  "if",
@@ -363,26 +363,26 @@
363
363
  "render-ui",
364
364
  "main",
365
365
  {
366
+ "fields": [],
367
+ "type": "data-list",
368
+ "entity": "@entity.cards",
366
369
  "renderItem": [
367
370
  "fn",
368
371
  "card",
369
372
  {
370
- "max": "@card.max",
371
- "label": "@card.label",
372
- "prefix": "@card.prefix",
373
+ "suffix": "@card.suffix",
373
374
  "type": "stat-display",
374
375
  "target": "@card.target",
376
+ "trend": "@card.trend",
377
+ "variant": "@card.variant",
375
378
  "icon": "@card.icon",
376
379
  "format": "@card.format",
380
+ "max": "@card.max",
381
+ "label": "@card.label",
377
382
  "value": "@card.value",
378
- "trend": "@card.trend",
379
- "variant": "@card.variant",
380
- "suffix": "@card.suffix"
383
+ "prefix": "@card.prefix"
381
384
  }
382
- ],
383
- "entity": "@entity.cards",
384
- "fields": [],
385
- "type": "data-list"
385
+ ]
386
386
  }
387
387
  ]
388
388
  ]
@@ -390,13 +390,13 @@
390
390
  ]
391
391
  },
392
392
  "config": {
393
- "title": {
394
- "type": "string",
395
- "default": ""
396
- },
397
393
  "metrics": {
398
394
  "type": "[object]",
399
395
  "default": []
396
+ },
397
+ "title": {
398
+ "type": "string",
399
+ "default": ""
400
400
  }
401
401
  },
402
402
  "scope": "instance"