@vue/compat 3.6.0-rc.8 → 3.6.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-compat.d.ts +4 -3
- package/dist/vue.cjs.js +70 -33
- package/dist/vue.cjs.prod.js +70 -33
- package/dist/vue.esm-browser.js +102 -67
- package/dist/vue.esm-browser.prod.js +7 -7
- package/dist/vue.esm-bundler.js +104 -69
- package/dist/vue.global.js +102 -67
- package/dist/vue.global.prod.js +7 -7
- package/dist/vue.runtime.esm-browser.js +102 -67
- package/dist/vue.runtime.esm-browser.prod.js +7 -7
- package/dist/vue.runtime.esm-bundler.js +104 -69
- package/dist/vue.runtime.global.js +102 -67
- package/dist/vue.runtime.global.prod.js +7 -7
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-rc.
|
|
2
|
+
* @vue/compat v3.6.0-rc.9
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -231,10 +231,10 @@ function normalizeStyle(value) {
|
|
|
231
231
|
}
|
|
232
232
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
233
233
|
const propertyDelimiterRE = /:([^]+)/;
|
|
234
|
-
const styleCommentRE =
|
|
234
|
+
const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
|
|
235
235
|
function parseStringStyle(cssText) {
|
|
236
236
|
const ret = {};
|
|
237
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
237
|
+
cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
|
|
238
238
|
if (item) {
|
|
239
239
|
const tmp = item.split(propertyDelimiterRE);
|
|
240
240
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -362,19 +362,19 @@ function getEscapedCssVarName(key, doubleEscape) {
|
|
|
362
362
|
}
|
|
363
363
|
//#endregion
|
|
364
364
|
//#region packages/shared/src/looseEqual.ts
|
|
365
|
-
function looseCompareArrays(a, b) {
|
|
365
|
+
function looseCompareArrays(a, b, seen) {
|
|
366
366
|
if (a.length !== b.length) return false;
|
|
367
367
|
let equal = true;
|
|
368
|
-
for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
|
|
368
|
+
for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i], seen);
|
|
369
369
|
return equal;
|
|
370
370
|
}
|
|
371
|
-
function looseCompareCollections(a, b) {
|
|
371
|
+
function looseCompareCollections(a, b, seen) {
|
|
372
372
|
if (a.size !== b.size) return false;
|
|
373
373
|
const candidates = Array.from(b);
|
|
374
374
|
const matched = new Uint8Array(candidates.length);
|
|
375
375
|
for (const item of a) {
|
|
376
376
|
let index = -1;
|
|
377
|
-
for (let i = 0; i < candidates.length; i++) if (!matched[i] && looseEqual(item, candidates[i])) {
|
|
377
|
+
for (let i = 0; i < candidates.length; i++) if (!matched[i] && looseEqual(item, candidates[i], seen)) {
|
|
378
378
|
index = i;
|
|
379
379
|
break;
|
|
380
380
|
}
|
|
@@ -383,7 +383,33 @@ function looseCompareCollections(a, b) {
|
|
|
383
383
|
}
|
|
384
384
|
return true;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function looseCompareObjects(a, b, seen) {
|
|
387
|
+
let aValidType = isMap(a);
|
|
388
|
+
let bValidType = isMap(b);
|
|
389
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
390
|
+
aValidType = isSet(a);
|
|
391
|
+
bValidType = isSet(b);
|
|
392
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
393
|
+
if (Object.keys(a).length !== Object.keys(b).length) return false;
|
|
394
|
+
for (const key in a) {
|
|
395
|
+
const aHasKey = a.hasOwnProperty(key);
|
|
396
|
+
const bHasKey = b.hasOwnProperty(key);
|
|
397
|
+
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) return false;
|
|
398
|
+
}
|
|
399
|
+
return String(a) === String(b);
|
|
400
|
+
}
|
|
401
|
+
function looseCompareNested(a, b, seen, compare) {
|
|
402
|
+
if (!seen) seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
|
|
403
|
+
const [seenA, seenB] = seen;
|
|
404
|
+
if (seenA.has(a) || seenB.has(b)) return seenA.get(a) === b && seenB.get(b) === a;
|
|
405
|
+
seenA.set(a, b);
|
|
406
|
+
seenB.set(b, a);
|
|
407
|
+
const equal = compare(a, b, seen);
|
|
408
|
+
seenA.delete(a);
|
|
409
|
+
seenB.delete(b);
|
|
410
|
+
return equal;
|
|
411
|
+
}
|
|
412
|
+
function looseEqual(a, b, seen) {
|
|
387
413
|
if (a === b) return true;
|
|
388
414
|
let aValidType = isDate(a);
|
|
389
415
|
let bValidType = isDate(b);
|
|
@@ -393,23 +419,12 @@ function looseEqual(a, b) {
|
|
|
393
419
|
if (aValidType || bValidType) return a === b;
|
|
394
420
|
aValidType = isArray(a);
|
|
395
421
|
bValidType = isArray(b);
|
|
396
|
-
if (aValidType || bValidType) return aValidType && bValidType ?
|
|
422
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
|
|
397
423
|
aValidType = isObject(a);
|
|
398
424
|
bValidType = isObject(b);
|
|
399
425
|
if (aValidType || bValidType) {
|
|
400
426
|
if (!aValidType || !bValidType) return false;
|
|
401
|
-
|
|
402
|
-
bValidType = isMap(b);
|
|
403
|
-
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
404
|
-
aValidType = isSet(a);
|
|
405
|
-
bValidType = isSet(b);
|
|
406
|
-
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
407
|
-
if (Object.keys(a).length !== Object.keys(b).length) return false;
|
|
408
|
-
for (const key in a) {
|
|
409
|
-
const aHasKey = a.hasOwnProperty(key);
|
|
410
|
-
const bHasKey = b.hasOwnProperty(key);
|
|
411
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) return false;
|
|
412
|
-
}
|
|
427
|
+
return looseCompareNested(a, b, seen, looseCompareObjects);
|
|
413
428
|
}
|
|
414
429
|
return String(a) === String(b);
|
|
415
430
|
}
|
|
@@ -872,13 +887,17 @@ function getDepFromReactive(object, key) {
|
|
|
872
887
|
/**
|
|
873
888
|
* Track array iteration and return:
|
|
874
889
|
* - if input is reactive: a cloned raw array with reactive values
|
|
875
|
-
* - if input is
|
|
890
|
+
* - if input is readonly: a cloned raw array with readonly values, preserving
|
|
891
|
+
* reactivity
|
|
892
|
+
* - if input is raw or shallow: the original raw array
|
|
876
893
|
*/
|
|
877
894
|
function reactiveReadArray(array) {
|
|
878
895
|
const raw = /* @__PURE__ */ toRaw(array);
|
|
879
896
|
if (raw === array) return raw;
|
|
880
897
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
881
|
-
|
|
898
|
+
if (/* @__PURE__ */ isShallow(array)) return raw;
|
|
899
|
+
if (!/* @__PURE__ */ isReadonly(array)) return raw.map(toReactive);
|
|
900
|
+
return /* @__PURE__ */ isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
|
|
882
901
|
}
|
|
883
902
|
/**
|
|
884
903
|
* Track array iteration and return raw array
|
|
@@ -4452,12 +4471,12 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4452
4471
|
} else {
|
|
4453
4472
|
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
4454
4473
|
const component = vnode.component;
|
|
4455
|
-
if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep
|
|
4474
|
+
if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep)) {
|
|
4456
4475
|
let subTree;
|
|
4457
4476
|
if (isFragmentStart) {
|
|
4458
4477
|
subTree = createVNode(Static);
|
|
4459
4478
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
4460
|
-
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
4479
|
+
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(node.nodeType === 8 ? Comment : "div");
|
|
4461
4480
|
subTree.el = node;
|
|
4462
4481
|
component.subTree = subTree;
|
|
4463
4482
|
}
|
|
@@ -6623,7 +6642,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6623
6642
|
if (options.el) return vm.$mount(options.el);
|
|
6624
6643
|
else return vm;
|
|
6625
6644
|
}
|
|
6626
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6645
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.9`;
|
|
6627
6646
|
Vue.config = singletonApp.config;
|
|
6628
6647
|
Vue.use = (plugin, ...options) => {
|
|
6629
6648
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -8003,6 +8022,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8003
8022
|
optimized = false;
|
|
8004
8023
|
n2.dynamicChildren = null;
|
|
8005
8024
|
}
|
|
8025
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
8026
|
+
if (n2.dynamicChildren === EMPTY_ARR) n2.dynamicChildren = [];
|
|
8027
|
+
n2.dynamicChildren.hasOnce = true;
|
|
8028
|
+
}
|
|
8006
8029
|
const { type, ref, shapeFlag } = n2;
|
|
8007
8030
|
switch (type) {
|
|
8008
8031
|
case Text:
|
|
@@ -8329,6 +8352,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8329
8352
|
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
8330
8353
|
if (instance.asyncDep && !instance.asyncResolved) {
|
|
8331
8354
|
if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(n2);
|
|
8355
|
+
n2.el = n1.el;
|
|
8332
8356
|
updateComponentPreRender(instance, n2, optimized);
|
|
8333
8357
|
if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
|
|
8334
8358
|
return;
|
|
@@ -8646,13 +8670,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8646
8670
|
};
|
|
8647
8671
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
8648
8672
|
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
|
|
8649
|
-
if (patchFlag === -2) optimized = false;
|
|
8673
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) optimized = false;
|
|
8650
8674
|
if (ref != null) {
|
|
8651
8675
|
const prevSub = setActiveSub();
|
|
8652
8676
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
8653
8677
|
setActiveSub(prevSub);
|
|
8654
8678
|
}
|
|
8655
|
-
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8679
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8656
8680
|
if (shapeFlag & 256) {
|
|
8657
8681
|
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8658
8682
|
else parentComponent.ctx.deactivate(vnode);
|
|
@@ -8706,6 +8730,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8706
8730
|
}
|
|
8707
8731
|
if (type === Static) {
|
|
8708
8732
|
removeStaticNode(vnode);
|
|
8733
|
+
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
8709
8734
|
return;
|
|
8710
8735
|
}
|
|
8711
8736
|
if (transition) performTransitionLeave(el, transition, () => hostRemove(el), !!(vnode.shapeFlag & 1));
|
|
@@ -8731,7 +8756,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8731
8756
|
if (effect) {
|
|
8732
8757
|
effect.stop();
|
|
8733
8758
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8734
|
-
} else if (
|
|
8759
|
+
} else if (instance.vnode.el && subTree) {
|
|
8760
|
+
subTree.transition = instance.vnode.transition;
|
|
8761
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8762
|
+
}
|
|
8735
8763
|
if (um) queuePostRenderEffect(um, void 0, parentSuspense);
|
|
8736
8764
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:destroyed"), void 0, parentSuspense);
|
|
8737
8765
|
queuePostRenderEffect(() => instance.isUnmounted = true, void 0, parentSuspense);
|
|
@@ -8938,7 +8966,7 @@ const Suspense = {
|
|
|
8938
8966
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
8939
8967
|
if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
|
|
8940
8968
|
else {
|
|
8941
|
-
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
8969
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
|
|
8942
8970
|
n2.suspense = n1.suspense;
|
|
8943
8971
|
n2.suspense.vnode = n2;
|
|
8944
8972
|
n2.el = n1.el;
|
|
@@ -8976,7 +9004,9 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
8976
9004
|
if (pendingBranch) {
|
|
8977
9005
|
suspense.pendingBranch = newBranch;
|
|
8978
9006
|
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
8979
|
-
|
|
9007
|
+
suspense.deps++;
|
|
9008
|
+
patch(pendingBranch, newBranch, isHydrating ? container : suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
9009
|
+
suspense.deps--;
|
|
8980
9010
|
if (suspense.deps <= 0) suspense.resolve();
|
|
8981
9011
|
else if (isInFallback) {
|
|
8982
9012
|
if (!isHydrating && !suspense.isFallbackMountPending) {
|
|
@@ -9114,6 +9144,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9114
9144
|
suspense.effects = [];
|
|
9115
9145
|
if (isSuspensible) {
|
|
9116
9146
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
9147
|
+
parentSuspenseId = void 0;
|
|
9117
9148
|
parentSuspense.deps--;
|
|
9118
9149
|
if (parentSuspense.deps === 0 && !sync) parentSuspense.resolve();
|
|
9119
9150
|
}
|
|
@@ -9151,11 +9182,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9151
9182
|
registerDep(instance, onResolve) {
|
|
9152
9183
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
9153
9184
|
if (isInPendingSuspense) suspense.deps++;
|
|
9185
|
+
const hydratedEl = instance.vnode && instance.vnode.el;
|
|
9154
9186
|
instance.asyncDep.catch((err) => {
|
|
9155
9187
|
handleError(err, instance, 0);
|
|
9156
9188
|
}).then((asyncSetupResult) => {
|
|
9157
9189
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
9158
9190
|
setCurrentInstance(null, void 0);
|
|
9191
|
+
if (hydratedEl && !instance.scope.active) {
|
|
9192
|
+
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
9193
|
+
return;
|
|
9194
|
+
}
|
|
9159
9195
|
instance.asyncResolved = true;
|
|
9160
9196
|
onResolve(asyncSetupResult);
|
|
9161
9197
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
@@ -9511,7 +9547,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9511
9547
|
vs: cloneVaporSlotMeta(vnode),
|
|
9512
9548
|
vb: vnode.vb,
|
|
9513
9549
|
ibu: vnode.ibu,
|
|
9514
|
-
iu: vnode.iu
|
|
9550
|
+
iu: vnode.iu,
|
|
9551
|
+
cacheIndex: vnode.cacheIndex
|
|
9515
9552
|
};
|
|
9516
9553
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
9517
9554
|
defineLegacyVNodeProperties(cloned);
|
|
@@ -10246,7 +10283,7 @@ function isMemoSame(cached, memo) {
|
|
|
10246
10283
|
}
|
|
10247
10284
|
//#endregion
|
|
10248
10285
|
//#region packages/runtime-core/src/index.ts
|
|
10249
|
-
const version = "3.6.0-rc.
|
|
10286
|
+
const version = "3.6.0-rc.9";
|
|
10250
10287
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
10251
10288
|
/**
|
|
10252
10289
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10660,50 +10697,20 @@ const CSS_VAR_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? "CSS_VAR
|
|
|
10660
10697
|
*/
|
|
10661
10698
|
function useCssVars(getter) {
|
|
10662
10699
|
const instance = getCurrentInstance();
|
|
10663
|
-
const getVars = () => getter(instance.proxy);
|
|
10664
|
-
const setVars = (vars) => {
|
|
10665
|
-
if (instance.ce) setVarsOnNode(instance.ce, vars);
|
|
10666
|
-
else setVarsOnVNode(instance.subTree, vars);
|
|
10667
|
-
};
|
|
10668
|
-
baseUseCssVars(instance, () => instance.subTree.el.parentNode, getVars, setVars);
|
|
10669
|
-
}
|
|
10670
|
-
function setVarsOnVNode(vnode, vars) {
|
|
10671
|
-
if (vnode.shapeFlag & 128) {
|
|
10672
|
-
const suspense = vnode.suspense;
|
|
10673
|
-
vnode = suspense.activeBranch;
|
|
10674
|
-
if (suspense.pendingBranch && !suspense.isHydrating) suspense.effects.push(() => {
|
|
10675
|
-
setVarsOnVNode(suspense.activeBranch, vars);
|
|
10676
|
-
});
|
|
10677
|
-
}
|
|
10678
|
-
while (vnode.component) vnode = vnode.component.subTree;
|
|
10679
|
-
if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
|
|
10680
|
-
else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
10681
|
-
else if (vnode.type === Static) {
|
|
10682
|
-
let { el, anchor } = vnode;
|
|
10683
|
-
while (el) {
|
|
10684
|
-
setVarsOnNode(el, vars);
|
|
10685
|
-
if (el === anchor) break;
|
|
10686
|
-
el = el.nextSibling;
|
|
10687
|
-
}
|
|
10688
|
-
}
|
|
10689
|
-
}
|
|
10690
|
-
/**
|
|
10691
|
-
* @internal
|
|
10692
|
-
* shared between vdom and vapor
|
|
10693
|
-
*/
|
|
10694
|
-
function baseUseCssVars(instance, getParentNode, getVars, setVars) {
|
|
10695
10700
|
/* v8 ignore start */
|
|
10696
10701
|
if (!instance) {
|
|
10697
10702
|
process.env.NODE_ENV !== "production" && warn(`useCssVars is called without current active component instance.`);
|
|
10698
10703
|
return;
|
|
10699
10704
|
}
|
|
10700
10705
|
/* v8 ignore stop */
|
|
10706
|
+
const getVars = () => getter(instance.proxy);
|
|
10701
10707
|
if (!!(process.env.NODE_ENV !== "production")) instance.getCssVars = getVars;
|
|
10702
10708
|
const updateTeleports = instance.ut = (vars = getVars()) => {
|
|
10703
10709
|
Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach((node) => setVarsOnNode(node, vars));
|
|
10704
10710
|
};
|
|
10705
10711
|
const applyCssVars = (vars = getVars()) => {
|
|
10706
|
-
|
|
10712
|
+
if (instance.ce) setVarsOnNode(instance.ce, vars);
|
|
10713
|
+
else setVarsOnVNode(instance.subTree, vars);
|
|
10707
10714
|
updateTeleports(vars);
|
|
10708
10715
|
};
|
|
10709
10716
|
onBeforeUpdate(() => {
|
|
@@ -10716,10 +10723,37 @@ function baseUseCssVars(instance, getParentNode, getVars, setVars) {
|
|
|
10716
10723
|
applyCssVars(vars);
|
|
10717
10724
|
}, NOOP, { flush: "post" });
|
|
10718
10725
|
const ob = new MutationObserver(() => applyCssVars());
|
|
10719
|
-
ob.observe(
|
|
10726
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
10720
10727
|
onUnmounted(() => ob.disconnect());
|
|
10721
10728
|
});
|
|
10722
10729
|
}
|
|
10730
|
+
function setVarsOnVNode(vnode, vars) {
|
|
10731
|
+
if (vnode.shapeFlag & 128) {
|
|
10732
|
+
const suspense = vnode.suspense;
|
|
10733
|
+
vnode = suspense.activeBranch;
|
|
10734
|
+
if (suspense.pendingBranch && !suspense.isHydrating) suspense.effects.push(() => {
|
|
10735
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
10736
|
+
});
|
|
10737
|
+
}
|
|
10738
|
+
while (vnode.component) {
|
|
10739
|
+
const component = vnode.component;
|
|
10740
|
+
if (component.vapor) {
|
|
10741
|
+
component.appContext.vapor.applyCssVars(vnode, vars);
|
|
10742
|
+
return;
|
|
10743
|
+
}
|
|
10744
|
+
vnode = vnode.component.subTree;
|
|
10745
|
+
}
|
|
10746
|
+
if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
|
|
10747
|
+
else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
10748
|
+
else if (vnode.type === Static) {
|
|
10749
|
+
let { el, anchor } = vnode;
|
|
10750
|
+
while (el) {
|
|
10751
|
+
setVarsOnNode(el, vars);
|
|
10752
|
+
if (el === anchor) break;
|
|
10753
|
+
el = el.nextSibling;
|
|
10754
|
+
}
|
|
10755
|
+
}
|
|
10756
|
+
}
|
|
10723
10757
|
/**
|
|
10724
10758
|
* @internal
|
|
10725
10759
|
* shared between vdom and vapor
|
|
@@ -11941,7 +11975,6 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11941
11975
|
baseEmit: () => baseEmit,
|
|
11942
11976
|
baseNormalizePropsOptions: () => baseNormalizePropsOptions,
|
|
11943
11977
|
baseResolveTransitionHooks: () => baseResolveTransitionHooks,
|
|
11944
|
-
baseUseCssVars: () => baseUseCssVars,
|
|
11945
11978
|
callPendingCbs: () => callPendingCbs,
|
|
11946
11979
|
callWithAsyncErrorHandling: () => callWithAsyncErrorHandling,
|
|
11947
11980
|
callWithErrorHandling: () => callWithErrorHandling,
|
|
@@ -11971,6 +12004,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11971
12004
|
currentInstance: () => currentInstance,
|
|
11972
12005
|
customRef: () => customRef,
|
|
11973
12006
|
deactivate: () => deactivate,
|
|
12007
|
+
defaultPropGetter: () => defaultPropGetter,
|
|
11974
12008
|
defineAsyncComponent: () => defineAsyncComponent,
|
|
11975
12009
|
defineComponent: () => defineComponent,
|
|
11976
12010
|
defineCustomElement: () => defineCustomElement,
|
|
@@ -12076,6 +12110,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
12076
12110
|
onWatcherCleanup: () => onWatcherCleanup,
|
|
12077
12111
|
openBlock: () => openBlock,
|
|
12078
12112
|
parseEventName: () => parseEventName,
|
|
12113
|
+
patchClass: () => patchClass,
|
|
12079
12114
|
patchProp: () => patchProp,
|
|
12080
12115
|
patchStyle: () => patchStyle,
|
|
12081
12116
|
performAsyncHydrate: () => performAsyncHydrate,
|
|
@@ -16733,4 +16768,4 @@ Vue.compile = compileToFunction;
|
|
|
16733
16768
|
var esm_index_default = Vue;
|
|
16734
16769
|
const configureCompat = Vue.configureCompat;
|
|
16735
16770
|
//#endregion
|
|
16736
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VaporSlot, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks,
|
|
16771
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VaporSlot, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, esm_index_default as default, defaultPropGetter, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureValidVNode, ensureVaporSlotFallback, expose, filterModelListeners, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, parseEventName, patchClass, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, rawVaporSlotKey, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, resolveTransitionProps, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, shouldSetAsPropForVueCE, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, vdomSlotFallbackKey, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, xlinkNS };
|