@viewfly/core 1.0.0-alpha.19 → 1.0.0-alpha.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/index.esm.js +7 -6
- package/bundles/index.js +7 -6
- package/package.json +2 -2
- package/jsx-dev-runtime/node_modules/.bin/rimraf +0 -17
- package/jsx-dev-runtime/node_modules/.bin/rollup +0 -17
- package/jsx-dev-runtime/node_modules/.bin/tsc +0 -17
- package/jsx-dev-runtime/node_modules/.bin/tsserver +0 -17
package/bundles/index.esm.js
CHANGED
|
@@ -1671,9 +1671,7 @@ function updateNativeNodeProperties(nativeRenderer, newAtom, oldAtom, parentComp
|
|
|
1671
1671
|
const nativeNode = newAtom.nativeNode;
|
|
1672
1672
|
const oldVNode = oldAtom.jsxNode;
|
|
1673
1673
|
if (newVNode === oldVNode) {
|
|
1674
|
-
|
|
1675
|
-
updateView(nativeRenderer, child);
|
|
1676
|
-
});
|
|
1674
|
+
updateElementChildren(newAtom, oldAtom, nativeRenderer, parentComponent, context, isSvg);
|
|
1677
1675
|
return;
|
|
1678
1676
|
}
|
|
1679
1677
|
const changes = getObjectChanges(newVNode.props, oldVNode.props);
|
|
@@ -1766,6 +1764,11 @@ function updateNativeNodeProperties(nativeRenderer, newAtom, oldAtom, parentComp
|
|
|
1766
1764
|
}
|
|
1767
1765
|
nativeRenderer.setProperty(nativeNode, key, value, isSvg);
|
|
1768
1766
|
}
|
|
1767
|
+
updateElementChildren(newAtom, oldAtom, nativeRenderer, parentComponent, context, isSvg);
|
|
1768
|
+
applyRefs(unBindRefs, nativeNode, false);
|
|
1769
|
+
applyRefs(bindRefs, nativeNode, true);
|
|
1770
|
+
}
|
|
1771
|
+
function updateElementChildren(newAtom, oldAtom, nativeRenderer, parentComponent, context, isSvg) {
|
|
1769
1772
|
/**
|
|
1770
1773
|
* 不能仅依赖 children 是否相等的判断来确定是否要继续向下 diff
|
|
1771
1774
|
* 如:
|
|
@@ -1780,7 +1783,7 @@ function updateNativeNodeProperties(nativeRenderer, newAtom, oldAtom, parentComp
|
|
|
1780
1783
|
* 但,children 内可能有子组件也发生了变化,如果不继续 diff,那么,子组件
|
|
1781
1784
|
* 的视图更新将不会发生
|
|
1782
1785
|
*/
|
|
1783
|
-
newAtom.child = createChildChain(
|
|
1786
|
+
newAtom.child = createChildChain(newAtom.jsxNode.props.children, isSvg);
|
|
1784
1787
|
if (!newAtom.child) {
|
|
1785
1788
|
cleanElementChildren(oldAtom, nativeRenderer);
|
|
1786
1789
|
}
|
|
@@ -1791,8 +1794,6 @@ function updateNativeNodeProperties(nativeRenderer, newAtom, oldAtom, parentComp
|
|
|
1791
1794
|
rootHost: context.rootHost
|
|
1792
1795
|
});
|
|
1793
1796
|
}
|
|
1794
|
-
applyRefs(unBindRefs, nativeNode, false);
|
|
1795
|
-
applyRefs(bindRefs, nativeNode, true);
|
|
1796
1797
|
}
|
|
1797
1798
|
function applyRefs(refs, nativeNode, binding) {
|
|
1798
1799
|
if (refs) {
|
package/bundles/index.js
CHANGED
|
@@ -1673,9 +1673,7 @@ function updateNativeNodeProperties(nativeRenderer, newAtom, oldAtom, parentComp
|
|
|
1673
1673
|
const nativeNode = newAtom.nativeNode;
|
|
1674
1674
|
const oldVNode = oldAtom.jsxNode;
|
|
1675
1675
|
if (newVNode === oldVNode) {
|
|
1676
|
-
|
|
1677
|
-
updateView(nativeRenderer, child);
|
|
1678
|
-
});
|
|
1676
|
+
updateElementChildren(newAtom, oldAtom, nativeRenderer, parentComponent, context, isSvg);
|
|
1679
1677
|
return;
|
|
1680
1678
|
}
|
|
1681
1679
|
const changes = getObjectChanges(newVNode.props, oldVNode.props);
|
|
@@ -1768,6 +1766,11 @@ function updateNativeNodeProperties(nativeRenderer, newAtom, oldAtom, parentComp
|
|
|
1768
1766
|
}
|
|
1769
1767
|
nativeRenderer.setProperty(nativeNode, key, value, isSvg);
|
|
1770
1768
|
}
|
|
1769
|
+
updateElementChildren(newAtom, oldAtom, nativeRenderer, parentComponent, context, isSvg);
|
|
1770
|
+
applyRefs(unBindRefs, nativeNode, false);
|
|
1771
|
+
applyRefs(bindRefs, nativeNode, true);
|
|
1772
|
+
}
|
|
1773
|
+
function updateElementChildren(newAtom, oldAtom, nativeRenderer, parentComponent, context, isSvg) {
|
|
1771
1774
|
/**
|
|
1772
1775
|
* 不能仅依赖 children 是否相等的判断来确定是否要继续向下 diff
|
|
1773
1776
|
* 如:
|
|
@@ -1782,7 +1785,7 @@ function updateNativeNodeProperties(nativeRenderer, newAtom, oldAtom, parentComp
|
|
|
1782
1785
|
* 但,children 内可能有子组件也发生了变化,如果不继续 diff,那么,子组件
|
|
1783
1786
|
* 的视图更新将不会发生
|
|
1784
1787
|
*/
|
|
1785
|
-
newAtom.child = createChildChain(
|
|
1788
|
+
newAtom.child = createChildChain(newAtom.jsxNode.props.children, isSvg);
|
|
1786
1789
|
if (!newAtom.child) {
|
|
1787
1790
|
cleanElementChildren(oldAtom, nativeRenderer);
|
|
1788
1791
|
}
|
|
@@ -1793,8 +1796,6 @@ function updateNativeNodeProperties(nativeRenderer, newAtom, oldAtom, parentComp
|
|
|
1793
1796
|
rootHost: context.rootHost
|
|
1794
1797
|
});
|
|
1795
1798
|
}
|
|
1796
|
-
applyRefs(unBindRefs, nativeNode, false);
|
|
1797
|
-
applyRefs(bindRefs, nativeNode, true);
|
|
1798
1799
|
}
|
|
1799
1800
|
function applyRefs(refs, nativeNode, binding) {
|
|
1800
1801
|
if (refs) {
|
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.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",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"bugs": {
|
|
51
51
|
"url": "https://github.com/viewfly/viewfly.git/issues"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "b66ca589f7662cd518fc2e5955b3e3ff9de83f94",
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"reflect-metadata": "^0.2.2"
|
|
56
56
|
}
|
|
@@ -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/rimraf@3.0.2/node_modules/rimraf/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/rimraf@3.0.2/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/rimraf@3.0.2/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../rimraf/bin.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../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/rollup@3.29.4/node_modules/rollup/dist/bin/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/rollup@3.29.4/node_modules/rollup/dist/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/rollup@3.29.4/node_modules/rollup/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/rollup@3.29.4/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/rollup@3.29.4/node_modules/rollup/dist/bin/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/rollup@3.29.4/node_modules/rollup/dist/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/rollup@3.29.4/node_modules/rollup/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/rollup@3.29.4/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../rollup/dist/bin/rollup" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../rollup/dist/bin/rollup" "$@"
|
|
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/typescript@5.4.5/node_modules/typescript/bin/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/typescript@5.4.5/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/bin/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/typescript@5.4.5/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/bin/tsc" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/bin/tsc" "$@"
|
|
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/typescript@5.4.5/node_modules/typescript/bin/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/typescript@5.4.5/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/node_modules"
|
|
10
|
-
else
|
|
11
|
-
export NODE_PATH="/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/bin/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/typescript@5.4.5/node_modules:/Users/tanbo/Documents/lib/viewfly/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/bin/tsserver" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/bin/tsserver" "$@"
|
|
17
|
-
fi
|