@cabloy/vue-runtime-core 3.4.32 → 3.4.34
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/runtime-core.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @cabloy/vue-runtime-core v3.4.
|
|
2
|
+
* @cabloy/vue-runtime-core v3.4.31
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -669,11 +669,9 @@ function emit(instance, event, ...rawArgs) {
|
|
|
669
669
|
if (emitsOptions) {
|
|
670
670
|
if (!(event in emitsOptions) && true) {
|
|
671
671
|
if (!propsOptions || !(shared.toHandlerKey(event) in propsOptions)) {
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
);
|
|
676
|
-
}
|
|
672
|
+
warn$1(
|
|
673
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${shared.toHandlerKey(event)}" prop.`
|
|
674
|
+
);
|
|
677
675
|
}
|
|
678
676
|
} else {
|
|
679
677
|
const validator = emitsOptions[event];
|
|
@@ -1230,7 +1228,6 @@ const SuspenseImpl = {
|
|
|
1230
1228
|
}
|
|
1231
1229
|
},
|
|
1232
1230
|
hydrate: hydrateSuspense,
|
|
1233
|
-
create: createSuspenseBoundary,
|
|
1234
1231
|
normalize: normalizeSuspenseChildren
|
|
1235
1232
|
};
|
|
1236
1233
|
const Suspense = SuspenseImpl ;
|
|
@@ -1809,7 +1806,7 @@ const createHook = (lifecycle) => (hook, target = currentInstance) => {
|
|
|
1809
1806
|
if (!isInSSRComponentSetup || lifecycle === "sp") {
|
|
1810
1807
|
injectHook(lifecycle, (...args) => hook(...args), target);
|
|
1811
1808
|
}
|
|
1812
|
-
if (lifecycle === "m" &&
|
|
1809
|
+
if (lifecycle === "m" && target && target.isMounted) {
|
|
1813
1810
|
hook();
|
|
1814
1811
|
}
|
|
1815
1812
|
};
|
|
@@ -3791,18 +3788,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3791
3788
|
let domType = node.nodeType;
|
|
3792
3789
|
vnode.el = node;
|
|
3793
3790
|
{
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
value: vnode,
|
|
3797
|
-
enumerable: false
|
|
3798
|
-
});
|
|
3799
|
-
}
|
|
3800
|
-
if (!("__vueParentComponent" in node)) {
|
|
3801
|
-
Object.defineProperty(node, "__vueParentComponent", {
|
|
3802
|
-
value: parentComponent,
|
|
3803
|
-
enumerable: false
|
|
3804
|
-
});
|
|
3805
|
-
}
|
|
3791
|
+
shared.def(node, "__vnode", vnode, true);
|
|
3792
|
+
shared.def(node, "__vueParentComponent", parentComponent, true);
|
|
3806
3793
|
}
|
|
3807
3794
|
if (patchFlag === -2) {
|
|
3808
3795
|
optimized = false;
|
|
@@ -4025,7 +4012,9 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4025
4012
|
if (props) {
|
|
4026
4013
|
{
|
|
4027
4014
|
for (const key in props) {
|
|
4028
|
-
if (
|
|
4015
|
+
if (// #11189 skip if this node has directives that have created hooks
|
|
4016
|
+
// as it could have mutated the DOM in any possible way
|
|
4017
|
+
!(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
|
|
4029
4018
|
logMismatchError();
|
|
4030
4019
|
}
|
|
4031
4020
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
@@ -4200,7 +4189,6 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4200
4189
|
return [hydrate, hydrateNode];
|
|
4201
4190
|
}
|
|
4202
4191
|
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
4203
|
-
var _a;
|
|
4204
4192
|
let mismatchType;
|
|
4205
4193
|
let mismatchKey;
|
|
4206
4194
|
let actual;
|
|
@@ -4223,13 +4211,8 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
4223
4211
|
}
|
|
4224
4212
|
}
|
|
4225
4213
|
}
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
(root == null ? void 0 : root.type) === Fragment && root.children.includes(vnode)) {
|
|
4229
|
-
const cssVars = (_a = instance == null ? void 0 : instance.getCssVars) == null ? void 0 : _a.call(instance);
|
|
4230
|
-
for (const key2 in cssVars) {
|
|
4231
|
-
expectedMap.set(`--${key2}`, String(cssVars[key2]));
|
|
4232
|
-
}
|
|
4214
|
+
if (instance) {
|
|
4215
|
+
resolveCssVars(instance, vnode, expectedMap);
|
|
4233
4216
|
}
|
|
4234
4217
|
if (!isMapEqual(actualMap, expectedMap)) {
|
|
4235
4218
|
mismatchType = mismatchKey = "style";
|
|
@@ -4289,8 +4272,8 @@ function toStyleMap(str) {
|
|
|
4289
4272
|
const styleMap = /* @__PURE__ */ new Map();
|
|
4290
4273
|
for (const item of str.split(";")) {
|
|
4291
4274
|
let [key, value] = item.split(":");
|
|
4292
|
-
key = key
|
|
4293
|
-
value = value
|
|
4275
|
+
key = key.trim();
|
|
4276
|
+
value = value && value.trim();
|
|
4294
4277
|
if (key && value) {
|
|
4295
4278
|
styleMap.set(key, value);
|
|
4296
4279
|
}
|
|
@@ -4308,6 +4291,18 @@ function isMapEqual(a, b) {
|
|
|
4308
4291
|
}
|
|
4309
4292
|
return true;
|
|
4310
4293
|
}
|
|
4294
|
+
function resolveCssVars(instance, vnode, expectedMap) {
|
|
4295
|
+
const root = instance.subTree;
|
|
4296
|
+
if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
|
|
4297
|
+
const cssVars = instance.getCssVars();
|
|
4298
|
+
for (const key in cssVars) {
|
|
4299
|
+
expectedMap.set(`--${key}`, String(cssVars[key]));
|
|
4300
|
+
}
|
|
4301
|
+
}
|
|
4302
|
+
if (vnode === root && instance.parent) {
|
|
4303
|
+
resolveCssVars(instance.parent, instance.vnode, expectedMap);
|
|
4304
|
+
}
|
|
4305
|
+
}
|
|
4311
4306
|
|
|
4312
4307
|
let supported;
|
|
4313
4308
|
let perf;
|
|
@@ -4625,14 +4620,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4625
4620
|
}
|
|
4626
4621
|
}
|
|
4627
4622
|
{
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
enumerable: false
|
|
4631
|
-
});
|
|
4632
|
-
Object.defineProperty(el, "__vueParentComponent", {
|
|
4633
|
-
value: parentComponent,
|
|
4634
|
-
enumerable: false
|
|
4635
|
-
});
|
|
4623
|
+
shared.def(el, "__vnode", vnode, true);
|
|
4624
|
+
shared.def(el, "__vueParentComponent", parentComponent, true);
|
|
4636
4625
|
}
|
|
4637
4626
|
if (dirs) {
|
|
4638
4627
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
@@ -4694,6 +4683,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4694
4683
|
};
|
|
4695
4684
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
4696
4685
|
const el = n2.el = n1.el;
|
|
4686
|
+
{
|
|
4687
|
+
el.__vnode = n2;
|
|
4688
|
+
}
|
|
4697
4689
|
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
4698
4690
|
patchFlag |= n1.patchFlag & 16;
|
|
4699
4691
|
const oldProps = n1.props || shared.EMPTY_OBJ;
|
|
@@ -5588,6 +5580,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5588
5580
|
dirs,
|
|
5589
5581
|
memoIndex
|
|
5590
5582
|
} = vnode;
|
|
5583
|
+
if (patchFlag === -2) {
|
|
5584
|
+
optimized = false;
|
|
5585
|
+
}
|
|
5591
5586
|
if (ref != null) {
|
|
5592
5587
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
5593
5588
|
}
|
|
@@ -5619,7 +5614,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5619
5614
|
vnode,
|
|
5620
5615
|
parentComponent,
|
|
5621
5616
|
parentSuspense,
|
|
5622
|
-
optimized,
|
|
5623
5617
|
internals,
|
|
5624
5618
|
doRemove
|
|
5625
5619
|
);
|
|
@@ -6921,7 +6915,7 @@ const TeleportImpl = {
|
|
|
6921
6915
|
}
|
|
6922
6916
|
updateCssVars(n2);
|
|
6923
6917
|
},
|
|
6924
|
-
remove(vnode, parentComponent, parentSuspense,
|
|
6918
|
+
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
6925
6919
|
const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
|
|
6926
6920
|
if (target) {
|
|
6927
6921
|
hostRemove(targetAnchor);
|
|
@@ -8107,7 +8101,7 @@ function isMemoSame(cached, memo) {
|
|
|
8107
8101
|
return true;
|
|
8108
8102
|
}
|
|
8109
8103
|
|
|
8110
|
-
const version = "3.4.
|
|
8104
|
+
const version = "3.4.31";
|
|
8111
8105
|
const warn = warn$1 ;
|
|
8112
8106
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8113
8107
|
const devtools = devtools$1 ;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @cabloy/vue-runtime-core v3.4.
|
|
2
|
+
* @cabloy/vue-runtime-core v3.4.31
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -709,7 +709,6 @@ const SuspenseImpl = {
|
|
|
709
709
|
}
|
|
710
710
|
},
|
|
711
711
|
hydrate: hydrateSuspense,
|
|
712
|
-
create: createSuspenseBoundary,
|
|
713
712
|
normalize: normalizeSuspenseChildren
|
|
714
713
|
};
|
|
715
714
|
const Suspense = SuspenseImpl ;
|
|
@@ -1252,7 +1251,7 @@ const createHook = (lifecycle) => (hook, target = currentInstance) => {
|
|
|
1252
1251
|
if (!isInSSRComponentSetup || lifecycle === "sp") {
|
|
1253
1252
|
injectHook(lifecycle, (...args) => hook(...args), target);
|
|
1254
1253
|
}
|
|
1255
|
-
if (lifecycle === "m" &&
|
|
1254
|
+
if (lifecycle === "m" && target && target.isMounted) {
|
|
1256
1255
|
hook();
|
|
1257
1256
|
}
|
|
1258
1257
|
};
|
|
@@ -4238,6 +4237,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4238
4237
|
dirs,
|
|
4239
4238
|
memoIndex
|
|
4240
4239
|
} = vnode;
|
|
4240
|
+
if (patchFlag === -2) {
|
|
4241
|
+
optimized = false;
|
|
4242
|
+
}
|
|
4241
4243
|
if (ref != null) {
|
|
4242
4244
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
4243
4245
|
}
|
|
@@ -4269,7 +4271,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4269
4271
|
vnode,
|
|
4270
4272
|
parentComponent,
|
|
4271
4273
|
parentSuspense,
|
|
4272
|
-
optimized,
|
|
4273
4274
|
internals,
|
|
4274
4275
|
doRemove
|
|
4275
4276
|
);
|
|
@@ -5460,7 +5461,7 @@ const TeleportImpl = {
|
|
|
5460
5461
|
}
|
|
5461
5462
|
updateCssVars(n2);
|
|
5462
5463
|
},
|
|
5463
|
-
remove(vnode, parentComponent, parentSuspense,
|
|
5464
|
+
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
5464
5465
|
const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
|
|
5465
5466
|
if (target) {
|
|
5466
5467
|
hostRemove(targetAnchor);
|
|
@@ -6290,7 +6291,7 @@ function isMemoSame(cached, memo) {
|
|
|
6290
6291
|
return true;
|
|
6291
6292
|
}
|
|
6292
6293
|
|
|
6293
|
-
const version = "3.4.
|
|
6294
|
+
const version = "3.4.31";
|
|
6294
6295
|
const warn$1 = shared.NOOP;
|
|
6295
6296
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6296
6297
|
const devtools = void 0;
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -165,7 +165,6 @@ declare const SuspenseImpl: {
|
|
|
165
165
|
__isSuspense: boolean;
|
|
166
166
|
process(n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals): void;
|
|
167
167
|
hydrate: typeof hydrateSuspense;
|
|
168
|
-
create: typeof createSuspenseBoundary;
|
|
169
168
|
normalize: typeof normalizeSuspenseChildren;
|
|
170
169
|
};
|
|
171
170
|
export declare const Suspense: {
|
|
@@ -201,7 +200,6 @@ export interface SuspenseBoundary {
|
|
|
201
200
|
registerDep(instance: ComponentInternalInstance, setupRenderEffect: SetupRenderEffectFn, optimized: boolean): void;
|
|
202
201
|
unmount(parentSuspense: SuspenseBoundary | null, doRemove?: boolean): void;
|
|
203
202
|
}
|
|
204
|
-
declare function createSuspenseBoundary(vnode: VNode, parentSuspense: SuspenseBoundary | null, parentComponent: ComponentInternalInstance | null, container: RendererElement, hiddenContainer: RendererElement, anchor: RendererNode | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, isHydrating?: boolean): SuspenseBoundary;
|
|
205
203
|
declare function hydrateSuspense(node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, hydrateNode: (node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
|
|
206
204
|
declare function normalizeSuspenseChildren(vnode: VNode): void;
|
|
207
205
|
|
|
@@ -840,7 +838,7 @@ declare const TeleportImpl: {
|
|
|
840
838
|
name: string;
|
|
841
839
|
__isTeleport: boolean;
|
|
842
840
|
process(n1: TeleportVNode | null, n2: TeleportVNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, internals: RendererInternals): void;
|
|
843
|
-
remove(vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null,
|
|
841
|
+
remove(vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, { um: unmount, o: { remove: hostRemove } }: RendererInternals, doRemove: boolean): void;
|
|
844
842
|
move: typeof moveTeleport;
|
|
845
843
|
hydrate: typeof hydrateTeleport;
|
|
846
844
|
};
|
|
@@ -1022,7 +1020,7 @@ type Data = Record<string, unknown>;
|
|
|
1022
1020
|
* the usage of `InstanceType<typeof Comp>` which only works for
|
|
1023
1021
|
* constructor-based component definition types.
|
|
1024
1022
|
*
|
|
1025
|
-
*
|
|
1023
|
+
* @example
|
|
1026
1024
|
* ```ts
|
|
1027
1025
|
* const MyComp = { ... }
|
|
1028
1026
|
* declare const instance: ComponentInstance<typeof MyComp>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @cabloy/vue-runtime-core v3.4.
|
|
2
|
+
* @cabloy/vue-runtime-core v3.4.31
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -670,11 +670,9 @@ function emit(instance, event, ...rawArgs) {
|
|
|
670
670
|
if (emitsOptions) {
|
|
671
671
|
if (!(event in emitsOptions) && true) {
|
|
672
672
|
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
);
|
|
677
|
-
}
|
|
673
|
+
warn$1(
|
|
674
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
675
|
+
);
|
|
678
676
|
}
|
|
679
677
|
} else {
|
|
680
678
|
const validator = emitsOptions[event];
|
|
@@ -1231,7 +1229,6 @@ const SuspenseImpl = {
|
|
|
1231
1229
|
}
|
|
1232
1230
|
},
|
|
1233
1231
|
hydrate: hydrateSuspense,
|
|
1234
|
-
create: createSuspenseBoundary,
|
|
1235
1232
|
normalize: normalizeSuspenseChildren
|
|
1236
1233
|
};
|
|
1237
1234
|
const Suspense = SuspenseImpl ;
|
|
@@ -1810,7 +1807,7 @@ const createHook = (lifecycle) => (hook, target = currentInstance) => {
|
|
|
1810
1807
|
if (!isInSSRComponentSetup || lifecycle === "sp") {
|
|
1811
1808
|
injectHook(lifecycle, (...args) => hook(...args), target);
|
|
1812
1809
|
}
|
|
1813
|
-
if (lifecycle === "m" &&
|
|
1810
|
+
if (lifecycle === "m" && target && target.isMounted) {
|
|
1814
1811
|
hook();
|
|
1815
1812
|
}
|
|
1816
1813
|
};
|
|
@@ -3796,18 +3793,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3796
3793
|
let domType = node.nodeType;
|
|
3797
3794
|
vnode.el = node;
|
|
3798
3795
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
value: vnode,
|
|
3802
|
-
enumerable: false
|
|
3803
|
-
});
|
|
3804
|
-
}
|
|
3805
|
-
if (!("__vueParentComponent" in node)) {
|
|
3806
|
-
Object.defineProperty(node, "__vueParentComponent", {
|
|
3807
|
-
value: parentComponent,
|
|
3808
|
-
enumerable: false
|
|
3809
|
-
});
|
|
3810
|
-
}
|
|
3796
|
+
def(node, "__vnode", vnode, true);
|
|
3797
|
+
def(node, "__vueParentComponent", parentComponent, true);
|
|
3811
3798
|
}
|
|
3812
3799
|
if (patchFlag === -2) {
|
|
3813
3800
|
optimized = false;
|
|
@@ -4030,7 +4017,9 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4030
4017
|
if (props) {
|
|
4031
4018
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
4032
4019
|
for (const key in props) {
|
|
4033
|
-
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) &&
|
|
4020
|
+
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks
|
|
4021
|
+
// as it could have mutated the DOM in any possible way
|
|
4022
|
+
!(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
|
|
4034
4023
|
logMismatchError();
|
|
4035
4024
|
}
|
|
4036
4025
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
@@ -4215,7 +4204,6 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4215
4204
|
return [hydrate, hydrateNode];
|
|
4216
4205
|
}
|
|
4217
4206
|
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
4218
|
-
var _a;
|
|
4219
4207
|
let mismatchType;
|
|
4220
4208
|
let mismatchKey;
|
|
4221
4209
|
let actual;
|
|
@@ -4238,13 +4226,8 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
4238
4226
|
}
|
|
4239
4227
|
}
|
|
4240
4228
|
}
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
(root == null ? void 0 : root.type) === Fragment && root.children.includes(vnode)) {
|
|
4244
|
-
const cssVars = (_a = instance == null ? void 0 : instance.getCssVars) == null ? void 0 : _a.call(instance);
|
|
4245
|
-
for (const key2 in cssVars) {
|
|
4246
|
-
expectedMap.set(`--${key2}`, String(cssVars[key2]));
|
|
4247
|
-
}
|
|
4229
|
+
if (instance) {
|
|
4230
|
+
resolveCssVars(instance, vnode, expectedMap);
|
|
4248
4231
|
}
|
|
4249
4232
|
if (!isMapEqual(actualMap, expectedMap)) {
|
|
4250
4233
|
mismatchType = mismatchKey = "style";
|
|
@@ -4304,8 +4287,8 @@ function toStyleMap(str) {
|
|
|
4304
4287
|
const styleMap = /* @__PURE__ */ new Map();
|
|
4305
4288
|
for (const item of str.split(";")) {
|
|
4306
4289
|
let [key, value] = item.split(":");
|
|
4307
|
-
key = key
|
|
4308
|
-
value = value
|
|
4290
|
+
key = key.trim();
|
|
4291
|
+
value = value && value.trim();
|
|
4309
4292
|
if (key && value) {
|
|
4310
4293
|
styleMap.set(key, value);
|
|
4311
4294
|
}
|
|
@@ -4323,6 +4306,18 @@ function isMapEqual(a, b) {
|
|
|
4323
4306
|
}
|
|
4324
4307
|
return true;
|
|
4325
4308
|
}
|
|
4309
|
+
function resolveCssVars(instance, vnode, expectedMap) {
|
|
4310
|
+
const root = instance.subTree;
|
|
4311
|
+
if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
|
|
4312
|
+
const cssVars = instance.getCssVars();
|
|
4313
|
+
for (const key in cssVars) {
|
|
4314
|
+
expectedMap.set(`--${key}`, String(cssVars[key]));
|
|
4315
|
+
}
|
|
4316
|
+
}
|
|
4317
|
+
if (vnode === root && instance.parent) {
|
|
4318
|
+
resolveCssVars(instance.parent, instance.vnode, expectedMap);
|
|
4319
|
+
}
|
|
4320
|
+
}
|
|
4326
4321
|
|
|
4327
4322
|
let supported;
|
|
4328
4323
|
let perf;
|
|
@@ -4667,14 +4662,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4667
4662
|
}
|
|
4668
4663
|
}
|
|
4669
4664
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
enumerable: false
|
|
4673
|
-
});
|
|
4674
|
-
Object.defineProperty(el, "__vueParentComponent", {
|
|
4675
|
-
value: parentComponent,
|
|
4676
|
-
enumerable: false
|
|
4677
|
-
});
|
|
4665
|
+
def(el, "__vnode", vnode, true);
|
|
4666
|
+
def(el, "__vueParentComponent", parentComponent, true);
|
|
4678
4667
|
}
|
|
4679
4668
|
if (dirs) {
|
|
4680
4669
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
@@ -4736,6 +4725,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4736
4725
|
};
|
|
4737
4726
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
4738
4727
|
const el = n2.el = n1.el;
|
|
4728
|
+
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
4729
|
+
el.__vnode = n2;
|
|
4730
|
+
}
|
|
4739
4731
|
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
4740
4732
|
patchFlag |= n1.patchFlag & 16;
|
|
4741
4733
|
const oldProps = n1.props || EMPTY_OBJ;
|
|
@@ -5641,6 +5633,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5641
5633
|
dirs,
|
|
5642
5634
|
memoIndex
|
|
5643
5635
|
} = vnode;
|
|
5636
|
+
if (patchFlag === -2) {
|
|
5637
|
+
optimized = false;
|
|
5638
|
+
}
|
|
5644
5639
|
if (ref != null) {
|
|
5645
5640
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
5646
5641
|
}
|
|
@@ -5672,7 +5667,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5672
5667
|
vnode,
|
|
5673
5668
|
parentComponent,
|
|
5674
5669
|
parentSuspense,
|
|
5675
|
-
optimized,
|
|
5676
5670
|
internals,
|
|
5677
5671
|
doRemove
|
|
5678
5672
|
);
|
|
@@ -6975,7 +6969,7 @@ const TeleportImpl = {
|
|
|
6975
6969
|
}
|
|
6976
6970
|
updateCssVars(n2);
|
|
6977
6971
|
},
|
|
6978
|
-
remove(vnode, parentComponent, parentSuspense,
|
|
6972
|
+
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
6979
6973
|
const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
|
|
6980
6974
|
if (target) {
|
|
6981
6975
|
hostRemove(targetAnchor);
|
|
@@ -8175,7 +8169,7 @@ function isMemoSame(cached, memo) {
|
|
|
8175
8169
|
return true;
|
|
8176
8170
|
}
|
|
8177
8171
|
|
|
8178
|
-
const version = "3.4.
|
|
8172
|
+
const version = "3.4.31";
|
|
8179
8173
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8180
8174
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8181
8175
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabloy/vue-runtime-core",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.34",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@vue/shared": "3.4.
|
|
50
|
-
"@vue/reactivity": "3.4.
|
|
49
|
+
"@vue/shared": "3.4.31",
|
|
50
|
+
"@vue/reactivity": "npm:@cabloy/vue-reactivity@3.4.34"
|
|
51
51
|
}
|
|
52
52
|
}
|