mirror of
https://github.com/home-assistant/frontend.git
synced 2026-10-11 01:54:44 +01:00
* Migrate from Yarn to pnpm Switch the package manager to pnpm 11, keeping every resolved dependency version from yarn.lock. - Move resolutions to pnpm overrides and Yarn patches to patches/ - Enable supply-chain protection: 3 day minimum release age, trust policy that blocks provenance downgrades, and dependency build scripts denied by default - Declare dependencies that were imported but only available through Yarn's hoisting: zrender, @lezer/common, zxing-wasm, @babel/helper-compilation-targets, core-js-compat, @types/geojson - Look up pinned license overrides in pnpm's node_modules layout - Update CI, scripts, git hooks, Renovate, and documentation * Cache the pnpm store with node_modules in CI Jobs that restore the shared node_modules cache skip the install, so the pnpm store is empty there. The license file generation runs `pnpm licenses list`, which reads package metadata from the store and fails without it. * Point the demo e2e comment at the real test:e2e:demo script --------- Co-authored-by: Claude <noreply@anthropic.com>
87 lines
3.3 KiB
Diff
87 lines
3.3 KiB
Diff
diff --git a/dist/tinykeys.cjs b/dist/tinykeys.cjs
|
|
index 08c98b6eff3b8fb4b727fe8e6b096951d6ef6347..9c44f14862f582766ea1733b6dc0e97f962800d8 100644
|
|
--- a/dist/tinykeys.cjs
|
|
+++ b/dist/tinykeys.cjs
|
|
@@ -61,6 +61,18 @@ function defaultKeybindingsHandlerIgnore(event) {
|
|
function getModifierState(event, mod) {
|
|
return typeof event.getModifierState === "function" ? event.getModifierState(mod) || ALT_GRAPH_ALIASES.includes(mod) && event.getModifierState("AltGraph") : false;
|
|
}
|
|
+function splitKeybindingPress(press) {
|
|
+ let parts = [];
|
|
+ let start = 0;
|
|
+ for (let index = 0; index < press.length; index++) {
|
|
+ if (press[index] === "+" && /[\w\]]/.test(press[index - 1] || "")) {
|
|
+ parts.push(press.slice(start, index));
|
|
+ start = index + 1;
|
|
+ }
|
|
+ }
|
|
+ parts.push(press.slice(start));
|
|
+ return parts;
|
|
+}
|
|
/**
|
|
* Parses a keybinding string into its parts.
|
|
*
|
|
@@ -76,10 +88,10 @@ function getModifierState(event, mod) {
|
|
*/
|
|
function parseKeybinding(str) {
|
|
return str.trim().split(" ").map((press) => {
|
|
- let parts = press.split(/(?<=\w|\])\+/);
|
|
+ let parts = splitKeybindingPress(press);
|
|
let last = parts.pop();
|
|
let regex = last.match(/^\((.+)\)$/);
|
|
- let key = regex ? new RegExp(`^(?:${regex[1]})$`, "iv") : last;
|
|
+ let key = regex ? new RegExp(`^(?:${regex[1]})$`, "i") : last;
|
|
let requiredModifiers = [];
|
|
let optionalModifiers = [];
|
|
for (const part of parts) {
|
|
@@ -201,5 +213,3 @@ exports.defaultKeybindingsHandlerIgnore = defaultKeybindingsHandlerIgnore;
|
|
exports.matchKeybindingPress = matchKeybindingPress;
|
|
exports.parseKeybinding = parseKeybinding;
|
|
exports.tinykeys = tinykeys;
|
|
-
|
|
-//# sourceMappingURL=tinykeys.cjs.map
|
|
\ No newline at end of file
|
|
diff --git a/dist/tinykeys.mjs b/dist/tinykeys.mjs
|
|
index c289972d2728e03d9b272268c38fd3392e8845bf..e22897b00aae6cdb0dbbb971445227c07be52918 100644
|
|
--- a/dist/tinykeys.mjs
|
|
+++ b/dist/tinykeys.mjs
|
|
@@ -60,6 +60,18 @@ function defaultKeybindingsHandlerIgnore(event) {
|
|
function getModifierState(event, mod) {
|
|
return typeof event.getModifierState === "function" ? event.getModifierState(mod) || ALT_GRAPH_ALIASES.includes(mod) && event.getModifierState("AltGraph") : false;
|
|
}
|
|
+function splitKeybindingPress(press) {
|
|
+ let parts = [];
|
|
+ let start = 0;
|
|
+ for (let index = 0; index < press.length; index++) {
|
|
+ if (press[index] === "+" && /[\w\]]/.test(press[index - 1] || "")) {
|
|
+ parts.push(press.slice(start, index));
|
|
+ start = index + 1;
|
|
+ }
|
|
+ }
|
|
+ parts.push(press.slice(start));
|
|
+ return parts;
|
|
+}
|
|
/**
|
|
* Parses a keybinding string into its parts.
|
|
*
|
|
@@ -75,10 +87,10 @@ function getModifierState(event, mod) {
|
|
*/
|
|
function parseKeybinding(str) {
|
|
return str.trim().split(" ").map((press) => {
|
|
- let parts = press.split(/(?<=\w|\])\+/);
|
|
+ let parts = splitKeybindingPress(press);
|
|
let last = parts.pop();
|
|
let regex = last.match(/^\((.+)\)$/);
|
|
- let key = regex ? new RegExp(`^(?:${regex[1]})$`, "iv") : last;
|
|
+ let key = regex ? new RegExp(`^(?:${regex[1]})$`, "i") : last;
|
|
let requiredModifiers = [];
|
|
let optionalModifiers = [];
|
|
for (const part of parts) {
|
|
@@ -196,5 +208,3 @@ function tinykeys(target, keybindingMap, options = {}) {
|
|
}
|
|
//#endregion
|
|
export { createKeybindingsHandler, defaultKeybindingsHandlerIgnore, matchKeybindingPress, parseKeybinding, tinykeys };
|
|
-
|
|
-//# sourceMappingURL=tinykeys.mjs.map
|
|
\ No newline at end of file
|