From 25e6800cc670f54ecd055c7a462aca8617e8ea26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E8=89=B3=E5=85=B5?= Date: Thu, 21 May 2026 10:26:41 +0800 Subject: [PATCH 1/2] fix: avoid rc package deep imports --- package.json | 4 ++-- src/MotionThumb.tsx | 3 +-- src/index.tsx | 4 +--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 961aa18..688930d 100644 --- a/package.json +++ b/package.json @@ -47,12 +47,12 @@ }, "dependencies": { "@babel/runtime": "^7.11.1", - "@rc-component/util": "^1.3.0", + "@rc-component/util": "^1.11.1", "clsx": "^2.1.1", "@rc-component/motion": "^1.1.4" }, "devDependencies": { - "@rc-component/father-plugin": "^2.0.1", + "@rc-component/father-plugin": "^2.2.0", "@rc-component/np": "^1.0.0", "@testing-library/jest-dom": "^6.9.1", "@testing-library/react": "^14.2.1", diff --git a/src/MotionThumb.tsx b/src/MotionThumb.tsx index e6329df..1767966 100644 --- a/src/MotionThumb.tsx +++ b/src/MotionThumb.tsx @@ -1,6 +1,5 @@ import CSSMotion from '@rc-component/motion'; -import useLayoutEffect from '@rc-component/util/lib/hooks/useLayoutEffect'; -import { composeRef } from '@rc-component/util/lib/ref'; +import { composeRef, useLayoutEffect } from '@rc-component/util'; import { clsx } from 'clsx'; import * as React from 'react'; import type { SegmentedValue } from '.'; diff --git a/src/index.tsx b/src/index.tsx index 323e61d..5bcbca7 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,6 +1,4 @@ -import useControlledState from '@rc-component/util/lib/hooks/useControlledState'; -import omit from '@rc-component/util/lib/omit'; -import { composeRef } from '@rc-component/util/lib/ref'; +import { composeRef, omit, useControlledState } from '@rc-component/util'; import { clsx } from 'clsx'; import * as React from 'react'; From 7c18dfe1e45aa7402835ad4ac150454bca36f292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E8=89=B3=E5=85=B5?= Date: Thu, 21 May 2026 14:31:29 +0800 Subject: [PATCH 2/2] chore: address import review comments