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.
Files changed (283) hide show
  1. package/api.d.ts +93 -98
  2. package/constants/{command-groups.contant.d.ts → command-groups.d.ts} +2 -1
  3. package/constants/{command-groups.contant.js → command-groups.js} +2 -0
  4. package/constants/extension-errors.d.ts +9 -0
  5. package/constants/extension-errors.js +18 -0
  6. package/constants/file-guard-errors.d.ts +8 -0
  7. package/constants/file-guard-errors.js +18 -0
  8. package/constants/git-errors.d.ts +9 -0
  9. package/constants/git-errors.js +18 -0
  10. package/constants/i18n-keys.d.ts +371 -0
  11. package/constants/i18n-keys.js +158 -0
  12. package/constants/index.d.ts +9 -1
  13. package/constants/index.js +9 -1
  14. package/constants/oauth-providers.d.ts +1 -0
  15. package/constants/oauth-providers.js +1 -0
  16. package/constants/route-names.d.ts +36 -0
  17. package/constants/route-names.js +37 -0
  18. package/constants/route-paths.d.ts +5 -0
  19. package/constants/route-paths.js +4 -0
  20. package/constants/style-sizes.d.ts +1 -0
  21. package/constants/style-sizes.js +1 -0
  22. package/encryption/__tests__/encryption.spec.js +4 -5
  23. package/encryption/__tests__/note-encryption.spec.js +46 -348
  24. package/encryption/encryption.d.ts +9 -4
  25. package/encryption/encryption.js +25 -5
  26. package/encryption/note-encryption.d.ts +1 -1
  27. package/encryption/note-encryption.js +6 -6
  28. package/files-api.d.ts +0 -1
  29. package/index.d.ts +4 -1
  30. package/index.js +4 -1
  31. package/mappers/orgnode-to-note.d.ts +2 -2
  32. package/mappers/orgnode-to-note.js +3 -2
  33. package/models/auth-store.d.ts +3 -3
  34. package/models/buffer-store.d.ts +14 -0
  35. package/models/buffer.d.ts +24 -0
  36. package/models/colors.d.ts +1 -0
  37. package/models/command.d.ts +13 -8
  38. package/models/commands-group-store.d.ts +11 -0
  39. package/models/commands-store.d.ts +13 -0
  40. package/models/completion-store.d.ts +14 -0
  41. package/models/completion.d.ts +16 -7
  42. package/models/config-store.d.ts +9 -0
  43. package/models/confirmation-modal.d.ts +11 -0
  44. package/models/context-menu-store.d.ts +10 -0
  45. package/models/cron-store.d.ts +21 -0
  46. package/models/cron-task.d.ts +30 -0
  47. package/models/css-utils.d.ts +17 -0
  48. package/models/default-commands.d.ts +52 -3
  49. package/models/default-commands.js +59 -2
  50. package/models/encryption-store.d.ts +10 -0
  51. package/models/encryption-store.js +1 -0
  52. package/models/encryption.d.ts +54 -11
  53. package/models/encryption.js +28 -1
  54. package/models/extension-registry-store.d.ts +9 -0
  55. package/models/extension-registry-store.js +1 -0
  56. package/models/extension-store.d.ts +18 -0
  57. package/models/extension-store.js +1 -0
  58. package/models/extension.d.ts +96 -24
  59. package/models/extension.js +88 -1
  60. package/models/file-guard-store.d.ts +14 -0
  61. package/models/file-guard-store.js +1 -0
  62. package/models/file-guard.d.ts +27 -0
  63. package/models/file-guard.js +1 -0
  64. package/models/{file-cache.d.ts → file-info.d.ts} +1 -1
  65. package/models/file-info.js +1 -0
  66. package/models/file-manager-store.d.ts +10 -12
  67. package/models/file-opener-store.d.ts +6 -4
  68. package/models/file-system-manager-store.d.ts +13 -0
  69. package/models/file-system-manager-store.js +1 -0
  70. package/models/file-system-store.d.ts +19 -0
  71. package/models/file-system-store.js +1 -0
  72. package/models/file-system.d.ts +32 -5
  73. package/models/file-system.js +2 -0
  74. package/models/file-upload.d.ts +6 -0
  75. package/models/file-upload.js +1 -0
  76. package/models/file-watcher-store.d.ts +18 -0
  77. package/models/file-watcher-store.js +1 -0
  78. package/models/files-store.d.ts +2 -2
  79. package/models/git-store.d.ts +12 -0
  80. package/models/git-store.js +1 -0
  81. package/models/git.d.ts +47 -0
  82. package/models/git.js +1 -0
  83. package/models/i18n-keys.d.ts +2 -0
  84. package/models/i18n-keys.js +1 -0
  85. package/models/index.d.ts +56 -2
  86. package/models/index.js +59 -2
  87. package/models/layout-snapshot-repository.d.ts +14 -0
  88. package/models/layout-snapshot-repository.js +1 -0
  89. package/models/layout-store.d.ts +17 -0
  90. package/models/layout-store.js +1 -0
  91. package/models/layout.d.ts +16 -0
  92. package/models/layout.js +1 -0
  93. package/models/log-repository.d.ts +17 -0
  94. package/models/log-repository.js +1 -0
  95. package/models/log-store.d.ts +15 -0
  96. package/models/log-store.js +1 -0
  97. package/models/log.d.ts +12 -0
  98. package/models/log.js +1 -0
  99. package/models/logger.d.ts +8 -0
  100. package/models/logger.js +1 -0
  101. package/models/menu-action.d.ts +18 -0
  102. package/models/menu-action.js +1 -0
  103. package/models/modal-store.d.ts +16 -0
  104. package/models/modal-store.js +1 -0
  105. package/models/modal.d.ts +10 -2
  106. package/models/note.d.ts +30 -13
  107. package/models/notification-config.d.ts +14 -0
  108. package/models/notification-config.js +1 -0
  109. package/models/notifications-store.d.ts +20 -0
  110. package/models/notifications-store.js +1 -0
  111. package/models/oauth-provider.d.ts +2 -1
  112. package/models/orgnote-config.d.ts +80 -0
  113. package/models/orgnote-config.js +42 -0
  114. package/models/orgnote-url.d.ts +6 -0
  115. package/models/orgnote-url.js +1 -0
  116. package/models/pane-snapshot-repository.d.ts +0 -0
  117. package/models/pane-snapshot-repository.js +0 -0
  118. package/models/pane.d.ts +38 -0
  119. package/models/pane.js +1 -0
  120. package/models/panes-store.d.ts +30 -0
  121. package/models/panes-store.js +1 -0
  122. package/models/platform-detection.d.ts +11 -0
  123. package/models/platform-detection.js +1 -0
  124. package/models/platform-specific.d.ts +1 -0
  125. package/models/platform-specific.js +1 -0
  126. package/models/platform.d.ts +2 -0
  127. package/models/platform.js +1 -0
  128. package/models/queue-store.d.ts +49 -0
  129. package/models/queue-store.js +1 -0
  130. package/models/queue-task.d.ts +15 -0
  131. package/models/queue-task.js +1 -0
  132. package/models/repositories.d.ts +58 -38
  133. package/models/screen-detection.d.ts +10 -0
  134. package/models/screen-detection.js +1 -0
  135. package/models/settings-store.d.ts +12 -0
  136. package/models/settings-store.js +1 -0
  137. package/models/settings-ui-store.d.ts +7 -0
  138. package/models/settings-ui-store.js +1 -0
  139. package/models/sidebar-store.d.ts +22 -0
  140. package/models/sidebar-store.js +1 -0
  141. package/models/splash-screen.d.ts +13 -0
  142. package/models/splash-screen.js +1 -0
  143. package/models/store.d.ts +1 -1
  144. package/models/style-size.d.ts +2 -0
  145. package/models/style-size.js +1 -0
  146. package/models/style-variant.d.ts +1 -0
  147. package/models/style-variant.js +1 -0
  148. package/models/sync-store.d.ts +8 -6
  149. package/models/sync.d.ts +0 -5
  150. package/models/system-info.d.ts +47 -0
  151. package/models/system-info.js +1 -0
  152. package/models/theme-store.d.ts +16 -0
  153. package/models/theme-store.js +1 -0
  154. package/models/theme-variables.d.ts +4 -189
  155. package/models/theme-variables.js +2 -191
  156. package/models/toolbar-store.d.ts +9 -0
  157. package/models/toolbar-store.js +1 -0
  158. package/models/ui-store.d.ts +6 -0
  159. package/models/ui-store.js +1 -0
  160. package/models/user.d.ts +3 -4
  161. package/models/vue-component.d.ts +4 -2
  162. package/package-lock.json +5553 -0
  163. package/package.json +37 -26
  164. package/remote-api/api.d.ts +303 -684
  165. package/remote-api/api.js +199 -485
  166. package/remote-api/base.js +1 -1
  167. package/remote-api/common.d.ts +1 -1
  168. package/sync/__tests__/memory-state.spec.d.ts +1 -0
  169. package/sync/__tests__/memory-state.spec.js +49 -0
  170. package/sync/__tests__/plan.spec.d.ts +1 -0
  171. package/sync/__tests__/plan.spec.js +116 -0
  172. package/sync/create-sync-plan.d.ts +2 -0
  173. package/sync/create-sync-plan.js +13 -0
  174. package/sync/fetch.d.ts +8 -0
  175. package/sync/fetch.js +32 -0
  176. package/sync/index.d.ts +10 -0
  177. package/sync/index.js +9 -0
  178. package/sync/memory-state.d.ts +2 -0
  179. package/sync/memory-state.js +22 -0
  180. package/sync/operations/conflict.d.ts +10 -0
  181. package/sync/operations/conflict.js +56 -0
  182. package/sync/operations/delete-local.d.ts +2 -0
  183. package/sync/operations/delete-local.js +17 -0
  184. package/sync/operations/delete-remote.d.ts +2 -0
  185. package/sync/operations/delete-remote.js +26 -0
  186. package/sync/operations/download.d.ts +2 -0
  187. package/sync/operations/download.js +20 -0
  188. package/sync/operations/index.d.ts +5 -0
  189. package/sync/operations/index.js +5 -0
  190. package/sync/operations/synced-file.d.ts +14 -0
  191. package/sync/operations/synced-file.js +5 -0
  192. package/sync/operations/upload.d.ts +2 -0
  193. package/sync/operations/upload.js +30 -0
  194. package/sync/plan.d.ts +9 -0
  195. package/sync/plan.js +57 -0
  196. package/sync/recovery.d.ts +2 -0
  197. package/sync/recovery.js +6 -0
  198. package/sync/scan.d.ts +4 -0
  199. package/sync/scan.js +40 -0
  200. package/sync/types.d.ts +74 -0
  201. package/sync/types.js +7 -0
  202. package/sync/utils/__tests__/oldest-synced-at.spec.d.ts +1 -0
  203. package/sync/utils/__tests__/oldest-synced-at.spec.js +38 -0
  204. package/sync/utils/oldest-synced-at.d.ts +2 -0
  205. package/sync/utils/oldest-synced-at.js +9 -0
  206. package/types/index.d.ts +0 -0
  207. package/types/index.js +0 -0
  208. package/utils/__tests__/find-files-diff.spec.d.ts +1 -0
  209. package/{tools → utils}/__tests__/find-files-diff.spec.js +3 -3
  210. package/utils/__tests__/find-note-files-diff.spec.d.ts +1 -0
  211. package/{tools → utils}/__tests__/find-note-files-diff.spec.js +5 -5
  212. package/utils/__tests__/get-file-name.spec.d.ts +1 -0
  213. package/utils/__tests__/get-string-path.spec.d.ts +1 -0
  214. package/utils/__tests__/is-gpg-encrypted.spec.d.ts +1 -0
  215. package/utils/__tests__/is-org-file.spec.d.ts +1 -0
  216. package/utils/__tests__/join.spec.d.ts +1 -0
  217. package/utils/__tests__/join.spec.js +32 -0
  218. package/utils/__tests__/nullable-guards.spec.d.ts +1 -0
  219. package/utils/__tests__/nullable-guards.spec.js +44 -0
  220. package/utils/__tests__/parent-folder.spec.d.ts +1 -0
  221. package/utils/__tests__/read-org-files-recursively.spec.d.ts +1 -0
  222. package/utils/__tests__/split-path.spec.d.ts +1 -0
  223. package/utils/__tests__/to-absolute-path.spec.d.ts +1 -0
  224. package/utils/__tests__/to-absolute-path.spec.js +26 -0
  225. package/utils/__tests__/to-error.spec.d.ts +1 -0
  226. package/utils/__tests__/to-error.spec.js +112 -0
  227. package/utils/__tests__/with-root.spec.d.ts +1 -0
  228. package/utils/__tests__/with-root.spec.js +20 -0
  229. package/{tools → utils}/find-notes-files-diff.js +6 -3
  230. package/{tools → utils}/index.d.ts +4 -1
  231. package/{tools → utils}/index.js +4 -1
  232. package/utils/join-path.d.ts +1 -0
  233. package/utils/join-path.js +13 -0
  234. package/utils/nullable-guards.d.ts +2 -0
  235. package/utils/nullable-guards.js +6 -0
  236. package/utils/to-absolute-path.d.ts +2 -0
  237. package/utils/to-absolute-path.js +2 -0
  238. package/utils/to-error.d.ts +6 -0
  239. package/utils/to-error.js +33 -0
  240. package/utils/toml.d.ts +3 -0
  241. package/utils/toml.js +31 -0
  242. package/utils/with-root.d.ts +1 -0
  243. package/utils/with-root.js +6 -0
  244. package/websocket/client.d.ts +24 -0
  245. package/websocket/client.js +83 -0
  246. package/models/file-tree.d.ts +0 -12
  247. package/tools/__tests__/join.spec.js +0 -24
  248. package/tools/join-path.d.ts +0 -1
  249. package/tools/join-path.js +0 -7
  250. package/tools/mock-server.d.ts +0 -1
  251. package/tools/mock-server.js +0 -12
  252. /package/models/{file-cache.js → buffer-store.js} +0 -0
  253. /package/models/{file-tree.js → buffer.js} +0 -0
  254. /package/{tools/__tests__/find-files-diff.spec.d.ts → models/colors.js} +0 -0
  255. /package/{tools/__tests__/find-note-files-diff.spec.d.ts → models/commands-group-store.js} +0 -0
  256. /package/{tools/__tests__/get-file-name.spec.d.ts → models/commands-store.js} +0 -0
  257. /package/{tools/__tests__/get-string-path.spec.d.ts → models/completion-store.js} +0 -0
  258. /package/{tools/__tests__/is-gpg-encrypted.spec.d.ts → models/config-store.js} +0 -0
  259. /package/{tools/__tests__/is-org-file.spec.d.ts → models/confirmation-modal.js} +0 -0
  260. /package/{tools/__tests__/join.spec.d.ts → models/context-menu-store.js} +0 -0
  261. /package/{tools/__tests__/parent-folder.spec.d.ts → models/cron-store.js} +0 -0
  262. /package/{tools/__tests__/read-org-files-recursively.spec.d.ts → models/cron-task.js} +0 -0
  263. /package/{tools/__tests__/split-path.spec.d.ts → models/css-utils.js} +0 -0
  264. /package/{tools → utils}/__tests__/get-file-name.spec.js +0 -0
  265. /package/{tools → utils}/__tests__/get-string-path.spec.js +0 -0
  266. /package/{tools → utils}/__tests__/is-gpg-encrypted.spec.js +0 -0
  267. /package/{tools → utils}/__tests__/is-org-file.spec.js +0 -0
  268. /package/{tools → utils}/__tests__/parent-folder.spec.js +0 -0
  269. /package/{tools → utils}/__tests__/read-org-files-recursively.spec.js +0 -0
  270. /package/{tools → utils}/__tests__/split-path.spec.js +0 -0
  271. /package/{tools → utils}/find-notes-files-diff.d.ts +0 -0
  272. /package/{tools → utils}/get-file-name.d.ts +0 -0
  273. /package/{tools → utils}/get-file-name.js +0 -0
  274. /package/{tools → utils}/get-parent-dir.d.ts +0 -0
  275. /package/{tools → utils}/get-parent-dir.js +0 -0
  276. /package/{tools → utils}/get-string-path.d.ts +0 -0
  277. /package/{tools → utils}/get-string-path.js +0 -0
  278. /package/{tools → utils}/is-gpg-encrypted.d.ts +0 -0
  279. /package/{tools → utils}/is-gpg-encrypted.js +0 -0
  280. /package/{tools → utils}/is-org-file.d.ts +0 -0
  281. /package/{tools → utils}/is-org-file.js +0 -0
  282. /package/{tools → utils}/split-path.d.ts +0 -0
  283. /package/{tools → utils}/split-path.js +0 -0
