@tarojs/runtime 3.5.0-theta.0 → 3.5.0-theta.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/LICENSE +21 -0
- package/dist/runtime.esm.js +22 -22
- package/dist/runtime.esm.js.map +1 -1
- package/package.json +9 -9
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/runtime.esm.js
CHANGED
|
@@ -1709,28 +1709,6 @@ class Scaner {
|
|
|
1709
1709
|
}
|
|
1710
1710
|
}
|
|
1711
1711
|
|
|
1712
|
-
function makeMap(str, expectsLowerCase) {
|
|
1713
|
-
const map = Object.create(null);
|
|
1714
|
-
const list = str.split(',');
|
|
1715
|
-
for (let i = 0; i < list.length; i++) {
|
|
1716
|
-
map[list[i]] = true;
|
|
1717
|
-
}
|
|
1718
|
-
return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val];
|
|
1719
|
-
}
|
|
1720
|
-
const specialMiniElements = {
|
|
1721
|
-
img: 'image',
|
|
1722
|
-
iframe: 'web-view'
|
|
1723
|
-
};
|
|
1724
|
-
const internalCompsList = Object.keys(internalComponents)
|
|
1725
|
-
.map(i => i.toLowerCase())
|
|
1726
|
-
.join(',');
|
|
1727
|
-
// https://developers.weixin.qq.com/miniprogram/dev/component
|
|
1728
|
-
const isMiniElements = makeMap(internalCompsList, true);
|
|
1729
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements
|
|
1730
|
-
const isInlineElements = makeMap('a,i,abbr,iframe,select,acronym,slot,small,span,bdi,kbd,strong,big,map,sub,sup,br,mark,mark,meter,template,canvas,textarea,cite,object,time,code,output,u,data,picture,tt,datalist,var,dfn,del,q,em,s,embed,samp,b', true);
|
|
1731
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
|
|
1732
|
-
const isBlockElements = makeMap('address,fieldset,li,article,figcaption,main,aside,figure,nav,blockquote,footer,ol,details,form,p,dialog,h1,h2,h3,h4,h5,h6,pre,dd,header,section,div,hgroup,table,dl,hr,ul,dt', true);
|
|
1733
|
-
|
|
1734
1712
|
function unquote(str) {
|
|
1735
1713
|
const car = str.charAt(0);
|
|
1736
1714
|
const end = str.length - 1;
|
|
@@ -1972,6 +1950,28 @@ function getOnesWeight(selectors) {
|
|
|
1972
1950
|
return selectors.reduce((pre, cur) => pre + (cur.tag ? 1 : 0), 0);
|
|
1973
1951
|
}
|
|
1974
1952
|
|
|
1953
|
+
function makeMap(str, expectsLowerCase) {
|
|
1954
|
+
const map = Object.create(null);
|
|
1955
|
+
const list = str.split(',');
|
|
1956
|
+
for (let i = 0; i < list.length; i++) {
|
|
1957
|
+
map[list[i]] = true;
|
|
1958
|
+
}
|
|
1959
|
+
return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val];
|
|
1960
|
+
}
|
|
1961
|
+
const specialMiniElements = {
|
|
1962
|
+
img: 'image',
|
|
1963
|
+
iframe: 'web-view'
|
|
1964
|
+
};
|
|
1965
|
+
const internalCompsList = Object.keys(internalComponents)
|
|
1966
|
+
.map(i => i.toLowerCase())
|
|
1967
|
+
.join(',');
|
|
1968
|
+
// https://developers.weixin.qq.com/miniprogram/dev/component
|
|
1969
|
+
const isMiniElements = makeMap(internalCompsList, true);
|
|
1970
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements
|
|
1971
|
+
const isInlineElements = makeMap('a,i,abbr,iframe,select,acronym,slot,small,span,bdi,kbd,strong,big,map,sub,sup,br,mark,mark,meter,template,canvas,textarea,cite,object,time,code,output,u,data,picture,tt,datalist,var,dfn,del,q,em,s,embed,samp,b', true);
|
|
1972
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
|
|
1973
|
+
const isBlockElements = makeMap('address,fieldset,li,article,figcaption,main,aside,figure,nav,blockquote,footer,ol,details,form,p,dialog,h1,h2,h3,h4,h5,h6,pre,dd,header,section,div,hgroup,table,dl,hr,ul,dt', true);
|
|
1974
|
+
|
|
1975
1975
|
const closingTagAncestorBreakers = {
|
|
1976
1976
|
li: ['ul', 'ol', 'menu'],
|
|
1977
1977
|
dt: ['dl'],
|