@valuepay/react 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/LICENSE +21 -0
  3. package/README.md +435 -0
  4. package/dist/cjs/components/ValuePayButton.js +14 -0
  5. package/dist/cjs/components/ValuePayButton.js.map +1 -0
  6. package/dist/cjs/components/ValuePayProvider.js +17 -0
  7. package/dist/cjs/components/ValuePayProvider.js.map +1 -0
  8. package/dist/cjs/hooks/useScript.js +40 -0
  9. package/dist/cjs/hooks/useScript.js.map +1 -0
  10. package/dist/cjs/hooks/useValuePay.js +90 -0
  11. package/dist/cjs/hooks/useValuePay.js.map +1 -0
  12. package/dist/cjs/index.js +16 -0
  13. package/dist/cjs/index.js.map +1 -0
  14. package/dist/cjs/utils/constants.js +12 -0
  15. package/dist/cjs/utils/constants.js.map +1 -0
  16. package/dist/cjs/utils/helpers.js +67 -0
  17. package/dist/cjs/utils/helpers.js.map +1 -0
  18. package/dist/esm/components/ValuePayButton.js +12 -0
  19. package/dist/esm/components/ValuePayButton.js.map +1 -0
  20. package/dist/esm/components/ValuePayProvider.js +15 -0
  21. package/dist/esm/components/ValuePayProvider.js.map +1 -0
  22. package/dist/esm/hooks/useScript.js +38 -0
  23. package/dist/esm/hooks/useScript.js.map +1 -0
  24. package/dist/esm/hooks/useValuePay.js +88 -0
  25. package/dist/esm/hooks/useValuePay.js.map +1 -0
  26. package/dist/esm/index.js +6 -0
  27. package/dist/esm/index.js.map +1 -0
  28. package/dist/esm/utils/constants.js +7 -0
  29. package/dist/esm/utils/constants.js.map +1 -0
  30. package/dist/esm/utils/helpers.js +63 -0
  31. package/dist/esm/utils/helpers.js.map +1 -0
  32. package/dist/types/components/ValuePayButton.d.ts +3 -0
  33. package/dist/types/components/ValuePayProvider.d.ts +2 -0
  34. package/dist/types/hooks/useScript.d.ts +5 -0
  35. package/dist/types/hooks/useValuePay.d.ts +2 -0
  36. package/dist/types/index.d.ts +6 -0
  37. package/dist/types/types/index.d.ts +74 -0
  38. package/dist/types/utils/constants.d.ts +5 -0
  39. package/dist/types/utils/helpers.d.ts +32 -0
  40. package/package.json +84 -0
package/package.json ADDED
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "@valuepay/react",
3
+ "version": "1.0.0",
4
+ "description": "Official React SDK for ValuePay payment gateway",
5
+ "author": "Value Payment Solutions Limited",
6
+ "license": "MIT",
7
+ "main": "dist/cjs/index.js",
8
+ "module": "dist/esm/index.js",
9
+ "types": "dist/types/index.d.ts",
10
+ "files": ["dist", "README.md", "LICENSE", "CHANGELOG.md"],
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/esm/index.js",
14
+ "require": "./dist/cjs/index.js",
15
+ "types": "./dist/types/index.d.ts"
16
+ }
17
+ },
18
+ "sideEffects": false,
19
+ "scripts": {
20
+ "build": "rollup -c rollup.config.mjs && tsc -p tsconfig.build.json",
21
+ "test": "jest",
22
+ "test:watch": "jest --watch",
23
+ "test:coverage": "jest --coverage",
24
+ "lint": "eslint src/ __tests__/",
25
+ "lint:fix": "eslint src/ __tests__/ --fix",
26
+ "format": "prettier --write 'src/**/*.{ts,tsx}' '__tests__/**/*.{ts,tsx}'",
27
+ "typecheck": "tsc --noEmit",
28
+ "prepublishOnly": "npm run lint && npm run typecheck && npm run test && npm run build",
29
+ "release": "npm run prepublishOnly && npm publish --access public"
30
+ },
31
+ "peerDependencies": {
32
+ "react": ">=16.8.0",
33
+ "react-dom": ">=16.8.0"
34
+ },
35
+ "devDependencies": {
36
+ "typescript": "^5.7.3",
37
+ "rollup": "^4.30.1",
38
+ "@rollup/plugin-typescript": "^12.1.2",
39
+ "@rollup/plugin-commonjs": "^28.0.2",
40
+ "@rollup/plugin-node-resolve": "^16.0.0",
41
+ "rollup-plugin-peer-deps-external": "^2.2.4",
42
+ "tslib": "^2.8.1",
43
+ "jest": "^29.7.0",
44
+ "ts-jest": "^29.2.5",
45
+ "jest-environment-jsdom": "^29.7.0",
46
+ "@testing-library/react": "^16.1.0",
47
+ "@testing-library/jest-dom": "^6.6.3",
48
+ "@testing-library/user-event": "^14.5.2",
49
+ "@types/jest": "^29.5.14",
50
+ "@types/react": "^18.3.18",
51
+ "@types/react-dom": "^18.3.5",
52
+ "eslint": "^8.57.1",
53
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
54
+ "@typescript-eslint/parser": "^6.21.0",
55
+ "eslint-plugin-react": "^7.37.3",
56
+ "eslint-plugin-react-hooks": "^4.6.2",
57
+ "prettier": "^3.4.2",
58
+ "react": "^18.3.1",
59
+ "react-dom": "^18.3.1"
60
+ },
61
+ "keywords": [
62
+ "valuepay",
63
+ "react",
64
+ "payment",
65
+ "payment-gateway",
66
+ "checkout",
67
+ "nigeria",
68
+ "ngn",
69
+ "naira",
70
+ "fintech",
71
+ "sdk"
72
+ ],
73
+ "repository": {
74
+ "type": "git",
75
+ "url": "https://github.com/valuepayment/react-sdk.git"
76
+ },
77
+ "homepage": "https://developer.valuepayng.com",
78
+ "bugs": {
79
+ "url": "https://github.com/valuepayment/react-sdk/issues"
80
+ },
81
+ "engines": {
82
+ "node": ">=16.0.0"
83
+ }
84
+ }