Files
nextcloud-mcp-server/third_party/astroglobe/package.json
T
Chris Coutinho 5acac804a1 refactor(astrolabe): extract PDF viewer to dedicated component
Replace fragile 20-iteration retry loop with proper Vue lifecycle management.

Changes:
- Create PDFViewer.vue component (~200 lines) with:
  - Proper mounted/beforeUnmount lifecycle hooks
  - Loading/error/content states
  - Page navigation controls
  - PDF document cleanup
  - User-friendly error messages
- Simplify App.vue by removing ~120 lines:
  - Remove loadPdf() and renderPdfPage() methods
  - Remove manual DOM polling with $nextTick() loops
  - Replace PDF template with <PDFViewer> component
- Add pdfjs-dist@4.0.379 dependency

Result: Canvas found on first attempt instead of requiring 20 retries.

Follows patterns from Nextcloud's production files_pdfviewer app and
2025 Vue.js + PDF.js best practices.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 00:01:30 +01:00

39 lines
1017 B
JSON

{
"name": "astroglobe",
"version": "1.0.0",
"license": "AGPL-3.0-or-later",
"engines": {
"node": "^22.0.0",
"npm": "^10.5.0"
},
"scripts": {
"build": "vite build",
"dev": "vite --mode development build",
"watch": "vite --mode development build --watch",
"lint": "eslint src",
"stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css"
},
"type": "module",
"browserslist": [
"extends @nextcloud/browserslist-config"
],
"dependencies": {
"@nextcloud/axios": "^2.5.1",
"@nextcloud/l10n": "^3.1.0",
"@nextcloud/router": "^3.0.1",
"@nextcloud/vue": "^8.29.2",
"plotly.js-dist-min": "^2.35.3",
"pdfjs-dist": "^4.0.379",
"vue": "^2.7.16",
"vue-material-design-icons": "^5.3.1"
},
"devDependencies": {
"@nextcloud/browserslist-config": "^3.0.1",
"@nextcloud/eslint-config": "^8.4.2",
"@nextcloud/stylelint-config": "^3.1.0",
"@nextcloud/vite-config": "^1.5.2",
"terser": "^5.44.1",
"vite": "^7.1.3"
}
}