Introduce useAnchoredPopover + PopoverSurface over @floating-ui/react — one primitive replacing the hand-rolled measured engines: flip() (two-way flip), shift() (width clamp), hide() (hide-and-follow when the trigger leaves its scroller), autoUpdate (scroll follow), FloatingPortal (escape ancestor stacking contexts). Supports menu + hover modes; focus management lands in S2. Wrap the app and the public watch page in <FloatingTree> so Escape / outside-press dispatch is topmost-only across nested layers (S3 folds in the Modal + players). Migrate the richest engine, TagsCell, as the pilot — ~140 lines of bespoke positioning (coords state, flip layout-effect, scroll rAF loop, useDismiss, Overlay) collapse into one hook call. Verified in-app: click opens, portals to <body>, positions below the trigger, role=menu + aria-expanded/haspopup, Escape and outside-click close, no console errors.
60 lines
1.7 KiB
JSON
60 lines
1.7 KiB
JSON
{
|
|
"name": "siftlode-frontend",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"typecheck": "npm run typecheck:app && npm run typecheck:node && npm run typecheck:e2e",
|
|
"typecheck:app": "tsc --noEmit -p tsconfig.json",
|
|
"typecheck:node": "tsc -p tsconfig.node.json",
|
|
"typecheck:e2e": "tsc --noEmit -p e2e/tsconfig.json",
|
|
"build": "npm run typecheck:app && npm run typecheck:node && vite build",
|
|
"preview": "vite preview",
|
|
"knip": "knip",
|
|
"lint": "eslint .",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check .",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"e2e": "playwright test"
|
|
},
|
|
"dependencies": {
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dnd-kit/utilities": "^3.2.2",
|
|
"@floating-ui/react": "^0.27.20",
|
|
"@tanstack/react-query": "^5.51.0",
|
|
"@tanstack/react-virtual": "^3.14.3",
|
|
"clsx": "^2.1.1",
|
|
"flag-icons": "^7.5.0",
|
|
"hls.js": "^1.6.16",
|
|
"i18next": "^23.11.5",
|
|
"lucide-react": "^0.408.0",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"react-i18next": "^14.1.2"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "9.39.1",
|
|
"@playwright/test": "^1.61.1",
|
|
"@types/node": "^26.1.1",
|
|
"@types/react": "^18.3.3",
|
|
"@types/react-dom": "^18.3.0",
|
|
"@vitejs/plugin-react": "^4.3.1",
|
|
"autoprefixer": "^10.4.19",
|
|
"eslint": "9.39.1",
|
|
"eslint-config-prettier": "10.1.8",
|
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
"eslint-plugin-react-refresh": "0.4.24",
|
|
"globals": "16.5.0",
|
|
"knip": "6.27.0",
|
|
"postcss": "^8.4.39",
|
|
"prettier": "3.6.2",
|
|
"tailwindcss": "^3.4.6",
|
|
"typescript": "^5.5.3",
|
|
"typescript-eslint": "8.46.0",
|
|
"vite": "^5.3.4",
|
|
"vitest": "^3.2.7"
|
|
}
|
|
}
|