@classytic/labs 0.1.0 → 0.2.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/dist/_virtual/_rolldown/runtime.mjs +18 -0
- package/dist/biology/enzyme-rate/preset.mjs +5 -5
- package/dist/biology/genetic-cross/core.d.mts +7 -7
- package/dist/biology/genetic-cross/core.mjs +4 -4
- package/dist/biology/genetic-cross/grid.mjs +132 -123
- package/dist/biology/genetic-cross/preset.mjs +4 -4
- package/dist/biology/genetic-cross/sex-linked.mjs +7 -7
- package/dist/biology/photosynthesis-factors/preset.mjs +8 -8
- package/dist/biology/respiration/preset.mjs +4 -4
- package/dist/biology/sequence/central-dogma.mjs +5 -5
- package/dist/biology/sequence/core.d.mts +6 -6
- package/dist/biology/sequence/core.mjs +1 -1
- package/dist/biology/sequence/preset.mjs +6 -6
- package/dist/blocks/authoring.mjs +5 -5
- package/dist/blocks/biology.d.mts +2 -2
- package/dist/blocks/biology.mjs +5 -5
- package/dist/blocks/chem.d.mts +2 -2
- package/dist/blocks/chem.mjs +13 -13
- package/dist/blocks/circuits.d.mts +293 -4
- package/dist/blocks/circuits.mjs +874 -9
- package/dist/blocks/discrete.d.mts +30 -2
- package/dist/blocks/discrete.mjs +74 -4
- package/dist/blocks/economics.mjs +1 -1
- package/dist/blocks/geography.mjs +1 -1
- package/dist/blocks/geometry.mjs +3 -3
- package/dist/blocks/ict.d.mts +90 -1
- package/dist/blocks/ict.mjs +217 -7
- package/dist/blocks/index.d.mts +3064 -657
- package/dist/blocks/index.mjs +9 -9
- package/dist/blocks/lab-block.mjs +5 -5
- package/dist/blocks/lab-config.d.mts +1 -1
- package/dist/blocks/lab-config.mjs +4 -4
- package/dist/blocks/lab-gallery.d.mts +1 -1
- package/dist/blocks/lab-gallery.mjs +2 -2
- package/dist/blocks/language.d.mts +6 -6
- package/dist/blocks/language.mjs +12 -12
- package/dist/blocks/lesson.mjs +4 -4
- package/dist/blocks/math.d.mts +577 -11
- package/dist/blocks/math.mjs +1648 -14
- package/dist/blocks/ml.d.mts +45 -1
- package/dist/blocks/ml.mjs +80 -6
- package/dist/blocks/physics.d.mts +9 -4
- package/dist/blocks/physics.mjs +75 -28
- package/dist/blocks/statistics.mjs +1 -1
- package/dist/build/CircuitEditor.d.mts +14 -0
- package/dist/build/CircuitEditor.mjs +787 -0
- package/dist/build/CircuitPlayer.d.mts +19 -0
- package/dist/build/CircuitPlayer.mjs +53 -0
- package/dist/build/CircuitScene.d.mts +61 -0
- package/dist/build/CircuitScene.mjs +383 -0
- package/dist/build/contract.d.mts +116 -0
- package/dist/build/editor-ops.d.mts +65 -0
- package/dist/build/editor-ops.mjs +306 -0
- package/dist/build/editor-ui.mjs +121 -0
- package/dist/build/flow.d.mts +14 -0
- package/dist/build/flow.mjs +119 -0
- package/dist/build/index.d.mts +10 -0
- package/dist/build/index.mjs +10 -0
- package/dist/build/parts/ammeter.d.mts +1 -0
- package/dist/build/parts/ammeter.mjs +32 -0
- package/dist/build/parts/bulb.d.mts +1 -0
- package/dist/build/parts/bulb.mjs +50 -0
- package/dist/build/parts/capacitor.d.mts +1 -0
- package/dist/build/parts/capacitor.mjs +26 -0
- package/dist/build/parts/cell.d.mts +1 -0
- package/dist/build/parts/cell.mjs +40 -0
- package/dist/build/parts/diode.d.mts +1 -0
- package/dist/build/parts/diode.mjs +33 -0
- package/dist/build/parts/index.d.mts +5 -0
- package/dist/build/parts/index.mjs +43 -0
- package/dist/build/parts/mosfet.d.mts +1 -0
- package/dist/build/parts/mosfet.mjs +95 -0
- package/dist/build/parts/node.d.mts +1 -0
- package/dist/build/parts/node.mjs +32 -0
- package/dist/build/parts/resistor.d.mts +1 -0
- package/dist/build/parts/resistor.mjs +49 -0
- package/dist/build/parts/shared.mjs +42 -0
- package/dist/build/parts/switch.d.mts +1 -0
- package/dist/build/parts/switch.mjs +34 -0
- package/dist/build/parts.d.mts +1 -0
- package/dist/build/registry.d.mts +9 -0
- package/dist/build/registry.mjs +15 -0
- package/dist/build/solve.d.mts +8 -0
- package/dist/build/solve.mjs +0 -0
- package/dist/catalog/registry.d.mts +2 -2
- package/dist/catalog/templates.d.mts +1 -1
- package/dist/catalog/templates.mjs +6 -6
- package/dist/chem/battery.mjs +1 -1
- package/dist/chem/bohr-atom.mjs +4 -4
- package/dist/chem/diffusion/preset.mjs +4 -4
- package/dist/chem/electrochem/preset.mjs +5 -5
- package/dist/chem/equilibrium/preset.d.mts +1 -1
- package/dist/chem/equilibrium/preset.mjs +6 -6
- package/dist/chem/gas-box/preset.mjs +6 -6
- package/dist/chem/kinetics/preset.mjs +6 -6
- package/dist/chem/periodic-trends/preset.mjs +7 -7
- package/dist/chem/reaction-lab.mjs +3 -3
- package/dist/chem/reaction-profile.mjs +4 -4
- package/dist/chem/solution/dilution.mjs +6 -6
- package/dist/chem/solution/field.d.mts +2 -2
- package/dist/chem/solution/field.mjs +2 -2
- package/dist/chem/solution/solution-box.mjs +7 -7
- package/dist/chem/stoichiometry/preset.mjs +5 -5
- package/dist/chem/titration/preset.mjs +5 -5
- package/dist/circuits/ac-dc/asset.mjs +1 -1
- package/dist/circuits/ac-dc/preset.mjs +2 -2
- package/dist/circuits/brownout/index.d.mts +1 -0
- package/dist/circuits/brownout/preset.d.mts +22 -0
- package/dist/circuits/brownout/preset.mjs +399 -0
- package/dist/circuits/capacitor-leak/preset.mjs +13 -8
- package/dist/circuits/circuit/asset.mjs +71 -14
- package/dist/circuits/circuit/preset.mjs +23 -5
- package/dist/circuits/circuit-builder.mjs +60 -132
- package/dist/circuits/circuit-lab.mjs +60 -40
- package/dist/circuits/cmos-gate/index.d.mts +1 -0
- package/dist/circuits/cmos-gate/preset.d.mts +75 -0
- package/dist/circuits/cmos-gate/preset.mjs +1491 -0
- package/dist/circuits/diode/index.d.mts +1 -0
- package/dist/circuits/diode/preset.d.mts +25 -0
- package/dist/circuits/diode/preset.mjs +266 -0
- package/dist/circuits/index.d.mts +7 -1
- package/dist/circuits/index.mjs +7 -1
- package/dist/circuits/rc-charging/index.d.mts +1 -0
- package/dist/circuits/rc-charging/preset.d.mts +27 -0
- package/dist/circuits/rc-charging/preset.mjs +329 -0
- package/dist/circuits/semiconductor/index.d.mts +1 -0
- package/dist/circuits/semiconductor/preset.d.mts +102 -0
- package/dist/circuits/semiconductor/preset.mjs +1855 -0
- package/dist/circuits/transistor/index.d.mts +1 -0
- package/dist/circuits/transistor/preset.d.mts +27 -0
- package/dist/circuits/transistor/preset.mjs +329 -0
- package/dist/commerce/accounting/core.d.mts +1 -1
- package/dist/commerce/accounting/equation-balance.mjs +5 -5
- package/dist/commerce/accounting/journal-poster.mjs +8 -8
- package/dist/commerce/accounting/statement-sorter.mjs +4 -4
- package/dist/commerce/economics/core.d.mts +2 -2
- package/dist/commerce/economics/core.mjs +1 -1
- package/dist/commerce/economics/demand-shift-vs-move.mjs +6 -6
- package/dist/commerce/economics/elasticity-revenue.mjs +6 -6
- package/dist/commerce/economics/market-equilibrium.mjs +5 -5
- package/dist/core/easing.d.mts +3 -3
- package/dist/core/easing.mjs +2 -2
- package/dist/core/numeric.d.mts +3 -3
- package/dist/core/numeric.mjs +2 -2
- package/dist/core/reactive.d.mts +1 -1
- package/dist/core/reactive.mjs +1 -1
- package/dist/core/rng.d.mts +2 -2
- package/dist/core/rng.mjs +1 -1
- package/dist/core/tex.mjs +2 -2
- package/dist/core/timeline.d.mts +1 -1
- package/dist/core/timeline.mjs +1 -1
- package/dist/core/util.mjs +11 -1
- package/dist/discrete/arrangements/preset.mjs +6 -14
- package/dist/discrete/bayes/preset.mjs +43 -35
- package/dist/discrete/binomial/preset.mjs +2 -2
- package/dist/discrete/combination-studio/figure.d.mts +6 -0
- package/dist/discrete/combination-studio/figure.mjs +159 -0
- package/dist/discrete/combination-studio/index.d.mts +2 -0
- package/dist/discrete/combination-studio/preset.d.mts +44 -0
- package/dist/discrete/combination-studio/preset.mjs +440 -0
- package/dist/discrete/core/combinatorics.d.mts +23 -3
- package/dist/discrete/core/combinatorics.mjs +38 -3
- package/dist/discrete/core/pigeonhole.d.mts +1 -1
- package/dist/discrete/core/pigeonhole.mjs +1 -1
- package/dist/discrete/core/probability.d.mts +3 -3
- package/dist/discrete/core/probability.mjs +3 -3
- package/dist/discrete/core/sets.d.mts +1 -1
- package/dist/discrete/counting-slots/preset.mjs +8 -8
- package/dist/discrete/counting-tree/preset.mjs +65 -8
- package/dist/discrete/expected-value/preset.mjs +13 -13
- package/dist/discrete/hypergeometric/preset.mjs +48 -15
- package/dist/discrete/index.d.mts +4 -2
- package/dist/discrete/index.mjs +4 -2
- package/dist/discrete/karnaugh/preset.mjs +26 -20
- package/dist/discrete/lln/preset.mjs +44 -3
- package/dist/discrete/logic-circuit/preset.mjs +2 -2
- package/dist/discrete/monte-carlo/preset.d.mts +1 -1
- package/dist/discrete/monte-carlo/preset.mjs +14 -14
- package/dist/discrete/monty-hall/preset.mjs +6 -6
- package/dist/discrete/outcome-builder/preset.mjs +3 -3
- package/dist/discrete/pascal/preset.mjs +37 -7
- package/dist/discrete/rules.d.mts +20 -0
- package/dist/discrete/rules.mjs +264 -0
- package/dist/discrete/sample-space/preset.mjs +4 -4
- package/dist/discrete/selection/preset.mjs +7 -13
- package/dist/discrete/truth-table/preset.mjs +32 -9
- package/dist/discrete/venn/preset.mjs +71 -48
- package/dist/geography/cycle-lab/preset.mjs +17 -10
- package/dist/geography/cycles.d.mts +3 -3
- package/dist/geography/cycles.mjs +3 -3
- package/dist/geometry/board/preset.d.mts +2 -0
- package/dist/geometry/board/preset.mjs +11 -15
- package/dist/geometry/builder.mjs +3 -3
- package/dist/ict/number-systems/base-odometer.mjs +4 -4
- package/dist/ict/number-systems/bit-grouper.d.mts +1 -1
- package/dist/ict/number-systems/bit-grouper.mjs +4 -4
- package/dist/ict/number-systems/place-value-dial.d.mts +1 -1
- package/dist/ict/number-systems/place-value-dial.mjs +3 -3
- package/dist/ict/number-systems/wheel.d.mts +3 -3
- package/dist/ict/number-systems/wheel.mjs +4 -4
- package/dist/kit/annotate.mjs +3 -3
- package/dist/kit/answer-check.d.mts +2 -2
- package/dist/kit/answer-check.mjs +34 -6
- package/dist/kit/ask.d.mts +19 -0
- package/dist/kit/ask.mjs +46 -0
- package/dist/kit/bar-strip.mjs +53 -0
- package/dist/kit/calc.d.mts +33 -0
- package/dist/kit/calc.mjs +27 -0
- package/dist/kit/carrier-engine.mjs +147 -0
- package/dist/kit/clue-scene.d.mts +86 -0
- package/dist/kit/clue-scene.mjs +424 -0
- package/dist/kit/cluster.d.mts +30 -0
- package/dist/kit/cluster.mjs +81 -0
- package/dist/kit/controls.mjs +11 -5
- package/dist/kit/coords.d.mts +88 -0
- package/dist/kit/coords.mjs +192 -0
- package/dist/kit/data-scene.d.mts +27 -0
- package/dist/kit/data-scene.mjs +199 -0
- package/dist/kit/diagram.mjs +111 -50
- package/dist/kit/electronics.mjs +552 -60
- package/dist/kit/expr-analysis.d.mts +18 -6
- package/dist/kit/expr-analysis.mjs +82 -28
- package/dist/kit/frame.d.mts +3 -3
- package/dist/kit/frame.mjs +25 -6
- package/dist/kit/gameshow.mjs +2 -2
- package/dist/kit/index.d.mts +14 -2
- package/dist/kit/index.mjs +13 -1
- package/dist/kit/logic-gates.mjs +246 -47
- package/dist/kit/palette.mjs +26 -0
- package/dist/kit/pedagogy.d.mts +4 -4
- package/dist/kit/pedagogy.mjs +21 -17
- package/dist/kit/play.d.mts +1 -1
- package/dist/kit/play.mjs +3 -3
- package/dist/kit/predict.d.mts +55 -0
- package/dist/kit/predict.mjs +146 -0
- package/dist/kit/receipt.d.mts +29 -0
- package/dist/kit/receipt.mjs +94 -0
- package/dist/kit/rich.mjs +2 -2
- package/dist/kit/rule.d.mts +59 -0
- package/dist/kit/rule.mjs +215 -0
- package/dist/kit/scale.mjs +1 -1
- package/dist/kit/scene-library.d.mts +22 -0
- package/dist/kit/scene-library.mjs +311 -0
- package/dist/kit/scene-studio.d.mts +14 -0
- package/dist/kit/scene-studio.mjs +338 -0
- package/dist/kit/scenes.d.mts +31 -0
- package/dist/kit/scenes.mjs +569 -0
- package/dist/kit/slot-fill.d.mts +61 -0
- package/dist/kit/slot-fill.mjs +207 -0
- package/dist/kit/solve.d.mts +21 -0
- package/dist/kit/solve.mjs +75 -0
- package/dist/kit/space.mjs +5 -5
- package/dist/kit/steps.mjs +2 -2
- package/dist/kit/vessel.d.mts +69 -0
- package/dist/kit/vessel.mjs +191 -0
- package/dist/language/agreement/preset.mjs +2 -2
- package/dist/language/article-lens/preset.d.mts +1 -1
- package/dist/language/article-lens/preset.mjs +8 -8
- package/dist/language/deck.d.mts +3 -3
- package/dist/language/deck.mjs +1 -1
- package/dist/language/preposition-scene/preset.d.mts +2 -2
- package/dist/language/preposition-scene/preset.mjs +5 -5
- package/dist/language/sentence-builder/preset.mjs +5 -5
- package/dist/language/transform/preset.d.mts +2 -2
- package/dist/language/transform/preset.mjs +5 -5
- package/dist/language/ui.d.mts +3 -3
- package/dist/language/ui.mjs +4 -4
- package/dist/language/word-match/preset.mjs +3 -3
- package/dist/logic/LogicBuildLab.d.mts +22 -0
- package/dist/logic/LogicBuildLab.mjs +170 -0
- package/dist/logic/LogicEditScene.d.mts +31 -0
- package/dist/logic/LogicEditScene.mjs +276 -0
- package/dist/logic/LogicEditor.d.mts +14 -0
- package/dist/logic/LogicEditor.mjs +413 -0
- package/dist/logic/LogicScene.d.mts +32 -0
- package/dist/logic/LogicScene.mjs +277 -0
- package/dist/logic/contract.d.mts +72 -0
- package/dist/logic/display.d.mts +24 -0
- package/dist/logic/display.mjs +127 -0
- package/dist/logic/edit-ops.d.mts +44 -0
- package/dist/logic/edit-ops.mjs +177 -0
- package/dist/logic/evaluate.d.mts +11 -0
- package/dist/logic/evaluate.mjs +93 -0
- package/dist/logic/gates.d.mts +10 -0
- package/dist/logic/gates.mjs +73 -0
- package/dist/logic/index.d.mts +14 -0
- package/dist/logic/index.mjs +13 -0
- package/dist/logic/lab.d.mts +32 -0
- package/dist/logic/lab.mjs +160 -0
- package/dist/logic/presets.d.mts +12 -0
- package/dist/logic/presets.mjs +241 -0
- package/dist/logic/registry.d.mts +9 -0
- package/dist/logic/registry.mjs +15 -0
- package/dist/math/area-model/preset.mjs +70 -44
- package/dist/math/balance-algebra/preset.mjs +14 -5
- package/dist/math/broken-tree/index.d.mts +1 -0
- package/dist/math/broken-tree/preset.d.mts +26 -0
- package/dist/math/broken-tree/preset.mjs +435 -0
- package/dist/math/circle/index.d.mts +1 -0
- package/dist/math/circle/preset.d.mts +44 -0
- package/dist/math/circle/preset.mjs +198 -0
- package/dist/math/complex/core.d.mts +93 -0
- package/dist/math/complex/core.mjs +239 -0
- package/dist/math/complex/index.d.mts +3 -0
- package/dist/math/complex/preset.d.mts +31 -0
- package/dist/math/complex/preset.mjs +377 -0
- package/dist/math/complex/rules.d.mts +6 -0
- package/dist/math/complex/rules.mjs +121 -0
- package/dist/math/conic/index.d.mts +1 -0
- package/dist/math/conic/preset.d.mts +30 -0
- package/dist/math/conic/preset.mjs +334 -0
- package/dist/math/derivation.mjs +5 -5
- package/dist/math/derivative-explorer/preset.mjs +5 -5
- package/dist/math/domain-range/index.d.mts +1 -0
- package/dist/math/domain-range/preset.d.mts +33 -0
- package/dist/math/domain-range/preset.mjs +313 -0
- package/dist/math/fraction-bar/index.d.mts +1 -0
- package/dist/math/fraction-bar/preset.d.mts +27 -0
- package/dist/math/fraction-bar/preset.mjs +197 -0
- package/dist/math/function-machine/preset.mjs +2 -2
- package/dist/math/gradient-descent.mjs +6 -6
- package/dist/math/grapher/preset.d.mts +1 -1
- package/dist/math/grapher/preset.mjs +4 -4
- package/dist/math/harmonic-form/preset.mjs +6 -6
- package/dist/math/index.d.mts +27 -2
- package/dist/math/index.mjs +27 -2
- package/dist/math/integral-explorer/preset.mjs +2 -2
- package/dist/math/interactive/preset.mjs +3 -3
- package/dist/math/limit-explorer/preset.mjs +4 -4
- package/dist/math/linear-model/index.d.mts +1 -0
- package/dist/math/linear-model/preset.d.mts +53 -0
- package/dist/math/linear-model/preset.mjs +164 -0
- package/dist/math/linear-system/preset.mjs +4 -4
- package/dist/math/mystery-bucket/preset.mjs +6 -6
- package/dist/math/number-line/preset.mjs +3 -2
- package/dist/math/parabola/preset.mjs +4 -3
- package/dist/math/pattern/preset.mjs +7 -13
- package/dist/math/percent-bar/index.d.mts +1 -0
- package/dist/math/percent-bar/preset.d.mts +37 -0
- package/dist/math/percent-bar/preset.mjs +275 -0
- package/dist/math/poly/core.d.mts +50 -0
- package/dist/math/poly/core.mjs +268 -0
- package/dist/math/poly/index.d.mts +3 -0
- package/dist/math/poly/preset.d.mts +23 -0
- package/dist/math/poly/preset.mjs +141 -0
- package/dist/math/poly/steps.d.mts +10 -0
- package/dist/math/poly/steps.mjs +99 -0
- package/dist/math/rate-machine/index.d.mts +1 -0
- package/dist/math/rate-machine/preset.d.mts +35 -0
- package/dist/math/rate-machine/preset.mjs +281 -0
- package/dist/math/ratio-share/index.d.mts +1 -0
- package/dist/math/ratio-share/preset.d.mts +24 -0
- package/dist/math/ratio-share/preset.mjs +204 -0
- package/dist/math/receipt/index.d.mts +1 -0
- package/dist/math/receipt/preset.d.mts +22 -0
- package/dist/math/receipt/preset.mjs +137 -0
- package/dist/math/sequence-predict/index.d.mts +1 -0
- package/dist/math/sequence-predict/preset.d.mts +34 -0
- package/dist/math/sequence-predict/preset.mjs +130 -0
- package/dist/math/straight-line/index.d.mts +1 -0
- package/dist/math/straight-line/preset.d.mts +37 -0
- package/dist/math/straight-line/preset.mjs +374 -0
- package/dist/math/system-solve/index.d.mts +1 -0
- package/dist/math/system-solve/preset.d.mts +21 -0
- package/dist/math/system-solve/preset.mjs +227 -0
- package/dist/math/transform/index.d.mts +1 -0
- package/dist/math/transform/preset.d.mts +41 -0
- package/dist/math/transform/preset.mjs +343 -0
- package/dist/math/triangle-trig/preset.mjs +12 -9
- package/dist/math/trig/core.d.mts +37 -0
- package/dist/math/trig/core.mjs +150 -0
- package/dist/math/trig/diagrams.d.mts +1 -0
- package/dist/math/trig/diagrams.mjs +321 -0
- package/dist/math/trig/index.d.mts +3 -0
- package/dist/math/trig/preset.d.mts +25 -0
- package/dist/math/trig/preset.mjs +260 -0
- package/dist/math/trig/rules.d.mts +6 -0
- package/dist/math/trig/rules.mjs +159 -0
- package/dist/math/trig-explorer.mjs +4 -4
- package/dist/ml/boundary/preset.mjs +8 -3
- package/dist/ml/classifier/preset.mjs +31 -6
- package/dist/ml/kmeans/preset.mjs +4 -4
- package/dist/ml/knn/preset.mjs +47 -12
- package/dist/ml/regression/preset.mjs +36 -7
- package/dist/physics/atwood/preset.mjs +4 -4
- package/dist/physics/bullet-walls/preset.d.mts +1 -1
- package/dist/physics/bullet-walls/preset.mjs +7 -7
- package/dist/physics/carnot/preset.mjs +6 -6
- package/dist/physics/circular-motion/preset.mjs +36 -5
- package/dist/physics/collision-track/preset.mjs +35 -5
- package/dist/physics/efficiency/preset.d.mts +2 -2
- package/dist/physics/efficiency/preset.mjs +5 -5
- package/dist/physics/electric-field/preset.mjs +32 -23
- package/dist/physics/electric-flux/index.d.mts +1 -0
- package/dist/physics/electric-flux/preset.d.mts +29 -0
- package/dist/physics/electric-flux/preset.mjs +264 -0
- package/dist/physics/energy-skate/preset.mjs +5 -5
- package/dist/physics/entropy/preset.mjs +7 -7
- package/dist/physics/expansion/preset.mjs +13 -13
- package/dist/physics/exponential/asset.mjs +1 -1
- package/dist/physics/exponential/preset.mjs +4 -4
- package/dist/physics/gas-process/preset.mjs +3 -3
- package/dist/physics/gauss-law/index.d.mts +1 -0
- package/dist/physics/gauss-law/preset.d.mts +20 -0
- package/dist/physics/gauss-law/preset.mjs +286 -0
- package/dist/physics/gravitation/preset.mjs +7 -7
- package/dist/physics/gravity-drop.mjs +4 -4
- package/dist/physics/heat-transfer/preset.d.mts +1 -1
- package/dist/physics/heat-transfer/preset.mjs +10 -10
- package/dist/physics/impulse/preset.mjs +5 -5
- package/dist/physics/index.d.mts +4 -1
- package/dist/physics/index.mjs +4 -1
- package/dist/physics/kepler/preset.mjs +4 -4
- package/dist/physics/lever/preset.mjs +3 -3
- package/dist/physics/lorentz/preset.mjs +11 -11
- package/dist/physics/magnetism/preset.mjs +3 -3
- package/dist/physics/optics/preset.mjs +2 -2
- package/dist/physics/orbit-lab.mjs +5 -5
- package/dist/physics/projectile-lab.mjs +4 -4
- package/dist/physics/rain-relative/preset.mjs +5 -5
- package/dist/physics/ramp-forces/preset.mjs +5 -5
- package/dist/physics/river-boat.mjs +6 -6
- package/dist/physics/shm/preset.mjs +9 -9
- package/dist/physics/stopping-distance/preset.mjs +3 -3
- package/dist/physics/temperature-scales/preset.mjs +105 -116
- package/dist/physics/terminal-velocity/preset.mjs +5 -5
- package/dist/physics/thermal/preset.mjs +5 -5
- package/dist/physics/vector-board/preset.mjs +7 -6
- package/dist/physics/vector-scene.mjs +2 -2
- package/dist/physics/vector-types/preset.mjs +37 -3
- package/dist/physics/water-density/preset.mjs +12 -12
- package/dist/physics/waves/doppler.mjs +2 -2
- package/dist/physics/waves/preset.mjs +4 -4
- package/dist/physics/waves/ripple.mjs +6 -6
- package/dist/physics/waves/string.mjs +5 -5
- package/dist/physics/work-energy/preset.mjs +4 -4
- package/dist/physics/work-potential/index.d.mts +1 -0
- package/dist/physics/work-potential/preset.d.mts +20 -0
- package/dist/physics/work-potential/preset.mjs +276 -0
- package/dist/schemas/index.d.mts +6 -6
- package/dist/schemas/index.mjs +3 -3
- package/dist/statistics/center-spread/preset.mjs +3 -3
- package/dist/statistics/core/descriptive.d.mts +2 -2
- package/dist/statistics/core/descriptive.mjs +2 -2
- package/dist/statistics/core/normal.d.mts +3 -3
- package/dist/statistics/core/normal.mjs +3 -3
- package/dist/statistics/core/sequences.d.mts +1 -1
- package/dist/statistics/galton/preset.mjs +2 -2
- package/dist/statistics/histogram/preset.mjs +6 -6
- package/dist/statistics/normal/preset.mjs +2 -2
- package/dist/statistics/sampling/preset.mjs +4 -4
- package/dist/statistics/sequence/preset.mjs +58 -15
- package/dist/statistics/z-table/preset.mjs +17 -4
- package/package.json +11 -3
- package/styles.css +4 -1
package/dist/blocks/index.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { coerceArray } from "./authoring.mjs";
|
|
2
2
|
import { LabConfig } from "./lab-config.mjs";
|
|
3
|
-
import { AtwoodBlock, BulletWallsBlock, CarnotBlock, CircularMotionBlock, CollisionTrackBlock, DopplerBlock, EfficiencyBlock, EnergySkateBlock, EntropyBlock, GasProcessBlock, GravitationBlock, GravityDropBlock, HeatTransferBlock, HeatingCurveBlock, ImpulseBlock, KeplerBlock, LeverBlock, LeverPuzzle, LorentzBlock, MagnetismBlock, OpticsBlock, OrbitLabBlock, ProjectileLabBlock, RainRelativeBlock, RampForcesBlock, RippleTankBlock, RiverBoatBlock, SimpleHarmonicBlock, StoppingDistanceBlock, StringReflectionBlock, TemperatureScalesBlock, TerminalVelocityBlock, ThermalExpansionBlock, VectorBoardBlock, VectorTypesBlock, WaterDensityBlock, WaveBlock, physicsBlocks, physicsComponents } from "./physics.mjs";
|
|
4
|
-
import { AreaModelBlock, BalanceAlgebraBlock, DerivationBlock, DerivativeExplorerBlock, GradientDescentBlock, GraphBlock, GrowingPatternBlock, IntegralExplorerBlock, InteractiveProblemBlock, LimitExplorerBlock, LinearSystemBlock, LinearSystemView, MysteryBucketBlock, NumberLineBlock, TriangleTrigBlock, TrigExplorerBlock, VertexParabolaBlock, mathBlocks, mathComponents } from "./math.mjs";
|
|
3
|
+
import { AtwoodBlock, BulletWallsBlock, CarnotBlock, CircularMotionBlock, CollisionTrackBlock, DopplerBlock, EfficiencyBlock, ElectricFieldBlock, ElectricFluxBlock, EnergySkateBlock, EntropyBlock, GasProcessBlock, GaussLawBlock, GravitationBlock, GravityDropBlock, HeatTransferBlock, HeatingCurveBlock, ImpulseBlock, KeplerBlock, LeverBlock, LeverPuzzle, LorentzBlock, MagnetismBlock, OpticsBlock, OrbitLabBlock, ProjectileLabBlock, RainRelativeBlock, RampForcesBlock, RippleTankBlock, RiverBoatBlock, SimpleHarmonicBlock, StoppingDistanceBlock, StringReflectionBlock, TemperatureScalesBlock, TerminalVelocityBlock, ThermalExpansionBlock, VectorBoardBlock, VectorTypesBlock, WaterDensityBlock, WaveBlock, WorkEnergyBlock, WorkPotentialBlock, physicsBlocks, physicsComponents } from "./physics.mjs";
|
|
4
|
+
import { AreaModelBlock, BalanceAlgebraBlock, CircleBlock, ComplexPlaneBlock, ConicBlock, CustomSceneBlock, DerivationBlock, DerivativeExplorerBlock, DomainRangeBlock, FractionBarBlock, GeoTransformBlock, GradientDescentBlock, GraphBlock, GrowingPatternBlock, IntegralExplorerBlock, InteractiveProblemBlock, LimitExplorerBlock, LinearModelBlock, LinearSystemBlock, LinearSystemView, MysteryBucketBlock, NumberLineBlock, PercentBarBlock, PolynomialSolverBlock, RateMachineBlock, RatioShareBlock, ReceiptBlock, SequencePredictBlock, StraightLineBlock, SystemSolveBlock, TriangleTrigBlock, TrigExplorerBlock, TrigSignsBlock, VertexParabolaBlock, mathBlocks, mathComponents } from "./math.mjs";
|
|
5
5
|
import { BatteryBlock, BohrAtomBlock, DilutionBlock, ElectrochemBlock, GasBoxBlock, KineticsBlock, LeChatelierBlock, PeriodicTrendsBlock, ReactionLabBlock, ReactionProfileBlock, SolutionBoxBlock, StoichiometryBlock, TitrationBlock, chemBlocks, chemComponents } from "./chem.mjs";
|
|
6
|
-
import { CapacitorLeakBlock, CircuitBlock, CircuitBuilderBlock, CircuitLabBlock, CircuitPuzzle, circuitsBlocks, circuitsComponents } from "./circuits.mjs";
|
|
6
|
+
import { BjtInsideBlock, BrownoutBlock, CapacitorLeakBlock, CircuitBlock, CircuitBuilderBlock, CircuitLabBlock, CircuitPuzzle, CircuitSceneBlock, CircuitSceneView, CmosInverterBlock, CmosNandBlock, CmosNorBlock, ConductionBlock, DiodeBlock, HallEffectBlock, MosfetInsideBlock, PnJunctionBlock, RCChargingBlock, RNmosNotBlock, SiliconLatticeBlock, TransistorBlock, circuitsBlocks, circuitsComponents } from "./circuits.mjs";
|
|
7
7
|
import { GeometryBoardBlock, IntersectingCirclesBlock, geometryBlocks, geometryComponents } from "./geometry.mjs";
|
|
8
|
-
import { BaseOdometerBlock, BitGrouperBlock, PlaceValueDialBlock, ictBlocks, ictComponents } from "./ict.mjs";
|
|
8
|
+
import { BaseOdometerBlock, BinaryDisplayBlock, BitGrouperBlock, LogicBuilderBlock, LogicGateBlock, PlaceValueDialBlock, ictBlocks, ictComponents } from "./ict.mjs";
|
|
9
9
|
import { AgreementBlock, ArticleLensBlock, PrepositionBlock, SentenceBuilderBlock, TransformBlock, WordMatchBlock, languageBlocks, languageComponents } from "./language.mjs";
|
|
10
10
|
import { EquationBalanceBlock, JournalPosterBlock, StatementSorterBlock, accountingBlocks, accountingComponents } from "./accounting.mjs";
|
|
11
11
|
import { DemandShiftVsMoveBlock, ElasticityRevenueBlock, MarketEquilibriumBlock, economicsBlocks, economicsComponents } from "./economics.mjs";
|
|
12
12
|
import { CentralDogmaBlock, EnzymeRateBlock, GeneticCrossBlock, PhotosynthesisFactorsBlock, PunnettCrossBlock, RespirationBlock, SequenceBlock, SexLinkedCrossBlock, biologyBlocks, biologyComponents } from "./biology.mjs";
|
|
13
13
|
import { CycleBlock, geographyBlocks, geographyComponents } from "./geography.mjs";
|
|
14
|
-
import { ClassifierThresholdBlock, KMeansBlock, RegressionBlock, mlBlocks, mlComponents } from "./ml.mjs";
|
|
15
|
-
import { ArrangementsBlock, BayesBlock, BinomialBlock, BooleanCircuitBlock, CountingSlotsBlock, CountingTreeBlock, ExpectedValueBlock, HypergeometricBlock, KarnaughBlock, LawOfLargeNumbersBlock, MonteCarloBlock, MontyHallBlock, OutcomeBuilderBlock, PascalBlock, SampleSpaceBlock, SelectionBlock, TruthTableBlock, VennBlock, discreteBlocks, discreteComponents } from "./discrete.mjs";
|
|
14
|
+
import { ClassifierThresholdBlock, DecisionBoundaryBlock, KMeansBlock, KnnBoundaryBlock, RegressionBlock, mlBlocks, mlComponents } from "./ml.mjs";
|
|
15
|
+
import { ArrangementsBlock, BayesBlock, BinomialBlock, BooleanCircuitBlock, CombinationStudioBlock, CountingSlotsBlock, CountingTreeBlock, ExpectedValueBlock, HypergeometricBlock, KarnaughBlock, LawOfLargeNumbersBlock, MonteCarloBlock, MontyHallBlock, OutcomeBuilderBlock, PascalBlock, RuleCardBlock, SampleSpaceBlock, SelectionBlock, TruthTableBlock, VennBlock, discreteBlocks, discreteComponents } from "./discrete.mjs";
|
|
16
16
|
import { CenterSpreadBlock, GaltonBlock, HistogramBlock, NormalBlock, SamplingBlock, SeriesBlock, ZTableBlock, statisticsBlocks, statisticsComponents } from "./statistics.mjs";
|
|
17
17
|
import { PredictBlock, PredictWidget, lessonBlocks, lessonComponents } from "./lesson.mjs";
|
|
18
18
|
import { LabGallery } from "./lab-gallery.mjs";
|
|
19
19
|
|
|
20
20
|
//#region src/blocks/index.tsx
|
|
21
|
-
/** Every lab block
|
|
21
|
+
/** Every lab block, pass to `<CmsBlockEditor blocks={labsBlocks}>` (slash menu). */
|
|
22
22
|
const labsBlocks = [
|
|
23
23
|
...lessonBlocks,
|
|
24
24
|
...languageBlocks,
|
|
@@ -36,7 +36,7 @@ const labsBlocks = [
|
|
|
36
36
|
...discreteBlocks,
|
|
37
37
|
...statisticsBlocks
|
|
38
38
|
];
|
|
39
|
-
/** MDX render map
|
|
39
|
+
/** MDX render map, merge into the host's `blockComponents` (tag → component).
|
|
40
40
|
* Tags match each block's `tag` so editor + player render the same component.
|
|
41
41
|
* Tags are unique across domains, so spread order is irrelevant. */
|
|
42
42
|
const labsComponents = {
|
|
@@ -117,4 +117,4 @@ const labGalleryItems = [
|
|
|
117
117
|
];
|
|
118
118
|
|
|
119
119
|
//#endregion
|
|
120
|
-
export { AgreementBlock, AreaModelBlock, ArrangementsBlock, ArticleLensBlock, AtwoodBlock, BalanceAlgebraBlock, BaseOdometerBlock, BatteryBlock, BayesBlock, BinomialBlock, BitGrouperBlock, BohrAtomBlock, BooleanCircuitBlock, BulletWallsBlock, CapacitorLeakBlock, CarnotBlock, CenterSpreadBlock, CentralDogmaBlock, CircuitBlock, CircuitBuilderBlock, CircuitLabBlock, CircuitPuzzle, CircularMotionBlock, ClassifierThresholdBlock, CollisionTrackBlock, CountingSlotsBlock, CountingTreeBlock, CycleBlock, DemandShiftVsMoveBlock, DerivationBlock, DerivativeExplorerBlock, DilutionBlock, DopplerBlock, EfficiencyBlock, ElasticityRevenueBlock, ElectrochemBlock, EnergySkateBlock, EntropyBlock, EnzymeRateBlock, EquationBalanceBlock, ExpectedValueBlock, GaltonBlock, GasBoxBlock, GasProcessBlock, GeneticCrossBlock, GeometryBoardBlock, GradientDescentBlock, GraphBlock, GravitationBlock, GravityDropBlock, GrowingPatternBlock, HeatTransferBlock, HeatingCurveBlock, HistogramBlock, HypergeometricBlock, ImpulseBlock, IntegralExplorerBlock, InteractiveProblemBlock, IntersectingCirclesBlock, JournalPosterBlock, KMeansBlock, KarnaughBlock, KeplerBlock, KineticsBlock, LabConfig, LabGallery, LawOfLargeNumbersBlock, LeChatelierBlock, LeverBlock, LeverPuzzle, LimitExplorerBlock, LinearSystemBlock, LinearSystemView, LorentzBlock, MagnetismBlock, MarketEquilibriumBlock, MonteCarloBlock, MontyHallBlock, MysteryBucketBlock, NormalBlock, NumberLineBlock, OpticsBlock, OrbitLabBlock, OutcomeBuilderBlock, PascalBlock, PeriodicTrendsBlock, PhotosynthesisFactorsBlock, PlaceValueDialBlock, PredictBlock, PredictWidget, PrepositionBlock, ProjectileLabBlock, PunnettCrossBlock, RainRelativeBlock, RampForcesBlock, ReactionLabBlock, ReactionProfileBlock, RegressionBlock, RespirationBlock, RippleTankBlock, RiverBoatBlock, SampleSpaceBlock, SamplingBlock, SelectionBlock, SentenceBuilderBlock, SequenceBlock, SeriesBlock, SexLinkedCrossBlock, SimpleHarmonicBlock, SolutionBoxBlock, StatementSorterBlock, StoichiometryBlock, StoppingDistanceBlock, StringReflectionBlock, TemperatureScalesBlock, TerminalVelocityBlock, ThermalExpansionBlock, TitrationBlock, TransformBlock, TriangleTrigBlock, TrigExplorerBlock, TruthTableBlock, VectorBoardBlock, VectorTypesBlock, VennBlock, VertexParabolaBlock, WaterDensityBlock, WaveBlock, WordMatchBlock, ZTableBlock, accountingBlocks, accountingComponents, biologyBlocks, biologyComponents, chemBlocks, chemComponents, circuitsBlocks, circuitsComponents, coerceArray, discreteBlocks, discreteComponents, economicsBlocks, economicsComponents, geographyBlocks, geographyComponents, geometryBlocks, geometryComponents, ictBlocks, ictComponents, labGalleryItems, labsBlocks, labsComponents, languageBlocks, languageComponents, lessonBlocks, lessonComponents, mathBlocks, mathComponents, mlBlocks, mlComponents, physicsBlocks, physicsComponents, statisticsBlocks, statisticsComponents };
|
|
120
|
+
export { AgreementBlock, AreaModelBlock, ArrangementsBlock, ArticleLensBlock, AtwoodBlock, BalanceAlgebraBlock, BaseOdometerBlock, BatteryBlock, BayesBlock, BinaryDisplayBlock, BinomialBlock, BitGrouperBlock, BjtInsideBlock, BohrAtomBlock, BooleanCircuitBlock, BrownoutBlock, BulletWallsBlock, CapacitorLeakBlock, CarnotBlock, CenterSpreadBlock, CentralDogmaBlock, CircleBlock, CircuitBlock, CircuitBuilderBlock, CircuitLabBlock, CircuitPuzzle, CircuitSceneBlock, CircuitSceneView, CircularMotionBlock, ClassifierThresholdBlock, CmosInverterBlock, CmosNandBlock, CmosNorBlock, CollisionTrackBlock, CombinationStudioBlock, ComplexPlaneBlock, ConductionBlock, ConicBlock, CountingSlotsBlock, CountingTreeBlock, CustomSceneBlock, CycleBlock, DecisionBoundaryBlock, DemandShiftVsMoveBlock, DerivationBlock, DerivativeExplorerBlock, DilutionBlock, DiodeBlock, DomainRangeBlock, DopplerBlock, EfficiencyBlock, ElasticityRevenueBlock, ElectricFieldBlock, ElectricFluxBlock, ElectrochemBlock, EnergySkateBlock, EntropyBlock, EnzymeRateBlock, EquationBalanceBlock, ExpectedValueBlock, FractionBarBlock, GaltonBlock, GasBoxBlock, GasProcessBlock, GaussLawBlock, GeneticCrossBlock, GeoTransformBlock, GeometryBoardBlock, GradientDescentBlock, GraphBlock, GravitationBlock, GravityDropBlock, GrowingPatternBlock, HallEffectBlock, HeatTransferBlock, HeatingCurveBlock, HistogramBlock, HypergeometricBlock, ImpulseBlock, IntegralExplorerBlock, InteractiveProblemBlock, IntersectingCirclesBlock, JournalPosterBlock, KMeansBlock, KarnaughBlock, KeplerBlock, KineticsBlock, KnnBoundaryBlock, LabConfig, LabGallery, LawOfLargeNumbersBlock, LeChatelierBlock, LeverBlock, LeverPuzzle, LimitExplorerBlock, LinearModelBlock, LinearSystemBlock, LinearSystemView, LogicBuilderBlock, LogicGateBlock, LorentzBlock, MagnetismBlock, MarketEquilibriumBlock, MonteCarloBlock, MontyHallBlock, MosfetInsideBlock, MysteryBucketBlock, NormalBlock, NumberLineBlock, OpticsBlock, OrbitLabBlock, OutcomeBuilderBlock, PascalBlock, PercentBarBlock, PeriodicTrendsBlock, PhotosynthesisFactorsBlock, PlaceValueDialBlock, PnJunctionBlock, PolynomialSolverBlock, PredictBlock, PredictWidget, PrepositionBlock, ProjectileLabBlock, PunnettCrossBlock, RCChargingBlock, RNmosNotBlock, RainRelativeBlock, RampForcesBlock, RateMachineBlock, RatioShareBlock, ReactionLabBlock, ReactionProfileBlock, ReceiptBlock, RegressionBlock, RespirationBlock, RippleTankBlock, RiverBoatBlock, RuleCardBlock, SampleSpaceBlock, SamplingBlock, SelectionBlock, SentenceBuilderBlock, SequenceBlock, SequencePredictBlock, SeriesBlock, SexLinkedCrossBlock, SiliconLatticeBlock, SimpleHarmonicBlock, SolutionBoxBlock, StatementSorterBlock, StoichiometryBlock, StoppingDistanceBlock, StraightLineBlock, StringReflectionBlock, SystemSolveBlock, TemperatureScalesBlock, TerminalVelocityBlock, ThermalExpansionBlock, TitrationBlock, TransformBlock, TransistorBlock, TriangleTrigBlock, TrigExplorerBlock, TrigSignsBlock, TruthTableBlock, VectorBoardBlock, VectorTypesBlock, VennBlock, VertexParabolaBlock, WaterDensityBlock, WaveBlock, WordMatchBlock, WorkEnergyBlock, WorkPotentialBlock, ZTableBlock, accountingBlocks, accountingComponents, biologyBlocks, biologyComponents, chemBlocks, chemComponents, circuitsBlocks, circuitsComponents, coerceArray, discreteBlocks, discreteComponents, economicsBlocks, economicsComponents, geographyBlocks, geographyComponents, geometryBlocks, geometryComponents, ictBlocks, ictComponents, labGalleryItems, labsBlocks, labsComponents, languageBlocks, languageComponents, lessonBlocks, lessonComponents, mathBlocks, mathComponents, mlBlocks, mlComponents, physicsBlocks, physicsComponents, statisticsBlocks, statisticsComponents };
|
|
@@ -7,15 +7,15 @@ import { defineBlock } from "@classytic/cms-ui/contract";
|
|
|
7
7
|
|
|
8
8
|
//#region src/blocks/lab-block.tsx
|
|
9
9
|
/**
|
|
10
|
-
* labBlock
|
|
10
|
+
* labBlock, wrap a plain lab component into a CMS block "on call", with ZERO
|
|
11
11
|
* per-lab boilerplate. The host passes the lab component + its zod prop-schema; this
|
|
12
12
|
* returns a `defineBlock` spec whose Component:
|
|
13
13
|
* • in render mode → spreads the block attributes straight into the lab, and
|
|
14
14
|
* • in editing mode → shows the generic, zod-driven `LabConfig` panel above it
|
|
15
|
-
* (one field per prop, derived from the schema
|
|
15
|
+
* (one field per prop, derived from the schema, no hand-written ConfigPanel).
|
|
16
16
|
* The MDX tag is auto-derived (PascalCase of the key) by `defineBlock`.
|
|
17
17
|
*
|
|
18
|
-
* This is the ONE shared factory for every domain (`./physics`, `./chem`, …)
|
|
18
|
+
* This is the ONE shared factory for every domain (`./physics`, `./chem`, …), a
|
|
19
19
|
* domain file just declares `labBlock({ key, label, description, schema, Component })`
|
|
20
20
|
* per lab instead of re-implementing the defineBlock + attribute-spread + editor
|
|
21
21
|
* wiring each time. `commonLabProps` are the title/prompt/objectives/hints/controlId
|
|
@@ -29,7 +29,7 @@ const commonLabProps = {
|
|
|
29
29
|
hints: z.array(z.string()).optional(),
|
|
30
30
|
controlId: z.string().optional()
|
|
31
31
|
};
|
|
32
|
-
/** PascalCase MDX tag from a kebab key
|
|
32
|
+
/** PascalCase MDX tag from a kebab key, mirrors `defineBlock`'s default, for building a components map. */
|
|
33
33
|
const pascalTag = (key) => key.split("-").map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join("");
|
|
34
34
|
function labBlock({ key, label, description, schema, Component, tag, omit }) {
|
|
35
35
|
const block = defineBlock({
|
|
@@ -57,7 +57,7 @@ function labBlock({ key, label, description, schema, Component, tag, omit }) {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
* Derive the tag→component MDX render map from a domain's blocks
|
|
60
|
+
* Derive the tag→component MDX render map from a domain's blocks, ONE source of truth.
|
|
61
61
|
* Only `labBlock`-created blocks carry `.lab`; bespoke `defineBlock` blocks (custom editor
|
|
62
62
|
* UI) are merged into the map by hand alongside this.
|
|
63
63
|
*/
|
|
@@ -5,7 +5,7 @@ import { z } from "zod";
|
|
|
5
5
|
interface LabConfigProps {
|
|
6
6
|
schema: z.ZodType;
|
|
7
7
|
value: Record<string, unknown>;
|
|
8
|
-
/** Patch callback
|
|
8
|
+
/** Patch callback, same shape as a block's `updateAttributes`. */
|
|
9
9
|
onChange: (patch: Record<string, unknown>) => void;
|
|
10
10
|
/** Props to skip (e.g. ones a bespoke panel already handles). */
|
|
11
11
|
omit?: string[];
|
|
@@ -6,15 +6,15 @@ import { z } from "zod";
|
|
|
6
6
|
|
|
7
7
|
//#region src/blocks/lab-config.tsx
|
|
8
8
|
/**
|
|
9
|
-
* LabConfig
|
|
9
|
+
* LabConfig, the schema→form primitive. Give it a lab's Zod prop schema (already
|
|
10
10
|
* the source of truth) + the current attributes + an `updateAttributes`-shaped
|
|
11
|
-
* patch callback, and it introspects the schema and renders a friendly form
|
|
11
|
+
* patch callback, and it introspects the schema and renders a friendly form, NO
|
|
12
12
|
* raw JSON for the common cases:
|
|
13
13
|
* string→TextField · number→NumField · boolean→toggle · enum→chips
|
|
14
14
|
* array<object>→RowsEditor (columns auto-derived from the element shape)
|
|
15
15
|
* array<string>→tag input · nested object→a nested sub-form (recursion)
|
|
16
16
|
* Only genuinely un-introspectable shapes (unions, records, arrays of arrays)
|
|
17
|
-
* fall back to a raw-JSON box
|
|
17
|
+
* fall back to a raw-JSON box, an explicit last resort, not the default.
|
|
18
18
|
*
|
|
19
19
|
* So a block can drop its whole hand-built panel and do
|
|
20
20
|
* <LabConfig schema={SCHEMA} value={attributes} onChange={updateAttributes} />
|
|
@@ -50,7 +50,7 @@ const GROW_KEYS = new Set([
|
|
|
50
50
|
"title",
|
|
51
51
|
"description"
|
|
52
52
|
]);
|
|
53
|
-
/** Map a ZodObject's fields to RowsEditor columns
|
|
53
|
+
/** Map a ZodObject's fields to RowsEditor columns, null if any field is too complex to flatten. */
|
|
54
54
|
function columnsFor(obj) {
|
|
55
55
|
const cols = [];
|
|
56
56
|
for (const [k, f] of Object.entries(obj.shape)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/blocks/lab-gallery.d.ts
|
|
4
|
-
/** The minimum a gallery card needs
|
|
4
|
+
/** The minimum a gallery card needs, structurally satisfied by a cms-ui BlockSpec. */
|
|
5
5
|
interface LabPickItem {
|
|
6
6
|
key: string;
|
|
7
7
|
/** MDX tag / Plate node type the host inserts on pick. */
|
|
@@ -5,11 +5,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
|
|
6
6
|
//#region src/blocks/lab-gallery.tsx
|
|
7
7
|
/**
|
|
8
|
-
* LabGallery
|
|
8
|
+
* LabGallery, the visual lab PICKER primitive. Instead of a 80-item slash menu,
|
|
9
9
|
* a host shows ONE "Insert lab" affordance that opens this gallery in a sheet: a
|
|
10
10
|
* searchable, domain-grouped grid where each card is a LIVE mini-preview of the lab
|
|
11
11
|
* (the block spec rendered in `preview` mode with default props), mounted lazily as
|
|
12
|
-
* it scrolls into view. Picking a card calls `onPick(item)
|
|
12
|
+
* it scrolls into view. Picking a card calls `onPick(item)`, the host then inserts
|
|
13
13
|
* that lab's concrete block. Editor-agnostic: it only needs the block metadata +
|
|
14
14
|
* each spec's render `Component`.
|
|
15
15
|
*/
|
|
@@ -75,7 +75,7 @@ declare const ArticleLensBlock: import("@classytic/cms-ui/contract").CmsBlock<z.
|
|
|
75
75
|
a: "a";
|
|
76
76
|
an: "an";
|
|
77
77
|
the: "the";
|
|
78
|
-
"
|
|
78
|
+
", ": ", ";
|
|
79
79
|
}>;
|
|
80
80
|
why: z.ZodOptional<z.ZodString>;
|
|
81
81
|
}, z.core.$strip>>>;
|
|
@@ -138,16 +138,16 @@ declare const PrepositionBlock: import("@classytic/cms-ui/contract").CmsBlock<z.
|
|
|
138
138
|
options: z.ZodArray<z.ZodString>;
|
|
139
139
|
scene: z.ZodEnum<{
|
|
140
140
|
in: "in";
|
|
141
|
-
at: "at";
|
|
142
|
-
between: "between";
|
|
143
141
|
on: "on";
|
|
144
142
|
over: "over";
|
|
145
143
|
above: "above";
|
|
146
144
|
under: "under";
|
|
147
145
|
below: "below";
|
|
148
146
|
beside: "beside";
|
|
147
|
+
between: "between";
|
|
149
148
|
behind: "behind";
|
|
150
149
|
infront: "infront";
|
|
150
|
+
at: "at";
|
|
151
151
|
}>;
|
|
152
152
|
figure: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
153
153
|
kind: z.ZodEnum<{
|
|
@@ -241,7 +241,7 @@ declare const languageBlocks: readonly [import("@classytic/cms-ui/contract").Cms
|
|
|
241
241
|
a: "a";
|
|
242
242
|
an: "an";
|
|
243
243
|
the: "the";
|
|
244
|
-
"
|
|
244
|
+
", ": ", ";
|
|
245
245
|
}>;
|
|
246
246
|
why: z.ZodOptional<z.ZodString>;
|
|
247
247
|
}, z.core.$strip>>>;
|
|
@@ -301,16 +301,16 @@ declare const languageBlocks: readonly [import("@classytic/cms-ui/contract").Cms
|
|
|
301
301
|
options: z.ZodArray<z.ZodString>;
|
|
302
302
|
scene: z.ZodEnum<{
|
|
303
303
|
in: "in";
|
|
304
|
-
at: "at";
|
|
305
|
-
between: "between";
|
|
306
304
|
on: "on";
|
|
307
305
|
over: "over";
|
|
308
306
|
above: "above";
|
|
309
307
|
under: "under";
|
|
310
308
|
below: "below";
|
|
311
309
|
beside: "beside";
|
|
310
|
+
between: "between";
|
|
312
311
|
behind: "behind";
|
|
313
312
|
infront: "infront";
|
|
313
|
+
at: "at";
|
|
314
314
|
}>;
|
|
315
315
|
figure: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
316
316
|
kind: z.ZodEnum<{
|
package/dist/blocks/language.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import { defineBlock } from "@classytic/cms-ui/contract";
|
|
|
12
12
|
|
|
13
13
|
//#region src/blocks/language.tsx
|
|
14
14
|
/**
|
|
15
|
-
* @classytic/labs/blocks
|
|
15
|
+
* @classytic/labs/blocks, language lab block specs.
|
|
16
16
|
*
|
|
17
17
|
* `defineBlock` editor adapters for the language labs (one domain per file; the
|
|
18
18
|
* registry is assembled in `./index.ts`). Each spec pairs a real zod schema
|
|
@@ -72,7 +72,7 @@ const SentenceBuilderBlock = defineBlock({
|
|
|
72
72
|
tag: "SentenceBuilder",
|
|
73
73
|
void: true,
|
|
74
74
|
label: "Sentence builder (word order)",
|
|
75
|
-
description: "Order colour-coded word tiles into a correct sentence
|
|
75
|
+
description: "Order colour-coded word tiles into a correct sentence, visualizes word order (great for SOV→SVO).",
|
|
76
76
|
category: "interactive",
|
|
77
77
|
schema: z.object({
|
|
78
78
|
tiles: z.array(sentenceTileSchema).default(DEMO_SENTENCE),
|
|
@@ -145,7 +145,7 @@ const WordMatchBlock = defineBlock({
|
|
|
145
145
|
tag: "WordMatch",
|
|
146
146
|
void: true,
|
|
147
147
|
label: "Word match (vocab pairs)",
|
|
148
|
-
description: "Tap to pair each word with its meaning
|
|
148
|
+
description: "Tap to pair each word with its meaning, or its picture (kids/concrete). Reads a vocab deck.",
|
|
149
149
|
category: "interactive",
|
|
150
150
|
schema: z.object({
|
|
151
151
|
deck: deckSchema.default(DEMO_DECK),
|
|
@@ -257,7 +257,7 @@ const DEMO_ARTICLES = [
|
|
|
257
257
|
{
|
|
258
258
|
before: "I like",
|
|
259
259
|
noun: "tea.",
|
|
260
|
-
answer: "
|
|
260
|
+
answer: ", ",
|
|
261
261
|
why: "no article → tea in general (uncountable)"
|
|
262
262
|
}
|
|
263
263
|
];
|
|
@@ -285,7 +285,7 @@ const DEMO_AGREE = [
|
|
|
285
285
|
],
|
|
286
286
|
correct: "is",
|
|
287
287
|
tail: "a doctor.",
|
|
288
|
-
note: "English needs \"is\"
|
|
288
|
+
note: "English needs \"is\", Bangla drops the present copula"
|
|
289
289
|
}
|
|
290
290
|
];
|
|
291
291
|
const ArticleLensBlock = defineBlock({
|
|
@@ -293,7 +293,7 @@ const ArticleLensBlock = defineBlock({
|
|
|
293
293
|
tag: "ArticleLens",
|
|
294
294
|
void: true,
|
|
295
295
|
label: "Article lens (a / an / the)",
|
|
296
|
-
description: "Pick the right article (a/an/the/none)
|
|
296
|
+
description: "Pick the right article (a/an/the/none), built for the \"Bangla has no articles\" gap.",
|
|
297
297
|
category: "interactive",
|
|
298
298
|
schema: z.object({
|
|
299
299
|
items: z.array(articleItemSchema).default(DEMO_ARTICLES),
|
|
@@ -342,7 +342,7 @@ const ArticleLensBlock = defineBlock({
|
|
|
342
342
|
"a",
|
|
343
343
|
"an",
|
|
344
344
|
"the",
|
|
345
|
-
"
|
|
345
|
+
", "
|
|
346
346
|
]
|
|
347
347
|
},
|
|
348
348
|
{
|
|
@@ -383,7 +383,7 @@ const AgreementBlock = defineBlock({
|
|
|
383
383
|
tag: "Agreement",
|
|
384
384
|
void: true,
|
|
385
385
|
label: "Agreement (subject ↔ verb)",
|
|
386
|
-
description: "Pick the verb form that matches the subject
|
|
386
|
+
description: "Pick the verb form that matches the subject, covers 3rd-sg -s and the dropped copula.",
|
|
387
387
|
category: "interactive",
|
|
388
388
|
schema: z.object({
|
|
389
389
|
items: z.array(agreementItemSchema).default(DEMO_AGREE),
|
|
@@ -495,7 +495,7 @@ const DEMO_PREP = [
|
|
|
495
495
|
scene: "above",
|
|
496
496
|
figure: "🐦",
|
|
497
497
|
landmark: "🌳",
|
|
498
|
-
note: "\"above the tree\"
|
|
498
|
+
note: "\"above the tree\", the word comes BEFORE the noun (Bangla puts it after)."
|
|
499
499
|
},
|
|
500
500
|
{
|
|
501
501
|
before: "The fish is",
|
|
@@ -509,7 +509,7 @@ const DEMO_PREP = [
|
|
|
509
509
|
scene: "in",
|
|
510
510
|
figure: "🐟",
|
|
511
511
|
landmark: "water",
|
|
512
|
-
note: "\"in the water\"
|
|
512
|
+
note: "\"in the water\", preposition first."
|
|
513
513
|
},
|
|
514
514
|
{
|
|
515
515
|
before: "The cat is",
|
|
@@ -523,7 +523,7 @@ const DEMO_PREP = [
|
|
|
523
523
|
scene: "under",
|
|
524
524
|
figure: "🐱",
|
|
525
525
|
landmark: "🪑",
|
|
526
|
-
note: "\"under the table\"
|
|
526
|
+
note: "\"under the table\", preposition first."
|
|
527
527
|
}
|
|
528
528
|
];
|
|
529
529
|
const PREP_RELATIONS = [
|
|
@@ -647,7 +647,7 @@ const PrepositionBlock = defineBlock({
|
|
|
647
647
|
tag: "Preposition",
|
|
648
648
|
void: true,
|
|
649
649
|
label: "Preposition scene (in / on / at)",
|
|
650
|
-
description: "Pick the preposition that matches a spatial picture
|
|
650
|
+
description: "Pick the preposition that matches a spatial picture, teaches \"before the noun\" vs Bangla postpositions.",
|
|
651
651
|
category: "interactive",
|
|
652
652
|
schema: z.object({
|
|
653
653
|
items: z.array(prepItemSchema).default(DEMO_PREP),
|
package/dist/blocks/lesson.mjs
CHANGED
|
@@ -8,14 +8,14 @@ import { defineBlock } from "@classytic/cms-ui/contract";
|
|
|
8
8
|
|
|
9
9
|
//#region src/blocks/lesson.tsx
|
|
10
10
|
/**
|
|
11
|
-
* @classytic/labs/blocks
|
|
11
|
+
* @classytic/labs/blocks, lesson / pedagogy blocks (domain-neutral).
|
|
12
12
|
*
|
|
13
|
-
* `PredictBlock` is the missing primitive that lets a CREATOR
|
|
13
|
+
* `PredictBlock` is the missing primitive that lets a CREATOR, not a developer ,
|
|
14
14
|
* author a predict-first lesson: a multiple-choice question the learner commits to
|
|
15
15
|
* before the reveal. A correct pick shows the "why" and reports completion through
|
|
16
16
|
* the learner/step seam, so dropping one between or after any lab turns a sequence
|
|
17
17
|
* of widgets into a gated, guided lesson. The creator authors the prompt, the
|
|
18
|
-
* choices (mark the correct one), and the explanation
|
|
18
|
+
* choices (mark the correct one), and the explanation, entirely in the editor.
|
|
19
19
|
*
|
|
20
20
|
* This is the authorable version of the predict-first card that the "Why ice floats"
|
|
21
21
|
* reference lesson used in code: same ChallengeCard + useCheckpoint underneath, now
|
|
@@ -63,7 +63,7 @@ const PredictBlock = defineBlock({
|
|
|
63
63
|
tag: "Predict",
|
|
64
64
|
void: true,
|
|
65
65
|
label: "Predict / quiz question",
|
|
66
|
-
description: "A predict-first multiple-choice question. The learner commits to an answer; a correct pick reveals the explanation and completes the step (so it can gate a guided lesson). Author your own prompt, choices and explanation
|
|
66
|
+
description: "A predict-first multiple-choice question. The learner commits to an answer; a correct pick reveals the explanation and completes the step (so it can gate a guided lesson). Author your own prompt, choices and explanation, drop it before or after any lab.",
|
|
67
67
|
category: "interactive",
|
|
68
68
|
schema: z.object({
|
|
69
69
|
prompt: z.string().default("What do you predict?"),
|