open-code-review/pages/package.json
hezheng.lsw 022ed75682
feat(pages): add Docs page with search, markdown rendering, and i18n support (#273)
* feat(pages): add Docs page with search, markdown rendering, and i18n support

- Add DocsPage with full-text search modal (⌘K trigger)
- Add MarkdownRenderer with DOMPurify sanitization
- Add bilingual docs content (en/zh) for all sections
- Add shared headingId utility for consistent TOC anchors
- Add search keyboard hints with i18n support
- Update Navbar with Docs navigation link
- Add icon-search.svg asset
- Configure webpack for markdown imports

* fix(pages): address PR #273 code review feedback

- Replace marked.setOptions() with new Marked instance (no global mutation)
- Escape heading ID attribute value to prevent XSS
- Use crypto.randomUUID() for mermaid diagram IDs (no collisions)
- Add cancellation flag for async mermaid renders on unmount
- Move inline <pre> styles to CSS class (only dynamic align-items inline)
- Move @types/dompurify to devDependencies
- Remove @ts-nocheck from docs/index.ts
- Extract getRawContent helper to reduce duplication
- Fix searchDocs fallback consistency (add enDocs fallback)
- Fix heading ID mismatch by stripping markdown links before ID generation
- Separate sidebar chevron (expand) from label (navigate)
- Guard ⌘K shortcut against input/textarea focus interception
2026-07-03 11:45:33 +08:00

45 lines
1.2 KiB
JSON

{
"name": "open-code-review-landing",
"version": "1.0.0",
"description": "Landing page for Open Code Review",
"scripts": {
"dev": "webpack serve",
"build": "NODE_ENV=production webpack --mode production",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@agentscope-ai/icons": "^1.0.68",
"dompurify": "^3.4.11",
"marked": "^18.0.5",
"mermaid": "^11.16.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.8.0",
"three": "^0.185.0"
},
"overrides": {
"fast-uri": "^3.1.2"
},
"devDependencies": {
"@babel/core": "^7.23.5",
"@babel/preset-env": "^7.29.5",
"@babel/preset-react": "^7.23.5",
"@babel/preset-typescript": "^7.23.3",
"@types/dompurify": "^3.0.5",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@types/three": "^0.185.0",
"autoprefixer": "^10.4.16",
"babel-loader": "^9.1.3",
"css-loader": "^6.8.1",
"html-webpack-plugin": "^5.5.3",
"postcss": "^8.5.15",
"postcss-loader": "^7.3.3",
"style-loader": "^3.3.3",
"tailwindcss": "^3.3.5",
"typescript": "^5.3.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.2.4"
}
}