orgnote-api 0.2.0 → 0.2.2
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/README.org +6 -1
- package/api.ts +2 -0
- package/package.json +1 -1
package/README.org
CHANGED
|
@@ -30,6 +30,8 @@ You can find all available methods here. They are currently undocumented.
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
* Connected links
|
|
33
|
+
- [[https://github.com/Artawower/orgnote-client/tree/master/src/components/extensions][Built-in extensions]]
|
|
34
|
+
- [[https://github.com/Artawower/orgnote-api/blob/master/src/api.ts#L24][Type definition for existing extension API]]
|
|
33
35
|
- [[https://github.com/artawower/orgnote][OrgNote entrypoint]]
|
|
34
36
|
- [[https://org-note.com/][Official website]]
|
|
35
37
|
- [[https://github.com/Artawower/orgnote-client][Org Note client]]
|
|
@@ -51,6 +53,8 @@ interface Extension {
|
|
|
51
53
|
}
|
|
52
54
|
#+END_SRC
|
|
53
55
|
|
|
56
|
+
You can find available methods of =OrgNoteApi= [[https://github.com/Artawower/orgnote-api/blob/master/src/api.ts#L24][here]]
|
|
57
|
+
|
|
54
58
|
** Extension manifest
|
|
55
59
|
Also, each extension should export manifest const:
|
|
56
60
|
#+BEGIN_SRC typescript
|
|
@@ -65,7 +69,7 @@ interface ExtensionManifest {
|
|
|
65
69
|
description?: string;
|
|
66
70
|
keywords?: string[];
|
|
67
71
|
// Repository url
|
|
68
|
-
sourceType: 'git' | 'file';
|
|
72
|
+
sourceType: 'git' | 'file' | 'builtin';
|
|
69
73
|
/* Default value is README.org */
|
|
70
74
|
readmeFilePath?: string;
|
|
71
75
|
/* WIP */
|
|
@@ -77,6 +81,7 @@ interface ExtensionManifest {
|
|
|
77
81
|
icon?: string;
|
|
78
82
|
}
|
|
79
83
|
#+END_SRC
|
|
84
|
+
** Extension API
|
|
80
85
|
* Publish to official repository
|
|
81
86
|
OrgNote has an official [[https://github.com/Artawower/orgnote-extensions][repository]] for user-based extensions. You can easily add new =recipes/<package>.json=
|
|
82
87
|
with =ExtensionManifest=
|
package/api.ts
CHANGED
|
@@ -66,6 +66,8 @@ export interface OrgNoteApi {
|
|
|
66
66
|
commands: {
|
|
67
67
|
add(...commands: Command[]): void;
|
|
68
68
|
remove(...commands: Command[]): void;
|
|
69
|
+
get(name: string): Command;
|
|
70
|
+
getAll(): Command[];
|
|
69
71
|
addCommandToSidebar(...commands: Command[]): void;
|
|
70
72
|
removeCommandFromSidebar(...commands: Command[]): void;
|
|
71
73
|
addCommandToEditorPanel(...commands: Command[]): void;
|