@classytic/labs 0.1.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/LICENSE +21 -0
- package/README.md +105 -0
- package/dist/biology/enzyme-rate/index.d.mts +1 -0
- package/dist/biology/enzyme-rate/preset.d.mts +25 -0
- package/dist/biology/enzyme-rate/preset.mjs +256 -0
- package/dist/biology/genetic-cross/core.d.mts +64 -0
- package/dist/biology/genetic-cross/core.mjs +147 -0
- package/dist/biology/genetic-cross/grid.mjs +239 -0
- package/dist/biology/genetic-cross/index.d.mts +3 -0
- package/dist/biology/genetic-cross/preset.d.mts +26 -0
- package/dist/biology/genetic-cross/preset.mjs +184 -0
- package/dist/biology/genetic-cross/sex-linked.d.mts +27 -0
- package/dist/biology/genetic-cross/sex-linked.mjs +226 -0
- package/dist/biology/index.d.mts +11 -0
- package/dist/biology/index.mjs +12 -0
- package/dist/biology/photosynthesis-factors/index.d.mts +1 -0
- package/dist/biology/photosynthesis-factors/preset.d.mts +25 -0
- package/dist/biology/photosynthesis-factors/preset.mjs +270 -0
- package/dist/biology/punnett-cross/index.d.mts +1 -0
- package/dist/biology/punnett-cross/preset.d.mts +27 -0
- package/dist/biology/punnett-cross/preset.mjs +21 -0
- package/dist/biology/respiration/index.d.mts +1 -0
- package/dist/biology/respiration/preset.d.mts +17 -0
- package/dist/biology/respiration/preset.mjs +179 -0
- package/dist/biology/sequence/central-dogma.d.mts +17 -0
- package/dist/biology/sequence/central-dogma.mjs +339 -0
- package/dist/biology/sequence/core.d.mts +38 -0
- package/dist/biology/sequence/core.mjs +178 -0
- package/dist/biology/sequence/index.d.mts +3 -0
- package/dist/biology/sequence/preset.d.mts +20 -0
- package/dist/biology/sequence/preset.mjs +235 -0
- package/dist/blocks/accounting.d.mts +142 -0
- package/dist/blocks/accounting.mjs +446 -0
- package/dist/blocks/authoring.d.mts +12 -0
- package/dist/blocks/authoring.mjs +705 -0
- package/dist/blocks/biology.d.mts +197 -0
- package/dist/blocks/biology.mjs +513 -0
- package/dist/blocks/chem.d.mts +128 -0
- package/dist/blocks/chem.mjs +486 -0
- package/dist/blocks/circuits.d.mts +86 -0
- package/dist/blocks/circuits.mjs +348 -0
- package/dist/blocks/discrete.d.mts +62 -0
- package/dist/blocks/discrete.mjs +314 -0
- package/dist/blocks/economics.d.mts +56 -0
- package/dist/blocks/economics.mjs +203 -0
- package/dist/blocks/geography.d.mts +58 -0
- package/dist/blocks/geography.mjs +115 -0
- package/dist/blocks/geometry.d.mts +28 -0
- package/dist/blocks/geometry.mjs +160 -0
- package/dist/blocks/ict.d.mts +65 -0
- package/dist/blocks/ict.mjs +197 -0
- package/dist/blocks/index.d.mts +4555 -0
- package/dist/blocks/index.mjs +120 -0
- package/dist/blocks/lab-block.d.mts +16 -0
- package/dist/blocks/lab-block.mjs +74 -0
- package/dist/blocks/lab-config.d.mts +23 -0
- package/dist/blocks/lab-config.mjs +200 -0
- package/dist/blocks/lab-gallery.d.mts +30 -0
- package/dist/blocks/lab-gallery.mjs +208 -0
- package/dist/blocks/language.d.mts +349 -0
- package/dist/blocks/language.mjs +750 -0
- package/dist/blocks/lesson.d.mts +43 -0
- package/dist/blocks/lesson.mjs +140 -0
- package/dist/blocks/math.d.mts +411 -0
- package/dist/blocks/math.mjs +1536 -0
- package/dist/blocks/ml.d.mts +84 -0
- package/dist/blocks/ml.mjs +146 -0
- package/dist/blocks/physics.d.mts +259 -0
- package/dist/blocks/physics.mjs +868 -0
- package/dist/blocks/statistics.d.mts +29 -0
- package/dist/blocks/statistics.mjs +123 -0
- package/dist/catalog/index.d.mts +3 -0
- package/dist/catalog/index.mjs +8 -0
- package/dist/catalog/registry.d.mts +46 -0
- package/dist/catalog/registry.mjs +56 -0
- package/dist/catalog/templates.d.mts +11 -0
- package/dist/catalog/templates.mjs +141 -0
- package/dist/chem/battery.d.mts +16 -0
- package/dist/chem/battery.mjs +311 -0
- package/dist/chem/bohr-atom.d.mts +16 -0
- package/dist/chem/bohr-atom.mjs +212 -0
- package/dist/chem/diffusion/asset.mjs +76 -0
- package/dist/chem/diffusion/index.d.mts +1 -0
- package/dist/chem/diffusion/preset.d.mts +15 -0
- package/dist/chem/diffusion/preset.mjs +188 -0
- package/dist/chem/electrochem/index.d.mts +1 -0
- package/dist/chem/electrochem/preset.d.mts +23 -0
- package/dist/chem/electrochem/preset.mjs +402 -0
- package/dist/chem/equilibrium/index.d.mts +1 -0
- package/dist/chem/equilibrium/preset.d.mts +36 -0
- package/dist/chem/equilibrium/preset.mjs +416 -0
- package/dist/chem/gas-box/index.d.mts +1 -0
- package/dist/chem/gas-box/preset.d.mts +27 -0
- package/dist/chem/gas-box/preset.mjs +395 -0
- package/dist/chem/index.d.mts +16 -0
- package/dist/chem/index.mjs +17 -0
- package/dist/chem/kinetics/index.d.mts +1 -0
- package/dist/chem/kinetics/preset.d.mts +31 -0
- package/dist/chem/kinetics/preset.mjs +478 -0
- package/dist/chem/periodic-trends/index.d.mts +1 -0
- package/dist/chem/periodic-trends/preset.d.mts +21 -0
- package/dist/chem/periodic-trends/preset.mjs +831 -0
- package/dist/chem/reaction-lab.d.mts +18 -0
- package/dist/chem/reaction-lab.mjs +165 -0
- package/dist/chem/reaction-profile.d.mts +21 -0
- package/dist/chem/reaction-profile.mjs +287 -0
- package/dist/chem/solution/dilution.d.mts +27 -0
- package/dist/chem/solution/dilution.mjs +199 -0
- package/dist/chem/solution/field.d.mts +30 -0
- package/dist/chem/solution/field.mjs +145 -0
- package/dist/chem/solution/index.d.mts +3 -0
- package/dist/chem/solution/solution-box.d.mts +28 -0
- package/dist/chem/solution/solution-box.mjs +140 -0
- package/dist/chem/stoichiometry/index.d.mts +1 -0
- package/dist/chem/stoichiometry/preset.d.mts +29 -0
- package/dist/chem/stoichiometry/preset.mjs +392 -0
- package/dist/chem/titration/index.d.mts +1 -0
- package/dist/chem/titration/preset.d.mts +29 -0
- package/dist/chem/titration/preset.mjs +436 -0
- package/dist/circuits/ac-dc/asset.mjs +295 -0
- package/dist/circuits/ac-dc/index.d.mts +1 -0
- package/dist/circuits/ac-dc/preset.d.mts +16 -0
- package/dist/circuits/ac-dc/preset.mjs +134 -0
- package/dist/circuits/capacitor-leak/index.d.mts +1 -0
- package/dist/circuits/capacitor-leak/preset.d.mts +32 -0
- package/dist/circuits/capacitor-leak/preset.mjs +271 -0
- package/dist/circuits/circuit/asset.d.mts +6 -0
- package/dist/circuits/circuit/asset.mjs +367 -0
- package/dist/circuits/circuit/index.d.mts +2 -0
- package/dist/circuits/circuit/preset.d.mts +46 -0
- package/dist/circuits/circuit/preset.mjs +235 -0
- package/dist/circuits/circuit-builder.d.mts +30 -0
- package/dist/circuits/circuit-builder.mjs +412 -0
- package/dist/circuits/circuit-lab.d.mts +20 -0
- package/dist/circuits/circuit-lab.mjs +400 -0
- package/dist/circuits/index.d.mts +7 -0
- package/dist/circuits/index.mjs +8 -0
- package/dist/commerce/accounting/core.d.mts +48 -0
- package/dist/commerce/accounting/core.mjs +57 -0
- package/dist/commerce/accounting/equation-balance.d.mts +35 -0
- package/dist/commerce/accounting/equation-balance.mjs +292 -0
- package/dist/commerce/accounting/index.d.mts +4 -0
- package/dist/commerce/accounting/journal-poster.d.mts +29 -0
- package/dist/commerce/accounting/journal-poster.mjs +472 -0
- package/dist/commerce/accounting/statement-sorter.d.mts +25 -0
- package/dist/commerce/accounting/statement-sorter.mjs +304 -0
- package/dist/commerce/economics/core.d.mts +33 -0
- package/dist/commerce/economics/core.mjs +26 -0
- package/dist/commerce/economics/demand-shift-vs-move.d.mts +35 -0
- package/dist/commerce/economics/demand-shift-vs-move.mjs +324 -0
- package/dist/commerce/economics/elasticity-revenue.d.mts +31 -0
- package/dist/commerce/economics/elasticity-revenue.mjs +253 -0
- package/dist/commerce/economics/index.d.mts +4 -0
- package/dist/commerce/economics/market-equilibrium.d.mts +33 -0
- package/dist/commerce/economics/market-equilibrium.mjs +340 -0
- package/dist/commerce/index.d.mts +9 -0
- package/dist/commerce/index.mjs +10 -0
- package/dist/core/easing.d.mts +28 -0
- package/dist/core/easing.mjs +66 -0
- package/dist/core/index.d.mts +10 -0
- package/dist/core/index.mjs +11 -0
- package/dist/core/numeric.d.mts +37 -0
- package/dist/core/numeric.mjs +75 -0
- package/dist/core/reactive.d.mts +24 -0
- package/dist/core/reactive.mjs +51 -0
- package/dist/core/rng.d.mts +21 -0
- package/dist/core/rng.mjs +39 -0
- package/dist/core/tex.d.mts +14 -0
- package/dist/core/tex.mjs +44 -0
- package/dist/core/timeline.d.mts +34 -0
- package/dist/core/timeline.mjs +77 -0
- package/dist/core/util.d.mts +19 -0
- package/dist/core/util.mjs +31 -0
- package/dist/discrete/arrangements/preset.d.mts +28 -0
- package/dist/discrete/arrangements/preset.mjs +304 -0
- package/dist/discrete/bayes/preset.d.mts +33 -0
- package/dist/discrete/bayes/preset.mjs +476 -0
- package/dist/discrete/binomial/preset.d.mts +25 -0
- package/dist/discrete/binomial/preset.mjs +333 -0
- package/dist/discrete/core/combinatorics.d.mts +23 -0
- package/dist/discrete/core/combinatorics.mjs +57 -0
- package/dist/discrete/core/inclusionExclusion.d.mts +19 -0
- package/dist/discrete/core/inclusionExclusion.mjs +30 -0
- package/dist/discrete/core/pigeonhole.d.mts +15 -0
- package/dist/discrete/core/pigeonhole.mjs +24 -0
- package/dist/discrete/core/probability.d.mts +29 -0
- package/dist/discrete/core/probability.mjs +43 -0
- package/dist/discrete/core/sets.d.mts +21 -0
- package/dist/discrete/core/sets.mjs +45 -0
- package/dist/discrete/counting-slots/preset.d.mts +30 -0
- package/dist/discrete/counting-slots/preset.mjs +553 -0
- package/dist/discrete/counting-tree/index.d.mts +1 -0
- package/dist/discrete/counting-tree/preset.d.mts +44 -0
- package/dist/discrete/counting-tree/preset.mjs +364 -0
- package/dist/discrete/expected-value/preset.d.mts +28 -0
- package/dist/discrete/expected-value/preset.mjs +352 -0
- package/dist/discrete/hypergeometric/preset.d.mts +25 -0
- package/dist/discrete/hypergeometric/preset.mjs +330 -0
- package/dist/discrete/index.d.mts +26 -0
- package/dist/discrete/index.mjs +27 -0
- package/dist/discrete/karnaugh/index.d.mts +1 -0
- package/dist/discrete/karnaugh/preset.d.mts +30 -0
- package/dist/discrete/karnaugh/preset.mjs +452 -0
- package/dist/discrete/lln/asset.mjs +206 -0
- package/dist/discrete/lln/index.d.mts +1 -0
- package/dist/discrete/lln/preset.d.mts +17 -0
- package/dist/discrete/lln/preset.mjs +152 -0
- package/dist/discrete/logic-circuit/index.d.mts +1 -0
- package/dist/discrete/logic-circuit/preset.d.mts +47 -0
- package/dist/discrete/logic-circuit/preset.mjs +307 -0
- package/dist/discrete/monte-carlo/index.d.mts +1 -0
- package/dist/discrete/monte-carlo/preset.d.mts +64 -0
- package/dist/discrete/monte-carlo/preset.mjs +446 -0
- package/dist/discrete/monty-hall/index.d.mts +1 -0
- package/dist/discrete/monty-hall/preset.d.mts +23 -0
- package/dist/discrete/monty-hall/preset.mjs +491 -0
- package/dist/discrete/outcome-builder/preset.d.mts +24 -0
- package/dist/discrete/outcome-builder/preset.mjs +283 -0
- package/dist/discrete/pascal/preset.d.mts +24 -0
- package/dist/discrete/pascal/preset.mjs +372 -0
- package/dist/discrete/sample-space/index.d.mts +1 -0
- package/dist/discrete/sample-space/preset.d.mts +42 -0
- package/dist/discrete/sample-space/preset.mjs +395 -0
- package/dist/discrete/selection/preset.d.mts +33 -0
- package/dist/discrete/selection/preset.mjs +406 -0
- package/dist/discrete/truth-table/index.d.mts +1 -0
- package/dist/discrete/truth-table/preset.d.mts +30 -0
- package/dist/discrete/truth-table/preset.mjs +456 -0
- package/dist/discrete/venn/index.d.mts +1 -0
- package/dist/discrete/venn/preset.d.mts +32 -0
- package/dist/discrete/venn/preset.mjs +461 -0
- package/dist/geography/cycle-lab/index.d.mts +1 -0
- package/dist/geography/cycle-lab/preset.d.mts +25 -0
- package/dist/geography/cycle-lab/preset.mjs +254 -0
- package/dist/geography/cycles.d.mts +21 -0
- package/dist/geography/cycles.mjs +205 -0
- package/dist/geography/index.d.mts +4 -0
- package/dist/geography/index.mjs +5 -0
- package/dist/geometry/board/index.d.mts +1 -0
- package/dist/geometry/board/preset.d.mts +71 -0
- package/dist/geometry/board/preset.mjs +148 -0
- package/dist/geometry/builder.d.mts +18 -0
- package/dist/geometry/builder.mjs +332 -0
- package/dist/geometry/index.d.mts +4 -0
- package/dist/geometry/index.mjs +5 -0
- package/dist/geometry/intersecting-circles.d.mts +17 -0
- package/dist/geometry/intersecting-circles.mjs +104 -0
- package/dist/ict/index.d.mts +5 -0
- package/dist/ict/index.mjs +6 -0
- package/dist/ict/number-systems/base-odometer.d.mts +34 -0
- package/dist/ict/number-systems/base-odometer.mjs +160 -0
- package/dist/ict/number-systems/bit-grouper.d.mts +32 -0
- package/dist/ict/number-systems/bit-grouper.mjs +190 -0
- package/dist/ict/number-systems/index.d.mts +4 -0
- package/dist/ict/number-systems/place-value-dial.d.mts +29 -0
- package/dist/ict/number-systems/place-value-dial.mjs +153 -0
- package/dist/ict/number-systems/wheel.d.mts +73 -0
- package/dist/ict/number-systems/wheel.mjs +279 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.mjs +11 -0
- package/dist/kit/anim.mjs +52 -0
- package/dist/kit/annotate.mjs +116 -0
- package/dist/kit/answer-check.d.mts +38 -0
- package/dist/kit/answer-check.mjs +65 -0
- package/dist/kit/asset-util.mjs +15 -0
- package/dist/kit/controls.mjs +77 -0
- package/dist/kit/cycle.d.mts +44 -0
- package/dist/kit/cycle.mjs +188 -0
- package/dist/kit/diagram.mjs +176 -0
- package/dist/kit/electronics.mjs +357 -0
- package/dist/kit/expr-analysis.d.mts +37 -0
- package/dist/kit/expr-analysis.mjs +111 -0
- package/dist/kit/frame.d.mts +70 -0
- package/dist/kit/frame.mjs +205 -0
- package/dist/kit/freq-tree.mjs +99 -0
- package/dist/kit/gameshow.mjs +315 -0
- package/dist/kit/index.d.mts +5 -0
- package/dist/kit/index.mjs +6 -0
- package/dist/kit/logic-gates.d.mts +6 -0
- package/dist/kit/logic-gates.mjs +210 -0
- package/dist/kit/molecules.mjs +178 -0
- package/dist/kit/pedagogy.d.mts +126 -0
- package/dist/kit/pedagogy.mjs +331 -0
- package/dist/kit/play.d.mts +21 -0
- package/dist/kit/play.mjs +52 -0
- package/dist/kit/probability.mjs +141 -0
- package/dist/kit/proportion.mjs +112 -0
- package/dist/kit/reaction.mjs +102 -0
- package/dist/kit/rich.d.mts +10 -0
- package/dist/kit/rich.mjs +21 -0
- package/dist/kit/scale.mjs +230 -0
- package/dist/kit/space.mjs +326 -0
- package/dist/kit/steps.d.mts +24 -0
- package/dist/kit/steps.mjs +57 -0
- package/dist/kit/thermal.mjs +289 -0
- package/dist/language/agreement/index.d.mts +1 -0
- package/dist/language/agreement/preset.d.mts +27 -0
- package/dist/language/agreement/preset.mjs +113 -0
- package/dist/language/article-lens/index.d.mts +1 -0
- package/dist/language/article-lens/preset.d.mts +31 -0
- package/dist/language/article-lens/preset.mjs +125 -0
- package/dist/language/deck.d.mts +45 -0
- package/dist/language/deck.mjs +61 -0
- package/dist/language/icon.d.mts +40 -0
- package/dist/language/icon.mjs +73 -0
- package/dist/language/index.d.mts +10 -0
- package/dist/language/index.mjs +11 -0
- package/dist/language/preposition-scene/index.d.mts +1 -0
- package/dist/language/preposition-scene/preset.d.mts +34 -0
- package/dist/language/preposition-scene/preset.mjs +234 -0
- package/dist/language/sentence-builder/index.d.mts +1 -0
- package/dist/language/sentence-builder/preset.d.mts +32 -0
- package/dist/language/sentence-builder/preset.mjs +122 -0
- package/dist/language/transform/index.d.mts +1 -0
- package/dist/language/transform/preset.d.mts +31 -0
- package/dist/language/transform/preset.mjs +137 -0
- package/dist/language/ui.d.mts +53 -0
- package/dist/language/ui.mjs +88 -0
- package/dist/language/word-match/index.d.mts +1 -0
- package/dist/language/word-match/preset.d.mts +22 -0
- package/dist/language/word-match/preset.mjs +148 -0
- package/dist/math/area-model/asset.d.mts +6 -0
- package/dist/math/area-model/asset.mjs +270 -0
- package/dist/math/area-model/index.d.mts +2 -0
- package/dist/math/area-model/preset.d.mts +29 -0
- package/dist/math/area-model/preset.mjs +243 -0
- package/dist/math/balance-algebra/asset.d.mts +6 -0
- package/dist/math/balance-algebra/asset.mjs +150 -0
- package/dist/math/balance-algebra/index.d.mts +2 -0
- package/dist/math/balance-algebra/preset.d.mts +30 -0
- package/dist/math/balance-algebra/preset.mjs +228 -0
- package/dist/math/derivation.d.mts +22 -0
- package/dist/math/derivation.mjs +113 -0
- package/dist/math/derivative-explorer/index.d.mts +1 -0
- package/dist/math/derivative-explorer/preset.d.mts +19 -0
- package/dist/math/derivative-explorer/preset.mjs +227 -0
- package/dist/math/function-machine/index.d.mts +1 -0
- package/dist/math/function-machine/preset.d.mts +21 -0
- package/dist/math/function-machine/preset.mjs +177 -0
- package/dist/math/gradient-descent.d.mts +23 -0
- package/dist/math/gradient-descent.mjs +473 -0
- package/dist/math/grapher/index.d.mts +1 -0
- package/dist/math/grapher/preset.d.mts +40 -0
- package/dist/math/grapher/preset.mjs +313 -0
- package/dist/math/harmonic-form/index.d.mts +1 -0
- package/dist/math/harmonic-form/preset.d.mts +21 -0
- package/dist/math/harmonic-form/preset.mjs +387 -0
- package/dist/math/index.d.mts +25 -0
- package/dist/math/index.mjs +26 -0
- package/dist/math/integral-explorer/index.d.mts +1 -0
- package/dist/math/integral-explorer/preset.d.mts +23 -0
- package/dist/math/integral-explorer/preset.mjs +217 -0
- package/dist/math/interactive/index.d.mts +1 -0
- package/dist/math/interactive/preset.d.mts +72 -0
- package/dist/math/interactive/preset.mjs +202 -0
- package/dist/math/limit-explorer/index.d.mts +1 -0
- package/dist/math/limit-explorer/preset.d.mts +19 -0
- package/dist/math/limit-explorer/preset.mjs +216 -0
- package/dist/math/linear-system/index.d.mts +1 -0
- package/dist/math/linear-system/preset.d.mts +28 -0
- package/dist/math/linear-system/preset.mjs +164 -0
- package/dist/math/mystery-bucket/asset.d.mts +6 -0
- package/dist/math/mystery-bucket/asset.mjs +145 -0
- package/dist/math/mystery-bucket/index.d.mts +2 -0
- package/dist/math/mystery-bucket/preset.d.mts +36 -0
- package/dist/math/mystery-bucket/preset.mjs +116 -0
- package/dist/math/number-line/index.d.mts +1 -0
- package/dist/math/number-line/preset.d.mts +24 -0
- package/dist/math/number-line/preset.mjs +142 -0
- package/dist/math/parabola/index.d.mts +1 -0
- package/dist/math/parabola/preset.d.mts +13 -0
- package/dist/math/parabola/preset.mjs +79 -0
- package/dist/math/pattern/asset.d.mts +6 -0
- package/dist/math/pattern/asset.mjs +102 -0
- package/dist/math/pattern/index.d.mts +2 -0
- package/dist/math/pattern/preset.d.mts +32 -0
- package/dist/math/pattern/preset.mjs +294 -0
- package/dist/math/triangle-trig/index.d.mts +1 -0
- package/dist/math/triangle-trig/preset.d.mts +47 -0
- package/dist/math/triangle-trig/preset.mjs +245 -0
- package/dist/math/trig-explorer.d.mts +18 -0
- package/dist/math/trig-explorer.mjs +209 -0
- package/dist/ml/boundary/index.d.mts +1 -0
- package/dist/ml/boundary/preset.d.mts +24 -0
- package/dist/ml/boundary/preset.mjs +385 -0
- package/dist/ml/classifier/index.d.mts +1 -0
- package/dist/ml/classifier/preset.d.mts +25 -0
- package/dist/ml/classifier/preset.mjs +315 -0
- package/dist/ml/index.d.mts +6 -0
- package/dist/ml/index.mjs +7 -0
- package/dist/ml/kmeans/index.d.mts +1 -0
- package/dist/ml/kmeans/preset.d.mts +33 -0
- package/dist/ml/kmeans/preset.mjs +236 -0
- package/dist/ml/knn/index.d.mts +1 -0
- package/dist/ml/knn/preset.d.mts +28 -0
- package/dist/ml/knn/preset.mjs +279 -0
- package/dist/ml/regression/index.d.mts +1 -0
- package/dist/ml/regression/preset.d.mts +32 -0
- package/dist/ml/regression/preset.mjs +394 -0
- package/dist/physics/atwood/index.d.mts +1 -0
- package/dist/physics/atwood/preset.d.mts +23 -0
- package/dist/physics/atwood/preset.mjs +312 -0
- package/dist/physics/bullet-walls/index.d.mts +1 -0
- package/dist/physics/bullet-walls/preset.d.mts +28 -0
- package/dist/physics/bullet-walls/preset.mjs +373 -0
- package/dist/physics/carnot/index.d.mts +1 -0
- package/dist/physics/carnot/preset.d.mts +27 -0
- package/dist/physics/carnot/preset.mjs +427 -0
- package/dist/physics/circular-motion/index.d.mts +1 -0
- package/dist/physics/circular-motion/preset.d.mts +25 -0
- package/dist/physics/circular-motion/preset.mjs +293 -0
- package/dist/physics/collision-track/index.d.mts +1 -0
- package/dist/physics/collision-track/preset.d.mts +27 -0
- package/dist/physics/collision-track/preset.mjs +352 -0
- package/dist/physics/efficiency/index.d.mts +1 -0
- package/dist/physics/efficiency/preset.d.mts +33 -0
- package/dist/physics/efficiency/preset.mjs +343 -0
- package/dist/physics/electric-field/index.d.mts +1 -0
- package/dist/physics/electric-field/preset.d.mts +15 -0
- package/dist/physics/electric-field/preset.mjs +306 -0
- package/dist/physics/energy-skate/index.d.mts +1 -0
- package/dist/physics/energy-skate/preset.d.mts +25 -0
- package/dist/physics/energy-skate/preset.mjs +254 -0
- package/dist/physics/entropy/index.d.mts +1 -0
- package/dist/physics/entropy/preset.d.mts +18 -0
- package/dist/physics/entropy/preset.mjs +416 -0
- package/dist/physics/expansion/index.d.mts +1 -0
- package/dist/physics/expansion/preset.d.mts +26 -0
- package/dist/physics/expansion/preset.mjs +609 -0
- package/dist/physics/exponential/asset.mjs +221 -0
- package/dist/physics/exponential/index.d.mts +1 -0
- package/dist/physics/exponential/preset.d.mts +17 -0
- package/dist/physics/exponential/preset.mjs +182 -0
- package/dist/physics/gas-process/index.d.mts +1 -0
- package/dist/physics/gas-process/preset.d.mts +30 -0
- package/dist/physics/gas-process/preset.mjs +384 -0
- package/dist/physics/gravitation/index.d.mts +1 -0
- package/dist/physics/gravitation/preset.d.mts +24 -0
- package/dist/physics/gravitation/preset.mjs +345 -0
- package/dist/physics/gravity-drop.d.mts +9 -0
- package/dist/physics/gravity-drop.mjs +187 -0
- package/dist/physics/heat-transfer/index.d.mts +1 -0
- package/dist/physics/heat-transfer/preset.d.mts +27 -0
- package/dist/physics/heat-transfer/preset.mjs +626 -0
- package/dist/physics/impulse/index.d.mts +1 -0
- package/dist/physics/impulse/preset.d.mts +29 -0
- package/dist/physics/impulse/preset.mjs +453 -0
- package/dist/physics/index.d.mts +43 -0
- package/dist/physics/index.mjs +44 -0
- package/dist/physics/kepler/index.d.mts +1 -0
- package/dist/physics/kepler/preset.d.mts +27 -0
- package/dist/physics/kepler/preset.mjs +257 -0
- package/dist/physics/lever/asset.d.mts +6 -0
- package/dist/physics/lever/asset.mjs +220 -0
- package/dist/physics/lever/index.d.mts +2 -0
- package/dist/physics/lever/preset.d.mts +31 -0
- package/dist/physics/lever/preset.mjs +261 -0
- package/dist/physics/lorentz/index.d.mts +1 -0
- package/dist/physics/lorentz/preset.d.mts +29 -0
- package/dist/physics/lorentz/preset.mjs +367 -0
- package/dist/physics/magnetism/index.d.mts +1 -0
- package/dist/physics/magnetism/preset.d.mts +15 -0
- package/dist/physics/magnetism/preset.mjs +334 -0
- package/dist/physics/optics/asset.d.mts +6 -0
- package/dist/physics/optics/asset.mjs +234 -0
- package/dist/physics/optics/index.d.mts +2 -0
- package/dist/physics/optics/preset.d.mts +14 -0
- package/dist/physics/optics/preset.mjs +202 -0
- package/dist/physics/orbit-lab.d.mts +6 -0
- package/dist/physics/orbit-lab.mjs +222 -0
- package/dist/physics/projectile-lab.d.mts +10 -0
- package/dist/physics/projectile-lab.mjs +354 -0
- package/dist/physics/rain-relative/index.d.mts +1 -0
- package/dist/physics/rain-relative/preset.d.mts +19 -0
- package/dist/physics/rain-relative/preset.mjs +358 -0
- package/dist/physics/ramp-forces/index.d.mts +1 -0
- package/dist/physics/ramp-forces/preset.d.mts +36 -0
- package/dist/physics/ramp-forces/preset.mjs +550 -0
- package/dist/physics/river-boat.d.mts +22 -0
- package/dist/physics/river-boat.mjs +498 -0
- package/dist/physics/shm/index.d.mts +1 -0
- package/dist/physics/shm/preset.d.mts +33 -0
- package/dist/physics/shm/preset.mjs +554 -0
- package/dist/physics/stopping-distance/index.d.mts +1 -0
- package/dist/physics/stopping-distance/preset.d.mts +29 -0
- package/dist/physics/stopping-distance/preset.mjs +662 -0
- package/dist/physics/temperature-scales/index.d.mts +1 -0
- package/dist/physics/temperature-scales/preset.d.mts +15 -0
- package/dist/physics/temperature-scales/preset.mjs +353 -0
- package/dist/physics/terminal-velocity/index.d.mts +1 -0
- package/dist/physics/terminal-velocity/preset.d.mts +26 -0
- package/dist/physics/terminal-velocity/preset.mjs +404 -0
- package/dist/physics/thermal/index.d.mts +1 -0
- package/dist/physics/thermal/preset.d.mts +44 -0
- package/dist/physics/thermal/preset.mjs +373 -0
- package/dist/physics/vector-board/index.d.mts +1 -0
- package/dist/physics/vector-board/preset.d.mts +65 -0
- package/dist/physics/vector-board/preset.mjs +273 -0
- package/dist/physics/vector-board/view.d.mts +49 -0
- package/dist/physics/vector-board/view.mjs +58 -0
- package/dist/physics/vector-scene.d.mts +41 -0
- package/dist/physics/vector-scene.mjs +211 -0
- package/dist/physics/vector-types/index.d.mts +1 -0
- package/dist/physics/vector-types/preset.d.mts +27 -0
- package/dist/physics/vector-types/preset.mjs +192 -0
- package/dist/physics/water-density/index.d.mts +1 -0
- package/dist/physics/water-density/preset.d.mts +18 -0
- package/dist/physics/water-density/preset.mjs +439 -0
- package/dist/physics/waves/core.mjs +33 -0
- package/dist/physics/waves/doppler.d.mts +23 -0
- package/dist/physics/waves/doppler.mjs +260 -0
- package/dist/physics/waves/index.d.mts +4 -0
- package/dist/physics/waves/preset.d.mts +30 -0
- package/dist/physics/waves/preset.mjs +488 -0
- package/dist/physics/waves/ripple.d.mts +26 -0
- package/dist/physics/waves/ripple.mjs +234 -0
- package/dist/physics/waves/string.d.mts +29 -0
- package/dist/physics/waves/string.mjs +289 -0
- package/dist/physics/work-energy/index.d.mts +1 -0
- package/dist/physics/work-energy/preset.d.mts +17 -0
- package/dist/physics/work-energy/preset.mjs +341 -0
- package/dist/schemas/index.d.mts +235 -0
- package/dist/schemas/index.mjs +145 -0
- package/dist/statistics/center-spread/preset.d.mts +34 -0
- package/dist/statistics/center-spread/preset.mjs +323 -0
- package/dist/statistics/core/descriptive.d.mts +35 -0
- package/dist/statistics/core/descriptive.mjs +64 -0
- package/dist/statistics/core/normal.d.mts +21 -0
- package/dist/statistics/core/normal.mjs +37 -0
- package/dist/statistics/core/sequences.d.mts +27 -0
- package/dist/statistics/core/sequences.mjs +35 -0
- package/dist/statistics/galton/preset.d.mts +27 -0
- package/dist/statistics/galton/preset.mjs +331 -0
- package/dist/statistics/histogram/preset.d.mts +27 -0
- package/dist/statistics/histogram/preset.mjs +385 -0
- package/dist/statistics/index.d.mts +11 -0
- package/dist/statistics/index.mjs +12 -0
- package/dist/statistics/normal/preset.d.mts +30 -0
- package/dist/statistics/normal/preset.mjs +400 -0
- package/dist/statistics/sampling/preset.d.mts +32 -0
- package/dist/statistics/sampling/preset.mjs +406 -0
- package/dist/statistics/sequence/preset.d.mts +28 -0
- package/dist/statistics/sequence/preset.mjs +302 -0
- package/dist/statistics/z-table/preset.d.mts +28 -0
- package/dist/statistics/z-table/preset.mjs +348 -0
- package/package.json +266 -0
- package/styles.css +267 -0
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { clamp } from "../../core/util.mjs";
|
|
4
|
+
import { Chip, Slider } from "../../kit/controls.mjs";
|
|
5
|
+
import { ControlBar, Field, LabFrame, LiveRegion } from "../../kit/frame.mjs";
|
|
6
|
+
import { ChallengeCard, useChallenge, useCheckpoint } from "../../kit/pedagogy.mjs";
|
|
7
|
+
import { useFrameTick, useReducedMotionDeferred } from "../../kit/anim.mjs";
|
|
8
|
+
import { PlayWrap, usePlayGate } from "../../kit/play.mjs";
|
|
9
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { CanvasLayer, fmt } from "@classytic/stage";
|
|
12
|
+
|
|
13
|
+
//#region src/chem/gas-box/preset.tsx
|
|
14
|
+
/**
|
|
15
|
+
* GasBoxLab — gas in a box: pressure you can watch being MADE.
|
|
16
|
+
*
|
|
17
|
+
* Hundreds of molecules bounce in a box on <CanvasLayer>; drag the piston to set
|
|
18
|
+
* volume, slide temperature (every molecule speeds up, cool→hot colour) and amount
|
|
19
|
+
* n (dots appear/vanish). Pressure is NOT a control — it is MEASURED from how often
|
|
20
|
+
* + how hard the molecules drum the walls (each wall strike flashes), so PV=nRT
|
|
21
|
+
* emerges from the mechanism instead of being plugged in. A "hold constant" lock
|
|
22
|
+
* yields Boyle (lock T), Gay-Lussac (lock V), Charles (lock P → piston floats).
|
|
23
|
+
*
|
|
24
|
+
* The kinetic-theory algebra (P = ⅓(N/V)m⟨v²⟩ → PV=nRT) lives in a PAIRED
|
|
25
|
+
* MathDerivation block, not here — the sim makes it felt, the derivation proves it.
|
|
26
|
+
* SVG gauge/readouts overlay the canvas; honours prefers-reduced-motion.
|
|
27
|
+
*/
|
|
28
|
+
const GASBOX_CHALLENGE = [{
|
|
29
|
+
id: "boyle",
|
|
30
|
+
prompt: "Hold the temperature fixed and HALVE the volume. The pressure…",
|
|
31
|
+
choices: [
|
|
32
|
+
{
|
|
33
|
+
value: "double",
|
|
34
|
+
label: "doubles"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
value: "half",
|
|
38
|
+
label: "halves"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
value: "same",
|
|
42
|
+
label: "is unchanged"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
answer: "double",
|
|
46
|
+
explain: "Same molecules strike half the space twice as often — Boyle’s law, P ∝ 1/V."
|
|
47
|
+
}, {
|
|
48
|
+
id: "gaylussac",
|
|
49
|
+
prompt: "Hold the volume fixed and HEAT the gas. The pressure…",
|
|
50
|
+
choices: [
|
|
51
|
+
{
|
|
52
|
+
value: "rise",
|
|
53
|
+
label: "rises"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
value: "fall",
|
|
57
|
+
label: "falls"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
value: "same",
|
|
61
|
+
label: "is unchanged"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
answer: "rise",
|
|
65
|
+
explain: "Hotter molecules move faster and hit the walls harder and more often — Gay-Lussac, P ∝ T."
|
|
66
|
+
}];
|
|
67
|
+
const H = 6, MAXV = 10, MINV = 2.5, R = .13, MAXN = 320;
|
|
68
|
+
const T0 = 300, SPEED0 = 5.5, TMIN = 80, TMAX = 600;
|
|
69
|
+
const PDISP = 1.5;
|
|
70
|
+
function GasBoxLab({ holdConstant = "none", particleCount = 180, temperature = 300, volume = 7, showGauge = true, title = "Gas in a box — watch pressure being made", prompt = "Drag the piston, heat it up, add molecules. Pressure is the drumbeat of hits on the walls.", height = 300, objectives }) {
|
|
71
|
+
const [mode, setMode] = useState(holdConstant);
|
|
72
|
+
const [vol, setVol] = useState(clamp(volume, MINV, MAXV));
|
|
73
|
+
const [temp, setTemp] = useState(clamp(temperature, TMIN, TMAX));
|
|
74
|
+
const [n, setN] = useState(clamp(Math.round(particleCount), 10, MAXN));
|
|
75
|
+
const challenge = useChallenge(GASBOX_CHALLENGE);
|
|
76
|
+
useCheckpoint({
|
|
77
|
+
solved: challenge.allCorrect,
|
|
78
|
+
activity: "gas-box"
|
|
79
|
+
});
|
|
80
|
+
const particles = useRef([]);
|
|
81
|
+
useRef(0);
|
|
82
|
+
const pressure = useRef(40);
|
|
83
|
+
const flashes = useRef([]);
|
|
84
|
+
const pTarget = useRef(0);
|
|
85
|
+
const reduce = useReducedMotionDeferred();
|
|
86
|
+
const gate = usePlayGate();
|
|
87
|
+
const [mounted, setMounted] = useState(false);
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
setMounted(true);
|
|
90
|
+
}, []);
|
|
91
|
+
if (particles.current.length === 0) {
|
|
92
|
+
const pool = [];
|
|
93
|
+
for (let i = 0; i < MAXN; i++) {
|
|
94
|
+
const a = i * 2.39996 % (Math.PI * 2);
|
|
95
|
+
pool.push({
|
|
96
|
+
x: R + i * .211 % 1 * (MINV - 2 * R) + .5,
|
|
97
|
+
y: R + i * .137 % 1 * (H - 2 * R),
|
|
98
|
+
vx: Math.cos(a) * SPEED0,
|
|
99
|
+
vy: Math.sin(a) * SPEED0
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
particles.current = pool;
|
|
103
|
+
}
|
|
104
|
+
const targetSpeed = SPEED0 * Math.sqrt(temp / T0);
|
|
105
|
+
useFrameTick(gate.running && !reduce, (f) => {
|
|
106
|
+
const dt = Math.min(.032, f.dtMs / 1e3);
|
|
107
|
+
const right = vol;
|
|
108
|
+
let imp = 0;
|
|
109
|
+
const ps = particles.current;
|
|
110
|
+
for (let i = 0; i < n; i++) {
|
|
111
|
+
const p = ps[i];
|
|
112
|
+
const k = targetSpeed / (Math.hypot(p.vx, p.vy) || 1);
|
|
113
|
+
p.vx *= k;
|
|
114
|
+
p.vy *= k;
|
|
115
|
+
p.x += p.vx * dt;
|
|
116
|
+
p.y += p.vy * dt;
|
|
117
|
+
if (p.x < R) {
|
|
118
|
+
p.x = R;
|
|
119
|
+
p.vx = Math.abs(p.vx);
|
|
120
|
+
imp += 2 * Math.abs(p.vx);
|
|
121
|
+
flashes.current.push({
|
|
122
|
+
along: p.y / H,
|
|
123
|
+
side: 0,
|
|
124
|
+
life: 1
|
|
125
|
+
});
|
|
126
|
+
} else if (p.x > right - R) {
|
|
127
|
+
p.x = right - R;
|
|
128
|
+
p.vx = -Math.abs(p.vx);
|
|
129
|
+
imp += 2 * Math.abs(p.vx);
|
|
130
|
+
flashes.current.push({
|
|
131
|
+
along: p.y / H,
|
|
132
|
+
side: 1,
|
|
133
|
+
life: 1
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
if (p.y < R) {
|
|
137
|
+
p.y = R;
|
|
138
|
+
p.vy = Math.abs(p.vy);
|
|
139
|
+
imp += 2 * Math.abs(p.vy);
|
|
140
|
+
flashes.current.push({
|
|
141
|
+
along: p.x / right,
|
|
142
|
+
side: 2,
|
|
143
|
+
life: 1
|
|
144
|
+
});
|
|
145
|
+
} else if (p.y > H - R) {
|
|
146
|
+
p.y = H - R;
|
|
147
|
+
p.vy = -Math.abs(p.vy);
|
|
148
|
+
imp += 2 * Math.abs(p.vy);
|
|
149
|
+
flashes.current.push({
|
|
150
|
+
along: p.x / right,
|
|
151
|
+
side: 3,
|
|
152
|
+
life: 1
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
const perim = 2 * (right + H);
|
|
157
|
+
const pInst = imp / (dt * perim);
|
|
158
|
+
pressure.current = pressure.current * .9 + pInst * .1;
|
|
159
|
+
if (mode === "pressure" && pTarget.current > 0) setVol((v) => clamp(v + clamp((pressure.current - pTarget.current) * .04, -3, 3) * dt, MINV, MAXV));
|
|
160
|
+
if (flashes.current.length > 60) flashes.current.splice(0, flashes.current.length - 60);
|
|
161
|
+
for (const fl of flashes.current) fl.life -= dt * 3.5;
|
|
162
|
+
flashes.current = flashes.current.filter((fl) => fl.life > 0);
|
|
163
|
+
});
|
|
164
|
+
const pShow = mounted && reduce ? .0117 * n * temp / vol : pressure.current * PDISP;
|
|
165
|
+
const draw = (ctx, c) => {
|
|
166
|
+
const cs = getComputedStyle(document.documentElement);
|
|
167
|
+
const tok = (name, fb) => cs.getPropertyValue(name).trim() || fb;
|
|
168
|
+
const fg = tok("--stage-fg", "#222"), grid = tok("--stage-grid", "rgba(0,0,0,.1)"), warn = tok("--stage-warn", "#e0a020"), metal = tok("--stage-metal", "#8a8a8a");
|
|
169
|
+
const right = vol;
|
|
170
|
+
const [x0, y0] = c.toPx(0, H);
|
|
171
|
+
const [x1, y1] = c.toPx(right, 0);
|
|
172
|
+
const [bx] = c.toPx(MAXV, 0);
|
|
173
|
+
ctx.clearRect(0, 0, bx + 40, y1 + 40);
|
|
174
|
+
ctx.fillStyle = grid;
|
|
175
|
+
ctx.globalAlpha = .35;
|
|
176
|
+
ctx.fillRect(x0, y0, x1 - x0, y1 - y0);
|
|
177
|
+
ctx.globalAlpha = 1;
|
|
178
|
+
ctx.strokeStyle = fg;
|
|
179
|
+
ctx.lineWidth = 2;
|
|
180
|
+
ctx.strokeRect(x0, y0, x1 - x0, y1 - y0);
|
|
181
|
+
ctx.fillStyle = `hsl(${(232 - clamp((temp - TMIN) / (TMAX - TMIN), 0, 1) * 210).toFixed(0)} 78% 55%)`;
|
|
182
|
+
const rpx = Math.max(2.4, c.sx(R) * 1.4);
|
|
183
|
+
for (let i = 0; i < n; i++) {
|
|
184
|
+
const p = particles.current[i];
|
|
185
|
+
const [px, py] = c.toPx(Math.min(p.x, right - R), p.y);
|
|
186
|
+
ctx.beginPath();
|
|
187
|
+
ctx.arc(px, py, rpx, 0, Math.PI * 2);
|
|
188
|
+
ctx.fill();
|
|
189
|
+
}
|
|
190
|
+
ctx.strokeStyle = warn;
|
|
191
|
+
ctx.lineWidth = 3;
|
|
192
|
+
for (const fl of flashes.current) {
|
|
193
|
+
ctx.globalAlpha = clamp(fl.life, 0, 1);
|
|
194
|
+
ctx.beginPath();
|
|
195
|
+
if (fl.side === 0) {
|
|
196
|
+
const [fx, fy] = c.toPx(0, fl.along * H);
|
|
197
|
+
ctx.moveTo(fx, fy);
|
|
198
|
+
ctx.lineTo(fx + 9, fy);
|
|
199
|
+
} else if (fl.side === 1) {
|
|
200
|
+
const [fx, fy] = c.toPx(right, fl.along * H);
|
|
201
|
+
ctx.moveTo(fx, fy);
|
|
202
|
+
ctx.lineTo(fx - 9, fy);
|
|
203
|
+
} else if (fl.side === 2) {
|
|
204
|
+
const [fx, fy] = c.toPx(fl.along * right, 0);
|
|
205
|
+
ctx.moveTo(fx, fy);
|
|
206
|
+
ctx.lineTo(fx, fy - 9);
|
|
207
|
+
} else {
|
|
208
|
+
const [fx, fy] = c.toPx(fl.along * right, H);
|
|
209
|
+
ctx.moveTo(fx, fy);
|
|
210
|
+
ctx.lineTo(fx, fy + 9);
|
|
211
|
+
}
|
|
212
|
+
ctx.stroke();
|
|
213
|
+
}
|
|
214
|
+
ctx.globalAlpha = 1;
|
|
215
|
+
const [pxr, pyt] = c.toPx(right, H);
|
|
216
|
+
const [, pyb] = c.toPx(right, 0);
|
|
217
|
+
ctx.fillStyle = metal;
|
|
218
|
+
ctx.fillRect(pxr - 4, pyt, 8, pyb - pyt);
|
|
219
|
+
ctx.fillRect(pxr - 2, (pyt + pyb) / 2 - 14, 14, 28);
|
|
220
|
+
};
|
|
221
|
+
const onPiston = useMemo(() => mode === "none" || mode === "temperature" ? (m) => setVol(clamp(m[0], MINV, MAXV)) : void 0, [mode]);
|
|
222
|
+
const pickMode = (next) => {
|
|
223
|
+
if (next === "pressure") pTarget.current = pShow / PDISP;
|
|
224
|
+
setMode(next);
|
|
225
|
+
};
|
|
226
|
+
const view = useMemo(() => ({
|
|
227
|
+
xMin: -.3,
|
|
228
|
+
xMax: 10.6,
|
|
229
|
+
yMin: -.4,
|
|
230
|
+
yMax: 6.4
|
|
231
|
+
}), []);
|
|
232
|
+
const pvnt = pShow * vol / (n * temp);
|
|
233
|
+
const figure = /* @__PURE__ */ jsx(PlayWrap, {
|
|
234
|
+
gate,
|
|
235
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
236
|
+
style: {
|
|
237
|
+
position: "relative",
|
|
238
|
+
borderRadius: 14,
|
|
239
|
+
overflow: "hidden",
|
|
240
|
+
background: "var(--stage-bg)",
|
|
241
|
+
border: "1px solid var(--stage-grid)"
|
|
242
|
+
},
|
|
243
|
+
children: [
|
|
244
|
+
/* @__PURE__ */ jsx(CanvasLayer, {
|
|
245
|
+
view,
|
|
246
|
+
height,
|
|
247
|
+
draw,
|
|
248
|
+
onPointerMath: onPiston,
|
|
249
|
+
ariaLabel: `gas box: ${n} molecules at ${Math.round(temp)} kelvin, pressure ${pShow.toFixed(0)}`
|
|
250
|
+
}),
|
|
251
|
+
showGauge && /* @__PURE__ */ jsxs("div", {
|
|
252
|
+
style: {
|
|
253
|
+
position: "absolute",
|
|
254
|
+
top: 10,
|
|
255
|
+
right: 12,
|
|
256
|
+
textAlign: "center",
|
|
257
|
+
background: "color-mix(in oklab, var(--stage-bg) 80%, transparent)",
|
|
258
|
+
borderRadius: 10,
|
|
259
|
+
padding: "6px 10px",
|
|
260
|
+
border: "1px solid var(--stage-grid)"
|
|
261
|
+
},
|
|
262
|
+
children: [/* @__PURE__ */ jsxs("svg", {
|
|
263
|
+
width: 84,
|
|
264
|
+
height: 50,
|
|
265
|
+
viewBox: "0 0 84 50",
|
|
266
|
+
"aria-hidden": true,
|
|
267
|
+
children: [
|
|
268
|
+
/* @__PURE__ */ jsx("path", {
|
|
269
|
+
d: "M 8 46 A 34 34 0 0 1 76 46",
|
|
270
|
+
fill: "none",
|
|
271
|
+
stroke: "var(--stage-grid)",
|
|
272
|
+
strokeWidth: 6,
|
|
273
|
+
strokeLinecap: "round"
|
|
274
|
+
}),
|
|
275
|
+
(() => {
|
|
276
|
+
const a = Math.PI - clamp(pShow / 220, 0, 1) * Math.PI;
|
|
277
|
+
return /* @__PURE__ */ jsx("line", {
|
|
278
|
+
x1: 42,
|
|
279
|
+
y1: 46,
|
|
280
|
+
x2: fmt(42 + Math.cos(a) * 30),
|
|
281
|
+
y2: fmt(46 - Math.sin(a) * 30),
|
|
282
|
+
stroke: "var(--stage-warn)",
|
|
283
|
+
strokeWidth: 3,
|
|
284
|
+
strokeLinecap: "round"
|
|
285
|
+
});
|
|
286
|
+
})(),
|
|
287
|
+
/* @__PURE__ */ jsx("circle", {
|
|
288
|
+
cx: 42,
|
|
289
|
+
cy: 46,
|
|
290
|
+
r: 3,
|
|
291
|
+
fill: "var(--stage-fg)"
|
|
292
|
+
})
|
|
293
|
+
]
|
|
294
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
295
|
+
style: {
|
|
296
|
+
fontWeight: 800,
|
|
297
|
+
fontVariantNumeric: "tabular-nums",
|
|
298
|
+
fontSize: 14
|
|
299
|
+
},
|
|
300
|
+
children: ["P ", pShow.toFixed(0)]
|
|
301
|
+
})]
|
|
302
|
+
}),
|
|
303
|
+
/* @__PURE__ */ jsx(LiveRegion, { children: `Pressure ${pShow.toFixed(0)}, volume ${vol.toFixed(1)}, temperature ${Math.round(temp)} kelvin, ${n} molecules.` })
|
|
304
|
+
]
|
|
305
|
+
})
|
|
306
|
+
});
|
|
307
|
+
return /* @__PURE__ */ jsx(LabFrame, {
|
|
308
|
+
title,
|
|
309
|
+
prompt,
|
|
310
|
+
objectives,
|
|
311
|
+
controls: /* @__PURE__ */ jsxs(ControlBar, { children: [
|
|
312
|
+
/* @__PURE__ */ jsx(Field, {
|
|
313
|
+
label: "hold constant",
|
|
314
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
315
|
+
style: {
|
|
316
|
+
display: "flex",
|
|
317
|
+
flexWrap: "wrap",
|
|
318
|
+
gap: 8
|
|
319
|
+
},
|
|
320
|
+
children: [
|
|
321
|
+
/* @__PURE__ */ jsx(Chip, {
|
|
322
|
+
selected: mode === "none",
|
|
323
|
+
onClick: () => pickMode("none"),
|
|
324
|
+
children: "free"
|
|
325
|
+
}),
|
|
326
|
+
/* @__PURE__ */ jsx(Chip, {
|
|
327
|
+
selected: mode === "temperature",
|
|
328
|
+
onClick: () => pickMode("temperature"),
|
|
329
|
+
children: "T (Boyle)"
|
|
330
|
+
}),
|
|
331
|
+
/* @__PURE__ */ jsx(Chip, {
|
|
332
|
+
selected: mode === "volume",
|
|
333
|
+
onClick: () => pickMode("volume"),
|
|
334
|
+
children: "V (Gay-Lussac)"
|
|
335
|
+
}),
|
|
336
|
+
/* @__PURE__ */ jsx(Chip, {
|
|
337
|
+
selected: mode === "pressure",
|
|
338
|
+
onClick: () => pickMode("pressure"),
|
|
339
|
+
children: "P (Charles)"
|
|
340
|
+
})
|
|
341
|
+
]
|
|
342
|
+
})
|
|
343
|
+
}),
|
|
344
|
+
/* @__PURE__ */ jsx(Field, {
|
|
345
|
+
label: "temperature",
|
|
346
|
+
value: `${Math.round(temp)} K`,
|
|
347
|
+
children: /* @__PURE__ */ jsx(Slider, {
|
|
348
|
+
value: temp,
|
|
349
|
+
min: TMIN,
|
|
350
|
+
max: TMAX,
|
|
351
|
+
step: 5,
|
|
352
|
+
onChange: mode === "temperature" ? () => {} : setTemp,
|
|
353
|
+
ariaLabel: "temperature (kelvin)"
|
|
354
|
+
})
|
|
355
|
+
}),
|
|
356
|
+
/* @__PURE__ */ jsx(Field, {
|
|
357
|
+
label: "amount n",
|
|
358
|
+
value: n,
|
|
359
|
+
children: /* @__PURE__ */ jsx(Slider, {
|
|
360
|
+
value: n,
|
|
361
|
+
min: 10,
|
|
362
|
+
max: MAXN,
|
|
363
|
+
step: 10,
|
|
364
|
+
onChange: setN,
|
|
365
|
+
ariaLabel: "number of molecules"
|
|
366
|
+
})
|
|
367
|
+
}),
|
|
368
|
+
/* @__PURE__ */ jsx(Field, {
|
|
369
|
+
label: "V",
|
|
370
|
+
value: `${vol.toFixed(1)} L`,
|
|
371
|
+
children: /* @__PURE__ */ jsx("span", {})
|
|
372
|
+
}),
|
|
373
|
+
/* @__PURE__ */ jsx(Field, {
|
|
374
|
+
label: "PV/nT",
|
|
375
|
+
value: /* @__PURE__ */ jsxs("span", {
|
|
376
|
+
style: { color: "var(--stage-good)" },
|
|
377
|
+
children: ["≈ ", pvnt.toFixed(2)]
|
|
378
|
+
}),
|
|
379
|
+
children: /* @__PURE__ */ jsx("span", {})
|
|
380
|
+
})
|
|
381
|
+
] }),
|
|
382
|
+
footer: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("p", {
|
|
383
|
+
className: "lab-prompt",
|
|
384
|
+
children: mode === "volume" ? "piston locked" : mode === "pressure" ? "piston floats to hold P" : "drag the piston to set V"
|
|
385
|
+
}), /* @__PURE__ */ jsx(ChallengeCard, {
|
|
386
|
+
questions: GASBOX_CHALLENGE,
|
|
387
|
+
state: challenge,
|
|
388
|
+
title: "Predict the gas laws"
|
|
389
|
+
})] }),
|
|
390
|
+
children: figure
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
//#endregion
|
|
395
|
+
export { GasBoxLab };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GasBoxLab, GasBoxProps } from "./gas-box/preset.mjs";
|
|
2
|
+
import { SolutionField, SolutionFieldProps } from "./solution/field.mjs";
|
|
3
|
+
import { SolutionBoxLab, SolutionBoxProps } from "./solution/solution-box.mjs";
|
|
4
|
+
import { DilutionLab, DilutionProps } from "./solution/dilution.mjs";
|
|
5
|
+
import { BohrAtom, BohrAtomProps } from "./bohr-atom.mjs";
|
|
6
|
+
import { ReactionProfile, ReactionProfileProps } from "./reaction-profile.mjs";
|
|
7
|
+
import { ReactionLab, ReactionLabProps } from "./reaction-lab.mjs";
|
|
8
|
+
import { Battery, BatteryProps } from "./battery.mjs";
|
|
9
|
+
import { DiffusionLab, DiffusionProps } from "./diffusion/preset.mjs";
|
|
10
|
+
import { LeChatelierLab, LeChatelierProps } from "./equilibrium/preset.mjs";
|
|
11
|
+
import { TitrationLab, TitrationProps } from "./titration/preset.mjs";
|
|
12
|
+
import { ElectrochemLab, ElectrochemProps } from "./electrochem/preset.mjs";
|
|
13
|
+
import { KineticsLab, KineticsProps } from "./kinetics/preset.mjs";
|
|
14
|
+
import { StoichiometryLab, StoichiometryProps } from "./stoichiometry/preset.mjs";
|
|
15
|
+
import { PeriodicTrendsLab, PeriodicTrendsProps } from "./periodic-trends/preset.mjs";
|
|
16
|
+
export { Battery, type BatteryProps, BohrAtom, type BohrAtomProps, DiffusionLab, type DiffusionProps, DilutionLab, type DilutionProps, ElectrochemLab, type ElectrochemProps, GasBoxLab, type GasBoxProps, KineticsLab, type KineticsProps, LeChatelierLab, type LeChatelierProps, PeriodicTrendsLab, type PeriodicTrendsProps, ReactionLab, type ReactionLabProps, ReactionProfile, type ReactionProfileProps, SolutionBoxLab, type SolutionBoxProps, SolutionField, type SolutionFieldProps, StoichiometryLab, type StoichiometryProps, TitrationLab, type TitrationProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GasBoxLab } from "./gas-box/preset.mjs";
|
|
2
|
+
import { SolutionField } from "./solution/field.mjs";
|
|
3
|
+
import { SolutionBoxLab } from "./solution/solution-box.mjs";
|
|
4
|
+
import { DilutionLab } from "./solution/dilution.mjs";
|
|
5
|
+
import { BohrAtom } from "./bohr-atom.mjs";
|
|
6
|
+
import { ReactionProfile } from "./reaction-profile.mjs";
|
|
7
|
+
import { ReactionLab } from "./reaction-lab.mjs";
|
|
8
|
+
import { Battery } from "./battery.mjs";
|
|
9
|
+
import { DiffusionLab } from "./diffusion/preset.mjs";
|
|
10
|
+
import { LeChatelierLab } from "./equilibrium/preset.mjs";
|
|
11
|
+
import { TitrationLab } from "./titration/preset.mjs";
|
|
12
|
+
import { ElectrochemLab } from "./electrochem/preset.mjs";
|
|
13
|
+
import { KineticsLab } from "./kinetics/preset.mjs";
|
|
14
|
+
import { StoichiometryLab } from "./stoichiometry/preset.mjs";
|
|
15
|
+
import { PeriodicTrendsLab } from "./periodic-trends/preset.mjs";
|
|
16
|
+
|
|
17
|
+
export { Battery, BohrAtom, DiffusionLab, DilutionLab, ElectrochemLab, GasBoxLab, KineticsLab, LeChatelierLab, PeriodicTrendsLab, ReactionLab, ReactionProfile, SolutionBoxLab, SolutionField, StoichiometryLab, TitrationLab };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { KineticsLab, KineticsProps } from "./preset.mjs";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { RateOrder } from "@classytic/stage/chem";
|
|
3
|
+
|
|
4
|
+
//#region src/chem/kinetics/preset.d.ts
|
|
5
|
+
interface KineticsProps {
|
|
6
|
+
/** Activation energy, kJ/mol (default 50). */
|
|
7
|
+
EaKJ?: number;
|
|
8
|
+
/** Rate constant at 300 K that sets the conversion pace (default 0.6). */
|
|
9
|
+
kRef?: number;
|
|
10
|
+
/** Reaction order for the half-life readout (default 1). */
|
|
11
|
+
order?: RateOrder;
|
|
12
|
+
/** Number of molecules in the vessel (default 30). */
|
|
13
|
+
molecules?: number;
|
|
14
|
+
/** Initial temperature, K (default 300). */
|
|
15
|
+
T0?: number;
|
|
16
|
+
title?: string;
|
|
17
|
+
prompt?: string;
|
|
18
|
+
objectives?: string[];
|
|
19
|
+
}
|
|
20
|
+
declare function KineticsLab({
|
|
21
|
+
EaKJ,
|
|
22
|
+
kRef,
|
|
23
|
+
order,
|
|
24
|
+
molecules,
|
|
25
|
+
T0,
|
|
26
|
+
title,
|
|
27
|
+
prompt,
|
|
28
|
+
objectives
|
|
29
|
+
}?: KineticsProps): ReactNode;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { KineticsLab, KineticsProps };
|