@worldcoin/idkit 1.1.3 → 1.2.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.
- package/build/{chunk-JCPD6J62.js → chunk-YVDL3YIJ.js} +0 -5
- package/build/{config-71e4be16.d.ts → config-19dfed99.d.ts} +0 -1
- package/build/index.d.ts +2 -1
- package/build/index.js +125 -387
- package/build/internal.d.ts +1 -4
- package/build/internal.js +1 -1
- package/package.json +3 -6
- package/src/index.ts +4 -2
- package/build/verified-O6D4JQCX.webp +0 -0
|
@@ -45,11 +45,6 @@ var useIDKitStore = createWithEqualityFn()(
|
|
|
45
45
|
verifyCallbacks: {},
|
|
46
46
|
successCallbacks: {},
|
|
47
47
|
stage: "WORLD_ID" /* WORLD_ID */,
|
|
48
|
-
computed: {
|
|
49
|
-
canGoBack: (stage) => {
|
|
50
|
-
return stage == "PRIVACY" /* PRIVACY */;
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
48
|
setStage: (stage) => set({ stage }),
|
|
54
49
|
setErrorState: (errorState) => set({ errorState }),
|
|
55
50
|
setProcessing: (processing) => set({ processing }),
|
package/build/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { C as Config, W as WidgetProps } from './config-
|
|
1
|
+
import { C as Config, W as WidgetProps } from './config-19dfed99.js';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
export { IErrorState, ISuccessResult, VerificationLevel } from '@worldcoin/idkit-core';
|
|
4
4
|
export { solidityEncode } from '@worldcoin/idkit-core/hashing';
|
|
5
|
+
export { IVerifyResponse, verifyCloudProof } from '@worldcoin/idkit-core/backend';
|
|
5
6
|
|
|
6
7
|
type HookConfig = Partial<Pick<Config, 'handleVerify' | 'onSuccess'>>;
|
|
7
8
|
declare const useIDKit: ({ handleVerify, onSuccess }?: HookConfig) => {
|
package/build/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
QRCode_default,
|
|
3
3
|
__,
|
|
4
4
|
idkit_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YVDL3YIJ.js";
|
|
6
6
|
|
|
7
7
|
// src/hooks/useIDKit.ts
|
|
8
8
|
import { useEffect } from "react";
|
|
@@ -47,11 +47,6 @@ var useMedia = () => {
|
|
|
47
47
|
};
|
|
48
48
|
var useMedia_default = useMedia;
|
|
49
49
|
|
|
50
|
-
// src/lib/utils.ts
|
|
51
|
-
var classNames = (...classes) => {
|
|
52
|
-
return classes.filter(Boolean).join(" ");
|
|
53
|
-
};
|
|
54
|
-
|
|
55
50
|
// src/styles/styles.css
|
|
56
51
|
var styles_default = `/* TODO: Use an alternative to avoid the extra request to Google (e.g. hosting ourselves, or local file) */
|
|
57
52
|
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&family=Sora:wght@600&display=swap');
|
|
@@ -621,48 +616,9 @@ select{
|
|
|
621
616
|
--tw-backdrop-saturate: ;
|
|
622
617
|
--tw-backdrop-sepia: ;
|
|
623
618
|
}
|
|
624
|
-
.container{
|
|
625
|
-
width: 100%;
|
|
626
|
-
}
|
|
627
|
-
@media (min-width: 414px){
|
|
628
|
-
.container{
|
|
629
|
-
max-width: 414px;
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
@media (min-width: 640px){
|
|
633
|
-
.container{
|
|
634
|
-
max-width: 640px;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
@media (min-width: 768px){
|
|
638
|
-
.container{
|
|
639
|
-
max-width: 768px;
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
@media (min-width: 1024px){
|
|
643
|
-
.container{
|
|
644
|
-
max-width: 1024px;
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
@media (min-width: 1280px){
|
|
648
|
-
.container{
|
|
649
|
-
max-width: 1280px;
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
@media (min-width: 1536px){
|
|
653
|
-
.container{
|
|
654
|
-
max-width: 1536px;
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
.pointer-events-none{
|
|
658
|
-
pointer-events: none;
|
|
659
|
-
}
|
|
660
619
|
.visible{
|
|
661
620
|
visibility: visible;
|
|
662
621
|
}
|
|
663
|
-
.invisible{
|
|
664
|
-
visibility: hidden;
|
|
665
|
-
}
|
|
666
622
|
.fixed{
|
|
667
623
|
position: fixed;
|
|
668
624
|
}
|
|
@@ -675,12 +631,6 @@ select{
|
|
|
675
631
|
.inset-0{
|
|
676
632
|
inset: 0;
|
|
677
633
|
}
|
|
678
|
-
.left-1\\/2{
|
|
679
|
-
left: 50%;
|
|
680
|
-
}
|
|
681
|
-
.top-1\\/2{
|
|
682
|
-
top: 50%;
|
|
683
|
-
}
|
|
684
634
|
.z-10{
|
|
685
635
|
z-index: 10;
|
|
686
636
|
}
|
|
@@ -695,18 +645,12 @@ select{
|
|
|
695
645
|
margin-left: auto;
|
|
696
646
|
margin-right: auto;
|
|
697
647
|
}
|
|
698
|
-
.-ml-4{
|
|
699
|
-
margin-left: -16px;
|
|
700
|
-
}
|
|
701
648
|
.-mt-5{
|
|
702
649
|
margin-top: -20px;
|
|
703
650
|
}
|
|
704
651
|
.-mt-6{
|
|
705
652
|
margin-top: -24px;
|
|
706
653
|
}
|
|
707
|
-
.-mt-\\[2px\\]{
|
|
708
|
-
margin-top: -2px;
|
|
709
|
-
}
|
|
710
654
|
.mb-10{
|
|
711
655
|
margin-bottom: 40px;
|
|
712
656
|
}
|
|
@@ -734,9 +678,6 @@ select{
|
|
|
734
678
|
.mt-4{
|
|
735
679
|
margin-top: 16px;
|
|
736
680
|
}
|
|
737
|
-
.mt-\\[2px\\]{
|
|
738
|
-
margin-top: 2px;
|
|
739
|
-
}
|
|
740
681
|
.flex{
|
|
741
682
|
display: flex;
|
|
742
683
|
}
|
|
@@ -746,33 +687,18 @@ select{
|
|
|
746
687
|
.hidden{
|
|
747
688
|
display: none;
|
|
748
689
|
}
|
|
749
|
-
.aspect-square{
|
|
750
|
-
aspect-ratio: 1 / 1;
|
|
751
|
-
}
|
|
752
690
|
.h-10{
|
|
753
691
|
height: 40px;
|
|
754
692
|
}
|
|
755
|
-
.h-12{
|
|
756
|
-
height: 48px;
|
|
757
|
-
}
|
|
758
693
|
.h-24{
|
|
759
694
|
height: 96px;
|
|
760
695
|
}
|
|
761
|
-
.h-3{
|
|
762
|
-
height: 12px;
|
|
763
|
-
}
|
|
764
|
-
.h-4{
|
|
765
|
-
height: 16px;
|
|
766
|
-
}
|
|
767
696
|
.h-5{
|
|
768
697
|
height: 20px;
|
|
769
698
|
}
|
|
770
699
|
.h-6{
|
|
771
700
|
height: 24px;
|
|
772
701
|
}
|
|
773
|
-
.h-8{
|
|
774
|
-
height: 32px;
|
|
775
|
-
}
|
|
776
702
|
.h-\\[244px\\]{
|
|
777
703
|
height: 244px;
|
|
778
704
|
}
|
|
@@ -782,15 +708,9 @@ select{
|
|
|
782
708
|
.min-h-screen{
|
|
783
709
|
min-height: 100vh;
|
|
784
710
|
}
|
|
785
|
-
.w-12{
|
|
786
|
-
width: 48px;
|
|
787
|
-
}
|
|
788
711
|
.w-24{
|
|
789
712
|
width: 96px;
|
|
790
713
|
}
|
|
791
|
-
.w-3{
|
|
792
|
-
width: 12px;
|
|
793
|
-
}
|
|
794
714
|
.w-4{
|
|
795
715
|
width: 16px;
|
|
796
716
|
}
|
|
@@ -800,38 +720,18 @@ select{
|
|
|
800
720
|
.w-6{
|
|
801
721
|
width: 24px;
|
|
802
722
|
}
|
|
803
|
-
.w-8{
|
|
804
|
-
width: 32px;
|
|
805
|
-
}
|
|
806
723
|
.w-\\[244px\\]{
|
|
807
724
|
width: 244px;
|
|
808
725
|
}
|
|
809
|
-
.w-\\[34px\\]{
|
|
810
|
-
width: 34px;
|
|
811
|
-
}
|
|
812
726
|
.w-full{
|
|
813
727
|
width: 100%;
|
|
814
728
|
}
|
|
815
|
-
.max-w-\\[14rem\\]{
|
|
816
|
-
max-width: 14rem;
|
|
817
|
-
}
|
|
818
729
|
.max-w-\\[224px\\]{
|
|
819
730
|
max-width: 224px;
|
|
820
731
|
}
|
|
821
732
|
.flex-1{
|
|
822
733
|
flex: 1 1 0%;
|
|
823
734
|
}
|
|
824
|
-
.-translate-x-1\\/2{
|
|
825
|
-
--tw-translate-x: -50%;
|
|
826
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
827
|
-
}
|
|
828
|
-
.-translate-y-1\\/2{
|
|
829
|
-
--tw-translate-y: -50%;
|
|
830
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
831
|
-
}
|
|
832
|
-
.transform{
|
|
833
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
834
|
-
}
|
|
835
735
|
@keyframes pulse{
|
|
836
736
|
50%{
|
|
837
737
|
opacity: .5;
|
|
@@ -851,9 +751,6 @@ select{
|
|
|
851
751
|
.cursor-pointer{
|
|
852
752
|
cursor: pointer;
|
|
853
753
|
}
|
|
854
|
-
.list-disc{
|
|
855
|
-
list-style-type: disc;
|
|
856
|
-
}
|
|
857
754
|
.flex-col{
|
|
858
755
|
flex-direction: column;
|
|
859
756
|
}
|
|
@@ -877,31 +774,16 @@ select{
|
|
|
877
774
|
margin-right: calc(8px * var(--tw-space-x-reverse));
|
|
878
775
|
margin-left: calc(8px * calc(1 - var(--tw-space-x-reverse)));
|
|
879
776
|
}
|
|
880
|
-
.space-x-3 > :not([hidden]) ~ :not([hidden]){
|
|
881
|
-
--tw-space-x-reverse: 0;
|
|
882
|
-
margin-right: calc(12px * var(--tw-space-x-reverse));
|
|
883
|
-
margin-left: calc(12px * calc(1 - var(--tw-space-x-reverse)));
|
|
884
|
-
}
|
|
885
777
|
.space-x-4 > :not([hidden]) ~ :not([hidden]){
|
|
886
778
|
--tw-space-x-reverse: 0;
|
|
887
779
|
margin-right: calc(16px * var(--tw-space-x-reverse));
|
|
888
780
|
margin-left: calc(16px * calc(1 - var(--tw-space-x-reverse)));
|
|
889
781
|
}
|
|
890
|
-
.space-x-6 > :not([hidden]) ~ :not([hidden]){
|
|
891
|
-
--tw-space-x-reverse: 0;
|
|
892
|
-
margin-right: calc(24px * var(--tw-space-x-reverse));
|
|
893
|
-
margin-left: calc(24px * calc(1 - var(--tw-space-x-reverse)));
|
|
894
|
-
}
|
|
895
782
|
.space-y-10 > :not([hidden]) ~ :not([hidden]){
|
|
896
783
|
--tw-space-y-reverse: 0;
|
|
897
784
|
margin-top: calc(40px * calc(1 - var(--tw-space-y-reverse)));
|
|
898
785
|
margin-bottom: calc(40px * var(--tw-space-y-reverse));
|
|
899
786
|
}
|
|
900
|
-
.space-y-3 > :not([hidden]) ~ :not([hidden]){
|
|
901
|
-
--tw-space-y-reverse: 0;
|
|
902
|
-
margin-top: calc(12px * calc(1 - var(--tw-space-y-reverse)));
|
|
903
|
-
margin-bottom: calc(12px * var(--tw-space-y-reverse));
|
|
904
|
-
}
|
|
905
787
|
.space-y-4 > :not([hidden]) ~ :not([hidden]){
|
|
906
788
|
--tw-space-y-reverse: 0;
|
|
907
789
|
margin-top: calc(16px * calc(1 - var(--tw-space-y-reverse)));
|
|
@@ -920,9 +802,6 @@ select{
|
|
|
920
802
|
.overflow-y-hidden{
|
|
921
803
|
overflow-y: hidden;
|
|
922
804
|
}
|
|
923
|
-
.whitespace-nowrap{
|
|
924
|
-
white-space: nowrap;
|
|
925
|
-
}
|
|
926
805
|
.rounded-2xl{
|
|
927
806
|
border-radius: 1rem;
|
|
928
807
|
}
|
|
@@ -932,9 +811,6 @@ select{
|
|
|
932
811
|
.rounded-lg{
|
|
933
812
|
border-radius: 0.5rem;
|
|
934
813
|
}
|
|
935
|
-
.rounded-md{
|
|
936
|
-
border-radius: 0.375rem;
|
|
937
|
-
}
|
|
938
814
|
.border{
|
|
939
815
|
border-width: 1px;
|
|
940
816
|
}
|
|
@@ -963,17 +839,6 @@ select{
|
|
|
963
839
|
.bg-black\\/50{
|
|
964
840
|
background-color: rgb(0 0 0 / 0.5);
|
|
965
841
|
}
|
|
966
|
-
.bg-d3dfea\\/30{
|
|
967
|
-
background-color: rgb(211 223 234 / 0.3);
|
|
968
|
-
}
|
|
969
|
-
.bg-gray-100{
|
|
970
|
-
--tw-bg-opacity: 1;
|
|
971
|
-
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
|
|
972
|
-
}
|
|
973
|
-
.bg-indigo-600{
|
|
974
|
-
--tw-bg-opacity: 1;
|
|
975
|
-
background-color: rgb(79 70 229 / var(--tw-bg-opacity));
|
|
976
|
-
}
|
|
977
842
|
.bg-transparent{
|
|
978
843
|
background-color: transparent;
|
|
979
844
|
}
|
|
@@ -990,10 +855,6 @@ select{
|
|
|
990
855
|
.p-7{
|
|
991
856
|
padding: 28px;
|
|
992
857
|
}
|
|
993
|
-
.px-12{
|
|
994
|
-
padding-left: 48px;
|
|
995
|
-
padding-right: 48px;
|
|
996
|
-
}
|
|
997
858
|
.px-2{
|
|
998
859
|
padding-left: 8px;
|
|
999
860
|
padding-right: 8px;
|
|
@@ -1010,10 +871,6 @@ select{
|
|
|
1010
871
|
padding-top: 4px;
|
|
1011
872
|
padding-bottom: 4px;
|
|
1012
873
|
}
|
|
1013
|
-
.py-2{
|
|
1014
|
-
padding-top: 8px;
|
|
1015
|
-
padding-bottom: 8px;
|
|
1016
|
-
}
|
|
1017
874
|
.py-3{
|
|
1018
875
|
padding-top: 12px;
|
|
1019
876
|
padding-bottom: 12px;
|
|
@@ -1025,9 +882,6 @@ select{
|
|
|
1025
882
|
.pt-6{
|
|
1026
883
|
padding-top: 24px;
|
|
1027
884
|
}
|
|
1028
|
-
.text-left{
|
|
1029
|
-
text-align: left;
|
|
1030
|
-
}
|
|
1031
885
|
.text-center{
|
|
1032
886
|
text-align: center;
|
|
1033
887
|
}
|
|
@@ -1059,15 +913,9 @@ select{
|
|
|
1059
913
|
.font-medium{
|
|
1060
914
|
font-weight: 500;
|
|
1061
915
|
}
|
|
1062
|
-
.font-normal{
|
|
1063
|
-
font-weight: 400;
|
|
1064
|
-
}
|
|
1065
916
|
.font-semibold{
|
|
1066
917
|
font-weight: 600;
|
|
1067
918
|
}
|
|
1068
|
-
.uppercase{
|
|
1069
|
-
text-transform: uppercase;
|
|
1070
|
-
}
|
|
1071
919
|
.text-0d151d{
|
|
1072
920
|
--tw-text-opacity: 1;
|
|
1073
921
|
color: rgb(13 21 29 / var(--tw-text-opacity));
|
|
@@ -1080,10 +928,6 @@ select{
|
|
|
1080
928
|
--tw-text-opacity: 1;
|
|
1081
929
|
color: rgb(60 66 75 / var(--tw-text-opacity));
|
|
1082
930
|
}
|
|
1083
|
-
.text-4940e0{
|
|
1084
|
-
--tw-text-opacity: 1;
|
|
1085
|
-
color: rgb(73 64 224 / var(--tw-text-opacity));
|
|
1086
|
-
}
|
|
1087
931
|
.text-657080{
|
|
1088
932
|
--tw-text-opacity: 1;
|
|
1089
933
|
color: rgb(101 112 128 / var(--tw-text-opacity));
|
|
@@ -1158,10 +1002,6 @@ input[type='number']::-webkit-inner-spin-button,
|
|
|
1158
1002
|
-webkit-appearance: none;
|
|
1159
1003
|
appearance: none;
|
|
1160
1004
|
}
|
|
1161
|
-
.hover\\:bg-indigo-700:hover{
|
|
1162
|
-
--tw-bg-opacity: 1;
|
|
1163
|
-
background-color: rgb(67 56 202 / var(--tw-bg-opacity));
|
|
1164
|
-
}
|
|
1165
1005
|
.hover\\:underline:hover{
|
|
1166
1006
|
text-decoration-line: underline;
|
|
1167
1007
|
}
|
|
@@ -1217,13 +1057,6 @@ input[type='number']::-webkit-inner-spin-button,
|
|
|
1217
1057
|
--tw-bg-opacity: 1;
|
|
1218
1058
|
background-color: rgb(13 21 29 / var(--tw-bg-opacity));
|
|
1219
1059
|
}
|
|
1220
|
-
:is(.dark .dark\\:bg-29343f){
|
|
1221
|
-
--tw-bg-opacity: 1;
|
|
1222
|
-
background-color: rgb(41 52 63 / var(--tw-bg-opacity));
|
|
1223
|
-
}
|
|
1224
|
-
:is(.dark .dark\\:bg-d3dfea\\/15){
|
|
1225
|
-
background-color: rgb(211 223 234 / .15);
|
|
1226
|
-
}
|
|
1227
1060
|
:is(.dark .dark\\:bg-white){
|
|
1228
1061
|
--tw-bg-opacity: 1;
|
|
1229
1062
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
@@ -1459,8 +1292,8 @@ var ErrorState = () => {
|
|
|
1459
1292
|
return /* @__PURE__ */ jsxs3("div", { className: "space-y-8", children: [
|
|
1460
1293
|
/* @__PURE__ */ jsx6("div", { className: "-mt-5 flex items-center justify-center", children: errorState?.code == AppErrorCodes.VerificationRejected ? /* @__PURE__ */ jsx6(WarningIcon_default, { className: "w-24" }) : /* @__PURE__ */ jsx6(ErrorIcon_default, { className: "w-24" }) }),
|
|
1461
1294
|
/* @__PURE__ */ jsxs3("div", { children: [
|
|
1462
|
-
/* @__PURE__ */ jsx6("p", { className: "text-center text-2xl font-semibold text-gray-900 dark:text-white", children: errorState?.code && ERROR_TITLES[errorState.code]
|
|
1463
|
-
/* @__PURE__ */ jsx6("p", { className: "mx-auto mt-2 max-w-[
|
|
1295
|
+
/* @__PURE__ */ jsx6("p", { className: "text-center text-2xl font-semibold text-gray-900 dark:text-white", children: (errorState?.code && ERROR_TITLES[errorState.code]) ?? ERROR_TITLES[AppErrorCodes.GenericError] }),
|
|
1296
|
+
/* @__PURE__ */ jsx6("p", { className: "mx-auto mt-2 max-w-[224px] text-center text-657080", children: errorState?.message ?? ERROR_MESSAGES[errorState?.code ?? AppErrorCodes.GenericError] })
|
|
1464
1297
|
] }),
|
|
1465
1298
|
/* @__PURE__ */ jsx6("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs3(
|
|
1466
1299
|
"button",
|
|
@@ -1481,84 +1314,10 @@ var ErrorState_default = ErrorState;
|
|
|
1481
1314
|
// src/components/IDKitWidget/BaseWidget.tsx
|
|
1482
1315
|
import * as Toast from "@radix-ui/react-toast";
|
|
1483
1316
|
|
|
1484
|
-
// public/images/verified.webp
|
|
1485
|
-
var verified_default = "./verified-O6D4JQCX.webp";
|
|
1486
|
-
|
|
1487
|
-
// src/components/WorldIDIcon.tsx
|
|
1488
|
-
import { Fragment, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1489
|
-
var WorldIDIcon = ({ border, size = "sm", ...props }) => {
|
|
1490
|
-
const heightWidth = size === "md" ? 36 : 24;
|
|
1491
|
-
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
1492
|
-
border && /* @__PURE__ */ jsx7(
|
|
1493
|
-
"svg",
|
|
1494
|
-
{
|
|
1495
|
-
className: classNames(
|
|
1496
|
-
border,
|
|
1497
|
-
"absolute left-1/2 top-1/2 w-[34px] -mt-[2px] transform -translate-x-1/2 -translate-y-1/2"
|
|
1498
|
-
),
|
|
1499
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1500
|
-
fill: "currentColor",
|
|
1501
|
-
viewBox: "0 0 26 26",
|
|
1502
|
-
children: /* @__PURE__ */ jsx7("path", { d: "M8.382 2.244a6.938 6.938 0 0 1 9.236 0l1.626 1.451c.346.308.722.581 1.122.815l1.882 1.098a6.937 6.937 0 0 1 2.854 8.784l-.877 1.995c-.187.424-.33.866-.428 1.319l-.463 2.129a6.938 6.938 0 0 1-7.473 5.429l-2.168-.218a6.934 6.934 0 0 0-1.386 0l-2.168.218a6.938 6.938 0 0 1-7.473-5.429l-.463-2.13a6.937 6.937 0 0 0-.428-1.318l-.877-1.995a6.938 6.938 0 0 1 2.854-8.784L5.634 4.51c.4-.234.776-.507 1.122-.815l1.626-1.45Z" })
|
|
1503
|
-
}
|
|
1504
|
-
),
|
|
1505
|
-
/* @__PURE__ */ jsx7("img", { src: verified_default, ...props, alt: "Verified", width: heightWidth, height: heightWidth })
|
|
1506
|
-
] });
|
|
1507
|
-
};
|
|
1508
|
-
var WorldIDIcon_default = WorldIDIcon;
|
|
1509
|
-
|
|
1510
|
-
// src/components/Icons/InfoIcon.tsx
|
|
1511
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1512
|
-
var InfoIcon = (props) => /* @__PURE__ */ jsx8("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", children: /* @__PURE__ */ jsx8(
|
|
1513
|
-
"path",
|
|
1514
|
-
{
|
|
1515
|
-
fill: "currentColor",
|
|
1516
|
-
fillRule: "evenodd",
|
|
1517
|
-
d: "M14.665 7.999a6.667 6.667 0 1 1-13.333 0 6.667 6.667 0 0 1 13.333 0Zm-6-3.334a.667.667 0 1 1-1.333 0 .667.667 0 0 1 1.333 0Zm-1.333 1.5a.5.5 0 0 0 0 1h.167v4.167a.5.5 0 1 0 1 0V6.665a.5.5 0 0 0-.5-.5h-.667Z",
|
|
1518
|
-
clipRule: "evenodd"
|
|
1519
|
-
}
|
|
1520
|
-
) });
|
|
1521
|
-
var InfoIcon_default = InfoIcon;
|
|
1522
|
-
|
|
1523
|
-
// src/components/IDKitWidget/States/PrivacyState.tsx
|
|
1524
|
-
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1525
|
-
var PrivacyState = () => {
|
|
1526
|
-
return /* @__PURE__ */ jsxs5("div", { className: "-mt-6 flex flex-col items-center justify-center space-y-6 font-sans text-sm", children: [
|
|
1527
|
-
/* @__PURE__ */ jsx9(WorldIDIcon_default, { className: "h-12 w-12" }),
|
|
1528
|
-
/* @__PURE__ */ jsx9("p", { className: "text-center text-2xl font-semibold dark:text-white", children: __("Privacy preserving to the core.") }),
|
|
1529
|
-
/* @__PURE__ */ jsxs5("ul", { className: "text-9eafc0 mb-6 list-disc space-y-3 px-12 dark:text-white", children: [
|
|
1530
|
-
/* @__PURE__ */ jsx9("li", { className: "text-left", children: __(
|
|
1531
|
-
"World ID uses Zero-Knowledge Proofs to make it cryptographically impossible to track persons across applications."
|
|
1532
|
-
) }),
|
|
1533
|
-
/* @__PURE__ */ jsx9("li", { className: "text-left", children: __("Orb biometrics analyzed by the Orb are not stored.") }),
|
|
1534
|
-
/* @__PURE__ */ jsxs5("li", { className: "text-left ", children: [
|
|
1535
|
-
__("Code and hardware are open source or source available on"),
|
|
1536
|
-
" ",
|
|
1537
|
-
/* @__PURE__ */ jsx9(
|
|
1538
|
-
"a",
|
|
1539
|
-
{
|
|
1540
|
-
href: "https://github.com/worldcoin/idkit-js",
|
|
1541
|
-
target: "_blank",
|
|
1542
|
-
className: "text-4940e0",
|
|
1543
|
-
rel: "noreferrer",
|
|
1544
|
-
children: "GitHub"
|
|
1545
|
-
}
|
|
1546
|
-
),
|
|
1547
|
-
"."
|
|
1548
|
-
] })
|
|
1549
|
-
] }),
|
|
1550
|
-
/* @__PURE__ */ jsxs5("div", { className: "text-9eafc0 dark:text-9eafc0 -ml-4 flex items-center space-x-3", children: [
|
|
1551
|
-
/* @__PURE__ */ jsx9(InfoIcon_default, { className: "h-4 w-4 " }),
|
|
1552
|
-
/* @__PURE__ */ jsx9("p", { className: "whitespace-nowrap text-sm font-medium", children: __("Biometrics are never shared.") })
|
|
1553
|
-
] })
|
|
1554
|
-
] });
|
|
1555
|
-
};
|
|
1556
|
-
var PrivacyState_default = PrivacyState;
|
|
1557
|
-
|
|
1558
1317
|
// src/components/Icons/CheckIcon.tsx
|
|
1559
|
-
import { jsx as
|
|
1560
|
-
var CheckIcon = (props) => /* @__PURE__ */
|
|
1561
|
-
/* @__PURE__ */
|
|
1318
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1319
|
+
var CheckIcon = (props) => /* @__PURE__ */ jsxs4("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 100 100", ...props, children: [
|
|
1320
|
+
/* @__PURE__ */ jsx7(
|
|
1562
1321
|
"circle",
|
|
1563
1322
|
{
|
|
1564
1323
|
cx: "50",
|
|
@@ -1570,11 +1329,11 @@ var CheckIcon = (props) => /* @__PURE__ */ jsxs6("svg", { xmlns: "http://www.w3.
|
|
|
1570
1329
|
strokeWidth: "1.25"
|
|
1571
1330
|
}
|
|
1572
1331
|
),
|
|
1573
|
-
/* @__PURE__ */
|
|
1574
|
-
/* @__PURE__ */
|
|
1575
|
-
/* @__PURE__ */
|
|
1332
|
+
/* @__PURE__ */ jsxs4("g", { filter: "url(#success-c)", children: [
|
|
1333
|
+
/* @__PURE__ */ jsx7("circle", { cx: "50", cy: "50", r: "35", fill: "#fff" }),
|
|
1334
|
+
/* @__PURE__ */ jsx7("circle", { cx: "50", cy: "50", r: "34.432", stroke: "#CCEBCC", strokeWidth: "1.136" })
|
|
1576
1335
|
] }),
|
|
1577
|
-
/* @__PURE__ */
|
|
1336
|
+
/* @__PURE__ */ jsx7(
|
|
1578
1337
|
"path",
|
|
1579
1338
|
{
|
|
1580
1339
|
stroke: "#090",
|
|
@@ -1584,16 +1343,16 @@ var CheckIcon = (props) => /* @__PURE__ */ jsxs6("svg", { xmlns: "http://www.w3.
|
|
|
1584
1343
|
d: "m41.25 52.5 4.375 4.375 13.125-13.75"
|
|
1585
1344
|
}
|
|
1586
1345
|
),
|
|
1587
|
-
/* @__PURE__ */
|
|
1588
|
-
/* @__PURE__ */
|
|
1589
|
-
/* @__PURE__ */
|
|
1590
|
-
/* @__PURE__ */
|
|
1346
|
+
/* @__PURE__ */ jsxs4("defs", { children: [
|
|
1347
|
+
/* @__PURE__ */ jsxs4("linearGradient", { id: "success-a", x1: "50", x2: "50", y1: "0", y2: "100", gradientUnits: "userSpaceOnUse", children: [
|
|
1348
|
+
/* @__PURE__ */ jsx7("stop", { stopColor: "#99D699" }),
|
|
1349
|
+
/* @__PURE__ */ jsx7("stop", { offset: "1", stopColor: "#99D699", stopOpacity: "0" })
|
|
1591
1350
|
] }),
|
|
1592
|
-
/* @__PURE__ */
|
|
1593
|
-
/* @__PURE__ */
|
|
1594
|
-
/* @__PURE__ */
|
|
1351
|
+
/* @__PURE__ */ jsxs4("linearGradient", { id: "success-b", x1: "50", x2: "50", y1: "0", y2: "100", gradientUnits: "userSpaceOnUse", children: [
|
|
1352
|
+
/* @__PURE__ */ jsx7("stop", { stopColor: "#99D699" }),
|
|
1353
|
+
/* @__PURE__ */ jsx7("stop", { offset: ".713", stopColor: "#99D699", stopOpacity: "0" })
|
|
1595
1354
|
] }),
|
|
1596
|
-
/* @__PURE__ */
|
|
1355
|
+
/* @__PURE__ */ jsxs4(
|
|
1597
1356
|
"filter",
|
|
1598
1357
|
{
|
|
1599
1358
|
id: "success-c",
|
|
@@ -1604,13 +1363,13 @@ var CheckIcon = (props) => /* @__PURE__ */ jsxs6("svg", { xmlns: "http://www.w3.
|
|
|
1604
1363
|
colorInterpolationFilters: "sRGB",
|
|
1605
1364
|
filterUnits: "userSpaceOnUse",
|
|
1606
1365
|
children: [
|
|
1607
|
-
/* @__PURE__ */
|
|
1608
|
-
/* @__PURE__ */
|
|
1609
|
-
/* @__PURE__ */
|
|
1610
|
-
/* @__PURE__ */
|
|
1611
|
-
/* @__PURE__ */
|
|
1612
|
-
/* @__PURE__ */
|
|
1613
|
-
/* @__PURE__ */
|
|
1366
|
+
/* @__PURE__ */ jsx7("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
1367
|
+
/* @__PURE__ */ jsx7("feColorMatrix", { in: "SourceAlpha", result: "hardAlpha", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" }),
|
|
1368
|
+
/* @__PURE__ */ jsx7("feOffset", { dy: "1.875" }),
|
|
1369
|
+
/* @__PURE__ */ jsx7("feGaussianBlur", { stdDeviation: "1.875" }),
|
|
1370
|
+
/* @__PURE__ */ jsx7("feColorMatrix", { values: "0 0 0 0 0.8 0 0 0 0 0.921569 0 0 0 0 0.8 0 0 0 0.45 0" }),
|
|
1371
|
+
/* @__PURE__ */ jsx7("feBlend", { in2: "BackgroundImageFix", result: "effect1_dropShadow_39_712" }),
|
|
1372
|
+
/* @__PURE__ */ jsx7("feBlend", { in: "SourceGraphic", in2: "effect1_dropShadow_39_712", result: "shape" })
|
|
1614
1373
|
]
|
|
1615
1374
|
}
|
|
1616
1375
|
)
|
|
@@ -1619,13 +1378,13 @@ var CheckIcon = (props) => /* @__PURE__ */ jsxs6("svg", { xmlns: "http://www.w3.
|
|
|
1619
1378
|
var CheckIcon_default = CheckIcon;
|
|
1620
1379
|
|
|
1621
1380
|
// src/components/IDKitWidget/States/SuccessState.tsx
|
|
1622
|
-
import { jsx as
|
|
1381
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1623
1382
|
var SuccessState = () => {
|
|
1624
|
-
return /* @__PURE__ */
|
|
1625
|
-
/* @__PURE__ */
|
|
1626
|
-
/* @__PURE__ */
|
|
1627
|
-
/* @__PURE__ */
|
|
1628
|
-
/* @__PURE__ */
|
|
1383
|
+
return /* @__PURE__ */ jsxs5("div", { className: "space-y-6", children: [
|
|
1384
|
+
/* @__PURE__ */ jsx8("div", { className: "-mt-5 flex items-center justify-center", children: /* @__PURE__ */ jsx8(CheckIcon_default, { className: "w-24 text-white" }) }),
|
|
1385
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
1386
|
+
/* @__PURE__ */ jsx8("p", { className: "text-center text-2xl font-semibold text-gray-900 dark:text-white", children: __("Successfully verified") }),
|
|
1387
|
+
/* @__PURE__ */ jsx8("p", { className: "mx-auto mt-2 max-w-[224px] text-center text-lg text-657080", children: __("Your World ID verification was successful") })
|
|
1629
1388
|
] })
|
|
1630
1389
|
] });
|
|
1631
1390
|
};
|
|
@@ -1633,12 +1392,19 @@ var SuccessState_default = SuccessState;
|
|
|
1633
1392
|
|
|
1634
1393
|
// src/components/IDKitWidget/States/WorldID/QRState.tsx
|
|
1635
1394
|
import copy from "copy-to-clipboard";
|
|
1395
|
+
|
|
1396
|
+
// src/lib/utils.ts
|
|
1397
|
+
var classNames = (...classes) => {
|
|
1398
|
+
return classes.filter(Boolean).join(" ");
|
|
1399
|
+
};
|
|
1400
|
+
|
|
1401
|
+
// src/components/IDKitWidget/States/WorldID/QRState.tsx
|
|
1636
1402
|
import { useCallback, useState as useState2 } from "react";
|
|
1637
1403
|
import { AnimatePresence, motion } from "framer-motion";
|
|
1638
1404
|
|
|
1639
1405
|
// src/components/Icons/WorldcoinIcon.tsx
|
|
1640
|
-
import { jsx as
|
|
1641
|
-
var WorldcoinIcon = (props) => /* @__PURE__ */
|
|
1406
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1407
|
+
var WorldcoinIcon = (props) => /* @__PURE__ */ jsx9("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 33 32", children: /* @__PURE__ */ jsx9(
|
|
1642
1408
|
"path",
|
|
1643
1409
|
{
|
|
1644
1410
|
fill: "currentColor",
|
|
@@ -1648,9 +1414,9 @@ var WorldcoinIcon = (props) => /* @__PURE__ */ jsx12("svg", { ...props, xmlns: "
|
|
|
1648
1414
|
var WorldcoinIcon_default = WorldcoinIcon;
|
|
1649
1415
|
|
|
1650
1416
|
// src/components/Icons/QRPlaceholderIcon.tsx
|
|
1651
|
-
import { jsx as
|
|
1652
|
-
var QRPlaceholderIcon = (props) => /* @__PURE__ */
|
|
1653
|
-
/* @__PURE__ */
|
|
1417
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1418
|
+
var QRPlaceholderIcon = (props) => /* @__PURE__ */ jsxs6("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 200 200", children: [
|
|
1419
|
+
/* @__PURE__ */ jsx10(
|
|
1654
1420
|
"path",
|
|
1655
1421
|
{
|
|
1656
1422
|
fill: "#EBECEF",
|
|
@@ -1659,14 +1425,14 @@ var QRPlaceholderIcon = (props) => /* @__PURE__ */ jsxs8("svg", { ...props, xmln
|
|
|
1659
1425
|
clipRule: "evenodd"
|
|
1660
1426
|
}
|
|
1661
1427
|
),
|
|
1662
|
-
/* @__PURE__ */
|
|
1428
|
+
/* @__PURE__ */ jsx10(
|
|
1663
1429
|
"path",
|
|
1664
1430
|
{
|
|
1665
1431
|
fill: "#EBECEF",
|
|
1666
1432
|
d: "M197.026 200c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-17.616c0-.778-.313-1.525-.871-2.076a2.996 2.996 0 0 0-2.103-.86h-5.948c-.789 0-1.545.31-2.103.86a2.918 2.918 0 0 0-.871 2.076v8.808h-11.897v-11.744h-11.896v-23.487h11.896v8.808c0 .778.314 1.525.872 2.076.557.55 1.314.86 2.102.86h5.949c.788 0 1.545-.31 2.103-.86a2.922 2.922 0 0 0 .871-2.076v-8.808h8.922c.789 0 1.545-.309 2.103-.86a2.916 2.916 0 0 0 .871-2.076v-5.872c0-.779-.313-1.525-.871-2.076a2.992 2.992 0 0 0-2.103-.86h-29.741c-.789 0-1.545.309-2.103.86a2.916 2.916 0 0 0-.871 2.076v8.808h-23.792v-11.744h8.922c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-5.872c0-.778-.313-1.525-.871-2.076a2.996 2.996 0 0 0-2.103-.86h-5.948c-.789 0-1.546.31-2.103.86a2.918 2.918 0 0 0-.871 2.076v8.808H119.7c-.789 0-1.545.309-2.103.86a2.916 2.916 0 0 0-.871 2.076v5.872c0 .779.313 1.525.871 2.076.558.551 1.314.86 2.103.86h20.819v8.808c0 .778.313 1.525.871 2.076.557.55 1.314.86 2.103.86h8.922v8.808c0 .778.313 1.525.871 2.076.558.55 1.314.859 2.103.859h8.922v11.744h-20.818c-.789 0-1.546.31-2.103.86a2.916 2.916 0 0 0-.871 2.076v5.872c0 .779.313 1.526.871 2.076a2.99 2.99 0 0 0 2.103.86h17.844c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-8.808h11.896v8.808c0 .779.314 1.526.872 2.076a2.99 2.99 0 0 0 2.102.86h17.845Z"
|
|
1667
1433
|
}
|
|
1668
1434
|
),
|
|
1669
|
-
/* @__PURE__ */
|
|
1435
|
+
/* @__PURE__ */ jsx10(
|
|
1670
1436
|
"path",
|
|
1671
1437
|
{
|
|
1672
1438
|
fill: "#EBECEF",
|
|
@@ -1675,14 +1441,14 @@ var QRPlaceholderIcon = (props) => /* @__PURE__ */ jsxs8("svg", { ...props, xmln
|
|
|
1675
1441
|
clipRule: "evenodd"
|
|
1676
1442
|
}
|
|
1677
1443
|
),
|
|
1678
|
-
/* @__PURE__ */
|
|
1444
|
+
/* @__PURE__ */ jsx10(
|
|
1679
1445
|
"path",
|
|
1680
1446
|
{
|
|
1681
1447
|
fill: "#EBECEF",
|
|
1682
1448
|
d: "M6.05 89.68A6.05 6.05 0 0 0 0 95.73v9.252a6.05 6.05 0 0 0 6.05 6.05h9.253a6.05 6.05 0 0 0 6.05-6.05V95.73c0-.678-.112-1.33-.318-1.94.445.105.908.16 1.385.16h27.758a6.05 6.05 0 0 0 6.05-6.05v-9.252a6.05 6.05 0 0 0-6.05-6.05H22.42a6.05 6.05 0 0 0-6.05 6.05V87.9c0 .678.112 1.33.317 1.939a6.065 6.065 0 0 0-1.385-.16H6.05Zm102.135-40.926a6.05 6.05 0 0 1 6.05-6.05h9.253a6.05 6.05 0 0 1 6.049 6.05v9.253a6.05 6.05 0 0 1-6.049 6.05h-9.253a6.05 6.05 0 0 1-6.05-6.05v-9.253ZM67.616 184.698a6.05 6.05 0 0 1 6.05-6.05h9.252c.678 0 1.33.111 1.939.317a6.064 6.064 0 0 1-.16-1.385v-9.253a6.05 6.05 0 0 1 6.05-6.049H100a6.05 6.05 0 0 1 6.05 6.049v9.253a6.05 6.05 0 0 1-6.05 6.05h-9.253c-.678 0-1.33-.112-1.938-.317.104.444.159.908.159 1.385v9.252a6.05 6.05 0 0 1-6.05 6.05h-9.253a6.05 6.05 0 0 1-6.05-6.05v-9.252Zm78.291-120.285a6.05 6.05 0 0 1 6.05-6.05h41.993a6.05 6.05 0 0 1 6.05 6.05v9.252a6.05 6.05 0 0 1-6.05 6.05h-41.993a6.05 6.05 0 0 1-6.05-6.05v-9.252ZM95.018 0a6.05 6.05 0 0 0-6.05 6.05v17.082a6.05 6.05 0 0 0 6.05 6.05h9.252a6.05 6.05 0 0 0 6.05-6.05V6.05A6.05 6.05 0 0 0 104.27 0h-9.252Z"
|
|
1683
1449
|
}
|
|
1684
1450
|
),
|
|
1685
|
-
/* @__PURE__ */
|
|
1451
|
+
/* @__PURE__ */ jsx10(
|
|
1686
1452
|
"path",
|
|
1687
1453
|
{
|
|
1688
1454
|
fill: "url(#a)",
|
|
@@ -1691,14 +1457,14 @@ var QRPlaceholderIcon = (props) => /* @__PURE__ */ jsxs8("svg", { ...props, xmln
|
|
|
1691
1457
|
clipRule: "evenodd"
|
|
1692
1458
|
}
|
|
1693
1459
|
),
|
|
1694
|
-
/* @__PURE__ */
|
|
1460
|
+
/* @__PURE__ */ jsx10(
|
|
1695
1461
|
"path",
|
|
1696
1462
|
{
|
|
1697
1463
|
fill: "url(#a)",
|
|
1698
1464
|
d: "M197.026 200c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-17.616c0-.778-.313-1.525-.871-2.076a2.996 2.996 0 0 0-2.103-.86h-5.948c-.789 0-1.545.31-2.103.86a2.918 2.918 0 0 0-.871 2.076v8.808h-11.897v-11.744h-11.896v-23.487h11.896v8.808c0 .778.314 1.525.872 2.076.557.55 1.314.86 2.102.86h5.949c.788 0 1.545-.31 2.103-.86a2.922 2.922 0 0 0 .871-2.076v-8.808h8.922c.789 0 1.545-.309 2.103-.86a2.916 2.916 0 0 0 .871-2.076v-5.872c0-.779-.313-1.525-.871-2.076a2.992 2.992 0 0 0-2.103-.86h-29.741c-.789 0-1.545.309-2.103.86a2.916 2.916 0 0 0-.871 2.076v8.808h-23.792v-11.744h8.922c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-5.872c0-.778-.313-1.525-.871-2.076a2.996 2.996 0 0 0-2.103-.86h-5.948c-.789 0-1.546.31-2.103.86a2.918 2.918 0 0 0-.871 2.076v8.808H119.7c-.789 0-1.545.309-2.103.86a2.916 2.916 0 0 0-.871 2.076v5.872c0 .779.313 1.525.871 2.076.558.551 1.314.86 2.103.86h20.819v8.808c0 .778.313 1.525.871 2.076.557.55 1.314.86 2.103.86h8.922v8.808c0 .778.313 1.525.871 2.076.558.55 1.314.859 2.103.859h8.922v11.744h-20.818c-.789 0-1.546.31-2.103.86a2.916 2.916 0 0 0-.871 2.076v5.872c0 .779.313 1.526.871 2.076a2.99 2.99 0 0 0 2.103.86h17.844c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-8.808h11.896v8.808c0 .779.314 1.526.872 2.076a2.99 2.99 0 0 0 2.102.86h17.845Z"
|
|
1699
1465
|
}
|
|
1700
1466
|
),
|
|
1701
|
-
/* @__PURE__ */
|
|
1467
|
+
/* @__PURE__ */ jsx10(
|
|
1702
1468
|
"path",
|
|
1703
1469
|
{
|
|
1704
1470
|
fill: "url(#a)",
|
|
@@ -1707,7 +1473,7 @@ var QRPlaceholderIcon = (props) => /* @__PURE__ */ jsxs8("svg", { ...props, xmln
|
|
|
1707
1473
|
clipRule: "evenodd"
|
|
1708
1474
|
}
|
|
1709
1475
|
),
|
|
1710
|
-
/* @__PURE__ */
|
|
1476
|
+
/* @__PURE__ */ jsx10(
|
|
1711
1477
|
"path",
|
|
1712
1478
|
{
|
|
1713
1479
|
fill: "url(#a)",
|
|
@@ -1716,51 +1482,51 @@ var QRPlaceholderIcon = (props) => /* @__PURE__ */ jsxs8("svg", { ...props, xmln
|
|
|
1716
1482
|
clipRule: "evenodd"
|
|
1717
1483
|
}
|
|
1718
1484
|
),
|
|
1719
|
-
/* @__PURE__ */
|
|
1485
|
+
/* @__PURE__ */ jsx10(
|
|
1720
1486
|
"path",
|
|
1721
1487
|
{
|
|
1722
1488
|
fill: "url(#a)",
|
|
1723
1489
|
d: "M6.05 89.68A6.05 6.05 0 0 0 0 95.73v9.252a6.05 6.05 0 0 0 6.05 6.05h9.253a6.05 6.05 0 0 0 6.05-6.05V95.73c0-.678-.112-1.33-.318-1.94.445.105.908.16 1.385.16h27.758a6.05 6.05 0 0 0 6.05-6.05v-9.252a6.05 6.05 0 0 0-6.05-6.05H22.42a6.05 6.05 0 0 0-6.05 6.05V87.9c0 .678.112 1.33.317 1.939a6.065 6.065 0 0 0-1.385-.16H6.05Z"
|
|
1724
1490
|
}
|
|
1725
1491
|
),
|
|
1726
|
-
/* @__PURE__ */
|
|
1492
|
+
/* @__PURE__ */ jsx10(
|
|
1727
1493
|
"path",
|
|
1728
1494
|
{
|
|
1729
1495
|
fill: "url(#a)",
|
|
1730
1496
|
d: "M108.185 48.754a6.05 6.05 0 0 1 6.05-6.05h9.253a6.05 6.05 0 0 1 6.049 6.05v9.253a6.05 6.05 0 0 1-6.049 6.05h-9.253a6.05 6.05 0 0 1-6.05-6.05v-9.253Z"
|
|
1731
1497
|
}
|
|
1732
1498
|
),
|
|
1733
|
-
/* @__PURE__ */
|
|
1499
|
+
/* @__PURE__ */ jsx10(
|
|
1734
1500
|
"path",
|
|
1735
1501
|
{
|
|
1736
1502
|
fill: "url(#a)",
|
|
1737
1503
|
d: "M67.616 184.698a6.05 6.05 0 0 1 6.05-6.05h9.252c.678 0 1.33.111 1.939.317a6.064 6.064 0 0 1-.16-1.385v-9.253a6.05 6.05 0 0 1 6.05-6.049H100a6.05 6.05 0 0 1 6.05 6.049v9.253a6.05 6.05 0 0 1-6.05 6.05h-9.253c-.678 0-1.33-.112-1.938-.317.104.444.159.908.159 1.385v9.252a6.05 6.05 0 0 1-6.05 6.05h-9.253a6.05 6.05 0 0 1-6.05-6.05v-9.252Z"
|
|
1738
1504
|
}
|
|
1739
1505
|
),
|
|
1740
|
-
/* @__PURE__ */
|
|
1506
|
+
/* @__PURE__ */ jsx10(
|
|
1741
1507
|
"path",
|
|
1742
1508
|
{
|
|
1743
1509
|
fill: "url(#a)",
|
|
1744
1510
|
d: "M145.907 64.413a6.05 6.05 0 0 1 6.05-6.05h41.993a6.05 6.05 0 0 1 6.05 6.05v9.252a6.05 6.05 0 0 1-6.05 6.05h-41.993a6.05 6.05 0 0 1-6.05-6.05v-9.252Z"
|
|
1745
1511
|
}
|
|
1746
1512
|
),
|
|
1747
|
-
/* @__PURE__ */
|
|
1513
|
+
/* @__PURE__ */ jsx10(
|
|
1748
1514
|
"path",
|
|
1749
1515
|
{
|
|
1750
1516
|
fill: "url(#a)",
|
|
1751
1517
|
d: "M95.018 0a6.05 6.05 0 0 0-6.05 6.05v17.082a6.05 6.05 0 0 0 6.05 6.05h9.252a6.05 6.05 0 0 0 6.05-6.05V6.05A6.05 6.05 0 0 0 104.27 0h-9.252Z"
|
|
1752
1518
|
}
|
|
1753
1519
|
),
|
|
1754
|
-
/* @__PURE__ */
|
|
1755
|
-
/* @__PURE__ */
|
|
1756
|
-
/* @__PURE__ */
|
|
1757
|
-
/* @__PURE__ */
|
|
1520
|
+
/* @__PURE__ */ jsx10("defs", { children: /* @__PURE__ */ jsxs6("linearGradient", { id: "a", x1: "0", x2: "200", y1: "0", y2: "200", gradientUnits: "userSpaceOnUse", children: [
|
|
1521
|
+
/* @__PURE__ */ jsx10("stop", { offset: ".37", stopColor: "#fff", stopOpacity: "0" }),
|
|
1522
|
+
/* @__PURE__ */ jsx10("stop", { offset: ".5", stopColor: "#fff", stopOpacity: ".85" }),
|
|
1523
|
+
/* @__PURE__ */ jsx10("stop", { offset: ".63", stopColor: "#fff", stopOpacity: "0" })
|
|
1758
1524
|
] }) })
|
|
1759
1525
|
] });
|
|
1760
1526
|
var QRPlaceholderIcon_default = QRPlaceholderIcon;
|
|
1761
1527
|
|
|
1762
1528
|
// src/components/IDKitWidget/States/WorldID/QRState.tsx
|
|
1763
|
-
import { Fragment
|
|
1529
|
+
import { Fragment, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1764
1530
|
var QRState = ({ qrData, showQR, setShowQR }) => {
|
|
1765
1531
|
const media = useMedia_default();
|
|
1766
1532
|
const [copiedLink, setCopiedLink] = useState2(false);
|
|
@@ -1769,9 +1535,9 @@ var QRState = ({ qrData, showQR, setShowQR }) => {
|
|
|
1769
1535
|
setCopiedLink(true);
|
|
1770
1536
|
setTimeout(() => setCopiedLink(false), 2e3);
|
|
1771
1537
|
}, [qrData]);
|
|
1772
|
-
return /* @__PURE__ */
|
|
1773
|
-
/* @__PURE__ */
|
|
1774
|
-
/* @__PURE__ */
|
|
1538
|
+
return /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
1539
|
+
/* @__PURE__ */ jsxs7("div", { className: "mb-10 space-y-4 md:hidden", children: [
|
|
1540
|
+
/* @__PURE__ */ jsxs7(
|
|
1775
1541
|
motion.a,
|
|
1776
1542
|
{
|
|
1777
1543
|
href: qrData ?? "",
|
|
@@ -1784,8 +1550,8 @@ var QRState = ({ qrData, showQR, setShowQR }) => {
|
|
|
1784
1550
|
"bg-0d151d dark:bg-white text-white dark:text-0d151d"
|
|
1785
1551
|
),
|
|
1786
1552
|
children: [
|
|
1787
|
-
/* @__PURE__ */
|
|
1788
|
-
/* @__PURE__ */
|
|
1553
|
+
/* @__PURE__ */ jsx11(WorldcoinIcon_default, { className: "h-5 w-5" }),
|
|
1554
|
+
/* @__PURE__ */ jsx11(
|
|
1789
1555
|
motion.span,
|
|
1790
1556
|
{
|
|
1791
1557
|
className: "flex-1 text-center",
|
|
@@ -1797,13 +1563,13 @@ var QRState = ({ qrData, showQR, setShowQR }) => {
|
|
|
1797
1563
|
]
|
|
1798
1564
|
}
|
|
1799
1565
|
),
|
|
1800
|
-
/* @__PURE__ */
|
|
1801
|
-
/* @__PURE__ */
|
|
1802
|
-
/* @__PURE__ */
|
|
1803
|
-
/* @__PURE__ */
|
|
1804
|
-
/* @__PURE__ */
|
|
1566
|
+
/* @__PURE__ */ jsxs7("div", { className: "space-y-4", children: [
|
|
1567
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center space-x-4 ", children: [
|
|
1568
|
+
/* @__PURE__ */ jsx11("hr", { className: "flex-1" }),
|
|
1569
|
+
/* @__PURE__ */ jsx11("span", { className: "text-xs font-medium text-9ba3ae", children: "or" }),
|
|
1570
|
+
/* @__PURE__ */ jsx11("hr", { className: "flex-1" })
|
|
1805
1571
|
] }),
|
|
1806
|
-
/* @__PURE__ */
|
|
1572
|
+
/* @__PURE__ */ jsx11(
|
|
1807
1573
|
motion.button,
|
|
1808
1574
|
{
|
|
1809
1575
|
className: "w-full rounded-2xl border border-ebecef p-4 text-lg font-medium text-3c424b",
|
|
@@ -1813,8 +1579,8 @@ var QRState = ({ qrData, showQR, setShowQR }) => {
|
|
|
1813
1579
|
)
|
|
1814
1580
|
] })
|
|
1815
1581
|
] }),
|
|
1816
|
-
(media == "desktop" || showQR) && /* @__PURE__ */
|
|
1817
|
-
/* @__PURE__ */
|
|
1582
|
+
(media == "desktop" || showQR) && /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
1583
|
+
/* @__PURE__ */ jsx11(AnimatePresence, { children: copiedLink && /* @__PURE__ */ jsx11(
|
|
1818
1584
|
motion.div,
|
|
1819
1585
|
{
|
|
1820
1586
|
className: "text-sm text-9eafc0",
|
|
@@ -1847,14 +1613,14 @@ var QRState = ({ qrData, showQR, setShowQR }) => {
|
|
|
1847
1613
|
}
|
|
1848
1614
|
}
|
|
1849
1615
|
},
|
|
1850
|
-
children: /* @__PURE__ */
|
|
1616
|
+
children: /* @__PURE__ */ jsx11("span", { className: "rounded-lg border border-f1f5f8 px-2 py-1 text-sm", children: __("QR Code copied") })
|
|
1851
1617
|
},
|
|
1852
1618
|
"copied"
|
|
1853
1619
|
) }),
|
|
1854
|
-
/* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ jsx11("div", { className: "relative inline-flex items-center justify-center rounded-2xl border border-f1f5f8 p-2 dark:border-f1f5f8/10", children: /* @__PURE__ */ jsx11("div", { className: "text-29343f dark:text-white", children: qrData ? (
|
|
1855
1621
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
1856
|
-
/* @__PURE__ */
|
|
1857
|
-
) : /* @__PURE__ */
|
|
1622
|
+
/* @__PURE__ */ jsx11("div", { onClick: copyLink, className: "cursor-pointer", children: /* @__PURE__ */ jsx11(QRCode_default, { data: qrData, size: 244 }) })
|
|
1623
|
+
) : /* @__PURE__ */ jsx11("div", { className: "flex h-[244px] w-[244px] items-center justify-center", children: /* @__PURE__ */ jsx11(QRPlaceholderIcon_default, { className: "h-[244px] w-[244px] animate-pulse" }) }) }) })
|
|
1858
1624
|
] })
|
|
1859
1625
|
] });
|
|
1860
1626
|
};
|
|
@@ -1892,8 +1658,8 @@ var useWorldBridge = (app_id, action, signal, bridge_url, verification_level, ac
|
|
|
1892
1658
|
};
|
|
1893
1659
|
|
|
1894
1660
|
// src/components/Icons/LoadingIcon.tsx
|
|
1895
|
-
import { jsx as
|
|
1896
|
-
var LoadingIcon = ({ className, ...props }) => /* @__PURE__ */
|
|
1661
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1662
|
+
var LoadingIcon = ({ className, ...props }) => /* @__PURE__ */ jsxs8(
|
|
1897
1663
|
"svg",
|
|
1898
1664
|
{
|
|
1899
1665
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1902,8 +1668,8 @@ var LoadingIcon = ({ className, ...props }) => /* @__PURE__ */ jsxs10(
|
|
|
1902
1668
|
className: `animate-spin motion-reduce:animate-[spin_1.5s_linear_infinite] ${className}`,
|
|
1903
1669
|
...props,
|
|
1904
1670
|
children: [
|
|
1905
|
-
/* @__PURE__ */
|
|
1906
|
-
/* @__PURE__ */
|
|
1671
|
+
/* @__PURE__ */ jsx12("circle", { cx: "12", cy: "12", r: "10.75", stroke: "#191C20", strokeOpacity: ".16", strokeWidth: "2.5" }),
|
|
1672
|
+
/* @__PURE__ */ jsx12(
|
|
1907
1673
|
"path",
|
|
1908
1674
|
{
|
|
1909
1675
|
fill: "#191C20",
|
|
@@ -1917,7 +1683,7 @@ var LoadingIcon_default = LoadingIcon;
|
|
|
1917
1683
|
|
|
1918
1684
|
// src/components/IDKitWidget/States/WorldIDState.tsx
|
|
1919
1685
|
import { AppErrorCodes as AppErrorCodes2, VerificationState, VerificationLevel } from "@worldcoin/idkit-core";
|
|
1920
|
-
import { jsx as
|
|
1686
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1921
1687
|
var getOptions = (store) => ({
|
|
1922
1688
|
signal: store.signal,
|
|
1923
1689
|
app_id: store.app_id,
|
|
@@ -1968,25 +1734,25 @@ var WorldIDState = () => {
|
|
|
1968
1734
|
return handleVerify(result);
|
|
1969
1735
|
}
|
|
1970
1736
|
}, [result, handleVerify, verificationState, setStage, errorCode, setErrorState, verification_level]);
|
|
1971
|
-
return /* @__PURE__ */
|
|
1972
|
-
/* @__PURE__ */
|
|
1973
|
-
/* @__PURE__ */
|
|
1974
|
-
/* @__PURE__ */
|
|
1975
|
-
/* @__PURE__ */
|
|
1737
|
+
return /* @__PURE__ */ jsxs9("div", { className: "-mt-6 space-y-10", children: [
|
|
1738
|
+
/* @__PURE__ */ jsxs9("div", { children: [
|
|
1739
|
+
/* @__PURE__ */ jsx13("div", { className: "mb-4 flex items-center justify-center", children: /* @__PURE__ */ jsx13(WorldcoinIcon_default, { className: "h-10 text-0d151d dark:text-white" }) }),
|
|
1740
|
+
/* @__PURE__ */ jsx13("p", { className: "text-center font-sora text-2xl font-semibold text-gray-900 dark:text-white", children: __("Verify with World ID") }),
|
|
1741
|
+
/* @__PURE__ */ jsx13("p", { className: "mt-3 text-center text-657080 dark:text-9eafc0 md:mt-2", children: "Please use your World App to scan the QR code" })
|
|
1976
1742
|
] }),
|
|
1977
|
-
/* @__PURE__ */
|
|
1978
|
-
verificationState == VerificationState.WaitingForApp && /* @__PURE__ */
|
|
1979
|
-
/* @__PURE__ */
|
|
1980
|
-
/* @__PURE__ */
|
|
1981
|
-
/* @__PURE__ */
|
|
1982
|
-
/* @__PURE__ */
|
|
1743
|
+
/* @__PURE__ */ jsxs9("div", { className: "relative", children: [
|
|
1744
|
+
verificationState == VerificationState.WaitingForApp && /* @__PURE__ */ jsxs9("div", { className: "absolute inset-0 flex flex-col items-center justify-center space-y-6", children: [
|
|
1745
|
+
/* @__PURE__ */ jsx13(LoadingIcon_default, { className: "h-6 w-6" }),
|
|
1746
|
+
/* @__PURE__ */ jsxs9("div", { children: [
|
|
1747
|
+
/* @__PURE__ */ jsx13("p", { className: "font-bold text-657080", children: "Verifying" }),
|
|
1748
|
+
/* @__PURE__ */ jsx13("p", { className: "text-sm text-657080", children: "Please continue in app" })
|
|
1983
1749
|
] })
|
|
1984
1750
|
] }),
|
|
1985
|
-
/* @__PURE__ */
|
|
1751
|
+
/* @__PURE__ */ jsx13(
|
|
1986
1752
|
"div",
|
|
1987
1753
|
{
|
|
1988
1754
|
className: verificationState === VerificationState.WaitingForApp ? "opacity-40 blur-lg transition duration-500 ease-in-out" : "transition duration-500 ease-in-out",
|
|
1989
|
-
children: /* @__PURE__ */
|
|
1755
|
+
children: /* @__PURE__ */ jsx13(QRState_default, { showQR, setShowQR, qrData: connectorURI })
|
|
1990
1756
|
}
|
|
1991
1757
|
)
|
|
1992
1758
|
] })
|
|
@@ -1996,51 +1762,37 @@ var WorldIDState_default = WorldIDState;
|
|
|
1996
1762
|
|
|
1997
1763
|
// src/components/IDKitWidget/BaseWidget.tsx
|
|
1998
1764
|
import * as Dialog from "@radix-ui/react-dialog";
|
|
1999
|
-
import { Fragment as
|
|
1765
|
+
import { Fragment as Fragment2, useEffect as useEffect5, useMemo } from "react";
|
|
2000
1766
|
import { AnimatePresence as AnimatePresence2, motion as motion2 } from "framer-motion";
|
|
2001
1767
|
|
|
2002
|
-
// src/components/Icons/ArrowLongLeftIcon.tsx
|
|
2003
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
2004
|
-
var ArrowLongLeftIcon = (props) => /* @__PURE__ */ jsx17(
|
|
2005
|
-
"svg",
|
|
2006
|
-
{
|
|
2007
|
-
...props,
|
|
2008
|
-
fill: "none",
|
|
2009
|
-
strokeWidth: 1.5,
|
|
2010
|
-
viewBox: "0 0 24 24",
|
|
2011
|
-
stroke: "currentColor",
|
|
2012
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2013
|
-
children: /* @__PURE__ */ jsx17("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6.75 15.75L3 12m0 0l3.75-3.75M3 12h18" })
|
|
2014
|
-
}
|
|
2015
|
-
);
|
|
2016
|
-
var ArrowLongLeftIcon_default = ArrowLongLeftIcon;
|
|
2017
|
-
|
|
2018
1768
|
// src/components/IDKitWidget/States/HostAppVerificationState.tsx
|
|
2019
1769
|
import { memo } from "react";
|
|
2020
|
-
import { jsx as
|
|
1770
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2021
1771
|
var HostAppVerificationState = () => {
|
|
2022
|
-
return /* @__PURE__ */
|
|
2023
|
-
/* @__PURE__ */
|
|
2024
|
-
/* @__PURE__ */
|
|
1772
|
+
return /* @__PURE__ */ jsxs10("div", { className: "space-y-6", children: [
|
|
1773
|
+
/* @__PURE__ */ jsx14("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx14(LoadingIcon_default, { className: "h-24 w-24" }) }),
|
|
1774
|
+
/* @__PURE__ */ jsx14("div", { className: "mt-4 text-70868f", children: __("Transmitting verification to host app. Please wait...") })
|
|
2025
1775
|
] });
|
|
2026
1776
|
};
|
|
2027
1777
|
var HostAppVerificationState_default = memo(HostAppVerificationState);
|
|
2028
1778
|
|
|
2029
1779
|
// src/components/IDKitWidget/BaseWidget.tsx
|
|
2030
|
-
import { jsx as
|
|
2031
|
-
var getParams2 = ({ open, processing, onOpenChange, stage, setStage,
|
|
1780
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1781
|
+
var getParams2 = ({ open, processing, onOpenChange, stage, setStage, setOptions }) => ({
|
|
2032
1782
|
stage,
|
|
2033
1783
|
setStage,
|
|
2034
1784
|
processing,
|
|
2035
1785
|
setOptions,
|
|
2036
1786
|
isOpen: open,
|
|
2037
|
-
onOpenChange
|
|
2038
|
-
canGoBack: computed.canGoBack(stage)
|
|
1787
|
+
onOpenChange
|
|
2039
1788
|
});
|
|
2040
1789
|
var IDKitWidget = ({ children, ...config }) => {
|
|
2041
1790
|
const media = useMedia_default();
|
|
2042
|
-
const { isOpen, onOpenChange, stage,
|
|
1791
|
+
const { isOpen, onOpenChange, stage, setOptions } = idkit_default(getParams2, shallow2);
|
|
2043
1792
|
useEffect5(() => {
|
|
1793
|
+
if (config.action === "") {
|
|
1794
|
+
throw new Error(__("Action cannot be an empty string."));
|
|
1795
|
+
}
|
|
2044
1796
|
setOptions(config, "props" /* PROPS */);
|
|
2045
1797
|
}, [config, setOptions]);
|
|
2046
1798
|
const StageContent = useMemo(() => {
|
|
@@ -2051,20 +1803,18 @@ var IDKitWidget = ({ children, ...config }) => {
|
|
|
2051
1803
|
return SuccessState_default;
|
|
2052
1804
|
case "ERROR" /* ERROR */:
|
|
2053
1805
|
return ErrorState_default;
|
|
2054
|
-
case "PRIVACY" /* PRIVACY */:
|
|
2055
|
-
return PrivacyState_default;
|
|
2056
1806
|
case "HOST_APP_VERIFICATION" /* HOST_APP_VERIFICATION */:
|
|
2057
1807
|
return HostAppVerificationState_default;
|
|
2058
1808
|
default:
|
|
2059
1809
|
throw new Error(__("Invalid IDKitStage :stage.", { stage }));
|
|
2060
1810
|
}
|
|
2061
1811
|
}, [stage]);
|
|
2062
|
-
return /* @__PURE__ */
|
|
1812
|
+
return /* @__PURE__ */ jsxs11(Dialog.Root, { open: isOpen, onOpenChange, children: [
|
|
2063
1813
|
children?.({ open: () => onOpenChange(true) }),
|
|
2064
|
-
/* @__PURE__ */
|
|
2065
|
-
/* @__PURE__ */
|
|
2066
|
-
/* @__PURE__ */
|
|
2067
|
-
/* @__PURE__ */
|
|
1814
|
+
/* @__PURE__ */ jsx15(Dialog.Portal, { forceMount: true, children: /* @__PURE__ */ jsx15(Fragment2, { children: /* @__PURE__ */ jsx15(AnimatePresence2, { children: isOpen && /* @__PURE__ */ jsxs11(root.div, { mode: "open", id: "idkit-widget", children: [
|
|
1815
|
+
/* @__PURE__ */ jsx15(Styles_default, {}),
|
|
1816
|
+
/* @__PURE__ */ jsxs11("div", { id: "modal", className: "fixed z-10 font-sans", children: [
|
|
1817
|
+
/* @__PURE__ */ jsx15(Dialog.Overlay, { asChild: true, children: /* @__PURE__ */ jsx15(
|
|
2068
1818
|
motion2.div,
|
|
2069
1819
|
{
|
|
2070
1820
|
initial: { opacity: 0 },
|
|
@@ -2073,7 +1823,7 @@ var IDKitWidget = ({ children, ...config }) => {
|
|
|
2073
1823
|
className: "fixed inset-0 bg-black/50 backdrop-blur-lg"
|
|
2074
1824
|
}
|
|
2075
1825
|
) }),
|
|
2076
|
-
/* @__PURE__ */
|
|
1826
|
+
/* @__PURE__ */ jsx15("div", { className: "fixed inset-0 z-10 overflow-y-hidden md:overflow-y-auto", children: /* @__PURE__ */ jsx15("div", { className: "flex min-h-full items-end justify-center text-center md:items-center md:p-4", children: /* @__PURE__ */ jsx15(Dialog.Content, { asChild: true, children: /* @__PURE__ */ jsx15(
|
|
2077
1827
|
motion2.div,
|
|
2078
1828
|
{
|
|
2079
1829
|
layout: media == "mobile" ? "position" : true,
|
|
@@ -2088,26 +1838,12 @@ var IDKitWidget = ({ children, ...config }) => {
|
|
|
2088
1838
|
},
|
|
2089
1839
|
transition: { layout: { duration: 0.15 } },
|
|
2090
1840
|
className: "relative z-50 flex min-h-screen w-full flex-col bg-white pt-6 shadow focus:outline-none focus-visible:ring focus-visible:ring-purple-500/75 dark:bg-0d151d md:min-h-[35rem] md:max-w-md md:rounded-2xl",
|
|
2091
|
-
children: /* @__PURE__ */
|
|
2092
|
-
/* @__PURE__ */
|
|
2093
|
-
/* @__PURE__ */
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
onClick: () => setStage("WORLD_ID" /* WORLD_ID */),
|
|
2098
|
-
disabled: !canGoBack,
|
|
2099
|
-
className: classNames(
|
|
2100
|
-
!canGoBack && "invisible pointer-events-none",
|
|
2101
|
-
"dark:bg-d3dfea/15 flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 dark:text-white"
|
|
2102
|
-
),
|
|
2103
|
-
children: /* @__PURE__ */ jsx19(ArrowLongLeftIcon_default, { className: "w-4" })
|
|
2104
|
-
}
|
|
2105
|
-
),
|
|
2106
|
-
/* @__PURE__ */ jsx19(Dialog.Close, { className: "flex items-center justify-center rounded-full dark:text-white", children: /* @__PURE__ */ jsx19(XMarkIcon_default, { className: "h-5 w-5" }) })
|
|
2107
|
-
] }),
|
|
2108
|
-
/* @__PURE__ */ jsx19("div", { className: "relative mx-6 mb-6 flex flex-1 flex-col items-center justify-center", children: /* @__PURE__ */ jsx19(StageContent, {}) }),
|
|
2109
|
-
/* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between border-t border-f5f5f7 p-7 md:rounded-b-2xl", children: [
|
|
2110
|
-
/* @__PURE__ */ jsxs13(
|
|
1841
|
+
children: /* @__PURE__ */ jsxs11(Toast.Provider, { children: [
|
|
1842
|
+
/* @__PURE__ */ jsx15(Toast.Viewport, { className: "flex justify-center" }),
|
|
1843
|
+
/* @__PURE__ */ jsx15("div", { className: "mx-6 mb-12 flex items-center justify-between", children: /* @__PURE__ */ jsx15(Dialog.Close, { className: "flex items-center justify-center rounded-full dark:text-white", children: /* @__PURE__ */ jsx15(XMarkIcon_default, { className: "h-5 w-5" }) }) }),
|
|
1844
|
+
/* @__PURE__ */ jsx15("div", { className: "relative mx-6 mb-6 flex flex-1 flex-col items-center justify-center", children: /* @__PURE__ */ jsx15(StageContent, {}) }),
|
|
1845
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between border-t border-f5f5f7 p-7 md:rounded-b-2xl", children: [
|
|
1846
|
+
/* @__PURE__ */ jsxs11(
|
|
2111
1847
|
"a",
|
|
2112
1848
|
{
|
|
2113
1849
|
href: "https://worldcoin.org/world-id",
|
|
@@ -2115,12 +1851,12 @@ var IDKitWidget = ({ children, ...config }) => {
|
|
|
2115
1851
|
rel: "noreferrer",
|
|
2116
1852
|
className: "flex items-center gap-1 text-sm text-9eafc0",
|
|
2117
1853
|
children: [
|
|
2118
|
-
/* @__PURE__ */
|
|
2119
|
-
/* @__PURE__ */
|
|
1854
|
+
/* @__PURE__ */ jsx15(WorldcoinIcon_default, { className: "w-4 text-9eafc0 dark:text-white" }),
|
|
1855
|
+
/* @__PURE__ */ jsx15("span", { children: __("Powered by Worldcoin") })
|
|
2120
1856
|
]
|
|
2121
1857
|
}
|
|
2122
1858
|
),
|
|
2123
|
-
/* @__PURE__ */
|
|
1859
|
+
/* @__PURE__ */ jsx15(
|
|
2124
1860
|
"a",
|
|
2125
1861
|
{
|
|
2126
1862
|
href: "https://developer.worldcoin.org/privacy-statement",
|
|
@@ -2146,9 +1882,11 @@ var IDKitWidget_default = memo2(BaseWidget_default);
|
|
|
2146
1882
|
// src/index.ts
|
|
2147
1883
|
import { VerificationLevel as VerificationLevel2 } from "@worldcoin/idkit-core";
|
|
2148
1884
|
import { solidityEncode } from "@worldcoin/idkit-core/hashing";
|
|
1885
|
+
import { verifyCloudProof } from "@worldcoin/idkit-core/backend";
|
|
2149
1886
|
export {
|
|
2150
1887
|
IDKitWidget_default as IDKitWidget,
|
|
2151
1888
|
VerificationLevel2 as VerificationLevel,
|
|
2152
1889
|
solidityEncode,
|
|
2153
|
-
useIDKit_default as useIDKit
|
|
1890
|
+
useIDKit_default as useIDKit,
|
|
1891
|
+
verifyCloudProof
|
|
2154
1892
|
};
|
package/build/internal.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import * as zustand_traditional from 'zustand/traditional';
|
|
3
3
|
import * as zustand from 'zustand';
|
|
4
|
-
import { I as IDKITStage, a as ConfigSource, b as CallbackFn, C as Config } from './config-
|
|
4
|
+
import { I as IDKITStage, a as ConfigSource, b as CallbackFn, C as Config } from './config-19dfed99.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;
|
package/build/internal.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worldcoin/idkit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"homepage": "https://docs.worldcoin.org/id/idkit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -53,18 +53,15 @@
|
|
|
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
56
|
"@radix-ui/react-dialog": "^1.0.3",
|
|
59
57
|
"@radix-ui/react-toast": "^1.1.3",
|
|
60
58
|
"@tailwindcss/forms": "^0.5.3",
|
|
61
59
|
"copy-to-clipboard": "^3.3.3",
|
|
62
60
|
"framer-motion": "^7.6.7",
|
|
63
|
-
"posthog-js-lite": "2.4.0",
|
|
64
61
|
"qrcode": "^1.5.1",
|
|
65
62
|
"react-shadow": "^19.1.0",
|
|
66
|
-
"zustand": "^4.
|
|
67
|
-
"@worldcoin/idkit-core": "1.
|
|
63
|
+
"zustand": "^4.5",
|
|
64
|
+
"@worldcoin/idkit-core": "1.2.0"
|
|
68
65
|
},
|
|
69
66
|
"devDependencies": {
|
|
70
67
|
"@types/node": "18.11.9",
|
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
|