dochub-sdk 0.1.9 → 0.1.11

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 (2) hide show
  1. package/interfaces/core.ts +12 -2
  2. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import { IDocHubContentProvider } from './content';
2
2
  import { IDocHubProtocol } from './protocol';
3
3
  import { IDocHubDocument } from './document';
4
+ import { IDocHubEditor } from './editor';
4
5
  import { IDocHubUIComponent } from './uicomponent';
5
6
 
6
-
7
7
  export interface IDocHubEnv {
8
8
  [id: string]: string
9
9
  }
@@ -38,6 +38,8 @@ export interface IDocHubRouter {
38
38
  registerRoute(route: object);
39
39
  // Регистрирует middleware в формате VUE2
40
40
  registerMiddleware(middleware: object);
41
+ // Указывает на какой роут перейти в DocHub
42
+ navigate(url: string);
41
43
  }
42
44
 
43
45
  export interface IDocHubContentProviders {
@@ -65,6 +67,13 @@ export interface IDocHubDocuments {
65
67
  fetch(): string[];
66
68
  }
67
69
 
70
+ export interface IDocHubEditors {
71
+ // Регистрирует редактор на тип документа
72
+ register(type: string, editor: IDocHubEditor);
73
+ // Возвращает массив зарегистрированных редакторов
74
+ fetch(): string[];
75
+ }
76
+
68
77
  export interface IDocHubUI {
69
78
  // Регистрирует UI компонент в слоте
70
79
  register(slot: string, component: IDocHubUIComponent);
@@ -88,11 +97,12 @@ export interface IDocHubDataLake {
88
97
  // Главный интерфейс
89
98
  export interface IDocHubCore {
90
99
  problems: IDocHubProblems; // Проблемы
91
- settings: IDocHubSettings; // Пользовтельские настройки
100
+ settings: IDocHubSettings; // Пользовательские настройки
92
101
  router: IDocHubRouter; // Работа с UI роутами
93
102
  contentProviders: IDocHubContentProviders; // Провайдеры контента
94
103
  protocols: IDocHubProtocols; // Протоколы доступа к данным
95
104
  documents: IDocHubDocuments; // Документы
105
+ editors: IDocHubEditors; // Редакторы
96
106
  ui: IDocHubUI; // UI порт
97
107
  dataLake: IDocHubDataLake; // Интерфейс к архкоду
98
108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dochub-sdk",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "The DocHub System Development Kit.",
5
5
  "private": false,
6
6
  "main": "index.ts",