WeKnora/frontend/package.json

65 lines
1.7 KiB
JSON
Raw Normal View History

2025-08-05 07:08:07 +00:00
{
"name": "knowledage-base",
"version": "0.5.1",
2025-08-05 07:08:07 +00:00
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"build-with-types": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --build"
},
"dependencies": {
"@microsoft/fetch-event-source": "^2.0.1",
"@types/dompurify": "^3.2.0",
"@types/papaparse": "^5.5.2",
"@vue-office/pptx": "^1.0.1",
2025-08-05 07:08:07 +00:00
"axios": "^1.8.4",
"docx-preview": "^0.3.7",
"dompurify": "^3.4.2",
"highlight.js": "^11.11.1",
"katex": "^0.16.45",
"marked": "^17.0.5",
"marked-katex-extension": "^5.1.8",
"mermaid": "^11.14.0",
2025-08-05 07:08:07 +00:00
"pagefind": "^1.1.1",
"papaparse": "^5.5.3",
2025-08-05 07:08:07 +00:00
"pinia": "^3.0.1",
"swiper": "^12.0.3",
2025-09-16 06:30:35 +00:00
"tdesign-icons-vue-next": "^0.4.1",
"tdesign-vue-next": "^1.17.2",
"vue": "^3.5.34",
"vue-demi": "^0.14.6",
"vue-i18n": "^11.1.12",
2025-08-05 07:08:07 +00:00
"vue-router": "^4.5.0",
perf(wiki): lazy-load sidebar page list with virtual-scroll tabs ?tab=wiki used to call listWikiPages({page_size: 500}) in a loop up to 50 times, loading ~25k pages into memory before rendering the sidebar on knowledge bases with tens of thousands of pages. All rows were then materialized as DOM nodes inside collapsible groups stacked vertically. This commit reshapes the sidebar around per-type buckets that are fetched on demand and rendered through a single virtual scroller: * pagesByType holds one bucket per page_type (summary / entity / concept / synthesis / comparison), each with its own items list, pagination cursor, KB-wide total, and loading flag. Initial load fires one 50-item request per type in parallel. * Index and Log are fetched directly via getWikiIndex / getWikiLog instead of scanning the full page list to find them. * Groups are surfaced as a horizontal tab bar; switching tabs swaps the RecycleScroller's items. Only one bucket is visible at a time, so we never stack multiple virtual viewports. * The scroller runs in page-mode with the outer .wiki-page-list as the scrollable ancestor; a 1px sentinel after the list is watched by IntersectionObserver to trigger the next page fetch. After each batch lands we call scroller.updateVisibleItems(true) on the next tick so appended rows render in order without requiring the user to jiggle the scroll. * Switching tabs resets scrollTop so the retained position of the previous tab can't re-trigger the sentinel and cascade loads on the new (shorter) list. * Search enters a dedicated flat-result mode (searchResults ref); clearing the query flips back to the bucketed view without refetching the buckets the user already had open. Adds vue-virtual-scroller dependency and imports its stylesheet.
2026-05-08 07:04:11 +00:00
"vue-virtual-scroller": "^2.0.0-beta.8",
"webpack": "^5.94.0",
"xlsx": "file:./packages/xlsx-0.20.2.tgz"
2025-08-05 07:08:07 +00:00
},
"devDependencies": {
"@tsconfig/node22": "^22.0.1",
"@types/node": "^22.14.0",
"@vitejs/plugin-vue": "6.0.0",
"@vitejs/plugin-vue-jsx": "5.0.1",
"@vue/tsconfig": "^0.7.0",
"less": "^4.6.4",
"less-loader": "^12.3.2",
"npm-run-all2": "^8.0.4",
2025-08-05 07:08:07 +00:00
"typescript": "~5.8.0",
"vite": "^7.2.2",
"vue-tsc": "^3.2.5"
2025-08-05 07:08:07 +00:00
},
"overrides": {
"lightningcss": "none",
"esbuild": "^0.25.0",
"serialize-javascript": "^7.0.3"
2025-08-05 07:08:07 +00:00
},
"resolutions": {
"lightningcss": "none",
"esbuild": "^0.25.0",
"serialize-javascript": "^7.0.3"
2025-08-05 07:08:07 +00:00
}
}