svelte-common 6.15.6 → 6.15.8
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/package.json +6 -6
- package/src/sorting.mjs +5 -5
- package/types/sorting.d.mts +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-common",
|
|
3
|
-
"version": "6.15.
|
|
3
|
+
"version": "6.15.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -55,21 +55,21 @@
|
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@semantic-release/commit-analyzer": "^13.0.0",
|
|
57
57
|
"@semantic-release/exec": "^6.0.3",
|
|
58
|
-
"@semantic-release/github": "^10.3.
|
|
58
|
+
"@semantic-release/github": "^10.3.4",
|
|
59
59
|
"@semantic-release/release-notes-generator": "^14.0.1",
|
|
60
60
|
"@sveltejs/vite-plugin-svelte": "^4.0.0-next.7",
|
|
61
61
|
"ava": "^6.1.3",
|
|
62
62
|
"c8": "^10.1.2",
|
|
63
63
|
"documentation": "^14.0.3",
|
|
64
64
|
"mf-styling": "^3.1.9",
|
|
65
|
-
"npm-pkgbuild": "^15.3.
|
|
65
|
+
"npm-pkgbuild": "^15.3.33",
|
|
66
66
|
"semantic-release": "^24.1.1",
|
|
67
67
|
"stylelint": "^16.9.0",
|
|
68
68
|
"stylelint-config-standard": "^36.0.1",
|
|
69
|
-
"svelte": "^5.0.0-next.
|
|
69
|
+
"svelte": "^5.0.0-next.257",
|
|
70
70
|
"testcafe": "^3.6.2",
|
|
71
71
|
"typescript": "^5.6.2",
|
|
72
|
-
"vite": "^5.4.
|
|
72
|
+
"vite": "^5.4.6",
|
|
73
73
|
"vite-plugin-compression2": "^1.3.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
},
|
|
78
78
|
"optionalDependencies": {
|
|
79
79
|
"mf-hosting-cloudflare": "^1.0.7",
|
|
80
|
-
"mf-hosting-frontend": "^3.
|
|
80
|
+
"mf-hosting-frontend": "^3.3.0"
|
|
81
81
|
},
|
|
82
82
|
"repository": {
|
|
83
83
|
"type": "git",
|
package/src/sorting.mjs
CHANGED
|
@@ -27,11 +27,13 @@ export function toggleOrderBy(orderBy) {
|
|
|
27
27
|
/**
|
|
28
28
|
* Add sortable toggle button to a th node.
|
|
29
29
|
* Synchronizes store value with the nodes "aria-sort" attribute.
|
|
30
|
-
*
|
|
30
|
+
* Usable as svelte action function.
|
|
31
|
+
* @param {Element} th the header element
|
|
31
32
|
* @param {writable} store keep in sync with sorting properties
|
|
33
|
+
* @return {Object} with destroy function
|
|
32
34
|
*/
|
|
33
35
|
export function sortable(th, store) {
|
|
34
|
-
const
|
|
36
|
+
const destroy = store.subscribe(orderBy =>
|
|
35
37
|
th.setAttribute(ARIA_SORT, orderBy[th.id] || SORT_NONE)
|
|
36
38
|
);
|
|
37
39
|
|
|
@@ -67,9 +69,7 @@ export function sortable(th, store) {
|
|
|
67
69
|
th.appendChild(button);
|
|
68
70
|
|
|
69
71
|
return {
|
|
70
|
-
destroy
|
|
71
|
-
unsubscribe();
|
|
72
|
-
}
|
|
72
|
+
destroy
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
|
package/types/sorting.d.mts
CHANGED
|
@@ -8,12 +8,12 @@ export function toggleOrderBy(orderBy?: string | null): string;
|
|
|
8
8
|
/**
|
|
9
9
|
* Add sortable toggle button to a th node.
|
|
10
10
|
* Synchronizes store value with the nodes "aria-sort" attribute.
|
|
11
|
-
*
|
|
11
|
+
* Usable as svelte action function.
|
|
12
|
+
* @param {Element} th the header element
|
|
12
13
|
* @param {writable} store keep in sync with sorting properties
|
|
14
|
+
* @return {Object} with destroy function
|
|
13
15
|
*/
|
|
14
|
-
export function sortable(th: Element, store: typeof writable):
|
|
15
|
-
destroy(): void;
|
|
16
|
-
};
|
|
16
|
+
export function sortable(th: Element, store: typeof writable): any;
|
|
17
17
|
/**
|
|
18
18
|
* Generate a sort function for a given sort-by set.
|
|
19
19
|
* @param {Object|undefined} [sortBy]
|