orgnote-api 0.40.27 → 0.40.28

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 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;
@@ -164,6 +164,10 @@ 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;
167
171
  SEARCH: DefaultCommands.SEARCH;
168
172
  TOGGLE_COMMANDS: DefaultCommands.TOGGLE_COMMANDS;
169
173
  RESTORE_COMPLETION: DefaultCommands.RESTORE_COMPLETION;
@@ -7,6 +7,10 @@ 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",
10
14
  SEARCH = "search",
11
15
  TOGGLE_COMMANDS = "toggle commands",
12
16
  RESTORE_COMPLETION = "restore last completion",
@@ -14,6 +14,11 @@ 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";
17
22
  // Completion commands
18
23
  DefaultCommands["SEARCH"] = "search";
19
24
  DefaultCommands["TOGGLE_COMMANDS"] = "toggle commands";
package/models/index.d.ts CHANGED
@@ -53,6 +53,8 @@ export * from './settings-store.js';
53
53
  export * from './encryption-store.js';
54
54
  export * from './ui-store.js';
55
55
  export * from './sidebar-store.js';
56
+ export * from './panel.js';
57
+ export * from './right-panel-store.js';
56
58
  export * from './toolbar-store.js';
57
59
  export * from './modal-store.js';
58
60
  export * from './settings-ui-store.js';
package/models/index.js CHANGED
@@ -55,6 +55,8 @@ export * from "./settings-store.js";
55
55
  export * from "./encryption-store.js";
56
56
  export * from "./ui-store.js";
57
57
  export * from "./sidebar-store.js";
58
+ export * from "./panel.js";
59
+ export * from "./right-panel-store.js";
58
60
  export * from "./toolbar-store.js";
59
61
  export * from "./modal-store.js";
60
62
  export * from "./settings-ui-store.js";
@@ -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>;
@@ -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
+ }
@@ -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 { CommandName } from './command.js';
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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orgnote-api",
3
- "version": "0.40.27",
3
+ "version": "0.40.28",
4
4
  "description": "Official API for creating extensions for OrgNote app",
5
5
  "type": "module",
6
6
  "main": "./index.js",