@tarojs/runtime 4.0.7-alpha.1 → 4.0.7-alpha.3

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/index.js CHANGED
@@ -19,7 +19,7 @@ export { Style } from './dom/style.js';
19
19
  export { SVGElement } from './dom/svg.js';
20
20
  export { TaroText } from './dom/text.js';
21
21
  export { MutationObserver } from './dom-external/mutation-observer/index.js';
22
- export { A, APP, BEHAVIORS, BODY, CATCHMOVE, CATCH_VIEW, CHANGE, CLASS, CLICK_VIEW, COMMENT, COMPILE_MODE, CONFIRM, CONTAINER, CONTEXT_ACTIONS, CURRENT_TARGET, CUSTOM_WRAPPER, DATASET, DATE, DOCUMENT_ELEMENT_NAME, DOCUMENT_FRAGMENT, EVENT_CALLBACK_RESULT, EXTERNAL_CLASSES, FOCUS, HEAD, HOOKS_APP_ID, HTML, ID, INPUT, KEY_CODE, OBJECT, ON_HIDE, ON_LOAD, ON_READY, ON_SHOW, OPTIONS, PAGE_INIT, PROPERTY_THRESHOLD, PROPS, PURE_VIEW, ROOT_STR, SET_DATA, SET_TIMEOUT, STATIC_VIEW, STYLE, TARGET, TARO_RUNTIME, TIME_STAMP, TOUCHMOVE, TYPE, UID, VALUE, VIEW } from './constants/index.js';
22
+ export { A, APP, BEHAVIORS, BODY, CATCHMOVE, CATCH_VIEW, CHANGE, CLASS, COMMENT, COMPILE_MODE, CONFIRM, CONTAINER, CONTEXT_ACTIONS, CURRENT_TARGET, CUSTOM_WRAPPER, DATASET, DATE, DOCUMENT_ELEMENT_NAME, DOCUMENT_FRAGMENT, EVENT_CALLBACK_RESULT, EXTERNAL_CLASSES, FOCUS, HEAD, HOOKS_APP_ID, HTML, ID, INPUT, KEY_CODE, OBJECT, ON_HIDE, ON_LOAD, ON_READY, ON_SHOW, OPTIONS, PAGE_INIT, PROPERTY_THRESHOLD, PROPS, PURE_VIEW, ROOT_STR, SET_DATA, SET_TIMEOUT, STATIC_VIEW, STYLE, TARGET, TARO_RUNTIME, TIME_STAMP, TOUCHMOVE, TYPE, UID, VALUE, VIEW } from './constants/index.js';
23
23
  export { Current, getCurrentInstance } from './current.js';
24
24
  export { eventSource } from './dom/event-source.js';
25
25
  export { createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify } from './dsl/common.js';
