@prosopo/procaptcha-bundle 2.1.16 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/defaultCallbacks.d.ts +4 -12
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/defaultCallbacks.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/defaultCallbacks.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.d.ts +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.js +5 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts +8 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.js +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts +6 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.js +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts +6 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.js +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts +6 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.js +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.d.ts +6 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.js +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.d.ts +8 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.js +24 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.d.ts +24 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.js +52 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.d.ts +2 -3
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.js +11 -57
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.js.map +1 -1
- package/dist/bundle/{Checkbox-Dg1RwCua.js → Checkbox-DM6n1-r-.js} +67 -67
- package/dist/bundle/{ProcaptchaWidget-BlgHuBfn.js → ProcaptchaWidget-CrcxpJLK.js} +8 -8
- package/dist/bundle/ProcaptchaWidget-DZb9vegH.js +628 -0
- package/dist/bundle/{index-CgI2y2A6.js → index-B27PXNfK.js} +9260 -9186
- package/dist/bundle/procaptcha.bundle.js +1 -1
- package/dist/bundle/util/defaultCallbacks.d.ts +4 -12
- package/dist/bundle/util/defaultCallbacks.d.ts.map +1 -1
- package/dist/bundle/util/renderLogic/captcha/captcha.d.ts +11 -0
- package/dist/bundle/util/renderLogic/captcha/captcha.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts +8 -0
- package/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts +6 -0
- package/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts +6 -0
- package/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts +6 -0
- package/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/captcha/componentsList.d.ts +6 -0
- package/dist/bundle/util/renderLogic/captcha/componentsList.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/webComponent.d.ts +8 -0
- package/dist/bundle/util/renderLogic/webComponent.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/widgetRenderer.d.ts +24 -0
- package/dist/bundle/util/renderLogic/widgetRenderer.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic.d.ts +2 -3
- package/dist/bundle/util/renderLogic.d.ts.map +1 -1
- package/dist/util/defaultCallbacks.d.ts +4 -12
- package/dist/util/defaultCallbacks.d.ts.map +1 -1
- package/dist/util/defaultCallbacks.js.map +1 -1
- package/dist/util/renderLogic/captcha/captcha.d.ts +11 -0
- package/dist/util/renderLogic/captcha/captcha.d.ts.map +1 -0
- package/dist/util/renderLogic/captcha/captcha.js +5 -0
- package/dist/util/renderLogic/captcha/captcha.js.map +1 -0
- package/dist/util/renderLogic/captcha/captchaRenderer.d.ts +8 -0
- package/dist/util/renderLogic/captcha/captchaRenderer.d.ts.map +1 -0
- package/dist/util/renderLogic/captcha/captchaRenderer.js +11 -0
- package/dist/util/renderLogic/captcha/captchaRenderer.js.map +1 -0
- package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts +6 -0
- package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.js +11 -0
- package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.js.map +1 -0
- package/dist/util/renderLogic/captcha/components/imageCaptcha.d.ts +6 -0
- package/dist/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/dist/util/renderLogic/captcha/components/imageCaptcha.js +11 -0
- package/dist/util/renderLogic/captcha/components/imageCaptcha.js.map +1 -0
- package/dist/util/renderLogic/captcha/components/powCaptcha.d.ts +6 -0
- package/dist/util/renderLogic/captcha/components/powCaptcha.d.ts.map +1 -0
- package/dist/util/renderLogic/captcha/components/powCaptcha.js +11 -0
- package/dist/util/renderLogic/captcha/components/powCaptcha.js.map +1 -0
- package/dist/util/renderLogic/captcha/componentsList.d.ts +6 -0
- package/dist/util/renderLogic/captcha/componentsList.d.ts.map +1 -0
- package/dist/util/renderLogic/captcha/componentsList.js +11 -0
- package/dist/util/renderLogic/captcha/componentsList.js.map +1 -0
- package/dist/util/renderLogic/webComponent.d.ts +8 -0
- package/dist/util/renderLogic/webComponent.d.ts.map +1 -0
- package/dist/util/renderLogic/webComponent.js +24 -0
- package/dist/util/renderLogic/webComponent.js.map +1 -0
- package/dist/util/renderLogic/widgetRenderer.d.ts +24 -0
- package/dist/util/renderLogic/widgetRenderer.d.ts.map +1 -0
- package/dist/util/renderLogic/widgetRenderer.js +52 -0
- package/dist/util/renderLogic/widgetRenderer.js.map +1 -0
- package/dist/util/renderLogic.d.ts +2 -3
- package/dist/util/renderLogic.d.ts.map +1 -1
- package/dist/util/renderLogic.js +11 -57
- package/dist/util/renderLogic.js.map +1 -1
- package/package.json +9 -9
- package/stats.html +1 -1
- package/dist/bundle/ProcaptchaWidget-DGAVVetC.js +0 -652
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ProcaptchaRenderOptions, type ProcaptchaToken } from "@prosopo/types";
|
|
2
2
|
export declare const getWindowCallback: (callbackName: string) => any;
|
|
3
|
-
export
|
|
3
|
+
export interface Callbacks {
|
|
4
4
|
onHuman: (token: ProcaptchaToken) => void;
|
|
5
5
|
onChallengeExpired: () => void;
|
|
6
6
|
onExpired: () => void;
|
|
@@ -9,15 +9,7 @@ export declare const getDefaultCallbacks: (element: Element) => {
|
|
|
9
9
|
onOpen: () => void;
|
|
10
10
|
onFailed: () => void;
|
|
11
11
|
onReset: () => void;
|
|
12
|
-
}
|
|
13
|
-
export declare
|
|
14
|
-
|
|
15
|
-
onChallengeExpired: () => void;
|
|
16
|
-
onExpired: () => void;
|
|
17
|
-
onError: (error: Error) => void;
|
|
18
|
-
onClose: () => void;
|
|
19
|
-
onOpen: () => void;
|
|
20
|
-
onFailed: () => void;
|
|
21
|
-
onReset: () => void;
|
|
22
|
-
}, element: Element): void;
|
|
12
|
+
}
|
|
13
|
+
export declare const getDefaultCallbacks: (element: Element) => Callbacks;
|
|
14
|
+
export declare function setUserCallbacks(renderOptions: ProcaptchaRenderOptions | undefined, callbacks: Callbacks, element: Element): void;
|
|
23
15
|
//# sourceMappingURL=defaultCallbacks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultCallbacks.d.ts","sourceRoot":"","sources":["../../../src/util/defaultCallbacks.ts"],"names":[],"mappings":"AAaA,OAAO,EAEN,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,MAAM,gBAAgB,CAAC;AAGxB,eAAO,MAAM,iBAAiB,iBAAkB,MAAM,QASrD,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"defaultCallbacks.d.ts","sourceRoot":"","sources":["../../../src/util/defaultCallbacks.ts"],"names":[],"mappings":"AAaA,OAAO,EAEN,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,MAAM,gBAAgB,CAAC;AAGxB,eAAO,MAAM,iBAAiB,iBAAkB,MAAM,QASrD,CAAC;AAEF,MAAM,WAAW,SAAS;IACzB,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC1C,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAChC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,SA2BrD,CAAC;AAEH,wBAAgB,gBAAgB,CAC/B,aAAa,EAAE,uBAAuB,GAAG,SAAS,EAClD,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,QAyIhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultCallbacks.js","sourceRoot":"","sources":["../../../src/util/defaultCallbacks.ts"],"names":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,kBAAkB,CAAC,CACxD,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;AAClC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ProcaptchaClientConfigOutput } from "@prosopo/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { Callbacks } from "../../defaultCallbacks.js";
|
|
4
|
+
interface CaptchaProps {
|
|
5
|
+
config: ProcaptchaClientConfigOutput;
|
|
6
|
+
callbacks: Callbacks;
|
|
7
|
+
}
|
|
8
|
+
declare abstract class CaptchaElement extends React.Component<CaptchaProps> {
|
|
9
|
+
}
|
|
10
|
+
export { type CaptchaProps, CaptchaElement };
|
|
11
|
+
//# sourceMappingURL=captcha.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captcha.d.ts","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/captcha.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,UAAU,YAAY;IACrB,MAAM,EAAE,4BAA4B,CAAC;IACrC,SAAS,EAAE,SAAS,CAAC;CACrB;AAED,uBAAe,cAAe,SAAQ,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC;CAAG;AAEtE,OAAO,EAAE,KAAK,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captcha.js","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/captcha.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAe,cAAe,SAAQ,KAAK,CAAC,SAAuB;CAAG;AAEtE,OAAO,EAAqB,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FeaturesEnum } from "@prosopo/types";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import type { CaptchaProps } from "./captcha.js";
|
|
4
|
+
declare class CaptchaRenderer {
|
|
5
|
+
render(captchaType: FeaturesEnum, captchaProps: CaptchaProps): ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export { CaptchaRenderer };
|
|
8
|
+
//# sourceMappingURL=captchaRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captchaRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/captchaRenderer.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD,cAAM,eAAe;IACb,MAAM,CACZ,WAAW,EAAE,YAAY,EACzB,YAAY,EAAE,YAAY,GACxB,SAAS;CAYZ;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { componentsList } from "./componentsList.js";
|
|
3
|
+
class CaptchaRenderer {
|
|
4
|
+
render(captchaType, captchaProps) {
|
|
5
|
+
const CaptchaComponent = componentsList[captchaType];
|
|
6
|
+
console.log(`rendering ${captchaType}`);
|
|
7
|
+
return (_jsx(CaptchaComponent, { config: captchaProps.config, callbacks: captchaProps.callbacks }));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export { CaptchaRenderer };
|
|
11
|
+
//# sourceMappingURL=captchaRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captchaRenderer.js","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/captchaRenderer.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,eAAe;IACb,MAAM,CACZ,WAAyB,EACzB,YAA0B;QAE1B,MAAM,gBAAgB,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QAErD,OAAO,CAAC,GAAG,CAAC,aAAa,WAAW,EAAE,CAAC,CAAC;QAExC,OAAO,CACN,KAAC,gBAAgB,IAChB,MAAM,EAAE,YAAY,CAAC,MAAM,EAC3B,SAAS,EAAE,YAAY,CAAC,SAAS,GAChC,CACF,CAAC;IACH,CAAC;CACD;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frictionlessCaptcha.d.ts","sourceRoot":"","sources":["../../../../../../src/util/renderLogic/captcha/components/frictionlessCaptcha.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,cAAM,mBAAoB,SAAQ,cAAc;IAC/B,MAAM;CAKtB;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ProcaptchaFrictionless } from "@prosopo/procaptcha-frictionless";
|
|
3
|
+
import { CaptchaElement } from "../captcha.js";
|
|
4
|
+
class FrictionlessCaptcha extends CaptchaElement {
|
|
5
|
+
render() {
|
|
6
|
+
const { config, callbacks } = this.props;
|
|
7
|
+
return _jsx(ProcaptchaFrictionless, { config: config, callbacks: callbacks });
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export { FrictionlessCaptcha };
|
|
11
|
+
//# sourceMappingURL=frictionlessCaptcha.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frictionlessCaptcha.js","sourceRoot":"","sources":["../../../../../../src/util/renderLogic/captcha/components/frictionlessCaptcha.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,mBAAoB,SAAQ,cAAc;IAC/B,MAAM;QACrB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzC,OAAO,KAAC,sBAAsB,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;IACzE,CAAC;CACD;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageCaptcha.d.ts","sourceRoot":"","sources":["../../../../../../src/util/renderLogic/captcha/components/imageCaptcha.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,cAAM,YAAa,SAAQ,cAAc;IACxB,MAAM;CAKtB;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Procaptcha } from "@prosopo/procaptcha-react";
|
|
3
|
+
import { CaptchaElement } from "../captcha.js";
|
|
4
|
+
class ImageCaptcha extends CaptchaElement {
|
|
5
|
+
render() {
|
|
6
|
+
const { config, callbacks } = this.props;
|
|
7
|
+
return _jsx(Procaptcha, { config: config, callbacks: callbacks });
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export { ImageCaptcha };
|
|
11
|
+
//# sourceMappingURL=imageCaptcha.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageCaptcha.js","sourceRoot":"","sources":["../../../../../../src/util/renderLogic/captcha/components/imageCaptcha.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,YAAa,SAAQ,cAAc;IACxB,MAAM;QACrB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzC,OAAO,KAAC,UAAU,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;IAC7D,CAAC;CACD;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"powCaptcha.d.ts","sourceRoot":"","sources":["../../../../../../src/util/renderLogic/captcha/components/powCaptcha.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,cAAM,UAAW,SAAQ,cAAc;IACtB,MAAM;CAKtB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ProcaptchaPow } from "@prosopo/procaptcha-pow";
|
|
3
|
+
import { CaptchaElement } from "../captcha.js";
|
|
4
|
+
class PowCaptcha extends CaptchaElement {
|
|
5
|
+
render() {
|
|
6
|
+
const { config, callbacks } = this.props;
|
|
7
|
+
return _jsx(ProcaptchaPow, { config: config, callbacks: callbacks });
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export { PowCaptcha };
|
|
11
|
+
//# sourceMappingURL=powCaptcha.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"powCaptcha.js","sourceRoot":"","sources":["../../../../../../src/util/renderLogic/captcha/components/powCaptcha.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,UAAW,SAAQ,cAAc;IACtB,MAAM;QACrB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzC,OAAO,KAAC,aAAa,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;IAChE,CAAC;CACD;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FeaturesEnum } from "@prosopo/types";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { CaptchaProps } from "./captcha.js";
|
|
4
|
+
declare const componentsList: Record<FeaturesEnum, React.ComponentType<CaptchaProps>>;
|
|
5
|
+
export { componentsList };
|
|
6
|
+
//# sourceMappingURL=componentsList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentsList.d.ts","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/componentsList.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAKjD,QAAA,MAAM,cAAc,EAAE,MAAM,CAC3B,YAAY,EACZ,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAKjC,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FeaturesEnum } from "@prosopo/types";
|
|
2
|
+
import { FrictionlessCaptcha } from "./components/frictionlessCaptcha.js";
|
|
3
|
+
import { ImageCaptcha } from "./components/imageCaptcha.js";
|
|
4
|
+
import { PowCaptcha } from "./components/powCaptcha.js";
|
|
5
|
+
const componentsList = {
|
|
6
|
+
[FeaturesEnum.Image]: ImageCaptcha,
|
|
7
|
+
[FeaturesEnum.Pow]: PowCaptcha,
|
|
8
|
+
[FeaturesEnum.Frictionless]: FrictionlessCaptcha,
|
|
9
|
+
};
|
|
10
|
+
export { componentsList };
|
|
11
|
+
//# sourceMappingURL=componentsList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentsList.js","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/componentsList.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,MAAM,cAAc,GAGhB;IACH,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,YAAY;IAClC,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,UAAU;IAC9B,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,mBAAmB;CAChD,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare class WebComponent {
|
|
2
|
+
addToElement(componentTag: string, element: Element): ShadowRoot;
|
|
3
|
+
protected makeWebComponent(componentTag: string): HTMLElement;
|
|
4
|
+
protected getBaseShadowStyles(): string;
|
|
5
|
+
protected attachShadowDom(webComponent: HTMLElement): ShadowRoot;
|
|
6
|
+
}
|
|
7
|
+
export { WebComponent };
|
|
8
|
+
//# sourceMappingURL=webComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webComponent.d.ts","sourceRoot":"","sources":["../../../../src/util/renderLogic/webComponent.ts"],"names":[],"mappings":"AAaA,cAAM,YAAY;IACV,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU;IASvE,SAAS,CAAC,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW;IAI7D,SAAS,CAAC,mBAAmB,IAAI,MAAM;IAWvC,SAAS,CAAC,eAAe,CAAC,YAAY,EAAE,WAAW,GAAG,UAAU;CAOhE;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
class WebComponent {
|
|
2
|
+
addToElement(componentTag, element) {
|
|
3
|
+
const webComponent = this.makeWebComponent(componentTag);
|
|
4
|
+
const shadowRoot = this.attachShadowDom(webComponent);
|
|
5
|
+
element.appendChild(webComponent);
|
|
6
|
+
return shadowRoot;
|
|
7
|
+
}
|
|
8
|
+
makeWebComponent(componentTag) {
|
|
9
|
+
return document.createElement(componentTag);
|
|
10
|
+
}
|
|
11
|
+
getBaseShadowStyles() {
|
|
12
|
+
const customCss = "";
|
|
13
|
+
let baseStyles = '<style>:host{all:initial!important;}:host *{font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";}</style>';
|
|
14
|
+
baseStyles += "" !== customCss ? `<style>${customCss}</style>` : "";
|
|
15
|
+
return baseStyles;
|
|
16
|
+
}
|
|
17
|
+
attachShadowDom(webComponent) {
|
|
18
|
+
const shadowRoot = webComponent.attachShadow({ mode: "open" });
|
|
19
|
+
shadowRoot.innerHTML += this.getBaseShadowStyles();
|
|
20
|
+
return shadowRoot;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export { WebComponent };
|
|
24
|
+
//# sourceMappingURL=webComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webComponent.js","sourceRoot":"","sources":["../../../../src/util/renderLogic/webComponent.ts"],"names":[],"mappings":"AAaA,MAAM,YAAY;IACV,YAAY,CAAC,YAAoB,EAAE,OAAgB;QACzD,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;QACzD,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QAEtD,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAElC,OAAO,UAAU,CAAC;IACnB,CAAC;IAES,gBAAgB,CAAC,YAAoB;QAC9C,OAAO,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAC7C,CAAC;IAES,mBAAmB;QAE5B,MAAM,SAAS,GAAG,EAAE,CAAC;QAErB,IAAI,UAAU,GACb,uLAAuL,CAAC;QACzL,UAAU,IAAI,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,SAAS,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;QAEpE,OAAO,UAAU,CAAC;IACnB,CAAC;IAES,eAAe,CAAC,YAAyB;QAClD,MAAM,UAAU,GAAG,YAAY,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAE/D,UAAU,CAAC,SAAS,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAEnD,OAAO,UAAU,CAAC;IACnB,CAAC;CACD;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type EmotionCache } from "@emotion/cache";
|
|
2
|
+
import type { ProcaptchaClientConfigOutput, ProcaptchaRenderOptions } from "@prosopo/types";
|
|
3
|
+
import type { FeaturesEnum } from "@prosopo/types";
|
|
4
|
+
import { type Root } from "react-dom/client";
|
|
5
|
+
import { type Callbacks } from "../defaultCallbacks.js";
|
|
6
|
+
import type { CaptchaRenderer } from "./captcha/captchaRenderer.js";
|
|
7
|
+
import type { WebComponent } from "./webComponent.js";
|
|
8
|
+
interface RenderSettings {
|
|
9
|
+
identifierPrefix: string;
|
|
10
|
+
emotionCacheKey: string;
|
|
11
|
+
webComponentTag: string;
|
|
12
|
+
defaultCaptchaType: FeaturesEnum;
|
|
13
|
+
}
|
|
14
|
+
declare class WidgetRenderer {
|
|
15
|
+
private readonly webComponent;
|
|
16
|
+
private readonly captchaRenderer;
|
|
17
|
+
constructor(webComponent: WebComponent, captchaRenderer: CaptchaRenderer);
|
|
18
|
+
renderElements(settings: RenderSettings, elements: Element[], config: ProcaptchaClientConfigOutput, renderOptions?: ProcaptchaRenderOptions): Root[];
|
|
19
|
+
protected renderElement(settings: RenderSettings, element: Element, config: ProcaptchaClientConfigOutput, renderOptions?: ProcaptchaRenderOptions): Root;
|
|
20
|
+
protected readAndValidateSettings(element: Element, callbacks: Callbacks, config: ProcaptchaClientConfigOutput, renderOptions?: ProcaptchaRenderOptions): void;
|
|
21
|
+
protected makeEmotionCache(cacheKey: string, shadowRoot: ShadowRoot): EmotionCache;
|
|
22
|
+
}
|
|
23
|
+
export { WidgetRenderer };
|
|
24
|
+
//# sourceMappingURL=widgetRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetRenderer.d.ts","sourceRoot":"","sources":["../../../../src/util/renderLogic/widgetRenderer.tsx"],"names":[],"mappings":"AAaA,OAAoB,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EACX,4BAA4B,EAC5B,uBAAuB,EACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,kBAAkB,CAAC;AACzD,OAAO,EACN,KAAK,SAAS,EAGd,MAAM,wBAAwB,CAAC;AAIhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,UAAU,cAAc;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,YAAY,CAAC;CACjC;AAED,cAAM,cAAc;IACnB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAC5C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;gBAEtC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe;IAKjE,cAAc,CACpB,QAAQ,EAAE,cAAc,EACxB,QAAQ,EAAE,OAAO,EAAE,EACnB,MAAM,EAAE,4BAA4B,EACpC,aAAa,CAAC,EAAE,uBAAuB,GACrC,IAAI,EAAE;IAMT,SAAS,CAAC,aAAa,CACtB,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,4BAA4B,EACpC,aAAa,CAAC,EAAE,uBAAuB,GACrC,IAAI;IAkCP,SAAS,CAAC,uBAAuB,CAChC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,4BAA4B,EACpC,aAAa,CAAC,EAAE,uBAAuB,GACrC,IAAI;IAOP,SAAS,CAAC,gBAAgB,CACzB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,UAAU,GACpB,YAAY;CAOf;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import createCache from "@emotion/cache";
|
|
3
|
+
import { CacheProvider } from "@emotion/react";
|
|
4
|
+
import { createRoot } from "react-dom/client";
|
|
5
|
+
import { getDefaultCallbacks, setUserCallbacks, } from "../defaultCallbacks.js";
|
|
6
|
+
import { setLanguage } from "../language.js";
|
|
7
|
+
import { setTheme } from "../theme.js";
|
|
8
|
+
import { setValidChallengeLength } from "../timeout.js";
|
|
9
|
+
class WidgetRenderer {
|
|
10
|
+
constructor(webComponent, captchaRenderer) {
|
|
11
|
+
this.webComponent = webComponent;
|
|
12
|
+
this.captchaRenderer = captchaRenderer;
|
|
13
|
+
}
|
|
14
|
+
renderElements(settings, elements, config, renderOptions) {
|
|
15
|
+
return elements.map((element) => {
|
|
16
|
+
return this.renderElement(settings, element, config, renderOptions);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
renderElement(settings, element, config, renderOptions) {
|
|
20
|
+
const captchaType = renderOptions?.captchaType ||
|
|
21
|
+
settings.defaultCaptchaType;
|
|
22
|
+
const callbacks = getDefaultCallbacks(element);
|
|
23
|
+
this.readAndValidateSettings(element, callbacks, config, renderOptions);
|
|
24
|
+
element.innerHTML = "";
|
|
25
|
+
const shadowRoot = this.webComponent.addToElement(settings.webComponentTag, element);
|
|
26
|
+
const emotionCache = this.makeEmotionCache(settings.emotionCacheKey, shadowRoot);
|
|
27
|
+
const root = createRoot(shadowRoot, {
|
|
28
|
+
identifierPrefix: settings.identifierPrefix,
|
|
29
|
+
});
|
|
30
|
+
const captcha = this.captchaRenderer.render(captchaType, {
|
|
31
|
+
config: config,
|
|
32
|
+
callbacks: callbacks,
|
|
33
|
+
});
|
|
34
|
+
root.render(_jsx(CacheProvider, { value: emotionCache, children: captcha }));
|
|
35
|
+
return root;
|
|
36
|
+
}
|
|
37
|
+
readAndValidateSettings(element, callbacks, config, renderOptions) {
|
|
38
|
+
setUserCallbacks(renderOptions, callbacks, element);
|
|
39
|
+
setTheme(renderOptions, element, config);
|
|
40
|
+
setValidChallengeLength(renderOptions, element, config);
|
|
41
|
+
setLanguage(renderOptions, element, config);
|
|
42
|
+
}
|
|
43
|
+
makeEmotionCache(cacheKey, shadowRoot) {
|
|
44
|
+
return createCache({
|
|
45
|
+
key: cacheKey,
|
|
46
|
+
prepend: true,
|
|
47
|
+
container: shadowRoot,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export { WidgetRenderer };
|
|
52
|
+
//# sourceMappingURL=widgetRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetRenderer.js","sourceRoot":"","sources":["../../../../src/util/renderLogic/widgetRenderer.tsx"],"names":[],"mappings":";AAaA,OAAO,WAAkC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAM/C,OAAO,EAAa,UAAU,EAAE,MAAM,kBAAkB,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AC,gBAAgB;SAC3C,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,WAAW,EAAE;YACxD,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,SAAS;SACpB,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,KAAC,aAAa,IAAC,KAAK,EAAE,YAAY,YAAG,OAAO,GAAiB,CAAC,CAAC;QAE3E,OAAO,IAAI,CAAC;IACb,CAAC;IAES,uBAAuB,CAChC,OAAgB,EAChB,SAAoB,EACpB,MAAoC,EACpC,aAAuC;QAEvC,gBAAgB,CAAC,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QACpD,QAAQ,CAAC,aAAa,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QACzC,uBAAuB,CAAC,aAAa,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QACxD,WAAW,CAAC,aAAa,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAES,gBAAgB,CACzB,QAAgB,EAChB,UAAsB;QAEtB,OAAO,WAAW,CAAC;YAClB,GAAG,EAAE,QAAQ;YACb,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,UAAU;SACrB,CAAC,CAAC;IACJ,CAAC;CACD;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
export declare const renderLogic: (elements: Element[], config: ProcaptchaClientConfigOutput, renderOptions?: any) => Root[];
|
|
1
|
+
import { type ProcaptchaClientConfigOutput } from "@prosopo/types";
|
|
2
|
+
export declare const renderLogic: (elements: Element[], config: ProcaptchaClientConfigOutput, renderOptions?: any) => import("react-dom/client").Root[];
|
|
4
3
|
//# sourceMappingURL=renderLogic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderLogic.d.ts","sourceRoot":"","sources":["../../../src/util/renderLogic.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"renderLogic.d.ts","sourceRoot":"","sources":["../../../src/util/renderLogic.tsx"],"names":[],"mappings":"AAaA,OAAO,EAEN,KAAK,4BAA4B,EAEjC,MAAM,gBAAgB,CAAC;AAUxB,eAAO,MAAM,WAAW,aACb,OAAO,EAAE,UACX,4BAA4B,2DAcpC,CAAC"}
|
|
@@ -1,60 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { Procaptcha } from "@prosopo/procaptcha-react";
|
|
7
|
-
import { createRoot } from "react-dom/client";
|
|
8
|
-
import { getDefaultCallbacks, setUserCallbacks } from "./defaultCallbacks.js";
|
|
9
|
-
import { setLanguage } from "./language.js";
|
|
10
|
-
import { setTheme } from "./theme.js";
|
|
11
|
-
import { setValidChallengeLength } from "./timeout.js";
|
|
12
|
-
const identifierPrefix = "procaptcha-";
|
|
13
|
-
function makeShadowRoot(element, renderOptions) {
|
|
14
|
-
const customCss = "";
|
|
15
|
-
const wrapperElement = document.createElement("prosopo-procaptcha");
|
|
16
|
-
const wrapperShadow = wrapperElement.attachShadow({ mode: "open" });
|
|
17
|
-
wrapperShadow.innerHTML +=
|
|
18
|
-
'<style>:host{all:initial!important;}:host *{font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";}</style>';
|
|
19
|
-
wrapperShadow.innerHTML +=
|
|
20
|
-
"" !== customCss ? `<style>${customCss}</style>` : "";
|
|
21
|
-
element.appendChild(wrapperElement);
|
|
22
|
-
return wrapperShadow;
|
|
23
|
-
}
|
|
1
|
+
import { FeaturesEnum, } from "@prosopo/types";
|
|
2
|
+
import { CaptchaRenderer } from "./renderLogic/captcha/captchaRenderer.js";
|
|
3
|
+
import { WebComponent } from "./renderLogic/webComponent.js";
|
|
4
|
+
import { WidgetRenderer } from "./renderLogic/widgetRenderer.js";
|
|
5
|
+
const widgetRenderer = new WidgetRenderer(new WebComponent(), new CaptchaRenderer());
|
|
24
6
|
export const renderLogic = (elements, config, renderOptions) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
setValidChallengeLength(renderOptions, element, config);
|
|
32
|
-
setLanguage(renderOptions, element, config);
|
|
33
|
-
const emotionCache = createCache({
|
|
34
|
-
key: "procaptcha",
|
|
35
|
-
prepend: true,
|
|
36
|
-
container: shadowRoot,
|
|
37
|
-
});
|
|
38
|
-
let root = null;
|
|
39
|
-
switch (renderOptions?.captchaType) {
|
|
40
|
-
case "pow":
|
|
41
|
-
console.log("rendering pow");
|
|
42
|
-
root = createRoot(shadowRoot, { identifierPrefix });
|
|
43
|
-
root.render(_jsx(CacheProvider, { value: emotionCache, children: _jsx(ProcaptchaPow, { config: config, callbacks: callbacks }) }));
|
|
44
|
-
break;
|
|
45
|
-
case "image":
|
|
46
|
-
console.log("rendering image");
|
|
47
|
-
root = createRoot(shadowRoot, { identifierPrefix });
|
|
48
|
-
root.render(_jsx(CacheProvider, { value: emotionCache, children: _jsx(Procaptcha, { config: config, callbacks: callbacks }) }));
|
|
49
|
-
break;
|
|
50
|
-
default:
|
|
51
|
-
console.log("rendering frictionless");
|
|
52
|
-
root = createRoot(shadowRoot, { identifierPrefix });
|
|
53
|
-
root.render(_jsx(CacheProvider, { value: emotionCache, children: _jsx(ProcaptchaFrictionless, { config: config, callbacks: callbacks }) }));
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
roots.push(root);
|
|
57
|
-
}
|
|
58
|
-
return roots;
|
|
7
|
+
return widgetRenderer.renderElements({
|
|
8
|
+
identifierPrefix: "procaptcha-",
|
|
9
|
+
emotionCacheKey: "procaptcha",
|
|
10
|
+
webComponentTag: "prosopo-procaptcha",
|
|
11
|
+
defaultCaptchaType: FeaturesEnum.Frictionless,
|
|
12
|
+
}, elements, config, renderOptions);
|
|
59
13
|
};
|
|
60
14
|
//# sourceMappingURL=renderLogic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderLogic.js","sourceRoot":"","sources":["../../../src/util/renderLogic.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"renderLogic.js","sourceRoot":"","sources":["../../../src/util/renderLogic.tsx"],"names":[],"mappings":"AAaA,OAAO,EACN,YAAY,GAGZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,MAAM,cAAc,GAAG,IAAI,cAAc,CACxC,IAAI,YAAY,EAAE,EAClB,IAAI,eAAe,EAAE,CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAC1B,QAAmB,EACnB,MAAoC,EACpC,aAAuC,EACtC,EAAE;IACH,OAAO,cAAc,CAAC,cAAc,CACnC;QACC,gBAAgB,EAAE,aAAa;QAC/B,eAAe,EAAE,YAAY;QAC7B,eAAe,EAAE,oBAAoB;QACrC,kBAAkB,EAAE,YAAY,CAAC,YAAY;KAC7C,EACD,QAAQ,EACR,MAAM,EACN,aAAa,CACb,CAAC;AACH,CAAC,CAAC"}
|