@prosopo/procaptcha-react 0.3.1 → 0.3.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.
Files changed (31) hide show
  1. package/README.md +3 -9
  2. package/dist/cjs/components/Modal.cjs +0 -1
  3. package/dist/cjs/components/ProcaptchaWidget.cjs +78 -140
  4. package/dist/cjs/components/collector.cjs +4 -3
  5. package/dist/cjs/web-components/dist/CaptchaPlaceholder.cjs +12 -52
  6. package/dist/cjs/web-components/dist/Checkbox.cjs +21 -11
  7. package/dist/cjs/web-components/dist/Containers.cjs +42 -0
  8. package/dist/cjs/web-components/dist/LoadingSpinner.cjs +4 -0
  9. package/dist/cjs/web-components/dist/Logo.cjs +16 -0
  10. package/dist/cjs/web-components/dist/LogoWithText.cjs +10 -0
  11. package/dist/cjs/web-components/dist/LogoWithoutText.cjs +10 -0
  12. package/dist/cjs/web-components/dist/WidgetConstants.cjs +12 -0
  13. package/dist/cjs/web-components/dist/index.cjs +11 -0
  14. package/dist/components/Button.d.ts.map +1 -1
  15. package/dist/components/Button.js.map +1 -1
  16. package/dist/components/Modal.d.ts.map +1 -1
  17. package/dist/components/Modal.js +0 -1
  18. package/dist/components/Modal.js.map +1 -1
  19. package/dist/components/Procaptcha.d.ts.map +1 -1
  20. package/dist/components/Procaptcha.js.map +1 -1
  21. package/dist/components/ProcaptchaWidget.d.ts +2 -2
  22. package/dist/components/ProcaptchaWidget.d.ts.map +1 -1
  23. package/dist/components/ProcaptchaWidget.js +27 -77
  24. package/dist/components/ProcaptchaWidget.js.map +1 -1
  25. package/dist/components/collector.d.ts +3 -2
  26. package/dist/components/collector.d.ts.map +1 -1
  27. package/dist/components/collector.js +4 -3
  28. package/dist/components/collector.js.map +1 -1
  29. package/package.json +8 -8
  30. package/typedoc.config.js +13 -0
  31. package/vite.cjs.config.ts +13 -0
