@prosopo/procaptcha-react 2.5.3 → 2.6.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/CHANGELOG.md +27 -0
- package/dist/cjs/components/Button.cjs +77 -0
- package/dist/cjs/components/CaptchaComponent.cjs +230 -0
- package/dist/cjs/components/CaptchaWidget.cjs +141 -0
- package/dist/cjs/components/Modal.cjs +43 -0
- package/dist/cjs/components/Procaptcha.cjs +7 -0
- package/dist/cjs/components/ProcaptchaWidget.cjs +126 -0
- package/dist/cjs/components/index.cjs +9 -0
- package/dist/cjs/index.cjs +10 -0
- package/dist/cjs/util/index.cjs +18 -0
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +4 -3
- package/dist/components/Button.js.map +1 -1
- package/dist/components/CaptchaComponent.d.ts.map +1 -1
- package/dist/components/CaptchaComponent.js +28 -17
- package/dist/components/CaptchaComponent.js.map +1 -1
- package/dist/components/CaptchaWidget.d.ts.map +1 -1
- package/dist/components/CaptchaWidget.js +9 -10
- 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 +27 -24
- package/dist/components/Modal.js.map +1 -1
- package/dist/components/Procaptcha.d.ts +8 -2
- package/dist/components/Procaptcha.d.ts.map +1 -1
- package/dist/components/Procaptcha.js +1 -1
- package/dist/components/Procaptcha.js.map +1 -1
- package/package.json +17 -14
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# @prosopo/procaptcha-react
|
|
2
|
+
|
|
3
|
+
## 2.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [52feffc]
|
|
8
|
+
- @prosopo/types@2.6.1
|
|
9
|
+
- @prosopo/procaptcha@2.6.1
|
|
10
|
+
- @prosopo/procaptcha-common@2.6.1
|
|
11
|
+
|
|
12
|
+
## 2.6.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- a0bfc8a: bump all pkg versions since independent versioning applied
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [a0bfc8a]
|
|
21
|
+
- @prosopo/common@2.6.0
|
|
22
|
+
- @prosopo/locale@2.6.0
|
|
23
|
+
- @prosopo/procaptcha@2.6.0
|
|
24
|
+
- @prosopo/procaptcha-common@2.6.0
|
|
25
|
+
- @prosopo/types@2.6.0
|
|
26
|
+
- @prosopo/util@2.6.0
|
|
27
|
+
- @prosopo/widget-skeleton@2.6.0
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
3
|
+
const widgetSkeleton = require("@prosopo/widget-skeleton");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const index = require("../util/index.cjs");
|
|
6
|
+
const buttonStyleBase = {
|
|
7
|
+
display: "inline-flex",
|
|
8
|
+
alignItems: "center",
|
|
9
|
+
justifyContent: "center",
|
|
10
|
+
position: "relative",
|
|
11
|
+
boxSizing: "border-box",
|
|
12
|
+
outline: "0px",
|
|
13
|
+
margin: "0px",
|
|
14
|
+
cursor: "pointer",
|
|
15
|
+
userSelect: "none",
|
|
16
|
+
verticalAlign: "middle",
|
|
17
|
+
appearance: void 0,
|
|
18
|
+
textDecoration: "none",
|
|
19
|
+
fontWeight: "500",
|
|
20
|
+
fontSize: "0.875rem",
|
|
21
|
+
lineHeight: "1.75",
|
|
22
|
+
letterSpacing: "0.02857em",
|
|
23
|
+
textTransform: "uppercase",
|
|
24
|
+
minWidth: "64px",
|
|
25
|
+
padding: "6px 16px",
|
|
26
|
+
borderRadius: "4px",
|
|
27
|
+
transition: "background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
28
|
+
backgroundColor: "#ffffff"
|
|
29
|
+
};
|
|
30
|
+
const Button = ({
|
|
31
|
+
themeColor,
|
|
32
|
+
buttonType,
|
|
33
|
+
text,
|
|
34
|
+
onClick
|
|
35
|
+
}) => {
|
|
36
|
+
const theme = React.useMemo(
|
|
37
|
+
() => themeColor === "light" ? widgetSkeleton.lightTheme : widgetSkeleton.darkTheme,
|
|
38
|
+
[themeColor]
|
|
39
|
+
);
|
|
40
|
+
const [hover, setHover] = React.useState(false);
|
|
41
|
+
const buttonStyle = React.useMemo(() => {
|
|
42
|
+
const baseStyle = {
|
|
43
|
+
...buttonStyleBase,
|
|
44
|
+
border: `1px solid ${theme.palette.grey[500]}`,
|
|
45
|
+
boxShadow: `0px 1px 3px 0px ${theme.palette.grey[500]}`,
|
|
46
|
+
fontFamily: theme.font.fontFamily,
|
|
47
|
+
width: "100%",
|
|
48
|
+
color: hover ? theme.palette.primary.contrastText : theme.palette.background.contrastText
|
|
49
|
+
};
|
|
50
|
+
if (buttonType === "cancel") {
|
|
51
|
+
return {
|
|
52
|
+
...baseStyle,
|
|
53
|
+
backgroundColor: hover ? theme.palette.grey[600] : "transparent"
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
...baseStyle,
|
|
58
|
+
backgroundColor: hover ? theme.palette.primary.main : theme.palette.background.default
|
|
59
|
+
};
|
|
60
|
+
}, [buttonType, hover, theme]);
|
|
61
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
62
|
+
"button",
|
|
63
|
+
{
|
|
64
|
+
...index({ dev: { cy: `button-${buttonType}` } }),
|
|
65
|
+
onMouseEnter: () => setHover(true),
|
|
66
|
+
onMouseLeave: () => setHover(false),
|
|
67
|
+
style: buttonStyle,
|
|
68
|
+
onClick: (e) => {
|
|
69
|
+
e.preventDefault();
|
|
70
|
+
onClick();
|
|
71
|
+
},
|
|
72
|
+
"aria-label": text,
|
|
73
|
+
children: text
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
module.exports = Button;
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
3
|
+
const locale = require("@prosopo/locale");
|
|
4
|
+
const procaptchaCommon = require("@prosopo/procaptcha-common");
|
|
5
|
+
const util = require("@prosopo/util");
|
|
6
|
+
const widgetSkeleton = require("@prosopo/widget-skeleton");
|
|
7
|
+
const React = require("react");
|
|
8
|
+
const index = require("../util/index.cjs");
|
|
9
|
+
const Button = require("./Button.cjs");
|
|
10
|
+
const CaptchaWidget = require("./CaptchaWidget.cjs");
|
|
11
|
+
const CaptchaComponent = ({
|
|
12
|
+
challenge,
|
|
13
|
+
index: index$1,
|
|
14
|
+
solutions,
|
|
15
|
+
onSubmit,
|
|
16
|
+
onCancel,
|
|
17
|
+
onClick,
|
|
18
|
+
onNext,
|
|
19
|
+
onReload,
|
|
20
|
+
themeColor
|
|
21
|
+
}) => {
|
|
22
|
+
const { t } = locale.useTranslation();
|
|
23
|
+
const captcha = challenge.captchas ? util.at(challenge.captchas, index$1) : null;
|
|
24
|
+
const solution = solutions ? util.at(solutions, index$1) : [];
|
|
25
|
+
const theme = React.useMemo(
|
|
26
|
+
() => themeColor === "light" ? widgetSkeleton.lightTheme : widgetSkeleton.darkTheme,
|
|
27
|
+
[themeColor]
|
|
28
|
+
);
|
|
29
|
+
const doubleSpacing = `${theme.spacing.unit * 2}px`;
|
|
30
|
+
const fullSpacing = `${theme.spacing.unit}px`;
|
|
31
|
+
const halfSpacing = `${theme.spacing.half}px`;
|
|
32
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
style: {
|
|
36
|
+
// introduce scroll bars when screen < minWidth of children
|
|
37
|
+
overflowX: "auto",
|
|
38
|
+
overflowY: "auto",
|
|
39
|
+
maxWidth: "500px",
|
|
40
|
+
maxHeight: "100%",
|
|
41
|
+
display: "flex",
|
|
42
|
+
flexDirection: "column",
|
|
43
|
+
border: "1px solid #dddddd",
|
|
44
|
+
boxShadow: "rgba(255, 255, 255, 0.2) 0px 0px 4px",
|
|
45
|
+
borderRadius: "4px",
|
|
46
|
+
backgroundColor: theme.palette.background.default,
|
|
47
|
+
userSelect: "none",
|
|
48
|
+
touchAction: "none",
|
|
49
|
+
overscrollBehavior: "none"
|
|
50
|
+
},
|
|
51
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
style: {
|
|
55
|
+
backgroundColor: theme.palette.background.default,
|
|
56
|
+
display: "flex",
|
|
57
|
+
flexDirection: "column",
|
|
58
|
+
minWidth: "300px",
|
|
59
|
+
marginLeft: fullSpacing,
|
|
60
|
+
marginRight: fullSpacing,
|
|
61
|
+
justifyContent: "center"
|
|
62
|
+
},
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
style: {
|
|
68
|
+
display: "flex",
|
|
69
|
+
alignItems: "center",
|
|
70
|
+
width: "100%"
|
|
71
|
+
},
|
|
72
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
style: {
|
|
76
|
+
backgroundColor: theme.palette.primary.main,
|
|
77
|
+
width: "100%",
|
|
78
|
+
marginTop: fullSpacing
|
|
79
|
+
},
|
|
80
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
style: {
|
|
84
|
+
padding: `${theme.spacing.half}px`,
|
|
85
|
+
fontFamily: theme.font.fontFamily
|
|
86
|
+
},
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
89
|
+
"p",
|
|
90
|
+
{
|
|
91
|
+
style: {
|
|
92
|
+
color: "#ffffff",
|
|
93
|
+
fontWeight: 700,
|
|
94
|
+
lineHeight: 1.5
|
|
95
|
+
},
|
|
96
|
+
children: [
|
|
97
|
+
t("WIDGET.SELECT_ALL"),
|
|
98
|
+
":",
|
|
99
|
+
" ",
|
|
100
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: `${util.at(challenge.captchas, index$1).target} ` })
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
105
|
+
"p",
|
|
106
|
+
{
|
|
107
|
+
style: {
|
|
108
|
+
color: "#ffffff",
|
|
109
|
+
fontWeight: 500,
|
|
110
|
+
lineHeight: 0.8,
|
|
111
|
+
fontSize: "0.8rem"
|
|
112
|
+
},
|
|
113
|
+
children: t("WIDGET.IF_NONE_CLICK_NEXT")
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
...index({ dev: { cy: `captcha-${index$1}` } }),
|
|
127
|
+
style: { overflow: "hidden" },
|
|
128
|
+
children: captcha && /* @__PURE__ */ jsxRuntime.jsx(
|
|
129
|
+
CaptchaWidget.CaptchaWidget,
|
|
130
|
+
{
|
|
131
|
+
challenge: captcha,
|
|
132
|
+
solution,
|
|
133
|
+
onClick,
|
|
134
|
+
themeColor
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
140
|
+
"div",
|
|
141
|
+
{
|
|
142
|
+
style: {
|
|
143
|
+
display: "flex",
|
|
144
|
+
alignItems: "center",
|
|
145
|
+
justifyContent: "space-between",
|
|
146
|
+
lineHeight: 1.75,
|
|
147
|
+
padding: `${fullSpacing} 0 ${doubleSpacing} 0`
|
|
148
|
+
},
|
|
149
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
style: {
|
|
153
|
+
// expand to full height / width of parent
|
|
154
|
+
width: "100%",
|
|
155
|
+
height: "100%",
|
|
156
|
+
// display children in flex, spreading them evenly and wrapping when row length exceeded
|
|
157
|
+
display: "flex",
|
|
158
|
+
flexDirection: "row",
|
|
159
|
+
flexWrap: "wrap",
|
|
160
|
+
justifyContent: "space-between",
|
|
161
|
+
gap: "10px"
|
|
162
|
+
},
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
165
|
+
"div",
|
|
166
|
+
{
|
|
167
|
+
style: {
|
|
168
|
+
position: "relative",
|
|
169
|
+
flexGrow: 1,
|
|
170
|
+
// make the width of each item 1/3rd of the width overall, i.e. 3 columns
|
|
171
|
+
flexBasis: "calc(33.333% - 10px)"
|
|
172
|
+
},
|
|
173
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
174
|
+
Button,
|
|
175
|
+
{
|
|
176
|
+
themeColor,
|
|
177
|
+
buttonType: "cancel",
|
|
178
|
+
onClick: onCancel,
|
|
179
|
+
text: t("WIDGET.CANCEL"),
|
|
180
|
+
"aria-label": t("WIDGET.CANCEL")
|
|
181
|
+
}
|
|
182
|
+
)
|
|
183
|
+
}
|
|
184
|
+
),
|
|
185
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
186
|
+
"div",
|
|
187
|
+
{
|
|
188
|
+
style: {
|
|
189
|
+
position: "relative",
|
|
190
|
+
flexGrow: 1,
|
|
191
|
+
// make the width of each item 1/3rd of the width overall, i.e. 3 columns
|
|
192
|
+
flexBasis: "calc(33.333% - 10px)"
|
|
193
|
+
},
|
|
194
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(procaptchaCommon.ReloadButton, { themeColor, onReload })
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
198
|
+
"div",
|
|
199
|
+
{
|
|
200
|
+
style: {
|
|
201
|
+
position: "relative",
|
|
202
|
+
flexGrow: 1,
|
|
203
|
+
// make the width of each item 1/3rd of the width overall, i.e. 3 columns
|
|
204
|
+
flexBasis: "calc(33.333% - 10px)"
|
|
205
|
+
},
|
|
206
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
207
|
+
Button,
|
|
208
|
+
{
|
|
209
|
+
themeColor,
|
|
210
|
+
buttonType: "next",
|
|
211
|
+
text: index$1 < challenge.captchas.length - 1 ? t("WIDGET.NEXT") : t("WIDGET.SUBMIT"),
|
|
212
|
+
onClick: index$1 < challenge.captchas.length - 1 ? onNext : onSubmit,
|
|
213
|
+
"aria-label": index$1 < challenge.captchas.length - 1 ? t("WIDGET.NEXT") : t("WIDGET.SUBMIT"),
|
|
214
|
+
"data-cy": "button-next"
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
}
|
|
218
|
+
)
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
)
|
|
222
|
+
}
|
|
223
|
+
)
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
)
|
|
227
|
+
}
|
|
228
|
+
) });
|
|
229
|
+
};
|
|
230
|
+
module.exports = CaptchaComponent;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
+
const common = require("@prosopo/common");
|
|
5
|
+
const widgetSkeleton = require("@prosopo/widget-skeleton");
|
|
6
|
+
const React = require("react");
|
|
7
|
+
const getHash = (item) => {
|
|
8
|
+
if (!item.hash) {
|
|
9
|
+
throw new common.ProsopoDatasetError("CAPTCHA.MISSING_ITEM_HASH", {
|
|
10
|
+
context: { item }
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return item.hash;
|
|
14
|
+
};
|
|
15
|
+
const CaptchaWidget = ({
|
|
16
|
+
challenge,
|
|
17
|
+
solution,
|
|
18
|
+
onClick,
|
|
19
|
+
themeColor
|
|
20
|
+
}) => {
|
|
21
|
+
const items = challenge.items;
|
|
22
|
+
const theme = React.useMemo(
|
|
23
|
+
() => themeColor === "light" ? widgetSkeleton.lightTheme : widgetSkeleton.darkTheme,
|
|
24
|
+
[themeColor]
|
|
25
|
+
);
|
|
26
|
+
const fullSpacing = `${theme.spacing.unit}px`;
|
|
27
|
+
const halfSpacing = `${theme.spacing.half}px`;
|
|
28
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
style: {
|
|
32
|
+
// expand to full height / width of parent
|
|
33
|
+
width: "100%",
|
|
34
|
+
height: "100%",
|
|
35
|
+
// display children in flex, spreading them evenly and wrapping when row length exceeded
|
|
36
|
+
display: "flex",
|
|
37
|
+
flexDirection: "row",
|
|
38
|
+
flexWrap: "wrap",
|
|
39
|
+
justifyContent: "space-between",
|
|
40
|
+
paddingBottom: fullSpacing,
|
|
41
|
+
paddingTop: fullSpacing,
|
|
42
|
+
gap: "10px"
|
|
43
|
+
},
|
|
44
|
+
children: items.map((item, index) => {
|
|
45
|
+
const hash = getHash(item);
|
|
46
|
+
const imageStyle = {
|
|
47
|
+
// enable the items in the grid to grow in width to use up excess space
|
|
48
|
+
flexGrow: 1,
|
|
49
|
+
// make the width of each item 1/3rd of the width overall, i.e. 3 columns
|
|
50
|
+
flexBasis: "calc(33.333% - 10px)",
|
|
51
|
+
// include the padding / margin / border in the width
|
|
52
|
+
boxSizing: "border-box"
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: imageStyle, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
style: {
|
|
58
|
+
position: "relative",
|
|
59
|
+
cursor: "pointer",
|
|
60
|
+
height: "100%",
|
|
61
|
+
width: "100%",
|
|
62
|
+
padding: 0,
|
|
63
|
+
margin: 0
|
|
64
|
+
},
|
|
65
|
+
onClick: () => onClick(hash),
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
68
|
+
"img",
|
|
69
|
+
{
|
|
70
|
+
style: {
|
|
71
|
+
width: "100%",
|
|
72
|
+
// image should be full width / height of the item
|
|
73
|
+
display: "block",
|
|
74
|
+
// removes whitespace below imgs
|
|
75
|
+
objectFit: "cover",
|
|
76
|
+
// contain the entire image in the img tag
|
|
77
|
+
aspectRatio: "1/1",
|
|
78
|
+
// force AR to be 1, letterboxing images with different aspect ratios
|
|
79
|
+
height: "auto",
|
|
80
|
+
// make the img tag responsive to its container
|
|
81
|
+
overflow: "hidden",
|
|
82
|
+
borderStyle: "solid",
|
|
83
|
+
borderWidth: "1px",
|
|
84
|
+
borderColor: theme.palette.grey[300]
|
|
85
|
+
},
|
|
86
|
+
src: item.data,
|
|
87
|
+
alt: `Captcha image ${index + 1}`
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
style: {
|
|
94
|
+
position: "absolute",
|
|
95
|
+
top: 0,
|
|
96
|
+
left: 0,
|
|
97
|
+
bottom: 0,
|
|
98
|
+
right: 0,
|
|
99
|
+
height: "100%",
|
|
100
|
+
width: "100%",
|
|
101
|
+
// display overlays in center
|
|
102
|
+
display: "flex",
|
|
103
|
+
alignItems: "center",
|
|
104
|
+
justifyContent: "center",
|
|
105
|
+
// make bg half opacity, i.e. shadowing the item's img
|
|
106
|
+
backgroundColor: "rgba(0,0,0,0.5)",
|
|
107
|
+
visibility: solution.includes(hash) ? "visible" : "hidden"
|
|
108
|
+
},
|
|
109
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
110
|
+
"svg",
|
|
111
|
+
{
|
|
112
|
+
style: {
|
|
113
|
+
backgroundColor: "transparent",
|
|
114
|
+
// img must be displayed as block otherwise gets a bottom whitespace border
|
|
115
|
+
display: "block",
|
|
116
|
+
// how big the overlay icon is
|
|
117
|
+
width: "35%",
|
|
118
|
+
height: "35%",
|
|
119
|
+
transition: "fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
120
|
+
userSelect: "none",
|
|
121
|
+
fill: "currentcolor"
|
|
122
|
+
},
|
|
123
|
+
focusable: "false",
|
|
124
|
+
color: "#fff",
|
|
125
|
+
"aria-hidden": "true",
|
|
126
|
+
viewBox: "0 0 24 24",
|
|
127
|
+
"data-testid": "CheckIcon",
|
|
128
|
+
"aria-label": "Check icon",
|
|
129
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
)
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
) }, item.hash);
|
|
137
|
+
})
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
};
|
|
141
|
+
exports.CaptchaWidget = CaptchaWidget;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
3
|
+
const react = require("@emotion/react");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const reactDom = require("react-dom");
|
|
6
|
+
const ModalInnerDivCSS = react.css`
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 50%;
|
|
9
|
+
left: 50%;
|
|
10
|
+
transform: translate(-50%, -50%);
|
|
11
|
+
max-width: 500px;
|
|
12
|
+
background-color: transparent;
|
|
13
|
+
border: none;
|
|
14
|
+
border-radius: 4px;
|
|
15
|
+
z-index: 2147483647;
|
|
16
|
+
align-self: center;
|
|
17
|
+
box-shadow: rgba(0, 0, 0, 0.2) 0px 11px 15px -7px,
|
|
18
|
+
rgba(0, 0, 0, 0.14) 0px 24px 38px 3px,
|
|
19
|
+
rgba(0, 0, 0, 0.12) 0px 9px 46px 8px;
|
|
20
|
+
box-sizing: border-box; /* Ensures border is part of width */
|
|
21
|
+
/* iOS only */
|
|
22
|
+
@supports (-webkit-touch-callout: none) {
|
|
23
|
+
transform: translate(-50%, -100%);
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
const ModalComponent = React.memo((props) => {
|
|
27
|
+
const { show, children } = props;
|
|
28
|
+
const display = show ? "flex" : "none";
|
|
29
|
+
const ModalOuterDivCss = {
|
|
30
|
+
position: "fixed",
|
|
31
|
+
zIndex: 2147483646,
|
|
32
|
+
inset: 0,
|
|
33
|
+
display,
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
justifyContent: "center",
|
|
36
|
+
minHeight: "100vh"
|
|
37
|
+
};
|
|
38
|
+
return reactDom.createPortal(
|
|
39
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "prosopo-modalOuter", style: ModalOuterDivCss, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prosopo-modalInner", css: ModalInnerDivCSS, children }) }),
|
|
40
|
+
document.body
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
module.exports = ModalComponent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const _interopNamespaceDefaultOnly = (e) => Object.freeze(Object.defineProperty({ __proto__: null, default: e }, Symbol.toStringTag, { value: "Module" }));
|
|
5
|
+
const ProcaptchaWidget = React.lazy(async () => Promise.resolve().then(() => /* @__PURE__ */ _interopNamespaceDefaultOnly(require("./ProcaptchaWidget.cjs"))));
|
|
6
|
+
const Procaptcha = (props) => /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { children: /* @__PURE__ */ jsxRuntime.jsx(ProcaptchaWidget, { ...props }) });
|
|
7
|
+
module.exports = Procaptcha;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
3
|
+
const locale = require("@prosopo/locale");
|
|
4
|
+
const procaptcha = require("@prosopo/procaptcha");
|
|
5
|
+
const procaptchaCommon = require("@prosopo/procaptcha-common");
|
|
6
|
+
const types = require("@prosopo/types");
|
|
7
|
+
const widgetSkeleton = require("@prosopo/widget-skeleton");
|
|
8
|
+
const React = require("react");
|
|
9
|
+
const CaptchaComponent = require("./CaptchaComponent.cjs");
|
|
10
|
+
const Modal = require("./Modal.cjs");
|
|
11
|
+
const PROCAPTCHA_EXECUTE_EVENT = "procaptcha:execute";
|
|
12
|
+
const ProcaptchaWidget = (props) => {
|
|
13
|
+
const { t } = locale.useTranslation();
|
|
14
|
+
const config = types.ProcaptchaConfigSchema.parse(props.config);
|
|
15
|
+
const frictionlessState = props.frictionlessState;
|
|
16
|
+
const i18n = props.i18n;
|
|
17
|
+
const callbacks = props.callbacks || {};
|
|
18
|
+
const [state, updateState] = procaptchaCommon.useProcaptcha(React.useState, React.useRef);
|
|
19
|
+
const [loading, setLoading] = React.useState(false);
|
|
20
|
+
const manager = procaptcha.Manager(
|
|
21
|
+
config,
|
|
22
|
+
state,
|
|
23
|
+
updateState,
|
|
24
|
+
callbacks,
|
|
25
|
+
frictionlessState
|
|
26
|
+
);
|
|
27
|
+
const theme = "light" === props.config.theme ? widgetSkeleton.lightTheme : widgetSkeleton.darkTheme;
|
|
28
|
+
React.useEffect(() => {
|
|
29
|
+
if (config.language) {
|
|
30
|
+
if (i18n) {
|
|
31
|
+
if (i18n.language !== config.language) {
|
|
32
|
+
i18n.changeLanguage(config.language).then((r) => r);
|
|
33
|
+
}
|
|
34
|
+
} else {
|
|
35
|
+
locale.loadI18next(false).then((i18n2) => {
|
|
36
|
+
if (i18n2.language !== config.language)
|
|
37
|
+
i18n2.changeLanguage(config.language).then((r) => r);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}, [i18n, config.language]);
|
|
42
|
+
React.useEffect(() => {
|
|
43
|
+
if (state.error) {
|
|
44
|
+
setLoading(false);
|
|
45
|
+
if (state.error.key === "CAPTCHA.NO_SESSION_FOUND" && frictionlessState) {
|
|
46
|
+
setTimeout(() => {
|
|
47
|
+
frictionlessState.restart();
|
|
48
|
+
}, 3e3);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}, [state.error, frictionlessState]);
|
|
52
|
+
React.useEffect(() => {
|
|
53
|
+
const handleExecuteEvent = (event) => {
|
|
54
|
+
updateState({
|
|
55
|
+
showModal: true
|
|
56
|
+
});
|
|
57
|
+
if (!state.challenge && manager.start) {
|
|
58
|
+
console.log("No challenge set, attempting to start verification");
|
|
59
|
+
try {
|
|
60
|
+
manager.start();
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error("Error starting verification:", error);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
document.addEventListener(PROCAPTCHA_EXECUTE_EVENT, handleExecuteEvent);
|
|
67
|
+
return () => {
|
|
68
|
+
document.removeEventListener(
|
|
69
|
+
PROCAPTCHA_EXECUTE_EVENT,
|
|
70
|
+
handleExecuteEvent
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
}, [manager, state.challenge, updateState]);
|
|
74
|
+
if (config.mode === "invisible") {
|
|
75
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Modal, { show: state.showModal, children: state.challenge ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
76
|
+
CaptchaComponent,
|
|
77
|
+
{
|
|
78
|
+
challenge: state.challenge,
|
|
79
|
+
index: state.index,
|
|
80
|
+
solutions: state.solutions,
|
|
81
|
+
onSubmit: manager.submit,
|
|
82
|
+
onCancel: manager.cancel,
|
|
83
|
+
onClick: manager.select,
|
|
84
|
+
onNext: manager.nextRound,
|
|
85
|
+
onReload: manager.reload,
|
|
86
|
+
themeColor: config.theme ?? "light"
|
|
87
|
+
}
|
|
88
|
+
) : null });
|
|
89
|
+
}
|
|
90
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "image-captcha", children: [
|
|
91
|
+
/* @__PURE__ */ jsxRuntime.jsx(Modal, { show: state.showModal, children: state.challenge ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
92
|
+
CaptchaComponent,
|
|
93
|
+
{
|
|
94
|
+
challenge: state.challenge,
|
|
95
|
+
index: state.index,
|
|
96
|
+
solutions: state.solutions,
|
|
97
|
+
onSubmit: manager.submit,
|
|
98
|
+
onCancel: manager.cancel,
|
|
99
|
+
onClick: manager.select,
|
|
100
|
+
onNext: manager.nextRound,
|
|
101
|
+
onReload: manager.reload,
|
|
102
|
+
themeColor: config.theme ?? "light"
|
|
103
|
+
}
|
|
104
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: "No challenge set." }) }),
|
|
105
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
106
|
+
procaptchaCommon.Checkbox,
|
|
107
|
+
{
|
|
108
|
+
theme,
|
|
109
|
+
onChange: async () => {
|
|
110
|
+
if (loading) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
setLoading(true);
|
|
114
|
+
await manager.start();
|
|
115
|
+
setLoading(false);
|
|
116
|
+
},
|
|
117
|
+
checked: state.isHuman,
|
|
118
|
+
labelText: t("WIDGET.I_AM_HUMAN"),
|
|
119
|
+
error: state.error?.message,
|
|
120
|
+
"aria-label": "human checkbox",
|
|
121
|
+
loading
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
] });
|
|
125
|
+
};
|
|
126
|
+
module.exports = ProcaptchaWidget;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const CaptchaWidget = require("./CaptchaWidget.cjs");
|
|
4
|
+
require("./CaptchaComponent.cjs");
|
|
5
|
+
const ProcaptchaWidget = require("./ProcaptchaWidget.cjs");
|
|
6
|
+
const Procaptcha = require("./Procaptcha.cjs");
|
|
7
|
+
exports.CaptchaWidget = CaptchaWidget.CaptchaWidget;
|
|
8
|
+
exports.ProcaptchaWidget = ProcaptchaWidget;
|
|
9
|
+
exports.Procaptcha = Procaptcha;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("./components/index.cjs");
|
|
4
|
+
require("./util/index.cjs");
|
|
5
|
+
const ProcaptchaWidget = require("./components/ProcaptchaWidget.cjs");
|
|
6
|
+
const Procaptcha = require("./components/Procaptcha.cjs");
|
|
7
|
+
const CaptchaWidget = require("./components/CaptchaWidget.cjs");
|
|
8
|
+
exports.ProcaptchaWidget = ProcaptchaWidget;
|
|
9
|
+
exports.Procaptcha = Procaptcha;
|
|
10
|
+
exports.CaptchaWidget = CaptchaWidget.CaptchaWidget;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function renameKeysForDataAttr(data = {}) {
|
|
3
|
+
return Object.keys(data).reduce(
|
|
4
|
+
// biome-ignore lint/performance/noAccumulatingSpread: TODO fix
|
|
5
|
+
(prev, curr) => ({ ...prev, [`data-${curr}`]: data[curr] }),
|
|
6
|
+
{}
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
function addDataAttr({
|
|
10
|
+
general,
|
|
11
|
+
dev
|
|
12
|
+
}) {
|
|
13
|
+
return {
|
|
14
|
+
...renameKeysForDataAttr(general),
|
|
15
|
+
...process.env.NODE_ENV !== "production" ? renameKeysForDataAttr(dev) : {}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
module.exports = addDataAttr;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACN,KAAK,oBAAoB,EAIzB,MAAM,OAAO,CAAC;AAGf,UAAU,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACpE,UAAU,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,UAAU,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACb;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACN,KAAK,oBAAoB,EAIzB,MAAM,OAAO,CAAC;AAGf,UAAU,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACpE,UAAU,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,UAAU,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACb;AA4BD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAmDjC,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -9,7 +9,6 @@ const buttonStyleBase = {
|
|
|
9
9
|
position: "relative",
|
|
10
10
|
boxSizing: "border-box",
|
|
11
11
|
outline: "0px",
|
|
12
|
-
border: "0px",
|
|
13
12
|
margin: "0px",
|
|
14
13
|
cursor: "pointer",
|
|
15
14
|
userSelect: "none",
|
|
@@ -25,9 +24,7 @@ const buttonStyleBase = {
|
|
|
25
24
|
padding: "6px 16px",
|
|
26
25
|
borderRadius: "4px",
|
|
27
26
|
transition: "background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
28
|
-
color: "rgb(0, 0, 0)",
|
|
29
27
|
backgroundColor: "#ffffff",
|
|
30
|
-
boxShadow: "rgba(0, 0, 0, 0.2) 0px 3px 1px -2px, rgba(0, 0, 0, 0.14) 0px 2px 2px 0px, rgba(0, 0, 0, 0.12) 0px 1px 5px 0px",
|
|
31
28
|
};
|
|
32
29
|
const Button = ({ themeColor, buttonType, text, onClick, }) => {
|
|
33
30
|
const theme = useMemo(() => (themeColor === "light" ? lightTheme : darkTheme), [themeColor]);
|
|
@@ -35,6 +32,10 @@ const Button = ({ themeColor, buttonType, text, onClick, }) => {
|
|
|
35
32
|
const buttonStyle = useMemo(() => {
|
|
36
33
|
const baseStyle = {
|
|
37
34
|
...buttonStyleBase,
|
|
35
|
+
border: `1px solid ${theme.palette.grey[500]}`,
|
|
36
|
+
boxShadow: `0px 1px 3px 0px ${theme.palette.grey[500]}`,
|
|
37
|
+
fontFamily: theme.font.fontFamily,
|
|
38
|
+
width: "100%",
|
|
38
39
|
color: hover
|
|
39
40
|
? theme.palette.primary.contrastText
|
|
40
41
|
: theme.palette.background.contrastText,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAGN,OAAO,EACP,QAAQ,GACR,MAAM,OAAO,CAAC;AACf,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAS3C,MAAM,eAAe,GAAkB;IACtC,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,QAAQ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,KAAK,CAAC,EACnC,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACd,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,OAAO,EAAE,CAAC;QACX,CAAC,gBACW,IAAI,YAEf,IAAI,GACG,CACT,CAAC;AACH,CAAC,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaptchaComponent.d.ts","sourceRoot":"","sources":["../../src/components/CaptchaComponent.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAQ1D,MAAM,WAAW,qBAAqB;IACrC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,GAAG,MAAM,CAAC;CAC7B;AAED,QAAA,MAAM,gBAAgB,gGAUnB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"CaptchaComponent.d.ts","sourceRoot":"","sources":["../../src/components/CaptchaComponent.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAQ1D,MAAM,WAAW,qBAAqB;IACrC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,GAAG,MAAM,CAAC;CAC7B;AAED,QAAA,MAAM,gBAAgB,gGAUnB,qBAAqB,qDAsLvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -12,12 +12,12 @@ const CaptchaComponent = ({ challenge, index, solutions, onSubmit, onCancel, onC
|
|
|
12
12
|
const captcha = challenge.captchas ? at(challenge.captchas, index) : null;
|
|
13
13
|
const solution = solutions ? at(solutions, index) : [];
|
|
14
14
|
const theme = useMemo(() => (themeColor === "light" ? lightTheme : darkTheme), [themeColor]);
|
|
15
|
+
const doubleSpacing = `${theme.spacing.unit * 2}px`;
|
|
15
16
|
const fullSpacing = `${theme.spacing.unit}px`;
|
|
16
17
|
const halfSpacing = `${theme.spacing.half}px`;
|
|
17
18
|
return (_jsx(Suspense, { fallback: _jsx("div", { children: "Loading..." }), children: _jsx("div", { style: {
|
|
18
19
|
overflowX: "auto",
|
|
19
20
|
overflowY: "auto",
|
|
20
|
-
width: "100%",
|
|
21
21
|
maxWidth: "500px",
|
|
22
22
|
maxHeight: "100%",
|
|
23
23
|
display: "flex",
|
|
@@ -34,6 +34,9 @@ const CaptchaComponent = ({ challenge, index, solutions, onSubmit, onCancel, onC
|
|
|
34
34
|
display: "flex",
|
|
35
35
|
flexDirection: "column",
|
|
36
36
|
minWidth: "300px",
|
|
37
|
+
marginLeft: fullSpacing,
|
|
38
|
+
marginRight: fullSpacing,
|
|
39
|
+
justifyContent: "center",
|
|
37
40
|
}, children: [_jsx("div", { style: {
|
|
38
41
|
display: "flex",
|
|
39
42
|
alignItems: "center",
|
|
@@ -42,37 +45,45 @@ const CaptchaComponent = ({ challenge, index, solutions, onSubmit, onCancel, onC
|
|
|
42
45
|
backgroundColor: theme.palette.primary.main,
|
|
43
46
|
width: "100%",
|
|
44
47
|
marginTop: fullSpacing,
|
|
45
|
-
marginLeft: fullSpacing,
|
|
46
|
-
marginRight: fullSpacing,
|
|
47
48
|
}, children: _jsxs("div", { style: {
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
padding: `${theme.spacing.half}px`,
|
|
50
|
+
fontFamily: theme.font.fontFamily,
|
|
50
51
|
}, children: [_jsxs("p", { style: {
|
|
51
52
|
color: "#ffffff",
|
|
52
53
|
fontWeight: 700,
|
|
53
54
|
lineHeight: 1.5,
|
|
54
|
-
}, children: [t("WIDGET.SELECT_ALL"), ":", "\u00A0", _jsx("span", { children: `${
|
|
55
|
+
}, children: [t("WIDGET.SELECT_ALL"), ":", "\u00A0", _jsx("span", { children: `${at(challenge.captchas, index).target} ` })] }), _jsx("p", { style: {
|
|
55
56
|
color: "#ffffff",
|
|
56
57
|
fontWeight: 500,
|
|
57
58
|
lineHeight: 0.8,
|
|
58
59
|
fontSize: "0.8rem",
|
|
59
|
-
}, children: t("WIDGET.IF_NONE_CLICK_NEXT") })] }) }) }), _jsx("div", { ...addDataAttr({ dev: { cy: `captcha-${index}` } }), style: {
|
|
60
|
-
paddingRight: halfSpacing,
|
|
61
|
-
paddingLeft: halfSpacing,
|
|
62
|
-
}, children: captcha && (_jsx(CaptchaWidget, { challenge: captcha, solution: solution, onClick: onClick, themeColor: themeColor })) }), _jsx("div", { style: {
|
|
60
|
+
}, children: t("WIDGET.IF_NONE_CLICK_NEXT") })] }) }) }), _jsx("div", { ...addDataAttr({ dev: { cy: `captcha-${index}` } }), style: { overflow: "hidden" }, children: captcha && (_jsx(CaptchaWidget, { challenge: captcha, solution: solution, onClick: onClick, themeColor: themeColor })) }), _jsx("div", { style: {
|
|
63
61
|
display: "flex",
|
|
64
62
|
alignItems: "center",
|
|
65
63
|
justifyContent: "space-between",
|
|
66
64
|
lineHeight: 1.75,
|
|
67
|
-
padding: fullSpacing
|
|
68
|
-
paddingBottom: halfSpacing,
|
|
69
|
-
paddingTop: halfSpacing,
|
|
65
|
+
padding: `${fullSpacing} 0 ${doubleSpacing} 0`,
|
|
70
66
|
}, children: _jsxs("div", { style: {
|
|
71
|
-
display: "grid",
|
|
72
|
-
gridAutoFlow: "column",
|
|
73
|
-
gridTemplateColumns: "repeat(3, minmax(0, 1fr)",
|
|
74
67
|
width: "100%",
|
|
75
|
-
|
|
68
|
+
height: "100%",
|
|
69
|
+
display: "flex",
|
|
70
|
+
flexDirection: "row",
|
|
71
|
+
flexWrap: "wrap",
|
|
72
|
+
justifyContent: "space-between",
|
|
73
|
+
gap: "10px",
|
|
74
|
+
}, children: [_jsx("div", { style: {
|
|
75
|
+
position: "relative",
|
|
76
|
+
flexGrow: 1,
|
|
77
|
+
flexBasis: "calc(33.333% - 10px)",
|
|
78
|
+
}, children: _jsx(Button, { themeColor: themeColor, buttonType: "cancel", onClick: onCancel, text: t("WIDGET.CANCEL"), "aria-label": t("WIDGET.CANCEL") }) }), _jsx("div", { style: {
|
|
79
|
+
position: "relative",
|
|
80
|
+
flexGrow: 1,
|
|
81
|
+
flexBasis: "calc(33.333% - 10px)",
|
|
82
|
+
}, children: _jsx(ReloadButton, { themeColor: themeColor, onReload: onReload }) }), _jsx("div", { style: {
|
|
83
|
+
position: "relative",
|
|
84
|
+
flexGrow: 1,
|
|
85
|
+
flexBasis: "calc(33.333% - 10px)",
|
|
86
|
+
}, children: _jsx(Button, { themeColor: themeColor, buttonType: "next", text: index < challenge.captchas.length - 1
|
|
76
87
|
? t("WIDGET.NEXT")
|
|
77
88
|
: t("WIDGET.SUBMIT"), onClick: index < challenge.captchas.length - 1 ? onNext : onSubmit, "aria-label": index < challenge.captchas.length - 1
|
|
78
89
|
? t("WIDGET.NEXT")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaptchaComponent.js","sourceRoot":"","sources":["../../src/components/CaptchaComponent.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAA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,kBAAkB;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,OAAO,GAAG,MAAM,CAAC;CAC7B;AAYD,eAAO,MAAM,aAAa,kDAKvB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"CaptchaWidget.d.ts","sourceRoot":"","sources":["../../src/components/CaptchaWidget.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAK9C,MAAM,WAAW,kBAAkB;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,OAAO,GAAG,MAAM,CAAC;CAC7B;AAYD,eAAO,MAAM,aAAa,kDAKvB,kBAAkB,qDA+GpB,CAAC"}
|
|
@@ -22,34 +22,33 @@ export const CaptchaWidget = ({ challenge, solution, onClick, themeColor, }) =>
|
|
|
22
22
|
flexDirection: "row",
|
|
23
23
|
flexWrap: "wrap",
|
|
24
24
|
justifyContent: "space-between",
|
|
25
|
-
paddingBottom:
|
|
26
|
-
|
|
25
|
+
paddingBottom: fullSpacing,
|
|
26
|
+
paddingTop: fullSpacing,
|
|
27
|
+
gap: "10px",
|
|
27
28
|
}, children: items.map((item, index) => {
|
|
28
29
|
const hash = getHash(item);
|
|
29
30
|
const imageStyle = {
|
|
30
31
|
flexGrow: 1,
|
|
31
|
-
flexBasis: "33.
|
|
32
|
+
flexBasis: "calc(33.333% - 10px)",
|
|
32
33
|
boxSizing: "border-box",
|
|
33
|
-
paddingLeft: halfSpacing,
|
|
34
|
-
paddingTop: halfSpacing,
|
|
35
34
|
};
|
|
36
35
|
return (_jsx("div", { style: imageStyle, children: _jsxs("div", { style: {
|
|
37
36
|
position: "relative",
|
|
38
37
|
cursor: "pointer",
|
|
39
38
|
height: "100%",
|
|
40
39
|
width: "100%",
|
|
41
|
-
border: 1,
|
|
42
40
|
padding: 0,
|
|
43
41
|
margin: 0,
|
|
44
|
-
borderStyle: "solid",
|
|
45
|
-
borderColor: theme.palette.grey[300],
|
|
46
42
|
}, onClick: () => onClick(hash), children: [_jsx("img", { style: {
|
|
47
43
|
width: "100%",
|
|
48
|
-
backgroundColor: theme.palette.grey[300],
|
|
49
44
|
display: "block",
|
|
50
|
-
objectFit: "
|
|
45
|
+
objectFit: "cover",
|
|
51
46
|
aspectRatio: "1/1",
|
|
52
47
|
height: "auto",
|
|
48
|
+
overflow: "hidden",
|
|
49
|
+
borderStyle: "solid",
|
|
50
|
+
borderWidth: "1px",
|
|
51
|
+
borderColor: theme.palette.grey[300],
|
|
53
52
|
}, src: item.data, alt: `Captcha image ${index + 1}` }), _jsx("div", { style: {
|
|
54
53
|
position: "absolute",
|
|
55
54
|
top: 0,
|
|
@@ -1 +1 @@
|
|
|
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,0BAA0B,CAAC;AAEjE,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAUhC,MAAM,OAAO,GAAG,CAAC,IAAS,EAAE,EAAE;IAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAChB,MAAM,IAAI,mBAAmB,CAAC,2BAA2B,EAAE;YAC1D,OAAO,EAAE,EAAE,IAAI,EAAE;SACjB,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,OAAO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ean;
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
};
|
|
6
|
-
declare const ModalComponent: React.MemoExoticComponent<(props: ModalProps
|
|
6
|
+
declare const ModalComponent: React.MemoExoticComponent<(props: ModalProps) => React.ReactPortal>;
|
|
7
7
|
export default ModalComponent;
|
|
8
8
|
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"AAeA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAElD,KAAK,UAAU,GAAG;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;AAuBF,QAAA,MAAM,cAAc,oCAAsB,UAAU,uBAqBlD,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
package/dist/components/Modal.js
CHANGED
|
@@ -1,37 +1,40 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { css } from "@emotion/react";
|
|
2
3
|
import React from "react";
|
|
3
|
-
|
|
4
|
+
import { createPortal } from "react-dom";
|
|
5
|
+
const ModalInnerDivCSS = css `
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 50%;
|
|
8
|
+
left: 50%;
|
|
9
|
+
transform: translate(-50%, -50%);
|
|
10
|
+
max-width: 500px;
|
|
11
|
+
background-color: transparent;
|
|
12
|
+
border: none;
|
|
13
|
+
border-radius: 4px;
|
|
14
|
+
z-index: 2147483647;
|
|
15
|
+
align-self: center;
|
|
16
|
+
box-shadow: rgba(0, 0, 0, 0.2) 0px 11px 15px -7px,
|
|
17
|
+
rgba(0, 0, 0, 0.14) 0px 24px 38px 3px,
|
|
18
|
+
rgba(0, 0, 0, 0.12) 0px 9px 46px 8px;
|
|
19
|
+
box-sizing: border-box; /* Ensures border is part of width */
|
|
20
|
+
/* iOS only */
|
|
21
|
+
@supports (-webkit-touch-callout: none) {
|
|
22
|
+
transform: translate(-50%, -100%);
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
const ModalComponent = React.memo((props) => {
|
|
4
26
|
const { show, children } = props;
|
|
5
|
-
const display = show ? "
|
|
27
|
+
const display = show ? "flex" : "none";
|
|
6
28
|
const ModalOuterDivCss = {
|
|
7
29
|
position: "fixed",
|
|
8
30
|
zIndex: 2147483646,
|
|
9
31
|
inset: 0,
|
|
10
32
|
display,
|
|
11
|
-
};
|
|
12
|
-
const ModalBackgroundCSS = {
|
|
13
|
-
position: "fixed",
|
|
14
|
-
display: "flex",
|
|
15
33
|
alignItems: "center",
|
|
16
34
|
justifyContent: "center",
|
|
17
|
-
|
|
18
|
-
bottom: 0,
|
|
19
|
-
top: 0,
|
|
20
|
-
left: 0,
|
|
21
|
-
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
22
|
-
zIndex: -1,
|
|
23
|
-
};
|
|
24
|
-
const ModalInnerDivCSS = {
|
|
25
|
-
position: "absolute",
|
|
26
|
-
top: "50%",
|
|
27
|
-
left: "50%",
|
|
28
|
-
transform: "translate(-50%, -50%)",
|
|
29
|
-
width: "inherit",
|
|
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,",
|
|
35
|
+
minHeight: "100vh",
|
|
33
36
|
};
|
|
34
|
-
return (
|
|
37
|
+
return createPortal(_jsx("div", { className: "prosopo-modalOuter", style: ModalOuterDivCss, children: _jsx("div", { className: "prosopo-modalInner", css: ModalInnerDivCSS, children: children }) }), document.body);
|
|
35
38
|
});
|
|
36
39
|
export default ModalComponent;
|
|
37
40
|
//# sourceMappingURL=Modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAMzC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;CAmB3B,CAAC;AAEF,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,KAAiB,EAAE,EAAE;IACvD,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,gBAAgB,GAAkB;QACvC,QAAQ,EAAE,OAAO;QACjB,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,CAAC;QACR,OAAO;QACP,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,SAAS,EAAE,OAAO;KAClB,CAAC;IAEF,OAAO,YAAY,CAClB,cAAK,SAAS,EAAC,oBAAoB,EAAC,KAAK,EAAE,gBAAgB,YAC1D,cAAK,SAAS,EAAC,oBAAoB,EAAC,GAAG,EAAE,gBAAgB,YACvD,QAAQ,GACJ,GACD,EACN,QAAQ,CAAC,IAAI,CACb,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Ti18n } from "@prosopo/locale";
|
|
2
|
+
import type { FrictionlessState, ProcaptchaCallbacks, ProcaptchaClientConfigInput } from "@prosopo/types";
|
|
2
3
|
import { type LazyExoticComponent } from "react";
|
|
3
4
|
import type { ReactElement } from "react";
|
|
4
|
-
declare const ProcaptchaWidget: LazyExoticComponent<(props:
|
|
5
|
+
declare const ProcaptchaWidget: LazyExoticComponent<(props: {
|
|
6
|
+
config: ProcaptchaClientConfigInput;
|
|
7
|
+
callbacks: ProcaptchaCallbacks;
|
|
8
|
+
frictionlessState?: FrictionlessState;
|
|
9
|
+
i18n: Ti18n;
|
|
10
|
+
}) => ReactElement>;
|
|
5
11
|
type ProcaptchaProps = React.ComponentProps<typeof ProcaptchaWidget>;
|
|
6
12
|
declare const Procaptcha: (props: ProcaptchaProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
13
|
export default Procaptcha;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Procaptcha.d.ts","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Procaptcha.d.ts","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EACX,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,mBAAmB,EAAkB,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,QAAA,MAAM,gBAAgB,EAAE,mBAAmB,CAC1C,CAAC,KAAK,EAAE;IACP,MAAM,EAAE,2BAA2B,CAAC;IACpC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,IAAI,EAAE,KAAK,CAAC;CACZ,KAAK,YAAY,CACkC,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,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { Suspense, lazy } from "react";
|
|
3
3
|
const ProcaptchaWidget = lazy(async () => import("./ProcaptchaWidget.js"));
|
|
4
|
-
const Procaptcha = (props) => (_jsx(Suspense, { children: _jsx(ProcaptchaWidget, {
|
|
4
|
+
const Procaptcha = (props) => (_jsx(Suspense, { children: _jsx(ProcaptchaWidget, { ...props }) }));
|
|
5
5
|
export default Procaptcha;
|
|
6
6
|
//# 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":";AAoBA,OAAO,EAA4B,QAAQ,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAIjE,MAAM,gBAAgB,GAOlB,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC;AAGtD,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE,CAAC,CAC9C,KAAC,QAAQ,cACR,KAAC,gBAAgB,OAAK,KAAK,GAAI,GACrB,CACX,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,15 +24,17 @@
|
|
|
24
24
|
"build": "tsc --build --verbose",
|
|
25
25
|
"build:cjs": "npx vite --config vite.cjs.config.ts build"
|
|
26
26
|
},
|
|
27
|
-
"browserslist": [
|
|
27
|
+
"browserslist": [
|
|
28
|
+
"> 0.5%, last 2 versions, not dead"
|
|
29
|
+
],
|
|
28
30
|
"dependencies": {
|
|
29
|
-
"@prosopo/common": "2.
|
|
30
|
-
"@prosopo/locale": "2.
|
|
31
|
-
"@prosopo/procaptcha": "2.
|
|
32
|
-
"@prosopo/procaptcha-common": "2.
|
|
33
|
-
"@prosopo/types": "2.
|
|
34
|
-
"@prosopo/util": "2.
|
|
35
|
-
"@prosopo/widget-skeleton": "2.
|
|
31
|
+
"@prosopo/common": "2.6.0",
|
|
32
|
+
"@prosopo/locale": "2.6.0",
|
|
33
|
+
"@prosopo/procaptcha": "2.6.1",
|
|
34
|
+
"@prosopo/procaptcha-common": "2.6.1",
|
|
35
|
+
"@prosopo/types": "2.6.1",
|
|
36
|
+
"@prosopo/util": "2.6.0",
|
|
37
|
+
"@prosopo/widget-skeleton": "2.6.0",
|
|
36
38
|
"csstype": "3.1.3",
|
|
37
39
|
"express": "4.21.2",
|
|
38
40
|
"react": "18.3.1"
|
|
@@ -50,20 +52,21 @@
|
|
|
50
52
|
}
|
|
51
53
|
},
|
|
52
54
|
"devDependencies": {
|
|
53
|
-
"@prosopo/config": "2.
|
|
54
|
-
"@vitest/coverage-v8": "
|
|
55
|
+
"@prosopo/config": "2.6.0",
|
|
56
|
+
"@vitest/coverage-v8": "3.0.9",
|
|
55
57
|
"concurrently": "9.0.1",
|
|
56
58
|
"del-cli": "6.0.0",
|
|
57
59
|
"npm-run-all": "2.1.0",
|
|
58
60
|
"tslib": "2.7.0",
|
|
59
61
|
"tsx": "4.19.1",
|
|
60
62
|
"typescript": "5.6.2",
|
|
61
|
-
"vite": "
|
|
62
|
-
"vitest": "
|
|
63
|
+
"vite": "6.2.3",
|
|
64
|
+
"vitest": "3.0.9"
|
|
63
65
|
},
|
|
64
66
|
"repository": {
|
|
65
67
|
"type": "git",
|
|
66
|
-
"url": "git+https://github.com/prosopo/captcha.git"
|
|
68
|
+
"url": "git+https://github.com/prosopo/captcha.git",
|
|
69
|
+
"directory": "packages/procaptcha-react"
|
|
67
70
|
},
|
|
68
71
|
"bugs": {
|
|
69
72
|
"url": "https://github.com/prosopo/captcha/issues"
|