@tarojs/runtime 3.6.22 → 3.6.23

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.
Files changed (180) hide show
  1. package/LICENSE +14 -0
  2. package/dist/bom/URL.d.ts +7 -14
  3. package/dist/bom/URL.js +221 -0
  4. package/dist/bom/URL.js.map +1 -0
  5. package/dist/bom/URLSearchParams.d.ts +2 -14
  6. package/dist/bom/URLSearchParams.js +123 -0
  7. package/dist/bom/URLSearchParams.js.map +1 -0
  8. package/dist/bom/document.d.ts +2 -1
  9. package/dist/bom/document.js +39 -0
  10. package/dist/bom/document.js.map +1 -0
  11. package/dist/bom/getComputedStyle.d.ts +5 -3
  12. package/dist/bom/getComputedStyle.js +8 -0
  13. package/dist/bom/getComputedStyle.js.map +1 -0
  14. package/dist/bom/history.d.ts +11 -8
  15. package/dist/bom/history.js +121 -0
  16. package/dist/bom/history.js.map +1 -0
  17. package/dist/bom/location.d.ts +7 -4
  18. package/dist/bom/location.js +240 -0
  19. package/dist/bom/location.js.map +1 -0
  20. package/dist/bom/navigator.d.ts +2 -1
  21. package/dist/bom/navigator.js +24 -0
  22. package/dist/bom/navigator.js.map +1 -0
  23. package/dist/bom/raf.d.ts +3 -4
  24. package/dist/bom/raf.js +33 -0
  25. package/dist/bom/raf.js.map +1 -0
  26. package/dist/bom/window.d.ts +25 -4
  27. package/dist/bom/window.js +92 -0
  28. package/dist/bom/window.js.map +1 -0
  29. package/dist/constants/index.d.ts +52 -51
  30. package/dist/constants/index.js +63 -0
  31. package/dist/constants/index.js.map +1 -0
  32. package/dist/current.d.ts +5 -5
  33. package/dist/current.js +9 -0
  34. package/dist/current.js.map +1 -0
  35. package/dist/dom/anchor-element.d.ts +3 -2
  36. package/dist/dom/anchor-element.js +54 -0
  37. package/dist/dom/anchor-element.js.map +1 -0
  38. package/dist/dom/class-list.d.ts +3 -2
  39. package/dist/dom/class-list.js +92 -0
  40. package/dist/dom/class-list.js.map +1 -0
  41. package/dist/dom/document.d.ts +11 -6
  42. package/dist/dom/document.js +80 -0
  43. package/dist/dom/document.js.map +1 -0
  44. package/dist/dom/element.d.ts +8 -7
  45. package/dist/dom/element.js +318 -0
  46. package/dist/dom/element.js.map +1 -0
  47. package/dist/dom/event-source.d.ts +3 -3
  48. package/dist/dom/event-source.js +17 -0
  49. package/dist/dom/event-source.js.map +1 -0
  50. package/dist/dom/event-target.d.ts +3 -2
  51. package/dist/dom/event-target.js +78 -0
  52. package/dist/dom/event-target.js.map +1 -0
  53. package/dist/dom/event.d.ts +6 -5
  54. package/dist/dom/event.js +151 -0
  55. package/dist/dom/event.js.map +1 -0
  56. package/dist/dom/form.d.ts +4 -3
  57. package/dist/dom/form.js +38 -0
  58. package/dist/dom/form.js.map +1 -0
  59. package/dist/dom/node.d.ts +40 -9
  60. package/dist/dom/node.js +292 -0
  61. package/dist/dom/node.js.map +1 -0
  62. package/dist/dom/root.d.ts +6 -5
  63. package/dist/dom/root.js +169 -0
  64. package/dist/dom/root.js.map +1 -0
  65. package/dist/dom/style.d.ts +3 -2
  66. package/dist/dom/style.js +168 -0
  67. package/dist/dom/style.js.map +1 -0
  68. package/dist/dom/style_properties.js +186 -0
  69. package/dist/dom/style_properties.js.map +1 -0
  70. package/dist/dom/svg.d.ts +3 -2
  71. package/dist/dom/svg.js +8 -0
  72. package/dist/dom/svg.js.map +1 -0
  73. package/dist/dom/text.d.ts +4 -3
  74. package/dist/dom/text.js +41 -0
  75. package/dist/dom/text.js.map +1 -0
  76. package/dist/dom/transfer.d.ts +3 -2
  77. package/dist/dom/transfer.js +15 -0
  78. package/dist/dom/transfer.js.map +1 -0
  79. package/dist/dom/tree.d.ts +3 -3
  80. package/dist/dom/tree.js +38 -0
  81. package/dist/dom/tree.js.map +1 -0
  82. package/dist/dom-external/element.d.ts +4 -3
  83. package/dist/dom-external/element.js +29 -0
  84. package/dist/dom-external/element.js.map +1 -0
  85. package/dist/dom-external/index.js +38 -0
  86. package/dist/dom-external/index.js.map +1 -0
  87. package/dist/dom-external/inner-html/html.d.ts +3 -2
  88. package/dist/dom-external/inner-html/html.js +28 -0
  89. package/dist/dom-external/inner-html/html.js.map +1 -0
  90. package/dist/dom-external/inner-html/parser.d.ts +7 -7
  91. package/dist/dom-external/inner-html/parser.js +216 -0
  92. package/dist/dom-external/inner-html/parser.js.map +1 -0
  93. package/dist/dom-external/inner-html/scaner.d.ts +3 -3
  94. package/dist/dom-external/inner-html/scaner.js +304 -0
  95. package/dist/dom-external/inner-html/scaner.js.map +1 -0
  96. package/dist/dom-external/inner-html/style.d.ts +3 -3
  97. package/dist/dom-external/inner-html/style.js +235 -0
  98. package/dist/dom-external/inner-html/style.js.map +1 -0
  99. package/dist/dom-external/inner-html/tags.d.ts +6 -5
  100. package/dist/dom-external/inner-html/tags.js +26 -0
  101. package/dist/dom-external/inner-html/tags.js.map +1 -0
  102. package/dist/dom-external/inner-html/utils.d.ts +2 -1
  103. package/dist/dom-external/inner-html/utils.js +12 -0
  104. package/dist/dom-external/inner-html/utils.js.map +1 -0
  105. package/dist/dom-external/mutation-observer/implements.d.ts +25 -6
  106. package/dist/dom-external/mutation-observer/implements.js +108 -0
  107. package/dist/dom-external/mutation-observer/implements.js.map +1 -0
  108. package/dist/dom-external/mutation-observer/index.d.ts +5 -6
  109. package/dist/dom-external/mutation-observer/index.js +35 -0
  110. package/dist/dom-external/mutation-observer/index.js.map +1 -0
  111. package/dist/dom-external/node.d.ts +6 -5
  112. package/dist/dom-external/node.js +74 -0
  113. package/dist/dom-external/node.js.map +1 -0
  114. package/dist/dsl/common.d.ts +15 -16
  115. package/dist/dsl/common.js +332 -0
  116. package/dist/dsl/common.js.map +1 -0
  117. package/dist/emitter/emitter.d.ts +2 -2
  118. package/dist/emitter/emitter.js +7 -0
  119. package/dist/emitter/emitter.js.map +1 -0
  120. package/dist/env.d.ts +2 -2
  121. package/dist/env.js +9 -0
  122. package/dist/env.js.map +1 -0
  123. package/dist/hydrate.d.ts +5 -4
  124. package/dist/hydrate.js +84 -0
  125. package/dist/hydrate.js.map +1 -0
  126. package/dist/index-26658829.d.ts +23 -0
  127. package/dist/index.cjs.d.ts +784 -0
  128. package/dist/index.cjs.js +5129 -0
  129. package/dist/index.cjs.js.map +1 -0
  130. package/dist/index.d.ts +32 -31
  131. package/dist/index.js +33 -0
  132. package/dist/index.js.map +1 -0
  133. package/dist/{dsl/instance.d.ts → instance-0f017c6e.d.ts} +19 -18
  134. package/dist/next-tick.d.ts +3 -2
  135. package/dist/next-tick.js +47 -0
  136. package/dist/next-tick.js.map +1 -0
  137. package/dist/{dom/node_types.d.ts → node_types-9ac5b4dd.d.ts} +2 -1
  138. package/dist/{interface/options.d.ts → options-0f017c6e.d.ts} +5 -4
  139. package/dist/options.d.ts +3 -2
  140. package/dist/options.js +7 -0
  141. package/dist/options.js.map +1 -0
  142. package/dist/perf.d.ts +2 -2
  143. package/dist/perf.js +28 -0
  144. package/dist/perf.js.map +1 -0
  145. package/dist/polyfill/array.d.ts +3 -0
  146. package/dist/polyfill/array.js +56 -0
  147. package/dist/polyfill/array.js.map +1 -0
  148. package/dist/polyfill/index.d.ts +2 -0
  149. package/dist/polyfill/index.js +34 -0
  150. package/dist/polyfill/index.js.map +1 -0
  151. package/dist/polyfill/intersection-observer.d.ts +2 -0
  152. package/dist/polyfill/intersection-observer.js +599 -0
  153. package/dist/polyfill/intersection-observer.js.map +1 -0
  154. package/dist/polyfill/object.d.ts +4 -0
  155. package/dist/polyfill/object.js +102 -0
  156. package/dist/polyfill/object.js.map +1 -0
  157. package/dist/{dom-external/mutation-observer/record.d.ts → record-32b054d8.d.ts} +4 -3
  158. package/dist/runtime.esm.d.ts +91 -89
  159. package/dist/runtime.esm.js +1165 -398
  160. package/dist/runtime.esm.js.map +1 -1
  161. package/dist/utils/cache.d.ts +2 -1
  162. package/dist/utils/cache.js +27 -0
  163. package/dist/utils/cache.js.map +1 -0
  164. package/dist/utils/index.d.ts +16 -15
  165. package/dist/utils/index.js +95 -0
  166. package/dist/utils/index.js.map +1 -0
  167. package/dist/utils/lodash.d.ts +2 -0
  168. package/dist/utils/lodash.js +22 -0
  169. package/dist/utils/lodash.js.map +1 -0
  170. package/dist/utils/router.d.ts +8 -0
  171. package/dist/utils/router.js +24 -0
  172. package/dist/utils/router.js.map +1 -0
  173. package/package.json +20 -10
  174. package/dist/interface/element.d.ts +0 -4
  175. package/dist/interface/event-target.d.ts +0 -10
  176. package/dist/interface/event.d.ts +0 -15
  177. package/dist/interface/hydrate.d.ts +0 -29
  178. package/dist/interface/index.d.ts +0 -7
  179. package/dist/interface/node.d.ts +0 -7
  180. package/dist/interface/utils.d.ts +0 -2
