@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,348 @@
|
|
|
1
|
+
import { CircuitNetworkLab } from "../circuits/circuit/preset.mjs";
|
|
2
|
+
import { CircuitLab } from "../circuits/circuit-lab.mjs";
|
|
3
|
+
import { CircuitBuilder } from "../circuits/circuit-builder.mjs";
|
|
4
|
+
import { CapacitorLeakLab } from "../circuits/capacitor-leak/preset.mjs";
|
|
5
|
+
import { ChipToggle, ConfigPanel, ConfigRow, NumField, SmallButton, TextField } from "./authoring.mjs";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { defineBlock } from "@classytic/cms-ui/contract";
|
|
9
|
+
|
|
10
|
+
//#region src/blocks/circuits.tsx
|
|
11
|
+
const CircuitLabBlock = defineBlock({
|
|
12
|
+
key: "circuit-lab",
|
|
13
|
+
void: true,
|
|
14
|
+
label: "Circuit lab",
|
|
15
|
+
description: "Series/parallel resistors — voltage & current divider rules, step by step.",
|
|
16
|
+
category: "interactive",
|
|
17
|
+
schema: z.object({
|
|
18
|
+
voltage: z.number().optional(),
|
|
19
|
+
r1: z.number().optional(),
|
|
20
|
+
r2: z.number().optional(),
|
|
21
|
+
mode: z.enum(["series", "parallel"]).optional(),
|
|
22
|
+
title: z.string().optional()
|
|
23
|
+
}),
|
|
24
|
+
Component: ({ attributes, mode, updateAttributes }) => {
|
|
25
|
+
const widget = /* @__PURE__ */ jsx(CircuitLab, {
|
|
26
|
+
voltage: typeof attributes.voltage === "number" ? attributes.voltage : 12,
|
|
27
|
+
r1: typeof attributes.r1 === "number" ? attributes.r1 : 100,
|
|
28
|
+
r2: typeof attributes.r2 === "number" ? attributes.r2 : 200,
|
|
29
|
+
mode: attributes.mode === "parallel" ? "parallel" : "series",
|
|
30
|
+
title: attributes.title ?? "Series & parallel: how V and I divide"
|
|
31
|
+
});
|
|
32
|
+
if (mode !== "editing" || !updateAttributes) return widget;
|
|
33
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
34
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
35
|
+
label: "Title",
|
|
36
|
+
children: /* @__PURE__ */ jsx(TextField, {
|
|
37
|
+
value: attributes.title ?? "Series & parallel: how V and I divide",
|
|
38
|
+
onChange: (v) => updateAttributes({ title: v }),
|
|
39
|
+
className: "flex-1"
|
|
40
|
+
})
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
43
|
+
label: "V",
|
|
44
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
45
|
+
value: typeof attributes.voltage === "number" ? attributes.voltage : 12,
|
|
46
|
+
onChange: (v) => updateAttributes({ voltage: v })
|
|
47
|
+
})
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
50
|
+
label: "R₁ / R₂",
|
|
51
|
+
children: [/* @__PURE__ */ jsx(NumField, {
|
|
52
|
+
value: typeof attributes.r1 === "number" ? attributes.r1 : 100,
|
|
53
|
+
onChange: (v) => updateAttributes({ r1: v })
|
|
54
|
+
}), /* @__PURE__ */ jsx(NumField, {
|
|
55
|
+
value: typeof attributes.r2 === "number" ? attributes.r2 : 200,
|
|
56
|
+
onChange: (v) => updateAttributes({ r2: v })
|
|
57
|
+
})]
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
60
|
+
label: "mode",
|
|
61
|
+
children: [/* @__PURE__ */ jsx(ChipToggle, {
|
|
62
|
+
active: attributes.mode !== "parallel",
|
|
63
|
+
onClick: () => updateAttributes({ mode: "series" }),
|
|
64
|
+
children: "series"
|
|
65
|
+
}), /* @__PURE__ */ jsx(ChipToggle, {
|
|
66
|
+
active: attributes.mode === "parallel",
|
|
67
|
+
onClick: () => updateAttributes({ mode: "parallel" }),
|
|
68
|
+
children: "parallel"
|
|
69
|
+
})]
|
|
70
|
+
})
|
|
71
|
+
] }), widget] });
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
const asComponents = (raw) => {
|
|
75
|
+
if (!Array.isArray(raw) || !raw.length) return [{
|
|
76
|
+
type: "switch",
|
|
77
|
+
closed: false,
|
|
78
|
+
label: "switch"
|
|
79
|
+
}, {
|
|
80
|
+
type: "bulb",
|
|
81
|
+
ohms: 12,
|
|
82
|
+
label: "bulb"
|
|
83
|
+
}];
|
|
84
|
+
return raw;
|
|
85
|
+
};
|
|
86
|
+
const CircuitBuilderBlock = defineBlock({
|
|
87
|
+
key: "circuit-builder",
|
|
88
|
+
void: true,
|
|
89
|
+
label: "Circuit builder (play)",
|
|
90
|
+
description: "Build a loop — battery, bulbs, switches, resistors. Flip switches, watch current & the bulb.",
|
|
91
|
+
category: "interactive",
|
|
92
|
+
schema: z.object({
|
|
93
|
+
battery: z.number().optional(),
|
|
94
|
+
components: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
95
|
+
title: z.string().optional()
|
|
96
|
+
}),
|
|
97
|
+
Component: ({ attributes, mode, updateAttributes }) => {
|
|
98
|
+
const components = asComponents(attributes.components);
|
|
99
|
+
const battery = typeof attributes.battery === "number" ? attributes.battery : 6;
|
|
100
|
+
const title = attributes.title ?? "Build a circuit";
|
|
101
|
+
const widget = /* @__PURE__ */ jsx(CircuitBuilder, {
|
|
102
|
+
battery,
|
|
103
|
+
components,
|
|
104
|
+
title
|
|
105
|
+
});
|
|
106
|
+
if (mode !== "editing" || !updateAttributes) return widget;
|
|
107
|
+
const set = (next) => updateAttributes({ components: next });
|
|
108
|
+
const upd = (i, patch) => set(components.map((c, j) => j === i ? {
|
|
109
|
+
...c,
|
|
110
|
+
...patch
|
|
111
|
+
} : c));
|
|
112
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
113
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
114
|
+
label: "Title",
|
|
115
|
+
children: /* @__PURE__ */ jsx(TextField, {
|
|
116
|
+
value: title,
|
|
117
|
+
onChange: (v) => updateAttributes({ title: v }),
|
|
118
|
+
className: "flex-1"
|
|
119
|
+
})
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
122
|
+
label: "battery V",
|
|
123
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
124
|
+
value: battery,
|
|
125
|
+
onChange: (v) => updateAttributes({ battery: v })
|
|
126
|
+
})
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ jsxs("div", {
|
|
129
|
+
className: "space-y-1",
|
|
130
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
131
|
+
className: "font-medium text-muted-foreground",
|
|
132
|
+
children: "Components (series loop)"
|
|
133
|
+
}), components.map((c, i) => /* @__PURE__ */ jsxs("div", {
|
|
134
|
+
className: "flex flex-wrap items-center gap-1.5 rounded border border-border/50 bg-background/40 px-1.5 py-1",
|
|
135
|
+
children: [
|
|
136
|
+
/* @__PURE__ */ jsx("span", {
|
|
137
|
+
className: "w-16 text-[10px] font-bold uppercase tracking-wide text-muted-foreground",
|
|
138
|
+
children: c.type
|
|
139
|
+
}),
|
|
140
|
+
(c.type === "resistor" || c.type === "bulb") && /* @__PURE__ */ jsxs(Fragment, { children: ["Ω", /* @__PURE__ */ jsx(NumField, {
|
|
141
|
+
value: c.ohms,
|
|
142
|
+
onChange: (v) => upd(i, { ohms: v })
|
|
143
|
+
})] }),
|
|
144
|
+
c.type === "switch" && /* @__PURE__ */ jsx(ChipToggle, {
|
|
145
|
+
active: c.closed !== false,
|
|
146
|
+
onClick: () => upd(i, { closed: c.closed === false }),
|
|
147
|
+
children: c.closed !== false ? "closed" : "open"
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ jsx(TextField, {
|
|
150
|
+
value: c.label ?? "",
|
|
151
|
+
placeholder: "label",
|
|
152
|
+
onChange: (v) => upd(i, { label: v }),
|
|
153
|
+
className: "w-20"
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ jsx(SmallButton, {
|
|
156
|
+
tone: "danger",
|
|
157
|
+
onClick: () => set(components.filter((_, j) => j !== i)),
|
|
158
|
+
children: "✕"
|
|
159
|
+
})
|
|
160
|
+
]
|
|
161
|
+
}, i))]
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ jsxs("div", {
|
|
164
|
+
className: "flex flex-wrap gap-1.5",
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ jsx(SmallButton, {
|
|
167
|
+
onClick: () => set([...components, {
|
|
168
|
+
type: "resistor",
|
|
169
|
+
ohms: 100,
|
|
170
|
+
label: "R"
|
|
171
|
+
}]),
|
|
172
|
+
children: "+ resistor"
|
|
173
|
+
}),
|
|
174
|
+
/* @__PURE__ */ jsx(SmallButton, {
|
|
175
|
+
onClick: () => set([...components, {
|
|
176
|
+
type: "bulb",
|
|
177
|
+
ohms: 12,
|
|
178
|
+
label: "bulb"
|
|
179
|
+
}]),
|
|
180
|
+
children: "+ bulb"
|
|
181
|
+
}),
|
|
182
|
+
/* @__PURE__ */ jsx(SmallButton, {
|
|
183
|
+
onClick: () => set([...components, {
|
|
184
|
+
type: "switch",
|
|
185
|
+
closed: false,
|
|
186
|
+
label: "switch"
|
|
187
|
+
}]),
|
|
188
|
+
children: "+ switch"
|
|
189
|
+
})
|
|
190
|
+
]
|
|
191
|
+
})
|
|
192
|
+
] }), widget] });
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
/** Simple single-loop circuit authoring → the labs component's branches[][] API. */
|
|
196
|
+
function CircuitPuzzle({ emf = 6, bulbOhms = 6, withSwitch = true, controlId }) {
|
|
197
|
+
return /* @__PURE__ */ jsx(CircuitNetworkLab, {
|
|
198
|
+
emf,
|
|
199
|
+
branches: [withSwitch ? [{
|
|
200
|
+
type: "switch",
|
|
201
|
+
closed: false
|
|
202
|
+
}, {
|
|
203
|
+
type: "bulb",
|
|
204
|
+
ohms: bulbOhms
|
|
205
|
+
}] : [{
|
|
206
|
+
type: "bulb",
|
|
207
|
+
ohms: bulbOhms
|
|
208
|
+
}]],
|
|
209
|
+
goal: { kind: "lightBulb" },
|
|
210
|
+
controlId
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
const CircuitBlock = defineBlock({
|
|
214
|
+
key: "circuit",
|
|
215
|
+
tag: "Circuit",
|
|
216
|
+
void: true,
|
|
217
|
+
label: "Circuit (light the bulb)",
|
|
218
|
+
description: "Battery + switch + bulb — close the switch and tune the voltage to light it.",
|
|
219
|
+
category: "interactive",
|
|
220
|
+
schema: z.object({
|
|
221
|
+
emf: z.number().default(6),
|
|
222
|
+
bulbOhms: z.number().default(6),
|
|
223
|
+
withSwitch: z.boolean().default(true),
|
|
224
|
+
controlId: z.string().optional()
|
|
225
|
+
}),
|
|
226
|
+
Component: ({ attributes, mode, updateAttributes }) => {
|
|
227
|
+
const { emf = 6, bulbOhms = 6, withSwitch = true } = attributes;
|
|
228
|
+
const widget = /* @__PURE__ */ jsx(CircuitPuzzle, {
|
|
229
|
+
emf,
|
|
230
|
+
bulbOhms,
|
|
231
|
+
withSwitch,
|
|
232
|
+
controlId: attributes.controlId
|
|
233
|
+
});
|
|
234
|
+
if (mode !== "editing" || !updateAttributes) return widget;
|
|
235
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
236
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
237
|
+
label: "battery (V)",
|
|
238
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
239
|
+
value: emf,
|
|
240
|
+
onChange: (v) => updateAttributes({ emf: v })
|
|
241
|
+
})
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
244
|
+
label: "bulb (Ω)",
|
|
245
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
246
|
+
value: bulbOhms,
|
|
247
|
+
onChange: (v) => updateAttributes({ bulbOhms: v })
|
|
248
|
+
})
|
|
249
|
+
}),
|
|
250
|
+
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
251
|
+
label: "switch",
|
|
252
|
+
children: [/* @__PURE__ */ jsx(ChipToggle, {
|
|
253
|
+
active: withSwitch,
|
|
254
|
+
onClick: () => updateAttributes({ withSwitch: true }),
|
|
255
|
+
children: "yes"
|
|
256
|
+
}), /* @__PURE__ */ jsx(ChipToggle, {
|
|
257
|
+
active: !withSwitch,
|
|
258
|
+
onClick: () => updateAttributes({ withSwitch: false }),
|
|
259
|
+
children: "no"
|
|
260
|
+
})]
|
|
261
|
+
})
|
|
262
|
+
] }), widget] });
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
const CapacitorLeakBlock = defineBlock({
|
|
266
|
+
key: "capacitor-leak",
|
|
267
|
+
tag: "CapacitorLeak",
|
|
268
|
+
void: true,
|
|
269
|
+
label: "Capacitor — charge & leak (RC)",
|
|
270
|
+
description: "A cell charges a capacitor through R; flip to \"leak\" and it self-discharges through its leakage resistance — the plate field thins, drips fall, Vc decays. Live Vc–t trace + τ readout.",
|
|
271
|
+
category: "interactive",
|
|
272
|
+
schema: z.object({
|
|
273
|
+
emf: z.number().default(6),
|
|
274
|
+
rK: z.number().default(10),
|
|
275
|
+
capU: z.number().default(100),
|
|
276
|
+
leakK: z.number().default(200),
|
|
277
|
+
startCharged: z.boolean().optional(),
|
|
278
|
+
title: z.string().optional(),
|
|
279
|
+
prompt: z.string().optional()
|
|
280
|
+
}),
|
|
281
|
+
Component: ({ attributes, mode, updateAttributes }) => {
|
|
282
|
+
const widget = /* @__PURE__ */ jsx(CapacitorLeakLab, {
|
|
283
|
+
emf: attributes.emf,
|
|
284
|
+
rK: attributes.rK,
|
|
285
|
+
capU: attributes.capU,
|
|
286
|
+
leakK: attributes.leakK,
|
|
287
|
+
startCharged: attributes.startCharged,
|
|
288
|
+
title: attributes.title,
|
|
289
|
+
prompt: attributes.prompt
|
|
290
|
+
});
|
|
291
|
+
if (mode !== "editing" || !updateAttributes) return widget;
|
|
292
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
293
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
294
|
+
label: "title",
|
|
295
|
+
children: /* @__PURE__ */ jsx(TextField, {
|
|
296
|
+
value: attributes.title ?? "",
|
|
297
|
+
onChange: (v) => updateAttributes({ title: v }),
|
|
298
|
+
placeholder: "Charging & leaking a capacitor"
|
|
299
|
+
})
|
|
300
|
+
}),
|
|
301
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
302
|
+
label: "EMF (V)",
|
|
303
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
304
|
+
value: attributes.emf ?? 6,
|
|
305
|
+
onChange: (v) => updateAttributes({ emf: v })
|
|
306
|
+
})
|
|
307
|
+
}),
|
|
308
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
309
|
+
label: "R (kΩ)",
|
|
310
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
311
|
+
value: attributes.rK ?? 10,
|
|
312
|
+
onChange: (v) => updateAttributes({ rK: v })
|
|
313
|
+
})
|
|
314
|
+
}),
|
|
315
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
316
|
+
label: "C (µF)",
|
|
317
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
318
|
+
value: attributes.capU ?? 100,
|
|
319
|
+
onChange: (v) => updateAttributes({ capU: v })
|
|
320
|
+
})
|
|
321
|
+
}),
|
|
322
|
+
/* @__PURE__ */ jsx(ConfigRow, {
|
|
323
|
+
label: "leak R (kΩ)",
|
|
324
|
+
children: /* @__PURE__ */ jsx(NumField, {
|
|
325
|
+
value: attributes.leakK ?? 200,
|
|
326
|
+
onChange: (v) => updateAttributes({ leakK: v })
|
|
327
|
+
})
|
|
328
|
+
})
|
|
329
|
+
] }), widget] });
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
/** All circuits lab blocks — spread into the registry in `./index.ts`. */
|
|
333
|
+
const circuitsBlocks = [
|
|
334
|
+
CircuitLabBlock,
|
|
335
|
+
CircuitBuilderBlock,
|
|
336
|
+
CircuitBlock,
|
|
337
|
+
CapacitorLeakBlock
|
|
338
|
+
];
|
|
339
|
+
/** MDX tag → component render map slice for the circuits domain. */
|
|
340
|
+
const circuitsComponents = {
|
|
341
|
+
CapacitorLeak: CapacitorLeakLab,
|
|
342
|
+
Circuit: CircuitPuzzle,
|
|
343
|
+
CircuitBuilder,
|
|
344
|
+
CircuitLab
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
//#endregion
|
|
348
|
+
export { CapacitorLeakBlock, CircuitBlock, CircuitBuilderBlock, CircuitLabBlock, CircuitPuzzle, circuitsBlocks, circuitsComponents };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { TruthTableLab } from "../discrete/truth-table/preset.mjs";
|
|
2
|
+
import { CountingTreeLab } from "../discrete/counting-tree/preset.mjs";
|
|
3
|
+
import { VennSetBoardLab } from "../discrete/venn/preset.mjs";
|
|
4
|
+
import { SampleSpaceBoardLab } from "../discrete/sample-space/preset.mjs";
|
|
5
|
+
import { BooleanCircuitLab } from "../discrete/logic-circuit/preset.mjs";
|
|
6
|
+
import { KarnaughMapLab } from "../discrete/karnaugh/preset.mjs";
|
|
7
|
+
import { MonteCarloLab } from "../discrete/monte-carlo/preset.mjs";
|
|
8
|
+
import { MontyHallLab } from "../discrete/monty-hall/preset.mjs";
|
|
9
|
+
import { OutcomeBuilderLab } from "../discrete/outcome-builder/preset.mjs";
|
|
10
|
+
import { BayesLab } from "../discrete/bayes/preset.mjs";
|
|
11
|
+
import { LawOfLargeNumbersLab } from "../discrete/lln/preset.mjs";
|
|
12
|
+
import { CountingSlotsLab } from "../discrete/counting-slots/preset.mjs";
|
|
13
|
+
import { SelectionLab } from "../discrete/selection/preset.mjs";
|
|
14
|
+
import { ArrangementsLab } from "../discrete/arrangements/preset.mjs";
|
|
15
|
+
import { PascalTriangleLab } from "../discrete/pascal/preset.mjs";
|
|
16
|
+
import { BinomialDistributionLab } from "../discrete/binomial/preset.mjs";
|
|
17
|
+
import { HypergeometricLab } from "../discrete/hypergeometric/preset.mjs";
|
|
18
|
+
import { ExpectedValueLab } from "../discrete/expected-value/preset.mjs";
|
|
19
|
+
import { z } from "zod";
|
|
20
|
+
|
|
21
|
+
//#region src/blocks/discrete.d.ts
|
|
22
|
+
declare const TruthTableBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
23
|
+
declare const CountingTreeBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
24
|
+
declare const VennBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
25
|
+
declare const SampleSpaceBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
26
|
+
declare const BooleanCircuitBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
27
|
+
declare const KarnaughBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
28
|
+
declare const MonteCarloBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
29
|
+
declare const MontyHallBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
30
|
+
declare const OutcomeBuilderBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
31
|
+
declare const BayesBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
32
|
+
declare const CountingSlotsBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
33
|
+
declare const SelectionBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
34
|
+
declare const ArrangementsBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
35
|
+
declare const PascalBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
36
|
+
declare const BinomialBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
37
|
+
declare const HypergeometricBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
38
|
+
declare const ExpectedValueBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
39
|
+
declare const LawOfLargeNumbersBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
40
|
+
declare const discreteBlocks: readonly [import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>];
|
|
41
|
+
declare const discreteComponents: {
|
|
42
|
+
readonly TruthTable: typeof TruthTableLab;
|
|
43
|
+
readonly CountingTree: typeof CountingTreeLab;
|
|
44
|
+
readonly VennSetBoard: typeof VennSetBoardLab;
|
|
45
|
+
readonly SampleSpaceBoard: typeof SampleSpaceBoardLab;
|
|
46
|
+
readonly BooleanCircuit: typeof BooleanCircuitLab;
|
|
47
|
+
readonly KarnaughMap: typeof KarnaughMapLab;
|
|
48
|
+
readonly MonteCarlo: typeof MonteCarloLab;
|
|
49
|
+
readonly MontyHall: typeof MontyHallLab;
|
|
50
|
+
readonly OutcomeBuilder: typeof OutcomeBuilderLab;
|
|
51
|
+
readonly Bayes: typeof BayesLab;
|
|
52
|
+
readonly CountingSlots: typeof CountingSlotsLab;
|
|
53
|
+
readonly Selection: typeof SelectionLab;
|
|
54
|
+
readonly Arrangements: typeof ArrangementsLab;
|
|
55
|
+
readonly PascalTriangle: typeof PascalTriangleLab;
|
|
56
|
+
readonly Binomial: typeof BinomialDistributionLab;
|
|
57
|
+
readonly Hypergeometric: typeof HypergeometricLab;
|
|
58
|
+
readonly ExpectedValue: typeof ExpectedValueLab;
|
|
59
|
+
readonly LawOfLargeNumbers: typeof LawOfLargeNumbersLab;
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
export { ArrangementsBlock, BayesBlock, BinomialBlock, BooleanCircuitBlock, CountingSlotsBlock, CountingTreeBlock, ExpectedValueBlock, HypergeometricBlock, KarnaughBlock, LawOfLargeNumbersBlock, MonteCarloBlock, MontyHallBlock, OutcomeBuilderBlock, PascalBlock, SampleSpaceBlock, SelectionBlock, TruthTableBlock, VennBlock, discreteBlocks, discreteComponents };
|