@tanstack/hotkeys-devtools 0.8.1 → 1.0.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.
@@ -1,6 +1,7 @@
1
1
  import { effectiveSequenceMatchedSteps } from "../sequence-progress.js";
2
2
  import { useHotkeysDevtoolsState } from "../HotkeysContextProvider.js";
3
3
  import { useStyles } from "../styles/use-styles.js";
4
+ import { formatRegistration, getBindingKind, useRegistrationConflicts } from "../_registrations.js";
4
5
  import { className, createComponent, delegateEvents, effect, insert, memo, template } from "solid-js/web";
5
6
  import { For, Show, createEffect, createMemo, createSignal, on } from "solid-js";
6
7
  import { formatForDisplay } from "@tanstack/hotkeys";
@@ -8,10 +9,7 @@ import clsx from "clsx";
8
9
  import { matchSorter } from "match-sorter";
9
10
 
10
11
  //#region src/components/HotkeyList.tsx
11
- var _tmpl$ = /* @__PURE__ */ template(`<span data-tooltip>`), _tmpl$2 = /* @__PURE__ */ template(`<span>`), _tmpl$3 = /* @__PURE__ */ template(`<span>x`), _tmpl$4 = /* @__PURE__ */ template(`<div><span><span></span></span><div><span><span data-tooltip></span></span><span><span data-tooltip>Fires on <!> event</span></span><span><span data-tooltip>`), _tmpl$5 = /* @__PURE__ */ template(`<span><span>`), _tmpl$6 = /* @__PURE__ */ template(`<span><span data-tooltip>`), _tmpl$7 = /* @__PURE__ */ template(`<span>i<span data-tooltip>`), _tmpl$8 = /* @__PURE__ */ template(`<button>&times;`), _tmpl$9 = /* @__PURE__ */ template(`<div><input type=text placeholder="Search hotkeys...">`), _tmpl$0 = /* @__PURE__ */ template(`<div>Hotkeys (<!>)`), _tmpl$1 = /* @__PURE__ */ template(`<div>`), _tmpl$10 = /* @__PURE__ */ template(`<div>Sequences (<!>)`);
12
- function sequenceKey(sequence) {
13
- return sequence.join("|");
14
- }
12
+ var _tmpl$ = /* @__PURE__ */ template(`<span data-tooltip>`), _tmpl$2 = /* @__PURE__ */ template(`<span>`), _tmpl$3 = /* @__PURE__ */ template(`<span>x`), _tmpl$4 = /* @__PURE__ */ template(`<div><span><span></span></span><div><span data-binding-kind></span><span><span data-tooltip></span></span><span><span data-tooltip>Fires on <!> event</span></span><span><span data-tooltip>`), _tmpl$5 = /* @__PURE__ */ template(`<span><span>`), _tmpl$6 = /* @__PURE__ */ template(`<span><span data-tooltip>`), _tmpl$7 = /* @__PURE__ */ template(`<span>i<span data-tooltip>`), _tmpl$8 = /* @__PURE__ */ template(`<button>&times;`), _tmpl$9 = /* @__PURE__ */ template(`<div><input type=text placeholder="Search hotkeys...">`), _tmpl$0 = /* @__PURE__ */ template(`<div>Hotkeys (<!>)`), _tmpl$1 = /* @__PURE__ */ template(`<div>`), _tmpl$10 = /* @__PURE__ */ template(`<div>Sequences (<!>)`);
15
13
  function getTargetLabel(target) {
16
14
  if (typeof document !== "undefined" && target === document) return "document";
17
15
  if (typeof window !== "undefined" && target === window) return "window";
@@ -34,21 +32,10 @@ function getTargetTooltip(target) {
34
32
  }
35
33
  return "Listening on element";
36
34
  }
