docuseal-svelte 0.0.2 → 0.0.4

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # DocuSeal Svelte
2
2
 
3
- A SvelteKit component library for integrating DocuSeal electronic signatures into your Svelte applications.
3
+ A Svelte component library for integrating DocuSeal electronic signatures into your Svelte applications.
4
4
 
5
5
  ## Installation
6
6
 
@@ -19,6 +19,13 @@ npm install docuseal-svelte
19
19
  <DocuSealFormBuilder src="<YOUR_DOCUSEAL_FORM_SRC>" token="<YOUR_DOCUSEAL_TOKEN>" />
20
20
  ```
21
21
 
22
+ ## Compatibility
23
+
24
+ This package supports:
25
+
26
+ - Svelte 4.x
27
+ - Svelte 5.x
28
+
22
29
  ## How to Contribute
23
30
 
24
31
  Contributions are welcome! Please fork the repository and create a pull request with your changes. Make sure to create a changeset for any significant updates.
@@ -57,6 +57,7 @@
57
57
  export let onInit: ((detail: any) => void) | undefined = undefined
58
58
  export let onDecline: ((detail: any) => void) | undefined = undefined
59
59
  export let onLoad: ((detail: any) => void) | undefined = undefined
60
+ export let onError: ((detail: any) => void) | undefined = undefined
60
61
 
61
62
  let el: HTMLElement | null = null
62
63
 
@@ -81,12 +82,15 @@
81
82
  const handleDecline = (e: Event) =>
82
83
  onDecline && onDecline((e as CustomEvent).detail)
83
84
  const handleLoad = (e: Event) => onLoad && onLoad((e as CustomEvent).detail)
85
+ const handleError = (e: Event) =>
86
+ onError && onError((e as CustomEvent).detail)
84
87
 
85
88
  if (el) {
86
89
  el.addEventListener("completed", handleCompleted)
87
90
  el.addEventListener("init", handleInit)
88
91
  el.addEventListener("declined", handleDecline)
89
92
  el.addEventListener("load", handleLoad)
93
+ el.addEventListener("error", handleError)
90
94
  }
91
95
 
92
96
  return () => {
@@ -95,6 +99,7 @@
95
99
  el.removeEventListener("init", handleInit)
96
100
  el.removeEventListener("declined", handleDecline)
97
101
  el.removeEventListener("load", handleLoad)
102
+ el.removeEventListener("error", handleError)
98
103
  }
99
104
  }
100
105
  })
@@ -67,6 +67,7 @@ declare const DocuSealForm: $$__sveltets_2_IsomorphicComponent<{
67
67
  onInit?: ((detail: any) => void) | undefined;
68
68
  onDecline?: ((detail: any) => void) | undefined;
69
69
  onLoad?: ((detail: any) => void) | undefined;
70
+ onError?: ((detail: any) => void) | undefined;
70
71
  }, {
71
72
  [evt: string]: CustomEvent<any>;
72
73
  }, {}, {}, string>;
@@ -1,4 +1,3 @@
1
- // src/lib/utils/docuseal.ts
2
1
  /**
3
2
  * Validates if a URL is a valid DocuSeal URL
4
3
  */
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "docuseal-svelte",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
+ "description": "Docuseal Svelte component library for document signing and management.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/SirCen/docuseal-svelte.git"
9
+ },
4
10
  "scripts": {
5
11
  "dev": "vite dev",
6
12
  "build": "vite build && npm run prepack",
@@ -8,8 +14,7 @@
8
14
  "prepare": "svelte-kit sync || echo ''",
9
15
  "prepack": "svelte-kit sync && svelte-package && publint",
10
16
  "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
11
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
12
- "release": "npm run build && changeset publish"
17
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
13
18
  },
14
19
  "files": [
15
20
  "dist",
@@ -29,7 +34,7 @@
29
34
  }
30
35
  },
31
36
  "peerDependencies": {
32
- "svelte": "^5.0.0"
37
+ "svelte": "^4.0.0 || ^5.0.0"
33
38
  },
34
39
  "devDependencies": {
35
40
  "@changesets/cli": "^2.29.8",