@prosopo/procaptcha-react 0.2.40 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/cjs/components/Button.cjs +2 -1
  2. package/dist/cjs/components/CaptchaComponent.cjs +2 -1
  3. package/dist/cjs/components/CaptchaWidget.cjs +2 -1
  4. package/dist/cjs/components/ExtensionAccountSelect.cjs +1 -2
  5. package/dist/cjs/components/Modal.cjs +27 -3
  6. package/dist/cjs/components/Procaptcha.cjs +2 -1
  7. package/dist/cjs/components/ProcaptchaWidget.cjs +5 -4
  8. package/dist/cjs/index.cjs +2 -2
  9. package/dist/cjs/{components → web-components/dist}/CaptchaPlaceholder.cjs +30 -83
  10. package/dist/cjs/{components → web-components/dist}/Checkbox.cjs +4 -15
  11. package/dist/cjs/{components → web-components/dist}/LoadingSpinner.cjs +1 -1
  12. package/dist/cjs/web-components/dist/index.cjs +11 -0
  13. package/dist/components/Button.d.ts +10 -0
  14. package/dist/components/Button.d.ts.map +1 -0
  15. package/dist/components/Button.js +55 -65
  16. package/dist/components/Button.js.map +1 -0
  17. package/dist/components/CaptchaComponent.d.ts +14 -0
  18. package/dist/components/CaptchaComponent.d.ts.map +1 -0
  19. package/dist/components/CaptchaComponent.js +59 -156
  20. package/dist/components/CaptchaComponent.js.map +1 -0
  21. package/dist/components/CaptchaWidget.d.ts +9 -0
  22. package/dist/components/CaptchaWidget.d.ts.map +1 -0
  23. package/dist/components/CaptchaWidget.js +66 -144
  24. package/dist/components/CaptchaWidget.js.map +1 -0
  25. package/dist/components/ExtensionAccountSelect.d.ts +6 -0
  26. package/dist/components/ExtensionAccountSelect.d.ts.map +1 -0
  27. package/dist/components/ExtensionAccountSelect.js +29 -47
  28. package/dist/components/ExtensionAccountSelect.js.map +1 -0
  29. package/dist/components/Modal.d.ts +8 -0
  30. package/dist/components/Modal.d.ts.map +1 -0
  31. package/dist/components/Modal.js +36 -16
  32. package/dist/components/Modal.js.map +1 -0
  33. package/dist/components/Procaptcha.d.ts +6 -0
  34. package/dist/components/Procaptcha.d.ts.map +1 -0
  35. package/dist/components/Procaptcha.js +7 -8
  36. package/dist/components/Procaptcha.js.map +1 -0
  37. package/dist/components/ProcaptchaWidget.d.ts +8 -0
  38. package/dist/components/ProcaptchaWidget.d.ts.map +1 -0
  39. package/dist/components/ProcaptchaWidget.js +128 -221
  40. package/dist/components/ProcaptchaWidget.js.map +1 -0
  41. package/dist/components/collector.d.ts +8 -0
  42. package/dist/components/collector.d.ts.map +1 -0
  43. package/dist/components/collector.js +23 -24
  44. package/dist/components/collector.js.map +1 -0
  45. package/dist/components/index.d.ts +7 -0
  46. package/dist/components/index.d.ts.map +1 -0
  47. package/dist/components/index.js +7 -11
  48. package/dist/components/index.js.map +1 -0
  49. package/dist/index.d.ts +3 -42
  50. package/dist/index.d.ts.map +1 -0
  51. package/dist/index.js +3 -12
  52. package/dist/index.js.map +1 -0
  53. package/dist/util/index.d.ts +9 -0
  54. package/dist/util/index.d.ts.map +1 -0
  55. package/dist/util/index.js +7 -12
  56. package/dist/util/index.js.map +1 -0
  57. package/package.json +8 -7
  58. package/typedoc.config.js +6 -0
  59. package/dist/cjs/style/Modal.css +0 -41
  60. package/dist/components/CaptchaPlaceholder.js +0 -132
  61. package/dist/components/Checkbox.js +0 -57
  62. package/dist/components/LoadingSpinner.js +0 -30
  63. package/dist/components/theme.js +0 -44
  64. package/dist/style/Modal.css +0 -41
  65. package/public/style/Modal.css +0 -41
  66. package/vite.config.ts +0 -22
  67. /package/dist/cjs/{components → web-components/dist}/theme.cjs +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Procaptcha.d.ts","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":";AAGA,QAAA,MAAM,gBAAgB,mJAAoD,CAAA;AAC1E,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEpE,QAAA,MAAM,UAAU,UAAW,eAAe,qDAIzC,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -1,8 +1,7 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
