@viewfly/core 1.0.0-alpha.0 → 1.0.0-alpha.2

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.
@@ -657,7 +657,11 @@ class Component extends ReflectiveInjector {
657
657
  }
658
658
  constructor(parentComponent, type, props, key) {
659
659
  const annotation = type.annotation || {};
660
- super(parentComponent, annotation.providers || [], annotation.scope);
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;
@@ -1880,7 +1884,7 @@ function viewfly(config) {
1880
1884
  return destroyed ? null : root;
1881
1885
  };
1882
1886
  }), function () {
1883
- if (destroyed) {
1887
+ if (destroyed || !autoUpdate) {
1884
1888
  return;
1885
1889
  }
1886
1890
  nextTick(() => {
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
- super(parentComponent, annotation.providers || [], annotation.scope);
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;
@@ -1882,7 +1886,7 @@ function viewfly(config) {
1882
1886
  return destroyed ? null : root;
1883
1887
  };
1884
1888
  }), function () {
1885
- if (destroyed) {
1889
+ if (destroyed || !autoUpdate) {
1886
1890
  return;
1887
1891
  }
1888
1892
  nextTick(() => {
@@ -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.0",
3
+ "version": "1.0.0-alpha.2",
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": "49d0f91818ce7bf9474ae386d8eb52624b31dbde",
50
+ "gitHead": "494829c8d0cde30d0a35c61351c863ea14515ac2",
51
51
  "dependencies": {
52
52
  "reflect-metadata": "^0.1.13"
53
53
  }