@cosxai/ui 0.18.0 → 0.18.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosxai/ui",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "COSX design system \u2014 React 19 component primitives shared across product-meta and other consumers",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -60,11 +60,17 @@ export function useKeyboardHotkey(
60
60
  if (skipInputs) {
61
61
  const ae = document.activeElement as HTMLElement | null;
62
62
  const tag = ae?.tagName;
63
+ // Containers marked data-hotkey-passthrough host editables
64
+ // the user never types into (e.g. a canvas spreadsheet's
65
+ // hidden cell-editor focus trap) — hotkeys stay live there.
66
+ // Mirrors the same convention in consumer apps.
67
+ const passthrough = !!ae?.closest?.('[data-hotkey-passthrough="true"]');
63
68
  if (
64
- tag === "INPUT" ||
65
- tag === "TEXTAREA" ||
66
- tag === "SELECT" ||
67
- ae?.isContentEditable
69
+ !passthrough &&
70
+ (tag === "INPUT" ||
71
+ tag === "TEXTAREA" ||
72
+ tag === "SELECT" ||
73
+ ae?.isContentEditable)
68
74
  ) {
69
75
  return;
70
76
  }