mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-10-01 09:19:34 +05:30
Five fix rounds (v4.9.1 → v4.9.5) couldn't make the sidebar flowchart
panel feel right — at 280 px sidebar with canvas + preview cramped to
~175 px each, plus the editor-container hide/show dance the
maximize/restore toggle required, the panel kept presenting as
cramped and unreliable at runtime. Strategy pivot: the flowchart
editor now lives in its own BrowserWindow, matching the ASCII Art
Generator pattern.
- src/flowchart-generator.html — new standalone HTML with header,
toolbar (Insert at Cursor / Reset), canvas host, and preview host.
Stylesheet hrefs are src/-relative (no ../). Forced light surface
via background/color !important rules — mirrors the v4.9.5 CSS fix.
- src/renderer/flowchart-controller.js — pure browser IIFE. Hydrates
from <userData>/flowchart-session.json once on mount, persists on
every mutation with 500 ms debounce. Insert at Cursor wraps the
generated Mermaid source in a fenced ```mermaid block and sends
it through the existing insert-content IPC.
- src/main.js — openFlowchartGenerator() launches the standalone
BrowserWindow (1100×720, contextIsolation:true, nodeIntegration:false).
Tools menu entry 'Flowchart Generator' with Cmd/Ctrl+Alt+F.
- src/preload.js — new window.electronAPI.flowchart.* namespace with
getUserDataPath/readFile/writeFile/insertAtCursor, reusing the
existing thin text-file IPC handlers.
- The four pure modules (flowchart-shapes.js, flowchart-mermaid.js,
flowchart-store.js, flowchart-canvas.js) gained a tiny UMD wrapper
so they work both as CommonJS (legacy sidebar) and as browser
globals (standalone window). No behavioural change to the 73
flowchart unit tests in tests/flowchart-*.test.js.
- src/renderer.js — sidebar registerPanel('flowchart', ...) and the
commandPalette entry are now commented out. Legacy panel file
(src/sidebar/flowchart-panel.js) preserved for rollback.
Tests:
- tests/flowchart-controller.test.js — 10 new tests covering
stylesheet paths (no ../ escape), bootstrap wiring
(getUserDataPath once, reads flowchart-session.json), hydration
from a saved session, Insert-at-Cursor fenced block format,
Reset (with and without confirm), and two regression tests that
src/renderer.js no longer has a live sidebar registration.
All 1122 tests pass; lint + format clean.
Amit Haridas
105 lines
3.8 KiB
JSON
105 lines
3.8 KiB
JSON
{
|
|
"name": "markdown-converter",
|
|
"version": "4.9.6",
|
|
"description": "Professional Markdown editor and universal file converter with PDF editing, batch processing, and syntax highlighting",
|
|
"main": "src/main.js",
|
|
"scripts": {
|
|
"start": "electron .",
|
|
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
|
|
"test:watch": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch",
|
|
"test:coverage": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage",
|
|
"lint": "eslint src tests",
|
|
"lint:fix": "eslint src tests --fix",
|
|
"format": "prettier --write src tests",
|
|
"format:check": "prettier --check src tests",
|
|
"build": "electron-builder --config electron-builder.config.js",
|
|
"build:win": "electron-builder --config electron-builder.config.js --win",
|
|
"build:win-signed": "cross-env CSC_LINK=code-signing-cert.pfx electron-builder --config electron-builder.config.js --win",
|
|
"build:win-unsigned": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --config electron-builder.config.js --win",
|
|
"create-cert": "powershell -ExecutionPolicy Bypass -File scripts/create-selfsigned-cert.ps1",
|
|
"build:mac": "electron-builder --config electron-builder.config.js --mac",
|
|
"build:linux": "electron-builder --config electron-builder.config.js --linux",
|
|
"build:linux-ci": "electron-builder --config electron-builder.config.js --linux deb AppImage",
|
|
"build:local": "electron-builder --config electron-builder.config.js --linux --win",
|
|
"dist": "electron-builder --config electron-builder.config.js --publish=never",
|
|
"dist:all": "electron-builder --config electron-builder.config.js -mwl",
|
|
"download-tools": "node scripts/download-tools.js",
|
|
"bundle:markitdown": "node scripts/bundle-markitdown.js",
|
|
"generate-icons": "node scripts/generate-icons.js"
|
|
},
|
|
"keywords": [
|
|
"markdown",
|
|
"pandoc",
|
|
"converter",
|
|
"editor",
|
|
"pdf",
|
|
"audio",
|
|
"video",
|
|
"image"
|
|
],
|
|
"author": "ConcreteInfo <amit.wh@gmail.com>",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/amitwh/markdown-converter"
|
|
},
|
|
"devDependencies": {
|
|
"@testing-library/dom": "^10.4.1",
|
|
"cross-env": "^10.0.0",
|
|
"electron": "^41.1.1",
|
|
"electron-builder": "^26.0.12",
|
|
"eslint": "^9.39.2",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-prettier": "^5.5.4",
|
|
"jest": "^30.2.0",
|
|
"jest-environment-jsdom": "^30.2.0",
|
|
"prettier": "^3.7.4"
|
|
},
|
|
"dependencies": {
|
|
"@cantoo/pdf-lib": "^2.9.1",
|
|
"@codemirror/autocomplete": "^6.20.1",
|
|
"@codemirror/commands": "^6.10.2",
|
|
"@codemirror/lang-css": "^6.3.1",
|
|
"@codemirror/lang-html": "^6.4.11",
|
|
"@codemirror/lang-javascript": "^6.2.5",
|
|
"@codemirror/lang-json": "^6.0.2",
|
|
"@codemirror/lang-markdown": "^6.5.0",
|
|
"@codemirror/lang-python": "^6.2.1",
|
|
"@codemirror/language": "^6.12.2",
|
|
"@codemirror/lint": "^6.9.5",
|
|
"@codemirror/search": "^6.6.0",
|
|
"@codemirror/state": "^6.5.4",
|
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
"@codemirror/view": "^6.39.16",
|
|
"@replit/codemirror-vim": "^6.4.0",
|
|
"codemirror": "^6.0.2",
|
|
"core-util-is": "^1.0.3",
|
|
"docx": "^9.6.0",
|
|
"dompurify": "^3.3.1",
|
|
"electron-store": "^10.1.0",
|
|
"ffmpeg-static": "^5.3.0",
|
|
"figlet": "^1.8.0",
|
|
"highlight.js": "^11.11.1",
|
|
"html2pdf.js": "^0.14.0",
|
|
"jszip": "^3.10.1",
|
|
"katex": "^0.18.5",
|
|
"marked": "^17.0.3",
|
|
"marked-footnote": "^1.4.0",
|
|
"marked-highlight": "^2.2.3",
|
|
"mermaid": "^11.12.3",
|
|
"pdfjs-dist": "^5.5.207",
|
|
"pdfkit": "^0.17.2",
|
|
"pizzip": "^3.2.0",
|
|
"sharp": "^0.35.4",
|
|
"simple-git": "^3.32.3",
|
|
"tslib": "^2.8.1"
|
|
},
|
|
"overrides": {
|
|
"jszip": "^3.10.1",
|
|
"nth-check": "^2.1.1",
|
|
"lodash.pick": "npm:lodash@^4.17.21",
|
|
"lodash-es": "^4.18.1",
|
|
"lodash": "^4.17.21"
|
|
}
|
|
}
|