@viewfly/core 0.0.18 → 0.0.20
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/di/_api.d.ts +10 -0
- package/bundles/di/forward-ref.d.ts +10 -0
- package/bundles/di/injectable.d.ts +20 -0
- package/bundles/di/injection-token.d.ts +8 -0
- package/bundles/di/injector.d.ts +22 -0
- package/bundles/di/metadata.d.ts +43 -0
- package/bundles/di/null-injector.d.ts +6 -0
- package/bundles/di/provider.d.ts +30 -0
- package/bundles/di/reflective-injector.d.ts +32 -0
- package/bundles/di/reflective-provider.d.ts +20 -0
- package/bundles/di/type.d.ts +7 -0
- package/bundles/di/utils/_api.d.ts +3 -0
- package/bundles/di/utils/annotations.d.ts +33 -0
- package/bundles/di/utils/decorators.d.ts +17 -0
- package/bundles/di/utils/stringify.d.ts +1 -0
- package/bundles/foundation/_api.d.ts +5 -0
- package/bundles/foundation/_utils.d.ts +4 -0
- package/bundles/{model → foundation}/component.d.ts +6 -6
- package/bundles/{model → foundation}/jsx-element.d.ts +3 -6
- package/bundles/foundation/renderer.d.ts +6 -3
- package/bundles/{model → foundation}/root.component.d.ts +3 -4
- package/bundles/{model → foundation}/types.d.ts +6 -4
- package/bundles/index.esm.js +648 -73
- package/bundles/index.js +668 -81
- package/bundles/public-api.d.ts +1 -2
- package/bundles/viewfly.d.ts +10 -10
- package/package.json +2 -4
- package/bundles/model/_api.d.ts +0 -5
- package/jsx-runtime/index.d.ts +0 -23
- package/jsx-runtime/index.esm.js +0 -11
- package/jsx-runtime/index.js +0 -14
- package/jsx-runtime/node_modules/.bin/rimraf +0 -17
- package/jsx-runtime/node_modules/.bin/rollup +0 -17
- /package/bundles/{model → foundation}/memo.d.ts +0 -0
package/bundles/public-api.d.ts
CHANGED
package/bundles/viewfly.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { Injector, Provider, ReflectiveInjector } from '
|
|
2
|
-
import { NativeNode } from './foundation/_api';
|
|
3
|
-
import { JSXInternal } from './model/_api';
|
|
1
|
+
import { Injector, Provider, ReflectiveInjector } from './di/_api';
|
|
2
|
+
import { JSXInternal, NativeNode } from './foundation/_api';
|
|
4
3
|
/**
|
|
5
4
|
* Viewfly 配置项
|
|
6
5
|
*/
|
|
7
6
|
export interface Config {
|
|
8
|
-
/** Viewfly IoC 容器中提供者集合 */
|
|
9
|
-
providers?: Provider[];
|
|
10
7
|
/** 是否自动更新视图 */
|
|
11
8
|
autoUpdate?: boolean;
|
|
12
9
|
/** 根节点 */
|
|
13
|
-
root: JSXInternal.
|
|
14
|
-
/**
|
|
10
|
+
root: JSXInternal.JSXNode;
|
|
11
|
+
/** 应用的上下文 */
|
|
15
12
|
context?: Injector;
|
|
16
13
|
}
|
|
17
14
|
/**
|
|
18
15
|
* Viewfly 核心类,用于启动一个 Viewfly 应用
|
|
19
16
|
*/
|
|
20
|
-
export declare class Viewfly extends ReflectiveInjector {
|
|
17
|
+
export declare class Viewfly<T extends NativeNode = NativeNode> extends ReflectiveInjector {
|
|
21
18
|
private config;
|
|
22
19
|
private destroyed;
|
|
23
20
|
private rootComponent;
|
|
24
|
-
private
|
|
21
|
+
private task;
|
|
25
22
|
constructor(config: Config);
|
|
23
|
+
provide(providers: Provider | Provider[]): this;
|
|
26
24
|
/**
|
|
27
25
|
* 启动 Viewfly
|
|
28
26
|
* @param host 应用根节点
|
|
29
27
|
*/
|
|
30
|
-
mount(host:
|
|
28
|
+
mount(host: T): this;
|
|
29
|
+
render(): void;
|
|
31
30
|
/**
|
|
32
31
|
* 销毁 Viewfly 实例
|
|
33
32
|
*/
|
|
34
33
|
destroy(): void;
|
|
35
34
|
private createRootComponent;
|
|
35
|
+
private microTask;
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewfly/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
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",
|
|
@@ -29,8 +29,6 @@
|
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"keywords": [],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@tanbo/di": "^1.1.5",
|
|
33
|
-
"@tanbo/stream": "^1.2.0",
|
|
34
32
|
"reflect-metadata": "^0.1.13"
|
|
35
33
|
},
|
|
36
34
|
"devDependencies": {
|
|
@@ -51,5 +49,5 @@
|
|
|
51
49
|
"bugs": {
|
|
52
50
|
"url": "https://github.com/viewfly/viewfly.git/issues"
|
|
53
51
|
},
|
|
54
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "a19a00bd5aff994452cba16277e0d1d90570bdb9"
|
|
55
53
|
}
|
package/bundles/model/_api.d.ts
DELETED
package/jsx-runtime/index.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment, JSXInternal } from '@viewfly/core';
|
|
2
|
-
import { NativeElements } from '@viewfly/platform-browser';
|
|
3
|
-
/**
|
|
4
|
-
* JSX namespace for usage with @jsxImportsSource directive
|
|
5
|
-
* when ts compilerOptions.jsx is 'react-jsx'
|
|
6
|
-
* https://www.typescriptlang.org/tsconfig#jsxImportSource
|
|
7
|
-
*/
|
|
8
|
-
declare const jsxDEV: typeof jsx;
|
|
9
|
-
export { jsx, jsxs, Fragment, jsxDEV };
|
|
10
|
-
export declare namespace JSX {
|
|
11
|
-
interface Element extends JSXInternal.Element {
|
|
12
|
-
}
|
|
13
|
-
interface ElementClass extends JSXInternal.ElementClass {
|
|
14
|
-
}
|
|
15
|
-
interface IntrinsicElements extends NativeElements, JSXInternal.IntrinsicElements {
|
|
16
|
-
}
|
|
17
|
-
interface IntrinsicAttributes extends JSXInternal.IntrinsicAttributes {
|
|
18
|
-
}
|
|
19
|
-
interface ElementChildrenAttribute extends JSXInternal.ElementChildrenAttribute {
|
|
20
|
-
}
|
|
21
|
-
interface IntrinsicClassAttributes<T> extends JSXInternal.IntrinsicClassAttributes<T> {
|
|
22
|
-
}
|
|
23
|
-
}
|
package/jsx-runtime/index.esm.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx } from '@viewfly/core';
|
|
2
|
-
export { Fragment, jsx, jsxs } from '@viewfly/core';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* JSX namespace for usage with @jsxImportsSource directive
|
|
6
|
-
* when ts compilerOptions.jsx is 'react-jsx'
|
|
7
|
-
* https://www.typescriptlang.org/tsconfig#jsxImportSource
|
|
8
|
-
*/
|
|
9
|
-
const jsxDEV = jsx;
|
|
10
|
-
|
|
11
|
-
export { jsxDEV };
|
package/jsx-runtime/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.jsxDEV = exports.Fragment = exports.jsxs = exports.jsx = void 0;
|
|
4
|
-
var core_1 = require("@viewfly/core");
|
|
5
|
-
Object.defineProperty(exports, "jsx", { enumerable: true, get: function () { return core_1.jsx; } });
|
|
6
|
-
Object.defineProperty(exports, "jsxs", { enumerable: true, get: function () { return core_1.jsxs; } });
|
|
7
|
-
Object.defineProperty(exports, "Fragment", { enumerable: true, get: function () { return core_1.Fragment; } });
|
|
8
|
-
/**
|
|
9
|
-
* JSX namespace for usage with @jsxImportsSource directive
|
|
10
|
-
* when ts compilerOptions.jsx is 'react-jsx'
|
|
11
|
-
* https://www.typescriptlang.org/tsconfig#jsxImportSource
|
|
12
|
-
*/
|
|
13
|
-
var jsxDEV = core_1.jsx;
|
|
14
|
-
exports.jsxDEV = jsxDEV;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
-
esac
|
|
7
|
-
|
|
8
|
-
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/node_modules"
|
|
12
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/bin.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/bin.js" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
-
esac
|
|
7
|
-
|
|
8
|
-
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="$NODE_PATH:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/node_modules"
|
|
12
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/rollup@3.26.3/node_modules/rollup/dist/bin/rollup" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/rollup@3.26.3/node_modules/rollup/dist/bin/rollup" "$@"
|
|
17
|
-
fi
|
|
File without changes
|