@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
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Callout, LabFrame } from "../../kit/frame.mjs";
|
|
4
|
+
import { LabAsk } from "../../kit/ask.mjs";
|
|
5
|
+
import { CoordPlane, num, snapTo } from "../../kit/coords.mjs";
|
|
6
|
+
import { useState } from "react";
|
|
7
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { Dot, Ellipse, Label, Line, MovableDot, Plot } from "@classytic/stage";
|
|
9
|
+
|
|
10
|
+
//#region src/math/conic/preset.tsx
|
|
11
|
+
/**
|
|
12
|
+
* ConicLab, the non-circle conics on the coordinate plane, dragged into shape:
|
|
13
|
+
*
|
|
14
|
+
* parabola y² = 4a·x , drag the FOCUS along the axis; the focus (a, 0)
|
|
15
|
+
* and directrix x = −a move together (every point stays equidistant
|
|
16
|
+
* from them, the defining property).
|
|
17
|
+
* hyperbola x²/a² − y²/b² = 1, drag the vertex (sets a) and the conjugate
|
|
18
|
+
* handle (sets b); the asymptotes y = ±(b/a)x are drawn.
|
|
19
|
+
* rectangular x·y = c, the reciprocal graph; drag a point on a branch to set c.
|
|
20
|
+
*
|
|
21
|
+
* Built on the same CoordPlane + Plot.Parametric the rest of the geometry labs
|
|
22
|
+
* use (parametric so the vertical-tangent vertex and the two branches draw
|
|
23
|
+
* cleanly). Authorable via props + an optional checked answer.
|
|
24
|
+
*/
|
|
25
|
+
const C_CURVE = "var(--stage-accent)";
|
|
26
|
+
const C_AUX = "var(--stage-accent-2)";
|
|
27
|
+
const DEFAULT_VIEW = {
|
|
28
|
+
xMin: -8,
|
|
29
|
+
xMax: 8,
|
|
30
|
+
yMin: -6,
|
|
31
|
+
yMax: 6
|
|
32
|
+
};
|
|
33
|
+
const PROMPTS = {
|
|
34
|
+
parabola: "Drag the focus along the axis. The directrix mirrors it: every point on the curve is the same distance from both. y² = 4a·x.",
|
|
35
|
+
ellipse: "Drag the two axis handles to set the semi-axes a and b. The foci sit on the longer axis. x²/a² + y²/b² = 1.",
|
|
36
|
+
hyperbola: "Drag the vertex (sets a) and the conjugate handle (sets b). The curve hugs the asymptotes y = ±(b/a)x.",
|
|
37
|
+
rectangular: "Drag the point on the branch. x·y stays constant, that constant is c."
|
|
38
|
+
};
|
|
39
|
+
function ConicLab(props = {}) {
|
|
40
|
+
const kind = props.kind ?? "parabola";
|
|
41
|
+
const { view = DEFAULT_VIEW, height = 400, snap = 1, showFocusDirectrix = true, showAsymptotes = true, title = kind === "parabola" ? "The parabola" : kind === "ellipse" ? "The ellipse" : kind === "hyperbola" ? "The hyperbola" : "The reciprocal graph", prompt = PROMPTS[kind], ask, activity = `conic-${kind}` } = props;
|
|
42
|
+
const [a, setA] = useState(Math.max(.3, props.a ?? (kind === "ellipse" ? 4 : kind === "hyperbola" ? 2 : 1)));
|
|
43
|
+
const [b, setB] = useState(Math.max(.3, props.b ?? (kind === "ellipse" ? 2.5 : 1.5)));
|
|
44
|
+
const [cc, setCc] = useState(props.c ?? 6);
|
|
45
|
+
const sp = (v) => snapTo(v, snap);
|
|
46
|
+
let scene;
|
|
47
|
+
const readouts = [];
|
|
48
|
+
if (kind === "parabola") {
|
|
49
|
+
const T = Math.sqrt(Math.max(.1, view.xMax) / a);
|
|
50
|
+
scene = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
51
|
+
showFocusDirectrix && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
52
|
+
/* @__PURE__ */ jsx(Line, {
|
|
53
|
+
from: {
|
|
54
|
+
x: -a,
|
|
55
|
+
y: 0
|
|
56
|
+
},
|
|
57
|
+
to: {
|
|
58
|
+
x: -a,
|
|
59
|
+
y: 1
|
|
60
|
+
},
|
|
61
|
+
color: C_AUX,
|
|
62
|
+
weight: 2,
|
|
63
|
+
dashed: true
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ jsx(Label, {
|
|
66
|
+
x: -a,
|
|
67
|
+
y: view.yMin,
|
|
68
|
+
text: `directrix x = ${num(-a)}`,
|
|
69
|
+
color: C_AUX,
|
|
70
|
+
size: 11,
|
|
71
|
+
dy: -6
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ jsx(Dot, {
|
|
74
|
+
x: a,
|
|
75
|
+
y: 0,
|
|
76
|
+
r: 4,
|
|
77
|
+
color: C_AUX
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ jsx(Label, {
|
|
80
|
+
x: a,
|
|
81
|
+
y: 0,
|
|
82
|
+
text: "focus",
|
|
83
|
+
color: C_AUX,
|
|
84
|
+
size: 11,
|
|
85
|
+
dy: -10
|
|
86
|
+
})
|
|
87
|
+
] }),
|
|
88
|
+
/* @__PURE__ */ jsx(Plot.Parametric, {
|
|
89
|
+
xy: (t) => [a * t * t, 2 * a * t],
|
|
90
|
+
domain: [-T, T],
|
|
91
|
+
color: C_CURVE,
|
|
92
|
+
weight: 3
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ jsx(MovableDot, {
|
|
95
|
+
value: {
|
|
96
|
+
x: a,
|
|
97
|
+
y: 0
|
|
98
|
+
},
|
|
99
|
+
onMove: (p) => setA(Math.max(.3, sp(p.x))),
|
|
100
|
+
snap,
|
|
101
|
+
constrain: "horizontal",
|
|
102
|
+
color: C_CURVE,
|
|
103
|
+
ariaLabel: "focus, drag along the axis to set a"
|
|
104
|
+
})
|
|
105
|
+
] });
|
|
106
|
+
readouts.push({
|
|
107
|
+
label: "a",
|
|
108
|
+
value: num(a)
|
|
109
|
+
}, {
|
|
110
|
+
label: "equation",
|
|
111
|
+
value: `y² = ${num(4 * a)}x`
|
|
112
|
+
}, {
|
|
113
|
+
label: "focus / directrix",
|
|
114
|
+
value: `(${num(a)}, 0) / x = ${num(-a)}`
|
|
115
|
+
});
|
|
116
|
+
} else if (kind === "ellipse") {
|
|
117
|
+
const cFoc = Math.sqrt(Math.abs(a * a - b * b));
|
|
118
|
+
const foci = a >= b ? [{
|
|
119
|
+
x: cFoc,
|
|
120
|
+
y: 0
|
|
121
|
+
}, {
|
|
122
|
+
x: -cFoc,
|
|
123
|
+
y: 0
|
|
124
|
+
}] : [{
|
|
125
|
+
x: 0,
|
|
126
|
+
y: cFoc
|
|
127
|
+
}, {
|
|
128
|
+
x: 0,
|
|
129
|
+
y: -cFoc
|
|
130
|
+
}];
|
|
131
|
+
scene = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
132
|
+
/* @__PURE__ */ jsx(Ellipse, {
|
|
133
|
+
center: {
|
|
134
|
+
x: 0,
|
|
135
|
+
y: 0
|
|
136
|
+
},
|
|
137
|
+
rx: a,
|
|
138
|
+
ry: b,
|
|
139
|
+
color: C_CURVE,
|
|
140
|
+
fill: C_CURVE,
|
|
141
|
+
fillOpacity: .06,
|
|
142
|
+
weight: 3
|
|
143
|
+
}),
|
|
144
|
+
cFoc > .05 && foci.map((f, i) => /* @__PURE__ */ jsx(Dot, {
|
|
145
|
+
x: f.x,
|
|
146
|
+
y: f.y,
|
|
147
|
+
r: 4,
|
|
148
|
+
color: C_AUX
|
|
149
|
+
}, i)),
|
|
150
|
+
cFoc > .05 && /* @__PURE__ */ jsx(Label, {
|
|
151
|
+
x: foci[0].x,
|
|
152
|
+
y: foci[0].y,
|
|
153
|
+
text: "focus",
|
|
154
|
+
color: C_AUX,
|
|
155
|
+
size: 11,
|
|
156
|
+
dy: -10
|
|
157
|
+
}),
|
|
158
|
+
/* @__PURE__ */ jsx(MovableDot, {
|
|
159
|
+
value: {
|
|
160
|
+
x: a,
|
|
161
|
+
y: 0
|
|
162
|
+
},
|
|
163
|
+
onMove: (p) => setA(Math.max(.3, sp(p.x))),
|
|
164
|
+
snap,
|
|
165
|
+
constrain: "horizontal",
|
|
166
|
+
color: C_CURVE,
|
|
167
|
+
ariaLabel: "semi-axis a, drag along the x-axis"
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ jsx(MovableDot, {
|
|
170
|
+
value: {
|
|
171
|
+
x: 0,
|
|
172
|
+
y: b
|
|
173
|
+
},
|
|
174
|
+
onMove: (p) => setB(Math.max(.3, sp(p.y))),
|
|
175
|
+
color: C_AUX,
|
|
176
|
+
ariaLabel: "semi-axis b, drag along the y-axis"
|
|
177
|
+
})
|
|
178
|
+
] });
|
|
179
|
+
readouts.push({
|
|
180
|
+
label: "a, b",
|
|
181
|
+
value: `${num(a)}, ${num(b)}`
|
|
182
|
+
}, {
|
|
183
|
+
label: "equation",
|
|
184
|
+
value: `x²/${num(a * a)} + y²/${num(b * b)} = 1`
|
|
185
|
+
});
|
|
186
|
+
if (cFoc > .05) readouts.push({
|
|
187
|
+
label: "foci",
|
|
188
|
+
value: a >= b ? `(±${num(cFoc)}, 0)` : `(0, ±${num(cFoc)})`
|
|
189
|
+
});
|
|
190
|
+
} else if (kind === "hyperbola") {
|
|
191
|
+
const Tt = Math.asinh((Math.abs(view.yMax) + 2) / b);
|
|
192
|
+
const slope = b / a;
|
|
193
|
+
scene = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
194
|
+
showAsymptotes && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Line, {
|
|
195
|
+
from: {
|
|
196
|
+
x: 0,
|
|
197
|
+
y: 0
|
|
198
|
+
},
|
|
199
|
+
to: {
|
|
200
|
+
x: 1,
|
|
201
|
+
y: slope
|
|
202
|
+
},
|
|
203
|
+
color: C_AUX,
|
|
204
|
+
weight: 1.5,
|
|
205
|
+
dashed: true
|
|
206
|
+
}), /* @__PURE__ */ jsx(Line, {
|
|
207
|
+
from: {
|
|
208
|
+
x: 0,
|
|
209
|
+
y: 0
|
|
210
|
+
},
|
|
211
|
+
to: {
|
|
212
|
+
x: 1,
|
|
213
|
+
y: -slope
|
|
214
|
+
},
|
|
215
|
+
color: C_AUX,
|
|
216
|
+
weight: 1.5,
|
|
217
|
+
dashed: true
|
|
218
|
+
})] }),
|
|
219
|
+
/* @__PURE__ */ jsx(Plot.Parametric, {
|
|
220
|
+
xy: (t) => [a * Math.cosh(t), b * Math.sinh(t)],
|
|
221
|
+
domain: [-Tt, Tt],
|
|
222
|
+
color: C_CURVE,
|
|
223
|
+
weight: 3
|
|
224
|
+
}),
|
|
225
|
+
/* @__PURE__ */ jsx(Plot.Parametric, {
|
|
226
|
+
xy: (t) => [-a * Math.cosh(t), b * Math.sinh(t)],
|
|
227
|
+
domain: [-Tt, Tt],
|
|
228
|
+
color: C_CURVE,
|
|
229
|
+
weight: 3
|
|
230
|
+
}),
|
|
231
|
+
/* @__PURE__ */ jsx(MovableDot, {
|
|
232
|
+
value: {
|
|
233
|
+
x: a,
|
|
234
|
+
y: 0
|
|
235
|
+
},
|
|
236
|
+
onMove: (p) => setA(Math.max(.3, sp(p.x))),
|
|
237
|
+
color: C_CURVE,
|
|
238
|
+
ariaLabel: "vertex, drag to set a"
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ jsx(MovableDot, {
|
|
241
|
+
value: {
|
|
242
|
+
x: 0,
|
|
243
|
+
y: b
|
|
244
|
+
},
|
|
245
|
+
onMove: (p) => setB(Math.max(.3, sp(p.y))),
|
|
246
|
+
color: C_AUX,
|
|
247
|
+
ariaLabel: "conjugate handle, drag to set b"
|
|
248
|
+
})
|
|
249
|
+
] });
|
|
250
|
+
readouts.push({
|
|
251
|
+
label: "a, b",
|
|
252
|
+
value: `${num(a)}, ${num(b)}`
|
|
253
|
+
}, {
|
|
254
|
+
label: "equation",
|
|
255
|
+
value: `x²/${num(a * a)} − y²/${num(b * b)} = 1`
|
|
256
|
+
}, {
|
|
257
|
+
label: "asymptotes",
|
|
258
|
+
value: `y = ±${num(slope)}x`
|
|
259
|
+
});
|
|
260
|
+
} else {
|
|
261
|
+
const x0 = 2;
|
|
262
|
+
const handle = {
|
|
263
|
+
x: x0,
|
|
264
|
+
y: cc / x0
|
|
265
|
+
};
|
|
266
|
+
const xm = Math.max(Math.abs(view.xMin), view.xMax);
|
|
267
|
+
scene = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
268
|
+
/* @__PURE__ */ jsx(Plot.Parametric, {
|
|
269
|
+
xy: (t) => [t, cc / t],
|
|
270
|
+
domain: [.001, xm],
|
|
271
|
+
color: C_CURVE,
|
|
272
|
+
weight: 3
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ jsx(Plot.Parametric, {
|
|
275
|
+
xy: (t) => [t, cc / t],
|
|
276
|
+
domain: [-xm, -.001],
|
|
277
|
+
color: C_CURVE,
|
|
278
|
+
weight: 3
|
|
279
|
+
}),
|
|
280
|
+
/* @__PURE__ */ jsx(MovableDot, {
|
|
281
|
+
value: handle,
|
|
282
|
+
onMove: (p) => {
|
|
283
|
+
setCc(sp((Math.abs(p.x) < .4 ? .4 : p.x) * p.y) || 1);
|
|
284
|
+
},
|
|
285
|
+
color: C_CURVE,
|
|
286
|
+
ariaLabel: "point on the curve, drag to set c"
|
|
287
|
+
})
|
|
288
|
+
] });
|
|
289
|
+
readouts.push({
|
|
290
|
+
label: "c",
|
|
291
|
+
value: num(cc)
|
|
292
|
+
}, {
|
|
293
|
+
label: "equation",
|
|
294
|
+
value: `x·y = ${num(cc)}`
|
|
295
|
+
}, {
|
|
296
|
+
label: "as a function",
|
|
297
|
+
value: `y = ${num(cc)}/x`
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
const figure = /* @__PURE__ */ jsx(CoordPlane, {
|
|
301
|
+
view,
|
|
302
|
+
height,
|
|
303
|
+
ariaLabel: `${title}: ${readouts[1]?.value ?? ""}`,
|
|
304
|
+
children: scene
|
|
305
|
+
});
|
|
306
|
+
return /* @__PURE__ */ jsx(LabFrame, {
|
|
307
|
+
title,
|
|
308
|
+
prompt,
|
|
309
|
+
aside: /* @__PURE__ */ jsx(Callout, {
|
|
310
|
+
tone: "result",
|
|
311
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
312
|
+
style: {
|
|
313
|
+
display: "grid",
|
|
314
|
+
gap: 6,
|
|
315
|
+
fontVariantNumeric: "tabular-nums",
|
|
316
|
+
fontSize: 13
|
|
317
|
+
},
|
|
318
|
+
children: readouts.map((r, i) => /* @__PURE__ */ jsxs("span", { children: [
|
|
319
|
+
r.label,
|
|
320
|
+
": ",
|
|
321
|
+
/* @__PURE__ */ jsx("strong", { children: r.value })
|
|
322
|
+
] }, i))
|
|
323
|
+
})
|
|
324
|
+
}),
|
|
325
|
+
footer: ask ? /* @__PURE__ */ jsx(LabAsk, {
|
|
326
|
+
ask,
|
|
327
|
+
activity
|
|
328
|
+
}) : void 0,
|
|
329
|
+
children: figure
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
//#endregion
|
|
334
|
+
export { ConicLab };
|
package/dist/math/derivation.mjs
CHANGED
|
@@ -7,15 +7,15 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
|
|
8
8
|
//#region src/math/derivation.tsx
|
|
9
9
|
/**
|
|
10
|
-
* Derivation
|
|
10
|
+
* Derivation, a step-by-step algebra/equation derivation, revealed one line at a
|
|
11
11
|
* time. Each step is a LaTeX expression (rendered with KaTeX) plus an optional
|
|
12
12
|
* justification ("subtract yₚ", "cross-multiply"). The learner clicks through;
|
|
13
|
-
* the latest line is emphasized. This is how you teach a *derivation
|
|
14
|
-
* two-point line form, the quadratic formula, a chord-length proof
|
|
13
|
+
* the latest line is emphasized. This is how you teach a *derivation*, the
|
|
14
|
+
* two-point line form, the quadratic formula, a chord-length proof, as a guided
|
|
15
15
|
* sequence rather than a wall of algebra.
|
|
16
16
|
*
|
|
17
17
|
* Pure presentation over the engine's `<Tex>` + the shared control kit (no canvas,
|
|
18
|
-
* no equation solving implied
|
|
18
|
+
* no equation solving implied, the author supplies the steps, optionally
|
|
19
19
|
* generated/verified with the symbolic engine).
|
|
20
20
|
*/
|
|
21
21
|
function normalize(steps) {
|
|
@@ -69,7 +69,7 @@ function Derivation({ steps, title = "Derivation", showAll = false } = {}) {
|
|
|
69
69
|
fontSize: 13,
|
|
70
70
|
opacity: .65
|
|
71
71
|
},
|
|
72
|
-
children: ["
|
|
72
|
+
children: [", ", s.note]
|
|
73
73
|
})
|
|
74
74
|
]
|
|
75
75
|
}, i))
|
|
@@ -10,11 +10,11 @@ import { Axes, Grid, MovableDot, Plot, Segment, Stage, compileExpr, differentiat
|
|
|
10
10
|
|
|
11
11
|
//#region src/math/derivative-explorer/preset.tsx
|
|
12
12
|
/**
|
|
13
|
-
* DerivativeExplorer
|
|
13
|
+
* DerivativeExplorer, "the derivative is a slope," on the @classytic/stage
|
|
14
14
|
* engine. Plot f(x); drag the point along the curve and shrink the gap h to
|
|
15
15
|
* watch the SECANT collapse onto the TANGENT (exact f'(x) from the shared expr
|
|
16
16
|
* engine's symbolic `differentiate`, numerical fallback). Replaces the canvas
|
|
17
|
-
* version
|
|
17
|
+
* version, now SVG, accessible, themed, KaTeX formulas via the Tex primitive.
|
|
18
18
|
*/
|
|
19
19
|
const numericSlope = (f, x) => (f(x + 1e-4) - f(x - 1e-4)) / 2e-4;
|
|
20
20
|
function autoY(f, xMin, xMax) {
|
|
@@ -83,7 +83,7 @@ function DerivativeExplorer({ equation = "0.15*x^3 - x", xRange = [-4, 4], start
|
|
|
83
83
|
children: [
|
|
84
84
|
"“",
|
|
85
85
|
equation,
|
|
86
|
-
"
|
|
86
|
+
"”, ",
|
|
87
87
|
model.error
|
|
88
88
|
]
|
|
89
89
|
})]
|
|
@@ -170,14 +170,14 @@ function DerivativeExplorer({ equation = "0.15*x^3 - x", xRange = [-4, 4], start
|
|
|
170
170
|
}),
|
|
171
171
|
/* @__PURE__ */ jsxs("span", {
|
|
172
172
|
style: { opacity: .8 },
|
|
173
|
-
children: ["secant slope ", /* @__PURE__ */ jsx("strong", { children: Number.isFinite(secant) ? secant.toFixed(2) : "
|
|
173
|
+
children: ["secant slope ", /* @__PURE__ */ jsx("strong", { children: Number.isFinite(secant) ? secant.toFixed(2) : ", " })]
|
|
174
174
|
}),
|
|
175
175
|
/* @__PURE__ */ jsxs("span", {
|
|
176
176
|
style: {
|
|
177
177
|
color: "var(--stage-good)",
|
|
178
178
|
fontWeight: 600
|
|
179
179
|
},
|
|
180
|
-
children: ["f′(x) = ", Number.isFinite(m) ? m.toFixed(2) : "
|
|
180
|
+
children: ["f′(x) = ", Number.isFinite(m) ? m.toFixed(2) : ", "]
|
|
181
181
|
})
|
|
182
182
|
] }),
|
|
183
183
|
footer: /* @__PURE__ */ jsxs("div", {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { DomainRangeLab, DomainRangeProps } from "./preset.mjs";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LabAskSpec } from "../../kit/ask.mjs";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/math/domain-range/preset.d.ts
|
|
5
|
+
interface DomainRangeProps {
|
|
6
|
+
/** The function f(x): e.g. 'x^2', 'sqrt(x)', '1/(x-2)', 'sqrt(9 - x^2)', 'log(x)'. */
|
|
7
|
+
equation?: string;
|
|
8
|
+
xRange?: [number, number];
|
|
9
|
+
yRange?: [number, number] | 'auto';
|
|
10
|
+
/** Optional author-set domain restriction [a, b], inputs outside are "undefined". */
|
|
11
|
+
restrict?: [number, number];
|
|
12
|
+
/** Initial probe position on the input axis. */
|
|
13
|
+
probe?: number;
|
|
14
|
+
title?: string;
|
|
15
|
+
prompt?: string;
|
|
16
|
+
ask?: LabAskSpec;
|
|
17
|
+
height?: number;
|
|
18
|
+
activity?: string;
|
|
19
|
+
}
|
|
20
|
+
declare function DomainRangeLab({
|
|
21
|
+
equation,
|
|
22
|
+
xRange,
|
|
23
|
+
yRange,
|
|
24
|
+
restrict,
|
|
25
|
+
probe,
|
|
26
|
+
title,
|
|
27
|
+
prompt,
|
|
28
|
+
ask,
|
|
29
|
+
height,
|
|
30
|
+
activity
|
|
31
|
+
}?: DomainRangeProps): ReactNode;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { DomainRangeLab, DomainRangeProps };
|