orgnote-api 0.0.6 → 0.0.8
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/dist/api.d.ts +66 -0
- package/dist/generated/api/api.d.ts +1376 -0
- package/dist/generated/api/base.d.ts +54 -0
- package/dist/generated/api/common.d.ts +65 -0
- package/dist/generated/api/configuration.d.ts +83 -0
- package/dist/generated/api/index.d.ts +13 -0
- package/dist/index.d.ts +2 -0
- package/dist/models/command.d.ts +18 -0
- package/dist/models/completion.d.ts +22 -0
- package/dist/models/extension.d.ts +34 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/modal.d.ts +4 -0
- package/dist/models/note.d.ts +21 -0
- package/dist/models/theme-variables.d.ts +183 -0
- package/dist/models/widget.d.ts +45 -0
- package/package.json +1 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Org Note API
|
|
3
|
+
* List of methods for work with Org Note.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.1
|
|
6
|
+
* Contact: artawower@protonmail.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from './configuration';
|
|
13
|
+
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
|
+
export declare const BASE_PATH: string;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export declare const COLLECTION_FORMATS: {
|
|
20
|
+
csv: string;
|
|
21
|
+
ssv: string;
|
|
22
|
+
tsv: string;
|
|
23
|
+
pipes: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @interface RequestArgs
|
|
29
|
+
*/
|
|
30
|
+
export interface RequestArgs {
|
|
31
|
+
url: string;
|
|
32
|
+
options: AxiosRequestConfig;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @export
|
|
37
|
+
* @class BaseAPI
|
|
38
|
+
*/
|
|
39
|
+
export declare class BaseAPI {
|
|
40
|
+
protected basePath: string;
|
|
41
|
+
protected axios: AxiosInstance;
|
|
42
|
+
protected configuration: Configuration | undefined;
|
|
43
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @class RequiredError
|
|
49
|
+
* @extends {Error}
|
|
50
|
+
*/
|
|
51
|
+
export declare class RequiredError extends Error {
|
|
52
|
+
field: string;
|
|
53
|
+
constructor(field: string, msg?: string);
|
|
54
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Org Note API
|
|
3
|
+
* List of methods for work with Org Note.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.1
|
|
6
|
+
* Contact: artawower@protonmail.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from "./configuration";
|
|
13
|
+
import type { RequestArgs } from "./base";
|
|
14
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export declare const DUMMY_BASE_URL = "https://example.com";
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @throws {RequiredError}
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @export
|
|
44
|
+
*/
|
|
45
|
+
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @export
|
|
49
|
+
*/
|
|
50
|
+
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @export
|
|
54
|
+
*/
|
|
55
|
+
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @export
|
|
59
|
+
*/
|
|
60
|
+
export declare const toPathString: (url: URL) => string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Org Note API
|
|
3
|
+
* List of methods for work with Org Note.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.1
|
|
6
|
+
* Contact: artawower@protonmail.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
export interface ConfigurationParameters {
|
|
13
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
14
|
+
username?: string;
|
|
15
|
+
password?: string;
|
|
16
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
17
|
+
basePath?: string;
|
|
18
|
+
baseOptions?: any;
|
|
19
|
+
formDataCtor?: new () => any;
|
|
20
|
+
}
|
|
21
|
+
export declare class Configuration {
|
|
22
|
+
/**
|
|
23
|
+
* parameter for apiKey security
|
|
24
|
+
* @param name security name
|
|
25
|
+
* @memberof Configuration
|
|
26
|
+
*/
|
|
27
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
28
|
+
/**
|
|
29
|
+
* parameter for basic security
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof Configuration
|
|
33
|
+
*/
|
|
34
|
+
username?: string;
|
|
35
|
+
/**
|
|
36
|
+
* parameter for basic security
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof Configuration
|
|
40
|
+
*/
|
|
41
|
+
password?: string;
|
|
42
|
+
/**
|
|
43
|
+
* parameter for oauth2 security
|
|
44
|
+
* @param name security name
|
|
45
|
+
* @param scopes oauth2 scope
|
|
46
|
+
* @memberof Configuration
|
|
47
|
+
*/
|
|
48
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
49
|
+
/**
|
|
50
|
+
* override base path
|
|
51
|
+
*
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof Configuration
|
|
54
|
+
*/
|
|
55
|
+
basePath?: string;
|
|
56
|
+
/**
|
|
57
|
+
* base options for axios calls
|
|
58
|
+
*
|
|
59
|
+
* @type {any}
|
|
60
|
+
* @memberof Configuration
|
|
61
|
+
*/
|
|
62
|
+
baseOptions?: any;
|
|
63
|
+
/**
|
|
64
|
+
* The FormData constructor that will be used to create multipart form data
|
|
65
|
+
* requests. You can inject this here so that execution environments that
|
|
66
|
+
* do not support the FormData class can still run the generated client.
|
|
67
|
+
*
|
|
68
|
+
* @type {new () => FormData}
|
|
69
|
+
*/
|
|
70
|
+
formDataCtor?: new () => any;
|
|
71
|
+
constructor(param?: ConfigurationParameters);
|
|
72
|
+
/**
|
|
73
|
+
* Check if the given MIME is a JSON MIME.
|
|
74
|
+
* JSON MIME examples:
|
|
75
|
+
* application/json
|
|
76
|
+
* application/json; charset=UTF8
|
|
77
|
+
* APPLICATION/JSON
|
|
78
|
+
* application/vnd.company+json
|
|
79
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
80
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
81
|
+
*/
|
|
82
|
+
isJsonMime(mime: string): boolean;
|
|
83
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Org Note API
|
|
3
|
+
* List of methods for work with Org Note.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.1
|
|
6
|
+
* Contact: artawower@protonmail.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
export * from "./api";
|
|
13
|
+
export * from "./configuration";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const DEFAULT_KEYBINDING_GROUP = "default";
|
|
2
|
+
export type CommandGroup = 'settings' | 'editor' | 'global' | 'note-detail' | 'completion' | string;
|
|
3
|
+
export interface CommandHandlerParams {
|
|
4
|
+
event?: KeyboardEvent;
|
|
5
|
+
data?: unknown;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface Command {
|
|
9
|
+
keySequence?: string | string[];
|
|
10
|
+
description?: string;
|
|
11
|
+
command?: string;
|
|
12
|
+
title?: string | (() => string);
|
|
13
|
+
icon?: string | (() => string);
|
|
14
|
+
group?: CommandGroup;
|
|
15
|
+
allowOnInput?: boolean;
|
|
16
|
+
ignorePrompt?: boolean;
|
|
17
|
+
handler: (params?: CommandHandlerParams) => unknown | Promise<unknown>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface CompletionCandidate<T = unknown> {
|
|
2
|
+
icon?: string | (() => string);
|
|
3
|
+
group?: string;
|
|
4
|
+
title?: string | (() => string);
|
|
5
|
+
description?: string;
|
|
6
|
+
command: string;
|
|
7
|
+
data: T;
|
|
8
|
+
commandHandler?: (data: T) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface CompletionSearchResult<T = unknown> {
|
|
11
|
+
total?: number;
|
|
12
|
+
result: CompletionCandidate<T>[];
|
|
13
|
+
}
|
|
14
|
+
export type CandidateGetterFn<T = unknown> = (filter: string, limit?: number, offset?: number) => CompletionSearchResult<T> | Promise<CompletionSearchResult<T>>;
|
|
15
|
+
export interface CompletionConfigs<T = unknown> {
|
|
16
|
+
searchAutocompletions?: string[];
|
|
17
|
+
itemsGetter: CandidateGetterFn<T>;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
itemHeight?: string;
|
|
20
|
+
searchText?: string;
|
|
21
|
+
onClicked?: (candidate: CompletionCandidate<T>) => void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { OrgNoteApi } from 'src/api';
|
|
2
|
+
export interface ExtensionManifest {
|
|
3
|
+
name: string;
|
|
4
|
+
version: string;
|
|
5
|
+
category: 'theme' | 'extension' | 'language pack' | 'other';
|
|
6
|
+
apiVersion?: string;
|
|
7
|
+
author?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
keywords?: string[];
|
|
10
|
+
sourceType: 'git' | 'file';
|
|
11
|
+
readmeFilePath?: string;
|
|
12
|
+
permissions?: Array<'files' | 'personal info' | '*' | 'third party'>;
|
|
13
|
+
reloadRequired?: boolean;
|
|
14
|
+
sourceUrl?: string;
|
|
15
|
+
sponsor?: string[];
|
|
16
|
+
development?: boolean;
|
|
17
|
+
icon?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface Extension {
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
onMounted: (api: OrgNoteApi) => Promise<void>;
|
|
22
|
+
onUnmounted?: (api: OrgNoteApi) => Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export interface ExtensionMeta {
|
|
25
|
+
manifest: ExtensionManifest;
|
|
26
|
+
uploaded?: boolean;
|
|
27
|
+
active?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface StoredExtension extends ExtensionMeta {
|
|
30
|
+
module?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface ActiveExtension extends ExtensionMeta {
|
|
33
|
+
module: Extension;
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ModelsPublicNote, ModelsPublicUser } from '../generated/api';
|
|
2
|
+
export interface NotesFilter {
|
|
3
|
+
searchText?: string;
|
|
4
|
+
userId?: string;
|
|
5
|
+
limit?: number;
|
|
6
|
+
offset?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface NotePreview {
|
|
9
|
+
id: ModelsPublicNote['id'];
|
|
10
|
+
meta: ModelsPublicNote['meta'];
|
|
11
|
+
createdAt: ModelsPublicNote['createdAt'];
|
|
12
|
+
updatedAt: ModelsPublicNote['updatedAt'];
|
|
13
|
+
filePath: ModelsPublicNote['filePath'];
|
|
14
|
+
isMy: ModelsPublicNote['isMy'];
|
|
15
|
+
author?: ModelsPublicUser;
|
|
16
|
+
bookmarked?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface Note extends ModelsPublicNote {
|
|
19
|
+
deleted?: Date;
|
|
20
|
+
bookmarked?: boolean;
|
|
21
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
export declare enum ThemeVariable {
|
|
2
|
+
red = "red",
|
|
3
|
+
orange = "orange",
|
|
4
|
+
green = "green",
|
|
5
|
+
teal = "teal",
|
|
6
|
+
yellow = "yellow",
|
|
7
|
+
blue = "blue",
|
|
8
|
+
darkBlue = "darkBlue",
|
|
9
|
+
magenta = "magenta",
|
|
10
|
+
violet = "violet",
|
|
11
|
+
cyan = "cyan",
|
|
12
|
+
darkCyan = "darkCyan",
|
|
13
|
+
white = "white",
|
|
14
|
+
bg = "bg",
|
|
15
|
+
bgAlt = "bgAlt",
|
|
16
|
+
fg = "fg",
|
|
17
|
+
fgAlt = "fgAlt",
|
|
18
|
+
base0 = "base0",
|
|
19
|
+
base1 = "base1",
|
|
20
|
+
base2 = "base2",
|
|
21
|
+
base3 = "base3",
|
|
22
|
+
base4 = "base4",
|
|
23
|
+
base5 = "base5",
|
|
24
|
+
base6 = "base6",
|
|
25
|
+
base7 = "base7",
|
|
26
|
+
base8 = "base8",
|
|
27
|
+
bgAlt2 = "bgAlt2"
|
|
28
|
+
}
|
|
29
|
+
export declare enum CSSVariable {
|
|
30
|
+
bg = "bg",
|
|
31
|
+
fg = "fg",
|
|
32
|
+
dur = "dur",
|
|
33
|
+
easyTableHeaderBackgroundColor = "easyTableHeaderBackgroundColor",
|
|
34
|
+
easyTableHeaderFontColor = "easyTableHeaderFontColor",
|
|
35
|
+
easyTableBodyRowBackgroundColor = "easyTableBodyRowBackgroundColor",
|
|
36
|
+
easyTableBodyRowFontColor = "easyTableBodyRowFontColor",
|
|
37
|
+
easyTableBodyRowHoverBackgroundColor = "easyTableBodyRowHoverBackgroundColor",
|
|
38
|
+
easyTableFooterBackgroundColor = "easyTableFooterBackgroundColor",
|
|
39
|
+
easyTableFooterFontColor = "easyTableFooterFontColor",
|
|
40
|
+
easyTableBodyRowHoverFontColor = "easyTableBodyRowHoverFontColor",
|
|
41
|
+
easyTableRowBorder = "easyTableRowBorder",
|
|
42
|
+
easyTableBorder = "easyTableBorder",
|
|
43
|
+
easyTableMessageFontColor = "easyTableMessageFontColor",
|
|
44
|
+
btnFlatSize = "btnFlatSize",
|
|
45
|
+
btnFlatBorder = "btnFlatBorder",
|
|
46
|
+
btnFlatBorderRadius = "btnFlatBorderRadius",
|
|
47
|
+
btnFlatBoxShadow = "btnFlatBoxShadow",
|
|
48
|
+
btnMainColor = "btnMainColor",
|
|
49
|
+
btnSocialSize = "btnSocialSize",
|
|
50
|
+
btnSocialBackground = "btnSocialBackground",
|
|
51
|
+
checkboxColor = "checkboxColor",
|
|
52
|
+
editorFontFamily = "editorFontFamily",
|
|
53
|
+
flexGapMd = "flexGapMd",
|
|
54
|
+
flexGapSm = "flexGapSm",
|
|
55
|
+
inlineCodeBackground = "inlineCodeBackground",
|
|
56
|
+
inlineCodeFontColor = "inlineCodeFontColor",
|
|
57
|
+
scrollBarWidth = "scrollBarWidth",
|
|
58
|
+
scrollBarColor = "scrollBarColor",
|
|
59
|
+
fontSizeSm = "fontSizeSm",
|
|
60
|
+
fontSizeMd = "fontSizeMd",
|
|
61
|
+
fontSizeLg = "fontSizeLg",
|
|
62
|
+
headlineMargin = "headlineMargin",
|
|
63
|
+
paragraphFontSize = "paragraphFontSize",
|
|
64
|
+
mainFontFamily = "mainFontFamily",
|
|
65
|
+
editorFontFamilyMain = "editorFontFamilyMain",
|
|
66
|
+
paragraphFontFamily = "paragraphFontFamily",
|
|
67
|
+
headlineFontFamily = "headlineFontFamily",
|
|
68
|
+
codeFontFamily = "codeFontFamily",
|
|
69
|
+
descriptionFontFamily = "descriptionFontFamily",
|
|
70
|
+
descriptionFontSize = "descriptionFontSize",
|
|
71
|
+
descriptionFontStyle = "descriptionFontStyle",
|
|
72
|
+
descriptionFontColor = "descriptionFontColor",
|
|
73
|
+
descriptionPadding = "descriptionPadding",
|
|
74
|
+
codeFontSize = "codeFontSize",
|
|
75
|
+
headlineFontWeight = "headlineFontWeight",
|
|
76
|
+
fontColorAction = "fontColorAction",
|
|
77
|
+
ulFontSize = "ulFontSize",
|
|
78
|
+
ulLineHeight = "ulLineHeight",
|
|
79
|
+
ulFontFamily = "ulFontFamily",
|
|
80
|
+
topBarHeight = "topBarHeight",
|
|
81
|
+
contentMaxWidth = "contentMaxWidth",
|
|
82
|
+
modelineHeight = "modelineHeight",
|
|
83
|
+
modelinePadding = "modelinePadding",
|
|
84
|
+
modelineBackground = "modelineBackground",
|
|
85
|
+
cardBackgroundColor = "cardBackgroundColor",
|
|
86
|
+
shadowMain = "shadowMain",
|
|
87
|
+
sidebarWidth = "sidebarWidth",
|
|
88
|
+
actionPaneOpenedWidth = "actionPaneOpenedWidth",
|
|
89
|
+
footerHeight = "footerHeight",
|
|
90
|
+
publicPreviewImageWidth = "publicPreviewImageWidth",
|
|
91
|
+
publicPreviewImageHeight = "publicPreviewImageHeight",
|
|
92
|
+
publicPreviewMaxHeight = "publicPreviewMaxHeight",
|
|
93
|
+
completionItemMinHeight = "completionItemMinHeight",
|
|
94
|
+
completionItemPadding = "completionItemPadding",
|
|
95
|
+
completionItemMargin = "completionItemMargin",
|
|
96
|
+
completionItemHoverBackground = "completionItemHoverBackground",
|
|
97
|
+
completionItemHoverColor = "completionItemHoverColor",
|
|
98
|
+
completionFloatTop = "completionFloatTop",
|
|
99
|
+
completionBorderRadius = "completionBorderRadius",
|
|
100
|
+
completionWidth = "completionWidth",
|
|
101
|
+
completionMaxWidth = "completionMaxWidth",
|
|
102
|
+
completionBorder = "completionBorder",
|
|
103
|
+
completionBoxShadow = "completionBoxShadow",
|
|
104
|
+
completionInputHeight = "completionInputHeight",
|
|
105
|
+
completionContainerMargin = "completionContainerMargin",
|
|
106
|
+
menuPadding = "menuPadding",
|
|
107
|
+
fileUploaderBorderWidth = "fileUploaderBorderWidth",
|
|
108
|
+
fileUploaderBorderStyle = "fileUploaderBorderStyle",
|
|
109
|
+
fileUploaderBorderColor = "fileUploaderBorderColor",
|
|
110
|
+
fileUploaderBg = "fileUploaderBg",
|
|
111
|
+
fileUploaderOpacity = "fileUploaderOpacity",
|
|
112
|
+
notePreviewLinkMaxWidth = "notePreviewLinkMaxWidth",
|
|
113
|
+
notePreviewLinkHeight = "notePreviewLinkHeight",
|
|
114
|
+
btnActionShadow = "btnActionShadow",
|
|
115
|
+
btnActionBorder = "btnActionBorder",
|
|
116
|
+
btnActionBorderColor = "btnActionBorderColor",
|
|
117
|
+
btnActionPadding = "btnActionPadding",
|
|
118
|
+
btnActionRadius = "btnActionRadius",
|
|
119
|
+
btnActionFireColor = "btnActionFireColor",
|
|
120
|
+
btnActionFireBorderColor = "btnActionFireBorderColor",
|
|
121
|
+
btnActionMd = "btnActionMd",
|
|
122
|
+
btnActionSm = "btnActionSm",
|
|
123
|
+
btnActionLg = "btnActionLg",
|
|
124
|
+
btnActionColor = "btnActionColor",
|
|
125
|
+
btnActionBg = "btnActionBg",
|
|
126
|
+
miniBufferBackground = "miniBufferBackground",
|
|
127
|
+
miniBufferFontColor = "miniBufferFontColor",
|
|
128
|
+
miniBufferBorderTop = "miniBufferBorderTop",
|
|
129
|
+
miniBufferMaxHeight = "miniBufferMaxHeight",
|
|
130
|
+
tagHoverBackground = "tagHoverBackground",
|
|
131
|
+
tagHoverColor = "tagHoverColor",
|
|
132
|
+
toolbarBorderTop = "toolbarBorderTop",
|
|
133
|
+
toolbarHoverColor = "toolbarHoverColor",
|
|
134
|
+
headerbarHeight = "headerbarHeight",
|
|
135
|
+
headerbarBorderRadius = "headerbarBorderRadius",
|
|
136
|
+
headerbarBackgroundColor = "headerbarBackgroundColor",
|
|
137
|
+
headerbarColor = "headerbarColor",
|
|
138
|
+
headerbarBorder = "headerbarBorder",
|
|
139
|
+
fileItemBgHover = "fileItemBgHover",
|
|
140
|
+
fileItemColorHover = "fileItemColorHover",
|
|
141
|
+
fileItemHeight = "fileItemHeight",
|
|
142
|
+
iconBtnColor = "iconBtnColor",
|
|
143
|
+
iconBtnHoverColor = "iconBtnHoverColor",
|
|
144
|
+
modalMaxHeight = "modalMaxHeight",
|
|
145
|
+
modalMaxWidth = "modalMaxWidth",
|
|
146
|
+
modalPadding = "modalPadding",
|
|
147
|
+
blockPaddingMd = "blockPaddingMd",
|
|
148
|
+
blockMarginMd = "blockMarginMd",
|
|
149
|
+
blockMarginSm = "blockMarginSm",
|
|
150
|
+
blockBorderRadiusMd = "blockBorderRadiusMd",
|
|
151
|
+
blockBorderRadiusSm = "blockBorderRadiusSm",
|
|
152
|
+
itemDefaultRadius = "itemDefaultRadius",
|
|
153
|
+
searchIcnSize = "searchIcnSize",
|
|
154
|
+
gapMd = "gapMd",
|
|
155
|
+
gapSm = "gapSm",
|
|
156
|
+
gapXs = "gapXs",
|
|
157
|
+
srcBlockHeaderPaddingY = "srcBlockHeaderPaddingY",
|
|
158
|
+
srcBlockFooterPaddingY = "srcBlockFooterPaddingY",
|
|
159
|
+
srcBlockPaddingX = "srcBlockPaddingX",
|
|
160
|
+
srcBlockPaddingY = "srcBlockPaddingY",
|
|
161
|
+
srcBlockMarginY = "srcBlockMarginY",
|
|
162
|
+
pagePadding = "pagePadding",
|
|
163
|
+
editorLineHeight = "editorLineHeight",
|
|
164
|
+
editorHeadlineLineHeight = "editorHeadlineLineHeight",
|
|
165
|
+
editorDefaultLineHeight = "editorDefaultLineHeight",
|
|
166
|
+
editorPaddingBottom = "editorPaddingBottom",
|
|
167
|
+
editorCursorColor = "editorCursorColor",
|
|
168
|
+
editorSelectionBgColor = "editorSelectionBgColor",
|
|
169
|
+
editorSelectionColor = "editorSelectionColor",
|
|
170
|
+
editorGutterColor = "editorGutterColor",
|
|
171
|
+
editorGutterHoverColor = "editorGutterHoverColor",
|
|
172
|
+
editorFoldPlaceholderColor = "editorFoldPlaceholderColor",
|
|
173
|
+
editorActiveLineBgColor = "editorActiveLineBgColor",
|
|
174
|
+
editorCaretColor = "editorCaretColor",
|
|
175
|
+
orgListItemBulletMarginLeft = "orgListItemBulletMarginLeft",
|
|
176
|
+
devicePaddingBottom = "devicePaddingBottom",
|
|
177
|
+
graphNodeColor = "graphNodeColor",
|
|
178
|
+
graphEdgeColor = "graphEdgeColor",
|
|
179
|
+
graphActiveColor = "graphActiveColor",
|
|
180
|
+
inputHeight = "inputHeight",
|
|
181
|
+
inputLgHeight = "inputLgHeight",
|
|
182
|
+
borderMain = "borderMain"
|
|
183
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ChangeSpec } from '@codemirror/state';
|
|
2
|
+
import type { EditorView } from 'codemirror';
|
|
3
|
+
import type { NodeType, OrgNode } from 'org-mode-ast';
|
|
4
|
+
export type EmbeddedWidget = {
|
|
5
|
+
destroy: () => void;
|
|
6
|
+
refresh?: (...args: unknown[]) => void;
|
|
7
|
+
};
|
|
8
|
+
export interface WidgetBuilderParams {
|
|
9
|
+
wrap: HTMLElement;
|
|
10
|
+
orgNode: OrgNode;
|
|
11
|
+
rootNodeSrc: () => OrgNode;
|
|
12
|
+
onUpdateFn?: (newVal: string) => void;
|
|
13
|
+
editorView: EditorView;
|
|
14
|
+
readonly?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type WidgetBuilder = (params: WidgetBuilderParams) => EmbeddedWidget;
|
|
17
|
+
export interface CommonEmbeddedWidget {
|
|
18
|
+
satisfied?: (orgNode: OrgNode) => boolean;
|
|
19
|
+
widgetBuilder?: WidgetBuilder;
|
|
20
|
+
viewUpdater?: (orgNode: OrgNode, newVal: string) => ViewUpdateSchema;
|
|
21
|
+
ignoreEvent?: boolean;
|
|
22
|
+
showRangeOffset?: [number, number];
|
|
23
|
+
}
|
|
24
|
+
export interface MultilineEmbeddedWidget extends CommonEmbeddedWidget {
|
|
25
|
+
widgetBuilder: WidgetBuilder;
|
|
26
|
+
suppressEdit?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export type MultilineEmbeddedWidgets = {
|
|
29
|
+
[key in NodeType]?: MultilineEmbeddedWidget;
|
|
30
|
+
};
|
|
31
|
+
export type ViewUpdateSchema = ChangeSpec;
|
|
32
|
+
export interface InlineEmbeddedWidget extends CommonEmbeddedWidget {
|
|
33
|
+
classBuilder?: (orgNode: OrgNode) => string;
|
|
34
|
+
decorationType: 'mark' | 'widget' | 'replace' | 'line';
|
|
35
|
+
ignoreEditing?: boolean;
|
|
36
|
+
side?: number;
|
|
37
|
+
wrapComponent?: string;
|
|
38
|
+
inclusive?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export type InlineEmbeddedWidgets = {
|
|
41
|
+
[key in NodeType]?: InlineEmbeddedWidget;
|
|
42
|
+
};
|
|
43
|
+
export type EmbeddedWidgetBuilder = (wrap: HTMLElement, dynamicProps?: {
|
|
44
|
+
[key: string]: unknown;
|
|
45
|
+
}) => EmbeddedWidget;
|