@vue/compat 3.6.0-rc.12 → 3.6.0-rc.14
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-compat.d.ts +29 -1
- package/dist/vue.cjs.js +127 -50
- package/dist/vue.cjs.prod.js +128 -51
- package/dist/vue.esm-browser.js +121 -53
- package/dist/vue.esm-browser.prod.js +7 -7
- package/dist/vue.esm-bundler.js +131 -61
- package/dist/vue.global.js +120 -52
- package/dist/vue.global.prod.js +7 -7
- package/dist/vue.runtime.esm-browser.js +121 -53
- package/dist/vue.runtime.esm-browser.prod.js +7 -7
- package/dist/vue.runtime.esm-bundler.js +131 -61
- package/dist/vue.runtime.global.js +120 -52
- package/dist/vue.runtime.global.prod.js +7 -7
- package/package.json +2 -2
package/dist/vue-compat.d.ts
CHANGED
|
@@ -27,6 +27,16 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
|
|
|
27
27
|
type LooseRequired<T> = { [P in keyof (T & Required<T>)]: T[P]; };
|
|
28
28
|
type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
|
|
29
29
|
//#endregion
|
|
30
|
+
//#region packages/shared/src/vaporFlags.d.ts
|
|
31
|
+
/**
|
|
32
|
+
* `isSingleRoot` of a component creation call for the single root of a slot
|
|
33
|
+
* body (`true` marks the single root of a component template). See
|
|
34
|
+
* resolveFallthroughOwner in runtime-vapor.
|
|
35
|
+
*/
|
|
36
|
+
declare enum VaporSingleRoot {
|
|
37
|
+
SLOT = 2
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
30
40
|
//#region packages/reactivity/src/constants.d.ts
|
|
31
41
|
declare enum TrackOpTypes {
|
|
32
42
|
GET = "get",
|
|
@@ -657,6 +667,12 @@ interface TransitionHooks<HostElement = RendererElement> {
|
|
|
657
667
|
delayLeave?(el: HostElement, earlyRemove: () => void, delayedLeave: () => void): void;
|
|
658
668
|
delayedLeave?(): void;
|
|
659
669
|
}
|
|
670
|
+
interface TransitionState {
|
|
671
|
+
isMounted: boolean;
|
|
672
|
+
isLeaving: boolean;
|
|
673
|
+
isUnmounting: boolean;
|
|
674
|
+
leavingNodes: Map<any, Record<string, any>>;
|
|
675
|
+
}
|
|
660
676
|
//#endregion
|
|
661
677
|
//#region packages/runtime-core/src/renderer.d.ts
|
|
662
678
|
type ElementNamespace = "svg" | "mathml" | undefined;
|
|
@@ -1055,6 +1071,11 @@ interface VaporInVdomInterface {
|
|
|
1055
1071
|
*/
|
|
1056
1072
|
hasTransitionChild(vnode: VNode): boolean;
|
|
1057
1073
|
getTransitionElement(vnode: VNode): RendererElement | undefined;
|
|
1074
|
+
/**
|
|
1075
|
+
* Re-resolves the hooks of the rows a mounted vapor slot renders under a
|
|
1076
|
+
* TransitionGroup (`vnode.vs.group`) and hands over their elements.
|
|
1077
|
+
*/
|
|
1078
|
+
forEachGroupChild(vnode: VNode, cb: (el: RendererElement) => void): void;
|
|
1058
1079
|
applyCssVars(vnode: VNode, vars: Record<string, string>): void;
|
|
1059
1080
|
/**
|
|
1060
1081
|
* Hands the fallback of a vdom outlet over to the vapor slot its content
|
|
@@ -1083,7 +1104,7 @@ interface VdomSlotOptions {
|
|
|
1083
1104
|
interface VdomInVaporInterface {
|
|
1084
1105
|
mount: (component: ConcreteComponent, parentComponent: any, props?: any, slots?: any, once?: boolean, inputScope?: EffectScope) => any;
|
|
1085
1106
|
slot: (slots: any, name: string | (() => string), props: Record<string, any>, parentComponent: any, options?: VdomSlotOptions) => any;
|
|
1086
|
-
mountVNode: (vnode: VNode, parentComponent: any, isSingleRoot?: boolean, rawProps?: any, once?: boolean) => any;
|
|
1107
|
+
mountVNode: (vnode: VNode, parentComponent: any, isSingleRoot?: boolean | VaporSingleRoot, rawProps?: any, once?: boolean) => any;
|
|
1087
1108
|
}
|
|
1088
1109
|
/**
|
|
1089
1110
|
* Minimal app context shared between vdom and vapor
|
|
@@ -1337,8 +1358,15 @@ interface VNode<HostNode = RendererNode, HostElement = RendererElement, ExtraPro
|
|
|
1337
1358
|
*/
|
|
1338
1359
|
vs?: {
|
|
1339
1360
|
slot: (props: any) => any;
|
|
1361
|
+
name: string;
|
|
1340
1362
|
outlets?: readonly VdomSlotOutlet[];
|
|
1341
1363
|
props?: Data;
|
|
1364
|
+
attrs?: Data;
|
|
1365
|
+
group?: {
|
|
1366
|
+
props: BaseTransitionProps<any>;
|
|
1367
|
+
state: TransitionState;
|
|
1368
|
+
instance: GenericComponentInstance;
|
|
1369
|
+
};
|
|
1342
1370
|
state?: unknown;
|
|
1343
1371
|
ref?: ShallowRef<any>;
|
|
1344
1372
|
scope?: EffectScope;
|
package/dist/vue.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-rc.
|
|
2
|
+
* @vue/compat v3.6.0-rc.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -561,6 +561,21 @@ function normalizeCssVarValue(value) {
|
|
|
561
561
|
return String(value);
|
|
562
562
|
}
|
|
563
563
|
//#endregion
|
|
564
|
+
//#region packages/shared/src/vaporFlags.ts
|
|
565
|
+
/**
|
|
566
|
+
* The data of the comment a vapor server render opens the branch of a `v-if`
|
|
567
|
+
* chain with, `<!--[1-->`: the digits are the branch's position in the chain,
|
|
568
|
+
* and `<!--]-->` closes it like a fragment.
|
|
569
|
+
*/
|
|
570
|
+
function isVaporBranchStart(data) {
|
|
571
|
+
if (data.length < 2 || data.charCodeAt(0) !== 91) return false;
|
|
572
|
+
for (let i = 1; i < data.length; i++) {
|
|
573
|
+
const c = data.charCodeAt(i);
|
|
574
|
+
if (c < 48 || c > 57) return false;
|
|
575
|
+
}
|
|
576
|
+
return true;
|
|
577
|
+
}
|
|
578
|
+
//#endregion
|
|
564
579
|
//#region packages/reactivity/src/debug.ts
|
|
565
580
|
const triggerEventInfos = [];
|
|
566
581
|
function onTrack(sub, debugInfo) {
|
|
@@ -3717,6 +3732,16 @@ function createPathGetter(ctx, path) {
|
|
|
3717
3732
|
};
|
|
3718
3733
|
}
|
|
3719
3734
|
//#endregion
|
|
3735
|
+
//#region packages/runtime-core/src/vaporInteropState.ts
|
|
3736
|
+
/**
|
|
3737
|
+
* Set by `vaporInteropPlugin`. Stays false in apps that never import the
|
|
3738
|
+
* plugin, so bundlers drop the vapor-in-vdom branches of the renderer.
|
|
3739
|
+
*/
|
|
3740
|
+
let isVaporInteropEnabled = false;
|
|
3741
|
+
function setVaporInteropEnabled() {
|
|
3742
|
+
isVaporInteropEnabled = true;
|
|
3743
|
+
}
|
|
3744
|
+
//#endregion
|
|
3720
3745
|
//#region packages/runtime-core/src/components/Teleport.ts
|
|
3721
3746
|
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
3722
3747
|
const TeleportEndKey = Symbol("_vte");
|
|
@@ -3976,13 +4001,18 @@ const BaseTransitionPropsValidators = {
|
|
|
3976
4001
|
onAfterAppear: TransitionHookValidator,
|
|
3977
4002
|
onAppearCancelled: TransitionHookValidator
|
|
3978
4003
|
};
|
|
4004
|
+
let isTransitionEnabled = false;
|
|
4005
|
+
function withTransitionEnabled(value) {
|
|
4006
|
+
isTransitionEnabled = true;
|
|
4007
|
+
return value;
|
|
4008
|
+
}
|
|
3979
4009
|
function isEmptyTransitionChild(vnode, instance) {
|
|
3980
4010
|
if (vnode.type === Comment) return true;
|
|
3981
4011
|
if (vnode.type === Fragment) {
|
|
3982
4012
|
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3983
4013
|
return !child || isEmptyTransitionChild(child, instance);
|
|
3984
4014
|
}
|
|
3985
|
-
if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
4015
|
+
if (isVaporInteropEnabled && (vnode.type === VaporSlot || isVaporComponent(vnode.type))) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3986
4016
|
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
3987
4017
|
}
|
|
3988
4018
|
const BaseTransitionImpl = {
|
|
@@ -3999,7 +4029,7 @@ const BaseTransitionImpl = {
|
|
|
3999
4029
|
const { mode } = rawProps;
|
|
4000
4030
|
checkTransitionMode(mode);
|
|
4001
4031
|
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
4002
|
-
if (!(instance.
|
|
4032
|
+
if (!(instance.effect.flags & 1024)) instance.update();
|
|
4003
4033
|
}) : NOOP);
|
|
4004
4034
|
};
|
|
4005
4035
|
}
|
|
@@ -4020,7 +4050,7 @@ function findNonCommentChild(children) {
|
|
|
4020
4050
|
}
|
|
4021
4051
|
return child;
|
|
4022
4052
|
}
|
|
4023
|
-
const BaseTransition = BaseTransitionImpl;
|
|
4053
|
+
const BaseTransition = /*@__PURE__*/ withTransitionEnabled(BaseTransitionImpl);
|
|
4024
4054
|
function getLeavingNodesForType(state, vnode) {
|
|
4025
4055
|
const { leavingNodes } = state;
|
|
4026
4056
|
let leavingVNodesCache = leavingNodes.get(vnode.type);
|
|
@@ -4058,7 +4088,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4058
4088
|
return hooks;
|
|
4059
4089
|
}
|
|
4060
4090
|
}, props, state, instance);
|
|
4061
|
-
if (vnode.type === VaporSlot) extend(hooks, {
|
|
4091
|
+
if (isVaporInteropEnabled && vnode.type === VaporSlot) extend(hooks, {
|
|
4062
4092
|
__vapor: true,
|
|
4063
4093
|
props,
|
|
4064
4094
|
state,
|
|
@@ -4235,7 +4265,7 @@ function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, pr
|
|
|
4235
4265
|
function setTransitionHooks(vnode, hooks) {
|
|
4236
4266
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4237
4267
|
vnode.transition = hooks;
|
|
4238
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
4268
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
4239
4269
|
else {
|
|
4240
4270
|
const subTree = vnode.component.subTree;
|
|
4241
4271
|
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
@@ -4274,7 +4304,7 @@ function checkTransitionMode(mode) {
|
|
|
4274
4304
|
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
|
|
4275
4305
|
}
|
|
4276
4306
|
function getTransitionRoot(vnode) {
|
|
4277
|
-
if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
|
|
4307
|
+
if (vnode.component && (!isVaporInteropEnabled || !isVaporComponent(vnode.type))) return getTransitionRoot(vnode.component.subTree);
|
|
4278
4308
|
if (vnode.type === Fragment) {
|
|
4279
4309
|
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
4280
4310
|
return child ? getTransitionRoot(child) : void 0;
|
|
@@ -4461,6 +4491,8 @@ const getContainerType = (container) => {
|
|
|
4461
4491
|
if (isMathMLContainer(container)) return "mathml";
|
|
4462
4492
|
};
|
|
4463
4493
|
const isComment = (node) => node.nodeType === 8;
|
|
4494
|
+
/** The data of a comment opening a range a hydration steps over as one. */
|
|
4495
|
+
const isRangeStart = (data) => data === "[" || data === "(" || isVaporBranchStart(data);
|
|
4464
4496
|
function createHydrationFunctions(rendererInternals) {
|
|
4465
4497
|
const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
|
|
4466
4498
|
const hydrate = (vnode, container) => {
|
|
@@ -4478,7 +4510,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4478
4510
|
};
|
|
4479
4511
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
4480
4512
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
4481
|
-
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
|
|
4513
|
+
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(" || isVaporInteropEnabled && isVaporBranchStart(node.data));
|
|
4482
4514
|
const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
|
|
4483
4515
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
4484
4516
|
let domType = node.nodeType;
|
|
@@ -4534,7 +4566,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4534
4566
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4535
4567
|
break;
|
|
4536
4568
|
case VaporSlot:
|
|
4537
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4569
|
+
if (isVaporInteropEnabled) nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4538
4570
|
break;
|
|
4539
4571
|
default: if (shapeFlag & 1) {
|
|
4540
4572
|
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
|
|
@@ -4666,7 +4698,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4666
4698
|
if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
4667
4699
|
const container = parentNode(node);
|
|
4668
4700
|
const first = nextSibling(node);
|
|
4669
|
-
const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4701
|
+
const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4670
4702
|
if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
|
|
4671
4703
|
else {
|
|
4672
4704
|
logMismatchError();
|
|
@@ -4676,7 +4708,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4676
4708
|
};
|
|
4677
4709
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4678
4710
|
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
4679
|
-
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && (node.data
|
|
4711
|
+
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && isRangeStart(node.data) ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
|
|
4680
4712
|
logMismatchError();
|
|
4681
4713
|
}
|
|
4682
4714
|
vnode.el = null;
|
|
@@ -4703,7 +4735,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4703
4735
|
while (node) {
|
|
4704
4736
|
node = nextSibling(node);
|
|
4705
4737
|
if (node && isComment(node)) {
|
|
4706
|
-
if (node.data === open) match++;
|
|
4738
|
+
if (node.data === open || isVaporInteropEnabled && open === "[" && isVaporBranchStart(node.data)) match++;
|
|
4707
4739
|
if (node.data === close) {
|
|
4708
4740
|
if (match === 0) return nextSibling(node);
|
|
4709
4741
|
else match--;
|
|
@@ -4959,9 +4991,9 @@ const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {
|
|
|
4959
4991
|
return teardown;
|
|
4960
4992
|
};
|
|
4961
4993
|
function forEachElement(node, cb) {
|
|
4962
|
-
if (isComment(node) && (node.data
|
|
4994
|
+
if (isComment(node) && isRangeStart(node.data)) {
|
|
4963
4995
|
const open = node.data;
|
|
4964
|
-
const close = open === "
|
|
4996
|
+
const close = open === "(" ? ")" : "]";
|
|
4965
4997
|
let depth = 1;
|
|
4966
4998
|
let next = node.nextSibling;
|
|
4967
4999
|
while (next) {
|
|
@@ -4970,7 +5002,7 @@ function forEachElement(node, cb) {
|
|
|
4970
5002
|
} else if (isComment(next)) {
|
|
4971
5003
|
if (next.data === close) {
|
|
4972
5004
|
if (--depth === 0) break;
|
|
4973
|
-
} else if (next.data === open) depth++;
|
|
5005
|
+
} else if (close === "]" ? next.data === "[" || isVaporBranchStart(next.data) : next.data === open) depth++;
|
|
4974
5006
|
}
|
|
4975
5007
|
next = next.nextSibling;
|
|
4976
5008
|
}
|
|
@@ -5073,7 +5105,7 @@ function createAsyncComponentContext(source) {
|
|
|
5073
5105
|
setPendingRequest: (request) => pendingRequest = request
|
|
5074
5106
|
};
|
|
5075
5107
|
}
|
|
5076
|
-
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
5108
|
+
const useAsyncComponentState = (delay = 200, timeout, onError, instance = currentInstance) => {
|
|
5077
5109
|
const loaded = /* @__PURE__ */ ref(false);
|
|
5078
5110
|
const error = /* @__PURE__ */ ref();
|
|
5079
5111
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
@@ -5130,6 +5162,11 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
|
|
|
5130
5162
|
//#endregion
|
|
5131
5163
|
//#region packages/runtime-core/src/components/KeepAlive.ts
|
|
5132
5164
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
5165
|
+
let isKeepAliveEnabled = false;
|
|
5166
|
+
function withKeepAliveEnabled(value) {
|
|
5167
|
+
isKeepAliveEnabled = true;
|
|
5168
|
+
return value;
|
|
5169
|
+
}
|
|
5133
5170
|
const KeepAliveImpl = {
|
|
5134
5171
|
name: `KeepAlive`,
|
|
5135
5172
|
__isKeepAlive: true,
|
|
@@ -5278,7 +5315,7 @@ const decorate$2 = (t) => {
|
|
|
5278
5315
|
t.__isBuiltIn = true;
|
|
5279
5316
|
return t;
|
|
5280
5317
|
};
|
|
5281
|
-
const KeepAlive = /*@__PURE__*/ decorate$2(KeepAliveImpl);
|
|
5318
|
+
const KeepAlive = /*@__PURE__*/ withKeepAliveEnabled(/*@__PURE__*/ decorate$2(KeepAliveImpl));
|
|
5282
5319
|
function matches(pattern, name) {
|
|
5283
5320
|
if (isArray(pattern)) return pattern.some((p) => matches(p, name));
|
|
5284
5321
|
else if (isString(pattern)) return pattern.split(",").includes(name);
|
|
@@ -5741,11 +5778,12 @@ function invokeSlotFallback(fallback, owner) {
|
|
|
5741
5778
|
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
5742
5779
|
if (props == null) props = {};
|
|
5743
5780
|
let slot = slots[name];
|
|
5744
|
-
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
5781
|
+
const vaporSlot = isVaporInteropEnabled && slot && slot[rawVaporSlotKey];
|
|
5745
5782
|
if (vaporSlot) {
|
|
5746
5783
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
5747
5784
|
ret.vs = {
|
|
5748
5785
|
slot: vaporSlot,
|
|
5786
|
+
name,
|
|
5749
5787
|
outlets: fallback ? [{
|
|
5750
5788
|
fallback,
|
|
5751
5789
|
owner: currentRenderingInstance
|
|
@@ -5776,7 +5814,7 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
|
5776
5814
|
try {
|
|
5777
5815
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5778
5816
|
let attached = false;
|
|
5779
|
-
if (fallback && validSlotContent && currentRenderingInstance) {
|
|
5817
|
+
if (isVaporInteropEnabled && fallback && validSlotContent && currentRenderingInstance) {
|
|
5780
5818
|
const interop = currentRenderingInstance.appContext.vapor;
|
|
5781
5819
|
if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
|
|
5782
5820
|
}
|
|
@@ -6736,7 +6774,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6736
6774
|
if (options.el) return vm.$mount(options.el);
|
|
6737
6775
|
else return vm;
|
|
6738
6776
|
}
|
|
6739
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6777
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.14`;
|
|
6740
6778
|
Vue.config = singletonApp.config;
|
|
6741
6779
|
Vue.use = (plugin, ...options) => {
|
|
6742
6780
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -8100,7 +8138,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8100
8138
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8101
8139
|
break;
|
|
8102
8140
|
case VaporSlot:
|
|
8103
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
8141
|
+
if (isVaporInteropEnabled) getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
8104
8142
|
break;
|
|
8105
8143
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8106
8144
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -8234,7 +8272,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8234
8272
|
let vnodeHook;
|
|
8235
8273
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
8236
8274
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8237
|
-
if (n2.ibu) n2.ibu();
|
|
8275
|
+
if (isVaporInteropEnabled && n2.ibu) n2.ibu();
|
|
8238
8276
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
8239
8277
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
8240
8278
|
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -8268,9 +8306,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8268
8306
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
8269
8307
|
}
|
|
8270
8308
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
8271
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
8309
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || isVaporInteropEnabled && n2.iu) queuePostRenderEffect(() => {
|
|
8272
8310
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8273
|
-
n2.iu && n2.iu();
|
|
8311
|
+
isVaporInteropEnabled && n2.iu && n2.iu();
|
|
8274
8312
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
8275
8313
|
}, void 0, parentSuspense);
|
|
8276
8314
|
};
|
|
@@ -8486,7 +8524,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8486
8524
|
} else next = vnode;
|
|
8487
8525
|
if (bu) invokeArrayFns(bu);
|
|
8488
8526
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8489
|
-
if (next.ibu) next.ibu();
|
|
8527
|
+
if (isVaporInteropEnabled && next.ibu) next.ibu();
|
|
8490
8528
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) instance.emit("hook:beforeUpdate");
|
|
8491
8529
|
toggleRecurse(instance, true);
|
|
8492
8530
|
startMeasure(instance, `render`);
|
|
@@ -8500,9 +8538,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8500
8538
|
next.el = nextTree.el;
|
|
8501
8539
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
8502
8540
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
8503
|
-
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
8541
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || isVaporInteropEnabled && next.iu) queuePostRenderEffect(() => {
|
|
8504
8542
|
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8505
|
-
next.iu && next.iu();
|
|
8543
|
+
isVaporInteropEnabled && next.iu && next.iu();
|
|
8506
8544
|
}, void 0, parentSuspense);
|
|
8507
8545
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:updated"), void 0, parentSuspense);
|
|
8508
8546
|
devtoolsComponentUpdated(instance);
|
|
@@ -8655,7 +8693,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8655
8693
|
};
|
|
8656
8694
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
8657
8695
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
8658
|
-
if (isVaporComponent(type) || type === VaporSlot) {
|
|
8696
|
+
if (isVaporInteropEnabled && (isVaporComponent(type) || type === VaporSlot)) {
|
|
8659
8697
|
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
8660
8698
|
return;
|
|
8661
8699
|
}
|
|
@@ -8699,11 +8737,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8699
8737
|
}
|
|
8700
8738
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8701
8739
|
if (shapeFlag & 256) {
|
|
8702
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8740
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8703
8741
|
else parentComponent.ctx.deactivate(vnode);
|
|
8704
8742
|
return;
|
|
8705
8743
|
}
|
|
8706
|
-
if (shapeFlag & 6 && isVaporComponent(type)) {
|
|
8744
|
+
if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
|
|
8707
8745
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8708
8746
|
return;
|
|
8709
8747
|
}
|
|
@@ -8721,7 +8759,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8721
8759
|
if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
|
|
8722
8760
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
8723
8761
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
8724
|
-
if (type === VaporSlot) {
|
|
8762
|
+
if (isVaporInteropEnabled && type === VaporSlot) {
|
|
8725
8763
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8726
8764
|
return;
|
|
8727
8765
|
}
|
|
@@ -8755,7 +8793,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8755
8793
|
if (transition) {
|
|
8756
8794
|
let leavingEl = leavingNode && leavingNode.el;
|
|
8757
8795
|
let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
|
|
8758
|
-
if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
8796
|
+
if (isVaporInteropEnabled && isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
8759
8797
|
leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
|
|
8760
8798
|
isElement = !!leavingEl;
|
|
8761
8799
|
}
|
|
@@ -8796,7 +8834,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8796
8834
|
};
|
|
8797
8835
|
const getNextHostNode = (vnode) => {
|
|
8798
8836
|
if (vnode.shapeFlag & 6) {
|
|
8799
|
-
if (isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
8837
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
8800
8838
|
return getNextHostNode(vnode.component.subTree);
|
|
8801
8839
|
}
|
|
8802
8840
|
if (vnode.shapeFlag & 128) return vnode.suspense.next();
|
|
@@ -8857,7 +8895,7 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
|
8857
8895
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
8858
8896
|
}
|
|
8859
8897
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
8860
|
-
if (!vapor) {
|
|
8898
|
+
if (!isVaporInteropEnabled || !vapor) {
|
|
8861
8899
|
if (allowed) {
|
|
8862
8900
|
effect.flags |= 128;
|
|
8863
8901
|
job.flags |= 2;
|
|
@@ -8969,7 +9007,7 @@ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true
|
|
|
8969
9007
|
currentParent = currentParent.parent;
|
|
8970
9008
|
} else break;
|
|
8971
9009
|
}
|
|
8972
|
-
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
9010
|
+
const vaporScopeIds = isVaporInteropEnabled && includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
8973
9011
|
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
8974
9012
|
return inheritedScopeIds;
|
|
8975
9013
|
}
|
|
@@ -8982,8 +9020,13 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
|
8982
9020
|
//#endregion
|
|
8983
9021
|
//#region packages/runtime-core/src/components/Suspense.ts
|
|
8984
9022
|
const isSuspense = (type) => type.__isSuspense;
|
|
9023
|
+
let isSuspenseEnabled = false;
|
|
9024
|
+
function withSuspenseEnabled(value) {
|
|
9025
|
+
isSuspenseEnabled = true;
|
|
9026
|
+
return value;
|
|
9027
|
+
}
|
|
8985
9028
|
let suspenseId = 0;
|
|
8986
|
-
const Suspense = {
|
|
9029
|
+
const Suspense = /*@__PURE__*/ withSuspenseEnabled({
|
|
8987
9030
|
name: "Suspense",
|
|
8988
9031
|
__isSuspense: true,
|
|
8989
9032
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
@@ -9000,7 +9043,7 @@ const Suspense = {
|
|
|
9000
9043
|
},
|
|
9001
9044
|
hydrate: hydrateSuspense,
|
|
9002
9045
|
normalize: normalizeSuspenseChildren
|
|
9003
|
-
};
|
|
9046
|
+
});
|
|
9004
9047
|
function triggerEvent(vnode, name) {
|
|
9005
9048
|
const eventListener = vnode.props && vnode.props[name];
|
|
9006
9049
|
if (isFunction(eventListener)) eventListener();
|
|
@@ -9579,16 +9622,23 @@ function cloneVaporSlotMeta(vnode, extraProps) {
|
|
|
9579
9622
|
if (!vaporSlot) return vaporSlot;
|
|
9580
9623
|
const cloned = {
|
|
9581
9624
|
slot: vaporSlot.slot,
|
|
9625
|
+
name: vaporSlot.name,
|
|
9582
9626
|
outlets: vaporSlot.outlets,
|
|
9583
|
-
props: vaporSlot.props
|
|
9627
|
+
props: vaporSlot.props,
|
|
9628
|
+
attrs: vaporSlot.attrs && vaporSlot.attrs === EMPTY_OBJ ? {} : vaporSlot.attrs,
|
|
9629
|
+
group: vaporSlot.group
|
|
9584
9630
|
};
|
|
9585
|
-
|
|
9631
|
+
const attrs = cloned.attrs;
|
|
9632
|
+
if (extraProps && vaporSlot.props) {
|
|
9586
9633
|
let extraSlotProps;
|
|
9587
|
-
for (const key in extraProps) if (key !== "key") {
|
|
9634
|
+
for (const key in extraProps) if (attrs ? !isReservedProp(key) : key !== "key") {
|
|
9588
9635
|
if (!extraSlotProps) extraSlotProps = {};
|
|
9589
9636
|
extraSlotProps[key] = extraProps[key];
|
|
9590
9637
|
}
|
|
9591
|
-
if (extraSlotProps)
|
|
9638
|
+
if (extraSlotProps) {
|
|
9639
|
+
if (attrs) cloned.attrs = mergeProps(attrs, extraSlotProps);
|
|
9640
|
+
else cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
|
|
9641
|
+
}
|
|
9592
9642
|
}
|
|
9593
9643
|
if (vnode.el) {
|
|
9594
9644
|
cloned.state = vaporSlot.state;
|
|
@@ -9870,7 +9920,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
|
|
|
9870
9920
|
isSSR && setInSSRSetupState(isSSR);
|
|
9871
9921
|
const { props, children, vi } = instance.vnode;
|
|
9872
9922
|
const isStateful = isStatefulComponent(instance);
|
|
9873
|
-
if (vi) vi(instance);
|
|
9923
|
+
if (isVaporInteropEnabled && vi) vi(instance);
|
|
9874
9924
|
else {
|
|
9875
9925
|
initProps(instance, props, isStateful, isSSR);
|
|
9876
9926
|
initSlots(instance, children, optimized || isSSR);
|
|
@@ -10294,7 +10344,7 @@ function isMemoSame(cached, memo) {
|
|
|
10294
10344
|
}
|
|
10295
10345
|
//#endregion
|
|
10296
10346
|
//#region packages/runtime-core/src/index.ts
|
|
10297
|
-
const version = "3.6.0-rc.
|
|
10347
|
+
const version = "3.6.0-rc.14";
|
|
10298
10348
|
const warn = warn$1;
|
|
10299
10349
|
/**
|
|
10300
10350
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -11404,7 +11454,7 @@ const decorate = (t) => {
|
|
|
11404
11454
|
t.__isBuiltIn = true;
|
|
11405
11455
|
return t;
|
|
11406
11456
|
};
|
|
11407
|
-
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
11457
|
+
const TransitionGroup = /*@__PURE__*/ withTransitionEnabled(/* @__PURE__ */ decorate({
|
|
11408
11458
|
name: "TransitionGroup",
|
|
11409
11459
|
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
11410
11460
|
tag: String,
|
|
@@ -11413,6 +11463,11 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11413
11463
|
setup(props, { slots }) {
|
|
11414
11464
|
const instance = getCurrentInstance();
|
|
11415
11465
|
const state = useTransitionState();
|
|
11466
|
+
const group = {
|
|
11467
|
+
props: {},
|
|
11468
|
+
state,
|
|
11469
|
+
instance
|
|
11470
|
+
};
|
|
11416
11471
|
let prevChildren;
|
|
11417
11472
|
let children;
|
|
11418
11473
|
let origins;
|
|
@@ -11443,7 +11498,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11443
11498
|
});
|
|
11444
11499
|
return () => {
|
|
11445
11500
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
11446
|
-
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
11501
|
+
const cssTransitionProps = group.props = resolveTransitionProps(rawProps);
|
|
11447
11502
|
let tag = rawProps.tag || Fragment;
|
|
11448
11503
|
if (!rawProps.tag && compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT", instance.parent)) tag = "span";
|
|
11449
11504
|
prevChildren = [];
|
|
@@ -11454,12 +11509,17 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11454
11509
|
prevChildren.push(child);
|
|
11455
11510
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
11456
11511
|
positionMap.set(child, getPosition(child.el));
|
|
11457
|
-
}
|
|
11512
|
+
} else if (isVaporInteropEnabled && child.vs && child.vb) instance.appContext.vapor.forEachGroupChild(child, (el) => {
|
|
11513
|
+
const row = { el };
|
|
11514
|
+
prevChildren.push(row);
|
|
11515
|
+
positionMap.set(row, getPosition(el));
|
|
11516
|
+
});
|
|
11458
11517
|
}
|
|
11459
11518
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
11460
11519
|
for (let i = 0; i < children.length; i++) {
|
|
11461
11520
|
const child = children[i];
|
|
11462
|
-
if (child.
|
|
11521
|
+
if (isVaporInteropEnabled && child.vs) child.vs.group = group;
|
|
11522
|
+
else if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
11463
11523
|
else if (child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
|
|
11464
11524
|
}
|
|
11465
11525
|
if (prevChildren.length) {
|
|
@@ -11473,7 +11533,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11473
11533
|
return createVNode(tag, null, children);
|
|
11474
11534
|
};
|
|
11475
11535
|
}
|
|
11476
|
-
});
|
|
11536
|
+
}));
|
|
11477
11537
|
function callPendingCbs(el) {
|
|
11478
11538
|
if (el[moveCbKey]) el[moveCbKey]();
|
|
11479
11539
|
if (el[enterCbKey]) el[enterCbKey]();
|
|
@@ -11617,7 +11677,7 @@ const vModelTextInit = (el, trim, number, lazy, set) => {
|
|
|
11617
11677
|
if (e.target.composing) return;
|
|
11618
11678
|
(set || el[assignKey])(castValue(el.value, trim, number || el.type === "number"));
|
|
11619
11679
|
});
|
|
11620
|
-
if (trim || number) addEventListener(el, "change", () => {
|
|
11680
|
+
if (trim || number || el.type === "number") addEventListener(el, "change", () => {
|
|
11621
11681
|
el.value = castValue(el.value, trim, number || el.type === "number");
|
|
11622
11682
|
});
|
|
11623
11683
|
if (!lazy) {
|
|
@@ -11997,6 +12057,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11997
12057
|
initCustomFormatter: () => initCustomFormatter,
|
|
11998
12058
|
initDirectivesForSSR: () => initDirectivesForSSR,
|
|
11999
12059
|
inject: () => inject,
|
|
12060
|
+
isKeepAliveEnabled: () => isKeepAliveEnabled,
|
|
12000
12061
|
isMemoSame: () => isMemoSame,
|
|
12001
12062
|
isProxy: () => isProxy,
|
|
12002
12063
|
isReactive: () => isReactive,
|
|
@@ -12004,7 +12065,10 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
12004
12065
|
isRef: () => isRef,
|
|
12005
12066
|
isRuntimeOnly: () => isRuntimeOnly,
|
|
12006
12067
|
isShallow: () => isShallow,
|
|
12068
|
+
isSuspenseEnabled: () => isSuspenseEnabled,
|
|
12069
|
+
isTransitionEnabled: () => isTransitionEnabled,
|
|
12007
12070
|
isVNode: () => isVNode,
|
|
12071
|
+
isVaporInteropEnabled: () => isVaporInteropEnabled,
|
|
12008
12072
|
markRaw: () => markRaw,
|
|
12009
12073
|
mergeDefaults: () => mergeDefaults,
|
|
12010
12074
|
mergeModels: () => mergeModels,
|
|
@@ -12051,6 +12115,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
12051
12115
|
setDevtoolsHook: () => setDevtoolsHook,
|
|
12052
12116
|
setIsHydratingEnabled: () => setIsHydratingEnabled,
|
|
12053
12117
|
setTransitionHooks: () => setTransitionHooks,
|
|
12118
|
+
setVaporInteropEnabled: () => setVaporInteropEnabled,
|
|
12054
12119
|
shallowReactive: () => shallowReactive,
|
|
12055
12120
|
shallowReadonly: () => shallowReadonly,
|
|
12056
12121
|
shallowRef: () => shallowRef,
|
|
@@ -12095,10 +12160,13 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
12095
12160
|
withCtx: () => withCtx,
|
|
12096
12161
|
withDefaults: () => withDefaults,
|
|
12097
12162
|
withDirectives: () => withDirectives,
|
|
12163
|
+
withKeepAliveEnabled: () => withKeepAliveEnabled,
|
|
12098
12164
|
withKeys: () => withKeys,
|
|
12099
12165
|
withMemo: () => withMemo,
|
|
12100
12166
|
withModifiers: () => withModifiers,
|
|
12101
|
-
withScopeId: () => withScopeId
|
|
12167
|
+
withScopeId: () => withScopeId,
|
|
12168
|
+
withSuspenseEnabled: () => withSuspenseEnabled,
|
|
12169
|
+
withTransitionEnabled: () => withTransitionEnabled
|
|
12102
12170
|
});
|
|
12103
12171
|
const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
|
|
12104
12172
|
let renderer;
|
|
@@ -14067,7 +14135,15 @@ const nonIdentifierRE = /^$|^\d|[^\$\w\xA0-\uFFFF]/;
|
|
|
14067
14135
|
const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
14068
14136
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
14069
14137
|
const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
14138
|
+
const asciiIdentifierRE = /^[A-Za-z_$][\w$]*$/;
|
|
14139
|
+
const isReservedWord = /*@__PURE__*/ makeMap("await,break,case,catch,class,const,continue,debugger,default,delete,do,else,enum,export,extends,false,finally,for,function,if,implements,import,in,instanceof,interface,let,new,null,package,private,protected,public,return,static,super,switch,this,throw,true,try,typeof,undefined,var,void,while,with,yield");
|
|
14140
|
+
const isUnparsedIdentifier = (exp) => {
|
|
14141
|
+
if (exp.ast !== null) return false;
|
|
14142
|
+
const content = getExpSource(exp);
|
|
14143
|
+
return asciiIdentifierRE.test(content) && !isReservedWord(content);
|
|
14144
|
+
};
|
|
14070
14145
|
const isMemberExpressionNode = (exp, context) => {
|
|
14146
|
+
if (isUnparsedIdentifier(exp)) return true;
|
|
14071
14147
|
try {
|
|
14072
14148
|
let ret = exp.ast || (0, _babel_parser.parseExpression)(getExpSource(exp), { plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] });
|
|
14073
14149
|
ret = unwrapTSNode(ret);
|
|
@@ -14078,6 +14154,7 @@ const isMemberExpressionNode = (exp, context) => {
|
|
|
14078
14154
|
};
|
|
14079
14155
|
const isMemberExpression = isMemberExpressionNode;
|
|
14080
14156
|
const isFnExpressionNode = (exp, context) => {
|
|
14157
|
+
if (isUnparsedIdentifier(exp)) return false;
|
|
14081
14158
|
try {
|
|
14082
14159
|
let ret = exp.ast || (0, _babel_parser.parseExpression)(getExpSource(exp), { plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"] });
|
|
14083
14160
|
if (ret.type === "Program") {
|