orgnote-api 0.3.0 → 0.4.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/models/command.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { DefaultCommands } from './default-commands';
2
+
1
3
  export const DEFAULT_KEYBINDING_GROUP = 'default';
2
4
 
3
5
  export type CommandGroup =
@@ -16,7 +18,7 @@ export interface CommandHandlerParams<T = any> {
16
18
 
17
19
  export interface CommandPreview {
18
20
  description?: string;
19
- command?: string;
21
+ command?: DefaultCommands | string;
20
22
  title?: string | (() => string);
21
23
  icon?: string | (() => string);
22
24
  }
@@ -0,0 +1,31 @@
1
+ /*
2
+ * This are default commands. It's not a complete list
3
+ * Some of the commands are dynamically generated or
4
+ * can be added by user extensions.
5
+ */
6
+ export enum DefaultCommands {
7
+ // Global commands
8
+ REPORT_BUG = 'report bug',
9
+ OPEN_DEBUG_INFO = 'open debug info',
10
+ SHOW_LOGS = 'show logs',
11
+ TOGGLE_SIDEBAR = 'toggle sidebar',
12
+ TOGGLE_FILE_MANAGER = 'toggle file manager',
13
+ CREATE_NOTE = 'create note',
14
+ PROJECT_INFO = 'project info',
15
+
16
+ // Completion commands
17
+ SEARCH = 'search',
18
+ TOGGLE_COMMANDS = 'toggle commands',
19
+ RESTORE_COMPLETION = 'restore last completion',
20
+ EXIT_COMMAND_EXECUTOR = 'exit command executor',
21
+ NEXT_CANDIDATE = 'next candidate',
22
+ PREV_CANDIDATE = 'previous candidate',
23
+ EXECUTE_CANDIDATE = 'execute candidate',
24
+
25
+ // Settings
26
+ SETTINGS = 'settings',
27
+ RESET_THEME = 'reset theme',
28
+ TOGGLE_DARK_MODE = 'toggle dark mode',
29
+ TOGGLE_DEBUG_MODE = 'toggle debug mode',
30
+ SELECT_THEME = 'select theme',
31
+ }
package/models/index.ts CHANGED
@@ -7,3 +7,4 @@ export * from './widget';
7
7
  export * from './modal';
8
8
  export * from './widget-type';
9
9
  export * from './editor';
10
+ export * from './default-commands';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orgnote-api",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Official API for creating extensions for OrgNote app",
5
5
  "type": "module",
6
6
  "main": "./index.ts",