@vue/server-renderer 3.2.47 → 3.3.0-alpha.10

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.
@@ -1,101 +1,71 @@
1
- /// <reference types="node" />
2
-
3
- import { App } from 'vue';
4
- import { Component } from 'vue';
5
- import { ComponentInternalInstance } from 'vue';
6
- import { ComponentPublicInstance } from '@vue/runtime-core';
7
- import { Directive } from '@vue/runtime-core';
8
- import { Readable } from 'stream';
9
- import { Slots } from 'vue';
10
- import { includeBooleanAttr as ssrIncludeBooleanAttr } from '@vue/shared';
11
- import { VNode } from 'vue';
12
- import { Writable } from 'stream';
13
-
14
- export declare function pipeToNodeWritable(input: App | VNode, context: SSRContext | undefined, writable: Writable): void;
15
-
16
- export declare function pipeToWebWritable(input: App | VNode, context: SSRContext | undefined, writable: WritableStream): void;
17
-
18
- declare type Props = Record<string, unknown>;
19
-
20
- declare type PushFn = (item: SSRBufferItem) => void;
21
-
22
- export declare function renderToNodeStream(input: App | VNode, context?: SSRContext): Readable;
23
-
24
- export declare function renderToSimpleStream<T extends SimpleReadable>(input: App | VNode, context: SSRContext, stream: T): T;
25
-
26
- /**
27
- * @deprecated
28
- */
29
- export declare function renderToStream(input: App | VNode, context?: SSRContext): Readable;
30
-
31
- export declare function renderToString(input: App | VNode, context?: SSRContext): Promise<string>;
32
-
33
- export declare function renderToWebStream(input: App | VNode, context?: SSRContext): ReadableStream;
34
-
35
- export declare interface SimpleReadable {
36
- push(chunk: string | null): void;
37
- destroy(err: any): void;
38
- }
39
-
40
- declare type SSRBuffer = SSRBufferItem[] & {
41
- hasAsync?: boolean;
42
- };
43
-
44
- declare type SSRBufferItem = string | SSRBuffer | Promise<SSRBuffer>;
45
-
46
- export declare type SSRContext = {
47
- [key: string]: any;
48
- teleports?: Record<string, string>;
49
- /* Excluded from this release type: __teleportBuffers */
50
- /* Excluded from this release type: __watcherHandles */
51
- };
52
-
53
- export declare function ssrGetDirectiveProps(instance: ComponentPublicInstance, dir: Directive, value?: any, arg?: string, modifiers?: Record<string, boolean>): Record<string, any>;
54
-
55
- export declare function ssrGetDynamicModelProps(existingProps: any, model: unknown): {
56
- checked: boolean;
57
- value?: undefined;
58
- } | {
59
- value: unknown;
60
- checked?: undefined;
61
- } | null;
62
-
63
- export { ssrIncludeBooleanAttr }
64
-
65
- export declare function ssrInterpolate(value: unknown): string;
66
-
67
- export declare function ssrLooseContain(arr: unknown[], value: unknown): boolean;
68
-
69
- export declare const ssrLooseEqual: (a: unknown, b: unknown) => boolean;
70
-
71
- export declare function ssrRenderAttr(key: string, value: unknown): string;
72
-
73
- export declare function ssrRenderAttrs(props: Record<string, unknown>, tag?: string): string;
74
-
75
- export declare function ssrRenderClass(raw: unknown): string;
76
-
77
- export declare function ssrRenderComponent(comp: Component, props?: Props | null, children?: Slots | SSRSlots | null, parentComponent?: ComponentInternalInstance | null, slotScopeId?: string): SSRBuffer | Promise<SSRBuffer>;
78
-
79
- export declare function ssrRenderDynamicAttr(key: string, value: unknown, tag?: string): string;
80
-
81
- export declare function ssrRenderDynamicModel(type: unknown, model: unknown, value: unknown): string;
82
-
83
- export declare function ssrRenderList(source: unknown, renderItem: (value: unknown, key: string | number, index?: number) => void): void;
84
-
85
- export declare function ssrRenderSlot(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string): void;
86
-
87
- export declare function ssrRenderSlotInner(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string, transition?: boolean): void;
88
-
89
- export declare function ssrRenderStyle(raw: unknown): string;
90
-
91
- export declare function ssrRenderSuspense(push: PushFn, { default: renderContent }: Record<string, (() => void) | undefined>): Promise<void>;
92
-
93
- export declare function ssrRenderTeleport(parentPush: PushFn, contentRenderFn: (push: PushFn) => void, target: string, disabled: boolean, parentComponent: ComponentInternalInstance): void;
94
-
95
- export declare function ssrRenderVNode(push: PushFn, vnode: VNode, parentComponent: ComponentInternalInstance, slotScopeId?: string): void;
96
-
97
- declare type SSRSlot = (props: Props, push: PushFn, parentComponent: ComponentInternalInstance | null, scopeId: string | null) => void;
98
-
99
- declare type SSRSlots = Record<string, SSRSlot>;
100
-
101
- export { }
1
+ /// <reference types="node" />
2
+ import { VNode, ComponentInternalInstance, App, Slots, Component } from 'vue';
3
+ import { Readable, Writable } from 'stream';
4
+ import { ComponentPublicInstance, Directive } from '@vue/runtime-core';
5
+ export { includeBooleanAttr as ssrIncludeBooleanAttr } from '@vue/shared';
6
+
7
+ type SSRBuffer = SSRBufferItem[] & {
8
+ hasAsync?: boolean;
9
+ };
10
+ type SSRBufferItem = string | SSRBuffer | Promise<SSRBuffer>;
11
+ type PushFn = (item: SSRBufferItem) => void;
12
+ type Props = Record<string, unknown>;
13
+ export type SSRContext = {
14
+ [key: string]: any;
15
+ teleports?: Record<string, string>;
16
+ /* removed internal: __teleportBuffers */
17
+ /* removed internal: __watcherHandles */
18
+ };
19
+ export declare function renderVNode(push: PushFn, vnode: VNode, parentComponent: ComponentInternalInstance, slotScopeId?: string): void;
20
+
21
+ export declare function renderToString(input: App | VNode, context?: SSRContext): Promise<string>;
22
+
23
+ export interface SimpleReadable {
24
+ push(chunk: string | null): void;
25
+ destroy(err: any): void;
26
+ }
27
+ export declare function renderToSimpleStream<T extends SimpleReadable>(input: App | VNode, context: SSRContext, stream: T): T;
28
+ /**
29
+ * @deprecated
30
+ */
31
+ export declare function renderToStream(input: App | VNode, context?: SSRContext): Readable;
32
+ export declare function renderToNodeStream(input: App | VNode, context?: SSRContext): Readable;
33
+ export declare function pipeToNodeWritable(input: App | VNode, context: SSRContext | undefined, writable: Writable): void;
34
+ export declare function renderToWebStream(input: App | VNode, context?: SSRContext): ReadableStream;
35
+ export declare function pipeToWebWritable(input: App | VNode, context: SSRContext | undefined, writable: WritableStream): void;
36
+
37
+ type SSRSlots = Record<string, SSRSlot>;
38
+ type SSRSlot = (props: Props, push: PushFn, parentComponent: ComponentInternalInstance | null, scopeId: string | null) => void;
39
+ export declare function ssrRenderSlot(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string): void;
40
+ export declare function ssrRenderSlotInner(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string, transition?: boolean): void;
41
+
42
+ export declare function ssrRenderComponent(comp: Component, props?: Props | null, children?: Slots | SSRSlots | null, parentComponent?: ComponentInternalInstance | null, slotScopeId?: string): SSRBuffer | Promise<SSRBuffer>;
43
+
44
+ export declare function ssrRenderTeleport(parentPush: PushFn, contentRenderFn: (push: PushFn) => void, target: string, disabled: boolean, parentComponent: ComponentInternalInstance): void;
45
+
46
+ export declare function ssrRenderAttrs(props: Record<string, unknown>, tag?: string): string;
47
+ export declare function ssrRenderDynamicAttr(key: string, value: unknown, tag?: string): string;
48
+ export declare function ssrRenderAttr(key: string, value: unknown): string;
49
+ export declare function ssrRenderClass(raw: unknown): string;
50
+ export declare function ssrRenderStyle(raw: unknown): string;
51
+
52
+ export declare function ssrInterpolate(value: unknown): string;
53
+
54
+ export declare function ssrRenderList(source: unknown, renderItem: (value: unknown, key: string | number, index?: number) => void): void;
55
+
56
+ export declare function ssrRenderSuspense(push: PushFn, { default: renderContent }: Record<string, (() => void) | undefined>): Promise<void>;
57
+
58
+ export declare function ssrGetDirectiveProps(instance: ComponentPublicInstance, dir: Directive, value?: any, arg?: string, modifiers?: Record<string, boolean>): Record<string, any>;
59
+
60
+ export declare const ssrLooseEqual: (a: unknown, b: unknown) => boolean;
61
+ export declare function ssrLooseContain(arr: unknown[], value: unknown): boolean;
62
+ export declare function ssrRenderDynamicModel(type: unknown, model: unknown, value: unknown): string;
63
+ export declare function ssrGetDynamicModelProps(existingProps: any, model: unknown): {
64
+ checked: boolean;
65
+ value?: undefined;
66
+ } | {
67
+ value: unknown;
68
+ checked?: undefined;
69
+ } | null;
70
+
71
+ export { renderVNode as ssrRenderVNode };