@prosopo/procaptcha-react 0.2.40 → 0.2.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Modal.cjs +27 -3
- package/dist/components/Button.d.ts +10 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Button.js +55 -65
- package/dist/components/Button.js.map +1 -0
- package/dist/components/CaptchaComponent.d.ts +14 -0
- package/dist/components/CaptchaComponent.d.ts.map +1 -0
- package/dist/components/CaptchaComponent.js +59 -156
- package/dist/components/CaptchaComponent.js.map +1 -0
- package/dist/components/CaptchaPlaceholder.d.ts +6 -0
- package/dist/components/CaptchaPlaceholder.d.ts.map +1 -0
- package/dist/components/CaptchaPlaceholder.js +42 -97
- package/dist/components/CaptchaPlaceholder.js.map +1 -0
- package/dist/components/CaptchaWidget.d.ts +9 -0
- package/dist/components/CaptchaWidget.d.ts.map +1 -0
- package/dist/components/CaptchaWidget.js +66 -144
- package/dist/components/CaptchaWidget.js.map +1 -0
- package/dist/components/Checkbox.d.ts +9 -0
- package/dist/components/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox.js +31 -45
- package/dist/components/Checkbox.js.map +1 -0
- package/dist/components/ExtensionAccountSelect.d.ts +7 -0
- package/dist/components/ExtensionAccountSelect.d.ts.map +1 -0
- package/dist/components/ExtensionAccountSelect.js +30 -47
- package/dist/components/ExtensionAccountSelect.js.map +1 -0
- package/dist/components/LoadingSpinner.d.ts +6 -0
- package/dist/components/LoadingSpinner.d.ts.map +1 -0
- package/dist/components/LoadingSpinner.js +10 -12
- package/dist/components/LoadingSpinner.js.map +1 -0
- package/dist/components/Modal.d.ts +8 -0
- package/dist/components/Modal.d.ts.map +1 -0
- package/dist/components/Modal.js +36 -16
- package/dist/components/Modal.js.map +1 -0
- package/dist/components/Procaptcha.d.ts +6 -0
- package/dist/components/Procaptcha.d.ts.map +1 -0
- package/dist/components/Procaptcha.js +7 -8
- package/dist/components/Procaptcha.js.map +1 -0
- package/dist/components/ProcaptchaWidget.d.ts +8 -0
- package/dist/components/ProcaptchaWidget.d.ts.map +1 -0
- package/dist/components/ProcaptchaWidget.js +130 -221
- package/dist/components/ProcaptchaWidget.js.map +1 -0
- package/dist/components/collector.d.ts +8 -0
- package/dist/components/collector.d.ts.map +1 -0
- package/dist/components/collector.js +23 -24
- package/dist/components/collector.js.map +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +7 -11
- package/dist/components/index.js.map +1 -0
- package/dist/components/theme.d.ts +51 -0
- package/dist/components/theme.d.ts.map +1 -0
- package/dist/components/theme.js +35 -38
- package/dist/components/theme.js.map +1 -0
- package/dist/index.d.ts +3 -42
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -12
- package/dist/index.js.map +1 -0
- package/dist/util/index.d.ts +9 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/index.js +7 -12
- package/dist/util/index.js.map +1 -0
- package/package.json +7 -7
- package/dist/cjs/style/Modal.css +0 -41
- package/dist/style/Modal.css +0 -41
- package/public/style/Modal.css +0 -41
- package/vite.config.ts +0 -22
package/dist/components/theme.js
CHANGED
|
@@ -1,44 +1,41 @@
|
|
|
1
1
|
const grey = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
0: '#fff',
|
|
3
|
+
100: '#f5f5f5',
|
|
4
|
+
200: '#eeeeee',
|
|
5
|
+
300: '#e0e0e0',
|
|
6
|
+
400: '#bdbdbd',
|
|
7
|
+
500: '#9e9e9e',
|
|
8
|
+
600: '#757575',
|
|
9
|
+
700: '#616161',
|
|
10
|
+
800: '#424242',
|
|
11
|
+
900: '#212121',
|
|
12
12
|
};
|
|
13
|
-
const lightTheme = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
export const lightTheme = {
|
|
14
|
+
palette: {
|
|
15
|
+
mode: 'light',
|
|
16
|
+
primary: {
|
|
17
|
+
main: '#487DFA',
|
|
18
|
+
contrastText: '#fff',
|
|
19
|
+
},
|
|
20
|
+
background: {
|
|
21
|
+
default: '#fff',
|
|
22
|
+
contrastText: '#000',
|
|
23
|
+
},
|
|
24
|
+
grey,
|
|
19
25
|
},
|
|
20
|
-
background: {
|
|
21
|
-
default: "#fff",
|
|
22
|
-
contrastText: "#000"
|
|
23
|
-
},
|
|
24
|
-
grey
|
|
25
|
-
}
|
|
26
26
|
};
|
|
27
|
-
const darkTheme = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
export const darkTheme = {
|
|
28
|
+
palette: {
|
|
29
|
+
mode: 'dark',
|
|
30
|
+
primary: {
|
|
31
|
+
main: '#487DFA',
|
|
32
|
+
contrastText: '#fff',
|
|
33
|
+
},
|
|
34
|
+
background: {
|
|
35
|
+
default: '#303030',
|
|
36
|
+
contrastText: '#fff',
|
|
37
|
+
},
|
|
38
|
+
grey,
|
|
37
39
|
},
|
|
38
|
-
grey
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
darkTheme,
|
|
43
|
-
lightTheme
|
|
44
40
|
};
|
|
41
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/components/theme.ts"],"names":[],"mappings":"AAcA,MAAM,IAAI,GAAG;IACT,CAAC,EAAE,MAAM;IACT,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;CACjB,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,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;YACf,YAAY,EAAE,MAAM;SACvB;QACD,IAAI;KACP;CACJ,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,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;YAClB,YAAY,EAAE,MAAM;SACvB;QACD,IAAI;KACP;CACJ,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,42 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { ProcaptchaCallbacks } from '@prosopo/procaptcha';
|
|
5
|
-
import { ProcaptchaConfigOptional } from '@prosopo/procaptcha';
|
|
6
|
-
|
|
7
|
-
export declare interface CaptchaComponentProps {
|
|
8
|
-
challenge: GetCaptchaResponse;
|
|
9
|
-
index: number;
|
|
10
|
-
solutions: string[][];
|
|
11
|
-
onSubmit: () => void;
|
|
12
|
-
onCancel: () => void;
|
|
13
|
-
onClick: (hash: string) => void;
|
|
14
|
-
onNext: () => void;
|
|
15
|
-
themeColor: 'light' | 'dark';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export declare const CaptchaWidget: ({ challenge, solution, onClick, themeColor }: CaptchaWidgetProps) => JSX_2.Element;
|
|
19
|
-
|
|
20
|
-
export declare interface CaptchaWidgetProps {
|
|
21
|
-
challenge: CaptchaResponseCaptcha;
|
|
22
|
-
solution: string[];
|
|
23
|
-
onClick: (hash: string) => void;
|
|
24
|
-
themeColor: 'light' | 'dark';
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export declare const ExtensionAccountSelect: ({ value, dappName, onChange, }: {
|
|
28
|
-
value?: string | undefined;
|
|
29
|
-
dappName: string;
|
|
30
|
-
onChange: (value: string) => void;
|
|
31
|
-
}) => JSX_2.Element;
|
|
32
|
-
|
|
33
|
-
export declare const Procaptcha: (props: ProcaptchaProps) => JSX_2.Element;
|
|
34
|
-
|
|
35
|
-
declare interface ProcaptchaProps {
|
|
36
|
-
config: ProcaptchaConfigOptional;
|
|
37
|
-
callbacks?: Partial<ProcaptchaCallbacks>;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export declare const ProcaptchaWidget: (props: ProcaptchaProps) => JSX_2.Element;
|
|
41
|
-
|
|
42
|
-
export { }
|
|
1
|
+
export * from './components/index.js';
|
|
2
|
+
export * from './util/index.js';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { default as default2 } from "./components/ProcaptchaWidget.js";
|
|
5
|
-
import { default as default3 } from "./components/Procaptcha.js";
|
|
6
|
-
import { CaptchaWidget } from "./components/CaptchaWidget.js";
|
|
7
|
-
export {
|
|
8
|
-
CaptchaWidget,
|
|
9
|
-
ExtensionAccountSelect,
|
|
10
|
-
default3 as Procaptcha,
|
|
11
|
-
default2 as ProcaptchaWidget
|
|
12
|
-
};
|
|
1
|
+
export * from './components/index.js';
|
|
2
|
+
export * from './util/index.js';
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAChC,OAAO,EACP,GAAG,GACN,EAAE;IACC,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACnC,GAAG,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CAClC,MAKA"}
|
package/dist/util/index.js
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
function renameKeysForDataAttr(data = {}) {
|
|
2
|
-
|
|
2
|
+
return Object.keys(data).reduce((prev, curr) => ({ ...prev, [`data-${curr}`]: data[curr] }), {});
|
|
3
3
|
}
|
|
4
|
-
function addDataAttr({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
...renameKeysForDataAttr(general),
|
|
10
|
-
...process.env.NODE_ENV === "development" ? renameKeysForDataAttr(dev) : {}
|
|
11
|
-
};
|
|
4
|
+
export default function addDataAttr({ general, dev, }) {
|
|
5
|
+
return {
|
|
6
|
+
...renameKeysForDataAttr(general),
|
|
7
|
+
...(process.env.NODE_ENV === 'development' ? renameKeysForDataAttr(dev) : {}),
|
|
8
|
+
};
|
|
12
9
|
}
|
|
13
|
-
|
|
14
|
-
addDataAttr as default
|
|
15
|
-
};
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAaA,SAAS,qBAAqB,CAAC,OAAkC,EAAE;IAC/D,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;AACpG,CAAC;AAOD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAChC,OAAO,EACP,GAAG,GAIN;IACG,OAAO;QACH,GAAG,qBAAqB,CAAC,OAAO,CAAC;QACjC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC,CAAC,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAChF,CAAA;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.41",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"source": "./src/index.ts",
|
|
21
21
|
"scripts": {
|
|
22
22
|
"clean": "tsc --build --clean",
|
|
23
|
-
"build": "
|
|
23
|
+
"build": "tsc --build --verbose tsconfig.json",
|
|
24
24
|
"build:cjs": "npx vite --config vite.cjs.config.ts build",
|
|
25
25
|
"eslint": "npx eslint . --no-error-on-unmatched-pattern --ignore-path ../../.eslintignore",
|
|
26
26
|
"eslint:fix": "npm run eslint -- --fix",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"@emotion/styled": "^11.11.0",
|
|
38
38
|
"@polkadot/extension-dapp": "0.46.6",
|
|
39
39
|
"@polkadot/extension-inject": "0.46.6",
|
|
40
|
-
"@prosopo/api": "0.2.
|
|
41
|
-
"@prosopo/common": "0.2.
|
|
42
|
-
"@prosopo/procaptcha": "0.2.
|
|
43
|
-
"@prosopo/types": "0.2.
|
|
44
|
-
"@prosopo/util": "0.2.
|
|
40
|
+
"@prosopo/api": "0.2.41",
|
|
41
|
+
"@prosopo/common": "0.2.41",
|
|
42
|
+
"@prosopo/procaptcha": "0.2.41",
|
|
43
|
+
"@prosopo/types": "0.2.41",
|
|
44
|
+
"@prosopo/util": "0.2.41",
|
|
45
45
|
"react": "^18.2.0",
|
|
46
46
|
"react-dom": "^18.2.0"
|
|
47
47
|
},
|
package/dist/cjs/style/Modal.css
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
.modalOuter {
|
|
2
|
-
position: fixed;
|
|
3
|
-
z-index: 1300;
|
|
4
|
-
inset: 0;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.modalBackground {
|
|
8
|
-
position: fixed;
|
|
9
|
-
display: -webkit-box;
|
|
10
|
-
display: -webkit-flex;
|
|
11
|
-
display: -ms-flexbox;
|
|
12
|
-
display: flex;
|
|
13
|
-
-webkit-align-items: center;
|
|
14
|
-
-webkit-box-align: center;
|
|
15
|
-
-ms-flex-align: center;
|
|
16
|
-
align-items: center;
|
|
17
|
-
-webkit-box-pack: center;
|
|
18
|
-
-ms-flex-pack: center;
|
|
19
|
-
-webkit-justify-content: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
right: 0;
|
|
22
|
-
bottom: 0;
|
|
23
|
-
top: 0;
|
|
24
|
-
left: 0;
|
|
25
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
26
|
-
-webkit-tap-highlight-color: transparent;
|
|
27
|
-
z-index: -1;
|
|
28
|
-
}
|
|
29
|
-
.modalInner {
|
|
30
|
-
position: absolute;
|
|
31
|
-
top: 50%;
|
|
32
|
-
left: 50%;
|
|
33
|
-
transform: translate(-50%, -50%);
|
|
34
|
-
width: 400px;
|
|
35
|
-
background-color: rgb(255, 255, 255);
|
|
36
|
-
border: none;
|
|
37
|
-
box-shadow:
|
|
38
|
-
rgba(0, 0, 0, 0.2) 0px 11px 15px -7px,
|
|
39
|
-
rgba(0, 0, 0, 0.14) 0px 24px 38px 3px,
|
|
40
|
-
rgba(0, 0, 0, 0.12) 0px 9px 46px 8px;
|
|
41
|
-
}
|
package/dist/style/Modal.css
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
.modalOuter {
|
|
2
|
-
position: fixed;
|
|
3
|
-
z-index: 1300;
|
|
4
|
-
inset: 0;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.modalBackground {
|
|
8
|
-
position: fixed;
|
|
9
|
-
display: -webkit-box;
|
|
10
|
-
display: -webkit-flex;
|
|
11
|
-
display: -ms-flexbox;
|
|
12
|
-
display: flex;
|
|
13
|
-
-webkit-align-items: center;
|
|
14
|
-
-webkit-box-align: center;
|
|
15
|
-
-ms-flex-align: center;
|
|
16
|
-
align-items: center;
|
|
17
|
-
-webkit-box-pack: center;
|
|
18
|
-
-ms-flex-pack: center;
|
|
19
|
-
-webkit-justify-content: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
right: 0;
|
|
22
|
-
bottom: 0;
|
|
23
|
-
top: 0;
|
|
24
|
-
left: 0;
|
|
25
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
26
|
-
-webkit-tap-highlight-color: transparent;
|
|
27
|
-
z-index: -1;
|
|
28
|
-
}
|
|
29
|
-
.modalInner {
|
|
30
|
-
position: absolute;
|
|
31
|
-
top: 50%;
|
|
32
|
-
left: 50%;
|
|
33
|
-
transform: translate(-50%, -50%);
|
|
34
|
-
width: 400px;
|
|
35
|
-
background-color: rgb(255, 255, 255);
|
|
36
|
-
border: none;
|
|
37
|
-
box-shadow:
|
|
38
|
-
rgba(0, 0, 0, 0.2) 0px 11px 15px -7px,
|
|
39
|
-
rgba(0, 0, 0, 0.14) 0px 24px 38px 3px,
|
|
40
|
-
rgba(0, 0, 0, 0.12) 0px 9px 46px 8px;
|
|
41
|
-
}
|
package/public/style/Modal.css
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
.modalOuter {
|
|
2
|
-
position: fixed;
|
|
3
|
-
z-index: 1300;
|
|
4
|
-
inset: 0;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.modalBackground {
|
|
8
|
-
position: fixed;
|
|
9
|
-
display: -webkit-box;
|
|
10
|
-
display: -webkit-flex;
|
|
11
|
-
display: -ms-flexbox;
|
|
12
|
-
display: flex;
|
|
13
|
-
-webkit-align-items: center;
|
|
14
|
-
-webkit-box-align: center;
|
|
15
|
-
-ms-flex-align: center;
|
|
16
|
-
align-items: center;
|
|
17
|
-
-webkit-box-pack: center;
|
|
18
|
-
-ms-flex-pack: center;
|
|
19
|
-
-webkit-justify-content: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
right: 0;
|
|
22
|
-
bottom: 0;
|
|
23
|
-
top: 0;
|
|
24
|
-
left: 0;
|
|
25
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
26
|
-
-webkit-tap-highlight-color: transparent;
|
|
27
|
-
z-index: -1;
|
|
28
|
-
}
|
|
29
|
-
.modalInner {
|
|
30
|
-
position: absolute;
|
|
31
|
-
top: 50%;
|
|
32
|
-
left: 50%;
|
|
33
|
-
transform: translate(-50%, -50%);
|
|
34
|
-
width: 400px;
|
|
35
|
-
background-color: rgb(255, 255, 255);
|
|
36
|
-
border: none;
|
|
37
|
-
box-shadow:
|
|
38
|
-
rgba(0, 0, 0, 0.2) 0px 11px 15px -7px,
|
|
39
|
-
rgba(0, 0, 0, 0.14) 0px 24px 38px 3px,
|
|
40
|
-
rgba(0, 0, 0, 0.12) 0px 9px 46px 8px;
|
|
41
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ViteCommonJSConfig } from '@prosopo/config'
|
|
2
|
-
import dts from 'vite-plugin-dts'
|
|
3
|
-
import path from 'path'
|
|
4
|
-
|
|
5
|
-
const base = path.resolve('./tsconfig.json')
|
|
6
|
-
|
|
7
|
-
export default async function () {
|
|
8
|
-
const commonJSconfig = await ViteCommonJSConfig('procaptcha-react', base)
|
|
9
|
-
return {
|
|
10
|
-
...commonJSconfig,
|
|
11
|
-
plugins: [...(commonJSconfig.plugins || []), dts({ rollupTypes: true })], // add the declaration files (d.ts) generation plugin
|
|
12
|
-
build: {
|
|
13
|
-
ssr: false,
|
|
14
|
-
...commonJSconfig.build,
|
|
15
|
-
outDir: 'dist',
|
|
16
|
-
lib: {
|
|
17
|
-
...commonJSconfig.build?.lib,
|
|
18
|
-
formats: ['es'],
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
}
|
|
22
|
-
}
|