slate-angular 16.1.0-next.4 → 16.1.0-next.5

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": "slate-angular",
3
- "version": "16.1.0-next.4",
3
+ "version": "16.1.0-next.5",
4
4
  "description": "Angular view layer for Slate",
5
5
  "author": "pubuzhixing <pubuzhixing@gmail.com>",
6
6
  "homepage": "https://github.com/worktile/slate-angular#readme",
package/view/base.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
2
2
  import { AngularEditor } from '../plugins/angular-editor';
3
3
  import { SlateViewContext, SlateElementContext, SlateTextContext, SlateLeafContext } from './context';
4
- import { Descendant, Element, Path, Range, Text } from 'slate';
4
+ import { Descendant, Element, Range, Text } from 'slate';
5
5
  import { SlateChildrenContext } from './context';
6
6
  import { ListRender } from './render/list-render';
7
7
  import { LeavesRender } from './render/leaves-render';
@@ -57,7 +57,6 @@ export declare class BaseElementComponent<T extends Element = Element, K extends
57
57
  childrenContext: SlateChildrenContext;
58
58
  get element(): T;
59
59
  get selection(): Range;
60
- get path(): Path;
61
60
  get decorations(): Range[];
62
61
  get children(): Descendant[];
63
62
  get isCollapsed(): boolean;
package/view/context.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { NodeEntry, Range, Element, Ancestor, Text, Path } from 'slate';
1
+ import { NodeEntry, Range, Element, Ancestor, Text } from 'slate';
2
2
  import { SlateStringTemplate } from '../components/string/template.component';
3
3
  import { AngularEditor } from '../plugins/angular-editor';
4
4
  import { ComponentType, ViewType } from '../types/view';
@@ -26,7 +26,6 @@ export interface SlateChildrenContext {
26
26
  export interface SlateElementContext<T extends Element = Element> {
27
27
  element: T;
28
28
  selection: Range | null;
29
- path: Path;
30
29
  decorations: Range[];
31
30
  attributes: SlateElementAttributes;
32
31
  decorate: (entry: NodeEntry) => Range[];
@@ -15,8 +15,8 @@ export declare class ListRender {
15
15
  private differ;
16
16
  initialized: boolean;
17
17
  constructor(viewContext: SlateViewContext, viewContainerRef: ViewContainerRef, getOutletElement: () => HTMLElement);
18
- initialize(children: Descendant[], parent: Ancestor, parentPath: Path, childrenContext: SlateChildrenContext): void;
19
- update(children: Descendant[], parent: Ancestor, parentPath: Path, childrenContext: SlateChildrenContext): void;
18
+ initialize(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext): void;
19
+ update(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext): void;
20
20
  }
21
21
  export declare function getContext(index: number, item: Descendant, parentPath: Path, childrenContext: SlateChildrenContext, viewContext: SlateViewContext): SlateElementContext | SlateTextContext;
22
22
  export declare function getCommonContext(index: number, item: Descendant, parentPath: Path, viewContext: SlateViewContext, childrenContext: SlateChildrenContext): {
@@ -3,7 +3,7 @@ import { ComponentRef, EmbeddedViewRef, ViewContainerRef } from '@angular/core';
3
3
  import { ViewType } from '../../types/view';
4
4
  import { SlateElementContext, SlateLeafContext, SlateTextContext, SlateViewContext } from '../context';
5
5
  import { SlateBlockCard } from '../../components/block-card/block-card.component';
6
- export declare function createEmbeddedViewOrComponent(viewType: ViewType, context: any, viewContext: SlateViewContext, viewContainerRef: ViewContainerRef): ComponentRef<any> | EmbeddedViewRef<any>;
6
+ export declare function createEmbeddedViewOrComponent(viewType: ViewType, context: any, viewContext: SlateViewContext, viewContainerRef: ViewContainerRef): EmbeddedViewRef<any> | ComponentRef<any>;
7
7
  export declare function renderView(view: EmbeddedViewRef<any> | ComponentRef<any>): void;
8
8
  export declare function updateContext(view: EmbeddedViewRef<any> | ComponentRef<any>, newContext: SlateElementContext | SlateTextContext | SlateLeafContext, viewContext: SlateViewContext): void;
9
9
  export declare function mount(views: (EmbeddedViewRef<any> | ComponentRef<any>)[], blockCards: (ComponentRef<SlateBlockCard> | null)[] | null, outletElement: HTMLElement): void;