@vielzeug/focus 26.11.4 → 26.11.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.
- package/dist/errors.js +1 -2
- package/dist/focus.js +1 -2
- package/dist/grid-navigation.js +1 -2
- package/dist/list-navigation.js +1 -2
- package/dist/quick-look-grid.js +1 -2
- package/dist/restore-focus.js +1 -2
- package/package.json +8 -8
package/dist/errors.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
// src/errors.ts
|
|
2
2
|
var FocusError = class extends Error {
|
|
3
3
|
constructor(e, t) {
|
|
4
4
|
super(e, t), this.name = new.target.name, Object.setPrototypeOf(this, new.target.prototype);
|
|
5
5
|
}
|
|
6
6
|
}, FocusConfigError = class extends FocusError {};
|
|
7
|
-
//#endregion
|
|
8
7
|
export { FocusConfigError, FocusError };
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=errors.js.map
|
package/dist/focus.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { matchKey as e } from "@vielzeug/keymap";
|
|
2
|
-
|
|
2
|
+
// src/errors.ts
|
|
3
3
|
var FocusError = class extends Error {
|
|
4
4
|
constructor(e, t) {
|
|
5
5
|
super(e, t), this.name = new.target.name, Object.setPrototypeOf(this, new.target.prototype);
|
|
@@ -288,7 +288,6 @@ var FocusError = class extends Error {
|
|
|
288
288
|
}) : e.fallback ? restoreFocus(e.fallback, { preventScroll: e.preventScroll }) : !1;
|
|
289
289
|
};
|
|
290
290
|
};
|
|
291
|
-
//#endregion
|
|
292
291
|
export { FocusConfigError, FocusError, captureFocus, createGridNavigation, createListNavigation, createQuickLookGrid, rescueFocus, restoreFocus };
|
|
293
292
|
|
|
294
293
|
//# sourceMappingURL=focus.js.map
|
package/dist/grid-navigation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FocusConfigError as e } from "./errors.js";
|
|
2
2
|
import { matchKey as t } from "@vielzeug/keymap";
|
|
3
|
-
|
|
3
|
+
// src/grid-navigation.ts
|
|
4
4
|
var n = {
|
|
5
5
|
first: ["Home"],
|
|
6
6
|
last: ["End"],
|
|
@@ -76,7 +76,6 @@ var n = {
|
|
|
76
76
|
set
|
|
77
77
|
};
|
|
78
78
|
};
|
|
79
|
-
//#endregion
|
|
80
79
|
export { createGridNavigation };
|
|
81
80
|
|
|
82
81
|
//# sourceMappingURL=grid-navigation.js.map
|
package/dist/list-navigation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FocusConfigError as e } from "./errors.js";
|
|
2
2
|
import { matchKey as t } from "@vielzeug/keymap";
|
|
3
|
-
|
|
3
|
+
// src/list-navigation.ts
|
|
4
4
|
var n = {
|
|
5
5
|
both: {
|
|
6
6
|
first: ["Home"],
|
|
@@ -133,7 +133,6 @@ var n = {
|
|
|
133
133
|
set
|
|
134
134
|
};
|
|
135
135
|
};
|
|
136
|
-
//#endregion
|
|
137
136
|
export { createListNavigation };
|
|
138
137
|
|
|
139
138
|
//# sourceMappingURL=list-navigation.js.map
|
package/dist/quick-look-grid.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createGridNavigation as e } from "./grid-navigation.js";
|
|
2
|
-
|
|
2
|
+
// src/quick-look-grid.ts
|
|
3
3
|
var resolve = (e, t) => typeof e == "function" ? e() : e ?? t, createQuickLookGrid = (t) => {
|
|
4
4
|
let activeIndex = () => t.getItems().indexOf(document.activeElement), measuredColumns = () => {
|
|
5
5
|
let e = t.getItems(), n = e.indexOf(document.activeElement);
|
|
@@ -35,7 +35,6 @@ var resolve = (e, t) => typeof e == "function" ? e() : e ?? t, createQuickLookGr
|
|
|
35
35
|
};
|
|
36
36
|
return { handleKeydown };
|
|
37
37
|
};
|
|
38
|
-
//#endregion
|
|
39
38
|
export { createQuickLookGrid };
|
|
40
39
|
|
|
41
40
|
//# sourceMappingURL=quick-look-grid.js.map
|
package/dist/restore-focus.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/restore-focus.ts
|
|
2
2
|
var resolveTarget = (e) => typeof e == "function" ? e() : e, getDeepActiveElement = (e) => {
|
|
3
3
|
let t = e.activeElement;
|
|
4
4
|
for (; t instanceof HTMLElement && t.shadowRoot?.activeElement;) t = t.shadowRoot.activeElement;
|
|
@@ -44,7 +44,6 @@ var resolveTarget = (e) => typeof e == "function" ? e() : e, getDeepActiveElemen
|
|
|
44
44
|
}) : e.fallback ? restoreFocus(e.fallback, { preventScroll: e.preventScroll }) : !1;
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
|
-
//#endregion
|
|
48
47
|
export { captureFocus, rescueFocus, restoreFocus };
|
|
49
48
|
|
|
50
49
|
//# sourceMappingURL=restore-focus.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vielzeug/focus",
|
|
3
|
-
"version": "26.11.
|
|
3
|
+
"version": "26.11.6",
|
|
4
4
|
"description": "Framework-neutral list navigation and focus restoration primitives",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,23 +31,23 @@
|
|
|
31
31
|
"registry": "https://registry.npmjs.org/"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
|
-
"build": "vite build &&
|
|
34
|
+
"build": "vite build && bun run --silent build:bundle && bun run --silent build:types && bun run --silent test:types && bun run --silent verify:exports",
|
|
35
35
|
"build:bundle": "vite build --config vite.bundle.config.ts",
|
|
36
36
|
"build:types": "tsc -p tsconfig.declarations.json",
|
|
37
37
|
"fix": "biome check --write src",
|
|
38
38
|
"lint": "biome ci src",
|
|
39
|
-
"prepublishOnly": "
|
|
39
|
+
"prepublishOnly": "bun run --silent build",
|
|
40
40
|
"test": "vitest",
|
|
41
41
|
"test:types": "tsc -p tsconfig.type-tests.json",
|
|
42
|
-
"verify:exports": "
|
|
42
|
+
"verify:exports": "bun verify-exports.mjs"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@vielzeug/keymap": "26.11.
|
|
45
|
+
"@vielzeug/keymap": "26.11.6"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@types/node": "^26.6.
|
|
48
|
+
"@types/node": "^26.6.6",
|
|
49
49
|
"typescript": "^6.0.3",
|
|
50
|
-
"vite": "^8.3.
|
|
51
|
-
"vitest": "^5.0
|
|
50
|
+
"vite": "^8.3.6",
|
|
51
|
+
"vitest": "^5.1.0"
|
|
52
52
|
}
|
|
53
53
|
}
|