package/README.md CHANGED
@@ -19,7 +19,7 @@ See the [client example](https://github.com/prosopo/client-example) for a minima
19
19
  in a frontend app.
20
20
 
21
21
  ```jsx
22
- <Procaptcha config={config} callbacks={{ onAccountNotFound, onError, onHuman, onExpired }} />
22
+ <Procaptcha config={config} callbacks={{ onError, onHuman, onExpired }} />
23
23
  ```
24
24
 
25
25
  ### Callbacks
@@ -34,7 +34,6 @@ The captcha event callbacks are defined as follows:
34
34
  */
35
35
  export interface ProcaptchaEvents {
36
36
  onError: (error: Error) => void
37
- onAccountNotFound: (address: string) => void
38
37
  onHuman: (output: ProcaptchaOutput) => void
39
38
  onExtensionNotFound: () => void
40
39
  onExpired: () => void
@@ -60,11 +59,6 @@ object contains the following fields:
60
59
  The `onError` callback is called when an error occurs during the captcha process. The `Error` object is a standard
61
60
  JavaScript error.
62
61
 
63
- ### onAccountNotFound
64
-
65
- The `onAccountNotFound` callback is called when the user's account is not found in the Procaptcha config in
66
- the [`userAccountAddress`](https://github.com/prosopo/captcha/blob/0bb4850adfe2b995dc16f7dd18e6ea844a0b6997/packages/types/src/config/config.ts#L116) field.
67
-
68
62
  ### onExpired
69
63
 
70
64
  The `onExpired` callback is called when the captcha challenge has expired. This can occur if the user takes too long to
@@ -83,7 +77,7 @@ our [React Demo](https://github.com/prosopo/captcha/blob/main/demos/client-examp
83
77
  The Procaptcha component is called as follows:
84
78
 
85
79
  ```tsx
86
- <Procaptcha config={config} callbacks={{ onAccountNotFound, onError, onHuman, onExpired }} />
80
+ <Procaptcha config={config} callbacks={{ onError, onHuman, onExpired }} />
87
81
  ```
88
82
 
89
83
  A config object is required and must contain your SITE_KEY. The callbacks are optional and can be used to handle the
@@ -91,7 +85,7 @@ various Procaptcha events. The following config demonstrates the `PROSOPO_SITE_K
91
85
  environment variables.
92
86
 
93
87
  ```tsx
94
- const config: ProcaptchaConfigOptional = {
88
+ const config: ProcaptchaClientConfigInput = {
95
89
  account: {
96
90
  address: process.env.PROSOPO_SITE_KEY || undefined,
97
91
  },
@@ -3,7 +3,6 @@ const jsxRuntime = require("@emotion/react/jsx-runtime");
3
3
  const React = require("react");
4
4
  const ModalComponent = React.memo((props, nextProps) => {
5
5
  const { show, children } = props;
6
- console.log("rendering modal with show: ", show);
7
6
  const display = show ? "block" : "none";
8
7
  const ModalOuterDivCss = {
9
8
  position: "fixed",
@@ -2,45 +2,16 @@
2
2
  const jsxRuntime = require("@emotion/react/jsx-runtime");
3
3
  require("../web-components/dist/index.cjs");
4
4
  const procaptcha = require("@prosopo/procaptcha");
5
- const react = require("@emotion/react");
6
5
  const React = require("react");
7
6
  const CaptchaComponent = require("./CaptchaComponent.cjs");
8
7
  const collector = require("./collector.cjs");
9
8
  const Modal = require("./Modal.cjs");
10
9
  const theme = require("../web-components/dist/theme.cjs");
10
+ const Containers = require("../web-components/dist/Containers.cjs");
11
+ const WidgetConstants = require("../web-components/dist/WidgetConstants.cjs");
11
12
  const Checkbox = require("../web-components/dist/Checkbox.cjs");
12
13
  const LoadingSpinner = require("../web-components/dist/LoadingSpinner.cjs");
13
- const logoStyle = react.css`
14
- align-items: center;
15
- justify-content: flex-end;
16
- display: flex;
17
- padding: 8px;
18
-
19
- @media (max-width: 245px) {
20
- &:nth-of-type(1),
21
- &:nth-of-type(2) {
22
- display: none;
23
- } /* Both logos hidden */
24
- }
25
-
26
- @media (min-width: 245px) and (max-width: 400px) {
27
- &:nth-of-type(1) {
28
- display: flex;
29
- } /* logoWithText */
30
- &:nth-of-type(2) {
31
- display: none;
32
- } /* logoWithoutText */
33
- }
34
-
35
- @media (min-width: 401px) {
36
- &:nth-of-type(1) {
37
- display: none;
38
- } /* logoWithText */
39
- &:nth-of-type(2) {
40
- display: flex;
41
- } /* logoWithoutText */
42
- }
43
- `;
14
+ const Logo = require("../web-components/dist/Logo.cjs");
44
15
  const useRefAsState = (defaultValue) => {
45
16
  const ref = React.useRef(defaultValue);
46
17
  const setter = (value2) => {
@@ -120,142 +91,109 @@ const useProcaptcha = () => {
120
91
  ];
121
92
  };
122
93
  const ProcaptchaWidget = (props) => {
123
- console.log("config", props.config);
124
94
  const config = props.config;
125
95
  const callbacks = props.callbacks || {};
126
96
  const [state, updateState] = useProcaptcha();
127
- console.log("state", state);
128
97
  const manager = procaptcha.Manager(config, state, updateState, callbacks);
129
- const styleWidth = { maxWidth: "400px", minWidth: "200px", margin: "8px" };
130
98
  const themeColor = props.config.theme === "light" ? "light" : "dark";
131
99
  const theme$1 = React.useMemo(() => props.config.theme === "light" ? theme.lightTheme : theme.darkTheme, [props.config.theme]);
132
- console.log("theme", theme$1);
133
- console.log("showModal", state.showModal);
134
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
135
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { maxWidth: "100%", maxHeight: "100%", overflowX: "auto" }, children: [
136
- /* @__PURE__ */ jsxRuntime.jsx(Modal, { show: state.showModal, children: state.challenge ? /* @__PURE__ */ jsxRuntime.jsx(
137
- CaptchaComponent,
138
- {
139
- challenge: state.challenge,
140
- index: state.index,
141
- solutions: state.solutions,
142
- onSubmit: manager.submit,
143
- onCancel: manager.cancel,
144
- onClick: manager.select,
145
- onNext: manager.nextRound,
146
- themeColor: config.theme ?? "light"
147
- }
148
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: "No challenge set." }) }),
149
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styleWidth, "data-cy": "button-human", children: [
100
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { maxWidth: "100%", maxHeight: "100%", overflowX: "auto" }, children: [
101
+ /* @__PURE__ */ jsxRuntime.jsx(Modal, { show: state.showModal, children: state.challenge ? /* @__PURE__ */ jsxRuntime.jsx(
102
+ CaptchaComponent,
103
+ {
104
+ challenge: state.challenge,
105
+ index: state.index,
106
+ solutions: state.solutions,
107
+ onSubmit: manager.submit,
108
+ onCancel: manager.cancel,
109
+ onClick: manager.select,
110
+ onNext: manager.nextRound,
111
+ themeColor: config.theme ?? "light"
112
+ }
113
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: "No challenge set." }) }),
114
+ /* @__PURE__ */ jsxRuntime.jsxs(Containers.ContainerDiv, { children: [
115
+ /* @__PURE__ */ jsxRuntime.jsx(Containers.WidthBasedStylesDiv, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: WidgetConstants.WIDGET_DIMENSIONS, "data-cy": "button-human", children: [
150
116
  " ",
151
117
  /* @__PURE__ */ jsxRuntime.jsxs(
152
118
  "div",
153
119
  {
154
120
  style: {
155
- padding: "8px",
121
+ padding: "2px",
156
122
  border: "1px solid",
157
123
  backgroundColor: theme$1.palette.background.default,
158
124
  borderColor: theme$1.palette.grey[300],
159
125
  borderRadius: "8px",
160
126
  display: "flex",
161
- justifyContent: "space-between",
162
127
  alignItems: "center",
163
- flexWrap: "wrap"
128
+ flexWrap: "wrap",
129
+ justifyContent: "space-between",
130
+ minHeight: `${WidgetConstants.WIDGET_INNER_HEIGHT}px`,
131
+ overflow: "hidden"
164
132
  },
165
133
  children: [
166
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
134
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "inline-flex", flexDirection: "column" }, children: /* @__PURE__ */ jsxRuntime.jsx(
167
135
  "div",
168
136
  {
169
137
  style: {
170
- display: "flex",
171
- justifyContent: "flex-start",
172
138
  alignItems: "center",
173
- flexWrap: "wrap"
139
+ flex: 1
174
140
  },
175
- children: [
176
- /* @__PURE__ */ jsxRuntime.jsxs(
177
- "div",
178
- {
179
- style: {
180
- height: "50px",
181
- width: "50px",
182
- display: "flex",
183
- alignItems: "center",
184
- justifyContent: "center",
185
- flexDirection: "column",
186
- verticalAlign: "middle"
187
- },
188
- children: [
189
- /* @__PURE__ */ jsxRuntime.jsx(
190
- "div",
191
- {
192
- style: {
193
- display: !state.loading ? "flex" : "none"
194
- },
195
- children: /* @__PURE__ */ jsxRuntime.jsx(
196
- Checkbox.Checkbox,
197
- {
198
- themeColor,
199
- onChange: manager.start,
200
- checked: state.isHuman
201
- }
202
- )
203
- }
204
- ),
205
- /* @__PURE__ */ jsxRuntime.jsx(
206
- "div",
207
- {
208
- style: {
209
- display: state.loading ? "flex" : "none"
210
- },
211
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(LoadingSpinner.LoadingSpinner, { themeColor }) })
212
- }
213
- )
214
- ]
215
- }
216
- ),
217
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: theme$1.palette.background.contrastText, paddingLeft: "4px" }, children: "I am a human" }) })
218
- ]
141
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
142
+ "div",
143
+ {
144
+ style: {
145
+ display: "flex",
146
+ alignItems: "center",
147
+ justifyContent: "center",
148
+ flexDirection: "column",
149
+ verticalAlign: "middle"
150
+ },
151
+ children: [
152
+ /* @__PURE__ */ jsxRuntime.jsx(
153
+ "div",
154
+ {
155
+ style: {
156
+ display: !state.loading ? "flex" : "none"
157
+ },
158
+ children: /* @__PURE__ */ jsxRuntime.jsx(
159
+ Checkbox.Checkbox,
160
+ {
161
+ themeColor,
162
+ onChange: manager.start,
163
+ checked: state.isHuman,
164
+ labelText: "I am human"
165
+ }
166
+ )
167
+ }
168
+ ),
169
+ /* @__PURE__ */ jsxRuntime.jsx(
170
+ "div",
171
+ {
172
+ style: {
173
+ display: state.loading ? "flex" : "none"
174
+ },
175
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "inline-flex" }, children: /* @__PURE__ */ jsxRuntime.jsx(LoadingSpinner.LoadingSpinner, { themeColor }) })
176
+ }
177
+ )
178
+ ]
179
+ }
180
+ )
219
181
  }
220
182
  ) }),
221
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
222
- "a",
223
- {
224
- href: "https://www.prosopo.io/#features?ref=accounts.prosopo.io&utm_campaign=widget&utm_medium=checkbox",
225
- target: "_blank",
226
- "aria-label": "Visit prosopo.io to learn more about the service and its accessibility options.",
227
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
228
- /* @__PURE__ */ jsxRuntime.jsx(
229
- "div",
230
- {
231
- css: logoStyle,
232
- dangerouslySetInnerHTML: {
233
- __html: props.config.theme === "light" ? logoWithoutTextBlack : logoWithoutTextWhite
234
- }
235
- }
236
- ),
237
- /* @__PURE__ */ jsxRuntime.jsx(
238
- "div",
239
- {
240
- css: logoStyle,
241
- dangerouslySetInnerHTML: {
242
- __html: props.config.theme === "light" ? logoWithTextBlack : logoWithTextWhite
243
- }
244
- }
245
- )
246
- ] }) })
247
- }
248
- ) })
183
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "inline-flex", flexDirection: "column" }, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: WidgetConstants.WIDGET_URL, target: "_blank", "aria-label": WidgetConstants.WIDGET_URL_TEXT, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(Logo, { themeColor }) }) }) })
249
184
  ]
