Skip to content

Commit

Permalink
fix: nest types decalration inside export require, and import
Browse files Browse the repository at this point in the history
  • Loading branch information
HamzaAmar committed Sep 10, 2024
1 parent fbdcc3f commit 7559f0f
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 130 deletions.
2 changes: 1 addition & 1 deletion apps/docs/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions packages/pillar-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@
"homepage": "https://www.pillar-ui.com/",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"./main.css": "./css/main.css"
},
Expand Down Expand Up @@ -58,13 +63,14 @@
"type:check": "tsc --noEmit"
},
"peerDependencies": {
"@pillar-ui/hooks": "^0.7.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"dependencies": {
"@pillar-ui/hooks": "^0.7.0"
},
"devDependencies": {
"@pillar-ui/eslint": "*",
"@pillar-ui/hooks": "^0.7.0",
"@pillar-ui/tsconfig": "*",
"@types/node": "^22.5.3",
"@types/react": "^18.3.3",
Expand Down
11 changes: 8 additions & 3 deletions packages/pillar-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@
"bugs": "https://github.com/HamzaAmar/pillar-ui/issues",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/pillar-hooks/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export { useDimension, type ElementSize } from './useDimension'
export { useDirection } from './useDirection'
export { useEventListener } from './useEventListener'
export { useFullscreen, type DocumentElementType, type DocumentType } from './useFullscreen'
export { useGeolocation, type GeolocationState } from './useGeolocation'
// export { useGeolocation, type GeolocationState } from './useGeolocation'
export { useHover } from './useHover'
export { useIntersectionObserver } from './useIntersectionObserver'
export { useInterval } from './useInterval'
Expand Down
116 changes: 0 additions & 116 deletions packages/pillar-hooks/src/useGeolocation/index.ts

This file was deleted.

11 changes: 8 additions & 3 deletions packages/pillar-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3045,7 +3045,6 @@ __metadata:
tsup: "npm:^8.2.4"
typescript: "npm:^5.5.4"
peerDependencies:
"@pillar-ui/hooks": ^0.7.0
react: ^18.0.0
react-dom: ^18.0.0
languageName: unknown
Expand Down

0 comments on commit 7559f0f

Please sign in to comment.