@viewfly/core 1.0.0-alpha.0 → 1.0.0-alpha.1
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/index.esm.js +5 -1
- package/bundles/index.js +5 -1
- package/jsx-runtime/index.d.ts +11 -0
- package/package.json +2 -2
package/bundles/index.esm.js
CHANGED
|
@@ -657,7 +657,11 @@ class Component extends ReflectiveInjector {
|
|
|
657
657
|
}
|
|
658
658
|
constructor(parentComponent, type, props, key) {
|
|
659
659
|
const annotation = type.annotation || {};
|
|
660
|
-
|
|
660
|
+
const providers = annotation.providers || [];
|
|
661
|
+
super(parentComponent, [...providers, {
|
|
662
|
+
provide: Injector,
|
|
663
|
+
useFactory: () => this
|
|
664
|
+
}], annotation.scope);
|
|
661
665
|
this.parentComponent = parentComponent;
|
|
662
666
|
this.type = type;
|
|
663
667
|
this.props = props;
|
package/bundles/index.js
CHANGED
|
@@ -659,7 +659,11 @@ class Component extends ReflectiveInjector {
|
|
|
659
659
|
}
|
|
660
660
|
constructor(parentComponent, type, props, key) {
|
|
661
661
|
const annotation = type.annotation || {};
|
|
662
|
-
|
|
662
|
+
const providers = annotation.providers || [];
|
|
663
|
+
super(parentComponent, [...providers, {
|
|
664
|
+
provide: Injector,
|
|
665
|
+
useFactory: () => this
|
|
666
|
+
}], annotation.scope);
|
|
663
667
|
this.parentComponent = parentComponent;
|
|
664
668
|
this.type = type;
|
|
665
669
|
this.props = props;
|
package/jsx-runtime/index.d.ts
CHANGED
|
@@ -7,4 +7,15 @@ import { jsx, jsxs, Fragment } from '@viewfly/core';
|
|
|
7
7
|
declare const jsxDEV: typeof jsx;
|
|
8
8
|
export { jsx, jsxs, Fragment, jsxDEV };
|
|
9
9
|
export declare namespace JSX {
|
|
10
|
+
type Element = JSXInternal.Element;
|
|
11
|
+
interface ElementClass extends JSXInternal.ElementClass {
|
|
12
|
+
}
|
|
13
|
+
interface IntrinsicElements extends JSXInternal.IntrinsicElements {
|
|
14
|
+
}
|
|
15
|
+
interface IntrinsicAttributes extends JSXInternal.IntrinsicAttributes {
|
|
16
|
+
}
|
|
17
|
+
interface ElementChildrenAttribute extends JSXInternal.ElementChildrenAttribute {
|
|
18
|
+
}
|
|
19
|
+
interface IntrinsicClassAttributes<T> extends JSXInternal.IntrinsicClassAttributes<T> {
|
|
20
|
+
}
|
|
10
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewfly/core",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.1",
|
|
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",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"bugs": {
|
|
48
48
|
"url": "https://github.com/viewfly/viewfly.git/issues"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "8a25e6e350ba9cade6036506e7fe2aba4e4396ac",
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"reflect-metadata": "^0.1.13"
|
|
53
53
|
}
|