@tarojs/runtime 4.1.0-alpha.0 → 4.1.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.
- package/dist/bom/URL.d.ts +3 -6
- package/dist/bom/URL.js.map +1 -1
- package/dist/bom/URLSearchParams.d.ts +1 -2
- package/dist/bom/URLSearchParams.js.map +1 -1
- package/dist/bom/document.d.ts +2 -3
- package/dist/bom/document.js.map +1 -1
- package/dist/bom/getComputedStyle.d.ts +4 -5
- package/dist/bom/getComputedStyle.js.map +1 -1
- package/dist/bom/history.d.ts +5 -7
- package/dist/bom/history.js.map +1 -1
- package/dist/bom/location.d.ts +3 -5
- package/dist/bom/location.js.map +1 -1
- package/dist/bom/navigator.d.ts +1 -2
- package/dist/bom/navigator.js.map +1 -1
- package/dist/bom/raf.d.ts +2 -2
- package/dist/bom/raf.js.map +1 -1
- package/dist/bom/window.d.ts +8 -9
- package/dist/bom/window.js.map +1 -1
- package/dist/constants/index.d.ts +52 -53
- package/dist/constants/index.js.map +1 -1
- package/dist/current.d.ts +5 -5
- package/dist/current.js.map +1 -1
- package/dist/dom/anchor-element.d.ts +2 -3
- package/dist/dom/anchor-element.js.map +1 -1
- package/dist/dom/class-list.d.ts +2 -3
- package/dist/dom/class-list.js.map +1 -1
- package/dist/dom/document.d.ts +6 -10
- package/dist/dom/document.js.map +1 -1
- package/dist/dom/element.d.ts +6 -7
- package/dist/dom/element.js.map +1 -1
- package/dist/dom/event-source.d.ts +3 -3
- package/dist/dom/event-source.js.map +1 -1
- package/dist/dom/event-target.d.ts +2 -3
- package/dist/dom/event-target.js.map +1 -1
- package/dist/dom/event.d.ts +5 -6
- package/dist/dom/event.js.map +1 -1
- package/dist/dom/form.d.ts +3 -4
- package/dist/dom/form.js.map +1 -1
- package/dist/dom/node.d.ts +8 -39
- package/dist/dom/node.js.map +1 -1
- package/dist/{node_types-9ac5b4dd.d.ts → dom/node_types.d.ts} +1 -2
- package/dist/dom/root.d.ts +3 -4
- package/dist/dom/root.js +1 -1
- package/dist/dom/root.js.map +1 -1
- package/dist/dom/style.d.ts +2 -3
- package/dist/dom/style.js.map +1 -1
- package/dist/dom/style_properties.js +1 -0
- package/dist/dom/style_properties.js.map +1 -1
- package/dist/dom/svg.d.ts +2 -3
- package/dist/dom/text.d.ts +3 -4
- package/dist/dom/text.js.map +1 -1
- package/dist/dom/transfer.d.ts +2 -3
- package/dist/dom/transfer.js.map +1 -1
- package/dist/dom/tree.d.ts +3 -3
- package/dist/dom/tree.js.map +1 -1
- package/dist/dom-external/element.d.ts +3 -4
- package/dist/dom-external/element.js.map +1 -1
- package/dist/dom-external/index.js.map +1 -1
- package/dist/dom-external/inner-html/html.d.ts +2 -3
- package/dist/dom-external/inner-html/html.js.map +1 -1
- package/dist/dom-external/inner-html/parser.d.ts +7 -7
- package/dist/dom-external/inner-html/parser.js +1 -1
- package/dist/dom-external/inner-html/parser.js.map +1 -1
- package/dist/dom-external/inner-html/scaner.d.ts +3 -3
- package/dist/dom-external/inner-html/scaner.js.map +1 -1
- package/dist/dom-external/inner-html/style.d.ts +3 -3
- package/dist/dom-external/inner-html/style.js.map +1 -1
- package/dist/dom-external/inner-html/tags.d.ts +5 -6
- package/dist/dom-external/inner-html/tags.js.map +1 -1
- package/dist/dom-external/inner-html/utils.d.ts +1 -2
- package/dist/dom-external/inner-html/utils.js.map +1 -1
- package/dist/dom-external/mutation-observer/implements.d.ts +6 -25
- package/dist/dom-external/mutation-observer/implements.js.map +1 -1
- package/dist/dom-external/mutation-observer/index.d.ts +6 -5
- package/dist/dom-external/mutation-observer/index.js.map +1 -1
- package/dist/{record-32b054d8.d.ts → dom-external/mutation-observer/record.d.ts} +3 -4
- package/dist/dom-external/node.d.ts +5 -6
- package/dist/dom-external/node.js.map +1 -1
- package/dist/dsl/common.d.ts +14 -15
- package/dist/dsl/common.js +8 -5
- package/dist/dsl/common.js.map +1 -1
- package/dist/{instance-530729bd.d.ts → dsl/instance.d.ts} +13 -14
- package/dist/emitter/emitter.d.ts +2 -2
- package/dist/env.d.ts +2 -2
- package/dist/env.js.map +1 -1
- package/dist/hydrate.d.ts +4 -5
- package/dist/hydrate.js.map +1 -1
- package/dist/index.cjs.js +15 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +33 -32
- package/dist/interface/element.d.ts +4 -0
- package/dist/interface/event-target.d.ts +11 -0
- package/dist/interface/event.d.ts +15 -0
- package/dist/interface/hydrate.d.ts +29 -0
- package/dist/interface/index.d.ts +7 -0
- package/dist/interface/node.d.ts +7 -0
- package/dist/{options-530729bd.d.ts → interface/options.d.ts} +4 -5
- package/dist/interface/utils.d.ts +2 -0
- package/dist/next-tick.d.ts +2 -3
- package/dist/next-tick.js.map +1 -1
- package/dist/options.d.ts +2 -3
- package/dist/options.js.map +1 -1
- package/dist/perf.d.ts +2 -2
- package/dist/perf.js.map +1 -1
- package/dist/polyfill/array.d.ts +2 -3
- package/dist/polyfill/array.js.map +1 -1
- package/dist/polyfill/index.js.map +1 -1
- package/dist/polyfill/intersection-observer.d.ts +1 -2
- package/dist/polyfill/intersection-observer.js +3 -6
- package/dist/polyfill/intersection-observer.js.map +1 -1
- package/dist/polyfill/object.d.ts +3 -4
- package/dist/polyfill/object.js.map +1 -1
- package/dist/runtime.esm.js +11 -10
- package/dist/runtime.esm.js.map +1 -1
- package/dist/utils/cache.d.ts +1 -2
- package/dist/utils/cache.js.map +1 -1
- package/dist/utils/index.d.ts +17 -18
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/lodash.d.ts +2 -3
- package/dist/utils/lodash.js.map +1 -1
- package/dist/utils/router.d.ts +7 -8
- package/dist/utils/router.js.map +1 -1
- package/package.json +8 -5
- package/dist/index-26658829.d.ts +0 -23
- package/dist/index.cjs.d.ts +0 -813
- package/dist/runtime.esm.d.ts +0 -813
package/dist/runtime.esm.js
CHANGED
|
@@ -1763,6 +1763,7 @@ const WEBKIT = 'webkit';
|
|
|
1763
1763
|
const styleProperties = [
|
|
1764
1764
|
'all',
|
|
1765
1765
|
'appearance',
|
|
1766
|
+
'backdropFilter',
|
|
1766
1767
|
'blockOverflow',
|
|
1767
1768
|
'blockSize',
|
|
1768
1769
|
'bottom',
|
|
@@ -3124,7 +3125,7 @@ function parser(html, document) {
|
|
|
3124
3125
|
html = styleTagParser.extractStyle(html);
|
|
3125
3126
|
const tokens = new Scaner(html).scan();
|
|
3126
3127
|
const root = { tagName: '', children: [], type: 'element', attributes: [] };
|
|
3127
|
-
const state = { tokens,
|
|
3128
|
+
const state = { tokens, cursor: 0, stack: [root] };
|
|
3128
3129
|
parse(state);
|
|
3129
3130
|
return format(root.children, document, {
|
|
3130
3131
|
styleTagParser,
|
|
@@ -4258,6 +4259,11 @@ function createRecursiveComponentConfig(componentName) {
|
|
|
4258
4259
|
}
|
|
4259
4260
|
}
|
|
4260
4261
|
: EMPTY_OBJ;
|
|
4262
|
+
// 不同平台的个性化配置
|
|
4263
|
+
const extraOptions = {};
|
|
4264
|
+
if (process.env.TARO_ENV === 'jd') {
|
|
4265
|
+
extraOptions.addGlobalClass = true;
|
|
4266
|
+
}
|
|
4261
4267
|
return hooks.call('modifyRecursiveComponentConfig', Object.assign({ properties: {
|
|
4262
4268
|
i: {
|
|
4263
4269
|
type: Object,
|
|
@@ -4269,9 +4275,7 @@ function createRecursiveComponentConfig(componentName) {
|
|
|
4269
4275
|
type: String,
|
|
4270
4276
|
value: ''
|
|
4271
4277
|
}
|
|
4272
|
-
}, options: {
|
|
4273
|
-
virtualHost: !isCustomWrapper
|
|
4274
|
-
}, methods: {
|
|
4278
|
+
}, options: Object.assign(Object.assign({}, extraOptions), { virtualHost: !isCustomWrapper }), methods: {
|
|
4275
4279
|
eh: eventHandler
|
|
4276
4280
|
} }, lifeCycles), { isCustomWrapper });
|
|
4277
4281
|
}
|
|
@@ -4632,10 +4636,7 @@ function handleIntersectionObserverObjectPolyfill() {
|
|
|
4632
4636
|
target: target,
|
|
4633
4637
|
boundingClientRect: targetRect,
|
|
4634
4638
|
rootBounds: rootRect,
|
|
4635
|
-
intersectionRect: intersectionRect
|
|
4636
|
-
intersectionRatio: -1,
|
|
4637
|
-
isIntersecting: false,
|
|
4638
|
-
});
|
|
4639
|
+
intersectionRect: intersectionRect});
|
|
4639
4640
|
if (!oldEntry) {
|
|
4640
4641
|
this._queuedEntries.push(newEntry);
|
|
4641
4642
|
}
|
|
@@ -4835,7 +4836,7 @@ function handleIntersectionObserverObjectPolyfill() {
|
|
|
4835
4836
|
*/
|
|
4836
4837
|
function addEvent(node, event, fn, opt_useCapture) {
|
|
4837
4838
|
if (isFunction(node.addEventListener)) {
|
|
4838
|
-
node.addEventListener(event, fn, opt_useCapture
|
|
4839
|
+
node.addEventListener(event, fn, opt_useCapture);
|
|
4839
4840
|
}
|
|
4840
4841
|
else if (isFunction(node.attachEvent)) {
|
|
4841
4842
|
node.attachEvent('on' + event, fn);
|
|
@@ -4851,7 +4852,7 @@ function handleIntersectionObserverObjectPolyfill() {
|
|
|
4851
4852
|
*/
|
|
4852
4853
|
function removeEvent(node, event, fn, opt_useCapture) {
|
|
4853
4854
|
if (isFunction(node.removeEventListener)) {
|
|
4854
|
-
node.removeEventListener(event, fn, opt_useCapture
|
|
4855
|
+
node.removeEventListener(event, fn, opt_useCapture);
|
|
4855
4856
|
}
|
|
4856
4857
|
else if (isFunction(node.detatchEvent)) {
|
|
4857
4858
|
node.detatchEvent('on' + event, fn);
|