250
185
  }
251
186
  )
252
- ] })
253
- ] }),
254
- config.devOnlyWatchEvents && /* @__PURE__ */ jsxRuntime.jsx(collector, { onProcessData: manager.exportData, sendData: state.showModal })
255
- ] });
187
+ ] }) }),
188
+ config.devOnlyWatchEvents && /* @__PURE__ */ jsxRuntime.jsx(
189
+ collector,
190
+ {
191
+ onProcessData: manager.exportData,
192
+ sendData: state.sendData,
193
+ account: state.account
194
+ }
195
+ )
196
+ ] })
197
+ ] }) });
256
198
  };
257
- 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>';
258
- 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>';
259
- 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>';
260
- 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>';
261
199
  module.exports = ProcaptchaWidget;
@@ -2,7 +2,7 @@
2
2
  const jsxRuntime = require("@emotion/react/jsx-runtime");
3
3
  const React = require("react");
4
4
  const procaptcha = require("@prosopo/procaptcha");
5
- const Collector = ({ onProcessData, sendData }) => {
5
+ const Collector = ({ onProcessData, sendData, account }) => {
6
6
  const [mouseEvents, setStoredMouseEvents] = React.useState([]);
7
7
  const [touchEvents, setStoredTouchEvents] = React.useState([]);
8
8
  const [keyboardEvents, setStoredKeyboardEvents] = React.useState([]);
@@ -18,8 +18,9 @@ const Collector = ({ onProcessData, sendData }) => {
18
18
  touchEvents,
19
19
  keyboardEvents
20
20
  };
21
- onProcessData(userEvents);
22
- }, [sendData]);
21
+ if (account)
22
+ onProcessData(userEvents);
23
+ }, [sendData, account]);
23
24
  return /* @__PURE__ */ jsxRuntime.jsx("div", { ref });
24
25
  };
25
26
  module.exports = Collector;
@@ -1,64 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("@emotion/react/jsx-runtime");
4
+ const Containers = require("./Containers.cjs");
4
5
  const LoadingSpinner = require("./LoadingSpinner.cjs");
5
- const react = require("@emotion/react");
6
+ const WidgetConstants = require("./WidgetConstants.cjs");
6
7
  const theme = require("./theme.cjs");
7
8
  const React = require("react");
