@prosopo/procaptcha-bundle 2.3.2 → 2.4.2

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.
Files changed (160) hide show
  1. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts +5 -0
  2. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts.map +1 -0
  3. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/components.js +5 -0
  4. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/components.js.map +1 -0
  5. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts.map +1 -1
  6. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.js +1 -1
  7. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +1 -1
  8. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js +4 -4
  9. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js.map +1 -1
  10. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captchaType.d.ts.map +1 -1
  11. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captchaType.js +2 -2
  12. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captchaType.js.map +1 -1
  13. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.d.ts +4 -8
  14. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.d.ts.map +1 -1
  15. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.js +1 -4
  16. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.js.map +1 -1
  17. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts +2 -2
  18. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts.map +1 -1
  19. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.js.map +1 -1
  20. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts +2 -4
  21. 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 -1
  22. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.js +10 -7
  23. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.js.map +1 -1
  24. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts +2 -4
  25. 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 -1
  26. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.js +5 -7
  27. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.js.map +1 -1
  28. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts +2 -4
  29. 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 -1
  30. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.js +5 -7
  31. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.js.map +1 -1
  32. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.d.ts +2 -2
  33. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.d.ts.map +1 -1
  34. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.js +4 -4
  35. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.js.map +1 -1
  36. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.d.ts.map +1 -1
  37. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.js +6 -1
  38. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.js.map +1 -1
  39. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.d.ts +3 -4
  40. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.d.ts.map +1 -1
  41. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.js +1 -1
  42. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.js.map +1 -1
  43. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.js +2 -2
  44. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.js.map +1 -1
  45. package/dist/bundle/ProcaptchaWidget-CWr3QJxQ.js +161 -0
  46. package/dist/bundle/ProcaptchaWidget-DNDHo0wy.js +619 -0
  47. package/dist/bundle/{asU8a-BcA17eDA.js → asU8a-CzXEWKM2.js} +3 -3
  48. package/dist/bundle/{bip39-_F7Z5vIE.js → bip39-BY0qXKlh.js} +28 -27
  49. package/dist/bundle/browser-ponyfill-QubLHHEB.js +339 -0
  50. package/dist/bundle/components.d.ts +5 -0
  51. package/dist/bundle/components.d.ts.map +1 -0
  52. package/dist/bundle/{hash-C7-gVTqE.js → hash-BtiXKZG7.js} +460 -588
  53. package/dist/bundle/index-5BQn0RdY.js +11576 -0
  54. package/dist/bundle/{index-BH5dKH-o.js → index-CUmhpcqe.js} +17 -16
  55. package/dist/bundle/{index-DlBTo0Xd.js → index-n-2hvBzo.js} +405 -405
  56. package/dist/bundle/index-vKa71Rut.js +4372 -0
  57. package/dist/bundle/index.d.ts.map +1 -1
  58. package/dist/bundle/locales/de/translation.json +405 -0
  59. package/dist/bundle/locales/en/translation.json +405 -0
  60. package/dist/bundle/locales/es/translation.json +405 -0
  61. package/dist/bundle/locales/fr/translation.json +405 -0
  62. package/dist/bundle/locales/it/translation.json +405 -0
  63. package/dist/bundle/locales/pt/translation.json +405 -0
  64. package/dist/bundle/locales/pt-BR/translation.json +405 -0
  65. package/dist/bundle/procaptcha.bundle.js +1 -1
  66. package/dist/bundle/{sha256-Bcj1GDss.js → sha256-Cxc9Hrlx.js} +1 -1
  67. package/dist/bundle/toU8a-BWKf-2UU.js +133 -0
  68. package/dist/bundle/useTranslation-2VGhZyNk.js +2435 -0
  69. package/dist/bundle/util/captchaType.d.ts.map +1 -1
  70. package/dist/bundle/util/renderLogic/captcha/captcha.d.ts +4 -8
  71. package/dist/bundle/util/renderLogic/captcha/captcha.d.ts.map +1 -1
  72. package/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts +2 -2
  73. package/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts.map +1 -1
  74. package/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts +2 -4
  75. package/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +1 -1
  76. package/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts +2 -4
  77. package/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +1 -1
  78. package/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts +2 -4
  79. package/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts.map +1 -1
  80. package/dist/bundle/util/renderLogic/captcha/componentsList.d.ts +2 -2
  81. package/dist/bundle/util/renderLogic/captcha/componentsList.d.ts.map +1 -1
  82. package/dist/bundle/util/renderLogic/webComponent.d.ts.map +1 -1
  83. package/dist/bundle/util/renderLogic/widgetRenderer.d.ts +3 -4
  84. package/dist/bundle/util/renderLogic/widgetRenderer.d.ts.map +1 -1
  85. package/dist/components.d.ts +5 -0
  86. package/dist/components.d.ts.map +1 -0
  87. package/dist/components.js +5 -0
  88. package/dist/components.js.map +1 -0
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.js +1 -1
  91. package/dist/index.js.map +1 -1
  92. package/dist/tests/util/captchaType.test.js +4 -4
  93. package/dist/tests/util/captchaType.test.js.map +1 -1
  94. package/dist/util/captchaType.d.ts +2 -2
  95. package/dist/util/captchaType.d.ts.map +1 -1
  96. package/dist/util/captchaType.js +2 -2
  97. package/dist/util/captchaType.js.map +1 -1
  98. package/dist/util/renderLogic/captcha/captcha.d.ts +4 -8
  99. package/dist/util/renderLogic/captcha/captcha.d.ts.map +1 -1
  100. package/dist/util/renderLogic/captcha/captcha.js +1 -4
  101. package/dist/util/renderLogic/captcha/captcha.js.map +1 -1
  102. package/dist/util/renderLogic/captcha/captchaRenderer.d.ts +2 -2
  103. package/dist/util/renderLogic/captcha/captchaRenderer.d.ts.map +1 -1
  104. package/dist/util/renderLogic/captcha/captchaRenderer.js.map +1 -1
  105. package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts +2 -4
  106. package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +1 -1
  107. package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.js +10 -7
  108. package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.js.map +1 -1
  109. package/dist/util/renderLogic/captcha/components/imageCaptcha.d.ts +2 -4
  110. package/dist/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +1 -1
  111. package/dist/util/renderLogic/captcha/components/imageCaptcha.js +5 -7
  112. package/dist/util/renderLogic/captcha/components/imageCaptcha.js.map +1 -1
  113. package/dist/util/renderLogic/captcha/components/powCaptcha.d.ts +2 -4
  114. package/dist/util/renderLogic/captcha/components/powCaptcha.d.ts.map +1 -1
  115. package/dist/util/renderLogic/captcha/components/powCaptcha.js +5 -7
  116. package/dist/util/renderLogic/captcha/components/powCaptcha.js.map +1 -1
  117. package/dist/util/renderLogic/captcha/componentsList.d.ts +2 -2
  118. package/dist/util/renderLogic/captcha/componentsList.d.ts.map +1 -1
  119. package/dist/util/renderLogic/captcha/componentsList.js +4 -4
  120. package/dist/util/renderLogic/captcha/componentsList.js.map +1 -1
  121. package/dist/util/renderLogic/webComponent.d.ts.map +1 -1
  122. package/dist/util/renderLogic/webComponent.js +6 -1
  123. package/dist/util/renderLogic/webComponent.js.map +1 -1
  124. package/dist/util/renderLogic/widgetRenderer.d.ts +3 -4
  125. package/dist/util/renderLogic/widgetRenderer.d.ts.map +1 -1
  126. package/dist/util/renderLogic/widgetRenderer.js +1 -1
  127. package/dist/util/renderLogic/widgetRenderer.js.map +1 -1
  128. package/dist/util/renderLogic.js +2 -2
  129. package/dist/util/renderLogic.js.map +1 -1
  130. package/package.json +14 -10
  131. package/stats.html +1 -1
  132. package/vite.cjs.config.ts +1 -1
  133. package/vite.config.ts +32 -1
  134. package/vite.test.config.ts +1 -1
  135. package/webpack.config.cjs +1 -1
  136. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/defaultCallbacks.d.ts +0 -15
  137. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/defaultCallbacks.d.ts.map +0 -1
  138. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/defaultCallbacks.js +0 -178
  139. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/defaultCallbacks.js.map +0 -1
  140. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/form.d.ts +0 -2
  141. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/form.d.ts.map +0 -1
  142. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/form.js +0 -2
  143. package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/form.js.map +0 -1
  144. package/dist/bundle/Checkbox-gp52EwUq.js +0 -631
  145. package/dist/bundle/ProcaptchaWidget-BvScmKhX.js +0 -631
  146. package/dist/bundle/ProcaptchaWidget-D2i13eeY.js +0 -154
  147. package/dist/bundle/index-BYd5PSRY.js +0 -17233
  148. package/dist/bundle/index-BdsUZjbH.js +0 -6520
  149. package/dist/bundle/util/defaultCallbacks.d.ts +0 -15
  150. package/dist/bundle/util/defaultCallbacks.d.ts.map +0 -1
  151. package/dist/bundle/util/form.d.ts +0 -2
  152. package/dist/bundle/util/form.d.ts.map +0 -1
  153. package/dist/util/defaultCallbacks.d.ts +0 -15
  154. package/dist/util/defaultCallbacks.d.ts.map +0 -1
  155. package/dist/util/defaultCallbacks.js +0 -178
  156. package/dist/util/defaultCallbacks.js.map +0 -1
  157. package/dist/util/form.d.ts +0 -2
  158. package/dist/util/form.d.ts.map +0 -1
  159. package/dist/util/form.js +0 -2
  160. package/dist/util/form.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"captchaType.d.ts","sourceRoot":"","sources":["../../../src/util/captchaType.ts"],"names":[],"mappings":"AAsBA,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,OAQjD"}
