@vue/runtime-core 3.5.25 → 3.5.26
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 +218 -192
- package/dist/runtime-core.cjs.prod.js +175 -155
- package/dist/runtime-core.d.ts +2 -2
- package/dist/runtime-core.esm-bundler.js +219 -193
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.26
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, isReadonly, shallowReadArray, toReadonly, toReactive, shallowReadonly, track, reactive,
|
|
6
|
+
import { pauseTracking, resetTracking, isRef, toRaw, traverse, watch as watch$1, shallowRef, readonly, isReactive, ref, isShallow, isReadonly, shallowReadArray, toReadonly, toReactive, shallowReadonly, track, reactive, customRef, shallowReactive, trigger, ReactiveEffect, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1 } from '@vue/reactivity';
|
|
7
7
|
export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
|
|
8
8
|
import { isString, isFunction, EMPTY_OBJ, isPromise, isArray, NOOP, getGlobalThis, extend, isBuiltInDirective, NO, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, normalizeCssVarValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, camelize, capitalize, isSymbol, isGloballyAllowed, hyphenate, hasChanged, looseToNumber, isModelListener, EMPTY_ARR, makeMap, toRawType, toNumber } from '@vue/shared';
|
|
9
9
|
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
|
|
@@ -768,7 +768,180 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
770
|
|
|
771
|
-
|
|
771
|
+
function provide(key, value) {
|
|
772
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
773
|
+
if (!currentInstance || currentInstance.isMounted) {
|
|
774
|
+
warn$1(`provide() can only be used inside setup().`);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
if (currentInstance) {
|
|
778
|
+
let provides = currentInstance.provides;
|
|
779
|
+
const parentProvides = currentInstance.parent && currentInstance.parent.provides;
|
|
780
|
+
if (parentProvides === provides) {
|
|
781
|
+
provides = currentInstance.provides = Object.create(parentProvides);
|
|
782
|
+
}
|
|
783
|
+
provides[key] = value;
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
787
|
+
const instance = getCurrentInstance();
|
|
788
|
+
if (instance || currentApp) {
|
|
789
|
+
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
790
|
+
if (provides && key in provides) {
|
|
791
|
+
return provides[key];
|
|
792
|
+
} else if (arguments.length > 1) {
|
|
793
|
+
return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
|
|
794
|
+
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
795
|
+
warn$1(`injection "${String(key)}" not found.`);
|
|
796
|
+
}
|
|
797
|
+
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
798
|
+
warn$1(`inject() can only be used inside setup() or functional components.`);
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
function hasInjectionContext() {
|
|
802
|
+
return !!(getCurrentInstance() || currentApp);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
|
|
806
|
+
const useSSRContext = () => {
|
|
807
|
+
{
|
|
808
|
+
const ctx = inject(ssrContextKey);
|
|
809
|
+
if (!ctx) {
|
|
810
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
811
|
+
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
812
|
+
);
|
|
813
|
+
}
|
|
814
|
+
return ctx;
|
|
815
|
+
}
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
function watchEffect(effect, options) {
|
|
819
|
+
return doWatch(effect, null, options);
|
|
820
|
+
}
|
|
821
|
+
function watchPostEffect(effect, options) {
|
|
822
|
+
return doWatch(
|
|
823
|
+
effect,
|
|
824
|
+
null,
|
|
825
|
+
!!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "post" }) : { flush: "post" }
|
|
826
|
+
);
|
|
827
|
+
}
|
|
828
|
+
function watchSyncEffect(effect, options) {
|
|
829
|
+
return doWatch(
|
|
830
|
+
effect,
|
|
831
|
+
null,
|
|
832
|
+
!!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "sync" }) : { flush: "sync" }
|
|
833
|
+
);
|
|
834
|
+
}
|
|
835
|
+
function watch(source, cb, options) {
|
|
836
|
+
if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) {
|
|
837
|
+
warn$1(
|
|
838
|
+
`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
|
|
839
|
+
);
|
|
840
|
+
}
|
|
841
|
+
return doWatch(source, cb, options);
|
|
842
|
+
}
|
|
843
|
+
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
844
|
+
const { immediate, deep, flush, once } = options;
|
|
845
|
+
if (!!(process.env.NODE_ENV !== "production") && !cb) {
|
|
846
|
+
if (immediate !== void 0) {
|
|
847
|
+
warn$1(
|
|
848
|
+
`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
|
|
849
|
+
);
|
|
850
|
+
}
|
|
851
|
+
if (deep !== void 0) {
|
|
852
|
+
warn$1(
|
|
853
|
+
`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
|
|
854
|
+
);
|
|
855
|
+
}
|
|
856
|
+
if (once !== void 0) {
|
|
857
|
+
warn$1(
|
|
858
|
+
`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
|
|
859
|
+
);
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
const baseWatchOptions = extend({}, options);
|
|
863
|
+
if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
|
|
864
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
865
|
+
let ssrCleanup;
|
|
866
|
+
if (isInSSRComponentSetup) {
|
|
867
|
+
if (flush === "sync") {
|
|
868
|
+
const ctx = useSSRContext();
|
|
869
|
+
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
870
|
+
} else if (!runsImmediately) {
|
|
871
|
+
const watchStopHandle = () => {
|
|
872
|
+
};
|
|
873
|
+
watchStopHandle.stop = NOOP;
|
|
874
|
+
watchStopHandle.resume = NOOP;
|
|
875
|
+
watchStopHandle.pause = NOOP;
|
|
876
|
+
return watchStopHandle;
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
const instance = currentInstance;
|
|
880
|
+
baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
|
|
881
|
+
let isPre = false;
|
|
882
|
+
if (flush === "post") {
|
|
883
|
+
baseWatchOptions.scheduler = (job) => {
|
|
884
|
+
queuePostRenderEffect(job, instance && instance.suspense);
|
|
885
|
+
};
|
|
886
|
+
} else if (flush !== "sync") {
|
|
887
|
+
isPre = true;
|
|
888
|
+
baseWatchOptions.scheduler = (job, isFirstRun) => {
|
|
889
|
+
if (isFirstRun) {
|
|
890
|
+
job();
|
|
891
|
+
} else {
|
|
892
|
+
queueJob(job);
|
|
893
|
+
}
|
|
894
|
+
};
|
|
895
|
+
}
|
|
896
|
+
baseWatchOptions.augmentJob = (job) => {
|
|
897
|
+
if (cb) {
|
|
898
|
+
job.flags |= 4;
|
|
899
|
+
}
|
|
900
|
+
if (isPre) {
|
|
901
|
+
job.flags |= 2;
|
|
902
|
+
if (instance) {
|
|
903
|
+
job.id = instance.uid;
|
|
904
|
+
job.i = instance;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
};
|
|
908
|
+
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
909
|
+
if (isInSSRComponentSetup) {
|
|
910
|
+
if (ssrCleanup) {
|
|
911
|
+
ssrCleanup.push(watchHandle);
|
|
912
|
+
} else if (runsImmediately) {
|
|
913
|
+
watchHandle();
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
return watchHandle;
|
|
917
|
+
}
|
|
918
|
+
function instanceWatch(source, value, options) {
|
|
919
|
+
const publicThis = this.proxy;
|
|
920
|
+
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
921
|
+
let cb;
|
|
922
|
+
if (isFunction(value)) {
|
|
923
|
+
cb = value;
|
|
924
|
+
} else {
|
|
925
|
+
cb = value.handler;
|
|
926
|
+
options = value;
|
|
927
|
+
}
|
|
928
|
+
const reset = setCurrentInstance(this);
|
|
929
|
+
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
930
|
+
reset();
|
|
931
|
+
return res;
|
|
932
|
+
}
|
|
933
|
+
function createPathGetter(ctx, path) {
|
|
934
|
+
const segments = path.split(".");
|
|
935
|
+
return () => {
|
|
936
|
+
let cur = ctx;
|
|
937
|
+
for (let i = 0; i < segments.length && cur; i++) {
|
|
938
|
+
cur = cur[segments[i]];
|
|
939
|
+
}
|
|
940
|
+
return cur;
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
|
|
772
945
|
const isTeleport = (type) => type.__isTeleport;
|
|
773
946
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
774
947
|
const isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
|
|
@@ -1128,8 +1301,8 @@ function prepareAnchor(target, vnode, createText, insert) {
|
|
|
1128
1301
|
return targetAnchor;
|
|
1129
1302
|
}
|
|
1130
1303
|
|
|
1131
|
-
const leaveCbKey = Symbol("_leaveCb");
|
|
1132
|
-
const enterCbKey = Symbol("_enterCb");
|
|
1304
|
+
const leaveCbKey = /* @__PURE__ */ Symbol("_leaveCb");
|
|
1305
|
+
const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
|
|
1133
1306
|
function useTransitionState() {
|
|
1134
1307
|
const state = {
|
|
1135
1308
|
isMounted: false,
|
|
@@ -2678,7 +2851,9 @@ const KeepAliveImpl = {
|
|
|
2678
2851
|
}
|
|
2679
2852
|
function pruneCache(filter) {
|
|
2680
2853
|
cache.forEach((vnode, key) => {
|
|
2681
|
-
const name = getComponentName(
|
|
2854
|
+
const name = getComponentName(
|
|
2855
|
+
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : vnode.type
|
|
2856
|
+
);
|
|
2682
2857
|
if (name && !filter(name)) {
|
|
2683
2858
|
pruneCacheEntry(key);
|
|
2684
2859
|
}
|
|
@@ -2905,7 +3080,7 @@ const DIRECTIVES = "directives";
|
|
|
2905
3080
|
function resolveComponent(name, maybeSelfReference) {
|
|
2906
3081
|
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
2907
3082
|
}
|
|
2908
|
-
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
3083
|
+
const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
|
|
2909
3084
|
function resolveDynamicComponent(component) {
|
|
2910
3085
|
if (isString(component)) {
|
|
2911
3086
|
return resolveAsset(COMPONENTS, component, false) || component;
|
|
@@ -4073,179 +4248,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
4073
4248
|
}
|
|
4074
4249
|
let currentApp = null;
|
|
4075
4250
|
|
|
4076
|
-
function provide(key, value) {
|
|
4077
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4078
|
-
if (!currentInstance || currentInstance.isMounted) {
|
|
4079
|
-
warn$1(`provide() can only be used inside setup().`);
|
|
4080
|
-
}
|
|
4081
|
-
}
|
|
4082
|
-
if (currentInstance) {
|
|
4083
|
-
let provides = currentInstance.provides;
|
|
4084
|
-
const parentProvides = currentInstance.parent && currentInstance.parent.provides;
|
|
4085
|
-
if (parentProvides === provides) {
|
|
4086
|
-
provides = currentInstance.provides = Object.create(parentProvides);
|
|
4087
|
-
}
|
|
4088
|
-
provides[key] = value;
|
|
4089
|
-
}
|
|
4090
|
-
}
|
|
4091
|
-
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
4092
|
-
const instance = getCurrentInstance();
|
|
4093
|
-
if (instance || currentApp) {
|
|
4094
|
-
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
4095
|
-
if (provides && key in provides) {
|
|
4096
|
-
return provides[key];
|
|
4097
|
-
} else if (arguments.length > 1) {
|
|
4098
|
-
return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
|
|
4099
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4100
|
-
warn$1(`injection "${String(key)}" not found.`);
|
|
4101
|
-
}
|
|
4102
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4103
|
-
warn$1(`inject() can only be used inside setup() or functional components.`);
|
|
4104
|
-
}
|
|
4105
|
-
}
|
|
4106
|
-
function hasInjectionContext() {
|
|
4107
|
-
return !!(getCurrentInstance() || currentApp);
|
|
4108
|
-
}
|
|
4109
|
-
|
|
4110
|
-
const ssrContextKey = Symbol.for("v-scx");
|
|
4111
|
-
const useSSRContext = () => {
|
|
4112
|
-
{
|
|
4113
|
-
const ctx = inject(ssrContextKey);
|
|
4114
|
-
if (!ctx) {
|
|
4115
|
-
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
4116
|
-
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
4117
|
-
);
|
|
4118
|
-
}
|
|
4119
|
-
return ctx;
|
|
4120
|
-
}
|
|
4121
|
-
};
|
|
4122
|
-
|
|
4123
|
-
function watchEffect(effect, options) {
|
|
4124
|
-
return doWatch(effect, null, options);
|
|
4125
|
-
}
|
|
4126
|
-
function watchPostEffect(effect, options) {
|
|
4127
|
-
return doWatch(
|
|
4128
|
-
effect,
|
|
4129
|
-
null,
|
|
4130
|
-
!!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "post" }) : { flush: "post" }
|
|
4131
|
-
);
|
|
4132
|
-
}
|
|
4133
|
-
function watchSyncEffect(effect, options) {
|
|
4134
|
-
return doWatch(
|
|
4135
|
-
effect,
|
|
4136
|
-
null,
|
|
4137
|
-
!!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "sync" }) : { flush: "sync" }
|
|
4138
|
-
);
|
|
4139
|
-
}
|
|
4140
|
-
function watch(source, cb, options) {
|
|
4141
|
-
if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) {
|
|
4142
|
-
warn$1(
|
|
4143
|
-
`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
|
|
4144
|
-
);
|
|
4145
|
-
}
|
|
4146
|
-
return doWatch(source, cb, options);
|
|
4147
|
-
}
|
|
4148
|
-
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
4149
|
-
const { immediate, deep, flush, once } = options;
|
|
4150
|
-
if (!!(process.env.NODE_ENV !== "production") && !cb) {
|
|
4151
|
-
if (immediate !== void 0) {
|
|
4152
|
-
warn$1(
|
|
4153
|
-
`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
|
|
4154
|
-
);
|
|
4155
|
-
}
|
|
4156
|
-
if (deep !== void 0) {
|
|
4157
|
-
warn$1(
|
|
4158
|
-
`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
|
|
4159
|
-
);
|
|
4160
|
-
}
|
|
4161
|
-
if (once !== void 0) {
|
|
4162
|
-
warn$1(
|
|
4163
|
-
`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
|
|
4164
|
-
);
|
|
4165
|
-
}
|
|
4166
|
-
}
|
|
4167
|
-
const baseWatchOptions = extend({}, options);
|
|
4168
|
-
if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
|
|
4169
|
-
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
4170
|
-
let ssrCleanup;
|
|
4171
|
-
if (isInSSRComponentSetup) {
|
|
4172
|
-
if (flush === "sync") {
|
|
4173
|
-
const ctx = useSSRContext();
|
|
4174
|
-
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
4175
|
-
} else if (!runsImmediately) {
|
|
4176
|
-
const watchStopHandle = () => {
|
|
4177
|
-
};
|
|
4178
|
-
watchStopHandle.stop = NOOP;
|
|
4179
|
-
watchStopHandle.resume = NOOP;
|
|
4180
|
-
watchStopHandle.pause = NOOP;
|
|
4181
|
-
return watchStopHandle;
|
|
4182
|
-
}
|
|
4183
|
-
}
|
|
4184
|
-
const instance = currentInstance;
|
|
4185
|
-
baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
|
|
4186
|
-
let isPre = false;
|
|
4187
|
-
if (flush === "post") {
|
|
4188
|
-
baseWatchOptions.scheduler = (job) => {
|
|
4189
|
-
queuePostRenderEffect(job, instance && instance.suspense);
|
|
4190
|
-
};
|
|
4191
|
-
} else if (flush !== "sync") {
|
|
4192
|
-
isPre = true;
|
|
4193
|
-
baseWatchOptions.scheduler = (job, isFirstRun) => {
|
|
4194
|
-
if (isFirstRun) {
|
|
4195
|
-
job();
|
|
4196
|
-
} else {
|
|
4197
|
-
queueJob(job);
|
|
4198
|
-
}
|
|
4199
|
-
};
|
|
4200
|
-
}
|
|
4201
|
-
baseWatchOptions.augmentJob = (job) => {
|
|
4202
|
-
if (cb) {
|
|
4203
|
-
job.flags |= 4;
|
|
4204
|
-
}
|
|
4205
|
-
if (isPre) {
|
|
4206
|
-
job.flags |= 2;
|
|
4207
|
-
if (instance) {
|
|
4208
|
-
job.id = instance.uid;
|
|
4209
|
-
job.i = instance;
|
|
4210
|
-
}
|
|
4211
|
-
}
|
|
4212
|
-
};
|
|
4213
|
-
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
4214
|
-
if (isInSSRComponentSetup) {
|
|
4215
|
-
if (ssrCleanup) {
|
|
4216
|
-
ssrCleanup.push(watchHandle);
|
|
4217
|
-
} else if (runsImmediately) {
|
|
4218
|
-
watchHandle();
|
|
4219
|
-
}
|
|
4220
|
-
}
|
|
4221
|
-
return watchHandle;
|
|
4222
|
-
}
|
|
4223
|
-
function instanceWatch(source, value, options) {
|
|
4224
|
-
const publicThis = this.proxy;
|
|
4225
|
-
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
4226
|
-
let cb;
|
|
4227
|
-
if (isFunction(value)) {
|
|
4228
|
-
cb = value;
|
|
4229
|
-
} else {
|
|
4230
|
-
cb = value.handler;
|
|
4231
|
-
options = value;
|
|
4232
|
-
}
|
|
4233
|
-
const reset = setCurrentInstance(this);
|
|
4234
|
-
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
4235
|
-
reset();
|
|
4236
|
-
return res;
|
|
4237
|
-
}
|
|
4238
|
-
function createPathGetter(ctx, path) {
|
|
4239
|
-
const segments = path.split(".");
|
|
4240
|
-
return () => {
|
|
4241
|
-
let cur = ctx;
|
|
4242
|
-
for (let i = 0; i < segments.length && cur; i++) {
|
|
4243
|
-
cur = cur[segments[i]];
|
|
4244
|
-
}
|
|
4245
|
-
return cur;
|
|
4246
|
-
};
|
|
4247
|
-
}
|
|
4248
|
-
|
|
4249
4251
|
function useModel(props, name, options = EMPTY_OBJ) {
|
|
4250
4252
|
const i = getCurrentInstance();
|
|
4251
4253
|
if (!!(process.env.NODE_ENV !== "production") && !i) {
|
|
@@ -5455,7 +5457,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5455
5457
|
} else {
|
|
5456
5458
|
const el = n2.el = n1.el;
|
|
5457
5459
|
if (n2.children !== n1.children) {
|
|
5458
|
-
|
|
5460
|
+
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating && n2.patchFlag === -1 && "__elIndex" in n1) {
|
|
5461
|
+
const childNodes = container.childNodes;
|
|
5462
|
+
const newChild = hostCreateText(n2.children);
|
|
5463
|
+
const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
|
|
5464
|
+
hostInsert(newChild, container, oldChild);
|
|
5465
|
+
hostRemove(oldChild);
|
|
5466
|
+
} else {
|
|
5467
|
+
hostSetText(el, n2.children);
|
|
5468
|
+
}
|
|
5459
5469
|
}
|
|
5460
5470
|
}
|
|
5461
5471
|
};
|
|
@@ -5839,7 +5849,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5839
5849
|
} else {
|
|
5840
5850
|
if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
|
|
5841
5851
|
// of renderSlot() with no valid children
|
|
5842
|
-
n1.dynamicChildren) {
|
|
5852
|
+
n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) {
|
|
5843
5853
|
patchBlockChildren(
|
|
5844
5854
|
n1.dynamicChildren,
|
|
5845
5855
|
dynamicChildren,
|
|
@@ -6441,8 +6451,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6441
6451
|
const nextChild = c2[nextIndex];
|
|
6442
6452
|
const anchorVNode = c2[nextIndex + 1];
|
|
6443
6453
|
const anchor = nextIndex + 1 < l2 ? (
|
|
6444
|
-
// #13559, fallback to el placeholder for unresolved async component
|
|
6445
|
-
anchorVNode.el || anchorVNode
|
|
6454
|
+
// #13559, #14173 fallback to el placeholder for unresolved async component
|
|
6455
|
+
anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
|
|
6446
6456
|
) : parentAnchor;
|
|
6447
6457
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
6448
6458
|
patch(
|
|
@@ -6698,9 +6708,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6698
6708
|
};
|
|
6699
6709
|
let isFlushing = false;
|
|
6700
6710
|
const render = (vnode, container, namespace) => {
|
|
6711
|
+
let instance;
|
|
6701
6712
|
if (vnode == null) {
|
|
6702
6713
|
if (container._vnode) {
|
|
6703
6714
|
unmount(container._vnode, null, null, true);
|
|
6715
|
+
instance = container._vnode.component;
|
|
6704
6716
|
}
|
|
6705
6717
|
} else {
|
|
6706
6718
|
patch(
|
|
@@ -6716,7 +6728,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6716
6728
|
container._vnode = vnode;
|
|
6717
6729
|
if (!isFlushing) {
|
|
6718
6730
|
isFlushing = true;
|
|
6719
|
-
flushPreFlushCbs();
|
|
6731
|
+
flushPreFlushCbs(instance);
|
|
6720
6732
|
flushPostFlushCbs();
|
|
6721
6733
|
isFlushing = false;
|
|
6722
6734
|
}
|
|
@@ -6776,9 +6788,13 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
6776
6788
|
if (!shallow && c2.patchFlag !== -2)
|
|
6777
6789
|
traverseStaticChildren(c1, c2);
|
|
6778
6790
|
}
|
|
6779
|
-
if (c2.type === Text
|
|
6780
|
-
|
|
6781
|
-
|
|
6791
|
+
if (c2.type === Text) {
|
|
6792
|
+
if (c2.patchFlag !== -1) {
|
|
6793
|
+
c2.el = c1.el;
|
|
6794
|
+
} else {
|
|
6795
|
+
c2.__elIndex = i + // take fragment start anchor into account
|
|
6796
|
+
(n1.type === Fragment ? 1 : 0);
|
|
6797
|
+
}
|
|
6782
6798
|
}
|
|
6783
6799
|
if (c2.type === Comment && !c2.el) {
|
|
6784
6800
|
c2.el = c1.el;
|
|
@@ -6845,6 +6861,16 @@ function invalidateMount(hooks) {
|
|
|
6845
6861
|
hooks[i].flags |= 8;
|
|
6846
6862
|
}
|
|
6847
6863
|
}
|
|
6864
|
+
function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
6865
|
+
if (anchorVnode.placeholder) {
|
|
6866
|
+
return anchorVnode.placeholder;
|
|
6867
|
+
}
|
|
6868
|
+
const instance = anchorVnode.component;
|
|
6869
|
+
if (instance) {
|
|
6870
|
+
return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
6871
|
+
}
|
|
6872
|
+
return null;
|
|
6873
|
+
}
|
|
6848
6874
|
|
|
6849
6875
|
const isSuspense = (type) => type.__isSuspense;
|
|
6850
6876
|
let suspenseId = 0;
|
|
@@ -7447,10 +7473,10 @@ function isVNodeSuspensible(vnode) {
|
|
|
7447
7473
|
return suspensible != null && suspensible !== false;
|
|
7448
7474
|
}
|
|
7449
7475
|
|
|
7450
|
-
const Fragment = Symbol.for("v-fgt");
|
|
7451
|
-
const Text = Symbol.for("v-txt");
|
|
7452
|
-
const Comment = Symbol.for("v-cmt");
|
|
7453
|
-
const Static = Symbol.for("v-stc");
|
|
7476
|
+
const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
|
|
7477
|
+
const Text = /* @__PURE__ */ Symbol.for("v-txt");
|
|
7478
|
+
const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
|
|
7479
|
+
const Static = /* @__PURE__ */ Symbol.for("v-stc");
|
|
7454
7480
|
const blockStack = [];
|
|
7455
7481
|
let currentBlock = null;
|
|
7456
7482
|
function openBlock(disableTracking = false) {
|
|
@@ -8508,7 +8534,7 @@ function isMemoSame(cached, memo) {
|
|
|
8508
8534
|
return true;
|
|
8509
8535
|
}
|
|
8510
8536
|
|
|
8511
|
-
const version = "3.5.
|
|
8537
|
+
const version = "3.5.26";
|
|
8512
8538
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8513
8539
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8514
8540
|
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": "@vue/runtime-core",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.26",
|
|
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.5.
|
|
50
|
-
"@vue/reactivity": "3.5.
|
|
49
|
+
"@vue/shared": "3.5.26",
|
|
50
|
+
"@vue/reactivity": "3.5.26"
|
|
51
51
|
}
|
|
52
52
|
}
|