@aortl/admin-react 0.18.4 → 0.18.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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.18.5] - 2026-06-30
8
+
9
+ ### Fixed
10
+
11
+ - Global hotkey handling no longer throws on synthetic `keydown` events that omit `key` (autofill, password managers, some IMEs); `normalizeEvent` now treats a `key`-less event as no chord. (react)
12
+
7
13
  ## [0.18.4] - 2026-06-29
8
14
 
9
15
  ### Added
@@ -105,12 +111,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
105
111
  - Make `primary` a high-contrast neutral and move blue to `info`. (both)
106
112
  - Use solid color fills for `Alert` and `Badge` status variants. (both)
107
113
 
108
- [Unreleased]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.4...HEAD
114
+ [Unreleased]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.5...HEAD
109
115
  [0.16.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.16.0...v0.16.1
110
116
  [0.16.0]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.15.1...v0.16.0
111
117
  [0.15.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.15.0...v0.15.1
112
118
  [0.15.0]: https://github.com/Digital-Udvikling/admin-design-system/releases/tag/v0.15.0
113
119
 
120
+ [0.18.5]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.4...v0.18.5
114
121
  [0.18.4]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.3...v0.18.4
115
122
  [0.18.3]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.2...v0.18.3
116
123
  [0.18.2]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.1...v0.18.2
@@ -14,7 +14,7 @@ export declare function parseChord(input: string): ParsedChord;
14
14
  export declare function parseKeys(keys: string | readonly string[]): ParsedChord[];
15
15
  /** Canonical wire form used as a map key in the registry. */
16
16
  export declare function canonicalize(chord: ParsedChord): string;
17
- /** Canonical chord string for a keyboard event; `null` for a bare modifier press. */
17
+ /** Canonical chord string for a keyboard event; `null` for a bare modifier press or a `key`-less synthetic event. */
18
18
  export declare function normalizeEvent(e: KeyboardEvent): string | null;
19
19
  /** Visual chips for a chord — one entry per modifier and the final key. */
20
20
  export declare function formatChord(chord: ParsedChord): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"hotkey-parse.d.ts","sourceRoot":"","sources":["../src/hotkey-parse.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAEzD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;CACb;AAkCD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CA2BrD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,WAAW,EAAE,CAGzE;AAED,6DAA6D;AAC7D,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAOvD;AAED,qFAAqF;AACrF,wBAAgB,cAAc,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAa9D;AA0BD,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,EAAE,CAcxD;AAkBD,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,CAEzE"}
1
+ {"version":3,"file":"hotkey-parse.d.ts","sourceRoot":"","sources":["../src/hotkey-parse.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAEzD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;CACb;AAkCD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CA2BrD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,WAAW,EAAE,CAGzE;AAED,6DAA6D;AAC7D,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAOvD;AAED,qHAAqH;AACrH,wBAAgB,cAAc,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAe9D;AA0BD,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,EAAE,CAcxD;AAkBD,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,CAEzE"}
package/dist/index.cjs CHANGED
@@ -390,8 +390,9 @@ function canonicalize(chord) {
390
390
  parts.push(chord.key);
391
391
  return parts.join("+");
392
392
  }
393
- /** Canonical chord string for a keyboard event; `null` for a bare modifier press. */
393
+ /** Canonical chord string for a keyboard event; `null` for a bare modifier press or a `key`-less synthetic event. */
394
394
  function normalizeEvent(e) {
395
+ if (!e.key) return null;
395
396
  const key = e.key.toLowerCase();
396
397
  if (key === "control" || key === "shift" || key === "alt" || key === "meta") return null;
397
398
  const mods = /* @__PURE__ */ new Set();