@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
@@ -82,6 +82,15 @@
82
82
  "parent": "trt_01M0C2M9G3FNPHJAAS054FS7PK",
83
83
  "renames": []
84
84
  },
85
+ "evt_01M41KEFWZBVJFXZX3V614B6S3": {
86
+ "bakedName": "SPEED_SET",
87
+ "curName": "SPEED_SET",
88
+ "id": "evt_01M41KEFWZBVJFXZX3V614B6S3",
89
+ "kind": "event",
90
+ "owner": "workspace",
91
+ "parent": "trt_01M0C2M9G3FNPHJAAS054FS7PK",
92
+ "renames": []
93
+ },
85
94
  "orb_01M0C2M9G3WP1MHJ10WMCT0BS7": {
86
95
  "bakedName": "LearnTransportOrbital",
87
96
  "curName": "LearnTransportOrbital",
@@ -147,6 +156,11 @@
147
156
  "default": false,
148
157
  "name": "done",
149
158
  "type": "boolean"
159
+ },
160
+ {
161
+ "default": 1.0,
162
+ "name": "speed",
163
+ "type": "number"
150
164
  }
151
165
  ],
152
166
  "id": "ent_01M0C2M9G3WH9K6WHNYM56MNKD",
@@ -194,12 +208,26 @@
194
208
  "tier": "domain",
195
209
  "type": "number"
196
210
  },
211
+ "summary": {
212
+ "default": "",
213
+ "description": "One line under the title saying what the learner is looking at (keep it under ~65 characters). Empty shows no line.",
214
+ "label": "Concept",
215
+ "tier": "presentation",
216
+ "type": "string"
217
+ },
197
218
  "title": {
198
219
  "default": "Learning Instrument",
199
- "description": "Title shown above the transport controls.",
220
+ "description": "The instrument's name, the header's one hero.",
200
221
  "label": "Title",
201
222
  "tier": "presentation",
202
223
  "type": "string"
224
+ },
225
+ "totalSteps": {
226
+ "default": 0.0,
227
+ "description": "When the walk has a known length, the step counter reads 'Step N of M'. 0 means open-ended.",
228
+ "label": "Total Steps",
229
+ "tier": "presentation",
230
+ "type": "int"
203
231
  }
204
232
  },
205
233
  "effectRow": [
@@ -241,6 +269,10 @@
241
269
  "kind": "set",
242
270
  "resource": "@entity.running"
243
271
  },
272
+ {
273
+ "kind": "set",
274
+ "resource": "@entity.speed"
275
+ },
244
276
  {
245
277
  "kind": "set",
246
278
  "resource": "@entity.steps"
@@ -306,6 +338,7 @@
306
338
  "active",
307
339
  "elapsedMs",
308
340
  "running",
341
+ "speed",
309
342
  "steps",
310
343
  "title"
311
344
  ],
@@ -330,7 +363,7 @@
330
363
  "name": "Initialize"
331
364
  },
332
365
  {
333
- "description": "Lab router broadcast naming the active mode; this instrument renders when the mode equals matchMode, otherwise renders null.",
366
+ "description": "Lab router broadcast naming the active mode; this instrument renders when the mode equals matchMode, and stands down (stops its clock, goes inactive) when another mode is chosen.",
334
367
  "id": "evt_01M0C2M9G4HNV8FV40D0DZFWA6",
335
368
  "key": "MODE_SELECTED",
336
369
  "name": "Mode Selected",
@@ -357,6 +390,19 @@
357
390
  "key": "RESET",
358
391
  "name": "Reset"
359
392
  },
