@prosopo/procaptcha-react 0.2.2 → 0.2.5
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/README.md +95 -49
- package/dist/cjs/components/CaptchaComponent.cjs +110 -132
- package/dist/cjs/components/CaptchaWidget.cjs +6 -7
- package/dist/cjs/components/Procaptcha.cjs +49 -15
- package/dist/cjs/components/theme.cjs +20 -2
- package/dist/components/CaptchaComponent.d.ts +2 -1
- package/dist/components/CaptchaComponent.d.ts.map +1 -1
- package/dist/components/CaptchaComponent.js +38 -54
- package/dist/components/CaptchaComponent.js.map +1 -1
- package/dist/components/CaptchaWidget.d.ts +1 -1
- package/dist/components/CaptchaWidget.d.ts.map +1 -1
- package/dist/components/CaptchaWidget.js +61 -63
- package/dist/components/CaptchaWidget.js.map +1 -1
- package/dist/components/ExtensionAccountSelect.d.ts.map +1 -1
- package/dist/components/ExtensionAccountSelect.js.map +1 -1
- package/dist/components/Procaptcha.d.ts.map +1 -1
- package/dist/components/Procaptcha.js +55 -39
- package/dist/components/Procaptcha.js.map +1 -1
- package/dist/components/theme.d.ts +2 -2
- package/dist/components/theme.d.ts.map +1 -1
- package/dist/components/theme.js +17 -1
- package/dist/components/theme.js.map +1 -1
- package/package.json +9 -5
|
@@ -14,15 +14,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
/** @jsxImportSource @emotion/react */
|
|
16
16
|
import { Manager, } from '@prosopo/procaptcha';
|
|
17
|
-
import { Alert, Backdrop, CircularProgress } from '@mui/material';
|
|
18
|
-
import { Box, Checkbox, Link, Typography } from '@mui/material';
|
|
17
|
+
import { Alert, Backdrop, Box, Checkbox, CircularProgress, Link, ThemeProvider, Typography } from '@mui/material';
|
|
19
18
|
import { css } from '@emotion/react';
|
|
20
|
-
import {
|
|
19
|
+
import { darkTheme, lightTheme } from './theme.js';
|
|
20
|
+
import { useMemo, useRef, useState } from 'react';
|
|
21
21
|
import CaptchaComponent from './CaptchaComponent.js';
|
|
22
|
-
// import Box from '@mui/material/Box/Box.js'
|
|
23
|
-
// import Checkbox from '@mui/material/Checkbox/Checkbox.js'
|
|
24
|
-
// import Link from '@mui/material/Link/Link.js'
|
|
25
|
-
// import Typography from '@mui/material/Typography/Typography.js'
|
|
26
22
|
const logoStyle = css `
|
|
27
23
|
align-items: center;
|
|
28
24
|
justify-content: flex-end;
|
|
@@ -68,11 +64,8 @@ const useRefAsState = (defaultValue) => {
|
|
|
68
64
|
return [value, setter];
|
|
69
65
|
};
|
|
70
66
|
const useProcaptcha = () => {
|
|
71
|
-
// useRef == do not render on variable change
|
|
72
|
-
// useState == do render on variable change
|
|
73
|
-
// only need to render on visible variables changing
|
|
74
67
|
const [isHuman, setIsHuman] = useState(false);
|
|
75
|
-
const [index, setIndex] = useState(
|
|
68
|
+
const [index, setIndex] = useState(0);
|
|
76
69
|
const [solutions, setSolutions] = useState([]);
|
|
77
70
|
const [captchaApi, setCaptchaApi] = useRefAsState(undefined);
|
|
78
71
|
const [showModal, setShowModal] = useState(false);
|
|
@@ -139,33 +132,56 @@ export const Procaptcha = (props) => {
|
|
|
139
132
|
const [state, updateState] = useProcaptcha();
|
|
140
133
|
console.log('state', state);
|
|
141
134
|
const manager = Manager(config, state, updateState, callbacks);
|
|
142
|
-
const configSx =
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
135
|
+
const configSx = { maxWidth: '400px', minWidth: '200px' };
|
|
136
|
+
const theme = useMemo(() => (props.config.theme === 'light' ? lightTheme : darkTheme), [props.config.theme]);
|
|
137
|
+
return (_jsx(ThemeProvider, { theme: theme, children: _jsxs(Box, { sx: { maxWidth: '100%', maxHeight: '100%', overflowX: 'auto' }, children: [_jsx(Backdrop, { open: state.showModal, sx: { zIndex: 2147483647 }, children: state.challenge ? (_jsx(CaptchaComponent, { challenge: state.challenge, index: state.index, solutions: state.solutions, onSubmit: manager.submit, onCancel: manager.cancel, onClick: manager.select, onNext: manager.nextRound, themeColor: config.theme ?? 'light' })) : (_jsx(Alert, { children: "No challenge set." })) }), _jsxs(Box, { p: 0, sx: [...(Array.isArray(configSx) ? configSx : [configSx])], "data-cy": 'button-human', children: [' ', _jsxs(Box, { p: 1, border: 1, bgcolor: theme.palette.background.default, borderColor: theme.palette.grey[300], borderRadius: 2, sx: {
|
|
138
|
+
display: 'flex',
|
|
139
|
+
justifyContent: 'space-between',
|
|
140
|
+
alignItems: 'center',
|
|
141
|
+
flexWrap: 'wrap',
|
|
142
|
+
}, children: [_jsx(Box, { sx: { display: 'flex', flexDirection: 'column' }, children: _jsxs(Box, { sx: {
|
|
143
|
+
display: 'flex',
|
|
144
|
+
justifyContent: 'flex-start',
|
|
145
|
+
alignItems: 'center',
|
|
146
|
+
flexWrap: 'wrap',
|
|
147
|
+
}, children: [_jsxs(Box, { sx: {
|
|
148
|
+
height: '50px',
|
|
149
|
+
width: '50px',
|
|
150
|
+
display: 'flex',
|
|
151
|
+
alignItems: 'center',
|
|
152
|
+
justifyContent: 'center',
|
|
153
|
+
flexDirection: 'column',
|
|
154
|
+
}, children: [_jsx(Box, { sx: {
|
|
155
|
+
display: !state.loading ? 'block' : 'none',
|
|
156
|
+
}, children: _jsx(Checkbox, { onChange: manager.start, checked: state.isHuman, inputProps: { 'aria-label': 'controlled' }, sx: {
|
|
157
|
+
'& .MuiSvgIcon-root': { fontSize: 32, position: 'relative' },
|
|
158
|
+
'& .PrivateSwitchBase-input': {
|
|
159
|
+
width: '1.4em',
|
|
160
|
+
height: '1.4em',
|
|
161
|
+
top: 'auto',
|
|
162
|
+
left: 'auto',
|
|
163
|
+
opacity: '1',
|
|
164
|
+
'&::before': {
|
|
165
|
+
content: '""',
|
|
166
|
+
position: 'absolute',
|
|
167
|
+
height: '100%',
|
|
168
|
+
width: '100%',
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
} }) }), _jsx(Box, { sx: {
|
|
172
|
+
display: state.loading ? 'block' : 'none',
|
|
173
|
+
}, children: _jsx(Box, { pt: '5px', children: _jsx(CircularProgress, { size: '24px', disableShrink: true }) }) })] }), _jsx(Box, { p: 1, children: _jsx(Typography, { color: theme.palette.primary.contrastText, children: "I am a human" }) })] }) }), _jsx(Box, { children: _jsx(Link, { href: "https://prosopo.io", target: "_blank", children: _jsx(Box, { children: _jsxs("div", { children: [_jsx("div", { css: logoStyle, dangerouslySetInnerHTML: {
|
|
174
|
+
__html: props.config.theme === 'light'
|
|
175
|
+
? logoWithoutTextBlack
|
|
176
|
+
: logoWithoutTextWhite,
|
|
177
|
+
} }), _jsx("div", { css: logoStyle, dangerouslySetInnerHTML: {
|
|
178
|
+
__html: props.config.theme === 'light'
|
|
179
|
+
? logoWithTextBlack
|
|
180
|
+
: logoWithTextWhite,
|
|
181
|
+
} })] }) }) }) })] })] })] }) }));
|
|
168
182
|
};
|
|
169
|
-
const
|
|
170
|
-
const
|
|
183
|
+
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>';
|
|
184
|
+
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>';
|
|
185
|
+
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>';
|
|
186
|
+
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>';
|
|
171
187
|
//# sourceMappingURL=Procaptcha.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Procaptcha.js","sourceRoot":"","sources":["../../src/components/Procaptcha.tsx"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,sCAAsC;AACtC,OAAO,EAGH,OAAO,GAOV,MAAM,qBAAqB,CAA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;gEAC1B,CAAC,CAAC,oBAAoB;gEACtB,CAAC,CAAC,oBAAoB;yDACjC,GACH,EACF,cACI,GAAG,EAAE,SAAS,EACd,uBAAuB,EAAE;4DACrB,MAAM,EACF,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,OAAO;gEAC1B,CAAC,CAAC,iBAAiB;gEACnB,CAAC,CAAC,iBAAiB;yDAC9B,GACH,IACA,GACJ,GACH,GACL,IACJ,IACJ,IACJ,GACM,CACnB,CAAA;AACL,CAAC,CAAA;AAED,MAAM,iBAAiB,GACnB,olHAAolH,CAAA;AAExlH,MAAM,iBAAiB,GACnB,ilHAAilH,CAAA;AAErlH,MAAM,oBAAoB,GACtB,+uCAA+uC,CAAA;AAEnvC,MAAM,oBAAoB,GACtB,2vCAA2vC,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export
|
|
1
|
+
export declare const lightTheme: import("@mui/material").Theme;
|
|
2
|
+
export declare const darkTheme: import("@mui/material").Theme;
|
|
3
3
|
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/components/theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/components/theme.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,UAAU,+BAWrB,CAAA;AAEF,eAAO,MAAM,SAAS,+BAWpB,CAAA"}
|
package/dist/components/theme.js
CHANGED
|
@@ -12,12 +12,28 @@
|
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
import { createTheme } from '@mui/material';
|
|
15
|
-
export
|
|
15
|
+
export const lightTheme = createTheme({
|
|
16
16
|
palette: {
|
|
17
|
+
mode: 'light',
|
|
18
|
+
primary: {
|
|
19
|
+
main: '#1976d2',
|
|
20
|
+
contrastText: '#000',
|
|
21
|
+
},
|
|
22
|
+
background: {
|
|
23
|
+
default: '#fff',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
export const darkTheme = createTheme({
|
|
28
|
+
palette: {
|
|
29
|
+
mode: 'dark',
|
|
17
30
|
primary: {
|
|
18
31
|
main: '#1976d2',
|
|
19
32
|
contrastText: '#fff',
|
|
20
33
|
},
|
|
34
|
+
background: {
|
|
35
|
+
default: '#303030',
|
|
36
|
+
},
|
|
21
37
|
},
|
|
22
38
|
});
|
|
23
39
|
//# sourceMappingURL=theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/components/theme.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/components/theme.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;IAClC,OAAO,EAAE;QACL,IAAI,EAAE,OAAO;QACb,OAAO,EAAE;YACL,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,MAAM;SACvB;QACD,UAAU,EAAE;YACR,OAAO,EAAE,MAAM;SAClB;KACJ;CACJ,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;IACjC,OAAO,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE;YACL,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,MAAM;SACvB;QACD,UAAU,EAAE;YACR,OAAO,EAAE,SAAS;SACrB;KACJ;CACJ,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"type": "module",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=16",
|
|
10
|
+
"npm": "8.9"
|
|
11
|
+
},
|
|
8
12
|
"exports": {
|
|
9
13
|
".": {
|
|
10
14
|
"import": "./dist/index.js",
|
|
@@ -31,16 +35,16 @@
|
|
|
31
35
|
"@polkadot/extension-dapp": "0.46.5",
|
|
32
36
|
"@polkadot/extension-inject": "0.46.5",
|
|
33
37
|
"@polkadot/types": "10.9.1",
|
|
34
|
-
"@prosopo/common": "0.2.
|
|
35
|
-
"@prosopo/procaptcha": "0.2.
|
|
38
|
+
"@prosopo/common": "0.2.5",
|
|
39
|
+
"@prosopo/procaptcha": "0.2.5",
|
|
36
40
|
"i18next": "^21.9.2",
|
|
37
41
|
"react": "^18.2.0",
|
|
38
42
|
"react-dom": "^18.2.0",
|
|
39
43
|
"zod": "^3.17.9"
|
|
40
44
|
},
|
|
41
45
|
"devDependencies": {
|
|
42
|
-
"tslib": "
|
|
43
|
-
"typescript": "
|
|
46
|
+
"tslib": "2.6.2",
|
|
47
|
+
"typescript": "5.1.6"
|
|
44
48
|
},
|
|
45
49
|
"repository": {
|
|
46
50
|
"type": "git",
|