1
+ {"version":3,"file":"captchaType.d.ts","sourceRoot":"","sources":["../../../src/util/captchaType.ts"],"names":[],"mappings":"AAuBA,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,OAQjD"}
@@ -1,11 +1,7 @@
1
- import type { ProcaptchaClientConfigOutput } from "@prosopo/types";
2
- import React from "react";
3
- import type { Callbacks } from "../../defaultCallbacks.js";
1
+ import type { ProcaptchaCallbacks, ProcaptchaClientConfigInput } from "@prosopo/types";
4
2
  interface CaptchaProps {
5
- config: ProcaptchaClientConfigOutput;
6
- callbacks: Callbacks;
3
+ config: ProcaptchaClientConfigInput;
4
+ callbacks: ProcaptchaCallbacks;
7
5
  }
8
- declare abstract class CaptchaElement extends React.Component<CaptchaProps> {
9
- }
10
- export { type CaptchaProps, CaptchaElement };
6
+ export type { CaptchaProps };
11
7
  //# sourceMappingURL=captcha.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"captcha.d.ts","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/captcha.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACX,mBAAmB,EACnB,2BAA2B,EAC3B,MAAM,gBAAgB,CAAC;AAExB,UAAU,YAAY;IACrB,MAAM,EAAE,2BAA2B,CAAC;IACpC,SAAS,EAAE,mBAAmB,CAAC;CAC/B;AAED,YAAY,EAAE,YAAY,EAAE,CAAC"}
