@thetinkerinc/sprout 0.3.1 → 0.4.0

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.
@@ -0,0 +1,11 @@
1
+ declare function stop(fn?: (evt: Event) => void): (evt: Event) => void;
2
+ declare function preventDefault(fn?: (evt: Event) => void): (evt: Event) => void;
3
+ declare function stopPropagation(fn?: (evt: Event) => void): (evt: Event) => void;
4
+ declare function stopImmediatePropagation(fn?: (evt: Event) => void): (evt: Event) => void;
5
+ declare const _default: {
6
+ stop: typeof stop;
7
+ preventDefault: typeof preventDefault;
8
+ stopPropagation: typeof stopPropagation;
9
+ stopImmediatePropagation: typeof stopImmediatePropagation;
10
+ };
11
+ export default _default;
@@ -0,0 +1,31 @@
1
+ function stop(fn) {
2
+ return (evt) => {
3
+ evt.stopImmediatePropagation();
4
+ evt.preventDefault();
5
+ fn?.(evt);
6
+ };
7
+ }
8
+ function preventDefault(fn) {
9
+ return (evt) => {
10
+ evt.preventDefault();
11
+ fn?.(evt);
12
+ };
13
+ }
14
+ function stopPropagation(fn) {
15
+ return (evt) => {
16
+ evt.stopPropagation();
17
+ fn?.(evt);
18
+ };
19
+ }
20
+ function stopImmediatePropagation(fn) {
21
+ return (evt) => {
22
+ evt.stopImmediatePropagation();
23
+ fn?.(evt);
24
+ };
25
+ }
26
+ export default {
27
+ stop,
28
+ preventDefault,
29
+ stopPropagation,
30
+ stopImmediatePropagation
31
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thetinkerinc/sprout",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -50,6 +50,10 @@
50
50
  "types": "./dist/navigation/index.d.ts",
51
51
  "svelte": "./dist/navigation/index.js"
52
52
  },
53
+ "./events": {
54
+ "types": "./dist/events/index.d.ts",
55
+ "svelte": "./dist/events/index.js"
56
+ },
53
57
  "./vite": {
54
58
  "types": "./dist/vite/index.d.ts",
55
59
  "import": "./dist/vite/index.js"
@@ -63,35 +67,35 @@
63
67
  "@eslint/compat": "^2.0.2",
64
68
  "@eslint/js": "^10.0.1",
65
69
  "@inlang/paraglide-js": "^2.12.0",
66
- "@sveltejs/adapter-cloudflare": "^7.2.7",
67
- "@sveltejs/kit": "^2.52.0",
70
+ "@sveltejs/adapter-cloudflare": "^7.2.8",
71
+ "@sveltejs/kit": "^2.53.2",
68
72
  "@sveltejs/package": "^2.5.7",
69
73
  "@sveltejs/vite-plugin-svelte": "^6.2.4",
70
74
  "@tailwindcss/forms": "^0.5.11",
71
75
  "@tailwindcss/typography": "^0.5.19",
72
- "@tailwindcss/vite": "^4.1.18",
73
- "@types/node": "^25.2.3",
76
+ "@tailwindcss/vite": "^4.2.1",
77
+ "@types/node": "^25.3.0",
74
78
  "@types/pg": "^8.16.0",
75
- "eslint": "^10.0.0",
79
+ "eslint": "^10.0.2",
76
80
  "eslint-config-prettier": "^10.1.8",
77
81
  "eslint-plugin-svelte": "^3.15.0",
78
82
  "globals": "^17.3.0",
79
83
  "npm-run-all": "^4.1.5",
80
84
  "prettier": "^3.8.1",
81
- "prettier-plugin-svelte": "^3.4.1",
85
+ "prettier-plugin-svelte": "^3.5.0",
82
86
  "prettier-plugin-tailwindcss": "^0.7.2",
83
87
  "publint": "^0.3.17",
84
- "svelte": "^5.51.3",
85
- "svelte-check": "^4.4.0",
88
+ "svelte": "^5.53.5",
89
+ "svelte-check": "^4.4.3",
86
90
  "svelte-clerk": "^0.20.5",
87
- "tailwindcss": "^4.1.18",
91
+ "tailwindcss": "^4.2.1",
88
92
  "typescript": "^5.9.3",
89
- "typescript-eslint": "^8.56.0",
93
+ "typescript-eslint": "^8.56.1",
90
94
  "vite": "^7.3.1"
91
95
  },
92
96
  "dependencies": {
93
97
  "@thetinkerinc/commander": "^0.2.0",
94
98
  "kysely": "^0.28.11",
95
- "pg": "^8.18.0"
99
+ "pg": "^8.19.0"
96
100
  }
97
101
  }