@appsoftwareltd/etherpk-extension-api 0.13.0 → 0.14.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/README.md +170 -12
- package/controls.css +391 -0
- package/dist/assets.d.ts +7 -4
- package/dist/client-commands.d.ts +11 -0
- package/dist/client-commands.js +11 -0
- package/dist/context.d.ts +33 -58
- package/dist/documents.d.ts +10 -7
- package/dist/documents.js +4 -1
- package/dist/editor.d.ts +22 -11
- package/dist/graph-index.d.ts +7 -7
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/manifest.d.ts +3 -5
- package/dist/manifest.js +1 -1
- package/dist/menus.d.ts +11 -14
- package/dist/records.d.ts +5 -3
- package/dist/settings-sections.d.ts +16 -10
- package/package.json +4 -2
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* An extension's own section in
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* An extension's own section in the Client's settings (ADR 0134, amended 2026-10-15 and
|
|
3
|
+
* 2026-10-17), for settings that belong to the person and need more than the fields a manifest
|
|
4
|
+
* can declare, such as a list of accounts with a button that connects one. The main module exports
|
|
5
|
+
* them as `settingsSections`.
|
|
6
|
+
*
|
|
7
|
+
* The Client draws an extension's sections in a graph's Settings and Extensions while the extension
|
|
8
|
+
* runs there. An extension that comes with EtherPK is loaded with the Client, so its sections are
|
|
9
|
+
* drawn on the Graphs page too, with no graph open. Any other extension's code is loaded only once
|
|
10
|
+
* a graph opens, so its sections are not drawn on the Graphs page.
|
|
6
11
|
*/
|
|
7
12
|
import type { ExtensionAuth } from './auth';
|
|
8
13
|
import type { ExtensionPersonStorage, ExtensionSettings, ExtensionTheme } from './context';
|
|
9
14
|
/**
|
|
10
|
-
*
|
|
15
|
+
* Where an extension's settings section is drawn: `extension`, under the extension's own entry in
|
|
16
|
+
* the Extensions area, beside the settings its manifest declares; or `agents`, in the Agents tab.
|
|
11
17
|
*
|
|
12
|
-
* @
|
|
18
|
+
* @public
|
|
13
19
|
*/
|
|
14
|
-
export type SettingsSectionTab = 'agents';
|
|
20
|
+
export type SettingsSectionTab = 'extension' | 'agents';
|
|
15
21
|
/**
|
|
16
22
|
* What a settings section is mounted with: what belongs to the person, and nothing from a graph,
|
|
17
23
|
* since there may be no graph open.
|
|
18
24
|
*
|
|
19
|
-
* @
|
|
25
|
+
* @public
|
|
20
26
|
*/
|
|
21
27
|
export interface SettingsSectionContext {
|
|
22
28
|
/** The extension's id, from its manifest. */
|
|
@@ -35,7 +41,7 @@ export interface SettingsSectionContext {
|
|
|
35
41
|
/**
|
|
36
42
|
* A section the section's host element shows, as the Client drives it.
|
|
37
43
|
*
|
|
38
|
-
* @
|
|
44
|
+
* @public
|
|
39
45
|
*/
|
|
40
46
|
export interface MountedSettingsSection {
|
|
41
47
|
/** The tab closed, or the extension was switched off. */
|
|
@@ -44,7 +50,7 @@ export interface MountedSettingsSection {
|
|
|
44
50
|
/**
|
|
45
51
|
* One settings section an extension adds.
|
|
46
52
|
*
|
|
47
|
-
* @
|
|
53
|
+
* @public
|
|
48
54
|
*/
|
|
49
55
|
export interface SettingsSection {
|
|
50
56
|
/** Unique within the extension. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsoftwareltd/etherpk-extension-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The API an EtherPK extension is written against: the context it is started with, its manifest, and the contract its Views follow.",
|
|
6
6
|
"type": "module",
|
|
@@ -9,13 +9,15 @@
|
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"default": "./dist/index.js"
|
|
12
|
-
}
|
|
12
|
+
},
|
|
13
|
+
"./controls.css": "./controls.css"
|
|
13
14
|
},
|
|
14
15
|
"publishConfig": {
|
|
15
16
|
"access": "public"
|
|
16
17
|
},
|
|
17
18
|
"files": [
|
|
18
19
|
"dist",
|
|
20
|
+
"controls.css",
|
|
19
21
|
"LICENSE",
|
|
20
22
|
"README.md"
|
|
21
23
|
],
|