@almadar/std 16.241.0 → 16.243.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 (109) hide show
  1. package/behaviors/behaviors-registry.json +4650 -535
  2. package/behaviors/lolo/agent/atoms/std-agent-memory.lolo +38 -1
  3. package/behaviors/lolo/agent/atoms/std-agent-session.lolo +1074 -47
  4. package/behaviors/lolo/agent/atoms/std-agent-tool-loop.lolo +8 -7
  5. package/behaviors/lolo/agent/organisms/std-agent-assistant.lolo +56 -37
  6. package/behaviors/lolo/infra/atoms/std-page-open.lolo +59 -0
  7. package/behaviors/lolo/infra/atoms/std-page-search.lolo +136 -0
  8. package/behaviors/lolo/infra/atoms/std-page-treat.lolo +59 -0
  9. package/behaviors/lolo/infra/atoms/std-page-watch.lolo +88 -0
  10. package/behaviors/lolo/ui/core/atoms/std-book-reader.lolo +25 -1
  11. package/behaviors/lolo/ui/core/atoms/std-card-grid.lolo +9 -0
  12. package/behaviors/lolo/ui/core/atoms/std-doc-page.lolo +153 -0
  13. package/behaviors/lolo/ui/learning/atoms/std-learn-arrangement.lolo +124 -92
  14. package/behaviors/lolo/ui/learning/atoms/std-learn-classify.lolo +114 -55
  15. package/behaviors/lolo/ui/learning/atoms/std-learn-compare.lolo +40 -14
  16. package/behaviors/lolo/ui/learning/atoms/std-learn-coupled-sim.lolo +363 -123
  17. package/behaviors/lolo/ui/learning/atoms/std-learn-derivation.lolo +93 -48
  18. package/behaviors/lolo/ui/learning/atoms/std-learn-diagram.lolo +60 -28
  19. package/behaviors/lolo/ui/learning/atoms/std-learn-doser.lolo +193 -96
  20. package/behaviors/lolo/ui/learning/atoms/std-learn-estimate.lolo +75 -32
  21. package/behaviors/lolo/ui/learning/atoms/std-learn-goal-seek.lolo +142 -86
  22. package/behaviors/lolo/ui/learning/atoms/std-learn-grid-sim.lolo +266 -98
  23. package/behaviors/lolo/ui/learning/atoms/std-learn-hotspot.lolo +103 -65
  24. package/behaviors/lolo/ui/learning/atoms/std-learn-live-sim.lolo +223 -109
  25. package/behaviors/lolo/ui/learning/atoms/std-learn-measure.lolo +232 -64
  26. package/behaviors/lolo/ui/learning/atoms/std-learn-param-explorer.lolo +69 -29
  27. package/behaviors/lolo/ui/learning/atoms/std-learn-perturb.lolo +363 -123
  28. package/behaviors/lolo/ui/learning/atoms/std-learn-predict.lolo +73 -41
  29. package/behaviors/lolo/ui/learning/atoms/std-learn-sample-accumulator.lolo +96 -38
  30. package/behaviors/lolo/ui/learning/atoms/std-learn-sandbox.lolo +65 -45
  31. package/behaviors/lolo/ui/learning/atoms/std-learn-scatter-fit.lolo +243 -117
  32. package/behaviors/lolo/ui/learning/atoms/std-learn-scenario.lolo +76 -28
  33. package/behaviors/lolo/ui/learning/atoms/std-learn-sim-3d.lolo +228 -109
  34. package/behaviors/lolo/ui/learning/atoms/std-learn-speed-drill.lolo +95 -44
  35. package/behaviors/lolo/ui/learning/atoms/std-learn-stepper.lolo +199 -125
  36. package/behaviors/lolo/ui/learning/atoms/std-learn-tour-3d.lolo +92 -48
  37. package/behaviors/lolo/ui/learning/atoms/std-learn-trace-player.lolo +239 -78
  38. package/behaviors/lolo/ui/learning/atoms/std-learn-transport.lolo +147 -38
  39. package/behaviors/lolo/ui/learning/atoms/std-learn-tree.lolo +123 -58
  40. package/behaviors/lolo/ui/learning/atoms/ui-algo-graph-canvas.lolo +22 -0
  41. package/behaviors/lolo/ui/learning/atoms/ui-algorithm-canvas.lolo +26 -0
  42. package/behaviors/lolo/ui/learning/atoms/ui-biology-canvas.lolo +26 -0
  43. package/behaviors/lolo/ui/learning/atoms/ui-chemistry-canvas.lolo +27 -1
  44. package/behaviors/lolo/ui/learning/atoms/ui-learning-canvas.lolo +27 -1
  45. package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +29 -9
  46. package/behaviors/lolo/ui/learning/atoms/ui-physics-canvas.lolo +26 -0
  47. package/behaviors/lolo-behavior-contracts.json +1 -1
  48. package/behaviors/registry/agent/atoms/std-agent-memory.orb +372 -2
  49. package/behaviors/registry/agent/atoms/std-agent-session.orb +4752 -348
  50. package/behaviors/registry/agent/atoms/std-agent-tool-loop.orb +54 -42
  51. package/behaviors/registry/agent/organisms/std-agent-assistant.orb +356 -122
  52. package/behaviors/registry/factory-signatures.json +1 -1
  53. package/behaviors/registry/infra/atoms/std-page-open.orb +435 -0
  54. package/behaviors/registry/infra/atoms/std-page-search.orb +885 -0
  55. package/behaviors/registry/infra/atoms/std-page-treat.orb +494 -0
  56. package/behaviors/registry/infra/atoms/std-page-watch.orb +572 -0
  57. package/behaviors/registry/ui/core/atoms/std-book-reader.orb +119 -0
  58. package/behaviors/registry/ui/core/atoms/std-card-grid.orb +61 -0
  59. package/behaviors/registry/ui/core/atoms/std-doc-page.orb +594 -0
  60. package/behaviors/registry/ui/learning/atoms/std-learn-arrangement.orb +903 -369
  61. package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1002 -232
  62. package/behaviors/registry/ui/learning/atoms/std-learn-compare.orb +253 -74
  63. package/behaviors/registry/ui/learning/atoms/std-learn-coupled-sim.orb +3624 -921
  64. package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +685 -144
  65. package/behaviors/registry/ui/learning/atoms/std-learn-diagram.orb +404 -52
  66. package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +1787 -210
  67. package/behaviors/registry/ui/learning/atoms/std-learn-estimate.orb +699 -71
  68. package/behaviors/registry/ui/learning/atoms/std-learn-goal-seek.orb +1102 -578
  69. package/behaviors/registry/ui/learning/atoms/std-learn-grid-sim.orb +2760 -872
  70. package/behaviors/registry/ui/learning/atoms/std-learn-hotspot.orb +689 -152
  71. package/behaviors/registry/ui/learning/atoms/std-learn-live-sim.orb +1431 -633
  72. package/behaviors/registry/ui/learning/atoms/std-learn-measure.orb +2485 -512
  73. package/behaviors/registry/ui/learning/atoms/std-learn-param-explorer.orb +501 -197
  74. package/behaviors/registry/ui/learning/atoms/std-learn-perturb.orb +3642 -928
  75. package/behaviors/registry/ui/learning/atoms/std-learn-predict.orb +705 -125
  76. package/behaviors/registry/ui/learning/atoms/std-learn-sample-accumulator.orb +624 -114
  77. package/behaviors/registry/ui/learning/atoms/std-learn-sandbox.orb +405 -153
  78. package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +1911 -611
  79. package/behaviors/registry/ui/learning/atoms/std-learn-scenario.orb +436 -128
  80. package/behaviors/registry/ui/learning/atoms/std-learn-sim-3d.orb +2482 -485
  81. package/behaviors/registry/ui/learning/atoms/std-learn-speed-drill.orb +896 -192
  82. package/behaviors/registry/ui/learning/atoms/std-learn-stepper.orb +2001 -759
  83. package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +734 -228
  84. package/behaviors/registry/ui/learning/atoms/std-learn-trace-player.orb +2501 -764
  85. package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +1591 -173
  86. package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +883 -122
  87. package/behaviors/registry/ui/learning/atoms/ui-algo-graph-canvas.orb +176 -0
  88. package/behaviors/registry/ui/learning/atoms/ui-algorithm-canvas.orb +211 -0
  89. package/behaviors/registry/ui/learning/atoms/ui-biology-canvas.orb +211 -0
  90. package/behaviors/registry/ui/learning/atoms/ui-chemistry-canvas.orb +212 -1
  91. package/behaviors/registry/ui/learning/atoms/ui-learning-canvas.orb +212 -1
  92. package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +203 -9
  93. package/behaviors/registry/ui/learning/atoms/ui-physics-canvas.orb +211 -0
  94. package/behaviors/signatures.lolo +325 -655
  95. package/dist/behaviors/exports-reader.js +16092 -9747
  96. package/dist/behaviors/functions/index.d.ts +1052 -136
  97. package/dist/behaviors/functions/index.js +16063 -9745
  98. package/dist/behaviors/index.d.ts +1 -1
  99. package/dist/behaviors/index.js +16093 -9748
  100. package/dist/behaviors/query.js +16092 -9747
  101. package/dist/behaviors-embeddings.hash.json +3 -3
  102. package/dist/behaviors-embeddings.json +45 -25
  103. package/dist/behaviors-registry.json +4650 -535
  104. package/dist/index.d.ts +1 -1
  105. package/dist/index.js +16093 -9748
  106. package/dist/knob-embeddings.hash.json +3 -3
  107. package/dist/knob-embeddings.json +607 -263
  108. package/dist/registry/factory-signatures.json +1 -1
  109. package/package.json +3 -3
@@ -304,8 +304,8 @@
304
304
  "type": "boolean"
305
305
  },
