@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.
- package/build/{chunk-JCPD6J62.js → chunk-OPIVJQZ6.js} +10 -25
- package/build/{config-71e4be16.d.ts → config-Cp9MWjvm.d.ts} +1 -2
- package/build/index.d.ts +2 -1
- package/build/index.js +182 -407
- package/build/internal.d.ts +3 -6
- package/build/internal.js +1 -1
- package/package.json +23 -26
- package/src/index.ts +4 -2
- package/build/verified-O6D4JQCX.webp +0 -0
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-OPIVJQZ6.js";
|
|
6
6
|
|
|
7
7
|
// src/hooks/useIDKit.ts
|
|
8
8
|
import { useEffect } from "react";
|
|
@@ -15,10 +15,8 @@ var getStore = ({ open, onOpenChange, addSuccessCallback, addVerificationCallbac
|
|
|
15
15
|
var useIDKit = ({ handleVerify, onSuccess } = {}) => {
|
|
16
16
|
const { open, onOpenChange, addSuccessCallback, addVerificationCallback } = idkit_default(getStore);
|
|
17
17
|
useEffect(() => {
|
|
18
|
-
if (onSuccess)
|
|
19
|
-
|
|
20
|
-
if (handleVerify)
|
|
21
|
-
addVerificationCallback(handleVerify, "hook" /* HOOK */);
|
|
18
|
+
if (onSuccess) addSuccessCallback(onSuccess, "hook" /* HOOK */);
|
|
19
|
+
if (handleVerify) addVerificationCallback(handleVerify, "hook" /* HOOK */);
|
|
22
20
|
}, [handleVerify, onSuccess]);
|
|
23
21
|
return { open, setOpen: onOpenChange };
|
|
24
22
|
};
|
|
@@ -47,15 +45,10 @@ var useMedia = () => {
|
|
|
47
45
|
};
|
|
48
46
|
var useMedia_default = useMedia;
|
|
49
47
|
|
|
50
|
-
// src/lib/utils.ts
|
|
51
|
-
var classNames = (...classes) => {
|
|
52
|
-
return classes.filter(Boolean).join(" ");
|
|
53
|
-
};
|
|
54
|
-
|
|
55
48
|
// src/styles/styles.css
|
|
56
49
|
var styles_default = `/* TODO: Use an alternative to avoid the extra request to Google (e.g. hosting ourselves, or local file) */
|
|
57
50
|
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&family=Sora:wght@600&display=swap');
|
|
58
|
-
/* ! tailwindcss v3.
|
|
51
|
+
/* ! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com */
|
|
59
52
|
/*
|
|
60
53
|
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|
61
54
|
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
|
@@ -79,16 +72,19 @@ var styles_default = `/* TODO: Use an alternative to avoid the extra request to
|
|
|
79
72
|
4. Use the user's configured \`sans\` font-family by default.
|
|
80
73
|
5. Use the user's configured \`sans\` font-feature-settings by default.
|
|
81
74
|
6. Use the user's configured \`sans\` font-variation-settings by default.
|
|
75
|
+
7. Disable tap highlights on iOS
|
|
82
76
|
*/
|
|
83
|
-
html
|
|
77
|
+
html,
|
|
78
|
+
:host {
|
|
84
79
|
line-height: 1.5; /* 1 */
|
|
85
80
|
-webkit-text-size-adjust: 100%; /* 2 */
|
|
86
81
|
-moz-tab-size: 4; /* 3 */
|
|
87
82
|
-o-tab-size: 4;
|
|
88
83
|
tab-size: 4; /* 3 */
|
|
89
|
-
font-family: Rubik, ui-sans-serif, system-ui,
|
|
84
|
+
font-family: Rubik, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
|
|
90
85
|
font-feature-settings: normal; /* 5 */
|
|
91
86
|
font-variation-settings: normal; /* 6 */
|
|
87
|
+
-webkit-tap-highlight-color: transparent; /* 7 */
|
|
92
88
|
}
|
|
93
89
|
/*
|
|
94
90
|
1. Remove the margin in all browsers.
|
|
@@ -142,15 +138,19 @@ strong {
|
|
|
142
138
|
font-weight: bolder;
|
|
143
139
|
}
|
|
144
140
|
/*
|
|
145
|
-
1. Use the user's configured \`mono\` font
|
|
146
|
-
2.
|
|
141
|
+
1. Use the user's configured \`mono\` font-family by default.
|
|
142
|
+
2. Use the user's configured \`mono\` font-feature-settings by default.
|
|
143
|
+
3. Use the user's configured \`mono\` font-variation-settings by default.
|
|
144
|
+
4. Correct the odd \`em\` font sizing in all browsers.
|
|
147
145
|
*/
|
|
148
146
|
code,
|
|
149
147
|
kbd,
|
|
150
148
|
samp,
|
|
151
149
|
pre {
|
|
152
150
|
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
|
|
153
|
-
font-
|
|
151
|
+
font-feature-settings: normal; /* 2 */
|
|
152
|
+
font-variation-settings: normal; /* 3 */
|
|
153
|
+
font-size: 1em; /* 4 */
|
|
154
154
|
}
|
|
155
155
|
/*
|
|
156
156
|
Add the correct font size in all browsers.
|
|
@@ -200,6 +200,7 @@ textarea {
|
|
|
200
200
|
font-size: 100%; /* 1 */
|
|
201
201
|
font-weight: inherit; /* 1 */
|
|
202
202
|
line-height: inherit; /* 1 */
|
|
203
|
+
letter-spacing: inherit; /* 1 */
|
|
203
204
|
color: inherit; /* 1 */
|
|
204
205
|
margin: 0; /* 2 */
|
|
205
206
|
padding: 0; /* 3 */
|
|
@@ -216,9 +217,9 @@ select {
|
|
|
216
217
|
2. Remove default button styles.
|
|
217
218
|
*/
|
|
218
219
|
button,
|
|
219
|
-
[type='button'],
|
|
220
|
-
[type='reset'],
|
|
221
|
-
[type='submit'] {
|
|
220
|
+
input:where([type='button']),
|
|
221
|
+
input:where([type='reset']),
|
|
222
|
+
input:where([type='submit']) {
|
|
222
223
|
-webkit-appearance: button; /* 1 */
|
|
223
224
|
background-color: transparent; /* 2 */
|
|
224
225
|
background-image: none; /* 2 */
|
|
@@ -491,9 +492,23 @@ select{
|
|
|
491
492
|
[type='checkbox']:checked{
|
|
492
493
|
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
|
|
493
494
|
}
|
|
495
|
+
@media (forced-colors: active) {
|
|
496
|
+
[type='checkbox']:checked{
|
|
497
|
+
-webkit-appearance: auto;
|
|
498
|
+
-moz-appearance: auto;
|
|
499
|
+
appearance: auto;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
494
502
|
[type='radio']:checked{
|
|
495
503
|
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
|
|
496
504
|
}
|
|
505
|
+
@media (forced-colors: active) {
|
|
506
|
+
[type='radio']:checked{
|
|
507
|
+
-webkit-appearance: auto;
|
|
508
|
+
-moz-appearance: auto;
|
|
509
|
+
appearance: auto;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
497
512
|
[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus{
|
|
498
513
|
border-color: transparent;
|
|
499
514
|
background-color: currentColor;
|
|
@@ -506,6 +521,13 @@ select{
|
|
|
506
521
|
background-position: center;
|
|
507
522
|
background-repeat: no-repeat;
|
|
508
523
|
}
|
|
524
|
+
@media (forced-colors: active) {
|
|
525
|
+
[type='checkbox']:indeterminate{
|
|
526
|
+
-webkit-appearance: auto;
|
|
527
|
+
-moz-appearance: auto;
|
|
528
|
+
appearance: auto;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
509
531
|
[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus{
|
|
510
532
|
border-color: transparent;
|
|
511
533
|
background-color: currentColor;
|
|
@@ -571,6 +593,10 @@ select{
|
|
|
571
593
|
--tw-backdrop-opacity: ;
|
|
572
594
|
--tw-backdrop-saturate: ;
|
|
573
595
|
--tw-backdrop-sepia: ;
|
|
596
|
+
--tw-contain-size: ;
|
|
597
|
+
--tw-contain-layout: ;
|
|
598
|
+
--tw-contain-paint: ;
|
|
599
|
+
--tw-contain-style: ;
|
|
574
600
|
}
|
|
575
601
|
::backdrop{
|
|
576
602
|
--tw-border-spacing-x: 0;
|
|
@@ -620,49 +646,14 @@ select{
|
|
|
620
646
|
--tw-backdrop-opacity: ;
|
|
621
647
|
--tw-backdrop-saturate: ;
|
|
622
648
|
--tw-backdrop-sepia: ;
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
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;
|
|
649
|
+
--tw-contain-size: ;
|
|
650
|
+
--tw-contain-layout: ;
|
|
651
|
+
--tw-contain-paint: ;
|
|
652
|
+
--tw-contain-style: ;
|
|
659
653
|
}
|
|
660
654
|
.visible{
|
|
661
655
|
visibility: visible;
|
|
662
656
|
}
|
|
663
|
-
.invisible{
|
|
664
|
-
visibility: hidden;
|
|
665
|
-
}
|
|
666
657
|
.fixed{
|
|
667
658
|
position: fixed;
|
|
668
659
|
}
|
|
@@ -675,12 +666,6 @@ select{
|
|
|
675
666
|
.inset-0{
|
|
676
667
|
inset: 0;
|
|
677
668
|
}
|
|
678
|
-
.left-1\\/2{
|
|
679
|
-
left: 50%;
|
|
680
|
-
}
|
|
681
|
-
.top-1\\/2{
|
|
682
|
-
top: 50%;
|
|
683
|
-
}
|
|
684
669
|
.z-10{
|
|
685
670
|
z-index: 10;
|
|
686
671
|
}
|
|
@@ -695,18 +680,12 @@ select{
|
|
|
695
680
|
margin-left: auto;
|
|
696
681
|
margin-right: auto;
|
|
697
682
|
}
|
|
698
|
-
.-ml-4{
|
|
699
|
-
margin-left: -16px;
|
|
700
|
-
}
|
|
701
683
|
.-mt-5{
|
|
702
684
|
margin-top: -20px;
|
|
703
685
|
}
|
|
704
686
|
.-mt-6{
|
|
705
687
|
margin-top: -24px;
|
|
706
688
|
}
|
|
707
|
-
.-mt-\\[2px\\]{
|
|
708
|
-
margin-top: -2px;
|
|
709
|
-
}
|
|
710
689
|
.mb-10{
|
|
711
690
|
margin-bottom: 40px;
|
|
712
691
|
}
|
|
@@ -734,9 +713,6 @@ select{
|
|
|
734
713
|
.mt-4{
|
|
735
714
|
margin-top: 16px;
|
|
736
715
|
}
|
|
737
|
-
.mt-\\[2px\\]{
|
|
738
|
-
margin-top: 2px;
|
|
739
|
-
}
|
|
740
716
|
.flex{
|
|
741
717
|
display: flex;
|
|
742
718
|
}
|
|
@@ -746,33 +722,18 @@ select{
|
|
|
746
722
|
.hidden{
|
|
747
723
|
display: none;
|
|
748
724
|
}
|
|
749
|
-
.aspect-square{
|
|
750
|
-
aspect-ratio: 1 / 1;
|
|
751
|
-
}
|
|
752
725
|
.h-10{
|
|
753
726
|
height: 40px;
|
|
754
727
|
}
|
|
755
|
-
.h-12{
|
|
756
|
-
height: 48px;
|
|
757
|
-
}
|
|
758
728
|
.h-24{
|
|
759
729
|
height: 96px;
|
|
760
730
|
}
|
|
761
|
-
.h-3{
|
|
762
|
-
height: 12px;
|
|
763
|
-
}
|
|
764
|
-
.h-4{
|
|
765
|
-
height: 16px;
|
|
766
|
-
}
|
|
767
731
|
.h-5{
|
|
768
732
|
height: 20px;
|
|
769
733
|
}
|
|
770
734
|
.h-6{
|
|
771
735
|
height: 24px;
|
|
772
736
|
}
|
|
773
|
-
.h-8{
|
|
774
|
-
height: 32px;
|
|
775
|
-
}
|
|
776
737
|
.h-\\[244px\\]{
|
|
777
738
|
height: 244px;
|
|
778
739
|
}
|
|
@@ -782,15 +743,9 @@ select{
|
|
|
782
743
|
.min-h-screen{
|
|
783
744
|
min-height: 100vh;
|
|
784
745
|
}
|
|
785
|
-
.w-12{
|
|
786
|
-
width: 48px;
|
|
787
|
-
}
|
|
788
746
|
.w-24{
|
|
789
747
|
width: 96px;
|
|
790
748
|
}
|
|
791
|
-
.w-3{
|
|
792
|
-
width: 12px;
|
|
793
|
-
}
|
|
794
749
|
.w-4{
|
|
795
750
|
width: 16px;
|
|
796
751
|
}
|
|
@@ -800,15 +755,9 @@ select{
|
|
|
800
755
|
.w-6{
|
|
801
756
|
width: 24px;
|
|
802
757
|
}
|
|
803
|
-
.w-8{
|
|
804
|
-
width: 32px;
|
|
805
|
-
}
|
|
806
758
|
.w-\\[244px\\]{
|
|
807
759
|
width: 244px;
|
|
808
760
|
}
|
|
809
|
-
.w-\\[34px\\]{
|
|
810
|
-
width: 34px;
|
|
811
|
-
}
|
|
812
761
|
.w-full{
|
|
813
762
|
width: 100%;
|
|
814
763
|
}
|
|
@@ -818,17 +767,6 @@ select{
|
|
|
818
767
|
.flex-1{
|
|
819
768
|
flex: 1 1 0%;
|
|
820
769
|
}
|
|
821
|
-
.-translate-x-1\\/2{
|
|
822
|
-
--tw-translate-x: -50%;
|
|
823
|
-
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));
|
|
824
|
-
}
|
|
825
|
-
.-translate-y-1\\/2{
|
|
826
|
-
--tw-translate-y: -50%;
|
|
827
|
-
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));
|
|
828
|
-
}
|
|
829
|
-
.transform{
|
|
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
770
|
@keyframes pulse{
|
|
833
771
|
50%{
|
|
834
772
|
opacity: .5;
|
|
@@ -848,9 +786,6 @@ select{
|
|
|
848
786
|
.cursor-pointer{
|
|
849
787
|
cursor: pointer;
|
|
850
788
|
}
|
|
851
|
-
.list-disc{
|
|
852
|
-
list-style-type: disc;
|
|
853
|
-
}
|
|
854
789
|
.flex-col{
|
|
855
790
|
flex-direction: column;
|
|
856
791
|
}
|
|
@@ -874,31 +809,16 @@ select{
|
|
|
874
809
|
margin-right: calc(8px * var(--tw-space-x-reverse));
|
|
875
810
|
margin-left: calc(8px * calc(1 - var(--tw-space-x-reverse)));
|
|
876
811
|
}
|
|
877
|
-
.space-x-3 > :not([hidden]) ~ :not([hidden]){
|
|
878
|
-
--tw-space-x-reverse: 0;
|
|
879
|
-
margin-right: calc(12px * var(--tw-space-x-reverse));
|
|
880
|
-
margin-left: calc(12px * calc(1 - var(--tw-space-x-reverse)));
|
|
881
|
-
}
|
|
882
812
|
.space-x-4 > :not([hidden]) ~ :not([hidden]){
|
|
883
813
|
--tw-space-x-reverse: 0;
|
|
884
814
|
margin-right: calc(16px * var(--tw-space-x-reverse));
|
|
885
815
|
margin-left: calc(16px * calc(1 - var(--tw-space-x-reverse)));
|
|
886
816
|
}
|
|
887
|
-
.space-x-6 > :not([hidden]) ~ :not([hidden]){
|
|
888
|
-
--tw-space-x-reverse: 0;
|
|
889
|
-
margin-right: calc(24px * var(--tw-space-x-reverse));
|
|
890
|
-
margin-left: calc(24px * calc(1 - var(--tw-space-x-reverse)));
|
|
891
|
-
}
|
|
892
817
|
.space-y-10 > :not([hidden]) ~ :not([hidden]){
|
|
893
818
|
--tw-space-y-reverse: 0;
|
|
894
819
|
margin-top: calc(40px * calc(1 - var(--tw-space-y-reverse)));
|
|
895
820
|
margin-bottom: calc(40px * var(--tw-space-y-reverse));
|
|
896
821
|
}
|
|
897
|
-
.space-y-3 > :not([hidden]) ~ :not([hidden]){
|
|
898
|
-
--tw-space-y-reverse: 0;
|
|
899
|
-
margin-top: calc(12px * calc(1 - var(--tw-space-y-reverse)));
|
|
900
|
-
margin-bottom: calc(12px * var(--tw-space-y-reverse));
|
|
901
|
-
}
|
|
902
822
|
.space-y-4 > :not([hidden]) ~ :not([hidden]){
|
|
903
823
|
--tw-space-y-reverse: 0;
|
|
904
824
|
margin-top: calc(16px * calc(1 - var(--tw-space-y-reverse)));
|
|
@@ -917,9 +837,6 @@ select{
|
|
|
917
837
|
.overflow-y-hidden{
|
|
918
838
|
overflow-y: hidden;
|
|
919
839
|
}
|
|
920
|
-
.whitespace-nowrap{
|
|
921
|
-
white-space: nowrap;
|
|
922
|
-
}
|
|
923
840
|
.rounded-2xl{
|
|
924
841
|
border-radius: 1rem;
|
|
925
842
|
}
|
|
@@ -929,9 +846,6 @@ select{
|
|
|
929
846
|
.rounded-lg{
|
|
930
847
|
border-radius: 0.5rem;
|
|
931
848
|
}
|
|
932
|
-
.rounded-md{
|
|
933
|
-
border-radius: 0.375rem;
|
|
934
|
-
}
|
|
935
849
|
.border{
|
|
936
850
|
border-width: 1px;
|
|
937
851
|
}
|
|
@@ -960,17 +874,6 @@ select{
|
|
|
960
874
|
.bg-black\\/50{
|
|
961
875
|
background-color: rgb(0 0 0 / 0.5);
|
|
962
876
|
}
|
|
963
|
-
.bg-d3dfea\\/30{
|
|
964
|
-
background-color: rgb(211 223 234 / 0.3);
|
|
965
|
-
}
|
|
966
|
-
.bg-gray-100{
|
|
967
|
-
--tw-bg-opacity: 1;
|
|
968
|
-
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
|
|
969
|
-
}
|
|
970
|
-
.bg-indigo-600{
|
|
971
|
-
--tw-bg-opacity: 1;
|
|
972
|
-
background-color: rgb(79 70 229 / var(--tw-bg-opacity));
|
|
973
|
-
}
|
|
974
877
|
.bg-transparent{
|
|
975
878
|
background-color: transparent;
|
|
976
879
|
}
|
|
@@ -987,10 +890,6 @@ select{
|
|
|
987
890
|
.p-7{
|
|
988
891
|
padding: 28px;
|
|
989
892
|
}
|
|
990
|
-
.px-12{
|
|
991
|
-
padding-left: 48px;
|
|
992
|
-
padding-right: 48px;
|
|
993
|
-
}
|
|
994
893
|
.px-2{
|
|
995
894
|
padding-left: 8px;
|
|
996
895
|
padding-right: 8px;
|
|
@@ -1007,10 +906,6 @@ select{
|
|
|
1007
906
|
padding-top: 4px;
|
|
1008
907
|
padding-bottom: 4px;
|
|
1009
908
|
}
|
|
1010
|
-
.py-2{
|
|
1011
|
-
padding-top: 8px;
|
|
1012
|
-
padding-bottom: 8px;
|
|
1013
|
-
}
|
|
1014
909
|
.py-3{
|
|
1015
910
|
padding-top: 12px;
|
|
1016
911
|
padding-bottom: 12px;
|
|
@@ -1022,17 +917,14 @@ select{
|
|
|
1022
917
|
.pt-6{
|
|
1023
918
|
padding-top: 24px;
|
|
1024
919
|
}
|
|
1025
|
-
.text-left{
|
|
1026
|
-
text-align: left;
|
|
1027
|
-
}
|
|
1028
920
|
.text-center{
|
|
1029
921
|
text-align: center;
|
|
1030
922
|
}
|
|
1031
923
|
.font-sans{
|
|
1032
|
-
font-family: Rubik, ui-sans-serif, system-ui,
|
|
924
|
+
font-family: Rubik, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
1033
925
|
}
|
|
1034
926
|
.font-sora{
|
|
1035
|
-
font-family: Sora, ui-sans-serif, system-ui,
|
|
927
|
+
font-family: Sora, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
1036
928
|
}
|
|
1037
929
|
.text-2xl{
|
|
1038
930
|
font-size: 24px;
|
|
@@ -1056,15 +948,9 @@ select{
|
|
|
1056
948
|
.font-medium{
|
|
1057
949
|
font-weight: 500;
|
|
1058
950
|
}
|
|
1059
|
-
.font-normal{
|
|
1060
|
-
font-weight: 400;
|
|
1061
|
-
}
|
|
1062
951
|
.font-semibold{
|
|
1063
952
|
font-weight: 600;
|
|
1064
953
|
}
|
|
1065
|
-
.uppercase{
|
|
1066
|
-
text-transform: uppercase;
|
|
1067
|
-
}
|
|
1068
954
|
.text-0d151d{
|
|
1069
955
|
--tw-text-opacity: 1;
|
|
1070
956
|
color: rgb(13 21 29 / var(--tw-text-opacity));
|
|
@@ -1077,10 +963,6 @@ select{
|
|
|
1077
963
|
--tw-text-opacity: 1;
|
|
1078
964
|
color: rgb(60 66 75 / var(--tw-text-opacity));
|
|
1079
965
|
}
|
|
1080
|
-
.text-4940e0{
|
|
1081
|
-
--tw-text-opacity: 1;
|
|
1082
|
-
color: rgb(73 64 224 / var(--tw-text-opacity));
|
|
1083
|
-
}
|
|
1084
966
|
.text-657080{
|
|
1085
967
|
--tw-text-opacity: 1;
|
|
1086
968
|
color: rgb(101 112 128 / var(--tw-text-opacity));
|
|
@@ -1155,10 +1037,6 @@ input[type='number']::-webkit-inner-spin-button,
|
|
|
1155
1037
|
-webkit-appearance: none;
|
|
1156
1038
|
appearance: none;
|
|
1157
1039
|
}
|
|
1158
|
-
.hover\\:bg-indigo-700:hover{
|
|
1159
|
-
--tw-bg-opacity: 1;
|
|
1160
|
-
background-color: rgb(67 56 202 / var(--tw-bg-opacity));
|
|
1161
|
-
}
|
|
1162
1040
|
.hover\\:underline:hover{
|
|
1163
1041
|
text-decoration-line: underline;
|
|
1164
1042
|
}
|
|
@@ -1207,33 +1085,26 @@ input[type='number']::-webkit-inner-spin-button,
|
|
|
1207
1085
|
animation: spin 1.5s linear infinite;
|
|
1208
1086
|
}
|
|
1209
1087
|
}
|
|
1210
|
-
|
|
1088
|
+
.dark\\:border-f1f5f8\\/10:is(.dark *){
|
|
1211
1089
|
border-color: rgb(241 245 248 / 0.1);
|
|
1212
1090
|
}
|
|
1213
|
-
:is(.dark
|
|
1091
|
+
.dark\\:bg-0d151d:is(.dark *){
|
|
1214
1092
|
--tw-bg-opacity: 1;
|
|
1215
1093
|
background-color: rgb(13 21 29 / var(--tw-bg-opacity));
|
|
1216
1094
|
}
|
|
1217
|
-
:is(.dark
|
|
1218
|
-
--tw-bg-opacity: 1;
|
|
1219
|
-
background-color: rgb(41 52 63 / var(--tw-bg-opacity));
|
|
1220
|
-
}
|
|
1221
|
-
:is(.dark .dark\\:bg-d3dfea\\/15){
|
|
1222
|
-
background-color: rgb(211 223 234 / .15);
|
|
1223
|
-
}
|
|
1224
|
-
:is(.dark .dark\\:bg-white){
|
|
1095
|
+
.dark\\:bg-white:is(.dark *){
|
|
1225
1096
|
--tw-bg-opacity: 1;
|
|
1226
1097
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
1227
1098
|
}
|
|
1228
|
-
:is(.dark
|
|
1099
|
+
.dark\\:text-0d151d:is(.dark *){
|
|
1229
1100
|
--tw-text-opacity: 1;
|
|
1230
1101
|
color: rgb(13 21 29 / var(--tw-text-opacity));
|
|
1231
1102
|
}
|
|
1232
|
-
:is(.dark
|
|
1103
|
+
.dark\\:text-9eafc0:is(.dark *){
|
|
1233
1104
|
--tw-text-opacity: 1;
|
|
1234
1105
|
color: rgb(158 175 192 / var(--tw-text-opacity));
|
|
1235
1106
|
}
|
|
1236
|
-
:is(.dark
|
|
1107
|
+
.dark\\:text-white:is(.dark *){
|
|
1237
1108
|
--tw-text-opacity: 1;
|
|
1238
1109
|
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
1239
1110
|
}
|
|
@@ -1456,8 +1327,8 @@ var ErrorState = () => {
|
|
|
1456
1327
|
return /* @__PURE__ */ jsxs3("div", { className: "space-y-8", children: [
|
|
1457
1328
|
/* @__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" }) }),
|
|
1458
1329
|
/* @__PURE__ */ jsxs3("div", { children: [
|
|
1459
|
-
/* @__PURE__ */ jsx6("p", { className: "text-center text-2xl font-semibold text-gray-900 dark:text-white", children: errorState?.code && ERROR_TITLES[errorState.code]
|
|
1460
|
-
/* @__PURE__ */ jsx6("p", { className: "mx-auto mt-2 max-w-[224px] text-center text-657080", children: errorState?.message
|
|
1330
|
+
/* @__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] }),
|
|
1331
|
+
/* @__PURE__ */ jsx6("p", { className: "mx-auto mt-2 max-w-[224px] text-center text-657080", children: errorState?.message ?? ERROR_MESSAGES[errorState?.code ?? AppErrorCodes.GenericError] })
|
|
1461
1332
|
] }),
|
|
1462
1333
|
/* @__PURE__ */ jsx6("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs3(
|
|
1463
1334
|
"button",
|
|
@@ -1478,84 +1349,10 @@ var ErrorState_default = ErrorState;
|
|
|
1478
1349
|
// src/components/IDKitWidget/BaseWidget.tsx
|
|
1479
1350
|
import * as Toast from "@radix-ui/react-toast";
|
|
1480
1351
|
|
|
1481
|
-
// public/images/verified.webp
|
|
1482
|
-
var verified_default = "./verified-O6D4JQCX.webp";
|
|
1483
|
-
|
|
1484
|
-
// src/components/WorldIDIcon.tsx
|
|
1485
|
-
import { Fragment, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1486
|
-
var WorldIDIcon = ({ border, size = "sm", ...props }) => {
|
|
1487
|
-
const heightWidth = size === "md" ? 36 : 24;
|
|
1488
|
-
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
1489
|
-
border && /* @__PURE__ */ jsx7(
|
|
1490
|
-
"svg",
|
|
1491
|
-
{
|
|
1492
|
-
className: classNames(
|
|
1493
|
-
border,
|
|
1494
|
-
"absolute left-1/2 top-1/2 w-[34px] -mt-[2px] transform -translate-x-1/2 -translate-y-1/2"
|
|
1495
|
-
),
|
|
1496
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1497
|
-
fill: "currentColor",
|
|
1498
|
-
viewBox: "0 0 26 26",
|
|
1499
|
-
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" })
|
|
1500
|
-
}
|
|
1501
|
-
),
|
|
1502
|
-
/* @__PURE__ */ jsx7("img", { src: verified_default, ...props, alt: "Verified", width: heightWidth, height: heightWidth })
|
|
1503
|
-
] });
|
|
1504
|
-
};
|
|
1505
|
-
var WorldIDIcon_default = WorldIDIcon;
|
|
1506
|
-
|
|
1507
|
-
// src/components/Icons/InfoIcon.tsx
|
|
1508
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1509
|
-
var InfoIcon = (props) => /* @__PURE__ */ jsx8("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", children: /* @__PURE__ */ jsx8(
|
|
1510
|
-
"path",
|
|
1511
|
-
{
|
|
1512
|
-
fill: "currentColor",
|
|
1513
|
-
fillRule: "evenodd",
|
|
1514
|
-
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",
|
|
1515
|
-
clipRule: "evenodd"
|
|
1516
|
-
}
|
|
1517
|
-
) });
|
|
1518
|
-
var InfoIcon_default = InfoIcon;
|
|
1519
|
-
|
|
1520
|
-
// src/components/IDKitWidget/States/PrivacyState.tsx
|
|
1521
|
-
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1522
|
-
var PrivacyState = () => {
|
|
1523
|
-
return /* @__PURE__ */ jsxs5("div", { className: "-mt-6 flex flex-col items-center justify-center space-y-6 font-sans text-sm", children: [
|
|
1524
|
-
/* @__PURE__ */ jsx9(WorldIDIcon_default, { className: "h-12 w-12" }),
|
|
1525
|
-
/* @__PURE__ */ jsx9("p", { className: "text-center text-2xl font-semibold dark:text-white", children: __("Privacy preserving to the core.") }),
|
|
1526
|
-
/* @__PURE__ */ jsxs5("ul", { className: "text-9eafc0 mb-6 list-disc space-y-3 px-12 dark:text-white", children: [
|
|
1527
|
-
/* @__PURE__ */ jsx9("li", { className: "text-left", children: __(
|
|
1528
|
-
"World ID uses Zero-Knowledge Proofs to make it cryptographically impossible to track persons across applications."
|
|
1529
|
-
) }),
|
|
1530
|
-
/* @__PURE__ */ jsx9("li", { className: "text-left", children: __("Orb biometrics analyzed by the Orb are not stored.") }),
|
|
1531
|
-
/* @__PURE__ */ jsxs5("li", { className: "text-left ", children: [
|
|
1532
|
-
__("Code and hardware are open source or source available on"),
|
|
1533
|
-
" ",
|
|
1534
|
-
/* @__PURE__ */ jsx9(
|
|
1535
|
-
"a",
|
|
1536
|
-
{
|
|
1537
|
-
href: "https://github.com/worldcoin/idkit-js",
|
|
1538
|
-
target: "_blank",
|
|
1539
|
-
className: "text-4940e0",
|
|
1540
|
-
rel: "noreferrer",
|
|
1541
|
-
children: "GitHub"
|
|
1542
|
-
}
|
|
1543
|
-
),
|
|
1544
|
-
"."
|
|
1545
|
-
] })
|
|
1546
|
-
] }),
|
|
1547
|
-
/* @__PURE__ */ jsxs5("div", { className: "text-9eafc0 dark:text-9eafc0 -ml-4 flex items-center space-x-3", children: [
|
|
1548
|
-
/* @__PURE__ */ jsx9(InfoIcon_default, { className: "h-4 w-4 " }),
|
|
1549
|
-
/* @__PURE__ */ jsx9("p", { className: "whitespace-nowrap text-sm font-medium", children: __("Biometrics are never shared.") })
|
|
1550
|
-
] })
|
|
1551
|
-
] });
|
|
1552
|
-
};
|
|
1553
|
-
var PrivacyState_default = PrivacyState;
|
|
1554
|
-
|
|
1555
1352
|
// src/components/Icons/CheckIcon.tsx
|
|
1556
|
-
import { jsx as
|
|
1557
|
-
var CheckIcon = (props) => /* @__PURE__ */
|
|
1558
|
-
/* @__PURE__ */
|
|
1353
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1354
|
+
var CheckIcon = (props) => /* @__PURE__ */ jsxs4("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 100 100", ...props, children: [
|
|
1355
|
+
/* @__PURE__ */ jsx7(
|
|
1559
1356
|
"circle",
|
|
1560
1357
|
{
|
|
1561
1358
|
cx: "50",
|
|
@@ -1567,11 +1364,11 @@ var CheckIcon = (props) => /* @__PURE__ */ jsxs6("svg", { xmlns: "http://www.w3.
|
|
|
1567
1364
|
strokeWidth: "1.25"
|
|
1568
1365
|
}
|
|
1569
1366
|
),
|
|
1570
|
-
/* @__PURE__ */
|
|
1571
|
-
/* @__PURE__ */
|
|
1572
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ jsxs4("g", { filter: "url(#success-c)", children: [
|
|
1368
|
+
/* @__PURE__ */ jsx7("circle", { cx: "50", cy: "50", r: "35", fill: "#fff" }),
|
|
1369
|
+
/* @__PURE__ */ jsx7("circle", { cx: "50", cy: "50", r: "34.432", stroke: "#CCEBCC", strokeWidth: "1.136" })
|
|
1573
1370
|
] }),
|
|
1574
|
-
/* @__PURE__ */
|
|
1371
|
+
/* @__PURE__ */ jsx7(
|
|
1575
1372
|
"path",
|
|
1576
1373
|
{
|
|
1577
1374
|
stroke: "#090",
|
|
@@ -1581,16 +1378,16 @@ var CheckIcon = (props) => /* @__PURE__ */ jsxs6("svg", { xmlns: "http://www.w3.
|
|
|
1581
1378
|
d: "m41.25 52.5 4.375 4.375 13.125-13.75"
|
|
1582
1379
|
}
|
|
1583
1380
|
),
|
|
1584
|
-
/* @__PURE__ */
|
|
1585
|
-
/* @__PURE__ */
|
|
1586
|
-
/* @__PURE__ */
|
|
1587
|
-
/* @__PURE__ */
|
|
1381
|
+
/* @__PURE__ */ jsxs4("defs", { children: [
|
|
1382
|
+
/* @__PURE__ */ jsxs4("linearGradient", { id: "success-a", x1: "50", x2: "50", y1: "0", y2: "100", gradientUnits: "userSpaceOnUse", children: [
|
|
1383
|
+
/* @__PURE__ */ jsx7("stop", { stopColor: "#99D699" }),
|
|
1384
|
+
/* @__PURE__ */ jsx7("stop", { offset: "1", stopColor: "#99D699", stopOpacity: "0" })
|
|
1588
1385
|
] }),
|
|
1589
|
-
/* @__PURE__ */
|
|
1590
|
-
/* @__PURE__ */
|
|
1591
|
-
/* @__PURE__ */
|
|
1386
|
+
/* @__PURE__ */ jsxs4("linearGradient", { id: "success-b", x1: "50", x2: "50", y1: "0", y2: "100", gradientUnits: "userSpaceOnUse", children: [
|
|
1387
|
+
/* @__PURE__ */ jsx7("stop", { stopColor: "#99D699" }),
|
|
1388
|
+
/* @__PURE__ */ jsx7("stop", { offset: ".713", stopColor: "#99D699", stopOpacity: "0" })
|
|
1592
1389
|
] }),
|
|
1593
|
-
/* @__PURE__ */
|
|
1390
|
+
/* @__PURE__ */ jsxs4(
|
|
1594
1391
|
"filter",
|
|
1595
1392
|
{
|
|
1596
1393
|
id: "success-c",
|
|
@@ -1601,13 +1398,13 @@ var CheckIcon = (props) => /* @__PURE__ */ jsxs6("svg", { xmlns: "http://www.w3.
|
|
|
1601
1398
|
colorInterpolationFilters: "sRGB",
|
|
1602
1399
|
filterUnits: "userSpaceOnUse",
|
|
1603
1400
|
children: [
|
|
1604
|
-
/* @__PURE__ */
|
|
1605
|
-
/* @__PURE__ */
|
|
1606
|
-
/* @__PURE__ */
|
|
1607
|
-
/* @__PURE__ */
|
|
1608
|
-
/* @__PURE__ */
|
|
1609
|
-
/* @__PURE__ */
|
|
1610
|
-
/* @__PURE__ */
|
|
1401
|
+
/* @__PURE__ */ jsx7("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
1402
|
+
/* @__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" }),
|
|
1403
|
+
/* @__PURE__ */ jsx7("feOffset", { dy: "1.875" }),
|
|
1404
|
+
/* @__PURE__ */ jsx7("feGaussianBlur", { stdDeviation: "1.875" }),
|
|
1405
|
+
/* @__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" }),
|
|
1406
|
+
/* @__PURE__ */ jsx7("feBlend", { in2: "BackgroundImageFix", result: "effect1_dropShadow_39_712" }),
|
|
1407
|
+
/* @__PURE__ */ jsx7("feBlend", { in: "SourceGraphic", in2: "effect1_dropShadow_39_712", result: "shape" })
|
|
1611
1408
|
]
|
|
1612
1409
|
}
|
|
1613
1410
|
)
|
|
@@ -1616,13 +1413,13 @@ var CheckIcon = (props) => /* @__PURE__ */ jsxs6("svg", { xmlns: "http://www.w3.
|
|
|
1616
1413
|
var CheckIcon_default = CheckIcon;
|
|
1617
1414
|
|
|
1618
1415
|
// src/components/IDKitWidget/States/SuccessState.tsx
|
|
1619
|
-
import { jsx as
|
|
1416
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1620
1417
|
var SuccessState = () => {
|
|
1621
|
-
return /* @__PURE__ */
|
|
1622
|
-
/* @__PURE__ */
|
|
1623
|
-
/* @__PURE__ */
|
|
1624
|
-
/* @__PURE__ */
|
|
1625
|
-
/* @__PURE__ */
|
|
1418
|
+
return /* @__PURE__ */ jsxs5("div", { className: "space-y-6", children: [
|
|
1419
|
+
/* @__PURE__ */ jsx8("div", { className: "-mt-5 flex items-center justify-center", children: /* @__PURE__ */ jsx8(CheckIcon_default, { className: "w-24 text-white" }) }),
|
|
1420
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
1421
|
+
/* @__PURE__ */ jsx8("p", { className: "text-center text-2xl font-semibold text-gray-900 dark:text-white", children: __("Successfully verified") }),
|
|
1422
|
+
/* @__PURE__ */ jsx8("p", { className: "mx-auto mt-2 max-w-[224px] text-center text-lg text-657080", children: __("Your World ID verification was successful") })
|
|
1626
1423
|
] })
|
|
1627
1424
|
] });
|
|
1628
1425
|
};
|
|
@@ -1630,12 +1427,19 @@ var SuccessState_default = SuccessState;
|
|
|
1630
1427
|
|
|
1631
1428
|
// src/components/IDKitWidget/States/WorldID/QRState.tsx
|
|
1632
1429
|
import copy from "copy-to-clipboard";
|
|
1430
|
+
|
|
1431
|
+
// src/lib/utils.ts
|
|
1432
|
+
var classNames = (...classes) => {
|
|
1433
|
+
return classes.filter(Boolean).join(" ");
|
|
1434
|
+
};
|
|
1435
|
+
|
|
1436
|
+
// src/components/IDKitWidget/States/WorldID/QRState.tsx
|
|
1633
1437
|
import { useCallback, useState as useState2 } from "react";
|
|
1634
1438
|
import { AnimatePresence, motion } from "framer-motion";
|
|
1635
1439
|
|
|
1636
1440
|
// src/components/Icons/WorldcoinIcon.tsx
|
|
1637
|
-
import { jsx as
|
|
1638
|
-
var WorldcoinIcon = (props) => /* @__PURE__ */
|
|
1441
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1442
|
+
var WorldcoinIcon = (props) => /* @__PURE__ */ jsx9("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 33 32", children: /* @__PURE__ */ jsx9(
|
|
1639
1443
|
"path",
|
|
1640
1444
|
{
|
|
1641
1445
|
fill: "currentColor",
|
|
@@ -1645,9 +1449,9 @@ var WorldcoinIcon = (props) => /* @__PURE__ */ jsx12("svg", { ...props, xmlns: "
|
|
|
1645
1449
|
var WorldcoinIcon_default = WorldcoinIcon;
|
|
1646
1450
|
|
|
1647
1451
|
// src/components/Icons/QRPlaceholderIcon.tsx
|
|
1648
|
-
import { jsx as
|
|
1649
|
-
var QRPlaceholderIcon = (props) => /* @__PURE__ */
|
|
1650
|
-
/* @__PURE__ */
|
|
1452
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1453
|
+
var QRPlaceholderIcon = (props) => /* @__PURE__ */ jsxs6("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 200 200", children: [
|
|
1454
|
+
/* @__PURE__ */ jsx10(
|
|
1651
1455
|
"path",
|
|
1652
1456
|
{
|
|
1653
1457
|
fill: "#EBECEF",
|
|
@@ -1656,14 +1460,14 @@ var QRPlaceholderIcon = (props) => /* @__PURE__ */ jsxs8("svg", { ...props, xmln
|
|
|
1656
1460
|
clipRule: "evenodd"
|
|
1657
1461
|
}
|
|
1658
1462
|
),
|
|
1659
|
-
/* @__PURE__ */
|
|
1463
|
+
/* @__PURE__ */ jsx10(
|
|
1660
1464
|
"path",
|
|
1661
1465
|
{
|
|
1662
1466
|
fill: "#EBECEF",
|
|
1663
1467
|
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"
|
|
1664
1468
|
}
|
|
1665
1469
|
),
|
|
1666
|
-
/* @__PURE__ */
|
|
1470
|
+
/* @__PURE__ */ jsx10(
|
|
1667
1471
|
"path",
|
|
1668
1472
|
{
|
|
1669
1473
|
fill: "#EBECEF",
|
|
@@ -1672,14 +1476,14 @@ var QRPlaceholderIcon = (props) => /* @__PURE__ */ jsxs8("svg", { ...props, xmln
|
|
|
1672
1476
|
clipRule: "evenodd"
|
|
1673
1477
|
}
|
|
1674
1478
|
),
|
|
1675
|
-
/* @__PURE__ */
|
|
1479
|
+
/* @__PURE__ */ jsx10(
|
|
1676
1480
|
"path",
|
|
1677
1481
|
{
|
|
1678
1482
|
fill: "#EBECEF",
|
|
1679
1483
|
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"
|
|
1680
1484
|
}
|
|
1681
1485
|
),
|
|
1682
|
-
/* @__PURE__ */
|
|
1486
|
+
/* @__PURE__ */ jsx10(
|
|
1683
1487
|
"path",
|
|
1684
1488
|
{
|
|
1685
1489
|
fill: "url(#a)",
|
|
@@ -1688,14 +1492,14 @@ var QRPlaceholderIcon = (props) => /* @__PURE__ */ jsxs8("svg", { ...props, xmln
|
|
|
1688
1492
|
clipRule: "evenodd"
|
|
1689
1493
|
}
|
|
1690
1494
|
),
|
|
1691
|
-
/* @__PURE__ */
|
|
1495
|
+
/* @__PURE__ */ jsx10(
|
|
1692
1496
|
"path",
|
|
1693
1497
|
{
|
|
1694
1498
|
fill: "url(#a)",
|
|
1695
1499
|
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"
|
|
1696
1500
|
}
|
|
1697
1501
|
),
|
|
1698
|
-
/* @__PURE__ */
|
|
1502
|
+
/* @__PURE__ */ jsx10(
|
|
1699
1503
|
"path",
|
|
1700
1504
|
{
|
|
1701
1505
|
fill: "url(#a)",
|
|
@@ -1704,7 +1508,7 @@ var QRPlaceholderIcon = (props) => /* @__PURE__ */ jsxs8("svg", { ...props, xmln
|
|
|
1704
1508
|
clipRule: "evenodd"
|
|
1705
1509
|
}
|
|
1706
1510
|
),
|
|
1707
|
-
/* @__PURE__ */
|
|
1511
|
+
/* @__PURE__ */ jsx10(
|
|
1708
1512
|
"path",
|
|
1709
1513
|
{
|
|
1710
1514
|
fill: "url(#a)",
|
|
@@ -1713,51 +1517,51 @@ var QRPlaceholderIcon = (props) => /* @__PURE__ */ jsxs8("svg", { ...props, xmln
|
|
|
1713
1517
|
clipRule: "evenodd"
|
|
1714
1518
|
}
|
|
1715
1519
|
),
|
|
1716
|
-
/* @__PURE__ */
|
|
1520
|
+
/* @__PURE__ */ jsx10(
|
|
1717
1521
|
"path",
|
|
1718
1522
|
{
|
|
1719
1523
|
fill: "url(#a)",
|
|
1720
1524
|
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"
|
|
1721
1525
|
}
|
|
1722
1526
|
),
|
|
1723
|
-
/* @__PURE__ */
|
|
1527
|
+
/* @__PURE__ */ jsx10(
|
|
1724
1528
|
"path",
|
|
1725
1529
|
{
|
|
1726
1530
|
fill: "url(#a)",
|
|
1727
1531
|
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"
|
|
1728
1532
|
}
|
|
1729
1533
|
),
|
|
1730
|
-
/* @__PURE__ */
|
|
1534
|
+
/* @__PURE__ */ jsx10(
|
|
1731
1535
|
"path",
|
|
1732
1536
|
{
|
|
1733
1537
|
fill: "url(#a)",
|
|
1734
1538
|
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"
|
|
1735
1539
|
}
|
|
1736
1540
|
),
|
|
1737
|
-
/* @__PURE__ */
|
|
1541
|
+
/* @__PURE__ */ jsx10(
|
|
1738
1542
|
"path",
|
|
1739
1543
|
{
|
|
1740
1544
|
fill: "url(#a)",
|
|
1741
1545
|
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"
|
|
1742
1546
|
}
|
|
1743
1547
|
),
|
|
1744
|
-
/* @__PURE__ */
|
|
1548
|
+
/* @__PURE__ */ jsx10(
|
|
1745
1549
|
"path",
|
|
1746
1550
|
{
|
|
1747
1551
|
fill: "url(#a)",
|
|
1748
1552
|
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"
|
|
1749
1553
|
}
|
|
1750
1554
|
),
|
|
1751
|
-
/* @__PURE__ */
|
|
1752
|
-
/* @__PURE__ */
|
|
1753
|
-
/* @__PURE__ */
|
|
1754
|
-
/* @__PURE__ */
|
|
1555
|
+
/* @__PURE__ */ jsx10("defs", { children: /* @__PURE__ */ jsxs6("linearGradient", { id: "a", x1: "0", x2: "200", y1: "0", y2: "200", gradientUnits: "userSpaceOnUse", children: [
|
|
1556
|
+
/* @__PURE__ */ jsx10("stop", { offset: ".37", stopColor: "#fff", stopOpacity: "0" }),
|
|
1557
|
+
/* @__PURE__ */ jsx10("stop", { offset: ".5", stopColor: "#fff", stopOpacity: ".85" }),
|
|
1558
|
+
/* @__PURE__ */ jsx10("stop", { offset: ".63", stopColor: "#fff", stopOpacity: "0" })
|
|
1755
1559
|
] }) })
|
|
1756
1560
|
] });
|
|
1757
1561
|
var QRPlaceholderIcon_default = QRPlaceholderIcon;
|
|
1758
1562
|
|
|
1759
1563
|
// src/components/IDKitWidget/States/WorldID/QRState.tsx
|
|
1760
|
-
import { Fragment
|
|
1564
|
+
import { Fragment, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1761
1565
|
var QRState = ({ qrData, showQR, setShowQR }) => {
|
|
1762
1566
|
const media = useMedia_default();
|
|
1763
1567
|
const [copiedLink, setCopiedLink] = useState2(false);
|
|
@@ -1766,9 +1570,9 @@ var QRState = ({ qrData, showQR, setShowQR }) => {
|
|
|
1766
1570
|
setCopiedLink(true);
|
|
1767
1571
|
setTimeout(() => setCopiedLink(false), 2e3);
|
|
1768
1572
|
}, [qrData]);
|
|
1769
|
-
return /* @__PURE__ */
|
|
1770
|
-
/* @__PURE__ */
|
|
1771
|
-
/* @__PURE__ */
|
|
1573
|
+
return /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
1574
|
+
/* @__PURE__ */ jsxs7("div", { className: "mb-10 space-y-4 md:hidden", children: [
|
|
1575
|
+
/* @__PURE__ */ jsxs7(
|
|
1772
1576
|
motion.a,
|
|
1773
1577
|
{
|
|
1774
1578
|
href: qrData ?? "",
|
|
@@ -1781,8 +1585,8 @@ var QRState = ({ qrData, showQR, setShowQR }) => {
|
|
|
1781
1585
|
"bg-0d151d dark:bg-white text-white dark:text-0d151d"
|
|
1782
1586
|
),
|
|
1783
1587
|
children: [
|
|
1784
|
-
/* @__PURE__ */
|
|
1785
|
-
/* @__PURE__ */
|
|
1588
|
+
/* @__PURE__ */ jsx11(WorldcoinIcon_default, { className: "h-5 w-5" }),
|
|
1589
|
+
/* @__PURE__ */ jsx11(
|
|
1786
1590
|
motion.span,
|
|
1787
1591
|
{
|
|
1788
1592
|
className: "flex-1 text-center",
|
|
@@ -1794,13 +1598,13 @@ var QRState = ({ qrData, showQR, setShowQR }) => {
|
|
|
1794
1598
|
]
|
|
1795
1599
|
}
|
|
1796
1600
|
),
|
|
1797
|
-
/* @__PURE__ */
|
|
1798
|
-
/* @__PURE__ */
|
|
1799
|
-
/* @__PURE__ */
|
|
1800
|
-
/* @__PURE__ */
|
|
1801
|
-
/* @__PURE__ */
|
|
1601
|
+
/* @__PURE__ */ jsxs7("div", { className: "space-y-4", children: [
|
|
1602
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center space-x-4 ", children: [
|
|
1603
|
+
/* @__PURE__ */ jsx11("hr", { className: "flex-1" }),
|
|
1604
|
+
/* @__PURE__ */ jsx11("span", { className: "text-xs font-medium text-9ba3ae", children: "or" }),
|
|
1605
|
+
/* @__PURE__ */ jsx11("hr", { className: "flex-1" })
|
|
1802
1606
|
] }),
|
|
1803
|
-
/* @__PURE__ */
|
|
1607
|
+
/* @__PURE__ */ jsx11(
|
|
1804
1608
|
motion.button,
|
|
1805
1609
|
{
|
|
1806
1610
|
className: "w-full rounded-2xl border border-ebecef p-4 text-lg font-medium text-3c424b",
|
|
@@ -1810,8 +1614,8 @@ var QRState = ({ qrData, showQR, setShowQR }) => {
|
|
|
1810
1614
|
)
|
|
1811
1615
|
] })
|
|
1812
1616
|
] }),
|
|
1813
|
-
(media == "desktop" || showQR) && /* @__PURE__ */
|
|
1814
|
-
/* @__PURE__ */
|
|
1617
|
+
(media == "desktop" || showQR) && /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
1618
|
+
/* @__PURE__ */ jsx11(AnimatePresence, { children: copiedLink && /* @__PURE__ */ jsx11(
|
|
1815
1619
|
motion.div,
|
|
1816
1620
|
{
|
|
1817
1621
|
className: "text-sm text-9eafc0",
|
|
@@ -1844,14 +1648,14 @@ var QRState = ({ qrData, showQR, setShowQR }) => {
|
|
|
1844
1648
|
}
|
|
1845
1649
|
}
|
|
1846
1650
|
},
|
|
1847
|
-
children: /* @__PURE__ */
|
|
1651
|
+
children: /* @__PURE__ */ jsx11("span", { className: "rounded-lg border border-f1f5f8 px-2 py-1 text-sm", children: __("QR Code copied") })
|
|
1848
1652
|
},
|
|
1849
1653
|
"copied"
|
|
1850
1654
|
) }),
|
|
1851
|
-
/* @__PURE__ */
|
|
1655
|
+
/* @__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 ? (
|
|
1852
1656
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
1853
|
-
/* @__PURE__ */
|
|
1854
|
-
) : /* @__PURE__ */
|
|
1657
|
+
/* @__PURE__ */ jsx11("div", { onClick: copyLink, className: "cursor-pointer", children: /* @__PURE__ */ jsx11(QRCode_default, { data: qrData, size: 244 }) })
|
|
1658
|
+
) : /* @__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" }) }) }) })
|
|
1855
1659
|
] })
|
|
1856
1660
|
] });
|
|
1857
1661
|
};
|
|
@@ -1880,8 +1684,7 @@ var useWorldBridge = (app_id, action, signal, bridge_url, verification_level, ac
|
|
|
1880
1684
|
}
|
|
1881
1685
|
}, [app_id, action, signal, action_description, createClient, ref_verification_level, bridge_url, connectorURI]);
|
|
1882
1686
|
useEffect3(() => {
|
|
1883
|
-
if (!connectorURI || result || errorCode)
|
|
1884
|
-
return;
|
|
1687
|
+
if (!connectorURI || result || errorCode) return;
|
|
1885
1688
|
const interval = setInterval(() => void pollForUpdates(), 3e3);
|
|
1886
1689
|
return () => clearInterval(interval);
|
|
1887
1690
|
}, [connectorURI, pollForUpdates, errorCode, result]);
|
|
@@ -1889,8 +1692,8 @@ var useWorldBridge = (app_id, action, signal, bridge_url, verification_level, ac
|
|
|
1889
1692
|
};
|
|
1890
1693
|
|
|
1891
1694
|
// src/components/Icons/LoadingIcon.tsx
|
|
1892
|
-
import { jsx as
|
|
1893
|
-
var LoadingIcon = ({ className, ...props }) => /* @__PURE__ */
|
|
1695
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1696
|
+
var LoadingIcon = ({ className, ...props }) => /* @__PURE__ */ jsxs8(
|
|
1894
1697
|
"svg",
|
|
1895
1698
|
{
|
|
1896
1699
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1899,8 +1702,8 @@ var LoadingIcon = ({ className, ...props }) => /* @__PURE__ */ jsxs10(
|
|
|
1899
1702
|
className: `animate-spin motion-reduce:animate-[spin_1.5s_linear_infinite] ${className}`,
|
|
1900
1703
|
...props,
|
|
1901
1704
|
children: [
|
|
1902
|
-
/* @__PURE__ */
|
|
1903
|
-
/* @__PURE__ */
|
|
1705
|
+
/* @__PURE__ */ jsx12("circle", { cx: "12", cy: "12", r: "10.75", stroke: "#191C20", strokeOpacity: ".16", strokeWidth: "2.5" }),
|
|
1706
|
+
/* @__PURE__ */ jsx12(
|
|
1904
1707
|
"path",
|
|
1905
1708
|
{
|
|
1906
1709
|
fill: "#191C20",
|
|
@@ -1914,7 +1717,7 @@ var LoadingIcon_default = LoadingIcon;
|
|
|
1914
1717
|
|
|
1915
1718
|
// src/components/IDKitWidget/States/WorldIDState.tsx
|
|
1916
1719
|
import { AppErrorCodes as AppErrorCodes2, VerificationState, VerificationLevel } from "@worldcoin/idkit-core";
|
|
1917
|
-
import { jsx as
|
|
1720
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1918
1721
|
var getOptions = (store) => ({
|
|
1919
1722
|
signal: store.signal,
|
|
1920
1723
|
app_id: store.app_id,
|
|
@@ -1965,25 +1768,25 @@ var WorldIDState = () => {
|
|
|
1965
1768
|
return handleVerify(result);
|
|
1966
1769
|
}
|
|
1967
1770
|
}, [result, handleVerify, verificationState, setStage, errorCode, setErrorState, verification_level]);
|
|
1968
|
-
return /* @__PURE__ */
|
|
1969
|
-
/* @__PURE__ */
|
|
1970
|
-
/* @__PURE__ */
|
|
1971
|
-
/* @__PURE__ */
|
|
1972
|
-
/* @__PURE__ */
|
|
1771
|
+
return /* @__PURE__ */ jsxs9("div", { className: "-mt-6 space-y-10", children: [
|
|
1772
|
+
/* @__PURE__ */ jsxs9("div", { children: [
|
|
1773
|
+
/* @__PURE__ */ jsx13("div", { className: "mb-4 flex items-center justify-center", children: /* @__PURE__ */ jsx13(WorldcoinIcon_default, { className: "h-10 text-0d151d dark:text-white" }) }),
|
|
1774
|
+
/* @__PURE__ */ jsx13("p", { className: "text-center font-sora text-2xl font-semibold text-gray-900 dark:text-white", children: __("Verify with World ID") }),
|
|
1775
|
+
/* @__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" })
|
|
1973
1776
|
] }),
|
|
1974
|
-
/* @__PURE__ */
|
|
1975
|
-
verificationState == VerificationState.WaitingForApp && /* @__PURE__ */
|
|
1976
|
-
/* @__PURE__ */
|
|
1977
|
-
/* @__PURE__ */
|
|
1978
|
-
/* @__PURE__ */
|
|
1979
|
-
/* @__PURE__ */
|
|
1777
|
+
/* @__PURE__ */ jsxs9("div", { className: "relative", children: [
|
|
1778
|
+
verificationState == VerificationState.WaitingForApp && /* @__PURE__ */ jsxs9("div", { className: "absolute inset-0 flex flex-col items-center justify-center space-y-6", children: [
|
|
1779
|
+
/* @__PURE__ */ jsx13(LoadingIcon_default, { className: "h-6 w-6" }),
|
|
1780
|
+
/* @__PURE__ */ jsxs9("div", { children: [
|
|
1781
|
+
/* @__PURE__ */ jsx13("p", { className: "font-bold text-657080", children: "Verifying" }),
|
|
1782
|
+
/* @__PURE__ */ jsx13("p", { className: "text-sm text-657080", children: "Please continue in app" })
|
|
1980
1783
|
] })
|
|
1981
1784
|
] }),
|
|
1982
|
-
/* @__PURE__ */
|
|
1785
|
+
/* @__PURE__ */ jsx13(
|
|
1983
1786
|
"div",
|
|
1984
1787
|
{
|
|
1985
1788
|
className: verificationState === VerificationState.WaitingForApp ? "opacity-40 blur-lg transition duration-500 ease-in-out" : "transition duration-500 ease-in-out",
|
|
1986
|
-
children: /* @__PURE__ */
|
|
1789
|
+
children: /* @__PURE__ */ jsx13(QRState_default, { showQR, setShowQR, qrData: connectorURI })
|
|
1987
1790
|
}
|
|
1988
1791
|
)
|
|
1989
1792
|
] })
|
|
@@ -1993,51 +1796,37 @@ var WorldIDState_default = WorldIDState;
|
|
|
1993
1796
|
|
|
1994
1797
|
// src/components/IDKitWidget/BaseWidget.tsx
|
|
1995
1798
|
import * as Dialog from "@radix-ui/react-dialog";
|
|
1996
|
-
import { Fragment as
|
|
1799
|
+
import { Fragment as Fragment2, useEffect as useEffect5, useMemo } from "react";
|
|
1997
1800
|
import { AnimatePresence as AnimatePresence2, motion as motion2 } from "framer-motion";
|
|
1998
1801
|
|
|
1999
|
-
// src/components/Icons/ArrowLongLeftIcon.tsx
|
|
2000
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
2001
|
-
var ArrowLongLeftIcon = (props) => /* @__PURE__ */ jsx17(
|
|
2002
|
-
"svg",
|
|
2003
|
-
{
|
|
2004
|
-
...props,
|
|
2005
|
-
fill: "none",
|
|
2006
|
-
strokeWidth: 1.5,
|
|
2007
|
-
viewBox: "0 0 24 24",
|
|
2008
|
-
stroke: "currentColor",
|
|
2009
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2010
|
-
children: /* @__PURE__ */ jsx17("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6.75 15.75L3 12m0 0l3.75-3.75M3 12h18" })
|
|
2011
|
-
}
|
|
2012
|
-
);
|
|
2013
|
-
var ArrowLongLeftIcon_default = ArrowLongLeftIcon;
|
|
2014
|
-
|
|
2015
1802
|
// src/components/IDKitWidget/States/HostAppVerificationState.tsx
|
|
2016
1803
|
import { memo } from "react";
|
|
2017
|
-
import { jsx as
|
|
1804
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2018
1805
|
var HostAppVerificationState = () => {
|
|
2019
|
-
return /* @__PURE__ */
|
|
2020
|
-
/* @__PURE__ */
|
|
2021
|
-
/* @__PURE__ */
|
|
1806
|
+
return /* @__PURE__ */ jsxs10("div", { className: "space-y-6", children: [
|
|
1807
|
+
/* @__PURE__ */ jsx14("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx14(LoadingIcon_default, { className: "h-24 w-24" }) }),
|
|
1808
|
+
/* @__PURE__ */ jsx14("div", { className: "mt-4 text-70868f", children: __("Transmitting verification to host app. Please wait...") })
|
|
2022
1809
|
] });
|
|
2023
1810
|
};
|
|
2024
1811
|
var HostAppVerificationState_default = memo(HostAppVerificationState);
|
|
2025
1812
|
|
|
2026
1813
|
// src/components/IDKitWidget/BaseWidget.tsx
|
|
2027
|
-
import { jsx as
|
|
2028
|
-
var getParams2 = ({ open, processing, onOpenChange, stage, setStage,
|
|
1814
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1815
|
+
var getParams2 = ({ open, processing, onOpenChange, stage, setStage, setOptions }) => ({
|
|
2029
1816
|
stage,
|
|
2030
1817
|
setStage,
|
|
2031
1818
|
processing,
|
|
2032
1819
|
setOptions,
|
|
2033
1820
|
isOpen: open,
|
|
2034
|
-
onOpenChange
|
|
2035
|
-
canGoBack: computed.canGoBack(stage)
|
|
1821
|
+
onOpenChange
|
|
2036
1822
|
});
|
|
2037
1823
|
var IDKitWidget = ({ children, ...config }) => {
|
|
2038
1824
|
const media = useMedia_default();
|
|
2039
|
-
const { isOpen, onOpenChange, stage,
|
|
1825
|
+
const { isOpen, onOpenChange, stage, setOptions } = idkit_default(getParams2, shallow2);
|
|
2040
1826
|
useEffect5(() => {
|
|
1827
|
+
if (config.action === "") {
|
|
1828
|
+
throw new Error(__("Action cannot be an empty string."));
|
|
1829
|
+
}
|
|
2041
1830
|
setOptions(config, "props" /* PROPS */);
|
|
2042
1831
|
}, [config, setOptions]);
|
|
2043
1832
|
const StageContent = useMemo(() => {
|
|
@@ -2048,20 +1837,18 @@ var IDKitWidget = ({ children, ...config }) => {
|
|
|
2048
1837
|
return SuccessState_default;
|
|
2049
1838
|
case "ERROR" /* ERROR */:
|
|
2050
1839
|
return ErrorState_default;
|
|
2051
|
-
case "PRIVACY" /* PRIVACY */:
|
|
2052
|
-
return PrivacyState_default;
|
|
2053
1840
|
case "HOST_APP_VERIFICATION" /* HOST_APP_VERIFICATION */:
|
|
2054
1841
|
return HostAppVerificationState_default;
|
|
2055
1842
|
default:
|
|
2056
1843
|
throw new Error(__("Invalid IDKitStage :stage.", { stage }));
|
|
2057
1844
|
}
|
|
2058
1845
|
}, [stage]);
|
|
2059
|
-
return /* @__PURE__ */
|
|
1846
|
+
return /* @__PURE__ */ jsxs11(Dialog.Root, { open: isOpen, onOpenChange, children: [
|
|
2060
1847
|
children?.({ open: () => onOpenChange(true) }),
|
|
2061
|
-
/* @__PURE__ */
|
|
2062
|
-
/* @__PURE__ */
|
|
2063
|
-
/* @__PURE__ */
|
|
2064
|
-
/* @__PURE__ */
|
|
1848
|
+
/* @__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: [
|
|
1849
|
+
/* @__PURE__ */ jsx15(Styles_default, {}),
|
|
1850
|
+
/* @__PURE__ */ jsxs11("div", { id: "modal", className: "fixed z-10 font-sans", children: [
|
|
1851
|
+
/* @__PURE__ */ jsx15(Dialog.Overlay, { asChild: true, children: /* @__PURE__ */ jsx15(
|
|
2065
1852
|
motion2.div,
|
|
2066
1853
|
{
|
|
2067
1854
|
initial: { opacity: 0 },
|
|
@@ -2070,7 +1857,7 @@ var IDKitWidget = ({ children, ...config }) => {
|
|
|
2070
1857
|
className: "fixed inset-0 bg-black/50 backdrop-blur-lg"
|
|
2071
1858
|
}
|
|
2072
1859
|
) }),
|
|
2073
|
-
/* @__PURE__ */
|
|
1860
|
+
/* @__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(
|
|
2074
1861
|
motion2.div,
|
|
2075
1862
|
{
|
|
2076
1863
|
layout: media == "mobile" ? "position" : true,
|
|
@@ -2085,26 +1872,12 @@ var IDKitWidget = ({ children, ...config }) => {
|
|
|
2085
1872
|
},
|
|
2086
1873
|
transition: { layout: { duration: 0.15 } },
|
|
2087
1874
|
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",
|
|
2088
|
-
children: /* @__PURE__ */
|
|
2089
|
-
/* @__PURE__ */
|
|
2090
|
-
/* @__PURE__ */
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
onClick: () => setStage("WORLD_ID" /* WORLD_ID */),
|
|
2095
|
-
disabled: !canGoBack,
|
|
2096
|
-
className: classNames(
|
|
2097
|
-
!canGoBack && "invisible pointer-events-none",
|
|
2098
|
-
"dark:bg-d3dfea/15 flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 dark:text-white"
|
|
2099
|
-
),
|
|
2100
|
-
children: /* @__PURE__ */ jsx19(ArrowLongLeftIcon_default, { className: "w-4" })
|
|
2101
|
-
}
|
|
2102
|
-
),
|
|
2103
|
-
/* @__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" }) })
|
|
2104
|
-
] }),
|
|
2105
|
-
/* @__PURE__ */ jsx19("div", { className: "relative mx-6 mb-6 flex flex-1 flex-col items-center justify-center", children: /* @__PURE__ */ jsx19(StageContent, {}) }),
|
|
2106
|
-
/* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between border-t border-f5f5f7 p-7 md:rounded-b-2xl", children: [
|
|
2107
|
-
/* @__PURE__ */ jsxs13(
|
|
1875
|
+
children: /* @__PURE__ */ jsxs11(Toast.Provider, { children: [
|
|
1876
|
+
/* @__PURE__ */ jsx15(Toast.Viewport, { className: "flex justify-center" }),
|
|
1877
|
+
/* @__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" }) }) }),
|
|
1878
|
+
/* @__PURE__ */ jsx15("div", { className: "relative mx-6 mb-6 flex flex-1 flex-col items-center justify-center", children: /* @__PURE__ */ jsx15(StageContent, {}) }),
|
|
1879
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between border-t border-f5f5f7 p-7 md:rounded-b-2xl", children: [
|
|
1880
|
+
/* @__PURE__ */ jsxs11(
|
|
2108
1881
|
"a",
|
|
2109
1882
|
{
|
|
2110
1883
|
href: "https://worldcoin.org/world-id",
|
|
@@ -2112,12 +1885,12 @@ var IDKitWidget = ({ children, ...config }) => {
|
|
|
2112
1885
|
rel: "noreferrer",
|
|
2113
1886
|
className: "flex items-center gap-1 text-sm text-9eafc0",
|
|
2114
1887
|
children: [
|
|
2115
|
-
/* @__PURE__ */
|
|
2116
|
-
/* @__PURE__ */
|
|
1888
|
+
/* @__PURE__ */ jsx15(WorldcoinIcon_default, { className: "w-4 text-9eafc0 dark:text-white" }),
|
|
1889
|
+
/* @__PURE__ */ jsx15("span", { children: __("Powered by Worldcoin") })
|
|
2117
1890
|
]
|
|
2118
1891
|
}
|
|
2119
1892
|
),
|
|
2120
|
-
/* @__PURE__ */
|
|
1893
|
+
/* @__PURE__ */ jsx15(
|
|
2121
1894
|
"a",
|
|
2122
1895
|
{
|
|
2123
1896
|
href: "https://developer.worldcoin.org/privacy-statement",
|
|
@@ -2143,9 +1916,11 @@ var IDKitWidget_default = memo2(BaseWidget_default);
|
|
|
2143
1916
|
// src/index.ts
|
|
2144
1917
|
import { VerificationLevel as VerificationLevel2 } from "@worldcoin/idkit-core";
|
|
2145
1918
|
import { solidityEncode } from "@worldcoin/idkit-core/hashing";
|
|
1919
|
+
import { verifyCloudProof } from "@worldcoin/idkit-core/backend";
|
|
2146
1920
|
export {
|
|
2147
1921
|
IDKitWidget_default as IDKitWidget,
|
|
2148
1922
|
VerificationLevel2 as VerificationLevel,
|
|
2149
1923
|
solidityEncode,
|
|
2150
|
-
useIDKit_default as useIDKit
|
|
1924
|
+
useIDKit_default as useIDKit,
|
|
1925
|
+
verifyCloudProof
|
|
2151
1926
|
};
|