@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
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
import { clamp, num } from "../core/util.mjs";
|
|
4
4
|
import { Chip, Slider } from "../kit/controls.mjs";
|
|
5
5
|
import { Callout, ControlBar, Field, LabFrame } from "../kit/frame.mjs";
|
|
6
|
-
import { ResistorBox } from "../kit/diagram.mjs";
|
|
6
|
+
import { BulbBox, CellBox, ResistorBox, SwitchBox } from "../kit/diagram.mjs";
|
|
7
7
|
import { useEffect, useState } from "react";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import {
|
|
9
|
+
import { Dot, Segment, Stage, useFrameLoop, useInView } from "@classytic/stage";
|
|
10
|
+
import { solveDC } from "@classytic/stage/circuit";
|
|
10
11
|
|
|
11
12
|
//#region src/circuits/circuit-builder.tsx
|
|
12
13
|
/**
|
|
13
|
-
* CircuitBuilder
|
|
14
|
+
* CircuitBuilder, a circuit you BUILD and PLAY with, not a walkthrough.
|
|
14
15
|
*
|
|
15
16
|
* A creator declares the components in a series loop (battery + any mix of
|
|
16
17
|
* resistors, bulbs, switches); the learner flips switches, tunes the battery, and
|
|
@@ -22,7 +23,7 @@ import { Circle, Dot, Label, Polyline, Segment, Stage, useFrameLoop, useInView }
|
|
|
22
23
|
* are primitives (accessible, themed); switches toggle via real buttons (keyboard-
|
|
23
24
|
* operable) instead of canvas hit-testing.
|
|
24
25
|
*
|
|
25
|
-
* (Single series loop
|
|
26
|
+
* (Single series loop, the canonical "flashlight" circuit. Parallel topologies
|
|
26
27
|
* are a future extension of the same model.)
|
|
27
28
|
*/
|
|
28
29
|
const DEFAULT = [{
|
|
@@ -96,7 +97,30 @@ function CircuitBuilder({ battery, components, title = "Build a circuit", height
|
|
|
96
97
|
}, [comps.map((c) => c.type + ("ohms" in c && c.ohms || "")).join("|")]);
|
|
97
98
|
const allClosed = comps.every((c, i) => c.type !== "switch" || closed[i]);
|
|
98
99
|
const totalR = comps.reduce((s, c) => s + ("ohms" in c ? c.ohms : 0), 0);
|
|
99
|
-
const current =
|
|
100
|
+
const current = (() => {
|
|
101
|
+
if (!allClosed) return 0;
|
|
102
|
+
const elems = [{
|
|
103
|
+
kind: "V",
|
|
104
|
+
n1: 1,
|
|
105
|
+
n2: 0,
|
|
106
|
+
value: emf,
|
|
107
|
+
id: "b"
|
|
108
|
+
}];
|
|
109
|
+
let prev = 1;
|
|
110
|
+
let node = 2;
|
|
111
|
+
const withR = comps.filter((c) => "ohms" in c);
|
|
112
|
+
withR.forEach((c, idx) => {
|
|
113
|
+
const nb = idx === withR.length - 1 ? 0 : node++;
|
|
114
|
+
elems.push({
|
|
115
|
+
kind: "R",
|
|
116
|
+
n1: prev,
|
|
117
|
+
n2: nb,
|
|
118
|
+
value: Math.max(.5, c.ohms)
|
|
119
|
+
});
|
|
120
|
+
prev = nb;
|
|
121
|
+
});
|
|
122
|
+
return Math.abs(solveDC(elems).current["b"] ?? 0);
|
|
123
|
+
})();
|
|
100
124
|
useFrameLoop((f) => setT((v) => v + f.dtMs / 1e3), { running: current > 1e-4 && inView });
|
|
101
125
|
const n = comps.length;
|
|
102
126
|
const segW = (R - L) / n;
|
|
@@ -113,7 +137,7 @@ function CircuitBuilder({ battery, components, title = "Build a circuit", height
|
|
|
113
137
|
view: VIEW,
|
|
114
138
|
height,
|
|
115
139
|
preserveAspect: false,
|
|
116
|
-
ariaLabel: `Series circuit, ${emf}V battery, ${(current * 1e3).toFixed(0)} mA${allClosed ? "" : "
|
|
140
|
+
ariaLabel: `Series circuit, ${emf}V battery, ${(current * 1e3).toFixed(0)} mA${allClosed ? "" : ", open, no current"}`,
|
|
117
141
|
children: [
|
|
118
142
|
/* @__PURE__ */ jsx(Segment, {
|
|
119
143
|
from: {
|
|
@@ -167,37 +191,15 @@ function CircuitBuilder({ battery, components, title = "Build a circuit", height
|
|
|
167
191
|
opacity: .5,
|
|
168
192
|
weight: 2.5
|
|
169
193
|
}),
|
|
170
|
-
/* @__PURE__ */ jsx(
|
|
171
|
-
|
|
172
|
-
x: L
|
|
173
|
-
y:
|
|
174
|
-
},
|
|
175
|
-
to: {
|
|
176
|
-
x: 17,
|
|
177
|
-
y: 35
|
|
178
|
-
},
|
|
179
|
-
color: "var(--stage-accent-2)",
|
|
180
|
-
weight: 2.5
|
|
181
|
-
}),
|
|
182
|
-
/* @__PURE__ */ jsx(Segment, {
|
|
183
|
-
from: {
|
|
184
|
-
x: L - 3,
|
|
185
|
-
y: cyMid - 6
|
|
186
|
-
},
|
|
187
|
-
to: {
|
|
188
|
-
x: 15,
|
|
189
|
-
y: cyMid - 6
|
|
194
|
+
/* @__PURE__ */ jsx(CellBox, {
|
|
195
|
+
center: {
|
|
196
|
+
x: L,
|
|
197
|
+
y: cyMid
|
|
190
198
|
},
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
x: 20,
|
|
196
|
-
y: cyMid,
|
|
197
|
-
text: `${emf.toFixed(0)} V`,
|
|
198
|
-
color: "var(--stage-accent-2)",
|
|
199
|
-
anchor: "start",
|
|
200
|
-
size: 12
|
|
199
|
+
half: 6,
|
|
200
|
+
orient: "v",
|
|
201
|
+
live: current > 1e-4,
|
|
202
|
+
label: `${emf.toFixed(0)} V`
|
|
201
203
|
}),
|
|
202
204
|
comps.map((c, i) => {
|
|
203
205
|
const cx = L + (i + .5) * segW;
|
|
@@ -230,6 +232,7 @@ function CircuitBuilder({ battery, components, title = "Build a circuit", height
|
|
|
230
232
|
opacity: .5,
|
|
231
233
|
weight: 2.5
|
|
232
234
|
})] });
|
|
235
|
+
const energized = current > 1e-4;
|
|
233
236
|
if (c.type === "resistor") return /* @__PURE__ */ jsxs("g", { children: [wires, /* @__PURE__ */ jsx(ResistorBox, {
|
|
234
237
|
center: {
|
|
235
238
|
x: cx,
|
|
@@ -237,108 +240,33 @@ function CircuitBuilder({ battery, components, title = "Build a circuit", height
|
|
|
237
240
|
},
|
|
238
241
|
w: 2 * half,
|
|
239
242
|
h: 7,
|
|
240
|
-
|
|
243
|
+
live: energized,
|
|
241
244
|
label: `${label} ${c.ohms}Ω`
|
|
242
245
|
})] }, i);
|
|
243
246
|
if (c.type === "bulb") {
|
|
244
247
|
const bright = clamp(current * 1.2, 0, 1) * (c.ohms / Math.max(totalR, 1));
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
return /* @__PURE__ */ jsxs("g", { children: [
|
|
248
|
-
wires,
|
|
249
|
-
lit && /* @__PURE__ */ jsx(Circle, {
|
|
250
|
-
center: {
|
|
251
|
-
x: cx,
|
|
252
|
-
y: TOP
|
|
253
|
-
},
|
|
254
|
-
r: rad * 2,
|
|
255
|
-
color: "none",
|
|
256
|
-
fill: "var(--stage-warn)",
|
|
257
|
-
fillOpacity: .5 * bright,
|
|
258
|
-
weight: 0
|
|
259
|
-
}),
|
|
260
|
-
/* @__PURE__ */ jsx(Circle, {
|
|
261
|
-
center: {
|
|
262
|
-
x: cx,
|
|
263
|
-
y: TOP
|
|
264
|
-
},
|
|
265
|
-
r: rad,
|
|
266
|
-
color: lit ? "var(--stage-warn)" : "var(--stage-fg)",
|
|
267
|
-
fill: lit ? "var(--stage-warn)" : "var(--stage-bg)",
|
|
268
|
-
fillOpacity: lit ? .25 + .5 * bright : 1,
|
|
269
|
-
weight: 2
|
|
270
|
-
}),
|
|
271
|
-
/* @__PURE__ */ jsx(Polyline, {
|
|
272
|
-
points: [
|
|
273
|
-
{
|
|
274
|
-
x: cx - rad * .5,
|
|
275
|
-
y: TOP
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
x: cx - rad * .15,
|
|
279
|
-
y: TOP + rad * .4
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
x: cx + rad * .15,
|
|
283
|
-
y: TOP - rad * .4
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
x: cx + rad * .5,
|
|
287
|
-
y: TOP
|
|
288
|
-
}
|
|
289
|
-
],
|
|
290
|
-
color: lit ? "var(--stage-warn)" : "var(--stage-fg)",
|
|
291
|
-
weight: 1.5
|
|
292
|
-
}),
|
|
293
|
-
/* @__PURE__ */ jsx(Label, {
|
|
248
|
+
return /* @__PURE__ */ jsxs("g", { children: [wires, /* @__PURE__ */ jsx(BulbBox, {
|
|
249
|
+
center: {
|
|
294
250
|
x: cx,
|
|
295
|
-
y: TOP,
|
|
296
|
-
text: label,
|
|
297
|
-
color: "var(--stage-fg)",
|
|
298
|
-
size: 11,
|
|
299
|
-
dy: -16
|
|
300
|
-
})
|
|
301
|
-
] }, i);
|
|
302
|
-
}
|
|
303
|
-
const open = !closed[i];
|
|
304
|
-
return /* @__PURE__ */ jsxs("g", { children: [
|
|
305
|
-
wires,
|
|
306
|
-
/* @__PURE__ */ jsx(Dot, {
|
|
307
|
-
x: cx - half,
|
|
308
|
-
y: TOP,
|
|
309
|
-
r: 3.5,
|
|
310
|
-
color: "var(--stage-good)"
|
|
311
|
-
}),
|
|
312
|
-
/* @__PURE__ */ jsx(Dot, {
|
|
313
|
-
x: cx + half,
|
|
314
|
-
y: TOP,
|
|
315
|
-
r: 3.5,
|
|
316
|
-
color: "var(--stage-good)"
|
|
317
|
-
}),
|
|
318
|
-
/* @__PURE__ */ jsx(Segment, {
|
|
319
|
-
from: {
|
|
320
|
-
x: cx - half,
|
|
321
251
|
y: TOP
|
|
322
252
|
},
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
}),
|
|
333
|
-
/* @__PURE__ */ jsx(Label, {
|
|
253
|
+
half,
|
|
254
|
+
live: energized,
|
|
255
|
+
brightness: bright,
|
|
256
|
+
label
|
|
257
|
+
})] }, i);
|
|
258
|
+
}
|
|
259
|
+
const open = !closed[i];
|
|
260
|
+
return /* @__PURE__ */ jsxs("g", { children: [wires, /* @__PURE__ */ jsx(SwitchBox, {
|
|
261
|
+
center: {
|
|
334
262
|
x: cx,
|
|
335
|
-
y: TOP
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
] }, i);
|
|
263
|
+
y: TOP
|
|
264
|
+
},
|
|
265
|
+
half,
|
|
266
|
+
live: energized && !open,
|
|
267
|
+
closed: !open,
|
|
268
|
+
label
|
|
269
|
+
})] }, i);
|
|
342
270
|
}),
|
|
343
271
|
current > 1e-4 && Array.from({ length: N_DOTS }, (_, k) => {
|
|
344
272
|
const p = onPerimeter((t * speed + k / N_DOTS) % 1);
|
|
@@ -385,7 +313,7 @@ function CircuitBuilder({ battery, components, title = "Build a circuit", height
|
|
|
385
313
|
fontVariantNumeric: "tabular-nums"
|
|
386
314
|
},
|
|
387
315
|
children: [
|
|
388
|
-
/* @__PURE__ */ jsx("span", { children: allClosed ? "closed" : "open
|
|
316
|
+
/* @__PURE__ */ jsx("span", { children: allClosed ? "closed" : "open, no current" }),
|
|
389
317
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
390
318
|
"R ",
|
|
391
319
|
totalR.toFixed(0),
|
|
@@ -401,7 +329,7 @@ function CircuitBuilder({ battery, components, title = "Build a circuit", height
|
|
|
401
329
|
});
|
|
402
330
|
return /* @__PURE__ */ jsx(LabFrame, {
|
|
403
331
|
title,
|
|
404
|
-
prompt: switches.length ? "Flip a switch to open/close it. Tune the battery and watch the current
|
|
332
|
+
prompt: switches.length ? "Flip a switch to open/close it. Tune the battery and watch the current, and the bulb." : "Tune the battery and watch the current flow.",
|
|
405
333
|
aside,
|
|
406
334
|
controls,
|
|
407
335
|
children: figure
|
|
@@ -4,14 +4,15 @@ import { clamp, num } from "../core/util.mjs";
|
|
|
4
4
|
import { Tex as Tex$1 } from "../core/tex.mjs";
|
|
5
5
|
import { Chip, Slider } from "../kit/controls.mjs";
|
|
6
6
|
import { Callout, ControlBar, Field, LabFrame } from "../kit/frame.mjs";
|
|
7
|
-
import { ResistorBox } from "../kit/diagram.mjs";
|
|
7
|
+
import { CellBox, ResistorBox } from "../kit/diagram.mjs";
|
|
8
8
|
import { useEffect, useState } from "react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import {
|
|
10
|
+
import { Segment, Stage } from "@classytic/stage";
|
|
11
|
+
import { solveDC } from "@classytic/stage/circuit";
|
|
11
12
|
|
|
12
13
|
//#region src/circuits/circuit-lab.tsx
|
|
13
14
|
/**
|
|
14
|
-
* CircuitLab
|
|
15
|
+
* CircuitLab, two resistors driven by a battery, in series or parallel, with the
|
|
15
16
|
* voltage- and current-divider rules made visible. Drag V, R₁, R₂; flip series
|
|
16
17
|
* ↔ parallel; step through: total resistance → total current → how it divides.
|
|
17
18
|
*
|
|
@@ -58,12 +59,53 @@ function CircuitLab({ voltage, r1, r2, mode: modeInit = "series", height = 320 }
|
|
|
58
59
|
useEffect(() => {
|
|
59
60
|
setParallel(modeInit === "parallel");
|
|
60
61
|
}, [modeInit]);
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
const sol = solveDC(parallel ? [
|
|
63
|
+
{
|
|
64
|
+
kind: "V",
|
|
65
|
+
n1: 1,
|
|
66
|
+
n2: 0,
|
|
67
|
+
value: V,
|
|
68
|
+
id: "b"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
kind: "R",
|
|
72
|
+
n1: 1,
|
|
73
|
+
n2: 0,
|
|
74
|
+
value: R1
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
kind: "R",
|
|
78
|
+
n1: 1,
|
|
79
|
+
n2: 0,
|
|
80
|
+
value: R2
|
|
81
|
+
}
|
|
82
|
+
] : [
|
|
83
|
+
{
|
|
84
|
+
kind: "V",
|
|
85
|
+
n1: 1,
|
|
86
|
+
n2: 0,
|
|
87
|
+
value: V,
|
|
88
|
+
id: "b"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
kind: "R",
|
|
92
|
+
n1: 1,
|
|
93
|
+
n2: 2,
|
|
94
|
+
value: R1
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
kind: "R",
|
|
98
|
+
n1: 2,
|
|
99
|
+
n2: 0,
|
|
100
|
+
value: R2
|
|
101
|
+
}
|
|
102
|
+
]);
|
|
103
|
+
const Itot = Math.abs(sol.current["b"] ?? 0);
|
|
104
|
+
const Rtot = Itot > 1e-12 ? V / Itot : Infinity;
|
|
105
|
+
const v1 = parallel ? V : (sol.nodeV[1] ?? 0) - (sol.nodeV[2] ?? 0);
|
|
106
|
+
const v2 = parallel ? V : sol.nodeV[2] ?? 0;
|
|
107
|
+
const i1 = v1 / R1;
|
|
108
|
+
const i2 = v2 / R2;
|
|
67
109
|
const steps = parallel ? STEPS_PARALLEL : STEPS_SERIES;
|
|
68
110
|
const clampedStep = Math.min(step, steps.length - 1);
|
|
69
111
|
const W = (a, b, key) => /* @__PURE__ */ jsx(Segment, {
|
|
@@ -94,37 +136,15 @@ function CircuitLab({ voltage, r1, r2, mode: modeInit = "series", height = 320 }
|
|
|
94
136
|
x: BX,
|
|
95
137
|
y: BOT
|
|
96
138
|
}, "b-dn"),
|
|
97
|
-
/* @__PURE__ */ jsx(
|
|
98
|
-
|
|
99
|
-
x: BX
|
|
100
|
-
y:
|
|
101
|
-
},
|
|
102
|
-
to: {
|
|
103
|
-
x: 14,
|
|
104
|
-
y: 35
|
|
105
|
-
},
|
|
106
|
-
color: "var(--stage-accent-2)",
|
|
107
|
-
weight: 2.5
|
|
108
|
-
}),
|
|
109
|
-
/* @__PURE__ */ jsx(Segment, {
|
|
110
|
-
from: {
|
|
111
|
-
x: BX - 3,
|
|
112
|
-
y: cyMid - 6
|
|
113
|
-
},
|
|
114
|
-
to: {
|
|
115
|
-
x: 12,
|
|
116
|
-
y: cyMid - 6
|
|
139
|
+
/* @__PURE__ */ jsx(CellBox, {
|
|
140
|
+
center: {
|
|
141
|
+
x: BX,
|
|
142
|
+
y: cyMid
|
|
117
143
|
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
x: 17,
|
|
123
|
-
y: cyMid,
|
|
124
|
-
text: `${V.toFixed(0)} V`,
|
|
125
|
-
color: "var(--stage-accent-2)",
|
|
126
|
-
anchor: "start",
|
|
127
|
-
size: 12
|
|
144
|
+
half: 6,
|
|
145
|
+
orient: "v",
|
|
146
|
+
live: true,
|
|
147
|
+
label: `${V.toFixed(0)} V`
|
|
128
148
|
}),
|
|
129
149
|
!parallel ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
130
150
|
W({
|
|
@@ -388,7 +408,7 @@ function CircuitLab({ voltage, r1, r2, mode: modeInit = "series", height = 320 }
|
|
|
388
408
|
children: parallel ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Tex$1, { tex: `\\frac{1}{R}=\\frac{1}{R_1}+\\frac{1}{R_2}\\Rightarrow R=${Rtot.toFixed(1)}\\,\\Omega` }), /* @__PURE__ */ jsx(Tex$1, { tex: `I_1=I\\cdot\\frac{R_2}{R_1+R_2}=${(i1 * 1e3).toFixed(1)}\\,\\text{mA}` })] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Tex$1, { tex: `R=R_1+R_2=${Rtot.toFixed(0)}\\,\\Omega,\\quad I=\\frac{V}{R}=${(Itot * 1e3).toFixed(1)}\\,\\text{mA}` }), /* @__PURE__ */ jsx(Tex$1, { tex: `V_1=V\\cdot\\frac{R_1}{R_1+R_2}=${v1.toFixed(2)}\\,\\text{V}` })] })
|
|
389
409
|
})] });
|
|
390
410
|
return /* @__PURE__ */ jsx(LabFrame, {
|
|
391
|
-
title: parallel ? "Parallel
|
|
411
|
+
title: parallel ? "Parallel, current divides" : "Series, voltage divides",
|
|
392
412
|
prompt: steps[clampedStep],
|
|
393
413
|
aside,
|
|
394
414
|
controls,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { CmosInverterLab, CmosInverterProps, CmosNandLab, CmosNandProps, CmosNorLab, CmosNorProps, RNmosNotLab, RNmosNotProps } from "./preset.mjs";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { LabAskSpec } from "../../kit/ask.mjs";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/circuits/cmos-gate/preset.d.ts
|
|
5
|
+
interface CmosInverterProps {
|
|
6
|
+
vdd?: number;
|
|
7
|
+
vth?: number;
|
|
8
|
+
show?: 'both' | 'circuit' | 'graph';
|
|
9
|
+
title?: string;
|
|
10
|
+
prompt?: string;
|
|
11
|
+
ask?: LabAskSpec;
|
|
12
|
+
activity?: string;
|
|
13
|
+
}
|
|
14
|
+
declare function CmosInverterLab({
|
|
15
|
+
vdd,
|
|
16
|
+
vth,
|
|
17
|
+
show,
|
|
18
|
+
title,
|
|
19
|
+
prompt,
|
|
20
|
+
ask,
|
|
21
|
+
activity
|
|
22
|
+
}?: CmosInverterProps): ReactNode;
|
|
23
|
+
interface RNmosNotProps {
|
|
24
|
+
vdd?: number;
|
|
25
|
+
vth?: number;
|
|
26
|
+
/** pull-up resistance (Ω). */
|
|
27
|
+
rpull?: number;
|
|
28
|
+
title?: string;
|
|
29
|
+
prompt?: string;
|
|
30
|
+
ask?: LabAskSpec;
|
|
31
|
+
activity?: string;
|
|
32
|
+
}
|
|
33
|
+
declare function RNmosNotLab({
|
|
34
|
+
vdd,
|
|
35
|
+
vth,
|
|
36
|
+
rpull,
|
|
37
|
+
title,
|
|
38
|
+
prompt,
|
|
39
|
+
ask,
|
|
40
|
+
activity
|
|
41
|
+
}?: RNmosNotProps): ReactNode;
|
|
42
|
+
interface CmosNandProps {
|
|
43
|
+
vdd?: number;
|
|
44
|
+
vth?: number;
|
|
45
|
+
title?: string;
|
|
46
|
+
prompt?: string;
|
|
47
|
+
ask?: LabAskSpec;
|
|
48
|
+
activity?: string;
|
|
49
|
+
}
|
|
50
|
+
declare function CmosNandLab({
|
|
51
|
+
vdd,
|
|
52
|
+
vth,
|
|
53
|
+
title,
|
|
54
|
+
prompt,
|
|
55
|
+
ask,
|
|
56
|
+
activity
|
|
57
|
+
}?: CmosNandProps): ReactNode;
|
|
58
|
+
interface CmosNorProps {
|
|
59
|
+
vdd?: number;
|
|
60
|
+
vth?: number;
|
|
61
|
+
title?: string;
|
|
62
|
+
prompt?: string;
|
|
63
|
+
ask?: LabAskSpec;
|
|
64
|
+
activity?: string;
|
|
65
|
+
}
|
|
66
|
+
declare function CmosNorLab({
|
|
67
|
+
vdd,
|
|
68
|
+
vth,
|
|
69
|
+
title,
|
|
70
|
+
prompt,
|
|
71
|
+
ask,
|
|
72
|
+
activity
|
|
73
|
+
}?: CmosNorProps): ReactNode;
|
|
74
|
+
//#endregion
|
|
75
|
+
export { CmosInverterLab, CmosInverterProps, CmosNandLab, CmosNandProps, CmosNorLab, CmosNorProps, RNmosNotLab, RNmosNotProps };
|