@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
@@ -7,6 +7,7 @@ import { KarnaughMapLab } from "../discrete/karnaugh/preset.mjs";
7
7
  import { MonteCarloLab } from "../discrete/monte-carlo/preset.mjs";
8
8
  import { MontyHallLab } from "../discrete/monty-hall/preset.mjs";
9
9
  import { OutcomeBuilderLab } from "../discrete/outcome-builder/preset.mjs";
10
+ import { CombinationStudioLab } from "../discrete/combination-studio/preset.mjs";
10
11
  import { BayesLab } from "../discrete/bayes/preset.mjs";
11
12
  import { LawOfLargeNumbersLab } from "../discrete/lln/preset.mjs";
12
13
  import { CountingSlotsLab } from "../discrete/counting-slots/preset.mjs";
@@ -16,6 +17,7 @@ import { PascalTriangleLab } from "../discrete/pascal/preset.mjs";
16
17
  import { BinomialDistributionLab } from "../discrete/binomial/preset.mjs";
17
18
  import { HypergeometricLab } from "../discrete/hypergeometric/preset.mjs";
18
19
  import { ExpectedValueLab } from "../discrete/expected-value/preset.mjs";
20
+ import { ReactNode } from "react";
19
21
  import { z } from "zod";
20
22
 
21
23
  //#region src/blocks/discrete.d.ts
@@ -28,6 +30,7 @@ declare const KarnaughBlock: import("@classytic/cms-ui/contract").CmsBlock<z.Zod
28
30
  declare const MonteCarloBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
29
31
  declare const MontyHallBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
30
32
  declare const OutcomeBuilderBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
33
+ declare const CombinationStudioBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
31
34
  declare const BayesBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
32
35
  declare const CountingSlotsBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
33
36
  declare const SelectionBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
@@ -37,7 +40,30 @@ declare const BinomialBlock: import("@classytic/cms-ui/contract").CmsBlock<z.Zod
37
40
  declare const HypergeometricBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
38
41
  declare const ExpectedValueBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
39
42
  declare const LawOfLargeNumbersBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
