@viewfly/core 0.0.1-alpha.12 → 0.0.1-alpha.13

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  Viewfly
2
2
  ================================
3
3
 
4
- Viewfly 是一个简单、数据驱动的前端视图库。此包为 Viewfly 的内核实现,要开发完整的应该的应用,还需要结合 `@viewfly/platform-browser` 包,才能在浏览器运行。
4
+ Viewfly 是一个简单、数据驱动的前端框架。此项目为 Viewfly 的内核实现,要开发完整的应该的应用,还需要结合 `@viewfly/platform-browser` 包,才能在浏览器运行。
5
5
 
6
6
  完整文档请参考官方网站:[viewfly.org](https://viewfly.org)
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@viewfly/core",
3
- "version": "0.0.1-alpha.12",
3
+ "version": "0.0.1-alpha.13",
4
4
  "description": "Viewfly is a simple and easy-to-use JavaScript framework with an intuitive development experience.",
5
5
  "main": "./bundles/index.js",
6
6
  "module": "./bundles/index.esm.js",
7
7
  "typings": "./bundles/public-api.d.ts",
8
8
  "scripts": {
9
- "start": "webpack-dev-server",
10
- "test": "cross-env env=test jest",
11
- "test-c": "cross-env env=test jest --coverage",
12
9
  "build:lib": "rimraf bundles && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
13
10
  "publish:lib": "npm run build:lib && npm publish --access=public"
14
11
  },
@@ -37,5 +34,5 @@
37
34
  "bugs": {
38
35
  "url": "https://github.com/viewfly/viewfly.git/issues"
39
36
  },
40
- "gitHead": "e5fdc69779bbfd6a1128b98a30d8732dbda7fcd3"
37
+ "gitHead": "2ae122f502ad0d06b5fedba052ecad2d4640b1e1"
41
38
  }
@@ -1 +0,0 @@
1
- export declare function makeError(name: string): (message: string) => Error;
@@ -1,2 +0,0 @@
1
- export * from './injection-tokens';
2
- export * from './renderer';
@@ -1,9 +0,0 @@
1
- export interface ObjectChanges {
2
- remove: [string, any][];
3
- add: [string, any][];
4
- replace: [string, any, any][];
5
- }
6
- export declare const refKey = "ref";
7
- export declare function getObjectChanges(newProps?: Record<string, any>, oldProps?: Record<string, any>): ObjectChanges;
8
- export declare function classToString(config: unknown): any;
9
- export declare function styleToObject(style: string | Record<string, any>): Record<string, any>;
@@ -1,17 +0,0 @@
1
- export type NativeNode = Record<string, any>;
2
- export declare abstract class NativeRenderer<ElementNode = NativeNode, TextNode = NativeNode> {
3
- abstract createElement(name: string): ElementNode;
4
- abstract createTextNode(textContent: string): TextNode;
5
- abstract setProperty(node: ElementNode, key: string, value: any): void;
6
- abstract appendChild(parent: ElementNode, newChild: ElementNode | TextNode): void;
7
- abstract prependChild(parent: ElementNode, newChild: ElementNode | TextNode): void;
8
- abstract removeProperty(node: ElementNode, key: string): void;
9
- abstract setStyle(target: ElementNode, key: string, value: any): void;
10
- abstract removeStyle(target: ElementNode, key: string): void;
11
- abstract setClass(target: ElementNode, value: string): void;
12
- abstract listen<T = any>(node: ElementNode, type: string, callback: (ev: T) => any): void;
13
- abstract unListen(node: ElementNode, type: string, callback: (ev: any) => any): void;
14
- abstract remove(node: ElementNode | TextNode): void;
15
- abstract syncTextContent(target: TextNode, content: string): void;
16
- abstract insertAfter(newNode: ElementNode | TextNode, ref: ElementNode | TextNode): void;
17
- }
@@ -1,33 +0,0 @@
1
- import { RootComponent } from '../model/_api';
2
- import { NativeNode, NativeRenderer } from './injection-tokens';
3
- export declare abstract class RootComponentRef {
4
- abstract component: RootComponent;
5
- abstract host: NativeNode;
6
- }
7
- export declare class Renderer {
8
- private nativeRenderer;
9
- private rootComponentRef;
10
- private componentAtomCaches;
11
- constructor(nativeRenderer: NativeRenderer, rootComponentRef: RootComponentRef);
12
- render(): void;
13
- refresh(): void;
14
- private reconcile;
15
- private getPrevSibling;
16
- private reconcileElement;
17
- private applyChanges;
18
- private diff;
19
- private createChanges;
20
- private cleanView;
21
- private buildView;
22
- private componentRender;
23
- private createChainByComponentFactory;
24
- private createChainByJSXElement;
25
- private createChainByJSXText;
26
- private createChainByChildren;
27
- private linkTemplate;
28
- private link;
29
- private createElement;
30
- private createTextNode;
31
- private updateNativeNodeProperties;
32
- private applyRefs;
33
- }