37
- function findTargetConflicts(registration, all) {
38
- return all.filter((other) => other.id !== registration.id && other.hotkey === registration.hotkey && other.options.eventType === registration.options.eventType && other.target === registration.target);
39
- }
40
- function findScopeConflicts(registration, all) {
41
- return all.filter((other) => other.id !== registration.id && other.hotkey === registration.hotkey && other.options.eventType === registration.options.eventType && other.target !== registration.target);
42
- }
43
- function findSequenceTargetConflicts(registration, all) {
44
- return all.filter((other) => other.id !== registration.id && sequenceKey(other.sequence) === sequenceKey(registration.sequence) && other.options.eventType === registration.options.eventType && other.target === registration.target);
45
- }
46
- function findSequenceScopeConflicts(registration, all) {
47
- return all.filter((other) => other.id !== registration.id && sequenceKey(other.sequence) === sequenceKey(registration.sequence) && other.options.eventType === registration.options.eventType && other.target !== registration.target);
48
- }
49
35
  function buildRowTooltip(meta) {
50
36
  if (!meta) return void 0;
51
37
  const parts = [];
38
+ if (meta.group) parts.push(meta.group);
52
39
  if (meta.name) parts.push(meta.name);
53
40
  if (meta.description) parts.push(meta.description);
54
41
  return parts.length > 0 ? parts.join(" — ") : void 0;
@@ -56,34 +43,17 @@ function buildRowTooltip(meta) {
56
43
  function SequenceListRow(props) {
57
44
  const styles = useStyles();
58
45
  const sequenceRegistrations = () => props.getSequences();
59
- const targetConflicts = () => findSequenceTargetConflicts(props.reg, sequenceRegistrations());
60
- const scopeConflicts = () => findSequenceScopeConflicts(props.reg, sequenceRegistrations());
46
+ const conflicts = useRegistrationConflicts(() => props.reg);
47
+ const targetConflicts = () => conflicts().overlapping;
48
+ const scopeConflicts = () => conflicts().separate;
61
49
  const hasTargetConflict = () => targetConflicts().length > 0;
62
50
  const hasScopeConflict = () => scopeConflicts().length > 0;
63
- const conflictBehavior = () => props.reg.options.conflictBehavior ?? "warn";
64
- const targetConflictBadge = () => {
65
- const behavior = conflictBehavior();
66
- const c = targetConflicts();
67
- if (behavior === "allow") return {
68
- style: "badgeAllow",
69
- label: "~",
70
- tooltip: `Allowed: ${c.length} other binding${c.length > 1 ? "s" : ""} on same sequence and target (conflictBehavior: allow)`
71
- };
72
- if (behavior === "error") return {
73
- style: "badgeError",
74
- label: "!",
75
- tooltip: `Error: ${c.length} conflicting binding${c.length > 1 ? "s" : ""} on same sequence and target (conflictBehavior: error)`
76
- };
77
- return {
78
- style: "badgeConflict",
79
- label: "!",
80
- tooltip: `Warning: ${c.length} other binding${c.length > 1 ? "s" : ""} on same sequence and target`
81
- };
82
- };
83
- const scopeConflictTooltip = () => {
84
- const c = scopeConflicts();
85
- return `Info: ${c.length} binding${c.length > 1 ? "s" : ""} with same sequence on different target${c.length > 1 ? "s" : ""}`;
86
- };
51
+ const targetConflictBadge = () => ({
52
+ style: "badgeConflict",
53
+ label: "!",
54
+ tooltip: `Potential overlap: ${targetConflicts().length} other bindings on overlapping targets`
55
+ });
56
+ const scopeConflictTooltip = () => `Info: ${scopeConflicts().length} related bindings on separate targets`;
87
57
  const enabled = () => props.reg.options.enabled !== false;
88
58
  const liveSequenceReg = createMemo(() => sequenceRegistrations().find((r) => r.id === props.reg.id) ?? props.reg);
89
59
  const triggerCount = () => sequenceRegistrations().find((r) => r.id === props.reg.id)?.triggerCount ?? props.reg.triggerCount;
@@ -100,9 +70,9 @@ function SequenceListRow(props) {
100
70
  const metaName = () => props.reg.options.meta?.name;
101
71
  const rowTooltip = () => buildRowTooltip(props.reg.options.meta);
102
72
  return (() => {
103
- var _el$ = _tmpl$4(), _el$3 = _el$.firstChild, _el$4 = _el$3.firstChild, _el$8 = _el$3.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$9.nextSibling, _el$10 = _el$1.firstChild, _el$13 = _el$10.firstChild.nextSibling;
104
- _el$13.nextSibling;
105
- var _el$14 = _el$1.nextSibling, _el$15 = _el$14.firstChild;
73
+ var _el$ = _tmpl$4(), _el$3 = _el$.firstChild, _el$4 = _el$3.firstChild, _el$8 = _el$3.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$0.firstChild, _el$10 = _el$0.nextSibling, _el$11 = _el$10.firstChild, _el$14 = _el$11.firstChild.nextSibling;
74
+ _el$14.nextSibling;
75
+ var _el$15 = _el$10.nextSibling, _el$16 = _el$15.firstChild;
106
76
  _el$.$$click = () => props.setSelectedId(props.reg.id);
107
77
  insert(_el$, createComponent(Show, {
108
78
  get when() {
@@ -120,16 +90,16 @@ function SequenceListRow(props) {
120
90
  return liveSequenceReg().sequence;
121
91
  },
122
92
  children: (step, i) => (() => {
123
- var _el$16 = _tmpl$5(), _el$17 = _el$16.firstChild;
124
- insert(_el$16, createComponent(Show, {
93
+ var _el$17 = _tmpl$5(), _el$18 = _el$17.firstChild;
94
+ insert(_el$17, createComponent(Show, {
125
95
  get when() {
126
96
  return i() > 0;
127
97
  },
128
98
  children: " "
129
- }), _el$17);
130
- insert(_el$17, () => formatForDisplay(step));
131
- effect(() => className(_el$17, i() < matchedSteps() ? styles().sequenceStepMatched : void 0));
132
- return _el$16;
99
+ }), _el$18);
100
+ insert(_el$18, () => formatForDisplay(step, { platform: props.reg.options.platform }));
101
+ effect(() => className(_el$18, i() < matchedSteps() ? styles().sequenceStepMatched : void 0));
102
+ return _el$17;
133
103
  })()
134
104
  }));
135
105
  insert(_el$3, createComponent(Show, {
@@ -155,49 +125,50 @@ function SequenceListRow(props) {
155
125
  return _el$6;
156
126
  }
157
127
  }), _el$8);
128
+ insert(_el$9, () => getBindingKind(props.reg));
158
129
  insert(_el$8, (() => {
159
130
  var _c$ = memo(() => !!hasTargetConflict());
160
131
  return () => _c$() && (() => {
161
- var _el$18 = _tmpl$6(), _el$19 = _el$18.firstChild;
162
- insert(_el$18, () => targetConflictBadge().label, _el$19);
163
- insert(_el$19, () => targetConflictBadge().tooltip);
132
+ var _el$19 = _tmpl$6(), _el$20 = _el$19.firstChild;
133
+ insert(_el$19, () => targetConflictBadge().label, _el$20);
134
+ insert(_el$20, () => targetConflictBadge().tooltip);
164
135
  effect((_p$) => {
165
- var _v$1 = clsx(styles().badge, styles()[targetConflictBadge().style], styles().tooltip), _v$10 = styles().tooltipText;
166
- _v$1 !== _p$.e && className(_el$18, _p$.e = _v$1);
167
- _v$10 !== _p$.t && className(_el$19, _p$.t = _v$10);
136
+ var _v$10 = clsx(styles().badge, styles()[targetConflictBadge().style], styles().tooltip), _v$11 = styles().tooltipText;
137
+ _v$10 !== _p$.e && className(_el$19, _p$.e = _v$10);
138
+ _v$11 !== _p$.t && className(_el$20, _p$.t = _v$11);
168
139
  return _p$;
169
140
  }, {
170
141
  e: void 0,
171
142
  t: void 0
172
143
  });
173
- return _el$18;
144
+ return _el$19;
174
145
  })();
175
- })(), _el$9);
146
+ })(), _el$0);
176
147
  insert(_el$8, (() => {
177
148
  var _c$2 = memo(() => !!hasScopeConflict());
178
149
  return () => _c$2() && (() => {
179
- var _el$20 = _tmpl$7(), _el$22 = _el$20.firstChild.nextSibling;
180
- insert(_el$22, scopeConflictTooltip);
150
+ var _el$21 = _tmpl$7(), _el$23 = _el$21.firstChild.nextSibling;
151
+ insert(_el$23, scopeConflictTooltip);
181
152
  effect((_p$) => {
182
- var _v$11 = clsx(styles().badge, styles().badgeInfo, styles().tooltip), _v$12 = styles().tooltipText;
183
- _v$11 !== _p$.e && className(_el$20, _p$.e = _v$11);
184
- _v$12 !== _p$.t && className(_el$22, _p$.t = _v$12);
153
+ var _v$12 = clsx(styles().badge, styles().badgeInfo, styles().tooltip), _v$13 = styles().tooltipText;
154
+ _v$12 !== _p$.e && className(_el$21, _p$.e = _v$12);
155
+ _v$13 !== _p$.t && className(_el$23, _p$.t = _v$13);
185
156
  return _p$;
186
157
  }, {
187
158
  e: void 0,
188
159
  t: void 0
189
160
  });
190
- return _el$20;
161
+ return _el$21;
191
162
  })();
192
- })(), _el$9);
193
- insert(_el$9, () => enabled() ? "on" : "off", _el$0);
194
- insert(_el$0, () => enabled() ? "Sequence is enabled" : "Sequence is disabled");
195
- insert(_el$1, () => props.reg.options.eventType ?? "keydown", _el$10);
196
- insert(_el$10, () => props.reg.options.eventType ?? "keydown", _el$13);
197
- insert(_el$14, () => getTargetLabel(props.reg.target), _el$15);
198
- insert(_el$15, () => getTargetTooltip(props.reg.target));
163
+ })(), _el$0);
164
+ insert(_el$0, () => enabled() ? "on" : "off", _el$1);
165
+ insert(_el$1, () => enabled() ? "Sequence is enabled" : "Sequence is disabled");
166
+ insert(_el$10, () => props.reg.options.eventType ?? "keydown", _el$11);
167
+ insert(_el$11, () => props.reg.options.eventType ?? "keydown", _el$14);
168
+ insert(_el$15, () => getTargetLabel(props.reg.target), _el$16);
169
+ insert(_el$16, () => getTargetTooltip(props.reg.target));
199
170
  effect((_p$) => {
200
- var _v$ = clsx(styles().hotkeyRow, props.selectedId() === props.reg.id && styles().hotkeyRowSelected, pulsing() && styles().hotkeyRowTriggered, rowTooltip() && styles().tooltip), _v$2 = styles().hotkeyLabel, _v$3 = styles().hotkeyLabelKeys, _v$4 = styles().hotkeyBadges, _v$5 = clsx(styles().badge, enabled() ? styles().badgeEnabled : styles().badgeDisabled, styles().tooltip), _v$6 = styles().tooltipText, _v$7 = clsx(styles().badge, (props.reg.options.eventType ?? "keydown") === "keydown" ? styles().badgeKeydown : styles().badgeKeyup, styles().tooltip), _v$8 = styles().tooltipText, _v$9 = clsx(styles().badge, styles().badgeTarget, styles().tooltip), _v$0 = styles().tooltipText;
171
+ var _v$ = clsx(styles().hotkeyRow, props.selectedId() === props.reg.id && styles().hotkeyRowSelected, pulsing() && styles().hotkeyRowTriggered, rowTooltip() && styles().tooltip), _v$2 = styles().hotkeyLabel, _v$3 = styles().hotkeyLabelKeys, _v$4 = styles().hotkeyBadges, _v$5 = clsx(styles().badge, styles().badgeTarget), _v$6 = clsx(styles().badge, enabled() ? styles().badgeEnabled : styles().badgeDisabled, styles().tooltip), _v$7 = styles().tooltipText, _v$8 = clsx(styles().badge, (props.reg.options.eventType ?? "keydown") === "keydown" ? styles().badgeKeydown : styles().badgeKeyup, styles().tooltip), _v$9 = styles().tooltipText, _v$0 = clsx(styles().badge, styles().badgeTarget, styles().tooltip), _v$1 = styles().tooltipText;
201
172
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
202
173
  _v$2 !== _p$.t && className(_el$3, _p$.t = _v$2);
203
174
  _v$3 !== _p$.a && className(_el$4, _p$.a = _v$3);
@@ -206,8 +177,9 @@ function SequenceListRow(props) {
206
177
  _v$6 !== _p$.n && className(_el$0, _p$.n = _v$6);
207
178
  _v$7 !== _p$.s && className(_el$1, _p$.s = _v$7);
208
179
  _v$8 !== _p$.h && className(_el$10, _p$.h = _v$8);
209
- _v$9 !== _p$.r && className(_el$14, _p$.r = _v$9);
180
+ _v$9 !== _p$.r && className(_el$11, _p$.r = _v$9);
210
181
  _v$0 !== _p$.d && className(_el$15, _p$.d = _v$0);
182
+ _v$1 !== _p$.l && className(_el$16, _p$.l = _v$1);
211
183
  return _p$;
212
184
  }, {
213
185
  e: void 0,
@@ -219,7 +191,8 @@ function SequenceListRow(props) {
219
191
  s: void 0,
220
192
  h: void 0,
221
193
  r: void 0,
222
- d: void 0
194
+ d: void 0,
195
+ l: void 0
223
196
  });
224
197
  return _el$;
225
198
  })();
@@ -234,91 +207,76 @@ function HotkeyList(props) {
234
207
  const query = searchQuery().trim();
235
208
  if (!query) return registrations();
236
209
  return matchSorter(registrations(), query, { keys: [
237
- (r) => formatForDisplay(r.hotkey),
210
+ (r) => formatRegistration(r),
238
211
  "hotkey",
239
212
  "options.meta.name",
240
- "options.meta.description"
213
+ "options.meta.description",
214
+ "options.meta.group"
241
215
  ] });
242
216
  });
