@block-auth.io/blockauth-sdk-react 0.2.4

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 (71) hide show
  1. package/README.md +93 -0
  2. package/dist/bundle.es.js +25 -0
  3. package/dist/bundle.es.js.map +1 -0
  4. package/dist/bundle.umd.js +11426 -0
  5. package/dist/bundle.umd.js.map +1 -0
  6. package/dist/components/FlowBlockAuth.d.ts +31 -0
  7. package/dist/components/btns/BtnBaseProvider.d.ts +10 -0
  8. package/dist/components/btns/BtnBlockAuth.d.ts +8 -0
  9. package/dist/components/btns/BtnGmail.d.ts +19 -0
  10. package/dist/components/btns/BtnGoogleBase.d.ts +32 -0
  11. package/dist/components/btns/BtnMetamask.d.ts +23 -0
  12. package/dist/components/btns/BtnMicrosoft.d.ts +20 -0
  13. package/dist/components/btns/BtnPhantom.d.ts +23 -0
  14. package/dist/components/btns/BtnSignin.d.ts +10 -0
  15. package/dist/components/btns/BtnWalletConnect.d.ts +32 -0
  16. package/dist/components/contents/ContentSignin.d.ts +5 -0
  17. package/dist/components/contents/ContentSignup.d.ts +76 -0
  18. package/dist/components/contents/ContentSignupEditable.d.ts +14 -0
  19. package/dist/components/dds/ChangeAccountComponent.d.ts +8 -0
  20. package/dist/components/dds/DropdownProfile.d.ts +26 -0
  21. package/dist/components/dds/DropdownProfileBtn.d.ts +12 -0
  22. package/dist/components/dds/DropdownProfileItem.d.ts +12 -0
  23. package/dist/components/editables/FiltersEditable.d.ts +16 -0
  24. package/dist/components/editables/ProvidersButtonsDnD.d.ts +6 -0
  25. package/dist/components/editables/ProvidersButtonsDnDItem.d.ts +12 -0
  26. package/dist/components/editables/ProvidersButtonsEditable.d.ts +11 -0
  27. package/dist/components/editables/WrapperEditables.d.ts +14 -0
  28. package/dist/components/modals/ModalSignin.d.ts +5 -0
  29. package/dist/components/modals/ModalSignup.d.ts +6 -0
  30. package/dist/components/sections/FooterSection.d.ts +8 -0
  31. package/dist/components/sections/LoginSection.d.ts +16 -0
  32. package/dist/components/sections/ProvidersSection.d.ts +21 -0
  33. package/dist/components/sections/internals/ProvidersButtons.d.ts +24 -0
  34. package/dist/components/sections/internals/ProvidersFilters.d.ts +28 -0
  35. package/dist/components/sections/internals/SelectedButton.d.ts +8 -0
  36. package/dist/components/txns/TxnsOverview.d.ts +5 -0
  37. package/dist/components/txns/internals/PermissionsRequiredModal.d.ts +4 -0
  38. package/dist/components/txns/internals/Txn.d.ts +22 -0
  39. package/dist/components/txns/internals/TxnError.d.ts +12 -0
  40. package/dist/components/txns/internals/TxnType.d.ts +8 -0
  41. package/dist/helpers/helperUI.d.ts +454 -0
  42. package/dist/hooks/useBlockAuthWs.d.ts +1 -0
  43. package/dist/hooks/useBlockAuthWsData.d.ts +1 -0
  44. package/dist/hooks/useRaisedShadow.d.ts +1 -0
  45. package/dist/index-C2iHITkO.js +131 -0
  46. package/dist/index-C2iHITkO.js.map +1 -0
  47. package/dist/index-DVru6tLI.js +300 -0
  48. package/dist/index-DVru6tLI.js.map +1 -0
  49. package/dist/main-BYFXzpCj.js +109272 -0
  50. package/dist/main-BYFXzpCj.js.map +1 -0
  51. package/dist/main.css +1 -0
  52. package/dist/main.d.ts +22 -0
  53. package/dist/output.css +2322 -0
  54. package/dist/services/BrowserBase.d.ts +41 -0
  55. package/dist/services/Metamask.d.ts +37 -0
  56. package/dist/services/Microsoft.d.ts +26 -0
  57. package/dist/services/Phantom.d.ts +11 -0
  58. package/dist/services/WalletConnect.d.ts +29 -0
  59. package/dist/stores/useStoreExtension.d.ts +13 -0
  60. package/dist/stores/useStoreGoogle.d.ts +1 -0
  61. package/dist/stores/useStoreMetamask.d.ts +1 -0
  62. package/dist/stores/useStoreMicrosoft.d.ts +1 -0
  63. package/dist/stores/useStoreModals.d.ts +12 -0
  64. package/dist/stores/useStorePhantom.d.ts +1 -0
  65. package/dist/stores/useStoreUI.d.ts +116 -0
  66. package/dist/stores/useStoreWS.d.ts +21 -0
  67. package/dist/stores/useStoreWeb3Providers.d.ts +1 -0
  68. package/dist/w3m-modal-Df7g4196.js +348 -0
  69. package/dist/w3m-modal-Df7g4196.js.map +1 -0
  70. package/package.json +175 -0
  71. package/public/output.css +2322 -0
