@almadar/std 16.239.0 → 16.242.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 +4814 -553
- 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 +134 -0
- package/behaviors/lolo/infra/atoms/std-page-treat.lolo +59 -0
- package/behaviors/lolo/infra/atoms/std-page-watch.lolo +86 -0
- package/behaviors/lolo/ui/core/atoms/std-board.lolo +53 -6
- 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/core/atoms/std-site-header.lolo +15 -3
- package/behaviors/lolo/ui/core/atoms/std-tag-strip.lolo +2 -2
- package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +7 -7
- package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +1 -1
- package/behaviors/lolo/ui/core/molecules/ui-header.lolo +5 -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 +867 -0
- package/behaviors/registry/infra/atoms/std-page-treat.orb +494 -0
- package/behaviors/registry/infra/atoms/std-page-watch.orb +554 -0
- package/behaviors/registry/ui/core/atoms/std-board.orb +110 -14
- 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/core/atoms/std-site-header.orb +40 -2
- package/behaviors/registry/ui/core/atoms/std-tag-strip.orb +2 -0
- package/behaviors/registry/ui/core/atoms/std-tag-taxonomy.orb +24 -0
- package/behaviors/registry/ui/core/atoms/std-version-history.orb +8 -1
- package/behaviors/registry/ui/core/molecules/ui-header.orb +7 -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/canonical-operators.json +35 -1
- package/dist/behaviors/exports-reader.js +41980 -35508
- package/dist/behaviors/functions/index.d.ts +1063 -140
- package/dist/behaviors/functions/index.js +41951 -35506
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +41981 -35509
- package/dist/behaviors/query.js +41980 -35508
- package/dist/behaviors-embeddings.hash.json +3 -3
- package/dist/behaviors-embeddings.json +47 -27
- package/dist/behaviors-registry.json +4814 -553
- package/dist/index.d.ts +4 -4
- package/dist/index.js +42019 -35509
- package/dist/knob-embeddings.hash.json +3 -3
- package/dist/knob-embeddings.json +623 -263
- package/dist/modules/anim.d.ts +1 -1
- package/dist/modules/array.d.ts +1 -1
- package/dist/modules/async.d.ts +1 -1
- package/dist/modules/behavior.d.ts +1 -1
- package/dist/modules/browser.d.ts +1 -1
- package/dist/modules/composition.d.ts +1 -1
- package/dist/modules/contract.d.ts +1 -1
- package/dist/modules/core.d.ts +1 -1
- package/dist/modules/core.js +2 -0
- package/dist/modules/data.d.ts +1 -1
- package/dist/modules/ease.d.ts +1 -1
- package/dist/modules/format.d.ts +1 -1
- package/dist/modules/geo.d.ts +1 -1
- package/dist/modules/graph.d.ts +1 -1
- package/dist/modules/grid.d.ts +1 -1
- package/dist/modules/i18n.d.ts +17 -0
- package/dist/modules/i18n.js +22 -0
- package/dist/modules/index.d.ts +2 -1
- package/dist/modules/index.js +24 -1
- package/dist/modules/integration.d.ts +1 -1
- package/dist/modules/json.d.ts +1 -1
- package/dist/modules/llm.d.ts +1 -1
- package/dist/modules/math.d.ts +1 -1
- package/dist/modules/memory.d.ts +1 -1
- package/dist/modules/nn.d.ts +1 -1
- package/dist/modules/noise.d.ts +1 -1
- package/dist/modules/object.d.ts +1 -1
- package/dist/modules/os.d.ts +1 -1
- package/dist/modules/path.d.ts +1 -1
- package/dist/modules/prob.d.ts +1 -1
- package/dist/modules/session.d.ts +1 -1
- package/dist/modules/str.d.ts +1 -1
- package/dist/modules/tensor.d.ts +1 -1
- package/dist/modules/time.d.ts +1 -1
- package/dist/modules/trace.d.ts +1 -1
- package/dist/modules/train.d.ts +1 -1
- package/dist/modules/validate.d.ts +1 -1
- package/dist/modules/vector.d.ts +1 -1
- package/dist/modules/workspace.d.ts +1 -1
- package/dist/registry/factory-signatures.json +1 -1
- package/dist/registry.d.ts +10 -3
- package/dist/registry.js +31 -1
- package/dist/{types-DLx38UFZ.d.ts → types-Cdb321uM.d.ts} +9 -3
- package/i18n/ar.json +1 -0
- package/i18n/en.json +1 -0
- package/i18n/sl.json +1 -0
- package/package.json +3 -3
|
@@ -31,6 +31,11 @@ orbital LearnArrangementOrbital {
|
|
|
31
31
|
fill : string
|
|
32
32
|
lineWidth : number
|
|
33
33
|
opacity : number
|
|
34
|
+
tone : string
|
|
35
|
+
fillTone : string
|
|
36
|
+
stroke : string
|
|
37
|
+
textSize : string
|
|
38
|
+
fillStyle : string
|
|
34
39
|
}
|
|
35
40
|
type LearnArrangementItem = {
|
|
36
41
|
id : string!
|
|
@@ -75,8 +80,8 @@ orbital LearnArrangementOrbital {
|
|
|
75
80
|
(bx (+ @config.slotLeft (* @i @config.slotSpacing)))
|
|
76
81
|
)
|
|
77
82
|
[
|
|
78
|
-
{ type: "rect", id: (str/concat "slot-" @i), x: @bx, y: @config.slotY, width: @config.slotWidth, height: @config.slotHeight,
|
|
79
|
-
{ type: "text", id: (str/concat "slot-label-" @i), x: (+ @bx (/ @config.slotWidth 2)), y: (+ @config.slotY (/ @config.slotHeight 2) 5), text: (if @filled @label (str/concat "" (+ @i 1))),
|
|
83
|
+
{ type: "rect", id: (str/concat "slot-" @i), x: @bx, y: @config.slotY, width: @config.slotWidth, height: @config.slotHeight, tone: @config.slotBorderColor, fillTone: @fillColor, fillStyle: "tint" },
|
|
84
|
+
{ type: "text", id: (str/concat "slot-label-" @i), x: (+ @bx (/ @config.slotWidth 2)), y: (+ @config.slotY (/ @config.slotHeight 2) 5), text: (if @filled @label (str/concat "" (+ @i 1))), textSize: @config.slotFontSize, align: "center", tone: @config.slotTextColor }
|
|
80
85
|
]
|
|
81
86
|
)))))
|
|
82
87
|
)
|
|
@@ -87,23 +92,30 @@ orbital LearnArrangementOrbital {
|
|
|
87
92
|
padding: md
|
|
88
93
|
children: [
|
|
89
94
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
90
|
-
{ type:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
{ type:
|
|
96
|
-
{ type: button, action: CHECK, label: @config.checkLabel, variant: primary, disabled: (if (>= (array/len @entity.placedIds) @entity.totalItems) false true) },
|
|
97
|
-
{ type: button, action: RETRY, label: @config.retryLabel, variant: ghost }
|
|
95
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
96
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
97
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
98
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
99
|
+
] },
|
|
100
|
+
{ type: badge, label: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "Correct" (str/concat @entity.correctCount " / " @entity.totalItems " correct")) (str/concat (array/len @entity.placedIds) " / " @entity.totalItems " placed")), variant: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "success" "error") "neutral") }
|
|
98
101
|
] },
|
|
99
|
-
{ type:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: @config.width, yMin: 0, yMax: @config.height, showAxes: false, showGrid: false, gridStep: 1, curves: [], points: [], vectors: [], shapes: @entity.slotShapes, interactive: @config.interactive, animate: @config.animate, keyMap: { Space: CHECK, Backspace: UNDO, KeyR: RETRY } },
|
|
103
|
+
{ type: stack, direction: vertical, gap: sm, children: (array/map (array/filter @config.items (fn it (not (array/includes @entity.placedIds (object/get @it id))))) (fn it { type: button, action: PLACE, actionPayload: { itemId: (object/get @it id) }, label: (if (!= (object/get @it hint "") "") (str/concat (object/get @it label) " — " (object/get @it hint "")) (object/get @it label)), variant: secondary, size: lg, disabled: @entity.checked })) },
|
|
104
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
105
|
+
{ type: button, action: CHECK, label: @config.checkLabel, icon: "check", variant: primary, disabled: (if (>= (array/len @entity.placedIds) @entity.totalItems) false true) },
|
|
106
|
+
{ type: button, action: UNDO, label: @config.undoLabel, icon: "chevron-left", variant: secondary, disabled: (if (> (array/len @entity.placedIds) 0) false true) },
|
|
107
|
+
{ type: button, action: RETRY, label: @config.retryLabel, icon: "rotate-ccw", variant: ghost },
|
|
108
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Placed " (array/len @entity.placedIds) " of " @entity.totalItems) }
|
|
109
|
+
] },
|
|
110
|
+
{ type: typography, variant: body, content: (if @entity.checked @entity.verdict "Tap items to build the sequence in order, then press Check.") }
|
|
103
111
|
] }
|
|
104
112
|
]
|
|
105
113
|
})
|
|
106
114
|
|
|
115
|
+
MODE_SELECTED -> idle when (and (not (== @config.matchMode "")) (not (== ?mode @config.matchMode)))
|
|
116
|
+
(set @entity.active false)
|
|
117
|
+
(render-ui main null)
|
|
118
|
+
|
|
107
119
|
MODE_SELECTED -> idle when (== ?mode @config.matchMode)
|
|
108
120
|
(set @entity.active true)
|
|
109
121
|
(set @entity.title @config.title)
|
|
@@ -124,8 +136,8 @@ orbital LearnArrangementOrbital {
|
|
|
124
136
|
(bx (+ @config.slotLeft (* @i @config.slotSpacing)))
|
|
125
137
|
)
|
|
126
138
|
[
|
|
127
|
-
{ type: "rect", id: (str/concat "slot-" @i), x: @bx, y: @config.slotY, width: @config.slotWidth, height: @config.slotHeight,
|
|
128
|
-
{ type: "text", id: (str/concat "slot-label-" @i), x: (+ @bx (/ @config.slotWidth 2)), y: (+ @config.slotY (/ @config.slotHeight 2) 5), text: (if @filled @label (str/concat "" (+ @i 1))),
|
|
139
|
+
{ type: "rect", id: (str/concat "slot-" @i), x: @bx, y: @config.slotY, width: @config.slotWidth, height: @config.slotHeight, tone: @config.slotBorderColor, fillTone: @fillColor, fillStyle: "tint" },
|
|
140
|
+
{ type: "text", id: (str/concat "slot-label-" @i), x: (+ @bx (/ @config.slotWidth 2)), y: (+ @config.slotY (/ @config.slotHeight 2) 5), text: (if @filled @label (str/concat "" (+ @i 1))), textSize: @config.slotFontSize, align: "center", tone: @config.slotTextColor }
|
|
129
141
|
]
|
|
130
142
|
)))))
|
|
131
143
|
)
|
|
@@ -136,19 +148,22 @@ orbital LearnArrangementOrbital {
|
|
|
136
148
|
padding: md
|
|
137
149
|
children: [
|
|
138
150
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
139
|
-
{ type:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
{ type:
|
|
145
|
-
{ type: button, action: CHECK, label: @config.checkLabel, variant: primary, disabled: (if (>= (array/len @entity.placedIds) @entity.totalItems) false true) },
|
|
146
|
-
{ type: button, action: RETRY, label: @config.retryLabel, variant: ghost }
|
|
151
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
152
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
153
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
154
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
155
|
+
] },
|
|
156
|
+
{ type: badge, label: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "Correct" (str/concat @entity.correctCount " / " @entity.totalItems " correct")) (str/concat (array/len @entity.placedIds) " / " @entity.totalItems " placed")), variant: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "success" "error") "neutral") }
|
|
147
157
|
] },
|
|
148
|
-
{ type:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
158
|
+
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: @config.width, yMin: 0, yMax: @config.height, showAxes: false, showGrid: false, gridStep: 1, curves: [], points: [], vectors: [], shapes: @entity.slotShapes, interactive: @config.interactive, animate: @config.animate, keyMap: { Space: CHECK, Backspace: UNDO, KeyR: RETRY } },
|
|
159
|
+
{ type: stack, direction: vertical, gap: sm, children: (array/map (array/filter @config.items (fn it (not (array/includes @entity.placedIds (object/get @it id))))) (fn it { type: button, action: PLACE, actionPayload: { itemId: (object/get @it id) }, label: (if (!= (object/get @it hint "") "") (str/concat (object/get @it label) " — " (object/get @it hint "")) (object/get @it label)), variant: secondary, size: lg, disabled: @entity.checked })) },
|
|
160
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
161
|
+
{ type: button, action: CHECK, label: @config.checkLabel, icon: "check", variant: primary, disabled: (if (>= (array/len @entity.placedIds) @entity.totalItems) false true) },
|
|
162
|
+
{ type: button, action: UNDO, label: @config.undoLabel, icon: "chevron-left", variant: secondary, disabled: (if (> (array/len @entity.placedIds) 0) false true) },
|
|
163
|
+
{ type: button, action: RETRY, label: @config.retryLabel, icon: "rotate-ccw", variant: ghost },
|
|
164
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Placed " (array/len @entity.placedIds) " of " @entity.totalItems) }
|
|
165
|
+
] },
|
|
166
|
+
{ type: typography, variant: body, content: (if @entity.checked @entity.verdict "Tap items to build the sequence in order, then press Check.") }
|
|
152
167
|
] }
|
|
153
168
|
]
|
|
154
169
|
})
|
|
@@ -170,8 +185,8 @@ orbital LearnArrangementOrbital {
|
|
|
170
185
|
(bx (+ @config.slotLeft (* @i @config.slotSpacing)))
|
|
171
186
|
)
|
|
172
187
|
[
|
|
173
|
-
{ type: "rect", id: (str/concat "slot-" @i), x: @bx, y: @config.slotY, width: @config.slotWidth, height: @config.slotHeight,
|
|
174
|
-
{ type: "text", id: (str/concat "slot-label-" @i), x: (+ @bx (/ @config.slotWidth 2)), y: (+ @config.slotY (/ @config.slotHeight 2) 5), text: (if @filled @label (str/concat "" (+ @i 1))),
|
|
188
|
+
{ type: "rect", id: (str/concat "slot-" @i), x: @bx, y: @config.slotY, width: @config.slotWidth, height: @config.slotHeight, tone: @config.slotBorderColor, fillTone: @fillColor, fillStyle: "tint" },
|
|
189
|
+
{ type: "text", id: (str/concat "slot-label-" @i), x: (+ @bx (/ @config.slotWidth 2)), y: (+ @config.slotY (/ @config.slotHeight 2) 5), text: (if @filled @label (str/concat "" (+ @i 1))), textSize: @config.slotFontSize, align: "center", tone: @config.slotTextColor }
|
|
175
190
|
]
|
|
176
191
|
)))))
|
|
177
192
|
)
|
|
@@ -182,19 +197,22 @@ orbital LearnArrangementOrbital {
|
|
|
182
197
|
padding: md
|
|
183
198
|
children: [
|
|
184
199
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
185
|
-
{ type:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
{ type:
|
|
191
|
-
|
|
192
|
-
|
|
200
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
201
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
202
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
203
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
204
|
+
] },
|
|
205
|
+
{ type: badge, label: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "Correct" (str/concat @entity.correctCount " / " @entity.totalItems " correct")) (str/concat (array/len @entity.placedIds) " / " @entity.totalItems " placed")), variant: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "success" "error") "neutral") }
|
|
206
|
+
] },
|
|
207
|
+
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: @config.width, yMin: 0, yMax: @config.height, showAxes: false, showGrid: false, gridStep: 1, curves: [], points: [], vectors: [], shapes: @entity.slotShapes, interactive: @config.interactive, animate: @config.animate, keyMap: { Space: CHECK, Backspace: UNDO, KeyR: RETRY } },
|
|
208
|
+
{ type: stack, direction: vertical, gap: sm, children: (array/map (array/filter @config.items (fn it (not (array/includes @entity.placedIds (object/get @it id))))) (fn it { type: button, action: PLACE, actionPayload: { itemId: (object/get @it id) }, label: (if (!= (object/get @it hint "") "") (str/concat (object/get @it label) " — " (object/get @it hint "")) (object/get @it label)), variant: secondary, size: lg, disabled: @entity.checked })) },
|
|
209
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
210
|
+
{ type: button, action: CHECK, label: @config.checkLabel, icon: "check", variant: primary, disabled: (if (>= (array/len @entity.placedIds) @entity.totalItems) false true) },
|
|
211
|
+
{ type: button, action: UNDO, label: @config.undoLabel, icon: "chevron-left", variant: secondary, disabled: (if (> (array/len @entity.placedIds) 0) false true) },
|
|
212
|
+
{ type: button, action: RETRY, label: @config.retryLabel, icon: "rotate-ccw", variant: ghost },
|
|
213
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Placed " (array/len @entity.placedIds) " of " @entity.totalItems) }
|
|
193
214
|
] },
|
|
194
|
-
{ type:
|
|
195
|
-
{ type: badge, variant: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "success" "danger") "neutral"), label: (if @entity.checked @entity.verdict "Not checked yet") },
|
|
196
|
-
{ type: stat-display, label: "Score", value: @entity.correctCount, max: @entity.totalItems }
|
|
197
|
-
] }
|
|
215
|
+
{ type: typography, variant: body, content: (if @entity.checked @entity.verdict "Tap items to build the sequence in order, then press Check.") }
|
|
198
216
|
] }
|
|
199
217
|
]
|
|
200
218
|
})
|
|
@@ -216,8 +234,8 @@ orbital LearnArrangementOrbital {
|
|
|
216
234
|
(bx (+ @config.slotLeft (* @i @config.slotSpacing)))
|
|
217
235
|
)
|
|
218
236
|
[
|
|
219
|
-
{ type: "rect", id: (str/concat "slot-" @i), x: @bx, y: @config.slotY, width: @config.slotWidth, height: @config.slotHeight,
|
|
220
|
-
{ type: "text", id: (str/concat "slot-label-" @i), x: (+ @bx (/ @config.slotWidth 2)), y: (+ @config.slotY (/ @config.slotHeight 2) 5), text: (if @filled @label (str/concat "" (+ @i 1))),
|
|
237
|
+
{ type: "rect", id: (str/concat "slot-" @i), x: @bx, y: @config.slotY, width: @config.slotWidth, height: @config.slotHeight, tone: @config.slotBorderColor, fillTone: @fillColor, fillStyle: "tint" },
|
|
238
|
+
{ type: "text", id: (str/concat "slot-label-" @i), x: (+ @bx (/ @config.slotWidth 2)), y: (+ @config.slotY (/ @config.slotHeight 2) 5), text: (if @filled @label (str/concat "" (+ @i 1))), textSize: @config.slotFontSize, align: "center", tone: @config.slotTextColor }
|
|
221
239
|
]
|
|
222
240
|
)))))
|
|
223
241
|
)
|
|
@@ -228,19 +246,22 @@ orbital LearnArrangementOrbital {
|
|
|
228
246
|
padding: md
|
|
229
247
|
children: [
|
|
230
248
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
231
|
-
{ type:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
{ type:
|
|
237
|
-
{ type: button, action: CHECK, label: @config.checkLabel, variant: primary, disabled: (if (>= (array/len @entity.placedIds) @entity.totalItems) false true) },
|
|
238
|
-
{ type: button, action: RETRY, label: @config.retryLabel, variant: ghost }
|
|
249
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
250
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
251
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
252
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
253
|
+
] },
|
|
254
|
+
{ type: badge, label: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "Correct" (str/concat @entity.correctCount " / " @entity.totalItems " correct")) (str/concat (array/len @entity.placedIds) " / " @entity.totalItems " placed")), variant: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "success" "error") "neutral") }
|
|
239
255
|
] },
|
|
240
|
-
{ type:
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
256
|
+
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: @config.width, yMin: 0, yMax: @config.height, showAxes: false, showGrid: false, gridStep: 1, curves: [], points: [], vectors: [], shapes: @entity.slotShapes, interactive: @config.interactive, animate: @config.animate, keyMap: { Space: CHECK, Backspace: UNDO, KeyR: RETRY } },
|
|
257
|
+
{ type: stack, direction: vertical, gap: sm, children: (array/map (array/filter @config.items (fn it (not (array/includes @entity.placedIds (object/get @it id))))) (fn it { type: button, action: PLACE, actionPayload: { itemId: (object/get @it id) }, label: (if (!= (object/get @it hint "") "") (str/concat (object/get @it label) " — " (object/get @it hint "")) (object/get @it label)), variant: secondary, size: lg, disabled: @entity.checked })) },
|
|
258
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
259
|
+
{ type: button, action: CHECK, label: @config.checkLabel, icon: "check", variant: primary, disabled: (if (>= (array/len @entity.placedIds) @entity.totalItems) false true) },
|
|
260
|
+
{ type: button, action: UNDO, label: @config.undoLabel, icon: "chevron-left", variant: secondary, disabled: (if (> (array/len @entity.placedIds) 0) false true) },
|
|
261
|
+
{ type: button, action: RETRY, label: @config.retryLabel, icon: "rotate-ccw", variant: ghost },
|
|
262
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Placed " (array/len @entity.placedIds) " of " @entity.totalItems) }
|
|
263
|
+
] },
|
|
264
|
+
{ type: typography, variant: body, content: (if @entity.checked @entity.verdict "Tap items to build the sequence in order, then press Check.") }
|
|
244
265
|
] }
|
|
245
266
|
]
|
|
246
267
|
})
|
|
@@ -272,8 +293,8 @@ orbital LearnArrangementOrbital {
|
|
|
272
293
|
(bx (+ @config.slotLeft (* @i @config.slotSpacing)))
|
|
273
294
|
)
|
|
274
295
|
[
|
|
275
|
-
{ type: "rect", id: (str/concat "slot-" @i), x: @bx, y: @config.slotY, width: @config.slotWidth, height: @config.slotHeight,
|
|
276
|
-
{ type: "text", id: (str/concat "slot-label-" @i), x: (+ @bx (/ @config.slotWidth 2)), y: (+ @config.slotY (/ @config.slotHeight 2) 5), text: (if @filled @label (str/concat "" (+ @i 1))),
|
|
296
|
+
{ type: "rect", id: (str/concat "slot-" @i), x: @bx, y: @config.slotY, width: @config.slotWidth, height: @config.slotHeight, tone: @config.slotBorderColor, fillTone: @fillColor, fillStyle: "tint" },
|
|
297
|
+
{ type: "text", id: (str/concat "slot-label-" @i), x: (+ @bx (/ @config.slotWidth 2)), y: (+ @config.slotY (/ @config.slotHeight 2) 5), text: (if @filled @label (str/concat "" (+ @i 1))), textSize: @config.slotFontSize, align: "center", tone: @config.slotTextColor }
|
|
277
298
|
]
|
|
278
299
|
)))))
|
|
279
300
|
)
|
|
@@ -284,19 +305,22 @@ orbital LearnArrangementOrbital {
|
|
|
284
305
|
padding: md
|
|
285
306
|
children: [
|
|
286
307
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
287
|
-
{ type:
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
{ type:
|
|
293
|
-
|
|
294
|
-
|
|
308
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
309
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
310
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
311
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
312
|
+
] },
|
|
313
|
+
{ type: badge, label: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "Correct" (str/concat @entity.correctCount " / " @entity.totalItems " correct")) (str/concat (array/len @entity.placedIds) " / " @entity.totalItems " placed")), variant: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "success" "error") "neutral") }
|
|
314
|
+
] },
|
|
315
|
+
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: @config.width, yMin: 0, yMax: @config.height, showAxes: false, showGrid: false, gridStep: 1, curves: [], points: [], vectors: [], shapes: @entity.slotShapes, interactive: @config.interactive, animate: @config.animate, keyMap: { Space: CHECK, Backspace: UNDO, KeyR: RETRY } },
|
|
316
|
+
{ type: stack, direction: vertical, gap: sm, children: (array/map (array/filter @config.items (fn it (not (array/includes @entity.placedIds (object/get @it id))))) (fn it { type: button, action: PLACE, actionPayload: { itemId: (object/get @it id) }, label: (if (!= (object/get @it hint "") "") (str/concat (object/get @it label) " — " (object/get @it hint "")) (object/get @it label)), variant: secondary, size: lg, disabled: @entity.checked })) },
|
|
317
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
318
|
+
{ type: button, action: CHECK, label: @config.checkLabel, icon: "check", variant: primary, disabled: (if (>= (array/len @entity.placedIds) @entity.totalItems) false true) },
|
|
319
|
+
{ type: button, action: UNDO, label: @config.undoLabel, icon: "chevron-left", variant: secondary, disabled: (if (> (array/len @entity.placedIds) 0) false true) },
|
|
320
|
+
{ type: button, action: RETRY, label: @config.retryLabel, icon: "rotate-ccw", variant: ghost },
|
|
321
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Placed " (array/len @entity.placedIds) " of " @entity.totalItems) }
|
|
295
322
|
] },
|
|
296
|
-
{ type:
|
|
297
|
-
{ type: badge, variant: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "success" "danger") "neutral"), label: (if @entity.checked @entity.verdict "Not checked yet") },
|
|
298
|
-
{ type: stat-display, label: "Score", value: @entity.correctCount, max: @entity.totalItems }
|
|
299
|
-
] }
|
|
323
|
+
{ type: typography, variant: body, content: (if @entity.checked @entity.verdict "Tap items to build the sequence in order, then press Check.") }
|
|
300
324
|
] }
|
|
301
325
|
]
|
|
302
326
|
})
|
|
@@ -320,8 +344,8 @@ orbital LearnArrangementOrbital {
|
|
|
320
344
|
(bx (+ @config.slotLeft (* @i @config.slotSpacing)))
|
|
321
345
|
)
|
|
322
346
|
[
|
|
323
|
-
{ type: "rect", id: (str/concat "slot-" @i), x: @bx, y: @config.slotY, width: @config.slotWidth, height: @config.slotHeight,
|
|
324
|
-
{ type: "text", id: (str/concat "slot-label-" @i), x: (+ @bx (/ @config.slotWidth 2)), y: (+ @config.slotY (/ @config.slotHeight 2) 5), text: (if @filled @label (str/concat "" (+ @i 1))),
|
|
347
|
+
{ type: "rect", id: (str/concat "slot-" @i), x: @bx, y: @config.slotY, width: @config.slotWidth, height: @config.slotHeight, tone: @config.slotBorderColor, fillTone: @fillColor, fillStyle: "tint" },
|
|
348
|
+
{ type: "text", id: (str/concat "slot-label-" @i), x: (+ @bx (/ @config.slotWidth 2)), y: (+ @config.slotY (/ @config.slotHeight 2) 5), text: (if @filled @label (str/concat "" (+ @i 1))), textSize: @config.slotFontSize, align: "center", tone: @config.slotTextColor }
|
|
325
349
|
]
|
|
326
350
|
)))))
|
|
327
351
|
)
|
|
@@ -332,19 +356,22 @@ orbital LearnArrangementOrbital {
|
|
|
332
356
|
padding: md
|
|
333
357
|
children: [
|
|
334
358
|
{ type: stack, direction: vertical, gap: md, children: [
|
|
335
|
-
{ type:
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
{ type:
|
|
341
|
-
{ type: button, action: CHECK, label: @config.checkLabel, variant: primary, disabled: (if (>= (array/len @entity.placedIds) @entity.totalItems) false true) },
|
|
342
|
-
{ type: button, action: RETRY, label: @config.retryLabel, variant: ghost }
|
|
359
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
360
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
361
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
362
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
363
|
+
] },
|
|
364
|
+
{ type: badge, label: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "Correct" (str/concat @entity.correctCount " / " @entity.totalItems " correct")) (str/concat (array/len @entity.placedIds) " / " @entity.totalItems " placed")), variant: (if @entity.checked (if (== @entity.correctCount @entity.totalItems) "success" "error") "neutral") }
|
|
343
365
|
] },
|
|
344
|
-
{ type:
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
366
|
+
{ type: math-canvas, width: @config.width, height: @config.height, xMin: 0, xMax: @config.width, yMin: 0, yMax: @config.height, showAxes: false, showGrid: false, gridStep: 1, curves: [], points: [], vectors: [], shapes: @entity.slotShapes, interactive: @config.interactive, animate: @config.animate, keyMap: { Space: CHECK, Backspace: UNDO, KeyR: RETRY } },
|
|
367
|
+
{ type: stack, direction: vertical, gap: sm, children: (array/map (array/filter @config.items (fn it (not (array/includes @entity.placedIds (object/get @it id))))) (fn it { type: button, action: PLACE, actionPayload: { itemId: (object/get @it id) }, label: (if (!= (object/get @it hint "") "") (str/concat (object/get @it label) " — " (object/get @it hint "")) (object/get @it label)), variant: secondary, size: lg, disabled: @entity.checked })) },
|
|
368
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
369
|
+
{ type: button, action: CHECK, label: @config.checkLabel, icon: "check", variant: primary, disabled: (if (>= (array/len @entity.placedIds) @entity.totalItems) false true) },
|
|
370
|
+
{ type: button, action: UNDO, label: @config.undoLabel, icon: "chevron-left", variant: secondary, disabled: (if (> (array/len @entity.placedIds) 0) false true) },
|
|
371
|
+
{ type: button, action: RETRY, label: @config.retryLabel, icon: "rotate-ccw", variant: ghost },
|
|
372
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "Placed " (array/len @entity.placedIds) " of " @entity.totalItems) }
|
|
373
|
+
] },
|
|
374
|
+
{ type: typography, variant: body, content: (if @entity.checked @entity.verdict "Tap items to build the sequence in order, then press Check.") }
|
|
348
375
|
] }
|
|
349
376
|
]
|
|
350
377
|
})
|
|
@@ -407,6 +434,10 @@ orbital LearnArrangementOrbital {
|
|
|
407
434
|
@label "Title"
|
|
408
435
|
@description "Title shown above the instrument."
|
|
409
436
|
@tier "presentation"
|
|
437
|
+
summary : string = ""
|
|
438
|
+
@label "Concept"
|
|
439
|
+
@description "One line under the title saying what is being ordered (keep it under ~65 characters). Empty shows no line."
|
|
440
|
+
@tier "presentation"
|
|
410
441
|
width : number = 640
|
|
411
442
|
@label "Width"
|
|
412
443
|
@description "Canvas width in pixels."
|
|
@@ -434,19 +465,19 @@ orbital LearnArrangementOrbital {
|
|
|
434
465
|
@description "Roster of items to order; each carries its label, its zero-based correct position in the finished sequence, and an optional hint shown beneath its button while unplaced."
|
|
435
466
|
@synonyms "item, step, stage, sequence, order, ranking, procedure"
|
|
436
467
|
@tier "domain"
|
|
437
|
-
correctColor : string = "
|
|
468
|
+
correctColor : string = "success"
|
|
438
469
|
@label "Correct Slot Color"
|
|
439
470
|
@description "Fill color for a filled slot whose item matches its correct position, once graded."
|
|
440
471
|
@tier "presentation"
|
|
441
|
-
incorrectColor : string = "
|
|
472
|
+
incorrectColor : string = "error"
|
|
442
473
|
@label "Incorrect Slot Color"
|
|
443
474
|
@description "Fill color for a filled slot whose item does not match its correct position, once graded."
|
|
444
475
|
@tier "presentation"
|
|
445
|
-
pendingColor : string = "
|
|
476
|
+
pendingColor : string = "series-2"
|
|
446
477
|
@label "Pending Slot Color"
|
|
447
478
|
@description "Fill color for a filled slot before grading."
|
|
448
479
|
@tier "presentation"
|
|
449
|
-
emptySlotColor : string = "
|
|
480
|
+
emptySlotColor : string = "fill"
|
|
450
481
|
@label "Empty Slot Color"
|
|
451
482
|
@description "Fill color for a slot with no item placed yet."
|
|
452
483
|
@tier "presentation"
|
|
@@ -465,13 +496,14 @@ orbital LearnArrangementOrbital {
|
|
|
465
496
|
slotY : number = 70
|
|
466
497
|
@label "Slot Row Y (px)"
|
|
467
498
|
@tier "presentation"
|
|
468
|
-
slotFontSize :
|
|
469
|
-
@label "Slot
|
|
499
|
+
slotFontSize : string = "sm"
|
|
500
|
+
@label "Slot Text Size"
|
|
501
|
+
@description "Slot label size role: xs, sm, base or lg."
|
|
470
502
|
@tier "presentation"
|
|
471
|
-
slotBorderColor : string = "
|
|
503
|
+
slotBorderColor : string = "ink"
|
|
472
504
|
@label "Slot Border Color"
|
|
473
505
|
@tier "presentation"
|
|
474
|
-
slotTextColor : string = "
|
|
506
|
+
slotTextColor : string = "label"
|
|
475
507
|
@label "Slot Text Color"
|
|
476
508
|
@tier "presentation"
|
|
477
509
|
undoLabel : string = "Undo"
|