@prosopo/procaptcha-pow 0.3.1 → 0.3.3
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/Services/Manager.d.ts +3 -20
- package/dist/Services/Manager.d.ts.map +1 -1
- package/dist/Services/Manager.js +87 -23
- package/dist/Services/Manager.js.map +1 -1
- package/dist/Services/SolverService.d.ts.map +1 -1
- package/dist/Services/SolverService.js.map +1 -1
- package/dist/cjs/Services/Manager.cjs +102 -39
- package/dist/cjs/account/dist/extension/ExtensionWeb3.cjs +28 -0
- package/dist/cjs/account/dist/index.cjs +2 -0
- package/dist/cjs/components/Captcha.cjs +51 -121
- package/dist/cjs/components/ProcaptchaPoW.cjs +4 -2
- package/dist/cjs/web-components/dist/CaptchaPlaceholder.cjs +13 -55
- package/dist/cjs/web-components/dist/Checkbox.cjs +21 -11
- package/dist/cjs/web-components/dist/Containers.cjs +42 -0
- package/dist/cjs/web-components/dist/LoadingSpinner.cjs +4 -0
- package/dist/cjs/web-components/dist/Logo.cjs +16 -0
- package/dist/cjs/web-components/dist/LogoWithText.cjs +10 -0
- package/dist/cjs/web-components/dist/LogoWithoutText.cjs +10 -0
- package/dist/cjs/web-components/dist/WidgetConstants.cjs +12 -0
- package/dist/cjs/web-components/dist/index.cjs +11 -0
- package/dist/components/Captcha.d.ts +1 -17
- package/dist/components/Captcha.d.ts.map +1 -1
- package/dist/components/Captcha.js +32 -80
- package/dist/components/Captcha.js.map +1 -1
- package/dist/components/ProcaptchaPoW.d.ts +4 -2
- package/dist/components/ProcaptchaPoW.d.ts.map +1 -1
- package/dist/components/ProcaptchaPoW.js +1 -1
- package/dist/components/ProcaptchaPoW.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/vite.cjs.config.ts +13 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
-
require("../web-components/dist/index.cjs");
|
|
5
4
|
const react = require("react");
|
|
5
|
+
require("../web-components/dist/index.cjs");
|
|
6
6
|
const CaptchaPlaceholder = require("../web-components/dist/CaptchaPlaceholder.cjs");
|
|
7
7
|
const _interopNamespaceDefaultOnly = (e) => Object.freeze(Object.defineProperty({ __proto__: null, default: e }, Symbol.toStringTag, { value: "Module" }));
|
|
8
|
-
const ProcaptchaWidget = react.lazy(
|
|
8
|
+
const ProcaptchaWidget = react.lazy(
|
|
9
|
+
async () => Promise.resolve().then(() => /* @__PURE__ */ _interopNamespaceDefaultOnly(require("./Captcha.cjs")))
|
|
10
|
+
);
|
|
9
11
|
const ProcaptchaPow = (props) => /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(CaptchaPlaceholder.ProcaptchaPlaceholder, { darkMode: props.config.theme }), children: /* @__PURE__ */ jsxRuntime.jsx(ProcaptchaWidget, { config: props.config, callbacks: props.callbacks }) });
|
|
10
12
|
exports.ProcaptchaPow = ProcaptchaPow;
|
|
@@ -1,64 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
+
const Containers = require("./Containers.cjs");
|
|
4
5
|
const LoadingSpinner = require("./LoadingSpinner.cjs");
|
|
5
|
-
const
|
|
6
|
+
const WidgetConstants = require("./WidgetConstants.cjs");
|
|
6
7
|
const theme = require("./theme.cjs");
|
|
7
|
-
const
|
|
8
|
-
const logoStyle = react.css`
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: flex-end;
|
|
11
|
-
display: flex;
|
|
12
|
-
padding: 8px;
|
|
13
|
-
|
|
14
|
-
@media (max-width: 245px) {
|
|
15
|
-
&:nth-of-type(1),
|
|
16
|
-
&:nth-of-type(2) {
|
|
17
|
-
display: none;
|
|
18
|
-
} /* Both logos hidden */
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@media (min-width: 245px) and (max-width: 400px) {
|
|
22
|
-
&:nth-of-type(1) {
|
|
23
|
-
display: flex;
|
|
24
|
-
} /* logoWithText */
|
|
25
|
-
&:nth-of-type(2) {
|
|
26
|
-
display: none;
|
|
27
|
-
} /* logoWithoutText */
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@media (min-width: 401px) {
|
|
31
|
-
&:nth-of-type(1) {
|
|
32
|
-
display: none;
|
|
33
|
-
} /* logoWithText */
|
|
34
|
-
&:nth-of-type(2) {
|
|
35
|
-
display: flex;
|
|
36
|
-
} /* logoWithoutText */
|
|
37
|
-
}
|
|
38
|
-
`;
|
|
8
|
+
const Logo = require("./Logo.cjs");
|
|
39
9
|
const ProcaptchaPlaceholder = (props) => {
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return jsxRuntime.jsx("div", { children: jsxRuntime.jsx("div", { style: { maxWidth: "100%", maxHeight: "100%", overflowX: "auto" }, children: jsxRuntime.jsxs("div", { style: styleWidth, "data-cy": "button-human", children: [" ", jsxRuntime.jsxs("div", { style: {
|
|
45
|
-
padding: "8px",
|
|
10
|
+
const themeColor = props.darkMode === "light" ? "light" : "dark";
|
|
11
|
+
const theme$1 = props.darkMode === "light" ? theme.lightTheme : theme.darkTheme;
|
|
12
|
+
return jsxRuntime.jsx("div", { children: jsxRuntime.jsx("div", { style: { maxWidth: "100%", maxHeight: "100%", overflowX: "auto" }, children: jsxRuntime.jsx(Containers.ContainerDiv, { children: jsxRuntime.jsx(Containers.WidthBasedStylesDiv, { children: jsxRuntime.jsxs("div", { style: WidgetConstants.WIDGET_DIMENSIONS, "data-cy": "button-human", children: [" ", jsxRuntime.jsxs("div", { style: {
|
|
13
|
+
padding: "2px",
|
|
46
14
|
border: "1px solid",
|
|
47
15
|
backgroundColor: theme$1.palette.background.default,
|
|
48
16
|
borderColor: theme$1.palette.grey[300],
|
|
49
17
|
borderRadius: "8px",
|
|
50
18
|
display: "flex",
|
|
51
|
-
justifyContent: "space-between",
|
|
52
19
|
alignItems: "center",
|
|
53
|
-
flexWrap: "wrap"
|
|
20
|
+
flexWrap: "wrap",
|
|
21
|
+
justifyContent: "space-between",
|
|
22
|
+
minHeight: `${WidgetConstants.WIDGET_INNER_HEIGHT}px`,
|
|
23
|
+
overflow: "hidden"
|
|
54
24
|
}, children: [jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column" }, children: jsxRuntime.jsx("div", { style: {
|
|
55
|
-
display: "flex",
|
|
56
|
-
justifyContent: "flex-start",
|
|
57
25
|
alignItems: "center",
|
|
58
|
-
|
|
26
|
+
flex: 1
|
|
59
27
|
}, children: jsxRuntime.jsx("div", { style: {
|
|
60
|
-
height: "50px",
|
|
61
|
-
width: "50px",
|
|
62
28
|
display: "flex",
|
|
63
29
|
alignItems: "center",
|
|
64
30
|
justifyContent: "center",
|
|
@@ -66,14 +32,6 @@ const ProcaptchaPlaceholder = (props) => {
|
|
|
66
32
|
verticalAlign: "middle"
|
|
67
33
|
}, children: jsxRuntime.jsx("div", { style: {
|
|
68
34
|
display: "flex"
|
|
69
|
-
}, children: jsxRuntime.jsx("div", { style: {
|
|
70
|
-
__html: darkMode === "light" ? logoWithoutTextBlack : logoWithoutTextWhite
|
|
71
|
-
} }), jsxRuntime.jsx("div", { css: logoStyle, dangerouslySetInnerHTML: {
|
|
72
|
-
__html: darkMode === "light" ? logoWithTextBlack : logoWithTextWhite
|
|
73
|
-
} })] }) }) }) })] })] }) }) });
|
|
35
|
+
}, children: jsxRuntime.jsx("div", { style: { display: "inline-flex" }, children: jsxRuntime.jsx(LoadingSpinner.LoadingSpinner, { themeColor }) }) }) }) }) }), jsxRuntime.jsx("div", { style: { display: "inline-flex", flexDirection: "column" }, children: jsxRuntime.jsx("a", { href: WidgetConstants.WIDGET_URL, target: "_blank", "aria-label": WidgetConstants.WIDGET_URL_TEXT, children: jsxRuntime.jsx("div", { style: { flex: 1 }, children: jsxRuntime.jsx(Logo, { themeColor }) }) }) })] })] }) }) }) }) });
|
|
74
36
|
};
|
|
75
|
-
const logoWithTextBlack = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2062.63 468.67" height="35px" width="140px"><defs><style>.cls-1{fill:#1d1d1b;}</style></defs><title>Prosopo Logo Black</title><path class="cls-1" d="M335.55,1825.19A147.75,147.75,0,0,1,483.3,1972.94h50.5c0-109.49-88.76-198.25-198.25-198.25v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M269.36,1891.39A147.74,147.74,0,0,1,417.1,2039.13h50.5c0-109.49-88.75-198.24-198.24-198.24v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M414,2157.17a147.75,147.75,0,0,1-147.74-147.74h-50.5c0,109.49,88.75,198.24,198.24,198.24v-50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M480.17,2091a147.74,147.74,0,0,1-147.74-147.75H281.92c0,109.49,88.76,198.25,198.25,198.25V2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M862.8,2017.5q-27.39,22.86-78.25,22.86h-65v112.19H654.82v-312h134q46.32,0,73.86,24.13t27.55,74.72Q890.2,1994.64,862.8,2017.5ZM813,1905.1q-12.37-10.36-34.7-10.38H719.59v91.87h58.75q22.32,0,34.7-11.22t12.39-35.56Q825.43,1915.48,813,1905.1Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1045.69,1916.42c.78.08,2.51.19,5.19.32v61.81c-3.81-.42-7.2-.71-10.16-.85s-5.36-.21-7.2-.21q-36.4,0-48.89,23.71-7,13.33-7,41.06v110.29H916.89V1921.82h57.58V1962q14-23.07,24.34-31.54,16.94-14.18,44-14.18C1044,1916.32,1044.92,1916.35,1045.69,1916.42Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1265.64,2124.32q-29.21,36.06-88.69,36.06t-88.69-36.06Q1059,2088.26,1059,2037.5q0-49.9,29.22-86.5t88.69-36.59q59.47,0,88.69,36.59t29.21,86.5Q1294.85,2088.26,1265.64,2124.32ZM1217.38,2091q14.17-18.81,14.18-53.48t-14.18-53.37q-14.19-18.7-40.64-18.71T1136,1984.13q-14.29,18.72-14.29,53.37T1136,2091q14.28,18.81,40.75,18.81T1217.38,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1371.81,2078.88q1.92,16.1,8.29,22.87,11.28,12.06,41.7,12.06,17.85,0,28.39-5.29t10.53-15.88a17.12,17.12,0,0,0-8.48-15.45q-8.49-5.28-63.12-18.2-39.33-9.73-55.41-24.35-16.08-14.39-16.09-41.49,0-32,25.14-54.93t70.75-23q43.26,0,70.53,17.25t31.29,59.59H1455q-1.27-11.64-6.58-18.42-10-12.27-34-12.28-19.74,0-28.13,6.14t-8.38,14.4c0,6.91,3,11.93,8.92,15q8.89,4.89,63,16.73,36,8.46,54.05,25.61,17.77,17.35,17.78,43.39,0,34.3-25.56,56t-79,21.7q-54.51,0-80.49-23t-26-58.53Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1745.54,2124.32q-29.22,36.06-88.7,36.06t-88.69-36.06q-29.2-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.7,36.59t29.21,86.5Q1774.75,2088.26,1745.54,2124.32ZM1697.27,2091q14.19-18.81,14.19-53.48t-14.19-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.28,53.37t14.28,53.48q14.3,18.81,40.75,18.81T1697.27,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1992.75,1946.59q28.24,29.84,28.23,87.63,0,61-27.58,92.93t-71.06,32q-27.69,0-46-13.76-10-7.62-19.6-22.23v120.24H1797V1921.82h57.79v34.08q9.79-15,20.88-23.71,20.23-15.43,48.15-15.45Q1964.53,1916.74,1992.75,1946.59Zm-46.3,43.39q-12.3-20.52-39.88-20.53-33.15,0-45.54,31.11-6.43,16.51-6.42,41.92,0,40.21,21.58,56.51,12.82,9.53,30.37,9.53,25.45,0,38.83-19.48t13.36-51.86Q1958.75,2010.51,1946.45,1990Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M2249.14,2124.32q-29.2,36.06-88.69,36.06t-88.69-36.06q-29.22-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.69,36.59t29.22,86.5Q2278.36,2088.26,2249.14,2124.32ZM2200.88,2091q14.19-18.81,14.18-53.48t-14.18-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.29,53.37t14.29,53.48q14.3,18.81,40.75,18.81T2200.88,2091Z" transform="translate(-215.73 -1774.69)"/></svg>';
|
|
76
|
-
const logoWithTextWhite = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2062.63 468.67" height="35px" width="140px"><defs><style>.cls-1{fill:#fff;}</style></defs><title>Prosopo Logo Black</title><path class="cls-1" d="M335.55,1825.19A147.75,147.75,0,0,1,483.3,1972.94h50.5c0-109.49-88.76-198.25-198.25-198.25v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M269.36,1891.39A147.74,147.74,0,0,1,417.1,2039.13h50.5c0-109.49-88.75-198.24-198.24-198.24v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M414,2157.17a147.75,147.75,0,0,1-147.74-147.74h-50.5c0,109.49,88.75,198.24,198.24,198.24v-50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M480.17,2091a147.74,147.74,0,0,1-147.74-147.75H281.92c0,109.49,88.76,198.25,198.25,198.25V2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M862.8,2017.5q-27.39,22.86-78.25,22.86h-65v112.19H654.82v-312h134q46.32,0,73.86,24.13t27.55,74.72Q890.2,1994.64,862.8,2017.5ZM813,1905.1q-12.37-10.36-34.7-10.38H719.59v91.87h58.75q22.32,0,34.7-11.22t12.39-35.56Q825.43,1915.48,813,1905.1Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1045.69,1916.42c.78.08,2.51.19,5.19.32v61.81c-3.81-.42-7.2-.71-10.16-.85s-5.36-.21-7.2-.21q-36.4,0-48.89,23.71-7,13.33-7,41.06v110.29H916.89V1921.82h57.58V1962q14-23.07,24.34-31.54,16.94-14.18,44-14.18C1044,1916.32,1044.92,1916.35,1045.69,1916.42Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1265.64,2124.32q-29.21,36.06-88.69,36.06t-88.69-36.06Q1059,2088.26,1059,2037.5q0-49.9,29.22-86.5t88.69-36.59q59.47,0,88.69,36.59t29.21,86.5Q1294.85,2088.26,1265.64,2124.32ZM1217.38,2091q14.17-18.81,14.18-53.48t-14.18-53.37q-14.19-18.7-40.64-18.71T1136,1984.13q-14.29,18.72-14.29,53.37T1136,2091q14.28,18.81,40.75,18.81T1217.38,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1371.81,2078.88q1.92,16.1,8.29,22.87,11.28,12.06,41.7,12.06,17.85,0,28.39-5.29t10.53-15.88a17.12,17.12,0,0,0-8.48-15.45q-8.49-5.28-63.12-18.2-39.33-9.73-55.41-24.35-16.08-14.39-16.09-41.49,0-32,25.14-54.93t70.75-23q43.26,0,70.53,17.25t31.29,59.59H1455q-1.27-11.64-6.58-18.42-10-12.27-34-12.28-19.74,0-28.13,6.14t-8.38,14.4c0,6.91,3,11.93,8.92,15q8.89,4.89,63,16.73,36,8.46,54.05,25.61,17.77,17.35,17.78,43.39,0,34.3-25.56,56t-79,21.7q-54.51,0-80.49-23t-26-58.53Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1745.54,2124.32q-29.22,36.06-88.7,36.06t-88.69-36.06q-29.2-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.7,36.59t29.21,86.5Q1774.75,2088.26,1745.54,2124.32ZM1697.27,2091q14.19-18.81,14.19-53.48t-14.19-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.28,53.37t14.28,53.48q14.3,18.81,40.75,18.81T1697.27,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1992.75,1946.59q28.24,29.84,28.23,87.63,0,61-27.58,92.93t-71.06,32q-27.69,0-46-13.76-10-7.62-19.6-22.23v120.24H1797V1921.82h57.79v34.08q9.79-15,20.88-23.71,20.23-15.43,48.15-15.45Q1964.53,1916.74,1992.75,1946.59Zm-46.3,43.39q-12.3-20.52-39.88-20.53-33.15,0-45.54,31.11-6.43,16.51-6.42,41.92,0,40.21,21.58,56.51,12.82,9.53,30.37,9.53,25.45,0,38.83-19.48t13.36-51.86Q1958.75,2010.51,1946.45,1990Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M2249.14,2124.32q-29.2,36.06-88.69,36.06t-88.69-36.06q-29.22-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.69,36.59t29.22,86.5Q2278.36,2088.26,2249.14,2124.32ZM2200.88,2091q14.19-18.81,14.18-53.48t-14.18-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.29,53.37t14.29,53.48q14.3,18.81,40.75,18.81T2200.88,2091Z" transform="translate(-215.73 -1774.69)"/></svg>';
|
|
77
|
-
const logoWithoutTextWhite = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 260 348" height="35px"><path id="Vector" d="M95.7053 40.2707C127.005 40.2707 157.022 52.6841 179.154 74.78C201.286 96.8759 213.719 126.844 213.719 158.093H254.056C254.056 70.7808 183.16 -4.57764e-05 95.7053 -4.57764e-05V40.2707Z" fill="#fff"/><path id="Vector_2" d="M42.8365 93.0614C58.3333 93.0614 73.6784 96.1087 87.9955 102.029C102.313 107.95 115.322 116.628 126.279 127.568C137.237 138.508 145.93 151.496 151.86 165.79C157.79 180.084 160.843 195.404 160.843 210.875H201.179C201.179 123.564 130.291 52.7906 42.8365 52.7906V93.0614Z" fill="#fff"/><path id="Vector_3" d="M158.367 305.005C127.07 305.003 97.056 292.59 74.926 270.496C52.796 248.402 40.3626 218.437 40.3604 187.191H0.0239563C0.0239563 274.503 70.9123 345.276 158.367 345.276V305.005Z" fill="#fff"/><path id="Vector_4" d="M211.219 252.239C195.722 252.239 180.376 249.191 166.059 243.27C151.741 237.349 138.732 228.67 127.774 217.729C116.816 206.788 108.123 193.799 102.194 179.505C96.2637 165.21 93.2121 149.889 93.2132 134.417H52.8687C52.8687 221.729 123.765 292.509 211.219 292.509V252.239Z" fill="#fff"/></g><defs><clipPath id="clip0_1_2"><rect width="254" height="345" fill="white"/></clipPath></defs></svg>';
|
|
78
|
-
const logoWithoutTextBlack = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 260 348" height="35px"><path id="Vector" d="M95.7053 40.2707C127.005 40.2707 157.022 52.6841 179.154 74.78C201.286 96.8759 213.719 126.844 213.719 158.093H254.056C254.056 70.7808 183.16 -4.57764e-05 95.7053 -4.57764e-05V40.2707Z" fill="#000000"/><path id="Vector_2" d="M42.8365 93.0614C58.3333 93.0614 73.6784 96.1087 87.9955 102.029C102.313 107.95 115.322 116.628 126.279 127.568C137.237 138.508 145.93 151.496 151.86 165.79C157.79 180.084 160.843 195.404 160.843 210.875H201.179C201.179 123.564 130.291 52.7906 42.8365 52.7906V93.0614Z" fill="#000000"/><path id="Vector_3" d="M158.367 305.005C127.07 305.003 97.056 292.59 74.926 270.496C52.796 248.402 40.3626 218.437 40.3604 187.191H0.0239563C0.0239563 274.503 70.9123 345.276 158.367 345.276V305.005Z" fill="#000000"/><path id="Vector_4" d="M211.219 252.239C195.722 252.239 180.376 249.191 166.059 243.27C151.741 237.349 138.732 228.67 127.774 217.729C116.816 206.788 108.123 193.799 102.194 179.505C96.2637 165.21 93.2121 149.889 93.2132 134.417H52.8687C52.8687 221.729 123.765 292.509 211.219 292.509V252.239Z" fill="#000000"/></g><defs><clipPath id="clip0_1_2"><rect width="254" height="345" fill="white"/></clipPath></defs></svg>';
|
|
79
37
|
exports.ProcaptchaPlaceholder = ProcaptchaPlaceholder;
|
|
@@ -5,16 +5,16 @@ const react = require("@emotion/react");
|
|
|
5
5
|
const theme = require("./theme.cjs");
|
|
6
6
|
const react$1 = require("react");
|
|
7
7
|
const checkboxBefore = react.css`{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
&:before {
|
|
9
|
+
content: '""';
|
|
10
|
+
position: absolute;
|
|
11
|
+
height: 100%;
|
|
12
|
+
width: 100%;
|
|
13
|
+
}
|
|
14
14
|
}`;
|
|
15
15
|
const baseStyle = {
|
|
16
|
-
width: "
|
|
17
|
-
height: "
|
|
16
|
+
width: "28px",
|
|
17
|
+
height: "28px",
|
|
18
18
|
top: "auto",
|
|
19
19
|
left: "auto",
|
|
20
20
|
opacity: "1",
|
|
@@ -25,7 +25,7 @@ const baseStyle = {
|
|
|
25
25
|
borderStyle: "solid",
|
|
26
26
|
borderWidth: "1px"
|
|
27
27
|
};
|
|
28
|
-
const Checkbox = ({ themeColor, onChange, checked }) => {
|
|
28
|
+
const Checkbox = ({ themeColor, onChange, checked, labelText }) => {
|
|
29
29
|
const theme$1 = react$1.useMemo(() => themeColor === "light" ? theme.lightTheme : theme.darkTheme, [themeColor]);
|
|
30
30
|
const checkboxStyleBase = {
|
|
31
31
|
...baseStyle,
|
|
@@ -36,10 +36,20 @@ const Checkbox = ({ themeColor, onChange, checked }) => {
|
|
|
36
36
|
return {
|
|
37
37
|
...checkboxStyleBase,
|
|
38
38
|
borderColor: hover ? theme$1.palette.background.contrastText : theme$1.palette.grey[400],
|
|
39
|
-
appearance: checked ? "auto" : "none"
|
|
39
|
+
appearance: checked ? "auto" : "none",
|
|
40
|
+
flex: 1,
|
|
41
|
+
margin: "0 15px"
|
|
40
42
|
};
|
|
41
43
|
}, [hover, theme$1, checked]);
|
|
42
|
-
|
|
44
|
+
const id = react$1.useId();
|
|
45
|
+
return jsxRuntime.jsxs("span", { style: { display: "inline-flex" }, children: [jsxRuntime.jsx("input", { name: id, onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), css: checkboxBefore, type: "checkbox", "aria-live": "assertive", "aria-haspopup": "true", onChange, checked, style: checkboxStyle }), jsxRuntime.jsx("label", { css: {
|
|
46
|
+
color: theme$1.palette.background.contrastText,
|
|
47
|
+
position: "relative",
|
|
48
|
+
display: "flex",
|
|
49
|
+
cursor: "pointer",
|
|
50
|
+
userSelect: "none",
|
|
51
|
+
top: "4px"
|
|
52
|
+
}, htmlFor: id, children: labelText })] });
|
|
43
53
|
};
|
|
44
54
|
exports.Checkbox = Checkbox;
|
|
45
55
|
exports.default = Checkbox;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const WidgetConstants = require("./WidgetConstants.cjs");
|
|
4
|
+
const styled = require("@emotion/styled");
|
|
5
|
+
const ContainerDiv = styled.div`
|
|
6
|
+
container-type: inline-size;
|
|
7
|
+
`;
|
|
8
|
+
const WidthBasedStylesDiv = styled.div`
|
|
9
|
+
max-width: 100%;
|
|
10
|
+
max-height: 100%;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
height: ${WidgetConstants.WIDGET_OUTER_HEIGHT}px;
|
|
13
|
+
@container (max-width: 243px) {
|
|
14
|
+
#logo-without-text {
|
|
15
|
+
display: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
#logo-with-text {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
@container (min-width: 244px) and (max-width: 339px) {
|
|
23
|
+
#logo-without-text {
|
|
24
|
+
display: inherit;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
#logo-with-text {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
@container (min-width: 340px) {
|
|
32
|
+
#logo-without-text {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
#logo-with-text {
|
|
37
|
+
display: inherit;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
exports.ContainerDiv = ContainerDiv;
|
|
42
|
+
exports.WidthBasedStylesDiv = WidthBasedStylesDiv;
|
|
@@ -7,6 +7,9 @@ const styled = require("@emotion/styled");
|
|
|
7
7
|
const LoadingSpinner = ({ themeColor }) => {
|
|
8
8
|
const theme$1 = react.useMemo(() => themeColor === "light" ? theme.lightTheme : theme.darkTheme, [themeColor]);
|
|
9
9
|
const StyledDiv = styled.div`
|
|
10
|
+
margin-top: 0;
|
|
11
|
+
margin-left: 15px;
|
|
12
|
+
margin-right: 15px;
|
|
10
13
|
width: 2em;
|
|
11
14
|
height: 2em;
|
|
12
15
|
border: 4px solid ${theme$1.palette.background.contrastText};
|
|
@@ -15,6 +18,7 @@ const LoadingSpinner = ({ themeColor }) => {
|
|
|
15
18
|
display: inherit;
|
|
16
19
|
box-sizing: border-box;
|
|
17
20
|
animation: rotation 1s linear infinite;
|
|
21
|
+
|
|
18
22
|
@keyframes rotation {
|
|
19
23
|
0% {
|
|
20
24
|
transform: rotate(0deg);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
3
|
+
const LogoWithText = require("./LogoWithText.cjs");
|
|
4
|
+
const LogoWithoutText = require("./LogoWithoutText.cjs");
|
|
5
|
+
const styled = require("@emotion/styled");
|
|
6
|
+
const LogoContainer = styled.div`
|
|
7
|
+
padding: 8px;
|
|
8
|
+
flex: 1 1 0;
|
|
9
|
+
`;
|
|
10
|
+
const LogoInnerContainer = styled.div`
|
|
11
|
+
padding: 8px;
|
|
12
|
+
`;
|
|
13
|
+
const Logo = ({ themeColor }) => {
|
|
14
|
+
return jsxRuntime.jsx(LogoContainer, { children: jsxRuntime.jsxs(LogoInnerContainer, { children: [jsxRuntime.jsx(LogoWithoutText.LogoWithoutText, { themeColor }), jsxRuntime.jsx(LogoWithText.LogoWithText, { themeColor })] }) });
|
|
15
|
+
};
|
|
16
|
+
module.exports = Logo;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const LogoWithText = ({ themeColor }) => {
|
|
6
|
+
const fill = react.useMemo(() => themeColor === "light" ? "#1d1d1b" : "#fff", [themeColor]);
|
|
7
|
+
return jsxRuntime.jsxs("svg", { className: "logo", id: "logo-with-text", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 2062.63 468.67", height: "35px", width: "140px", style: { fill }, children: [jsxRuntime.jsx("title", { children: "Prosopo Logo With Text" }), jsxRuntime.jsx("path", { d: "M335.55,1825.19A147.75,147.75,0,0,1,483.3,1972.94h50.5c0-109.49-88.76-198.25-198.25-198.25v50.5Z", transform: "translate(-215.73 -1774.69)" }), jsxRuntime.jsx("path", { d: "M269.36,1891.39A147.74,147.74,0,0,1,417.1,2039.13h50.5c0-109.49-88.75-198.24-198.24-198.24v50.5Z", transform: "translate(-215.73 -1774.69)" }), jsxRuntime.jsx("path", { d: "M414,2157.17a147.75,147.75,0,0,1-147.74-147.74h-50.5c0,109.49,88.75,198.24,198.24,198.24v-50.5Z", transform: "translate(-215.73 -1774.69)" }), jsxRuntime.jsx("path", { d: "M480.17,2091a147.74,147.74,0,0,1-147.74-147.75H281.92c0,109.49,88.76,198.25,198.25,198.25V2091Z", transform: "translate(-215.73 -1774.69)" }), jsxRuntime.jsx("path", { d: "M862.8,2017.5q-27.39,22.86-78.25,22.86h-65v112.19H654.82v-312h134q46.32,0,73.86,24.13t27.55,74.72Q890.2,1994.64,862.8,2017.5ZM813,1905.1q-12.37-10.36-34.7-10.38H719.59v91.87h58.75q22.32,0,34.7-11.22t12.39-35.56Q825.43,1915.48,813,1905.1Z", transform: "translate(-215.73 -1774.69)" }), jsxRuntime.jsx("path", { d: "M1045.69,1916.42c.78.08,2.51.19,5.19.32v61.81c-3.81-.42-7.2-.71-10.16-.85s-5.36-.21-7.2-.21q-36.4,0-48.89,23.71-7,13.33-7,41.06v110.29H916.89V1921.82h57.58V1962q14-23.07,24.34-31.54,16.94-14.18,44-14.18C1044,1916.32,1044.92,1916.35,1045.69,1916.42Z", transform: "translate(-215.73 -1774.69)" }), jsxRuntime.jsx("path", { d: "M1265.64,2124.32q-29.21,36.06-88.69,36.06t-88.69-36.06Q1059,2088.26,1059,2037.5q0-49.9,29.22-86.5t88.69-36.59q59.47,0,88.69,36.59t29.21,86.5Q1294.85,2088.26,1265.64,2124.32ZM1217.38,2091q14.17-18.81,14.18-53.48t-14.18-53.37q-14.19-18.7-40.64-18.71T1136,1984.13q-14.29,18.72-14.29,53.37T1136,2091q14.28,18.81,40.75,18.81T1217.38,2091Z", transform: "translate(-215.73 -1774.69)" }), jsxRuntime.jsx("path", { d: "M1371.81,2078.88q1.92,16.1,8.29,22.87,11.28,12.06,41.7,12.06,17.85,0,28.39-5.29t10.53-15.88a17.12,17.12,0,0,0-8.48-15.45q-8.49-5.28-63.12-18.2-39.33-9.73-55.41-24.35-16.08-14.39-16.09-41.49,0-32,25.14-54.93t70.75-23q43.26,0,70.53,17.25t31.29,59.59H1455q-1.27-11.64-6.58-18.42-10-12.27-34-12.28-19.74,0-28.13,6.14t-8.38,14.4c0,6.91,3,11.93,8.92,15q8.89,4.89,63,16.73,36,8.46,54.05,25.61,17.77,17.35,17.78,43.39,0,34.3-25.56,56t-79,21.7q-54.51,0-80.49-23t-26-58.53Z", transform: "translate(-215.73 -1774.69)" }), jsxRuntime.jsx("path", { d: "M1745.54,2124.32q-29.22,36.06-88.7,36.06t-88.69-36.06q-29.2-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.7,36.59t29.21,86.5Q1774.75,2088.26,1745.54,2124.32ZM1697.27,2091q14.19-18.81,14.19-53.48t-14.19-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.28,53.37t14.28,53.48q14.3,18.81,40.75,18.81T1697.27,2091Z", transform: "translate(-215.73 -1774.69)" }), jsxRuntime.jsx("path", { d: "M1992.75,1946.59q28.24,29.84,28.23,87.63,0,61-27.58,92.93t-71.06,32q-27.69,0-46-13.76-10-7.62-19.6-22.23v120.24H1797V1921.82h57.79v34.08q9.79-15,20.88-23.71,20.23-15.43,48.15-15.45Q1964.53,1916.74,1992.75,1946.59Zm-46.3,43.39q-12.3-20.52-39.88-20.53-33.15,0-45.54,31.11-6.43,16.51-6.42,41.92,0,40.21,21.58,56.51,12.82,9.53,30.37,9.53,25.45,0,38.83-19.48t13.36-51.86Q1958.75,2010.51,1946.45,1990Z", transform: "translate(-215.73 -1774.69)" }), jsxRuntime.jsx("path", { d: "M2249.14,2124.32q-29.2,36.06-88.69,36.06t-88.69-36.06q-29.22-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.69,36.59t29.22,86.5Q2278.36,2088.26,2249.14,2124.32ZM2200.88,2091q14.19-18.81,14.18-53.48t-14.18-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.29,53.37t14.29,53.48q14.3,18.81,40.75,18.81T2200.88,2091Z", transform: "translate(-215.73 -1774.69)" })] });
|
|
8
|
+
};
|
|
9
|
+
exports.LogoWithText = LogoWithText;
|
|
10
|
+
exports.default = LogoWithText;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const LogoWithoutText = ({ themeColor }) => {
|
|
6
|
+
const fill = react.useMemo(() => themeColor === "light" ? "#1d1d1b" : "#fff", [themeColor]);
|
|
7
|
+
return jsxRuntime.jsxs("svg", { className: "logo", id: "logo-without-text", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 260 348", height: "35px", style: { fill }, children: [jsxRuntime.jsx("title", { children: "Prosopo Logo Without Text" }), jsxRuntime.jsx("path", { d: "M95.7053 40.2707C127.005 40.2707 157.022 52.6841 179.154 74.78C201.286 96.8759 213.719 126.844 213.719 158.093H254.056C254.056 70.7808 183.16 -4.57764e-05 95.7053 -4.57764e-05V40.2707Z" }), jsxRuntime.jsx("path", { d: "M42.8365 93.0614C58.3333 93.0614 73.6784 96.1087 87.9955 102.029C102.313 107.95 115.322 116.628 126.279 127.568C137.237 138.508 145.93 151.496 151.86 165.79C157.79 180.084 160.843 195.404 160.843 210.875H201.179C201.179 123.564 130.291 52.7906 42.8365 52.7906V93.0614Z" }), jsxRuntime.jsx("path", { d: "M158.367 305.005C127.07 305.003 97.056 292.59 74.926 270.496C52.796 248.402 40.3626 218.437 40.3604 187.191H0.0239563C0.0239563 274.503 70.9123 345.276 158.367 345.276V305.005Z" }), jsxRuntime.jsx("path", { d: "M211.219 252.239C195.722 252.239 180.376 249.191 166.059 243.27C151.741 237.349 138.732 228.67 127.774 217.729C116.816 206.788 108.123 193.799 102.194 179.505C96.2637 165.21 93.2121 149.889 93.2132 134.417H52.8687C52.8687 221.729 123.765 292.509 211.219 292.509V252.239Z" })] });
|
|
8
|
+
};
|
|
9
|
+
exports.LogoWithoutText = LogoWithoutText;
|
|
10
|
+
exports.default = LogoWithoutText;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const WIDGET_URL = "https://prosopo.io/?ref=accounts.prosopo.io&utm_campaign=widget&utm_medium=checkbox#features";
|
|
4
|
+
const WIDGET_URL_TEXT = "Visit prosopo.io to learn more about the service and its accessibility options.";
|
|
5
|
+
const WIDGET_INNER_HEIGHT = 74;
|
|
6
|
+
const WIDGET_OUTER_HEIGHT = 80;
|
|
7
|
+
const WIDGET_DIMENSIONS = { maxWidth: "400px", minWidth: "200px", minHeight: `${WIDGET_OUTER_HEIGHT}px` };
|
|
8
|
+
exports.WIDGET_DIMENSIONS = WIDGET_DIMENSIONS;
|
|
9
|
+
exports.WIDGET_INNER_HEIGHT = WIDGET_INNER_HEIGHT;
|
|
10
|
+
exports.WIDGET_OUTER_HEIGHT = WIDGET_OUTER_HEIGHT;
|
|
11
|
+
exports.WIDGET_URL = WIDGET_URL;
|
|
12
|
+
exports.WIDGET_URL_TEXT = WIDGET_URL_TEXT;
|
|
@@ -4,8 +4,19 @@ const CaptchaPlaceholder = require("./CaptchaPlaceholder.cjs");
|
|
|
4
4
|
const LoadingSpinner = require("./LoadingSpinner.cjs");
|
|
5
5
|
const theme = require("./theme.cjs");
|
|
6
6
|
const Checkbox = require("./Checkbox.cjs");
|
|
7
|
+
const Logo = require("./Logo.cjs");
|
|
8
|
+
const Containers = require("./Containers.cjs");
|
|
9
|
+
const WidgetConstants = require("./WidgetConstants.cjs");
|
|
7
10
|
exports.ProcaptchaPlaceholder = CaptchaPlaceholder.ProcaptchaPlaceholder;
|
|
8
11
|
exports.LoadingSpinner = LoadingSpinner.LoadingSpinner;
|
|
9
12
|
exports.darkTheme = theme.darkTheme;
|
|
10
13
|
exports.lightTheme = theme.lightTheme;
|
|
11
14
|
exports.Checkbox = Checkbox.Checkbox;
|
|
15
|
+
exports.Logo = Logo;
|
|
16
|
+
exports.ContainerDiv = Containers.ContainerDiv;
|
|
17
|
+
exports.WidthBasedStylesDiv = Containers.WidthBasedStylesDiv;
|
|
18
|
+
exports.WIDGET_DIMENSIONS = WidgetConstants.WIDGET_DIMENSIONS;
|
|
19
|
+
exports.WIDGET_INNER_HEIGHT = WidgetConstants.WIDGET_INNER_HEIGHT;
|
|
20
|
+
exports.WIDGET_OUTER_HEIGHT = WidgetConstants.WIDGET_OUTER_HEIGHT;
|
|
21
|
+
exports.WIDGET_URL = WidgetConstants.WIDGET_URL;
|
|
22
|
+
exports.WIDGET_URL_TEXT = WidgetConstants.WIDGET_URL_TEXT;
|
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type ProcaptchaCallbacks = Partial<ProcaptchaEvents>;
|
|
3
|
-
export interface ProcaptchaEvents {
|
|
4
|
-
onError: (error: Error) => void;
|
|
5
|
-
onAccountNotFound: (address: string) => void;
|
|
6
|
-
onHuman: (output: ProcaptchaOutput) => void;
|
|
7
|
-
onExtensionNotFound: () => void;
|
|
8
|
-
onChallengeExpired: () => void;
|
|
9
|
-
onExpired: () => void;
|
|
10
|
-
onFailed: () => void;
|
|
11
|
-
onOpen: () => void;
|
|
12
|
-
onClose: () => void;
|
|
13
|
-
}
|
|
14
|
-
export interface ProcaptchaProps {
|
|
15
|
-
config: ProcaptchaClientConfigInput;
|
|
16
|
-
callbacks?: Partial<ProcaptchaCallbacks>;
|
|
17
|
-
}
|
|
1
|
+
import { ProcaptchaProps } from '@prosopo/types';
|
|
18
2
|
declare const Procaptcha: (props: ProcaptchaProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
3
|
export default Procaptcha;
|
|
20
4
|
//# sourceMappingURL=Captcha.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Captcha.d.ts","sourceRoot":"","sources":["../../src/components/Captcha.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Captcha.d.ts","sourceRoot":"","sources":["../../src/components/Captcha.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAIhD,QAAA,MAAM,UAAU,UAAW,eAAe,qDAsFzC,CAAA;AACD,eAAe,UAAU,CAAA"}
|
|
@@ -1,90 +1,42 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { Checkbox, LoadingSpinner, darkTheme, lightTheme } from '@prosopo/web-components';
|
|
2
|
+
import { Checkbox, ContainerDiv, LoadingSpinner, Logo, WIDGET_DIMENSIONS, WIDGET_INNER_HEIGHT, WIDGET_URL, WIDGET_URL_TEXT, WidthBasedStylesDiv, darkTheme, lightTheme, } from '@prosopo/web-components';
|
|
3
3
|
import { Manager } from '../Services/Manager.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const logoStyle = css `
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: flex-end;
|
|
9
|
-
display: flex;
|
|
10
|
-
padding: 8px;
|
|
11
|
-
|
|
12
|
-
@media (max-width: 245px) {
|
|
13
|
-
&:nth-of-type(1),
|
|
14
|
-
&:nth-of-type(2) {
|
|
15
|
-
display: none;
|
|
16
|
-
} /* Both logos hidden */
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@media (min-width: 245px) and (max-width: 400px) {
|
|
20
|
-
&:nth-of-type(1) {
|
|
21
|
-
display: flex;
|
|
22
|
-
} /* logoWithText */
|
|
23
|
-
&:nth-of-type(2) {
|
|
24
|
-
display: none;
|
|
25
|
-
} /* logoWithoutText */
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@media (min-width: 401px) {
|
|
29
|
-
&:nth-of-type(1) {
|
|
30
|
-
display: none;
|
|
31
|
-
} /* logoWithText */
|
|
32
|
-
&:nth-of-type(2) {
|
|
33
|
-
display: flex;
|
|
34
|
-
} /* logoWithoutText */
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
4
|
+
import { buildUpdateState, useProcaptcha } from '@prosopo/procaptcha-common';
|
|
5
|
+
import { useRef, useState } from 'react';
|
|
37
6
|
const Procaptcha = (props) => {
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
borderColor: theme.palette.grey[300],
|
|
59
|
-
borderRadius: '8px',
|
|
60
|
-
display: 'flex',
|
|
61
|
-
justifyContent: 'space-between',
|
|
62
|
-
alignItems: 'center',
|
|
63
|
-
flexWrap: 'wrap',
|
|
64
|
-
}, children: [_jsx("div", { style: { display: 'flex', flexDirection: 'column' }, children: _jsxs("div", { style: {
|
|
65
|
-
display: 'flex',
|
|
66
|
-
justifyContent: 'flex-start',
|
|
67
|
-
alignItems: 'center',
|
|
68
|
-
flexWrap: 'wrap',
|
|
69
|
-
}, children: [_jsx("div", { style: {
|
|
70
|
-
height: '50px',
|
|
71
|
-
width: '50px',
|
|
7
|
+
const config = props.config;
|
|
8
|
+
const themeColor = config.theme === 'light' ? 'light' : 'dark';
|
|
9
|
+
const theme = props.config.theme === 'light' ? lightTheme : darkTheme;
|
|
10
|
+
const callbacks = props.callbacks || {};
|
|
11
|
+
const [state, _updateState] = useProcaptcha(useState, useRef);
|
|
12
|
+
const updateState = buildUpdateState(state, _updateState);
|
|
13
|
+
const manager = Manager(config, state, updateState, callbacks);
|
|
14
|
+
return (_jsx("div", { children: _jsx("div", { style: { maxWidth: '100%', maxHeight: '100%', overflowX: 'auto' }, children: _jsx(ContainerDiv, { children: _jsx(WidthBasedStylesDiv, { children: _jsxs("div", { style: WIDGET_DIMENSIONS, "data-cy": 'button-human', children: [' ', _jsxs("div", { style: {
|
|
15
|
+
padding: '2px',
|
|
16
|
+
border: '1px solid',
|
|
17
|
+
backgroundColor: theme.palette.background.default,
|
|
18
|
+
borderColor: theme.palette.grey[300],
|
|
19
|
+
borderRadius: '4px',
|
|
20
|
+
display: 'flex',
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
flexWrap: 'wrap',
|
|
23
|
+
justifyContent: 'space-between',
|
|
24
|
+
minHeight: `${WIDGET_INNER_HEIGHT}px`,
|
|
25
|
+
overflow: 'hidden',
|
|
26
|
+
}, children: [_jsx("div", { style: { display: 'inline-flex', flexDirection: 'column' }, children: _jsx("div", { style: {
|
|
72
27
|
display: 'flex',
|
|
28
|
+
justifyContent: 'flex-start',
|
|
73
29
|
alignItems: 'center',
|
|
74
|
-
|
|
75
|
-
flexDirection: 'column',
|
|
76
|
-
verticalAlign: 'middle',
|
|
30
|
+
flexWrap: 'wrap',
|
|
77
31
|
}, children: _jsx("div", { style: {
|
|
78
32
|
display: 'flex',
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
flexDirection: 'column',
|
|
36
|
+
verticalAlign: 'middle',
|
|
37
|
+
}, children: _jsx("div", { style: {
|
|
38
|
+
display: 'flex',
|
|
39
|
+
}, children: _jsx("div", { style: { flex: 1 }, children: state.loading ? (_jsx(LoadingSpinner, { themeColor: themeColor })) : (_jsx(Checkbox, { checked: state.isHuman, onChange: manager.start, themeColor: themeColor, labelText: 'I am human' })) }) }) }) }) }), _jsx("div", { style: { display: 'inline-flex', flexDirection: 'column' }, children: _jsx("a", { href: WIDGET_URL, target: "_blank", "aria-label": WIDGET_URL_TEXT, children: _jsx("div", { style: { flex: 1 }, children: _jsx(Logo, { themeColor: themeColor }) }) }) })] })] }) }) }) }) }));
|
|
84
40
|
};
|
|
85
|
-
const logoWithTextBlack = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2062.63 468.67" height="35px" width="140px"><defs><style>.cls-1{fill:#1d1d1b;}</style></defs><title>Prosopo Logo Black</title><path class="cls-1" d="M335.55,1825.19A147.75,147.75,0,0,1,483.3,1972.94h50.5c0-109.49-88.76-198.25-198.25-198.25v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M269.36,1891.39A147.74,147.74,0,0,1,417.1,2039.13h50.5c0-109.49-88.75-198.24-198.24-198.24v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M414,2157.17a147.75,147.75,0,0,1-147.74-147.74h-50.5c0,109.49,88.75,198.24,198.24,198.24v-50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M480.17,2091a147.74,147.74,0,0,1-147.74-147.75H281.92c0,109.49,88.76,198.25,198.25,198.25V2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M862.8,2017.5q-27.39,22.86-78.25,22.86h-65v112.19H654.82v-312h134q46.32,0,73.86,24.13t27.55,74.72Q890.2,1994.64,862.8,2017.5ZM813,1905.1q-12.37-10.36-34.7-10.38H719.59v91.87h58.75q22.32,0,34.7-11.22t12.39-35.56Q825.43,1915.48,813,1905.1Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1045.69,1916.42c.78.08,2.51.19,5.19.32v61.81c-3.81-.42-7.2-.71-10.16-.85s-5.36-.21-7.2-.21q-36.4,0-48.89,23.71-7,13.33-7,41.06v110.29H916.89V1921.82h57.58V1962q14-23.07,24.34-31.54,16.94-14.18,44-14.18C1044,1916.32,1044.92,1916.35,1045.69,1916.42Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1265.64,2124.32q-29.21,36.06-88.69,36.06t-88.69-36.06Q1059,2088.26,1059,2037.5q0-49.9,29.22-86.5t88.69-36.59q59.47,0,88.69,36.59t29.21,86.5Q1294.85,2088.26,1265.64,2124.32ZM1217.38,2091q14.17-18.81,14.18-53.48t-14.18-53.37q-14.19-18.7-40.64-18.71T1136,1984.13q-14.29,18.72-14.29,53.37T1136,2091q14.28,18.81,40.75,18.81T1217.38,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1371.81,2078.88q1.92,16.1,8.29,22.87,11.28,12.06,41.7,12.06,17.85,0,28.39-5.29t10.53-15.88a17.12,17.12,0,0,0-8.48-15.45q-8.49-5.28-63.12-18.2-39.33-9.73-55.41-24.35-16.08-14.39-16.09-41.49,0-32,25.14-54.93t70.75-23q43.26,0,70.53,17.25t31.29,59.59H1455q-1.27-11.64-6.58-18.42-10-12.27-34-12.28-19.74,0-28.13,6.14t-8.38,14.4c0,6.91,3,11.93,8.92,15q8.89,4.89,63,16.73,36,8.46,54.05,25.61,17.77,17.35,17.78,43.39,0,34.3-25.56,56t-79,21.7q-54.51,0-80.49-23t-26-58.53Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1745.54,2124.32q-29.22,36.06-88.7,36.06t-88.69-36.06q-29.2-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.7,36.59t29.21,86.5Q1774.75,2088.26,1745.54,2124.32ZM1697.27,2091q14.19-18.81,14.19-53.48t-14.19-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.28,53.37t14.28,53.48q14.3,18.81,40.75,18.81T1697.27,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1992.75,1946.59q28.24,29.84,28.23,87.63,0,61-27.58,92.93t-71.06,32q-27.69,0-46-13.76-10-7.62-19.6-22.23v120.24H1797V1921.82h57.79v34.08q9.79-15,20.88-23.71,20.23-15.43,48.15-15.45Q1964.53,1916.74,1992.75,1946.59Zm-46.3,43.39q-12.3-20.52-39.88-20.53-33.15,0-45.54,31.11-6.43,16.51-6.42,41.92,0,40.21,21.58,56.51,12.82,9.53,30.37,9.53,25.45,0,38.83-19.48t13.36-51.86Q1958.75,2010.51,1946.45,1990Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M2249.14,2124.32q-29.2,36.06-88.69,36.06t-88.69-36.06q-29.22-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.69,36.59t29.22,86.5Q2278.36,2088.26,2249.14,2124.32ZM2200.88,2091q14.19-18.81,14.18-53.48t-14.18-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.29,53.37t14.29,53.48q14.3,18.81,40.75,18.81T2200.88,2091Z" transform="translate(-215.73 -1774.69)"/></svg>';
|
|
86
|
-
const logoWithTextWhite = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2062.63 468.67" height="35px" width="140px"><defs><style>.cls-1{fill:#fff;}</style></defs><title>Prosopo Logo Black</title><path class="cls-1" d="M335.55,1825.19A147.75,147.75,0,0,1,483.3,1972.94h50.5c0-109.49-88.76-198.25-198.25-198.25v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M269.36,1891.39A147.74,147.74,0,0,1,417.1,2039.13h50.5c0-109.49-88.75-198.24-198.24-198.24v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M414,2157.17a147.75,147.75,0,0,1-147.74-147.74h-50.5c0,109.49,88.75,198.24,198.24,198.24v-50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M480.17,2091a147.74,147.74,0,0,1-147.74-147.75H281.92c0,109.49,88.76,198.25,198.25,198.25V2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M862.8,2017.5q-27.39,22.86-78.25,22.86h-65v112.19H654.82v-312h134q46.32,0,73.86,24.13t27.55,74.72Q890.2,1994.64,862.8,2017.5ZM813,1905.1q-12.37-10.36-34.7-10.38H719.59v91.87h58.75q22.32,0,34.7-11.22t12.39-35.56Q825.43,1915.48,813,1905.1Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1045.69,1916.42c.78.08,2.51.19,5.19.32v61.81c-3.81-.42-7.2-.71-10.16-.85s-5.36-.21-7.2-.21q-36.4,0-48.89,23.71-7,13.33-7,41.06v110.29H916.89V1921.82h57.58V1962q14-23.07,24.34-31.54,16.94-14.18,44-14.18C1044,1916.32,1044.92,1916.35,1045.69,1916.42Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1265.64,2124.32q-29.21,36.06-88.69,36.06t-88.69-36.06Q1059,2088.26,1059,2037.5q0-49.9,29.22-86.5t88.69-36.59q59.47,0,88.69,36.59t29.21,86.5Q1294.85,2088.26,1265.64,2124.32ZM1217.38,2091q14.17-18.81,14.18-53.48t-14.18-53.37q-14.19-18.7-40.64-18.71T1136,1984.13q-14.29,18.72-14.29,53.37T1136,2091q14.28,18.81,40.75,18.81T1217.38,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1371.81,2078.88q1.92,16.1,8.29,22.87,11.28,12.06,41.7,12.06,17.85,0,28.39-5.29t10.53-15.88a17.12,17.12,0,0,0-8.48-15.45q-8.49-5.28-63.12-18.2-39.33-9.73-55.41-24.35-16.08-14.39-16.09-41.49,0-32,25.14-54.93t70.75-23q43.26,0,70.53,17.25t31.29,59.59H1455q-1.27-11.64-6.58-18.42-10-12.27-34-12.28-19.74,0-28.13,6.14t-8.38,14.4c0,6.91,3,11.93,8.92,15q8.89,4.89,63,16.73,36,8.46,54.05,25.61,17.77,17.35,17.78,43.39,0,34.3-25.56,56t-79,21.7q-54.51,0-80.49-23t-26-58.53Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1745.54,2124.32q-29.22,36.06-88.7,36.06t-88.69-36.06q-29.2-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.7,36.59t29.21,86.5Q1774.75,2088.26,1745.54,2124.32ZM1697.27,2091q14.19-18.81,14.19-53.48t-14.19-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.28,53.37t14.28,53.48q14.3,18.81,40.75,18.81T1697.27,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1992.75,1946.59q28.24,29.84,28.23,87.63,0,61-27.58,92.93t-71.06,32q-27.69,0-46-13.76-10-7.62-19.6-22.23v120.24H1797V1921.82h57.79v34.08q9.79-15,20.88-23.71,20.23-15.43,48.15-15.45Q1964.53,1916.74,1992.75,1946.59Zm-46.3,43.39q-12.3-20.52-39.88-20.53-33.15,0-45.54,31.11-6.43,16.51-6.42,41.92,0,40.21,21.58,56.51,12.82,9.53,30.37,9.53,25.45,0,38.83-19.48t13.36-51.86Q1958.75,2010.51,1946.45,1990Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M2249.14,2124.32q-29.2,36.06-88.69,36.06t-88.69-36.06q-29.22-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.69,36.59t29.22,86.5Q2278.36,2088.26,2249.14,2124.32ZM2200.88,2091q14.19-18.81,14.18-53.48t-14.18-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.29,53.37t14.29,53.48q14.3,18.81,40.75,18.81T2200.88,2091Z" transform="translate(-215.73 -1774.69)"/></svg>';
|
|
87
|
-
const logoWithoutTextWhite = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 260 348" height="35px"><path id="Vector" d="M95.7053 40.2707C127.005 40.2707 157.022 52.6841 179.154 74.78C201.286 96.8759 213.719 126.844 213.719 158.093H254.056C254.056 70.7808 183.16 -4.57764e-05 95.7053 -4.57764e-05V40.2707Z" fill="#fff"/><path id="Vector_2" d="M42.8365 93.0614C58.3333 93.0614 73.6784 96.1087 87.9955 102.029C102.313 107.95 115.322 116.628 126.279 127.568C137.237 138.508 145.93 151.496 151.86 165.79C157.79 180.084 160.843 195.404 160.843 210.875H201.179C201.179 123.564 130.291 52.7906 42.8365 52.7906V93.0614Z" fill="#fff"/><path id="Vector_3" d="M158.367 305.005C127.07 305.003 97.056 292.59 74.926 270.496C52.796 248.402 40.3626 218.437 40.3604 187.191H0.0239563C0.0239563 274.503 70.9123 345.276 158.367 345.276V305.005Z" fill="#fff"/><path id="Vector_4" d="M211.219 252.239C195.722 252.239 180.376 249.191 166.059 243.27C151.741 237.349 138.732 228.67 127.774 217.729C116.816 206.788 108.123 193.799 102.194 179.505C96.2637 165.21 93.2121 149.889 93.2132 134.417H52.8687C52.8687 221.729 123.765 292.509 211.219 292.509V252.239Z" fill="#fff"/></g><defs><clipPath id="clip0_1_2"><rect width="254" height="345" fill="white"/></clipPath></defs></svg>';
|
|
88
|
-
const logoWithoutTextBlack = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 260 348" height="35px"><path id="Vector" d="M95.7053 40.2707C127.005 40.2707 157.022 52.6841 179.154 74.78C201.286 96.8759 213.719 126.844 213.719 158.093H254.056C254.056 70.7808 183.16 -4.57764e-05 95.7053 -4.57764e-05V40.2707Z" fill="#000000"/><path id="Vector_2" d="M42.8365 93.0614C58.3333 93.0614 73.6784 96.1087 87.9955 102.029C102.313 107.95 115.322 116.628 126.279 127.568C137.237 138.508 145.93 151.496 151.86 165.79C157.79 180.084 160.843 195.404 160.843 210.875H201.179C201.179 123.564 130.291 52.7906 42.8365 52.7906V93.0614Z" fill="#000000"/><path id="Vector_3" d="M158.367 305.005C127.07 305.003 97.056 292.59 74.926 270.496C52.796 248.402 40.3626 218.437 40.3604 187.191H0.0239563C0.0239563 274.503 70.9123 345.276 158.367 345.276V305.005Z" fill="#000000"/><path id="Vector_4" d="M211.219 252.239C195.722 252.239 180.376 249.191 166.059 243.27C151.741 237.349 138.732 228.67 127.774 217.729C116.816 206.788 108.123 193.799 102.194 179.505C96.2637 165.21 93.2121 149.889 93.2132 134.417H52.8687C52.8687 221.729 123.765 292.509 211.219 292.509V252.239Z" fill="#000000"/></g><defs><clipPath id="clip0_1_2"><rect width="254" height="345" fill="white"/></clipPath></defs></svg>';
|
|
89
41
|
export default Procaptcha;
|
|
90
42
|
//# sourceMappingURL=Captcha.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Captcha.js","sourceRoot":"","sources":["../../src/components/Captcha.tsx"],"names":[],"mappings":";AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"Captcha.js","sourceRoot":"","sources":["../../src/components/Captcha.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { LazyExoticComponent } from 'react';
|
|
2
|
+
import { ProcaptchaEvents } from '@prosopo/types';
|
|
3
|
+
import { ReactElement } from 'react';
|
|
3
4
|
type ProcaptchaProps = React.ComponentProps<typeof ProcaptchaWidget>;
|
|
5
|
+
declare const ProcaptchaWidget: LazyExoticComponent<(props: any, callbacks: Partial<ProcaptchaEvents>) => ReactElement>;
|
|
4
6
|
export declare const ProcaptchaPow: (props: ProcaptchaProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
7
|
export {};
|
|
6
8
|
//# sourceMappingURL=ProcaptchaPoW.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcaptchaPoW.d.ts","sourceRoot":"","sources":["../../src/components/ProcaptchaPoW.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ProcaptchaPoW.d.ts","sourceRoot":"","sources":["../../src/components/ProcaptchaPoW.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,mBAAmB,EAAkB,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEpE,QAAA,MAAM,gBAAgB,EAAE,mBAAmB,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,YAAY,CAE7G,CAAA;AAED,eAAO,MAAM,aAAa,UAAW,eAAe,qDAInD,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { ProcaptchaPlaceholder } from '@prosopo/web-components';
|
|
3
2
|
import { Suspense, lazy } from 'react';
|
|
3
|
+
import { ProcaptchaPlaceholder } from '@prosopo/web-components';
|
|
4
4
|
const ProcaptchaWidget = lazy(async () => import('./Captcha.js'));
|
|
5
5
|
export const ProcaptchaPow = (props) => (_jsx(Suspense, { fallback: _jsx(ProcaptchaPlaceholder, { darkMode: props.config.theme }), children: _jsx(ProcaptchaWidget, { config: props.config, callbacks: props.callbacks }) }));
|
|
6
6
|
//# sourceMappingURL=ProcaptchaPoW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcaptchaPoW.js","sourceRoot":"","sources":["../../src/components/ProcaptchaPoW.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ProcaptchaPoW.js","sourceRoot":"","sources":["../../src/components/ProcaptchaPoW.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAuB,QAAQ,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAK/D,MAAM,gBAAgB,GAA4F,IAAI,CAClH,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CACrC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAsB,EAAE,EAAE,CAAC,CACrD,KAAC,QAAQ,IAAC,QAAQ,EAAE,KAAC,qBAAqB,IAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,GAAI,YACvE,KAAC,gBAAgB,IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAqB,GAChF,CACd,CAAA"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-pow",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"@emotion/styled": "^11.11.0",
|
|
38
38
|
"@noble/hashes": "^1.3.3",
|
|
39
39
|
"@polkadot/extension-inject": "0.46.6",
|
|
40
|
-
"@prosopo/account": "0.3.
|
|
41
|
-
"@prosopo/api": "0.3.
|
|
42
|
-
"@prosopo/common": "0.3.
|
|
43
|
-
"@prosopo/procaptcha": "0.3.
|
|
44
|
-
"@prosopo/types": "0.3.
|
|
45
|
-
"@prosopo/util": "0.3.
|
|
46
|
-
"@prosopo/web-components": "0.3.
|
|
40
|
+
"@prosopo/account": "0.3.3",
|
|
41
|
+
"@prosopo/api": "0.3.3",
|
|
42
|
+
"@prosopo/common": "0.3.3",
|
|
43
|
+
"@prosopo/procaptcha": "0.3.3",
|
|
44
|
+
"@prosopo/types": "0.3.3",
|
|
45
|
+
"@prosopo/util": "0.3.3",
|
|
46
|
+
"@prosopo/web-components": "0.3.3",
|
|
47
47
|
"react": "^18.2.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|