mirror of
https://github.com/imezx/Warp.git
synced 2025-04-24 07:00:03 +00:00
v1.0.5 & docs update
This commit is contained in:
parent
7846882bf5
commit
74db23f017
310 changed files with 28216 additions and 15442 deletions
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.luau linguist-language=Lua
|
45
.gitignore
vendored
45
.gitignore
vendored
|
@ -1,41 +1,4 @@
|
|||
# Compiled Lua sources
|
||||
luac.out
|
||||
|
||||
# luarocks build files
|
||||
*.src.rock
|
||||
*.zip
|
||||
*.tar.gz
|
||||
|
||||
# Object files
|
||||
*.o
|
||||
*.os
|
||||
*.ko
|
||||
*.obj
|
||||
*.elf
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Libraries
|
||||
*.lib
|
||||
*.a
|
||||
*.la
|
||||
*.lo
|
||||
*.def
|
||||
*.exp
|
||||
|
||||
# Shared objects (inc. Windows DLLs)
|
||||
*.dll
|
||||
*.so
|
||||
*.so.*
|
||||
*.dylib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
*.i*86
|
||||
*.x86_64
|
||||
*.hex
|
||||
|
||||
node_modules
|
||||
docs/.vitepress/dist
|
||||
docs/.vitepress/cache
|
||||
wally.lock
|
3
.luaurc
Normal file
3
.luaurc
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"languageMode": "strict"
|
||||
}
|
BIN
Warp.rbxm
BIN
Warp.rbxm
Binary file not shown.
|
@ -3,5 +3,5 @@
|
|||
|
||||
# To add a new tool, add an entry to this table.
|
||||
[tools]
|
||||
rojo = "rojo-rbx/rojo@7.3.0"
|
||||
rojo = "rojo-rbx/rojo@7.4.0"
|
||||
wally = "UpliftGames/wally@0.3.2"
|
||||
|
|
39
docs/.vitepress/cache/deps/_metadata.json
vendored
39
docs/.vitepress/cache/deps/_metadata.json
vendored
|
@ -1,31 +1,52 @@
|
|||
{
|
||||
"hash": "2742d842",
|
||||
"configHash": "4a960105",
|
||||
"lockfileHash": "e5af05f2",
|
||||
"browserHash": "f4abe41e",
|
||||
"hash": "64a640d4",
|
||||
"configHash": "3539395e",
|
||||
"lockfileHash": "16b933ee",
|
||||
"browserHash": "761a6f81",
|
||||
"optimized": {
|
||||
"vue": {
|
||||
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
|
||||
"file": "vue.js",
|
||||
"fileHash": "00d22783",
|
||||
"fileHash": "2232d95d",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vue/devtools-api": {
|
||||
"src": "../../../../node_modules/@vue/devtools-api/lib/esm/index.js",
|
||||
"file": "vitepress___@vue_devtools-api.js",
|
||||
"fileHash": "fbece760",
|
||||
"fileHash": "ea18bfc8",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vueuse/core": {
|
||||
"src": "../../../../node_modules/@vueuse/core/index.mjs",
|
||||
"file": "vitepress___@vueuse_core.js",
|
||||
"fileHash": "81778500",
|
||||
"fileHash": "1889f635",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vueuse/integrations/useFocusTrap": {
|
||||
"src": "../../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
|
||||
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
|
||||
"fileHash": "84f193d7",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > mark.js/src/vanilla.js": {
|
||||
"src": "../../../../node_modules/mark.js/src/vanilla.js",
|
||||
"file": "vitepress___mark__js_src_vanilla__js.js",
|
||||
"fileHash": "3dbcfe04",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > minisearch": {
|
||||
"src": "../../../../node_modules/minisearch/dist/es/index.js",
|
||||
"file": "vitepress___minisearch.js",
|
||||
"fileHash": "5c47da60",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-TL4KESHX": {
|
||||
"file": "chunk-TL4KESHX.js"
|
||||
"chunk-WFT6MZEP": {
|
||||
"file": "chunk-WFT6MZEP.js"
|
||||
},
|
||||
"chunk-3YS4HNIT": {
|
||||
"file": "chunk-3YS4HNIT.js"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -193,6 +193,13 @@ var isKnownHtmlAttr = makeMap(
|
|||
var isKnownSvgAttr = makeMap(
|
||||
`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
|
||||
);
|
||||
function isRenderableAttrValue(value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
const type = typeof value;
|
||||
return type === "string" || type === "number" || type === "boolean";
|
||||
}
|
||||
function looseCompareArrays(a, b) {
|
||||
if (a.length !== b.length)
|
||||
return false;
|
||||
|
@ -378,19 +385,18 @@ var ReactiveEffect = class {
|
|||
this.scheduler = scheduler;
|
||||
this.active = true;
|
||||
this.deps = [];
|
||||
this._dirtyLevel = 3;
|
||||
this._dirtyLevel = 2;
|
||||
this._trackId = 0;
|
||||
this._runnings = 0;
|
||||
this._queryings = 0;
|
||||
this._shouldSchedule = false;
|
||||
this._depsLength = 0;
|
||||
recordEffectScope(this, scope);
|
||||
}
|
||||
get dirty() {
|
||||
if (this._dirtyLevel === 1) {
|
||||
this._dirtyLevel = 0;
|
||||
this._queryings++;
|
||||
pauseTracking();
|
||||
for (const dep of this.deps) {
|
||||
for (let i = 0; i < this._depsLength; i++) {
|
||||
const dep = this.deps[i];
|
||||
if (dep.computed) {
|
||||
triggerComputed(dep.computed);
|
||||
if (this._dirtyLevel >= 2) {
|
||||
|
@ -398,13 +404,15 @@ var ReactiveEffect = class {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this._dirtyLevel < 2) {
|
||||
this._dirtyLevel = 0;
|
||||
}
|
||||
resetTracking();
|
||||
this._queryings--;
|
||||
}
|
||||
return this._dirtyLevel >= 2;
|
||||
}
|
||||
set dirty(v) {
|
||||
this._dirtyLevel = v ? 3 : 0;
|
||||
this._dirtyLevel = v ? 2 : 0;
|
||||
}
|
||||
run() {
|
||||
this._dirtyLevel = 0;
|
||||
|
@ -527,25 +535,29 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|||
var _a;
|
||||
pauseScheduling();
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (!effect2.allowRecurse && effect2._runnings) {
|
||||
continue;
|
||||
}
|
||||
if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
|
||||
if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) {
|
||||
const lastDirtyLevel = effect2._dirtyLevel;
|
||||
effect2._dirtyLevel = dirtyLevel;
|
||||
if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
|
||||
if (lastDirtyLevel === 0) {
|
||||
effect2._shouldSchedule = true;
|
||||
if (true) {
|
||||
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
||||
}
|
||||
effect2.trigger();
|
||||
if (effect2.scheduler) {
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scheduleEffects(dep);
|
||||
resetScheduling();
|
||||
}
|
||||
function scheduleEffects(dep) {
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
||||
effect2._shouldSchedule = false;
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
var createDep = (cleanup, computed3) => {
|
||||
const dep = /* @__PURE__ */ new Map();
|
||||
dep.cleanup = cleanup;
|
||||
|
@ -626,7 +638,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|||
if (dep) {
|
||||
triggerEffects(
|
||||
dep,
|
||||
3,
|
||||
2,
|
||||
true ? {
|
||||
target,
|
||||
type,
|
||||
|
@ -1221,7 +1233,8 @@ var ComputedRefImpl = class {
|
|||
this["__v_isReadonly"] = false;
|
||||
this.effect = new ReactiveEffect(
|
||||
() => getter(this._value),
|
||||
() => triggerRefValue(this, 1)
|
||||
() => triggerRefValue(this, 1),
|
||||
() => this.dep && scheduleEffects(this.dep)
|
||||
);
|
||||
this.effect.computed = this;
|
||||
this.effect.active = this._cacheable = !isSSR;
|
||||
|
@ -1229,12 +1242,15 @@ var ComputedRefImpl = class {
|
|||
}
|
||||
get value() {
|
||||
const self2 = toRaw(this);
|
||||
trackRefValue(self2);
|
||||
if (!self2._cacheable || self2.effect.dirty) {
|
||||
if (hasChanged(self2._value, self2._value = self2.effect.run())) {
|
||||
triggerRefValue(self2, 2);
|
||||
}
|
||||
}
|
||||
trackRefValue(self2);
|
||||
if (self2.effect._dirtyLevel >= 1) {
|
||||
triggerRefValue(self2, 1);
|
||||
}
|
||||
return self2._value;
|
||||
}
|
||||
set value(newValue) {
|
||||
|
@ -1286,7 +1302,7 @@ function trackRefValue(ref2) {
|
|||
);
|
||||
}
|
||||
}
|
||||
function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
|
||||
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
||||
ref2 = toRaw(ref2);
|
||||
const dep = ref2.dep;
|
||||
if (dep) {
|
||||
|
@ -1335,12 +1351,12 @@ var RefImpl = class {
|
|||
if (hasChanged(newVal, this._rawValue)) {
|
||||
this._rawValue = newVal;
|
||||
this._value = useDirectValue ? newVal : toReactive(newVal);
|
||||
triggerRefValue(this, 3, newVal);
|
||||
triggerRefValue(this, 2, newVal);
|
||||
}
|
||||
}
|
||||
};
|
||||
function triggerRef(ref2) {
|
||||
triggerRefValue(ref2, 3, true ? ref2.value : void 0);
|
||||
triggerRefValue(ref2, 2, true ? ref2.value : void 0);
|
||||
}
|
||||
function unref(ref2) {
|
||||
return isRef(ref2) ? ref2.value : ref2;
|
||||
|
@ -1658,7 +1674,7 @@ function handleError(err, instance, type, throwInDev = true) {
|
|||
if (instance) {
|
||||
let cur = instance.parent;
|
||||
const exposedInstance = instance.proxy;
|
||||
const errorInfo = true ? ErrorTypeStrings$1[type] : `https://vuejs.org/errors/#runtime-${type}`;
|
||||
const errorInfo = true ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
|
||||
while (cur) {
|
||||
const errorCapturedHooks = cur.ec;
|
||||
if (errorCapturedHooks) {
|
||||
|
@ -1790,7 +1806,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|||
}
|
||||
function flushPostFlushCbs(seen) {
|
||||
if (pendingPostFlushCbs.length) {
|
||||
const deduped = [...new Set(pendingPostFlushCbs)];
|
||||
const deduped = [...new Set(pendingPostFlushCbs)].sort(
|
||||
(a, b) => getId(a) - getId(b)
|
||||
);
|
||||
pendingPostFlushCbs.length = 0;
|
||||
if (activePostFlushCbs) {
|
||||
activePostFlushCbs.push(...deduped);
|
||||
|
@ -1800,7 +1818,6 @@ function flushPostFlushCbs(seen) {
|
|||
if (true) {
|
||||
seen = seen || /* @__PURE__ */ new Map();
|
||||
}
|
||||
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
||||
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
||||
if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
|
||||
continue;
|
||||
|
@ -2426,9 +2443,11 @@ function renderComponentRoot(instance) {
|
|||
var getChildRoot = (vnode) => {
|
||||
const rawChildren = vnode.children;
|
||||
const dynamicChildren = vnode.dynamicChildren;
|
||||
const childRoot = filterSingleRoot(rawChildren);
|
||||
const childRoot = filterSingleRoot(rawChildren, false);
|
||||
if (!childRoot) {
|
||||
return [vnode, void 0];
|
||||
} else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
|
||||
return getChildRoot(childRoot);
|
||||
}
|
||||
const index = rawChildren.indexOf(childRoot);
|
||||
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
|
||||
|
@ -2444,7 +2463,7 @@ var getChildRoot = (vnode) => {
|
|||
};
|
||||
return [normalizeVNode(childRoot), setRoot];
|
||||
};
|
||||
function filterSingleRoot(children) {
|
||||
function filterSingleRoot(children, recurse = true) {
|
||||
let singleRoot;
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const child = children[i];
|
||||
|
@ -2454,6 +2473,9 @@ function filterSingleRoot(children) {
|
|||
return;
|
||||
} else {
|
||||
singleRoot = child;
|
||||
if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
|
||||
return filterSingleRoot(singleRoot.children);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -2544,8 +2566,6 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|||
return false;
|
||||
}
|
||||
function updateHOCHostEl({ vnode, parent }, el) {
|
||||
if (!el)
|
||||
return;
|
||||
while (parent) {
|
||||
const root = parent.subTree;
|
||||
if (root.suspense && root.suspense.activeBranch === vnode) {
|
||||
|
@ -2635,6 +2655,10 @@ var SuspenseImpl = {
|
|||
rendererInternals
|
||||
);
|
||||
} else {
|
||||
if (parentSuspense && parentSuspense.deps > 0) {
|
||||
n2.suspense = n1.suspense;
|
||||
return;
|
||||
}
|
||||
patchSuspense(
|
||||
n1,
|
||||
n2,
|
||||
|
@ -2893,6 +2917,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
if (true) {
|
||||
assertNumber(timeout, `Suspense timeout`);
|
||||
}
|
||||
const initialAnchor = anchor;
|
||||
const suspense = {
|
||||
vnode,
|
||||
parent: parentSuspense,
|
||||
|
@ -2900,7 +2925,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
namespace,
|
||||
container,
|
||||
hiddenContainer,
|
||||
anchor,
|
||||
deps: 0,
|
||||
pendingId: suspenseId++,
|
||||
timeout: typeof timeout === "number" ? timeout : -1,
|
||||
|
@ -2943,20 +2967,21 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
move(
|
||||
pendingBranch,
|
||||
container2,
|
||||
next(activeBranch),
|
||||
anchor === initialAnchor ? next(activeBranch) : anchor,
|
||||
0
|
||||
);
|
||||
queuePostFlushCb(effects);
|
||||
}
|
||||
};
|
||||
}
|
||||
let { anchor: anchor2 } = suspense;
|
||||
if (activeBranch) {
|
||||
anchor2 = next(activeBranch);
|
||||
if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
|
||||
anchor = next(activeBranch);
|
||||
}
|
||||
unmount(activeBranch, parentComponent2, suspense, true);
|
||||
}
|
||||
if (!delayEnter) {
|
||||
move(pendingBranch, container2, anchor2, 0);
|
||||
move(pendingBranch, container2, anchor, 0);
|
||||
}
|
||||
}
|
||||
setActiveBranch(suspense, pendingBranch);
|
||||
|
@ -3183,7 +3208,12 @@ function queueEffectWithSuspense(fn, suspense) {
|
|||
function setActiveBranch(suspense, branch) {
|
||||
suspense.activeBranch = branch;
|
||||
const { vnode, parentComponent } = suspense;
|
||||
const el = vnode.el = branch.el;
|
||||
let el = branch.el;
|
||||
while (!el && branch.component) {
|
||||
branch = branch.component.subTree;
|
||||
el = branch.el;
|
||||
}
|
||||
vnode.el = el;
|
||||
if (parentComponent && parentComponent.subTree === vnode) {
|
||||
parentComponent.vnode.el = el;
|
||||
updateHOCHostEl(parentComponent, el);
|
||||
|
@ -3428,14 +3458,9 @@ function instanceWatch(source, value, options) {
|
|||
cb = value.handler;
|
||||
options = value;
|
||||
}
|
||||
const cur = currentInstance;
|
||||
setCurrentInstance(this);
|
||||
const reset = setCurrentInstance(this);
|
||||
const res = doWatch(getter, cb.bind(publicThis), options);
|
||||
if (cur) {
|
||||
setCurrentInstance(cur);
|
||||
} else {
|
||||
unsetCurrentInstance();
|
||||
}
|
||||
reset();
|
||||
return res;
|
||||
}
|
||||
function createPathGetter(ctx, path) {
|
||||
|
@ -3486,12 +3511,11 @@ function validateDirectiveName(name) {
|
|||
}
|
||||
}
|
||||
function withDirectives(vnode, directives) {
|
||||
const internalInstance = currentRenderingInstance;
|
||||
if (internalInstance === null) {
|
||||
if (currentRenderingInstance === null) {
|
||||
warn$1(`withDirectives can only be used inside render functions.`);
|
||||
return vnode;
|
||||
}
|
||||
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
|
||||
const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;
|
||||
const bindings = vnode.dirs || (vnode.dirs = []);
|
||||
for (let i = 0; i < directives.length; i++) {
|
||||
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
||||
|
@ -4270,9 +4294,9 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|||
return;
|
||||
}
|
||||
pauseTracking();
|
||||
setCurrentInstance(target);
|
||||
const reset = setCurrentInstance(target);
|
||||
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
resetTracking();
|
||||
return res;
|
||||
});
|
||||
|
@ -4719,58 +4743,6 @@ function useSlots() {
|
|||
function useAttrs() {
|
||||
return getContext().attrs;
|
||||
}
|
||||
function useModel(props, name, options = EMPTY_OBJ) {
|
||||
const i = getCurrentInstance();
|
||||
if (!i) {
|
||||
warn$1(`useModel() called without active instance.`);
|
||||
return ref();
|
||||
}
|
||||
if (!i.propsOptions[0][name]) {
|
||||
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
||||
return ref();
|
||||
}
|
||||
const camelizedName = camelize(name);
|
||||
const hyphenatedName = hyphenate(name);
|
||||
const res = customRef((track2, trigger2) => {
|
||||
let localValue;
|
||||
watchSyncEffect(() => {
|
||||
const propValue = props[name];
|
||||
if (hasChanged(localValue, propValue)) {
|
||||
localValue = propValue;
|
||||
trigger2();
|
||||
}
|
||||
});
|
||||
return {
|
||||
get() {
|
||||
track2();
|
||||
return options.get ? options.get(localValue) : localValue;
|
||||
},
|
||||
set(value) {
|
||||
const rawProps = i.vnode.props;
|
||||
if (!(rawProps && // check if parent has passed v-model
|
||||
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
||||
localValue = value;
|
||||
trigger2();
|
||||
}
|
||||
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
||||
}
|
||||
};
|
||||
});
|
||||
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
||||
res[Symbol.iterator] = () => {
|
||||
let i2 = 0;
|
||||
return {
|
||||
next() {
|
||||
if (i2 < 2) {
|
||||
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
||||
} else {
|
||||
return { done: true };
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
return res;
|
||||
}
|
||||
function getContext() {
|
||||
const i = getCurrentInstance();
|
||||
if (!i) {
|
||||
|
@ -5651,12 +5623,12 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|||
if (key in propsDefaults) {
|
||||
value = propsDefaults[key];
|
||||
} else {
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
value = propsDefaults[key] = defaultValue.call(
|
||||
null,
|
||||
props
|
||||
);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
} else {
|
||||
value = defaultValue;
|
||||
|
@ -5888,7 +5860,7 @@ var normalizeSlot = (key, rawSlot, ctx) => {
|
|||
return rawSlot;
|
||||
}
|
||||
const normalized = withCtx((...args) => {
|
||||
if (currentInstance) {
|
||||
if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
|
||||
warn$1(
|
||||
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
|
||||
);
|
||||
|
@ -6024,9 +5996,10 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|||
} else {
|
||||
const _isString = isString(ref2);
|
||||
const _isRef = isRef(ref2);
|
||||
const isVFor = rawRef.f;
|
||||
if (_isString || _isRef) {
|
||||
const doSet = () => {
|
||||
if (rawRef.f) {
|
||||
if (isVFor) {
|
||||
const existing = _isString ? hasOwn(setupState, ref2) ? setupState[ref2] : refs[ref2] : ref2.value;
|
||||
if (isUnmount) {
|
||||
isArray(existing) && remove(existing, refValue);
|
||||
|
@ -6059,11 +6032,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|||
warn$1("Invalid template ref type:", ref2, `(${typeof ref2})`);
|
||||
}
|
||||
};
|
||||
if (value) {
|
||||
if (isUnmount || isVFor) {
|
||||
doSet();
|
||||
} else {
|
||||
doSet.id = -1;
|
||||
queuePostRenderEffect(doSet, parentSuspense);
|
||||
} else {
|
||||
doSet();
|
||||
}
|
||||
} else if (true) {
|
||||
warn$1("Invalid template ref type:", ref2, `(${typeof ref2})`);
|
||||
|
@ -6361,7 +6334,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|||
if (props) {
|
||||
if (true) {
|
||||
for (const key in props) {
|
||||
if (propHasMismatch(el, key, props[key])) {
|
||||
if (propHasMismatch(el, key, props[key], vnode)) {
|
||||
hasMismatch = true;
|
||||
}
|
||||
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
||||
|
@ -6546,26 +6519,49 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|||
};
|
||||
return [hydrate2, hydrateNode];
|
||||
}
|
||||
function propHasMismatch(el, key, clientValue) {
|
||||
function propHasMismatch(el, key, clientValue, vnode) {
|
||||
let mismatchType;
|
||||
let mismatchKey;
|
||||
let actual;
|
||||
let expected;
|
||||
if (key === "class") {
|
||||
actual = toClassSet(el.getAttribute("class") || "");
|
||||
expected = toClassSet(normalizeClass(clientValue));
|
||||
if (!isSetEqual(actual, expected)) {
|
||||
actual = el.getAttribute("class");
|
||||
expected = normalizeClass(clientValue);
|
||||
if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
|
||||
mismatchType = mismatchKey = `class`;
|
||||
}
|
||||
} else if (key === "style") {
|
||||
actual = el.getAttribute("style");
|
||||
expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
|
||||
if (actual !== expected) {
|
||||
const actualMap = toStyleMap(actual);
|
||||
const expectedMap = toStyleMap(expected);
|
||||
if (vnode.dirs) {
|
||||
for (const { dir, value } of vnode.dirs) {
|
||||
if (dir.name === "show" && !value) {
|
||||
expectedMap.set("display", "none");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isMapEqual(actualMap, expectedMap)) {
|
||||
mismatchType = mismatchKey = "style";
|
||||
}
|
||||
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
||||
actual = el.hasAttribute(key) && el.getAttribute(key);
|
||||
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? false : String(clientValue);
|
||||
if (isBooleanAttr(key)) {
|
||||
actual = el.hasAttribute(key);
|
||||
expected = includeBooleanAttr(clientValue);
|
||||
} else if (clientValue == null) {
|
||||
actual = el.hasAttribute(key);
|
||||
expected = false;
|
||||
} else {
|
||||
if (el.hasAttribute(key)) {
|
||||
actual = el.getAttribute(key);
|
||||
} else if (key === "value" && el.tagName === "TEXTAREA") {
|
||||
actual = el.value;
|
||||
} else {
|
||||
actual = false;
|
||||
}
|
||||
expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
|
||||
}
|
||||
if (actual !== expected) {
|
||||
mismatchType = `attribute`;
|
||||
mismatchKey = key;
|
||||
|
@ -6573,15 +6569,15 @@ function propHasMismatch(el, key, clientValue) {
|
|||
}
|
||||
if (mismatchType) {
|
||||
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
||||
warn$1(
|
||||
`Hydration ${mismatchType} mismatch on`,
|
||||
el,
|
||||
`
|
||||
const preSegment = `Hydration ${mismatchType} mismatch on`;
|
||||
const postSegment = `
|
||||
- rendered on server: ${format(actual)}
|
||||
- expected on client: ${format(expected)}
|
||||
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
||||
You should fix the source of the mismatch.`
|
||||
);
|
||||
You should fix the source of the mismatch.`;
|
||||
{
|
||||
warn$1(preSegment, el, postSegment);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -6600,6 +6596,29 @@ function isSetEqual(a, b) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
function toStyleMap(str) {
|
||||
const styleMap = /* @__PURE__ */ new Map();
|
||||
for (const item of str.split(";")) {
|
||||
let [key, value] = item.split(":");
|
||||
key = key == null ? void 0 : key.trim();
|
||||
value = value == null ? void 0 : value.trim();
|
||||
if (key && value) {
|
||||
styleMap.set(key, value);
|
||||
}
|
||||
}
|
||||
return styleMap;
|
||||
}
|
||||
function isMapEqual(a, b) {
|
||||
if (a.size !== b.size) {
|
||||
return false;
|
||||
}
|
||||
for (const [key, value] of a) {
|
||||
if (value !== b.get(key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
var supported;
|
||||
var perf;
|
||||
function startMeasure(instance, type) {
|
||||
|
@ -7212,7 +7231,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
hostInsert(fragmentStartAnchor, container, anchor);
|
||||
hostInsert(fragmentEndAnchor, container, anchor);
|
||||
mountChildren(
|
||||
n2.children,
|
||||
// #10007
|
||||
// such fragment like `<></>` will be compiled into
|
||||
// a fragment which doesn't have a children.
|
||||
// In this case fallback to an empty array
|
||||
n2.children || [],
|
||||
container,
|
||||
fragmentEndAnchor,
|
||||
parentComponent,
|
||||
|
@ -8059,6 +8082,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
}
|
||||
return hostNextSibling(vnode.anchor || vnode.el);
|
||||
};
|
||||
let isFlushing2 = false;
|
||||
const render2 = (vnode, container, namespace) => {
|
||||
if (vnode == null) {
|
||||
if (container._vnode) {
|
||||
|
@ -8075,8 +8099,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
namespace
|
||||
);
|
||||
}
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
if (!isFlushing2) {
|
||||
isFlushing2 = true;
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
isFlushing2 = false;
|
||||
}
|
||||
container._vnode = vnode;
|
||||
};
|
||||
const internals = {
|
||||
|
@ -8945,8 +8973,13 @@ var setInSSRSetupState;
|
|||
);
|
||||
}
|
||||
var setCurrentInstance = (instance) => {
|
||||
const prev = currentInstance;
|
||||
internalSetCurrentInstance(instance);
|
||||
instance.scope.on();
|
||||
return () => {
|
||||
instance.scope.off();
|
||||
internalSetCurrentInstance(prev);
|
||||
};
|
||||
};
|
||||
var unsetCurrentInstance = () => {
|
||||
currentInstance && currentInstance.scope.off();
|
||||
|
@ -9008,7 +9041,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|||
const { setup } = Component;
|
||||
if (setup) {
|
||||
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
pauseTracking();
|
||||
const setupResult = callWithErrorHandling(
|
||||
setup,
|
||||
|
@ -9020,7 +9053,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|||
]
|
||||
);
|
||||
resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
if (isPromise(setupResult)) {
|
||||
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
||||
if (isSSR) {
|
||||
|
@ -9116,13 +9149,13 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|||
}
|
||||
}
|
||||
if (__VUE_OPTIONS_API__ && true) {
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
pauseTracking();
|
||||
try {
|
||||
applyOptions(instance);
|
||||
} finally {
|
||||
resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
}
|
||||
if (!Component.render && instance.render === NOOP && !isSSR) {
|
||||
|
@ -9265,6 +9298,58 @@ function isClassComponent(value) {
|
|||
var computed2 = (getterOrOptions, debugOptions) => {
|
||||
return computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
||||
};
|
||||
function useModel(props, name, options = EMPTY_OBJ) {
|
||||
const i = getCurrentInstance();
|
||||
if (!i) {
|
||||
warn$1(`useModel() called without active instance.`);
|
||||
return ref();
|
||||
}
|
||||
if (!i.propsOptions[0][name]) {
|
||||
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
||||
return ref();
|
||||
}
|
||||
const camelizedName = camelize(name);
|
||||
const hyphenatedName = hyphenate(name);
|
||||
const res = customRef((track2, trigger2) => {
|
||||
let localValue;
|
||||
watchSyncEffect(() => {
|
||||
const propValue = props[name];
|
||||
if (hasChanged(localValue, propValue)) {
|
||||
localValue = propValue;
|
||||
trigger2();
|
||||
}
|
||||
});
|
||||
return {
|
||||
get() {
|
||||
track2();
|
||||
return options.get ? options.get(localValue) : localValue;
|
||||
},
|
||||
set(value) {
|
||||
const rawProps = i.vnode.props;
|
||||
if (!(rawProps && // check if parent has passed v-model
|
||||
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
||||
localValue = value;
|
||||
trigger2();
|
||||
}
|
||||
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
||||
}
|
||||
};
|
||||
});
|
||||
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
||||
res[Symbol.iterator] = () => {
|
||||
let i2 = 0;
|
||||
return {
|
||||
next() {
|
||||
if (i2 < 2) {
|
||||
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
||||
} else {
|
||||
return { done: true };
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
return res;
|
||||
}
|
||||
function h(type, propsOrChildren, children) {
|
||||
const l = arguments.length;
|
||||
if (l === 2) {
|
||||
|
@ -9487,7 +9572,7 @@ function isMemoSame(cached, memo) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
var version = "3.4.5";
|
||||
var version = "3.4.15";
|
||||
var warn2 = true ? warn$1 : NOOP;
|
||||
var ErrorTypeStrings = ErrorTypeStrings$1;
|
||||
var devtools = true ? devtools$1 : void 0;
|
||||
|
@ -9890,6 +9975,9 @@ var vShow = {
|
|||
setDisplay(el, value);
|
||||
}
|
||||
};
|
||||
if (true) {
|
||||
vShow.name = "show";
|
||||
}
|
||||
function setDisplay(el, value) {
|
||||
el.style.display = value ? el[vShowOldKey] : "none";
|
||||
}
|
||||
|
@ -9964,6 +10052,7 @@ function setVarsOnNode(el, vars) {
|
|||
}
|
||||
function patchStyle(el, prev, next) {
|
||||
const style = el.style;
|
||||
const currentDisplay = style.display;
|
||||
const isCssString = isString(next);
|
||||
if (next && !isCssString) {
|
||||
if (prev && !isString(prev)) {
|
||||
|
@ -9977,7 +10066,6 @@ function patchStyle(el, prev, next) {
|
|||
setStyle(style, key, next[key]);
|
||||
}
|
||||
} else {
|
||||
const currentDisplay = style.display;
|
||||
if (isCssString) {
|
||||
if (prev !== next) {
|
||||
const cssVarText = style[CSS_VAR_TEXT];
|
||||
|
@ -9989,9 +10077,9 @@ function patchStyle(el, prev, next) {
|
|||
} else if (prev) {
|
||||
el.removeAttribute("style");
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
var semicolonRE = /[^\\];\s*$/;
|
||||
|
@ -10744,35 +10832,52 @@ var vModelSelect = {
|
|||
el[assignKey](
|
||||
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
||||
);
|
||||
el._assigning = true;
|
||||
nextTick(() => {
|
||||
el._assigning = false;
|
||||
});
|
||||
});
|
||||
el[assignKey] = getModelAssigner(vnode);
|
||||
},
|
||||
// set value in mounted & updated because <select> relies on its children
|
||||
// <option>s.
|
||||
mounted(el, { value }) {
|
||||
setSelected(el, value);
|
||||
mounted(el, { value, oldValue, modifiers: { number } }) {
|
||||
setSelected(el, value, oldValue, number);
|
||||
},
|
||||
beforeUpdate(el, _binding, vnode) {
|
||||
el[assignKey] = getModelAssigner(vnode);
|
||||
},
|
||||
updated(el, { value }) {
|
||||
setSelected(el, value);
|
||||
updated(el, { value, oldValue, modifiers: { number } }) {
|
||||
if (!el._assigning) {
|
||||
setSelected(el, value, oldValue, number);
|
||||
}
|
||||
}
|
||||
};
|
||||
function setSelected(el, value) {
|
||||
function setSelected(el, value, oldValue, number) {
|
||||
const isMultiple = el.multiple;
|
||||
if (isMultiple && !isArray(value) && !isSet(value)) {
|
||||
const isArrayValue = isArray(value);
|
||||
if (isMultiple && !isArrayValue && !isSet(value)) {
|
||||
warn2(
|
||||
`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (isArrayValue && looseEqual(value, oldValue)) {
|
||||
return;
|
||||
}
|
||||
for (let i = 0, l = el.options.length; i < l; i++) {
|
||||
const option = el.options[i];
|
||||
const optionValue = getValue(option);
|
||||
if (isMultiple) {
|
||||
if (isArray(value)) {
|
||||
option.selected = looseIndexOf(value, optionValue) > -1;
|
||||
if (isArrayValue) {
|
||||
const optionType = typeof optionValue;
|
||||
if (optionType === "string" || optionType === "number") {
|
||||
option.selected = value.includes(
|
||||
number ? looseToNumber(optionValue) : optionValue
|
||||
);
|
||||
} else {
|
||||
option.selected = looseIndexOf(value, optionValue) > -1;
|
||||
}
|
||||
} else {
|
||||
option.selected = value.has(optionValue);
|
||||
}
|
||||
|
@ -11152,7 +11257,6 @@ export {
|
|||
withDefaults,
|
||||
useSlots,
|
||||
useAttrs,
|
||||
useModel,
|
||||
mergeDefaults,
|
||||
mergeModels,
|
||||
createPropsRestProxy,
|
||||
|
@ -11185,6 +11289,7 @@ export {
|
|||
registerRuntimeCompiler,
|
||||
isRuntimeOnly,
|
||||
computed2 as computed,
|
||||
useModel,
|
||||
h,
|
||||
initCustomFormatter,
|
||||
withMemo,
|
||||
|
@ -11222,10 +11327,41 @@ export {
|
|||
};
|
||||
/*! Bundled license information:
|
||||
|
||||
@vue/shared/dist/shared.esm-bundler.js:
|
||||
(**
|
||||
* @vue/shared v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**)
|
||||
|
||||
@vue/reactivity/dist/reactivity.esm-bundler.js:
|
||||
(**
|
||||
* @vue/reactivity v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**)
|
||||
|
||||
@vue/runtime-core/dist/runtime-core.esm-bundler.js:
|
||||
(**
|
||||
* @vue/runtime-core v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**)
|
||||
(*! #__NO_SIDE_EFFECTS__ *)
|
||||
|
||||
@vue/runtime-dom/dist/runtime-dom.esm-bundler.js:
|
||||
(**
|
||||
* @vue/runtime-dom v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**)
|
||||
(*! #__NO_SIDE_EFFECTS__ *)
|
||||
|
||||
vue/dist/vue.runtime.esm-bundler.js:
|
||||
(**
|
||||
* vue v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**)
|
||||
*/
|
||||
//# sourceMappingURL=chunk-TL4KESHX.js.map
|
||||
//# sourceMappingURL=chunk-3YS4HNIT.js.map
|
7
docs/.vitepress/cache/deps/chunk-3YS4HNIT.js.map
vendored
Normal file
7
docs/.vitepress/cache/deps/chunk-3YS4HNIT.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
8965
docs/.vitepress/cache/deps/chunk-WFT6MZEP.js
vendored
Normal file
8965
docs/.vitepress/cache/deps/chunk-WFT6MZEP.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
7
docs/.vitepress/cache/deps/chunk-WFT6MZEP.js.map
vendored
Normal file
7
docs/.vitepress/cache/deps/chunk-WFT6MZEP.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
8964
docs/.vitepress/cache/deps/vitepress___@vueuse_core.js
vendored
8964
docs/.vitepress/cache/deps/vitepress___@vueuse_core.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
1093
docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js
vendored
Normal file
1093
docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
7
docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js.map
vendored
Normal file
7
docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1665
docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js
vendored
Normal file
1665
docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
7
docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js.map
vendored
Normal file
7
docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1856
docs/.vitepress/cache/deps/vitepress___minisearch.js
vendored
Normal file
1856
docs/.vitepress/cache/deps/vitepress___minisearch.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
7
docs/.vitepress/cache/deps/vitepress___minisearch.js.map
vendored
Normal file
7
docs/.vitepress/cache/deps/vitepress___minisearch.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
docs/.vitepress/cache/deps/vue.js
vendored
2
docs/.vitepress/cache/deps/vue.js
vendored
|
@ -158,7 +158,7 @@ import {
|
|||
withMemo,
|
||||
withModifiers,
|
||||
withScopeId
|
||||
} from "./chunk-TL4KESHX.js";
|
||||
} from "./chunk-3YS4HNIT.js";
|
||||
export {
|
||||
BaseTransition,
|
||||
BaseTransitionPropsValidators,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { defineConfig } from 'vitepress'
|
||||
import { defineConfig } from 'vitepress';
|
||||
|
||||
function nav() {
|
||||
return [
|
||||
|
@ -22,9 +22,25 @@ function side() {
|
|||
text: 'API Reference',
|
||||
items: [
|
||||
{ text: 'Warp', link: '/api/1.0/warp' },
|
||||
{ text: 'Server', link: '/api/1.0/server' },
|
||||
{ text: 'Client', link: '/api/1.0/client' },
|
||||
{ text: 'RateLimit', link: '/api/1.0/ratelimit' },
|
||||
{
|
||||
text: 'Event',
|
||||
items: [
|
||||
{ text: 'Server', link: '/api/1.0/server' },
|
||||
{ text: 'Client', link: '/api/1.0/client' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Feature',
|
||||
items: [
|
||||
{ text: 'Rate Limit', link: '/api/1.0/ratelimit' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Utilities',
|
||||
items: [
|
||||
{ text: 'Signal', link: '/api/1.0/signal' },
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -59,6 +75,14 @@ export default defineConfig({
|
|||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/imezx/Warp' },
|
||||
{ icon: 'discord', link: 'https://discord.gg/qnSfEZ6bZK' },
|
||||
]
|
||||
}
|
||||
],
|
||||
search: {
|
||||
provider: 'local',
|
||||
// options: {
|
||||
// appId: 'RNOWUVQEKL',
|
||||
// apiKey: '97e23a3258a6df1080abaf10bd208302',
|
||||
// indexName: 'warp',
|
||||
// }
|
||||
},
|
||||
},
|
||||
})
|
|
@ -1,4 +1,4 @@
|
|||
# Client
|
||||
# Client <Badge type="tip" text="event" />
|
||||
|
||||
For Client-sided
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Rate Limit
|
||||
# Rate Limit <Badge type="tip" text="feature" />
|
||||
|
||||
Ratelimit is one of most useful feature.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Server
|
||||
# Server <Badge type="tip" text="event" />
|
||||
|
||||
For Server-sided
|
||||
|
||||
|
@ -11,8 +11,8 @@ Create new Warp event.
|
|||
(
|
||||
Identifier: string,
|
||||
rateLimit: {
|
||||
maxEntrance: number,
|
||||
interval: number,
|
||||
maxEntrance: number?,
|
||||
interval: number?,
|
||||
}?
|
||||
)
|
||||
```
|
||||
|
|
201
docs/api/1.0/signal.md
Normal file
201
docs/api/1.0/signal.md
Normal file
|
@ -0,0 +1,201 @@
|
|||
# Signal <Badge type="tip" text="utilities" />
|
||||
|
||||
A alternative of BindableEvent.
|
||||
|
||||
## `.Signal`
|
||||
|
||||
Create new Signal.
|
||||
|
||||
::: code-group
|
||||
```lua [Variable]
|
||||
(
|
||||
Identifier: string
|
||||
)
|
||||
```
|
||||
|
||||
```lua [Example]
|
||||
local Signal1 = Warp.Signal("Signal1")
|
||||
```
|
||||
:::
|
||||
|
||||
## `.fromSignalArray`
|
||||
|
||||
Create new Signal.
|
||||
|
||||
::: code-group
|
||||
```lua [Variable]
|
||||
(
|
||||
{ string }
|
||||
)
|
||||
```
|
||||
|
||||
```lua [Example]
|
||||
local Signals = Warp.fromSignalArray({"Signal1", "Signal2"})
|
||||
Signals.Signal1:Connect(function(...) end)
|
||||
Signals.Signal2:Connect(function(...) end)
|
||||
```
|
||||
:::
|
||||
|
||||
## `:Connect`
|
||||
|
||||
::: code-group
|
||||
```lua [Variable]
|
||||
(
|
||||
callback: (...any) -> ()
|
||||
)
|
||||
```
|
||||
|
||||
```lua [Example]
|
||||
Signal1:Connect(function(...)
|
||||
print(...)
|
||||
end)
|
||||
```
|
||||
:::
|
||||
|
||||
## `:Once`
|
||||
|
||||
This function likely `:Connect` but it disconnect the signal once it fired.
|
||||
|
||||
::: code-group
|
||||
```lua [Variable]
|
||||
(
|
||||
callback: (...any) -> ()
|
||||
)
|
||||
```
|
||||
|
||||
```lua [Example]
|
||||
Signal1:Once(function(...)
|
||||
print(...)
|
||||
end)
|
||||
```
|
||||
:::
|
||||
|
||||
## `:Disconnect`
|
||||
|
||||
Disconnect the signal connection.
|
||||
|
||||
::: code-group
|
||||
```lua [Variable]
|
||||
(
|
||||
key: string
|
||||
)
|
||||
```
|
||||
|
||||
```lua [Example]
|
||||
local connection = Signal1:Connect(function(...) end) -- store the key
|
||||
|
||||
Signal1:Disconnect(connection)
|
||||
```
|
||||
:::
|
||||
|
||||
::: warning
|
||||
This requires `key` to disconnect a signal connection.
|
||||
:::
|
||||
|
||||
## `:DisconnectAll`
|
||||
|
||||
Disconnect All signal connections.
|
||||
|
||||
```lua [Example]
|
||||
Signal1:DisconnectAll()
|
||||
```
|
||||
|
||||
## `:Fire`
|
||||
|
||||
Fire the signal.
|
||||
|
||||
::: code-group
|
||||
```lua [Variable]
|
||||
(
|
||||
...: any
|
||||
)
|
||||
```
|
||||
|
||||
```lua [Example]
|
||||
Signal1:Fire("Hello World!")
|
||||
```
|
||||
:::
|
||||
|
||||
::: warning
|
||||
This uses `pcall`, which means it never error (safe-mode, sacrificed debugging), But gains performance here `(upto 5x faster)`.
|
||||
:::
|
||||
|
||||
## `:FireTo`
|
||||
|
||||
Fire to other signal, this also use `:Fire`.
|
||||
|
||||
::: code-group
|
||||
```lua [Variable]
|
||||
(
|
||||
signal: string,
|
||||
...: any
|
||||
)
|
||||
```
|
||||
|
||||
```lua [Example]
|
||||
Signals.Signal1:FireTo("Signal2", "Hello World!")
|
||||
```
|
||||
:::
|
||||
|
||||
::: warning
|
||||
This requires `key`.
|
||||
:::
|
||||
|
||||
## `:Invoke` <Badge type="warning" text="yield" />
|
||||
|
||||
::: code-group
|
||||
```lua [Variable]
|
||||
(
|
||||
key: string,
|
||||
...: any
|
||||
) -> (...any)
|
||||
```
|
||||
|
||||
```lua [Example]
|
||||
local connection = Signal1:Conenct(function(...) return "hey!" end)
|
||||
local Request = Signal1:Invoke(connection, "Hello World!")
|
||||
```
|
||||
:::
|
||||
|
||||
## `:InvokeTo` <Badge type="warning" text="yield" />
|
||||
|
||||
this use `:Invoke`.
|
||||
|
||||
::: code-group
|
||||
```lua [Variable]
|
||||
(
|
||||
signal: string,
|
||||
key: string,
|
||||
...: any
|
||||
) -> (...any)
|
||||
```
|
||||
|
||||
```lua [Example]
|
||||
local connection2 = Signals.Signal2:Conenct(function(...) return "hey!" end)
|
||||
local Request = Signals.Signal1:Invoke("Signal2", connection2, "Hello World!")
|
||||
```
|
||||
:::
|
||||
|
||||
::: warning
|
||||
This requires `key`.
|
||||
:::
|
||||
|
||||
## `:Wait` <Badge type="warning" text="yield" />
|
||||
|
||||
Wait the signal get triggered.
|
||||
|
||||
```lua
|
||||
Signal1:Wait() -- return number (time)
|
||||
```
|
||||
|
||||
::: warning
|
||||
This function is yielded
|
||||
:::
|
||||
|
||||
## `:Destroy`
|
||||
|
||||
Disconnect all connection of signal and remove the signal from Signals
|
||||
|
||||
```lua
|
||||
Signal1:Destroy()
|
||||
```
|
|
@ -8,7 +8,7 @@
|
|||
::: code-group
|
||||
```toml [wally.toml]
|
||||
[dependencies]
|
||||
warp = "imezx/warp@1.0.4"
|
||||
warp = "imezx/warp@1.0.5"
|
||||
```
|
||||
|
||||
3. Run `wally install` in command.
|
||||
|
|
298
node_modules/.package-lock.json
generated
vendored
298
node_modules/.package-lock.json
generated
vendored
|
@ -178,9 +178,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.23.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz",
|
||||
"integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==",
|
||||
"version": "7.23.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz",
|
||||
"integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
|
@ -238,9 +238,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-x64": {
|
||||
"version": "0.19.11",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz",
|
||||
"integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==",
|
||||
"version": "0.19.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz",
|
||||
"integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
@ -260,9 +260,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||
"version": "4.9.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.3.tgz",
|
||||
"integrity": "sha512-1Qf/qk/iEtx0aOi+AQQt5PBoW0mFngsm7bPuxHClC/hWh2hHBktR6ktSfUg5b5rC9v8hTwNmHE7lBWXkgqluUQ==",
|
||||
"version": "4.9.6",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.6.tgz",
|
||||
"integrity": "sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
@ -307,9 +307,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@vitejs/plugin-vue": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.2.tgz",
|
||||
"integrity": "sha512-kEjJHrLb5ePBvjD0SPZwJlw1QTRcjjCA9sB5VyfonoXVBxTS7TMnqL6EkLt1Eu61RDeiuZ/WN9Hf6PxXhPI2uA==",
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.3.tgz",
|
||||
"integrity": "sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^18.0.0 || >=20.0.0"
|
||||
|
@ -320,53 +320,53 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-core": {
|
||||
"version": "3.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.5.tgz",
|
||||
"integrity": "sha512-Daka7P1z2AgKjzuueWXhwzIsKu0NkLB6vGbNVEV2iJ8GJTrzraZo/Sk4GWCMRtd/qVi3zwnk+Owbd/xSZbwHtQ==",
|
||||
"version": "3.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.15.tgz",
|
||||
"integrity": "sha512-XcJQVOaxTKCnth1vCxEChteGuwG6wqnUHxAm1DO3gCz0+uXKaJNx8/digSz4dLALCy8n2lKq24jSUs8segoqIw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.23.6",
|
||||
"@vue/shared": "3.4.5",
|
||||
"@vue/shared": "3.4.15",
|
||||
"entities": "^4.5.0",
|
||||
"estree-walker": "^2.0.2",
|
||||
"source-map-js": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-dom": {
|
||||
"version": "3.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.5.tgz",
|
||||
"integrity": "sha512-J8YlxknJVd90SXFJ4HwGANSAXsx5I0lK30sO/zvYV7s5gXf7gZR7r/1BmZ2ju7RGH1lnc6bpBc6nL61yW+PsAQ==",
|
||||
"version": "3.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.15.tgz",
|
||||
"integrity": "sha512-wox0aasVV74zoXyblarOM3AZQz/Z+OunYcIHe1OsGclCHt8RsRm04DObjefaI82u6XDzv+qGWZ24tIsRAIi5MQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vue/compiler-core": "3.4.5",
|
||||
"@vue/shared": "3.4.5"
|
||||
"@vue/compiler-core": "3.4.15",
|
||||
"@vue/shared": "3.4.15"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-sfc": {
|
||||
"version": "3.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.5.tgz",
|
||||
"integrity": "sha512-jauvkDuSSUbP0ebhfNqljhShA90YEfX/0wZ+w40oZF43IjGyWYjqYaJbvMJwGOd+9+vODW6eSvnk28f0SGV7OQ==",
|
||||
"version": "3.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.15.tgz",
|
||||
"integrity": "sha512-LCn5M6QpkpFsh3GQvs2mJUOAlBQcCco8D60Bcqmf3O3w5a+KWS5GvYbrrJBkgvL1BDnTp+e8q0lXCLgHhKguBA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.23.6",
|
||||
"@vue/compiler-core": "3.4.5",
|
||||
"@vue/compiler-dom": "3.4.5",
|
||||
"@vue/compiler-ssr": "3.4.5",
|
||||
"@vue/shared": "3.4.5",
|
||||
"@vue/compiler-core": "3.4.15",
|
||||
"@vue/compiler-dom": "3.4.15",
|
||||
"@vue/compiler-ssr": "3.4.15",
|
||||
"@vue/shared": "3.4.15",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.30.5",
|
||||
"postcss": "^8.4.32",
|
||||
"postcss": "^8.4.33",
|
||||
"source-map-js": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-ssr": {
|
||||
"version": "3.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.5.tgz",
|
||||
"integrity": "sha512-DDdEcDzj2lWTMfUMMtEpLDhURai9LhM0zSZ219jCt7b2Vyl0/jy3keFgCPMitG0V1S1YG4Cmws3lWHWdxHQOpg==",
|
||||
"version": "3.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.15.tgz",
|
||||
"integrity": "sha512-1jdeQyiGznr8gjFDadVmOJqZiLNSsMa5ZgqavkPZ8O2wjHv0tVuAEsw5hTdUoUW4232vpBbL/wJhzVW/JwY1Uw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.4.5",
|
||||
"@vue/shared": "3.4.5"
|
||||
"@vue/compiler-dom": "3.4.15",
|
||||
"@vue/shared": "3.4.15"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/devtools-api": {
|
||||
|
@ -376,63 +376,63 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@vue/reactivity": {
|
||||
"version": "3.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.5.tgz",
|
||||
"integrity": "sha512-BcWkKvjdvqJwb7BhhFkXPLDCecX4d4a6GATvCduJQDLv21PkPowAE5GKuIE5p6RC07/Lp9FMkkq4AYCTVF5KlQ==",
|
||||
"version": "3.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.15.tgz",
|
||||
"integrity": "sha512-55yJh2bsff20K5O84MxSvXKPHHt17I2EomHznvFiJCAZpJTNW8IuLj1xZWMLELRhBK3kkFV/1ErZGHJfah7i7w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vue/shared": "3.4.5"
|
||||
"@vue/shared": "3.4.15"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/runtime-core": {
|
||||
"version": "3.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.5.tgz",
|
||||
"integrity": "sha512-wh9ELIOQKeWT9SaUPdLrsxRkZv14jp+SJm9aiQGWio+/MWNM3Lib0wE6CoKEqQ9+SCYyGjDBhTOTtO47kCgbkg==",
|
||||
"version": "3.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.15.tgz",
|
||||
"integrity": "sha512-6E3by5m6v1AkW0McCeAyhHTw+3y17YCOKG0U0HDKDscV4Hs0kgNT5G+GCHak16jKgcCDHpI9xe5NKb8sdLCLdw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vue/reactivity": "3.4.5",
|
||||
"@vue/shared": "3.4.5"
|
||||
"@vue/reactivity": "3.4.15",
|
||||
"@vue/shared": "3.4.15"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/runtime-dom": {
|
||||
"version": "3.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.5.tgz",
|
||||
"integrity": "sha512-n5ewvOjyG3IEpqGBahdPXODFSpVlSz3H4LF76Sx0XAqpIOqyJ5bIb2PrdYuH2ogBMAQPh+o5tnoH4nJpBr8U0Q==",
|
||||
"version": "3.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.15.tgz",
|
||||
"integrity": "sha512-EVW8D6vfFVq3V/yDKNPBFkZKGMFSvZrUQmx196o/v2tHKdwWdiZjYUBS+0Ez3+ohRyF8Njwy/6FH5gYJ75liUw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vue/runtime-core": "3.4.5",
|
||||
"@vue/shared": "3.4.5",
|
||||
"@vue/runtime-core": "3.4.15",
|
||||
"@vue/shared": "3.4.15",
|
||||
"csstype": "^3.1.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/server-renderer": {
|
||||
"version": "3.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.5.tgz",
|
||||
"integrity": "sha512-jOFc/VE87yvifQpNju12VcqimH8pBLxdcT+t3xMeiED1K6DfH9SORyhFEoZlW5TG2Vwfn3Ul5KE+1aC99xnSBg==",
|
||||
"version": "3.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.15.tgz",
|
||||
"integrity": "sha512-3HYzaidu9cHjrT+qGUuDhFYvF/j643bHC6uUN9BgM11DVy+pM6ATsG6uPBLnkwOgs7BpJABReLmpL3ZPAsUaqw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vue/compiler-ssr": "3.4.5",
|
||||
"@vue/shared": "3.4.5"
|
||||
"@vue/compiler-ssr": "3.4.15",
|
||||
"@vue/shared": "3.4.15"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "3.4.5"
|
||||
"vue": "3.4.15"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/shared": {
|
||||
"version": "3.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.5.tgz",
|
||||
"integrity": "sha512-6XptuzlMvN4l4cDnDw36pdGEV+9njYkQ1ZE0Q6iZLwrKefKaOJyiFmcP3/KBDHbt72cJZGtllAc1GaHe6XGAyg==",
|
||||
"version": "3.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.15.tgz",
|
||||
"integrity": "sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@vueuse/core": {
|
||||
"version": "10.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.7.1.tgz",
|
||||
"integrity": "sha512-74mWHlaesJSWGp1ihg76vAnfVq9NTv1YT0SYhAQ6zwFNdBkkP+CKKJmVOEHcdSnLXCXYiL5e7MaewblfiYLP7g==",
|
||||
"version": "10.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.7.2.tgz",
|
||||
"integrity": "sha512-AOyAL2rK0By62Hm+iqQn6Rbu8bfmbgaIMXcE3TSr7BdQ42wnSFlwIdPjInO62onYsEMK/yDMU8C6oGfDAtZ2qQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/web-bluetooth": "^0.0.20",
|
||||
"@vueuse/metadata": "10.7.1",
|
||||
"@vueuse/shared": "10.7.1",
|
||||
"@vueuse/metadata": "10.7.2",
|
||||
"@vueuse/shared": "10.7.2",
|
||||
"vue-demi": ">=0.14.6"
|
||||
},
|
||||
"funding": {
|
||||
|
@ -466,13 +466,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@vueuse/integrations": {
|
||||
"version": "10.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.7.1.tgz",
|
||||
"integrity": "sha512-cKo5LEeKVHdBRBtMTOrDPdR0YNtrmN9IBfdcnY2P3m5LHVrsD0xiHUtAH1WKjHQRIErZG6rJUa6GA4tWZt89Og==",
|
||||
"version": "10.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.7.2.tgz",
|
||||
"integrity": "sha512-+u3RLPFedjASs5EKPc69Ge49WNgqeMfSxFn+qrQTzblPXZg6+EFzhjarS5edj2qAf6xQ93f95TUxRwKStXj/sQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vueuse/core": "10.7.1",
|
||||
"@vueuse/shared": "10.7.1",
|
||||
"@vueuse/core": "10.7.2",
|
||||
"@vueuse/shared": "10.7.2",
|
||||
"vue-demi": ">=0.14.6"
|
||||
},
|
||||
"funding": {
|
||||
|
@ -558,18 +558,18 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@vueuse/metadata": {
|
||||
"version": "10.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.7.1.tgz",
|
||||
"integrity": "sha512-jX8MbX5UX067DYVsbtrmKn6eG6KMcXxLRLlurGkZku5ZYT3vxgBjui2zajvUZ18QLIjrgBkFRsu7CqTAg18QFw==",
|
||||
"version": "10.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.7.2.tgz",
|
||||
"integrity": "sha512-kCWPb4J2KGrwLtn1eJwaJD742u1k5h6v/St5wFe8Quih90+k2a0JP8BS4Zp34XUuJqS2AxFYMb1wjUL8HfhWsQ==",
|
||||
"dev": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
}
|
||||
},
|
||||
"node_modules/@vueuse/shared": {
|
||||
"version": "10.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.7.1.tgz",
|
||||
"integrity": "sha512-v0jbRR31LSgRY/C5i5X279A/WQjD6/JsMzGa+eqt658oJ75IvQXAeONmwvEMrvJQKnRElq/frzBR7fhmWY5uLw==",
|
||||
"version": "10.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.7.2.tgz",
|
||||
"integrity": "sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"vue-demi": ">=0.14.6"
|
||||
|
@ -645,9 +645,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.19.11",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz",
|
||||
"integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==",
|
||||
"version": "0.19.12",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz",
|
||||
"integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"bin": {
|
||||
|
@ -657,29 +657,29 @@
|
|||
"node": ">=12"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@esbuild/aix-ppc64": "0.19.11",
|
||||
"@esbuild/android-arm": "0.19.11",
|
||||
"@esbuild/android-arm64": "0.19.11",
|
||||
"@esbuild/android-x64": "0.19.11",
|
||||
"@esbuild/darwin-arm64": "0.19.11",
|
||||
"@esbuild/darwin-x64": "0.19.11",
|
||||
"@esbuild/freebsd-arm64": "0.19.11",
|
||||
"@esbuild/freebsd-x64": "0.19.11",
|
||||
"@esbuild/linux-arm": "0.19.11",
|
||||
"@esbuild/linux-arm64": "0.19.11",
|
||||
"@esbuild/linux-ia32": "0.19.11",
|
||||
"@esbuild/linux-loong64": "0.19.11",
|
||||
"@esbuild/linux-mips64el": "0.19.11",
|
||||
"@esbuild/linux-ppc64": "0.19.11",
|
||||
"@esbuild/linux-riscv64": "0.19.11",
|
||||
"@esbuild/linux-s390x": "0.19.11",
|
||||
"@esbuild/linux-x64": "0.19.11",
|
||||
"@esbuild/netbsd-x64": "0.19.11",
|
||||
"@esbuild/openbsd-x64": "0.19.11",
|
||||
"@esbuild/sunos-x64": "0.19.11",
|
||||
"@esbuild/win32-arm64": "0.19.11",
|
||||
"@esbuild/win32-ia32": "0.19.11",
|
||||
"@esbuild/win32-x64": "0.19.11"
|
||||
"@esbuild/aix-ppc64": "0.19.12",
|
||||
"@esbuild/android-arm": "0.19.12",
|
||||
"@esbuild/android-arm64": "0.19.12",
|
||||
"@esbuild/android-x64": "0.19.12",
|
||||
"@esbuild/darwin-arm64": "0.19.12",
|
||||
"@esbuild/darwin-x64": "0.19.12",
|
||||
"@esbuild/freebsd-arm64": "0.19.12",
|
||||
"@esbuild/freebsd-x64": "0.19.12",
|
||||
"@esbuild/linux-arm": "0.19.12",
|
||||
"@esbuild/linux-arm64": "0.19.12",
|
||||
"@esbuild/linux-ia32": "0.19.12",
|
||||
"@esbuild/linux-loong64": "0.19.12",
|
||||
"@esbuild/linux-mips64el": "0.19.12",
|
||||
"@esbuild/linux-ppc64": "0.19.12",
|
||||
"@esbuild/linux-riscv64": "0.19.12",
|
||||
"@esbuild/linux-s390x": "0.19.12",
|
||||
"@esbuild/linux-x64": "0.19.12",
|
||||
"@esbuild/netbsd-x64": "0.19.12",
|
||||
"@esbuild/openbsd-x64": "0.19.12",
|
||||
"@esbuild/sunos-x64": "0.19.12",
|
||||
"@esbuild/win32-arm64": "0.19.12",
|
||||
"@esbuild/win32-ia32": "0.19.12",
|
||||
"@esbuild/win32-x64": "0.19.12"
|
||||
}
|
||||
},
|
||||
"node_modules/estree-walker": {
|
||||
|
@ -784,9 +784,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "4.9.3",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.3.tgz",
|
||||
"integrity": "sha512-JnchF0ZGFiqGpAPjg3e89j656Ne4tTtCY1VZc1AxtoQcRIxjTu9jyYHBAtkDXE+X681n4un/nX9SU52AroSRzg==",
|
||||
"version": "4.9.6",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.6.tgz",
|
||||
"integrity": "sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/estree": "1.0.5"
|
||||
|
@ -799,19 +799,19 @@
|
|||
"npm": ">=8.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-android-arm-eabi": "4.9.3",
|
||||
"@rollup/rollup-android-arm64": "4.9.3",
|
||||
"@rollup/rollup-darwin-arm64": "4.9.3",
|
||||
"@rollup/rollup-darwin-x64": "4.9.3",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.9.3",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.9.3",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.9.3",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.9.3",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.9.3",
|
||||
"@rollup/rollup-linux-x64-musl": "4.9.3",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.9.3",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.9.3",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.9.3",
|
||||
"@rollup/rollup-android-arm-eabi": "4.9.6",
|
||||
"@rollup/rollup-android-arm64": "4.9.6",
|
||||
"@rollup/rollup-darwin-arm64": "4.9.6",
|
||||
"@rollup/rollup-darwin-x64": "4.9.6",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.9.6",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.9.6",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.9.6",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.9.6",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.9.6",
|
||||
"@rollup/rollup-linux-x64-musl": "4.9.6",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.9.6",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.9.6",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.9.6",
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
|
@ -823,27 +823,27 @@
|
|||
"peer": true
|
||||
},
|
||||
"node_modules/shikiji": {
|
||||
"version": "0.9.17",
|
||||
"resolved": "https://registry.npmjs.org/shikiji/-/shikiji-0.9.17.tgz",
|
||||
"integrity": "sha512-0z/1NfkhBkm3ijrfFeHg3G9yDNuHhXdAGbQm7tRxj4WQ5z2y0XDbnagFyKyuV2ebCTS1Mwy1I3n0Fzcc/4xdmw==",
|
||||
"version": "0.10.2",
|
||||
"resolved": "https://registry.npmjs.org/shikiji/-/shikiji-0.10.2.tgz",
|
||||
"integrity": "sha512-wtZg3T0vtYV2PnqusWQs3mDaJBdCPWxFDrBM/SE5LfrX92gjUvfEMlc+vJnoKY6Z/S44OWaCRzNIsdBRWcTAiw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"shikiji-core": "0.9.17"
|
||||
"shikiji-core": "0.10.2"
|
||||
}
|
||||
},
|
||||
"node_modules/shikiji-core": {
|
||||
"version": "0.9.17",
|
||||
"resolved": "https://registry.npmjs.org/shikiji-core/-/shikiji-core-0.9.17.tgz",
|
||||
"integrity": "sha512-r1FWTXk6SO2aYqfWgcsJ11MuVQ1ymPSdXzJjK7q8EXuyqu8yc2N5qrQy5+BL6gTVOaF4yLjbxFjF+KTRM1Sp8Q==",
|
||||
"version": "0.10.2",
|
||||
"resolved": "https://registry.npmjs.org/shikiji-core/-/shikiji-core-0.10.2.tgz",
|
||||
"integrity": "sha512-9Of8HMlF96usXJHmCL3Gd0Fcf0EcyJUF9m8EoAKKd98mHXi0La2AZl1h6PegSFGtiYcBDK/fLuKbDa1l16r1fA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/shikiji-transformers": {
|
||||
"version": "0.9.17",
|
||||
"resolved": "https://registry.npmjs.org/shikiji-transformers/-/shikiji-transformers-0.9.17.tgz",
|
||||
"integrity": "sha512-2CCG9qSLS6Bn/jbeUTEuvC6YSuP8gm8VyX5VjmCvDKyCPGhlLJbH1k/kg9wfRt7cJqpYjhdMDgT5rkdYrOZnsA==",
|
||||
"version": "0.10.2",
|
||||
"resolved": "https://registry.npmjs.org/shikiji-transformers/-/shikiji-transformers-0.10.2.tgz",
|
||||
"integrity": "sha512-7IVTwl1af205ywYEq5bOAYOTOFW4V1dVX1EablP0nWKErqZeD1o93VMytxmtJomqS+YwbB8doY8SE3MFMn0aPQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"shikiji": "0.9.17"
|
||||
"shikiji": "0.10.2"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
|
@ -862,9 +862,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "5.0.11",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.0.11.tgz",
|
||||
"integrity": "sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==",
|
||||
"version": "5.0.12",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz",
|
||||
"integrity": "sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.19.3",
|
||||
|
@ -917,33 +917,33 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vitepress": {
|
||||
"version": "1.0.0-rc.35",
|
||||
"resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-rc.35.tgz",
|
||||
"integrity": "sha512-+2VnFwtYIiKWWAnMjWg7ik0PfsUdrNoZIZKeu5dbJtrkzKO/mTvlA3owiT5VBKJsZAgI17B5UV37aYfUvGrN6g==",
|
||||
"version": "1.0.0-rc.40",
|
||||
"resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-rc.40.tgz",
|
||||
"integrity": "sha512-1x9PCrcsJwqhpccyTR93uD6jpiPDeRC98CBCAQLLBb44a3VSXYBPzhCahi+2kwAYylu49p0XhseMPVM4IVcWcw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@docsearch/css": "^3.5.2",
|
||||
"@docsearch/js": "^3.5.2",
|
||||
"@types/markdown-it": "^13.0.7",
|
||||
"@vitejs/plugin-vue": "^5.0.2",
|
||||
"@vitejs/plugin-vue": "^5.0.3",
|
||||
"@vue/devtools-api": "^6.5.1",
|
||||
"@vueuse/core": "^10.7.1",
|
||||
"@vueuse/integrations": "^10.7.1",
|
||||
"@vueuse/core": "^10.7.2",
|
||||
"@vueuse/integrations": "^10.7.2",
|
||||
"focus-trap": "^7.5.4",
|
||||
"mark.js": "8.11.1",
|
||||
"minisearch": "^6.3.0",
|
||||
"shikiji": "^0.9.17",
|
||||
"shikiji-core": "^0.9.17",
|
||||
"shikiji-transformers": "^0.9.17",
|
||||
"vite": "^5.0.10",
|
||||
"vue": "^3.4.4"
|
||||
"shikiji": "^0.10.0",
|
||||
"shikiji-core": "^0.10.0",
|
||||
"shikiji-transformers": "^0.10.0",
|
||||
"vite": "^5.0.12",
|
||||
"vue": "^3.4.15"
|
||||
},
|
||||
"bin": {
|
||||
"vitepress": "bin/vitepress.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"markdown-it-mathjax3": "^4.3.2",
|
||||
"postcss": "^8.4.32"
|
||||
"postcss": "^8.4.33"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"markdown-it-mathjax3": {
|
||||
|
@ -955,16 +955,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vue": {
|
||||
"version": "3.4.5",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.5.tgz",
|
||||
"integrity": "sha512-VH6nHFhLPjgu2oh5vEBXoNZxsGHuZNr3qf4PHClwJWw6IDqw6B3x+4J+ABdoZ0aJuT8Zi0zf3GpGlLQCrGWHrw==",
|
||||
"version": "3.4.15",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.15.tgz",
|
||||
"integrity": "sha512-jC0GH4KkWLWJOEQjOpkqU1bQsBwf4R1rsFtw5GQJbjHVKWDzO6P0nWWBTmjp1xSemAioDFj1jdaK1qa3DnMQoQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.4.5",
|
||||
"@vue/compiler-sfc": "3.4.5",
|
||||
"@vue/runtime-dom": "3.4.5",
|
||||
"@vue/server-renderer": "3.4.5",
|
||||
"@vue/shared": "3.4.5"
|
||||
"@vue/compiler-dom": "3.4.15",
|
||||
"@vue/compiler-sfc": "3.4.15",
|
||||
"@vue/runtime-dom": "3.4.15",
|
||||
"@vue/server-renderer": "3.4.15",
|
||||
"@vue/shared": "3.4.15"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "*"
|
||||
|
|
1588
node_modules/@babel/parser/lib/index.js
generated
vendored
1588
node_modules/@babel/parser/lib/index.js
generated
vendored
File diff suppressed because it is too large
Load diff
2
node_modules/@babel/parser/lib/index.js.map
generated
vendored
2
node_modules/@babel/parser/lib/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/@babel/parser/package.json
generated
vendored
2
node_modules/@babel/parser/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@babel/parser",
|
||||
"version": "7.23.6",
|
||||
"version": "7.23.9",
|
||||
"description": "A JavaScript parser",
|
||||
"author": "The Babel Team (https://babel.dev/team)",
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-parser",
|
||||
|
|
2
node_modules/@esbuild/win32-x64/package.json
generated
vendored
2
node_modules/@esbuild/win32-x64/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@esbuild/win32-x64",
|
||||
"version": "0.19.11",
|
||||
"version": "0.19.12",
|
||||
"description": "The Windows 64-bit binary for esbuild, a JavaScript bundler.",
|
||||
"repository": "https://github.com/evanw/esbuild",
|
||||
"license": "MIT",
|
||||
|
|
2
node_modules/@rollup/rollup-win32-x64-msvc/package.json
generated
vendored
2
node_modules/@rollup/rollup-win32-x64-msvc/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@rollup/rollup-win32-x64-msvc",
|
||||
"version": "4.9.3",
|
||||
"version": "4.9.6",
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
|
|
BIN
node_modules/@rollup/rollup-win32-x64-msvc/rollup.win32-x64-msvc.node
generated
vendored
BIN
node_modules/@rollup/rollup-win32-x64-msvc/rollup.win32-x64-msvc.node
generated
vendored
Binary file not shown.
21
node_modules/@vitejs/plugin-vue/dist/index.cjs
generated
vendored
21
node_modules/@vitejs/plugin-vue/dist/index.cjs
generated
vendored
|
@ -19,7 +19,7 @@ const path__default = /*#__PURE__*/_interopDefaultCompat(path);
|
|||
const require$$0__default = /*#__PURE__*/_interopDefaultCompat(require$$0);
|
||||
const require$$1__default = /*#__PURE__*/_interopDefaultCompat(require$$1);
|
||||
|
||||
const version = "5.0.2";
|
||||
const version = "5.0.3";
|
||||
|
||||
function resolveCompiler(root) {
|
||||
const compiler = tryResolveCompiler(root) || tryResolveCompiler();
|
||||
|
@ -2154,7 +2154,7 @@ const _debug = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
|
|||
|
||||
const debug = _debug("vite:hmr");
|
||||
const directRequestRE = /(?:\?|&)direct\b/;
|
||||
async function handleHotUpdate({ file, modules, read }, options) {
|
||||
async function handleHotUpdate({ file, modules, read }, options, customElement) {
|
||||
const prevDescriptor = getDescriptor(file, options, false, true);
|
||||
if (!prevDescriptor) {
|
||||
return;
|
||||
|
@ -2165,7 +2165,7 @@ async function handleHotUpdate({ file, modules, read }, options) {
|
|||
const affectedModules = /* @__PURE__ */ new Set();
|
||||
const mainModule = getMainModule(modules);
|
||||
const templateModule = modules.find((m) => /type=template/.test(m.url));
|
||||
resolveScript(descriptor, options, false);
|
||||
resolveScript(descriptor, options, false, customElement);
|
||||
const scriptChanged = hasScriptChanged(prevDescriptor, descriptor);
|
||||
if (scriptChanged) {
|
||||
affectedModules.add(getScriptModule(modules) || mainModule);
|
||||
|
@ -2276,11 +2276,11 @@ function isEqualBlock(a, b) {
|
|||
function isOnlyTemplateChanged(prev, next) {
|
||||
return !hasScriptChanged(prev, next) && prev.styles.length === next.styles.length && prev.styles.every((s, i) => isEqualBlock(s, next.styles[i])) && prev.customBlocks.length === next.customBlocks.length && prev.customBlocks.every((s, i) => isEqualBlock(s, next.customBlocks[i]));
|
||||
}
|
||||
function deepEqual(obj1, obj2, excludeProps = []) {
|
||||
function deepEqual(obj1, obj2, excludeProps = [], deepParentsOfObj1 = []) {
|
||||
if (typeof obj1 !== typeof obj2) {
|
||||
return false;
|
||||
}
|
||||
if (obj1 == null || obj2 == null || typeof obj1 !== "object") {
|
||||
if (obj1 == null || obj2 == null || typeof obj1 !== "object" || deepParentsOfObj1.includes(obj1)) {
|
||||
return obj1 === obj2;
|
||||
}
|
||||
const keys1 = Object.keys(obj1);
|
||||
|
@ -2292,7 +2292,10 @@ function deepEqual(obj1, obj2, excludeProps = []) {
|
|||
if (excludeProps.includes(key)) {
|
||||
continue;
|
||||
}
|
||||
if (!deepEqual(obj1[key], obj2[key], excludeProps)) {
|
||||
if (!deepEqual(obj1[key], obj2[key], excludeProps, [
|
||||
...deepParentsOfObj1,
|
||||
obj1
|
||||
])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -2825,7 +2828,11 @@ function vuePlugin(rawOptions = {}) {
|
|||
return handleTypeDepChange(typeDepToSFCMap.get(ctx.file), ctx);
|
||||
}
|
||||
if (filter.value(ctx.file)) {
|
||||
return handleHotUpdate(ctx, options.value);
|
||||
return handleHotUpdate(
|
||||
ctx,
|
||||
options.value,
|
||||
customElementFilter.value(ctx.file)
|
||||
);
|
||||
}
|
||||
},
|
||||
config(config) {
|
||||
|
|
21
node_modules/@vitejs/plugin-vue/dist/index.mjs
generated
vendored
21
node_modules/@vitejs/plugin-vue/dist/index.mjs
generated
vendored
|
@ -7,7 +7,7 @@ import { createHash } from 'node:crypto';
|
|||
import require$$0 from 'tty';
|
||||
import require$$1 from 'util';
|
||||
|
||||
const version = "5.0.2";
|
||||
const version = "5.0.3";
|
||||
|
||||
function resolveCompiler(root) {
|
||||
const compiler = tryResolveCompiler(root) || tryResolveCompiler();
|
||||
|
@ -2142,7 +2142,7 @@ const _debug = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
|
|||
|
||||
const debug = _debug("vite:hmr");
|
||||
const directRequestRE = /(?:\?|&)direct\b/;
|
||||
async function handleHotUpdate({ file, modules, read }, options) {
|
||||
async function handleHotUpdate({ file, modules, read }, options, customElement) {
|
||||
const prevDescriptor = getDescriptor(file, options, false, true);
|
||||
if (!prevDescriptor) {
|
||||
return;
|
||||
|
@ -2153,7 +2153,7 @@ async function handleHotUpdate({ file, modules, read }, options) {
|
|||
const affectedModules = /* @__PURE__ */ new Set();
|
||||
const mainModule = getMainModule(modules);
|
||||
const templateModule = modules.find((m) => /type=template/.test(m.url));
|
||||
resolveScript(descriptor, options, false);
|
||||
resolveScript(descriptor, options, false, customElement);
|
||||
const scriptChanged = hasScriptChanged(prevDescriptor, descriptor);
|
||||
if (scriptChanged) {
|
||||
affectedModules.add(getScriptModule(modules) || mainModule);
|
||||
|
@ -2264,11 +2264,11 @@ function isEqualBlock(a, b) {
|
|||
function isOnlyTemplateChanged(prev, next) {
|
||||
return !hasScriptChanged(prev, next) && prev.styles.length === next.styles.length && prev.styles.every((s, i) => isEqualBlock(s, next.styles[i])) && prev.customBlocks.length === next.customBlocks.length && prev.customBlocks.every((s, i) => isEqualBlock(s, next.customBlocks[i]));
|
||||
}
|
||||
function deepEqual(obj1, obj2, excludeProps = []) {
|
||||
function deepEqual(obj1, obj2, excludeProps = [], deepParentsOfObj1 = []) {
|
||||
if (typeof obj1 !== typeof obj2) {
|
||||
return false;
|
||||
}
|
||||
if (obj1 == null || obj2 == null || typeof obj1 !== "object") {
|
||||
if (obj1 == null || obj2 == null || typeof obj1 !== "object" || deepParentsOfObj1.includes(obj1)) {
|
||||
return obj1 === obj2;
|
||||
}
|
||||
const keys1 = Object.keys(obj1);
|
||||
|
@ -2280,7 +2280,10 @@ function deepEqual(obj1, obj2, excludeProps = []) {
|
|||
if (excludeProps.includes(key)) {
|
||||
continue;
|
||||
}
|
||||
if (!deepEqual(obj1[key], obj2[key], excludeProps)) {
|
||||
if (!deepEqual(obj1[key], obj2[key], excludeProps, [
|
||||
...deepParentsOfObj1,
|
||||
obj1
|
||||
])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -2813,7 +2816,11 @@ function vuePlugin(rawOptions = {}) {
|
|||
return handleTypeDepChange(typeDepToSFCMap.get(ctx.file), ctx);
|
||||
}
|
||||
if (filter.value(ctx.file)) {
|
||||
return handleHotUpdate(ctx, options.value);
|
||||
return handleHotUpdate(
|
||||
ctx,
|
||||
options.value,
|
||||
customElementFilter.value(ctx.file)
|
||||
);
|
||||
}
|
||||
},
|
||||
config(config) {
|
||||
|
|
8
node_modules/@vitejs/plugin-vue/package.json
generated
vendored
8
node_modules/@vitejs/plugin-vue/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vitejs/plugin-vue",
|
||||
"version": "5.0.2",
|
||||
"version": "5.0.3",
|
||||
"license": "MIT",
|
||||
"author": "Evan You",
|
||||
"files": [
|
||||
|
@ -35,11 +35,11 @@
|
|||
"@jridgewell/gen-mapping": "^0.3.3",
|
||||
"@jridgewell/trace-mapping": "^0.3.20",
|
||||
"debug": "^4.3.4",
|
||||
"rollup": "^4.6.1",
|
||||
"rollup": "^4.9.2",
|
||||
"slash": "^5.1.0",
|
||||
"source-map-js": "^1.0.2",
|
||||
"vite": "^5.0.6",
|
||||
"vue": "^3.4.1"
|
||||
"vite": "^5.0.10",
|
||||
"vue": "^3.4.5"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "unbuild --stub",
|
||||
|
|
12
node_modules/@vue/compiler-core/dist/compiler-core.cjs.js
generated
vendored
12
node_modules/@vue/compiler-core/dist/compiler-core.cjs.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/compiler-core v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -1513,7 +1518,7 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
|
|||
if (includeAll || isRefed && !isLocal) {
|
||||
onIdentifier(node, parent, parentStack, isRefed, isLocal);
|
||||
}
|
||||
} else if (node.type === "ObjectProperty" && parent.type === "ObjectPattern") {
|
||||
} else if (node.type === "ObjectProperty" && (parent == null ? void 0 : parent.type) === "ObjectPattern") {
|
||||
node.inPattern = true;
|
||||
} else if (isFunctionType(node)) {
|
||||
if (node.scopeIds) {
|
||||
|
@ -2591,7 +2596,7 @@ function onCloseTag(el, end, isImplied = false) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (isCompatEnabled(
|
||||
if (!tokenizer.inSFCRoot && isCompatEnabled(
|
||||
"COMPILER_NATIVE_TEMPLATE",
|
||||
currentOptions
|
||||
) && el.tag === "template" && !isFragmentTemplate(el)) {
|
||||
|
@ -3226,8 +3231,7 @@ function createTransformContext(root, {
|
|||
}
|
||||
context.parent.children.splice(removalIndex, 1);
|
||||
},
|
||||
onNodeRemoved: () => {
|
||||
},
|
||||
onNodeRemoved: shared.NOOP,
|
||||
addIdentifiers(exp) {
|
||||
{
|
||||
if (shared.isString(exp)) {
|
||||
|
|
12
node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js
generated
vendored
12
node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/compiler-core v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -1509,7 +1514,7 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
|
|||
if (includeAll || isRefed && !isLocal) {
|
||||
onIdentifier(node, parent, parentStack, isRefed, isLocal);
|
||||
}
|
||||
} else if (node.type === "ObjectProperty" && parent.type === "ObjectPattern") {
|
||||
} else if (node.type === "ObjectProperty" && (parent == null ? void 0 : parent.type) === "ObjectPattern") {
|
||||
node.inPattern = true;
|
||||
} else if (isFunctionType(node)) {
|
||||
if (node.scopeIds) {
|
||||
|
@ -2562,7 +2567,7 @@ function onCloseTag(el, end, isImplied = false) {
|
|||
}
|
||||
{
|
||||
const props = el.props;
|
||||
if (isCompatEnabled(
|
||||
if (!tokenizer.inSFCRoot && isCompatEnabled(
|
||||
"COMPILER_NATIVE_TEMPLATE",
|
||||
currentOptions
|
||||
) && el.tag === "template" && !isFragmentTemplate(el)) {
|
||||
|
@ -3171,8 +3176,7 @@ function createTransformContext(root, {
|
|||
}
|
||||
context.parent.children.splice(removalIndex, 1);
|
||||
},
|
||||
onNodeRemoved: () => {
|
||||
},
|
||||
onNodeRemoved: shared.NOOP,
|
||||
addIdentifiers(exp) {
|
||||
{
|
||||
if (shared.isString(exp)) {
|
||||
|
|
12
node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js
generated
vendored
12
node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/compiler-core v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
import { isString, NOOP, isObject, NO, extend, isSymbol, isArray, capitalize, camelize, EMPTY_OBJ, PatchFlagNames, slotFlagsText, isOn, isBuiltInDirective, isReservedProp, toHandlerKey } from '@vue/shared';
|
||||
export { generateCodeFrame } from '@vue/shared';
|
||||
|
||||
|
@ -1254,7 +1259,7 @@ function defaultOnWarn(msg) {
|
|||
!!(process.env.NODE_ENV !== "production") && console.warn(`[Vue warn] ${msg.message}`);
|
||||
}
|
||||
function createCompilerError(code, loc, messages, additionalMessage) {
|
||||
const msg = !!(process.env.NODE_ENV !== "production") || false ? (messages || errorMessages)[code] + (additionalMessage || ``) : `https://vuejs.org/errors/#compiler-${code}`;
|
||||
const msg = !!(process.env.NODE_ENV !== "production") || false ? (messages || errorMessages)[code] + (additionalMessage || ``) : `https://vuejs.org/error-reference/#compiler-${code}`;
|
||||
const error = new SyntaxError(String(msg));
|
||||
error.code = code;
|
||||
error.loc = loc;
|
||||
|
@ -2356,7 +2361,7 @@ function onCloseTag(el, end, isImplied = false) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (isCompatEnabled(
|
||||
if (!tokenizer.inSFCRoot && isCompatEnabled(
|
||||
"COMPILER_NATIVE_TEMPLATE",
|
||||
currentOptions
|
||||
) && el.tag === "template" && !isFragmentTemplate(el)) {
|
||||
|
@ -2970,8 +2975,7 @@ function createTransformContext(root, {
|
|||
}
|
||||
context.parent.children.splice(removalIndex, 1);
|
||||
},
|
||||
onNodeRemoved: () => {
|
||||
},
|
||||
onNodeRemoved: NOOP,
|
||||
addIdentifiers(exp) {
|
||||
},
|
||||
removeIdentifiers(exp) {
|
||||
|
|
5
node_modules/@vue/compiler-core/package.json
generated
vendored
5
node_modules/@vue/compiler-core/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/compiler-core",
|
||||
"version": "3.4.5",
|
||||
"version": "3.4.15",
|
||||
"description": "@vue/compiler-core",
|
||||
"main": "index.js",
|
||||
"module": "dist/compiler-core.esm-bundler.js",
|
||||
|
@ -17,6 +17,7 @@
|
|||
"development": "./dist/compiler-core.cjs.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"module": "./dist/compiler-core.esm-bundler.js",
|
||||
"import": "./dist/compiler-core.esm-bundler.js",
|
||||
"require": "./index.js"
|
||||
},
|
||||
|
@ -49,7 +50,7 @@
|
|||
"entities": "^4.5.0",
|
||||
"estree-walker": "^2.0.2",
|
||||
"source-map-js": "^1.0.2",
|
||||
"@vue/shared": "3.4.5"
|
||||
"@vue/shared": "3.4.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/types": "^7.23.6"
|
||||
|
|
5
node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js
generated
vendored
5
node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/compiler-dom v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
|
5
node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js
generated
vendored
5
node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/compiler-dom v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
|
10
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js
generated
vendored
10
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/compiler-dom v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
function makeMap(str, expectsLowerCase) {
|
||||
const set = new Set(str.split(","));
|
||||
return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
|
||||
|
@ -2480,7 +2485,7 @@ function onCloseTag(el, end, isImplied = false) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (isCompatEnabled(
|
||||
if (!tokenizer.inSFCRoot && isCompatEnabled(
|
||||
"COMPILER_NATIVE_TEMPLATE",
|
||||
currentOptions
|
||||
) && el.tag === "template" && !isFragmentTemplate(el)) {
|
||||
|
@ -3093,8 +3098,7 @@ function createTransformContext(root, {
|
|||
}
|
||||
context.parent.children.splice(removalIndex, 1);
|
||||
},
|
||||
onNodeRemoved: () => {
|
||||
},
|
||||
onNodeRemoved: NOOP,
|
||||
addIdentifiers(exp) {
|
||||
},
|
||||
removeIdentifiers(exp) {
|
||||
|
|
7
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js
generated
vendored
7
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js
generated
vendored
File diff suppressed because one or more lines are too long
5
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js
generated
vendored
5
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/compiler-dom v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
import { registerRuntimeHelpers, createSimpleExpression, createCompilerError, createObjectProperty, getConstantType, createCallExpression, TO_DISPLAY_STRING, transformModel as transformModel$1, findProp, hasDynamicKeyVBind, findDir, isStaticArgOf, transformOn as transformOn$1, isStaticExp, createCompoundExpression, checkCompatEnabled, noopDirectiveTransform, baseCompile, baseParse } from '@vue/compiler-core';
|
||||
export * from '@vue/compiler-core';
|
||||
import { isVoidTag, isHTMLTag, isSVGTag, isMathMLTag, parseStringStyle, capitalize, makeMap, extend } from '@vue/shared';
|
||||
|
|
10
node_modules/@vue/compiler-dom/dist/compiler-dom.global.js
generated
vendored
10
node_modules/@vue/compiler-dom/dist/compiler-dom.global.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/compiler-dom v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
var VueCompilerDOM = (function (exports) {
|
||||
'use strict';
|
||||
|
||||
|
@ -2483,7 +2488,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|||
}
|
||||
}
|
||||
}
|
||||
if (isCompatEnabled(
|
||||
if (!tokenizer.inSFCRoot && isCompatEnabled(
|
||||
"COMPILER_NATIVE_TEMPLATE",
|
||||
currentOptions
|
||||
) && el.tag === "template" && !isFragmentTemplate(el)) {
|
||||
|
@ -3096,8 +3101,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|||
}
|
||||
context.parent.children.splice(removalIndex, 1);
|
||||
},
|
||||
onNodeRemoved: () => {
|
||||
},
|
||||
onNodeRemoved: NOOP,
|
||||
addIdentifiers(exp) {
|
||||
},
|
||||
removeIdentifiers(exp) {
|
||||
|
|
7
node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js
generated
vendored
7
node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js
generated
vendored
File diff suppressed because one or more lines are too long
7
node_modules/@vue/compiler-dom/package.json
generated
vendored
7
node_modules/@vue/compiler-dom/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/compiler-dom",
|
||||
"version": "3.4.5",
|
||||
"version": "3.4.15",
|
||||
"description": "@vue/compiler-dom",
|
||||
"main": "index.js",
|
||||
"module": "dist/compiler-dom.esm-bundler.js",
|
||||
|
@ -19,6 +19,7 @@
|
|||
"development": "./dist/compiler-dom.cjs.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"module": "./dist/compiler-dom.esm-bundler.js",
|
||||
"import": "./dist/compiler-dom.esm-bundler.js",
|
||||
"require": "./index.js"
|
||||
},
|
||||
|
@ -50,7 +51,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-dom#readme",
|
||||
"dependencies": {
|
||||
"@vue/shared": "3.4.5",
|
||||
"@vue/compiler-core": "3.4.5"
|
||||
"@vue/shared": "3.4.15",
|
||||
"@vue/compiler-core": "3.4.15"
|
||||
}
|
||||
}
|
21
node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js
generated
vendored
21
node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/compiler-sfc v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -4274,6 +4279,7 @@ function doCompileTemplate({
|
|||
}
|
||||
if (inAST == null ? void 0 : inAST.transformed) {
|
||||
const newAST = (ssr ? CompilerDOM__namespace : compiler).parse(inAST.source, {
|
||||
prefixIdentifiers: true,
|
||||
...compilerOptions,
|
||||
parseMode: "sfc",
|
||||
onError: (e) => errors.push(e)
|
||||
|
@ -18361,7 +18367,8 @@ function resolveFS(ctx) {
|
|||
file = file.replace(/\.ts$/, "");
|
||||
}
|
||||
return fs.readFile(file);
|
||||
}
|
||||
},
|
||||
realpath: fs.realpath
|
||||
};
|
||||
}
|
||||
function resolveTypeFromImport(ctx, node, name, scope) {
|
||||
|
@ -18489,7 +18496,7 @@ function resolveWithTS(containingFile, source, ts2, fs) {
|
|||
if (filename.endsWith(".vue.ts")) {
|
||||
filename = filename.replace(/\.ts$/, "");
|
||||
}
|
||||
return filename;
|
||||
return fs.realpath ? fs.realpath(filename) : filename;
|
||||
}
|
||||
}
|
||||
function loadTSConfig(configPath, ts2, fs) {
|
||||
|
@ -19111,6 +19118,7 @@ function processDefineModel(ctx, node, declId) {
|
|||
}
|
||||
let optionsString = options && ctx.getString(options);
|
||||
let optionsRemoved = !options;
|
||||
const runtimeOptionNodes = [];
|
||||
if (options && options.type === "ObjectExpression" && !options.properties.some((p) => p.type === "SpreadElement" || p.computed)) {
|
||||
let removed = 0;
|
||||
for (let i = options.properties.length - 1; i >= 0; i--) {
|
||||
|
@ -19123,6 +19131,7 @@ function processDefineModel(ctx, node, declId) {
|
|||
} else {
|
||||
removed++;
|
||||
ctx.s.remove(ctx.startOffset + start, ctx.startOffset + end);
|
||||
runtimeOptionNodes.push(p);
|
||||
}
|
||||
}
|
||||
if (removed === options.properties.length) {
|
||||
|
@ -19136,6 +19145,7 @@ function processDefineModel(ctx, node, declId) {
|
|||
ctx.modelDecls[modelName] = {
|
||||
type,
|
||||
options: optionsString,
|
||||
runtimeOptionNodes,
|
||||
identifier: declId && declId.type === "Identifier" ? declId.name : void 0
|
||||
};
|
||||
ctx.bindingMetadata[modelName] = "props";
|
||||
|
@ -20177,6 +20187,11 @@ const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name}
|
|||
checkInvalidScopeReference(ctx.propsDestructureDecl, DEFINE_PROPS);
|
||||
checkInvalidScopeReference(ctx.emitsRuntimeDecl, DEFINE_EMITS);
|
||||
checkInvalidScopeReference(ctx.optionsRuntimeDecl, DEFINE_OPTIONS);
|
||||
for (const { runtimeOptionNodes } of Object.values(ctx.modelDecls)) {
|
||||
for (const node of runtimeOptionNodes) {
|
||||
checkInvalidScopeReference(node, DEFINE_MODEL);
|
||||
}
|
||||
}
|
||||
if (script) {
|
||||
if (startOffset < scriptStartOffset) {
|
||||
ctx.s.remove(0, startOffset);
|
||||
|
@ -20594,7 +20609,7 @@ function isStaticNode(node) {
|
|||
return false;
|
||||
}
|
||||
|
||||
const version = "3.4.5";
|
||||
const version = "3.4.15";
|
||||
const parseCache = parseCache$1;
|
||||
const errorMessages = {
|
||||
...CompilerDOM.errorMessages,
|
||||
|
|
4
node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts
generated
vendored
4
node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
import * as _babel_types from '@babel/types';
|
||||
import { Statement, Expression, TSType, Program, CallExpression, Node, ObjectPattern, TSModuleDeclaration, TSPropertySignature, TSMethodSignature, TSCallSignatureDeclaration, TSFunctionType } from '@babel/types';
|
||||
import { Statement, Expression, TSType, Node, Program, CallExpression, ObjectPattern, TSModuleDeclaration, TSPropertySignature, TSMethodSignature, TSCallSignatureDeclaration, TSFunctionType } from '@babel/types';
|
||||
import { RootNode, CompilerOptions, CodegenResult, ParserOptions, CompilerError, SourceLocation, BindingMetadata as BindingMetadata$1 } from '@vue/compiler-core';
|
||||
export { BindingMetadata, CompilerError, CompilerOptions, extractIdentifiers, generateCodeFrame, isInDestructureAssignment, isStaticProperty, walkIdentifiers } from '@vue/compiler-core';
|
||||
import { RawSourceMap } from 'source-map-js';
|
||||
|
@ -130,6 +130,7 @@ export interface SFCScriptCompileOptions {
|
|||
fs?: {
|
||||
fileExists(file: string): boolean;
|
||||
readFile(file: string): string | undefined;
|
||||
realpath?(file: string): string;
|
||||
};
|
||||
/**
|
||||
* Transform Vue SFCs into custom elements.
|
||||
|
@ -294,6 +295,7 @@ interface ModelDecl {
|
|||
type: TSType | undefined;
|
||||
options: string | undefined;
|
||||
identifier: string | undefined;
|
||||
runtimeOptionNodes: Node[];
|
||||
}
|
||||
|
||||
declare enum BindingTypes {
|
||||
|
|
45
node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js
generated
vendored
45
node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/compiler-sfc v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
function makeMap(str, expectsLowerCase) {
|
||||
const set = new Set(str.split(","));
|
||||
return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
|
||||
|
@ -17029,7 +17034,7 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
|
|||
if (includeAll || isRefed && !isLocal) {
|
||||
onIdentifier(node, parent, parentStack, isRefed, isLocal);
|
||||
}
|
||||
} else if (node.type === "ObjectProperty" && parent.type === "ObjectPattern") {
|
||||
} else if (node.type === "ObjectProperty" && (parent == null ? void 0 : parent.type) === "ObjectPattern") {
|
||||
node.inPattern = true;
|
||||
} else if (isFunctionType(node)) {
|
||||
if (node.scopeIds) {
|
||||
|
@ -18661,8 +18666,7 @@ function createTransformContext(root, {
|
|||
}
|
||||
context.parent.children.splice(removalIndex, 1);
|
||||
},
|
||||
onNodeRemoved: () => {
|
||||
},
|
||||
onNodeRemoved: NOOP,
|
||||
addIdentifiers(exp) {
|
||||
{
|
||||
if (isString$2(exp)) {
|
||||
|
@ -32649,7 +32653,9 @@ function doCompileTemplate({
|
|||
inAST = void 0;
|
||||
}
|
||||
if (inAST == null ? void 0 : inAST.transformed) {
|
||||
const newAST = (ssr ? CompilerDOM : compiler).parse(inAST.source, __spreadProps$5(__spreadValues$6({}, compilerOptions), {
|
||||
const newAST = (ssr ? CompilerDOM : compiler).parse(inAST.source, __spreadProps$5(__spreadValues$6({
|
||||
prefixIdentifiers: true
|
||||
}, compilerOptions), {
|
||||
parseMode: "sfc",
|
||||
onError: (e) => errors.push(e)
|
||||
}));
|
||||
|
@ -34485,6 +34491,7 @@ let MapGenerator$2 = class MapGenerator {
|
|||
this.root = root;
|
||||
this.opts = opts;
|
||||
this.css = cssString;
|
||||
this.originalCSS = cssString;
|
||||
this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute;
|
||||
|
||||
this.memoizedFileURLs = new Map();
|
||||
|
@ -34543,7 +34550,7 @@ let MapGenerator$2 = class MapGenerator {
|
|||
}
|
||||
}
|
||||
} else if (this.css) {
|
||||
this.css = this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm, '');
|
||||
this.css = this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm, '');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34745,7 +34752,7 @@ let MapGenerator$2 = class MapGenerator {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
let input = new Input$3(this.css, this.opts);
|
||||
let input = new Input$3(this.originalCSS, this.opts);
|
||||
if (input.map) this.previousMaps.push(input.map);
|
||||
}
|
||||
}
|
||||
|
@ -36801,6 +36808,9 @@ let NoWorkResult$1 = class NoWorkResult {
|
|||
if (generatedMap) {
|
||||
this.result.map = generatedMap;
|
||||
}
|
||||
} else {
|
||||
map.clearAnnotation();
|
||||
this.result.css = map.css;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36905,7 +36915,7 @@ let Root$2 = root$2;
|
|||
|
||||
let Processor$1 = class Processor {
|
||||
constructor(plugins = []) {
|
||||
this.version = '8.4.32';
|
||||
this.version = '8.4.33';
|
||||
this.plugins = this.normalize(plugins);
|
||||
}
|
||||
|
||||
|
@ -36941,10 +36951,10 @@ let Processor$1 = class Processor {
|
|||
|
||||
process(css, opts = {}) {
|
||||
if (
|
||||
this.plugins.length === 0 &&
|
||||
typeof opts.parser === 'undefined' &&
|
||||
typeof opts.stringifier === 'undefined' &&
|
||||
typeof opts.syntax === 'undefined'
|
||||
!this.plugins.length &&
|
||||
!opts.parser &&
|
||||
!opts.stringifier &&
|
||||
!opts.syntax
|
||||
) {
|
||||
return new NoWorkResult(this, css, opts)
|
||||
} else {
|
||||
|
@ -46451,7 +46461,8 @@ function resolveFS(ctx) {
|
|||
file = file.replace(/\.ts$/, "");
|
||||
}
|
||||
return fs.readFile(file);
|
||||
}
|
||||
},
|
||||
realpath: fs.realpath
|
||||
};
|
||||
}
|
||||
function resolveTypeFromImport(ctx, node, name, scope) {
|
||||
|
@ -47117,6 +47128,7 @@ function processDefineModel(ctx, node, declId) {
|
|||
}
|
||||
let optionsString = options && ctx.getString(options);
|
||||
let optionsRemoved = !options;
|
||||
const runtimeOptionNodes = [];
|
||||
if (options && options.type === "ObjectExpression" && !options.properties.some((p) => p.type === "SpreadElement" || p.computed)) {
|
||||
let removed = 0;
|
||||
for (let i = options.properties.length - 1; i >= 0; i--) {
|
||||
|
@ -47129,6 +47141,7 @@ function processDefineModel(ctx, node, declId) {
|
|||
} else {
|
||||
removed++;
|
||||
ctx.s.remove(ctx.startOffset + start, ctx.startOffset + end);
|
||||
runtimeOptionNodes.push(p);
|
||||
}
|
||||
}
|
||||
if (removed === options.properties.length) {
|
||||
|
@ -47142,6 +47155,7 @@ function processDefineModel(ctx, node, declId) {
|
|||
ctx.modelDecls[modelName] = {
|
||||
type,
|
||||
options: optionsString,
|
||||
runtimeOptionNodes,
|
||||
identifier: declId && declId.type === "Identifier" ? declId.name : void 0
|
||||
};
|
||||
ctx.bindingMetadata[modelName] = "props";
|
||||
|
@ -48202,6 +48216,11 @@ const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name}
|
|||
checkInvalidScopeReference(ctx.propsDestructureDecl, DEFINE_PROPS);
|
||||
checkInvalidScopeReference(ctx.emitsRuntimeDecl, DEFINE_EMITS);
|
||||
checkInvalidScopeReference(ctx.optionsRuntimeDecl, DEFINE_OPTIONS);
|
||||
for (const { runtimeOptionNodes } of Object.values(ctx.modelDecls)) {
|
||||
for (const node of runtimeOptionNodes) {
|
||||
checkInvalidScopeReference(node, DEFINE_MODEL);
|
||||
}
|
||||
}
|
||||
if (script) {
|
||||
if (startOffset < scriptStartOffset) {
|
||||
ctx.s.remove(0, startOffset);
|
||||
|
@ -48630,7 +48649,7 @@ var __spreadValues = (a, b) => {
|
|||
}
|
||||
return a;
|
||||
};
|
||||
const version = "3.4.5";
|
||||
const version = "3.4.15";
|
||||
const parseCache = parseCache$1;
|
||||
const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
|
||||
const walk = walk$2;
|
||||
|
|
13
node_modules/@vue/compiler-sfc/package.json
generated
vendored
13
node_modules/@vue/compiler-sfc/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/compiler-sfc",
|
||||
"version": "3.4.5",
|
||||
"version": "3.4.15",
|
||||
"description": "@vue/compiler-sfc",
|
||||
"main": "dist/compiler-sfc.cjs.js",
|
||||
"module": "dist/compiler-sfc.esm-browser.js",
|
||||
|
@ -12,6 +12,7 @@
|
|||
".": {
|
||||
"types": "./dist/compiler-sfc.d.ts",
|
||||
"node": "./dist/compiler-sfc.cjs.js",
|
||||
"module": "./dist/compiler-sfc.esm-browser.js",
|
||||
"import": "./dist/compiler-sfc.esm-browser.js",
|
||||
"require": "./dist/compiler-sfc.cjs.js"
|
||||
},
|
||||
|
@ -44,12 +45,12 @@
|
|||
"@babel/parser": "^7.23.6",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.30.5",
|
||||
"postcss": "^8.4.32",
|
||||
"postcss": "^8.4.33",
|
||||
"source-map-js": "^1.0.2",
|
||||
"@vue/compiler-core": "3.4.5",
|
||||
"@vue/compiler-ssr": "3.4.5",
|
||||
"@vue/compiler-dom": "3.4.5",
|
||||
"@vue/shared": "3.4.5"
|
||||
"@vue/compiler-core": "3.4.15",
|
||||
"@vue/shared": "3.4.15",
|
||||
"@vue/compiler-dom": "3.4.15",
|
||||
"@vue/compiler-ssr": "3.4.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/types": "^7.23.6",
|
||||
|
|
5
node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js
generated
vendored
5
node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/compiler-ssr v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
|
6
node_modules/@vue/compiler-ssr/package.json
generated
vendored
6
node_modules/@vue/compiler-ssr/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/compiler-ssr",
|
||||
"version": "3.4.5",
|
||||
"version": "3.4.15",
|
||||
"description": "@vue/compiler-ssr",
|
||||
"main": "dist/compiler-ssr.cjs.js",
|
||||
"types": "dist/compiler-ssr.d.ts",
|
||||
|
@ -28,7 +28,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme",
|
||||
"dependencies": {
|
||||
"@vue/shared": "3.4.5",
|
||||
"@vue/compiler-dom": "3.4.5"
|
||||
"@vue/shared": "3.4.15",
|
||||
"@vue/compiler-dom": "3.4.15"
|
||||
}
|
||||
}
|
56
node_modules/@vue/reactivity/dist/reactivity.cjs.js
generated
vendored
56
node_modules/@vue/reactivity/dist/reactivity.cjs.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/reactivity v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -119,7 +124,7 @@ class ReactiveEffect {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._dirtyLevel = 3;
|
||||
this._dirtyLevel = 2;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -131,7 +136,7 @@ class ReactiveEffect {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._queryings = 0;
|
||||
this._shouldSchedule = false;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -140,10 +145,9 @@ class ReactiveEffect {
|
|||
}
|
||||
get dirty() {
|
||||
if (this._dirtyLevel === 1) {
|
||||
this._dirtyLevel = 0;
|
||||
this._queryings++;
|
||||
pauseTracking();
|
||||
for (const dep of this.deps) {
|
||||
for (let i = 0; i < this._depsLength; i++) {
|
||||
const dep = this.deps[i];
|
||||
if (dep.computed) {
|
||||
triggerComputed(dep.computed);
|
||||
if (this._dirtyLevel >= 2) {
|
||||
|
@ -151,13 +155,15 @@ class ReactiveEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this._dirtyLevel < 2) {
|
||||
this._dirtyLevel = 0;
|
||||
}
|
||||
resetTracking();
|
||||
this._queryings--;
|
||||
}
|
||||
return this._dirtyLevel >= 2;
|
||||
}
|
||||
set dirty(v) {
|
||||
this._dirtyLevel = v ? 3 : 0;
|
||||
this._dirtyLevel = v ? 2 : 0;
|
||||
}
|
||||
run() {
|
||||
this._dirtyLevel = 0;
|
||||
|
@ -284,25 +290,29 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|||
var _a;
|
||||
pauseScheduling();
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (!effect2.allowRecurse && effect2._runnings) {
|
||||
continue;
|
||||
}
|
||||
if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
|
||||
if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) {
|
||||
const lastDirtyLevel = effect2._dirtyLevel;
|
||||
effect2._dirtyLevel = dirtyLevel;
|
||||
if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
|
||||
if (lastDirtyLevel === 0) {
|
||||
effect2._shouldSchedule = true;
|
||||
{
|
||||
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, shared.extend({ effect: effect2 }, debuggerEventExtraInfo));
|
||||
}
|
||||
effect2.trigger();
|
||||
if (effect2.scheduler) {
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scheduleEffects(dep);
|
||||
resetScheduling();
|
||||
}
|
||||
function scheduleEffects(dep) {
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
||||
effect2._shouldSchedule = false;
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const createDep = (cleanup, computed) => {
|
||||
const dep = /* @__PURE__ */ new Map();
|
||||
|
@ -385,7 +395,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|||
if (dep) {
|
||||
triggerEffects(
|
||||
dep,
|
||||
3,
|
||||
2,
|
||||
{
|
||||
target,
|
||||
type,
|
||||
|
@ -984,7 +994,8 @@ class ComputedRefImpl {
|
|||
this["__v_isReadonly"] = false;
|
||||
this.effect = new ReactiveEffect(
|
||||
() => getter(this._value),
|
||||
() => triggerRefValue(this, 1)
|
||||
() => triggerRefValue(this, 1),
|
||||
() => this.dep && scheduleEffects(this.dep)
|
||||
);
|
||||
this.effect.computed = this;
|
||||
this.effect.active = this._cacheable = !isSSR;
|
||||
|
@ -992,12 +1003,15 @@ class ComputedRefImpl {
|
|||
}
|
||||
get value() {
|
||||
const self = toRaw(this);
|
||||
trackRefValue(self);
|
||||
if (!self._cacheable || self.effect.dirty) {
|
||||
if (shared.hasChanged(self._value, self._value = self.effect.run())) {
|
||||
triggerRefValue(self, 2);
|
||||
}
|
||||
}
|
||||
trackRefValue(self);
|
||||
if (self.effect._dirtyLevel >= 1) {
|
||||
triggerRefValue(self, 1);
|
||||
}
|
||||
return self._value;
|
||||
}
|
||||
set value(newValue) {
|
||||
|
@ -1050,7 +1064,7 @@ function trackRefValue(ref2) {
|
|||
);
|
||||
}
|
||||
}
|
||||
function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
|
||||
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
||||
ref2 = toRaw(ref2);
|
||||
const dep = ref2.dep;
|
||||
if (dep) {
|
||||
|
@ -1099,12 +1113,12 @@ class RefImpl {
|
|||
if (shared.hasChanged(newVal, this._rawValue)) {
|
||||
this._rawValue = newVal;
|
||||
this._value = useDirectValue ? newVal : toReactive(newVal);
|
||||
triggerRefValue(this, 3, newVal);
|
||||
triggerRefValue(this, 2, newVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
function triggerRef(ref2) {
|
||||
triggerRefValue(ref2, 3, ref2.value );
|
||||
triggerRefValue(ref2, 2, ref2.value );
|
||||
}
|
||||
function unref(ref2) {
|
||||
return isRef(ref2) ? ref2.value : ref2;
|
||||
|
|
56
node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js
generated
vendored
56
node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/reactivity v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -109,7 +114,7 @@ class ReactiveEffect {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._dirtyLevel = 3;
|
||||
this._dirtyLevel = 2;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -121,7 +126,7 @@ class ReactiveEffect {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._queryings = 0;
|
||||
this._shouldSchedule = false;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -130,10 +135,9 @@ class ReactiveEffect {
|
|||
}
|
||||
get dirty() {
|
||||
if (this._dirtyLevel === 1) {
|
||||
this._dirtyLevel = 0;
|
||||
this._queryings++;
|
||||
pauseTracking();
|
||||
for (const dep of this.deps) {
|
||||
for (let i = 0; i < this._depsLength; i++) {
|
||||
const dep = this.deps[i];
|
||||
if (dep.computed) {
|
||||
triggerComputed(dep.computed);
|
||||
if (this._dirtyLevel >= 2) {
|
||||
|
@ -141,13 +145,15 @@ class ReactiveEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this._dirtyLevel < 2) {
|
||||
this._dirtyLevel = 0;
|
||||
}
|
||||
resetTracking();
|
||||
this._queryings--;
|
||||
}
|
||||
return this._dirtyLevel >= 2;
|
||||
}
|
||||
set dirty(v) {
|
||||
this._dirtyLevel = v ? 3 : 0;
|
||||
this._dirtyLevel = v ? 2 : 0;
|
||||
}
|
||||
run() {
|
||||
this._dirtyLevel = 0;
|
||||
|
@ -269,22 +275,26 @@ const queueEffectSchedulers = [];
|
|||
function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
||||
pauseScheduling();
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (!effect2.allowRecurse && effect2._runnings) {
|
||||
continue;
|
||||
}
|
||||
if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
|
||||
if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) {
|
||||
const lastDirtyLevel = effect2._dirtyLevel;
|
||||
effect2._dirtyLevel = dirtyLevel;
|
||||
if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
|
||||
if (lastDirtyLevel === 0) {
|
||||
effect2._shouldSchedule = true;
|
||||
effect2.trigger();
|
||||
if (effect2.scheduler) {
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scheduleEffects(dep);
|
||||
resetScheduling();
|
||||
}
|
||||
function scheduleEffects(dep) {
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
||||
effect2._shouldSchedule = false;
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const createDep = (cleanup, computed) => {
|
||||
const dep = /* @__PURE__ */ new Map();
|
||||
|
@ -361,7 +371,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|||
if (dep) {
|
||||
triggerEffects(
|
||||
dep,
|
||||
3);
|
||||
2);
|
||||
}
|
||||
}
|
||||
resetScheduling();
|
||||
|
@ -915,7 +925,8 @@ class ComputedRefImpl {
|
|||
this["__v_isReadonly"] = false;
|
||||
this.effect = new ReactiveEffect(
|
||||
() => getter(this._value),
|
||||
() => triggerRefValue(this, 1)
|
||||
() => triggerRefValue(this, 1),
|
||||
() => this.dep && scheduleEffects(this.dep)
|
||||
);
|
||||
this.effect.computed = this;
|
||||
this.effect.active = this._cacheable = !isSSR;
|
||||
|
@ -923,12 +934,15 @@ class ComputedRefImpl {
|
|||
}
|
||||
get value() {
|
||||
const self = toRaw(this);
|
||||
trackRefValue(self);
|
||||
if (!self._cacheable || self.effect.dirty) {
|
||||
if (shared.hasChanged(self._value, self._value = self.effect.run())) {
|
||||
triggerRefValue(self, 2);
|
||||
}
|
||||
}
|
||||
trackRefValue(self);
|
||||
if (self.effect._dirtyLevel >= 1) {
|
||||
triggerRefValue(self, 1);
|
||||
}
|
||||
return self._value;
|
||||
}
|
||||
set value(newValue) {
|
||||
|
@ -969,7 +983,7 @@ function trackRefValue(ref2) {
|
|||
)));
|
||||
}
|
||||
}
|
||||
function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
|
||||
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
||||
ref2 = toRaw(ref2);
|
||||
const dep = ref2.dep;
|
||||
if (dep) {
|
||||
|
@ -1011,12 +1025,12 @@ class RefImpl {
|
|||
if (shared.hasChanged(newVal, this._rawValue)) {
|
||||
this._rawValue = newVal;
|
||||
this._value = useDirectValue ? newVal : toReactive(newVal);
|
||||
triggerRefValue(this, 3);
|
||||
triggerRefValue(this, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
function triggerRef(ref2) {
|
||||
triggerRefValue(ref2, 3);
|
||||
triggerRefValue(ref2, 2);
|
||||
}
|
||||
function unref(ref2) {
|
||||
return isRef(ref2) ? ref2.value : ref2;
|
||||
|
|
56
node_modules/@vue/reactivity/dist/reactivity.esm-browser.js
generated
vendored
56
node_modules/@vue/reactivity/dist/reactivity.esm-browser.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/reactivity v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
function makeMap(str, expectsLowerCase) {
|
||||
const set = new Set(str.split(","));
|
||||
return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
|
||||
|
@ -154,7 +159,7 @@ class ReactiveEffect {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._dirtyLevel = 3;
|
||||
this._dirtyLevel = 2;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -166,7 +171,7 @@ class ReactiveEffect {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._queryings = 0;
|
||||
this._shouldSchedule = false;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -175,10 +180,9 @@ class ReactiveEffect {
|
|||
}
|
||||
get dirty() {
|
||||
if (this._dirtyLevel === 1) {
|
||||
this._dirtyLevel = 0;
|
||||
this._queryings++;
|
||||
pauseTracking();
|
||||
for (const dep of this.deps) {
|
||||
for (let i = 0; i < this._depsLength; i++) {
|
||||
const dep = this.deps[i];
|
||||
if (dep.computed) {
|
||||
triggerComputed(dep.computed);
|
||||
if (this._dirtyLevel >= 2) {
|
||||
|
@ -186,13 +190,15 @@ class ReactiveEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this._dirtyLevel < 2) {
|
||||
this._dirtyLevel = 0;
|
||||
}
|
||||
resetTracking();
|
||||
this._queryings--;
|
||||
}
|
||||
return this._dirtyLevel >= 2;
|
||||
}
|
||||
set dirty(v) {
|
||||
this._dirtyLevel = v ? 3 : 0;
|
||||
this._dirtyLevel = v ? 2 : 0;
|
||||
}
|
||||
run() {
|
||||
this._dirtyLevel = 0;
|
||||
|
@ -319,25 +325,29 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|||
var _a;
|
||||
pauseScheduling();
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (!effect2.allowRecurse && effect2._runnings) {
|
||||
continue;
|
||||
}
|
||||
if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
|
||||
if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) {
|
||||
const lastDirtyLevel = effect2._dirtyLevel;
|
||||
effect2._dirtyLevel = dirtyLevel;
|
||||
if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
|
||||
if (lastDirtyLevel === 0) {
|
||||
effect2._shouldSchedule = true;
|
||||
{
|
||||
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
||||
}
|
||||
effect2.trigger();
|
||||
if (effect2.scheduler) {
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scheduleEffects(dep);
|
||||
resetScheduling();
|
||||
}
|
||||
function scheduleEffects(dep) {
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
||||
effect2._shouldSchedule = false;
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const createDep = (cleanup, computed) => {
|
||||
const dep = /* @__PURE__ */ new Map();
|
||||
|
@ -420,7 +430,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|||
if (dep) {
|
||||
triggerEffects(
|
||||
dep,
|
||||
3,
|
||||
2,
|
||||
{
|
||||
target,
|
||||
type,
|
||||
|
@ -1019,7 +1029,8 @@ class ComputedRefImpl {
|
|||
this["__v_isReadonly"] = false;
|
||||
this.effect = new ReactiveEffect(
|
||||
() => getter(this._value),
|
||||
() => triggerRefValue(this, 1)
|
||||
() => triggerRefValue(this, 1),
|
||||
() => this.dep && scheduleEffects(this.dep)
|
||||
);
|
||||
this.effect.computed = this;
|
||||
this.effect.active = this._cacheable = !isSSR;
|
||||
|
@ -1027,12 +1038,15 @@ class ComputedRefImpl {
|
|||
}
|
||||
get value() {
|
||||
const self = toRaw(this);
|
||||
trackRefValue(self);
|
||||
if (!self._cacheable || self.effect.dirty) {
|
||||
if (hasChanged(self._value, self._value = self.effect.run())) {
|
||||
triggerRefValue(self, 2);
|
||||
}
|
||||
}
|
||||
trackRefValue(self);
|
||||
if (self.effect._dirtyLevel >= 1) {
|
||||
triggerRefValue(self, 1);
|
||||
}
|
||||
return self._value;
|
||||
}
|
||||
set value(newValue) {
|
||||
|
@ -1085,7 +1099,7 @@ function trackRefValue(ref2) {
|
|||
);
|
||||
}
|
||||
}
|
||||
function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
|
||||
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
||||
ref2 = toRaw(ref2);
|
||||
const dep = ref2.dep;
|
||||
if (dep) {
|
||||
|
@ -1134,12 +1148,12 @@ class RefImpl {
|
|||
if (hasChanged(newVal, this._rawValue)) {
|
||||
this._rawValue = newVal;
|
||||
this._value = useDirectValue ? newVal : toReactive(newVal);
|
||||
triggerRefValue(this, 3, newVal);
|
||||
triggerRefValue(this, 2, newVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
function triggerRef(ref2) {
|
||||
triggerRefValue(ref2, 3, ref2.value );
|
||||
triggerRefValue(ref2, 2, ref2.value );
|
||||
}
|
||||
function unref(ref2) {
|
||||
return isRef(ref2) ? ref2.value : ref2;
|
||||
|
|
7
node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js
generated
vendored
7
node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js
generated
vendored
File diff suppressed because one or more lines are too long
56
node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
generated
vendored
56
node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/reactivity v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
import { NOOP, extend, isArray, isSymbol, isMap, isIntegerKey, hasOwn, hasChanged, isObject, makeMap, capitalize, toRawType, def, isFunction } from '@vue/shared';
|
||||
|
||||
function warn(msg, ...args) {
|
||||
|
@ -115,7 +120,7 @@ class ReactiveEffect {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._dirtyLevel = 3;
|
||||
this._dirtyLevel = 2;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -127,7 +132,7 @@ class ReactiveEffect {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._queryings = 0;
|
||||
this._shouldSchedule = false;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -136,10 +141,9 @@ class ReactiveEffect {
|
|||
}
|
||||
get dirty() {
|
||||
if (this._dirtyLevel === 1) {
|
||||
this._dirtyLevel = 0;
|
||||
this._queryings++;
|
||||
pauseTracking();
|
||||
for (const dep of this.deps) {
|
||||
for (let i = 0; i < this._depsLength; i++) {
|
||||
const dep = this.deps[i];
|
||||
if (dep.computed) {
|
||||
triggerComputed(dep.computed);
|
||||
if (this._dirtyLevel >= 2) {
|
||||
|
@ -147,13 +151,15 @@ class ReactiveEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this._dirtyLevel < 2) {
|
||||
this._dirtyLevel = 0;
|
||||
}
|
||||
resetTracking();
|
||||
this._queryings--;
|
||||
}
|
||||
return this._dirtyLevel >= 2;
|
||||
}
|
||||
set dirty(v) {
|
||||
this._dirtyLevel = v ? 3 : 0;
|
||||
this._dirtyLevel = v ? 2 : 0;
|
||||
}
|
||||
run() {
|
||||
this._dirtyLevel = 0;
|
||||
|
@ -280,25 +286,29 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|||
var _a;
|
||||
pauseScheduling();
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (!effect2.allowRecurse && effect2._runnings) {
|
||||
continue;
|
||||
}
|
||||
if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
|
||||
if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) {
|
||||
const lastDirtyLevel = effect2._dirtyLevel;
|
||||
effect2._dirtyLevel = dirtyLevel;
|
||||
if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
|
||||
if (lastDirtyLevel === 0) {
|
||||
effect2._shouldSchedule = true;
|
||||
if (!!(process.env.NODE_ENV !== "production")) {
|
||||
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
||||
}
|
||||
effect2.trigger();
|
||||
if (effect2.scheduler) {
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scheduleEffects(dep);
|
||||
resetScheduling();
|
||||
}
|
||||
function scheduleEffects(dep) {
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
||||
effect2._shouldSchedule = false;
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const createDep = (cleanup, computed) => {
|
||||
const dep = /* @__PURE__ */ new Map();
|
||||
|
@ -381,7 +391,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|||
if (dep) {
|
||||
triggerEffects(
|
||||
dep,
|
||||
3,
|
||||
2,
|
||||
!!(process.env.NODE_ENV !== "production") ? {
|
||||
target,
|
||||
type,
|
||||
|
@ -980,7 +990,8 @@ class ComputedRefImpl {
|
|||
this["__v_isReadonly"] = false;
|
||||
this.effect = new ReactiveEffect(
|
||||
() => getter(this._value),
|
||||
() => triggerRefValue(this, 1)
|
||||
() => triggerRefValue(this, 1),
|
||||
() => this.dep && scheduleEffects(this.dep)
|
||||
);
|
||||
this.effect.computed = this;
|
||||
this.effect.active = this._cacheable = !isSSR;
|
||||
|
@ -988,12 +999,15 @@ class ComputedRefImpl {
|
|||
}
|
||||
get value() {
|
||||
const self = toRaw(this);
|
||||
trackRefValue(self);
|
||||
if (!self._cacheable || self.effect.dirty) {
|
||||
if (hasChanged(self._value, self._value = self.effect.run())) {
|
||||
triggerRefValue(self, 2);
|
||||
}
|
||||
}
|
||||
trackRefValue(self);
|
||||
if (self.effect._dirtyLevel >= 1) {
|
||||
triggerRefValue(self, 1);
|
||||
}
|
||||
return self._value;
|
||||
}
|
||||
set value(newValue) {
|
||||
|
@ -1046,7 +1060,7 @@ function trackRefValue(ref2) {
|
|||
);
|
||||
}
|
||||
}
|
||||
function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
|
||||
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
||||
ref2 = toRaw(ref2);
|
||||
const dep = ref2.dep;
|
||||
if (dep) {
|
||||
|
@ -1095,12 +1109,12 @@ class RefImpl {
|
|||
if (hasChanged(newVal, this._rawValue)) {
|
||||
this._rawValue = newVal;
|
||||
this._value = useDirectValue ? newVal : toReactive(newVal);
|
||||
triggerRefValue(this, 3, newVal);
|
||||
triggerRefValue(this, 2, newVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
function triggerRef(ref2) {
|
||||
triggerRefValue(ref2, 3, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
|
||||
triggerRefValue(ref2, 2, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
|
||||
}
|
||||
function unref(ref2) {
|
||||
return isRef(ref2) ? ref2.value : ref2;
|
||||
|
|
56
node_modules/@vue/reactivity/dist/reactivity.global.js
generated
vendored
56
node_modules/@vue/reactivity/dist/reactivity.global.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/reactivity v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
var VueReactivity = (function (exports) {
|
||||
'use strict';
|
||||
|
||||
|
@ -157,7 +162,7 @@ var VueReactivity = (function (exports) {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._dirtyLevel = 3;
|
||||
this._dirtyLevel = 2;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -169,7 +174,7 @@ var VueReactivity = (function (exports) {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._queryings = 0;
|
||||
this._shouldSchedule = false;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -178,10 +183,9 @@ var VueReactivity = (function (exports) {
|
|||
}
|
||||
get dirty() {
|
||||
if (this._dirtyLevel === 1) {
|
||||
this._dirtyLevel = 0;
|
||||
this._queryings++;
|
||||
pauseTracking();
|
||||
for (const dep of this.deps) {
|
||||
for (let i = 0; i < this._depsLength; i++) {
|
||||
const dep = this.deps[i];
|
||||
if (dep.computed) {
|
||||
triggerComputed(dep.computed);
|
||||
if (this._dirtyLevel >= 2) {
|
||||
|
@ -189,13 +193,15 @@ var VueReactivity = (function (exports) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this._dirtyLevel < 2) {
|
||||
this._dirtyLevel = 0;
|
||||
}
|
||||
resetTracking();
|
||||
this._queryings--;
|
||||
}
|
||||
return this._dirtyLevel >= 2;
|
||||
}
|
||||
set dirty(v) {
|
||||
this._dirtyLevel = v ? 3 : 0;
|
||||
this._dirtyLevel = v ? 2 : 0;
|
||||
}
|
||||
run() {
|
||||
this._dirtyLevel = 0;
|
||||
|
@ -322,25 +328,29 @@ var VueReactivity = (function (exports) {
|
|||
var _a;
|
||||
pauseScheduling();
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (!effect2.allowRecurse && effect2._runnings) {
|
||||
continue;
|
||||
}
|
||||
if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
|
||||
if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) {
|
||||
const lastDirtyLevel = effect2._dirtyLevel;
|
||||
effect2._dirtyLevel = dirtyLevel;
|
||||
if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
|
||||
if (lastDirtyLevel === 0) {
|
||||
effect2._shouldSchedule = true;
|
||||
{
|
||||
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
||||
}
|
||||
effect2.trigger();
|
||||
if (effect2.scheduler) {
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scheduleEffects(dep);
|
||||
resetScheduling();
|
||||
}
|
||||
function scheduleEffects(dep) {
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
||||
effect2._shouldSchedule = false;
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const createDep = (cleanup, computed) => {
|
||||
const dep = /* @__PURE__ */ new Map();
|
||||
|
@ -423,7 +433,7 @@ var VueReactivity = (function (exports) {
|
|||
if (dep) {
|
||||
triggerEffects(
|
||||
dep,
|
||||
3,
|
||||
2,
|
||||
{
|
||||
target,
|
||||
type,
|
||||
|
@ -1022,7 +1032,8 @@ var VueReactivity = (function (exports) {
|
|||
this["__v_isReadonly"] = false;
|
||||
this.effect = new ReactiveEffect(
|
||||
() => getter(this._value),
|
||||
() => triggerRefValue(this, 1)
|
||||
() => triggerRefValue(this, 1),
|
||||
() => this.dep && scheduleEffects(this.dep)
|
||||
);
|
||||
this.effect.computed = this;
|
||||
this.effect.active = this._cacheable = !isSSR;
|
||||
|
@ -1030,12 +1041,15 @@ var VueReactivity = (function (exports) {
|
|||
}
|
||||
get value() {
|
||||
const self = toRaw(this);
|
||||
trackRefValue(self);
|
||||
if (!self._cacheable || self.effect.dirty) {
|
||||
if (hasChanged(self._value, self._value = self.effect.run())) {
|
||||
triggerRefValue(self, 2);
|
||||
}
|
||||
}
|
||||
trackRefValue(self);
|
||||
if (self.effect._dirtyLevel >= 1) {
|
||||
triggerRefValue(self, 1);
|
||||
}
|
||||
return self._value;
|
||||
}
|
||||
set value(newValue) {
|
||||
|
@ -1088,7 +1102,7 @@ var VueReactivity = (function (exports) {
|
|||
);
|
||||
}
|
||||
}
|
||||
function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
|
||||
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
||||
ref2 = toRaw(ref2);
|
||||
const dep = ref2.dep;
|
||||
if (dep) {
|
||||
|
@ -1137,12 +1151,12 @@ var VueReactivity = (function (exports) {
|
|||
if (hasChanged(newVal, this._rawValue)) {
|
||||
this._rawValue = newVal;
|
||||
this._value = useDirectValue ? newVal : toReactive(newVal);
|
||||
triggerRefValue(this, 3, newVal);
|
||||
triggerRefValue(this, 2, newVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
function triggerRef(ref2) {
|
||||
triggerRefValue(ref2, 3, ref2.value );
|
||||
triggerRefValue(ref2, 2, ref2.value );
|
||||
}
|
||||
function unref(ref2) {
|
||||
return isRef(ref2) ? ref2.value : ref2;
|
||||
|
|
7
node_modules/@vue/reactivity/dist/reactivity.global.prod.js
generated
vendored
7
node_modules/@vue/reactivity/dist/reactivity.global.prod.js
generated
vendored
File diff suppressed because one or more lines are too long
5
node_modules/@vue/reactivity/package.json
generated
vendored
5
node_modules/@vue/reactivity/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/reactivity",
|
||||
"version": "3.4.5",
|
||||
"version": "3.4.15",
|
||||
"description": "@vue/reactivity",
|
||||
"main": "index.js",
|
||||
"module": "dist/reactivity.esm-bundler.js",
|
||||
|
@ -19,6 +19,7 @@
|
|||
"development": "./dist/reactivity.cjs.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"module": "./dist/reactivity.esm-bundler.js",
|
||||
"import": "./dist/reactivity.esm-bundler.js",
|
||||
"require": "./index.js"
|
||||
},
|
||||
|
@ -49,6 +50,6 @@
|
|||
},
|
||||
"homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme",
|
||||
"dependencies": {
|
||||
"@vue/shared": "3.4.5"
|
||||
"@vue/shared": "3.4.15"
|
||||
}
|
||||
}
|
285
node_modules/@vue/runtime-core/dist/runtime-core.cjs.js
generated
vendored
285
node_modules/@vue/runtime-core/dist/runtime-core.cjs.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/runtime-core v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -343,7 +348,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|||
}
|
||||
function flushPostFlushCbs(seen) {
|
||||
if (pendingPostFlushCbs.length) {
|
||||
const deduped = [...new Set(pendingPostFlushCbs)];
|
||||
const deduped = [...new Set(pendingPostFlushCbs)].sort(
|
||||
(a, b) => getId(a) - getId(b)
|
||||
);
|
||||
pendingPostFlushCbs.length = 0;
|
||||
if (activePostFlushCbs) {
|
||||
activePostFlushCbs.push(...deduped);
|
||||
|
@ -353,7 +360,6 @@ function flushPostFlushCbs(seen) {
|
|||
{
|
||||
seen = seen || /* @__PURE__ */ new Map();
|
||||
}
|
||||
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
||||
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
||||
if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
|
||||
continue;
|
||||
|
@ -977,9 +983,11 @@ function renderComponentRoot(instance) {
|
|||
const getChildRoot = (vnode) => {
|
||||
const rawChildren = vnode.children;
|
||||
const dynamicChildren = vnode.dynamicChildren;
|
||||
const childRoot = filterSingleRoot(rawChildren);
|
||||
const childRoot = filterSingleRoot(rawChildren, false);
|
||||
if (!childRoot) {
|
||||
return [vnode, void 0];
|
||||
} else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
|
||||
return getChildRoot(childRoot);
|
||||
}
|
||||
const index = rawChildren.indexOf(childRoot);
|
||||
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
|
||||
|
@ -995,7 +1003,7 @@ const getChildRoot = (vnode) => {
|
|||
};
|
||||
return [normalizeVNode(childRoot), setRoot];
|
||||
};
|
||||
function filterSingleRoot(children) {
|
||||
function filterSingleRoot(children, recurse = true) {
|
||||
let singleRoot;
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const child = children[i];
|
||||
|
@ -1005,6 +1013,9 @@ function filterSingleRoot(children) {
|
|||
return;
|
||||
} else {
|
||||
singleRoot = child;
|
||||
if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
|
||||
return filterSingleRoot(singleRoot.children);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -1095,8 +1106,6 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|||
return false;
|
||||
}
|
||||
function updateHOCHostEl({ vnode, parent }, el) {
|
||||
if (!el)
|
||||
return;
|
||||
while (parent) {
|
||||
const root = parent.subTree;
|
||||
if (root.suspense && root.suspense.activeBranch === vnode) {
|
||||
|
@ -1188,6 +1197,10 @@ const SuspenseImpl = {
|
|||
rendererInternals
|
||||
);
|
||||
} else {
|
||||
if (parentSuspense && parentSuspense.deps > 0) {
|
||||
n2.suspense = n1.suspense;
|
||||
return;
|
||||
}
|
||||
patchSuspense(
|
||||
n1,
|
||||
n2,
|
||||
|
@ -1446,6 +1459,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
{
|
||||
assertNumber(timeout, `Suspense timeout`);
|
||||
}
|
||||
const initialAnchor = anchor;
|
||||
const suspense = {
|
||||
vnode,
|
||||
parent: parentSuspense,
|
||||
|
@ -1453,7 +1467,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
namespace,
|
||||
container,
|
||||
hiddenContainer,
|
||||
anchor,
|
||||
deps: 0,
|
||||
pendingId: suspenseId++,
|
||||
timeout: typeof timeout === "number" ? timeout : -1,
|
||||
|
@ -1496,20 +1509,21 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
move(
|
||||
pendingBranch,
|
||||
container2,
|
||||
next(activeBranch),
|
||||
anchor === initialAnchor ? next(activeBranch) : anchor,
|
||||
0
|
||||
);
|
||||
queuePostFlushCb(effects);
|
||||
}
|
||||
};
|
||||
}
|
||||
let { anchor: anchor2 } = suspense;
|
||||
if (activeBranch) {
|
||||
anchor2 = next(activeBranch);
|
||||
if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
|
||||
anchor = next(activeBranch);
|
||||
}
|
||||
unmount(activeBranch, parentComponent2, suspense, true);
|
||||
}
|
||||
if (!delayEnter) {
|
||||
move(pendingBranch, container2, anchor2, 0);
|
||||
move(pendingBranch, container2, anchor, 0);
|
||||
}
|
||||
}
|
||||
setActiveBranch(suspense, pendingBranch);
|
||||
|
@ -1736,7 +1750,12 @@ function queueEffectWithSuspense(fn, suspense) {
|
|||
function setActiveBranch(suspense, branch) {
|
||||
suspense.activeBranch = branch;
|
||||
const { vnode, parentComponent } = suspense;
|
||||
const el = vnode.el = branch.el;
|
||||
let el = branch.el;
|
||||
while (!el && branch.component) {
|
||||
branch = branch.component.subTree;
|
||||
el = branch.el;
|
||||
}
|
||||
vnode.el = el;
|
||||
if (parentComponent && parentComponent.subTree === vnode) {
|
||||
parentComponent.vnode.el = el;
|
||||
updateHOCHostEl(parentComponent, el);
|
||||
|
@ -1983,14 +2002,9 @@ function instanceWatch(source, value, options) {
|
|||
cb = value.handler;
|
||||
options = value;
|
||||
}
|
||||
const cur = currentInstance;
|
||||
setCurrentInstance(this);
|
||||
const reset = setCurrentInstance(this);
|
||||
const res = doWatch(getter, cb.bind(publicThis), options);
|
||||
if (cur) {
|
||||
setCurrentInstance(cur);
|
||||
} else {
|
||||
unsetCurrentInstance();
|
||||
}
|
||||
reset();
|
||||
return res;
|
||||
}
|
||||
function createPathGetter(ctx, path) {
|
||||
|
@ -2042,12 +2056,11 @@ function validateDirectiveName(name) {
|
|||
}
|
||||
}
|
||||
function withDirectives(vnode, directives) {
|
||||
const internalInstance = currentRenderingInstance;
|
||||
if (internalInstance === null) {
|
||||
if (currentRenderingInstance === null) {
|
||||
warn$1(`withDirectives can only be used inside render functions.`);
|
||||
return vnode;
|
||||
}
|
||||
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
|
||||
const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;
|
||||
const bindings = vnode.dirs || (vnode.dirs = []);
|
||||
for (let i = 0; i < directives.length; i++) {
|
||||
let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i];
|
||||
|
@ -2833,9 +2846,9 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|||
return;
|
||||
}
|
||||
reactivity.pauseTracking();
|
||||
setCurrentInstance(target);
|
||||
const reset = setCurrentInstance(target);
|
||||
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
reactivity.resetTracking();
|
||||
return res;
|
||||
});
|
||||
|
@ -3288,58 +3301,6 @@ function useSlots() {
|
|||
function useAttrs() {
|
||||
return getContext().attrs;
|
||||
}
|
||||
function useModel(props, name, options = shared.EMPTY_OBJ) {
|
||||
const i = getCurrentInstance();
|
||||
if (!i) {
|
||||
warn$1(`useModel() called without active instance.`);
|
||||
return reactivity.ref();
|
||||
}
|
||||
if (!i.propsOptions[0][name]) {
|
||||
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
||||
return reactivity.ref();
|
||||
}
|
||||
const camelizedName = shared.camelize(name);
|
||||
const hyphenatedName = shared.hyphenate(name);
|
||||
const res = reactivity.customRef((track, trigger) => {
|
||||
let localValue;
|
||||
watchSyncEffect(() => {
|
||||
const propValue = props[name];
|
||||
if (shared.hasChanged(localValue, propValue)) {
|
||||
localValue = propValue;
|
||||
trigger();
|
||||
}
|
||||
});
|
||||
return {
|
||||
get() {
|
||||
track();
|
||||
return options.get ? options.get(localValue) : localValue;
|
||||
},
|
||||
set(value) {
|
||||
const rawProps = i.vnode.props;
|
||||
if (!(rawProps && // check if parent has passed v-model
|
||||
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && shared.hasChanged(value, localValue)) {
|
||||
localValue = value;
|
||||
trigger();
|
||||
}
|
||||
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
||||
}
|
||||
};
|
||||
});
|
||||
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
||||
res[Symbol.iterator] = () => {
|
||||
let i2 = 0;
|
||||
return {
|
||||
next() {
|
||||
if (i2 < 2) {
|
||||
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
||||
} else {
|
||||
return { done: true };
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
return res;
|
||||
}
|
||||
function getContext() {
|
||||
const i = getCurrentInstance();
|
||||
if (!i) {
|
||||
|
@ -4220,12 +4181,12 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|||
if (key in propsDefaults) {
|
||||
value = propsDefaults[key];
|
||||
} else {
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
value = propsDefaults[key] = defaultValue.call(
|
||||
null,
|
||||
props
|
||||
);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
} else {
|
||||
value = defaultValue;
|
||||
|
@ -4446,7 +4407,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
|
|||
return rawSlot;
|
||||
}
|
||||
const normalized = withCtx((...args) => {
|
||||
if (currentInstance) {
|
||||
if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
|
||||
warn$1(
|
||||
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
|
||||
);
|
||||
|
@ -4582,9 +4543,10 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|||
} else {
|
||||
const _isString = shared.isString(ref);
|
||||
const _isRef = reactivity.isRef(ref);
|
||||
const isVFor = rawRef.f;
|
||||
if (_isString || _isRef) {
|
||||
const doSet = () => {
|
||||
if (rawRef.f) {
|
||||
if (isVFor) {
|
||||
const existing = _isString ? shared.hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
|
||||
if (isUnmount) {
|
||||
shared.isArray(existing) && shared.remove(existing, refValue);
|
||||
|
@ -4617,11 +4579,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|||
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
||||
}
|
||||
};
|
||||
if (value) {
|
||||
if (isUnmount || isVFor) {
|
||||
doSet();
|
||||
} else {
|
||||
doSet.id = -1;
|
||||
queuePostRenderEffect(doSet, parentSuspense);
|
||||
} else {
|
||||
doSet();
|
||||
}
|
||||
} else {
|
||||
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
||||
|
@ -4920,7 +4882,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|||
if (props) {
|
||||
{
|
||||
for (const key in props) {
|
||||
if (propHasMismatch(el, key, props[key])) {
|
||||
if (propHasMismatch(el, key, props[key], vnode)) {
|
||||
hasMismatch = true;
|
||||
}
|
||||
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
||||
|
@ -5095,26 +5057,49 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|||
};
|
||||
return [hydrate, hydrateNode];
|
||||
}
|
||||
function propHasMismatch(el, key, clientValue) {
|
||||
function propHasMismatch(el, key, clientValue, vnode) {
|
||||
let mismatchType;
|
||||
let mismatchKey;
|
||||
let actual;
|
||||
let expected;
|
||||
if (key === "class") {
|
||||
actual = toClassSet(el.getAttribute("class") || "");
|
||||
expected = toClassSet(shared.normalizeClass(clientValue));
|
||||
if (!isSetEqual(actual, expected)) {
|
||||
actual = el.getAttribute("class");
|
||||
expected = shared.normalizeClass(clientValue);
|
||||
if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
|
||||
mismatchType = mismatchKey = `class`;
|
||||
}
|
||||
} else if (key === "style") {
|
||||
actual = el.getAttribute("style");
|
||||
expected = shared.isString(clientValue) ? clientValue : shared.stringifyStyle(shared.normalizeStyle(clientValue));
|
||||
if (actual !== expected) {
|
||||
const actualMap = toStyleMap(actual);
|
||||
const expectedMap = toStyleMap(expected);
|
||||
if (vnode.dirs) {
|
||||
for (const { dir, value } of vnode.dirs) {
|
||||
if (dir.name === "show" && !value) {
|
||||
expectedMap.set("display", "none");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isMapEqual(actualMap, expectedMap)) {
|
||||
mismatchType = mismatchKey = "style";
|
||||
}
|
||||
} else if (el instanceof SVGElement && shared.isKnownSvgAttr(key) || el instanceof HTMLElement && (shared.isBooleanAttr(key) || shared.isKnownHtmlAttr(key))) {
|
||||
actual = el.hasAttribute(key) && el.getAttribute(key);
|
||||
expected = shared.isBooleanAttr(key) ? shared.includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? false : String(clientValue);
|
||||
if (shared.isBooleanAttr(key)) {
|
||||
actual = el.hasAttribute(key);
|
||||
expected = shared.includeBooleanAttr(clientValue);
|
||||
} else if (clientValue == null) {
|
||||
actual = el.hasAttribute(key);
|
||||
expected = false;
|
||||
} else {
|
||||
if (el.hasAttribute(key)) {
|
||||
actual = el.getAttribute(key);
|
||||
} else if (key === "value" && el.tagName === "TEXTAREA") {
|
||||
actual = el.value;
|
||||
} else {
|
||||
actual = false;
|
||||
}
|
||||
expected = shared.isRenderableAttrValue(clientValue) ? String(clientValue) : false;
|
||||
}
|
||||
if (actual !== expected) {
|
||||
mismatchType = `attribute`;
|
||||
mismatchKey = key;
|
||||
|
@ -5122,15 +5107,15 @@ function propHasMismatch(el, key, clientValue) {
|
|||
}
|
||||
if (mismatchType) {
|
||||
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
||||
warn$1(
|
||||
`Hydration ${mismatchType} mismatch on`,
|
||||
el,
|
||||
`
|
||||
const preSegment = `Hydration ${mismatchType} mismatch on`;
|
||||
const postSegment = `
|
||||
- rendered on server: ${format(actual)}
|
||||
- expected on client: ${format(expected)}
|
||||
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
||||
You should fix the source of the mismatch.`
|
||||
);
|
||||
You should fix the source of the mismatch.`;
|
||||
{
|
||||
warn$1(preSegment, el, postSegment);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -5149,6 +5134,29 @@ function isSetEqual(a, b) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
function toStyleMap(str) {
|
||||
const styleMap = /* @__PURE__ */ new Map();
|
||||
for (const item of str.split(";")) {
|
||||
let [key, value] = item.split(":");
|
||||
key = key == null ? void 0 : key.trim();
|
||||
value = value == null ? void 0 : value.trim();
|
||||
if (key && value) {
|
||||
styleMap.set(key, value);
|
||||
}
|
||||
}
|
||||
return styleMap;
|
||||
}
|
||||
function isMapEqual(a, b) {
|
||||
if (a.size !== b.size) {
|
||||
return false;
|
||||
}
|
||||
for (const [key, value] of a) {
|
||||
if (value !== b.get(key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
let supported;
|
||||
let perf;
|
||||
|
@ -5737,7 +5745,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
hostInsert(fragmentStartAnchor, container, anchor);
|
||||
hostInsert(fragmentEndAnchor, container, anchor);
|
||||
mountChildren(
|
||||
n2.children,
|
||||
// #10007
|
||||
// such fragment like `<></>` will be compiled into
|
||||
// a fragment which doesn't have a children.
|
||||
// In this case fallback to an empty array
|
||||
n2.children || [],
|
||||
container,
|
||||
fragmentEndAnchor,
|
||||
parentComponent,
|
||||
|
@ -6571,6 +6583,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
}
|
||||
return hostNextSibling(vnode.anchor || vnode.el);
|
||||
};
|
||||
let isFlushing = false;
|
||||
const render = (vnode, container, namespace) => {
|
||||
if (vnode == null) {
|
||||
if (container._vnode) {
|
||||
|
@ -6587,8 +6600,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
namespace
|
||||
);
|
||||
}
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
if (!isFlushing) {
|
||||
isFlushing = true;
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
isFlushing = false;
|
||||
}
|
||||
container._vnode = vnode;
|
||||
};
|
||||
const internals = {
|
||||
|
@ -7458,8 +7475,13 @@ let setInSSRSetupState;
|
|||
);
|
||||
}
|
||||
const setCurrentInstance = (instance) => {
|
||||
const prev = currentInstance;
|
||||
internalSetCurrentInstance(instance);
|
||||
instance.scope.on();
|
||||
return () => {
|
||||
instance.scope.off();
|
||||
internalSetCurrentInstance(prev);
|
||||
};
|
||||
};
|
||||
const unsetCurrentInstance = () => {
|
||||
currentInstance && currentInstance.scope.off();
|
||||
|
@ -7521,7 +7543,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|||
const { setup } = Component;
|
||||
if (setup) {
|
||||
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
reactivity.pauseTracking();
|
||||
const setupResult = callWithErrorHandling(
|
||||
setup,
|
||||
|
@ -7533,7 +7555,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|||
]
|
||||
);
|
||||
reactivity.resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
if (shared.isPromise(setupResult)) {
|
||||
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
||||
if (isSSR) {
|
||||
|
@ -7629,13 +7651,13 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|||
}
|
||||
}
|
||||
{
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
reactivity.pauseTracking();
|
||||
try {
|
||||
applyOptions(instance);
|
||||
} finally {
|
||||
reactivity.resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
}
|
||||
if (!Component.render && instance.render === shared.NOOP && !isSSR) {
|
||||
|
@ -7766,6 +7788,59 @@ const computed = (getterOrOptions, debugOptions) => {
|
|||
return reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
||||
};
|
||||
|
||||
function useModel(props, name, options = shared.EMPTY_OBJ) {
|
||||
const i = getCurrentInstance();
|
||||
if (!i) {
|
||||
warn$1(`useModel() called without active instance.`);
|
||||
return reactivity.ref();
|
||||
}
|
||||
if (!i.propsOptions[0][name]) {
|
||||
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
||||
return reactivity.ref();
|
||||
}
|
||||
const camelizedName = shared.camelize(name);
|
||||
const hyphenatedName = shared.hyphenate(name);
|
||||
const res = reactivity.customRef((track, trigger) => {
|
||||
let localValue;
|
||||
watchSyncEffect(() => {
|
||||
const propValue = props[name];
|
||||
if (shared.hasChanged(localValue, propValue)) {
|
||||
localValue = propValue;
|
||||
trigger();
|
||||
}
|
||||
});
|
||||
return {
|
||||
get() {
|
||||
track();
|
||||
return options.get ? options.get(localValue) : localValue;
|
||||
},
|
||||
set(value) {
|
||||
const rawProps = i.vnode.props;
|
||||
if (!(rawProps && // check if parent has passed v-model
|
||||
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && shared.hasChanged(value, localValue)) {
|
||||
localValue = value;
|
||||
trigger();
|
||||
}
|
||||
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
||||
}
|
||||
};
|
||||
});
|
||||
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
||||
res[Symbol.iterator] = () => {
|
||||
let i2 = 0;
|
||||
return {
|
||||
next() {
|
||||
if (i2 < 2) {
|
||||
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
||||
} else {
|
||||
return { done: true };
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
return res;
|
||||
}
|
||||
|
||||
function h(type, propsOrChildren, children) {
|
||||
const l = arguments.length;
|
||||
if (l === 2) {
|
||||
|
@ -7992,7 +8067,7 @@ function isMemoSame(cached, memo) {
|
|||
return true;
|
||||
}
|
||||
|
||||
const version = "3.4.5";
|
||||
const version = "3.4.15";
|
||||
const warn = warn$1 ;
|
||||
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
||||
const devtools = devtools$1 ;
|
||||
|
|
188
node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js
generated
vendored
188
node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/runtime-core v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -102,7 +107,7 @@ function handleError(err, instance, type, throwInDev = true) {
|
|||
if (instance) {
|
||||
let cur = instance.parent;
|
||||
const exposedInstance = instance.proxy;
|
||||
const errorInfo = `https://vuejs.org/errors/#runtime-${type}`;
|
||||
const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`;
|
||||
while (cur) {
|
||||
const errorCapturedHooks = cur.ec;
|
||||
if (errorCapturedHooks) {
|
||||
|
@ -214,14 +219,15 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|||
}
|
||||
function flushPostFlushCbs(seen) {
|
||||
if (pendingPostFlushCbs.length) {
|
||||
const deduped = [...new Set(pendingPostFlushCbs)];
|
||||
const deduped = [...new Set(pendingPostFlushCbs)].sort(
|
||||
(a, b) => getId(a) - getId(b)
|
||||
);
|
||||
pendingPostFlushCbs.length = 0;
|
||||
if (activePostFlushCbs) {
|
||||
activePostFlushCbs.push(...deduped);
|
||||
return;
|
||||
}
|
||||
activePostFlushCbs = deduped;
|
||||
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
||||
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
||||
activePostFlushCbs[postFlushIndex]();
|
||||
}
|
||||
|
@ -509,7 +515,7 @@ function renderComponentRoot(instance) {
|
|||
setCurrentRenderingInstance(prev);
|
||||
return result;
|
||||
}
|
||||
function filterSingleRoot(children) {
|
||||
function filterSingleRoot(children, recurse = true) {
|
||||
let singleRoot;
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const child = children[i];
|
||||
|
@ -603,8 +609,6 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|||
return false;
|
||||
}
|
||||
function updateHOCHostEl({ vnode, parent }, el) {
|
||||
if (!el)
|
||||
return;
|
||||
while (parent) {
|
||||
const root = parent.subTree;
|
||||
if (root.suspense && root.suspense.activeBranch === vnode) {
|
||||
|
@ -687,6 +691,10 @@ const SuspenseImpl = {
|
|||
rendererInternals
|
||||
);
|
||||
} else {
|
||||
if (parentSuspense && parentSuspense.deps > 0) {
|
||||
n2.suspense = n1.suspense;
|
||||
return;
|
||||
}
|
||||
patchSuspense(
|
||||
n1,
|
||||
n2,
|
||||
|
@ -935,6 +943,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
}
|
||||
}
|
||||
const timeout = vnode.props ? shared.toNumber(vnode.props.timeout) : void 0;
|
||||
const initialAnchor = anchor;
|
||||
const suspense = {
|
||||
vnode,
|
||||
parent: parentSuspense,
|
||||
|
@ -942,7 +951,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
namespace,
|
||||
container,
|
||||
hiddenContainer,
|
||||
anchor,
|
||||
deps: 0,
|
||||
pendingId: suspenseId++,
|
||||
timeout: typeof timeout === "number" ? timeout : -1,
|
||||
|
@ -973,20 +981,21 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
move(
|
||||
pendingBranch,
|
||||
container2,
|
||||
next(activeBranch),
|
||||
anchor === initialAnchor ? next(activeBranch) : anchor,
|
||||
0
|
||||
);
|
||||
queuePostFlushCb(effects);
|
||||
}
|
||||
};
|
||||
}
|
||||
let { anchor: anchor2 } = suspense;
|
||||
if (activeBranch) {
|
||||
anchor2 = next(activeBranch);
|
||||
if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
|
||||
anchor = next(activeBranch);
|
||||
}
|
||||
unmount(activeBranch, parentComponent2, suspense, true);
|
||||
}
|
||||
if (!delayEnter) {
|
||||
move(pendingBranch, container2, anchor2, 0);
|
||||
move(pendingBranch, container2, anchor, 0);
|
||||
}
|
||||
}
|
||||
setActiveBranch(suspense, pendingBranch);
|
||||
|
@ -1204,7 +1213,12 @@ function queueEffectWithSuspense(fn, suspense) {
|
|||
function setActiveBranch(suspense, branch) {
|
||||
suspense.activeBranch = branch;
|
||||
const { vnode, parentComponent } = suspense;
|
||||
const el = vnode.el = branch.el;
|
||||
let el = branch.el;
|
||||
while (!el && branch.component) {
|
||||
branch = branch.component.subTree;
|
||||
el = branch.el;
|
||||
}
|
||||
vnode.el = el;
|
||||
if (parentComponent && parentComponent.subTree === vnode) {
|
||||
parentComponent.vnode.el = el;
|
||||
updateHOCHostEl(parentComponent, el);
|
||||
|
@ -1405,14 +1419,9 @@ function instanceWatch(source, value, options) {
|
|||
cb = value.handler;
|
||||
options = value;
|
||||
}
|
||||
const cur = currentInstance;
|
||||
setCurrentInstance(this);
|
||||
const reset = setCurrentInstance(this);
|
||||
const res = doWatch(getter, cb.bind(publicThis), options);
|
||||
if (cur) {
|
||||
setCurrentInstance(cur);
|
||||
} else {
|
||||
unsetCurrentInstance();
|
||||
}
|
||||
reset();
|
||||
return res;
|
||||
}
|
||||
function createPathGetter(ctx, path) {
|
||||
|
@ -1459,11 +1468,10 @@ function traverse(value, depth, currentDepth = 0, seen) {
|
|||
}
|
||||
|
||||
function withDirectives(vnode, directives) {
|
||||
const internalInstance = currentRenderingInstance;
|
||||
if (internalInstance === null) {
|
||||
if (currentRenderingInstance === null) {
|
||||
return vnode;
|
||||
}
|
||||
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
|
||||
const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;
|
||||
const bindings = vnode.dirs || (vnode.dirs = []);
|
||||
for (let i = 0; i < directives.length; i++) {
|
||||
let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i];
|
||||
|
@ -2219,9 +2227,9 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|||
return;
|
||||
}
|
||||
reactivity.pauseTracking();
|
||||
setCurrentInstance(target);
|
||||
const reset = setCurrentInstance(target);
|
||||
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
reactivity.resetTracking();
|
||||
return res;
|
||||
});
|
||||
|
@ -2527,50 +2535,6 @@ function useSlots() {
|
|||
function useAttrs() {
|
||||
return getContext().attrs;
|
||||
}
|
||||
function useModel(props, name, options = shared.EMPTY_OBJ) {
|
||||
const i = getCurrentInstance();
|
||||
const camelizedName = shared.camelize(name);
|
||||
const hyphenatedName = shared.hyphenate(name);
|
||||
const res = reactivity.customRef((track, trigger) => {
|
||||
let localValue;
|
||||
watchSyncEffect(() => {
|
||||
const propValue = props[name];
|
||||
if (shared.hasChanged(localValue, propValue)) {
|
||||
localValue = propValue;
|
||||
trigger();
|
||||
}
|
||||
});
|
||||
return {
|
||||
get() {
|
||||
track();
|
||||
return options.get ? options.get(localValue) : localValue;
|
||||
},
|
||||
set(value) {
|
||||
const rawProps = i.vnode.props;
|
||||
if (!(rawProps && // check if parent has passed v-model
|
||||
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && shared.hasChanged(value, localValue)) {
|
||||
localValue = value;
|
||||
trigger();
|
||||
}
|
||||
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
||||
}
|
||||
};
|
||||
});
|
||||
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
||||
res[Symbol.iterator] = () => {
|
||||
let i2 = 0;
|
||||
return {
|
||||
next() {
|
||||
if (i2 < 2) {
|
||||
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
||||
} else {
|
||||
return { done: true };
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
return res;
|
||||
}
|
||||
function getContext() {
|
||||
const i = getCurrentInstance();
|
||||
return i.setupContext || (i.setupContext = createSetupContext(i));
|
||||
|
@ -3279,12 +3243,12 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|||
if (key in propsDefaults) {
|
||||
value = propsDefaults[key];
|
||||
} else {
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
value = propsDefaults[key] = defaultValue.call(
|
||||
null,
|
||||
props
|
||||
);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
} else {
|
||||
value = defaultValue;
|
||||
|
@ -3507,9 +3471,10 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|||
} else {
|
||||
const _isString = shared.isString(ref);
|
||||
const _isRef = reactivity.isRef(ref);
|
||||
const isVFor = rawRef.f;
|
||||
if (_isString || _isRef) {
|
||||
const doSet = () => {
|
||||
if (rawRef.f) {
|
||||
if (isVFor) {
|
||||
const existing = _isString ? shared.hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
|
||||
if (isUnmount) {
|
||||
shared.isArray(existing) && shared.remove(existing, refValue);
|
||||
|
@ -3540,11 +3505,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|||
refs[rawRef.k] = value;
|
||||
} else ;
|
||||
};
|
||||
if (value) {
|
||||
if (isUnmount || isVFor) {
|
||||
doSet();
|
||||
} else {
|
||||
doSet.id = -1;
|
||||
queuePostRenderEffect(doSet, parentSuspense);
|
||||
} else {
|
||||
doSet();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4456,7 +4421,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
hostInsert(fragmentStartAnchor, container, anchor);
|
||||
hostInsert(fragmentEndAnchor, container, anchor);
|
||||
mountChildren(
|
||||
n2.children,
|
||||
// #10007
|
||||
// such fragment like `<></>` will be compiled into
|
||||
// a fragment which doesn't have a children.
|
||||
// In this case fallback to an empty array
|
||||
n2.children || [],
|
||||
container,
|
||||
fragmentEndAnchor,
|
||||
parentComponent,
|
||||
|
@ -5204,6 +5173,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
}
|
||||
return hostNextSibling(vnode.anchor || vnode.el);
|
||||
};
|
||||
let isFlushing = false;
|
||||
const render = (vnode, container, namespace) => {
|
||||
if (vnode == null) {
|
||||
if (container._vnode) {
|
||||
|
@ -5220,8 +5190,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
namespace
|
||||
);
|
||||
}
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
if (!isFlushing) {
|
||||
isFlushing = true;
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
isFlushing = false;
|
||||
}
|
||||
container._vnode = vnode;
|
||||
};
|
||||
const internals = {
|
||||
|
@ -6031,8 +6005,13 @@ let setInSSRSetupState;
|
|||
);
|
||||
}
|
||||
const setCurrentInstance = (instance) => {
|
||||
const prev = currentInstance;
|
||||
internalSetCurrentInstance(instance);
|
||||
instance.scope.on();
|
||||
return () => {
|
||||
instance.scope.off();
|
||||
internalSetCurrentInstance(prev);
|
||||
};
|
||||
};
|
||||
const unsetCurrentInstance = () => {
|
||||
currentInstance && currentInstance.scope.off();
|
||||
|
@ -6059,7 +6038,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|||
const { setup } = Component;
|
||||
if (setup) {
|
||||
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
reactivity.pauseTracking();
|
||||
const setupResult = callWithErrorHandling(
|
||||
setup,
|
||||
|
@ -6071,7 +6050,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|||
]
|
||||
);
|
||||
reactivity.resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
if (shared.isPromise(setupResult)) {
|
||||
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
||||
if (isSSR) {
|
||||
|
@ -6140,13 +6119,13 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|||
}
|
||||
}
|
||||
{
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
reactivity.pauseTracking();
|
||||
try {
|
||||
applyOptions(instance);
|
||||
} finally {
|
||||
reactivity.resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6203,6 +6182,51 @@ const computed = (getterOrOptions, debugOptions) => {
|
|||
return reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
||||
};
|
||||
|
||||
function useModel(props, name, options = shared.EMPTY_OBJ) {
|
||||
const i = getCurrentInstance();
|
||||
const camelizedName = shared.camelize(name);
|
||||
const hyphenatedName = shared.hyphenate(name);
|
||||
const res = reactivity.customRef((track, trigger) => {
|
||||
let localValue;
|
||||
watchSyncEffect(() => {
|
||||
const propValue = props[name];
|
||||
if (shared.hasChanged(localValue, propValue)) {
|
||||
localValue = propValue;
|
||||
trigger();
|
||||
}
|
||||
});
|
||||
return {
|
||||
get() {
|
||||
track();
|
||||
return options.get ? options.get(localValue) : localValue;
|
||||
},
|
||||
set(value) {
|
||||
const rawProps = i.vnode.props;
|
||||
if (!(rawProps && // check if parent has passed v-model
|
||||
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && shared.hasChanged(value, localValue)) {
|
||||
localValue = value;
|
||||
trigger();
|
||||
}
|
||||
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
||||
}
|
||||
};
|
||||
});
|
||||
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
||||
res[Symbol.iterator] = () => {
|
||||
let i2 = 0;
|
||||
return {
|
||||
next() {
|
||||
if (i2 < 2) {
|
||||
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
||||
} else {
|
||||
return { done: true };
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
return res;
|
||||
}
|
||||
|
||||
function h(type, propsOrChildren, children) {
|
||||
const l = arguments.length;
|
||||
if (l === 2) {
|
||||
|
@ -6255,7 +6279,7 @@ function isMemoSame(cached, memo) {
|
|||
return true;
|
||||
}
|
||||
|
||||
const version = "3.4.5";
|
||||
const version = "3.4.15";
|
||||
const warn$1 = shared.NOOP;
|
||||
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
||||
const devtools = void 0;
|
||||
|
|
26
node_modules/@vue/runtime-core/dist/runtime-core.d.ts
generated
vendored
26
node_modules/@vue/runtime-core/dist/runtime-core.d.ts
generated
vendored
|
@ -185,7 +185,6 @@ export interface SuspenseBoundary {
|
|||
namespace: ElementNamespace;
|
||||
container: RendererElement;
|
||||
hiddenContainer: RendererElement;
|
||||
anchor: RendererNode | null;
|
||||
activeBranch: VNode | null;
|
||||
pendingBranch: VNode | null;
|
||||
deps: number;
|
||||
|
@ -1282,6 +1281,10 @@ export type ModelRef<T, M extends string | number | symbol = string> = Ref<T> &
|
|||
ModelRef<T, M>,
|
||||
Record<M, true | undefined>
|
||||
];
|
||||
type DefineModelOptions<T = any> = {
|
||||
get?: (v: T) => any;
|
||||
set?: (v: T) => any;
|
||||
};
|
||||
/**
|
||||
* Vue `<script setup>` compiler macro for declaring a
|
||||
* two-way binding prop that can be consumed via `v-model` from the parent
|
||||
|
@ -1317,18 +1320,18 @@ export type ModelRef<T, M extends string | number | symbol = string> = Ref<T> &
|
|||
*/
|
||||
export declare function defineModel<T, M extends string | number | symbol = string>(options: {
|
||||
required: true;
|
||||
} & PropOptions<T> & UseModelOptions<T>): ModelRef<T, M>;
|
||||
} & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>;
|
||||
export declare function defineModel<T, M extends string | number | symbol = string>(options: {
|
||||
default: any;
|
||||
} & PropOptions<T> & UseModelOptions<T>): ModelRef<T, M>;
|
||||
export declare function defineModel<T, M extends string | number | symbol = string>(options?: PropOptions<T> & UseModelOptions<T>): ModelRef<T | undefined, M>;
|
||||
} & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>;
|
||||
export declare function defineModel<T, M extends string | number | symbol = string>(options?: PropOptions<T> & DefineModelOptions<T>): ModelRef<T | undefined, M>;
|
||||
export declare function defineModel<T, M extends string | number | symbol = string>(name: string, options: {
|
||||
required: true;
|
||||
} & PropOptions<T> & UseModelOptions<T>): ModelRef<T, M>;
|
||||
} & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>;
|
||||
export declare function defineModel<T, M extends string | number | symbol = string>(name: string, options: {
|
||||
default: any;
|
||||
} & PropOptions<T> & UseModelOptions<T>): ModelRef<T, M>;
|
||||
export declare function defineModel<T, M extends string | number | symbol = string>(name: string, options?: PropOptions<T> & UseModelOptions<T>): ModelRef<T | undefined, M>;
|
||||
} & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>;
|
||||
export declare function defineModel<T, M extends string | number | symbol = string>(name: string, options?: PropOptions<T> & DefineModelOptions<T>): ModelRef<T | undefined, M>;
|
||||
type NotUndefined<T> = T extends undefined ? never : T;
|
||||
type InferDefaults<T> = {
|
||||
[K in keyof T]?: InferDefault<T, T[K]>;
|
||||
|
@ -1363,11 +1366,8 @@ type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof
|
|||
export declare function withDefaults<T, BKeys extends keyof T, Defaults extends InferDefaults<T>>(props: DefineProps<T, BKeys>, defaults: Defaults): PropsWithDefaults<T, Defaults, BKeys>;
|
||||
export declare function useSlots(): SetupContext['slots'];
|
||||
export declare function useAttrs(): SetupContext['attrs'];
|
||||
type UseModelOptions<T = any> = {
|
||||
get?: (v: T) => any;
|
||||
set?: (v: T) => any;
|
||||
};
|
||||
export declare function useModel<M extends string | number | symbol, T extends Record<string, any>, K extends keyof T>(props: T, name: K, options?: UseModelOptions<T[K]>): ModelRef<T[K], M>;
|
||||
|
||||
export declare function useModel<M extends string | number | symbol, T extends Record<string, any>, K extends keyof T>(props: T, name: K, options?: DefineModelOptions<T[K]>): ModelRef<T[K], M>;
|
||||
|
||||
type RawProps = VNodeProps & {
|
||||
__v_isVNode?: never;
|
||||
|
@ -1396,7 +1396,7 @@ export declare function h(type: typeof Fragment, props?: RawProps | null, childr
|
|||
export declare function h(type: typeof Teleport, props: RawProps & TeleportProps, children: RawChildren | RawSlots): VNode;
|
||||
export declare function h(type: typeof Suspense, children?: RawChildren): VNode;
|
||||
export declare function h(type: typeof Suspense, props?: (RawProps & SuspenseProps) | null, children?: RawChildren | RawSlots): VNode;
|
||||
export declare function h<P, E extends EmitsOptions = {}, S extends Record<string, any> = {}>(type: FunctionalComponent<P, E, S>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode;
|
||||
export declare function h<P, E extends EmitsOptions = {}, S extends Record<string, any> = any>(type: FunctionalComponent<P, any, S, any>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | IfAny<S, RawSlots, S>): VNode;
|
||||
export declare function h(type: Component, children?: RawChildren): VNode;
|
||||
export declare function h<P>(type: ConcreteComponent | string, children?: RawChildren): VNode;
|
||||
export declare function h<P>(type: ConcreteComponent<P> | string, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren): VNode;
|
||||
|
|
295
node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
generated
vendored
295
node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
generated
vendored
|
@ -1,6 +1,11 @@
|
|||
import { pauseTracking, resetTracking, isRef, toRaw, isShallow as isShallow$1, isReactive, ReactiveEffect, getCurrentScope, ref, shallowReadonly, track, customRef, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';
|
||||
/**
|
||||
* @vue/runtime-core v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
import { pauseTracking, resetTracking, isRef, toRaw, isShallow as isShallow$1, isReactive, ReactiveEffect, getCurrentScope, ref, shallowReadonly, track, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, customRef, isReadonly } from '@vue/reactivity';
|
||||
export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
|
||||
import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr } from '@vue/shared';
|
||||
import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue } from '@vue/shared';
|
||||
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
|
||||
|
||||
const stack = [];
|
||||
|
@ -212,7 +217,7 @@ function handleError(err, instance, type, throwInDev = true) {
|
|||
if (instance) {
|
||||
let cur = instance.parent;
|
||||
const exposedInstance = instance.proxy;
|
||||
const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings$1[type] : `https://vuejs.org/errors/#runtime-${type}`;
|
||||
const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
|
||||
while (cur) {
|
||||
const errorCapturedHooks = cur.ec;
|
||||
if (errorCapturedHooks) {
|
||||
|
@ -345,7 +350,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|||
}
|
||||
function flushPostFlushCbs(seen) {
|
||||
if (pendingPostFlushCbs.length) {
|
||||
const deduped = [...new Set(pendingPostFlushCbs)];
|
||||
const deduped = [...new Set(pendingPostFlushCbs)].sort(
|
||||
(a, b) => getId(a) - getId(b)
|
||||
);
|
||||
pendingPostFlushCbs.length = 0;
|
||||
if (activePostFlushCbs) {
|
||||
activePostFlushCbs.push(...deduped);
|
||||
|
@ -355,7 +362,6 @@ function flushPostFlushCbs(seen) {
|
|||
if (!!(process.env.NODE_ENV !== "production")) {
|
||||
seen = seen || /* @__PURE__ */ new Map();
|
||||
}
|
||||
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
||||
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
||||
if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
|
||||
continue;
|
||||
|
@ -979,9 +985,11 @@ function renderComponentRoot(instance) {
|
|||
const getChildRoot = (vnode) => {
|
||||
const rawChildren = vnode.children;
|
||||
const dynamicChildren = vnode.dynamicChildren;
|
||||
const childRoot = filterSingleRoot(rawChildren);
|
||||
const childRoot = filterSingleRoot(rawChildren, false);
|
||||
if (!childRoot) {
|
||||
return [vnode, void 0];
|
||||
} else if (!!(process.env.NODE_ENV !== "production") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
|
||||
return getChildRoot(childRoot);
|
||||
}
|
||||
const index = rawChildren.indexOf(childRoot);
|
||||
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
|
||||
|
@ -997,7 +1005,7 @@ const getChildRoot = (vnode) => {
|
|||
};
|
||||
return [normalizeVNode(childRoot), setRoot];
|
||||
};
|
||||
function filterSingleRoot(children) {
|
||||
function filterSingleRoot(children, recurse = true) {
|
||||
let singleRoot;
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const child = children[i];
|
||||
|
@ -1007,6 +1015,9 @@ function filterSingleRoot(children) {
|
|||
return;
|
||||
} else {
|
||||
singleRoot = child;
|
||||
if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
|
||||
return filterSingleRoot(singleRoot.children);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -1097,8 +1108,6 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|||
return false;
|
||||
}
|
||||
function updateHOCHostEl({ vnode, parent }, el) {
|
||||
if (!el)
|
||||
return;
|
||||
while (parent) {
|
||||
const root = parent.subTree;
|
||||
if (root.suspense && root.suspense.activeBranch === vnode) {
|
||||
|
@ -1190,6 +1199,10 @@ const SuspenseImpl = {
|
|||
rendererInternals
|
||||
);
|
||||
} else {
|
||||
if (parentSuspense && parentSuspense.deps > 0) {
|
||||
n2.suspense = n1.suspense;
|
||||
return;
|
||||
}
|
||||
patchSuspense(
|
||||
n1,
|
||||
n2,
|
||||
|
@ -1448,6 +1461,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
if (!!(process.env.NODE_ENV !== "production")) {
|
||||
assertNumber(timeout, `Suspense timeout`);
|
||||
}
|
||||
const initialAnchor = anchor;
|
||||
const suspense = {
|
||||
vnode,
|
||||
parent: parentSuspense,
|
||||
|
@ -1455,7 +1469,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
namespace,
|
||||
container,
|
||||
hiddenContainer,
|
||||
anchor,
|
||||
deps: 0,
|
||||
pendingId: suspenseId++,
|
||||
timeout: typeof timeout === "number" ? timeout : -1,
|
||||
|
@ -1498,20 +1511,21 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
move(
|
||||
pendingBranch,
|
||||
container2,
|
||||
next(activeBranch),
|
||||
anchor === initialAnchor ? next(activeBranch) : anchor,
|
||||
0
|
||||
);
|
||||
queuePostFlushCb(effects);
|
||||
}
|
||||
};
|
||||
}
|
||||
let { anchor: anchor2 } = suspense;
|
||||
if (activeBranch) {
|
||||
anchor2 = next(activeBranch);
|
||||
if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
|
||||
anchor = next(activeBranch);
|
||||
}
|
||||
unmount(activeBranch, parentComponent2, suspense, true);
|
||||
}
|
||||
if (!delayEnter) {
|
||||
move(pendingBranch, container2, anchor2, 0);
|
||||
move(pendingBranch, container2, anchor, 0);
|
||||
}
|
||||
}
|
||||
setActiveBranch(suspense, pendingBranch);
|
||||
|
@ -1738,7 +1752,12 @@ function queueEffectWithSuspense(fn, suspense) {
|
|||
function setActiveBranch(suspense, branch) {
|
||||
suspense.activeBranch = branch;
|
||||
const { vnode, parentComponent } = suspense;
|
||||
const el = vnode.el = branch.el;
|
||||
let el = branch.el;
|
||||
while (!el && branch.component) {
|
||||
branch = branch.component.subTree;
|
||||
el = branch.el;
|
||||
}
|
||||
vnode.el = el;
|
||||
if (parentComponent && parentComponent.subTree === vnode) {
|
||||
parentComponent.vnode.el = el;
|
||||
updateHOCHostEl(parentComponent, el);
|
||||
|
@ -1985,14 +2004,9 @@ function instanceWatch(source, value, options) {
|
|||
cb = value.handler;
|
||||
options = value;
|
||||
}
|
||||
const cur = currentInstance;
|
||||
setCurrentInstance(this);
|
||||
const reset = setCurrentInstance(this);
|
||||
const res = doWatch(getter, cb.bind(publicThis), options);
|
||||
if (cur) {
|
||||
setCurrentInstance(cur);
|
||||
} else {
|
||||
unsetCurrentInstance();
|
||||
}
|
||||
reset();
|
||||
return res;
|
||||
}
|
||||
function createPathGetter(ctx, path) {
|
||||
|
@ -2044,12 +2058,11 @@ function validateDirectiveName(name) {
|
|||
}
|
||||
}
|
||||
function withDirectives(vnode, directives) {
|
||||
const internalInstance = currentRenderingInstance;
|
||||
if (internalInstance === null) {
|
||||
if (currentRenderingInstance === null) {
|
||||
!!(process.env.NODE_ENV !== "production") && warn$1(`withDirectives can only be used inside render functions.`);
|
||||
return vnode;
|
||||
}
|
||||
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
|
||||
const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;
|
||||
const bindings = vnode.dirs || (vnode.dirs = []);
|
||||
for (let i = 0; i < directives.length; i++) {
|
||||
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
||||
|
@ -2837,9 +2850,9 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|||
return;
|
||||
}
|
||||
pauseTracking();
|
||||
setCurrentInstance(target);
|
||||
const reset = setCurrentInstance(target);
|
||||
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
resetTracking();
|
||||
return res;
|
||||
});
|
||||
|
@ -3292,58 +3305,6 @@ function useSlots() {
|
|||
function useAttrs() {
|
||||
return getContext().attrs;
|
||||
}
|
||||
function useModel(props, name, options = EMPTY_OBJ) {
|
||||
const i = getCurrentInstance();
|
||||
if (!!(process.env.NODE_ENV !== "production") && !i) {
|
||||
warn$1(`useModel() called without active instance.`);
|
||||
return ref();
|
||||
}
|
||||
if (!!(process.env.NODE_ENV !== "production") && !i.propsOptions[0][name]) {
|
||||
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
||||
return ref();
|
||||
}
|
||||
const camelizedName = camelize(name);
|
||||
const hyphenatedName = hyphenate(name);
|
||||
const res = customRef((track, trigger) => {
|
||||
let localValue;
|
||||
watchSyncEffect(() => {
|
||||
const propValue = props[name];
|
||||
if (hasChanged(localValue, propValue)) {
|
||||
localValue = propValue;
|
||||
trigger();
|
||||
}
|
||||
});
|
||||
return {
|
||||
get() {
|
||||
track();
|
||||
return options.get ? options.get(localValue) : localValue;
|
||||
},
|
||||
set(value) {
|
||||
const rawProps = i.vnode.props;
|
||||
if (!(rawProps && // check if parent has passed v-model
|
||||
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
||||
localValue = value;
|
||||
trigger();
|
||||
}
|
||||
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
||||
}
|
||||
};
|
||||
});
|
||||
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
||||
res[Symbol.iterator] = () => {
|
||||
let i2 = 0;
|
||||
return {
|
||||
next() {
|
||||
if (i2 < 2) {
|
||||
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
||||
} else {
|
||||
return { done: true };
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
return res;
|
||||
}
|
||||
function getContext() {
|
||||
const i = getCurrentInstance();
|
||||
if (!!(process.env.NODE_ENV !== "production") && !i) {
|
||||
|
@ -4228,12 +4189,12 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|||
if (key in propsDefaults) {
|
||||
value = propsDefaults[key];
|
||||
} else {
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
value = propsDefaults[key] = defaultValue.call(
|
||||
null,
|
||||
props
|
||||
);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
} else {
|
||||
value = defaultValue;
|
||||
|
@ -4454,7 +4415,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
|
|||
return rawSlot;
|
||||
}
|
||||
const normalized = withCtx((...args) => {
|
||||
if (!!(process.env.NODE_ENV !== "production") && currentInstance) {
|
||||
if (!!(process.env.NODE_ENV !== "production") && currentInstance && (!ctx || ctx.root === currentInstance.root)) {
|
||||
warn$1(
|
||||
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
|
||||
);
|
||||
|
@ -4590,9 +4551,10 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|||
} else {
|
||||
const _isString = isString(ref);
|
||||
const _isRef = isRef(ref);
|
||||
const isVFor = rawRef.f;
|
||||
if (_isString || _isRef) {
|
||||
const doSet = () => {
|
||||
if (rawRef.f) {
|
||||
if (isVFor) {
|
||||
const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
|
||||
if (isUnmount) {
|
||||
isArray(existing) && remove(existing, refValue);
|
||||
|
@ -4625,11 +4587,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|||
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
||||
}
|
||||
};
|
||||
if (value) {
|
||||
if (isUnmount || isVFor) {
|
||||
doSet();
|
||||
} else {
|
||||
doSet.id = -1;
|
||||
queuePostRenderEffect(doSet, parentSuspense);
|
||||
} else {
|
||||
doSet();
|
||||
}
|
||||
} else if (!!(process.env.NODE_ENV !== "production")) {
|
||||
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
||||
|
@ -4928,7 +4890,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|||
if (props) {
|
||||
if (!!(process.env.NODE_ENV !== "production") || forcePatch || !optimized || patchFlag & (16 | 32)) {
|
||||
for (const key in props) {
|
||||
if (!!(process.env.NODE_ENV !== "production") && propHasMismatch(el, key, props[key])) {
|
||||
if (!!(process.env.NODE_ENV !== "production") && propHasMismatch(el, key, props[key], vnode)) {
|
||||
hasMismatch = true;
|
||||
}
|
||||
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
||||
|
@ -5113,26 +5075,49 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|||
};
|
||||
return [hydrate, hydrateNode];
|
||||
}
|
||||
function propHasMismatch(el, key, clientValue) {
|
||||
function propHasMismatch(el, key, clientValue, vnode) {
|
||||
let mismatchType;
|
||||
let mismatchKey;
|
||||
let actual;
|
||||
let expected;
|
||||
if (key === "class") {
|
||||
actual = toClassSet(el.getAttribute("class") || "");
|
||||
expected = toClassSet(normalizeClass(clientValue));
|
||||
if (!isSetEqual(actual, expected)) {
|
||||
actual = el.getAttribute("class");
|
||||
expected = normalizeClass(clientValue);
|
||||
if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
|
||||
mismatchType = mismatchKey = `class`;
|
||||
}
|
||||
} else if (key === "style") {
|
||||
actual = el.getAttribute("style");
|
||||
expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
|
||||
if (actual !== expected) {
|
||||
const actualMap = toStyleMap(actual);
|
||||
const expectedMap = toStyleMap(expected);
|
||||
if (vnode.dirs) {
|
||||
for (const { dir, value } of vnode.dirs) {
|
||||
if (dir.name === "show" && !value) {
|
||||
expectedMap.set("display", "none");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isMapEqual(actualMap, expectedMap)) {
|
||||
mismatchType = mismatchKey = "style";
|
||||
}
|
||||
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
||||
actual = el.hasAttribute(key) && el.getAttribute(key);
|
||||
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? false : String(clientValue);
|
||||
if (isBooleanAttr(key)) {
|
||||
actual = el.hasAttribute(key);
|
||||
expected = includeBooleanAttr(clientValue);
|
||||
} else if (clientValue == null) {
|
||||
actual = el.hasAttribute(key);
|
||||
expected = false;
|
||||
} else {
|
||||
if (el.hasAttribute(key)) {
|
||||
actual = el.getAttribute(key);
|
||||
} else if (key === "value" && el.tagName === "TEXTAREA") {
|
||||
actual = el.value;
|
||||
} else {
|
||||
actual = false;
|
||||
}
|
||||
expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
|
||||
}
|
||||
if (actual !== expected) {
|
||||
mismatchType = `attribute`;
|
||||
mismatchKey = key;
|
||||
|
@ -5140,15 +5125,15 @@ function propHasMismatch(el, key, clientValue) {
|
|||
}
|
||||
if (mismatchType) {
|
||||
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
||||
warn$1(
|
||||
`Hydration ${mismatchType} mismatch on`,
|
||||
el,
|
||||
`
|
||||
const preSegment = `Hydration ${mismatchType} mismatch on`;
|
||||
const postSegment = `
|
||||
- rendered on server: ${format(actual)}
|
||||
- expected on client: ${format(expected)}
|
||||
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
||||
You should fix the source of the mismatch.`
|
||||
);
|
||||
You should fix the source of the mismatch.`;
|
||||
{
|
||||
warn$1(preSegment, el, postSegment);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -5167,6 +5152,29 @@ function isSetEqual(a, b) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
function toStyleMap(str) {
|
||||
const styleMap = /* @__PURE__ */ new Map();
|
||||
for (const item of str.split(";")) {
|
||||
let [key, value] = item.split(":");
|
||||
key = key == null ? void 0 : key.trim();
|
||||
value = value == null ? void 0 : value.trim();
|
||||
if (key && value) {
|
||||
styleMap.set(key, value);
|
||||
}
|
||||
}
|
||||
return styleMap;
|
||||
}
|
||||
function isMapEqual(a, b) {
|
||||
if (a.size !== b.size) {
|
||||
return false;
|
||||
}
|
||||
for (const [key, value] of a) {
|
||||
if (value !== b.get(key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
let supported;
|
||||
let perf;
|
||||
|
@ -5780,7 +5788,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
hostInsert(fragmentStartAnchor, container, anchor);
|
||||
hostInsert(fragmentEndAnchor, container, anchor);
|
||||
mountChildren(
|
||||
n2.children,
|
||||
// #10007
|
||||
// such fragment like `<></>` will be compiled into
|
||||
// a fragment which doesn't have a children.
|
||||
// In this case fallback to an empty array
|
||||
n2.children || [],
|
||||
container,
|
||||
fragmentEndAnchor,
|
||||
parentComponent,
|
||||
|
@ -6627,6 +6639,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
}
|
||||
return hostNextSibling(vnode.anchor || vnode.el);
|
||||
};
|
||||
let isFlushing = false;
|
||||
const render = (vnode, container, namespace) => {
|
||||
if (vnode == null) {
|
||||
if (container._vnode) {
|
||||
|
@ -6643,8 +6656,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
namespace
|
||||
);
|
||||
}
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
if (!isFlushing) {
|
||||
isFlushing = true;
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
isFlushing = false;
|
||||
}
|
||||
container._vnode = vnode;
|
||||
};
|
||||
const internals = {
|
||||
|
@ -7516,8 +7533,13 @@ let setInSSRSetupState;
|
|||
);
|
||||
}
|
||||
const setCurrentInstance = (instance) => {
|
||||
const prev = currentInstance;
|
||||
internalSetCurrentInstance(instance);
|
||||
instance.scope.on();
|
||||
return () => {
|
||||
instance.scope.off();
|
||||
internalSetCurrentInstance(prev);
|
||||
};
|
||||
};
|
||||
const unsetCurrentInstance = () => {
|
||||
currentInstance && currentInstance.scope.off();
|
||||
|
@ -7579,7 +7601,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|||
const { setup } = Component;
|
||||
if (setup) {
|
||||
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
pauseTracking();
|
||||
const setupResult = callWithErrorHandling(
|
||||
setup,
|
||||
|
@ -7591,7 +7613,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|||
]
|
||||
);
|
||||
resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
if (isPromise(setupResult)) {
|
||||
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
||||
if (isSSR) {
|
||||
|
@ -7687,13 +7709,13 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|||
}
|
||||
}
|
||||
if (__VUE_OPTIONS_API__ && true) {
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
pauseTracking();
|
||||
try {
|
||||
applyOptions(instance);
|
||||
} finally {
|
||||
resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
}
|
||||
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
|
||||
|
@ -7838,6 +7860,59 @@ const computed = (getterOrOptions, debugOptions) => {
|
|||
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
||||
};
|
||||
|
||||
function useModel(props, name, options = EMPTY_OBJ) {
|
||||
const i = getCurrentInstance();
|
||||
if (!!(process.env.NODE_ENV !== "production") && !i) {
|
||||
warn$1(`useModel() called without active instance.`);
|
||||
return ref();
|
||||
}
|
||||
if (!!(process.env.NODE_ENV !== "production") && !i.propsOptions[0][name]) {
|
||||
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
||||
return ref();
|
||||
}
|
||||
const camelizedName = camelize(name);
|
||||
const hyphenatedName = hyphenate(name);
|
||||
const res = customRef((track, trigger) => {
|
||||
let localValue;
|
||||
watchSyncEffect(() => {
|
||||
const propValue = props[name];
|
||||
if (hasChanged(localValue, propValue)) {
|
||||
localValue = propValue;
|
||||
trigger();
|
||||
}
|
||||
});
|
||||
return {
|
||||
get() {
|
||||
track();
|
||||
return options.get ? options.get(localValue) : localValue;
|
||||
},
|
||||
set(value) {
|
||||
const rawProps = i.vnode.props;
|
||||
if (!(rawProps && // check if parent has passed v-model
|
||||
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
||||
localValue = value;
|
||||
trigger();
|
||||
}
|
||||
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
||||
}
|
||||
};
|
||||
});
|
||||
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
||||
res[Symbol.iterator] = () => {
|
||||
let i2 = 0;
|
||||
return {
|
||||
next() {
|
||||
if (i2 < 2) {
|
||||
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
||||
} else {
|
||||
return { done: true };
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
return res;
|
||||
}
|
||||
|
||||
function h(type, propsOrChildren, children) {
|
||||
const l = arguments.length;
|
||||
if (l === 2) {
|
||||
|
@ -8064,11 +8139,11 @@ function isMemoSame(cached, memo) {
|
|||
return true;
|
||||
}
|
||||
|
||||
const version = "3.4.5";
|
||||
const version = "3.4.15";
|
||||
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
||||
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
||||
const devtools = !!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__ ? devtools$1 : void 0;
|
||||
const setDevtoolsHook = !!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__ ? setDevtoolsHook$1 : NOOP;
|
||||
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
||||
const setDevtoolsHook = !!(process.env.NODE_ENV !== "production") || true ? setDevtoolsHook$1 : NOOP;
|
||||
const _ssrUtils = {
|
||||
createComponentInstance,
|
||||
setupComponent,
|
||||
|
|
7
node_modules/@vue/runtime-core/package.json
generated
vendored
7
node_modules/@vue/runtime-core/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/runtime-core",
|
||||
"version": "3.4.5",
|
||||
"version": "3.4.15",
|
||||
"description": "@vue/runtime-core",
|
||||
"main": "index.js",
|
||||
"module": "dist/runtime-core.esm-bundler.js",
|
||||
|
@ -17,6 +17,7 @@
|
|||
"development": "./dist/runtime-core.cjs.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"module": "./dist/runtime-core.esm-bundler.js",
|
||||
"import": "./dist/runtime-core.esm-bundler.js",
|
||||
"require": "./index.js"
|
||||
},
|
||||
|
@ -45,7 +46,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
||||
"dependencies": {
|
||||
"@vue/shared": "3.4.5",
|
||||
"@vue/reactivity": "3.4.5"
|
||||
"@vue/shared": "3.4.15",
|
||||
"@vue/reactivity": "3.4.15"
|
||||
}
|
||||
}
|
49
node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js
generated
vendored
49
node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/runtime-dom v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -392,6 +397,9 @@ const vShow = {
|
|||
setDisplay(el, value);
|
||||
}
|
||||
};
|
||||
{
|
||||
vShow.name = "show";
|
||||
}
|
||||
function setDisplay(el, value) {
|
||||
el.style.display = value ? el[vShowOldKey] : "none";
|
||||
}
|
||||
|
@ -410,6 +418,7 @@ function useCssVars(getter) {
|
|||
|
||||
function patchStyle(el, prev, next) {
|
||||
const style = el.style;
|
||||
const currentDisplay = style.display;
|
||||
const isCssString = shared.isString(next);
|
||||
if (next && !isCssString) {
|
||||
if (prev && !shared.isString(prev)) {
|
||||
|
@ -423,7 +432,6 @@ function patchStyle(el, prev, next) {
|
|||
setStyle(style, key, next[key]);
|
||||
}
|
||||
} else {
|
||||
const currentDisplay = style.display;
|
||||
if (isCssString) {
|
||||
if (prev !== next) {
|
||||
const cssVarText = style[CSS_VAR_TEXT];
|
||||
|
@ -435,9 +443,9 @@ function patchStyle(el, prev, next) {
|
|||
} else if (prev) {
|
||||
el.removeAttribute("style");
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
const semicolonRE = /[^\\];\s*$/;
|
||||
|
@ -1204,35 +1212,52 @@ const vModelSelect = {
|
|||
el[assignKey](
|
||||
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
||||
);
|
||||
el._assigning = true;
|
||||
runtimeCore.nextTick(() => {
|
||||
el._assigning = false;
|
||||
});
|
||||
});
|
||||
el[assignKey] = getModelAssigner(vnode);
|
||||
},
|
||||
// set value in mounted & updated because <select> relies on its children
|
||||
// <option>s.
|
||||
mounted(el, { value }) {
|
||||
setSelected(el, value);
|
||||
mounted(el, { value, oldValue, modifiers: { number } }) {
|
||||
setSelected(el, value, oldValue, number);
|
||||
},
|
||||
beforeUpdate(el, _binding, vnode) {
|
||||
el[assignKey] = getModelAssigner(vnode);
|
||||
},
|
||||
updated(el, { value }) {
|
||||
setSelected(el, value);
|
||||
updated(el, { value, oldValue, modifiers: { number } }) {
|
||||
if (!el._assigning) {
|
||||
setSelected(el, value, oldValue, number);
|
||||
}
|
||||
}
|
||||
};
|
||||
function setSelected(el, value) {
|
||||
function setSelected(el, value, oldValue, number) {
|
||||
const isMultiple = el.multiple;
|
||||
if (isMultiple && !shared.isArray(value) && !shared.isSet(value)) {
|
||||
const isArrayValue = shared.isArray(value);
|
||||
if (isMultiple && !isArrayValue && !shared.isSet(value)) {
|
||||
runtimeCore.warn(
|
||||
`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (isArrayValue && shared.looseEqual(value, oldValue)) {
|
||||
return;
|
||||
}
|
||||
for (let i = 0, l = el.options.length; i < l; i++) {
|
||||
const option = el.options[i];
|
||||
const optionValue = getValue(option);
|
||||
if (isMultiple) {
|
||||
if (shared.isArray(value)) {
|
||||
option.selected = shared.looseIndexOf(value, optionValue) > -1;
|
||||
if (isArrayValue) {
|
||||
const optionType = typeof optionValue;
|
||||
if (optionType === "string" || optionType === "number") {
|
||||
option.selected = value.includes(
|
||||
number ? shared.looseToNumber(optionValue) : optionValue
|
||||
);
|
||||
} else {
|
||||
option.selected = shared.looseIndexOf(value, optionValue) > -1;
|
||||
}
|
||||
} else {
|
||||
option.selected = value.has(optionValue);
|
||||
}
|
||||
|
|
46
node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js
generated
vendored
46
node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/runtime-dom v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -407,6 +412,7 @@ function useCssVars(getter) {
|
|||
|
||||
function patchStyle(el, prev, next) {
|
||||
const style = el.style;
|
||||
const currentDisplay = style.display;
|
||||
const isCssString = shared.isString(next);
|
||||
if (next && !isCssString) {
|
||||
if (prev && !shared.isString(prev)) {
|
||||
|
@ -420,7 +426,6 @@ function patchStyle(el, prev, next) {
|
|||
setStyle(style, key, next[key]);
|
||||
}
|
||||
} else {
|
||||
const currentDisplay = style.display;
|
||||
if (isCssString) {
|
||||
if (prev !== next) {
|
||||
const cssVarText = style[CSS_VAR_TEXT];
|
||||
|
@ -432,9 +437,9 @@ function patchStyle(el, prev, next) {
|
|||
} else if (prev) {
|
||||
el.removeAttribute("style");
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
const importantRE = /\s*!important$/;
|
||||
|
@ -1163,32 +1168,49 @@ const vModelSelect = {
|
|||
el[assignKey](
|
||||
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
||||
);
|
||||
el._assigning = true;
|
||||
runtimeCore.nextTick(() => {
|
||||
el._assigning = false;
|
||||
});
|
||||
});
|
||||
el[assignKey] = getModelAssigner(vnode);
|
||||
},
|
||||
// set value in mounted & updated because <select> relies on its children
|
||||
// <option>s.
|
||||
mounted(el, { value }) {
|
||||
setSelected(el, value);
|
||||
mounted(el, { value, oldValue, modifiers: { number } }) {
|
||||
setSelected(el, value, oldValue, number);
|
||||
},
|
||||
beforeUpdate(el, _binding, vnode) {
|
||||
el[assignKey] = getModelAssigner(vnode);
|
||||
},
|
||||
updated(el, { value }) {
|
||||
setSelected(el, value);
|
||||
updated(el, { value, oldValue, modifiers: { number } }) {
|
||||
if (!el._assigning) {
|
||||
setSelected(el, value, oldValue, number);
|
||||
}
|
||||
}
|
||||
};
|
||||
function setSelected(el, value) {
|
||||
function setSelected(el, value, oldValue, number) {
|
||||
const isMultiple = el.multiple;
|
||||
if (isMultiple && !shared.isArray(value) && !shared.isSet(value)) {
|
||||
const isArrayValue = shared.isArray(value);
|
||||
if (isMultiple && !isArrayValue && !shared.isSet(value)) {
|
||||
return;
|
||||
}
|
||||
if (isArrayValue && shared.looseEqual(value, oldValue)) {
|
||||
return;
|
||||
}
|
||||
for (let i = 0, l = el.options.length; i < l; i++) {
|
||||
const option = el.options[i];
|
||||
const optionValue = getValue(option);
|
||||
if (isMultiple) {
|
||||
if (shared.isArray(value)) {
|
||||
option.selected = shared.looseIndexOf(value, optionValue) > -1;
|
||||
if (isArrayValue) {
|
||||
const optionType = typeof optionValue;
|
||||
if (optionType === "string" || optionType === "number") {
|
||||
option.selected = value.includes(
|
||||
number ? shared.looseToNumber(optionValue) : optionValue
|
||||
);
|
||||
} else {
|
||||
option.selected = shared.looseIndexOf(value, optionValue) > -1;
|
||||
}
|
||||
} else {
|
||||
option.selected = value.has(optionValue);
|
||||
}
|
||||
|
|
7
node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
generated
vendored
7
node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
generated
vendored
|
@ -92,6 +92,7 @@ type AssignerFn = (value: any) => void;
|
|||
declare const assignKey: unique symbol;
|
||||
type ModelDirective<T> = ObjectDirective<T & {
|
||||
[assignKey]: AssignerFn;
|
||||
_assigning?: boolean;
|
||||
}>;
|
||||
export declare const vModelText: ModelDirective<HTMLInputElement | HTMLTextAreaElement>;
|
||||
export declare const vModelCheckbox: ModelDirective<HTMLInputElement>;
|
||||
|
@ -120,7 +121,9 @@ declare const vShowOldKey: unique symbol;
|
|||
interface VShowElement extends HTMLElement {
|
||||
[vShowOldKey]: string;
|
||||
}
|
||||
export declare const vShow: ObjectDirective<VShowElement>;
|
||||
export declare const vShow: ObjectDirective<VShowElement> & {
|
||||
name?: 'show';
|
||||
};
|
||||
|
||||
export interface CSSProperties extends CSS.Properties<string | number>, CSS.PropertiesHyphen<string | number> {
|
||||
/**
|
||||
|
@ -704,7 +707,7 @@ export interface TextareaHTMLAttributes extends HTMLAttributes {
|
|||
readonly?: Booleanish;
|
||||
required?: Booleanish;
|
||||
rows?: Numberish;
|
||||
value?: string | ReadonlyArray<string> | number;
|
||||
value?: string | ReadonlyArray<string> | number | null;
|
||||
wrap?: string;
|
||||
}
|
||||
export interface TdHTMLAttributes extends HTMLAttributes {
|
||||
|
|
387
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js
generated
vendored
387
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/runtime-dom v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
function makeMap(str, expectsLowerCase) {
|
||||
const set = new Set(str.split(","));
|
||||
return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
|
||||
|
@ -195,6 +200,13 @@ const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
|
|||
const isKnownSvgAttr = /* @__PURE__ */ makeMap(
|
||||
`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
|
||||
);
|
||||
function isRenderableAttrValue(value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
const type = typeof value;
|
||||
return type === "string" || type === "number" || type === "boolean";
|
||||
}
|
||||
|
||||
function looseCompareArrays(a, b) {
|
||||
if (a.length !== b.length)
|
||||
|
@ -395,7 +407,7 @@ class ReactiveEffect {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._dirtyLevel = 3;
|
||||
this._dirtyLevel = 2;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -407,7 +419,7 @@ class ReactiveEffect {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._queryings = 0;
|
||||
this._shouldSchedule = false;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -416,10 +428,9 @@ class ReactiveEffect {
|
|||
}
|
||||
get dirty() {
|
||||
if (this._dirtyLevel === 1) {
|
||||
this._dirtyLevel = 0;
|
||||
this._queryings++;
|
||||
pauseTracking();
|
||||
for (const dep of this.deps) {
|
||||
for (let i = 0; i < this._depsLength; i++) {
|
||||
const dep = this.deps[i];
|
||||
if (dep.computed) {
|
||||
triggerComputed(dep.computed);
|
||||
if (this._dirtyLevel >= 2) {
|
||||
|
@ -427,13 +438,15 @@ class ReactiveEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this._dirtyLevel < 2) {
|
||||
this._dirtyLevel = 0;
|
||||
}
|
||||
resetTracking();
|
||||
this._queryings--;
|
||||
}
|
||||
return this._dirtyLevel >= 2;
|
||||
}
|
||||
set dirty(v) {
|
||||
this._dirtyLevel = v ? 3 : 0;
|
||||
this._dirtyLevel = v ? 2 : 0;
|
||||
}
|
||||
run() {
|
||||
this._dirtyLevel = 0;
|
||||
|
@ -556,25 +569,29 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|||
var _a;
|
||||
pauseScheduling();
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (!effect2.allowRecurse && effect2._runnings) {
|
||||
continue;
|
||||
}
|
||||
if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
|
||||
if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) {
|
||||
const lastDirtyLevel = effect2._dirtyLevel;
|
||||
effect2._dirtyLevel = dirtyLevel;
|
||||
if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
|
||||
if (lastDirtyLevel === 0) {
|
||||
effect2._shouldSchedule = true;
|
||||
{
|
||||
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
||||
}
|
||||
effect2.trigger();
|
||||
if (effect2.scheduler) {
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scheduleEffects(dep);
|
||||
resetScheduling();
|
||||
}
|
||||
function scheduleEffects(dep) {
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
||||
effect2._shouldSchedule = false;
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const createDep = (cleanup, computed) => {
|
||||
const dep = /* @__PURE__ */ new Map();
|
||||
|
@ -657,7 +674,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|||
if (dep) {
|
||||
triggerEffects(
|
||||
dep,
|
||||
3,
|
||||
2,
|
||||
{
|
||||
target,
|
||||
type,
|
||||
|
@ -1256,7 +1273,8 @@ class ComputedRefImpl {
|
|||
this["__v_isReadonly"] = false;
|
||||
this.effect = new ReactiveEffect(
|
||||
() => getter(this._value),
|
||||
() => triggerRefValue(this, 1)
|
||||
() => triggerRefValue(this, 1),
|
||||
() => this.dep && scheduleEffects(this.dep)
|
||||
);
|
||||
this.effect.computed = this;
|
||||
this.effect.active = this._cacheable = !isSSR;
|
||||
|
@ -1264,12 +1282,15 @@ class ComputedRefImpl {
|
|||
}
|
||||
get value() {
|
||||
const self = toRaw(this);
|
||||
trackRefValue(self);
|
||||
if (!self._cacheable || self.effect.dirty) {
|
||||
if (hasChanged(self._value, self._value = self.effect.run())) {
|
||||
triggerRefValue(self, 2);
|
||||
}
|
||||
}
|
||||
trackRefValue(self);
|
||||
if (self.effect._dirtyLevel >= 1) {
|
||||
triggerRefValue(self, 1);
|
||||
}
|
||||
return self._value;
|
||||
}
|
||||
set value(newValue) {
|
||||
|
@ -1322,7 +1343,7 @@ function trackRefValue(ref2) {
|
|||
);
|
||||
}
|
||||
}
|
||||
function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
|
||||
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
||||
ref2 = toRaw(ref2);
|
||||
const dep = ref2.dep;
|
||||
if (dep) {
|
||||
|
@ -1371,12 +1392,12 @@ class RefImpl {
|
|||
if (hasChanged(newVal, this._rawValue)) {
|
||||
this._rawValue = newVal;
|
||||
this._value = useDirectValue ? newVal : toReactive(newVal);
|
||||
triggerRefValue(this, 3, newVal);
|
||||
triggerRefValue(this, 2, newVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
function triggerRef(ref2) {
|
||||
triggerRefValue(ref2, 3, ref2.value );
|
||||
triggerRefValue(ref2, 2, ref2.value );
|
||||
}
|
||||
function unref(ref2) {
|
||||
return isRef(ref2) ? ref2.value : ref2;
|
||||
|
@ -1824,7 +1845,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|||
}
|
||||
function flushPostFlushCbs(seen) {
|
||||
if (pendingPostFlushCbs.length) {
|
||||
const deduped = [...new Set(pendingPostFlushCbs)];
|
||||
const deduped = [...new Set(pendingPostFlushCbs)].sort(
|
||||
(a, b) => getId(a) - getId(b)
|
||||
);
|
||||
pendingPostFlushCbs.length = 0;
|
||||
if (activePostFlushCbs) {
|
||||
activePostFlushCbs.push(...deduped);
|
||||
|
@ -1834,7 +1857,6 @@ function flushPostFlushCbs(seen) {
|
|||
{
|
||||
seen = seen || /* @__PURE__ */ new Map();
|
||||
}
|
||||
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
||||
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
||||
if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
|
||||
continue;
|
||||
|
@ -2458,9 +2480,11 @@ function renderComponentRoot(instance) {
|
|||
const getChildRoot = (vnode) => {
|
||||
const rawChildren = vnode.children;
|
||||
const dynamicChildren = vnode.dynamicChildren;
|
||||
const childRoot = filterSingleRoot(rawChildren);
|
||||
const childRoot = filterSingleRoot(rawChildren, false);
|
||||
if (!childRoot) {
|
||||
return [vnode, void 0];
|
||||
} else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
|
||||
return getChildRoot(childRoot);
|
||||
}
|
||||
const index = rawChildren.indexOf(childRoot);
|
||||
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
|
||||
|
@ -2476,7 +2500,7 @@ const getChildRoot = (vnode) => {
|
|||
};
|
||||
return [normalizeVNode(childRoot), setRoot];
|
||||
};
|
||||
function filterSingleRoot(children) {
|
||||
function filterSingleRoot(children, recurse = true) {
|
||||
let singleRoot;
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const child = children[i];
|
||||
|
@ -2486,6 +2510,9 @@ function filterSingleRoot(children) {
|
|||
return;
|
||||
} else {
|
||||
singleRoot = child;
|
||||
if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
|
||||
return filterSingleRoot(singleRoot.children);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -2576,8 +2603,6 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|||
return false;
|
||||
}
|
||||
function updateHOCHostEl({ vnode, parent }, el) {
|
||||
if (!el)
|
||||
return;
|
||||
while (parent) {
|
||||
const root = parent.subTree;
|
||||
if (root.suspense && root.suspense.activeBranch === vnode) {
|
||||
|
@ -2669,6 +2694,10 @@ const SuspenseImpl = {
|
|||
rendererInternals
|
||||
);
|
||||
} else {
|
||||
if (parentSuspense && parentSuspense.deps > 0) {
|
||||
n2.suspense = n1.suspense;
|
||||
return;
|
||||
}
|
||||
patchSuspense(
|
||||
n1,
|
||||
n2,
|
||||
|
@ -2927,6 +2956,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
{
|
||||
assertNumber(timeout, `Suspense timeout`);
|
||||
}
|
||||
const initialAnchor = anchor;
|
||||
const suspense = {
|
||||
vnode,
|
||||
parent: parentSuspense,
|
||||
|
@ -2934,7 +2964,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
namespace,
|
||||
container,
|
||||
hiddenContainer,
|
||||
anchor,
|
||||
deps: 0,
|
||||
pendingId: suspenseId++,
|
||||
timeout: typeof timeout === "number" ? timeout : -1,
|
||||
|
@ -2977,20 +3006,21 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|||
move(
|
||||
pendingBranch,
|
||||
container2,
|
||||
next(activeBranch),
|
||||
anchor === initialAnchor ? next(activeBranch) : anchor,
|
||||
0
|
||||
);
|
||||
queuePostFlushCb(effects);
|
||||
}
|
||||
};
|
||||
}
|
||||
let { anchor: anchor2 } = suspense;
|
||||
if (activeBranch) {
|
||||
anchor2 = next(activeBranch);
|
||||
if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
|
||||
anchor = next(activeBranch);
|
||||
}
|
||||
unmount(activeBranch, parentComponent2, suspense, true);
|
||||
}
|
||||
if (!delayEnter) {
|
||||
move(pendingBranch, container2, anchor2, 0);
|
||||
move(pendingBranch, container2, anchor, 0);
|
||||
}
|
||||
}
|
||||
setActiveBranch(suspense, pendingBranch);
|
||||
|
@ -3217,7 +3247,12 @@ function queueEffectWithSuspense(fn, suspense) {
|
|||
function setActiveBranch(suspense, branch) {
|
||||
suspense.activeBranch = branch;
|
||||
const { vnode, parentComponent } = suspense;
|
||||
const el = vnode.el = branch.el;
|
||||
let el = branch.el;
|
||||
while (!el && branch.component) {
|
||||
branch = branch.component.subTree;
|
||||
el = branch.el;
|
||||
}
|
||||
vnode.el = el;
|
||||
if (parentComponent && parentComponent.subTree === vnode) {
|
||||
parentComponent.vnode.el = el;
|
||||
updateHOCHostEl(parentComponent, el);
|
||||
|
@ -3443,14 +3478,9 @@ function instanceWatch(source, value, options) {
|
|||
cb = value.handler;
|
||||
options = value;
|
||||
}
|
||||
const cur = currentInstance;
|
||||
setCurrentInstance(this);
|
||||
const reset = setCurrentInstance(this);
|
||||
const res = doWatch(getter, cb.bind(publicThis), options);
|
||||
if (cur) {
|
||||
setCurrentInstance(cur);
|
||||
} else {
|
||||
unsetCurrentInstance();
|
||||
}
|
||||
reset();
|
||||
return res;
|
||||
}
|
||||
function createPathGetter(ctx, path) {
|
||||
|
@ -3502,12 +3532,11 @@ function validateDirectiveName(name) {
|
|||
}
|
||||
}
|
||||
function withDirectives(vnode, directives) {
|
||||
const internalInstance = currentRenderingInstance;
|
||||
if (internalInstance === null) {
|
||||
if (currentRenderingInstance === null) {
|
||||
warn$1(`withDirectives can only be used inside render functions.`);
|
||||
return vnode;
|
||||
}
|
||||
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
|
||||
const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;
|
||||
const bindings = vnode.dirs || (vnode.dirs = []);
|
||||
for (let i = 0; i < directives.length; i++) {
|
||||
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
||||
|
@ -4287,9 +4316,9 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|||
return;
|
||||
}
|
||||
pauseTracking();
|
||||
setCurrentInstance(target);
|
||||
const reset = setCurrentInstance(target);
|
||||
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
resetTracking();
|
||||
return res;
|
||||
});
|
||||
|
@ -4742,58 +4771,6 @@ function useSlots() {
|
|||
function useAttrs() {
|
||||
return getContext().attrs;
|
||||
}
|
||||
function useModel(props, name, options = EMPTY_OBJ) {
|
||||
const i = getCurrentInstance();
|
||||
if (!i) {
|
||||
warn$1(`useModel() called without active instance.`);
|
||||
return ref();
|
||||
}
|
||||
if (!i.propsOptions[0][name]) {
|
||||
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
||||
return ref();
|
||||
}
|
||||
const camelizedName = camelize(name);
|
||||
const hyphenatedName = hyphenate(name);
|
||||
const res = customRef((track, trigger) => {
|
||||
let localValue;
|
||||
watchSyncEffect(() => {
|
||||
const propValue = props[name];
|
||||
if (hasChanged(localValue, propValue)) {
|
||||
localValue = propValue;
|
||||
trigger();
|
||||
}
|
||||
});
|
||||
return {
|
||||
get() {
|
||||
track();
|
||||
return options.get ? options.get(localValue) : localValue;
|
||||
},
|
||||
set(value) {
|
||||
const rawProps = i.vnode.props;
|
||||
if (!(rawProps && // check if parent has passed v-model
|
||||
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
||||
localValue = value;
|
||||
trigger();
|
||||
}
|
||||
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
||||
}
|
||||
};
|
||||
});
|
||||
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
||||
res[Symbol.iterator] = () => {
|
||||
let i2 = 0;
|
||||
return {
|
||||
next() {
|
||||
if (i2 < 2) {
|
||||
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
||||
} else {
|
||||
return { done: true };
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
return res;
|
||||
}
|
||||
function getContext() {
|
||||
const i = getCurrentInstance();
|
||||
if (!i) {
|
||||
|
@ -5674,12 +5651,12 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|||
if (key in propsDefaults) {
|
||||
value = propsDefaults[key];
|
||||
} else {
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
value = propsDefaults[key] = defaultValue.call(
|
||||
null,
|
||||
props
|
||||
);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
} else {
|
||||
value = defaultValue;
|
||||
|
@ -5900,7 +5877,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
|
|||
return rawSlot;
|
||||
}
|
||||
const normalized = withCtx((...args) => {
|
||||
if (currentInstance) {
|
||||
if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
|
||||
warn$1(
|
||||
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
|
||||
);
|
||||
|
@ -6036,9 +6013,10 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|||
} else {
|
||||
const _isString = isString(ref);
|
||||
const _isRef = isRef(ref);
|
||||
const isVFor = rawRef.f;
|
||||
if (_isString || _isRef) {
|
||||
const doSet = () => {
|
||||
if (rawRef.f) {
|
||||
if (isVFor) {
|
||||
const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
|
||||
if (isUnmount) {
|
||||
isArray(existing) && remove(existing, refValue);
|
||||
|
@ -6071,11 +6049,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|||
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
||||
}
|
||||
};
|
||||
if (value) {
|
||||
if (isUnmount || isVFor) {
|
||||
doSet();
|
||||
} else {
|
||||
doSet.id = -1;
|
||||
queuePostRenderEffect(doSet, parentSuspense);
|
||||
} else {
|
||||
doSet();
|
||||
}
|
||||
} else {
|
||||
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
||||
|
@ -6374,7 +6352,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|||
if (props) {
|
||||
{
|
||||
for (const key in props) {
|
||||
if (propHasMismatch(el, key, props[key])) {
|
||||
if (propHasMismatch(el, key, props[key], vnode)) {
|
||||
hasMismatch = true;
|
||||
}
|
||||
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
||||
|
@ -6549,26 +6527,49 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|||
};
|
||||
return [hydrate, hydrateNode];
|
||||
}
|
||||
function propHasMismatch(el, key, clientValue) {
|
||||
function propHasMismatch(el, key, clientValue, vnode) {
|
||||
let mismatchType;
|
||||
let mismatchKey;
|
||||
let actual;
|
||||
let expected;
|
||||
if (key === "class") {
|
||||
actual = toClassSet(el.getAttribute("class") || "");
|
||||
expected = toClassSet(normalizeClass(clientValue));
|
||||
if (!isSetEqual(actual, expected)) {
|
||||
actual = el.getAttribute("class");
|
||||
expected = normalizeClass(clientValue);
|
||||
if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
|
||||
mismatchType = mismatchKey = `class`;
|
||||
}
|
||||
} else if (key === "style") {
|
||||
actual = el.getAttribute("style");
|
||||
expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
|
||||
if (actual !== expected) {
|
||||
const actualMap = toStyleMap(actual);
|
||||
const expectedMap = toStyleMap(expected);
|
||||
if (vnode.dirs) {
|
||||
for (const { dir, value } of vnode.dirs) {
|
||||
if (dir.name === "show" && !value) {
|
||||
expectedMap.set("display", "none");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isMapEqual(actualMap, expectedMap)) {
|
||||
mismatchType = mismatchKey = "style";
|
||||
}
|
||||
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
||||
actual = el.hasAttribute(key) && el.getAttribute(key);
|
||||
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? false : String(clientValue);
|
||||
if (isBooleanAttr(key)) {
|
||||
actual = el.hasAttribute(key);
|
||||
expected = includeBooleanAttr(clientValue);
|
||||
} else if (clientValue == null) {
|
||||
actual = el.hasAttribute(key);
|
||||
expected = false;
|
||||
} else {
|
||||
if (el.hasAttribute(key)) {
|
||||
actual = el.getAttribute(key);
|
||||
} else if (key === "value" && el.tagName === "TEXTAREA") {
|
||||
actual = el.value;
|
||||
} else {
|
||||
actual = false;
|
||||
}
|
||||
expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
|
||||
}
|
||||
if (actual !== expected) {
|
||||
mismatchType = `attribute`;
|
||||
mismatchKey = key;
|
||||
|
@ -6576,15 +6577,15 @@ function propHasMismatch(el, key, clientValue) {
|
|||
}
|
||||
if (mismatchType) {
|
||||
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
||||
warn$1(
|
||||
`Hydration ${mismatchType} mismatch on`,
|
||||
el,
|
||||
`
|
||||
const preSegment = `Hydration ${mismatchType} mismatch on`;
|
||||
const postSegment = `
|
||||
- rendered on server: ${format(actual)}
|
||||
- expected on client: ${format(expected)}
|
||||
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
||||
You should fix the source of the mismatch.`
|
||||
);
|
||||
You should fix the source of the mismatch.`;
|
||||
{
|
||||
warn$1(preSegment, el, postSegment);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -6603,6 +6604,29 @@ function isSetEqual(a, b) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
function toStyleMap(str) {
|
||||
const styleMap = /* @__PURE__ */ new Map();
|
||||
for (const item of str.split(";")) {
|
||||
let [key, value] = item.split(":");
|
||||
key = key == null ? void 0 : key.trim();
|
||||
value = value == null ? void 0 : value.trim();
|
||||
if (key && value) {
|
||||
styleMap.set(key, value);
|
||||
}
|
||||
}
|
||||
return styleMap;
|
||||
}
|
||||
function isMapEqual(a, b) {
|
||||
if (a.size !== b.size) {
|
||||
return false;
|
||||
}
|
||||
for (const [key, value] of a) {
|
||||
if (value !== b.get(key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
let supported;
|
||||
let perf;
|
||||
|
@ -7191,7 +7215,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
hostInsert(fragmentStartAnchor, container, anchor);
|
||||
hostInsert(fragmentEndAnchor, container, anchor);
|
||||
mountChildren(
|
||||
n2.children,
|
||||
// #10007
|
||||
// such fragment like `<></>` will be compiled into
|
||||
// a fragment which doesn't have a children.
|
||||
// In this case fallback to an empty array
|
||||
n2.children || [],
|
||||
container,
|
||||
fragmentEndAnchor,
|
||||
parentComponent,
|
||||
|
@ -8025,6 +8053,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
}
|
||||
return hostNextSibling(vnode.anchor || vnode.el);
|
||||
};
|
||||
let isFlushing = false;
|
||||
const render = (vnode, container, namespace) => {
|
||||
if (vnode == null) {
|
||||
if (container._vnode) {
|
||||
|
@ -8041,8 +8070,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
namespace
|
||||
);
|
||||
}
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
if (!isFlushing) {
|
||||
isFlushing = true;
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
isFlushing = false;
|
||||
}
|
||||
container._vnode = vnode;
|
||||
};
|
||||
const internals = {
|
||||
|
@ -8897,8 +8930,13 @@ let setInSSRSetupState;
|
|||
};
|
||||
}
|
||||
const setCurrentInstance = (instance) => {
|
||||
const prev = currentInstance;
|
||||
internalSetCurrentInstance(instance);
|
||||
instance.scope.on();
|
||||
return () => {
|
||||
instance.scope.off();
|
||||
internalSetCurrentInstance(prev);
|
||||
};
|
||||
};
|
||||
const unsetCurrentInstance = () => {
|
||||
currentInstance && currentInstance.scope.off();
|
||||
|
@ -8960,7 +8998,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|||
const { setup } = Component;
|
||||
if (setup) {
|
||||
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
pauseTracking();
|
||||
const setupResult = callWithErrorHandling(
|
||||
setup,
|
||||
|
@ -8972,7 +9010,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|||
]
|
||||
);
|
||||
resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
if (isPromise(setupResult)) {
|
||||
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
||||
if (isSSR) {
|
||||
|
@ -9066,13 +9104,13 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|||
}
|
||||
}
|
||||
{
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
pauseTracking();
|
||||
try {
|
||||
applyOptions(instance);
|
||||
} finally {
|
||||
resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
}
|
||||
if (!Component.render && instance.render === NOOP && !isSSR) {
|
||||
|
@ -9203,6 +9241,59 @@ const computed = (getterOrOptions, debugOptions) => {
|
|||
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
||||
};
|
||||
|
||||
function useModel(props, name, options = EMPTY_OBJ) {
|
||||
const i = getCurrentInstance();
|
||||
if (!i) {
|
||||
warn$1(`useModel() called without active instance.`);
|
||||
return ref();
|
||||
}
|
||||
if (!i.propsOptions[0][name]) {
|
||||
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
||||
return ref();
|
||||
}
|
||||
const camelizedName = camelize(name);
|
||||
const hyphenatedName = hyphenate(name);
|
||||
const res = customRef((track, trigger) => {
|
||||
let localValue;
|
||||
watchSyncEffect(() => {
|
||||
const propValue = props[name];
|
||||
if (hasChanged(localValue, propValue)) {
|
||||
localValue = propValue;
|
||||
trigger();
|
||||
}
|
||||
});
|
||||
return {
|
||||
get() {
|
||||
track();
|
||||
return options.get ? options.get(localValue) : localValue;
|
||||
},
|
||||
set(value) {
|
||||
const rawProps = i.vnode.props;
|
||||
if (!(rawProps && // check if parent has passed v-model
|
||||
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
||||
localValue = value;
|
||||
trigger();
|
||||
}
|
||||
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
||||
}
|
||||
};
|
||||
});
|
||||
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
||||
res[Symbol.iterator] = () => {
|
||||
let i2 = 0;
|
||||
return {
|
||||
next() {
|
||||
if (i2 < 2) {
|
||||
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
||||
} else {
|
||||
return { done: true };
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
return res;
|
||||
}
|
||||
|
||||
function h(type, propsOrChildren, children) {
|
||||
const l = arguments.length;
|
||||
if (l === 2) {
|
||||
|
@ -9425,7 +9516,7 @@ function isMemoSame(cached, memo) {
|
|||
return true;
|
||||
}
|
||||
|
||||
const version = "3.4.5";
|
||||
const version = "3.4.15";
|
||||
const warn = warn$1 ;
|
||||
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
||||
const devtools = devtools$1 ;
|
||||
|
@ -9822,6 +9913,9 @@ const vShow = {
|
|||
setDisplay(el, value);
|
||||
}
|
||||
};
|
||||
{
|
||||
vShow.name = "show";
|
||||
}
|
||||
function setDisplay(el, value) {
|
||||
el.style.display = value ? el[vShowOldKey] : "none";
|
||||
}
|
||||
|
@ -9891,6 +9985,7 @@ function setVarsOnNode(el, vars) {
|
|||
|
||||
function patchStyle(el, prev, next) {
|
||||
const style = el.style;
|
||||
const currentDisplay = style.display;
|
||||
const isCssString = isString(next);
|
||||
if (next && !isCssString) {
|
||||
if (prev && !isString(prev)) {
|
||||
|
@ -9904,7 +9999,6 @@ function patchStyle(el, prev, next) {
|
|||
setStyle(style, key, next[key]);
|
||||
}
|
||||
} else {
|
||||
const currentDisplay = style.display;
|
||||
if (isCssString) {
|
||||
if (prev !== next) {
|
||||
const cssVarText = style[CSS_VAR_TEXT];
|
||||
|
@ -9916,9 +10010,9 @@ function patchStyle(el, prev, next) {
|
|||
} else if (prev) {
|
||||
el.removeAttribute("style");
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
const semicolonRE = /[^\\];\s*$/;
|
||||
|
@ -10685,35 +10779,52 @@ const vModelSelect = {
|
|||
el[assignKey](
|
||||
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
||||
);
|
||||
el._assigning = true;
|
||||
nextTick(() => {
|
||||
el._assigning = false;
|
||||
});
|
||||
});
|
||||
el[assignKey] = getModelAssigner(vnode);
|
||||
},
|
||||
// set value in mounted & updated because <select> relies on its children
|
||||
// <option>s.
|
||||
mounted(el, { value }) {
|
||||
setSelected(el, value);
|
||||
mounted(el, { value, oldValue, modifiers: { number } }) {
|
||||
setSelected(el, value, oldValue, number);
|
||||
},
|
||||
beforeUpdate(el, _binding, vnode) {
|
||||
el[assignKey] = getModelAssigner(vnode);
|
||||
},
|
||||
updated(el, { value }) {
|
||||
setSelected(el, value);
|
||||
updated(el, { value, oldValue, modifiers: { number } }) {
|
||||
if (!el._assigning) {
|
||||
setSelected(el, value, oldValue, number);
|
||||
}
|
||||
}
|
||||
};
|
||||
function setSelected(el, value) {
|
||||
function setSelected(el, value, oldValue, number) {
|
||||
const isMultiple = el.multiple;
|
||||
if (isMultiple && !isArray(value) && !isSet(value)) {
|
||||
const isArrayValue = isArray(value);
|
||||
if (isMultiple && !isArrayValue && !isSet(value)) {
|
||||
warn(
|
||||
`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (isArrayValue && looseEqual(value, oldValue)) {
|
||||
return;
|
||||
}
|
||||
for (let i = 0, l = el.options.length; i < l; i++) {
|
||||
const option = el.options[i];
|
||||
const optionValue = getValue(option);
|
||||
if (isMultiple) {
|
||||
if (isArray(value)) {
|
||||
option.selected = looseIndexOf(value, optionValue) > -1;
|
||||
if (isArrayValue) {
|
||||
const optionType = typeof optionValue;
|
||||
if (optionType === "string" || optionType === "number") {
|
||||
option.selected = value.includes(
|
||||
number ? looseToNumber(optionValue) : optionValue
|
||||
);
|
||||
} else {
|
||||
option.selected = looseIndexOf(value, optionValue) > -1;
|
||||
}
|
||||
} else {
|
||||
option.selected = value.has(optionValue);
|
||||
}
|
||||
|
|
15
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js
generated
vendored
15
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js
generated
vendored
File diff suppressed because one or more lines are too long
49
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
generated
vendored
49
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/runtime-dom v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
import { h, BaseTransition, BaseTransitionPropsValidators, assertNumber, getCurrentInstance, warn, watchPostEffect, onMounted, onUnmounted, Fragment, Static, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, createVNode, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@vue/runtime-core';
|
||||
export * from '@vue/runtime-core';
|
||||
import { extend, isObject, toNumber, isArray, isString, hyphenate, capitalize, isSpecialBooleanAttr, includeBooleanAttr, isOn, isModelListener, isFunction, camelize as camelize$1, EMPTY_OBJ, looseToNumber, looseIndexOf, isSet, looseEqual, invokeArrayFns, isHTMLTag, isSVGTag, isMathMLTag } from '@vue/shared';
|
||||
|
@ -389,6 +394,9 @@ const vShow = {
|
|||
setDisplay(el, value);
|
||||
}
|
||||
};
|
||||
if (!!(process.env.NODE_ENV !== "production")) {
|
||||
vShow.name = "show";
|
||||
}
|
||||
function setDisplay(el, value) {
|
||||
el.style.display = value ? el[vShowOldKey] : "none";
|
||||
}
|
||||
|
@ -465,6 +473,7 @@ function setVarsOnNode(el, vars) {
|
|||
|
||||
function patchStyle(el, prev, next) {
|
||||
const style = el.style;
|
||||
const currentDisplay = style.display;
|
||||
const isCssString = isString(next);
|
||||
if (next && !isCssString) {
|
||||
if (prev && !isString(prev)) {
|
||||
|
@ -478,7 +487,6 @@ function patchStyle(el, prev, next) {
|
|||
setStyle(style, key, next[key]);
|
||||
}
|
||||
} else {
|
||||
const currentDisplay = style.display;
|
||||
if (isCssString) {
|
||||
if (prev !== next) {
|
||||
const cssVarText = style[CSS_VAR_TEXT];
|
||||
|
@ -490,9 +498,9 @@ function patchStyle(el, prev, next) {
|
|||
} else if (prev) {
|
||||
el.removeAttribute("style");
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
const semicolonRE = /[^\\];\s*$/;
|
||||
|
@ -1259,35 +1267,52 @@ const vModelSelect = {
|
|||
el[assignKey](
|
||||
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
||||
);
|
||||
el._assigning = true;
|
||||
nextTick(() => {
|
||||
el._assigning = false;
|
||||
});
|
||||
});
|
||||
el[assignKey] = getModelAssigner(vnode);
|
||||
},
|
||||
// set value in mounted & updated because <select> relies on its children
|
||||
// <option>s.
|
||||
mounted(el, { value }) {
|
||||
setSelected(el, value);
|
||||
mounted(el, { value, oldValue, modifiers: { number } }) {
|
||||
setSelected(el, value, oldValue, number);
|
||||
},
|
||||
beforeUpdate(el, _binding, vnode) {
|
||||
el[assignKey] = getModelAssigner(vnode);
|
||||
},
|
||||
updated(el, { value }) {
|
||||
setSelected(el, value);
|
||||
updated(el, { value, oldValue, modifiers: { number } }) {
|
||||
if (!el._assigning) {
|
||||
setSelected(el, value, oldValue, number);
|
||||
}
|
||||
}
|
||||
};
|
||||
function setSelected(el, value) {
|
||||
function setSelected(el, value, oldValue, number) {
|
||||
const isMultiple = el.multiple;
|
||||
if (isMultiple && !isArray(value) && !isSet(value)) {
|
||||
const isArrayValue = isArray(value);
|
||||
if (isMultiple && !isArrayValue && !isSet(value)) {
|
||||
!!(process.env.NODE_ENV !== "production") && warn(
|
||||
`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (isArrayValue && looseEqual(value, oldValue)) {
|
||||
return;
|
||||
}
|
||||
for (let i = 0, l = el.options.length; i < l; i++) {
|
||||
const option = el.options[i];
|
||||
const optionValue = getValue(option);
|
||||
if (isMultiple) {
|
||||
if (isArray(value)) {
|
||||
option.selected = looseIndexOf(value, optionValue) > -1;
|
||||
if (isArrayValue) {
|
||||
const optionType = typeof optionValue;
|
||||
if (optionType === "string" || optionType === "number") {
|
||||
option.selected = value.includes(
|
||||
number ? looseToNumber(optionValue) : optionValue
|
||||
);
|
||||
} else {
|
||||
option.selected = looseIndexOf(value, optionValue) > -1;
|
||||
}
|
||||
} else {
|
||||
option.selected = value.has(optionValue);
|
||||
}
|
||||
|
|
387
node_modules/@vue/runtime-dom/dist/runtime-dom.global.js
generated
vendored
387
node_modules/@vue/runtime-dom/dist/runtime-dom.global.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/runtime-dom v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
var VueRuntimeDOM = (function (exports) {
|
||||
'use strict';
|
||||
|
||||
|
@ -198,6 +203,13 @@ var VueRuntimeDOM = (function (exports) {
|
|||
const isKnownSvgAttr = /* @__PURE__ */ makeMap(
|
||||
`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
|
||||
);
|
||||
function isRenderableAttrValue(value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
const type = typeof value;
|
||||
return type === "string" || type === "number" || type === "boolean";
|
||||
}
|
||||
|
||||
function looseCompareArrays(a, b) {
|
||||
if (a.length !== b.length)
|
||||
|
@ -398,7 +410,7 @@ var VueRuntimeDOM = (function (exports) {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._dirtyLevel = 3;
|
||||
this._dirtyLevel = 2;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -410,7 +422,7 @@ var VueRuntimeDOM = (function (exports) {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._queryings = 0;
|
||||
this._shouldSchedule = false;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -419,10 +431,9 @@ var VueRuntimeDOM = (function (exports) {
|
|||
}
|
||||
get dirty() {
|
||||
if (this._dirtyLevel === 1) {
|
||||
this._dirtyLevel = 0;
|
||||
this._queryings++;
|
||||
pauseTracking();
|
||||
for (const dep of this.deps) {
|
||||
for (let i = 0; i < this._depsLength; i++) {
|
||||
const dep = this.deps[i];
|
||||
if (dep.computed) {
|
||||
triggerComputed(dep.computed);
|
||||
if (this._dirtyLevel >= 2) {
|
||||
|
@ -430,13 +441,15 @@ var VueRuntimeDOM = (function (exports) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this._dirtyLevel < 2) {
|
||||
this._dirtyLevel = 0;
|
||||
}
|
||||
resetTracking();
|
||||
this._queryings--;
|
||||
}
|
||||
return this._dirtyLevel >= 2;
|
||||
}
|
||||
set dirty(v) {
|
||||
this._dirtyLevel = v ? 3 : 0;
|
||||
this._dirtyLevel = v ? 2 : 0;
|
||||
}
|
||||
run() {
|
||||
this._dirtyLevel = 0;
|
||||
|
@ -559,25 +572,29 @@ var VueRuntimeDOM = (function (exports) {
|
|||
var _a;
|
||||
pauseScheduling();
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (!effect2.allowRecurse && effect2._runnings) {
|
||||
continue;
|
||||
}
|
||||
if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
|
||||
if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) {
|
||||
const lastDirtyLevel = effect2._dirtyLevel;
|
||||
effect2._dirtyLevel = dirtyLevel;
|
||||
if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
|
||||
if (lastDirtyLevel === 0) {
|
||||
effect2._shouldSchedule = true;
|
||||
{
|
||||
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
||||
}
|
||||
effect2.trigger();
|
||||
if (effect2.scheduler) {
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scheduleEffects(dep);
|
||||
resetScheduling();
|
||||
}
|
||||
function scheduleEffects(dep) {
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
||||
effect2._shouldSchedule = false;
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const createDep = (cleanup, computed) => {
|
||||
const dep = /* @__PURE__ */ new Map();
|
||||
|
@ -660,7 +677,7 @@ var VueRuntimeDOM = (function (exports) {
|
|||
if (dep) {
|
||||
triggerEffects(
|
||||
dep,
|
||||
3,
|
||||
2,
|
||||
{
|
||||
target,
|
||||
type,
|
||||
|
@ -1259,7 +1276,8 @@ var VueRuntimeDOM = (function (exports) {
|
|||
this["__v_isReadonly"] = false;
|
||||
this.effect = new ReactiveEffect(
|
||||
() => getter(this._value),
|
||||
() => triggerRefValue(this, 1)
|
||||
() => triggerRefValue(this, 1),
|
||||
() => this.dep && scheduleEffects(this.dep)
|
||||
);
|
||||
this.effect.computed = this;
|
||||
this.effect.active = this._cacheable = !isSSR;
|
||||
|
@ -1267,12 +1285,15 @@ var VueRuntimeDOM = (function (exports) {
|
|||
}
|
||||
get value() {
|
||||
const self = toRaw(this);
|
||||
trackRefValue(self);
|
||||
if (!self._cacheable || self.effect.dirty) {
|
||||
if (hasChanged(self._value, self._value = self.effect.run())) {
|
||||
triggerRefValue(self, 2);
|
||||
}
|
||||
}
|
||||
trackRefValue(self);
|
||||
if (self.effect._dirtyLevel >= 1) {
|
||||
triggerRefValue(self, 1);
|
||||
}
|
||||
return self._value;
|
||||
}
|
||||
set value(newValue) {
|
||||
|
@ -1325,7 +1346,7 @@ var VueRuntimeDOM = (function (exports) {
|
|||
);
|
||||
}
|
||||
}
|
||||
function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
|
||||
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
||||
ref2 = toRaw(ref2);
|
||||
const dep = ref2.dep;
|
||||
if (dep) {
|
||||
|
@ -1374,12 +1395,12 @@ var VueRuntimeDOM = (function (exports) {
|
|||
if (hasChanged(newVal, this._rawValue)) {
|
||||
this._rawValue = newVal;
|
||||
this._value = useDirectValue ? newVal : toReactive(newVal);
|
||||
triggerRefValue(this, 3, newVal);
|
||||
triggerRefValue(this, 2, newVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
function triggerRef(ref2) {
|
||||
triggerRefValue(ref2, 3, ref2.value );
|
||||
triggerRefValue(ref2, 2, ref2.value );
|
||||
}
|
||||
function unref(ref2) {
|
||||
return isRef(ref2) ? ref2.value : ref2;
|
||||
|
@ -1827,7 +1848,9 @@ var VueRuntimeDOM = (function (exports) {
|
|||
}
|
||||
function flushPostFlushCbs(seen) {
|
||||
if (pendingPostFlushCbs.length) {
|
||||
const deduped = [...new Set(pendingPostFlushCbs)];
|
||||
const deduped = [...new Set(pendingPostFlushCbs)].sort(
|
||||
(a, b) => getId(a) - getId(b)
|
||||
);
|
||||
pendingPostFlushCbs.length = 0;
|
||||
if (activePostFlushCbs) {
|
||||
activePostFlushCbs.push(...deduped);
|
||||
|
@ -1837,7 +1860,6 @@ var VueRuntimeDOM = (function (exports) {
|
|||
{
|
||||
seen = seen || /* @__PURE__ */ new Map();
|
||||
}
|
||||
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
||||
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
||||
if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
|
||||
continue;
|
||||
|
@ -2461,9 +2483,11 @@ var VueRuntimeDOM = (function (exports) {
|
|||
const getChildRoot = (vnode) => {
|
||||
const rawChildren = vnode.children;
|
||||
const dynamicChildren = vnode.dynamicChildren;
|
||||
const childRoot = filterSingleRoot(rawChildren);
|
||||
const childRoot = filterSingleRoot(rawChildren, false);
|
||||
if (!childRoot) {
|
||||
return [vnode, void 0];
|
||||
} else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
|
||||
return getChildRoot(childRoot);
|
||||
}
|
||||
const index = rawChildren.indexOf(childRoot);
|
||||
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
|
||||
|
@ -2479,7 +2503,7 @@ var VueRuntimeDOM = (function (exports) {
|
|||
};
|
||||
return [normalizeVNode(childRoot), setRoot];
|
||||
};
|
||||
function filterSingleRoot(children) {
|
||||
function filterSingleRoot(children, recurse = true) {
|
||||
let singleRoot;
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const child = children[i];
|
||||
|
@ -2489,6 +2513,9 @@ var VueRuntimeDOM = (function (exports) {
|
|||
return;
|
||||
} else {
|
||||
singleRoot = child;
|
||||
if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
|
||||
return filterSingleRoot(singleRoot.children);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -2579,8 +2606,6 @@ var VueRuntimeDOM = (function (exports) {
|
|||
return false;
|
||||
}
|
||||
function updateHOCHostEl({ vnode, parent }, el) {
|
||||
if (!el)
|
||||
return;
|
||||
while (parent) {
|
||||
const root = parent.subTree;
|
||||
if (root.suspense && root.suspense.activeBranch === vnode) {
|
||||
|
@ -2672,6 +2697,10 @@ If this is a native custom element, make sure to exclude it from component resol
|
|||
rendererInternals
|
||||
);
|
||||
} else {
|
||||
if (parentSuspense && parentSuspense.deps > 0) {
|
||||
n2.suspense = n1.suspense;
|
||||
return;
|
||||
}
|
||||
patchSuspense(
|
||||
n1,
|
||||
n2,
|
||||
|
@ -2930,6 +2959,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|||
{
|
||||
assertNumber(timeout, `Suspense timeout`);
|
||||
}
|
||||
const initialAnchor = anchor;
|
||||
const suspense = {
|
||||
vnode,
|
||||
parent: parentSuspense,
|
||||
|
@ -2937,7 +2967,6 @@ If this is a native custom element, make sure to exclude it from component resol
|
|||
namespace,
|
||||
container,
|
||||
hiddenContainer,
|
||||
anchor,
|
||||
deps: 0,
|
||||
pendingId: suspenseId++,
|
||||
timeout: typeof timeout === "number" ? timeout : -1,
|
||||
|
@ -2980,20 +3009,21 @@ If this is a native custom element, make sure to exclude it from component resol
|
|||
move(
|
||||
pendingBranch,
|
||||
container2,
|
||||
next(activeBranch),
|
||||
anchor === initialAnchor ? next(activeBranch) : anchor,
|
||||
0
|
||||
);
|
||||
queuePostFlushCb(effects);
|
||||
}
|
||||
};
|
||||
}
|
||||
let { anchor: anchor2 } = suspense;
|
||||
if (activeBranch) {
|
||||
anchor2 = next(activeBranch);
|
||||
if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
|
||||
anchor = next(activeBranch);
|
||||
}
|
||||
unmount(activeBranch, parentComponent2, suspense, true);
|
||||
}
|
||||
if (!delayEnter) {
|
||||
move(pendingBranch, container2, anchor2, 0);
|
||||
move(pendingBranch, container2, anchor, 0);
|
||||
}
|
||||
}
|
||||
setActiveBranch(suspense, pendingBranch);
|
||||
|
@ -3220,7 +3250,12 @@ If this is a native custom element, make sure to exclude it from component resol
|
|||
function setActiveBranch(suspense, branch) {
|
||||
suspense.activeBranch = branch;
|
||||
const { vnode, parentComponent } = suspense;
|
||||
const el = vnode.el = branch.el;
|
||||
let el = branch.el;
|
||||
while (!el && branch.component) {
|
||||
branch = branch.component.subTree;
|
||||
el = branch.el;
|
||||
}
|
||||
vnode.el = el;
|
||||
if (parentComponent && parentComponent.subTree === vnode) {
|
||||
parentComponent.vnode.el = el;
|
||||
updateHOCHostEl(parentComponent, el);
|
||||
|
@ -3440,14 +3475,9 @@ If this is a native custom element, make sure to exclude it from component resol
|
|||
cb = value.handler;
|
||||
options = value;
|
||||
}
|
||||
const cur = currentInstance;
|
||||
setCurrentInstance(this);
|
||||
const reset = setCurrentInstance(this);
|
||||
const res = doWatch(getter, cb.bind(publicThis), options);
|
||||
if (cur) {
|
||||
setCurrentInstance(cur);
|
||||
} else {
|
||||
unsetCurrentInstance();
|
||||
}
|
||||
reset();
|
||||
return res;
|
||||
}
|
||||
function createPathGetter(ctx, path) {
|
||||
|
@ -3499,12 +3529,11 @@ If this is a native custom element, make sure to exclude it from component resol
|
|||
}
|
||||
}
|
||||
function withDirectives(vnode, directives) {
|
||||
const internalInstance = currentRenderingInstance;
|
||||
if (internalInstance === null) {
|
||||
if (currentRenderingInstance === null) {
|
||||
warn$1(`withDirectives can only be used inside render functions.`);
|
||||
return vnode;
|
||||
}
|
||||
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
|
||||
const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;
|
||||
const bindings = vnode.dirs || (vnode.dirs = []);
|
||||
for (let i = 0; i < directives.length; i++) {
|
||||
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
|
||||
|
@ -4284,9 +4313,9 @@ If this is a native custom element, make sure to exclude it from component resol
|
|||
return;
|
||||
}
|
||||
pauseTracking();
|
||||
setCurrentInstance(target);
|
||||
const reset = setCurrentInstance(target);
|
||||
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
resetTracking();
|
||||
return res;
|
||||
});
|
||||
|
@ -4739,58 +4768,6 @@ If this is a native custom element, make sure to exclude it from component resol
|
|||
function useAttrs() {
|
||||
return getContext().attrs;
|
||||
}
|
||||
function useModel(props, name, options = EMPTY_OBJ) {
|
||||
const i = getCurrentInstance();
|
||||
if (!i) {
|
||||
warn$1(`useModel() called without active instance.`);
|
||||
return ref();
|
||||
}
|
||||
if (!i.propsOptions[0][name]) {
|
||||
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
||||
return ref();
|
||||
}
|
||||
const camelizedName = camelize(name);
|
||||
const hyphenatedName = hyphenate(name);
|
||||
const res = customRef((track, trigger) => {
|
||||
let localValue;
|
||||
watchSyncEffect(() => {
|
||||
const propValue = props[name];
|
||||
if (hasChanged(localValue, propValue)) {
|
||||
localValue = propValue;
|
||||
trigger();
|
||||
}
|
||||
});
|
||||
return {
|
||||
get() {
|
||||
track();
|
||||
return options.get ? options.get(localValue) : localValue;
|
||||
},
|
||||
set(value) {
|
||||
const rawProps = i.vnode.props;
|
||||
if (!(rawProps && // check if parent has passed v-model
|
||||
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
||||
localValue = value;
|
||||
trigger();
|
||||
}
|
||||
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
||||
}
|
||||
};
|
||||
});
|
||||
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
||||
res[Symbol.iterator] = () => {
|
||||
let i2 = 0;
|
||||
return {
|
||||
next() {
|
||||
if (i2 < 2) {
|
||||
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
||||
} else {
|
||||
return { done: true };
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
return res;
|
||||
}
|
||||
function getContext() {
|
||||
const i = getCurrentInstance();
|
||||
if (!i) {
|
||||
|
@ -5671,12 +5648,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|||
if (key in propsDefaults) {
|
||||
value = propsDefaults[key];
|
||||
} else {
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
value = propsDefaults[key] = defaultValue.call(
|
||||
null,
|
||||
props
|
||||
);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
} else {
|
||||
value = defaultValue;
|
||||
|
@ -5897,7 +5874,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|||
return rawSlot;
|
||||
}
|
||||
const normalized = withCtx((...args) => {
|
||||
if (currentInstance) {
|
||||
if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
|
||||
warn$1(
|
||||
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
|
||||
);
|
||||
|
@ -6033,9 +6010,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|||
} else {
|
||||
const _isString = isString(ref);
|
||||
const _isRef = isRef(ref);
|
||||
const isVFor = rawRef.f;
|
||||
if (_isString || _isRef) {
|
||||
const doSet = () => {
|
||||
if (rawRef.f) {
|
||||
if (isVFor) {
|
||||
const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
|
||||
if (isUnmount) {
|
||||
isArray(existing) && remove(existing, refValue);
|
||||
|
@ -6068,11 +6046,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|||
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
||||
}
|
||||
};
|
||||
if (value) {
|
||||
if (isUnmount || isVFor) {
|
||||
doSet();
|
||||
} else {
|
||||
doSet.id = -1;
|
||||
queuePostRenderEffect(doSet, parentSuspense);
|
||||
} else {
|
||||
doSet();
|
||||
}
|
||||
} else {
|
||||
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
||||
|
@ -6371,7 +6349,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|||
if (props) {
|
||||
{
|
||||
for (const key in props) {
|
||||
if (propHasMismatch(el, key, props[key])) {
|
||||
if (propHasMismatch(el, key, props[key], vnode)) {
|
||||
hasMismatch = true;
|
||||
}
|
||||
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
||||
|
@ -6546,26 +6524,49 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|||
};
|
||||
return [hydrate, hydrateNode];
|
||||
}
|
||||
function propHasMismatch(el, key, clientValue) {
|
||||
function propHasMismatch(el, key, clientValue, vnode) {
|
||||
let mismatchType;
|
||||
let mismatchKey;
|
||||
let actual;
|
||||
let expected;
|
||||
if (key === "class") {
|
||||
actual = toClassSet(el.getAttribute("class") || "");
|
||||
expected = toClassSet(normalizeClass(clientValue));
|
||||
if (!isSetEqual(actual, expected)) {
|
||||
actual = el.getAttribute("class");
|
||||
expected = normalizeClass(clientValue);
|
||||
if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
|
||||
mismatchType = mismatchKey = `class`;
|
||||
}
|
||||
} else if (key === "style") {
|
||||
actual = el.getAttribute("style");
|
||||
expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
|
||||
if (actual !== expected) {
|
||||
const actualMap = toStyleMap(actual);
|
||||
const expectedMap = toStyleMap(expected);
|
||||
if (vnode.dirs) {
|
||||
for (const { dir, value } of vnode.dirs) {
|
||||
if (dir.name === "show" && !value) {
|
||||
expectedMap.set("display", "none");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isMapEqual(actualMap, expectedMap)) {
|
||||
mismatchType = mismatchKey = "style";
|
||||
}
|
||||
} else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
|
||||
actual = el.hasAttribute(key) && el.getAttribute(key);
|
||||
expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? false : String(clientValue);
|
||||
if (isBooleanAttr(key)) {
|
||||
actual = el.hasAttribute(key);
|
||||
expected = includeBooleanAttr(clientValue);
|
||||
} else if (clientValue == null) {
|
||||
actual = el.hasAttribute(key);
|
||||
expected = false;
|
||||
} else {
|
||||
if (el.hasAttribute(key)) {
|
||||
actual = el.getAttribute(key);
|
||||
} else if (key === "value" && el.tagName === "TEXTAREA") {
|
||||
actual = el.value;
|
||||
} else {
|
||||
actual = false;
|
||||
}
|
||||
expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
|
||||
}
|
||||
if (actual !== expected) {
|
||||
mismatchType = `attribute`;
|
||||
mismatchKey = key;
|
||||
|
@ -6573,15 +6574,15 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|||
}
|
||||
if (mismatchType) {
|
||||
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
||||
warn$1(
|
||||
`Hydration ${mismatchType} mismatch on`,
|
||||
el,
|
||||
`
|
||||
const preSegment = `Hydration ${mismatchType} mismatch on`;
|
||||
const postSegment = `
|
||||
- rendered on server: ${format(actual)}
|
||||
- expected on client: ${format(expected)}
|
||||
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
||||
You should fix the source of the mismatch.`
|
||||
);
|
||||
You should fix the source of the mismatch.`;
|
||||
{
|
||||
warn$1(preSegment, el, postSegment);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -6600,6 +6601,29 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|||
}
|
||||
return true;
|
||||
}
|
||||
function toStyleMap(str) {
|
||||
const styleMap = /* @__PURE__ */ new Map();
|
||||
for (const item of str.split(";")) {
|
||||
let [key, value] = item.split(":");
|
||||
key = key == null ? void 0 : key.trim();
|
||||
value = value == null ? void 0 : value.trim();
|
||||
if (key && value) {
|
||||
styleMap.set(key, value);
|
||||
}
|
||||
}
|
||||
return styleMap;
|
||||
}
|
||||
function isMapEqual(a, b) {
|
||||
if (a.size !== b.size) {
|
||||
return false;
|
||||
}
|
||||
for (const [key, value] of a) {
|
||||
if (value !== b.get(key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
let supported;
|
||||
let perf;
|
||||
|
@ -7188,7 +7212,11 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|||
hostInsert(fragmentStartAnchor, container, anchor);
|
||||
hostInsert(fragmentEndAnchor, container, anchor);
|
||||
mountChildren(
|
||||
n2.children,
|
||||
// #10007
|
||||
// such fragment like `<></>` will be compiled into
|
||||
// a fragment which doesn't have a children.
|
||||
// In this case fallback to an empty array
|
||||
n2.children || [],
|
||||
container,
|
||||
fragmentEndAnchor,
|
||||
parentComponent,
|
||||
|
@ -8022,6 +8050,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|||
}
|
||||
return hostNextSibling(vnode.anchor || vnode.el);
|
||||
};
|
||||
let isFlushing = false;
|
||||
const render = (vnode, container, namespace) => {
|
||||
if (vnode == null) {
|
||||
if (container._vnode) {
|
||||
|
@ -8038,8 +8067,12 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|||
namespace
|
||||
);
|
||||
}
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
if (!isFlushing) {
|
||||
isFlushing = true;
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
isFlushing = false;
|
||||
}
|
||||
container._vnode = vnode;
|
||||
};
|
||||
const internals = {
|
||||
|
@ -8894,8 +8927,13 @@ Component that was made reactive: `,
|
|||
};
|
||||
}
|
||||
const setCurrentInstance = (instance) => {
|
||||
const prev = currentInstance;
|
||||
internalSetCurrentInstance(instance);
|
||||
instance.scope.on();
|
||||
return () => {
|
||||
instance.scope.off();
|
||||
internalSetCurrentInstance(prev);
|
||||
};
|
||||
};
|
||||
const unsetCurrentInstance = () => {
|
||||
currentInstance && currentInstance.scope.off();
|
||||
|
@ -8957,7 +8995,7 @@ Component that was made reactive: `,
|
|||
const { setup } = Component;
|
||||
if (setup) {
|
||||
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
pauseTracking();
|
||||
const setupResult = callWithErrorHandling(
|
||||
setup,
|
||||
|
@ -8969,7 +9007,7 @@ Component that was made reactive: `,
|
|||
]
|
||||
);
|
||||
resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
if (isPromise(setupResult)) {
|
||||
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
||||
if (isSSR) {
|
||||
|
@ -9063,13 +9101,13 @@ Component that was made reactive: `,
|
|||
}
|
||||
}
|
||||
{
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
pauseTracking();
|
||||
try {
|
||||
applyOptions(instance);
|
||||
} finally {
|
||||
resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
}
|
||||
if (!Component.render && instance.render === NOOP && !isSSR) {
|
||||
|
@ -9200,6 +9238,59 @@ Component that was made reactive: `,
|
|||
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
||||
};
|
||||
|
||||
function useModel(props, name, options = EMPTY_OBJ) {
|
||||
const i = getCurrentInstance();
|
||||
if (!i) {
|
||||
warn$1(`useModel() called without active instance.`);
|
||||
return ref();
|
||||
}
|
||||
if (!i.propsOptions[0][name]) {
|
||||
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
||||
return ref();
|
||||
}
|
||||
const camelizedName = camelize(name);
|
||||
const hyphenatedName = hyphenate(name);
|
||||
const res = customRef((track, trigger) => {
|
||||
let localValue;
|
||||
watchSyncEffect(() => {
|
||||
const propValue = props[name];
|
||||
if (hasChanged(localValue, propValue)) {
|
||||
localValue = propValue;
|
||||
trigger();
|
||||
}
|
||||
});
|
||||
return {
|
||||
get() {
|
||||
track();
|
||||
return options.get ? options.get(localValue) : localValue;
|
||||
},
|
||||
set(value) {
|
||||
const rawProps = i.vnode.props;
|
||||
if (!(rawProps && // check if parent has passed v-model
|
||||
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
||||
localValue = value;
|
||||
trigger();
|
||||
}
|
||||
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
||||
}
|
||||
};
|
||||
});
|
||||
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
||||
res[Symbol.iterator] = () => {
|
||||
let i2 = 0;
|
||||
return {
|
||||
next() {
|
||||
if (i2 < 2) {
|
||||
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
||||
} else {
|
||||
return { done: true };
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
return res;
|
||||
}
|
||||
|
||||
function h(type, propsOrChildren, children) {
|
||||
const l = arguments.length;
|
||||
if (l === 2) {
|
||||
|
@ -9422,7 +9513,7 @@ Component that was made reactive: `,
|
|||
return true;
|
||||
}
|
||||
|
||||
const version = "3.4.5";
|
||||
const version = "3.4.15";
|
||||
const warn = warn$1 ;
|
||||
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
||||
const devtools = devtools$1 ;
|
||||
|
@ -9819,6 +9910,9 @@ Component that was made reactive: `,
|
|||
setDisplay(el, value);
|
||||
}
|
||||
};
|
||||
{
|
||||
vShow.name = "show";
|
||||
}
|
||||
function setDisplay(el, value) {
|
||||
el.style.display = value ? el[vShowOldKey] : "none";
|
||||
}
|
||||
|
@ -9888,6 +9982,7 @@ Component that was made reactive: `,
|
|||
|
||||
function patchStyle(el, prev, next) {
|
||||
const style = el.style;
|
||||
const currentDisplay = style.display;
|
||||
const isCssString = isString(next);
|
||||
if (next && !isCssString) {
|
||||
if (prev && !isString(prev)) {
|
||||
|
@ -9901,7 +9996,6 @@ Component that was made reactive: `,
|
|||
setStyle(style, key, next[key]);
|
||||
}
|
||||
} else {
|
||||
const currentDisplay = style.display;
|
||||
if (isCssString) {
|
||||
if (prev !== next) {
|
||||
const cssVarText = style[CSS_VAR_TEXT];
|
||||
|
@ -9913,9 +10007,9 @@ Component that was made reactive: `,
|
|||
} else if (prev) {
|
||||
el.removeAttribute("style");
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
const semicolonRE = /[^\\];\s*$/;
|
||||
|
@ -10670,35 +10764,52 @@ Component that was made reactive: `,
|
|||
el[assignKey](
|
||||
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
||||
);
|
||||
el._assigning = true;
|
||||
nextTick(() => {
|
||||
el._assigning = false;
|
||||
});
|
||||
});
|
||||
el[assignKey] = getModelAssigner(vnode);
|
||||
},
|
||||
// set value in mounted & updated because <select> relies on its children
|
||||
// <option>s.
|
||||
mounted(el, { value }) {
|
||||
setSelected(el, value);
|
||||
mounted(el, { value, oldValue, modifiers: { number } }) {
|
||||
setSelected(el, value, oldValue, number);
|
||||
},
|
||||
beforeUpdate(el, _binding, vnode) {
|
||||
el[assignKey] = getModelAssigner(vnode);
|
||||
},
|
||||
updated(el, { value }) {
|
||||
setSelected(el, value);
|
||||
updated(el, { value, oldValue, modifiers: { number } }) {
|
||||
if (!el._assigning) {
|
||||
setSelected(el, value, oldValue, number);
|
||||
}
|
||||
}
|
||||
};
|
||||
function setSelected(el, value) {
|
||||
function setSelected(el, value, oldValue, number) {
|
||||
const isMultiple = el.multiple;
|
||||
if (isMultiple && !isArray(value) && !isSet(value)) {
|
||||
const isArrayValue = isArray(value);
|
||||
if (isMultiple && !isArrayValue && !isSet(value)) {
|
||||
warn(
|
||||
`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (isArrayValue && looseEqual(value, oldValue)) {
|
||||
return;
|
||||
}
|
||||
for (let i = 0, l = el.options.length; i < l; i++) {
|
||||
const option = el.options[i];
|
||||
const optionValue = getValue(option);
|
||||
if (isMultiple) {
|
||||
if (isArray(value)) {
|
||||
option.selected = looseIndexOf(value, optionValue) > -1;
|
||||
if (isArrayValue) {
|
||||
const optionType = typeof optionValue;
|
||||
if (optionType === "string" || optionType === "number") {
|
||||
option.selected = value.includes(
|
||||
number ? looseToNumber(optionValue) : optionValue
|
||||
);
|
||||
} else {
|
||||
option.selected = looseIndexOf(value, optionValue) > -1;
|
||||
}
|
||||
} else {
|
||||
option.selected = value.has(optionValue);
|
||||
}
|
||||
|
|
15
node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js
generated
vendored
15
node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js
generated
vendored
File diff suppressed because one or more lines are too long
7
node_modules/@vue/runtime-dom/package.json
generated
vendored
7
node_modules/@vue/runtime-dom/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/runtime-dom",
|
||||
"version": "3.4.5",
|
||||
"version": "3.4.15",
|
||||
"description": "@vue/runtime-dom",
|
||||
"main": "index.js",
|
||||
"module": "dist/runtime-dom.esm-bundler.js",
|
||||
|
@ -18,6 +18,7 @@
|
|||
"development": "./dist/runtime-dom.cjs.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"module": "./dist/runtime-dom.esm-bundler.js",
|
||||
"import": "./dist/runtime-dom.esm-bundler.js",
|
||||
"require": "./index.js"
|
||||
},
|
||||
|
@ -49,7 +50,7 @@
|
|||
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-dom#readme",
|
||||
"dependencies": {
|
||||
"csstype": "^3.1.3",
|
||||
"@vue/shared": "3.4.5",
|
||||
"@vue/runtime-core": "3.4.5"
|
||||
"@vue/shared": "3.4.15",
|
||||
"@vue/runtime-core": "3.4.15"
|
||||
}
|
||||
}
|
19
node_modules/@vue/server-renderer/dist/server-renderer.cjs.js
generated
vendored
19
node_modules/@vue/server-renderer/dist/server-renderer.cjs.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/server-renderer v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -40,7 +45,7 @@ function ssrRenderAttrs(props, tag) {
|
|||
return ret;
|
||||
}
|
||||
function ssrRenderDynamicAttr(key, value, tag) {
|
||||
if (!isRenderableValue(value)) {
|
||||
if (!shared.isRenderableAttrValue(value)) {
|
||||
return ``;
|
||||
}
|
||||
const attrKey = tag && (tag.indexOf("-") > 0 || shared.isSVGTag(tag)) ? key : shared.propsToAttrMap[key] || key.toLowerCase();
|
||||
|
@ -56,18 +61,11 @@ function ssrRenderDynamicAttr(key, value, tag) {
|
|||
}
|
||||
}
|
||||
function ssrRenderAttr(key, value) {
|
||||
if (!isRenderableValue(value)) {
|
||||
if (!shared.isRenderableAttrValue(value)) {
|
||||
return ``;
|
||||
}
|
||||
return ` ${key}="${shared.escapeHtml(value)}"`;
|
||||
}
|
||||
function isRenderableValue(value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
const type = typeof value;
|
||||
return type === "string" || type === "number" || type === "boolean";
|
||||
}
|
||||
function ssrRenderClass(raw) {
|
||||
return shared.escapeHtml(shared.normalizeClass(raw));
|
||||
}
|
||||
|
@ -648,8 +646,7 @@ function renderComponentVNode(vnode, parentComponent = null, slotScopeId) {
|
|||
() => Promise.all(
|
||||
prefetches.map((prefetch) => prefetch.call(instance.proxy))
|
||||
)
|
||||
).catch(() => {
|
||||
});
|
||||
).catch(shared.NOOP);
|
||||
}
|
||||
return p.then(() => renderComponentSubTree(instance, slotScopeId));
|
||||
} else {
|
||||
|
|
19
node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js
generated
vendored
19
node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/server-renderer v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -40,7 +45,7 @@ function ssrRenderAttrs(props, tag) {
|
|||
return ret;
|
||||
}
|
||||
function ssrRenderDynamicAttr(key, value, tag) {
|
||||
if (!isRenderableValue(value)) {
|
||||
if (!shared.isRenderableAttrValue(value)) {
|
||||
return ``;
|
||||
}
|
||||
const attrKey = tag && (tag.indexOf("-") > 0 || shared.isSVGTag(tag)) ? key : shared.propsToAttrMap[key] || key.toLowerCase();
|
||||
|
@ -56,18 +61,11 @@ function ssrRenderDynamicAttr(key, value, tag) {
|
|||
}
|
||||
}
|
||||
function ssrRenderAttr(key, value) {
|
||||
if (!isRenderableValue(value)) {
|
||||
if (!shared.isRenderableAttrValue(value)) {
|
||||
return ``;
|
||||
}
|
||||
return ` ${key}="${shared.escapeHtml(value)}"`;
|
||||
}
|
||||
function isRenderableValue(value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
const type = typeof value;
|
||||
return type === "string" || type === "number" || type === "boolean";
|
||||
}
|
||||
function ssrRenderClass(raw) {
|
||||
return shared.escapeHtml(shared.normalizeClass(raw));
|
||||
}
|
||||
|
@ -371,8 +369,7 @@ function renderComponentVNode(vnode, parentComponent = null, slotScopeId) {
|
|||
() => Promise.all(
|
||||
prefetches.map((prefetch) => prefetch.call(instance.proxy))
|
||||
)
|
||||
).catch(() => {
|
||||
});
|
||||
).catch(shared.NOOP);
|
||||
}
|
||||
return p.then(() => renderComponentSubTree(instance, slotScopeId));
|
||||
} else {
|
||||
|
|
158
node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js
generated
vendored
158
node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/server-renderer v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
function makeMap(str, expectsLowerCase) {
|
||||
const set = new Set(str.split(","));
|
||||
return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
|
||||
|
@ -189,6 +194,13 @@ const propsToAttrMap = {
|
|||
htmlFor: "for",
|
||||
httpEquiv: "http-equiv"
|
||||
};
|
||||
function isRenderableAttrValue(value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
const type = typeof value;
|
||||
return type === "string" || type === "number" || type === "boolean";
|
||||
}
|
||||
|
||||
const escapeRE = /["'&<>]/;
|
||||
function escapeHtml(string) {
|
||||
|
@ -421,7 +433,7 @@ class ReactiveEffect {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._dirtyLevel = 3;
|
||||
this._dirtyLevel = 2;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -433,7 +445,7 @@ class ReactiveEffect {
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
this._queryings = 0;
|
||||
this._shouldSchedule = false;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -442,10 +454,9 @@ class ReactiveEffect {
|
|||
}
|
||||
get dirty() {
|
||||
if (this._dirtyLevel === 1) {
|
||||
this._dirtyLevel = 0;
|
||||
this._queryings++;
|
||||
pauseTracking();
|
||||
for (const dep of this.deps) {
|
||||
for (let i = 0; i < this._depsLength; i++) {
|
||||
const dep = this.deps[i];
|
||||
if (dep.computed) {
|
||||
triggerComputed(dep.computed);
|
||||
if (this._dirtyLevel >= 2) {
|
||||
|
@ -453,13 +464,15 @@ class ReactiveEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this._dirtyLevel < 2) {
|
||||
this._dirtyLevel = 0;
|
||||
}
|
||||
resetTracking();
|
||||
this._queryings--;
|
||||
}
|
||||
return this._dirtyLevel >= 2;
|
||||
}
|
||||
set dirty(v) {
|
||||
this._dirtyLevel = v ? 3 : 0;
|
||||
this._dirtyLevel = v ? 2 : 0;
|
||||
}
|
||||
run() {
|
||||
this._dirtyLevel = 0;
|
||||
|
@ -558,25 +571,29 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|||
var _a;
|
||||
pauseScheduling();
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (!effect2.allowRecurse && effect2._runnings) {
|
||||
continue;
|
||||
}
|
||||
if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
|
||||
if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) {
|
||||
const lastDirtyLevel = effect2._dirtyLevel;
|
||||
effect2._dirtyLevel = dirtyLevel;
|
||||
if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
|
||||
if (lastDirtyLevel === 0) {
|
||||
effect2._shouldSchedule = true;
|
||||
{
|
||||
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
||||
}
|
||||
effect2.trigger();
|
||||
if (effect2.scheduler) {
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scheduleEffects(dep);
|
||||
resetScheduling();
|
||||
}
|
||||
function scheduleEffects(dep) {
|
||||
for (const effect2 of dep.keys()) {
|
||||
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
||||
effect2._shouldSchedule = false;
|
||||
queueEffectSchedulers.push(effect2.scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const createDep = (cleanup, computed) => {
|
||||
const dep = /* @__PURE__ */ new Map();
|
||||
|
@ -659,7 +676,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|||
if (dep) {
|
||||
triggerEffects(
|
||||
dep,
|
||||
3,
|
||||
2,
|
||||
{
|
||||
target,
|
||||
type,
|
||||
|
@ -1254,7 +1271,8 @@ class ComputedRefImpl {
|
|||
this["__v_isReadonly"] = false;
|
||||
this.effect = new ReactiveEffect(
|
||||
() => getter(this._value),
|
||||
() => triggerRefValue(this, 1)
|
||||
() => triggerRefValue(this, 1),
|
||||
() => this.dep && scheduleEffects(this.dep)
|
||||
);
|
||||
this.effect.computed = this;
|
||||
this.effect.active = this._cacheable = !isSSR;
|
||||
|
@ -1262,12 +1280,15 @@ class ComputedRefImpl {
|
|||
}
|
||||
get value() {
|
||||
const self = toRaw(this);
|
||||
trackRefValue(self);
|
||||
if (!self._cacheable || self.effect.dirty) {
|
||||
if (hasChanged(self._value, self._value = self.effect.run())) {
|
||||
triggerRefValue(self, 2);
|
||||
}
|
||||
}
|
||||
trackRefValue(self);
|
||||
if (self.effect._dirtyLevel >= 1) {
|
||||
triggerRefValue(self, 1);
|
||||
}
|
||||
return self._value;
|
||||
}
|
||||
set value(newValue) {
|
||||
|
@ -1320,7 +1341,7 @@ function trackRefValue(ref2) {
|
|||
);
|
||||
}
|
||||
}
|
||||
function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
|
||||
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
||||
ref2 = toRaw(ref2);
|
||||
const dep = ref2.dep;
|
||||
if (dep) {
|
||||
|
@ -1655,7 +1676,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|||
}
|
||||
function flushPostFlushCbs(seen) {
|
||||
if (pendingPostFlushCbs.length) {
|
||||
const deduped = [...new Set(pendingPostFlushCbs)];
|
||||
const deduped = [...new Set(pendingPostFlushCbs)].sort(
|
||||
(a, b) => getId(a) - getId(b)
|
||||
);
|
||||
pendingPostFlushCbs.length = 0;
|
||||
if (activePostFlushCbs) {
|
||||
activePostFlushCbs.push(...deduped);
|
||||
|
@ -1665,7 +1688,6 @@ function flushPostFlushCbs(seen) {
|
|||
{
|
||||
seen = seen || /* @__PURE__ */ new Map();
|
||||
}
|
||||
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
|
||||
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
||||
if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
|
||||
continue;
|
||||
|
@ -2281,9 +2303,11 @@ function renderComponentRoot$1(instance) {
|
|||
const getChildRoot = (vnode) => {
|
||||
const rawChildren = vnode.children;
|
||||
const dynamicChildren = vnode.dynamicChildren;
|
||||
const childRoot = filterSingleRoot(rawChildren);
|
||||
const childRoot = filterSingleRoot(rawChildren, false);
|
||||
if (!childRoot) {
|
||||
return [vnode, void 0];
|
||||
} else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
|
||||
return getChildRoot(childRoot);
|
||||
}
|
||||
const index = rawChildren.indexOf(childRoot);
|
||||
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
|
||||
|
@ -2299,7 +2323,7 @@ const getChildRoot = (vnode) => {
|
|||
};
|
||||
return [normalizeVNode$1(childRoot), setRoot];
|
||||
};
|
||||
function filterSingleRoot(children) {
|
||||
function filterSingleRoot(children, recurse = true) {
|
||||
let singleRoot;
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const child = children[i];
|
||||
|
@ -2309,6 +2333,9 @@ function filterSingleRoot(children) {
|
|||
return;
|
||||
} else {
|
||||
singleRoot = child;
|
||||
if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
|
||||
return filterSingleRoot(singleRoot.children);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -2399,8 +2426,6 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|||
return false;
|
||||
}
|
||||
function updateHOCHostEl({ vnode, parent }, el) {
|
||||
if (!el)
|
||||
return;
|
||||
while (parent) {
|
||||
const root = parent.subTree;
|
||||
if (root.suspense && root.suspense.activeBranch === vnode) {
|
||||
|
@ -2649,14 +2674,9 @@ function instanceWatch(source, value, options) {
|
|||
cb = value.handler;
|
||||
options = value;
|
||||
}
|
||||
const cur = currentInstance;
|
||||
setCurrentInstance(this);
|
||||
const reset = setCurrentInstance(this);
|
||||
const res = doWatch(getter, cb.bind(publicThis), options);
|
||||
if (cur) {
|
||||
setCurrentInstance(cur);
|
||||
} else {
|
||||
unsetCurrentInstance();
|
||||
}
|
||||
reset();
|
||||
return res;
|
||||
}
|
||||
function createPathGetter(ctx, path) {
|
||||
|
@ -2781,9 +2801,9 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|||
return;
|
||||
}
|
||||
pauseTracking();
|
||||
setCurrentInstance(target);
|
||||
const reset = setCurrentInstance(target);
|
||||
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
resetTracking();
|
||||
return res;
|
||||
});
|
||||
|
@ -3858,12 +3878,12 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|||
if (key in propsDefaults) {
|
||||
value = propsDefaults[key];
|
||||
} else {
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
value = propsDefaults[key] = defaultValue.call(
|
||||
null,
|
||||
props
|
||||
);
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
} else {
|
||||
value = defaultValue;
|
||||
|
@ -4084,7 +4104,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
|
|||
return rawSlot;
|
||||
}
|
||||
const normalized = withCtx((...args) => {
|
||||
if (currentInstance) {
|
||||
if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
|
||||
warn$1(
|
||||
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
|
||||
);
|
||||
|
@ -4220,9 +4240,10 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|||
} else {
|
||||
const _isString = isString(ref);
|
||||
const _isRef = isRef(ref);
|
||||
const isVFor = rawRef.f;
|
||||
if (_isString || _isRef) {
|
||||
const doSet = () => {
|
||||
if (rawRef.f) {
|
||||
if (isVFor) {
|
||||
const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
|
||||
if (isUnmount) {
|
||||
isArray(existing) && remove(existing, refValue);
|
||||
|
@ -4255,11 +4276,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|||
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
||||
}
|
||||
};
|
||||
if (value) {
|
||||
if (isUnmount || isVFor) {
|
||||
doSet();
|
||||
} else {
|
||||
doSet.id = -1;
|
||||
queuePostRenderEffect(doSet, parentSuspense);
|
||||
} else {
|
||||
doSet();
|
||||
}
|
||||
} else {
|
||||
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
||||
|
@ -4851,7 +4872,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
hostInsert(fragmentStartAnchor, container, anchor);
|
||||
hostInsert(fragmentEndAnchor, container, anchor);
|
||||
mountChildren(
|
||||
n2.children,
|
||||
// #10007
|
||||
// such fragment like `<></>` will be compiled into
|
||||
// a fragment which doesn't have a children.
|
||||
// In this case fallback to an empty array
|
||||
n2.children || [],
|
||||
container,
|
||||
fragmentEndAnchor,
|
||||
parentComponent,
|
||||
|
@ -5685,6 +5710,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
}
|
||||
return hostNextSibling(vnode.anchor || vnode.el);
|
||||
};
|
||||
let isFlushing = false;
|
||||
const render = (vnode, container, namespace) => {
|
||||
if (vnode == null) {
|
||||
if (container._vnode) {
|
||||
|
@ -5701,8 +5727,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|||
namespace
|
||||
);
|
||||
}
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
if (!isFlushing) {
|
||||
isFlushing = true;
|
||||
flushPreFlushCbs();
|
||||
flushPostFlushCbs();
|
||||
isFlushing = false;
|
||||
}
|
||||
container._vnode = vnode;
|
||||
};
|
||||
const internals = {
|
||||
|
@ -6246,8 +6276,13 @@ let setInSSRSetupState;
|
|||
);
|
||||
}
|
||||
const setCurrentInstance = (instance) => {
|
||||
const prev = currentInstance;
|
||||
internalSetCurrentInstance(instance);
|
||||
instance.scope.on();
|
||||
return () => {
|
||||
instance.scope.off();
|
||||
internalSetCurrentInstance(prev);
|
||||
};
|
||||
};
|
||||
const unsetCurrentInstance = () => {
|
||||
currentInstance && currentInstance.scope.off();
|
||||
|
@ -6309,7 +6344,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|||
const { setup } = Component;
|
||||
if (setup) {
|
||||
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
pauseTracking();
|
||||
const setupResult = callWithErrorHandling(
|
||||
setup,
|
||||
|
@ -6321,7 +6356,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|||
]
|
||||
);
|
||||
resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
if (isPromise(setupResult)) {
|
||||
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
||||
if (isSSR) {
|
||||
|
@ -6405,13 +6440,13 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|||
instance.render = Component.render || NOOP;
|
||||
}
|
||||
{
|
||||
setCurrentInstance(instance);
|
||||
const reset = setCurrentInstance(instance);
|
||||
pauseTracking();
|
||||
try {
|
||||
applyOptions(instance);
|
||||
} finally {
|
||||
resetTracking();
|
||||
unsetCurrentInstance();
|
||||
reset();
|
||||
}
|
||||
}
|
||||
if (!Component.render && instance.render === NOOP && !isSSR) {
|
||||
|
@ -6542,7 +6577,7 @@ const computed = (getterOrOptions, debugOptions) => {
|
|||
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
||||
};
|
||||
|
||||
const version = "3.4.5";
|
||||
const version = "3.4.15";
|
||||
const warn = warn$1 ;
|
||||
const _ssrUtils = {
|
||||
createComponentInstance: createComponentInstance$1,
|
||||
|
@ -6674,6 +6709,9 @@ const vShow = {
|
|||
setDisplay(el, value);
|
||||
}
|
||||
};
|
||||
{
|
||||
vShow.name = "show";
|
||||
}
|
||||
function setDisplay(el, value) {
|
||||
el.style.display = value ? el[vShowOldKey] : "none";
|
||||
}
|
||||
|
@ -6689,6 +6727,7 @@ const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
|
|||
|
||||
function patchStyle(el, prev, next) {
|
||||
const style = el.style;
|
||||
const currentDisplay = style.display;
|
||||
const isCssString = isString(next);
|
||||
if (next && !isCssString) {
|
||||
if (prev && !isString(prev)) {
|
||||
|
@ -6702,7 +6741,6 @@ function patchStyle(el, prev, next) {
|
|||
setStyle(style, key, next[key]);
|
||||
}
|
||||
} else {
|
||||
const currentDisplay = style.display;
|
||||
if (isCssString) {
|
||||
if (prev !== next) {
|
||||
const cssVarText = style[CSS_VAR_TEXT];
|
||||
|
@ -6714,9 +6752,9 @@ function patchStyle(el, prev, next) {
|
|||
} else if (prev) {
|
||||
el.removeAttribute("style");
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
if (vShowOldKey in el) {
|
||||
style.display = currentDisplay;
|
||||
}
|
||||
}
|
||||
const semicolonRE = /[^\\];\s*$/;
|
||||
|
@ -7163,7 +7201,7 @@ function ssrRenderAttrs(props, tag) {
|
|||
return ret;
|
||||
}
|
||||
function ssrRenderDynamicAttr(key, value, tag) {
|
||||
if (!isRenderableValue(value)) {
|
||||
if (!isRenderableAttrValue(value)) {
|
||||
return ``;
|
||||
}
|
||||
const attrKey = tag && (tag.indexOf("-") > 0 || isSVGTag(tag)) ? key : propsToAttrMap[key] || key.toLowerCase();
|
||||
|
@ -7179,18 +7217,11 @@ function ssrRenderDynamicAttr(key, value, tag) {
|
|||
}
|
||||
}
|
||||
function ssrRenderAttr(key, value) {
|
||||
if (!isRenderableValue(value)) {
|
||||
if (!isRenderableAttrValue(value)) {
|
||||
return ``;
|
||||
}
|
||||
return ` ${key}="${escapeHtml(value)}"`;
|
||||
}
|
||||
function isRenderableValue(value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
const type = typeof value;
|
||||
return type === "string" || type === "number" || type === "boolean";
|
||||
}
|
||||
function ssrRenderClass(raw) {
|
||||
return escapeHtml(normalizeClass(raw));
|
||||
}
|
||||
|
@ -7439,8 +7470,7 @@ function renderComponentVNode(vnode, parentComponent = null, slotScopeId) {
|
|||
() => Promise.all(
|
||||
prefetches.map((prefetch) => prefetch.call(instance.proxy))
|
||||
)
|
||||
).catch(() => {
|
||||
});
|
||||
).catch(NOOP);
|
||||
}
|
||||
return p.then(() => renderComponentSubTree(instance, slotScopeId));
|
||||
} else {
|
||||
|
|
7
node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js
generated
vendored
7
node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js
generated
vendored
File diff suppressed because one or more lines are too long
27
node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js
generated
vendored
27
node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js
generated
vendored
|
@ -1,5 +1,10 @@
|
|||
/**
|
||||
* @vue/server-renderer v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
import { createVNode, ssrContextKey, warn as warn$2, Fragment, Static, Comment, Text, mergeProps, ssrUtils, createApp, initDirectivesForSSR } from 'vue';
|
||||
import { makeMap, isOn, isSVGTag, propsToAttrMap, isBooleanAttr, includeBooleanAttr, isSSRSafeAttrName, escapeHtml, normalizeClass, isString, normalizeStyle, stringifyStyle, isArray, toDisplayString, isFunction, getGlobalThis, NOOP, isObject, looseEqual, looseIndexOf, isPromise, escapeHtmlComment, isVoidTag } from '@vue/shared';
|
||||
import { makeMap, isOn, isRenderableAttrValue, isSVGTag, propsToAttrMap, isBooleanAttr, includeBooleanAttr, isSSRSafeAttrName, escapeHtml, normalizeClass, isString, normalizeStyle, stringifyStyle, isArray, toDisplayString, isFunction, getGlobalThis, NOOP, isObject, looseEqual, looseIndexOf, isPromise, escapeHtmlComment, isVoidTag } from '@vue/shared';
|
||||
export { includeBooleanAttr as ssrIncludeBooleanAttr } from '@vue/shared';
|
||||
|
||||
const shouldIgnoreProp = makeMap(
|
||||
|
@ -23,7 +28,7 @@ function ssrRenderAttrs(props, tag) {
|
|||
return ret;
|
||||
}
|
||||
function ssrRenderDynamicAttr(key, value, tag) {
|
||||
if (!isRenderableValue(value)) {
|
||||
if (!isRenderableAttrValue(value)) {
|
||||
return ``;
|
||||
}
|
||||
const attrKey = tag && (tag.indexOf("-") > 0 || isSVGTag(tag)) ? key : propsToAttrMap[key] || key.toLowerCase();
|
||||
|
@ -39,18 +44,11 @@ function ssrRenderDynamicAttr(key, value, tag) {
|
|||
}
|
||||
}
|
||||
function ssrRenderAttr(key, value) {
|
||||
if (!isRenderableValue(value)) {
|
||||
if (!isRenderableAttrValue(value)) {
|
||||
return ``;
|
||||
}
|
||||
return ` ${key}="${escapeHtml(value)}"`;
|
||||
}
|
||||
function isRenderableValue(value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
const type = typeof value;
|
||||
return type === "string" || type === "number" || type === "boolean";
|
||||
}
|
||||
function ssrRenderClass(raw) {
|
||||
return escapeHtml(normalizeClass(raw));
|
||||
}
|
||||
|
@ -337,7 +335,7 @@ function handleError(err, instance, type, throwInDev = true) {
|
|||
if (instance) {
|
||||
let cur = instance.parent;
|
||||
const exposedInstance = instance.proxy;
|
||||
const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings[type] : `https://vuejs.org/errors/#runtime-${type}`;
|
||||
const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
|
||||
while (cur) {
|
||||
const errorCapturedHooks = cur.ec;
|
||||
if (errorCapturedHooks) {
|
||||
|
@ -466,8 +464,8 @@ function formatComponentName(instance, Component, isRoot = false) {
|
|||
}
|
||||
|
||||
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
||||
!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__ ? devtools : void 0;
|
||||
!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__ ? setDevtoolsHook : NOOP;
|
||||
!!(process.env.NODE_ENV !== "production") || true ? devtools : void 0;
|
||||
!!(process.env.NODE_ENV !== "production") || true ? setDevtoolsHook : NOOP;
|
||||
|
||||
function ssrRenderList(source, renderItem) {
|
||||
if (isArray(source) || isString(source)) {
|
||||
|
@ -601,8 +599,7 @@ function renderComponentVNode(vnode, parentComponent = null, slotScopeId) {
|
|||
() => Promise.all(
|
||||
prefetches.map((prefetch) => prefetch.call(instance.proxy))
|
||||
)
|
||||
).catch(() => {
|
||||
});
|
||||
).catch(NOOP);
|
||||
}
|
||||
return p.then(() => renderComponentSubTree(instance, slotScopeId));
|
||||
} else {
|
||||
|
|
9
node_modules/@vue/server-renderer/package.json
generated
vendored
9
node_modules/@vue/server-renderer/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/server-renderer",
|
||||
"version": "3.4.5",
|
||||
"version": "3.4.15",
|
||||
"description": "@vue/server-renderer",
|
||||
"main": "index.js",
|
||||
"module": "dist/server-renderer.esm-bundler.js",
|
||||
|
@ -17,6 +17,7 @@
|
|||
"development": "./dist/server-renderer.cjs.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"module": "./dist/server-renderer.esm-bundler.js",
|
||||
"import": "./dist/server-renderer.esm-bundler.js",
|
||||
"require": "./index.js"
|
||||
},
|
||||
|
@ -45,10 +46,10 @@
|
|||
},
|
||||
"homepage": "https://github.com/vuejs/core/tree/main/packages/server-renderer#readme",
|
||||
"peerDependencies": {
|
||||
"vue": "3.4.5"
|
||||
"vue": "3.4.15"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vue/shared": "3.4.5",
|
||||
"@vue/compiler-ssr": "3.4.5"
|
||||
"@vue/compiler-ssr": "3.4.15",
|
||||
"@vue/shared": "3.4.15"
|
||||
}
|
||||
}
|
13
node_modules/@vue/shared/dist/shared.cjs.js
generated
vendored
13
node_modules/@vue/shared/dist/shared.cjs.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/shared v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -350,6 +355,13 @@ const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
|
|||
const isKnownSvgAttr = /* @__PURE__ */ makeMap(
|
||||
`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
|
||||
);
|
||||
function isRenderableAttrValue(value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
const type = typeof value;
|
||||
return type === "string" || type === "number" || type === "boolean";
|
||||
}
|
||||
|
||||
const escapeRE = /["'&<>]/;
|
||||
function escapeHtml(string) {
|
||||
|
@ -520,6 +532,7 @@ exports.isOn = isOn;
|
|||
exports.isPlainObject = isPlainObject;
|
||||
exports.isPromise = isPromise;
|
||||
exports.isRegExp = isRegExp;
|
||||
exports.isRenderableAttrValue = isRenderableAttrValue;
|
||||
exports.isReservedProp = isReservedProp;
|
||||
exports.isSSRSafeAttrName = isSSRSafeAttrName;
|
||||
exports.isSVGTag = isSVGTag;
|
||||
|
|
13
node_modules/@vue/shared/dist/shared.cjs.prod.js
generated
vendored
13
node_modules/@vue/shared/dist/shared.cjs.prod.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/shared v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -350,6 +355,13 @@ const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
|
|||
const isKnownSvgAttr = /* @__PURE__ */ makeMap(
|
||||
`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
|
||||
);
|
||||
function isRenderableAttrValue(value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
const type = typeof value;
|
||||
return type === "string" || type === "number" || type === "boolean";
|
||||
}
|
||||
|
||||
const escapeRE = /["'&<>]/;
|
||||
function escapeHtml(string) {
|
||||
|
@ -520,6 +532,7 @@ exports.isOn = isOn;
|
|||
exports.isPlainObject = isPlainObject;
|
||||
exports.isPromise = isPromise;
|
||||
exports.isRegExp = isRegExp;
|
||||
exports.isRenderableAttrValue = isRenderableAttrValue;
|
||||
exports.isReservedProp = isReservedProp;
|
||||
exports.isSSRSafeAttrName = isSSRSafeAttrName;
|
||||
exports.isSVGTag = isSVGTag;
|
||||
|
|
4
node_modules/@vue/shared/dist/shared.d.ts
generated
vendored
4
node_modules/@vue/shared/dist/shared.d.ts
generated
vendored
|
@ -292,6 +292,10 @@ export declare const isKnownHtmlAttr: (key: string) => boolean;
|
|||
* Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
|
||||
*/
|
||||
export declare const isKnownSvgAttr: (key: string) => boolean;
|
||||
/**
|
||||
* Shared between server-renderer and runtime-core hydration logic
|
||||
*/
|
||||
export declare function isRenderableAttrValue(value: unknown): boolean;
|
||||
|
||||
export declare function escapeHtml(string: unknown): string;
|
||||
export declare function escapeHtmlComment(src: string): string;
|
||||
|
|
14
node_modules/@vue/shared/dist/shared.esm-bundler.js
generated
vendored
14
node_modules/@vue/shared/dist/shared.esm-bundler.js
generated
vendored
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @vue/shared v3.4.15
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
function makeMap(str, expectsLowerCase) {
|
||||
const set = new Set(str.split(","));
|
||||
return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
|
||||
|
@ -346,6 +351,13 @@ const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
|
|||
const isKnownSvgAttr = /* @__PURE__ */ makeMap(
|
||||
`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
|
||||
);
|
||||
function isRenderableAttrValue(value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
const type = typeof value;
|
||||
return type === "string" || type === "number" || type === "boolean";
|
||||
}
|
||||
|
||||
const escapeRE = /["'&<>]/;
|
||||
function escapeHtml(string) {
|
||||
|
@ -475,4 +487,4 @@ const stringifySymbol = (v, i = "") => {
|
|||
return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
|
||||
};
|
||||
|
||||
export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };
|
||||
export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };
|
||||
|
|
3
node_modules/@vue/shared/package.json
generated
vendored
3
node_modules/@vue/shared/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/shared",
|
||||
"version": "3.4.5",
|
||||
"version": "3.4.15",
|
||||
"description": "internal utils shared across @vue packages",
|
||||
"main": "index.js",
|
||||
"module": "dist/shared.esm-bundler.js",
|
||||
|
@ -17,6 +17,7 @@
|
|||
"development": "./dist/shared.cjs.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"module": "./dist/shared.esm-bundler.js",
|
||||
"import": "./dist/shared.esm-bundler.js",
|
||||
"require": "./index.js"
|
||||
},
|
||||
|
|
12
node_modules/@vueuse/core/index.cjs
generated
vendored
12
node_modules/@vueuse/core/index.cjs
generated
vendored
|
@ -992,7 +992,7 @@ function blobToBase64(blob) {
|
|||
function useBattery(options = {}) {
|
||||
const { navigator = defaultNavigator } = options;
|
||||
const events = ["chargingchange", "chargingtimechange", "dischargingtimechange", "levelchange"];
|
||||
const isSupported = useSupported(() => navigator && "getBattery" in navigator);
|
||||
const isSupported = useSupported(() => navigator && "getBattery" in navigator && typeof navigator.getBattery === "function");
|
||||
const charging = vueDemi.ref(false);
|
||||
const chargingTime = vueDemi.ref(0);
|
||||
const dischargingTime = vueDemi.ref(0);
|
||||
|
@ -2366,8 +2366,8 @@ function useDraggable(target, options = {}) {
|
|||
const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);
|
||||
const targetRect = shared.toValue(target).getBoundingClientRect();
|
||||
const pos = {
|
||||
x: e.clientX - (container ? targetRect.left - containerRect.left : targetRect.left),
|
||||
y: e.clientY - (container ? targetRect.top - containerRect.top : targetRect.top)
|
||||
x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),
|
||||
y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)
|
||||
};
|
||||
if ((onStart == null ? void 0 : onStart(pos, e)) === false)
|
||||
return;
|
||||
|
@ -2387,12 +2387,12 @@ function useDraggable(target, options = {}) {
|
|||
if (axis === "x" || axis === "both") {
|
||||
x = e.clientX - pressedDelta.value.x;
|
||||
if (container)
|
||||
x = Math.min(Math.max(0, x), containerRect.width - targetRect.width);
|
||||
x = Math.min(Math.max(0, x), containerRect.width + container.scrollLeft - targetRect.width);
|
||||
}
|
||||
if (axis === "y" || axis === "both") {
|
||||
y = e.clientY - pressedDelta.value.y;
|
||||
if (container)
|
||||
y = Math.min(Math.max(0, y), containerRect.height - targetRect.height);
|
||||
y = Math.min(Math.max(0, y), containerRect.height + container.scrollTop - targetRect.height);
|
||||
}
|
||||
position.value = {
|
||||
x,
|
||||
|
@ -5701,7 +5701,7 @@ function useStorageAsync(key, initialValue, storage, options = {}) {
|
|||
const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];
|
||||
if (!storage) {
|
||||
try {
|
||||
storage = getSSRHandler("getDefaultStorage", () => {
|
||||
storage = getSSRHandler("getDefaultStorageAsync", () => {
|
||||
var _a2;
|
||||
return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;
|
||||
})();
|
||||
|
|
2
node_modules/@vueuse/core/index.d.cts
generated
vendored
2
node_modules/@vueuse/core/index.d.cts
generated
vendored
|
@ -4224,7 +4224,7 @@ interface FormatTimeAgoOptions<UnitNames extends string = UseTimeAgoUnitNamesDef
|
|||
/**
|
||||
* Custom units
|
||||
*/
|
||||
units?: UseTimeAgoUnit<UseTimeAgoUnitNamesDefault>[];
|
||||
units?: UseTimeAgoUnit<UnitNames>[];
|
||||
}
|
||||
interface UseTimeAgoOptions<Controls extends boolean, UnitNames extends string = UseTimeAgoUnitNamesDefault> extends FormatTimeAgoOptions<UnitNames> {
|
||||
/**
|
||||
|
|
2
node_modules/@vueuse/core/index.d.mts
generated
vendored
2
node_modules/@vueuse/core/index.d.mts
generated
vendored
|
@ -4224,7 +4224,7 @@ interface FormatTimeAgoOptions<UnitNames extends string = UseTimeAgoUnitNamesDef
|
|||
/**
|
||||
* Custom units
|
||||
*/
|
||||
units?: UseTimeAgoUnit<UseTimeAgoUnitNamesDefault>[];
|
||||
units?: UseTimeAgoUnit<UnitNames>[];
|
||||
}
|
||||
interface UseTimeAgoOptions<Controls extends boolean, UnitNames extends string = UseTimeAgoUnitNamesDefault> extends FormatTimeAgoOptions<UnitNames> {
|
||||
/**
|
||||
|
|
2
node_modules/@vueuse/core/index.d.ts
generated
vendored
2
node_modules/@vueuse/core/index.d.ts
generated
vendored
|
@ -4224,7 +4224,7 @@ interface FormatTimeAgoOptions<UnitNames extends string = UseTimeAgoUnitNamesDef
|
|||
/**
|
||||
* Custom units
|
||||
*/
|
||||
units?: UseTimeAgoUnit<UseTimeAgoUnitNamesDefault>[];
|
||||
units?: UseTimeAgoUnit<UnitNames>[];
|
||||
}
|
||||
interface UseTimeAgoOptions<Controls extends boolean, UnitNames extends string = UseTimeAgoUnitNamesDefault> extends FormatTimeAgoOptions<UnitNames> {
|
||||
/**
|
||||
|
|
12
node_modules/@vueuse/core/index.iife.js
generated
vendored
12
node_modules/@vueuse/core/index.iife.js
generated
vendored
|
@ -1106,7 +1106,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|||
function useBattery(options = {}) {
|
||||
const { navigator = defaultNavigator } = options;
|
||||
const events = ["chargingchange", "chargingtimechange", "dischargingtimechange", "levelchange"];
|
||||
const isSupported = useSupported(() => navigator && "getBattery" in navigator);
|
||||
const isSupported = useSupported(() => navigator && "getBattery" in navigator && typeof navigator.getBattery === "function");
|
||||
const charging = vueDemi.ref(false);
|
||||
const chargingTime = vueDemi.ref(0);
|
||||
const dischargingTime = vueDemi.ref(0);
|
||||
|
@ -2480,8 +2480,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|||
const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);
|
||||
const targetRect = shared.toValue(target).getBoundingClientRect();
|
||||
const pos = {
|
||||
x: e.clientX - (container ? targetRect.left - containerRect.left : targetRect.left),
|
||||
y: e.clientY - (container ? targetRect.top - containerRect.top : targetRect.top)
|
||||
x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),
|
||||
y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)
|
||||
};
|
||||
if ((onStart == null ? void 0 : onStart(pos, e)) === false)
|
||||
return;
|
||||
|
@ -2501,12 +2501,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|||
if (axis === "x" || axis === "both") {
|
||||
x = e.clientX - pressedDelta.value.x;
|
||||
if (container)
|
||||
x = Math.min(Math.max(0, x), containerRect.width - targetRect.width);
|
||||
x = Math.min(Math.max(0, x), containerRect.width + container.scrollLeft - targetRect.width);
|
||||
}
|
||||
if (axis === "y" || axis === "both") {
|
||||
y = e.clientY - pressedDelta.value.y;
|
||||
if (container)
|
||||
y = Math.min(Math.max(0, y), containerRect.height - targetRect.height);
|
||||
y = Math.min(Math.max(0, y), containerRect.height + container.scrollTop - targetRect.height);
|
||||
}
|
||||
position.value = {
|
||||
x,
|
||||
|
@ -5815,7 +5815,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|||
const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];
|
||||
if (!storage) {
|
||||
try {
|
||||
storage = getSSRHandler("getDefaultStorage", () => {
|
||||
storage = getSSRHandler("getDefaultStorageAsync", () => {
|
||||
var _a2;
|
||||
return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;
|
||||
})();
|
||||
|
|
2
node_modules/@vueuse/core/index.iife.min.js
generated
vendored
2
node_modules/@vueuse/core/index.iife.min.js
generated
vendored
File diff suppressed because one or more lines are too long
12
node_modules/@vueuse/core/index.mjs
generated
vendored
12
node_modules/@vueuse/core/index.mjs
generated
vendored
|
@ -991,7 +991,7 @@ function blobToBase64(blob) {
|
|||
function useBattery(options = {}) {
|
||||
const { navigator = defaultNavigator } = options;
|
||||
const events = ["chargingchange", "chargingtimechange", "dischargingtimechange", "levelchange"];
|
||||
const isSupported = useSupported(() => navigator && "getBattery" in navigator);
|
||||
const isSupported = useSupported(() => navigator && "getBattery" in navigator && typeof navigator.getBattery === "function");
|
||||
const charging = ref(false);
|
||||
const chargingTime = ref(0);
|
||||
const dischargingTime = ref(0);
|
||||
|
@ -2365,8 +2365,8 @@ function useDraggable(target, options = {}) {
|
|||
const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);
|
||||
const targetRect = toValue(target).getBoundingClientRect();
|
||||
const pos = {
|
||||
x: e.clientX - (container ? targetRect.left - containerRect.left : targetRect.left),
|
||||
y: e.clientY - (container ? targetRect.top - containerRect.top : targetRect.top)
|
||||
x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),
|
||||
y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)
|
||||
};
|
||||
if ((onStart == null ? void 0 : onStart(pos, e)) === false)
|
||||
return;
|
||||
|
@ -2386,12 +2386,12 @@ function useDraggable(target, options = {}) {
|
|||
if (axis === "x" || axis === "both") {
|
||||
x = e.clientX - pressedDelta.value.x;
|
||||
if (container)
|
||||
x = Math.min(Math.max(0, x), containerRect.width - targetRect.width);
|
||||
x = Math.min(Math.max(0, x), containerRect.width + container.scrollLeft - targetRect.width);
|
||||
}
|
||||
if (axis === "y" || axis === "both") {
|
||||
y = e.clientY - pressedDelta.value.y;
|
||||
if (container)
|
||||
y = Math.min(Math.max(0, y), containerRect.height - targetRect.height);
|
||||
y = Math.min(Math.max(0, y), containerRect.height + container.scrollTop - targetRect.height);
|
||||
}
|
||||
position.value = {
|
||||
x,
|
||||
|
@ -5700,7 +5700,7 @@ function useStorageAsync(key, initialValue, storage, options = {}) {
|
|||
const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];
|
||||
if (!storage) {
|
||||
try {
|
||||
storage = getSSRHandler("getDefaultStorage", () => {
|
||||
storage = getSSRHandler("getDefaultStorageAsync", () => {
|
||||
var _a2;
|
||||
return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;
|
||||
})();
|
||||
|
|
6
node_modules/@vueuse/core/package.json
generated
vendored
6
node_modules/@vueuse/core/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vueuse/core",
|
||||
"version": "10.7.1",
|
||||
"version": "10.7.2",
|
||||
"description": "Collection of essential Vue Composition Utilities",
|
||||
"author": "Anthony Fu <https://github.com/antfu>",
|
||||
"license": "MIT",
|
||||
|
@ -38,8 +38,8 @@
|
|||
"types": "./index.d.cts",
|
||||
"dependencies": {
|
||||
"@types/web-bluetooth": "^0.0.20",
|
||||
"@vueuse/metadata": "10.7.1",
|
||||
"@vueuse/shared": "10.7.1",
|
||||
"@vueuse/metadata": "10.7.2",
|
||||
"@vueuse/shared": "10.7.2",
|
||||
"vue-demi": ">=0.14.6"
|
||||
}
|
||||
}
|
||||
|
|
9
node_modules/@vueuse/integrations/index.cjs
generated
vendored
9
node_modules/@vueuse/integrations/index.cjs
generated
vendored
|
@ -86,12 +86,13 @@ function useAsyncValidator(value, rules, options = {}) {
|
|||
function useAxios(...args) {
|
||||
const url = typeof args[0] === "string" ? args[0] : void 0;
|
||||
const argsPlaceholder = typeof url === "string" ? 1 : 0;
|
||||
let defaultConfig = {};
|
||||
let instance = axios;
|
||||
let options = {
|
||||
const defaultOptions = {
|
||||
immediate: !!argsPlaceholder,
|
||||
shallow: true
|
||||
};
|
||||
let defaultConfig = {};
|
||||
let instance = axios;
|
||||
let options = defaultOptions;
|
||||
const isAxiosInstance = (val) => !!(val == null ? void 0 : val.request);
|
||||
if (args.length > 0 + argsPlaceholder) {
|
||||
if (isAxiosInstance(args[0 + argsPlaceholder]))
|
||||
|
@ -104,7 +105,7 @@ function useAxios(...args) {
|
|||
instance = args[1 + argsPlaceholder];
|
||||
}
|
||||
if (args.length === 2 + argsPlaceholder && !isAxiosInstance(args[1 + argsPlaceholder]) || args.length === 3 + argsPlaceholder)
|
||||
options = args[args.length - 1];
|
||||
options = args[args.length - 1] || defaultOptions;
|
||||
const {
|
||||
initialData,
|
||||
shallow,
|
||||
|
|
9
node_modules/@vueuse/integrations/index.iife.js
generated
vendored
9
node_modules/@vueuse/integrations/index.iife.js
generated
vendored
|
@ -187,12 +187,13 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|||
function useAxios(...args) {
|
||||
const url = typeof args[0] === "string" ? args[0] : void 0;
|
||||
const argsPlaceholder = typeof url === "string" ? 1 : 0;
|
||||
let defaultConfig = {};
|
||||
let instance = axios;
|
||||
let options = {
|
||||
const defaultOptions = {
|
||||
immediate: !!argsPlaceholder,
|
||||
shallow: true
|
||||
};
|
||||
let defaultConfig = {};
|
||||
let instance = axios;
|
||||
let options = defaultOptions;
|
||||
const isAxiosInstance = (val) => !!(val == null ? void 0 : val.request);
|
||||
if (args.length > 0 + argsPlaceholder) {
|
||||
if (isAxiosInstance(args[0 + argsPlaceholder]))
|
||||
|
@ -205,7 +206,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|||
instance = args[1 + argsPlaceholder];
|
||||
}
|
||||
if (args.length === 2 + argsPlaceholder && !isAxiosInstance(args[1 + argsPlaceholder]) || args.length === 3 + argsPlaceholder)
|
||||
options = args[args.length - 1];
|
||||
options = args[args.length - 1] || defaultOptions;
|
||||
const {
|
||||
initialData,
|
||||
shallow,
|
||||
|
|
2
node_modules/@vueuse/integrations/index.iife.min.js
generated
vendored
2
node_modules/@vueuse/integrations/index.iife.min.js
generated
vendored
File diff suppressed because one or more lines are too long
9
node_modules/@vueuse/integrations/index.mjs
generated
vendored
9
node_modules/@vueuse/integrations/index.mjs
generated
vendored
|
@ -84,12 +84,13 @@ function useAsyncValidator(value, rules, options = {}) {
|
|||
function useAxios(...args) {
|
||||
const url = typeof args[0] === "string" ? args[0] : void 0;
|
||||
const argsPlaceholder = typeof url === "string" ? 1 : 0;
|
||||
let defaultConfig = {};
|
||||
let instance = axios;
|
||||
let options = {
|
||||
const defaultOptions = {
|
||||
immediate: !!argsPlaceholder,
|
||||
shallow: true
|
||||
};
|
||||
let defaultConfig = {};
|
||||
let instance = axios;
|
||||
let options = defaultOptions;
|
||||
const isAxiosInstance = (val) => !!(val == null ? void 0 : val.request);
|
||||
if (args.length > 0 + argsPlaceholder) {
|
||||
if (isAxiosInstance(args[0 + argsPlaceholder]))
|
||||
|
@ -102,7 +103,7 @@ function useAxios(...args) {
|
|||
instance = args[1 + argsPlaceholder];
|
||||
}
|
||||
if (args.length === 2 + argsPlaceholder && !isAxiosInstance(args[1 + argsPlaceholder]) || args.length === 3 + argsPlaceholder)
|
||||
options = args[args.length - 1];
|
||||
options = args[args.length - 1] || defaultOptions;
|
||||
const {
|
||||
initialData,
|
||||
shallow,
|
||||
|
|
10
node_modules/@vueuse/integrations/package.json
generated
vendored
10
node_modules/@vueuse/integrations/package.json
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vueuse/integrations",
|
||||
"version": "10.7.1",
|
||||
"version": "10.7.2",
|
||||
"description": "Integration wrappers for utility libraries",
|
||||
"author": "Anthony Fu <https://github.com/antfu>",
|
||||
"license": "MIT",
|
||||
|
@ -145,8 +145,8 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@vueuse/core": "10.7.1",
|
||||
"@vueuse/shared": "10.7.1",
|
||||
"@vueuse/core": "10.7.2",
|
||||
"@vueuse/shared": "10.7.2",
|
||||
"vue-demi": ">=0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -154,7 +154,7 @@
|
|||
"@types/qrcode": "^1.5.5",
|
||||
"@types/sortablejs": "^1.15.7",
|
||||
"async-validator": "^4.2.5",
|
||||
"axios": "^1.6.3",
|
||||
"axios": "^1.6.5",
|
||||
"change-case": "^4.1.2",
|
||||
"drauu": "^0.3.7",
|
||||
"focus-trap": "^7.5.4",
|
||||
|
@ -164,6 +164,6 @@
|
|||
"nprogress": "^0.2.0",
|
||||
"qrcode": "^1.5.3",
|
||||
"sortablejs": "^1.15.1",
|
||||
"universal-cookie": "^6.1.1"
|
||||
"universal-cookie": "^6.1.3"
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue