@vue/compat 3.4.0-alpha.3 → 3.4.0-alpha.4
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 +232 -81
- package/dist/vue.cjs.prod.js +228 -63
- package/dist/vue.esm-browser.js +172 -62
- package/dist/vue.esm-browser.prod.js +5 -5
- package/dist/vue.esm-bundler.js +172 -62
- package/dist/vue.global.js +171 -61
- package/dist/vue.global.prod.js +5 -5
- package/dist/vue.runtime.esm-browser.js +121 -31
- package/dist/vue.runtime.esm-browser.prod.js +5 -5
- package/dist/vue.runtime.esm-bundler.js +121 -31
- package/dist/vue.runtime.global.js +120 -30
- package/dist/vue.runtime.global.prod.js +5 -5
- package/package.json +3 -3
package/dist/vue.global.js
CHANGED
|
@@ -11,8 +11,8 @@ var Vue = (function () {
|
|
|
11
11
|
const NOOP = () => {
|
|
12
12
|
};
|
|
13
13
|
const NO = () => false;
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
|
|
15
|
+
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
|
16
16
|
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
17
17
|
const extend = Object.assign;
|
|
18
18
|
const remove = (arr, el) => {
|
|
@@ -120,7 +120,7 @@ var Vue = (function () {
|
|
|
120
120
|
[3]: "FORWARDED"
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
-
const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";
|
|
123
|
+
const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error";
|
|
124
124
|
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
|
|
125
125
|
|
|
126
126
|
const range = 2;
|
|
@@ -1501,6 +1501,18 @@ var Vue = (function () {
|
|
|
1501
1501
|
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
|
|
1502
1502
|
}
|
|
1503
1503
|
|
|
1504
|
+
const TrackOpTypes = {
|
|
1505
|
+
"GET": "get",
|
|
1506
|
+
"HAS": "has",
|
|
1507
|
+
"ITERATE": "iterate"
|
|
1508
|
+
};
|
|
1509
|
+
const TriggerOpTypes = {
|
|
1510
|
+
"SET": "set",
|
|
1511
|
+
"ADD": "add",
|
|
1512
|
+
"DELETE": "delete",
|
|
1513
|
+
"CLEAR": "clear"
|
|
1514
|
+
};
|
|
1515
|
+
|
|
1504
1516
|
const stack$1 = [];
|
|
1505
1517
|
function pushWarningContext(vnode) {
|
|
1506
1518
|
stack$1.push(vnode);
|
|
@@ -1615,6 +1627,38 @@ var Vue = (function () {
|
|
|
1615
1627
|
}
|
|
1616
1628
|
}
|
|
1617
1629
|
|
|
1630
|
+
const ErrorCodes = {
|
|
1631
|
+
"SETUP_FUNCTION": 0,
|
|
1632
|
+
"0": "SETUP_FUNCTION",
|
|
1633
|
+
"RENDER_FUNCTION": 1,
|
|
1634
|
+
"1": "RENDER_FUNCTION",
|
|
1635
|
+
"WATCH_GETTER": 2,
|
|
1636
|
+
"2": "WATCH_GETTER",
|
|
1637
|
+
"WATCH_CALLBACK": 3,
|
|
1638
|
+
"3": "WATCH_CALLBACK",
|
|
1639
|
+
"WATCH_CLEANUP": 4,
|
|
1640
|
+
"4": "WATCH_CLEANUP",
|
|
1641
|
+
"NATIVE_EVENT_HANDLER": 5,
|
|
1642
|
+
"5": "NATIVE_EVENT_HANDLER",
|
|
1643
|
+
"COMPONENT_EVENT_HANDLER": 6,
|
|
1644
|
+
"6": "COMPONENT_EVENT_HANDLER",
|
|
1645
|
+
"VNODE_HOOK": 7,
|
|
1646
|
+
"7": "VNODE_HOOK",
|
|
1647
|
+
"DIRECTIVE_HOOK": 8,
|
|
1648
|
+
"8": "DIRECTIVE_HOOK",
|
|
1649
|
+
"TRANSITION_HOOK": 9,
|
|
1650
|
+
"9": "TRANSITION_HOOK",
|
|
1651
|
+
"APP_ERROR_HANDLER": 10,
|
|
1652
|
+
"10": "APP_ERROR_HANDLER",
|
|
1653
|
+
"APP_WARN_HANDLER": 11,
|
|
1654
|
+
"11": "APP_WARN_HANDLER",
|
|
1655
|
+
"FUNCTION_REF": 12,
|
|
1656
|
+
"12": "FUNCTION_REF",
|
|
1657
|
+
"ASYNC_COMPONENT_LOADER": 13,
|
|
1658
|
+
"13": "ASYNC_COMPONENT_LOADER",
|
|
1659
|
+
"SCHEDULER": 14,
|
|
1660
|
+
"14": "SCHEDULER"
|
|
1661
|
+
};
|
|
1618
1662
|
const ErrorTypeStrings$1 = {
|
|
1619
1663
|
["sp"]: "serverPrefetch hook",
|
|
1620
1664
|
["bc"]: "beforeCreate hook",
|
|
@@ -2097,6 +2141,50 @@ var Vue = (function () {
|
|
|
2097
2141
|
);
|
|
2098
2142
|
}
|
|
2099
2143
|
|
|
2144
|
+
const DeprecationTypes$1 = {
|
|
2145
|
+
"GLOBAL_MOUNT": "GLOBAL_MOUNT",
|
|
2146
|
+
"GLOBAL_MOUNT_CONTAINER": "GLOBAL_MOUNT_CONTAINER",
|
|
2147
|
+
"GLOBAL_EXTEND": "GLOBAL_EXTEND",
|
|
2148
|
+
"GLOBAL_PROTOTYPE": "GLOBAL_PROTOTYPE",
|
|
2149
|
+
"GLOBAL_SET": "GLOBAL_SET",
|
|
2150
|
+
"GLOBAL_DELETE": "GLOBAL_DELETE",
|
|
2151
|
+
"GLOBAL_OBSERVABLE": "GLOBAL_OBSERVABLE",
|
|
2152
|
+
"GLOBAL_PRIVATE_UTIL": "GLOBAL_PRIVATE_UTIL",
|
|
2153
|
+
"CONFIG_SILENT": "CONFIG_SILENT",
|
|
2154
|
+
"CONFIG_DEVTOOLS": "CONFIG_DEVTOOLS",
|
|
2155
|
+
"CONFIG_KEY_CODES": "CONFIG_KEY_CODES",
|
|
2156
|
+
"CONFIG_PRODUCTION_TIP": "CONFIG_PRODUCTION_TIP",
|
|
2157
|
+
"CONFIG_IGNORED_ELEMENTS": "CONFIG_IGNORED_ELEMENTS",
|
|
2158
|
+
"CONFIG_WHITESPACE": "CONFIG_WHITESPACE",
|
|
2159
|
+
"CONFIG_OPTION_MERGE_STRATS": "CONFIG_OPTION_MERGE_STRATS",
|
|
2160
|
+
"INSTANCE_SET": "INSTANCE_SET",
|
|
2161
|
+
"INSTANCE_DELETE": "INSTANCE_DELETE",
|
|
2162
|
+
"INSTANCE_DESTROY": "INSTANCE_DESTROY",
|
|
2163
|
+
"INSTANCE_EVENT_EMITTER": "INSTANCE_EVENT_EMITTER",
|
|
2164
|
+
"INSTANCE_EVENT_HOOKS": "INSTANCE_EVENT_HOOKS",
|
|
2165
|
+
"INSTANCE_CHILDREN": "INSTANCE_CHILDREN",
|
|
2166
|
+
"INSTANCE_LISTENERS": "INSTANCE_LISTENERS",
|
|
2167
|
+
"INSTANCE_SCOPED_SLOTS": "INSTANCE_SCOPED_SLOTS",
|
|
2168
|
+
"INSTANCE_ATTRS_CLASS_STYLE": "INSTANCE_ATTRS_CLASS_STYLE",
|
|
2169
|
+
"OPTIONS_DATA_FN": "OPTIONS_DATA_FN",
|
|
2170
|
+
"OPTIONS_DATA_MERGE": "OPTIONS_DATA_MERGE",
|
|
2171
|
+
"OPTIONS_BEFORE_DESTROY": "OPTIONS_BEFORE_DESTROY",
|
|
2172
|
+
"OPTIONS_DESTROYED": "OPTIONS_DESTROYED",
|
|
2173
|
+
"WATCH_ARRAY": "WATCH_ARRAY",
|
|
2174
|
+
"PROPS_DEFAULT_THIS": "PROPS_DEFAULT_THIS",
|
|
2175
|
+
"V_ON_KEYCODE_MODIFIER": "V_ON_KEYCODE_MODIFIER",
|
|
2176
|
+
"CUSTOM_DIR": "CUSTOM_DIR",
|
|
2177
|
+
"ATTR_FALSE_VALUE": "ATTR_FALSE_VALUE",
|
|
2178
|
+
"ATTR_ENUMERATED_COERCION": "ATTR_ENUMERATED_COERCION",
|
|
2179
|
+
"TRANSITION_CLASSES": "TRANSITION_CLASSES",
|
|
2180
|
+
"TRANSITION_GROUP_ROOT": "TRANSITION_GROUP_ROOT",
|
|
2181
|
+
"COMPONENT_ASYNC": "COMPONENT_ASYNC",
|
|
2182
|
+
"COMPONENT_FUNCTIONAL": "COMPONENT_FUNCTIONAL",
|
|
2183
|
+
"COMPONENT_V_MODEL": "COMPONENT_V_MODEL",
|
|
2184
|
+
"RENDER_FUNCTION": "RENDER_FUNCTION",
|
|
2185
|
+
"FILTERS": "FILTERS",
|
|
2186
|
+
"PRIVATE_APIS": "PRIVATE_APIS"
|
|
2187
|
+
};
|
|
2100
2188
|
const deprecationData$1 = {
|
|
2101
2189
|
["GLOBAL_MOUNT"]: {
|
|
2102
2190
|
message: `The global app bootstrapping API has changed: vm.$mount() and the "el" option have been removed. Use createApp(RootComponent).mount() instead.`,
|
|
@@ -3411,7 +3499,12 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3411
3499
|
if (delayEnter) {
|
|
3412
3500
|
activeBranch.transition.afterLeave = () => {
|
|
3413
3501
|
if (pendingId === suspense.pendingId) {
|
|
3414
|
-
move(
|
|
3502
|
+
move(
|
|
3503
|
+
pendingBranch,
|
|
3504
|
+
container2,
|
|
3505
|
+
next(activeBranch),
|
|
3506
|
+
0
|
|
3507
|
+
);
|
|
3415
3508
|
queuePostFlushCb(effects);
|
|
3416
3509
|
}
|
|
3417
3510
|
};
|
|
@@ -3458,7 +3551,6 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3458
3551
|
}
|
|
3459
3552
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
|
|
3460
3553
|
triggerEvent(vnode2, "onFallback");
|
|
3461
|
-
const anchor2 = next(activeBranch);
|
|
3462
3554
|
const mountFallback = () => {
|
|
3463
3555
|
if (!suspense.isInFallback) {
|
|
3464
3556
|
return;
|
|
@@ -3467,7 +3559,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3467
3559
|
null,
|
|
3468
3560
|
fallbackVNode,
|
|
3469
3561
|
container2,
|
|
3470
|
-
|
|
3562
|
+
next(activeBranch),
|
|
3471
3563
|
parentComponent2,
|
|
3472
3564
|
null,
|
|
3473
3565
|
// fallback tree will not have suspense context
|
|
@@ -6325,7 +6417,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6325
6417
|
return vm;
|
|
6326
6418
|
}
|
|
6327
6419
|
}
|
|
6328
|
-
Vue.version = `2.6.14-compat:${"3.4.0-alpha.
|
|
6420
|
+
Vue.version = `2.6.14-compat:${"3.4.0-alpha.4"}`;
|
|
6329
6421
|
Vue.config = singletonApp.config;
|
|
6330
6422
|
Vue.use = (p, ...options) => {
|
|
6331
6423
|
if (p && isFunction(p.install)) {
|
|
@@ -6726,18 +6818,6 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6726
6818
|
rootProps = null;
|
|
6727
6819
|
}
|
|
6728
6820
|
const context = createAppContext();
|
|
6729
|
-
{
|
|
6730
|
-
Object.defineProperty(context.config, "unwrapInjectedRef", {
|
|
6731
|
-
get() {
|
|
6732
|
-
return true;
|
|
6733
|
-
},
|
|
6734
|
-
set() {
|
|
6735
|
-
warn(
|
|
6736
|
-
`app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
|
|
6737
|
-
);
|
|
6738
|
-
}
|
|
6739
|
-
});
|
|
6740
|
-
}
|
|
6741
6821
|
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
6742
6822
|
let isMounted = false;
|
|
6743
6823
|
const app = context.app = {
|
|
@@ -10722,9 +10802,9 @@ Component that was made reactive: `,
|
|
|
10722
10802
|
return;
|
|
10723
10803
|
}
|
|
10724
10804
|
const vueStyle = { style: "color:#3ba776" };
|
|
10725
|
-
const numberStyle = { style: "color:#
|
|
10726
|
-
const stringStyle = { style: "color:#
|
|
10727
|
-
const keywordStyle = { style: "color:#
|
|
10805
|
+
const numberStyle = { style: "color:#1677ff" };
|
|
10806
|
+
const stringStyle = { style: "color:#f5222d" };
|
|
10807
|
+
const keywordStyle = { style: "color:#eb2f96" };
|
|
10728
10808
|
const formatter = {
|
|
10729
10809
|
header(obj) {
|
|
10730
10810
|
if (!isObject(obj)) {
|
|
@@ -10918,7 +10998,7 @@ Component that was made reactive: `,
|
|
|
10918
10998
|
return true;
|
|
10919
10999
|
}
|
|
10920
11000
|
|
|
10921
|
-
const version = "3.4.0-alpha.
|
|
11001
|
+
const version = "3.4.0-alpha.4";
|
|
10922
11002
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10923
11003
|
const ssrUtils = null;
|
|
10924
11004
|
const resolveFilter = resolveFilter$1 ;
|
|
@@ -10930,6 +11010,7 @@ Component that was made reactive: `,
|
|
|
10930
11010
|
softAssertCompatEnabled
|
|
10931
11011
|
};
|
|
10932
11012
|
const compatUtils = _compatUtils ;
|
|
11013
|
+
const DeprecationTypes = DeprecationTypes$1 ;
|
|
10933
11014
|
|
|
10934
11015
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
10935
11016
|
const doc = typeof document !== "undefined" ? document : null;
|
|
@@ -11618,7 +11699,8 @@ Component that was made reactive: `,
|
|
|
11618
11699
|
}
|
|
11619
11700
|
}
|
|
11620
11701
|
|
|
11621
|
-
const
|
|
11702
|
+
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
|
|
11703
|
+
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
|
|
11622
11704
|
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
11623
11705
|
if (key === "class") {
|
|
11624
11706
|
patchClass(el, nextValue, isSVG);
|
|
@@ -11652,7 +11734,7 @@ Component that was made reactive: `,
|
|
|
11652
11734
|
if (key === "innerHTML" || key === "textContent") {
|
|
11653
11735
|
return true;
|
|
11654
11736
|
}
|
|
11655
|
-
if (key in el &&
|
|
11737
|
+
if (key in el && isNativeOn(key) && isFunction(value)) {
|
|
11656
11738
|
return true;
|
|
11657
11739
|
}
|
|
11658
11740
|
return false;
|
|
@@ -11669,7 +11751,11 @@ Component that was made reactive: `,
|
|
|
11669
11751
|
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
11670
11752
|
return false;
|
|
11671
11753
|
}
|
|
11672
|
-
if (
|
|
11754
|
+
if (key === "width" || key === "height") {
|
|
11755
|
+
const tag = el.tagName;
|
|
11756
|
+
return !(tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE");
|
|
11757
|
+
}
|
|
11758
|
+
if (isNativeOn(key) && isString(value)) {
|
|
11673
11759
|
return false;
|
|
11674
11760
|
}
|
|
11675
11761
|
return key in el;
|
|
@@ -12347,14 +12433,14 @@ Component that was made reactive: `,
|
|
|
12347
12433
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
12348
12434
|
};
|
|
12349
12435
|
const withModifiers = (fn, modifiers) => {
|
|
12350
|
-
return (event, ...args) => {
|
|
12436
|
+
return fn._withMods || (fn._withMods = (event, ...args) => {
|
|
12351
12437
|
for (let i = 0; i < modifiers.length; i++) {
|
|
12352
12438
|
const guard = modifierGuards[modifiers[i]];
|
|
12353
12439
|
if (guard && guard(event, modifiers))
|
|
12354
12440
|
return;
|
|
12355
12441
|
}
|
|
12356
12442
|
return fn(event, ...args);
|
|
12357
|
-
};
|
|
12443
|
+
});
|
|
12358
12444
|
};
|
|
12359
12445
|
const keyNames = {
|
|
12360
12446
|
esc: "escape",
|
|
@@ -12382,7 +12468,7 @@ Component that was made reactive: `,
|
|
|
12382
12468
|
);
|
|
12383
12469
|
}
|
|
12384
12470
|
}
|
|
12385
|
-
return (event) => {
|
|
12471
|
+
return fn._withKeys || (fn._withKeys = (event) => {
|
|
12386
12472
|
if (!("key" in event)) {
|
|
12387
12473
|
return;
|
|
12388
12474
|
}
|
|
@@ -12410,7 +12496,7 @@ Component that was made reactive: `,
|
|
|
12410
12496
|
}
|
|
12411
12497
|
}
|
|
12412
12498
|
}
|
|
12413
|
-
};
|
|
12499
|
+
});
|
|
12414
12500
|
};
|
|
12415
12501
|
|
|
12416
12502
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -12541,7 +12627,9 @@ Component that was made reactive: `,
|
|
|
12541
12627
|
BaseTransition: BaseTransition,
|
|
12542
12628
|
BaseTransitionPropsValidators: BaseTransitionPropsValidators,
|
|
12543
12629
|
Comment: Comment,
|
|
12630
|
+
DeprecationTypes: DeprecationTypes,
|
|
12544
12631
|
EffectScope: EffectScope,
|
|
12632
|
+
ErrorCodes: ErrorCodes,
|
|
12545
12633
|
ErrorTypeStrings: ErrorTypeStrings,
|
|
12546
12634
|
Fragment: Fragment,
|
|
12547
12635
|
KeepAlive: KeepAlive,
|
|
@@ -12550,8 +12638,10 @@ Component that was made reactive: `,
|
|
|
12550
12638
|
Suspense: Suspense,
|
|
12551
12639
|
Teleport: Teleport,
|
|
12552
12640
|
Text: Text,
|
|
12641
|
+
TrackOpTypes: TrackOpTypes,
|
|
12553
12642
|
Transition: Transition,
|
|
12554
12643
|
TransitionGroup: TransitionGroup,
|
|
12644
|
+
TriggerOpTypes: TriggerOpTypes,
|
|
12555
12645
|
VueElement: VueElement,
|
|
12556
12646
|
assertNumber: assertNumber,
|
|
12557
12647
|
callWithAsyncErrorHandling: callWithAsyncErrorHandling,
|
|
@@ -13023,7 +13113,9 @@ Make sure to use the production build (*.prod.js) when deploying for production.
|
|
|
13023
13113
|
this.inRCDATA = false;
|
|
13024
13114
|
/** For disabling RCDATA tags handling */
|
|
13025
13115
|
this.inXML = false;
|
|
13026
|
-
/**
|
|
13116
|
+
/** For disabling interpolation parsing in v-pre */
|
|
13117
|
+
this.inVPre = false;
|
|
13118
|
+
/** Record newline positions for fast line / column calculation */
|
|
13027
13119
|
this.newlines = [];
|
|
13028
13120
|
this.mode = 0;
|
|
13029
13121
|
this.delimiterOpen = defaultDelimitersOpen;
|
|
@@ -13042,6 +13134,7 @@ Make sure to use the production build (*.prod.js) when deploying for production.
|
|
|
13042
13134
|
this.sectionStart = 0;
|
|
13043
13135
|
this.index = 0;
|
|
13044
13136
|
this.baseState = 1;
|
|
13137
|
+
this.inRCDATA = false;
|
|
13045
13138
|
this.currentSequence = void 0;
|
|
13046
13139
|
this.newlines.length = 0;
|
|
13047
13140
|
this.delimiterOpen = defaultDelimitersOpen;
|
|
@@ -13080,7 +13173,7 @@ Make sure to use the production build (*.prod.js) when deploying for production.
|
|
|
13080
13173
|
}
|
|
13081
13174
|
this.state = 5;
|
|
13082
13175
|
this.sectionStart = this.index;
|
|
13083
|
-
} else if (c === this.delimiterOpen[0]) {
|
|
13176
|
+
} else if (!this.inVPre && c === this.delimiterOpen[0]) {
|
|
13084
13177
|
this.state = 2;
|
|
13085
13178
|
this.delimiterIndex = 0;
|
|
13086
13179
|
this.stateInterpolationOpen(c);
|
|
@@ -13895,16 +13988,14 @@ Make sure to use the production build (*.prod.js) when deploying for production.
|
|
|
13895
13988
|
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
|
|
13896
13989
|
[45]: `Error parsing JavaScript expression: `,
|
|
13897
13990
|
[46]: `<KeepAlive> expects exactly one child component.`,
|
|
13991
|
+
[47]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
|
|
13898
13992
|
// generic errors
|
|
13899
|
-
[
|
|
13900
|
-
[
|
|
13901
|
-
[
|
|
13902
|
-
[
|
|
13903
|
-
// deprecations
|
|
13904
|
-
[51]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
|
|
13905
|
-
[52]: `v-is="component-name" has been deprecated. Use is="vue:component-name" instead. v-is support will be removed in 3.4.`,
|
|
13993
|
+
[48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
|
|
13994
|
+
[49]: `ES module mode is not supported in this build of compiler.`,
|
|
13995
|
+
[50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
|
|
13996
|
+
[51]: `"scopeId" option is only supported in module mode.`,
|
|
13906
13997
|
// just to fulfill types
|
|
13907
|
-
[
|
|
13998
|
+
[52]: ``
|
|
13908
13999
|
};
|
|
13909
14000
|
|
|
13910
14001
|
const isStaticExp = (p) => p.type === 4 && p.isStatic;
|
|
@@ -14147,7 +14238,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14147
14238
|
isCustomElement: NO,
|
|
14148
14239
|
onError: defaultOnError,
|
|
14149
14240
|
onWarn: defaultOnWarn,
|
|
14150
|
-
comments: true
|
|
14241
|
+
comments: true,
|
|
14242
|
+
prefixIdentifiers: false
|
|
14151
14243
|
};
|
|
14152
14244
|
let currentOptions = defaultParserOptions;
|
|
14153
14245
|
let currentRoot = null;
|
|
@@ -14189,7 +14281,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14189
14281
|
}
|
|
14190
14282
|
addNode({
|
|
14191
14283
|
type: 5,
|
|
14192
|
-
content:
|
|
14284
|
+
content: createExp(exp, false, getLoc(innerStart, innerEnd)),
|
|
14193
14285
|
loc: getLoc(start, end)
|
|
14194
14286
|
});
|
|
14195
14287
|
},
|
|
@@ -14282,7 +14374,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14282
14374
|
loc: getLoc(start)
|
|
14283
14375
|
};
|
|
14284
14376
|
if (name === "pre") {
|
|
14285
|
-
inVPre = true;
|
|
14377
|
+
inVPre = tokenizer.inVPre = true;
|
|
14286
14378
|
currentVPreBoundary = currentOpenTag;
|
|
14287
14379
|
const props = currentOpenTag.props;
|
|
14288
14380
|
for (let i = 0; i < props.length; i++) {
|
|
@@ -14302,7 +14394,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14302
14394
|
setLocEnd(currentProp.nameLoc, end);
|
|
14303
14395
|
} else {
|
|
14304
14396
|
const isStatic = arg[0] !== `[`;
|
|
14305
|
-
currentProp.arg =
|
|
14397
|
+
currentProp.arg = createExp(
|
|
14306
14398
|
isStatic ? arg : arg.slice(1, -1),
|
|
14307
14399
|
isStatic,
|
|
14308
14400
|
getLoc(start, end),
|
|
@@ -14375,10 +14467,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14375
14467
|
tokenizer.enterRCDATA(toCharCodes(`</template`), 0);
|
|
14376
14468
|
}
|
|
14377
14469
|
} else {
|
|
14378
|
-
|
|
14470
|
+
let expParseMode = 0 /* Normal */;
|
|
14471
|
+
currentProp.exp = createExp(
|
|
14379
14472
|
currentAttrValue,
|
|
14380
14473
|
false,
|
|
14381
|
-
getLoc(currentAttrStartIndex, currentAttrEndIndex)
|
|
14474
|
+
getLoc(currentAttrStartIndex, currentAttrEndIndex),
|
|
14475
|
+
0,
|
|
14476
|
+
expParseMode
|
|
14382
14477
|
);
|
|
14383
14478
|
if (currentProp.name === "for") {
|
|
14384
14479
|
currentProp.forParseResult = parseForExpression(currentProp.exp);
|
|
@@ -14481,10 +14576,16 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14481
14576
|
if (!inMatch)
|
|
14482
14577
|
return;
|
|
14483
14578
|
const [, LHS, RHS] = inMatch;
|
|
14484
|
-
const createAliasExpression = (content, offset) => {
|
|
14579
|
+
const createAliasExpression = (content, offset, asParam = false) => {
|
|
14485
14580
|
const start = loc.start.offset + offset;
|
|
14486
14581
|
const end = start + content.length;
|
|
14487
|
-
return
|
|
14582
|
+
return createExp(
|
|
14583
|
+
content,
|
|
14584
|
+
false,
|
|
14585
|
+
getLoc(start, end),
|
|
14586
|
+
0,
|
|
14587
|
+
asParam ? 1 /* Params */ : 0 /* Normal */
|
|
14588
|
+
);
|
|
14488
14589
|
};
|
|
14489
14590
|
const result = {
|
|
14490
14591
|
source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)),
|
|
@@ -14502,7 +14603,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14502
14603
|
let keyOffset;
|
|
14503
14604
|
if (keyContent) {
|
|
14504
14605
|
keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length);
|
|
14505
|
-
result.key = createAliasExpression(keyContent, keyOffset);
|
|
14606
|
+
result.key = createAliasExpression(keyContent, keyOffset, true);
|
|
14506
14607
|
}
|
|
14507
14608
|
if (iteratorMatch[2]) {
|
|
14508
14609
|
const indexContent = iteratorMatch[2].trim();
|
|
@@ -14512,13 +14613,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14512
14613
|
exp.indexOf(
|
|
14513
14614
|
indexContent,
|
|
14514
14615
|
result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length
|
|
14515
|
-
)
|
|
14616
|
+
),
|
|
14617
|
+
true
|
|
14516
14618
|
);
|
|
14517
14619
|
}
|
|
14518
14620
|
}
|
|
14519
14621
|
}
|
|
14520
14622
|
if (valueContent) {
|
|
14521
|
-
result.value = createAliasExpression(valueContent, trimmedOffset);
|
|
14623
|
+
result.value = createAliasExpression(valueContent, trimmedOffset, true);
|
|
14522
14624
|
}
|
|
14523
14625
|
return result;
|
|
14524
14626
|
}
|
|
@@ -14596,7 +14698,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14596
14698
|
inPre--;
|
|
14597
14699
|
}
|
|
14598
14700
|
if (currentVPreBoundary === el) {
|
|
14599
|
-
inVPre = false;
|
|
14701
|
+
inVPre = tokenizer.inVPre = false;
|
|
14600
14702
|
currentVPreBoundary = null;
|
|
14601
14703
|
}
|
|
14602
14704
|
if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) {
|
|
@@ -14831,8 +14933,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14831
14933
|
}
|
|
14832
14934
|
return attr;
|
|
14833
14935
|
}
|
|
14834
|
-
function
|
|
14835
|
-
|
|
14936
|
+
function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) {
|
|
14937
|
+
const exp = createSimpleExpression(content, isStatic, loc, constType);
|
|
14938
|
+
return exp;
|
|
14939
|
+
}
|
|
14940
|
+
function emitError(code, index, message) {
|
|
14941
|
+
currentOptions.onError(
|
|
14942
|
+
createCompilerError(code, getLoc(index, index), void 0, message)
|
|
14943
|
+
);
|
|
14836
14944
|
}
|
|
14837
14945
|
function reset() {
|
|
14838
14946
|
tokenizer.reset();
|
|
@@ -14863,6 +14971,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14863
14971
|
}
|
|
14864
14972
|
}
|
|
14865
14973
|
tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0;
|
|
14974
|
+
tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;
|
|
14866
14975
|
const delimiters = options == null ? void 0 : options.delimiters;
|
|
14867
14976
|
if (delimiters) {
|
|
14868
14977
|
tokenizer.delimiterOpen = toCharCodes(delimiters[0]);
|
|
@@ -16909,6 +17018,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16909
17018
|
if (isEventHandler && isReservedProp(name)) {
|
|
16910
17019
|
hasVnodeHook = true;
|
|
16911
17020
|
}
|
|
17021
|
+
if (isEventHandler && value.type === 14) {
|
|
17022
|
+
value = value.arguments[0];
|
|
17023
|
+
}
|
|
16912
17024
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
16913
17025
|
return;
|
|
16914
17026
|
}
|
|
@@ -17361,9 +17473,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17361
17473
|
if (arg.isStatic) {
|
|
17362
17474
|
let rawName = arg.content;
|
|
17363
17475
|
if (rawName.startsWith("vnode")) {
|
|
17364
|
-
context.
|
|
17365
|
-
createCompilerError(51, arg.loc)
|
|
17366
|
-
);
|
|
17476
|
+
context.onError(createCompilerError(47, arg.loc));
|
|
17367
17477
|
}
|
|
17368
17478
|
if (rawName.startsWith("vue:")) {
|
|
17369
17479
|
rawName = `vnode-${rawName.slice(4)}`;
|
|
@@ -17844,17 +17954,17 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17844
17954
|
const isModuleMode = options.mode === "module";
|
|
17845
17955
|
{
|
|
17846
17956
|
if (options.prefixIdentifiers === true) {
|
|
17847
|
-
onError(createCompilerError(47));
|
|
17848
|
-
} else if (isModuleMode) {
|
|
17849
17957
|
onError(createCompilerError(48));
|
|
17958
|
+
} else if (isModuleMode) {
|
|
17959
|
+
onError(createCompilerError(49));
|
|
17850
17960
|
}
|
|
17851
17961
|
}
|
|
17852
17962
|
const prefixIdentifiers = false;
|
|
17853
17963
|
if (options.cacheHandlers) {
|
|
17854
|
-
onError(createCompilerError(
|
|
17964
|
+
onError(createCompilerError(50));
|
|
17855
17965
|
}
|
|
17856
17966
|
if (options.scopeId && !isModuleMode) {
|
|
17857
|
-
onError(createCompilerError(
|
|
17967
|
+
onError(createCompilerError(51));
|
|
17858
17968
|
}
|
|
17859
17969
|
const ast = isString(source) ? baseParse(source, options) : source;
|
|
17860
17970
|
const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
|