@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.esm-bundler.js
CHANGED
|
@@ -8,8 +8,8 @@ const EMPTY_ARR = !!(process.env.NODE_ENV !== "production") ? Object.freeze([])
|
|
|
8
8
|
const NOOP = () => {
|
|
9
9
|
};
|
|
10
10
|
const NO = () => false;
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
|
|
12
|
+
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
|
13
13
|
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
14
14
|
const extend = Object.assign;
|
|
15
15
|
const remove = (arr, el) => {
|
|
@@ -117,7 +117,7 @@ const slotFlagsText = {
|
|
|
117
117
|
[3]: "FORWARDED"
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
-
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";
|
|
120
|
+
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";
|
|
121
121
|
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
|
|
122
122
|
|
|
123
123
|
const range = 2;
|
|
@@ -1498,6 +1498,18 @@ function propertyToRef(source, key, defaultValue) {
|
|
|
1498
1498
|
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
|
|
1499
1499
|
}
|
|
1500
1500
|
|
|
1501
|
+
const TrackOpTypes = {
|
|
1502
|
+
"GET": "get",
|
|
1503
|
+
"HAS": "has",
|
|
1504
|
+
"ITERATE": "iterate"
|
|
1505
|
+
};
|
|
1506
|
+
const TriggerOpTypes = {
|
|
1507
|
+
"SET": "set",
|
|
1508
|
+
"ADD": "add",
|
|
1509
|
+
"DELETE": "delete",
|
|
1510
|
+
"CLEAR": "clear"
|
|
1511
|
+
};
|
|
1512
|
+
|
|
1501
1513
|
const stack$1 = [];
|
|
1502
1514
|
function pushWarningContext(vnode) {
|
|
1503
1515
|
stack$1.push(vnode);
|
|
@@ -1616,6 +1628,38 @@ function assertNumber(val, type) {
|
|
|
1616
1628
|
}
|
|
1617
1629
|
}
|
|
1618
1630
|
|
|
1631
|
+
const ErrorCodes = {
|
|
1632
|
+
"SETUP_FUNCTION": 0,
|
|
1633
|
+
"0": "SETUP_FUNCTION",
|
|
1634
|
+
"RENDER_FUNCTION": 1,
|
|
1635
|
+
"1": "RENDER_FUNCTION",
|
|
1636
|
+
"WATCH_GETTER": 2,
|
|
1637
|
+
"2": "WATCH_GETTER",
|
|
1638
|
+
"WATCH_CALLBACK": 3,
|
|
1639
|
+
"3": "WATCH_CALLBACK",
|
|
1640
|
+
"WATCH_CLEANUP": 4,
|
|
1641
|
+
"4": "WATCH_CLEANUP",
|
|
1642
|
+
"NATIVE_EVENT_HANDLER": 5,
|
|
1643
|
+
"5": "NATIVE_EVENT_HANDLER",
|
|
1644
|
+
"COMPONENT_EVENT_HANDLER": 6,
|
|
1645
|
+
"6": "COMPONENT_EVENT_HANDLER",
|
|
1646
|
+
"VNODE_HOOK": 7,
|
|
1647
|
+
"7": "VNODE_HOOK",
|
|
1648
|
+
"DIRECTIVE_HOOK": 8,
|
|
1649
|
+
"8": "DIRECTIVE_HOOK",
|
|
1650
|
+
"TRANSITION_HOOK": 9,
|
|
1651
|
+
"9": "TRANSITION_HOOK",
|
|
1652
|
+
"APP_ERROR_HANDLER": 10,
|
|
1653
|
+
"10": "APP_ERROR_HANDLER",
|
|
1654
|
+
"APP_WARN_HANDLER": 11,
|
|
1655
|
+
"11": "APP_WARN_HANDLER",
|
|
1656
|
+
"FUNCTION_REF": 12,
|
|
1657
|
+
"12": "FUNCTION_REF",
|
|
1658
|
+
"ASYNC_COMPONENT_LOADER": 13,
|
|
1659
|
+
"13": "ASYNC_COMPONENT_LOADER",
|
|
1660
|
+
"SCHEDULER": 14,
|
|
1661
|
+
"14": "SCHEDULER"
|
|
1662
|
+
};
|
|
1619
1663
|
const ErrorTypeStrings$1 = {
|
|
1620
1664
|
["sp"]: "serverPrefetch hook",
|
|
1621
1665
|
["bc"]: "beforeCreate hook",
|
|
@@ -2100,6 +2144,50 @@ function devtoolsComponentEmit(component, event, params) {
|
|
|
2100
2144
|
);
|
|
2101
2145
|
}
|
|
2102
2146
|
|
|
2147
|
+
const DeprecationTypes$1 = {
|
|
2148
|
+
"GLOBAL_MOUNT": "GLOBAL_MOUNT",
|
|
2149
|
+
"GLOBAL_MOUNT_CONTAINER": "GLOBAL_MOUNT_CONTAINER",
|
|
2150
|
+
"GLOBAL_EXTEND": "GLOBAL_EXTEND",
|
|
2151
|
+
"GLOBAL_PROTOTYPE": "GLOBAL_PROTOTYPE",
|
|
2152
|
+
"GLOBAL_SET": "GLOBAL_SET",
|
|
2153
|
+
"GLOBAL_DELETE": "GLOBAL_DELETE",
|
|
2154
|
+
"GLOBAL_OBSERVABLE": "GLOBAL_OBSERVABLE",
|
|
2155
|
+
"GLOBAL_PRIVATE_UTIL": "GLOBAL_PRIVATE_UTIL",
|
|
2156
|
+
"CONFIG_SILENT": "CONFIG_SILENT",
|
|
2157
|
+
"CONFIG_DEVTOOLS": "CONFIG_DEVTOOLS",
|
|
2158
|
+
"CONFIG_KEY_CODES": "CONFIG_KEY_CODES",
|
|
2159
|
+
"CONFIG_PRODUCTION_TIP": "CONFIG_PRODUCTION_TIP",
|
|
2160
|
+
"CONFIG_IGNORED_ELEMENTS": "CONFIG_IGNORED_ELEMENTS",
|
|
2161
|
+
"CONFIG_WHITESPACE": "CONFIG_WHITESPACE",
|
|
2162
|
+
"CONFIG_OPTION_MERGE_STRATS": "CONFIG_OPTION_MERGE_STRATS",
|
|
2163
|
+
"INSTANCE_SET": "INSTANCE_SET",
|
|
2164
|
+
"INSTANCE_DELETE": "INSTANCE_DELETE",
|
|
2165
|
+
"INSTANCE_DESTROY": "INSTANCE_DESTROY",
|
|
2166
|
+
"INSTANCE_EVENT_EMITTER": "INSTANCE_EVENT_EMITTER",
|
|
2167
|
+
"INSTANCE_EVENT_HOOKS": "INSTANCE_EVENT_HOOKS",
|
|
2168
|
+
"INSTANCE_CHILDREN": "INSTANCE_CHILDREN",
|
|
2169
|
+
"INSTANCE_LISTENERS": "INSTANCE_LISTENERS",
|
|
2170
|
+
"INSTANCE_SCOPED_SLOTS": "INSTANCE_SCOPED_SLOTS",
|
|
2171
|
+
"INSTANCE_ATTRS_CLASS_STYLE": "INSTANCE_ATTRS_CLASS_STYLE",
|
|
2172
|
+
"OPTIONS_DATA_FN": "OPTIONS_DATA_FN",
|
|
2173
|
+
"OPTIONS_DATA_MERGE": "OPTIONS_DATA_MERGE",
|
|
2174
|
+
"OPTIONS_BEFORE_DESTROY": "OPTIONS_BEFORE_DESTROY",
|
|
2175
|
+
"OPTIONS_DESTROYED": "OPTIONS_DESTROYED",
|
|
2176
|
+
"WATCH_ARRAY": "WATCH_ARRAY",
|
|
2177
|
+
"PROPS_DEFAULT_THIS": "PROPS_DEFAULT_THIS",
|
|
2178
|
+
"V_ON_KEYCODE_MODIFIER": "V_ON_KEYCODE_MODIFIER",
|
|
2179
|
+
"CUSTOM_DIR": "CUSTOM_DIR",
|
|
2180
|
+
"ATTR_FALSE_VALUE": "ATTR_FALSE_VALUE",
|
|
2181
|
+
"ATTR_ENUMERATED_COERCION": "ATTR_ENUMERATED_COERCION",
|
|
2182
|
+
"TRANSITION_CLASSES": "TRANSITION_CLASSES",
|
|
2183
|
+
"TRANSITION_GROUP_ROOT": "TRANSITION_GROUP_ROOT",
|
|
2184
|
+
"COMPONENT_ASYNC": "COMPONENT_ASYNC",
|
|
2185
|
+
"COMPONENT_FUNCTIONAL": "COMPONENT_FUNCTIONAL",
|
|
2186
|
+
"COMPONENT_V_MODEL": "COMPONENT_V_MODEL",
|
|
2187
|
+
"RENDER_FUNCTION": "RENDER_FUNCTION",
|
|
2188
|
+
"FILTERS": "FILTERS",
|
|
2189
|
+
"PRIVATE_APIS": "PRIVATE_APIS"
|
|
2190
|
+
};
|
|
2103
2191
|
const deprecationData$1 = {
|
|
2104
2192
|
["GLOBAL_MOUNT"]: {
|
|
2105
2193
|
message: `The global app bootstrapping API has changed: vm.$mount() and the "el" option have been removed. Use createApp(RootComponent).mount() instead.`,
|
|
@@ -3417,7 +3505,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3417
3505
|
if (delayEnter) {
|
|
3418
3506
|
activeBranch.transition.afterLeave = () => {
|
|
3419
3507
|
if (pendingId === suspense.pendingId) {
|
|
3420
|
-
move(
|
|
3508
|
+
move(
|
|
3509
|
+
pendingBranch,
|
|
3510
|
+
container2,
|
|
3511
|
+
next(activeBranch),
|
|
3512
|
+
0
|
|
3513
|
+
);
|
|
3421
3514
|
queuePostFlushCb(effects);
|
|
3422
3515
|
}
|
|
3423
3516
|
};
|
|
@@ -3464,7 +3557,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3464
3557
|
}
|
|
3465
3558
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
|
|
3466
3559
|
triggerEvent(vnode2, "onFallback");
|
|
3467
|
-
const anchor2 = next(activeBranch);
|
|
3468
3560
|
const mountFallback = () => {
|
|
3469
3561
|
if (!suspense.isInFallback) {
|
|
3470
3562
|
return;
|
|
@@ -3473,7 +3565,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3473
3565
|
null,
|
|
3474
3566
|
fallbackVNode,
|
|
3475
3567
|
container2,
|
|
3476
|
-
|
|
3568
|
+
next(activeBranch),
|
|
3477
3569
|
parentComponent2,
|
|
3478
3570
|
null,
|
|
3479
3571
|
// fallback tree will not have suspense context
|
|
@@ -6362,7 +6454,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6362
6454
|
return vm;
|
|
6363
6455
|
}
|
|
6364
6456
|
}
|
|
6365
|
-
Vue.version = `2.6.14-compat:${"3.4.0-alpha.
|
|
6457
|
+
Vue.version = `2.6.14-compat:${"3.4.0-alpha.4"}`;
|
|
6366
6458
|
Vue.config = singletonApp.config;
|
|
6367
6459
|
Vue.use = (p, ...options) => {
|
|
6368
6460
|
if (p && isFunction(p.install)) {
|
|
@@ -6764,18 +6856,6 @@ function createAppAPI(render, hydrate) {
|
|
|
6764
6856
|
rootProps = null;
|
|
6765
6857
|
}
|
|
6766
6858
|
const context = createAppContext();
|
|
6767
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6768
|
-
Object.defineProperty(context.config, "unwrapInjectedRef", {
|
|
6769
|
-
get() {
|
|
6770
|
-
return true;
|
|
6771
|
-
},
|
|
6772
|
-
set() {
|
|
6773
|
-
warn(
|
|
6774
|
-
`app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
|
|
6775
|
-
);
|
|
6776
|
-
}
|
|
6777
|
-
});
|
|
6778
|
-
}
|
|
6779
6859
|
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
6780
6860
|
let isMounted = false;
|
|
6781
6861
|
const app = context.app = {
|
|
@@ -10830,9 +10910,9 @@ function initCustomFormatter() {
|
|
|
10830
10910
|
return;
|
|
10831
10911
|
}
|
|
10832
10912
|
const vueStyle = { style: "color:#3ba776" };
|
|
10833
|
-
const numberStyle = { style: "color:#
|
|
10834
|
-
const stringStyle = { style: "color:#
|
|
10835
|
-
const keywordStyle = { style: "color:#
|
|
10913
|
+
const numberStyle = { style: "color:#1677ff" };
|
|
10914
|
+
const stringStyle = { style: "color:#f5222d" };
|
|
10915
|
+
const keywordStyle = { style: "color:#eb2f96" };
|
|
10836
10916
|
const formatter = {
|
|
10837
10917
|
header(obj) {
|
|
10838
10918
|
if (!isObject(obj)) {
|
|
@@ -11026,7 +11106,7 @@ function isMemoSame(cached, memo) {
|
|
|
11026
11106
|
return true;
|
|
11027
11107
|
}
|
|
11028
11108
|
|
|
11029
|
-
const version = "3.4.0-alpha.
|
|
11109
|
+
const version = "3.4.0-alpha.4";
|
|
11030
11110
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11031
11111
|
const _ssrUtils = {
|
|
11032
11112
|
createComponentInstance,
|
|
@@ -11046,6 +11126,7 @@ const _compatUtils = {
|
|
|
11046
11126
|
softAssertCompatEnabled
|
|
11047
11127
|
};
|
|
11048
11128
|
const compatUtils = _compatUtils ;
|
|
11129
|
+
const DeprecationTypes = DeprecationTypes$1 ;
|
|
11049
11130
|
|
|
11050
11131
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
11051
11132
|
const doc = typeof document !== "undefined" ? document : null;
|
|
@@ -11741,7 +11822,8 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
11741
11822
|
}
|
|
11742
11823
|
}
|
|
11743
11824
|
|
|
11744
|
-
const
|
|
11825
|
+
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
|
|
11826
|
+
key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
|
|
11745
11827
|
const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
|
|
11746
11828
|
if (key === "class") {
|
|
11747
11829
|
patchClass(el, nextValue, isSVG);
|
|
@@ -11775,7 +11857,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
11775
11857
|
if (key === "innerHTML" || key === "textContent") {
|
|
11776
11858
|
return true;
|
|
11777
11859
|
}
|
|
11778
|
-
if (key in el &&
|
|
11860
|
+
if (key in el && isNativeOn(key) && isFunction(value)) {
|
|
11779
11861
|
return true;
|
|
11780
11862
|
}
|
|
11781
11863
|
return false;
|
|
@@ -11792,7 +11874,11 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
11792
11874
|
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
11793
11875
|
return false;
|
|
11794
11876
|
}
|
|
11795
|
-
if (
|
|
11877
|
+
if (key === "width" || key === "height") {
|
|
11878
|
+
const tag = el.tagName;
|
|
11879
|
+
return !(tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE");
|
|
11880
|
+
}
|
|
11881
|
+
if (isNativeOn(key) && isString(value)) {
|
|
11796
11882
|
return false;
|
|
11797
11883
|
}
|
|
11798
11884
|
return key in el;
|
|
@@ -12516,14 +12602,14 @@ const modifierGuards = {
|
|
|
12516
12602
|
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
12517
12603
|
};
|
|
12518
12604
|
const withModifiers = (fn, modifiers) => {
|
|
12519
|
-
return (event, ...args) => {
|
|
12605
|
+
return fn._withMods || (fn._withMods = (event, ...args) => {
|
|
12520
12606
|
for (let i = 0; i < modifiers.length; i++) {
|
|
12521
12607
|
const guard = modifierGuards[modifiers[i]];
|
|
12522
12608
|
if (guard && guard(event, modifiers))
|
|
12523
12609
|
return;
|
|
12524
12610
|
}
|
|
12525
12611
|
return fn(event, ...args);
|
|
12526
|
-
};
|
|
12612
|
+
});
|
|
12527
12613
|
};
|
|
12528
12614
|
const keyNames = {
|
|
12529
12615
|
esc: "escape",
|
|
@@ -12551,7 +12637,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
12551
12637
|
);
|
|
12552
12638
|
}
|
|
12553
12639
|
}
|
|
12554
|
-
return (event) => {
|
|
12640
|
+
return fn._withKeys || (fn._withKeys = (event) => {
|
|
12555
12641
|
if (!("key" in event)) {
|
|
12556
12642
|
return;
|
|
12557
12643
|
}
|
|
@@ -12579,7 +12665,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
12579
12665
|
}
|
|
12580
12666
|
}
|
|
12581
12667
|
}
|
|
12582
|
-
};
|
|
12668
|
+
});
|
|
12583
12669
|
};
|
|
12584
12670
|
|
|
12585
12671
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -12717,7 +12803,9 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
12717
12803
|
BaseTransition: BaseTransition,
|
|
12718
12804
|
BaseTransitionPropsValidators: BaseTransitionPropsValidators,
|
|
12719
12805
|
Comment: Comment,
|
|
12806
|
+
DeprecationTypes: DeprecationTypes,
|
|
12720
12807
|
EffectScope: EffectScope,
|
|
12808
|
+
ErrorCodes: ErrorCodes,
|
|
12721
12809
|
ErrorTypeStrings: ErrorTypeStrings,
|
|
12722
12810
|
Fragment: Fragment,
|
|
12723
12811
|
KeepAlive: KeepAlive,
|
|
@@ -12726,8 +12814,10 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
12726
12814
|
Suspense: Suspense,
|
|
12727
12815
|
Teleport: Teleport,
|
|
12728
12816
|
Text: Text,
|
|
12817
|
+
TrackOpTypes: TrackOpTypes,
|
|
12729
12818
|
Transition: Transition,
|
|
12730
12819
|
TransitionGroup: TransitionGroup,
|
|
12820
|
+
TriggerOpTypes: TriggerOpTypes,
|
|
12731
12821
|
VueElement: VueElement,
|
|
12732
12822
|
assertNumber: assertNumber,
|
|
12733
12823
|
callWithAsyncErrorHandling: callWithAsyncErrorHandling,
|
|
@@ -13193,7 +13283,9 @@ class Tokenizer {
|
|
|
13193
13283
|
this.inRCDATA = false;
|
|
13194
13284
|
/** For disabling RCDATA tags handling */
|
|
13195
13285
|
this.inXML = false;
|
|
13196
|
-
/**
|
|
13286
|
+
/** For disabling interpolation parsing in v-pre */
|
|
13287
|
+
this.inVPre = false;
|
|
13288
|
+
/** Record newline positions for fast line / column calculation */
|
|
13197
13289
|
this.newlines = [];
|
|
13198
13290
|
this.mode = 0;
|
|
13199
13291
|
this.delimiterOpen = defaultDelimitersOpen;
|
|
@@ -13212,6 +13304,7 @@ class Tokenizer {
|
|
|
13212
13304
|
this.sectionStart = 0;
|
|
13213
13305
|
this.index = 0;
|
|
13214
13306
|
this.baseState = 1;
|
|
13307
|
+
this.inRCDATA = false;
|
|
13215
13308
|
this.currentSequence = void 0;
|
|
13216
13309
|
this.newlines.length = 0;
|
|
13217
13310
|
this.delimiterOpen = defaultDelimitersOpen;
|
|
@@ -13250,7 +13343,7 @@ class Tokenizer {
|
|
|
13250
13343
|
}
|
|
13251
13344
|
this.state = 5;
|
|
13252
13345
|
this.sectionStart = this.index;
|
|
13253
|
-
} else if (c === this.delimiterOpen[0]) {
|
|
13346
|
+
} else if (!this.inVPre && c === this.delimiterOpen[0]) {
|
|
13254
13347
|
this.state = 2;
|
|
13255
13348
|
this.delimiterIndex = 0;
|
|
13256
13349
|
this.stateInterpolationOpen(c);
|
|
@@ -14065,16 +14158,14 @@ const errorMessages = {
|
|
|
14065
14158
|
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
|
|
14066
14159
|
[45]: `Error parsing JavaScript expression: `,
|
|
14067
14160
|
[46]: `<KeepAlive> expects exactly one child component.`,
|
|
14161
|
+
[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.`,
|
|
14068
14162
|
// generic errors
|
|
14069
|
-
[
|
|
14070
|
-
[
|
|
14071
|
-
[
|
|
14072
|
-
[
|
|
14073
|
-
// deprecations
|
|
14074
|
-
[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.`,
|
|
14075
|
-
[52]: `v-is="component-name" has been deprecated. Use is="vue:component-name" instead. v-is support will be removed in 3.4.`,
|
|
14163
|
+
[48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
|
|
14164
|
+
[49]: `ES module mode is not supported in this build of compiler.`,
|
|
14165
|
+
[50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
|
|
14166
|
+
[51]: `"scopeId" option is only supported in module mode.`,
|
|
14076
14167
|
// just to fulfill types
|
|
14077
|
-
[
|
|
14168
|
+
[52]: ``
|
|
14078
14169
|
};
|
|
14079
14170
|
|
|
14080
14171
|
const isStaticExp = (p) => p.type === 4 && p.isStatic;
|
|
@@ -14317,7 +14408,8 @@ const defaultParserOptions = {
|
|
|
14317
14408
|
isCustomElement: NO,
|
|
14318
14409
|
onError: defaultOnError,
|
|
14319
14410
|
onWarn: defaultOnWarn,
|
|
14320
|
-
comments: !!(process.env.NODE_ENV !== "production")
|
|
14411
|
+
comments: !!(process.env.NODE_ENV !== "production"),
|
|
14412
|
+
prefixIdentifiers: false
|
|
14321
14413
|
};
|
|
14322
14414
|
let currentOptions = defaultParserOptions;
|
|
14323
14415
|
let currentRoot = null;
|
|
@@ -14359,7 +14451,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
14359
14451
|
}
|
|
14360
14452
|
addNode({
|
|
14361
14453
|
type: 5,
|
|
14362
|
-
content:
|
|
14454
|
+
content: createExp(exp, false, getLoc(innerStart, innerEnd)),
|
|
14363
14455
|
loc: getLoc(start, end)
|
|
14364
14456
|
});
|
|
14365
14457
|
},
|
|
@@ -14452,7 +14544,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
14452
14544
|
loc: getLoc(start)
|
|
14453
14545
|
};
|
|
14454
14546
|
if (name === "pre") {
|
|
14455
|
-
inVPre = true;
|
|
14547
|
+
inVPre = tokenizer.inVPre = true;
|
|
14456
14548
|
currentVPreBoundary = currentOpenTag;
|
|
14457
14549
|
const props = currentOpenTag.props;
|
|
14458
14550
|
for (let i = 0; i < props.length; i++) {
|
|
@@ -14472,7 +14564,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
14472
14564
|
setLocEnd(currentProp.nameLoc, end);
|
|
14473
14565
|
} else {
|
|
14474
14566
|
const isStatic = arg[0] !== `[`;
|
|
14475
|
-
currentProp.arg =
|
|
14567
|
+
currentProp.arg = createExp(
|
|
14476
14568
|
isStatic ? arg : arg.slice(1, -1),
|
|
14477
14569
|
isStatic,
|
|
14478
14570
|
getLoc(start, end),
|
|
@@ -14545,10 +14637,13 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
14545
14637
|
tokenizer.enterRCDATA(toCharCodes(`</template`), 0);
|
|
14546
14638
|
}
|
|
14547
14639
|
} else {
|
|
14548
|
-
|
|
14640
|
+
let expParseMode = 0 /* Normal */;
|
|
14641
|
+
currentProp.exp = createExp(
|
|
14549
14642
|
currentAttrValue,
|
|
14550
14643
|
false,
|
|
14551
|
-
getLoc(currentAttrStartIndex, currentAttrEndIndex)
|
|
14644
|
+
getLoc(currentAttrStartIndex, currentAttrEndIndex),
|
|
14645
|
+
0,
|
|
14646
|
+
expParseMode
|
|
14552
14647
|
);
|
|
14553
14648
|
if (currentProp.name === "for") {
|
|
14554
14649
|
currentProp.forParseResult = parseForExpression(currentProp.exp);
|
|
@@ -14651,10 +14746,16 @@ function parseForExpression(input) {
|
|
|
14651
14746
|
if (!inMatch)
|
|
14652
14747
|
return;
|
|
14653
14748
|
const [, LHS, RHS] = inMatch;
|
|
14654
|
-
const createAliasExpression = (content, offset) => {
|
|
14749
|
+
const createAliasExpression = (content, offset, asParam = false) => {
|
|
14655
14750
|
const start = loc.start.offset + offset;
|
|
14656
14751
|
const end = start + content.length;
|
|
14657
|
-
return
|
|
14752
|
+
return createExp(
|
|
14753
|
+
content,
|
|
14754
|
+
false,
|
|
14755
|
+
getLoc(start, end),
|
|
14756
|
+
0,
|
|
14757
|
+
asParam ? 1 /* Params */ : 0 /* Normal */
|
|
14758
|
+
);
|
|
14658
14759
|
};
|
|
14659
14760
|
const result = {
|
|
14660
14761
|
source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)),
|
|
@@ -14672,7 +14773,7 @@ function parseForExpression(input) {
|
|
|
14672
14773
|
let keyOffset;
|
|
14673
14774
|
if (keyContent) {
|
|
14674
14775
|
keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length);
|
|
14675
|
-
result.key = createAliasExpression(keyContent, keyOffset);
|
|
14776
|
+
result.key = createAliasExpression(keyContent, keyOffset, true);
|
|
14676
14777
|
}
|
|
14677
14778
|
if (iteratorMatch[2]) {
|
|
14678
14779
|
const indexContent = iteratorMatch[2].trim();
|
|
@@ -14682,13 +14783,14 @@ function parseForExpression(input) {
|
|
|
14682
14783
|
exp.indexOf(
|
|
14683
14784
|
indexContent,
|
|
14684
14785
|
result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length
|
|
14685
|
-
)
|
|
14786
|
+
),
|
|
14787
|
+
true
|
|
14686
14788
|
);
|
|
14687
14789
|
}
|
|
14688
14790
|
}
|
|
14689
14791
|
}
|
|
14690
14792
|
if (valueContent) {
|
|
14691
|
-
result.value = createAliasExpression(valueContent, trimmedOffset);
|
|
14793
|
+
result.value = createAliasExpression(valueContent, trimmedOffset, true);
|
|
14692
14794
|
}
|
|
14693
14795
|
return result;
|
|
14694
14796
|
}
|
|
@@ -14766,7 +14868,7 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
14766
14868
|
inPre--;
|
|
14767
14869
|
}
|
|
14768
14870
|
if (currentVPreBoundary === el) {
|
|
14769
|
-
inVPre = false;
|
|
14871
|
+
inVPre = tokenizer.inVPre = false;
|
|
14770
14872
|
currentVPreBoundary = null;
|
|
14771
14873
|
}
|
|
14772
14874
|
if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) {
|
|
@@ -15001,8 +15103,14 @@ function dirToAttr(dir) {
|
|
|
15001
15103
|
}
|
|
15002
15104
|
return attr;
|
|
15003
15105
|
}
|
|
15004
|
-
function
|
|
15005
|
-
|
|
15106
|
+
function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) {
|
|
15107
|
+
const exp = createSimpleExpression(content, isStatic, loc, constType);
|
|
15108
|
+
return exp;
|
|
15109
|
+
}
|
|
15110
|
+
function emitError(code, index, message) {
|
|
15111
|
+
currentOptions.onError(
|
|
15112
|
+
createCompilerError(code, getLoc(index, index), void 0, message)
|
|
15113
|
+
);
|
|
15006
15114
|
}
|
|
15007
15115
|
function reset() {
|
|
15008
15116
|
tokenizer.reset();
|
|
@@ -15033,6 +15141,7 @@ function baseParse(input, options) {
|
|
|
15033
15141
|
}
|
|
15034
15142
|
}
|
|
15035
15143
|
tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0;
|
|
15144
|
+
tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;
|
|
15036
15145
|
const delimiters = options == null ? void 0 : options.delimiters;
|
|
15037
15146
|
if (delimiters) {
|
|
15038
15147
|
tokenizer.delimiterOpen = toCharCodes(delimiters[0]);
|
|
@@ -17082,6 +17191,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
17082
17191
|
if (isEventHandler && isReservedProp(name)) {
|
|
17083
17192
|
hasVnodeHook = true;
|
|
17084
17193
|
}
|
|
17194
|
+
if (isEventHandler && value.type === 14) {
|
|
17195
|
+
value = value.arguments[0];
|
|
17196
|
+
}
|
|
17085
17197
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
17086
17198
|
return;
|
|
17087
17199
|
}
|
|
@@ -17534,9 +17646,7 @@ const transformOn$1 = (dir, node, context, augmentor) => {
|
|
|
17534
17646
|
if (arg.isStatic) {
|
|
17535
17647
|
let rawName = arg.content;
|
|
17536
17648
|
if (!!(process.env.NODE_ENV !== "production") && rawName.startsWith("vnode")) {
|
|
17537
|
-
context.
|
|
17538
|
-
createCompilerError(51, arg.loc)
|
|
17539
|
-
);
|
|
17649
|
+
context.onError(createCompilerError(47, arg.loc));
|
|
17540
17650
|
}
|
|
17541
17651
|
if (rawName.startsWith("vue:")) {
|
|
17542
17652
|
rawName = `vnode-${rawName.slice(4)}`;
|
|
@@ -18017,17 +18127,17 @@ function baseCompile(source, options = {}) {
|
|
|
18017
18127
|
const isModuleMode = options.mode === "module";
|
|
18018
18128
|
{
|
|
18019
18129
|
if (options.prefixIdentifiers === true) {
|
|
18020
|
-
onError(createCompilerError(47));
|
|
18021
|
-
} else if (isModuleMode) {
|
|
18022
18130
|
onError(createCompilerError(48));
|
|
18131
|
+
} else if (isModuleMode) {
|
|
18132
|
+
onError(createCompilerError(49));
|
|
18023
18133
|
}
|
|
18024
18134
|
}
|
|
18025
18135
|
const prefixIdentifiers = false;
|
|
18026
18136
|
if (options.cacheHandlers) {
|
|
18027
|
-
onError(createCompilerError(
|
|
18137
|
+
onError(createCompilerError(50));
|
|
18028
18138
|
}
|
|
18029
18139
|
if (options.scopeId && !isModuleMode) {
|
|
18030
|
-
onError(createCompilerError(
|
|
18140
|
+
onError(createCompilerError(51));
|
|
18031
18141
|
}
|
|
18032
18142
|
const ast = isString(source) ? baseParse(source, options) : source;
|
|
18033
18143
|
const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
|
|
@@ -18583,4 +18693,4 @@ var Vue$1 = Vue;
|
|
|
18583
18693
|
|
|
18584
18694
|
const { configureCompat } = Vue$1;
|
|
18585
18695
|
|
|
18586
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, EffectScope, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, Vue$1 as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useModel, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
18696
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, Vue$1 as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useModel, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|