@sveltek/attachments 0.2.3 → 0.2.5

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/LICENSE.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025, Ivo Dolenc <https://github.com/ivodolenc>
4
- Copyright (c) 2025, Sveltek <https://github.com/sveltek>
3
+ Copyright (c) 2026, Ivo Dolenc <https://github.com/ivodolenc>
4
+ Copyright (c) 2026, Sveltek <https://github.com/sveltek>
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  >
9
9
  > Since [attachments](https://svelte.dev/docs/svelte/svelte-attachments) are a new feature in **Svelte**, this project is in an early testing phase to experiment with their implementation. As a result, breaking changes are very likely before the first stable release.
10
10
  >
11
- > If you find any issues or bugs, please [report](https://github.com/sveltek/markdown/issues/new/choose) them so the project can be improved.
11
+ > If you find any issues or bugs, please [report](https://github.com/sveltek/attachments/issues/new/choose) them so the project can be improved.
12
12
 
13
13
  <br>
14
14
 
package/dist/index.js CHANGED
@@ -4,8 +4,8 @@ function clickOutside(callback, options = {}) {
4
4
  const { event: { target = document } = {}, trigger } = options;
5
5
  const triggers = Array.isArray(trigger) ? trigger : [trigger];
6
6
  const handler = (event) => {
7
- const target$1 = event.target;
8
- if (el.contains(target$1) || triggers.some((v) => v?.contains(target$1))) return;
7
+ const target = event.target;
8
+ if (el.contains(target) || triggers.some((v) => v?.contains(target))) return;
9
9
  callback(event);
10
10
  };
11
11
  target.addEventListener("click", handler, true);
@@ -14,7 +14,6 @@ function clickOutside(callback, options = {}) {
14
14
  };
15
15
  };
16
16
  }
17
-
18
17
  //#endregion
19
18
  //#region src/attachments/keyboard/attachment.ts
20
19
  function keyboard(callback, options = {}) {
@@ -29,7 +28,6 @@ function keyboard(callback, options = {}) {
29
28
  };
30
29
  };
31
30
  }
32
-
33
31
  //#endregion
34
32
  //#region src/attachments/prevent-scroll/attachment.ts
35
33
  function preventScroll(options = {}) {
@@ -61,6 +59,5 @@ function preventScroll(options = {}) {
61
59
  };
62
60
  };
63
61
  }
64
-
65
62
  //#endregion
66
- export { clickOutside, keyboard, preventScroll };
63
+ export { clickOutside, keyboard, preventScroll };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltek/attachments",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "author": "Sveltek",
5
5
  "description": "A collection of custom attachments for Svelte.",
6
6
  "license": "MIT",
@@ -45,17 +45,17 @@
45
45
  }
46
46
  },
47
47
  "devDependencies": {
48
- "@hypernym/bundler": "^0.31.0",
48
+ "@hypernym/bundler": "^0.32.1",
49
49
  "@sveltejs/adapter-static": "^3.0.10",
50
- "@sveltejs/kit": "^2.49.2",
51
- "@sveltek/eslint-config": "^1.1.3",
52
- "@sveltek/prettier-config": "^1.0.5",
53
- "@types/node": "^24.10.4",
54
- "eslint": "^9.39.2",
55
- "prettier": "^3.7.4",
56
- "svelte": "^5.46.0",
50
+ "@sveltejs/kit": "^2.53.4",
51
+ "@sveltek/eslint-config": "^1.1.5",
52
+ "@sveltek/prettier-config": "^1.0.7",
53
+ "@types/node": "^25.4.0",
54
+ "eslint": "^9.39.4",
55
+ "prettier": "^3.8.1",
56
+ "svelte": "^5.53.9",
57
57
  "typescript": "^5.9.3",
58
- "vite": "^7.3.0"
58
+ "vite": "^7.3.1"
59
59
  },
60
60
  "scripts": {
61
61
  "build": "hyperbundler",