orgnote-api 0.40.27 → 0.40.29
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 +2 -0
- package/constants/i18n-keys.d.ts +5 -0
- package/models/active-editor-context.d.ts +8 -0
- package/models/active-editor-context.js +1 -0
- package/models/default-commands.d.ts +5 -0
- package/models/default-commands.js +6 -0
- package/models/editor-store.d.ts +5 -0
- package/models/index.d.ts +3 -0
- package/models/index.js +3 -0
- package/models/layout-store.d.ts +2 -1
- package/models/layout.d.ts +6 -0
- package/models/panel.d.ts +16 -0
- package/models/panel.js +1 -0
- package/models/right-panel-store.d.ts +8 -0
- package/models/right-panel-store.js +1 -0
- package/models/sidebar-store.d.ts +4 -13
- package/package.json +1 -1
package/api.d.ts
CHANGED
|
@@ -14,6 +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 { RightPanelStoreDefinition } from './models/right-panel-store.js';
|
|
17
18
|
import { Logger } from './models/logger.js';
|
|
18
19
|
import type { QVueGlobals } from 'quasar';
|
|
19
20
|
import { ToolbarStoreDefinition } from './models/toolbar-store.js';
|
|
@@ -102,6 +103,7 @@ export interface OrgNoteApi {
|
|
|
102
103
|
useSplashScreen: UseSplashScreen;
|
|
103
104
|
useBackgroundSettings: UseBackgroundSettings;
|
|
104
105
|
useSidebar: SidebarStoreDefinition;
|
|
106
|
+
useRightPanel: RightPanelStoreDefinition;
|
|
105
107
|
useToolbar: ToolbarStoreDefinition;
|
|
106
108
|
useModal: ModalStoreDefinition;
|
|
107
109
|
useSettingsUi: SettingsUiStoreDefinition;
|
package/constants/i18n-keys.d.ts
CHANGED
|
@@ -164,6 +164,11 @@ export declare const I18N: {
|
|
|
164
164
|
TOGGLE_FILE_MANAGER: DefaultCommands.TOGGLE_FILE_MANAGER;
|
|
165
165
|
CREATE_NOTE: DefaultCommands.CREATE_NOTE;
|
|
166
166
|
PROJECT_INFO: DefaultCommands.PROJECT_INFO;
|
|
167
|
+
TOGGLE_RIGHT_PANEL: DefaultCommands.TOGGLE_RIGHT_PANEL;
|
|
168
|
+
OPEN_BACKLINKS: DefaultCommands.OPEN_BACKLINKS;
|
|
169
|
+
OPEN_OUTLINE: DefaultCommands.OPEN_OUTLINE;
|
|
170
|
+
OPEN_LOCAL_GRAPH: DefaultCommands.OPEN_LOCAL_GRAPH;
|
|
171
|
+
TOGGLE_AST_DEBUGGER: DefaultCommands.TOGGLE_AST_DEBUGGER;
|
|
167
172
|
SEARCH: DefaultCommands.SEARCH;
|
|
168
173
|
TOGGLE_COMMANDS: DefaultCommands.TOGGLE_COMMANDS;
|
|
169
174
|
RESTORE_COMPLETION: DefaultCommands.RESTORE_COMPLETION;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { OrgNode } from 'org-mode-ast';
|
|
2
|
+
import type { EditorView } from '@codemirror/view';
|
|
3
|
+
export interface ActiveEditorContext {
|
|
4
|
+
orgNode: OrgNode | null;
|
|
5
|
+
cursorPosition: number;
|
|
6
|
+
editorViewGetter: () => EditorView | undefined;
|
|
7
|
+
filePath?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,6 +7,11 @@ export declare enum DefaultCommands {
|
|
|
7
7
|
TOGGLE_FILE_MANAGER = "toggle file manager",
|
|
8
8
|
CREATE_NOTE = "create note",
|
|
9
9
|
PROJECT_INFO = "project info",
|
|
10
|
+
TOGGLE_RIGHT_PANEL = "toggle right panel",
|
|
11
|
+
OPEN_BACKLINKS = "open backlinks",
|
|
12
|
+
OPEN_OUTLINE = "open outline",
|
|
13
|
+
OPEN_LOCAL_GRAPH = "open local graph",
|
|
14
|
+
TOGGLE_AST_DEBUGGER = "toggle ast debugger",
|
|
10
15
|
SEARCH = "search",
|
|
11
16
|
TOGGLE_COMMANDS = "toggle commands",
|
|
12
17
|
RESTORE_COMPLETION = "restore last completion",
|
|
@@ -14,6 +14,12 @@ export var DefaultCommands;
|
|
|
14
14
|
DefaultCommands["TOGGLE_FILE_MANAGER"] = "toggle file manager";
|
|
15
15
|
DefaultCommands["CREATE_NOTE"] = "create note";
|
|
16
16
|
DefaultCommands["PROJECT_INFO"] = "project info";
|
|
17
|
+
// Right panel
|
|
18
|
+
DefaultCommands["TOGGLE_RIGHT_PANEL"] = "toggle right panel";
|
|
19
|
+
DefaultCommands["OPEN_BACKLINKS"] = "open backlinks";
|
|
20
|
+
DefaultCommands["OPEN_OUTLINE"] = "open outline";
|
|
21
|
+
DefaultCommands["OPEN_LOCAL_GRAPH"] = "open local graph";
|
|
22
|
+
DefaultCommands["TOGGLE_AST_DEBUGGER"] = "toggle ast debugger";
|
|
17
23
|
// Completion commands
|
|
18
24
|
DefaultCommands["SEARCH"] = "search";
|
|
19
25
|
DefaultCommands["TOGGLE_COMMANDS"] = "toggle commands";
|
package/models/editor-store.d.ts
CHANGED
|
@@ -3,14 +3,19 @@ import type { InlineEmbeddedWidgets, MultilineEmbeddedWidgets, OrgLineClasses }
|
|
|
3
3
|
import type { EditorExtension } from './editor.js';
|
|
4
4
|
import type { WidgetMeta } from '../api.js';
|
|
5
5
|
import type { StoreDefinition } from './store.js';
|
|
6
|
+
import type { ActiveEditorContext } from './active-editor-context.js';
|
|
6
7
|
export interface EditorStore {
|
|
7
8
|
inlineWidgets: ComputedRef<InlineEmbeddedWidgets>;
|
|
8
9
|
multilineWidgets: ComputedRef<MultilineEmbeddedWidgets>;
|
|
9
10
|
lineClasses: ComputedRef<OrgLineClasses>;
|
|
10
11
|
extensions: ShallowRef<EditorExtension[]>;
|
|
12
|
+
activeContext: ShallowRef<ActiveEditorContext | null>;
|
|
11
13
|
addWidgets: (...widgets: WidgetMeta[]) => void;
|
|
12
14
|
removeWidget: (widgetId: string) => void;
|
|
13
15
|
addExtensions: (...extensions: EditorExtension[]) => void;
|
|
14
16
|
removeExtensions: (...extensions: EditorExtension[]) => void;
|
|
17
|
+
setActiveContext: (ctx: ActiveEditorContext) => void;
|
|
18
|
+
updateActiveContext: (ctx: Partial<ActiveEditorContext>) => void;
|
|
19
|
+
clearActiveContext: () => void;
|
|
15
20
|
}
|
|
16
21
|
export type EditorStoreDefinition = StoreDefinition<EditorStore>;
|
package/models/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './widget.js';
|
|
|
7
7
|
export * from './modal.js';
|
|
8
8
|
export * from './widget-type.js';
|
|
9
9
|
export * from './editor.js';
|
|
10
|
+
export * from './active-editor-context.js';
|
|
10
11
|
export * from './default-commands.js';
|
|
11
12
|
export * from './encryption.js';
|
|
12
13
|
export * from './file-system.js';
|
|
@@ -53,6 +54,8 @@ export * from './settings-store.js';
|
|
|
53
54
|
export * from './encryption-store.js';
|
|
54
55
|
export * from './ui-store.js';
|
|
55
56
|
export * from './sidebar-store.js';
|
|
57
|
+
export * from './panel.js';
|
|
58
|
+
export * from './right-panel-store.js';
|
|
56
59
|
export * from './toolbar-store.js';
|
|
57
60
|
export * from './modal-store.js';
|
|
58
61
|
export * from './settings-ui-store.js';
|
package/models/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./widget.js";
|
|
|
7
7
|
export * from "./modal.js";
|
|
8
8
|
export * from "./widget-type.js";
|
|
9
9
|
export * from "./editor.js";
|
|
10
|
+
export * from "./active-editor-context.js";
|
|
10
11
|
export * from "./default-commands.js";
|
|
11
12
|
export * from "./encryption.js";
|
|
12
13
|
export * from "./file-system.js";
|
|
@@ -55,6 +56,8 @@ export * from "./settings-store.js";
|
|
|
55
56
|
export * from "./encryption-store.js";
|
|
56
57
|
export * from "./ui-store.js";
|
|
57
58
|
export * from "./sidebar-store.js";
|
|
59
|
+
export * from "./panel.js";
|
|
60
|
+
export * from "./right-panel-store.js";
|
|
58
61
|
export * from "./toolbar-store.js";
|
|
59
62
|
export * from "./modal-store.js";
|
|
60
63
|
export * from "./settings-ui-store.js";
|
package/models/layout-store.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ShallowRef } from 'vue';
|
|
2
2
|
import { StoreDefinition } from './store.js';
|
|
3
|
-
import { LayoutNode, DropDirection as SplitDirection } from './layout.js';
|
|
3
|
+
import { LayoutNode, DropDirection as SplitDirection, PanePosition } from './layout.js';
|
|
4
4
|
import { LayoutSnapshot } from './pane.js';
|
|
5
5
|
export interface LayoutStore {
|
|
6
6
|
layout: ShallowRef<LayoutNode | undefined>;
|
|
@@ -13,5 +13,6 @@ export interface LayoutStore {
|
|
|
13
13
|
restoreLayout: () => Promise<void>;
|
|
14
14
|
getLayoutSnapshot: () => LayoutSnapshot | undefined;
|
|
15
15
|
restoreLayoutSnapshot: (snapshot: LayoutSnapshot) => Promise<void>;
|
|
16
|
+
getPanePosition: (paneId: string) => PanePosition | undefined;
|
|
16
17
|
}
|
|
17
18
|
export type LayoutStoreDefinition = StoreDefinition<LayoutStore>;
|
package/models/layout.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export type LayoutOrientation = 'horizontal' | 'vertical';
|
|
2
2
|
export type DropZone = 'left' | 'right' | 'top' | 'bottom' | 'center';
|
|
3
3
|
export type DropDirection = 'left' | 'right' | 'top' | 'bottom';
|
|
4
|
+
export type HorizontalPosition = 'left' | 'right' | 'center';
|
|
5
|
+
export type VerticalPosition = 'top' | 'bottom' | 'center';
|
|
6
|
+
export interface PanePosition {
|
|
7
|
+
horizontal: HorizontalPosition;
|
|
8
|
+
vertical: VerticalPosition;
|
|
9
|
+
}
|
|
4
10
|
export type LayoutNode = LayoutPaneNode | LayoutSplitNode;
|
|
5
11
|
export interface LayoutPaneNode {
|
|
6
12
|
type: 'pane';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Ref, ShallowRef } from 'vue';
|
|
2
|
+
import type { VueComponent } from './vue-component.js';
|
|
3
|
+
import type { ComponentConfig } from './sidebar-store.js';
|
|
4
|
+
import type { CommandName } from './command.js';
|
|
5
|
+
export interface Panel {
|
|
6
|
+
opened: Ref<boolean>;
|
|
7
|
+
component: ShallowRef<VueComponent | undefined>;
|
|
8
|
+
componentConfig: ShallowRef<ComponentConfig<VueComponent> | undefined>;
|
|
9
|
+
commands: Ref<CommandName[]>;
|
|
10
|
+
close: () => void;
|
|
11
|
+
open: () => void;
|
|
12
|
+
toggle: () => void;
|
|
13
|
+
openComponent: <T extends VueComponent>(cmp: T, config?: ComponentConfig<T>) => void;
|
|
14
|
+
addCommand: (command: CommandName) => void;
|
|
15
|
+
removeCommand: (command: CommandName) => void;
|
|
16
|
+
}
|
package/models/panel.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
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>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
import type { ExtractPropTypes, Ref } from 'vue';
|
|
2
|
-
import { StoreDefinition } from './store.js';
|
|
3
|
-
import type { ShallowRef } from 'vue';
|
|
2
|
+
import type { StoreDefinition } from './store.js';
|
|
4
3
|
import type { VueComponent } from './vue-component.js';
|
|
5
|
-
import {
|
|
4
|
+
import type { Panel } from './panel.js';
|
|
5
|
+
import type { CommandName } from './command.js';
|
|
6
6
|
export type ComponentConfig<T extends VueComponent> = {
|
|
7
7
|
componentProps?: ExtractPropTypes<T>;
|
|
8
8
|
};
|
|
9
|
-
export interface SidebarStore {
|
|
10
|
-
opened: Ref<boolean>;
|
|
11
|
-
component: ShallowRef<VueComponent | undefined>;
|
|
12
|
-
componentConfig: ShallowRef<ComponentConfig<VueComponent> | undefined>;
|
|
13
|
-
close: () => void;
|
|
14
|
-
open: () => void;
|
|
15
|
-
openComponent: <T extends VueComponent>(cmp: T, config?: ComponentConfig<T>) => void;
|
|
9
|
+
export interface SidebarStore extends Panel {
|
|
16
10
|
toggle: (cmp?: VueComponent) => void;
|
|
17
|
-
commands: Ref<CommandName[]>;
|
|
18
11
|
footerCommands: Ref<CommandName[]>;
|
|
19
|
-
addCommand: (command: CommandName) => void;
|
|
20
|
-
removeCommand: (command: CommandName) => void;
|
|
21
12
|
}
|
|
22
13
|
export type SidebarStoreDefinition = StoreDefinition<SidebarStore>;
|