@vue/compat 3.3.11 → 3.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue.cjs.js +37 -26
- package/dist/vue.cjs.prod.js +37 -26
- package/dist/vue.esm-browser.js +93 -79
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +93 -79
- package/dist/vue.global.js +93 -79
- package/dist/vue.global.prod.js +5 -5
- package/dist/vue.runtime.esm-browser.js +93 -79
- package/dist/vue.runtime.esm-browser.prod.js +5 -5
- package/dist/vue.runtime.esm-bundler.js +93 -79
- package/dist/vue.runtime.global.js +93 -79
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +2 -2
|
@@ -723,17 +723,19 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
723
723
|
}
|
|
724
724
|
set(target, key, value, receiver) {
|
|
725
725
|
let oldValue = target[key];
|
|
726
|
-
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
727
|
-
return false;
|
|
728
|
-
}
|
|
729
726
|
if (!this._shallow) {
|
|
727
|
+
const isOldValueReadonly = isReadonly(oldValue);
|
|
730
728
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
731
729
|
oldValue = toRaw(oldValue);
|
|
732
730
|
value = toRaw(value);
|
|
733
731
|
}
|
|
734
732
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
735
|
-
|
|
736
|
-
|
|
733
|
+
if (isOldValueReadonly) {
|
|
734
|
+
return false;
|
|
735
|
+
} else {
|
|
736
|
+
oldValue.value = value;
|
|
737
|
+
return true;
|
|
738
|
+
}
|
|
737
739
|
}
|
|
738
740
|
}
|
|
739
741
|
const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
|
|
@@ -3290,7 +3292,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3290
3292
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
3291
3293
|
activeBranch: null,
|
|
3292
3294
|
pendingBranch: null,
|
|
3293
|
-
isInFallback:
|
|
3295
|
+
isInFallback: !isHydrating,
|
|
3294
3296
|
isHydrating,
|
|
3295
3297
|
isUnmounted: false,
|
|
3296
3298
|
effects: [],
|
|
@@ -6226,7 +6228,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6226
6228
|
return vm;
|
|
6227
6229
|
}
|
|
6228
6230
|
}
|
|
6229
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
6231
|
+
Vue.version = `2.6.14-compat:${"3.3.13"}`;
|
|
6230
6232
|
Vue.config = singletonApp.config;
|
|
6231
6233
|
Vue.use = (p, ...options) => {
|
|
6232
6234
|
if (p && isFunction(p.install)) {
|
|
@@ -7708,6 +7710,16 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7708
7710
|
if (dirs) {
|
|
7709
7711
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
7710
7712
|
}
|
|
7713
|
+
let needCallTransitionHooks = false;
|
|
7714
|
+
if (isTemplateNode(el)) {
|
|
7715
|
+
needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
7716
|
+
const content = el.content.firstChild;
|
|
7717
|
+
if (needCallTransitionHooks) {
|
|
7718
|
+
transition.beforeEnter(content);
|
|
7719
|
+
}
|
|
7720
|
+
replaceNode(content, el, parentComponent);
|
|
7721
|
+
vnode.el = el = content;
|
|
7722
|
+
}
|
|
7711
7723
|
if (props) {
|
|
7712
7724
|
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
7713
7725
|
for (const key in props) {
|
|
@@ -7740,16 +7752,6 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7740
7752
|
if (vnodeHooks = props && props.onVnodeBeforeMount) {
|
|
7741
7753
|
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7742
7754
|
}
|
|
7743
|
-
let needCallTransitionHooks = false;
|
|
7744
|
-
if (isTemplateNode(el)) {
|
|
7745
|
-
needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
7746
|
-
const content = el.content.firstChild;
|
|
7747
|
-
if (needCallTransitionHooks) {
|
|
7748
|
-
transition.beforeEnter(content);
|
|
7749
|
-
}
|
|
7750
|
-
replaceNode(content, el, parentComponent);
|
|
7751
|
-
vnode.el = el = content;
|
|
7752
|
-
}
|
|
7753
7755
|
if (dirs) {
|
|
7754
7756
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
7755
7757
|
}
|
|
@@ -10819,7 +10821,7 @@ function isMemoSame(cached, memo) {
|
|
|
10819
10821
|
return true;
|
|
10820
10822
|
}
|
|
10821
10823
|
|
|
10822
|
-
const version = "3.3.
|
|
10824
|
+
const version = "3.3.13";
|
|
10823
10825
|
const ssrUtils = null;
|
|
10824
10826
|
const resolveFilter = resolveFilter$1 ;
|
|
10825
10827
|
const _compatUtils = {
|
|
@@ -11258,6 +11260,69 @@ function setDisplay(el, value) {
|
|
|
11258
11260
|
el.style.display = value ? el[vShowOldKey] : "none";
|
|
11259
11261
|
}
|
|
11260
11262
|
|
|
11263
|
+
const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
|
|
11264
|
+
function useCssVars(getter) {
|
|
11265
|
+
const instance = getCurrentInstance();
|
|
11266
|
+
if (!instance) {
|
|
11267
|
+
warn(`useCssVars is called without current active component instance.`);
|
|
11268
|
+
return;
|
|
11269
|
+
}
|
|
11270
|
+
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
11271
|
+
Array.from(
|
|
11272
|
+
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
11273
|
+
).forEach((node) => setVarsOnNode(node, vars));
|
|
11274
|
+
};
|
|
11275
|
+
const setVars = () => {
|
|
11276
|
+
const vars = getter(instance.proxy);
|
|
11277
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
11278
|
+
updateTeleports(vars);
|
|
11279
|
+
};
|
|
11280
|
+
watchPostEffect(setVars);
|
|
11281
|
+
onMounted(() => {
|
|
11282
|
+
const ob = new MutationObserver(setVars);
|
|
11283
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11284
|
+
onUnmounted(() => ob.disconnect());
|
|
11285
|
+
});
|
|
11286
|
+
}
|
|
11287
|
+
function setVarsOnVNode(vnode, vars) {
|
|
11288
|
+
if (vnode.shapeFlag & 128) {
|
|
11289
|
+
const suspense = vnode.suspense;
|
|
11290
|
+
vnode = suspense.activeBranch;
|
|
11291
|
+
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
11292
|
+
suspense.effects.push(() => {
|
|
11293
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
11294
|
+
});
|
|
11295
|
+
}
|
|
11296
|
+
}
|
|
11297
|
+
while (vnode.component) {
|
|
11298
|
+
vnode = vnode.component.subTree;
|
|
11299
|
+
}
|
|
11300
|
+
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
11301
|
+
setVarsOnNode(vnode.el, vars);
|
|
11302
|
+
} else if (vnode.type === Fragment) {
|
|
11303
|
+
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
11304
|
+
} else if (vnode.type === Static) {
|
|
11305
|
+
let { el, anchor } = vnode;
|
|
11306
|
+
while (el) {
|
|
11307
|
+
setVarsOnNode(el, vars);
|
|
11308
|
+
if (el === anchor)
|
|
11309
|
+
break;
|
|
11310
|
+
el = el.nextSibling;
|
|
11311
|
+
}
|
|
11312
|
+
}
|
|
11313
|
+
}
|
|
11314
|
+
function setVarsOnNode(el, vars) {
|
|
11315
|
+
if (el.nodeType === 1) {
|
|
11316
|
+
const style = el.style;
|
|
11317
|
+
let cssText = "";
|
|
11318
|
+
for (const key in vars) {
|
|
11319
|
+
style.setProperty(`--${key}`, vars[key]);
|
|
11320
|
+
cssText += `--${key}: ${vars[key]};`;
|
|
11321
|
+
}
|
|
11322
|
+
style[CSS_VAR_TEXT] = cssText;
|
|
11323
|
+
}
|
|
11324
|
+
}
|
|
11325
|
+
|
|
11261
11326
|
function patchStyle(el, prev, next) {
|
|
11262
11327
|
const style = el.style;
|
|
11263
11328
|
const isCssString = isString(next);
|
|
@@ -11276,6 +11341,10 @@ function patchStyle(el, prev, next) {
|
|
|
11276
11341
|
const currentDisplay = style.display;
|
|
11277
11342
|
if (isCssString) {
|
|
11278
11343
|
if (prev !== next) {
|
|
11344
|
+
const cssVarText = style[CSS_VAR_TEXT];
|
|
11345
|
+
if (cssVarText) {
|
|
11346
|
+
next += ";" + cssVarText;
|
|
11347
|
+
}
|
|
11279
11348
|
style.cssText = next;
|
|
11280
11349
|
}
|
|
11281
11350
|
} else if (prev) {
|
|
@@ -11825,65 +11894,6 @@ function useCssModule(name = "$style") {
|
|
|
11825
11894
|
}
|
|
11826
11895
|
}
|
|
11827
11896
|
|
|
11828
|
-
function useCssVars(getter) {
|
|
11829
|
-
const instance = getCurrentInstance();
|
|
11830
|
-
if (!instance) {
|
|
11831
|
-
warn(`useCssVars is called without current active component instance.`);
|
|
11832
|
-
return;
|
|
11833
|
-
}
|
|
11834
|
-
const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
|
|
11835
|
-
Array.from(
|
|
11836
|
-
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
11837
|
-
).forEach((node) => setVarsOnNode(node, vars));
|
|
11838
|
-
};
|
|
11839
|
-
const setVars = () => {
|
|
11840
|
-
const vars = getter(instance.proxy);
|
|
11841
|
-
setVarsOnVNode(instance.subTree, vars);
|
|
11842
|
-
updateTeleports(vars);
|
|
11843
|
-
};
|
|
11844
|
-
watchPostEffect(setVars);
|
|
11845
|
-
onMounted(() => {
|
|
11846
|
-
const ob = new MutationObserver(setVars);
|
|
11847
|
-
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11848
|
-
onUnmounted(() => ob.disconnect());
|
|
11849
|
-
});
|
|
11850
|
-
}
|
|
11851
|
-
function setVarsOnVNode(vnode, vars) {
|
|
11852
|
-
if (vnode.shapeFlag & 128) {
|
|
11853
|
-
const suspense = vnode.suspense;
|
|
11854
|
-
vnode = suspense.activeBranch;
|
|
11855
|
-
if (suspense.pendingBranch && !suspense.isHydrating) {
|
|
11856
|
-
suspense.effects.push(() => {
|
|
11857
|
-
setVarsOnVNode(suspense.activeBranch, vars);
|
|
11858
|
-
});
|
|
11859
|
-
}
|
|
11860
|
-
}
|
|
11861
|
-
while (vnode.component) {
|
|
11862
|
-
vnode = vnode.component.subTree;
|
|
11863
|
-
}
|
|
11864
|
-
if (vnode.shapeFlag & 1 && vnode.el) {
|
|
11865
|
-
setVarsOnNode(vnode.el, vars);
|
|
11866
|
-
} else if (vnode.type === Fragment) {
|
|
11867
|
-
vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
11868
|
-
} else if (vnode.type === Static) {
|
|
11869
|
-
let { el, anchor } = vnode;
|
|
11870
|
-
while (el) {
|
|
11871
|
-
setVarsOnNode(el, vars);
|
|
11872
|
-
if (el === anchor)
|
|
11873
|
-
break;
|
|
11874
|
-
el = el.nextSibling;
|
|
11875
|
-
}
|
|
11876
|
-
}
|
|
11877
|
-
}
|
|
11878
|
-
function setVarsOnNode(el, vars) {
|
|
11879
|
-
if (el.nodeType === 1) {
|
|
11880
|
-
const style = el.style;
|
|
11881
|
-
for (const key in vars) {
|
|
11882
|
-
style.setProperty(`--${key}`, vars[key]);
|
|
11883
|
-
}
|
|
11884
|
-
}
|
|
11885
|
-
}
|
|
11886
|
-
|
|
11887
11897
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
11888
11898
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
11889
11899
|
const moveCbKey = Symbol("_moveCb");
|
|
@@ -12266,7 +12276,9 @@ const modifierGuards = {
|
|
|
12266
12276
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
12267
12277
|
};
|
|
12268
12278
|
const withModifiers = (fn, modifiers) => {
|
|
12269
|
-
|
|
12279
|
+
const cache = fn._withMods || (fn._withMods = {});
|
|
12280
|
+
const cacheKey = modifiers.join(".");
|
|
12281
|
+
return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
|
|
12270
12282
|
for (let i = 0; i < modifiers.length; i++) {
|
|
12271
12283
|
const guard = modifierGuards[modifiers[i]];
|
|
12272
12284
|
if (guard && guard(event, modifiers))
|
|
@@ -12301,7 +12313,9 @@ const withKeys = (fn, modifiers) => {
|
|
|
12301
12313
|
);
|
|
12302
12314
|
}
|
|
12303
12315
|
}
|
|
12304
|
-
|
|
12316
|
+
const cache = fn._withKeys || (fn._withKeys = {});
|
|
12317
|
+
const cacheKey = modifiers.join(".");
|
|
12318
|
+
return cache[cacheKey] || (cache[cacheKey] = (event) => {
|
|
12305
12319
|
if (!("key" in event)) {
|
|
12306
12320
|
return;
|
|
12307
12321
|
}
|