refactor: unified cn utils (#29916)

Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
This commit is contained in:
Stephen Zhou
2025-12-19 12:08:34 +08:00
committed by GitHub
parent 80f11471ae
commit a26881cb24
815 changed files with 1064 additions and 1227 deletions

View File

@@ -5,7 +5,7 @@ import { NodeSourceHandle } from './node-handle'
import { ErrorHandleTypeEnum } from '@/app/components/workflow/nodes/_base/components/error-handle/types'
import type { Node } from '@/app/components/workflow/types'
import { NodeRunningStatus } from '@/app/components/workflow/types'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
type ErrorHandleOnNodeProps = Pick<Node, 'id' | 'data'>
const ErrorHandleOnNode = ({

View File

@@ -9,7 +9,7 @@ import {
BlockEnum,
} from '@/app/components/workflow/types'
import type { Node } from '@/app/components/workflow/types'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
type NodeHandleProps = {
handleId: string

View File

@@ -6,7 +6,7 @@ import {
memo,
} from 'react'
import { useTranslation } from 'react-i18next'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import BlockIcon from '@/app/components/workflow/block-icon'
import type {
NodeProps,

View File

@@ -7,7 +7,7 @@ import {
useViewport,
} from 'reactflow'
import type { IterationNodeType } from '@/app/components/workflow/nodes/iteration/types'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import type { NodeProps } from '@/app/components/workflow/types'
const Node: FC<NodeProps<IterationNodeType>> = ({

View File

@@ -9,7 +9,7 @@ import {
useViewport,
} from 'reactflow'
import type { LoopNodeType } from '@/app/components/workflow/nodes/loop/types'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import type { NodeProps } from '@/app/components/workflow/types'
import { useNodeLoopInteractions } from './hooks'

View File

@@ -10,7 +10,7 @@ import {
} from '@/app/components/workflow/note-node/note-editor'
import { THEME_MAP } from '@/app/components/workflow/note-node/constants'
import type { NoteNodeType } from '@/app/components/workflow/note-node/types'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
const NoteNode = ({
data,

View File

@@ -17,7 +17,7 @@ import {
import ShortcutsName from '@/app/components/workflow/shortcuts-name'
import Divider from '@/app/components/base/divider'
import TipPopup from '@/app/components/workflow/operator/tip-popup'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import {
PortalToFollowElem,
PortalToFollowElemContent,

View File

@@ -28,7 +28,7 @@ import {
CUSTOM_NODE,
ITERATION_CHILDREN_Z_INDEX,
} from '@/app/components/workflow/constants'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import {
initialEdges,
initialNodes,