@viewfly/core 0.0.1-alpha.0 → 0.0.1-alpha.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/bundles/foundation/_utils.d.ts +3 -19
- package/bundles/foundation/injection-tokens.d.ts +1 -2
- package/bundles/foundation/renderer.d.ts +3 -3
- package/bundles/index.esm.js +596 -572
- package/bundles/index.js +598 -573
- package/bundles/model/component.d.ts +48 -24
- package/bundles/model/jsx-element.d.ts +21 -29
- package/bundles/model/root.component.d.ts +2 -1
- package/bundles/public-api.d.ts +1 -0
- package/bundles/viewfly.d.ts +6 -4
- package/package.json +5 -3
|
@@ -1,24 +1,8 @@
|
|
|
1
|
-
import { Component, JSXElement } from '../model/_api';
|
|
2
|
-
export interface MapChanges {
|
|
3
|
-
remove: [string, any][];
|
|
4
|
-
set: [string, any][];
|
|
5
|
-
}
|
|
6
|
-
export interface ArrayChanges {
|
|
7
|
-
remove: string[];
|
|
8
|
-
add: string[];
|
|
9
|
-
}
|
|
10
1
|
export interface ObjectChanges {
|
|
11
2
|
remove: [string, any][];
|
|
12
3
|
add: [string, any][];
|
|
4
|
+
replace: [string, any, any][];
|
|
13
5
|
}
|
|
14
6
|
export declare const refKey = "ref";
|
|
15
|
-
export declare function getObjectChanges(
|
|
16
|
-
export declare function
|
|
17
|
-
export declare function getSetChanges(target: Set<string>, source: Set<string>): ArrayChanges;
|
|
18
|
-
export declare function getNodeChanges(newVNode: JSXElement | Component, oldVNode: JSXElement | Component): {
|
|
19
|
-
styleChanges: MapChanges;
|
|
20
|
-
attrChanges: MapChanges;
|
|
21
|
-
classesChanges: ArrayChanges;
|
|
22
|
-
listenerChanges: ObjectChanges;
|
|
23
|
-
isChanged: boolean;
|
|
24
|
-
};
|
|
7
|
+
export declare function getObjectChanges(newProps?: Record<string, any>, oldProps?: Record<string, any>): ObjectChanges;
|
|
8
|
+
export declare function classToString(config: unknown): any;
|
|
@@ -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
|
|
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;
|
|
@@ -12,16 +12,15 @@ export declare class Renderer {
|
|
|
12
12
|
render(): void;
|
|
13
13
|
refresh(): void;
|
|
14
14
|
private reconcile;
|
|
15
|
+
private getPrevSibling;
|
|
15
16
|
private reconcileElement;
|
|
16
17
|
private applyChanges;
|
|
17
18
|
private diff;
|
|
19
|
+
private createChanges;
|
|
18
20
|
private cleanView;
|
|
19
|
-
private reuseAndUpdate;
|
|
20
|
-
private createViewByAtom;
|
|
21
21
|
private buildView;
|
|
22
22
|
private componentRender;
|
|
23
23
|
private createChainByComponentFactory;
|
|
24
|
-
private createChain;
|
|
25
24
|
private createChainByJSXElement;
|
|
26
25
|
private createChainByJSXText;
|
|
27
26
|
private createChainByChildren;
|
|
@@ -30,4 +29,5 @@ export declare class Renderer {
|
|
|
30
29
|
private createElement;
|
|
31
30
|
private createTextNode;
|
|
32
31
|
private updateNativeNodeProperties;
|
|
32
|
+
private applyRefs;
|
|
33
33
|
}
|