From e68565791ae3142ede083449a1e31f8ec175b44e Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Thu, 6 May 2021 11:23:55 +0800 Subject: [PATCH] wip(ssr): drop lifecycle hooks --- package.json | 3 +- packages/uni-cli-shared/src/index.ts | 1 + packages/uni-cli-shared/src/ssr.ts | 17 + packages/uni-h5/dist/uni-h5.cjs.js | 1584 ++------------------------ packages/uni-h5/vite.config.ts | 51 +- yarn.lock | 391 ++++--- 6 files changed, 372 insertions(+), 1675 deletions(-) create mode 100644 packages/uni-cli-shared/src/ssr.ts diff --git a/package.json b/package.json index 8d2278111..6df336335 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^11.0.1", "@rollup/plugin-replace": "^2.3.4", + "@rollup/plugin-strip": "^2.0.0", "@size-limit/preset-app": "^4.10.1", "@types/css-font-loading-module": "^0.0.4", "@types/debug": "^4.1.5", @@ -52,7 +53,7 @@ "@types/quill": "^1.3.7", "@typescript-eslint/parser": "^4.12.0", "@vitejs/plugin-vue": "^1.2.2", - "@vitejs/plugin-vue-jsx": "^1.1.3", + "@vitejs/plugin-vue-jsx": "^1.1.4", "eslint": "^7.17.0", "fs-extra": "^9.0.1", "jest": "^26.6.3", diff --git a/packages/uni-cli-shared/src/index.ts b/packages/uni-cli-shared/src/index.ts index bb5fe1ab4..c1bb9359f 100644 --- a/packages/uni-cli-shared/src/index.ts +++ b/packages/uni-cli-shared/src/index.ts @@ -1,3 +1,4 @@ +export * from './ssr' export * from './uni' export * from './url' export * from './json' diff --git a/packages/uni-cli-shared/src/ssr.ts b/packages/uni-cli-shared/src/ssr.ts new file mode 100644 index 000000000..341e7900a --- /dev/null +++ b/packages/uni-cli-shared/src/ssr.ts @@ -0,0 +1,17 @@ +export const stripOptions = { + include: ['**/*.js', '**/*.ts', '**/*.tsx', '**/*.vue'], + functions: [ + 'onBeforeMount', + 'onMounted', + 'onBeforeUpdate', + 'onUpdated', + 'onActivated', + 'onDeactivated', + 'onBeforeActivate', + 'onBeforeDeactivate', + 'onBeforeUnmount', + 'onUnmounted', + 'onRenderTracked', + 'onRenderTriggered', + ], +} diff --git a/packages/uni-h5/dist/uni-h5.cjs.js b/packages/uni-h5/dist/uni-h5.cjs.js index 4c904e13d..bfc40b69a 100644 --- a/packages/uni-h5/dist/uni-h5.cjs.js +++ b/packages/uni-h5/dist/uni-h5.cjs.js @@ -84,21 +84,21 @@ const initI18nVideoMsgsOnce = /* @__PURE__ */ uniShared.once(() => { function E() { } E.prototype = { - on: function(name, callback2, ctx) { + on: function(name, callback, ctx) { var e2 = this.e || (this.e = {}); (e2[name] || (e2[name] = [])).push({ - fn: callback2, + fn: callback, ctx }); return this; }, - once: function(name, callback2, ctx) { + once: function(name, callback, ctx) { var self = this; function listener() { self.off(name, listener); - callback2.apply(ctx, arguments); + callback.apply(ctx, arguments); } - listener._ = callback2; + listener._ = callback; return this.on(name, listener, ctx); }, emit: function(name) { @@ -111,13 +111,13 @@ E.prototype = { } return this; }, - off: function(name, callback2) { + off: function(name, callback) { var e2 = this.e || (this.e = {}); var evts = e2[name]; var liveEvents = []; - if (evts && callback2) { + if (evts && callback) { for (var i2 = 0, len = evts.length; i2 < len; i2++) { - if (evts[i2].fn !== callback2 && evts[i2].fn._ !== callback2) + if (evts[i2].fn !== callback && evts[i2].fn._ !== callback) liveEvents.push(evts[i2]); } } @@ -128,11 +128,11 @@ E.prototype = { function initBridge(namespace) { const emitter = new E(); return shared.extend(emitter, { - subscribe(event, callback2) { - emitter.on(`${namespace}.${event}`, callback2); + subscribe(event, callback) { + emitter.on(`${namespace}.${event}`, callback); }, - unsubscribe(event, callback2) { - emitter.off(`${namespace}.${event}`, callback2); + unsubscribe(event, callback) { + emitter.off(`${namespace}.${event}`, callback); }, subscribeHandler(event, args, pageId) { if (process.env.NODE_ENV !== "production") { @@ -538,11 +538,11 @@ function tryCatch(fn) { } let invokeCallbackId = 1; const invokeCallbacks = {}; -function addInvokeCallback(id, name, callback2, keepAlive = false) { +function addInvokeCallback(id, name, callback, keepAlive = false) { invokeCallbacks[id] = { name, keepAlive, - callback: callback2 + callback }; return id; } @@ -601,9 +601,9 @@ function createAsyncApiCallback(name, args = {}, {beforeAll, beforeSuccess} = {} }); return callbackId; } -const callbacks$1 = [API_SUCCESS, API_FAIL, API_COMPLETE]; +const callbacks = [API_SUCCESS, API_FAIL, API_COMPLETE]; function hasCallback(args) { - if (shared.isPlainObject(args) && callbacks$1.find((cb) => shared.isFunction(args[cb]))) { + if (shared.isPlainObject(args) && callbacks.find((cb) => shared.isFunction(args[cb]))) { return true; } return false; @@ -1656,9 +1656,9 @@ const _sfc_main$8 = { }); color = LinearGradient; } else if (data[0] === "pattern") { - const loaded = this.checkImageLoaded(data[1], actions.slice(index2 + 1), callbackId, function(image2) { - if (image2) { - c2d[method1] = c2d.createPattern(image2, data[2]); + const loaded = this.checkImageLoaded(data[1], actions.slice(index2 + 1), callbackId, function(image) { + if (image) { + c2d[method1] = c2d.createPattern(image, data[2]); } }); if (!loaded) { @@ -1708,9 +1708,9 @@ const _sfc_main$8 = { var url = dataArray[0]; var otherData = dataArray.slice(1); self._images = self._images || {}; - if (!self.checkImageLoaded(url, actions.slice(index2 + 1), callbackId, function(image2) { - if (image2) { - c2d.drawImage.apply(c2d, [image2].concat([...otherData.slice(4, 8)], [...otherData.slice(0, 4)])); + if (!self.checkImageLoaded(url, actions.slice(index2 + 1), callbackId, function(image) { + if (image) { + c2d.drawImage.apply(c2d, [image].concat([...otherData.slice(4, 8)], [...otherData.slice(0, 4)])); } })) return "break"; @@ -1815,16 +1815,16 @@ const _sfc_main$8 = { }, checkImageLoaded: function(src, actions, callbackId, fn) { var self = this; - var image2 = this._images[src]; - if (image2.ready) { - fn(image2); + var image = this._images[src]; + if (image.ready) { + fn(image); return true; } else { this._actionsDefer.unshift([actions, true]); this.actionsWaiting = true; - image2.onload = function() { - image2.ready = true; - fn(image2); + image.onload = function() { + image.ready = true; + fn(image); self.actionsWaiting = false; var actions2 = self._actionsDefer.slice(0); self._actionsDefer = []; @@ -2220,9 +2220,6 @@ var index$h = /* @__PURE__ */ vue.defineComponent({ }; if (!!uniLabel) { uniLabel.addHandler(_onClick); - vue.onBeforeUnmount(() => { - uniLabel.removeHandler(_onClick); - }); } return () => { const { @@ -2257,10 +2254,6 @@ function useCheckboxInject(checkboxChecked, checkboxValue, reset) { uniForm.addField(formField); } const uniLabel = vue.inject(uniLabelKey, false); - vue.onBeforeUnmount(() => { - uniCheckGroup && uniCheckGroup.removeField(field); - uniForm && uniForm.removeField(formField); - }); return { uniCheckGroup, uniForm, @@ -2354,17 +2347,17 @@ function HTMLParser(html, handler) { } if (chars) { index2 = html.indexOf("<"); - var text2 = index2 < 0 ? html : html.substring(0, index2); + var text = index2 < 0 ? html : html.substring(0, index2); html = index2 < 0 ? "" : html.substring(index2); if (handler.chars) { - handler.chars(text2); + handler.chars(text); } } } else { - html = html.replace(new RegExp("([\\s\\S]*?)]*>"), function(all, text3) { - text3 = text3.replace(/|/g, "$1$2"); + html = html.replace(new RegExp("([\\s\\S]*?)]*>"), function(all, text2) { + text2 = text2.replace(/|/g, "$1$2"); if (handler.chars) { - handler.chars(text3); + handler.chars(text2); } return ""; }); @@ -2433,586 +2426,12 @@ function makeMap(str) { } return obj; } -function divider(Quill) { - const BlockEmbed = Quill.import("blots/block/embed"); - class Divider extends BlockEmbed { - } - Divider.blotName = "divider"; - Divider.tagName = "HR"; - return { - "formats/divider": Divider - }; -} -function ins(Quill) { - const Inline = Quill.import("blots/inline"); - class Ins extends Inline { - } - Ins.blotName = "ins"; - Ins.tagName = "INS"; - return { - "formats/ins": Ins - }; -} -function align(Quill) { - const {Scope, Attributor} = Quill.import("parchment"); - const config = { - scope: Scope.BLOCK, - whitelist: ["left", "right", "center", "justify"] - }; - const AlignStyle = new Attributor.Style("align", "text-align", config); - return { - "formats/align": AlignStyle - }; -} -function direction(Quill) { - const {Scope, Attributor} = Quill.import("parchment"); - const config = { - scope: Scope.BLOCK, - whitelist: ["rtl"] - }; - const DirectionStyle = new Attributor.Style("direction", "direction", config); - return { - "formats/direction": DirectionStyle - }; -} -function list(Quill) { - const Parchment = Quill.import("parchment"); - const Container = Quill.import("blots/container"); - const ListItem = Quill.import("formats/list/item"); - class List extends Container { - static create(value) { - const tagName = value === "ordered" ? "OL" : "UL"; - const node = super.create(tagName); - if (value === "checked" || value === "unchecked") { - node.setAttribute("data-checked", value === "checked"); - } - return node; - } - static formats(domNode) { - if (domNode.tagName === "OL") - return "ordered"; - if (domNode.tagName === "UL") { - if (domNode.hasAttribute("data-checked")) { - return domNode.getAttribute("data-checked") === "true" ? "checked" : "unchecked"; - } else { - return "bullet"; - } - } - return void 0; - } - constructor(domNode) { - super(domNode); - const listEventHandler = (e2) => { - if (e2.target.parentNode !== domNode) - return; - const format = this.statics.formats(domNode); - const blot = Parchment.find(e2.target); - if (format === "checked") { - blot.format("list", "unchecked"); - } else if (format === "unchecked") { - blot.format("list", "checked"); - } - }; - domNode.addEventListener("click", listEventHandler); - } - format(name, value) { - if (this.children.length > 0) { - this.children.tail.format(name, value); - } - } - formats() { - return {[this.statics.blotName]: this.statics.formats(this.domNode)}; - } - insertBefore(blot, ref) { - if (blot instanceof ListItem) { - super.insertBefore(blot, ref); - } else { - const index2 = ref == null ? this.length() : ref.offset(this); - const after = this.split(index2); - after.parent.insertBefore(blot, after); - } - } - optimize(context) { - super.optimize(context); - const next = this.next; - if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && next.domNode.tagName === this.domNode.tagName && next.domNode.getAttribute("data-checked") === this.domNode.getAttribute("data-checked")) { - next.moveChildren(this); - next.remove(); - } - } - replace(target) { - if (target.statics.blotName !== this.statics.blotName) { - const item = Parchment.create(this.statics.defaultChild); - target.moveChildren(item); - this.appendChild(item); - } - super.replace(target); - } - } - List.blotName = "list"; - List.scope = Parchment.Scope.BLOCK_BLOT; - List.tagName = ["OL", "UL"]; - List.defaultChild = "list-item"; - List.allowedChildren = [ListItem]; - return { - "formats/list": List - }; -} -function background(Quill) { - const {Scope} = Quill.import("parchment"); - const BackgroundStyle = Quill.import("formats/background"); - const BackgroundColorStyle = new BackgroundStyle.constructor("backgroundColor", "background-color", { - scope: Scope.INLINE - }); - return { - "formats/backgroundColor": BackgroundColorStyle - }; -} -function box(Quill) { - const {Scope, Attributor} = Quill.import("parchment"); - const config = { - scope: Scope.BLOCK - }; - const margin = [ - "margin", - "marginTop", - "marginBottom", - "marginLeft", - "marginRight" - ]; - const padding = [ - "padding", - "paddingTop", - "paddingBottom", - "paddingLeft", - "paddingRight" - ]; - const result = {}; - margin.concat(padding).forEach((name) => { - result[`formats/${name}`] = new Attributor.Style(name, shared.hyphenate(name), config); - }); - return result; -} -function font(Quill) { - const {Scope, Attributor} = Quill.import("parchment"); - const config = { - scope: Scope.INLINE - }; - const font2 = [ - "font", - "fontSize", - "fontStyle", - "fontVariant", - "fontWeight", - "fontFamily" - ]; - const result = {}; - font2.forEach((name) => { - result[`formats/${name}`] = new Attributor.Style(name, shared.hyphenate(name), config); - }); - return result; -} -function text(Quill) { - const {Scope, Attributor} = Quill.import("parchment"); - const text2 = [ - { - name: "lineHeight", - scope: Scope.BLOCK - }, - { - name: "letterSpacing", - scope: Scope.INLINE - }, - { - name: "textDecoration", - scope: Scope.INLINE - }, - { - name: "textIndent", - scope: Scope.BLOCK - } - ]; - const result = {}; - text2.forEach(({name, scope}) => { - result[`formats/${name}`] = new Attributor.Style(name, shared.hyphenate(name), { - scope - }); - }); - return result; -} -function image(Quill) { - const Image2 = Quill.import("formats/image"); - const ATTRIBUTES = [ - "alt", - "height", - "width", - "data-custom", - "class", - "data-local" - ]; - Image2.sanitize = (url) => url; - Image2.formats = function formats(domNode) { - return ATTRIBUTES.reduce(function(formats2, attribute) { - if (domNode.hasAttribute(attribute)) { - formats2[attribute] = domNode.getAttribute(attribute); - } - return formats2; - }, {}); - }; - const format = Image2.prototype.format; - Image2.prototype.format = function(name, value) { - if (ATTRIBUTES.indexOf(name) > -1) { - if (value) { - this.domNode.setAttribute(name, value); - } else { - this.domNode.removeAttribute(name); - } - } else { - format.call(this, name, value); - } - }; -} -function register(Quill) { - const formats = { - divider, - ins, - align, - direction, - list, - background, - box, - font, - text, - image - }; - const options = {}; - Object.values(formats).forEach((value) => Object.assign(options, value(Quill))); - Quill.register(options, true); -} -const scripts = {}; -function loadScript(globalName, src, callback2) { - const globalObject = typeof globalName === "string" ? window[globalName] : globalName; - if (globalObject) { - callback2(); - return; - } - let callbacks2 = scripts[src]; - if (!callbacks2) { - callbacks2 = scripts[src] = []; - const script = document.createElement("script"); - script.src = src; - document.body.appendChild(script); - script.onload = function() { - callbacks2.forEach((callback22) => callback22()); - delete scripts[src]; - }; - } - callbacks2.push(callback2); -} function useQuill(props2, rootRef, trigger) { - let quillReady; - let skipMatcher; - let quill; vue.watch(() => props2.readOnly, (value) => { - if (quillReady) { - quill.enable(!value); - if (!value) { - quill.blur(); - } - } }); vue.watch(() => props2.placeholder, (value) => { - if (quillReady) { - quill.root.setAttribute("data-placeholder", value); - } - }); - function html2delta(html) { - const tags = ["span", "strong", "b", "ins", "em", "i", "u", "a", "del", "s", "sub", "sup", "img", "div", "p", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ol", "ul", "li", "br"]; - let content = ""; - let disable; - HTMLParser(html, { - start: function(tag, attrs, unary) { - if (!tags.includes(tag)) { - disable = !unary; - return; - } - disable = false; - const arrts = attrs.map(({ - name, - value - }) => `${name}="${value}"`).join(" "); - const start = `<${tag} ${arrts} ${unary ? "/" : ""}>`; - content += start; - }, - end: function(tag) { - if (!disable) { - content += ``; - } - }, - chars: function(text2) { - if (!disable) { - content += text2; - } - } - }); - skipMatcher = true; - const delta = quill.clipboard.convert(content); - skipMatcher = false; - return delta; - } - function getContents() { - const html = quill.root.innerHTML; - const text2 = quill.getText(); - const delta = quill.getContents(); - return { - html, - text: text2, - delta - }; - } - let oldStatus = {}; - function updateStatus(range) { - const status = range ? quill.getFormat(range) : {}; - const keys = Object.keys(status); - if (keys.length !== Object.keys(oldStatus).length || keys.find((key) => status[key] !== oldStatus[key])) { - oldStatus = status; - trigger("statuschange", {}, status); - } - } - function initQuill(imageResizeModules) { - const Quill = window.Quill; - register(Quill); - const options = { - toolbar: false, - readOnly: props2.readOnly, - placeholder: props2.placeholder - }; - if (imageResizeModules.length) { - Quill.register("modules/ImageResize", window.ImageResize.default); - options.modules = { - ImageResize: { - modules: imageResizeModules - } - }; - } - const rootEl = rootRef.value; - quill = new Quill(rootEl, options); - const $el = quill.root; - const events = ["focus", "blur", "input"]; - events.forEach((name) => { - $el.addEventListener(name, ($event) => { - if (name === "input") { - $event.stopPropagation(); - } else { - trigger(name, $event, getContents()); - } - }); - }); - quill.on("text-change", () => { - trigger("input", {}, getContents()); - }); - quill.on("selection-change", updateStatus); - quill.on("scroll-optimize", () => { - const range = quill.selection.getRange()[0]; - updateStatus(range); - }); - quill.clipboard.addMatcher(Node.ELEMENT_NODE, (node, delta) => { - if (skipMatcher) { - return delta; - } - if (delta.ops) { - delta.ops = delta.ops.filter(({ - insert - }) => typeof insert === "string").map(({ - insert - }) => ({ - insert - })); - } - return delta; - }); - quillReady = true; - trigger("ready", {}, {}); - } - vue.onMounted(() => { - const imageResizeModules = []; - if (props2.showImgSize) { - imageResizeModules.push("DisplaySize"); - } - if (props2.showImgToolbar) { - imageResizeModules.push("Toolbar"); - } - if (props2.showImgResize) { - imageResizeModules.push("Resize"); - } - const quillSrc = "https://unpkg.com/quill@1.3.7/dist/quill.min.js"; - loadScript(window.Quill, quillSrc, () => { - if (imageResizeModules.length) { - const imageResizeSrc = "https://unpkg.com/quill-image-resize-mp@3.0.1/image-resize.min.js"; - loadScript(window.ImageResize, imageResizeSrc, () => { - initQuill(imageResizeModules); - }); - } else { - initQuill(imageResizeModules); - } - }); - }); - useSubscribe((type, data) => { - const { - options, - callbackId - } = data; - let res; - let range; - let errMsg; - if (quillReady) { - const Quill = window.Quill; - switch (type) { - case "format": - { - let { - name = "", - value = false - } = options; - range = quill.getSelection(true); - let format = quill.getFormat(range)[name] || false; - if (["bold", "italic", "underline", "strike", "ins"].includes(name)) { - value = !format; - } else if (name === "direction") { - value = value === "rtl" && format ? false : value; - const align2 = quill.getFormat(range).align; - if (value === "rtl" && !align2) { - quill.format("align", "right", "user"); - } else if (!value && align2 === "right") { - quill.format("align", false, "user"); - } - } else if (name === "indent") { - const rtl = quill.getFormat(range).direction === "rtl"; - value = value === "+1"; - if (rtl) { - value = !value; - } - value = value ? "+1" : "-1"; - } else { - if (name === "list") { - value = value === "check" ? "unchecked" : value; - format = format === "checked" ? "unchecked" : format; - } - value = format && format !== (value || false) || !format && value ? value : !format; - } - quill.format(name, value, "user"); - } - break; - case "insertDivider": - range = quill.getSelection(true); - quill.insertText(range.index, "\n", "user"); - quill.insertEmbed(range.index + 1, "divider", true, "user"); - quill.setSelection(range.index + 2, 0, "silent"); - break; - case "insertImage": - { - range = quill.getSelection(true); - const { - src = "", - alt = "", - width = "", - height = "", - extClass = "", - data: data2 = {} - } = options; - const path = getRealPath(src); - quill.insertEmbed(range.index, "image", path, "user"); - const local = /^(file|blob):/.test(path) ? path : false; - quill.formatText(range.index, 1, "data-local", local); - quill.formatText(range.index, 1, "alt", alt); - quill.formatText(range.index, 1, "width", width); - quill.formatText(range.index, 1, "height", height); - quill.formatText(range.index, 1, "class", extClass); - quill.formatText(range.index, 1, "data-custom", Object.keys(data2).map((key) => `${key}=${data2[key]}`).join("&")); - quill.setSelection(range.index + 1, 0, "silent"); - } - break; - case "insertText": - { - range = quill.getSelection(true); - const { - text: text2 = "" - } = options; - quill.insertText(range.index, text2, "user"); - quill.setSelection(range.index + text2.length, 0, "silent"); - } - break; - case "setContents": - { - const { - delta, - html - } = options; - if (typeof delta === "object") { - quill.setContents(delta, "silent"); - } else if (typeof html === "string") { - quill.setContents(html2delta(html), "silent"); - } else { - errMsg = "contents is missing"; - } - } - break; - case "getContents": - res = getContents(); - break; - case "clear": - quill.setText(""); - break; - case "removeFormat": - { - range = quill.getSelection(true); - const parchment = Quill.import("parchment"); - if (range.length) { - quill.removeFormat(range.index, range.length, "user"); - } else { - Object.keys(quill.getFormat(range)).forEach((key) => { - if (parchment.query(key, parchment.Scope.INLINE)) { - quill.format(key, false); - } - }); - } - } - break; - case "undo": - quill.history.undo(); - break; - case "redo": - quill.history.redo(); - break; - case "blur": - quill.blur(); - break; - case "getSelectionText": - range = quill.selection.savedRange; - res = { - text: "" - }; - if (range && range.length !== 0) { - res.text = quill.getText(range.index, range.length); - } - break; - case "scrollIntoView": - quill.scrollIntoView(); - break; - } - updateStatus(range); - } else { - errMsg = "not ready"; - } - if (callbackId) { - UniViewJSBridge.publishHandler("onEditorMethodCallback", { - callbackId, - data: Object.assign({}, res, { - errMsg: `${type}:${errMsg ? "fail " + errMsg : "ok"}` - }) - }); - } }); + useSubscribe(); } const props$g = /* @__PURE__ */ Object.assign({}, props$h, { id: { @@ -3048,8 +2467,7 @@ var index$g = /* @__PURE__ */ vue.defineComponent({ emit: emit2 }) { const rootRef = vue.ref(null); - const trigger = useCustomEvent(rootRef, emit2); - useQuill(props2, rootRef, trigger); + useQuill(props2); useKeyboard(props2, rootRef); return () => { return vue.createVNode("uni-editor", { @@ -3139,7 +2557,6 @@ var ResizeSensor = /* @__PURE__ */ vue.defineComponent({ const rootRef = vue.ref(null); const reset = useResizeSensorReset(rootRef); const update = useResizeSensorUpdate(rootRef, emit2, reset); - useResizeSensorLifecycle(rootRef, props2, update, reset); return () => vue.createVNode("uni-resize-sensor", { ref: rootRef, onAnimationstartOnce: update @@ -3178,21 +2595,6 @@ function useResizeSensorReset(rootRef) { lastElementChild.scrollTop = 1e5; }; } -function useResizeSensorLifecycle(rootRef, props2, update, reset) { - vue.onActivated(reset); - vue.onMounted(() => { - if (props2.initial) { - vue.nextTick(update); - } - const rootEl = rootRef.value; - if (rootEl.offsetParent !== rootEl.parentElement) { - rootEl.parentElement.style.position = "relative"; - } - if (!("AnimationEvent" in window)) { - reset(); - } - }); -} const props$f = { src: { type: String, @@ -3295,12 +2697,6 @@ function useImageState(rootRef, props2) { modeStyle: modeStyleRef, imgSrc }); - vue.onMounted(() => { - const rootEl = rootRef.value; - const style = rootEl.style; - state.origWidth = Number(style.width) || 0; - state.origHeight = Number(style.height) || 0; - }); return state; } function useImageLoader(state, { @@ -3352,8 +2748,6 @@ function useImageLoader(state, { } }; vue.watch(() => state.src, (value) => loadImage(value)); - vue.onMounted(() => loadImage(state.src)); - vue.onBeforeUnmount(() => resetImage()); } function fixNumber(num) { return num; @@ -3408,53 +2802,11 @@ function useImageSize(rootRef, props2, state) { resetSize }; } -const passiveOptions$1 = uniShared.passive(true); -const states = []; -let userInteract = 0; -let inited; -function addInteractListener(vm) { - if (!inited) { - const eventNames = [ - "touchstart", - "touchmove", - "touchend", - "mousedown", - "mouseup" - ]; - eventNames.forEach((eventName) => { - document.addEventListener(eventName, function() { - states.forEach((vm2) => { - vm2.userAction = true; - userInteract++; - setTimeout(() => { - userInteract--; - if (!userInteract) { - vm2.userAction = false; - } - }, 0); - }); - }, passiveOptions$1); - }); - inited = true; - } - states.push(vm); -} -function removeInteractListener(vm) { - const index2 = states.indexOf(vm); - if (index2 >= 0) { - states.splice(index2, 1); - } -} +uniShared.passive(true); function useUserAction() { const state = vue.reactive({ userAction: false }); - vue.onMounted(() => { - addInteractListener(state); - }); - vue.onBeforeUnmount(() => { - removeInteractListener(state); - }); return { state }; @@ -3463,16 +2815,6 @@ function useScopedAttrs() { const state = vue.reactive({ attrs: {} }); - vue.onMounted(() => { - let instance = vue.getCurrentInstance(); - while (instance) { - const scopeId = instance.type.__scopeId; - if (scopeId) { - state.attrs[scopeId] = ""; - } - instance = instance.__isPage ? null : instance.parent; - } - }); return { state }; @@ -3500,9 +2842,6 @@ function useFormField(nameKey, value) { } }; uniForm.addField(ctx); - vue.onBeforeUnmount(() => { - uniForm.removeField(ctx); - }); } function getValueString(value) { return value === null ? "" : String(value); @@ -3624,10 +2963,6 @@ function useValueSync(props2, state, emit2, trigger) { triggerInputFn.flush(); } }; - vue.onBeforeMount(() => { - valueChangeFn.cancel(); - triggerInputFn.cancel(); - }); return { trigger, triggerInput @@ -3662,11 +2997,6 @@ function useAutoFocus(props2, fieldRef) { blur(); } }); - vue.onMounted(() => { - if (needFocus.value) { - focus(); - } - }); } function useEvent(fieldRef, state, trigger, triggerInput, beforeInput) { function checkSelection() { @@ -3859,10 +3189,10 @@ var Input = /* @__PURE__ */ vue.defineComponent({ }; } }); -const addListenerToElement$1 = function(element, type, callback2, capture) { +const addListenerToElement = function(element, type, callback, capture) { element.addEventListener(type, ($event) => { - if (typeof callback2 === "function") { - if (callback2($event) === false) { + if (typeof callback === "function") { + if (callback($event) === false) { $event.preventDefault(); $event.stopPropagation(); } @@ -3908,7 +3238,7 @@ var touchtrack = { let $eventOld = null; let hasTouchStart; let hasMouseDown; - addListenerToElement$1(element, "touchstart", function($event) { + addListenerToElement(element, "touchstart", function($event) { hasTouchStart = true; if ($event.touches.length === 1 && !$eventOld) { $eventOld = $event; @@ -3917,7 +3247,7 @@ var touchtrack = { return fn($event, "start", x0, y0); } }); - addListenerToElement$1(element, "mousedown", function($event) { + addListenerToElement(element, "mousedown", function($event) { hasMouseDown = true; if (!hasTouchStart && !$eventOld) { $eventOld = $event; @@ -3926,7 +3256,7 @@ var touchtrack = { return fn($event, "start", x0, y0); } }); - addListenerToElement$1(element, "touchmove", function($event) { + addListenerToElement(element, "touchmove", function($event) { if ($event.touches.length === 1 && $eventOld) { const res = fn($event, "move", $event.touches[0].pageX, $event.touches[0].pageY); x1 = $event.touches[0].pageX; @@ -3943,7 +3273,7 @@ var touchtrack = { } }; document.addEventListener("mousemove", mouseMoveEventListener); - addListenerToElement$1(element, "touchend", function($event) { + addListenerToElement(element, "touchend", function($event) { if ($event.touches.length === 0 && $eventOld) { hasTouchStart = false; $eventOld = null; @@ -3958,7 +3288,7 @@ var touchtrack = { } }; document.addEventListener("mouseup", mouseUpEventListener); - addListenerToElement$1(element, "touchcancel", function($event) { + addListenerToElement(element, "touchcancel", function($event) { if ($eventOld) { hasTouchStart = false; const $eventTemp = $eventOld; @@ -5132,9 +4462,6 @@ var index$c = /* @__PURE__ */ vue.defineComponent({ }); function useProvideRadioGroup(props2, trigger) { const fields = []; - vue.onMounted(() => { - _resetRadioGroupValue(fields.length - 1); - }); const getFieldsValue = () => { var _a; return (_a = fields.find((field) => field.value.radioChecked)) == null ? void 0 : _a.value.value; @@ -5246,9 +4573,6 @@ var index$b = /* @__PURE__ */ vue.defineComponent({ }; if (!!uniLabel) { uniLabel.addHandler(_onClick); - vue.onBeforeUnmount(() => { - uniLabel.removeHandler(_onClick); - }); } return () => { const { @@ -5291,10 +4615,6 @@ function useRadioInject(radioChecked, radioValue, reset) { uniForm.addField(formField); } const uniLabel = vue.inject(uniLabelKey, false); - vue.onBeforeUnmount(() => { - uniCheckGroup && uniCheckGroup.removeField(field); - uniForm && uniForm.removeField(formField); - }); return { uniCheckGroup, uniForm, @@ -5363,10 +4683,10 @@ function parseHtml(html) { parent.children.push(node); } }, - chars: function(text2) { + chars: function(text) { const node = { type: "text", - text: text2 + text }; if (stacks.length === 0) { results.children.push(node); @@ -5378,10 +4698,10 @@ function parseHtml(html) { parent.children.push(node); } }, - comment: function(text2) { + comment: function(text) { const node = { node: "comment", - text: text2 + text }; const parent = stacks[0]; if (!parent.children) { @@ -6746,115 +6066,6 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) { ], 512); } _sfc_main$4.render = _sfc_render$4; -const addListenerToElement = function(element, type, callback2, capture) { - element.addEventListener(type, ($event) => { - if (typeof callback2 === "function") { - if (callback2($event) === false) { - if (typeof $event.cancelable !== "undefined" ? $event.cancelable : true) { - $event.preventDefault(); - } - $event.stopPropagation(); - } - } - }, { - passive: false - }); -}; -let __mouseMoveEventListener; -let __mouseUpEventListener; -function useTouchtrack(element, method, useCancel) { - vue.onBeforeUnmount(() => { - document.removeEventListener("mousemove", __mouseMoveEventListener); - document.removeEventListener("mouseup", __mouseUpEventListener); - }); - let x0 = 0; - let y0 = 0; - let x1 = 0; - let y1 = 0; - const fn = function($event, state, x, y) { - if (method({ - target: $event.target, - currentTarget: $event.currentTarget, - preventDefault: $event.preventDefault.bind($event), - stopPropagation: $event.stopPropagation.bind($event), - touches: $event.touches, - changedTouches: $event.changedTouches, - detail: { - state, - x0: x, - y0: y, - dx: x - x0, - dy: y - y0, - ddx: x - x1, - ddy: y - y1, - timeStamp: $event.timeStamp - } - }) === false) { - return false; - } - }; - let $eventOld = null; - let hasTouchStart; - let hasMouseDown; - addListenerToElement(element, "touchstart", function($event) { - hasTouchStart = true; - if ($event.touches.length === 1 && !$eventOld) { - $eventOld = $event; - x0 = x1 = $event.touches[0].pageX; - y0 = y1 = $event.touches[0].pageY; - return fn($event, "start", x0, y0); - } - }); - addListenerToElement(element, "mousedown", function($event) { - hasMouseDown = true; - if (!hasTouchStart && !$eventOld) { - $eventOld = $event; - x0 = x1 = $event.pageX; - y0 = y1 = $event.pageY; - return fn($event, "start", x0, y0); - } - }); - addListenerToElement(element, "touchmove", function($event) { - if ($event.touches.length === 1 && $eventOld) { - const res = fn($event, "move", $event.touches[0].pageX, $event.touches[0].pageY); - x1 = $event.touches[0].pageX; - y1 = $event.touches[0].pageY; - return res; - } - }); - const mouseMoveEventListener = __mouseMoveEventListener = function($event) { - if (!hasTouchStart && hasMouseDown && $eventOld) { - const res = fn($event, "move", $event.pageX, $event.pageY); - x1 = $event.pageX; - y1 = $event.pageY; - return res; - } - }; - document.addEventListener("mousemove", mouseMoveEventListener); - addListenerToElement(element, "touchend", function($event) { - if ($event.touches.length === 0 && $eventOld) { - hasTouchStart = false; - $eventOld = null; - return fn($event, "end", $event.changedTouches[0].pageX, $event.changedTouches[0].pageY); - } - }); - const mouseUpEventListener = __mouseUpEventListener = function($event) { - hasMouseDown = false; - if (!hasTouchStart && $eventOld) { - $eventOld = null; - return fn($event, "end", $event.pageX, $event.pageY); - } - }; - document.addEventListener("mouseup", mouseUpEventListener); - addListenerToElement(element, "touchcancel", function($event) { - if ($eventOld) { - hasTouchStart = false; - const $eventTemp = $eventOld; - $eventOld = null; - return fn($event, useCancel ? "cancel" : "end", $eventTemp.touches[0].pageX, $eventTemp.touches[0].pageY); - } - }); -} const props$9 = { name: { type: String, @@ -6926,9 +6137,6 @@ var index$a = /* @__PURE__ */ vue.defineComponent({ _onClick, _onTrack } = useSliderLoader(props2, sliderValue, sliderRef, sliderValueRef, trigger); - vue.onMounted(() => { - useTouchtrack(sliderHandleRef.value, _onTrack); - }); return () => { const { setBgColor, @@ -7051,9 +6259,6 @@ function useSliderLoader(props2, sliderValue, sliderRef, sliderValueRef, trigger } }; uniForm.addField(field); - vue.onBeforeUnmount(() => { - uniForm.removeField(field); - }); } return { _onClick, @@ -7091,8 +6296,8 @@ const _sfc_main$3 = { $el.style.height = "100%"; var callbacks2 = this.$vnode._callbacks; if (callbacks2) { - callbacks2.forEach((callback2) => { - callback2(); + callbacks2.forEach((callback) => { + callback(); }); } } @@ -7154,9 +6359,6 @@ var index$9 = /* @__PURE__ */ vue.defineComponent({ }; if (!!uniLabel) { uniLabel.addHandler(_onClick); - vue.onBeforeUnmount(() => { - uniLabel.removeHandler(_onClick); - }); } return () => { const { @@ -7202,9 +6404,6 @@ function useSwitchInject(props2, switchChecked) { }; if (!!uniForm) { uniForm.addField(formField); - vue.onUnmounted(() => { - uniForm.removeField(formField); - }); } return uniLabel; } @@ -7213,17 +6412,17 @@ const SPACE_UNICODE = { emsp: "\u2003", nbsp: "\xA0" }; -function normalizeText(text2, { +function normalizeText(text, { space, decode }) { if (space && SPACE_UNICODE[space]) { - text2 = text2.replace(/ /g, SPACE_UNICODE[space]); + text = text.replace(/ /g, SPACE_UNICODE[space]); } if (!decode) { - return text2; + return text; } - return text2.replace(/ /g, SPACE_UNICODE.nbsp).replace(/ /g, SPACE_UNICODE.ensp).replace(/ /g, SPACE_UNICODE.emsp).replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'"); + return text.replace(/ /g, SPACE_UNICODE.nbsp).replace(/ /g, SPACE_UNICODE.ensp).replace(/ /g, SPACE_UNICODE.emsp).replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'"); } var index$8 = /* @__PURE__ */ vue.defineComponent({ name: "Text", @@ -7251,8 +6450,8 @@ var index$8 = /* @__PURE__ */ vue.defineComponent({ if (vnode.shapeFlag & 8) { const lines = vnode.children.replace(/\\n/g, "\n").split("\n"); const len = lines.length - 1; - lines.forEach((text2, index2) => { - children.push(vue.createTextVNode(normalizeText(text2, { + lines.forEach((text, index2) => { + children.push(vue.createTextVNode(normalizeText(text, { space: props2.space, decode: props2.decode }))); @@ -7429,49 +6628,12 @@ var index$6 = /* @__PURE__ */ vue.defineComponent({ }; } }); -function normalizeEvent(pageId, vm, id) { - if (!id) { - id = vm.id; - } - if (!id) { - return; - } - return pageId + "." + vm.$options.name.toLowerCase() + "." + id; -} -function addSubscribe(name, callback2) { - if (!name) { - return; - } - UniViewJSBridge.subscribe(name, ({type, data}) => { - callback2(type, data); - }); -} -function removeSubscribe(name) { - if (!name) { - return; - } - UniViewJSBridge.unsubscribe(name); -} -function useSubscribe(callback2, name) { +function useSubscribe(callback, name) { const instance = vue.getCurrentInstance(); - const vm = instance.proxy; - const pageId = name ? 0 : useCurrentPageId(); - vue.onMounted(() => { - addSubscribe(name || normalizeEvent(pageId, vm), callback2); - if (!name) { - vue.watch(() => instance.id, (value, oldValue) => { - addSubscribe(normalizeEvent(pageId, vm, value), callback2); - removeSubscribe(normalizeEvent(pageId, vm, oldValue)); - }); - } - }); - vue.onBeforeUnmount(() => { - removeSubscribe(name || normalizeEvent(pageId, vm)); - }); + instance.proxy; + name ? 0 : useCurrentPageId(); } -function useOn(name, callback2) { - vue.onMounted(() => UniViewJSBridge.on(name, callback2)); - vue.onBeforeUnmount(() => UniViewJSBridge.off(name)); +function useOn(name, callback) { } function entries(obj) { return Object.keys(obj).map((key) => [key, obj[key]]); @@ -7695,7 +6857,6 @@ function useFullscreen(trigger, containerRef, videoRef, userActionState, rootRef function exitFullScreen() { toggleFullscreen(false); } - vue.onBeforeUnmount(exitFullScreen); return { state, onFullscreenChange, @@ -7869,11 +7030,6 @@ function useControls(props2, videoState, seek) { hideTiming = null; } } - vue.onBeforeUnmount(() => { - if (hideTiming) { - clearTimeout(hideTiming); - } - }); vue.watch(() => state.controlsShow && videoState.playing && !state.controlsTouching, (val) => { if (val) { autoHideStart(); @@ -7888,59 +7044,6 @@ function useControls(props2, videoState, seek) { videoState.progress = videoState.currentTime / videoState.duration * 100; } }); - vue.onMounted(() => { - const passiveOptions2 = uniShared.passive(false); - let originX; - let originY; - let moveOnce = true; - let originProgress; - const ball = ballRef.value; - function touchmove(event) { - const toucher = event.targetTouches[0]; - const pageX = toucher.pageX; - const pageY = toucher.pageY; - if (moveOnce && Math.abs(pageX - originX) < Math.abs(pageY - originY)) { - touchend(event); - return; - } - moveOnce = false; - const progressEl = progressRef.value; - const w = progressEl.offsetWidth; - let progress = originProgress + (pageX - originX) / w * 100; - if (progress < 0) { - progress = 0; - } else if (progress > 100) { - progress = 100; - } - videoState.progress = progress; - event.preventDefault(); - event.stopPropagation(); - } - function touchend(event) { - state.controlsTouching = false; - if (state.touching) { - ball.removeEventListener("touchmove", touchmove, passiveOptions2); - if (!moveOnce) { - event.preventDefault(); - event.stopPropagation(); - seek(videoState.duration * videoState.progress / 100); - } - state.touching = false; - } - } - ball.addEventListener("touchstart", (event) => { - state.controlsTouching = true; - const toucher = event.targetTouches[0]; - originX = toucher.pageX; - originY = toucher.pageY; - originProgress = videoState.progress; - moveOnce = true; - state.touching = true; - ball.addEventListener("touchmove", touchmove, passiveOptions2); - }); - ball.addEventListener("touchend", touchend); - ball.addEventListener("touchcancel", touchend); - }); return { state, progressRef, @@ -8031,32 +7134,7 @@ function useDanmu(props2, videoState) { }; } function useContext(play, pause, seek, sendDanmu, playbackRate, requestFullScreen, exitFullScreen) { - const methods = { - play, - pause, - seek, - sendDanmu, - playbackRate, - requestFullScreen, - exitFullScreen - }; - useSubscribe((type, data) => { - let options; - switch (type) { - case "seek": - options = data.position; - break; - case "sendDanmu": - options = data; - break; - case "playbackRate": - options = data.rate; - break; - } - if (type in methods) { - methods[type](options); - } - }); + useSubscribe(); } const props$6 = { id: { @@ -8212,7 +7290,7 @@ var index$5 = /* @__PURE__ */ vue.defineComponent({ clickProgress, toggleControls } = useControls(props2, videoState, seek); - useContext(play, pause, seek, sendDanmu, playbackRate, requestFullScreen, exitFullScreen); + useContext(); return () => { return vue.createVNode("uni-video", { ref: rootRef, @@ -8380,15 +7458,6 @@ var index$4 = /* @__PURE__ */ vue.defineComponent({ } = useAttrs({ excludeListeners: true }); - vue.onMounted(() => { - _resize(); - }); - vue.onActivated(() => { - iframeRef.value && (iframeRef.value.style.display = "block"); - }); - vue.onDeactivated(() => { - iframeRef.value && (iframeRef.value.style.display = "none"); - }); return () => { return vue.createVNode(vue.Fragment, null, [vue.createVNode("uni-web-view", vue.mergeProps($listeners.value, $excludeAttrs.value, { ref: rootRef @@ -8425,153 +7494,6 @@ function useWebViewSize(rootRef, iframeRef) { }; return _resize; } -function callback(options, data) { - options = options || {}; - if (typeof data === "string") { - data = { - errMsg: data - }; - } - if (/:ok$/.test(data.errMsg)) { - if (typeof options.success === "function") { - options.success(data); - } - } else { - if (typeof options.fail === "function") { - options.fail(data); - } - } - if (typeof options.complete === "function") { - options.complete(data); - } -} -function createCallout(maps2) { - const overlay = new maps2.Overlay(); - class Callout { - constructor(option = {}) { - this.setMap = overlay.setMap; - this.getMap = overlay.getMap; - this.getPanes = overlay.getPanes; - this.getProjection = overlay.getProjection; - this.map_changed = overlay.map_changed; - this.set = overlay.set; - this.get = overlay.get; - this.setOptions = overlay.setOptions; - this.bindTo = overlay.bindTo; - this.bindsTo = overlay.bindsTo; - this.notify = overlay.notify; - this.setValues = overlay.setValues; - this.unbind = overlay.unbind; - this.unbindAll = overlay.unbindAll; - this.option = option || {}; - const map = option.map; - this.position = option.position; - this.index = 1; - const visible = this.visible = this.alwaysVisible = option.display === "ALWAYS"; - const div = this.div = document.createElement("div"); - const divStyle = div.style; - divStyle.position = "absolute"; - divStyle.whiteSpace = "nowrap"; - divStyle.transform = "translateX(-50%) translateY(-100%)"; - divStyle.zIndex = "1"; - divStyle.boxShadow = option.boxShadow || "none"; - divStyle.display = visible ? "block" : "none"; - const triangle = this.triangle = document.createElement("div"); - triangle.setAttribute("style", "position: absolute;white-space: nowrap;border-width: 4px;border-style: solid;border-color: #fff transparent transparent;border-image: initial;font-size: 12px;padding: 0px;background-color: transparent;width: 0px;height: 0px;transform: translate(-50%, 100%);left: 50%;bottom: 0;"); - this.setStyle(option); - div.appendChild(triangle); - if (map) { - this.setMap(map); - } - } - set onclick(callback2) { - this.div.onclick = callback2; - } - get onclick() { - return this.div.onclick; - } - construct() { - const div = this.div; - const panes = this.getPanes(); - panes.floatPane.appendChild(div); - } - setOption(option) { - this.option = option; - this.setPosition(option.position); - if (option.display === "ALWAYS") { - this.alwaysVisible = this.visible = true; - } else { - this.alwaysVisible = false; - } - this.setStyle(option); - } - setStyle(option) { - const div = this.div; - const divStyle = div.style; - div.innerText = option.content || ""; - divStyle.lineHeight = (option.fontSize || 14) + "px"; - divStyle.fontSize = (option.fontSize || 14) + "px"; - divStyle.padding = (option.padding || 8) + "px"; - divStyle.color = option.color || "#000"; - divStyle.borderRadius = (option.borderRadius || 0) + "px"; - divStyle.backgroundColor = option.bgColor || "#fff"; - divStyle.marginTop = "-" + ((option.top || 0) + 5) + "px"; - this.triangle.style.borderColor = `${option.bgColor || "#fff"} transparent transparent`; - } - setPosition(position) { - this.position = position; - this.draw(); - } - draw() { - const overlayProjection = this.getProjection(); - if (!this.position || !this.div || !overlayProjection) { - return; - } - const pixel = overlayProjection.fromLatLngToDivPixel(this.position); - const divStyle = this.div.style; - divStyle.left = pixel.x + "px"; - divStyle.top = pixel.y + "px"; - } - changed() { - const divStyle = this.div.style; - divStyle.display = this.visible ? "block" : "none"; - } - destroy() { - const parentNode = this.div.parentNode; - if (parentNode) { - parentNode.removeChild(this.div); - } - } - } - return Callout; -} -let maps; -const callbacks = []; -const QQ_MAP_CALLBACKNAME = "__qq_map_callback__"; -function loadMaps(callback2) { - if (maps) { - callback2(maps); - } else if (window.qq && window.qq.maps) { - maps = window.qq.maps; - callback2(maps); - } else if (callbacks.length) { - callbacks.push(callback2); - } else { - callbacks.push(callback2); - const key = __uniConfig.qqMapKey; - const globalExt = window; - globalExt[QQ_MAP_CALLBACKNAME] = function() { - delete globalExt[QQ_MAP_CALLBACKNAME]; - maps = window.qq.maps; - maps.Callout = createCallout(maps); - callbacks.forEach((callback22) => callback22(maps)); - callbacks.length = 0; - }; - const script = document.createElement("script"); - script.src = `https://map.qq.com/api/js?v=2.exp&key=${key}&callback=${QQ_MAP_CALLBACKNAME}&libraries=geometry`; - document.body.appendChild(script); - } -} const props$4 = { id: { type: [Number, String], @@ -8641,21 +7563,10 @@ var MapMarker = /* @__PURE__ */ vue.defineComponent({ const id = String(Number(props2.id) !== NaN ? props2.id : ""); const onMapReady = vue.inject("onMapReady"); let marker; - function removeMarker() { - if (marker) { - if (marker.label) { - marker.label.setMap(null); - } - if (marker.callout) { - marker.callout.setMap(null); - } - marker.setMap(null); - } - } - onMapReady((map, maps2, trigger) => { + onMapReady((map, maps, trigger) => { function updateMarker(option) { const title = option.title; - const position = new maps2.LatLng(option.latitude, option.longitude); + const position = new maps.LatLng(option.latitude, option.longitude); const img = new Image(); img.onload = () => { const anchor = option.anchor || {}; @@ -8675,7 +7586,7 @@ var MapMarker = /* @__PURE__ */ vue.defineComponent({ x = (typeof x === "number" ? x : 0.5) * w; y = (typeof y === "number" ? y : 1) * h; top = h - (h - y); - icon = new maps2.MarkerImage(img.src, null, null, new maps2.Point(x, y), new maps2.Size(w, h)); + icon = new maps.MarkerImage(img.src, null, null, new maps.Point(x, y), new maps.Size(w, h)); marker.setPosition(position); marker.setIcon(icon); marker.setRotation(option.rotate || 0); @@ -8686,7 +7597,7 @@ var MapMarker = /* @__PURE__ */ vue.defineComponent({ } let label; if (labelOpt.content) { - label = new maps2.Label({ + label = new maps.Label({ position, map, clickable: false, @@ -8730,7 +7641,7 @@ var MapMarker = /* @__PURE__ */ vue.defineComponent({ if (callout) { callout.setOption(calloutStyle); } else { - callout = marker.callout = new maps2.Callout(calloutStyle); + callout = marker.callout = new maps.Callout(calloutStyle); callout.div.onclick = function($event) { if (id !== "") { trigger("callouttap", $event, { @@ -8751,13 +7662,13 @@ var MapMarker = /* @__PURE__ */ vue.defineComponent({ img.src = getRealPath(option.iconPath); } function addMarker(props3) { - marker = new maps2.Marker({ + marker = new maps.Marker({ map, flat: true, autoRotation: false }); updateMarker(props3); - maps2.event.addListener(marker, "click", () => { + maps.event.addListener(marker, "click", () => { const callout = marker.callout; if (callout) { const div = callout.div; @@ -8782,22 +7693,22 @@ var MapMarker = /* @__PURE__ */ vue.defineComponent({ }); if (id) { const addMapChidlContext = vue.inject("addMapChidlContext"); - const removeMapChidlContext = vue.inject("removeMapChidlContext"); + vue.inject("removeMapChidlContext"); const context = { id, translate(data) { - onMapReady((map, maps2, trigger) => { + onMapReady((map, maps, trigger) => { const destination = data.destination; const duration = data.duration; const autoRotate = !!data.autoRotate; let rotate = Number(data.rotate) || 0; const rotation = marker.getRotation(); const a2 = marker.getPosition(); - const b = new maps2.LatLng(destination.latitude, destination.longitude); - const distance = maps2.geometry.spherical.computeDistanceBetween(a2, b) / 1e3; + const b = new maps.LatLng(destination.latitude, destination.longitude); + const distance = maps.geometry.spherical.computeDistanceBetween(a2, b) / 1e3; const time = (typeof duration === "number" ? duration : 1e3) / (1e3 * 60 * 60); const speed = distance / time; - const movingEvent = maps2.event.addListener(marker, "moving", (e2) => { + const movingEvent = maps.event.addListener(marker, "moving", (e2) => { const latLng = e2.latLng; const label = marker.label; if (label) { @@ -8808,7 +7719,7 @@ var MapMarker = /* @__PURE__ */ vue.defineComponent({ callout.setPosition(latLng); } }); - const event = maps2.event.addListener(marker, "moveend", () => { + const event = maps.event.addListener(marker, "moveend", () => { event.remove(); movingEvent.remove(); marker.lastPosition = a2; @@ -8829,9 +7740,9 @@ var MapMarker = /* @__PURE__ */ vue.defineComponent({ let lastRtate = 0; if (autoRotate) { if (marker.lastPosition) { - lastRtate = maps2.geometry.spherical.computeHeading(marker.lastPosition, a2); + lastRtate = maps.geometry.spherical.computeHeading(marker.lastPosition, a2); } - rotate = maps2.geometry.spherical.computeHeading(a2, b) - lastRtate; + rotate = maps.geometry.spherical.computeHeading(a2, b) - lastRtate; } marker.setRotation(rotation + rotate); marker.moveTo(b, speed); @@ -8839,9 +7750,7 @@ var MapMarker = /* @__PURE__ */ vue.defineComponent({ } }; addMapChidlContext(context); - vue.onUnmounted(() => removeMapChidlContext(context)); } - vue.onUnmounted(removeMarker); return () => { return null; }; @@ -8906,7 +7815,7 @@ var MapPolyline = /* @__PURE__ */ vue.defineComponent({ polylineBorder.setMap(null); } } - onMapReady((map, maps2) => { + onMapReady((map, maps) => { function updatePolyline(option) { removePolyline(); addPolyline(option); @@ -8914,10 +7823,10 @@ var MapPolyline = /* @__PURE__ */ vue.defineComponent({ function addPolyline(option) { const path = []; option.points.forEach((point) => { - path.push(new maps2.LatLng(point.latitude, point.longitude)); + path.push(new maps.LatLng(point.latitude, point.longitude)); }); const strokeWeight = Number(option.width) || 1; - polyline = new maps2.Polyline({ + polyline = new maps.Polyline({ map, clickable: false, path, @@ -8927,7 +7836,7 @@ var MapPolyline = /* @__PURE__ */ vue.defineComponent({ }); const borderWidth = Number(option.borderWidth) || 0; if (borderWidth) { - polylineBorder = new maps2.Polyline({ + polylineBorder = new maps.Polyline({ map, clickable: false, path, @@ -8940,7 +7849,6 @@ var MapPolyline = /* @__PURE__ */ vue.defineComponent({ addPolyline(props2); vue.watch(props2, updatePolyline); }); - vue.onUnmounted(removePolyline); return () => { return null; }; @@ -8987,22 +7895,22 @@ var MapCircle = /* @__PURE__ */ vue.defineComponent({ circle.setMap(null); } } - onMapReady((map, maps2) => { + onMapReady((map, maps) => { function updateCircle(option) { removeCircle(); addCircle(option); } function addCircle(option) { - const center = new maps2.LatLng(option.latitude, option.longitude); + const center = new maps.LatLng(option.latitude, option.longitude); function getColor(color) { const c = color.match(/#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?/); if (c && c.length) { - return maps2.Color.fromHex(c[0], Number("0x" + c[1] || 255) / 255); + return maps.Color.fromHex(c[0], Number("0x" + c[1] || 255) / 255); } else { return void 0; } } - circle = new maps2.Circle({ + circle = new maps.Circle({ map, center, clickable: false, @@ -9016,7 +7924,6 @@ var MapCircle = /* @__PURE__ */ vue.defineComponent({ addCircle(props2); vue.watch(props2, updateCircle); }); - vue.onUnmounted(removeCircle); return () => { return null; }; @@ -9051,7 +7958,7 @@ var MapControl = /* @__PURE__ */ vue.defineComponent({ control.remove(); } } - onMapReady((map, maps2, trigger) => { + onMapReady((map, maps, trigger) => { function updateControl(option) { removeControl(); addControl(option); @@ -9086,18 +7993,16 @@ var MapControl = /* @__PURE__ */ vue.defineComponent({ }); } }; - map.controls[maps2.ControlPosition.TOP_LEFT].push(control); + map.controls[maps.ControlPosition.TOP_LEFT].push(control); } addControl(props2); vue.watch(props2, updateControl); }); - vue.onUnmounted(removeControl); return () => { return null; }; } }); -const CONTEXT_ID = "MAP_LOCATION"; const ICON_PATH = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACECAMAAABmmnOVAAAC01BMVEUAAAAAef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef96quGStdqStdpbnujMzMzCyM7Gyc7Ky83MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMwAef8GfP0yjfNWnOp0qOKKsdyYt9mju9aZt9mMstx1qeJYnekyjvIIfP0qivVmouaWttnMzMyat9lppOUujPQKffxhoOfNzc3Y2Njh4eHp6enu7u7y8vL19fXv7+/i4uLZ2dnOzs6auNgOf/sKff15quHR0dHx8fH9/f3////j4+N6quFdn+iywdPb29vw8PD+/v7c3NyywtLa2tr29vbS0tLd3d38/Pzf39/o6Ojc7f+q0v+HwP9rsf9dqv9Hnv9Vpv/q6urj8P+Vx/9Am/8Pgf8Iff/z8/OAvP95uf/n5+c5l//V6f+52v+y1//7+/vt7e0rkP/09PTQ0NDq9P8Whf+cy//W1tbe3t7A3v/m5ubs7OxOov/r6+vk5OQiaPjKAAAAknRSTlMACBZ9oB71/jiqywJBZATT6hBukRXv+zDCAVrkDIf4JbQsTb7eVeJLbwfa8Rh4G/OlPS/6/kxQ9/xdmZudoJxNVhng7B6wtWdzAtQOipcF1329wS44doK/BAkyP1pvgZOsrbnGXArAg34G2IsD1eMRe7bi7k5YnqFT9V0csyPedQyYD3p/Fje+hDpskq/MwpRBC6yKp2MAAAQdSURBVHja7Zn1exMxGIAPHbrhDsPdneHuNtzd3d3dIbjLh93o2o4i7TpgG1Jk0g0mMNwd/gTa5rq129reHnK5e/bk/TFNk/dJ7r5894XjGAwGg8GgTZasCpDIll1+hxw5vXLJLpEboTx5ZXbIhyzkl9fB28cqUaCgrBKFkI3CcjoUKYolihWXUSI7EihRUjaHXF52CVRKLoe8eZIdUOkyMknkRw6UlcehYAFHiXK+skgURk6Ul8OhQjFnCVRRBolKqRxQ5SzUHaqgNGSj7VCmalqJnDkoS5RF6ZCbroNvufQkUD6qEuXTdUA+3hQdqiEXVKfnUKOmK4latalJ1EEuoZZ6162HJ9x/4OChw0eOHj12/MTJU6dxG7XUu751tjNnz4ET5y9ctLZTSr0beKFLl89bpuUDrqgC1RqNWqsKuqqzNFw7e51S6u3tc+OmZUJ9kCHY6ECwOkRvab51iUrqXej2HYDQsHBjWgx3Ae7dppB6N2wEcF9jdMGDUIDGTaR2aNoM9FqjG7QmaN5CWgc/gIePjG559BigpZQOrYB/4jBfRGRUtDkmJjY6KjLCofkpD62lc2gDfMpWPIuLdwyV8XEpHgaddBZ+wBuSFcwJqSN2ovmZ/dfnOvCTxqGtwzq8SEjv4EhISn48eWgnhUP7DvDSvgzxrs6vV6+FLiro2EkCic4QKkzwJsH1KYreCp0eQhfyDl1B/w4P/xa5JVJ4U03QjbRD9x7wXlgH5IE3wmMBHXoSlugFAcI6f/AkkSi8q6HQm6xDn77wEQ8djTwSj3tqAMguRTe4ikeOQyJ4YV+KfkQl+oNW5GbY4gWOWgbwJ+kwAD6Fi90MK2ZsrIeBBCUGwRXbqJ+/iJMQliIEBhOU6AJhtlG/IpHE2bqrYQg5h6HA4yQiRqwEfkGCdTCMmMRw+IbPDCQaHCsCYAQxiZHw3TbmD/ESOHgHwShiEqPhp/gggYkSztIxxCRawy/bmEniJaJtfwiEscQkxkFgRqJESqQwwHhiEuMBp3Vm8RK/cZoHEzKXhCK2QxEPpiJe0YlKCFaKCNv/cYBNUsBRPlkJSc0U+dM7E9H0ThGJbgZT/iR7yj+VqMS06Qr4+OFm2JdCxIa8lugzkJs5K6MfxAaYPUcBpYG5khZJEkUUSb7DPCnKRfPBXj6M8FwuegoLpCgXcQszVjhbJFUJUee2hBhLoYTIcYtB57KY+opSMdVqwatSlZVj05aV//CwJLMX2DluaUcwhXm4ali2XOoLjxUrPV26zFtF4f5p0Gp310+z13BUWNvbehEXona6iAtX/zVZmtfN4WixfsNky4S6gCCVVq3RPLdfSfpv3MRRZfPoLc6Xs/5bt3EyMGzE9h07/Xft2t15z6i9+zgGg8FgMBgMBoPBYDAYDAYj8/APG67Rie8pUDsAAAAASUVORK5CYII="; var MapLocation = /* @__PURE__ */ vue.defineComponent({ name: "MapLocation", @@ -9187,37 +8092,13 @@ function getPoints(points) { return newPoints; } function useMap(props2, rootRef, emit2) { - const trigger = useCustomEvent(rootRef, emit2); const mapRef = vue.ref(null); - let maps2; - let map; const state = vue.reactive({ latitude: Number(props2.latitude), longitude: Number(props2.longitude), includePoints: getPoints(props2.includePoints) }); - const onMapReadyCallbacks = []; - let isMapReady; - function onMapReady(callback2) { - if (isMapReady) { - callback2(map, maps2, trigger); - } else { - onMapReadyCallbacks.push(callback2); - } - } - function emitMapReady() { - isMapReady = true; - onMapReadyCallbacks.forEach((callback2) => callback2(map, maps2, trigger)); - onMapReadyCallbacks.length = 0; - } - let isBoundsReady; - const onBoundsReadyCallbacks = []; - function onBoundsReady(callback2) { - if (isBoundsReady) { - callback2(); - } else { - onMapReadyCallbacks.push(callback2); - } + function onMapReady(callback) { } const contexts = {}; function addMapChidlContext(context) { @@ -9232,204 +8113,14 @@ function useMap(props2, rootRef, emit2) { if (latitude !== state.latitude || longitude !== state.longitude) { state.latitude = latitude; state.longitude = longitude; - if (map) { - map.setCenter(new maps2.LatLng(latitude, longitude)); - } } }); vue.watch(() => props2.includePoints, (points) => { state.includePoints = getPoints(points); - if (isBoundsReady) { - updateBounds(); - } }, { deep: true }); - function emitBoundsReady() { - isBoundsReady = true; - onBoundsReadyCallbacks.forEach((callback2) => callback2()); - onBoundsReadyCallbacks.length = 0; - } - function getMapInfo() { - const center = map.getCenter(); - return { - scale: map.getZoom(), - centerLocation: { - latitude: center.getLat(), - longitude: center.getLng() - } - }; - } - function updateCenter() { - map.setCenter(new maps2.LatLng(state.latitude, state.longitude)); - } - function updateBounds() { - const bounds = new maps2.LatLngBounds(); - state.includePoints.forEach(({ - latitude, - longitude - }) => { - const latLng = new maps2.LatLng(latitude, longitude); - bounds.extend(latLng); - }); - map.fitBounds(bounds); - } - function initMap() { - const mapEl = mapRef.value; - const center = new maps2.LatLng(state.latitude, state.longitude); - const map2 = new maps2.Map(mapEl, { - center, - zoom: Number(props2.scale), - disableDoubleClickZoom: true, - mapTypeControl: false, - zoomControl: false, - scaleControl: false, - panControl: false, - minZoom: 5, - maxZoom: 18, - draggable: true - }); - vue.watch(() => props2.scale, (scale) => { - map2.setZoom(Number(scale) || 16); - }); - onBoundsReady(() => { - if (state.includePoints.length) { - updateBounds(); - updateCenter(); - } - }); - const boundsChangedEvent = maps2.event.addListener(map2, "bounds_changed", () => { - boundsChangedEvent.remove(); - emitBoundsReady(); - }); - maps2.event.addListener(map2, "click", () => { - trigger("click", {}, {}); - }); - maps2.event.addListener(map2, "dragstart", () => { - trigger("regionchange", {}, { - type: "begin", - causedBy: "gesture" - }); - }); - maps2.event.addListener(map2, "dragend", () => { - trigger("regionchange", {}, Object.assign({ - type: "end", - causedBy: "drag" - }, getMapInfo())); - }); - maps2.event.addListener(map2, "zoom_changed", () => { - emit2("update:scale", map2.getZoom()); - trigger("regionchange", {}, Object.assign({ - type: "end", - causedBy: "scale" - }, getMapInfo())); - }); - maps2.event.addListener(map2, "center_changed", () => { - const center2 = map2.getCenter(); - const latitude = center2.getLat(); - const longitude = center2.getLng(); - emit2("update:latitude", latitude); - emit2("update:longitude", longitude); - }); - return map2; - } - useSubscribe((type, data = {}) => { - switch (type) { - case "getCenterLocation": - onMapReady(() => { - const center = map.getCenter(); - callback(data, { - latitude: center.getLat(), - longitude: center.getLng(), - errMsg: `${type}:ok` - }); - }); - break; - case "moveToLocation": - { - let latitude = Number(data.latitude); - let longitude = Number(data.longitude); - if (!latitude || !longitude) { - const context = contexts[CONTEXT_ID]; - if (context) { - latitude = context.state.latitude; - longitude = context.state.longitude; - } - } - if (latitude && longitude) { - state.latitude = latitude; - state.longitude = longitude; - if (map) { - map.setCenter(new maps2.LatLng(latitude, longitude)); - } - onMapReady(() => { - callback(data, `${type}:ok`); - }); - } else { - callback(data, `${type}:fail`); - } - } - break; - case "translateMarker": - onMapReady(() => { - const context = contexts[data.markerId]; - if (context) { - try { - context.translate(data); - } catch (error) { - callback(data, `${type}:fail ${error.message}`); - } - callback(data, `${type}:ok`); - } else { - callback(data, `${type}:fail not found`); - } - }); - break; - case "includePoints": - state.includePoints = getPoints(data.includePoints); - if (isBoundsReady) { - updateBounds(); - } - onBoundsReady(() => { - callback(data, `${type}:ok`); - }); - break; - case "getRegion": - onBoundsReady(() => { - const latLngBounds = map.getBounds(); - const southwest = latLngBounds.getSouthWest(); - const northeast = latLngBounds.getNorthEast(); - callback(data, { - southwest: { - latitude: southwest.getLat(), - longitude: southwest.getLng() - }, - northeast: { - latitude: northeast.getLat(), - longitude: northeast.getLng() - }, - errMsg: `${type}:ok` - }); - }); - break; - case "getScale": - onMapReady(() => { - callback(data, { - scale: map.getZoom(), - errMsg: `${type}:ok` - }); - }); - break; - } - }); - vue.onMounted(() => { - loadMaps((result) => { - maps2 = result; - map = initMap(); - emitMapReady(); - trigger("updated", {}, {}); - }); - }); + useSubscribe(); vue.provide("onMapReady", onMapReady); vue.provide("addMapChidlContext", addMapChidlContext); vue.provide("removeMapChidlContext", removeMapChidlContext); @@ -9449,7 +8140,7 @@ var index$3 = /* @__PURE__ */ vue.defineComponent({ const rootRef = vue.ref(null); const { mapRef - } = useMap(props2, rootRef, emit2); + } = useMap(props2); return () => { return vue.createVNode("uni-map", { ref: rootRef, @@ -9490,8 +8181,8 @@ const _sfc_main$2 = { }, _upx2pxNum(val) { if (/\d+[ur]px$/i.test(val)) { - val.replace(/\d+[ur]px$/i, (text2) => { - return uni.upx2px(parseFloat(text2)); + val.replace(/\d+[ur]px$/i, (text) => { + return uni.upx2px(parseFloat(text)); }); } return parseFloat(val) || 0; @@ -9666,10 +8357,10 @@ class RequestTask { delete this._xhr; } } - onHeadersReceived(callback2) { + onHeadersReceived(callback) { throw new Error("Method not implemented."); } - offHeadersReceived(callback2) { + offHeadersReceived(callback) { throw new Error("Method not implemented."); } } @@ -9752,7 +8443,7 @@ function useSwitchTab(route, tabBar2) { } const { pagePath, - text: text2 + text } = tabBarItem; let url = "/" + pagePath; if (url === __uniRoutes[0].alias) { @@ -9766,7 +8457,7 @@ function useSwitchTab(route, tabBar2) { } else { invokeHook("onTabItemTap", { index: index2, - text: text2, + text, pagePath }); } @@ -9823,12 +8514,12 @@ function isMidButton(item) { } function createTabBarItemsTsx(tabBar2, onSwitchTab) { const { - list: list2, + list, selectedIndex, selectedColor, color } = tabBar2; - return list2.map((item, index2) => { + return list.map((item, index2) => { const selected = selectedIndex === index2; const textColor = selected ? selectedColor : color; const iconPath = (selected ? item.selectedIconPath || item.iconPath : item.iconPath) || ""; @@ -9859,13 +8550,13 @@ function createTabBarItemBdTsx(color, iconPath, tabBarItem, tabBar2) { function createTabBarItemIconTsx(iconPath, tabBarItem, tabBar2) { const { type, - text: text2, + text, redDot } = tabBarItem; const { iconWidth } = tabBar2; - const clazz2 = "uni-tabbar__icon" + (text2 ? " uni-tabbar__icon__diff" : ""); + const clazz2 = "uni-tabbar__icon" + (text ? " uni-tabbar__icon__diff" : ""); const style = { width: iconWidth, height: iconWidth @@ -9881,7 +8572,7 @@ function createTabBarItemTextTsx(color, tabBarItem, tabBar2) { const { redDot, iconPath, - text: text2 + text } = tabBarItem; const { fontSize, @@ -9896,7 +8587,7 @@ function createTabBarItemTextTsx(color, tabBarItem, tabBar2) { return vue.createVNode("div", { class: "uni-tabbar__label", style - }, [text2, redDot && !iconPath && createTabBarItemRedDotTsx(tabBarItem.badge)], 4); + }, [text, redDot && !iconPath && createTabBarItemRedDotTsx(tabBarItem.badge)], 4); } function createTabBarItemRedDotTsx(badge) { const clazz2 = "uni-tabbar__reddot" + (badge ? " uni-tabbar__badge" : ""); @@ -10076,56 +8767,7 @@ function usePageHeadTransparent(headRef, { id, navigationBar: {titleColor, coverage, backgroundColor} }) { - let A = 0; - const rgb = vue.computed(() => hexToRgba(backgroundColor)); - const offset = parseInt(coverage); - let titleElem; - let transparentElemStyle; - const iconElemsStyles = []; - const borderRadiusElemsStyles = []; - const oldColors = []; - vue.onMounted(() => { - const $el = headRef.value; - transparentElemStyle = $el.style; - titleElem = $el.querySelector(".uni-page-head__title"); - const borderRadiusElems = $el.querySelectorAll(".uni-page-head-btn"); - const iconElems = $el.querySelectorAll(".uni-btn-icon"); - for (let i2 = 0; i2 < iconElems.length; i2++) { - iconElemsStyles.push(iconElems[i2].style); - } - for (let i2 = 0; i2 < borderRadiusElems.length; i2++) { - const borderRadiusElem = borderRadiusElems[i2]; - oldColors.push(getComputedStyle(borderRadiusElem).backgroundColor); - borderRadiusElemsStyles.push(borderRadiusElem.style); - } - }); - useOn(id + ".onPageScroll", ({scrollTop}) => { - const alpha = Math.min(scrollTop / offset, 1); - if (alpha === 1 && A === 1) { - return; - } - if (alpha > 0.5 && A <= 0.5) { - iconElemsStyles.forEach(function(iconElemStyle) { - iconElemStyle.color = titleColor; - }); - } else if (alpha <= 0.5 && A > 0.5) { - iconElemsStyles.forEach(function(iconElemStyle) { - iconElemStyle.color = "#fff"; - }); - } - A = alpha; - if (titleElem) { - titleElem.style.opacity = alpha; - } - const bg = rgb.value; - transparentElemStyle.backgroundColor = `rgba(${bg.r},${bg.g},${bg.b},${alpha})`; - borderRadiusElemsStyles.forEach(function(borderRadiusElemStyle, index2) { - const oldColor = oldColors[index2]; - const rgba = oldColor.match(/[\d+\.]+/g); - rgba[3] = (1 - alpha) * (rgba.length === 4 ? rgba[3] : 1); - borderRadiusElemStyle.backgroundColor = `rgba(${rgba})`; - }); - }); + vue.computed(() => hexToRgba(backgroundColor)); } const ICON_PATH_BACK = "M21.781 7.844l-9.063 8.594 9.063 8.594q0.25 0.25 0.25 0.609t-0.25 0.578q-0.25 0.25-0.578 0.25t-0.578-0.25l-9.625-9.125q-0.156-0.125-0.203-0.297t-0.047-0.359q0-0.156 0.047-0.328t0.203-0.297l9.625-9.125q0.25-0.25 0.578-0.25t0.578 0.25q0.25 0.219 0.25 0.578t-0.25 0.578z"; const ICON_PATHS = { @@ -10240,7 +8882,7 @@ function createPageHeadTitleTextTsx({ }, null, 8, ["src"]) : titleText], 4)]); } function createPageHeadSearchInputTsx(navigationBar, { - text: text2, + text, focus, composing, onBlur, @@ -10251,7 +8893,7 @@ function createPageHeadSearchInputTsx(navigationBar, { }) { const { color, - align: align2, + align, autoFocus, disabled, borderRadius, @@ -10263,7 +8905,7 @@ function createPageHeadSearchInputTsx(navigationBar, { borderRadius, backgroundColor }; - const placeholderClass = ["uni-page-head-search-placeholder", `uni-page-head-search-placeholder-${focus.value || text2.value ? "left" : align2}`]; + const placeholderClass = ["uni-page-head-search-placeholder", `uni-page-head-search-placeholder-${focus.value || text.value ? "left" : align}`]; return vue.createVNode("div", { class: "uni-page-head-search", style: searchStyle @@ -10274,7 +8916,7 @@ function createPageHeadSearchInputTsx(navigationBar, { class: placeholderClass }, [vue.createVNode("div", { class: "uni-page-head-search-icon" - }, [createSvgIconVNode(ICON_PATH_SEARCH, placeholderColor, 20)]), text2.value || composing.value ? "" : placeholder], 6), disabled ? vue.createVNode(Input, { + }, [createSvgIconVNode(ICON_PATH_SEARCH, placeholderColor, 20)]), text.value || composing.value ? "" : placeholder], 6), disabled ? vue.createVNode(Input, { disabled: true, style: { color @@ -10420,7 +9062,7 @@ function usePageHeadSearchInput({ } }) { const focus = vue.ref(false); - const text2 = vue.ref(""); + const text = vue.ref(""); const composing = vue.ref(false); const { disabled @@ -10431,7 +9073,7 @@ function usePageHeadSearchInput({ }; return { focus, - text: text2, + text, composing, onClick }; @@ -10449,21 +9091,21 @@ function usePageHeadSearchInput({ }); }; const onInput = (evt) => { - text2.value = evt.detail.value; + text.value = evt.detail.value; invokeHook(id, "onNavigationBarSearchInputChanged", { - text: text2.value + text: text.value }); }; const onKeyup = (evt) => { if (evt.key === "Enter" || evt.keyCode === 13) { invokeHook(id, "onNavigationBarSearchInputConfirmed", { - text: text2.value + text: text.value }); } }; return { focus, - text: text2, + text, composing, onFocus, onBlur, diff --git a/packages/uni-h5/vite.config.ts b/packages/uni-h5/vite.config.ts index 8e247a15a..5d2894c21 100644 --- a/packages/uni-h5/vite.config.ts +++ b/packages/uni-h5/vite.config.ts @@ -3,8 +3,10 @@ import path from 'path' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import jscc from 'rollup-plugin-jscc' +import strip from '@rollup/plugin-strip' import replace from '@rollup/plugin-replace' +import { stripOptions } from '@dcloudio/uni-cli-shared' import { isCustomElement } from '../uni-shared' const moduleAlias = require('module-alias') @@ -20,6 +22,28 @@ function resolve(file: string) { const FORMAT = process.env.FORMAT as 'es' | 'cjs' +const rollupPlugins = [ + replace({ + values: { + defineOnApi: `/*#__PURE__*/ defineOnApi`, + defineOffApi: `/*#__PURE__*/ defineOffApi`, + defineTaskApi: `/*#__PURE__*/ defineTaskApi`, + defineSyncApi: `/*#__PURE__*/ defineSyncApi`, + defineAsyncApi: `/*#__PURE__*/ defineAsyncApi`, + }, + preventAssignment: true, + }), + + jscc({ + values: { + // 该插件限制了不能以__开头 + _NODE_JS_: FORMAT === 'cjs' ? 1 : 0, + }, + }), +] +if (FORMAT === 'cjs') { + rollupPlugins.push(strip(stripOptions)) +} export default defineConfig({ root: __dirname, define: { @@ -89,25 +113,14 @@ export default defineConfig({ } }, preserveEntrySignatures: 'strict', - plugins: [ - replace({ - values: { - defineOnApi: `/*#__PURE__*/ defineOnApi`, - defineOffApi: `/*#__PURE__*/ defineOffApi`, - defineTaskApi: `/*#__PURE__*/ defineTaskApi`, - defineSyncApi: `/*#__PURE__*/ defineSyncApi`, - defineAsyncApi: `/*#__PURE__*/ defineAsyncApi`, - }, - preventAssignment: true, - }), - - jscc({ - values: { - // 该插件限制了不能以__开头 - _NODE_JS_: FORMAT === 'cjs' ? 1 : 0, - }, - }), - ], + plugins: rollupPlugins, + onwarn: (msg, warn) => { + if ( + !(msg.message || msg).includes('external module "vue" but never used') + ) { + warn(msg) + } + }, }, }, }) diff --git a/yarn.lock b/yarn.lock index 382be1789..c500c1a9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17,24 +17,24 @@ "@babel/highlight" "^7.12.13" "@babel/compat-data@^7.13.15": - version "7.13.15" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.15.tgz#7e8eea42d0b64fda2b375b22d06c605222e848f4" - integrity sha512-ltnibHKR1VnrU4ymHyQ/CXtNXI6yZC0oJThyW78Hft8XndANwi+9H+UIklBDraIjFEJzw8wmcM427oDd9KS5wA== + version "7.14.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.0.tgz#a901128bce2ad02565df95e6ecbf195cf9465919" + integrity sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q== "@babel/core@^7.1.0", "@babel/core@^7.12.10", "@babel/core@^7.7.5": - version "7.13.16" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.16.tgz#7756ab24396cc9675f1c3fcd5b79fcce192ea96a" - integrity sha512-sXHpixBiWWFti0AV2Zq7avpTasr6sIAu7Y396c608541qAU2ui4a193m0KSQmfPSKFZLnQ3cvlKDOm3XkuXm3Q== + version "7.14.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.0.tgz#47299ff3ec8d111b493f1a9d04bf88c04e728d88" + integrity sha512-8YqpRig5NmIHlMLw09zMlPTvUVMILjqCOtVgu+TVNWEBvy9b5I3RRyhqnrV4hjgEK7n8P9OqvkWJAFmEL6Wwfw== dependencies: "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.13.16" + "@babel/generator" "^7.14.0" "@babel/helper-compilation-targets" "^7.13.16" - "@babel/helper-module-transforms" "^7.13.14" - "@babel/helpers" "^7.13.16" - "@babel/parser" "^7.13.16" + "@babel/helper-module-transforms" "^7.14.0" + "@babel/helpers" "^7.14.0" + "@babel/parser" "^7.14.0" "@babel/template" "^7.12.13" - "@babel/traverse" "^7.13.15" - "@babel/types" "^7.13.16" + "@babel/traverse" "^7.14.0" + "@babel/types" "^7.14.0" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -42,15 +42,22 @@ semver "^6.3.0" source-map "^0.5.0" -"@babel/generator@^7.13.16": - version "7.13.16" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.16.tgz#0befc287031a201d84cdfc173b46b320ae472d14" - integrity sha512-grBBR75UnKOcUWMp8WoDxNsWCFl//XCK6HWTrBQKTr5SV9f5g0pNOjdyzi/DTBv12S9GnYPInIXQBTky7OXEMg== +"@babel/generator@^7.14.0": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.1.tgz#1f99331babd65700183628da186f36f63d615c93" + integrity sha512-TMGhsXMXCP/O1WtQmZjpEYDhCYC9vFhayWZPJSZCGkPJgUqX0rF0wwtrYvnzVxIjcF80tkUertXVk5cwqi5cAQ== dependencies: - "@babel/types" "^7.13.16" + "@babel/types" "^7.14.1" jsesc "^2.5.1" source-map "^0.5.0" +"@babel/helper-annotate-as-pure@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz#0f58e86dfc4bb3b1fcd7db806570e177d439b6ab" + integrity sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw== + dependencies: + "@babel/types" "^7.12.13" + "@babel/helper-compilation-targets@^7.13.16": version "7.13.16" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz#6e91dccf15e3f43e5556dffe32d860109887563c" @@ -62,14 +69,15 @@ semver "^6.3.0" "@babel/helper-create-class-features-plugin@^7.13.0": - version "7.13.11" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.11.tgz#30d30a005bca2c953f5653fc25091a492177f4f6" - integrity sha512-ays0I7XYq9xbjCSvT+EvysLgfc3tOkwCULHjrnscGT3A9qD4sk3wXnJ3of0MAWsWGjdinFvajHU2smYuqXKMrw== + version "7.14.1" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.1.tgz#1fe11b376f3c41650ad9fedc665b0068722ea76c" + integrity sha512-r8rsUahG4ywm0QpGcCrLaUSOuNAISR3IZCg4Fx05Ozq31aCUrQsTLH6KPxy0N5ULoQ4Sn9qjNdGNtbPWAC6hYg== dependencies: + "@babel/helper-annotate-as-pure" "^7.12.13" "@babel/helper-function-name" "^7.12.13" - "@babel/helper-member-expression-to-functions" "^7.13.0" + "@babel/helper-member-expression-to-functions" "^7.13.12" "@babel/helper-optimise-call-expression" "^7.12.13" - "@babel/helper-replace-supers" "^7.13.0" + "@babel/helper-replace-supers" "^7.13.12" "@babel/helper-split-export-declaration" "^7.12.13" "@babel/helper-function-name@^7.12.13": @@ -88,7 +96,7 @@ dependencies: "@babel/types" "^7.12.13" -"@babel/helper-member-expression-to-functions@^7.13.0", "@babel/helper-member-expression-to-functions@^7.13.12": +"@babel/helper-member-expression-to-functions@^7.13.12": version "7.13.12" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz#dfe368f26d426a07299d8d6513821768216e6d72" integrity sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw== @@ -102,19 +110,19 @@ dependencies: "@babel/types" "^7.13.12" -"@babel/helper-module-transforms@^7.13.14": - version "7.13.14" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz#e600652ba48ccb1641775413cb32cfa4e8b495ef" - integrity sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g== +"@babel/helper-module-transforms@^7.14.0": + version "7.14.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.14.0.tgz#8fcf78be220156f22633ee204ea81f73f826a8ad" + integrity sha512-L40t9bxIuGOfpIGA3HNkJhU9qYrf4y5A5LUSw7rGMSn+pcG8dfJ0g6Zval6YJGd2nEjI7oP00fRdnhLKndx6bw== dependencies: "@babel/helper-module-imports" "^7.13.12" "@babel/helper-replace-supers" "^7.13.12" "@babel/helper-simple-access" "^7.13.12" "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/helper-validator-identifier" "^7.12.11" + "@babel/helper-validator-identifier" "^7.14.0" "@babel/template" "^7.12.13" - "@babel/traverse" "^7.13.13" - "@babel/types" "^7.13.14" + "@babel/traverse" "^7.14.0" + "@babel/types" "^7.14.0" "@babel/helper-optimise-call-expression@^7.12.13": version "7.12.13" @@ -128,7 +136,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz#806526ce125aed03373bc416a828321e3a6a33af" integrity sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ== -"@babel/helper-replace-supers@^7.13.0", "@babel/helper-replace-supers@^7.13.12": +"@babel/helper-replace-supers@^7.13.12": version "7.13.12" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz#6442f4c1ad912502481a564a7386de0c77ff3804" integrity sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw== @@ -152,38 +160,38 @@ dependencies: "@babel/types" "^7.12.13" -"@babel/helper-validator-identifier@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" - integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== +"@babel/helper-validator-identifier@^7.14.0": + version "7.14.0" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz#d26cad8a47c65286b15df1547319a5d0bcf27288" + integrity sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A== "@babel/helper-validator-option@^7.12.17": version "7.12.17" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz#d1fbf012e1a79b7eebbfdc6d270baaf8d9eb9831" integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== -"@babel/helpers@^7.13.16": - version "7.13.17" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.13.17.tgz#b497c7a00e9719d5b613b8982bda6ed3ee94caf6" - integrity sha512-Eal4Gce4kGijo1/TGJdqp3WuhllaMLSrW6XcL0ulyUAQOuxHcCafZE8KHg9857gcTehsm/v7RcOx2+jp0Ryjsg== +"@babel/helpers@^7.14.0": + version "7.14.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.0.tgz#ea9b6be9478a13d6f961dbb5f36bf75e2f3b8f62" + integrity sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg== dependencies: "@babel/template" "^7.12.13" - "@babel/traverse" "^7.13.17" - "@babel/types" "^7.13.17" + "@babel/traverse" "^7.14.0" + "@babel/types" "^7.14.0" "@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": - version "7.13.10" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.13.10.tgz#a8b2a66148f5b27d666b15d81774347a731d52d1" - integrity sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg== + version "7.14.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.0.tgz#3197e375711ef6bf834e67d0daec88e4f46113cf" + integrity sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg== dependencies: - "@babel/helper-validator-identifier" "^7.12.11" + "@babel/helper-validator-identifier" "^7.14.0" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.16", "@babel/parser@^7.13.9": - version "7.13.16" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.16.tgz#0f18179b0448e6939b1f3f5c4c355a3a9bcdfd37" - integrity sha512-6bAg36mCwuqLO0hbR+z7PHuqWiCeP7Dzg73OpQwsAB1Eb8HnGEz5xYBzCfbu+YjoaJsJs+qheDxVAuqbt3ILEw== +"@babel/parser@^7.1.0", "@babel/parser@^7.12.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.9", "@babel/parser@^7.14.0": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.1.tgz#1bd644b5db3f5797c4479d89ec1817fe02b84c47" + integrity sha512-muUGEKu8E/ftMTPlNp+mc6zL3E9zKWmF5sDHZ5MSsoTP9Wyz64AhEf9kD08xYJ7w6Hdcu8H550ircnPyWSIF0Q== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -301,26 +309,26 @@ "@babel/parser" "^7.12.13" "@babel/types" "^7.12.13" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.13.13", "@babel/traverse@^7.13.15", "@babel/traverse@^7.13.17": - version "7.13.17" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.17.tgz#c85415e0c7d50ac053d758baec98b28b2ecfeea3" - integrity sha512-BMnZn0R+X6ayqm3C3To7o1j7Q020gWdqdyP50KEoVqaCO2c/Im7sYZSmVgvefp8TTMQ+9CtwuBp0Z1CZ8V3Pvg== +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.14.0": + version "7.14.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.0.tgz#cea0dc8ae7e2b1dec65f512f39f3483e8cc95aef" + integrity sha512-dZ/a371EE5XNhTHomvtuLTUyx6UEoJmYX+DT5zBCQN3McHemsuIaKKYqsc/fs26BEkHs/lBZy0J571LP5z9kQA== dependencies: "@babel/code-frame" "^7.12.13" - "@babel/generator" "^7.13.16" + "@babel/generator" "^7.14.0" "@babel/helper-function-name" "^7.12.13" "@babel/helper-split-export-declaration" "^7.12.13" - "@babel/parser" "^7.13.16" - "@babel/types" "^7.13.17" + "@babel/parser" "^7.14.0" + "@babel/types" "^7.14.0" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.12.0", "@babel/types@^7.12.13", "@babel/types@^7.13.0", "@babel/types@^7.13.12", "@babel/types@^7.13.14", "@babel/types@^7.13.16", "@babel/types@^7.13.17", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.13.17" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.17.tgz#48010a115c9fba7588b4437dd68c9469012b38b4" - integrity sha512-RawydLgxbOPDlTLJNtoIypwdmAy//uQIzlKt2+iBiJaRlVuI6QLUxVAyWGNfOzp8Yu4L4lLIacoCyTNtpb4wiA== +"@babel/types@^7.0.0", "@babel/types@^7.12.0", "@babel/types@^7.12.13", "@babel/types@^7.13.0", "@babel/types@^7.13.12", "@babel/types@^7.14.0", "@babel/types@^7.14.1", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.14.1" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.1.tgz#095bd12f1c08ab63eff6e8f7745fa7c9cc15a9db" + integrity sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA== dependencies: - "@babel/helper-validator-identifier" "^7.12.11" + "@babel/helper-validator-identifier" "^7.14.0" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -337,9 +345,9 @@ minimist "^1.2.0" "@dcloudio/types@^2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@dcloudio/types/-/types-2.2.1.tgz#46e4d2c4ea59269a732addba4615dc0549409ad5" - integrity sha512-17wYGL+r8CrxluNUcCEndkwFVrnG0z5/47pASSdoYAyHbhu6cfyxDN9tUlualQrk2U0QdohGZO4LeEm1CuUHmw== + version "2.2.2" + resolved "https://registry.yarnpkg.com/@dcloudio/types/-/types-2.2.2.tgz#74f01b4a04b4577f16e6d0f48579c2c84ef0b88b" + integrity sha512-4zOZ2WWg0t1Y6m9WOsUHIlkptUQI1bbN4rJWNquVb4Rcwcx3OlZ5AYcnCSWGT4LjGxPz+fkt91dxmCAjQBQs3Q== "@eslint/eslintrc@^0.4.0": version "0.4.0" @@ -553,24 +561,24 @@ resolved "https://registry.yarnpkg.com/@jsbits/get-package-version/-/get-package-version-1.0.3.tgz#a47dfd077420beee435580c3bc197931fe3c694c" integrity sha512-IJy1jRL01x7p6UEpgKa1lVLstMUx8EiIR8pPoS5sBfsHEoeLkzYiNpAfxPx8zLDUJyS1yBbChJjcWdPqyH285w== -"@microsoft/api-extractor-model@7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.0.tgz#11327c1ab32939a375596859a27ec256eb17d68e" - integrity sha512-HnIbXpNiF/a+tTnGVJFq4aaxWEGI5XN7vpm1YjNLc+CY5C0s/bdT0LV9o9NzWSpQdHVUaYhQEVLviaDpusu6dg== +"@microsoft/api-extractor-model@7.13.1": + version "7.13.1" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.13.1.tgz#6dd9c4bd49b5d0d32b44c564a94c34b3c3aa2a87" + integrity sha512-PKAjDmAJ6X07tvqCHSN1PRaKq8bZQXF9QI6WGEMnCHNFWwXUoITOAcvFW0Ol3TzwHO5rLbuy/CqWebfhv8eOtw== dependencies: "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.36.2" + "@rushstack/node-core-library" "3.37.0" "@microsoft/api-extractor@^7.13.2": - version "7.14.0" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.14.0.tgz#8427753663807678ea49dd92a16113496e92b0ef" - integrity sha512-R9B0ic8EIcHhwSFQWYTyQX7QDi7kXONeKdIjJI8R+WzVJMA3r0Je9XxSQxxZ9MZIBUxv3fB7pXC2CPIsSkI/BA== + version "7.15.1" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.15.1.tgz#c3791933367ddded72a2f1d3c437e17fa050eac5" + integrity sha512-PYbGAvxbM5B6HbafXY7tJ4ObYpeUZrZFt9vlN68tpYG/7aeldMLAZSjTyB30VFXaGlArjeEooKZIcs2ZnVAbNg== dependencies: - "@microsoft/api-extractor-model" "7.13.0" + "@microsoft/api-extractor-model" "7.13.1" "@microsoft/tsdoc" "0.13.2" "@microsoft/tsdoc-config" "~0.15.2" - "@rushstack/node-core-library" "3.36.2" + "@rushstack/node-core-library" "3.37.0" "@rushstack/rig-package" "0.2.12" "@rushstack/ts-command-line" "4.7.10" colors "~1.2.1" @@ -578,7 +586,7 @@ resolve "~1.17.0" semver "~7.3.0" source-map "~0.6.1" - typescript "~4.1.3" + typescript "~4.2.4" "@microsoft/tsdoc-config@~0.15.2": version "0.15.2" @@ -663,7 +671,16 @@ "@rollup/pluginutils" "^3.1.0" magic-string "^0.25.7" -"@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0": +"@rollup/plugin-strip@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-strip/-/plugin-strip-2.0.0.tgz#46014ca2bc30bfff4ac289c52d7174671418173d" + integrity sha512-1xtE2FDk7Wwr2dEPugkQp3M2FGtSVYeRQaJnHJIkHzcXpBlxT/z+jJoVUvm8LGXso+bLWgO65WrmQ6bC6e/x+A== + dependencies: + "@rollup/pluginutils" "^3.0.4" + estree-walker "^1.0.1" + magic-string "^0.25.5" + +"@rollup/pluginutils@^3.0.4", "@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== @@ -680,10 +697,10 @@ estree-walker "^2.0.1" picomatch "^2.2.2" -"@rushstack/node-core-library@3.36.2": - version "3.36.2" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.36.2.tgz#ba00d313577f9b06d5aafaa29da0d94e594874c0" - integrity sha512-5J8xSY/PuCKR+yfxS497l0PP43kBUeD86S4eS3RzrmMle04J4522MWal8mk1T1EIDpYpgi8qScannU9oVxoStA== +"@rushstack/node-core-library@3.37.0": + version "3.37.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.37.0.tgz#6e8ebfdbe2829d380bc827bbb450361fb48e142c" + integrity sha512-b0OGvl20zfepytLBnKsOtemtiadNZAVolXxaSYssV9VjXaLPF97oLvtLfwc58BX05ufIsrKZgXatnRo8YeffNg== dependencies: "@types/node" "10.17.13" colors "~1.2.1" @@ -727,6 +744,13 @@ dependencies: "@sinonjs/commons" "^1.7.0" +"@sitespeed.io/tracium@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@sitespeed.io/tracium/-/tracium-0.3.3.tgz#b497a4a8d5837db1fd9e3053c99b78f6c0e1f53b" + integrity sha512-dNZafjM93Y+F+sfwTO5gTpsGXlnc/0Q+c2+62ViqP3gkMWvHEMSKkaEHgVJLcLg3i/g19GSIPziiKpgyne07Bw== + dependencies: + debug "^4.1.1" + "@size-limit/file@4.10.2": version "4.10.2" resolved "https://registry.yarnpkg.com/@size-limit/file/-/file-4.10.2.tgz#0a91b83ae310d267bd0a9d6d865e06b0f3fef6ce" @@ -885,9 +909,9 @@ integrity sha512-e3sW4oEH0qS1QxSfX7PT6xIi5qk/YSMsrB9Lq8EtkhQBZB+bKyfkP+jpLJRySanvBhAQPSv2PEBe81M8Iy/7yg== "@types/node@*": - version "15.0.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.0.1.tgz#ef34dea0881028d11398be5bf4e856743e3dc35a" - integrity sha512-TMkXt0Ck1y0KKsGr9gJtWGjttxlZnnvDtphxUOSd0bfaR6Q1jle+sPvrzNR1urqYTWMinoKvjKfXUGsumaO1PA== + version "15.0.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.0.2.tgz#51e9c0920d1b45936ea04341aa3e2e58d339fb67" + integrity sha512-p68+a+KoxpoB47015IeYZYRrdqMUcpbK8re/zpFB8Ld46LHC1lPEbp3EXgkEhAYEcPvjJF6ZO+869SQ0aH1dcA== "@types/node@10.17.13": version "10.17.13" @@ -895,9 +919,9 @@ integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== "@types/node@^14.14.20": - version "14.14.43" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" - integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== + version "14.14.44" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.44.tgz#df7503e6002847b834371c004b372529f3f85215" + integrity sha512-+gaugz6Oce6ZInfI/tK4Pq5wIIkJMEJUu92RB3Eu93mtj4wjjjz9EB5mLp5s1pSsLXdC/CPut/xF20ZzAQJbTA== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -967,57 +991,58 @@ "@types/node" "*" "@typescript-eslint/parser@^4.12.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.22.0.tgz#e1637327fcf796c641fe55f73530e90b16ac8fe8" - integrity sha512-z/bGdBJJZJN76nvAY9DkJANYgK3nlRstRRi74WHm3jjgf2I8AglrSY+6l7ogxOmn55YJ6oKZCLLy+6PW70z15Q== + version "4.22.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.22.1.tgz#a95bda0fd01d994a15fc3e99dc984294f25c19cc" + integrity sha512-l+sUJFInWhuMxA6rtirzjooh8cM/AATAe3amvIkqKFeMzkn85V+eLzb1RyuXkHak4dLfYzOmF6DXPyflJvjQnw== dependencies: - "@typescript-eslint/scope-manager" "4.22.0" - "@typescript-eslint/types" "4.22.0" - "@typescript-eslint/typescript-estree" "4.22.0" + "@typescript-eslint/scope-manager" "4.22.1" + "@typescript-eslint/types" "4.22.1" + "@typescript-eslint/typescript-estree" "4.22.1" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz#ed411545e61161a8d702e703a4b7d96ec065b09a" - integrity sha512-OcCO7LTdk6ukawUM40wo61WdeoA7NM/zaoq1/2cs13M7GyiF+T4rxuA4xM+6LeHWjWbss7hkGXjFDRcKD4O04Q== +"@typescript-eslint/scope-manager@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.22.1.tgz#5bb357f94f9cd8b94e6be43dd637eb73b8f355b4" + integrity sha512-d5bAiPBiessSmNi8Amq/RuLslvcumxLmyhf1/Xa9IuaoFJ0YtshlJKxhlbY7l2JdEk3wS0EnmnfeJWSvADOe0g== dependencies: - "@typescript-eslint/types" "4.22.0" - "@typescript-eslint/visitor-keys" "4.22.0" + "@typescript-eslint/types" "4.22.1" + "@typescript-eslint/visitor-keys" "4.22.1" -"@typescript-eslint/types@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.22.0.tgz#0ca6fde5b68daf6dba133f30959cc0688c8dd0b6" - integrity sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA== +"@typescript-eslint/types@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.22.1.tgz#bf99c6cec0b4a23d53a61894816927f2adad856a" + integrity sha512-2HTkbkdAeI3OOcWbqA8hWf/7z9c6gkmnWNGz0dKSLYLWywUlkOAQ2XcjhlKLj5xBFDf8FgAOF5aQbnLRvgNbCw== -"@typescript-eslint/typescript-estree@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz#b5d95d6d366ff3b72f5168c75775a3e46250d05c" - integrity sha512-TkIFeu5JEeSs5ze/4NID+PIcVjgoU3cUQUIZnH3Sb1cEn1lBo7StSV5bwPuJQuoxKXlzAObjYTilOEKRuhR5yg== +"@typescript-eslint/typescript-estree@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.1.tgz#dca379eead8cdfd4edc04805e83af6d148c164f9" + integrity sha512-p3We0pAPacT+onSGM+sPR+M9CblVqdA9F1JEdIqRVlxK5Qth4ochXQgIyb9daBomyQKAXbygxp1aXQRV0GC79A== dependencies: - "@typescript-eslint/types" "4.22.0" - "@typescript-eslint/visitor-keys" "4.22.0" + "@typescript-eslint/types" "4.22.1" + "@typescript-eslint/visitor-keys" "4.22.1" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz#169dae26d3c122935da7528c839f42a8a42f6e47" - integrity sha512-nnMu4F+s4o0sll6cBSsTeVsT4cwxB7zECK3dFxzEjPBii9xLpq4yqqsy/FU5zMfan6G60DKZSCXAa3sHJZrcYw== +"@typescript-eslint/visitor-keys@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.1.tgz#6045ae25a11662c671f90b3a403d682dfca0b7a6" + integrity sha512-WPkOrIRm+WCLZxXQHCi+WG8T2MMTUFR70rWjdWYddLT7cEfb2P4a3O/J2U1FBVsSFTocXLCoXWY6MZGejeStvQ== dependencies: - "@typescript-eslint/types" "4.22.0" + "@typescript-eslint/types" "4.22.1" eslint-visitor-keys "^2.0.0" -"@vitejs/plugin-vue-jsx@^1.1.3": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-1.1.3.tgz#426c68f8a367a603acb82fca6e2b12506ba9fc8e" - integrity sha512-R9wsuNDEKTDG5oXJaFictrw9E5uokniGzi6tvyO5Od02tE4TnOPfgY2BeHKB4f4ldgiZRMhdUhNEsgjoWnct6A== +"@vitejs/plugin-vue-jsx@^1.1.4": + version "1.1.4" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-1.1.4.tgz#3af194202f9ed38a7384f7a7c72f5b66ce863859" + integrity sha512-QomJwH9oF5Ixl000fLK4TjKE4gwnxpArZdcHs6ANrtgsXwxyoib8msz9tNgiP2TiBfg7VdShbaUBYMvm0gPGsA== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-syntax-import-meta" "^7.10.4" "@babel/plugin-transform-typescript" "^7.12.1" + "@rollup/pluginutils" "^4.1.0" "@vue/babel-plugin-jsx" "^1.0.3" hash-sum "^2.0.0" @@ -1032,9 +1057,9 @@ integrity sha512-hz4R8tS5jMn8lDq6iD+yWL6XNB699pGIVLk7WSJnn1dbpjaazsjZQkieJoRX6gW5zpYSCFqQ7jUquPNY65tQYA== "@vue/babel-plugin-jsx@^1.0.3": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.0.5.tgz#72820d5fb371c41d2113b31b16787995e8bdf69a" - integrity sha512-Jtipy7oI0am5e1q5Ahunm/cCcCh5ssf5VkMQsLR383S3un5Qh7NBfxgSK9kmWf4IXJEhDeYp9kHv8G/EnMai9A== + version "1.0.6" + resolved "https://registry.yarnpkg.com/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.0.6.tgz#184bf3541ab6efdbe5079ab8b20c19e2af100bfb" + integrity sha512-RzYsvBhzKUmY2YG6LoV+W5PnlnkInq0thh1AzCmewwctAgGN6e9UFon6ZrQQV1CO5G5PeME7MqpB+/vvGg0h4g== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/plugin-syntax-jsx" "^7.0.0" @@ -1165,9 +1190,9 @@ acorn@^7.1.1, acorn@^7.4.0: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.1.0: - version "8.2.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.1.tgz#0d36af126fb6755095879c1dc6fd7edf7d60a5fb" - integrity sha512-z716cpm5TX4uzOzILx8PavOE6C6DKshHDw1aQN52M/yNSqE9s5O8SMfyhCCfCJ3HmTL0NkVOi+8a/55T7YB3bg== + version "8.2.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.4.tgz#caba24b08185c3b56e3168e97d15ed17f4d31fd0" + integrity sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg== agent-base@6: version "6.0.2" @@ -1589,13 +1614,13 @@ browserify-sign@^4.0.0: safe-buffer "^5.2.0" browserslist@^4.14.5, browserslist@^4.16.3: - version "4.16.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.5.tgz#952825440bca8913c62d0021334cbe928ef062ae" - integrity sha512-C2HAjrM1AI/djrpAUU/tr4pml1DqLIzJKSLDBXBrNErl9ZCCTXdhwxdJjYc16953+mBWf7Lw+uUJgpgb8cN71A== + version "4.16.6" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" + integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== dependencies: - caniuse-lite "^1.0.30001214" + caniuse-lite "^1.0.30001219" colorette "^1.2.2" - electron-to-chromium "^1.3.719" + electron-to-chromium "^1.3.723" escalade "^3.1.1" node-releases "^1.1.71" @@ -1681,10 +1706,10 @@ camelcase@^6.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -caniuse-lite@^1.0.30001196, caniuse-lite@^1.0.30001214: - version "1.0.30001218" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001218.tgz#9b44f6ed16f875db6373e2debd4d14a07359002f" - integrity sha512-0ASydOWSy3bB88FbDpJSTt+PfDwnMqrym3yRZfqG8EXSQ06OZhF+q5wgYP/EN+jJMERItNcDQUqMyNjzZ+r5+Q== +caniuse-lite@^1.0.30001196, caniuse-lite@^1.0.30001219: + version "1.0.30001222" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001222.tgz#2789b8487282cbbe1700924f53951303d28086a9" + integrity sha512-rPmwUK0YMjfMlZVmH6nVB5U3YJ5Wnx3vmT5lnRO3nIKO8bJ+TRWMbGuuiSugDJqESy/lz+1hSrlQEagCtoOAWQ== capture-exit@^2.0.0: version "2.0.0" @@ -2178,10 +2203,10 @@ detect-newline@^3.0.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -devtools-protocol@0.0.854822: - version "0.0.854822" - resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.854822.tgz#eac3a5260a6b3b4e729a09fdc0c77b0d322e777b" - integrity sha512-xd4D8kHQtB0KtWW0c9xBZD5LVtm9chkMOfs/3Yn01RhT/sFIsVtzTtypfKoFfWBaL+7xCYLxjOLkhwPXaX/Kcg== +devtools-protocol@0.0.869402: + version "0.0.869402" + resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.869402.tgz#03ade701761742e43ae4de5dc188bcd80f156d8d" + integrity sha512-VvlVYY+VDJe639yHs5PHISzdWTLL3Aw8rO4cvUtwvoxFd6FHbE4OpHHcde52M6096uYYazAmd4l0o5VuFRO2WA== diff-sequences@^26.6.2: version "26.6.2" @@ -2226,10 +2251,10 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -electron-to-chromium@^1.3.719: - version "1.3.723" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.723.tgz#52769a75635342a4db29af5f1e40bd3dad02c877" - integrity sha512-L+WXyXI7c7+G1V8ANzRsPI5giiimLAUDC6Zs1ojHHPhYXb3k/iTABFmWjivEtsWrRQymjnO66/rO2ZTABGdmWg== +electron-to-chromium@^1.3.723: + version "1.3.727" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz#857e310ca00f0b75da4e1db6ff0e073cc4a91ddf" + integrity sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg== elliptic@^6.5.3: version "6.5.4" @@ -2340,9 +2365,9 @@ eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== eslint-visitor-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" - integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== eslint@^7.17.0: version "7.25.0" @@ -2416,14 +2441,14 @@ esrecurse@^4.3.0: estraverse "^5.2.0" estimo@^2.2.3: - version "2.2.5" - resolved "https://registry.yarnpkg.com/estimo/-/estimo-2.2.5.tgz#fa2c1340d8c5334a9f10bc11cf305018bfefcd0f" - integrity sha512-PQCmJWim0sXcJN2hwjflIk1zFzGgNpAKYG/OcNQ5G0bI6sD9UvgIQiQp0Zl81cDyDS1QHsXIpCWGYrSft0z+Ag== + version "2.2.7" + resolved "https://registry.yarnpkg.com/estimo/-/estimo-2.2.7.tgz#bbfd97ad208b831d83ac5402c26e32b0e23939ed" + integrity sha512-hY5X3DwK4Pftmc2yvkKXiRk32gr8vbc0OMfztQjsA9UYX29aovnpuIoL/g0MlcNXe8EOKGLrKIl1t0cItoblhA== dependencies: + "@sitespeed.io/tracium" "^0.3.3" nanoid "^3.1.22" - puppeteer-core "^8.0.0" - tracium "^0.2.1" - yargs "^16.2.0" + puppeteer-core "^9.1.0" + yargs "^17.0.0" estraverse@^4.1.1: version "4.3.0" @@ -4143,9 +4168,9 @@ lint-staged@^10.5.3: stringify-object "^3.3.0" listr2@^3.2.2: - version "3.8.1" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.8.1.tgz#0237a8211962249db97828e5d704633f7c26c965" - integrity sha512-75vMLokDIEoZIXp3FE3P7U4yi7BRroZb7Az9+XBq+wGGnvq70QPT+BX41aSrROUMLuVan9l3aAjdeXWgaFyFEw== + version "3.8.2" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.8.2.tgz#99b138ad1cfb08f1b0aacd422972e49b2d814b99" + integrity sha512-E28Fw7Zd3HQlCJKzb9a8C8M0HtFWQeucE+S8YrSrqZObuCLPRHMRrR8gNmYt65cU9orXYHwvN5agXC36lYt7VQ== dependencies: chalk "^4.1.1" cli-truncate "^2.1.0" @@ -4267,7 +4292,7 @@ magic-string@^0.22.5: dependencies: vlq "^0.2.2" -magic-string@^0.25.1, magic-string@^0.25.7: +magic-string@^0.25.1, magic-string@^0.25.5, magic-string@^0.25.7: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== @@ -4895,9 +4920,9 @@ postcss-value-parser@^4.1.0: integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== postcss@^8.1.10, postcss@^8.2.1: - version "8.2.13" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.13.tgz#dbe043e26e3c068e45113b1ed6375d2d37e2129f" - integrity sha512-FCE5xLH+hjbzRdpbRb1IMCvPv9yZx2QnDarBEYSN0N0HYk+TcXsEhwdFcFb+SRWOKzKGErhIEbBK2ogyLdTtfQ== + version "8.2.14" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.14.tgz#dcf313eb8247b3ce8078d048c0e8262ca565ad2b" + integrity sha512-+jD0ZijcvyCqPQo/m/CW0UcARpdFylq04of+Q7RKX6f/Tu+dvpUI/9Sp81+i6/vJThnOBX09Quw0ZLOVwpzX3w== dependencies: colorette "^1.2.2" nanoid "^3.1.22" @@ -5001,13 +5026,13 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -puppeteer-core@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-8.0.0.tgz#4f56cc24675a8e993b0610a284f064a84910f4ec" - integrity sha512-kRTiGh42+4eiw9tl489p//8Zpg3LWmz0K3mOpv0qj5PsCV7jE43SLIi0E50suLh8OghXsFhJFoE98vEmXUnDew== +puppeteer-core@^9.1.0: + version "9.1.1" + resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-9.1.1.tgz#0c189c3275967d65c39270e6b146e559baca3d47" + integrity sha512-zbedbitVIGhmgz0nt7eIdLsnaoVZSlNJfBivqm2w67T8LR2bU1dvnruDZ8nQO0zn++Iet7zHbAOdnuS5+H2E7A== dependencies: debug "^4.1.0" - devtools-protocol "0.0.854822" + devtools-protocol "0.0.869402" extract-zip "^2.0.0" https-proxy-agent "^5.0.0" node-fetch "^2.6.1" @@ -5368,9 +5393,9 @@ rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.8.2: estree-walker "^0.6.1" rollup@^2.35.1, rollup@^2.38.5: - version "2.45.2" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.45.2.tgz#8fb85917c9f35605720e92328f3ccbfba6f78b48" - integrity sha512-kRRU7wXzFHUzBIv0GfoFFIN3m9oteY4uAsKllIpQDId5cfnkWF2J130l+27dzDju0E6MScKiV0ZM5Bw8m4blYQ== + version "2.47.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.47.0.tgz#9d958aeb2c0f6a383cacc0401dff02b6e252664d" + integrity sha512-rqBjgq9hQfW0vRmz+0S062ORRNJXvwRpzxhFXORvar/maZqY6za3rgQ/p1Glg+j1hnc1GtYyQCPiAei95uTElg== optionalDependencies: fsevents "~2.3.1" @@ -6002,17 +6027,10 @@ tr46@^2.0.2: dependencies: punycode "^2.1.1" -tracium@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/tracium/-/tracium-0.2.1.tgz#b75753e03ce57e05847fd6a0f747dc39971b6230" - integrity sha512-ERoaMqbl9h9qxXrHIh15ZMe2MuYKSN3lXoIrkvDnlQh09Ribn3fzrCQN774ewwS/DbX1wwuipyrhOFqrp5/1qg== - dependencies: - debug "^4.1.1" - ts-jest@^26.4.4: - version "26.5.5" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.5.tgz#e40481b6ee4dd162626ba481a2be05fa57160ea5" - integrity sha512-7tP4m+silwt1NHqzNRAPjW1BswnAhopTdc2K3HEkRZjF0ZG2F/e/ypVH0xiZIMfItFtD3CX0XFbwPzp9fIEUVg== + version "26.5.6" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.6.tgz#c32e0746425274e1dfe333f43cd3c800e014ec35" + integrity sha512-rua+rCP8DxpA8b4DQD/6X2HQS8Zy/xzViVYfEs2OQu68tkCuKLV0Md8pmX55+W24uRIyAsf/BajRfxOs+R2MKA== dependencies: bs-logger "0.x" buffer-from "1.x" @@ -6115,6 +6133,11 @@ typescript@~4.1.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72" integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA== +typescript@~4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961" + integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== + unbzip2-stream@^1.3.3: version "1.4.3" resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" @@ -6189,9 +6212,9 @@ v8-compile-cache@^2.0.3: integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== v8-to-istanbul@^7.0.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.1.tgz#04bfd1026ba4577de5472df4f5e89af49de5edda" - integrity sha512-p0BB09E5FRjx0ELN6RgusIPsSPhtgexSRcKETybEs6IGOTXJSZqfwxp7r//55nnu0f1AxltY5VvdVqy2vZf9AA== + version "7.1.2" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz#30898d1a7fa0c84d225a2c1434fb958f290883c1" + integrity sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow== dependencies: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" @@ -6220,9 +6243,9 @@ verror@1.10.0: extsprintf "^1.2.0" vite@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/vite/-/vite-2.2.3.tgz#1acbdfa56ac00e00e7ccb6988f63f130c2f99dbb" - integrity sha512-PtjyBL4GtACM+uT5q5hi2+AlMBbb6YI2b2bam6QI8ZdZt4FezseF0yZHQx0G+b3po9jIJ/GS5N9gc5Yq9Rue7g== + version "2.2.4" + resolved "https://registry.yarnpkg.com/vite/-/vite-2.2.4.tgz#8f9cc85aacab04c850085894b086c8717f12ed16" + integrity sha512-vnIwSNci+phFMp6krhy+FbYzKL0R67Sdt9mVZ96S27AewrApSJjTqncJcalk8sf60BgcbW4+1C6DFIWkxquO9g== dependencies: esbuild "^0.9.3" postcss "^8.2.1" @@ -6471,10 +6494,10 @@ yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== +yargs@^17.0.0: + version "17.0.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.0.1.tgz#6a1ced4ed5ee0b388010ba9fd67af83b9362e0bb" + integrity sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ== dependencies: cliui "^7.0.2" escalade "^3.1.1" -- GitLab