@@ -0,0 +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,mB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@
1
+ declare function handleObjectAssignPolyfill(): void;
2
+ declare function handleObjectEntriesPolyfill(): void;
3
+ declare function handleObjectDefinePropertyPolyfill(): void;
4
+ export { handleObjectAssignPolyfill, handleObjectEntriesPolyfill, handleObjectDefinePropertyPolyfill };
@@ -0,0 +1,102 @@
1
+ import { isFunction, isObject, isUndefined } from '@tarojs/shared';
2
+
3
+ function handleObjectAssignPolyfill() {
4
+ if (!isFunction(Object.assign)) {
5
+ // Must be writable: true, enumerable: false, configurable: true
6
+ Object.assign = function (target) {
7
+ if (target == null) { // TypeError if undefined or null
8
+ throw new TypeError('Cannot convert undefined or null to object');
9
+ }
10
+ const to = Object(target);
11
+ for (let index = 1; index < arguments.length; index++) {
12
+ const nextSource = arguments[index];
13
+ if (nextSource != null) { // Skip over if undefined or null
14
+ for (const nextKey in nextSource) {
15
+ // Avoid bugs when hasOwnProperty is shadowed
16
+ if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
17
+ to[nextKey] = nextSource[nextKey];
18
+ }
19
+ }
20
+ }
21
+ }
22
+ return to;
23
+ };
24
+ }
25
+ }
26
+ function handleObjectEntriesPolyfill() {
27
+ if (!isFunction(Object.entries)) {
28
+ // Must be writable: true, enumerable: false, configurable: true
29
+ Object.entries = function (obj) {
30
+ if (obj == null) { // TypeError if undefined or null
31
+ throw new TypeError('Cannot convert undefined or null to object');
32
+ }
33
+ const to = [];
34
+ if (obj != null) { // Skip over if undefined or null
35
+ for (const key in obj) {
36
+ // Avoid bugs when hasOwnProperty is shadowed
37
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
38
+ to.push([key, obj[key]]);
39
+ }
40
+ }
41
+ }
42
+ return to;
43
+ };
44
+ }
45
+ }
46
+ function handleObjectDefinePropertyPolyfill() {
47
+ if (!isFunction(Object.defineProperties)) {
48
+ Object.defineProperties = function (obj, properties) {
49
+ function convertToDescriptor(desc) {
50
+ function hasProperty(obj, prop) {
51
+ return Object.prototype.hasOwnProperty.call(obj, prop);
52
+ }
53
+ if (!isObject(desc)) {
54
+ throw new TypeError('bad desc');
55
+ }
56
+ const d = {};
57
+ if (hasProperty(desc, 'enumerable'))
58
+ d.enumerable = !!desc.enumerable;
59
+ if (hasProperty(desc, 'configurable')) {
60
+ d.configurable = !!desc.configurable;
61
+ }
62
+ if (hasProperty(desc, 'value'))
63
+ d.value = desc.value;
64
+ if (hasProperty(desc, 'writable'))
65
+ d.writable = !!desc.writable;
66
+ if (hasProperty(desc, 'get')) {
67
+ const g = desc.get;
68
+ if (!isFunction(g) && !isUndefined(g)) {
69
+ throw new TypeError('bad get');
70
+ }
71
+ d.get = g;
72
+ }
73
+ if (hasProperty(desc, 'set')) {
74
+ const s = desc.set;
75
+ if (!isFunction(s) && !isUndefined(s)) {
76
+ throw new TypeError('bad set');
77
+ }
78
+ d.set = s;
79
+ }
80
+ if (('get' in d || 'set' in d) && ('value' in d || 'writable' in d)) {
81
+ throw new TypeError('identity-confused descriptor');
82
+ }
83
+ return d;
84
+ }
85
+ if (!isObject(obj))
86
+ throw new TypeError('bad obj');
87
+ properties = Object(properties);
88
+ const keys = Object.keys(properties);
89
+ const descs = [];
90
+ for (let i = 0; i < keys.length; i++) {
91
+ descs.push([keys[i], convertToDescriptor(properties[keys[i]])]);
92
+ }
93
+ for (let i = 0; i < descs.length; i++) {
94
+ Object.defineProperty(obj, descs[i][0], descs[i][1]);
95
+ }
96
+ return obj;
97
+ };
98
+ }
99
+ }
100
+
101
+ export { handleObjectAssignPolyfill, handleObjectDefinePropertyPolyfill, handleObjectEntriesPolyfill };
102
+ //# sourceMappingURL=object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.js","sources":["../../src/polyfill/object.ts"],"sourcesContent":["import { isFunction, isObject, isUndefined } from '@tarojs/shared'\n\nexport function handleObjectAssignPolyfill () {\n if (!isFunction(Object.assign)) {\n // Must be writable: true, enumerable: false, configurable: true\n Object.assign = function (target) { // .length of function is 2\n if (target == null) { // TypeError if undefined or null\n throw new TypeError('Cannot convert undefined or null to object')\n }\n\n const to = Object(target)\n\n for (let index = 1; index < arguments.length; index++) {\n const nextSource = arguments[index]\n\n if (nextSource != null) { // Skip over if undefined or null\n for (const nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey]\n }\n }\n }\n }\n return to\n }\n }\n}\n\nexport function handleObjectEntriesPolyfill () {\n if (!isFunction(Object.entries)) {\n // Must be writable: true, enumerable: false, configurable: true\n Object.entries = function (obj) { // .length of function is 2\n if (obj == null) { // TypeError if undefined or null\n throw new TypeError('Cannot convert undefined or null to object')\n }\n\n const to: [string, unknown][] = []\n\n if (obj != null) { // Skip over if undefined or null\n for (const key in obj) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n to.push([key, obj[key]])\n }\n }\n }\n return to\n }\n }\n}\n\nexport function handleObjectDefinePropertyPolyfill () {\n if (!isFunction(Object.defineProperties)) {\n Object.defineProperties = function (obj, properties: Record<PropertyKey, Record<PropertyKey, unknown>>) {\n function convertToDescriptor (desc: Record<string, unknown>) {\n function hasProperty (obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop)\n }\n\n if (!isObject(desc)) { throw new TypeError('bad desc') }\n\n const d: Record<PropertyKey, unknown> = {}\n\n if (hasProperty(desc, 'enumerable')) d.enumerable = !!desc.enumerable\n if (hasProperty(desc, 'configurable')) { d.configurable = !!desc.configurable }\n if (hasProperty(desc, 'value')) d.value = desc.value\n if (hasProperty(desc, 'writable')) d.writable = !!desc.writable\n if (hasProperty(desc, 'get')) {\n const g = desc.get\n\n if (!isFunction(g) && !isUndefined(g)) { throw new TypeError('bad get') }\n d.get = g\n }\n if (hasProperty(desc, 'set')) {\n const s = desc.set\n if (!isFunction(s) && !isUndefined(s)) { throw new TypeError('bad set') }\n d.set = s\n }\n\n if (('get' in d || 'set' in d) && ('value' in d || 'writable' in d)) { throw new TypeError('identity-confused descriptor') }\n\n return d\n }\n\n if (!isObject(obj)) throw new TypeError('bad obj')\n\n properties = Object(properties)\n\n const keys = Object.keys(properties)\n const descs: [PropertyKey, Record<PropertyKey, unknown>][] = []\n\n for (let i = 0; i < keys.length; i++) {\n descs.push([keys[i], convertToDescriptor(properties[keys[i]])])\n }\n\n for (let i = 0; i < descs.length; i++) {\n Object.defineProperty(obj, descs[i][0], descs[i][1])\n }\n\n return obj\n }\n }\n}\n"],"names":[],"mappings":";;SAEgB,0BAA0B,GAAA;AACxC,IAAA,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;;AAE9B,QAAA,MAAM,CAAC,MAAM,GAAG,UAAU,MAAM,EAAA;AAC9B,YAAA,IAAI,MAAM,IAAI,IAAI,EAAE;AAClB,gBAAA,MAAM,IAAI,SAAS,CAAC,4CAA4C,CAAC,CAAA;AAClE,aAAA;AAED,YAAA,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;AAEzB,YAAA,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;AACrD,gBAAA,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;AAEnC,gBAAA,IAAI,UAAU,IAAI,IAAI,EAAE;AACtB,oBAAA,KAAK,MAAM,OAAO,IAAI,UAAU,EAAE;;AAEhC,wBAAA,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE;4BAC7D,EAAE,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;AAClC,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;AACD,YAAA,OAAO,EAAE,CAAA;AACX,SAAC,CAAA;AACF,KAAA;AACH,CAAC;SAEe,2BAA2B,GAAA;AACzC,IAAA,IAAI,CAAC,UAAU,CAAC,MAAM,CA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,SAAS,CAAC,8BAA8B,CAAC,CAAA;AAAE,iBAAA;AAE5H,gBAAA,OAAO,CAAC,CAAA;aACT;AAED,YAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;AAAE,gBAAA,MAAM,IAAI,SAAS,CAAC,SAAS,CAAC,CAAA;AAElD,YAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;YAE/B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;YACpC,MAAM,KAAK,GAAkD,EAAE,CAAA;AAE/D,YAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACpC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAChE,aAAA;AAED,YAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACrC,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACrD,aAAA;AAED,YAAA,OAAO,GAAG,CAAA;AACZ,SAAC,CAAA;AACF,KAAA;AACH;;;;"}
@@ -1,11 +1,11 @@
1
- import type { TaroNode } from '../../dom/node';
1
+ import { TaroNode } from "./dom/node.js";
2
2
  /**
3
3
  * A MutationRecord represents an individual DOM mutation.
4
4
  * It is the object that is passed to MutationObserver's callback.
5
5
  * @see https://dom.spec.whatwg.org/#interface-mutationrecord
6
6
  * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord
7
7
  */