393
+ {
394
+ "description": "The learner picked a playback speed; the clock steps that many times faster.",
395
+ "id": "evt_01M41KEFWZBVJFXZX3V614B6S3",
396
+ "key": "SPEED_SET",
397
+ "name": "Speed Set",
398
+ "payloadSchema": [
399
+ {
400
+ "name": "speed",
401
+ "type": "number"
402
+ }
403
+ ],
404
+ "tier": "presentation"
405
+ },
360
406
  {
361
407
  "description": "Fires once per domain step — from the Step button or every stepIntervalMs of running clock — with the step counter; the composed subject trait transitions on it and applies one step of the domain computation. A harmless no-op when the atom runs standalone.",
362
408
  "id": "evt_01M0C2M9G42KN0FDTE418X0G6B",
@@ -440,63 +486,269 @@
440
486
  {
441
487
  "children": [
442
488
  {
443
- "content": "@entity.title",
444
- "type": "typography",
445
- "variant": "h4"
446
- },
447
- {
489
+ "align": "start",
448
490
  "children": [
449
491
  {
450
- "action": "STEP",
451
- "label": "Step",
452
- "type": "button",
453
- "variant": "primary"
492
+ "children": [
493
+ {
494
+ "content": "@entity.title",
495
+ "type": "typography",
496
+ "variant": "h4"
497
+ },
498
+ [
499
+ "if",
500
+ [
501
+ "==",
502
+ "@config.summary",
503
+ ""
504
+ ],
505
+ null,
506
+ {
507
+ "color": "muted",
508
+ "content": "@config.summary",
509
+ "type": "typography",
510
+ "variant": "body2"
511
+ }
512
+ ]
513
+ ],
514
+ "direction": "vertical",
515
+ "gap": "xs",
516
+ "type": "stack"
454
517
  },
455
518
  {
456
- "action": "TOGGLE_RUN",
457
519
  "label": [
458
520
  "if",
521
+ "@entity.done",
522
+ "Done",
523
+ [
524
+ "if",
525
+ "@entity.running",
526
+ "Running",
527
+ "Paused"
528
+ ]
529
+ ],
530
+ "type": "badge",
531
+ "variant": [
532
+ "if",
533
+ "@entity.done",
534
+ "success",
535
+ [
536
+ "if",
537
+ "@entity.running",
538
+ "primary",
539
+ "neutral"
540
+ ]
541
+ ]
542
+ }
543
+ ],
544
+ "direction": "horizontal",
545
+ "gap": "md",
546
+ "justify": "between",
547
+ "type": "stack"
548
+ },
549
+ {
550
+ "align": "center",
551
+ "children": [
552
+ [
553
+ "if",
554
+ "@entity.running",
555
+ {
556
+ "action": "TOGGLE_RUN",
557
+ "aria-pressed": "true",
558
+ "icon": "pause",
559
+ "label": "Pause",
560
+ "type": "button",
561
+ "variant": "primary"
562
+ },
563
+ {
564
+ "action": "TOGGLE_RUN",
565
+ "aria-pressed": "false",
566
+ "disabled": "@entity.done",
567
+ "icon": "play",
568
+ "label": "Play",
569
+ "type": "button",
570
+ "variant": "primary"
571
+ }
572
+ ],
573
+ {
574
+ "action": "STEP",
575
+ "disabled": [
576
+ "or",
459
577
  "@entity.running",
460
- "Pause",
461
- "Run"
578
+ "@entity.done"
462
579
  ],
580
+ "icon": "step-forward",
581
+ "label": "Step",
463
582
  "type": "button",
464
583
  "variant": "secondary"
465
584
  },
466
585
  {
467
586
  "action": "RESET",
587
+ "icon": "rotate-ccw",
468
588
  "label": "Reset",
469
589
  "type": "button",
470
590
  "variant": "ghost"
591
+ },
592
+ {
593
+ "align": "center",
594
+ "aria-label": "Speed",
595
+ "children": [
596
+ {
597
+ "action": "SPEED_SET",
598
+ "actionPayload": {
599
+ "speed": 0.5
600
+ },
601
+ "aria-pressed": [
602
+ "if",
603
+ [
604
+ "==",
605
+ "@entity.speed",
606
+ 0.5
607
+ ],
608
+ "true",
609
+ "false"
610
+ ],
611
+ "label": "0.5×",
612
+ "size": "sm",
613
+ "type": "button",
614
+ "variant": [
615
+ "if",
616
+ [
617
+ "==",
618
+ "@entity.speed",
619
+ 0.5
620
+ ],
621
+ "secondary",
622
+ "ghost"
623
+ ]
624
+ },
625
+ {
626
+ "action": "SPEED_SET",
627
+ "actionPayload": {
628
+ "speed": 1.0
629
+ },
630
+ "aria-pressed": [
631
+ "if",
632
+ [
633
+ "==",
634
+ "@entity.speed",
635
+ 1.0
636
+ ],
637
+ "true",
638
+ "false"
639
+ ],
640
+ "label": "1×",
641
+ "size": "sm",
642
+ "type": "button",
643
+ "variant": [
644
+ "if",
645
+ [
646
+ "==",
647
+ "@entity.speed",
648
+ 1.0
649
+ ],
650
+ "secondary",
651
+ "ghost"
652
+ ]
653
+ },
654
+ {
655
+ "action": "SPEED_SET",
656
+ "actionPayload": {
657
+ "speed": 2.0
658
+ },
659
+ "aria-pressed": [
660
+ "if",
661
+ [
662
+ "==",
663
+ "@entity.speed",
664
+ 2.0
665
+ ],
666
+ "true",
667
+ "false"
668
+ ],
669
+ "label": "2×",
670
+ "size": "sm",
671
+ "type": "button",
672
+ "variant": [
673
+ "if",
674
+ [
675
+ "==",
676
+ "@entity.speed",
677
+ 2.0
678
+ ],
679
+ "secondary",
680
+ "ghost"
681
+ ]
682
+ },
683
+ {
684
+ "action": "SPEED_SET",
685
+ "actionPayload": {
686
+ "speed": 4.0
687
+ },
688
+ "aria-pressed": [
689
+ "if",
690
+ [
691
+ "==",
692
+ "@entity.speed",
693
+ 4.0
694
+ ],
695
+ "true",
696
+ "false"
697
+ ],
698
+ "label": "4×",
699
+ "size": "sm",
700
+ "type": "button",
701
+ "variant": [
702
+ "if",
703
+ [
704
+ "==",
705
+ "@entity.speed",
706
+ 4.0
707
+ ],
708
+ "secondary",
709
+ "ghost"
710
+ ]
711
+ }
712
+ ],
713
+ "direction": "horizontal",
714
+ "gap": "xs",
715
+ "role": "group",
716
+ "type": "stack"
717
+ },
718
+ {
719
+ "color": "muted",
720
+ "content": [
721
+ "if",
722
+ [
723
+ ">",
724
+ "@config.totalSteps",
725
+ 0.0
726
+ ],
727
+ [
728
+ "str/concat",
729
+ "Step ",
730
+ "@entity.steps",
731
+ " of ",
732
+ "@config.totalSteps"
733
+ ],
734
+ [
735
+ "str/concat",
736
+ "Step ",
737
+ "@entity.steps"
738
+ ]
739
+ ],
740
+ "type": "typography",
741
+ "variant": "caption"
471
742
  }
472
743
  ],
473
744
  "direction": "horizontal",
474
745
  "gap": "sm",
475
- "type": "stack"
476
- },
477
- {
478
- "content": [
479
- "str/concat",
480
- "Steps: ",
481
- "@entity.steps",
482
- [
483
- "if",
484
- "@entity.done",
485
- " — done",
486
- [
487
- "if",
488
- "@entity.running",
489
- " — auto-stepping",
490
- " — paused"
491
- ]
492
- ]
493
- ],
494
- "type": "typography",
495
- "variant": "caption"
746
+ "type": "stack",
747
+ "wrap": true
496
748
  }
497
749
  ],
498
750
  "direction": "vertical",
499
- "gap": "sm",
751
+ "gap": "md",
500
752
  "type": "stack"
501
753
  }
502
754
  ],
