feat(rich): WASM widget configs — MathConfig (KaTeX), MermaidConfig, CodeRunConfig (#39, #42, #34) #145

Closed
charles wants to merge 2 commits from feat/42-39-34-wasm-widgets into main
Owner

Résumé

Structs de configuration pour les widgets WASM dans fractal-rich :

  • MathConfig : source LaTeX + mode Inline/Block + font_size (KaTeX WASM)
  • MermaidConfig : source Mermaid + thème + max_height (→ SVG via sandboxed WebView)
  • CodeRunConfig : runtime (Python/JavaScript/Lua/Ruby), code, timeout, editable, stdin
  • CodeRunState : état UI (IdleRunningDone/TimedOut)
  • CodeRunResult : stdout, stderr, exit_code, elapsed_ms
  • 5 tests unitaires

Closes #34, #39, #42

Plan de test

  • cargo test -p fractal-rich passe
  • MathConfig { source: "E=mc^2" } désérialise avec display: Inline par défaut
  • CodeRunConfig a un timeout par défaut de 5000ms
## Résumé Structs de configuration pour les widgets WASM dans `fractal-rich` : - `MathConfig` : source LaTeX + mode `Inline`/`Block` + font_size (KaTeX WASM) - `MermaidConfig` : source Mermaid + thème + max_height (→ SVG via sandboxed WebView) - `CodeRunConfig` : runtime (`Python`/`JavaScript`/`Lua`/`Ruby`), code, timeout, editable, stdin - `CodeRunState` : état UI (`Idle` → `Running` → `Done`/`TimedOut`) - `CodeRunResult` : stdout, stderr, exit_code, elapsed_ms - 5 tests unitaires Closes #34, #39, #42 ## Plan de test - [ ] `cargo test -p fractal-rich` passe - [ ] `MathConfig { source: "E=mc^2" }` désérialise avec `display: Inline` par défaut - [ ] `CodeRunConfig` a un timeout par défaut de 5000ms
feat(rich): expose wasm_widgets module in lib.rs
Some checks failed
CI / cargo check (pull_request) Has been cancelled
CI / cargo test (pull_request) Has been cancelled
CI / clippy + rustfmt (pull_request) Has been cancelled
82d2e1fc16
charles closed this pull request 2026-04-06 02:23:25 +00:00
Some checks are pending
CI / cargo check (pull_request) Has been cancelled
CI / cargo test (pull_request) Has been cancelled
CI / clippy + rustfmt (pull_request) Has been cancelled
qa
Required

Pull request closed

Sign in to join this conversation.
No description provided.