@classytic/labs 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (547) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +105 -0
  3. package/dist/biology/enzyme-rate/index.d.mts +1 -0
  4. package/dist/biology/enzyme-rate/preset.d.mts +25 -0
  5. package/dist/biology/enzyme-rate/preset.mjs +256 -0
  6. package/dist/biology/genetic-cross/core.d.mts +64 -0
  7. package/dist/biology/genetic-cross/core.mjs +147 -0
  8. package/dist/biology/genetic-cross/grid.mjs +239 -0
  9. package/dist/biology/genetic-cross/index.d.mts +3 -0
  10. package/dist/biology/genetic-cross/preset.d.mts +26 -0
  11. package/dist/biology/genetic-cross/preset.mjs +184 -0
  12. package/dist/biology/genetic-cross/sex-linked.d.mts +27 -0
  13. package/dist/biology/genetic-cross/sex-linked.mjs +226 -0
  14. package/dist/biology/index.d.mts +11 -0
  15. package/dist/biology/index.mjs +12 -0
  16. package/dist/biology/photosynthesis-factors/index.d.mts +1 -0
  17. package/dist/biology/photosynthesis-factors/preset.d.mts +25 -0
  18. package/dist/biology/photosynthesis-factors/preset.mjs +270 -0
  19. package/dist/biology/punnett-cross/index.d.mts +1 -0
  20. package/dist/biology/punnett-cross/preset.d.mts +27 -0
  21. package/dist/biology/punnett-cross/preset.mjs +21 -0
  22. package/dist/biology/respiration/index.d.mts +1 -0
  23. package/dist/biology/respiration/preset.d.mts +17 -0
  24. package/dist/biology/respiration/preset.mjs +179 -0
  25. package/dist/biology/sequence/central-dogma.d.mts +17 -0
  26. package/dist/biology/sequence/central-dogma.mjs +339 -0
  27. package/dist/biology/sequence/core.d.mts +38 -0
  28. package/dist/biology/sequence/core.mjs +178 -0
  29. package/dist/biology/sequence/index.d.mts +3 -0
  30. package/dist/biology/sequence/preset.d.mts +20 -0
  31. package/dist/biology/sequence/preset.mjs +235 -0
  32. package/dist/blocks/accounting.d.mts +142 -0
  33. package/dist/blocks/accounting.mjs +446 -0
  34. package/dist/blocks/authoring.d.mts +12 -0
  35. package/dist/blocks/authoring.mjs +705 -0
  36. package/dist/blocks/biology.d.mts +197 -0
  37. package/dist/blocks/biology.mjs +513 -0
  38. package/dist/blocks/chem.d.mts +128 -0
  39. package/dist/blocks/chem.mjs +486 -0
  40. package/dist/blocks/circuits.d.mts +86 -0
  41. package/dist/blocks/circuits.mjs +348 -0
  42. package/dist/blocks/discrete.d.mts +62 -0
  43. package/dist/blocks/discrete.mjs +314 -0
  44. package/dist/blocks/economics.d.mts +56 -0
  45. package/dist/blocks/economics.mjs +203 -0
  46. package/dist/blocks/geography.d.mts +58 -0
  47. package/dist/blocks/geography.mjs +115 -0
  48. package/dist/blocks/geometry.d.mts +28 -0
  49. package/dist/blocks/geometry.mjs +160 -0
  50. package/dist/blocks/ict.d.mts +65 -0
  51. package/dist/blocks/ict.mjs +197 -0
  52. package/dist/blocks/index.d.mts +4555 -0
  53. package/dist/blocks/index.mjs +120 -0
  54. package/dist/blocks/lab-block.d.mts +16 -0
  55. package/dist/blocks/lab-block.mjs +74 -0
  56. package/dist/blocks/lab-config.d.mts +23 -0
  57. package/dist/blocks/lab-config.mjs +200 -0
  58. package/dist/blocks/lab-gallery.d.mts +30 -0
  59. package/dist/blocks/lab-gallery.mjs +208 -0
  60. package/dist/blocks/language.d.mts +349 -0
  61. package/dist/blocks/language.mjs +750 -0
  62. package/dist/blocks/lesson.d.mts +43 -0
  63. package/dist/blocks/lesson.mjs +140 -0
  64. package/dist/blocks/math.d.mts +411 -0
  65. package/dist/blocks/math.mjs +1536 -0
  66. package/dist/blocks/ml.d.mts +84 -0
  67. package/dist/blocks/ml.mjs +146 -0
  68. package/dist/blocks/physics.d.mts +259 -0
  69. package/dist/blocks/physics.mjs +868 -0
  70. package/dist/blocks/statistics.d.mts +29 -0
  71. package/dist/blocks/statistics.mjs +123 -0
  72. package/dist/catalog/index.d.mts +3 -0
  73. package/dist/catalog/index.mjs +8 -0
  74. package/dist/catalog/registry.d.mts +46 -0
  75. package/dist/catalog/registry.mjs +56 -0
  76. package/dist/catalog/templates.d.mts +11 -0
  77. package/dist/catalog/templates.mjs +141 -0
  78. package/dist/chem/battery.d.mts +16 -0
  79. package/dist/chem/battery.mjs +311 -0
  80. package/dist/chem/bohr-atom.d.mts +16 -0
  81. package/dist/chem/bohr-atom.mjs +212 -0
  82. package/dist/chem/diffusion/asset.mjs +76 -0
  83. package/dist/chem/diffusion/index.d.mts +1 -0
  84. package/dist/chem/diffusion/preset.d.mts +15 -0
  85. package/dist/chem/diffusion/preset.mjs +188 -0
  86. package/dist/chem/electrochem/index.d.mts +1 -0
  87. package/dist/chem/electrochem/preset.d.mts +23 -0
  88. package/dist/chem/electrochem/preset.mjs +402 -0
  89. package/dist/chem/equilibrium/index.d.mts +1 -0
  90. package/dist/chem/equilibrium/preset.d.mts +36 -0
  91. package/dist/chem/equilibrium/preset.mjs +416 -0
  92. package/dist/chem/gas-box/index.d.mts +1 -0
  93. package/dist/chem/gas-box/preset.d.mts +27 -0
  94. package/dist/chem/gas-box/preset.mjs +395 -0
  95. package/dist/chem/index.d.mts +16 -0
  96. package/dist/chem/index.mjs +17 -0
  97. package/dist/chem/kinetics/index.d.mts +1 -0
  98. package/dist/chem/kinetics/preset.d.mts +31 -0
  99. package/dist/chem/kinetics/preset.mjs +478 -0
  100. package/dist/chem/periodic-trends/index.d.mts +1 -0
  101. package/dist/chem/periodic-trends/preset.d.mts +21 -0
  102. package/dist/chem/periodic-trends/preset.mjs +831 -0
  103. package/dist/chem/reaction-lab.d.mts +18 -0
  104. package/dist/chem/reaction-lab.mjs +165 -0
  105. package/dist/chem/reaction-profile.d.mts +21 -0
  106. package/dist/chem/reaction-profile.mjs +287 -0
  107. package/dist/chem/solution/dilution.d.mts +27 -0
  108. package/dist/chem/solution/dilution.mjs +199 -0
  109. package/dist/chem/solution/field.d.mts +30 -0
  110. package/dist/chem/solution/field.mjs +145 -0
  111. package/dist/chem/solution/index.d.mts +3 -0
  112. package/dist/chem/solution/solution-box.d.mts +28 -0
  113. package/dist/chem/solution/solution-box.mjs +140 -0
  114. package/dist/chem/stoichiometry/index.d.mts +1 -0
  115. package/dist/chem/stoichiometry/preset.d.mts +29 -0
  116. package/dist/chem/stoichiometry/preset.mjs +392 -0
  117. package/dist/chem/titration/index.d.mts +1 -0
  118. package/dist/chem/titration/preset.d.mts +29 -0
  119. package/dist/chem/titration/preset.mjs +436 -0
  120. package/dist/circuits/ac-dc/asset.mjs +295 -0
  121. package/dist/circuits/ac-dc/index.d.mts +1 -0
  122. package/dist/circuits/ac-dc/preset.d.mts +16 -0
  123. package/dist/circuits/ac-dc/preset.mjs +134 -0
  124. package/dist/circuits/capacitor-leak/index.d.mts +1 -0
  125. package/dist/circuits/capacitor-leak/preset.d.mts +32 -0
  126. package/dist/circuits/capacitor-leak/preset.mjs +271 -0
  127. package/dist/circuits/circuit/asset.d.mts +6 -0
  128. package/dist/circuits/circuit/asset.mjs +367 -0
  129. package/dist/circuits/circuit/index.d.mts +2 -0
  130. package/dist/circuits/circuit/preset.d.mts +46 -0
  131. package/dist/circuits/circuit/preset.mjs +235 -0
  132. package/dist/circuits/circuit-builder.d.mts +30 -0
  133. package/dist/circuits/circuit-builder.mjs +412 -0
  134. package/dist/circuits/circuit-lab.d.mts +20 -0
  135. package/dist/circuits/circuit-lab.mjs +400 -0
  136. package/dist/circuits/index.d.mts +7 -0
  137. package/dist/circuits/index.mjs +8 -0
  138. package/dist/commerce/accounting/core.d.mts +48 -0
  139. package/dist/commerce/accounting/core.mjs +57 -0
  140. package/dist/commerce/accounting/equation-balance.d.mts +35 -0
  141. package/dist/commerce/accounting/equation-balance.mjs +292 -0
  142. package/dist/commerce/accounting/index.d.mts +4 -0
  143. package/dist/commerce/accounting/journal-poster.d.mts +29 -0
  144. package/dist/commerce/accounting/journal-poster.mjs +472 -0
  145. package/dist/commerce/accounting/statement-sorter.d.mts +25 -0
  146. package/dist/commerce/accounting/statement-sorter.mjs +304 -0
  147. package/dist/commerce/economics/core.d.mts +33 -0
  148. package/dist/commerce/economics/core.mjs +26 -0
  149. package/dist/commerce/economics/demand-shift-vs-move.d.mts +35 -0
  150. package/dist/commerce/economics/demand-shift-vs-move.mjs +324 -0
  151. package/dist/commerce/economics/elasticity-revenue.d.mts +31 -0
  152. package/dist/commerce/economics/elasticity-revenue.mjs +253 -0
  153. package/dist/commerce/economics/index.d.mts +4 -0
  154. package/dist/commerce/economics/market-equilibrium.d.mts +33 -0
  155. package/dist/commerce/economics/market-equilibrium.mjs +340 -0
  156. package/dist/commerce/index.d.mts +9 -0
  157. package/dist/commerce/index.mjs +10 -0
  158. package/dist/core/easing.d.mts +28 -0
  159. package/dist/core/easing.mjs +66 -0
  160. package/dist/core/index.d.mts +10 -0
  161. package/dist/core/index.mjs +11 -0
  162. package/dist/core/numeric.d.mts +37 -0
  163. package/dist/core/numeric.mjs +75 -0
  164. package/dist/core/reactive.d.mts +24 -0
  165. package/dist/core/reactive.mjs +51 -0
  166. package/dist/core/rng.d.mts +21 -0
  167. package/dist/core/rng.mjs +39 -0
  168. package/dist/core/tex.d.mts +14 -0
  169. package/dist/core/tex.mjs +44 -0
  170. package/dist/core/timeline.d.mts +34 -0
  171. package/dist/core/timeline.mjs +77 -0
  172. package/dist/core/util.d.mts +19 -0
  173. package/dist/core/util.mjs +31 -0
  174. package/dist/discrete/arrangements/preset.d.mts +28 -0
  175. package/dist/discrete/arrangements/preset.mjs +304 -0
  176. package/dist/discrete/bayes/preset.d.mts +33 -0
  177. package/dist/discrete/bayes/preset.mjs +476 -0
  178. package/dist/discrete/binomial/preset.d.mts +25 -0
  179. package/dist/discrete/binomial/preset.mjs +333 -0
  180. package/dist/discrete/core/combinatorics.d.mts +23 -0
  181. package/dist/discrete/core/combinatorics.mjs +57 -0
  182. package/dist/discrete/core/inclusionExclusion.d.mts +19 -0
  183. package/dist/discrete/core/inclusionExclusion.mjs +30 -0
  184. package/dist/discrete/core/pigeonhole.d.mts +15 -0
  185. package/dist/discrete/core/pigeonhole.mjs +24 -0
  186. package/dist/discrete/core/probability.d.mts +29 -0
  187. package/dist/discrete/core/probability.mjs +43 -0
  188. package/dist/discrete/core/sets.d.mts +21 -0
  189. package/dist/discrete/core/sets.mjs +45 -0
  190. package/dist/discrete/counting-slots/preset.d.mts +30 -0
  191. package/dist/discrete/counting-slots/preset.mjs +553 -0
  192. package/dist/discrete/counting-tree/index.d.mts +1 -0
  193. package/dist/discrete/counting-tree/preset.d.mts +44 -0
  194. package/dist/discrete/counting-tree/preset.mjs +364 -0
  195. package/dist/discrete/expected-value/preset.d.mts +28 -0
  196. package/dist/discrete/expected-value/preset.mjs +352 -0
  197. package/dist/discrete/hypergeometric/preset.d.mts +25 -0
  198. package/dist/discrete/hypergeometric/preset.mjs +330 -0
  199. package/dist/discrete/index.d.mts +26 -0
  200. package/dist/discrete/index.mjs +27 -0
  201. package/dist/discrete/karnaugh/index.d.mts +1 -0
  202. package/dist/discrete/karnaugh/preset.d.mts +30 -0
  203. package/dist/discrete/karnaugh/preset.mjs +452 -0
  204. package/dist/discrete/lln/asset.mjs +206 -0
  205. package/dist/discrete/lln/index.d.mts +1 -0
  206. package/dist/discrete/lln/preset.d.mts +17 -0
  207. package/dist/discrete/lln/preset.mjs +152 -0
  208. package/dist/discrete/logic-circuit/index.d.mts +1 -0
  209. package/dist/discrete/logic-circuit/preset.d.mts +47 -0
  210. package/dist/discrete/logic-circuit/preset.mjs +307 -0
  211. package/dist/discrete/monte-carlo/index.d.mts +1 -0
  212. package/dist/discrete/monte-carlo/preset.d.mts +64 -0
  213. package/dist/discrete/monte-carlo/preset.mjs +446 -0
  214. package/dist/discrete/monty-hall/index.d.mts +1 -0
  215. package/dist/discrete/monty-hall/preset.d.mts +23 -0
  216. package/dist/discrete/monty-hall/preset.mjs +491 -0
  217. package/dist/discrete/outcome-builder/preset.d.mts +24 -0
  218. package/dist/discrete/outcome-builder/preset.mjs +283 -0
  219. package/dist/discrete/pascal/preset.d.mts +24 -0
  220. package/dist/discrete/pascal/preset.mjs +372 -0
  221. package/dist/discrete/sample-space/index.d.mts +1 -0
  222. package/dist/discrete/sample-space/preset.d.mts +42 -0
  223. package/dist/discrete/sample-space/preset.mjs +395 -0
  224. package/dist/discrete/selection/preset.d.mts +33 -0
  225. package/dist/discrete/selection/preset.mjs +406 -0
  226. package/dist/discrete/truth-table/index.d.mts +1 -0
  227. package/dist/discrete/truth-table/preset.d.mts +30 -0
  228. package/dist/discrete/truth-table/preset.mjs +456 -0
  229. package/dist/discrete/venn/index.d.mts +1 -0
  230. package/dist/discrete/venn/preset.d.mts +32 -0
  231. package/dist/discrete/venn/preset.mjs +461 -0
  232. package/dist/geography/cycle-lab/index.d.mts +1 -0
  233. package/dist/geography/cycle-lab/preset.d.mts +25 -0
  234. package/dist/geography/cycle-lab/preset.mjs +254 -0
  235. package/dist/geography/cycles.d.mts +21 -0
  236. package/dist/geography/cycles.mjs +205 -0
  237. package/dist/geography/index.d.mts +4 -0
  238. package/dist/geography/index.mjs +5 -0
  239. package/dist/geometry/board/index.d.mts +1 -0
  240. package/dist/geometry/board/preset.d.mts +71 -0
  241. package/dist/geometry/board/preset.mjs +148 -0
  242. package/dist/geometry/builder.d.mts +18 -0
  243. package/dist/geometry/builder.mjs +332 -0
  244. package/dist/geometry/index.d.mts +4 -0
  245. package/dist/geometry/index.mjs +5 -0
  246. package/dist/geometry/intersecting-circles.d.mts +17 -0
  247. package/dist/geometry/intersecting-circles.mjs +104 -0
  248. package/dist/ict/index.d.mts +5 -0
  249. package/dist/ict/index.mjs +6 -0
  250. package/dist/ict/number-systems/base-odometer.d.mts +34 -0
  251. package/dist/ict/number-systems/base-odometer.mjs +160 -0
  252. package/dist/ict/number-systems/bit-grouper.d.mts +32 -0
  253. package/dist/ict/number-systems/bit-grouper.mjs +190 -0
  254. package/dist/ict/number-systems/index.d.mts +4 -0
  255. package/dist/ict/number-systems/place-value-dial.d.mts +29 -0
  256. package/dist/ict/number-systems/place-value-dial.mjs +153 -0
  257. package/dist/ict/number-systems/wheel.d.mts +73 -0
  258. package/dist/ict/number-systems/wheel.mjs +279 -0
  259. package/dist/index.d.mts +10 -0
  260. package/dist/index.mjs +11 -0
  261. package/dist/kit/anim.mjs +52 -0
  262. package/dist/kit/annotate.mjs +116 -0
  263. package/dist/kit/answer-check.d.mts +38 -0
  264. package/dist/kit/answer-check.mjs +65 -0
  265. package/dist/kit/asset-util.mjs +15 -0
  266. package/dist/kit/controls.mjs +77 -0
  267. package/dist/kit/cycle.d.mts +44 -0
  268. package/dist/kit/cycle.mjs +188 -0
  269. package/dist/kit/diagram.mjs +176 -0
  270. package/dist/kit/electronics.mjs +357 -0
  271. package/dist/kit/expr-analysis.d.mts +37 -0
  272. package/dist/kit/expr-analysis.mjs +111 -0
  273. package/dist/kit/frame.d.mts +70 -0
  274. package/dist/kit/frame.mjs +205 -0
  275. package/dist/kit/freq-tree.mjs +99 -0
  276. package/dist/kit/gameshow.mjs +315 -0
  277. package/dist/kit/index.d.mts +5 -0
  278. package/dist/kit/index.mjs +6 -0
  279. package/dist/kit/logic-gates.d.mts +6 -0
  280. package/dist/kit/logic-gates.mjs +210 -0
  281. package/dist/kit/molecules.mjs +178 -0
  282. package/dist/kit/pedagogy.d.mts +126 -0
  283. package/dist/kit/pedagogy.mjs +331 -0
  284. package/dist/kit/play.d.mts +21 -0
  285. package/dist/kit/play.mjs +52 -0
  286. package/dist/kit/probability.mjs +141 -0
  287. package/dist/kit/proportion.mjs +112 -0
  288. package/dist/kit/reaction.mjs +102 -0
  289. package/dist/kit/rich.d.mts +10 -0
  290. package/dist/kit/rich.mjs +21 -0
  291. package/dist/kit/scale.mjs +230 -0
  292. package/dist/kit/space.mjs +326 -0
  293. package/dist/kit/steps.d.mts +24 -0
  294. package/dist/kit/steps.mjs +57 -0
  295. package/dist/kit/thermal.mjs +289 -0
  296. package/dist/language/agreement/index.d.mts +1 -0
  297. package/dist/language/agreement/preset.d.mts +27 -0
  298. package/dist/language/agreement/preset.mjs +113 -0
  299. package/dist/language/article-lens/index.d.mts +1 -0
  300. package/dist/language/article-lens/preset.d.mts +31 -0
  301. package/dist/language/article-lens/preset.mjs +125 -0
  302. package/dist/language/deck.d.mts +45 -0
  303. package/dist/language/deck.mjs +61 -0
  304. package/dist/language/icon.d.mts +40 -0
  305. package/dist/language/icon.mjs +73 -0
  306. package/dist/language/index.d.mts +10 -0
  307. package/dist/language/index.mjs +11 -0
  308. package/dist/language/preposition-scene/index.d.mts +1 -0
  309. package/dist/language/preposition-scene/preset.d.mts +34 -0
  310. package/dist/language/preposition-scene/preset.mjs +234 -0
  311. package/dist/language/sentence-builder/index.d.mts +1 -0
  312. package/dist/language/sentence-builder/preset.d.mts +32 -0
  313. package/dist/language/sentence-builder/preset.mjs +122 -0
  314. package/dist/language/transform/index.d.mts +1 -0
  315. package/dist/language/transform/preset.d.mts +31 -0
  316. package/dist/language/transform/preset.mjs +137 -0
  317. package/dist/language/ui.d.mts +53 -0
  318. package/dist/language/ui.mjs +88 -0
  319. package/dist/language/word-match/index.d.mts +1 -0
  320. package/dist/language/word-match/preset.d.mts +22 -0
  321. package/dist/language/word-match/preset.mjs +148 -0
  322. package/dist/math/area-model/asset.d.mts +6 -0
  323. package/dist/math/area-model/asset.mjs +270 -0
  324. package/dist/math/area-model/index.d.mts +2 -0
  325. package/dist/math/area-model/preset.d.mts +29 -0
  326. package/dist/math/area-model/preset.mjs +243 -0
  327. package/dist/math/balance-algebra/asset.d.mts +6 -0
  328. package/dist/math/balance-algebra/asset.mjs +150 -0
  329. package/dist/math/balance-algebra/index.d.mts +2 -0
  330. package/dist/math/balance-algebra/preset.d.mts +30 -0
  331. package/dist/math/balance-algebra/preset.mjs +228 -0
  332. package/dist/math/derivation.d.mts +22 -0
  333. package/dist/math/derivation.mjs +113 -0
  334. package/dist/math/derivative-explorer/index.d.mts +1 -0
  335. package/dist/math/derivative-explorer/preset.d.mts +19 -0
  336. package/dist/math/derivative-explorer/preset.mjs +227 -0
  337. package/dist/math/function-machine/index.d.mts +1 -0
  338. package/dist/math/function-machine/preset.d.mts +21 -0
  339. package/dist/math/function-machine/preset.mjs +177 -0
  340. package/dist/math/gradient-descent.d.mts +23 -0
  341. package/dist/math/gradient-descent.mjs +473 -0
  342. package/dist/math/grapher/index.d.mts +1 -0
  343. package/dist/math/grapher/preset.d.mts +40 -0
  344. package/dist/math/grapher/preset.mjs +313 -0
  345. package/dist/math/harmonic-form/index.d.mts +1 -0
  346. package/dist/math/harmonic-form/preset.d.mts +21 -0
  347. package/dist/math/harmonic-form/preset.mjs +387 -0
  348. package/dist/math/index.d.mts +25 -0
  349. package/dist/math/index.mjs +26 -0
  350. package/dist/math/integral-explorer/index.d.mts +1 -0
  351. package/dist/math/integral-explorer/preset.d.mts +23 -0
  352. package/dist/math/integral-explorer/preset.mjs +217 -0
  353. package/dist/math/interactive/index.d.mts +1 -0
  354. package/dist/math/interactive/preset.d.mts +72 -0
  355. package/dist/math/interactive/preset.mjs +202 -0
  356. package/dist/math/limit-explorer/index.d.mts +1 -0
  357. package/dist/math/limit-explorer/preset.d.mts +19 -0
  358. package/dist/math/limit-explorer/preset.mjs +216 -0
  359. package/dist/math/linear-system/index.d.mts +1 -0
  360. package/dist/math/linear-system/preset.d.mts +28 -0
  361. package/dist/math/linear-system/preset.mjs +164 -0
  362. package/dist/math/mystery-bucket/asset.d.mts +6 -0
  363. package/dist/math/mystery-bucket/asset.mjs +145 -0
  364. package/dist/math/mystery-bucket/index.d.mts +2 -0
  365. package/dist/math/mystery-bucket/preset.d.mts +36 -0
  366. package/dist/math/mystery-bucket/preset.mjs +116 -0
  367. package/dist/math/number-line/index.d.mts +1 -0
  368. package/dist/math/number-line/preset.d.mts +24 -0
  369. package/dist/math/number-line/preset.mjs +142 -0
  370. package/dist/math/parabola/index.d.mts +1 -0
  371. package/dist/math/parabola/preset.d.mts +13 -0
  372. package/dist/math/parabola/preset.mjs +79 -0
  373. package/dist/math/pattern/asset.d.mts +6 -0
  374. package/dist/math/pattern/asset.mjs +102 -0
  375. package/dist/math/pattern/index.d.mts +2 -0
  376. package/dist/math/pattern/preset.d.mts +32 -0
  377. package/dist/math/pattern/preset.mjs +294 -0
  378. package/dist/math/triangle-trig/index.d.mts +1 -0
  379. package/dist/math/triangle-trig/preset.d.mts +47 -0
  380. package/dist/math/triangle-trig/preset.mjs +245 -0
  381. package/dist/math/trig-explorer.d.mts +18 -0
  382. package/dist/math/trig-explorer.mjs +209 -0
  383. package/dist/ml/boundary/index.d.mts +1 -0
  384. package/dist/ml/boundary/preset.d.mts +24 -0
  385. package/dist/ml/boundary/preset.mjs +385 -0
  386. package/dist/ml/classifier/index.d.mts +1 -0
  387. package/dist/ml/classifier/preset.d.mts +25 -0
  388. package/dist/ml/classifier/preset.mjs +315 -0
  389. package/dist/ml/index.d.mts +6 -0
  390. package/dist/ml/index.mjs +7 -0
  391. package/dist/ml/kmeans/index.d.mts +1 -0
  392. package/dist/ml/kmeans/preset.d.mts +33 -0
  393. package/dist/ml/kmeans/preset.mjs +236 -0
  394. package/dist/ml/knn/index.d.mts +1 -0
  395. package/dist/ml/knn/preset.d.mts +28 -0
  396. package/dist/ml/knn/preset.mjs +279 -0
  397. package/dist/ml/regression/index.d.mts +1 -0
  398. package/dist/ml/regression/preset.d.mts +32 -0
  399. package/dist/ml/regression/preset.mjs +394 -0
  400. package/dist/physics/atwood/index.d.mts +1 -0
  401. package/dist/physics/atwood/preset.d.mts +23 -0
  402. package/dist/physics/atwood/preset.mjs +312 -0
  403. package/dist/physics/bullet-walls/index.d.mts +1 -0
  404. package/dist/physics/bullet-walls/preset.d.mts +28 -0
  405. package/dist/physics/bullet-walls/preset.mjs +373 -0
  406. package/dist/physics/carnot/index.d.mts +1 -0
  407. package/dist/physics/carnot/preset.d.mts +27 -0
  408. package/dist/physics/carnot/preset.mjs +427 -0
  409. package/dist/physics/circular-motion/index.d.mts +1 -0
  410. package/dist/physics/circular-motion/preset.d.mts +25 -0
  411. package/dist/physics/circular-motion/preset.mjs +293 -0
  412. package/dist/physics/collision-track/index.d.mts +1 -0
  413. package/dist/physics/collision-track/preset.d.mts +27 -0
  414. package/dist/physics/collision-track/preset.mjs +352 -0
  415. package/dist/physics/efficiency/index.d.mts +1 -0
  416. package/dist/physics/efficiency/preset.d.mts +33 -0
  417. package/dist/physics/efficiency/preset.mjs +343 -0
  418. package/dist/physics/electric-field/index.d.mts +1 -0
  419. package/dist/physics/electric-field/preset.d.mts +15 -0
  420. package/dist/physics/electric-field/preset.mjs +306 -0
  421. package/dist/physics/energy-skate/index.d.mts +1 -0
  422. package/dist/physics/energy-skate/preset.d.mts +25 -0
  423. package/dist/physics/energy-skate/preset.mjs +254 -0
  424. package/dist/physics/entropy/index.d.mts +1 -0
  425. package/dist/physics/entropy/preset.d.mts +18 -0
  426. package/dist/physics/entropy/preset.mjs +416 -0
  427. package/dist/physics/expansion/index.d.mts +1 -0
  428. package/dist/physics/expansion/preset.d.mts +26 -0
  429. package/dist/physics/expansion/preset.mjs +609 -0
  430. package/dist/physics/exponential/asset.mjs +221 -0
  431. package/dist/physics/exponential/index.d.mts +1 -0
  432. package/dist/physics/exponential/preset.d.mts +17 -0
  433. package/dist/physics/exponential/preset.mjs +182 -0
  434. package/dist/physics/gas-process/index.d.mts +1 -0
  435. package/dist/physics/gas-process/preset.d.mts +30 -0
  436. package/dist/physics/gas-process/preset.mjs +384 -0
  437. package/dist/physics/gravitation/index.d.mts +1 -0
  438. package/dist/physics/gravitation/preset.d.mts +24 -0
  439. package/dist/physics/gravitation/preset.mjs +345 -0
  440. package/dist/physics/gravity-drop.d.mts +9 -0
  441. package/dist/physics/gravity-drop.mjs +187 -0
  442. package/dist/physics/heat-transfer/index.d.mts +1 -0
  443. package/dist/physics/heat-transfer/preset.d.mts +27 -0
  444. package/dist/physics/heat-transfer/preset.mjs +626 -0
  445. package/dist/physics/impulse/index.d.mts +1 -0
  446. package/dist/physics/impulse/preset.d.mts +29 -0
  447. package/dist/physics/impulse/preset.mjs +453 -0
  448. package/dist/physics/index.d.mts +43 -0
  449. package/dist/physics/index.mjs +44 -0
  450. package/dist/physics/kepler/index.d.mts +1 -0
  451. package/dist/physics/kepler/preset.d.mts +27 -0
  452. package/dist/physics/kepler/preset.mjs +257 -0
  453. package/dist/physics/lever/asset.d.mts +6 -0
  454. package/dist/physics/lever/asset.mjs +220 -0
  455. package/dist/physics/lever/index.d.mts +2 -0
  456. package/dist/physics/lever/preset.d.mts +31 -0
  457. package/dist/physics/lever/preset.mjs +261 -0
  458. package/dist/physics/lorentz/index.d.mts +1 -0
  459. package/dist/physics/lorentz/preset.d.mts +29 -0
  460. package/dist/physics/lorentz/preset.mjs +367 -0
  461. package/dist/physics/magnetism/index.d.mts +1 -0
  462. package/dist/physics/magnetism/preset.d.mts +15 -0
  463. package/dist/physics/magnetism/preset.mjs +334 -0
  464. package/dist/physics/optics/asset.d.mts +6 -0
  465. package/dist/physics/optics/asset.mjs +234 -0
  466. package/dist/physics/optics/index.d.mts +2 -0
  467. package/dist/physics/optics/preset.d.mts +14 -0
  468. package/dist/physics/optics/preset.mjs +202 -0
  469. package/dist/physics/orbit-lab.d.mts +6 -0
  470. package/dist/physics/orbit-lab.mjs +222 -0
  471. package/dist/physics/projectile-lab.d.mts +10 -0
  472. package/dist/physics/projectile-lab.mjs +354 -0
  473. package/dist/physics/rain-relative/index.d.mts +1 -0
  474. package/dist/physics/rain-relative/preset.d.mts +19 -0
  475. package/dist/physics/rain-relative/preset.mjs +358 -0
  476. package/dist/physics/ramp-forces/index.d.mts +1 -0
  477. package/dist/physics/ramp-forces/preset.d.mts +36 -0
  478. package/dist/physics/ramp-forces/preset.mjs +550 -0
  479. package/dist/physics/river-boat.d.mts +22 -0
  480. package/dist/physics/river-boat.mjs +498 -0
  481. package/dist/physics/shm/index.d.mts +1 -0
  482. package/dist/physics/shm/preset.d.mts +33 -0
  483. package/dist/physics/shm/preset.mjs +554 -0
  484. package/dist/physics/stopping-distance/index.d.mts +1 -0
  485. package/dist/physics/stopping-distance/preset.d.mts +29 -0
  486. package/dist/physics/stopping-distance/preset.mjs +662 -0
  487. package/dist/physics/temperature-scales/index.d.mts +1 -0
  488. package/dist/physics/temperature-scales/preset.d.mts +15 -0
  489. package/dist/physics/temperature-scales/preset.mjs +353 -0
  490. package/dist/physics/terminal-velocity/index.d.mts +1 -0
  491. package/dist/physics/terminal-velocity/preset.d.mts +26 -0
  492. package/dist/physics/terminal-velocity/preset.mjs +404 -0
  493. package/dist/physics/thermal/index.d.mts +1 -0
  494. package/dist/physics/thermal/preset.d.mts +44 -0
  495. package/dist/physics/thermal/preset.mjs +373 -0
  496. package/dist/physics/vector-board/index.d.mts +1 -0
  497. package/dist/physics/vector-board/preset.d.mts +65 -0
  498. package/dist/physics/vector-board/preset.mjs +273 -0
  499. package/dist/physics/vector-board/view.d.mts +49 -0
  500. package/dist/physics/vector-board/view.mjs +58 -0
  501. package/dist/physics/vector-scene.d.mts +41 -0
  502. package/dist/physics/vector-scene.mjs +211 -0
  503. package/dist/physics/vector-types/index.d.mts +1 -0
  504. package/dist/physics/vector-types/preset.d.mts +27 -0
  505. package/dist/physics/vector-types/preset.mjs +192 -0
  506. package/dist/physics/water-density/index.d.mts +1 -0
  507. package/dist/physics/water-density/preset.d.mts +18 -0
  508. package/dist/physics/water-density/preset.mjs +439 -0
  509. package/dist/physics/waves/core.mjs +33 -0
  510. package/dist/physics/waves/doppler.d.mts +23 -0
  511. package/dist/physics/waves/doppler.mjs +260 -0
  512. package/dist/physics/waves/index.d.mts +4 -0
  513. package/dist/physics/waves/preset.d.mts +30 -0
  514. package/dist/physics/waves/preset.mjs +488 -0
  515. package/dist/physics/waves/ripple.d.mts +26 -0
  516. package/dist/physics/waves/ripple.mjs +234 -0
  517. package/dist/physics/waves/string.d.mts +29 -0
  518. package/dist/physics/waves/string.mjs +289 -0
  519. package/dist/physics/work-energy/index.d.mts +1 -0
  520. package/dist/physics/work-energy/preset.d.mts +17 -0
  521. package/dist/physics/work-energy/preset.mjs +341 -0
  522. package/dist/schemas/index.d.mts +235 -0
  523. package/dist/schemas/index.mjs +145 -0
  524. package/dist/statistics/center-spread/preset.d.mts +34 -0
  525. package/dist/statistics/center-spread/preset.mjs +323 -0
  526. package/dist/statistics/core/descriptive.d.mts +35 -0
  527. package/dist/statistics/core/descriptive.mjs +64 -0
  528. package/dist/statistics/core/normal.d.mts +21 -0
  529. package/dist/statistics/core/normal.mjs +37 -0
  530. package/dist/statistics/core/sequences.d.mts +27 -0
  531. package/dist/statistics/core/sequences.mjs +35 -0
  532. package/dist/statistics/galton/preset.d.mts +27 -0
  533. package/dist/statistics/galton/preset.mjs +331 -0
  534. package/dist/statistics/histogram/preset.d.mts +27 -0
  535. package/dist/statistics/histogram/preset.mjs +385 -0
  536. package/dist/statistics/index.d.mts +11 -0
  537. package/dist/statistics/index.mjs +12 -0
  538. package/dist/statistics/normal/preset.d.mts +30 -0
  539. package/dist/statistics/normal/preset.mjs +400 -0
  540. package/dist/statistics/sampling/preset.d.mts +32 -0
  541. package/dist/statistics/sampling/preset.mjs +406 -0
  542. package/dist/statistics/sequence/preset.d.mts +28 -0
  543. package/dist/statistics/sequence/preset.mjs +302 -0
  544. package/dist/statistics/z-table/preset.d.mts +28 -0
  545. package/dist/statistics/z-table/preset.mjs +348 -0
  546. package/package.json +266 -0
  547. package/styles.css +267 -0