@@ -558,63 +810,269 @@
558
810
  {
559
811
  "children": [
560
812
  {
561
- "content": "@entity.title",
562
- "type": "typography",
563
- "variant": "h4"
564
- },
565
- {
813
+ "align": "start",
566
814
  "children": [
567
815
  {
568
- "action": "STEP",
569
- "label": "Step",
570
- "type": "button",
571
- "variant": "primary"
816
+ "children": [
817
+ {
818
+ "content": "@entity.title",
819
+ "type": "typography",
820
+ "variant": "h4"
821
+ },
822
+ [
823
+ "if",
824
+ [
825
+ "==",
826
+ "@config.summary",
827
+ ""
828
+ ],
829
+ null,
830
+ {
831
+ "color": "muted",
832
+ "content": "@config.summary",
833
+ "type": "typography",
834
+ "variant": "body2"
835
+ }
836
+ ]
837
+ ],
838
+ "direction": "vertical",
839
+ "gap": "xs",
840
+ "type": "stack"
572
841
  },
573
842
  {
574
- "action": "TOGGLE_RUN",
575
843
  "label": [
576
844
  "if",
845
+ "@entity.done",
846
+ "Done",
847
+ [
848
+ "if",
849
+ "@entity.running",
850
+ "Running",
851
+ "Paused"
852
+ ]
853
+ ],
854
+ "type": "badge",
855
+ "variant": [
856
+ "if",
857
+ "@entity.done",
858
+ "success",
859
+ [
860
+ "if",
861
+ "@entity.running",
862
+ "primary",
863
+ "neutral"
864
+ ]
865
+ ]
866
+ }
867
+ ],
868
+ "direction": "horizontal",
869
+ "gap": "md",
870
+ "justify": "between",
871
+ "type": "stack"
872
+ },
873
+ {
874
+ "align": "center",
875
+ "children": [
876
+ [
877
+ "if",
878
+ "@entity.running",
879
+ {
880
+ "action": "TOGGLE_RUN",
881
+ "aria-pressed": "true",
882
+ "icon": "pause",
883
+ "label": "Pause",
884
+ "type": "button",
885
+ "variant": "primary"
886
+ },
887
+ {
888
+ "action": "TOGGLE_RUN",
889
+ "aria-pressed": "false",
890
+ "disabled": "@entity.done",
891
+ "icon": "play",
892
+ "label": "Play",
893
+ "type": "button",
894
+ "variant": "primary"
895
+ }
896
+ ],
897
+ {
898
+ "action": "STEP",
899
+ "disabled": [
900
+ "or",
577
901
  "@entity.running",
578
- "Pause",
579
- "Run"
902
+ "@entity.done"
580
903
  ],
904
+ "icon": "step-forward",
905
+ "label": "Step",
581
906
  "type": "button",
582
907
  "variant": "secondary"
583
908
  },
584
909
  {
585
910
  "action": "RESET",
911
+ "icon": "rotate-ccw",
586
912
  "label": "Reset",
587
913
  "type": "button",
588
914
  "variant": "ghost"
915
+ },
916
+ {
917
+ "align": "center",
918
+ "aria-label": "Speed",
919
+ "children": [
920
+ {
921
+ "action": "SPEED_SET",
922
+ "actionPayload": {
923
+ "speed": 0.5
924
+ },
925
+ "aria-pressed": [
926
+ "if",
927
+ [
928
+ "==",
929
+ "@entity.speed",
930
+ 0.5
931
+ ],
932
+ "true",
933
+ "false"
934
+ ],
935
+ "label": "0.5×",
936
+ "size": "sm",
937
+ "type": "button",
938
+ "variant": [
939
+ "if",
940
+ [
941
+ "==",
942
+ "@entity.speed",
943
+ 0.5
944
+ ],
945
+ "secondary",
946
+ "ghost"
947
+ ]
948
+ },
949
+ {
950
+ "action": "SPEED_SET",
951
+ "actionPayload": {
952
+ "speed": 1.0
953
+ },
954
+ "aria-pressed": [
955
+ "if",
956
+ [
957
+ "==",
958
+ "@entity.speed",
959
+ 1.0
960
+ ],
961
+ "true",
962
+ "false"
963
+ ],
964
+ "label": "1×",
965
+ "size": "sm",
966
+ "type": "button",
967
+ "variant": [
968
+ "if",
969
+ [
970
+ "==",
971
+ "@entity.speed",
972
+ 1.0
973
+ ],
974
+ "secondary",
975
+ "ghost"
976
+ ]
977
+ },
978
+ {
979
+ "action": "SPEED_SET",
980
+ "actionPayload": {
981
+ "speed": 2.0
982
+ },
983
+ "aria-pressed": [
984
+ "if",
985
+ [
986
+ "==",
987
+ "@entity.speed",
988
+ 2.0
989
+ ],
990
+ "true",
991
+ "false"
992
+ ],
993
+ "label": "2×",
994
+ "size": "sm",
995
+ "type": "button",
996
+ "variant": [
997
+ "if",
998
+ [
999
+ "==",
1000
+ "@entity.speed",
1001
+ 2.0
1002
+ ],
1003
+ "secondary",
1004
+ "ghost"
1005
+ ]
1006
+ },
1007
+ {
1008
+ "action": "SPEED_SET",
1009
+ "actionPayload": {
1010
+ "speed": 4.0
1011
+ },
1012
+ "aria-pressed": [
1013
+ "if",
1014
+ [
1015
+ "==",
1016
+ "@entity.speed",
1017
+ 4.0
1018
+ ],
1019
+ "true",
1020
+ "false"
1021
+ ],
1022
+ "label": "4×",
1023
+ "size": "sm",
1024
+ "type": "button",
1025
+ "variant": [
1026
+ "if",
1027
+ [
1028
+ "==",
1029
+ "@entity.speed",
1030
+ 4.0
1031
+ ],
1032
+ "secondary",
1033
+ "ghost"
1034
+ ]
1035
+ }
1036
+ ],
1037
+ "direction": "horizontal",
1038
+ "gap": "xs",
1039
+ "role": "group",
1040
+ "type": "stack"
1041
+ },
1042
+ {
1043
+ "color": "muted",
1044
+ "content": [
1045
+ "if",
1046
+ [
1047
+ ">",
1048
+ "@config.totalSteps",
1049
+ 0.0
1050
+ ],
1051
+ [
1052
+ "str/concat",
1053
+ "Step ",
1054
+ "@entity.steps",
1055
+ " of ",
1056
+ "@config.totalSteps"
1057
+ ],
1058
+ [
1059
+ "str/concat",
1060
+ "Step ",
1061
+ "@entity.steps"
1062
+ ]
1063
+ ],
1064
+ "type": "typography",
1065
+ "variant": "caption"
589
1066
  }
590
1067
  ],
591
1068
  "direction": "horizontal",
592
1069
  "gap": "sm",
593
- "type": "stack"
594
- },
595
- {
596
- "content": [
597
- "str/concat",
598
- "Steps: ",
599
- "@entity.steps",
600
- [
601
- "if",
602
- "@entity.done",
603
- " — done",
604
- [
605
- "if",
606
- "@entity.running",
607
- " — auto-stepping",
608
- " — paused"
609
- ]
610
- ]
611
- ],
612
- "type": "typography",
613
- "variant": "caption"
1070
+ "type": "stack",
1071
+ "wrap": true
614
1072
  }
615
1073
  ],
616
1074
  "direction": "vertical",
617
- "gap": "sm",
1075
+ "gap": "md",
618
1076
  "type": "stack"
619
1077
  }
620
1078
  ],
@@ -641,6 +1099,48 @@
641
1099
  ],
642
1100
  "to": "idle"
643
1101
  },
