@viewfly/core 0.0.30 → 0.0.31
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.
|
@@ -33,6 +33,7 @@ export declare class JSXComponent implements JSXTypeof<JSXInternal.ComponentSetu
|
|
|
33
33
|
props: Props;
|
|
34
34
|
factory: (parentComponent: Component) => Component;
|
|
35
35
|
key?: Key | undefined;
|
|
36
|
+
static createInstance(type: JSXInternal.ComponentSetup, props: Props, factory: (parentComponent: Component) => Component, key?: Key): JSXComponent;
|
|
36
37
|
$$typeOf: JSXInternal.ComponentSetup<any>;
|
|
37
38
|
constructor(type: JSXInternal.ComponentSetup, props: Props, factory: (parentComponent: Component) => Component, key?: Key | undefined);
|
|
38
39
|
createInstance(parentComponent: Component): Component;
|
package/bundles/index.esm.js
CHANGED
|
@@ -1151,7 +1151,7 @@ function jsx(setup, props, key) {
|
|
|
1151
1151
|
if (typeof setup === 'string') {
|
|
1152
1152
|
return JSXElement.createInstance(setup, props, key);
|
|
1153
1153
|
}
|
|
1154
|
-
return
|
|
1154
|
+
return JSXComponent.createInstance(setup, props, function (context) {
|
|
1155
1155
|
return new Component(context, setup, props, key);
|
|
1156
1156
|
}, key);
|
|
1157
1157
|
}
|
|
@@ -1175,6 +1175,9 @@ class JSXElement {
|
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
1177
|
class JSXComponent {
|
|
1178
|
+
static createInstance(type, props, factory, key) {
|
|
1179
|
+
return new JSXComponent(type, props, factory, key);
|
|
1180
|
+
}
|
|
1178
1181
|
constructor(type, props, factory, key) {
|
|
1179
1182
|
this.type = type;
|
|
1180
1183
|
this.props = props;
|
package/bundles/index.js
CHANGED
|
@@ -1153,7 +1153,7 @@ function jsx(setup, props, key) {
|
|
|
1153
1153
|
if (typeof setup === 'string') {
|
|
1154
1154
|
return JSXElement.createInstance(setup, props, key);
|
|
1155
1155
|
}
|
|
1156
|
-
return
|
|
1156
|
+
return JSXComponent.createInstance(setup, props, function (context) {
|
|
1157
1157
|
return new Component(context, setup, props, key);
|
|
1158
1158
|
}, key);
|
|
1159
1159
|
}
|
|
@@ -1177,6 +1177,9 @@ class JSXElement {
|
|
|
1177
1177
|
}
|
|
1178
1178
|
}
|
|
1179
1179
|
class JSXComponent {
|
|
1180
|
+
static createInstance(type, props, factory, key) {
|
|
1181
|
+
return new JSXComponent(type, props, factory, key);
|
|
1182
|
+
}
|
|
1180
1183
|
constructor(type, props, factory, key) {
|
|
1181
1184
|
this.type = type;
|
|
1182
1185
|
this.props = props;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewfly/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.31",
|
|
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",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"bugs": {
|
|
47
47
|
"url": "https://github.com/viewfly/viewfly.git/issues"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "cb3bcc1d390c6ee85411c1713f966b3d50f6e066"
|
|
50
50
|
}
|