@prosopo/procaptcha-react 2.11.3 → 2.12.0
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/.turbo/turbo-build$colon$cjs.log +13 -13
- package/.turbo/turbo-build$colon$tsc.log +21 -21
- package/.turbo/turbo-build.log +14 -13
- package/CHANGELOG.md +41 -0
- package/dist/cjs/components/button.cjs +100 -0
- package/dist/cjs/components/captchaComponent.cjs +210 -0
- package/dist/cjs/components/captchaWidget.cjs +203 -0
- package/dist/cjs/components/collector.cjs +49 -0
- package/dist/cjs/components/index.cjs +15 -6
- package/dist/cjs/components/modal.cjs +35 -0
- package/dist/cjs/components/procaptcha.cjs +23 -0
- package/dist/cjs/components/procaptchaWidget.cjs +166 -0
- package/dist/cjs/index.cjs +15 -6
- package/dist/cjs/util/index.cjs +6 -4
- package/dist/components/button.d.ts +9 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +100 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/{CaptchaComponent.d.ts → captchaComponent.d.ts} +5 -3
- package/dist/components/captchaComponent.d.ts.map +1 -0
- package/dist/components/captchaComponent.js +210 -0
- package/dist/components/captchaComponent.js.map +1 -0
- package/dist/components/{CaptchaWidget.d.ts → captchaWidget.d.ts} +3 -2
- package/dist/components/captchaWidget.d.ts.map +1 -0
- package/dist/components/captchaWidget.js +203 -0
- package/dist/components/captchaWidget.js.map +1 -0
- package/dist/components/collector.d.ts +5 -4
- package/dist/components/collector.d.ts.map +1 -1
- package/dist/components/collector.js +46 -24
- package/dist/components/collector.js.map +1 -1
- package/dist/components/index.d.ts +7 -5
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +8 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/modal.d.ts +14 -0
- package/dist/components/modal.d.ts.map +1 -0
- package/dist/components/modal.js +35 -0
- package/dist/components/modal.js.map +1 -0
- package/dist/components/procaptcha.d.ts +7 -0
- package/dist/components/procaptcha.d.ts.map +1 -0
- package/dist/components/procaptcha.js +22 -0
- package/dist/components/procaptcha.js.map +1 -0
- package/dist/components/procaptchaWidget.d.ts +7 -0
- package/dist/components/procaptchaWidget.d.ts.map +1 -0
- package/dist/components/procaptchaWidget.js +166 -0
- package/dist/components/procaptchaWidget.js.map +1 -0
- package/dist/index.js +8 -4
- package/dist/tests/button.unit.test.d.ts.map +1 -1
- package/dist/tests/button.unit.test.js +69 -49
- package/dist/tests/button.unit.test.js.map +1 -1
- package/dist/tests/captchaComponent.unit.test.d.ts.map +1 -1
- package/dist/tests/captchaComponent.unit.test.js +31 -9
- package/dist/tests/captchaComponent.unit.test.js.map +1 -1
- package/dist/tests/captchaWidget.unit.test.d.ts.map +1 -1
- package/dist/tests/captchaWidget.unit.test.js +55 -9
- package/dist/tests/captchaWidget.unit.test.js.map +1 -1
- package/dist/tests/collector.unit.test.d.ts.map +1 -1
- package/dist/tests/collector.unit.test.js +43 -10
- package/dist/tests/collector.unit.test.js.map +1 -1
- package/dist/tests/harness.d.ts +2 -0
- package/dist/tests/harness.d.ts.map +1 -1
- package/dist/tests/harness.js +7 -0
- package/dist/tests/harness.js.map +1 -1
- package/dist/tests/modal.unit.test.d.ts.map +1 -1
- package/dist/tests/modal.unit.test.js +20 -7
- package/dist/tests/modal.unit.test.js.map +1 -1
- package/dist/tests/procaptcha.unit.test.d.ts.map +1 -1
- package/dist/tests/procaptcha.unit.test.js +37 -15
- package/dist/tests/procaptcha.unit.test.js.map +1 -1
- package/dist/tests/procaptchaReact.test-d.js +8 -6
- package/dist/tests/procaptchaReact.test-d.js.map +1 -1
- package/dist/tests/procaptchaWidget.unit.test.d.ts.map +1 -1
- package/dist/tests/procaptchaWidget.unit.test.js +112 -89
- package/dist/tests/procaptchaWidget.unit.test.js.map +1 -1
- package/dist/tests/render.d.ts +6 -7
- package/dist/tests/render.d.ts.map +1 -1
- package/dist/tests/render.js +23 -30
- package/dist/tests/render.js.map +1 -1
- package/dist/util/index.d.ts +8 -7
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +6 -4
- package/dist/util/index.js.map +1 -1
- package/package.json +8 -13
- package/vite.test.config.ts +1 -2
- package/dist/cjs/_virtual/_rolldown/runtime.cjs +0 -23
- package/dist/cjs/components/Button.cjs +0 -81
- package/dist/cjs/components/CaptchaComponent.cjs +0 -171
- package/dist/cjs/components/CaptchaWidget.cjs +0 -129
- package/dist/cjs/components/Modal.cjs +0 -35
- package/dist/cjs/components/Procaptcha.cjs +0 -7
- package/dist/cjs/components/ProcaptchaWidget.cjs +0 -168
- package/dist/components/Button.d.ts +0 -11
- package/dist/components/Button.d.ts.map +0 -1
- package/dist/components/Button.js +0 -81
- package/dist/components/Button.js.map +0 -1
- package/dist/components/CaptchaComponent.d.ts.map +0 -1
- package/dist/components/CaptchaComponent.js +0 -171
- package/dist/components/CaptchaComponent.js.map +0 -1
- package/dist/components/CaptchaWidget.d.ts.map +0 -1
- package/dist/components/CaptchaWidget.js +0 -129
- package/dist/components/CaptchaWidget.js.map +0 -1
- package/dist/components/Modal.d.ts +0 -13
- package/dist/components/Modal.d.ts.map +0 -1
- package/dist/components/Modal.js +0 -33
- package/dist/components/Modal.js.map +0 -1
- package/dist/components/Procaptcha.d.ts +0 -4
- package/dist/components/Procaptcha.d.ts.map +0 -1
- package/dist/components/Procaptcha.js +0 -7
- package/dist/components/Procaptcha.js.map +0 -1
- package/dist/components/ProcaptchaWidget.d.ts +0 -4
- package/dist/components/ProcaptchaWidget.d.ts.map +0 -1
- package/dist/components/ProcaptchaWidget.js +0 -168
- package/dist/components/ProcaptchaWidget.js.map +0 -1
- package/dist/tests/setup.d.ts +0 -5
- package/dist/tests/setup.d.ts.map +0 -1
- package/dist/tests/setup.js +0 -3
- package/dist/tests/setup.js.map +0 -1
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
const require_CaptchaComponent = require("./CaptchaComponent.cjs");
|
|
2
|
-
const require_Modal = require("./Modal.cjs");
|
|
3
|
-
let _prosopo_procaptcha_common = require("@prosopo/procaptcha-common");
|
|
4
|
-
let _prosopo_widget_skeleton = require("@prosopo/widget-skeleton");
|
|
5
|
-
let react = require("react");
|
|
6
|
-
let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
|
|
7
|
-
let _prosopo_locale = require("@prosopo/locale");
|
|
8
|
-
let _prosopo_procaptcha = require("@prosopo/procaptcha");
|
|
9
|
-
let _prosopo_types = require("@prosopo/types");
|
|
10
|
-
//#region src/components/ProcaptchaWidget.tsx
|
|
11
|
-
/** @jsxImportSource @emotion/react */
|
|
12
|
-
var PROCAPTCHA_EXECUTE_EVENT = "procaptcha:execute";
|
|
13
|
-
var ProcaptchaWidget = (props) => {
|
|
14
|
-
const { t, ready: isTranslationReady } = (0, _prosopo_locale.useTranslation)();
|
|
15
|
-
const config = _prosopo_types.ProcaptchaConfigSchema.parse(props.config);
|
|
16
|
-
const frictionlessState = props.frictionlessState;
|
|
17
|
-
const i18n = props.i18n;
|
|
18
|
-
const callbacks = props.callbacks || {};
|
|
19
|
-
const [state, updateState] = (0, _prosopo_procaptcha_common.useProcaptcha)(react.useState, react.useRef);
|
|
20
|
-
const [loading, setLoading] = (0, react.useState)(false);
|
|
21
|
-
const hpRef = (0, react.useRef)(null);
|
|
22
|
-
const onReloadRef = (0, react.useRef)(props.onReload);
|
|
23
|
-
onReloadRef.current = props.onReload;
|
|
24
|
-
const delegatesReload = (0, react.useRef)(Boolean(props.onReload));
|
|
25
|
-
const manager = (0, react.useRef)((0, _prosopo_procaptcha.Manager)(config, state, updateState, callbacks, frictionlessState, () => hpRef.current?.value || void 0, delegatesReload.current ? (x, y) => onReloadRef.current?.(x, y) : void 0));
|
|
26
|
-
const lastCoordsRef = (0, react.useRef)(null);
|
|
27
|
-
const sessionInvalidatedFiredRef = (0, react.useRef)(false);
|
|
28
|
-
const theme = "light" === props.config.theme ? _prosopo_widget_skeleton.lightTheme : _prosopo_widget_skeleton.darkTheme;
|
|
29
|
-
(0, react.useEffect)(() => {
|
|
30
|
-
if (!config.language) return;
|
|
31
|
-
if (i18n) {
|
|
32
|
-
if (i18n.language !== config.language) i18n.changeLanguage(config.language);
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
(0, _prosopo_locale.loadI18next)(false, config.language);
|
|
36
|
-
}, [i18n, config.language]);
|
|
37
|
-
(0, react.useEffect)(() => {
|
|
38
|
-
if (!props.autoStart) return;
|
|
39
|
-
setLoading(true);
|
|
40
|
-
const coords = props.startCoords;
|
|
41
|
-
lastCoordsRef.current = coords ?? null;
|
|
42
|
-
manager.current.start(coords?.x ?? 0, coords?.y ?? 0).then(() => setLoading(false), () => setLoading(false));
|
|
43
|
-
}, [props.autoStart, props.startCoords]);
|
|
44
|
-
(0, react.useEffect)(() => {
|
|
45
|
-
if (!state.error) return;
|
|
46
|
-
setLoading(false);
|
|
47
|
-
if (state.error.key !== "CAPTCHA.NO_SESSION_FOUND") return;
|
|
48
|
-
if (props.onSessionInvalidated && !sessionInvalidatedFiredRef.current) {
|
|
49
|
-
sessionInvalidatedFiredRef.current = true;
|
|
50
|
-
const coords = lastCoordsRef.current;
|
|
51
|
-
props.onSessionInvalidated(coords?.x, coords?.y);
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
if (frictionlessState) setTimeout(() => {
|
|
55
|
-
frictionlessState.restart();
|
|
56
|
-
}, 100);
|
|
57
|
-
}, [
|
|
58
|
-
state.error,
|
|
59
|
-
frictionlessState,
|
|
60
|
-
props.onSessionInvalidated
|
|
61
|
-
]);
|
|
62
|
-
(0, react.useEffect)(() => {
|
|
63
|
-
const handleExecuteEvent = (event) => {
|
|
64
|
-
updateState({ showModal: true });
|
|
65
|
-
if (!state.challenge && manager.current.start) {
|
|
66
|
-
console.log("No challenge set, attempting to start verification");
|
|
67
|
-
try {
|
|
68
|
-
manager.current.start();
|
|
69
|
-
} catch (error) {
|
|
70
|
-
console.error("Error starting verification:", error);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
document.addEventListener(PROCAPTCHA_EXECUTE_EVENT, handleExecuteEvent);
|
|
75
|
-
const container = props.container;
|
|
76
|
-
container?.addEventListener(PROCAPTCHA_EXECUTE_EVENT, handleExecuteEvent);
|
|
77
|
-
return () => {
|
|
78
|
-
document.removeEventListener(PROCAPTCHA_EXECUTE_EVENT, handleExecuteEvent);
|
|
79
|
-
container?.removeEventListener(PROCAPTCHA_EXECUTE_EVENT, handleExecuteEvent);
|
|
80
|
-
};
|
|
81
|
-
}, [
|
|
82
|
-
state.challenge,
|
|
83
|
-
updateState,
|
|
84
|
-
props.container
|
|
85
|
-
]);
|
|
86
|
-
const honeypot = frictionlessState?.hp ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(_prosopo_procaptcha_common.Honeypot, {
|
|
87
|
-
ref: hpRef,
|
|
88
|
-
encodedQuestion: frictionlessState.hp
|
|
89
|
-
}) : null;
|
|
90
|
-
const imageDialogLabel = t("WIDGET.IMAGE_DIALOG_LABEL", { defaultValue: "Image challenge" });
|
|
91
|
-
if (config.mode === "invisible") return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)(_emotion_react_jsx_runtime.Fragment, { children: [honeypot, /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_Modal.default, {
|
|
92
|
-
show: state.showModal,
|
|
93
|
-
placement: config.placement,
|
|
94
|
-
anchor: props.container,
|
|
95
|
-
onDismiss: manager.current.cancel,
|
|
96
|
-
dialogLabel: imageDialogLabel,
|
|
97
|
-
children: state.challenge ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_CaptchaComponent.default, {
|
|
98
|
-
challenge: state.challenge,
|
|
99
|
-
index: state.index,
|
|
100
|
-
solutions: state.solutions,
|
|
101
|
-
onSubmit: manager.current.submit,
|
|
102
|
-
onCancel: manager.current.cancel,
|
|
103
|
-
onClick: manager.current.select,
|
|
104
|
-
onNext: manager.current.nextRound,
|
|
105
|
-
onReload: manager.current.reload,
|
|
106
|
-
themeColor: config.theme ?? "light"
|
|
107
|
-
}) : null
|
|
108
|
-
})] });
|
|
109
|
-
return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)("div", {
|
|
110
|
-
className: "image-captcha",
|
|
111
|
-
children: [
|
|
112
|
-
honeypot,
|
|
113
|
-
/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_Modal.default, {
|
|
114
|
-
show: state.showModal,
|
|
115
|
-
placement: config.placement,
|
|
116
|
-
anchor: props.container,
|
|
117
|
-
onDismiss: manager.current.cancel,
|
|
118
|
-
dialogLabel: imageDialogLabel,
|
|
119
|
-
children: state.challenge ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_CaptchaComponent.default, {
|
|
120
|
-
challenge: state.challenge,
|
|
121
|
-
index: state.index,
|
|
122
|
-
solutions: state.solutions,
|
|
123
|
-
onSubmit: manager.current.submit,
|
|
124
|
-
onCancel: manager.current.cancel,
|
|
125
|
-
onClick: manager.current.select,
|
|
126
|
-
onNext: manager.current.nextRound,
|
|
127
|
-
onReload: manager.current.reload,
|
|
128
|
-
themeColor: config.theme ?? "light"
|
|
129
|
-
}) : /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("div", { children: "No challenge set." })
|
|
130
|
-
}),
|
|
131
|
-
/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(_prosopo_procaptcha_common.TestModeBanner, { siteKey: config.account.address ?? "" }),
|
|
132
|
-
/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(_prosopo_procaptcha_common.Checkbox, {
|
|
133
|
-
theme,
|
|
134
|
-
onChange: async (event) => {
|
|
135
|
-
if (!(0, _prosopo_procaptcha_common.isEventTrusted)(event)) return;
|
|
136
|
-
if (loading) return;
|
|
137
|
-
setLoading(true);
|
|
138
|
-
let x = 0;
|
|
139
|
-
let y = 0;
|
|
140
|
-
const nativeEvent = event.nativeEvent;
|
|
141
|
-
if ("clientX" in nativeEvent && "clientY" in nativeEvent) {
|
|
142
|
-
x = nativeEvent.clientX;
|
|
143
|
-
y = nativeEvent.clientY;
|
|
144
|
-
}
|
|
145
|
-
lastCoordsRef.current = {
|
|
146
|
-
x,
|
|
147
|
-
y
|
|
148
|
-
};
|
|
149
|
-
try {
|
|
150
|
-
await manager.current.start(x, y);
|
|
151
|
-
} catch (error) {
|
|
152
|
-
console.error("Error starting verification:", error);
|
|
153
|
-
} finally {
|
|
154
|
-
setLoading(false);
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
checked: state.isHuman,
|
|
158
|
-
labelText: isTranslationReady ? t("WIDGET.I_AM_HUMAN") : "",
|
|
159
|
-
error: state.error?.message,
|
|
160
|
-
"aria-label": "human checkbox",
|
|
161
|
-
loadingText: t("WIDGET.CHECKING", { defaultValue: "Checking that you are human" }),
|
|
162
|
-
loading
|
|
163
|
-
})
|
|
164
|
-
]
|
|
165
|
-
});
|
|
166
|
-
};
|
|
167
|
-
//#endregion
|
|
168
|
-
exports.default = ProcaptchaWidget;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
import { type ButtonHTMLAttributes } from "react";
|
|
3
|
-
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
themeColor: "light" | "dark";
|
|
5
|
-
buttonType: "cancel" | "next";
|
|
6
|
-
onClick: () => void;
|
|
7
|
-
text: string;
|
|
8
|
-
}
|
|
9
|
-
declare const Button: React.FC<ButtonProps>;
|
|
10
|
-
export default Button;
|
|
11
|
-
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAeA,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;AA8BD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAkFjC,CAAC;AACF,eAAe,MAAM,CAAC"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import addDataAttr from "../util/index.js";
|
|
2
|
-
import { isEventTrusted } from "@prosopo/procaptcha-common";
|
|
3
|
-
import { darkTheme, lightTheme, withAlpha } from "@prosopo/widget-skeleton";
|
|
4
|
-
import { useMemo, useState } from "react";
|
|
5
|
-
import { jsx } from "@emotion/react/jsx-runtime";
|
|
6
|
-
//#region src/components/Button.tsx
|
|
7
|
-
var buttonStyleBase = {
|
|
8
|
-
display: "inline-flex",
|
|
9
|
-
alignItems: "center",
|
|
10
|
-
justifyContent: "center",
|
|
11
|
-
position: "relative",
|
|
12
|
-
boxSizing: "border-box",
|
|
13
|
-
outline: "0px",
|
|
14
|
-
margin: "0px",
|
|
15
|
-
cursor: "pointer",
|
|
16
|
-
userSelect: "none",
|
|
17
|
-
verticalAlign: "middle",
|
|
18
|
-
appearance: void 0,
|
|
19
|
-
textDecoration: "none",
|
|
20
|
-
textTransform: "none",
|
|
21
|
-
minWidth: "64px",
|
|
22
|
-
minHeight: "40px",
|
|
23
|
-
borderRadius: "100px",
|
|
24
|
-
border: "none",
|
|
25
|
-
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, filter 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
26
|
-
backgroundColor: "transparent"
|
|
27
|
-
};
|
|
28
|
-
var Button = ({ themeColor, buttonType, text, onClick }) => {
|
|
29
|
-
const theme = useMemo(() => themeColor === "light" ? lightTheme : darkTheme, [themeColor]);
|
|
30
|
-
const [hover, setHover] = useState(false);
|
|
31
|
-
const [focusVisible, setFocusVisible] = useState(false);
|
|
32
|
-
const buttonStyle = useMemo(() => {
|
|
33
|
-
const baseStyle = {
|
|
34
|
-
...buttonStyleBase,
|
|
35
|
-
...theme.typography.labelLarge,
|
|
36
|
-
borderRadius: theme.shape.button,
|
|
37
|
-
fontFamily: theme.font.fontFamily,
|
|
38
|
-
width: "100%"
|
|
39
|
-
};
|
|
40
|
-
if (buttonType === "cancel") return {
|
|
41
|
-
...baseStyle,
|
|
42
|
-
padding: "8px 12px",
|
|
43
|
-
backgroundColor: hover ? withAlpha(theme.palette.primary.main, theme.stateLayer.hover) : "transparent",
|
|
44
|
-
color: theme.palette.primary.main
|
|
45
|
-
};
|
|
46
|
-
return {
|
|
47
|
-
...baseStyle,
|
|
48
|
-
padding: "8px 24px",
|
|
49
|
-
backgroundColor: theme.palette.primary.main,
|
|
50
|
-
color: theme.palette.primary.contrastText,
|
|
51
|
-
boxShadow: hover ? `inset 0 0 0 100px ${withAlpha(theme.palette.primary.contrastText, theme.stateLayer.hover)}` : theme.elevation.buttonPrimary
|
|
52
|
-
};
|
|
53
|
-
}, [
|
|
54
|
-
buttonType,
|
|
55
|
-
hover,
|
|
56
|
-
theme
|
|
57
|
-
]);
|
|
58
|
-
return /* @__PURE__ */ jsx("button", {
|
|
59
|
-
...addDataAttr({ dev: { cy: `button-${buttonType}` } }),
|
|
60
|
-
onMouseEnter: () => setHover(true),
|
|
61
|
-
onMouseLeave: () => setHover(false),
|
|
62
|
-
onFocus: (e) => setFocusVisible(e.target.matches(":focus-visible")),
|
|
63
|
-
onBlur: () => setFocusVisible(false),
|
|
64
|
-
style: {
|
|
65
|
-
...buttonStyle,
|
|
66
|
-
...focusVisible ? {
|
|
67
|
-
outline: `3px solid ${theme.palette.primary.main}`,
|
|
68
|
-
outlineOffset: "2px"
|
|
69
|
-
} : {}
|
|
70
|
-
},
|
|
71
|
-
onClick: (e) => {
|
|
72
|
-
if (!isEventTrusted(e)) return;
|
|
73
|
-
e.preventDefault();
|
|
74
|
-
onClick();
|
|
75
|
-
},
|
|
76
|
-
"aria-label": text,
|
|
77
|
-
children: text
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
//#endregion
|
|
81
|
-
export { Button as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE5E,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;IACpB,cAAc,EAAE,QAAQ;IACxB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,SAAS;IACjB,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,QAAQ;IACvB,UAAU,EAAE,SAAS;IACrB,cAAc,EAAE,MAAM;IAEtB,aAAa,EAAE,MAAM;IACrB,QAAQ,EAAE,MAAM;IAIhB,SAAS,EAAE,MAAM;IAEjB,YAAY,EAAE,OAAO;IACrB,MAAM,EAAE,MAAM;IACd,UAAU,EACT,yMAAyM;IAC1M,eAAe,EAAE,aAAa;CAC9B,CAAC;AAEF,MAAM,MAAM,GAA0B,CAAC,EACtC,UAAU,EACV,UAAU,EACV,IAAI,EACJ,OAAO,GACM,EAAE,EAAE;IACjB,MAAM,KAAK,GAAG,OAAO,CACpB,GAAG,EAAE,CAAC,CAAC,UAAU,KAAK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AAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;IACxC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,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,qDA+LvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { CaptchaWidget } from "./CaptchaWidget.js";
|
|
2
|
-
import addDataAttr from "../util/index.js";
|
|
3
|
-
import Button from "./Button.js";
|
|
4
|
-
import { ReloadButton } from "@prosopo/procaptcha-common";
|
|
5
|
-
import { darkTheme, lightTheme } from "@prosopo/widget-skeleton";
|
|
6
|
-
import { Suspense, useMemo } from "react";
|
|
7
|
-
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
8
|
-
import { useTranslation } from "@prosopo/locale";
|
|
9
|
-
import { at } from "@prosopo/util";
|
|
10
|
-
//#region src/components/CaptchaComponent.tsx
|
|
11
|
-
var CaptchaComponent = ({ challenge, index, solutions, onSubmit, onCancel, onClick, onNext, onReload, themeColor }) => {
|
|
12
|
-
const { t } = useTranslation();
|
|
13
|
-
const captcha = at(challenge.captchas, index, { noWrap: true });
|
|
14
|
-
const solution = at(solutions, index, { noWrap: true });
|
|
15
|
-
const theme = useMemo(() => themeColor === "light" ? lightTheme : darkTheme, [themeColor]);
|
|
16
|
-
const doubleSpacing = `${theme.spacing.unit * 2}px`;
|
|
17
|
-
const fullSpacing = `${theme.spacing.unit}px`;
|
|
18
|
-
return /* @__PURE__ */ jsx(Suspense, {
|
|
19
|
-
fallback: /* @__PURE__ */ jsx("div", { children: "Loading..." }),
|
|
20
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
21
|
-
style: {
|
|
22
|
-
overflowX: "auto",
|
|
23
|
-
overflowY: "auto",
|
|
24
|
-
maxWidth: "500px",
|
|
25
|
-
maxHeight: "100%",
|
|
26
|
-
display: "flex",
|
|
27
|
-
flexDirection: "column",
|
|
28
|
-
border: `1px solid ${theme.palette.border}`,
|
|
29
|
-
boxShadow: theme.elevation.card,
|
|
30
|
-
borderRadius: theme.shape.card,
|
|
31
|
-
backgroundColor: theme.palette.background.default,
|
|
32
|
-
userSelect: "none",
|
|
33
|
-
touchAction: "none",
|
|
34
|
-
overscrollBehavior: "none"
|
|
35
|
-
},
|
|
36
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
37
|
-
style: {
|
|
38
|
-
backgroundColor: theme.palette.background.default,
|
|
39
|
-
display: "flex",
|
|
40
|
-
flexDirection: "column",
|
|
41
|
-
minWidth: "300px",
|
|
42
|
-
marginLeft: fullSpacing,
|
|
43
|
-
marginRight: fullSpacing,
|
|
44
|
-
justifyContent: "center"
|
|
45
|
-
},
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ jsx("div", {
|
|
48
|
-
style: {
|
|
49
|
-
display: "flex",
|
|
50
|
-
alignItems: "center",
|
|
51
|
-
width: "100%"
|
|
52
|
-
},
|
|
53
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
54
|
-
style: {
|
|
55
|
-
backgroundColor: theme.palette.primaryContainer.main,
|
|
56
|
-
borderRadius: theme.shape.header,
|
|
57
|
-
width: "100%",
|
|
58
|
-
marginTop: fullSpacing
|
|
59
|
-
},
|
|
60
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
61
|
-
style: {
|
|
62
|
-
padding: "12px 14px",
|
|
63
|
-
fontFamily: theme.font.fontFamily
|
|
64
|
-
},
|
|
65
|
-
children: [/* @__PURE__ */ jsxs("p", {
|
|
66
|
-
style: {
|
|
67
|
-
...theme.typography.titleMedium,
|
|
68
|
-
color: theme.palette.primaryContainer.contrastText,
|
|
69
|
-
margin: 0
|
|
70
|
-
},
|
|
71
|
-
children: [
|
|
72
|
-
t("WIDGET.SELECT_ALL"),
|
|
73
|
-
":",
|
|
74
|
-
"\xA0",
|
|
75
|
-
/* @__PURE__ */ jsx("span", {
|
|
76
|
-
style: {
|
|
77
|
-
color: theme.palette.titleAccent,
|
|
78
|
-
fontWeight: 700
|
|
79
|
-
},
|
|
80
|
-
children: `${captcha.target} `
|
|
81
|
-
})
|
|
82
|
-
]
|
|
83
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
84
|
-
style: {
|
|
85
|
-
...theme.typography.bodyMedium,
|
|
86
|
-
color: theme.palette.onSurfaceVariant,
|
|
87
|
-
margin: "4px 0 0 0"
|
|
88
|
-
},
|
|
89
|
-
children: t("WIDGET.IF_NONE_CLICK_NEXT")
|
|
90
|
-
})]
|
|
91
|
-
})
|
|
92
|
-
})
|
|
93
|
-
}),
|
|
94
|
-
/* @__PURE__ */ jsx("div", {
|
|
95
|
-
...addDataAttr({ dev: { cy: `captcha-${index}` } }),
|
|
96
|
-
style: { overflow: "hidden" },
|
|
97
|
-
children: /* @__PURE__ */ jsx(CaptchaWidget, {
|
|
98
|
-
challenge: captcha,
|
|
99
|
-
solution,
|
|
100
|
-
onClick,
|
|
101
|
-
themeColor
|
|
102
|
-
})
|
|
103
|
-
}),
|
|
104
|
-
/* @__PURE__ */ jsx("div", {
|
|
105
|
-
style: {
|
|
106
|
-
display: "flex",
|
|
107
|
-
alignItems: "center",
|
|
108
|
-
justifyContent: "space-between",
|
|
109
|
-
lineHeight: 1.75,
|
|
110
|
-
padding: `${fullSpacing} 0 ${doubleSpacing} 0`
|
|
111
|
-
},
|
|
112
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
113
|
-
style: {
|
|
114
|
-
width: "100%",
|
|
115
|
-
height: "100%",
|
|
116
|
-
display: "flex",
|
|
117
|
-
flexDirection: "row",
|
|
118
|
-
justifyContent: "space-between",
|
|
119
|
-
gap: "10px"
|
|
120
|
-
},
|
|
121
|
-
children: [
|
|
122
|
-
/* @__PURE__ */ jsx("div", {
|
|
123
|
-
style: {
|
|
124
|
-
position: "relative",
|
|
125
|
-
flexGrow: 1,
|
|
126
|
-
flexBasis: "calc(33.333% - 10px)"
|
|
127
|
-
},
|
|
128
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
129
|
-
themeColor,
|
|
130
|
-
buttonType: "cancel",
|
|
131
|
-
onClick: onCancel,
|
|
132
|
-
text: t("WIDGET.CANCEL"),
|
|
133
|
-
"aria-label": t("WIDGET.CANCEL")
|
|
134
|
-
})
|
|
135
|
-
}),
|
|
136
|
-
/* @__PURE__ */ jsx("div", {
|
|
137
|
-
style: {
|
|
138
|
-
position: "relative",
|
|
139
|
-
flexGrow: 1,
|
|
140
|
-
flexBasis: "calc(33.333% - 10px)"
|
|
141
|
-
},
|
|
142
|
-
children: /* @__PURE__ */ jsx(ReloadButton, {
|
|
143
|
-
themeColor,
|
|
144
|
-
onReload
|
|
145
|
-
})
|
|
146
|
-
}),
|
|
147
|
-
/* @__PURE__ */ jsx("div", {
|
|
148
|
-
style: {
|
|
149
|
-
position: "relative",
|
|
150
|
-
flexGrow: 1,
|
|
151
|
-
flexBasis: "calc(33.333% - 10px)"
|
|
152
|
-
},
|
|
153
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
154
|
-
themeColor,
|
|
155
|
-
buttonType: "next",
|
|
156
|
-
text: index < challenge.captchas.length - 1 ? t("WIDGET.NEXT") : t("WIDGET.SUBMIT"),
|
|
157
|
-
onClick: index < challenge.captchas.length - 1 ? onNext : onSubmit,
|
|
158
|
-
"aria-label": index < challenge.captchas.length - 1 ? t("WIDGET.NEXT") : t("WIDGET.SUBMIT"),
|
|
159
|
-
"data-cy": "button-next"
|
|
160
|
-
})
|
|
161
|
-
})
|
|
162
|
-
]
|
|
163
|
-
})
|
|
164
|
-
})
|
|
165
|
-
]
|
|
166
|
-
})
|
|
167
|
-
})
|
|
168
|
-
});
|
|
169
|
-
};
|
|
170
|
-
//#endregion
|
|
171
|
-
export { CaptchaComponent as default };
|
|
@@ -1 +0,0 @@
|
|
|
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,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAcnD,MAAM,gBAAgB,GAAG,CAAC,EACzB,SAAS,EACT,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,MAAM,EACN,QAAQ,EACR,UAAU,GACa,EAAE,EAAE;IAC3B,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAK/B,MAAM,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAG,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,OAAO,CACpB,GAAG,EAAE,CAAC,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,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,IACD,GACD,IACD,GACD,GACI,CACX,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CaptchaWidget.d.ts","sourceRoot":"","sources":["../../src/components/CaptchaWidget.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,OAAO,EAAc,MAAM,gBAAgB,CAAC;AAM1D,MAAM,WAAW,kBAAkB;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACrC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,UAAU,EAAE,OAAO,GAAG,MAAM,CAAC;CAC7B;AAcD,eAAO,MAAM,aAAa,kDAKvB,kBAAkB,qDAqKpB,CAAC"}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { ProsopoDatasetError } from "@prosopo/common";
|
|
2
|
-
import { isEventTrusted } from "@prosopo/procaptcha-common";
|
|
3
|
-
import { darkTheme, lightTheme } from "@prosopo/widget-skeleton";
|
|
4
|
-
import { useMemo, useState } from "react";
|
|
5
|
-
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
6
|
-
//#region src/components/CaptchaWidget.tsx
|
|
7
|
-
var getHash = (item) => {
|
|
8
|
-
if (!item.hash) throw new ProsopoDatasetError("CAPTCHA.MISSING_ITEM_HASH", { context: { item } });
|
|
9
|
-
return item.hash;
|
|
10
|
-
};
|
|
11
|
-
var CaptchaWidget = ({ challenge, solution, onClick, themeColor }) => {
|
|
12
|
-
const items = challenge.items;
|
|
13
|
-
const theme = useMemo(() => themeColor === "light" ? lightTheme : darkTheme, [themeColor]);
|
|
14
|
-
const [focusedHash, setFocusedHash] = useState(null);
|
|
15
|
-
const fullSpacing = `${theme.spacing.unit}px`;
|
|
16
|
-
return /* @__PURE__ */ jsx("div", {
|
|
17
|
-
style: {
|
|
18
|
-
width: "100%",
|
|
19
|
-
height: "100%",
|
|
20
|
-
display: "flex",
|
|
21
|
-
flexDirection: "row",
|
|
22
|
-
flexWrap: "wrap",
|
|
23
|
-
justifyContent: "space-between",
|
|
24
|
-
paddingBottom: fullSpacing,
|
|
25
|
-
paddingTop: fullSpacing,
|
|
26
|
-
gap: "10px"
|
|
27
|
-
},
|
|
28
|
-
children: items.map((item, index) => {
|
|
29
|
-
const hash = getHash(item);
|
|
30
|
-
const selected = solution.some((s) => s[0] === hash);
|
|
31
|
-
return /* @__PURE__ */ jsx("div", {
|
|
32
|
-
style: {
|
|
33
|
-
flexGrow: 1,
|
|
34
|
-
flexBasis: "calc(33.333% - 10px)",
|
|
35
|
-
boxSizing: "border-box"
|
|
36
|
-
},
|
|
37
|
-
children: /* @__PURE__ */ jsxs("button", {
|
|
38
|
-
type: "button",
|
|
39
|
-
"aria-pressed": selected,
|
|
40
|
-
style: {
|
|
41
|
-
position: "relative",
|
|
42
|
-
cursor: "pointer",
|
|
43
|
-
height: "100%",
|
|
44
|
-
width: "100%",
|
|
45
|
-
padding: 0,
|
|
46
|
-
margin: 0,
|
|
47
|
-
border: "none",
|
|
48
|
-
background: "none",
|
|
49
|
-
appearance: "none",
|
|
50
|
-
display: "block",
|
|
51
|
-
...focusedHash === hash ? {
|
|
52
|
-
outline: `3px solid ${theme.palette.primary.main}`,
|
|
53
|
-
outlineOffset: "2px"
|
|
54
|
-
} : { outline: "none" }
|
|
55
|
-
},
|
|
56
|
-
onFocus: (e) => setFocusedHash(e.target.matches(":focus-visible") ? hash : null),
|
|
57
|
-
onBlur: () => setFocusedHash(null),
|
|
58
|
-
onClick: (e) => {
|
|
59
|
-
if (!isEventTrusted(e)) return;
|
|
60
|
-
onClick(hash, e.clientX, e.clientY);
|
|
61
|
-
},
|
|
62
|
-
children: [/* @__PURE__ */ jsx("img", {
|
|
63
|
-
style: {
|
|
64
|
-
width: "100%",
|
|
65
|
-
display: "block",
|
|
66
|
-
objectFit: "cover",
|
|
67
|
-
aspectRatio: "1/1",
|
|
68
|
-
height: "auto",
|
|
69
|
-
overflow: "hidden",
|
|
70
|
-
borderStyle: "solid",
|
|
71
|
-
borderWidth: "1px",
|
|
72
|
-
borderColor: theme.palette.tile.border,
|
|
73
|
-
borderRadius: selected ? theme.shape.tileSelected : theme.shape.tile,
|
|
74
|
-
transform: selected ? "scale(0.9)" : "none",
|
|
75
|
-
transition: "transform 200ms cubic-bezier(0.2, 0, 0, 1), border-radius 200ms"
|
|
76
|
-
},
|
|
77
|
-
src: item.data,
|
|
78
|
-
alt: `Captcha image ${index + 1}`,
|
|
79
|
-
onError: (e) => {
|
|
80
|
-
const target = e.currentTarget;
|
|
81
|
-
const retryCount = Number(target.dataset.retryCount ?? "0") + 1;
|
|
82
|
-
target.dataset.retryCount = String(retryCount);
|
|
83
|
-
if (retryCount <= 3) target.src = `${item.data}?retry=${Date.now()}`;
|
|
84
|
-
}
|
|
85
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
86
|
-
style: {
|
|
87
|
-
position: "absolute",
|
|
88
|
-
top: 0,
|
|
89
|
-
left: 0,
|
|
90
|
-
bottom: 0,
|
|
91
|
-
right: 0,
|
|
92
|
-
height: "100%",
|
|
93
|
-
width: "100%",
|
|
94
|
-
display: "flex",
|
|
95
|
-
alignItems: "center",
|
|
96
|
-
justifyContent: "center",
|
|
97
|
-
backgroundColor: theme.palette.overlay,
|
|
98
|
-
borderRadius: theme.shape.tileSelected,
|
|
99
|
-
visibility: selected ? "visible" : "hidden"
|
|
100
|
-
},
|
|
101
|
-
children: /* @__PURE__ */ jsx("svg", {
|
|
102
|
-
style: {
|
|
103
|
-
backgroundColor: theme.palette.checkbox.fill,
|
|
104
|
-
display: "block",
|
|
105
|
-
width: "34px",
|
|
106
|
-
height: "34px",
|
|
107
|
-
padding: "7px",
|
|
108
|
-
borderRadius: "50%",
|
|
109
|
-
boxSizing: "border-box",
|
|
110
|
-
transition: "fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
111
|
-
userSelect: "none",
|
|
112
|
-
fill: theme.palette.checkbox.tick
|
|
113
|
-
},
|
|
114
|
-
focusable: "false",
|
|
115
|
-
color: "#fff",
|
|
116
|
-
"aria-hidden": "true",
|
|
117
|
-
viewBox: "0 0 24 24",
|
|
118
|
-
"data-testid": "CheckIcon",
|
|
119
|
-
"aria-label": "Check icon",
|
|
120
|
-
children: /* @__PURE__ */ jsx("path", { d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })
|
|
121
|
-
})
|
|
122
|
-
})]
|
|
123
|
-
})
|
|
124
|
-
}, item.hash);
|
|
125
|
-
})
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
|
-
//#endregion
|
|
129
|
-
export { CaptchaWidget };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CaptchaWidget.js","sourceRoot":"","sources":["../../src/components/CaptchaWidget.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGjE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAY1C,MAAM,OAAO,GAAG,CAAC,IAAgB,EAAU,EAAE;IAC5C,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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,EAAE,MAAM;oCACd,OAAO,EAAE,KAAK;oCACd,YAAY,EAAE,KAAK;oCACnB,SAAS,EAAE,YAAY;oCACvB,UAAU,EAAE,6CAA6C;oCACzD,UAAU,EAAE,MAAM;oCAClB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI;iCACjC,EACD,SAAS,EAAC,OAAO,EACjB,KAAK,EAAC,MAAM,iBACA,MAAM,EAClB,OAAO,EAAC,WAAW,iBACP,WAAW,gBACZ,YAAY,YAEvB,eAAM,CAAC,EAAC,mDAAmD,GAAG,GACzD,GACD,IACE,IAxHmB,IAAI,CAAC,IAAI,CAyHhC,CACN,CAAC;QACH,CAAC,CAAC,GACG,CACN,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { PlacementType } from "@prosopo/types";
|
|
2
|
-
import React from "react";
|
|
3
|
-
type ModalProps = {
|
|
4
|
-
show: boolean;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
placement?: PlacementType;
|
|
7
|
-
anchor?: HTMLElement | null;
|
|
8
|
-
onDismiss?: () => void;
|
|
9
|
-
dialogLabel?: string;
|
|
10
|
-
};
|
|
11
|
-
declare const ModalComponent: React.MemoExoticComponent<(props: ModalProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
|
|
12
|
-
export default ModalComponent;
|
|
13
|
-
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,UAAU,GAAG;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAGF,QAAA,MAAM,cAAc,oCAAsB,UAAU,sDA6BlD,CAAC;AAIH,eAAe,cAAc,CAAC"}
|
package/dist/components/Modal.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ChallengeSurface } from "@prosopo/procaptcha-common";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { jsx } from "@emotion/react/jsx-runtime";
|
|
4
|
-
//#region src/components/Modal.tsx
|
|
5
|
-
/** The image captcha's dialog frame; positioning lives in `ChallengeSurface`. */
|
|
6
|
-
var ModalComponent = React.memo((props) => {
|
|
7
|
-
const { show, children, placement, anchor, onDismiss, dialogLabel } = props;
|
|
8
|
-
return /* @__PURE__ */ jsx(ChallengeSurface, {
|
|
9
|
-
show,
|
|
10
|
-
placement,
|
|
11
|
-
anchor,
|
|
12
|
-
onDismiss,
|
|
13
|
-
scrim: "none",
|
|
14
|
-
className: "prosopo-modalOuter",
|
|
15
|
-
dialogLabel,
|
|
16
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
17
|
-
className: "prosopo-modalInner",
|
|
18
|
-
style: {
|
|
19
|
-
maxWidth: "500px",
|
|
20
|
-
maxHeight: "100%",
|
|
21
|
-
backgroundColor: "transparent",
|
|
22
|
-
border: "none",
|
|
23
|
-
borderRadius: "28px",
|
|
24
|
-
alignSelf: "center",
|
|
25
|
-
boxSizing: "border-box"
|
|
26
|
-
},
|
|
27
|
-
children
|
|
28
|
-
})
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
ModalComponent.displayName = "ModalComponent";
|
|
32
|
-
//#endregion
|
|
33
|
-
export { ModalComponent as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,KAAiB,EAAE,EAAE;IACvD,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAE5E,OAAO,CACN,KAAC,gBAAgB,IAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,KAAK,EAAC,MAAM,EACZ,SAAS,EAAC,oBAAoB,EAC9B,WAAW,EAAE,WAAW,YAExB,cACC,SAAS,EAAC,oBAAoB,EAC9B,KAAK,EAAE;gBACN,QAAQ,EAAE,OAAO;gBACjB,SAAS,EAAE,MAAM;gBACjB,eAAe,EAAE,aAAa;gBAC9B,MAAM,EAAE,MAAM;gBACd,YAAY,EAAE,MAAM;gBACpB,SAAS,EAAE,QAAQ;gBACnB,SAAS,EAAE,YAAY;aACvB,YAEA,QAAQ,GACJ,GACY,CACnB,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC;AAE9C,eAAe,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Procaptcha.d.ts","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAStD,QAAA,MAAM,UAAU,UAAW,eAAe,qDAIzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|