Skip to content

Commit

Permalink
Merge pull request #309 from mediamonks/task/separate-entries-for-gsa…
Browse files Browse the repository at this point in the history
…p-nextjs

Create separate entries for gsap and nextjs
  • Loading branch information
leroykorterink authored Feb 16, 2024
2 parents 98bbbb9 + 8cffb0c commit 433f103
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 433f103

Please sign in to comment.