refactor(dice): extract engine from md-commander

The dice engine lived under md-commander/hooks but is shared by :md-dice, spark tables, the journal /roll command, and dice inside variable expressions. Move it to src/components/dice so the md-commander widget can be retired without losing rolling.

Also promote the browser-console harness to a real jest suite; the file was named test.ts, so jest never ran it.
This commit is contained in:
hyper
2026-09-12 23:14:28 +08:00
parent 0b029b325e
commit 3508286792
14 changed files with 183 additions and 184 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import { customElement, noShadowDOM } from "solid-element";
import { createSignal, onMount } from "solid-js";
import { rollFormula } from "./md-commander/hooks";
import { rollFormula } from "./dice";
export interface DiceProps {
key?: string;