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.cjs.js
CHANGED
|
@@ -19,7 +19,15 @@ function _interopNamespaceDefault(e) {
|
|
|
19
19
|
|
|
20
20
|
var runtimeDom__namespace = /*#__PURE__*/_interopNamespaceDefault(runtimeDom);
|
|
21
21
|
|
|
22
|
-
const compileCache = /* @__PURE__ */
|
|
22
|
+
const compileCache = /* @__PURE__ */ new WeakMap();
|
|
23
|
+
function getCache(options) {
|
|
24
|
+
let c = compileCache.get(options != null ? options : shared.EMPTY_OBJ);
|
|
25
|
+
if (!c) {
|
|
26
|
+
c = /* @__PURE__ */ Object.create(null);
|
|
27
|
+
compileCache.set(options != null ? options : shared.EMPTY_OBJ, c);
|
|
28
|
+
}
|
|
29
|
+
return c;
|
|
30
|
+
}
|
|
23
31
|
function compileToFunction(template, options) {
|
|
24
32
|
if (!shared.isString(template)) {
|
|
25
33
|
if (template.nodeType) {
|
|
@@ -30,7 +38,8 @@ function compileToFunction(template, options) {
|
|
|
30
38
|
}
|
|
31
39
|
}
|
|
32
40
|
const key = template;
|
|
33
|
-
const
|
|
41
|
+
const cache = getCache(options);
|
|
42
|
+
const cached = cache[key];
|
|
34
43
|
if (cached) {
|
|
35
44
|
return cached;
|
|
36
45
|
}
|
|
@@ -65,7 +74,7 @@ ${codeFrame}` : message);
|
|
|
65
74
|
}
|
|
66
75
|
const render = new Function("Vue", code)(runtimeDom__namespace);
|
|
67
76
|
render._rc = true;
|
|
68
|
-
return
|
|
77
|
+
return cache[key] = render;
|
|
69
78
|
}
|
|
70
79
|
runtimeDom.registerRuntimeCompiler(compileToFunction);
|
|
71
80
|
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -19,7 +19,15 @@ function _interopNamespaceDefault(e) {
|
|
|
19
19
|
|
|
20
20
|
var runtimeDom__namespace = /*#__PURE__*/_interopNamespaceDefault(runtimeDom);
|
|
21
21
|
|
|
22
|
-
const compileCache = /* @__PURE__ */
|
|
22
|
+
const compileCache = /* @__PURE__ */ new WeakMap();
|
|
23
|
+
function getCache(options) {
|
|
24
|
+
let c = compileCache.get(options != null ? options : shared.EMPTY_OBJ);
|
|
25
|
+
if (!c) {
|
|
26
|
+
c = /* @__PURE__ */ Object.create(null);
|
|
27
|
+
compileCache.set(options != null ? options : shared.EMPTY_OBJ, c);
|
|
28
|
+
}
|
|
29
|
+
return c;
|
|
30
|
+
}
|
|
23
31
|
function compileToFunction(template, options) {
|
|
24
32
|
if (!shared.isString(template)) {
|
|
25
33
|
if (template.nodeType) {
|
|
@@ -29,7 +37,8 @@ function compileToFunction(template, options) {
|
|
|
29
37
|
}
|
|
30
38
|
}
|
|
31
39
|
const key = template;
|
|
32
|
-
const
|
|
40
|
+
const cache = getCache(options);
|
|
41
|
+
const cached = cache[key];
|
|
33
42
|
if (cached) {
|
|
34
43
|
return cached;
|
|
35
44
|
}
|
|
@@ -51,7 +60,7 @@ function compileToFunction(template, options) {
|
|
|
51
60
|
const { code } = compilerDom.compile(template, opts);
|
|
52
61
|
const render = new Function("Vue", code)(runtimeDom__namespace);
|
|
53
62
|
render._rc = true;
|
|
54
|
-
return
|
|
63
|
+
return cache[key] = render;
|
|
55
64
|
}
|
|
56
65
|
runtimeDom.registerRuntimeCompiler(compileToFunction);
|
|
57
66
|
|
package/dist/vue.esm-browser.js
CHANGED
|
@@ -12,8 +12,8 @@ const EMPTY_ARR = Object.freeze([]) ;
|
|
|
12
12
|
const NOOP = () => {
|
|
13
13
|
};
|
|
14
14
|
const NO = () => false;
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
|
|
16
|
+
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
|
17
17
|
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
18
18
|
const extend = Object.assign;
|
|
19
19
|
const remove = (arr, el) => {
|
|
@@ -2895,7 +2895,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
2895
2895
|
if (delayEnter) {
|
|
2896
2896
|
activeBranch.transition.afterLeave = () => {
|
|
2897
2897
|
if (pendingId === suspense.pendingId) {
|
|
2898
|
-
move(
|
|
2898
|
+
move(
|
|
2899
|
+
pendingBranch,
|
|
2900
|
+
container2,
|
|
2901
|
+
next(activeBranch),
|
|
2902
|
+
0
|
|
2903
|
+
);
|
|
2899
2904
|
queuePostFlushCb(effects);
|
|
2900
2905
|
}
|
|
2901
2906
|
};
|
|
@@ -2942,7 +2947,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
2942
2947
|
}
|
|
2943
2948
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
|
|
2944
2949
|
triggerEvent(vnode2, "onFallback");
|
|
2945
|
-
const anchor2 = next(activeBranch);
|
|
2946
2950
|
const mountFallback = () => {
|
|
2947
2951
|
if (!suspense.isInFallback) {
|
|
2948
2952
|
return;
|
|
@@ -2951,7 +2955,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
2951
2955
|
null,
|
|
2952
2956
|
fallbackVNode,
|
|
2953
2957
|
container2,
|
|
2954
|
-
|
|
2958
|
+
next(activeBranch),
|
|
2955
2959
|
parentComponent2,
|
|
2956
2960
|
null,
|
|
2957
2961
|
// fallback tree will not have suspense context
|
|
@@ -8974,9 +8978,9 @@ function initCustomFormatter() {
|
|
|
8974
8978
|
return;
|
|
8975
8979
|
}
|
|
8976
8980
|
const vueStyle = { style: "color:#3ba776" };
|
|
8977
|
-
const numberStyle = { style: "color:#
|
|
8978
|
-
const stringStyle = { style: "color:#
|
|
8979
|
-
const keywordStyle = { style: "color:#
|
|
8981
|
+
const numberStyle = { style: "color:#1677ff" };
|
|
8982
|
+
const stringStyle = { style: "color:#f5222d" };
|
|
8983
|
+
const keywordStyle = { style: "color:#eb2f96" };
|
|
8980
8984
|
const formatter = {
|
|
8981
8985
|
header(obj) {
|
|
8982
8986
|
if (!isObject(obj)) {
|
|
@@ -9170,7 +9174,7 @@ function isMemoSame(cached, memo) {
|
|
|
9170
9174
|
return true;
|
|
9171
9175
|
}
|
|
9172
9176
|
|
|
9173
|
-
const version = "3.3.
|
|
9177
|
+
const version = "3.3.10";
|
|
9174
9178
|
const ssrUtils = null;
|
|
9175
9179
|
const resolveFilter = null;
|
|
9176
9180
|
const compatUtils = null;
|
|
@@ -9782,7 +9786,8 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
9782
9786
|
}
|
|
9783
9787
|
}
|
|
9784
9788
|
|
|
9785
|
-
const
|
|
9789
|
+
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
|
|
9790
|
+
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
|
|
9786
9791
|
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
9787
9792
|
if (key === "class") {
|
|
9788
9793
|
patchClass(el, nextValue, isSVG);
|
|
@@ -9816,7 +9821,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
9816
9821
|
if (key === "innerHTML" || key === "textContent") {
|
|
9817
9822
|
return true;
|
|
9818
9823
|
}
|
|
9819
|
-
if (key in el &&
|
|
9824
|
+
if (key in el && isNativeOn(key) && isFunction(value)) {
|
|
9820
9825
|
return true;
|
|
9821
9826
|
}
|
|
9822
9827
|
return false;
|
|
@@ -9833,7 +9838,11 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
9833
9838
|
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
9834
9839
|
return false;
|
|
9835
9840
|
}
|
|
9836
|
-
if (
|
|
9841
|
+
if (key === "width" || key === "height") {
|
|
9842
|
+
const tag = el.tagName;
|
|
9843
|
+
return !(tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE");
|
|
9844
|
+
}
|
|
9845
|
+
if (isNativeOn(key) && isString(value)) {
|
|
9837
9846
|
return false;
|
|
9838
9847
|
}
|
|
9839
9848
|
return key in el;
|
|
@@ -10514,14 +10523,14 @@ const modifierGuards = {
|
|
|
10514
10523
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
10515
10524
|
};
|
|
10516
10525
|
const withModifiers = (fn, modifiers) => {
|
|
10517
|
-
return (event, ...args) => {
|
|
10526
|
+
return fn._withMods || (fn._withMods = (event, ...args) => {
|
|
10518
10527
|
for (let i = 0; i < modifiers.length; i++) {
|
|
10519
10528
|
const guard = modifierGuards[modifiers[i]];
|
|
10520
10529
|
if (guard && guard(event, modifiers))
|
|
10521
10530
|
return;
|
|
10522
10531
|
}
|
|
10523
10532
|
return fn(event, ...args);
|
|
10524
|
-
};
|
|
10533
|
+
});
|
|
10525
10534
|
};
|
|
10526
10535
|
const keyNames = {
|
|
10527
10536
|
esc: "escape",
|
|
@@ -10533,7 +10542,7 @@ const keyNames = {
|
|
|
10533
10542
|
delete: "backspace"
|
|
10534
10543
|
};
|
|
10535
10544
|
const withKeys = (fn, modifiers) => {
|
|
10536
|
-
return (event) => {
|
|
10545
|
+
return fn._withKeys || (fn._withKeys = (event) => {
|
|
10537
10546
|
if (!("key" in event)) {
|
|
10538
10547
|
return;
|
|
10539
10548
|
}
|
|
@@ -10541,7 +10550,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
10541
10550
|
if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) {
|
|
10542
10551
|
return fn(event);
|
|
10543
10552
|
}
|
|
10544
|
-
};
|
|
10553
|
+
});
|
|
10545
10554
|
};
|
|
10546
10555
|
|
|
10547
10556
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -14157,6 +14166,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
14157
14166
|
if (isEventHandler && isReservedProp(name)) {
|
|
14158
14167
|
hasVnodeHook = true;
|
|
14159
14168
|
}
|
|
14169
|
+
if (isEventHandler && value.type === 14) {
|
|
14170
|
+
value = value.arguments[0];
|
|
14171
|
+
}
|
|
14160
14172
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
14161
14173
|
return;
|
|
14162
14174
|
}
|
|
@@ -15427,7 +15439,15 @@ function compile(template, options = {}) {
|
|
|
15427
15439
|
{
|
|
15428
15440
|
initDev();
|
|
15429
15441
|
}
|
|
15430
|
-
const compileCache = /* @__PURE__ */
|
|
15442
|
+
const compileCache = /* @__PURE__ */ new WeakMap();
|
|
15443
|
+
function getCache(options) {
|
|
15444
|
+
let c = compileCache.get(options != null ? options : EMPTY_OBJ);
|
|
15445
|
+
if (!c) {
|
|
15446
|
+
c = /* @__PURE__ */ Object.create(null);
|
|
15447
|
+
compileCache.set(options != null ? options : EMPTY_OBJ, c);
|
|
15448
|
+
}
|
|
15449
|
+
return c;
|
|
15450
|
+
}
|
|
15431
15451
|
function compileToFunction(template, options) {
|
|
15432
15452
|
if (!isString(template)) {
|
|
15433
15453
|
if (template.nodeType) {
|
|
@@ -15438,7 +15458,8 @@ function compileToFunction(template, options) {
|
|
|
15438
15458
|
}
|
|
15439
15459
|
}
|
|
15440
15460
|
const key = template;
|
|
15441
|
-
const
|
|
15461
|
+
const cache = getCache(options);
|
|
15462
|
+
const cached = cache[key];
|
|
15442
15463
|
if (cached) {
|
|
15443
15464
|
return cached;
|
|
15444
15465
|
}
|
|
@@ -15473,7 +15494,7 @@ ${codeFrame}` : message);
|
|
|
15473
15494
|
}
|
|
15474
15495
|
const render = new Function("Vue", code)(runtimeDom);
|
|
15475
15496
|
render._rc = true;
|
|
15476
|
-
return
|
|
15497
|
+
return cache[key] = render;
|
|
15477
15498
|
}
|
|
15478
15499
|
registerRuntimeCompiler(compileToFunction);
|
|
15479
15500
|
|