@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,145 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/schemas/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* @classytic/labs/schemas — the validation contract for every authorable lab.
|
|
6
|
+
*
|
|
7
|
+
* Real zod schemas for the lab DATA shapes (decks, tiles, items, vectors) that the
|
|
8
|
+
* language + physics blocks reuse to validate authored arrays (no `z.any()`). zod is
|
|
9
|
+
* isolated to this subpath + `/blocks`.
|
|
10
|
+
*
|
|
11
|
+
* Per-lab PROP schemas are NOT here — each lives on its own `defineBlock({ schema })`
|
|
12
|
+
* (the single source of truth), so there's no parallel registry to drift. A consuming
|
|
13
|
+
* app builds LLM tools straight from the block schemas if it wants.
|
|
14
|
+
*
|
|
15
|
+
* Source-of-truth note: the TS interfaces live in the (zod-free) domain presets;
|
|
16
|
+
* the `_check*` lines below assert each schema's output stays assignable to its
|
|
17
|
+
* interface so the two can't silently drift.
|
|
18
|
+
*/
|
|
19
|
+
const posSchema = z.enum([
|
|
20
|
+
"noun",
|
|
21
|
+
"verb",
|
|
22
|
+
"article",
|
|
23
|
+
"adjective",
|
|
24
|
+
"preposition",
|
|
25
|
+
"pronoun",
|
|
26
|
+
"conjunction",
|
|
27
|
+
"adverb",
|
|
28
|
+
"other"
|
|
29
|
+
]);
|
|
30
|
+
const relationSchema = z.enum([
|
|
31
|
+
"in",
|
|
32
|
+
"on",
|
|
33
|
+
"over",
|
|
34
|
+
"above",
|
|
35
|
+
"under",
|
|
36
|
+
"below",
|
|
37
|
+
"beside",
|
|
38
|
+
"between",
|
|
39
|
+
"behind",
|
|
40
|
+
"infront",
|
|
41
|
+
"at"
|
|
42
|
+
]);
|
|
43
|
+
const articleAnswerSchema = z.enum([
|
|
44
|
+
"a",
|
|
45
|
+
"an",
|
|
46
|
+
"the",
|
|
47
|
+
"—"
|
|
48
|
+
]);
|
|
49
|
+
const vec2Schema = z.object({
|
|
50
|
+
x: z.number(),
|
|
51
|
+
y: z.number()
|
|
52
|
+
});
|
|
53
|
+
/** A durable visual-asset reference (emoji / registered SVG id / image URL). */
|
|
54
|
+
const iconRefSchema = z.object({
|
|
55
|
+
kind: z.enum([
|
|
56
|
+
"emoji",
|
|
57
|
+
"svg",
|
|
58
|
+
"image"
|
|
59
|
+
]),
|
|
60
|
+
id: z.string().optional().describe("emoji char, or a registered svg id"),
|
|
61
|
+
src: z.string().optional().describe("image URL (kind:image)"),
|
|
62
|
+
alt: z.string().describe("accessible label; \"\" = decorative")
|
|
63
|
+
});
|
|
64
|
+
/** Back-compat union: a plain string (emoji, or a scene backdrop key) OR an IconRef. */
|
|
65
|
+
const iconValueSchema = z.union([z.string(), iconRefSchema]);
|
|
66
|
+
const deckItemSchema = z.object({
|
|
67
|
+
term: z.string().describe("the target-language word/phrase"),
|
|
68
|
+
translation: z.string().describe("the learner's-language meaning"),
|
|
69
|
+
transliteration: z.string().optional(),
|
|
70
|
+
audioUrl: z.string().optional().describe("uploaded or external audio URL; none → browser TTS"),
|
|
71
|
+
icon: iconValueSchema.optional().describe("emoji string, or an IconRef for a registered SVG / image"),
|
|
72
|
+
example: z.string().optional(),
|
|
73
|
+
tags: z.array(z.string()).optional()
|
|
74
|
+
});
|
|
75
|
+
const deckSchema = z.object({
|
|
76
|
+
title: z.string().optional(),
|
|
77
|
+
termLang: z.string().describe("BCP-47, e.g. en-US / ar / bn-BD"),
|
|
78
|
+
transLang: z.string().describe("BCP-47 of the translation side"),
|
|
79
|
+
items: z.array(deckItemSchema)
|
|
80
|
+
});
|
|
81
|
+
const sentenceTileSchema = z.object({
|
|
82
|
+
text: z.string(),
|
|
83
|
+
pos: posSchema.optional(),
|
|
84
|
+
gloss: z.string().optional()
|
|
85
|
+
});
|
|
86
|
+
const transformTileSchema = sentenceTileSchema;
|
|
87
|
+
const articleItemSchema = z.object({
|
|
88
|
+
before: z.string(),
|
|
89
|
+
noun: z.string(),
|
|
90
|
+
after: z.string().optional(),
|
|
91
|
+
answer: articleAnswerSchema,
|
|
92
|
+
why: z.string().optional()
|
|
93
|
+
});
|
|
94
|
+
const agreementItemSchema = z.object({
|
|
95
|
+
subject: z.string(),
|
|
96
|
+
options: z.array(z.string()),
|
|
97
|
+
correct: z.string(),
|
|
98
|
+
tail: z.string().optional(),
|
|
99
|
+
note: z.string().optional()
|
|
100
|
+
});
|
|
101
|
+
const prepItemSchema = z.object({
|
|
102
|
+
before: z.string(),
|
|
103
|
+
noun: z.string(),
|
|
104
|
+
answer: z.string(),
|
|
105
|
+
options: z.array(z.string()),
|
|
106
|
+
scene: relationSchema,
|
|
107
|
+
figure: iconValueSchema.optional().describe("emoji/IconRef for the placed thing"),
|
|
108
|
+
landmark: iconValueSchema.optional().describe("emoji/IconRef, or a backdrop key: 'sky'|'water'|'ground'|'room'"),
|
|
109
|
+
note: z.string().optional()
|
|
110
|
+
});
|
|
111
|
+
const boardVectorSchema = z.object({
|
|
112
|
+
id: z.string().optional(),
|
|
113
|
+
tail: vec2Schema.optional(),
|
|
114
|
+
comp: vec2Schema,
|
|
115
|
+
color: z.string().optional(),
|
|
116
|
+
label: z.string().optional(),
|
|
117
|
+
drag: z.boolean().optional()
|
|
118
|
+
});
|
|
119
|
+
/** Block-authoring shape (flat dx/dy; the view maps to {comp:{x,y}}). */
|
|
120
|
+
const flatVecSchema = z.object({
|
|
121
|
+
label: z.string().optional(),
|
|
122
|
+
dx: z.union([z.number(), z.string()]).optional(),
|
|
123
|
+
dy: z.union([z.number(), z.string()]).optional(),
|
|
124
|
+
color: z.string().optional(),
|
|
125
|
+
drag: z.boolean().optional()
|
|
126
|
+
});
|
|
127
|
+
const typePanelSchema = z.object({
|
|
128
|
+
name: z.string(),
|
|
129
|
+
caption: z.string(),
|
|
130
|
+
vectors: z.array(z.object({
|
|
131
|
+
tail: vec2Schema.optional(),
|
|
132
|
+
comp: vec2Schema,
|
|
133
|
+
color: z.string().optional(),
|
|
134
|
+
label: z.string().optional()
|
|
135
|
+
})).optional(),
|
|
136
|
+
origin: z.boolean().optional()
|
|
137
|
+
});
|
|
138
|
+
/** Per-knob hide/lock policy a creator authors on any lab block. */
|
|
139
|
+
const controlConfigSchema = z.object({
|
|
140
|
+
hide: z.array(z.string()).optional().describe("control names the learner cannot see or change"),
|
|
141
|
+
lock: z.array(z.string()).optional().describe("control names shown read-only, frozen at the authored value")
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
//#endregion
|
|
145
|
+
export { agreementItemSchema, articleAnswerSchema, articleItemSchema, boardVectorSchema, controlConfigSchema, deckItemSchema, deckSchema, flatVecSchema, iconRefSchema, iconValueSchema, posSchema, prepItemSchema, relationSchema, sentenceTileSchema, transformTileSchema, typePanelSchema, vec2Schema };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/statistics/center-spread/preset.d.ts
|
|
4
|
+
interface CenterSpreadProps {
|
|
5
|
+
data?: number[];
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
step?: number;
|
|
9
|
+
showSigma?: boolean;
|
|
10
|
+
challenge?: {
|
|
11
|
+
stat: 'mean' | 'median';
|
|
12
|
+
target: number;
|
|
13
|
+
};
|
|
14
|
+
title?: string;
|
|
15
|
+
prompt?: string;
|
|
16
|
+
objectives?: string[];
|
|
17
|
+
hints?: string[];
|
|
18
|
+
controlId?: string;
|
|
19
|
+
}
|
|
20
|
+
declare function CenterSpreadLab({
|
|
21
|
+
data,
|
|
22
|
+
min,
|
|
23
|
+
max,
|
|
24
|
+
step,
|
|
25
|
+
showSigma,
|
|
26
|
+
challenge,
|
|
27
|
+
title,
|
|
28
|
+
prompt,
|
|
29
|
+
objectives,
|
|
30
|
+
hints: hintList,
|
|
31
|
+
controlId
|
|
32
|
+
}: CenterSpreadProps): ReactNode;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { CenterSpreadLab, CenterSpreadProps };
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Tex as Tex$1 } from "../../core/tex.mjs";
|
|
4
|
+
import { Chip } from "../../kit/controls.mjs";
|
|
5
|
+
import { ControlBar, LabFrame } from "../../kit/frame.mjs";
|
|
6
|
+
import { HintLadder, useCheckpoint, useHints } from "../../kit/pedagogy.mjs";
|
|
7
|
+
import { frequencies, mean, median, mode, range, stddev, variance } from "../core/descriptive.mjs";
|
|
8
|
+
import { useCallback, useMemo, useRef, useState } from "react";
|
|
9
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { useControlSurface } from "@classytic/stage";
|
|
11
|
+
|
|
12
|
+
//#region src/statistics/center-spread/preset.tsx
|
|
13
|
+
/**
|
|
14
|
+
* CenterSpreadLab — centre & spread you can FEEL. Data points sit on a number
|
|
15
|
+
* line; drag them and the mean rides under the line as a BALANCE-POINT fulcrum
|
|
16
|
+
* (the mean is literally where the data balances), the median holds its ground,
|
|
17
|
+
* the mode stack lights up, and a shaded mean ± σ band breathes wider as the data
|
|
18
|
+
* spreads. The punchline lives in the dragging: yank one point far out and the
|
|
19
|
+
* mean chases it while the median barely moves — why we report the median for
|
|
20
|
+
* skewed data. Optional `challenge` turns it into "drag until the mean is 5".
|
|
21
|
+
*
|
|
22
|
+
* All numbers come from the descriptive-stats kernel; the lab only POINTS at them.
|
|
23
|
+
*/
|
|
24
|
+
const W = 500, H = 210, M = 34, AXIS = 150;
|
|
25
|
+
function CenterSpreadLab({ data = [
|
|
26
|
+
2,
|
|
27
|
+
3,
|
|
28
|
+
3,
|
|
29
|
+
5,
|
|
30
|
+
8
|
|
31
|
+
], min = 0, max = 10, step = 1, showSigma = true, challenge, title = "Centre & spread", prompt, objectives, hints: hintList, controlId }) {
|
|
32
|
+
const [vals, setVals] = useState(data);
|
|
33
|
+
const hints = useHints(hintList);
|
|
34
|
+
const svgRef = useRef(null);
|
|
35
|
+
const drag = useRef(null);
|
|
36
|
+
const lo = min, hi = max;
|
|
37
|
+
const xOf = (v) => M + (v - lo) / (hi - lo) * (W - 2 * M);
|
|
38
|
+
const vOf = (px) => {
|
|
39
|
+
const v = lo + (px - M) / (W - 2 * M) * (hi - lo);
|
|
40
|
+
return Math.max(lo, Math.min(hi, Math.round(v / step) * step));
|
|
41
|
+
};
|
|
42
|
+
const mu = mean(vals), md = median(vals), mo = mode(vals), rg = range(vals), sd = stddev(vals);
|
|
43
|
+
const freqs = frequencies(vals);
|
|
44
|
+
Math.max(1, ...freqs.map((f) => f.count));
|
|
45
|
+
const stacked = useMemo(() => {
|
|
46
|
+
const seen = /* @__PURE__ */ new Map();
|
|
47
|
+
return vals.map((v, i) => {
|
|
48
|
+
const k = seen.get(v) ?? 0;
|
|
49
|
+
seen.set(v, k + 1);
|
|
50
|
+
return {
|
|
51
|
+
v,
|
|
52
|
+
i,
|
|
53
|
+
level: k
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
}, [vals]);
|
|
57
|
+
const pointerVal = (e) => {
|
|
58
|
+
const r = svgRef.current.getBoundingClientRect();
|
|
59
|
+
return vOf((e.clientX - r.left) / r.width * W);
|
|
60
|
+
};
|
|
61
|
+
const onDown = (i) => (e) => {
|
|
62
|
+
drag.current = i;
|
|
63
|
+
e.target.setPointerCapture(e.pointerId);
|
|
64
|
+
};
|
|
65
|
+
const onMove = (e) => {
|
|
66
|
+
if (drag.current == null) return;
|
|
67
|
+
const nv = pointerVal(e);
|
|
68
|
+
setVals((arr) => arr.map((x, k) => k === drag.current ? nv : x));
|
|
69
|
+
};
|
|
70
|
+
const onUp = () => {
|
|
71
|
+
drag.current = null;
|
|
72
|
+
};
|
|
73
|
+
const reset = useCallback(() => setVals(data), [data]);
|
|
74
|
+
const addPoint = useCallback(() => setVals((a) => [...a, Math.round((lo + hi) / 2 / step) * step]), [
|
|
75
|
+
lo,
|
|
76
|
+
hi,
|
|
77
|
+
step
|
|
78
|
+
]);
|
|
79
|
+
const removePoint = useCallback(() => setVals((a) => a.length > 1 ? a.slice(0, -1) : a), []);
|
|
80
|
+
const addOutlier = useCallback(() => setVals((a) => [...a, hi]), [hi]);
|
|
81
|
+
const solved = challenge ? Math.abs((challenge.stat === "mean" ? mu : md) - challenge.target) < 1e-6 : false;
|
|
82
|
+
useCheckpoint({
|
|
83
|
+
solved,
|
|
84
|
+
activity: `center-spread:${title}`,
|
|
85
|
+
hintsUsed: hints.count
|
|
86
|
+
});
|
|
87
|
+
useControlSurface(controlId, {
|
|
88
|
+
add: {
|
|
89
|
+
type: "action",
|
|
90
|
+
label: "add a point",
|
|
91
|
+
invoke: addPoint
|
|
92
|
+
},
|
|
93
|
+
remove: {
|
|
94
|
+
type: "action",
|
|
95
|
+
label: "remove a point",
|
|
96
|
+
invoke: removePoint
|
|
97
|
+
},
|
|
98
|
+
outlier: {
|
|
99
|
+
type: "action",
|
|
100
|
+
label: "add an outlier",
|
|
101
|
+
invoke: addOutlier
|
|
102
|
+
},
|
|
103
|
+
reset: {
|
|
104
|
+
type: "action",
|
|
105
|
+
label: "reset data",
|
|
106
|
+
invoke: reset
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
const sigmaL = Math.max(lo, mu - sd), sigmaR = Math.min(hi, mu + sd);
|
|
110
|
+
const ticks = Array.from({ length: Math.floor((hi - lo) / step) + 1 }, (_, i) => lo + i * step).filter((_, i, a) => a.length <= 12 || i % Math.ceil(a.length / 12) === 0);
|
|
111
|
+
const stat = (label, value, color = "var(--stage-fg)") => /* @__PURE__ */ jsxs("span", {
|
|
112
|
+
style: {
|
|
113
|
+
display: "inline-flex",
|
|
114
|
+
flexDirection: "column",
|
|
115
|
+
alignItems: "center",
|
|
116
|
+
minWidth: 64
|
|
117
|
+
},
|
|
118
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
119
|
+
style: {
|
|
120
|
+
fontSize: 11,
|
|
121
|
+
color: "var(--stage-muted)",
|
|
122
|
+
fontWeight: 600
|
|
123
|
+
},
|
|
124
|
+
children: label
|
|
125
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
126
|
+
style: {
|
|
127
|
+
fontSize: 17,
|
|
128
|
+
fontWeight: 800,
|
|
129
|
+
color,
|
|
130
|
+
fontVariantNumeric: "tabular-nums"
|
|
131
|
+
},
|
|
132
|
+
children: value
|
|
133
|
+
})]
|
|
134
|
+
});
|
|
135
|
+
const figure = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
136
|
+
challenge && /* @__PURE__ */ jsxs("p", {
|
|
137
|
+
style: {
|
|
138
|
+
fontWeight: 600,
|
|
139
|
+
color: solved ? "var(--stage-good)" : "var(--stage-fg)"
|
|
140
|
+
},
|
|
141
|
+
children: [
|
|
142
|
+
solved ? "✓ " : "🎯 ",
|
|
143
|
+
"Drag the points until the ",
|
|
144
|
+
/* @__PURE__ */ jsx("b", { children: challenge.stat }),
|
|
145
|
+
" = ",
|
|
146
|
+
challenge.target,
|
|
147
|
+
"."
|
|
148
|
+
]
|
|
149
|
+
}),
|
|
150
|
+
/* @__PURE__ */ jsx("div", {
|
|
151
|
+
style: {
|
|
152
|
+
borderRadius: 14,
|
|
153
|
+
background: "var(--stage-bg)",
|
|
154
|
+
border: "1px solid var(--stage-grid)",
|
|
155
|
+
padding: 8,
|
|
156
|
+
touchAction: "none"
|
|
157
|
+
},
|
|
158
|
+
children: /* @__PURE__ */ jsxs("svg", {
|
|
159
|
+
ref: svgRef,
|
|
160
|
+
viewBox: `0 0 ${W} ${H}`,
|
|
161
|
+
style: {
|
|
162
|
+
width: "100%",
|
|
163
|
+
maxWidth: W,
|
|
164
|
+
height: "auto",
|
|
165
|
+
display: "block",
|
|
166
|
+
margin: "0 auto"
|
|
167
|
+
},
|
|
168
|
+
onPointerMove: onMove,
|
|
169
|
+
onPointerUp: onUp,
|
|
170
|
+
onPointerLeave: onUp,
|
|
171
|
+
role: "img",
|
|
172
|
+
"aria-label": `number line; mean ${mu.toFixed(2)}, median ${md}`,
|
|
173
|
+
children: [
|
|
174
|
+
showSigma && sd > 0 && /* @__PURE__ */ jsx("rect", {
|
|
175
|
+
x: xOf(sigmaL),
|
|
176
|
+
y: AXIS - 96,
|
|
177
|
+
width: xOf(sigmaR) - xOf(sigmaL),
|
|
178
|
+
height: 96,
|
|
179
|
+
fill: "color-mix(in oklab, var(--stage-accent) 12%, transparent)"
|
|
180
|
+
}),
|
|
181
|
+
/* @__PURE__ */ jsx("line", {
|
|
182
|
+
x1: M,
|
|
183
|
+
y1: AXIS,
|
|
184
|
+
x2: W - M,
|
|
185
|
+
y2: AXIS,
|
|
186
|
+
stroke: "var(--stage-fg)",
|
|
187
|
+
strokeWidth: 2
|
|
188
|
+
}),
|
|
189
|
+
ticks.map((t) => /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("line", {
|
|
190
|
+
x1: xOf(t),
|
|
191
|
+
y1: AXIS,
|
|
192
|
+
x2: xOf(t),
|
|
193
|
+
y2: 155,
|
|
194
|
+
stroke: "var(--stage-muted)",
|
|
195
|
+
strokeWidth: 1.5
|
|
196
|
+
}), /* @__PURE__ */ jsx("text", {
|
|
197
|
+
x: xOf(t),
|
|
198
|
+
y: 168,
|
|
199
|
+
textAnchor: "middle",
|
|
200
|
+
fontSize: 11,
|
|
201
|
+
fill: "var(--stage-muted)",
|
|
202
|
+
style: { fontVariantNumeric: "tabular-nums" },
|
|
203
|
+
children: t
|
|
204
|
+
})] }, t)),
|
|
205
|
+
/* @__PURE__ */ jsx("line", {
|
|
206
|
+
x1: xOf(md),
|
|
207
|
+
y1: AXIS - 104,
|
|
208
|
+
x2: xOf(md),
|
|
209
|
+
y2: AXIS,
|
|
210
|
+
stroke: "var(--stage-accent-2, #d6336c)",
|
|
211
|
+
strokeWidth: 2,
|
|
212
|
+
strokeDasharray: "5 4"
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ jsxs("text", {
|
|
215
|
+
x: xOf(md),
|
|
216
|
+
y: AXIS - 110,
|
|
217
|
+
textAnchor: "middle",
|
|
218
|
+
fontSize: 11,
|
|
219
|
+
fontWeight: 700,
|
|
220
|
+
fill: "var(--stage-accent-2, #d6336c)",
|
|
221
|
+
children: ["median ", md]
|
|
222
|
+
}),
|
|
223
|
+
stacked.map(({ v, i, level }) => {
|
|
224
|
+
const cy = AXIS - 14 - level * 19;
|
|
225
|
+
const isMode = mo.includes(v) && mo.length > 0;
|
|
226
|
+
return /* @__PURE__ */ jsx("circle", {
|
|
227
|
+
cx: xOf(v),
|
|
228
|
+
cy,
|
|
229
|
+
r: 9,
|
|
230
|
+
fill: isMode ? "var(--stage-warn)" : "var(--stage-accent)",
|
|
231
|
+
stroke: "var(--stage-bg)",
|
|
232
|
+
strokeWidth: 2,
|
|
233
|
+
onPointerDown: onDown(i),
|
|
234
|
+
style: {
|
|
235
|
+
cursor: "grab",
|
|
236
|
+
transition: drag.current === i ? "none" : "cx .08s, cy .08s"
|
|
237
|
+
}
|
|
238
|
+
}, i);
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ jsxs("g", {
|
|
241
|
+
style: {
|
|
242
|
+
transition: drag.current == null ? "transform .1s" : "none",
|
|
243
|
+
transform: `translateX(${xOf(mu) - W / 2}px)`
|
|
244
|
+
},
|
|
245
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
246
|
+
d: `M${W / 2},151 l-9,16 h18 Z`,
|
|
247
|
+
fill: "var(--stage-good)"
|
|
248
|
+
}), /* @__PURE__ */ jsxs("text", {
|
|
249
|
+
x: W / 2,
|
|
250
|
+
y: 180,
|
|
251
|
+
textAnchor: "middle",
|
|
252
|
+
fontSize: 11,
|
|
253
|
+
fontWeight: 800,
|
|
254
|
+
fill: "var(--stage-good)",
|
|
255
|
+
children: ["mean ", mu.toFixed(2)]
|
|
256
|
+
})]
|
|
257
|
+
})
|
|
258
|
+
]
|
|
259
|
+
})
|
|
260
|
+
}),
|
|
261
|
+
/* @__PURE__ */ jsxs("div", {
|
|
262
|
+
style: {
|
|
263
|
+
display: "flex",
|
|
264
|
+
gap: 8,
|
|
265
|
+
flexWrap: "wrap",
|
|
266
|
+
justifyContent: "center",
|
|
267
|
+
margin: "12px 0",
|
|
268
|
+
padding: "8px 0",
|
|
269
|
+
borderTop: "1px solid var(--stage-grid)",
|
|
270
|
+
borderBottom: "1px solid var(--stage-grid)"
|
|
271
|
+
},
|
|
272
|
+
children: [
|
|
273
|
+
stat("mean", mu.toFixed(2), "var(--stage-good)"),
|
|
274
|
+
stat("median", String(md), "var(--stage-accent-2, #d6336c)"),
|
|
275
|
+
stat("mode", mo.length ? mo.join(", ") : "—", "var(--stage-warn)"),
|
|
276
|
+
stat("range", String(rg)),
|
|
277
|
+
stat("variance", variance(vals).toFixed(2)),
|
|
278
|
+
stat(/* @__PURE__ */ jsx(Tex$1, { tex: "\\\\sigma" }), sd.toFixed(2), "var(--stage-accent)"),
|
|
279
|
+
stat("n", String(vals.length))
|
|
280
|
+
]
|
|
281
|
+
})
|
|
282
|
+
] });
|
|
283
|
+
return /* @__PURE__ */ jsx(LabFrame, {
|
|
284
|
+
title,
|
|
285
|
+
prompt,
|
|
286
|
+
objectives,
|
|
287
|
+
controls: /* @__PURE__ */ jsxs(ControlBar, { children: [
|
|
288
|
+
/* @__PURE__ */ jsx(Chip, {
|
|
289
|
+
selected: false,
|
|
290
|
+
onClick: addPoint,
|
|
291
|
+
children: "+ point"
|
|
292
|
+
}),
|
|
293
|
+
/* @__PURE__ */ jsx(Chip, {
|
|
294
|
+
selected: false,
|
|
295
|
+
onClick: removePoint,
|
|
296
|
+
children: "− point"
|
|
297
|
+
}),
|
|
298
|
+
/* @__PURE__ */ jsx(Chip, {
|
|
299
|
+
selected: false,
|
|
300
|
+
onClick: addOutlier,
|
|
301
|
+
children: "add outlier"
|
|
302
|
+
}),
|
|
303
|
+
/* @__PURE__ */ jsx(Chip, {
|
|
304
|
+
selected: false,
|
|
305
|
+
onClick: reset,
|
|
306
|
+
children: "reset"
|
|
307
|
+
}),
|
|
308
|
+
/* @__PURE__ */ jsx("span", {
|
|
309
|
+
style: {
|
|
310
|
+
fontSize: 12,
|
|
311
|
+
color: "var(--stage-muted)",
|
|
312
|
+
alignSelf: "center"
|
|
313
|
+
},
|
|
314
|
+
children: "drag the dots ↔"
|
|
315
|
+
})
|
|
316
|
+
] }),
|
|
317
|
+
footer: /* @__PURE__ */ jsx(HintLadder, { hints }),
|
|
318
|
+
children: figure
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
//#endregion
|
|
323
|
+
export { CenterSpreadLab };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region src/statistics/core/descriptive.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Descriptive statistics — the pure kernel the statistics labs trust as the
|
|
4
|
+
* source of truth (centre, spread, position). No dependencies; every lab POINTS
|
|
5
|
+
* to these numbers rather than recomputing them, so the figure and the readout
|
|
6
|
+
* can never disagree. Median uses the standard average-of-middle-two for even n;
|
|
7
|
+
* variance/σ default to the POPULATION form (divide by n) with a `sample` flag
|
|
8
|
+
* for the n−1 (Bessel) form.
|
|
9
|
+
*/
|
|
10
|
+
declare const sum: (xs: number[]) => number;
|
|
11
|
+
declare const mean: (xs: number[]) => number;
|
|
12
|
+
declare function median(xs: number[]): number;
|
|
13
|
+
/** Every value tied for the highest frequency (multimodal-aware), sorted. */
|
|
14
|
+
declare function mode(xs: number[]): number[];
|
|
15
|
+
declare const range: (xs: number[]) => number;
|
|
16
|
+
declare function variance(xs: number[], sample?: boolean): number;
|
|
17
|
+
declare const stddev: (xs: number[], sample?: boolean) => number;
|
|
18
|
+
/** Linear-interpolated quantile (q in [0,1]) — the inclusive "p = (n−1)q" method. */
|
|
19
|
+
declare function quantile(xs: number[], q: number): number;
|
|
20
|
+
interface FiveNumber {
|
|
21
|
+
min: number;
|
|
22
|
+
q1: number;
|
|
23
|
+
median: number;
|
|
24
|
+
q3: number;
|
|
25
|
+
max: number;
|
|
26
|
+
iqr: number;
|
|
27
|
+
}
|
|
28
|
+
declare function fiveNumber(xs: number[]): FiveNumber;
|
|
29
|
+
/** Counts per value (for histograms / mode bars), sorted by value. */
|
|
30
|
+
declare function frequencies(xs: number[]): {
|
|
31
|
+
value: number;
|
|
32
|
+
count: number;
|
|
33
|
+
}[];
|
|
34
|
+
//#endregion
|
|
35
|
+
export { FiveNumber, fiveNumber, frequencies, mean, median, mode, quantile, range, stddev, sum, variance };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
//#region src/statistics/core/descriptive.ts
|
|
2
|
+
/**
|
|
3
|
+
* Descriptive statistics — the pure kernel the statistics labs trust as the
|
|
4
|
+
* source of truth (centre, spread, position). No dependencies; every lab POINTS
|
|
5
|
+
* to these numbers rather than recomputing them, so the figure and the readout
|
|
6
|
+
* can never disagree. Median uses the standard average-of-middle-two for even n;
|
|
7
|
+
* variance/σ default to the POPULATION form (divide by n) with a `sample` flag
|
|
8
|
+
* for the n−1 (Bessel) form.
|
|
9
|
+
*/
|
|
10
|
+
const sum = (xs) => xs.reduce((a, b) => a + b, 0);
|
|
11
|
+
const mean = (xs) => xs.length ? sum(xs) / xs.length : 0;
|
|
12
|
+
function median(xs) {
|
|
13
|
+
if (!xs.length) return 0;
|
|
14
|
+
const s = [...xs].sort((a, b) => a - b);
|
|
15
|
+
const m = s.length >> 1;
|
|
16
|
+
return s.length % 2 ? s[m] : (s[m - 1] + s[m]) / 2;
|
|
17
|
+
}
|
|
18
|
+
/** Every value tied for the highest frequency (multimodal-aware), sorted. */
|
|
19
|
+
function mode(xs) {
|
|
20
|
+
if (!xs.length) return [];
|
|
21
|
+
const freq = /* @__PURE__ */ new Map();
|
|
22
|
+
for (const x of xs) freq.set(x, (freq.get(x) ?? 0) + 1);
|
|
23
|
+
const max = Math.max(...freq.values());
|
|
24
|
+
if (max === 1) return [];
|
|
25
|
+
return [...freq.entries()].filter(([, c]) => c === max).map(([v]) => v).sort((a, b) => a - b);
|
|
26
|
+
}
|
|
27
|
+
const range = (xs) => xs.length ? Math.max(...xs) - Math.min(...xs) : 0;
|
|
28
|
+
function variance(xs, sample = false) {
|
|
29
|
+
if (xs.length < (sample ? 2 : 1)) return 0;
|
|
30
|
+
const m = mean(xs);
|
|
31
|
+
return sum(xs.map((x) => (x - m) ** 2)) / (xs.length - (sample ? 1 : 0));
|
|
32
|
+
}
|
|
33
|
+
const stddev = (xs, sample = false) => Math.sqrt(variance(xs, sample));
|
|
34
|
+
/** Linear-interpolated quantile (q in [0,1]) — the inclusive "p = (n−1)q" method. */
|
|
35
|
+
function quantile(xs, q) {
|
|
36
|
+
if (!xs.length) return 0;
|
|
37
|
+
const s = [...xs].sort((a, b) => a - b);
|
|
38
|
+
const pos = (s.length - 1) * q;
|
|
39
|
+
const lo = Math.floor(pos), hi = Math.ceil(pos);
|
|
40
|
+
return lo === hi ? s[lo] : s[lo] + (pos - lo) * (s[hi] - s[lo]);
|
|
41
|
+
}
|
|
42
|
+
function fiveNumber(xs) {
|
|
43
|
+
const q1 = quantile(xs, .25), q3 = quantile(xs, .75);
|
|
44
|
+
return {
|
|
45
|
+
min: xs.length ? Math.min(...xs) : 0,
|
|
46
|
+
q1,
|
|
47
|
+
median: median(xs),
|
|
48
|
+
q3,
|
|
49
|
+
max: xs.length ? Math.max(...xs) : 0,
|
|
50
|
+
iqr: q3 - q1
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/** Counts per value (for histograms / mode bars), sorted by value. */
|
|
54
|
+
function frequencies(xs) {
|
|
55
|
+
const f = /* @__PURE__ */ new Map();
|
|
56
|
+
for (const x of xs) f.set(x, (f.get(x) ?? 0) + 1);
|
|
57
|
+
return [...f.entries()].map(([value, count]) => ({
|
|
58
|
+
value,
|
|
59
|
+
count
|
|
60
|
+
})).sort((a, b) => a.value - b.value);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
export { fiveNumber, frequencies, mean, median, mode, quantile, range, stddev, sum, variance };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/statistics/core/normal.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Normal-distribution kernel — the bell curve's pdf/cdf, the z-score, and the
|
|
4
|
+
* area between two points (the probability a value lands in a range). The cdf uses
|
|
5
|
+
* the Abramowitz–Stegun erf approximation (max error ~1.5e-7 — far tighter than
|
|
6
|
+
* any teaching needs). The labs render these; they never re-derive them.
|
|
7
|
+
*/
|
|
8
|
+
/** Gauss error function (A&S 7.1.26). */
|
|
9
|
+
declare function erf(x: number): number;
|
|
10
|
+
/** Normal probability density at x. */
|
|
11
|
+
declare function normalPdf(x: number, mu?: number, sigma?: number): number;
|
|
12
|
+
/** Cumulative probability P(X ≤ x). */
|
|
13
|
+
declare function normalCdf(x: number, mu?: number, sigma?: number): number;
|
|
14
|
+
/** P(a ≤ X ≤ b). */
|
|
15
|
+
declare function normalBetween(a: number, b: number, mu?: number, sigma?: number): number;
|
|
16
|
+
/** The standard score: how many σ a value sits from the mean. */
|
|
17
|
+
declare function zScore(x: number, mu?: number, sigma?: number): number;
|
|
18
|
+
/** The 68–95–99.7 rule — P(within k·σ of the mean). */
|
|
19
|
+
declare function withinSigma(k: number): number;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { erf, normalBetween, normalCdf, normalPdf, withinSigma, zScore };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/statistics/core/normal.ts
|
|
2
|
+
/**
|
|
3
|
+
* Normal-distribution kernel — the bell curve's pdf/cdf, the z-score, and the
|
|
4
|
+
* area between two points (the probability a value lands in a range). The cdf uses
|
|
5
|
+
* the Abramowitz–Stegun erf approximation (max error ~1.5e-7 — far tighter than
|
|
6
|
+
* any teaching needs). The labs render these; they never re-derive them.
|
|
7
|
+
*/
|
|
8
|
+
/** Gauss error function (A&S 7.1.26). */
|
|
9
|
+
function erf(x) {
|
|
10
|
+
const t = 1 / (1 + .3275911 * Math.abs(x));
|
|
11
|
+
const y = 1 - ((((1.061405429 * t - 1.453152027) * t + 1.421413741) * t - .284496736) * t + .254829592) * t * Math.exp(-x * x);
|
|
12
|
+
return x >= 0 ? y : -y;
|
|
13
|
+
}
|
|
14
|
+
/** Normal probability density at x. */
|
|
15
|
+
function normalPdf(x, mu = 0, sigma = 1) {
|
|
16
|
+
const z = (x - mu) / sigma;
|
|
17
|
+
return Math.exp(-.5 * z * z) / (sigma * Math.sqrt(2 * Math.PI));
|
|
18
|
+
}
|
|
19
|
+
/** Cumulative probability P(X ≤ x). */
|
|
20
|
+
function normalCdf(x, mu = 0, sigma = 1) {
|
|
21
|
+
return .5 * (1 + erf((x - mu) / (sigma * Math.SQRT2)));
|
|
22
|
+
}
|
|
23
|
+
/** P(a ≤ X ≤ b). */
|
|
24
|
+
function normalBetween(a, b, mu = 0, sigma = 1) {
|
|
25
|
+
return Math.abs(normalCdf(b, mu, sigma) - normalCdf(a, mu, sigma));
|
|
26
|
+
}
|
|
27
|
+
/** The standard score: how many σ a value sits from the mean. */
|
|
28
|
+
function zScore(x, mu = 0, sigma = 1) {
|
|
29
|
+
return (x - mu) / sigma;
|
|
30
|
+
}
|
|
31
|
+
/** The 68–95–99.7 rule — P(within k·σ of the mean). */
|
|
32
|
+
function withinSigma(k) {
|
|
33
|
+
return normalBetween(-k, k, 0, 1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { erf, normalBetween, normalCdf, normalPdf, withinSigma, zScore };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/statistics/core/sequences.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Sequences & series kernel — arithmetic and geometric, the two patterns every
|
|
4
|
+
* series lesson rests on. Pure functions: the nth term, the first n terms, and
|
|
5
|
+
* the partial sum (closed form), plus the geometric infinite-sum (|r|<1). The
|
|
6
|
+
* lab draws bars/areas from `terms()` and proves the closed form against the
|
|
7
|
+
* brute sum, so the visual and the formula stay in lockstep.
|
|
8
|
+
*/
|
|
9
|
+
type SeqKind = 'arithmetic' | 'geometric';
|
|
10
|
+
interface SeqSpec {
|
|
11
|
+
kind: SeqKind;
|
|
12
|
+
first: number;
|
|
13
|
+
step: number;
|
|
14
|
+
}
|
|
15
|
+
/** The nth term (1-indexed): aₙ = a₁+(n−1)d | aₙ = a₁·r^(n−1). */
|
|
16
|
+
declare function nthTerm(spec: SeqSpec, n: number): number;
|
|
17
|
+
/** The first `count` terms (1-indexed). */
|
|
18
|
+
declare function terms(spec: SeqSpec, count: number): number[];
|
|
19
|
+
/** Partial sum of the first n terms, closed form.
|
|
20
|
+
* arithmetic: n/2·(2a₁+(n−1)d). geometric: a₁·(1−rⁿ)/(1−r) (n·a₁ when r=1). */
|
|
21
|
+
declare function partialSum(spec: SeqSpec, n: number): number;
|
|
22
|
+
/** Running partial sums S₁…S_count (for the convergence/area visual). */
|
|
23
|
+
declare function partialSums(spec: SeqSpec, count: number): number[];
|
|
24
|
+
/** Sum to infinity of a geometric series, or null if it diverges (|r| ≥ 1). */
|
|
25
|
+
declare function infiniteSum(spec: SeqSpec): number | null;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { SeqKind, SeqSpec, infiniteSum, nthTerm, partialSum, partialSums, terms };
|