@worktile/theia 3.0.7 → 3.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worktile/theia",
3
- "version": "3.0.7",
3
+ "version": "3.0.10",
4
4
  "description": "theia editor",
5
5
  "author": "YanDong <nanianqiumo@foxmail.com>",
6
6
  "homepage": "https://github.com/atinc/theia#readme",
@@ -9,6 +9,7 @@ import { Overlay } from '@angular/cdk/overlay';
9
9
  import { TheContextService } from '../../services/context.service';
10
10
  import { TheBaseElementComponent } from '../../interfaces';
11
11
  import { ImageElement } from '../../custom-types';
12
+ import { ThyImageService } from 'ngx-tethys/image';
12
13
  import * as i0 from "@angular/core";
13
14
  export declare class TheImageComponent extends TheBaseElementComponent<ImageElement, Editor> implements OnInit, OnDestroy, AfterViewInit, BeforeContextChange<SlateElementContext> {
14
15
  elementRef: ElementRef;
@@ -18,11 +19,15 @@ export declare class TheImageComponent extends TheBaseElementComponent<ImageElem
18
19
  private theContextService;
19
20
  private thyPopover;
20
21
  private overlay;
22
+ private thyImageService;
21
23
  private viewContainerRef;
22
24
  imageEntry: ImageEntry;
23
25
  uploading: boolean;
24
26
  percentage: number;
25
- file: File;
27
+ fileItem: {
28
+ url: string;
29
+ file: File;
30
+ };
26
31
  layoutDefaultWidth: number;
27
32
  layoutOptions: LayoutOption[];
28
33
  private uploadingSubscription;
@@ -34,7 +39,7 @@ export declare class TheImageComponent extends TheBaseElementComponent<ImageElem
34
39
  imageContent: ElementRef;
35
40
  img: ElementRef;
36
41
  layoutToolbar: TemplateRef<any>;
37
- constructor(elementRef: ElementRef, sanitizer: DomSanitizer, imageUploaderService: TheImageUploaderService, cdr: ChangeDetectorRef, theContextService: TheContextService, thyPopover: ThyPopover, overlay: Overlay, viewContainerRef: ViewContainerRef);
42
+ constructor(elementRef: ElementRef, sanitizer: DomSanitizer, imageUploaderService: TheImageUploaderService, cdr: ChangeDetectorRef, theContextService: TheContextService, thyPopover: ThyPopover, overlay: Overlay, thyImageService: ThyImageService, viewContainerRef: ViewContainerRef);
38
43
  beforeContextChange: (value: SlateElementContext<ImageElement>) => void;
39
44
  ngOnInit(): void;
40
45
  onContextChange(): void;
@@ -54,4 +54,5 @@ import { getInsertElementsPath } from './get-insert-elements-path';
54
54
  import { isContainNestedType } from './is-contain-nested-type';
55
55
  import { getToolbarItemDisabled } from './get-toolbar-disabled';
56
56
  import { getPluginByToolbarItem } from './get-plugin-by-toolbar';
57
- export { getLastNode, getAnchorBlockEntry, getAboveByType, getNodes, getNodesByType, getBlockAbove, getPreviousPath, getNode, getParent, getLastChild, getLastChildPath, getNextSiblingNodes, getAbove, getPointBefore, getSelectionNodesByType, getText, getPointFromLocation, getRangeFromBlockStart, getRangeBefore, getBlockCardCenterCursor, getBlockCardAbove, getPlainText, getSelectionMarks, getContainerBlocks, getDirectlyParent, isAncestor, isCollapsed, isEmptyParagraph, isParagraph, isBlockActive, isIncludeTypes, isAncestorEmpty, isBlockAboveEmpty, isNodeTypeIn, isFirstChild, isPointAtRoot, isRangeAtRoot, isBlockTextEmptyAfterSelection, isStart, isRangeAcrossBlocks, isDescendant, isNodeType, isAcrossBlocks, isBlockCardCursor, isEmptyParagraphByPath, isContainer, getInsertElementsPath, isContainNestedType, anchorBlock, anchorBlockEntry, anchorInlineEntry, findPath, findNode, findDescendant, someNode, getToolbarItemDisabled, getPluginByToolbarItem };
57
+ import { isEmptyContent } from './is-empty-content';
58
+ export { getLastNode, getAnchorBlockEntry, getAboveByType, getNodes, getNodesByType, getBlockAbove, getPreviousPath, getNode, getParent, getLastChild, getLastChildPath, getNextSiblingNodes, getAbove, getPointBefore, getSelectionNodesByType, getText, getPointFromLocation, getRangeFromBlockStart, getRangeBefore, getBlockCardCenterCursor, getBlockCardAbove, getPlainText, getSelectionMarks, getContainerBlocks, getDirectlyParent, isAncestor, isCollapsed, isEmptyParagraph, isParagraph, isBlockActive, isIncludeTypes, isAncestorEmpty, isBlockAboveEmpty, isNodeTypeIn, isFirstChild, isPointAtRoot, isRangeAtRoot, isBlockTextEmptyAfterSelection, isStart, isRangeAcrossBlocks, isDescendant, isNodeType, isAcrossBlocks, isBlockCardCursor, isEmptyParagraphByPath, isEmptyContent, isContainer, getInsertElementsPath, isContainNestedType, anchorBlock, anchorBlockEntry, anchorInlineEntry, findPath, findNode, findDescendant, someNode, getToolbarItemDisabled, getPluginByToolbarItem };
@@ -0,0 +1,2 @@
1
+ import { Descendant } from 'slate';
2
+ export declare const isEmptyContent: (children: Descendant[]) => boolean;
@@ -1,5 +1,5 @@
1
1
  import { NgZone, ViewContainerRef } from '@angular/core';
2
- import { Observable } from 'rxjs';
2
+ import { Observable, Subject } from 'rxjs';
3
3
  import { TheOptions } from '../interfaces/editor';
4
4
  import { FontSizes, MarkTypes } from '../constants/node-types';
5
5
  import * as i0 from "@angular/core";
@@ -18,7 +18,7 @@ interface PaintFormatStatus {
18
18
  export declare class TheContextService {
19
19
  private ngZone;
20
20
  private options;
21
- fileList: {
21
+ uploadingFiles: {
22
22
  url: string;
23
23
  file: File;
24
24
  }[];
@@ -26,6 +26,7 @@ export declare class TheContextService {
26
26
  onMouseUp$: Observable<MouseEvent>;
27
27
  onMouseMove$: Observable<MouseEvent>;
28
28
  onMouseDown$: Observable<MouseEvent>;
29
+ uploadingStatus$: Subject<boolean>;
29
30
  constructor(ngZone: NgZone);
30
31
  initialize(options: TheContextOptions): void;
31
32
  getOptions(): TheContextOptions;
@@ -34,11 +35,14 @@ export declare class TheContextService {
34
35
  getEditableElement(): Element;
35
36
  getFirstElementChild(): HTMLElement;
36
37
  layoutDefaultWidth(): number;
37
- setUploadFileList(file: {
38
+ addUploadingFiles(file: {
39
+ url: string;
40
+ file: File;
41
+ }): void;
42
+ removeUploadImage(file: {
38
43
  url: string;
39
44
  file: File;
40
45
  }): void;
41
- removeUploadImage(file: File): void;
42
46
  static ɵfac: i0.ɵɵFactoryDeclaration<TheContextService, never>;
43
47
  static ɵprov: i0.ɵɵInjectableDeclaration<TheContextService>;
44
48
  }
@@ -0,0 +1,3 @@
1
+ import { CustomElementKinds } from '../custom-types';
2
+ import { Element } from 'slate';
3
+ export declare const getAllNodesByType: (nodes: Element[], type: CustomElementKinds) => any;