Skip to content

Commit a608858

Browse files
committed
typedoc plugin
1 parent 7d49a97 commit a608858

File tree

52 files changed

+5887
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+5887
-18
lines changed

astro.config.mjs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,29 @@ import starlight from '@astrojs/starlight';
33
import { generateTypeDoc } from 'starlight-typedoc';
44

55
const typeDocSidebarGroup = await generateTypeDoc({
6-
entryPoints: ['obsidian-js-engine-plugin/jsEngine/api/*'],
6+
entryPoints: ['obsidian-js-engine-plugin/jsEngine/api/*', 'obsidian-js-engine-plugin/jsEngine/engine/*'],
77
typeDoc: {
88
entryPointStrategy: 'expand',
9+
parametersFormat: 'table',
10+
propertiesFormat: 'list',
11+
enumMembersFormat: 'table',
12+
typeDeclarationFormat: 'table',
13+
excludePrivate: true,
14+
excludeProtected: true,
15+
useCodeBlocks: false,
16+
plugin: ['typedoc-plugin-mdn-links'],
917
},
1018
tsconfig: 'obsidian-js-engine-plugin/tsconfig.json',
19+
sidebar: {
20+
label: 'API Reference',
21+
collapsed: true,
22+
},
1123
});
1224

1325
// https://astro.build/config
1426
export default defineConfig({
27+
site: 'https://www.moritzjung.dev',
28+
base: '/obsidian-js-engine-plugin-docs',
1529
integrations: [
1630
starlight({
1731
title: 'JS Engine Docs',
@@ -21,10 +35,7 @@ export default defineConfig({
2135
sidebar: [
2236
{
2337
label: 'Guides',
24-
items: [
25-
// Each item here is one entry in the navigation menu.
26-
{ label: 'Example Guide', link: '/guides/example/' },
27-
],
38+
autogenerate: { directory: 'guides' },
2839
},
2940
typeDocSidebarGroup,
3041
],

package-lock.json

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"sharp": "^0.33.0",
1616
"starlight-typedoc": "^0.6.0",
1717
"typedoc": "^0.25.4",
18-
"typedoc-plugin-markdown": "^4.0.0-next.37"
18+
"typedoc-plugin-markdown": "^4.0.0-next.37",
19+
"typedoc-plugin-mdn-links": "^3.1.8"
1920
}
2021
}
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
---
2+
editUrl: false
3+
next: false
4+
prev: false
5+
title: "API"
6+
---
7+
8+
## Constructors
9+
10+
### new API(app, plugin, instanceId)
11+
12+
> **new API**(`app`, `plugin`, `instanceId`): [`API`](/api/api/api/classes/api/)
13+
14+
#### Parameters
15+
16+
| Parameter | Type |
17+
| :------ | :------ |
18+
| `app` | `App` |
19+
| `plugin` | `default` |
20+
| `instanceId` | [`InstanceId`](/api/api/instanceid/classes/instanceid/) |
21+
22+
#### Returns
23+
24+
[`API`](/api/api/api/classes/api/)
25+
26+
#### Source
27+
28+
[jsEngine/api/API.ts:38](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/API.ts#L38)
29+
30+
## Properties
31+
32+
### app
33+
34+
> **`readonly`** **app**: `App`
35+
36+
Reference to the obsidian app.
37+
38+
#### Source
39+
40+
[jsEngine/api/API.ts:15](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/API.ts#L15)
41+
42+
***
43+
44+
### instanceId
45+
46+
> **`readonly`** **instanceId**: [`InstanceId`](/api/api/instanceid/classes/instanceid/)
47+
48+
#### Source
49+
50+
[jsEngine/api/API.ts:20](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/API.ts#L20)
51+
52+
***
53+
54+
### internal
55+
56+
> **`readonly`** **internal**: [`InternalAPI`](/api/api/internal/classes/internalapi/)
57+
58+
API to interact with js engines internals.
59+
60+
#### Source
61+
62+
[jsEngine/api/API.ts:36](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/API.ts#L36)
63+
64+
***
65+
66+
### lib
67+
68+
> **`readonly`** **lib**: [`LibAPI`](/api/api/libapi/classes/libapi/)
69+
70+
API to interact with packaged libraries.
71+
72+
#### Source
73+
74+
[jsEngine/api/API.ts:32](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/API.ts#L32)
75+
76+
***
77+
78+
### markdown
79+
80+
> **`readonly`** **markdown**: [`MarkdownAPI`](/api/api/markdownapi/classes/markdownapi/)
81+
82+
API to interact with markdown.
83+
84+
#### Source
85+
86+
[jsEngine/api/API.ts:24](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/API.ts#L24)
87+
88+
***
89+
90+
### message
91+
92+
> **`readonly`** **message**: [`MessageAPI`](/api/api/messageapi/classes/messageapi/)
93+
94+
API to interact with the plugins message system.
95+
96+
#### Source
97+
98+
[jsEngine/api/API.ts:28](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/API.ts#L28)
99+
100+
***
101+
102+
### plugin
103+
104+
> **`readonly`** **plugin**: `default`
105+
106+
Reference the JS Engine plugin.
107+
108+
#### Source
109+
110+
[jsEngine/api/API.ts:19](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/API.ts#L19)
111+
112+
## Methods
113+
114+
### getPlugin()
115+
116+
> **getPlugin**(`pluginId`): `Plugin`
117+
118+
Gets a plugin by its id. A plugin id can be found by looking at its manifest.
119+
120+
#### Parameters
121+
122+
| Parameter | Type | Description |
123+
| :------ | :------ | :------ |
124+
| `pluginId` | `string` | the id of the plugin. |
125+
126+
#### Returns
127+
128+
`Plugin`
129+
130+
#### Source
131+
132+
[jsEngine/api/API.ts:71](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/API.ts#L71)
133+
134+
***
135+
136+
### importJs()
137+
138+
> **importJs**(`path`): [`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<`any`\>
139+
140+
Loads an ECMAScript module from a vault relative path.
141+
142+
#### Parameters
143+
144+
| Parameter | Type | Description |
145+
| :------ | :------ | :------ |
146+
| `path` | `string` | the vault relative path of the file to import |
147+
148+
#### Returns
149+
150+
[`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<`any`\>
151+
152+
#### Source
153+
154+
[jsEngine/api/API.ts:55](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/API.ts#L55)
155+
156+
***
157+
158+
### reactive()
159+
160+
> **reactive**(`fn`, ...`initialArgs`): [`ReactiveComponent`](/api/api/reactive/reactivecomponent/classes/reactivecomponent/)
161+
162+
#### Parameters
163+
164+
| Parameter | Type |
165+
| :------ | :------ |
166+
| `fn` | [`JsFunc`](/api/engine/jsexecution/type-aliases/jsfunc/) |
167+
| ...`initialArgs` | `unknown`[] |
168+
169+
#### Returns
170+
171+
[`ReactiveComponent`](/api/api/reactive/reactivecomponent/classes/reactivecomponent/)
172+
173+
#### Source
174+
175+
[jsEngine/api/API.ts:75](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/API.ts#L75)
176+
177+
***
178+
179+
Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
editUrl: false
3+
next: false
4+
prev: false
5+
title: "api/API"
6+
---
7+
8+
## Index
9+
10+
### Classes
11+
12+
- [API](/api/api/api/classes/api/)
13+
14+
***
15+
16+
Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
editUrl: false
3+
next: false
4+
prev: false
5+
title: "InstanceId"
6+
---
7+
8+
Identifies an instance of the API.
9+
10+
For the API passed into a JsExecution this is the id of the JsExecution itself.
11+
12+
## Constructors
13+
14+
### new InstanceId(name, id)
15+
16+
> **new InstanceId**(`name`, `id`): [`InstanceId`](/api/api/instanceid/classes/instanceid/)
17+
18+
#### Parameters
19+
20+
| Parameter | Type |
21+
| :------ | :------ |
22+
| `name` | `string` |
23+
| `id` | `string` |
24+
25+
#### Returns
26+
27+
[`InstanceId`](/api/api/instanceid/classes/instanceid/)
28+
29+
#### Source
30+
31+
[jsEngine/api/InstanceId.ts:15](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/InstanceId.ts#L15)
32+
33+
## Properties
34+
35+
### id
36+
37+
> **`readonly`** **id**: `string`
38+
39+
#### Source
40+
41+
[jsEngine/api/InstanceId.ts:13](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/InstanceId.ts#L13)
42+
43+
***
44+
45+
### name
46+
47+
> **`readonly`** **name**: `string`
48+
49+
#### Source
50+
51+
[jsEngine/api/InstanceId.ts:12](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/InstanceId.ts#L12)
52+
53+
## Methods
54+
55+
### create()
56+
57+
> **`static`** **create**(`name`): [`InstanceId`](/api/api/instanceid/classes/instanceid/)
58+
59+
#### Parameters
60+
61+
| Parameter | Type |
62+
| :------ | :------ |
63+
| `name` | `string` |
64+
65+
#### Returns
66+
67+
[`InstanceId`](/api/api/instanceid/classes/instanceid/)
68+
69+
#### Source
70+
71+
[jsEngine/api/InstanceId.ts:20](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/InstanceId.ts#L20)
72+
73+
***
74+
75+
Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
editUrl: false
3+
next: false
4+
prev: false
5+
title: "InstanceType"
6+
---
7+
8+
## Enumeration Members
9+
10+
| Member | Value | Source |
11+
| :------ | :------ | :------ |
12+
| `JS_EXECUTION` | `"JS_EXECUTION"` | [jsEngine/api/InstanceId.ts:2](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/InstanceId.ts#L2) |
13+
| `PLUGIN` | `"PLUGIN"` | [jsEngine/api/InstanceId.ts:3](https://github.com/mProjectsCode/obsidian-js-engine-plugin/blob/6478290/jsEngine/api/InstanceId.ts#L3) |
14+
15+
***
16+
17+
Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
editUrl: false
3+
next: false
4+
prev: false
5+
title: "api/InstanceId"
6+
---
7+
8+
## Index
9+
10+
### Enumerations
11+
12+
- [InstanceType](/api/api/instanceid/enumerations/instancetype/)
13+
14+
### Classes
15+
16+
- [InstanceId](/api/api/instanceid/classes/instanceid/)
17+
18+
***
19+
20+
Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)

0 commit comments

Comments
 (0)