Skip to content

Commit e1b8dce

Browse files
layershifterclaude
andcommitted
fix(react-motion): remove @internal from MotionRefForwarder exports
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 81e1556 commit e1b8dce

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

packages/react-components/react-motion/library/etc/react-motion.api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ export type MotionImperativeRef = {
8383
// @public
8484
export type MotionParam = boolean | number | string;
8585

86-
// @internal
86+
// @public
8787
export const MotionRefForwarder: React_2.ForwardRefExoticComponent<{
8888
children?: React_2.ReactElement;
8989
} & React_2.RefAttributes<HTMLElement>>;
9090

91-
// @internal
91+
// @public
9292
export const MotionRefForwarderReset: React_2.FC<{
9393
children: React_2.ReactElement;
9494
}>;
@@ -189,7 +189,7 @@ export type PresenceMotionSlotProps<MotionParams extends Record<string, MotionPa
189189
}>;
190190
};
191191

192-
// @internal
192+
// @public
193193
export function useMotionForwardedRef(): React_2.Ref<HTMLElement> | undefined;
194194

195195
// @public (undocumented)

packages/react-components/react-motion/library/src/components/MotionRefForwarder.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ const MotionRefForwarderContext = React.createContext<React.Ref<HTMLElement> | u
77
/**
88
* A hook that reads the ref forwarded by `MotionRefForwarder` from context.
99
* Used in child components to merge the motion ref into the root slot ref.
10-
*
11-
* @internal
1210
*/
1311
export function useMotionForwardedRef(): React.Ref<HTMLElement> | undefined {
1412
return React.useContext(MotionRefForwarderContext);
@@ -18,8 +16,6 @@ export function useMotionForwardedRef(): React.Ref<HTMLElement> | undefined {
1816
* A component that forwards a ref to its children via a React context.
1917
* This is used to pass a motion component's ref through to the actual surface element,
2018
* since motion components wrap their children and the ref needs to reach the inner element.
21-
*
22-
* @internal
2319
*/
2420
export const MotionRefForwarder = React.forwardRef<HTMLElement, { children?: React.ReactElement }>((props, ref) => {
2521
return <MotionRefForwarderContext.Provider value={ref}>{props.children}</MotionRefForwarderContext.Provider>;
@@ -31,8 +27,6 @@ MotionRefForwarder.displayName = 'MotionRefForwarder';
3127
* Resets the MotionRefForwarder context to `undefined` for its children.
3228
* Render this in components that consume `useMotionForwardedRef()` and render
3329
* arbitrary user content, to prevent the context from leaking to descendants.
34-
*
35-
* @internal
3630
*/
3731
export const MotionRefForwarderReset: React.FC<{ children: React.ReactElement }> = props => {
3832
return <MotionRefForwarderContext.Provider value={undefined}>{props.children}</MotionRefForwarderContext.Provider>;

0 commit comments

Comments
 (0)