@@ -468,7 +468,7 @@ function handleIntersectionObserverObjectPolyfill() {
468
468
  */
469
469
  function addEvent(node, event, fn, opt_useCapture) {
470
470
  if (isFunction(node.addEventListener)) {
471
- node.addEventListener(event, fn, opt_useCapture );
471
+ node.addEventListener(event, fn, opt_useCapture);
472
472
  }
473
473
  else if (isFunction(node.attachEvent)) {
474
474
  node.attachEvent('on' + event, fn);
@@ -484,7 +484,7 @@ function handleIntersectionObserverObjectPolyfill() {
484
484
  */
485
485
  function removeEvent(node, event, fn, opt_useCapture) {
486
486
  if (isFunction(node.removeEventListener)) {
487
- node.removeEventListener(event, fn, opt_useCapture );
487
+ node.removeEventListener(event, fn, opt_useCapture);
488
488
  }
489
489
  else if (isFunction(node.detatchEvent)) {
490
490
  node.detatchEvent('on' + event, fn);
@@ -1 +1 @@
1
- {"version":3,"file":"intersection-observer.js","sources":["../../src/polyfill/intersection-observer.ts"],"sourcesContent":["/* eslint-disable eqeqeq */\nimport { isFunction, isNumber } from '@tarojs/shared'\n\nimport { throttle } from '../utils'\n\nexport function handleIntersectionObserverPolyfill () {\n // Exit early if all IntersectionObserver and IntersectionObserverEntry\n // features are natively supported.\n if (\n 'IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'intersectionRatio' in window.IntersectionObserverEntry.prototype\n ) {\n if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {\n // Minimal polyfill for Edge 15's lack of `isIntersecting`\n // See: https://github.com/w3c/IntersectionObserver/issues/211\n Object.defineProperty(window.IntersectionObserverEntry.prototype, 'isIntersecting', {\n get: function () {\n return this.intersectionRatio > 0\n }\n })\n }\n } else {\n handleIntersectionObserverObjectPolyfill()\n }\n}\n\nfunction handleIntersectionObserverObjectPolyfill () {\n const document = window.document\n\n /**\n * An IntersectionObserver registry. This registry exists to hold a strong\n * reference to IntersectionObserver instances currently observing a target\n * element. Without this registry, instances without another reference may be\n * garbage collected.\n */\n const registry: number[] = []\n\n /**\n * Creates the global IntersectionObserverEntry constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry\n * @param {Object} entry A dictionary of instance properties.\n * @constructor\n */\n function IntersectionObserverEntry (entry: IntersectionObserverEntryInit) {\n this.time = entry.time\n this.target = entry.target\n this.rootBounds = entry.rootBounds\n this.boundingClientRect = entry.boundingClientRect\n this.intersectionRect = entry.intersectionRect || getEmptyRect()\n this.isIntersecting = !!entry.intersectionRect\n\n // Calculates the intersection ratio.\n const targetRect = this.boundingClientRect\n const targetArea = targetRect.width * targetRect.height\n const intersectionRect = this.intersectionRect\n const intersectionArea = intersectionRect.width * intersectionRect.height\n\n // Sets intersection ratio.\n if (targetArea) {\n // Round the intersection ratio to avoid floating point math issues:\n // https://github.com/w3c/IntersectionObserver/issues/324\n this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4))\n } else {\n // If area is zero and is intersecting, sets to 1, otherwise to 0\n this.intersectionRatio = this.isIntersecting ? 1 : 0\n }\n }\n\n /**\n * Creates the global IntersectionObserver constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface\n * @param {Function} callback The function to be invoked after intersection\n * changes have queued. The function is not invoked if the queue has\n * been emptied by calling the `takeRecords` method.\n * @param {Object=} opt_options Optional configuration options.\n * @constructor\n */\n function IntersectionObserver (callback: IntersectionObserverCallback, options: IntersectionObserverInit = {}) {\n if (!isFunction(callback)) {\n throw new Error('callback must be a function')\n }\n\n if (options.root && options.root.nodeType != 1) {\n throw new Error('root must be an Element')\n }\n\n // Binds and throttles `this._checkForIntersections`.\n this._checkForIntersections = throttle(\n this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT)\n\n // Private properties.\n this._callback = callback\n this._observationTargets = []\n this._queuedEntries = []\n this._rootMarginValues = this._parseRootMargin(options.rootMargin)\n\n // Public properties.\n this.thresholds = this._initThresholds(options.threshold)\n this.root = options.root || null\n this.rootMargin = this._rootMarginValues.map(function (margin) {\n return margin.value + margin.unit\n }).join(' ')\n }\n\n /**\n * The minimum interval within which the document will be checked for\n * intersection changes.\n */\n IntersectionObserver.prototype.THROTTLE_TIMEOUT = 100\n\n /**\n * The frequency in which the polyfill polls for intersection changes.\n * this can be updated on a per instance basis and must be set prior to\n * calling `observe` on the first target.\n */\n IntersectionObserver.prototype.POLL_INTERVAL = null\n\n /**\n * Use a mutation observer on the root element\n * to detect intersection changes.\n */\n IntersectionObserver.prototype.USE_MUTATION_OBSERVER = true\n\n /**\n * Starts observing a target element for intersection changes based on\n * the thresholds values.\n * @param {Element} target The DOM element to observe.\n */\n IntersectionObserver.prototype.observe = function (target) {\n const isTargetAlreadyObserved = this._observationTargets.some(function (item) {\n return item.element == target\n })\n\n if (isTargetAlreadyObserved) return\n\n if (!(target && target.nodeType == 1)) {\n throw new Error('target must be an Element')\n }\n\n this._registerInstance()\n this._observationTargets.push({ element: target, entry: null })\n this._monitorIntersections()\n this._checkForIntersections()\n }\n\n /**\n * Stops observing a target element for intersection changes.\n * @param {Element} target The DOM element to observe.\n */\n IntersectionObserver.prototype.unobserve = function (target) {\n this._observationTargets =\n this._observationTargets.filter(function (item) {\n return item.element != target\n })\n if (!this._observationTargets.length) {\n this._unmonitorIntersections()\n this._unregisterInstance()\n }\n }\n\n /**\n * Stops observing all target elements for intersection changes.\n */\n IntersectionObserver.prototype.disconnect = function () {\n this._observationTargets = []\n this._unmonitorIntersections()\n this._unregisterInstance()\n }\n\n /**\n * Returns any queue entries that have not yet been reported to the\n * callback and clears the queue. This can be used in conjunction with the\n * callback to obtain the absolute most up-to-date intersection information.\n * @return {Array} The currently queued entries.\n */\n IntersectionObserver.prototype.takeRecords = function () {\n const records = this._queuedEntries.slice()\n this._queuedEntries = []\n return records\n }\n\n /**\n * Accepts the threshold value from the user configuration object and\n * returns a sorted array of unique threshold values. If a value is not\n * between 0 and 1 and error is thrown.\n * @private\n * @param {Array|number=} opt_threshold An optional threshold value or\n * a list of threshold values, defaulting to [0].\n * @return {Array} A sorted list of unique and valid threshold values.\n */\n IntersectionObserver.prototype._initThresholds = function (opt_threshold) {\n let threshold = opt_threshold || [0]\n if (!Array.isArray(threshold)) threshold = [threshold]\n\n return threshold.sort().filter(function (t, i, a) {\n if (!isNumber(t) || isNaN(t) || t < 0 || t > 1) {\n throw new Error('threshold must be a number between 0 and 1 inclusively')\n }\n return t !== a[i - 1]\n })\n }\n\n /**\n * Accepts the rootMargin value from the user configuration object\n * and returns an array of the four margin values as an object containing\n * the value and unit properties. If any of the values are not properly\n * formatted or use a unit other than px or %, and error is thrown.\n * @private\n * @param {string=} opt_rootMargin An optional rootMargin value,\n * defaulting to '0px'.\n * @return {Array<Object>} An array of margin objects with the keys\n * value and unit.\n */\n IntersectionObserver.prototype._parseRootMargin = function (opt_rootMargin) {\n const marginString = opt_rootMargin || '0px'\n const margins = marginString.split(/\\s+/).map(function (margin) {\n const parts = /^(-?\\d*\\.?\\d+)(px|%)$/.exec(margin)\n if (!parts) {\n throw new Error('rootMargin must be specified in pixels or percent')\n }\n return { value: parseFloat(parts[1]), unit: parts[2] }\n })\n\n // Handles shorthand.\n margins[1] = margins[1] || margins[0]\n margins[2] = margins[2] || margins[0]\n margins[3] = margins[3] || margins[1]\n\n return margins\n }\n\n /**\n * Starts polling for intersection changes if the polling is not already\n * happening, and if the page's visibility state is visible.\n * @private\n */\n IntersectionObserver.prototype._monitorIntersections = function () {\n if (!this._monitoringIntersections) {\n this._monitoringIntersections = true\n\n // If a poll interval is set, use polling instead of listening to\n // resize and scroll events or DOM mutations.\n if (this.POLL_INTERVAL) {\n this._monitoringInterval = setInterval(this._checkForIntersections, this.POLL_INTERVAL)\n } else {\n addEvent(window, 'resize', this._checkForIntersections, true)\n addEvent(document, 'scroll', this._checkForIntersections, true)\n\n if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in window) {\n this._domObserver = new MutationObserver(this._checkForIntersections)\n this._domObserver.observe(document, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n })\n }\n }\n }\n }\n\n /**\n * Stops polling for intersection changes.\n * @private\n */\n IntersectionObserver.prototype._unmonitorIntersections = function () {\n if (this._monitoringIntersections) {\n this._monitoringIntersections = false\n\n clearInterval(this._monitoringInterval)\n this._monitoringInterval = null\n\n removeEvent(window, 'resize', this._checkForIntersections, true)\n removeEvent(document, 'scroll', this._checkForIntersections, true)\n\n if (this._domObserver) {\n this._domObserver.disconnect()\n this._domObserver = null\n }\n }\n }\n\n /**\n * Scans each observation target for intersection changes and adds them\n * to the internal entries queue. If new entries are found, it\n * schedules the callback to be invoked.\n * @private\n */\n IntersectionObserver.prototype._checkForIntersections = function () {\n const rootIsInDom = this._rootIsInDom()\n const rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect()\n\n this._observationTargets.forEach(function (item) {\n const target = item.element\n const targetRect = getBoundingClientRect(target)\n const rootContainsTarget = this._rootContainsTarget(target)\n const oldEntry = item.entry\n const intersectionRect = rootIsInDom && rootContainsTarget &&\n this._computeTargetAndRootIntersection(target, rootRect)\n\n const newEntry = item.entry = new IntersectionObserverEntry({\n time: now(),\n target: target,\n boundingClientRect: targetRect,\n rootBounds: rootRect,\n intersectionRect: intersectionRect,\n intersectionRatio: -1,\n isIntersecting: false,\n })\n\n if (!oldEntry) {\n this._queuedEntries.push(newEntry)\n } else if (rootIsInDom && rootContainsTarget) {\n // If the new entry intersection ratio has crossed any of the\n // thresholds, add a new entry.\n if (this._hasCrossedThreshold(oldEntry, newEntry)) {\n this._queuedEntries.push(newEntry)\n }\n } else {\n // If the root is not in the DOM or target is not contained within\n // root but the previous entry for this target had an intersection,\n // add a new record indicating removal.\n if (oldEntry && oldEntry.isIntersecting) {\n this._queuedEntries.push(newEntry)\n }\n }\n }, this)\n\n if (this._queuedEntries.length) {\n this._callback(this.takeRecords(), this)\n }\n }\n\n /**\n * Accepts a target and root rect computes the intersection between then\n * following the algorithm in the spec.\n * TODO(philipwalton): at this time clip-path is not considered.\n * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo\n * @param {Element} target The target DOM element\n * @param {Object} rootRect The bounding rect of the root after being\n * expanded by the rootMargin value.\n * @return {?Object} The final intersection rect object or undefined if no\n * intersection is found.\n * @private\n */\n IntersectionObserver.prototype._computeTargetAndRootIntersection = function (target, rootRect) {\n // If the element isn't displayed, an intersection can't happen.\n if (window.getComputedStyle(target).display === 'none') return\n\n const targetRect = getBoundingClientRect(target)\n let intersectionRect = targetRect\n let parent = getParentNode(target)\n let atRoot = false\n\n while (!atRoot) {\n let parentRect = null\n const parentComputedStyle: Partial<CSSStyleDeclaration> = parent.nodeType == 1 ?\n window.getComputedStyle(parent) : {}\n\n // If the parent isn't displayed, an intersection can't happen.\n if (parentComputedStyle.display === 'none') return\n\n if (parent == this.root || parent == document) {\n atRoot = true\n parentRect = rootRect\n } else {\n // If the element has a non-visible overflow, and it's not the <body>\n // or <html> element, update the intersection rect.\n // Note: <body> and <html> cannot be clipped to a rect that's not also\n // the document rect, so no need to compute a new intersection.\n if (parent != document.body &&\n parent != document.documentElement &&\n parentComputedStyle.overflow != 'visible') {\n parentRect = getBoundingClientRect(parent)\n }\n }\n\n // If either of the above conditionals set a new parentRect,\n // calculate new intersection data.\n if (parentRect) {\n intersectionRect = computeRectIntersection(parentRect, intersectionRect)\n\n if (!intersectionRect) break\n }\n parent = getParentNode(parent)\n }\n return intersectionRect\n }\n\n\n /**\n * Returns the root rect after being expanded by the rootMargin value.\n * @return {Object} The expanded root rect.\n * @private\n */\n IntersectionObserver.prototype._getRootRect = function () {\n let rootRect\n if (this.root) {\n rootRect = getBoundingClientRect(this.root)\n } else {\n // Use <html>/<body> instead of window since scroll bars affect size.\n const html = document.documentElement\n const body = document.body\n rootRect = {\n top: 0,\n left: 0,\n right: html.clientWidth || body.clientWidth,\n width: html.clientWidth || body.clientWidth,\n bottom: html.clientHeight || body.clientHeight,\n height: html.clientHeight || body.clientHeight\n }\n }\n return this._expandRectByRootMargin(rootRect)\n }\n\n /**\n * Accepts a rect and expands it by the rootMargin value.\n * @param {Object} rect The rect object to expand.\n * @return {Object} The expanded rect.\n * @private\n */\n IntersectionObserver.prototype._expandRectByRootMargin = function (rect) {\n const margins = this._rootMarginValues.map(function (margin, i) {\n return margin.unit === 'px' ? margin.value :\n margin.value * (i % 2 ? rect.width : rect.height) / 100\n })\n const newRect: Record<string, number> = {\n top: rect.top - margins[0],\n right: rect.right + margins[1],\n bottom: rect.bottom + margins[2],\n left: rect.left - margins[3]\n }\n newRect.width = newRect.right - newRect.left\n newRect.height = newRect.bottom - newRect.top\n\n return newRect\n }\n\n /**\n * Accepts an old and new entry and returns true if at least one of the\n * threshold values has been crossed.\n * @param {?IntersectionObserverEntry} oldEntry The previous entry for a\n * particular target element or null if no previous entry exists.\n * @param {IntersectionObserverEntry} newEntry The current entry for a\n * particular target element.\n * @return {boolean} Returns true if a any threshold has been crossed.\n * @private\n */\n IntersectionObserver.prototype._hasCrossedThreshold =\n function (oldEntry, newEntry) {\n // To make comparing easier, an entry that has a ratio of 0\n // but does not actually intersect is given a value of -1\n const oldRatio = oldEntry && oldEntry.isIntersecting ? oldEntry.intersectionRatio || 0 : -1\n const newRatio = newEntry.isIntersecting ? newEntry.intersectionRatio || 0 : -1\n\n // Ignore unchanged ratios\n if (oldRatio === newRatio) return\n\n for (let i = 0; i < this.thresholds.length; i++) {\n const threshold = this.thresholds[i]\n\n // Return true if an entry matches a threshold or if the new ratio\n // and the old ratio are on the opposite sides of a threshold.\n if (threshold == oldRatio || threshold == newRatio ||\n threshold < oldRatio !== threshold < newRatio) {\n return true\n }\n }\n }\n\n /**\n * Returns whether or not the root element is an element and is in the DOM.\n * @return {boolean} True if the root element is an element and is in the DOM.\n * @private\n */\n IntersectionObserver.prototype._rootIsInDom = function () {\n return !this.root || containsDeep(document, this.root)\n }\n\n /**\n * Returns whether or not the target element is a child of root.\n * @param {Element} target The target element to check.\n * @return {boolean} True if the target element is a child of root.\n * @private\n */\n IntersectionObserver.prototype._rootContainsTarget = function (target) {\n return containsDeep(this.root || document, target)\n }\n\n /**\n * Adds the instance to the global IntersectionObserver registry if it isn't\n * already present.\n * @private\n */\n IntersectionObserver.prototype._registerInstance = function () {\n if (registry.indexOf(this) < 0) {\n registry.push(this)\n }\n }\n\n /**\n * Removes the instance from the global IntersectionObserver registry.\n * @private\n */\n IntersectionObserver.prototype._unregisterInstance = function () {\n const index = registry.indexOf(this)\n if (index != -1) registry.splice(index, 1)\n }\n\n /**\n * Returns the result of the performance.now() method or null in browsers\n * that don't support the API.\n * @return {number} The elapsed time since the page was requested.\n */\n function now () {\n return window.performance && performance.now && performance.now()\n }\n\n /**\n * Adds an event handler to a DOM node ensuring cross-browser compatibility.\n * @param {Node} node The DOM node to add the event handler to.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to add.\n * @param {boolean} opt_useCapture Optionally adds the even to the capture\n * phase. Note: this only works in modern browsers.\n */\n function addEvent (node, event, fn, opt_useCapture) {\n if (isFunction(node.addEventListener)) {\n node.addEventListener(event, fn, opt_useCapture || false)\n } else if (isFunction(node.attachEvent)) {\n node.attachEvent('on' + event, fn)\n }\n }\n\n /**\n * Removes a previously added event handler from a DOM node.\n * @param {Node} node The DOM node to remove the event handler from.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to remove.\n * @param {boolean} opt_useCapture If the event handler was added with this\n * flag set to true, it should be set to true here in order to remove it.\n */\n function removeEvent (node, event, fn, opt_useCapture) {\n if (isFunction(node.removeEventListener)) {\n node.removeEventListener(event, fn, opt_useCapture || false)\n }\n else if (isFunction(node.detatchEvent)) {\n node.detatchEvent('on' + event, fn)\n }\n }\n\n /**\n * Returns the intersection between two rect objects.\n * @param {Object} rect1 The first rect.\n * @param {Object} rect2 The second rect.\n * @return {?Object} The intersection rect or undefined if no intersection\n * is found.\n */\n function computeRectIntersection (rect1, rect2) {\n const top = Math.max(rect1.top, rect2.top)\n const bottom = Math.min(rect1.bottom, rect2.bottom)\n const left = Math.max(rect1.left, rect2.left)\n const right = Math.min(rect1.right, rect2.right)\n const width = right - left\n const height = bottom - top\n\n return (width >= 0 && height >= 0) && {\n top: top,\n bottom: bottom,\n left: left,\n right: right,\n width: width,\n height: height\n }\n }\n\n /**\n * Shims the native getBoundingClientRect for compatibility with older IE.\n * @param {Element} el The element whose bounding rect to get.\n * @return {Object} The (possibly shimmed) rect of the element.\n */\n function getBoundingClientRect (el) {\n let rect\n\n try {\n rect = el.getBoundingClientRect()\n } catch (err) {\n // Ignore Windows 7 IE11 \"Unspecified error\"\n // https://github.com/w3c/IntersectionObserver/pull/205\n }\n\n if (!rect) return getEmptyRect()\n\n // Older IE\n if (!(rect.width && rect.height)) {\n rect = {\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n }\n }\n return rect\n }\n\n /**\n * Returns an empty rect object. An empty rect is returned when an element\n * is not in the DOM.\n * @return {Object} The empty rect.\n */\n function getEmptyRect () {\n return {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n width: 0,\n height: 0\n }\n }\n\n /**\n * Checks to see if a parent element contains a child element (including inside\n * shadow DOM).\n * @param {Node} parent The parent element.\n * @param {Node} child The child element.\n * @return {boolean} True if the parent node contains the child node.\n */\n function containsDeep (parent, child) {\n let node = child\n while (node) {\n if (node == parent) return true\n\n node = getParentNode(node)\n }\n return false\n }\n\n /**\n * Gets the parent node of an element or its host element if the parent node\n * is a shadow root.\n * @param {Node} node The node whose parent to get.\n * @return {Node|null} The parent node or null if no parent exists.\n */\n function getParentNode (node) {\n const parent = node.parentNode\n\n if (parent && parent.nodeType == 11 && parent.host) {\n // If the parent is a shadow root, return the host element.\n return parent.host\n }\n\n if (parent && parent.assignedSlot) {\n // If the parent is distributed in a <slot>, return the parent of a slot.\n return parent.assignedSlot.parentNode\n }\n\n return parent\n }\n\n // Exposes the constructors globally.\n window.IntersectionObserver = IntersectionObserver as unknown as typeof window.IntersectionObserver\n window.IntersectionObserverEntry = IntersectionObserverEntry as unknown as typeof window.IntersectionObserverEntry\n}\n"],"names":[],"mappings":";;;;;AAAA;SAKgB,kCAAkC,GAAA;;;IAGhD,IACE,sBAAsB,IAAI,MAAM;AAChC,QAAA,2BAA2B,IAAI,MAAM;AACrC,QAAA,mBAAmB,IAAI,MAAM,CAAC,yBAAyB,CAAC,SAAS,EACjE;QACA,IAAI,EAAE,gBAAgB,IAAI,MAAM,CAAC,yBAAyB,CAAC,SAAS,CAAC,EAAE;;;YAGrE,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,yBAAyB,CAAC,SAAS,EAAE,gBAAgB,EAAE;AAClF,gBAAA,GAAG,EAAE,YAAA;AACH,oBAAA,OAAO,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAA;iBAClC;AACF,aAAA,CAAC,CAAA;SACH;KACF;SAAM;AACL,QAAA,wCAAwC,EAAE,CAAA;KAC3C;AACH,CAAC;AAED,SAAS,wCAAwC,GAAA;AAC/C,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAA;AAUhC;;;;;AAKG;IACH,SAAS,yBAAyB,CAAE,KAAoC,EAAA;AACtE,QAAA,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;AACtB,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;AAC1B,QAAA,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAA;AAClC,QAAA,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,kBAAkB,CAAA;QAClD,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,IAAI,YAAY,EAAE,CAAA;QAChE,IAAI,CA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AAA,MAAM,CAAC,yBAAyB,GAAG,yBAA+E,CAAA;AACpH;;;;"}
1
+ {"version":3,"file":"intersection-observer.js","sources":["../../src/polyfill/intersection-observer.ts"],"sourcesContent":["/* eslint-disable eqeqeq */\nimport { isFunction, isNumber } from '@tarojs/shared'\n\nimport { throttle } from '../utils'\n\nexport function handleIntersectionObserverPolyfill () {\n // Exit early if all IntersectionObserver and IntersectionObserverEntry\n // features are natively supported.\n if (\n 'IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'intersectionRatio' in window.IntersectionObserverEntry.prototype\n ) {\n if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {\n // Minimal polyfill for Edge 15's lack of `isIntersecting`\n // See: https://github.com/w3c/IntersectionObserver/issues/211\n Object.defineProperty(window.IntersectionObserverEntry.prototype, 'isIntersecting', {\n get: function () {\n return this.intersectionRatio > 0\n }\n })\n }\n } else {\n handleIntersectionObserverObjectPolyfill()\n }\n}\n\nfunction handleIntersectionObserverObjectPolyfill () {\n const document = window.document\n\n /**\n * An IntersectionObserver registry. This registry exists to hold a strong\n * reference to IntersectionObserver instances currently observing a target\n * element. Without this registry, instances without another reference may be\n * garbage collected.\n */\n const registry: number[] = []\n\n /**\n * Creates the global IntersectionObserverEntry constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry\n * @param {Object} entry A dictionary of instance properties.\n * @constructor\n */\n function IntersectionObserverEntry (entry: IntersectionObserverEntryInit) {\n this.time = entry.time\n this.target = entry.target\n this.rootBounds = entry.rootBounds\n this.boundingClientRect = entry.boundingClientRect\n this.intersectionRect = entry.intersectionRect || getEmptyRect()\n this.isIntersecting = !!entry.intersectionRect\n\n // Calculates the intersection ratio.\n const targetRect = this.boundingClientRect\n const targetArea = targetRect.width * targetRect.height\n const intersectionRect = this.intersectionRect\n const intersectionArea = intersectionRect.width * intersectionRect.height\n\n // Sets intersection ratio.\n if (targetArea) {\n // Round the intersection ratio to avoid floating point math issues:\n // https://github.com/w3c/IntersectionObserver/issues/324\n this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4))\n } else {\n // If area is zero and is intersecting, sets to 1, otherwise to 0\n this.intersectionRatio = this.isIntersecting ? 1 : 0\n }\n }\n\n /**\n * Creates the global IntersectionObserver constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface\n * @param {Function} callback The function to be invoked after intersection\n * changes have queued. The function is not invoked if the queue has\n * been emptied by calling the `takeRecords` method.\n * @param {Object=} opt_options Optional configuration options.\n * @constructor\n */\n function IntersectionObserver (callback: IntersectionObserverCallback, options: IntersectionObserverInit = {}) {\n if (!isFunction(callback)) {\n throw new Error('callback must be a function')\n }\n\n if (options.root && options.root.nodeType != 1) {\n throw new Error('root must be an Element')\n }\n\n // Binds and throttles `this._checkForIntersections`.\n this._checkForIntersections = throttle(\n this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT)\n\n // Private properties.\n this._callback = callback\n this._observationTargets = []\n this._queuedEntries = []\n this._rootMarginValues = this._parseRootMargin(options.rootMargin)\n\n // Public properties.\n this.thresholds = this._initThresholds(options.threshold)\n this.root = options.root || null\n this.rootMargin = this._rootMarginValues.map(function (margin) {\n return margin.value + margin.unit\n }).join(' ')\n }\n\n /**\n * The minimum interval within which the document will be checked for\n * intersection changes.\n */\n IntersectionObserver.prototype.THROTTLE_TIMEOUT = 100\n\n /**\n * The frequency in which the polyfill polls for intersection changes.\n * this can be updated on a per instance basis and must be set prior to\n * calling `observe` on the first target.\n */\n IntersectionObserver.prototype.POLL_INTERVAL = null\n\n /**\n * Use a mutation observer on the root element\n * to detect intersection changes.\n */\n IntersectionObserver.prototype.USE_MUTATION_OBSERVER = true\n\n /**\n * Starts observing a target element for intersection changes based on\n * the thresholds values.\n * @param {Element} target The DOM element to observe.\n */\n IntersectionObserver.prototype.observe = function (target) {\n const isTargetAlreadyObserved = this._observationTargets.some(function (item) {\n return item.element == target\n })\n\n if (isTargetAlreadyObserved) return\n\n if (!(target && target.nodeType == 1)) {\n throw new Error('target must be an Element')\n }\n\n this._registerInstance()\n this._observationTargets.push({ element: target, entry: null })\n this._monitorIntersections()\n this._checkForIntersections()\n }\n\n /**\n * Stops observing a target element for intersection changes.\n * @param {Element} target The DOM element to observe.\n */\n IntersectionObserver.prototype.unobserve = function (target) {\n this._observationTargets =\n this._observationTargets.filter(function (item) {\n return item.element != target\n })\n if (!this._observationTargets.length) {\n this._unmonitorIntersections()\n this._unregisterInstance()\n }\n }\n\n /**\n * Stops observing all target elements for intersection changes.\n */\n IntersectionObserver.prototype.disconnect = function () {\n this._observationTargets = []\n this._unmonitorIntersections()\n this._unregisterInstance()\n }\n\n /**\n * Returns any queue entries that have not yet been reported to the\n * callback and clears the queue. This can be used in conjunction with the\n * callback to obtain the absolute most up-to-date intersection information.\n * @return {Array} The currently queued entries.\n */\n IntersectionObserver.prototype.takeRecords = function () {\n const records = this._queuedEntries.slice()\n this._queuedEntries = []\n return records\n }\n\n /**\n * Accepts the threshold value from the user configuration object and\n * returns a sorted array of unique threshold values. If a value is not\n * between 0 and 1 and error is thrown.\n * @private\n * @param {Array|number=} opt_threshold An optional threshold value or\n * a list of threshold values, defaulting to [0].\n * @return {Array} A sorted list of unique and valid threshold values.\n */\n IntersectionObserver.prototype._initThresholds = function (opt_threshold) {\n let threshold = opt_threshold || [0]\n if (!Array.isArray(threshold)) threshold = [threshold]\n\n return threshold.sort().filter(function (t, i, a) {\n if (!isNumber(t) || isNaN(t) || t < 0 || t > 1) {\n throw new Error('threshold must be a number between 0 and 1 inclusively')\n }\n return t !== a[i - 1]\n })\n }\n\n /**\n * Accepts the rootMargin value from the user configuration object\n * and returns an array of the four margin values as an object containing\n * the value and unit properties. If any of the values are not properly\n * formatted or use a unit other than px or %, and error is thrown.\n * @private\n * @param {string=} opt_rootMargin An optional rootMargin value,\n * defaulting to '0px'.\n * @return {Array<Object>} An array of margin objects with the keys\n * value and unit.\n */\n IntersectionObserver.prototype._parseRootMargin = function (opt_rootMargin) {\n const marginString = opt_rootMargin || '0px'\n const margins = marginString.split(/\\s+/).map(function (margin) {\n const parts = /^(-?\\d*\\.?\\d+)(px|%)$/.exec(margin)\n if (!parts) {\n throw new Error('rootMargin must be specified in pixels or percent')\n }\n return { value: parseFloat(parts[1]), unit: parts[2] }\n })\n\n // Handles shorthand.\n margins[1] = margins[1] || margins[0]\n margins[2] = margins[2] || margins[0]\n margins[3] = margins[3] || margins[1]\n\n return margins\n }\n\n /**\n * Starts polling for intersection changes if the polling is not already\n * happening, and if the page's visibility state is visible.\n * @private\n */\n IntersectionObserver.prototype._monitorIntersections = function () {\n if (!this._monitoringIntersections) {\n this._monitoringIntersections = true\n\n // If a poll interval is set, use polling instead of listening to\n // resize and scroll events or DOM mutations.\n if (this.POLL_INTERVAL) {\n this._monitoringInterval = setInterval(this._checkForIntersections, this.POLL_INTERVAL)\n } else {\n addEvent(window, 'resize', this._checkForIntersections, true)\n addEvent(document, 'scroll', this._checkForIntersections, true)\n\n if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in window) {\n this._domObserver = new MutationObserver(this._checkForIntersections)\n this._domObserver.observe(document, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n })\n }\n }\n }\n }\n\n /**\n * Stops polling for intersection changes.\n * @private\n */\n IntersectionObserver.prototype._unmonitorIntersections = function () {\n if (this._monitoringIntersections) {\n this._monitoringIntersections = false\n\n clearInterval(this._monitoringInterval)\n this._monitoringInterval = null\n\n removeEvent(window, 'resize', this._checkForIntersections, true)\n removeEvent(document, 'scroll', this._checkForIntersections, true)\n\n if (this._domObserver) {\n this._domObserver.disconnect()\n this._domObserver = null\n }\n }\n }\n\n /**\n * Scans each observation target for intersection changes and adds them\n * to the internal entries queue. If new entries are found, it\n * schedules the callback to be invoked.\n * @private\n */\n IntersectionObserver.prototype._checkForIntersections = function () {\n const rootIsInDom = this._rootIsInDom()\n const rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect()\n\n this._observationTargets.forEach(function (item) {\n const target = item.element\n const targetRect = getBoundingClientRect(target)\n const rootContainsTarget = this._rootContainsTarget(target)\n const oldEntry = item.entry\n const intersectionRect = rootIsInDom && rootContainsTarget &&\n this._computeTargetAndRootIntersection(target, rootRect)\n\n const newEntry = item.entry = new IntersectionObserverEntry({\n time: now(),\n target: target,\n boundingClientRect: targetRect,\n rootBounds: rootRect,\n intersectionRect: intersectionRect,\n intersectionRatio: -1,\n isIntersecting: false,\n })\n\n if (!oldEntry) {\n this._queuedEntries.push(newEntry)\n } else if (rootIsInDom && rootContainsTarget) {\n // If the new entry intersection ratio has crossed any of the\n // thresholds, add a new entry.\n if (this._hasCrossedThreshold(oldEntry, newEntry)) {\n this._queuedEntries.push(newEntry)\n }\n } else {\n // If the root is not in the DOM or target is not contained within\n // root but the previous entry for this target had an intersection,\n // add a new record indicating removal.\n if (oldEntry && oldEntry.isIntersecting) {\n this._queuedEntries.push(newEntry)\n }\n }\n }, this)\n\n if (this._queuedEntries.length) {\n this._callback(this.takeRecords(), this)\n }\n }\n\n /**\n * Accepts a target and root rect computes the intersection between then\n * following the algorithm in the spec.\n * TODO(philipwalton): at this time clip-path is not considered.\n * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo\n * @param {Element} target The target DOM element\n * @param {Object} rootRect The bounding rect of the root after being\n * expanded by the rootMargin value.\n * @return {?Object} The final intersection rect object or undefined if no\n * intersection is found.\n * @private\n */\n IntersectionObserver.prototype._computeTargetAndRootIntersection = function (target, rootRect) {\n // If the element isn't displayed, an intersection can't happen.\n if (window.getComputedStyle(target).display === 'none') return\n\n const targetRect = getBoundingClientRect(target)\n let intersectionRect = targetRect\n let parent = getParentNode(target)\n let atRoot = false\n\n while (!atRoot) {\n let parentRect = null\n const parentComputedStyle: Partial<CSSStyleDeclaration> = parent.nodeType == 1 ?\n window.getComputedStyle(parent) : {}\n\n // If the parent isn't displayed, an intersection can't happen.\n if (parentComputedStyle.display === 'none') return\n\n if (parent == this.root || parent == document) {\n atRoot = true\n parentRect = rootRect\n } else {\n // If the element has a non-visible overflow, and it's not the <body>\n // or <html> element, update the intersection rect.\n // Note: <body> and <html> cannot be clipped to a rect that's not also\n // the document rect, so no need to compute a new intersection.\n if (parent != document.body &&\n parent != document.documentElement &&\n parentComputedStyle.overflow != 'visible') {\n parentRect = getBoundingClientRect(parent)\n }\n }\n\n // If either of the above conditionals set a new parentRect,\n // calculate new intersection data.\n if (parentRect) {\n intersectionRect = computeRectIntersection(parentRect, intersectionRect)\n\n if (!intersectionRect) break\n }\n parent = getParentNode(parent)\n }\n return intersectionRect\n }\n\n\n /**\n * Returns the root rect after being expanded by the rootMargin value.\n * @return {Object} The expanded root rect.\n * @private\n */\n IntersectionObserver.prototype._getRootRect = function () {\n let rootRect\n if (this.root) {\n rootRect = getBoundingClientRect(this.root)\n } else {\n // Use <html>/<body> instead of window since scroll bars affect size.\n const html = document.documentElement\n const body = document.body\n rootRect = {\n top: 0,\n left: 0,\n right: html.clientWidth || body.clientWidth,\n width: html.clientWidth || body.clientWidth,\n bottom: html.clientHeight || body.clientHeight,\n height: html.clientHeight || body.clientHeight\n }\n }\n return this._expandRectByRootMargin(rootRect)\n }\n\n /**\n * Accepts a rect and expands it by the rootMargin value.\n * @param {Object} rect The rect object to expand.\n * @return {Object} The expanded rect.\n * @private\n */\n IntersectionObserver.prototype._expandRectByRootMargin = function (rect) {\n const margins = this._rootMarginValues.map(function (margin, i) {\n return margin.unit === 'px' ? margin.value :\n margin.value * (i % 2 ? rect.width : rect.height) / 100\n })\n const newRect: Record<string, number> = {\n top: rect.top - margins[0],\n right: rect.right + margins[1],\n bottom: rect.bottom + margins[2],\n left: rect.left - margins[3]\n }\n newRect.width = newRect.right - newRect.left\n newRect.height = newRect.bottom - newRect.top\n\n return newRect\n }\n\n /**\n * Accepts an old and new entry and returns true if at least one of the\n * threshold values has been crossed.\n * @param {?IntersectionObserverEntry} oldEntry The previous entry for a\n * particular target element or null if no previous entry exists.\n * @param {IntersectionObserverEntry} newEntry The current entry for a\n * particular target element.\n * @return {boolean} Returns true if a any threshold has been crossed.\n * @private\n */\n IntersectionObserver.prototype._hasCrossedThreshold =\n function (oldEntry, newEntry) {\n // To make comparing easier, an entry that has a ratio of 0\n // but does not actually intersect is given a value of -1\n const oldRatio = oldEntry && oldEntry.isIntersecting ? oldEntry.intersectionRatio || 0 : -1\n const newRatio = newEntry.isIntersecting ? newEntry.intersectionRatio || 0 : -1\n\n // Ignore unchanged ratios\n if (oldRatio === newRatio) return\n\n for (let i = 0; i < this.thresholds.length; i++) {\n const threshold = this.thresholds[i]\n\n // Return true if an entry matches a threshold or if the new ratio\n // and the old ratio are on the opposite sides of a threshold.\n if (threshold == oldRatio || threshold == newRatio ||\n threshold < oldRatio !== threshold < newRatio) {\n return true\n }\n }\n }\n\n /**\n * Returns whether or not the root element is an element and is in the DOM.\n * @return {boolean} True if the root element is an element and is in the DOM.\n * @private\n */\n IntersectionObserver.prototype._rootIsInDom = function () {\n return !this.root || containsDeep(document, this.root)\n }\n\n /**\n * Returns whether or not the target element is a child of root.\n * @param {Element} target The target element to check.\n * @return {boolean} True if the target element is a child of root.\n * @private\n */\n IntersectionObserver.prototype._rootContainsTarget = function (target) {\n return containsDeep(this.root || document, target)\n }\n\n /**\n * Adds the instance to the global IntersectionObserver registry if it isn't\n * already present.\n * @private\n */\n IntersectionObserver.prototype._registerInstance = function () {\n if (registry.indexOf(this) < 0) {\n registry.push(this)\n }\n }\n\n /**\n * Removes the instance from the global IntersectionObserver registry.\n * @private\n */\n IntersectionObserver.prototype._unregisterInstance = function () {\n const index = registry.indexOf(this)\n if (index != -1) registry.splice(index, 1)\n }\n\n /**\n * Returns the result of the performance.now() method or null in browsers\n * that don't support the API.\n * @return {number} The elapsed time since the page was requested.\n */\n function now () {\n return window.performance && performance.now && performance.now()\n }\n\n /**\n * Adds an event handler to a DOM node ensuring cross-browser compatibility.\n * @param {Node} node The DOM node to add the event handler to.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to add.\n * @param {boolean} opt_useCapture Optionally adds the even to the capture\n * phase. Note: this only works in modern browsers.\n */\n function addEvent (node, event, fn, opt_useCapture) {\n if (isFunction(node.addEventListener)) {\n node.addEventListener(event, fn, opt_useCapture || false)\n } else if (isFunction(node.attachEvent)) {\n node.attachEvent('on' + event, fn)\n }\n }\n\n /**\n * Removes a previously added event handler from a DOM node.\n * @param {Node} node The DOM node to remove the event handler from.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to remove.\n * @param {boolean} opt_useCapture If the event handler was added with this\n * flag set to true, it should be set to true here in order to remove it.\n */\n function removeEvent (node, event, fn, opt_useCapture) {\n if (isFunction(node.removeEventListener)) {\n node.removeEventListener(event, fn, opt_useCapture || false)\n }\n else if (isFunction(node.detatchEvent)) {\n node.detatchEvent('on' + event, fn)\n }\n }\n\n /**\n * Returns the intersection between two rect objects.\n * @param {Object} rect1 The first rect.\n * @param {Object} rect2 The second rect.\n * @return {?Object} The intersection rect or undefined if no intersection\n * is found.\n */\n function computeRectIntersection (rect1, rect2) {\n const top = Math.max(rect1.top, rect2.top)\n const bottom = Math.min(rect1.bottom, rect2.bottom)\n const left = Math.max(rect1.left, rect2.left)\n const right = Math.min(rect1.right, rect2.right)\n const width = right - left\n const height = bottom - top\n\n return (width >= 0 && height >= 0) && {\n top: top,\n bottom: bottom,\n left: left,\n right: right,\n width: width,\n height: height\n }\n }\n\n /**\n * Shims the native getBoundingClientRect for compatibility with older IE.\n * @param {Element} el The element whose bounding rect to get.\n * @return {Object} The (possibly shimmed) rect of the element.\n */\n function getBoundingClientRect (el) {\n let rect\n\n try {\n rect = el.getBoundingClientRect()\n } catch (err) {\n // Ignore Windows 7 IE11 \"Unspecified error\"\n // https://github.com/w3c/IntersectionObserver/pull/205\n }\n\n if (!rect) return getEmptyRect()\n\n // Older IE\n if (!(rect.width && rect.height)) {\n rect = {\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n }\n }\n return rect\n }\n\n /**\n * Returns an empty rect object. An empty rect is returned when an element\n * is not in the DOM.\n * @return {Object} The empty rect.\n */\n function getEmptyRect () {\n return {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n width: 0,\n height: 0\n }\n }\n\n /**\n * Checks to see if a parent element contains a child element (including inside\n * shadow DOM).\n * @param {Node} parent The parent element.\n * @param {Node} child The child element.\n * @return {boolean} True if the parent node contains the child node.\n */\n function containsDeep (parent, child) {\n let node = child\n while (node) {\n if (node == parent) return true\n\n node = getParentNode(node)\n }\n return false\n }\n\n /**\n * Gets the parent node of an element or its host element if the parent node\n * is a shadow root.\n * @param {Node} node The node whose parent to get.\n * @return {Node|null} The parent node or null if no parent exists.\n */\n function getParentNode (node) {\n const parent = node.parentNode\n\n if (parent && parent.nodeType == 11 && parent.host) {\n // If the parent is a shadow root, return the host element.\n return parent.host\n }\n\n if (parent && parent.assignedSlot) {\n // If the parent is distributed in a <slot>, return the parent of a slot.\n return parent.assignedSlot.parentNode\n }\n\n return parent\n }\n\n // Exposes the constructors globally.\n window.IntersectionObserver = IntersectionObserver as unknown as typeof window.IntersectionObserver\n window.IntersectionObserverEntry = IntersectionObserverEntry as unknown as typeof window.IntersectionObserverEntry\n}\n"],"names":[],"mappings":";;;;;AAAA;SAKgB,kCAAkC,GAAA;;;IAGhD,IACE,sBAAsB,IAAI,MAAM;AAChC,QAAA,2BAA2B,IAAI,MAAM;AACrC,QAAA,mBAAmB,IAAI,MAAM,CAAC,yBAAyB,CAAC,SAAS,EACjE;QACA,IAAI,EAAE,gBAAgB,IAAI,MAAM,CAAC,yBAAyB,CAAC,SAAS,CAAC,EAAE;;;YAGrE,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,yBAAyB,CAAC,SAAS,EAAE,gBAAgB,EAAE;AAClF,gBAAA,GAAG,EAAE,YAAA;AACH,oBAAA,OAAO,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAA;iBAClC;AACF,aAAA,CAAC,CAAA;SACH;KACF;SAAM;AACL,QAAA,wC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AAC,CAAA;SAC3B;AACD,QAAA,OAAO,KAAK,CAAA;KACb;AAED;;;;;AAKG;IACH,SAAS,aAAa,CAAE,IAAI,EAAA;AAC1B,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAA;AAE9B,QAAA,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,IAAI,EAAE,IAAI,MAAM,CAAC,IAAI,EAAE;;YAElD,OAAO,MAAM,CAAC,IAAI,CAAA;SACnB;AAED,QAAA,IAAI,MAAM,IAAI,MAAM,CAAC,YAAY,EAAE;;AAEjC,YAAA,OAAO,MAAM,CAAC,YAAY,CAAC,UAAU,CAAA;SACtC;AAED,QAAA,OAAO,MAAM,CAAA;KACd;;AAGD,IAAA,MAAM,CAAC,oBAAoB,GAAG,oBAAqE,CAAA;AACnG,IAAA,MAAM,CAAC,yBAAyB,GAAG,yBAA+E,CAAA;AACpH;;;;"}
@@ -141,7 +141,6 @@ declare class TaroEventTarget {
141
141
  addEventListener(type: string, handler: EventHandler, options?: boolean | AddEventListenerOptions): void;
142
142
  removeEventListener(type: string, handler: EventHandler): void;
143
143
  isAnyEventBinded(): boolean;
144
- isOnlyClickBinded(): boolean;
145
144
  }
146
145
  declare class TaroRootElement extends TaroElement {
147
146
  private updatePayloads;
@@ -151,7 +150,6 @@ declare class TaroRootElement extends TaroElement {
151
150
  constructor();
152
151
  get _path(): string;
153
152
  get _root(): TaroRootElement;
154
- scheduleTask(fn: TFunc): void;
155
153
  enqueueUpdate(payload: UpdatePayload): void;
156
154
  performUpdate(initRender?: boolean, prerender?: TFunc): void;
157
155
  enqueueUpdateCallback(cb: TFunc, ctx?: Record<string, any>): void;
@@ -628,7 +626,6 @@ declare const SET_TIMEOUT = "setTimeout";
628
626
  declare const COMPILE_MODE = "compileMode";
629
627
  declare const CATCHMOVE = "catchMove";
630
628
  declare const CATCH_VIEW = "catch-view";
631
- declare const CLICK_VIEW = "click-view";
632
629
  declare const COMMENT = "comment";
633
630
  declare const ON_LOAD = "onLoad";
634
631
  declare const ON_READY = "onReady";
@@ -810,4 +807,4 @@ declare const getHomePage: (path?: string, basename?: string, customRoutes?: Rec
810
807
  declare const getCurrentPage: (routerMode?: string, basename?: string) => string;
811
808
  declare function handlePolyfill(): void;
812
809
  export { hooks } from '@tarojs/shared';
813
- export { taroDocumentProvider as document, taroGetComputedStyleProvider as getComputedStyle, History, Location, nav as navigator, _caf as cancelAnimationFrame, now, _raf as requestAnimationFrame, parseUrl, TaroURLProvider as URL, URLSearchParams, taroHistoryProvider as history, taroLocationProvider as location, taroWindowProvider as window, TaroElement, createEvent, eventHandler, TaroEvent, FormElement, TaroNode, TaroRootElement, Style, SVGElement, TaroText, MutationObserver, env, PROPERTY_THRESHOLD, TARO_RUNTIME, HOOKS_APP_ID, SET_DATA, PAGE_INIT, ROOT_STR, HTML, HEAD, BODY, APP, CONTAINER, DOCUMENT_ELEMENT_NAME, DOCUMENT_FRAGMENT, ID, UID, CLASS, STYLE, FOCUS, VIEW, STATIC_VIEW, PURE_VIEW, PROPS, DATASET, OBJECT, VALUE, INPUT, CHANGE, CUSTOM_WRAPPER, TARGET, CURRENT_TARGET, TYPE, CONFIRM, TIME_STAMP, KEY_CODE, TOUCHMOVE, DATE, SET_TIMEOUT, COMPILE_MODE, CATCHMOVE, CATCH_VIEW, CLICK_VIEW, COMMENT, ON_LOAD, ON_READY, ON_SHOW, ON_HIDE, OPTIONS, EXTERNAL_CLASSES, EVENT_CALLBACK_RESULT, BEHAVIORS, A, CONTEXT_ACTIONS, Current, getCurrentInstance, eventSource, createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify, EventsType, eventCenter, Events, hydrate, nextTick, options, perf, incrementId, isElement, isText, isComment, isHasExtractProp, isParentBinded, shortcutAttr, customWrapperCache, extend, getComponentsAlias, convertNumber2PX, throttle, debounce, addLeadingSlash, hasBasename, stripBasename, stripTrailing, stripSuffix, getHomePage, getCurrentPage, Instance, PageProps, ReactPageComponent, ReactPageInstance, ReactAppInstance, PageLifeCycle, PageInstance, AppInstance, Attributes, EventOptions, MpEvent, EventListenerOptions, AddEventListenerOptions, EventHandler, MpInstance, MiniElementData, MiniTextData, MiniData, HydratedData, UpdatePayloadValue, DataTree, UpdatePayload, Options$1 as Options, TFunc, PageConfig, handlePolyfill };
810
+ export { taroDocumentProvider as document, taroGetComputedStyleProvider as getComputedStyle, History, Location, nav as navigator, _caf as cancelAnimationFrame, now, _raf as requestAnimationFrame, parseUrl, TaroURLProvider as URL, URLSearchParams, taroHistoryProvider as history, taroLocationProvider as location, taroWindowProvider as window, TaroElement, createEvent, eventHandler, TaroEvent, FormElement, TaroNode, TaroRootElement, Style, SVGElement, TaroText, MutationObserver, env, PROPERTY_THRESHOLD, TARO_RUNTIME, HOOKS_APP_ID, SET_DATA, PAGE_INIT, ROOT_STR, HTML, HEAD, BODY, APP, CONTAINER, DOCUMENT_ELEMENT_NAME, DOCUMENT_FRAGMENT, ID, UID, CLASS, STYLE, FOCUS, VIEW, STATIC_VIEW, PURE_VIEW, PROPS, DATASET, OBJECT, VALUE, INPUT, CHANGE, CUSTOM_WRAPPER, TARGET, CURRENT_TARGET, TYPE, CONFIRM, TIME_STAMP, KEY_CODE, TOUCHMOVE, DATE, SET_TIMEOUT, COMPILE_MODE, CATCHMOVE, CATCH_VIEW, COMMENT, ON_LOAD, ON_READY, ON_SHOW, ON_HIDE, OPTIONS, EXTERNAL_CLASSES, EVENT_CALLBACK_RESULT, BEHAVIORS, A, CONTEXT_ACTIONS, Current, getCurrentInstance, eventSource, createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify, EventsType, eventCenter, Events, hydrate, nextTick, options, perf, incrementId, isElement, isText, isComment, isHasExtractProp, isParentBinded, shortcutAttr, customWrapperCache, extend, getComponentsAlias, convertNumber2PX, throttle, debounce, addLeadingSlash, hasBasename, stripBasename, stripTrailing, stripSuffix, getHomePage, getCurrentPage, Instance, PageProps, ReactPageComponent, ReactPageInstance, ReactAppInstance, PageLifeCycle, PageInstance, AppInstance, Attributes, EventOptions, MpEvent, EventListenerOptions, AddEventListenerOptions, EventHandler, MpInstance, MiniElementData, MiniTextData, MiniData, HydratedData, UpdatePayloadValue, DataTree, UpdatePayload, Options$1 as Options, TFunc, PageConfig, handlePolyfill };
@@ -42,7 +42,6 @@ const SET_TIMEOUT = 'setTimeout';
42
42
  const COMPILE_MODE = 'compileMode';
43
43
  const CATCHMOVE = 'catchMove';
44
44
  const CATCH_VIEW = 'catch-view';
45
- const CLICK_VIEW = 'click-view';
46
45
  const COMMENT = 'comment';
47
46
  const ON_LOAD = 'onLoad';
48
47
  const ON_READY = 'onReady';
@@ -1341,9 +1340,6 @@ function hydrate(node) {
1341
1340
  data["nn" /* Shortcuts.NodeName */] = PURE_VIEW;
1342
1341
  }
1343
1342
  }
1344
- if (nodeName === VIEW && node.isOnlyClickBinded()) {
1345
- data["nn" /* Shortcuts.NodeName */] = CLICK_VIEW;
1346
- }
1347
1343
  const { props } = node;
1348
1344
  for (const prop in props) {
1349
1345
  const propInCamelCase = toCamelCase(prop);
@@ -1465,11 +1461,6 @@ class TaroEventTarget {
1465
1461
  const isAnyEventBinded = Object.keys(handlers).find(key => handlers[key].length);
1466
1462
  return Boolean(isAnyEventBinded);
1467
1463
  }
1468
- isOnlyClickBinded() {
1469
- const handlers = this.__handlers;
1470
- const isOnlyClickBinded = handlers.tap && Object.keys(handlers).length === 1;
1471
- return Boolean(isOnlyClickBinded);
1472
- }
1473
1464
  }
1474
1465
 
1475
1466
  const CHILDNODES = "cn" /* Shortcuts.Childnodes */;
@@ -3628,20 +3619,6 @@ class TaroRootElement extends TaroElement {
3628
3619
  get _root() {
3629
3620
  return this;
3630
3621
  }
3631
- scheduleTask(fn) {
3632
- if (isFunction(Promise)) {
3633
- Promise.resolve()
3634
- .then(fn)
3635
- .catch((error) => {
3636
- setTimeout(() => {
3637
- throw error;
3638
- });
3639
- });
3640
- }
3641
- else {
3642
- setTimeout(fn);
3643
- }
3644
- }
3645
3622
  enqueueUpdate(payload) {
3646
3623
  this.updatePayloads.push(payload);
3647
3624
  if (!this.pendingUpdate && this.ctx) {
@@ -3651,7 +3628,7 @@ class TaroRootElement extends TaroElement {
3651
3628
  performUpdate(initRender = false, prerender) {
3652
3629
  this.pendingUpdate = true;
3653
3630
  const ctx = hooks.call('proxyToRaw', this.ctx);
3654
- this.scheduleTask(() => {
3631
+ setTimeout(() => {
3655
3632
  const setDataMark = `${SET_DATA} 开始时间戳 ${Date.now()}`;
3656
3633
  perf.start(setDataMark);
3657
3634
  const data = Object.create(null);
@@ -3734,7 +3711,7 @@ class TaroRootElement extends TaroElement {
3734
3711
  }
3735
3712
  ctx.setData(normalUpdate, cb);
3736
3713
  }
3737
- });
3714
+ }, 0);
3738
3715
  }
3739
3716
  enqueueUpdateCallback(cb, ctx) {
3740
3717
  this.updateCallbacks.push(() => {
@@ -4835,7 +4812,7 @@ function handleIntersectionObserverObjectPolyfill() {
4835
4812
  */
4836
4813
  function addEvent(node, event, fn, opt_useCapture) {
4837
4814
  if (isFunction(node.addEventListener)) {
4838
- node.addEventListener(event, fn, opt_useCapture );
4815
+ node.addEventListener(event, fn, opt_useCapture);
4839
4816
  }
4840
4817
  else if (isFunction(node.attachEvent)) {
4841
4818
  node.attachEvent('on' + event, fn);
@@ -4851,7 +4828,7 @@ function handleIntersectionObserverObjectPolyfill() {
4851
4828
  */
4852
4829
  function removeEvent(node, event, fn, opt_useCapture) {
4853
4830
  if (isFunction(node.removeEventListener)) {
4854
- node.removeEventListener(event, fn, opt_useCapture );
4831
+ node.removeEventListener(event, fn, opt_useCapture);
4855
4832
  }
4856
4833
  else if (isFunction(node.detatchEvent)) {
4857
4834
  node.detatchEvent('on' + event, fn);
@@ -5088,5 +5065,5 @@ if (process.env.SUPPORT_TARO_POLYFILL !== 'disabled' && process.env.TARO_PLATFOR
5088
5065
  handlePolyfill();
5089
5066
  }
5090
5067
 
5091
- export { A, APP, BEHAVIORS, BODY, CATCHMOVE, CATCH_VIEW, CHANGE, CLASS, CLICK_VIEW, COMMENT, COMPILE_MODE, CONFIRM, CONTAINER, CONTEXT_ACTIONS, CURRENT_TARGET, CUSTOM_WRAPPER, Current, DATASET, DATE, DOCUMENT_ELEMENT_NAME, DOCUMENT_FRAGMENT, EVENT_CALLBACK_RESULT, EXTERNAL_CLASSES, FOCUS, FormElement, HEAD, HOOKS_APP_ID, HTML, History, ID, INPUT, KEY_CODE, Location, MutationObserver$1 as MutationObserver, OBJECT, ON_HIDE, ON_LOAD, ON_READY, ON_SHOW, OPTIONS, PAGE_INIT, PROPERTY_THRESHOLD, PROPS, PURE_VIEW, ROOT_STR, SET_DATA, SET_TIMEOUT, STATIC_VIEW, STYLE, SVGElement, Style, TARGET, TARO_RUNTIME, TIME_STAMP, TOUCHMOVE, TYPE, TaroElement, TaroEvent, TaroNode, TaroRootElement, TaroText, UID, TaroURLProvider as URL, URLSearchParams, VALUE, VIEW, addLeadingSlash, _caf as cancelAnimationFrame, convertNumber2PX, createComponentConfig, createEvent, createPageConfig, createRecursiveComponentConfig, customWrapperCache, debounce, taroDocumentProvider as document, env, eventCenter, eventHandler, eventSource, extend, getComponentsAlias, taroGetComputedStyleProvider as getComputedStyle, getCurrentInstance, getCurrentPage, getHomePage, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, handlePolyfill, hasBasename, taroHistoryProvider as history, hydrate, incrementId, injectPageInstance, isComment, isElement, isHasExtractProp, isParentBinded, isText, taroLocationProvider as location, nav as navigator, nextTick, now, options, parseUrl, perf, removePageInstance, _raf as requestAnimationFrame, safeExecute, shortcutAttr, stringify, stripBasename, stripSuffix, stripTrailing, throttle, taroWindowProvider as window };
5068
+ export { A, APP, BEHAVIORS, BODY, CATCHMOVE, CATCH_VIEW, CHANGE, CLASS, COMMENT, COMPILE_MODE, CONFIRM, CONTAINER, CONTEXT_ACTIONS, CURRENT_TARGET, CUSTOM_WRAPPER, Current, DATASET, DATE, DOCUMENT_ELEMENT_NAME, DOCUMENT_FRAGMENT, EVENT_CALLBACK_RESULT, EXTERNAL_CLASSES, FOCUS, FormElement, HEAD, HOOKS_APP_ID, HTML, History, ID, INPUT, KEY_CODE, Location, MutationObserver$1 as MutationObserver, OBJECT, ON_HIDE, ON_LOAD, ON_READY, ON_SHOW, OPTIONS, PAGE_INIT, PROPERTY_THRESHOLD, PROPS, PURE_VIEW, ROOT_STR, SET_DATA, SET_TIMEOUT, STATIC_VIEW, STYLE, SVGElement, Style, TARGET, TARO_RUNTIME, TIME_STAMP, TOUCHMOVE, TYPE, TaroElement, TaroEvent, TaroNode, TaroRootElement, TaroText, UID, TaroURLProvider as URL, URLSearchParams, VALUE, VIEW, addLeadingSlash, _caf as cancelAnimationFrame, convertNumber2PX, createComponentConfig, createEvent, createPageConfig, createRecursiveComponentConfig, customWrapperCache, debounce, taroDocumentProvider as document, env, eventCenter, eventHandler, eventSource, extend, getComponentsAlias, taroGetComputedStyleProvider as getComputedStyle, getCurrentInstance, getCurrentPage, getHomePage, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, handlePolyfill, hasBasename, taroHistoryProvider as history, hydrate, incrementId, injectPageInstance, isComment, isElement, isHasExtractProp, isParentBinded, isText, taroLocationProvider as location, nav as navigator, nextTick, now, options, parseUrl, perf, removePageInstance, _raf as requestAnimationFrame, safeExecute, shortcutAttr, stringify, stripBasename, stripSuffix, stripTrailing, throttle, taroWindowProvider as window };
5092
5069
  //# sourceMappingURL=runtime.esm.js.map