2
- import { ProcaptchaPlaceholder } from "./CaptchaPlaceholder.js";
3
- import { lazy, Suspense } from "react";
4
- const ProcaptchaWidget = lazy(async () => import("./ProcaptchaWidget.js"));
5
- const Procaptcha = (props) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(ProcaptchaPlaceholder, { darkMode: props.config.theme }), children: /* @__PURE__ */ jsx(ProcaptchaWidget, { config: props.config, callbacks: props.callbacks }) });
6
- export {
7
- Procaptcha as default
8
- };
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
+ import { ProcaptchaPlaceholder } from '@prosopo/web-components';
3
+ import { Suspense, lazy } from 'react';
4
+ const ProcaptchaWidget = lazy(async () => import('./ProcaptchaWidget.js'));
5
+ const Procaptcha = (props) => (_jsx(Suspense, { fallback: _jsx(ProcaptchaPlaceholder, { darkMode: props.config.theme }), children: _jsx(ProcaptchaWidget, { config: props.config, callbacks: props.callbacks }) }));
6
+ export default Procaptcha;
7
+ //# sourceMappingURL=Procaptcha.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Procaptcha.js","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAA;AAG1E,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE,CAAC,CAC3C,KAAC,QAAQ,IAAC,QAAQ,EAAE,KAAC,qBAAqB,IAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,GAAI,YACvE,KAAC,gBAAgB,IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAqB,GAChF,CACd,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { ProcaptchaCallbacks, ProcaptchaConfigOptional } from '@prosopo/procaptcha';
2
+ export interface ProcaptchaProps {
3
+ config: ProcaptchaConfigOptional;
4
+ callbacks?: Partial<ProcaptchaCallbacks>;
5
+ }
6
+ declare const ProcaptchaWidget: (props: ProcaptchaProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export default ProcaptchaWidget;
8
+ //# sourceMappingURL=ProcaptchaWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProcaptchaWidget.d.ts","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAEH,mBAAmB,EACnB,wBAAwB,EAK3B,MAAM,qBAAqB,CAAA;AA0C5B,MAAM,WAAW,eAAe;IAE5B,MAAM,EAAE,wBAAwB,CAAA;IAEhC,SAAS,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAC3C;AA0ED,QAAA,MAAM,gBAAgB,UAAW,eAAe,qDAsI/C,CAAA;AAcD,eAAe,gBAAgB,CAAA"}
@@ -1,14 +1,12 @@
1
- import { jsxs, jsx } 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 { lightTheme, darkTheme } from "./theme.js";
6
- import { useRef, useState, useMemo } from "react";
7
- import CaptchaComponent from "./CaptchaComponent.js";
8
- import Checkbox from "./Checkbox.js";
9
- import Collector from "./collector.js";
10
- import ModalComponent from "./Modal.js";
11
- const logoStyle = css`
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
+ import { Checkbox, LoadingSpinner, darkTheme, lightTheme } from '@prosopo/web-components';
3
+ import { Manager, } from '@prosopo/procaptcha';
4
+ import { css } from '@emotion/react';
5
+ import { useMemo, useRef, useState } from 'react';
6
+ import CaptchaComponent from './CaptchaComponent.js';
7
+ import Collector from './collector.js';
8
+ import Modal from './Modal.js';
9
+ const logoStyle = css `
12
10
  align-items: center;
13
11
  justify-content: flex-end;
14
12
  display: flex;
@@ -40,222 +38,131 @@ const logoStyle = css`
40
38
  }
41
39
  `;
42
40
  const useRefAsState = (defaultValue) => {
43
- const ref = useRef(defaultValue);
44
- const setter = (value2) => {
45
- ref.current = value2;
46
- };
47
- const value = ref.current;
48
- return [value, setter];
41
+ const ref = useRef(defaultValue);
42
+ const setter = (value) => {
43
+ ref.current = value;
44
+ };
45
+ const value = ref.current;
46
+ return [value, setter];
49
47
  };
50
48
  const useProcaptcha = () => {
51
- const [isHuman, setIsHuman] = useState(false);
52
- const [index, setIndex] = useState(0);
53
- const [solutions, setSolutions] = useState([]);
54
- const [captchaApi, setCaptchaApi] = useRefAsState(void 0);
55
- const [showModal, setShowModal] = useState(false);
56
- const [challenge, setChallenge] = useState(void 0);
57
- const [loading, setLoading] = useState(false);
58
- const [account, setAccount] = useState(void 0);
59
- const [dappAccount, setDappAccount] = useState(void 0);
60
- const [submission, setSubmission] = useRefAsState(void 0);
61
- const [timeout, setTimeout] = useRefAsState(void 0);
62
- const [blockNumber, setBlockNumber] = useRefAsState(void 0);
63
- const [successfullChallengeTimeout, setSuccessfullChallengeTimeout] = useRefAsState(
64
- void 0
65
- );
66
- const [sendData, setSendData] = useState(false);
67
- return [
68
- // the state
69
- {
70
- isHuman,
71
- index,
72
- solutions,
73
- captchaApi,
74
- showModal,
75
- challenge,
76
- loading,
77
- account,
78
- dappAccount,
79
- submission,
80
- timeout,
81
- blockNumber,
82
- successfullChallengeTimeout,
83
- sendData
84
- },
85
- // and method to update the state
86
- (nextState) => {
87
- if (nextState.account !== void 0)
88
- setAccount(nextState.account);
89
- if (nextState.isHuman !== void 0)
90
- setIsHuman(nextState.isHuman);
91
- if (nextState.index !== void 0)
92
- setIndex(nextState.index);
93
- if (nextState.solutions !== void 0)
94
- setSolutions(nextState.solutions.slice());
95
- if (nextState.captchaApi !== void 0)
96
- setCaptchaApi(nextState.captchaApi);
97
- if (nextState.showModal !== void 0)
98
- setShowModal(nextState.showModal);
99
- if (nextState.challenge !== void 0)
100
- setChallenge(nextState.challenge);
101
- if (nextState.loading !== void 0)
102
- setLoading(nextState.loading);
103
- if (nextState.showModal !== void 0)
104
- setShowModal(nextState.showModal);
105
- if (nextState.dappAccount !== void 0)
106
- setDappAccount(nextState.dappAccount);
107
- if (nextState.submission !== void 0)
108
- setSubmission(nextState.submission);
109
- if (nextState.timeout !== void 0)
110
- setTimeout(nextState.timeout);
111
- if (nextState.successfullChallengeTimeout !== void 0)
112
- setSuccessfullChallengeTimeout(nextState.timeout);
113
- if (nextState.blockNumber !== void 0)
114
- setBlockNumber(nextState.blockNumber);
115
- if (nextState.sendData !== void 0)
116
- setSendData(nextState.sendData);
117
- }
118
- ];
49
+ const [isHuman, setIsHuman] = useState(false);
50
+ const [index, setIndex] = useState(0);
51
+ const [solutions, setSolutions] = useState([]);
52
+ const [captchaApi, setCaptchaApi] = useRefAsState(undefined);
53
+ const [showModal, setShowModal] = useState(false);
54
+ const [challenge, setChallenge] = useState(undefined);
55
+ const [loading, setLoading] = useState(false);
56
+ const [account, setAccount] = useState(undefined);
57
+ const [dappAccount, setDappAccount] = useState(undefined);
58
+ const [submission, setSubmission] = useRefAsState(undefined);
59
+ const [timeout, setTimeout] = useRefAsState(undefined);
60
+ const [blockNumber, setBlockNumber] = useRefAsState(undefined);
61
+ const [successfullChallengeTimeout, setSuccessfullChallengeTimeout] = useRefAsState(undefined);
62
+ const [sendData, setSendData] = useState(false);
63
+ return [
64
+ {
65
+ isHuman,
66
+ index,
67
+ solutions,
68
+ captchaApi,
69
+ showModal,
70
+ challenge,
71
+ loading,
72
+ account,
73
+ dappAccount,
74
+ submission,
75
+ timeout,
76
+ blockNumber,
77
+ successfullChallengeTimeout,
78
+ sendData,
79
+ },
80
+ (nextState) => {
81
+ if (nextState.account !== undefined)
82
+ setAccount(nextState.account);
83
+ if (nextState.isHuman !== undefined)
84
+ setIsHuman(nextState.isHuman);
85
+ if (nextState.index !== undefined)
86
+ setIndex(nextState.index);
87
+ if (nextState.solutions !== undefined)
88
+ setSolutions(nextState.solutions.slice());
89
+ if (nextState.captchaApi !== undefined)
90
+ setCaptchaApi(nextState.captchaApi);
91
+ if (nextState.showModal !== undefined)
92
+ setShowModal(nextState.showModal);
93
+ if (nextState.challenge !== undefined)
94
+ setChallenge(nextState.challenge);
95
+ if (nextState.loading !== undefined)
96
+ setLoading(nextState.loading);
97
+ if (nextState.showModal !== undefined)
98
+ setShowModal(nextState.showModal);
99
+ if (nextState.dappAccount !== undefined)
100
+ setDappAccount(nextState.dappAccount);
101
+ if (nextState.submission !== undefined)
102
+ setSubmission(nextState.submission);
103
+ if (nextState.timeout !== undefined)
104
+ setTimeout(nextState.timeout);
105
+ if (nextState.successfullChallengeTimeout !== undefined)
106
+ setSuccessfullChallengeTimeout(nextState.timeout);
107
+ if (nextState.blockNumber !== undefined)
108
+ setBlockNumber(nextState.blockNumber);
109
+ if (nextState.sendData !== undefined)
110
+ setSendData(nextState.sendData);
111
+ },
112
+ ];
119
113
  };
120
114
  const ProcaptchaWidget = (props) => {
121
- console.log("config", props.config);
122
- const config = props.config;
123
- const callbacks = props.callbacks || {};
124
- const [state, updateState] = useProcaptcha();
125
- console.log("state", state);
126
- const manager = Manager(config, state, updateState, callbacks);
127
- const styleWidth = { maxWidth: "400px", minWidth: "200px", margin: "8px" };
128
- const themeColor = props.config.theme === "light" ? "light" : "dark";
129
- const theme = useMemo(() => props.config.theme === "light" ? lightTheme : darkTheme, [props.config.theme]);
130
- console.log("theme", theme);
131
- console.log("showModal", state.showModal);
132
- return /* @__PURE__ */ jsxs("div", { children: [
133
- /* @__PURE__ */ jsxs("div", { style: { maxWidth: "100%", maxHeight: "100%", overflowX: "auto" }, children: [
134
- /* @__PURE__ */ jsx(ModalComponent, { show: state.showModal, children: state.challenge ? /* @__PURE__ */ jsx(
135
- CaptchaComponent,
136
- {
137
- challenge: state.challenge,
138
- index: state.index,
139
- solutions: state.solutions,
140
- onSubmit: manager.submit,
141
- onCancel: manager.cancel,
142
- onClick: manager.select,
143
- onNext: manager.nextRound,
144
- themeColor: config.theme ?? "light"
145
- }
146
- ) : /* @__PURE__ */ jsx("div", { children: "No challenge set." }) }),
147
- /* @__PURE__ */ jsxs("div", { style: styleWidth, "data-cy": "button-human", children: [
148
- " ",
149
- /* @__PURE__ */ jsxs(
150
- "div",
151
- {
152
- style: {
153
- padding: "8px",
154
- border: "1px solid",
155
- backgroundColor: theme.palette.background.default,
156
- borderColor: theme.palette.grey[300],
157
- borderRadius: "8px",
158
- display: "flex",
159
- justifyContent: "space-between",
160
- alignItems: "center",
161
- flexWrap: "wrap"
162
- },
163
- children: [
164
- /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsxs(
165
- "div",
166
- {
167
- style: {
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
- ] });
115
+ console.log('config', props.config);
116
+ const config = props.config;
117
+ const callbacks = props.callbacks || {};
118
+ const [state, updateState] = useProcaptcha();
119
+ console.log('state', state);
120
+ const manager = Manager(config, state, updateState, callbacks);
121
+ const styleWidth = { maxWidth: '400px', minWidth: '200px', margin: '8px' };
122
+ const themeColor = props.config.theme === 'light' ? 'light' : 'dark';
123
+ const theme = useMemo(() => (props.config.theme === 'light' ? lightTheme : darkTheme), [props.config.theme]);
124
+ console.log('theme', theme);
125
+ console.log('showModal', state.showModal);
126
+ 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: {
127
+ padding: '8px',
128
+ border: '1px solid',
129
+ backgroundColor: theme.palette.background.default,
130
+ borderColor: theme.palette.grey[300],
131
+ borderRadius: '8px',
132
+ display: 'flex',
133
+ justifyContent: 'space-between',
134
+ alignItems: 'center',
135
+ flexWrap: 'wrap',
136
+ }, children: [_jsx("div", { style: { display: 'flex', flexDirection: 'column' }, children: _jsxs("div", { style: {
137
+ display: 'flex',
138
+ justifyContent: 'flex-start',
139
+ alignItems: 'center',
140
+ flexWrap: 'wrap',
141
+ }, children: [_jsxs("div", { style: {
142
+ height: '50px',
143
+ width: '50px',
144
+ display: 'flex',
145
+ alignItems: 'center',
146
+ justifyContent: 'center',
147
+ flexDirection: 'column',
148
+ verticalAlign: 'middle',
149
+ }, children: [_jsx("div", { style: {
150
+ display: !state.loading ? 'flex' : 'none',
151
+ }, children: _jsx(Checkbox, { themeColor: themeColor, onChange: manager.start, checked: state.isHuman }) }), _jsx("div", { style: {
152
+ display: state.loading ? 'flex' : 'none',
153
+ }, 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: {
154
+ __html: props.config.theme === 'light'
155
+ ? logoWithoutTextBlack
156
+ : logoWithoutTextWhite,
157
+ } }), _jsx("div", { css: logoStyle, dangerouslySetInnerHTML: {
158
+ __html: props.config.theme === 'light'
159
+ ? logoWithTextBlack
160
+ : logoWithTextWhite,
161
+ } })] }) }) }) })] })] })] }), config.devOnlyWatchEvents && (_jsx(Collector, { onProcessData: manager.exportData, sendData: state.showModal }))] }));
254
162
  };
