vue 3.6.0-beta.2 → 3.6.0-beta.3
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.cjs.js +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +9 -7
- package/dist/vue.esm-browser.prod.js +5 -5
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +8 -6
- package/dist/vue.global.prod.js +3 -3
- package/dist/vue.runtime-with-vapor.esm-browser.js +216 -94
- package/dist/vue.runtime-with-vapor.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +8 -7
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +8 -6
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.6.0-beta.
|
|
2
|
+
* vue v3.6.0-beta.3
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -5850,9 +5850,10 @@ function createSlots(slots, dynamicSlots) {
|
|
|
5850
5850
|
|
|
5851
5851
|
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
5852
5852
|
let slot = slots[name];
|
|
5853
|
-
|
|
5853
|
+
const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
|
|
5854
|
+
if (vaporSlot) {
|
|
5854
5855
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
5855
|
-
ret.vs = { slot, fallback };
|
|
5856
|
+
ret.vs = { slot: vaporSlot, fallback };
|
|
5856
5857
|
return ret;
|
|
5857
5858
|
}
|
|
5858
5859
|
if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
|
|
@@ -5915,14 +5916,14 @@ function ensureVaporSlotFallback(vnodes, fallback) {
|
|
|
5915
5916
|
}
|
|
5916
5917
|
}
|
|
5917
5918
|
|
|
5918
|
-
function toHandlers(obj, preserveCaseIfNecessary
|
|
5919
|
+
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
5919
5920
|
const ret = {};
|
|
5920
5921
|
if (!isObject(obj)) {
|
|
5921
5922
|
warn$1(`v-on with no argument expects an object value.`);
|
|
5922
5923
|
return ret;
|
|
5923
5924
|
}
|
|
5924
5925
|
for (const key in obj) {
|
|
5925
|
-
ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] =
|
|
5926
|
+
ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
|
|
5926
5927
|
}
|
|
5927
5928
|
return ret;
|
|
5928
5929
|
}
|
|
@@ -11415,7 +11416,7 @@ function isMemoSame(cached, memo) {
|
|
|
11415
11416
|
return true;
|
|
11416
11417
|
}
|
|
11417
11418
|
|
|
11418
|
-
const version = "3.6.0-beta.
|
|
11419
|
+
const version = "3.6.0-beta.3";
|
|
11419
11420
|
const warn = warn$1 ;
|
|
11420
11421
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11421
11422
|
const devtools = devtools$1 ;
|
|
@@ -14604,17 +14605,26 @@ const KeepAliveImpl = defineVaporComponent({
|
|
|
14604
14605
|
{
|
|
14605
14606
|
keepAliveInstance.__v_cache = cache;
|
|
14606
14607
|
}
|
|
14607
|
-
keepAliveInstance.
|
|
14608
|
-
|
|
14609
|
-
|
|
14610
|
-
|
|
14611
|
-
|
|
14612
|
-
|
|
14613
|
-
|
|
14614
|
-
|
|
14615
|
-
|
|
14608
|
+
keepAliveInstance.ctx = {
|
|
14609
|
+
getStorageContainer: () => storageContainer,
|
|
14610
|
+
getCachedComponent: (comp) => cache.get(comp),
|
|
14611
|
+
activate: (instance, parentNode, anchor) => {
|
|
14612
|
+
current = instance;
|
|
14613
|
+
activate(instance, parentNode, anchor);
|
|
14614
|
+
},
|
|
14615
|
+
deactivate: (instance) => {
|
|
14616
|
+
current = void 0;
|
|
14617
|
+
deactivate(instance, storageContainer);
|
|
14618
|
+
},
|
|
14619
|
+
// called when async component resolves to evaluate caching
|
|
14620
|
+
onAsyncResolve: (asyncWrapper) => {
|
|
14621
|
+
if (shouldCache(asyncWrapper, props, false)) {
|
|
14622
|
+
asyncWrapper.shapeFlag |= 256;
|
|
14623
|
+
innerCacheBlock(asyncWrapper.type, asyncWrapper);
|
|
14624
|
+
}
|
|
14625
|
+
}
|
|
14616
14626
|
};
|
|
14617
|
-
const innerCacheBlock = (key,
|
|
14627
|
+
const innerCacheBlock = (key, block) => {
|
|
14618
14628
|
const { max } = props;
|
|
14619
14629
|
if (cache.has(key)) {
|
|
14620
14630
|
keys.delete(key);
|
|
@@ -14625,8 +14635,8 @@ const KeepAliveImpl = defineVaporComponent({
|
|
|
14625
14635
|
pruneCacheEntry(keys.values().next().value);
|
|
14626
14636
|
}
|
|
14627
14637
|
}
|
|
14628
|
-
cache.set(key,
|
|
14629
|
-
current =
|
|
14638
|
+
cache.set(key, block);
|
|
14639
|
+
current = block;
|
|
14630
14640
|
};
|
|
14631
14641
|
const cacheBlock = () => {
|
|
14632
14642
|
const block = keepAliveInstance.block;
|
|
@@ -14653,19 +14663,6 @@ const KeepAliveImpl = defineVaporComponent({
|
|
|
14653
14663
|
}
|
|
14654
14664
|
return true;
|
|
14655
14665
|
};
|
|
14656
|
-
const cacheFragment = (fragment) => {
|
|
14657
|
-
const [innerBlock, interop] = getInnerBlock(fragment.nodes);
|
|
14658
|
-
if (!innerBlock || !shouldCache(innerBlock, props, interop)) return;
|
|
14659
|
-
let key;
|
|
14660
|
-
if (interop) {
|
|
14661
|
-
innerBlock.vnode.shapeFlag |= 256;
|
|
14662
|
-
key = innerBlock.vnode.type;
|
|
14663
|
-
} else {
|
|
14664
|
-
innerBlock.shapeFlag |= 256;
|
|
14665
|
-
key = innerBlock.type;
|
|
14666
|
-
}
|
|
14667
|
-
innerCacheBlock(key, innerBlock);
|
|
14668
|
-
};
|
|
14669
14666
|
const pruneCache = (filter) => {
|
|
14670
14667
|
cache.forEach((cached, key) => {
|
|
14671
14668
|
const instance = getInstanceFromCache(cached);
|
|
@@ -14736,7 +14733,7 @@ const KeepAliveImpl = defineVaporComponent({
|
|
|
14736
14733
|
}
|
|
14737
14734
|
);
|
|
14738
14735
|
(frag.onBeforeMount || (frag.onBeforeMount = [])).push(
|
|
14739
|
-
() =>
|
|
14736
|
+
() => processFragment(frag)
|
|
14740
14737
|
);
|
|
14741
14738
|
frag.getScope = (key) => {
|
|
14742
14739
|
const scope = keptAliveScopes.get(key);
|
|
@@ -14768,7 +14765,7 @@ const shouldCache = (block, props, interop = false) => {
|
|
|
14768
14765
|
const isAsync = !interop && isAsyncWrapper(block);
|
|
14769
14766
|
const type = interop ? block.vnode.type : block.type;
|
|
14770
14767
|
if (isAsync && !type.__asyncResolved) {
|
|
14771
|
-
return
|
|
14768
|
+
return false;
|
|
14772
14769
|
}
|
|
14773
14770
|
const { include, exclude } = props;
|
|
14774
14771
|
const name = getComponentName(isAsync ? type.__asyncResolved : type);
|
|
@@ -14820,16 +14817,6 @@ function deactivate(instance, container) {
|
|
|
14820
14817
|
devtoolsComponentAdded(instance);
|
|
14821
14818
|
}
|
|
14822
14819
|
}
|
|
14823
|
-
function findParentKeepAlive(instance) {
|
|
14824
|
-
let parent = instance;
|
|
14825
|
-
while (parent) {
|
|
14826
|
-
if (isKeepAlive(parent)) {
|
|
14827
|
-
return parent;
|
|
14828
|
-
}
|
|
14829
|
-
parent = parent.parent;
|
|
14830
|
-
}
|
|
14831
|
-
return null;
|
|
14832
|
-
}
|
|
14833
14820
|
|
|
14834
14821
|
let parentSuspense = null;
|
|
14835
14822
|
function setParentSuspense(suspense) {
|
|
@@ -14843,10 +14830,11 @@ function setParentSuspense(suspense) {
|
|
|
14843
14830
|
const interopKey = /* @__PURE__ */ Symbol(`interop`);
|
|
14844
14831
|
const vaporInteropImpl = {
|
|
14845
14832
|
mount(vnode, container, anchor, parentComponent, parentSuspense) {
|
|
14846
|
-
let selfAnchor = vnode.
|
|
14833
|
+
let selfAnchor = vnode.anchor = createTextNode();
|
|
14847
14834
|
if (isHydrating) {
|
|
14848
14835
|
queuePostFlushCb(() => container.insertBefore(selfAnchor, anchor));
|
|
14849
14836
|
} else {
|
|
14837
|
+
vnode.el = selfAnchor;
|
|
14850
14838
|
container.insertBefore(selfAnchor, anchor);
|
|
14851
14839
|
}
|
|
14852
14840
|
const prev = currentInstance;
|
|
@@ -14965,7 +14953,7 @@ const vaporInteropImpl = {
|
|
|
14965
14953
|
);
|
|
14966
14954
|
}
|
|
14967
14955
|
});
|
|
14968
|
-
return
|
|
14956
|
+
return vnode.anchor;
|
|
14969
14957
|
},
|
|
14970
14958
|
setTransitionHooks(component, hooks) {
|
|
14971
14959
|
setTransitionHooks(component, hooks);
|
|
@@ -15001,12 +14989,102 @@ const vaporSlotsProxyHandler = {
|
|
|
15001
14989
|
const slot = target[key];
|
|
15002
14990
|
if (isFunction(slot)) {
|
|
15003
14991
|
slot.__vapor = true;
|
|
14992
|
+
const wrapped = (props) => [
|
|
14993
|
+
renderSlot({ [key]: slot }, key, props)
|
|
14994
|
+
];
|
|
14995
|
+
wrapped.__vs = slot;
|
|
14996
|
+
return wrapped;
|
|
15004
14997
|
}
|
|
15005
14998
|
return slot;
|
|
15006
14999
|
}
|
|
15007
15000
|
};
|
|
15008
15001
|
let vdomHydrateNode;
|
|
15009
|
-
function
|
|
15002
|
+
function mountVNode(internals, vnode, parentComponent) {
|
|
15003
|
+
const frag = new VaporFragment([]);
|
|
15004
|
+
frag.vnode = vnode;
|
|
15005
|
+
let isMounted = false;
|
|
15006
|
+
const unmount = (parentNode, transition) => {
|
|
15007
|
+
if (transition) setTransitionHooks$1(vnode, transition);
|
|
15008
|
+
if (vnode.shapeFlag & 256) {
|
|
15009
|
+
if (vnode.type.__vapor) {
|
|
15010
|
+
deactivate(
|
|
15011
|
+
vnode.component,
|
|
15012
|
+
parentComponent.ctx.getStorageContainer()
|
|
15013
|
+
);
|
|
15014
|
+
} else {
|
|
15015
|
+
deactivate$1(
|
|
15016
|
+
vnode,
|
|
15017
|
+
parentComponent.ctx.getStorageContainer(),
|
|
15018
|
+
internals,
|
|
15019
|
+
parentComponent,
|
|
15020
|
+
null
|
|
15021
|
+
);
|
|
15022
|
+
}
|
|
15023
|
+
} else {
|
|
15024
|
+
internals.um(vnode, parentComponent, null, !!parentNode);
|
|
15025
|
+
}
|
|
15026
|
+
};
|
|
15027
|
+
frag.hydrate = () => {
|
|
15028
|
+
hydrateVNode(vnode, parentComponent);
|
|
15029
|
+
onScopeDispose(unmount, true);
|
|
15030
|
+
isMounted = true;
|
|
15031
|
+
frag.nodes = vnode.el;
|
|
15032
|
+
};
|
|
15033
|
+
frag.insert = (parentNode, anchor, transition) => {
|
|
15034
|
+
if (isHydrating) return;
|
|
15035
|
+
if (vnode.shapeFlag & 512) {
|
|
15036
|
+
if (vnode.type.__vapor) {
|
|
15037
|
+
activate(vnode.component, parentNode, anchor);
|
|
15038
|
+
} else {
|
|
15039
|
+
activate$1(
|
|
15040
|
+
vnode,
|
|
15041
|
+
parentNode,
|
|
15042
|
+
anchor,
|
|
15043
|
+
internals,
|
|
15044
|
+
parentComponent,
|
|
15045
|
+
null,
|
|
15046
|
+
void 0,
|
|
15047
|
+
false
|
|
15048
|
+
);
|
|
15049
|
+
}
|
|
15050
|
+
return;
|
|
15051
|
+
} else {
|
|
15052
|
+
const prev = currentInstance;
|
|
15053
|
+
simpleSetCurrentInstance(parentComponent);
|
|
15054
|
+
if (!isMounted) {
|
|
15055
|
+
if (transition) setTransitionHooks$1(vnode, transition);
|
|
15056
|
+
internals.p(
|
|
15057
|
+
null,
|
|
15058
|
+
vnode,
|
|
15059
|
+
parentNode,
|
|
15060
|
+
anchor,
|
|
15061
|
+
parentComponent,
|
|
15062
|
+
null,
|
|
15063
|
+
// parentSuspense
|
|
15064
|
+
void 0,
|
|
15065
|
+
// namespace
|
|
15066
|
+
vnode.slotScopeIds
|
|
15067
|
+
);
|
|
15068
|
+
onScopeDispose(unmount, true);
|
|
15069
|
+
isMounted = true;
|
|
15070
|
+
} else {
|
|
15071
|
+
internals.m(
|
|
15072
|
+
vnode,
|
|
15073
|
+
parentNode,
|
|
15074
|
+
anchor,
|
|
15075
|
+
2,
|
|
15076
|
+
parentComponent
|
|
15077
|
+
);
|
|
15078
|
+
}
|
|
15079
|
+
simpleSetCurrentInstance(prev);
|
|
15080
|
+
}
|
|
15081
|
+
frag.nodes = vnode.el;
|
|
15082
|
+
if (isMounted && frag.onUpdated) frag.onUpdated.forEach((m) => m());
|
|
15083
|
+
};
|
|
15084
|
+
frag.remove = unmount;
|
|
15085
|
+
return frag;
|
|
15086
|
+
}
|
|
15087
|
+
function createVDOMComponent(internals, component, parentComponent, rawProps, rawSlots, isSingleRoot) {
|
|
15010
15088
|
const frag = new VaporFragment([]);
|
|
15011
15089
|
const vnode = frag.vnode = createVNode(
|
|
15012
15090
|
component,
|
|
@@ -15037,7 +15115,7 @@ function createVDOMComponent(internals, component, parentComponent, rawProps, ra
|
|
|
15037
15115
|
if (vnode.shapeFlag & 256) {
|
|
15038
15116
|
deactivate$1(
|
|
15039
15117
|
vnode,
|
|
15040
|
-
|
|
15118
|
+
parentComponent.ctx.getStorageContainer(),
|
|
15041
15119
|
internals,
|
|
15042
15120
|
parentComponent,
|
|
15043
15121
|
null
|
|
@@ -15047,7 +15125,13 @@ function createVDOMComponent(internals, component, parentComponent, rawProps, ra
|
|
|
15047
15125
|
internals.umt(vnode.component, null, !!parentNode);
|
|
15048
15126
|
};
|
|
15049
15127
|
frag.hydrate = () => {
|
|
15050
|
-
hydrateVNode(
|
|
15128
|
+
hydrateVNode(
|
|
15129
|
+
vnode,
|
|
15130
|
+
parentComponent,
|
|
15131
|
+
// skip fragment start anchor for multi-root component
|
|
15132
|
+
// to avoid mismatch
|
|
15133
|
+
!isSingleRoot
|
|
15134
|
+
);
|
|
15051
15135
|
onScopeDispose(unmount, true);
|
|
15052
15136
|
isMounted = true;
|
|
15053
15137
|
frag.nodes = vnode.el;
|
|
@@ -15217,7 +15301,8 @@ const vaporInteropPlugin = (app) => {
|
|
|
15217
15301
|
app._context.vapor = extend(vaporInteropImpl, {
|
|
15218
15302
|
vdomMount: createVDOMComponent.bind(null, internals),
|
|
15219
15303
|
vdomUnmount: internals.umt,
|
|
15220
|
-
vdomSlot: renderVDOMSlot.bind(null, internals)
|
|
15304
|
+
vdomSlot: renderVDOMSlot.bind(null, internals),
|
|
15305
|
+
vdomMountVNode: mountVNode.bind(null, internals)
|
|
15221
15306
|
});
|
|
15222
15307
|
const mount = app.mount;
|
|
15223
15308
|
app.mount = ((...args) => {
|
|
@@ -15225,18 +15310,15 @@ const vaporInteropPlugin = (app) => {
|
|
|
15225
15310
|
return mount(...args);
|
|
15226
15311
|
});
|
|
15227
15312
|
};
|
|
15228
|
-
function hydrateVNode(vnode, parentComponent) {
|
|
15313
|
+
function hydrateVNode(vnode, parentComponent, skipFragmentAnchor = false) {
|
|
15229
15314
|
locateHydrationNode();
|
|
15230
15315
|
let node = currentHydrationNode;
|
|
15231
|
-
|
|
15232
|
-
|
|
15233
|
-
!(isVaporComponent(parentComponent) && isRef(parentComponent.rawSlots._))) {
|
|
15234
|
-
node = node.nextSibling;
|
|
15316
|
+
if (skipFragmentAnchor && isComment(node, "[")) {
|
|
15317
|
+
setCurrentHydrationNode(node = node.nextSibling);
|
|
15235
15318
|
}
|
|
15236
|
-
if (currentHydrationNode !== node) setCurrentHydrationNode(node);
|
|
15237
15319
|
if (!vdomHydrateNode) vdomHydrateNode = ensureHydrationRenderer().hydrateNode;
|
|
15238
15320
|
const nextNode = vdomHydrateNode(
|
|
15239
|
-
|
|
15321
|
+
node,
|
|
15240
15322
|
vnode,
|
|
15241
15323
|
parentComponent,
|
|
15242
15324
|
null,
|
|
@@ -15295,7 +15377,7 @@ function propGetter(rawProps, key) {
|
|
|
15295
15377
|
while (i--) {
|
|
15296
15378
|
const source = resolveSource(dynamicSources[i]);
|
|
15297
15379
|
if (hasOwn(source, key))
|
|
15298
|
-
return dynamicSources[interopKey] ? source[key] : resolveSource(source[key]);
|
|
15380
|
+
return dynamicSources[interopKey] || isOn(key) ? source[key] : resolveSource(source[key]);
|
|
15299
15381
|
}
|
|
15300
15382
|
}
|
|
15301
15383
|
return rawProps[key] && resolveSource(rawProps[key]);
|
|
@@ -15885,11 +15967,12 @@ class ForFragment extends VaporFragment {
|
|
|
15885
15967
|
}
|
|
15886
15968
|
}
|
|
15887
15969
|
class DynamicFragment extends VaporFragment {
|
|
15888
|
-
constructor(anchorLabel) {
|
|
15970
|
+
constructor(anchorLabel, keyed = false) {
|
|
15889
15971
|
super([]);
|
|
15890
15972
|
this.hydrate = (isEmpty = false) => {
|
|
15891
15973
|
hydrateDynamicFragment(this, isEmpty);
|
|
15892
15974
|
};
|
|
15975
|
+
this.keyed = keyed;
|
|
15893
15976
|
this.slotOwner = currentSlotOwner;
|
|
15894
15977
|
if (isHydrating) {
|
|
15895
15978
|
this.anchorLabel = anchorLabel;
|
|
@@ -15994,6 +16077,7 @@ class DynamicFragment extends VaporFragment {
|
|
|
15994
16077
|
this.nodes = this.scope.run(render) || [];
|
|
15995
16078
|
if (prev !== void 0) setCurrentInstance(...prev);
|
|
15996
16079
|
setCurrentSlotOwner(prevOwner);
|
|
16080
|
+
if (this.keyed) setKey(this.nodes, this.current);
|
|
15997
16081
|
if (transition) {
|
|
15998
16082
|
this.$transition = applyTransitionHooks(this.nodes, transition);
|
|
15999
16083
|
}
|
|
@@ -16060,6 +16144,19 @@ function isFragment(val) {
|
|
|
16060
16144
|
function isDynamicFragment(val) {
|
|
16061
16145
|
return val instanceof DynamicFragment;
|
|
16062
16146
|
}
|
|
16147
|
+
function setKey(block, key) {
|
|
16148
|
+
if (block instanceof Node) {
|
|
16149
|
+
block.$key = key;
|
|
16150
|
+
} else if (isVaporComponent(block)) {
|
|
16151
|
+
setKey(block.block, key);
|
|
16152
|
+
} else if (isArray(block)) {
|
|
16153
|
+
for (const b of block) {
|
|
16154
|
+
setKey(b, key);
|
|
16155
|
+
}
|
|
16156
|
+
} else {
|
|
16157
|
+
setKey(block.nodes, key);
|
|
16158
|
+
}
|
|
16159
|
+
}
|
|
16063
16160
|
|
|
16064
16161
|
const VaporTeleportImpl = {
|
|
16065
16162
|
name: "VaporTeleport",
|
|
@@ -16177,19 +16274,7 @@ class TeleportFragment extends VaporFragment {
|
|
|
16177
16274
|
});
|
|
16178
16275
|
const nodes = this.nodes;
|
|
16179
16276
|
if (this.parentComponent && this.parentComponent.ut) {
|
|
16180
|
-
|
|
16181
|
-
(nodes.onUpdated || (nodes.onUpdated = [])).push(
|
|
16182
|
-
() => updateCssVars(this)
|
|
16183
|
-
);
|
|
16184
|
-
} else if (isArray(nodes)) {
|
|
16185
|
-
nodes.forEach((node) => {
|
|
16186
|
-
if (isFragment(node)) {
|
|
16187
|
-
(node.onUpdated || (node.onUpdated = [])).push(
|
|
16188
|
-
() => updateCssVars(this)
|
|
16189
|
-
);
|
|
16190
|
-
}
|
|
16191
|
-
});
|
|
16192
|
-
}
|
|
16277
|
+
this.registerUpdateCssVars(nodes);
|
|
16193
16278
|
}
|
|
16194
16279
|
{
|
|
16195
16280
|
if (isVaporComponent(nodes)) {
|
|
@@ -16201,6 +16286,18 @@ class TeleportFragment extends VaporFragment {
|
|
|
16201
16286
|
}
|
|
16202
16287
|
}
|
|
16203
16288
|
}
|
|
16289
|
+
registerUpdateCssVars(block) {
|
|
16290
|
+
if (isFragment(block)) {
|
|
16291
|
+
(block.onUpdated || (block.onUpdated = [])).push(
|
|
16292
|
+
() => updateCssVars(this)
|
|
16293
|
+
);
|
|
16294
|
+
this.registerUpdateCssVars(block.nodes);
|
|
16295
|
+
} else if (isVaporComponent(block)) {
|
|
16296
|
+
this.registerUpdateCssVars(block.block);
|
|
16297
|
+
} else if (isArray(block)) {
|
|
16298
|
+
block.forEach((node) => this.registerUpdateCssVars(node));
|
|
16299
|
+
}
|
|
16300
|
+
}
|
|
16204
16301
|
handleChildrenUpdate(children) {
|
|
16205
16302
|
if (!this.parent || isHydrating) {
|
|
16206
16303
|
this.nodes = children;
|
|
@@ -16670,9 +16767,7 @@ function createComponent(component, rawProps, rawSlots, isSingleRoot, once, appC
|
|
|
16670
16767
|
}
|
|
16671
16768
|
}
|
|
16672
16769
|
if (currentInstance && currentInstance.vapor && isKeepAlive(currentInstance)) {
|
|
16673
|
-
const cached = currentInstance.getCachedComponent(
|
|
16674
|
-
component
|
|
16675
|
-
);
|
|
16770
|
+
const cached = currentInstance.ctx.getCachedComponent(component);
|
|
16676
16771
|
if (cached) return cached;
|
|
16677
16772
|
}
|
|
16678
16773
|
if (appContext.vapor && !component.__vapor) {
|
|
@@ -16680,7 +16775,8 @@ function createComponent(component, rawProps, rawSlots, isSingleRoot, once, appC
|
|
|
16680
16775
|
component,
|
|
16681
16776
|
currentInstance,
|
|
16682
16777
|
rawProps,
|
|
16683
|
-
rawSlots
|
|
16778
|
+
rawSlots,
|
|
16779
|
+
isSingleRoot
|
|
16684
16780
|
);
|
|
16685
16781
|
if (!isHydrating) {
|
|
16686
16782
|
if (_insertionParent) insert(frag, _insertionParent, _insertionAnchor);
|
|
@@ -16927,6 +17023,9 @@ function isVaporComponent(value) {
|
|
|
16927
17023
|
return value instanceof VaporComponentInstance;
|
|
16928
17024
|
}
|
|
16929
17025
|
function createComponentWithFallback(comp, rawProps, rawSlots, isSingleRoot, once, appContext) {
|
|
17026
|
+
if (comp === NULL_DYNAMIC_COMPONENT) {
|
|
17027
|
+
return createComment("ndc") ;
|
|
17028
|
+
}
|
|
16930
17029
|
if (!isString(comp)) {
|
|
16931
17030
|
return createComponent(
|
|
16932
17031
|
comp,
|
|
@@ -16998,7 +17097,11 @@ function mountComponent(instance, parent, anchor) {
|
|
|
16998
17097
|
return;
|
|
16999
17098
|
}
|
|
17000
17099
|
if (instance.shapeFlag & 512) {
|
|
17001
|
-
|
|
17100
|
+
instance.parent.ctx.activate(
|
|
17101
|
+
instance,
|
|
17102
|
+
parent,
|
|
17103
|
+
anchor
|
|
17104
|
+
);
|
|
17002
17105
|
return;
|
|
17003
17106
|
}
|
|
17004
17107
|
const { root, type } = instance;
|
|
@@ -17025,7 +17128,7 @@ function mountComponent(instance, parent, anchor) {
|
|
|
17025
17128
|
}
|
|
17026
17129
|
function unmountComponent(instance, parentNode) {
|
|
17027
17130
|
if (parentNode && instance.parent && instance.parent.vapor && instance.shapeFlag & 256) {
|
|
17028
|
-
|
|
17131
|
+
instance.parent.ctx.deactivate(instance);
|
|
17029
17132
|
return;
|
|
17030
17133
|
}
|
|
17031
17134
|
if (instance.isMounted && !instance.isUnmounted) {
|
|
@@ -17312,6 +17415,9 @@ function defineVaporAsyncComponent(source) {
|
|
|
17312
17415
|
);
|
|
17313
17416
|
load().then(() => {
|
|
17314
17417
|
loaded.value = true;
|
|
17418
|
+
if (instance.parent && isKeepAlive(instance.parent)) {
|
|
17419
|
+
instance.parent.ctx.onAsyncResolve(instance);
|
|
17420
|
+
}
|
|
17315
17421
|
}).catch((err) => {
|
|
17316
17422
|
onError(err);
|
|
17317
17423
|
error.value = err;
|
|
@@ -17527,7 +17633,7 @@ function createKeyedFragment(key, render) {
|
|
|
17527
17633
|
const _insertionAnchor = insertionAnchor;
|
|
17528
17634
|
const _isLastInsertion = isLastInsertion;
|
|
17529
17635
|
if (!isHydrating) resetInsertionState();
|
|
17530
|
-
const frag = new DynamicFragment("keyed") ;
|
|
17636
|
+
const frag = new DynamicFragment("keyed", true) ;
|
|
17531
17637
|
renderEffect(() => frag.update(render, key()));
|
|
17532
17638
|
if (!isHydrating) {
|
|
17533
17639
|
if (_insertionParent) insert(frag, _insertionParent, _insertionAnchor);
|
|
@@ -18020,7 +18126,12 @@ function ensureCleanup(el) {
|
|
|
18020
18126
|
}
|
|
18021
18127
|
function createTemplateRefSetter() {
|
|
18022
18128
|
const instance = currentInstance;
|
|
18023
|
-
|
|
18129
|
+
const oldRefMap = /* @__PURE__ */ new WeakMap();
|
|
18130
|
+
return (el, ref, refFor, refKey) => {
|
|
18131
|
+
const oldRef = setRef(instance, el, ref, oldRefMap.get(el), refFor, refKey);
|
|
18132
|
+
oldRefMap.set(el, oldRef);
|
|
18133
|
+
return oldRef;
|
|
18134
|
+
};
|
|
18024
18135
|
}
|
|
18025
18136
|
function setRef(instance, el, ref, oldRef, refFor = false, refKey) {
|
|
18026
18137
|
if (!instance || instance.isUnmounted) return;
|
|
@@ -18173,20 +18284,31 @@ function createDynamicComponent(getter, rawProps, rawSlots, isSingleRoot, once)
|
|
|
18173
18284
|
const renderFn = () => {
|
|
18174
18285
|
const value = getter();
|
|
18175
18286
|
const appContext = currentInstance && currentInstance.appContext || emptyContext;
|
|
18176
|
-
frag.update(
|
|
18177
|
-
()
|
|
18178
|
-
|
|
18179
|
-
|
|
18180
|
-
|
|
18181
|
-
|
|
18182
|
-
|
|
18183
|
-
|
|
18184
|
-
|
|
18185
|
-
|
|
18186
|
-
|
|
18187
|
-
|
|
18188
|
-
|
|
18189
|
-
|
|
18287
|
+
frag.update(() => {
|
|
18288
|
+
if (isBlock(value)) return value;
|
|
18289
|
+
if (appContext.vapor && isVNode(value)) {
|
|
18290
|
+
if (isKeepAlive(currentInstance)) {
|
|
18291
|
+
const frag3 = currentInstance.ctx.getCachedComponent(value.type);
|
|
18292
|
+
if (frag3) return frag3;
|
|
18293
|
+
}
|
|
18294
|
+
const frag2 = appContext.vapor.vdomMountVNode(value, currentInstance);
|
|
18295
|
+
if (isHydrating) {
|
|
18296
|
+
frag2.hydrate();
|
|
18297
|
+
if (_isLastInsertion) {
|
|
18298
|
+
advanceHydrationNode(_insertionParent);
|
|
18299
|
+
}
|
|
18300
|
+
}
|
|
18301
|
+
return frag2;
|
|
18302
|
+
}
|
|
18303
|
+
return createComponentWithFallback(
|
|
18304
|
+
resolveDynamicComponent(value),
|
|
18305
|
+
rawProps,
|
|
18306
|
+
rawSlots,
|
|
18307
|
+
isSingleRoot,
|
|
18308
|
+
once,
|
|
18309
|
+
appContext
|
|
18310
|
+
);
|
|
18311
|
+
}, value);
|
|
18190
18312
|
};
|
|
18191
18313
|
if (once) renderFn();
|
|
18192
18314
|
else renderEffect(renderFn);
|
|
@@ -18514,4 +18636,4 @@ function getFirstConnectedChild(children) {
|
|
|
18514
18636
|
}
|
|
18515
18637
|
}
|
|
18516
18638
|
|
|
18517
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment$1 as Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, ReactiveEffect, Static, Suspense, Teleport, Text$1 as Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VaporElement, VaporFragment, VaporKeepAliveImpl as VaporKeepAlive, VaporTeleportImpl as VaporTeleport, VaporTransition, VaporTransitionGroup, VueElement, VueElementBase, activate$1 as activate, applyCheckboxModel, applyDynamicModel, applyRadioModel, applySelectModel, applyTextModel, applyVShow, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, baseUseCssVars, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, child, cloneVNode, compatUtils, compile, computed, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createComponent, createComponentWithFallback, createDynamicComponent, createElementBlock, createBaseVNode as createElementVNode, createFor, createForSlots, createHydrationRenderer, createIf, createInternalObject, createInvoker, createKeyedFragment, createPlainElement, createPropsRestProxy, createRenderer, createSSRApp, createSlot, createSlots, createStaticVNode, createTemplateRefSetter, createTextNode, createTextVNode, createVNode, createVaporApp, createVaporSSRApp, currentInstance, customRef, deactivate$1 as deactivate, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, defineVaporAsyncComponent, defineVaporComponent, defineVaporCustomElement, defineVaporSSRCustomElement, delegate, delegateEvents, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureVaporSlotFallback, expose, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getDefaultValue, getFunctionalFallthrough, getInheritedScopeIds, getRestElement, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, insert, isAsyncWrapper, isEmitListener, isFragment, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isVNode, isValidHtmlOrSvgAttribute, isVaporComponent, leaveCbKey, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, next, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, nthChild, on, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepend, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, remove, render, renderEffect, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks$1 as resolveTransitionHooks, resolveTransitionProps, setAttr, setBlockHtml, setBlockText, setBlockTracking, setClass, setCurrentInstance, setDOMProp, setDevtoolsHook, setDynamicEvents, setDynamicProps, setElementText, setHtml, setInsertionState, setProp, setRef$1 as setRef, setStyle, setText, setTransitionHooks$1 as setTransitionHooks, setValue, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, template, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, txt, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, useVaporCssVars, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, vaporInteropPlugin, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, withVaporCtx, withVaporDirectives, xlinkNS };
|
|
18639
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment$1 as Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, Static, Suspense, Teleport, Text$1 as Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VaporElement, VaporFragment, VaporKeepAliveImpl as VaporKeepAlive, VaporTeleportImpl as VaporTeleport, VaporTransition, VaporTransitionGroup, VueElement, VueElementBase, activate$1 as activate, applyCheckboxModel, applyDynamicModel, applyRadioModel, applySelectModel, applyTextModel, applyVShow, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, baseUseCssVars, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, child, cloneVNode, compatUtils, compile, computed, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createComponent, createComponentWithFallback, createDynamicComponent, createElementBlock, createBaseVNode as createElementVNode, createFor, createForSlots, createHydrationRenderer, createIf, createInternalObject, createInvoker, createKeyedFragment, createPlainElement, createPropsRestProxy, createRenderer, createSSRApp, createSlot, createSlots, createStaticVNode, createTemplateRefSetter, createTextNode, createTextVNode, createVNode, createVaporApp, createVaporSSRApp, currentInstance, customRef, deactivate$1 as deactivate, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, defineVaporAsyncComponent, defineVaporComponent, defineVaporCustomElement, defineVaporSSRCustomElement, delegate, delegateEvents, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureVaporSlotFallback, expose, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getDefaultValue, getFunctionalFallthrough, getInheritedScopeIds, getRestElement, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, insert, isAsyncWrapper, isEmitListener, isFragment, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isVNode, isValidHtmlOrSvgAttribute, isVaporComponent, leaveCbKey, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, next, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, nthChild, on, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepend, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, remove, render, renderEffect, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks$1 as resolveTransitionHooks, resolveTransitionProps, setAttr, setBlockHtml, setBlockText, setBlockTracking, setClass, setCurrentInstance, setDOMProp, setDevtoolsHook, setDynamicEvents, setDynamicProps, setElementText, setHtml, setInsertionState, setProp, setRef$1 as setRef, setStyle, setText, setTransitionHooks$1 as setTransitionHooks, setValue, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, template, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, txt, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, useVaporCssVars, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, vaporInteropPlugin, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, withVaporCtx, withVaporDirectives, xlinkNS };
|