orgnote-api 0.41.25 → 0.41.27

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.
@@ -177,6 +177,13 @@ export declare enum i18n {
177
177
  PICK_NOTE_TO_LINK = "pick note to link",
178
178
  UNTITLED = "untitled",
179
179
  NO_SELECTED_NOTE = "no selected note",
180
+ NOTE_INFO_TAGS = "note info tags",
181
+ NOTE_INFO_LINKS = "note info links",
182
+ NOTE_INFO_BACKLINKS = "note info backlinks",
183
+ NOTE_INFO_CREATED = "note info created",
184
+ NOTE_INFO_UPDATED = "note info updated",
185
+ NOTE_INFO_LAST_OPENED = "note info last opened",
186
+ NOTE_INFO_LAST_SYNC = "note info last sync",
180
187
  GPG_EMAIL_REQUIRED = "gpg email required",
181
188
  GPG_EMAIL_INVALID = "gpg email invalid"
182
189
  }
@@ -264,6 +271,7 @@ export declare const I18N: {
264
271
  SHOW_MOBILE_FILE_SEARCH: DefaultCommands.SHOW_MOBILE_FILE_SEARCH;
265
272
  HIDE_MOBILE_FILE_SEARCH: DefaultCommands.HIDE_MOBILE_FILE_SEARCH;
266
273
  OPEN_NOTE: DefaultCommands.OPEN_NOTE;
274
+ SHOW_FILE_INFO: DefaultCommands.SHOW_FILE_INFO;
267
275
  TABS: DefaultCommands.TABS;
268
276
  SHOW_TAB_SWITCHER: DefaultCommands.SHOW_TAB_SWITCHER;
269
277
  CLOSE_TAB: DefaultCommands.CLOSE_TAB;
@@ -479,6 +487,13 @@ export declare const I18N: {
479
487
  PICK_NOTE_TO_LINK: i18n.PICK_NOTE_TO_LINK;
480
488
  UNTITLED: i18n.UNTITLED;
481
489
  NO_SELECTED_NOTE: i18n.NO_SELECTED_NOTE;
490
+ NOTE_INFO_TAGS: i18n.NOTE_INFO_TAGS;
491
+ NOTE_INFO_LINKS: i18n.NOTE_INFO_LINKS;
492
+ NOTE_INFO_BACKLINKS: i18n.NOTE_INFO_BACKLINKS;
493
+ NOTE_INFO_CREATED: i18n.NOTE_INFO_CREATED;
494
+ NOTE_INFO_UPDATED: i18n.NOTE_INFO_UPDATED;
495
+ NOTE_INFO_LAST_OPENED: i18n.NOTE_INFO_LAST_OPENED;
496
+ NOTE_INFO_LAST_SYNC: i18n.NOTE_INFO_LAST_SYNC;
482
497
  GPG_EMAIL_REQUIRED: i18n.GPG_EMAIL_REQUIRED;
483
498
  GPG_EMAIL_INVALID: i18n.GPG_EMAIL_INVALID;
484
499
  };
@@ -187,6 +187,13 @@ export var i18n;
187
187
  i18n["PICK_NOTE_TO_LINK"] = "pick note to link";
188
188
  i18n["UNTITLED"] = "untitled";
189
189
  i18n["NO_SELECTED_NOTE"] = "no selected note";
190
+ i18n["NOTE_INFO_TAGS"] = "note info tags";
191
+ i18n["NOTE_INFO_LINKS"] = "note info links";
192
+ i18n["NOTE_INFO_BACKLINKS"] = "note info backlinks";
193
+ i18n["NOTE_INFO_CREATED"] = "note info created";
194
+ i18n["NOTE_INFO_UPDATED"] = "note info updated";
195
+ i18n["NOTE_INFO_LAST_OPENED"] = "note info last opened";
196
+ i18n["NOTE_INFO_LAST_SYNC"] = "note info last sync";
190
197
  // GPG
191
198
  i18n["GPG_EMAIL_REQUIRED"] = "gpg email required";
192
199
  i18n["GPG_EMAIL_INVALID"] = "gpg email invalid";
@@ -14,6 +14,23 @@ export interface CompletionSearchResult<T = unknown> {
14
14
  result: CompletionCandidate<T>[];
15
15
  }
16
16
  export type CandidateGetterFn<T = unknown> = (filter: string, limit?: number, offset?: number) => CompletionSearchResult<T> | Promise<CompletionSearchResult<T>>;
17
+ interface BaseCompletionConfig<T = unknown> {
18
+ name?: string;
19
+ searchAutocompletions?: string[];
20
+ placeholder?: string;
21
+ itemHeight?: number;
22
+ itemRenderer?: CompletionItemRenderer<T>;
23
+ searchText?: string;
24
+ onClicked?: (candidate: CompletionCandidate<T>) => void;
25
+ }
26
+ interface InputCompletionConfig<T = unknown> extends BaseCompletionConfig<T> {
27
+ type: 'input';
28
+ itemsGetter?: CandidateGetterFn<T>;
29
+ }
30
+ interface SearchCompletionConfig<T = unknown> extends BaseCompletionConfig<T> {
31
+ type?: 'choice' | 'input-choice';
32
+ itemsGetter: CandidateGetterFn<T>;
33
+ }
17
34
  export interface CompletionItemRendererProps<T = unknown> {
18
35
  candidate: CompletionCandidate<T>;
19
36
  index: number;
@@ -26,25 +43,15 @@ export type CompletionItemRenderer<T = unknown> = VueComponent & {
26
43
  $props: CompletionItemRendererProps<T>;
27
44
  };
28
45
  };
29
- export interface CompletionConfig<T = unknown> {
30
- name?: string;
31
- searchAutocompletions?: string[];
32
- itemsGetter: CandidateGetterFn<T>;
33
- type?: 'input' | 'choice' | 'input-choice';
34
- placeholder?: string;
35
- itemHeight?: number;
36
- itemRenderer?: CompletionItemRenderer<T>;
37
- searchText?: string;
38
- onClicked?: (candidate: CompletionCandidate<T>) => void;
39
- }
40
- export interface Completion<T = any, TResult = any> extends CompletionConfig<T> {
46
+ export type CompletionConfig<T = unknown> = InputCompletionConfig<T> | SearchCompletionConfig<T>;
47
+ export type Completion<T = any, TResult = any> = CompletionConfig<T> & {
41
48
  level?: number;
42
49
  candidates?: CompletionCandidate<T>[];
43
50
  selectedCandidateIndex?: number;
44
51
  total?: number;
45
52
  searchQuery: string;
46
53
  result: Promise<TResult>;
47
- }
54
+ };
48
55
  export interface CompletionInterceptorContext {
49
56
  completionName: string;
50
57
  searchQuery: string;
@@ -56,3 +63,4 @@ export interface CompletionInterceptor<T = unknown> {
56
63
  priority?: number;
57
64
  handler: (candidates: CompletionCandidate<T>[], context: CompletionInterceptorContext) => CompletionCandidate<T>[] | Promise<CompletionCandidate<T>[]>;
58
65
  }
66
+ export {};
@@ -82,6 +82,7 @@ export declare enum DefaultCommands {
82
82
  SHOW_MOBILE_FILE_SEARCH = "show mobile file search",
83
83
  HIDE_MOBILE_FILE_SEARCH = "hide mobile file search",
84
84
  OPEN_NOTE = "open note",
85
+ SHOW_FILE_INFO = "show file info",
85
86
  TABS = "show tabs",
86
87
  SHOW_TAB_SWITCHER = "show tab switcher",
87
88
  CLOSE_TAB = "close tab",
@@ -98,6 +98,7 @@ export var DefaultCommands;
98
98
  DefaultCommands["HIDE_MOBILE_FILE_SEARCH"] = "hide mobile file search";
99
99
  // Notes commands
100
100
  DefaultCommands["OPEN_NOTE"] = "open note";
101
+ DefaultCommands["SHOW_FILE_INFO"] = "show file info";
101
102
  // Windows & buffers
102
103
  DefaultCommands["TABS"] = "show tabs";
103
104
  DefaultCommands["SHOW_TAB_SWITCHER"] = "show tab switcher";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orgnote-api",
3
- "version": "0.41.25",
3
+ "version": "0.41.27",
4
4
  "description": "Official API for creating extensions for OrgNote app",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -37,9 +37,17 @@
37
37
  "./constants": "./constants/index.js",
38
38
  "./sync": "./sync/index.js"
39
39
  },
40
- "files": ["**"],
40
+ "files": [
41
+ "**"
42
+ ],
41
43
  "types": "./index.d.ts",
42
- "keywords": ["orgnote", "org-mode", "org-roam", "api", "extensions"],
44
+ "keywords": [
45
+ "orgnote",
46
+ "org-mode",
47
+ "org-roam",
48
+ "api",
49
+ "extensions"
50
+ ],
43
51
  "author": "darkawower <app.orgnote@gmail.com> (https://org-note.com)",
44
52
  "license": "GPL-3.0-or-later",
45
53
  "bugs": {