@almadar/std 13.4.0 → 13.6.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.
- package/behaviors/registry/app/organisms/std-cms.orb +872 -465
- package/behaviors/registry/core/atoms/std-stats.orb +61 -61
- package/behaviors/registry/core/atoms/std-tabs.orb +94 -278
- package/behaviors/registry/core/molecules/std-dashboard.orb +45 -45
- package/dist/behaviors/registry/app/organisms/std-cms.orb +872 -465
- package/dist/behaviors/registry/core/atoms/std-stats.orb +61 -61
- package/dist/behaviors/registry/core/atoms/std-tabs.orb +94 -278
- package/dist/behaviors/registry/core/molecules/std-dashboard.orb +45 -45
- package/package.json +1 -1
|
@@ -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.
|
|
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.",
|
|
5
5
|
"orbitals": [
|
|
6
6
|
{
|
|
7
7
|
"name": "StatsItemOrbital",
|
|
@@ -21,17 +21,13 @@
|
|
|
21
21
|
"items": {
|
|
22
22
|
"type": "object",
|
|
23
23
|
"properties": {
|
|
24
|
-
"suffix": {
|
|
25
|
-
"name": "suffix",
|
|
26
|
-
"type": "string"
|
|
27
|
-
},
|
|
28
24
|
"value": {
|
|
29
25
|
"name": "value",
|
|
30
26
|
"type": "number"
|
|
31
27
|
},
|
|
32
|
-
"
|
|
33
|
-
"name": "
|
|
34
|
-
"type": "
|
|
28
|
+
"max": {
|
|
29
|
+
"name": "max",
|
|
30
|
+
"type": "number"
|
|
35
31
|
},
|
|
36
32
|
"format": {
|
|
37
33
|
"name": "format",
|
|
@@ -42,14 +38,14 @@
|
|
|
42
38
|
"percent"
|
|
43
39
|
]
|
|
44
40
|
},
|
|
45
|
-
"max": {
|
|
46
|
-
"name": "max",
|
|
47
|
-
"type": "number"
|
|
48
|
-
},
|
|
49
41
|
"target": {
|
|
50
42
|
"name": "target",
|
|
51
43
|
"type": "number"
|
|
52
44
|
},
|
|
45
|
+
"trend": {
|
|
46
|
+
"name": "trend",
|
|
47
|
+
"type": "number"
|
|
48
|
+
},
|
|
53
49
|
"variant": {
|
|
54
50
|
"name": "variant",
|
|
55
51
|
"type": "string",
|
|
@@ -66,13 +62,17 @@
|
|
|
66
62
|
"name": "prefix",
|
|
67
63
|
"type": "string"
|
|
68
64
|
},
|
|
69
|
-
"
|
|
70
|
-
"name": "
|
|
71
|
-
"type": "
|
|
65
|
+
"icon": {
|
|
66
|
+
"name": "icon",
|
|
67
|
+
"type": "string"
|
|
72
68
|
},
|
|
73
69
|
"label": {
|
|
74
70
|
"name": "label",
|
|
75
71
|
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"suffix": {
|
|
74
|
+
"name": "suffix",
|
|
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
|
-
"fields": [],
|
|
131
129
|
"type": "data-list",
|
|
130
|
+
"entity": "@entity.cards",
|
|
132
131
|
"renderItem": [
|
|
133
132
|
"fn",
|
|
134
133
|
"card",
|
|
135
134
|
{
|
|
135
|
+
"variant": "@card.variant",
|
|
136
|
+
"icon": "@card.icon",
|
|
137
|
+
"format": "@card.format",
|
|
136
138
|
"max": "@card.max",
|
|
137
|
-
"value": "@card.value",
|
|
138
139
|
"type": "stat-display",
|
|
139
140
|
"label": "@card.label",
|
|
140
|
-
"
|
|
141
|
-
"format": "@card.format",
|
|
142
|
-
"icon": "@card.icon"
|
|
141
|
+
"value": "@card.value"
|
|
143
142
|
}
|
|
144
|
-
]
|
|
143
|
+
],
|
|
144
|
+
"fields": []
|
|
145
145
|
}
|
|
146
146
|
]
|
|
147
147
|
]
|
|
@@ -161,30 +161,12 @@
|
|
|
161
161
|
"fn",
|
|
162
162
|
"metric",
|
|
163
163
|
{
|
|
164
|
-
"format": [
|
|
165
|
-
"object/get",
|
|
166
|
-
"@metric",
|
|
167
|
-
"format",
|
|
168
|
-
"number"
|
|
169
|
-
],
|
|
170
|
-
"max": [
|
|
171
|
-
"object/get",
|
|
172
|
-
"@metric",
|
|
173
|
-
"max",
|
|
174
|
-
0.0
|
|
175
|
-
],
|
|
176
164
|
"trend": [
|
|
177
165
|
"object/get",
|
|
178
166
|
"@metric",
|
|
179
167
|
"trend",
|
|
180
168
|
0.0
|
|
181
169
|
],
|
|
182
|
-
"suffix": [
|
|
183
|
-
"object/get",
|
|
184
|
-
"@metric",
|
|
185
|
-
"suffix",
|
|
186
|
-
""
|
|
187
|
-
],
|
|
188
170
|
"value": [
|
|
189
171
|
"if",
|
|
190
172
|
[
|
|
@@ -326,16 +308,34 @@
|
|
|
326
308
|
]
|
|
327
309
|
]
|
|
328
310
|
],
|
|
329
|
-
"
|
|
311
|
+
"max": [
|
|
330
312
|
"object/get",
|
|
331
313
|
"@metric",
|
|
332
|
-
"
|
|
314
|
+
"max",
|
|
315
|
+
0.0
|
|
333
316
|
],
|
|
334
|
-
"
|
|
317
|
+
"target": [
|
|
335
318
|
"object/get",
|
|
336
319
|
"@metric",
|
|
337
|
-
"
|
|
338
|
-
|
|
320
|
+
"target",
|
|
321
|
+
0.0
|
|
322
|
+
],
|
|
323
|
+
"suffix": [
|
|
324
|
+
"object/get",
|
|
325
|
+
"@metric",
|
|
326
|
+
"suffix",
|
|
327
|
+
""
|
|
328
|
+
],
|
|
329
|
+
"prefix": [
|
|
330
|
+
"object/get",
|
|
331
|
+
"@metric",
|
|
332
|
+
"prefix",
|
|
333
|
+
""
|
|
334
|
+
],
|
|
335
|
+
"label": [
|
|
336
|
+
"object/get",
|
|
337
|
+
"@metric",
|
|
338
|
+
"label"
|
|
339
339
|
],
|
|
340
340
|
"icon": [
|
|
341
341
|
"object/get",
|
|
@@ -343,17 +343,17 @@
|
|
|
343
343
|
"icon",
|
|
344
344
|
""
|
|
345
345
|
],
|
|
346
|
-
"
|
|
346
|
+
"variant": [
|
|
347
347
|
"object/get",
|
|
348
348
|
"@metric",
|
|
349
|
-
"
|
|
350
|
-
|
|
349
|
+
"variant",
|
|
350
|
+
"default"
|
|
351
351
|
],
|
|
352
|
-
"
|
|
352
|
+
"format": [
|
|
353
353
|
"object/get",
|
|
354
354
|
"@metric",
|
|
355
|
-
"
|
|
356
|
-
""
|
|
355
|
+
"format",
|
|
356
|
+
"number"
|
|
357
357
|
]
|
|
358
358
|
}
|
|
359
359
|
]
|
|
@@ -363,26 +363,26 @@
|
|
|
363
363
|
"render-ui",
|
|
364
364
|
"main",
|
|
365
365
|
{
|
|
366
|
+
"type": "data-list",
|
|
366
367
|
"renderItem": [
|
|
367
368
|
"fn",
|
|
368
369
|
"card",
|
|
369
370
|
{
|
|
371
|
+
"variant": "@card.variant",
|
|
370
372
|
"type": "stat-display",
|
|
371
|
-
"icon": "@card.icon",
|
|
372
|
-
"max": "@card.max",
|
|
373
|
-
"suffix": "@card.suffix",
|
|
374
373
|
"format": "@card.format",
|
|
374
|
+
"prefix": "@card.prefix",
|
|
375
|
+
"trend": "@card.trend",
|
|
375
376
|
"value": "@card.value",
|
|
377
|
+
"suffix": "@card.suffix",
|
|
378
|
+
"max": "@card.max",
|
|
379
|
+
"icon": "@card.icon",
|
|
376
380
|
"label": "@card.label",
|
|
377
|
-
"
|
|
378
|
-
"prefix": "@card.prefix",
|
|
379
|
-
"target": "@card.target",
|
|
380
|
-
"trend": "@card.trend"
|
|
381
|
+
"target": "@card.target"
|
|
381
382
|
}
|
|
382
383
|
],
|
|
383
|
-
"
|
|
384
|
-
"entity": "@entity.cards"
|
|
385
|
-
"fields": []
|
|
384
|
+
"fields": [],
|
|
385
|
+
"entity": "@entity.cards"
|
|
386
386
|
}
|
|
387
387
|
]
|
|
388
388
|
]
|