orgnote-api 0.40.34 → 0.40.35

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
@@ -17,7 +17,7 @@ import { SidebarStoreDefinition } from './models/sidebar-store.js';
17
17
  import { RightPanelStoreDefinition } from './models/right-panel-store.js';
18
18
  import { Logger } from './models/logger.js';
19
19
  import type { QVueGlobals } from 'quasar';
20
- import { ToolbarStoreDefinition } from './models/toolbar-store.js';
20
+ import { PinnedCommandsStoreDefinition } from './models/pinned-commands-store.js';
21
21
  import type { App } from 'vue';
22
22
  import { UseConfirmationModal } from './models/confirmation-modal.js';
23
23
  import { FileSystemManagerStoreDefinition } from './models/file-system-manager-store.js';
@@ -106,7 +106,7 @@ export interface OrgNoteApi {
106
106
  useBackgroundSettings: UseBackgroundSettings;
107
107
  useSidebar: SidebarStoreDefinition;
108
108
  useRightPanel: RightPanelStoreDefinition;
109
- useToolbar: ToolbarStoreDefinition;
109
+ usePinnedCommands: PinnedCommandsStoreDefinition;
110
110
  useModal: ModalStoreDefinition;
111
111
  useSettingsUi: SettingsUiStoreDefinition;
112
112
  useConfirmationModal: UseConfirmationModal;
package/models/index.d.ts CHANGED
@@ -56,7 +56,7 @@ export * from './ui-store.js';
56
56
  export * from './sidebar-store.js';
57
57
  export * from './panel.js';
58
58
  export * from './right-panel-store.js';
59
- export * from './toolbar-store.js';
59
+ export * from './pinned-commands-store.js';
60
60
  export * from './modal-store.js';
61
61
  export * from './settings-ui-store.js';
62
62
  export * from './completion-store.js';
package/models/index.js CHANGED
@@ -58,7 +58,7 @@ export * from "./ui-store.js";
58
58
  export * from "./sidebar-store.js";
59
59
  export * from "./panel.js";
60
60
  export * from "./right-panel-store.js";
61
- export * from "./toolbar-store.js";
61
+ export * from "./pinned-commands-store.js";
62
62
  export * from "./modal-store.js";
63
63
  export * from "./settings-ui-store.js";
64
64
  export * from "./completion-store.js";
package/models/panel.d.ts CHANGED
@@ -1,16 +1,12 @@
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
- import type { CommandName } from './command.js';
5
4
  export interface Panel {
6
5
  opened: Ref<boolean>;
7
6
  component: ShallowRef<VueComponent | undefined>;
8
7
  componentConfig: ShallowRef<ComponentConfig<VueComponent> | undefined>;
9
- commands: Ref<CommandName[]>;
10
8
  close: () => void;
11
9
  open: () => void;
12
10
  toggle: () => void;
13
11
  openComponent: <T extends VueComponent>(cmp: T, config?: ComponentConfig<T>) => void;
14
- addCommand: (command: CommandName) => void;
15
- removeCommand: (command: CommandName) => void;
16
12
  }
@@ -0,0 +1,10 @@
1
+ import type { Ref } from 'vue';
2
+ import type { StoreDefinition } from './store.js';
3
+ import type { CommandName } from './command.js';
4
+ export type CommandContext = 'sidebar' | 'sidebar-footer' | 'right-sidebar' | 'edit-toolbar' | 'editor-actions' | ({} & string);
5
+ export interface PinnedCommandsStore {
6
+ getCommands: (context: CommandContext) => Ref<CommandName[]>;
7
+ addCommand: (context: CommandContext, command: CommandName) => void;
8
+ removeCommand: (context: CommandContext, command: CommandName) => void;
9
+ }
10
+ export type PinnedCommandsStoreDefinition = StoreDefinition<PinnedCommandsStore>;
@@ -1,13 +1,11 @@
1
- import type { ExtractPropTypes, Ref } from 'vue';
1
+ import type { ExtractPropTypes } from 'vue';
2
2
  import type { StoreDefinition } from './store.js';
3
3
  import type { VueComponent } from './vue-component.js';
4
4
  import type { Panel } from './panel.js';
5
- import type { CommandName } from './command.js';
6
5
  export type ComponentConfig<T extends VueComponent> = {
7
6
  componentProps?: ExtractPropTypes<T>;
8
7
  };
9
8
  export interface SidebarStore extends Panel {
10
9
  toggle: (cmp?: VueComponent) => void;
11
- footerCommands: Ref<CommandName[]>;
12
10
  }
13
11
  export type SidebarStoreDefinition = StoreDefinition<SidebarStore>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orgnote-api",
3
- "version": "0.40.34",
3
+ "version": "0.40.35",
4
4
  "description": "Official API for creating extensions for OrgNote app",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -1,9 +0,0 @@
1
- import type { Ref } from 'vue';
2
- import { StoreDefinition } from './store.js';
3
- import { CommandName } from './command.js';
4
- export interface ToolbarStore {
5
- commands: Ref<CommandName[]>;
6
- addCommand: (command: CommandName) => void;
7
- removeCommand: (command: CommandName) => void;
8
- }
9
- export type ToolbarStoreDefinition = StoreDefinition<ToolbarStore>;