@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.
- package/behaviors/behaviors-registry.json +4650 -535
- package/behaviors/lolo/agent/atoms/std-agent-memory.lolo +38 -1
- package/behaviors/lolo/agent/atoms/std-agent-session.lolo +1074 -47
- package/behaviors/lolo/agent/atoms/std-agent-tool-loop.lolo +8 -7
- package/behaviors/lolo/agent/organisms/std-agent-assistant.lolo +56 -37
- package/behaviors/lolo/infra/atoms/std-page-open.lolo +59 -0
- package/behaviors/lolo/infra/atoms/std-page-search.lolo +136 -0
- package/behaviors/lolo/infra/atoms/std-page-treat.lolo +59 -0
- package/behaviors/lolo/infra/atoms/std-page-watch.lolo +88 -0
- package/behaviors/lolo/ui/core/atoms/std-book-reader.lolo +25 -1
- package/behaviors/lolo/ui/core/atoms/std-card-grid.lolo +9 -0
- package/behaviors/lolo/ui/core/atoms/std-doc-page.lolo +153 -0
- package/behaviors/lolo/ui/learning/atoms/std-learn-arrangement.lolo +124 -92
- package/behaviors/lolo/ui/learning/atoms/std-learn-classify.lolo +114 -55
- package/behaviors/lolo/ui/learning/atoms/std-learn-compare.lolo +40 -14
- package/behaviors/lolo/ui/learning/atoms/std-learn-coupled-sim.lolo +363 -123
- package/behaviors/lolo/ui/learning/atoms/std-learn-derivation.lolo +93 -48
- package/behaviors/lolo/ui/learning/atoms/std-learn-diagram.lolo +60 -28
- package/behaviors/lolo/ui/learning/atoms/std-learn-doser.lolo +193 -96
- package/behaviors/lolo/ui/learning/atoms/std-learn-estimate.lolo +75 -32
- package/behaviors/lolo/ui/learning/atoms/std-learn-goal-seek.lolo +142 -86
- package/behaviors/lolo/ui/learning/atoms/std-learn-grid-sim.lolo +266 -98
- package/behaviors/lolo/ui/learning/atoms/std-learn-hotspot.lolo +103 -65
- package/behaviors/lolo/ui/learning/atoms/std-learn-live-sim.lolo +223 -109
- package/behaviors/lolo/ui/learning/atoms/std-learn-measure.lolo +232 -64
- package/behaviors/lolo/ui/learning/atoms/std-learn-param-explorer.lolo +69 -29
- package/behaviors/lolo/ui/learning/atoms/std-learn-perturb.lolo +363 -123
- package/behaviors/lolo/ui/learning/atoms/std-learn-predict.lolo +73 -41
- package/behaviors/lolo/ui/learning/atoms/std-learn-sample-accumulator.lolo +96 -38
- package/behaviors/lolo/ui/learning/atoms/std-learn-sandbox.lolo +65 -45
- package/behaviors/lolo/ui/learning/atoms/std-learn-scatter-fit.lolo +243 -117
- package/behaviors/lolo/ui/learning/atoms/std-learn-scenario.lolo +76 -28
- package/behaviors/lolo/ui/learning/atoms/std-learn-sim-3d.lolo +228 -109
- package/behaviors/lolo/ui/learning/atoms/std-learn-speed-drill.lolo +95 -44
- package/behaviors/lolo/ui/learning/atoms/std-learn-stepper.lolo +199 -125
- package/behaviors/lolo/ui/learning/atoms/std-learn-tour-3d.lolo +92 -48
- package/behaviors/lolo/ui/learning/atoms/std-learn-trace-player.lolo +239 -78
- package/behaviors/lolo/ui/learning/atoms/std-learn-transport.lolo +147 -38
- package/behaviors/lolo/ui/learning/atoms/std-learn-tree.lolo +123 -58
- package/behaviors/lolo/ui/learning/atoms/ui-algo-graph-canvas.lolo +22 -0
- package/behaviors/lolo/ui/learning/atoms/ui-algorithm-canvas.lolo +26 -0
- package/behaviors/lolo/ui/learning/atoms/ui-biology-canvas.lolo +26 -0
- package/behaviors/lolo/ui/learning/atoms/ui-chemistry-canvas.lolo +27 -1
- package/behaviors/lolo/ui/learning/atoms/ui-learning-canvas.lolo +27 -1
- package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +29 -9
- package/behaviors/lolo/ui/learning/atoms/ui-physics-canvas.lolo +26 -0
- package/behaviors/lolo-behavior-contracts.json +1 -1
- package/behaviors/registry/agent/atoms/std-agent-memory.orb +372 -2
- package/behaviors/registry/agent/atoms/std-agent-session.orb +4752 -348
- package/behaviors/registry/agent/atoms/std-agent-tool-loop.orb +54 -42
- package/behaviors/registry/agent/organisms/std-agent-assistant.orb +356 -122
- package/behaviors/registry/factory-signatures.json +1 -1
- package/behaviors/registry/infra/atoms/std-page-open.orb +435 -0
- package/behaviors/registry/infra/atoms/std-page-search.orb +885 -0
- package/behaviors/registry/infra/atoms/std-page-treat.orb +494 -0
- package/behaviors/registry/infra/atoms/std-page-watch.orb +572 -0
- package/behaviors/registry/ui/core/atoms/std-book-reader.orb +119 -0
- package/behaviors/registry/ui/core/atoms/std-card-grid.orb +61 -0
- package/behaviors/registry/ui/core/atoms/std-doc-page.orb +594 -0
- package/behaviors/registry/ui/learning/atoms/std-learn-arrangement.orb +903 -369
- package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1002 -232
- package/behaviors/registry/ui/learning/atoms/std-learn-compare.orb +253 -74
- package/behaviors/registry/ui/learning/atoms/std-learn-coupled-sim.orb +3624 -921
- package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +685 -144
- package/behaviors/registry/ui/learning/atoms/std-learn-diagram.orb +404 -52
- package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +1787 -210
- package/behaviors/registry/ui/learning/atoms/std-learn-estimate.orb +699 -71
- package/behaviors/registry/ui/learning/atoms/std-learn-goal-seek.orb +1102 -578
- package/behaviors/registry/ui/learning/atoms/std-learn-grid-sim.orb +2760 -872
- package/behaviors/registry/ui/learning/atoms/std-learn-hotspot.orb +689 -152
- package/behaviors/registry/ui/learning/atoms/std-learn-live-sim.orb +1431 -633
- package/behaviors/registry/ui/learning/atoms/std-learn-measure.orb +2485 -512
- package/behaviors/registry/ui/learning/atoms/std-learn-param-explorer.orb +501 -197
- package/behaviors/registry/ui/learning/atoms/std-learn-perturb.orb +3642 -928
- package/behaviors/registry/ui/learning/atoms/std-learn-predict.orb +705 -125
- package/behaviors/registry/ui/learning/atoms/std-learn-sample-accumulator.orb +624 -114
- package/behaviors/registry/ui/learning/atoms/std-learn-sandbox.orb +405 -153
- package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +1911 -611
- package/behaviors/registry/ui/learning/atoms/std-learn-scenario.orb +436 -128
- package/behaviors/registry/ui/learning/atoms/std-learn-sim-3d.orb +2482 -485
- package/behaviors/registry/ui/learning/atoms/std-learn-speed-drill.orb +896 -192
- package/behaviors/registry/ui/learning/atoms/std-learn-stepper.orb +2001 -759
- package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +734 -228
- package/behaviors/registry/ui/learning/atoms/std-learn-trace-player.orb +2501 -764
- package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +1591 -173
- package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +883 -122
- package/behaviors/registry/ui/learning/atoms/ui-algo-graph-canvas.orb +176 -0
- package/behaviors/registry/ui/learning/atoms/ui-algorithm-canvas.orb +211 -0
- package/behaviors/registry/ui/learning/atoms/ui-biology-canvas.orb +211 -0
- package/behaviors/registry/ui/learning/atoms/ui-chemistry-canvas.orb +212 -1
- package/behaviors/registry/ui/learning/atoms/ui-learning-canvas.orb +212 -1
- package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +203 -9
- package/behaviors/registry/ui/learning/atoms/ui-physics-canvas.orb +211 -0
- package/behaviors/signatures.lolo +325 -655
- package/dist/behaviors/exports-reader.js +16092 -9747
- package/dist/behaviors/functions/index.d.ts +1052 -136
- package/dist/behaviors/functions/index.js +16063 -9745
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +16093 -9748
- package/dist/behaviors/query.js +16092 -9747
- package/dist/behaviors-embeddings.hash.json +3 -3
- package/dist/behaviors-embeddings.json +45 -25
- package/dist/behaviors-registry.json +4650 -535
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16093 -9748
- package/dist/knob-embeddings.hash.json +3 -3
- package/dist/knob-embeddings.json +607 -263
- package/dist/registry/factory-signatures.json +1 -1
- 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:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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:
|
|
51
|
-
{ type:
|
|
52
|
-
{ type:
|
|
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:
|
|
55
|
-
|
|
56
|
-
{ type:
|
|
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:
|
|
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:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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:
|
|
85
|
-
{ type:
|
|
86
|
-
{ type:
|
|
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:
|
|
89
|
-
|
|
90
|
-
{ type:
|
|
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:
|
|
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:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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:
|
|
112
|
-
{ type:
|
|
113
|
-
{ type:
|
|
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:
|
|
116
|
-
|
|
117
|
-
{ type:
|
|
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:
|
|
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:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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:
|
|
140
|
-
{ type:
|
|
141
|
-
{ type:
|
|
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:
|
|
144
|
-
|
|
145
|
-
{ type:
|
|
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:
|
|
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:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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:
|
|
173
|
-
{ type:
|
|
174
|
-
{ type:
|
|
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:
|
|
177
|
-
|
|
178
|
-
{ type:
|
|
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:
|
|
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:
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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:
|
|
201
|
-
{ type:
|
|
202
|
-
{ type:
|
|
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:
|
|
205
|
-
|
|
206
|
-
{ type:
|
|
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:
|
|
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:
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
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:
|
|
228
|
-
{ type:
|
|
229
|
-
{ type:
|
|
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:
|
|
232
|
-
|
|
233
|
-
{ type:
|
|
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:
|
|
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:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
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:
|
|
282
|
-
{ type:
|
|
283
|
-
{ type:
|
|
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:
|
|
286
|
-
|
|
287
|
-
{ type:
|
|
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:
|
|
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 "
|
|
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 = "
|
|
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: "
|
|
387
|
-
{ id: "ball-b", x: 260, y: 90, radius: 18, color: "
|
|
388
|
-
{ id: "ball-c", x: 420, y: 40, radius: 11, color: "
|
|
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."
|