243
217
  const filteredSequenceRegistrations = createMemo(() => {
244
218
  const query = searchQuery().trim();
245
219
  if (!query) return sequenceRegistrations();
246
220
  return matchSorter(sequenceRegistrations(), query, { keys: [
247
- (r) => r.sequence.map((s) => formatForDisplay(s)).join(" "),
221
+ (r) => formatRegistration(r),
248
222
  (r) => r.sequence.join(" "),
249
223
  "options.meta.name",
250
- "options.meta.description"
224
+ "options.meta.description",
225
+ "options.meta.group"
251
226
  ] });
252
227
  });
253
228
  return [
254
229
  (() => {
255
- var _el$23 = _tmpl$9(), _el$24 = _el$23.firstChild;
256
- _el$24.$$input = (e) => setSearchQuery(e.currentTarget.value);
257
- insert(_el$23, createComponent(Show, {
230
+ var _el$24 = _tmpl$9(), _el$25 = _el$24.firstChild;
231
+ _el$25.$$input = (e) => setSearchQuery(e.currentTarget.value);
232
+ insert(_el$24, createComponent(Show, {
258
233
  get when() {
259
234
  return searchQuery();
260
235
  },
261
236
  get children() {
262
- var _el$25 = _tmpl$8();
263
- _el$25.$$click = () => setSearchQuery("");
264
- effect(() => className(_el$25, styles().searchClear));
265
- return _el$25;
237
+ var _el$26 = _tmpl$8();
238
+ _el$26.$$click = () => setSearchQuery("");
239
+ effect(() => className(_el$26, styles().searchClear));
240
+ return _el$26;
266
241
  }
267
242
  }), null);
268
243
  effect((_p$) => {
269
- var _v$13 = styles().searchContainer, _v$14 = styles().searchInput;
270
- _v$13 !== _p$.e && className(_el$23, _p$.e = _v$13);
271
- _v$14 !== _p$.t && className(_el$24, _p$.t = _v$14);
244
+ var _v$14 = styles().searchContainer, _v$15 = styles().searchInput;
245
+ _v$14 !== _p$.e && className(_el$24, _p$.e = _v$14);
246
+ _v$15 !== _p$.t && className(_el$25, _p$.t = _v$15);
272
247
  return _p$;
273
248
  }, {
274
249
  e: void 0,
275
250
  t: void 0
276
251
  });
277
- effect(() => _el$24.value = searchQuery());
278
- return _el$23;
252
+ effect(() => _el$25.value = searchQuery());
253
+ return _el$24;
279
254
  })(),
280
255
  (() => {
281
- var _el$26 = _tmpl$0(), _el$29 = _el$26.firstChild.nextSibling;
282
- _el$29.nextSibling;
283
- insert(_el$26, () => filteredRegistrations().length, _el$29);
284
- effect(() => className(_el$26, styles().panelHeader));
285
- return _el$26;
256
+ var _el$27 = _tmpl$0(), _el$30 = _el$27.firstChild.nextSibling;
257
+ _el$30.nextSibling;
258
+ insert(_el$27, () => filteredRegistrations().length, _el$30);
259
+ effect(() => className(_el$27, styles().panelHeader));
260
+ return _el$27;
286
261
  })(),
287
262
  (() => {
288
- var _el$30 = _tmpl$1();
289
- insert(_el$30, createComponent(For, {
263
+ var _el$31 = _tmpl$1();
264
+ insert(_el$31, createComponent(For, {
290
265
  get each() {
291
266
  return filteredRegistrations();
292
267
  },
293
268
  children: (reg) => {
294
- const targetConflicts = () => findTargetConflicts(reg, registrations());
295
- const scopeConflicts = () => findScopeConflicts(reg, registrations());
269
+ const conflicts = useRegistrationConflicts(() => reg);
270
+ const targetConflicts = () => conflicts().overlapping;
271
+ const scopeConflicts = () => conflicts().separate;
296
272
  const hasTargetConflict = () => targetConflicts().length > 0;
297
273
  const hasScopeConflict = () => scopeConflicts().length > 0;
298
- const conflictBehavior = () => reg.options.conflictBehavior ?? "warn";
299
- const targetConflictBadge = () => {
300
- const behavior = conflictBehavior();
301
- const c = targetConflicts();
302
- if (behavior === "allow") return {
303
- style: "badgeAllow",
304
- label: "~",
305
- tooltip: `Allowed: ${c.length} other binding${c.length > 1 ? "s" : ""} on same key and target (conflictBehavior: allow)`
306
- };
307
- if (behavior === "error") return {
308
- style: "badgeError",
309
- label: "!",
310
- tooltip: `Error: ${c.length} conflicting binding${c.length > 1 ? "s" : ""} on same key and target (conflictBehavior: error)`
311
- };
312
- return {
313
- style: "badgeConflict",
314
- label: "!",
315
- tooltip: `Warning: ${c.length} other binding${c.length > 1 ? "s" : ""} on same key and target`
316
- };
317
- };
318
- const scopeConflictTooltip = () => {
319
- const c = scopeConflicts();
320
- return `Info: ${c.length} binding${c.length > 1 ? "s" : ""} with same key on different target${c.length > 1 ? "s" : ""}`;
321
- };
274
+ const targetConflictBadge = () => ({
275
+ style: "badgeConflict",
276
+ label: "!",
277
+ tooltip: `Potential overlap: ${targetConflicts().length} other bindings on overlapping targets`
278
+ });
279
+ const scopeConflictTooltip = () => `Info: ${scopeConflicts().length} related bindings on separate targets`;
322
280
  const enabled = () => reg.options.enabled !== false;
323
281
  const triggerCount = () => registrations().find((r) => r.id === reg.id)?.triggerCount ?? reg.triggerCount;
324
282
  const [prevCount, setPrevCount] = createSignal(reg.triggerCount);
@@ -333,98 +291,100 @@ function HotkeyList(props) {
333
291
  const metaName = () => reg.options.meta?.name;
334
292
  const rowTooltip = () => buildRowTooltip(reg.options.meta);
335
293
  return (() => {
336
- var _el$36 = _tmpl$4(), _el$38 = _el$36.firstChild, _el$39 = _el$38.firstChild, _el$43 = _el$38.nextSibling, _el$44 = _el$43.firstChild, _el$45 = _el$44.firstChild, _el$46 = _el$44.nextSibling, _el$47 = _el$46.firstChild, _el$50 = _el$47.firstChild.nextSibling;
337
- _el$50.nextSibling;
338
- var _el$51 = _el$46.nextSibling, _el$52 = _el$51.firstChild;
339
- _el$36.$$click = () => props.setSelectedId(reg.id);
340
- insert(_el$36, createComponent(Show, {
294
+ var _el$37 = _tmpl$4(), _el$39 = _el$37.firstChild, _el$40 = _el$39.firstChild, _el$44 = _el$39.nextSibling, _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling, _el$47 = _el$46.firstChild, _el$48 = _el$46.nextSibling, _el$49 = _el$48.firstChild, _el$52 = _el$49.firstChild.nextSibling;
295
+ _el$52.nextSibling;
296
+ var _el$53 = _el$48.nextSibling, _el$54 = _el$53.firstChild;
297
+ _el$37.$$click = () => props.setSelectedId(reg.id);
298
+ insert(_el$37, createComponent(Show, {
341
299
  get when() {
342
300
  return rowTooltip();
343
301
  },
344
302
  get children() {
345
- var _el$37 = _tmpl$();
346
- insert(_el$37, rowTooltip);
347
- effect(() => className(_el$37, styles().rowTooltipText));
348
- return _el$37;
303
+ var _el$38 = _tmpl$();
304
+ insert(_el$38, rowTooltip);
305
+ effect(() => className(_el$38, styles().rowTooltipText));
306
+ return _el$38;
349
307
  }
350
- }), _el$38);
351
- insert(_el$39, () => formatForDisplay(reg.hotkey));
352
- insert(_el$38, createComponent(Show, {
308
+ }), _el$39);
309
+ insert(_el$40, () => formatRegistration(reg));
310
+ insert(_el$39, createComponent(Show, {
353
311
  get when() {
354
312
  return metaName();
355
313
  },
356
314
  get children() {
357
- var _el$40 = _tmpl$2();
358
- insert(_el$40, metaName);
359
- effect(() => className(_el$40, styles().hotkeyLabelName));
360
- return _el$40;
315
+ var _el$41 = _tmpl$2();
316
+ insert(_el$41, metaName);
317
+ effect(() => className(_el$41, styles().hotkeyLabelName));
318
+ return _el$41;
361
319
  }
362
320
  }), null);
363
- insert(_el$36, createComponent(Show, {
321
+ insert(_el$37, createComponent(Show, {
364
322
  get when() {
365
323
  return triggerCount() > 0;
366
324
  },
367
325
  get children() {
368
- var _el$41 = _tmpl$3();
369
- _el$41.firstChild;
370
- insert(_el$41, triggerCount, null);
371
- effect(() => className(_el$41, styles().triggerCount));
372
- return _el$41;
326
+ var _el$42 = _tmpl$3();
327
+ _el$42.firstChild;
328
+ insert(_el$42, triggerCount, null);
329
+ effect(() => className(_el$42, styles().triggerCount));
330
+ return _el$42;
373
331
  }
374
- }), _el$43);
375
- insert(_el$43, (() => {
332
+ }), _el$44);
333
+ insert(_el$45, () => getBindingKind(reg));
334
+ insert(_el$44, (() => {
376
335
  var _c$3 = memo(() => !!hasTargetConflict());
377
336
  return () => _c$3() && (() => {
378
- var _el$53 = _tmpl$6(), _el$54 = _el$53.firstChild;
379
- insert(_el$53, () => targetConflictBadge().label, _el$54);
380
- insert(_el$54, () => targetConflictBadge().tooltip);
337
+ var _el$55 = _tmpl$6(), _el$56 = _el$55.firstChild;
338
+ insert(_el$55, () => targetConflictBadge().label, _el$56);
339
+ insert(_el$56, () => targetConflictBadge().tooltip);
381
340
  effect((_p$) => {
382
- var _v$25 = clsx(styles().badge, styles()[targetConflictBadge().style], styles().tooltip), _v$26 = styles().tooltipText;
383
- _v$25 !== _p$.e && className(_el$53, _p$.e = _v$25);
384
- _v$26 !== _p$.t && className(_el$54, _p$.t = _v$26);
341
+ var _v$27 = clsx(styles().badge, styles()[targetConflictBadge().style], styles().tooltip), _v$28 = styles().tooltipText;
342
+ _v$27 !== _p$.e && className(_el$55, _p$.e = _v$27);
343
+ _v$28 !== _p$.t && className(_el$56, _p$.t = _v$28);
385
344
  return _p$;
386
345
  }, {
387
346
  e: void 0,
388
347
  t: void 0
389
348
  });
390
- return _el$53;
349
+ return _el$55;
391
350
  })();
392
- })(), _el$44);
393
- insert(_el$43, (() => {
351
+ })(), _el$46);
352
+ insert(_el$44, (() => {
394
353
  var _c$4 = memo(() => !!hasScopeConflict());
395
354
  return () => _c$4() && (() => {
396
- var _el$55 = _tmpl$7(), _el$57 = _el$55.firstChild.nextSibling;
397
- insert(_el$57, scopeConflictTooltip);
355
+ var _el$57 = _tmpl$7(), _el$59 = _el$57.firstChild.nextSibling;
356
+ insert(_el$59, scopeConflictTooltip);
398
357
  effect((_p$) => {
399
- var _v$27 = clsx(styles().badge, styles().badgeInfo, styles().tooltip), _v$28 = styles().tooltipText;
400
- _v$27 !== _p$.e && className(_el$55, _p$.e = _v$27);
401
- _v$28 !== _p$.t && className(_el$57, _p$.t = _v$28);
358
+ var _v$29 = clsx(styles().badge, styles().badgeInfo, styles().tooltip), _v$30 = styles().tooltipText;
359
+ _v$29 !== _p$.e && className(_el$57, _p$.e = _v$29);
360
+ _v$30 !== _p$.t && className(_el$59, _p$.t = _v$30);
402
361
  return _p$;
403
362
  }, {
404
363
  e: void 0,
405
364
  t: void 0
406
365
  });
407
- return _el$55;
366
+ return _el$57;
408
367
  })();
409
- })(), _el$44);
410
- insert(_el$44, () => enabled() ? "on" : "off", _el$45);
411
- insert(_el$45, () => enabled() ? "Hotkey is enabled" : "Hotkey is disabled");
412
- insert(_el$46, () => reg.options.eventType ?? "keydown", _el$47);
413
- insert(_el$47, () => reg.options.eventType ?? "keydown", _el$50);
414
- insert(_el$51, () => getTargetLabel(reg.target), _el$52);
415
- insert(_el$52, () => getTargetTooltip(reg.target));
368
+ })(), _el$46);
369
+ insert(_el$46, () => enabled() ? "on" : "off", _el$47);
370
+ insert(_el$47, () => enabled() ? "Hotkey is enabled" : "Hotkey is disabled");
371
+ insert(_el$48, () => reg.options.eventType ?? "keydown", _el$49);
372
+ insert(_el$49, () => reg.options.eventType ?? "keydown", _el$52);
373
+ insert(_el$53, () => getTargetLabel(reg.target), _el$54);
374
+ insert(_el$54, () => getTargetTooltip(reg.target));
416
375
  effect((_p$) => {
417
- var _v$15 = clsx(styles().hotkeyRow, props.selectedId() === reg.id && styles().hotkeyRowSelected, pulsing() && styles().hotkeyRowTriggered, rowTooltip() && styles().tooltip), _v$16 = styles().hotkeyLabel, _v$17 = styles().hotkeyLabelKeys, _v$18 = styles().hotkeyBadges, _v$19 = clsx(styles().badge, enabled() ? styles().badgeEnabled : styles().badgeDisabled, styles().tooltip), _v$20 = styles().tooltipText, _v$21 = clsx(styles().badge, (reg.options.eventType ?? "keydown") === "keydown" ? styles().badgeKeydown : styles().badgeKeyup, styles().tooltip), _v$22 = styles().tooltipText, _v$23 = clsx(styles().badge, styles().badgeTarget, styles().tooltip), _v$24 = styles().tooltipText;
418
- _v$15 !== _p$.e && className(_el$36, _p$.e = _v$15);
419
- _v$16 !== _p$.t && className(_el$38, _p$.t = _v$16);
420
- _v$17 !== _p$.a && className(_el$39, _p$.a = _v$17);
421
- _v$18 !== _p$.o && className(_el$43, _p$.o = _v$18);
422
- _v$19 !== _p$.i && className(_el$44, _p$.i = _v$19);
423
- _v$20 !== _p$.n && className(_el$45, _p$.n = _v$20);
424
- _v$21 !== _p$.s && className(_el$46, _p$.s = _v$21);
425
- _v$22 !== _p$.h && className(_el$47, _p$.h = _v$22);
426
- _v$23 !== _p$.r && className(_el$51, _p$.r = _v$23);
427
- _v$24 !== _p$.d && className(_el$52, _p$.d = _v$24);
376
+ var _v$16 = clsx(styles().hotkeyRow, props.selectedId() === reg.id && styles().hotkeyRowSelected, pulsing() && styles().hotkeyRowTriggered, rowTooltip() && styles().tooltip), _v$17 = styles().hotkeyLabel, _v$18 = styles().hotkeyLabelKeys, _v$19 = styles().hotkeyBadges, _v$20 = clsx(styles().badge, styles().badgeTarget), _v$21 = clsx(styles().badge, enabled() ? styles().badgeEnabled : styles().badgeDisabled, styles().tooltip), _v$22 = styles().tooltipText, _v$23 = clsx(styles().badge, (reg.options.eventType ?? "keydown") === "keydown" ? styles().badgeKeydown : styles().badgeKeyup, styles().tooltip), _v$24 = styles().tooltipText, _v$25 = clsx(styles().badge, styles().badgeTarget, styles().tooltip), _v$26 = styles().tooltipText;
377
+ _v$16 !== _p$.e && className(_el$37, _p$.e = _v$16);
378
+ _v$17 !== _p$.t && className(_el$39, _p$.t = _v$17);
379
+ _v$18 !== _p$.a && className(_el$40, _p$.a = _v$18);
380
+ _v$19 !== _p$.o && className(_el$44, _p$.o = _v$19);
381
+ _v$20 !== _p$.i && className(_el$45, _p$.i = _v$20);
382
+ _v$21 !== _p$.n && className(_el$46, _p$.n = _v$21);
383
+ _v$22 !== _p$.s && className(_el$47, _p$.s = _v$22);
384
+ _v$23 !== _p$.h && className(_el$48, _p$.h = _v$23);
385
+ _v$24 !== _p$.r && className(_el$49, _p$.r = _v$24);
386
+ _v$25 !== _p$.d && className(_el$53, _p$.d = _v$25);
387
+ _v$26 !== _p$.l && className(_el$54, _p$.l = _v$26);
428
388
  return _p$;
429
389
  }, {
430
390
  e: void 0,
@@ -436,25 +396,26 @@ function HotkeyList(props) {
436
396
  s: void 0,
437
397
  h: void 0,
438
398
  r: void 0,
439
- d: void 0
399
+ d: void 0,
400
+ l: void 0
440
401
  });
441
- return _el$36;
402
+ return _el$37;
442
403
  })();
443
404
  }
444
405
  }));
445
- effect(() => className(_el$30, styles().hotkeyList));
446
- return _el$30;
406
+ effect(() => className(_el$31, styles().hotkeyList));
407
+ return _el$31;
447
408
  })(),
448
409
  (() => {
449
- var _el$31 = _tmpl$10(), _el$34 = _el$31.firstChild.nextSibling;
450
- _el$34.nextSibling;
451
- insert(_el$31, () => filteredSequenceRegistrations().length, _el$34);
452
- effect(() => className(_el$31, styles().panelHeader));
453
- return _el$31;
410
+ var _el$32 = _tmpl$10(), _el$35 = _el$32.firstChild.nextSibling;
411
+ _el$35.nextSibling;
412
+ insert(_el$32, () => filteredSequenceRegistrations().length, _el$35);
413
+ effect(() => className(_el$32, styles().panelHeader));
414
+ return _el$32;
454
415
  })(),
455
416
  (() => {
456
- var _el$35 = _tmpl$1();
457
- insert(_el$35, createComponent(For, {
417
+ var _el$36 = _tmpl$1();
418
+ insert(_el$36, createComponent(For, {
458
419
  get each() {
459
420
  return filteredSequenceRegistrations();
460
421
  },
@@ -472,8 +433,8 @@ function HotkeyList(props) {
472
433
  }
473
434
  })
474
435
  }));
475
- effect(() => className(_el$35, styles().hotkeyList));
476
- return _el$35;
436
+ effect(() => className(_el$36, styles().hotkeyList));
437
+ return _el$36;
477
438
  })()
478
439
  ];
479
440
  }