@vue/server-renderer 3.2.36 → 3.2.37
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/server-renderer.cjs.js +12 -7
- package/dist/server-renderer.cjs.prod.js +10 -5
- package/dist/server-renderer.d.ts +1 -1
- package/dist/server-renderer.esm-browser.js +8010 -0
- package/dist/server-renderer.esm-browser.prod.js +1 -0
- package/dist/server-renderer.esm-bundler.js +12 -7
- package/package.json +5 -4
|
@@ -614,7 +614,7 @@ function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, paren
|
|
|
614
614
|
ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId);
|
|
615
615
|
push(`<!--]-->`);
|
|
616
616
|
}
|
|
617
|
-
function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) {
|
|
617
|
+
function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) {
|
|
618
618
|
const slotFn = slots[slotName];
|
|
619
619
|
if (slotFn) {
|
|
620
620
|
const slotBuffer = [];
|
|
@@ -630,10 +630,15 @@ function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push,
|
|
|
630
630
|
// ssr slot.
|
|
631
631
|
// check if the slot renders all comments, in which case use the fallback
|
|
632
632
|
let isEmptySlot = true;
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
633
|
+
if (transition) {
|
|
634
|
+
isEmptySlot = false;
|
|
635
|
+
}
|
|
636
|
+
else {
|
|
637
|
+
for (let i = 0; i < slotBuffer.length; i++) {
|
|
638
|
+
if (!isComment(slotBuffer[i])) {
|
|
639
|
+
isEmptySlot = false;
|
|
640
|
+
break;
|
|
641
|
+
}
|
|
637
642
|
}
|
|
638
643
|
}
|
|
639
644
|
if (isEmptySlot) {
|
|
@@ -874,10 +879,10 @@ function logError(err, type, contextVNode, throwInDev = true) {
|
|
|
874
879
|
|
|
875
880
|
const classifyRE = /(?:^|[-_])(\w)/g;
|
|
876
881
|
const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
|
|
877
|
-
function getComponentName(Component) {
|
|
882
|
+
function getComponentName(Component, includeInferred = true) {
|
|
878
883
|
return shared.isFunction(Component)
|
|
879
884
|
? Component.displayName || Component.name
|
|
880
|
-
: Component.name;
|
|
885
|
+
: Component.name || (includeInferred && Component.__name);
|
|
881
886
|
}
|
|
882
887
|
/* istanbul ignore next */
|
|
883
888
|
function formatComponentName(instance, Component, isRoot = false) {
|
|
@@ -611,7 +611,7 @@ function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, paren
|
|
|
611
611
|
ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId);
|
|
612
612
|
push(`<!--]-->`);
|
|
613
613
|
}
|
|
614
|
-
function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) {
|
|
614
|
+
function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) {
|
|
615
615
|
const slotFn = slots[slotName];
|
|
616
616
|
if (slotFn) {
|
|
617
617
|
const slotBuffer = [];
|
|
@@ -627,10 +627,15 @@ function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push,
|
|
|
627
627
|
// ssr slot.
|
|
628
628
|
// check if the slot renders all comments, in which case use the fallback
|
|
629
629
|
let isEmptySlot = true;
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
630
|
+
if (transition) {
|
|
631
|
+
isEmptySlot = false;
|
|
632
|
+
}
|
|
633
|
+
else {
|
|
634
|
+
for (let i = 0; i < slotBuffer.length; i++) {
|
|
635
|
+
if (!isComment(slotBuffer[i])) {
|
|
636
|
+
isEmptySlot = false;
|
|
637
|
+
break;
|
|
638
|
+
}
|
|
634
639
|
}
|
|
635
640
|
}
|
|
636
641
|
if (isEmptySlot) {
|
|
@@ -83,7 +83,7 @@ export declare function ssrRenderList(source: unknown, renderItem: (value: unkno
|
|
|
83
83
|
|
|
84
84
|
export declare function ssrRenderSlot(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string): void;
|
|
85
85
|
|
|
86
|
-
export declare function ssrRenderSlotInner(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string): void;
|
|
86
|
+
export declare function ssrRenderSlotInner(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string, transition?: boolean): void;
|
|
87
87
|
|
|
88
88
|
export declare function ssrRenderStyle(raw: unknown): string;
|
|
89
89
|
|