- bumped minAppVersion a 1.7.2 (no-unsupported-api)
- sostituito document con activeDocument (prefer-active-doc)
- aggiunto prefisso window. a setTimeout/clearTimeout/requestAnimationFrame/cancelAnimationFrame
- aggiornato eslint-plugin-obsidianmd a 0.3.0, aggiunto tseslint.configs.recommendedTypeChecked
- rimossi globals obsoleti da eslint.config.mjs
- fix prefer-const in editor-view.ts e md-parser.ts
- bumped versione a 1.0.2
- Fix collapse/expand animation: use img.naturalWidth (actual SVG viewBox width)
instead of settings.canvasWidth, which could differ when the canvas auto-widened
on wide screens; add WAAPI animation replacing CSS height transition
- Add resolveJsonModule to tsconfig to fix i18n.ts JSON import typing errors
- Cast JSON.parse results to explicit types in embed.ts and svg-utils.ts
- Replace Vault.delete() with FileManager.trashFile() in embed.ts and editor-view.ts
- Remove unused MarkdownView import from main.ts
- Remove stale eslint-disable comments on WAAPI style assignments
- Fix md-parser: preserve empty comma-separated values in LIST, NUMLIST, CHECK
and TABLE headers (removed .filter(item => item))
- Fix md-parser TABLE: remove body-row continuation (rows ending with comma were
merged with the next line, causing multiple rows to collapse into one)
- Bump version to 1.0.1 in manifest.json, package.json, versions.json
The collapse animation in the inline SVG embed was broken on Windows due to
three compounding issues: CSS height transitions don't animate from auto→px in
Electron; the guard direction was inverted for SVGs shorter than canvasHeight;
and the canvas auto-widens when the modal is opened on wide screens
(expandWorld=true), making the real SVG naturalWidth differ from
settings.canvasWidth, causing the computed target height to be larger than the
current rendered height and inverting the animation direction.
Fix: use img.naturalWidth (actual SVG viewBox width) instead of
settings.canvasWidth for the collapsed height calculation. Also moves
touch-action from JS style.setProperty to CSS (.hwm_canvas) to resolve the
Obsidian Required ESLint violation.
Required fixes:
- recognizer.ts: fetch() → requestUrl() (Obsidian API)
- settings.ts: createEl('h2') → Setting.setHeading()
- parser.test.ts: console.log → console.debug (4 occurrences)
- md-parser.ts: remove unnecessary escape in char class [^\s\-] → [^\s-]
- main.ts: async callbacks → void (async()=>{})() pattern; menu as any → as unknown as
- embed.ts / editor-view.ts: innerHTML → setIcon(); key: string → I18nKey; async handlers wrapped in void
- editor-view.ts: setState(state: any) → (state: unknown, result: ViewStateResult); querySelector generic
- i18n.ts: window as any → typed cast; export type I18nKey
- styles.css: CSS utility classes and CSS vars replace inline styles
Bug fixes found during testing:
- setCssProps is a method (el.setCssProps), not a standalone export — caused white modal
- collapse animation broken after expand: replaced rAF with forced reflow (void wrapper.offsetHeight)
- md-parser: // LIST with space not recognized — added \s* after // in both regexes