Skip to content

Commit

Permalink
Create separate entries for gsap and nextjs
Browse files Browse the repository at this point in the history
  • Loading branch information
leroykorterink committed Feb 16, 2024
1 parent 98bbbb9 commit 8cffb0c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"types": "./dist/index.d.ts",
"module": "./dist/index.js",
"exports": {
".": "./dist/index.js"
".": "./dist/index.js",
"./gsap": "./dist/gsap.js",
"./nextjs": "./dist/nextjs.js"
},
"type": "module",
"files": [
Expand Down
8 changes: 8 additions & 0 deletions src/gsap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export * from './gsap/components/SplitTextWrapper/SplitTextWrapper.js';
export * from './gsap/hooks/useAnimation/useAnimation.js';
export * from './gsap/hooks/useExposeAnimation/useExposeAnimation.js';
export * from './gsap/hooks/useExposedAnimation/useExposedAnimation.js';
export * from './gsap/hooks/useExposedAnimations/useExposedAnimations.js';
export * from './gsap/hooks/useFlip/useFlip.js';
export * from './gsap/hooks/useScrollAnimation/useScrollAnimation.js';
export * from './gsap/utils/getAnimation/getAnimation.js';
22 changes: 4 additions & 18 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
/* PLOP_ADD_EXPORT */
export * from './components/AutoAdjustFontSize/AutoAdjustFontSize.js';
export * from './components/AutoFill/AutoFill.js';
export * from './gsap/components/SplitTextWrapper/SplitTextWrapper.js';
export * from './gsap/hooks/useAnimation/useAnimation.js';
export * from './gsap/hooks/useExposeAnimation/useExposeAnimation.js';
export * from './gsap/hooks/useExposedAnimation/useExposedAnimation.js';
export * from './gsap/hooks/useExposedAnimations/useExposedAnimations.js';
export * from './gsap/hooks/useFlip/useFlip.js';
export * from './gsap/hooks/useScrollAnimation/useScrollAnimation.js';
export * from './gsap/utils/getAnimation/getAnimation.js';
export * from './hocs/ensuredForwardRef/ensuredForwardRef.js';
export * from './hooks/useClientSideValue/useClientSideValue.js';
export * from './hooks/useContentRect/useContentRect.js';
Expand All @@ -32,24 +24,18 @@ export * from './hooks/useRefs/utils/validateAndUnwrapRefs/validateAndUnwrapRefs
export * from './hooks/useResizeObserver/useResizeObserver.js';
export * from './hooks/useStaticValue/useStaticValue.js';
export * from './hooks/useToggle/useToggle.js';
export * from './lifecycle/components/CrossFlow/CrossFlow.js';
export * from './lifecycle/components/TransitionPresence/TransitionPresence.context.js';
export * from './lifecycle/components/TransitionPresence/TransitionPresence.js';
export * from './lifecycle/hooks/useBeforeMount/useBeforeMount.js';
export * from './lifecycle/hooks/useBeforeUnmount/useBeforeUnmount.js';
export * from './lifecycle/hooks/useIsMounted/useIsMounted.js';
export * from './lifecycle/hooks/useIsMountedState/useIsMountedState.js';
export * from './lifecycle/hooks/useMount/useMount.js';
export * from './lifecycle/hooks/useUnmount/useUnmount.js';
export * from './nextjs/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js';
export * from './types/PolymorphicComponentProps/PolymorphicComponentProps.js';
export * from './utils/adjustFontSize/adjustFontSize.js';
export * from './utils/arrayRef/arrayRef.js';
export * from './utils/createTimeout/createTimeout.js';
export * from './utils/isRefObject/isRefObject.js';
export * from './utils/unref/unref.js';

// Custom exports for external use only
export { CrossFlow } from './lifecycle/components/CrossFlow/CrossFlow.js';
export { TransitionPresenceContext } from './lifecycle/components/TransitionPresence/TransitionPresence.context.js';
export { TransitionPresence } from './lifecycle/components/TransitionPresence/TransitionPresence.js';
export {
useBeforeUnmount,
type BeforeUnmountCallback,
} from './lifecycle/hooks/useBeforeUnmount/useBeforeUnmount.js';
1 change: 1 addition & 0 deletions src/nextjs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './nextjs/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js';

0 comments on commit 8cffb0c

Please sign in to comment.