@worldcoin/idkit 0.0.1
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.
- package/README.md +35 -0
- package/build/components/Button.d.ts +3 -0
- package/build/components/CountryCodeSelect.d.ts +6 -0
- package/build/components/Frame.d.ts +4 -0
- package/build/components/IDKitWidget/BaseWidget.d.ts +9 -0
- package/build/components/IDKitWidget/States/AboutState.d.ts +2 -0
- package/build/components/IDKitWidget/States/EnterPhoneState.d.ts +2 -0
- package/build/components/IDKitWidget/States/ErrorState.d.ts +2 -0
- package/build/components/IDKitWidget/States/SuccessState.d.ts +2 -0
- package/build/components/IDKitWidget/States/VerifyCodeState.d.ts +2 -0
- package/build/components/IDKitWidget/States/WorldIDState.d.ts +2 -0
- package/build/components/IDKitWidget/index.d.ts +7 -0
- package/build/components/Icons/LoadingIcon.d.ts +4 -0
- package/build/components/Icons/QuestionMarkIcon.d.ts +4 -0
- package/build/components/Icons/WorldIDQR.d.ts +4 -0
- package/build/components/Icons/WorldIDWordmark.d.ts +4 -0
- package/build/components/PhoneInput.d.ts +6 -0
- package/build/components/ResendButton.d.ts +3 -0
- package/build/components/SMSCodeInput.d.ts +6 -0
- package/build/components/WorldIDIcon.d.ts +6 -0
- package/build/hooks/useIDKit.d.ts +6 -0
- package/build/idkit-js.js +113 -0
- package/build/index.css +2 -0
- package/build/index.d.ts +6 -0
- package/build/index.js +3 -0
- package/build/index.js.map +7 -0
- package/build/lib/utils.d.ts +1 -0
- package/build/services/phone.d.ts +18 -0
- package/build/store/idkit.d.ts +29 -0
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/types/config.d.ts +19 -0
- package/build/types/index.d.ts +30 -0
- package/build/vanilla.d.ts +12 -0
- package/package.json +102 -0
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# IDKit JS Widget
|
|
2
|
+
|
|
3
|
+
This folder (`/idkit`) contains the main code for the widget. For instructions on **how to use the widget**, please refer to the repository's main [README](/README.md).
|
|
4
|
+
|
|
5
|
+
## ℹ️ About the codebase
|
|
6
|
+
|
|
7
|
+
- The widget is made to work mainly with vanilla JS code (no framework required). The starting point can be found in `src/vanilla.tsx`.
|
|
8
|
+
- The React wrapper is found on `src/components/IDKitWidget/index.ts`.
|
|
9
|
+
|
|
10
|
+
## 🧑💻 Development & testing
|
|
11
|
+
|
|
12
|
+
To develop locally and contribute to this package, you can simply follow these instructions after cloning the repo.
|
|
13
|
+
|
|
14
|
+
- Install dependencies
|
|
15
|
+
```bash
|
|
16
|
+
# be sure to run this in the root folder of the repo
|
|
17
|
+
yarn install
|
|
18
|
+
```
|
|
19
|
+
- Run tests
|
|
20
|
+
```bash
|
|
21
|
+
# runs in the /idkit folder
|
|
22
|
+
cd idkit/
|
|
23
|
+
yarn test
|
|
24
|
+
```
|
|
25
|
+
- Run local test project
|
|
26
|
+
```bash
|
|
27
|
+
# runs in the /idkit folder
|
|
28
|
+
yarn dev
|
|
29
|
+
```
|
|
30
|
+
- Open browser at `http://localhost:3000`
|
|
31
|
+
- To build the production bundle you can simply run.
|
|
32
|
+
```bash
|
|
33
|
+
# runs in the /idkit folder
|
|
34
|
+
yarn build
|
|
35
|
+
```
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DetailedHTMLProps, ImgHTMLAttributes } from 'react';
|
|
2
|
+
type Props = DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> & {
|
|
3
|
+
border?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const WorldIDIcon: ({ border, ...props }: Props) => JSX.Element;
|
|
6
|
+
export default WorldIDIcon;
|