svelte-common 6.2.4 → 6.2.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.
Files changed (2) hide show
  1. package/package.json +6 -6
  2. package/src/sorting.mjs +5 -7
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "svelte-common",
3
- "version": "6.2.4",
3
+ "version": "6.2.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "exports": {
8
8
  ".": {
9
- "svelte": "./src/index.svelte",
10
- "common.css": "./src/common.css"
11
- }
9
+ "svelte": "./src/index.svelte"
10
+ },
11
+ "./css": "./src/common.css"
12
12
  },
13
13
  "description": "common components and utils used in svelte apps",
14
14
  "keywords": [
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "svelte-command": "^1.1.44",
42
- "svelte-entitlement": "^1.2.56"
42
+ "svelte-entitlement": "^1.2.59"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@semantic-release/commit-analyzer": "^10.0.1",
@@ -49,7 +49,7 @@
49
49
  "ava": "^5.3.1",
50
50
  "c8": "^8.0.0",
51
51
  "documentation": "^14.0.2",
52
- "mf-styling": "^2.0.4",
52
+ "mf-styling": "^2.0.5",
53
53
  "npm-pkgbuild": "^11.8.14",
54
54
  "semantic-release": "^21.0.7",
55
55
  "stylelint": "^15.10.1",
package/src/sorting.mjs CHANGED
@@ -30,7 +30,7 @@ export function toggleOrderBy(orderBy) {
30
30
  * @param {WritableStore} store keep in sync with sorting properties
31
31
  */
32
32
  export function sortable(th, store) {
33
- const storeSubscription = store.subscribe(orderBy =>
33
+ const unsubscribe = store.subscribe(orderBy =>
34
34
  th.setAttribute(ARIA_SORT, orderBy[th.id] || SORT_NONE)
35
35
  );
36
36
 
@@ -50,11 +50,9 @@ export function sortable(th, store) {
50
50
  let sort = peer.getAttribute(ARIA_SORT);
51
51
 
52
52
  if (sort) {
53
- if (peer !== th) {
54
- if (sort !== SORT_NONE) {
55
- sort = SORT_NONE;
56
- peer.setAttribute(ARIA_SORT, sort);
57
- }
53
+ if (peer !== th && sort !== SORT_NONE) {
54
+ sort = SORT_NONE;
55
+ peer.setAttribute(ARIA_SORT, sort);
58
56
  }
59
57
 
60
58
  if (sort !== SORT_NONE) {
@@ -69,7 +67,7 @@ export function sortable(th, store) {
69
67
 
70
68
  return {
71
69
  destroy() {
72
- storeSubscription();
70
+ unsubscribe();
73
71
  }
74
72
  };
75
73
  }