Replace all 5 direct recharts usages with the shared, token-themed SVG
primitives, lazy-loaded for bundle savings:
- dashboard, usage, users/[id], ops/client-logs, extraction/entity-chart
now render AreaChart/BarChart/Donut from @bytelyst/charts.
- new src/components/charts: next/dynamic wrappers (own chunk, ssr:false)
that dynamic-import a local static re-export (primitives.tsx) — the chart
packages declare only an `import` export condition, so a direct
import('@bytelyst/charts') trips Next's resolver.
- new src/lib/chart-data.ts: pure, finite-safe data mappers (unit-tested).
- recharts removed from package.json + the admin-web lockfile importer entry
(now fully unused). Lockfile delta is importer-only (+charts/+data-viz as
workspace:*, -recharts); no monorepo re-normalization; --frozen-lockfile clean.
- vitest.config: inline @bytelyst/{charts,data-viz} + dedupe react so the
SSR no-NaN render tests use a single React copy.
Fidelity notes (charts are single-series/vertical; StackedBar is charts 0.2.x):
stacked severity chart -> single bars colored by dominant severity; pie charts
-> Donut; horizontal bars -> vertical.
Verify: typecheck+lint+build green (123 routes); vitest 18 files / 159 tests
(+19); format:check no new failures; e2e 11 passed / 80 failed (unchanged vs
UX-1 baseline — failures are environmental, no backend).
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
90 lines
2.6 KiB
JSON
90 lines
2.6 KiB
JSON
{
|
|
"name": "@bytelyst/admin-web",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build --webpack",
|
|
"start": "next start",
|
|
"lint": "eslint",
|
|
"typecheck": "tsc --noEmit",
|
|
"check": "tsc --noEmit && eslint",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:e2e": "playwright test",
|
|
"test:e2e:ui": "playwright test --ui",
|
|
"build:analyze": "ANALYZE=true next build",
|
|
"test:coverage": "vitest run --coverage",
|
|
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md,yml,yaml}\"",
|
|
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,json,md,yml,yaml}\"",
|
|
"size:check": "bundlesize",
|
|
"prepare": "husky install"
|
|
},
|
|
"dependencies": {
|
|
"@azure/cosmos": "^4.9.1",
|
|
"@azure/identity": "^4.13.0",
|
|
"@azure/keyvault-secrets": "^4.10.0",
|
|
"@bytelyst/api-client": "workspace:*",
|
|
"@bytelyst/auth": "workspace:*",
|
|
"@bytelyst/charts": "workspace:*",
|
|
"@bytelyst/config": "workspace:*",
|
|
"@bytelyst/cosmos": "workspace:*",
|
|
"@bytelyst/dashboard-components": "workspace:*",
|
|
"@bytelyst/data-viz": "workspace:*",
|
|
"@bytelyst/datastore": "workspace:*",
|
|
"@bytelyst/design-tokens": "workspace:*",
|
|
"@bytelyst/devops": "workspace:*",
|
|
"@bytelyst/errors": "workspace:*",
|
|
"@bytelyst/extraction": "workspace:*",
|
|
"@bytelyst/logger": "workspace:*",
|
|
"@bytelyst/react-auth": "workspace:*",
|
|
"@bytelyst/telemetry-client": "workspace:*",
|
|
"@bytelyst/ui": "workspace:*",
|
|
"@radix-ui/react-slider": "^1.3.6",
|
|
"@tailwindcss/typography": "^0.5.19",
|
|
"bcryptjs": "^3.0.3",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"jose": "^6.1.3",
|
|
"lucide-react": "^0.563.0",
|
|
"next": "16.1.6",
|
|
"posthog-js": "^1.196.0",
|
|
"radix-ui": "^1.4.3",
|
|
"react": "19.2.3",
|
|
"react-dom": "19.2.3",
|
|
"react-markdown": "^10.1.0",
|
|
"redis": "^4.7.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"tailwind-merge": "^3.4.0"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.58.2",
|
|
"@tailwindcss/postcss": "^4",
|
|
"@types/bcryptjs": "^2.4.6",
|
|
"@types/node": "^20",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@vitest/coverage-v8": "^4.0.18",
|
|
"bundlesize": "^0.18.1",
|
|
"eslint": "^9",
|
|
"eslint-config-next": "16.1.6",
|
|
"husky": "^9.0.0",
|
|
"lint-staged": "^15.0.0",
|
|
"prettier": "^3.0.0",
|
|
"shadcn": "^3.8.4",
|
|
"tailwindcss": "^4",
|
|
"tw-animate-css": "^1.4.0",
|
|
"typescript": "^5",
|
|
"vitest": "^4.0.18"
|
|
},
|
|
"lint-staged": {
|
|
"*.{ts,tsx}": [
|
|
"eslint --fix",
|
|
"prettier --write"
|
|
],
|
|
"*.{js,jsx,json,md,yml,yaml}": [
|
|
"prettier --write"
|
|
]
|
|
}
|
|
}
|