8
- const logoStyle = react.css`
9
- align-items: center;
10
- justify-content: flex-end;
11
- display: flex;
12
- padding: 8px;
13
-
14
- @media (max-width: 245px) {
15
- &:nth-of-type(1),
16
- &:nth-of-type(2) {
17
- display: none;
18
- } /* Both logos hidden */
19
- }
20
-
21
- @media (min-width: 245px) and (max-width: 400px) {
22
- &:nth-of-type(1) {
23
- display: flex;
24
- } /* logoWithText */
25
- &:nth-of-type(2) {
26
- display: none;
27
- } /* logoWithoutText */
28
- }
29
-
30
- @media (min-width: 401px) {
31
- &:nth-of-type(1) {
32
- display: none;
33
- } /* logoWithText */
34
- &:nth-of-type(2) {
35
- display: flex;
36
- } /* logoWithoutText */
37
- }
38
- `;
9
+ const Logo = require("./Logo.cjs");
39
10
  const ProcaptchaPlaceholder = (props) => {
40
11
  const darkMode = props.darkMode;
41
- const styleWidth = { maxWidth: "400px", minWidth: "200px", margin: "8px" };
42
- const themeColor = darkMode ? "light" : "dark";
12
+ const themeColor = props.darkMode === "light" ? "light" : "dark";
43
13
  const theme$1 = React.useMemo(() => darkMode === "light" ? theme.lightTheme : theme.darkTheme, [darkMode]);
44
- return jsxRuntime.jsx("div", { children: jsxRuntime.jsx("div", { style: { maxWidth: "100%", maxHeight: "100%", overflowX: "auto" }, children: jsxRuntime.jsxs("div", { style: styleWidth, "data-cy": "button-human", children: [" ", jsxRuntime.jsxs("div", { style: {
45
- padding: "8px",
14
+ return jsxRuntime.jsx("div", { children: jsxRuntime.jsx("div", { style: { maxWidth: "100%", maxHeight: "100%", overflowX: "auto" }, children: jsxRuntime.jsx(Containers.ContainerDiv, { children: jsxRuntime.jsx(Containers.WidthBasedStylesDiv, { children: jsxRuntime.jsxs("div", { style: WidgetConstants.WIDGET_DIMENSIONS, "data-cy": "button-human", children: [" ", jsxRuntime.jsxs("div", { style: {
15
+ padding: "2px",
46
16
  border: "1px solid",
47
17
  backgroundColor: theme$1.palette.background.default,
48
18
  borderColor: theme$1.palette.grey[300],
49
19
  borderRadius: "8px",
50
20
  display: "flex",
51
- justifyContent: "space-between",
52
21
  alignItems: "center",
53
- flexWrap: "wrap"
22
+ flexWrap: "wrap",
23
+ justifyContent: "space-between",
24
+ minHeight: `${WidgetConstants.WIDGET_INNER_HEIGHT}px`,
25
+ overflow: "hidden"
54
26
  }, children: [jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column" }, children: jsxRuntime.jsx("div", { style: {
55
- display: "flex",
56
- justifyContent: "flex-start",
57
27
  alignItems: "center",
58
- flexWrap: "wrap"
28
+ flex: 1
59
29
  }, children: jsxRuntime.jsx("div", { style: {
60
- height: "50px",
61
- width: "50px",
62
30
  display: "flex",
63
31
  alignItems: "center",
64
32
  justifyContent: "center",
@@ -66,14 +34,6 @@ const ProcaptchaPlaceholder = (props) => {
66
34
  verticalAlign: "middle"
67
35
  }, children: jsxRuntime.jsx("div", { style: {
68
36
  display: "flex"
69
- }, children: jsxRuntime.jsx("div", { style: { flex: 1 }, children: jsxRuntime.jsx(LoadingSpinner.LoadingSpinner, { themeColor }) }) }) }) }) }), jsxRuntime.jsx("div", { children: jsxRuntime.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: jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { css: logoStyle, dangerouslySetInnerHTML: {
70
- __html: darkMode === "light" ? logoWithoutTextBlack : logoWithoutTextWhite
71
- } }), jsxRuntime.jsx("div", { css: logoStyle, dangerouslySetInnerHTML: {
72
- __html: darkMode === "light" ? logoWithTextBlack : logoWithTextWhite
73
- } })] }) }) }) })] })] }) }) });
37
+ }, children: jsxRuntime.jsx("div", { style: { display: "inline-flex" }, children: jsxRuntime.jsx(LoadingSpinner.LoadingSpinner, { themeColor }) }) }) }) }) }), jsxRuntime.jsx("div", { style: { display: "inline-flex", flexDirection: "column" }, children: jsxRuntime.jsx("a", { href: WidgetConstants.WIDGET_URL, target: "_blank", "aria-label": WidgetConstants.WIDGET_URL_TEXT, children: jsxRuntime.jsx("div", { style: { flex: 1 }, children: jsxRuntime.jsx(Logo, { themeColor }) }) }) })] })] }) }) }) }) });
74
38
  };
75
- 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>';
76
- 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>';
77
- 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>';
78
- 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>';
79
39
  exports.ProcaptchaPlaceholder = ProcaptchaPlaceholder;
@@ -5,16 +5,16 @@ const react = require("@emotion/react");
5
5
  const theme = require("./theme.cjs");
6
6
  const React = require("react");
7
7
  const checkboxBefore = react.css`{
8
- &:before {
9
- content: '""';
10
- position: absolute;
11
- height: 100%;
12
- width: 100%;
13
- }
8
+ &:before {
9
+ content: '""';
10
+ position: absolute;
11
+ height: 100%;
12
+ width: 100%;
13
+ }
14
14
  }`;
15
15
  const baseStyle = {
16
- width: "2.2em",
17
- height: "2.2em",
16
+ width: "28px",
17
+ height: "28px",
18
18
  top: "auto",
19
19
  left: "auto",
20
20
  opacity: "1",
@@ -25,7 +25,7 @@ const baseStyle = {
25
25
  borderStyle: "solid",
26
26
  borderWidth: "1px"
27
27
  };
28
- const Checkbox = ({ themeColor, onChange, checked }) => {
28
+ const Checkbox = ({ themeColor, onChange, checked, labelText }) => {
29
29
  const theme$1 = React.useMemo(() => themeColor === "light" ? theme.lightTheme : theme.darkTheme, [themeColor]);
30
30
  const checkboxStyleBase = {
31
31
  ...baseStyle,
@@ -36,10 +36,20 @@ const Checkbox = ({ themeColor, onChange, checked }) => {
36
36
  return {
37
37
  ...checkboxStyleBase,
38
38
  borderColor: hover ? theme$1.palette.background.contrastText : theme$1.palette.grey[400],
39
- appearance: checked ? "auto" : "none"
39
+ appearance: checked ? "auto" : "none",
40
+ flex: 1,
41
+ margin: "0 15px"
40
42
  };
41
43
  }, [hover, theme$1, checked]);
42
- return jsxRuntime.jsx("input", { onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), css: checkboxBefore, type: "checkbox", "aria-live": "assertive", "aria-haspopup": "true", onChange, checked, style: checkboxStyle });
44
+ const id = React.useId();
45
+ return jsxRuntime.jsxs("span", { style: { display: "inline-flex" }, children: [jsxRuntime.jsx("input", { name: id, onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), css: checkboxBefore, type: "checkbox", "aria-live": "assertive", "aria-haspopup": "true", onChange, checked, style: checkboxStyle }), jsxRuntime.jsx("label", { css: {
46
+ color: theme$1.palette.background.contrastText,
47
+ position: "relative",
48
+ display: "flex",
49
+ cursor: "pointer",
50
+ userSelect: "none",
51
+ top: "4px"
52
+ }, htmlFor: id, children: labelText })] });
43
53
  };