@@ -1,8 +1,8 @@
1
- import type { FeaturesEnum } from "@prosopo/types";
1
+ import type { CaptchaType } from "@prosopo/types";
2
2
  import type { ReactNode } from "react";
3
3
  import type { CaptchaProps } from "./captcha.js";
4
4
  declare class CaptchaRenderer {
5
- render(captchaType: FeaturesEnum, captchaProps: CaptchaProps): ReactNode;
5
+ render(captchaType: CaptchaType, captchaProps: CaptchaProps): ReactNode;
6
6
  }
7
7
  export { CaptchaRenderer };
8
8
  //# sourceMappingURL=captchaRenderer.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"captchaRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/captchaRenderer.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,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,WAAW,EACxB,YAAY,EAAE,YAAY,GACxB,SAAS;CAYZ;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1,6 +1,4 @@
1
- import { CaptchaElement } from "../captcha.js";
2
- declare class FrictionlessCaptcha extends CaptchaElement {
3
- render(): import("react/jsx-runtime").JSX.Element;
4
- }
1
+ import type { CaptchaProps } from "../captcha.js";
2
+ declare const FrictionlessCaptcha: (props: CaptchaProps) => import("react/jsx-runtime").JSX.Element;
5
3
  export { FrictionlessCaptcha };
6
4
  //# sourceMappingURL=frictionlessCaptcha.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"frictionlessCaptcha.d.ts","sourceRoot":"","sources":["../../../../../../src/util/renderLogic/captcha/components/frictionlessCaptcha.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,QAAA,MAAM,mBAAmB,UAAW,YAAY,4CAiB/C,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,6 +1,4 @@
1
- import { CaptchaElement } from "../captcha.js";
2
- declare class ImageCaptcha extends CaptchaElement {
3
- render(): import("react/jsx-runtime").JSX.Element;
4
- }
1
+ import type { CaptchaProps } from "../captcha.js";
2
+ declare const ImageCaptcha: (props: CaptchaProps) => import("react/jsx-runtime").JSX.Element;
5
3
  export { ImageCaptcha };
6
4
  //# sourceMappingURL=imageCaptcha.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"imageCaptcha.d.ts","sourceRoot":"","sources":["../../../../../../src/util/renderLogic/captcha/components/imageCaptcha.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,QAAA,MAAM,YAAY,UAAW,YAAY,4CAIxC,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,6 +1,4 @@
