orgnote-api 0.40.36 → 0.40.38
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 +4 -3
- package/constants/i18n-keys.d.ts +7 -1
- package/constants/i18n-keys.js +1 -0
- package/models/default-commands.d.ts +5 -1
- package/models/default-commands.js +5 -1
- package/models/font-store.d.ts +29 -0
- package/models/index.d.ts +2 -1
- package/models/index.js +2 -1
- package/models/orgnote-config.d.ts +6 -0
- package/models/orgnote-config.js +6 -0
- package/models/panel.d.ts +1 -1
- package/models/right-sidebar-store.d.ts +8 -0
- package/models/right-sidebar-store.js +1 -0
- package/models/sidebar-store.d.ts +2 -2
- package/package.json +1 -1
- package/models/right-panel-store.d.ts +0 -8
- /package/models/{right-panel-store.js → font-store.js} +0 -0
package/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InlineEmbeddedWidget, MultilineEmbeddedWidget, OrgLineClass, SyncStoreDefinition, FileReaderStoreDefinition, CommandsStoreDefinition, CommandsGroupStoreDefinition, ModalStoreDefinition, SettingsStoreDefinition, SettingsUiStoreDefinition, MultipleUploadParams, UploadParams, CompletionStoreDefinition, PaneStoreDefinition, LayoutStoreDefinition, FileManagerStoreDefinition, UseScreenDetection, UseKeyboardState, NotificationsStoreDefinition, BufferStoreDefinition, Repositories, LogStoreDefinition, UseSystemInfo, ContextMenuStoreDefinition, QueueStoreDefinition, FileGuardStoreDefinition, FileWatcherStoreDefinition, BuildOrgNoteUrl, AuthStoreDefinition, FileSearchStoreDefinition, FileMetaStoreDefinition } from './models/index.js';
|
|
1
|
+
import { InlineEmbeddedWidget, MultilineEmbeddedWidget, OrgLineClass, SyncStoreDefinition, FileReaderStoreDefinition, CommandsStoreDefinition, CommandsGroupStoreDefinition, ModalStoreDefinition, SettingsStoreDefinition, SettingsUiStoreDefinition, MultipleUploadParams, UploadParams, CompletionStoreDefinition, PaneStoreDefinition, LayoutStoreDefinition, FileManagerStoreDefinition, UseScreenDetection, UseKeyboardState, NotificationsStoreDefinition, BufferStoreDefinition, Repositories, LogStoreDefinition, UseSystemInfo, ContextMenuStoreDefinition, QueueStoreDefinition, FileGuardStoreDefinition, FileWatcherStoreDefinition, BuildOrgNoteUrl, AuthStoreDefinition, FileSearchStoreDefinition, FileMetaStoreDefinition, FontStoreDefinition } from './models/index.js';
|
|
2
2
|
import { WebSocketClient } from './websocket/client.js';
|
|
3
3
|
import { WidgetType } from './models/widget-type.js';
|
|
4
4
|
import { NodeType } from 'org-mode-ast';
|
|
@@ -14,7 +14,7 @@ import { GetCssVar, GetCssTheme, GetNumericCssVar, GetCssProperty, GetCssNumeric
|
|
|
14
14
|
import { ThemeStoreDefinition } from './models/theme-store.js';
|
|
15
15
|
import { UseBackgroundSettings } from './models/ui-store.js';
|
|
16
16
|
import { SidebarStoreDefinition } from './models/sidebar-store.js';
|
|
17
|
-
import {
|
|
17
|
+
import { RightSidebarStoreDefinition } from './models/right-sidebar-store.js';
|
|
18
18
|
import { Logger } from './models/logger.js';
|
|
19
19
|
import type { QVueGlobals } from 'quasar';
|
|
20
20
|
import { PinnedCommandsStoreDefinition } from './models/pinned-commands-store.js';
|
|
@@ -102,10 +102,11 @@ export interface OrgNoteApi {
|
|
|
102
102
|
buildOrgNoteUrl: BuildOrgNoteUrl;
|
|
103
103
|
};
|
|
104
104
|
ui: {
|
|
105
|
+
useFonts: FontStoreDefinition;
|
|
105
106
|
useSplashScreen: UseSplashScreen;
|
|
106
107
|
useBackgroundSettings: UseBackgroundSettings;
|
|
107
108
|
useSidebar: SidebarStoreDefinition;
|
|
108
|
-
|
|
109
|
+
useRightSidebar: RightSidebarStoreDefinition;
|
|
109
110
|
usePinnedCommands: PinnedCommandsStoreDefinition;
|
|
110
111
|
useModal: ModalStoreDefinition;
|
|
111
112
|
useSettingsUi: SettingsUiStoreDefinition;
|
package/constants/i18n-keys.d.ts
CHANGED
|
@@ -134,6 +134,7 @@ export declare enum i18n {
|
|
|
134
134
|
SELECT_COMMAND = "select command",
|
|
135
135
|
CONFIRM_CLEAR_LOGS = "confirm clear logs",
|
|
136
136
|
SYSTEM_INFO = "system info",
|
|
137
|
+
FONTS = "fonts",
|
|
137
138
|
FILE_DELETED_EXTERNALLY = "file was deleted externally",
|
|
138
139
|
IMAGE_LOAD_FAILED = "failed to load image",
|
|
139
140
|
IMAGE_NOT_FOUND = "image not found",
|
|
@@ -165,10 +166,14 @@ export declare const I18N: {
|
|
|
165
166
|
SHOW_LOGS: DefaultCommands.SHOW_LOGS;
|
|
166
167
|
CLEAR_LOGS: DefaultCommands.CLEAR_LOGS;
|
|
167
168
|
TOGGLE_SIDEBAR: DefaultCommands.TOGGLE_SIDEBAR;
|
|
169
|
+
CLOSE_SIDEBAR: DefaultCommands.CLOSE_SIDEBAR;
|
|
170
|
+
OPEN_SIDEBAR: DefaultCommands.OPEN_SIDEBAR;
|
|
168
171
|
TOGGLE_FILE_MANAGER: DefaultCommands.TOGGLE_FILE_MANAGER;
|
|
169
172
|
CREATE_NOTE: DefaultCommands.CREATE_NOTE;
|
|
170
173
|
PROJECT_INFO: DefaultCommands.PROJECT_INFO;
|
|
171
|
-
|
|
174
|
+
TOGGLE_RIGHT_SIDEBAR: DefaultCommands.TOGGLE_RIGHT_SIDEBAR;
|
|
175
|
+
OPEN_RIGHT_SIDEBAR: DefaultCommands.OPEN_RIGHT_SIDEBAR;
|
|
176
|
+
CLOSE_RIGHT_SIDEBAR: DefaultCommands.CLOSE_RIGHT_SIDEBAR;
|
|
172
177
|
OPEN_BACKLINKS: DefaultCommands.OPEN_BACKLINKS;
|
|
173
178
|
OPEN_OUTLINE: DefaultCommands.OPEN_OUTLINE;
|
|
174
179
|
OPEN_LOCAL_GRAPH: DefaultCommands.OPEN_LOCAL_GRAPH;
|
|
@@ -395,6 +400,7 @@ export declare const I18N: {
|
|
|
395
400
|
SELECT_COMMAND: i18n.SELECT_COMMAND;
|
|
396
401
|
CONFIRM_CLEAR_LOGS: i18n.CONFIRM_CLEAR_LOGS;
|
|
397
402
|
SYSTEM_INFO: i18n.SYSTEM_INFO;
|
|
403
|
+
FONTS: i18n.FONTS;
|
|
398
404
|
FILE_DELETED_EXTERNALLY: i18n.FILE_DELETED_EXTERNALLY;
|
|
399
405
|
IMAGE_LOAD_FAILED: i18n.IMAGE_LOAD_FAILED;
|
|
400
406
|
IMAGE_NOT_FOUND: i18n.IMAGE_NOT_FOUND;
|
package/constants/i18n-keys.js
CHANGED
|
@@ -137,6 +137,7 @@ export var i18n;
|
|
|
137
137
|
i18n["SELECT_COMMAND"] = "select command";
|
|
138
138
|
i18n["CONFIRM_CLEAR_LOGS"] = "confirm clear logs";
|
|
139
139
|
i18n["SYSTEM_INFO"] = "system info";
|
|
140
|
+
i18n["FONTS"] = "fonts";
|
|
140
141
|
// Buffer
|
|
141
142
|
i18n["FILE_DELETED_EXTERNALLY"] = "file was deleted externally";
|
|
142
143
|
// Images
|
|
@@ -4,10 +4,14 @@ export declare enum DefaultCommands {
|
|
|
4
4
|
SHOW_LOGS = "show logs",
|
|
5
5
|
CLEAR_LOGS = "clear logs",
|
|
6
6
|
TOGGLE_SIDEBAR = "toggle sidebar",
|
|
7
|
+
CLOSE_SIDEBAR = "close sidebar",
|
|
8
|
+
OPEN_SIDEBAR = "open sidebar",
|
|
7
9
|
TOGGLE_FILE_MANAGER = "toggle file manager",
|
|
8
10
|
CREATE_NOTE = "create note",
|
|
9
11
|
PROJECT_INFO = "project info",
|
|
10
|
-
|
|
12
|
+
TOGGLE_RIGHT_SIDEBAR = "toggle right sidebar",
|
|
13
|
+
OPEN_RIGHT_SIDEBAR = "open right sidebar",
|
|
14
|
+
CLOSE_RIGHT_SIDEBAR = "close right sidebar",
|
|
11
15
|
OPEN_BACKLINKS = "open backlinks",
|
|
12
16
|
OPEN_OUTLINE = "open outline",
|
|
13
17
|
OPEN_LOCAL_GRAPH = "open local graph",
|
|
@@ -11,11 +11,15 @@ export var DefaultCommands;
|
|
|
11
11
|
DefaultCommands["SHOW_LOGS"] = "show logs";
|
|
12
12
|
DefaultCommands["CLEAR_LOGS"] = "clear logs";
|
|
13
13
|
DefaultCommands["TOGGLE_SIDEBAR"] = "toggle sidebar";
|
|
14
|
+
DefaultCommands["CLOSE_SIDEBAR"] = "close sidebar";
|
|
15
|
+
DefaultCommands["OPEN_SIDEBAR"] = "open sidebar";
|
|
14
16
|
DefaultCommands["TOGGLE_FILE_MANAGER"] = "toggle file manager";
|
|
15
17
|
DefaultCommands["CREATE_NOTE"] = "create note";
|
|
16
18
|
DefaultCommands["PROJECT_INFO"] = "project info";
|
|
17
19
|
// Right panel
|
|
18
|
-
DefaultCommands["
|
|
20
|
+
DefaultCommands["TOGGLE_RIGHT_SIDEBAR"] = "toggle right sidebar";
|
|
21
|
+
DefaultCommands["OPEN_RIGHT_SIDEBAR"] = "open right sidebar";
|
|
22
|
+
DefaultCommands["CLOSE_RIGHT_SIDEBAR"] = "close right sidebar";
|
|
19
23
|
DefaultCommands["OPEN_BACKLINKS"] = "open backlinks";
|
|
20
24
|
DefaultCommands["OPEN_OUTLINE"] = "open outline";
|
|
21
25
|
DefaultCommands["OPEN_LOCAL_GRAPH"] = "open local graph";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { StoreDefinition } from './store.js';
|
|
3
|
+
export type FontDisplay = 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
|
|
4
|
+
export type FontStyle = 'normal' | 'italic' | 'oblique';
|
|
5
|
+
export type FontCategory = 'main' | 'editor' | 'headline' | 'code';
|
|
6
|
+
export interface FontDefinition {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
family: string;
|
|
10
|
+
src?: string;
|
|
11
|
+
filePath?: string;
|
|
12
|
+
weight?: string | number;
|
|
13
|
+
style?: FontStyle;
|
|
14
|
+
display?: FontDisplay;
|
|
15
|
+
}
|
|
16
|
+
export interface FontCategoryConfig {
|
|
17
|
+
main: string;
|
|
18
|
+
editor: string;
|
|
19
|
+
headline: string;
|
|
20
|
+
code: string;
|
|
21
|
+
}
|
|
22
|
+
export interface FontStore {
|
|
23
|
+
availableFonts: Ref<FontDefinition[]>;
|
|
24
|
+
activeFonts: Ref<FontCategoryConfig>;
|
|
25
|
+
registerFont: (font: FontDefinition) => void;
|
|
26
|
+
unregisterFont: (fontId: string) => void;
|
|
27
|
+
sync: () => Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
export type FontStoreDefinition = StoreDefinition<FontStore>;
|
package/models/index.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export * from './encryption-store.js';
|
|
|
56
56
|
export * from './ui-store.js';
|
|
57
57
|
export * from './sidebar-store.js';
|
|
58
58
|
export * from './panel.js';
|
|
59
|
-
export * from './right-
|
|
59
|
+
export * from './right-sidebar-store.js';
|
|
60
60
|
export * from './pinned-commands-store.js';
|
|
61
61
|
export * from './modal-store.js';
|
|
62
62
|
export * from './settings-ui-store.js';
|
|
@@ -77,6 +77,7 @@ export * from './cron-store.js';
|
|
|
77
77
|
export * from './git-store.js';
|
|
78
78
|
export * from './extension-registry-store.js';
|
|
79
79
|
export * from './theme-store.js';
|
|
80
|
+
export * from './font-store.js';
|
|
80
81
|
export * from './file-search-store.js';
|
|
81
82
|
export * from './file-meta-store.js';
|
|
82
83
|
export * from './style-variant.js';
|
package/models/index.js
CHANGED
|
@@ -58,7 +58,7 @@ export * from "./encryption-store.js";
|
|
|
58
58
|
export * from "./ui-store.js";
|
|
59
59
|
export * from "./sidebar-store.js";
|
|
60
60
|
export * from "./panel.js";
|
|
61
|
-
export * from "./right-
|
|
61
|
+
export * from "./right-sidebar-store.js";
|
|
62
62
|
export * from "./pinned-commands-store.js";
|
|
63
63
|
export * from "./modal-store.js";
|
|
64
64
|
export * from "./settings-ui-store.js";
|
|
@@ -79,6 +79,7 @@ export * from "./cron-store.js";
|
|
|
79
79
|
export * from "./git-store.js";
|
|
80
80
|
export * from "./extension-registry-store.js";
|
|
81
81
|
export * from "./theme-store.js";
|
|
82
|
+
export * from "./font-store.js";
|
|
82
83
|
export * from "./file-search-store.js";
|
|
83
84
|
export * from "./file-meta-store.js";
|
|
84
85
|
// UI
|
|
@@ -33,6 +33,12 @@ export declare const ORG_NOTE_CONFIG_SCHEMA: import("valibot").SchemaWithPipe<re
|
|
|
33
33
|
readonly persistantPanes: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
|
|
34
34
|
readonly persistantPanesSaveDelay: import("valibot").NumberSchema<undefined>;
|
|
35
35
|
readonly dropZoneEdgeRatio: import("valibot").NumberSchema<undefined>;
|
|
36
|
+
readonly fonts: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
|
|
37
|
+
readonly main: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
38
|
+
readonly editor: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
39
|
+
readonly headline: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
40
|
+
readonly code: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
41
|
+
}, undefined>, undefined>;
|
|
36
42
|
}, undefined>;
|
|
37
43
|
readonly fileReaders: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
|
|
38
44
|
readonly preferredReaders: import("valibot").OptionalSchema<import("valibot").ObjectWithRestSchema<{}, import("valibot").StringSchema<undefined>, undefined>, undefined>;
|
package/models/orgnote-config.js
CHANGED
|
@@ -34,6 +34,12 @@ export const ORG_NOTE_CONFIG_SCHEMA = pipe(objectWithRest({
|
|
|
34
34
|
persistantPanes: optional(boolean()),
|
|
35
35
|
persistantPanesSaveDelay: number(),
|
|
36
36
|
dropZoneEdgeRatio: number(),
|
|
37
|
+
fonts: optional(object({
|
|
38
|
+
main: optional(string()),
|
|
39
|
+
editor: optional(string()),
|
|
40
|
+
headline: optional(string()),
|
|
41
|
+
code: optional(string()),
|
|
42
|
+
})),
|
|
37
43
|
}),
|
|
38
44
|
fileReaders: optional(object({
|
|
39
45
|
preferredReaders: optional(objectWithRest({}, string())),
|
package/models/panel.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Ref, ShallowRef } from 'vue';
|
|
2
2
|
import type { VueComponent } from './vue-component.js';
|
|
3
3
|
import type { ComponentConfig } from './sidebar-store.js';
|
|
4
|
-
export interface
|
|
4
|
+
export interface Sidebar {
|
|
5
5
|
opened: Ref<boolean>;
|
|
6
6
|
component: ShallowRef<VueComponent | undefined>;
|
|
7
7
|
componentConfig: ShallowRef<ComponentConfig<VueComponent> | undefined>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { StoreDefinition } from './store.js';
|
|
3
|
+
import type { Sidebar } from './panel.js';
|
|
4
|
+
export interface RightSidebarStore extends Sidebar {
|
|
5
|
+
width: Ref<number>;
|
|
6
|
+
setWidth: (width: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export type RightSidebarStoreDefinition = StoreDefinition<RightSidebarStore>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ExtractPropTypes } from 'vue';
|
|
2
2
|
import type { StoreDefinition } from './store.js';
|
|
3
3
|
import type { VueComponent } from './vue-component.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { Sidebar } from './panel.js';
|
|
5
5
|
export type ComponentConfig<T extends VueComponent> = {
|
|
6
6
|
componentProps?: ExtractPropTypes<T>;
|
|
7
7
|
};
|
|
8
|
-
export interface SidebarStore extends
|
|
8
|
+
export interface SidebarStore extends Sidebar {
|
|
9
9
|
toggle: (cmp?: VueComponent) => void;
|
|
10
10
|
}
|
|
11
11
|
export type SidebarStoreDefinition = StoreDefinition<SidebarStore>;
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Ref } from 'vue';
|
|
2
|
-
import type { StoreDefinition } from './store.js';
|
|
3
|
-
import type { Panel } from './panel.js';
|
|
4
|
-
export interface RightPanelStore extends Panel {
|
|
5
|
-
width: Ref<number>;
|
|
6
|
-
setWidth: (width: number) => void;
|
|
7
|
-
}
|
|
8
|
-
export type RightPanelStoreDefinition = StoreDefinition<RightPanelStore>;
|
|
File without changes
|