Skip to content

Commit 493a657

Browse files
committed
fix: declaration file
1 parent b7a7233 commit 493a657

File tree

6 files changed

+85
-26
lines changed

6 files changed

+85
-26
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.md

@types/index.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

package.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"readme": "https://github.com/ahmnouira/ionic-react-header-parallax.git#redme",
1515
"homepage": "https://github.com/ahmnouira/ionic-react-header-parallax",
1616
"keywords": [
17-
"ionic"
17+
"ionic",
18+
"parallax"
1819
],
1920
"contributors": [
2021
{
@@ -26,10 +27,11 @@
2627
"url": "https://github.com/ahmnouira/ionic-react-header-parallax.git/issues"
2728
},
2829
"files": [
29-
"dist/"
30+
"dist/",
31+
"src/index.d.ts"
3032
],
3133
"main": "dist/index.js",
32-
"types": "@types/index.ts",
34+
"types": "src/index.d.ts",
3335
"scripts": {
3436
"build": "tsc",
3537
"test": "jest",
@@ -52,6 +54,7 @@
5254
"@types/jest": "^27.0.1",
5355
"@types/node": "^16.6.1",
5456
"@types/react": "^17.0.18",
57+
"auto-changelog": "^2.3.0",
5558
"eslint": "^7.32.0",
5659
"jest": "^27.0.6",
5760
"np": "^7.5.0",
@@ -61,10 +64,12 @@
6164
"rimraf": "^3.0.2",
6265
"ts-jest": "^27.0.5",
6366
"ts-node": "^10.2.0",
64-
"typescript": "^4.3.5",
65-
"yarn": "^1.22.11"
67+
"typescript": "^4.3.5"
6668
},
6769
"publishConfig": {
6870
"registry": "https://registry.npmjs.org"
71+
},
72+
"dependencies": {
73+
"ionic-react-header-parallax": "^0.0.5"
6974
}
7075
}

src/index.d.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export type UseIonHeaderParallxInput = {
2+
image: string
3+
expandedColor: string
4+
titleColor: string
5+
maximumHeight?: number
6+
}
7+
8+
export type UseIonHeaderParallxInputResult = {
9+
ref: React.MutableRefObject<HTMLElement | null>
10+
}
11+
12+
13+
export function useIonHeaderParallax(input: UseIonHeaderParallxInput): UseIonHeaderParallxInputResult;
14+
15+

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// "allowJs": true, /* Allow javascript files to be compiled. */
1010
// "checkJs": true, /* Report errors in .js files. */
1111
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
12-
"declaration": false /* Generates corresponding '.d.ts' file. */,
1312
"declarationMap": false /* Generates a sourcemap for each corresponding '.d.ts' file. */,
1413
"sourceMap": false /* Generates corresponding '.map' file. */,
1514
// "outFile": "./", /* Concatenate and emit output to single file. */
@@ -70,6 +69,6 @@
7069
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
7170
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
7271
},
73-
"include": ["src", "@types"],
72+
"include": ["src"],
7473
"exclude": ["node_modules", "src/**/*.spec.tsx", "src/**/*.spec.ts"]
7574
}

yarn.lock

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,6 +1689,17 @@ asynckit@^0.4.0:
16891689
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
16901690
integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
16911691

1692+
auto-changelog@^2.3.0:
1693+
version "2.3.0"
1694+
resolved "https://registry.yarnpkg.com/auto-changelog/-/auto-changelog-2.3.0.tgz#08ab8b1840a5d804410f1d1a5d2c4b2df0d835e1"
1695+
integrity sha512-S2B+RtTgytsa7l5iFGBoWT9W9ylITT5JJ8OaMJ7nrwvnlRm1dSS2tghaYueDeInZZafOE+1llH3tUQjMDRVS1g==
1696+
dependencies:
1697+
commander "^5.0.0"
1698+
handlebars "^4.7.3"
1699+
node-fetch "^2.6.0"
1700+
parse-github-url "^1.0.2"
1701+
semver "^6.3.0"
1702+
16921703
babel-jest@^27.0.6:
16931704
version "27.0.6"
16941705
resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.6.tgz#e99c6e0577da2655118e3608b68761a5a69bd0d8"
@@ -2088,6 +2099,11 @@ combined-stream@^1.0.8:
20882099
dependencies:
20892100
delayed-stream "~1.0.0"
20902101

2102+
commander@^5.0.0:
2103+
version "5.1.0"
2104+
resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae"
2105+
integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==
2106+
20912107
concat-map@0.0.1:
20922108
version "0.0.1"
20932109
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
@@ -2871,6 +2887,18 @@ graceful-fs@^4.1.2, graceful-fs@^4.2.4:
28712887
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a"
28722888
integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==
28732889