1
- import { CaptchaElement } from "../captcha.js";
2
- declare class PowCaptcha extends CaptchaElement {
3
- render(): import("react/jsx-runtime").JSX.Element;
4
- }
1
+ import type { CaptchaProps } from "../captcha.js";
2
+ declare const PowCaptcha: (props: CaptchaProps) => import("react/jsx-runtime").JSX.Element;
5
3
  export { PowCaptcha };
6
4
  //# sourceMappingURL=powCaptcha.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"powCaptcha.d.ts","sourceRoot":"","sources":["../../../../../../src/util/renderLogic/captcha/components/powCaptcha.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,QAAA,MAAM,UAAU,UAAW,YAAY,4CAMtC,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
- import { FeaturesEnum } from "@prosopo/types";
1
+ import { CaptchaType } from "@prosopo/types";
2
2
  import type React from "react";
3
3
  import type { CaptchaProps } from "./captcha.js";
4
- declare const componentsList: Record<FeaturesEnum, React.ComponentType<CaptchaProps>>;
4
+ declare const componentsList: Record<CaptchaType, React.ComponentType<CaptchaProps>>;
5
5
  export { componentsList };
6
6
  //# sourceMappingURL=componentsList.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"componentsList.d.ts","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/componentsList.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAKjD,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAI1E,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1 +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"}
1
+ {"version":3,"file":"webComponent.d.ts","sourceRoot":"","sources":["../../../../src/util/renderLogic/webComponent.ts"],"names":[],"mappings":"AAeA,cAAM,YAAY;IACV,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU;IAavE,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"}
@@ -1,15 +1,14 @@
1
1
  import { type EmotionCache } from "@emotion/cache";
2
- import type { ProcaptchaClientConfigOutput, ProcaptchaRenderOptions } from "@prosopo/types";
3
- import type { FeaturesEnum } from "@prosopo/types";
2
+ import type { Callbacks, ProcaptchaClientConfigOutput, ProcaptchaRenderOptions } from "@prosopo/types";
3
+ import type { CaptchaType } from "@prosopo/types";
4
4
  import { type Root } from "react-dom/client";
5
- import { type Callbacks } from "../defaultCallbacks.js";
6
5
  import type { CaptchaRenderer } from "./captcha/captchaRenderer.js";
7
6
  import type { WebComponent } from "./webComponent.js";
8
7
  interface RenderSettings {
9
8
  identifierPrefix: string;
10
9
  emotionCacheKey: string;
11
10
  webComponentTag: string;
12
- defaultCaptchaType: FeaturesEnum;
11
+ defaultCaptchaType: CaptchaType;
13
12
  }
