@prosopo/procaptcha-react 0.2.40 → 0.2.41
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/dist/cjs/components/Modal.cjs +27 -3
- package/dist/components/Button.d.ts +10 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Button.js +55 -65
- package/dist/components/Button.js.map +1 -0
- package/dist/components/CaptchaComponent.d.ts +14 -0
- package/dist/components/CaptchaComponent.d.ts.map +1 -0
- package/dist/components/CaptchaComponent.js +59 -156
- package/dist/components/CaptchaComponent.js.map +1 -0
- package/dist/components/CaptchaPlaceholder.d.ts +6 -0
- package/dist/components/CaptchaPlaceholder.d.ts.map +1 -0
- package/dist/components/CaptchaPlaceholder.js +42 -97
- package/dist/components/CaptchaPlaceholder.js.map +1 -0
- package/dist/components/CaptchaWidget.d.ts +9 -0
- package/dist/components/CaptchaWidget.d.ts.map +1 -0
- package/dist/components/CaptchaWidget.js +66 -144
- package/dist/components/CaptchaWidget.js.map +1 -0
- package/dist/components/Checkbox.d.ts +9 -0
- package/dist/components/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox.js +31 -45
- package/dist/components/Checkbox.js.map +1 -0
- package/dist/components/ExtensionAccountSelect.d.ts +7 -0
- package/dist/components/ExtensionAccountSelect.d.ts.map +1 -0
- package/dist/components/ExtensionAccountSelect.js +30 -47
- package/dist/components/ExtensionAccountSelect.js.map +1 -0
- package/dist/components/LoadingSpinner.d.ts +6 -0
- package/dist/components/LoadingSpinner.d.ts.map +1 -0
- package/dist/components/LoadingSpinner.js +10 -12
- package/dist/components/LoadingSpinner.js.map +1 -0
- package/dist/components/Modal.d.ts +8 -0
- package/dist/components/Modal.d.ts.map +1 -0
- package/dist/components/Modal.js +36 -16
- package/dist/components/Modal.js.map +1 -0
- package/dist/components/Procaptcha.d.ts +6 -0
- package/dist/components/Procaptcha.d.ts.map +1 -0
- package/dist/components/Procaptcha.js +7 -8
- package/dist/components/Procaptcha.js.map +1 -0
- package/dist/components/ProcaptchaWidget.d.ts +8 -0
- package/dist/components/ProcaptchaWidget.d.ts.map +1 -0
- package/dist/components/ProcaptchaWidget.js +130 -221
- package/dist/components/ProcaptchaWidget.js.map +1 -0
- package/dist/components/collector.d.ts +8 -0
- package/dist/components/collector.d.ts.map +1 -0
- package/dist/components/collector.js +23 -24
- package/dist/components/collector.js.map +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +7 -11
- package/dist/components/index.js.map +1 -0
- package/dist/components/theme.d.ts +51 -0
- package/dist/components/theme.d.ts.map +1 -0
- package/dist/components/theme.js +35 -38
- package/dist/components/theme.js.map +1 -0
- package/dist/index.d.ts +3 -42
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -12
- package/dist/index.js.map +1 -0
- package/dist/util/index.d.ts +9 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/index.js +7 -12
- package/dist/util/index.js.map +1 -0
- package/package.json +7 -7
- package/dist/cjs/style/Modal.css +0 -41
- package/dist/style/Modal.css +0 -41
- package/public/style/Modal.css +0 -41
- package/vite.config.ts +0 -22
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Manager } from
|
|
3
|
-
import { LoadingSpinner } from
|
|
4
|
-
import { css } from
|
|
5
|
-
import {
|
|
6
|
-
import { useRef, useState
|
|
7
|
-
import CaptchaComponent from
|
|
8
|
-
import Checkbox from
|
|
9
|
-
import Collector from
|
|
10
|
-
import
|
|
11
|
-
const logoStyle = css`
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { Manager, } from '@prosopo/procaptcha';
|
|
3
|
+
import { LoadingSpinner } from './LoadingSpinner.js';
|
|
4
|
+
import { css } from '@emotion/react';
|
|
5
|
+
import { darkTheme, lightTheme } from './theme.js';
|
|
6
|
+
import { useMemo, useRef, useState } from 'react';
|
|
7
|
+
import CaptchaComponent from './CaptchaComponent.js';
|
|
8
|
+
import Checkbox from './Checkbox.js';
|
|
9
|
+
import Collector from './collector.js';
|
|
10
|
+
import Modal from './Modal.js';
|
|
11
|
+
const logoStyle = css `
|
|
12
12
|
align-items: center;
|
|
13
13
|
justify-content: flex-end;
|
|
14
14
|
display: flex;
|
|
@@ -40,222 +40,131 @@ const logoStyle = css`
|
|
|
40
40
|
}
|
|
41
41
|
`;
|
|
42
42
|
const useRefAsState = (defaultValue) => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
const ref = useRef(defaultValue);
|
|
44
|
+
const setter = (value) => {
|
|
45
|
+
ref.current = value;
|
|
46
|
+
};
|
|
47
|
+
const value = ref.current;
|
|
48
|
+
return [value, setter];
|
|
49
49
|
};
|
|
50
50
|
const useProcaptcha = () => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
if (nextState.sendData !== void 0)
|
|
116
|
-
setSendData(nextState.sendData);
|
|
117
|
-
}
|
|
118
|
-
];
|
|
51
|
+
const [isHuman, setIsHuman] = useState(false);
|
|
52
|
+
const [index, setIndex] = useState(0);
|
|
53
|
+
const [solutions, setSolutions] = useState([]);
|
|
54
|
+
const [captchaApi, setCaptchaApi] = useRefAsState(undefined);
|
|
55
|
+
const [showModal, setShowModal] = useState(false);
|
|
56
|
+
const [challenge, setChallenge] = useState(undefined);
|
|
57
|
+
const [loading, setLoading] = useState(false);
|
|
58
|
+
const [account, setAccount] = useState(undefined);
|
|
59
|
+
const [dappAccount, setDappAccount] = useState(undefined);
|
|
60
|
+
const [submission, setSubmission] = useRefAsState(undefined);
|
|
61
|
+
const [timeout, setTimeout] = useRefAsState(undefined);
|
|
62
|
+
const [blockNumber, setBlockNumber] = useRefAsState(undefined);
|
|
63
|
+
const [successfullChallengeTimeout, setSuccessfullChallengeTimeout] = useRefAsState(undefined);
|
|
64
|
+
const [sendData, setSendData] = useState(false);
|
|
65
|
+
return [
|
|
66
|
+
{
|
|
67
|
+
isHuman,
|
|
68
|
+
index,
|
|
69
|
+
solutions,
|
|
70
|
+
captchaApi,
|
|
71
|
+
showModal,
|
|
72
|
+
challenge,
|
|
73
|
+
loading,
|
|
74
|
+
account,
|
|
75
|
+
dappAccount,
|
|
76
|
+
submission,
|
|
77
|
+
timeout,
|
|
78
|
+
blockNumber,
|
|
79
|
+
successfullChallengeTimeout,
|
|
80
|
+
sendData,
|
|
81
|
+
},
|
|
82
|
+
(nextState) => {
|
|
83
|
+
if (nextState.account !== undefined)
|
|
84
|
+
setAccount(nextState.account);
|
|
85
|
+
if (nextState.isHuman !== undefined)
|
|
86
|
+
setIsHuman(nextState.isHuman);
|
|
87
|
+
if (nextState.index !== undefined)
|
|
88
|
+
setIndex(nextState.index);
|
|
89
|
+
if (nextState.solutions !== undefined)
|
|
90
|
+
setSolutions(nextState.solutions.slice());
|
|
91
|
+
if (nextState.captchaApi !== undefined)
|
|
92
|
+
setCaptchaApi(nextState.captchaApi);
|
|
93
|
+
if (nextState.showModal !== undefined)
|
|
94
|
+
setShowModal(nextState.showModal);
|
|
95
|
+
if (nextState.challenge !== undefined)
|
|
96
|
+
setChallenge(nextState.challenge);
|
|
97
|
+
if (nextState.loading !== undefined)
|
|
98
|
+
setLoading(nextState.loading);
|
|
99
|
+
if (nextState.showModal !== undefined)
|
|
100
|
+
setShowModal(nextState.showModal);
|
|
101
|
+
if (nextState.dappAccount !== undefined)
|
|
102
|
+
setDappAccount(nextState.dappAccount);
|
|
103
|
+
if (nextState.submission !== undefined)
|
|
104
|
+
setSubmission(nextState.submission);
|
|
105
|
+
if (nextState.timeout !== undefined)
|
|
106
|
+
setTimeout(nextState.timeout);
|
|
107
|
+
if (nextState.successfullChallengeTimeout !== undefined)
|
|
108
|
+
setSuccessfullChallengeTimeout(nextState.timeout);
|
|
109
|
+
if (nextState.blockNumber !== undefined)
|
|
110
|
+
setBlockNumber(nextState.blockNumber);
|
|
111
|
+
if (nextState.sendData !== undefined)
|
|
112
|
+
setSendData(nextState.sendData);
|
|
113
|
+
},
|
|
114
|
+
];
|
|
119
115
|
};
|
|
120
116
|
const ProcaptchaWidget = (props) => {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
display: "flex",
|
|
169
|
-
justifyContent: "flex-start",
|
|
170
|
-
alignItems: "center",
|
|
171
|
-
flexWrap: "wrap"
|
|
172
|
-
},
|
|
173
|
-
children: [
|
|
174
|
-
/* @__PURE__ */ jsxs(
|
|
175
|
-
"div",
|
|
176
|
-
{
|
|
177
|
-
style: {
|
|
178
|
-
height: "50px",
|
|
179
|
-
width: "50px",
|
|
180
|
-
display: "flex",
|
|
181
|
-
alignItems: "center",
|
|
182
|
-
justifyContent: "center",
|
|
183
|
-
flexDirection: "column",
|
|
184
|
-
verticalAlign: "middle"
|
|
185
|
-
},
|
|
186
|
-
children: [
|
|
187
|
-
/* @__PURE__ */ jsx(
|
|
188
|
-
"div",
|
|
189
|
-
{
|
|
190
|
-
style: {
|
|
191
|
-
display: !state.loading ? "flex" : "none"
|
|
192
|
-
},
|
|
193
|
-
children: /* @__PURE__ */ jsx(
|
|
194
|
-
Checkbox,
|
|
195
|
-
{
|
|
196
|
-
themeColor,
|
|
197
|
-
onChange: manager.start,
|
|
198
|
-
checked: state.isHuman
|
|
199
|
-
}
|
|
200
|
-
)
|
|
201
|
-
}
|
|
202
|
-
),
|
|
203
|
-
/* @__PURE__ */ jsx(
|
|
204
|
-
"div",
|
|
205
|
-
{
|
|
206
|
-
style: {
|
|
207
|
-
display: state.loading ? "flex" : "none"
|
|
208
|
-
},
|
|
209
|
-
children: /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsx(LoadingSpinner, { themeColor }) })
|
|
210
|
-
}
|
|
211
|
-
)
|
|
212
|
-
]
|
|
213
|
-
}
|
|
214
|
-
),
|
|
215
|
-
/* @__PURE__ */ jsx("div", { style: { padding: 1 }, children: /* @__PURE__ */ jsx("span", { style: { color: theme.palette.background.contrastText, paddingLeft: "4px" }, children: "I am a human" }) })
|
|
216
|
-
]
|
|
217
|
-
}
|
|
218
|
-
) }),
|
|
219
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
220
|
-
"a",
|
|
221
|
-
{
|
|
222
|
-
href: "https://www.prosopo.io/#features?ref=accounts.prosopo.io&utm_campaign=widget&utm_medium=checkbox",
|
|
223
|
-
target: "_blank",
|
|
224
|
-
"aria-label": "Visit prosopo.io to learn more about the service and its accessibility options.",
|
|
225
|
-
children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { children: [
|
|
226
|
-
/* @__PURE__ */ jsx(
|
|
227
|
-
"div",
|
|
228
|
-
{
|
|
229
|
-
css: logoStyle,
|
|
230
|
-
dangerouslySetInnerHTML: {
|
|
231
|
-
__html: props.config.theme === "light" ? logoWithoutTextBlack : logoWithoutTextWhite
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
),
|
|
235
|
-
/* @__PURE__ */ jsx(
|
|
236
|
-
"div",
|
|
237
|
-
{
|
|
238
|
-
css: logoStyle,
|
|
239
|
-
dangerouslySetInnerHTML: {
|
|
240
|
-
__html: props.config.theme === "light" ? logoWithTextBlack : logoWithTextWhite
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
)
|
|
244
|
-
] }) })
|
|
245
|
-
}
|
|
246
|
-
) })
|
|
247
|
-
]
|
|
248
|
-
}
|
|
249
|
-
)
|
|
250
|
-
] })
|
|
251
|
-
] }),
|
|
252
|
-
config.devOnlyWatchEvents && /* @__PURE__ */ jsx(Collector, { onProcessData: manager.exportData, sendData: state.showModal })
|
|
253
|
-
] });
|
|
117
|
+
console.log('config', props.config);
|
|
118
|
+
const config = props.config;
|
|
119
|
+
const callbacks = props.callbacks || {};
|
|
120
|
+
const [state, updateState] = useProcaptcha();
|
|
121
|
+
console.log('state', state);
|
|
122
|
+
const manager = Manager(config, state, updateState, callbacks);
|
|
123
|
+
const styleWidth = { maxWidth: '400px', minWidth: '200px', margin: '8px' };
|
|
124
|
+
const themeColor = props.config.theme === 'light' ? 'light' : 'dark';
|
|
125
|
+
const theme = useMemo(() => (props.config.theme === 'light' ? lightTheme : darkTheme), [props.config.theme]);
|
|
126
|
+
console.log('theme', theme);
|
|
127
|
+
console.log('showModal', state.showModal);
|
|
128
|
+
return (_jsxs("div", { children: [_jsxs("div", { style: { maxWidth: '100%', maxHeight: '100%', overflowX: 'auto' }, children: [_jsx(Modal, { show: state.showModal, children: state.challenge ? (_jsx(CaptchaComponent, { challenge: state.challenge, index: state.index, solutions: state.solutions, onSubmit: manager.submit, onCancel: manager.cancel, onClick: manager.select, onNext: manager.nextRound, themeColor: config.theme ?? 'light' })) : (_jsx("div", { children: "No challenge set." })) }), _jsxs("div", { style: styleWidth, "data-cy": 'button-human', children: [' ', _jsxs("div", { style: {
|
|
129
|
+
padding: '8px',
|
|
130
|
+
border: '1px solid',
|
|
131
|
+
backgroundColor: theme.palette.background.default,
|
|
132
|
+
borderColor: theme.palette.grey[300],
|
|
133
|
+
borderRadius: '8px',
|
|
134
|
+
display: 'flex',
|
|
135
|
+
justifyContent: 'space-between',
|
|
136
|
+
alignItems: 'center',
|
|
137
|
+
flexWrap: 'wrap',
|
|
138
|
+
}, children: [_jsx("div", { style: { display: 'flex', flexDirection: 'column' }, children: _jsxs("div", { style: {
|
|
139
|
+
display: 'flex',
|
|
140
|
+
justifyContent: 'flex-start',
|
|
141
|
+
alignItems: 'center',
|
|
142
|
+
flexWrap: 'wrap',
|
|
143
|
+
}, children: [_jsxs("div", { style: {
|
|
144
|
+
height: '50px',
|
|
145
|
+
width: '50px',
|
|
146
|
+
display: 'flex',
|
|
147
|
+
alignItems: 'center',
|
|
148
|
+
justifyContent: 'center',
|
|
149
|
+
flexDirection: 'column',
|
|
150
|
+
verticalAlign: 'middle',
|
|
151
|
+
}, children: [_jsx("div", { style: {
|
|
152
|
+
display: !state.loading ? 'flex' : 'none',
|
|
153
|
+
}, children: _jsx(Checkbox, { themeColor: themeColor, onChange: manager.start, checked: state.isHuman }) }), _jsx("div", { style: {
|
|
154
|
+
display: state.loading ? 'flex' : 'none',
|
|
155
|
+
}, children: _jsx("div", { style: { flex: 1 }, children: _jsx(LoadingSpinner, { themeColor: themeColor }) }) })] }), _jsx("div", { style: { padding: 1 }, children: _jsx("span", { style: { color: theme.palette.background.contrastText, paddingLeft: '4px' }, children: "I am a human" }) })] }) }), _jsx("div", { children: _jsx("a", { href: "https://www.prosopo.io/#features?ref=accounts.prosopo.io&utm_campaign=widget&utm_medium=checkbox", target: "_blank", "aria-label": "Visit prosopo.io to learn more about the service and its accessibility options.", children: _jsx("div", { children: _jsxs("div", { children: [_jsx("div", { css: logoStyle, dangerouslySetInnerHTML: {
|
|
156
|
+
__html: props.config.theme === 'light'
|
|
157
|
+
? logoWithoutTextBlack
|
|
158
|
+
: logoWithoutTextWhite,
|
|
159
|
+
} }), _jsx("div", { css: logoStyle, dangerouslySetInnerHTML: {
|
|
160
|
+
__html: props.config.theme === 'light'
|
|
161
|
+
? logoWithTextBlack
|
|
162
|
+
: logoWithTextWhite,
|
|
163
|
+
} })] }) }) }) })] })] })] }), config.devOnlyWatchEvents && (_jsx(Collector, { onProcessData: manager.exportData, sendData: state.showModal }))] }));
|
|
254
164
|
};
|
|
255
165
|
const logoWithTextBlack = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2062.63 468.67" height="35px" width="140px"><defs><style>.cls-1{fill:#1d1d1b;}</style></defs><title>Prosopo Logo Black</title><path class="cls-1" d="M335.55,1825.19A147.75,147.75,0,0,1,483.3,1972.94h50.5c0-109.49-88.76-198.25-198.25-198.25v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M269.36,1891.39A147.74,147.74,0,0,1,417.1,2039.13h50.5c0-109.49-88.75-198.24-198.24-198.24v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M414,2157.17a147.75,147.75,0,0,1-147.74-147.74h-50.5c0,109.49,88.75,198.24,198.24,198.24v-50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M480.17,2091a147.74,147.74,0,0,1-147.74-147.75H281.92c0,109.49,88.76,198.25,198.25,198.25V2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M862.8,2017.5q-27.39,22.86-78.25,22.86h-65v112.19H654.82v-312h134q46.32,0,73.86,24.13t27.55,74.72Q890.2,1994.64,862.8,2017.5ZM813,1905.1q-12.37-10.36-34.7-10.38H719.59v91.87h58.75q22.32,0,34.7-11.22t12.39-35.56Q825.43,1915.48,813,1905.1Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1045.69,1916.42c.78.08,2.51.19,5.19.32v61.81c-3.81-.42-7.2-.71-10.16-.85s-5.36-.21-7.2-.21q-36.4,0-48.89,23.71-7,13.33-7,41.06v110.29H916.89V1921.82h57.58V1962q14-23.07,24.34-31.54,16.94-14.18,44-14.18C1044,1916.32,1044.92,1916.35,1045.69,1916.42Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1265.64,2124.32q-29.21,36.06-88.69,36.06t-88.69-36.06Q1059,2088.26,1059,2037.5q0-49.9,29.22-86.5t88.69-36.59q59.47,0,88.69,36.59t29.21,86.5Q1294.85,2088.26,1265.64,2124.32ZM1217.38,2091q14.17-18.81,14.18-53.48t-14.18-53.37q-14.19-18.7-40.64-18.71T1136,1984.13q-14.29,18.72-14.29,53.37T1136,2091q14.28,18.81,40.75,18.81T1217.38,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1371.81,2078.88q1.92,16.1,8.29,22.87,11.28,12.06,41.7,12.06,17.85,0,28.39-5.29t10.53-15.88a17.12,17.12,0,0,0-8.48-15.45q-8.49-5.28-63.12-18.2-39.33-9.73-55.41-24.35-16.08-14.39-16.09-41.49,0-32,25.14-54.93t70.75-23q43.26,0,70.53,17.25t31.29,59.59H1455q-1.27-11.64-6.58-18.42-10-12.27-34-12.28-19.74,0-28.13,6.14t-8.38,14.4c0,6.91,3,11.93,8.92,15q8.89,4.89,63,16.73,36,8.46,54.05,25.61,17.77,17.35,17.78,43.39,0,34.3-25.56,56t-79,21.7q-54.51,0-80.49-23t-26-58.53Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1745.54,2124.32q-29.22,36.06-88.7,36.06t-88.69-36.06q-29.2-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.7,36.59t29.21,86.5Q1774.75,2088.26,1745.54,2124.32ZM1697.27,2091q14.19-18.81,14.19-53.48t-14.19-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.28,53.37t14.28,53.48q14.3,18.81,40.75,18.81T1697.27,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1992.75,1946.59q28.24,29.84,28.23,87.63,0,61-27.58,92.93t-71.06,32q-27.69,0-46-13.76-10-7.62-19.6-22.23v120.24H1797V1921.82h57.79v34.08q9.79-15,20.88-23.71,20.23-15.43,48.15-15.45Q1964.53,1916.74,1992.75,1946.59Zm-46.3,43.39q-12.3-20.52-39.88-20.53-33.15,0-45.54,31.11-6.43,16.51-6.42,41.92,0,40.21,21.58,56.51,12.82,9.53,30.37,9.53,25.45,0,38.83-19.48t13.36-51.86Q1958.75,2010.51,1946.45,1990Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M2249.14,2124.32q-29.2,36.06-88.69,36.06t-88.69-36.06q-29.22-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.69,36.59t29.22,86.5Q2278.36,2088.26,2249.14,2124.32ZM2200.88,2091q14.19-18.81,14.18-53.48t-14.18-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.29,53.37t14.29,53.48q14.3,18.81,40.75,18.81T2200.88,2091Z" transform="translate(-215.73 -1774.69)"/></svg>';
|
|
256
166
|
const logoWithTextWhite = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2062.63 468.67" height="35px" width="140px"><defs><style>.cls-1{fill:#fff;}</style></defs><title>Prosopo Logo Black</title><path class="cls-1" d="M335.55,1825.19A147.75,147.75,0,0,1,483.3,1972.94h50.5c0-109.49-88.76-198.25-198.25-198.25v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M269.36,1891.39A147.74,147.74,0,0,1,417.1,2039.13h50.5c0-109.49-88.75-198.24-198.24-198.24v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M414,2157.17a147.75,147.75,0,0,1-147.74-147.74h-50.5c0,109.49,88.75,198.24,198.24,198.24v-50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M480.17,2091a147.74,147.74,0,0,1-147.74-147.75H281.92c0,109.49,88.76,198.25,198.25,198.25V2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M862.8,2017.5q-27.39,22.86-78.25,22.86h-65v112.19H654.82v-312h134q46.32,0,73.86,24.13t27.55,74.72Q890.2,1994.64,862.8,2017.5ZM813,1905.1q-12.37-10.36-34.7-10.38H719.59v91.87h58.75q22.32,0,34.7-11.22t12.39-35.56Q825.43,1915.48,813,1905.1Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1045.69,1916.42c.78.08,2.51.19,5.19.32v61.81c-3.81-.42-7.2-.71-10.16-.85s-5.36-.21-7.2-.21q-36.4,0-48.89,23.71-7,13.33-7,41.06v110.29H916.89V1921.82h57.58V1962q14-23.07,24.34-31.54,16.94-14.18,44-14.18C1044,1916.32,1044.92,1916.35,1045.69,1916.42Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1265.64,2124.32q-29.21,36.06-88.69,36.06t-88.69-36.06Q1059,2088.26,1059,2037.5q0-49.9,29.22-86.5t88.69-36.59q59.47,0,88.69,36.59t29.21,86.5Q1294.85,2088.26,1265.64,2124.32ZM1217.38,2091q14.17-18.81,14.18-53.48t-14.18-53.37q-14.19-18.7-40.64-18.71T1136,1984.13q-14.29,18.72-14.29,53.37T1136,2091q14.28,18.81,40.75,18.81T1217.38,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1371.81,2078.88q1.92,16.1,8.29,22.87,11.28,12.06,41.7,12.06,17.85,0,28.39-5.29t10.53-15.88a17.12,17.12,0,0,0-8.48-15.45q-8.49-5.28-63.12-18.2-39.33-9.73-55.41-24.35-16.08-14.39-16.09-41.49,0-32,25.14-54.93t70.75-23q43.26,0,70.53,17.25t31.29,59.59H1455q-1.27-11.64-6.58-18.42-10-12.27-34-12.28-19.74,0-28.13,6.14t-8.38,14.4c0,6.91,3,11.93,8.92,15q8.89,4.89,63,16.73,36,8.46,54.05,25.61,17.77,17.35,17.78,43.39,0,34.3-25.56,56t-79,21.7q-54.51,0-80.49-23t-26-58.53Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1745.54,2124.32q-29.22,36.06-88.7,36.06t-88.69-36.06q-29.2-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.7,36.59t29.21,86.5Q1774.75,2088.26,1745.54,2124.32ZM1697.27,2091q14.19-18.81,14.19-53.48t-14.19-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.28,53.37t14.28,53.48q14.3,18.81,40.75,18.81T1697.27,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1992.75,1946.59q28.24,29.84,28.23,87.63,0,61-27.58,92.93t-71.06,32q-27.69,0-46-13.76-10-7.62-19.6-22.23v120.24H1797V1921.82h57.79v34.08q9.79-15,20.88-23.71,20.23-15.43,48.15-15.45Q1964.53,1916.74,1992.75,1946.59Zm-46.3,43.39q-12.3-20.52-39.88-20.53-33.15,0-45.54,31.11-6.43,16.51-6.42,41.92,0,40.21,21.58,56.51,12.82,9.53,30.37,9.53,25.45,0,38.83-19.48t13.36-51.86Q1958.75,2010.51,1946.45,1990Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M2249.14,2124.32q-29.2,36.06-88.69,36.06t-88.69-36.06q-29.22-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.69,36.59t29.22,86.5Q2278.36,2088.26,2249.14,2124.32ZM2200.88,2091q14.19-18.81,14.18-53.48t-14.18-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.29,53.37t14.29,53.48q14.3,18.81,40.75,18.81T2200.88,2091Z" transform="translate(-215.73 -1774.69)"/></svg>';
|
|
257
167
|
const logoWithoutTextWhite = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 260 348" height="35px"><path id="Vector" d="M95.7053 40.2707C127.005 40.2707 157.022 52.6841 179.154 74.78C201.286 96.8759 213.719 126.844 213.719 158.093H254.056C254.056 70.7808 183.16 -4.57764e-05 95.7053 -4.57764e-05V40.2707Z" fill="#fff"/><path id="Vector_2" d="M42.8365 93.0614C58.3333 93.0614 73.6784 96.1087 87.9955 102.029C102.313 107.95 115.322 116.628 126.279 127.568C137.237 138.508 145.93 151.496 151.86 165.79C157.79 180.084 160.843 195.404 160.843 210.875H201.179C201.179 123.564 130.291 52.7906 42.8365 52.7906V93.0614Z" fill="#fff"/><path id="Vector_3" d="M158.367 305.005C127.07 305.003 97.056 292.59 74.926 270.496C52.796 248.402 40.3626 218.437 40.3604 187.191H0.0239563C0.0239563 274.503 70.9123 345.276 158.367 345.276V305.005Z" fill="#fff"/><path id="Vector_4" d="M211.219 252.239C195.722 252.239 180.376 249.191 166.059 243.27C151.741 237.349 138.732 228.67 127.774 217.729C116.816 206.788 108.123 193.799 102.194 179.505C96.2637 165.21 93.2121 149.889 93.2132 134.417H52.8687C52.8687 221.729 123.765 292.509 211.219 292.509V252.239Z" fill="#fff"/></g><defs><clipPath id="clip0_1_2"><rect width="254" height="345" fill="white"/></clipPath></defs></svg>';
|
|
258
168
|
const logoWithoutTextBlack = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 260 348" height="35px"><path id="Vector" d="M95.7053 40.2707C127.005 40.2707 157.022 52.6841 179.154 74.78C201.286 96.8759 213.719 126.844 213.719 158.093H254.056C254.056 70.7808 183.16 -4.57764e-05 95.7053 -4.57764e-05V40.2707Z" fill="#000000"/><path id="Vector_2" d="M42.8365 93.0614C58.3333 93.0614 73.6784 96.1087 87.9955 102.029C102.313 107.95 115.322 116.628 126.279 127.568C137.237 138.508 145.93 151.496 151.86 165.79C157.79 180.084 160.843 195.404 160.843 210.875H201.179C201.179 123.564 130.291 52.7906 42.8365 52.7906V93.0614Z" fill="#000000"/><path id="Vector_3" d="M158.367 305.005C127.07 305.003 97.056 292.59 74.926 270.496C52.796 248.402 40.3626 218.437 40.3604 187.191H0.0239563C0.0239563 274.503 70.9123 345.276 158.367 345.276V305.005Z" fill="#000000"/><path id="Vector_4" d="M211.219 252.239C195.722 252.239 180.376 249.191 166.059 243.27C151.741 237.349 138.732 228.67 127.774 217.729C116.816 206.788 108.123 193.799 102.194 179.505C96.2637 165.21 93.2121 149.889 93.2132 134.417H52.8687C52.8687 221.729 123.765 292.509 211.219 292.509V252.239Z" fill="#000000"/></g><defs><clipPath id="clip0_1_2"><rect width="254" height="345" fill="white"/></clipPath></defs></svg>';
|
|
259
|
-
export
|
|
260
|
-
|
|
261
|
-
};
|
|
169
|
+
export default ProcaptchaWidget;
|
|
170
|
+
//# sourceMappingURL=ProcaptchaWidget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProcaptchaWidget.js","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":";AAcA,OAAO,EAGH,OAAO,GAOV,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,GAA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ilH,CAAA;AAErlH,MAAM,oBAAoB,GACtB,+uCAA+uC,CAAA;AAEnvC,MAAM,oBAAoB,GACtB,2vCAA2vC,CAAA;AAE/vC,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StoredEvents } from '@prosopo/types';
|
|
2
|
+
type CollectorProps = {
|
|
3
|
+
onProcessData: (data: StoredEvents) => void;
|
|
4
|
+
sendData: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const Collector: ({ onProcessData, sendData }: CollectorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Collector;
|
|
8
|
+
//# sourceMappingURL=collector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../src/components/collector.tsx"],"names":[],"mappings":"AACA,OAAO,EAA8D,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAGzG,KAAK,cAAc,GAAG;IAClB,aAAa,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAA;IAC3C,QAAQ,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,QAAA,MAAM,SAAS,gCAAiC,cAAc,qDAwB7D,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { startCollector } from
|
|
1
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { startCollector } from '@prosopo/procaptcha';
|
|
4
4
|
const Collector = ({ onProcessData, sendData }) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
Collector as default
|
|
5
|
+
const [mouseEvents, setStoredMouseEvents] = useState([]);
|
|
6
|
+
const [touchEvents, setStoredTouchEvents] = useState([]);
|
|
7
|
+
const [keyboardEvents, setStoredKeyboardEvents] = useState([]);
|
|
8
|
+
const ref = useRef(null);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (ref && ref.current) {
|
|
11
|
+
startCollector(setStoredMouseEvents, setStoredTouchEvents, setStoredKeyboardEvents, ref.current);
|
|
12
|
+
}
|
|
13
|
+
}, []);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const userEvents = {
|
|
16
|
+
mouseEvents,
|
|
17
|
+
touchEvents,
|
|
18
|
+
keyboardEvents,
|
|
19
|
+
};
|
|
20
|
+
onProcessData(userEvents);
|
|
21
|
+
}, [sendData]);
|
|
22
|
+
return _jsx("div", { ref: ref });
|
|
26
23
|
};
|
|
24
|
+
export default Collector;
|
|
25
|
+
//# sourceMappingURL=collector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collector.js","sourceRoot":"","sources":["../../src/components/collector.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAoB,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAErE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAOpD,MAAM,SAAS,GAAG,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAkB,EAAE,EAAE;IAC9D,MAAM,CAAC,WAAW,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAsB,EAAE,CAAC,CAAA;IAC7E,MAAM,CAAC,WAAW,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAsB,EAAE,CAAC,CAAA;IAC7E,MAAM,CAAC,cAAc,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAAyB,EAAE,CAAC,CAAA;IAEtF,MAAM,GAAG,GAA4C,MAAM,CAAiB,IAAI,CAAC,CAAA;IAEjF,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,GAAG,IAAI,GAAG,CAAC,OAAO,EAAE;YACpB,cAAc,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;SACnG;IACL,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,UAAU,GAAG;YACf,WAAW;YACX,WAAW;YACX,cAAc;SACjB,CAAA;QAED,aAAa,CAAC,UAAU,CAAC,CAAA;IAC7B,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEd,OAAO,cAAK,GAAG,EAAE,GAAG,GAAQ,CAAA;AAChC,CAAC,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './CaptchaWidget.js';
|
|
2
|
+
export * from './CaptchaComponent.js';
|
|
3
|
+
export { default as ExtensionAccountSelect } from './ExtensionAccountSelect.js';
|
|
4
|
+
export { default as ProcaptchaWidget } from './ProcaptchaWidget.js';
|
|
5
|
+
export { default as Procaptcha } from './Procaptcha.js';
|
|
6
|
+
export * from './Procaptcha.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAaA,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACvD,cAAc,iBAAiB,CAAA"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
ExtensionAccountSelect,
|
|
9
|
-
default3 as Procaptcha,
|
|
10
|
-
default2 as ProcaptchaWidget
|
|
11
|
-
};
|
|
1
|
+
export * from './CaptchaWidget.js';
|
|
2
|
+
export * from './CaptchaComponent.js';
|
|
3
|
+
export { default as ExtensionAccountSelect } from './ExtensionAccountSelect.js';
|
|
4
|
+
export { default as ProcaptchaWidget } from './ProcaptchaWidget.js';
|
|
5
|
+
export { default as Procaptcha } from './Procaptcha.js';
|
|
6
|
+
export * from './Procaptcha.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAaA,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACvD,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare const lightTheme: {
|
|
2
|
+
palette: {
|
|
3
|
+
mode: string;
|
|
4
|
+
primary: {
|
|
5
|
+
main: string;
|
|
6
|
+
contrastText: string;
|
|
7
|
+
};
|
|
8
|
+
background: {
|
|
9
|
+
default: string;
|
|
10
|
+
contrastText: string;
|
|
11
|
+
};
|
|
12
|
+
grey: {
|
|
13
|
+
0: string;
|
|
14
|
+
100: string;
|
|
15
|
+
200: string;
|
|
16
|
+
300: string;
|
|
17
|
+
400: string;
|
|
18
|
+
500: string;
|
|
19
|
+
600: string;
|
|
20
|
+
700: string;
|
|
21
|
+
800: string;
|
|
22
|
+
900: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare const darkTheme: {
|
|
27
|
+
palette: {
|
|
28
|
+
mode: string;
|
|
29
|
+
primary: {
|
|
30
|
+
main: string;
|
|
31
|
+
contrastText: string;
|
|
32
|
+
};
|
|
33
|
+
background: {
|
|
34
|
+
default: string;
|
|
35
|
+
contrastText: string;
|
|
36
|
+
};
|
|
37
|
+
grey: {
|
|
38
|
+
0: string;
|
|
39
|
+
100: string;
|
|
40
|
+
200: string;
|
|
41
|
+
300: string;
|
|
42
|
+
400: string;
|
|
43
|
+
500: string;
|
|
44
|
+
600: string;
|
|
45
|
+
700: string;
|
|
46
|
+
800: string;
|
|
47
|
+
900: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/components/theme.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;CAatB,CAAA;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;CAarB,CAAA"}
|