306
306
  "backgroundColor": {
307
- "default": "#fafafa",
308
- "description": "Canvas background color.",
307
+ "default": "",
308
+ "description": "Canvas ground. Empty uses the theme drawing ground.",
309
309
  "label": "Background Color",
310
310
  "tier": "presentation",
311
311
  "type": "string"
@@ -313,13 +313,13 @@
313
313
  "bands": {
314
314
  "default": [
315
315
  {
316
- "color": "#94a3b8",
316
+ "color": "muted",
317
317
  "label": "Low",
318
318
  "terminal": false,
319
319
  "upperBound": 50.0
320
320
  },
321
321
  {
322
- "color": "#16a34a",
322
+ "color": "success",
323
323
  "label": "High",
324
324
  "terminal": true,
325
325
  "upperBound": 999999999.0
@@ -407,6 +407,16 @@
407
407
  "tier": "presentation",
408
408
  "type": "string"
409
409
  },
410
+ "series": {
411
+ "default": [],
412
+ "description": "Overrides the theme's categorical palette on the canvas (series-1…N) — a subject's real-world color convention, such as indicator colors. Empty uses the theme's palette.",
413
+ "items": {
414
+ "type": "string"
415
+ },
416
+ "label": "Palette",
417
+ "tier": "presentation",
418
+ "type": "[string]"
419
+ },
410
420
  "showCanvas": {
411
421
  "default": true,
412
422
  "description": "When true (the default, standalone use) the instrument renders its own reservoir/source canvas and narration below the control strip. Set false when a domain sibling trait composes this atom via @rebindable and owns the accurate scene render itself — then only the control strip (add/drip/reset buttons) embeds via @trait.<name>, avoiding a duplicate canvas.",
@@ -415,8 +425,8 @@
415
425
  "type": "boolean"
416
426
  },
417
427
  "sourceColor": {
418
- "default": "#60a5fa",
419
- "description": "Fill color for the source vessel.",
428
+ "default": "series-1",
429
+ "description": "Tone name for the source vessel fill (for example series-1).",
420
430
  "label": "Source Color",
421
431
  "tier": "presentation",
422
432
  "type": "string"
@@ -443,6 +453,13 @@
443
453
  "tier": "domain",
444
454
  "type": "number"
445
455
  },
456
+ "summary": {
457
+ "default": "",
458
+ "description": "One line under the title saying what the learner is looking at (keep it under ~65 characters). Empty shows no line.",
459
+ "label": "Concept",
460
+ "tier": "presentation",
461
+ "type": "string"
462
+ },
446
463
  "title": {
447
464
  "default": "Doser",
448
465
  "description": "Title shown above the instrument.",
@@ -1063,17 +1080,76 @@
1063
1080
  {
1064
1081
  "children": [
1065
1082
  {
1066
- "content": "@entity.title",
1067
- "type": "typography",
1068
- "variant": "h4"
1083
+ "align": "start",
1084
+ "children": [
1085
+ {
1086
+ "children": [
1087
+ {
1088
+ "content": "@entity.title",
1089
+ "type": "typography",
1090
+ "variant": "h4"
1091
+ },
1092
+ [
1093
+ "if",
1094
+ [
1095
+ "==",
1096
+ "@config.summary",
1097
+ ""
1098
+ ],
1099
+ null,
1100
+ {
1101
+ "color": "muted",
1102
+ "content": "@config.summary",
1103
+ "type": "typography",
1104
+ "variant": "body2"
1105
+ }
1106
+ ]
1107
+ ],
1108
+ "direction": "vertical",
1109
+ "gap": "xs",
1110
+ "type": "stack"
1111
+ },
1112
+ {
1113
+ "label": [
1114
+ "if",
1115
+ "@entity.done",
1116
+ "Locked",
1117
+ [
1118
+ "if",
1119
+ "@entity.running",
1120
+ "Auto-dosing",
1121
+ "Ready"
1122
+ ]
1123
+ ],
1124
+ "type": "badge",
1125
+ "variant": [
1126
+ "if",
1127
+ "@entity.done",
1128
+ "warning",
1129
+ [
1130
+ "if",
1131
+ "@entity.running",
1132
+ "primary",
1133
+ "neutral"
1134
+ ]
1135
+ ]
1136
+ }
1137
+ ],
1138
+ "direction": "horizontal",
1139
+ "gap": "md",
1140
+ "justify": "between",
1141
+ "type": "stack"
1069
1142
  },
1070
1143
  {
1144
+ "align": "center",
1071
1145
  "children": [
1072
1146
  {
1073
1147
  "action": "ADD_SMALL",
1148
+ "disabled": "@entity.done",
1149
+ "icon": "plus",
1074
1150
  "label": [
1075
1151
  "str/concat",
1076
- "+ ",
1152
+ "Add ",
1077
1153
  [
1078
1154
  "str/concat",
1079
1155
  [
@@ -1102,9 +1178,11 @@
1102
1178
  },
1103
1179
  {
1104
1180
  "action": "ADD_LARGE",
1181
+ "disabled": "@entity.done",
1182
+ "icon": "plus",
1105
1183
  "label": [
1106
1184
  "str/concat",
1107
- "+ ",
1185
+ "Add ",
1108
1186
  [
1109
1187
  "str/concat",
1110
1188
  [
@@ -1131,33 +1209,101 @@
1131
1209
  "type": "button",
1132
1210
  "variant": "secondary"
1133
1211
  },
1134
- {
1135
- "action": "TOGGLE_DRIP",
1136
- "label": [
1137
- "if",
1138
- "@entity.running",
1139
- "Pause",
1140
- "Auto-dose"
1141
- ],
1142
- "type": "button",
1143
- "variant": "secondary"
1144
- },
1212
+ [
1213
+ "if",
1214
+ "@entity.running",
1215
+ {
1216
+ "action": "TOGGLE_DRIP",
1217
+ "aria-pressed": "true",
1218
+ "icon": "pause",
1219
+ "label": "Pause",
1220
+ "type": "button",
1221
+ "variant": "secondary"
1222
+ },
1223
+ {
1224
+ "action": "TOGGLE_DRIP",
1225
+ "aria-pressed": "false",
1226
+ "disabled": "@entity.done",
1227
+ "icon": "play",
1228
+ "label": "Auto-dose",
1229
+ "type": "button",
1230
+ "variant": "secondary"
1231
+ }
1232
+ ],
1145
1233
  {
1146
1234
  "action": "RESET",
1235
+ "icon": "rotate-ccw",
1147
1236
  "label": "Reset",
1148
1237
  "type": "button",
1149
1238
  "variant": "ghost"
1239
+ },
1240
+ {
1241
+ "color": "muted",
1242
+ "content": [
1243
+ "str/concat",
1244
+ "@config.quantityLabel",
1245
+ [
1246
+ "str/concat",
1247
+ " ",
1248
+ [
1249
+ "str/concat",
1250
+ [
1251
+ "str/concat",
1252
+ "",
1253
+ [
1254
+ "math/round",
1255
+ "@entity.dose",
1256
+ 2.0
1257
+ ]
1258
+ ],
1259
+ [
1260
+ "str/concat",
1261
+ " of ",
1262
+ [
1263
+ "str/concat",
1264
+ [
1265
+ "str/concat",
1266
+ "",
1267
+ "@config.capacity"
1268
+ ],
1269
+ [
1270
+ "if",
1271
+ [
1272
+ "==",
1273
+ "@config.unit",
1274
+ ""
1275
+ ],
1276
+ "",
1277
+ [
1278
+ "str/concat",
1279
+ " ",
1280
+ "@config.unit"
1281
+ ]
1282
+ ]
1283
+ ]
1284
+ ]
1285
+ ]
1286
+ ]
1287
+ ],
1288
+ "type": "typography",
1289
+ "variant": "caption"
1150
1290
  }
1151
1291
  ],
1152
1292
  "direction": "horizontal",
1153
1293
  "gap": "sm",
1154
- "type": "stack"
1294
+ "type": "stack",
1295
+ "wrap": true
1155
1296
  },
1156
1297
  {
1157
1298
  "backgroundColor": "@config.backgroundColor",
1158
1299
  "containers": "@entity.containers",
1159
1300
  "height": "@config.height",
1301
+ "keyMap": {
1302
+ "KeyR": "RESET",
1303
+ "Space": "TOGGLE_DRIP"
1304
+ },
1160
1305
  "readouts": "@entity.readouts",
1306
+ "series": "@config.series",
1161
1307
  "traces": [
1162
1308
  {
1163
1309
  "series": [
@@ -1196,17 +1342,76 @@
1196
1342
  {
1197
1343
  "children": [
1198
1344
  {
1199
- "content": "@entity.title",
1200
- "type": "typography",
1201
- "variant": "h4"
1345
+ "align": "start",
1346
+ "children": [
1347
+ {
1348
+ "children": [
1349
+ {
1350
+ "content": "@entity.title",
1351
+ "type": "typography",
1352
+ "variant": "h4"
1353
+ },
1354
+ [
1355
+ "if",
1356
+ [
1357
+ "==",
1358
+ "@config.summary",
1359
+ ""
1360
+ ],
1361
+ null,
1362
+ {
1363
+ "color": "muted",
1364
+ "content": "@config.summary",
1365
+ "type": "typography",
1366
+ "variant": "body2"
1367
+ }
1368
+ ]
1369
+ ],
1370
+ "direction": "vertical",
1371
+ "gap": "xs",
1372
+ "type": "stack"
1373
+ },
1374
+ {
1375
+ "label": [
1376
+ "if",
1377
+ "@entity.done",
1378
+ "Locked",
1379
+ [
1380
+ "if",
1381
+ "@entity.running",
1382
+ "Auto-dosing",
1383
+ "Ready"
1384
+ ]
1385
+ ],
1386
+ "type": "badge",
1387
+ "variant": [
1388
+ "if",
1389
+ "@entity.done",
1390
+ "warning",
1391
+ [
1392
+ "if",
1393
+ "@entity.running",
1394
+ "primary",
1395
+ "neutral"
1396
+ ]
1397
+ ]
1398
+ }
1399
+ ],
1400
+ "direction": "horizontal",
1401
+ "gap": "md",
1402
+ "justify": "between",
1403
+ "type": "stack"
1202
1404
  },
1203
1405
  {
1406
+ "align": "center",
1204
1407
  "children": [
1205
1408
  {
1206
1409
  "action": "ADD_SMALL",
1410
+ "disabled": "@entity.done",
1411
+ "icon": "plus",
1207
1412
  "label": [
1208
1413
  "str/concat",
1209
- "+ ",
1414
+ "Add ",
1210
1415
  [
1211
1416
  "str/concat",
1212
1417
  [
@@ -1235,9 +1440,11 @@
1235
1440
  },
1236
1441
  {
1237
1442
  "action": "ADD_LARGE",
1443
+ "disabled": "@entity.done",
1444
+ "icon": "plus",
1238
1445
  "label": [
1239
1446
  "str/concat",
1240
- "+ ",
1447
+ "Add ",
1241
1448
  [
1242
1449
  "str/concat",
1243
1450
  [
@@ -1264,27 +1471,90 @@
1264
1471
  "type": "button",
1265
1472
  "variant": "secondary"
1266
1473
  },
1267
- {
1268
- "action": "TOGGLE_DRIP",
1269
- "label": [
1270
- "if",
1271
- "@entity.running",
1272
- "Pause",
1273
- "Auto-dose"
1274
- ],
1275
- "type": "button",
1276
- "variant": "secondary"
1277
- },
1474
+ [
1475
+ "if",
1476
+ "@entity.running",
1477
+ {
1478
+ "action": "TOGGLE_DRIP",
1479
+ "aria-pressed": "true",
1480
+ "icon": "pause",
1481
+ "label": "Pause",
1482
+ "type": "button",
1483
+ "variant": "secondary"
1484
+ },
1485
+ {
1486
+ "action": "TOGGLE_DRIP",
1487
+ "aria-pressed": "false",
1488
+ "disabled": "@entity.done",
1489
+ "icon": "play",
1490
+ "label": "Auto-dose",
1491
+ "type": "button",
1492
+ "variant": "secondary"
1493
+ }
1494
+ ],
1278
1495
  {
1279
1496
  "action": "RESET",
1497
+ "icon": "rotate-ccw",
1280
1498
  "label": "Reset",
1281
1499
  "type": "button",
1282
1500
  "variant": "ghost"
1501
+ },
1502
+ {
1503
+ "color": "muted",
1504
+ "content": [
1505
+ "str/concat",
1506
+ "@config.quantityLabel",
1507
+ [
1508
+ "str/concat",
1509
+ " ",
1510
+ [
1511
+ "str/concat",
1512
+ [
1513
+ "str/concat",
1514
+ "",
1515
+ [
1516
+ "math/round",
1517
+ "@entity.dose",
1518
+ 2.0
1519
+ ]
1520
+ ],
1521
+ [
1522
+ "str/concat",
1523
+ " of ",
1524
+ [
1525
+ "str/concat",
1526
+ [
1527
+ "str/concat",
1528
+ "",
1529
+ "@config.capacity"
1530
+ ],
1531
+ [
1532
+ "if",
1533
+ [
1534
+ "==",
1535
+ "@config.unit",
1536
+ ""
1537
+ ],
1538
+ "",
1539
+ [
1540
+ "str/concat",
1541
+ " ",
1542
+ "@config.unit"
1543
+ ]
1544
+ ]
1545
+ ]
1546
+ ]
1547
+ ]
1548
+ ]
1549
+ ],
1550
+ "type": "typography",
1551
+ "variant": "caption"
1283
1552
  }
1284
1553
  ],
1285
1554
  "direction": "horizontal",
1286
1555
  "gap": "sm",
1287
- "type": "stack"
1556
+ "type": "stack",
1557
+ "wrap": true
1288
1558
  }
1289
1559
  ],
1290
1560
  "direction": "vertical",
@@ -1318,6 +1588,48 @@
1318
1588
  ],
1319
1589
  "to": "idle"
1320
1590
  },
1591
+ {
1592
+ "effects": [
1593
+ [
1594
+ "set",
1595
+ "@entity.active",
1596
+ false
1597
+ ],
1598
+ [
1599
+ "set",
1600
+ "@entity.running",
1601
+ false
1602
+ ],
1603
+ [
1604
+ "render-ui",
1605
+ "main",
1606
+ null
1607
+ ]
1608
+ ],
1609
+ "event": "MODE_SELECTED",
1610
+ "eventId": "evt_01M0CGZ8SPCJWD38ZCMJGGA4EF",
1611
+ "from": "idle",
1612
+ "guard": [
1613
+ "and",
1614
+ [
1615
+ "not",
1616
+ [
1617
+ "==",
1618
+ "@config.matchMode",
1619
+ ""
1620
+ ]
1621
+ ],
1622
+ [
1623
+ "not",
1624
+ [
1625
+ "==",
1626
+ "@payload.mode",
1627
+ "@config.matchMode"
1628
+ ]
1629
+ ]
1630
+ ],
1631
+ "to": "idle"
1632
+ },
1321
1633
  {
1322
1634
  "effects": [
1323
1635
  [
@@ -1593,17 +1905,76 @@
1593
1905
  {
1594
1906
  "children": [
1595
1907
  {
1596
- "content": "@entity.title",
1597
- "type": "typography",
1598
- "variant": "h4"
1908
+ "align": "start",
1909
+ "children": [
1910
+ {
1911
+ "children": [
1912
+ {
1913
+ "content": "@entity.title",
1914
+ "type": "typography",
1915
+ "variant": "h4"
1916
+ },
1917
+ [
1918
+ "if",
1919
+ [
1920
+ "==",
1921
+ "@config.summary",
1922
+ ""
1923
+ ],
1924
+ null,
1925
+ {
1926
+ "color": "muted",
1927
+ "content": "@config.summary",
1928
+ "type": "typography",
1929
+ "variant": "body2"
1930
+ }
1931
+ ]
1932
+ ],
1933
+ "direction": "vertical",
1934
+ "gap": "xs",
1935
+ "type": "stack"
1936
+ },
1937
+ {
1938
+ "label": [
1939
+ "if",
1940
+ "@entity.done",
1941
+ "Locked",
1942
+ [
1943
+ "if",
1944
+ "@entity.running",
1945
+ "Auto-dosing",
1946
+ "Ready"
1947
+ ]
1948
+ ],
1949
+ "type": "badge",
1950
+ "variant": [
1951
+ "if",
1952
+ "@entity.done",
1953
+ "warning",
1954
+ [
1955
+ "if",
1956
+ "@entity.running",
1957
+ "primary",
1958
+ "neutral"
1959
+ ]
1960
+ ]
1961
+ }
1962
+ ],
1963
+ "direction": "horizontal",
1964
+ "gap": "md",
1965
+ "justify": "between",
1966
+ "type": "stack"
1599
1967
  },
1600
1968
  {
1969
+ "align": "center",
1601
1970
  "children": [
1602
1971
  {
1603
1972
  "action": "ADD_SMALL",
1973
+ "disabled": "@entity.done",
1974
+ "icon": "plus",
1604
1975
  "label": [
1605
1976
  "str/concat",
1606
- "+ ",
1977
+ "Add ",
1607
1978
  [
1608
1979
  "str/concat",
1609
1980
  [
@@ -1632,9 +2003,11 @@
1632
2003
  },
1633
2004
  {
1634
2005
  "action": "ADD_LARGE",
2006
+ "disabled": "@entity.done",
2007
+ "icon": "plus",
1635
2008
  "label": [
1636
2009
  "str/concat",
1637
- "+ ",
2010
+ "Add ",
1638
2011
  [
1639
2012
  "str/concat",
1640
2013
  [
@@ -1661,33 +2034,101 @@
1661
2034
  "type": "button",
1662
2035
  "variant": "secondary"
1663
2036
  },
1664
- {
1665
- "action": "TOGGLE_DRIP",
1666
- "label": [
1667
- "if",
1668
- "@entity.running",
1669
- "Pause",
1670
- "Auto-dose"
1671
- ],
1672
- "type": "button",
1673
- "variant": "secondary"
1674
- },
2037
+ [
2038
+ "if",
2039
+ "@entity.running",
2040
+ {
2041
+ "action": "TOGGLE_DRIP",
2042
+ "aria-pressed": "true",
2043
+ "icon": "pause",
2044
+ "label": "Pause",
2045
+ "type": "button",
2046
+ "variant": "secondary"
2047
+ },
2048
+ {
2049
+ "action": "TOGGLE_DRIP",
2050
+ "aria-pressed": "false",
2051
+ "disabled": "@entity.done",
2052
+ "icon": "play",
2053
+ "label": "Auto-dose",
2054
+ "type": "button",
2055
+ "variant": "secondary"
2056
+ }
2057
+ ],
1675
2058
  {
1676
2059
  "action": "RESET",
2060
+ "icon": "rotate-ccw",
1677
2061
  "label": "Reset",
1678
2062
  "type": "button",
1679
2063
  "variant": "ghost"
2064
+ },
2065
+ {
2066
+ "color": "muted",
2067
+ "content": [
2068
+ "str/concat",
2069
+ "@config.quantityLabel",
2070
+ [
2071
+ "str/concat",
2072
+ " ",
2073
+ [
2074
+ "str/concat",
2075
+ [
2076
+ "str/concat",
2077
+ "",
2078
+ [
2079
+ "math/round",
2080
+ "@entity.dose",
2081
+ 2.0
2082
+ ]
2083
+ ],
2084
+ [
2085
+ "str/concat",
2086
+ " of ",
2087
+ [
2088
+ "str/concat",
2089
+ [
2090
+ "str/concat",
2091
+ "",
2092
+ "@config.capacity"
2093
+ ],
2094
+ [
2095
+ "if",
2096
+ [
2097
+ "==",
2098
+ "@config.unit",
2099
+ ""
2100
+ ],
2101
+ "",
2102
+ [
2103
+ "str/concat",
2104
+ " ",
2105
+ "@config.unit"
2106
+ ]
2107
+ ]
2108
+ ]
2109
+ ]
2110
+ ]
2111
+ ]
2112
+ ],
2113
+ "type": "typography",
2114
+ "variant": "caption"
1680
2115
  }
1681
2116
  ],
1682
2117
  "direction": "horizontal",
1683
2118
  "gap": "sm",
1684
- "type": "stack"
2119
+ "type": "stack",
2120
+ "wrap": true
1685
2121
  },
1686
2122
  {
1687
2123
  "backgroundColor": "@config.backgroundColor",
1688
2124
  "containers": "@entity.containers",
1689
2125
  "height": "@config.height",
2126
+ "keyMap": {
2127
+ "KeyR": "RESET",
2128
+ "Space": "TOGGLE_DRIP"
2129
+ },
1690
2130
  "readouts": "@entity.readouts",
2131
+ "series": "@config.series",
1691
2132
  "traces": [
1692
2133
  {
1693
2134
  "series": [
@@ -1726,17 +2167,76 @@
1726
2167
  {
1727
2168
  "children": [
1728
2169
  {
1729
- "content": "@entity.title",
1730
- "type": "typography",
1731
- "variant": "h4"
2170
+ "align": "start",
2171
+ "children": [
2172
+ {
2173
+ "children": [
2174
+ {
2175
+ "content": "@entity.title",
2176
+ "type": "typography",
2177
+ "variant": "h4"
2178
+ },
2179
+ [
2180
+ "if",
2181
+ [
2182
+ "==",
2183
+ "@config.summary",
2184
+ ""
2185
+ ],
2186
+ null,
2187
+ {
2188
+ "color": "muted",
2189
+ "content": "@config.summary",
2190
+ "type": "typography",
2191
+ "variant": "body2"
2192
+ }
2193
+ ]
2194
+ ],
2195
+ "direction": "vertical",
2196
+ "gap": "xs",
2197
+ "type": "stack"
2198
+ },
2199
+ {
2200
+ "label": [
2201
+ "if",
2202
+ "@entity.done",
2203
+ "Locked",
2204
+ [
2205
+ "if",
2206
+ "@entity.running",
2207
+ "Auto-dosing",
2208
+ "Ready"
2209
+ ]
2210
+ ],
2211
+ "type": "badge",
2212
+ "variant": [
2213
+ "if",
2214
+ "@entity.done",
2215
+ "warning",
2216
+ [
2217
+ "if",
2218
+ "@entity.running",
2219
+ "primary",
2220
+ "neutral"
2221
+ ]
2222
+ ]
2223
+ }
2224
+ ],
2225
+ "direction": "horizontal",
2226
+ "gap": "md",
2227
+ "justify": "between",
2228
+ "type": "stack"
1732
2229
  },
1733
2230
  {
2231
+ "align": "center",
1734
2232
  "children": [
1735
2233
  {
1736
2234
  "action": "ADD_SMALL",
2235
+ "disabled": "@entity.done",
2236
+ "icon": "plus",
1737
2237
  "label": [
1738
2238
  "str/concat",
1739
- "+ ",
2239
+ "Add ",
1740
2240
  [
1741
2241
  "str/concat",
1742
2242
  [
@@ -1765,9 +2265,11 @@
1765
2265
  },
1766
2266
  {
1767
2267
  "action": "ADD_LARGE",
2268
+ "disabled": "@entity.done",
2269
+ "icon": "plus",
1768
2270
  "label": [
1769
2271
  "str/concat",
1770
- "+ ",
2272
+ "Add ",
1771
2273
  [
1772
2274
  "str/concat",
1773
2275
  [
@@ -1794,27 +2296,90 @@
1794
2296
  "type": "button",
1795
2297
  "variant": "secondary"
1796
2298
  },
1797
- {
1798
- "action": "TOGGLE_DRIP",
1799
- "label": [
1800
- "if",
1801
- "@entity.running",
1802
- "Pause",
1803
- "Auto-dose"
1804
- ],
1805
- "type": "button",
1806
- "variant": "secondary"
1807
- },
2299
+ [
2300
+ "if",
2301
+ "@entity.running",
2302
+ {
2303
+ "action": "TOGGLE_DRIP",
2304
+ "aria-pressed": "true",
2305
+ "icon": "pause",
2306
+ "label": "Pause",
2307
+ "type": "button",
2308
+ "variant": "secondary"
2309
+ },
2310
+ {
2311
+ "action": "TOGGLE_DRIP",
2312
+ "aria-pressed": "false",
2313
+ "disabled": "@entity.done",
2314
+ "icon": "play",
2315
+ "label": "Auto-dose",
2316
+ "type": "button",
2317
+ "variant": "secondary"
2318
+ }
2319
+ ],
1808
2320
  {
1809
2321
  "action": "RESET",
2322
+ "icon": "rotate-ccw",
1810
2323
  "label": "Reset",
1811
2324
  "type": "button",
1812
2325
  "variant": "ghost"
2326
+ },
2327
+ {
2328
+ "color": "muted",
2329
+ "content": [
2330
+ "str/concat",
2331
+ "@config.quantityLabel",
2332
+ [
2333
+ "str/concat",
2334
+ " ",
2335
+ [
2336
+ "str/concat",
2337
+ [
2338
+ "str/concat",
2339
+ "",
2340
+ [
2341
+ "math/round",
2342
+ "@entity.dose",
2343
+ 2.0
2344
+ ]
2345
+ ],
2346
+ [
2347
+ "str/concat",
2348
+ " of ",
2349
+ [
2350
+ "str/concat",
2351
+ [
2352
+ "str/concat",
2353
+ "",
2354
+ "@config.capacity"
2355
+ ],
2356
+ [
2357
+ "if",
2358
+ [
2359
+ "==",
2360
+ "@config.unit",
2361
+ ""
2362
+ ],
2363
+ "",
2364
+ [
2365
+ "str/concat",
2366
+ " ",
2367
+ "@config.unit"
2368
+ ]
2369
+ ]
2370
+ ]
2371
+ ]
2372
+ ]
2373
+ ]
2374
+ ],
2375
+ "type": "typography",
2376
+ "variant": "caption"
1813
2377
  }
1814
2378
  ],
1815
2379
  "direction": "horizontal",
1816
2380
  "gap": "sm",
1817
- "type": "stack"
2381
+ "type": "stack",
2382
+ "wrap": true
1818
2383
  }
1819
2384
  ],
1820
2385
  "direction": "vertical",
@@ -2129,17 +2694,76 @@
2129
2694
  {
2130
2695
  "children": [
2131
2696
  {
2132
- "content": "@entity.title",
2133
- "type": "typography",
2134
- "variant": "h4"
2697
+ "align": "start",
2698
+ "children": [
2699
+ {
2700
+ "children": [
2701
+ {
2702
+ "content": "@entity.title",
2703
+ "type": "typography",
2704
+ "variant": "h4"
2705
+ },
2706
+ [
2707
+ "if",
2708
+ [
2709
+ "==",
2710
+ "@config.summary",
2711
+ ""
2712
+ ],
2713
+ null,
2714
+ {
2715
+ "color": "muted",
2716
+ "content": "@config.summary",
2717
+ "type": "typography",
2718
+ "variant": "body2"
2719
+ }
2720
+ ]
2721
+ ],
2722
+ "direction": "vertical",
2723
+ "gap": "xs",
2724
+ "type": "stack"
2725
+ },
2726
+ {
2727
+ "label": [
2728
+ "if",
2729
+ "@entity.done",
2730
+ "Locked",
2731
+ [
2732
+ "if",
2733
+ "@entity.running",
2734
+ "Auto-dosing",
2735
+ "Ready"
2736
+ ]
2737
+ ],
2738
+ "type": "badge",
2739
+ "variant": [
2740
+ "if",
2741
+ "@entity.done",
2742
+ "warning",
2743
+ [
2744
+ "if",
2745
+ "@entity.running",
2746
+ "primary",
2747
+ "neutral"
2748
+ ]
2749
+ ]
2750
+ }
2751
+ ],
2752
+ "direction": "horizontal",
2753
+ "gap": "md",
2754
+ "justify": "between",
2755
+ "type": "stack"
2135
2756
  },
2136
2757
  {
2758
+ "align": "center",
2137
2759
  "children": [
2138
2760
  {
2139
2761
  "action": "ADD_SMALL",
2762
+ "disabled": "@entity.done",
2763
+ "icon": "plus",
2140
2764
  "label": [
2141
2765
  "str/concat",
2142
- "+ ",
2766
+ "Add ",
2143
2767
  [
2144
2768
  "str/concat",
2145
2769
  [
@@ -2168,9 +2792,11 @@
2168
2792
  },
2169
2793
  {
2170
2794
  "action": "ADD_LARGE",
2795
+ "disabled": "@entity.done",
2796
+ "icon": "plus",
2171
2797
  "label": [
2172
2798
  "str/concat",
2173
- "+ ",
2799
+ "Add ",
2174
2800
  [
2175
2801
  "str/concat",
2176
2802
  [
@@ -2197,33 +2823,101 @@
2197
2823
  "type": "button",
2198
2824
  "variant": "secondary"
2199
2825
  },
2200
- {
2201
- "action": "TOGGLE_DRIP",
2202
- "label": [
2203
- "if",
2204
- "@entity.running",
2205
- "Pause",
2206
- "Auto-dose"
2207
- ],
2208
- "type": "button",
2209
- "variant": "secondary"
2210
- },
2826
+ [
2827
+ "if",
2828
+ "@entity.running",
2829
+ {
2830
+ "action": "TOGGLE_DRIP",
2831
+ "aria-pressed": "true",
2832
+ "icon": "pause",
2833
+ "label": "Pause",
2834
+ "type": "button",
2835
+ "variant": "secondary"
2836
+ },
2837
+ {
2838
+ "action": "TOGGLE_DRIP",
2839
+ "aria-pressed": "false",
2840
+ "disabled": "@entity.done",
2841
+ "icon": "play",
2842
+ "label": "Auto-dose",
2843
+ "type": "button",
2844
+ "variant": "secondary"
2845
+ }
2846
+ ],
2211
2847
  {
2212
2848
  "action": "RESET",
2849
+ "icon": "rotate-ccw",
2213
2850
  "label": "Reset",
2214
2851
  "type": "button",
2215
2852
  "variant": "ghost"
2853
+ },
2854
+ {
2855
+ "color": "muted",
2856
+ "content": [
2857
+ "str/concat",
2858
+ "@config.quantityLabel",
2859
+ [
2860
+ "str/concat",
2861
+ " ",
2862
+ [
2863
+ "str/concat",
2864
+ [
2865
+ "str/concat",
2866
+ "",
2867
+ [
2868
+ "math/round",
2869
+ "@entity.dose",
2870
+ 2.0
2871
+ ]
2872
+ ],
2873
+ [
2874
+ "str/concat",
2875
+ " of ",
2876
+ [
2877
+ "str/concat",
2878
+ [
2879
+ "str/concat",
2880
+ "",
2881
+ "@config.capacity"
2882
+ ],
2883
+ [
2884
+ "if",
2885
+ [
2886
+ "==",
2887
+ "@config.unit",
2888
+ ""
2889
+ ],
2890
+ "",
2891
+ [
2892
+ "str/concat",
2893
+ " ",
2894
+ "@config.unit"
2895
+ ]
2896
+ ]
2897
+ ]
2898
+ ]
2899
+ ]
2900
+ ]
2901
+ ],
2902
+ "type": "typography",
2903
+ "variant": "caption"
2216
2904
  }
2217
2905
  ],
2218
2906
  "direction": "horizontal",
2219
2907
  "gap": "sm",
2220
- "type": "stack"
2908
+ "type": "stack",
2909
+ "wrap": true
2221
2910
  },
2222
2911
  {
2223
2912
  "backgroundColor": "@config.backgroundColor",
2224
2913
  "containers": "@entity.containers",
2225
2914
  "height": "@config.height",
2915
+ "keyMap": {
2916
+ "KeyR": "RESET",
2917
+ "Space": "TOGGLE_DRIP"
2918
+ },
2226
2919
  "readouts": "@entity.readouts",
2920
+ "series": "@config.series",
2227
2921
  "traces": [
2228
2922
  {
2229
2923
  "series": [
@@ -2262,17 +2956,76 @@
2262
2956
  {
2263
2957
  "children": [
2264
2958
  {
2265
- "content": "@entity.title",
2266
- "type": "typography",
2267
- "variant": "h4"
2959
+ "align": "start",
2960
+ "children": [
2961
+ {
2962
+ "children": [
2963
+ {
2964
+ "content": "@entity.title",
2965
+ "type": "typography",
2966
+ "variant": "h4"
2967
+ },
2968
+ [
2969
+ "if",
2970
+ [
2971
+ "==",
2972
+ "@config.summary",
2973
+ ""
2974
+ ],
2975
+ null,
2976
+ {
2977
+ "color": "muted",
2978
+ "content": "@config.summary",
2979
+ "type": "typography",
2980
+ "variant": "body2"
2981
+ }
2982
+ ]
2983
+ ],
2984
+ "direction": "vertical",
2985
+ "gap": "xs",
2986
+ "type": "stack"
2987
+ },
2988
+ {
2989
+ "label": [
2990
+ "if",
2991
+ "@entity.done",
2992
+ "Locked",
2993
+ [
2994
+ "if",
2995
+ "@entity.running",
2996
+ "Auto-dosing",
2997
+ "Ready"
2998
+ ]
2999
+ ],
3000
+ "type": "badge",
3001
+ "variant": [
3002
+ "if",
3003
+ "@entity.done",
3004
+ "warning",
3005
+ [
3006
+ "if",
3007
+ "@entity.running",
3008
+ "primary",
3009
+ "neutral"
3010
+ ]
3011
+ ]
3012
+ }
3013
+ ],
3014
+ "direction": "horizontal",
3015
+ "gap": "md",
3016
+ "justify": "between",
3017
+ "type": "stack"
2268
3018
  },
2269
3019
  {
3020
+ "align": "center",
2270
3021
  "children": [
2271
3022
  {
2272
3023
  "action": "ADD_SMALL",
3024
+ "disabled": "@entity.done",
3025
+ "icon": "plus",
2273
3026
  "label": [
2274
3027
  "str/concat",
2275
- "+ ",
3028
+ "Add ",
2276
3029
  [
2277
3030
  "str/concat",
2278
3031
  [
@@ -2301,9 +3054,11 @@
2301
3054
  },
2302
3055
  {
2303
3056
  "action": "ADD_LARGE",
3057
+ "disabled": "@entity.done",
3058
+ "icon": "plus",
2304
3059
  "label": [
2305
3060
  "str/concat",
2306
- "+ ",
3061
+ "Add ",
2307
3062
  [
2308
3063
  "str/concat",
2309
3064
  [
@@ -2330,27 +3085,90 @@
2330
3085
  "type": "button",
2331
3086
  "variant": "secondary"
2332
3087
  },
2333
- {
2334
- "action": "TOGGLE_DRIP",
2335
- "label": [
2336
- "if",
2337
- "@entity.running",
2338
- "Pause",
2339
- "Auto-dose"
2340
- ],
2341
- "type": "button",
2342
- "variant": "secondary"
2343
- },
3088
+ [
3089
+ "if",
3090
+ "@entity.running",
3091
+ {
3092
+ "action": "TOGGLE_DRIP",
3093
+ "aria-pressed": "true",
3094
+ "icon": "pause",
3095
+ "label": "Pause",
3096
+ "type": "button",
3097
+ "variant": "secondary"
3098
+ },
3099
+ {
3100
+ "action": "TOGGLE_DRIP",
3101
+ "aria-pressed": "false",
3102
+ "disabled": "@entity.done",
3103
+ "icon": "play",
3104
+ "label": "Auto-dose",
3105
+ "type": "button",
3106
+ "variant": "secondary"
3107
+ }
3108
+ ],
2344
3109
  {
2345
3110
  "action": "RESET",
3111
+ "icon": "rotate-ccw",
2346
3112
  "label": "Reset",
2347
3113
  "type": "button",
2348
3114
  "variant": "ghost"
3115
+ },
3116
+ {
3117
+ "color": "muted",
3118
+ "content": [
3119
+ "str/concat",
3120
+ "@config.quantityLabel",
3121
+ [
3122
+ "str/concat",
3123
+ " ",
3124
+ [
3125
+ "str/concat",
3126
+ [
3127
+ "str/concat",
3128
+ "",
3129
+ [
3130
+ "math/round",
3131
+ "@entity.dose",
3132
+ 2.0
3133
+ ]
3134
+ ],
3135
+ [
3136
+ "str/concat",
3137
+ " of ",
3138
+ [
3139
+ "str/concat",
3140
+ [
3141
+ "str/concat",
3142
+ "",
3143
+ "@config.capacity"
3144
+ ],
3145
+ [
3146
+ "if",
3147
+ [
3148
+ "==",
3149
+ "@config.unit",
3150
+ ""
3151
+ ],
3152
+ "",
3153
+ [
3154
+ "str/concat",
3155
+ " ",
3156
+ "@config.unit"
3157
+ ]
3158
+ ]
3159
+ ]
3160
+ ]
3161
+ ]
3162
+ ]
3163
+ ],
3164
+ "type": "typography",
3165
+ "variant": "caption"
2349
3166
  }
2350
3167
  ],
2351
3168
  "direction": "horizontal",
2352
3169
  "gap": "sm",
2353
- "type": "stack"
3170
+ "type": "stack",
3171
+ "wrap": true
2354
3172
  }
2355
3173
  ],
2356
3174
  "direction": "vertical",
@@ -2686,17 +3504,76 @@
2686
3504
  {
2687
3505
  "children": [
2688
3506
  {
2689
- "content": "@entity.title",
2690
- "type": "typography",
2691
- "variant": "h4"
3507
+ "align": "start",
3508
+ "children": [
3509
+ {
3510
+ "children": [
3511
+ {
3512
+ "content": "@entity.title",
3513
+ "type": "typography",
3514
+ "variant": "h4"
3515
+ },
3516
+ [
3517
+ "if",
3518
+ [
3519
+ "==",
3520
+ "@config.summary",
3521
+ ""
3522
+ ],
3523
+ null,
3524
+ {
3525
+ "color": "muted",
3526
+ "content": "@config.summary",
3527
+ "type": "typography",
3528
+ "variant": "body2"
3529
+ }
3530
+ ]
3531
+ ],
3532
+ "direction": "vertical",
3533
+ "gap": "xs",
3534
+ "type": "stack"
3535
+ },
3536
+ {
3537
+ "label": [
3538
+ "if",
3539
+ "@entity.done",
3540
+ "Locked",
3541
+ [
3542
+ "if",
3543
+ "@entity.running",
3544
+ "Auto-dosing",
3545
+ "Ready"
3546
+ ]
3547
+ ],
3548
+ "type": "badge",
3549
+ "variant": [
3550
+ "if",
3551
+ "@entity.done",
3552
+ "warning",
3553
+ [
3554
+ "if",
3555
+ "@entity.running",
3556
+ "primary",
3557
+ "neutral"
3558
+ ]
3559
+ ]
3560
+ }
3561
+ ],
3562
+ "direction": "horizontal",
3563
+ "gap": "md",
3564
+ "justify": "between",
3565
+ "type": "stack"
2692
3566
  },
2693
3567
  {
3568
+ "align": "center",
2694
3569
  "children": [
2695
3570
  {
2696
3571
  "action": "ADD_SMALL",
3572
+ "disabled": "@entity.done",
3573
+ "icon": "plus",
2697
3574
  "label": [
2698
3575
  "str/concat",
2699
- "+ ",
3576
+ "Add ",
2700
3577
  [
2701
3578
  "str/concat",
2702
3579
  [
@@ -2725,9 +3602,11 @@
2725
3602
  },
2726
3603
  {
2727
3604
  "action": "ADD_LARGE",
3605
+ "disabled": "@entity.done",
3606
+ "icon": "plus",
2728
3607
  "label": [
2729
3608
  "str/concat",
2730
- "+ ",
3609
+ "Add ",
2731
3610
  [
2732
3611
  "str/concat",
2733
3612
  [
@@ -2754,33 +3633,101 @@
2754
3633
  "type": "button",
2755
3634
  "variant": "secondary"
2756
3635
  },
2757
- {
2758
- "action": "TOGGLE_DRIP",
2759
- "label": [
2760
- "if",
2761
- "@entity.running",
2762
- "Pause",
2763
- "Auto-dose"
2764
- ],
2765
- "type": "button",
2766
- "variant": "secondary"
2767
- },
3636
+ [
3637
+ "if",
3638
+ "@entity.running",
3639
+ {
3640
+ "action": "TOGGLE_DRIP",
3641
+ "aria-pressed": "true",
3642
+ "icon": "pause",
3643
+ "label": "Pause",
3644
+ "type": "button",
3645
+ "variant": "secondary"
3646
+ },
3647
+ {
3648
+ "action": "TOGGLE_DRIP",
3649
+ "aria-pressed": "false",
3650
+ "disabled": "@entity.done",
3651
+ "icon": "play",
3652
+ "label": "Auto-dose",
3653
+ "type": "button",
3654
+ "variant": "secondary"
3655
+ }
3656
+ ],
2768
3657
  {
2769
3658
  "action": "RESET",
3659
+ "icon": "rotate-ccw",
2770
3660
  "label": "Reset",
2771
3661
  "type": "button",
2772
3662
  "variant": "ghost"
3663
+ },
3664
+ {
3665
+ "color": "muted",
3666
+ "content": [
3667
+ "str/concat",
3668
+ "@config.quantityLabel",
3669
+ [
3670
+ "str/concat",
3671
+ " ",
3672
+ [
3673
+ "str/concat",
3674
+ [
3675
+ "str/concat",
3676
+ "",
3677
+ [
3678
+ "math/round",
3679
+ "@entity.dose",
3680
+ 2.0
3681
+ ]
3682
+ ],
3683
+ [
3684
+ "str/concat",
3685
+ " of ",
3686
+ [
3687
+ "str/concat",
3688
+ [
3689
+ "str/concat",
3690
+ "",
3691
+ "@config.capacity"
3692
+ ],
3693
+ [
3694
+ "if",
3695
+ [
3696
+ "==",
3697
+ "@config.unit",
3698
+ ""
3699
+ ],
3700
+ "",
3701
+ [
3702
+ "str/concat",
3703
+ " ",
3704
+ "@config.unit"
3705
+ ]
3706
+ ]
3707
+ ]
3708
+ ]
3709
+ ]
3710
+ ]
3711
+ ],
3712
+ "type": "typography",
3713
+ "variant": "caption"
2773
3714
  }
2774
3715
  ],
2775
3716
  "direction": "horizontal",
2776
3717
  "gap": "sm",
2777
- "type": "stack"
3718
+ "type": "stack",
3719
+ "wrap": true
2778
3720
  },
2779
3721
  {
2780
3722
  "backgroundColor": "@config.backgroundColor",
2781
3723
  "containers": "@entity.containers",
2782
3724
  "height": "@config.height",
3725
+ "keyMap": {
3726
+ "KeyR": "RESET",
3727
+ "Space": "TOGGLE_DRIP"
3728
+ },
2783
3729
  "readouts": "@entity.readouts",
3730
+ "series": "@config.series",
2784
3731
  "traces": [
2785
3732
  {
2786
3733
  "series": [
@@ -2819,17 +3766,76 @@
2819
3766
  {
2820
3767
  "children": [
2821
3768
  {
2822
- "content": "@entity.title",
2823
- "type": "typography",
2824
- "variant": "h4"
3769
+ "align": "start",
3770
+ "children": [
3771
+ {
3772
+ "children": [
3773
+ {
3774
+ "content": "@entity.title",
3775
+ "type": "typography",
3776
+ "variant": "h4"
3777
+ },
3778
+ [
3779
+ "if",
3780
+ [
3781
+ "==",
3782
+ "@config.summary",
3783
+ ""
3784
+ ],
3785
+ null,
3786
+ {
3787
+ "color": "muted",
3788
+ "content": "@config.summary",
3789
+ "type": "typography",
3790
+ "variant": "body2"
3791
+ }
3792
+ ]
3793
+ ],
3794
+ "direction": "vertical",
3795
+ "gap": "xs",
3796
+ "type": "stack"
3797
+ },
3798
+ {
3799
+ "label": [
3800
+ "if",
3801
+ "@entity.done",
3802
+ "Locked",
3803
+ [
3804
+ "if",
3805
+ "@entity.running",
3806
+ "Auto-dosing",
3807
+ "Ready"
3808
+ ]
3809
+ ],
3810
+ "type": "badge",
3811
+ "variant": [
3812
+ "if",
3813
+ "@entity.done",
3814
+ "warning",
3815
+ [
3816
+ "if",
3817
+ "@entity.running",
3818
+ "primary",
3819
+ "neutral"
3820
+ ]
3821
+ ]
3822
+ }
3823
+ ],
3824
+ "direction": "horizontal",
3825
+ "gap": "md",
3826
+ "justify": "between",
3827
+ "type": "stack"
2825
3828
  },
2826
3829
  {
3830
+ "align": "center",
2827
3831
  "children": [
2828
3832
  {
2829
3833
  "action": "ADD_SMALL",
3834
+ "disabled": "@entity.done",
3835
+ "icon": "plus",
2830
3836
  "label": [
2831
3837
  "str/concat",
2832
- "+ ",
3838
+ "Add ",
2833
3839
  [
2834
3840
  "str/concat",
2835
3841
  [
@@ -2858,9 +3864,11 @@
2858
3864
  },
2859
3865
  {
2860
3866
  "action": "ADD_LARGE",
3867
+ "disabled": "@entity.done",
3868
+ "icon": "plus",
2861
3869
  "label": [
2862
3870
  "str/concat",
2863
- "+ ",
3871
+ "Add ",
2864
3872
  [
2865
3873
  "str/concat",
2866
3874
  [
@@ -2887,27 +3895,90 @@
2887
3895
  "type": "button",
2888
3896
  "variant": "secondary"
2889
3897
  },
2890
- {
2891
- "action": "TOGGLE_DRIP",
2892
- "label": [
2893
- "if",
2894
- "@entity.running",
2895
- "Pause",
2896
- "Auto-dose"
2897
- ],
2898
- "type": "button",
2899
- "variant": "secondary"
2900
- },
3898
+ [
3899
+ "if",
3900
+ "@entity.running",
3901
+ {
3902
+ "action": "TOGGLE_DRIP",
3903
+ "aria-pressed": "true",
3904
+ "icon": "pause",
3905
+ "label": "Pause",
3906
+ "type": "button",
3907
+ "variant": "secondary"
3908
+ },
3909
+ {
3910
+ "action": "TOGGLE_DRIP",
3911
+ "aria-pressed": "false",
3912
+ "disabled": "@entity.done",
3913
+ "icon": "play",
3914
+ "label": "Auto-dose",
3915
+ "type": "button",
3916
+ "variant": "secondary"
3917
+ }
3918
+ ],
2901
3919
  {
2902
3920
  "action": "RESET",
3921
+ "icon": "rotate-ccw",
2903
3922
  "label": "Reset",
2904
3923
  "type": "button",
2905
3924
  "variant": "ghost"
3925
+ },
3926
+ {
3927
+ "color": "muted",
3928
+ "content": [
3929
+ "str/concat",
3930
+ "@config.quantityLabel",
3931
+ [
3932
+ "str/concat",
3933
+ " ",
3934
+ [
3935
+ "str/concat",
3936
+ [
3937
+ "str/concat",
3938
+ "",
3939
+ [
3940
+ "math/round",
3941
+ "@entity.dose",
3942
+ 2.0
3943
+ ]
3944
+ ],
3945
+ [
3946
+ "str/concat",
3947
+ " of ",
3948
+ [
3949
+ "str/concat",
3950
+ [
3951
+ "str/concat",
3952
+ "",
3953
+ "@config.capacity"
3954
+ ],
3955
+ [
3956
+ "if",
3957
+ [
3958
+ "==",
3959
+ "@config.unit",
3960
+ ""
3961
+ ],
3962
+ "",
3963
+ [
3964
+ "str/concat",
3965
+ " ",
3966
+ "@config.unit"
3967
+ ]
3968
+ ]
3969
+ ]
3970
+ ]
3971
+ ]
3972
+ ]
3973
+ ],
3974
+ "type": "typography",
3975
+ "variant": "caption"
2906
3976
  }
2907
3977
  ],
2908
3978
  "direction": "horizontal",
2909
3979
  "gap": "sm",
2910
- "type": "stack"
3980
+ "type": "stack",
3981
+ "wrap": true
2911
3982
  }
2912
3983
  ],
2913
3984
  "direction": "vertical",
@@ -2988,17 +4059,76 @@
2988
4059
  {
2989
4060
  "children": [
2990
4061
  {
2991
- "content": "@entity.title",
2992
- "type": "typography",
2993
- "variant": "h4"
4062
+ "align": "start",
4063
+ "children": [
4064
+ {
4065
+ "children": [
4066
+ {
4067
+ "content": "@entity.title",
4068
+ "type": "typography",
4069
+ "variant": "h4"
4070
+ },
4071
+ [
4072
+ "if",
4073
+ [
4074
+ "==",
4075
+ "@config.summary",
4076
+ ""
4077
+ ],
4078
+ null,
4079
+ {
4080
+ "color": "muted",
4081
+ "content": "@config.summary",
4082
+ "type": "typography",
4083
+ "variant": "body2"
4084
+ }
4085
+ ]
4086
+ ],
4087
+ "direction": "vertical",
4088
+ "gap": "xs",
4089
+ "type": "stack"
4090
+ },
4091
+ {
4092
+ "label": [
4093
+ "if",
4094
+ "@entity.done",
4095
+ "Locked",
4096
+ [
4097
+ "if",
4098
+ "@entity.running",
4099
+ "Auto-dosing",
4100
+ "Ready"
4101
+ ]
4102
+ ],
4103
+ "type": "badge",
4104
+ "variant": [
4105
+ "if",
4106
+ "@entity.done",
4107
+ "warning",
4108
+ [
4109
+ "if",
4110
+ "@entity.running",
4111
+ "primary",
4112
+ "neutral"
4113
+ ]
4114
+ ]
4115
+ }
4116
+ ],
4117
+ "direction": "horizontal",
4118
+ "gap": "md",
4119
+ "justify": "between",
4120
+ "type": "stack"
2994
4121
  },
2995
4122
  {
4123
+ "align": "center",
2996
4124
  "children": [
2997
4125
  {
2998
4126
  "action": "ADD_SMALL",
4127
+ "disabled": "@entity.done",
4128
+ "icon": "plus",
2999
4129
  "label": [
3000
4130
  "str/concat",
3001
- "+ ",
4131
+ "Add ",
3002
4132
  [
3003
4133
  "str/concat",
3004
4134
  [
@@ -3027,9 +4157,11 @@
3027
4157
  },
3028
4158
  {
3029
4159
  "action": "ADD_LARGE",
4160
+ "disabled": "@entity.done",
4161
+ "icon": "plus",
3030
4162
  "label": [
3031
4163
  "str/concat",
3032
- "+ ",
4164
+ "Add ",
3033
4165
  [
3034
4166
  "str/concat",
3035
4167
  [
@@ -3056,33 +4188,101 @@
3056
4188
  "type": "button",
3057
4189
  "variant": "secondary"
3058
4190
  },
3059
- {
3060
- "action": "TOGGLE_DRIP",
3061
- "label": [
3062
- "if",
3063
- "@entity.running",
3064
- "Pause",
3065
- "Auto-dose"
3066
- ],
3067
- "type": "button",
3068
- "variant": "secondary"
3069
- },
4191
+ [
4192
+ "if",
4193
+ "@entity.running",
4194
+ {
4195
+ "action": "TOGGLE_DRIP",
4196
+ "aria-pressed": "true",
4197
+ "icon": "pause",
4198
+ "label": "Pause",
4199
+ "type": "button",
4200
+ "variant": "secondary"
4201
+ },
4202
+ {
4203
+ "action": "TOGGLE_DRIP",
4204
+ "aria-pressed": "false",
4205
+ "disabled": "@entity.done",
4206
+ "icon": "play",
4207
+ "label": "Auto-dose",
4208
+ "type": "button",
4209
+ "variant": "secondary"
4210
+ }
4211
+ ],
3070
4212
  {
3071
4213
  "action": "RESET",
4214
+ "icon": "rotate-ccw",
3072
4215
  "label": "Reset",
3073
4216
  "type": "button",
3074
4217
  "variant": "ghost"
4218
+ },
4219
+ {
4220
+ "color": "muted",
4221
+ "content": [
4222
+ "str/concat",
4223
+ "@config.quantityLabel",
4224
+ [
4225
+ "str/concat",
4226
+ " ",
4227
+ [
4228
+ "str/concat",
4229
+ [
4230
+ "str/concat",
4231
+ "",
4232
+ [
4233
+ "math/round",
4234
+ "@entity.dose",
4235
+ 2.0
4236
+ ]
4237
+ ],
4238
+ [
4239
+ "str/concat",
4240
+ " of ",
4241
+ [
4242
+ "str/concat",
4243
+ [
4244
+ "str/concat",
4245
+ "",
4246
+ "@config.capacity"
4247
+ ],
4248
+ [
4249
+ "if",
4250
+ [
4251
+ "==",
4252
+ "@config.unit",
4253
+ ""
4254
+ ],
4255
+ "",
4256
+ [
4257
+ "str/concat",
4258
+ " ",
4259
+ "@config.unit"
4260
+ ]
4261
+ ]
4262
+ ]
4263
+ ]
4264
+ ]
4265
+ ]
4266
+ ],
4267
+ "type": "typography",
4268
+ "variant": "caption"
3075
4269
  }
3076
4270
  ],
3077
4271
  "direction": "horizontal",
3078
4272
  "gap": "sm",
3079
- "type": "stack"
4273
+ "type": "stack",
4274
+ "wrap": true
3080
4275
  },
3081
4276
  {
3082
4277
  "backgroundColor": "@config.backgroundColor",
3083
4278
  "containers": "@entity.containers",
3084
4279
  "height": "@config.height",
4280
+ "keyMap": {
4281
+ "KeyR": "RESET",
4282
+ "Space": "TOGGLE_DRIP"
4283
+ },
3085
4284
  "readouts": "@entity.readouts",
4285
+ "series": "@config.series",
3086
4286
  "traces": [
3087
4287
  {
3088
4288
  "series": [
@@ -3121,17 +4321,76 @@
3121
4321
  {
3122
4322
  "children": [
3123
4323
  {
3124
- "content": "@entity.title",
3125
- "type": "typography",
3126
- "variant": "h4"
4324
+ "align": "start",
4325
+ "children": [
4326
+ {
4327
+ "children": [
4328
+ {
4329
+ "content": "@entity.title",
4330
+ "type": "typography",
4331
+ "variant": "h4"
4332
+ },
4333
+ [
4334
+ "if",
4335
+ [
4336
+ "==",
4337
+ "@config.summary",
4338
+ ""
4339
+ ],
4340
+ null,
4341
+ {
4342
+ "color": "muted",
4343
+ "content": "@config.summary",
4344
+ "type": "typography",
4345
+ "variant": "body2"
4346
+ }
4347
+ ]
4348
+ ],
4349
+ "direction": "vertical",
4350
+ "gap": "xs",
4351
+ "type": "stack"
4352
+ },
4353
+ {
4354
+ "label": [
4355
+ "if",
4356
+ "@entity.done",
4357
+ "Locked",
4358
+ [
4359
+ "if",
4360
+ "@entity.running",
4361
+ "Auto-dosing",
4362
+ "Ready"
4363
+ ]
4364
+ ],
4365
+ "type": "badge",
4366
+ "variant": [
4367
+ "if",
4368
+ "@entity.done",
4369
+ "warning",
4370
+ [
4371
+ "if",
4372
+ "@entity.running",
4373
+ "primary",
4374
+ "neutral"
4375
+ ]
4376
+ ]
4377
+ }
4378
+ ],
4379
+ "direction": "horizontal",
4380
+ "gap": "md",
4381
+ "justify": "between",
4382
+ "type": "stack"
3127
4383
  },
3128
4384
  {
4385
+ "align": "center",
3129
4386
  "children": [
3130
4387
  {
3131
4388
  "action": "ADD_SMALL",
4389
+ "disabled": "@entity.done",
4390
+ "icon": "plus",
3132
4391
  "label": [
3133
4392
  "str/concat",
3134
- "+ ",
4393
+ "Add ",
3135
4394
  [
3136
4395
  "str/concat",
3137
4396
  [
@@ -3160,9 +4419,11 @@
3160
4419
  },
3161
4420
  {
3162
4421
  "action": "ADD_LARGE",
4422
+ "disabled": "@entity.done",
4423
+ "icon": "plus",
3163
4424
  "label": [
3164
4425
  "str/concat",
3165
- "+ ",
4426
+ "Add ",
3166
4427
  [
3167
4428
  "str/concat",
3168
4429
  [
@@ -3189,27 +4450,90 @@
3189
4450
  "type": "button",
3190
4451
  "variant": "secondary"
3191
4452
  },
3192
- {
3193
- "action": "TOGGLE_DRIP",
3194
- "label": [
3195
- "if",
3196
- "@entity.running",
3197
- "Pause",
3198
- "Auto-dose"
3199
- ],
3200
- "type": "button",
3201
- "variant": "secondary"
3202
- },
4453
+ [
4454
+ "if",
4455
+ "@entity.running",
4456
+ {
4457
+ "action": "TOGGLE_DRIP",
4458
+ "aria-pressed": "true",
4459
+ "icon": "pause",
4460
+ "label": "Pause",
4461
+ "type": "button",
4462
+ "variant": "secondary"
4463
+ },
4464
+ {
4465
+ "action": "TOGGLE_DRIP",
4466
+ "aria-pressed": "false",
4467
+ "disabled": "@entity.done",
4468
+ "icon": "play",
4469
+ "label": "Auto-dose",
4470
+ "type": "button",
4471
+ "variant": "secondary"
4472
+ }
4473
+ ],
3203
4474
  {
3204
4475
  "action": "RESET",
4476
+ "icon": "rotate-ccw",
3205
4477
  "label": "Reset",
3206
4478
  "type": "button",
3207
4479
  "variant": "ghost"
4480
+ },
4481
+ {
4482
+ "color": "muted",
4483
+ "content": [
4484
+ "str/concat",
4485
+ "@config.quantityLabel",
4486
+ [
4487
+ "str/concat",
4488
+ " ",
4489
+ [
4490
+ "str/concat",
4491
+ [
4492
+ "str/concat",
4493
+ "",
4494
+ [
4495
+ "math/round",
4496
+ "@entity.dose",
4497
+ 2.0
4498
+ ]
4499
+ ],
4500
+ [
4501
+ "str/concat",
4502
+ " of ",
4503
+ [
4504
+ "str/concat",
4505
+ [
4506
+ "str/concat",
4507
+ "",
4508
+ "@config.capacity"
4509
+ ],
4510
+ [
4511
+ "if",
4512
+ [
4513
+ "==",
4514
+ "@config.unit",
4515
+ ""
4516
+ ],
4517
+ "",
4518
+ [
4519
+ "str/concat",
4520
+ " ",
4521
+ "@config.unit"
4522
+ ]
4523
+ ]
4524
+ ]
4525
+ ]
4526
+ ]
4527
+ ]
4528
+ ],
4529
+ "type": "typography",
4530
+ "variant": "caption"
3208
4531
  }
3209
4532
  ],
3210
4533
  "direction": "horizontal",
3211
4534
  "gap": "sm",
3212
- "type": "stack"
4535
+ "type": "stack",
4536
+ "wrap": true
3213
4537
  }
3214
4538
  ],
3215
4539
  "direction": "vertical",
@@ -3513,17 +4837,76 @@
3513
4837
  {
3514
4838
  "children": [
3515
4839
  {
3516
- "content": "@entity.title",
3517
- "type": "typography",
3518
- "variant": "h4"
4840
+ "align": "start",
4841
+ "children": [
4842
+ {
4843
+ "children": [
4844
+ {
4845
+ "content": "@entity.title",
4846
+ "type": "typography",
4847
+ "variant": "h4"
4848
+ },
4849
+ [
4850
+ "if",
4851
+ [
4852
+ "==",
4853
+ "@config.summary",
4854
+ ""
4855
+ ],
4856
+ null,
4857
+ {
4858
+ "color": "muted",
4859
+ "content": "@config.summary",
4860
+ "type": "typography",
4861
+ "variant": "body2"
4862
+ }
4863
+ ]
4864
+ ],
4865
+ "direction": "vertical",
4866
+ "gap": "xs",
4867
+ "type": "stack"
4868
+ },
4869
+ {
4870
+ "label": [
4871
+ "if",
4872
+ "@entity.done",
4873
+ "Locked",
4874
+ [
4875
+ "if",
4876
+ "@entity.running",
4877
+ "Auto-dosing",
4878
+ "Ready"
4879
+ ]
4880
+ ],
4881
+ "type": "badge",
4882
+ "variant": [
4883
+ "if",
4884
+ "@entity.done",
4885
+ "warning",
4886
+ [
4887
+ "if",
4888
+ "@entity.running",
4889
+ "primary",
4890
+ "neutral"
4891
+ ]
4892
+ ]
4893
+ }
4894
+ ],
4895
+ "direction": "horizontal",
4896
+ "gap": "md",
4897
+ "justify": "between",
4898
+ "type": "stack"
3519
4899
  },
3520
4900
  {
4901
+ "align": "center",
3521
4902
  "children": [
3522
4903
  {
3523
4904
  "action": "ADD_SMALL",
4905
+ "disabled": "@entity.done",
4906
+ "icon": "plus",
3524
4907
  "label": [
3525
4908
  "str/concat",
3526
- "+ ",
4909
+ "Add ",
3527
4910
  [
3528
4911
  "str/concat",
3529
4912
  [
@@ -3552,9 +4935,11 @@
3552
4935
  },
3553
4936
  {
3554
4937
  "action": "ADD_LARGE",
4938
+ "disabled": "@entity.done",
4939
+ "icon": "plus",
3555
4940
  "label": [
3556
4941
  "str/concat",
3557
- "+ ",
4942
+ "Add ",
3558
4943
  [
3559
4944
  "str/concat",
3560
4945
  [
@@ -3581,33 +4966,101 @@
3581
4966
  "type": "button",
3582
4967
  "variant": "secondary"
3583
4968
  },
3584
- {
3585
- "action": "TOGGLE_DRIP",
3586
- "label": [
3587
- "if",
3588
- "@entity.running",
3589
- "Pause",
3590
- "Auto-dose"
3591
- ],
3592
- "type": "button",
3593
- "variant": "secondary"
3594
- },
4969
+ [
4970
+ "if",
4971
+ "@entity.running",
4972
+ {
4973
+ "action": "TOGGLE_DRIP",
4974
+ "aria-pressed": "true",
4975
+ "icon": "pause",
4976
+ "label": "Pause",
4977
+ "type": "button",
4978
+ "variant": "secondary"
4979
+ },
4980
+ {
4981
+ "action": "TOGGLE_DRIP",
4982
+ "aria-pressed": "false",
4983
+ "disabled": "@entity.done",
4984
+ "icon": "play",
4985
+ "label": "Auto-dose",
4986
+ "type": "button",
4987
+ "variant": "secondary"
4988
+ }
4989
+ ],
3595
4990
  {
3596
4991
  "action": "RESET",
4992
+ "icon": "rotate-ccw",
3597
4993
  "label": "Reset",
3598
4994
  "type": "button",
3599
4995
  "variant": "ghost"
4996
+ },
4997
+ {
4998
+ "color": "muted",
4999
+ "content": [
5000
+ "str/concat",
5001
+ "@config.quantityLabel",
5002
+ [
5003
+ "str/concat",
5004
+ " ",
5005
+ [
5006
+ "str/concat",
5007
+ [
5008
+ "str/concat",
5009
+ "",
5010
+ [
5011
+ "math/round",
5012
+ "@entity.dose",
5013
+ 2.0
5014
+ ]
5015
+ ],
5016
+ [
5017
+ "str/concat",
5018
+ " of ",
5019
+ [
5020
+ "str/concat",
5021
+ [
5022
+ "str/concat",
5023
+ "",
5024
+ "@config.capacity"
5025
+ ],
5026
+ [
5027
+ "if",
5028
+ [
5029
+ "==",
5030
+ "@config.unit",
5031
+ ""
5032
+ ],
5033
+ "",
5034
+ [
5035
+ "str/concat",
5036
+ " ",
5037
+ "@config.unit"
5038
+ ]
5039
+ ]
5040
+ ]
5041
+ ]
5042
+ ]
5043
+ ]
5044
+ ],
5045
+ "type": "typography",
5046
+ "variant": "caption"
3600
5047
  }
3601
5048
  ],
3602
5049
  "direction": "horizontal",
3603
5050
  "gap": "sm",
3604
- "type": "stack"
5051
+ "type": "stack",
5052
+ "wrap": true
3605
5053
  },
3606
5054
  {
3607
5055
  "backgroundColor": "@config.backgroundColor",
3608
5056
  "containers": "@entity.containers",
3609
5057
  "height": "@config.height",
5058
+ "keyMap": {
5059
+ "KeyR": "RESET",
5060
+ "Space": "TOGGLE_DRIP"
5061
+ },
3610
5062
  "readouts": "@entity.readouts",
5063
+ "series": "@config.series",
3611
5064
  "traces": [
3612
5065
  {
3613
5066
  "series": [
@@ -3646,17 +5099,76 @@
3646
5099
  {
3647
5100
  "children": [
3648
5101
  {
3649
- "content": "@entity.title",
3650
- "type": "typography",
3651
- "variant": "h4"
5102
+ "align": "start",
5103
+ "children": [
5104
+ {
5105
+ "children": [
5106
+ {
5107
+ "content": "@entity.title",
5108
+ "type": "typography",
5109
+ "variant": "h4"
5110
+ },
5111
+ [
5112
+ "if",
5113
+ [
5114
+ "==",
5115
+ "@config.summary",
5116
+ ""
5117
+ ],
5118
+ null,
5119
+ {
5120
+ "color": "muted",
5121
+ "content": "@config.summary",
5122
+ "type": "typography",
5123
+ "variant": "body2"
5124
+ }
5125
+ ]
5126
+ ],
5127
+ "direction": "vertical",
5128
+ "gap": "xs",
5129
+ "type": "stack"
5130
+ },
5131
+ {
5132
+ "label": [
5133
+ "if",
5134
+ "@entity.done",
5135
+ "Locked",
5136
+ [
5137
+ "if",
5138
+ "@entity.running",
5139
+ "Auto-dosing",
5140
+ "Ready"
5141
+ ]
5142
+ ],
5143
+ "type": "badge",
5144
+ "variant": [
5145
+ "if",
5146
+ "@entity.done",
5147
+ "warning",
5148
+ [
5149
+ "if",
5150
+ "@entity.running",
5151
+ "primary",
5152
+ "neutral"
5153
+ ]
5154
+ ]
5155
+ }
5156
+ ],
5157
+ "direction": "horizontal",
5158
+ "gap": "md",
5159
+ "justify": "between",
5160
+ "type": "stack"
3652
5161
  },
3653
5162
  {
5163
+ "align": "center",
3654
5164
  "children": [
3655
5165
  {
3656
5166
  "action": "ADD_SMALL",
5167
+ "disabled": "@entity.done",
5168
+ "icon": "plus",
3657
5169
  "label": [
3658
5170
  "str/concat",
3659
- "+ ",
5171
+ "Add ",
3660
5172
  [
3661
5173
  "str/concat",
3662
5174
  [
@@ -3685,9 +5197,11 @@
3685
5197
  },
3686
5198
  {
3687
5199
  "action": "ADD_LARGE",
5200
+ "disabled": "@entity.done",
5201
+ "icon": "plus",
3688
5202
  "label": [
3689
5203
  "str/concat",
3690
- "+ ",
5204
+ "Add ",
3691
5205
  [
3692
5206
  "str/concat",
3693
5207
  [
@@ -3714,27 +5228,90 @@
3714
5228
  "type": "button",
3715
5229
  "variant": "secondary"
3716
5230
  },
3717
- {
3718
- "action": "TOGGLE_DRIP",
3719
- "label": [
3720
- "if",
3721
- "@entity.running",
3722
- "Pause",
3723
- "Auto-dose"
3724
- ],
3725
- "type": "button",
3726
- "variant": "secondary"
3727
- },
5231
+ [
5232
+ "if",
5233
+ "@entity.running",
5234
+ {
5235
+ "action": "TOGGLE_DRIP",
5236
+ "aria-pressed": "true",
5237
+ "icon": "pause",
5238
+ "label": "Pause",
5239
+ "type": "button",
5240
+ "variant": "secondary"
5241
+ },
5242
+ {
5243
+ "action": "TOGGLE_DRIP",
5244
+ "aria-pressed": "false",
5245
+ "disabled": "@entity.done",
5246
+ "icon": "play",
5247
+ "label": "Auto-dose",
5248
+ "type": "button",
5249
+ "variant": "secondary"
5250
+ }
5251
+ ],
3728
5252
  {
3729
5253
  "action": "RESET",
5254
+ "icon": "rotate-ccw",
3730
5255
  "label": "Reset",
3731
5256
  "type": "button",
3732
5257
  "variant": "ghost"
5258
+ },
5259
+ {
5260
+ "color": "muted",
5261
+ "content": [
5262
+ "str/concat",
5263
+ "@config.quantityLabel",
5264
+ [
5265
+ "str/concat",
5266
+ " ",
5267
+ [
5268
+ "str/concat",
5269
+ [
5270
+ "str/concat",
5271
+ "",
5272
+ [
5273
+ "math/round",
5274
+ "@entity.dose",
5275
+ 2.0
5276
+ ]
5277
+ ],
5278
+ [
5279
+ "str/concat",
5280
+ " of ",
5281
+ [
5282
+ "str/concat",
5283
+ [
5284
+ "str/concat",
5285
+ "",
5286
+ "@config.capacity"
5287
+ ],
5288
+ [
5289
+ "if",
5290
+ [
5291
+ "==",
5292
+ "@config.unit",
5293
+ ""
5294
+ ],
5295
+ "",
5296
+ [
5297
+ "str/concat",
5298
+ " ",
5299
+ "@config.unit"
5300
+ ]
5301
+ ]
5302
+ ]
5303
+ ]
5304
+ ]
5305
+ ]
5306
+ ],
5307
+ "type": "typography",
5308
+ "variant": "caption"
3733
5309
  }
3734
5310
  ],
3735
5311
  "direction": "horizontal",
3736
5312
  "gap": "sm",
3737
- "type": "stack"
5313
+ "type": "stack",
5314
+ "wrap": true
3738
5315
  }
3739
5316
  ],
3740
5317
  "direction": "vertical",