2890+
handlebars@^4.7.3:
2891+
version "4.7.7"
2892+
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1"
2893+
integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==
2894+
dependencies:
2895+
minimist "^1.2.5"
2896+
neo-async "^2.6.0"
2897+
source-map "^0.6.1"
2898+
wordwrap "^1.0.0"
2899+
optionalDependencies:
2900+
uglify-js "^3.1.4"
2901+
28742902
hard-rejection@^2.1.0:
28752903
version "2.1.0"
28762904
resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883"
@@ -3103,6 +3131,11 @@ inquirer@^7.0.0, inquirer@^7.3.3:
31033131
strip-ansi "^6.0.0"
31043132
through "^2.3.6"
31053133

3134+
ionic-react-header-parallax@^0.0.5:
3135+
version "0.0.5"
3136+
resolved "https://registry.yarnpkg.com/ionic-react-header-parallax/-/ionic-react-header-parallax-0.0.5.tgz#2c5f1438dac0d16784ec4c574b3d4471cd27b352"
3137+
integrity sha512-jI9cZnL5VyaMfISdEcajT+sJbti5RKWFYUYznWtnk7q17sUbBw+ig/y8wJdajBgjd84nNNmZoxpw218GedKyGQ==
3138+
31063139
is-arrayish@^0.2.1:
31073140
version "0.2.1"
31083141
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
@@ -4208,13 +4241,23 @@ natural-compare@^1.4.0:
42084241
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
42094242
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
42104243

4244+
neo-async@^2.6.0:
4245+
version "2.6.2"
4246+
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
4247+
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
4248+
42114249
new-github-release-url@^1.0.0:
42124250
version "1.0.0"
42134251
resolved "https://registry.yarnpkg.com/new-github-release-url/-/new-github-release-url-1.0.0.tgz#493847e6fecce39c247e9d89929be773d2e7f777"
42144252
integrity sha512-dle7yf655IMjyFUqn6Nxkb18r4AOAkzRcgcZv6WZ0IqrOH4QCEZ8Sm6I7XX21zvHdBeeMeTkhR9qT2Z0EJDx6A==
42154253
dependencies:
42164254
type-fest "^0.4.1"
42174255

4256+
node-fetch@^2.6.0:
4257+
version "2.6.1"
4258+
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
4259+
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
4260+
42184261
node-int64@^0.4.0:
42194262
version "0.4.0"
42204263
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
@@ -4558,6 +4601,11 @@ parent-module@^1.0.0:
45584601
dependencies:
45594602
callsites "^3.0.0"
45604603

4604+
parse-github-url@^1.0.2:
4605+
version "1.0.2"
4606+
resolved "https://registry.yarnpkg.com/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395"
4607+
integrity sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==
4608+
45614609
parse-json@^5.0.0:
45624610
version "5.2.0"
45634611
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd"
@@ -5441,6 +5489,11 @@ typescript@^4.3.5:
54415489
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4"
54425490
integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==
54435491

5492+
uglify-js@^3.1.4:
5493+
version "3.14.1"
5494+
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.14.1.tgz#e2cb9fe34db9cb4cf7e35d1d26dfea28e09a7d06"
5495+
integrity sha512-JhS3hmcVaXlp/xSo3PKY5R0JqKs5M3IV+exdLHW99qKvKivPO4Z8qbej6mte17SOPqAOVMjt/XGgWacnFSzM3g==
5496+
54445497
unicode-canonical-property-names-ecmascript@^1.0.4:
54455498
version "1.0.4"
54465499
resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818"
@@ -5615,6 +5668,11 @@ word-wrap@^1.2.3, word-wrap@~1.2.3:
56155668
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
56165669
integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
56175670

5671+
wordwrap@^1.0.0:
5672+
version "1.0.0"
5673+
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
5674+
integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=
5675+
56185676
wrap-ansi@^3.0.1:
56195677
version "3.0.1"
56205678
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba"
@@ -5700,11 +5758,6 @@ yargs@^16.0.3:
57005758
y18n "^5.0.5"
57015759
yargs-parser "^20.2.2"
57025760

5703-
yarn@^1.22.11:
5704-
version "1.22.11"
5705-
resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.22.11.tgz#d0104043e7349046e0e2aec977c24be106925ed6"
5706-
integrity sha512-AWje4bzqO9RUn3sdnM5N8n4ZJ0BqCc/kqFJvpOI5/EVkINXui0yuvU7NDCEF//+WaxHuNay2uOHxA4+tq1P3cg==
5707-
57085761
yn@3.1.1:
57095762
version "3.1.1"
57105763
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"

0 commit comments

Comments
 (0)