255
163
  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
164
  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
165
  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
166
  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
- ProcaptchaWidget as default
261
- };
167
+ export default ProcaptchaWidget;
168
+ //# sourceMappingURL=ProcaptchaWidget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProcaptchaWidget.js","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzF,OAAO,EACH,OAAO,GAOV,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,KAAK,MAAM,YAAY,CAAA;AAE9B,MAAM,SAAS,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BpB,CAAA;AAiBD,MAAM,aAAa,GAAG,CAAK,YAAe,EAA2B,EAAE;IACnE,MAAM,GAAG,GAAG,MAAM,CAAI,YAAY,CAAC,CAAA;IACnC,MAAM,MAAM,GAAG,CAAC,KAAQ,EAAE,EAAE;QACxB,GAAG,CAAC,OAAO,GAAG,KAAK,CAAA;IACvB,CAAC,CAAA;IACD,MAAM,KAAK,GAAM,GAAG,CAAC,OAAO,CAAA;IAC5B,OAAO,CAAC,KAA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C,KAAK,KAAK,OAAO;oEAC1B,CAAC,CAAC,oBAAoB;oEACtB,CAAC,CAAC,oBAAoB;6DACjC,GACH,EACF,cACI,GAAG,EAAE,SAAS,EACd,uBAAuB,EAAE;gEACrB,MAAM,EACF,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,OAAO;oEAC1B,CAAC,CAAC,iBAAiB;oEACnB,CAAC,CAAC,iBAAiB;6DAC9B,GACH,IACA,GACJ,GACN,GACF,IACJ,IACJ,IACJ,EACL,MAAM,CAAC,kBAAkB,IAAI,CAC1B,KAAC,SAAS,IAAC,aAAa,EAAE,OAAO,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAc,CACxF,IACC,CACT,CAAA;AACL,CAAC,CAAA;AAED,MAAM,iBAAiB,GACnB,olHAAolH,CAAA;AAExlH,MAAM,iBAAiB,GACnB,ilHAAilH,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 { useState, useRef, useEffect } from "react";
3
- import { startCollector } from "@prosopo/procaptcha";
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
- 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 /* @__PURE__ */ jsx("div", { ref });
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 * 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,cAAc,6BAA6B,CAAA;AAC3C,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACvD,cAAc,iBAAiB,CAAA"}
@@ -1,11 +1,7 @@
1
- import { CaptchaWidget } from "./CaptchaWidget.js";
2
- import "./CaptchaComponent.js";
3
- import { ExtensionAccountSelect } from "./ExtensionAccountSelect.js";
4
- import { default as default2 } from "./ProcaptchaWidget.js";
5
- import { default as default3 } from "./Procaptcha.js";
6
- export {
7
- CaptchaWidget,
8
- ExtensionAccountSelect,
9
- default3 as Procaptcha,
10
- default2 as ProcaptchaWidget
11
- };
1
+ export * from './CaptchaWidget.js';
2
+ export * from './CaptchaComponent.js';
3
+ export * 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,cAAc,6BAA6B,CAAA;AAC3C,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/index.d.ts CHANGED
@@ -1,42 +1,3 @@
1
- import { CaptchaResponseCaptcha } from '@prosopo/procaptcha';
2
- import { GetCaptchaResponse } from '@prosopo/api';
3
- import { JSX as JSX_2 } from '@emotion/react/jsx-runtime';
4
- import { ProcaptchaCallbacks } from '@prosopo/procaptcha';
5
- import { ProcaptchaConfigOptional } from '@prosopo/procaptcha';
6
-
7
- export declare interface CaptchaComponentProps {
8
- challenge: GetCaptchaResponse;
9
- index: number;
10
- solutions: string[][];
11
- onSubmit: () => void;
12
- onCancel: () => void;
13
- onClick: (hash: string) => void;
14
- onNext: () => void;
15
- themeColor: 'light' | 'dark';
16
- }
17
-
18
- export declare const CaptchaWidget: ({ challenge, solution, onClick, themeColor }: CaptchaWidgetProps) => JSX_2.Element;
19
-
20
- export declare interface CaptchaWidgetProps {
21
- challenge: CaptchaResponseCaptcha;
22
- solution: string[];
23
- onClick: (hash: string) => void;
24
- themeColor: 'light' | 'dark';
25
- }
26
-
27
- export declare const ExtensionAccountSelect: ({ value, dappName, onChange, }: {
28
- value?: string | undefined;
29
- dappName: string;
30
- onChange: (value: string) => void;
31
- }) => JSX_2.Element;
32
-
33
- export declare const Procaptcha: (props: ProcaptchaProps) => JSX_2.Element;
34
-
35
- declare interface ProcaptchaProps {
36
- config: ProcaptchaConfigOptional;
37
- callbacks?: Partial<ProcaptchaCallbacks>;
38
- }
39
-
40
- export declare const ProcaptchaWidget: (props: ProcaptchaProps) => JSX_2.Element;
41
-
42
- export { }
1
+ export * from './components/index.js';
2
+ export * from './util/index.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA"}
package/dist/index.js CHANGED
@@ -1,12 +1,3 @@
1
- import "./components/index.js";
2
- import "./util/index.js";
3
- import { ExtensionAccountSelect } from "./components/ExtensionAccountSelect.js";
4
- import { default as default2 } from "./components/ProcaptchaWidget.js";
5
- import { default as default3 } from "./components/Procaptcha.js";
6
- import { CaptchaWidget } from "./components/CaptchaWidget.js";
7
- export {
8
- CaptchaWidget,
9
- ExtensionAccountSelect,
10
- default3 as Procaptcha,
11
- default2 as ProcaptchaWidget
12
- };
1
+ export * from './components/index.js';
2
+ export * from './util/index.js';
3
+ //# sourceMappingURL=index.js.map