From 30bc6bb89d602d4a1d9d27f4a998807e85cec575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E8=89=B3=E5=85=B5?= Date: Mon, 18 May 2026 15:47:34 +0800 Subject: [PATCH 1/3] chore: export util root APIs --- package.json | 2 +- src/index.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b3f59b92..b0ef13f0 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "react-is": "^18.2.0" }, "devDependencies": { - "@rc-component/father-plugin": "^2.0.1", + "@rc-component/father-plugin": "^2.2.0", "@rc-component/np": "^1.0.3", "@testing-library/react": "^16.0.0", "@types/jest": "^30.0.0", diff --git a/src/index.ts b/src/index.ts index ec2963a7..6441f6ec 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,6 +22,7 @@ export { export { default as canUseDom } from './Dom/canUseDom'; export { default as contains } from './Dom/contains'; export { injectCSS, removeCSS, updateCSS } from './Dom/dynamicCSS'; +export type { Prepend } from './Dom/dynamicCSS'; export { getDOM, isDOM } from './Dom/findDOMNode'; export { getFocusNodeList, @@ -46,13 +47,17 @@ export { default as pickAttrs } from './pickAttrs'; export { default as proxyObject } from './proxyObject'; export { default as raf } from './raf'; export { default as toArray } from './Children/toArray'; +export type { Option } from './Children/toArray'; export { default as mergeProps } from './mergeProps'; export { default as get } from './utils/get'; export { default as set, merge, mergeWith } from './utils/set'; -export { default as warning, noteOnce } from './warning'; +export { default as warning, noteOnce, resetWarned } from './warning'; export { render, unmount } from './React/render'; +export { spyElementPrototype, spyElementPrototypes } from './test/domHook'; +export { default as Portal } from './Portal'; export type { PortalProps, PortalRef } from './Portal'; +export { default as PortalWrapper } from './PortalWrapper'; export type { GetContainer } from './PortalWrapper'; From ea65e18a71222d9ec688060bae2a14657b168dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E8=89=B3=E5=85=B5?= Date: Mon, 18 May 2026 16:14:19 +0800 Subject: [PATCH 2/3] chore: remove PortalWrapper from main entry exports Co-authored-by: Cursor --- src/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 6441f6ec..e301cd00 100644 --- a/src/index.ts +++ b/src/index.ts @@ -59,5 +59,4 @@ export { render, unmount } from './React/render'; export { spyElementPrototype, spyElementPrototypes } from './test/domHook'; export { default as Portal } from './Portal'; export type { PortalProps, PortalRef } from './Portal'; -export { default as PortalWrapper } from './PortalWrapper'; export type { GetContainer } from './PortalWrapper'; From d4d3a47006b36f19e8b764134c677de365fb3f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E8=89=B3=E5=85=B5?= Date: Mon, 18 May 2026 16:38:47 +0800 Subject: [PATCH 3/3] fix: export toArray options as ToArrayOptions from root entry Avoid generic Option name collision when importing from package root. Co-authored-by: Cursor --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index e301cd00..24c69d83 100644 --- a/src/index.ts +++ b/src/index.ts @@ -47,7 +47,7 @@ export { default as pickAttrs } from './pickAttrs'; export { default as proxyObject } from './proxyObject'; export { default as raf } from './raf'; export { default as toArray } from './Children/toArray'; -export type { Option } from './Children/toArray'; +export type { Option as ToArrayOptions } from './Children/toArray'; export { default as mergeProps } from './mergeProps'; export { default as get } from './utils/get';