orgnote-api 0.20.1 → 0.40.0
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/api.d.ts +93 -98
- package/constants/{command-groups.contant.d.ts → command-groups.d.ts} +2 -1
- package/constants/{command-groups.contant.js → command-groups.js} +2 -0
- package/constants/extension-errors.d.ts +9 -0
- package/constants/extension-errors.js +18 -0
- package/constants/file-guard-errors.d.ts +8 -0
- package/constants/file-guard-errors.js +18 -0
- package/constants/git-errors.d.ts +9 -0
- package/constants/git-errors.js +18 -0
- package/constants/i18n-keys.d.ts +371 -0
- package/constants/i18n-keys.js +158 -0
- package/constants/index.d.ts +9 -1
- package/constants/index.js +9 -1
- package/constants/oauth-providers.d.ts +1 -0
- package/constants/oauth-providers.js +1 -0
- package/constants/route-names.d.ts +36 -0
- package/constants/route-names.js +37 -0
- package/constants/route-paths.d.ts +5 -0
- package/constants/route-paths.js +4 -0
- package/constants/style-sizes.d.ts +1 -0
- package/constants/style-sizes.js +1 -0
- package/encryption/__tests__/encryption.spec.js +4 -5
- package/encryption/__tests__/note-encryption.spec.js +46 -348
- package/encryption/encryption.d.ts +9 -4
- package/encryption/encryption.js +25 -5
- package/encryption/note-encryption.d.ts +1 -1
- package/encryption/note-encryption.js +6 -6
- package/files-api.d.ts +0 -1
- package/index.d.ts +4 -1
- package/index.js +4 -1
- package/mappers/orgnode-to-note.d.ts +2 -2
- package/mappers/orgnode-to-note.js +3 -2
- package/models/auth-store.d.ts +3 -3
- package/models/buffer-store.d.ts +14 -0
- package/models/buffer.d.ts +24 -0
- package/models/colors.d.ts +1 -0
- package/models/command.d.ts +13 -8
- package/models/commands-group-store.d.ts +11 -0
- package/models/commands-store.d.ts +13 -0
- package/models/completion-store.d.ts +14 -0
- package/models/completion.d.ts +16 -7
- package/models/config-store.d.ts +9 -0
- package/models/confirmation-modal.d.ts +11 -0
- package/models/context-menu-store.d.ts +10 -0
- package/models/cron-store.d.ts +21 -0
- package/models/cron-task.d.ts +30 -0
- package/models/css-utils.d.ts +17 -0
- package/models/default-commands.d.ts +52 -3
- package/models/default-commands.js +59 -2
- package/models/encryption-store.d.ts +10 -0
- package/models/encryption-store.js +1 -0
- package/models/encryption.d.ts +54 -11
- package/models/encryption.js +28 -1
- package/models/extension-registry-store.d.ts +9 -0
- package/models/extension-registry-store.js +1 -0
- package/models/extension-store.d.ts +18 -0
- package/models/extension-store.js +1 -0
- package/models/extension.d.ts +96 -24
- package/models/extension.js +88 -1
- package/models/file-guard-store.d.ts +14 -0
- package/models/file-guard-store.js +1 -0
- package/models/file-guard.d.ts +27 -0
- package/models/file-guard.js +1 -0
- package/models/{file-cache.d.ts → file-info.d.ts} +1 -1
- package/models/file-info.js +1 -0
- package/models/file-manager-store.d.ts +10 -12
- package/models/file-opener-store.d.ts +6 -4
- package/models/file-system-manager-store.d.ts +13 -0
- package/models/file-system-manager-store.js +1 -0
- package/models/file-system-store.d.ts +19 -0
- package/models/file-system-store.js +1 -0
- package/models/file-system.d.ts +32 -5
- package/models/file-system.js +2 -0
- package/models/file-upload.d.ts +6 -0
- package/models/file-upload.js +1 -0
- package/models/file-watcher-store.d.ts +18 -0
- package/models/file-watcher-store.js +1 -0
- package/models/files-store.d.ts +2 -2
- package/models/git-store.d.ts +12 -0
- package/models/git-store.js +1 -0
- package/models/git.d.ts +47 -0
- package/models/git.js +1 -0
- package/models/i18n-keys.d.ts +2 -0
- package/models/i18n-keys.js +1 -0
- package/models/index.d.ts +56 -2
- package/models/index.js +59 -2
- package/models/layout-snapshot-repository.d.ts +14 -0
- package/models/layout-snapshot-repository.js +1 -0
- package/models/layout-store.d.ts +17 -0
- package/models/layout-store.js +1 -0
- package/models/layout.d.ts +16 -0
- package/models/layout.js +1 -0
- package/models/log-repository.d.ts +17 -0
- package/models/log-repository.js +1 -0
- package/models/log-store.d.ts +15 -0
- package/models/log-store.js +1 -0
- package/models/log.d.ts +12 -0
- package/models/log.js +1 -0
- package/models/logger.d.ts +8 -0
- package/models/logger.js +1 -0
- package/models/menu-action.d.ts +18 -0
- package/models/menu-action.js +1 -0
- package/models/modal-store.d.ts +16 -0
- package/models/modal-store.js +1 -0
- package/models/modal.d.ts +10 -2
- package/models/note.d.ts +30 -13
- package/models/notification-config.d.ts +14 -0
- package/models/notification-config.js +1 -0
- package/models/notifications-store.d.ts +20 -0
- package/models/notifications-store.js +1 -0
- package/models/oauth-provider.d.ts +2 -1
- package/models/orgnote-config.d.ts +80 -0
- package/models/orgnote-config.js +42 -0
- package/models/orgnote-url.d.ts +6 -0
- package/models/orgnote-url.js +1 -0
- package/models/pane-snapshot-repository.d.ts +0 -0
- package/models/pane-snapshot-repository.js +0 -0
- package/models/pane.d.ts +38 -0
- package/models/pane.js +1 -0
- package/models/panes-store.d.ts +30 -0
- package/models/panes-store.js +1 -0
- package/models/platform-detection.d.ts +11 -0
- package/models/platform-detection.js +1 -0
- package/models/platform-specific.d.ts +1 -0
- package/models/platform-specific.js +1 -0
- package/models/platform.d.ts +2 -0
- package/models/platform.js +1 -0
- package/models/queue-store.d.ts +49 -0
- package/models/queue-store.js +1 -0
- package/models/queue-task.d.ts +15 -0
- package/models/queue-task.js +1 -0
- package/models/repositories.d.ts +58 -38
- package/models/screen-detection.d.ts +10 -0
- package/models/screen-detection.js +1 -0
- package/models/settings-store.d.ts +12 -0
- package/models/settings-store.js +1 -0
- package/models/settings-ui-store.d.ts +7 -0
- package/models/settings-ui-store.js +1 -0
- package/models/sidebar-store.d.ts +22 -0
- package/models/sidebar-store.js +1 -0
- package/models/splash-screen.d.ts +13 -0
- package/models/splash-screen.js +1 -0
- package/models/store.d.ts +1 -1
- package/models/style-size.d.ts +2 -0
- package/models/style-size.js +1 -0
- package/models/style-variant.d.ts +1 -0
- package/models/style-variant.js +1 -0
- package/models/sync-store.d.ts +8 -6
- package/models/sync.d.ts +0 -5
- package/models/system-info.d.ts +47 -0
- package/models/system-info.js +1 -0
- package/models/theme-store.d.ts +16 -0
- package/models/theme-store.js +1 -0
- package/models/theme-variables.d.ts +4 -189
- package/models/theme-variables.js +2 -191
- package/models/toolbar-store.d.ts +9 -0
- package/models/toolbar-store.js +1 -0
- package/models/ui-store.d.ts +6 -0
- package/models/ui-store.js +1 -0
- package/models/user.d.ts +3 -4
- package/models/vue-component.d.ts +4 -2
- package/package-lock.json +5553 -0
- package/package.json +37 -26
- package/remote-api/api.d.ts +303 -684
- package/remote-api/api.js +199 -485
- package/remote-api/base.js +1 -1
- package/remote-api/common.d.ts +1 -1
- package/sync/__tests__/memory-state.spec.d.ts +1 -0
- package/sync/__tests__/memory-state.spec.js +49 -0
- package/sync/__tests__/plan.spec.d.ts +1 -0
- package/sync/__tests__/plan.spec.js +116 -0
- package/sync/create-sync-plan.d.ts +2 -0
- package/sync/create-sync-plan.js +13 -0
- package/sync/fetch.d.ts +8 -0
- package/sync/fetch.js +32 -0
- package/sync/index.d.ts +10 -0
- package/sync/index.js +9 -0
- package/sync/memory-state.d.ts +2 -0
- package/sync/memory-state.js +22 -0
- package/sync/operations/conflict.d.ts +10 -0
- package/sync/operations/conflict.js +56 -0
- package/sync/operations/delete-local.d.ts +2 -0
- package/sync/operations/delete-local.js +17 -0
- package/sync/operations/delete-remote.d.ts +2 -0
- package/sync/operations/delete-remote.js +26 -0
- package/sync/operations/download.d.ts +2 -0
- package/sync/operations/download.js +20 -0
- package/sync/operations/index.d.ts +5 -0
- package/sync/operations/index.js +5 -0
- package/sync/operations/synced-file.d.ts +14 -0
- package/sync/operations/synced-file.js +5 -0
- package/sync/operations/upload.d.ts +2 -0
- package/sync/operations/upload.js +30 -0
- package/sync/plan.d.ts +9 -0
- package/sync/plan.js +57 -0
- package/sync/recovery.d.ts +2 -0
- package/sync/recovery.js +6 -0
- package/sync/scan.d.ts +4 -0
- package/sync/scan.js +40 -0
- package/sync/types.d.ts +74 -0
- package/sync/types.js +7 -0
- package/sync/utils/__tests__/oldest-synced-at.spec.d.ts +1 -0
- package/sync/utils/__tests__/oldest-synced-at.spec.js +38 -0
- package/sync/utils/oldest-synced-at.d.ts +2 -0
- package/sync/utils/oldest-synced-at.js +9 -0
- package/types/index.d.ts +0 -0
- package/types/index.js +0 -0
- package/utils/__tests__/find-files-diff.spec.d.ts +1 -0
- package/{tools → utils}/__tests__/find-files-diff.spec.js +3 -3
- package/utils/__tests__/find-note-files-diff.spec.d.ts +1 -0
- package/{tools → utils}/__tests__/find-note-files-diff.spec.js +5 -5
- package/utils/__tests__/get-file-name.spec.d.ts +1 -0
- package/utils/__tests__/get-string-path.spec.d.ts +1 -0
- package/utils/__tests__/is-gpg-encrypted.spec.d.ts +1 -0
- package/utils/__tests__/is-org-file.spec.d.ts +1 -0
- package/utils/__tests__/join.spec.d.ts +1 -0
- package/utils/__tests__/join.spec.js +32 -0
- package/utils/__tests__/nullable-guards.spec.d.ts +1 -0
- package/utils/__tests__/nullable-guards.spec.js +44 -0
- package/utils/__tests__/parent-folder.spec.d.ts +1 -0
- package/utils/__tests__/read-org-files-recursively.spec.d.ts +1 -0
- package/utils/__tests__/split-path.spec.d.ts +1 -0
- package/utils/__tests__/to-absolute-path.spec.d.ts +1 -0
- package/utils/__tests__/to-absolute-path.spec.js +26 -0
- package/utils/__tests__/to-error.spec.d.ts +1 -0
- package/utils/__tests__/to-error.spec.js +112 -0
- package/utils/__tests__/with-root.spec.d.ts +1 -0
- package/utils/__tests__/with-root.spec.js +20 -0
- package/{tools → utils}/find-notes-files-diff.js +6 -3
- package/{tools → utils}/index.d.ts +4 -1
- package/{tools → utils}/index.js +4 -1
- package/utils/join-path.d.ts +1 -0
- package/utils/join-path.js +13 -0
- package/utils/nullable-guards.d.ts +2 -0
- package/utils/nullable-guards.js +6 -0
- package/utils/to-absolute-path.d.ts +2 -0
- package/utils/to-absolute-path.js +2 -0
- package/utils/to-error.d.ts +6 -0
- package/utils/to-error.js +33 -0
- package/utils/toml.d.ts +3 -0
- package/utils/toml.js +31 -0
- package/utils/with-root.d.ts +1 -0
- package/utils/with-root.js +6 -0
- package/websocket/client.d.ts +24 -0
- package/websocket/client.js +83 -0
- package/models/file-tree.d.ts +0 -12
- package/tools/__tests__/join.spec.js +0 -24
- package/tools/join-path.d.ts +0 -1
- package/tools/join-path.js +0 -7
- package/tools/mock-server.d.ts +0 -1
- package/tools/mock-server.js +0 -12
- /package/models/{file-cache.js → buffer-store.js} +0 -0
- /package/models/{file-tree.js → buffer.js} +0 -0
- /package/{tools/__tests__/find-files-diff.spec.d.ts → models/colors.js} +0 -0
- /package/{tools/__tests__/find-note-files-diff.spec.d.ts → models/commands-group-store.js} +0 -0
- /package/{tools/__tests__/get-file-name.spec.d.ts → models/commands-store.js} +0 -0
- /package/{tools/__tests__/get-string-path.spec.d.ts → models/completion-store.js} +0 -0
- /package/{tools/__tests__/is-gpg-encrypted.spec.d.ts → models/config-store.js} +0 -0
- /package/{tools/__tests__/is-org-file.spec.d.ts → models/confirmation-modal.js} +0 -0
- /package/{tools/__tests__/join.spec.d.ts → models/context-menu-store.js} +0 -0
- /package/{tools/__tests__/parent-folder.spec.d.ts → models/cron-store.js} +0 -0
- /package/{tools/__tests__/read-org-files-recursively.spec.d.ts → models/cron-task.js} +0 -0
- /package/{tools/__tests__/split-path.spec.d.ts → models/css-utils.js} +0 -0
- /package/{tools → utils}/__tests__/get-file-name.spec.js +0 -0
- /package/{tools → utils}/__tests__/get-string-path.spec.js +0 -0
- /package/{tools → utils}/__tests__/is-gpg-encrypted.spec.js +0 -0
- /package/{tools → utils}/__tests__/is-org-file.spec.js +0 -0
- /package/{tools → utils}/__tests__/parent-folder.spec.js +0 -0
- /package/{tools → utils}/__tests__/read-org-files-recursively.spec.js +0 -0
- /package/{tools → utils}/__tests__/split-path.spec.js +0 -0
- /package/{tools → utils}/find-notes-files-diff.d.ts +0 -0
- /package/{tools → utils}/get-file-name.d.ts +0 -0
- /package/{tools → utils}/get-file-name.js +0 -0
- /package/{tools → utils}/get-parent-dir.d.ts +0 -0
- /package/{tools → utils}/get-parent-dir.js +0 -0
- /package/{tools → utils}/get-string-path.d.ts +0 -0
- /package/{tools → utils}/get-string-path.js +0 -0
- /package/{tools → utils}/is-gpg-encrypted.d.ts +0 -0
- /package/{tools → utils}/is-gpg-encrypted.js +0 -0
- /package/{tools → utils}/is-org-file.d.ts +0 -0
- /package/{tools → utils}/is-org-file.js +0 -0
- /package/{tools → utils}/split-path.d.ts +0 -0
- /package/{tools → utils}/split-path.js +0 -0
package/api.d.ts
CHANGED
|
@@ -1,10 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { InlineEmbeddedWidget, MultilineEmbeddedWidget, OrgLineClass, SyncStoreDefinition, FileReaderStoreDefinition, CommandsStoreDefinition, CommandsGroupStoreDefinition, ModalStoreDefinition, SettingsStoreDefinition, SettingsUiStoreDefinition, MultipleUploadParams, UploadParams, CompletionStoreDefinition, PaneStoreDefinition, LayoutStoreDefinition, FileManagerStoreDefinition, UseScreenDetection, NotificationsStoreDefinition, BufferStoreDefinition, Repositories, LogStoreDefinition, UseSystemInfo, ContextMenuStoreDefinition, QueueStoreDefinition, FileGuardStoreDefinition, FileWatcherStoreDefinition, BuildOrgNoteUrl, AuthStoreDefinition } from './models/index.js';
|
|
2
|
+
import { WebSocketClient } from './websocket/client.js';
|
|
3
3
|
import { WidgetType } from './models/widget-type.js';
|
|
4
|
-
import type { Component } from 'vue';
|
|
5
4
|
import { NodeType } from 'org-mode-ast';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { ExtensionStoreDefinition } from './models/extension-store.js';
|
|
6
|
+
import { FileSystemStoreDefinition } from './models/file-system-store.js';
|
|
7
|
+
import { EncryptionStoreDefinition } from './models/encryption-store.js';
|
|
8
|
+
import { PlatformSpecificFn } from './models/platform-specific.js';
|
|
9
|
+
import { PlatformDetection, PlatformMatch } from './models/platform-detection.js';
|
|
10
|
+
import { UseSplashScreen } from './models/splash-screen.js';
|
|
11
|
+
import { GetCssVar, GetCssTheme, GetNumericCssVar, GetCssProperty, GetCssNumericProperty, ApplyCSSVariables, ResetCSSVariables, ApplyScopedStyles, RemoveScopedStyles } from './models/css-utils.js';
|
|
12
|
+
import { ThemeStoreDefinition } from './models/theme-store.js';
|
|
13
|
+
import { UseBackgroundSettings } from './models/ui-store.js';
|
|
14
|
+
import { SidebarStoreDefinition } from './models/sidebar-store.js';
|
|
15
|
+
import { Logger } from './models/logger.js';
|
|
16
|
+
import type { QVueGlobals } from 'quasar';
|
|
17
|
+
import { ToolbarStoreDefinition } from './models/toolbar-store.js';
|
|
18
|
+
import type { App } from 'vue';
|
|
19
|
+
import { UseConfirmationModal } from './models/confirmation-modal.js';
|
|
20
|
+
import { FileSystemManagerStoreDefinition } from './models/file-system-manager-store.js';
|
|
21
|
+
import { ConfigStoreDefinition } from './models/config-store.js';
|
|
22
|
+
import { Router } from 'vue-router';
|
|
23
|
+
import { CronStoreDefinition } from './models/cron-store.js';
|
|
24
|
+
import { GitStoreDefinition } from './models/git-store.js';
|
|
25
|
+
import { ExtensionRegistryStoreDefinition } from './models/extension-registry-store.js';
|
|
26
|
+
import { parseToml, stringifyToml } from './utils/index.js';
|
|
8
27
|
type WithNodeType<T> = {
|
|
9
28
|
nodeType: NodeType;
|
|
10
29
|
} & T;
|
|
@@ -15,104 +34,80 @@ export type WidgetMeta = ({
|
|
|
15
34
|
} & WithNodeType<MultilineEmbeddedWidget>) | ({
|
|
16
35
|
type: WidgetType.LineClass;
|
|
17
36
|
} & WithNodeType<OrgLineClass>);
|
|
37
|
+
export type Infrastructure = Repositories & {
|
|
38
|
+
websocket: WebSocketClient;
|
|
39
|
+
};
|
|
18
40
|
export interface OrgNoteApi {
|
|
19
41
|
[key: string]: unknown;
|
|
20
|
-
|
|
21
|
-
system: {
|
|
22
|
-
reload: (params?: {
|
|
23
|
-
verbose: boolean;
|
|
24
|
-
}) => Promise<void>;
|
|
25
|
-
setNewFilesAvailable: (status?: boolean) => void;
|
|
26
|
-
};
|
|
27
|
-
navigation: {
|
|
28
|
-
openNote: (id: string) => Promise<void | NavigationFailure>;
|
|
29
|
-
editNote: (id: string) => Promise<void | NavigationFailure>;
|
|
30
|
-
};
|
|
31
|
-
ui: {
|
|
32
|
-
applyTheme: (theme: {
|
|
33
|
-
[key in ThemeVariable]: string | number;
|
|
34
|
-
}) => void;
|
|
35
|
-
applyCssVariables: (styles: {
|
|
36
|
-
[key in CSSVariable]: string | number;
|
|
37
|
-
}) => void;
|
|
38
|
-
setThemeByMode: (themeName?: string) => void;
|
|
39
|
-
setDarkTheme: (themeName?: string) => void;
|
|
40
|
-
setLightTheme: (themeName?: string) => void;
|
|
41
|
-
applyStyles: (scopeName: string, styles: string) => void;
|
|
42
|
-
removeStyles: (scopeName: string) => void;
|
|
43
|
-
resetTheme: () => void;
|
|
44
|
-
openModal: (modal: Modal) => void;
|
|
45
|
-
};
|
|
46
|
-
interaction: {
|
|
47
|
-
confirm: (title: string, message: string) => Promise<boolean>;
|
|
48
|
-
};
|
|
49
|
-
currentNote: {
|
|
50
|
-
get: () => Note;
|
|
51
|
-
};
|
|
52
|
-
editor: {
|
|
53
|
-
extensions: {
|
|
54
|
-
add: (...extension: EditorExtension[]) => void;
|
|
55
|
-
remove: (...extension: EditorExtension[]) => void;
|
|
56
|
-
};
|
|
57
|
-
widgets: {
|
|
58
|
-
add: (...widgetMeta: WidgetMeta[]) => void;
|
|
59
|
-
createWidgetBuilder: (cmp: Component, props?: {
|
|
60
|
-
[key: string]: unknown;
|
|
61
|
-
}) => WidgetBuilder;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
42
|
+
infrastructure: Infrastructure;
|
|
64
43
|
core: {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
44
|
+
useCommands: CommandsStoreDefinition;
|
|
45
|
+
useCommandsGroup: CommandsGroupStoreDefinition;
|
|
46
|
+
useExtensions: ExtensionStoreDefinition;
|
|
47
|
+
useFileSystem: FileSystemStoreDefinition;
|
|
48
|
+
useFileWatcher: FileWatcherStoreDefinition;
|
|
49
|
+
useEncryption: EncryptionStoreDefinition;
|
|
50
|
+
useSettings: SettingsStoreDefinition;
|
|
51
|
+
useConfig: ConfigStoreDefinition;
|
|
52
|
+
useQuasar: () => QVueGlobals;
|
|
53
|
+
useCompletion: CompletionStoreDefinition;
|
|
54
|
+
usePane: PaneStoreDefinition;
|
|
55
|
+
useLayout: LayoutStoreDefinition;
|
|
56
|
+
useFileSystemManager: FileSystemManagerStoreDefinition;
|
|
57
|
+
useFileManager: FileManagerStoreDefinition;
|
|
58
|
+
useFileReader: FileReaderStoreDefinition;
|
|
59
|
+
useNotifications: NotificationsStoreDefinition;
|
|
60
|
+
useBuffers: BufferStoreDefinition;
|
|
61
|
+
useSystemInfo: UseSystemInfo;
|
|
62
|
+
useLog: LogStoreDefinition;
|
|
63
|
+
useQueue: QueueStoreDefinition;
|
|
64
|
+
useCron: CronStoreDefinition;
|
|
65
|
+
useGit: GitStoreDefinition;
|
|
66
|
+
useExtensionRegistry: ExtensionRegistryStoreDefinition;
|
|
67
|
+
useFileGuard: FileGuardStoreDefinition;
|
|
68
|
+
useAuth: AuthStoreDefinition;
|
|
69
|
+
useSync: SyncStoreDefinition;
|
|
70
|
+
app: App;
|
|
71
|
+
};
|
|
72
|
+
utils: {
|
|
73
|
+
platform: PlatformDetection;
|
|
74
|
+
platformMatch: PlatformMatch;
|
|
75
|
+
clientOnly: PlatformSpecificFn;
|
|
76
|
+
mobileOnly: PlatformSpecificFn;
|
|
77
|
+
androidOnly: PlatformSpecificFn;
|
|
78
|
+
desktopOnly: PlatformSpecificFn;
|
|
79
|
+
serverOnly: PlatformSpecificFn;
|
|
80
|
+
getCssVar: GetCssVar;
|
|
81
|
+
getCssTheme: GetCssTheme;
|
|
82
|
+
getNumericCssVar: GetNumericCssVar;
|
|
83
|
+
getCssProperty: GetCssProperty;
|
|
84
|
+
getCssNumericProperty: GetCssNumericProperty;
|
|
85
|
+
applyCSSVariables: ApplyCSSVariables<string>;
|
|
86
|
+
resetCSSVariables: ResetCSSVariables<string>;
|
|
87
|
+
applyScopedStyles: ApplyScopedStyles;
|
|
88
|
+
removeScopedStyles: RemoveScopedStyles;
|
|
89
|
+
copyToClipboard: (text: string) => Promise<void>;
|
|
90
|
+
uploadFiles: (params: MultipleUploadParams) => Promise<FileList>;
|
|
91
|
+
uploadFile: (params?: UploadParams) => Promise<File | undefined>;
|
|
92
|
+
logger: Logger;
|
|
93
|
+
parseToml: typeof parseToml;
|
|
94
|
+
stringifyToml: typeof stringifyToml;
|
|
95
|
+
buildOrgNoteUrl: BuildOrgNoteUrl;
|
|
106
96
|
};
|
|
107
97
|
ui: {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
98
|
+
useSplashScreen: UseSplashScreen;
|
|
99
|
+
useBackgroundSettings: UseBackgroundSettings;
|
|
100
|
+
useSidebar: SidebarStoreDefinition;
|
|
101
|
+
useToolbar: ToolbarStoreDefinition;
|
|
102
|
+
useModal: ModalStoreDefinition;
|
|
103
|
+
useSettingsUi: SettingsUiStoreDefinition;
|
|
104
|
+
useConfirmationModal: UseConfirmationModal;
|
|
105
|
+
useScreenDetection: UseScreenDetection;
|
|
106
|
+
useContextMenu: ContextMenuStoreDefinition;
|
|
107
|
+
useTheme: ThemeStoreDefinition;
|
|
108
|
+
};
|
|
109
|
+
vue: {
|
|
110
|
+
router: Router;
|
|
115
111
|
};
|
|
116
|
-
encryption: OrgNoteEncryption;
|
|
117
112
|
}
|
|
118
113
|
export {};
|
|
@@ -3,5 +3,6 @@ export declare const EDITOR_COMMAND_GROUP = "editor";
|
|
|
3
3
|
export declare const GLOBAL_COMMAND_GROUP = "global";
|
|
4
4
|
export declare const NOTE_DETAIL_COMMAND_GROUP = "note-detail";
|
|
5
5
|
export declare const COMPLETION_COMMAND_GROUP = "completion";
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const TABS_COMMAND_GROUP = "tabs";
|
|
7
|
+
export declare const COMMAND_GROUPS: readonly ["settings", "editor", "global", "note-detail", "completion", "tabs"];
|
|
7
8
|
export declare const DEFAULT_KEYBINDING_GROUP = "default";
|
|
@@ -3,11 +3,13 @@ export const EDITOR_COMMAND_GROUP = 'editor';
|
|
|
3
3
|
export const GLOBAL_COMMAND_GROUP = 'global';
|
|
4
4
|
export const NOTE_DETAIL_COMMAND_GROUP = 'note-detail';
|
|
5
5
|
export const COMPLETION_COMMAND_GROUP = 'completion';
|
|
6
|
+
export const TABS_COMMAND_GROUP = 'tabs';
|
|
6
7
|
export const COMMAND_GROUPS = [
|
|
7
8
|
SETTINGS_COMMAND_GROUP,
|
|
8
9
|
EDITOR_COMMAND_GROUP,
|
|
9
10
|
GLOBAL_COMMAND_GROUP,
|
|
10
11
|
NOTE_DETAIL_COMMAND_GROUP,
|
|
11
12
|
COMPLETION_COMMAND_GROUP,
|
|
13
|
+
TABS_COMMAND_GROUP,
|
|
12
14
|
];
|
|
13
15
|
export const DEFAULT_KEYBINDING_GROUP = 'default';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class ExtensionMissingDefaultExportError extends Error {
|
|
2
|
+
constructor();
|
|
3
|
+
}
|
|
4
|
+
export declare class ExtensionInvalidManifestError extends Error {
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
7
|
+
export declare class ExtensionParsingError extends Error {
|
|
8
|
+
constructor(fileName: string, options?: ErrorOptions);
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export class ExtensionMissingDefaultExportError extends Error {
|
|
2
|
+
constructor() {
|
|
3
|
+
super('Extension must have a default export with onMounted handler');
|
|
4
|
+
this.name = 'ExtensionMissingDefaultExportError';
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export class ExtensionInvalidManifestError extends Error {
|
|
8
|
+
constructor() {
|
|
9
|
+
super('Extension must export a manifest object');
|
|
10
|
+
this.name = 'ExtensionInvalidManifestError';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class ExtensionParsingError extends Error {
|
|
14
|
+
constructor(fileName, options) {
|
|
15
|
+
super(`Failed to parse extension "${fileName}"`, options);
|
|
16
|
+
this.name = 'ExtensionParsingError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ValidationError } from '../models/file-guard.js';
|
|
2
|
+
export declare class FileReadOnlyError extends Error {
|
|
3
|
+
constructor(path: string, reason?: string);
|
|
4
|
+
}
|
|
5
|
+
export declare class FileValidationError extends Error {
|
|
6
|
+
readonly errors: ValidationError[];
|
|
7
|
+
constructor(path: string, errors: ValidationError[]);
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export class FileReadOnlyError extends Error {
|
|
2
|
+
constructor(path, reason) {
|
|
3
|
+
const message = reason
|
|
4
|
+
? `Cannot write to read-only file: ${path}. Reason: ${reason}`
|
|
5
|
+
: `Cannot write to read-only file: ${path}`;
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'FileReadOnlyError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export class FileValidationError extends Error {
|
|
11
|
+
errors;
|
|
12
|
+
constructor(path, errors) {
|
|
13
|
+
const message = `Validation failed for: ${path}`;
|
|
14
|
+
super(message);
|
|
15
|
+
this.name = 'FileValidationError';
|
|
16
|
+
this.errors = errors;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class GitFileNotFoundError extends Error {
|
|
2
|
+
constructor(path: string);
|
|
3
|
+
}
|
|
4
|
+
export declare class GitRepoNotFoundError extends Error {
|
|
5
|
+
constructor(url: string);
|
|
6
|
+
}
|
|
7
|
+
export declare class GitNetworkError extends Error {
|
|
8
|
+
constructor(message: string);
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export class GitFileNotFoundError extends Error {
|
|
2
|
+
constructor(path) {
|
|
3
|
+
super(`Git file not found: ${path}`);
|
|
4
|
+
this.name = 'GitFileNotFoundError';
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export class GitRepoNotFoundError extends Error {
|
|
8
|
+
constructor(url) {
|
|
9
|
+
super(`Git repository not found: ${url}`);
|
|
10
|
+
this.name = 'GitRepoNotFoundError';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class GitNetworkError extends Error {
|
|
14
|
+
constructor(message) {
|
|
15
|
+
super(`Git network error: ${message}`);
|
|
16
|
+
this.name = 'GitNetworkError';
|
|
17
|
+
}
|
|
18
|
+
}
|