vue 3.3.9 → 3.3.11
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/compiler-sfc/register-ts.js +1 -3
- package/dist/vue.cjs.js +12 -3
- package/dist/vue.cjs.prod.js +12 -3
- package/dist/vue.esm-browser.js +67 -26
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +13 -4
- package/dist/vue.global.js +67 -26
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +52 -23
- package/dist/vue.runtime.esm-browser.prod.js +5 -5
- package/dist/vue.runtime.global.js +52 -23
- package/dist/vue.runtime.global.prod.js +5 -5
- package/package.json +6 -6
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as runtimeDom from '@vue/runtime-dom';
|
|
|
2
2
|
import { initCustomFormatter, registerRuntimeCompiler, warn } from '@vue/runtime-dom';
|
|
3
3
|
export * from '@vue/runtime-dom';
|
|
4
4
|
import { compile } from '@vue/compiler-dom';
|
|
5
|
-
import { isString, NOOP, extend, generateCodeFrame } from '@vue/shared';
|
|
5
|
+
import { isString, NOOP, extend, generateCodeFrame, EMPTY_OBJ } from '@vue/shared';
|
|
6
6
|
|
|
7
7
|
function initDev() {
|
|
8
8
|
{
|
|
@@ -13,7 +13,15 @@ function initDev() {
|
|
|
13
13
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
14
14
|
initDev();
|
|
15
15
|
}
|
|
16
|
-
const compileCache = /* @__PURE__ */
|
|
16
|
+
const compileCache = /* @__PURE__ */ new WeakMap();
|
|
17
|
+
function getCache(options) {
|
|
18
|
+
let c = compileCache.get(options != null ? options : EMPTY_OBJ);
|
|
19
|
+
if (!c) {
|
|
20
|
+
c = /* @__PURE__ */ Object.create(null);
|
|
21
|
+
compileCache.set(options != null ? options : EMPTY_OBJ, c);
|
|
22
|
+
}
|
|
23
|
+
return c;
|
|
24
|
+
}
|
|
17
25
|
function compileToFunction(template, options) {
|
|
18
26
|
if (!isString(template)) {
|
|
19
27
|
if (template.nodeType) {
|
|
@@ -24,7 +32,8 @@ function compileToFunction(template, options) {
|
|
|
24
32
|
}
|
|
25
33
|
}
|
|
26
34
|
const key = template;
|
|
27
|
-
const
|
|
35
|
+
const cache = getCache(options);
|
|
36
|
+
const cached = cache[key];
|
|
28
37
|
if (cached) {
|
|
29
38
|
return cached;
|
|
30
39
|
}
|
|
@@ -59,7 +68,7 @@ ${codeFrame}` : message);
|
|
|
59
68
|
}
|
|
60
69
|
const render = new Function("Vue", code)(runtimeDom);
|
|
61
70
|
render._rc = true;
|
|
62
|
-
return
|
|
71
|
+
return cache[key] = render;
|
|
63
72
|
}
|
|
64
73
|
registerRuntimeCompiler(compileToFunction);
|
|
65
74
|
|
package/dist/vue.global.js
CHANGED
|
@@ -15,8 +15,8 @@ var Vue = (function (exports) {
|
|
|
15
15
|
const NOOP = () => {
|
|
16
16
|
};
|
|
17
17
|
const NO = () => false;
|
|
18
|
-
const
|
|
19
|
-
|
|
18
|
+
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
|
|
19
|
+
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
|
20
20
|
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
21
21
|
const extend = Object.assign;
|
|
22
22
|
const remove = (arr, el) => {
|
|
@@ -303,20 +303,29 @@ var Vue = (function (exports) {
|
|
|
303
303
|
return replacer(_key, val.value);
|
|
304
304
|
} else if (isMap(val)) {
|
|
305
305
|
return {
|
|
306
|
-
[`Map(${val.size})`]: [...val.entries()].reduce(
|
|
307
|
-
entries[
|
|
308
|
-
|
|
309
|
-
|
|
306
|
+
[`Map(${val.size})`]: [...val.entries()].reduce(
|
|
307
|
+
(entries, [key, val2], i) => {
|
|
308
|
+
entries[stringifySymbol(key, i) + " =>"] = val2;
|
|
309
|
+
return entries;
|
|
310
|
+
},
|
|
311
|
+
{}
|
|
312
|
+
)
|
|
310
313
|
};
|
|
311
314
|
} else if (isSet(val)) {
|
|
312
315
|
return {
|
|
313
|
-
[`Set(${val.size})`]: [...val.values()]
|
|
316
|
+
[`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
|
|
314
317
|
};
|
|
318
|
+
} else if (isSymbol(val)) {
|
|
319
|
+
return stringifySymbol(val);
|
|
315
320
|
} else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
|
|
316
321
|
return String(val);
|
|
317
322
|
}
|
|
318
323
|
return val;
|
|
319
324
|
};
|
|
325
|
+
const stringifySymbol = (v, i = "") => {
|
|
326
|
+
var _a;
|
|
327
|
+
return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
|
|
328
|
+
};
|
|
320
329
|
|
|
321
330
|
function warn$1(msg, ...args) {
|
|
322
331
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
@@ -740,8 +749,13 @@ var Vue = (function (exports) {
|
|
|
740
749
|
return isReadonly2;
|
|
741
750
|
} else if (key === "__v_isShallow") {
|
|
742
751
|
return shallow;
|
|
743
|
-
} else if (key === "__v_raw"
|
|
744
|
-
|
|
752
|
+
} else if (key === "__v_raw") {
|
|
753
|
+
if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
754
|
+
// this means the reciever is a user proxy of the reactive proxy
|
|
755
|
+
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
756
|
+
return target;
|
|
757
|
+
}
|
|
758
|
+
return;
|
|
745
759
|
}
|
|
746
760
|
const targetIsArray = isArray(target);
|
|
747
761
|
if (!isReadonly2) {
|
|
@@ -1752,13 +1766,16 @@ var Vue = (function (exports) {
|
|
|
1752
1766
|
}
|
|
1753
1767
|
queueFlush();
|
|
1754
1768
|
}
|
|
1755
|
-
function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
1769
|
+
function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
1756
1770
|
{
|
|
1757
1771
|
seen = seen || /* @__PURE__ */ new Map();
|
|
1758
1772
|
}
|
|
1759
1773
|
for (; i < queue.length; i++) {
|
|
1760
1774
|
const cb = queue[i];
|
|
1761
1775
|
if (cb && cb.pre) {
|
|
1776
|
+
if (instance && cb.id !== instance.uid) {
|
|
1777
|
+
continue;
|
|
1778
|
+
}
|
|
1762
1779
|
if (checkRecursiveUpdates(seen, cb)) {
|
|
1763
1780
|
continue;
|
|
1764
1781
|
}
|
|
@@ -2898,7 +2915,12 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
2898
2915
|
if (delayEnter) {
|
|
2899
2916
|
activeBranch.transition.afterLeave = () => {
|
|
2900
2917
|
if (pendingId === suspense.pendingId) {
|
|
2901
|
-
move(
|
|
2918
|
+
move(
|
|
2919
|
+
pendingBranch,
|
|
2920
|
+
container2,
|
|
2921
|
+
next(activeBranch),
|
|
2922
|
+
0
|
|
2923
|
+
);
|
|
2902
2924
|
queuePostFlushCb(effects);
|
|
2903
2925
|
}
|
|
2904
2926
|
};
|
|
@@ -7300,7 +7322,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7300
7322
|
updateProps(instance, nextVNode.props, prevProps, optimized);
|
|
7301
7323
|
updateSlots(instance, nextVNode.children, optimized);
|
|
7302
7324
|
pauseTracking();
|
|
7303
|
-
flushPreFlushCbs();
|
|
7325
|
+
flushPreFlushCbs(instance);
|
|
7304
7326
|
resetTracking();
|
|
7305
7327
|
};
|
|
7306
7328
|
const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
|
|
@@ -8971,9 +8993,9 @@ Component that was made reactive: `,
|
|
|
8971
8993
|
return;
|
|
8972
8994
|
}
|
|
8973
8995
|
const vueStyle = { style: "color:#3ba776" };
|
|
8974
|
-
const numberStyle = { style: "color:#
|
|
8975
|
-
const stringStyle = { style: "color:#
|
|
8976
|
-
const keywordStyle = { style: "color:#
|
|
8996
|
+
const numberStyle = { style: "color:#1677ff" };
|
|
8997
|
+
const stringStyle = { style: "color:#f5222d" };
|
|
8998
|
+
const keywordStyle = { style: "color:#eb2f96" };
|
|
8977
8999
|
const formatter = {
|
|
8978
9000
|
header(obj) {
|
|
8979
9001
|
if (!isObject(obj)) {
|
|
@@ -9167,7 +9189,7 @@ Component that was made reactive: `,
|
|
|
9167
9189
|
return true;
|
|
9168
9190
|
}
|
|
9169
9191
|
|
|
9170
|
-
const version = "3.3.
|
|
9192
|
+
const version = "3.3.11";
|
|
9171
9193
|
const ssrUtils = null;
|
|
9172
9194
|
const resolveFilter = null;
|
|
9173
9195
|
const compatUtils = null;
|
|
@@ -9779,7 +9801,8 @@ Component that was made reactive: `,
|
|
|
9779
9801
|
}
|
|
9780
9802
|
}
|
|
9781
9803
|
|
|
9782
|
-
const
|
|
9804
|
+
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
|
|
9805
|
+
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
|
|
9783
9806
|
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
9784
9807
|
if (key === "class") {
|
|
9785
9808
|
patchClass(el, nextValue, isSVG);
|
|
@@ -9813,7 +9836,7 @@ Component that was made reactive: `,
|
|
|
9813
9836
|
if (key === "innerHTML" || key === "textContent") {
|
|
9814
9837
|
return true;
|
|
9815
9838
|
}
|
|
9816
|
-
if (key in el &&
|
|
9839
|
+
if (key in el && isNativeOn(key) && isFunction(value)) {
|
|
9817
9840
|
return true;
|
|
9818
9841
|
}
|
|
9819
9842
|
return false;
|
|
@@ -9830,7 +9853,13 @@ Component that was made reactive: `,
|
|
|
9830
9853
|
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
9831
9854
|
return false;
|
|
9832
9855
|
}
|
|
9833
|
-
if (
|
|
9856
|
+
if (key === "width" || key === "height") {
|
|
9857
|
+
const tag = el.tagName;
|
|
9858
|
+
if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
|
|
9859
|
+
return false;
|
|
9860
|
+
}
|
|
9861
|
+
}
|
|
9862
|
+
if (isNativeOn(key) && isString(value)) {
|
|
9834
9863
|
return false;
|
|
9835
9864
|
}
|
|
9836
9865
|
return key in el;
|
|
@@ -10499,14 +10528,14 @@ Component that was made reactive: `,
|
|
|
10499
10528
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
10500
10529
|
};
|
|
10501
10530
|
const withModifiers = (fn, modifiers) => {
|
|
10502
|
-
return (event, ...args) => {
|
|
10531
|
+
return fn._withMods || (fn._withMods = (event, ...args) => {
|
|
10503
10532
|
for (let i = 0; i < modifiers.length; i++) {
|
|
10504
10533
|
const guard = modifierGuards[modifiers[i]];
|
|
10505
10534
|
if (guard && guard(event, modifiers))
|
|
10506
10535
|
return;
|
|
10507
10536
|
}
|
|
10508
10537
|
return fn(event, ...args);
|
|
10509
|
-
};
|
|
10538
|
+
});
|
|
10510
10539
|
};
|
|
10511
10540
|
const keyNames = {
|
|
10512
10541
|
esc: "escape",
|
|
@@ -10518,7 +10547,7 @@ Component that was made reactive: `,
|
|
|
10518
10547
|
delete: "backspace"
|
|
10519
10548
|
};
|
|
10520
10549
|
const withKeys = (fn, modifiers) => {
|
|
10521
|
-
return (event) => {
|
|
10550
|
+
return fn._withKeys || (fn._withKeys = (event) => {
|
|
10522
10551
|
if (!("key" in event)) {
|
|
10523
10552
|
return;
|
|
10524
10553
|
}
|
|
@@ -10526,7 +10555,7 @@ Component that was made reactive: `,
|
|
|
10526
10555
|
if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) {
|
|
10527
10556
|
return fn(event);
|
|
10528
10557
|
}
|
|
10529
|
-
};
|
|
10558
|
+
});
|
|
10530
10559
|
};
|
|
10531
10560
|
|
|
10532
10561
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -13985,6 +14014,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13985
14014
|
if (isEventHandler && isReservedProp(name)) {
|
|
13986
14015
|
hasVnodeHook = true;
|
|
13987
14016
|
}
|
|
14017
|
+
if (isEventHandler && value.type === 14) {
|
|
14018
|
+
value = value.arguments[0];
|
|
14019
|
+
}
|
|
13988
14020
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
13989
14021
|
return;
|
|
13990
14022
|
}
|
|
@@ -15255,7 +15287,15 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15255
15287
|
{
|
|
15256
15288
|
initDev();
|
|
15257
15289
|
}
|
|
15258
|
-
const compileCache = /* @__PURE__ */
|
|
15290
|
+
const compileCache = /* @__PURE__ */ new WeakMap();
|
|
15291
|
+
function getCache(options) {
|
|
15292
|
+
let c = compileCache.get(options != null ? options : EMPTY_OBJ);
|
|
15293
|
+
if (!c) {
|
|
15294
|
+
c = /* @__PURE__ */ Object.create(null);
|
|
15295
|
+
compileCache.set(options != null ? options : EMPTY_OBJ, c);
|
|
15296
|
+
}
|
|
15297
|
+
return c;
|
|
15298
|
+
}
|
|
15259
15299
|
function compileToFunction(template, options) {
|
|
15260
15300
|
if (!isString(template)) {
|
|
15261
15301
|
if (template.nodeType) {
|
|
@@ -15266,7 +15306,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15266
15306
|
}
|
|
15267
15307
|
}
|
|
15268
15308
|
const key = template;
|
|
15269
|
-
const
|
|
15309
|
+
const cache = getCache(options);
|
|
15310
|
+
const cached = cache[key];
|
|
15270
15311
|
if (cached) {
|
|
15271
15312
|
return cached;
|
|
15272
15313
|
}
|
|
@@ -15301,7 +15342,7 @@ ${codeFrame}` : message);
|
|
|
15301
15342
|
}
|
|
15302
15343
|
const render = new Function(code)() ;
|
|
15303
15344
|
render._rc = true;
|
|
15304
|
-
return
|
|
15345
|
+
return cache[key] = render;
|
|
15305
15346
|
}
|
|
15306
15347
|
registerRuntimeCompiler(compileToFunction);
|
|
15307
15348
|
|