@algorisys/zen-ui-vanilla 13.10.1 → 13.11.0

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.
Files changed (106) hide show
  1. package/AGENTS.md +2 -2
  2. package/dist/_core/index.d.ts +1 -0
  3. package/dist/_core/messages-all.d.ts +5 -0
  4. package/dist/_core/messages.d.ts +5 -0
  5. package/dist/_core/planning-gesture.d.ts +31 -0
  6. package/dist/_core/planning.d.ts +71 -9
  7. package/dist/components/data-table/data-table.d.ts.map +1 -1
  8. package/dist/components/event-calendar/event-calendar-item.d.ts.map +1 -1
  9. package/dist/components/event-calendar/event-calendar-model.d.ts +6 -0
  10. package/dist/components/event-calendar/event-calendar-model.d.ts.map +1 -1
  11. package/dist/components/planning-calendar/planning-calendar.d.ts +61 -3
  12. package/dist/components/planning-calendar/planning-calendar.d.ts.map +1 -1
  13. package/dist/components/rich-text/rich-text.d.ts +5 -7
  14. package/dist/components/rich-text/rich-text.d.ts.map +1 -1
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index108.js +12 -4
  18. package/dist/index108.js.map +1 -1
  19. package/dist/index112.js +244 -144
  20. package/dist/index112.js.map +1 -1
  21. package/dist/index113.js +6 -6
  22. package/dist/index114.js +1 -1
  23. package/dist/index115.js +1 -1
  24. package/dist/index116.js +1 -1
  25. package/dist/index118.js +2 -2
  26. package/dist/index120.js +2 -2
  27. package/dist/index168.js +1 -1
  28. package/dist/index175.js +1 -1
  29. package/dist/index187.js +1 -1
  30. package/dist/index191.js +1 -1
  31. package/dist/index194.js +2 -2
  32. package/dist/index199.js +1 -1
  33. package/dist/index211.js +5 -0
  34. package/dist/index211.js.map +1 -1
  35. package/dist/index230.js +107 -75
  36. package/dist/index230.js.map +1 -1
  37. package/dist/index231.js +95 -7
  38. package/dist/index231.js.map +1 -1
  39. package/dist/index232.js +7 -48
  40. package/dist/index232.js.map +1 -1
  41. package/dist/index233.js +45 -37
  42. package/dist/index233.js.map +1 -1
  43. package/dist/index234.js +38 -149
  44. package/dist/index234.js.map +1 -1
  45. package/dist/index235.js +138 -177
  46. package/dist/index235.js.map +1 -1
  47. package/dist/index236.js +190 -90
  48. package/dist/index236.js.map +1 -1
  49. package/dist/index237.js +90 -444
  50. package/dist/index237.js.map +1 -1
  51. package/dist/index238.js +436 -98
  52. package/dist/index238.js.map +1 -1
  53. package/dist/index239.js +106 -2
  54. package/dist/index239.js.map +1 -1
  55. package/dist/index240.js +2 -18804
  56. package/dist/index240.js.map +1 -1
  57. package/dist/index241.js +18798 -117
  58. package/dist/index241.js.map +1 -1
  59. package/dist/index242.js +122 -13
  60. package/dist/index242.js.map +1 -1
  61. package/dist/index243.js +13 -3012
  62. package/dist/index243.js.map +1 -1
  63. package/dist/index244.js +3006 -123
  64. package/dist/index244.js.map +1 -1
  65. package/dist/index245.js +125 -140
  66. package/dist/index245.js.map +1 -1
  67. package/dist/index246.js +138 -93
  68. package/dist/index246.js.map +1 -1
  69. package/dist/index247.js +91 -104
  70. package/dist/index247.js.map +1 -1
  71. package/dist/index248.js +95 -111
  72. package/dist/index248.js.map +1 -1
  73. package/dist/index249.js +127 -4
  74. package/dist/index249.js.map +1 -1
  75. package/dist/index250.js +5 -34
  76. package/dist/index250.js.map +1 -1
  77. package/dist/index251.js +34 -9
  78. package/dist/index251.js.map +1 -1
  79. package/dist/index252.js +10 -7
  80. package/dist/index252.js.map +1 -1
  81. package/dist/index253.js +6 -15
  82. package/dist/index253.js.map +1 -1
  83. package/dist/index254.js +15 -11
  84. package/dist/index254.js.map +1 -1
  85. package/dist/index255.js +11 -3
  86. package/dist/index255.js.map +1 -1
  87. package/dist/index256.js +7 -0
  88. package/dist/index256.js.map +1 -0
  89. package/dist/index99.js.map +1 -1
  90. package/dist/previews/analytic-chart.jpg +0 -0
  91. package/dist/previews/code-editor.jpg +0 -0
  92. package/dist/previews/countdown.jpg +0 -0
  93. package/dist/previews/loading.jpg +0 -0
  94. package/dist/previews/map.jpg +0 -0
  95. package/dist/previews/skeleton.jpg +0 -0
  96. package/dist/previews/tile.jpg +0 -0
  97. package/dist/style.css +1 -1
  98. package/package.json +1 -1
  99. package/skills/zen-ui/SKILL.md +1 -1
  100. package/skills/zen-ui/references/api/event-calendar-event-calendar.md +1 -0
  101. package/skills/zen-ui/references/api/index.md +1 -1
  102. package/skills/zen-ui/references/api/locale.md +5 -0
  103. package/skills/zen-ui/references/api/planning-calendar.md +30 -1
  104. package/skills/zen-ui/references/api/rich-text.md +1 -1
  105. package/skills/zen-ui/references/api/scan-input.md +1 -1
  106. package/skills/zen-ui/references/catalogue.md +2 -2
