LibreChat/packages/client/package.json
Marco Beretta 86d5ad5c6b 🧵 fix: Restore Classes tailwind-merge Was Silently Dropping (#15995)
* 🧵 fix: Restore Classes tailwind-merge Was Silently Dropping

tailwind-merge 1.9.1 predates Tailwind 3.3, so its conflict map has no group
for text-wrap, touch-action, gradient color stops, or arbitrary bg-* properties.
cn() therefore deleted classes the caller wrote, with no error: touch-pan-y on
the mobile sidebar, from-* gradient colors behind three overlays, text-balance
and text-pretty across the Projects and Prompts cards, and the checkerboard
background on the skill file preview.

Bumps client and the @librechat/client peer range to ^2.6.1, the line that
supports Tailwind 3.x. Tailwind v4 requires tailwind-merge 3.x and moves in the
v4 pull request, so this change is the class map alone.

* ✅ test: Cover the Classes tailwind-merge Was Dropping From a Browser

Three `@scenario`-tagged specs ask the browser what the DOM actually got, one
per class `cn()` was deleting: the mobile drawer's `touch-pan-y` beside
`touch-pinch-zoom`, the shared-conversation fade's `from-surface-secondary`
beside `from-40%`, and `text-balance`/`text-pretty` beside `truncate` and
`line-clamp-2`. Each resolves both sides of its comparison in the browser —
computed value against the theme custom property, normalised through a probe —
so the same spec holds in light mode, dark mode, under a custom theme and after
the Tailwind v4 upgrade that follows this change in the stack.

The wrapping scenario asserts the Projects header and description rather than
`Prompts/lists/ListCard.tsx`: that component is exported but has no JSX call
site anywhere in the repository, so its `text-balance` renders nowhere and the
pull request's table overstates it. The `Projects` views carry the same pair
and do render.

* 🔬 test: Ask the Browser for Styles by Their CSS Names

computedStyles took camelCase names straight to getPropertyValue, which only
answers to the CSS spelling and returns '' for anything else, so every probe
but width and height fell through to an indexed read on the declaration that
TypeScript only allowed behind an 'as never' cast. touchAction reached the
assertions that way. The helper now hyphenates the name it was given and asks
once: a property the browser does not know comes back empty and fails its
assertion instead of silently taking another path.

---------

Co-authored-by: berry-13 <berry-13@users.noreply.github.com>
2026-09-23 13:19:32 -04:00

129 lines
4 KiB
JSON

{
"name": "@librechat/client",
"version": "0.4.79",
"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.3",
"@dicebear/core": "^9.4.3",
"@headlessui/react": "^2.1.2",
"@radix-ui/react-accordion": "^1.2.20",
"@radix-ui/react-alert-dialog": "^1.1.23",
"@radix-ui/react-checkbox": "^1.3.11",
"@radix-ui/react-collapsible": "^1.1.20",
"@radix-ui/react-dialog": "^1.1.23",
"@radix-ui/react-dropdown-menu": "^2.1.24",
"@radix-ui/react-hover-card": "^1.1.23",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-popover": "^1.1.23",
"@radix-ui/react-progress": "^1.1.2",
"@radix-ui/react-radio-group": "^1.3.7",
"@radix-ui/react-select": "^2.3.7",
"@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.1.21",
"@radix-ui/react-toast": "^1.2.23",
"@rc-component/mini-decimal": "^1.0.1",
"@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": "^0.525.0 || ^0.528.0",
"lucide-react": "^0.525.0 || ^0.528.0",
"match-sorter": "^8.1.0",
"morphicons": "^1.4.1",
"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": "^2.6.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.23",
"@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",
"js-yaml": "^4.3.2",
"librechat-data-provider": "*",
"lucide": "^0.528.0",
"lucide-react": "^0.528.0",
"morphicons": "^1.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^15.4.0",
"rimraf": "^6.1.3",
"tailwindcss": "^3.4.1",
"tailwindcss-radix": "^2.8.0",
"tsdown": "^0.22.2",
"typescript": "^5.9.3"
}
}