@worktile/theia 15.1.15 → 15.1.17

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.
@@ -17,6 +17,17 @@ export interface ImageEntry {
17
17
  reSized?: boolean;
18
18
  size?: number;
19
19
  }
20
+ export interface PreviewImageInfo {
21
+ image: {
22
+ thumbUrl?: SafeUrl | string;
23
+ originUrl?: SafeUrl | string;
24
+ };
25
+ index: number;
26
+ imageGroup: {
27
+ thumbUrl?: SafeUrl | string;
28
+ originUrl?: SafeUrl | string;
29
+ }[];
30
+ }
20
31
  export interface LayoutOption extends ToolbarItem {
21
32
  handle?: (e: MouseEvent, key: Alignment | LayoutTypes) => void;
22
33
  }
@@ -30,4 +41,5 @@ export interface ImagePluginOptions {
30
41
  allowParentTypes?: CustomElementKinds[];
31
42
  imageTypes?: string[];
32
43
  disablePreview?: boolean;
44
+ preview?: (data: PreviewImageInfo) => void;
33
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worktile/theia",
3
- "version": "15.1.15",
3
+ "version": "15.1.17",
4
4
  "description": "theia editor",
5
5
  "author": "YanDong <nanianqiumo@foxmail.com>",
6
6
  "homepage": "https://github.com/atinc/theia#readme",
@@ -1,6 +1,5 @@
1
1
  import { Overlay } from '@angular/cdk/overlay';
2
2
  import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
3
- import { ThyImageService } from 'ngx-tethys/image';
4
3
  import { ThyPopover } from 'ngx-tethys/popover';
5
4
  import { Editor } from 'slate';
6
5
  import { BeforeContextChange, SlateElementContext } from 'slate-angular';
@@ -9,6 +8,7 @@ import { ImageElement } from '../../custom-types';
9
8
  import { TheBaseElementComponent } from '../../interfaces';
10
9
  import { ImageEntry, LayoutOption, TheImageUploaderService } from '../../interfaces/image';
11
10
  import { TheContextService } from '../../services/context.service';
11
+ import { ThyImageDirective, ThyImageGroupComponent } from 'ngx-tethys/image';
12
12
  import * as i0 from "@angular/core";
13
13
  export declare class TheImageComponent extends TheBaseElementComponent<ImageElement, Editor> implements OnInit, OnDestroy, AfterViewInit, BeforeContextChange<SlateElementContext> {
14
14
  elementRef: ElementRef;
@@ -17,8 +17,8 @@ export declare class TheImageComponent extends TheBaseElementComponent<ImageElem
17
17
  private theContextService;
18
18
  private thyPopover;
19
19
  private overlay;
20
- private thyImageService;
21
20
  private viewContainerRef;
21
+ imageGroupComponent: ThyImageGroupComponent;
22
22
  naturalWidth: number;
23
23
  naturalHeight: number;
24
24
  imageEntry: ImageEntry;
@@ -36,14 +36,17 @@ export declare class TheImageComponent extends TheBaseElementComponent<ImageElem
36
36
  private mouseUpSubscription;
37
37
  private dragable;
38
38
  private layoutToolbarRef;
39
+ private imagePluginOptions;
39
40
  get isOpen(): boolean;
40
41
  get imageBindingWidth(): number;
41
42
  imageContent: ElementRef;
42
43
  img: ElementRef;
43
44
  layoutToolbar: TemplateRef<any>;
44
- constructor(elementRef: ElementRef, imageUploaderService: TheImageUploaderService, cdr: ChangeDetectorRef, theContextService: TheContextService, thyPopover: ThyPopover, overlay: Overlay, thyImageService: ThyImageService, viewContainerRef: ViewContainerRef);
45
+ imageDirective: ThyImageDirective;
46
+ constructor(elementRef: ElementRef, imageUploaderService: TheImageUploaderService, cdr: ChangeDetectorRef, theContextService: TheContextService, thyPopover: ThyPopover, overlay: Overlay, viewContainerRef: ViewContainerRef, imageGroupComponent: ThyImageGroupComponent);
45
47
  beforeContextChange: (value: SlateElementContext<ImageElement>) => void;
46
48
  ngOnInit(): void;
49
+ imageClick(): void;
47
50
  onContextChange(): void;
48
51
  ngOnDestroy(): void;
49
52
  ngAfterViewInit(): void;