@viewfly/core 0.0.1-alpha.6 → 0.0.1-alpha.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.
@@ -3,10 +3,6 @@ export interface MapChanges {
3
3
  remove: [string, any][];
4
4
  set: [string, any][];
5
5
  }
6
- export interface ArrayChanges {
7
- remove: string[];
8
- add: string[];
9
- }
10
6
  export interface ObjectChanges {
11
7
  remove: [string, any][];
12
8
  add: [string, any][];
@@ -14,11 +10,9 @@ export interface ObjectChanges {
14
10
  export declare const refKey = "ref";
15
11
  export declare function getObjectChanges(target: Record<string, any>, source: Record<string, any>): ObjectChanges;
16
12
  export declare function getMapChanges(target: Map<string, any>, source: Map<string, any>): MapChanges;
17
- export declare function getSetChanges(target: Set<string>, source: Set<string>): ArrayChanges;
18
13
  export declare function getNodeChanges(newVNode: JSXElement | Component, oldVNode: JSXElement | Component): {
19
14
  styleChanges: MapChanges;
20
15
  attrChanges: MapChanges;
21
- classesChanges: ArrayChanges;
22
16
  listenerChanges: ObjectChanges;
23
17
  isChanged: boolean;
24
18
  };
@@ -8,8 +8,7 @@ export declare abstract class NativeRenderer<ElementNode = NativeNode, TextNode
8
8
  abstract removeProperty(node: ElementNode, key: string): void;
9
9
  abstract setStyle(target: ElementNode, key: string, value: any): void;
10
10
  abstract removeStyle(target: ElementNode, key: string): void;
11
- abstract addClass(target: ElementNode, name: string): void;
12
- abstract removeClass(target: ElementNode, name: string): void;
11
+ abstract setClass(target: ElementNode, value: string): void;
13
12
  abstract listen<T = any>(node: ElementNode, type: string, callback: (ev: T) => any): void;
14
13
  abstract unListen(node: ElementNode, type: string, callback: (ev: any) => any): void;
15
14
  abstract remove(node: ElementNode | TextNode): void;
@@ -16,9 +16,9 @@ export declare class Renderer {
16
16
  private reconcileElement;
17
17
  private applyChanges;
18
18
  private diff;
19
+ private createChanges;
19
20
  private cleanView;
20
- private reuseAndUpdate;
21
- private createViewByAtom;
21
+ private temporarilyRemove;
22
22
  private buildView;
23
23
  private componentRender;
24
24
  private createChainByComponentFactory;