1102
+ {
1103
+ "effects": [
1104
+ [
1105
+ "set",
1106
+ "@entity.active",
1107
+ false
1108
+ ],
1109
+ [
1110
+ "set",
1111
+ "@entity.running",
1112
+ false
1113
+ ],
1114
+ [
1115
+ "render-ui",
1116
+ "main",
1117
+ null
1118
+ ]
1119
+ ],
1120
+ "event": "MODE_SELECTED",
1121
+ "eventId": "evt_01M0C2M9G4HNV8FV40D0DZFWA6",
1122
+ "from": "idle",
1123
+ "guard": [
1124
+ "and",
1125
+ [
1126
+ "not",
1127
+ [
1128
+ "==",
1129
+ "@config.matchMode",
1130
+ ""
1131
+ ]
1132
+ ],
1133
+ [
1134
+ "not",
1135
+ [
1136
+ "==",
1137
+ "@payload.mode",
1138
+ "@config.matchMode"
1139
+ ]
1140
+ ]
1141
+ ],
1142
+ "to": "idle"
1143
+ },
644
1144
  {
645
1145
  "effects": [
646
1146
  [
@@ -660,63 +1160,269 @@
660
1160
  {
661
1161
  "children": [
662
1162
  {
663
- "content": "@entity.title",
664
- "type": "typography",
665
- "variant": "h4"
666
- },
667
- {
1163
+ "align": "start",
668
1164
  "children": [
669
1165
  {
670
- "action": "STEP",
671
- "label": "Step",
672
- "type": "button",
673
- "variant": "primary"
1166
+ "children": [
1167
+ {
1168
+ "content": "@entity.title",
1169
+ "type": "typography",
1170
+ "variant": "h4"
1171
+ },
1172
+ [
1173
+ "if",
1174
+ [
1175
+ "==",
1176
+ "@config.summary",
1177
+ ""
1178
+ ],
1179
+ null,
1180
+ {
1181
+ "color": "muted",
1182
+ "content": "@config.summary",
1183
+ "type": "typography",
1184
+ "variant": "body2"
1185
+ }
1186
+ ]
1187
+ ],
1188
+ "direction": "vertical",
1189
+ "gap": "xs",
1190
+ "type": "stack"
674
1191
  },
675
1192
  {
676
- "action": "TOGGLE_RUN",
677
1193
  "label": [
678
1194
  "if",
1195
+ "@entity.done",
1196
+ "Done",
1197
+ [
1198
+ "if",
1199
+ "@entity.running",
1200
+ "Running",
1201
+ "Paused"
1202
+ ]
1203
+ ],
1204
+ "type": "badge",
1205
+ "variant": [
1206
+ "if",
1207
+ "@entity.done",
1208
+ "success",
1209
+ [
1210
+ "if",
1211
+ "@entity.running",
1212
+ "primary",
1213
+ "neutral"
1214
+ ]
1215
+ ]
1216
+ }
1217
+ ],
1218
+ "direction": "horizontal",
1219
+ "gap": "md",
1220
+ "justify": "between",
1221
+ "type": "stack"
1222
+ },
1223
+ {
1224
+ "align": "center",
1225
+ "children": [
1226
+ [
1227
+ "if",
1228
+ "@entity.running",
1229
+ {
1230
+ "action": "TOGGLE_RUN",
1231
+ "aria-pressed": "true",
1232
+ "icon": "pause",
1233
+ "label": "Pause",
1234
+ "type": "button",
1235
+ "variant": "primary"
1236
+ },
1237
+ {
1238
+ "action": "TOGGLE_RUN",
1239
+ "aria-pressed": "false",
1240
+ "disabled": "@entity.done",
1241
+ "icon": "play",
1242
+ "label": "Play",
1243
+ "type": "button",
1244
+ "variant": "primary"
1245
+ }
1246
+ ],
1247
+ {
1248
+ "action": "STEP",
1249
+ "disabled": [
1250
+ "or",
679
1251
  "@entity.running",
680
- "Pause",
681
- "Run"
1252
+ "@entity.done"
682
1253
  ],
1254
+ "icon": "step-forward",
1255
+ "label": "Step",
683
1256
  "type": "button",
684
1257
  "variant": "secondary"
685
1258
  },
686
1259
  {
687
1260
  "action": "RESET",
1261
+ "icon": "rotate-ccw",
688
1262
  "label": "Reset",
689
1263
  "type": "button",
690
1264
  "variant": "ghost"
1265
+ },
1266
+ {
1267
+ "align": "center",
1268
+ "aria-label": "Speed",
1269
+ "children": [
1270
+ {
1271
+ "action": "SPEED_SET",
1272
+ "actionPayload": {
1273
+ "speed": 0.5
1274
+ },
1275
+ "aria-pressed": [
1276
+ "if",
1277
+ [
1278
+ "==",
1279
+ "@entity.speed",
1280
+ 0.5
1281
+ ],
1282
+ "true",
1283
+ "false"
1284
+ ],
1285
+ "label": "0.5×",
1286
+ "size": "sm",
1287
+ "type": "button",
1288
+ "variant": [
1289
+ "if",
1290
+ [
1291
+ "==",
1292
+ "@entity.speed",
1293
+ 0.5
1294
+ ],
1295
+ "secondary",
1296
+ "ghost"
1297
+ ]
1298
+ },
1299
+ {
1300
+ "action": "SPEED_SET",
1301
+ "actionPayload": {
1302
+ "speed": 1.0
1303
+ },
1304
+ "aria-pressed": [
1305
+ "if",
1306
+ [
1307
+ "==",
1308
+ "@entity.speed",
1309
+ 1.0
1310
+ ],
1311
+ "true",
1312
+ "false"
1313
+ ],
1314
+ "label": "1×",
1315
+ "size": "sm",
1316
+ "type": "button",
1317
+ "variant": [
1318
+ "if",
1319
+ [
1320
+ "==",
1321
+ "@entity.speed",
1322
+ 1.0
1323
+ ],
1324
+ "secondary",
1325
+ "ghost"
1326
+ ]
1327
+ },
1328
+ {
1329
+ "action": "SPEED_SET",
1330
+ "actionPayload": {
1331
+ "speed": 2.0
1332
+ },
1333
+ "aria-pressed": [
1334
+ "if",
1335
+ [
1336
+ "==",
1337
+ "@entity.speed",
1338
+ 2.0
1339
+ ],
1340
+ "true",
1341
+ "false"
1342
+ ],
1343
+ "label": "2×",
1344
+ "size": "sm",
1345
+ "type": "button",
1346
+ "variant": [
1347
+ "if",
1348
+ [
1349
+ "==",
1350
+ "@entity.speed",
1351
+ 2.0
1352
+ ],
1353
+ "secondary",
1354
+ "ghost"
1355
+ ]
1356
+ },
1357
+ {
1358
+ "action": "SPEED_SET",
1359
+ "actionPayload": {
1360
+ "speed": 4.0
1361
+ },
1362
+ "aria-pressed": [
1363
+ "if",
1364
+ [
1365
+ "==",
1366
+ "@entity.speed",
1367
+ 4.0
1368
+ ],
1369
+ "true",
1370
+ "false"
1371
+ ],
1372
+ "label": "4×",
1373
+ "size": "sm",
1374
+ "type": "button",
1375
+ "variant": [
1376
+ "if",
1377
+ [
1378
+ "==",
1379
+ "@entity.speed",
1380
+ 4.0
1381
+ ],
1382
+ "secondary",
1383
+ "ghost"
1384
+ ]
1385
+ }
1386
+ ],
1387
+ "direction": "horizontal",
1388
+ "gap": "xs",
1389
+ "role": "group",
1390
+ "type": "stack"
1391
+ },
1392
+ {
1393
+ "color": "muted",
1394
+ "content": [
1395
+ "if",
1396
+ [
1397
+ ">",
1398
+ "@config.totalSteps",
1399
+ 0.0
1400
+ ],
1401
+ [
1402
+ "str/concat",
1403
+ "Step ",
1404
+ "@entity.steps",
1405
+ " of ",
1406
+ "@config.totalSteps"
1407
+ ],
1408
+ [
1409
+ "str/concat",
1410
+ "Step ",
1411
+ "@entity.steps"
1412
+ ]
1413
+ ],
1414
+ "type": "typography",
1415
+ "variant": "caption"
691
1416
  }
692
1417
  ],
693
1418
  "direction": "horizontal",
694
1419
  "gap": "sm",
695
- "type": "stack"
696
- },
697
- {
698
- "content": [
699
- "str/concat",
700
- "Steps: ",
701
- "@entity.steps",
702
- [
703
- "if",
704
- "@entity.done",
705
- " — done",
706
- [
707
- "if",
708
- "@entity.running",
709
- " — auto-stepping",
710
- " — paused"
711
- ]
712
- ]
713
- ],
714
- "type": "typography",
715
- "variant": "caption"
1420
+ "type": "stack",
1421
+ "wrap": true
716
1422
  }
717
1423
  ],
718
1424
  "direction": "vertical",
719
- "gap": "sm",
1425
+ "gap": "md",
720
1426
  "type": "stack"
721
1427
  }
722
1428
  ],
@@ -771,63 +1477,269 @@
771
1477
  {
772
1478
  "children": [
773
1479
  {
774
- "content": "@entity.title",
775
- "type": "typography",
776
- "variant": "h4"
777
- },
778
- {
1480
+ "align": "start",
779
1481
  "children": [
780
1482
  {
781
- "action": "STEP",
782
- "label": "Step",
783
- "type": "button",
784
- "variant": "primary"
1483
+ "children": [
1484
+ {
1485
+ "content": "@entity.title",
1486
+ "type": "typography",
1487
+ "variant": "h4"
1488
+ },
1489
+ [
1490
+ "if",
1491
+ [
1492
+ "==",
1493
+ "@config.summary",
1494
+ ""
1495
+ ],
1496
+ null,
1497
+ {
1498
+ "color": "muted",
1499
+ "content": "@config.summary",
1500
+ "type": "typography",
1501
+ "variant": "body2"
1502
+ }
1503
+ ]
1504
+ ],
1505
+ "direction": "vertical",
1506
+ "gap": "xs",
1507
+ "type": "stack"
785
1508
  },
786
1509
  {
787
- "action": "TOGGLE_RUN",
788
1510
  "label": [
789
1511
  "if",
1512
+ "@entity.done",
1513
+ "Done",
1514
+ [
1515
+ "if",
1516
+ "@entity.running",
1517
+ "Running",
1518
+ "Paused"
1519
+ ]
1520
+ ],
1521
+ "type": "badge",
1522
+ "variant": [
1523
+ "if",
1524
+ "@entity.done",
1525
+ "success",
1526
+ [
1527
+ "if",
1528
+ "@entity.running",
1529
+ "primary",
1530
+ "neutral"
1531
+ ]
1532
+ ]
1533
+ }
1534
+ ],
1535
+ "direction": "horizontal",
1536
+ "gap": "md",
1537
+ "justify": "between",
1538
+ "type": "stack"
1539
+ },
1540
+ {
1541
+ "align": "center",
1542
+ "children": [
1543
+ [
1544
+ "if",
1545
+ "@entity.running",
1546
+ {
1547
+ "action": "TOGGLE_RUN",
1548
+ "aria-pressed": "true",
1549
+ "icon": "pause",
1550
+ "label": "Pause",
1551
+ "type": "button",
1552
+ "variant": "primary"
1553
+ },
1554
+ {
1555
+ "action": "TOGGLE_RUN",
1556
+ "aria-pressed": "false",
1557
+ "disabled": "@entity.done",
1558
+ "icon": "play",
1559
+ "label": "Play",
1560
+ "type": "button",
1561
+ "variant": "primary"
1562
+ }
1563
+ ],
1564
+ {
1565
+ "action": "STEP",
1566
+ "disabled": [
1567
+ "or",
790
1568
  "@entity.running",
791
- "Pause",
792
- "Run"
1569
+ "@entity.done"
793
1570
  ],
1571
+ "icon": "step-forward",
1572
+ "label": "Step",
794
1573
  "type": "button",
795
1574
  "variant": "secondary"
796
1575
  },
797
1576
  {
798
1577
  "action": "RESET",
1578
+ "icon": "rotate-ccw",
799
1579
  "label": "Reset",
800
1580
  "type": "button",
801
1581
  "variant": "ghost"
1582
+ },
1583
+ {
1584
+ "align": "center",
1585
+ "aria-label": "Speed",
1586
+ "children": [
1587
+ {
1588
+ "action": "SPEED_SET",
1589
+ "actionPayload": {
1590
+ "speed": 0.5
1591
+ },
1592
+ "aria-pressed": [
1593
+ "if",
1594
+ [
1595
+ "==",
1596
+ "@entity.speed",
1597
+ 0.5
1598
+ ],
1599
+ "true",
1600
+ "false"
1601
+ ],
1602
+ "label": "0.5×",
1603
+ "size": "sm",
1604
+ "type": "button",
1605
+ "variant": [
1606
+ "if",
1607
+ [
1608
+ "==",
1609
+ "@entity.speed",
1610
+ 0.5
1611
+ ],
1612
+ "secondary",
1613
+ "ghost"
1614
+ ]
1615
+ },
1616
+ {
1617
+ "action": "SPEED_SET",
1618
+ "actionPayload": {
1619
+ "speed": 1.0
1620
+ },
1621
+ "aria-pressed": [
1622
+ "if",
1623
+ [
1624
+ "==",
1625
+ "@entity.speed",
1626
+ 1.0
1627
+ ],
1628
+ "true",
1629
+ "false"
1630
+ ],
1631
+ "label": "1×",
1632
+ "size": "sm",
1633
+ "type": "button",
1634
+ "variant": [
1635
+ "if",
1636
+ [
1637
+ "==",
1638
+ "@entity.speed",
1639
+ 1.0
1640
+ ],
1641
+ "secondary",
1642
+ "ghost"
1643
+ ]
1644
+ },
1645
+ {
1646
+ "action": "SPEED_SET",
1647
+ "actionPayload": {
1648
+ "speed": 2.0
1649
+ },
1650
+ "aria-pressed": [
1651
+ "if",
1652
+ [
1653
+ "==",
1654
+ "@entity.speed",
1655
+ 2.0
1656
+ ],
1657
+ "true",
1658
+ "false"
1659
+ ],
1660
+ "label": "2×",
1661
+ "size": "sm",
1662
+ "type": "button",
1663
+ "variant": [
1664
+ "if",
1665
+ [
1666
+ "==",
1667
+ "@entity.speed",
1668
+ 2.0
1669
+ ],
1670
+ "secondary",
1671
+ "ghost"
1672
+ ]
1673
+ },
1674
+ {
1675
+ "action": "SPEED_SET",
1676
+ "actionPayload": {
1677
+ "speed": 4.0
1678
+ },
1679
+ "aria-pressed": [
1680
+ "if",
1681
+ [
1682
+ "==",
1683
+ "@entity.speed",
1684
+ 4.0
1685
+ ],
1686
+ "true",
1687
+ "false"
1688
+ ],
1689
+ "label": "4×",
1690
+ "size": "sm",
1691
+ "type": "button",
1692
+ "variant": [
1693
+ "if",
1694
+ [
1695
+ "==",
1696
+ "@entity.speed",
1697
+ 4.0
1698
+ ],
1699
+ "secondary",
1700
+ "ghost"
1701
+ ]
1702
+ }
1703
+ ],
1704
+ "direction": "horizontal",
1705
+ "gap": "xs",
1706
+ "role": "group",
1707
+ "type": "stack"
1708
+ },
1709
+ {
1710
+ "color": "muted",
1711
+ "content": [
1712
+ "if",
1713
+ [
1714
+ ">",
1715
+ "@config.totalSteps",
1716
+ 0.0
1717
+ ],
1718
+ [
1719
+ "str/concat",
1720
+ "Step ",
1721
+ "@entity.steps",
1722
+ " of ",
1723
+ "@config.totalSteps"
1724
+ ],
1725
+ [
1726
+ "str/concat",
1727
+ "Step ",
1728
+ "@entity.steps"
1729
+ ]
1730
+ ],
1731
+ "type": "typography",
1732
+ "variant": "caption"
802
1733
  }
803
1734
  ],
804
1735
  "direction": "horizontal",
805
1736
  "gap": "sm",
806
- "type": "stack"
807
- },
808
- {
809
- "content": [
810
- "str/concat",
811
- "Steps: ",
812
- "@entity.steps",
813
- [
814
- "if",
815
- "@entity.done",
816
- " — done",
817
- [
818
- "if",
819
- "@entity.running",
820
- " — auto-stepping",
821
- " — paused"
822
- ]
823
- ]
824
- ],
825
- "type": "typography",
826
- "variant": "caption"
1737
+ "type": "stack",
1738
+ "wrap": true
827
1739
  }
828
1740
  ],
829
1741
  "direction": "vertical",
830
- "gap": "sm",
1742
+ "gap": "md",
831
1743
  "type": "stack"
832
1744
  }
833
1745
  ],
@@ -879,63 +1791,269 @@
879
1791
  {
880
1792
  "children": [
881
1793
  {
882
- "content": "@entity.title",
883
- "type": "typography",
884
- "variant": "h4"
885
- },
886
- {
1794
+ "align": "start",
887
1795
  "children": [
888
1796
  {
889
- "action": "STEP",
890
- "label": "Step",
891
- "type": "button",
892
- "variant": "primary"
1797
+ "children": [
1798
+ {
1799
+ "content": "@entity.title",
1800
+ "type": "typography",
1801
+ "variant": "h4"
1802
+ },
1803
+ [
1804
+ "if",
1805
+ [
1806
+ "==",
1807
+ "@config.summary",
1808
+ ""
1809
+ ],
1810
+ null,
1811
+ {
1812
+ "color": "muted",
1813
+ "content": "@config.summary",
1814
+ "type": "typography",
1815
+ "variant": "body2"
1816
+ }
1817
+ ]
1818
+ ],
1819
+ "direction": "vertical",
1820
+ "gap": "xs",
1821
+ "type": "stack"
893
1822
  },
894
1823
  {
895
- "action": "TOGGLE_RUN",
896
1824
  "label": [
897
1825
  "if",
1826
+ "@entity.done",
1827
+ "Done",
1828
+ [
1829
+ "if",
1830
+ "@entity.running",
1831
+ "Running",
1832
+ "Paused"
1833
+ ]
1834
+ ],
1835
+ "type": "badge",
1836
+ "variant": [
1837
+ "if",
1838
+ "@entity.done",
1839
+ "success",
1840
+ [
1841
+ "if",
1842
+ "@entity.running",
1843
+ "primary",
1844
+ "neutral"
1845
+ ]
1846
+ ]
1847
+ }
1848
+ ],
1849
+ "direction": "horizontal",
1850
+ "gap": "md",
1851
+ "justify": "between",
1852
+ "type": "stack"
1853
+ },
1854
+ {
1855
+ "align": "center",
1856
+ "children": [
1857
+ [
1858
+ "if",
1859
+ "@entity.running",
1860
+ {
1861
+ "action": "TOGGLE_RUN",
1862
+ "aria-pressed": "true",
1863
+ "icon": "pause",
1864
+ "label": "Pause",
1865
+ "type": "button",
1866
+ "variant": "primary"
1867
+ },
1868
+ {
1869
+ "action": "TOGGLE_RUN",
1870
+ "aria-pressed": "false",
1871
+ "disabled": "@entity.done",
1872
+ "icon": "play",
1873
+ "label": "Play",
1874
+ "type": "button",
1875
+ "variant": "primary"
1876
+ }
1877
+ ],
1878
+ {
1879
+ "action": "STEP",
1880
+ "disabled": [
1881
+ "or",
898
1882
  "@entity.running",
899
- "Pause",
900
- "Run"
1883
+ "@entity.done"
901
1884
  ],
1885
+ "icon": "step-forward",
1886
+ "label": "Step",
902
1887
  "type": "button",
903
1888
  "variant": "secondary"
904
1889
  },
905
1890
  {
906
1891
  "action": "RESET",
1892
+ "icon": "rotate-ccw",
907
1893
  "label": "Reset",
908
1894
  "type": "button",
909
1895
  "variant": "ghost"
1896
+ },
1897
+ {
1898
+ "align": "center",
1899
+ "aria-label": "Speed",
1900
+ "children": [
1901
+ {
1902
+ "action": "SPEED_SET",
1903
+ "actionPayload": {
1904
+ "speed": 0.5
1905
+ },
1906
+ "aria-pressed": [
1907
+ "if",
1908
+ [
1909
+ "==",
1910
+ "@entity.speed",
1911
+ 0.5
1912
+ ],
1913
+ "true",
1914
+ "false"
1915
+ ],
1916
+ "label": "0.5×",
1917
+ "size": "sm",
1918
+ "type": "button",
1919
+ "variant": [
1920
+ "if",
1921
+ [
1922
+ "==",
1923
+ "@entity.speed",
1924
+ 0.5
1925
+ ],
1926
+ "secondary",
1927
+ "ghost"
1928
+ ]
1929
+ },
1930
+ {
1931
+ "action": "SPEED_SET",
1932
+ "actionPayload": {
1933
+ "speed": 1.0
1934
+ },
1935
+ "aria-pressed": [
1936
+ "if",
1937
+ [
1938
+ "==",
1939
+ "@entity.speed",
1940
+ 1.0
1941
+ ],
1942
+ "true",
1943
+ "false"
1944
+ ],
1945
+ "label": "1×",
1946
+ "size": "sm",
1947
+ "type": "button",
1948
+ "variant": [
1949
+ "if",
1950
+ [
1951
+ "==",
1952
+ "@entity.speed",
1953
+ 1.0
1954
+ ],
1955
+ "secondary",
1956
+ "ghost"
1957
+ ]
1958
+ },
1959
+ {
1960
+ "action": "SPEED_SET",
1961
+ "actionPayload": {
1962
+ "speed": 2.0
1963
+ },
1964
+ "aria-pressed": [
1965
+ "if",
1966
+ [
1967
+ "==",
1968
+ "@entity.speed",
1969
+ 2.0
1970
+ ],
1971
+ "true",
1972
+ "false"
1973
+ ],
1974
+ "label": "2×",
1975
+ "size": "sm",
1976
+ "type": "button",
1977
+ "variant": [
1978
+ "if",
1979
+ [
1980
+ "==",
1981
+ "@entity.speed",
1982
+ 2.0
1983
+ ],
1984
+ "secondary",
1985
+ "ghost"
1986
+ ]
1987
+ },
1988
+ {
1989
+ "action": "SPEED_SET",
1990
+ "actionPayload": {
1991
+ "speed": 4.0
1992
+ },
1993
+ "aria-pressed": [
1994
+ "if",
1995
+ [
1996
+ "==",
1997
+ "@entity.speed",
1998
+ 4.0
1999
+ ],
2000
+ "true",
2001
+ "false"
2002
+ ],
2003
+ "label": "4×",
2004
+ "size": "sm",
2005
+ "type": "button",
2006
+ "variant": [
2007
+ "if",
2008
+ [
2009
+ "==",
2010
+ "@entity.speed",
2011
+ 4.0
2012
+ ],
2013
+ "secondary",
2014
+ "ghost"
2015
+ ]
2016
+ }
2017
+ ],
2018
+ "direction": "horizontal",
2019
+ "gap": "xs",
2020
+ "role": "group",
2021
+ "type": "stack"
2022
+ },
2023
+ {
2024
+ "color": "muted",
2025
+ "content": [
2026
+ "if",
2027
+ [
2028
+ ">",
2029
+ "@config.totalSteps",
2030
+ 0.0
2031
+ ],
2032
+ [
2033
+ "str/concat",
2034
+ "Step ",
2035
+ "@entity.steps",
2036
+ " of ",
2037
+ "@config.totalSteps"
2038
+ ],
2039
+ [
2040
+ "str/concat",
2041
+ "Step ",
2042
+ "@entity.steps"
2043
+ ]
2044
+ ],
2045
+ "type": "typography",
2046
+ "variant": "caption"
910
2047
  }
911
2048
  ],
912
2049
  "direction": "horizontal",
913
2050
  "gap": "sm",
914
- "type": "stack"
915
- },
916
- {
917
- "content": [
918
- "str/concat",
919
- "Steps: ",
920
- "@entity.steps",
921
- [
922
- "if",
923
- "@entity.done",
924
- " — done",
925
- [
926
- "if",
927
- "@entity.running",
928
- " — auto-stepping",
929
- " — paused"
930
- ]
931
- ]
932
- ],
933
- "type": "typography",
934
- "variant": "caption"
2051
+ "type": "stack",
2052
+ "wrap": true
935
2053
  }
936
2054
  ],
937
2055
  "direction": "vertical",
938
- "gap": "sm",
2056
+ "gap": "md",
939
2057
  "type": "stack"
940
2058
  }
941
2059
  ],