44
54
  exports.Checkbox = Checkbox;
45
55
  exports.default = Checkbox;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const WidgetConstants = require("./WidgetConstants.cjs");
4
+ const styled = require("@emotion/styled");
5
+ const ContainerDiv = styled.div`
6
+ container-type: inline-size;
7
+ `;
8
+ const WidthBasedStylesDiv = styled.div`
9
+ max-width: 100%;
10
+ max-height: 100%;
11
+ overflow: hidden;
12
+ height: ${WidgetConstants.WIDGET_OUTER_HEIGHT}px;
13
+ @container (max-width: 243px) {
14
+ #logo-without-text {
15
+ display: none;
16
+ }
17
+
18
+ #logo-with-text {
19
+ display: none;
20
+ }
21
+ }
22
+ @container (min-width: 244px) and (max-width: 339px) {
23
+ #logo-without-text {
24
+ display: inherit;
25
+ }
26
+
27
+ #logo-with-text {
28
+ display: none;
29
+ }
30
+ }
31
+ @container (min-width: 340px) {
32
+ #logo-without-text {
33
+ display: none;
34
+ }
35
+
36
+ #logo-with-text {
37
+ display: inherit;
38
+ }
39
+ }
40
+ `;
41
+ exports.ContainerDiv = ContainerDiv;
42
+ exports.WidthBasedStylesDiv = WidthBasedStylesDiv;
@@ -7,6 +7,9 @@ const styled = require("@emotion/styled");
7
7
  const LoadingSpinner = ({ themeColor }) => {
8
8
  const theme$1 = React.useMemo(() => themeColor === "light" ? theme.lightTheme : theme.darkTheme, [themeColor]);
9
9
  const StyledDiv = styled.div`
10
+ margin-top: 0;
11
+ margin-left: 15px;
12
+ margin-right: 15px;
10
13
  width: 2em;
11
14
  height: 2em;
12
15
  border: 4px solid ${theme$1.palette.background.contrastText};
@@ -15,6 +18,7 @@ const LoadingSpinner = ({ themeColor }) => {
15
18
  display: inherit;
16
19
  box-sizing: border-box;
17
20
  animation: rotation 1s linear infinite;
21
+
18
22
  @keyframes rotation {
19
23
  0% {
20
24
  transform: rotate(0deg);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
3
+ const LogoWithText = require("./LogoWithText.cjs");
4
+ const LogoWithoutText = require("./LogoWithoutText.cjs");
5
+ const styled = require("@emotion/styled");
6
+ const LogoContainer = styled.div`
7
+ padding: 8px;
8
+ flex: 1 1 0;
9
+ `;
10
+ const LogoInnerContainer = styled.div`
11
+ padding: 8px;
12
+ `;
13
+ const Logo = ({ themeColor }) => {
14
+ return jsxRuntime.jsx(LogoContainer, { children: jsxRuntime.jsxs(LogoInnerContainer, { children: [jsxRuntime.jsx(LogoWithoutText.LogoWithoutText, { themeColor }), jsxRuntime.jsx(LogoWithText.LogoWithText, { themeColor })] }) });
15
+ };
16
+ module.exports = Logo;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
4
+ const React = require("react");
5
+ const LogoWithText = ({ themeColor }) => {
6
+ const fill = React.useMemo(() => themeColor === "light" ? "#1d1d1b" : "#fff", [themeColor]);
7
+ return jsxRuntime.jsxs("svg", { className: "logo", id: "logo-with-text", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 2062.63 468.67", height: "35px", width: "140px", style: { fill }, children: [jsxRuntime.jsx("title", { children: "Prosopo Logo With Text" }), jsxRuntime.jsx("path", { 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)" }), jsxRuntime.jsx("path", { 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)" }), jsxRuntime.jsx("path", { 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)" }), jsxRuntime.jsx("path", { 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)" }), jsxRuntime.jsx("path", { 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)" }), jsxRuntime.jsx("path", { 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)" }), jsxRuntime.jsx("path", { 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)" }), jsxRuntime.jsx("path", { 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)" }), jsxRuntime.jsx("path", { 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)" }), jsxRuntime.jsx("path", { 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)" }), jsxRuntime.jsx("path", { 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)" })] });
8
+ };
9
+ exports.LogoWithText = LogoWithText;
10
+ exports.default = LogoWithText;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
4
+ const React = require("react");
5
+ const LogoWithoutText = ({ themeColor }) => {
6
+ const fill = React.useMemo(() => themeColor === "light" ? "#1d1d1b" : "#fff", [themeColor]);
7
+ return jsxRuntime.jsxs("svg", { className: "logo", id: "logo-without-text", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 260 348", height: "35px", style: { fill }, children: [jsxRuntime.jsx("title", { children: "Prosopo Logo Without Text" }), jsxRuntime.jsx("path", { 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" }), jsxRuntime.jsx("path", { 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" }), jsxRuntime.jsx("path", { 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" }), jsxRuntime.jsx("path", { 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" })] });
8
+ };
9
+ exports.LogoWithoutText = LogoWithoutText;
10
+ exports.default = LogoWithoutText;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const WIDGET_URL = "https://prosopo.io/?ref=accounts.prosopo.io&amp;utm_campaign=widget&amp;utm_medium=checkbox#features";
4
+ const WIDGET_URL_TEXT = "Visit prosopo.io to learn more about the service and its accessibility options.";
5
+ const WIDGET_INNER_HEIGHT = 74;
6
+ const WIDGET_OUTER_HEIGHT = 80;
7
+ const WIDGET_DIMENSIONS = { maxWidth: "400px", minWidth: "200px", minHeight: `${WIDGET_OUTER_HEIGHT}px` };
8
+ exports.WIDGET_DIMENSIONS = WIDGET_DIMENSIONS;
9
+ exports.WIDGET_INNER_HEIGHT = WIDGET_INNER_HEIGHT;
10
+ exports.WIDGET_OUTER_HEIGHT = WIDGET_OUTER_HEIGHT;
11
+ exports.WIDGET_URL = WIDGET_URL;
12
+ exports.WIDGET_URL_TEXT = WIDGET_URL_TEXT;
@@ -4,8 +4,19 @@ const CaptchaPlaceholder = require("./CaptchaPlaceholder.cjs");
4
4
  const LoadingSpinner = require("./LoadingSpinner.cjs");
5
5
  const theme = require("./theme.cjs");
6
6
  const Checkbox = require("./Checkbox.cjs");
7
+ const Logo = require("./Logo.cjs");
8
+ const Containers = require("./Containers.cjs");
9
+ const WidgetConstants = require("./WidgetConstants.cjs");
7
10
  exports.ProcaptchaPlaceholder = CaptchaPlaceholder.ProcaptchaPlaceholder;
8
11
  exports.LoadingSpinner = LoadingSpinner.LoadingSpinner;
9
12
  exports.darkTheme = theme.darkTheme;
10
13
  exports.lightTheme = theme.lightTheme;
11
14
  exports.Checkbox = Checkbox.Checkbox;
15
+ exports.Logo = Logo;
16
+ exports.ContainerDiv = Containers.ContainerDiv;
17
+ exports.WidthBasedStylesDiv = Containers.WidthBasedStylesDiv;
18
+ exports.WIDGET_DIMENSIONS = WidgetConstants.WIDGET_DIMENSIONS;
19
+ exports.WIDGET_INNER_HEIGHT = WidgetConstants.WIDGET_INNER_HEIGHT;
20
+ exports.WIDGET_OUTER_HEIGHT = WidgetConstants.WIDGET_OUTER_HEIGHT;
21
+ exports.WIDGET_URL = WidgetConstants.WIDGET_URL;
22
+ exports.WIDGET_URL_TEXT = WidgetConstants.WIDGET_URL_TEXT;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,oBAAoB,EAAoC,MAAM,OAAO,CAAA;AAGrF,UAAU,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACjE,UAAU,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B,UAAU,EAAE,QAAQ,GAAG,MAAM,CAAA;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACf;AAgCD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAmCjC,CAAA;AACD,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,EAAE,oBAAoB,EAAoC,MAAM,OAAO,CAAA;AAGrF,UAAU,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACjE,UAAU,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B,UAAU,EAAE,QAAQ,GAAG,MAAM,CAAA;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACf;AAgCD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAmCjC,CAAA;AACD,eAAe,MAAM,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAc,EAAuC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACrF,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAS1C,MAAM,eAAe,GAAkB;IACnC,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;IACxB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,SAAS;IACjB,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,QAAQ;IACvB,UAAU,EAAE,SAAS;IACrB,cAAc,EAAE,MAAM;IACtB,UAAU,EAAE,KAAK;IAC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E,KAAK,EAAE,KAAK,CAAC,CAAC,CAAA;IAE9B,OAAO,CACH,oBACQ,WAAW,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,UAAU,UAAU,EAAE,EAAE,EAAE,CAAC,EACxD,YAAY,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAClC,YAAY,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EACnC,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACX,CAAC,CAAC,cAAc,EAAE,CAAA;YAClB,OAAO,EAAE,CAAA;QACb,CAAC,YAEA,IAAI,GACA,CACZ,CAAA;AACL,CAAC,CAAA;AACD,eAAe,MAAM,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAC5C,KAAK,UAAU,GAAG;IACd,IAAI,EAAE,OAAO,CAAA;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC5B,CAAA;AAED,QAAA,MAAM,cAAc,oCAAsB,UAAU,aAAa,UAAU,sDA2CzE,CAAA;AAEF,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAC5C,KAAK,UAAU,GAAG;IACd,IAAI,EAAE,OAAO,CAAA;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC5B,CAAA;AAED,QAAA,MAAM,cAAc,oCAAsB,UAAU,aAAa,UAAU,sDA0CzE,CAAA;AAEF,eAAe,cAAc,CAAA"}
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
2
  import React from 'react';
3
3
  const ModalComponent = React.memo((props, nextProps) => {
4
4
  const { show, children } = props;
5
- console.log('rendering modal with show: ', show);
6
5
  const display = show ? 'block' : 'none';
7
6
  const ModalOuterDivCss = {
8
7
  position: 'fixed',
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAM5C,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,KAAiB,EAAE,SAAqB,EAAE,EAAE;IAC3E,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAA;IAChC,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,IAAI,CAAC,CAAA;IAChD,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAA;IACvC,MAAM,gBAAgB,GAAkB;QACpC,QAAQ,EAAE,OAAO;QACjB,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,CAAC;QACR,OAAO;KACV,CAAA;IAED,MAAM,kBAAkB,GAAkB;QACtC,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,CAAC;QACP,eAAe,EAAE,oBAAoB;QACrC,MAAM,EAAE,CAAC,CAAC;KACb,CAAA;IACD,MAAM,gBAAgB,GAAkB;QACpC,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,uBAAuB;QAClC,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,oBAAoB;QACrC,MAAM,EAAE,MAAM;QACd,SAAS,EACL,qHAAqH;KAC5H,CAAA;IAED,OAAO,CACH,eAAK,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,gBAAg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AY,EAAC,KAAK,EAAE,gBAAgB,aAC/C,cAAK,SAAS,EAAC,iBAAiB,EAAC,KAAK,EAAE,kBAAkB,GAAQ,EAClE,cAAK,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,gBAAgB,YAC9C,QAAQ,GACP,IACJ,CACT,CAAA;AACL,CAAC,CAAC,CAAA;AAEF,eAAe,cAAc,CAAA"}
@@ -1 +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
+ {"version":3,"file":"Procaptcha.d.ts","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":";AAgBA,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 +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"}
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"}
@@ -1,6 +1,6 @@
1
- import { ProcaptchaCallbacks, ProcaptchaConfigOptional } from '@prosopo/procaptcha';
1
+ import { ProcaptchaCallbacks, ProcaptchaClientConfigInput } from '@prosopo/types';
2
2
  export interface ProcaptchaProps {
3
- config: ProcaptchaConfigOptional;
3
+ config: ProcaptchaClientConfigInput;
4
4
  callbacks?: Partial<ProcaptchaCallbacks>;
5
5
  }
6
6
  declare const ProcaptchaWidget: (props: ProcaptchaProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1 +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
+ {"version":3,"file":"ProcaptchaWidget.d.ts","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":"AAcA,OAAO,EAA+B,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA;AA6B9G,MAAM,WAAW,eAAe;IAE5B,MAAM,EAAE,2BAA2B,CAAA;IAEnC,SAAS,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAC3C;AA0ED,QAAA,MAAM,gBAAgB,UAAW,eAAe,qDA2G/C,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -1,42 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
- import { Checkbox, LoadingSpinner, darkTheme, lightTheme } from '@prosopo/web-components';
2
+ import { Checkbox, ContainerDiv, LoadingSpinner, WIDGET_DIMENSIONS, WIDGET_INNER_HEIGHT, WIDGET_URL, WIDGET_URL_TEXT, WidthBasedStylesDiv, darkTheme, lightTheme, } from '@prosopo/web-components';
3
+ import { Logo } from '@prosopo/web-components';
3
4
  import { Manager, } from '@prosopo/procaptcha';
4
- import { css } from '@emotion/react';
5
5
  import { useMemo, useRef, useState } from 'react';
6
6
  import CaptchaComponent from './CaptchaComponent.js';
7
7
  import Collector from './collector.js';
8
8
  import Modal from './Modal.js';
9
- const logoStyle = css `
10
- align-items: center;
11
- justify-content: flex-end;
12
- display: flex;
13
- padding: 8px;
14
-
15
- @media (max-width: 245px) {
16
- &:nth-of-type(1),
17
- &:nth-of-type(2) {
18
- display: none;
19
- } /* Both logos hidden */
20
- }
21
-
22
- @media (min-width: 245px) and (max-width: 400px) {
23
- &:nth-of-type(1) {
24
- display: flex;
25
- } /* logoWithText */
26
- &:nth-of-type(2) {
27
- display: none;
28
- } /* logoWithoutText */
29
- }
30
-
31
- @media (min-width: 401px) {
32
- &:nth-of-type(1) {
33
- display: none;
34
- } /* logoWithText */
35
- &:nth-of-type(2) {
36
- display: flex;
37
- } /* logoWithoutText */
38
- }
39
- `;
40
9
  const useRefAsState = (defaultValue) => {
41
10
  const ref = useRef(defaultValue);
42
11
  const setter = (value) => {
@@ -112,57 +81,38 @@ const useProcaptcha = () => {
112
81
  ];
113
82
  };
114
83
  const ProcaptchaWidget = (props) => {
115
- console.log('config', props.config);
116
84
  const config = props.config;
117
85
  const callbacks = props.callbacks || {};
118
86
  const [state, updateState] = useProcaptcha();
119
- console.log('state', state);
120
87
  const manager = Manager(config, state, updateState, callbacks);
121
- const styleWidth = { maxWidth: '400px', minWidth: '200px', margin: '8px' };
122
88
  const themeColor = props.config.theme === 'light' ? 'light' : 'dark';
123
89
  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',
90
+ return (_jsx("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(ContainerDiv, { children: [_jsx(WidthBasedStylesDiv, { children: _jsxs("div", { style: WIDGET_DIMENSIONS, "data-cy": 'button-human', children: [' ', _jsxs("div", { style: {
91
+ padding: '2px',
92
+ border: '1px solid',
93
+ backgroundColor: theme.palette.background.default,
94
+ borderColor: theme.palette.grey[300],
95
+ borderRadius: '8px',
96
+ display: 'flex',
97
+ alignItems: 'center',
98
+ flexWrap: 'wrap',
99
+ justifyContent: 'space-between',
100
+ minHeight: `${WIDGET_INNER_HEIGHT}px`,
101
+ overflow: 'hidden',
102
+ }, children: [_jsx("div", { style: { display: 'inline-flex', flexDirection: 'column' }, children: _jsx("div", { style: {
145
103
  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 }))] }));
104
+ flex: 1,
105
+ }, children: _jsxs("div", { style: {
106
+ display: 'flex',
107
+ alignItems: 'center',
108
+ justifyContent: 'center',
109
+ flexDirection: 'column',
110
+ verticalAlign: 'middle',
111
+ }, children: [_jsx("div", { style: {
112
+ display: !state.loading ? 'flex' : 'none',
113
+ }, children: _jsx(Checkbox, { themeColor: themeColor, onChange: manager.start, checked: state.isHuman, labelText: "I am human" }) }), _jsx("div", { style: {
114
+ display: state.loading ? 'flex' : 'none',
115
+ }, children: _jsx("div", { style: { display: 'inline-flex' }, children: _jsx(LoadingSpinner, { themeColor: themeColor }) }) })] }) }) }), _jsx("div", { style: { display: 'inline-flex', flexDirection: 'column' }, children: _jsx("a", { href: WIDGET_URL, target: "_blank", "aria-label": WIDGET_URL_TEXT, children: _jsx("div", { style: { flex: 1 }, children: _jsx(Logo, { themeColor: themeColor }) }) }) })] })] }) }), config.devOnlyWatchEvents && (_jsx(Collector, { onProcessData: manager.exportData, sendData: state.sendData, account: state.account }))] })] }) }));
162
116
  };
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>';
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>';
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>';
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>';
167
117
  export default ProcaptchaWidget;
168
118
  //# sourceMappingURL=ProcaptchaWidget.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProcaptchaWidget.js","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.t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,KAAK,EACvB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAC,YAAY,GACxB,GACA,EACN,cACI,KAAK,EAAE;oEACH,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;iEAC3C,YAED,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,YAClC,KAAC,cAAc,IAAC,UAAU,EAAE,UAAU,GAAI,GACxC,GACJ,IACJ,GACJ,GACJ,EACN,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,YAC3D,YAAG,IAAI,EAAE,UAAU,EAAE,MAAM,EAAC,QAAQ,gBAAa,eAAe,YAC5D,cAAK,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,YACnB,KAAC,IAAI,IAAC,UAAU,EAAE,UAAU,GAAS,GACnC,GACN,GACF,IACJ,IACJ,GACY,EACrB,MAAM,CAAC,kBAAkB,IAAI,CAC1B,KAAC,SAAS,IACN,aAAa,EAAE,OAAO,CAAC,UAAU,EACjC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,OAAO,EAAE,KAAK,CAAC,OAAO,GACb,CAChB,IACU,IACb,GACJ,CACT,CAAA;AACL,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -1,8 +1,9 @@
1
- import { StoredEvents } from '@prosopo/types';
1
+ import { Account, StoredEvents } from '@prosopo/types';
2
2
  type CollectorProps = {
3
3
  onProcessData: (data: StoredEvents) => void;
4
4
  sendData: boolean;
5
+ account: Account | undefined;
5
6
  };
6
- declare const Collector: ({ onProcessData, sendData }: CollectorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
+ declare const Collector: ({ onProcessData, sendData, account }: CollectorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
8
  export default Collector;
8
9
  //# sourceMappingURL=collector.d.ts.map
@@ -1 +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
+ {"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../src/components/collector.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAA8D,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAIlH,KAAK,cAAc,GAAG;IAClB,aAAa,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAA;IAC3C,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;CAC/B,CAAA;AAED,QAAA,MAAM,SAAS,yCAA0C,cAAc,qDAuBtE,CAAA;AAED,eAAe,SAAS,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from 'react';
3
3
  import { startCollector } from '@prosopo/procaptcha';
4
- const Collector = ({ onProcessData, sendData }) => {
4
+ const Collector = ({ onProcessData, sendData, account }) => {
5
5
  const [mouseEvents, setStoredMouseEvents] = useState([]);
6
6
  const [touchEvents, setStoredTouchEvents] = useState([]);
7
7
  const [keyboardEvents, setStoredKeyboardEvents] = useState([]);
@@ -17,8 +17,9 @@ const Collector = ({ onProcessData, sendData }) => {
17
17
  touchEvents,
18
18
  keyboardEvents,
19
19
  };
20
- onProcessData(userEvents);
21
- }, [sendData]);
20
+ if (account)
21
+ onProcessData(userEvents);
22
+ }, [sendData, account]);
22
23
  return _jsx("div", { ref: ref });
23
24
  };
24
25
  export default Collector;
@@ -1 +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"}
1
+ {"version":3,"file":"collector.js","sourceRoot":"","sources":["../../src/components/collector.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAoB,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAQpD,MAAM,SAAS,GAAG,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAkB,EAAE,EAAE;IACvE,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;QACD,IAAI,OAAO;YAAE,aAAa,CAAC,UAAU,CAAC,CAAA;IAC1C,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAA;IAEvB,OAAO,cAAK,GAAG,EAAE,GAAG,GAAQ,CAAA;AAChC,CAAC,CAAA;AAED,eAAe,SAAS,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/procaptcha-react",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "author": "PROSOPO LIMITED <info@prosopo.io>",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",
@@ -33,16 +33,16 @@
33
33
  "> 0.5%, last 2 versions, not dead"
34
34
  ],
35
35
  "dependencies": {
36
- "@emotion/react": "^11.11.1",
36
+ "@emotion/react": "^11.11.4",
37
37
  "@emotion/styled": "^11.11.0",
38
38
  "@polkadot/extension-dapp": "0.46.6",
39
39
  "@polkadot/extension-inject": "0.46.6",
40
- "@prosopo/api": "0.3.1",
41
- "@prosopo/common": "0.3.1",
42
- "@prosopo/procaptcha": "0.3.1",
43
- "@prosopo/types": "0.3.1",
44
- "@prosopo/util": "0.3.1",
45
- "@prosopo/web-components": "0.3.1",
40
+ "@prosopo/api": "0.3.2",
41
+ "@prosopo/common": "0.3.2",
42
+ "@prosopo/procaptcha": "0.3.2",
43
+ "@prosopo/types": "0.3.2",
44
+ "@prosopo/util": "0.3.2",
45
+ "@prosopo/web-components": "0.3.2",
46
46
  "react": "^18.2.0",
47
47
  "react-dom": "^18.2.0"
48
48
  },
package/typedoc.config.js CHANGED
@@ -1,3 +1,16 @@
1
+ // Copyright 2021-2024 Prosopo (UK) Ltd.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
1
14
  export default {
2
15
  entryPoints: ['src/**/*.ts', 'src/**/*.tsx', 'src/**/*.js', 'src/**/*.jsx', 'src/**/*.json'],
3
16
  includes: 'src',
@@ -1,3 +1,16 @@
1
+ // Copyright 2021-2024 Prosopo (UK) Ltd.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
1
14
  import { ViteCommonJSConfig } from '@prosopo/config'
2
15
  import path from 'path'
3
16