vue 3.3.9 → 3.3.10
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 +40 -19
- package/dist/vue.esm-browser.prod.js +5 -5
- package/dist/vue.esm-bundler.js +13 -4
- package/dist/vue.global.js +40 -19
- package/dist/vue.global.prod.js +5 -5
- package/dist/vue.runtime.esm-browser.js +25 -16
- package/dist/vue.runtime.esm-browser.prod.js +5 -5
- package/dist/vue.runtime.global.js +25 -16
- 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) => {
|
|
@@ -2898,7 +2898,12 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
2898
2898
|
if (delayEnter) {
|
|
2899
2899
|
activeBranch.transition.afterLeave = () => {
|
|
2900
2900
|
if (pendingId === suspense.pendingId) {
|
|
2901
|
-
move(
|
|
2901
|
+
move(
|
|
2902
|
+
pendingBranch,
|
|
2903
|
+
container2,
|
|
2904
|
+
next(activeBranch),
|
|
2905
|
+
0
|
|
2906
|
+
);
|
|
2902
2907
|
queuePostFlushCb(effects);
|
|
2903
2908
|
}
|
|
2904
2909
|
};
|
|
@@ -2945,7 +2950,6 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
2945
2950
|
}
|
|
2946
2951
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
|
|
2947
2952
|
triggerEvent(vnode2, "onFallback");
|
|
2948
|
-
const anchor2 = next(activeBranch);
|
|
2949
2953
|
const mountFallback = () => {
|
|
2950
2954
|
if (!suspense.isInFallback) {
|
|
2951
2955
|
return;
|
|
@@ -2954,7 +2958,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
2954
2958
|
null,
|
|
2955
2959
|
fallbackVNode,
|
|
2956
2960
|
container2,
|
|
2957
|
-
|
|
2961
|
+
next(activeBranch),
|
|
2958
2962
|
parentComponent2,
|
|
2959
2963
|
null,
|
|
2960
2964
|
// fallback tree will not have suspense context
|
|
@@ -8971,9 +8975,9 @@ Component that was made reactive: `,
|
|
|
8971
8975
|
return;
|
|
8972
8976
|
}
|
|
8973
8977
|
const vueStyle = { style: "color:#3ba776" };
|
|
8974
|
-
const numberStyle = { style: "color:#
|
|
8975
|
-
const stringStyle = { style: "color:#
|
|
8976
|
-
const keywordStyle = { style: "color:#
|
|
8978
|
+
const numberStyle = { style: "color:#1677ff" };
|
|
8979
|
+
const stringStyle = { style: "color:#f5222d" };
|
|
8980
|
+
const keywordStyle = { style: "color:#eb2f96" };
|
|
8977
8981
|
const formatter = {
|
|
8978
8982
|
header(obj) {
|
|
8979
8983
|
if (!isObject(obj)) {
|
|
@@ -9167,7 +9171,7 @@ Component that was made reactive: `,
|
|
|
9167
9171
|
return true;
|
|
9168
9172
|
}
|
|
9169
9173
|
|
|
9170
|
-
const version = "3.3.
|
|
9174
|
+
const version = "3.3.10";
|
|
9171
9175
|
const ssrUtils = null;
|
|
9172
9176
|
const resolveFilter = null;
|
|
9173
9177
|
const compatUtils = null;
|
|
@@ -9779,7 +9783,8 @@ Component that was made reactive: `,
|
|
|
9779
9783
|
}
|
|
9780
9784
|
}
|
|
9781
9785
|
|
|
9782
|
-
const
|
|
9786
|
+
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
|
|
9787
|
+
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
|
|
9783
9788
|
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
9784
9789
|
if (key === "class") {
|
|
9785
9790
|
patchClass(el, nextValue, isSVG);
|
|
@@ -9813,7 +9818,7 @@ Component that was made reactive: `,
|
|
|
9813
9818
|
if (key === "innerHTML" || key === "textContent") {
|
|
9814
9819
|
return true;
|
|
9815
9820
|
}
|
|
9816
|
-
if (key in el &&
|
|
9821
|
+
if (key in el && isNativeOn(key) && isFunction(value)) {
|
|
9817
9822
|
return true;
|
|
9818
9823
|
}
|
|
9819
9824
|
return false;
|
|
@@ -9830,7 +9835,11 @@ Component that was made reactive: `,
|
|
|
9830
9835
|
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
9831
9836
|
return false;
|
|
9832
9837
|
}
|
|
9833
|
-
if (
|
|
9838
|
+
if (key === "width" || key === "height") {
|
|
9839
|
+
const tag = el.tagName;
|
|
9840
|
+
return !(tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE");
|
|
9841
|
+
}
|
|
9842
|
+
if (isNativeOn(key) && isString(value)) {
|
|
9834
9843
|
return false;
|
|
9835
9844
|
}
|
|
9836
9845
|
return key in el;
|
|
@@ -10499,14 +10508,14 @@ Component that was made reactive: `,
|
|
|
10499
10508
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
10500
10509
|
};
|
|
10501
10510
|
const withModifiers = (fn, modifiers) => {
|
|
10502
|
-
return (event, ...args) => {
|
|
10511
|
+
return fn._withMods || (fn._withMods = (event, ...args) => {
|
|
10503
10512
|
for (let i = 0; i < modifiers.length; i++) {
|
|
10504
10513
|
const guard = modifierGuards[modifiers[i]];
|
|
10505
10514
|
if (guard && guard(event, modifiers))
|
|
10506
10515
|
return;
|
|
10507
10516
|
}
|
|
10508
10517
|
return fn(event, ...args);
|
|
10509
|
-
};
|
|
10518
|
+
});
|
|
10510
10519
|
};
|
|
10511
10520
|
const keyNames = {
|
|
10512
10521
|
esc: "escape",
|
|
@@ -10518,7 +10527,7 @@ Component that was made reactive: `,
|
|
|
10518
10527
|
delete: "backspace"
|
|
10519
10528
|
};
|
|
10520
10529
|
const withKeys = (fn, modifiers) => {
|
|
10521
|
-
return (event) => {
|
|
10530
|
+
return fn._withKeys || (fn._withKeys = (event) => {
|
|
10522
10531
|
if (!("key" in event)) {
|
|
10523
10532
|
return;
|
|
10524
10533
|
}
|
|
@@ -10526,7 +10535,7 @@ Component that was made reactive: `,
|
|
|
10526
10535
|
if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) {
|
|
10527
10536
|
return fn(event);
|
|
10528
10537
|
}
|
|
10529
|
-
};
|
|
10538
|
+
});
|
|
10530
10539
|
};
|
|
10531
10540
|
|
|
10532
10541
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -13985,6 +13994,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13985
13994
|
if (isEventHandler && isReservedProp(name)) {
|
|
13986
13995
|
hasVnodeHook = true;
|
|
13987
13996
|
}
|
|
13997
|
+
if (isEventHandler && value.type === 14) {
|
|
13998
|
+
value = value.arguments[0];
|
|
13999
|
+
}
|
|
13988
14000
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
13989
14001
|
return;
|
|
13990
14002
|
}
|
|
@@ -15255,7 +15267,15 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15255
15267
|
{
|
|
15256
15268
|
initDev();
|
|
15257
15269
|
}
|
|
15258
|
-
const compileCache = /* @__PURE__ */
|
|
15270
|
+
const compileCache = /* @__PURE__ */ new WeakMap();
|
|
15271
|
+
function getCache(options) {
|
|
15272
|
+
let c = compileCache.get(options != null ? options : EMPTY_OBJ);
|
|
15273
|
+
if (!c) {
|
|
15274
|
+
c = /* @__PURE__ */ Object.create(null);
|
|
15275
|
+
compileCache.set(options != null ? options : EMPTY_OBJ, c);
|
|
15276
|
+
}
|
|
15277
|
+
return c;
|
|
15278
|
+
}
|
|
15259
15279
|
function compileToFunction(template, options) {
|
|
15260
15280
|
if (!isString(template)) {
|
|
15261
15281
|
if (template.nodeType) {
|
|
@@ -15266,7 +15286,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15266
15286
|
}
|
|
15267
15287
|
}
|
|
15268
15288
|
const key = template;
|
|
15269
|
-
const
|
|
15289
|
+
const cache = getCache(options);
|
|
15290
|
+
const cached = cache[key];
|
|
15270
15291
|
if (cached) {
|
|
15271
15292
|
return cached;
|
|
15272
15293
|
}
|
|
@@ -15301,7 +15322,7 @@ ${codeFrame}` : message);
|
|
|
15301
15322
|
}
|
|
15302
15323
|
const render = new Function(code)() ;
|
|
15303
15324
|
render._rc = true;
|
|
15304
|
-
return
|
|
15325
|
+
return cache[key] = render;
|
|
15305
15326
|
}
|
|
15306
15327
|
registerRuntimeCompiler(compileToFunction);
|
|
15307
15328
|
|