package/dist/index242.js CHANGED
@@ -1,17 +1,126 @@
1
- function i(r) {
2
- var f, n, t = "";
3
- if (typeof r == "string" || typeof r == "number") t += r;
4
- else if (typeof r == "object") if (Array.isArray(r)) {
5
- var o = r.length;
6
- for (f = 0; f < o; f++) r[f] && (n = i(r[f])) && (t && (t += " "), t += n);
7
- } else for (n in r) r[n] && (t && (t += " "), t += n);
8
- return t;
9
- }
10
- function a() {
11
- for (var r, f, n = 0, t = "", o = arguments.length; n < o; n++) (r = arguments[n]) && (f = i(r)) && (t && (t += " "), t += f);
12
- return t;
1
+ const u = {
2
+ esc: "Escape",
3
+ escape: "Escape",
4
+ enter: "Enter",
5
+ return: "Enter",
6
+ tab: "Tab",
7
+ space: " ",
8
+ up: "ArrowUp",
9
+ down: "ArrowDown",
10
+ left: "ArrowLeft",
11
+ right: "ArrowRight",
12
+ "↑": "ArrowUp",
13
+ "↓": "ArrowDown",
14
+ "←": "ArrowLeft",
15
+ "→": "ArrowRight",
16
+ arrowup: "ArrowUp",
17
+ arrowdown: "ArrowDown",
18
+ arrowleft: "ArrowLeft",
19
+ arrowright: "ArrowRight",
20
+ pageup: "PageUp",
21
+ pagedown: "PageDown",
22
+ home: "Home",
23
+ end: "End",
24
+ del: "Delete",
25
+ delete: "Delete",
26
+ backspace: "Backspace",
27
+ ins: "Insert",
28
+ insert: "Insert",
29
+ plus: "+"
30
+ }, f = (t) => {
31
+ const s = u[t.toLowerCase()];
32
+ return s || (/^f\d{1,2}$/i.test(t) ? t.toUpperCase() : t.length === 1 ? t.toLowerCase() : t);
33
+ };
34
+ function w(t) {
35
+ const s = t === "+" ? ["+"] : t.split(/\+(?!$)/).map((r) => r.trim()).filter(Boolean), e = { mod: !1, ctrl: !1, alt: !1, shift: !1, meta: !1, key: "" };
36
+ return s.forEach((r, n) => {
37
+ const o = r.toLowerCase();
38
+ if (n === s.length - 1) {
39
+ e.key = f(r);
40
+ return;
41
+ }
42
+ if (o === "mod") e.mod = !0;
43
+ else if (o === "ctrl" || o === "control") e.ctrl = !0;
44
+ else if (o === "alt" || o === "option" || o === "opt") e.alt = !0;
45
+ else if (o === "shift") e.shift = !0;
46
+ else if (o === "meta" || o === "cmd" || o === "command") e.meta = !0;
47
+ else throw new Error(`Unknown modifier "${r}" in "${t}"`);
48
+ }), e;
49
+ }
50
+ function i(t, s) {
51
+ return {
52
+ ctrl: t.ctrl || t.mod && s === "other",
53
+ meta: t.meta || t.mod && s === "mac",
54
+ alt: t.alt,
55
+ shift: t.shift
56
+ };
57
+ }
58
+ function m(t, s, e) {
59
+ const r = i(s, e);
60
+ if (t.ctrlKey !== r.ctrl || t.metaKey !== r.meta || t.altKey !== r.alt) return !1;
61
+ const n = s.key;
62
+ if (/^[a-z0-9]$/.test(n)) {
63
+ if (t.shiftKey !== r.shift) return !1;
64
+ const l = t.key.toLowerCase() === n, c = !!t.code && (t.code === `Key${n.toUpperCase()}` || t.code === `Digit${n}`);
65
+ return l || r.alt && c;
66
+ }
67
+ return n.length === 1 ? s.shift && !t.shiftKey ? !1 : t.key === n : t.shiftKey !== r.shift ? !1 : f(t.key) === n;
68
+ }
69
+ const a = { ctrl: "⌃", alt: "⌥", shift: "⇧", meta: "⌘" }, p = {
70
+ ArrowUp: "↑",
71
+ ArrowDown: "↓",
72
+ ArrowLeft: "←",
73
+ ArrowRight: "→",
74
+ Escape: "Esc",
75
+ " ": "Space",
76
+ PageUp: "PageUp",
77
+ PageDown: "PageDown",
78
+ Delete: "Del",
79
+ Insert: "Ins"
80
+ };
81
+ function h(t, s) {
82
+ const e = i(t, s), r = [];
83
+ s === "mac" ? (e.ctrl && r.push(a.ctrl), e.alt && r.push(a.alt), e.shift && r.push(a.shift), e.meta && r.push(a.meta)) : (e.ctrl && r.push("Ctrl"), e.meta && r.push("Win"), e.alt && r.push("Alt"), e.shift && r.push("Shift"));
84
+ const n = p[t.key] ?? (t.key.length === 1 ? t.key.toUpperCase() : t.key);
85
+ return [...r, n];
86
+ }
87
+ function y(t, s) {
88
+ const e = h(t, s);
89
+ return s === "mac" ? e.join("") : e.join("+");
90
+ }
91
+ function g(t, s) {
92
+ const e = i(t, s), r = [];
93
+ e.ctrl && r.push("Control"), e.alt && r.push("Alt"), e.shift && r.push("Shift"), e.meta && r.push("Meta");
94
+ const n = t.key === " " ? "Space" : t.key.length === 1 ? t.key.toUpperCase() : t.key;
95
+ return r.push(n), r.join("+");
96
+ }
97
+ function A(t, s) {
98
+ const e = i(t, s), r = s === "mac" ? e.meta : e.ctrl, n = t.key;
99
+ return !!(r && !e.alt && ["t", "n", "w", "l", "r", "q", "h", "j"].includes(n) || r && n === "Tab" || !e.ctrl && !e.meta && !e.alt && ["F5", "F11", "F12"].includes(n) || s === "other" && e.alt && !e.ctrl && (n === "F4" || n === "ArrowLeft" || n === "ArrowRight") || s === "mac" && e.meta && (n === "ArrowLeft" || n === "ArrowRight" || n === "[" || n === "]"));
100
+ }
101
+ function d(t, s, e) {
102
+ const r = i(t, e), n = i(s, e);
103
+ return r.ctrl === n.ctrl && r.meta === n.meta && r.alt === n.alt && r.shift === n.shift && t.key === s.key;
104
+ }
105
+ function k(t) {
106
+ const s = t;
107
+ if (!s || typeof s.tagName != "string") return !1;
108
+ const e = s.tagName;
109
+ if (e === "TEXTAREA" || e === "SELECT" || s.isContentEditable) return !0;
110
+ if (e === "INPUT") {
111
+ const r = (s.getAttribute("type") ?? "text").toLowerCase();
112
+ return !["checkbox", "radio", "button", "submit", "reset", "range", "color", "file"].includes(r);
113
+ }
114
+ return !1;
13
115
  }
14
116
  export {
15
- a as clsx
117
+ g as ariaKeyshortcut,
118
+ y as chordLabel,
119
+ h as chordParts,
120
+ A as isReservedChord,
121
+ k as isTypingTarget,
122
+ m as matchesChord,
123
+ w as parseChord,
124
+ d as sameChord
16
125
  };
17
126
  //# sourceMappingURL=index242.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index242.js","sources":["../../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],"names":["r","e","t","f","n","clsx"],"mappings":"AAAA,SAASA,EAAEC,GAAE;AAAC,MAAIC,GAAEC,GAAEC,IAAE;AAAG,MAAa,OAAOH,KAAjB,YAA8B,OAAOA,KAAjB,SAAmB,CAAAG,KAAGH;AAAA,WAAoB,OAAOA,KAAjB,SAAmB,KAAG,MAAM,QAAQA,CAAC,GAAE;AAAC,QAAI,IAAEA,EAAE;AAAO,SAAIC,IAAE,GAAEA,IAAE,GAAEA,IAAI,CAAAD,EAAEC,CAAC,MAAIC,IAAEH,EAAEC,EAAEC,CAAC,CAAC,OAAKE,MAAIA,KAAG,MAAKA,KAAGD;AAAA,EAAE,MAAM,MAAIA,KAAKF,EAAE,CAAAA,EAAEE,CAAC,MAAIC,MAAIA,KAAG,MAAKA,KAAGD;AAAG,SAAOC;AAAC;AAAQ,SAASC,IAAM;AAAC,WAAQJ,GAAEC,GAAEC,IAAE,GAAEC,IAAE,IAAG,IAAE,UAAU,QAAOD,IAAE,GAAEA,IAAI,EAACF,IAAE,UAAUE,CAAC,OAAKD,IAAEF,EAAEC,CAAC,OAAKG,MAAIA,KAAG,MAAKA,KAAGF;AAAG,SAAOE;AAAC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index242.js","sources":["../../core/src/keys.ts"],"sourcesContent":["/**\n * Keyboard chords: the pure half of zen-ui's shortcuts (Kbd, useShortcut,\n * ShortcutHelp), shared by every binding.\n *\n * bun run check:keys\n *\n * A chord is written once, the way people say it: \"Mod+K\", \"Alt+PageDown\",\n * \"Shift+?\", \"F2\". `Mod` is the platform's command key, Ctrl on Windows and\n * Linux, ⌘ on a Mac, so one chord means the right thing everywhere; write\n * \"Ctrl\" only for a chord that really is Ctrl on a Mac too. From that one\n * string this module matches key events, spells the chord for display (⌘ ⌥ ⇧\n * on a Mac), gives its aria-keyshortcuts form, and says whether the browser\n * keeps it for itself.\n */\n\nexport type Platform = \"mac\" | \"other\";\n\nexport interface Chord {\n /** The platform's command key: Ctrl, or ⌘ on a Mac. */\n mod: boolean;\n ctrl: boolean;\n alt: boolean;\n shift: boolean;\n meta: boolean;\n /** The key, normalised: \"k\", \"Enter\", \"ArrowDown\", \"F2\", \"?\". */\n key: string;\n}\n\nconst KEY_ALIASES: Record<string, string> = {\n esc: \"Escape\", escape: \"Escape\", enter: \"Enter\", return: \"Enter\", tab: \"Tab\", space: \" \",\n up: \"ArrowUp\", down: \"ArrowDown\", left: \"ArrowLeft\", right: \"ArrowRight\",\n \"↑\": \"ArrowUp\", \"↓\": \"ArrowDown\", \"←\": \"ArrowLeft\", \"→\": \"ArrowRight\",\n arrowup: \"ArrowUp\", arrowdown: \"ArrowDown\", arrowleft: \"ArrowLeft\", arrowright: \"ArrowRight\",\n pageup: \"PageUp\", pagedown: \"PageDown\", home: \"Home\", end: \"End\",\n del: \"Delete\", delete: \"Delete\", backspace: \"Backspace\", ins: \"Insert\", insert: \"Insert\",\n plus: \"+\",\n};\n\nconst normaliseKey = (k: string): string => {\n const alias = KEY_ALIASES[k.toLowerCase()];\n if (alias) return alias;\n if (/^f\\d{1,2}$/i.test(k)) return k.toUpperCase();\n return k.length === 1 ? k.toLowerCase() : k;\n};\n\n/** \"Mod+Shift+K\" -> a Chord. The last part is the key; a lone \"+\" is the plus key. */\nexport function parseChord(text: string): Chord {\n const parts = text === \"+\" ? [\"+\"] : text.split(/\\+(?!$)/).map((p) => p.trim()).filter(Boolean);\n const chord: Chord = { mod: false, ctrl: false, alt: false, shift: false, meta: false, key: \"\" };\n parts.forEach((p, i) => {\n const lower = p.toLowerCase();\n if (i === parts.length - 1) {\n chord.key = normaliseKey(p);\n return;\n }\n if (lower === \"mod\") chord.mod = true;\n else if (lower === \"ctrl\" || lower === \"control\") chord.ctrl = true;\n else if (lower === \"alt\" || lower === \"option\" || lower === \"opt\") chord.alt = true;\n else if (lower === \"shift\") chord.shift = true;\n else if (lower === \"meta\" || lower === \"cmd\" || lower === \"command\") chord.meta = true;\n else throw new Error(`Unknown modifier \"${p}\" in \"${text}\"`);\n });\n return chord;\n}\n\n/** The modifiers a chord needs on this platform, with Mod resolved. */\nfunction resolved(chord: Chord, platform: Platform) {\n return {\n ctrl: chord.ctrl || (chord.mod && platform === \"other\"),\n meta: chord.meta || (chord.mod && platform === \"mac\"),\n alt: chord.alt,\n shift: chord.shift,\n };\n}\n\n/** What matching needs from a key event: KeyboardEvent has all of it. */\nexport interface KeyEventLike {\n key: string;\n code?: string;\n ctrlKey: boolean;\n altKey: boolean;\n shiftKey: boolean;\n metaKey: boolean;\n}\n\n/**\n * Whether a key event is this chord. Letters match by the key typed, case\n * ignored; with Alt (where a Mac's Option changes the character typed: ⌥N is\n * \"˜\") they match by the physical key. Shifted symbols (\"?\") match whatever\n * Shift state produced them.\n */\nexport function matchesChord(e: KeyEventLike, chord: Chord, platform: Platform): boolean {\n const need = resolved(chord, platform);\n if (e.ctrlKey !== need.ctrl || e.metaKey !== need.meta || e.altKey !== need.alt) return false;\n const k = chord.key;\n const isLetterOrDigit = /^[a-z0-9]$/.test(k);\n if (isLetterOrDigit) {\n if (e.shiftKey !== need.shift) return false;\n const byKey = e.key.toLowerCase() === k;\n const byCode = !!e.code && (e.code === `Key${k.toUpperCase()}` || e.code === `Digit${k}`);\n return byKey || (need.alt && byCode);\n }\n if (k.length === 1) {\n // A symbol: Shift is whatever typing it took, unless the chord asks for it.\n if (chord.shift && !e.shiftKey) return false;\n return e.key === k;\n }\n if (e.shiftKey !== need.shift) return false;\n return normaliseKey(e.key) === k;\n}\n\nconst MAC_SYMBOLS: Record<string, string> = { ctrl: \"⌃\", alt: \"⌥\", shift: \"⇧\", meta: \"⌘\" };\nconst KEY_LABELS: Record<string, string> = {\n ArrowUp: \"↑\", ArrowDown: \"↓\", ArrowLeft: \"←\", ArrowRight: \"→\",\n Escape: \"Esc\", \" \": \"Space\", PageUp: \"PageUp\", PageDown: \"PageDown\", Delete: \"Del\", Insert: \"Ins\",\n};\n\n/**\n * The keys to draw, in order, spelled for the platform: \"Mod+Shift+K\" is\n * [\"Ctrl\", \"Shift\", \"K\"], or [\"⌘\", \"⇧\", \"K\"] on a Mac.\n */\nexport function chordParts(chord: Chord, platform: Platform): string[] {\n const m = resolved(chord, platform);\n const mods: string[] = [];\n if (platform === \"mac\") {\n if (m.ctrl) mods.push(MAC_SYMBOLS.ctrl);\n if (m.alt) mods.push(MAC_SYMBOLS.alt);\n if (m.shift) mods.push(MAC_SYMBOLS.shift);\n if (m.meta) mods.push(MAC_SYMBOLS.meta);\n } else {\n if (m.ctrl) mods.push(\"Ctrl\");\n if (m.meta) mods.push(\"Win\");\n if (m.alt) mods.push(\"Alt\");\n if (m.shift) mods.push(\"Shift\");\n }\n const key = KEY_LABELS[chord.key] ?? (chord.key.length === 1 ? chord.key.toUpperCase() : chord.key);\n return [...mods, key];\n}\n\n/** The chord as one string for a tooltip: \"Ctrl+Shift+K\", or \"⌘⇧K\" on a Mac. */\nexport function chordLabel(chord: Chord, platform: Platform): string {\n const parts = chordParts(chord, platform);\n return platform === \"mac\" ? parts.join(\"\") : parts.join(\"+\");\n}\n\n/** The chord in aria-keyshortcuts' form: \"Control+Shift+K\". */\nexport function ariaKeyshortcut(chord: Chord, platform: Platform): string {\n const m = resolved(chord, platform);\n const parts: string[] = [];\n if (m.ctrl) parts.push(\"Control\");\n if (m.alt) parts.push(\"Alt\");\n if (m.shift) parts.push(\"Shift\");\n if (m.meta) parts.push(\"Meta\");\n const key = chord.key === \" \" ? \"Space\" : chord.key.length === 1 ? chord.key.toUpperCase() : chord.key;\n parts.push(key);\n return parts.join(\"+\");\n}\n\n/**\n * Chords the browser or the system keeps: a page cannot have them, or takes\n * them from the user (a new tab, closing one, the address bar, reload).\n * Registering one is a mistake to report, not a shortcut.\n */\nexport function isReservedChord(chord: Chord, platform: Platform): boolean {\n const m = resolved(chord, platform);\n const primary = platform === \"mac\" ? m.meta : m.ctrl;\n const k = chord.key;\n if (primary && !m.alt && [\"t\", \"n\", \"w\", \"l\", \"r\", \"q\", \"h\", \"j\"].includes(k)) return true;\n if (primary && k === \"Tab\") return true;\n if (!m.ctrl && !m.meta && !m.alt && [\"F5\", \"F11\", \"F12\"].includes(k)) return true;\n if (platform === \"other\" && m.alt && !m.ctrl && (k === \"F4\" || k === \"ArrowLeft\" || k === \"ArrowRight\")) return true;\n if (platform === \"mac\" && m.meta && (k === \"ArrowLeft\" || k === \"ArrowRight\" || k === \"[\" || k === \"]\")) return true;\n return false;\n}\n\n/** Two chords are the same keys on this platform (Mod+K and Ctrl+K are, off a Mac). */\nexport function sameChord(a: Chord, b: Chord, platform: Platform): boolean {\n const ra = resolved(a, platform);\n const rb = resolved(b, platform);\n return ra.ctrl === rb.ctrl && ra.meta === rb.meta && ra.alt === rb.alt && ra.shift === rb.shift && a.key === b.key;\n}\n\n/** Whether a key event came from somewhere typing happens: a field keeps its plain keys. */\nexport function isTypingTarget(target: EventTarget | null): boolean {\n const el = target as (Element & { isContentEditable?: boolean }) | null;\n if (!el || typeof el.tagName !== \"string\") return false;\n const tag = el.tagName;\n if (tag === \"TEXTAREA\" || tag === \"SELECT\" || el.isContentEditable) return true;\n if (tag === \"INPUT\") {\n const type = (el.getAttribute(\"type\") ?? \"text\").toLowerCase();\n return ![\"checkbox\", \"radio\", \"button\", \"submit\", \"reset\", \"range\", \"color\", \"file\"].includes(type);\n }\n return false;\n}\n"],"names":["KEY_ALIASES","normaliseKey","k","alias","parseChord","text","parts","p","chord","i","lower","resolved","platform","matchesChord","e","need","byKey","byCode","MAC_SYMBOLS","KEY_LABELS","chordParts","m","mods","key","chordLabel","ariaKeyshortcut","isReservedChord","primary","sameChord","a","b","ra","rb","isTypingTarget","target","el","tag","type"],"mappings":"AA4BA,MAAMA,IAAsC;AAAA,EAC1C,KAAK;AAAA,EAAU,QAAQ;AAAA,EAAU,OAAO;AAAA,EAAS,QAAQ;AAAA,EAAS,KAAK;AAAA,EAAO,OAAO;AAAA,EACrF,IAAI;AAAA,EAAW,MAAM;AAAA,EAAa,MAAM;AAAA,EAAa,OAAO;AAAA,EAC5D,KAAK;AAAA,EAAW,KAAK;AAAA,EAAa,KAAK;AAAA,EAAa,KAAK;AAAA,EACzD,SAAS;AAAA,EAAW,WAAW;AAAA,EAAa,WAAW;AAAA,EAAa,YAAY;AAAA,EAChF,QAAQ;AAAA,EAAU,UAAU;AAAA,EAAY,MAAM;AAAA,EAAQ,KAAK;AAAA,EAC3D,KAAK;AAAA,EAAU,QAAQ;AAAA,EAAU,WAAW;AAAA,EAAa,KAAK;AAAA,EAAU,QAAQ;AAAA,EAChF,MAAM;AACR,GAEMC,IAAe,CAACC,MAAsB;AAC1C,QAAMC,IAAQH,EAAYE,EAAE,YAAA,CAAa;AACzC,SAAIC,MACA,cAAc,KAAKD,CAAC,IAAUA,EAAE,YAAA,IAC7BA,EAAE,WAAW,IAAIA,EAAE,gBAAgBA;AAC5C;AAGO,SAASE,EAAWC,GAAqB;A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