@classytic/labs 0.1.0 → 0.2.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.
Files changed (455) hide show
  1. package/dist/_virtual/_rolldown/runtime.mjs +18 -0
  2. package/dist/biology/enzyme-rate/preset.mjs +5 -5
  3. package/dist/biology/genetic-cross/core.d.mts +7 -7
  4. package/dist/biology/genetic-cross/core.mjs +4 -4
  5. package/dist/biology/genetic-cross/grid.mjs +132 -123
  6. package/dist/biology/genetic-cross/preset.mjs +4 -4
  7. package/dist/biology/genetic-cross/sex-linked.mjs +7 -7
  8. package/dist/biology/photosynthesis-factors/preset.mjs +8 -8
  9. package/dist/biology/respiration/preset.mjs +4 -4
  10. package/dist/biology/sequence/central-dogma.mjs +5 -5
  11. package/dist/biology/sequence/core.d.mts +6 -6
  12. package/dist/biology/sequence/core.mjs +1 -1
  13. package/dist/biology/sequence/preset.mjs +6 -6
  14. package/dist/blocks/authoring.mjs +5 -5
  15. package/dist/blocks/biology.d.mts +2 -2
  16. package/dist/blocks/biology.mjs +5 -5
  17. package/dist/blocks/chem.d.mts +2 -2
  18. package/dist/blocks/chem.mjs +13 -13
  19. package/dist/blocks/circuits.d.mts +293 -4
  20. package/dist/blocks/circuits.mjs +874 -9
  21. package/dist/blocks/discrete.d.mts +30 -2
  22. package/dist/blocks/discrete.mjs +74 -4
  23. package/dist/blocks/economics.mjs +1 -1
  24. package/dist/blocks/geography.mjs +1 -1
  25. package/dist/blocks/geometry.mjs +3 -3
  26. package/dist/blocks/ict.d.mts +90 -1
  27. package/dist/blocks/ict.mjs +217 -7
  28. package/dist/blocks/index.d.mts +3064 -657
  29. package/dist/blocks/index.mjs +9 -9
  30. package/dist/blocks/lab-block.mjs +5 -5
  31. package/dist/blocks/lab-config.d.mts +1 -1
  32. package/dist/blocks/lab-config.mjs +4 -4
  33. package/dist/blocks/lab-gallery.d.mts +1 -1
  34. package/dist/blocks/lab-gallery.mjs +2 -2
  35. package/dist/blocks/language.d.mts +6 -6
  36. package/dist/blocks/language.mjs +12 -12
  37. package/dist/blocks/lesson.mjs +4 -4
  38. package/dist/blocks/math.d.mts +577 -11
  39. package/dist/blocks/math.mjs +1648 -14
  40. package/dist/blocks/ml.d.mts +45 -1
  41. package/dist/blocks/ml.mjs +80 -6
  42. package/dist/blocks/physics.d.mts +9 -4
  43. package/dist/blocks/physics.mjs +75 -28
  44. package/dist/blocks/statistics.mjs +1 -1
  45. package/dist/build/CircuitEditor.d.mts +14 -0
  46. package/dist/build/CircuitEditor.mjs +787 -0
  47. package/dist/build/CircuitPlayer.d.mts +19 -0
  48. package/dist/build/CircuitPlayer.mjs +53 -0
  49. package/dist/build/CircuitScene.d.mts +61 -0
  50. package/dist/build/CircuitScene.mjs +383 -0
  51. package/dist/build/contract.d.mts +116 -0
  52. package/dist/build/editor-ops.d.mts +65 -0
  53. package/dist/build/editor-ops.mjs +306 -0
  54. package/dist/build/editor-ui.mjs +121 -0
  55. package/dist/build/flow.d.mts +14 -0
  56. package/dist/build/flow.mjs +119 -0
  57. package/dist/build/index.d.mts +10 -0
  58. package/dist/build/index.mjs +10 -0
  59. package/dist/build/parts/ammeter.d.mts +1 -0
  60. package/dist/build/parts/ammeter.mjs +32 -0
  61. package/dist/build/parts/bulb.d.mts +1 -0
  62. package/dist/build/parts/bulb.mjs +50 -0
  63. package/dist/build/parts/capacitor.d.mts +1 -0
  64. package/dist/build/parts/capacitor.mjs +26 -0
  65. package/dist/build/parts/cell.d.mts +1 -0
  66. package/dist/build/parts/cell.mjs +40 -0
  67. package/dist/build/parts/diode.d.mts +1 -0
  68. package/dist/build/parts/diode.mjs +33 -0
  69. package/dist/build/parts/index.d.mts +5 -0
  70. package/dist/build/parts/index.mjs +43 -0
  71. package/dist/build/parts/mosfet.d.mts +1 -0
  72. package/dist/build/parts/mosfet.mjs +95 -0
  73. package/dist/build/parts/node.d.mts +1 -0
  74. package/dist/build/parts/node.mjs +32 -0
  75. package/dist/build/parts/resistor.d.mts +1 -0
  76. package/dist/build/parts/resistor.mjs +49 -0
  77. package/dist/build/parts/shared.mjs +42 -0
  78. package/dist/build/parts/switch.d.mts +1 -0
  79. package/dist/build/parts/switch.mjs +34 -0
  80. package/dist/build/parts.d.mts +1 -0
  81. package/dist/build/registry.d.mts +9 -0
  82. package/dist/build/registry.mjs +15 -0
  83. package/dist/build/solve.d.mts +8 -0
  84. package/dist/build/solve.mjs +0 -0
  85. package/dist/catalog/registry.d.mts +2 -2
  86. package/dist/catalog/templates.d.mts +1 -1
  87. package/dist/catalog/templates.mjs +6 -6
  88. package/dist/chem/battery.mjs +1 -1
  89. package/dist/chem/bohr-atom.mjs +4 -4
  90. package/dist/chem/diffusion/preset.mjs +4 -4
  91. package/dist/chem/electrochem/preset.mjs +5 -5
  92. package/dist/chem/equilibrium/preset.d.mts +1 -1
  93. package/dist/chem/equilibrium/preset.mjs +6 -6
  94. package/dist/chem/gas-box/preset.mjs +6 -6
  95. package/dist/chem/kinetics/preset.mjs +6 -6
  96. package/dist/chem/periodic-trends/preset.mjs +7 -7
  97. package/dist/chem/reaction-lab.mjs +3 -3
  98. package/dist/chem/reaction-profile.mjs +4 -4
  99. package/dist/chem/solution/dilution.mjs +6 -6
  100. package/dist/chem/solution/field.d.mts +2 -2
  101. package/dist/chem/solution/field.mjs +2 -2
  102. package/dist/chem/solution/solution-box.mjs +7 -7
  103. package/dist/chem/stoichiometry/preset.mjs +5 -5
  104. package/dist/chem/titration/preset.mjs +5 -5
  105. package/dist/circuits/ac-dc/asset.mjs +1 -1
  106. package/dist/circuits/ac-dc/preset.mjs +2 -2
  107. package/dist/circuits/brownout/index.d.mts +1 -0
  108. package/dist/circuits/brownout/preset.d.mts +22 -0
  109. package/dist/circuits/brownout/preset.mjs +399 -0
  110. package/dist/circuits/capacitor-leak/preset.mjs +13 -8
  111. package/dist/circuits/circuit/asset.mjs +71 -14
  112. package/dist/circuits/circuit/preset.mjs +23 -5
  113. package/dist/circuits/circuit-builder.mjs +60 -132
  114. package/dist/circuits/circuit-lab.mjs +60 -40
  115. package/dist/circuits/cmos-gate/index.d.mts +1 -0
  116. package/dist/circuits/cmos-gate/preset.d.mts +75 -0
  117. package/dist/circuits/cmos-gate/preset.mjs +1491 -0
  118. package/dist/circuits/diode/index.d.mts +1 -0
  119. package/dist/circuits/diode/preset.d.mts +25 -0
  120. package/dist/circuits/diode/preset.mjs +266 -0
  121. package/dist/circuits/index.d.mts +7 -1
  122. package/dist/circuits/index.mjs +7 -1
  123. package/dist/circuits/rc-charging/index.d.mts +1 -0
  124. package/dist/circuits/rc-charging/preset.d.mts +27 -0
  125. package/dist/circuits/rc-charging/preset.mjs +329 -0
  126. package/dist/circuits/semiconductor/index.d.mts +1 -0
  127. package/dist/circuits/semiconductor/preset.d.mts +102 -0
  128. package/dist/circuits/semiconductor/preset.mjs +1855 -0
  129. package/dist/circuits/transistor/index.d.mts +1 -0
  130. package/dist/circuits/transistor/preset.d.mts +27 -0
  131. package/dist/circuits/transistor/preset.mjs +329 -0
  132. package/dist/commerce/accounting/core.d.mts +1 -1
  133. package/dist/commerce/accounting/equation-balance.mjs +5 -5
  134. package/dist/commerce/accounting/journal-poster.mjs +8 -8
  135. package/dist/commerce/accounting/statement-sorter.mjs +4 -4
  136. package/dist/commerce/economics/core.d.mts +2 -2
  137. package/dist/commerce/economics/core.mjs +1 -1
  138. package/dist/commerce/economics/demand-shift-vs-move.mjs +6 -6
  139. package/dist/commerce/economics/elasticity-revenue.mjs +6 -6
  140. package/dist/commerce/economics/market-equilibrium.mjs +5 -5
  141. package/dist/core/easing.d.mts +3 -3
  142. package/dist/core/easing.mjs +2 -2
  143. package/dist/core/numeric.d.mts +3 -3
  144. package/dist/core/numeric.mjs +2 -2
  145. package/dist/core/reactive.d.mts +1 -1
  146. package/dist/core/reactive.mjs +1 -1
  147. package/dist/core/rng.d.mts +2 -2
  148. package/dist/core/rng.mjs +1 -1
  149. package/dist/core/tex.mjs +2 -2
  150. package/dist/core/timeline.d.mts +1 -1
  151. package/dist/core/timeline.mjs +1 -1
  152. package/dist/core/util.mjs +11 -1
  153. package/dist/discrete/arrangements/preset.mjs +6 -14
  154. package/dist/discrete/bayes/preset.mjs +43 -35
  155. package/dist/discrete/binomial/preset.mjs +2 -2
  156. package/dist/discrete/combination-studio/figure.d.mts +6 -0
  157. package/dist/discrete/combination-studio/figure.mjs +159 -0
  158. package/dist/discrete/combination-studio/index.d.mts +2 -0
  159. package/dist/discrete/combination-studio/preset.d.mts +44 -0
  160. package/dist/discrete/combination-studio/preset.mjs +440 -0
  161. package/dist/discrete/core/combinatorics.d.mts +23 -3
  162. package/dist/discrete/core/combinatorics.mjs +38 -3
  163. package/dist/discrete/core/pigeonhole.d.mts +1 -1
  164. package/dist/discrete/core/pigeonhole.mjs +1 -1
  165. package/dist/discrete/core/probability.d.mts +3 -3
  166. package/dist/discrete/core/probability.mjs +3 -3
  167. package/dist/discrete/core/sets.d.mts +1 -1
  168. package/dist/discrete/counting-slots/preset.mjs +8 -8
  169. package/dist/discrete/counting-tree/preset.mjs +65 -8
  170. package/dist/discrete/expected-value/preset.mjs +13 -13
  171. package/dist/discrete/hypergeometric/preset.mjs +48 -15
  172. package/dist/discrete/index.d.mts +4 -2
  173. package/dist/discrete/index.mjs +4 -2
  174. package/dist/discrete/karnaugh/preset.mjs +26 -20
  175. package/dist/discrete/lln/preset.mjs +44 -3
  176. package/dist/discrete/logic-circuit/preset.mjs +2 -2
  177. package/dist/discrete/monte-carlo/preset.d.mts +1 -1
  178. package/dist/discrete/monte-carlo/preset.mjs +14 -14
  179. package/dist/discrete/monty-hall/preset.mjs +6 -6
  180. package/dist/discrete/outcome-builder/preset.mjs +3 -3
  181. package/dist/discrete/pascal/preset.mjs +37 -7
  182. package/dist/discrete/rules.d.mts +20 -0
  183. package/dist/discrete/rules.mjs +264 -0
  184. package/dist/discrete/sample-space/preset.mjs +4 -4
  185. package/dist/discrete/selection/preset.mjs +7 -13
  186. package/dist/discrete/truth-table/preset.mjs +32 -9
  187. package/dist/discrete/venn/preset.mjs +71 -48
  188. package/dist/geography/cycle-lab/preset.mjs +17 -10
  189. package/dist/geography/cycles.d.mts +3 -3
  190. package/dist/geography/cycles.mjs +3 -3
  191. package/dist/geometry/board/preset.d.mts +2 -0
  192. package/dist/geometry/board/preset.mjs +11 -15
  193. package/dist/geometry/builder.mjs +3 -3
  194. package/dist/ict/number-systems/base-odometer.mjs +4 -4
  195. package/dist/ict/number-systems/bit-grouper.d.mts +1 -1
  196. package/dist/ict/number-systems/bit-grouper.mjs +4 -4
  197. package/dist/ict/number-systems/place-value-dial.d.mts +1 -1
  198. package/dist/ict/number-systems/place-value-dial.mjs +3 -3
  199. package/dist/ict/number-systems/wheel.d.mts +3 -3
  200. package/dist/ict/number-systems/wheel.mjs +4 -4
  201. package/dist/kit/annotate.mjs +3 -3
  202. package/dist/kit/answer-check.d.mts +2 -2
  203. package/dist/kit/answer-check.mjs +34 -6
  204. package/dist/kit/ask.d.mts +19 -0
  205. package/dist/kit/ask.mjs +46 -0
  206. package/dist/kit/bar-strip.mjs +53 -0
  207. package/dist/kit/calc.d.mts +33 -0
  208. package/dist/kit/calc.mjs +27 -0
  209. package/dist/kit/carrier-engine.mjs +147 -0
  210. package/dist/kit/clue-scene.d.mts +86 -0
  211. package/dist/kit/clue-scene.mjs +424 -0
  212. package/dist/kit/cluster.d.mts +30 -0
  213. package/dist/kit/cluster.mjs +81 -0
  214. package/dist/kit/controls.mjs +11 -5
  215. package/dist/kit/coords.d.mts +88 -0
  216. package/dist/kit/coords.mjs +192 -0
  217. package/dist/kit/data-scene.d.mts +27 -0
  218. package/dist/kit/data-scene.mjs +199 -0
  219. package/dist/kit/diagram.mjs +111 -50
  220. package/dist/kit/electronics.mjs +552 -60
  221. package/dist/kit/expr-analysis.d.mts +18 -6
  222. package/dist/kit/expr-analysis.mjs +82 -28
  223. package/dist/kit/frame.d.mts +3 -3
  224. package/dist/kit/frame.mjs +25 -6
  225. package/dist/kit/gameshow.mjs +2 -2
  226. package/dist/kit/index.d.mts +14 -2
  227. package/dist/kit/index.mjs +13 -1
  228. package/dist/kit/logic-gates.mjs +246 -47
  229. package/dist/kit/palette.mjs +26 -0
  230. package/dist/kit/pedagogy.d.mts +4 -4
  231. package/dist/kit/pedagogy.mjs +21 -17
  232. package/dist/kit/play.d.mts +1 -1
  233. package/dist/kit/play.mjs +3 -3
  234. package/dist/kit/predict.d.mts +55 -0
  235. package/dist/kit/predict.mjs +146 -0
  236. package/dist/kit/receipt.d.mts +29 -0
  237. package/dist/kit/receipt.mjs +94 -0
  238. package/dist/kit/rich.mjs +2 -2
  239. package/dist/kit/rule.d.mts +59 -0
  240. package/dist/kit/rule.mjs +215 -0
  241. package/dist/kit/scale.mjs +1 -1
  242. package/dist/kit/scene-library.d.mts +22 -0
  243. package/dist/kit/scene-library.mjs +311 -0
  244. package/dist/kit/scene-studio.d.mts +14 -0
  245. package/dist/kit/scene-studio.mjs +338 -0
  246. package/dist/kit/scenes.d.mts +31 -0
  247. package/dist/kit/scenes.mjs +569 -0
  248. package/dist/kit/slot-fill.d.mts +61 -0
  249. package/dist/kit/slot-fill.mjs +207 -0
  250. package/dist/kit/solve.d.mts +21 -0
  251. package/dist/kit/solve.mjs +75 -0
  252. package/dist/kit/space.mjs +5 -5
  253. package/dist/kit/steps.mjs +2 -2
  254. package/dist/kit/vessel.d.mts +69 -0
  255. package/dist/kit/vessel.mjs +191 -0
  256. package/dist/language/agreement/preset.mjs +2 -2
  257. package/dist/language/article-lens/preset.d.mts +1 -1
  258. package/dist/language/article-lens/preset.mjs +8 -8
  259. package/dist/language/deck.d.mts +3 -3
  260. package/dist/language/deck.mjs +1 -1
  261. package/dist/language/preposition-scene/preset.d.mts +2 -2
  262. package/dist/language/preposition-scene/preset.mjs +5 -5
  263. package/dist/language/sentence-builder/preset.mjs +5 -5
  264. package/dist/language/transform/preset.d.mts +2 -2
  265. package/dist/language/transform/preset.mjs +5 -5
  266. package/dist/language/ui.d.mts +3 -3
  267. package/dist/language/ui.mjs +4 -4
  268. package/dist/language/word-match/preset.mjs +3 -3
  269. package/dist/logic/LogicBuildLab.d.mts +22 -0
  270. package/dist/logic/LogicBuildLab.mjs +170 -0
  271. package/dist/logic/LogicEditScene.d.mts +31 -0
  272. package/dist/logic/LogicEditScene.mjs +276 -0
  273. package/dist/logic/LogicEditor.d.mts +14 -0
  274. package/dist/logic/LogicEditor.mjs +413 -0
  275. package/dist/logic/LogicScene.d.mts +32 -0
  276. package/dist/logic/LogicScene.mjs +277 -0
  277. package/dist/logic/contract.d.mts +72 -0
  278. package/dist/logic/display.d.mts +24 -0
  279. package/dist/logic/display.mjs +127 -0
  280. package/dist/logic/edit-ops.d.mts +44 -0
  281. package/dist/logic/edit-ops.mjs +177 -0
  282. package/dist/logic/evaluate.d.mts +11 -0
  283. package/dist/logic/evaluate.mjs +93 -0
  284. package/dist/logic/gates.d.mts +10 -0
  285. package/dist/logic/gates.mjs +73 -0
  286. package/dist/logic/index.d.mts +14 -0
  287. package/dist/logic/index.mjs +13 -0
  288. package/dist/logic/lab.d.mts +32 -0
  289. package/dist/logic/lab.mjs +160 -0
  290. package/dist/logic/presets.d.mts +12 -0
  291. package/dist/logic/presets.mjs +241 -0
  292. package/dist/logic/registry.d.mts +9 -0
  293. package/dist/logic/registry.mjs +15 -0
  294. package/dist/math/area-model/preset.mjs +70 -44
  295. package/dist/math/balance-algebra/preset.mjs +14 -5
  296. package/dist/math/broken-tree/index.d.mts +1 -0
  297. package/dist/math/broken-tree/preset.d.mts +26 -0
  298. package/dist/math/broken-tree/preset.mjs +435 -0
  299. package/dist/math/circle/index.d.mts +1 -0
  300. package/dist/math/circle/preset.d.mts +44 -0
  301. package/dist/math/circle/preset.mjs +198 -0
  302. package/dist/math/complex/core.d.mts +93 -0
  303. package/dist/math/complex/core.mjs +239 -0
  304. package/dist/math/complex/index.d.mts +3 -0
  305. package/dist/math/complex/preset.d.mts +31 -0
  306. package/dist/math/complex/preset.mjs +377 -0
  307. package/dist/math/complex/rules.d.mts +6 -0
  308. package/dist/math/complex/rules.mjs +121 -0
  309. package/dist/math/conic/index.d.mts +1 -0
  310. package/dist/math/conic/preset.d.mts +30 -0
  311. package/dist/math/conic/preset.mjs +334 -0
  312. package/dist/math/derivation.mjs +5 -5
  313. package/dist/math/derivative-explorer/preset.mjs +5 -5
  314. package/dist/math/domain-range/index.d.mts +1 -0
  315. package/dist/math/domain-range/preset.d.mts +33 -0
  316. package/dist/math/domain-range/preset.mjs +313 -0
  317. package/dist/math/fraction-bar/index.d.mts +1 -0
  318. package/dist/math/fraction-bar/preset.d.mts +27 -0
  319. package/dist/math/fraction-bar/preset.mjs +197 -0
  320. package/dist/math/function-machine/preset.mjs +2 -2
  321. package/dist/math/gradient-descent.mjs +6 -6
  322. package/dist/math/grapher/preset.d.mts +1 -1
  323. package/dist/math/grapher/preset.mjs +4 -4
  324. package/dist/math/harmonic-form/preset.mjs +6 -6
  325. package/dist/math/index.d.mts +27 -2
  326. package/dist/math/index.mjs +27 -2
  327. package/dist/math/integral-explorer/preset.mjs +2 -2
  328. package/dist/math/interactive/preset.mjs +3 -3
  329. package/dist/math/limit-explorer/preset.mjs +4 -4
  330. package/dist/math/linear-model/index.d.mts +1 -0
  331. package/dist/math/linear-model/preset.d.mts +53 -0
  332. package/dist/math/linear-model/preset.mjs +164 -0
  333. package/dist/math/linear-system/preset.mjs +4 -4
  334. package/dist/math/mystery-bucket/preset.mjs +6 -6
  335. package/dist/math/number-line/preset.mjs +3 -2
  336. package/dist/math/parabola/preset.mjs +4 -3
  337. package/dist/math/pattern/preset.mjs +7 -13
  338. package/dist/math/percent-bar/index.d.mts +1 -0
  339. package/dist/math/percent-bar/preset.d.mts +37 -0
  340. package/dist/math/percent-bar/preset.mjs +275 -0
  341. package/dist/math/poly/core.d.mts +50 -0
  342. package/dist/math/poly/core.mjs +268 -0
  343. package/dist/math/poly/index.d.mts +3 -0
  344. package/dist/math/poly/preset.d.mts +23 -0
  345. package/dist/math/poly/preset.mjs +141 -0
  346. package/dist/math/poly/steps.d.mts +10 -0
  347. package/dist/math/poly/steps.mjs +99 -0
  348. package/dist/math/rate-machine/index.d.mts +1 -0
  349. package/dist/math/rate-machine/preset.d.mts +35 -0
  350. package/dist/math/rate-machine/preset.mjs +281 -0
  351. package/dist/math/ratio-share/index.d.mts +1 -0
  352. package/dist/math/ratio-share/preset.d.mts +24 -0
  353. package/dist/math/ratio-share/preset.mjs +204 -0
  354. package/dist/math/receipt/index.d.mts +1 -0
  355. package/dist/math/receipt/preset.d.mts +22 -0
  356. package/dist/math/receipt/preset.mjs +137 -0
  357. package/dist/math/sequence-predict/index.d.mts +1 -0
  358. package/dist/math/sequence-predict/preset.d.mts +34 -0
  359. package/dist/math/sequence-predict/preset.mjs +130 -0
  360. package/dist/math/straight-line/index.d.mts +1 -0
  361. package/dist/math/straight-line/preset.d.mts +37 -0
  362. package/dist/math/straight-line/preset.mjs +374 -0
  363. package/dist/math/system-solve/index.d.mts +1 -0
  364. package/dist/math/system-solve/preset.d.mts +21 -0
  365. package/dist/math/system-solve/preset.mjs +227 -0
  366. package/dist/math/transform/index.d.mts +1 -0
  367. package/dist/math/transform/preset.d.mts +41 -0
  368. package/dist/math/transform/preset.mjs +343 -0
  369. package/dist/math/triangle-trig/preset.mjs +12 -9
  370. package/dist/math/trig/core.d.mts +37 -0
  371. package/dist/math/trig/core.mjs +150 -0
  372. package/dist/math/trig/diagrams.d.mts +1 -0
  373. package/dist/math/trig/diagrams.mjs +321 -0
  374. package/dist/math/trig/index.d.mts +3 -0
  375. package/dist/math/trig/preset.d.mts +25 -0
  376. package/dist/math/trig/preset.mjs +260 -0
  377. package/dist/math/trig/rules.d.mts +6 -0
  378. package/dist/math/trig/rules.mjs +159 -0
  379. package/dist/math/trig-explorer.mjs +4 -4
  380. package/dist/ml/boundary/preset.mjs +8 -3
  381. package/dist/ml/classifier/preset.mjs +31 -6
  382. package/dist/ml/kmeans/preset.mjs +4 -4
  383. package/dist/ml/knn/preset.mjs +47 -12
  384. package/dist/ml/regression/preset.mjs +36 -7
  385. package/dist/physics/atwood/preset.mjs +4 -4
  386. package/dist/physics/bullet-walls/preset.d.mts +1 -1
  387. package/dist/physics/bullet-walls/preset.mjs +7 -7
  388. package/dist/physics/carnot/preset.mjs +6 -6
  389. package/dist/physics/circular-motion/preset.mjs +36 -5
  390. package/dist/physics/collision-track/preset.mjs +35 -5
  391. package/dist/physics/efficiency/preset.d.mts +2 -2
  392. package/dist/physics/efficiency/preset.mjs +5 -5
  393. package/dist/physics/electric-field/preset.mjs +32 -23
  394. package/dist/physics/electric-flux/index.d.mts +1 -0
  395. package/dist/physics/electric-flux/preset.d.mts +29 -0
  396. package/dist/physics/electric-flux/preset.mjs +264 -0
  397. package/dist/physics/energy-skate/preset.mjs +5 -5
  398. package/dist/physics/entropy/preset.mjs +7 -7
  399. package/dist/physics/expansion/preset.mjs +13 -13
  400. package/dist/physics/exponential/asset.mjs +1 -1
  401. package/dist/physics/exponential/preset.mjs +4 -4
  402. package/dist/physics/gas-process/preset.mjs +3 -3
  403. package/dist/physics/gauss-law/index.d.mts +1 -0
  404. package/dist/physics/gauss-law/preset.d.mts +20 -0
  405. package/dist/physics/gauss-law/preset.mjs +286 -0
  406. package/dist/physics/gravitation/preset.mjs +7 -7
  407. package/dist/physics/gravity-drop.mjs +4 -4
  408. package/dist/physics/heat-transfer/preset.d.mts +1 -1
  409. package/dist/physics/heat-transfer/preset.mjs +10 -10
  410. package/dist/physics/impulse/preset.mjs +5 -5
  411. package/dist/physics/index.d.mts +4 -1
  412. package/dist/physics/index.mjs +4 -1
  413. package/dist/physics/kepler/preset.mjs +4 -4
  414. package/dist/physics/lever/preset.mjs +3 -3
  415. package/dist/physics/lorentz/preset.mjs +11 -11
  416. package/dist/physics/magnetism/preset.mjs +3 -3
  417. package/dist/physics/optics/preset.mjs +2 -2
  418. package/dist/physics/orbit-lab.mjs +5 -5
  419. package/dist/physics/projectile-lab.mjs +4 -4
  420. package/dist/physics/rain-relative/preset.mjs +5 -5
  421. package/dist/physics/ramp-forces/preset.mjs +5 -5
  422. package/dist/physics/river-boat.mjs +6 -6
  423. package/dist/physics/shm/preset.mjs +9 -9
  424. package/dist/physics/stopping-distance/preset.mjs +3 -3
  425. package/dist/physics/temperature-scales/preset.mjs +105 -116
  426. package/dist/physics/terminal-velocity/preset.mjs +5 -5
  427. package/dist/physics/thermal/preset.mjs +5 -5
  428. package/dist/physics/vector-board/preset.mjs +7 -6
  429. package/dist/physics/vector-scene.mjs +2 -2
  430. package/dist/physics/vector-types/preset.mjs +37 -3
  431. package/dist/physics/water-density/preset.mjs +12 -12
  432. package/dist/physics/waves/doppler.mjs +2 -2
  433. package/dist/physics/waves/preset.mjs +4 -4
  434. package/dist/physics/waves/ripple.mjs +6 -6
  435. package/dist/physics/waves/string.mjs +5 -5
  436. package/dist/physics/work-energy/preset.mjs +4 -4
  437. package/dist/physics/work-potential/index.d.mts +1 -0
  438. package/dist/physics/work-potential/preset.d.mts +20 -0
  439. package/dist/physics/work-potential/preset.mjs +276 -0
  440. package/dist/schemas/index.d.mts +6 -6
  441. package/dist/schemas/index.mjs +3 -3
  442. package/dist/statistics/center-spread/preset.mjs +3 -3
  443. package/dist/statistics/core/descriptive.d.mts +2 -2
  444. package/dist/statistics/core/descriptive.mjs +2 -2
  445. package/dist/statistics/core/normal.d.mts +3 -3
  446. package/dist/statistics/core/normal.mjs +3 -3
  447. package/dist/statistics/core/sequences.d.mts +1 -1
  448. package/dist/statistics/galton/preset.mjs +2 -2
  449. package/dist/statistics/histogram/preset.mjs +6 -6
  450. package/dist/statistics/normal/preset.mjs +2 -2
  451. package/dist/statistics/sampling/preset.mjs +4 -4
  452. package/dist/statistics/sequence/preset.mjs +58 -15
  453. package/dist/statistics/z-table/preset.mjs +17 -4
  454. package/package.json +11 -3
  455. package/styles.css +4 -1
