@vue/runtime-core 3.5.0-alpha.5 → 3.5.0-beta.2
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/README.md +1 -1
- package/dist/runtime-core.cjs.js +111 -91
- package/dist/runtime-core.cjs.prod.js +93 -68
- package/dist/runtime-core.d.ts +73 -67
- package/dist/runtime-core.esm-bundler.js +111 -91
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.0-
|
|
2
|
+
* @vue/runtime-core v3.5.0-beta.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -557,6 +557,9 @@ function reload(id, newComp) {
|
|
|
557
557
|
"[HMR] Root or manually mounted instance modified. Full reload required."
|
|
558
558
|
);
|
|
559
559
|
}
|
|
560
|
+
if (instance.root.ce && instance !== instance.root) {
|
|
561
|
+
instance.root.ce._removeChildStyle(oldComp);
|
|
562
|
+
}
|
|
560
563
|
}
|
|
561
564
|
queuePostFlushCb(() => {
|
|
562
565
|
hmrDirtyComponents.clear();
|
|
@@ -636,9 +639,7 @@ function devtoolsInitApp(app, version) {
|
|
|
636
639
|
function devtoolsUnmountApp(app) {
|
|
637
640
|
emit$1("app:unmount" /* APP_UNMOUNT */, app);
|
|
638
641
|
}
|
|
639
|
-
const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
640
|
-
"component:added" /* COMPONENT_ADDED */
|
|
641
|
-
);
|
|
642
|
+
const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */);
|
|
642
643
|
const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */);
|
|
643
644
|
const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
644
645
|
"component:removed" /* COMPONENT_REMOVED */
|
|
@@ -662,12 +663,8 @@ function createDevtoolsComponentHook(hook) {
|
|
|
662
663
|
);
|
|
663
664
|
};
|
|
664
665
|
}
|
|
665
|
-
const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(
|
|
666
|
-
|
|
667
|
-
);
|
|
668
|
-
const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(
|
|
669
|
-
"perf:end" /* PERFORMANCE_END */
|
|
670
|
-
);
|
|
666
|
+
const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */);
|
|
667
|
+
const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */);
|
|
671
668
|
function createDevtoolsPerformanceHook(hook) {
|
|
672
669
|
return (component, type, time) => {
|
|
673
670
|
emit$1(hook, component.appContext.app, component.uid, component, type, time);
|
|
@@ -1571,6 +1568,7 @@ const logMismatchError = () => {
|
|
|
1571
1568
|
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
1572
1569
|
const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
|
|
1573
1570
|
const getContainerType = (container) => {
|
|
1571
|
+
if (container.nodeType !== 1) return void 0;
|
|
1574
1572
|
if (isSVGContainer(container)) return "svg";
|
|
1575
1573
|
if (isMathMLContainer(container)) return "mathml";
|
|
1576
1574
|
return void 0;
|
|
@@ -1846,6 +1844,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
1846
1844
|
}
|
|
1847
1845
|
if (props) {
|
|
1848
1846
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
1847
|
+
const isCustomElement = el.tagName.includes("-");
|
|
1849
1848
|
for (const key in props) {
|
|
1850
1849
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks
|
|
1851
1850
|
// as it could have mutated the DOM in any possible way
|
|
@@ -1853,7 +1852,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
1853
1852
|
logMismatchError();
|
|
1854
1853
|
}
|
|
1855
1854
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
1856
|
-
key[0] === ".") {
|
|
1855
|
+
key[0] === "." || isCustomElement) {
|
|
1857
1856
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
1858
1857
|
}
|
|
1859
1858
|
}
|
|
@@ -2189,24 +2188,19 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
2189
2188
|
}
|
|
2190
2189
|
}
|
|
2191
2190
|
|
|
2192
|
-
const hydrateOnIdle = () => (hydrate) => {
|
|
2193
|
-
const id = requestIdleCallback(hydrate);
|
|
2191
|
+
const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
2192
|
+
const id = requestIdleCallback(hydrate, { timeout });
|
|
2194
2193
|
return () => cancelIdleCallback(id);
|
|
2195
2194
|
};
|
|
2196
|
-
const hydrateOnVisible = (
|
|
2197
|
-
const ob = new IntersectionObserver(
|
|
2198
|
-
(entries)
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
break;
|
|
2204
|
-
}
|
|
2205
|
-
},
|
|
2206
|
-
{
|
|
2207
|
-
rootMargin: isString(margin) ? margin : margin + "px"
|
|
2195
|
+
const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
2196
|
+
const ob = new IntersectionObserver((entries) => {
|
|
2197
|
+
for (const e of entries) {
|
|
2198
|
+
if (!e.isIntersecting) continue;
|
|
2199
|
+
ob.disconnect();
|
|
2200
|
+
hydrate();
|
|
2201
|
+
break;
|
|
2208
2202
|
}
|
|
2209
|
-
);
|
|
2203
|
+
}, opts);
|
|
2210
2204
|
forEach((el) => ob.observe(el));
|
|
2211
2205
|
return () => ob.disconnect();
|
|
2212
2206
|
};
|
|
@@ -2514,14 +2508,14 @@ const KeepAliveImpl = {
|
|
|
2514
2508
|
function pruneCache(filter) {
|
|
2515
2509
|
cache.forEach((vnode, key) => {
|
|
2516
2510
|
const name = getComponentName(vnode.type);
|
|
2517
|
-
if (name &&
|
|
2511
|
+
if (name && !filter(name)) {
|
|
2518
2512
|
pruneCacheEntry(key);
|
|
2519
2513
|
}
|
|
2520
2514
|
});
|
|
2521
2515
|
}
|
|
2522
2516
|
function pruneCacheEntry(key) {
|
|
2523
2517
|
const cached = cache.get(key);
|
|
2524
|
-
if (!current || !isSameVNodeType(cached, current)) {
|
|
2518
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
2525
2519
|
unmount(cached);
|
|
2526
2520
|
} else if (current) {
|
|
2527
2521
|
resetShapeFlag(current);
|
|
@@ -2583,6 +2577,10 @@ const KeepAliveImpl = {
|
|
|
2583
2577
|
return rawVNode;
|
|
2584
2578
|
}
|
|
2585
2579
|
let vnode = getInnerChild(rawVNode);
|
|
2580
|
+
if (vnode.type === Comment) {
|
|
2581
|
+
current = null;
|
|
2582
|
+
return vnode;
|
|
2583
|
+
}
|
|
2586
2584
|
const comp = vnode.type;
|
|
2587
2585
|
const name = getComponentName(
|
|
2588
2586
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
@@ -2629,6 +2627,7 @@ function matches(pattern, name) {
|
|
|
2629
2627
|
} else if (isString(pattern)) {
|
|
2630
2628
|
return pattern.split(",").includes(name);
|
|
2631
2629
|
} else if (isRegExp(pattern)) {
|
|
2630
|
+
pattern.lastIndex = 0;
|
|
2632
2631
|
return pattern.test(name);
|
|
2633
2632
|
}
|
|
2634
2633
|
return false;
|
|
@@ -2712,17 +2711,19 @@ const createHook = (lifecycle) => (hook, target = currentInstance) => {
|
|
|
2712
2711
|
};
|
|
2713
2712
|
const onBeforeMount = createHook("bm");
|
|
2714
2713
|
const onMounted = createHook("m");
|
|
2715
|
-
const onBeforeUpdate = createHook(
|
|
2714
|
+
const onBeforeUpdate = createHook(
|
|
2715
|
+
"bu"
|
|
2716
|
+
);
|
|
2716
2717
|
const onUpdated = createHook("u");
|
|
2717
|
-
const onBeforeUnmount = createHook(
|
|
2718
|
-
|
|
2719
|
-
const onServerPrefetch = createHook("sp");
|
|
2720
|
-
const onRenderTriggered = createHook(
|
|
2721
|
-
"rtg"
|
|
2718
|
+
const onBeforeUnmount = createHook(
|
|
2719
|
+
"bum"
|
|
2722
2720
|
);
|
|
2723
|
-
const
|
|
2724
|
-
|
|
2721
|
+
const onUnmounted = createHook("um");
|
|
2722
|
+
const onServerPrefetch = createHook(
|
|
2723
|
+
"sp"
|
|
2725
2724
|
);
|
|
2725
|
+
const onRenderTriggered = createHook("rtg");
|
|
2726
|
+
const onRenderTracked = createHook("rtc");
|
|
2726
2727
|
function onErrorCaptured(hook, target = currentInstance) {
|
|
2727
2728
|
injectHook("ec", hook, target);
|
|
2728
2729
|
}
|
|
@@ -2849,9 +2850,14 @@ function createSlots(slots, dynamicSlots) {
|
|
|
2849
2850
|
}
|
|
2850
2851
|
|
|
2851
2852
|
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
2852
|
-
if (currentRenderingInstance.
|
|
2853
|
+
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
2853
2854
|
if (name !== "default") props.name = name;
|
|
2854
|
-
return
|
|
2855
|
+
return openBlock(), createBlock(
|
|
2856
|
+
Fragment,
|
|
2857
|
+
null,
|
|
2858
|
+
[createVNode("slot", props, fallback && fallback())],
|
|
2859
|
+
64
|
|
2860
|
+
);
|
|
2855
2861
|
}
|
|
2856
2862
|
let slot = slots[name];
|
|
2857
2863
|
if (!!(process.env.NODE_ENV !== "production") && slot && slot.length > 1) {
|
|
@@ -2924,6 +2930,7 @@ const publicPropertiesMap = (
|
|
|
2924
2930
|
$refs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.refs) : i.refs,
|
|
2925
2931
|
$parent: (i) => getPublicInstance(i.parent),
|
|
2926
2932
|
$root: (i) => getPublicInstance(i.root),
|
|
2933
|
+
$host: (i) => i.ce,
|
|
2927
2934
|
$emit: (i) => i.emit,
|
|
2928
2935
|
$options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
|
|
2929
2936
|
$forceUpdate: (i) => i.f || (i.f = () => {
|
|
@@ -3075,29 +3082,25 @@ if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
|
3075
3082
|
return Reflect.ownKeys(target);
|
|
3076
3083
|
};
|
|
3077
3084
|
}
|
|
3078
|
-
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
3079
|
-
{
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
get(target, key) {
|
|
3083
|
-
if (key === Symbol.unscopables) {
|
|
3084
|
-
return;
|
|
3085
|
-
}
|
|
3086
|
-
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
3087
|
-
},
|
|
3088
|
-
has(_, key) {
|
|
3089
|
-
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
3090
|
-
if (!!(process.env.NODE_ENV !== "production") && !has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
3091
|
-
warn$1(
|
|
3092
|
-
`Property ${JSON.stringify(
|
|
3093
|
-
key
|
|
3094
|
-
)} should not start with _ which is a reserved prefix for Vue internals.`
|
|
3095
|
-
);
|
|
3096
|
-
}
|
|
3097
|
-
return has;
|
|
3085
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, {
|
|
3086
|
+
get(target, key) {
|
|
3087
|
+
if (key === Symbol.unscopables) {
|
|
3088
|
+
return;
|
|
3098
3089
|
}
|
|
3090
|
+
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
3091
|
+
},
|
|
3092
|
+
has(_, key) {
|
|
3093
|
+
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
3094
|
+
if (!!(process.env.NODE_ENV !== "production") && !has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
3095
|
+
warn$1(
|
|
3096
|
+
`Property ${JSON.stringify(
|
|
3097
|
+
key
|
|
3098
|
+
)} should not start with _ which is a reserved prefix for Vue internals.`
|
|
3099
|
+
);
|
|
3100
|
+
}
|
|
3101
|
+
return has;
|
|
3099
3102
|
}
|
|
3100
|
-
);
|
|
3103
|
+
});
|
|
3101
3104
|
function createDevRenderContext(instance) {
|
|
3102
3105
|
const target = {};
|
|
3103
3106
|
Object.defineProperty(target, `_`, {
|
|
@@ -3803,7 +3806,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3803
3806
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
3804
3807
|
);
|
|
3805
3808
|
}
|
|
3806
|
-
const vnode = createVNode(rootComponent, rootProps);
|
|
3809
|
+
const vnode = app._ceVNode || createVNode(rootComponent, rootProps);
|
|
3807
3810
|
vnode.appContext = context;
|
|
3808
3811
|
if (namespace === true) {
|
|
3809
3812
|
namespace = "svg";
|
|
@@ -3905,7 +3908,7 @@ function provide(key, value) {
|
|
|
3905
3908
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
3906
3909
|
const instance = currentInstance || currentRenderingInstance;
|
|
3907
3910
|
if (instance || currentApp) {
|
|
3908
|
-
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides :
|
|
3911
|
+
const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
3909
3912
|
if (provides && key in provides) {
|
|
3910
3913
|
return provides[key];
|
|
3911
3914
|
} else if (arguments.length > 1) {
|
|
@@ -4110,6 +4113,9 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
|
4110
4113
|
} else {
|
|
4111
4114
|
value = defaultValue;
|
|
4112
4115
|
}
|
|
4116
|
+
if (instance.ce) {
|
|
4117
|
+
instance.ce._setProp(key, value);
|
|
4118
|
+
}
|
|
4113
4119
|
}
|
|
4114
4120
|
if (opt[0 /* shouldCast */]) {
|
|
4115
4121
|
if (isAbsent && !hasDefault) {
|
|
@@ -5146,8 +5152,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5146
5152
|
const componentUpdateFn = () => {
|
|
5147
5153
|
if (!instance.isMounted) {
|
|
5148
5154
|
let vnodeHook;
|
|
5149
|
-
const { el, props
|
|
5150
|
-
const { bm, m, parent } = instance;
|
|
5155
|
+
const { el, props } = initialVNode;
|
|
5156
|
+
const { bm, m, parent, root, type } = instance;
|
|
5151
5157
|
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
5152
5158
|
toggleRecurse(instance, false);
|
|
5153
5159
|
if (bm) {
|
|
@@ -5190,6 +5196,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5190
5196
|
hydrateSubTree();
|
|
5191
5197
|
}
|
|
5192
5198
|
} else {
|
|
5199
|
+
if (root.ce) {
|
|
5200
|
+
root.ce._injectChildStyle(type);
|
|
5201
|
+
}
|
|
5193
5202
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
5194
5203
|
startMeasure(instance, `render`);
|
|
5195
5204
|
}
|
|
@@ -5863,13 +5872,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5863
5872
|
namespace
|
|
5864
5873
|
);
|
|
5865
5874
|
}
|
|
5875
|
+
container._vnode = vnode;
|
|
5866
5876
|
if (!isFlushing) {
|
|
5867
5877
|
isFlushing = true;
|
|
5868
5878
|
flushPreFlushCbs();
|
|
5869
5879
|
flushPostFlushCbs();
|
|
5870
5880
|
isFlushing = false;
|
|
5871
5881
|
}
|
|
5872
|
-
container._vnode = vnode;
|
|
5873
5882
|
};
|
|
5874
5883
|
const internals = {
|
|
5875
5884
|
p: patch,
|
|
@@ -6043,14 +6052,9 @@ function doWatch(source, cb, {
|
|
|
6043
6052
|
const _cb = cb;
|
|
6044
6053
|
cb = (...args) => {
|
|
6045
6054
|
_cb(...args);
|
|
6046
|
-
|
|
6055
|
+
watchHandle();
|
|
6047
6056
|
};
|
|
6048
6057
|
}
|
|
6049
|
-
if (!!(process.env.NODE_ENV !== "production") && deep !== void 0 && typeof deep === "number") {
|
|
6050
|
-
warn$1(
|
|
6051
|
-
`watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`
|
|
6052
|
-
);
|
|
6053
|
-
}
|
|
6054
6058
|
if (!!(process.env.NODE_ENV !== "production") && !cb) {
|
|
6055
6059
|
if (immediate !== void 0) {
|
|
6056
6060
|
warn$1(
|
|
@@ -6076,10 +6080,12 @@ function doWatch(source, cb, {
|
|
|
6076
6080
|
);
|
|
6077
6081
|
};
|
|
6078
6082
|
const instance = currentInstance;
|
|
6079
|
-
const reactiveGetter = (source2) =>
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
+
const reactiveGetter = (source2) => {
|
|
6084
|
+
if (deep) return source2;
|
|
6085
|
+
if (isShallow(source2) || deep === false || deep === 0)
|
|
6086
|
+
return traverse(source2, 1);
|
|
6087
|
+
return traverse(source2);
|
|
6088
|
+
};
|
|
6083
6089
|
let getter;
|
|
6084
6090
|
let forceTrigger = false;
|
|
6085
6091
|
let isMultiSource = false;
|
|
@@ -6125,7 +6131,8 @@ function doWatch(source, cb, {
|
|
|
6125
6131
|
}
|
|
6126
6132
|
if (cb && deep) {
|
|
6127
6133
|
const baseGetter = getter;
|
|
6128
|
-
|
|
6134
|
+
const depth = deep === true ? Infinity : deep;
|
|
6135
|
+
getter = () => traverse(baseGetter(), depth);
|
|
6129
6136
|
}
|
|
6130
6137
|
let cleanup;
|
|
6131
6138
|
let onCleanup = (fn) => {
|
|
@@ -6150,7 +6157,12 @@ function doWatch(source, cb, {
|
|
|
6150
6157
|
const ctx = useSSRContext();
|
|
6151
6158
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
6152
6159
|
} else {
|
|
6153
|
-
|
|
6160
|
+
const watchHandle2 = () => {
|
|
6161
|
+
};
|
|
6162
|
+
watchHandle2.stop = NOOP;
|
|
6163
|
+
watchHandle2.resume = NOOP;
|
|
6164
|
+
watchHandle2.pause = NOOP;
|
|
6165
|
+
return watchHandle2;
|
|
6154
6166
|
}
|
|
6155
6167
|
}
|
|
6156
6168
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -6180,7 +6192,6 @@ function doWatch(source, cb, {
|
|
|
6180
6192
|
const effect = new ReactiveEffect(getter);
|
|
6181
6193
|
let scheduler;
|
|
6182
6194
|
if (flush === "sync") {
|
|
6183
|
-
effect.flags |= 64;
|
|
6184
6195
|
scheduler = job;
|
|
6185
6196
|
} else if (flush === "post") {
|
|
6186
6197
|
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
@@ -6191,12 +6202,15 @@ function doWatch(source, cb, {
|
|
|
6191
6202
|
}
|
|
6192
6203
|
effect.scheduler = scheduler;
|
|
6193
6204
|
const scope = getCurrentScope();
|
|
6194
|
-
const
|
|
6205
|
+
const watchHandle = () => {
|
|
6195
6206
|
effect.stop();
|
|
6196
6207
|
if (scope) {
|
|
6197
6208
|
remove(scope.effects, effect);
|
|
6198
6209
|
}
|
|
6199
6210
|
};
|
|
6211
|
+
watchHandle.pause = effect.pause.bind(effect);
|
|
6212
|
+
watchHandle.resume = effect.resume.bind(effect);
|
|
6213
|
+
watchHandle.stop = watchHandle;
|
|
6200
6214
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6201
6215
|
effect.onTrack = onTrack;
|
|
6202
6216
|
effect.onTrigger = onTrigger;
|
|
@@ -6215,8 +6229,8 @@ function doWatch(source, cb, {
|
|
|
6215
6229
|
} else {
|
|
6216
6230
|
effect.run();
|
|
6217
6231
|
}
|
|
6218
|
-
if (ssrCleanup) ssrCleanup.push(
|
|
6219
|
-
return
|
|
6232
|
+
if (ssrCleanup) ssrCleanup.push(watchHandle);
|
|
6233
|
+
return watchHandle;
|
|
6220
6234
|
}
|
|
6221
6235
|
function instanceWatch(source, value, options) {
|
|
6222
6236
|
const publicThis = this.proxy;
|
|
@@ -6306,7 +6320,8 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
6306
6320
|
return options.get ? options.get(localValue) : localValue;
|
|
6307
6321
|
},
|
|
6308
6322
|
set(value) {
|
|
6309
|
-
|
|
6323
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
6324
|
+
if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
|
|
6310
6325
|
return;
|
|
6311
6326
|
}
|
|
6312
6327
|
const rawProps = i.vnode.props;
|
|
@@ -6315,7 +6330,6 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
6315
6330
|
localValue = value;
|
|
6316
6331
|
trigger();
|
|
6317
6332
|
}
|
|
6318
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
6319
6333
|
i.emit(`update:${name}`, emittedValue);
|
|
6320
6334
|
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
|
|
6321
6335
|
trigger();
|
|
@@ -6353,9 +6367,9 @@ function emit(instance, event, ...rawArgs) {
|
|
|
6353
6367
|
} = instance;
|
|
6354
6368
|
if (emitsOptions) {
|
|
6355
6369
|
if (!(event in emitsOptions) && true) {
|
|
6356
|
-
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
6370
|
+
if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
|
|
6357
6371
|
warn$1(
|
|
6358
|
-
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
6372
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
|
|
6359
6373
|
);
|
|
6360
6374
|
}
|
|
6361
6375
|
} else {
|
|
@@ -8193,11 +8207,16 @@ function useTemplateRef(key) {
|
|
|
8193
8207
|
const r = shallowRef(null);
|
|
8194
8208
|
if (i) {
|
|
8195
8209
|
const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8210
|
+
let desc;
|
|
8211
|
+
if (!!(process.env.NODE_ENV !== "production") && (desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
|
|
8212
|
+
warn$1(`useTemplateRef('${key}') already exists.`);
|
|
8213
|
+
} else {
|
|
8214
|
+
Object.defineProperty(refs, key, {
|
|
8215
|
+
enumerable: true,
|
|
8216
|
+
get: () => r.value,
|
|
8217
|
+
set: (val) => r.value = val
|
|
8218
|
+
});
|
|
8219
|
+
}
|
|
8201
8220
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
8202
8221
|
warn$1(
|
|
8203
8222
|
`useTemplateRef() is called when there is no active component instance to be associated with.`
|
|
@@ -8431,7 +8450,7 @@ function isMemoSame(cached, memo) {
|
|
|
8431
8450
|
return true;
|
|
8432
8451
|
}
|
|
8433
8452
|
|
|
8434
|
-
const version = "3.5.0-
|
|
8453
|
+
const version = "3.5.0-beta.2";
|
|
8435
8454
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8436
8455
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8437
8456
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -8443,7 +8462,8 @@ const _ssrUtils = {
|
|
|
8443
8462
|
setCurrentRenderingInstance,
|
|
8444
8463
|
isVNode: isVNode,
|
|
8445
8464
|
normalizeVNode,
|
|
8446
|
-
getComponentPublicInstance
|
|
8465
|
+
getComponentPublicInstance,
|
|
8466
|
+
ensureValidVNode
|
|
8447
8467
|
};
|
|
8448
8468
|
const ssrUtils = _ssrUtils ;
|
|
8449
8469
|
const resolveFilter = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.5.0-
|
|
3
|
+
"version": "3.5.0-beta.2",
|
|
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/
|
|
50
|
-
"@vue/
|
|
49
|
+
"@vue/reactivity": "3.5.0-beta.2",
|
|
50
|
+
"@vue/shared": "3.5.0-beta.2"
|
|
51
51
|
}
|
|
52
52
|
}
|