8
- export interface MutationRecord {
8
+ interface MutationRecord {
9
9
  readonly target: TaroNode;
10
10
  readonly addedNodes?: TaroNode[];
11
11
  readonly removedNodes?: TaroNode[];
@@ -17,8 +17,9 @@ export interface MutationRecord {
17
17
  readonly type: MutationRecordType;
18
18
  readonly value?: string | null;
19
19
  }
20
- export declare const enum MutationRecordType {
20
+ declare const enum MutationRecordType {
21
21
  ATTRIBUTES = "attributes",
22
22
  CHARACTER_DATA = "characterData",
23
23
  CHILD_LIST = "childList"
24
24
  }
25
+ export { MutationRecord, MutationRecordType };
@@ -1,5 +1,4 @@
1
1
  import { Shortcuts, Events } from "@tarojs/shared";
2
- import { PageConfig } from "@tarojs/taro";
3
2
  import VueCtor from "vue";
4
3
  import { ComponentOptions, VNode } from "vue";
5
4
  import { Component as Vue3Component } from "@vue/runtime-core";
@@ -48,6 +47,9 @@ interface AddEventListenerOptions extends EventListenerOptions {
48
47
  interface EventHandler extends Function {
49
48
  _stop?: boolean;
50
49
  }
50
+ // Note: @tarojs/runtime 不依赖 @tarojs/taro, 所以不能改为从 @tarojs/taro 引入 (可能导致循环依赖)
51
+ type TFunc = (...args: any[]) => any;
52
+ type PageConfig = Record<string, any>;
51
53
  interface MpInstance {
52
54
  config: PageConfig;
53
55
  setData: (data: unknown, cb: () => void) => void;
@@ -134,8 +136,6 @@ interface Options {
134
136
  };
135
137
  miniGlobal?: any;
136
138
  }
137
- type Func = (...args: any[]) => any;
138
- type Ctx = Record<string, any>;
139
139
  declare class TaroEventTarget {
140
140
  __handlers: Record<string, EventHandler[]>;
141
141
  addEventListener(type: string, handler: EventHandler, options?: boolean | AddEventListenerOptions): void;
@@ -151,8 +151,8 @@ declare class TaroRootElement extends TaroElement {
151
151
  get _path(): string;
152
152
  get _root(): TaroRootElement;
153
153
  enqueueUpdate(payload: UpdatePayload): void;
154
- performUpdate(initRender?: boolean, prerender?: Func): void;
155
- enqueueUpdateCallback(cb: Func, ctx?: Record<string, any>): void;
154
+ performUpdate(initRender?: boolean, prerender?: TFunc): void;
155
+ enqueueUpdateCallback(cb: TFunc, ctx?: Record<string, any>): void;
156
156
  flushUpdateCallback(): void;
157
157
  }
158
158
  interface RemoveChildOptions {
@@ -223,7 +223,7 @@ declare class TaroNode extends TaroEventTarget {
223
223
  hasChildNodes(): boolean;
224
224
  enqueueUpdate(payload: UpdatePayload): void;
225
225
  get ownerDocument(): TaroDocument;
226
- static extend(methodName: string, options: Func | Record<string, any>): void;
226
+ static extend(methodName: string, options: TFunc | Record<string, any>): void;
227
227
  }
228
228
  declare class Style {
229
229
  _pending: boolean;
@@ -297,7 +297,7 @@ declare class TaroElement extends TaroNode {
297
297
  dispatchEvent(event: TaroEvent): boolean;
298
298
  addEventListener(type: any, handler: any, options: any): void;
299
299
  removeEventListener(type: any, handler: any, sideEffect?: boolean): void;
300
- static extend(methodName: string, options: Func | Record<string, any>): void;
300
+ static extend(methodName: string, options: TFunc | Record<string, any>): void;
301
301
  }
302
302
  declare class FormElement extends TaroElement {
303
303
  get type(): string;
@@ -311,6 +311,7 @@ declare class TaroDocument extends TaroElement {
311
311
  head: TaroElement;
312
312
  body: TaroElement;
313
313
  createEvent: typeof createEvent;
314
+ cookie?: string;
314
315
  constructor();
315
316
  createElement(type: string): TaroElement | TaroRootElement | FormElement;
316
317
  // an ugly fake createElementNS to deal with @vue/runtime-dom's
@@ -329,8 +330,9 @@ interface Env {
329
330
  document: TaroDocument;
330
331
  }
331
332
  declare const env: Env;
332
- declare let document: any;
333
- declare function getComputedStyle(element: TaroElement): Style;
333
+ declare const document: TaroDocument;
334
+ type TGetComputedStyle = typeof window.getComputedStyle | ((el: TaroElement) => Style);
335
+ declare const getComputedStyle: TGetComputedStyle;
334
336
  declare const eventCenter: Events;
335
337
  type EventsType = typeof Events;
336
338
  /**
@@ -345,75 +347,60 @@ declare class RuntimeCache<T> {
345
347
  get(identifier: string): T | undefined;
346
348
  delete(identifier: string): void;
347
349
  }
348
- declare namespace LocationType {
349
- const eventCenter: Events;
350
- type EventsType = typeof Events;
351
- /**
352
- * 一个小型缓存池,用于在切换页面时,存储一些上下文信息
353
- */
354
- class RuntimeCache<T> {
355
- name: string;
356
- cache: Map<string, T>;
357
- constructor(name: string);
358
- has(identifier: string): boolean;
359
- set(identifier: string, ctx: T): void;
360
- get(identifier: string): T | undefined;
361
- delete(identifier: string): void;
362
- }
363
- type Options = {
364
- window: any;
365
- };
366
- type LocationContext = {
367
- lastHref: string;
368
- };
369
- class Location extends Events {
370
- #private;
371
- constructor(options: Options);
372
- /* public property */
373
- get protocol(): string;
374
- set protocol(val: string);
375
- get host(): string;
376
- set host(val: string);
377
- get hostname(): string;
378
- set hostname(val: string);
379
- get port(): string;
380
- set port(val: string);
381
- get pathname(): string;
382
- set pathname(val: string);
383
- get search(): string;
384
- set search(val: string);
385
- get hash(): string;
386
- // 小程序的navigateTo存在截断hash字符串的问题
387
- set hash(val: string);
388
- get href(): string;
389
- set href(val: string);
390
- get origin(): string;
391
- set origin(val: string);
392
- /* public method */
393
- assign(): void;
394
- reload(): void;
395
- replace(url: string): void;
396
- toString(): string;
397
- // For debug
398
- get cache(): RuntimeCache<LocationContext>;
399
- }
350
+ type Options$0 = {
351
+ window: any;
352
+ };
353
+ type LocationContext = {
354
+ lastHref: string;
355
+ };
356
+ declare class TaroLocation extends Events {
357
+ #private;
358
+ constructor(options: Options$0);
359
+ /* public property */
360
+ get protocol(): string;
361
+ set protocol(val: string);
362
+ get host(): string;
363
+ set host(val: string);
364
+ get hostname(): string;
365
+ set hostname(val: string);
366
+ get port(): string;
367
+ set port(val: string);
368
+ get pathname(): string;
369
+ set pathname(val: string);
370
+ get search(): string;
371
+ set search(val: string);
372
+ get hash(): string;
373
+ // 小程序的navigateTo存在截断hash字符串的问题
374
+ set hash(val: string);
375
+ get href(): string;
376
+ set href(val: string);
377
+ get origin(): string;
378
+ set origin(val: string);
379
+ /* public method */
380
+ assign(): void;
381
+ reload(): void;
382
+ replace(url: string): void;
383
+ toString(): string;
384
+ // For debug
385
+ get cache(): RuntimeCache<LocationContext>;
400
386
  }
387
+ declare const Location: typeof TaroLocation;
401
388
  interface HistoryState {
402
389
  state: Record<string, any> | null;
403
390
  title: string;
404
391
  url: string;
405
392
  }
406
- type Options$0 = {
393
+ type Options$1 = {
407
394
  window: any;
408
395
  };
409
396
  type HistoryContext = {
410
- location: LocationType.Location;
397
+ location: TaroLocation;
411
398
  stack: HistoryState[];
412
399
  cur: number;
413
400
  };
414
- declare class History extends Events {
401
+ declare class TaroHistory extends Events {
415
402
  #private;
416
- constructor(location: LocationType.Location, options: Options$0);
403
+ constructor(location: TaroLocation, options: Options$1);
417
404
  /* public property */
418
405
  get length(): number;
419
406
  get state(): Record<string, any> | null;
@@ -426,28 +413,15 @@ declare class History extends Events {
426
413
  // For debug
427
414
  get cache(): RuntimeCache<HistoryContext>;
428
415
  }
429
- declare const nav: any;
416
+ declare const History: typeof TaroHistory;
417
+ declare const nav: typeof window.navigator;
430
418
  // https://github.com/myrne/performance-now
431
419
  declare let now: () => number;
432
420
  // https://gist.github.com/paulirish/1579671
433
421
  // https://gist.github.com/jalbam/5fe05443270fa6d8136238ec72accbc0
434
- declare const _raf: typeof requestAnimationFrame | ((callback: any) => NodeJS.Timer);
422
+ declare const _raf: typeof requestAnimationFrame;
435
423
  declare const _caf: typeof cancelAnimationFrame;
436
- declare class URLSearchParams {
437
- #private;
438
- constructor(query: any);
439
- append(name: string, value: string): void;
440
- delete(name: string): void;
441
- get(name: string): any;
442
- getAll(name: string): any;
443
- has(name: string): boolean;
444
- keys(): string[];
445
- set(name: string, value: string): void;
446
- forEach(callback: any, thisArg: any): void;
447
- toJSON(): {};
448
- toString(): string;
449
- }
450
- declare class URL {
424
+ declare class TaroURL {
451
425
  #private;
452
426
  static createObjectURL(): void;
453
427
  static revokeObjectURL(): void;
@@ -488,6 +462,7 @@ declare class URL {
488
462
  href: string;
489
463
  };
490
464
  }
465
+ declare const URL: typeof TaroURL;
491
466
  declare function parseUrl(url?: string): {
492
467
  href: string;
493
468
  origin: string;
@@ -499,9 +474,27 @@ declare function parseUrl(url?: string): {
499
474
  search: string;
500
475
  hash: string;
501
476
  };
502
- declare let window: any;
503
- declare const location: any;
504
- declare const history: any;
477
+ declare const URLSearchParams: any;
478
+ declare class TaroWindow extends Events {
479
+ navigator: Navigator;
480
+ requestAnimationFrame: typeof requestAnimationFrame;
481
+ cancelAnimationFrame: typeof cancelAnimationFrame;
482
+ getComputedStyle: TGetComputedStyle;
483
+ Date: DateConstructor;
484
+ location: TaroLocation;
485
+ history: TaroHistory;
486
+ XMLHttpRequest?: Partial<XMLHttpRequest>;
487
+ constructor();
488
+ initEvent(): void;
489
+ get document(): TaroDocument;
490
+ addEventListener(event: string, callback: (arg: any) => void): void;
491
+ removeEventListener(event: string, callback: (arg: any) => void): void;
492
+ setTimeout(...args: Parameters<typeof setTimeout>): number;
493
+ clearTimeout(...args: Parameters<typeof clearTimeout>): void;
494
+ }
495
+ declare const window: TaroWindow;
496
+ declare const location: TaroLocation;
497
+ declare const history: TaroHistory;
505
498
  // for Vue3
506
499
  declare class SVGElement extends TaroElement {
507
500
  }
@@ -677,7 +670,7 @@ interface ReactAppInstance<T = AppInstance> extends Component<T>, AppInstance {
677
670
  interface PageLifeCycle extends Show {
678
671
  eh?(event: MpEvent): void;
679
672
  onAddToFavorites?(): void;
680
- onLoad?(options: Record<string, unknown>, cb?: Func): void;
673
+ onLoad?(options: Record<string, unknown>, cb?: TFunc): void;
681
674
  onOptionMenuClick?(): void;
682
675
  onPageScroll?(obj: {
683
676
  scrollTop: number;
@@ -757,7 +750,6 @@ declare const eventSource: IEventSource;
757
750
  declare function injectPageInstance(inst: Instance<PageProps>, id: string): void;
758
751
  declare function getPageInstance(id: string): Instance | undefined;
759
752
  declare function removePageInstance(id: string): void;
760
- declare function addLeadingSlash(path?: string): string;
761
753
  declare function safeExecute(path: string, lifecycle: string, ...args: unknown[]): any;
762
754
  declare function stringify(obj?: Record<string, unknown>): string;
763
755
  declare function getPath(id: string, options?: Record<string, unknown>): string;
@@ -774,9 +766,19 @@ declare function createRecursiveComponentConfig(componentName?: string): any;
774
766
  * it's a vnode traverser and modifier: that's exactly what Taro's doing in here.
775
767
  */
776
768
  declare function hydrate(node: TaroElement | TaroText): MiniData;
777
- declare const nextTick: (cb: Func, ctx?: Record<string, any>) => void;
769
+ declare const nextTick: (cb: TFunc, ctx?: Record<string, any>) => void;
778
770
  declare const options: Options;
779
771
  declare const incrementId: () => () => string;
780
772
  declare function isHasExtractProp(el: TaroElement): boolean;
773
+ // export const removeLeadingSlash = (str = '') => str.replace(/^\.?\//, '')
774
+ // export const removeTrailingSearch = (str = '') => str.replace(/\?[\s\S]*$/, '')
775
+ declare const addLeadingSlash: (url?: string) => string;
776
+ declare const hasBasename: (path?: string, prefix?: string) => boolean;
777
+ declare const stripBasename: (path?: string, prefix?: string) => string;
778
+ declare const stripTrailing: (str?: string) => string;
779
+ declare const stripSuffix: (path?: string, suffix?: string) => string;
780
+ declare const getHomePage: (path?: string, basename?: string, customRoutes?: Record<string, string | string[]>, entryPagePath?: string) => string;
781
+ declare const getCurrentPage: (routerMode?: string, basename?: string) => string;
782
+ declare function handlePolyfill(): void;
781
783
  export { hooks } from '@tarojs/shared';
782
- export { document, getComputedStyle, History, Location, nav as navigator, _caf as cancelAnimationFrame, now, _raf as requestAnimationFrame, parseUrl, URL, URLSearchParams, history, location, 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, addLeadingSlash, createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify, EventsType, eventCenter, Events, hydrate, nextTick, options, incrementId, isHasExtractProp, Instance, VueAppInstance, VueInstance, PageProps, ReactPageComponent, ReactPageInstance, ReactAppInstance, PageLifeCycle, PageInstance, AppInstance, Attributes, EventOptions, MpEvent, EventListenerOptions, AddEventListenerOptions, EventHandler, MpInstance, MiniElementData, MiniTextData, MiniData, HydratedData, UpdatePayloadValue, DataTree, UpdatePayload, Options$0 as Options, Func, Ctx };
784
+ export { document, getComputedStyle, History, Location, nav as navigator, _caf as cancelAnimationFrame, now, _raf as requestAnimationFrame, parseUrl, URL, URLSearchParams, history, location, 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, incrementId, isHasExtractProp, addLeadingSlash, hasBasename, stripBasename, stripTrailing, stripSuffix, getHomePage, getCurrentPage, Instance, VueAppInstance, VueInstance, 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 };