@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,486 @@
|
|
|
1
|
+
import { GasBoxLab } from "../chem/gas-box/preset.mjs";
|
|
2
|
+
import { SolutionBoxLab } from "../chem/solution/solution-box.mjs";
|
|
3
|
+
import { DilutionLab } from "../chem/solution/dilution.mjs";
|
|
4
|
+
import { BohrAtom } from "../chem/bohr-atom.mjs";
|
|
5
|
+
import { ReactionProfile } from "../chem/reaction-profile.mjs";
|
|
6
|
+
import { ReactionLab } from "../chem/reaction-lab.mjs";
|
|
7
|
+
import { Battery } from "../chem/battery.mjs";
|
|
8
|
+
import { LeChatelierLab } from "../chem/equilibrium/preset.mjs";
|
|
9
|
+
import { TitrationLab } from "../chem/titration/preset.mjs";
|
|
10
|
+
import { ElectrochemLab } from "../chem/electrochem/preset.mjs";
|
|
11
|
+
import { KineticsLab } from "../chem/kinetics/preset.mjs";
|
|
12
|
+
import { StoichiometryLab } from "../chem/stoichiometry/preset.mjs";
|
|
13
|
+
import { PeriodicTrendsLab } from "../chem/periodic-trends/preset.mjs";
|
|
14
|
+
import { ConfigPanel, ConfigRow, NumField, TextField } from "./authoring.mjs";
|
|
15
|
+
import { commonLabProps, labBlock } from "./lab-block.mjs";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { z } from "zod";
|
|
18
|
+
import { defineBlock } from "@classytic/cms-ui/contract";
|
|
19
|
+
|
|
20
|
+
//#region src/blocks/chem.tsx
|
|
21
|
+
/**
|
|
22
|
+
* @classytic/labs/blocks — chemistry lab block specs.
|
|
23
|
+
*
|
|
24
|
+
* `defineBlock` editor adapters for the chemistry labs (one domain per file; the
|
|
25
|
+
* registry is assembled in `./index.ts`). Each spec pairs a real zod schema with
|
|
26
|
+
* a render `Component` that, in `mode === 'editing'`, shows the row-based
|
|
27
|
+
* authoring kit (`./authoring`). `@classytic/cms-ui` + `zod` are optional peers
|
|
28
|
+
* touched only by the blocks layer.
|
|
29
|
+
*/
|
|
30
|
+
const LeChatelierBlock = labBlock({
|
|
31
|
+
key: "le-chatelier",
|
|
32
|
+
label: "Le Chatelier — equilibrium shifts",
|
|
33
|
+
description: "A reversible reaction A ⇌ νB at equilibrium (Q = K). Stress it — add a species, compress, heat — and it shifts to oppose the change (shift direction emerges from the core, never hardcoded). AUTHOR YOUR OWN reaction: set the species names, product coefficient, colours, K, and whether the forward reaction is endothermic. Defaults to N₂O₄ ⇌ 2 NO₂ (colourless ⇌ brown).",
|
|
34
|
+
schema: z.object({
|
|
35
|
+
reactantName: z.string().optional().describe("left species, e.g. N₂O₄"),
|
|
36
|
+
productName: z.string().optional().describe("right species, e.g. NO₂"),
|
|
37
|
+
productCoeff: z.number().optional().describe("ν in A ⇌ νB (default 2)"),
|
|
38
|
+
productColor: z.string().optional().describe("CSS colour the flask tints toward as product forms"),
|
|
39
|
+
reactantColor: z.string().optional(),
|
|
40
|
+
K: z.number().optional().describe("equilibrium constant at room temperature"),
|
|
41
|
+
endothermic: z.boolean().optional().describe("forward reaction endothermic → heating makes more product (default true)"),
|
|
42
|
+
...commonLabProps
|
|
43
|
+
}),
|
|
44
|
+
Component: (a) => /* @__PURE__ */ jsx(LeChatelierLab, { ...a })
|
|
45
|
+
});
|
|
46
|
+
const ElectrochemBlock = labBlock({
|
|
47
|
+
key: "electrochem",
|
|
48
|
+
label: "Galvanic cell (Nernst EMF)",
|
|
49
|
+
description: "A voltaic cell with two metal half-cells, a salt bridge, and a live voltmeter. The lower-E° metal is the anode (−); electrons flow to the cathode (+). The meter reads the Nernst EMF E = E°cell − (RT/nF)·ln Q, so changing an ion concentration moves the voltage — or pick the same metal both sides for a concentration cell. Author the two electrodes + concentrations.",
|
|
50
|
+
schema: z.object({
|
|
51
|
+
metalA: z.enum([
|
|
52
|
+
"Mg",
|
|
53
|
+
"Al",
|
|
54
|
+
"Zn",
|
|
55
|
+
"Fe",
|
|
56
|
+
"Ni",
|
|
57
|
+
"Pb",
|
|
58
|
+
"Cu",
|
|
59
|
+
"Ag"
|
|
60
|
+
]).optional(),
|
|
61
|
+
metalB: z.enum([
|
|
62
|
+
"Mg",
|
|
63
|
+
"Al",
|
|
64
|
+
"Zn",
|
|
65
|
+
"Fe",
|
|
66
|
+
"Ni",
|
|
67
|
+
"Pb",
|
|
68
|
+
"Cu",
|
|
69
|
+
"Ag"
|
|
70
|
+
]).optional(),
|
|
71
|
+
concA: z.number().optional().describe("electrode 1 ion concentration, mol/L"),
|
|
72
|
+
concB: z.number().optional().describe("electrode 2 ion concentration, mol/L"),
|
|
73
|
+
...commonLabProps
|
|
74
|
+
}),
|
|
75
|
+
Component: (a) => /* @__PURE__ */ jsx(ElectrochemLab, { ...a })
|
|
76
|
+
});
|
|
77
|
+
const PeriodicTrendsBlock = labBlock({
|
|
78
|
+
key: "periodic-trends",
|
|
79
|
+
label: "Periodic trends (heatmap)",
|
|
80
|
+
description: "The periodic table (H–Xe) coloured by a property — atomic radius, ionisation energy or electronegativity — so the trend reads as a gradient: radius grows down/left, ionisation energy & electronegativity grow up/right. Hover an element for its value. Pick the default property and a highlighted element; ships a predict-first question.",
|
|
81
|
+
schema: z.object({
|
|
82
|
+
property: z.enum([
|
|
83
|
+
"radius",
|
|
84
|
+
"ie",
|
|
85
|
+
"en"
|
|
86
|
+
]).optional().describe("which property to colour by"),
|
|
87
|
+
highlight: z.string().optional().describe("element symbol to highlight, e.g. Cl"),
|
|
88
|
+
...commonLabProps
|
|
89
|
+
}),
|
|
90
|
+
Component: (a) => /* @__PURE__ */ jsx(PeriodicTrendsLab, { ...a })
|
|
91
|
+
});
|
|
92
|
+
const StoichiometryBlock = labBlock({
|
|
93
|
+
key: "stoichiometry",
|
|
94
|
+
label: "Stoichiometry (limiting reagent)",
|
|
95
|
+
description: "A balanced reaction as a recipe: reactants are trays of molecule tokens, the consumed part solid and the leftover faded, so the limiting reagent is the tray that empties (highlighted) and excess shows as faded tokens. The product tray fills with what forms. Backed by solveStoichiometry (extent, limiting reagent, moles/grams, leftovers). Pick a reaction (water/ammonia/methane/rust) or author your own; drag the amounts.",
|
|
96
|
+
schema: z.object({
|
|
97
|
+
reaction: z.enum([
|
|
98
|
+
"water",
|
|
99
|
+
"ammonia",
|
|
100
|
+
"methane",
|
|
101
|
+
"rust"
|
|
102
|
+
]).optional(),
|
|
103
|
+
amounts: z.array(z.number()).optional().describe("reactant amounts in mol (aligned with the reaction)"),
|
|
104
|
+
...commonLabProps
|
|
105
|
+
}),
|
|
106
|
+
Component: (a) => /* @__PURE__ */ jsx(StoichiometryLab, { ...a })
|
|
107
|
+
});
|
|
108
|
+
const KineticsBlock = labBlock({
|
|
109
|
+
key: "kinetics",
|
|
110
|
+
label: "Reaction kinetics (collisions + Arrhenius)",
|
|
111
|
+
description: "A vessel of molecules where only high-energy collisions (≥ Eₐ) succeed and convert A→B, beside the Maxwell–Boltzmann energy spread (shaded reactive tail) and a live A/B bar. Heat it or add a catalyst (lowers Eₐ) and watch the rate jump — backed by k = A·e^(−Eₐ/RT). Author the activation energy, rate, order, molecule count and temperature; ships a predict-first question.",
|
|
112
|
+
schema: z.object({
|
|
113
|
+
EaKJ: z.number().optional().describe("activation energy, kJ/mol"),
|
|
114
|
+
kRef: z.number().optional().describe("rate constant at 300 K (sets the pace)"),
|
|
115
|
+
order: z.union([
|
|
116
|
+
z.literal(0),
|
|
117
|
+
z.literal(1),
|
|
118
|
+
z.literal(2)
|
|
119
|
+
]).optional().describe("reaction order for the half-life readout"),
|
|
120
|
+
molecules: z.number().optional().describe("molecules in the vessel (6–60)"),
|
|
121
|
+
T0: z.number().optional().describe("initial temperature, K"),
|
|
122
|
+
...commonLabProps
|
|
123
|
+
}),
|
|
124
|
+
Component: (a) => /* @__PURE__ */ jsx(KineticsLab, { ...a })
|
|
125
|
+
});
|
|
126
|
+
const TitrationBlock = labBlock({
|
|
127
|
+
key: "titration",
|
|
128
|
+
label: "Acid–base titration (pH curve)",
|
|
129
|
+
description: "Drip strong base into an acid and build the pH curve: buffer region (weak acid, midpoint pH = pKa), the steep jump at the equivalence point (pH 7 strong, >7 weak), and the phenolphthalein flip to pink. Built on the acid–base kernel. AUTHOR the scenario: acid type, concentrations, volume and the weak-acid pKa.",
|
|
130
|
+
schema: z.object({
|
|
131
|
+
analyte: z.enum(["strong-acid", "weak-acid"]).optional(),
|
|
132
|
+
concAcid: z.number().optional().describe("acid concentration in the flask, mol/L"),
|
|
133
|
+
volAcidMl: z.number().optional().describe("acid volume in the flask, mL"),
|
|
134
|
+
concBase: z.number().optional().describe("strong-base titrant concentration, mol/L"),
|
|
135
|
+
pKa: z.number().optional().describe("weak-acid pKa (e.g. 4.76 acetic, 3.75 formic)"),
|
|
136
|
+
...commonLabProps
|
|
137
|
+
}),
|
|
138
|
+
Component: (a) => /* @__PURE__ */ jsx(TitrationLab, { ...a })
|
|
139
|
+
});
|
|
140
|
+
const GasBoxBlock = defineBlock({
|
|
141
|
+
key: "gas-box",
|
|
142
|
+
tag: "GasBox",
|
|
143
|
+
void: true,
|
|
144
|
+
label: "Gas box (PV = nRT, kinetic theory)",
|
|
145
|
+
description: "Hundreds of molecules bounce in a box; drag the piston (V), heat it (T), add molecules (n) — pressure is MEASURED from wall collisions, so PV=nRT emerges. Lock T/V/P for Boyle/Gay-Lussac/Charles.",
|
|
146
|
+
category: "interactive",
|
|
147
|
+
schema: z.object({
|
|
148
|
+
holdConstant: z.enum([
|
|
149
|
+
"none",
|
|
150
|
+
"temperature",
|
|
151
|
+
"volume",
|
|
152
|
+
"pressure"
|
|
153
|
+
]).default("none"),
|
|
154
|
+
particleCount: z.number().default(180),
|
|
155
|
+
temperature: z.number().default(300),
|
|
156
|
+
volume: z.number().default(7),
|
|
157
|
+
showGauge: z.boolean().default(true),
|
|
158
|
+
title: z.string().optional(),
|
|
159
|
+
prompt: z.string().optional()
|
|
160
|
+
}),
|
|
161
|
+
Component: ({ attributes, mode, updateAttributes }) => {
|
|
162
|
+
const widget = /* @__PURE__ */ jsx(GasBoxLab, {
|
|
163
|
+
holdConstant: attributes.holdConstant,
|
|
164
|
+
particleCount: attributes.particleCount,
|
|
165
|
+
temperature: attributes.temperature,
|
|
166
|
+
volume: attributes.volume,
|
|
167
|
+
showGauge: attributes.showGauge,
|
|
168
|
+
title: attributes.title,
|
|
169
|
+
prompt: attributes.prompt
|
|
170
|
+
});
|
|
171
|
+
if (mode !== "editing" || !updateAttributes) return widget;
|
|
172
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
173
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
174
|
+
label: "title",
|
|
175
|
+
children: /* @__PURE__ */ jsx(TextField, {
|
|
176
|
+
value: attributes.title ?? "",
|
|
177
|
+
onChange: (v) => updateAttributes({ title: v }),
|
|
178
|
+
placeholder: "Gas in a box"
|
|
179
|
+
})
|
|
180
|
+
}),
|
|
181
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
182
|
+
label: "molecules n",
|
|
183
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
184
|
+
value: attributes.particleCount ?? 180,
|
|
185
|
+
onChange: (v) => updateAttributes({ particleCount: v })
|
|
186
|
+
})
|
|
187
|
+
}),
|
|
188
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
189
|
+
label: "temperature K",
|
|
190
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
191
|
+
value: attributes.temperature ?? 300,
|
|
192
|
+
onChange: (v) => updateAttributes({ temperature: v })
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
] }), widget] });
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
const SolutionBoxBlock = defineBlock({
|
|
199
|
+
key: "solution-box",
|
|
200
|
+
tag: "SolutionBox",
|
|
201
|
+
void: true,
|
|
202
|
+
label: "Solution box (molarity = n/V)",
|
|
203
|
+
description: "Solute as dots in a box: add solute (more dots) or water (same dots, bigger box) — M=n/V shows as a number AND colour intensity. Draggable probe proves molarity is a local density.",
|
|
204
|
+
category: "interactive",
|
|
205
|
+
schema: z.object({
|
|
206
|
+
moles: z.number().default(.5),
|
|
207
|
+
volume: z.number().default(.5),
|
|
208
|
+
showProbe: z.boolean().default(true),
|
|
209
|
+
title: z.string().optional(),
|
|
210
|
+
prompt: z.string().optional()
|
|
211
|
+
}),
|
|
212
|
+
Component: ({ attributes, mode, updateAttributes }) => {
|
|
213
|
+
const widget = /* @__PURE__ */ jsx(SolutionBoxLab, {
|
|
214
|
+
moles: attributes.moles,
|
|
215
|
+
volume: attributes.volume,
|
|
216
|
+
showProbe: attributes.showProbe,
|
|
217
|
+
title: attributes.title,
|
|
218
|
+
prompt: attributes.prompt
|
|
219
|
+
});
|
|
220
|
+
if (mode !== "editing" || !updateAttributes) return widget;
|
|
221
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
222
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
223
|
+
label: "title",
|
|
224
|
+
children: /* @__PURE__ */ jsx(TextField, {
|
|
225
|
+
value: attributes.title ?? "",
|
|
226
|
+
onChange: (v) => updateAttributes({ title: v }),
|
|
227
|
+
placeholder: "Molarity is a crowd"
|
|
228
|
+
})
|
|
229
|
+
}),
|
|
230
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
231
|
+
label: "solute (mol)",
|
|
232
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
233
|
+
value: attributes.moles ?? .5,
|
|
234
|
+
onChange: (v) => updateAttributes({ moles: v })
|
|
235
|
+
})
|
|
236
|
+
}),
|
|
237
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
238
|
+
label: "volume (L)",
|
|
239
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
240
|
+
value: attributes.volume ?? .5,
|
|
241
|
+
onChange: (v) => updateAttributes({ volume: v })
|
|
242
|
+
})
|
|
243
|
+
})
|
|
244
|
+
] }), widget] });
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
const DilutionBlock = defineBlock({
|
|
248
|
+
key: "dilution",
|
|
249
|
+
tag: "Dilution",
|
|
250
|
+
void: true,
|
|
251
|
+
label: "Dilution (C₁V₁ = C₂V₂)",
|
|
252
|
+
description: "Two beakers show the SAME solute dots — concentrated in the aliquot, spread in the final volume — so C₁V₁=C₂V₂ is seen as conservation of moles: same dots, bigger box, lower concentration.",
|
|
253
|
+
category: "interactive",
|
|
254
|
+
schema: z.object({
|
|
255
|
+
stockConcentration: z.number().default(2),
|
|
256
|
+
aliquotVolume: z.number().default(.25),
|
|
257
|
+
finalVolume: z.number().default(1),
|
|
258
|
+
title: z.string().optional(),
|
|
259
|
+
prompt: z.string().optional()
|
|
260
|
+
}),
|
|
261
|
+
Component: ({ attributes, mode, updateAttributes }) => {
|
|
262
|
+
const widget = /* @__PURE__ */ jsx(DilutionLab, {
|
|
263
|
+
stockConcentration: attributes.stockConcentration,
|
|
264
|
+
aliquotVolume: attributes.aliquotVolume,
|
|
265
|
+
finalVolume: attributes.finalVolume,
|
|
266
|
+
title: attributes.title,
|
|
267
|
+
prompt: attributes.prompt
|
|
268
|
+
});
|
|
269
|
+
if (mode !== "editing" || !updateAttributes) return widget;
|
|
270
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
271
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
272
|
+
label: "title",
|
|
273
|
+
children: /* @__PURE__ */ jsx(TextField, {
|
|
274
|
+
value: attributes.title ?? "",
|
|
275
|
+
onChange: (v) => updateAttributes({ title: v }),
|
|
276
|
+
placeholder: "Dilution"
|
|
277
|
+
})
|
|
278
|
+
}),
|
|
279
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
280
|
+
label: "stock C₁",
|
|
281
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
282
|
+
value: attributes.stockConcentration ?? 2,
|
|
283
|
+
onChange: (v) => updateAttributes({ stockConcentration: v })
|
|
284
|
+
})
|
|
285
|
+
}),
|
|
286
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
287
|
+
label: "aliquot V₁",
|
|
288
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
289
|
+
value: attributes.aliquotVolume ?? .25,
|
|
290
|
+
onChange: (v) => updateAttributes({ aliquotVolume: v })
|
|
291
|
+
})
|
|
292
|
+
})
|
|
293
|
+
] }), widget] });
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
const BohrAtomBlock = defineBlock({
|
|
297
|
+
key: "bohr-atom",
|
|
298
|
+
void: true,
|
|
299
|
+
label: "Bohr atom",
|
|
300
|
+
description: "Animated shell model — drag Z to walk the first 20 elements; shells fill 2, 8, 8.",
|
|
301
|
+
category: "interactive",
|
|
302
|
+
schema: z.object({
|
|
303
|
+
protons: z.number().optional(),
|
|
304
|
+
title: z.string().optional()
|
|
305
|
+
}),
|
|
306
|
+
Component: ({ attributes, mode, updateAttributes }) => {
|
|
307
|
+
const protons = typeof attributes.protons === "number" ? attributes.protons : 6;
|
|
308
|
+
const title = attributes.title ?? "Bohr model of the atom";
|
|
309
|
+
const widget = /* @__PURE__ */ jsx(BohrAtom, {
|
|
310
|
+
protons,
|
|
311
|
+
title
|
|
312
|
+
});
|
|
313
|
+
if (mode !== "editing" || !updateAttributes) return widget;
|
|
314
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [/* @__PURE__ */ jsx(ConfigRow, {
|
|
315
|
+
label: "Title",
|
|
316
|
+
children: /* @__PURE__ */ jsx(TextField, {
|
|
317
|
+
value: title,
|
|
318
|
+
onChange: (v) => updateAttributes({ title: v }),
|
|
319
|
+
className: "flex-1"
|
|
320
|
+
})
|
|
321
|
+
}), /* @__PURE__ */ jsx(ConfigRow, {
|
|
322
|
+
label: "protons Z",
|
|
323
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
324
|
+
value: protons,
|
|
325
|
+
onChange: (v) => updateAttributes({ protons: v })
|
|
326
|
+
})
|
|
327
|
+
})] }), widget] });
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
const ReactionProfileBlock = defineBlock({
|
|
331
|
+
key: "reaction-profile",
|
|
332
|
+
void: true,
|
|
333
|
+
label: "Reaction profile",
|
|
334
|
+
description: "Energy diagram — activation energy, ΔH (exo/endothermic), catalyst toggle.",
|
|
335
|
+
category: "interactive",
|
|
336
|
+
schema: z.object({
|
|
337
|
+
deltaH: z.number().optional(),
|
|
338
|
+
activationEnergy: z.number().optional(),
|
|
339
|
+
catalyst: z.boolean().optional(),
|
|
340
|
+
title: z.string().optional()
|
|
341
|
+
}),
|
|
342
|
+
Component: ({ attributes, mode, updateAttributes }) => {
|
|
343
|
+
const deltaH = typeof attributes.deltaH === "number" ? attributes.deltaH : -40;
|
|
344
|
+
const activationEnergy = typeof attributes.activationEnergy === "number" ? attributes.activationEnergy : 60;
|
|
345
|
+
const catalyst = attributes.catalyst === true;
|
|
346
|
+
const title = attributes.title ?? "Reaction energy profile";
|
|
347
|
+
const widget = /* @__PURE__ */ jsx(ReactionProfile, {
|
|
348
|
+
deltaH,
|
|
349
|
+
activationEnergy,
|
|
350
|
+
catalyst,
|
|
351
|
+
title
|
|
352
|
+
});
|
|
353
|
+
if (mode !== "editing" || !updateAttributes) return widget;
|
|
354
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
355
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
356
|
+
label: "Title",
|
|
357
|
+
children: /* @__PURE__ */ jsx(TextField, {
|
|
358
|
+
value: title,
|
|
359
|
+
onChange: (v) => updateAttributes({ title: v }),
|
|
360
|
+
className: "flex-1"
|
|
361
|
+
})
|
|
362
|
+
}),
|
|
363
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
364
|
+
label: "ΔH",
|
|
365
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
366
|
+
value: deltaH,
|
|
367
|
+
onChange: (v) => updateAttributes({ deltaH: v })
|
|
368
|
+
})
|
|
369
|
+
}),
|
|
370
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
371
|
+
label: "Eₐ",
|
|
372
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
373
|
+
value: activationEnergy,
|
|
374
|
+
onChange: (v) => updateAttributes({ activationEnergy: v })
|
|
375
|
+
})
|
|
376
|
+
})
|
|
377
|
+
] }), widget] });
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
const ReactionLabBlock = defineBlock({
|
|
381
|
+
key: "reaction-lab",
|
|
382
|
+
void: true,
|
|
383
|
+
label: "Reaction lab",
|
|
384
|
+
description: "Atoms collide and bond — A + B → A–B, with a temperature/kinetics knob.",
|
|
385
|
+
category: "interactive",
|
|
386
|
+
schema: z.object({
|
|
387
|
+
a: z.string().optional(),
|
|
388
|
+
b: z.string().optional(),
|
|
389
|
+
title: z.string().optional()
|
|
390
|
+
}),
|
|
391
|
+
Component: ({ attributes, mode, updateAttributes }) => {
|
|
392
|
+
const a = typeof attributes.a === "string" && attributes.a ? attributes.a : "A";
|
|
393
|
+
const b = typeof attributes.b === "string" && attributes.b ? attributes.b : "B";
|
|
394
|
+
const widget = /* @__PURE__ */ jsx(ReactionLab, {
|
|
395
|
+
a,
|
|
396
|
+
b,
|
|
397
|
+
title: attributes.title ?? `${a} + ${b} → ${a}–${b}`
|
|
398
|
+
});
|
|
399
|
+
if (mode !== "editing" || !updateAttributes) return widget;
|
|
400
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(ConfigPanel, { children: /* @__PURE__ */ jsxs(ConfigRow, {
|
|
401
|
+
label: "atoms",
|
|
402
|
+
children: [
|
|
403
|
+
/* @__PURE__ */ jsx(TextField, {
|
|
404
|
+
value: a,
|
|
405
|
+
onChange: (v) => updateAttributes({ a: v }),
|
|
406
|
+
className: "w-16"
|
|
407
|
+
}),
|
|
408
|
+
/* @__PURE__ */ jsx("span", {
|
|
409
|
+
className: "text-muted-foreground",
|
|
410
|
+
children: "+"
|
|
411
|
+
}),
|
|
412
|
+
/* @__PURE__ */ jsx(TextField, {
|
|
413
|
+
value: b,
|
|
414
|
+
onChange: (v) => updateAttributes({ b: v }),
|
|
415
|
+
className: "w-16"
|
|
416
|
+
})
|
|
417
|
+
]
|
|
418
|
+
}) }), widget] });
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
const BatteryBlock = defineBlock({
|
|
422
|
+
key: "battery",
|
|
423
|
+
void: true,
|
|
424
|
+
label: "Battery (galvanic cell)",
|
|
425
|
+
description: "Electrons flow from anode to cathode — half-reactions + EMF.",
|
|
426
|
+
category: "interactive",
|
|
427
|
+
schema: z.object({
|
|
428
|
+
emf: z.number().optional(),
|
|
429
|
+
title: z.string().optional()
|
|
430
|
+
}),
|
|
431
|
+
Component: ({ attributes, mode, updateAttributes }) => {
|
|
432
|
+
const title = attributes.title ?? "Galvanic cell: electrons on the move";
|
|
433
|
+
const widget = /* @__PURE__ */ jsx(Battery, {
|
|
434
|
+
emf: typeof attributes.emf === "number" ? attributes.emf : 1.1,
|
|
435
|
+
title
|
|
436
|
+
});
|
|
437
|
+
if (mode !== "editing" || !updateAttributes) return widget;
|
|
438
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [/* @__PURE__ */ jsx(ConfigRow, {
|
|
439
|
+
label: "Title",
|
|
440
|
+
children: /* @__PURE__ */ jsx(TextField, {
|
|
441
|
+
value: title,
|
|
442
|
+
onChange: (v) => updateAttributes({ title: v }),
|
|
443
|
+
className: "flex-1"
|
|
444
|
+
})
|
|
445
|
+
}), /* @__PURE__ */ jsx(ConfigRow, {
|
|
446
|
+
label: "EMF (V)",
|
|
447
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
448
|
+
value: typeof attributes.emf === "number" ? attributes.emf : 1.1,
|
|
449
|
+
onChange: (v) => updateAttributes({ emf: v })
|
|
450
|
+
})
|
|
451
|
+
})] }), widget] });
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
const chemBlocks = [
|
|
455
|
+
GasBoxBlock,
|
|
456
|
+
SolutionBoxBlock,
|
|
457
|
+
DilutionBlock,
|
|
458
|
+
BohrAtomBlock,
|
|
459
|
+
ReactionProfileBlock,
|
|
460
|
+
ReactionLabBlock,
|
|
461
|
+
BatteryBlock,
|
|
462
|
+
LeChatelierBlock,
|
|
463
|
+
TitrationBlock,
|
|
464
|
+
ElectrochemBlock,
|
|
465
|
+
KineticsBlock,
|
|
466
|
+
StoichiometryBlock,
|
|
467
|
+
PeriodicTrendsBlock
|
|
468
|
+
];
|
|
469
|
+
const chemComponents = {
|
|
470
|
+
GasBox: GasBoxLab,
|
|
471
|
+
SolutionBox: SolutionBoxLab,
|
|
472
|
+
Dilution: DilutionLab,
|
|
473
|
+
BohrAtom,
|
|
474
|
+
ReactionProfile,
|
|
475
|
+
ReactionLab,
|
|
476
|
+
Battery,
|
|
477
|
+
LeChatelier: LeChatelierLab,
|
|
478
|
+
Titration: TitrationLab,
|
|
479
|
+
Electrochem: ElectrochemLab,
|
|
480
|
+
Kinetics: KineticsLab,
|
|
481
|
+
Stoichiometry: StoichiometryLab,
|
|
482
|
+
PeriodicTrends: PeriodicTrendsLab
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
//#endregion
|
|
486
|
+
export { BatteryBlock, BohrAtomBlock, DilutionBlock, ElectrochemBlock, GasBoxBlock, KineticsBlock, LeChatelierBlock, PeriodicTrendsBlock, ReactionLabBlock, ReactionProfileBlock, SolutionBoxBlock, StoichiometryBlock, TitrationBlock, chemBlocks, chemComponents };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { CircuitLab } from "../circuits/circuit-lab.mjs";
|
|
2
|
+
import { CircuitBuilder } from "../circuits/circuit-builder.mjs";
|
|
3
|
+
import { CapacitorLeakLab } from "../circuits/capacitor-leak/preset.mjs";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
//#region src/blocks/circuits.d.ts
|
|
8
|
+
declare const CircuitLabBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
|
|
9
|
+
voltage: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
r1: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
r2: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
series: "series";
|
|
14
|
+
parallel: "parallel";
|
|
15
|
+
}>>;
|
|
16
|
+
title: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
declare const CircuitBuilderBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
|
|
19
|
+
battery: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
components: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
21
|
+
title: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
/** Simple single-loop circuit authoring → the labs component's branches[][] API. */
|
|
24
|
+
declare function CircuitPuzzle({
|
|
25
|
+
emf,
|
|
26
|
+
bulbOhms,
|
|
27
|
+
withSwitch,
|
|
28
|
+
controlId
|
|
29
|
+
}: {
|
|
30
|
+
emf?: number;
|
|
31
|
+
bulbOhms?: number;
|
|
32
|
+
withSwitch?: boolean;
|
|
33
|
+
controlId?: string;
|
|
34
|
+
}): ReactNode;
|
|
35
|
+
declare const CircuitBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
|
|
36
|
+
emf: z.ZodDefault<z.ZodNumber>;
|
|
37
|
+
bulbOhms: z.ZodDefault<z.ZodNumber>;
|
|
38
|
+
withSwitch: z.ZodDefault<z.ZodBoolean>;
|
|
39
|
+
controlId: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
declare const CapacitorLeakBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
|
|
42
|
+
emf: z.ZodDefault<z.ZodNumber>;
|
|
43
|
+
rK: z.ZodDefault<z.ZodNumber>;
|
|
44
|
+
capU: z.ZodDefault<z.ZodNumber>;
|
|
45
|
+
leakK: z.ZodDefault<z.ZodNumber>;
|
|
46
|
+
startCharged: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
title: z.ZodOptional<z.ZodString>;
|
|
48
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
/** All circuits lab blocks — spread into the registry in `./index.ts`. */
|
|
51
|
+
declare const circuitsBlocks: readonly [import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
|
|
52
|
+
voltage: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
r1: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
r2: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
56
|
+
series: "series";
|
|
57
|
+
parallel: "parallel";
|
|
58
|
+
}>>;
|
|
59
|
+
title: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
|
|
61
|
+
battery: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
components: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
63
|
+
title: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, z.core.$strip>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
|
|
65
|
+
emf: z.ZodDefault<z.ZodNumber>;
|
|
66
|
+
bulbOhms: z.ZodDefault<z.ZodNumber>;
|
|
67
|
+
withSwitch: z.ZodDefault<z.ZodBoolean>;
|
|
68
|
+
controlId: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strip>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
|
|
70
|
+
emf: z.ZodDefault<z.ZodNumber>;
|
|
71
|
+
rK: z.ZodDefault<z.ZodNumber>;
|
|
72
|
+
capU: z.ZodDefault<z.ZodNumber>;
|
|
73
|
+
leakK: z.ZodDefault<z.ZodNumber>;
|
|
74
|
+
startCharged: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
title: z.ZodOptional<z.ZodString>;
|
|
76
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>>];
|
|
78
|
+
/** MDX tag → component render map slice for the circuits domain. */
|
|
79
|
+
declare const circuitsComponents: {
|
|
80
|
+
readonly CapacitorLeak: typeof CapacitorLeakLab;
|
|
81
|
+
readonly Circuit: typeof CircuitPuzzle;
|
|
82
|
+
readonly CircuitBuilder: typeof CircuitBuilder;
|
|
83
|
+
readonly CircuitLab: typeof CircuitLab;
|
|
84
|
+
};
|
|
85
|
+
//#endregion
|
|
86
|
+
export { CapacitorLeakBlock, CircuitBlock, CircuitBuilderBlock, CircuitLabBlock, CircuitPuzzle, circuitsBlocks, circuitsComponents };
|