@prosopo/procaptcha-react 1.0.2 → 2.0.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.
- package/dist/cjs/components/Button.cjs +14 -7
- package/dist/cjs/components/CaptchaComponent.cjs +69 -42
- package/dist/cjs/components/CaptchaWidget.cjs +137 -99
- package/dist/cjs/components/Modal.cjs +38 -36
- package/dist/cjs/components/Procaptcha.cjs +2 -4
- package/dist/cjs/components/ProcaptchaWidget.cjs +121 -101
- package/dist/cjs/util/index.cjs +6 -2
- package/dist/components/Button.d.ts +4 -3
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +40 -38
- package/dist/components/Button.js.map +1 -1
- package/dist/components/CaptchaComponent.d.ts +2 -2
- package/dist/components/CaptchaComponent.d.ts.map +1 -1
- package/dist/components/CaptchaComponent.js +61 -48
- package/dist/components/CaptchaComponent.js.map +1 -1
- package/dist/components/CaptchaWidget.d.ts +4 -4
- package/dist/components/CaptchaWidget.d.ts.map +1 -1
- package/dist/components/CaptchaWidget.js +84 -47
- package/dist/components/CaptchaWidget.js.map +1 -1
- package/dist/components/Modal.d.ts +1 -1
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Modal.js +16 -16
- package/dist/components/Modal.js.map +1 -1
- package/dist/components/Procaptcha.d.ts +3 -3
- package/dist/components/Procaptcha.d.ts.map +1 -1
- package/dist/components/Procaptcha.js +3 -3
- package/dist/components/Procaptcha.js.map +1 -1
- package/dist/components/ProcaptchaWidget.d.ts +1 -1
- package/dist/components/ProcaptchaWidget.d.ts.map +1 -1
- package/dist/components/ProcaptchaWidget.js +40 -37
- package/dist/components/ProcaptchaWidget.js.map +1 -1
- package/dist/components/collector.d.ts +1 -1
- package/dist/components/collector.d.ts.map +1 -1
- package/dist/components/collector.js +4 -4
- package/dist/components/collector.js.map +1 -1
- package/dist/components/index.d.ts +5 -5
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -5
- package/dist/components/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +3 -1
- package/dist/util/index.js.map +1 -1
- package/package.json +68 -72
- package/vite.cjs.config.ts +6 -3
- package/dist/cjs/components/collector.cjs +0 -26
|
@@ -1,70 +1,107 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { ProsopoDatasetError } from
|
|
3
|
-
import { darkTheme, lightTheme } from
|
|
4
|
-
import { useMemo } from
|
|
2
|
+
import { ProsopoDatasetError } from "@prosopo/common";
|
|
3
|
+
import { darkTheme, lightTheme } from "@prosopo/web-components";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
5
|
const getHash = (item) => {
|
|
6
6
|
if (!item.hash) {
|
|
7
|
-
throw new ProsopoDatasetError(
|
|
7
|
+
throw new ProsopoDatasetError("CAPTCHA.MISSING_ITEM_HASH", {
|
|
8
|
+
context: { item },
|
|
9
|
+
});
|
|
8
10
|
}
|
|
9
11
|
return item.hash;
|
|
10
12
|
};
|
|
11
|
-
export const CaptchaWidget = ({ challenge, solution, onClick, themeColor }) => {
|
|
12
|
-
const items = challenge.
|
|
13
|
-
const theme = useMemo(() => (themeColor ===
|
|
14
|
-
const isTouchDevice =
|
|
13
|
+
export const CaptchaWidget = ({ challenge, solution, onClick, themeColor, }) => {
|
|
14
|
+
const items = challenge.items;
|
|
15
|
+
const theme = useMemo(() => (themeColor === "light" ? lightTheme : darkTheme), [themeColor]);
|
|
16
|
+
const isTouchDevice = "ontouchstart" in window;
|
|
17
|
+
const fullSpacing = `${theme.spacing.unit}px`;
|
|
18
|
+
const halfSpacing = `${theme.spacing.half}px`;
|
|
19
|
+
const paddingForImageColumns = {
|
|
20
|
+
0: {
|
|
21
|
+
paddingLeft: 0,
|
|
22
|
+
paddingRight: halfSpacing,
|
|
23
|
+
paddingTop: halfSpacing,
|
|
24
|
+
paddingBottom: halfSpacing,
|
|
25
|
+
},
|
|
26
|
+
1: {
|
|
27
|
+
paddingLeft: halfSpacing,
|
|
28
|
+
paddingRight: halfSpacing,
|
|
29
|
+
paddingTop: halfSpacing,
|
|
30
|
+
paddingBottom: halfSpacing,
|
|
31
|
+
},
|
|
32
|
+
2: {
|
|
33
|
+
paddingLeft: halfSpacing,
|
|
34
|
+
paddingRight: 0,
|
|
35
|
+
paddingTop: halfSpacing,
|
|
36
|
+
paddingBottom: halfSpacing,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const paddingForImageRows = {
|
|
40
|
+
0: { paddingTop: fullSpacing },
|
|
41
|
+
2: { paddingBottom: fullSpacing },
|
|
42
|
+
};
|
|
15
43
|
return (_jsx("div", { style: {
|
|
16
44
|
paddingRight: 0.5,
|
|
17
45
|
paddingBottom: 0.5,
|
|
18
|
-
width:
|
|
19
|
-
height:
|
|
20
|
-
display:
|
|
21
|
-
flexDirection:
|
|
22
|
-
flexWrap:
|
|
46
|
+
width: "100%",
|
|
47
|
+
height: "100%",
|
|
48
|
+
display: "flex",
|
|
49
|
+
flexDirection: "row",
|
|
50
|
+
flexWrap: "wrap",
|
|
23
51
|
}, children: items.map((item, index) => {
|
|
24
52
|
const hash = getHash(item);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
53
|
+
const imageStyle = {
|
|
54
|
+
...paddingForImageColumns[index % 3],
|
|
55
|
+
...paddingForImageRows[Math.floor(index / 3)],
|
|
56
|
+
flexGrow: 1,
|
|
57
|
+
flexBasis: "33.3333%",
|
|
58
|
+
boxSizing: "border-box",
|
|
59
|
+
};
|
|
60
|
+
console.log("imageStyle index ", index, imageStyle);
|
|
61
|
+
return (_jsx("div", { style: imageStyle, children: _jsxs("div", { style: {
|
|
62
|
+
cursor: "pointer",
|
|
63
|
+
height: "100%",
|
|
64
|
+
width: "100%",
|
|
65
|
+
border: 1,
|
|
66
|
+
borderStyle: "solid",
|
|
67
|
+
borderColor: theme.palette.grey[300],
|
|
68
|
+
}, onClick: isTouchDevice ? undefined : () => onClick(hash), onTouchStart: isTouchDevice ? () => onClick(hash) : undefined, children: [_jsx("div", { children: _jsx("img", { style: {
|
|
69
|
+
width: "100%",
|
|
33
70
|
backgroundColor: theme.palette.grey[300],
|
|
34
|
-
opacity: solution.includes(hash) && isTouchDevice ?
|
|
35
|
-
display:
|
|
36
|
-
objectFit:
|
|
37
|
-
aspectRatio:
|
|
38
|
-
height:
|
|
71
|
+
opacity: solution.includes(hash) && isTouchDevice ? "50%" : "100%",
|
|
72
|
+
display: "block",
|
|
73
|
+
objectFit: "contain",
|
|
74
|
+
aspectRatio: "1/1",
|
|
75
|
+
height: "auto",
|
|
39
76
|
}, src: item.data, alt: `Captcha image ${index + 1}` }) }), _jsx("div", { style: {
|
|
40
|
-
position:
|
|
41
|
-
width:
|
|
42
|
-
height:
|
|
43
|
-
top:
|
|
44
|
-
visibility: solution.includes(hash) ?
|
|
45
|
-
transition:
|
|
77
|
+
position: "relative",
|
|
78
|
+
width: "100%",
|
|
79
|
+
height: "100%",
|
|
80
|
+
top: "-100%",
|
|
81
|
+
visibility: solution.includes(hash) ? "visible" : "hidden",
|
|
82
|
+
transition: "opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
46
83
|
opacity: 1,
|
|
47
84
|
}, children: _jsx("div", { style: {
|
|
48
|
-
position:
|
|
85
|
+
position: "absolute",
|
|
49
86
|
top: 0,
|
|
50
87
|
left: 0,
|
|
51
88
|
bottom: 0,
|
|
52
89
|
right: 0,
|
|
53
|
-
height:
|
|
54
|
-
width:
|
|
55
|
-
display:
|
|
56
|
-
alignItems:
|
|
57
|
-
justifyContent:
|
|
58
|
-
backgroundColor:
|
|
90
|
+
height: "100%",
|
|
91
|
+
width: "100%",
|
|
92
|
+
display: "flex",
|
|
93
|
+
alignItems: "center",
|
|
94
|
+
justifyContent: "center",
|
|
95
|
+
backgroundColor: "rgba(0,0,0,0.5)",
|
|
59
96
|
}, children: _jsx("svg", { style: {
|
|
60
|
-
backgroundColor:
|
|
61
|
-
display:
|
|
62
|
-
width:
|
|
63
|
-
height:
|
|
64
|
-
transition:
|
|
65
|
-
userSelect:
|
|
66
|
-
fill:
|
|
67
|
-
}, focusable: "false", color: "#fff", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "CheckIcon", "aria-label": "Check icon", children: _jsx("path", { d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }) }) }) })] }) },
|
|
97
|
+
backgroundColor: "transparent",
|
|
98
|
+
display: "block",
|
|
99
|
+
width: "35%",
|
|
100
|
+
height: "35%",
|
|
101
|
+
transition: "fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
102
|
+
userSelect: "none",
|
|
103
|
+
fill: "currentcolor",
|
|
104
|
+
}, focusable: "false", color: "#fff", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "CheckIcon", "aria-label": "Check icon", children: _jsx("path", { d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }) }) }) })] }) }, item.hash));
|
|
68
105
|
}) }));
|
|
69
106
|
};
|
|
70
107
|
//# sourceMappingURL=CaptchaWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaptchaWidget.js","sourceRoot":"","sources":["../../src/components/CaptchaWidget.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CaptchaWidget.js","sourceRoot":"","sources":["../../src/components/CaptchaWidget.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AA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,EACjB,KAAK,EAAC,MAAM,iBACA,MAAM,EAClB,OAAO,EAAC,WAAW,iBACP,WAAW,gBACZ,YAAY,YAEvB,eAAM,CAAC,EAAC,mDAAmD,GAAG,GAC1D,GACF,GACF,IACF,IAxFqB,IAAI,CAAC,IAAI,CAyFhC,CACP,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,KAAK,UAAU,GAAG;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;AAEF,QAAA,MAAM,cAAc,oCACX,UAAU,aAAa,UAAU,sDA2CzC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/components/Modal.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import React from
|
|
2
|
+
import React from "react";
|
|
3
3
|
const ModalComponent = React.memo((props, nextProps) => {
|
|
4
4
|
const { show, children } = props;
|
|
5
|
-
const display = show ?
|
|
5
|
+
const display = show ? "block" : "none";
|
|
6
6
|
const ModalOuterDivCss = {
|
|
7
|
-
position:
|
|
7
|
+
position: "fixed",
|
|
8
8
|
zIndex: 2147483646,
|
|
9
9
|
inset: 0,
|
|
10
10
|
display,
|
|
11
11
|
};
|
|
12
12
|
const ModalBackgroundCSS = {
|
|
13
|
-
position:
|
|
14
|
-
display:
|
|
15
|
-
alignItems:
|
|
16
|
-
justifyContent:
|
|
13
|
+
position: "fixed",
|
|
14
|
+
display: "flex",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
justifyContent: "center",
|
|
17
17
|
right: 0,
|
|
18
18
|
bottom: 0,
|
|
19
19
|
top: 0,
|
|
20
20
|
left: 0,
|
|
21
|
-
backgroundColor:
|
|
21
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
22
22
|
zIndex: -1,
|
|
23
23
|
};
|
|
24
24
|
const ModalInnerDivCSS = {
|
|
25
|
-
position:
|
|
26
|
-
top:
|
|
27
|
-
left:
|
|
28
|
-
transform:
|
|
29
|
-
width:
|
|
30
|
-
backgroundColor:
|
|
31
|
-
border:
|
|
32
|
-
boxShadow:
|
|
25
|
+
position: "absolute",
|
|
26
|
+
top: "50%",
|
|
27
|
+
left: "50%",
|
|
28
|
+
transform: "translate(-50%, -50%)",
|
|
29
|
+
width: "400px",
|
|
30
|
+
backgroundColor: "transparent",
|
|
31
|
+
border: "none",
|
|
32
|
+
boxShadow: "rgba(0, 0, 0, 0.2) 0px 11px 15px -7px, rgba(0, 0, 0, 0.14) 0px 24px 38px 3px, rgba(0, 0, 0, 0.12) 0px 9px 46px 8px,",
|
|
33
33
|
};
|
|
34
34
|
return (_jsxs("div", { className: "modalOuter", style: ModalOuterDivCss, children: [_jsx("div", { className: "modalBackground", style: ModalBackgroundCSS }), _jsx("div", { className: "modalInner", style: ModalInnerDivCSS, children: children })] }));
|
|
35
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":";AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":";AAaA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAMlD,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAChC,CAAC,KAAiB,EAAE,SAAqB,EAAE,EAAE;IAC5C,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;IACxC,MAAM,gBAAgB,GAAkB;QACvC,QAAQ,EAAE,OAAO;QACjB,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,CAAC;QACR,OAAO;KACP,CAAC;IAEF,MAAM,kBAAkB,GAAkB;QACzC,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;KACV,CAAC;IACF,MAAM,gBAAgB,GAAkB;QACvC,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,uBAAuB;QAClC,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,aAAa;QAC9B,MAAM,EAAE,MAAM;QACd,SAAS,EACR,qHAAqH;KACtH,CAAC;IAEF,OAAO,CACN,eAAK,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,gBAAgB,aAClD,cAAK,SAAS,EAAC,iBAAiB,EAAC,KAAK,EAAE,kBAAkB,GAAI,EAC9D,cAAK,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,gBAAgB,YACjD,QAAQ,GACJ,IACD,CACN,CAAC;AACH,CAAC,CACD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ReactElement } from
|
|
1
|
+
import type { ProcaptchaEvents } from "@prosopo/types";
|
|
2
|
+
import { type LazyExoticComponent } from "react";
|
|
3
|
+
import type { ReactElement } from "react";
|
|
4
4
|
declare const ProcaptchaWidget: LazyExoticComponent<(props: any, callbacks: Partial<ProcaptchaEvents>) => ReactElement>;
|
|
5
5
|
type ProcaptchaProps = React.ComponentProps<typeof ProcaptchaWidget>;
|
|
6
6
|
declare const Procaptcha: (props: ProcaptchaProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Procaptcha.d.ts","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Procaptcha.d.ts","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EAAE,KAAK,mBAAmB,EAAkB,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,QAAA,MAAM,gBAAgB,EAAE,mBAAmB,CAEzC,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,YAAY,CACf,CAAC;AACtD,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAErE,QAAA,MAAM,UAAU,UAAW,eAAe,qDAIzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const ProcaptchaWidget = lazy(async () => import(
|
|
2
|
+
import { ProcaptchaPlaceholder } from "@prosopo/web-components";
|
|
3
|
+
import { Suspense, lazy } from "react";
|
|
4
|
+
const ProcaptchaWidget = lazy(async () => import("./ProcaptchaWidget.js"));
|
|
5
5
|
const Procaptcha = (props) => (_jsx(Suspense, { fallback: _jsx(ProcaptchaPlaceholder, { darkMode: props.config.theme }), children: _jsx(ProcaptchaWidget, { config: props.config, callbacks: props.callbacks }) }));
|
|
6
6
|
export default Procaptcha;
|
|
7
7
|
//# sourceMappingURL=Procaptcha.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Procaptcha.js","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Procaptcha.js","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAA4B,QAAQ,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAIjE,MAAM,gBAAgB,GAGlB,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC;AAGtD,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE,CAAC,CAC7C,KAAC,QAAQ,IAAC,QAAQ,EAAE,KAAC,qBAAqB,IAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,GAAI,YACzE,KAAC,gBAAgB,IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,GAC7D,CACZ,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProcaptchaProps } from
|
|
1
|
+
import { type ProcaptchaProps } from "@prosopo/types";
|
|
2
2
|
declare const ProcaptchaWidget: (props: ProcaptchaProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ProcaptchaWidget;
|
|
4
4
|
//# sourceMappingURL=ProcaptchaWidget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcaptchaWidget.d.ts","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProcaptchaWidget.d.ts","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAuB9E,QAAA,MAAM,gBAAgB,UAAW,eAAe,qDAuH/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,46 +1,49 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useRef, useState } from
|
|
8
|
-
import CaptchaComponent from
|
|
9
|
-
import
|
|
10
|
-
import Modal from './Modal.js';
|
|
2
|
+
import { Manager } from "@prosopo/procaptcha";
|
|
3
|
+
import { useProcaptcha } from "@prosopo/procaptcha-common";
|
|
4
|
+
import { ProcaptchaConfigSchema } from "@prosopo/types";
|
|
5
|
+
import { Checkbox, ContainerDiv, LoadingSpinner, WIDGET_BORDER, WIDGET_BORDER_RADIUS, WIDGET_DIMENSIONS, WIDGET_INNER_HEIGHT, WIDGET_MAX_WIDTH, WIDGET_PADDING, WIDGET_URL, WIDGET_URL_TEXT, WidthBasedStylesDiv, darkTheme, lightTheme, } from "@prosopo/web-components";
|
|
6
|
+
import { Logo } from "@prosopo/web-components";
|
|
7
|
+
import { useRef, useState } from "react";
|
|
8
|
+
import CaptchaComponent from "./CaptchaComponent.js";
|
|
9
|
+
import Modal from "./Modal.js";
|
|
11
10
|
const ProcaptchaWidget = (props) => {
|
|
12
11
|
const config = ProcaptchaConfigSchema.parse(props.config);
|
|
13
12
|
const callbacks = props.callbacks || {};
|
|
14
13
|
const [state, updateState] = useProcaptcha(useState, useRef);
|
|
15
14
|
const manager = Manager(config, state, updateState, callbacks);
|
|
16
|
-
const themeColor = props.config.theme ===
|
|
17
|
-
const theme = props.config.theme ===
|
|
18
|
-
return (_jsx("div", { children: _jsxs("div", { style: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
15
|
+
const themeColor = props.config.theme === "light" ? "light" : "dark";
|
|
16
|
+
const theme = props.config.theme === "light" ? lightTheme : darkTheme;
|
|
17
|
+
return (_jsx("div", { children: _jsxs("div", { style: {
|
|
18
|
+
maxWidth: WIDGET_MAX_WIDTH,
|
|
19
|
+
maxHeight: "100%",
|
|
20
|
+
overflowX: "auto",
|
|
21
|
+
}, 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." })) }), _jsx(ContainerDiv, { children: _jsx(WidthBasedStylesDiv, { children: _jsxs("div", { style: WIDGET_DIMENSIONS, "data-cy": "button-human", children: [" ", _jsxs("div", { style: {
|
|
22
|
+
padding: WIDGET_PADDING,
|
|
23
|
+
border: WIDGET_BORDER,
|
|
24
|
+
backgroundColor: theme.palette.background.default,
|
|
25
|
+
borderColor: theme.palette.grey[300],
|
|
26
|
+
borderRadius: WIDGET_BORDER_RADIUS,
|
|
27
|
+
display: "flex",
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
flexWrap: "wrap",
|
|
30
|
+
justifyContent: "space-between",
|
|
31
|
+
minHeight: `${WIDGET_INNER_HEIGHT}px`,
|
|
32
|
+
overflow: "hidden",
|
|
33
|
+
}, children: [_jsx("div", { style: { display: "inline-flex", flexDirection: "column" }, children: _jsx("div", { style: {
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
flex: 1,
|
|
36
|
+
}, children: _jsxs("div", { style: {
|
|
37
|
+
display: "flex",
|
|
38
|
+
alignItems: "center",
|
|
39
|
+
justifyContent: "center",
|
|
40
|
+
flexDirection: "column",
|
|
41
|
+
verticalAlign: "middle",
|
|
42
|
+
}, children: [_jsx("div", { style: {
|
|
43
|
+
display: !state.loading ? "flex" : "none",
|
|
44
|
+
}, children: _jsx(Checkbox, { themeColor: themeColor, onChange: manager.start, checked: state.isHuman, labelText: "I am human", "aria-label": "human checkbox" }) }), _jsx("div", { style: {
|
|
45
|
+
display: state.loading ? "flex" : "none",
|
|
46
|
+
}, children: _jsx("div", { style: { display: "inline-flex" }, children: _jsx(LoadingSpinner, { themeColor: themeColor, "aria-label": "Loading spinner" }) }) })] }) }) }), _jsx("div", { style: { display: "inline-flex", flexDirection: "column" }, children: _jsx("a", { href: WIDGET_URL, target: "_blank", "aria-label": WIDGET_URL_TEXT, rel: "noreferrer", children: _jsx("div", { style: { flex: 1 }, children: _jsx(Logo, { themeColor: themeColor, "aria-label": "Prosopo logo" }) }) }) })] })] }) }) })] }) }));
|
|
44
47
|
};
|
|
45
48
|
export default ProcaptchaWidget;
|
|
46
49
|
//# sourceMappingURL=ProcaptchaWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcaptchaWidget.js","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":";AAcA,OAAO,
|
|
1
|
+
{"version":3,"file":"ProcaptchaWidget.js","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAwB,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,E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AC,MAAM,CAAC,CAAC,CAAC,MAAM;6DAC1C,YAED,KAAC,QAAQ,IACP,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,OAAO,CAAC,KAAK,EACvB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAC,YAAY,gBACX,gBAAgB,GAC3B,GACE,EACN,cACE,KAAK,EAAE;gEACL,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;6DACzC,YAED,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,YACpC,KAAC,cAAc,IACb,UAAU,EAAE,UAAU,gBACX,iBAAiB,GAC5B,GACE,GACF,IACF,GACF,GACF,EACN,cACE,KAAK,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,YAE1D,YACE,IAAI,EAAE,UAAU,EAChB,MAAM,EAAC,QAAQ,gBACH,eAAe,EAC3B,GAAG,EAAC,YAAY,YAEhB,cAAK,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,YACrB,KAAC,IAAI,IAAC,UAAU,EAAE,UAAU,gBAAa,cAAc,GAAG,GACtD,GACJ,GACA,IACF,IACF,GACc,GACT,IACX,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../src/components/collector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../src/components/collector.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,OAAO,EAIP,YAAY,EACb,MAAM,gBAAgB,CAAC;AAGxB,KAAK,cAAc,GAAG;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,QAAA,MAAM,SAAS,yCAA0C,cAAc,qDAgCtE,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { startCollector } from "@prosopo/procaptcha";
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
const Collector = ({ onProcessData, sendData, account }) => {
|
|
5
5
|
const [mouseEvents, setStoredMouseEvents] = useState([]);
|
|
6
6
|
const [touchEvents, setStoredTouchEvents] = useState([]);
|
|
7
7
|
const [keyboardEvents, setStoredKeyboardEvents] = useState([]);
|
|
8
8
|
const ref = useRef(null);
|
|
9
9
|
useEffect(() => {
|
|
10
|
-
if (ref
|
|
10
|
+
if (ref?.current) {
|
|
11
11
|
startCollector(setStoredMouseEvents, setStoredTouchEvents, setStoredKeyboardEvents, ref.current);
|
|
12
12
|
}
|
|
13
13
|
}, []);
|
|
@@ -19,7 +19,7 @@ const Collector = ({ onProcessData, sendData, account }) => {
|
|
|
19
19
|
};
|
|
20
20
|
if (account)
|
|
21
21
|
onProcessData(userEvents);
|
|
22
|
-
}, [
|
|
22
|
+
}, [onProcessData, account]);
|
|
23
23
|
return _jsx("div", { ref: ref });
|
|
24
24
|
};
|
|
25
25
|
export default Collector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collector.js","sourceRoot":"","sources":["../../src/components/collector.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"collector.js","sourceRoot":"","sources":["../../src/components/collector.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAQrD,OAAO,EAAyB,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQ3E,MAAM,SAAS,GAAG,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAkB,EAAE,EAAE;IACzE,MAAM,CAAC,WAAW,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAsB,EAAE,CAAC,CAAC;IAC9E,MAAM,CAAC,WAAW,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAsB,EAAE,CAAC,CAAC;IAC9E,MAAM,CAAC,cAAc,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAExD,EAAE,CAAC,CAAC;IAEN,MAAM,GAAG,GACP,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE/B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,GAAG,EAAE,OAAO,EAAE;YAChB,cAAc,CACZ,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,GAAG,CAAC,OAAO,CACZ,CAAC;SACH;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAGP,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG;YACjB,WAAW;YACX,WAAW;YACX,cAAc;SACf,CAAC;QACF,IAAI,OAAO;YAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;IAE7B,OAAO,cAAK,GAAG,EAAE,GAAG,GAAI,CAAC;AAC3B,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export { default as ProcaptchaWidget } from
|
|
4
|
-
export { default as Procaptcha } from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./CaptchaWidget.js";
|
|
2
|
+
export * from "./CaptchaComponent.js";
|
|
3
|
+
export { default as ProcaptchaWidget } from "./ProcaptchaWidget.js";
|
|
4
|
+
export { default as Procaptcha } from "./Procaptcha.js";
|
|
5
|
+
export * from "./Procaptcha.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAaA,cAAc,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAaA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,cAAc,iBAAiB,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export { default as ProcaptchaWidget } from
|
|
4
|
-
export { default as Procaptcha } from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./CaptchaWidget.js";
|
|
2
|
+
export * from "./CaptchaComponent.js";
|
|
3
|
+
export { default as ProcaptchaWidget } from "./ProcaptchaWidget.js";
|
|
4
|
+
export { default as Procaptcha } from "./Procaptcha.js";
|
|
5
|
+
export * from "./Procaptcha.js";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAaA,cAAc,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAaA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,cAAc,iBAAiB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./components/index.js";
|
|
2
|
+
export * from "./util/index.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./components/index.js";
|
|
2
|
+
export * from "./util/index.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC"}
|
package/dist/util/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AA0BA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EACnC,OAAO,EACP,GAAG,GACH,EAAE;IACF,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACpC,GAAG,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAChC,MAOA"}
|
package/dist/util/index.js
CHANGED
|
@@ -4,7 +4,9 @@ function renameKeysForDataAttr(data = {}) {
|
|
|
4
4
|
export default function addDataAttr({ general, dev, }) {
|
|
5
5
|
return {
|
|
6
6
|
...renameKeysForDataAttr(general),
|
|
7
|
-
...(process.env.NODE_ENV
|
|
7
|
+
...(process.env.NODE_ENV !== "production"
|
|
8
|
+
? renameKeysForDataAttr(dev)
|
|
9
|
+
: {}),
|
|
8
10
|
};
|
|
9
11
|
}
|
|
10
12
|
//# sourceMappingURL=index.js.map
|
package/dist/util/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAaA,SAAS,qBAAqB,CAAC,OAAkC,EAAE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAaA,SAAS,qBAAqB,CAAC,OAAkC,EAAE;IAClE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAE9B,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAC3D,EAAE,CACF,CAAC;AACH,CAAC;AAOD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EACnC,OAAO,EACP,GAAG,GAIH;IACA,OAAO;QACN,GAAG,qBAAqB,CAAC,OAAO,CAAC;QACjC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;YACxC,CAAC,CAAC,qBAAqB,CAAC,GAAG,CAAC;YAC5B,CAAC,CAAC,EAAE,CAAC;KACN,CAAC;AACH,CAAC"}
|