Files
new-api/web/package.json
T
QuentinHsu eb4a1bd193 perf(json-editor): unify admin JSON editing experience (#6421)
* perf(json-editor): improve JSON editing experience

- integrate Yace for syntax highlighting, history, indentation, auto-closing, and smart line breaks.
- add copy support, cursor location feedback, and synchronized content and line-number scrolling.
- extract JSON editor utilities and cover key interactions with unit tests.

* perf(system-settings): improve JSON configuration editing

- replace raw JSON textareas with the shared editor for highlighting, validation, copy, and formatting.
- preserve field-specific examples and make placeholders visible through the transparent editor layer.
- remove duplicate formatting controls while keeping existing form validation and save behavior.

* perf(json-editor): standardize JSON inputs across admin settings

- replace pure JSON textareas with the shared editor across system settings and channel workflows.
- preserve form focus, validation, placeholders, and visual or JSON editing modes.
- add happy-dom component coverage for form bindings, controlled updates, and formatting.

* fix(json-code-editor): address accessibility review findings

- Drop the unconditional aria-label that overrode every field's
  label-derived accessible name; add an optional ariaLabel prop and
  set it at call sites without an associated label
- Associate standalone Labels via htmlFor/id in channel-affinity views
- Hide the highlight mirror and line-number layers from the
  accessibility tree (aria-hidden)
- Give the line-number gutter an opaque background so horizontally
  scrolled code no longer slides under it
- Degrade to no scroll sync instead of destroying the editor when the
  line-number layer is not found
2026-07-25 19:10:28 +08:00

114 lines
3.4 KiB
JSON

{
"name": "newapi-web",
"version": "1.0.0",
"private": false,
"type": "module",
"scripts": {
"dev": "rsbuild dev",
"build": "rsbuild build",
"build:check": "tsgo -b && rsbuild build",
"typecheck": "tsgo -b",
"lint": "oxlint -c .oxlintrc.json .",
"lint:fix": "oxlint -c .oxlintrc.json . --fix",
"preview": "rsbuild preview",
"format:check": "node scripts/format-with-protected-headers.mjs --check",
"format": "node scripts/format-with-protected-headers.mjs --write",
"copyright:check": "node scripts/add-copyright.mjs --check",
"copyright": "node scripts/add-copyright.mjs",
"i18n:sync": "node scripts/sync-i18n.mjs",
"knip": "knip"
},
"dependencies": {
"@base-ui/react": "^1.6.0",
"@codemirror/lang-markdown": "^6.5.0",
"@codemirror/language": "^6.12.4",
"@codemirror/state": "^6.7.0",
"@codemirror/view": "^6.43.4",
"@fontsource-variable/lora": "^5.2.8",
"@fontsource-variable/public-sans": "^5.2.7",
"@hookform/resolvers": "^5.4.0",
"@hugeicons/core-free-icons": "^4.2.2",
"@hugeicons/react": "^1.1.9",
"@lezer/highlight": "^1.2.3",
"@lobehub/icons": "^5.10.1",
"@tanstack/react-query": "^5.101.2",
"@tanstack/react-router": "^1.170.17",
"@tanstack/react-table": "^8.21.3",
"@tanstack/react-virtual": "^3.14.5",
"@visactor/react-vchart": "^2.1.2",
"@visactor/vchart": "^2.1.2",
"ai": "^7.0.14",
"auto-skeleton-react": "^1.0.5",
"axios": "^1.18.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"dayjs": "^1.11.21",
"dompurify": "3.4.11",
"i18next": "^26.3.4",
"i18next-browser-languagedetector": "^8.2.1",
"input-otp": "^1.4.2",
"katex": "^0.17.0",
"lucide-react": "^1.23.0",
"marked": "^18.0.5",
"motion": "^12.42.2",
"nanoid": "^5.1.16",
"next-themes": "^0.4.6",
"qrcode.react": "^4.2.0",
"react": "^19.2.7",
"react-day-picker": "^10.0.1",
"react-dom": "^19.2.7",
"react-hook-form": "^7.80.0",
"react-i18next": "^17.0.8",
"react-icons": "^5.7.0",
"react-resizable-panels": "^4.12.0",
"react-top-loading-bar": "^3.0.2",
"recharts": "3.9.1",
"shiki": "^4.3.0",
"sonner": "^2.0.7",
"sse.js": "^2.8.0",
"stream-markdown-parser": "^1.0.9",
"tailwind-merge": "^3.6.0",
"tailwindcss": "^4.3.2",
"tokenlens": "^1.3.1",
"tw-animate-css": "^1.4.0",
"use-stick-to-bottom": "^1.1.6",
"vaul": "^1.1.2",
"yace": "^1.1.0",
"zod": "^4.4.3",
"zustand": "^5.0.14"
},
"devDependencies": {
"@rsbuild/core": "^2.1.4",
"@rsbuild/plugin-react": "^2.1.0",
"@rsbuild/plugin-tailwindcss": "^2.0.3",
"@tanstack/react-query-devtools": "^5.101.2",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/router-plugin": "^1.168.19",
"@types/node": "^26.1.0",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@typescript/native-preview": "^7.0.0-dev.20260702.3",
"@xyflow/react": "^12.11.1",
"embla-carousel-react": "^8.6.0",
"happy-dom": "^20.11.1",
"knip": "^6.24.0",
"oxfmt": "^0.57.0",
"oxlint": "^1.72.0",
"shadcn": "^4.12.0"
},
"overrides": {
"brace-expansion": "2.1.1",
"dompurify": "3.4.11",
"fast-uri": "3.1.2",
"hono": "4.12.22",
"ip-address": "10.2.0",
"js-cookie": "3.0.7",
"mermaid": "11.15.0",
"minimist": "1.2.8",
"postcss": "8.5.15",
"qs": "6.15.2",
"uuid": "14.0.0"
}
}