@@ -0,0 +1,50 @@
1
+ 'use client';
2
+
3
+ import { BulbGlyph } from "../../kit/electronics.mjs";
4
+ import { labelOf, num, render2, term2 } from "./shared.mjs";
5
+ import { jsx } from "react/jsx-runtime";
6
+
7
+ //#region src/build/parts/bulb.tsx
8
+ /** Lamp / bulb: a resistor that glows. `ohms` sets its resistance; brightness tracks |current|. */
9
+ const BULB = {
10
+ kind: "bulb",
11
+ label: "Lamp",
12
+ pins: ["a", "b"],
13
+ defaultProps: {
14
+ ohms: 100,
15
+ maxPower: 2
16
+ },
17
+ controls: [{
18
+ key: "ohms",
19
+ label: "Resistance",
20
+ unit: "Ω",
21
+ min: 1,
22
+ max: 1e4,
23
+ step: 10
24
+ }, {
25
+ key: "maxPower",
26
+ label: "Power rating",
27
+ unit: "W",
28
+ min: 0,
29
+ max: 50,
30
+ step: .1
31
+ }],
32
+ terminalAt: term2,
33
+ toElems: (i, n) => [{
34
+ kind: "R",
35
+ n1: n("a"),
36
+ n2: n("b"),
37
+ value: num(i.props?.ohms, 100)
38
+ }],
39
+ render: (i, s) => render2(i, labelOf(i) ?? "lamp", (cx, cy, h, l) => /* @__PURE__ */ jsx(BulbGlyph, {
40
+ cx,
41
+ cy,
42
+ half: h,
43
+ live: s.live,
44
+ brightness: Math.max(0, Math.min(1, Math.abs(s.i) * 40)),
45
+ label: l
46
+ }))
47
+ };
48
+
49
+ //#endregion
50
+ export { BULB };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,26 @@
1
+ 'use client';
2
+
3
+ import { CapacitorGlyph } from "../../kit/electronics.mjs";
4
+ import { labelOf, render2, term2 } from "./shared.mjs";
5
+ import { jsx } from "react/jsx-runtime";
6
+
7
+ //#region src/build/parts/capacitor.tsx
8
+ /** Capacitor: stores charge. Open at DC (no element here); the transient solver gives it dynamics. */
9
+ const CAPACITOR = {
10
+ kind: "capacitor",
11
+ label: "Capacitor",
12
+ pins: ["a", "b"],
13
+ defaultProps: { farads: 1e-5 },
14
+ terminalAt: term2,
15
+ toElems: () => [],
16
+ render: (i, s) => render2(i, labelOf(i), (cx, cy, h, l) => /* @__PURE__ */ jsx(CapacitorGlyph, {
17
+ cx,
18
+ cy,
19
+ half: h,
20
+ live: s.live,
21
+ label: l
22
+ }))
23
+ };
24
+
25
+ //#endregion
26
+ export { CAPACITOR };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,40 @@
1
+ 'use client';
2
+
3
+ import { CellGlyph } from "../../kit/electronics.mjs";
4
+ import { num, render2, term2 } from "./shared.mjs";
5
+ import { jsx } from "react/jsx-runtime";
6
+
7
+ //#region src/build/parts/cell.tsx
8
+ /** Battery / cell: an ideal voltage source. `volts` sets its EMF; it drives the loop current. */
9
+ const CELL = {
10
+ kind: "cell",
11
+ label: "Battery",
12
+ pins: ["a", "b"],
13
+ defaultProps: { volts: 5 },
14
+ controls: [{
15
+ key: "volts",
16
+ label: "Voltage",
17
+ unit: "V",
18
+ min: 0,
19
+ max: 24,
20
+ step: .5
21
+ }],
22
+ terminalAt: term2,
23
+ toElems: (i, n) => [{
24
+ kind: "V",
25
+ n1: n("a"),
26
+ n2: n("b"),
27
+ value: num(i.props?.volts, 5),
28
+ id: i.id
29
+ }],
30
+ render: (i, s) => render2(i, `${num(i.props?.volts, 5)} V`, (cx, cy, h, l) => /* @__PURE__ */ jsx(CellGlyph, {
31
+ cx,
32
+ cy,
33
+ half: h,
34
+ live: s.live,
35
+ label: l
36
+ }))
37
+ };
38
+
39
+ //#endregion
40
+ export { CELL };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,33 @@
1
+ 'use client';
2
+
3
+ import { DiodeGlyph } from "../../kit/electronics.mjs";
4
+ import { labelOf, render2, term2 } from "./shared.mjs";
5
+ import { jsx } from "react/jsx-runtime";
6
+
7
+ //#region src/build/parts/diode.tsx
8
+ /** Diode: one-way valve (Shockley model in the solver). Conducts a→b above ~0.7 V, blocks reverse. */
9
+ const DIODE = {
10
+ kind: "diode",
11
+ label: "Diode",
12
+ pins: ["a", "b"],
13
+ defaultProps: {},
14
+ terminalAt: term2,
15
+ toElems: (i, n) => [{
16
+ kind: "D",
17
+ n1: n("a"),
18
+ n2: n("b"),
19
+ value: 0,
20
+ id: i.id
21
+ }],
22
+ render: (i, s) => render2(i, labelOf(i), (cx, cy, h, l) => /* @__PURE__ */ jsx(DiodeGlyph, {
23
+ cx,
24
+ cy,
25
+ half: h,
26
+ live: s.live,
27
+ conducting: s.live,
28
+ label: l
29
+ }))
30
+ };
31
+
32
+ //#endregion
33
+ export { DIODE };
@@ -0,0 +1,5 @@
1
+ //#region src/build/parts/index.d.ts
2
+ /** Register the built-in parts (idempotent). Imported for its side effect. */
3
+ declare function registerBuiltinParts(): void;
4
+ //#endregion
5
+ export { registerBuiltinParts };
@@ -0,0 +1,43 @@
1
+ import { registerPart } from "../registry.mjs";
2
+ import { CELL } from "./cell.mjs";
3
+ import { RESISTOR } from "./resistor.mjs";
4
+ import { BULB } from "./bulb.mjs";
5
+ import { SWITCH } from "./switch.mjs";
6
+ import { DIODE } from "./diode.mjs";
7
+ import { CAPACITOR } from "./capacitor.mjs";
8
+ import { AMMETER } from "./ammeter.mjs";
9
+ import { NODE } from "./node.mjs";
10
+ import { NMOS, PMOS } from "./mosfet.mjs";
11
+
12
+ //#region src/build/parts/index.ts
13
+ /**
14
+ * Built-in part registry. Each component is its own module (cell, resistor, bulb, switch,
15
+ * diode, capacitor, mosfet, node, ammeter), self-contained: its pins, electrical stamp, glyph,
16
+ * tunables and any tap behaviour. This barrel is the ONE place that wires them into the live
17
+ * registry. Add a component = add a file here and one line below. Nothing else special-cases a
18
+ * part kind, so the solver and renderer stay component-agnostic.
19
+ */
20
+ /** The built-ins in palette order. */
21
+ const BUILTIN_PARTS = [
22
+ CELL,
23
+ RESISTOR,
24
+ BULB,
25
+ SWITCH,
26
+ DIODE,
27
+ CAPACITOR,
28
+ AMMETER,
29
+ NODE,
30
+ NMOS,
31
+ PMOS
32
+ ];
33
+ let registered = false;
34
+ /** Register the built-in parts (idempotent). Imported for its side effect. */
35
+ function registerBuiltinParts() {
36
+ if (registered) return;
37
+ registered = true;
38
+ BUILTIN_PARTS.forEach(registerPart);
39
+ }
40
+ registerBuiltinParts();
41
+
42
+ //#endregion
43
+ export { registerBuiltinParts };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,95 @@
1
+ 'use client';
2
+
3
+ import { MosfetGlyph } from "../../kit/electronics.mjs";
4
+ import { num } from "./shared.mjs";
5
+ import { jsx } from "react/jsx-runtime";
6
+
7
+ //#region src/build/parts/mosfet.tsx
8
+ const MOS_HALF = 34, GATE_OFF = 37;
9
+ const mosTerminal = (i, pin) => {
10
+ const { x, y } = i.at;
11
+ return pin === "d" ? {
12
+ x,
13
+ y: y - MOS_HALF
14
+ } : pin === "s" ? {
15
+ x,
16
+ y: y + MOS_HALF
17
+ } : {
18
+ x: x - GATE_OFF,
19
+ y
20
+ };
21
+ };
22
+ const mosDef = (kind, pmos) => ({
23
+ kind,
24
+ label: pmos ? "PMOS" : "NMOS",
25
+ pins: [
26
+ "d",
27
+ "s",
28
+ "g"
29
+ ],
30
+ defaultProps: {
31
+ vth: 2,
32
+ k: .5,
33
+ maxPower: .5,
34
+ maxVoltage: 20
35
+ },
36
+ controls: [
37
+ {
38
+ key: "vth",
39
+ label: "Threshold",
40
+ unit: "V",
41
+ min: .5,
42
+ max: 5,
43
+ step: .1
44
+ },
45
+ {
46
+ key: "k",
47
+ label: "Gain k",
48
+ min: .1,
49
+ max: 2,
50
+ step: .1
51
+ },
52
+ {
53
+ key: "maxPower",
54
+ label: "Power rating",
55
+ unit: "W",
56
+ min: 0,
57
+ max: 50,
58
+ step: .1
59
+ },
60
+ {
61
+ key: "maxVoltage",
62
+ label: "Breakdown V",
63
+ unit: "V",
64
+ min: 0,
65
+ max: 100,
66
+ step: 1
67
+ }
68
+ ],
69
+ terminalAt: mosTerminal,
70
+ toElems: (i, n) => [{
71
+ kind: "M",
72
+ pmos,
73
+ n1: n("d"),
74
+ n2: n("s"),
75
+ n3: n("g"),
76
+ value: 0,
77
+ vth: num(i.props?.vth, 2),
78
+ k: num(i.props?.k, .5),
79
+ id: i.id
80
+ }],
81
+ render: (i, s) => /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx(MosfetGlyph, {
82
+ cx: i.at.x + 9,
83
+ cy: i.at.y,
84
+ half: MOS_HALF,
85
+ pmos,
86
+ on: s.live,
87
+ live: s.live,
88
+ label: i.props?.label
89
+ }) }, i.id)
90
+ });
91
+ const NMOS = mosDef("nmos", false);
92
+ const PMOS = mosDef("pmos", true);
93
+
94
+ //#endregion
95
+ export { NMOS, PMOS };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { JunctionDot } from "../../kit/electronics.mjs";
4
+ import { jsx } from "react/jsx-runtime";
5
+
6
+ //#region src/build/parts/node.tsx
7
+ /**
8
+ * Junction node: a free connection point (one pin, no element = a perfect conductor). Every
9
+ * wire touching it shares one electrical net, so it is how parallel branches, bridges and
10
+ * ladders are built. The editor only ever creates one ON a wire (a tap), and prunes any that
11
+ * fall below two connections, so junctions never float as clutter.
12
+ */
13
+ const NODE = {
14
+ kind: "node",
15
+ label: "Node (junction)",
16
+ pins: ["j"],
17
+ defaultProps: {},
18
+ terminalAt: (i) => ({
19
+ x: i.at.x,
20
+ y: i.at.y
21
+ }),
22
+ toElems: () => [],
23
+ render: (i, s) => /* @__PURE__ */ jsx(JunctionDot, {
24
+ x: i.at.x,
25
+ y: i.at.y,
26
+ live: s.live,
27
+ r: 5
28
+ }, i.id)
29
+ };
30
+
31
+ //#endregion
32
+ export { NODE };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,49 @@
1
+ 'use client';
2
+
3
+ import { ResistorGlyph } from "../../kit/electronics.mjs";
4
+ import { num, ohmLabel, render2, term2 } from "./shared.mjs";
5
+ import { jsx } from "react/jsx-runtime";
6
+
7
+ //#region src/build/parts/resistor.tsx
8
+ /** Resistor: an ohmic element. `ohms` sets its resistance; current = V across it / ohms. */
9
+ const RESISTOR = {
10
+ kind: "resistor",
11
+ label: "Resistor",
12
+ pins: ["a", "b"],
13
+ defaultProps: {
14
+ ohms: 1e3,
15
+ maxPower: .5
16
+ },
17
+ controls: [{
18
+ key: "ohms",
19
+ label: "Resistance",
20
+ unit: "Ω",
21
+ min: 1,
22
+ max: 1e5,
23
+ step: 10
24
+ }, {
25
+ key: "maxPower",
26
+ label: "Power rating",
27
+ unit: "W",
28
+ min: 0,
29
+ max: 50,
30
+ step: .05
31
+ }],
32
+ terminalAt: term2,
33
+ toElems: (i, n) => [{
34
+ kind: "R",
35
+ n1: n("a"),
36
+ n2: n("b"),
37
+ value: num(i.props?.ohms, 1e3)
38
+ }],
39
+ render: (i, s) => render2(i, ohmLabel(num(i.props?.ohms, 1e3)), (cx, cy, h, l) => /* @__PURE__ */ jsx(ResistorGlyph, {
40
+ cx,
41
+ cy,
42
+ half: h,
43
+ live: s.live,
44
+ label: l
45
+ }))
46
+ };
47
+
48
+ //#endregion
49
+ export { RESISTOR };
@@ -0,0 +1,42 @@
1
+ 'use client';
2
+
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+
5
+ //#region src/build/parts/shared.tsx
6
+ /** centre → terminal distance for a 2-terminal part, px. */
7
+ const HALF = 30;
8
+ const num = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
9
+ const ohmLabel = (r) => r >= 1e3 ? `${r / 1e3} kΩ` : `${r} Ω`;
10
+ const labelOf = (i) => i.props?.label ?? void 0;
11
+ /** terminal world position for a 2-terminal part (a = left/top, b = right/bottom). */
12
+ function term2(inst, pin) {
13
+ const { x, y } = inst.at, o = inst.orient ?? "h", s = pin === "a" ? -1 : 1;
14
+ return o === "v" ? {
15
+ x,
16
+ y: y + s * 30
17
+ } : {
18
+ x: x + s * 30,
19
+ y
20
+ };
21
+ }
22
+ /** render a 2-terminal glyph at the instance, rotated for 'v', label kept horizontal. */
23
+ function render2(inst, label, glyph) {
24
+ const { x, y } = inst.at;
25
+ if ((inst.orient ?? "h") === "v") return /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("g", {
26
+ transform: `rotate(90 ${x} ${y})`,
27
+ children: glyph(x, y, 30, void 0)
28
+ }), label && /* @__PURE__ */ jsx("text", {
29
+ x: x + 30 + 8,
30
+ y: y + 4,
31
+ fill: "var(--stage-fg)",
32
+ fontSize: 11,
33
+ fontWeight: 600,
34
+ textAnchor: "start",
35
+ style: { pointerEvents: "none" },
36
+ children: label
37
+ })] }, inst.id);
38
+ return /* @__PURE__ */ jsx("g", { children: glyph(x, y, 30, label) }, inst.id);
39
+ }
40
+
41
+ //#endregion
42
+ export { labelOf, num, ohmLabel, render2, term2 };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,34 @@
1
+ 'use client';
2
+
3
+ import { SwitchGlyph } from "../../kit/electronics.mjs";
4
+ import { labelOf, render2, term2 } from "./shared.mjs";
5
+ import { jsx } from "react/jsx-runtime";
6
+
7
+ //#region src/build/parts/switch.tsx
8
+ /** Switch: closed = a 0 V short (conducts), open = no element (breaks the loop). Tap to toggle. */
9
+ const SWITCH = {
10
+ kind: "switch",
11
+ label: "Switch",
12
+ pins: ["a", "b"],
13
+ defaultProps: { closed: false },
14
+ terminalAt: term2,
15
+ toElems: (i, n) => i.props?.closed ? [{
16
+ kind: "V",
17
+ n1: n("a"),
18
+ n2: n("b"),
19
+ value: 0,
20
+ id: i.id
21
+ }] : [],
22
+ render: (i, s) => render2(i, labelOf(i), (cx, cy, h, l) => /* @__PURE__ */ jsx(SwitchGlyph, {
23
+ cx,
24
+ cy,
25
+ half: h,
26
+ live: s.live,
27
+ closed: !!i.props?.closed,
28
+ label: l
29
+ })),
30
+ tap: (i) => ({ closed: !i.props?.closed })
31
+ };
32
+
33
+ //#endregion
34
+ export { SWITCH };
@@ -0,0 +1 @@
1
+ import { registerBuiltinParts } from "./parts/index.mjs";
@@ -0,0 +1,9 @@
1
+ import { PartDef, PartKind } from "./contract.mjs";
2
+
3
+ //#region src/build/registry.d.ts
4
+ declare function registerPart(def: PartDef): void;
5
+ declare function getPart(kind: PartKind): PartDef | undefined;
6
+ /** Every registered part (drives the builder palette). */
7
+ declare function listParts(): PartDef[];
8
+ //#endregion
9
+ export { getPart, listParts, registerPart };
@@ -0,0 +1,15 @@
1
+ //#region src/build/registry.ts
2
+ const REGISTRY = /* @__PURE__ */ new Map();
3
+ function registerPart(def) {
4
+ REGISTRY.set(def.kind, def);
5
+ }
6
+ function getPart(kind) {
7
+ return REGISTRY.get(kind);
8
+ }
9
+ /** Every registered part (drives the builder palette). */
10
+ function listParts() {
11
+ return [...REGISTRY.values()];
12
+ }
13
+
14
+ //#endregion
15
+ export { getPart, listParts, registerPart };
@@ -0,0 +1,8 @@
1
+ import { CircuitDoc, CircuitSolution, PartInstance, PartState } from "./contract.mjs";
2
+
3
+ //#region src/build/solve.d.ts
4
+ declare function solveCircuit(doc: CircuitDoc): CircuitSolution;
5
+ /** Derive the drawing state (current/voltage/live) for one part from the solution. */
6
+ declare function partState(part: PartInstance, sol: CircuitSolution): PartState;
7
+ //#endregion
8
+ export { partState, solveCircuit };
Binary file
@@ -7,7 +7,7 @@ interface LabTemplate {
7
7
  id: string;
8
8
  /** Human title for the catalog. */
9
9
  title: string;
10
- /** Domain bucket — 'algebra' | 'calculus' | 'physics' | 'circuits' | … */
10
+ /** Domain bucket, 'algebra' | 'calculus' | 'physics' | 'circuits' | … */
11
11
  category: string;
12
12
  /** One-line description for the catalog card. */
13
13
  description?: string;
@@ -24,7 +24,7 @@ declare function registerLabTemplate(t: LabTemplate): void;
24
24
  declare function listLabTemplates(): LabTemplate[];
25
25
  declare function listLabTemplatesByCategory(category: string): LabTemplate[];
26
26
  declare function getLabTemplate(id: string): LabTemplate | undefined;
27
- /** Result of instantiating a template — typed errors before a bad scene is built. */
27
+ /** Result of instantiating a template, typed errors before a bad scene is built. */
28
28
  type InstantiateResult = {
29
29
  ok: true;
30
30
  doc: SceneDoc;
@@ -1,7 +1,7 @@
1
1
  //#region src/catalog/templates.d.ts
2
2
  /**
3
3
  * Register the built-in lab families. Importing this module imports each
4
- * preset's doc factory — which self-registers its stage asset — and adds the
4
+ * preset's doc factory, which self-registers its stage asset, and adds the
5
5
  * family to the registry. New family = add one entry here.
6
6
  */
7
7
  /** Register all built-in families. Called from the catalog entry (a used import
@@ -11,7 +11,7 @@ import { z } from "zod";
11
11
  //#region src/catalog/templates.ts
12
12
  /**
13
13
  * Register the built-in lab families. Importing this module imports each
14
- * preset's doc factory — which self-registers its stage asset — and adds the
14
+ * preset's doc factory, which self-registers its stage asset, and adds the
15
15
  * family to the registry. New family = add one entry here.
16
16
  */
17
17
  /** Register all built-in families. Called from the catalog entry (a used import
@@ -21,7 +21,7 @@ function registerBuiltinTemplates() {
21
21
  id: "mystery-bucket",
22
22
  title: "Mystery bucket (weigh the unknown)",
23
23
  category: "algebra",
24
- description: "Add unit weights until a balance is level — discover the hidden weight (the unknown) with no symbols. The essentials opener.",
24
+ description: "Add unit weights until a balance is level, discover the hidden weight (the unknown) with no symbols. The essentials opener.",
25
25
  paramsSchema: z.object({
26
26
  bucketWeight: z.number(),
27
27
  maxWeights: z.number().optional()
@@ -59,7 +59,7 @@ function registerBuiltinTemplates() {
59
59
  id: "area-model",
60
60
  title: "Area model (algebra tiles)",
61
61
  category: "algebra",
62
- description: "(x+a)(x+b) as a partitioned rectangle — expand or factor.",
62
+ description: "(x+a)(x+b) as a partitioned rectangle, expand or factor.",
63
63
  paramsSchema: z.object({
64
64
  a: z.number(),
65
65
  b: z.number(),
@@ -93,7 +93,7 @@ function registerBuiltinTemplates() {
93
93
  id: "balance-lever",
94
94
  title: "Lever / torque",
95
95
  category: "physics",
96
- description: "Balance the mobile — set the unknown weight so Σ(w·d) matches.",
96
+ description: "Balance the mobile, set the unknown weight so Σ(w·d) matches.",
97
97
  paramsSchema: z.object({
98
98
  items: z.array(z.unknown()).optional(),
99
99
  start: z.number().optional(),
@@ -107,7 +107,7 @@ function registerBuiltinTemplates() {
107
107
  });
108
108
  registerLabTemplate({
109
109
  id: "optics",
110
- title: "Optics — reflection",
110
+ title: "Optics: reflection",
111
111
  category: "physics",
112
112
  description: "Reflect a light ray off mirrors into the target.",
113
113
  defaultParams: {},
@@ -117,7 +117,7 @@ function registerBuiltinTemplates() {
117
117
  id: "circuit",
118
118
  title: "Circuit",
119
119
  category: "circuits",
120
- description: "Battery + series/parallel branches — light the bulb.",
120
+ description: "Battery + series/parallel branches, light the bulb.",
121
121
  paramsSchema: z.object({
122
122
  emf: z.number().optional(),
123
123
  branches: z.array(z.unknown()).optional()
@@ -12,7 +12,7 @@ import { Dot, Label, Polygon, Segment, Stage, useFrameLoop } from "@classytic/st
12
12
 
13
13
  //#region src/chem/battery.tsx
14
14
  /**
15
- * Battery — a galvanic (voltaic) cell. Two half-cells: at the anode a metal is
15
+ * Battery, a galvanic (voltaic) cell. Two half-cells: at the anode a metal is
16
16
  * oxidized and releases electrons; they flow through the external wire to the
17
17
  * cathode, where ions are reduced. Watch the electrons stream, see the
18
18
  * half-reactions and the cell EMF.
@@ -10,13 +10,13 @@ import { Circle, Dot, Label, Stage, useFrameLoop } from "@classytic/stage";
10
10
 
11
11
  //#region src/chem/bohr-atom.tsx
12
12
  /**
13
- * BohrAtom — the classic shell model of an atom, animated.
13
+ * BohrAtom, the classic shell model of an atom, animated.
14
14
  *
15
15
  * Nucleus (Z protons) ringed by electron shells filled 2, 8, 8, 18…; electrons
16
16
  * orbit at a steady clip via the engine clock. Drag the proton count to walk the
17
17
  * first 20 elements and watch shells fill and close.
18
18
  *
19
- * Now on the @classytic/stage engine (SVG, accessible, themed) — shells are
19
+ * Now on the @classytic/stage engine (SVG, accessible, themed), shells are
20
20
  * Circles, electrons are Dots, the nucleus is a labelled Circle.
21
21
  */
22
22
  const SYMBOLS = [
@@ -187,7 +187,7 @@ function BohrAtom({ protons, title = "Bohr model of the atom", height = 340 } =
187
187
  }) });
188
188
  return /* @__PURE__ */ jsx(LabFrame, {
189
189
  title,
190
- prompt: "Drag the proton count to walk the first 20 elements — watch the shells fill (2, 8, 8, …).",
190
+ prompt: "Drag the proton count to walk the first 20 elements, watch the shells fill (2, 8, 8, …).",
191
191
  aside: /* @__PURE__ */ jsx(Callout, {
192
192
  tone: "result",
193
193
  children: /* @__PURE__ */ jsxs("span", {
@@ -197,7 +197,7 @@ function BohrAtom({ protons, title = "Bohr model of the atom", height = 340 } =
197
197
  fontVariantNumeric: "tabular-nums"
198
198
  },
199
199
  children: [
200
- /* @__PURE__ */ jsxs("span", { children: ["element ", SYMBOLS[z] ?? "—"] }),
200
+ /* @__PURE__ */ jsxs("span", { children: ["element ", SYMBOLS[z] ?? ", "] }),
201
201
  /* @__PURE__ */ jsxs("span", { children: ["Z ", z] }),
202
202
  /* @__PURE__ */ jsxs("span", { children: ["config ", shells.join(", ")] })
203
203
  ]