@prosopo/svelte-procaptcha-integration-demo 1.1.4 → 1.1.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @prosopo/svelte-procaptcha-integration-demo
2
2
 
3
+ ## 1.1.6
4
+ ### Patch Changes
5
+
6
+ - 3573f0b: build using vite, typecheck using tsc
7
+ - Updated dependencies [3573f0b]
8
+ - Updated dependencies [3573f0b]
9
+ - Updated dependencies [3573f0b]
10
+ - Updated dependencies [2d0dd8a]
11
+ - @prosopo/config@3.1.1
12
+ - @prosopo/svelte-procaptcha-wrapper@1.1.6
13
+
14
+ ## 1.1.5
15
+ ### Patch Changes
16
+
17
+ - @prosopo/svelte-procaptcha-wrapper@1.1.5
18
+
3
19
  ## 1.1.4
4
20
  ### Patch Changes
5
21
 
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ const svelte = require("svelte");
3
+ const integrationDemo = require("./integrationDemo.svelte.cjs");
4
+ const root = document.getElementById("root");
5
+ if (root instanceof HTMLElement) {
6
+ svelte.mount(integrationDemo, {
7
+ target: root
8
+ });
9
+ } else {
10
+ throw new Error("root element not found");
11
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ const $ = require("svelte/internal/server");
3
+ const svelteProcaptchaWrapper = require("@prosopo/svelte-procaptcha-wrapper");
4
+ function _interopNamespaceDefault(e) {
5
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
6
+ if (e) {
7
+ for (const k in e) {
8
+ if (k !== "default") {
9
+ const d = Object.getOwnPropertyDescriptor(e, k);
10
+ Object.defineProperty(n, k, d.get ? d : {
11
+ enumerable: true,
12
+ get: () => e[k]
13
+ });
14
+ }
15
+ }
16
+ }
17
+ n.default = e;
18
+ return Object.freeze(n);
19
+ }
20
+ const $__namespace = /* @__PURE__ */ _interopNamespaceDefault($);
21
+ function IntegrationDemo($$payload, $$props) {
22
+ $__namespace.push();
23
+ const siteKey = "";
24
+ const handleVerification = (token) => {
25
+ console.log("verified", token);
26
+ };
27
+ $$payload.out += `<div>`;
28
+ svelteProcaptchaWrapper.ProcaptchaComponent($$payload, {
29
+ siteKey,
30
+ captchaType: "pow",
31
+ language: "en",
32
+ callback: handleVerification,
33
+ htmlAttributes: { class: "my-app__procaptcha" }
34
+ });
35
+ $$payload.out += `<!----></div>`;
36
+ $__namespace.pop();
37
+ }
38
+ module.exports = IntegrationDemo;