@viewfly/core 0.2.3 → 0.2.5
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 +11 -10
- package/bundles/index.js +11 -10
- package/package.json +2 -2
package/bundles/index.esm.js
CHANGED
|
@@ -1555,7 +1555,7 @@ function createChainByComponentFactory(jsxComponent, parent, isSvg) {
|
|
|
1555
1555
|
};
|
|
1556
1556
|
}
|
|
1557
1557
|
function createChainByJSXElement(component, element, parent, isSvg) {
|
|
1558
|
-
isSvg = element.type === 'svg'
|
|
1558
|
+
isSvg = isSvg || element.type === 'svg';
|
|
1559
1559
|
const atom = {
|
|
1560
1560
|
jsxNode: element,
|
|
1561
1561
|
parent,
|
|
@@ -1668,6 +1668,7 @@ function updateNativeNodeProperties(nativeRenderer, newVNode, oldVNode, nativeNo
|
|
|
1668
1668
|
const changes = getObjectChanges(newVNode.props, oldVNode.props);
|
|
1669
1669
|
let unBindRefs;
|
|
1670
1670
|
let bindRefs;
|
|
1671
|
+
newVNode.on = oldVNode.on;
|
|
1671
1672
|
for (const [key, value] of changes.remove) {
|
|
1672
1673
|
if (key === 'children') {
|
|
1673
1674
|
continue;
|
|
@@ -1721,7 +1722,6 @@ function updateNativeNodeProperties(nativeRenderer, newVNode, oldVNode, nativeNo
|
|
|
1721
1722
|
}
|
|
1722
1723
|
if (/^on[A-Z]/.test(key)) {
|
|
1723
1724
|
const listenType = key.replace(/^on/, '').toLowerCase();
|
|
1724
|
-
newVNode.on = oldVNode.on;
|
|
1725
1725
|
newVNode.on[listenType].listenFn = newValue;
|
|
1726
1726
|
continue;
|
|
1727
1727
|
}
|
|
@@ -1808,7 +1808,7 @@ class RootComponent extends Component {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
|
|
1810
1810
|
const viewflyErrorFn = makeError('Viewfly');
|
|
1811
|
-
const VERSION = "0.2.
|
|
1811
|
+
const VERSION = "0.2.5";
|
|
1812
1812
|
function viewfly(config) {
|
|
1813
1813
|
const { context, nativeRenderer, autoUpdate, root } = Object.assign({ autoUpdate: true }, config);
|
|
1814
1814
|
const appProviders = [];
|
|
@@ -1823,13 +1823,14 @@ function viewfly(config) {
|
|
|
1823
1823
|
const render = createRenderer(rootComponent, nativeRenderer, VERSION);
|
|
1824
1824
|
let isStarted = false;
|
|
1825
1825
|
let task = null;
|
|
1826
|
-
function
|
|
1827
|
-
if (
|
|
1828
|
-
|
|
1829
|
-
task = null;
|
|
1830
|
-
callback();
|
|
1831
|
-
});
|
|
1826
|
+
function nextTick(callback) {
|
|
1827
|
+
if (task !== null) {
|
|
1828
|
+
return;
|
|
1832
1829
|
}
|
|
1830
|
+
task = setTimeout(() => {
|
|
1831
|
+
task = null;
|
|
1832
|
+
callback();
|
|
1833
|
+
});
|
|
1833
1834
|
}
|
|
1834
1835
|
let appHost = null;
|
|
1835
1836
|
const app = {
|
|
@@ -1875,7 +1876,7 @@ function viewfly(config) {
|
|
|
1875
1876
|
render(host);
|
|
1876
1877
|
};
|
|
1877
1878
|
rootComponent.onChange = function () {
|
|
1878
|
-
|
|
1879
|
+
nextTick(refresh);
|
|
1879
1880
|
};
|
|
1880
1881
|
return app;
|
|
1881
1882
|
},
|
package/bundles/index.js
CHANGED
|
@@ -1557,7 +1557,7 @@ function createChainByComponentFactory(jsxComponent, parent, isSvg) {
|
|
|
1557
1557
|
};
|
|
1558
1558
|
}
|
|
1559
1559
|
function createChainByJSXElement(component, element, parent, isSvg) {
|
|
1560
|
-
isSvg = element.type === 'svg'
|
|
1560
|
+
isSvg = isSvg || element.type === 'svg';
|
|
1561
1561
|
const atom = {
|
|
1562
1562
|
jsxNode: element,
|
|
1563
1563
|
parent,
|
|
@@ -1670,6 +1670,7 @@ function updateNativeNodeProperties(nativeRenderer, newVNode, oldVNode, nativeNo
|
|
|
1670
1670
|
const changes = getObjectChanges(newVNode.props, oldVNode.props);
|
|
1671
1671
|
let unBindRefs;
|
|
1672
1672
|
let bindRefs;
|
|
1673
|
+
newVNode.on = oldVNode.on;
|
|
1673
1674
|
for (const [key, value] of changes.remove) {
|
|
1674
1675
|
if (key === 'children') {
|
|
1675
1676
|
continue;
|
|
@@ -1723,7 +1724,6 @@ function updateNativeNodeProperties(nativeRenderer, newVNode, oldVNode, nativeNo
|
|
|
1723
1724
|
}
|
|
1724
1725
|
if (/^on[A-Z]/.test(key)) {
|
|
1725
1726
|
const listenType = key.replace(/^on/, '').toLowerCase();
|
|
1726
|
-
newVNode.on = oldVNode.on;
|
|
1727
1727
|
newVNode.on[listenType].listenFn = newValue;
|
|
1728
1728
|
continue;
|
|
1729
1729
|
}
|
|
@@ -1810,7 +1810,7 @@ class RootComponent extends Component {
|
|
|
1810
1810
|
}
|
|
1811
1811
|
|
|
1812
1812
|
const viewflyErrorFn = makeError('Viewfly');
|
|
1813
|
-
const VERSION = "0.2.
|
|
1813
|
+
const VERSION = "0.2.5";
|
|
1814
1814
|
function viewfly(config) {
|
|
1815
1815
|
const { context, nativeRenderer, autoUpdate, root } = Object.assign({ autoUpdate: true }, config);
|
|
1816
1816
|
const appProviders = [];
|
|
@@ -1825,13 +1825,14 @@ function viewfly(config) {
|
|
|
1825
1825
|
const render = createRenderer(rootComponent, nativeRenderer, VERSION);
|
|
1826
1826
|
let isStarted = false;
|
|
1827
1827
|
let task = null;
|
|
1828
|
-
function
|
|
1829
|
-
if (
|
|
1830
|
-
|
|
1831
|
-
task = null;
|
|
1832
|
-
callback();
|
|
1833
|
-
});
|
|
1828
|
+
function nextTick(callback) {
|
|
1829
|
+
if (task !== null) {
|
|
1830
|
+
return;
|
|
1834
1831
|
}
|
|
1832
|
+
task = setTimeout(() => {
|
|
1833
|
+
task = null;
|
|
1834
|
+
callback();
|
|
1835
|
+
});
|
|
1835
1836
|
}
|
|
1836
1837
|
let appHost = null;
|
|
1837
1838
|
const app = {
|
|
@@ -1877,7 +1878,7 @@ function viewfly(config) {
|
|
|
1877
1878
|
render(host);
|
|
1878
1879
|
};
|
|
1879
1880
|
rootComponent.onChange = function () {
|
|
1880
|
-
|
|
1881
|
+
nextTick(refresh);
|
|
1881
1882
|
};
|
|
1882
1883
|
return app;
|
|
1883
1884
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewfly/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
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,5 +47,5 @@
|
|
|
47
47
|
"bugs": {
|
|
48
48
|
"url": "https://github.com/viewfly/viewfly.git/issues"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "b66ca589f7662cd518fc2e5955b3e3ff9de83f94"
|
|
51
51
|
}
|