14
13
  declare class WidgetRenderer {
15
14
  private readonly webComponent;
@@ -1 +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,kBA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cAAc;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,WAAW,CAAC;CAChC;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,5 @@
1
+ export * from "./util/renderLogic/captcha/components/frictionlessCaptcha.js";
2
+ export * from "./util/renderLogic/captcha/components/powCaptcha.js";
3
+ export * from "./util/renderLogic/captcha/components/imageCaptcha.js";
4
+ export * from "./util/renderLogic/captcha/captchaRenderer.js";
5
+ //# sourceMappingURL=components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAcA,cAAc,8DAA8D,CAAC;AAC7E,cAAc,qDAAqD,CAAC;AACpE,cAAc,uDAAuD,CAAC;AACtE,cAAc,+CAA+C,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./util/renderLogic/captcha/components/frictionlessCaptcha.js";
2
+ export * from "./util/renderLogic/captcha/components/powCaptcha.js";
3
+ export * from "./util/renderLogic/captcha/components/imageCaptcha.js";
4
+ export * from "./util/renderLogic/captcha/captchaRenderer.js";
5
+ //# sourceMappingURL=components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAcA,cAAc,8DAA8D,CAAC;AAC7E,cAAc,qDAAqD,CAAC;AACpE,cAAc,uDAAuD,CAAC;AACtE,cAAc,+CAA+C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AA0C9D,eAAO,MAAM,MAAM,YACT,OAAO,iBACD,uBAAuB,SAOtC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,EAAE,MAAM,IAAI,QAQ3C;AAGD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,UAAU,EAAE;YACX,KAAK,EAAE,OAAO,KAAK,CAAC;YACpB,MAAM,EAAE,OAAO,MAAM,CAAC;YACtB,KAAK,EAAE,OAAO,KAAK,CAAC;SACpB,CAAC;KACF;CACD;AA2BD,eAAO,MAAM,KAAK,YAOjB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAyC9D,eAAO,MAAM,MAAM,YACT,OAAO,iBACD,uBAAuB,SAOtC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,EAAE,MAAM,IAAI,QAQ3C;AAGD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,UAAU,EAAE;YACX,KAAK,EAAE,OAAO,KAAK,CAAC;YACpB,MAAM,EAAE,OAAO,MAAM,CAAC;YACtB,KAAK,EAAE,OAAO,KAAK,CAAC;SACpB,CAAC;KACF;CACD;AA2BD,eAAO,MAAM,KAAK,YAOjB,CAAC"}
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
+ import { getWindowCallback } from "@prosopo/procaptcha-common";
1
2
  import { at } from "@prosopo/util";
2
3
  import { getCaptchaType } from "./util/captchaType.js";
3
4
  import { extractParams, getConfig, getProcaptchaScript, } from "./util/config.js";
4
- import { getWindowCallback } from "./util/defaultCallbacks.js";
5
5
  import { renderLogic } from "./util/renderLogic.js";
6
6
  const BUNDLE_NAME = "procaptcha.bundle.js";
7
7
  let procaptchaRoots = [];
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EACN,aAAa,EACb,SAAS,EACT,mBAAmB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAC3C,IAAI,eAAe,GAAW,EAAE,CAAC;AAGjC,MAAM,cAAc,GAAG,GAAG,EAAE;IAE3B,MAAM,QAAQ,GAAc,KAAK,CAAC,IAAI,CACrC,QAAQ,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAC7C,CAAC;IAGF,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACrB,MAAM,OAAO,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,cAAc,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KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAE7C,KAAK,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { FeaturesEnum } from "@prosopo/types";
1
+ import { CaptchaType } from "@prosopo/types";
2
2
  import { JSDOM } from "jsdom";
3
3
  import { beforeEach, describe, expect, it } from "vitest";
4
4
  import { getCaptchaType } from "../../util/captchaType.js";
@@ -9,9 +9,9 @@ describe("getCaptchaType", () => {
9
9
  });
10
10
  it("should return the correct captcha type when a valid type is set", () => {
11
11
  const element = document.createElement("div");
12
- element.setAttribute("data-captcha-type", FeaturesEnum.Pow);
12
+ element.setAttribute("data-captcha-type", CaptchaType.pow);
13
13
  const result = getCaptchaType([element]);
14
- expect(result).toBe(FeaturesEnum.Pow);
14
+ expect(result).toBe(CaptchaType.pow);
15
15
  });
16
16
  it('should return "frictionless" when no captcha type is set', () => {
17
17
  const element = document.createElement("div");
@@ -26,7 +26,7 @@ describe("getCaptchaType", () => {
26
26
  });
27
27
  it("should work with all valid FeaturesEnum values", () => {
28
28
  const element = document.createElement("div");
29
- for (const feature of Object.values(FeaturesEnum)) {
29
+ for (const feature of Object.values(CaptchaType)) {
30
30
  element.setAttribute("data-captcha-type", feature);
31
31
  const result = getCaptchaType([element]);
32
32
  expect(result).toBe(feature);
@@ -1 +1 @@
1
- {"version":3,"file":"captchaType.test.js","sourceRoot":"","sources":["../../../src/tests/util/captchaType.test.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC/B,UAAU,CAAC,GAAG,EAAE;QACf,MAAM,GAAG,G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EH,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QACnE,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE9C,MAAM,MAAM,GAAG,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAEzC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QAC3E,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC9C,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;QAE1D,MAAM,MAAM,GAAG,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAEzC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACzD,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE9C,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;YAClD,OAAO,CAAC,YAAY,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;YACnD,MAAM,MAAM,GAAG,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACzC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
- import { FeaturesEnum } from "@prosopo/types";
2
- export declare function getCaptchaType(elements: Element[]): FeaturesEnum;
1
+ import { CaptchaType } from "@prosopo/types";
2
+ export declare function getCaptchaType(elements: Element[]): CaptchaType;
3
3
  //# sourceMappingURL=captchaType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"captchaType.d.ts","sourceRoot":"","sources":["../../src/util/captchaType.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAS9C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,gBAQjD"}
1
+ {"version":3,"file":"captchaType.d.ts","sourceRoot":"","sources":["../../src/util/captchaType.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAS7C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,eAQjD"}
@@ -1,7 +1,7 @@
1
- import { FeaturesEnum } from "@prosopo/types";
1
+ import { CaptchaType } from "@prosopo/types";
2
2
  import { at } from "@prosopo/util";
3
3
  export function getCaptchaType(elements) {
4
- const features = Object.values(FeaturesEnum);
4
+ const features = Object.values(CaptchaType);
5
5
  const captchaType = features.find((feature) => feature === at(elements, 0).getAttribute("data-captcha-type")) || "frictionless";
6
6
  return captchaType;
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"captchaType.js","sourceRoot":"","sources":["../../src/util/captchaType.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAQnC,MAAM,UAAU,cAAc,CAAC,QAAmB;IACjD,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAC7C,MAAM,WAAW,GAChB,QAAQ,CAAC,IAAI,CACZ,CAAC,OAAO,EAAE,EAAE,CACX,OAAO,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAC9D,IAAK,cAA+B,CAAC;IACvC,OAAO,WAAW,CAAC;AACpB,CAAC"}
1
+ {"version":3,"file":"captchaType.js","sourceRoot":"","sources":["../../src/util/captchaType.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAQnC,MAAM,UAAU,cAAc,CAAC,QAAmB;IACjD,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC5C,MAAM,WAAW,GAChB,QAAQ,CAAC,IAAI,CACZ,CAAC,OAAO,EAAE,EAAE,CACX,OAAO,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAC9D,IAAK,cAA8B,CAAC;IACtC,OAAO,WAAW,CAAC;AACpB,CAAC"}
@@ -1,11 +1,7 @@
1
- import type { ProcaptchaClientConfigOutput } from "@prosopo/types";
2
- import React from "react";
3
- import type { Callbacks } from "../../defaultCallbacks.js";
1
+ import type { ProcaptchaCallbacks, ProcaptchaClientConfigInput } from "@prosopo/types";
4
2
  interface CaptchaProps {
5
- config: ProcaptchaClientConfigOutput;
6
- callbacks: Callbacks;
3
+ config: ProcaptchaClientConfigInput;
4
+ callbacks: ProcaptchaCallbacks;
7
5
  }
8
- declare abstract class CaptchaElement extends React.Component<CaptchaProps> {
9
- }
10
- export { type CaptchaProps, CaptchaElement };
6
+ export type { CaptchaProps };
11
7
  //# sourceMappingURL=captcha.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"captcha.d.ts","sourceRoot":"","sources":["../../../../src/util/renderLogic/captcha/captcha.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACX,mBAAmB,EACnB,2BAA2B,EAC3B,MAAM,gBAAgB,CAAC;AAExB,UAAU,YAAY;IACrB,MAAM,EAAE,2BAA2B,CAAC;IACpC,SAAS,EAAE,mBAAmB,CAAC;CAC/B;AAED,YAAY,EAAE,YAAY,EAAE,CAAC"}
@@ -1,5 +1,2 @@
1
- import React from "react";
2
- class CaptchaElement extends React.Component {
3
- }
4
- export { CaptchaElement };
1
+ export {};
5
2
  //# sourceMappingURL=captcha.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"captcha.js","sourceRoot":"","sources":["../../../../src/util/renderLogic/captcha/captcha.ts"],"names":[],"mappings":""}
@@ -1,8 +1,8 @@
1
- import type { FeaturesEnum } from "@prosopo/types";
1
+ import type { CaptchaType } from "@prosopo/types";
2
2
  import type { ReactNode } from "react";
3
3
  import type { CaptchaProps } from "./captcha.js";
4
4
  declare class CaptchaRenderer {
5
- render(captchaType: FeaturesEnum, captchaProps: CaptchaProps): ReactNode;
5
+ render(captchaType: CaptchaType, captchaProps: CaptchaProps): ReactNode;
6
6
  }
7
7
  export { CaptchaRenderer };
8
8
  //# sourceMappingURL=captchaRenderer.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"captchaRenderer.d.ts","sourceRoot":"","sources":["../../../../src/util/renderLogic/captcha/captchaRenderer.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,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,WAAW,EACxB,YAAY,EAAE,YAAY,GACxB,SAAS;CAYZ;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1 +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"}
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,WAAwB,EACxB,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"}
@@ -1,6 +1,4 @@
1
- import { CaptchaElement } from "../captcha.js";
2
- declare class FrictionlessCaptcha extends CaptchaElement {
3
- render(): import("react/jsx-runtime").JSX.Element;
4
- }
1
+ import type { CaptchaProps } from "../captcha.js";
2
+ declare const FrictionlessCaptcha: (props: CaptchaProps) => import("react/jsx-runtime").JSX.Element;
5
3
  export { FrictionlessCaptcha };
6
4
  //# sourceMappingURL=frictionlessCaptcha.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"frictionlessCaptcha.d.ts","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/components/frictionlessCaptcha.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,QAAA,MAAM,mBAAmB,UAAW,YAAY,4CAiB/C,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,11 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getDefaultEvents } from "@prosopo/procaptcha-common";
2
3
  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
- }
4
+ import { useState } from "react";
5
+ const FrictionlessCaptcha = (props) => {
6
+ const { config, callbacks } = props;
7
+ const [componentKey, setComponentKey] = useState(0);
8
+ const restart = () => {
9
+ setComponentKey((prevKey) => prevKey + 1);
10
+ };
11
+ return (_jsx(ProcaptchaFrictionless, { config: config, callbacks: getDefaultEvents(callbacks), restart: restart }, componentKey));
12
+ };
10
13
  export { FrictionlessCaptcha };
11
14
  //# sourceMappingURL=frictionlessCaptcha.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"frictionlessCaptcha.js","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/components/frictionlessCaptcha.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGxC,MAAM,mBAAmB,GAAG,CAAC,KAAmB,EAAE,EAAE;IACnD,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEpC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEpD,MAAM,OAAO,GAAG,GAAG,EAAE;QACpB,eAAe,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC;IAEF,OAAO,CACN,KAAC,sBAAsB,IAEtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,gBAAgB,CAAC,SAAS,CAAC,EACtC,OAAO,EAAE,OAAO,IAHX,YAAY,CAIhB,CACF,CAAC;AACH,CAAC,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,6 +1,4 @@
1
- import { CaptchaElement } from "../captcha.js";
2
- declare class ImageCaptcha extends CaptchaElement {
3
- render(): import("react/jsx-runtime").JSX.Element;
4
- }
1
+ import type { CaptchaProps } from "../captcha.js";
2
+ declare const ImageCaptcha: (props: CaptchaProps) => import("react/jsx-runtime").JSX.Element;
5
3
  export { ImageCaptcha };
6
4
  //# sourceMappingURL=imageCaptcha.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"imageCaptcha.d.ts","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/components/imageCaptcha.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,QAAA,MAAM,YAAY,UAAW,YAAY,4CAIxC,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,11 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getDefaultEvents } from "@prosopo/procaptcha-common";
2
3
  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
- }
4
+ const ImageCaptcha = (props) => {
5
+ const { config, callbacks } = props;
6
+ return _jsx(Procaptcha, { config: config, callbacks: getDefaultEvents(callbacks) });
7
+ };
10
8
  export { ImageCaptcha };
11
9
  //# sourceMappingURL=imageCaptcha.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"imageCaptcha.js","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/components/imageCaptcha.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAc9D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAIvD,MAAM,YAAY,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC5C,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEpC,OAAO,KAAC,UAAU,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,CAAC,SAAS,CAAC,GAAI,CAAC;AAC/E,CAAC,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,6 +1,4 @@
1
- import { CaptchaElement } from "../captcha.js";
2
- declare class PowCaptcha extends CaptchaElement {
3
- render(): import("react/jsx-runtime").JSX.Element;
4
- }
1
+ import type { CaptchaProps } from "../captcha.js";
2
+ declare const PowCaptcha: (props: CaptchaProps) => import("react/jsx-runtime").JSX.Element;
5
3
  export { PowCaptcha };
6
4
  //# sourceMappingURL=powCaptcha.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"powCaptcha.d.ts","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/components/powCaptcha.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,QAAA,MAAM,UAAU,UAAW,YAAY,4CAMtC,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,11 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getDefaultEvents } from "@prosopo/procaptcha-common";
2
3
  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
- }
4
+ const PowCaptcha = (props) => {
5
+ const { config, callbacks } = props;
6
+ return (_jsx(ProcaptchaPow, { config: config, callbacks: getDefaultEvents(callbacks) }));
7
+ };
10
8
  export { PowCaptcha };
11
9
  //# sourceMappingURL=powCaptcha.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"powCaptcha.js","sourceRoot":"","sources":["../../../../../src/util/renderLogic/captcha/components/powCaptcha.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAIxD,MAAM,UAAU,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC1C,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEpC,OAAO,CACN,KAAC,aAAa,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,CAAC,SAAS,CAAC,GAAI,CACzE,CAAC;AACH,CAAC,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
- import { FeaturesEnum } from "@prosopo/types";
1
+ import { CaptchaType } from "@prosopo/types";
2
2
  import type React from "react";
3
3
  import type { CaptchaProps } from "./captcha.js";
4
- declare const componentsList: Record<FeaturesEnum, React.ComponentType<CaptchaProps>>;
4
+ declare const componentsList: Record<CaptchaType, React.ComponentType<CaptchaProps>>;
5
5
  export { componentsList };
6
6
  //# sourceMappingURL=componentsList.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"componentsList.d.ts","sourceRoot":"","sources":["../../../../src/util/renderLogic/captcha/componentsList.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAKjD,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAI1E,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1,11 +1,11 @@
1
- import { FeaturesEnum } from "@prosopo/types";
1
+ import { CaptchaType } from "@prosopo/types";
2
2
  import { FrictionlessCaptcha } from "./components/frictionlessCaptcha.js";
3
3
  import { ImageCaptcha } from "./components/imageCaptcha.js";
4
4
  import { PowCaptcha } from "./components/powCaptcha.js";
5
5
  const componentsList = {
6
- [FeaturesEnum.Image]: ImageCaptcha,
7
- [FeaturesEnum.Pow]: PowCaptcha,
8
- [FeaturesEnum.Frictionless]: FrictionlessCaptcha,
6
+ [CaptchaType.image]: ImageCaptcha,
7
+ [CaptchaType.pow]: PowCaptcha,
8
+ [CaptchaType.frictionless]: FrictionlessCaptcha,
9
9
  };
10
10
  export { componentsList };
11
11
  //# sourceMappingURL=componentsList.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"componentsList.js","sourceRoot":"","sources":["../../../../src/util/renderLogic/captcha/componentsList.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,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,GAA2D;IAC9E,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,YAAY;IACjC,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,UAAU;IAC7B,CAAC,WAAW,CAAC,YAAY,CAAC,EAAE,mBAAmB;CAC/C,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1 +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"}
1
+ {"version":3,"file":"webComponent.d.ts","sourceRoot":"","sources":["../../../src/util/renderLogic/webComponent.ts"],"names":[],"mappings":"AAeA,cAAM,YAAY;IACV,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU;IAavE,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"}
@@ -1,6 +1,11 @@
1
+ import { WIDGET_MAX_WIDTH } from "@prosopo/web-components";
1
2
  class WebComponent {
2
3
  addToElement(componentTag, element) {
3
4
  const webComponent = this.makeWebComponent(componentTag);
5
+ webComponent.style.display = "flex";
6
+ webComponent.style.flexDirection = "column";
7
+ webComponent.style.width = "100%";
8
+ webComponent.style.maxWidth = WIDGET_MAX_WIDTH;
4
9
  const shadowRoot = this.attachShadowDom(webComponent);
5
10
  element.appendChild(webComponent);
6
11
  return shadowRoot;
@@ -10,7 +15,7 @@ class WebComponent {
10
15
  }
11
16
  getBaseShadowStyles() {
12
17
  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>';
18
+ let baseStyles = '<style>*{font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";}</style>';
14
19
  baseStyles += "" !== customCss ? `<style>${customCss}</style>` : "";
15
20
  return baseStyles;
16
21
  }
@@ -1 +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,mBA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C;QAEnD,OAAO,UAAU,CAAC;IACnB,CAAC;CACD;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,15 +1,14 @@
1
1
  import { type EmotionCache } from "@emotion/cache";
2
- import type { ProcaptchaClientConfigOutput, ProcaptchaRenderOptions } from "@prosopo/types";
3
- import type { FeaturesEnum } from "@prosopo/types";
2
+ import type { Callbacks, ProcaptchaClientConfigOutput, ProcaptchaRenderOptions } from "@prosopo/types";
3
+ import type { CaptchaType } from "@prosopo/types";
4
4
  import { type Root } from "react-dom/client";
5
- import { type Callbacks } from "../defaultCallbacks.js";
6
5
  import type { CaptchaRenderer } from "./captcha/captchaRenderer.js";
7
6
  import type { WebComponent } from "./webComponent.js";
8
7
  interface RenderSettings {
9
8
  identifierPrefix: string;
10
9
  emotionCacheKey: string;
11
10
  webComponentTag: string;
12
- defaultCaptchaType: FeaturesEnum;
11
+ defaultCaptchaType: CaptchaType;
13
12
  }
14
13
  declare class WidgetRenderer {
15
14
  private readonly webComponent;
@@ -1 +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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MAAM,mBAAmB,CAAC;AAEtD,UAAU,cAAc;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,WAAW,CAAC;CAChC;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"}
@@ -1,8 +1,8 @@
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";
4
5
  import { createRoot } from "react-dom/client";
5
- import { getDefaultCallbacks, setUserCallbacks, } from "../defaultCallbacks.js";
6
6
  import { setLanguage } from "../language.js";
7
7
  import { setTheme } from "../theme.js";
8
8
  import { setValidChallengeLength } from "../timeout.js";