@@ -0,0 +1,102 @@
1
+ 'use client';
2
+
3
+ import { MoleculeGlyph } from "./molecules.mjs";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region src/kit/reaction.tsx
7
+ function ReactionFlow({ reactants, products, arrow = "right", height = 88, molSize = 30, ariaLabel }) {
8
+ const GAP = 10, PLUS = 22, ARROW = 58, PAD = 14, COEF = 14;
9
+ const cy = height / 2 - 6;
10
+ const nodes = [];
11
+ let x = PAD;
12
+ const place = (terms, key) => {
13
+ terms.forEach((t, i) => {
14
+ const coef = t.coef ?? 1;
15
+ if (coef > 1) {
16
+ nodes.push(/* @__PURE__ */ jsx("text", {
17
+ x,
18
+ y: cy,
19
+ fill: "var(--stage-fg)",
20
+ fontSize: 14,
21
+ fontWeight: 700,
22
+ textAnchor: "middle",
23
+ dominantBaseline: "central",
24
+ children: coef
25
+ }, `${key}c${i}`));
26
+ x += COEF;
27
+ }
28
+ nodes.push(/* @__PURE__ */ jsx(MoleculeGlyph, {
29
+ kind: t.kind,
30
+ x: x + molSize / 2,
31
+ y: cy,
32
+ size: molSize,
33
+ showLabel: true
34
+ }, `${key}m${i}`));
35
+ x += molSize + GAP;
36
+ if (i < terms.length - 1) {
37
+ nodes.push(/* @__PURE__ */ jsx("text", {
38
+ x,
39
+ y: cy,
40
+ fill: "var(--stage-muted)",
41
+ fontSize: 18,
42
+ fontWeight: 700,
43
+ textAnchor: "middle",
44
+ dominantBaseline: "central",
45
+ children: "+"
46
+ }, `${key}p${i}`));
47
+ x += PLUS;
48
+ }
49
+ });
50
+ };
51
+ place(reactants, "r");
52
+ const ax = x + 6;
53
+ if (arrow === "right") nodes.push(/* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("line", {
54
+ x1: ax,
55
+ y1: cy,
56
+ x2: ax + ARROW - 12,
57
+ y2: cy,
58
+ stroke: "var(--stage-fg)",
59
+ strokeWidth: 2.5
60
+ }), /* @__PURE__ */ jsx("polygon", {
61
+ points: `${ax + ARROW - 4},${cy} ${ax + ARROW - 14},${cy - 5} ${ax + ARROW - 14},${cy + 5}`,
62
+ fill: "var(--stage-fg)"
63
+ })] }, "arr"));
64
+ else nodes.push(/* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx("line", {
65
+ x1: ax + 12,
66
+ y1: cy,
67
+ x2: ax + ARROW,
68
+ y2: cy,
69
+ stroke: "var(--stage-fg)",
70
+ strokeWidth: 2.5
71
+ }), /* @__PURE__ */ jsx("polygon", {
72
+ points: `${ax + 4},${cy} ${ax + 14},${cy - 5} ${ax + 14},${cy + 5}`,
73
+ fill: "var(--stage-fg)"
74
+ })] }, "arr"));
75
+ x += 62;
76
+ place(products, "p");
77
+ const W = x + PAD;
78
+ return /* @__PURE__ */ jsx("div", {
79
+ style: {
80
+ overflowX: "auto",
81
+ maxWidth: "100%"
82
+ },
83
+ children: /* @__PURE__ */ jsx("svg", {
84
+ viewBox: `0 0 ${W} ${height}`,
85
+ width: "100%",
86
+ role: "img",
87
+ "aria-label": ariaLabel,
88
+ preserveAspectRatio: "xMidYMid meet",
89
+ style: {
90
+ display: "block",
91
+ height: "auto",
92
+ maxWidth: W,
93
+ minWidth: Math.min(W, 300),
94
+ margin: "0 auto"
95
+ },
96
+ children: nodes
97
+ })
98
+ });
99
+ }
100
+
101
+ //#endregion
102
+ export { ReactionFlow };
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from "react";
2
+
3
+ //#region src/kit/rich.d.ts
4
+ declare function RichText({
5
+ children
6
+ }: {
7
+ children: string;
8
+ }): ReactNode;
9
+ //#endregion
10
+ export { RichText };
@@ -0,0 +1,21 @@
1
+ 'use client';
2
+
3
+ import { Fragment } from "react";
4
+ import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
5
+ import { parseRichText } from "@classytic/stage";
6
+
7
+ //#region src/kit/rich.tsx
8
+ /**
9
+ * RichText — render `_`/`^` notation as real HTML <sub>/<sup> in lab readouts /
10
+ * control bars (the DOM counterpart of stage's SVG `<Label>`). Both share the
11
+ * ONE grammar, `parseRichText` from @classytic/stage — so "V_C" never reads as a
12
+ * dirty underscore and the parsing rule lives in a single source of truth.
13
+ */
14
+ function RichText({ children }) {
15
+ const spans = parseRichText(children);
16
+ if (spans.length === 1 && spans[0].script === "base") return children;
17
+ return /* @__PURE__ */ jsx(Fragment$1, { children: spans.map((sp, i) => sp.script === "sub" ? /* @__PURE__ */ jsx("sub", { children: sp.text }, i) : sp.script === "sup" ? /* @__PURE__ */ jsx("sup", { children: sp.text }, i) : /* @__PURE__ */ jsx(Fragment, { children: sp.text }, i)) });
18
+ }
19
+
20
+ //#endregion
21
+ export { RichText };
@@ -0,0 +1,230 @@
1
+ 'use client';
2
+
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { useCoords } from "@classytic/stage";
5
+
6
+ //#region src/kit/scale.tsx
7
+ const GRAD = "url(#stage-grad-metal)";
8
+ const EDGE = "color-mix(in oklab, var(--stage-metal) 60%, black)";
9
+ const SHEEN = "color-mix(in oklab, var(--stage-sheen) 70%, transparent)";
10
+ const SHADE = "color-mix(in oklab, var(--stage-metal) 62%, black)";
11
+ const GOOD = "var(--stage-good)";
12
+ /** A solid rectangular bar (metal rod) between two points — reads as a rigid
13
+ * strut, not a string. Returns an SVG path for a filled quad of width `w`. */
14
+ function barPath(x1, y1, x2, y2, w) {
15
+ const dx = x2 - x1, dy = y2 - y1;
16
+ const len = Math.hypot(dx, dy) || 1;
17
+ const nx = -dy / len * (w / 2);
18
+ const ny = dx / len * (w / 2);
19
+ return `M ${x1 + nx} ${y1 + ny} L ${x2 + nx} ${y2 + ny} L ${x2 - nx} ${y2 - ny} L ${x1 - nx} ${y1 - ny} Z`;
20
+ }
21
+ function ScaleFrame({ pivot, beamA, beamB, trayLC, trayRC, baseY, panR, balanced }) {
22
+ const c = useCoords();
23
+ const P = (v) => c.toPx(v.x, v.y);
24
+ const [pivx, pivy] = P(pivot);
25
+ const [bax, bay] = P(beamA);
26
+ const [bbx, bby] = P(beamB);
27
+ const [, basey] = P({
28
+ x: pivot.x,
29
+ y: baseY
30
+ });
31
+ const beamAngle = Math.atan2(bby - bay, bbx - bax) * 180 / Math.PI;
32
+ const beamLen = Math.hypot(bbx - bax, bby - bay);
33
+ const rxPan = c.sx(panR);
34
+ const beamH = 13;
35
+ const halfW = beamLen / 2 + 7;
36
+ const colTopHalf = 7;
37
+ const colBotHalf = 12;
38
+ const baseRx = Math.max(30, colBotHalf * 2.6);
39
+ const Pan = ({ cx, cy, ex, ey, k }) => {
40
+ const ry = rxPan * .24;
41
+ const depth = rxPan * .5;
42
+ const rimL = cx - rxPan * .66;
43
+ const rimR = cx + rxPan * .66;
44
+ const body = `M ${cx - rxPan} ${cy} C ${cx - rxPan} ${cy + depth * .95} ${cx - rxPan * .5} ${cy + depth} ${cx} ${cy + depth} C ${cx + rxPan * .5} ${cy + depth} ${cx + rxPan} ${cy + depth * .95} ${cx + rxPan} ${cy} Z`;
45
+ return /* @__PURE__ */ jsxs("g", { children: [
46
+ /* @__PURE__ */ jsx("path", {
47
+ d: barPath(ex, ey, rimL, cy, 3.6),
48
+ fill: GRAD,
49
+ stroke: EDGE,
50
+ strokeWidth: .6,
51
+ strokeLinejoin: "round"
52
+ }),
53
+ /* @__PURE__ */ jsx("path", {
54
+ d: barPath(ex, ey, rimR, cy, 3.6),
55
+ fill: GRAD,
56
+ stroke: EDGE,
57
+ strokeWidth: .6,
58
+ strokeLinejoin: "round"
59
+ }),
60
+ /* @__PURE__ */ jsx("path", {
61
+ d: body,
62
+ fill: GRAD,
63
+ stroke: EDGE,
64
+ strokeWidth: .9,
65
+ strokeLinejoin: "round"
66
+ }),
67
+ /* @__PURE__ */ jsx("ellipse", {
68
+ cx,
69
+ cy,
70
+ rx: rxPan,
71
+ ry,
72
+ fill: SHADE,
73
+ stroke: EDGE,
74
+ strokeWidth: .75
75
+ }),
76
+ /* @__PURE__ */ jsx("path", {
77
+ d: `M ${cx - rxPan} ${cy} A ${rxPan} ${ry} 0 0 0 ${cx + rxPan} ${cy}`,
78
+ fill: "none",
79
+ stroke: SHEEN,
80
+ strokeWidth: 1.4,
81
+ strokeLinecap: "round"
82
+ }),
83
+ /* @__PURE__ */ jsx("circle", {
84
+ cx: rimL,
85
+ cy,
86
+ r: 2.7,
87
+ fill: GRAD,
88
+ stroke: EDGE,
89
+ strokeWidth: .7
90
+ }),
91
+ /* @__PURE__ */ jsx("circle", {
92
+ cx: rimR,
93
+ cy,
94
+ r: 2.7,
95
+ fill: GRAD,
96
+ stroke: EDGE,
97
+ strokeWidth: .7
98
+ }),
99
+ /* @__PURE__ */ jsx("circle", {
100
+ cx: ex,
101
+ cy: ey,
102
+ r: 3.8,
103
+ fill: GRAD,
104
+ stroke: EDGE,
105
+ strokeWidth: .9
106
+ }),
107
+ /* @__PURE__ */ jsx("circle", {
108
+ cx: ex - 1.2,
109
+ cy: ey - 1.3,
110
+ r: 1.3,
111
+ fill: SHEEN
112
+ })
113
+ ] }, k);
114
+ };
115
+ return /* @__PURE__ */ jsxs("g", { children: [
116
+ /* @__PURE__ */ jsx("ellipse", {
117
+ cx: pivx,
118
+ cy: basey,
119
+ rx: baseRx,
120
+ ry: 9,
121
+ fill: GRAD,
122
+ stroke: EDGE,
123
+ strokeWidth: .9
124
+ }),
125
+ /* @__PURE__ */ jsx("ellipse", {
126
+ cx: pivx,
127
+ cy: basey - 4,
128
+ rx: baseRx * .62,
129
+ ry: 6,
130
+ fill: GRAD,
131
+ stroke: EDGE,
132
+ strokeWidth: .75
133
+ }),
134
+ /* @__PURE__ */ jsx("path", {
135
+ d: `M ${pivx - colTopHalf} ${pivy} L ${pivx + colTopHalf} ${pivy} L ${pivx + colBotHalf} ${basey - 3} Q ${pivx + colBotHalf} ${basey} ${pivx + colBotHalf - 3} ${basey} L ${pivx - colBotHalf + 3} ${basey} Q ${pivx - colBotHalf} ${basey} ${pivx - colBotHalf} ${basey - 3} Z`,
136
+ fill: GRAD,
137
+ stroke: EDGE,
138
+ strokeWidth: .9,
139
+ strokeLinejoin: "round"
140
+ }),
141
+ /* @__PURE__ */ jsx("line", {
142
+ x1: pivx - colTopHalf + 2,
143
+ y1: pivy + 2,
144
+ x2: pivx - colBotHalf + 3,
145
+ y2: basey - 3,
146
+ stroke: SHEEN,
147
+ strokeWidth: 1.3,
148
+ strokeLinecap: "round"
149
+ }),
150
+ /* @__PURE__ */ jsx(Pan, {
151
+ cx: P(trayLC)[0],
152
+ cy: P(trayLC)[1],
153
+ ex: bax,
154
+ ey: bay,
155
+ k: "L"
156
+ }),
157
+ /* @__PURE__ */ jsx(Pan, {
158
+ cx: P(trayRC)[0],
159
+ cy: P(trayRC)[1],
160
+ ex: bbx,
161
+ ey: bby,
162
+ k: "R"
163
+ }),
164
+ /* @__PURE__ */ jsxs("g", {
165
+ transform: `rotate(${beamAngle} ${pivx} ${pivy})`,
166
+ children: [
167
+ balanced && /* @__PURE__ */ jsx("rect", {
168
+ x: pivx - halfW - 3,
169
+ y: pivy - beamH / 2 - 3,
170
+ width: halfW * 2 + 6,
171
+ height: 19,
172
+ rx: 19 / 2,
173
+ fill: GOOD,
174
+ opacity: .18
175
+ }),
176
+ /* @__PURE__ */ jsx("rect", {
177
+ x: pivx - halfW,
178
+ y: pivy - beamH / 2,
179
+ width: halfW * 2,
180
+ height: beamH,
181
+ rx: beamH / 2,
182
+ fill: balanced ? GOOD : GRAD,
183
+ stroke: EDGE,
184
+ strokeWidth: .9
185
+ }),
186
+ /* @__PURE__ */ jsx("rect", {
187
+ x: pivx - halfW + 4,
188
+ y: pivy - beamH / 2 + 1.5,
189
+ width: halfW * 2 - 8,
190
+ height: 2.4,
191
+ rx: 1.2,
192
+ fill: SHEEN
193
+ })
194
+ ]
195
+ }),
196
+ /* @__PURE__ */ jsx("circle", {
197
+ cx: bax,
198
+ cy: bay,
199
+ r: 4,
200
+ fill: balanced ? GOOD : GRAD,
201
+ stroke: EDGE,
202
+ strokeWidth: .9
203
+ }),
204
+ /* @__PURE__ */ jsx("circle", {
205
+ cx: bbx,
206
+ cy: bby,
207
+ r: 4,
208
+ fill: balanced ? GOOD : GRAD,
209
+ stroke: EDGE,
210
+ strokeWidth: .9
211
+ }),
212
+ /* @__PURE__ */ jsx("circle", {
213
+ cx: pivx,
214
+ cy: pivy,
215
+ r: 7.5,
216
+ fill: GRAD,
217
+ stroke: EDGE,
218
+ strokeWidth: 1
219
+ }),
220
+ /* @__PURE__ */ jsx("circle", {
221
+ cx: pivx - 2.2,
222
+ cy: pivy - 2.4,
223
+ r: 2,
224
+ fill: SHEEN
225
+ })
226
+ ] });
227
+ }
228
+
229
+ //#endregion
230
+ export { ScaleFrame };
@@ -0,0 +1,326 @@
1
+ 'use client';
2
+
3
+ import { useId } from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { fmt, useCoords } from "@classytic/stage";
6
+
7
+ //#region src/kit/space.tsx
8
+ /**
9
+ * Space glyph kit — Earth, Sun and a satellite, drawn in the stage's pixel frame
10
+ * (project the world centre, then size everything off the px radius so the glyph
11
+ * is crisp at any zoom). Kurzgesagt-style: radial body gradient + a rim shadow
12
+ * for spherical depth + a top-left specular highlight, the technique borrowed from
13
+ * my-video's EarthIcon. Gradient ids are made unique per instance so multiple
14
+ * glyphs on one Stage don't collide.
15
+ *
16
+ * These are decorative (pointer-events:none) — drop a draggable MovableDot on top
17
+ * if the body needs to be grabbed.
18
+ */
19
+ /** Earth — blue oceans, a few green landmasses, ice caps, rim + shine + atmosphere. */
20
+ function EarthGlyph({ center, r, atmosphere = true }) {
21
+ const c = useCoords();
22
+ const [cx, cy] = c.toPx(center.x, center.y);
23
+ const R = c.sx(r);
24
+ const uid = useId().replace(/:/g, "");
25
+ const land = `url(#${uid}-land)`;
26
+ return /* @__PURE__ */ jsxs("g", {
27
+ style: { pointerEvents: "none" },
28
+ children: [
29
+ /* @__PURE__ */ jsxs("defs", { children: [
30
+ /* @__PURE__ */ jsxs("radialGradient", {
31
+ id: `${uid}-ocean`,
32
+ cx: "40%",
33
+ cy: "35%",
34
+ r: "65%",
35
+ children: [
36
+ /* @__PURE__ */ jsx("stop", {
37
+ offset: "0%",
38
+ stopColor: "#60A5FA"
39
+ }),
40
+ /* @__PURE__ */ jsx("stop", {
41
+ offset: "40%",
42
+ stopColor: "#3B82F6"
43
+ }),
44
+ /* @__PURE__ */ jsx("stop", {
45
+ offset: "100%",
46
+ stopColor: "#1E3A5F"
47
+ })
48
+ ]
49
+ }),
50
+ /* @__PURE__ */ jsxs("linearGradient", {
51
+ id: `${uid}-land`,
52
+ x1: "0",
53
+ y1: "0",
54
+ x2: "0",
55
+ y2: "1",
56
+ children: [/* @__PURE__ */ jsx("stop", {
57
+ offset: "0%",
58
+ stopColor: "#4ADE80"
59
+ }), /* @__PURE__ */ jsx("stop", {
60
+ offset: "100%",
61
+ stopColor: "#15803D"
62
+ })]
63
+ }),
64
+ /* @__PURE__ */ jsxs("radialGradient", {
65
+ id: `${uid}-rim`,
66
+ cx: "50%",
67
+ cy: "50%",
68
+ r: "50%",
69
+ children: [/* @__PURE__ */ jsx("stop", {
70
+ offset: "68%",
71
+ stopColor: "rgba(0,0,0,0)"
72
+ }), /* @__PURE__ */ jsx("stop", {
73
+ offset: "100%",
74
+ stopColor: "rgba(0,0,0,0.4)"
75
+ })]
76
+ }),
77
+ /* @__PURE__ */ jsxs("radialGradient", {
78
+ id: `${uid}-shine`,
79
+ cx: "32%",
80
+ cy: "28%",
81
+ r: "42%",
82
+ children: [/* @__PURE__ */ jsx("stop", {
83
+ offset: "0%",
84
+ stopColor: "rgba(255,255,255,0.4)"
85
+ }), /* @__PURE__ */ jsx("stop", {
86
+ offset: "100%",
87
+ stopColor: "rgba(255,255,255,0)"
88
+ })]
89
+ }),
90
+ /* @__PURE__ */ jsx("clipPath", {
91
+ id: `${uid}-clip`,
92
+ children: /* @__PURE__ */ jsx("circle", {
93
+ cx: fmt(cx),
94
+ cy: fmt(cy),
95
+ r: fmt(R)
96
+ })
97
+ })
98
+ ] }),
99
+ atmosphere && /* @__PURE__ */ jsx("circle", {
100
+ cx: fmt(cx),
101
+ cy: fmt(cy),
102
+ r: fmt(R + R * .1),
103
+ fill: "none",
104
+ stroke: "#93C5FD",
105
+ strokeWidth: fmt(R * .06),
106
+ opacity: .25
107
+ }),
108
+ /* @__PURE__ */ jsx("circle", {
109
+ cx: fmt(cx),
110
+ cy: fmt(cy),
111
+ r: fmt(R),
112
+ fill: `url(#${uid}-ocean)`
113
+ }),
114
+ /* @__PURE__ */ jsxs("g", {
115
+ clipPath: `url(#${uid}-clip)`,
116
+ children: [
117
+ /* @__PURE__ */ jsx("path", {
118
+ d: `M ${fmt(cx - R * .5)} ${fmt(cy - R * .45)} q ${fmt(R * .3)} ${fmt(-R * .15)} ${fmt(R * .5)} ${fmt(R * .1)} q ${fmt(R * .1)} ${fmt(R * .3)} ${fmt(-R * .15)} ${fmt(R * .4)} q ${fmt(-R * .35)} ${fmt(R * .1)} ${fmt(-R * .45)} ${fmt(-R * .2)} Z`,
119
+ fill: land,
120
+ opacity: .88
121
+ }),
122
+ /* @__PURE__ */ jsx("path", {
123
+ d: `M ${fmt(cx + R * .05)} ${fmt(cy - R * .1)} q ${fmt(R * .3)} ${fmt(-R * .05)} ${fmt(R * .4)} ${fmt(R * .25)} q ${fmt(-R * .05)} ${fmt(R * .45)} ${fmt(-R * .3)} ${fmt(R * .5)} q ${fmt(-R * .25)} ${fmt(-R * .1)} ${fmt(-R * .1)} ${fmt(-R * .7)} Z`,
124
+ fill: land,
125
+ opacity: .82
126
+ }),
127
+ /* @__PURE__ */ jsx("ellipse", {
128
+ cx: fmt(cx),
129
+ cy: fmt(cy - R * .92),
130
+ rx: fmt(R * .6),
131
+ ry: fmt(R * .16),
132
+ fill: "#E2E8F0",
133
+ opacity: .35
134
+ }),
135
+ /* @__PURE__ */ jsx("ellipse", {
136
+ cx: fmt(cx),
137
+ cy: fmt(cy + R * .92),
138
+ rx: fmt(R * .66),
139
+ ry: fmt(R * .18),
140
+ fill: "#F1F5F9",
141
+ opacity: .4
142
+ })
143
+ ]
144
+ }),
145
+ /* @__PURE__ */ jsx("circle", {
146
+ cx: fmt(cx),
147
+ cy: fmt(cy),
148
+ r: fmt(R),
149
+ fill: `url(#${uid}-rim)`
150
+ }),
151
+ /* @__PURE__ */ jsx("circle", {
152
+ cx: fmt(cx),
153
+ cy: fmt(cy),
154
+ r: fmt(R),
155
+ fill: `url(#${uid}-shine)`
156
+ })
157
+ ]
158
+ });
159
+ }
160
+ /** Sun — glowing core with a corona of rays. */
161
+ function SunGlyph({ center, r }) {
162
+ const c = useCoords();
163
+ const [cx, cy] = c.toPx(center.x, center.y);
164
+ const R = c.sx(r);
165
+ const uid = useId().replace(/:/g, "");
166
+ const rays = Array.from({ length: 12 }, (_, i) => {
167
+ const a = i * Math.PI / 6;
168
+ return {
169
+ x1: fmt(cx + Math.cos(a) * R * 1.15),
170
+ y1: fmt(cy + Math.sin(a) * R * 1.15),
171
+ x2: fmt(cx + Math.cos(a) * R * 1.5),
172
+ y2: fmt(cy + Math.sin(a) * R * 1.5)
173
+ };
174
+ });
175
+ return /* @__PURE__ */ jsxs("g", {
176
+ style: { pointerEvents: "none" },
177
+ children: [
178
+ /* @__PURE__ */ jsxs("defs", { children: [/* @__PURE__ */ jsxs("radialGradient", {
179
+ id: `${uid}-core`,
180
+ cx: "42%",
181
+ cy: "38%",
182
+ r: "60%",
183
+ children: [
184
+ /* @__PURE__ */ jsx("stop", {
185
+ offset: "0%",
186
+ stopColor: "#FEF9C3"
187
+ }),
188
+ /* @__PURE__ */ jsx("stop", {
189
+ offset: "45%",
190
+ stopColor: "#FDB813"
191
+ }),
192
+ /* @__PURE__ */ jsx("stop", {
193
+ offset: "100%",
194
+ stopColor: "#F97316"
195
+ })
196
+ ]
197
+ }), /* @__PURE__ */ jsxs("radialGradient", {
198
+ id: `${uid}-glow`,
199
+ cx: "50%",
200
+ cy: "50%",
201
+ r: "50%",
202
+ children: [
203
+ /* @__PURE__ */ jsx("stop", {
204
+ offset: "55%",
205
+ stopColor: "rgba(253,184,19,0)"
206
+ }),
207
+ /* @__PURE__ */ jsx("stop", {
208
+ offset: "80%",
209
+ stopColor: "rgba(253,184,19,0.25)"
210
+ }),
211
+ /* @__PURE__ */ jsx("stop", {
212
+ offset: "100%",
213
+ stopColor: "rgba(253,184,19,0)"
214
+ })
215
+ ]
216
+ })] }),
217
+ /* @__PURE__ */ jsx("circle", {
218
+ cx: fmt(cx),
219
+ cy: fmt(cy),
220
+ r: fmt(R * 1.8),
221
+ fill: `url(#${uid}-glow)`
222
+ }),
223
+ rays.map((p, i) => /* @__PURE__ */ jsx("line", {
224
+ x1: p.x1,
225
+ y1: p.y1,
226
+ x2: p.x2,
227
+ y2: p.y2,
228
+ stroke: "#FDB813",
229
+ strokeWidth: fmt(R * .14),
230
+ strokeLinecap: "round",
231
+ opacity: .75
232
+ }, i)),
233
+ /* @__PURE__ */ jsx("circle", {
234
+ cx: fmt(cx),
235
+ cy: fmt(cy),
236
+ r: fmt(R),
237
+ fill: `url(#${uid}-core)`
238
+ }),
239
+ /* @__PURE__ */ jsx("circle", {
240
+ cx: fmt(cx - R * .3),
241
+ cy: fmt(cy - R * .32),
242
+ r: fmt(R * .32),
243
+ fill: "rgba(255,255,255,0.45)"
244
+ })
245
+ ]
246
+ });
247
+ }
248
+ /** Satellite — a body with two solar-panel wings and a dish. */
249
+ function SatelliteGlyph({ center, size, tilt = -.4 }) {
250
+ const c = useCoords();
251
+ const [cx, cy] = c.toPx(center.x, center.y);
252
+ const s = c.sx(size);
253
+ const deg = tilt * 180 / Math.PI;
254
+ return /* @__PURE__ */ jsxs("g", {
255
+ style: { pointerEvents: "none" },
256
+ transform: `translate(${fmt(cx)},${fmt(cy)}) rotate(${fmt(deg)})`,
257
+ children: [
258
+ /* @__PURE__ */ jsx("rect", {
259
+ x: fmt(-s * 2.1),
260
+ y: fmt(-s * .55),
261
+ width: fmt(s * 1.3),
262
+ height: fmt(s * 1.1),
263
+ rx: fmt(s * .1),
264
+ fill: "#2563EB",
265
+ stroke: "#1E3A8A",
266
+ strokeWidth: fmt(s * .08)
267
+ }),
268
+ /* @__PURE__ */ jsx("rect", {
269
+ x: fmt(s * .8),
270
+ y: fmt(-s * .55),
271
+ width: fmt(s * 1.3),
272
+ height: fmt(s * 1.1),
273
+ rx: fmt(s * .1),
274
+ fill: "#2563EB",
275
+ stroke: "#1E3A8A",
276
+ strokeWidth: fmt(s * .08)
277
+ }),
278
+ /* @__PURE__ */ jsx("line", {
279
+ x1: fmt(-s * .8),
280
+ y1: 0,
281
+ x2: fmt(-s * .45),
282
+ y2: 0,
283
+ stroke: "#94A3B8",
284
+ strokeWidth: fmt(s * .1)
285
+ }),
286
+ /* @__PURE__ */ jsx("line", {
287
+ x1: fmt(s * .45),
288
+ y1: 0,
289
+ x2: fmt(s * .8),
290
+ y2: 0,
291
+ stroke: "#94A3B8",
292
+ strokeWidth: fmt(s * .1)
293
+ }),
294
+ /* @__PURE__ */ jsx("rect", {
295
+ x: fmt(-s * .5),
296
+ y: fmt(-s * .6),
297
+ width: fmt(s),
298
+ height: fmt(s * 1.2),
299
+ rx: fmt(s * .14),
300
+ fill: "#E5E7EB",
301
+ stroke: "#9CA3AF",
302
+ strokeWidth: fmt(s * .08)
303
+ }),
304
+ /* @__PURE__ */ jsx("ellipse", {
305
+ cx: 0,
306
+ cy: fmt(-s * .8),
307
+ rx: fmt(s * .42),
308
+ ry: fmt(s * .18),
309
+ fill: "#F8FAFC",
310
+ stroke: "#9CA3AF",
311
+ strokeWidth: fmt(s * .06)
312
+ }),
313
+ /* @__PURE__ */ jsx("line", {
314
+ x1: 0,
315
+ y1: fmt(-s * .6),
316
+ x2: 0,
317
+ y2: fmt(-s * .82),
318
+ stroke: "#9CA3AF",
319
+ strokeWidth: fmt(s * .06)
320
+ })
321
+ ]
322
+ });
323
+ }
324
+
325
+ //#endregion
326
+ export { EarthGlyph, SatelliteGlyph, SunGlyph };
@@ -0,0 +1,24 @@
1
+ import { ReactNode } from "react";
2
+
3
+ //#region src/kit/steps.d.ts
4
+ interface Steps {
5
+ step: number;
6
+ total: number;
7
+ atStart: boolean;
8
+ atEnd: boolean;
9
+ next: () => void;
10
+ prev: () => void;
11
+ setStep: (n: number) => void;
12
+ }
13
+ declare function useSteps(total: number): Steps;
14
+ declare function StepNav({
15
+ steps,
16
+ nextLabel,
17
+ doneLabel
18
+ }: {
19
+ steps: Steps;
20
+ nextLabel?: string;
21
+ doneLabel?: string;
22
+ }): ReactNode;
23
+ //#endregion
24
+ export { StepNav, Steps, useSteps };