mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-31 08:29:07 +08:00
chore: remove @radix-ui/react-slot dependency and update utility functions
- Removed `@radix-ui/react-slot` dependency from package.json and corresponding entries in yarn.lock to streamline dependencies. - Adjusted the `PlaceholderBlock` component's margin styling for improved layout. - Refactored utility functions by exporting `cn` from `@heroui/react`, enhancing class name management.
This commit is contained in:
parent
12d08e4748
commit
93e972a5da
@ -151,7 +151,6 @@
|
||||
"@opentelemetry/sdk-trace-node": "^2.0.0",
|
||||
"@opentelemetry/sdk-trace-web": "^2.0.0",
|
||||
"@playwright/test": "^1.52.0",
|
||||
"@radix-ui/react-slot": "^1.2.3",
|
||||
"@reduxjs/toolkit": "^2.2.5",
|
||||
"@shikijs/markdown-it": "^3.12.0",
|
||||
"@swc/plugin-styled-components": "^8.0.4",
|
||||
|
||||
@ -9,7 +9,7 @@ interface PlaceholderBlockProps {
|
||||
const PlaceholderBlock: React.FC<PlaceholderBlockProps> = ({ status, type }) => {
|
||||
if (status === MessageBlockStatus.PROCESSING && type === MessageBlockType.UNKNOWN) {
|
||||
return (
|
||||
<div className="mt-[-0.5rem]">
|
||||
<div className="-mt-2">
|
||||
<Loader variant="terminal" />
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { cn } from '@renderer/utils/index'
|
||||
import React from 'react'
|
||||
|
||||
export interface LoaderProps {
|
||||
variant?:
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
import { loggerService } from '@logger'
|
||||
import { Model, ModelType, Provider } from '@renderer/types'
|
||||
import { ModalFuncProps } from 'antd'
|
||||
import { type ClassValue, clsx } from 'clsx'
|
||||
import { isEqual } from 'lodash'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
|
||||
const logger = loggerService.withContext('Utils')
|
||||
@ -226,10 +224,6 @@ export function uniqueObjectArray<T>(array: T[]): T[] {
|
||||
return array.filter((obj, index, self) => index === self.findIndex((t) => isEqual(t, obj)))
|
||||
}
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
||||
|
||||
export * from './api'
|
||||
export * from './collection'
|
||||
export * from './dataLimit'
|
||||
@ -240,3 +234,4 @@ export * from './match'
|
||||
export * from './naming'
|
||||
export * from './sort'
|
||||
export * from './style'
|
||||
export { cn } from '@heroui/react'
|
||||
|
||||
29
yarn.lock
29
yarn.lock
@ -7396,34 +7396,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@radix-ui/react-compose-refs@npm:1.1.2":
|
||||
version: 1.1.2
|
||||
resolution: "@radix-ui/react-compose-refs@npm:1.1.2"
|
||||
peerDependencies:
|
||||
"@types/react": "*"
|
||||
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
|
||||
peerDependenciesMeta:
|
||||
"@types/react":
|
||||
optional: true
|
||||
checksum: 10c0/d36a9c589eb75d634b9b139c80f916aadaf8a68a7c1c4b8c6c6b88755af1a92f2e343457042089f04cc3f23073619d08bb65419ced1402e9d4e299576d970771
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@radix-ui/react-slot@npm:^1.2.3":
|
||||
version: 1.2.3
|
||||
resolution: "@radix-ui/react-slot@npm:1.2.3"
|
||||
dependencies:
|
||||
"@radix-ui/react-compose-refs": "npm:1.1.2"
|
||||
peerDependencies:
|
||||
"@types/react": "*"
|
||||
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
|
||||
peerDependenciesMeta:
|
||||
"@types/react":
|
||||
optional: true
|
||||
checksum: 10c0/5913aa0d760f505905779515e4b1f0f71a422350f077cc8d26d1aafe53c97f177fec0e6d7fbbb50d8b5e498aa9df9f707ca75ae3801540c283b26b0136138eef
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@rc-component/async-validator@npm:^5.0.3":
|
||||
version: 5.0.4
|
||||
resolution: "@rc-component/async-validator@npm:5.0.4"
|
||||
@ -13281,7 +13253,6 @@ __metadata:
|
||||
"@opentelemetry/sdk-trace-node": "npm:^2.0.0"
|
||||
"@opentelemetry/sdk-trace-web": "npm:^2.0.0"
|
||||
"@playwright/test": "npm:^1.52.0"
|
||||
"@radix-ui/react-slot": "npm:^1.2.3"
|
||||
"@reduxjs/toolkit": "npm:^2.2.5"
|
||||
"@shikijs/markdown-it": "npm:^3.12.0"
|
||||
"@strongtz/win32-arm64-msvc": "npm:^0.4.7"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user