orgnote-api 0.17.2 → 0.17.3
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.md +158 -0
- package/package.json +8 -9
- package/LICENSE +0 -674
- package/README.org +0 -97
- /package/{dist/api.d.ts → api.d.ts} +0 -0
- /package/{dist/api.js → api.js} +0 -0
- /package/{dist/encryption → encryption}/__tests__/encryption-keys.d.ts +0 -0
- /package/{dist/encryption → encryption}/__tests__/encryption-keys.js +0 -0
- /package/{dist/encryption → encryption}/__tests__/encryption.spec.d.ts +0 -0
- /package/{dist/encryption → encryption}/__tests__/encryption.spec.js +0 -0
- /package/{dist/encryption → encryption}/__tests__/note-encryption.spec.d.ts +0 -0
- /package/{dist/encryption → encryption}/__tests__/note-encryption.spec.js +0 -0
- /package/{dist/encryption → encryption}/encryption.d.ts +0 -0
- /package/{dist/encryption → encryption}/encryption.js +0 -0
- /package/{dist/encryption → encryption}/index.d.ts +0 -0
- /package/{dist/encryption → encryption}/index.js +0 -0
- /package/{dist/encryption → encryption}/note-encryption.d.ts +0 -0
- /package/{dist/encryption → encryption}/note-encryption.js +0 -0
- /package/{dist/files-api.d.ts → files-api.d.ts} +0 -0
- /package/{dist/files-api.js → files-api.js} +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/index.js → index.js} +0 -0
- /package/{dist/models → models}/command.d.ts +0 -0
- /package/{dist/models → models}/command.js +0 -0
- /package/{dist/models → models}/completion.d.ts +0 -0
- /package/{dist/models → models}/completion.js +0 -0
- /package/{dist/models → models}/default-commands.d.ts +0 -0
- /package/{dist/models → models}/default-commands.js +0 -0
- /package/{dist/models → models}/editor.d.ts +0 -0
- /package/{dist/models → models}/editor.js +0 -0
- /package/{dist/models → models}/encryption.d.ts +0 -0
- /package/{dist/models → models}/encryption.js +0 -0
- /package/{dist/models → models}/extension.d.ts +0 -0
- /package/{dist/models → models}/extension.js +0 -0
- /package/{dist/models → models}/file-system.d.ts +0 -0
- /package/{dist/models → models}/file-system.js +0 -0
- /package/{dist/models → models}/index.d.ts +0 -0
- /package/{dist/models → models}/index.js +0 -0
- /package/{dist/models → models}/modal.d.ts +0 -0
- /package/{dist/models → models}/modal.js +0 -0
- /package/{dist/models → models}/note.d.ts +0 -0
- /package/{dist/models → models}/note.js +0 -0
- /package/{dist/models → models}/sync.d.ts +0 -0
- /package/{dist/models → models}/sync.js +0 -0
- /package/{dist/models → models}/theme-variables.d.ts +0 -0
- /package/{dist/models → models}/theme-variables.js +0 -0
- /package/{dist/models → models}/vue-component.d.ts +0 -0
- /package/{dist/models → models}/vue-component.js +0 -0
- /package/{dist/models → models}/widget-type.d.ts +0 -0
- /package/{dist/models → models}/widget-type.js +0 -0
- /package/{dist/models → models}/widget.d.ts +0 -0
- /package/{dist/models → models}/widget.js +0 -0
- /package/{dist/remote-api → remote-api}/api.d.ts +0 -0
- /package/{dist/remote-api → remote-api}/api.js +0 -0
- /package/{dist/remote-api → remote-api}/base.d.ts +0 -0
- /package/{dist/remote-api → remote-api}/base.js +0 -0
- /package/{dist/remote-api → remote-api}/common.d.ts +0 -0
- /package/{dist/remote-api → remote-api}/common.js +0 -0
- /package/{dist/remote-api → remote-api}/configuration.d.ts +0 -0
- /package/{dist/remote-api → remote-api}/configuration.js +0 -0
- /package/{dist/remote-api → remote-api}/index.d.ts +0 -0
- /package/{dist/remote-api → remote-api}/index.js +0 -0
- /package/{dist/tools → tools}/__tests__/find-files-diff.spec.d.ts +0 -0
- /package/{dist/tools → tools}/__tests__/find-files-diff.spec.js +0 -0
- /package/{dist/tools → tools}/__tests__/find-note-files-diff.spec.d.ts +0 -0
- /package/{dist/tools → tools}/__tests__/find-note-files-diff.spec.js +0 -0
- /package/{dist/tools → tools}/__tests__/get-file-name.spec.d.ts +0 -0
- /package/{dist/tools → tools}/__tests__/get-file-name.spec.js +0 -0
- /package/{dist/tools → tools}/__tests__/get-string-path.spec.d.ts +0 -0
- /package/{dist/tools → tools}/__tests__/get-string-path.spec.js +0 -0
- /package/{dist/tools → tools}/__tests__/is-gpg-encrypted.spec.d.ts +0 -0
- /package/{dist/tools → tools}/__tests__/is-gpg-encrypted.spec.js +0 -0
- /package/{dist/tools → tools}/__tests__/is-org-file.spec.d.ts +0 -0
- /package/{dist/tools → tools}/__tests__/is-org-file.spec.js +0 -0
- /package/{dist/tools → tools}/__tests__/join.spec.d.ts +0 -0
- /package/{dist/tools → tools}/__tests__/join.spec.js +0 -0
- /package/{dist/tools → tools}/__tests__/read-org-files-recursively.spec.d.ts +0 -0
- /package/{dist/tools → tools}/__tests__/read-org-files-recursively.spec.js +0 -0
- /package/{dist/tools → tools}/extend-notes-files-diff.d.ts +0 -0
- /package/{dist/tools → tools}/extend-notes-files-diff.js +0 -0
- /package/{dist/tools → tools}/find-notes-files-diff.d.ts +0 -0
- /package/{dist/tools → tools}/find-notes-files-diff.js +0 -0
- /package/{dist/tools → tools}/get-file-name.d.ts +0 -0
- /package/{dist/tools → tools}/get-file-name.js +0 -0
- /package/{dist/tools → tools}/get-string-path.d.ts +0 -0
- /package/{dist/tools → tools}/get-string-path.js +0 -0
- /package/{dist/tools → tools}/index.d.ts +0 -0
- /package/{dist/tools → tools}/index.js +0 -0
- /package/{dist/tools → tools}/is-gpg-encrypted.d.ts +0 -0
- /package/{dist/tools → tools}/is-gpg-encrypted.js +0 -0
- /package/{dist/tools → tools}/is-org-file.d.ts +0 -0
- /package/{dist/tools → tools}/is-org-file.js +0 -0
- /package/{dist/tools → tools}/join.d.ts +0 -0
- /package/{dist/tools → tools}/join.js +0 -0
- /package/{dist/tools → tools}/mock-server.d.ts +0 -0
- /package/{dist/tools → tools}/mock-server.js +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
|
|
2
|
+
# Table of Contents
|
|
3
|
+
|
|
4
|
+
1. [Introduction](#orged65399)
|
|
5
|
+
2. [Connected links](#orgc368352)
|
|
6
|
+
3. [Extension structure](#org1370386)
|
|
7
|
+
1. [Folder structure](#org6a7f73b)
|
|
8
|
+
2. [Extension entrypoint](#orge2d0f79)
|
|
9
|
+
3. [Extension manifest](#org1e76d43)
|
|
10
|
+
4. [Extension API](#orgbb09389)
|
|
11
|
+
4. [Publish to official repository](#orgdd94657)
|
|
12
|
+
5. [Extensions example](#orgf459c20)
|
|
13
|
+
6. [Contribute guide](#org383a272)
|
|
14
|
+
|
|
15
|
+
<div align='center'>
|
|
16
|
+
|
|
17
|
+
<img src='./images/image.png' width='256px' height='256px'>
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<div align='center'>
|
|
24
|
+
|
|
25
|
+
<span class='badge-buymeacoffee'>
|
|
26
|
+
|
|
27
|
+
<a href='https://www.paypal.me/darkawower' title='Paypal' target='_blank'><img src='https://img.shields.io/badge/paypal-donate-blue.svg' alt='Buy Me A Coffee donate button' /></a>
|
|
28
|
+
|
|
29
|
+
</span>
|
|
30
|
+
|
|
31
|
+
<span class='badge-patreon'>
|
|
32
|
+
|
|
33
|
+
<a href='https://patreon.com/artawower' target='_blank' title='Donate to this project using Patreon'><img src='https://img.shields.io/badge/patreon-donate-orange.svg' alt='Patreon donate button' /></a>
|
|
34
|
+
|
|
35
|
+
</span>
|
|
36
|
+
|
|
37
|
+
<a href='https://wakatime.com/badge/github/Artawower/orgnote-api'><img src='https://wakatime.com/badge/github/Artawower/orgnote-api.svg' alt='wakatime'></a>
|
|
38
|
+
|
|
39
|
+
<a href='https://github.com/artawower/orgnote-api/actions/workflows/melpazoid.yml/badge.svg'><img src='https://github.com/artawower/orgnote-api/actions/workflows/melpazoid.yml/badge.svg' alt='ci' /></a>
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
<a id="orged65399"></a>
|
|
45
|
+
|
|
46
|
+
# Introduction
|
|
47
|
+
|
|
48
|
+
This is API for [OrgNote](https://github.com/artawower/orgnote) extensions.
|
|
49
|
+
|
|
50
|
+
**Warning** This API is not stable yet, so it can be changed in the future.
|
|
51
|
+
|
|
52
|
+
You can find all available methods here. They are currently undocumented.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<a id="orgc368352"></a>
|
|
56
|
+
|
|
57
|
+
# Connected links
|
|
58
|
+
|
|
59
|
+
- [Built-in extensions](https://github.com/Artawower/orgnote-client/tree/master/src/components/extensions)
|
|
60
|
+
- [Type definition for existing extension API](https://github.com/Artawower/orgnote-api/blob/master/src/api.ts#L24)
|
|
61
|
+
- [OrgNote entrypoint](https://github.com/artawower/orgnote)
|
|
62
|
+
- [Official website](https://org-note.com/)
|
|
63
|
+
- [Org Note client](https://github.com/Artawower/orgnote-client)
|
|
64
|
+
- [Repository with collection of extensions](https://github.com/Artawower/orgnote-extensions)
|
|
65
|
+
- [Typescript abstract syntax tree for org mode.](https://github.com/Artawower/org-mode-ast)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
<a id="org1370386"></a>
|
|
69
|
+
|
|
70
|
+
# Extension structure
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<a id="org6a7f73b"></a>
|
|
74
|
+
|
|
75
|
+
## Folder structure
|
|
76
|
+
|
|
77
|
+
**Compiled extension should be placed in the `index.js` file or `/dist/index.js` file in the public GIT repository**
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
<a id="orge2d0f79"></a>
|
|
81
|
+
|
|
82
|
+
## Extension entrypoint
|
|
83
|
+
|
|
84
|
+
Each extension should **export an object by default** with the following structure:
|
|
85
|
+
|
|
86
|
+
interface Extension {
|
|
87
|
+
[key: string]: unknown;
|
|
88
|
+
|
|
89
|
+
onMounted: (api: OrgNoteApi) => Promise<void>;
|
|
90
|
+
onUnmounted?: (api: OrgNoteApi) => Promise<void>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
You can find available methods of `OrgNoteApi` [here](https://github.com/Artawower/orgnote-api/blob/master/src/api.ts#L24)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
<a id="org1e76d43"></a>
|
|
97
|
+
|
|
98
|
+
## Extension manifest
|
|
99
|
+
|
|
100
|
+
Also, each extension should export manifest const:
|
|
101
|
+
|
|
102
|
+
interface ExtensionManifest {
|
|
103
|
+
/* Should be unique in the extension repo */
|
|
104
|
+
name: string;
|
|
105
|
+
version: string;
|
|
106
|
+
category: 'theme' | 'extension' | 'language pack' | 'other';
|
|
107
|
+
/* OrgNote api semver, 0.13.4 for example */
|
|
108
|
+
apiVersion?: string;
|
|
109
|
+
author?: string;
|
|
110
|
+
description?: string;
|
|
111
|
+
keywords?: string[];
|
|
112
|
+
// Repository url
|
|
113
|
+
sourceType: 'git' | 'file' | 'builtin';
|
|
114
|
+
/* Default value is README.org */
|
|
115
|
+
readmeFilePath?: string;
|
|
116
|
+
/* WIP */
|
|
117
|
+
permissions?: Array<'files' | 'personal info' | '*' | 'third party'>;
|
|
118
|
+
reloadRequired?: boolean;
|
|
119
|
+
sourceUrl?: string;
|
|
120
|
+
sponsor?: string[];
|
|
121
|
+
development?: boolean;
|
|
122
|
+
icon?: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
<a id="orgbb09389"></a>
|
|
127
|
+
|
|
128
|
+
## Extension API
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
<a id="orgdd94657"></a>
|
|
132
|
+
|
|
133
|
+
# Publish to official repository
|
|
134
|
+
|
|
135
|
+
OrgNote has an official [repository](https://github.com/Artawower/orgnote-extensions) for user-based extensions. You can easily add new `recipes/<package>.json`
|
|
136
|
+
with `ExtensionManifest`
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
<a id="orgf459c20"></a>
|
|
140
|
+
|
|
141
|
+
# Extensions example
|
|
142
|
+
|
|
143
|
+
*Themes*
|
|
144
|
+
|
|
145
|
+
- [Atom One Dark theme (pure js)](https://github.com/Artawower/orgnote-atom-one-dark)
|
|
146
|
+
|
|
147
|
+
*UI*
|
|
148
|
+
|
|
149
|
+
- [Colorful Headlines (typescript + API package)](https://github.com/Artawower/orgnote-colorful-headlines)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
<a id="org383a272"></a>
|
|
153
|
+
|
|
154
|
+
# Contribute guide
|
|
155
|
+
|
|
156
|
+
Any contribution is very much appreciated! Please read the [style guide](./CONTRIBUTE.md) before contributing to avoid misunderstandings!
|
|
157
|
+
I would also appreciate it if you would consider becoming my [patron](https://www.patreon.com/artawower)
|
|
158
|
+
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orgnote-api",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.3",
|
|
4
4
|
"description": "Official API for creating extensions for OrgNote app",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"packageManager": "bun@1.1.22",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"test": "vitest",
|
|
9
10
|
"build": "npm run clear && tsc --project tsconfig.json",
|
|
@@ -11,18 +12,16 @@
|
|
|
11
12
|
"codegen:api": "openapi-generator-cli generate",
|
|
12
13
|
"codegen:css-doc": "node collect-css-variables.cjs --docs",
|
|
13
14
|
"codegen:css-types": "node collect-css-variables.cjs --types",
|
|
14
|
-
"
|
|
15
|
+
"prepub": "npm run build && cp -rf package.json package-lock.json README.md dist/",
|
|
16
|
+
"pub": "npm run prepub && cd dist && npm publish",
|
|
17
|
+
"pub:yalc": "npm run prepub && cd dist && yalc publish --push"
|
|
15
18
|
},
|
|
16
19
|
"repository": {
|
|
17
20
|
"type": "git",
|
|
18
21
|
"url": "git+https://github.com/artawower/orgnote-api.git"
|
|
19
22
|
},
|
|
20
|
-
"files": ["
|
|
21
|
-
"
|
|
22
|
-
".": "./dist/index.js",
|
|
23
|
-
"./remote-api": "./dist/remote-api/index.js",
|
|
24
|
-
"./encryption": "./dist/encryption/index.js"
|
|
25
|
-
},
|
|
23
|
+
"files": ["**"],
|
|
24
|
+
"types": "./index.d.ts",
|
|
26
25
|
"keywords": ["orgnote", "org-mode", "org-roam", "api", "extensions"],
|
|
27
26
|
"author": "darkawower <app.orgnote@gmail.com> (https://org-note.com)",
|
|
28
27
|
"license": "GPL-3.0-or-later",
|