mirror of
https://github.com/zadam/trilium.git
synced 2026-09-13 18:46:08 +05:00
The last of the ckeditor5-* packages. `packages/ckeditor5-math` had no consumers outside `@triliumnext/ckeditor5`, was never published, and carried a ckeditor5-package-generator scaffold that nothing invoked — including a tsconfig.test.json referencing an uninstalled @types/mocha, so its tests were never typechecked at all. Move it to src/plugins/math/, flattening src/ui/ and renaming to the repo's snake_case convention, with the tests co-located as *.spec.ts. The `mathlive` and `@ckeditor/ckeditor5-icons` dependencies move onto this package, which is now the only thing that needs them. Three things the move surfaced: - math_input_view.ts re-declared `window.mathVirtualKeyboard`, which MathLive declares itself. Harmless in a separate package, a hard TS2717/TS2687 here — and it was cascading into a dozen unrelated typecheck errors across apps/client and apps/build-docs. - MathUI binds `mathInputView#value` to the command, but MathInputView assigns its own `value` on every MathLive/textarea change, which severs the binding. A legacy test asserted the live binding and had been passing only by accident of timing. It now asserts the contract that holds, and _addFormView()'s seemingly redundant manual push is documented as load-bearing. - The preview element is never actually hidden or removed by hand: both call sites look it up after the view containing it has already gone. Marked as dead rather than left looking functional. Coverage: lines and functions 100%, statements 99.91%, branches 98.91%. The residue is branch permutations in the MathLive sync logic (main_form_view, math_input_view, math_ui) and still needs tests before the aggregate's 100% gate passes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Developer Guide | ||
| !!!meta.json | ||
| Developer Guide.md | ||