From b67b2d940ded12486dd04242180acd536e086b4c Mon Sep 17 00:00:00 2001 From: zchengo <1933757688@qq.com> Date: Fri, 24 Feb 2023 15:15:28 +0800 Subject: [PATCH] chore: upgrade vitepress --- .../docs/.vitepress/cache/deps/_metadata.json | 6 +- docs/docs/.vitepress/cache/deps/vue.js | 207 +++++---- docs/docs/.vitepress/cache/deps/vue.js.map | 6 +- docs/package-lock.json | 428 +++++++++--------- docs/package.json | 2 +- 5 files changed, 351 insertions(+), 298 deletions(-) diff --git a/docs/docs/.vitepress/cache/deps/_metadata.json b/docs/docs/.vitepress/cache/deps/_metadata.json index 2ed25dc..9c8b738 100644 --- a/docs/docs/.vitepress/cache/deps/_metadata.json +++ b/docs/docs/.vitepress/cache/deps/_metadata.json @@ -1,11 +1,11 @@ { - "hash": "e1228940", - "browserHash": "85f61aa1", + "hash": "ce2e264b", + "browserHash": "e34b92f3", "optimized": { "vue": { "src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js", "file": "vue.js", - "fileHash": "e25199e3", + "fileHash": "0c7ec6e0", "needsInterop": false } }, diff --git a/docs/docs/.vitepress/cache/deps/vue.js b/docs/docs/.vitepress/cache/deps/vue.js index cd81225..1301661 100644 --- a/docs/docs/.vitepress/cache/deps/vue.js +++ b/docs/docs/.vitepress/cache/deps/vue.js @@ -73,8 +73,8 @@ function normalizeProps(props) { } return props; } -var HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; -var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +var HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; var isHTMLTag = makeMap(HTML_TAGS); var isSVGTag = makeMap(SVG_TAGS); @@ -181,6 +181,7 @@ var isArray = Array.isArray; var isMap = (val) => toTypeString(val) === "[object Map]"; var isSet = (val) => toTypeString(val) === "[object Set]"; var isDate = (val) => toTypeString(val) === "[object Date]"; +var isRegExp = (val) => toTypeString(val) === "[object RegExp]"; var isFunction = (val) => typeof val === "function"; var isString = (val) => typeof val === "string"; var isSymbol = (val) => typeof val === "symbol"; @@ -228,10 +229,14 @@ var def = (obj, key, value) => { value }); }; -var toNumber = (val) => { +var looseToNumber = (val) => { const n = parseFloat(val); return isNaN(n) ? val : n; }; +var toNumber = (val) => { + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; +}; var _globalThis; var getGlobalThis = () => { return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); @@ -245,7 +250,7 @@ var activeEffectScope; var EffectScope = class { constructor(detached = false) { this.detached = detached; - this.active = true; + this._active = true; this.effects = []; this.cleanups = []; this.parent = activeEffectScope; @@ -253,8 +258,11 @@ var EffectScope = class { this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; } } + get active() { + return this._active; + } run(fn) { - if (this.active) { + if (this._active) { const currentEffectScope = activeEffectScope; try { activeEffectScope = this; @@ -281,7 +289,7 @@ var EffectScope = class { activeEffectScope = this.parent; } stop(fromParent) { - if (this.active) { + if (this._active) { let i, l; for (i = 0, l = this.effects.length; i < l; i++) { this.effects[i].stop(); @@ -302,7 +310,7 @@ var EffectScope = class { } } this.parent = void 0; - this.active = false; + this._active = false; } } }; @@ -500,7 +508,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) { if (type === "clear") { deps = [...depsMap.values()]; } else if (key === "length" && isArray(target)) { - const newLength = toNumber(newValue); + const newLength = Number(newValue); depsMap.forEach((dep, key2) => { if (key2 === "length" || key2 >= newLength) { deps.push(dep); @@ -584,11 +592,15 @@ function triggerEffect(effect2, debuggerEventExtraInfo) { } } } +function getDepFromReactive(object, key) { + var _a2; + return (_a2 = targetMap.get(object)) === null || _a2 === void 0 ? void 0 : _a2.get(key); +} var isNonTrackableKeys = makeMap(`__proto__,__v_isRef,__isVue`); var builtInSymbols = new Set( Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) ); -var get = createGetter(); +var get$1 = createGetter(); var shallowGet = createGetter(false, true); var readonlyGet = createGetter(true); var shallowReadonlyGet = createGetter(true, true); @@ -619,6 +631,11 @@ function createArrayInstrumentations() { }); return instrumentations; } +function hasOwnProperty2(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} function createGetter(isReadonly2 = false, shallow = false) { return function get2(target, key, receiver) { if (key === "__v_isReactive") { @@ -631,8 +648,13 @@ function createGetter(isReadonly2 = false, shallow = false) { return target; } const targetIsArray = isArray(target); - if (!isReadonly2 && targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty2; + } } const res = Reflect.get(target, key, receiver); if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { @@ -653,7 +675,7 @@ function createGetter(isReadonly2 = false, shallow = false) { return res; }; } -var set = createSetter(); +var set$1 = createSetter(); var shallowSet = createSetter(true); function createSetter(shallow = false) { return function set2(target, key, value, receiver) { @@ -692,7 +714,7 @@ function deleteProperty(target, key) { } return result; } -function has(target, key) { +function has$1(target, key) { const result = Reflect.has(target, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { track(target, "has", key); @@ -704,10 +726,10 @@ function ownKeys(target) { return Reflect.ownKeys(target); } var mutableHandlers = { - get, - set, + get: get$1, + set: set$1, deleteProperty, - has, + has: has$1, ownKeys }; var readonlyHandlers = { @@ -734,7 +756,7 @@ var shallowReadonlyHandlers = extend({}, readonlyHandlers, { }); var toShallow = (value) => value; var getProto = (v) => Reflect.getPrototypeOf(v); -function get$1(target, key, isReadonly2 = false, isShallow3 = false) { +function get(target, key, isReadonly2 = false, isShallow3 = false) { target = target[ "__v_raw" /* ReactiveFlags.RAW */ @@ -757,7 +779,7 @@ function get$1(target, key, isReadonly2 = false, isShallow3 = false) { target.get(key); } } -function has$1(key, isReadonly2 = false) { +function has(key, isReadonly2 = false) { const target = this[ "__v_raw" /* ReactiveFlags.RAW */ @@ -791,7 +813,7 @@ function add(value) { } return this; } -function set$1(key, value) { +function set(key, value) { value = toRaw(value); const target = toRaw(this); const { has: has2, get: get2 } = getProto(target); @@ -894,41 +916,41 @@ function createReadonlyMethod(type) { function createInstrumentations() { const mutableInstrumentations2 = { get(key) { - return get$1(this, key); + return get(this, key); }, get size() { return size(this); }, - has: has$1, + has, add, - set: set$1, + set, delete: deleteEntry, clear, forEach: createForEach(false, false) }; const shallowInstrumentations2 = { get(key) { - return get$1(this, key, false, true); + return get(this, key, false, true); }, get size() { return size(this); }, - has: has$1, + has, add, - set: set$1, + set, delete: deleteEntry, clear, forEach: createForEach(false, true) }; const readonlyInstrumentations2 = { get(key) { - return get$1(this, key, true); + return get(this, key, true); }, get size() { return size(this, true); }, has(key) { - return has$1.call(this, key, true); + return has.call(this, key, true); }, add: createReadonlyMethod( "add" @@ -950,13 +972,13 @@ function createInstrumentations() { }; const shallowReadonlyInstrumentations2 = { get(key) { - return get$1(this, key, true, true); + return get(this, key, true, true); }, get size() { return size(this, true); }, has(key) { - return has$1.call(this, key, true); + return has.call(this, key, true); }, add: createReadonlyMethod( "add" @@ -1146,16 +1168,17 @@ function trackRefValue(ref2) { } function triggerRefValue(ref2, newVal) { ref2 = toRaw(ref2); - if (ref2.dep) { + const dep = ref2.dep; + if (dep) { if (true) { - triggerEffects(ref2.dep, { + triggerEffects(dep, { target: ref2, type: "set", key: "value", newValue: newVal }); } else { - triggerEffects(ref2.dep); + triggerEffects(dep); } } } @@ -1259,18 +1282,21 @@ var ObjectRefImpl = class { set value(newVal) { this._object[this._key] = newVal; } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } }; function toRef(object, key, defaultValue) { const val = object[key]; return isRef(val) ? val : new ObjectRefImpl(object, key, defaultValue); } -var _a; +var _a$1; var ComputedRefImpl = class { constructor(getter, _setter, isReadonly2, isSSR) { this._setter = _setter; this.dep = void 0; this.__v_isRef = true; - this[_a] = false; + this[_a$1] = false; this._dirty = true; this.effect = new ReactiveEffect(getter, () => { if (!this._dirty) { @@ -1298,7 +1324,7 @@ var ComputedRefImpl = class { this._setter(newValue); } }; -_a = "__v_isReadonly"; +_a$1 = "__v_isReadonly"; function computed(getterOrOptions, debugOptions, isSSR = false) { let getter; let setter; @@ -1319,9 +1345,9 @@ function computed(getterOrOptions, debugOptions, isSSR = false) { } return cRef; } -var _a$1; +var _a; var tick = Promise.resolve(); -_a$1 = "__v_isReadonly"; +_a = "__v_isReadonly"; // node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js var stack = []; @@ -1419,6 +1445,17 @@ function formatProp(key, value, raw) { return raw ? value : [`${key}=`, value]; } } +function assertNumber(val, type) { + if (false) + return; + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn2(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn2(`${type} is NaN - the duration expression might be incorrect.`); + } +} var ErrorTypeStrings = { [ "sp" @@ -1870,7 +1907,7 @@ function tryWrap(fn) { var devtools; var buffer = []; var devtoolsNotInstalled = false; -function emit(event, ...args) { +function emit$1(event, ...args) { if (devtools) { devtools.emit(event, ...args); } else if (!devtoolsNotInstalled) { @@ -1907,7 +1944,7 @@ function setDevtoolsHook(hook, target) { } } function devtoolsInitApp(app, version2) { - emit("app:init", app, version2, { + emit$1("app:init", app, version2, { Fragment, Text, Comment, @@ -1915,7 +1952,7 @@ function devtoolsInitApp(app, version2) { }); } function devtoolsUnmountApp(app) { - emit("app:unmount", app); + emit$1("app:unmount", app); } var devtoolsComponentAdded = createDevtoolsComponentHook( "component:added" @@ -1937,7 +1974,7 @@ var devtoolsComponentRemoved = (component) => { }; function createDevtoolsComponentHook(hook) { return (component) => { - emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component); + emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component); }; } var devtoolsPerfStart = createDevtoolsPerformanceHook( @@ -1950,13 +1987,13 @@ var devtoolsPerfEnd = createDevtoolsPerformanceHook( ); function createDevtoolsPerformanceHook(hook) { return (component, type, time) => { - emit(hook, component.appContext.app, component.uid, component, type, time); + emit$1(hook, component.appContext.app, component.uid, component, type, time); }; } function devtoolsComponentEmit(component, event, params) { - emit("component:emit", component.appContext.app, component, event, params); + emit$1("component:emit", component.appContext.app, component, event, params); } -function emit$1(instance, event, ...rawArgs) { +function emit(instance, event, ...rawArgs) { if (instance.isUnmounted) return; const props = instance.vnode.props || EMPTY_OBJ; @@ -1988,7 +2025,7 @@ function emit$1(instance, event, ...rawArgs) { args = rawArgs.map((a) => isString(a) ? a.trim() : a); } if (number) { - args = rawArgs.map(toNumber); + args = rawArgs.map(looseToNumber); } } if (true) { @@ -2496,7 +2533,10 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde console[console.info ? "info" : "log"](` is an experimental feature and its API will likely change.`); } const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove: remove2 } } = rendererInternals; - const timeout = toNumber(vnode.props && vnode.props.timeout); + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + if (true) { + assertNumber(timeout, `Suspense timeout`); + } const suspense = { vnode, parent, @@ -2821,7 +2861,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM const warnInvalidSource = (s) => { warn2(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`); }; - const instance = currentInstance; + const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null; let getter; let forceTrigger = false; let isMultiSource = false; @@ -3527,7 +3567,7 @@ var KeepAliveImpl = { } function pruneCacheEntry(key) { const cached = cache.get(key); - if (!current || cached.type !== current.type) { + if (!current || !isSameVNodeType(cached, current)) { unmount(cached); } else if (current) { resetShapeFlag(current); @@ -3556,7 +3596,7 @@ var KeepAliveImpl = { cache.forEach((cached) => { const { subTree, suspense } = instance; const vnode = getInnerChild(subTree); - if (cached.type === vnode.type) { + if (cached.type === vnode.type && cached.key === vnode.key) { resetShapeFlag(vnode); const da = vnode.component.da; da && queuePostRenderEffect(da, suspense); @@ -3626,7 +3666,7 @@ function matches(pattern, name) { return pattern.some((p2) => matches(p2, name)); } else if (isString(pattern)) { return pattern.split(",").includes(name); - } else if (pattern.test) { + } else if (isRegExp(pattern)) { return pattern.test(name); } return false; @@ -4831,8 +4871,8 @@ function validatePropName(key) { return false; } function getType(ctor) { - const match = ctor && ctor.toString().match(/^\s*function (\w+)/); - return match ? match[1] : ctor === null ? "null" : ""; + const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/); + return match ? match[2] : ctor === null ? "null" : ""; } function isSameType(a, b) { return getType(a) === getType(b); @@ -5048,7 +5088,7 @@ function createAppContext() { emitsCache: /* @__PURE__ */ new WeakMap() }; } -var uid = 0; +var uid$1 = 0; function createAppAPI(render2, hydrate2) { return function createApp2(rootComponent, rootProps = null) { if (!isFunction(rootComponent)) { @@ -5062,7 +5102,7 @@ function createAppAPI(render2, hydrate2) { const installedPlugins = /* @__PURE__ */ new Set(); let isMounted = false; const app = context.app = { - _uid: uid++, + _uid: uid$1++, _component: rootComponent, _props: rootProps, _container: null, @@ -5716,6 +5756,7 @@ function baseCreateRenderer(options, createHydrationFns) { if (dirs) { invokeDirectiveHook(vnode, null, parentComponent, "created"); } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); if (props) { for (const key in props) { if (key !== "value" && !isReservedProp(key)) { @@ -5729,7 +5770,6 @@ function baseCreateRenderer(options, createHydrationFns) { invokeVNodeHook(vnodeHook, parentComponent, vnode); } } - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); if (true) { Object.defineProperty(el, "__vnode", { value: vnode, @@ -7037,7 +7077,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false) { ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), el: vnode.el, anchor: vnode.anchor, - ctx: vnode.ctx + ctx: vnode.ctx, + ce: vnode.ce }; return cloned; } @@ -7154,12 +7195,12 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { ]); } var emptyAppContext = createAppContext(); -var uid$1 = 0; +var uid = 0; function createComponentInstance(vnode, parent, suspense) { const type = vnode.type; const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; const instance = { - uid: uid$1++, + uid: uid++, vnode, type, parent, @@ -7234,7 +7275,7 @@ function createComponentInstance(vnode, parent, suspense) { instance.ctx = { _: instance }; } instance.root = parent ? parent.root : instance; - instance.emit = emit$1.bind(null, instance); + instance.emit = emit.bind(null, instance); if (vnode.ce) { vnode.ce(instance); } @@ -7436,8 +7477,23 @@ function createAttrsProxy(instance) { } function createSetupContext(instance) { const expose = (exposed) => { - if (instance.exposed) { - warn2(`expose() should be called only once per setup().`); + if (true) { + if (instance.exposed) { + warn2(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn2(`expose() should be passed a plain object, received ${exposedType}.`); + } + } } instance.exposed = exposed || {}; }; @@ -7830,7 +7886,7 @@ function isMemoSame(cached, memo) { } return true; } -var version = "3.2.45"; +var version = "3.2.47"; var _ssrUtils = { createComponentInstance, setupComponent, @@ -7927,9 +7983,6 @@ function patchStyle(el, prev, next) { const style = el.style; const isCssString = isString(next); if (next && !isCssString) { - for (const key in next) { - setStyle(style, key, next[key]); - } if (prev && !isString(prev)) { for (const key in prev) { if (next[key] == null) { @@ -7937,6 +7990,9 @@ function patchStyle(el, prev, next) { } } } + for (const key in next) { + setStyle(style, key, next[key]); + } } else { const currentDisplay = style.display; if (isCssString) { @@ -8582,16 +8638,10 @@ function normalizeDuration(duration) { } function NumberOf(val) { const res = toNumber(val); - if (true) - validateDuration(res); - return res; -} -function validateDuration(val) { - if (typeof val !== "number") { - warn2(` explicit duration is not a valid number - got ${JSON.stringify(val)}.`); - } else if (isNaN(val)) { - warn2(` explicit duration is NaN - the duration expression might be incorrect.`); + if (true) { + assertNumber(res, " explicit duration"); } + return res; } function addTransitionClass(el, cls) { cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); @@ -8762,6 +8812,8 @@ var TransitionGroupImpl = { }; } }; +var removeMode = (props) => delete props.mode; +removeMode(TransitionGroupImpl.props); var TransitionGroup = TransitionGroupImpl; function callPendingCbs(c) { const el = c.el; @@ -8828,7 +8880,7 @@ var vModelText = { domValue = domValue.trim(); } if (castToNumber) { - domValue = toNumber(domValue); + domValue = looseToNumber(domValue); } el._assign(domValue); }); @@ -8858,7 +8910,7 @@ var vModelText = { if (trim && el.value.trim() === value) { return; } - if ((number || el.type === "number") && toNumber(el.value) === value) { + if ((number || el.type === "number") && looseToNumber(el.value) === value) { return; } } @@ -8939,7 +8991,7 @@ var vModelSelect = { created(el, { value, modifiers: { number } }, vnode) { const isSetModel = isSet(value); addEventListener(el, "change", () => { - const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? toNumber(getValue(o)) : getValue(o)); + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o)); el._assign(el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]); }); el._assign = getModelAssigner(vnode); @@ -9292,6 +9344,7 @@ export { Transition, TransitionGroup, VueElement, + assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, diff --git a/docs/docs/.vitepress/cache/deps/vue.js.map b/docs/docs/.vitepress/cache/deps/vue.js.map index 4f4fbde..f75b70b 100644 --- a/docs/docs/.vitepress/cache/deps/vue.js.map +++ b/docs/docs/.vitepress/cache/deps/vue.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../../../../node_modules/@vue/shared/dist/shared.esm-bundler.js", "../../../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js", "../../../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js", "../../../../node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js", "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js"], - "sourcesContent": ["/**\n * Make a map and return a function for checking if a key\n * is in that map.\n * IMPORTANT: all calls of this function must be prefixed with\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\n * So that rollup can tree-shake them if necessary.\n */\nfunction makeMap(str, expectsLowerCase) {\n const map = Object.create(null);\n const list = str.split(',');\n for (let i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val];\n}\n\n/**\n * dev only flag -> name mapping\n */\nconst PatchFlagNames = {\n [1 /* PatchFlags.TEXT */]: `TEXT`,\n [2 /* PatchFlags.CLASS */]: `CLASS`,\n [4 /* PatchFlags.STYLE */]: `STYLE`,\n [8 /* PatchFlags.PROPS */]: `PROPS`,\n [16 /* PatchFlags.FULL_PROPS */]: `FULL_PROPS`,\n [32 /* PatchFlags.HYDRATE_EVENTS */]: `HYDRATE_EVENTS`,\n [64 /* PatchFlags.STABLE_FRAGMENT */]: `STABLE_FRAGMENT`,\n [128 /* PatchFlags.KEYED_FRAGMENT */]: `KEYED_FRAGMENT`,\n [256 /* PatchFlags.UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`,\n [512 /* PatchFlags.NEED_PATCH */]: `NEED_PATCH`,\n [1024 /* PatchFlags.DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`,\n [2048 /* PatchFlags.DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`,\n [-1 /* PatchFlags.HOISTED */]: `HOISTED`,\n [-2 /* PatchFlags.BAIL */]: `BAIL`\n};\n\n/**\n * Dev only\n */\nconst slotFlagsText = {\n [1 /* SlotFlags.STABLE */]: 'STABLE',\n [2 /* SlotFlags.DYNAMIC */]: 'DYNAMIC',\n [3 /* SlotFlags.FORWARDED */]: 'FORWARDED'\n};\n\nconst GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' +\n 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' +\n 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt';\nconst isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED);\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n // Split the content into individual lines but capture the newline sequence\n // that separated each line. This is important because the actual sequence is\n // needed to properly take into account the full line length for offset\n // comparison\n let lines = source.split(/(\\r?\\n)/);\n // Separate the lines and newline sequences into separate arrays for easier referencing\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count +=\n lines[i].length +\n ((newlineSequences[i] && newlineSequences[i].length) || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length)\n continue;\n const line = j + 1;\n res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`);\n const lineLength = lines[j].length;\n const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0;\n if (j === i) {\n // push underline\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(1, end > count ? lineLength - pad : end - start);\n res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));\n }\n else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + '^'.repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join('\\n');\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item)\n ? parseStringStyle(item)\n : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n }\n else if (isString(value)) {\n return value;\n }\n else if (isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*.*?\\*\\//gs;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText\n .replace(styleCommentRE, '')\n .split(listDelimiterRE)\n .forEach(item => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n let ret = '';\n if (!styles || isString(styles)) {\n return ret;\n }\n for (const key in styles) {\n const value = styles[key];\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n if (isString(value) || typeof value === 'number') {\n // only render valid values\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = '';\n if (isString(value)) {\n res = value;\n }\n else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + ' ';\n }\n }\n }\n else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + ' ';\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props)\n return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\n// These tag configs are shared between compiler-dom and runtime-dom, so they\n// https://developer.mozilla.org/en-US/docs/Web/HTML/Element\nconst HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +\n 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +\n 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +\n 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +\n 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +\n 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' +\n 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' +\n 'option,output,progress,select,textarea,details,dialog,menu,' +\n 'summary,template,blockquote,iframe,tfoot';\n// https://developer.mozilla.org/en-US/docs/Web/SVG/Element\nconst SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +\n 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +\n 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +\n 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +\n 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +\n 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +\n 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +\n 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' +\n 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +\n 'text,textPath,title,tspan,unknown,use,view';\nconst VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';\n/**\n * Compiler only.\n * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.\n */\nconst isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);\n/**\n * Compiler only.\n * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.\n */\nconst isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);\n/**\n * Compiler only.\n * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.\n */\nconst isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);\n\n/**\n * On the client we only need to offer special cases for boolean attributes that\n * have different names from their corresponding dom properties:\n * - itemscope -> N/A\n * - allowfullscreen -> allowFullscreen\n * - formnovalidate -> formNoValidate\n * - ismap -> isMap\n * - nomodule -> noModule\n * - novalidate -> noValidate\n * - readonly -> readOnly\n */\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs);\n/**\n * The full list is needed during SSR to produce the correct initial markup.\n */\nconst isBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs +\n `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,` +\n `loop,open,required,reversed,scoped,seamless,` +\n `checked,muted,multiple,selected`);\n/**\n * Boolean attributes should be included if the value is truthy or ''.\n * e.g. `