@prosopo/procaptcha-bundle 2.5.3 → 2.6.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}/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/index.js +15 -17
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +1 -1
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js +23 -27
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +1 -0
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts +2 -2
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js +4 -7
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts +5 -0
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js.map +1 -0
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts +2 -2
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js +9 -4
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +1 -0
- package/CHANGELOG.md +29 -0
- package/dist/bundle/ProcaptchaWidget-3gKvjeiH.js +636 -0
- package/dist/bundle/ProcaptchaWidget-D6-M7iAv.js +360 -0
- package/dist/bundle/{asU8a-JliaME7-.js → asU8a-DCECA0Qe.js} +1 -1
- package/dist/bundle/bip39-BQoZog_M.js +365 -0
- package/dist/bundle/captchaComponentProvider-BW2eXmc3.js +1242 -0
- package/dist/bundle/captchaRenderer-B_MgGzr9.js +70 -0
- package/dist/bundle/{emotion-element-5486c51c.browser.esm-Bywq83R5.js → emotion-element-5486c51c.browser.esm-CCAJ8JId.js} +713 -746
- package/dist/bundle/{fp.esm-C0kLYOiJ.js → fp.esm-DYWeNGcH.js} +17 -0
- package/dist/bundle/{hash-CtL1HOjf.js → hash-BR0YLxPF.js} +796 -483
- package/dist/bundle/{i18nFrontend-C_RgmvGh.js → i18nFrontend-CsPT71ro.js} +1 -1
- package/dist/bundle/index-2or4-1WF.js +596 -0
- package/dist/bundle/{captchaRenderer-D-du50M4.js → index-BCjHZ8o6.js} +1293 -1355
- package/dist/bundle/{index-DcG_c-Na.js → index-BYUYvvuq.js} +11 -11
- package/dist/bundle/index-BjRdPnnE.js +1198 -0
- package/dist/bundle/index-WqEmiYQ_.js +4386 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/locales/ar/translation.json +56 -0
- package/dist/bundle/locales/az/translation.json +56 -0
- package/dist/bundle/locales/cs/translation.json +56 -0
- package/dist/bundle/locales/de/translation.json +55 -405
- package/dist/bundle/locales/el/translation.json +56 -0
- package/dist/bundle/locales/en/translation.json +55 -405
- package/dist/bundle/locales/es/translation.json +55 -405
- package/dist/bundle/locales/fi/translation.json +56 -0
- package/dist/bundle/locales/fr/translation.json +55 -405
- package/dist/bundle/locales/hi/translation.json +56 -0
- package/dist/bundle/locales/hu/translation.json +56 -0
- package/dist/bundle/locales/id/translation.json +56 -0
- package/dist/bundle/locales/it/translation.json +55 -405
- package/dist/bundle/locales/ja/translation.json +56 -0
- package/dist/bundle/locales/jv/translation.json +56 -0
- package/dist/bundle/locales/ko/translation.json +56 -0
- package/dist/bundle/locales/ml/translation.json +56 -0
- package/dist/bundle/locales/ms/translation.json +56 -0
- package/dist/bundle/locales/nl/translation.json +56 -0
- package/dist/bundle/locales/no/translation.json +56 -0
- package/dist/bundle/locales/pl/translation.json +56 -0
- package/dist/bundle/locales/pt/translation.json +55 -405
- package/dist/bundle/locales/pt-br/translation.json +56 -0
- package/dist/bundle/locales/ro/translation.json +56 -0
- package/dist/bundle/locales/ru/translation.json +56 -0
- package/dist/bundle/locales/sr/translation.json +56 -0
- package/dist/bundle/locales/sv/translation.json +56 -0
- package/dist/bundle/locales/th/translation.json +56 -0
- package/dist/bundle/locales/tr/translation.json +56 -0
- package/dist/bundle/locales/uk/translation.json +56 -0
- package/dist/bundle/locales/vi/translation.json +56 -0
- package/dist/bundle/locales/zh-cn/translation.json +56 -0
- package/dist/bundle/procaptcha.bundle.js +1 -1
- package/dist/bundle/toU8a-C68WUzs_.js +24 -0
- package/dist/bundle/{translations-B0P9axY3.js → translations-DEL070wJ.js} +59 -26
- package/dist/bundle/{useTranslation-7b6JJ18N.js → useTranslation-BPbGzrhj.js} +3 -3
- package/dist/bundle/util/captcha/captchaRenderer.d.ts +2 -2
- package/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
- package/dist/bundle/util/configCreator.d.ts +2 -2
- package/dist/bundle/util/configCreator.d.ts.map +1 -1
- package/dist/bundle/util/widgetFactory.d.ts +2 -2
- package/dist/bundle/util/widgetFactory.d.ts.map +1 -1
- package/dist/cjs/index.cjs +163 -0
- package/dist/cjs/util/captcha/captchaComponentProvider.cjs +19 -0
- package/dist/cjs/util/captcha/captchaComponentsList.cjs +12 -0
- package/dist/cjs/util/captcha/captchaRenderer.cjs +65 -0
- package/dist/cjs/util/captcha/captchaType.cjs +12 -0
- package/dist/cjs/util/captcha/components/frictionlessCaptcha.cjs +24 -0
- package/dist/cjs/util/captcha/components/imageCaptcha.cjs +17 -0
- package/dist/cjs/util/captcha/components/powCaptcha.cjs +17 -0
- package/dist/cjs/util/config.cjs +16 -0
- package/dist/cjs/util/configCreator.cjs +23 -0
- package/dist/cjs/util/language.cjs +18 -0
- package/dist/cjs/util/timeout.cjs +14 -0
- package/dist/cjs/util/widgetFactory.cjs +84 -0
- package/dist/cjs/util/widgetThemeResolver.cjs +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -17
- package/dist/index.js.map +1 -1
- package/dist/tests/util/renderLogic.test.js +23 -27
- package/dist/tests/util/renderLogic.test.js.map +1 -1
- package/dist/util/captcha/captchaRenderer.d.ts +2 -2
- package/dist/util/captcha/captchaRenderer.d.ts.map +1 -1
- package/dist/util/captcha/captchaRenderer.js +4 -7
- package/dist/util/captcha/captchaRenderer.js.map +1 -1
- package/dist/util/configCreator.d.ts +2 -2
- package/dist/util/configCreator.d.ts.map +1 -1
- package/dist/util/configCreator.js.map +1 -1
- package/dist/util/language.js.map +1 -1
- package/dist/util/widgetFactory.d.ts +2 -2
- package/dist/util/widgetFactory.d.ts.map +1 -1
- package/dist/util/widgetFactory.js +9 -4
- package/dist/util/widgetFactory.js.map +1 -1
- package/package.json +25 -16
- package/stats.html +1 -1
- package/vite.config.ts +18 -3
- package/vite.serve.config.ts +24 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts +0 -5
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +0 -1
- package/dist/bundle/ProcaptchaWidget-BlWWnPeB.js +0 -615
- package/dist/bundle/ProcaptchaWidget-Dnwno-4N.js +0 -156
- package/dist/bundle/bip39-CFjno8fK.js +0 -260
- package/dist/bundle/captchaComponentProvider-dcMua0p9.js +0 -1013
- package/dist/bundle/index-B8oMghZ3.js +0 -1120
- package/dist/bundle/index-BMjJnq60.js +0 -4373
- package/dist/bundle/index-BTlHNFX8.js +0 -504
- package/dist/bundle/locales/pt-BR/translation.json +0 -406
- package/dist/bundle/sha256-Cxc9Hrlx.js +0 -171
- package/dist/bundle/toU8a-BWKf-2UU.js +0 -133
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/components.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/components.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js.map +0 -0
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAC3C,IAAI,eAAe,GAAW,EAAE,CAAC;AAEjC,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,mBAAmB,EAAE,CAAC,CAAC;AAGnE,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAGtD,MAAM,cAAc,GAAG,KAAK,IAAI,EAAE;IAEjC,MAAM,QAAQ,GAAc,KAAK,CAAC,IAAI,CACrC,QAAQ,CAAC,sBAAsB,CA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AC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE;IACzB,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC;QACpC,IAAI,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;IACD,eAAe,GAAG,EAAE,CAAC;IAErB,KAAK,EAAE,CAAC;AACT,CAAC,CAAC;AAGF,MAAM,CAAC,UAAU,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAEtD,KAAK,EAAE,CAAC"}
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ProcaptchaPow } from "@prosopo/procaptcha-pow";
|
|
3
|
-
import { ProcaptchaConfigSchema } from "@prosopo/types";
|
|
3
|
+
import { ProcaptchaConfigSchema, } from "@prosopo/types";
|
|
4
4
|
import { JSDOM } from "jsdom";
|
|
5
5
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
6
6
|
import { WidgetFactory } from "../../util/widgetFactory.js";
|
|
7
7
|
import { WidgetThemeResolver } from "../../util/widgetThemeResolver.js";
|
|
8
8
|
const widgetFactory = new WidgetFactory(new WidgetThemeResolver());
|
|
9
|
+
const callbacks = {
|
|
10
|
+
onHuman: () => console.log("onHuman"),
|
|
11
|
+
onChallengeExpired: () => console.log("onChallengeExpired"),
|
|
12
|
+
onExpired: () => console.log("onExpired"),
|
|
13
|
+
onError: () => console.log("onError"),
|
|
14
|
+
onClose: () => console.log("onClose"),
|
|
15
|
+
onOpen: () => console.log("onOpen"),
|
|
16
|
+
onFailed: () => console.log("onFailed"),
|
|
17
|
+
onReset: () => console.log("onReset"),
|
|
18
|
+
onExtensionNotFound: () => console.log("onExtensionNotFound"),
|
|
19
|
+
onReload: () => console.log("onReload"),
|
|
20
|
+
};
|
|
9
21
|
vi.mock("@prosopo/detector", async () => {
|
|
10
22
|
return {
|
|
11
23
|
isBot: async () => {
|
|
@@ -81,37 +93,21 @@ describe("Config utility functions", () => {
|
|
|
81
93
|
script["data-failed-callback"] = "onFailed";
|
|
82
94
|
script["data-reset-callback"] = "onReset";
|
|
83
95
|
document.body.appendChild(script);
|
|
84
|
-
const onHuman = () => console.log("onHuman");
|
|
85
|
-
const onChallengeExpired = () => console.log("onChallengeExpired");
|
|
86
|
-
const onExpired = () => console.log("onExpired");
|
|
87
|
-
const onError = () => console.log("onError");
|
|
88
|
-
const onClose = () => console.log("onClose");
|
|
89
|
-
const onOpen = () => console.log("onOpen");
|
|
90
|
-
const onFailed = () => console.log("onFailed");
|
|
91
|
-
const onReset = () => console.log("onReset");
|
|
92
96
|
expect(ctx.window).toBeDefined();
|
|
93
97
|
if (!ctx.window) {
|
|
94
98
|
expect(true).toBe(false);
|
|
95
99
|
return;
|
|
96
100
|
}
|
|
97
|
-
ctx.window.onHuman = onHuman;
|
|
98
|
-
ctx.window.onChallengeExpired = onChallengeExpired;
|
|
99
|
-
ctx.window.onExpired = onExpired;
|
|
100
|
-
ctx.window.onError = onError;
|
|
101
|
-
ctx.window.onClose = onClose;
|
|
102
|
-
ctx.window.onOpen = onOpen;
|
|
103
|
-
ctx.window.onFailed = onFailed;
|
|
104
|
-
ctx.window.onReset = onReset;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
onChallengeExpired,
|
|
108
|
-
onExpired,
|
|
109
|
-
onError,
|
|
110
|
-
onClose,
|
|
111
|
-
onOpen,
|
|
112
|
-
onFailed,
|
|
113
|
-
onReset,
|
|
114
|
-
};
|
|
101
|
+
ctx.window.onHuman = callbacks.onHuman;
|
|
102
|
+
ctx.window.onChallengeExpired = callbacks.onChallengeExpired;
|
|
103
|
+
ctx.window.onExpired = callbacks.onExpired;
|
|
104
|
+
ctx.window.onError = callbacks.onError;
|
|
105
|
+
ctx.window.onClose = callbacks.onClose;
|
|
106
|
+
ctx.window.onOpen = callbacks.onOpen;
|
|
107
|
+
ctx.window.onFailed = callbacks.onFailed;
|
|
108
|
+
ctx.window.onReset = callbacks.onReset;
|
|
109
|
+
ctx.window.onExtensionNotFound = callbacks.onExtensionNotFound;
|
|
110
|
+
ctx.window.onReload = callbacks.onReload;
|
|
115
111
|
const config = ProcaptchaConfigSchema.parse({
|
|
116
112
|
account: { address: "1234" },
|
|
117
113
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderLogic.test.js","sourceRoot":"","sources":["../../../src/tests/util/renderLogic.test.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,
|
|
1
|
+
{"version":3,"file":"renderLogic.test.js","sourceRoot":"","sources":["../../../src/tests/util/renderLogic.test.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAEN,sBAAsB,GAEtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAkB,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,mBAAmB,EAAE,CAAC,CAAC;AAOnE,MAAM,SAAS,GAAc;IAC5B,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;IACrC,kBAAkB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;IAC3D,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IACzC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;IACrC,OAAO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M,EAAE,SAAS,EAAE,CAAC;YAEpC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -14,8 +14,8 @@ interface RenderSettings {
|
|
|
14
14
|
declare class CaptchaRenderer {
|
|
15
15
|
private readonly captchaComponentProvider;
|
|
16
16
|
constructor(captchaComponentProvider: CaptchaComponentProvider);
|
|
17
|
-
renderCaptcha(settings: RenderSettings, container: HTMLElement, renderOptions: ProcaptchaRenderOptions, isWeb2: boolean, i18n: Ti18n, invisible?: boolean): Root;
|
|
18
|
-
protected readAndValidateSettings(element: Element,
|
|
17
|
+
renderCaptcha(settings: RenderSettings, container: HTMLElement, renderOptions: ProcaptchaRenderOptions, callbacks: Callbacks, isWeb2: boolean, i18n: Ti18n, invisible?: boolean): Root;
|
|
18
|
+
protected readAndValidateSettings(element: Element, config: ProcaptchaClientConfigOutput, renderOptions: ProcaptchaRenderOptions): void;
|
|
19
19
|
protected makeEmotionCache(cacheKey: string, container: HTMLElement): EmotionCache;
|
|
20
20
|
protected createReactRoot(container: HTMLElement, identifierPrefix: string): Root;
|
|
21
21
|
protected renderCaptchaComponent(reactRoot: Root, emotionCache: EmotionCache, captchaComponent: ReactNode): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captchaRenderer.d.ts","sourceRoot":"","sources":["../../../src/util/captcha/captchaRenderer.tsx"],"names":[],"mappings":"AAcA,OAAoB,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"captchaRenderer.d.ts","sourceRoot":"","sources":["../../../src/util/captcha/captch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ACf,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,SAAS,GACzB,IAAI;CAKP;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import createCache from "@emotion/cache";
|
|
3
3
|
import { CacheProvider } from "@emotion/react";
|
|
4
|
-
import { getDefaultCallbacks, setUserCallbacks, } from "@prosopo/procaptcha-common";
|
|
5
4
|
import { createRoot } from "react-dom/client";
|
|
6
5
|
import { createConfig } from "../configCreator.js";
|
|
7
6
|
import { setLanguage } from "../language.js";
|
|
@@ -10,24 +9,22 @@ class CaptchaRenderer {
|
|
|
10
9
|
constructor(captchaComponentProvider) {
|
|
11
10
|
this.captchaComponentProvider = captchaComponentProvider;
|
|
12
11
|
}
|
|
13
|
-
renderCaptcha(settings, container, renderOptions, isWeb2, i18n, invisible = false) {
|
|
14
|
-
const callbacks = getDefaultCallbacks(container);
|
|
12
|
+
renderCaptcha(settings, container, renderOptions, callbacks, isWeb2, i18n, invisible = false) {
|
|
15
13
|
const captchaType = renderOptions?.captchaType ||
|
|
16
14
|
settings.defaultCaptchaType;
|
|
17
15
|
const config = createConfig(renderOptions.siteKey, renderOptions.theme, renderOptions.language, isWeb2, invisible);
|
|
18
|
-
this.readAndValidateSettings(container,
|
|
16
|
+
this.readAndValidateSettings(container, config, renderOptions);
|
|
19
17
|
const reactRoot = this.createReactRoot(container, settings.identifierPrefix);
|
|
20
18
|
const emotionCache = this.makeEmotionCache(settings.emotionCacheKey, container);
|
|
21
19
|
const captchaComponent = this.captchaComponentProvider.getCaptchaComponent(captchaType, {
|
|
22
20
|
config: config,
|
|
23
|
-
callbacks: callbacks,
|
|
24
21
|
i18n: i18n,
|
|
22
|
+
callbacks,
|
|
25
23
|
});
|
|
26
24
|
this.renderCaptchaComponent(reactRoot, emotionCache, captchaComponent);
|
|
27
25
|
return reactRoot;
|
|
28
26
|
}
|
|
29
|
-
readAndValidateSettings(element,
|
|
30
|
-
setUserCallbacks(renderOptions, callbacks, element);
|
|
27
|
+
readAndValidateSettings(element, config, renderOptions) {
|
|
31
28
|
setValidChallengeLength(renderOptions, element, config);
|
|
32
29
|
setLanguage(renderOptions, element, config);
|
|
33
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captchaRenderer.js","sourceRoot":"","sources":["../../../src/util/captcha/captchaRenderer.tsx"],"names":[],"mappings":";AAcA,OAAO,WAAkC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"captchaRenderer.js","sourceRoot":"","sources":["../../../src/util/captcha/captchaRenderer.tsx"],"names":[],"mappings":";AAcA,OAAO,WAAkC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAS/C,OAAO,EAAa,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAUxD,MAAM,eAAe;IAGpB,YAAY,wBAAkD;QAC7D,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;IAC1D,CAAC;IAEM,aAAa,CACnB,QAAwB,EACxB,SAAsB,EACtB,aAAsC,EACtC,SAAoB,EACpB,MAAe,EACf,IAAW,EACX,SAAS,GAAG,KAAK;QAEjB,MAAM,WAAW,GACf,aAAa,EAAE,WAA2B;YAC3C,QAAQ,CAAC,kBAAkB,CAAC;QAE7B,MAAM,MAAM,GAAG,YAAY,CAC1B,aAAa,CAAC,OAAO,EACrB,aAAa,CAAC,KAAK,EACnB,aAAa,CAAC,QAAQ,EACtB,MAAM,EACN,SAAS,CACT,CAAC;QACF,IAAI,CAAC,uBAAuB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|
-
import type {
|
|
1
|
+
import type { Languages } from "@prosopo/locale";
|
|
2
2
|
import { type ProcaptchaClientConfigOutput } from "@prosopo/types";
|
|
3
|
-
declare function createConfig(siteKey?: string, theme?: "light" | "dark", language?: typeof
|
|
3
|
+
declare function createConfig(siteKey?: string, theme?: "light" | "dark", language?: (typeof Languages)[keyof typeof Languages], web2?: boolean, invisible?: boolean): ProcaptchaClientConfigOutput;
|
|
4
4
|
export { createConfig };
|
|
5
5
|
//# sourceMappingURL=configCreator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configCreator.d.ts","sourceRoot":"","sources":["../../src/util/configCreator.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"configCreator.d.ts","sourceRoot":"","sources":["../../src/util/configCreator.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAEN,KAAK,4BAA4B,EAEjC,MAAM,gBAAgB,CAAC;AAExB,iBAAS,YAAY,CACpB,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,GAAE,OAAO,GAAG,MAAgB,EACjC,QAAQ,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,EACrD,IAAI,UAAO,EACX,SAAS,UAAQ,GACf,4BAA4B,CAqB9B;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configCreator.js","sourceRoot":"","sources":["../../src/util/configCreator.ts"],"names":[],"mappings":"AAeA,OAAO,EACN,sBAAsB,EAEtB,sBAAsB,GACtB,MAAM,gBAAgB,CAAC;AAExB,SAAS,YAAY,CACpB,OAAgB,EAChB,QAA0B,OAAO,EACjC,
|
|
1
|
+
{"version":3,"file":"configCreator.js","sourceRoot":"","sources":["../../src/util/configCreator.ts"],"names":[],"mappings":"AAeA,OAAO,EACN,sBAAsB,EAEtB,sBAAsB,GACtB,MAAM,gBAAgB,CAAC;AAExB,SAAS,YAAY,CACpB,OAAgB,EAChB,QAA0B,OAAO,EACjC,QAAqD,EACrD,IAAI,GAAG,IAAI,EACX,SAAS,GAAG,KAAK;IAEjB,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAC;IAC9C,CAAC;IAED,OAAO,sBAAsB,CAAC,KAAK,CAAC;QACnC,kBAAkB,EAAE,OAAO,CAAC,GAAG,CAAC,2BAA2B;YAC1D,CAAC,CAAC,sBAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC;YACvE,CAAC,CAAC,sBAAsB,CAAC,IAAI,CAAC,WAAW;QAC1C,kBAAkB,EAAE,EAAE;QACtB,OAAO,EAAE;YACR,OAAO,EAAE,OAAO;SAChB;QACD,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,EAAE;QAC/C,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,EAAE;QACzD,kBAAkB,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,MAAM,IAAI,KAAK;QAC1E,IAAI;QACJ,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;QACzC,KAAK;QACL,QAAQ;KACR,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language.js","sourceRoot":"","sources":["../../src/util/language.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"language.js","sourceRoot":"","sources":["../../src/util/language.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAkB,MAAM,iBAAiB,CAAC;AAkBjE,MAAM,CAAC,MAAM,WAAW,GAAG,CAC1B,aAAkD,EAClD,OAAgB,EAChB,MAAmC,EAClC,EAAE;IACH,MAAM,iBAAiB,GACtB,aAAa,EAAE,QAAQ,IAAI,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;IAElE,IAAI,iBAAiB,EAAE,CAAC;QACvB,MAAM,CAAC,QAAQ,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IACvD,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,iBAA4C,EAAE,EAAE;IACzE,IAAI,CAAC;QACJ,OAAO,cAAc,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,+BAA+B,iBAAiB,EAAE,CAAC,CAAC;QAClE,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;AACF,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Ti18n } from "@prosopo/locale";
|
|
2
|
-
import { type ProcaptchaRenderOptions } from "@prosopo/types";
|
|
2
|
+
import { type Callbacks, type ProcaptchaRenderOptions } from "@prosopo/types";
|
|
3
3
|
import type { Root } from "react-dom/client";
|
|
4
4
|
import type { CaptchaRenderer } from "./captcha/captchaRenderer.js";
|
|
5
5
|
import type { WidgetThemeResolver } from "./widgetThemeResolver.js";
|
|
@@ -10,7 +10,7 @@ declare class WidgetFactory {
|
|
|
10
10
|
constructor(widgetThemeResolver: WidgetThemeResolver);
|
|
11
11
|
get i18n(): Ti18n;
|
|
12
12
|
createWidgets(containers: Element[], renderOptions: ProcaptchaRenderOptions, isWeb2?: boolean, invisible?: boolean): Promise<Root[]>;
|
|
13
|
-
createWidget(container: Element, renderOptions: ProcaptchaRenderOptions, isWeb2?: boolean, invisible?: boolean): Promise<Root>;
|
|
13
|
+
createWidget(container: Element, renderOptions: ProcaptchaRenderOptions, callbacks: Callbacks, isWeb2?: boolean, invisible?: boolean): Promise<Root>;
|
|
14
14
|
protected getCaptchaRenderer(): Promise<CaptchaRenderer>;
|
|
15
15
|
protected createCaptchaRenderer(): Promise<CaptchaRenderer>;
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetFactory.d.ts","sourceRoot":"","sources":["../../src/util/widgetFactory.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"widgetFactory.d.ts","sourceRoot":"","sources":["../../src/util/widgetFactory.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAK7C,OAAO,EACN,KAAK,SAAS,EAGd,KAAK,uBAAuB,EAC5B,MAAM,gBAAgB,CAAC;AAMxB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,cAAM,aAAa;IAKjB,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IAJrC,OAAO,CAAC,eAAe,CAAgC;IACvD,OAAO,CAAC,KAAK,CAAsB;gBAGjB,mBAAmB,EAAE,mBAAmB;IAG1D,IAAI,IAAI,IAAI,KAAK,CAKhB;IAEY,aAAa,CACzB,UAAU,EAAE,OAAO,EAAE,EACrB,aAAa,EAAE,uBAAuB,EACtC,MAAM,UAAO,EACb,SAAS,UAAQ,GACf,OAAO,CAAC,IAAI,EAAE,CAAC;IAgBL,YAAY,CACxB,SAAS,EAAE,OAAO,EAClB,aAAa,EAAE,uBAAuB,EACtC,SAAS,EAAE,SAAS,EACpB,MAAM,UAAO,EACb,SAAS,UAAQ,GACf,OAAO,CAAC,IAAI,CAAC;cA+CA,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC;cAY9C,qBAAqB,IAAI,OAAO,CAAC,eAAe,CAAC;CAUjE;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { loadI18next } from "@prosopo/locale";
|
|
2
|
-
import {
|
|
2
|
+
import { getDefaultCallbacks, setUserCallbacks, } from "@prosopo/procaptcha-common";
|
|
3
|
+
import { CaptchaType, } from "@prosopo/types";
|
|
3
4
|
import { createWidgetSkeleton, darkTheme, lightTheme, } from "@prosopo/widget-skeleton";
|
|
4
5
|
class WidgetFactory {
|
|
5
6
|
constructor(widgetThemeResolver) {
|
|
@@ -14,9 +15,13 @@ class WidgetFactory {
|
|
|
14
15
|
return this._i18n;
|
|
15
16
|
}
|
|
16
17
|
async createWidgets(containers, renderOptions, isWeb2 = true, invisible = false) {
|
|
17
|
-
return Promise.all(containers.map((container) =>
|
|
18
|
+
return Promise.all(containers.map((container) => {
|
|
19
|
+
const callbacks = getDefaultCallbacks(container);
|
|
20
|
+
setUserCallbacks(renderOptions, callbacks, container);
|
|
21
|
+
return this.createWidget(container, renderOptions, callbacks, isWeb2, invisible);
|
|
22
|
+
}));
|
|
18
23
|
}
|
|
19
|
-
async createWidget(container, renderOptions, isWeb2 = true, invisible = false) {
|
|
24
|
+
async createWidget(container, renderOptions, callbacks, isWeb2 = true, invisible = false) {
|
|
20
25
|
renderOptions.theme = this.widgetThemeResolver.resolveWidgetTheme(container, renderOptions);
|
|
21
26
|
const widgetTheme = "light" === renderOptions.theme ? lightTheme : darkTheme;
|
|
22
27
|
let widgetInteractiveArea;
|
|
@@ -34,7 +39,7 @@ class WidgetFactory {
|
|
|
34
39
|
emotionCacheKey: "procaptcha",
|
|
35
40
|
webComponentTag: "prosopo-procaptcha",
|
|
36
41
|
defaultCaptchaType: CaptchaType.frictionless,
|
|
37
|
-
}, widgetInteractiveArea, renderOptions, isWeb2, this.i18n, invisible);
|
|
42
|
+
}, widgetInteractiveArea, renderOptions, callbacks, isWeb2, this.i18n, invisible);
|
|
38
43
|
return captchaRoot;
|
|
39
44
|
}
|
|
40
45
|
async getCaptchaRenderer() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetFactory.js","sourceRoot":"","sources":["../../src/util/widgetFactory.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,
|
|
1
|
+
{"version":3,"file":"widgetFactory.js","sourceRoot":"","sources":["../../src/util/widgetFactory.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EACN,mBAAmB,EACnB,gBAAgB,GAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEN,WAAW,GAGX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,oBAAoB,EACpB,SAAS,EACT,UAAU,GACV,MAAM,0BAA0B,CAAC;AAKlC,MAAM,aAAa;IAIlB,YACkB,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;QAJlD,oBAAe,GAA2B,IAAI,CAAC;QAC/C,UAAK,GAAiB,IAAI,CAAC;IAIhC,CAAC;IAEJ,IAAI,IAAI;QACP,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC5C,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAEM,KAAK,CAAC,aAAa,CACzB,UAAqB,EACrB,aAAsC,EACtC,MAAM,GAAG,IAAI,EACb,SAAS,GAAG,KAAK;QAEjB,OAAO,OAAO,CAAC,GAAG,CACjB,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;YAC5B,MAAM,SAAS,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;YACjD,gBAAgB,CAAC,aAAa,EAAE,SAAS,EAAE,SAAS,CAAC,C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I,CAAC,KAAK,GAAG,MAAM,WAAW,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;QAED,IAAI,IAAI,CAAC,eAAe,KAAK,IAAI,EAAE,CAAC;YACnC,IAAI,CAAC,eAAe,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC3D,CAAC;QAED,OAAO,IAAI,CAAC,eAAe,CAAC;IAC7B,CAAC;IAES,KAAK,CAAC,qBAAqB;QACpC,MAAM,eAAe,GAAG,CAAC,MAAM,MAAM,CAAC,8BAA8B,CAAC,CAAC;aACpE,eAAe,CAAC;QAElB,MAAM,wBAAwB,GAAG,CAChC,MAAM,MAAM,CAAC,uCAAuC,CAAC,CACrD,CAAC,wBAAwB,CAAC;QAE3B,OAAO,IAAI,eAAe,CAAC,IAAI,wBAAwB,EAAE,CAAC,CAAC;IAC5D,CAAC;CACD;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-bundle",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,25 +29,29 @@
|
|
|
29
29
|
"build:cjs": "npx vite --config vite.cjs.config.ts build",
|
|
30
30
|
"start": "NODE_ENV=${NODE_ENV:-development}; vite serve --mode $NODE_ENV --host",
|
|
31
31
|
"bundle": "NODE_ENV=${NODE_ENV:-production}; vite build --config vite.config.ts --mode $NODE_ENV --debug",
|
|
32
|
-
"bundle:webpack": "NODE_ENV=${NODE_ENV:-production}; webpack build --config webpack.config.cjs --mode $NODE_ENV"
|
|
32
|
+
"bundle:webpack": "NODE_ENV=${NODE_ENV:-production}; webpack build --config webpack.config.cjs --mode $NODE_ENV",
|
|
33
|
+
"serve": "NODE_ENV=${NODE_ENV:-development}; vite serve --config vite.serve.config.ts --mode $NODE_ENV --host"
|
|
33
34
|
},
|
|
34
|
-
"browserslist": [
|
|
35
|
+
"browserslist": [
|
|
36
|
+
"> 0.5%, last 2 versions, not dead"
|
|
37
|
+
],
|
|
35
38
|
"dependencies": {
|
|
36
|
-
"@prosopo/dotenv": "2.
|
|
37
|
-
"@prosopo/locale": "2.
|
|
38
|
-
"@prosopo/procaptcha-frictionless": "2.
|
|
39
|
-
"@prosopo/procaptcha-pow": "2.
|
|
40
|
-
"@prosopo/procaptcha-react": "2.
|
|
41
|
-
"@prosopo/
|
|
42
|
-
"@prosopo/
|
|
43
|
-
"@prosopo/
|
|
39
|
+
"@prosopo/dotenv": "2.6.0",
|
|
40
|
+
"@prosopo/locale": "2.6.0",
|
|
41
|
+
"@prosopo/procaptcha-frictionless": "2.6.1",
|
|
42
|
+
"@prosopo/procaptcha-pow": "2.6.1",
|
|
43
|
+
"@prosopo/procaptcha-react": "2.6.1",
|
|
44
|
+
"@prosopo/types": "2.6.1",
|
|
45
|
+
"@prosopo/util": "2.6.0",
|
|
46
|
+
"@prosopo/widget-skeleton": "2.6.0",
|
|
44
47
|
"express": "4.21.2",
|
|
45
48
|
"react": "18.3.1",
|
|
46
49
|
"react-dom": "18.3.1"
|
|
47
50
|
},
|
|
48
51
|
"repository": {
|
|
49
52
|
"type": "git",
|
|
50
|
-
"url": "git+https://github.com/prosopo/captcha.git"
|
|
53
|
+
"url": "git+https://github.com/prosopo/captcha.git",
|
|
54
|
+
"directory": "packages/procaptcha-bundle"
|
|
51
55
|
},
|
|
52
56
|
"bugs": {
|
|
53
57
|
"url": "https://github.com/prosopo/captcha/issues"
|
|
@@ -58,16 +62,21 @@
|
|
|
58
62
|
"registry": "https://registry.npmjs.org"
|
|
59
63
|
},
|
|
60
64
|
"devDependencies": {
|
|
61
|
-
"@prosopo/config": "2.
|
|
65
|
+
"@prosopo/config": "2.6.0",
|
|
62
66
|
"@types/jsdom": "21.1.7",
|
|
63
|
-
"@
|
|
67
|
+
"@types/react": "18.3.1",
|
|
68
|
+
"@types/react-dom": "18.3.1",
|
|
69
|
+
"@vitest/coverage-v8": "3.0.9",
|
|
64
70
|
"concurrently": "9.0.1",
|
|
65
71
|
"del-cli": "6.0.0",
|
|
66
72
|
"npm-run-all": "2.1.0",
|
|
67
73
|
"tslib": "2.7.0",
|
|
68
74
|
"tsx": "4.19.1",
|
|
69
75
|
"typescript": "5.6.2",
|
|
70
|
-
"vite": "
|
|
71
|
-
"vitest": "
|
|
76
|
+
"vite": "6.2.3",
|
|
77
|
+
"vitest": "3.0.9"
|
|
78
|
+
},
|
|
79
|
+
"overrides": {
|
|
80
|
+
"@types/react": "18.3.1"
|
|
72
81
|
}
|
|
73
82
|
}
|