@vue/compat 3.6.0-beta.13 → 3.6.0-beta.15
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 +2 -2
- package/dist/vue-compat.d.ts +1 -1
- package/dist/vue.cjs.js +107 -48
- package/dist/vue.cjs.prod.js +38 -16
- package/dist/vue.esm-browser.js +103 -47
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +103 -47
- package/dist/vue.global.js +103 -47
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +103 -47
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +103 -47
- package/dist/vue.runtime.global.js +103 -47
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-beta.
|
|
2
|
+
* @vue/compat v3.6.0-beta.15
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2251,8 +2251,9 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2251
2251
|
if (once && cb) {
|
|
2252
2252
|
const _cb = cb;
|
|
2253
2253
|
cb = (...args) => {
|
|
2254
|
-
_cb(...args);
|
|
2254
|
+
const res = _cb(...args);
|
|
2255
2255
|
this.stop();
|
|
2256
|
+
return res;
|
|
2256
2257
|
};
|
|
2257
2258
|
}
|
|
2258
2259
|
this.cb = cb;
|
|
@@ -2268,7 +2269,7 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2268
2269
|
if (!this.cb) return;
|
|
2269
2270
|
const { immediate, deep, call } = this.options;
|
|
2270
2271
|
if (initialRun && !immediate) return;
|
|
2271
|
-
if (deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2272
|
+
if (initialRun || deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2272
2273
|
cleanup(this);
|
|
2273
2274
|
const currentWatcher = activeWatcher;
|
|
2274
2275
|
activeWatcher = this;
|
|
@@ -2695,6 +2696,7 @@ function flushJobs(seen) {
|
|
|
2695
2696
|
}
|
|
2696
2697
|
flushIndex = 0;
|
|
2697
2698
|
jobsLength = 0;
|
|
2699
|
+
jobs.length = 0;
|
|
2698
2700
|
flushPostFlushCbs(seen);
|
|
2699
2701
|
currentFlushPromise = null;
|
|
2700
2702
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
@@ -2752,6 +2754,14 @@ function createRecord(id, initialDef) {
|
|
|
2752
2754
|
function normalizeClassComponent(component) {
|
|
2753
2755
|
return isClassComponent(component) ? component.__vccOpts : component;
|
|
2754
2756
|
}
|
|
2757
|
+
function hasDirtyAncestor(instance, dirtyInstances) {
|
|
2758
|
+
let parent = instance.parent;
|
|
2759
|
+
while (parent) {
|
|
2760
|
+
if (dirtyInstances.has(parent)) return true;
|
|
2761
|
+
parent = parent.parent;
|
|
2762
|
+
}
|
|
2763
|
+
return false;
|
|
2764
|
+
}
|
|
2755
2765
|
function rerender(id, newRender) {
|
|
2756
2766
|
const record = map.get(id);
|
|
2757
2767
|
if (!record) return;
|
|
@@ -2783,42 +2793,69 @@ function reload(id, newComp) {
|
|
|
2783
2793
|
const isVapor = record.initialDef.__vapor;
|
|
2784
2794
|
updateComponentDef(record.initialDef, newComp);
|
|
2785
2795
|
const instances = [...record.instances];
|
|
2786
|
-
if (isVapor && newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2796
|
+
if (isVapor && newComp.__vapor && !instances.some((instance) => instance.parent && !instance.parent.vapor) && !instances.some((i) => i.ceReload)) {
|
|
2787
2797
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
const
|
|
2791
|
-
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2792
|
-
if (!dirtyInstances) {
|
|
2793
|
-
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2794
|
-
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2795
|
-
}
|
|
2796
|
-
dirtyInstances.add(instance);
|
|
2797
|
-
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2798
|
-
instance.appContext.propsCache.delete(instance.type);
|
|
2799
|
-
instance.appContext.emitsCache.delete(instance.type);
|
|
2800
|
-
instance.appContext.optionsCache.delete(instance.type);
|
|
2801
|
-
if (instance.ceReload) {
|
|
2802
|
-
dirtyInstances.add(instance);
|
|
2803
|
-
instance.ceReload(newComp.styles);
|
|
2804
|
-
dirtyInstances.delete(instance);
|
|
2805
|
-
} else if (instance.parent) queueJob(() => {
|
|
2806
|
-
isHmrUpdating = true;
|
|
2798
|
+
const dirtyInstances = new Set(instances);
|
|
2799
|
+
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2800
|
+
for (const instance of instances) {
|
|
2807
2801
|
const parent = instance.parent;
|
|
2808
|
-
if (parent
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2802
|
+
if (parent) {
|
|
2803
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
2804
|
+
rerenderedParents.add(parent);
|
|
2805
|
+
parent.hmrRerender();
|
|
2806
|
+
}
|
|
2807
|
+
} else instance.hmrReload(newComp);
|
|
2808
|
+
}
|
|
2809
|
+
} else {
|
|
2810
|
+
const parentUpdates = /* @__PURE__ */ new Map();
|
|
2811
|
+
const dirtyInstanceSet = new Set(instances);
|
|
2812
|
+
for (const instance of instances) {
|
|
2813
|
+
const oldComp = normalizeClassComponent(instance.type);
|
|
2814
|
+
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2815
|
+
if (!dirtyInstances) {
|
|
2816
|
+
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2817
|
+
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2812
2818
|
}
|
|
2813
|
-
|
|
2814
|
-
|
|
2819
|
+
dirtyInstances.add(instance);
|
|
2820
|
+
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2821
|
+
instance.appContext.propsCache.delete(instance.type);
|
|
2822
|
+
instance.appContext.emitsCache.delete(instance.type);
|
|
2823
|
+
instance.appContext.optionsCache.delete(instance.type);
|
|
2824
|
+
if (instance.ceReload) {
|
|
2825
|
+
dirtyInstances.add(instance);
|
|
2826
|
+
instance.ceReload(newComp.styles);
|
|
2827
|
+
dirtyInstances.delete(instance);
|
|
2828
|
+
} else if (instance.parent) {
|
|
2829
|
+
const parent = instance.parent;
|
|
2830
|
+
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
|
|
2831
|
+
let updates = parentUpdates.get(parent);
|
|
2832
|
+
if (!updates) parentUpdates.set(parent, updates = []);
|
|
2833
|
+
updates.push([instance, dirtyInstances]);
|
|
2834
|
+
}
|
|
2835
|
+
} else if (instance.appContext.reload) instance.appContext.reload();
|
|
2836
|
+
else if (typeof window !== "undefined") window.location.reload();
|
|
2837
|
+
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2838
|
+
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2839
|
+
}
|
|
2840
|
+
parentUpdates.forEach((updates, parent) => {
|
|
2841
|
+
queueJob(() => {
|
|
2842
|
+
isHmrUpdating = true;
|
|
2843
|
+
if (parent.vapor) parent.hmrRerender();
|
|
2844
|
+
else {
|
|
2845
|
+
const i = parent;
|
|
2846
|
+
if (!(i.effect.flags & 1024)) {
|
|
2847
|
+
i.renderCache = [];
|
|
2848
|
+
i.effect.run();
|
|
2849
|
+
}
|
|
2850
|
+
}
|
|
2851
|
+
nextTick(() => {
|
|
2852
|
+
isHmrUpdating = false;
|
|
2853
|
+
});
|
|
2854
|
+
updates.forEach(([instance, dirtyInstances]) => {
|
|
2855
|
+
dirtyInstances.delete(instance);
|
|
2856
|
+
});
|
|
2815
2857
|
});
|
|
2816
|
-
dirtyInstances.delete(instance);
|
|
2817
2858
|
});
|
|
2818
|
-
else if (instance.appContext.reload) instance.appContext.reload();
|
|
2819
|
-
else if (typeof window !== "undefined") window.location.reload();
|
|
2820
|
-
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2821
|
-
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2822
2859
|
}
|
|
2823
2860
|
queuePostFlushCb(() => {
|
|
2824
2861
|
hmrDirtyComponents.clear();
|
|
@@ -4700,11 +4737,16 @@ function defineAsyncComponent(source) {
|
|
|
4700
4737
|
onError(err);
|
|
4701
4738
|
return () => errorComponent ? createVNode(errorComponent, { error: err }) : null;
|
|
4702
4739
|
});
|
|
4703
|
-
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError);
|
|
4740
|
+
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError, instance);
|
|
4704
4741
|
load().then(() => {
|
|
4742
|
+
if (instance.isUnmounted) return;
|
|
4705
4743
|
loaded.value = true;
|
|
4706
4744
|
if (instance.parent && instance.parent.vnode && isKeepAlive(instance.parent.vnode)) instance.parent.update();
|
|
4707
4745
|
}).catch((err) => {
|
|
4746
|
+
if (instance.isUnmounted) {
|
|
4747
|
+
setPendingRequest(null);
|
|
4748
|
+
return;
|
|
4749
|
+
}
|
|
4708
4750
|
onError(err);
|
|
4709
4751
|
error.value = err;
|
|
4710
4752
|
});
|
|
@@ -4762,14 +4804,22 @@ function createAsyncComponentContext(source) {
|
|
|
4762
4804
|
setPendingRequest: (request) => pendingRequest = request
|
|
4763
4805
|
};
|
|
4764
4806
|
}
|
|
4765
|
-
const useAsyncComponentState = (delay, timeout, onError) => {
|
|
4807
|
+
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
4766
4808
|
const loaded = /* @__PURE__ */ ref(false);
|
|
4767
4809
|
const error = /* @__PURE__ */ ref();
|
|
4768
4810
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
4769
|
-
|
|
4811
|
+
let timeoutTimer;
|
|
4812
|
+
let delayTimer;
|
|
4813
|
+
if (instance) onUnmounted(() => {
|
|
4814
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
4815
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
4816
|
+
}, instance);
|
|
4817
|
+
if (delay) delayTimer = setTimeout(() => {
|
|
4818
|
+
if (instance && instance.isUnmounted) return;
|
|
4770
4819
|
delayed.value = false;
|
|
4771
4820
|
}, delay);
|
|
4772
|
-
if (timeout != null) setTimeout(() => {
|
|
4821
|
+
if (timeout != null) timeoutTimer = setTimeout(() => {
|
|
4822
|
+
if (instance && instance.isUnmounted) return;
|
|
4773
4823
|
if (!loaded.value && !error.value) {
|
|
4774
4824
|
const err = /* @__PURE__ */ new Error(`Async component timed out after ${timeout}ms.`);
|
|
4775
4825
|
onError(err);
|
|
@@ -5391,6 +5441,7 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
5391
5441
|
slot: vaporSlot,
|
|
5392
5442
|
fallback
|
|
5393
5443
|
};
|
|
5444
|
+
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5394
5445
|
return ret;
|
|
5395
5446
|
}
|
|
5396
5447
|
if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
|
|
@@ -6329,7 +6380,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6329
6380
|
if (options.el) return vm.$mount(options.el);
|
|
6330
6381
|
else return vm;
|
|
6331
6382
|
}
|
|
6332
|
-
Vue.version = `2.6.14-compat:3.6.0-beta.
|
|
6383
|
+
Vue.version = `2.6.14-compat:3.6.0-beta.15`;
|
|
6333
6384
|
Vue.config = singletonApp.config;
|
|
6334
6385
|
Vue.use = (plugin, ...options) => {
|
|
6335
6386
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -6584,7 +6635,9 @@ function defineReactive(obj, key, val) {
|
|
|
6584
6635
|
else Object.keys(val).forEach((key) => {
|
|
6585
6636
|
try {
|
|
6586
6637
|
defineReactiveSimple(val, key, val[key]);
|
|
6587
|
-
} catch (e) {
|
|
6638
|
+
} catch (e) {
|
|
6639
|
+
if (!!(process.env.NODE_ENV !== "production")) warn$1(`Failed making property "${key}" reactive:`, e);
|
|
6640
|
+
}
|
|
6588
6641
|
});
|
|
6589
6642
|
}
|
|
6590
6643
|
const i = obj.$;
|
|
@@ -6835,12 +6888,13 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
6835
6888
|
for (const key of rawPropKeys) if (key === name || key === camelizedName || key === hyphenatedName) parentPassedModelValue = true;
|
|
6836
6889
|
else if (key === `onUpdate:${name}` || key === `onUpdate:${camelizedName}` || key === `onUpdate:${hyphenatedName}`) parentPassedModelUpdater = true;
|
|
6837
6890
|
}
|
|
6838
|
-
|
|
6891
|
+
const hasVModel = parentPassedModelValue && parentPassedModelUpdater;
|
|
6892
|
+
if (!hasVModel) {
|
|
6839
6893
|
localValue = value;
|
|
6840
6894
|
trigger();
|
|
6841
6895
|
}
|
|
6842
6896
|
i.emit(`update:${name}`, emittedValue);
|
|
6843
|
-
if (hasChanged(value,
|
|
6897
|
+
if (hasChanged(value, prevSetValue) && (hasChanged(value, emittedValue) && !hasChanged(emittedValue, prevEmittedValue) || hasVModel && prevSetValue !== EMPTY_OBJ && !hasChanged(emittedValue, localValue))) trigger();
|
|
6844
6898
|
prevSetValue = value;
|
|
6845
6899
|
prevEmittedValue = emittedValue;
|
|
6846
6900
|
}
|
|
@@ -9869,7 +9923,7 @@ function isMemoSame(cached, memo) {
|
|
|
9869
9923
|
}
|
|
9870
9924
|
//#endregion
|
|
9871
9925
|
//#region packages/runtime-core/src/index.ts
|
|
9872
|
-
const version = "3.6.0-beta.
|
|
9926
|
+
const version = "3.6.0-beta.15";
|
|
9873
9927
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
9874
9928
|
/**
|
|
9875
9929
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -11093,7 +11147,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11093
11147
|
prevChildren = [];
|
|
11094
11148
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
11095
11149
|
const child = children[i];
|
|
11096
|
-
if (child.el && child.el instanceof Element) {
|
|
11150
|
+
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
11097
11151
|
prevChildren.push(child);
|
|
11098
11152
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
11099
11153
|
positionMap.set(child, getPosition(child.el));
|
|
@@ -13439,7 +13493,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
13439
13493
|
}
|
|
13440
13494
|
},
|
|
13441
13495
|
oncdata(start, end) {
|
|
13442
|
-
if (stack[0].ns !== 0) onText(getSlice(start, end), start, end);
|
|
13496
|
+
if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) onText(getSlice(start, end), start, end);
|
|
13443
13497
|
else emitError(1, start - 9);
|
|
13444
13498
|
},
|
|
13445
13499
|
onprocessinginstruction(start) {
|
|
@@ -13935,7 +13989,7 @@ function getSelfName(filename) {
|
|
|
13935
13989
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
13936
13990
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
13937
13991
|
}
|
|
13938
|
-
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13992
|
+
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, eventDelegation = true, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13939
13993
|
const context = {
|
|
13940
13994
|
filename,
|
|
13941
13995
|
selfName: getSelfName(filename),
|
|
@@ -13957,6 +14011,7 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
13957
14011
|
bindingMetadata,
|
|
13958
14012
|
inline,
|
|
13959
14013
|
isTS,
|
|
14014
|
+
eventDelegation,
|
|
13960
14015
|
onError,
|
|
13961
14016
|
onWarn,
|
|
13962
14017
|
compatConfig,
|
|
@@ -13968,6 +14023,7 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
13968
14023
|
imports: [],
|
|
13969
14024
|
cached: [],
|
|
13970
14025
|
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
14026
|
+
vForMemoKeyedNodes: /* @__PURE__ */ new WeakSet(),
|
|
13971
14027
|
temps: 0,
|
|
13972
14028
|
identifiers: Object.create(null),
|
|
13973
14029
|
identifierScopes: Object.create(null),
|
|
@@ -14603,7 +14659,7 @@ const transformExpression = (node, context) => {
|
|
|
14603
14659
|
if (dir.type === 7 && dir.name !== "for") {
|
|
14604
14660
|
const exp = dir.exp;
|
|
14605
14661
|
const arg = dir.arg;
|
|
14606
|
-
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
|
|
14662
|
+
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && context.vForMemoKeyedNodes.has(node) && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
|
|
14607
14663
|
if (arg && arg.type === 4 && !arg.isStatic) dir.arg = processExpression(arg, context);
|
|
14608
14664
|
}
|
|
14609
14665
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-beta.
|
|
2
|
+
* @vue/compat v3.6.0-beta.15
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2247,8 +2247,9 @@ var Vue = (function() {
|
|
|
2247
2247
|
if (once && cb) {
|
|
2248
2248
|
const _cb = cb;
|
|
2249
2249
|
cb = (...args) => {
|
|
2250
|
-
_cb(...args);
|
|
2250
|
+
const res = _cb(...args);
|
|
2251
2251
|
this.stop();
|
|
2252
|
+
return res;
|
|
2252
2253
|
};
|
|
2253
2254
|
}
|
|
2254
2255
|
this.cb = cb;
|
|
@@ -2262,7 +2263,7 @@ var Vue = (function() {
|
|
|
2262
2263
|
if (!this.cb) return;
|
|
2263
2264
|
const { immediate, deep, call } = this.options;
|
|
2264
2265
|
if (initialRun && !immediate) return;
|
|
2265
|
-
if (deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2266
|
+
if (initialRun || deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2266
2267
|
cleanup(this);
|
|
2267
2268
|
const currentWatcher = activeWatcher;
|
|
2268
2269
|
activeWatcher = this;
|
|
@@ -2679,6 +2680,7 @@ var Vue = (function() {
|
|
|
2679
2680
|
}
|
|
2680
2681
|
flushIndex = 0;
|
|
2681
2682
|
jobsLength = 0;
|
|
2683
|
+
jobs.length = 0;
|
|
2682
2684
|
flushPostFlushCbs(seen);
|
|
2683
2685
|
currentFlushPromise = null;
|
|
2684
2686
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
@@ -2736,6 +2738,14 @@ var Vue = (function() {
|
|
|
2736
2738
|
function normalizeClassComponent(component) {
|
|
2737
2739
|
return isClassComponent(component) ? component.__vccOpts : component;
|
|
2738
2740
|
}
|
|
2741
|
+
function hasDirtyAncestor(instance, dirtyInstances) {
|
|
2742
|
+
let parent = instance.parent;
|
|
2743
|
+
while (parent) {
|
|
2744
|
+
if (dirtyInstances.has(parent)) return true;
|
|
2745
|
+
parent = parent.parent;
|
|
2746
|
+
}
|
|
2747
|
+
return false;
|
|
2748
|
+
}
|
|
2739
2749
|
function rerender(id, newRender) {
|
|
2740
2750
|
const record = map.get(id);
|
|
2741
2751
|
if (!record) return;
|
|
@@ -2767,42 +2777,69 @@ var Vue = (function() {
|
|
|
2767
2777
|
const isVapor = record.initialDef.__vapor;
|
|
2768
2778
|
updateComponentDef(record.initialDef, newComp);
|
|
2769
2779
|
const instances = [...record.instances];
|
|
2770
|
-
if (isVapor && newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2780
|
+
if (isVapor && newComp.__vapor && !instances.some((instance) => instance.parent && !instance.parent.vapor) && !instances.some((i) => i.ceReload)) {
|
|
2771
2781
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
const
|
|
2775
|
-
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2776
|
-
if (!dirtyInstances) {
|
|
2777
|
-
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2778
|
-
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2779
|
-
}
|
|
2780
|
-
dirtyInstances.add(instance);
|
|
2781
|
-
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2782
|
-
instance.appContext.propsCache.delete(instance.type);
|
|
2783
|
-
instance.appContext.emitsCache.delete(instance.type);
|
|
2784
|
-
instance.appContext.optionsCache.delete(instance.type);
|
|
2785
|
-
if (instance.ceReload) {
|
|
2786
|
-
dirtyInstances.add(instance);
|
|
2787
|
-
instance.ceReload(newComp.styles);
|
|
2788
|
-
dirtyInstances.delete(instance);
|
|
2789
|
-
} else if (instance.parent) queueJob(() => {
|
|
2790
|
-
isHmrUpdating = true;
|
|
2782
|
+
const dirtyInstances = new Set(instances);
|
|
2783
|
+
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2784
|
+
for (const instance of instances) {
|
|
2791
2785
|
const parent = instance.parent;
|
|
2792
|
-
if (parent
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2786
|
+
if (parent) {
|
|
2787
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
2788
|
+
rerenderedParents.add(parent);
|
|
2789
|
+
parent.hmrRerender();
|
|
2790
|
+
}
|
|
2791
|
+
} else instance.hmrReload(newComp);
|
|
2792
|
+
}
|
|
2793
|
+
} else {
|
|
2794
|
+
const parentUpdates = /* @__PURE__ */ new Map();
|
|
2795
|
+
const dirtyInstanceSet = new Set(instances);
|
|
2796
|
+
for (const instance of instances) {
|
|
2797
|
+
const oldComp = normalizeClassComponent(instance.type);
|
|
2798
|
+
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2799
|
+
if (!dirtyInstances) {
|
|
2800
|
+
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2801
|
+
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2796
2802
|
}
|
|
2797
|
-
|
|
2798
|
-
|
|
2803
|
+
dirtyInstances.add(instance);
|
|
2804
|
+
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2805
|
+
instance.appContext.propsCache.delete(instance.type);
|
|
2806
|
+
instance.appContext.emitsCache.delete(instance.type);
|
|
2807
|
+
instance.appContext.optionsCache.delete(instance.type);
|
|
2808
|
+
if (instance.ceReload) {
|
|
2809
|
+
dirtyInstances.add(instance);
|
|
2810
|
+
instance.ceReload(newComp.styles);
|
|
2811
|
+
dirtyInstances.delete(instance);
|
|
2812
|
+
} else if (instance.parent) {
|
|
2813
|
+
const parent = instance.parent;
|
|
2814
|
+
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
|
|
2815
|
+
let updates = parentUpdates.get(parent);
|
|
2816
|
+
if (!updates) parentUpdates.set(parent, updates = []);
|
|
2817
|
+
updates.push([instance, dirtyInstances]);
|
|
2818
|
+
}
|
|
2819
|
+
} else if (instance.appContext.reload) instance.appContext.reload();
|
|
2820
|
+
else if (typeof window !== "undefined") window.location.reload();
|
|
2821
|
+
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2822
|
+
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2823
|
+
}
|
|
2824
|
+
parentUpdates.forEach((updates, parent) => {
|
|
2825
|
+
queueJob(() => {
|
|
2826
|
+
isHmrUpdating = true;
|
|
2827
|
+
if (parent.vapor) parent.hmrRerender();
|
|
2828
|
+
else {
|
|
2829
|
+
const i = parent;
|
|
2830
|
+
if (!(i.effect.flags & 1024)) {
|
|
2831
|
+
i.renderCache = [];
|
|
2832
|
+
i.effect.run();
|
|
2833
|
+
}
|
|
2834
|
+
}
|
|
2835
|
+
nextTick(() => {
|
|
2836
|
+
isHmrUpdating = false;
|
|
2837
|
+
});
|
|
2838
|
+
updates.forEach(([instance, dirtyInstances]) => {
|
|
2839
|
+
dirtyInstances.delete(instance);
|
|
2840
|
+
});
|
|
2799
2841
|
});
|
|
2800
|
-
dirtyInstances.delete(instance);
|
|
2801
2842
|
});
|
|
2802
|
-
else if (instance.appContext.reload) instance.appContext.reload();
|
|
2803
|
-
else if (typeof window !== "undefined") window.location.reload();
|
|
2804
|
-
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2805
|
-
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2806
2843
|
}
|
|
2807
2844
|
queuePostFlushCb(() => {
|
|
2808
2845
|
hmrDirtyComponents.clear();
|
|
@@ -4630,11 +4667,16 @@ var Vue = (function() {
|
|
|
4630
4667
|
onError(err);
|
|
4631
4668
|
return () => errorComponent ? createVNode(errorComponent, { error: err }) : null;
|
|
4632
4669
|
});
|
|
4633
|
-
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError);
|
|
4670
|
+
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError, instance);
|
|
4634
4671
|
load().then(() => {
|
|
4672
|
+
if (instance.isUnmounted) return;
|
|
4635
4673
|
loaded.value = true;
|
|
4636
4674
|
if (instance.parent && instance.parent.vnode && isKeepAlive(instance.parent.vnode)) instance.parent.update();
|
|
4637
4675
|
}).catch((err) => {
|
|
4676
|
+
if (instance.isUnmounted) {
|
|
4677
|
+
setPendingRequest(null);
|
|
4678
|
+
return;
|
|
4679
|
+
}
|
|
4638
4680
|
onError(err);
|
|
4639
4681
|
error.value = err;
|
|
4640
4682
|
});
|
|
@@ -4692,14 +4734,22 @@ var Vue = (function() {
|
|
|
4692
4734
|
setPendingRequest: (request) => pendingRequest = request
|
|
4693
4735
|
};
|
|
4694
4736
|
}
|
|
4695
|
-
const useAsyncComponentState = (delay, timeout, onError) => {
|
|
4737
|
+
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
4696
4738
|
const loaded = /* @__PURE__ */ ref(false);
|
|
4697
4739
|
const error = /* @__PURE__ */ ref();
|
|
4698
4740
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
4699
|
-
|
|
4741
|
+
let timeoutTimer;
|
|
4742
|
+
let delayTimer;
|
|
4743
|
+
if (instance) onUnmounted(() => {
|
|
4744
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
4745
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
4746
|
+
}, instance);
|
|
4747
|
+
if (delay) delayTimer = setTimeout(() => {
|
|
4748
|
+
if (instance && instance.isUnmounted) return;
|
|
4700
4749
|
delayed.value = false;
|
|
4701
4750
|
}, delay);
|
|
4702
|
-
if (timeout != null) setTimeout(() => {
|
|
4751
|
+
if (timeout != null) timeoutTimer = setTimeout(() => {
|
|
4752
|
+
if (instance && instance.isUnmounted) return;
|
|
4703
4753
|
if (!loaded.value && !error.value) {
|
|
4704
4754
|
const err = /* @__PURE__ */ new Error(`Async component timed out after ${timeout}ms.`);
|
|
4705
4755
|
onError(err);
|
|
@@ -5317,6 +5367,7 @@ var Vue = (function() {
|
|
|
5317
5367
|
slot: vaporSlot,
|
|
5318
5368
|
fallback
|
|
5319
5369
|
};
|
|
5370
|
+
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5320
5371
|
return ret;
|
|
5321
5372
|
}
|
|
5322
5373
|
if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
|
|
@@ -6253,7 +6304,7 @@ var Vue = (function() {
|
|
|
6253
6304
|
if (options.el) return vm.$mount(options.el);
|
|
6254
6305
|
else return vm;
|
|
6255
6306
|
}
|
|
6256
|
-
Vue.version = `2.6.14-compat:3.6.0-beta.
|
|
6307
|
+
Vue.version = `2.6.14-compat:3.6.0-beta.15`;
|
|
6257
6308
|
Vue.config = singletonApp.config;
|
|
6258
6309
|
Vue.use = (plugin, ...options) => {
|
|
6259
6310
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -6508,7 +6559,9 @@ var Vue = (function() {
|
|
|
6508
6559
|
else Object.keys(val).forEach((key) => {
|
|
6509
6560
|
try {
|
|
6510
6561
|
defineReactiveSimple(val, key, val[key]);
|
|
6511
|
-
} catch (e) {
|
|
6562
|
+
} catch (e) {
|
|
6563
|
+
warn$1(`Failed making property "${key}" reactive:`, e);
|
|
6564
|
+
}
|
|
6512
6565
|
});
|
|
6513
6566
|
}
|
|
6514
6567
|
const i = obj.$;
|
|
@@ -6753,12 +6806,13 @@ var Vue = (function() {
|
|
|
6753
6806
|
for (const key of rawPropKeys) if (key === name || key === camelizedName || key === hyphenatedName) parentPassedModelValue = true;
|
|
6754
6807
|
else if (key === `onUpdate:${name}` || key === `onUpdate:${camelizedName}` || key === `onUpdate:${hyphenatedName}`) parentPassedModelUpdater = true;
|
|
6755
6808
|
}
|
|
6756
|
-
|
|
6809
|
+
const hasVModel = parentPassedModelValue && parentPassedModelUpdater;
|
|
6810
|
+
if (!hasVModel) {
|
|
6757
6811
|
localValue = value;
|
|
6758
6812
|
trigger();
|
|
6759
6813
|
}
|
|
6760
6814
|
i.emit(`update:${name}`, emittedValue);
|
|
6761
|
-
if (hasChanged(value,
|
|
6815
|
+
if (hasChanged(value, prevSetValue) && (hasChanged(value, emittedValue) && !hasChanged(emittedValue, prevEmittedValue) || hasVModel && prevSetValue !== EMPTY_OBJ && !hasChanged(emittedValue, localValue))) trigger();
|
|
6762
6816
|
prevSetValue = value;
|
|
6763
6817
|
prevEmittedValue = emittedValue;
|
|
6764
6818
|
}
|
|
@@ -9713,7 +9767,7 @@ var Vue = (function() {
|
|
|
9713
9767
|
}
|
|
9714
9768
|
//#endregion
|
|
9715
9769
|
//#region packages/runtime-core/src/index.ts
|
|
9716
|
-
const version = "3.6.0-beta.
|
|
9770
|
+
const version = "3.6.0-beta.15";
|
|
9717
9771
|
const warn = warn$1;
|
|
9718
9772
|
/**
|
|
9719
9773
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10895,7 +10949,7 @@ var Vue = (function() {
|
|
|
10895
10949
|
prevChildren = [];
|
|
10896
10950
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
10897
10951
|
const child = children[i];
|
|
10898
|
-
if (child.el && child.el instanceof Element) {
|
|
10952
|
+
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
10899
10953
|
prevChildren.push(child);
|
|
10900
10954
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
10901
10955
|
positionMap.set(child, getPosition(child.el));
|
|
@@ -13116,7 +13170,7 @@ var Vue = (function() {
|
|
|
13116
13170
|
}
|
|
13117
13171
|
},
|
|
13118
13172
|
oncdata(start, end) {
|
|
13119
|
-
if (stack[0].ns !== 0) onText(getSlice(start, end), start, end);
|
|
13173
|
+
if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) onText(getSlice(start, end), start, end);
|
|
13120
13174
|
else emitError(1, start - 9);
|
|
13121
13175
|
},
|
|
13122
13176
|
onprocessinginstruction(start) {
|
|
@@ -13608,7 +13662,7 @@ var Vue = (function() {
|
|
|
13608
13662
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
13609
13663
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
13610
13664
|
}
|
|
13611
|
-
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13665
|
+
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, eventDelegation = true, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13612
13666
|
const context = {
|
|
13613
13667
|
filename,
|
|
13614
13668
|
selfName: getSelfName(filename),
|
|
@@ -13630,6 +13684,7 @@ var Vue = (function() {
|
|
|
13630
13684
|
bindingMetadata,
|
|
13631
13685
|
inline,
|
|
13632
13686
|
isTS,
|
|
13687
|
+
eventDelegation,
|
|
13633
13688
|
onError,
|
|
13634
13689
|
onWarn,
|
|
13635
13690
|
compatConfig,
|
|
@@ -13641,6 +13696,7 @@ var Vue = (function() {
|
|
|
13641
13696
|
imports: [],
|
|
13642
13697
|
cached: [],
|
|
13643
13698
|
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
13699
|
+
vForMemoKeyedNodes: /* @__PURE__ */ new WeakSet(),
|
|
13644
13700
|
temps: 0,
|
|
13645
13701
|
identifiers: Object.create(null),
|
|
13646
13702
|
identifierScopes: Object.create(null),
|
|
@@ -14271,7 +14327,7 @@ var Vue = (function() {
|
|
|
14271
14327
|
if (dir.type === 7 && dir.name !== "for") {
|
|
14272
14328
|
const exp = dir.exp;
|
|
14273
14329
|
const arg = dir.arg;
|
|
14274
|
-
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
|
|
14330
|
+
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && context.vForMemoKeyedNodes.has(node) && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
|
|
14275
14331
|
if (arg && arg.type === 4 && !arg.isStatic) dir.arg = processExpression(arg, context);
|
|
14276
14332
|
}
|
|
14277
14333
|
}
|