@hanzo/app 0.3.11 → 0.3.12
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/chord.d.ts +2 -0
- package/dist/seek.d.ts +4 -1
- package/dist/seek.js +5 -2
- package/package.json +1 -1
package/dist/chord.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export interface Press {
|
|
|
9
9
|
shiftKey: boolean;
|
|
10
10
|
repeat?: boolean;
|
|
11
11
|
isComposing?: boolean;
|
|
12
|
+
/** Something on the page already answered the press. */
|
|
13
|
+
defaultPrevented?: boolean;
|
|
12
14
|
target: EventTarget | null;
|
|
13
15
|
}
|
|
14
16
|
/** Whether a key pressed on `target` is typing: a field, a picker, or text that edits itself. */
|
package/dist/seek.d.ts
CHANGED
|
@@ -35,5 +35,8 @@ export declare function rank<T extends Hit>(rows: T[], query: string, cap?: numb
|
|
|
35
35
|
* first, ties in the order given.
|
|
36
36
|
*/
|
|
37
37
|
export declare function find<T extends Hit>(query: string, recent: T[], idle: Group<T>[], all: Group<T>[]): Group<T>[];
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Whether a key press opens the palette: ⌘K or Ctrl+K, once a press, from anywhere, a field included,
|
|
40
|
+
* unless something on the page already answered it (Dev's composer opens its own commands and claims it).
|
|
41
|
+
*/
|
|
39
42
|
export declare const summons: (e: Press) => boolean;
|
package/dist/seek.js
CHANGED
|
@@ -76,5 +76,8 @@ export function find(query, recent, idle, all) {
|
|
|
76
76
|
.sort((a, b) => b.best - a.best || a.i - b.i)
|
|
77
77
|
.map((x) => x.g);
|
|
78
78
|
}
|
|
79
|
-
/**
|
|
80
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Whether a key press opens the palette: ⌘K or Ctrl+K, once a press, from anywhere, a field included,
|
|
81
|
+
* unless something on the page already answered it (Dev's composer opens its own commands and claims it).
|
|
82
|
+
*/
|
|
83
|
+
export const summons = (e) => !e.defaultPrevented && (e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && !e.repeat && !e.isComposing && (e.key ?? '').toLowerCase() === 'k';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"description": "Hanzo's app: the shell and its apps (Home, Chat, Inbox, Contacts, Meet, Calendar, Drive, Board, Work, Bots), once, for every Hanzo surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|