@worldcoin/idkit 1.1.4 → 1.2.2

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.
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import * as zustand_traditional from 'zustand/traditional';
3
- import * as zustand from 'zustand';
4
- import { I as IDKITStage, a as ConfigSource, b as CallbackFn, C as Config } from './config-71e4be16.js';
3
+ import * as zustand_vanilla from 'zustand/vanilla';
4
+ import { I as IDKITStage, a as ConfigSource, b as CallbackFn, C as Config } from './config-Cp9MWjvm.js';
5
5
  import { IDKitConfig, ISuccessResult, IErrorState } from '@worldcoin/idkit-core';
6
6
 
7
7
  type CleanWord<T> = T extends `${string}${' ' | ',' | '!' | '?' | '.' | '`'}${string}` ? never : T extends '' ? never : T;
@@ -36,9 +36,6 @@ type IDKitStore = {
36
36
  errorCallbacks: Record<ConfigSource, CallbackFn<IErrorState> | undefined> | Record<string, never>;
37
37
  verifyCallbacks: Record<ConfigSource, CallbackFn<ISuccessResult> | undefined> | Record<string, never>;
38
38
  successCallbacks: Record<ConfigSource, CallbackFn<ISuccessResult> | undefined> | Record<string, never>;
39
- computed: {
40
- canGoBack: (stage: IDKITStage) => boolean;
41
- };
42
39
  retryFlow: () => void;
43
40
  setStage: (stage: IDKITStage) => void;
44
41
  onOpenChange: (open: boolean) => void;
@@ -50,6 +47,6 @@ type IDKitStore = {
50
47
  addSuccessCallback: (cb: CallbackFn<ISuccessResult>, source: ConfigSource) => void;
51
48
  addVerificationCallback: (cb: CallbackFn<ISuccessResult>, source: ConfigSource) => void;
52
49
  };
53
- declare const useIDKitStore: zustand_traditional.UseBoundStoreWithEqualityFn<zustand.StoreApi<IDKitStore>>;
50
+ declare const useIDKitStore: zustand_traditional.UseBoundStoreWithEqualityFn<zustand_vanilla.StoreApi<IDKitStore>>;
54
51
 
55
52
  export { ConfigSource, _default as QRCode, __, useIDKitStore };
package/build/internal.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  QRCode_default,
4
4
  __,
5
5
  idkit_default
6
- } from "./chunk-JCPD6J62.js";
6
+ } from "./chunk-OPIVJQZ6.js";
7
7
  export {
8
8
  ConfigSource,
9
9
  QRCode_default as QRCode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worldcoin/idkit",
3
- "version": "1.1.4",
3
+ "version": "1.2.2",
4
4
  "homepage": "https://docs.worldcoin.org/id/idkit",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -53,44 +53,41 @@
53
53
  "react-dom": ">18.0.0"
54
54
  },
55
55
  "dependencies": {
56
- "@fontsource/rubik": "^4.5.11",
57
- "@headlessui/react": "^1.7.4",
58
- "@radix-ui/react-dialog": "^1.0.3",
59
- "@radix-ui/react-toast": "^1.1.3",
60
- "@tailwindcss/forms": "^0.5.3",
56
+ "@radix-ui/react-dialog": "^1.1.1",
57
+ "@radix-ui/react-toast": "^1.2.1",
58
+ "@tailwindcss/forms": "^0.5.7",
61
59
  "copy-to-clipboard": "^3.3.3",
62
- "framer-motion": "^7.6.7",
63
- "posthog-js-lite": "2.4.0",
64
- "qrcode": "^1.5.1",
60
+ "framer-motion": "^11.2.14",
61
+ "qrcode": "^1.5.3",
65
62
  "react-shadow": "^19.1.0",
66
- "zustand": "^4.3.3",
67
- "@worldcoin/idkit-core": "1.1.4"
63
+ "zustand": "^4.5.4",
64
+ "@worldcoin/idkit-core": "1.2.2"
68
65
  },
69
66
  "devDependencies": {
70
67
  "@types/node": "18.11.9",
71
- "@types/qrcode": "^1.5.0",
68
+ "@types/qrcode": "^1.5.5",
72
69
  "@types/react": "18.0.25",
73
70
  "@types/react-dom": "18.0.9",
74
- "@typescript-eslint/eslint-plugin": "^6.13.1",
75
- "@typescript-eslint/parser": "^6.13.1",
76
- "autoprefixer": "^10.4.13",
71
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
72
+ "@typescript-eslint/parser": "^6.21.0",
73
+ "autoprefixer": "^10.4.19",
77
74
  "eslint": "8.54.0",
78
- "eslint-config-prettier": "^8.5.0",
79
- "eslint-plugin-compat": "^4.1.1",
75
+ "eslint-config-prettier": "^8.10.0",
76
+ "eslint-plugin-compat": "^4.2.0",
80
77
  "eslint-plugin-import": "2.26.0",
81
- "eslint-plugin-jsx-a11y": "^6.6.1",
78
+ "eslint-plugin-jsx-a11y": "^6.9.0",
82
79
  "eslint-plugin-prettier": "^4.2.1",
83
- "eslint-plugin-react": "^7.31.11",
84
- "eslint-plugin-react-hooks": "^4.6.0",
85
- "eslint-plugin-tailwindcss": "^3.7.1",
86
- "postcss": "^8.4.31",
87
- "prettier": "^2.7.1",
80
+ "eslint-plugin-react": "^7.34.3",
81
+ "eslint-plugin-react-hooks": "^4.6.2",
82
+ "eslint-plugin-tailwindcss": "^3.17.4",
83
+ "postcss": "^8.4.39",
84
+ "prettier": "^3.3.2",
88
85
  "prettier-plugin-sort-imports-desc": "^1.0.0",
89
86
  "react": "18.2.0",
90
87
  "react-dom": "18.2.0",
91
- "tailwindcss": "^3.2.4",
92
- "tsup": "^7.2.0",
93
- "typescript": "^5.3.2"
88
+ "tailwindcss": "^3.4.4",
89
+ "tsup": "^8.1.0",
90
+ "typescript": "^5.5.3"
94
91
  },
95
92
  "scripts": {
96
93
  "dev": "tsup --watch",
package/src/index.ts CHANGED
@@ -3,7 +3,9 @@ import IDKitWidget from '@/components/IDKitWidget/index'
3
3
  import type { WidgetProps, Config } from '@/types/config'
4
4
  import { VerificationLevel } from '@worldcoin/idkit-core'
5
5
  import { solidityEncode } from '@worldcoin/idkit-core/hashing'
6
+ import { verifyCloudProof } from '@worldcoin/idkit-core/backend'
7
+ import type { IVerifyResponse } from '@worldcoin/idkit-core/backend'
6
8
  import type { ISuccessResult, IErrorState } from '@worldcoin/idkit-core'
7
9
 
8
- export { IDKitWidget, useIDKit, solidityEncode, VerificationLevel }
9
- export type { ISuccessResult, IErrorState, Config, WidgetProps }
10
+ export { IDKitWidget, useIDKit, solidityEncode, verifyCloudProof, VerificationLevel }
11
+ export type { ISuccessResult, IErrorState, IVerifyResponse, Config, WidgetProps }
Binary file