@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
|
@@ -88,23 +88,33 @@ orbital PredictOrbital {
|
|
|
88
88
|
padding: md
|
|
89
89
|
children: [
|
|
90
90
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
91
|
-
{ type:
|
|
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.done (str/concat @entity.score " / " @entity.totalScenarios " correct") (if (== @entity.phase "commit") "Predict" (if (== @entity.phase "reveal") "Revealing" (if (== @entity.chosenIndex @entity.correctIndex) "Correct" "Incorrect")))), variant: (if @entity.done "primary" (if (== @entity.phase "judged") (if (== @entity.chosenIndex @entity.correctIndex) "success" "error") "neutral")) }
|
|
97
|
+
] },
|
|
92
98
|
{ type: progress-bar, value: (+ @entity.scenarioIndex 1), max: @entity.totalScenarios, showPercentage: false, label: (str/concat "Scenario " (str/concat "" (+ @entity.scenarioIndex 1)) " of " (str/concat "" @entity.totalScenarios)) },
|
|
93
99
|
{ type: stack, direction: vertical, gap: md, children: @entity.view },
|
|
94
|
-
{ type: stack, direction:
|
|
95
|
-
{ type: button, action: PREDICT, actionPayload: { index: @i }, label: (array/nth @entity.options @i), variant: (if (
|
|
96
|
-
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: (math/max 1 (- (array/len @entity.frames) 1)), yMin: @config.valueMin, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.revealCurves, points: [], vectors: [], shapes: [], interactive: false, animate: false },
|
|
100
|
+
{ type: stack, direction: vertical, gap: sm, children: (array/map (array/range 0 (array/len @entity.options)) (fn (i)
|
|
101
|
+
{ type: button, action: PREDICT, actionPayload: { index: @i }, label: (array/nth @entity.options @i), size: lg, disabled: (!= @entity.phase "commit"), variant: (if (== @entity.phase "commit") "secondary" (if (== @entity.phase "reveal") (if (== @entity.chosenIndex @i) "primary" "ghost") (if (== @i @entity.correctIndex) "success" (if (== @entity.chosenIndex @i) "danger" "ghost")))) })) },
|
|
102
|
+
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: (math/max 1 (- (array/len @entity.frames) 1)), yMin: @config.valueMin, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.revealCurves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { ArrowRight: NEXT, KeyR: RETRY } },
|
|
97
103
|
{ type: typography, variant: body, content: @entity.frameCaption },
|
|
98
|
-
{ type: typography, variant:
|
|
99
|
-
{ type: stack, direction: horizontal, gap: sm, children: [
|
|
100
|
-
{ type: button, action: NEXT, label: @config.nextLabel, variant: primary, disabled: (if (and (== @entity.phase "judged") (== @entity.done false)) false true) },
|
|
101
|
-
{ type: button, action: RETRY, label: @config.retryLabel, variant: ghost, disabled: (if @entity.done false true) }
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
{ type: typography, variant: body, content: @entity.feedback },
|
|
105
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
106
|
+
{ type: button, action: NEXT, label: @config.nextLabel, icon: "chevron-right", variant: primary, disabled: (if (and (== @entity.phase "judged") (== @entity.done false)) false true) },
|
|
107
|
+
{ type: button, action: RETRY, label: @config.retryLabel, icon: "rotate-ccw", variant: ghost, disabled: (if @entity.done false true) },
|
|
108
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Correct " @entity.score " of " @entity.totalScenarios) }
|
|
109
|
+
] }
|
|
104
110
|
] }
|
|
105
111
|
]
|
|
106
112
|
})
|
|
107
113
|
|
|
114
|
+
MODE_SELECTED -> idle when (and (not (== @config.matchMode "")) (not (== ?mode @config.matchMode)))
|
|
115
|
+
(set @entity.active false)
|
|
116
|
+
(render-ui main null)
|
|
117
|
+
|
|
108
118
|
MODE_SELECTED -> idle when (== ?mode @config.matchMode)
|
|
109
119
|
(let (
|
|
110
120
|
(first (array/nth @config.scenarios 0))
|
|
@@ -141,19 +151,25 @@ orbital PredictOrbital {
|
|
|
141
151
|
padding: md
|
|
142
152
|
children: [
|
|
143
153
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
144
|
-
{ type:
|
|
154
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
155
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
156
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
157
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
158
|
+
] },
|
|
159
|
+
{ type: badge, label: (if @entity.done (str/concat @entity.score " / " @entity.totalScenarios " correct") (if (== @entity.phase "commit") "Predict" (if (== @entity.phase "reveal") "Revealing" (if (== @entity.chosenIndex @entity.correctIndex) "Correct" "Incorrect")))), variant: (if @entity.done "primary" (if (== @entity.phase "judged") (if (== @entity.chosenIndex @entity.correctIndex) "success" "error") "neutral")) }
|
|
160
|
+
] },
|
|
145
161
|
{ type: progress-bar, value: (+ @entity.scenarioIndex 1), max: @entity.totalScenarios, showPercentage: false, label: (str/concat "Scenario " (str/concat "" (+ @entity.scenarioIndex 1)) " of " (str/concat "" @entity.totalScenarios)) },
|
|
146
162
|
{ type: stack, direction: vertical, gap: md, children: @entity.view },
|
|
147
|
-
{ type: stack, direction:
|
|
148
|
-
{ type: button, action: PREDICT, actionPayload: { index: @i }, label: (array/nth @entity.options @i), variant: (if (
|
|
149
|
-
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: (math/max 1 (- (array/len @entity.frames) 1)), yMin: @config.valueMin, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.revealCurves, points: [], vectors: [], shapes: [], interactive: false, animate: false },
|
|
163
|
+
{ type: stack, direction: vertical, gap: sm, children: (array/map (array/range 0 (array/len @entity.options)) (fn (i)
|
|
164
|
+
{ type: button, action: PREDICT, actionPayload: { index: @i }, label: (array/nth @entity.options @i), size: lg, disabled: (!= @entity.phase "commit"), variant: (if (== @entity.phase "commit") "secondary" (if (== @entity.phase "reveal") (if (== @entity.chosenIndex @i) "primary" "ghost") (if (== @i @entity.correctIndex) "success" (if (== @entity.chosenIndex @i) "danger" "ghost")))) })) },
|
|
165
|
+
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: (math/max 1 (- (array/len @entity.frames) 1)), yMin: @config.valueMin, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.revealCurves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { ArrowRight: NEXT, KeyR: RETRY } },
|
|
150
166
|
{ type: typography, variant: body, content: @entity.frameCaption },
|
|
151
|
-
{ type: typography, variant:
|
|
152
|
-
{ type: stack, direction: horizontal, gap: sm, children: [
|
|
153
|
-
{ type: button, action: NEXT, label: @config.nextLabel, variant: primary, disabled: (if (and (== @entity.phase "judged") (== @entity.done false)) false true) },
|
|
154
|
-
{ type: button, action: RETRY, label: @config.retryLabel, variant: ghost, disabled: (if @entity.done false true) }
|
|
155
|
-
|
|
156
|
-
|
|
167
|
+
{ type: typography, variant: body, content: @entity.feedback },
|
|
168
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
169
|
+
{ type: button, action: NEXT, label: @config.nextLabel, icon: "chevron-right", variant: primary, disabled: (if (and (== @entity.phase "judged") (== @entity.done false)) false true) },
|
|
170
|
+
{ type: button, action: RETRY, label: @config.retryLabel, icon: "rotate-ccw", variant: ghost, disabled: (if @entity.done false true) },
|
|
171
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Correct " @entity.score " of " @entity.totalScenarios) }
|
|
172
|
+
] }
|
|
157
173
|
] }
|
|
158
174
|
]
|
|
159
175
|
})
|
|
@@ -214,19 +230,25 @@ orbital PredictOrbital {
|
|
|
214
230
|
padding: md
|
|
215
231
|
children: [
|
|
216
232
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
217
|
-
{ type:
|
|
233
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
234
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
235
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
236
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
237
|
+
] },
|
|
238
|
+
{ type: badge, label: (if @entity.done (str/concat @entity.score " / " @entity.totalScenarios " correct") (if (== @entity.phase "commit") "Predict" (if (== @entity.phase "reveal") "Revealing" (if (== @entity.chosenIndex @entity.correctIndex) "Correct" "Incorrect")))), variant: (if @entity.done "primary" (if (== @entity.phase "judged") (if (== @entity.chosenIndex @entity.correctIndex) "success" "error") "neutral")) }
|
|
239
|
+
] },
|
|
218
240
|
{ type: progress-bar, value: (+ @entity.scenarioIndex 1), max: @entity.totalScenarios, showPercentage: false, label: (str/concat "Scenario " (str/concat "" (+ @entity.scenarioIndex 1)) " of " (str/concat "" @entity.totalScenarios)) },
|
|
219
241
|
{ type: stack, direction: vertical, gap: md, children: @entity.view },
|
|
220
|
-
{ type: stack, direction:
|
|
221
|
-
{ type: button, action: PREDICT, actionPayload: { index: @i }, label: (array/nth @entity.options @i), variant: (if (
|
|
222
|
-
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: (math/max 1 (- (array/len @entity.frames) 1)), yMin: @config.valueMin, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.revealCurves, points: [], vectors: [], shapes: [], interactive: false, animate: false },
|
|
242
|
+
{ type: stack, direction: vertical, gap: sm, children: (array/map (array/range 0 (array/len @entity.options)) (fn (i)
|
|
243
|
+
{ type: button, action: PREDICT, actionPayload: { index: @i }, label: (array/nth @entity.options @i), size: lg, disabled: (!= @entity.phase "commit"), variant: (if (== @entity.phase "commit") "secondary" (if (== @entity.phase "reveal") (if (== @entity.chosenIndex @i) "primary" "ghost") (if (== @i @entity.correctIndex) "success" (if (== @entity.chosenIndex @i) "danger" "ghost")))) })) },
|
|
244
|
+
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: (math/max 1 (- (array/len @entity.frames) 1)), yMin: @config.valueMin, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.revealCurves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { ArrowRight: NEXT, KeyR: RETRY } },
|
|
223
245
|
{ type: typography, variant: body, content: @entity.frameCaption },
|
|
224
|
-
{ type: typography, variant:
|
|
225
|
-
{ type: stack, direction: horizontal, gap: sm, children: [
|
|
226
|
-
{ type: button, action: NEXT, label: @config.nextLabel, variant: primary, disabled: (if (and (== @entity.phase "judged") (== @entity.done false)) false true) },
|
|
227
|
-
{ type: button, action: RETRY, label: @config.retryLabel, variant: ghost, disabled: (if @entity.done false true) }
|
|
228
|
-
|
|
229
|
-
|
|
246
|
+
{ type: typography, variant: body, content: @entity.feedback },
|
|
247
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
248
|
+
{ type: button, action: NEXT, label: @config.nextLabel, icon: "chevron-right", variant: primary, disabled: (if (and (== @entity.phase "judged") (== @entity.done false)) false true) },
|
|
249
|
+
{ type: button, action: RETRY, label: @config.retryLabel, icon: "rotate-ccw", variant: ghost, disabled: (if @entity.done false true) },
|
|
250
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Correct " @entity.score " of " @entity.totalScenarios) }
|
|
251
|
+
] }
|
|
230
252
|
] }
|
|
231
253
|
]
|
|
232
254
|
})
|
|
@@ -265,19 +287,25 @@ orbital PredictOrbital {
|
|
|
265
287
|
padding: md
|
|
266
288
|
children: [
|
|
267
289
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
268
|
-
{ type:
|
|
290
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
291
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
292
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
293
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
294
|
+
] },
|
|
295
|
+
{ type: badge, label: (if @entity.done (str/concat @entity.score " / " @entity.totalScenarios " correct") (if (== @entity.phase "commit") "Predict" (if (== @entity.phase "reveal") "Revealing" (if (== @entity.chosenIndex @entity.correctIndex) "Correct" "Incorrect")))), variant: (if @entity.done "primary" (if (== @entity.phase "judged") (if (== @entity.chosenIndex @entity.correctIndex) "success" "error") "neutral")) }
|
|
296
|
+
] },
|
|
269
297
|
{ type: progress-bar, value: (+ @entity.scenarioIndex 1), max: @entity.totalScenarios, showPercentage: false, label: (str/concat "Scenario " (str/concat "" (+ @entity.scenarioIndex 1)) " of " (str/concat "" @entity.totalScenarios)) },
|
|
270
298
|
{ type: stack, direction: vertical, gap: md, children: @entity.view },
|
|
271
|
-
{ type: stack, direction:
|
|
272
|
-
{ type: button, action: PREDICT, actionPayload: { index: @i }, label: (array/nth @entity.options @i), variant: (if (
|
|
273
|
-
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: (math/max 1 (- (array/len @entity.frames) 1)), yMin: @config.valueMin, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.revealCurves, points: [], vectors: [], shapes: [], interactive: false, animate: false },
|
|
299
|
+
{ type: stack, direction: vertical, gap: sm, children: (array/map (array/range 0 (array/len @entity.options)) (fn (i)
|
|
300
|
+
{ type: button, action: PREDICT, actionPayload: { index: @i }, label: (array/nth @entity.options @i), size: lg, disabled: (!= @entity.phase "commit"), variant: (if (== @entity.phase "commit") "secondary" (if (== @entity.phase "reveal") (if (== @entity.chosenIndex @i) "primary" "ghost") (if (== @i @entity.correctIndex) "success" (if (== @entity.chosenIndex @i) "danger" "ghost")))) })) },
|
|
301
|
+
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: (math/max 1 (- (array/len @entity.frames) 1)), yMin: @config.valueMin, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.revealCurves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { ArrowRight: NEXT, KeyR: RETRY } },
|
|
274
302
|
{ type: typography, variant: body, content: @entity.frameCaption },
|
|
275
|
-
{ type: typography, variant:
|
|
276
|
-
{ type: stack, direction: horizontal, gap: sm, children: [
|
|
277
|
-
{ type: button, action: NEXT, label: @config.nextLabel, variant: primary, disabled: (if (and (== @entity.phase "judged") (== @entity.done false)) false true) },
|
|
278
|
-
{ type: button, action: RETRY, label: @config.retryLabel, variant: ghost, disabled: (if @entity.done false true) }
|
|
279
|
-
|
|
280
|
-
|
|
303
|
+
{ type: typography, variant: body, content: @entity.feedback },
|
|
304
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
305
|
+
{ type: button, action: NEXT, label: @config.nextLabel, icon: "chevron-right", variant: primary, disabled: (if (and (== @entity.phase "judged") (== @entity.done false)) false true) },
|
|
306
|
+
{ type: button, action: RETRY, label: @config.retryLabel, icon: "rotate-ccw", variant: ghost, disabled: (if @entity.done false true) },
|
|
307
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Correct " @entity.score " of " @entity.totalScenarios) }
|
|
308
|
+
] }
|
|
281
309
|
] }
|
|
282
310
|
]
|
|
283
311
|
})
|
|
@@ -360,6 +388,10 @@ orbital PredictOrbital {
|
|
|
360
388
|
@label "Title"
|
|
361
389
|
@description "Title shown above the instrument."
|
|
362
390
|
@tier "presentation"
|
|
391
|
+
summary : string = ""
|
|
392
|
+
@label "Concept"
|
|
393
|
+
@description "One line under the title saying what is being predicted (keep it under ~65 characters). Empty shows no line."
|
|
394
|
+
@tier "presentation"
|
|
363
395
|
scenarios : [PredictScenario] = [
|
|
364
396
|
{ setup: "A small island hosts 40 rabbits with unlimited grass and no predators.", question: "What happens to the population over the next six seasons?", options: ["It levels off", "It keeps accelerating", "It collapses"], correctIndex: 1, explanation: "With no limiting factor yet, growth compounds each season.", frames: [
|
|
365
397
|
{ caption: "Season 1: 40 rabbits", value: 40 },
|
|
@@ -394,7 +426,7 @@ orbital PredictOrbital {
|
|
|
394
426
|
revealLabel : string = "Outcome"
|
|
395
427
|
@label "Reveal Label"
|
|
396
428
|
@tier "presentation"
|
|
397
|
-
revealColor : string = "
|
|
429
|
+
revealColor : string = "series-1"
|
|
398
430
|
@label "Reveal Color"
|
|
399
431
|
@tier "presentation"
|
|
400
432
|
nextLabel : string = "Next"
|
|
@@ -27,6 +27,11 @@ orbital SampleAccumulatorOrbital {
|
|
|
27
27
|
fill : string
|
|
28
28
|
lineWidth : number
|
|
29
29
|
opacity : number
|
|
30
|
+
tone : string
|
|
31
|
+
fillTone : string
|
|
32
|
+
stroke : string
|
|
33
|
+
textSize : string
|
|
34
|
+
fillStyle : string
|
|
30
35
|
}
|
|
31
36
|
type SampleAccShapePoint = {
|
|
32
37
|
x : number!
|
|
@@ -65,19 +70,32 @@ orbital SampleAccumulatorOrbital {
|
|
|
65
70
|
padding: md
|
|
66
71
|
children: [
|
|
67
72
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
68
|
-
{ type:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
74
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
75
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
76
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
77
|
+
] },
|
|
78
|
+
{ type: badge, label: (if (> @entity.sampleCount 0) (str/concat @entity.sampleCount " samples") "No samples"), variant: (if (> @entity.sampleCount 0) "primary" "neutral") }
|
|
79
|
+
] },
|
|
80
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
81
|
+
{ type: button, action: DRAW, label: "Draw", icon: "plus", variant: primary },
|
|
82
|
+
{ type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
|
|
83
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Batch of " @entity.batchSize) }
|
|
84
|
+
] },
|
|
85
|
+
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: 1, yMin: 0, yMax: 1, showAxes: false, showGrid: false, gridStep: 0.1, curves: [], points: [], vectors: [], shapes: @entity.shapes, interactive: false, animate: false, keyMap: { Space: DRAW, KeyR: RESET } },
|
|
86
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
87
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Batch size: " @entity.batchSize) },
|
|
88
|
+
{ type: range-slider, min: 1, max: 200, step: 1, value: @entity.batchSize, showTooltip: true, action: "SET_BATCH_SIZE" }
|
|
72
89
|
] },
|
|
73
|
-
{ type: typography, variant: caption, content: (str/concat "Batch size: " @entity.batchSize) },
|
|
74
|
-
{ type: range-slider, min: 1, max: 200, step: 1, value: @entity.batchSize, showTooltip: true, action: "SET_BATCH_SIZE" },
|
|
75
|
-
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: 1, yMin: 0, yMax: 1, showAxes: false, showGrid: false, gridStep: 0.1, curves: [], points: [], vectors: [], shapes: @entity.shapes, interactive: false, animate: false },
|
|
76
90
|
{ type: typography, variant: body, content: (if (== @entity.sourceKind "coin") (str/concat @entity.sampleCount " sample(s) drawn — running mean " (math/round @entity.mean 3) ", observed proportion " (math/round @entity.proportion 3) " (bias " @config.bias ")") (str/concat @entity.sampleCount " sample(s) drawn — running mean " (math/round @entity.mean 3))) }
|
|
77
91
|
] }
|
|
78
92
|
]
|
|
79
93
|
})
|
|
80
94
|
|
|
95
|
+
MODE_SELECTED -> idle when (and (not (== @config.matchMode "")) (not (== ?mode @config.matchMode)))
|
|
96
|
+
(set @entity.active false)
|
|
97
|
+
(render-ui main null)
|
|
98
|
+
|
|
81
99
|
MODE_SELECTED -> idle when (== ?mode @config.matchMode)
|
|
82
100
|
(set @entity.active true)
|
|
83
101
|
(set @entity.title @config.title)
|
|
@@ -93,14 +111,23 @@ orbital SampleAccumulatorOrbital {
|
|
|
93
111
|
padding: md
|
|
94
112
|
children: [
|
|
95
113
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
96
|
-
{ type:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
114
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
115
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
116
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
117
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
118
|
+
] },
|
|
119
|
+
{ type: badge, label: (if (> @entity.sampleCount 0) (str/concat @entity.sampleCount " samples") "No samples"), variant: (if (> @entity.sampleCount 0) "primary" "neutral") }
|
|
120
|
+
] },
|
|
121
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
122
|
+
{ type: button, action: DRAW, label: "Draw", icon: "plus", variant: primary },
|
|
123
|
+
{ type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
|
|
124
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Batch of " @entity.batchSize) }
|
|
125
|
+
] },
|
|
126
|
+
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: 1, yMin: 0, yMax: 1, showAxes: false, showGrid: false, gridStep: 0.1, curves: [], points: [], vectors: [], shapes: @entity.shapes, interactive: false, animate: false, keyMap: { Space: DRAW, KeyR: RESET } },
|
|
127
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
128
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Batch size: " @entity.batchSize) },
|
|
129
|
+
{ type: range-slider, min: 1, max: 200, step: 1, value: @entity.batchSize, showTooltip: true, action: "SET_BATCH_SIZE" }
|
|
100
130
|
] },
|
|
101
|
-
{ type: typography, variant: caption, content: (str/concat "Batch size: " @entity.batchSize) },
|
|
102
|
-
{ type: range-slider, min: 1, max: 200, step: 1, value: @entity.batchSize, showTooltip: true, action: "SET_BATCH_SIZE" },
|
|
103
|
-
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: 1, yMin: 0, yMax: 1, showAxes: false, showGrid: false, gridStep: 0.1, curves: [], points: [], vectors: [], shapes: @entity.shapes, interactive: false, animate: false },
|
|
104
131
|
{ type: typography, variant: body, content: (if (== @entity.sourceKind "coin") (str/concat @entity.sampleCount " sample(s) drawn — running mean " (math/round @entity.mean 3) ", observed proportion " (math/round @entity.proportion 3) " (bias " @config.bias ")") (str/concat @entity.sampleCount " sample(s) drawn — running mean " (math/round @entity.mean 3))) }
|
|
105
132
|
] }
|
|
106
133
|
]
|
|
@@ -129,7 +156,7 @@ orbital SampleAccumulatorOrbital {
|
|
|
129
156
|
(let (
|
|
130
157
|
(barH (* (/ (array/nth @counts @b) @maxCount) @plotH))
|
|
131
158
|
)
|
|
132
|
-
{ type: "rect", x: (+ 24 (* @b (/ @plotW @binCountV))), y: (- (+ 24 @plotH) @barH), width: (* (/ @plotW @binCountV) 0.9), height: @barH,
|
|
159
|
+
{ type: "rect", x: (+ 24 (* @b (/ @plotW @binCountV))), y: (- (+ 24 @plotH) @barH), width: (* (/ @plotW @binCountV) 0.9), height: @barH, tone: @config.color, fillTone: @config.color, fillStyle: "solid" }))))
|
|
133
160
|
)
|
|
134
161
|
(do
|
|
135
162
|
(set @entity.samples @allSamples)
|
|
@@ -144,14 +171,23 @@ orbital SampleAccumulatorOrbital {
|
|
|
144
171
|
padding: md
|
|
145
172
|
children: [
|
|
146
173
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
147
|
-
{ type:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
174
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
175
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
176
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
177
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
178
|
+
] },
|
|
179
|
+
{ type: badge, label: (if (> @entity.sampleCount 0) (str/concat @entity.sampleCount " samples") "No samples"), variant: (if (> @entity.sampleCount 0) "primary" "neutral") }
|
|
180
|
+
] },
|
|
181
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
182
|
+
{ type: button, action: DRAW, label: "Draw", icon: "plus", variant: primary },
|
|
183
|
+
{ type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
|
|
184
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Batch of " @entity.batchSize) }
|
|
185
|
+
] },
|
|
186
|
+
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: 1, yMin: 0, yMax: 1, showAxes: false, showGrid: false, gridStep: 0.1, curves: [], points: [], vectors: [], shapes: @entity.shapes, interactive: false, animate: false, keyMap: { Space: DRAW, KeyR: RESET } },
|
|
187
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
188
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Batch size: " @entity.batchSize) },
|
|
189
|
+
{ type: range-slider, min: 1, max: 200, step: 1, value: @entity.batchSize, showTooltip: true, action: "SET_BATCH_SIZE" }
|
|
151
190
|
] },
|
|
152
|
-
{ type: typography, variant: caption, content: (str/concat "Batch size: " @entity.batchSize) },
|
|
153
|
-
{ type: range-slider, min: 1, max: 200, step: 1, value: @entity.batchSize, showTooltip: true, action: "SET_BATCH_SIZE" },
|
|
154
|
-
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: 1, yMin: 0, yMax: 1, showAxes: false, showGrid: false, gridStep: 0.1, curves: [], points: [], vectors: [], shapes: @entity.shapes, interactive: false, animate: false },
|
|
155
191
|
{ type: typography, variant: body, content: (if (== @entity.sourceKind "coin") (str/concat @entity.sampleCount " sample(s) drawn — running mean " (math/round @entity.mean 3) ", observed proportion " (math/round @entity.proportion 3) " (bias " @config.bias ")") (str/concat @entity.sampleCount " sample(s) drawn — running mean " (math/round @entity.mean 3))) }
|
|
156
192
|
] }
|
|
157
193
|
]
|
|
@@ -165,14 +201,23 @@ orbital SampleAccumulatorOrbital {
|
|
|
165
201
|
padding: md
|
|
166
202
|
children: [
|
|
167
203
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
168
|
-
{ type:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
204
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
205
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
206
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
207
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
208
|
+
] },
|
|
209
|
+
{ type: badge, label: (if (> @entity.sampleCount 0) (str/concat @entity.sampleCount " samples") "No samples"), variant: (if (> @entity.sampleCount 0) "primary" "neutral") }
|
|
210
|
+
] },
|
|
211
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
212
|
+
{ type: button, action: DRAW, label: "Draw", icon: "plus", variant: primary },
|
|
213
|
+
{ type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
|
|
214
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Batch of " @entity.batchSize) }
|
|
215
|
+
] },
|
|
216
|
+
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: 1, yMin: 0, yMax: 1, showAxes: false, showGrid: false, gridStep: 0.1, curves: [], points: [], vectors: [], shapes: @entity.shapes, interactive: false, animate: false, keyMap: { Space: DRAW, KeyR: RESET } },
|
|
217
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
218
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Batch size: " @entity.batchSize) },
|
|
219
|
+
{ type: range-slider, min: 1, max: 200, step: 1, value: @entity.batchSize, showTooltip: true, action: "SET_BATCH_SIZE" }
|
|
172
220
|
] },
|
|
173
|
-
{ type: typography, variant: caption, content: (str/concat "Batch size: " @entity.batchSize) },
|
|
174
|
-
{ type: range-slider, min: 1, max: 200, step: 1, value: @entity.batchSize, showTooltip: true, action: "SET_BATCH_SIZE" },
|
|
175
|
-
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: 1, yMin: 0, yMax: 1, showAxes: false, showGrid: false, gridStep: 0.1, curves: [], points: [], vectors: [], shapes: @entity.shapes, interactive: false, animate: false },
|
|
176
221
|
{ type: typography, variant: body, content: (if (== @entity.sourceKind "coin") (str/concat @entity.sampleCount " sample(s) drawn — running mean " (math/round @entity.mean 3) ", observed proportion " (math/round @entity.proportion 3) " (bias " @config.bias ")") (str/concat @entity.sampleCount " sample(s) drawn — running mean " (math/round @entity.mean 3))) }
|
|
177
222
|
] }
|
|
178
223
|
]
|
|
@@ -189,14 +234,23 @@ orbital SampleAccumulatorOrbital {
|
|
|
189
234
|
padding: md
|
|
190
235
|
children: [
|
|
191
236
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
192
|
-
{ type:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
237
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
238
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
239
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
240
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
241
|
+
] },
|
|
242
|
+
{ type: badge, label: (if (> @entity.sampleCount 0) (str/concat @entity.sampleCount " samples") "No samples"), variant: (if (> @entity.sampleCount 0) "primary" "neutral") }
|
|
243
|
+
] },
|
|
244
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
245
|
+
{ type: button, action: DRAW, label: "Draw", icon: "plus", variant: primary },
|
|
246
|
+
{ type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
|
|
247
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Batch of " @entity.batchSize) }
|
|
248
|
+
] },
|
|
249
|
+
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: 1, yMin: 0, yMax: 1, showAxes: false, showGrid: false, gridStep: 0.1, curves: [], points: [], vectors: [], shapes: @entity.shapes, interactive: false, animate: false, keyMap: { Space: DRAW, KeyR: RESET } },
|
|
250
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
251
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Batch size: " @entity.batchSize) },
|
|
252
|
+
{ type: range-slider, min: 1, max: 200, step: 1, value: @entity.batchSize, showTooltip: true, action: "SET_BATCH_SIZE" }
|
|
196
253
|
] },
|
|
197
|
-
{ type: typography, variant: caption, content: (str/concat "Batch size: " @entity.batchSize) },
|
|
198
|
-
{ type: range-slider, min: 1, max: 200, step: 1, value: @entity.batchSize, showTooltip: true, action: "SET_BATCH_SIZE" },
|
|
199
|
-
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: 1, yMin: 0, yMax: 1, showAxes: false, showGrid: false, gridStep: 0.1, curves: [], points: [], vectors: [], shapes: @entity.shapes, interactive: false, animate: false },
|
|
200
254
|
{ type: typography, variant: body, content: (if (== @entity.sourceKind "coin") (str/concat @entity.sampleCount " sample(s) drawn — running mean " (math/round @entity.mean 3) ", observed proportion " (math/round @entity.proportion 3) " (bias " @config.bias ")") (str/concat @entity.sampleCount " sample(s) drawn — running mean " (math/round @entity.mean 3))) }
|
|
201
255
|
] }
|
|
202
256
|
]
|
|
@@ -239,7 +293,11 @@ orbital SampleAccumulatorOrbital {
|
|
|
239
293
|
@tier "presentation"
|
|
240
294
|
title : string = "Sample Accumulator"
|
|
241
295
|
@label "Title"
|
|
242
|
-
@description "
|
|
296
|
+
@description "The instrument's name, the header's one hero."
|
|
297
|
+
@tier "presentation"
|
|
298
|
+
summary : string = ""
|
|
299
|
+
@label "Concept"
|
|
300
|
+
@description "One line under the title saying what the learner is looking at (keep it under ~65 characters). Empty shows no line."
|
|
243
301
|
@tier "presentation"
|
|
244
302
|
sourceKind : string = "uniform"
|
|
245
303
|
@label "Source Kind"
|
|
@@ -260,7 +318,7 @@ orbital SampleAccumulatorOrbital {
|
|
|
260
318
|
@label "Bin Count"
|
|
261
319
|
@description "Number of histogram buckets across the 0..1 value range."
|
|
262
320
|
@tier "presentation"
|
|
263
|
-
color : string = "
|
|
321
|
+
color : string = "series-1"
|
|
264
322
|
@label "Bar Color"
|
|
265
323
|
@tier "presentation"
|
|
266
324
|
width : number = 600
|
|
@@ -68,21 +68,28 @@ orbital LearnSandboxOrbital {
|
|
|
68
68
|
padding: md
|
|
69
69
|
children: [
|
|
70
70
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
71
|
-
{ type:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
{ type:
|
|
71
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
72
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
73
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
74
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
75
|
+
] },
|
|
76
|
+
{ type: badge, variant: (if @entity.holds "primary" "warning"), label: (if @entity.holds "Holds" "Does not hold") }
|
|
77
77
|
] },
|
|
78
|
-
{ type:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
{ type: biology-canvas, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, nodes: @entity.nodes, edges: @entity.edges, shapes: [], interactive: @config.interactive, animate: @config.animate, keyMap: { KeyR: RESET } },
|
|
79
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: (array/map @config.elements (fn e { type: button, action: TOGGLE, actionPayload: { elementId: (object/get @e id) }, label: (if (array/includes @entity.enabledIds (object/get @e id)) (object/get @e label) (str/concat (object/get @e label) " — off")), variant: (if (array/includes @entity.enabledIds (object/get @e id)) "secondary" "ghost"), aria-pressed: (if (array/includes @entity.enabledIds (object/get @e id)) "true" "false") })) },
|
|
80
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
81
|
+
{ type: button, action: RESET, label: @config.resetLabel, icon: "rotate-ccw", variant: ghost },
|
|
82
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Total " @entity.total " of " @config.threshold) }
|
|
83
|
+
] },
|
|
84
|
+
{ type: typography, variant: body, content: @entity.readout }
|
|
82
85
|
] }
|
|
83
86
|
]
|
|
84
87
|
})
|
|
85
88
|
|
|
89
|
+
MODE_SELECTED -> idle when (and (not (== @config.matchMode "")) (not (== ?mode @config.matchMode)))
|
|
90
|
+
(set @entity.active false)
|
|
91
|
+
(render-ui main null)
|
|
92
|
+
|
|
86
93
|
MODE_SELECTED -> idle when (== ?mode @config.matchMode)
|
|
87
94
|
(set @entity.active true)
|
|
88
95
|
(set @entity.title @config.title)
|
|
@@ -108,17 +115,20 @@ orbital LearnSandboxOrbital {
|
|
|
108
115
|
padding: md
|
|
109
116
|
children: [
|
|
110
117
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
111
|
-
{ type:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
{ type:
|
|
118
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
119
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
120
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
121
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
122
|
+
] },
|
|
123
|
+
{ type: badge, variant: (if @entity.holds "primary" "warning"), label: (if @entity.holds "Holds" "Does not hold") }
|
|
124
|
+
] },
|
|
125
|
+
{ type: biology-canvas, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, nodes: @entity.nodes, edges: @entity.edges, shapes: [], interactive: @config.interactive, animate: @config.animate, keyMap: { KeyR: RESET } },
|
|
126
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: (array/map @config.elements (fn e { type: button, action: TOGGLE, actionPayload: { elementId: (object/get @e id) }, label: (if (array/includes @entity.enabledIds (object/get @e id)) (object/get @e label) (str/concat (object/get @e label) " — off")), variant: (if (array/includes @entity.enabledIds (object/get @e id)) "secondary" "ghost"), aria-pressed: (if (array/includes @entity.enabledIds (object/get @e id)) "true" "false") })) },
|
|
127
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
128
|
+
{ type: button, action: RESET, label: @config.resetLabel, icon: "rotate-ccw", variant: ghost },
|
|
129
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Total " @entity.total " of " @config.threshold) }
|
|
117
130
|
] },
|
|
118
|
-
{ type:
|
|
119
|
-
{ type: badge, variant: (if @entity.holds "success" "danger"), label: (if @entity.holds "Holds" "Does Not Hold") },
|
|
120
|
-
{ type: typography, variant: body, content: @entity.readout }
|
|
121
|
-
] }
|
|
131
|
+
{ type: typography, variant: body, content: @entity.readout }
|
|
122
132
|
] }
|
|
123
133
|
]
|
|
124
134
|
})
|
|
@@ -146,17 +156,20 @@ orbital LearnSandboxOrbital {
|
|
|
146
156
|
padding: md
|
|
147
157
|
children: [
|
|
148
158
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
149
|
-
{ type:
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
{ type:
|
|
159
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
160
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
161
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
162
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
163
|
+
] },
|
|
164
|
+
{ type: badge, variant: (if @entity.holds "primary" "warning"), label: (if @entity.holds "Holds" "Does not hold") }
|
|
155
165
|
] },
|
|
156
|
-
{ type:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
166
|
+
{ type: biology-canvas, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, nodes: @entity.nodes, edges: @entity.edges, shapes: [], interactive: @config.interactive, animate: @config.animate, keyMap: { KeyR: RESET } },
|
|
167
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: (array/map @config.elements (fn e { type: button, action: TOGGLE, actionPayload: { elementId: (object/get @e id) }, label: (if (array/includes @entity.enabledIds (object/get @e id)) (object/get @e label) (str/concat (object/get @e label) " — off")), variant: (if (array/includes @entity.enabledIds (object/get @e id)) "secondary" "ghost"), aria-pressed: (if (array/includes @entity.enabledIds (object/get @e id)) "true" "false") })) },
|
|
168
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
169
|
+
{ type: button, action: RESET, label: @config.resetLabel, icon: "rotate-ccw", variant: ghost },
|
|
170
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Total " @entity.total " of " @config.threshold) }
|
|
171
|
+
] },
|
|
172
|
+
{ type: typography, variant: body, content: @entity.readout }
|
|
160
173
|
] }
|
|
161
174
|
]
|
|
162
175
|
})
|
|
@@ -185,17 +198,20 @@ orbital LearnSandboxOrbital {
|
|
|
185
198
|
padding: md
|
|
186
199
|
children: [
|
|
187
200
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
188
|
-
{ type:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
{ type:
|
|
201
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
202
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
203
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
204
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
205
|
+
] },
|
|
206
|
+
{ type: badge, variant: (if @entity.holds "primary" "warning"), label: (if @entity.holds "Holds" "Does not hold") }
|
|
207
|
+
] },
|
|
208
|
+
{ type: biology-canvas, width: @config.width, height: @config.height, backgroundColor: @config.backgroundColor, nodes: @entity.nodes, edges: @entity.edges, shapes: [], interactive: @config.interactive, animate: @config.animate, keyMap: { KeyR: RESET } },
|
|
209
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: (array/map @config.elements (fn e { type: button, action: TOGGLE, actionPayload: { elementId: (object/get @e id) }, label: (if (array/includes @entity.enabledIds (object/get @e id)) (object/get @e label) (str/concat (object/get @e label) " — off")), variant: (if (array/includes @entity.enabledIds (object/get @e id)) "secondary" "ghost"), aria-pressed: (if (array/includes @entity.enabledIds (object/get @e id)) "true" "false") })) },
|
|
210
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
211
|
+
{ type: button, action: RESET, label: @config.resetLabel, icon: "rotate-ccw", variant: ghost },
|
|
212
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Total " @entity.total " of " @config.threshold) }
|
|
194
213
|
] },
|
|
195
|
-
{ type:
|
|
196
|
-
{ type: badge, variant: (if @entity.holds "success" "danger"), label: (if @entity.holds "Holds" "Does Not Hold") },
|
|
197
|
-
{ type: typography, variant: body, content: @entity.readout }
|
|
198
|
-
] }
|
|
214
|
+
{ type: typography, variant: body, content: @entity.readout }
|
|
199
215
|
] }
|
|
200
216
|
]
|
|
201
217
|
})
|
|
@@ -243,6 +259,10 @@ orbital LearnSandboxOrbital {
|
|
|
243
259
|
@label "Title"
|
|
244
260
|
@description "Title shown above the instrument."
|
|
245
261
|
@tier "presentation"
|
|
262
|
+
summary : string = ""
|
|
263
|
+
@label "Concept"
|
|
264
|
+
@description "One line under the title saying what the system models (keep it under ~65 characters). Empty shows no line."
|
|
265
|
+
@tier "presentation"
|
|
246
266
|
width : number = 640
|
|
247
267
|
@label "Width"
|
|
248
268
|
@description "Canvas width in pixels."
|
|
@@ -251,7 +271,7 @@ orbital LearnSandboxOrbital {
|
|
|
251
271
|
@label "Height"
|
|
252
272
|
@description "Canvas height in pixels."
|
|
253
273
|
@tier "presentation"
|
|
254
|
-
backgroundColor : string = "
|
|
274
|
+
backgroundColor : string = ""
|
|
255
275
|
@label "Background Color"
|
|
256
276
|
@tier "presentation"
|
|
257
277
|
interactive : boolean = false
|
|
@@ -295,16 +315,16 @@ orbital LearnSandboxOrbital {
|
|
|
295
315
|
nodeRadius : number = 34
|
|
296
316
|
@label "Node Radius"
|
|
297
317
|
@tier "presentation"
|
|
298
|
-
enabledColor : string = "
|
|
318
|
+
enabledColor : string = "series-2"
|
|
299
319
|
@label "Enabled Node Color"
|
|
300
320
|
@tier "presentation"
|
|
301
|
-
disabledColor : string = "
|
|
321
|
+
disabledColor : string = "muted"
|
|
302
322
|
@label "Disabled Node Color"
|
|
303
323
|
@tier "presentation"
|
|
304
|
-
enabledEdgeColor : string = "
|
|
324
|
+
enabledEdgeColor : string = "ink"
|
|
305
325
|
@label "Enabled Edge Color"
|
|
306
326
|
@tier "presentation"
|
|
307
|
-
disabledEdgeColor : string = "
|
|
327
|
+
disabledEdgeColor : string = "guide"
|
|
308
328
|
@label "Disabled Edge Color"
|
|
309
329
|
@tier "presentation"
|
|
310
330
|
resetLabel : string = "Reset"
|