@vue/server-renderer 3.6.0-beta.7 → 3.6.0-beta.8
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/server-renderer v3.6.0-beta.
|
|
2
|
+
* @vue/server-renderer v3.6.0-beta.8
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -17,7 +17,6 @@ function makeMap(str) {
|
|
|
17
17
|
for (const key of str.split(",")) map[key] = 1;
|
|
18
18
|
return (val) => val in map;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
20
|
//#endregion
|
|
22
21
|
//#region packages/shared/src/general.ts
|
|
23
22
|
const EMPTY_OBJ = Object.freeze({});
|
|
@@ -123,7 +122,6 @@ const getGlobalThis = () => {
|
|
|
123
122
|
function canSetValueDirectly(tagName) {
|
|
124
123
|
return tagName !== "PROGRESS" && !tagName.includes("-");
|
|
125
124
|
}
|
|
126
|
-
|
|
127
125
|
//#endregion
|
|
128
126
|
//#region packages/shared/src/normalizeProp.ts
|
|
129
127
|
function normalizeStyle(value) {
|
|
@@ -175,7 +173,6 @@ function normalizeClass(value) {
|
|
|
175
173
|
}
|
|
176
174
|
return res.trim();
|
|
177
175
|
}
|
|
178
|
-
|
|
179
176
|
//#endregion
|
|
180
177
|
//#region packages/shared/src/domTagConfig.ts
|
|
181
178
|
const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
|
|
@@ -202,7 +199,6 @@ const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
|
202
199
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
203
200
|
*/
|
|
204
201
|
const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
|
|
205
|
-
|
|
206
202
|
//#endregion
|
|
207
203
|
//#region packages/shared/src/domAttrConfig.ts
|
|
208
204
|
/**
|
|
@@ -260,7 +256,6 @@ function shouldSetAsAttr(tagName, key) {
|
|
|
260
256
|
if (key === "sandbox" && tagName === "IFRAME") return true;
|
|
261
257
|
return false;
|
|
262
258
|
}
|
|
263
|
-
|
|
264
259
|
//#endregion
|
|
265
260
|
//#region packages/shared/src/escapeHtml.ts
|
|
266
261
|
const escapeRE = /["'&<>]/;
|
|
@@ -301,7 +296,6 @@ const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
|
|
|
301
296
|
function escapeHtmlComment(src) {
|
|
302
297
|
return src.replace(commentStripRE, "");
|
|
303
298
|
}
|
|
304
|
-
|
|
305
299
|
//#endregion
|
|
306
300
|
//#region packages/shared/src/looseEqual.ts
|
|
307
301
|
function looseCompareArrays(a, b) {
|
|
@@ -337,7 +331,6 @@ function looseEqual(a, b) {
|
|
|
337
331
|
function looseIndexOf(arr, val) {
|
|
338
332
|
return arr.findIndex((item) => looseEqual(item, val));
|
|
339
333
|
}
|
|
340
|
-
|
|
341
334
|
//#endregion
|
|
342
335
|
//#region packages/shared/src/toDisplayString.ts
|
|
343
336
|
const isRef$1 = (val) => {
|
|
@@ -372,7 +365,6 @@ const stringifySymbol = (v, i = "") => {
|
|
|
372
365
|
var _description;
|
|
373
366
|
return isSymbol(v) ? `Symbol(${(_description = v.description) !== null && _description !== void 0 ? _description : i})` : v;
|
|
374
367
|
};
|
|
375
|
-
|
|
376
368
|
//#endregion
|
|
377
369
|
//#region packages/shared/src/subSequence.ts
|
|
378
370
|
function getSequence(arr) {
|
|
@@ -410,7 +402,6 @@ function getSequence(arr) {
|
|
|
410
402
|
}
|
|
411
403
|
return result;
|
|
412
404
|
}
|
|
413
|
-
|
|
414
405
|
//#endregion
|
|
415
406
|
//#region packages/shared/src/cssVars.ts
|
|
416
407
|
/**
|
|
@@ -423,7 +414,6 @@ function normalizeCssVarValue(value) {
|
|
|
423
414
|
if (typeof value !== "number" || !Number.isFinite(value)) console.warn("[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:", value);
|
|
424
415
|
return String(value);
|
|
425
416
|
}
|
|
426
|
-
|
|
427
417
|
//#endregion
|
|
428
418
|
//#region packages/reactivity/src/debug.ts
|
|
429
419
|
const triggerEventInfos = [];
|
|
@@ -459,31 +449,11 @@ function setupFlagsHandler(target) {
|
|
|
459
449
|
}
|
|
460
450
|
});
|
|
461
451
|
}
|
|
462
|
-
|
|
463
452
|
//#endregion
|
|
464
453
|
//#region packages/reactivity/src/warning.ts
|
|
465
454
|
function warn$2(msg, ...args) {
|
|
466
455
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
467
456
|
}
|
|
468
|
-
|
|
469
|
-
//#endregion
|
|
470
|
-
//#region packages/reactivity/src/system.ts
|
|
471
|
-
const ReactiveFlags = {
|
|
472
|
-
"None": 0,
|
|
473
|
-
"0": "None",
|
|
474
|
-
"Mutable": 1,
|
|
475
|
-
"1": "Mutable",
|
|
476
|
-
"Watching": 2,
|
|
477
|
-
"2": "Watching",
|
|
478
|
-
"RecursedCheck": 4,
|
|
479
|
-
"4": "RecursedCheck",
|
|
480
|
-
"Recursed": 8,
|
|
481
|
-
"8": "Recursed",
|
|
482
|
-
"Dirty": 16,
|
|
483
|
-
"16": "Dirty",
|
|
484
|
-
"Pending": 32,
|
|
485
|
-
"32": "Pending"
|
|
486
|
-
};
|
|
487
457
|
const notifyBuffer = [];
|
|
488
458
|
let batchDepth = 0;
|
|
489
459
|
let activeSub = void 0;
|
|
@@ -691,7 +661,6 @@ function isValidLink(checkLink, sub) {
|
|
|
691
661
|
}
|
|
692
662
|
return false;
|
|
693
663
|
}
|
|
694
|
-
|
|
695
664
|
//#endregion
|
|
696
665
|
//#region packages/reactivity/src/dep.ts
|
|
697
666
|
var Dep = class {
|
|
@@ -798,7 +767,6 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
798
767
|
}
|
|
799
768
|
endBatch();
|
|
800
769
|
}
|
|
801
|
-
|
|
802
770
|
//#endregion
|
|
803
771
|
//#region packages/reactivity/src/arrayInstrumentations.ts
|
|
804
772
|
/**
|
|
@@ -946,16 +914,25 @@ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
|
946
914
|
}
|
|
947
915
|
function reduce(self, method, fn, args) {
|
|
948
916
|
const arr = shallowReadArray(self);
|
|
917
|
+
const needsWrap = arr !== self && !/* @__PURE__ */ isShallow(self);
|
|
949
918
|
let wrappedFn = fn;
|
|
919
|
+
let wrapInitialAccumulator = false;
|
|
950
920
|
if (arr !== self) {
|
|
951
|
-
if (
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
921
|
+
if (needsWrap) {
|
|
922
|
+
wrapInitialAccumulator = args.length === 0;
|
|
923
|
+
wrappedFn = function(acc, item, index) {
|
|
924
|
+
if (wrapInitialAccumulator) {
|
|
925
|
+
wrapInitialAccumulator = false;
|
|
926
|
+
acc = toWrapped(self, acc);
|
|
927
|
+
}
|
|
928
|
+
return fn.call(this, acc, toWrapped(self, item), index, self);
|
|
929
|
+
};
|
|
930
|
+
} else if (fn.length > 3) wrappedFn = function(acc, item, index) {
|
|
955
931
|
return fn.call(this, acc, item, index, self);
|
|
956
932
|
};
|
|
957
933
|
}
|
|
958
|
-
|
|
934
|
+
const result = arr[method](wrappedFn, ...args);
|
|
935
|
+
return wrapInitialAccumulator ? toWrapped(self, result) : result;
|
|
959
936
|
}
|
|
960
937
|
function searchProxy(self, method, args) {
|
|
961
938
|
const arr = /* @__PURE__ */ toRaw(self);
|
|
@@ -975,7 +952,6 @@ function noTracking(self, method, args = []) {
|
|
|
975
952
|
endBatch();
|
|
976
953
|
return res;
|
|
977
954
|
}
|
|
978
|
-
|
|
979
955
|
//#endregion
|
|
980
956
|
//#region packages/reactivity/src/baseHandlers.ts
|
|
981
957
|
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
@@ -1084,7 +1060,6 @@ const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
|
|
|
1084
1060
|
const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
1085
1061
|
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);
|
|
1086
1062
|
const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
|
|
1087
|
-
|
|
1088
1063
|
//#endregion
|
|
1089
1064
|
//#region packages/reactivity/src/collectionHandlers.ts
|
|
1090
1065
|
const toShallow = (value) => value;
|
|
@@ -1169,11 +1144,13 @@ function createInstrumentations(readonly, shallow) {
|
|
|
1169
1144
|
clear: createReadonlyMethod("clear")
|
|
1170
1145
|
} : {
|
|
1171
1146
|
add(value) {
|
|
1172
|
-
if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) value = /* @__PURE__ */ toRaw(value);
|
|
1173
1147
|
const target = /* @__PURE__ */ toRaw(this);
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1148
|
+
const proto = getProto(target);
|
|
1149
|
+
const rawValue = /* @__PURE__ */ toRaw(value);
|
|
1150
|
+
const valueToAdd = !shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value) ? rawValue : value;
|
|
1151
|
+
if (!(proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue))) {
|
|
1152
|
+
target.add(valueToAdd);
|
|
1153
|
+
trigger(target, "add", valueToAdd, valueToAdd);
|
|
1177
1154
|
}
|
|
1178
1155
|
return this;
|
|
1179
1156
|
},
|
|
@@ -1244,7 +1221,6 @@ function checkIdentityKeys(target, has, key) {
|
|
|
1244
1221
|
warn$2(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);
|
|
1245
1222
|
}
|
|
1246
1223
|
}
|
|
1247
|
-
|
|
1248
1224
|
//#endregion
|
|
1249
1225
|
//#region packages/reactivity/src/reactive.ts
|
|
1250
1226
|
const reactiveMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -1508,7 +1484,6 @@ const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value)
|
|
|
1508
1484
|
* @param value - The value for which a readonly proxy shall be created.
|
|
1509
1485
|
*/
|
|
1510
1486
|
const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1511
|
-
|
|
1512
1487
|
//#endregion
|
|
1513
1488
|
//#region packages/reactivity/src/ref.ts
|
|
1514
1489
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1555,7 +1530,6 @@ const shallowUnwrapHandlers = {
|
|
|
1555
1530
|
function proxyRefs(objectWithRefs) {
|
|
1556
1531
|
return /* @__PURE__ */ isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
|
|
1557
1532
|
}
|
|
1558
|
-
|
|
1559
1533
|
//#endregion
|
|
1560
1534
|
//#region packages/reactivity/src/effect.ts
|
|
1561
1535
|
var ReactiveEffect = class {
|
|
@@ -1625,7 +1599,6 @@ function cleanup(sub) {
|
|
|
1625
1599
|
sub.cleanupsLength = 0;
|
|
1626
1600
|
}
|
|
1627
1601
|
}
|
|
1628
|
-
|
|
1629
1602
|
//#endregion
|
|
1630
1603
|
//#region packages/reactivity/src/effectScope.ts
|
|
1631
1604
|
let activeEffectScope;
|
|
@@ -1703,7 +1676,6 @@ function setCurrentScope(scope) {
|
|
|
1703
1676
|
activeEffectScope = scope;
|
|
1704
1677
|
}
|
|
1705
1678
|
}
|
|
1706
|
-
|
|
1707
1679
|
//#endregion
|
|
1708
1680
|
//#region packages/reactivity/src/computed.ts
|
|
1709
1681
|
/**
|
|
@@ -1727,7 +1699,7 @@ var ComputedRefImpl = class {
|
|
|
1727
1699
|
if (flags & 32) if (checkDirty(this.deps, this)) {
|
|
1728
1700
|
this.flags = flags | 16;
|
|
1729
1701
|
return true;
|
|
1730
|
-
} else this.flags = flags &
|
|
1702
|
+
} else this.flags = flags & -33;
|
|
1731
1703
|
return false;
|
|
1732
1704
|
}
|
|
1733
1705
|
/**
|
|
@@ -1736,7 +1708,7 @@ var ComputedRefImpl = class {
|
|
|
1736
1708
|
*/
|
|
1737
1709
|
set _dirty(v) {
|
|
1738
1710
|
if (v) this.flags |= 16;
|
|
1739
|
-
else this.flags &=
|
|
1711
|
+
else this.flags &= -49;
|
|
1740
1712
|
}
|
|
1741
1713
|
constructor(fn, setter) {
|
|
1742
1714
|
this.fn = fn;
|
|
@@ -1746,7 +1718,7 @@ var ComputedRefImpl = class {
|
|
|
1746
1718
|
this.subsTail = void 0;
|
|
1747
1719
|
this.deps = void 0;
|
|
1748
1720
|
this.depsTail = void 0;
|
|
1749
|
-
this.flags =
|
|
1721
|
+
this.flags = 17;
|
|
1750
1722
|
this.__v_isRef = true;
|
|
1751
1723
|
this["__v_isReadonly"] = !setter;
|
|
1752
1724
|
}
|
|
@@ -1757,7 +1729,7 @@ var ComputedRefImpl = class {
|
|
|
1757
1729
|
const subs = this.subs;
|
|
1758
1730
|
if (subs !== void 0) shallowPropagate(subs);
|
|
1759
1731
|
}
|
|
1760
|
-
} else if (flags & 32) this.flags = flags &
|
|
1732
|
+
} else if (flags & 32) this.flags = flags & -33;
|
|
1761
1733
|
if (activeSub !== void 0) {
|
|
1762
1734
|
onTrack(activeSub, {
|
|
1763
1735
|
target: this,
|
|
@@ -1804,7 +1776,6 @@ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
1804
1776
|
}
|
|
1805
1777
|
return cRef;
|
|
1806
1778
|
}
|
|
1807
|
-
|
|
1808
1779
|
//#endregion
|
|
1809
1780
|
//#region packages/reactivity/src/watch.ts
|
|
1810
1781
|
const INITIAL_WATCHER_VALUE = {};
|
|
@@ -1941,7 +1912,6 @@ function traverse(value, depth = Infinity, seen) {
|
|
|
1941
1912
|
}
|
|
1942
1913
|
return value;
|
|
1943
1914
|
}
|
|
1944
|
-
|
|
1945
1915
|
//#endregion
|
|
1946
1916
|
//#region packages/runtime-core/src/warning.ts
|
|
1947
1917
|
const stack = [];
|
|
@@ -1968,8 +1938,8 @@ function warn$1(msg, ...args) {
|
|
|
1968
1938
|
const trace = getComponentTrace();
|
|
1969
1939
|
if (appWarnHandler) callWithErrorHandling(appWarnHandler, instance, 11, [
|
|
1970
1940
|
msg + args.map((a) => {
|
|
1971
|
-
|
|
1972
|
-
return
|
|
1941
|
+
const toString = a.toString;
|
|
1942
|
+
return toString == null ? JSON.stringify(a) : toString.call(a);
|
|
1973
1943
|
}).join(""),
|
|
1974
1944
|
instance && instance.proxy || instance,
|
|
1975
1945
|
trace.map(({ ctx }) => `at <${formatComponentName(instance, ctx.type)}>`).join("\n"),
|
|
@@ -2051,7 +2021,6 @@ function formatProp(key, value, raw) {
|
|
|
2051
2021
|
}
|
|
2052
2022
|
}
|
|
2053
2023
|
/* v8 ignore stop */
|
|
2054
|
-
|
|
2055
2024
|
//#endregion
|
|
2056
2025
|
//#region packages/runtime-core/src/errorHandling.ts
|
|
2057
2026
|
const ErrorTypeStrings = {
|
|
@@ -2144,7 +2113,6 @@ function logError(err, type, instance, throwInDev = true, throwInProd = false) {
|
|
|
2144
2113
|
else console.error(err);
|
|
2145
2114
|
}
|
|
2146
2115
|
}
|
|
2147
|
-
|
|
2148
2116
|
//#endregion
|
|
2149
2117
|
//#region packages/runtime-core/src/scheduler.ts
|
|
2150
2118
|
const jobs = [];
|
|
@@ -2297,7 +2265,6 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
2297
2265
|
seen.set(fn, count + 1);
|
|
2298
2266
|
return false;
|
|
2299
2267
|
}
|
|
2300
|
-
|
|
2301
2268
|
//#endregion
|
|
2302
2269
|
//#region packages/runtime-core/src/hmr.ts
|
|
2303
2270
|
let isHmrUpdating = false;
|
|
@@ -2419,7 +2386,6 @@ function tryWrap(fn) {
|
|
|
2419
2386
|
}
|
|
2420
2387
|
};
|
|
2421
2388
|
}
|
|
2422
|
-
|
|
2423
2389
|
//#endregion
|
|
2424
2390
|
//#region packages/runtime-core/src/devtools.ts
|
|
2425
2391
|
let devtools;
|
|
@@ -2488,7 +2454,6 @@ function createDevtoolsPerformanceHook(hook) {
|
|
|
2488
2454
|
function devtoolsComponentEmit(component, event, params) {
|
|
2489
2455
|
emit$1("component:emit", component.appContext.app, component, event, params);
|
|
2490
2456
|
}
|
|
2491
|
-
|
|
2492
2457
|
//#endregion
|
|
2493
2458
|
//#region packages/runtime-core/src/componentRenderContext.ts
|
|
2494
2459
|
/**
|
|
@@ -2538,7 +2503,6 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
|
|
|
2538
2503
|
renderFnWithContext._d = true;
|
|
2539
2504
|
return renderFnWithContext;
|
|
2540
2505
|
}
|
|
2541
|
-
|
|
2542
2506
|
//#endregion
|
|
2543
2507
|
//#region packages/runtime-core/src/directives.ts
|
|
2544
2508
|
function validateDirectiveName(name) {
|
|
@@ -2563,7 +2527,6 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
2563
2527
|
}
|
|
2564
2528
|
}
|
|
2565
2529
|
}
|
|
2566
|
-
|
|
2567
2530
|
//#endregion
|
|
2568
2531
|
//#region packages/runtime-core/src/apiInject.ts
|
|
2569
2532
|
function provide(key, value) {
|
|
@@ -2584,7 +2547,6 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
2584
2547
|
else warn$1(`injection "${String(key)}" not found.`);
|
|
2585
2548
|
} else warn$1(`inject() can only be used inside setup() or functional components.`);
|
|
2586
2549
|
}
|
|
2587
|
-
|
|
2588
2550
|
//#endregion
|
|
2589
2551
|
//#region packages/runtime-core/src/helpers/useSsrContext.ts
|
|
2590
2552
|
const ssrContextKey = Symbol.for("v-scx");
|
|
@@ -2595,7 +2557,6 @@ const useSSRContext = () => {
|
|
|
2595
2557
|
return ctx;
|
|
2596
2558
|
}
|
|
2597
2559
|
};
|
|
2598
|
-
|
|
2599
2560
|
//#endregion
|
|
2600
2561
|
//#region packages/runtime-core/src/apiWatch.ts
|
|
2601
2562
|
function watch(source, cb, options) {
|
|
@@ -2687,12 +2648,10 @@ function createPathGetter(ctx, path) {
|
|
|
2687
2648
|
return cur;
|
|
2688
2649
|
};
|
|
2689
2650
|
}
|
|
2690
|
-
|
|
2691
2651
|
//#endregion
|
|
2692
2652
|
//#region packages/runtime-core/src/components/Teleport.ts
|
|
2693
2653
|
const TeleportEndKey = Symbol("_vte");
|
|
2694
2654
|
const isTeleport = (type) => type.__isTeleport;
|
|
2695
|
-
|
|
2696
2655
|
//#endregion
|
|
2697
2656
|
//#region packages/runtime-core/src/components/BaseTransition.ts
|
|
2698
2657
|
const leaveCbKey = Symbol("_leaveCb");
|
|
@@ -2707,7 +2666,6 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
2707
2666
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
2708
2667
|
} else vnode.transition = hooks;
|
|
2709
2668
|
}
|
|
2710
|
-
|
|
2711
2669
|
//#endregion
|
|
2712
2670
|
//#region packages/runtime-core/src/helpers/useId.ts
|
|
2713
2671
|
/**
|
|
@@ -2723,7 +2681,6 @@ function markAsyncBoundary(instance) {
|
|
|
2723
2681
|
0
|
|
2724
2682
|
];
|
|
2725
2683
|
}
|
|
2726
|
-
|
|
2727
2684
|
//#endregion
|
|
2728
2685
|
//#region packages/runtime-core/src/helpers/useTemplateRef.ts
|
|
2729
2686
|
const knownTemplateRefs = /* @__PURE__ */ new WeakSet();
|
|
@@ -2731,7 +2688,6 @@ function isTemplateRefKey(refs, key) {
|
|
|
2731
2688
|
let desc;
|
|
2732
2689
|
return !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable);
|
|
2733
2690
|
}
|
|
2734
|
-
|
|
2735
2691
|
//#endregion
|
|
2736
2692
|
//#region packages/runtime-core/src/rendererTemplateRef.ts
|
|
2737
2693
|
const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -2830,11 +2786,9 @@ function invalidatePendingSetRef(rawRef) {
|
|
|
2830
2786
|
pendingSetRefMap.delete(rawRef);
|
|
2831
2787
|
}
|
|
2832
2788
|
}
|
|
2833
|
-
|
|
2834
2789
|
//#endregion
|
|
2835
2790
|
//#region packages/runtime-core/src/apiAsyncComponent.ts
|
|
2836
2791
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
2837
|
-
|
|
2838
2792
|
//#endregion
|
|
2839
2793
|
//#region packages/runtime-core/src/components/KeepAlive.ts
|
|
2840
2794
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
@@ -2869,7 +2823,6 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
|
2869
2823
|
remove(keepAliveRoot[type], injected);
|
|
2870
2824
|
}, target);
|
|
2871
2825
|
}
|
|
2872
|
-
|
|
2873
2826
|
//#endregion
|
|
2874
2827
|
//#region packages/runtime-core/src/apiLifecycle.ts
|
|
2875
2828
|
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
@@ -2905,11 +2858,9 @@ const onRenderTracked = /* @__PURE__ */ createHook("rtc");
|
|
|
2905
2858
|
function onErrorCaptured(hook, target = currentInstance) {
|
|
2906
2859
|
injectHook("ec", hook, target);
|
|
2907
2860
|
}
|
|
2908
|
-
|
|
2909
2861
|
//#endregion
|
|
2910
2862
|
//#region packages/runtime-core/src/helpers/resolveAssets.ts
|
|
2911
2863
|
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
2912
|
-
|
|
2913
2864
|
//#endregion
|
|
2914
2865
|
//#region packages/runtime-core/src/helpers/renderSlot.ts
|
|
2915
2866
|
function ensureValidVNode$1(vnodes) {
|
|
@@ -2920,7 +2871,6 @@ function ensureValidVNode$1(vnodes) {
|
|
|
2920
2871
|
return true;
|
|
2921
2872
|
}) ? vnodes : null;
|
|
2922
2873
|
}
|
|
2923
|
-
|
|
2924
2874
|
//#endregion
|
|
2925
2875
|
//#region packages/runtime-core/src/componentPublicInstance.ts
|
|
2926
2876
|
/**
|
|
@@ -3088,7 +3038,6 @@ function exposeSetupStateOnRenderContext(instance) {
|
|
|
3088
3038
|
}
|
|
3089
3039
|
});
|
|
3090
3040
|
}
|
|
3091
|
-
|
|
3092
3041
|
//#endregion
|
|
3093
3042
|
//#region packages/runtime-core/src/apiSetupHelpers.ts
|
|
3094
3043
|
/**
|
|
@@ -3097,7 +3046,6 @@ function exposeSetupStateOnRenderContext(instance) {
|
|
|
3097
3046
|
function normalizePropsOrEmits(props) {
|
|
3098
3047
|
return isArray(props) ? props.reduce((normalized, p) => (normalized[p] = null, normalized), {}) : props;
|
|
3099
3048
|
}
|
|
3100
|
-
|
|
3101
3049
|
//#endregion
|
|
3102
3050
|
//#region packages/runtime-core/src/componentOptions.ts
|
|
3103
3051
|
function createDuplicateChecker() {
|
|
@@ -3343,7 +3291,6 @@ function mergeWatchOptions(to, from) {
|
|
|
3343
3291
|
for (const key in from) merged[key] = mergeAsArray(to[key], from[key]);
|
|
3344
3292
|
return merged;
|
|
3345
3293
|
}
|
|
3346
|
-
|
|
3347
3294
|
//#endregion
|
|
3348
3295
|
//#region packages/runtime-core/src/apiCreateApp.ts
|
|
3349
3296
|
function createAppContext() {
|
|
@@ -3475,13 +3422,11 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
|
|
|
3475
3422
|
* `app.runWithContext()`.
|
|
3476
3423
|
*/
|
|
3477
3424
|
let currentApp = null;
|
|
3478
|
-
|
|
3479
3425
|
//#endregion
|
|
3480
3426
|
//#region packages/runtime-core/src/helpers/useModel.ts
|
|
3481
3427
|
const getModelModifiers = (props, modelName, getter) => {
|
|
3482
3428
|
return getter(props, getModifierPropName(modelName)) || getter(props, `${camelize(modelName)}Modifiers`) || getter(props, `${hyphenate(modelName)}Modifiers`);
|
|
3483
3429
|
};
|
|
3484
|
-
|
|
3485
3430
|
//#endregion
|
|
3486
3431
|
//#region packages/runtime-core/src/componentEmits.ts
|
|
3487
3432
|
function emit(instance, event, ...rawArgs) {
|
|
@@ -3571,7 +3516,6 @@ function isEmitListener(options, key) {
|
|
|
3571
3516
|
key = key.slice(2).replace(/Once$/, "");
|
|
3572
3517
|
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
3573
3518
|
}
|
|
3574
|
-
|
|
3575
3519
|
//#endregion
|
|
3576
3520
|
//#region packages/runtime-core/src/componentRenderUtils.ts
|
|
3577
3521
|
/**
|
|
@@ -3763,7 +3707,6 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
3763
3707
|
} else break;
|
|
3764
3708
|
}
|
|
3765
3709
|
}
|
|
3766
|
-
|
|
3767
3710
|
//#endregion
|
|
3768
3711
|
//#region packages/runtime-core/src/internalObject.ts
|
|
3769
3712
|
/**
|
|
@@ -3775,7 +3718,6 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
3775
3718
|
const internalObjectProto = {};
|
|
3776
3719
|
const createInternalObject = () => Object.create(internalObjectProto);
|
|
3777
3720
|
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
3778
|
-
|
|
3779
3721
|
//#endregion
|
|
3780
3722
|
//#region packages/runtime-core/src/componentProps.ts
|
|
3781
3723
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
@@ -4071,7 +4013,6 @@ function isExplicable(type) {
|
|
|
4071
4013
|
function isBoolean(...args) {
|
|
4072
4014
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
4073
4015
|
}
|
|
4074
|
-
|
|
4075
4016
|
//#endregion
|
|
4076
4017
|
//#region packages/runtime-core/src/componentSlots.ts
|
|
4077
4018
|
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
@@ -4140,7 +4081,6 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
4140
4081
|
for (const key in slots) if (!isInternalKey(key) && deletionComparisonTarget[key] == null) delete slots[key];
|
|
4141
4082
|
}
|
|
4142
4083
|
};
|
|
4143
|
-
|
|
4144
4084
|
//#endregion
|
|
4145
4085
|
//#region packages/runtime-core/src/profiling.ts
|
|
4146
4086
|
let supported;
|
|
@@ -4179,7 +4119,6 @@ function isSupported() {
|
|
|
4179
4119
|
} else supported = false;
|
|
4180
4120
|
return supported;
|
|
4181
4121
|
}
|
|
4182
|
-
|
|
4183
4122
|
//#endregion
|
|
4184
4123
|
//#region packages/runtime-core/src/renderer.ts
|
|
4185
4124
|
const queuePostRenderEffect = queueEffectWithSuspense;
|
|
@@ -4556,7 +4495,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4556
4495
|
if (isAsyncWrapperVNode && type.__asyncHydrate) type.__asyncHydrate(el, instance, hydrateSubTree);
|
|
4557
4496
|
else hydrateSubTree();
|
|
4558
4497
|
} else {
|
|
4559
|
-
if (root.ce && root.ce._hasShadowRoot()) root.ce._injectChildStyle(type);
|
|
4498
|
+
if (root.ce && root.ce._hasShadowRoot()) root.ce._injectChildStyle(type, instance.parent ? instance.parent.type : void 0);
|
|
4560
4499
|
startMeasure(instance, `render`);
|
|
4561
4500
|
const subTree = instance.subTree = renderComponentRoot$1(instance);
|
|
4562
4501
|
endMeasure(instance, `render`);
|
|
@@ -5070,7 +5009,6 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
|
5070
5009
|
if (instance) return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
5071
5010
|
return null;
|
|
5072
5011
|
}
|
|
5073
|
-
|
|
5074
5012
|
//#endregion
|
|
5075
5013
|
//#region packages/runtime-core/src/components/Suspense.ts
|
|
5076
5014
|
const isSuspense = (type) => type.__isSuspense;
|
|
@@ -5079,7 +5017,6 @@ function queueEffectWithSuspense(fn, id, suspense) {
|
|
|
5079
5017
|
else suspense.effects.push(fn);
|
|
5080
5018
|
else queuePostFlushCb(fn, id);
|
|
5081
5019
|
}
|
|
5082
|
-
|
|
5083
5020
|
//#endregion
|
|
5084
5021
|
//#region packages/runtime-core/src/vnode.ts
|
|
5085
5022
|
const Fragment = Symbol.for("v-fgt");
|
|
@@ -5088,7 +5025,6 @@ const Comment = Symbol.for("v-cmt");
|
|
|
5088
5025
|
const Static = Symbol.for("v-stc");
|
|
5089
5026
|
const VaporSlot = Symbol.for("v-vps");
|
|
5090
5027
|
const blockStack = [];
|
|
5091
|
-
let currentBlock = null;
|
|
5092
5028
|
let isBlockTreeEnabled = 1;
|
|
5093
5029
|
/**
|
|
5094
5030
|
* Block tracking sometimes needs to be disabled, for example during the
|
|
@@ -5108,7 +5044,6 @@ let isBlockTreeEnabled = 1;
|
|
|
5108
5044
|
*/
|
|
5109
5045
|
function setBlockTracking(value, inVOnce = false) {
|
|
5110
5046
|
isBlockTreeEnabled += value;
|
|
5111
|
-
if (value < 0 && currentBlock && inVOnce) currentBlock.hasOnce = true;
|
|
5112
5047
|
}
|
|
5113
5048
|
function isVNode$2(value) {
|
|
5114
5049
|
return value ? value.__v_isVNode === true : false;
|
|
@@ -5124,9 +5059,8 @@ function isSameVNodeType(n1, n2) {
|
|
|
5124
5059
|
}
|
|
5125
5060
|
return n1.type === n2.type && n1.key === n2.key;
|
|
5126
5061
|
}
|
|
5127
|
-
let vnodeArgsTransformer;
|
|
5128
5062
|
const createVNodeWithArgsTransform = (...args) => {
|
|
5129
|
-
return _createVNode(...
|
|
5063
|
+
return _createVNode(...args);
|
|
5130
5064
|
};
|
|
5131
5065
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
5132
5066
|
const normalizeRef = ({ ref, ref_key, ref_for }, i = currentRenderingInstance) => {
|
|
@@ -5173,7 +5107,6 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
|
|
|
5173
5107
|
if (shapeFlag & 128) type.normalize(vnode);
|
|
5174
5108
|
} else if (children) vnode.shapeFlag |= isString(children) ? 8 : 16;
|
|
5175
5109
|
if (vnode.key !== vnode.key) warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
5176
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);
|
|
5177
5110
|
return vnode;
|
|
5178
5111
|
}
|
|
5179
5112
|
const createVNode = createVNodeWithArgsTransform;
|
|
@@ -5185,8 +5118,6 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
5185
5118
|
if (isVNode$2(type)) {
|
|
5186
5119
|
const cloned = cloneVNode(type, props, true);
|
|
5187
5120
|
if (children) normalizeChildren(cloned, children);
|
|
5188
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
5189
|
-
else currentBlock.push(cloned);
|
|
5190
5121
|
cloned.patchFlag = -2;
|
|
5191
5122
|
return cloned;
|
|
5192
5123
|
}
|
|
@@ -5329,7 +5260,6 @@ function mergeProps(...args) {
|
|
|
5329
5260
|
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
5330
5261
|
callWithAsyncErrorHandling(hook, instance, 7, [vnode, prevVNode]);
|
|
5331
5262
|
}
|
|
5332
|
-
|
|
5333
5263
|
//#endregion
|
|
5334
5264
|
//#region packages/runtime-core/src/componentCurrentInstance.ts
|
|
5335
5265
|
/**
|
|
@@ -5367,7 +5297,6 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
5367
5297
|
simpleSetCurrentInstance(instance);
|
|
5368
5298
|
}
|
|
5369
5299
|
};
|
|
5370
|
-
|
|
5371
5300
|
//#endregion
|
|
5372
5301
|
//#region packages/runtime-core/src/component.ts
|
|
5373
5302
|
const emptyAppContext = /* @__PURE__ */ createAppContext();
|
|
@@ -5520,29 +5449,10 @@ function handleSetupResult(instance, setupResult, isSSR) {
|
|
|
5520
5449
|
} else if (setupResult !== void 0) warn$1(`setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`);
|
|
5521
5450
|
finishComponentSetup(instance, isSSR);
|
|
5522
5451
|
}
|
|
5523
|
-
|
|
5524
|
-
let installWithProxy;
|
|
5525
|
-
const isRuntimeOnly = () => !compile;
|
|
5452
|
+
const isRuntimeOnly = () => true;
|
|
5526
5453
|
function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
5527
5454
|
const Component = instance.type;
|
|
5528
|
-
if (!instance.render)
|
|
5529
|
-
if (!isSSR && compile && !Component.render) {
|
|
5530
|
-
const template = Component.template || resolveMergedOptions(instance).template;
|
|
5531
|
-
if (template) {
|
|
5532
|
-
startMeasure(instance, `compile`);
|
|
5533
|
-
const { isCustomElement, compilerOptions } = instance.appContext.config;
|
|
5534
|
-
const { delimiters, compilerOptions: componentCompilerOptions } = Component;
|
|
5535
|
-
const finalCompilerOptions = extend(extend({
|
|
5536
|
-
isCustomElement,
|
|
5537
|
-
delimiters
|
|
5538
|
-
}, compilerOptions), componentCompilerOptions);
|
|
5539
|
-
Component.render = compile(template, finalCompilerOptions);
|
|
5540
|
-
endMeasure(instance, `compile`);
|
|
5541
|
-
}
|
|
5542
|
-
}
|
|
5543
|
-
instance.render = Component.render || NOOP;
|
|
5544
|
-
if (installWithProxy) installWithProxy(instance);
|
|
5545
|
-
}
|
|
5455
|
+
if (!instance.render) instance.render = Component.render || NOOP;
|
|
5546
5456
|
{
|
|
5547
5457
|
const prevInstance = setCurrentInstance(instance);
|
|
5548
5458
|
const prevSub = setActiveSub();
|
|
@@ -5553,7 +5463,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
5553
5463
|
setCurrentInstance(...prevInstance);
|
|
5554
5464
|
}
|
|
5555
5465
|
}
|
|
5556
|
-
if (!Component.render && instance.render === NOOP && !isSSR) if (
|
|
5466
|
+
if (!Component.render && instance.render === NOOP && !isSSR) if (Component.template)
|
|
5557
5467
|
/* v8 ignore start */
|
|
5558
5468
|
warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Use \"vue.esm-browser.js\" instead.");
|
|
5559
5469
|
else warn$1(`Component is missing template or render function: `, Component);
|
|
@@ -5653,18 +5563,20 @@ function formatComponentName(instance, Component, isRoot = false) {
|
|
|
5653
5563
|
function isClassComponent(value) {
|
|
5654
5564
|
return isFunction(value) && "__vccOpts" in value;
|
|
5655
5565
|
}
|
|
5656
|
-
|
|
5657
5566
|
//#endregion
|
|
5658
5567
|
//#region packages/runtime-core/src/apiComputed.ts
|
|
5659
5568
|
const computed = (getterOrOptions, debugOptions) => {
|
|
5660
5569
|
return /* @__PURE__ */ computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
5661
5570
|
};
|
|
5662
|
-
|
|
5663
5571
|
//#endregion
|
|
5664
5572
|
//#region packages/runtime-core/src/index.ts
|
|
5665
|
-
const version = "3.6.0-beta.
|
|
5573
|
+
const version = "3.6.0-beta.8";
|
|
5666
5574
|
const warn = warn$1;
|
|
5667
|
-
|
|
5575
|
+
/**
|
|
5576
|
+
* SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
|
|
5577
|
+
* @internal
|
|
5578
|
+
*/
|
|
5579
|
+
const ssrUtils = {
|
|
5668
5580
|
createComponentInstance: createComponentInstance$1,
|
|
5669
5581
|
setupComponent: setupComponent$1,
|
|
5670
5582
|
renderComponentRoot: renderComponentRoot$1,
|
|
@@ -5676,12 +5588,6 @@ const _ssrUtils = {
|
|
|
5676
5588
|
pushWarningContext: pushWarningContext$1,
|
|
5677
5589
|
popWarningContext: popWarningContext$1
|
|
5678
5590
|
};
|
|
5679
|
-
/**
|
|
5680
|
-
* SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
|
|
5681
|
-
* @internal
|
|
5682
|
-
*/
|
|
5683
|
-
const ssrUtils = _ssrUtils;
|
|
5684
|
-
|
|
5685
5591
|
//#endregion
|
|
5686
5592
|
//#region packages/runtime-dom/src/nodeOps.ts
|
|
5687
5593
|
let policy = void 0;
|
|
@@ -5742,11 +5648,9 @@ const nodeOps = {
|
|
|
5742
5648
|
return [before ? before.nextSibling : parent.firstChild, anchor ? anchor.previousSibling : parent.lastChild];
|
|
5743
5649
|
}
|
|
5744
5650
|
};
|
|
5745
|
-
|
|
5746
5651
|
//#endregion
|
|
5747
5652
|
//#region packages/runtime-dom/src/components/Transition.ts
|
|
5748
5653
|
const vtcKey = Symbol("_vtc");
|
|
5749
|
-
|
|
5750
5654
|
//#endregion
|
|
5751
5655
|
//#region packages/runtime-dom/src/modules/class.ts
|
|
5752
5656
|
function patchClass(el, value, isSVG) {
|
|
@@ -5756,7 +5660,6 @@ function patchClass(el, value, isSVG) {
|
|
|
5756
5660
|
else if (isSVG) el.setAttribute("class", value);
|
|
5757
5661
|
else el.className = value;
|
|
5758
5662
|
}
|
|
5759
|
-
|
|
5760
5663
|
//#endregion
|
|
5761
5664
|
//#region packages/runtime-dom/src/directives/vShow.ts
|
|
5762
5665
|
const vShowOriginalDisplay = Symbol("_vod");
|
|
@@ -5795,11 +5698,9 @@ function initVShowForSSR() {
|
|
|
5795
5698
|
if (!value) return { style: { display: "none" } };
|
|
5796
5699
|
};
|
|
5797
5700
|
}
|
|
5798
|
-
|
|
5799
5701
|
//#endregion
|
|
5800
5702
|
//#region packages/runtime-dom/src/helpers/useCssVars.ts
|
|
5801
5703
|
const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT");
|
|
5802
|
-
|
|
5803
5704
|
//#endregion
|
|
5804
5705
|
//#region packages/runtime-dom/src/modules/style.ts
|
|
5805
5706
|
const displayRE = /(?:^|;)\s*display\s*:/;
|
|
@@ -5864,7 +5765,6 @@ function autoPrefix(style, rawName) {
|
|
|
5864
5765
|
}
|
|
5865
5766
|
return rawName;
|
|
5866
5767
|
}
|
|
5867
|
-
|
|
5868
5768
|
//#endregion
|
|
5869
5769
|
//#region packages/runtime-dom/src/modules/attrs.ts
|
|
5870
5770
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
@@ -5874,7 +5774,6 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
|
|
|
5874
5774
|
else if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);
|
|
5875
5775
|
else el.setAttribute(key, isBoolean ? "" : isSymbol(value) ? String(value) : value);
|
|
5876
5776
|
}
|
|
5877
|
-
|
|
5878
5777
|
//#endregion
|
|
5879
5778
|
//#region packages/runtime-dom/src/modules/props.ts
|
|
5880
5779
|
function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
@@ -5910,7 +5809,6 @@ function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
|
5910
5809
|
}
|
|
5911
5810
|
needRemove && el.removeAttribute(attrName || key);
|
|
5912
5811
|
}
|
|
5913
|
-
|
|
5914
5812
|
//#endregion
|
|
5915
5813
|
//#region packages/runtime-dom/src/modules/events.ts
|
|
5916
5814
|
function addEventListener(el, event, handler, options) {
|
|
@@ -5974,7 +5872,6 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
5974
5872
|
return value.map((fn) => (e) => !e._stopped && fn && fn(e));
|
|
5975
5873
|
} else return value;
|
|
5976
5874
|
}
|
|
5977
|
-
|
|
5978
5875
|
//#endregion
|
|
5979
5876
|
//#region packages/runtime-dom/src/patchProp.ts
|
|
5980
5877
|
const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
|
|
@@ -5986,7 +5883,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
5986
5883
|
} else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
|
|
5987
5884
|
patchDOMProp(el, key, nextValue, parentComponent);
|
|
5988
5885
|
if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
|
|
5989
|
-
} else if (el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))) patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
5886
|
+
} else if (el._isVueCE && (shouldSetAsPropForVueCE(el, key) || el._def.__asyncLoader && (/[A-Z]/.test(key) || !isString(nextValue)))) patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
5990
5887
|
else {
|
|
5991
5888
|
if (key === "true-value") el._trueValue = nextValue;
|
|
5992
5889
|
else if (key === "false-value") el._falseValue = nextValue;
|
|
@@ -6003,7 +5900,12 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
6003
5900
|
if (isNativeOn(key) && isString(value)) return false;
|
|
6004
5901
|
return key in el;
|
|
6005
5902
|
}
|
|
6006
|
-
|
|
5903
|
+
function shouldSetAsPropForVueCE(el, key) {
|
|
5904
|
+
const props = el._def.props;
|
|
5905
|
+
if (!props) return false;
|
|
5906
|
+
const camelKey = camelize(key);
|
|
5907
|
+
return Array.isArray(props) ? props.some((prop) => camelize(prop) === camelKey) : Object.keys(props).some((prop) => camelize(prop) === camelKey);
|
|
5908
|
+
}
|
|
6007
5909
|
//#endregion
|
|
6008
5910
|
//#region packages/runtime-dom/src/directives/vModel.ts
|
|
6009
5911
|
const getModelAssigner = (vnode) => {
|
|
@@ -6253,7 +6155,6 @@ function initVModelForSSR() {
|
|
|
6253
6155
|
if (modelToUse.getSSRProps) return modelToUse.getSSRProps(binding, vnode);
|
|
6254
6156
|
};
|
|
6255
6157
|
}
|
|
6256
|
-
|
|
6257
6158
|
//#endregion
|
|
6258
6159
|
//#region packages/runtime-dom/src/index.ts
|
|
6259
6160
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -6338,7 +6239,6 @@ const initDirectivesForSSR = () => {
|
|
|
6338
6239
|
initVShowForSSR();
|
|
6339
6240
|
}
|
|
6340
6241
|
};
|
|
6341
|
-
|
|
6342
6242
|
//#endregion
|
|
6343
6243
|
//#region packages/server-renderer/src/helpers/ssrRenderAttrs.ts
|
|
6344
6244
|
const shouldIgnoreProp = /* @__PURE__ */ makeMap(`,key,ref,innerHTML,textContent,ref_key,ref_for`);
|
|
@@ -6387,13 +6287,11 @@ function ssrResetCssVars(raw) {
|
|
|
6387
6287
|
}
|
|
6388
6288
|
return raw;
|
|
6389
6289
|
}
|
|
6390
|
-
|
|
6391
6290
|
//#endregion
|
|
6392
6291
|
//#region packages/server-renderer/src/helpers/ssrRenderComponent.ts
|
|
6393
6292
|
function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) {
|
|
6394
6293
|
return renderComponentVNode(createVNode(comp, props, children), parentComponent, slotScopeId);
|
|
6395
6294
|
}
|
|
6396
|
-
|
|
6397
6295
|
//#endregion
|
|
6398
6296
|
//#region packages/server-renderer/src/helpers/ssrRenderSlot.ts
|
|
6399
6297
|
const { ensureValidVNode } = ssrUtils;
|
|
@@ -6445,7 +6343,6 @@ function isComment(item) {
|
|
|
6445
6343
|
if (item.length <= 8) return true;
|
|
6446
6344
|
return !item.replace(commentRE, "").trim();
|
|
6447
6345
|
}
|
|
6448
|
-
|
|
6449
6346
|
//#endregion
|
|
6450
6347
|
//#region packages/server-renderer/src/helpers/ssrRenderTeleport.ts
|
|
6451
6348
|
function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) {
|
|
@@ -6468,20 +6365,18 @@ function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parent
|
|
|
6468
6365
|
targetBuffer.splice(bufferIndex, 0, teleportContent);
|
|
6469
6366
|
parentPush("<!--teleport end-->");
|
|
6470
6367
|
}
|
|
6471
|
-
|
|
6472
6368
|
//#endregion
|
|
6473
6369
|
//#region packages/server-renderer/src/helpers/ssrInterpolate.ts
|
|
6474
6370
|
function ssrInterpolate(value) {
|
|
6475
6371
|
return escapeHtml(toDisplayString(value));
|
|
6476
6372
|
}
|
|
6477
|
-
|
|
6478
6373
|
//#endregion
|
|
6479
6374
|
//#region packages/server-renderer/src/helpers/ssrRenderList.ts
|
|
6480
6375
|
function ssrRenderList(source, renderItem) {
|
|
6481
6376
|
if (isArray(source) || isString(source)) for (let i = 0, l = source.length; i < l; i++) renderItem(source[i], i);
|
|
6482
6377
|
else if (typeof source === "number") {
|
|
6483
|
-
if (!Number.isInteger(source)) {
|
|
6484
|
-
warn(`The v-for range
|
|
6378
|
+
if (!Number.isInteger(source) || source < 0) {
|
|
6379
|
+
warn(`The v-for range expects a positive integer value but got ${source}.`);
|
|
6485
6380
|
return;
|
|
6486
6381
|
}
|
|
6487
6382
|
for (let i = 0; i < source; i++) renderItem(i + 1, i);
|
|
@@ -6496,14 +6391,12 @@ function ssrRenderList(source, renderItem) {
|
|
|
6496
6391
|
}
|
|
6497
6392
|
}
|
|
6498
6393
|
}
|
|
6499
|
-
|
|
6500
6394
|
//#endregion
|
|
6501
6395
|
//#region packages/server-renderer/src/helpers/ssrRenderSuspense.ts
|
|
6502
6396
|
async function ssrRenderSuspense(push, { default: renderContent }) {
|
|
6503
6397
|
if (renderContent) renderContent();
|
|
6504
6398
|
else push(`<!---->`);
|
|
6505
6399
|
}
|
|
6506
|
-
|
|
6507
6400
|
//#endregion
|
|
6508
6401
|
//#region packages/server-renderer/src/helpers/ssrGetDirectiveProps.ts
|
|
6509
6402
|
function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) {
|
|
@@ -6517,7 +6410,6 @@ function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) {
|
|
|
6517
6410
|
}, null) || {};
|
|
6518
6411
|
return {};
|
|
6519
6412
|
}
|
|
6520
|
-
|
|
6521
6413
|
//#endregion
|
|
6522
6414
|
//#region packages/server-renderer/src/helpers/ssrVModelHelpers.ts
|
|
6523
6415
|
const ssrLooseEqual = looseEqual;
|
|
@@ -6539,13 +6431,11 @@ function ssrGetDynamicModelProps(existingProps = {}, model) {
|
|
|
6539
6431
|
default: return { value: model };
|
|
6540
6432
|
}
|
|
6541
6433
|
}
|
|
6542
|
-
|
|
6543
6434
|
//#endregion
|
|
6544
6435
|
//#region packages/server-renderer/src/helpers/ssrCompile.ts
|
|
6545
6436
|
function ssrCompile(template, instance) {
|
|
6546
6437
|
throw new Error("On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.");
|
|
6547
6438
|
}
|
|
6548
|
-
|
|
6549
6439
|
//#endregion
|
|
6550
6440
|
//#region packages/server-renderer/src/render.ts
|
|
6551
6441
|
const { createComponentInstance, setCurrentRenderingInstance, setupComponent, renderComponentRoot, normalizeVNode, pushWarningContext, popWarningContext } = ssrUtils;
|
|
@@ -6723,7 +6613,6 @@ function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) {
|
|
|
6723
6613
|
renderVNodeChildren(push, vnode.children, parentComponent, slotScopeId);
|
|
6724
6614
|
}, target, disabled || disabled === "", parentComponent);
|
|
6725
6615
|
}
|
|
6726
|
-
|
|
6727
6616
|
//#endregion
|
|
6728
6617
|
//#region packages/server-renderer/src/renderToString.ts
|
|
6729
6618
|
const { isVNode: isVNode$1 } = ssrUtils;
|
|
@@ -6777,7 +6666,6 @@ async function resolveTeleports(context) {
|
|
|
6777
6666
|
for (const key in context.__teleportBuffers) context.teleports[key] = await unrollBuffer$1(await Promise.all([context.__teleportBuffers[key]]));
|
|
6778
6667
|
}
|
|
6779
6668
|
}
|
|
6780
|
-
|
|
6781
6669
|
//#endregion
|
|
6782
6670
|
//#region packages/server-renderer/src/renderToStream.ts
|
|
6783
6671
|
const { isVNode } = ssrUtils;
|
|
@@ -6871,10 +6759,8 @@ function pipeToWebWritable(input, context = {}, writable) {
|
|
|
6871
6759
|
}
|
|
6872
6760
|
});
|
|
6873
6761
|
}
|
|
6874
|
-
|
|
6875
6762
|
//#endregion
|
|
6876
6763
|
//#region packages/server-renderer/src/index.ts
|
|
6877
6764
|
initDirectivesForSSR();
|
|
6878
|
-
|
|
6879
6765
|
//#endregion
|
|
6880
|
-
export { pipeToNodeWritable, pipeToWebWritable, renderToNodeStream, renderToSimpleStream, renderToStream, renderToString, renderToWebStream, ssrGetDirectiveProps, ssrGetDynamicModelProps, includeBooleanAttr as ssrIncludeBooleanAttr, ssrInterpolate, ssrLooseContain, ssrLooseEqual, ssrRenderAttr, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrRenderDynamicAttr, ssrRenderDynamicModel, ssrRenderList, ssrRenderSlot, ssrRenderSlotInner, ssrRenderStyle, ssrRenderSuspense, ssrRenderTeleport, renderVNode as ssrRenderVNode };
|
|
6766
|
+
export { pipeToNodeWritable, pipeToWebWritable, renderToNodeStream, renderToSimpleStream, renderToStream, renderToString, renderToWebStream, ssrGetDirectiveProps, ssrGetDynamicModelProps, includeBooleanAttr as ssrIncludeBooleanAttr, ssrInterpolate, ssrLooseContain, ssrLooseEqual, ssrRenderAttr, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrRenderDynamicAttr, ssrRenderDynamicModel, ssrRenderList, ssrRenderSlot, ssrRenderSlotInner, ssrRenderStyle, ssrRenderSuspense, ssrRenderTeleport, renderVNode as ssrRenderVNode };
|