@worktile/theia 2.4.7 → 2.4.8

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.
@@ -7,6 +7,7 @@ import { ToolbarOption } from './toolbar';
7
7
  import { ElementKinds, FontSizes } from '../constants/node-types';
8
8
  import { AutoFormatRule } from './auto-format';
9
9
  import { CustomElementKinds } from '../custom-types';
10
+ import { InjectionToken } from '@angular/core';
10
11
  export interface TheEditor extends AngularEditor, HistoryEditor {
11
12
  renderElement: (element: Element) => ViewType;
12
13
  renderLeaf: (text: Text) => ViewType;
@@ -69,6 +70,20 @@ export declare enum TheDataMode {
69
70
  json = "json",
70
71
  html = "html"
71
72
  }
73
+ export declare enum TheMode {
74
+ default = "default",
75
+ print = "print"
76
+ }
77
+ export declare class TheModeConfig {
78
+ mode: TheMode;
79
+ }
80
+ export declare const THE_MODE_TOKEN: InjectionToken<TheModeConfig>;
81
+ export declare const THE_MODE_PROVIDER: {
82
+ provide: InjectionToken<TheModeConfig>;
83
+ useValue: {
84
+ mode: TheMode;
85
+ };
86
+ };
72
87
  export interface TheOptions {
73
88
  allowContainerOperateTypes?: CustomElementKinds[];
74
89
  mode?: TheDataMode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worktile/theia",
3
- "version": "2.4.7",
3
+ "version": "2.4.8",
4
4
  "description": "theia editor",
5
5
  "author": "YanDong <nanianqiumo@foxmail.com>",
6
6
  "homepage": "https://github.com/atinc/theia#readme",
@@ -2,8 +2,8 @@ import { ElementRef, ChangeDetectorRef, OnInit, AfterViewInit, NgZone, OnDestroy
2
2
  import { ThyNotifyService } from 'ngx-tethys/notify';
3
3
  import { Editor } from 'slate';
4
4
  import { CodeMirrorComponent } from 'ng-codemirror';
5
- import { DropdownMode, TheCodeConfig, ToolbarItemMode } from '../../constants';
6
- import { DefaultToolbarItem, TheBaseElementComponent } from '../../interfaces';
5
+ import { DropdownMode, ToolbarItemMode } from '../../constants';
6
+ import { DefaultToolbarItem, TheBaseElementComponent, TheModeConfig } from '../../interfaces';
7
7
  import { CodeElement } from '../../custom-types';
8
8
  import { ThyResizeEvent } from 'ngx-tethys/resizable';
9
9
  import { TheContextService } from '../../services/context.service';
@@ -41,7 +41,7 @@ export declare class TheCodeComponent extends TheBaseElementComponent<CodeElemen
41
41
  get code(): string;
42
42
  codemirror: CodeMirrorComponent;
43
43
  onContextChange(): void;
44
- constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, thyNotifyService: ThyNotifyService, contextService: TheContextService, ngZone: NgZone, config: TheCodeConfig);
44
+ constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, thyNotifyService: ThyNotifyService, contextService: TheContextService, ngZone: NgZone, config: TheModeConfig);
45
45
  ngOnInit(): void;
46
46
  ngAfterViewInit(): void;
47
47
  renderCodemirror(): void;