mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-09-04 05:28:30 +00:00
* fix: stop the virtualized data table looping on render Opening Archived chats or Shared chats with 50 or more rows threw "Too many re-renders". DataTable passed an inline getItemKey to useVirtualizer, and virtual-core lists that option among the deps of its getMeasurementOptions memo, whose onChange notifies. getVirtualItems() is read during render, so every render built a new closure, notified, and dispatched a render-phase update on the component that was still rendering, until React gave up at 25 passes. It only fired past the 50-row virtualization threshold, which is why both dialogs looked fine while empty. Memoize getItemKey and estimateSize so their identity tracks their inputs. DataTable.spec had mocked @tanstack/react-virtual away, attributing the same error to jsdom, which hid this from CI. Keep that mock, since its row assertions need every row rendered, and add a spec that drives the real virtualizer and fails without the fix. Also restyle both dialogs, which is what made them look unfinished: - add the 19 keys these components pull from @librechat/client but the app locale never defined, so the empty state rendered com_ui_no_data verbatim - rename Shared links to Shared chats, matching the sibling Archived chats - transparent table with a rounded hover highlight painted on the cells, since border-radius does not apply to a table row, which needs separated borders - row height 56 to 40, dividers dropped, skeletons follow the same height - row hover uses surface-secondary-alt: plain surface-secondary is 247 against a 255 dialog in light mode and reads as nothing - row action buttons use surface-hover-alt, because surface-hover is also 227 in light and would vanish against the row highlight - drop the focus ring from the dialog containers and stop Shared chats seating focus in its search field, so neither flashes an outline on open - narrow both dialogs and let the table height follow its content * Fix compact row actions and selection count * fix: update selected count translation test to match interpolated output
121 lines
3.8 KiB
JSON
121 lines
3.8 KiB
JSON
{
|
|
"name": "@librechat/client",
|
|
"version": "0.4.76",
|
|
"description": "React components for LibreChat",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/danny-avila/LibreChat"
|
|
},
|
|
"main": "dist/index.cjs",
|
|
"module": "dist/index.mjs",
|
|
"types": "./dist/index.d.cts",
|
|
"exports": {
|
|
".": {
|
|
"import": {
|
|
"types": "./dist/index.d.mts",
|
|
"default": "./dist/index.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/index.d.cts",
|
|
"default": "./dist/index.cjs"
|
|
}
|
|
},
|
|
"./tailwind-preset": "./tailwind.preset.cjs",
|
|
"./style.css": "./dist/style.css",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"tailwind.preset.cjs"
|
|
],
|
|
"scripts": {
|
|
"clean": "rimraf dist",
|
|
"b:clean": "bun run rimraf dist",
|
|
"build": "npm run clean && tsdown",
|
|
"build:dev": "npm run clean && NODE_ENV=development tsdown",
|
|
"b:build": "bun run b:clean && bun run tsdown",
|
|
"build:watch": "tsdown --watch",
|
|
"dev": "tsdown --watch",
|
|
"test": "jest",
|
|
"test:ci": "jest --ci"
|
|
},
|
|
"peerDependencies": {
|
|
"@ariakit/react": "^0.4.29",
|
|
"@ariakit/react-components": "^0.1.2",
|
|
"@dicebear/collection": "^9.4.1",
|
|
"@dicebear/core": "^9.4.1",
|
|
"@headlessui/react": "^2.1.2",
|
|
"@radix-ui/react-accordion": "^1.2.11",
|
|
"@radix-ui/react-alert-dialog": "1.0.2",
|
|
"@radix-ui/react-checkbox": "^1.0.3",
|
|
"@radix-ui/react-collapsible": "^1.1.11",
|
|
"@radix-ui/react-dialog": "1.0.2",
|
|
"@radix-ui/react-dropdown-menu": "^2.1.1",
|
|
"@radix-ui/react-hover-card": "^1.0.5",
|
|
"@radix-ui/react-icons": "^1.3.0",
|
|
"@radix-ui/react-label": "^2.1.7",
|
|
"@radix-ui/react-progress": "^1.1.2",
|
|
"@radix-ui/react-radio-group": "^1.3.7",
|
|
"@radix-ui/react-select": "^2.2.5",
|
|
"@radix-ui/react-separator": "^1.1.7",
|
|
"@radix-ui/react-slider": "^1.3.5",
|
|
"@radix-ui/react-slot": "^1.0.0",
|
|
"@radix-ui/react-switch": "^1.2.5",
|
|
"@radix-ui/react-tabs": "^1.0.3",
|
|
"@radix-ui/react-toast": "^1.1.5",
|
|
"@react-spring/web": "^10.0.1",
|
|
"@tanstack/react-query": "^4.28.0 || ^5.0.0",
|
|
"@tanstack/react-table": "^8.11.7",
|
|
"@tanstack/react-virtual": "^3.0.0",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"dompurify": "^3.4.0",
|
|
"framer-motion": "^12.40.0",
|
|
"i18next": "^24.2.2 || ^25.3.2",
|
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
"input-otp": "^1.4.2",
|
|
"jotai": "^2.12.5",
|
|
"librechat-data-provider": "*",
|
|
"lucide-react": "^0.525.0",
|
|
"match-sorter": "^8.1.0",
|
|
"rc-input-number": "^7.4.2",
|
|
"react": "^18.2.0 || ^19.1.0",
|
|
"react-dom": "^18.2.0 || ^19.1.0",
|
|
"react-hook-form": "^7.56.4",
|
|
"react-i18next": "^15.4.0 || ^15.6.0",
|
|
"react-resizable-panels": "^4.7.4",
|
|
"react-textarea-autosize": "^8.4.0",
|
|
"tailwind-merge": "^1.9.1"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.28.5",
|
|
"@babel/preset-env": "^7.29.5",
|
|
"@babel/preset-react": "^7.28.5",
|
|
"@babel/preset-typescript": "^7.28.5",
|
|
"@tanstack/react-query": "^4.28.0",
|
|
"@tanstack/react-table": "^8.21.3",
|
|
"@tanstack/react-virtual": "^3.13.13",
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@testing-library/react": "^14.0.0",
|
|
"@tsdown/css": "^0.22.2",
|
|
"@types/jest": "^29.5.14",
|
|
"@types/react": "^18.2.11",
|
|
"@types/react-dom": "^18.2.4",
|
|
"babel-jest": "^30.2.0",
|
|
"caniuse-lite": "^1.0.30001741",
|
|
"i18next": "^24.2.3",
|
|
"identity-obj-proxy": "^3.0.0",
|
|
"jest": "^30.2.0",
|
|
"jest-environment-jsdom": "^30.2.0",
|
|
"jotai": "^2.12.5",
|
|
"librechat-data-provider": "*",
|
|
"lucide-react": "^0.525.0",
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.2.0",
|
|
"react-i18next": "^15.4.0",
|
|
"rimraf": "^6.1.3",
|
|
"tailwindcss-radix": "^2.8.0",
|
|
"tsdown": "^0.22.2",
|
|
"typescript": "^5.9.3"
|
|
}
|
|
}
|