orgnote-api 0.12.1 → 0.12.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/package.json +2 -2
- package/api.ts +0 -119
- package/encryption/__tests__/__snapshots__/note-encryption.spec.ts.snap +0 -185
- package/encryption/__tests__/encryption-keys.ts +0 -163
- package/encryption/__tests__/encryption.spec.ts +0 -165
- package/encryption/__tests__/note-encryption.spec.ts +0 -346
- package/encryption/encryption.ts +0 -172
- package/encryption/index.ts +0 -2
- package/encryption/note-encryption.ts +0 -148
- package/files-api.ts +0 -25
- package/index.ts +0 -7
- package/models/command.ts +0 -45
- package/models/completion.ts +0 -30
- package/models/default-commands.ts +0 -44
- package/models/editor.ts +0 -27
- package/models/encryption.ts +0 -22
- package/models/extension.ts +0 -45
- package/models/index.ts +0 -11
- package/models/modal.ts +0 -12
- package/models/note.ts +0 -26
- package/models/theme-variables.ts +0 -194
- package/models/vue-component.ts +0 -3
- package/models/widget-type.ts +0 -5
- package/models/widget.ts +0 -59
- package/remote-api/.gitignore +0 -4
- package/remote-api/.npmignore +0 -1
- package/remote-api/.openapi-generator/FILES +0 -8
- package/remote-api/.openapi-generator/VERSION +0 -1
- package/remote-api/.openapi-generator-ignore +0 -23
- package/remote-api/api.ts +0 -2303
- package/remote-api/base.ts +0 -86
- package/remote-api/common.ts +0 -150
- package/remote-api/configuration.ts +0 -110
- package/remote-api/git_push.sh +0 -57
- package/remote-api/index.ts +0 -18
- package/tools/__tests__/is-gpg-encrypted.spec.ts +0 -44
- package/tools/index.ts +0 -2
- package/tools/is-gpg-encrypted.ts +0 -3
- package/tools/mock-server.ts +0 -16
package/models/command.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { DefaultCommands } from './default-commands';
|
|
2
|
-
|
|
3
|
-
export const DEFAULT_KEYBINDING_GROUP = 'default';
|
|
4
|
-
|
|
5
|
-
export type CommandGroup =
|
|
6
|
-
| 'settings'
|
|
7
|
-
| 'editor'
|
|
8
|
-
| 'global'
|
|
9
|
-
| 'note-detail'
|
|
10
|
-
| 'completion'
|
|
11
|
-
| string;
|
|
12
|
-
|
|
13
|
-
export interface CommandHandlerParams<T = any> {
|
|
14
|
-
event?: KeyboardEvent;
|
|
15
|
-
data?: T;
|
|
16
|
-
[key: string]: unknown;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface CommandPreview {
|
|
20
|
-
description?: string;
|
|
21
|
-
command?: DefaultCommands | string;
|
|
22
|
-
title?: string | (() => string);
|
|
23
|
-
icon?: string | (() => string);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface CommandMeta<T = any> extends Partial<CommandPreview> {
|
|
27
|
-
// TODO: add support for multiple key sequences
|
|
28
|
-
keySequence?: string | string[];
|
|
29
|
-
/* Where is this command available, default value is global */
|
|
30
|
-
group?: CommandGroup;
|
|
31
|
-
allowOnInput?: boolean;
|
|
32
|
-
ignorePrompt?: boolean;
|
|
33
|
-
interactive?: boolean;
|
|
34
|
-
/* When command is system command, it will not be shown for users */
|
|
35
|
-
system?: boolean;
|
|
36
|
-
available?: () => boolean;
|
|
37
|
-
context?: {
|
|
38
|
-
[key: string]: T;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface Command<T = any> extends CommandMeta<T> {
|
|
43
|
-
/* arguments depend on the current scope */
|
|
44
|
-
handler: (params?: CommandHandlerParams) => unknown | Promise<unknown>;
|
|
45
|
-
}
|
package/models/completion.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export interface CompletionCandidate<T = unknown> {
|
|
2
|
-
icon?: string | (() => string);
|
|
3
|
-
group?: string;
|
|
4
|
-
title?: string | (() => string);
|
|
5
|
-
description?: string | (() => string);
|
|
6
|
-
command: string;
|
|
7
|
-
data: T;
|
|
8
|
-
/* Command handler could be used instead of command string */
|
|
9
|
-
commandHandler?: (data: T) => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface CompletionSearchResult<T = unknown> {
|
|
13
|
-
total?: number;
|
|
14
|
-
result: CompletionCandidate<T>[];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type CandidateGetterFn<T = unknown> = (
|
|
18
|
-
filter: string,
|
|
19
|
-
limit?: number,
|
|
20
|
-
offset?: number
|
|
21
|
-
) => CompletionSearchResult<T> | Promise<CompletionSearchResult<T>>;
|
|
22
|
-
|
|
23
|
-
export interface CompletionConfigs<T = unknown> {
|
|
24
|
-
searchAutocompletions?: string[];
|
|
25
|
-
itemsGetter: CandidateGetterFn<T>;
|
|
26
|
-
placeholder?: string;
|
|
27
|
-
itemHeight?: string;
|
|
28
|
-
searchText?: string;
|
|
29
|
-
onClicked?: (candidate: CompletionCandidate<T>) => void;
|
|
30
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This are default commands. It's not a complete list
|
|
3
|
-
* Some of the commands are dynamically generated or
|
|
4
|
-
* can be added by user extensions.
|
|
5
|
-
*/
|
|
6
|
-
export enum DefaultCommands {
|
|
7
|
-
// Global commands
|
|
8
|
-
REPORT_BUG = 'report bug',
|
|
9
|
-
OPEN_DEBUG_INFO = 'open debug info',
|
|
10
|
-
SHOW_LOGS = 'show logs',
|
|
11
|
-
TOGGLE_SIDEBAR = 'toggle sidebar',
|
|
12
|
-
TOGGLE_FILE_MANAGER = 'toggle file manager',
|
|
13
|
-
CREATE_NOTE = 'create note',
|
|
14
|
-
PROJECT_INFO = 'project info',
|
|
15
|
-
|
|
16
|
-
// Completion commands
|
|
17
|
-
SEARCH = 'search',
|
|
18
|
-
TOGGLE_COMMANDS = 'toggle commands',
|
|
19
|
-
RESTORE_COMPLETION = 'restore last completion',
|
|
20
|
-
EXIT_COMMAND_EXECUTOR = 'exit command executor',
|
|
21
|
-
NEXT_CANDIDATE = 'next candidate',
|
|
22
|
-
PREV_CANDIDATE = 'previous candidate',
|
|
23
|
-
EXECUTE_CANDIDATE = 'execute candidate',
|
|
24
|
-
|
|
25
|
-
// Settings
|
|
26
|
-
SETTINGS = 'settings',
|
|
27
|
-
RESET_THEME = 'reset theme',
|
|
28
|
-
TOGGLE_DARK_MODE = 'toggle dark mode',
|
|
29
|
-
TOGGLE_DEBUG_MODE = 'toggle debug mode',
|
|
30
|
-
SELECT_THEME = 'select theme',
|
|
31
|
-
|
|
32
|
-
// Routing
|
|
33
|
-
OPEN_MY_NOTES = 'my notes',
|
|
34
|
-
OPEN_DASHBOARD = 'dashboard',
|
|
35
|
-
OPEN_PUBLIC_NOTE_LIST = 'public note list',
|
|
36
|
-
OPEN_NOTE_EDITOR = 'edit mode',
|
|
37
|
-
OPEN_NOTE_VIEWER = 'view mode',
|
|
38
|
-
OPEN_GRAPH = 'graph',
|
|
39
|
-
OPEN_EXTENSIONS = 'extensions',
|
|
40
|
-
|
|
41
|
-
// Native mobile specific
|
|
42
|
-
SELECT_FILE_PATH = 'select file path',
|
|
43
|
-
PICK_SYNC_DIR = 'pick sync dir',
|
|
44
|
-
}
|
package/models/editor.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { OrgNode } from 'org-mode-ast';
|
|
2
|
-
import type { Component } from 'vue';
|
|
3
|
-
import type { EditorView } from '@codemirror/view';
|
|
4
|
-
import type { Extension } from '@codemirror/state';
|
|
5
|
-
import { InlineEmbeddedWidget } from './widget';
|
|
6
|
-
|
|
7
|
-
interface DynamicComponent {
|
|
8
|
-
mount: (
|
|
9
|
-
cmp: Component,
|
|
10
|
-
wrap: Element,
|
|
11
|
-
props?: { [key: string]: unknown }
|
|
12
|
-
) => {
|
|
13
|
-
destroy: () => void;
|
|
14
|
-
refresh: (...args: unknown[]) => void;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface EditorExtensionParams {
|
|
19
|
-
orgNodeGetter: () => OrgNode;
|
|
20
|
-
readonly: boolean;
|
|
21
|
-
showSpecialSymbols?: boolean;
|
|
22
|
-
dynamicComponent: DynamicComponent;
|
|
23
|
-
foldWidget?: InlineEmbeddedWidget;
|
|
24
|
-
editorViewGetter: () => EditorView;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type EditorExtension = (params: EditorExtensionParams) => Extension;
|
package/models/encryption.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ModelsPublicNoteEncryptionTypeEnum } from '../remote-api';
|
|
2
|
-
|
|
3
|
-
export interface OrgNoteGpgEncryption {
|
|
4
|
-
type: typeof ModelsPublicNoteEncryptionTypeEnum.GpgKeys;
|
|
5
|
-
privateKey: string;
|
|
6
|
-
publicKey: string;
|
|
7
|
-
privateKeyPassphrase?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface OrgNotePasswordEncryption {
|
|
11
|
-
type: typeof ModelsPublicNoteEncryptionTypeEnum.GpgPassword;
|
|
12
|
-
password: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface OrgNoteDisabledEncryption {
|
|
16
|
-
type: typeof ModelsPublicNoteEncryptionTypeEnum.Disabled;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type OrgNoteEncryption =
|
|
20
|
-
| OrgNoteGpgEncryption
|
|
21
|
-
| OrgNotePasswordEncryption
|
|
22
|
-
| OrgNoteDisabledEncryption;
|
package/models/extension.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { OrgNoteApi } from '../api';
|
|
2
|
-
|
|
3
|
-
export interface ExtensionManifest {
|
|
4
|
-
/* Should be unique in the extension repo */
|
|
5
|
-
name: string;
|
|
6
|
-
version: string;
|
|
7
|
-
category: 'theme' | 'extension' | 'language pack' | 'other';
|
|
8
|
-
/* OrgNote api semver, 0.13.4 for example */
|
|
9
|
-
apiVersion?: string;
|
|
10
|
-
author?: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
keywords?: string[];
|
|
13
|
-
// Repository url
|
|
14
|
-
sourceType: 'git' | 'file' | 'builtin';
|
|
15
|
-
/* Default value is README.org */
|
|
16
|
-
readmeFilePath?: string;
|
|
17
|
-
/* WIP */
|
|
18
|
-
permissions?: Array<'files' | 'personal info' | '*' | 'third party'>;
|
|
19
|
-
reloadRequired?: boolean;
|
|
20
|
-
sourceUrl?: string;
|
|
21
|
-
sponsor?: string[];
|
|
22
|
-
development?: boolean;
|
|
23
|
-
icon?: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface Extension {
|
|
27
|
-
[key: string]: unknown;
|
|
28
|
-
|
|
29
|
-
onMounted: (api: OrgNoteApi) => Promise<void>;
|
|
30
|
-
onUnmounted?: (api: OrgNoteApi) => Promise<void>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface ExtensionMeta {
|
|
34
|
-
manifest: ExtensionManifest;
|
|
35
|
-
uploaded?: boolean;
|
|
36
|
-
active?: boolean;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface StoredExtension extends ExtensionMeta {
|
|
40
|
-
module?: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface ActiveExtension extends ExtensionMeta {
|
|
44
|
-
module: Extension;
|
|
45
|
-
}
|
package/models/index.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './note';
|
|
2
|
-
export * from './command';
|
|
3
|
-
export * from './completion';
|
|
4
|
-
export * from './extension';
|
|
5
|
-
export * from './theme-variables';
|
|
6
|
-
export * from './widget';
|
|
7
|
-
export * from './modal';
|
|
8
|
-
export * from './widget-type';
|
|
9
|
-
export * from './editor';
|
|
10
|
-
export * from './default-commands';
|
|
11
|
-
export * from './encryption';
|
package/models/modal.ts
DELETED
package/models/note.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { ModelsPublicNote, ModelsPublicUser } from '../remote-api';
|
|
2
|
-
|
|
3
|
-
export interface NotesFilter {
|
|
4
|
-
searchText?: string;
|
|
5
|
-
userId?: string;
|
|
6
|
-
limit?: number;
|
|
7
|
-
offset?: number;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface NotePreview {
|
|
11
|
-
id: ModelsPublicNote['id'];
|
|
12
|
-
meta: ModelsPublicNote['meta'];
|
|
13
|
-
createdAt: ModelsPublicNote['createdAt'];
|
|
14
|
-
updatedAt: ModelsPublicNote['updatedAt'];
|
|
15
|
-
filePath: ModelsPublicNote['filePath'];
|
|
16
|
-
isMy: ModelsPublicNote['isMy'];
|
|
17
|
-
author?: ModelsPublicUser;
|
|
18
|
-
bookmarked?: boolean;
|
|
19
|
-
encrypted?: boolean;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface Note extends ModelsPublicNote {
|
|
23
|
-
deleted?: Date;
|
|
24
|
-
bookmarked?: boolean;
|
|
25
|
-
encrypted?: boolean;
|
|
26
|
-
}
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is generated by the script `collect-css-variables.js`.
|
|
3
|
-
* Do not edit it manually.
|
|
4
|
-
**/
|
|
5
|
-
|
|
6
|
-
export enum ThemeVariable {
|
|
7
|
-
red = 'red',
|
|
8
|
-
orange = 'orange',
|
|
9
|
-
green = 'green',
|
|
10
|
-
teal = 'teal',
|
|
11
|
-
yellow = 'yellow',
|
|
12
|
-
blue = 'blue',
|
|
13
|
-
darkBlue = 'darkBlue',
|
|
14
|
-
magenta = 'magenta',
|
|
15
|
-
violet = 'violet',
|
|
16
|
-
cyan = 'cyan',
|
|
17
|
-
darkCyan = 'darkCyan',
|
|
18
|
-
white = 'white',
|
|
19
|
-
bg = 'bg',
|
|
20
|
-
bgAlt = 'bgAlt',
|
|
21
|
-
bgAlt2 = 'bgAlt2',
|
|
22
|
-
fg = 'fg',
|
|
23
|
-
fgAlt = 'fgAlt',
|
|
24
|
-
base0 = 'base0',
|
|
25
|
-
base1 = 'base1',
|
|
26
|
-
base2 = 'base2',
|
|
27
|
-
base3 = 'base3',
|
|
28
|
-
base4 = 'base4',
|
|
29
|
-
base5 = 'base5',
|
|
30
|
-
base6 = 'base6',
|
|
31
|
-
base7 = 'base7',
|
|
32
|
-
base8 = 'base8',
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export enum CSSVariable {
|
|
36
|
-
bg = 'bg',
|
|
37
|
-
fg = 'fg',
|
|
38
|
-
dur = 'dur',
|
|
39
|
-
easyTableHeaderBackgroundColor = 'easyTableHeaderBackgroundColor',
|
|
40
|
-
easyTableHeaderFontColor = 'easyTableHeaderFontColor',
|
|
41
|
-
easyTableBodyRowBackgroundColor = 'easyTableBodyRowBackgroundColor',
|
|
42
|
-
easyTableBodyRowFontColor = 'easyTableBodyRowFontColor',
|
|
43
|
-
easyTableBodyRowHoverBackgroundColor = 'easyTableBodyRowHoverBackgroundColor',
|
|
44
|
-
easyTableFooterBackgroundColor = 'easyTableFooterBackgroundColor',
|
|
45
|
-
easyTableFooterFontColor = 'easyTableFooterFontColor',
|
|
46
|
-
easyTableBodyRowHoverFontColor = 'easyTableBodyRowHoverFontColor',
|
|
47
|
-
easyTableRowBorder = 'easyTableRowBorder',
|
|
48
|
-
easyTableBorder = 'easyTableBorder',
|
|
49
|
-
easyTableMessageFontColor = 'easyTableMessageFontColor',
|
|
50
|
-
btnFlatSize = 'btnFlatSize',
|
|
51
|
-
btnFlatBorder = 'btnFlatBorder',
|
|
52
|
-
btnFlatBorderRadius = 'btnFlatBorderRadius',
|
|
53
|
-
btnFlatBoxShadow = 'btnFlatBoxShadow',
|
|
54
|
-
btnMainColor = 'btnMainColor',
|
|
55
|
-
btnSocialSize = 'btnSocialSize',
|
|
56
|
-
btnSocialBackground = 'btnSocialBackground',
|
|
57
|
-
checkboxColor = 'checkboxColor',
|
|
58
|
-
editorFontFamily = 'editorFontFamily',
|
|
59
|
-
flexGapMd = 'flexGapMd',
|
|
60
|
-
flexGapSm = 'flexGapSm',
|
|
61
|
-
inlineCodeBackground = 'inlineCodeBackground',
|
|
62
|
-
inlineCodeFontColor = 'inlineCodeFontColor',
|
|
63
|
-
scrollBarWidth = 'scrollBarWidth',
|
|
64
|
-
scrollBarColor = 'scrollBarColor',
|
|
65
|
-
fontSizeSm = 'fontSizeSm',
|
|
66
|
-
fontSizeMd = 'fontSizeMd',
|
|
67
|
-
fontSizeLg = 'fontSizeLg',
|
|
68
|
-
headlineMargin = 'headlineMargin',
|
|
69
|
-
paragraphFontSize = 'paragraphFontSize',
|
|
70
|
-
mainFontFamily = 'mainFontFamily',
|
|
71
|
-
editorFontFamilyMain = 'editorFontFamilyMain',
|
|
72
|
-
paragraphFontFamily = 'paragraphFontFamily',
|
|
73
|
-
headlineFontFamily = 'headlineFontFamily',
|
|
74
|
-
codeFontFamily = 'codeFontFamily',
|
|
75
|
-
descriptionFontFamily = 'descriptionFontFamily',
|
|
76
|
-
descriptionFontSize = 'descriptionFontSize',
|
|
77
|
-
descriptionFontStyle = 'descriptionFontStyle',
|
|
78
|
-
descriptionFontColor = 'descriptionFontColor',
|
|
79
|
-
descriptionPadding = 'descriptionPadding',
|
|
80
|
-
codeFontSize = 'codeFontSize',
|
|
81
|
-
headlineFontWeight = 'headlineFontWeight',
|
|
82
|
-
fontColorAction = 'fontColorAction',
|
|
83
|
-
fontSm = 'fontSm',
|
|
84
|
-
fontMd = 'fontMd',
|
|
85
|
-
fontLg = 'fontLg',
|
|
86
|
-
ulFontSize = 'ulFontSize',
|
|
87
|
-
ulLineHeight = 'ulLineHeight',
|
|
88
|
-
ulFontFamily = 'ulFontFamily',
|
|
89
|
-
topBarHeight = 'topBarHeight',
|
|
90
|
-
contentMaxWidth = 'contentMaxWidth',
|
|
91
|
-
modelineHeight = 'modelineHeight',
|
|
92
|
-
modelinePadding = 'modelinePadding',
|
|
93
|
-
modelineBackground = 'modelineBackground',
|
|
94
|
-
cardBackgroundColor = 'cardBackgroundColor',
|
|
95
|
-
shadowMain = 'shadowMain',
|
|
96
|
-
sidebarWidth = 'sidebarWidth',
|
|
97
|
-
actionPaneOpenedWidth = 'actionPaneOpenedWidth',
|
|
98
|
-
footerHeight = 'footerHeight',
|
|
99
|
-
publicPreviewImageWidth = 'publicPreviewImageWidth',
|
|
100
|
-
publicPreviewImageHeight = 'publicPreviewImageHeight',
|
|
101
|
-
publicPreviewMaxHeight = 'publicPreviewMaxHeight',
|
|
102
|
-
completionItemMinHeight = 'completionItemMinHeight',
|
|
103
|
-
completionItemPadding = 'completionItemPadding',
|
|
104
|
-
completionItemMargin = 'completionItemMargin',
|
|
105
|
-
completionItemHoverBackground = 'completionItemHoverBackground',
|
|
106
|
-
completionItemHoverColor = 'completionItemHoverColor',
|
|
107
|
-
completionFloatTop = 'completionFloatTop',
|
|
108
|
-
completionBorderRadius = 'completionBorderRadius',
|
|
109
|
-
completionWidth = 'completionWidth',
|
|
110
|
-
completionMaxWidth = 'completionMaxWidth',
|
|
111
|
-
completionBorder = 'completionBorder',
|
|
112
|
-
completionBoxShadow = 'completionBoxShadow',
|
|
113
|
-
completionInputHeight = 'completionInputHeight',
|
|
114
|
-
completionContainerMargin = 'completionContainerMargin',
|
|
115
|
-
menuPadding = 'menuPadding',
|
|
116
|
-
fileUploaderBorderWidth = 'fileUploaderBorderWidth',
|
|
117
|
-
fileUploaderBorderStyle = 'fileUploaderBorderStyle',
|
|
118
|
-
fileUploaderBorderColor = 'fileUploaderBorderColor',
|
|
119
|
-
fileUploaderBg = 'fileUploaderBg',
|
|
120
|
-
fileUploaderOpacity = 'fileUploaderOpacity',
|
|
121
|
-
notePreviewLinkMaxWidth = 'notePreviewLinkMaxWidth',
|
|
122
|
-
notePreviewLinkHeight = 'notePreviewLinkHeight',
|
|
123
|
-
btnActionShadow = 'btnActionShadow',
|
|
124
|
-
btnActionBorder = 'btnActionBorder',
|
|
125
|
-
btnActionBorderColor = 'btnActionBorderColor',
|
|
126
|
-
btnActionPadding = 'btnActionPadding',
|
|
127
|
-
btnActionRadius = 'btnActionRadius',
|
|
128
|
-
btnActionFireColor = 'btnActionFireColor',
|
|
129
|
-
btnActionFireBorderColor = 'btnActionFireBorderColor',
|
|
130
|
-
btnActionMd = 'btnActionMd',
|
|
131
|
-
btnActionSm = 'btnActionSm',
|
|
132
|
-
btnActionLg = 'btnActionLg',
|
|
133
|
-
btnActionColor = 'btnActionColor',
|
|
134
|
-
btnActionBg = 'btnActionBg',
|
|
135
|
-
miniBufferBackground = 'miniBufferBackground',
|
|
136
|
-
miniBufferFontColor = 'miniBufferFontColor',
|
|
137
|
-
miniBufferBorderTop = 'miniBufferBorderTop',
|
|
138
|
-
miniBufferMaxHeight = 'miniBufferMaxHeight',
|
|
139
|
-
tagHoverBackground = 'tagHoverBackground',
|
|
140
|
-
tagHoverColor = 'tagHoverColor',
|
|
141
|
-
toolbarBorderTop = 'toolbarBorderTop',
|
|
142
|
-
toolbarHoverColor = 'toolbarHoverColor',
|
|
143
|
-
headerbarHeight = 'headerbarHeight',
|
|
144
|
-
headerbarBorderRadius = 'headerbarBorderRadius',
|
|
145
|
-
headerbarBackgroundColor = 'headerbarBackgroundColor',
|
|
146
|
-
headerbarColor = 'headerbarColor',
|
|
147
|
-
headerbarBorder = 'headerbarBorder',
|
|
148
|
-
fileItemBgHover = 'fileItemBgHover',
|
|
149
|
-
fileItemColorHover = 'fileItemColorHover',
|
|
150
|
-
fileItemHeight = 'fileItemHeight',
|
|
151
|
-
iconBtnColor = 'iconBtnColor',
|
|
152
|
-
iconBtnHoverColor = 'iconBtnHoverColor',
|
|
153
|
-
modalMaxHeight = 'modalMaxHeight',
|
|
154
|
-
modalMaxWidth = 'modalMaxWidth',
|
|
155
|
-
modalPadding = 'modalPadding',
|
|
156
|
-
blockPaddingSm = 'blockPaddingSm',
|
|
157
|
-
blockPaddingMd = 'blockPaddingMd',
|
|
158
|
-
blockPaddingLg = 'blockPaddingLg',
|
|
159
|
-
blockMarginMd = 'blockMarginMd',
|
|
160
|
-
blockMarginSm = 'blockMarginSm',
|
|
161
|
-
blockBorderRadiusMd = 'blockBorderRadiusMd',
|
|
162
|
-
blockBorderRadiusSm = 'blockBorderRadiusSm',
|
|
163
|
-
itemDefaultRadius = 'itemDefaultRadius',
|
|
164
|
-
searchIcnSize = 'searchIcnSize',
|
|
165
|
-
gapMd = 'gapMd',
|
|
166
|
-
gapSm = 'gapSm',
|
|
167
|
-
gapXs = 'gapXs',
|
|
168
|
-
srcBlockHeaderPaddingY = 'srcBlockHeaderPaddingY',
|
|
169
|
-
srcBlockFooterPaddingY = 'srcBlockFooterPaddingY',
|
|
170
|
-
srcBlockPaddingX = 'srcBlockPaddingX',
|
|
171
|
-
srcBlockPaddingY = 'srcBlockPaddingY',
|
|
172
|
-
srcBlockMarginY = 'srcBlockMarginY',
|
|
173
|
-
pagePadding = 'pagePadding',
|
|
174
|
-
editorLineHeight = 'editorLineHeight',
|
|
175
|
-
editorHeadlineLineHeight = 'editorHeadlineLineHeight',
|
|
176
|
-
editorDefaultLineHeight = 'editorDefaultLineHeight',
|
|
177
|
-
editorPaddingBottom = 'editorPaddingBottom',
|
|
178
|
-
editorCursorColor = 'editorCursorColor',
|
|
179
|
-
editorSelectionBgColor = 'editorSelectionBgColor',
|
|
180
|
-
editorSelectionColor = 'editorSelectionColor',
|
|
181
|
-
editorGutterColor = 'editorGutterColor',
|
|
182
|
-
editorGutterHoverColor = 'editorGutterHoverColor',
|
|
183
|
-
editorFoldPlaceholderColor = 'editorFoldPlaceholderColor',
|
|
184
|
-
editorActiveLineBgColor = 'editorActiveLineBgColor',
|
|
185
|
-
editorCaretColor = 'editorCaretColor',
|
|
186
|
-
orgListItemBulletMarginLeft = 'orgListItemBulletMarginLeft',
|
|
187
|
-
devicePaddingBottom = 'devicePaddingBottom',
|
|
188
|
-
graphNodeColor = 'graphNodeColor',
|
|
189
|
-
graphEdgeColor = 'graphEdgeColor',
|
|
190
|
-
graphActiveColor = 'graphActiveColor',
|
|
191
|
-
inputHeight = 'inputHeight',
|
|
192
|
-
inputLgHeight = 'inputLgHeight',
|
|
193
|
-
borderMain = 'borderMain',
|
|
194
|
-
}
|
package/models/vue-component.ts
DELETED
package/models/widget-type.ts
DELETED
package/models/widget.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { ChangeSpec } from '@codemirror/state';
|
|
2
|
-
import { EditorView } from '@codemirror/view';
|
|
3
|
-
import type { NodeType, OrgNode } from 'org-mode-ast';
|
|
4
|
-
|
|
5
|
-
export type EmbeddedWidget = {
|
|
6
|
-
destroy: () => void;
|
|
7
|
-
refresh?: (...args: unknown[]) => void;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export interface WidgetBuilderParams {
|
|
11
|
-
wrap: HTMLElement;
|
|
12
|
-
orgNode: OrgNode;
|
|
13
|
-
rootNodeSrc: () => OrgNode;
|
|
14
|
-
onUpdateFn?: (newVal: string) => void;
|
|
15
|
-
editorView: EditorView;
|
|
16
|
-
readonly?: boolean;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type WidgetBuilder = (params: WidgetBuilderParams) => EmbeddedWidget;
|
|
20
|
-
|
|
21
|
-
export interface CommonEmbeddedWidget {
|
|
22
|
-
satisfied?: (orgNode: OrgNode) => boolean;
|
|
23
|
-
widgetBuilder?: WidgetBuilder;
|
|
24
|
-
viewUpdater?: (orgNode: OrgNode, newVal: string) => ViewUpdateSchema;
|
|
25
|
-
ignoreEvent?: boolean;
|
|
26
|
-
showRangeOffset?: [number, number];
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface MultilineEmbeddedWidget extends CommonEmbeddedWidget {
|
|
30
|
-
widgetBuilder: WidgetBuilder;
|
|
31
|
-
suppressEdit?: boolean;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type MultilineEmbeddedWidgets = {
|
|
35
|
-
[key in NodeType]?: MultilineEmbeddedWidget;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export type ViewUpdateSchema = ChangeSpec;
|
|
39
|
-
|
|
40
|
-
export interface InlineEmbeddedWidget extends CommonEmbeddedWidget {
|
|
41
|
-
classBuilder?: (orgNode: OrgNode) => string;
|
|
42
|
-
decorationType: 'mark' | 'widget' | 'replace' | 'line';
|
|
43
|
-
ignoreEditing?: boolean;
|
|
44
|
-
side?: number;
|
|
45
|
-
wrapComponent?: string;
|
|
46
|
-
inclusive?: boolean;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export type InlineEmbeddedWidgets = {
|
|
50
|
-
[key in NodeType]?: InlineEmbeddedWidget;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export type EmbeddedWidgetBuilder = (
|
|
54
|
-
wrap: HTMLElement,
|
|
55
|
-
dynamicProps?: { [key: string]: unknown }
|
|
56
|
-
) => EmbeddedWidget;
|
|
57
|
-
|
|
58
|
-
export type OrgLineClass = { class: string | ((orgNode: OrgNode) => string) };
|
|
59
|
-
export type OrgLineClasses = { [key in NodeType]?: OrgLineClass };
|
package/remote-api/.gitignore
DELETED
package/remote-api/.npmignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
7.7.0
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# OpenAPI Generator Ignore
|
|
2
|
-
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
-
|
|
4
|
-
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
-
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
-
|
|
7
|
-
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
-
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
9
|
-
#ApiClient.cs
|
|
10
|
-
|
|
11
|
-
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
-
#foo/*/qux
|
|
13
|
-
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
-
|
|
15
|
-
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
-
#foo/**/qux
|
|
17
|
-
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
-
|
|
19
|
-
# You can also negate patterns with an exclamation (!).
|
|
20
|
-
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
-
#docs/*.md
|
|
22
|
-
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
-
#!docs/README.md
|