@classytic/labs 0.2.0 β 0.3.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 +1 -1
- package/README.md +196 -8
- package/dist/algorithms/GraphAlgorithmLab.d.mts +21 -0
- package/dist/algorithms/GraphAlgorithmLab.mjs +183 -0
- package/dist/algorithms/GraphView.d.mts +23 -0
- package/dist/algorithms/GraphView.mjs +86 -0
- package/dist/algorithms/GridPathLab.d.mts +15 -0
- package/dist/algorithms/GridPathLab.mjs +164 -0
- package/dist/algorithms/GrowthLab.d.mts +18 -0
- package/dist/algorithms/GrowthLab.mjs +191 -0
- package/dist/algorithms/HashLab.d.mts +21 -0
- package/dist/algorithms/HashLab.mjs +199 -0
- package/dist/algorithms/HeapDualView.d.mts +17 -0
- package/dist/algorithms/HeapDualView.mjs +115 -0
- package/dist/algorithms/HeapQuestLab.d.mts +23 -0
- package/dist/algorithms/HeapQuestLab.mjs +152 -0
- package/dist/algorithms/LearningChecks.mjs +36 -0
- package/dist/algorithms/ListLab.d.mts +22 -0
- package/dist/algorithms/ListLab.mjs +208 -0
- package/dist/algorithms/SearchLab.d.mts +17 -0
- package/dist/algorithms/SearchLab.mjs +201 -0
- package/dist/algorithms/SortingLab.d.mts +22 -0
- package/dist/algorithms/SortingLab.mjs +190 -0
- package/dist/algorithms/TraceTransport.d.mts +19 -0
- package/dist/algorithms/TraceTransport.mjs +192 -0
- package/dist/algorithms/TreeQuestLab.d.mts +28 -0
- package/dist/algorithms/TreeQuestLab.mjs +289 -0
- package/dist/algorithms/TreeScene.d.mts +17 -0
- package/dist/algorithms/TreeScene.mjs +199 -0
- package/dist/algorithms/contract.d.mts +75 -0
- package/dist/algorithms/core/index.d.mts +12 -0
- package/dist/algorithms/core/index.mjs +11 -0
- package/dist/algorithms/cost-derivation/core.d.mts +66 -0
- package/dist/algorithms/cost-derivation/core.mjs +93 -0
- package/dist/algorithms/cost-derivation/index.d.mts +2 -0
- package/dist/algorithms/cost-derivation/preset.d.mts +19 -0
- package/dist/algorithms/cost-derivation/preset.mjs +371 -0
- package/dist/algorithms/dp/index.d.mts +3 -0
- package/dist/algorithms/dp/index.mjs +3 -0
- package/dist/algorithms/dp.d.mts +7 -0
- package/dist/algorithms/dp.mjs +32 -0
- package/dist/algorithms/graph/index.d.mts +5 -0
- package/dist/algorithms/graph/index.mjs +5 -0
- package/dist/algorithms/graph.d.mts +9 -0
- package/dist/algorithms/graph.mjs +148 -0
- package/dist/algorithms/growth.d.mts +56 -0
- package/dist/algorithms/growth.mjs +99 -0
- package/dist/algorithms/hashing.d.mts +63 -0
- package/dist/algorithms/hashing.mjs +121 -0
- package/dist/algorithms/heap/index.d.mts +3 -0
- package/dist/algorithms/heap/index.mjs +4 -0
- package/dist/algorithms/heap.d.mts +38 -0
- package/dist/algorithms/heap.mjs +190 -0
- package/dist/algorithms/index.d.mts +33 -0
- package/dist/algorithms/index.mjs +32 -0
- package/dist/algorithms/lists.d.mts +53 -0
- package/dist/algorithms/lists.mjs +254 -0
- package/dist/algorithms/normalize.d.mts +6 -0
- package/dist/algorithms/normalize.mjs +27 -0
- package/dist/algorithms/presets.d.mts +6 -0
- package/dist/algorithms/presets.mjs +94 -0
- package/dist/algorithms/react/index.d.mts +9 -0
- package/dist/algorithms/react/index.mjs +12 -0
- package/dist/algorithms/search.d.mts +45 -0
- package/dist/algorithms/search.mjs +65 -0
- package/dist/algorithms/sequence-contract.d.mts +39 -0
- package/dist/algorithms/sequence-contract.mjs +5 -0
- package/dist/algorithms/sorting.d.mts +30 -0
- package/dist/algorithms/sorting.mjs +219 -0
- package/dist/algorithms/tree/index.d.mts +6 -0
- package/dist/algorithms/tree/index.mjs +6 -0
- package/dist/algorithms/tree-builder.d.mts +8 -0
- package/dist/algorithms/tree-builder.mjs +54 -0
- package/dist/algorithms/tree-contract.d.mts +95 -0
- package/dist/algorithms/tree-layout.d.mts +9 -0
- package/dist/algorithms/tree-layout.mjs +47 -0
- package/dist/algorithms/tree-presets.d.mts +7 -0
- package/dist/algorithms/tree-presets.mjs +92 -0
- package/dist/algorithms/tree.d.mts +10 -0
- package/dist/algorithms/tree.mjs +375 -0
- package/dist/authoring/index.d.mts +11 -0
- package/dist/authoring/index.mjs +20 -0
- package/dist/authoring/quality.d.mts +18 -0
- package/dist/authoring/quality.mjs +54 -0
- package/dist/authoring/report.d.mts +24 -0
- package/dist/authoring/report.mjs +27 -0
- package/dist/biology/cell-division/activity.d.mts +1 -0
- package/dist/biology/cell-division/activity.mjs +82 -0
- package/dist/biology/cell-division/core.d.mts +24 -0
- package/dist/biology/cell-division/core.mjs +87 -0
- package/dist/biology/cell-division/index.d.mts +5 -0
- package/dist/biology/cell-division/meiosis-activity.d.mts +1 -0
- package/dist/biology/cell-division/meiosis-activity.mjs +81 -0
- package/dist/biology/cell-division/meiosis-core.d.mts +19 -0
- package/dist/biology/cell-division/meiosis-core.mjs +89 -0
- package/dist/biology/cell-division/meiosis-preset.d.mts +35 -0
- package/dist/biology/cell-division/meiosis-preset.mjs +117 -0
- package/dist/biology/cell-division/meiosis-scene.d.mts +13 -0
- package/dist/biology/cell-division/meiosis-scene.mjs +149 -0
- package/dist/biology/cell-division/preset.d.mts +38 -0
- package/dist/biology/cell-division/preset.mjs +226 -0
- package/dist/biology/cell-energy/activity.d.mts +1 -0
- package/dist/biology/cell-energy/activity.mjs +74 -0
- package/dist/biology/cell-energy/core.d.mts +25 -0
- package/dist/biology/cell-energy/core.mjs +17 -0
- package/dist/biology/cell-energy/index.d.mts +2 -0
- package/dist/biology/cell-energy/preset.d.mts +40 -0
- package/dist/biology/cell-energy/preset.mjs +110 -0
- package/dist/biology/cell-system/activity.d.mts +1 -0
- package/dist/biology/cell-system/activity.mjs +74 -0
- package/dist/biology/cell-system/core.d.mts +18 -0
- package/dist/biology/cell-system/core.mjs +63 -0
- package/dist/biology/cell-system/index.d.mts +2 -0
- package/dist/biology/cell-system/preset.d.mts +33 -0
- package/dist/biology/cell-system/preset.mjs +82 -0
- package/dist/biology/enzyme-rate/preset.mjs +113 -45
- package/dist/biology/genetic-cross/grid.mjs +117 -105
- package/dist/biology/genetic-cross/preset.d.mts +3 -1
- package/dist/biology/genetic-cross/preset.mjs +17 -60
- package/dist/biology/genetic-cross/sex-linked.mjs +33 -74
- package/dist/biology/index.d.mts +12 -1
- package/dist/biology/index.mjs +12 -1
- package/dist/biology/membrane-transport/activity.d.mts +1 -0
- package/dist/biology/membrane-transport/activity.mjs +74 -0
- package/dist/biology/membrane-transport/core.d.mts +28 -0
- package/dist/biology/membrane-transport/core.mjs +49 -0
- package/dist/biology/membrane-transport/index.d.mts +2 -0
- package/dist/biology/membrane-transport/preset.d.mts +43 -0
- package/dist/biology/membrane-transport/preset.mjs +131 -0
- package/dist/biology/photosynthesis-factors/preset.mjs +129 -75
- package/dist/biology/punnett-cross/preset.mjs +2 -1
- package/dist/biology/respiration/preset.mjs +75 -64
- package/dist/biology/sequence/central-dogma.mjs +194 -187
- package/dist/biology/sequence/preset.mjs +172 -128
- package/dist/blocks/authoring.mjs +329 -171
- package/dist/blocks/catalog.d.mts +16 -0
- package/dist/blocks/catalog.mjs +9 -0
- package/dist/blocks/domains.d.mts +11 -0
- package/dist/blocks/domains.mjs +15 -0
- package/dist/blocks/gallery.d.mts +3 -0
- package/dist/blocks/gallery.mjs +6 -0
- package/dist/blocks/index.d.mts +7 -6950
- package/dist/blocks/index.mjs +9 -107
- package/dist/blocks/lab-block.mjs +1 -42
- package/dist/blocks/lab-config.mjs +108 -31
- package/dist/blocks/lazy-resolve.d.mts +20 -0
- package/dist/blocks/lazy-resolve.mjs +24 -0
- package/dist/blocks/lazy.d.mts +10 -0
- package/dist/blocks/lazy.mjs +13 -0
- package/dist/blocks/lesson.mjs +1 -1
- package/dist/build/CircuitEditor.mjs +377 -366
- package/dist/build/CircuitScene.d.mts +10 -2
- package/dist/build/CircuitScene.mjs +298 -209
- package/dist/build/editor/index.d.mts +4 -0
- package/dist/build/editor/index.mjs +6 -0
- package/dist/build/editor-ui.mjs +60 -83
- package/dist/build/index.d.mts +2 -2
- package/dist/build/parts/ammeter.mjs +1 -1
- package/dist/build/parts/bulb.mjs +1 -1
- package/dist/build/parts/capacitor.mjs +1 -1
- package/dist/build/parts/cell.mjs +1 -1
- package/dist/build/parts/diode.mjs +1 -1
- package/dist/build/parts/mosfet.mjs +1 -1
- package/dist/build/parts/node.mjs +1 -1
- package/dist/build/parts/resistor.mjs +1 -1
- package/dist/build/parts/shared.mjs +1 -1
- package/dist/build/parts/switch.mjs +1 -1
- package/dist/build/runtime/index.d.mts +8 -0
- package/dist/build/runtime/index.mjs +10 -0
- package/dist/build/viewport.mjs +231 -0
- package/dist/chem/battery.d.mts +4 -1
- package/dist/chem/battery.mjs +314 -190
- package/dist/chem/bohr-atom.d.mts +4 -1
- package/dist/chem/bohr-atom.mjs +78 -23
- package/dist/chem/crystal-lattice/activity.d.mts +6 -0
- package/dist/chem/crystal-lattice/activity.mjs +95 -0
- package/dist/chem/crystal-lattice/core.d.mts +19 -0
- package/dist/chem/crystal-lattice/core.mjs +101 -0
- package/dist/chem/crystal-lattice/index.d.mts +3 -0
- package/dist/chem/crystal-lattice/preset.d.mts +44 -0
- package/dist/chem/crystal-lattice/preset.mjs +244 -0
- package/dist/chem/diffusion/asset.mjs +76 -38
- package/dist/chem/diffusion/preset.d.mts +4 -1
- package/dist/chem/diffusion/preset.mjs +143 -90
- package/dist/chem/electrochem/preset.d.mts +4 -1
- package/dist/chem/electrochem/preset.mjs +362 -242
- package/dist/chem/equilibrium/preset.d.mts +4 -1
- package/dist/chem/equilibrium/preset.mjs +333 -280
- package/dist/chem/gas-box/preset.d.mts +4 -1
- package/dist/chem/gas-box/preset.mjs +186 -143
- package/dist/chem/index.d.mts +17 -2
- package/dist/chem/index.mjs +16 -1
- package/dist/chem/kinetics/preset.d.mts +4 -1
- package/dist/chem/kinetics/preset.mjs +311 -313
- package/dist/chem/molecular-geometry/activity.d.mts +6 -0
- package/dist/chem/molecular-geometry/activity.mjs +90 -0
- package/dist/chem/molecular-geometry/core.d.mts +30 -0
- package/dist/chem/molecular-geometry/core.mjs +156 -0
- package/dist/chem/molecular-geometry/index.d.mts +3 -0
- package/dist/chem/molecular-geometry/preset.d.mts +45 -0
- package/dist/chem/molecular-geometry/preset.mjs +291 -0
- package/dist/chem/orbital-overlap/activity.d.mts +6 -0
- package/dist/chem/orbital-overlap/activity.mjs +82 -0
- package/dist/chem/orbital-overlap/core.d.mts +12 -0
- package/dist/chem/orbital-overlap/core.mjs +27 -0
- package/dist/chem/orbital-overlap/index.d.mts +3 -0
- package/dist/chem/orbital-overlap/preset.d.mts +39 -0
- package/dist/chem/orbital-overlap/preset.mjs +200 -0
- package/dist/chem/orbitals/activity.d.mts +6 -0
- package/dist/chem/orbitals/activity.mjs +90 -0
- package/dist/chem/orbitals/core.d.mts +27 -0
- package/dist/chem/orbitals/core.mjs +100 -0
- package/dist/chem/orbitals/index.d.mts +3 -0
- package/dist/chem/orbitals/preset.d.mts +47 -0
- package/dist/chem/orbitals/preset.mjs +213 -0
- package/dist/chem/periodic-trends/preset.d.mts +5 -1
- package/dist/chem/periodic-trends/preset.mjs +274 -164
- package/dist/chem/reaction-lab.d.mts +4 -1
- package/dist/chem/reaction-lab.mjs +100 -50
- package/dist/chem/reaction-profile.d.mts +4 -1
- package/dist/chem/reaction-profile.mjs +202 -181
- package/dist/chem/solution/dilution.d.mts +5 -1
- package/dist/chem/solution/dilution.mjs +165 -131
- package/dist/chem/solution/field.d.mts +14 -5
- package/dist/chem/solution/field.mjs +122 -88
- package/dist/chem/solution/solution-box.d.mts +5 -1
- package/dist/chem/solution/solution-box.mjs +132 -84
- package/dist/chem/stereochemistry/activity.d.mts +6 -0
- package/dist/chem/stereochemistry/activity.mjs +88 -0
- package/dist/chem/stereochemistry/core.d.mts +25 -0
- package/dist/chem/stereochemistry/core.mjs +130 -0
- package/dist/chem/stereochemistry/index.d.mts +3 -0
- package/dist/chem/stereochemistry/preset.d.mts +43 -0
- package/dist/chem/stereochemistry/preset.mjs +245 -0
- package/dist/chem/stoichiometry/preset.d.mts +5 -1
- package/dist/chem/stoichiometry/preset.mjs +290 -196
- package/dist/chem/titration/index.d.mts +1 -1
- package/dist/chem/titration/preset.d.mts +10 -2
- package/dist/chem/titration/preset.mjs +465 -322
- package/dist/chem/visual/atom.mjs +41 -0
- package/dist/circuits/ac-dc/activity-plan.mjs +70 -0
- package/dist/circuits/ac-dc/asset.mjs +2 -2
- package/dist/circuits/ac-dc/preset.d.mts +8 -1
- package/dist/circuits/ac-dc/preset.mjs +76 -46
- package/dist/circuits/brownout/activity-plan.mjs +83 -0
- package/dist/circuits/brownout/preset.d.mts +2 -1
- package/dist/circuits/brownout/preset.mjs +211 -258
- package/dist/circuits/capacitor-leak/activity-plan.mjs +83 -0
- package/dist/circuits/capacitor-leak/preset.d.mts +4 -1
- package/dist/circuits/capacitor-leak/preset.mjs +267 -188
- package/dist/circuits/circuit/activity-plan.mjs +83 -0
- package/dist/circuits/circuit/asset.mjs +73 -184
- package/dist/circuits/circuit/preset.d.mts +3 -0
- package/dist/circuits/circuit/preset.mjs +54 -32
- package/dist/circuits/circuit-builder.d.mts +10 -14
- package/dist/circuits/circuit-builder.mjs +16 -320
- package/dist/circuits/circuit-divider-activity-plan.mjs +101 -0
- package/dist/circuits/circuit-lab.d.mts +7 -1
- package/dist/circuits/circuit-lab.mjs +113 -125
- package/dist/circuits/cmos-gate/activity-plans.mjs +309 -0
- package/dist/circuits/cmos-gate/index.d.mts +4 -1
- package/dist/circuits/cmos-gate/inverter.d.mts +25 -0
- package/dist/circuits/cmos-gate/inverter.mjs +274 -0
- package/dist/circuits/cmos-gate/model.mjs +186 -0
- package/dist/circuits/cmos-gate/nand.d.mts +23 -0
- package/dist/circuits/cmos-gate/nand.mjs +288 -0
- package/dist/circuits/cmos-gate/nor.d.mts +23 -0
- package/dist/circuits/cmos-gate/nor.mjs +323 -0
- package/dist/circuits/cmos-gate/preset.d.mts +4 -75
- package/dist/circuits/cmos-gate/rnmos-not.d.mts +26 -0
- package/dist/circuits/cmos-gate/rnmos-not.mjs +264 -0
- package/dist/circuits/cmos-gate/shared.mjs +6 -0
- package/dist/circuits/diode/activity-plan.mjs +97 -0
- package/dist/circuits/diode/preset.d.mts +2 -1
- package/dist/circuits/diode/preset.mjs +140 -99
- package/dist/circuits/index.d.mts +10 -2
- package/dist/circuits/index.mjs +10 -2
- package/dist/circuits/rc-charging/activity-plan.mjs +101 -0
- package/dist/circuits/rc-charging/preset.d.mts +2 -1
- package/dist/circuits/rc-charging/preset.mjs +159 -114
- package/dist/circuits/semiconductor/bjt-inside.d.mts +23 -0
- package/dist/circuits/semiconductor/bjt-inside.mjs +303 -0
- package/dist/circuits/semiconductor/conduction.d.mts +19 -0
- package/dist/circuits/semiconductor/conduction.mjs +203 -0
- package/dist/circuits/semiconductor/device-activity-plans.mjs +230 -0
- package/dist/circuits/semiconductor/hall-effect.d.mts +19 -0
- package/dist/circuits/semiconductor/hall-effect.mjs +250 -0
- package/dist/circuits/semiconductor/index.d.mts +6 -1
- package/dist/circuits/semiconductor/mosfet-inside.d.mts +26 -0
- package/dist/circuits/semiconductor/mosfet-inside.mjs +452 -0
- package/dist/circuits/semiconductor/pn-junction.d.mts +25 -0
- package/dist/circuits/semiconductor/pn-junction.mjs +333 -0
- package/dist/circuits/semiconductor/preset.d.mts +6 -102
- package/dist/circuits/semiconductor/shared.mjs +183 -0
- package/dist/circuits/semiconductor/silicon-lattice.d.mts +32 -0
- package/dist/circuits/semiconductor/silicon-lattice.mjs +266 -0
- package/dist/circuits/semiconductor/transport-activity-plans.mjs +251 -0
- package/dist/circuits/transistor/activity-plan.mjs +90 -0
- package/dist/circuits/transistor/preset.d.mts +2 -1
- package/dist/circuits/transistor/preset.mjs +168 -145
- package/dist/commerce/accounting/equation-balance.mjs +183 -75
- package/dist/commerce/accounting/journal-poster.mjs +290 -258
- package/dist/commerce/accounting/statement-sorter.mjs +230 -171
- package/dist/commerce/activity.d.mts +58 -0
- package/dist/commerce/activity.mjs +64 -0
- package/dist/commerce/economics/demand-shift-vs-move.mjs +210 -89
- package/dist/commerce/economics/elasticity-revenue.mjs +190 -64
- package/dist/commerce/economics/market-equilibrium.mjs +222 -68
- package/dist/commerce/finance/apportion.d.mts +35 -0
- package/dist/commerce/finance/apportion.mjs +231 -0
- package/dist/commerce/finance/break-even.d.mts +28 -0
- package/dist/commerce/finance/break-even.mjs +385 -0
- package/dist/commerce/finance/business-lesson.d.mts +49 -0
- package/dist/commerce/finance/business-lesson.mjs +388 -0
- package/dist/commerce/finance/compound-interest.d.mts +35 -0
- package/dist/commerce/finance/compound-interest.mjs +515 -0
- package/dist/commerce/finance/depreciation.d.mts +30 -0
- package/dist/commerce/finance/depreciation.mjs +324 -0
- package/dist/commerce/finance/eoq.d.mts +27 -0
- package/dist/commerce/finance/eoq.mjs +266 -0
- package/dist/commerce/finance/index.d.mts +12 -0
- package/dist/commerce/finance/inventory-policy.d.mts +35 -0
- package/dist/commerce/finance/inventory-policy.mjs +56 -0
- package/dist/commerce/finance/limited-company.d.mts +25 -0
- package/dist/commerce/finance/limited-company.mjs +423 -0
- package/dist/commerce/finance/ratio-lab.d.mts +37 -0
- package/dist/commerce/finance/ratio-lab.mjs +339 -0
- package/dist/commerce/finance/statement-builder.d.mts +37 -0
- package/dist/commerce/finance/statement-builder.mjs +303 -0
- package/dist/commerce/finance/supply-chain.d.mts +37 -0
- package/dist/commerce/finance/supply-chain.mjs +341 -0
- package/dist/commerce/finance/warehouse-allocation.d.mts +27 -0
- package/dist/commerce/finance/warehouse-allocation.mjs +49 -0
- package/dist/commerce/index.d.mts +14 -1
- package/dist/commerce/index.mjs +14 -1
- package/dist/core/index.d.mts +1 -1
- package/dist/core/util.d.mts +0 -4
- package/dist/core/util.mjs +6 -13
- package/dist/discrete/arrangements/preset.mjs +135 -119
- package/dist/discrete/bayes/preset.mjs +283 -249
- package/dist/discrete/binomial/preset.mjs +133 -107
- package/dist/discrete/combination-studio/figure.mjs +20 -53
- package/dist/discrete/combination-studio/preset.mjs +109 -168
- package/dist/discrete/core/combinatorics.d.mts +5 -2
- package/dist/discrete/core/combinatorics.mjs +7 -2
- package/dist/discrete/counting-slots/preset.mjs +185 -223
- package/dist/discrete/counting-tree/preset.mjs +146 -66
- package/dist/discrete/expected-value/preset.mjs +153 -235
- package/dist/discrete/hypergeometric/preset.mjs +142 -109
- package/dist/discrete/index.d.mts +12 -4
- package/dist/discrete/index.mjs +9 -3
- package/dist/discrete/induction/core.mjs +17 -0
- package/dist/discrete/induction/index.d.mts +1 -0
- package/dist/discrete/induction/preset.d.mts +17 -0
- package/dist/discrete/induction/preset.mjs +112 -0
- package/dist/discrete/invariant/core.d.mts +8 -0
- package/dist/discrete/invariant/core.mjs +17 -0
- package/dist/discrete/invariant/index.d.mts +2 -0
- package/dist/discrete/invariant/preset.d.mts +22 -0
- package/dist/discrete/invariant/preset.mjs +159 -0
- package/dist/discrete/karnaugh/preset.mjs +185 -139
- package/dist/discrete/lln/asset.mjs +2 -2
- package/dist/discrete/lln/preset.mjs +151 -55
- package/dist/discrete/modular-clock/core.mjs +14 -0
- package/dist/discrete/modular-clock/index.d.mts +1 -0
- package/dist/discrete/modular-clock/preset.d.mts +21 -0
- package/dist/discrete/modular-clock/preset.mjs +192 -0
- package/dist/discrete/monte-carlo/preset.mjs +178 -97
- package/dist/discrete/monty-hall/preset.mjs +199 -219
- package/dist/discrete/outcome-builder/preset.mjs +153 -128
- package/dist/discrete/pascal/preset.mjs +141 -136
- package/dist/discrete/pigeonhole/index.d.mts +1 -0
- package/dist/discrete/pigeonhole/preset.d.mts +19 -0
- package/dist/discrete/pigeonhole/preset.mjs +129 -0
- package/dist/discrete/proof/core.d.mts +74 -0
- package/dist/discrete/proof/core.mjs +44 -0
- package/dist/discrete/proof-builder/index.d.mts +1 -0
- package/dist/discrete/proof-builder/preset.d.mts +18 -0
- package/dist/discrete/proof-builder/preset.mjs +238 -0
- package/dist/discrete/recurrence/core.mjs +18 -0
- package/dist/discrete/recurrence/index.d.mts +1 -0
- package/dist/discrete/recurrence/preset.d.mts +19 -0
- package/dist/discrete/recurrence/preset.mjs +118 -0
- package/dist/discrete/rule-figures.mjs +114 -0
- package/dist/discrete/rules.mjs +100 -0
- package/dist/discrete/sample-space/preset.mjs +156 -125
- package/dist/discrete/selection/preset.mjs +153 -176
- package/dist/discrete/statement-logic/core.d.mts +41 -0
- package/dist/discrete/statement-logic/core.mjs +53 -0
- package/dist/discrete/statement-logic/index.d.mts +2 -0
- package/dist/discrete/statement-logic/preset.d.mts +42 -0
- package/dist/discrete/statement-logic/preset.mjs +245 -0
- package/dist/discrete/truth-table/preset.mjs +134 -138
- package/dist/discrete/venn/preset.mjs +153 -144
- package/dist/discrete/visuals/reasoning-scenes.mjs +236 -0
- package/dist/domains/accounting/apportion/manifest.mjs +56 -0
- package/dist/domains/accounting/apportion/runtime.mjs +5 -0
- package/dist/domains/accounting/break-even/manifest.mjs +55 -0
- package/dist/domains/accounting/break-even/runtime.mjs +5 -0
- package/dist/domains/accounting/business-lesson/manifest.mjs +54 -0
- package/dist/domains/accounting/business-lesson/runtime.mjs +5 -0
- package/dist/domains/accounting/business-lesson/schema.mjs +97 -0
- package/dist/domains/accounting/compound-interest/manifest.mjs +58 -0
- package/dist/domains/accounting/compound-interest/runtime.mjs +5 -0
- package/dist/domains/accounting/depreciation/manifest.mjs +60 -0
- package/dist/domains/accounting/depreciation/runtime.mjs +5 -0
- package/dist/domains/accounting/eoq/manifest.mjs +57 -0
- package/dist/domains/accounting/eoq/runtime.mjs +5 -0
- package/dist/domains/accounting/equation-balance/authoring.mjs +159 -0
- package/dist/domains/accounting/equation-balance/manifest.mjs +77 -0
- package/dist/domains/accounting/equation-balance/runtime.mjs +20 -0
- package/dist/domains/accounting/journal-poster/manifest.mjs +68 -0
- package/dist/domains/accounting/journal-poster/runtime.mjs +20 -0
- package/dist/domains/accounting/limited-company/manifest.mjs +55 -0
- package/dist/domains/accounting/limited-company/runtime.mjs +5 -0
- package/dist/domains/accounting/ratio-lab/manifest.mjs +73 -0
- package/dist/domains/accounting/ratio-lab/runtime.mjs +5 -0
- package/dist/domains/accounting/reorder-point/manifest.mjs +60 -0
- package/dist/domains/accounting/reorder-point/runtime.mjs +5 -0
- package/dist/domains/accounting/shared.mjs +65 -0
- package/dist/domains/accounting/statement-builder/manifest.mjs +57 -0
- package/dist/domains/accounting/statement-builder/runtime.mjs +5 -0
- package/dist/domains/accounting/statement-sorter/manifest.mjs +62 -0
- package/dist/domains/accounting/statement-sorter/runtime.mjs +20 -0
- package/dist/domains/accounting/warehouse-allocation/manifest.mjs +53 -0
- package/dist/domains/accounting/warehouse-allocation/runtime.mjs +5 -0
- package/dist/domains/activity-map.d.mts +9 -0
- package/dist/domains/activity-map.mjs +33 -0
- package/dist/domains/biology/cell-energy/activity.mjs +3 -0
- package/dist/domains/biology/cell-energy/manifest.mjs +65 -0
- package/dist/domains/biology/cell-energy/runtime.mjs +3 -0
- package/dist/domains/biology/cell-system/activity.mjs +3 -0
- package/dist/domains/biology/cell-system/manifest.mjs +81 -0
- package/dist/domains/biology/cell-system/runtime.mjs +3 -0
- package/dist/domains/biology/central-dogma/manifest.mjs +51 -0
- package/dist/domains/biology/central-dogma/runtime.mjs +5 -0
- package/dist/domains/biology/enzyme-rate/manifest.mjs +69 -0
- package/dist/domains/biology/enzyme-rate/runtime.mjs +5 -0
- package/dist/domains/biology/genetic-cross/manifest.mjs +132 -0
- package/dist/domains/biology/genetic-cross/runtime.mjs +24 -0
- package/dist/domains/biology/meiosis-explorer/activity.mjs +3 -0
- package/dist/domains/biology/meiosis-explorer/manifest.mjs +71 -0
- package/dist/domains/biology/meiosis-explorer/runtime.mjs +3 -0
- package/dist/domains/biology/membrane-transport/activity.mjs +3 -0
- package/dist/domains/biology/membrane-transport/manifest.mjs +73 -0
- package/dist/domains/biology/membrane-transport/runtime.mjs +3 -0
- package/dist/domains/biology/mitosis-explorer/activity.mjs +3 -0
- package/dist/domains/biology/mitosis-explorer/manifest.mjs +69 -0
- package/dist/domains/biology/mitosis-explorer/runtime.mjs +3 -0
- package/dist/domains/biology/photosynthesis-factors/manifest.mjs +58 -0
- package/dist/domains/biology/photosynthesis-factors/runtime.mjs +5 -0
- package/dist/domains/biology/punnett-cross/manifest.mjs +72 -0
- package/dist/domains/biology/punnett-cross/runtime.mjs +5 -0
- package/dist/domains/biology/respiration/manifest.mjs +55 -0
- package/dist/domains/biology/respiration/runtime.mjs +5 -0
- package/dist/domains/biology/sequence/manifest.mjs +64 -0
- package/dist/domains/biology/sequence/runtime.mjs +18 -0
- package/dist/domains/biology/sex-linked-cross/manifest.mjs +75 -0
- package/dist/domains/biology/sex-linked-cross/runtime.mjs +5 -0
- package/dist/domains/block-loaders.mjs +22 -0
- package/dist/domains/block-sets/accounting.mjs +37 -0
- package/dist/domains/block-sets/biology.mjs +35 -0
- package/dist/domains/block-sets/chem.mjs +45 -0
- package/dist/domains/block-sets/circuits.mjs +47 -0
- package/dist/domains/block-sets/discrete.mjs +61 -0
- package/dist/domains/block-sets/economics.mjs +15 -0
- package/dist/domains/block-sets/exam.mjs +9 -0
- package/dist/domains/block-sets/geography.mjs +9 -0
- package/dist/domains/block-sets/geometry.mjs +10 -0
- package/dist/domains/block-sets/ict.mjs +59 -0
- package/dist/domains/block-sets/language.mjs +31 -0
- package/dist/domains/block-sets/math.mjs +121 -0
- package/dist/domains/block-sets/ml.mjs +23 -0
- package/dist/domains/block-sets/networking.mjs +25 -0
- package/dist/domains/block-sets/physics.mjs +149 -0
- package/dist/domains/block-sets/statistics.mjs +27 -0
- package/dist/domains/blocks.mjs +11 -0
- package/dist/domains/catalog-map.mjs +6434 -0
- package/dist/domains/catalog.mjs +10 -0
- package/dist/domains/chem/atomic-orbital/activity.mjs +3 -0
- package/dist/domains/chem/atomic-orbital/manifest.mjs +71 -0
- package/dist/domains/chem/atomic-orbital/runtime.mjs +20 -0
- package/dist/domains/chem/battery/manifest.mjs +54 -0
- package/dist/domains/chem/battery/runtime.mjs +15 -0
- package/dist/domains/chem/bohr-atom/manifest.mjs +54 -0
- package/dist/domains/chem/bohr-atom/runtime.mjs +15 -0
- package/dist/domains/chem/crystal-lattice/activity.mjs +3 -0
- package/dist/domains/chem/crystal-lattice/manifest.mjs +68 -0
- package/dist/domains/chem/crystal-lattice/runtime.mjs +20 -0
- package/dist/domains/chem/dilution/manifest.mjs +57 -0
- package/dist/domains/chem/dilution/runtime.mjs +5 -0
- package/dist/domains/chem/electrochem/manifest.mjs +72 -0
- package/dist/domains/chem/electrochem/runtime.mjs +5 -0
- package/dist/domains/chem/gas-box/manifest.mjs +64 -0
- package/dist/domains/chem/gas-box/runtime.mjs +5 -0
- package/dist/domains/chem/kinetics/manifest.mjs +59 -0
- package/dist/domains/chem/kinetics/runtime.mjs +5 -0
- package/dist/domains/chem/le-chatelier/manifest.mjs +57 -0
- package/dist/domains/chem/le-chatelier/runtime.mjs +5 -0
- package/dist/domains/chem/molecular-geometry/activity.mjs +3 -0
- package/dist/domains/chem/molecular-geometry/manifest.mjs +74 -0
- package/dist/domains/chem/molecular-geometry/runtime.mjs +22 -0
- package/dist/domains/chem/orbital-overlap/activity.mjs +3 -0
- package/dist/domains/chem/orbital-overlap/manifest.mjs +60 -0
- package/dist/domains/chem/orbital-overlap/runtime.mjs +18 -0
- package/dist/domains/chem/periodic-trends/manifest.mjs +60 -0
- package/dist/domains/chem/periodic-trends/runtime.mjs +5 -0
- package/dist/domains/chem/reaction-lab/manifest.mjs +55 -0
- package/dist/domains/chem/reaction-lab/runtime.mjs +18 -0
- package/dist/domains/chem/reaction-profile/manifest.mjs +56 -0
- package/dist/domains/chem/reaction-profile/runtime.mjs +17 -0
- package/dist/domains/chem/solution-box/manifest.mjs +57 -0
- package/dist/domains/chem/solution-box/runtime.mjs +5 -0
- package/dist/domains/chem/stereochemistry/activity.mjs +3 -0
- package/dist/domains/chem/stereochemistry/manifest.mjs +65 -0
- package/dist/domains/chem/stereochemistry/runtime.mjs +21 -0
- package/dist/domains/chem/stoichiometry/manifest.mjs +61 -0
- package/dist/domains/chem/stoichiometry/runtime.mjs +5 -0
- package/dist/domains/chem/titration/manifest.mjs +60 -0
- package/dist/domains/chem/titration/runtime.mjs +5 -0
- package/dist/domains/circuits/bjt-inside/manifest.mjs +57 -0
- package/dist/domains/circuits/bjt-inside/runtime.mjs +5 -0
- package/dist/domains/circuits/brownout/manifest.mjs +59 -0
- package/dist/domains/circuits/brownout/runtime.mjs +5 -0
- package/dist/domains/circuits/capacitor-leak/manifest.mjs +61 -0
- package/dist/domains/circuits/capacitor-leak/runtime.mjs +5 -0
- package/dist/domains/circuits/circuit/manifest.mjs +64 -0
- package/dist/domains/circuits/circuit/runtime.mjs +32 -0
- package/dist/domains/circuits/circuit-builder/authoring.mjs +138 -0
- package/dist/domains/circuits/circuit-builder/manifest.mjs +78 -0
- package/dist/domains/circuits/circuit-builder/runtime.mjs +20 -0
- package/dist/domains/circuits/circuit-builder/shared.mjs +16 -0
- package/dist/domains/circuits/circuit-lab/manifest.mjs +64 -0
- package/dist/domains/circuits/circuit-lab/runtime.mjs +21 -0
- package/dist/domains/circuits/circuit-scene/authoring.mjs +33 -0
- package/dist/domains/circuits/circuit-scene/manifest.mjs +100 -0
- package/dist/domains/circuits/circuit-scene/runtime.mjs +25 -0
- package/dist/domains/circuits/cmos-inverter/manifest.mjs +69 -0
- package/dist/domains/circuits/cmos-inverter/runtime.mjs +5 -0
- package/dist/domains/circuits/cmos-nand/manifest.mjs +60 -0
- package/dist/domains/circuits/cmos-nand/runtime.mjs +5 -0
- package/dist/domains/circuits/cmos-nor/manifest.mjs +60 -0
- package/dist/domains/circuits/cmos-nor/runtime.mjs +5 -0
- package/dist/domains/circuits/conduction/manifest.mjs +57 -0
- package/dist/domains/circuits/conduction/runtime.mjs +5 -0
- package/dist/domains/circuits/diode/manifest.mjs +55 -0
- package/dist/domains/circuits/diode/runtime.mjs +5 -0
- package/dist/domains/circuits/hall-effect/manifest.mjs +51 -0
- package/dist/domains/circuits/hall-effect/runtime.mjs +5 -0
- package/dist/domains/circuits/mosfet-inside/manifest.mjs +58 -0
- package/dist/domains/circuits/mosfet-inside/runtime.mjs +5 -0
- package/dist/domains/circuits/pn-junction/manifest.mjs +57 -0
- package/dist/domains/circuits/pn-junction/runtime.mjs +5 -0
- package/dist/domains/circuits/rc-charging/manifest.mjs +59 -0
- package/dist/domains/circuits/rc-charging/runtime.mjs +5 -0
- package/dist/domains/circuits/rnmos-not/manifest.mjs +62 -0
- package/dist/domains/circuits/rnmos-not/runtime.mjs +5 -0
- package/dist/domains/circuits/silicon-lattice/manifest.mjs +63 -0
- package/dist/domains/circuits/silicon-lattice/runtime.mjs +5 -0
- package/dist/domains/circuits/transistor/manifest.mjs +60 -0
- package/dist/domains/circuits/transistor/runtime.mjs +5 -0
- package/dist/domains/discrete/arrangements/manifest.mjs +53 -0
- package/dist/domains/discrete/arrangements/runtime.mjs +5 -0
- package/dist/domains/discrete/bayes/manifest.mjs +58 -0
- package/dist/domains/discrete/bayes/runtime.mjs +5 -0
- package/dist/domains/discrete/binomial/manifest.mjs +50 -0
- package/dist/domains/discrete/binomial/runtime.mjs +5 -0
- package/dist/domains/discrete/combination-studio/manifest.mjs +72 -0
- package/dist/domains/discrete/combination-studio/runtime.mjs +5 -0
- package/dist/domains/discrete/counting-slots/manifest.mjs +74 -0
- package/dist/domains/discrete/counting-slots/runtime.mjs +5 -0
- package/dist/domains/discrete/counting-tree/manifest.mjs +60 -0
- package/dist/domains/discrete/counting-tree/runtime.mjs +5 -0
- package/dist/domains/discrete/expected-value/manifest.mjs +53 -0
- package/dist/domains/discrete/expected-value/runtime.mjs +5 -0
- package/dist/domains/discrete/hypergeometric/manifest.mjs +56 -0
- package/dist/domains/discrete/hypergeometric/runtime.mjs +5 -0
- package/dist/domains/discrete/induction-ladder/manifest.mjs +54 -0
- package/dist/domains/discrete/induction-ladder/runtime.mjs +5 -0
- package/dist/domains/discrete/invariant-detective/manifest.mjs +61 -0
- package/dist/domains/discrete/invariant-detective/runtime.mjs +5 -0
- package/dist/domains/discrete/karnaugh/manifest.mjs +69 -0
- package/dist/domains/discrete/karnaugh/runtime.mjs +5 -0
- package/dist/domains/discrete/lln/manifest.mjs +52 -0
- package/dist/domains/discrete/lln/runtime.mjs +5 -0
- package/dist/domains/discrete/modular-clock/manifest.mjs +58 -0
- package/dist/domains/discrete/modular-clock/runtime.mjs +5 -0
- package/dist/domains/discrete/monte-carlo/manifest.mjs +76 -0
- package/dist/domains/discrete/monte-carlo/runtime.mjs +5 -0
- package/dist/domains/discrete/monty-hall/manifest.mjs +53 -0
- package/dist/domains/discrete/monty-hall/runtime.mjs +5 -0
- package/dist/domains/discrete/outcome-builder/manifest.mjs +53 -0
- package/dist/domains/discrete/outcome-builder/runtime.mjs +5 -0
- package/dist/domains/discrete/pascal/manifest.mjs +57 -0
- package/dist/domains/discrete/pascal/runtime.mjs +5 -0
- package/dist/domains/discrete/pigeonhole-adversary/manifest.mjs +56 -0
- package/dist/domains/discrete/pigeonhole-adversary/runtime.mjs +5 -0
- package/dist/domains/discrete/proof-builder/manifest.mjs +117 -0
- package/dist/domains/discrete/proof-builder/runtime.mjs +5 -0
- package/dist/domains/discrete/recurrence-builder/manifest.mjs +55 -0
- package/dist/domains/discrete/recurrence-builder/runtime.mjs +5 -0
- package/dist/domains/discrete/rule-card/builtins.mjs +17 -0
- package/dist/domains/discrete/rule-card/manifest.mjs +81 -0
- package/dist/domains/discrete/rule-card/presets.mjs +23 -0
- package/dist/domains/discrete/rule-card/runtime.mjs +28 -0
- package/dist/domains/discrete/sample-space/manifest.mjs +77 -0
- package/dist/domains/discrete/sample-space/runtime.mjs +5 -0
- package/dist/domains/discrete/selection/manifest.mjs +55 -0
- package/dist/domains/discrete/selection/runtime.mjs +5 -0
- package/dist/domains/discrete/statement-logic/manifest.mjs +106 -0
- package/dist/domains/discrete/statement-logic/runtime.mjs +5 -0
- package/dist/domains/discrete/truth-table/manifest.mjs +57 -0
- package/dist/domains/discrete/truth-table/runtime.mjs +5 -0
- package/dist/domains/discrete/venn/manifest.mjs +73 -0
- package/dist/domains/discrete/venn/runtime.mjs +5 -0
- package/dist/domains/economics/demand-shift-vs-move/manifest.mjs +47 -0
- package/dist/domains/economics/demand-shift-vs-move/runtime.mjs +5 -0
- package/dist/domains/economics/elasticity-revenue/manifest.mjs +60 -0
- package/dist/domains/economics/elasticity-revenue/runtime.mjs +24 -0
- package/dist/domains/economics/market-equilibrium/manifest.mjs +53 -0
- package/dist/domains/economics/market-equilibrium/runtime.mjs +28 -0
- package/dist/domains/exam/exam-question/manifest.mjs +96 -0
- package/dist/domains/exam/exam-question/runtime.mjs +5 -0
- package/dist/domains/geography/cycle/manifest.mjs +135 -0
- package/dist/domains/geography/cycle/runtime.mjs +26 -0
- package/dist/domains/geometry/geometry-board/authoring.mjs +33 -0
- package/dist/domains/geometry/geometry-board/manifest.mjs +135 -0
- package/dist/domains/geometry/geometry-board/runtime.mjs +16 -0
- package/dist/domains/geometry/geometry-board/scene.mjs +62 -0
- package/dist/domains/geometry/intersecting-circles/manifest.mjs +55 -0
- package/dist/domains/geometry/intersecting-circles/runtime.mjs +16 -0
- package/dist/domains/ict/array-vs-list/manifest.mjs +75 -0
- package/dist/domains/ict/array-vs-list/runtime.mjs +5 -0
- package/dist/domains/ict/base-odometer/manifest.mjs +72 -0
- package/dist/domains/ict/base-odometer/runtime.mjs +5 -0
- package/dist/domains/ict/binary-counter/manifest.mjs +65 -0
- package/dist/domains/ict/binary-counter/runtime.mjs +235 -0
- package/dist/domains/ict/binary-display/manifest.mjs +59 -0
- package/dist/domains/ict/binary-display/runtime.mjs +5 -0
- package/dist/domains/ict/binary-search/manifest.mjs +70 -0
- package/dist/domains/ict/binary-search/runtime.mjs +5 -0
- package/dist/domains/ict/bit-grouper/manifest.mjs +59 -0
- package/dist/domains/ict/bit-grouper/runtime.mjs +5 -0
- package/dist/domains/ict/complexity-growth/manifest.mjs +69 -0
- package/dist/domains/ict/complexity-growth/runtime.mjs +5 -0
- package/dist/domains/ict/cost-derivation/manifest.mjs +56 -0
- package/dist/domains/ict/cost-derivation/runtime.mjs +12 -0
- package/dist/domains/ict/graph-algorithm/authoring.mjs +246 -0
- package/dist/domains/ict/graph-algorithm/manifest.mjs +87 -0
- package/dist/domains/ict/graph-algorithm/runtime.mjs +5 -0
- package/dist/domains/ict/grid-path-dp/authoring.mjs +75 -0
- package/dist/domains/ict/grid-path-dp/manifest.mjs +66 -0
- package/dist/domains/ict/grid-path-dp/runtime.mjs +5 -0
- package/dist/domains/ict/hash-table/manifest.mjs +68 -0
- package/dist/domains/ict/hash-table/runtime.mjs +5 -0
- package/dist/domains/ict/heap-quest/authoring.mjs +123 -0
- package/dist/domains/ict/heap-quest/manifest.mjs +76 -0
- package/dist/domains/ict/heap-quest/runtime.mjs +5 -0
- package/dist/domains/ict/jk-flip-flop/manifest.mjs +65 -0
- package/dist/domains/ict/jk-flip-flop/runtime.mjs +273 -0
- package/dist/domains/ict/latch-vs-flip-flop/manifest.mjs +61 -0
- package/dist/domains/ict/latch-vs-flip-flop/runtime.mjs +227 -0
- package/dist/domains/ict/logic-builder/manifest.mjs +67 -0
- package/dist/domains/ict/logic-builder/runtime.mjs +17 -0
- package/dist/domains/ict/logic-circuit/manifest.mjs +79 -0
- package/dist/domains/ict/logic-circuit/runtime.mjs +25 -0
- package/dist/domains/ict/logic-gate/manifest.mjs +71 -0
- package/dist/domains/ict/logic-gate/runtime.mjs +5 -0
- package/dist/domains/ict/place-value-dial/manifest.mjs +60 -0
- package/dist/domains/ict/place-value-dial/runtime.mjs +5 -0
- package/dist/domains/ict/sequence-detector/manifest.mjs +68 -0
- package/dist/domains/ict/sequence-detector/runtime.mjs +328 -0
- package/dist/domains/ict/shift-register/manifest.mjs +65 -0
- package/dist/domains/ict/shift-register/runtime.mjs +199 -0
- package/dist/domains/ict/sorting-quest/manifest.mjs +76 -0
- package/dist/domains/ict/sorting-quest/runtime.mjs +5 -0
- package/dist/domains/ict/sr-latch/manifest.mjs +65 -0
- package/dist/domains/ict/sr-latch/runtime.mjs +253 -0
- package/dist/domains/ict/tree-quest/authoring.mjs +265 -0
- package/dist/domains/ict/tree-quest/manifest.mjs +90 -0
- package/dist/domains/ict/tree-quest/runtime.mjs +5 -0
- package/dist/domains/ict/twos-complement/manifest.mjs +71 -0
- package/dist/domains/ict/twos-complement/runtime.mjs +276 -0
- package/dist/domains/ict/wire-a-chip/manifest.mjs +72 -0
- package/dist/domains/ict/wire-a-chip/runtime.mjs +287 -0
- package/dist/domains/language/agreement/authoring.mjs +75 -0
- package/dist/domains/language/agreement/manifest.mjs +61 -0
- package/dist/domains/language/agreement/runtime.mjs +20 -0
- package/dist/domains/language/article-lens/authoring.mjs +86 -0
- package/dist/domains/language/article-lens/manifest.mjs +61 -0
- package/dist/domains/language/article-lens/runtime.mjs +20 -0
- package/dist/domains/language/cloze/authoring.mjs +69 -0
- package/dist/domains/language/cloze/manifest.mjs +61 -0
- package/dist/domains/language/cloze/runtime.mjs +20 -0
- package/dist/domains/language/dictation/authoring.mjs +66 -0
- package/dist/domains/language/dictation/manifest.mjs +62 -0
- package/dist/domains/language/dictation/runtime.mjs +19 -0
- package/dist/domains/language/error-correct/authoring.mjs +45 -0
- package/dist/domains/language/error-correct/manifest.mjs +60 -0
- package/dist/domains/language/error-correct/runtime.mjs +19 -0
- package/dist/domains/language/listening/authoring.mjs +83 -0
- package/dist/domains/language/listening/manifest.mjs +67 -0
- package/dist/domains/language/listening/runtime.mjs +20 -0
- package/dist/domains/language/preposition/authoring.mjs +99 -0
- package/dist/domains/language/preposition/manifest.mjs +61 -0
- package/dist/domains/language/preposition/runtime.mjs +20 -0
- package/dist/domains/language/reading/authoring.mjs +87 -0
- package/dist/domains/language/reading/manifest.mjs +62 -0
- package/dist/domains/language/reading/runtime.mjs +22 -0
- package/dist/domains/language/sentence-builder/authoring.mjs +74 -0
- package/dist/domains/language/sentence-builder/manifest.mjs +63 -0
- package/dist/domains/language/sentence-builder/runtime.mjs +22 -0
- package/dist/domains/language/shared.mjs +311 -0
- package/dist/domains/language/transform/authoring.mjs +89 -0
- package/dist/domains/language/transform/manifest.mjs +65 -0
- package/dist/domains/language/transform/runtime.mjs +23 -0
- package/dist/domains/language/word-match/authoring.mjs +83 -0
- package/dist/domains/language/word-match/manifest.mjs +59 -0
- package/dist/domains/language/word-match/runtime.mjs +21 -0
- package/dist/domains/manifests.mjs +573 -0
- package/dist/domains/math/area-model/manifest.mjs +57 -0
- package/dist/domains/math/area-model/runtime.mjs +17 -0
- package/dist/domains/math/area-rearrange/manifest.mjs +65 -0
- package/dist/domains/math/area-rearrange/runtime.mjs +12 -0
- package/dist/domains/math/authoring-kit.mjs +340 -0
- package/dist/domains/math/balance-algebra/manifest.mjs +58 -0
- package/dist/domains/math/balance-algebra/runtime.mjs +18 -0
- package/dist/domains/math/bearings/manifest.mjs +65 -0
- package/dist/domains/math/bearings/runtime.mjs +12 -0
- package/dist/domains/math/broken-tree/manifest.mjs +59 -0
- package/dist/domains/math/broken-tree/runtime.mjs +12 -0
- package/dist/domains/math/calculus-authoring.mjs +127 -0
- package/dist/domains/math/circle-geometry/authoring.mjs +55 -0
- package/dist/domains/math/circle-geometry/manifest.mjs +65 -0
- package/dist/domains/math/circle-geometry/runtime.mjs +5 -0
- package/dist/domains/math/complex-plane/manifest.mjs +64 -0
- package/dist/domains/math/complex-plane/runtime.mjs +5 -0
- package/dist/domains/math/conic/authoring.mjs +84 -0
- package/dist/domains/math/conic/manifest.mjs +67 -0
- package/dist/domains/math/conic/runtime.mjs +5 -0
- package/dist/domains/math/custom-scene/authoring.mjs +34 -0
- package/dist/domains/math/custom-scene/manifest.mjs +72 -0
- package/dist/domains/math/custom-scene/runtime.mjs +29 -0
- package/dist/domains/math/custom-scene/shared.mjs +51 -0
- package/dist/domains/math/derivation/authoring.mjs +65 -0
- package/dist/domains/math/derivation/manifest.mjs +61 -0
- package/dist/domains/math/derivation/runtime.mjs +19 -0
- package/dist/domains/math/derivative-explorer/authoring.mjs +15 -0
- package/dist/domains/math/derivative-explorer/manifest.mjs +54 -0
- package/dist/domains/math/derivative-explorer/runtime.mjs +17 -0
- package/dist/domains/math/differential-equation/authoring.mjs +120 -0
- package/dist/domains/math/differential-equation/manifest.mjs +67 -0
- package/dist/domains/math/differential-equation/runtime.mjs +20 -0
- package/dist/domains/math/division-workbench/manifest.mjs +65 -0
- package/dist/domains/math/division-workbench/runtime.mjs +3 -0
- package/dist/domains/math/domain-range/authoring.mjs +87 -0
- package/dist/domains/math/domain-range/manifest.mjs +63 -0
- package/dist/domains/math/domain-range/runtime.mjs +5 -0
- package/dist/domains/math/expression-order/manifest.mjs +77 -0
- package/dist/domains/math/expression-order/runtime.mjs +5 -0
- package/dist/domains/math/fraction-bar/manifest.mjs +61 -0
- package/dist/domains/math/fraction-bar/runtime.mjs +5 -0
- package/dist/domains/math/function-machine/manifest.mjs +73 -0
- package/dist/domains/math/function-machine/runtime.mjs +5 -0
- package/dist/domains/math/fundamental-theorem/authoring.mjs +15 -0
- package/dist/domains/math/fundamental-theorem/manifest.mjs +61 -0
- package/dist/domains/math/fundamental-theorem/runtime.mjs +18 -0
- package/dist/domains/math/geometry-foundations/activity.mjs +3 -0
- package/dist/domains/math/geometry-foundations/manifest.mjs +75 -0
- package/dist/domains/math/geometry-foundations/runtime.mjs +3 -0
- package/dist/domains/math/geometry-transform/manifest.mjs +73 -0
- package/dist/domains/math/geometry-transform/runtime.mjs +41 -0
- package/dist/domains/math/gradient-descent/authoring.mjs +76 -0
- package/dist/domains/math/gradient-descent/manifest.mjs +55 -0
- package/dist/domains/math/gradient-descent/runtime.mjs +18 -0
- package/dist/domains/math/graph/authoring.mjs +156 -0
- package/dist/domains/math/graph/manifest.mjs +62 -0
- package/dist/domains/math/graph/runtime.mjs +20 -0
- package/dist/domains/math/growing-pattern/manifest.mjs +57 -0
- package/dist/domains/math/growing-pattern/runtime.mjs +17 -0
- package/dist/domains/math/harmonic-form/manifest.mjs +53 -0
- package/dist/domains/math/harmonic-form/runtime.mjs +12 -0
- package/dist/domains/math/identity-proof/manifest.mjs +71 -0
- package/dist/domains/math/identity-proof/runtime.mjs +12 -0
- package/dist/domains/math/integral-explorer/authoring.mjs +15 -0
- package/dist/domains/math/integral-explorer/manifest.mjs +56 -0
- package/dist/domains/math/integral-explorer/runtime.mjs +19 -0
- package/dist/domains/math/interactive-problem/authoring.mjs +295 -0
- package/dist/domains/math/interactive-problem/manifest.mjs +65 -0
- package/dist/domains/math/interactive-problem/runtime.mjs +26 -0
- package/dist/domains/math/iteration/manifest.mjs +60 -0
- package/dist/domains/math/iteration/runtime.mjs +12 -0
- package/dist/domains/math/limit-explorer/authoring.mjs +15 -0
- package/dist/domains/math/limit-explorer/manifest.mjs +54 -0
- package/dist/domains/math/limit-explorer/runtime.mjs +17 -0
- package/dist/domains/math/linear-model/manifest.mjs +81 -0
- package/dist/domains/math/linear-model/runtime.mjs +19 -0
- package/dist/domains/math/linear-system/manifest.mjs +57 -0
- package/dist/domains/math/linear-system/runtime.mjs +24 -0
- package/dist/domains/math/lines-in-space/manifest.mjs +74 -0
- package/dist/domains/math/lines-in-space/runtime.mjs +12 -0
- package/dist/domains/math/measurement/activity.mjs +3 -0
- package/dist/domains/math/measurement/manifest.mjs +81 -0
- package/dist/domains/math/measurement/runtime.mjs +3 -0
- package/dist/domains/math/mystery-bucket/manifest.mjs +57 -0
- package/dist/domains/math/mystery-bucket/runtime.mjs +17 -0
- package/dist/domains/math/newton-method/authoring.mjs +72 -0
- package/dist/domains/math/newton-method/manifest.mjs +61 -0
- package/dist/domains/math/newton-method/runtime.mjs +18 -0
- package/dist/domains/math/number-line/manifest.mjs +57 -0
- package/dist/domains/math/number-line/runtime.mjs +17 -0
- package/dist/domains/math/number-structure/manifest.mjs +71 -0
- package/dist/domains/math/number-structure/runtime.mjs +3 -0
- package/dist/domains/math/oblique-triangle/manifest.mjs +67 -0
- package/dist/domains/math/oblique-triangle/runtime.mjs +12 -0
- package/dist/domains/math/partial-fractions/manifest.mjs +71 -0
- package/dist/domains/math/partial-fractions/runtime.mjs +12 -0
- package/dist/domains/math/percent-bar/manifest.mjs +66 -0
- package/dist/domains/math/percent-bar/runtime.mjs +5 -0
- package/dist/domains/math/phase-portrait/authoring.mjs +132 -0
- package/dist/domains/math/phase-portrait/manifest.mjs +64 -0
- package/dist/domains/math/phase-portrait/runtime.mjs +21 -0
- package/dist/domains/math/polynomial-solver/manifest.mjs +57 -0
- package/dist/domains/math/polynomial-solver/runtime.mjs +5 -0
- package/dist/domains/math/radian-wrap/manifest.mjs +56 -0
- package/dist/domains/math/radian-wrap/runtime.mjs +12 -0
- package/dist/domains/math/rate-machine/manifest.mjs +73 -0
- package/dist/domains/math/rate-machine/runtime.mjs +5 -0
- package/dist/domains/math/ratio-share/manifest.mjs +61 -0
- package/dist/domains/math/ratio-share/runtime.mjs +5 -0
- package/dist/domains/math/receipt-totals/manifest.mjs +63 -0
- package/dist/domains/math/receipt-totals/runtime.mjs +24 -0
- package/dist/domains/math/schemas.mjs +79 -0
- package/dist/domains/math/sequence-predict/manifest.mjs +65 -0
- package/dist/domains/math/sequence-predict/runtime.mjs +5 -0
- package/dist/domains/math/shared.mjs +19 -0
- package/dist/domains/math/slide-rule/manifest.mjs +38 -0
- package/dist/domains/math/slide-rule/runtime.mjs +12 -0
- package/dist/domains/math/solid-net/manifest.mjs +65 -0
- package/dist/domains/math/solid-net/runtime.mjs +12 -0
- package/dist/domains/math/straight-line/authoring.mjs +86 -0
- package/dist/domains/math/straight-line/manifest.mjs +76 -0
- package/dist/domains/math/straight-line/runtime.mjs +5 -0
- package/dist/domains/math/system-solve/manifest.mjs +71 -0
- package/dist/domains/math/system-solve/runtime.mjs +36 -0
- package/dist/domains/math/taylor-series/authoring.mjs +81 -0
- package/dist/domains/math/taylor-series/manifest.mjs +62 -0
- package/dist/domains/math/taylor-series/runtime.mjs +19 -0
- package/dist/domains/math/triangle-trig/authoring.mjs +94 -0
- package/dist/domains/math/triangle-trig/manifest.mjs +75 -0
- package/dist/domains/math/triangle-trig/runtime.mjs +18 -0
- package/dist/domains/math/trig-explorer/manifest.mjs +54 -0
- package/dist/domains/math/trig-explorer/runtime.mjs +16 -0
- package/dist/domains/math/trig-signs/manifest.mjs +57 -0
- package/dist/domains/math/trig-signs/runtime.mjs +5 -0
- package/dist/domains/math/vertex-parabola/manifest.mjs +52 -0
- package/dist/domains/math/vertex-parabola/runtime.mjs +12 -0
- package/dist/domains/ml/activity.mjs +80 -0
- package/dist/domains/ml/classifier-threshold/manifest.mjs +68 -0
- package/dist/{ml/classifier/preset.d.mts β domains/ml/classifier-threshold/runtime.d.mts} +1 -1
- package/dist/{ml/classifier/preset.mjs β domains/ml/classifier-threshold/runtime.mjs} +124 -122
- package/dist/domains/ml/decision-boundary/manifest.mjs +56 -0
- package/dist/{ml/boundary/preset.d.mts β domains/ml/decision-boundary/runtime.d.mts} +1 -1
- package/dist/{ml/boundary/preset.mjs β domains/ml/decision-boundary/runtime.mjs} +137 -77
- package/dist/domains/ml/embedding-space/embedding.mjs +121 -0
- package/dist/domains/ml/embedding-space/manifest.mjs +75 -0
- package/dist/domains/ml/embedding-space/runtime.mjs +366 -0
- package/dist/domains/ml/kmeans/manifest.mjs +78 -0
- package/dist/{ml/kmeans/preset.d.mts β domains/ml/kmeans/runtime.d.mts} +1 -1
- package/dist/{ml/kmeans/preset.mjs β domains/ml/kmeans/runtime.mjs} +84 -49
- package/dist/domains/ml/knn/manifest.mjs +58 -0
- package/dist/{ml/knn/preset.d.mts β domains/ml/knn/runtime.d.mts} +1 -1
- package/dist/{ml/knn/preset.mjs β domains/ml/knn/runtime.mjs} +185 -97
- package/dist/domains/ml/next-token/manifest.mjs +64 -0
- package/dist/domains/ml/next-token/model.mjs +112 -0
- package/dist/domains/ml/next-token/runtime.mjs +271 -0
- package/dist/domains/ml/regression/manifest.mjs +73 -0
- package/dist/{ml/regression/preset.d.mts β domains/ml/regression/runtime.d.mts} +1 -1
- package/dist/{ml/regression/preset.mjs β domains/ml/regression/runtime.mjs} +97 -124
- package/dist/domains/networking/ethernet-pinout/manifest.mjs +66 -0
- package/dist/domains/networking/ethernet-pinout/runtime.mjs +254 -0
- package/dist/domains/networking/layer-encapsulation/manifest.mjs +66 -0
- package/dist/domains/networking/layer-encapsulation/runtime.mjs +281 -0
- package/dist/domains/networking/network-media/manifest.mjs +75 -0
- package/dist/domains/networking/network-media/runtime.mjs +213 -0
- package/dist/domains/networking/packet-journey/manifest.mjs +61 -0
- package/dist/domains/networking/packet-journey/runtime.d.mts +24 -0
- package/dist/domains/networking/packet-journey/runtime.mjs +238 -0
- package/dist/domains/networking/subnet-builder/manifest.mjs +68 -0
- package/dist/domains/networking/subnet-builder/runtime.mjs +249 -0
- package/dist/domains/networking/switch-learning/manifest.mjs +62 -0
- package/dist/domains/networking/switch-learning/runtime.mjs +250 -0
- package/dist/domains/networking/vlan-designer/manifest.mjs +66 -0
- package/dist/domains/networking/vlan-designer/runtime.mjs +276 -0
- package/dist/domains/networking/vpn-tunnel/manifest.mjs +68 -0
- package/dist/domains/networking/vpn-tunnel/runtime.mjs +256 -0
- package/dist/domains/physics/alternating-current/manifest.mjs +67 -0
- package/dist/domains/physics/alternating-current/runtime.mjs +5 -0
- package/dist/domains/physics/atwood/manifest.mjs +50 -0
- package/dist/domains/physics/atwood/runtime.mjs +5 -0
- package/dist/domains/physics/bloch-sphere/activity.mjs +3 -0
- package/dist/domains/physics/bloch-sphere/manifest.mjs +70 -0
- package/dist/domains/physics/bloch-sphere/runtime.mjs +3 -0
- package/dist/domains/physics/bullet-walls/manifest.mjs +52 -0
- package/dist/domains/physics/bullet-walls/runtime.mjs +5 -0
- package/dist/domains/physics/carnot/manifest.mjs +59 -0
- package/dist/domains/physics/carnot/runtime.mjs +5 -0
- package/dist/domains/physics/circular-motion/manifest.mjs +53 -0
- package/dist/domains/physics/circular-motion/runtime.mjs +5 -0
- package/dist/domains/physics/collision-track/manifest.mjs +54 -0
- package/dist/domains/physics/collision-track/runtime.mjs +5 -0
- package/dist/domains/physics/couple-torque/manifest.mjs +57 -0
- package/dist/domains/physics/couple-torque/runtime.mjs +5 -0
- package/dist/domains/physics/doppler/manifest.mjs +49 -0
- package/dist/domains/physics/doppler/runtime.mjs +5 -0
- package/dist/domains/physics/double-slit/activity.mjs +3 -0
- package/dist/domains/physics/double-slit/manifest.mjs +62 -0
- package/dist/domains/physics/double-slit/runtime.mjs +3 -0
- package/dist/domains/physics/efficiency/manifest.mjs +69 -0
- package/dist/domains/physics/efficiency/runtime.mjs +5 -0
- package/dist/domains/physics/electric-field/manifest.mjs +49 -0
- package/dist/domains/physics/electric-field/runtime.mjs +5 -0
- package/dist/domains/physics/electric-flux/manifest.mjs +53 -0
- package/dist/domains/physics/electric-flux/runtime.mjs +5 -0
- package/dist/domains/physics/energy-skate/manifest.mjs +57 -0
- package/dist/domains/physics/energy-skate/runtime.mjs +5 -0
- package/dist/domains/physics/entropy/manifest.mjs +53 -0
- package/dist/domains/physics/entropy/runtime.mjs +5 -0
- package/dist/domains/physics/falling-target/manifest.mjs +65 -0
- package/dist/domains/physics/falling-target/runtime.mjs +12 -0
- package/dist/domains/physics/fission-chain/activity.mjs +3 -0
- package/dist/domains/physics/fission-chain/manifest.mjs +61 -0
- package/dist/domains/physics/fission-chain/runtime.mjs +3 -0
- package/dist/domains/physics/fluid-pressure/manifest.mjs +61 -0
- package/dist/domains/physics/fluid-pressure/runtime.mjs +5 -0
- package/dist/domains/physics/force-pairs/manifest.mjs +60 -0
- package/dist/domains/physics/force-pairs/runtime.mjs +5 -0
- package/dist/domains/physics/gas-process/manifest.mjs +58 -0
- package/dist/domains/physics/gas-process/runtime.mjs +5 -0
- package/dist/domains/physics/gauss-law/manifest.mjs +51 -0
- package/dist/domains/physics/gauss-law/runtime.mjs +5 -0
- package/dist/domains/physics/gravitation/manifest.mjs +52 -0
- package/dist/domains/physics/gravitation/runtime.mjs +5 -0
- package/dist/domains/physics/gravity-drop/manifest.mjs +54 -0
- package/dist/domains/physics/gravity-drop/runtime.mjs +5 -0
- package/dist/domains/physics/heat-transfer/manifest.mjs +59 -0
- package/dist/domains/physics/heat-transfer/runtime.mjs +5 -0
- package/dist/domains/physics/heating-curve/manifest.mjs +61 -0
- package/dist/domains/physics/heating-curve/runtime.mjs +5 -0
- package/dist/domains/physics/impulse/manifest.mjs +52 -0
- package/dist/domains/physics/impulse/runtime.mjs +5 -0
- package/dist/domains/physics/intercept/manifest.mjs +68 -0
- package/dist/domains/physics/intercept/runtime.mjs +12 -0
- package/dist/domains/physics/kepler/manifest.mjs +53 -0
- package/dist/domains/physics/kepler/runtime.mjs +5 -0
- package/dist/domains/physics/length-contraction/activity.mjs +3 -0
- package/dist/domains/physics/length-contraction/manifest.mjs +59 -0
- package/dist/domains/physics/length-contraction/runtime.mjs +3 -0
- package/dist/domains/physics/lens-imaging/manifest.mjs +57 -0
- package/dist/domains/physics/lens-imaging/runtime.mjs +5 -0
- package/dist/domains/physics/lever/manifest.mjs +60 -0
- package/dist/domains/physics/lever/runtime.mjs +24 -0
- package/dist/domains/physics/linear-pursuit/manifest.mjs +74 -0
- package/dist/domains/physics/linear-pursuit/runtime.mjs +12 -0
- package/dist/domains/physics/lorentz/manifest.mjs +52 -0
- package/dist/domains/physics/lorentz/runtime.mjs +5 -0
- package/dist/domains/physics/lorentz-transformation/activity.mjs +3 -0
- package/dist/domains/physics/lorentz-transformation/manifest.mjs +65 -0
- package/dist/domains/physics/lorentz-transformation/runtime.mjs +3 -0
- package/dist/domains/physics/magnetism/manifest.mjs +52 -0
- package/dist/domains/physics/magnetism/runtime.mjs +5 -0
- package/dist/domains/physics/mirror-imaging/manifest.mjs +57 -0
- package/dist/domains/physics/mirror-imaging/runtime.mjs +5 -0
- package/dist/domains/physics/moving-launcher/manifest.mjs +66 -0
- package/dist/domains/physics/moving-launcher/runtime.mjs +12 -0
- package/dist/domains/physics/muon-survival/activity.mjs +3 -0
- package/dist/domains/physics/muon-survival/manifest.mjs +61 -0
- package/dist/domains/physics/muon-survival/runtime.mjs +3 -0
- package/dist/domains/physics/nuclear-binding-energy/activity.mjs +3 -0
- package/dist/domains/physics/nuclear-binding-energy/manifest.mjs +67 -0
- package/dist/domains/physics/nuclear-binding-energy/runtime.mjs +3 -0
- package/dist/domains/physics/optics/manifest.mjs +53 -0
- package/dist/domains/physics/optics/runtime.mjs +5 -0
- package/dist/domains/physics/orbit-lab/manifest.mjs +51 -0
- package/dist/domains/physics/orbit-lab/runtime.mjs +5 -0
- package/dist/domains/physics/photoelectric-effect/activity.mjs +3 -0
- package/dist/domains/physics/photoelectric-effect/manifest.mjs +67 -0
- package/dist/domains/physics/photoelectric-effect/runtime.mjs +3 -0
- package/dist/domains/physics/power/manifest.mjs +58 -0
- package/dist/domains/physics/power/runtime.mjs +5 -0
- package/dist/domains/physics/projectile-lab/core/formulas.mjs +26 -0
- package/dist/domains/physics/projectile-lab/core/model.mjs +43 -0
- package/dist/domains/physics/projectile-lab/manifest.mjs +53 -0
- package/dist/domains/physics/projectile-lab/runtime/index.mjs +239 -0
- package/dist/domains/physics/projectile-lab/runtime/svg.mjs +208 -0
- package/dist/domains/physics/quantum-gates/activity.mjs +3 -0
- package/dist/domains/physics/quantum-gates/manifest.mjs +68 -0
- package/dist/domains/physics/quantum-gates/runtime.mjs +3 -0
- package/dist/domains/physics/rain-relative/manifest.mjs +54 -0
- package/dist/domains/physics/rain-relative/runtime.mjs +5 -0
- package/dist/domains/physics/ramp-forces/manifest.mjs +65 -0
- package/dist/domains/physics/ramp-forces/runtime.mjs +25 -0
- package/dist/domains/physics/refraction/manifest.mjs +60 -0
- package/dist/domains/physics/refraction/runtime.mjs +5 -0
- package/dist/domains/physics/relativity-light-clock/activity.mjs +3 -0
- package/dist/domains/physics/relativity-light-clock/manifest.mjs +67 -0
- package/dist/domains/physics/relativity-light-clock/runtime.mjs +12 -0
- package/dist/domains/physics/relativity-simultaneity/activity.mjs +3 -0
- package/dist/domains/physics/relativity-simultaneity/manifest.mjs +59 -0
- package/dist/domains/physics/relativity-simultaneity/runtime.mjs +3 -0
- package/dist/domains/physics/ripple-tank/manifest.mjs +50 -0
- package/dist/domains/physics/ripple-tank/runtime.mjs +5 -0
- package/dist/domains/physics/river-boat/manifest.mjs +52 -0
- package/dist/domains/physics/river-boat/runtime.mjs +17 -0
- package/dist/domains/physics/shm/manifest.mjs +56 -0
- package/dist/domains/physics/shm/runtime.mjs +5 -0
- package/dist/domains/physics/spatial-lorentz/activity.mjs +3 -0
- package/dist/domains/physics/spatial-lorentz/manifest.mjs +61 -0
- package/dist/domains/physics/spatial-lorentz/runtime.mjs +20 -0
- package/dist/domains/physics/stopping-distance/manifest.mjs +61 -0
- package/dist/domains/physics/stopping-distance/runtime.mjs +5 -0
- package/dist/domains/physics/stress-strain/manifest.mjs +69 -0
- package/dist/domains/physics/stress-strain/runtime.mjs +5 -0
- package/dist/domains/physics/string-reflection/manifest.mjs +55 -0
- package/dist/domains/physics/string-reflection/runtime.mjs +5 -0
- package/dist/domains/physics/temperature-scales/manifest.mjs +57 -0
- package/dist/domains/physics/temperature-scales/runtime.mjs +5 -0
- package/dist/domains/physics/terminal-velocity/manifest.mjs +53 -0
- package/dist/domains/physics/terminal-velocity/runtime.mjs +5 -0
- package/dist/domains/physics/thermal-expansion/manifest.mjs +56 -0
- package/dist/domains/physics/thermal-expansion/runtime.mjs +5 -0
- package/dist/domains/physics/uncertainty-wave-packet/activity.mjs +3 -0
- package/dist/domains/physics/uncertainty-wave-packet/manifest.mjs +58 -0
- package/dist/domains/physics/uncertainty-wave-packet/runtime.mjs +3 -0
- package/dist/domains/physics/vector-board/manifest.mjs +62 -0
- package/dist/domains/physics/vector-board/runtime.mjs +27 -0
- package/dist/domains/physics/vector-types/manifest.mjs +51 -0
- package/dist/domains/physics/vector-types/runtime.mjs +5 -0
- package/dist/domains/physics/venturi/manifest.mjs +56 -0
- package/dist/domains/physics/venturi/runtime.mjs +12 -0
- package/dist/domains/physics/water-density/manifest.mjs +53 -0
- package/dist/domains/physics/water-density/runtime.mjs +5 -0
- package/dist/domains/physics/wave-lab/manifest.mjs +60 -0
- package/dist/domains/physics/wave-lab/runtime.mjs +5 -0
- package/dist/domains/physics/work-energy/manifest.mjs +54 -0
- package/dist/domains/physics/work-energy/runtime.mjs +5 -0
- package/dist/domains/physics/work-potential/manifest.mjs +63 -0
- package/dist/domains/physics/work-potential/runtime.mjs +5 -0
- package/dist/domains/physics/xray-attenuation/activity.mjs +3 -0
- package/dist/domains/physics/xray-attenuation/manifest.mjs +61 -0
- package/dist/domains/physics/xray-attenuation/runtime.mjs +3 -0
- package/dist/domains/physics/xray-tube-spectrum/activity.mjs +3 -0
- package/dist/domains/physics/xray-tube-spectrum/manifest.mjs +61 -0
- package/dist/domains/physics/xray-tube-spectrum/runtime.mjs +3 -0
- package/dist/domains/render-map.mjs +576 -0
- package/dist/domains/render.d.mts +9 -0
- package/dist/domains/render.mjs +23 -0
- package/dist/domains/statistics/center-spread/manifest.mjs +60 -0
- package/dist/domains/statistics/center-spread/runtime.mjs +5 -0
- package/dist/domains/statistics/frequency-density/manifest.mjs +64 -0
- package/dist/domains/statistics/frequency-density/runtime.mjs +12 -0
- package/dist/domains/statistics/galton/manifest.mjs +50 -0
- package/dist/domains/statistics/galton/runtime.mjs +5 -0
- package/dist/domains/statistics/histogram/manifest.mjs +58 -0
- package/dist/domains/statistics/histogram/runtime.mjs +5 -0
- package/dist/domains/statistics/normal/manifest.mjs +56 -0
- package/dist/domains/statistics/normal/runtime.mjs +5 -0
- package/dist/domains/statistics/ogive/manifest.mjs +62 -0
- package/dist/domains/statistics/ogive/runtime.mjs +12 -0
- package/dist/domains/statistics/sampling/manifest.mjs +61 -0
- package/dist/domains/statistics/sampling/runtime.mjs +5 -0
- package/dist/domains/statistics/series/manifest.mjs +55 -0
- package/dist/domains/statistics/series/runtime.mjs +5 -0
- package/dist/domains/statistics/z-table/manifest.mjs +51 -0
- package/dist/domains/statistics/z-table/runtime.mjs +5 -0
- package/dist/exam/exam-question/core.d.mts +90 -0
- package/dist/exam/exam-question/core.mjs +103 -0
- package/dist/exam/exam-question/default-question.d.mts +18 -0
- package/dist/exam/exam-question/default-question.mjs +41 -0
- package/dist/exam/exam-question/index.d.mts +3 -0
- package/dist/exam/exam-question/preset.d.mts +20 -0
- package/dist/exam/exam-question/preset.mjs +198 -0
- package/dist/exam/index.d.mts +4 -0
- package/dist/exam/index.mjs +5 -0
- package/dist/geography/cycle-lab/preset.mjs +216 -101
- package/dist/geometry/board/preset.d.mts +11 -0
- package/dist/geometry/board/preset.mjs +65 -21
- package/dist/geometry/builder.mjs +20 -10
- package/dist/ict/number-systems/base-odometer.d.mts +1 -2
- package/dist/ict/number-systems/base-odometer.mjs +55 -83
- package/dist/ict/number-systems/bit-grouper.d.mts +1 -2
- package/dist/ict/number-systems/bit-grouper.mjs +66 -97
- package/dist/ict/number-systems/place-value-dial.d.mts +1 -2
- package/dist/ict/number-systems/place-value-dial.mjs +67 -82
- package/dist/ict/number-systems/wheel.mjs +12 -38
- package/dist/index.d.mts +1 -1
- package/dist/kit/activity-authoring.d.mts +117 -0
- package/dist/kit/activity-authoring.mjs +56 -0
- package/dist/kit/activity.d.mts +147 -0
- package/dist/kit/activity.mjs +374 -0
- package/dist/kit/annotate.mjs +27 -6
- package/dist/kit/answer-check.mjs +3 -3
- package/dist/kit/authored-activity-runtime.d.mts +92 -0
- package/dist/kit/authored-activity-runtime.mjs +148 -0
- package/dist/kit/authored-response.d.mts +21 -0
- package/dist/kit/authored-response.mjs +200 -0
- package/dist/kit/carrier-engine.mjs +5 -1
- package/dist/kit/celebrate.d.mts +18 -0
- package/dist/kit/celebrate.mjs +79 -0
- package/dist/kit/clue-scene.d.mts +1 -1
- package/dist/kit/clue-scene.mjs +131 -207
- package/dist/kit/controls.mjs +192 -28
- package/dist/kit/coords.d.mts +30 -1
- package/dist/kit/coords.mjs +31 -4
- package/dist/kit/cycle.mjs +86 -5
- package/dist/kit/data-scene.mjs +75 -62
- package/dist/kit/{diagram.mjs β diagram/annotations.mjs} +8 -111
- package/dist/kit/diagram/circuit-box.mjs +75 -0
- package/dist/kit/electronics/_shared.mjs +82 -0
- package/dist/kit/electronics/basics.mjs +323 -0
- package/dist/kit/electronics/icons.mjs +140 -0
- package/dist/kit/electronics/meter.mjs +58 -0
- package/dist/kit/electronics/semiconductor.mjs +195 -0
- package/dist/kit/electronics/signals.mjs +155 -0
- package/dist/kit/electronics/wire.mjs +94 -0
- package/dist/kit/embed.mjs +38 -0
- package/dist/kit/expr-analysis.mjs +3 -2
- package/dist/kit/figure/beam.d.mts +89 -0
- package/dist/kit/figure/beam.mjs +138 -0
- package/dist/kit/figure/body.d.mts +74 -0
- package/dist/kit/figure/body.mjs +102 -0
- package/dist/kit/figure/container.d.mts +88 -0
- package/dist/kit/figure/container.mjs +193 -0
- package/dist/kit/figure/figure.d.mts +62 -0
- package/dist/kit/figure/figure.mjs +99 -0
- package/dist/kit/figure/illustration.d.mts +28 -0
- package/dist/kit/figure/illustration.mjs +31 -0
- package/dist/kit/figure/index.d.mts +7 -0
- package/dist/kit/figure/plot.d.mts +109 -0
- package/dist/kit/figure/plot.mjs +207 -0
- package/dist/kit/figure/text.d.mts +50 -0
- package/dist/kit/figure/text.mjs +44 -0
- package/dist/kit/finance-viz/apportion-bar.d.mts +33 -0
- package/dist/kit/finance-viz/apportion-bar.mjs +99 -0
- package/dist/kit/finance-viz/index.d.mts +4 -0
- package/dist/kit/finance-viz/plot-chart.d.mts +52 -0
- package/dist/kit/finance-viz/plot-chart.mjs +148 -0
- package/dist/kit/finance-viz/stock-timeline.d.mts +33 -0
- package/dist/kit/finance-viz/stock-timeline.mjs +102 -0
- package/dist/kit/finance-viz/tradeoff-curve.d.mts +45 -0
- package/dist/kit/finance-viz/tradeoff-curve.mjs +221 -0
- package/dist/kit/frame.d.mts +38 -40
- package/dist/kit/frame.mjs +138 -120
- package/dist/kit/guide.d.mts +44 -0
- package/dist/kit/guide.mjs +53 -0
- package/dist/kit/index.d.mts +25 -5
- package/dist/kit/index.mjs +23 -3
- package/dist/kit/learning-sequence.d.mts +51 -0
- package/dist/kit/learning-sequence.mjs +101 -0
- package/dist/kit/logic-gates/_shared.mjs +11 -0
- package/dist/kit/{logic-gates.mjs β logic-gates/display.mjs} +5 -133
- package/dist/kit/{logic-gates.d.mts β logic-gates/gate.d.mts} +1 -1
- package/dist/kit/logic-gates/gate.mjs +132 -0
- package/dist/kit/networking/glyphs.mjs +157 -0
- package/dist/kit/palette.mjs +3 -5
- package/dist/kit/pedagogy.d.mts +9 -1
- package/dist/kit/pedagogy.mjs +120 -97
- package/dist/kit/play.mjs +4 -1
- package/dist/kit/predict-gate.d.mts +25 -0
- package/dist/kit/predict-gate.mjs +42 -0
- package/dist/kit/predict.mjs +10 -10
- package/dist/kit/probability.d.mts +55 -0
- package/dist/kit/probability.mjs +115 -1
- package/dist/kit/proportion.mjs +52 -27
- package/dist/kit/receipt.d.mts +2 -2
- package/dist/kit/receipt.mjs +13 -53
- package/dist/kit/rule.d.mts +37 -5
- package/dist/kit/rule.mjs +110 -155
- package/dist/kit/scale.mjs +6 -3
- package/dist/kit/scene-library.mjs +51 -89
- package/dist/kit/scene-studio.mjs +116 -177
- package/dist/kit/scenes.mjs +305 -113
- package/dist/kit/slot-fill.d.mts +6 -1
- package/dist/kit/slot-fill.mjs +86 -71
- package/dist/kit/steps.d.mts +3 -0
- package/dist/kit/steps.mjs +6 -6
- package/dist/kit/thermal.mjs +22 -4
- package/dist/kit/ticks.mjs +19 -0
- package/dist/kit/vessel.mjs +30 -11
- package/dist/lab-def/attrs.d.mts +31 -0
- package/dist/lab-def/attrs.mjs +65 -0
- package/dist/lab-def/define-lab.d.mts +107 -0
- package/dist/lab-def/define-lab.mjs +15 -0
- package/dist/lab-def/lab-authoring.mjs +39 -0
- package/dist/lab-def/lab-runtime.mjs +134 -0
- package/dist/lab-def/to-block.mjs +55 -0
- package/dist/language/activity.d.mts +28 -0
- package/dist/language/activity.mjs +60 -0
- package/dist/language/agreement/preset.d.mts +11 -0
- package/dist/language/agreement/preset.mjs +59 -30
- package/dist/language/article-lens/preset.d.mts +7 -0
- package/dist/language/article-lens/preset.mjs +53 -28
- package/dist/language/cloze/index.d.mts +1 -0
- package/dist/language/cloze/preset.d.mts +36 -0
- package/dist/language/cloze/preset.mjs +128 -0
- package/dist/language/dictation/index.d.mts +1 -0
- package/dist/language/dictation/preset.d.mts +21 -0
- package/dist/language/dictation/preset.mjs +171 -0
- package/dist/language/error-correct/index.d.mts +1 -0
- package/dist/language/error-correct/preset.d.mts +29 -0
- package/dist/language/error-correct/preset.mjs +134 -0
- package/dist/language/icon.mjs +4 -10
- package/dist/language/index.d.mts +8 -2
- package/dist/language/index.mjs +8 -2
- package/dist/language/listening/index.d.mts +1 -0
- package/dist/language/listening/preset.d.mts +25 -0
- package/dist/language/listening/preset.mjs +152 -0
- package/dist/language/preposition-scene/preset.d.mts +11 -0
- package/dist/language/preposition-scene/preset.mjs +79 -69
- package/dist/language/reading/index.d.mts +1 -0
- package/dist/language/reading/preset.d.mts +39 -0
- package/dist/language/reading/preset.mjs +62 -0
- package/dist/language/sentence-builder/preset.d.mts +9 -1
- package/dist/language/sentence-builder/preset.mjs +34 -21
- package/dist/language/transform/preset.d.mts +9 -1
- package/dist/language/transform/preset.mjs +41 -22
- package/dist/language/ui.d.mts +27 -1
- package/dist/language/ui.mjs +48 -8
- package/dist/language/word-match/preset.d.mts +5 -1
- package/dist/language/word-match/preset.mjs +38 -20
- package/dist/logic/ChipScene.d.mts +30 -0
- package/dist/logic/ChipScene.mjs +313 -0
- package/dist/logic/CounterScene.d.mts +19 -0
- package/dist/logic/CounterScene.mjs +228 -0
- package/dist/logic/DetectorScene.d.mts +22 -0
- package/dist/logic/DetectorScene.mjs +233 -0
- package/dist/logic/LatchScene.d.mts +21 -0
- package/dist/logic/LatchScene.mjs +309 -0
- package/dist/logic/LogicBuildLab.mjs +18 -63
- package/dist/logic/LogicEditScene.d.mts +7 -1
- package/dist/logic/LogicEditScene.mjs +26 -18
- package/dist/logic/LogicEditor.d.mts +7 -1
- package/dist/logic/LogicEditor.mjs +165 -227
- package/dist/logic/LogicScene.mjs +74 -18
- package/dist/logic/SequentialLogicLab.d.mts +23 -0
- package/dist/logic/SequentialLogicLab.mjs +179 -0
- package/dist/logic/ShiftScene.d.mts +17 -0
- package/dist/logic/ShiftScene.mjs +170 -0
- package/dist/logic/TimingScene.d.mts +29 -0
- package/dist/logic/TimingScene.mjs +167 -0
- package/dist/logic/TwosScene.d.mts +33 -0
- package/dist/logic/TwosScene.mjs +269 -0
- package/dist/logic/WaveScene.d.mts +43 -0
- package/dist/logic/WaveScene.mjs +124 -0
- package/dist/logic/contract.d.mts +22 -2
- package/dist/logic/counter.d.mts +27 -0
- package/dist/logic/counter.mjs +90 -0
- package/dist/logic/detector.d.mts +72 -0
- package/dist/logic/detector.mjs +93 -0
- package/dist/logic/display.mjs +72 -45
- package/dist/logic/editor/index.d.mts +6 -0
- package/dist/logic/editor/index.mjs +8 -0
- package/dist/logic/evaluate.d.mts +8 -1
- package/dist/logic/evaluate.mjs +108 -31
- package/dist/logic/ic.d.mts +62 -0
- package/dist/logic/ic.mjs +245 -0
- package/dist/logic/index.d.mts +26 -7
- package/dist/logic/index.mjs +20 -1
- package/dist/logic/lab.mjs +62 -84
- package/dist/logic/latch.d.mts +70 -0
- package/dist/logic/latch.mjs +68 -0
- package/dist/logic/netlist.d.mts +27 -0
- package/dist/logic/netlist.mjs +29 -0
- package/dist/logic/runtime/index.d.mts +14 -0
- package/dist/logic/runtime/index.mjs +15 -0
- package/dist/logic/sequential-presets.d.mts +147 -0
- package/dist/logic/sequential-presets.mjs +179 -0
- package/dist/logic/sequential.d.mts +124 -0
- package/dist/logic/sequential.mjs +186 -0
- package/dist/logic/shift.d.mts +33 -0
- package/dist/logic/shift.mjs +76 -0
- package/dist/logic/timing.d.mts +57 -0
- package/dist/logic/timing.mjs +147 -0
- package/dist/logic/twos.d.mts +65 -0
- package/dist/logic/twos.mjs +95 -0
- package/dist/math/activity.mjs +90 -0
- package/dist/math/area-model/asset.mjs +24 -14
- package/dist/math/area-model/preset.mjs +128 -74
- package/dist/math/area-rearrange/core.d.mts +42 -0
- package/dist/math/area-rearrange/core.mjs +188 -0
- package/dist/math/area-rearrange/index.d.mts +2 -0
- package/dist/math/area-rearrange/preset.d.mts +28 -0
- package/dist/math/area-rearrange/preset.mjs +227 -0
- package/dist/math/balance-algebra/preset.mjs +39 -11
- package/dist/math/bearings/core.d.mts +76 -0
- package/dist/math/bearings/core.mjs +85 -0
- package/dist/math/bearings/index.d.mts +2 -0
- package/dist/math/bearings/preset.d.mts +29 -0
- package/dist/math/bearings/preset.mjs +336 -0
- package/dist/math/broken-tree/preset.mjs +87 -52
- package/dist/math/calculus/core.d.mts +30 -0
- package/dist/math/calculus/core.mjs +101 -0
- package/dist/math/calculus/index.d.mts +2 -0
- package/dist/math/calculus/index.mjs +3 -0
- package/dist/math/circle/preset.mjs +46 -28
- package/dist/math/complex/index.d.mts +2 -2
- package/dist/math/complex/preset.mjs +45 -31
- package/dist/math/complex/rule-figures.mjs +328 -0
- package/dist/math/complex/rules.d.mts +11 -1
- package/dist/math/complex/rules.mjs +161 -4
- package/dist/math/conic/preset.mjs +77 -27
- package/dist/math/derivation.d.mts +16 -1
- package/dist/math/derivation.mjs +117 -52
- package/dist/math/derivative-explorer/index.d.mts +2 -1
- package/dist/math/derivative-explorer/index.mjs +3 -0
- package/dist/math/derivative-explorer/preset.mjs +109 -121
- package/dist/math/differential-equation/index.d.mts +2 -0
- package/dist/math/differential-equation/index.mjs +3 -0
- package/dist/math/differential-equation/preset.d.mts +25 -0
- package/dist/math/differential-equation/preset.mjs +274 -0
- package/dist/math/division-workbench/core.d.mts +26 -0
- package/dist/math/division-workbench/core.mjs +53 -0
- package/dist/math/division-workbench/index.d.mts +2 -0
- package/dist/math/division-workbench/preset.d.mts +24 -0
- package/dist/math/division-workbench/preset.mjs +186 -0
- package/dist/math/division-workbench/visuals.mjs +357 -0
- package/dist/math/domain-range/preset.mjs +83 -57
- package/dist/math/expression-order/core.d.mts +23 -0
- package/dist/math/expression-order/core.mjs +130 -0
- package/dist/math/expression-order/index.d.mts +2 -0
- package/dist/math/expression-order/preset.d.mts +35 -0
- package/dist/math/expression-order/preset.mjs +140 -0
- package/dist/math/fraction-bar/preset.mjs +108 -74
- package/dist/math/function-machine/preset.mjs +34 -15
- package/dist/math/fundamental-theorem/index.d.mts +2 -0
- package/dist/math/fundamental-theorem/index.mjs +3 -0
- package/dist/math/fundamental-theorem/preset.d.mts +21 -0
- package/dist/math/fundamental-theorem/preset.mjs +206 -0
- package/dist/math/geometry-foundations/activity.d.mts +1 -0
- package/dist/math/geometry-foundations/activity.mjs +74 -0
- package/dist/math/geometry-foundations/core.d.mts +22 -0
- package/dist/math/geometry-foundations/core.mjs +62 -0
- package/dist/math/geometry-foundations/index.d.mts +2 -0
- package/dist/math/geometry-foundations/preset.d.mts +29 -0
- package/dist/math/geometry-foundations/preset.mjs +310 -0
- package/dist/math/gradient-descent.mjs +94 -113
- package/dist/math/grapher/preset.d.mts +2 -0
- package/dist/math/grapher/preset.mjs +204 -190
- package/dist/math/harmonic-form/preset.mjs +101 -95
- package/dist/math/identity-proof/core.d.mts +86 -0
- package/dist/math/identity-proof/core.mjs +70 -0
- package/dist/math/identity-proof/default-proof.d.mts +14 -0
- package/dist/math/identity-proof/default-proof.mjs +56 -0
- package/dist/math/identity-proof/index.d.mts +3 -0
- package/dist/math/identity-proof/preset.d.mts +20 -0
- package/dist/math/identity-proof/preset.mjs +147 -0
- package/dist/math/index.d.mts +47 -5
- package/dist/math/index.mjs +47 -5
- package/dist/math/integral-explorer/index.d.mts +2 -1
- package/dist/math/integral-explorer/index.mjs +3 -0
- package/dist/math/integral-explorer/preset.mjs +122 -127
- package/dist/math/interactive/preset.mjs +67 -32
- package/dist/math/iteration/core.d.mts +87 -0
- package/dist/math/iteration/core.mjs +135 -0
- package/dist/math/iteration/index.d.mts +2 -0
- package/dist/math/iteration/preset.d.mts +38 -0
- package/dist/math/iteration/preset.mjs +242 -0
- package/dist/math/limit-explorer/index.d.mts +2 -1
- package/dist/math/limit-explorer/index.mjs +3 -0
- package/dist/math/limit-explorer/preset.mjs +69 -91
- package/dist/math/linear-model/preset.mjs +124 -78
- package/dist/math/linear-system/preset.mjs +45 -15
- package/dist/math/lines-in-space/core.d.mts +71 -0
- package/dist/math/lines-in-space/core.mjs +185 -0
- package/dist/math/lines-in-space/index.d.mts +2 -0
- package/dist/math/lines-in-space/preset.d.mts +49 -0
- package/dist/math/lines-in-space/preset.mjs +862 -0
- package/dist/math/measurement/activity.d.mts +1 -0
- package/dist/math/measurement/activity.mjs +74 -0
- package/dist/math/measurement/core.d.mts +27 -0
- package/dist/math/measurement/core.mjs +62 -0
- package/dist/math/measurement/index.d.mts +2 -0
- package/dist/math/measurement/preset.d.mts +39 -0
- package/dist/math/measurement/preset.mjs +666 -0
- package/dist/math/mystery-bucket/preset.mjs +32 -9
- package/dist/math/newton-method/index.d.mts +2 -0
- package/dist/math/newton-method/index.mjs +3 -0
- package/dist/math/newton-method/preset.d.mts +21 -0
- package/dist/math/newton-method/preset.mjs +277 -0
- package/dist/math/number-line/preset.mjs +48 -18
- package/dist/math/number-structure/core.d.mts +42 -0
- package/dist/math/number-structure/core.mjs +130 -0
- package/dist/math/number-structure/index.d.mts +2 -0
- package/dist/math/number-structure/preset.d.mts +28 -0
- package/dist/math/number-structure/preset.mjs +237 -0
- package/dist/math/number-structure/visuals.mjs +485 -0
- package/dist/math/oblique-triangle/core.d.mts +99 -0
- package/dist/math/oblique-triangle/core.mjs +194 -0
- package/dist/math/oblique-triangle/index.d.mts +2 -0
- package/dist/math/oblique-triangle/preset.d.mts +22 -0
- package/dist/math/oblique-triangle/preset.mjs +423 -0
- package/dist/math/ode/core.d.mts +15 -0
- package/dist/math/ode/core.mjs +73 -0
- package/dist/math/ode/index.d.mts +3 -0
- package/dist/math/ode/index.mjs +4 -0
- package/dist/math/ode/system.d.mts +23 -0
- package/dist/math/ode/system.mjs +73 -0
- package/dist/math/optimization/core.d.mts +21 -0
- package/dist/math/optimization/core.mjs +46 -0
- package/dist/math/optimization/index.d.mts +2 -0
- package/dist/math/optimization/index.mjs +3 -0
- package/dist/math/parabola/preset.mjs +54 -15
- package/dist/math/partial-fractions/core.d.mts +69 -0
- package/dist/math/partial-fractions/core.mjs +221 -0
- package/dist/math/partial-fractions/index.d.mts +2 -0
- package/dist/math/partial-fractions/preset.d.mts +44 -0
- package/dist/math/partial-fractions/preset.mjs +267 -0
- package/dist/math/pattern/preset.mjs +69 -86
- package/dist/math/percent-bar/preset.mjs +75 -39
- package/dist/math/phase-portrait/index.d.mts +2 -0
- package/dist/math/phase-portrait/index.mjs +3 -0
- package/dist/math/phase-portrait/preset.d.mts +27 -0
- package/dist/math/phase-portrait/preset.mjs +265 -0
- package/dist/math/poly/core.mjs +1 -1
- package/dist/math/poly/preset.mjs +45 -63
- package/dist/math/poly/steps.mjs +1 -1
- package/dist/math/radian-wrap/core.d.mts +38 -0
- package/dist/math/radian-wrap/core.mjs +58 -0
- package/dist/math/radian-wrap/index.d.mts +2 -0
- package/dist/math/radian-wrap/preset.d.mts +19 -0
- package/dist/math/radian-wrap/preset.mjs +228 -0
- package/dist/math/rate-machine/preset.mjs +160 -109
- package/dist/math/ratio-share/preset.mjs +95 -40
- package/dist/math/receipt/preset.mjs +59 -55
- package/dist/math/root-finding/core.d.mts +18 -0
- package/dist/math/root-finding/core.mjs +75 -0
- package/dist/math/root-finding/index.d.mts +2 -0
- package/dist/math/root-finding/index.mjs +3 -0
- package/dist/math/sequence-predict/preset.mjs +44 -42
- package/dist/math/slide-rule/core.d.mts +39 -0
- package/dist/math/slide-rule/core.mjs +104 -0
- package/dist/math/slide-rule/index.d.mts +2 -0
- package/dist/math/slide-rule/preset.d.mts +24 -0
- package/dist/math/slide-rule/preset.mjs +330 -0
- package/dist/math/solid-net/core.d.mts +48 -0
- package/dist/math/solid-net/core.mjs +177 -0
- package/dist/math/solid-net/index.d.mts +2 -0
- package/dist/math/solid-net/preset.d.mts +28 -0
- package/dist/math/solid-net/preset.mjs +433 -0
- package/dist/math/straight-line/preset.mjs +77 -31
- package/dist/math/system-solve/preset.mjs +86 -104
- package/dist/math/taylor/core.d.mts +8 -0
- package/dist/math/taylor/core.mjs +31 -0
- package/dist/math/taylor/index.d.mts +2 -0
- package/dist/math/taylor/index.mjs +3 -0
- package/dist/math/taylor-series/index.d.mts +2 -0
- package/dist/math/taylor-series/index.mjs +3 -0
- package/dist/math/taylor-series/preset.d.mts +23 -0
- package/dist/math/taylor-series/preset.mjs +243 -0
- package/dist/math/transform/preset.mjs +81 -81
- package/dist/math/triangle-trig/preset.d.mts +10 -0
- package/dist/math/triangle-trig/preset.mjs +97 -55
- package/dist/math/trig/diagrams.mjs +43 -17
- package/dist/math/trig/preset.mjs +55 -25
- package/dist/math/trig/rules.mjs +69 -8
- package/dist/math/trig-explorer.mjs +43 -18
- package/dist/ml/index.d.mts +5 -5
- package/dist/ml/index.mjs +5 -5
- package/dist/networking/EncapScene.mjs +227 -0
- package/dist/networking/MediaScene.mjs +217 -0
- package/dist/networking/NetworkScene.d.mts +22 -0
- package/dist/networking/NetworkScene.mjs +54 -0
- package/dist/networking/PacketInspector.d.mts +11 -0
- package/dist/networking/PacketInspector.mjs +32 -0
- package/dist/networking/PlugScene.mjs +192 -0
- package/dist/networking/SubnetScene.mjs +124 -0
- package/dist/networking/SwitchScene.mjs +339 -0
- package/dist/networking/VlanScene.mjs +203 -0
- package/dist/networking/VpnScene.mjs +193 -0
- package/dist/networking/contract.d.mts +136 -0
- package/dist/networking/encapsulation.mjs +130 -0
- package/dist/networking/index.d.mts +8 -0
- package/dist/networking/index.mjs +8 -0
- package/dist/networking/ip.d.mts +12 -0
- package/dist/networking/ip.mjs +30 -0
- package/dist/networking/media.mjs +183 -0
- package/dist/networking/presets.d.mts +7 -0
- package/dist/networking/presets.mjs +302 -0
- package/dist/networking/simulation.d.mts +8 -0
- package/dist/networking/simulation.mjs +148 -0
- package/dist/networking/subnet.mjs +84 -0
- package/dist/networking/switch.mjs +155 -0
- package/dist/networking/vlan.mjs +100 -0
- package/dist/networking/vpn.mjs +118 -0
- package/dist/pathways/biology.d.mts +6 -0
- package/dist/pathways/biology.mjs +60 -0
- package/dist/pathways/calculus.d.mts +6 -0
- package/dist/pathways/calculus.mjs +123 -0
- package/dist/pathways/chemistry.d.mts +8 -0
- package/dist/pathways/chemistry.mjs +87 -0
- package/dist/pathways/digital-logic.d.mts +21 -0
- package/dist/pathways/digital-logic.mjs +408 -0
- package/dist/pathways/electronic-circuits.d.mts +15 -0
- package/dist/pathways/electronic-circuits.mjs +136 -0
- package/dist/pathways/electronic-devices.d.mts +18 -0
- package/dist/pathways/electronic-devices.mjs +152 -0
- package/dist/pathways/index.d.mts +10 -0
- package/dist/pathways/index.mjs +11 -0
- package/dist/pathways/quantum.d.mts +9 -0
- package/dist/pathways/quantum.mjs +56 -0
- package/dist/pathways/relativity.d.mts +6 -0
- package/dist/pathways/relativity.mjs +63 -0
- package/dist/pathways/types.d.mts +58 -0
- package/dist/pathways/types.mjs +21 -0
- package/dist/physics/alternating-current/core.d.mts +162 -0
- package/dist/physics/alternating-current/core.mjs +155 -0
- package/dist/physics/alternating-current/index.d.mts +2 -0
- package/dist/physics/alternating-current/preset.d.mts +38 -0
- package/dist/physics/alternating-current/preset.mjs +1068 -0
- package/dist/physics/atwood/preset.d.mts +4 -1
- package/dist/physics/atwood/preset.mjs +383 -156
- package/dist/physics/bullet-walls/preset.d.mts +4 -1
- package/dist/physics/bullet-walls/preset.mjs +206 -246
- package/dist/physics/carnot/preset.d.mts +4 -1
- package/dist/physics/carnot/preset.mjs +340 -331
- package/dist/physics/circular-motion/preset.d.mts +4 -1
- package/dist/physics/circular-motion/preset.mjs +185 -148
- package/dist/physics/collision-track/preset.d.mts +4 -1
- package/dist/physics/collision-track/preset.mjs +292 -201
- package/dist/physics/couple-torque/index.d.mts +1 -0
- package/dist/physics/couple-torque/preset.d.mts +30 -0
- package/dist/physics/couple-torque/preset.mjs +614 -0
- package/dist/physics/efficiency/preset.d.mts +7 -1
- package/dist/physics/efficiency/preset.mjs +220 -157
- package/dist/physics/electric-field/preset.d.mts +4 -1
- package/dist/physics/electric-field/preset.mjs +153 -139
- package/dist/physics/electric-flux/preset.d.mts +5 -2
- package/dist/physics/electric-flux/preset.mjs +214 -165
- package/dist/physics/energy-skate/preset.d.mts +4 -1
- package/dist/physics/energy-skate/preset.mjs +168 -106
- package/dist/physics/entropy/preset.d.mts +4 -1
- package/dist/physics/entropy/preset.mjs +139 -148
- package/dist/physics/expansion/preset.d.mts +4 -1
- package/dist/physics/expansion/preset.mjs +187 -155
- package/dist/physics/exponential/asset.mjs +3 -2
- package/dist/physics/exponential/preset.mjs +104 -38
- package/dist/physics/fields/activity.d.mts +1 -0
- package/dist/physics/fields/activity.mjs +86 -0
- package/dist/physics/fields/index.d.mts +3 -0
- package/dist/physics/fields/spatial-activity.d.mts +6 -0
- package/dist/physics/fields/spatial-activity.mjs +89 -0
- package/dist/physics/fields/spatial-core.d.mts +16 -0
- package/dist/physics/fields/spatial-core.mjs +72 -0
- package/dist/physics/fields/spatial-preset.d.mts +42 -0
- package/dist/physics/fields/spatial-preset.mjs +234 -0
- package/dist/physics/fluid-pressure/index.d.mts +1 -0
- package/dist/physics/fluid-pressure/preset.d.mts +56 -0
- package/dist/physics/fluid-pressure/preset.mjs +727 -0
- package/dist/physics/force-pairs/index.d.mts +1 -0
- package/dist/physics/force-pairs/preset.d.mts +31 -0
- package/dist/physics/force-pairs/preset.mjs +833 -0
- package/dist/physics/gas-process/preset.d.mts +4 -1
- package/dist/physics/gas-process/preset.mjs +130 -144
- package/dist/physics/gauss-law/preset.d.mts +5 -2
- package/dist/physics/gauss-law/preset.mjs +159 -115
- package/dist/physics/gravitation/preset.d.mts +4 -1
- package/dist/physics/gravitation/preset.mjs +323 -231
- package/dist/physics/gravity-drop.d.mts +12 -1
- package/dist/physics/gravity-drop.mjs +192 -29
- package/dist/physics/heat-transfer/preset.d.mts +4 -1
- package/dist/physics/heat-transfer/preset.mjs +464 -401
- package/dist/physics/impulse/preset.d.mts +4 -1
- package/dist/physics/impulse/preset.mjs +492 -335
- package/dist/physics/index.d.mts +40 -4
- package/dist/physics/index.mjs +38 -2
- package/dist/physics/intercept/animals.mjs +194 -0
- package/dist/physics/intercept/core.d.mts +22 -0
- package/dist/physics/intercept/core.mjs +147 -0
- package/dist/physics/intercept/index.d.mts +1 -0
- package/dist/physics/intercept/preset.d.mts +41 -0
- package/dist/physics/intercept/preset.mjs +450 -0
- package/dist/physics/kepler/preset.d.mts +4 -1
- package/dist/physics/kepler/preset.mjs +296 -132
- package/dist/physics/lever/preset.d.mts +10 -1
- package/dist/physics/lever/preset.mjs +46 -27
- package/dist/physics/linear-pursuit/core.d.mts +16 -0
- package/dist/physics/linear-pursuit/core.mjs +34 -0
- package/dist/physics/linear-pursuit/index.d.mts +3 -0
- package/dist/physics/linear-pursuit/index.mjs +4 -0
- package/dist/physics/linear-pursuit/preset.d.mts +28 -0
- package/dist/physics/linear-pursuit/preset.mjs +276 -0
- package/dist/physics/linear-pursuit/vehicle.mjs +67 -0
- package/dist/physics/lorentz/core.d.mts +12 -0
- package/dist/physics/lorentz/core.mjs +31 -0
- package/dist/physics/lorentz/index.d.mts +2 -1
- package/dist/physics/lorentz/preset.d.mts +4 -1
- package/dist/physics/lorentz/preset.mjs +145 -194
- package/dist/physics/magnetism/preset.d.mts +4 -1
- package/dist/physics/magnetism/preset.mjs +136 -105
- package/dist/physics/mechanics/activity-plan.mjs +53 -0
- package/dist/physics/mechanics/activity.mjs +32 -0
- package/dist/physics/mechanics/core.d.mts +82 -0
- package/dist/physics/mechanics/core.mjs +155 -0
- package/dist/physics/mechanics/glyphs.mjs +250 -0
- package/dist/physics/mechanics/presentation.mjs +277 -0
- package/dist/physics/modern/constants.d.mts +5 -0
- package/dist/physics/modern/constants.mjs +6 -0
- package/dist/physics/modern/imaging/activity.d.mts +6 -0
- package/dist/physics/modern/imaging/activity.mjs +79 -0
- package/dist/physics/modern/imaging/index.d.mts +7 -0
- package/dist/physics/modern/imaging/preset.d.mts +24 -0
- package/dist/physics/modern/imaging/preset.mjs +126 -0
- package/dist/physics/modern/imaging/spectrum-activity.d.mts +6 -0
- package/dist/physics/modern/imaging/spectrum-activity.mjs +79 -0
- package/dist/physics/modern/imaging/spectrum-preset.d.mts +25 -0
- package/dist/physics/modern/imaging/spectrum-preset.mjs +132 -0
- package/dist/physics/modern/imaging/spectrum-scene.d.mts +13 -0
- package/dist/physics/modern/imaging/spectrum-scene.mjs +277 -0
- package/dist/physics/modern/imaging/xray-core.d.mts +55 -0
- package/dist/physics/modern/imaging/xray-core.mjs +90 -0
- package/dist/physics/modern/imaging/xray-scene.mjs +224 -0
- package/dist/physics/modern/imaging/xray-spectrum-core.d.mts +51 -0
- package/dist/physics/modern/imaging/xray-spectrum-core.mjs +94 -0
- package/dist/physics/modern/index.d.mts +49 -0
- package/dist/physics/modern/index.mjs +50 -0
- package/dist/physics/modern/nuclear/activity.d.mts +6 -0
- package/dist/physics/modern/nuclear/activity.mjs +74 -0
- package/dist/physics/modern/nuclear/core.d.mts +75 -0
- package/dist/physics/modern/nuclear/core.mjs +69 -0
- package/dist/physics/modern/nuclear/fission-activity.d.mts +6 -0
- package/dist/physics/modern/nuclear/fission-activity.mjs +96 -0
- package/dist/physics/modern/nuclear/fission-core.d.mts +49 -0
- package/dist/physics/modern/nuclear/fission-core.mjs +67 -0
- package/dist/physics/modern/nuclear/fission-preset.d.mts +24 -0
- package/dist/physics/modern/nuclear/fission-preset.mjs +132 -0
- package/dist/physics/modern/nuclear/fission-scene.mjs +295 -0
- package/dist/physics/modern/nuclear/index.d.mts +6 -0
- package/dist/physics/modern/nuclear/preset.d.mts +21 -0
- package/dist/physics/modern/nuclear/preset.mjs +176 -0
- package/dist/physics/modern/quantum/activity.d.mts +6 -0
- package/dist/physics/modern/quantum/activity.mjs +74 -0
- package/dist/physics/modern/quantum/bloch-activity.d.mts +6 -0
- package/dist/physics/modern/quantum/bloch-activity.mjs +74 -0
- package/dist/physics/modern/quantum/bloch-preset.d.mts +31 -0
- package/dist/physics/modern/quantum/bloch-preset.mjs +232 -0
- package/dist/physics/modern/quantum/double-slit-activity.d.mts +6 -0
- package/dist/physics/modern/quantum/double-slit-activity.mjs +74 -0
- package/dist/physics/modern/quantum/double-slit-core.d.mts +17 -0
- package/dist/physics/modern/quantum/double-slit-core.mjs +26 -0
- package/dist/physics/modern/quantum/double-slit-preset.d.mts +24 -0
- package/dist/physics/modern/quantum/double-slit-preset.mjs +266 -0
- package/dist/physics/modern/quantum/gates-activity.d.mts +6 -0
- package/dist/physics/modern/quantum/gates-activity.mjs +74 -0
- package/dist/physics/modern/quantum/gates-core.d.mts +19 -0
- package/dist/physics/modern/quantum/gates-core.mjs +51 -0
- package/dist/physics/modern/quantum/gates-preset.d.mts +22 -0
- package/dist/physics/modern/quantum/gates-preset.mjs +102 -0
- package/dist/physics/modern/quantum/index.d.mts +15 -0
- package/dist/physics/modern/quantum/photoelectric-core.d.mts +43 -0
- package/dist/physics/modern/quantum/photoelectric-core.mjs +48 -0
- package/dist/physics/modern/quantum/preset.d.mts +25 -0
- package/dist/physics/modern/quantum/preset.mjs +229 -0
- package/dist/physics/modern/quantum/qubit-core.d.mts +49 -0
- package/dist/physics/modern/quantum/qubit-core.mjs +52 -0
- package/dist/physics/modern/quantum/uncertainty-activity.d.mts +6 -0
- package/dist/physics/modern/quantum/uncertainty-activity.mjs +74 -0
- package/dist/physics/modern/quantum/uncertainty-core.d.mts +11 -0
- package/dist/physics/modern/quantum/uncertainty-core.mjs +19 -0
- package/dist/physics/modern/quantum/uncertainty-preset.d.mts +20 -0
- package/dist/physics/modern/quantum/uncertainty-preset.mjs +157 -0
- package/dist/physics/modern/relativity/activity.d.mts +6 -0
- package/dist/physics/modern/relativity/activity.mjs +80 -0
- package/dist/physics/modern/relativity/core.d.mts +29 -0
- package/dist/physics/modern/relativity/core.mjs +60 -0
- package/dist/physics/modern/relativity/explorer-activity.d.mts +6 -0
- package/dist/physics/modern/relativity/explorer-activity.mjs +74 -0
- package/dist/physics/modern/relativity/explorer-core.d.mts +16 -0
- package/dist/physics/modern/relativity/explorer-core.mjs +21 -0
- package/dist/physics/modern/relativity/explorer-preset.d.mts +21 -0
- package/dist/physics/modern/relativity/explorer-preset.mjs +341 -0
- package/dist/physics/modern/relativity/index.d.mts +18 -0
- package/dist/physics/modern/relativity/length-activity.d.mts +6 -0
- package/dist/physics/modern/relativity/length-activity.mjs +79 -0
- package/dist/physics/modern/relativity/length-core.d.mts +21 -0
- package/dist/physics/modern/relativity/length-core.mjs +33 -0
- package/dist/physics/modern/relativity/length-preset.d.mts +20 -0
- package/dist/physics/modern/relativity/length-preset.mjs +185 -0
- package/dist/physics/modern/relativity/light-clock.d.mts +11 -0
- package/dist/physics/modern/relativity/light-clock.mjs +237 -0
- package/dist/physics/modern/relativity/muon-activity.d.mts +6 -0
- package/dist/physics/modern/relativity/muon-activity.mjs +79 -0
- package/dist/physics/modern/relativity/muon-core.d.mts +39 -0
- package/dist/physics/modern/relativity/muon-core.mjs +66 -0
- package/dist/physics/modern/relativity/muon-preset.d.mts +24 -0
- package/dist/physics/modern/relativity/muon-preset.mjs +120 -0
- package/dist/physics/modern/relativity/muon-scene.d.mts +15 -0
- package/dist/physics/modern/relativity/muon-scene.mjs +144 -0
- package/dist/physics/modern/relativity/preset.d.mts +28 -0
- package/dist/physics/modern/relativity/preset.mjs +132 -0
- package/dist/physics/modern/relativity/scene-primitives.mjs +244 -0
- package/dist/physics/modern/relativity/simultaneity-activity.d.mts +6 -0
- package/dist/physics/modern/relativity/simultaneity-activity.mjs +80 -0
- package/dist/physics/modern/relativity/simultaneity-core.d.mts +21 -0
- package/dist/physics/modern/relativity/simultaneity-core.mjs +33 -0
- package/dist/physics/modern/relativity/simultaneity-preset.d.mts +20 -0
- package/dist/physics/modern/relativity/simultaneity-preset.mjs +319 -0
- package/dist/physics/modern/relativity/spacetime.d.mts +11 -0
- package/dist/physics/modern/relativity/spacetime.mjs +168 -0
- package/dist/physics/modern/shared/experiment-transport.d.mts +38 -0
- package/dist/physics/modern/shared/experiment-transport.mjs +82 -0
- package/dist/physics/modern/shared/index.d.mts +1 -0
- package/dist/physics/optics/activity-plan.mjs +53 -0
- package/dist/physics/optics/activity.mjs +36 -0
- package/dist/physics/optics/asset.mjs +1 -1
- package/dist/physics/optics/core.d.mts +37 -0
- package/dist/physics/optics/core.mjs +67 -0
- package/dist/physics/optics/imaging-activity.mjs +64 -0
- package/dist/physics/optics/index.d.mts +5 -1
- package/dist/physics/optics/lens.d.mts +29 -0
- package/dist/physics/optics/lens.mjs +393 -0
- package/dist/physics/optics/mirror.d.mts +29 -0
- package/dist/physics/optics/mirror.mjs +384 -0
- package/dist/physics/optics/preset.d.mts +10 -1
- package/dist/physics/optics/preset.mjs +47 -26
- package/dist/physics/optics/refraction.d.mts +36 -0
- package/dist/physics/optics/refraction.mjs +422 -0
- package/dist/physics/orbit-lab.d.mts +19 -2
- package/dist/physics/orbit-lab.mjs +314 -172
- package/dist/physics/orbital/core.d.mts +26 -0
- package/dist/physics/orbital/core.mjs +71 -0
- package/dist/physics/power/index.d.mts +1 -0
- package/dist/physics/power/preset.d.mts +37 -0
- package/dist/physics/power/preset.mjs +555 -0
- package/dist/physics/projectiles/core.d.mts +7 -0
- package/dist/physics/projectiles/core.mjs +166 -0
- package/dist/physics/projectiles/falling-target.d.mts +34 -0
- package/dist/physics/projectiles/falling-target.mjs +337 -0
- package/dist/physics/projectiles/glyphs.mjs +269 -0
- package/dist/physics/projectiles/index.d.mts +2 -0
- package/dist/physics/projectiles/moving-launcher.d.mts +44 -0
- package/dist/physics/projectiles/moving-launcher.mjs +481 -0
- package/dist/physics/rain-relative/preset.d.mts +6 -1
- package/dist/physics/rain-relative/preset.mjs +237 -122
- package/dist/physics/ramp-forces/preset.d.mts +4 -1
- package/dist/physics/ramp-forces/preset.mjs +374 -317
- package/dist/physics/river-boat.d.mts +8 -1
- package/dist/physics/river-boat.mjs +194 -76
- package/dist/physics/river-crossing.mjs +101 -0
- package/dist/physics/shm/core.mjs +24 -0
- package/dist/physics/shm/preset.d.mts +4 -1
- package/dist/physics/shm/preset.mjs +491 -246
- package/dist/physics/stopping-distance/preset.d.mts +4 -1
- package/dist/physics/stopping-distance/preset.mjs +276 -175
- package/dist/physics/stress-strain/core.d.mts +132 -0
- package/dist/physics/stress-strain/core.mjs +161 -0
- package/dist/physics/stress-strain/index.d.mts +2 -0
- package/dist/physics/stress-strain/preset.d.mts +41 -0
- package/dist/physics/stress-strain/preset.mjs +683 -0
- package/dist/physics/temperature-scales/index.d.mts +1 -1
- package/dist/physics/temperature-scales/preset.d.mts +15 -2
- package/dist/physics/temperature-scales/preset.mjs +155 -176
- package/dist/physics/terminal-velocity/preset.d.mts +4 -1
- package/dist/physics/terminal-velocity/preset.mjs +314 -248
- package/dist/physics/thermal/activity-plan.mjs +53 -0
- package/dist/physics/thermal/activity.d.mts +44 -0
- package/dist/physics/thermal/activity.mjs +32 -0
- package/dist/physics/thermal/index.d.mts +2 -1
- package/dist/physics/thermal/preset.mjs +461 -272
- package/dist/physics/vector-board/preset.d.mts +24 -3
- package/dist/physics/vector-board/preset.mjs +340 -179
- package/dist/physics/vector-board/view.mjs +3 -16
- package/dist/physics/vector-scene.mjs +52 -28
- package/dist/physics/vector-types/preset.d.mts +8 -1
- package/dist/physics/vector-types/preset.mjs +104 -33
- package/dist/physics/venturi/core.mjs +67 -0
- package/dist/physics/venturi/index.d.mts +1 -0
- package/dist/physics/venturi/preset.d.mts +27 -0
- package/dist/physics/venturi/preset.mjs +339 -0
- package/dist/physics/water-density/preset.d.mts +4 -1
- package/dist/physics/water-density/preset.mjs +163 -175
- package/dist/physics/waves/activity-plan.mjs +62 -0
- package/dist/physics/waves/doppler.d.mts +4 -1
- package/dist/physics/waves/doppler.mjs +83 -88
- package/dist/physics/waves/preset.d.mts +4 -1
- package/dist/physics/waves/preset.mjs +220 -226
- package/dist/physics/waves/ripple.d.mts +4 -1
- package/dist/physics/waves/ripple.mjs +122 -108
- package/dist/physics/waves/string.d.mts +4 -1
- package/dist/physics/waves/string.mjs +100 -125
- package/dist/physics/waves/wave-activity.mjs +58 -0
- package/dist/physics/work-energy/preset.d.mts +4 -1
- package/dist/physics/work-energy/preset.mjs +298 -168
- package/dist/physics/work-potential/preset.d.mts +24 -1
- package/dist/physics/work-potential/preset.mjs +219 -196
- package/dist/schemas/activity-authoring.d.mts +233 -0
- package/dist/schemas/activity-authoring.mjs +316 -0
- package/dist/schemas/index.d.mts +35 -1
- package/dist/schemas/index.mjs +107 -20
- package/dist/shared/fields.mjs +39 -0
- package/dist/statistics/center-spread/preset.mjs +126 -84
- package/dist/statistics/frequency-density/core.d.mts +73 -0
- package/dist/statistics/frequency-density/core.mjs +72 -0
- package/dist/statistics/frequency-density/index.d.mts +2 -0
- package/dist/statistics/frequency-density/preset.d.mts +31 -0
- package/dist/statistics/frequency-density/preset.mjs +181 -0
- package/dist/statistics/galton/preset.mjs +122 -68
- package/dist/statistics/histogram/preset.mjs +178 -76
- package/dist/statistics/index.d.mts +5 -1
- package/dist/statistics/index.mjs +5 -1
- package/dist/statistics/normal/preset.mjs +152 -73
- package/dist/statistics/ogive/core.d.mts +54 -0
- package/dist/statistics/ogive/core.mjs +73 -0
- package/dist/statistics/ogive/index.d.mts +2 -0
- package/dist/statistics/ogive/preset.d.mts +21 -0
- package/dist/statistics/ogive/preset.mjs +242 -0
- package/dist/statistics/sampling/preset.mjs +162 -96
- package/dist/statistics/sequence/preset.mjs +92 -81
- package/dist/statistics/z-table/preset.mjs +169 -131
- package/dist/three/biology/cell-energy.d.mts +15 -0
- package/dist/three/biology/cell-energy.mjs +151 -0
- package/dist/three/biology/cell-system.d.mts +21 -0
- package/dist/three/biology/cell-system.mjs +139 -0
- package/dist/three/biology/cell-world.d.mts +65 -0
- package/dist/three/biology/cell-world.mjs +344 -0
- package/dist/three/biology/index.d.mts +8 -0
- package/dist/three/biology/index.mjs +9 -0
- package/dist/three/biology/meiosis-explorer.d.mts +14 -0
- package/dist/three/biology/meiosis-explorer.mjs +292 -0
- package/dist/three/biology/membrane-transport.d.mts +14 -0
- package/dist/three/biology/membrane-transport.mjs +163 -0
- package/dist/three/biology/mitosis-explorer.d.mts +15 -0
- package/dist/three/biology/mitosis-explorer.mjs +721 -0
- package/dist/three/biology/organelles.d.mts +29 -0
- package/dist/three/biology/organelles.mjs +192 -0
- package/dist/three/chemistry/atomic-orbital.d.mts +9 -0
- package/dist/three/chemistry/atomic-orbital.mjs +120 -0
- package/dist/three/chemistry/crystal-lattice.d.mts +9 -0
- package/dist/three/chemistry/crystal-lattice.mjs +172 -0
- package/dist/three/chemistry/index.d.mts +6 -0
- package/dist/three/chemistry/index.mjs +7 -0
- package/dist/three/chemistry/molecular-geometry.d.mts +9 -0
- package/dist/three/chemistry/molecular-geometry.mjs +205 -0
- package/dist/three/chemistry/orbital-overlap.d.mts +9 -0
- package/dist/three/chemistry/orbital-overlap.mjs +144 -0
- package/dist/three/chemistry/stereochemistry.d.mts +9 -0
- package/dist/three/chemistry/stereochemistry.mjs +150 -0
- package/dist/three/index.d.mts +11 -0
- package/dist/three/index.mjs +12 -0
- package/dist/three/model-asset.d.mts +27 -0
- package/dist/three/model-asset.mjs +63 -0
- package/dist/three/palette.d.mts +12 -0
- package/dist/three/palette.mjs +75 -0
- package/dist/three/physics/bloch-sphere.d.mts +12 -0
- package/dist/three/physics/bloch-sphere.mjs +209 -0
- package/dist/three/physics/index.d.mts +3 -0
- package/dist/three/physics/index.mjs +4 -0
- package/dist/three/physics/spatial-lorentz.d.mts +9 -0
- package/dist/three/physics/spatial-lorentz.mjs +162 -0
- package/dist/three/primitives.d.mts +127 -0
- package/dist/three/primitives.mjs +347 -0
- package/dist/three/surface.d.mts +36 -0
- package/dist/three/surface.mjs +178 -0
- package/package.json +236 -96
- package/styles/commerce.css +826 -0
- package/styles/core.css +3991 -0
- package/styles/domains/algorithms.css +7 -0
- package/styles/domains/biology.css +5 -0
- package/styles/domains/chemistry.css +5 -0
- package/styles/domains/circuits.css +5 -0
- package/styles/domains/discrete.css +10 -0
- package/styles/domains/editor.css +5 -0
- package/styles/domains/ict.css +5 -0
- package/styles/domains/logic.css +6 -0
- package/styles/domains/math.css +10 -0
- package/styles/domains/ml.css +5 -0
- package/styles/domains/parts/algorithms-1.css +521 -0
- package/styles/domains/parts/algorithms-2.css +122 -0
- package/styles/domains/parts/algorithms-3.css +91 -0
- package/styles/domains/parts/biology.css +345 -0
- package/styles/domains/parts/chemistry.css +274 -0
- package/styles/domains/parts/circuits.css +349 -0
- package/styles/domains/parts/discrete-1.css +142 -0
- package/styles/domains/parts/discrete-2.css +172 -0
- package/styles/domains/parts/discrete-3.css +116 -0
- package/styles/domains/parts/discrete-4.css +194 -0
- package/styles/domains/parts/discrete-5.css +111 -0
- package/styles/domains/parts/discrete-6.css +81 -0
- package/styles/domains/parts/editor.css +267 -0
- package/styles/domains/parts/ict.css +242 -0
- package/styles/domains/parts/logic-1.css +286 -0
- package/styles/domains/parts/logic-2.css +208 -0
- package/styles/domains/parts/math-1.css +299 -0
- package/styles/domains/parts/math-2.css +275 -0
- package/styles/domains/parts/math-3.css +299 -0
- package/styles/domains/parts/math-4.css +75 -0
- package/styles/domains/parts/math-5.css +305 -0
- package/styles/domains/parts/math-6.css +115 -0
- package/styles/domains/parts/ml.css +243 -0
- package/styles/domains/parts/physics-1.css +401 -0
- package/styles/domains/parts/physics-2.css +642 -0
- package/styles/domains/parts/physics-3.css +392 -0
- package/styles/domains/parts/probability-1.css +54 -0
- package/styles/domains/parts/probability-2.css +392 -0
- package/styles/domains/parts/probability-3.css +111 -0
- package/styles/domains/parts/shared-1.css +142 -0
- package/styles/domains/parts/shared-2.css +60 -0
- package/styles/domains/parts/statistics.css +250 -0
- package/styles/domains/physics.css +7 -0
- package/styles/domains/probability.css +7 -0
- package/styles/domains/shared.css +3 -0
- package/styles/domains/statistics.css +5 -0
- package/styles/domains.css +47 -0
- package/styles/exam.css +206 -0
- package/styles/figure.css +247 -0
- package/styles/modern-physics.css +155 -0
- package/styles/three.css +299 -0
- package/styles.css +22 -263
- package/dist/blocks/accounting.d.mts +0 -142
- package/dist/blocks/accounting.mjs +0 -446
- package/dist/blocks/biology.d.mts +0 -197
- package/dist/blocks/biology.mjs +0 -513
- package/dist/blocks/chem.d.mts +0 -128
- package/dist/blocks/chem.mjs +0 -486
- package/dist/blocks/circuits.d.mts +0 -375
- package/dist/blocks/circuits.mjs +0 -1213
- package/dist/blocks/discrete.d.mts +0 -90
- package/dist/blocks/discrete.mjs +0 -384
- package/dist/blocks/economics.d.mts +0 -56
- package/dist/blocks/economics.mjs +0 -203
- package/dist/blocks/geography.d.mts +0 -58
- package/dist/blocks/geography.mjs +0 -115
- package/dist/blocks/geometry.d.mts +0 -28
- package/dist/blocks/geometry.mjs +0 -160
- package/dist/blocks/ict.d.mts +0 -154
- package/dist/blocks/ict.mjs +0 -407
- package/dist/blocks/lab-block.d.mts +0 -16
- package/dist/blocks/lab-gallery.d.mts +0 -30
- package/dist/blocks/lab-gallery.mjs +0 -208
- package/dist/blocks/language.d.mts +0 -349
- package/dist/blocks/language.mjs +0 -750
- package/dist/blocks/math.d.mts +0 -977
- package/dist/blocks/math.mjs +0 -3170
- package/dist/blocks/ml.d.mts +0 -128
- package/dist/blocks/ml.mjs +0 -220
- package/dist/blocks/physics.d.mts +0 -264
- package/dist/blocks/physics.mjs +0 -915
- package/dist/blocks/statistics.d.mts +0 -29
- package/dist/blocks/statistics.mjs +0 -123
- package/dist/build/parts.d.mts +0 -1
- package/dist/circuits/cmos-gate/preset.mjs +0 -1491
- package/dist/circuits/semiconductor/preset.mjs +0 -1855
- package/dist/discrete/logic-circuit/index.d.mts +0 -1
- package/dist/discrete/logic-circuit/preset.d.mts +0 -47
- package/dist/discrete/logic-circuit/preset.mjs +0 -307
- package/dist/kit/electronics.mjs +0 -849
- package/dist/ml/boundary/index.d.mts +0 -1
- package/dist/ml/classifier/index.d.mts +0 -1
- package/dist/ml/kmeans/index.d.mts +0 -1
- package/dist/ml/knn/index.d.mts +0 -1
- package/dist/ml/regression/index.d.mts +0 -1
- package/dist/physics/projectile-lab.d.mts +0 -10
- package/dist/physics/projectile-lab.mjs +0 -354
- package/dist/physics/vector-board/view.d.mts +0 -49
package/dist/blocks/math.mjs
DELETED
|
@@ -1,3170 +0,0 @@
|
|
|
1
|
-
import { Grapher } from "../math/grapher/preset.mjs";
|
|
2
|
-
import { DerivativeExplorer } from "../math/derivative-explorer/preset.mjs";
|
|
3
|
-
import { IntegralExplorer } from "../math/integral-explorer/preset.mjs";
|
|
4
|
-
import { LimitExplorer } from "../math/limit-explorer/preset.mjs";
|
|
5
|
-
import { LinearSystemLab } from "../math/linear-system/preset.mjs";
|
|
6
|
-
import { NumberLineLab } from "../math/number-line/preset.mjs";
|
|
7
|
-
import { AreaModelLab } from "../math/area-model/preset.mjs";
|
|
8
|
-
import { GrowingPatternLab } from "../math/pattern/preset.mjs";
|
|
9
|
-
import { MysteryBucketLab } from "../math/mystery-bucket/preset.mjs";
|
|
10
|
-
import { BalanceAlgebraLab } from "../math/balance-algebra/preset.mjs";
|
|
11
|
-
import { VertexParabolaLab } from "../math/parabola/preset.mjs";
|
|
12
|
-
import { FunctionMachineLab } from "../math/function-machine/preset.mjs";
|
|
13
|
-
import { TRIG_FNS, TrigExplorer } from "../math/trig-explorer.mjs";
|
|
14
|
-
import { Derivation } from "../math/derivation.mjs";
|
|
15
|
-
import { GradientDescent } from "../math/gradient-descent.mjs";
|
|
16
|
-
import { InteractiveProblem } from "../math/interactive/preset.mjs";
|
|
17
|
-
import { TriangleTrig } from "../math/triangle-trig/preset.mjs";
|
|
18
|
-
import { StraightLineLab } from "../math/straight-line/preset.mjs";
|
|
19
|
-
import { CircleLab } from "../math/circle/preset.mjs";
|
|
20
|
-
import { ConicLab } from "../math/conic/preset.mjs";
|
|
21
|
-
import { DomainRangeLab } from "../math/domain-range/preset.mjs";
|
|
22
|
-
import { listScenes } from "../kit/scenes.mjs";
|
|
23
|
-
import { LinearModelLab } from "../math/linear-model/preset.mjs";
|
|
24
|
-
import { RateMachineLab } from "../math/rate-machine/preset.mjs";
|
|
25
|
-
import { SequencePredict } from "../math/sequence-predict/preset.mjs";
|
|
26
|
-
import { PercentBarLab } from "../math/percent-bar/preset.mjs";
|
|
27
|
-
import { ComplexPlaneLab } from "../math/complex/preset.mjs";
|
|
28
|
-
import { TrigSignsLab } from "../math/trig/preset.mjs";
|
|
29
|
-
import { FractionBarLab } from "../math/fraction-bar/preset.mjs";
|
|
30
|
-
import { RatioShareLab } from "../math/ratio-share/preset.mjs";
|
|
31
|
-
import { TransformLab } from "../math/transform/preset.mjs";
|
|
32
|
-
import { ReceiptLab } from "../math/receipt/preset.mjs";
|
|
33
|
-
import { listClueScenes } from "../kit/clue-scene.mjs";
|
|
34
|
-
import { SystemSolveLab } from "../math/system-solve/preset.mjs";
|
|
35
|
-
import { PolynomialSolverLab } from "../math/poly/preset.mjs";
|
|
36
|
-
import { registerDataScene } from "../kit/data-scene.mjs";
|
|
37
|
-
import { SceneStudio } from "../kit/scene-studio.mjs";
|
|
38
|
-
import { ChipToggle, ConfigPanel, ConfigRow, NumField, SelectField, SmallButton, TextField } from "./authoring.mjs";
|
|
39
|
-
import { labBlock } from "./lab-block.mjs";
|
|
40
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
41
|
-
import { z } from "zod";
|
|
42
|
-
import { defineBlock } from "@classytic/cms-ui/contract";
|
|
43
|
-
|
|
44
|
-
//#region src/blocks/math.tsx
|
|
45
|
-
const levelSceneOptions = () => ["none", ...listScenes("level").map((s) => s.name)];
|
|
46
|
-
const countSceneOptions = () => listScenes("count").map((s) => s.name);
|
|
47
|
-
const clueSceneOptions = () => listClueScenes().map((s) => s.name);
|
|
48
|
-
const resolveFns = (raw) => Array.isArray(raw) && raw.length ? raw : ["sin", "cos"];
|
|
49
|
-
const TrigExplorerBlock = defineBlock({
|
|
50
|
-
key: "trig-explorer",
|
|
51
|
-
void: true,
|
|
52
|
-
label: "Trig explorer",
|
|
53
|
-
description: "Unit circle β wave, drag the angle; sin & cos trace out. (tan/cot: use Graph)",
|
|
54
|
-
category: "interactive",
|
|
55
|
-
schema: z.object({
|
|
56
|
-
functions: z.array(z.enum(["sin", "cos"])).optional(),
|
|
57
|
-
startDeg: z.number().optional()
|
|
58
|
-
}),
|
|
59
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
60
|
-
const fns = resolveFns(attributes.functions);
|
|
61
|
-
const widget = /* @__PURE__ */ jsx(TrigExplorer, {
|
|
62
|
-
functions: fns,
|
|
63
|
-
startDeg: attributes.startDeg
|
|
64
|
-
});
|
|
65
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
66
|
-
const toggle = (fn) => {
|
|
67
|
-
const next = fns.includes(fn) ? fns.filter((f) => f !== fn) : [...fns, fn];
|
|
68
|
-
updateAttributes({ functions: next.length ? next : fns });
|
|
69
|
-
};
|
|
70
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(ConfigPanel, { children: /* @__PURE__ */ jsx(ConfigRow, {
|
|
71
|
-
label: "Functions",
|
|
72
|
-
children: TRIG_FNS.map((fn) => /* @__PURE__ */ jsx(ChipToggle, {
|
|
73
|
-
active: fns.includes(fn),
|
|
74
|
-
onClick: () => toggle(fn),
|
|
75
|
-
children: fn
|
|
76
|
-
}, fn))
|
|
77
|
-
}) }), widget] });
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
const equationSchema = z.union([z.string(), z.object({
|
|
81
|
-
expr: z.string(),
|
|
82
|
-
color: z.string().optional()
|
|
83
|
-
})]);
|
|
84
|
-
const paramSchema = z.object({
|
|
85
|
-
name: z.string(),
|
|
86
|
-
min: z.number(),
|
|
87
|
-
max: z.number(),
|
|
88
|
-
step: z.number().optional(),
|
|
89
|
-
value: z.number()
|
|
90
|
-
});
|
|
91
|
-
const asExprStrings = (raw) => {
|
|
92
|
-
if (typeof raw === "string") return [raw];
|
|
93
|
-
if (Array.isArray(raw)) return raw.map((e) => typeof e === "string" ? e : String(e?.expr ?? ""));
|
|
94
|
-
return ["sin(x)"];
|
|
95
|
-
};
|
|
96
|
-
const asParams = (raw) => Array.isArray(raw) ? raw : [];
|
|
97
|
-
const GraphBlock = defineBlock({
|
|
98
|
-
key: "graph",
|
|
99
|
-
void: true,
|
|
100
|
-
label: "Graph (equation)",
|
|
101
|
-
description: "Plot equations you type, y = aΒ·sin(bΒ·x), x^2, β¦ with learner sliders.",
|
|
102
|
-
category: "interactive",
|
|
103
|
-
schema: z.object({
|
|
104
|
-
equations: z.array(equationSchema).optional(),
|
|
105
|
-
params: z.array(paramSchema).optional(),
|
|
106
|
-
xRange: z.tuple([z.number(), z.number()]).optional(),
|
|
107
|
-
yScale: z.enum(["linear", "log"]).optional(),
|
|
108
|
-
title: z.string().optional()
|
|
109
|
-
}),
|
|
110
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
111
|
-
const equations = asExprStrings(attributes.equations);
|
|
112
|
-
const params = asParams(attributes.params);
|
|
113
|
-
const xRange = attributes.xRange ?? [-6.5, 6.5];
|
|
114
|
-
const yScale = attributes.yScale === "log" ? "log" : "linear";
|
|
115
|
-
const title = attributes.title ?? "Graph";
|
|
116
|
-
const widget = /* @__PURE__ */ jsx(Grapher, {
|
|
117
|
-
equations,
|
|
118
|
-
params,
|
|
119
|
-
xRange,
|
|
120
|
-
yScale,
|
|
121
|
-
title
|
|
122
|
-
});
|
|
123
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
124
|
-
const setEq = (i, v) => {
|
|
125
|
-
const next = [...equations];
|
|
126
|
-
next[i] = v;
|
|
127
|
-
updateAttributes({ equations: next });
|
|
128
|
-
};
|
|
129
|
-
const setParam = (i, patch) => {
|
|
130
|
-
updateAttributes({ params: params.map((p, j) => j === i ? {
|
|
131
|
-
...p,
|
|
132
|
-
...patch
|
|
133
|
-
} : p) });
|
|
134
|
-
};
|
|
135
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
136
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
137
|
-
label: "Title",
|
|
138
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
139
|
-
value: title,
|
|
140
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
141
|
-
className: "flex-1"
|
|
142
|
-
})
|
|
143
|
-
}),
|
|
144
|
-
/* @__PURE__ */ jsxs("div", {
|
|
145
|
-
className: "space-y-1.5",
|
|
146
|
-
children: [
|
|
147
|
-
/* @__PURE__ */ jsx("span", {
|
|
148
|
-
className: "font-medium text-muted-foreground",
|
|
149
|
-
children: "Equations (use x and your slider names)"
|
|
150
|
-
}),
|
|
151
|
-
equations.map((eq, i) => /* @__PURE__ */ jsxs("div", {
|
|
152
|
-
className: "flex items-center gap-2",
|
|
153
|
-
children: [
|
|
154
|
-
/* @__PURE__ */ jsx("span", {
|
|
155
|
-
className: "font-mono text-muted-foreground",
|
|
156
|
-
children: "y ="
|
|
157
|
-
}),
|
|
158
|
-
/* @__PURE__ */ jsx(TextField, {
|
|
159
|
-
value: eq,
|
|
160
|
-
mono: true,
|
|
161
|
-
placeholder: "a*sin(b*x) + c",
|
|
162
|
-
onChange: (v) => setEq(i, v),
|
|
163
|
-
className: "flex-1"
|
|
164
|
-
}),
|
|
165
|
-
equations.length > 1 && /* @__PURE__ */ jsx(SmallButton, {
|
|
166
|
-
tone: "danger",
|
|
167
|
-
onClick: () => updateAttributes({ equations: equations.filter((_, j) => j !== i) }),
|
|
168
|
-
children: "β"
|
|
169
|
-
})
|
|
170
|
-
]
|
|
171
|
-
}, i)),
|
|
172
|
-
/* @__PURE__ */ jsx(SmallButton, {
|
|
173
|
-
onClick: () => updateAttributes({ equations: [...equations, ""] }),
|
|
174
|
-
children: "+ equation"
|
|
175
|
-
})
|
|
176
|
-
]
|
|
177
|
-
}),
|
|
178
|
-
/* @__PURE__ */ jsxs("div", {
|
|
179
|
-
className: "space-y-1.5",
|
|
180
|
-
children: [
|
|
181
|
-
/* @__PURE__ */ jsx("span", {
|
|
182
|
-
className: "font-medium text-muted-foreground",
|
|
183
|
-
children: "Sliders (learner-draggable)"
|
|
184
|
-
}),
|
|
185
|
-
params.map((p, i) => /* @__PURE__ */ jsxs("div", {
|
|
186
|
-
className: "flex flex-wrap items-center gap-1.5",
|
|
187
|
-
children: [
|
|
188
|
-
/* @__PURE__ */ jsx(TextField, {
|
|
189
|
-
value: p.name,
|
|
190
|
-
mono: true,
|
|
191
|
-
placeholder: "a",
|
|
192
|
-
onChange: (v) => setParam(i, { name: v }),
|
|
193
|
-
className: "w-14"
|
|
194
|
-
}),
|
|
195
|
-
/* @__PURE__ */ jsx("span", {
|
|
196
|
-
className: "text-muted-foreground",
|
|
197
|
-
children: "from"
|
|
198
|
-
}),
|
|
199
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
200
|
-
value: p.min,
|
|
201
|
-
onChange: (v) => setParam(i, { min: v })
|
|
202
|
-
}),
|
|
203
|
-
/* @__PURE__ */ jsx("span", {
|
|
204
|
-
className: "text-muted-foreground",
|
|
205
|
-
children: "to"
|
|
206
|
-
}),
|
|
207
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
208
|
-
value: p.max,
|
|
209
|
-
onChange: (v) => setParam(i, { max: v })
|
|
210
|
-
}),
|
|
211
|
-
/* @__PURE__ */ jsx("span", {
|
|
212
|
-
className: "text-muted-foreground",
|
|
213
|
-
children: "="
|
|
214
|
-
}),
|
|
215
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
216
|
-
value: p.value,
|
|
217
|
-
onChange: (v) => setParam(i, { value: v })
|
|
218
|
-
}),
|
|
219
|
-
/* @__PURE__ */ jsx(SmallButton, {
|
|
220
|
-
tone: "danger",
|
|
221
|
-
onClick: () => updateAttributes({ params: params.filter((_, j) => j !== i) }),
|
|
222
|
-
children: "β"
|
|
223
|
-
})
|
|
224
|
-
]
|
|
225
|
-
}, i)),
|
|
226
|
-
/* @__PURE__ */ jsx(SmallButton, {
|
|
227
|
-
onClick: () => updateAttributes({ params: [...params, {
|
|
228
|
-
name: nextParamName(params),
|
|
229
|
-
min: 0,
|
|
230
|
-
max: 3,
|
|
231
|
-
value: 1,
|
|
232
|
-
step: .1
|
|
233
|
-
}] }),
|
|
234
|
-
children: "+ slider"
|
|
235
|
-
})
|
|
236
|
-
]
|
|
237
|
-
}),
|
|
238
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
239
|
-
label: "x window",
|
|
240
|
-
children: [
|
|
241
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
242
|
-
value: xRange[0],
|
|
243
|
-
onChange: (v) => updateAttributes({ xRange: [v, xRange[1]] })
|
|
244
|
-
}),
|
|
245
|
-
/* @__PURE__ */ jsx("span", {
|
|
246
|
-
className: "text-muted-foreground",
|
|
247
|
-
children: "to"
|
|
248
|
-
}),
|
|
249
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
250
|
-
value: xRange[1],
|
|
251
|
-
onChange: (v) => updateAttributes({ xRange: [xRange[0], v] })
|
|
252
|
-
})
|
|
253
|
-
]
|
|
254
|
-
}),
|
|
255
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
256
|
-
label: "y scale",
|
|
257
|
-
children: [/* @__PURE__ */ jsx(ChipToggle, {
|
|
258
|
-
active: yScale !== "log",
|
|
259
|
-
onClick: () => updateAttributes({ yScale: "linear" }),
|
|
260
|
-
children: "linear"
|
|
261
|
-
}), /* @__PURE__ */ jsx(ChipToggle, {
|
|
262
|
-
active: yScale === "log",
|
|
263
|
-
onClick: () => updateAttributes({ yScale: "log" }),
|
|
264
|
-
children: "log"
|
|
265
|
-
})]
|
|
266
|
-
})
|
|
267
|
-
] }), widget] });
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
const DerivativeExplorerBlock = defineBlock({
|
|
271
|
-
key: "derivative-explorer",
|
|
272
|
-
void: true,
|
|
273
|
-
label: "Derivative explorer",
|
|
274
|
-
description: "Drag a point; the secant becomes the exact tangent. Shows fβ²(x).",
|
|
275
|
-
category: "interactive",
|
|
276
|
-
schema: z.object({
|
|
277
|
-
equation: z.string().optional(),
|
|
278
|
-
xRange: z.tuple([z.number(), z.number()]).optional(),
|
|
279
|
-
startX: z.number().optional(),
|
|
280
|
-
title: z.string().optional()
|
|
281
|
-
}),
|
|
282
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
283
|
-
const equation = typeof attributes.equation === "string" && attributes.equation.trim() ? attributes.equation : "0.15*x^3 - x";
|
|
284
|
-
const xRange = attributes.xRange ?? [-4, 4];
|
|
285
|
-
const title = attributes.title ?? "The derivative is a slope";
|
|
286
|
-
const widget = /* @__PURE__ */ jsx(DerivativeExplorer, {
|
|
287
|
-
equation,
|
|
288
|
-
xRange,
|
|
289
|
-
startX: attributes.startX,
|
|
290
|
-
title
|
|
291
|
-
});
|
|
292
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
293
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
294
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
295
|
-
label: "Title",
|
|
296
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
297
|
-
value: title,
|
|
298
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
299
|
-
className: "flex-1"
|
|
300
|
-
})
|
|
301
|
-
}),
|
|
302
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
303
|
-
label: "f(x) =",
|
|
304
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
305
|
-
value: equation,
|
|
306
|
-
mono: true,
|
|
307
|
-
placeholder: "0.15*x^3 - x",
|
|
308
|
-
onChange: (v) => updateAttributes({ equation: v }),
|
|
309
|
-
className: "flex-1"
|
|
310
|
-
})
|
|
311
|
-
}),
|
|
312
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
313
|
-
label: "x window",
|
|
314
|
-
children: [
|
|
315
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
316
|
-
value: xRange[0],
|
|
317
|
-
onChange: (v) => updateAttributes({ xRange: [v, xRange[1]] })
|
|
318
|
-
}),
|
|
319
|
-
/* @__PURE__ */ jsx("span", {
|
|
320
|
-
className: "text-muted-foreground",
|
|
321
|
-
children: "to"
|
|
322
|
-
}),
|
|
323
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
324
|
-
value: xRange[1],
|
|
325
|
-
onChange: (v) => updateAttributes({ xRange: [xRange[0], v] })
|
|
326
|
-
})
|
|
327
|
-
]
|
|
328
|
-
})
|
|
329
|
-
] }), widget] });
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
|
-
const GradientDescentBlock = defineBlock({
|
|
333
|
-
key: "gradient-descent",
|
|
334
|
-
void: true,
|
|
335
|
-
label: "Gradient descent",
|
|
336
|
-
description: "Walk downhill on a loss surface f(x,y) using exact βf/βx, βf/βy, the calculus behind ML.",
|
|
337
|
-
category: "interactive",
|
|
338
|
-
schema: z.object({
|
|
339
|
-
equation: z.string().optional(),
|
|
340
|
-
range: z.tuple([z.number(), z.number()]).optional(),
|
|
341
|
-
learningRate: z.number().optional(),
|
|
342
|
-
title: z.string().optional()
|
|
343
|
-
}),
|
|
344
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
345
|
-
const equation = typeof attributes.equation === "string" && attributes.equation.trim() ? attributes.equation : "x^2 + 2*y^2";
|
|
346
|
-
const range = attributes.range ?? [-3, 3];
|
|
347
|
-
const title = attributes.title ?? "Gradient descent";
|
|
348
|
-
const widget = /* @__PURE__ */ jsx(GradientDescent, {
|
|
349
|
-
equation,
|
|
350
|
-
range,
|
|
351
|
-
learningRate: attributes.learningRate,
|
|
352
|
-
title
|
|
353
|
-
});
|
|
354
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
355
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
356
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
357
|
-
label: "Title",
|
|
358
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
359
|
-
value: title,
|
|
360
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
361
|
-
className: "flex-1"
|
|
362
|
-
})
|
|
363
|
-
}),
|
|
364
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
365
|
-
label: "f(x,y) =",
|
|
366
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
367
|
-
value: equation,
|
|
368
|
-
mono: true,
|
|
369
|
-
placeholder: "x^2 + 2*y^2",
|
|
370
|
-
onChange: (v) => updateAttributes({ equation: v }),
|
|
371
|
-
className: "flex-1"
|
|
372
|
-
})
|
|
373
|
-
}),
|
|
374
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
375
|
-
label: "region",
|
|
376
|
-
children: [
|
|
377
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
378
|
-
value: range[0],
|
|
379
|
-
onChange: (v) => updateAttributes({ range: [v, range[1]] })
|
|
380
|
-
}),
|
|
381
|
-
/* @__PURE__ */ jsx("span", {
|
|
382
|
-
className: "text-muted-foreground",
|
|
383
|
-
children: "to"
|
|
384
|
-
}),
|
|
385
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
386
|
-
value: range[1],
|
|
387
|
-
onChange: (v) => updateAttributes({ range: [range[0], v] })
|
|
388
|
-
})
|
|
389
|
-
]
|
|
390
|
-
})
|
|
391
|
-
] }), widget] });
|
|
392
|
-
}
|
|
393
|
-
});
|
|
394
|
-
const IntegralExplorerBlock = defineBlock({
|
|
395
|
-
key: "integral-explorer",
|
|
396
|
-
void: true,
|
|
397
|
-
label: "Integral explorer",
|
|
398
|
-
description: "Area under a curve via Riemann rectangles, drag endpoints, add n, converge.",
|
|
399
|
-
category: "interactive",
|
|
400
|
-
schema: z.object({
|
|
401
|
-
equation: z.string().optional(),
|
|
402
|
-
xRange: z.tuple([z.number(), z.number()]).optional(),
|
|
403
|
-
a: z.number().optional(),
|
|
404
|
-
b: z.number().optional(),
|
|
405
|
-
n: z.number().optional(),
|
|
406
|
-
title: z.string().optional()
|
|
407
|
-
}),
|
|
408
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
409
|
-
const equation = typeof attributes.equation === "string" && attributes.equation.trim() ? attributes.equation : "0.4*x^2 + 0.5";
|
|
410
|
-
const xRange = attributes.xRange ?? [-1, 4];
|
|
411
|
-
const title = attributes.title ?? "The integral is an area";
|
|
412
|
-
const widget = /* @__PURE__ */ jsx(IntegralExplorer, {
|
|
413
|
-
equation,
|
|
414
|
-
xRange,
|
|
415
|
-
a: attributes.a,
|
|
416
|
-
b: attributes.b,
|
|
417
|
-
n: attributes.n,
|
|
418
|
-
title
|
|
419
|
-
});
|
|
420
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
421
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
422
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
423
|
-
label: "Title",
|
|
424
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
425
|
-
value: title,
|
|
426
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
427
|
-
className: "flex-1"
|
|
428
|
-
})
|
|
429
|
-
}),
|
|
430
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
431
|
-
label: "f(x) =",
|
|
432
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
433
|
-
value: equation,
|
|
434
|
-
mono: true,
|
|
435
|
-
placeholder: "0.4*x^2 + 0.5",
|
|
436
|
-
onChange: (v) => updateAttributes({ equation: v }),
|
|
437
|
-
className: "flex-1"
|
|
438
|
-
})
|
|
439
|
-
}),
|
|
440
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
441
|
-
label: "x window",
|
|
442
|
-
children: [
|
|
443
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
444
|
-
value: xRange[0],
|
|
445
|
-
onChange: (v) => updateAttributes({ xRange: [v, xRange[1]] })
|
|
446
|
-
}),
|
|
447
|
-
/* @__PURE__ */ jsx("span", {
|
|
448
|
-
className: "text-muted-foreground",
|
|
449
|
-
children: "to"
|
|
450
|
-
}),
|
|
451
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
452
|
-
value: xRange[1],
|
|
453
|
-
onChange: (v) => updateAttributes({ xRange: [xRange[0], v] })
|
|
454
|
-
})
|
|
455
|
-
]
|
|
456
|
-
})
|
|
457
|
-
] }), widget] });
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
const LimitExplorerBlock = defineBlock({
|
|
461
|
-
key: "limit-explorer",
|
|
462
|
-
void: true,
|
|
463
|
-
label: "Limit explorer",
|
|
464
|
-
description: "Approach x β c from both sides; see the limit even where f(c) is a hole.",
|
|
465
|
-
category: "interactive",
|
|
466
|
-
schema: z.object({
|
|
467
|
-
equation: z.string().optional(),
|
|
468
|
-
xRange: z.tuple([z.number(), z.number()]).optional(),
|
|
469
|
-
c: z.number().optional(),
|
|
470
|
-
title: z.string().optional()
|
|
471
|
-
}),
|
|
472
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
473
|
-
const equation = typeof attributes.equation === "string" && attributes.equation.trim() ? attributes.equation : "(x^2 - 1)/(x - 1)";
|
|
474
|
-
const xRange = attributes.xRange ?? [-1, 3];
|
|
475
|
-
const title = attributes.title ?? "Approaching a limit";
|
|
476
|
-
const widget = /* @__PURE__ */ jsx(LimitExplorer, {
|
|
477
|
-
equation,
|
|
478
|
-
xRange,
|
|
479
|
-
c: attributes.c,
|
|
480
|
-
title
|
|
481
|
-
});
|
|
482
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
483
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
484
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
485
|
-
label: "Title",
|
|
486
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
487
|
-
value: title,
|
|
488
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
489
|
-
className: "flex-1"
|
|
490
|
-
})
|
|
491
|
-
}),
|
|
492
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
493
|
-
label: "f(x) =",
|
|
494
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
495
|
-
value: equation,
|
|
496
|
-
mono: true,
|
|
497
|
-
placeholder: "(x^2 - 1)/(x - 1)",
|
|
498
|
-
onChange: (v) => updateAttributes({ equation: v }),
|
|
499
|
-
className: "flex-1"
|
|
500
|
-
})
|
|
501
|
-
}),
|
|
502
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
503
|
-
label: "x window",
|
|
504
|
-
children: [
|
|
505
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
506
|
-
value: xRange[0],
|
|
507
|
-
onChange: (v) => updateAttributes({ xRange: [v, xRange[1]] })
|
|
508
|
-
}),
|
|
509
|
-
/* @__PURE__ */ jsx("span", {
|
|
510
|
-
className: "text-muted-foreground",
|
|
511
|
-
children: "to"
|
|
512
|
-
}),
|
|
513
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
514
|
-
value: xRange[1],
|
|
515
|
-
onChange: (v) => updateAttributes({ xRange: [xRange[0], v] })
|
|
516
|
-
})
|
|
517
|
-
]
|
|
518
|
-
})
|
|
519
|
-
] }), widget] });
|
|
520
|
-
}
|
|
521
|
-
});
|
|
522
|
-
const derivationStepSchema = z.union([z.string(), z.object({
|
|
523
|
-
tex: z.string(),
|
|
524
|
-
note: z.string().optional()
|
|
525
|
-
})]);
|
|
526
|
-
const asSteps = (raw) => {
|
|
527
|
-
if (!Array.isArray(raw)) return [{ tex: "a^2 + b^2 = c^2" }];
|
|
528
|
-
const out = raw.map((s) => typeof s === "string" ? { tex: s } : s).filter((s) => !!s && typeof s.tex === "string");
|
|
529
|
-
return out.length ? out : [{ tex: "a^2 + b^2 = c^2" }];
|
|
530
|
-
};
|
|
531
|
-
const DerivationBlock = defineBlock({
|
|
532
|
-
key: "derivation",
|
|
533
|
-
void: true,
|
|
534
|
-
label: "Derivation (steps)",
|
|
535
|
-
description: "A step-by-step equation derivation in LaTeX, revealed one line at a time.",
|
|
536
|
-
category: "interactive",
|
|
537
|
-
schema: z.object({
|
|
538
|
-
steps: z.array(derivationStepSchema).optional(),
|
|
539
|
-
title: z.string().optional()
|
|
540
|
-
}),
|
|
541
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
542
|
-
const steps = asSteps(attributes.steps);
|
|
543
|
-
const title = attributes.title ?? "Derivation";
|
|
544
|
-
const widget = /* @__PURE__ */ jsx(Derivation, {
|
|
545
|
-
steps,
|
|
546
|
-
title
|
|
547
|
-
});
|
|
548
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
549
|
-
const setStep = (i, patch) => updateAttributes({ steps: steps.map((s, j) => j === i ? {
|
|
550
|
-
...s,
|
|
551
|
-
...patch
|
|
552
|
-
} : s) });
|
|
553
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [/* @__PURE__ */ jsx(ConfigRow, {
|
|
554
|
-
label: "Title",
|
|
555
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
556
|
-
value: title,
|
|
557
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
558
|
-
className: "flex-1"
|
|
559
|
-
})
|
|
560
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
561
|
-
className: "space-y-1.5",
|
|
562
|
-
children: [
|
|
563
|
-
/* @__PURE__ */ jsx("span", {
|
|
564
|
-
className: "font-medium text-muted-foreground",
|
|
565
|
-
children: "Steps (LaTeX + optional note)"
|
|
566
|
-
}),
|
|
567
|
-
steps.map((s, i) => /* @__PURE__ */ jsxs("div", {
|
|
568
|
-
className: "flex flex-wrap items-center gap-1.5",
|
|
569
|
-
children: [
|
|
570
|
-
/* @__PURE__ */ jsx("span", {
|
|
571
|
-
className: "font-mono text-muted-foreground",
|
|
572
|
-
children: i + 1
|
|
573
|
-
}),
|
|
574
|
-
/* @__PURE__ */ jsx(TextField, {
|
|
575
|
-
value: s.tex,
|
|
576
|
-
mono: true,
|
|
577
|
-
placeholder: "\\\\frac{y-y_P}{x-x_P} = ...",
|
|
578
|
-
onChange: (v) => setStep(i, { tex: v }),
|
|
579
|
-
className: "min-w-[12rem] flex-1"
|
|
580
|
-
}),
|
|
581
|
-
/* @__PURE__ */ jsx(TextField, {
|
|
582
|
-
value: s.note ?? "",
|
|
583
|
-
placeholder: "whyβ¦",
|
|
584
|
-
onChange: (v) => setStep(i, { note: v }),
|
|
585
|
-
className: "w-32"
|
|
586
|
-
}),
|
|
587
|
-
steps.length > 1 && /* @__PURE__ */ jsx(SmallButton, {
|
|
588
|
-
tone: "danger",
|
|
589
|
-
onClick: () => updateAttributes({ steps: steps.filter((_, j) => j !== i) }),
|
|
590
|
-
children: "β"
|
|
591
|
-
})
|
|
592
|
-
]
|
|
593
|
-
}, i)),
|
|
594
|
-
/* @__PURE__ */ jsx(SmallButton, {
|
|
595
|
-
onClick: () => updateAttributes({ steps: [...steps, { tex: "" }] }),
|
|
596
|
-
children: "+ step"
|
|
597
|
-
})
|
|
598
|
-
]
|
|
599
|
-
})] }), widget] });
|
|
600
|
-
}
|
|
601
|
-
});
|
|
602
|
-
function nextParamName(params) {
|
|
603
|
-
const used = new Set(params.map((p) => p.name));
|
|
604
|
-
for (const n of [
|
|
605
|
-
"a",
|
|
606
|
-
"b",
|
|
607
|
-
"c",
|
|
608
|
-
"d",
|
|
609
|
-
"k",
|
|
610
|
-
"m",
|
|
611
|
-
"n",
|
|
612
|
-
"p",
|
|
613
|
-
"q"
|
|
614
|
-
]) if (!used.has(n)) return n;
|
|
615
|
-
return `p${params.length + 1}`;
|
|
616
|
-
}
|
|
617
|
-
/** System-of-equations render: two clue lines (slope-intercept) from scalar
|
|
618
|
-
* props, so the editor form + MDX stay simple number fields. */
|
|
619
|
-
function LinearSystemView({ m1 = 1, b1 = 1, m2 = -1, b2 = 5 }) {
|
|
620
|
-
return /* @__PURE__ */ jsx(LinearSystemLab, { lines: [{
|
|
621
|
-
m: m1,
|
|
622
|
-
b: b1,
|
|
623
|
-
label: "clue A"
|
|
624
|
-
}, {
|
|
625
|
-
m: m2,
|
|
626
|
-
b: b2,
|
|
627
|
-
label: "clue B"
|
|
628
|
-
}] });
|
|
629
|
-
}
|
|
630
|
-
const LinearSystemBlock = defineBlock({
|
|
631
|
-
key: "linear-system",
|
|
632
|
-
tag: "LinearSystem",
|
|
633
|
-
void: true,
|
|
634
|
-
label: "System of equations (x & y)",
|
|
635
|
-
description: "Two clue lines on a grid, drag to the crossing point that obeys both. The advanced \"find x and y\" lab.",
|
|
636
|
-
category: "interactive",
|
|
637
|
-
schema: z.object({
|
|
638
|
-
m1: z.number().default(1),
|
|
639
|
-
b1: z.number().default(1),
|
|
640
|
-
m2: z.number().default(-1),
|
|
641
|
-
b2: z.number().default(5)
|
|
642
|
-
}),
|
|
643
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
644
|
-
const { m1 = 1, b1 = 1, m2 = -1, b2 = 5 } = attributes;
|
|
645
|
-
const widget = /* @__PURE__ */ jsx(LinearSystemView, {
|
|
646
|
-
m1,
|
|
647
|
-
b1,
|
|
648
|
-
m2,
|
|
649
|
-
b2
|
|
650
|
-
});
|
|
651
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
652
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [/* @__PURE__ */ jsxs(ConfigRow, {
|
|
653
|
-
label: "clue A: y =",
|
|
654
|
-
children: [
|
|
655
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
656
|
-
value: m1,
|
|
657
|
-
onChange: (v) => updateAttributes({ m1: v })
|
|
658
|
-
}),
|
|
659
|
-
/* @__PURE__ */ jsx("span", {
|
|
660
|
-
className: "text-muted-foreground",
|
|
661
|
-
children: "x +"
|
|
662
|
-
}),
|
|
663
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
664
|
-
value: b1,
|
|
665
|
-
onChange: (v) => updateAttributes({ b1: v })
|
|
666
|
-
})
|
|
667
|
-
]
|
|
668
|
-
}), /* @__PURE__ */ jsxs(ConfigRow, {
|
|
669
|
-
label: "clue B: y =",
|
|
670
|
-
children: [
|
|
671
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
672
|
-
value: m2,
|
|
673
|
-
onChange: (v) => updateAttributes({ m2: v })
|
|
674
|
-
}),
|
|
675
|
-
/* @__PURE__ */ jsx("span", {
|
|
676
|
-
className: "text-muted-foreground",
|
|
677
|
-
children: "x +"
|
|
678
|
-
}),
|
|
679
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
680
|
-
value: b2,
|
|
681
|
-
onChange: (v) => updateAttributes({ b2: v })
|
|
682
|
-
})
|
|
683
|
-
]
|
|
684
|
-
})] }), widget] });
|
|
685
|
-
}
|
|
686
|
-
});
|
|
687
|
-
const NumberLineBlock = defineBlock({
|
|
688
|
-
key: "number-line",
|
|
689
|
-
tag: "NumberLine",
|
|
690
|
-
void: true,
|
|
691
|
-
label: "Number line",
|
|
692
|
-
description: "A draggable marker on a number line (incl. below zero), optionally pose a target to land on.",
|
|
693
|
-
category: "interactive",
|
|
694
|
-
schema: z.object({
|
|
695
|
-
min: z.number().default(-8),
|
|
696
|
-
max: z.number().default(8),
|
|
697
|
-
start: z.number().default(0),
|
|
698
|
-
target: z.number().optional()
|
|
699
|
-
}),
|
|
700
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
701
|
-
const { min = -8, max = 8, start = 0, target } = attributes;
|
|
702
|
-
const widget = /* @__PURE__ */ jsx(NumberLineLab, {
|
|
703
|
-
min,
|
|
704
|
-
max,
|
|
705
|
-
start,
|
|
706
|
-
target
|
|
707
|
-
});
|
|
708
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
709
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
710
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
711
|
-
label: "from",
|
|
712
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
713
|
-
value: min,
|
|
714
|
-
onChange: (v) => updateAttributes({ min: v })
|
|
715
|
-
})
|
|
716
|
-
}),
|
|
717
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
718
|
-
label: "to",
|
|
719
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
720
|
-
value: max,
|
|
721
|
-
onChange: (v) => updateAttributes({ max: v })
|
|
722
|
-
})
|
|
723
|
-
}),
|
|
724
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
725
|
-
label: "start",
|
|
726
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
727
|
-
value: start,
|
|
728
|
-
onChange: (v) => updateAttributes({ start: v })
|
|
729
|
-
})
|
|
730
|
-
}),
|
|
731
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
732
|
-
label: "target",
|
|
733
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
734
|
-
value: target ?? 0,
|
|
735
|
-
onChange: (v) => updateAttributes({ target: v })
|
|
736
|
-
})
|
|
737
|
-
})
|
|
738
|
-
] }), widget] });
|
|
739
|
-
}
|
|
740
|
-
});
|
|
741
|
-
const MysteryBucketBlock = defineBlock({
|
|
742
|
-
key: "mystery-bucket",
|
|
743
|
-
tag: "MysteryBucket",
|
|
744
|
-
void: true,
|
|
745
|
-
label: "Mystery bucket (weigh the unknown)",
|
|
746
|
-
description: "Essentials opener, add unit weights until a balance is level to discover the hidden weight. No symbols.",
|
|
747
|
-
category: "interactive",
|
|
748
|
-
schema: z.object({
|
|
749
|
-
bucketWeight: z.number().default(5),
|
|
750
|
-
bucketCount: z.number().default(1),
|
|
751
|
-
maxWeights: z.number().default(12),
|
|
752
|
-
start: z.number().default(0)
|
|
753
|
-
}),
|
|
754
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
755
|
-
const { bucketWeight = 5, bucketCount = 1, maxWeights = 12, start = 0 } = attributes;
|
|
756
|
-
const widget = /* @__PURE__ */ jsx(MysteryBucketLab, {
|
|
757
|
-
bucketWeight,
|
|
758
|
-
bucketCount,
|
|
759
|
-
maxWeights,
|
|
760
|
-
start
|
|
761
|
-
});
|
|
762
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
763
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
764
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
765
|
-
label: "weight each",
|
|
766
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
767
|
-
value: bucketWeight,
|
|
768
|
-
onChange: (v) => updateAttributes({ bucketWeight: v })
|
|
769
|
-
})
|
|
770
|
-
}),
|
|
771
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
772
|
-
label: "buckets",
|
|
773
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
774
|
-
value: bucketCount,
|
|
775
|
-
onChange: (v) => updateAttributes({ bucketCount: v })
|
|
776
|
-
})
|
|
777
|
-
}),
|
|
778
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
779
|
-
label: "max weights",
|
|
780
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
781
|
-
value: maxWeights,
|
|
782
|
-
onChange: (v) => updateAttributes({ maxWeights: v })
|
|
783
|
-
})
|
|
784
|
-
}),
|
|
785
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
786
|
-
label: "start at",
|
|
787
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
788
|
-
value: start,
|
|
789
|
-
onChange: (v) => updateAttributes({ start: v })
|
|
790
|
-
})
|
|
791
|
-
})
|
|
792
|
-
] }), widget] });
|
|
793
|
-
}
|
|
794
|
-
});
|
|
795
|
-
const BalanceAlgebraBlock = defineBlock({
|
|
796
|
-
key: "balance-algebra",
|
|
797
|
-
tag: "BalanceAlgebra",
|
|
798
|
-
void: true,
|
|
799
|
-
label: "Balance scale (algebra)",
|
|
800
|
-
description: "Drag x to balance aΒ·x + b = c, learners solve a linear equation by balancing the scale.",
|
|
801
|
-
category: "interactive",
|
|
802
|
-
schema: z.object({
|
|
803
|
-
coef: z.number().default(2),
|
|
804
|
-
addend: z.number().default(1),
|
|
805
|
-
rhs: z.number().default(7),
|
|
806
|
-
answer: z.number().default(3),
|
|
807
|
-
controlId: z.string().optional()
|
|
808
|
-
}),
|
|
809
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
810
|
-
const { coef = 2, addend = 1, rhs = 7, answer = 3 } = attributes;
|
|
811
|
-
const widget = /* @__PURE__ */ jsx(BalanceAlgebraLab, {
|
|
812
|
-
coef,
|
|
813
|
-
addend,
|
|
814
|
-
rhs,
|
|
815
|
-
answer,
|
|
816
|
-
controlId: attributes.controlId
|
|
817
|
-
});
|
|
818
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
819
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
820
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
821
|
-
label: "coefficient a",
|
|
822
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
823
|
-
value: coef,
|
|
824
|
-
onChange: (v) => updateAttributes({ coef: v })
|
|
825
|
-
})
|
|
826
|
-
}),
|
|
827
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
828
|
-
label: "addend b",
|
|
829
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
830
|
-
value: addend,
|
|
831
|
-
onChange: (v) => updateAttributes({ addend: v })
|
|
832
|
-
})
|
|
833
|
-
}),
|
|
834
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
835
|
-
label: "right side c",
|
|
836
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
837
|
-
value: rhs,
|
|
838
|
-
onChange: (v) => updateAttributes({ rhs: v })
|
|
839
|
-
})
|
|
840
|
-
}),
|
|
841
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
842
|
-
label: "answer x",
|
|
843
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
844
|
-
value: answer,
|
|
845
|
-
onChange: (v) => updateAttributes({ answer: v })
|
|
846
|
-
})
|
|
847
|
-
})
|
|
848
|
-
] }), widget] });
|
|
849
|
-
}
|
|
850
|
-
});
|
|
851
|
-
const VertexParabolaBlock = defineBlock({
|
|
852
|
-
key: "vertex-parabola",
|
|
853
|
-
tag: "VertexParabola",
|
|
854
|
-
void: true,
|
|
855
|
-
label: "Parabola (drag the vertex)",
|
|
856
|
-
description: "Drag the vertex of y = a(xβh)Β² + k; the curve + equation update live.",
|
|
857
|
-
category: "interactive",
|
|
858
|
-
schema: z.object({ a: z.number().default(1) }),
|
|
859
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
860
|
-
const { a = 1 } = attributes;
|
|
861
|
-
const widget = /* @__PURE__ */ jsx(VertexParabolaLab, { a });
|
|
862
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
863
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(ConfigPanel, { children: /* @__PURE__ */ jsx(ConfigRow, {
|
|
864
|
-
label: "stretch a",
|
|
865
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
866
|
-
value: a,
|
|
867
|
-
onChange: (v) => updateAttributes({ a: v })
|
|
868
|
-
})
|
|
869
|
-
}) }), widget] });
|
|
870
|
-
}
|
|
871
|
-
});
|
|
872
|
-
const AreaModelBlock = defineBlock({
|
|
873
|
-
key: "area-model",
|
|
874
|
-
tag: "AreaModel",
|
|
875
|
-
void: true,
|
|
876
|
-
label: "Area model (algebra tiles)",
|
|
877
|
-
description: "(x+a)(x+b) as a partitioned rectangle, EXPAND (drag x) or FACTOR (find a, b).",
|
|
878
|
-
category: "interactive",
|
|
879
|
-
schema: z.object({
|
|
880
|
-
a: z.number().default(3),
|
|
881
|
-
b: z.number().default(2),
|
|
882
|
-
mode: z.enum(["expand", "factor"]).default("expand"),
|
|
883
|
-
controlId: z.string().optional()
|
|
884
|
-
}),
|
|
885
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
886
|
-
const { a = 3, b = 2, mode: m = "expand" } = attributes;
|
|
887
|
-
const widget = /* @__PURE__ */ jsx(AreaModelLab, {
|
|
888
|
-
a,
|
|
889
|
-
b,
|
|
890
|
-
mode: m,
|
|
891
|
-
controlId: attributes.controlId
|
|
892
|
-
});
|
|
893
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
894
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
895
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
896
|
-
label: "a in (x+a)",
|
|
897
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
898
|
-
value: a,
|
|
899
|
-
onChange: (v) => updateAttributes({ a: v })
|
|
900
|
-
})
|
|
901
|
-
}),
|
|
902
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
903
|
-
label: "b in (x+b)",
|
|
904
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
905
|
-
value: b,
|
|
906
|
-
onChange: (v) => updateAttributes({ b: v })
|
|
907
|
-
})
|
|
908
|
-
}),
|
|
909
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
910
|
-
label: "mode",
|
|
911
|
-
children: [/* @__PURE__ */ jsx(ChipToggle, {
|
|
912
|
-
active: m !== "factor",
|
|
913
|
-
onClick: () => updateAttributes({ mode: "expand" }),
|
|
914
|
-
children: "expand"
|
|
915
|
-
}), /* @__PURE__ */ jsx(ChipToggle, {
|
|
916
|
-
active: m === "factor",
|
|
917
|
-
onClick: () => updateAttributes({ mode: "factor" }),
|
|
918
|
-
children: "factor"
|
|
919
|
-
})]
|
|
920
|
-
})
|
|
921
|
-
] }), widget] });
|
|
922
|
-
}
|
|
923
|
-
});
|
|
924
|
-
const GrowingPatternBlock = defineBlock({
|
|
925
|
-
key: "growing-pattern",
|
|
926
|
-
tag: "GrowingPattern",
|
|
927
|
-
void: true,
|
|
928
|
-
label: "Pattern β formula",
|
|
929
|
-
description: "A figure grows by aΒ·n + b; learners find the rule (hidden predict row forces extrapolation).",
|
|
930
|
-
category: "interactive",
|
|
931
|
-
schema: z.object({
|
|
932
|
-
a: z.number().default(2),
|
|
933
|
-
b: z.number().default(3),
|
|
934
|
-
steps: z.number().default(4),
|
|
935
|
-
controlId: z.string().optional()
|
|
936
|
-
}),
|
|
937
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
938
|
-
const { a = 2, b = 3, steps = 4 } = attributes;
|
|
939
|
-
const widget = /* @__PURE__ */ jsx(GrowingPatternLab, {
|
|
940
|
-
a,
|
|
941
|
-
b,
|
|
942
|
-
steps,
|
|
943
|
-
controlId: attributes.controlId
|
|
944
|
-
});
|
|
945
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
946
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
947
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
948
|
-
label: "per step a",
|
|
949
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
950
|
-
value: a,
|
|
951
|
-
onChange: (v) => updateAttributes({ a: v })
|
|
952
|
-
})
|
|
953
|
-
}),
|
|
954
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
955
|
-
label: "constant b",
|
|
956
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
957
|
-
value: b,
|
|
958
|
-
onChange: (v) => updateAttributes({ b: v })
|
|
959
|
-
})
|
|
960
|
-
}),
|
|
961
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
962
|
-
label: "figures shown",
|
|
963
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
964
|
-
value: steps,
|
|
965
|
-
onChange: (v) => updateAttributes({ steps: v })
|
|
966
|
-
})
|
|
967
|
-
})
|
|
968
|
-
] }), widget] });
|
|
969
|
-
}
|
|
970
|
-
});
|
|
971
|
-
const answerSchema = z.union([z.object({
|
|
972
|
-
kind: z.literal("number"),
|
|
973
|
-
value: z.number(),
|
|
974
|
-
tol: z.number().optional()
|
|
975
|
-
}), z.object({
|
|
976
|
-
kind: z.literal("expression"),
|
|
977
|
-
value: z.string()
|
|
978
|
-
})]);
|
|
979
|
-
const askSchema = z.object({
|
|
980
|
-
prompt: z.string(),
|
|
981
|
-
answer: answerSchema,
|
|
982
|
-
placeholder: z.string().optional()
|
|
983
|
-
});
|
|
984
|
-
const deriveSchema = z.object({
|
|
985
|
-
kind: z.enum([
|
|
986
|
-
"intersections",
|
|
987
|
-
"roots",
|
|
988
|
-
"tangent",
|
|
989
|
-
"normal",
|
|
990
|
-
"area"
|
|
991
|
-
]),
|
|
992
|
-
of: z.union([z.number(), z.tuple([z.number(), z.number()])]).optional(),
|
|
993
|
-
at: z.union([z.number(), z.string()]).optional(),
|
|
994
|
-
between: z.tuple([z.number(), z.number()]).optional(),
|
|
995
|
-
from: z.union([z.number(), z.string()]).optional(),
|
|
996
|
-
to: z.union([z.number(), z.string()]).optional(),
|
|
997
|
-
label: z.string().optional()
|
|
998
|
-
});
|
|
999
|
-
const DERIVE_KINDS = [
|
|
1000
|
-
"intersections",
|
|
1001
|
-
"roots",
|
|
1002
|
-
"tangent",
|
|
1003
|
-
"normal",
|
|
1004
|
-
"area"
|
|
1005
|
-
];
|
|
1006
|
-
/** Shared "ask + check" authoring row, used by the engine and representation blocks. */
|
|
1007
|
-
function AskEditor({ ask, onChange }) {
|
|
1008
|
-
if (!ask) return /* @__PURE__ */ jsx(SmallButton, {
|
|
1009
|
-
onClick: () => onChange({
|
|
1010
|
-
prompt: "",
|
|
1011
|
-
answer: {
|
|
1012
|
-
kind: "number",
|
|
1013
|
-
value: 0
|
|
1014
|
-
}
|
|
1015
|
-
}),
|
|
1016
|
-
children: "+ question (checked answer)"
|
|
1017
|
-
});
|
|
1018
|
-
const isNum = ask.answer.kind === "number";
|
|
1019
|
-
const setAns = (patch) => onChange({
|
|
1020
|
-
...ask,
|
|
1021
|
-
answer: {
|
|
1022
|
-
...ask.answer,
|
|
1023
|
-
...patch
|
|
1024
|
-
}
|
|
1025
|
-
});
|
|
1026
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1027
|
-
className: "space-y-1.5",
|
|
1028
|
-
children: [
|
|
1029
|
-
/* @__PURE__ */ jsx("span", {
|
|
1030
|
-
className: "font-medium text-muted-foreground",
|
|
1031
|
-
children: "Question (graded)"
|
|
1032
|
-
}),
|
|
1033
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1034
|
-
label: "Prompt",
|
|
1035
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
1036
|
-
value: ask.prompt,
|
|
1037
|
-
onChange: (v) => onChange({
|
|
1038
|
-
...ask,
|
|
1039
|
-
prompt: v
|
|
1040
|
-
}),
|
|
1041
|
-
className: "flex-1"
|
|
1042
|
-
})
|
|
1043
|
-
}),
|
|
1044
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
1045
|
-
label: "Answer is",
|
|
1046
|
-
children: [/* @__PURE__ */ jsx(ChipToggle, {
|
|
1047
|
-
active: isNum,
|
|
1048
|
-
onClick: () => setAns({
|
|
1049
|
-
kind: "number",
|
|
1050
|
-
value: typeof ask.answer.value === "number" ? ask.answer.value : 0
|
|
1051
|
-
}),
|
|
1052
|
-
children: "a number"
|
|
1053
|
-
}), /* @__PURE__ */ jsx(ChipToggle, {
|
|
1054
|
-
active: !isNum,
|
|
1055
|
-
onClick: () => setAns({
|
|
1056
|
-
kind: "expression",
|
|
1057
|
-
value: String(ask.answer.value ?? "")
|
|
1058
|
-
}),
|
|
1059
|
-
children: "an expression"
|
|
1060
|
-
})]
|
|
1061
|
-
}),
|
|
1062
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
1063
|
-
label: "Correct value",
|
|
1064
|
-
children: [
|
|
1065
|
-
isNum ? /* @__PURE__ */ jsx(NumField, {
|
|
1066
|
-
value: Number(ask.answer.value) || 0,
|
|
1067
|
-
onChange: (v) => setAns({ value: v })
|
|
1068
|
-
}) : /* @__PURE__ */ jsx(TextField, {
|
|
1069
|
-
value: String(ask.answer.value ?? ""),
|
|
1070
|
-
mono: true,
|
|
1071
|
-
placeholder: "6*x - 9",
|
|
1072
|
-
onChange: (v) => setAns({ value: v }),
|
|
1073
|
-
className: "flex-1"
|
|
1074
|
-
}),
|
|
1075
|
-
isNum && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
1076
|
-
className: "text-muted-foreground",
|
|
1077
|
-
children: "Β± tol"
|
|
1078
|
-
}), /* @__PURE__ */ jsx(NumField, {
|
|
1079
|
-
value: ask.answer.tol ?? .01,
|
|
1080
|
-
onChange: (v) => setAns({ tol: v })
|
|
1081
|
-
})] }),
|
|
1082
|
-
/* @__PURE__ */ jsx(SmallButton, {
|
|
1083
|
-
tone: "danger",
|
|
1084
|
-
onClick: () => onChange(void 0),
|
|
1085
|
-
children: "remove"
|
|
1086
|
-
})
|
|
1087
|
-
]
|
|
1088
|
-
})
|
|
1089
|
-
]
|
|
1090
|
-
});
|
|
1091
|
-
}
|
|
1092
|
-
const labChoiceSchema = z.object({
|
|
1093
|
-
value: z.string(),
|
|
1094
|
-
label: z.string()
|
|
1095
|
-
});
|
|
1096
|
-
const labAskSchema = z.object({
|
|
1097
|
-
prompt: z.string(),
|
|
1098
|
-
placeholder: z.string().optional(),
|
|
1099
|
-
answer: answerSchema.optional(),
|
|
1100
|
-
choices: z.array(labChoiceSchema).optional(),
|
|
1101
|
-
correct: z.string().optional(),
|
|
1102
|
-
explain: z.string().optional()
|
|
1103
|
-
});
|
|
1104
|
-
const CHOICE_LETTERS = [
|
|
1105
|
-
"a",
|
|
1106
|
-
"b",
|
|
1107
|
-
"c",
|
|
1108
|
-
"d",
|
|
1109
|
-
"e",
|
|
1110
|
-
"f"
|
|
1111
|
-
];
|
|
1112
|
-
/** Author a graded question as a typed answer (number/expression) OR multiple choice. */
|
|
1113
|
-
function LabAskEditor({ ask, onChange }) {
|
|
1114
|
-
if (!ask) return /* @__PURE__ */ jsxs("div", {
|
|
1115
|
-
className: "flex flex-wrap gap-1.5",
|
|
1116
|
-
children: [/* @__PURE__ */ jsx(SmallButton, {
|
|
1117
|
-
onClick: () => onChange({
|
|
1118
|
-
prompt: "",
|
|
1119
|
-
answer: {
|
|
1120
|
-
kind: "number",
|
|
1121
|
-
value: 0
|
|
1122
|
-
}
|
|
1123
|
-
}),
|
|
1124
|
-
children: "+ typed question"
|
|
1125
|
-
}), /* @__PURE__ */ jsx(SmallButton, {
|
|
1126
|
-
onClick: () => onChange({
|
|
1127
|
-
prompt: "",
|
|
1128
|
-
choices: [{
|
|
1129
|
-
value: "a",
|
|
1130
|
-
label: ""
|
|
1131
|
-
}, {
|
|
1132
|
-
value: "b",
|
|
1133
|
-
label: ""
|
|
1134
|
-
}],
|
|
1135
|
-
correct: "a"
|
|
1136
|
-
}),
|
|
1137
|
-
children: "+ multiple choice"
|
|
1138
|
-
})]
|
|
1139
|
-
});
|
|
1140
|
-
const isMcq = Array.isArray(ask.choices);
|
|
1141
|
-
const isNum = ask.answer?.kind !== "expression";
|
|
1142
|
-
const setAns = (patch) => onChange({
|
|
1143
|
-
...ask,
|
|
1144
|
-
answer: {
|
|
1145
|
-
...ask.answer ?? {
|
|
1146
|
-
kind: "number",
|
|
1147
|
-
value: 0
|
|
1148
|
-
},
|
|
1149
|
-
...patch
|
|
1150
|
-
}
|
|
1151
|
-
});
|
|
1152
|
-
const choices = ask.choices ?? [];
|
|
1153
|
-
const setChoice = (i, patch) => onChange({
|
|
1154
|
-
...ask,
|
|
1155
|
-
choices: choices.map((c, j) => j === i ? {
|
|
1156
|
-
...c,
|
|
1157
|
-
...patch
|
|
1158
|
-
} : c)
|
|
1159
|
-
});
|
|
1160
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1161
|
-
className: "space-y-1.5",
|
|
1162
|
-
children: [
|
|
1163
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1164
|
-
className: "flex items-center justify-between",
|
|
1165
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
1166
|
-
className: "font-medium text-muted-foreground",
|
|
1167
|
-
children: "Question (graded)"
|
|
1168
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
1169
|
-
className: "flex gap-1.5",
|
|
1170
|
-
children: [
|
|
1171
|
-
/* @__PURE__ */ jsx(ChipToggle, {
|
|
1172
|
-
active: !isMcq,
|
|
1173
|
-
onClick: () => onChange({
|
|
1174
|
-
prompt: ask.prompt,
|
|
1175
|
-
placeholder: ask.placeholder,
|
|
1176
|
-
answer: ask.answer ?? {
|
|
1177
|
-
kind: "number",
|
|
1178
|
-
value: 0
|
|
1179
|
-
}
|
|
1180
|
-
}),
|
|
1181
|
-
children: "typed"
|
|
1182
|
-
}),
|
|
1183
|
-
/* @__PURE__ */ jsx(ChipToggle, {
|
|
1184
|
-
active: isMcq,
|
|
1185
|
-
onClick: () => onChange({
|
|
1186
|
-
prompt: ask.prompt,
|
|
1187
|
-
choices: choices.length ? choices : [{
|
|
1188
|
-
value: "a",
|
|
1189
|
-
label: ""
|
|
1190
|
-
}, {
|
|
1191
|
-
value: "b",
|
|
1192
|
-
label: ""
|
|
1193
|
-
}],
|
|
1194
|
-
correct: ask.correct ?? "a"
|
|
1195
|
-
}),
|
|
1196
|
-
children: "multiple choice"
|
|
1197
|
-
}),
|
|
1198
|
-
/* @__PURE__ */ jsx(SmallButton, {
|
|
1199
|
-
tone: "danger",
|
|
1200
|
-
onClick: () => onChange(void 0),
|
|
1201
|
-
children: "remove"
|
|
1202
|
-
})
|
|
1203
|
-
]
|
|
1204
|
-
})]
|
|
1205
|
-
}),
|
|
1206
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1207
|
-
label: "Prompt",
|
|
1208
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
1209
|
-
value: ask.prompt,
|
|
1210
|
-
onChange: (v) => onChange({
|
|
1211
|
-
...ask,
|
|
1212
|
-
prompt: v
|
|
1213
|
-
}),
|
|
1214
|
-
className: "flex-1"
|
|
1215
|
-
})
|
|
1216
|
-
}),
|
|
1217
|
-
isMcq ? /* @__PURE__ */ jsxs("div", {
|
|
1218
|
-
className: "space-y-1.5",
|
|
1219
|
-
children: [
|
|
1220
|
-
/* @__PURE__ */ jsx("span", {
|
|
1221
|
-
className: "text-muted-foreground",
|
|
1222
|
-
children: "Options (tap β to mark the correct one)"
|
|
1223
|
-
}),
|
|
1224
|
-
choices.map((c, i) => /* @__PURE__ */ jsxs("div", {
|
|
1225
|
-
className: "flex items-center gap-1.5",
|
|
1226
|
-
children: [
|
|
1227
|
-
/* @__PURE__ */ jsx(ChipToggle, {
|
|
1228
|
-
active: ask.correct === c.value,
|
|
1229
|
-
onClick: () => onChange({
|
|
1230
|
-
...ask,
|
|
1231
|
-
correct: c.value
|
|
1232
|
-
}),
|
|
1233
|
-
children: "β"
|
|
1234
|
-
}),
|
|
1235
|
-
/* @__PURE__ */ jsx(TextField, {
|
|
1236
|
-
value: c.label,
|
|
1237
|
-
placeholder: `option ${c.value}`,
|
|
1238
|
-
onChange: (v) => setChoice(i, { label: v }),
|
|
1239
|
-
className: "flex-1"
|
|
1240
|
-
}),
|
|
1241
|
-
choices.length > 2 && /* @__PURE__ */ jsx(SmallButton, {
|
|
1242
|
-
tone: "danger",
|
|
1243
|
-
onClick: () => onChange({
|
|
1244
|
-
...ask,
|
|
1245
|
-
choices: choices.filter((_, j) => j !== i)
|
|
1246
|
-
}),
|
|
1247
|
-
children: "β"
|
|
1248
|
-
})
|
|
1249
|
-
]
|
|
1250
|
-
}, i)),
|
|
1251
|
-
/* @__PURE__ */ jsx("div", {
|
|
1252
|
-
className: "flex flex-wrap gap-1.5",
|
|
1253
|
-
children: /* @__PURE__ */ jsx(SmallButton, {
|
|
1254
|
-
onClick: () => {
|
|
1255
|
-
const v = CHOICE_LETTERS[choices.length] ?? String(choices.length);
|
|
1256
|
-
onChange({
|
|
1257
|
-
...ask,
|
|
1258
|
-
choices: [...choices, {
|
|
1259
|
-
value: v,
|
|
1260
|
-
label: ""
|
|
1261
|
-
}]
|
|
1262
|
-
});
|
|
1263
|
-
},
|
|
1264
|
-
children: "+ option"
|
|
1265
|
-
})
|
|
1266
|
-
}),
|
|
1267
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1268
|
-
label: "Explain",
|
|
1269
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
1270
|
-
value: ask.explain ?? "",
|
|
1271
|
-
placeholder: "shown when correct",
|
|
1272
|
-
onChange: (v) => onChange({
|
|
1273
|
-
...ask,
|
|
1274
|
-
explain: v
|
|
1275
|
-
}),
|
|
1276
|
-
className: "flex-1"
|
|
1277
|
-
})
|
|
1278
|
-
})
|
|
1279
|
-
]
|
|
1280
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1281
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
1282
|
-
label: "Answer is",
|
|
1283
|
-
children: [/* @__PURE__ */ jsx(ChipToggle, {
|
|
1284
|
-
active: isNum,
|
|
1285
|
-
onClick: () => setAns({
|
|
1286
|
-
kind: "number",
|
|
1287
|
-
value: typeof ask.answer?.value === "number" ? ask.answer.value : 0
|
|
1288
|
-
}),
|
|
1289
|
-
children: "a number"
|
|
1290
|
-
}), /* @__PURE__ */ jsx(ChipToggle, {
|
|
1291
|
-
active: !isNum,
|
|
1292
|
-
onClick: () => setAns({
|
|
1293
|
-
kind: "expression",
|
|
1294
|
-
value: String(ask.answer?.value ?? "")
|
|
1295
|
-
}),
|
|
1296
|
-
children: "an expression"
|
|
1297
|
-
})]
|
|
1298
|
-
}),
|
|
1299
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
1300
|
-
label: "Correct value",
|
|
1301
|
-
children: [isNum ? /* @__PURE__ */ jsx(NumField, {
|
|
1302
|
-
value: Number(ask.answer?.value) || 0,
|
|
1303
|
-
onChange: (v) => setAns({ value: v })
|
|
1304
|
-
}) : /* @__PURE__ */ jsx(TextField, {
|
|
1305
|
-
value: String(ask.answer?.value ?? ""),
|
|
1306
|
-
mono: true,
|
|
1307
|
-
placeholder: "-0.5*x + 5",
|
|
1308
|
-
onChange: (v) => setAns({ value: v }),
|
|
1309
|
-
className: "flex-1"
|
|
1310
|
-
}), isNum && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
1311
|
-
className: "text-muted-foreground",
|
|
1312
|
-
children: "Β± tol"
|
|
1313
|
-
}), /* @__PURE__ */ jsx(NumField, {
|
|
1314
|
-
value: ask.answer?.tol ?? .01,
|
|
1315
|
-
onChange: (v) => setAns({ tol: v })
|
|
1316
|
-
})] })]
|
|
1317
|
-
}),
|
|
1318
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1319
|
-
label: "Hint",
|
|
1320
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
1321
|
-
value: ask.placeholder ?? "",
|
|
1322
|
-
placeholder: "placeholder e.g. y = ...",
|
|
1323
|
-
onChange: (v) => onChange({
|
|
1324
|
-
...ask,
|
|
1325
|
-
placeholder: v
|
|
1326
|
-
}),
|
|
1327
|
-
className: "flex-1"
|
|
1328
|
-
})
|
|
1329
|
-
})
|
|
1330
|
-
] })
|
|
1331
|
-
]
|
|
1332
|
-
});
|
|
1333
|
-
}
|
|
1334
|
-
const InteractiveProblemBlock = defineBlock({
|
|
1335
|
-
key: "interactive-problem",
|
|
1336
|
-
void: true,
|
|
1337
|
-
label: "Interactive problem (engine)",
|
|
1338
|
-
description: "Author equations + sliders, derive roots/intersections/tangent/normal/area, and grade a typed answer, no code.",
|
|
1339
|
-
category: "interactive",
|
|
1340
|
-
schema: z.object({
|
|
1341
|
-
equations: z.array(equationSchema).optional(),
|
|
1342
|
-
params: z.array(paramSchema).optional(),
|
|
1343
|
-
xRange: z.tuple([z.number(), z.number()]).optional(),
|
|
1344
|
-
yRange: z.union([z.tuple([z.number(), z.number()]), z.literal("auto")]).optional(),
|
|
1345
|
-
derive: z.array(deriveSchema).optional(),
|
|
1346
|
-
ask: askSchema.optional(),
|
|
1347
|
-
title: z.string().optional(),
|
|
1348
|
-
prompt: z.string().optional(),
|
|
1349
|
-
activity: z.string().optional()
|
|
1350
|
-
}),
|
|
1351
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
1352
|
-
const equations = asExprStrings(attributes.equations);
|
|
1353
|
-
const params = asParams(attributes.params);
|
|
1354
|
-
const xRange = attributes.xRange ?? [-6.5, 6.5];
|
|
1355
|
-
const yRange = attributes.yRange ?? "auto";
|
|
1356
|
-
const derive = Array.isArray(attributes.derive) ? attributes.derive : [];
|
|
1357
|
-
const ask = attributes.ask;
|
|
1358
|
-
const widget = /* @__PURE__ */ jsx(InteractiveProblem, {
|
|
1359
|
-
equations,
|
|
1360
|
-
params,
|
|
1361
|
-
xRange,
|
|
1362
|
-
yRange,
|
|
1363
|
-
derive,
|
|
1364
|
-
ask,
|
|
1365
|
-
title: attributes.title ?? "Interactive problem",
|
|
1366
|
-
prompt: attributes.prompt,
|
|
1367
|
-
activity: attributes.activity ?? "interactive-problem"
|
|
1368
|
-
});
|
|
1369
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
1370
|
-
const upd = updateAttributes;
|
|
1371
|
-
const setEq = (i, v) => updateAttributes({ equations: equations.map((e, j) => j === i ? v : e) });
|
|
1372
|
-
const setParam = (i, patch) => updateAttributes({ params: params.map((p, j) => j === i ? {
|
|
1373
|
-
...p,
|
|
1374
|
-
...patch
|
|
1375
|
-
} : p) });
|
|
1376
|
-
const setDerive = (i, patch) => upd({ derive: derive.map((d, j) => j === i ? {
|
|
1377
|
-
...d,
|
|
1378
|
-
...patch
|
|
1379
|
-
} : d) });
|
|
1380
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
1381
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1382
|
-
label: "Title",
|
|
1383
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
1384
|
-
value: attributes.title ?? "",
|
|
1385
|
-
placeholder: "Interactive problem",
|
|
1386
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
1387
|
-
className: "flex-1"
|
|
1388
|
-
})
|
|
1389
|
-
}),
|
|
1390
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1391
|
-
label: "Prompt",
|
|
1392
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
1393
|
-
value: attributes.prompt ?? "",
|
|
1394
|
-
placeholder: "what the learner does",
|
|
1395
|
-
onChange: (v) => updateAttributes({ prompt: v }),
|
|
1396
|
-
className: "flex-1"
|
|
1397
|
-
})
|
|
1398
|
-
}),
|
|
1399
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1400
|
-
className: "space-y-1.5",
|
|
1401
|
-
children: [
|
|
1402
|
-
/* @__PURE__ */ jsx("span", {
|
|
1403
|
-
className: "font-medium text-muted-foreground",
|
|
1404
|
-
children: "Equations (use x and your slider names)"
|
|
1405
|
-
}),
|
|
1406
|
-
equations.map((eq, i) => /* @__PURE__ */ jsxs("div", {
|
|
1407
|
-
className: "flex items-center gap-2",
|
|
1408
|
-
children: [
|
|
1409
|
-
/* @__PURE__ */ jsxs("span", {
|
|
1410
|
-
className: "font-mono text-muted-foreground",
|
|
1411
|
-
children: [i, ": y ="]
|
|
1412
|
-
}),
|
|
1413
|
-
/* @__PURE__ */ jsx(TextField, {
|
|
1414
|
-
value: eq,
|
|
1415
|
-
mono: true,
|
|
1416
|
-
placeholder: "abs(p*x - q)",
|
|
1417
|
-
onChange: (v) => setEq(i, v),
|
|
1418
|
-
className: "flex-1"
|
|
1419
|
-
}),
|
|
1420
|
-
equations.length > 1 && /* @__PURE__ */ jsx(SmallButton, {
|
|
1421
|
-
tone: "danger",
|
|
1422
|
-
onClick: () => updateAttributes({ equations: equations.filter((_, j) => j !== i) }),
|
|
1423
|
-
children: "β"
|
|
1424
|
-
})
|
|
1425
|
-
]
|
|
1426
|
-
}, i)),
|
|
1427
|
-
/* @__PURE__ */ jsx(SmallButton, {
|
|
1428
|
-
onClick: () => updateAttributes({ equations: [...equations, ""] }),
|
|
1429
|
-
children: "+ equation"
|
|
1430
|
-
})
|
|
1431
|
-
]
|
|
1432
|
-
}),
|
|
1433
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1434
|
-
className: "space-y-1.5",
|
|
1435
|
-
children: [
|
|
1436
|
-
/* @__PURE__ */ jsx("span", {
|
|
1437
|
-
className: "font-medium text-muted-foreground",
|
|
1438
|
-
children: "Sliders (learner-draggable)"
|
|
1439
|
-
}),
|
|
1440
|
-
params.map((p, i) => /* @__PURE__ */ jsxs("div", {
|
|
1441
|
-
className: "flex flex-wrap items-center gap-1.5",
|
|
1442
|
-
children: [
|
|
1443
|
-
/* @__PURE__ */ jsx(TextField, {
|
|
1444
|
-
value: p.name,
|
|
1445
|
-
mono: true,
|
|
1446
|
-
placeholder: "k",
|
|
1447
|
-
onChange: (v) => setParam(i, { name: v }),
|
|
1448
|
-
className: "w-14"
|
|
1449
|
-
}),
|
|
1450
|
-
/* @__PURE__ */ jsx("span", {
|
|
1451
|
-
className: "text-muted-foreground",
|
|
1452
|
-
children: "from"
|
|
1453
|
-
}),
|
|
1454
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1455
|
-
value: p.min,
|
|
1456
|
-
onChange: (v) => setParam(i, { min: v })
|
|
1457
|
-
}),
|
|
1458
|
-
/* @__PURE__ */ jsx("span", {
|
|
1459
|
-
className: "text-muted-foreground",
|
|
1460
|
-
children: "to"
|
|
1461
|
-
}),
|
|
1462
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1463
|
-
value: p.max,
|
|
1464
|
-
onChange: (v) => setParam(i, { max: v })
|
|
1465
|
-
}),
|
|
1466
|
-
/* @__PURE__ */ jsx("span", {
|
|
1467
|
-
className: "text-muted-foreground",
|
|
1468
|
-
children: "="
|
|
1469
|
-
}),
|
|
1470
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1471
|
-
value: p.value,
|
|
1472
|
-
onChange: (v) => setParam(i, { value: v })
|
|
1473
|
-
}),
|
|
1474
|
-
/* @__PURE__ */ jsx(SmallButton, {
|
|
1475
|
-
tone: "danger",
|
|
1476
|
-
onClick: () => updateAttributes({ params: params.filter((_, j) => j !== i) }),
|
|
1477
|
-
children: "β"
|
|
1478
|
-
})
|
|
1479
|
-
]
|
|
1480
|
-
}, i)),
|
|
1481
|
-
/* @__PURE__ */ jsx(SmallButton, {
|
|
1482
|
-
onClick: () => updateAttributes({ params: [...params, {
|
|
1483
|
-
name: nextParamName(params),
|
|
1484
|
-
min: 0,
|
|
1485
|
-
max: 10,
|
|
1486
|
-
value: 1,
|
|
1487
|
-
step: 1
|
|
1488
|
-
}] }),
|
|
1489
|
-
children: "+ slider"
|
|
1490
|
-
})
|
|
1491
|
-
]
|
|
1492
|
-
}),
|
|
1493
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1494
|
-
className: "space-y-1.5",
|
|
1495
|
-
children: [
|
|
1496
|
-
/* @__PURE__ */ jsx("span", {
|
|
1497
|
-
className: "font-medium text-muted-foreground",
|
|
1498
|
-
children: "Derive (computed + drawn live)"
|
|
1499
|
-
}),
|
|
1500
|
-
derive.map((d, i) => {
|
|
1501
|
-
const kind = String(d.kind ?? "intersections");
|
|
1502
|
-
const ofA = Array.isArray(d.of) ? Number(d.of[0]) : Number(d.of ?? 0);
|
|
1503
|
-
const ofB = Array.isArray(d.of) ? Number(d.of[1] ?? 1) : 1;
|
|
1504
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1505
|
-
className: "flex flex-wrap items-center gap-1.5",
|
|
1506
|
-
children: [
|
|
1507
|
-
/* @__PURE__ */ jsx(SelectField, {
|
|
1508
|
-
value: kind,
|
|
1509
|
-
options: DERIVE_KINDS,
|
|
1510
|
-
onChange: (v) => setDerive(i, { kind: v })
|
|
1511
|
-
}),
|
|
1512
|
-
kind === "intersections" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1513
|
-
/* @__PURE__ */ jsx("span", {
|
|
1514
|
-
className: "text-muted-foreground",
|
|
1515
|
-
children: "of eq"
|
|
1516
|
-
}),
|
|
1517
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1518
|
-
value: ofA,
|
|
1519
|
-
onChange: (v) => setDerive(i, { of: [v, ofB] })
|
|
1520
|
-
}),
|
|
1521
|
-
/* @__PURE__ */ jsx("span", {
|
|
1522
|
-
className: "text-muted-foreground",
|
|
1523
|
-
children: "&"
|
|
1524
|
-
}),
|
|
1525
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1526
|
-
value: ofB,
|
|
1527
|
-
onChange: (v) => setDerive(i, { of: [ofA, v] })
|
|
1528
|
-
})
|
|
1529
|
-
] }),
|
|
1530
|
-
kind === "roots" && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
1531
|
-
className: "text-muted-foreground",
|
|
1532
|
-
children: "of eq"
|
|
1533
|
-
}), /* @__PURE__ */ jsx(NumField, {
|
|
1534
|
-
value: Number(d.of ?? 0),
|
|
1535
|
-
onChange: (v) => setDerive(i, { of: v })
|
|
1536
|
-
})] }),
|
|
1537
|
-
(kind === "tangent" || kind === "normal") && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1538
|
-
/* @__PURE__ */ jsx("span", {
|
|
1539
|
-
className: "text-muted-foreground",
|
|
1540
|
-
children: "of eq"
|
|
1541
|
-
}),
|
|
1542
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1543
|
-
value: Number(d.of ?? 0),
|
|
1544
|
-
onChange: (v) => setDerive(i, { of: v })
|
|
1545
|
-
}),
|
|
1546
|
-
/* @__PURE__ */ jsx("span", {
|
|
1547
|
-
className: "text-muted-foreground",
|
|
1548
|
-
children: "at x"
|
|
1549
|
-
}),
|
|
1550
|
-
/* @__PURE__ */ jsx(TextField, {
|
|
1551
|
-
value: String(d.at ?? ""),
|
|
1552
|
-
mono: true,
|
|
1553
|
-
placeholder: "2 or a param",
|
|
1554
|
-
onChange: (v) => setDerive(i, { at: /^-?\d*\.?\d+$/.test(v) ? Number(v) : v }),
|
|
1555
|
-
className: "w-20"
|
|
1556
|
-
})
|
|
1557
|
-
] }),
|
|
1558
|
-
kind === "area" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1559
|
-
/* @__PURE__ */ jsx("span", {
|
|
1560
|
-
className: "text-muted-foreground",
|
|
1561
|
-
children: "eqs"
|
|
1562
|
-
}),
|
|
1563
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1564
|
-
value: Array.isArray(d.between) ? Number(d.between[0]) : 0,
|
|
1565
|
-
onChange: (v) => setDerive(i, { between: [v, Array.isArray(d.between) ? Number(d.between[1] ?? 1) : 1] })
|
|
1566
|
-
}),
|
|
1567
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1568
|
-
value: Array.isArray(d.between) ? Number(d.between[1] ?? 1) : 1,
|
|
1569
|
-
onChange: (v) => setDerive(i, { between: [Array.isArray(d.between) ? Number(d.between[0]) : 0, v] })
|
|
1570
|
-
})
|
|
1571
|
-
] }),
|
|
1572
|
-
/* @__PURE__ */ jsx(SmallButton, {
|
|
1573
|
-
tone: "danger",
|
|
1574
|
-
onClick: () => upd({ derive: derive.filter((_, j) => j !== i) }),
|
|
1575
|
-
children: "β"
|
|
1576
|
-
})
|
|
1577
|
-
]
|
|
1578
|
-
}, i);
|
|
1579
|
-
}),
|
|
1580
|
-
/* @__PURE__ */ jsx(SmallButton, {
|
|
1581
|
-
onClick: () => upd({ derive: [...derive, {
|
|
1582
|
-
kind: "intersections",
|
|
1583
|
-
of: [0, 1]
|
|
1584
|
-
}] }),
|
|
1585
|
-
children: "+ derive"
|
|
1586
|
-
})
|
|
1587
|
-
]
|
|
1588
|
-
}),
|
|
1589
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
1590
|
-
label: "x window",
|
|
1591
|
-
children: [
|
|
1592
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1593
|
-
value: xRange[0],
|
|
1594
|
-
onChange: (v) => updateAttributes({ xRange: [v, xRange[1]] })
|
|
1595
|
-
}),
|
|
1596
|
-
/* @__PURE__ */ jsx("span", {
|
|
1597
|
-
className: "text-muted-foreground",
|
|
1598
|
-
children: "to"
|
|
1599
|
-
}),
|
|
1600
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1601
|
-
value: xRange[1],
|
|
1602
|
-
onChange: (v) => updateAttributes({ xRange: [xRange[0], v] })
|
|
1603
|
-
})
|
|
1604
|
-
]
|
|
1605
|
-
}),
|
|
1606
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
1607
|
-
label: "y window",
|
|
1608
|
-
children: [
|
|
1609
|
-
/* @__PURE__ */ jsx(ChipToggle, {
|
|
1610
|
-
active: yRange === "auto",
|
|
1611
|
-
onClick: () => updateAttributes({ yRange: "auto" }),
|
|
1612
|
-
children: "auto"
|
|
1613
|
-
}),
|
|
1614
|
-
/* @__PURE__ */ jsx(ChipToggle, {
|
|
1615
|
-
active: yRange !== "auto",
|
|
1616
|
-
onClick: () => updateAttributes({ yRange: yRange === "auto" ? [-10, 10] : yRange }),
|
|
1617
|
-
children: "fixed"
|
|
1618
|
-
}),
|
|
1619
|
-
yRange !== "auto" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1620
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1621
|
-
value: yRange[0],
|
|
1622
|
-
onChange: (v) => updateAttributes({ yRange: [v, yRange[1]] })
|
|
1623
|
-
}),
|
|
1624
|
-
/* @__PURE__ */ jsx("span", {
|
|
1625
|
-
className: "text-muted-foreground",
|
|
1626
|
-
children: "to"
|
|
1627
|
-
}),
|
|
1628
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1629
|
-
value: yRange[1],
|
|
1630
|
-
onChange: (v) => updateAttributes({ yRange: [yRange[0], v] })
|
|
1631
|
-
})
|
|
1632
|
-
] })
|
|
1633
|
-
]
|
|
1634
|
-
}),
|
|
1635
|
-
/* @__PURE__ */ jsx(AskEditor, {
|
|
1636
|
-
ask,
|
|
1637
|
-
onChange: (a) => upd({ ask: a })
|
|
1638
|
-
})
|
|
1639
|
-
] }), widget] });
|
|
1640
|
-
}
|
|
1641
|
-
});
|
|
1642
|
-
const TriangleTrigBlock = defineBlock({
|
|
1643
|
-
key: "triangle-trig",
|
|
1644
|
-
void: true,
|
|
1645
|
-
label: "Triangle trig (elevation/depression)",
|
|
1646
|
-
description: "A right triangle for elevation/depression: give an angle + one side, solve the rest, grade a typed answer.",
|
|
1647
|
-
category: "interactive",
|
|
1648
|
-
schema: z.object({
|
|
1649
|
-
angleDeg: z.number().optional(),
|
|
1650
|
-
leg: z.number().optional(),
|
|
1651
|
-
legKind: z.enum(["opposite", "adjacent"]).optional(),
|
|
1652
|
-
mode: z.enum([
|
|
1653
|
-
"elevation",
|
|
1654
|
-
"depression",
|
|
1655
|
-
"plain"
|
|
1656
|
-
]).optional(),
|
|
1657
|
-
labels: z.object({
|
|
1658
|
-
opposite: z.string().optional(),
|
|
1659
|
-
adjacent: z.string().optional(),
|
|
1660
|
-
hypotenuse: z.string().optional(),
|
|
1661
|
-
angle: z.string().optional()
|
|
1662
|
-
}).optional(),
|
|
1663
|
-
drive: z.array(z.enum(["angle", "leg"])).optional(),
|
|
1664
|
-
ask: askSchema.optional(),
|
|
1665
|
-
title: z.string().optional(),
|
|
1666
|
-
prompt: z.string().optional(),
|
|
1667
|
-
activity: z.string().optional()
|
|
1668
|
-
}),
|
|
1669
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
1670
|
-
const a = attributes;
|
|
1671
|
-
const drive = Array.isArray(a.drive) ? a.drive : ["angle"];
|
|
1672
|
-
const labels = a.labels ?? {};
|
|
1673
|
-
const ask = attributes.ask;
|
|
1674
|
-
const widget = /* @__PURE__ */ jsx(TriangleTrig, {
|
|
1675
|
-
...a,
|
|
1676
|
-
drive,
|
|
1677
|
-
ask
|
|
1678
|
-
});
|
|
1679
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
1680
|
-
const upd = updateAttributes;
|
|
1681
|
-
const toggleDrive = (k) => updateAttributes({ drive: drive.includes(k) ? drive.filter((d) => d !== k) : [...drive, k] });
|
|
1682
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
1683
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1684
|
-
label: "Title",
|
|
1685
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
1686
|
-
value: a.title ?? "",
|
|
1687
|
-
placeholder: "Angle of depressionβ¦",
|
|
1688
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
1689
|
-
className: "flex-1"
|
|
1690
|
-
})
|
|
1691
|
-
}),
|
|
1692
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1693
|
-
label: "Angle ΞΈ (Β°)",
|
|
1694
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
1695
|
-
value: a.angleDeg ?? 31,
|
|
1696
|
-
onChange: (v) => updateAttributes({ angleDeg: v })
|
|
1697
|
-
})
|
|
1698
|
-
}),
|
|
1699
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
1700
|
-
label: "Given leg",
|
|
1701
|
-
children: [/* @__PURE__ */ jsx(NumField, {
|
|
1702
|
-
value: a.leg ?? 15,
|
|
1703
|
-
onChange: (v) => updateAttributes({ leg: v })
|
|
1704
|
-
}), /* @__PURE__ */ jsx(SelectField, {
|
|
1705
|
-
value: a.legKind ?? "opposite",
|
|
1706
|
-
options: ["opposite", "adjacent"],
|
|
1707
|
-
onChange: (v) => upd({ legKind: v })
|
|
1708
|
-
})]
|
|
1709
|
-
}),
|
|
1710
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1711
|
-
label: "Framing",
|
|
1712
|
-
children: /* @__PURE__ */ jsx(SelectField, {
|
|
1713
|
-
value: a.mode ?? "depression",
|
|
1714
|
-
options: [
|
|
1715
|
-
"depression",
|
|
1716
|
-
"elevation",
|
|
1717
|
-
"plain"
|
|
1718
|
-
],
|
|
1719
|
-
onChange: (v) => upd({ mode: v })
|
|
1720
|
-
})
|
|
1721
|
-
}),
|
|
1722
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
1723
|
-
label: "Labels",
|
|
1724
|
-
children: [/* @__PURE__ */ jsx(TextField, {
|
|
1725
|
-
value: labels.opposite ?? "",
|
|
1726
|
-
placeholder: "opposite",
|
|
1727
|
-
onChange: (v) => updateAttributes({ labels: {
|
|
1728
|
-
...labels,
|
|
1729
|
-
opposite: v
|
|
1730
|
-
} }),
|
|
1731
|
-
className: "w-24"
|
|
1732
|
-
}), /* @__PURE__ */ jsx(TextField, {
|
|
1733
|
-
value: labels.adjacent ?? "",
|
|
1734
|
-
placeholder: "adjacent",
|
|
1735
|
-
onChange: (v) => updateAttributes({ labels: {
|
|
1736
|
-
...labels,
|
|
1737
|
-
adjacent: v
|
|
1738
|
-
} }),
|
|
1739
|
-
className: "w-24"
|
|
1740
|
-
})]
|
|
1741
|
-
}),
|
|
1742
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
1743
|
-
label: "Draggable",
|
|
1744
|
-
children: [/* @__PURE__ */ jsx(ChipToggle, {
|
|
1745
|
-
active: drive.includes("angle"),
|
|
1746
|
-
onClick: () => toggleDrive("angle"),
|
|
1747
|
-
children: "angle"
|
|
1748
|
-
}), /* @__PURE__ */ jsx(ChipToggle, {
|
|
1749
|
-
active: drive.includes("leg"),
|
|
1750
|
-
onClick: () => toggleDrive("leg"),
|
|
1751
|
-
children: "given leg"
|
|
1752
|
-
})]
|
|
1753
|
-
}),
|
|
1754
|
-
/* @__PURE__ */ jsx(AskEditor, {
|
|
1755
|
-
ask,
|
|
1756
|
-
onChange: (a2) => upd({ ask: a2 })
|
|
1757
|
-
})
|
|
1758
|
-
] }), widget] });
|
|
1759
|
-
}
|
|
1760
|
-
});
|
|
1761
|
-
const pointSchema = z.object({
|
|
1762
|
-
x: z.number(),
|
|
1763
|
-
y: z.number()
|
|
1764
|
-
});
|
|
1765
|
-
const StraightLineBlock = defineBlock({
|
|
1766
|
-
key: "straight-line",
|
|
1767
|
-
tag: "StraightLine",
|
|
1768
|
-
void: true,
|
|
1769
|
-
label: "Straight line (y = mx + c, parallel/β₯, intercepts)",
|
|
1770
|
-
description: "Drag points/intercepts to build a line; covers gradientβintercept, two-point, intercept form, and parallel/perpendicular. Optional graded answer.",
|
|
1771
|
-
category: "interactive",
|
|
1772
|
-
schema: z.object({
|
|
1773
|
-
mode: z.enum([
|
|
1774
|
-
"two-point",
|
|
1775
|
-
"gradient-intercept",
|
|
1776
|
-
"intercept-form",
|
|
1777
|
-
"parallel",
|
|
1778
|
-
"perpendicular"
|
|
1779
|
-
]).optional(),
|
|
1780
|
-
pointA: pointSchema.optional(),
|
|
1781
|
-
pointB: pointSchema.optional(),
|
|
1782
|
-
given: z.object({
|
|
1783
|
-
m: z.number(),
|
|
1784
|
-
c: z.number()
|
|
1785
|
-
}).optional(),
|
|
1786
|
-
through: pointSchema.optional(),
|
|
1787
|
-
showDistance: z.boolean().optional(),
|
|
1788
|
-
snap: z.number().optional(),
|
|
1789
|
-
title: z.string().optional(),
|
|
1790
|
-
prompt: z.string().optional(),
|
|
1791
|
-
ask: labAskSchema.optional(),
|
|
1792
|
-
activity: z.string().optional()
|
|
1793
|
-
}),
|
|
1794
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
1795
|
-
const a = attributes;
|
|
1796
|
-
const ask = attributes.ask;
|
|
1797
|
-
const m = a.mode ?? "two-point";
|
|
1798
|
-
const given = a.given ?? {
|
|
1799
|
-
m: .5,
|
|
1800
|
-
c: 2
|
|
1801
|
-
};
|
|
1802
|
-
const widget = /* @__PURE__ */ jsx(StraightLineLab, { ...a });
|
|
1803
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
1804
|
-
const upd = updateAttributes;
|
|
1805
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
1806
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1807
|
-
label: "Title",
|
|
1808
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
1809
|
-
value: a.title ?? "",
|
|
1810
|
-
placeholder: "The straight line",
|
|
1811
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
1812
|
-
className: "flex-1"
|
|
1813
|
-
})
|
|
1814
|
-
}),
|
|
1815
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1816
|
-
label: "Form",
|
|
1817
|
-
children: /* @__PURE__ */ jsx(SelectField, {
|
|
1818
|
-
value: m,
|
|
1819
|
-
options: [
|
|
1820
|
-
"two-point",
|
|
1821
|
-
"gradient-intercept",
|
|
1822
|
-
"intercept-form",
|
|
1823
|
-
"parallel",
|
|
1824
|
-
"perpendicular"
|
|
1825
|
-
],
|
|
1826
|
-
onChange: (v) => upd({ mode: v })
|
|
1827
|
-
})
|
|
1828
|
-
}),
|
|
1829
|
-
(m === "parallel" || m === "perpendicular") && /* @__PURE__ */ jsxs(ConfigRow, {
|
|
1830
|
-
label: "Given line y =",
|
|
1831
|
-
children: [
|
|
1832
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1833
|
-
value: given.m,
|
|
1834
|
-
onChange: (v) => upd({ given: {
|
|
1835
|
-
...given,
|
|
1836
|
-
m: v
|
|
1837
|
-
} })
|
|
1838
|
-
}),
|
|
1839
|
-
/* @__PURE__ */ jsx("span", {
|
|
1840
|
-
className: "text-muted-foreground",
|
|
1841
|
-
children: "x +"
|
|
1842
|
-
}),
|
|
1843
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
1844
|
-
value: given.c,
|
|
1845
|
-
onChange: (v) => upd({ given: {
|
|
1846
|
-
...given,
|
|
1847
|
-
c: v
|
|
1848
|
-
} })
|
|
1849
|
-
})
|
|
1850
|
-
]
|
|
1851
|
-
}),
|
|
1852
|
-
m === "two-point" && /* @__PURE__ */ jsx(ConfigRow, {
|
|
1853
|
-
label: "Extras",
|
|
1854
|
-
children: /* @__PURE__ */ jsx(ChipToggle, {
|
|
1855
|
-
active: !!a.showDistance,
|
|
1856
|
-
onClick: () => upd({ showDistance: !a.showDistance }),
|
|
1857
|
-
children: "show |AB| + midpoint"
|
|
1858
|
-
})
|
|
1859
|
-
}),
|
|
1860
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1861
|
-
label: "Snap",
|
|
1862
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
1863
|
-
value: a.snap ?? 1,
|
|
1864
|
-
onChange: (v) => updateAttributes({ snap: v })
|
|
1865
|
-
})
|
|
1866
|
-
}),
|
|
1867
|
-
/* @__PURE__ */ jsx(LabAskEditor, {
|
|
1868
|
-
ask,
|
|
1869
|
-
onChange: (a2) => upd({ ask: a2 })
|
|
1870
|
-
})
|
|
1871
|
-
] }), widget] });
|
|
1872
|
-
}
|
|
1873
|
-
});
|
|
1874
|
-
const CircleBlock = defineBlock({
|
|
1875
|
-
key: "circle-geometry",
|
|
1876
|
-
tag: "CircleLab",
|
|
1877
|
-
void: true,
|
|
1878
|
-
label: "Circle ((xβa)Β² + (yβb)Β² = rΒ², tangent)",
|
|
1879
|
-
description: "Drag the centre and rim; live standard + expanded equation, optional tangent (β₯ to the radius). Optional graded answer.",
|
|
1880
|
-
category: "interactive",
|
|
1881
|
-
schema: z.object({
|
|
1882
|
-
center: pointSchema.optional(),
|
|
1883
|
-
radius: z.number().optional(),
|
|
1884
|
-
showTangent: z.boolean().optional(),
|
|
1885
|
-
showExpanded: z.boolean().optional(),
|
|
1886
|
-
tangentAngleDeg: z.number().optional(),
|
|
1887
|
-
snap: z.number().optional(),
|
|
1888
|
-
title: z.string().optional(),
|
|
1889
|
-
prompt: z.string().optional(),
|
|
1890
|
-
ask: labAskSchema.optional(),
|
|
1891
|
-
activity: z.string().optional()
|
|
1892
|
-
}),
|
|
1893
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
1894
|
-
const a = attributes;
|
|
1895
|
-
const ask = attributes.ask;
|
|
1896
|
-
const widget = /* @__PURE__ */ jsx(CircleLab, { ...a });
|
|
1897
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
1898
|
-
const upd = updateAttributes;
|
|
1899
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
1900
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1901
|
-
label: "Title",
|
|
1902
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
1903
|
-
value: a.title ?? "",
|
|
1904
|
-
placeholder: "The circle",
|
|
1905
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
1906
|
-
className: "flex-1"
|
|
1907
|
-
})
|
|
1908
|
-
}),
|
|
1909
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1910
|
-
label: "Radius",
|
|
1911
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
1912
|
-
value: a.radius ?? 4,
|
|
1913
|
-
onChange: (v) => updateAttributes({ radius: v })
|
|
1914
|
-
})
|
|
1915
|
-
}),
|
|
1916
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
1917
|
-
label: "Show",
|
|
1918
|
-
children: [/* @__PURE__ */ jsx(ChipToggle, {
|
|
1919
|
-
active: !!a.showExpanded,
|
|
1920
|
-
onClick: () => upd({ showExpanded: !a.showExpanded }),
|
|
1921
|
-
children: "expanded form"
|
|
1922
|
-
}), /* @__PURE__ */ jsx(ChipToggle, {
|
|
1923
|
-
active: !!a.showTangent,
|
|
1924
|
-
onClick: () => upd({ showTangent: !a.showTangent }),
|
|
1925
|
-
children: "tangent"
|
|
1926
|
-
})]
|
|
1927
|
-
}),
|
|
1928
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1929
|
-
label: "Snap",
|
|
1930
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
1931
|
-
value: a.snap ?? 1,
|
|
1932
|
-
onChange: (v) => updateAttributes({ snap: v })
|
|
1933
|
-
})
|
|
1934
|
-
}),
|
|
1935
|
-
/* @__PURE__ */ jsx(LabAskEditor, {
|
|
1936
|
-
ask,
|
|
1937
|
-
onChange: (a2) => upd({ ask: a2 })
|
|
1938
|
-
})
|
|
1939
|
-
] }), widget] });
|
|
1940
|
-
}
|
|
1941
|
-
});
|
|
1942
|
-
const ConicBlock = defineBlock({
|
|
1943
|
-
key: "conic",
|
|
1944
|
-
tag: "ConicLab",
|
|
1945
|
-
void: true,
|
|
1946
|
-
label: "Conic (parabola / ellipse / hyperbola / reciprocal)",
|
|
1947
|
-
description: "Drag a parabola (yΒ²=4ax, focus+directrix), an ellipse (xΒ²/aΒ²+yΒ²/bΒ²=1, foci), a hyperbola (xΒ²/aΒ²βyΒ²/bΒ²=1, asymptotes), or the reciprocal xy=c. Optional graded answer.",
|
|
1948
|
-
category: "interactive",
|
|
1949
|
-
schema: z.object({
|
|
1950
|
-
kind: z.enum([
|
|
1951
|
-
"parabola",
|
|
1952
|
-
"ellipse",
|
|
1953
|
-
"hyperbola",
|
|
1954
|
-
"rectangular"
|
|
1955
|
-
]).optional(),
|
|
1956
|
-
a: z.number().optional(),
|
|
1957
|
-
b: z.number().optional(),
|
|
1958
|
-
c: z.number().optional(),
|
|
1959
|
-
showFocusDirectrix: z.boolean().optional(),
|
|
1960
|
-
showAsymptotes: z.boolean().optional(),
|
|
1961
|
-
snap: z.number().optional(),
|
|
1962
|
-
title: z.string().optional(),
|
|
1963
|
-
prompt: z.string().optional(),
|
|
1964
|
-
ask: labAskSchema.optional(),
|
|
1965
|
-
activity: z.string().optional()
|
|
1966
|
-
}),
|
|
1967
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
1968
|
-
const a = attributes;
|
|
1969
|
-
const ask = attributes.ask;
|
|
1970
|
-
const k = a.kind ?? "parabola";
|
|
1971
|
-
const widget = /* @__PURE__ */ jsx(ConicLab, { ...a });
|
|
1972
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
1973
|
-
const upd = updateAttributes;
|
|
1974
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
1975
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1976
|
-
label: "Title",
|
|
1977
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
1978
|
-
value: a.title ?? "",
|
|
1979
|
-
placeholder: "The parabola",
|
|
1980
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
1981
|
-
className: "flex-1"
|
|
1982
|
-
})
|
|
1983
|
-
}),
|
|
1984
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
1985
|
-
label: "Curve",
|
|
1986
|
-
children: /* @__PURE__ */ jsx(SelectField, {
|
|
1987
|
-
value: k,
|
|
1988
|
-
options: [
|
|
1989
|
-
"parabola",
|
|
1990
|
-
"ellipse",
|
|
1991
|
-
"hyperbola",
|
|
1992
|
-
"rectangular"
|
|
1993
|
-
],
|
|
1994
|
-
onChange: (v) => upd({ kind: v })
|
|
1995
|
-
})
|
|
1996
|
-
}),
|
|
1997
|
-
k === "parabola" && /* @__PURE__ */ jsx(ConfigRow, {
|
|
1998
|
-
label: "a",
|
|
1999
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
2000
|
-
value: a.a ?? 1,
|
|
2001
|
-
onChange: (v) => updateAttributes({ a: v })
|
|
2002
|
-
})
|
|
2003
|
-
}),
|
|
2004
|
-
k === "ellipse" && /* @__PURE__ */ jsxs(ConfigRow, {
|
|
2005
|
-
label: "a, b",
|
|
2006
|
-
children: [/* @__PURE__ */ jsx(NumField, {
|
|
2007
|
-
value: a.a ?? 4,
|
|
2008
|
-
onChange: (v) => updateAttributes({ a: v })
|
|
2009
|
-
}), /* @__PURE__ */ jsx(NumField, {
|
|
2010
|
-
value: a.b ?? 2.5,
|
|
2011
|
-
onChange: (v) => updateAttributes({ b: v })
|
|
2012
|
-
})]
|
|
2013
|
-
}),
|
|
2014
|
-
k === "hyperbola" && /* @__PURE__ */ jsxs(ConfigRow, {
|
|
2015
|
-
label: "a, b",
|
|
2016
|
-
children: [/* @__PURE__ */ jsx(NumField, {
|
|
2017
|
-
value: a.a ?? 2,
|
|
2018
|
-
onChange: (v) => updateAttributes({ a: v })
|
|
2019
|
-
}), /* @__PURE__ */ jsx(NumField, {
|
|
2020
|
-
value: a.b ?? 1.5,
|
|
2021
|
-
onChange: (v) => updateAttributes({ b: v })
|
|
2022
|
-
})]
|
|
2023
|
-
}),
|
|
2024
|
-
k === "rectangular" && /* @__PURE__ */ jsx(ConfigRow, {
|
|
2025
|
-
label: "c",
|
|
2026
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
2027
|
-
value: a.c ?? 6,
|
|
2028
|
-
onChange: (v) => updateAttributes({ c: v })
|
|
2029
|
-
})
|
|
2030
|
-
}),
|
|
2031
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2032
|
-
label: "Snap",
|
|
2033
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
2034
|
-
value: a.snap ?? 1,
|
|
2035
|
-
onChange: (v) => updateAttributes({ snap: v })
|
|
2036
|
-
})
|
|
2037
|
-
}),
|
|
2038
|
-
/* @__PURE__ */ jsx(LabAskEditor, {
|
|
2039
|
-
ask,
|
|
2040
|
-
onChange: (a2) => upd({ ask: a2 })
|
|
2041
|
-
})
|
|
2042
|
-
] }), widget] });
|
|
2043
|
-
}
|
|
2044
|
-
});
|
|
2045
|
-
const DomainRangeBlock = defineBlock({
|
|
2046
|
-
key: "domain-range",
|
|
2047
|
-
tag: "DomainRange",
|
|
2048
|
-
void: true,
|
|
2049
|
-
label: "Domain & range (the two shadows)",
|
|
2050
|
-
description: "Type any f(x); the curve casts a domain shadow (x-axis) and range shadow (y-axis). Drag the input probe: green = accepted, red = undefined. Teaches every domain type.",
|
|
2051
|
-
category: "interactive",
|
|
2052
|
-
schema: z.object({
|
|
2053
|
-
equation: z.string().optional(),
|
|
2054
|
-
xRange: z.tuple([z.number(), z.number()]).optional(),
|
|
2055
|
-
restrict: z.tuple([z.number(), z.number()]).optional(),
|
|
2056
|
-
probe: z.number().optional(),
|
|
2057
|
-
title: z.string().optional(),
|
|
2058
|
-
prompt: z.string().optional(),
|
|
2059
|
-
ask: labAskSchema.optional(),
|
|
2060
|
-
activity: z.string().optional()
|
|
2061
|
-
}),
|
|
2062
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
2063
|
-
const a = attributes;
|
|
2064
|
-
const ask = attributes.ask;
|
|
2065
|
-
const xR = a.xRange ?? [-6, 6];
|
|
2066
|
-
const restricted = Array.isArray(a.restrict);
|
|
2067
|
-
const widget = /* @__PURE__ */ jsx(DomainRangeLab, { ...a });
|
|
2068
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
2069
|
-
const upd = updateAttributes;
|
|
2070
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
2071
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2072
|
-
label: "Title",
|
|
2073
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
2074
|
-
value: a.title ?? "",
|
|
2075
|
-
placeholder: "Domain & range",
|
|
2076
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
2077
|
-
className: "flex-1"
|
|
2078
|
-
})
|
|
2079
|
-
}),
|
|
2080
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2081
|
-
label: "f(x) =",
|
|
2082
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
2083
|
-
value: a.equation ?? "",
|
|
2084
|
-
mono: true,
|
|
2085
|
-
placeholder: "sqrt(9 - x^2)",
|
|
2086
|
-
onChange: (v) => updateAttributes({ equation: v }),
|
|
2087
|
-
className: "flex-1"
|
|
2088
|
-
})
|
|
2089
|
-
}),
|
|
2090
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
2091
|
-
label: "x window",
|
|
2092
|
-
children: [
|
|
2093
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2094
|
-
value: xR[0],
|
|
2095
|
-
onChange: (v) => updateAttributes({ xRange: [v, xR[1]] })
|
|
2096
|
-
}),
|
|
2097
|
-
/* @__PURE__ */ jsx("span", {
|
|
2098
|
-
className: "text-muted-foreground",
|
|
2099
|
-
children: "to"
|
|
2100
|
-
}),
|
|
2101
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2102
|
-
value: xR[1],
|
|
2103
|
-
onChange: (v) => updateAttributes({ xRange: [xR[0], v] })
|
|
2104
|
-
})
|
|
2105
|
-
]
|
|
2106
|
-
}),
|
|
2107
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
2108
|
-
label: "Restrict domain",
|
|
2109
|
-
children: [
|
|
2110
|
-
/* @__PURE__ */ jsx(ChipToggle, {
|
|
2111
|
-
active: !restricted,
|
|
2112
|
-
onClick: () => upd({ restrict: void 0 }),
|
|
2113
|
-
children: "none"
|
|
2114
|
-
}),
|
|
2115
|
-
/* @__PURE__ */ jsx(ChipToggle, {
|
|
2116
|
-
active: restricted,
|
|
2117
|
-
onClick: () => upd({ restrict: a.restrict ?? [-2, 2] }),
|
|
2118
|
-
children: "interval"
|
|
2119
|
-
}),
|
|
2120
|
-
restricted && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2121
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2122
|
-
value: a.restrict[0],
|
|
2123
|
-
onChange: (v) => upd({ restrict: [v, a.restrict[1]] })
|
|
2124
|
-
}),
|
|
2125
|
-
/* @__PURE__ */ jsx("span", {
|
|
2126
|
-
className: "text-muted-foreground",
|
|
2127
|
-
children: "to"
|
|
2128
|
-
}),
|
|
2129
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2130
|
-
value: a.restrict[1],
|
|
2131
|
-
onChange: (v) => upd({ restrict: [a.restrict[0], v] })
|
|
2132
|
-
})
|
|
2133
|
-
] })
|
|
2134
|
-
]
|
|
2135
|
-
}),
|
|
2136
|
-
/* @__PURE__ */ jsx(LabAskEditor, {
|
|
2137
|
-
ask,
|
|
2138
|
-
onChange: (a2) => upd({ ask: a2 })
|
|
2139
|
-
})
|
|
2140
|
-
] }), widget] });
|
|
2141
|
-
}
|
|
2142
|
-
});
|
|
2143
|
-
const LinearModelBlock = defineBlock({
|
|
2144
|
-
key: "linear-model",
|
|
2145
|
-
tag: "LinearModel",
|
|
2146
|
-
void: true,
|
|
2147
|
-
label: "Proportion / rate (marbles β volume)",
|
|
2148
|
-
description: "A concrete scene (a beaker filling with marbles) linked to a graph: drag the point to predict the value at the next input. Discover y = rateΒ·x + base from data. Optional graded follow-up.",
|
|
2149
|
-
category: "interactive",
|
|
2150
|
-
schema: z.object({
|
|
2151
|
-
slope: z.number().default(5),
|
|
2152
|
-
intercept: z.number().default(10),
|
|
2153
|
-
predictX: z.number().default(2),
|
|
2154
|
-
xMax: z.number().default(6),
|
|
2155
|
-
yMax: z.number().default(40),
|
|
2156
|
-
yStep: z.number().default(5),
|
|
2157
|
-
xLabel: z.string().default("Marbles"),
|
|
2158
|
-
yLabel: z.string().default("Volume"),
|
|
2159
|
-
unit: z.string().default("mL"),
|
|
2160
|
-
scene: z.string().default("vessel"),
|
|
2161
|
-
vesselObjects: z.boolean().default(true),
|
|
2162
|
-
vesselBinds: z.enum(["guess", "truth"]).default("guess"),
|
|
2163
|
-
objectLabel: z.string().optional(),
|
|
2164
|
-
title: z.string().optional(),
|
|
2165
|
-
prompt: z.string().optional(),
|
|
2166
|
-
ask: labAskSchema.optional(),
|
|
2167
|
-
activity: z.string().optional()
|
|
2168
|
-
}),
|
|
2169
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
2170
|
-
const a = attributes;
|
|
2171
|
-
const ask = attributes.ask;
|
|
2172
|
-
const predictX = a.predictX ?? 2;
|
|
2173
|
-
const given = Array.from({ length: Math.max(1, predictX) }, (_, i) => i);
|
|
2174
|
-
const widget = /* @__PURE__ */ jsx(LinearModelLab, {
|
|
2175
|
-
...a,
|
|
2176
|
-
predictX,
|
|
2177
|
-
given
|
|
2178
|
-
});
|
|
2179
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
2180
|
-
const upd = updateAttributes;
|
|
2181
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
2182
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2183
|
-
label: "Title",
|
|
2184
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
2185
|
-
value: a.title ?? "",
|
|
2186
|
-
placeholder: "Find the volume",
|
|
2187
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
2188
|
-
className: "flex-1"
|
|
2189
|
-
})
|
|
2190
|
-
}),
|
|
2191
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
2192
|
-
label: "Rule: y =",
|
|
2193
|
-
children: [
|
|
2194
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2195
|
-
value: a.slope ?? 5,
|
|
2196
|
-
onChange: (v) => updateAttributes({ slope: v })
|
|
2197
|
-
}),
|
|
2198
|
-
/* @__PURE__ */ jsx("span", {
|
|
2199
|
-
className: "text-muted-foreground",
|
|
2200
|
-
children: "Β· x +"
|
|
2201
|
-
}),
|
|
2202
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2203
|
-
value: a.intercept ?? 10,
|
|
2204
|
-
onChange: (v) => updateAttributes({ intercept: v })
|
|
2205
|
-
})
|
|
2206
|
-
]
|
|
2207
|
-
}),
|
|
2208
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2209
|
-
label: "Predict at x =",
|
|
2210
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
2211
|
-
value: predictX,
|
|
2212
|
-
onChange: (v) => updateAttributes({ predictX: v })
|
|
2213
|
-
})
|
|
2214
|
-
}),
|
|
2215
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
2216
|
-
label: "Axis labels",
|
|
2217
|
-
children: [/* @__PURE__ */ jsx(TextField, {
|
|
2218
|
-
value: a.xLabel ?? "Marbles",
|
|
2219
|
-
onChange: (v) => updateAttributes({ xLabel: v }),
|
|
2220
|
-
className: "w-28"
|
|
2221
|
-
}), /* @__PURE__ */ jsx(TextField, {
|
|
2222
|
-
value: a.yLabel ?? "Volume",
|
|
2223
|
-
onChange: (v) => updateAttributes({ yLabel: v }),
|
|
2224
|
-
className: "w-28"
|
|
2225
|
-
})]
|
|
2226
|
-
}),
|
|
2227
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
2228
|
-
label: "x / y max",
|
|
2229
|
-
children: [/* @__PURE__ */ jsx(NumField, {
|
|
2230
|
-
value: a.xMax ?? 6,
|
|
2231
|
-
onChange: (v) => updateAttributes({ xMax: v })
|
|
2232
|
-
}), /* @__PURE__ */ jsx(NumField, {
|
|
2233
|
-
value: a.yMax ?? 40,
|
|
2234
|
-
onChange: (v) => updateAttributes({ yMax: v })
|
|
2235
|
-
})]
|
|
2236
|
-
}),
|
|
2237
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
2238
|
-
label: "y step / unit",
|
|
2239
|
-
children: [/* @__PURE__ */ jsx(NumField, {
|
|
2240
|
-
value: a.yStep ?? 5,
|
|
2241
|
-
onChange: (v) => updateAttributes({ yStep: v })
|
|
2242
|
-
}), /* @__PURE__ */ jsx(TextField, {
|
|
2243
|
-
value: a.unit ?? "mL",
|
|
2244
|
-
onChange: (v) => updateAttributes({ unit: v }),
|
|
2245
|
-
className: "w-20"
|
|
2246
|
-
})]
|
|
2247
|
-
}),
|
|
2248
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2249
|
-
label: "Concrete scene",
|
|
2250
|
-
children: /* @__PURE__ */ jsx(SelectField, {
|
|
2251
|
-
value: a.scene ?? "vessel",
|
|
2252
|
-
options: levelSceneOptions(),
|
|
2253
|
-
onChange: (v) => upd({ scene: v })
|
|
2254
|
-
})
|
|
2255
|
-
}),
|
|
2256
|
-
(a.scene ?? "vessel") === "vessel" && /* @__PURE__ */ jsxs(ConfigRow, {
|
|
2257
|
-
label: "Drop objects in",
|
|
2258
|
-
children: [/* @__PURE__ */ jsx(ChipToggle, {
|
|
2259
|
-
active: a.vesselObjects !== false,
|
|
2260
|
-
onClick: () => updateAttributes({ vesselObjects: !(a.vesselObjects !== false) }),
|
|
2261
|
-
children: a.vesselObjects !== false ? "objects (marbles)" : "just liquid"
|
|
2262
|
-
}), a.vesselObjects !== false && /* @__PURE__ */ jsx(TextField, {
|
|
2263
|
-
value: a.objectLabel ?? "",
|
|
2264
|
-
placeholder: "object word e.g. marbles",
|
|
2265
|
-
onChange: (v) => updateAttributes({ objectLabel: v }),
|
|
2266
|
-
className: "w-36"
|
|
2267
|
-
})]
|
|
2268
|
-
}),
|
|
2269
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2270
|
-
label: "Twin level follows",
|
|
2271
|
-
children: /* @__PURE__ */ jsx(ChipToggle, {
|
|
2272
|
-
active: (a.vesselBinds ?? "guess") === "guess",
|
|
2273
|
-
onClick: () => updateAttributes({ vesselBinds: (a.vesselBinds ?? "guess") === "guess" ? "truth" : "guess" }),
|
|
2274
|
-
children: (a.vesselBinds ?? "guess") === "guess" ? "your drag (rises & falls live)" : "the real lab level (you match it)"
|
|
2275
|
-
})
|
|
2276
|
-
}),
|
|
2277
|
-
/* @__PURE__ */ jsx(LabAskEditor, {
|
|
2278
|
-
ask,
|
|
2279
|
-
onChange: (a2) => upd({ ask: a2 })
|
|
2280
|
-
})
|
|
2281
|
-
] }), widget] });
|
|
2282
|
-
}
|
|
2283
|
-
});
|
|
2284
|
-
const SequencePredictBlock = defineBlock({
|
|
2285
|
-
key: "sequence-predict",
|
|
2286
|
-
tag: "SequencePredict",
|
|
2287
|
-
void: true,
|
|
2288
|
-
label: "Exponential / sequence (watch it grow)",
|
|
2289
|
-
description: "A count shown as a growing crowd of dots (3 β 6 β 12, new ones lit up); the learner tap-fills the hidden terms. Geometric (Γratio) or arithmetic (+difference). The \"joke that doubles\" lesson.",
|
|
2290
|
-
category: "interactive",
|
|
2291
|
-
schema: z.object({
|
|
2292
|
-
start: z.number().default(3),
|
|
2293
|
-
rule: z.enum(["geometric", "arithmetic"]).default("geometric"),
|
|
2294
|
-
factor: z.number().default(2),
|
|
2295
|
-
shown: z.number().default(1),
|
|
2296
|
-
predict: z.number().default(2),
|
|
2297
|
-
stepLabel: z.string().default("Day"),
|
|
2298
|
-
highlightNew: z.boolean().default(true),
|
|
2299
|
-
scene: z.string().default("cluster"),
|
|
2300
|
-
title: z.string().optional(),
|
|
2301
|
-
prompt: z.string().optional(),
|
|
2302
|
-
activity: z.string().optional()
|
|
2303
|
-
}),
|
|
2304
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
2305
|
-
const a = attributes;
|
|
2306
|
-
const r = a.rule ?? "geometric";
|
|
2307
|
-
const widget = /* @__PURE__ */ jsx(SequencePredict, { ...a });
|
|
2308
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
2309
|
-
const upd = updateAttributes;
|
|
2310
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
2311
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2312
|
-
label: "Title",
|
|
2313
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
2314
|
-
value: a.title ?? "",
|
|
2315
|
-
placeholder: "How does it grow?",
|
|
2316
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
2317
|
-
className: "flex-1"
|
|
2318
|
-
})
|
|
2319
|
-
}),
|
|
2320
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2321
|
-
label: "Story / prompt",
|
|
2322
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
2323
|
-
value: a.prompt ?? "",
|
|
2324
|
-
placeholder: "Each day the number doubles.",
|
|
2325
|
-
onChange: (v) => updateAttributes({ prompt: v }),
|
|
2326
|
-
className: "flex-1"
|
|
2327
|
-
})
|
|
2328
|
-
}),
|
|
2329
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2330
|
-
label: "Start value",
|
|
2331
|
-
children: /* @__PURE__ */ jsx(NumField, {
|
|
2332
|
-
value: a.start ?? 3,
|
|
2333
|
-
onChange: (v) => updateAttributes({ start: v })
|
|
2334
|
-
})
|
|
2335
|
-
}),
|
|
2336
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
2337
|
-
label: "Rule",
|
|
2338
|
-
children: [
|
|
2339
|
-
/* @__PURE__ */ jsx(SelectField, {
|
|
2340
|
-
value: r,
|
|
2341
|
-
options: ["geometric", "arithmetic"],
|
|
2342
|
-
onChange: (v) => upd({ rule: v })
|
|
2343
|
-
}),
|
|
2344
|
-
/* @__PURE__ */ jsx("span", {
|
|
2345
|
-
className: "text-muted-foreground",
|
|
2346
|
-
children: r === "geometric" ? "Γ by" : "+ by"
|
|
2347
|
-
}),
|
|
2348
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2349
|
-
value: a.factor ?? 2,
|
|
2350
|
-
onChange: (v) => updateAttributes({ factor: v })
|
|
2351
|
-
})
|
|
2352
|
-
]
|
|
2353
|
-
}),
|
|
2354
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
2355
|
-
label: "Shown / predict",
|
|
2356
|
-
children: [/* @__PURE__ */ jsx(NumField, {
|
|
2357
|
-
value: a.shown ?? 1,
|
|
2358
|
-
onChange: (v) => updateAttributes({ shown: v })
|
|
2359
|
-
}), /* @__PURE__ */ jsx(NumField, {
|
|
2360
|
-
value: a.predict ?? 2,
|
|
2361
|
-
onChange: (v) => updateAttributes({ predict: v })
|
|
2362
|
-
})]
|
|
2363
|
-
}),
|
|
2364
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2365
|
-
label: "Step label",
|
|
2366
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
2367
|
-
value: a.stepLabel ?? "Day",
|
|
2368
|
-
onChange: (v) => updateAttributes({ stepLabel: v }),
|
|
2369
|
-
className: "w-28"
|
|
2370
|
-
})
|
|
2371
|
-
}),
|
|
2372
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2373
|
-
label: "Count scene",
|
|
2374
|
-
children: /* @__PURE__ */ jsx(SelectField, {
|
|
2375
|
-
value: a.scene ?? "cluster",
|
|
2376
|
-
options: countSceneOptions(),
|
|
2377
|
-
onChange: (v) => upd({ scene: v })
|
|
2378
|
-
})
|
|
2379
|
-
}),
|
|
2380
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2381
|
-
label: "Highlight new",
|
|
2382
|
-
children: /* @__PURE__ */ jsx(ChipToggle, {
|
|
2383
|
-
active: a.highlightNew !== false,
|
|
2384
|
-
onClick: () => updateAttributes({ highlightNew: !(a.highlightNew !== false) }),
|
|
2385
|
-
children: "light up added"
|
|
2386
|
-
})
|
|
2387
|
-
})
|
|
2388
|
-
] }), widget] });
|
|
2389
|
-
}
|
|
2390
|
-
});
|
|
2391
|
-
const PercentBarBlock = labBlock({
|
|
2392
|
-
key: "percent-bar",
|
|
2393
|
-
label: "Percentage bar",
|
|
2394
|
-
description: "A bar is the whole (100%); drag the fill to a target percent and read both the percent and the amount (percent Γ whole). Author any analogy via whole + unit + an optional segment breakdown.",
|
|
2395
|
-
schema: z.object({
|
|
2396
|
-
whole: z.number().default(100),
|
|
2397
|
-
unit: z.string().default(""),
|
|
2398
|
-
target: z.number().optional(),
|
|
2399
|
-
start: z.number().default(0),
|
|
2400
|
-
snapPct: z.number().default(5),
|
|
2401
|
-
showValue: z.boolean().default(true),
|
|
2402
|
-
referenceLabel: z.string().optional(),
|
|
2403
|
-
segments: z.array(z.object({
|
|
2404
|
-
frac: z.number(),
|
|
2405
|
-
label: z.string().optional(),
|
|
2406
|
-
color: z.string().optional()
|
|
2407
|
-
})).optional(),
|
|
2408
|
-
scene: z.enum([
|
|
2409
|
-
"none",
|
|
2410
|
-
"pie",
|
|
2411
|
-
"battery",
|
|
2412
|
-
"jar",
|
|
2413
|
-
"balloon",
|
|
2414
|
-
"thermometer"
|
|
2415
|
-
]).default("none"),
|
|
2416
|
-
title: z.string().optional(),
|
|
2417
|
-
prompt: z.string().optional()
|
|
2418
|
-
}),
|
|
2419
|
-
Component: (a) => /* @__PURE__ */ jsx(PercentBarLab, { ...a })
|
|
2420
|
-
});
|
|
2421
|
-
const FractionBarBlock = labBlock({
|
|
2422
|
-
key: "fraction-bar",
|
|
2423
|
-
label: "Fraction strip",
|
|
2424
|
-
description: "A strip cut into equal parts; drag to shade k/n. Reads as fraction, decimal, percent and (with a whole) a quantity. An optional compare strip shows the equivalent fraction.",
|
|
2425
|
-
schema: z.object({
|
|
2426
|
-
denom: z.number().default(4),
|
|
2427
|
-
num: z.number().default(0),
|
|
2428
|
-
target: z.number().optional(),
|
|
2429
|
-
whole: z.number().optional(),
|
|
2430
|
-
unit: z.string().default(""),
|
|
2431
|
-
compareDenom: z.number().optional(),
|
|
2432
|
-
showEquiv: z.boolean().default(true),
|
|
2433
|
-
scene: z.enum([
|
|
2434
|
-
"none",
|
|
2435
|
-
"pie",
|
|
2436
|
-
"battery",
|
|
2437
|
-
"jar",
|
|
2438
|
-
"balloon",
|
|
2439
|
-
"thermometer"
|
|
2440
|
-
]).default("none"),
|
|
2441
|
-
title: z.string().optional(),
|
|
2442
|
-
prompt: z.string().optional()
|
|
2443
|
-
}),
|
|
2444
|
-
Component: (a) => /* @__PURE__ */ jsx(FractionBarLab, { ...a })
|
|
2445
|
-
});
|
|
2446
|
-
const RatioShareBlock = labBlock({
|
|
2447
|
-
key: "ratio-share",
|
|
2448
|
-
label: "Share in a ratio",
|
|
2449
|
-
description: "Split a quantity in the ratio a:b by dragging one divider. Reads back the amounts and the simplified ratio; any equivalent split (40:60 = 2:3) solves it.",
|
|
2450
|
-
schema: z.object({
|
|
2451
|
-
a: z.number().default(2),
|
|
2452
|
-
b: z.number().default(3),
|
|
2453
|
-
total: z.number().default(100),
|
|
2454
|
-
unit: z.string().default(""),
|
|
2455
|
-
labelA: z.string().default("A"),
|
|
2456
|
-
labelB: z.string().default("B"),
|
|
2457
|
-
step: z.number().default(1),
|
|
2458
|
-
scene: z.enum([
|
|
2459
|
-
"none",
|
|
2460
|
-
"pie",
|
|
2461
|
-
"battery",
|
|
2462
|
-
"jar",
|
|
2463
|
-
"balloon",
|
|
2464
|
-
"thermometer"
|
|
2465
|
-
]).default("none"),
|
|
2466
|
-
title: z.string().optional(),
|
|
2467
|
-
prompt: z.string().optional()
|
|
2468
|
-
}),
|
|
2469
|
-
Component: (a) => /* @__PURE__ */ jsx(RatioShareLab, { ...a })
|
|
2470
|
-
});
|
|
2471
|
-
const ComplexPlaneBlock = labBlock({
|
|
2472
|
-
key: "complex-plane",
|
|
2473
|
-
label: "Complex plane (Argand)",
|
|
2474
|
-
description: "Drag a + bi on the Argand plane: read the modulus and argument (deg & rad). Modes: point, multiply (Γi rotates 90Β°), power (De Moivre spiral), or roots (the nth-roots of unity 1, i, β1, βi, Ο).",
|
|
2475
|
-
schema: z.object({
|
|
2476
|
-
start: z.object({
|
|
2477
|
-
re: z.number(),
|
|
2478
|
-
im: z.number()
|
|
2479
|
-
}).optional(),
|
|
2480
|
-
mode: z.enum([
|
|
2481
|
-
"point",
|
|
2482
|
-
"multiply",
|
|
2483
|
-
"power",
|
|
2484
|
-
"roots"
|
|
2485
|
-
]).default("point"),
|
|
2486
|
-
rootsN: z.number().default(4),
|
|
2487
|
-
powerN: z.number().default(3),
|
|
2488
|
-
snap: z.number().default(1),
|
|
2489
|
-
range: z.number().default(6),
|
|
2490
|
-
target: z.object({
|
|
2491
|
-
re: z.number(),
|
|
2492
|
-
im: z.number()
|
|
2493
|
-
}).optional(),
|
|
2494
|
-
title: z.string().optional(),
|
|
2495
|
-
prompt: z.string().optional()
|
|
2496
|
-
}),
|
|
2497
|
-
Component: (a) => /* @__PURE__ */ jsx(ComplexPlaneLab, { ...a })
|
|
2498
|
-
});
|
|
2499
|
-
const TrigSignsBlock = labBlock({
|
|
2500
|
-
key: "trig-signs",
|
|
2501
|
-
label: "Unit circle β signs (CAST)",
|
|
2502
|
-
description: "Drag the angle on the unit circle: the quadrant lights up with its CAST letter (which of sin/cos/tan are +), cos and sin draw green/red by sign, and special angles show their exact value (Β½, β3β2 β¦).",
|
|
2503
|
-
schema: z.object({
|
|
2504
|
-
startDeg: z.number().default(30),
|
|
2505
|
-
snapDeg: z.number().default(15),
|
|
2506
|
-
targetDeg: z.number().optional(),
|
|
2507
|
-
title: z.string().optional(),
|
|
2508
|
-
prompt: z.string().optional()
|
|
2509
|
-
}),
|
|
2510
|
-
Component: (a) => /* @__PURE__ */ jsx(TrigSignsLab, { ...a })
|
|
2511
|
-
});
|
|
2512
|
-
const PolynomialSolverBlock = labBlock({
|
|
2513
|
-
key: "polynomial-solver",
|
|
2514
|
-
label: "Polynomial solver (factor / solve, step by step)",
|
|
2515
|
-
description: "Type a polynomial in x; the engine factors it or solves =0 and shows the working (split the middle term; factor theorem for higher degree). Any-degree roots incl. complex, client-side.",
|
|
2516
|
-
schema: z.object({
|
|
2517
|
-
expr: z.string().default("x^2 + 5x + 6"),
|
|
2518
|
-
mode: z.enum(["factor", "solve"]).default("factor"),
|
|
2519
|
-
editable: z.boolean().default(true),
|
|
2520
|
-
title: z.string().optional(),
|
|
2521
|
-
prompt: z.string().optional()
|
|
2522
|
-
}),
|
|
2523
|
-
Component: (a) => /* @__PURE__ */ jsx(PolynomialSolverLab, { ...a })
|
|
2524
|
-
});
|
|
2525
|
-
const RateMachineBlock = labBlock({
|
|
2526
|
-
key: "rate-machine",
|
|
2527
|
-
label: "Proportion machine (drag the count, it scales)",
|
|
2528
|
-
description: "Count-driven concrete β graph: drag the input up and down; objects drop into a vessel, the liquid level rises by the same rate each step, and a point rides up the line leaving a dot at every whole step. Proportionality you scrub. Skinnable (battery, jar, savings) and an optional \"set it to N\" goal.",
|
|
2529
|
-
schema: z.object({
|
|
2530
|
-
rate: z.number().default(5),
|
|
2531
|
-
base: z.number().default(0),
|
|
2532
|
-
maxCount: z.number().default(6),
|
|
2533
|
-
startCount: z.number().default(1),
|
|
2534
|
-
yMax: z.number().default(40),
|
|
2535
|
-
yStep: z.number().default(5),
|
|
2536
|
-
xLabel: z.string().default("Items"),
|
|
2537
|
-
yLabel: z.string().default("Cost"),
|
|
2538
|
-
unit: z.string().default("$"),
|
|
2539
|
-
itemLabel: z.string().optional(),
|
|
2540
|
-
scene: z.string().default("vessel"),
|
|
2541
|
-
showObjects: z.boolean().default(true),
|
|
2542
|
-
target: z.number().optional(),
|
|
2543
|
-
title: z.string().optional(),
|
|
2544
|
-
prompt: z.string().optional()
|
|
2545
|
-
}),
|
|
2546
|
-
Component: (a) => /* @__PURE__ */ jsx(RateMachineLab, { ...a })
|
|
2547
|
-
});
|
|
2548
|
-
const GeoTransformBlock = defineBlock({
|
|
2549
|
-
key: "geometry-transform",
|
|
2550
|
-
tag: "GeoTransform",
|
|
2551
|
-
void: true,
|
|
2552
|
-
label: "Transformations (translate / reflect / rotate / enlarge)",
|
|
2553
|
-
description: "Send a shape onto ghost targets by filling the transform from a tile tray; on a correct fill the shape flies to the targets. One lab, four transformation types.",
|
|
2554
|
-
category: "interactive",
|
|
2555
|
-
schema: z.object({
|
|
2556
|
-
kind: z.enum([
|
|
2557
|
-
"translate",
|
|
2558
|
-
"reflect",
|
|
2559
|
-
"rotate",
|
|
2560
|
-
"enlarge"
|
|
2561
|
-
]).default("translate"),
|
|
2562
|
-
byX: z.number().default(5),
|
|
2563
|
-
byY: z.number().default(1),
|
|
2564
|
-
axis: z.enum([
|
|
2565
|
-
"x",
|
|
2566
|
-
"y",
|
|
2567
|
-
"y=x",
|
|
2568
|
-
"y=-x"
|
|
2569
|
-
]).default("y"),
|
|
2570
|
-
deg: z.number().default(90),
|
|
2571
|
-
k: z.number().default(2),
|
|
2572
|
-
title: z.string().optional(),
|
|
2573
|
-
prompt: z.string().optional(),
|
|
2574
|
-
activity: z.string().optional()
|
|
2575
|
-
}),
|
|
2576
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
2577
|
-
const a = attributes;
|
|
2578
|
-
const kind = a.kind ?? "translate";
|
|
2579
|
-
const widget = /* @__PURE__ */ jsx(TransformLab, {
|
|
2580
|
-
transform: kind === "translate" ? {
|
|
2581
|
-
kind,
|
|
2582
|
-
by: {
|
|
2583
|
-
x: a.byX ?? 5,
|
|
2584
|
-
y: a.byY ?? 1
|
|
2585
|
-
}
|
|
2586
|
-
} : kind === "reflect" ? {
|
|
2587
|
-
kind,
|
|
2588
|
-
axis: a.axis ?? "y"
|
|
2589
|
-
} : kind === "rotate" ? {
|
|
2590
|
-
kind,
|
|
2591
|
-
deg: a.deg ?? 90,
|
|
2592
|
-
about: {
|
|
2593
|
-
x: 0,
|
|
2594
|
-
y: 0
|
|
2595
|
-
}
|
|
2596
|
-
} : {
|
|
2597
|
-
kind: "enlarge",
|
|
2598
|
-
k: a.k ?? 2,
|
|
2599
|
-
about: {
|
|
2600
|
-
x: 0,
|
|
2601
|
-
y: 0
|
|
2602
|
-
}
|
|
2603
|
-
},
|
|
2604
|
-
title: a.title,
|
|
2605
|
-
prompt: a.prompt,
|
|
2606
|
-
activity: attributes.activity
|
|
2607
|
-
});
|
|
2608
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
2609
|
-
const upd = updateAttributes;
|
|
2610
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
2611
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2612
|
-
label: "Title",
|
|
2613
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
2614
|
-
value: a.title ?? "",
|
|
2615
|
-
placeholder: "Transformations",
|
|
2616
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
2617
|
-
className: "flex-1"
|
|
2618
|
-
})
|
|
2619
|
-
}),
|
|
2620
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2621
|
-
label: "Type",
|
|
2622
|
-
children: /* @__PURE__ */ jsx(SelectField, {
|
|
2623
|
-
value: kind,
|
|
2624
|
-
options: [
|
|
2625
|
-
"translate",
|
|
2626
|
-
"reflect",
|
|
2627
|
-
"rotate",
|
|
2628
|
-
"enlarge"
|
|
2629
|
-
],
|
|
2630
|
-
onChange: (v) => upd({ kind: v })
|
|
2631
|
-
})
|
|
2632
|
-
}),
|
|
2633
|
-
kind === "translate" && /* @__PURE__ */ jsxs(ConfigRow, {
|
|
2634
|
-
label: "by (",
|
|
2635
|
-
children: [
|
|
2636
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2637
|
-
value: a.byX ?? 5,
|
|
2638
|
-
onChange: (v) => updateAttributes({ byX: v })
|
|
2639
|
-
}),
|
|
2640
|
-
/* @__PURE__ */ jsx("span", {
|
|
2641
|
-
className: "text-muted-foreground",
|
|
2642
|
-
children: ","
|
|
2643
|
-
}),
|
|
2644
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2645
|
-
value: a.byY ?? 1,
|
|
2646
|
-
onChange: (v) => updateAttributes({ byY: v })
|
|
2647
|
-
}),
|
|
2648
|
-
/* @__PURE__ */ jsx("span", {
|
|
2649
|
-
className: "text-muted-foreground",
|
|
2650
|
-
children: ")"
|
|
2651
|
-
})
|
|
2652
|
-
]
|
|
2653
|
-
}),
|
|
2654
|
-
kind === "reflect" && /* @__PURE__ */ jsx(ConfigRow, {
|
|
2655
|
-
label: "Mirror line",
|
|
2656
|
-
children: /* @__PURE__ */ jsx(SelectField, {
|
|
2657
|
-
value: a.axis ?? "y",
|
|
2658
|
-
options: [
|
|
2659
|
-
"x",
|
|
2660
|
-
"y",
|
|
2661
|
-
"y=x",
|
|
2662
|
-
"y=-x"
|
|
2663
|
-
],
|
|
2664
|
-
onChange: (v) => upd({ axis: v })
|
|
2665
|
-
})
|
|
2666
|
-
}),
|
|
2667
|
-
kind === "rotate" && /* @__PURE__ */ jsx(ConfigRow, {
|
|
2668
|
-
label: "Angle (Β° anticlockwise)",
|
|
2669
|
-
children: /* @__PURE__ */ jsx(SelectField, {
|
|
2670
|
-
value: String(a.deg ?? 90),
|
|
2671
|
-
options: [
|
|
2672
|
-
"90",
|
|
2673
|
-
"180",
|
|
2674
|
-
"270"
|
|
2675
|
-
],
|
|
2676
|
-
onChange: (v) => updateAttributes({ deg: Number(v) })
|
|
2677
|
-
})
|
|
2678
|
-
}),
|
|
2679
|
-
kind === "enlarge" && /* @__PURE__ */ jsx(ConfigRow, {
|
|
2680
|
-
label: "Scale factor",
|
|
2681
|
-
children: /* @__PURE__ */ jsx(SelectField, {
|
|
2682
|
-
value: String(a.k ?? 2),
|
|
2683
|
-
options: [
|
|
2684
|
-
"2",
|
|
2685
|
-
"3",
|
|
2686
|
-
"4"
|
|
2687
|
-
],
|
|
2688
|
-
onChange: (v) => updateAttributes({ k: Number(v) })
|
|
2689
|
-
})
|
|
2690
|
-
})
|
|
2691
|
-
] }), widget] });
|
|
2692
|
-
}
|
|
2693
|
-
});
|
|
2694
|
-
const receiptItemSchema = z.object({
|
|
2695
|
-
qty: z.number(),
|
|
2696
|
-
name: z.string(),
|
|
2697
|
-
unit: z.number()
|
|
2698
|
-
});
|
|
2699
|
-
const ReceiptBlock = defineBlock({
|
|
2700
|
-
key: "receipt-totals",
|
|
2701
|
-
tag: "ReceiptTotals",
|
|
2702
|
-
void: true,
|
|
2703
|
-
label: "Receipt totals (qty Γ price)",
|
|
2704
|
-
description: "A shop receipt where the learner tap-fills the total items and total cost; classic \"summed the prices, forgot the quantity\" distractors. Multiplicative + additive reasoning grounded in a real bill.",
|
|
2705
|
-
category: "interactive",
|
|
2706
|
-
schema: z.object({
|
|
2707
|
-
store: z.string().default("Half Foods"),
|
|
2708
|
-
currency: z.string().default("$"),
|
|
2709
|
-
items: z.array(receiptItemSchema).optional(),
|
|
2710
|
-
askItems: z.boolean().default(true),
|
|
2711
|
-
askCost: z.boolean().default(true),
|
|
2712
|
-
title: z.string().optional(),
|
|
2713
|
-
prompt: z.string().optional(),
|
|
2714
|
-
activity: z.string().optional()
|
|
2715
|
-
}),
|
|
2716
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
2717
|
-
const a = attributes;
|
|
2718
|
-
const items = Array.isArray(a.items) && a.items.length ? a.items : void 0;
|
|
2719
|
-
const widget = /* @__PURE__ */ jsx(ReceiptLab, {
|
|
2720
|
-
store: a.store,
|
|
2721
|
-
currency: a.currency,
|
|
2722
|
-
items,
|
|
2723
|
-
ask: {
|
|
2724
|
-
items: a.askItems !== false,
|
|
2725
|
-
cost: a.askCost !== false
|
|
2726
|
-
},
|
|
2727
|
-
title: a.title,
|
|
2728
|
-
prompt: a.prompt,
|
|
2729
|
-
activity: attributes.activity
|
|
2730
|
-
});
|
|
2731
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
2732
|
-
const list = items ?? [{
|
|
2733
|
-
qty: 6,
|
|
2734
|
-
name: "Pineapples",
|
|
2735
|
-
unit: 5
|
|
2736
|
-
}, {
|
|
2737
|
-
qty: 3,
|
|
2738
|
-
name: "Mangoes",
|
|
2739
|
-
unit: 2
|
|
2740
|
-
}];
|
|
2741
|
-
const setItem = (i, patch) => updateAttributes({ items: list.map((it, j) => j === i ? {
|
|
2742
|
-
...it,
|
|
2743
|
-
...patch
|
|
2744
|
-
} : it) });
|
|
2745
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
2746
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2747
|
-
label: "Store",
|
|
2748
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
2749
|
-
value: a.store ?? "Half Foods",
|
|
2750
|
-
onChange: (v) => updateAttributes({ store: v }),
|
|
2751
|
-
className: "flex-1"
|
|
2752
|
-
})
|
|
2753
|
-
}),
|
|
2754
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2755
|
-
label: "Currency",
|
|
2756
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
2757
|
-
value: a.currency ?? "$",
|
|
2758
|
-
onChange: (v) => updateAttributes({ currency: v }),
|
|
2759
|
-
className: "w-16"
|
|
2760
|
-
})
|
|
2761
|
-
}),
|
|
2762
|
-
/* @__PURE__ */ jsxs("div", {
|
|
2763
|
-
className: "space-y-1.5",
|
|
2764
|
-
children: [
|
|
2765
|
-
/* @__PURE__ */ jsx("span", {
|
|
2766
|
-
className: "font-medium text-muted-foreground",
|
|
2767
|
-
children: "Line items (qty Γ name @ price)"
|
|
2768
|
-
}),
|
|
2769
|
-
list.map((it, i) => /* @__PURE__ */ jsxs("div", {
|
|
2770
|
-
className: "flex flex-wrap items-center gap-1.5",
|
|
2771
|
-
children: [
|
|
2772
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2773
|
-
value: it.qty,
|
|
2774
|
-
onChange: (v) => setItem(i, { qty: v })
|
|
2775
|
-
}),
|
|
2776
|
-
/* @__PURE__ */ jsx(TextField, {
|
|
2777
|
-
value: it.name,
|
|
2778
|
-
placeholder: "Pineapples",
|
|
2779
|
-
onChange: (v) => setItem(i, { name: v }),
|
|
2780
|
-
className: "w-32"
|
|
2781
|
-
}),
|
|
2782
|
-
/* @__PURE__ */ jsx("span", {
|
|
2783
|
-
className: "text-muted-foreground",
|
|
2784
|
-
children: "@"
|
|
2785
|
-
}),
|
|
2786
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2787
|
-
value: it.unit,
|
|
2788
|
-
onChange: (v) => setItem(i, { unit: v })
|
|
2789
|
-
}),
|
|
2790
|
-
list.length > 1 && /* @__PURE__ */ jsx(SmallButton, {
|
|
2791
|
-
tone: "danger",
|
|
2792
|
-
onClick: () => updateAttributes({ items: list.filter((_, j) => j !== i) }),
|
|
2793
|
-
children: "β"
|
|
2794
|
-
})
|
|
2795
|
-
]
|
|
2796
|
-
}, i)),
|
|
2797
|
-
/* @__PURE__ */ jsx(SmallButton, {
|
|
2798
|
-
onClick: () => updateAttributes({ items: [...list, {
|
|
2799
|
-
qty: 1,
|
|
2800
|
-
name: "",
|
|
2801
|
-
unit: 1
|
|
2802
|
-
}] }),
|
|
2803
|
-
children: "+ item"
|
|
2804
|
-
})
|
|
2805
|
-
]
|
|
2806
|
-
}),
|
|
2807
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
2808
|
-
label: "Ask for",
|
|
2809
|
-
children: [/* @__PURE__ */ jsx(ChipToggle, {
|
|
2810
|
-
active: a.askItems !== false,
|
|
2811
|
-
onClick: () => updateAttributes({ askItems: !(a.askItems !== false) }),
|
|
2812
|
-
children: "total items"
|
|
2813
|
-
}), /* @__PURE__ */ jsx(ChipToggle, {
|
|
2814
|
-
active: a.askCost !== false,
|
|
2815
|
-
onClick: () => updateAttributes({ askCost: !(a.askCost !== false) }),
|
|
2816
|
-
children: "total cost"
|
|
2817
|
-
})]
|
|
2818
|
-
})
|
|
2819
|
-
] }), widget] });
|
|
2820
|
-
}
|
|
2821
|
-
});
|
|
2822
|
-
const SystemSolveBlock = defineBlock({
|
|
2823
|
-
key: "system-solve",
|
|
2824
|
-
tag: "SystemSolve",
|
|
2825
|
-
void: true,
|
|
2826
|
-
label: "System of equations (two clues, by elimination)",
|
|
2827
|
-
description: "Two unknowns, two clues, solved by elimination (not just the graph crossing). Swappable concrete scene: a shop receipt, a bucket balance, or algebra tiles. Creators theme the same maths any way.",
|
|
2828
|
-
category: "interactive",
|
|
2829
|
-
schema: z.object({
|
|
2830
|
-
scene: z.string().default("receipt"),
|
|
2831
|
-
symA: z.string().default("π"),
|
|
2832
|
-
labelA: z.string().default("Pineapple"),
|
|
2833
|
-
answerA: z.number().default(5),
|
|
2834
|
-
symB: z.string().default("π₯"),
|
|
2835
|
-
labelB: z.string().default("Mango"),
|
|
2836
|
-
answerB: z.number().default(2),
|
|
2837
|
-
a0: z.number().default(2),
|
|
2838
|
-
b0: z.number().default(1),
|
|
2839
|
-
a1: z.number().default(1),
|
|
2840
|
-
b1: z.number().default(1),
|
|
2841
|
-
currency: z.string().optional(),
|
|
2842
|
-
unit: z.string().optional(),
|
|
2843
|
-
store: z.string().optional(),
|
|
2844
|
-
title: z.string().optional(),
|
|
2845
|
-
prompt: z.string().optional(),
|
|
2846
|
-
activity: z.string().optional()
|
|
2847
|
-
}),
|
|
2848
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
2849
|
-
const a = attributes;
|
|
2850
|
-
const num = (k, d) => typeof a[k] === "number" ? a[k] : d;
|
|
2851
|
-
const str = (k, d) => typeof a[k] === "string" ? a[k] : d;
|
|
2852
|
-
const scene = str("scene", "receipt");
|
|
2853
|
-
const widget = /* @__PURE__ */ jsx(SystemSolveLab, {
|
|
2854
|
-
scene,
|
|
2855
|
-
unknowns: [{
|
|
2856
|
-
sym: str("symA", "π"),
|
|
2857
|
-
label: str("labelA", "Pineapple"),
|
|
2858
|
-
color: "var(--stage-warn)",
|
|
2859
|
-
answer: num("answerA", 5)
|
|
2860
|
-
}, {
|
|
2861
|
-
sym: str("symB", "π₯"),
|
|
2862
|
-
label: str("labelB", "Mango"),
|
|
2863
|
-
color: "var(--stage-good)",
|
|
2864
|
-
answer: num("answerB", 2)
|
|
2865
|
-
}],
|
|
2866
|
-
clues: [{ coeffs: [num("a0", 2), num("b0", 1)] }, { coeffs: [num("a1", 1), num("b1", 1)] }],
|
|
2867
|
-
currency: a.currency,
|
|
2868
|
-
unit: a.unit,
|
|
2869
|
-
store: a.store,
|
|
2870
|
-
title: a.title,
|
|
2871
|
-
prompt: a.prompt,
|
|
2872
|
-
activity: a.activity
|
|
2873
|
-
});
|
|
2874
|
-
if (mode !== "editing" || !updateAttributes) return widget;
|
|
2875
|
-
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
|
|
2876
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2877
|
-
label: "Title",
|
|
2878
|
-
children: /* @__PURE__ */ jsx(TextField, {
|
|
2879
|
-
value: str("title", ""),
|
|
2880
|
-
placeholder: "Two clues, two unknowns",
|
|
2881
|
-
onChange: (v) => updateAttributes({ title: v }),
|
|
2882
|
-
className: "flex-1"
|
|
2883
|
-
})
|
|
2884
|
-
}),
|
|
2885
|
-
/* @__PURE__ */ jsx(ConfigRow, {
|
|
2886
|
-
label: "Scene",
|
|
2887
|
-
children: /* @__PURE__ */ jsx(SelectField, {
|
|
2888
|
-
value: scene,
|
|
2889
|
-
options: clueSceneOptions(),
|
|
2890
|
-
onChange: (v) => updateAttributes({ scene: v })
|
|
2891
|
-
})
|
|
2892
|
-
}),
|
|
2893
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
2894
|
-
label: "Item A",
|
|
2895
|
-
children: [
|
|
2896
|
-
/* @__PURE__ */ jsx(TextField, {
|
|
2897
|
-
value: str("symA", "π"),
|
|
2898
|
-
onChange: (v) => updateAttributes({ symA: v }),
|
|
2899
|
-
className: "w-16"
|
|
2900
|
-
}),
|
|
2901
|
-
/* @__PURE__ */ jsx(TextField, {
|
|
2902
|
-
value: str("labelA", "Pineapple"),
|
|
2903
|
-
onChange: (v) => updateAttributes({ labelA: v }),
|
|
2904
|
-
className: "w-28"
|
|
2905
|
-
}),
|
|
2906
|
-
/* @__PURE__ */ jsx("span", {
|
|
2907
|
-
className: "text-muted-foreground",
|
|
2908
|
-
children: "="
|
|
2909
|
-
}),
|
|
2910
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2911
|
-
value: num("answerA", 5),
|
|
2912
|
-
onChange: (v) => updateAttributes({ answerA: v })
|
|
2913
|
-
})
|
|
2914
|
-
]
|
|
2915
|
-
}),
|
|
2916
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
2917
|
-
label: "Item B",
|
|
2918
|
-
children: [
|
|
2919
|
-
/* @__PURE__ */ jsx(TextField, {
|
|
2920
|
-
value: str("symB", "π₯"),
|
|
2921
|
-
onChange: (v) => updateAttributes({ symB: v }),
|
|
2922
|
-
className: "w-16"
|
|
2923
|
-
}),
|
|
2924
|
-
/* @__PURE__ */ jsx(TextField, {
|
|
2925
|
-
value: str("labelB", "Mango"),
|
|
2926
|
-
onChange: (v) => updateAttributes({ labelB: v }),
|
|
2927
|
-
className: "w-28"
|
|
2928
|
-
}),
|
|
2929
|
-
/* @__PURE__ */ jsx("span", {
|
|
2930
|
-
className: "text-muted-foreground",
|
|
2931
|
-
children: "="
|
|
2932
|
-
}),
|
|
2933
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2934
|
-
value: num("answerB", 2),
|
|
2935
|
-
onChange: (v) => updateAttributes({ answerB: v })
|
|
2936
|
-
})
|
|
2937
|
-
]
|
|
2938
|
-
}),
|
|
2939
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
2940
|
-
label: "Clue 1",
|
|
2941
|
-
children: [
|
|
2942
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2943
|
-
value: num("a0", 2),
|
|
2944
|
-
onChange: (v) => updateAttributes({ a0: v })
|
|
2945
|
-
}),
|
|
2946
|
-
/* @__PURE__ */ jsx("span", {
|
|
2947
|
-
className: "text-muted-foreground",
|
|
2948
|
-
children: "A +"
|
|
2949
|
-
}),
|
|
2950
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2951
|
-
value: num("b0", 1),
|
|
2952
|
-
onChange: (v) => updateAttributes({ b0: v })
|
|
2953
|
-
}),
|
|
2954
|
-
/* @__PURE__ */ jsx("span", {
|
|
2955
|
-
className: "text-muted-foreground",
|
|
2956
|
-
children: "B"
|
|
2957
|
-
})
|
|
2958
|
-
]
|
|
2959
|
-
}),
|
|
2960
|
-
/* @__PURE__ */ jsxs(ConfigRow, {
|
|
2961
|
-
label: "Clue 2",
|
|
2962
|
-
children: [
|
|
2963
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2964
|
-
value: num("a1", 1),
|
|
2965
|
-
onChange: (v) => updateAttributes({ a1: v })
|
|
2966
|
-
}),
|
|
2967
|
-
/* @__PURE__ */ jsx("span", {
|
|
2968
|
-
className: "text-muted-foreground",
|
|
2969
|
-
children: "A +"
|
|
2970
|
-
}),
|
|
2971
|
-
/* @__PURE__ */ jsx(NumField, {
|
|
2972
|
-
value: num("b1", 1),
|
|
2973
|
-
onChange: (v) => updateAttributes({ b1: v })
|
|
2974
|
-
}),
|
|
2975
|
-
/* @__PURE__ */ jsx("span", {
|
|
2976
|
-
className: "text-muted-foreground",
|
|
2977
|
-
children: "B"
|
|
2978
|
-
})
|
|
2979
|
-
]
|
|
2980
|
-
})
|
|
2981
|
-
] }), widget] });
|
|
2982
|
-
}
|
|
2983
|
-
});
|
|
2984
|
-
function customSceneSpec(a) {
|
|
2985
|
-
const name = typeof a.name === "string" && a.name.trim() || "custom";
|
|
2986
|
-
const label = typeof a.label === "string" && a.label.trim() ? a.label : void 0;
|
|
2987
|
-
const v = a.variant;
|
|
2988
|
-
if (v === "icons") return {
|
|
2989
|
-
name,
|
|
2990
|
-
label,
|
|
2991
|
-
kind: "level",
|
|
2992
|
-
icon: a.icon || "β",
|
|
2993
|
-
slots: Number(a.slots) || 5
|
|
2994
|
-
};
|
|
2995
|
-
if (v === "shape") return {
|
|
2996
|
-
name,
|
|
2997
|
-
label,
|
|
2998
|
-
kind: "level",
|
|
2999
|
-
shape: a.shape || "box",
|
|
3000
|
-
color: a.color || "#7c83ff"
|
|
3001
|
-
};
|
|
3002
|
-
return {
|
|
3003
|
-
name,
|
|
3004
|
-
label,
|
|
3005
|
-
kind: "count",
|
|
3006
|
-
icon: a.icon || "π΅"
|
|
3007
|
-
};
|
|
3008
|
-
}
|
|
3009
|
-
function customSceneAttrs(s) {
|
|
3010
|
-
if (s.kind === "count") return {
|
|
3011
|
-
name: s.name,
|
|
3012
|
-
label: s.label ?? "",
|
|
3013
|
-
variant: "count",
|
|
3014
|
-
icon: s.icon
|
|
3015
|
-
};
|
|
3016
|
-
if ("icon" in s) return {
|
|
3017
|
-
name: s.name,
|
|
3018
|
-
label: s.label ?? "",
|
|
3019
|
-
variant: "icons",
|
|
3020
|
-
icon: s.icon,
|
|
3021
|
-
slots: s.slots ?? 5
|
|
3022
|
-
};
|
|
3023
|
-
return {
|
|
3024
|
-
name: s.name,
|
|
3025
|
-
label: s.label ?? "",
|
|
3026
|
-
variant: "shape",
|
|
3027
|
-
shape: s.shape,
|
|
3028
|
-
color: s.color ?? "#7c83ff"
|
|
3029
|
-
};
|
|
3030
|
-
}
|
|
3031
|
-
const CustomSceneBlock = defineBlock({
|
|
3032
|
-
key: "custom-scene",
|
|
3033
|
-
tag: "CustomScene",
|
|
3034
|
-
void: true,
|
|
3035
|
-
label: "Custom scene (no-code lab skin)",
|
|
3036
|
-
description: "Invent a new lab skin from a form (an emoji or a shape) β no code. Place it ABOVE a lab and pick the new scene by name in that lab.",
|
|
3037
|
-
category: "interactive",
|
|
3038
|
-
schema: z.object({
|
|
3039
|
-
name: z.string().default("custom"),
|
|
3040
|
-
label: z.string().optional(),
|
|
3041
|
-
variant: z.enum([
|
|
3042
|
-
"count",
|
|
3043
|
-
"icons",
|
|
3044
|
-
"shape"
|
|
3045
|
-
]).default("count"),
|
|
3046
|
-
icon: z.string().default("π΅"),
|
|
3047
|
-
slots: z.number().default(5),
|
|
3048
|
-
shape: z.enum([
|
|
3049
|
-
"box",
|
|
3050
|
-
"cup",
|
|
3051
|
-
"circle"
|
|
3052
|
-
]).default("box"),
|
|
3053
|
-
color: z.string().default("#7c83ff")
|
|
3054
|
-
}),
|
|
3055
|
-
Component: ({ attributes, mode, updateAttributes }) => {
|
|
3056
|
-
const spec = customSceneSpec(attributes);
|
|
3057
|
-
registerDataScene(spec);
|
|
3058
|
-
if (mode !== "editing" || !updateAttributes) return /* @__PURE__ */ jsxs("div", {
|
|
3059
|
-
className: "not-prose",
|
|
3060
|
-
style: {
|
|
3061
|
-
padding: "8px 12px",
|
|
3062
|
-
borderRadius: 8,
|
|
3063
|
-
fontSize: 13,
|
|
3064
|
-
color: "var(--stage-good)",
|
|
3065
|
-
border: "1px solid var(--stage-good)"
|
|
3066
|
-
},
|
|
3067
|
-
children: [
|
|
3068
|
-
"β Scene β",
|
|
3069
|
-
spec.name,
|
|
3070
|
-
"β is ready β choose it in a labβs scene list below."
|
|
3071
|
-
]
|
|
3072
|
-
});
|
|
3073
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
3074
|
-
style: {
|
|
3075
|
-
display: "grid",
|
|
3076
|
-
gap: 8
|
|
3077
|
-
},
|
|
3078
|
-
children: [/* @__PURE__ */ jsx(SceneStudio, {
|
|
3079
|
-
spec,
|
|
3080
|
-
onChange: (s) => updateAttributes(customSceneAttrs(s))
|
|
3081
|
-
}), /* @__PURE__ */ jsxs("p", {
|
|
3082
|
-
style: {
|
|
3083
|
-
fontSize: 12,
|
|
3084
|
-
color: "var(--stage-muted)",
|
|
3085
|
-
margin: 0
|
|
3086
|
-
},
|
|
3087
|
-
children: [
|
|
3088
|
-
"Tip: put this above a lab, then pick β",
|
|
3089
|
-
spec.name,
|
|
3090
|
-
"β in that labβs scene dropdown."
|
|
3091
|
-
]
|
|
3092
|
-
})]
|
|
3093
|
-
});
|
|
3094
|
-
}
|
|
3095
|
-
});
|
|
3096
|
-
/** All math labs blocks, spread into a host's `defineBlock` list. */
|
|
3097
|
-
const mathBlocks = [
|
|
3098
|
-
TrigExplorerBlock,
|
|
3099
|
-
GraphBlock,
|
|
3100
|
-
PercentBarBlock,
|
|
3101
|
-
FractionBarBlock,
|
|
3102
|
-
RatioShareBlock,
|
|
3103
|
-
ComplexPlaneBlock,
|
|
3104
|
-
TrigSignsBlock,
|
|
3105
|
-
PolynomialSolverBlock,
|
|
3106
|
-
DerivativeExplorerBlock,
|
|
3107
|
-
GradientDescentBlock,
|
|
3108
|
-
IntegralExplorerBlock,
|
|
3109
|
-
LimitExplorerBlock,
|
|
3110
|
-
DerivationBlock,
|
|
3111
|
-
LinearSystemBlock,
|
|
3112
|
-
NumberLineBlock,
|
|
3113
|
-
MysteryBucketBlock,
|
|
3114
|
-
BalanceAlgebraBlock,
|
|
3115
|
-
VertexParabolaBlock,
|
|
3116
|
-
AreaModelBlock,
|
|
3117
|
-
GrowingPatternBlock,
|
|
3118
|
-
InteractiveProblemBlock,
|
|
3119
|
-
TriangleTrigBlock,
|
|
3120
|
-
StraightLineBlock,
|
|
3121
|
-
CircleBlock,
|
|
3122
|
-
ConicBlock,
|
|
3123
|
-
DomainRangeBlock,
|
|
3124
|
-
LinearModelBlock,
|
|
3125
|
-
RateMachineBlock,
|
|
3126
|
-
SequencePredictBlock,
|
|
3127
|
-
GeoTransformBlock,
|
|
3128
|
-
ReceiptBlock,
|
|
3129
|
-
SystemSolveBlock,
|
|
3130
|
-
CustomSceneBlock
|
|
3131
|
-
];
|
|
3132
|
-
/** The MDX tag β component render map slice for the math domain. */
|
|
3133
|
-
const mathComponents = {
|
|
3134
|
-
MysteryBucket: MysteryBucketLab,
|
|
3135
|
-
NumberLine: NumberLineLab,
|
|
3136
|
-
LinearSystem: LinearSystemView,
|
|
3137
|
-
BalanceAlgebra: BalanceAlgebraLab,
|
|
3138
|
-
VertexParabola: VertexParabolaLab,
|
|
3139
|
-
AreaModel: AreaModelLab,
|
|
3140
|
-
GrowingPattern: GrowingPatternLab,
|
|
3141
|
-
FunctionMachine: FunctionMachineLab,
|
|
3142
|
-
Graph: Grapher,
|
|
3143
|
-
DerivativeExplorer,
|
|
3144
|
-
IntegralExplorer,
|
|
3145
|
-
LimitExplorer,
|
|
3146
|
-
GradientDescent,
|
|
3147
|
-
Derivation,
|
|
3148
|
-
TrigExplorer,
|
|
3149
|
-
InteractiveProblem,
|
|
3150
|
-
TriangleTrig,
|
|
3151
|
-
StraightLine: StraightLineLab,
|
|
3152
|
-
CircleLab,
|
|
3153
|
-
ConicLab,
|
|
3154
|
-
DomainRange: DomainRangeLab,
|
|
3155
|
-
LinearModel: LinearModelLab,
|
|
3156
|
-
RateMachine: RateMachineLab,
|
|
3157
|
-
SequencePredict,
|
|
3158
|
-
PercentBar: PercentBarLab,
|
|
3159
|
-
FractionBar: FractionBarLab,
|
|
3160
|
-
RatioShare: RatioShareLab,
|
|
3161
|
-
ComplexPlane: ComplexPlaneLab,
|
|
3162
|
-
TrigSigns: TrigSignsLab,
|
|
3163
|
-
PolynomialSolver: PolynomialSolverLab,
|
|
3164
|
-
GeoTransform: TransformLab,
|
|
3165
|
-
ReceiptTotals: ReceiptLab,
|
|
3166
|
-
SystemSolve: SystemSolveLab
|
|
3167
|
-
};
|
|
3168
|
-
|
|
3169
|
-
//#endregion
|
|
3170
|
-
export { AreaModelBlock, BalanceAlgebraBlock, CircleBlock, ComplexPlaneBlock, ConicBlock, CustomSceneBlock, DerivationBlock, DerivativeExplorerBlock, DomainRangeBlock, FractionBarBlock, GeoTransformBlock, GradientDescentBlock, GraphBlock, GrowingPatternBlock, IntegralExplorerBlock, InteractiveProblemBlock, LimitExplorerBlock, LinearModelBlock, LinearSystemBlock, LinearSystemView, MysteryBucketBlock, NumberLineBlock, PercentBarBlock, PolynomialSolverBlock, RateMachineBlock, RatioShareBlock, ReceiptBlock, SequencePredictBlock, StraightLineBlock, SystemSolveBlock, TriangleTrigBlock, TrigExplorerBlock, TrigSignsBlock, VertexParabolaBlock, mathBlocks, mathComponents };
|