Flat Financing v1.3.1 Release Notes
This release focuses heavily on internal code quality, strict typing compliance, and ensuring full compatibility with modern Obsidian APIs (specifically multi-window support).
🛠 Fixes & Improvements
Multi-Window & Popout Compatibility
- Active Document Scoping: Replaced global
documentreferences withactiveDocumentto ensure modals and dynamically created DOM elements behave correctly when the plugin is used inside a popped-out Obsidian window. - Safe Timeouts: Upgraded
setTimeoutcalls towindow.setTimeout()to guarantee timers execute in the correct window context.
Code Quality & Strict Typing
- Strict TypeScript Compliance: Resolved widespread "Unsafe assignment" and "Unsafe member access" warnings across the dashboard, settings, and modal components. This brings the plugin into full compliance with strict ESLint and TypeScript rules.
- Chart.js Type Safety: Replaced implicit
anycontexts inside Chart.js tooltip callbacks with explicit typing, eliminating unsafe member access warnings and making chart rendering more robust. - Resolved Circular Dependencies: Fixed a TypeScript architectural issue where circular imports between
main.tsandmodals.tscaused type inference to fail for all modal constructors.
Modernized API Usage
- Deprecated API Removal: Removed the deprecated
setWarning()API for modal buttons. Replaced it with.setClass("mod-warning"), ensuring buttons remain styled identically (red/destructive) without triggering warnings or breaking compatibility with older Obsidian versions. - Static Styling: Removed legacy
setCssStylesusage in favor of direct, modern.styleassignments. - Build Tooling: Swapped the deprecated external
builtin-modulespackage inesbuild.config.mjswith the native Node.jsnode:module.
📦 Maintenance
- Minor regex optimizations for input escaping in the dashboard.
- Cleaned up unnecessary non-null assertions across file parsing routines.