File tree Expand file tree Collapse file tree 4 files changed +196
-196
lines changed
Expand file tree Collapse file tree 4 files changed +196
-196
lines changed Original file line number Diff line number Diff line change 66 "description" : " Command dialog and keyboard shortcuts palette for web apps" ,
77 "version" : " 2.1.1" ,
88 "type" : " module" ,
9- "module" : " dist/cmd-dialog.js" ,
10- "main" : " dist/cmd-dialog.js" ,
9+ "module" : " ./ dist/cmd-dialog.js" ,
10+ "main" : " ./ dist/cmd-dialog.js" ,
1111 "exports" : {
1212 "." : " ./dist/cmd-dialog.js"
1313 },
Original file line number Diff line number Diff line change 11export type Action = {
2- /**
3- * Unique id of the action (optional)
4- */
5- id ?: string ;
6- /**
7- * Title of the action
8- */
9- title : string ;
10- /**
11- * Description of the action (optional)
12- */
13- description ?: string ;
14- /**
15- * Icon of the action (optional)
16- */
17- img ?: string ;
18- /**
19- * Hotkey of the action (optional)
20- * @see https://github.com/jamiebuilds/tinykeys
21- */
22- hotkey ?: string ;
23- /**
24- * URL of the action (optional)
25- */
26- url ?: string ;
27- /**
28- * Target of the action (optional)
29- * default is `_self`
30- */
31- target ?: string ;
32- /**
33- * Handler of the action (optional)
34- */
35- onAction ?: ( event ?: KeyboardEvent | CustomEvent ) => boolean ;
36- /**
37- * Tags of the action (optional)
38- */
39- tags ?: string [ ] ;
2+ /**
3+ * Unique id of the action (optional)
4+ */
5+ id ?: string ;
6+ /**
7+ * Title of the action
8+ */
9+ title : string ;
10+ /**
11+ * Description of the action (optional)
12+ */
13+ description ?: string ;
14+ /**
15+ * Icon of the action (optional)
16+ */
17+ img ?: string ;
18+ /**
19+ * Hotkey of the action (optional)
20+ * @see https://github.com/jamiebuilds/tinykeys
21+ */
22+ hotkey ?: string ;
23+ /**
24+ * URL of the action (optional)
25+ */
26+ url ?: string ;
27+ /**
28+ * Target of the action (optional)
29+ * default is `_self`
30+ */
31+ target ?: string ;
32+ /**
33+ * Handler of the action (optional)
34+ */
35+ onAction ?: ( event ?: KeyboardEvent | CustomEvent ) => boolean ;
36+ /**
37+ * Tags of the action (optional)
38+ */
39+ tags ?: string [ ] ;
4040} ;
Original file line number Diff line number Diff line change 11import { LitElement , type TemplateResult } from "lit" ;
22import type { Action } from "./action.js" ;
33export declare class CmdAction extends LitElement {
4- /**
5- * The styles
6- */
7- static styles : import ( "lit" ) . CSSResult ;
8- /**
9- * The mode of the dialog (dark/light).
10- */
11- theme : string ;
12- /**
13- * Action object
14- */
15- action : Action ;
16- /**
17- * Is the action selected
18- */
19- selected : boolean ;
20- constructor ( ) ;
21- /**
22- * Get hotkeys
23- * @private
24- */
25- private get hotkeys ( ) ;
26- /**
27- * Get description
28- * @private
29- */
30- private get description ( ) ;
31- /**
32- * Get icon
33- * @private
34- */
35- private get img ( ) ;
36- /**
37- * Scroll to show element
38- */
39- ensureInView ( ) : void ;
40- /**
41- * Click event
42- */
43- click ( ) : void ;
44- /**
45- * Updated
46- * @param changedProperties
47- */
48- updated ( changedProperties : Map < string , unknown > ) : void ;
49- render ( ) : TemplateResult < 1 > ;
4+ /**
5+ * The styles
6+ */
7+ static styles : import ( "lit" ) . CSSResult ;
8+ /**
9+ * The mode of the dialog (dark/light).
10+ */
11+ theme : string ;
12+ /**
13+ * Action object
14+ */
15+ action : Action ;
16+ /**
17+ * Is the action selected
18+ */
19+ selected : boolean ;
20+ constructor ( ) ;
21+ /**
22+ * Get hotkeys
23+ * @private
24+ */
25+ private get hotkeys ( ) ;
26+ /**
27+ * Get description
28+ * @private
29+ */
30+ private get description ( ) ;
31+ /**
32+ * Get icon
33+ * @private
34+ */
35+ private get img ( ) ;
36+ /**
37+ * Scroll to show element
38+ */
39+ ensureInView ( ) : void ;
40+ /**
41+ * Click event
42+ */
43+ click ( ) : void ;
44+ /**
45+ * Updated
46+ * @param changedProperties
47+ */
48+ updated ( changedProperties : Map < string , unknown > ) : void ;
49+ render ( ) : TemplateResult < 1 > ;
5050}
5151declare global {
52- interface HTMLElementTagNameMap {
53- "cmd-action" : CmdAction ;
54- }
52+ interface HTMLElementTagNameMap {
53+ "cmd-action" : CmdAction ;
54+ }
5555}
You can’t perform that action at this time.
0 commit comments