40
- declare const discreteBlocks: readonly [import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>];
43
+ declare const ruleSchema: z.ZodObject<{
44
+ preset: z.ZodDefault<z.ZodEnum<{
45
+ none: "none";
46
+ "rule-of-product": "rule-of-product";
47
+ "rule-of-sum": "rule-of-sum";
48
+ factorial: "factorial";
49
+ permutation: "permutation";
50
+ combination: "combination";
51
+ "perm-with-rep": "perm-with-rep";
52
+ }>>;
53
+ name: z.ZodDefault<z.ZodString>;
54
+ formula: z.ZodDefault<z.ZodString>;
55
+ analogy: z.ZodOptional<z.ZodString>;
56
+ tricks: z.ZodOptional<z.ZodArray<z.ZodString>>;
57
+ derivation: z.ZodOptional<z.ZodArray<z.ZodObject<{
58
+ tex: z.ZodString;
59
+ note: z.ZodOptional<z.ZodString>;
60
+ }, z.core.$strip>>>;
61
+ title: z.ZodOptional<z.ZodString>;
62
+ prompt: z.ZodOptional<z.ZodString>;
63
+ }, z.core.$strip>;
64
+ declare function ruleComp(a: z.infer<typeof ruleSchema>): ReactNode;
65
+ declare const RuleCardBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
66
+ declare const discreteBlocks: readonly [import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>];
41
67
  declare const discreteComponents: {
42
68
  readonly TruthTable: typeof TruthTableLab;
43
69
  readonly CountingTree: typeof CountingTreeLab;
@@ -57,6 +83,8 @@ declare const discreteComponents: {
57
83
  readonly Hypergeometric: typeof HypergeometricLab;
58
84
  readonly ExpectedValue: typeof ExpectedValueLab;
59
85
  readonly LawOfLargeNumbers: typeof LawOfLargeNumbersLab;
86
+ readonly CombinationStudio: typeof CombinationStudioLab;
87
+ readonly RuleCard: typeof ruleComp;
60
88
  };
61
89
  //#endregion
62
- export { ArrangementsBlock, BayesBlock, BinomialBlock, BooleanCircuitBlock, CountingSlotsBlock, CountingTreeBlock, ExpectedValueBlock, HypergeometricBlock, KarnaughBlock, LawOfLargeNumbersBlock, MonteCarloBlock, MontyHallBlock, OutcomeBuilderBlock, PascalBlock, SampleSpaceBlock, SelectionBlock, TruthTableBlock, VennBlock, discreteBlocks, discreteComponents };
90
+ export { ArrangementsBlock, BayesBlock, BinomialBlock, BooleanCircuitBlock, CombinationStudioBlock, CountingSlotsBlock, CountingTreeBlock, ExpectedValueBlock, HypergeometricBlock, KarnaughBlock, LawOfLargeNumbersBlock, MonteCarloBlock, MontyHallBlock, OutcomeBuilderBlock, PascalBlock, RuleCardBlock, SampleSpaceBlock, SelectionBlock, TruthTableBlock, VennBlock, discreteBlocks, discreteComponents };
@@ -1,3 +1,5 @@
1
+ import { RuleLab } from "../kit/rule.mjs";
2
+ import { COUNTING_RULES } from "../discrete/rules.mjs";
1
3
  import { TruthTableLab } from "../discrete/truth-table/preset.mjs";
2
4
  import { CountingTreeLab } from "../discrete/counting-tree/preset.mjs";
3
5
  import { VennSetBoardLab } from "../discrete/venn/preset.mjs";
@@ -7,6 +9,7 @@ import { KarnaughMapLab } from "../discrete/karnaugh/preset.mjs";
7
9
  import { MonteCarloLab } from "../discrete/monte-carlo/preset.mjs";
8
10
  import { MontyHallLab } from "../discrete/monty-hall/preset.mjs";
9
11
  import { OutcomeBuilderLab } from "../discrete/outcome-builder/preset.mjs";
12
+ import { CombinationStudioLab } from "../discrete/combination-studio/preset.mjs";
10
13
  import { BayesLab } from "../discrete/bayes/preset.mjs";
11
14
  import { LawOfLargeNumbersLab } from "../discrete/lln/preset.mjs";
12
15
  import { CountingSlotsLab } from "../discrete/counting-slots/preset.mjs";
@@ -180,13 +183,40 @@ const montySchema = z.object({
180
183
  seed: z.number().optional(),
181
184
  ...common
182
185
  });
183
- const MontyHallBlock = lab("monty-hall", "MontyHall", "Monty Hall game", "Play the paradox: pick a door, Monty opens a goat, stay or switch — every game grows the switch/stay win-rate bars to 2/3 vs 1/3.", montySchema, (a) => /* @__PURE__ */ jsx(MontyHallLab, { ...a }));
186
+ const MontyHallBlock = lab("monty-hall", "MontyHall", "Monty Hall game", "Play the paradox: pick a door, Monty opens a goat, stay or switch, every game grows the switch/stay win-rate bars to 2/3 vs 1/3.", montySchema, (a) => /* @__PURE__ */ jsx(MontyHallLab, { ...a }));
184
187
  const outcomeSchema = z.object({
185
188
  stages: z.array(z.enum(["coin", "die"])).optional(),
186
189
  maxOutcomes: z.number().optional(),
187
190
  ...common
188
191
  });
189
192
  const OutcomeBuilderBlock = lab("outcome-builder", "OutcomeBuilder", "Sample-space builder (coins & dice)", "Add coins/dice and watch every outcome fan out with the counting principle; click outcomes to mark an event → P = favourable ÷ total.", outcomeSchema, (a) => /* @__PURE__ */ jsx(OutcomeBuilderLab, { ...a }));
193
+ const comboOptionSchema = z.object({
194
+ id: z.string(),
195
+ label: z.string(),
196
+ emoji: z.string().optional(),
197
+ color: z.string().optional()
198
+ });
199
+ const comboCatSchema = z.object({
200
+ id: z.string(),
201
+ label: z.string(),
202
+ slot: z.enum([
203
+ "top",
204
+ "bottom",
205
+ "hat",
206
+ "hold",
207
+ "none"
208
+ ]).optional(),
209
+ options: z.array(comboOptionSchema)
210
+ });
211
+ const studioSchema = z.object({
212
+ scenario: z.string().optional(),
213
+ categories: z.array(comboCatSchema).optional(),
214
+ figure: z.enum(["character", "card"]).optional(),
215
+ startActive: z.number().optional(),
216
+ maxWall: z.number().optional(),
217
+ ...common
218
+ });
219
+ const CombinationStudioBlock = lab("combination-studio", "CombinationStudio", "Combination studio (rule of product, felt)", "The multiplication principle made tactile: pick from each rack, assemble each outcome (a dressed character or an emoji card), fill a rows × columns wall, then add a variable and watch the total multiply. Predict-first. Any authored scenario (outfits, sundaes, plates, routes).", studioSchema, (a) => /* @__PURE__ */ jsx(CombinationStudioLab, { ...a }));
190
220
  const bayesSchema = z.object({
191
221
  prior: z.number().default(.01),
192
222
  sensitivity: z.number().default(.9),
@@ -269,6 +299,42 @@ const llnSchema = z.object({
269
299
  ...common
270
300
  });
271
301
  const LawOfLargeNumbersBlock = lab("lln", "LawOfLargeNumbers", "Law of large numbers", "A coin/die sampler: running frequencies converge onto the true probabilities as draws pile up.", llnSchema, (a) => /* @__PURE__ */ jsx(LawOfLargeNumbersLab, { ...a }));
302
+ const ruleSchema = z.object({
303
+ preset: z.enum([
304
+ "none",
305
+ "rule-of-product",
306
+ "rule-of-sum",
307
+ "factorial",
308
+ "permutation",
309
+ "combination",
310
+ "perm-with-rep"
311
+ ]).default("none"),
312
+ name: z.string().default("My rule"),
313
+ formula: z.string().default("a^2 + b^2 = c^2"),
314
+ analogy: z.string().optional(),
315
+ tricks: z.array(z.string()).optional(),
316
+ derivation: z.array(z.object({
317
+ tex: z.string(),
318
+ note: z.string().optional()
319
+ })).optional(),
320
+ title: z.string().optional(),
321
+ prompt: z.string().optional()
322
+ });
323
+ function ruleComp(a) {
324
+ return /* @__PURE__ */ jsx(RuleLab, {
325
+ rule: (a.preset && a.preset !== "none" ? COUNTING_RULES.find((r) => r.id === a.preset) : void 0) ?? {
326
+ id: "custom",
327
+ name: a.name ?? "Rule",
328
+ formula: a.formula ?? "a^2 + b^2 = c^2",
329
+ ...a.analogy ? { analogy: a.analogy } : {},
330
+ ...a.derivation?.length ? { derivation: a.derivation } : {},
331
+ ...a.tricks?.length ? { tricks: a.tricks } : {}
332
+ },
333
+ title: a.title,
334
+ prompt: a.prompt
335
+ });
336
+ }
337
+ const RuleCardBlock = lab("rule-card", "RuleCard", "Rule card (concept)", "A formula taught properly: an analogy, a live worked calculator, a revealable derivation, and tricks. Pick a built-in counting rule (with its calculator), or author your own concept (formula + analogy + derivation + tricks, as data).", ruleSchema, ruleComp);
272
338
  const discreteBlocks = [
273
339
  TruthTableBlock,
274
340
  CountingTreeBlock,
@@ -287,7 +353,9 @@ const discreteBlocks = [
287
353
  BinomialBlock,
288
354
  HypergeometricBlock,
289
355
  ExpectedValueBlock,
290
- LawOfLargeNumbersBlock
356
+ LawOfLargeNumbersBlock,
357
+ CombinationStudioBlock,
358
+ RuleCardBlock
291
359
  ];
292
360
  const discreteComponents = {
293
361
  TruthTable: TruthTableLab,
@@ -307,8 +375,10 @@ const discreteComponents = {
307
375
  Binomial: BinomialDistributionLab,
308
376
  Hypergeometric: HypergeometricLab,
309
377
  ExpectedValue: ExpectedValueLab,
310
- LawOfLargeNumbers: LawOfLargeNumbersLab
378
+ LawOfLargeNumbers: LawOfLargeNumbersLab,
379
+ CombinationStudio: CombinationStudioLab,
380
+ RuleCard: ruleComp
311
381
  };
312
382
 
313
383
  //#endregion
314
- export { ArrangementsBlock, BayesBlock, BinomialBlock, BooleanCircuitBlock, CountingSlotsBlock, CountingTreeBlock, ExpectedValueBlock, HypergeometricBlock, KarnaughBlock, LawOfLargeNumbersBlock, MonteCarloBlock, MontyHallBlock, OutcomeBuilderBlock, PascalBlock, SampleSpaceBlock, SelectionBlock, TruthTableBlock, VennBlock, discreteBlocks, discreteComponents };
384
+ export { ArrangementsBlock, BayesBlock, BinomialBlock, BooleanCircuitBlock, CombinationStudioBlock, CountingSlotsBlock, CountingTreeBlock, ExpectedValueBlock, HypergeometricBlock, KarnaughBlock, LawOfLargeNumbersBlock, MonteCarloBlock, MontyHallBlock, OutcomeBuilderBlock, PascalBlock, RuleCardBlock, SampleSpaceBlock, SelectionBlock, TruthTableBlock, VennBlock, discreteBlocks, discreteComponents };
@@ -8,7 +8,7 @@ import { defineBlock } from "@classytic/cms-ui/contract";
8
8
 
9
9
  //#region src/blocks/economics.tsx
10
10
  /**
11
- * @classytic/labs/blocks — economics (commerce) lab block specs.
11
+ * @classytic/labs/blocks, economics (commerce) lab block specs.
12
12
  *
13
13
  * `defineBlock` editor adapters for the economics labs. A creator/agent authors
14
14
  * the curve parameters + which controls are on. One domain per file; assembled in
@@ -7,7 +7,7 @@ import { defineBlock } from "@classytic/cms-ui/contract";
7
7
 
8
8
  //#region src/blocks/geography.tsx
9
9
  /**
10
- * @classytic/labs/blocks — geography lab block specs.
10
+ * @classytic/labs/blocks, geography lab block specs.
11
11
  *
12
12
  * `defineBlock` editor adapter for the general CycleLab. A creator/agent picks a
13
13
  * canned cycle (water / rock / carbon) OR pastes their own nodes + edges JSON, and
@@ -8,7 +8,7 @@ import { defineBlock } from "@classytic/cms-ui/contract";
8
8
 
9
9
  //#region src/blocks/geometry.tsx
10
10
  /**
11
- * @classytic/labs/blocks — geometry lab block specs.
11
+ * @classytic/labs/blocks, geometry lab block specs.
12
12
  *
13
13
  * `defineBlock` editor adapters for the geometry labs (one domain per file; the
14
14
  * registry is assembled in `./index.ts`). Each spec pairs a zod schema with a
@@ -77,7 +77,7 @@ const GeometryBoardBlock = defineBlock({
77
77
  key: "geometry-board",
78
78
  void: true,
79
79
  label: "Geometry board",
80
- description: "Build a construction — points, circles, lines & computed intersections. Drag points live.",
80
+ description: "Build a construction, points, circles, lines & computed intersections. Drag points live.",
81
81
  category: "interactive",
82
82
  schema: z.object({
83
83
  scene: z.array(z.record(z.string(), z.unknown())).optional(),
@@ -114,7 +114,7 @@ const IntersectingCirclesBlock = defineBlock({
114
114
  key: "intersecting-circles",
115
115
  void: true,
116
116
  label: "Intersecting circles",
117
- description: "Common chord of two circles — drag the centres, chord length by Pythagoras.",
117
+ description: "Common chord of two circles, drag the centres, chord length by Pythagoras.",
118
118
  category: "interactive",
119
119
  schema: z.object({
120
120
  r1: z.number().optional(),
@@ -1,6 +1,9 @@
1
1
  import { PlaceValueDialLab } from "../ict/number-systems/place-value-dial.mjs";
2
2
  import { BitGrouperLab } from "../ict/number-systems/bit-grouper.mjs";
3
3
  import { BaseOdometerLab } from "../ict/number-systems/base-odometer.mjs";
4
+ import { LogicGateLab } from "../logic/lab.mjs";
5
+ import { BinaryDisplayLab } from "../logic/display.mjs";
6
+ import { LogicBuildLab } from "../logic/LogicBuildLab.mjs";
4
7
  import { z } from "zod";
5
8
 
6
9
  //#region src/blocks/ict.d.ts
@@ -31,6 +34,49 @@ declare const BaseOdometerBlock: import("@classytic/cms-ui/contract").CmsBlock<z
31
34
  title: z.ZodOptional<z.ZodString>;
32
35
  prompt: z.ZodOptional<z.ZodString>;
33
36
  }, z.core.$strip>>;
37
+ declare const LogicGateBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
38
+ preset: z.ZodDefault<z.ZodEnum<{
39
+ and: "and";
40
+ or: "or";
41
+ xor: "xor";
42
+ "nand-not": "nand-not";
43
+ "nand-and": "nand-and";
44
+ "nand-or": "nand-or";
45
+ "xor-nand": "xor-nand";
46
+ "half-adder": "half-adder";
47
+ "full-adder": "full-adder";
48
+ }>>;
49
+ mode: z.ZodDefault<z.ZodEnum<{
50
+ predict: "predict";
51
+ explore: "explore";
52
+ }>>;
53
+ steps: z.ZodDefault<z.ZodBoolean>;
54
+ showTable: z.ZodDefault<z.ZodBoolean>;
55
+ title: z.ZodOptional<z.ZodString>;
56
+ prompt: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strip>>;
58
+ declare const BinaryDisplayBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
59
+ bits: z.ZodDefault<z.ZodNumber>;
60
+ start: z.ZodDefault<z.ZodNumber>;
61
+ target: z.ZodOptional<z.ZodNumber>;
62
+ title: z.ZodOptional<z.ZodString>;
63
+ prompt: z.ZodOptional<z.ZodString>;
64
+ }, z.core.$strip>>;
65
+ declare const LogicBuilderBlock: import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
66
+ goal: z.ZodDefault<z.ZodEnum<{
67
+ and: "and";
68
+ or: "or";
69
+ xor: "xor";
70
+ "nand-not": "nand-not";
71
+ "nand-and": "nand-and";
72
+ "nand-or": "nand-or";
73
+ "half-adder": "half-adder";
74
+ "full-adder": "full-adder";
75
+ sandbox: "sandbox";
76
+ }>>;
77
+ title: z.ZodOptional<z.ZodString>;
78
+ prompt: z.ZodOptional<z.ZodString>;
79
+ }, z.core.$strip>>;
34
80
  declare const ictBlocks: readonly [import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
35
81
  base: z.ZodDefault<z.ZodNumber>;
36
82
  width: z.ZodDefault<z.ZodNumber>;
@@ -55,11 +101,54 @@ declare const ictBlocks: readonly [import("@classytic/cms-ui/contract").CmsBlock
55
101
  target: z.ZodOptional<z.ZodNumber>;
56
102
  title: z.ZodOptional<z.ZodString>;
57
103
  prompt: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$strip>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
105
+ preset: z.ZodDefault<z.ZodEnum<{
106
+ and: "and";
107
+ or: "or";
108
+ xor: "xor";
109
+ "nand-not": "nand-not";
110
+ "nand-and": "nand-and";
111
+ "nand-or": "nand-or";
112
+ "xor-nand": "xor-nand";
113
+ "half-adder": "half-adder";
114
+ "full-adder": "full-adder";
115
+ }>>;
116
+ mode: z.ZodDefault<z.ZodEnum<{
117
+ predict: "predict";
118
+ explore: "explore";
119
+ }>>;
120
+ steps: z.ZodDefault<z.ZodBoolean>;
121
+ showTable: z.ZodDefault<z.ZodBoolean>;
122
+ title: z.ZodOptional<z.ZodString>;
123
+ prompt: z.ZodOptional<z.ZodString>;
124
+ }, z.core.$strip>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
125
+ bits: z.ZodDefault<z.ZodNumber>;
126
+ start: z.ZodDefault<z.ZodNumber>;
127
+ target: z.ZodOptional<z.ZodNumber>;
128
+ title: z.ZodOptional<z.ZodString>;
129
+ prompt: z.ZodOptional<z.ZodString>;
130
+ }, z.core.$strip>>, import("@classytic/cms-ui/contract").CmsBlock<z.ZodObject<{
131
+ goal: z.ZodDefault<z.ZodEnum<{
132
+ and: "and";
133
+ or: "or";
134
+ xor: "xor";
135
+ "nand-not": "nand-not";
136
+ "nand-and": "nand-and";
137
+ "nand-or": "nand-or";
138
+ "half-adder": "half-adder";
139
+ "full-adder": "full-adder";
140
+ sandbox: "sandbox";
141
+ }>>;
142
+ title: z.ZodOptional<z.ZodString>;
143
+ prompt: z.ZodOptional<z.ZodString>;
58
144
  }, z.core.$strip>>];
59
145
  declare const ictComponents: {
60
146
  readonly PlaceValueDial: typeof PlaceValueDialLab;
61
147
  readonly BitGrouper: typeof BitGrouperLab;
62
148
  readonly BaseOdometer: typeof BaseOdometerLab;
149
+ readonly LogicGate: typeof LogicGateLab;
150
+ readonly BinaryDisplay: typeof BinaryDisplayLab;
151
+ readonly LogicBuilder: typeof LogicBuildLab;
63
152
  };
64
153
  //#endregion
65
- export { BaseOdometerBlock, BitGrouperBlock, PlaceValueDialBlock, ictBlocks, ictComponents };
154
+ export { BaseOdometerBlock, BinaryDisplayBlock, BitGrouperBlock, LogicBuilderBlock, LogicGateBlock, PlaceValueDialBlock, ictBlocks, ictComponents };
@@ -1,14 +1,18 @@
1
1
  import { PlaceValueDialLab } from "../ict/number-systems/place-value-dial.mjs";
2
2
  import { BitGrouperLab } from "../ict/number-systems/bit-grouper.mjs";
3
3
  import { BaseOdometerLab } from "../ict/number-systems/base-odometer.mjs";
4
- import { ConfigPanel, ConfigRow, NumField, TextField } from "./authoring.mjs";
4
+ import { LOGIC_PRESETS } from "../logic/presets.mjs";
5
+ import { LogicGateLab } from "../logic/lab.mjs";
6
+ import { BinaryDisplayLab } from "../logic/display.mjs";
7
+ import { LogicBuildLab } from "../logic/LogicBuildLab.mjs";
8
+ import { ChipToggle, ConfigPanel, ConfigRow, NumField, TextField } from "./authoring.mjs";
5
9
  import { jsx, jsxs } from "react/jsx-runtime";
6
10
  import { z } from "zod";
7
11
  import { defineBlock } from "@classytic/cms-ui/contract";
8
12
 
9
13
  //#region src/blocks/ict.tsx
10
14
  /**
11
- * @classytic/labs/blocks — ICT lab block specs.
15
+ * @classytic/labs/blocks, ICT lab block specs.
12
16
  *
13
17
  * `defineBlock` editor adapters for the ICT labs (one domain per file; the
14
18
  * registry is assembled in `./index.ts`). Each spec pairs a real zod schema
@@ -16,6 +20,7 @@ import { defineBlock } from "@classytic/cms-ui/contract";
16
20
  * authoring kit (`./authoring`). `@classytic/cms-ui` + `zod` are optional peers
17
21
  * touched only by the blocks layer.
18
22
  */
23
+ const LOGIC_KEYS = Object.keys(LOGIC_PRESETS);
19
24
  const PlaceValueDialBlock = defineBlock({
20
25
  key: "place-value-dial",
21
26
  tag: "PlaceValueDial",
@@ -81,7 +86,7 @@ const BitGrouperBlock = defineBlock({
81
86
  tag: "BitGrouper",
82
87
  void: true,
83
88
  label: "Bit grouper (nibbles → hex/octal)",
84
- description: "Tappable bits auto-slice into groups from the right — 4 per hex digit, 3 per octal — translating live; shows why a byte = two clean hex digits but a wasteful octal top.",
89
+ description: "Tappable bits auto-slice into groups from the right, 4 per hex digit, 3 per octal, translating live; shows why a byte = two clean hex digits but a wasteful octal top.",
85
90
  category: "interactive",
86
91
  schema: z.object({
87
92
  width: z.number().default(8),
@@ -132,7 +137,7 @@ const BaseOdometerBlock = defineBlock({
132
137
  tag: "BaseOdometer",
133
138
  void: true,
134
139
  label: "Base odometer (every base at once)",
135
- description: "Stacked odometer rows driven by one shared integer — binary/octal/decimal/hex roll in lockstep (binary fastest), proving base is a representation, not a different number. Race toggle animates the cascade.",
140
+ description: "Stacked odometer rows driven by one shared integer, binary/octal/decimal/hex roll in lockstep (binary fastest), proving base is a representation, not a different number. Race toggle animates the cascade.",
136
141
  category: "interactive",
137
142
  schema: z.object({
138
143
  max: z.number().default(255),
@@ -182,16 +187,221 @@ const BaseOdometerBlock = defineBlock({
182
187
  ] }), widget] });
183
188
  }
184
189
  });
190
+ const LogicGateBlock = defineBlock({
191
+ key: "logic-gate",
192
+ tag: "LogicGate",
193
+ void: true,
194
+ label: "Logic gate circuit (propagation / predict)",
195
+ description: "A data-driven gate network: wires glow where the signal is HIGH so learners watch it propagate. Pick a preset (AND…NAND universality, half/full adder), let them toggle inputs (explore) or predict the output, with a live truth table.",
196
+ category: "interactive",
197
+ schema: z.object({
198
+ preset: z.enum([
199
+ "and",
200
+ "or",
201
+ "xor",
202
+ "nand-not",
203
+ "nand-and",
204
+ "nand-or",
205
+ "xor-nand",
206
+ "half-adder",
207
+ "full-adder"
208
+ ]).default("and"),
209
+ mode: z.enum(["explore", "predict"]).default("explore"),
210
+ steps: z.boolean().default(false),
211
+ showTable: z.boolean().default(true),
212
+ title: z.string().optional(),
213
+ prompt: z.string().optional()
214
+ }),
215
+ Component: ({ attributes, mode, updateAttributes }) => {
216
+ const widget = /* @__PURE__ */ jsx(LogicGateLab, {
217
+ preset: attributes.preset,
218
+ mode: attributes.mode,
219
+ steps: attributes.steps,
220
+ showTable: attributes.showTable,
221
+ title: attributes.title,
222
+ prompt: attributes.prompt
223
+ });
224
+ if (mode !== "editing" || !updateAttributes) return widget;
225
+ return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
226
+ /* @__PURE__ */ jsx(ConfigRow, {
227
+ label: "title",
228
+ children: /* @__PURE__ */ jsx(TextField, {
229
+ value: attributes.title ?? "",
230
+ onChange: (v) => updateAttributes({ title: v }),
231
+ placeholder: "Logic gates",
232
+ className: "flex-1"
233
+ })
234
+ }),
235
+ /* @__PURE__ */ jsx(ConfigRow, {
236
+ label: "circuit",
237
+ children: /* @__PURE__ */ jsx("div", {
238
+ className: "flex flex-wrap gap-1.5",
239
+ children: LOGIC_KEYS.map((k) => /* @__PURE__ */ jsx(ChipToggle, {
240
+ active: (attributes.preset ?? "and") === k,
241
+ onClick: () => updateAttributes({ preset: k }),
242
+ children: LOGIC_PRESETS[k]?.title ?? k
243
+ }, k))
244
+ })
245
+ }),
246
+ /* @__PURE__ */ jsxs(ConfigRow, {
247
+ label: "mode",
248
+ children: [/* @__PURE__ */ jsx(ChipToggle, {
249
+ active: (attributes.mode ?? "explore") === "explore",
250
+ onClick: () => updateAttributes({ mode: "explore" }),
251
+ children: "explore"
252
+ }), /* @__PURE__ */ jsx(ChipToggle, {
253
+ active: attributes.mode === "predict",
254
+ onClick: () => updateAttributes({ mode: "predict" }),
255
+ children: "predict"
256
+ })]
257
+ }),
258
+ /* @__PURE__ */ jsxs(ConfigRow, {
259
+ label: "step reveal",
260
+ children: [/* @__PURE__ */ jsx(ChipToggle, {
261
+ active: !attributes.steps,
262
+ onClick: () => updateAttributes({ steps: false }),
263
+ children: "off"
264
+ }), /* @__PURE__ */ jsx(ChipToggle, {
265
+ active: !!attributes.steps,
266
+ onClick: () => updateAttributes({ steps: true }),
267
+ children: "on"
268
+ })]
269
+ }),
270
+ /* @__PURE__ */ jsxs(ConfigRow, {
271
+ label: "truth table",
272
+ children: [/* @__PURE__ */ jsx(ChipToggle, {
273
+ active: attributes.showTable !== false,
274
+ onClick: () => updateAttributes({ showTable: true }),
275
+ children: "show"
276
+ }), /* @__PURE__ */ jsx(ChipToggle, {
277
+ active: attributes.showTable === false,
278
+ onClick: () => updateAttributes({ showTable: false }),
279
+ children: "hide"
280
+ })]
281
+ })
282
+ ] }), widget] });
283
+ }
284
+ });
285
+ const BinaryDisplayBlock = defineBlock({
286
+ key: "binary-display",
287
+ tag: "BinaryDisplay",
288
+ void: true,
289
+ label: "Binary display (bits → seven-segment)",
290
+ description: "A row of weighted bit switches (8 4 2 1) drives a seven-segment LED digit through a decoder, with live binary / decimal / hex readouts. The \"number LED\" payoff for DLD projects; set a target digit to make it a goal.",
291
+ category: "interactive",
292
+ schema: z.object({
293
+ bits: z.number().default(4),
294
+ start: z.number().default(0),
295
+ target: z.number().optional(),
296
+ title: z.string().optional(),
297
+ prompt: z.string().optional()
298
+ }),
299
+ Component: ({ attributes, mode, updateAttributes }) => {
300
+ const widget = /* @__PURE__ */ jsx(BinaryDisplayLab, {
301
+ bits: attributes.bits,
302
+ start: attributes.start,
303
+ target: attributes.target,
304
+ title: attributes.title,
305
+ prompt: attributes.prompt
306
+ });
307
+ if (mode !== "editing" || !updateAttributes) return widget;
308
+ return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [
309
+ /* @__PURE__ */ jsx(ConfigRow, {
310
+ label: "title",
311
+ children: /* @__PURE__ */ jsx(TextField, {
312
+ value: attributes.title ?? "",
313
+ onChange: (v) => updateAttributes({ title: v }),
314
+ placeholder: "Build a number from bits",
315
+ className: "flex-1"
316
+ })
317
+ }),
318
+ /* @__PURE__ */ jsx(ConfigRow, {
319
+ label: "bits",
320
+ children: /* @__PURE__ */ jsx(NumField, {
321
+ value: attributes.bits ?? 4,
322
+ onChange: (v) => updateAttributes({ bits: v })
323
+ })
324
+ }),
325
+ /* @__PURE__ */ jsx(ConfigRow, {
326
+ label: "target digit",
327
+ children: /* @__PURE__ */ jsx(NumField, {
328
+ value: attributes.target ?? 0,
329
+ onChange: (v) => updateAttributes({ target: v })
330
+ })
331
+ })
332
+ ] }), widget] });
333
+ }
334
+ });
335
+ const LogicBuilderBlock = defineBlock({
336
+ key: "logic-builder",
337
+ tag: "LogicBuilder",
338
+ void: true,
339
+ label: "Logic builder (drag-and-drop gate circuit)",
340
+ description: "A Logisim-style canvas: drag sources, gates and LEDs from the palette, wire output dots to input slots, flip switches and watch the signal glow. Leave the goal on \"sandbox\" for open building, or pick a target (half-adder, NAND→AND…) to grade the learner against its truth table.",
341
+ category: "interactive",
342
+ schema: z.object({
343
+ goal: z.enum([
344
+ "sandbox",
345
+ "and",
346
+ "or",
347
+ "xor",
348
+ "nand-not",
349
+ "nand-and",
350
+ "nand-or",
351
+ "half-adder",
352
+ "full-adder"
353
+ ]).default("sandbox"),
354
+ title: z.string().optional(),
355
+ prompt: z.string().optional()
356
+ }),
357
+ Component: ({ attributes, mode, updateAttributes }) => {
358
+ const widget = /* @__PURE__ */ jsx(LogicBuildLab, {
359
+ goal: attributes.goal && attributes.goal !== "sandbox" ? attributes.goal : void 0,
360
+ title: attributes.title,
361
+ prompt: attributes.prompt
362
+ });
363
+ if (mode !== "editing" || !updateAttributes) return widget;
364
+ return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(ConfigPanel, { children: [/* @__PURE__ */ jsx(ConfigRow, {
365
+ label: "title",
366
+ children: /* @__PURE__ */ jsx(TextField, {
367
+ value: attributes.title ?? "",
368
+ onChange: (v) => updateAttributes({ title: v }),
369
+ placeholder: "Build the circuit",
370
+ className: "flex-1"
371
+ })
372
+ }), /* @__PURE__ */ jsx(ConfigRow, {
373
+ label: "goal",
374
+ children: /* @__PURE__ */ jsxs("div", {
375
+ className: "flex flex-wrap gap-1.5",
376
+ children: [/* @__PURE__ */ jsx(ChipToggle, {
377
+ active: (attributes.goal ?? "sandbox") === "sandbox",
378
+ onClick: () => updateAttributes({ goal: "sandbox" }),
379
+ children: "sandbox"
380
+ }), LOGIC_KEYS.map((k) => /* @__PURE__ */ jsx(ChipToggle, {
381
+ active: attributes.goal === k,
382
+ onClick: () => updateAttributes({ goal: k }),
383
+ children: LOGIC_PRESETS[k]?.title ?? k
384
+ }, k))]
385
+ })
386
+ })] }), widget] });
387
+ }
388
+ });
185
389
  const ictBlocks = [
186
390
  PlaceValueDialBlock,
187
391
  BitGrouperBlock,
188
- BaseOdometerBlock
392
+ BaseOdometerBlock,
393
+ LogicGateBlock,
394
+ BinaryDisplayBlock,
395
+ LogicBuilderBlock
189
396
  ];
190
397
  const ictComponents = {
191
398
  PlaceValueDial: PlaceValueDialLab,
192
399
  BitGrouper: BitGrouperLab,
193
- BaseOdometer: BaseOdometerLab
400
+ BaseOdometer: BaseOdometerLab,
401
+ LogicGate: LogicGateLab,
402
+ BinaryDisplay: BinaryDisplayLab,
403
+ LogicBuilder: LogicBuildLab
194
404
  };
195
405
 
196
406
  //#endregion
197
- export { BaseOdometerBlock, BitGrouperBlock, PlaceValueDialBlock, ictBlocks, ictComponents };
407
+ export { BaseOdometerBlock, BinaryDisplayBlock, BitGrouperBlock, LogicBuilderBlock, LogicGateBlock, PlaceValueDialBlock, ictBlocks, ictComponents };