package/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # blockauth-sdk-react
2
+
3
+ This is a SDK-react for the BlockAuth project. It is a React component library that uses the SDK
4
+ to interact with the BlockAuth smart contracts and Websocket server.
5
+
6
+ [![pipeline status](https://gitlab.com/blockauthio/blockauth-sdk-react/badges/main/pipeline.svg)](https://gitlab.com/blockauthio/blockauth-sdk-react/-/commits/main) [![coverage report](https://gitlab.com/blockauthio/blockauth-sdk-react/badges/main/coverage.svg)](https://gitlab.com/blockauthio/blockauth-sdk-react/-/commits/main) [![Latest Release](https://gitlab.com/blockauthio/blockauth-sdk-react/-/badges/release.svg)](https://gitlab.com/blockauthio/blockauth-sdk-react/-/releases)
7
+
8
+ # How to use?
9
+
10
+ Use the official documentation at [block-auth.io](https://docs.block-auth.io/) to learn how to use the SDK.
11
+
12
+ ### Connecting using credentials
13
+
14
+ After picking your preferred client, you are ready to make your first call to the Protocol SDK. Below is an example of how to connect your users with the BlockAuth SDK using React. We will focus the example over 2 main components FlowBlockAuth and DropdownProfile that will help you to connect your users with the BlockAuth SDK.
15
+
16
+ #### User actions 1/3: Click on button
17
+
18
+ Component which starts the sign in/sign up flows <FlowBlockAuth />
19
+
20
+ [![blockauth-sdk-react](https://docs.block-auth.io/_next/static/media/sdk_react_flowblockauth_step1.14adeb04.png)](https://docs.block-auth.io/_next/static/media/sdk_react_flowblockauth_step1.14adeb04.png)
21
+
22
+
23
+ #### User actions 2/3: Connect with a service
24
+
25
+ | before connect | after connect |
26
+ | :-------- | :------- |
27
+ | [![blockauth-sdk-react](https://docs.block-auth.io/_next/static/media/sdk_react_flowblockauth_step2.9ac3afba.png)](https://docs.block-auth.io/_next/static/media/sdk_react_flowblockauth_step2.9ac3afba.png) | [![blockauth-sdk-react](https://docs.block-auth.io/_next/static/media/sdk_react_flowblockauth_step3.bd76b771.png)](https://docs.block-auth.io/_next/static/media/sdk_react_flowblockauth_step3.bd76b771.png) |
28
+
29
+ #### User actions 3/3: Authorize Log In
30
+
31
+ Component which shows the user profile and allows to log out <DropdownProfile />
32
+
33
+ [![blockauth-sdk-react](https://docs.block-auth.io/_next/static/media/sdk_react_flowblockauth_step4.dcc2a678.png)](https://docs.block-auth.io/_next/static/media/sdk_react_flowblockauth_step4.dcc2a678.png)
34
+
35
+ ## Development
36
+
37
+ Install dependencies
38
+
39
+ ```bash
40
+ npm install
41
+ ```
42
+
43
+ CI/CD
44
+
45
+ ```bash
46
+ npm run ci
47
+ ```
48
+
49
+
50
+ Start the development server
51
+
52
+ ```bash
53
+ npm run dev
54
+ ```
55
+
56
+
57
+ After making changes to the code, run the following command to format the code, run the linter, and start the development server:
58
+
59
+ ```bash
60
+ npm run css && npm run lint && npm run format && npm run dev
61
+ ```
62
+
63
+
64
+ ## NPM Scripts
65
+
66
+ | Script | Description |
67
+ | :-------- | :------- |
68
+ | `dev` | Starts the development server |
69
+ | `css` | Builds the CSS |
70
+ | `css:dev` | Builds the CSS in development mode |
71
+ | `test` | Runs the tests and generates a coverage report |
72
+ | `lint` | Runs the linter |
73
+ | `lint:fix` | Runs the linter and fixes the errors |
74
+ | `format` | Formats the code |
75
+ | `build` | Builds the app for production |
76
+ | `preview` | Builds the app for production and previews it locally |
77
+ | `ci` | Runs the tests, linter, and code formatter |
78
+ | `stories` | Starts the Storybook server |
79
+ | `stories:build` | Builds the Storybook app for production |
80
+ | `docs` | Starts the documentation server |
81
+ | `docs:build` | Builds the documentation app for production |
82
+ | `clean` | Removes `dist`, `dist-stories`, `dist-docs`, `package-lock.json`, `.coverage` and `node_modules` |
83
+
84
+
85
+ ## NPM Publish
86
+
87
+ ```bash
88
+ yarn publish
89
+ ```
90
+
91
+ ## Authors
92
+
93
+ Block-Auth.io Team
@@ -0,0 +1,25 @@
1
+ import { aS, aT, aU, aV, aR, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b7, b6, b8, b9 } from "./main-BYFXzpCj.js";
2
+ export {
3
+ aS as BtnGmail,
4
+ aT as BtnMetamask,
5
+ aU as BtnMicrosoft,
6
+ aV as BtnPhantom,
7
+ aR as BtnSignin,
8
+ aW as ContentSignin,
9
+ aX as ContentSignup,
10
+ aY as ContentSignupEditable,
11
+ aZ as DropdownProfile,
12
+ a_ as FlowBlockAuth,
13
+ a$ as cleanUrl,
14
+ b0 as getIp,
15
+ b1 as isValidImgUrl,
16
+ b2 as secsToText,
17
+ b3 as useStoreGoogle,
18
+ b4 as useStoreMetamask,
19
+ b5 as useStoreMicrosoft,
20
+ b7 as useStoreModals,
21
+ b6 as useStorePhantom,
22
+ b8 as useStoreUI,
23
+ b9 as useStoreWS
24
+ };
25
+ //# sourceMappingURL=bundle.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}