youfoundjk_TeXcore/package.json
Jovi Koikkara eea4d67e3e
feat(tikz): major rendering, layout, and editor enhancements (#1)
Fixes
- WebAssembly & initialization
  - Fix TikZJax WebAssembly initialization issues.

- Fonts & symbol rendering
  - Override DVI parser `machine.putText` to use split character code offsets from `tikzjax.js`.
  - Map codes 0–9 starting at 161 to fix incorrect Γ rendering (was showing as Θ).
  - Map codes 10–19 starting at 173 to resolve Ω and ⊗ collisions with soft hyphen.

- Layout & rendering
  - Fix SVG clipping by switching to `position: relative` with `overflow: visible`.
  - Adjust inline SVG behavior to prevent top-of-page clipping.

- Type compatibility
  - Cast types to `unknown` in `TikzJaxLoader` and worker functions for compatibility.

- Error handling & cleanup
  - Improve error handling across TikZ components.
  - Remove unused dependencies and unnecessary console logs.

Features
- Package loading system
  - Add robust dependency resolution in `loader.ts` for:
    - `tikz-cd`
    - `tikz-feynhand`
    - `pgfcalendar`
  - Ensure required libraries and keys load dynamically on demand.

- Rendering & layout improvements
  - Enhance SVG bounding box calculation.
  - Implement dynamic column width calculation.
  - Improve row and column layout alignment and responsiveness.

- TikZ editor enhancements
  - Add keyboard shortcut tooltips to sidebar buttons.
  - Introduce thickness control slider for elements.
  - Improve snapping system with modes:
    - grid
    - half
    - none
  - Add support for new shapes:
    - circles
    - rectangles
    - triangles
  - Improve TikZ code generation error handling.

Improvements
- Selection & editing UX
  - Add lasso selection for multiple vertices in `CanvasGrid`.
  - Support multi-element editing in `RightSidebar`.
  - Refactor `TikzEditorModal` to handle multiple selected vertices.
  - Enable batch updates for selected elements.

- Layout & styling
  - Compact `.block-language-tikz` layout:
    - margin: `1.5em 0` → `0.3em 0`
    - padding: `1rem 0` → `0`
  - Improve canvas controls and interaction styles.

- Component refactoring
  - Refactor `CanvasGrid` to use template literals.
  - Replace inline styles with `setCssStyles`.
  - Improve `TikzCodec` node naming clarity.
  - Improve `history manager` type safety with `EditorElement`.
  - Use `window.setTimeout` in asset manager for better compatibility.

- Accessibility & UI polish
  - Improve sidebar button titles and tooltips.
  - Standardize live preview overlay button titles.
  - Clean up modal styling and text consistency.

Documentation
- Revamp TeXcore plugin documentation:
  - Clarify PDF export features and settings.
  - Improve quick preview architecture explanation.
  - Enhance equation search and autocomplete docs.
  - Streamline snippets usage and transformations.
  - Expand TikZ diagrams section with graphical editor guide.
  - Improve getting started guide with clearer steps.
  - Add navigation and configuration updates.

- Update plugin manifest descriptions for clarity.
2026-06-06 12:08:11 +02:00

75 lines
3.8 KiB
JSON

{
"name": "TeXcore",
"version": "0.0.1",
"description": "Automatic equation numbering, Tex Diagrams rendering, and more to transforms your vault into a rich ecosystem for scientific drafting and study.",
"main": "main.js",
"packageManager": "pnpm@11.1.2+sha512.415a1cc25974731e75455c1468371be74c5aa5fb7621b50d4056d222451609f11412f23fd602e6169f1e060466641f798597e1be961a10688836a67b16569499",
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "node esbuild.config.mjs",
"dev:vault": "node esbuild.config.mjs",
"build": "sass src/styles/main.css styles.css && node esbuild.config.mjs production",
"prod": "pnpm run compile && pnpm run build",
"version": "node version-bump.mjs && git add manifest.json versions.json",
"lint": "eslint \"src/**/*.{ts,js}\" \"test_helpers/**/*.ts\" \"__mocks__/**/*.ts\" && eslint -c eslint.css.config.mjs \"src/**/*.css\"",
"lint:eslint": "eslint \"src/**/*.{ts,js}\" \"test_helpers/**/*.ts\" \"__mocks__/**/*.ts\" -o lint_report.txt --no-color && eslint -c eslint.css.config.mjs \"src/**/*.css\" --no-color",
"lint:fix": "eslint \"src/**/*.{ts,js}\" \"test_helpers/**/*.ts\" \"__mocks__/**/*.ts\" --fix && eslint -c eslint.css.config.mjs \"src/**/*.css\" --fix",
"format": "prettier --write .",
"format:check": "prettier --check .",
"compile": "tsc -noEmit --skipLibCheck",
"test": "jest --ci --silent=true --passWithNoTests",
"test-update": "jest --silent=false --updateSnapshot --passWithNoTests",
"test-dev": "jest --watch --passWithNoTests",
"coverage": "jest --coverage --passWithNoTests",
"fl": "prettier --config .prettierrc.json --write \"src/**/*.{ts,js}\"",
"ra": "prettier --config .prettierrc.json --write \"src/**/*.{ts,js}\" && pnpm run compile && eslint src -o lint_report.txt --no-color && eslint -c eslint.css.config.mjs \"src/**/*.css\" -o css_report.txt --no-color && jest --ci --silent=true --passWithNoTests",
"prod:release": "pnpm run prod && node -e \"const fs=require('fs');const path=require('path');const root=process.cwd();const outputDir=path.join(root,'release-artifacts');fs.rmSync(outputDir,{recursive:true,force:true});fs.mkdirSync(outputDir,{recursive:true});for(const fileName of ['main.js','styles.css']){if(fs.existsSync(path.join(root,fileName))){fs.copyFileSync(path.join(root,fileName),path.join(outputDir,fileName));}}if(fs.existsSync(path.join(root,'manifest.json'))){fs.copyFileSync(path.join(root,'manifest.json'),path.join(outputDir,'manifest.json'));}\""
},
"keywords": [],
"author": {
"name": "Jovi Koikkara",
"url": "https://github.com/YouFoundJK"
},
"license": "MIT",
"devDependencies": {
"@eslint/compat": "^2.1.0",
"@eslint/css": "^1.3.0",
"@eslint/eslintrc": "^3.3.5",
"@eslint/js": "^10.0.1",
"@eslint/json": "^2.0.0",
"@types/jest": "^30.0.0",
"@types/node": "^25.9.1",
"@typescript-eslint/eslint-plugin": "^8.60.1",
"@typescript-eslint/parser": "^8.60.1",
"deepmerge": "^4.3.1",
"electron": "^42.3.0",
"esbuild": "^0.28.0",
"eslint": "^10.4.1",
"eslint-plugin-obsidianmd": "^0.3.0",
"eslint-plugin-react-hooks": "^7.1.1",
"globals": "^17.6.0",
"jest": "^30.4.2",
"jest-environment-jsdom": "^30.4.1",
"jest-mock-extended": "^4.0.1",
"obsidian": "latest",
"p-limit": "^7.3.0",
"pdf-lib": "^1.17.1",
"prettier": "^3.8.3",
"sass": "^1.100.0",
"ts-jest": "^29.4.11",
"tslib": "2.8.1",
"typescript": "6.0.3",
"typescript-eslint": "^8.60.1"
},
"dependencies": {
"@codemirror/language": "^6.12.3",
"@codemirror/state": "^6.6.0",
"@codemirror/view": "^6.43.0",
"@lezer/common": "^1.5.2",
"dvi2html": "0.0.2",
"esbuild-plugin-inline-worker": "^0.1.1",
"flatqueue": "^3.0.0",
"monkey-around": "^3.0.0",
"sorted-btree": "^2.1.0"
}
}