@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
@@ -41,26 +41,39 @@ orbital LearnLiveSimOrbital {
41
41
  padding: md
42
42
  children: [
43
43
  { type: stack, direction: vertical, gap: md, children: [
44
- { type: typography, variant: h4, content: @entity.title },
45
- { type: stack, direction: horizontal, gap: sm, children: [
46
- { type: button, action: RUN, label: "Run", variant: primary, disabled: (if @entity.running true false) },
47
- { type: button, action: PAUSE, label: "Pause", variant: secondary, disabled: (if @entity.running false true) },
48
- { type: button, action: RESET, label: "Reset", variant: ghost }
44
+ { type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
45
+ { type: stack, direction: vertical, gap: xs, children: [
46
+ { type: typography, variant: h4, content: @entity.title },
47
+ (if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
48
+ ] },
49
+ { type: badge, label: (if @entity.running "Running" "Paused"), variant: (if @entity.running "primary" "neutral") }
49
50
  ] },
50
- { type: stack, direction: vertical, gap: xs, children: [
51
- { type: typography, variant: caption, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
52
- { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
51
+ { type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
52
+ (if @entity.running { type: button, action: TOGGLE_RUN, label: "Pause", icon: "pause", variant: primary, aria-pressed: "true" } { type: button, action: TOGGLE_RUN, label: "Play", icon: "play", variant: primary, aria-pressed: "false" }),
53
+ { type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
54
+ { type: typography, variant: caption, color: muted, content: (str/concat "Tick " @entity.tickCount) }
53
55
  ] },
54
- { type: stack, direction: vertical, gap: xs, children: [
55
- { type: typography, variant: caption, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
56
- { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
56
+ { type: physics-canvas, keyMap: { Space: TOGGLE_RUN, KeyR: RESET }, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
57
+ { type: stack, direction: vertical, gap: sm, children: [
58
+ { type: stack, direction: vertical, gap: xs, children: [
59
+ { type: typography, variant: caption, color: muted, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
60
+ { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
61
+ ] },
62
+ { type: stack, direction: vertical, gap: xs, children: [
63
+ { type: typography, variant: caption, color: muted, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
64
+ { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
65
+ ] }
57
66
  ] },
58
- { type: physics-canvas, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
59
- { type: typography, variant: body, content: (str/concat "Tick " (str/concat "" @entity.tickCount) " · sample speed " (math/round @entity.sampleSpeed 2)) }
67
+ { type: typography, variant: body, content: (str/concat "Sample body speed " (math/round @entity.sampleSpeed 2)) }
60
68
  ] }
61
69
  ]
62
70
  })
63
71
 
72
+ MODE_SELECTED -> idle when (and (not (== @config.matchMode "")) (not (== ?mode @config.matchMode)))
73
+ (set @entity.active false)
74
+ (set @entity.running false)
75
+ (render-ui main null)
76
+
64
77
  MODE_SELECTED -> idle when (== ?mode @config.matchMode)
65
78
  (set @entity.active true)
66
79
  (set @entity.title @config.title)
@@ -75,25 +88,69 @@ orbital LearnLiveSimOrbital {
75
88
  padding: md
76
89
  children: [
77
90
  { type: stack, direction: vertical, gap: md, children: [
78
- { type: typography, variant: h4, content: @entity.title },
79
- { type: stack, direction: horizontal, gap: sm, children: [
80
- { type: button, action: RUN, label: "Run", variant: primary, disabled: (if @entity.running true false) },
81
- { type: button, action: PAUSE, label: "Pause", variant: secondary, disabled: (if @entity.running false true) },
82
- { type: button, action: RESET, label: "Reset", variant: ghost }
91
+ { type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
92
+ { type: stack, direction: vertical, gap: xs, children: [
93
+ { type: typography, variant: h4, content: @entity.title },
94
+ (if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
95
+ ] },
96
+ { type: badge, label: (if @entity.running "Running" "Paused"), variant: (if @entity.running "primary" "neutral") }
97
+ ] },
98
+ { type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
99
+ (if @entity.running { type: button, action: TOGGLE_RUN, label: "Pause", icon: "pause", variant: primary, aria-pressed: "true" } { type: button, action: TOGGLE_RUN, label: "Play", icon: "play", variant: primary, aria-pressed: "false" }),
100
+ { type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
101
+ { type: typography, variant: caption, color: muted, content: (str/concat "Tick " @entity.tickCount) }
102
+ ] },
103
+ { type: physics-canvas, keyMap: { Space: TOGGLE_RUN, KeyR: RESET }, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
104
+ { type: stack, direction: vertical, gap: sm, children: [
105
+ { type: stack, direction: vertical, gap: xs, children: [
106
+ { type: typography, variant: caption, color: muted, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
107
+ { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
108
+ ] },
109
+ { type: stack, direction: vertical, gap: xs, children: [
110
+ { type: typography, variant: caption, color: muted, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
111
+ { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
112
+ ] }
113
+ ] },
114
+ { type: typography, variant: body, content: (str/concat "Sample body speed " (math/round @entity.sampleSpeed 2)) }
115
+ ] }
116
+ ]
117
+ })
118
+
119
+ TOGGLE_RUN -> idle when (== @entity.active true)
120
+ (set @entity.running (not @entity.running))
121
+ (render-ui main {
122
+ type: box
123
+ padding: md
124
+ children: [
125
+ { type: stack, direction: vertical, gap: md, children: [
126
+ { type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
127
+ { type: stack, direction: vertical, gap: xs, children: [
128
+ { type: typography, variant: h4, content: @entity.title },
129
+ (if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
130
+ ] },
131
+ { type: badge, label: (if @entity.running "Running" "Paused"), variant: (if @entity.running "primary" "neutral") }
83
132
  ] },
84
- { type: stack, direction: vertical, gap: xs, children: [
85
- { type: typography, variant: caption, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
86
- { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
133
+ { type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
134
+ (if @entity.running { type: button, action: TOGGLE_RUN, label: "Pause", icon: "pause", variant: primary, aria-pressed: "true" } { type: button, action: TOGGLE_RUN, label: "Play", icon: "play", variant: primary, aria-pressed: "false" }),
135
+ { type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
136
+ { type: typography, variant: caption, color: muted, content: (str/concat "Tick " @entity.tickCount) }
87
137
  ] },
88
- { type: stack, direction: vertical, gap: xs, children: [
89
- { type: typography, variant: caption, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
90
- { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
138
+ { type: physics-canvas, keyMap: { Space: TOGGLE_RUN, KeyR: RESET }, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
139
+ { type: stack, direction: vertical, gap: sm, children: [
140
+ { type: stack, direction: vertical, gap: xs, children: [
141
+ { type: typography, variant: caption, color: muted, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
142
+ { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
143
+ ] },
144
+ { type: stack, direction: vertical, gap: xs, children: [
145
+ { type: typography, variant: caption, color: muted, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
146
+ { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
147
+ ] }
91
148
  ] },
92
- { type: physics-canvas, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
93
- { type: typography, variant: body, content: (str/concat "Tick " (str/concat "" @entity.tickCount) " · sample speed " (math/round @entity.sampleSpeed 2)) }
149
+ { type: typography, variant: body, content: (str/concat "Sample body speed " (math/round @entity.sampleSpeed 2)) }
94
150
  ] }
95
151
  ]
96
152
  })
153
+ (emit RUN_TOGGLED { running: @entity.running })
97
154
 
98
155
  RUN -> idle when (== @entity.active true)
99
156
  (set @entity.running true)
@@ -102,22 +159,30 @@ orbital LearnLiveSimOrbital {
102
159
  padding: md
103
160
  children: [
104
161
  { type: stack, direction: vertical, gap: md, children: [
105
- { type: typography, variant: h4, content: @entity.title },
106
- { type: stack, direction: horizontal, gap: sm, children: [
107
- { type: button, action: RUN, label: "Run", variant: primary, disabled: (if @entity.running true false) },
108
- { type: button, action: PAUSE, label: "Pause", variant: secondary, disabled: (if @entity.running false true) },
109
- { type: button, action: RESET, label: "Reset", variant: ghost }
162
+ { type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
163
+ { type: stack, direction: vertical, gap: xs, children: [
164
+ { type: typography, variant: h4, content: @entity.title },
165
+ (if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
166
+ ] },
167
+ { type: badge, label: (if @entity.running "Running" "Paused"), variant: (if @entity.running "primary" "neutral") }
110
168
  ] },
111
- { type: stack, direction: vertical, gap: xs, children: [
112
- { type: typography, variant: caption, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
113
- { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
169
+ { type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
170
+ (if @entity.running { type: button, action: TOGGLE_RUN, label: "Pause", icon: "pause", variant: primary, aria-pressed: "true" } { type: button, action: TOGGLE_RUN, label: "Play", icon: "play", variant: primary, aria-pressed: "false" }),
171
+ { type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
172
+ { type: typography, variant: caption, color: muted, content: (str/concat "Tick " @entity.tickCount) }
114
173
  ] },
115
- { type: stack, direction: vertical, gap: xs, children: [
116
- { type: typography, variant: caption, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
117
- { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
174
+ { type: physics-canvas, keyMap: { Space: TOGGLE_RUN, KeyR: RESET }, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
175
+ { type: stack, direction: vertical, gap: sm, children: [
176
+ { type: stack, direction: vertical, gap: xs, children: [
177
+ { type: typography, variant: caption, color: muted, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
178
+ { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
179
+ ] },
180
+ { type: stack, direction: vertical, gap: xs, children: [
181
+ { type: typography, variant: caption, color: muted, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
182
+ { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
183
+ ] }
118
184
  ] },
119
- { type: physics-canvas, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
120
- { type: typography, variant: body, content: (str/concat "Tick " (str/concat "" @entity.tickCount) " · sample speed " (math/round @entity.sampleSpeed 2)) }
185
+ { type: typography, variant: body, content: (str/concat "Sample body speed " (math/round @entity.sampleSpeed 2)) }
121
186
  ] }
122
187
  ]
123
188
  })
@@ -130,22 +195,30 @@ orbital LearnLiveSimOrbital {
130
195
  padding: md
131
196
  children: [
132
197
  { type: stack, direction: vertical, gap: md, children: [
133
- { type: typography, variant: h4, content: @entity.title },
134
- { type: stack, direction: horizontal, gap: sm, children: [
135
- { type: button, action: RUN, label: "Run", variant: primary, disabled: (if @entity.running true false) },
136
- { type: button, action: PAUSE, label: "Pause", variant: secondary, disabled: (if @entity.running false true) },
137
- { type: button, action: RESET, label: "Reset", variant: ghost }
198
+ { type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
199
+ { type: stack, direction: vertical, gap: xs, children: [
200
+ { type: typography, variant: h4, content: @entity.title },
201
+ (if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
202
+ ] },
203
+ { type: badge, label: (if @entity.running "Running" "Paused"), variant: (if @entity.running "primary" "neutral") }
138
204
  ] },
139
- { type: stack, direction: vertical, gap: xs, children: [
140
- { type: typography, variant: caption, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
141
- { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
205
+ { type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
206
+ (if @entity.running { type: button, action: TOGGLE_RUN, label: "Pause", icon: "pause", variant: primary, aria-pressed: "true" } { type: button, action: TOGGLE_RUN, label: "Play", icon: "play", variant: primary, aria-pressed: "false" }),
207
+ { type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
208
+ { type: typography, variant: caption, color: muted, content: (str/concat "Tick " @entity.tickCount) }
142
209
  ] },
143
- { type: stack, direction: vertical, gap: xs, children: [
144
- { type: typography, variant: caption, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
145
- { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
210
+ { type: physics-canvas, keyMap: { Space: TOGGLE_RUN, KeyR: RESET }, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
211
+ { type: stack, direction: vertical, gap: sm, children: [
212
+ { type: stack, direction: vertical, gap: xs, children: [
213
+ { type: typography, variant: caption, color: muted, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
214
+ { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
215
+ ] },
216
+ { type: stack, direction: vertical, gap: xs, children: [
217
+ { type: typography, variant: caption, color: muted, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
218
+ { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
219
+ ] }
146
220
  ] },
147
- { type: physics-canvas, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
148
- { type: typography, variant: body, content: (str/concat "Tick " (str/concat "" @entity.tickCount) " · sample speed " (math/round @entity.sampleSpeed 2)) }
221
+ { type: typography, variant: body, content: (str/concat "Sample body speed " (math/round @entity.sampleSpeed 2)) }
149
222
  ] }
150
223
  ]
151
224
  })
@@ -163,22 +236,30 @@ orbital LearnLiveSimOrbital {
163
236
  padding: md
164
237
  children: [
165
238
  { type: stack, direction: vertical, gap: md, children: [
166
- { type: typography, variant: h4, content: @entity.title },
167
- { type: stack, direction: horizontal, gap: sm, children: [
168
- { type: button, action: RUN, label: "Run", variant: primary, disabled: (if @entity.running true false) },
169
- { type: button, action: PAUSE, label: "Pause", variant: secondary, disabled: (if @entity.running false true) },
170
- { type: button, action: RESET, label: "Reset", variant: ghost }
239
+ { type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
240
+ { type: stack, direction: vertical, gap: xs, children: [
241
+ { type: typography, variant: h4, content: @entity.title },
242
+ (if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
243
+ ] },
244
+ { type: badge, label: (if @entity.running "Running" "Paused"), variant: (if @entity.running "primary" "neutral") }
171
245
  ] },
172
- { type: stack, direction: vertical, gap: xs, children: [
173
- { type: typography, variant: caption, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
174
- { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
246
+ { type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
247
+ (if @entity.running { type: button, action: TOGGLE_RUN, label: "Pause", icon: "pause", variant: primary, aria-pressed: "true" } { type: button, action: TOGGLE_RUN, label: "Play", icon: "play", variant: primary, aria-pressed: "false" }),
248
+ { type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
249
+ { type: typography, variant: caption, color: muted, content: (str/concat "Tick " @entity.tickCount) }
175
250
  ] },
176
- { type: stack, direction: vertical, gap: xs, children: [
177
- { type: typography, variant: caption, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
178
- { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
251
+ { type: physics-canvas, keyMap: { Space: TOGGLE_RUN, KeyR: RESET }, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
252
+ { type: stack, direction: vertical, gap: sm, children: [
253
+ { type: stack, direction: vertical, gap: xs, children: [
254
+ { type: typography, variant: caption, color: muted, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
255
+ { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
256
+ ] },
257
+ { type: stack, direction: vertical, gap: xs, children: [
258
+ { type: typography, variant: caption, color: muted, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
259
+ { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
260
+ ] }
179
261
  ] },
180
- { type: physics-canvas, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
181
- { type: typography, variant: body, content: (str/concat "Tick " (str/concat "" @entity.tickCount) " · sample speed " (math/round @entity.sampleSpeed 2)) }
262
+ { type: typography, variant: body, content: (str/concat "Sample body speed " (math/round @entity.sampleSpeed 2)) }
182
263
  ] }
183
264
  ]
184
265
  })
@@ -191,22 +272,30 @@ orbital LearnLiveSimOrbital {
191
272
  padding: md
192
273
  children: [
193
274
  { type: stack, direction: vertical, gap: md, children: [
194
- { type: typography, variant: h4, content: @entity.title },
195
- { type: stack, direction: horizontal, gap: sm, children: [
196
- { type: button, action: RUN, label: "Run", variant: primary, disabled: (if @entity.running true false) },
197
- { type: button, action: PAUSE, label: "Pause", variant: secondary, disabled: (if @entity.running false true) },
198
- { type: button, action: RESET, label: "Reset", variant: ghost }
275
+ { type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
276
+ { type: stack, direction: vertical, gap: xs, children: [
277
+ { type: typography, variant: h4, content: @entity.title },
278
+ (if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
279
+ ] },
280
+ { type: badge, label: (if @entity.running "Running" "Paused"), variant: (if @entity.running "primary" "neutral") }
199
281
  ] },
200
- { type: stack, direction: vertical, gap: xs, children: [
201
- { type: typography, variant: caption, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
202
- { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
282
+ { type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
283
+ (if @entity.running { type: button, action: TOGGLE_RUN, label: "Pause", icon: "pause", variant: primary, aria-pressed: "true" } { type: button, action: TOGGLE_RUN, label: "Play", icon: "play", variant: primary, aria-pressed: "false" }),
284
+ { type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
285
+ { type: typography, variant: caption, color: muted, content: (str/concat "Tick " @entity.tickCount) }
203
286
  ] },
204
- { type: stack, direction: vertical, gap: xs, children: [
205
- { type: typography, variant: caption, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
206
- { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
287
+ { type: physics-canvas, keyMap: { Space: TOGGLE_RUN, KeyR: RESET }, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
288
+ { type: stack, direction: vertical, gap: sm, children: [
289
+ { type: stack, direction: vertical, gap: xs, children: [
290
+ { type: typography, variant: caption, color: muted, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
291
+ { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
292
+ ] },
293
+ { type: stack, direction: vertical, gap: xs, children: [
294
+ { type: typography, variant: caption, color: muted, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
295
+ { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
296
+ ] }
207
297
  ] },
208
- { type: physics-canvas, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
209
- { type: typography, variant: body, content: (str/concat "Tick " (str/concat "" @entity.tickCount) " · sample speed " (math/round @entity.sampleSpeed 2)) }
298
+ { type: typography, variant: body, content: (str/concat "Sample body speed " (math/round @entity.sampleSpeed 2)) }
210
299
  ] }
211
300
  ]
212
301
  })
@@ -218,22 +307,30 @@ orbital LearnLiveSimOrbital {
218
307
  padding: md
219
308
  children: [
220
309
  { type: stack, direction: vertical, gap: md, children: [
221
- { type: typography, variant: h4, content: @entity.title },
222
- { type: stack, direction: horizontal, gap: sm, children: [
223
- { type: button, action: RUN, label: "Run", variant: primary, disabled: (if @entity.running true false) },
224
- { type: button, action: PAUSE, label: "Pause", variant: secondary, disabled: (if @entity.running false true) },
225
- { type: button, action: RESET, label: "Reset", variant: ghost }
310
+ { type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
311
+ { type: stack, direction: vertical, gap: xs, children: [
312
+ { type: typography, variant: h4, content: @entity.title },
313
+ (if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
314
+ ] },
315
+ { type: badge, label: (if @entity.running "Running" "Paused"), variant: (if @entity.running "primary" "neutral") }
226
316
  ] },
227
- { type: stack, direction: vertical, gap: xs, children: [
228
- { type: typography, variant: caption, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
229
- { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
317
+ { type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
318
+ (if @entity.running { type: button, action: TOGGLE_RUN, label: "Pause", icon: "pause", variant: primary, aria-pressed: "true" } { type: button, action: TOGGLE_RUN, label: "Play", icon: "play", variant: primary, aria-pressed: "false" }),
319
+ { type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
320
+ { type: typography, variant: caption, color: muted, content: (str/concat "Tick " @entity.tickCount) }
230
321
  ] },
231
- { type: stack, direction: vertical, gap: xs, children: [
232
- { type: typography, variant: caption, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
233
- { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
322
+ { type: physics-canvas, keyMap: { Space: TOGGLE_RUN, KeyR: RESET }, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
323
+ { type: stack, direction: vertical, gap: sm, children: [
324
+ { type: stack, direction: vertical, gap: xs, children: [
325
+ { type: typography, variant: caption, color: muted, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
326
+ { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
327
+ ] },
328
+ { type: stack, direction: vertical, gap: xs, children: [
329
+ { type: typography, variant: caption, color: muted, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
330
+ { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
331
+ ] }
234
332
  ] },
235
- { type: physics-canvas, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
236
- { type: typography, variant: body, content: (str/concat "Tick " (str/concat "" @entity.tickCount) " · sample speed " (math/round @entity.sampleSpeed 2)) }
333
+ { type: typography, variant: body, content: (str/concat "Sample body speed " (math/round @entity.sampleSpeed 2)) }
237
334
  ] }
238
335
  ]
239
336
  })
@@ -272,22 +369,30 @@ orbital LearnLiveSimOrbital {
272
369
  padding: md
273
370
  children: [
274
371
  { type: stack, direction: vertical, gap: md, children: [
275
- { type: typography, variant: h4, content: @entity.title },
276
- { type: stack, direction: horizontal, gap: sm, children: [
277
- { type: button, action: RUN, label: "Run", variant: primary, disabled: (if @entity.running true false) },
278
- { type: button, action: PAUSE, label: "Pause", variant: secondary, disabled: (if @entity.running false true) },
279
- { type: button, action: RESET, label: "Reset", variant: ghost }
372
+ { type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
373
+ { type: stack, direction: vertical, gap: xs, children: [
374
+ { type: typography, variant: h4, content: @entity.title },
375
+ (if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
376
+ ] },
377
+ { type: badge, label: (if @entity.running "Running" "Paused"), variant: (if @entity.running "primary" "neutral") }
280
378
  ] },
281
- { type: stack, direction: vertical, gap: xs, children: [
282
- { type: typography, variant: caption, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
283
- { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
379
+ { type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
380
+ (if @entity.running { type: button, action: TOGGLE_RUN, label: "Pause", icon: "pause", variant: primary, aria-pressed: "true" } { type: button, action: TOGGLE_RUN, label: "Play", icon: "play", variant: primary, aria-pressed: "false" }),
381
+ { type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
382
+ { type: typography, variant: caption, color: muted, content: (str/concat "Tick " @entity.tickCount) }
284
383
  ] },
285
- { type: stack, direction: vertical, gap: xs, children: [
286
- { type: typography, variant: caption, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
287
- { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
384
+ { type: physics-canvas, keyMap: { Space: TOGGLE_RUN, KeyR: RESET }, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
385
+ { type: stack, direction: vertical, gap: sm, children: [
386
+ { type: stack, direction: vertical, gap: xs, children: [
387
+ { type: typography, variant: caption, color: muted, content: (str/concat "Gravity: " (math/round @entity.gravity 2)) },
388
+ { type: range-slider, min: -1, max: 1.5, step: 0.05, value: @entity.gravity, showTooltip: true, action: "SET_GRAVITY" }
389
+ ] },
390
+ { type: stack, direction: vertical, gap: xs, children: [
391
+ { type: typography, variant: caption, color: muted, content: (str/concat "Damping: " (math/round @entity.damping 3)) },
392
+ { type: range-slider, min: 0.9, max: 1, step: 0.005, value: @entity.damping, showTooltip: true, action: "SET_DAMPING" }
393
+ ] }
288
394
  ] },
289
- { type: physics-canvas, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, bodies: @entity.bodies, showVelocity: @config.showVelocity, showForces: false, velocityScale: @config.velocityScale },
290
- { type: typography, variant: body, content: (str/concat "Tick " (str/concat "" @entity.tickCount) " · sample speed " (math/round @entity.sampleSpeed 2)) }
395
+ { type: typography, variant: body, content: (str/concat "Sample body speed " (math/round @entity.sampleSpeed 2)) }
291
396
  ] }
292
397
  ]
293
398
  })
@@ -299,6 +404,10 @@ orbital LearnLiveSimOrbital {
299
404
  }
300
405
  @description "Lab router broadcast naming the active mode; this instrument renders when the mode equals matchMode, otherwise renders null."
301
406
  @tier "domain"
407
+ TOGGLE_RUN {
408
+ }
409
+ @description "Learner pressed the Play/Pause toggle — flips the running flag."
410
+ @tier "domain"
302
411
  RUN {
303
412
  }
304
413
  @description "Learner pressed Run — the tick begins integrating gravity, damping, and wall bounce for every body."
@@ -345,7 +454,11 @@ orbital LearnLiveSimOrbital {
345
454
  @tier "presentation"
346
455
  title : string = "Live Sim"
347
456
  @label "Title"
348
- @description "Title shown above the instrument."
457
+ @description "The instrument's name, the header's one hero."
458
+ @tier "presentation"
459
+ summary : string = ""
460
+ @label "Concept"
461
+ @description "One line under the title saying what the learner is looking at (keep it under ~65 characters). Empty shows no line."
349
462
  @tier "presentation"
350
463
  running : boolean = false
351
464
  @label "Running"
@@ -371,8 +484,9 @@ orbital LearnLiveSimOrbital {
371
484
  @label "Height"
372
485
  @description "Simulation height in pixels; bounds the bounce."
373
486
  @tier "presentation"
374
- backgroundColor : string = "#f8fafc"
487
+ backgroundColor : string = ""
375
488
  @label "Background Color"
489
+ @description "Canvas ground override; empty uses the theme's drawing ground."
376
490
  @tier "presentation"
377
491
  showVelocity : boolean = true
378
492
  @label "Show Velocity"
@@ -383,9 +497,9 @@ orbital LearnLiveSimOrbital {
383
497
  @description "Length multiplier for the velocity arrows."
384
498
  @tier "presentation"
385
499
  bodies : [LiveSimBody] = [
386
- { id: "ball-a", x: 100, y: 60, radius: 14, color: "#2563eb", vx: 4, vy: 0 },
387
- { id: "ball-b", x: 260, y: 90, radius: 18, color: "#16a34a", vx: -3, vy: 2 },
388
- { id: "ball-c", x: 420, y: 40, radius: 11, color: "#f59e0b", vx: 2, vy: -1 }
500
+ { id: "ball-a", x: 100, y: 60, radius: 14, color: "series-1", vx: 4, vy: 0 },
501
+ { id: "ball-b", x: 260, y: 90, radius: 18, color: "series-2", vx: -3, vy: 2 },
502
+ { id: "ball-c", x: 420, y: 40, radius: 11, color: "series-3", vx: 2, vy: -1 }
389
503
  ]
390
504
  @label "Bodies"
391
505
  @description "Initial bodies; each carries position (x,y), radius, color, and velocity (vx,vy). Restored on Reset."