package/api.d.ts CHANGED
@@ -1,10 +1,29 @@
1
- import { Command, CSSVariable, ThemeVariable, Note, InlineEmbeddedWidget, MultilineEmbeddedWidget, OrgLineClass, FileSystem, WidgetBuilder, CommandPreview, OrgNoteEncryption, Modal, SyncStoreDefinition, FilesStoreDefinition, FileOpenerStoreDefinition, FileManageStoreDefinition } from './models/index.js';
2
- import type { NavigationFailure } from 'vue-router';
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 { EditorExtension } from './models/editor.js';
7
- import { AuthStoreDefinition } from './models/auth-store.js';
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
- getExtension?<T>(config: string): T;
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
- useFileSystem: () => FileSystem;
66
- useSyncStore: SyncStoreDefinition;
67
- useFilesStore: FilesStoreDefinition;
68
- useFileOpenerStore: FileOpenerStoreDefinition;
69
- useFileManagerStore: FileManageStoreDefinition;
70
- useAuthStore: AuthStoreDefinition;
71
- };
72
- commands: {
73
- add(...commands: Command[]): void;
74
- remove(...commands: Command[]): void;
75
- get(name: string): Command;
76
- getAll(): Command[];
77
- addCommandToSidebar(...commands: CommandPreview[]): void;
78
- removeCommandFromSidebar(...commands: CommandPreview[]): void;
79
- addCommandToEditorPanel(...commands: CommandPreview[]): void;
80
- removeCommandFromEditorPanel(...commands: CommandPreview[]): void;
81
- };
82
- configuration: () => OrgNoteConfig;
83
- }
84
- export interface OrgNoteConfig {
85
- editor: {
86
- showSpecialSymbols: boolean;
87
- showPropertyDrawer: boolean;
88
- };
89
- developer: {
90
- developerMode: boolean;
91
- maximumLogsCount: number;
92
- };
93
- completion: {
94
- showGroup: boolean;
95
- defaultCompletionLimit: number;
96
- };
97
- system: {
98
- language: string;
99
- };
100
- synchronization: {
101
- type: 'none' | 'api';
102
- };
103
- vault: {
104
- type: 'inmemory' | 'filesystem';
105
- path?: string;
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
- showUserProfiles: boolean;
109
- theme: 'light' | 'dark' | 'auto';
110
- darkThemeName?: string;
111
- lightThemeName?: string;
112
- };
113
- extensions: {
114
- sources: string[];
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 COMMAND_GROUPS: readonly ["settings", "editor", "global", "note-detail", "completion"];
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
+ }