@@ -958,6 +2076,302 @@
958
2076
  true
959
2077
  ],
960
2078
  "to": "idle"
2079
+ },
2080
+ {
2081
+ "effects": [
2082
+ [
2083
+ "set",
2084
+ "@entity.speed",
2085
+ "@payload.speed"
2086
+ ],
2087
+ [
2088
+ "render-ui",
2089
+ "main",
2090
+ {
2091
+ "children": [
2092
+ {
2093
+ "children": [
2094
+ {
2095
+ "align": "start",
2096
+ "children": [
2097
+ {
2098
+ "children": [
2099
+ {
2100
+ "content": "@entity.title",
2101
+ "type": "typography",
2102
+ "variant": "h4"
2103
+ },
2104
+ [
2105
+ "if",
2106
+ [
2107
+ "==",
2108
+ "@config.summary",
2109
+ ""
2110
+ ],
2111
+ null,
2112
+ {
2113
+ "color": "muted",
2114
+ "content": "@config.summary",
2115
+ "type": "typography",
2116
+ "variant": "body2"
2117
+ }
2118
+ ]
2119
+ ],
2120
+ "direction": "vertical",
2121
+ "gap": "xs",
2122
+ "type": "stack"
2123
+ },
2124
+ {
2125
+ "label": [
2126
+ "if",
2127
+ "@entity.done",
2128
+ "Done",
2129
+ [
2130
+ "if",
2131
+ "@entity.running",
2132
+ "Running",
2133
+ "Paused"
2134
+ ]
2135
+ ],
2136
+ "type": "badge",
2137
+ "variant": [
2138
+ "if",
2139
+ "@entity.done",
2140
+ "success",
2141
+ [
2142
+ "if",
2143
+ "@entity.running",
2144
+ "primary",
2145
+ "neutral"
2146
+ ]
2147
+ ]
2148
+ }
2149
+ ],
2150
+ "direction": "horizontal",
2151
+ "gap": "md",
2152
+ "justify": "between",
2153
+ "type": "stack"
2154
+ },
2155
+ {
2156
+ "align": "center",
2157
+ "children": [
2158
+ [
2159
+ "if",
2160
+ "@entity.running",
2161
+ {
2162
+ "action": "TOGGLE_RUN",
2163
+ "aria-pressed": "true",
2164
+ "icon": "pause",
2165
+ "label": "Pause",
2166
+ "type": "button",
2167
+ "variant": "primary"
2168
+ },
2169
+ {
2170
+ "action": "TOGGLE_RUN",
2171
+ "aria-pressed": "false",
2172
+ "disabled": "@entity.done",
2173
+ "icon": "play",
2174
+ "label": "Play",
2175
+ "type": "button",
2176
+ "variant": "primary"
2177
+ }
2178
+ ],
2179
+ {
2180
+ "action": "STEP",
2181
+ "disabled": [
2182
+ "or",
2183
+ "@entity.running",
2184
+ "@entity.done"
2185
+ ],
2186
+ "icon": "step-forward",
2187
+ "label": "Step",
2188
+ "type": "button",
2189
+ "variant": "secondary"
2190
+ },
2191
+ {
2192
+ "action": "RESET",
2193
+ "icon": "rotate-ccw",
2194
+ "label": "Reset",
2195
+ "type": "button",
2196
+ "variant": "ghost"
2197
+ },
2198
+ {
2199
+ "align": "center",
2200
+ "aria-label": "Speed",
2201
+ "children": [
2202
+ {
2203
+ "action": "SPEED_SET",
2204
+ "actionPayload": {
2205
+ "speed": 0.5
2206
+ },
2207
+ "aria-pressed": [
2208
+ "if",
2209
+ [
2210
+ "==",
2211
+ "@entity.speed",
2212
+ 0.5
2213
+ ],
2214
+ "true",
2215
+ "false"
2216
+ ],
2217
+ "label": "0.5×",
2218
+ "size": "sm",
2219
+ "type": "button",
2220
+ "variant": [
2221
+ "if",
2222
+ [
2223
+ "==",
2224
+ "@entity.speed",
2225
+ 0.5
2226
+ ],
2227
+ "secondary",
2228
+ "ghost"
2229
+ ]
2230
+ },
2231
+ {
2232
+ "action": "SPEED_SET",
2233
+ "actionPayload": {
2234
+ "speed": 1.0
2235
+ },
2236
+ "aria-pressed": [
2237
+ "if",
2238
+ [
2239
+ "==",
2240
+ "@entity.speed",
2241
+ 1.0
2242
+ ],
2243
+ "true",
2244
+ "false"
2245
+ ],
2246
+ "label": "1×",
2247
+ "size": "sm",
2248
+ "type": "button",
2249
+ "variant": [
2250
+ "if",
2251
+ [
2252
+ "==",
2253
+ "@entity.speed",
2254
+ 1.0
2255
+ ],
2256
+ "secondary",
2257
+ "ghost"
2258
+ ]
2259
+ },
2260
+ {
2261
+ "action": "SPEED_SET",
2262
+ "actionPayload": {
2263
+ "speed": 2.0
2264
+ },
2265
+ "aria-pressed": [
2266
+ "if",
2267
+ [
2268
+ "==",
2269
+ "@entity.speed",
2270
+ 2.0
2271
+ ],
2272
+ "true",
2273
+ "false"
2274
+ ],
2275
+ "label": "2×",
2276
+ "size": "sm",
2277
+ "type": "button",
2278
+ "variant": [
2279
+ "if",
2280
+ [
2281
+ "==",
2282
+ "@entity.speed",
2283
+ 2.0
2284
+ ],
2285
+ "secondary",
2286
+ "ghost"
2287
+ ]
2288
+ },
2289
+ {
2290
+ "action": "SPEED_SET",
2291
+ "actionPayload": {
2292
+ "speed": 4.0
2293
+ },
2294
+ "aria-pressed": [
2295
+ "if",
2296
+ [
2297
+ "==",
2298
+ "@entity.speed",
2299
+ 4.0
2300
+ ],
2301
+ "true",
2302
+ "false"
2303
+ ],
2304
+ "label": "4×",
2305
+ "size": "sm",
2306
+ "type": "button",
2307
+ "variant": [
2308
+ "if",
2309
+ [
2310
+ "==",
2311
+ "@entity.speed",
2312
+ 4.0
2313
+ ],
2314
+ "secondary",
2315
+ "ghost"
2316
+ ]
2317
+ }
2318
+ ],
2319
+ "direction": "horizontal",
2320
+ "gap": "xs",
2321
+ "role": "group",
2322
+ "type": "stack"
2323
+ },
2324
+ {
2325
+ "color": "muted",
2326
+ "content": [
2327
+ "if",
2328
+ [
2329
+ ">",
2330
+ "@config.totalSteps",
2331
+ 0.0
2332
+ ],
2333
+ [
2334
+ "str/concat",
2335
+ "Step ",
2336
+ "@entity.steps",
2337
+ " of ",
2338
+ "@config.totalSteps"
2339
+ ],
2340
+ [
2341
+ "str/concat",
2342
+ "Step ",
2343
+ "@entity.steps"
2344
+ ]
2345
+ ],
2346
+ "type": "typography",
2347
+ "variant": "caption"
2348
+ }
2349
+ ],
2350
+ "direction": "horizontal",
2351
+ "gap": "sm",
2352
+ "type": "stack",
2353
+ "wrap": true
2354
+ }
2355
+ ],
2356
+ "direction": "vertical",
2357
+ "gap": "md",
2358
+ "type": "stack"
2359
+ }
2360
+ ],
2361
+ "padding": "md",
2362
+ "type": "box"
2363
+ }
2364
+ ]
2365
+ ],
2366
+ "event": "SPEED_SET",
2367
+ "eventId": "evt_01M41KEFWZBVJFXZX3V614B6S3",
2368
+ "from": "idle",
2369
+ "guard": [
2370
+ "==",
2371
+ "@entity.active",
2372
+ true
2373
+ ],
2374
+ "to": "idle"
961
2375
  }
962
2376
  ]
963
2377
  },
@@ -977,7 +2391,11 @@
977
2391
  "when",
978
2392
  [
979
2393
  ">=",
980
- "@entity.elapsedMs",
2394
+ [
2395
+ "*",
2396
+ "@entity.elapsedMs",
2397
+ "@entity.speed"
2398
+ ],
981
2399
  "@config.stepIntervalMs"
982
2400
  ],
983
2401
  [