@streamoid/ui 0.6.56 → 0.6.57

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/index.d.mts CHANGED
@@ -1067,6 +1067,10 @@ interface StreamoidSearchShortcutEvent {
1067
1067
  metaKey: boolean;
1068
1068
  ctrlKey: boolean;
1069
1069
  altKey: boolean;
1070
+ /** `true` on the `keydown`s the OS synthesises while the chord is HELD.
1071
+ * Optional so a caller hand-building an event object does not have to know
1072
+ * about it; absent reads as a first press. */
1073
+ repeat?: boolean;
1070
1074
  }
1071
1075
  /**
1072
1076
  * Is this keydown the search chord?
@@ -1080,6 +1084,11 @@ interface StreamoidSearchShortcutEvent {
1080
1084
  * resolved through the keyboard layout. `code` is physical, so on AZERTY or
1081
1085
  * Dvorak the key labelled K is not `KeyK` and the shortcut would land under
1082
1086
  * a different letter than the `⌘ K` hint promises.
1087
+ * - A REPEAT IS NOT A SECOND PRESS. Auto-repeat fires `keydown` every few
1088
+ * tens of ms once the OS delay passes, and the hook drives a TOGGLE — so
1089
+ * without this, holding the chord flickers the dialog open and shut for as
1090
+ * long as the key is down. Found by review on cxo-dashboard, where the
1091
+ * hand-rolled listener this replaces had exactly that bug.
1083
1092
  */
1084
1093
  declare function matchesStreamoidSearchShortcut(event: StreamoidSearchShortcutEvent, letter?: string): boolean;
1085
1094
  interface StreamoidSearchShortcutOptions {
package/dist/index.d.ts CHANGED
@@ -1067,6 +1067,10 @@ interface StreamoidSearchShortcutEvent {
1067
1067
  metaKey: boolean;
1068
1068
  ctrlKey: boolean;
1069
1069
  altKey: boolean;
1070
+ /** `true` on the `keydown`s the OS synthesises while the chord is HELD.
1071
+ * Optional so a caller hand-building an event object does not have to know
1072
+ * about it; absent reads as a first press. */
1073
+ repeat?: boolean;
1070
1074
  }
1071
1075
  /**
1072
1076
  * Is this keydown the search chord?
@@ -1080,6 +1084,11 @@ interface StreamoidSearchShortcutEvent {
1080
1084
  * resolved through the keyboard layout. `code` is physical, so on AZERTY or
1081
1085
  * Dvorak the key labelled K is not `KeyK` and the shortcut would land under
1082
1086
  * a different letter than the `⌘ K` hint promises.
1087
+ * - A REPEAT IS NOT A SECOND PRESS. Auto-repeat fires `keydown` every few
1088
+ * tens of ms once the OS delay passes, and the hook drives a TOGGLE — so
1089
+ * without this, holding the chord flickers the dialog open and shut for as
1090
+ * long as the key is down. Found by review on cxo-dashboard, where the
1091
+ * hand-rolled listener this replaces had exactly that bug.
1083
1092
  */
1084
1093
  declare function matchesStreamoidSearchShortcut(event: StreamoidSearchShortcutEvent, letter?: string): boolean;
1085
1094
  interface StreamoidSearchShortcutOptions {
package/dist/index.js CHANGED
@@ -6185,6 +6185,7 @@ function ScWorkspaceAccountMenu({
6185
6185
  var import_react19 = require("react");
6186
6186
  function matchesStreamoidSearchShortcut(event, letter = "k") {
6187
6187
  if (event.altKey) return false;
6188
+ if (event.repeat) return false;
6188
6189
  if (!event.metaKey && !event.ctrlKey) return false;
6189
6190
  return event.key.toLowerCase() === letter.toLowerCase();
6190
6191
  }
package/dist/index.mjs CHANGED
@@ -5995,6 +5995,7 @@ function ScWorkspaceAccountMenu({
5995
5995
  import { useEffect as useEffect5, useRef as useRef6 } from "react";
5996
5996
  function matchesStreamoidSearchShortcut(event, letter = "k") {
5997
5997
  if (event.altKey) return false;
5998
+ if (event.repeat) return false;
5998
5999
  if (!event.metaKey && !event.ctrlKey) return false;
5999
6000
  return event.key.toLowerCase() === letter.toLowerCase();
6000
6001
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamoid/ui",
3
- "version": "0.6.56",
3
+ "version": "0.6.57",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",