image-dropzone 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +0 -0
- package/README.md +1 -0
- package/dist/cjs/components/App.d.ts +6 -0
- package/dist/cjs/components/App.js +22 -0
- package/dist/cjs/components/App.js.map +1 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/components/App.d.ts +6 -0
- package/dist/esm/components/App.js +19 -0
- package/dist/esm/components/App.js.map +1 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/package.json +61 -0
package/LICENSE
ADDED
File without changes
|
package/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# image-dropzone-typescript-package
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
var tslib_1 = require("tslib");
|
4
|
+
var react_1 = tslib_1.__importStar(require("react"));
|
5
|
+
var MyCounter = function (_a) {
|
6
|
+
var _b = _a.value, value = _b === void 0 ? 0 : _b;
|
7
|
+
var _c = (0, react_1.useState)(value), counter = _c[0], setCounter = _c[1];
|
8
|
+
var onMinus = function () {
|
9
|
+
setCounter(function (prev) { return prev - 1; });
|
10
|
+
};
|
11
|
+
var onPlus = function () {
|
12
|
+
setCounter(function (prev) { return prev + 1; });
|
13
|
+
};
|
14
|
+
return (react_1.default.createElement("div", null,
|
15
|
+
react_1.default.createElement("h1", null,
|
16
|
+
"Counter: ",
|
17
|
+
counter),
|
18
|
+
react_1.default.createElement("button", { onClick: onMinus }, "-"),
|
19
|
+
react_1.default.createElement("button", { onClick: onPlus }, "+")));
|
20
|
+
};
|
21
|
+
exports.default = MyCounter;
|
22
|
+
//# sourceMappingURL=App.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../../../src/components/App.tsx"],"names":[],"mappings":";;;AAAA,qDAAuC;AAKvC,IAAM,SAAS,GAAG,UAAC,EAAoB;QAAlB,aAAS,EAAT,KAAK,mBAAG,CAAC,KAAA;IACtB,IAAA,KAAwB,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAAtC,OAAO,QAAA,EAAE,UAAU,QAAmB,CAAA;IAE7C,IAAM,OAAO,GAAG;QACd,UAAU,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,GAAG,CAAC,EAAR,CAAQ,CAAC,CAAA;IAChC,CAAC,CAAA;IAED,IAAM,MAAM,GAAG;QACb,UAAU,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,GAAG,CAAC,EAAR,CAAQ,CAAC,CAAA;IAChC,CAAC,CAAA;IAED,OAAO,CACL;QACE;;YAAc,OAAO,CAAM;QAC3B,0CAAQ,OAAO,EAAE,OAAO,QAAY;QACpC,0CAAQ,OAAO,EAAE,MAAM,QAAY,CAC/B,CACP,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,SAAS,CAAA"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.MyCounter = void 0;
|
4
|
+
var tslib_1 = require("tslib");
|
5
|
+
var App_1 = tslib_1.__importDefault(require("./components/App"));
|
6
|
+
exports.MyCounter = App_1.default;
|
7
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,iEAAwC;AAE/B,oBAFF,aAAS,CAEE"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import React, { useState } from 'react';
|
2
|
+
var MyCounter = function (_a) {
|
3
|
+
var _b = _a.value, value = _b === void 0 ? 0 : _b;
|
4
|
+
var _c = useState(value), counter = _c[0], setCounter = _c[1];
|
5
|
+
var onMinus = function () {
|
6
|
+
setCounter(function (prev) { return prev - 1; });
|
7
|
+
};
|
8
|
+
var onPlus = function () {
|
9
|
+
setCounter(function (prev) { return prev + 1; });
|
10
|
+
};
|
11
|
+
return (React.createElement("div", null,
|
12
|
+
React.createElement("h1", null,
|
13
|
+
"Counter: ",
|
14
|
+
counter),
|
15
|
+
React.createElement("button", { onClick: onMinus }, "-"),
|
16
|
+
React.createElement("button", { onClick: onPlus }, "+")));
|
17
|
+
};
|
18
|
+
export default MyCounter;
|
19
|
+
//# sourceMappingURL=App.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../../../src/components/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAKvC,IAAM,SAAS,GAAG,UAAC,EAAoB;QAAlB,aAAS,EAAT,KAAK,mBAAG,CAAC,KAAA;IACtB,IAAA,KAAwB,QAAQ,CAAC,KAAK,CAAC,EAAtC,OAAO,QAAA,EAAE,UAAU,QAAmB,CAAA;IAE7C,IAAM,OAAO,GAAG;QACd,UAAU,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,GAAG,CAAC,EAAR,CAAQ,CAAC,CAAA;IAChC,CAAC,CAAA;IAED,IAAM,MAAM,GAAG;QACb,UAAU,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,GAAG,CAAC,EAAR,CAAQ,CAAC,CAAA;IAChC,CAAC,CAAA;IAED,OAAO,CACL;QACE;;YAAc,OAAO,CAAM;QAC3B,gCAAQ,OAAO,EAAE,OAAO,QAAY;QACpC,gCAAQ,OAAO,EAAE,MAAM,QAAY,CAC/B,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,SAAS,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,kBAAkB,CAAA;AAExC,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
package/package.json
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
{
|
2
|
+
"name": "image-dropzone",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "./dist/cjs/index.js",
|
6
|
+
"module": "./dist/esm/index.js",
|
7
|
+
"types": "./dist/esm/index.d.ts",
|
8
|
+
"scripts": {
|
9
|
+
"build": "yarn build:esm && yarn build:cjs",
|
10
|
+
"build:esm": "tsc",
|
11
|
+
"build:cjs": "tsc --module commonjs --outDir dist/cjs",
|
12
|
+
"lint": "eslint \"{**/*,*}.{js,ts,jsx,tsx}\"",
|
13
|
+
"prettier": "prettier --write \"{src,tests,example/src}/**/*.{js,ts,jsx,tsx}\"",
|
14
|
+
"test": "jest --config jestconfig.json",
|
15
|
+
"prepare": "npm run build",
|
16
|
+
"prepublishOnly": "npm test && npm run prettier && npm run lint"
|
17
|
+
},
|
18
|
+
"repository": {
|
19
|
+
"type": "git",
|
20
|
+
"url": "git+https://github.com/NavjotKaur01/image-dropzone.git"
|
21
|
+
},
|
22
|
+
"files": [
|
23
|
+
"dist",
|
24
|
+
"LICENSE",
|
25
|
+
"README.md"
|
26
|
+
],
|
27
|
+
"keywords": [
|
28
|
+
"react",
|
29
|
+
"typescript",
|
30
|
+
"image-dropzone"
|
31
|
+
],
|
32
|
+
"author": "Tushar Raj",
|
33
|
+
"license": "ISC",
|
34
|
+
"bugs": {
|
35
|
+
"url": "https://github.com/NavjotKaur01/image-dropzone/issues"
|
36
|
+
},
|
37
|
+
"homepage": "https://github.com/NavjotKaur01/image-dropzone#readme",
|
38
|
+
"devDependencies": {
|
39
|
+
"@testing-library/react": "^14.0.0",
|
40
|
+
"@types/jest": "^29.5.2",
|
41
|
+
"@types/react": "^18.2.14",
|
42
|
+
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
43
|
+
"@typescript-eslint/parser": "^5.60.0",
|
44
|
+
"eslint": "^8.43.0",
|
45
|
+
"eslint-config-prettier": "^8.8.0",
|
46
|
+
"eslint-plugin-prettier": "^4.2.1",
|
47
|
+
"eslint-plugin-react": "^7.32.2",
|
48
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
49
|
+
"jest": "^29.5.0",
|
50
|
+
"jest-canvas-mock": "^2.5.1",
|
51
|
+
"jest-environment-jsdom": "^29.5.0",
|
52
|
+
"prettier": "^2.8.8",
|
53
|
+
"react": "^18.2.0",
|
54
|
+
"react-dom": "^18.2.0",
|
55
|
+
"ts-jest": "^29.1.0",
|
56
|
+
"typescript": "^5.1.3"
|
57
|
+
},
|
58
|
+
"peerDependencies": {
|
59
|
+
"react": ">=16"
|
60
|
+
}
|
61
|
+
}
|