@flight-framework/core 0.3.1 → 0.3.2

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.
Files changed (142) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +541 -541
  3. package/dist/actions/index.js +1 -1
  4. package/dist/adapters/index.js +1 -1
  5. package/dist/cache/index.js +1 -1
  6. package/dist/{chunk-FSJNOPYE.js → chunk-2JVEH76V.js} +3 -3
  7. package/dist/chunk-2JVEH76V.js.map +1 -0
  8. package/dist/{chunk-VPFMHGEV.js → chunk-3N5ZBVZJ.js} +2 -2
  9. package/dist/chunk-3N5ZBVZJ.js.map +1 -0
  10. package/dist/{chunk-2F2QU6RC.js → chunk-3UQJE3XZ.js} +2 -2
  11. package/dist/chunk-3UQJE3XZ.js.map +1 -0
  12. package/dist/{chunk-3KRBRSRJ.js → chunk-4U7CJVNQ.js} +2 -2
  13. package/dist/chunk-4U7CJVNQ.js.map +1 -0
  14. package/dist/{chunk-PDW5WCMW.js → chunk-5XHOLZBJ.js} +2 -2
  15. package/dist/chunk-5XHOLZBJ.js.map +1 -0
  16. package/dist/{chunk-MDQNNIHH.js → chunk-65JYF3DJ.js} +2 -2
  17. package/dist/chunk-65JYF3DJ.js.map +1 -0
  18. package/dist/{chunk-K2CQZPCG.js → chunk-6GI6HFSQ.js} +2 -2
  19. package/dist/chunk-6GI6HFSQ.js.map +1 -0
  20. package/dist/{chunk-3ZSSRE6M.js → chunk-6IG6XIXU.js} +29 -3
  21. package/dist/chunk-6IG6XIXU.js.map +1 -0
  22. package/dist/{chunk-PVUMB632.js → chunk-A2QRUBVE.js} +2 -2
  23. package/dist/chunk-A2QRUBVE.js.map +1 -0
  24. package/dist/{chunk-W6D62JCI.js → chunk-A4TKWQBU.js} +2 -2
  25. package/dist/chunk-A4TKWQBU.js.map +1 -0
  26. package/dist/{chunk-GCQZ4FHI.js → chunk-ARBKF6VI.js} +2 -2
  27. package/dist/{chunk-GCQZ4FHI.js.map → chunk-ARBKF6VI.js.map} +1 -1
  28. package/dist/{chunk-ZVC3ZWLM.js → chunk-B2LPSCES.js} +2 -2
  29. package/dist/chunk-B2LPSCES.js.map +1 -0
  30. package/dist/{chunk-62C7LX2E.js → chunk-CKJHJPKQ.js} +2 -2
  31. package/dist/chunk-CKJHJPKQ.js.map +1 -0
  32. package/dist/{chunk-RSVA2EYO.js → chunk-CNY3ZUVG.js} +2 -2
  33. package/dist/chunk-CNY3ZUVG.js.map +1 -0
  34. package/dist/{chunk-IXMD5QH2.js → chunk-EHVUAFNH.js} +2 -2
  35. package/dist/chunk-EHVUAFNH.js.map +1 -0
  36. package/dist/{chunk-P6WSBVDT.js → chunk-FRAH5QNY.js} +4 -4
  37. package/dist/chunk-FRAH5QNY.js.map +1 -0
  38. package/dist/{chunk-MQQLYWZZ.js → chunk-GNS2FGPC.js} +2 -2
  39. package/dist/chunk-GNS2FGPC.js.map +1 -0
  40. package/dist/{chunk-TASAT7KB.js → chunk-HNPO6LFW.js} +2 -2
  41. package/dist/chunk-HNPO6LFW.js.map +1 -0
  42. package/dist/{chunk-ROJFQCGV.js → chunk-KDEA64UX.js} +5 -5
  43. package/dist/chunk-KDEA64UX.js.map +1 -0
  44. package/dist/{chunk-NWMJYTMB.js → chunk-LAKHYTHL.js} +3 -3
  45. package/dist/chunk-LAKHYTHL.js.map +1 -0
  46. package/dist/{chunk-R7SQAREQ.js → chunk-LKOPJ3GS.js} +2 -2
  47. package/dist/chunk-LKOPJ3GS.js.map +1 -0
  48. package/dist/{chunk-WOEIJWGJ.js → chunk-NZS2YJ43.js} +2 -2
  49. package/dist/chunk-NZS2YJ43.js.map +1 -0
  50. package/dist/{chunk-3QP3E7HS.js → chunk-OZ3EXPLE.js} +2 -2
  51. package/dist/chunk-OZ3EXPLE.js.map +1 -0
  52. package/dist/{chunk-YHEVHRLH.js → chunk-OZBPR27I.js} +2 -2
  53. package/dist/chunk-OZBPR27I.js.map +1 -0
  54. package/dist/{chunk-T4Z4HM4W.js → chunk-PAVI5W6M.js} +3 -3
  55. package/dist/chunk-PAVI5W6M.js.map +1 -0
  56. package/dist/{chunk-XSY5AAXT.js → chunk-PO7IHPFF.js} +2 -2
  57. package/dist/chunk-PO7IHPFF.js.map +1 -0
  58. package/dist/{chunk-SUILH4ID.js → chunk-QK6UEQ75.js} +2 -2
  59. package/dist/chunk-QK6UEQ75.js.map +1 -0
  60. package/dist/{chunk-OYF2OAKS.js → chunk-R7MEVVA4.js} +2 -2
  61. package/dist/chunk-R7MEVVA4.js.map +1 -0
  62. package/dist/{chunk-WFAWAHJH.js → chunk-UFWGOJL7.js} +2 -2
  63. package/dist/chunk-UFWGOJL7.js.map +1 -0
  64. package/dist/{chunk-XOIYNY4I.js → chunk-VNO2YUVD.js} +2 -2
  65. package/dist/chunk-VNO2YUVD.js.map +1 -0
  66. package/dist/{chunk-ZIE56LCA.js → chunk-XU6MRYG2.js} +3 -3
  67. package/dist/chunk-XU6MRYG2.js.map +1 -0
  68. package/dist/{chunk-6BDCTUQY.js → chunk-YNTMYL36.js} +3 -3
  69. package/dist/chunk-YNTMYL36.js.map +1 -0
  70. package/dist/client.d.ts +25 -0
  71. package/dist/client.js +16 -0
  72. package/dist/client.js.map +1 -0
  73. package/dist/config/index.js +1 -1
  74. package/dist/errors/index.js +2 -2
  75. package/dist/file-router/index.js +1 -1
  76. package/dist/file-router/streaming-hints.js +1 -1
  77. package/dist/handlers/index.js +1 -1
  78. package/dist/index.js +30 -30
  79. package/dist/index.js.map +1 -1
  80. package/dist/islands/index.js +1 -1
  81. package/dist/middleware/index.js +1 -1
  82. package/dist/react/index.js +2 -2
  83. package/dist/react/index.js.map +1 -1
  84. package/dist/render/index.js +1 -1
  85. package/dist/router/index.js +1 -1
  86. package/dist/rsc/adapters/index.js +4 -4
  87. package/dist/rsc/adapters/preact.js +1 -1
  88. package/dist/rsc/adapters/react.js +1 -1
  89. package/dist/rsc/adapters/solid.js +1 -1
  90. package/dist/rsc/adapters/vue.js +1 -1
  91. package/dist/rsc/boundaries.js +1 -1
  92. package/dist/rsc/context.js +1 -1
  93. package/dist/rsc/index.d.ts +211 -6
  94. package/dist/rsc/index.js +11 -11
  95. package/dist/rsc/legacy.d.ts +26 -2
  96. package/dist/rsc/legacy.js +1 -1
  97. package/dist/rsc/payload.js +1 -1
  98. package/dist/rsc/plugins/esbuild.js +2 -2
  99. package/dist/rsc/plugins/index.js +4 -4
  100. package/dist/rsc/plugins/rollup.js +2 -2
  101. package/dist/rsc/renderer.js +3 -3
  102. package/dist/rsc/stream.js +1 -1
  103. package/dist/rsc/vite-plugin.js +2 -2
  104. package/dist/server/index.js +4 -4
  105. package/dist/streaming/adapters/index.js +1 -1
  106. package/dist/streaming/conditional.js +1 -1
  107. package/dist/streaming/index.js +1 -1
  108. package/dist/streaming/observability.js +2 -2
  109. package/dist/streaming/priority.js +1 -1
  110. package/dist/utils/index.js +1 -1
  111. package/package.json +228 -222
  112. package/dist/chunk-2F2QU6RC.js.map +0 -1
  113. package/dist/chunk-3KRBRSRJ.js.map +0 -1
  114. package/dist/chunk-3QP3E7HS.js.map +0 -1
  115. package/dist/chunk-3ZSSRE6M.js.map +0 -1
  116. package/dist/chunk-62C7LX2E.js.map +0 -1
  117. package/dist/chunk-6BDCTUQY.js.map +0 -1
  118. package/dist/chunk-FSJNOPYE.js.map +0 -1
  119. package/dist/chunk-IXMD5QH2.js.map +0 -1
  120. package/dist/chunk-K2CQZPCG.js.map +0 -1
  121. package/dist/chunk-MDQNNIHH.js.map +0 -1
  122. package/dist/chunk-MQQLYWZZ.js.map +0 -1
  123. package/dist/chunk-NWMJYTMB.js.map +0 -1
  124. package/dist/chunk-OYF2OAKS.js.map +0 -1
  125. package/dist/chunk-P6WSBVDT.js.map +0 -1
  126. package/dist/chunk-PDW5WCMW.js.map +0 -1
  127. package/dist/chunk-PVUMB632.js.map +0 -1
  128. package/dist/chunk-R7SQAREQ.js.map +0 -1
  129. package/dist/chunk-ROJFQCGV.js.map +0 -1
  130. package/dist/chunk-RSVA2EYO.js.map +0 -1
  131. package/dist/chunk-SUILH4ID.js.map +0 -1
  132. package/dist/chunk-T4Z4HM4W.js.map +0 -1
  133. package/dist/chunk-TASAT7KB.js.map +0 -1
  134. package/dist/chunk-VPFMHGEV.js.map +0 -1
  135. package/dist/chunk-W6D62JCI.js.map +0 -1
  136. package/dist/chunk-WFAWAHJH.js.map +0 -1
  137. package/dist/chunk-WOEIJWGJ.js.map +0 -1
  138. package/dist/chunk-XOIYNY4I.js.map +0 -1
  139. package/dist/chunk-XSY5AAXT.js.map +0 -1
  140. package/dist/chunk-YHEVHRLH.js.map +0 -1
  141. package/dist/chunk-ZIE56LCA.js.map +0 -1
  142. package/dist/chunk-ZVC3ZWLM.js.map +0 -1
@@ -7,21 +7,226 @@ export { FlightResponseOptions, FlightStreamError, FlightStreamOptions, FlightSt
7
7
  export { ComponentFn, ElementTypeInfo, FlightRenderer, RenderOptions, RenderResult, UIAdapter, createRenderer, renderServerComponent, renderServerComponentStreaming } from './renderer.js';
8
8
  export { ReactConsumerOptions, ReactServerComponent, createReactAdapter, createReactConsumer, markAsClientComponent } from './adapters/react.js';
9
9
  export { ClientManifestEntry, FlightRSCPluginOptions, ServerManifestEntry, default as flightRSC } from './vite-plugin.js';
10
- export { ComponentType, ClientComponent as LegacyClientComponent, ServerComponent as LegacyServerComponent, RenderContext, composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError as legacyIsNotFoundError, isRedirectError as legacyIsRedirectError, notFound as legacyNotFound, redirect as legacyRedirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withErrorBoundary } from './legacy.js';
10
+ export { AsyncErrorBoundaryOptions, ComponentType, ClientComponent as LegacyClientComponent, ServerComponent as LegacyServerComponent, RenderContext, composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError as legacyIsNotFoundError, isRedirectError as legacyIsRedirectError, notFound as legacyNotFound, redirect as legacyRedirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withAsyncErrorBoundary, withErrorBoundary } from './legacy.js';
11
11
  import 'react';
12
12
  import 'vite';
13
13
 
14
+ /**
15
+ * @flight-framework/core - RSC Type Helpers
16
+ *
17
+ * Type utilities for async server components, loaders, and actions.
18
+ * These types provide better TypeScript inference and developer experience.
19
+ *
20
+ * @module @flight-framework/core/rsc/types
21
+ */
22
+
23
+ /**
24
+ * Type for async server components with data fetching.
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * const UserPage: AsyncServerComponent<{ id: string }> = async ({ id }, ctx) => {
29
+ * const user = await db.users.get(id);
30
+ * return h('div', null, text(user.name));
31
+ * };
32
+ * ```
33
+ */
34
+ type AsyncServerComponent<Props = Record<string, unknown>, Result = FlightElement> = (props: Props, ctx: ServerContext) => Promise<Result>;
35
+ /**
36
+ * Type for sync server components.
37
+ */
38
+ type SyncServerComponent<Props = Record<string, unknown>, Result = FlightElement> = (props: Props, ctx: ServerContext) => Result;
39
+ /**
40
+ * Union type for any server component (sync or async).
41
+ */
42
+ type ServerComponent<Props = Record<string, unknown>, Result = FlightElement> = AsyncServerComponent<Props, Result> | SyncServerComponent<Props, Result>;
43
+ /**
44
+ * Context provided to loader functions.
45
+ */
46
+ interface LoaderContext {
47
+ /** Route parameters extracted from the URL path */
48
+ params: Record<string, string>;
49
+ /** The incoming request object */
50
+ request: Request;
51
+ /** URL search parameters */
52
+ searchParams: URLSearchParams;
53
+ }
54
+ /**
55
+ * Type for loader functions.
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * export const loader: LoaderFn = async ({ params }) => {
60
+ * const user = await db.users.get(params.id);
61
+ * return { user };
62
+ * };
63
+ * ```
64
+ */
65
+ type LoaderFn<T = unknown> = (context: LoaderContext) => Promise<T> | T;
66
+ /**
67
+ * Infer the return type of a loader function.
68
+ *
69
+ * @example
70
+ * ```typescript
71
+ * export async function loader() {
72
+ * return { count: 42, items: ['a', 'b'] };
73
+ * }
74
+ *
75
+ * // Type is { count: number; items: string[] }
76
+ * type Data = InferLoaderData<typeof loader>;
77
+ * ```
78
+ */
79
+ type InferLoaderData<T extends (...args: never[]) => unknown> = Awaited<ReturnType<T>>;
80
+ /**
81
+ * Context provided to action functions.
82
+ */
83
+ interface ActionContext {
84
+ /** The incoming request object */
85
+ request: Request;
86
+ /** Route parameters extracted from the URL path */
87
+ params: Record<string, string>;
88
+ }
89
+ /**
90
+ * Type for action functions.
91
+ *
92
+ * @example
93
+ * ```typescript
94
+ * export const action: ActionFn = async ({ request }) => {
95
+ * const formData = await request.formData();
96
+ * await db.items.create({ name: formData.get('name') });
97
+ * return { success: true };
98
+ * };
99
+ * ```
100
+ */
101
+ type ActionFn<T = unknown> = (context: ActionContext) => Promise<T> | T;
102
+ /**
103
+ * Infer the return type of an action function.
104
+ *
105
+ * @example
106
+ * ```typescript
107
+ * export async function action() {
108
+ * return { success: true, id: '123' };
109
+ * }
110
+ *
111
+ * // Type is { success: boolean; id: string }
112
+ * type Result = InferActionReturn<typeof action>;
113
+ * ```
114
+ */
115
+ type InferActionReturn<T extends (...args: never[]) => unknown> = Awaited<ReturnType<T>>;
116
+ /**
117
+ * Extract props type from a component function.
118
+ *
119
+ * @example
120
+ * ```typescript
121
+ * async function UserCard(props: { name: string; age: number }) {
122
+ * return <div>{props.name}</div>;
123
+ * }
124
+ *
125
+ * // Type is { name: string; age: number }
126
+ * type Props = ComponentProps<typeof UserCard>;
127
+ * ```
128
+ */
129
+ type ComponentProps<T> = T extends (props: infer P, ...args: unknown[]) => unknown ? P : never;
130
+ /**
131
+ * Extract the return type of a component (after awaiting if async).
132
+ */
133
+ type ComponentReturn<T> = T extends (...args: unknown[]) => infer R ? Awaited<R> : never;
134
+ /**
135
+ * Props for page components with route parameters.
136
+ */
137
+ interface PageProps<Params extends Record<string, string> = Record<string, string>> {
138
+ /** Route parameters from dynamic segments */
139
+ params: Params;
140
+ /** URL search parameters */
141
+ searchParams?: Record<string, string | string[]>;
142
+ }
143
+ /**
144
+ * Type for page components.
145
+ *
146
+ * @example
147
+ * ```typescript
148
+ * const PostPage: PageComponent<{ slug: string }> = async ({ params }) => {
149
+ * const post = await getPost(params.slug);
150
+ * return <article>{post.title}</article>;
151
+ * };
152
+ * ```
153
+ */
154
+ type PageComponent<Params extends Record<string, string> = Record<string, string>> = AsyncServerComponent<PageProps<Params>>;
155
+ /**
156
+ * Props for layout components.
157
+ */
158
+ interface LayoutProps<Params extends Record<string, string> = Record<string, string>> {
159
+ /** Child components to render */
160
+ children: FlightElement;
161
+ /** Route parameters from dynamic segments */
162
+ params: Params;
163
+ }
164
+ /**
165
+ * Type for layout components.
166
+ */
167
+ type LayoutComponent<Params extends Record<string, string> = Record<string, string>> = ServerComponent<LayoutProps<Params>>;
168
+ /**
169
+ * Props for error boundary components.
170
+ */
171
+ interface ErrorProps {
172
+ /** The error that was thrown */
173
+ error: Error;
174
+ /** Function to reset the error boundary */
175
+ reset: () => void;
176
+ }
177
+ /**
178
+ * Type for error components.
179
+ */
180
+ type ErrorComponent = (props: ErrorProps) => FlightElement;
181
+ /**
182
+ * Type for loading components (shown during Suspense).
183
+ */
184
+ type LoadingComponent = () => FlightElement;
185
+ /**
186
+ * Generate metadata for a page.
187
+ */
188
+ type GenerateMetadata<Params extends Record<string, string> = Record<string, string>> = (props: PageProps<Params>) => Promise<Metadata> | Metadata;
189
+ /**
190
+ * Page metadata type.
191
+ */
192
+ interface Metadata {
193
+ title?: string | {
194
+ default: string;
195
+ template?: string;
196
+ };
197
+ description?: string;
198
+ keywords?: string[];
199
+ authors?: Array<{
200
+ name: string;
201
+ url?: string;
202
+ }>;
203
+ openGraph?: {
204
+ title?: string;
205
+ description?: string;
206
+ images?: string[];
207
+ url?: string;
208
+ type?: string;
209
+ };
210
+ twitter?: {
211
+ card?: 'summary' | 'summary_large_image' | 'player' | 'app';
212
+ title?: string;
213
+ description?: string;
214
+ images?: string[];
215
+ };
216
+ robots?: string | {
217
+ index?: boolean;
218
+ follow?: boolean;
219
+ };
220
+ }
221
+
14
222
  /**
15
223
  * Server Component function type
224
+ * @deprecated Use AsyncServerComponent or ServerComponent from './types.js'
16
225
  */
17
226
  type ServerComponentFn<P = unknown, R = FlightElement> = (props: P, ctx: ServerContext) => R | Promise<R>;
18
227
  /**
19
228
  * Server Action function type
20
229
  */
21
230
  type ServerActionFn<Args extends unknown[] = unknown[], R = unknown> = (...args: Args) => Promise<R>;
22
- /**
23
- * Props for a component
24
- */
25
- type ComponentProps<T> = T extends (props: infer P, ...args: unknown[]) => unknown ? P : never;
26
231
 
27
- export { type ComponentProps, FlightElement, type ServerActionFn, type ServerComponentFn, ServerContext };
232
+ export { type ActionContext, type ActionFn, type AsyncServerComponent, type ComponentProps, type ComponentReturn, type ErrorComponent, type ErrorProps, FlightElement, type GenerateMetadata, type InferActionReturn, type InferLoaderData, type LayoutComponent, type LayoutProps, type LoaderContext, type LoaderFn, type LoadingComponent, type Metadata, type PageComponent, type PageProps, type ServerActionFn, type ServerComponent, type ServerComponentFn, ServerContext, type SyncServerComponent };
package/dist/rsc/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import '../chunk-63SCEXD7.js';
2
- export { acceptsJson, createServerContext, deleteCookie, getHeader, getHeaders, getPreferredLanguage, getRedirectInfo, isAjaxRequest, isBotRequest, isMutationRequest, isNotFoundError, isRedirectError, notFound, redirect, setCacheControl, setCookie, supportsStreaming } from '../chunk-62C7LX2E.js';
3
- export { FlightStreamError, consumeFlightStream, createFlightResponse, createFlightStream, createFlightStreamFromArray, createHybridResponse, createStreamController, mergeFlightStreams, parseFlightStream, parseFlightStreamSync, prettyPrintChunks, transformFlightStream } from '../chunk-PVUMB632.js';
4
- export { FlightRenderer, createRenderer, renderServerComponent, renderServerComponentStreaming } from '../chunk-P6WSBVDT.js';
5
- export { FlightPayloadError, FlightSerializationError, clientRef, createActionChunk, createClientChunk, createErrorChunk, createHintChunk, createServerChunk, deserialize, fragment, generateChunkId, h, isFlightElement, resetChunkIdCounter, serialize, suspense, text, toFlightElement } from '../chunk-K2CQZPCG.js';
6
- export { composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError as legacyIsNotFoundError, isRedirectError as legacyIsRedirectError, notFound as legacyNotFound, redirect as legacyRedirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withErrorBoundary } from '../chunk-3ZSSRE6M.js';
7
- export { flightRSC } from '../chunk-ZIE56LCA.js';
8
- export { BoundaryRegistry, CLIENT_REFERENCE, SERVER_REFERENCE, analyzeModule, createClientReference, createServerReference, detectAsyncComponents, detectBoundaryType, detectInlineServerActions, getReferenceId, globalRegistry, hasUseClientDirective, hasUseServerDirective, isClientReference, isServerReference, registerClientComponent, registerServerAction } from '../chunk-PDW5WCMW.js';
9
2
  import '../chunk-Y22AMGTM.js';
10
- export { createReactAdapter, createReactConsumer, markAsClientComponent } from '../chunk-TASAT7KB.js';
11
- import '../chunk-2F2QU6RC.js';
12
- import '../chunk-VPFMHGEV.js';
13
- import '../chunk-MDQNNIHH.js';
3
+ export { createReactAdapter, createReactConsumer, markAsClientComponent } from '../chunk-HNPO6LFW.js';
4
+ import '../chunk-3UQJE3XZ.js';
5
+ import '../chunk-3N5ZBVZJ.js';
6
+ import '../chunk-65JYF3DJ.js';
7
+ export { acceptsJson, createServerContext, deleteCookie, getHeader, getHeaders, getPreferredLanguage, getRedirectInfo, isAjaxRequest, isBotRequest, isMutationRequest, isNotFoundError, isRedirectError, notFound, redirect, setCacheControl, setCookie, supportsStreaming } from '../chunk-CKJHJPKQ.js';
8
+ export { FlightStreamError, consumeFlightStream, createFlightResponse, createFlightStream, createFlightStreamFromArray, createHybridResponse, createStreamController, mergeFlightStreams, parseFlightStream, parseFlightStreamSync, prettyPrintChunks, transformFlightStream } from '../chunk-A2QRUBVE.js';
9
+ export { FlightRenderer, createRenderer, renderServerComponent, renderServerComponentStreaming } from '../chunk-FRAH5QNY.js';
10
+ export { FlightPayloadError, FlightSerializationError, clientRef, createActionChunk, createClientChunk, createErrorChunk, createHintChunk, createServerChunk, deserialize, fragment, generateChunkId, h, isFlightElement, resetChunkIdCounter, serialize, suspense, text, toFlightElement } from '../chunk-6GI6HFSQ.js';
11
+ export { composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError as legacyIsNotFoundError, isRedirectError as legacyIsRedirectError, notFound as legacyNotFound, redirect as legacyRedirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withAsyncErrorBoundary, withErrorBoundary } from '../chunk-6IG6XIXU.js';
12
+ export { flightRSC } from '../chunk-XU6MRYG2.js';
13
+ export { BoundaryRegistry, CLIENT_REFERENCE, SERVER_REFERENCE, analyzeModule, createClientReference, createServerReference, detectAsyncComponents, detectBoundaryType, detectInlineServerActions, getReferenceId, globalRegistry, hasUseClientDirective, hasUseServerDirective, isClientReference, isServerReference, registerClientComponent, registerServerAction } from '../chunk-5XHOLZBJ.js';
14
14
  //# sourceMappingURL=index.js.map
15
15
  //# sourceMappingURL=index.js.map
@@ -99,9 +99,33 @@ declare function createAsyncComponent<P, T>(fetcher: (props: P, context: RenderC
99
99
  * @deprecated Use Promise.all with async components
100
100
  */
101
101
  declare function composeComponents(...components: Array<() => Promise<string> | string>): () => Promise<string>;
102
+ /**
103
+ * Options for async error boundary
104
+ */
105
+ interface AsyncErrorBoundaryOptions<P, R> {
106
+ /** Fallback to render on error */
107
+ fallback: (error: Error, props: P) => R;
108
+ /** Optional callback when error occurs */
109
+ onError?: (error: Error, props: P, context: RenderContext) => void;
110
+ /** Whether to rethrow certain errors (e.g., redirects, not found) */
111
+ rethrowNavigation?: boolean;
112
+ }
113
+ /**
114
+ * Wrap an async server component with comprehensive error handling.
115
+ *
116
+ * @example
117
+ * ```typescript
118
+ * const SafeUserPage = withAsyncErrorBoundary(UserPage, {
119
+ * fallback: (error, props) => `<div>Error loading user ${props.id}</div>`,
120
+ * onError: (error, props) => console.error(`Failed to load user ${props.id}:`, error),
121
+ * rethrowNavigation: true,
122
+ * });
123
+ * ```
124
+ */
125
+ declare function withAsyncErrorBoundary<P, R = string>(component: (props: P, context: RenderContext) => Promise<R> | R, options: AsyncErrorBoundaryOptions<P, R>): (props: P, context: RenderContext) => Promise<R>;
102
126
  /**
103
127
  * Wrap a server component with error handling
104
- * @deprecated Use try/catch in async components
128
+ * @deprecated Use withAsyncErrorBoundary instead
105
129
  */
106
130
  declare function withErrorBoundary<P>(component: ServerComponent<P>, errorFallback: (error: Error) => string): ServerComponent<P>;
107
131
  /**
@@ -128,4 +152,4 @@ declare function isRedirectError(error: unknown): {
128
152
  type: string;
129
153
  } | null;
130
154
 
131
- export { type ClientComponent, type ComponentType, type RenderContext, type ServerComponent, composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError, isRedirectError, notFound, redirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withErrorBoundary };
155
+ export { type AsyncErrorBoundaryOptions, type ClientComponent, type ComponentType, type RenderContext, type ServerComponent, composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError, isRedirectError, notFound, redirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withAsyncErrorBoundary, withErrorBoundary };
@@ -1,3 +1,3 @@
1
- export { composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError, isRedirectError, notFound, redirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withErrorBoundary } from '../chunk-3ZSSRE6M.js';
1
+ export { composeComponents, createAsyncComponent, createClientBoundary, createRenderContext, deserializeProps, executeServerComponent, isNotFoundError, isRedirectError, notFound, redirect, revalidatePath, revalidateTag, serializeProps, serverFetch, withAsyncErrorBoundary, withErrorBoundary } from '../chunk-6IG6XIXU.js';
2
2
  //# sourceMappingURL=legacy.js.map
3
3
  //# sourceMappingURL=legacy.js.map
@@ -1,3 +1,3 @@
1
- export { FlightPayloadError, FlightSerializationError, clientRef, createActionChunk, createClientChunk, createErrorChunk, createHintChunk, createServerChunk, deserialize, fragment, generateChunkId, h, isFlightElement, resetChunkIdCounter, serialize, suspense, text, toFlightElement } from '../chunk-K2CQZPCG.js';
1
+ export { FlightPayloadError, FlightSerializationError, clientRef, createActionChunk, createClientChunk, createErrorChunk, createHintChunk, createServerChunk, deserialize, fragment, generateChunkId, h, isFlightElement, resetChunkIdCounter, serialize, suspense, text, toFlightElement } from '../chunk-6GI6HFSQ.js';
2
2
  //# sourceMappingURL=payload.js.map
3
3
  //# sourceMappingURL=payload.js.map
@@ -1,4 +1,4 @@
1
- export { esbuild_default as default, flightRSCEsbuild } from '../../chunk-T4Z4HM4W.js';
2
- import '../../chunk-PDW5WCMW.js';
1
+ export { esbuild_default as default, flightRSCEsbuild } from '../../chunk-PAVI5W6M.js';
2
+ import '../../chunk-5XHOLZBJ.js';
3
3
  //# sourceMappingURL=esbuild.js.map
4
4
  //# sourceMappingURL=esbuild.js.map
@@ -1,6 +1,6 @@
1
- export { flightRSCEsbuild } from '../../chunk-T4Z4HM4W.js';
2
- export { flightRSCRollup } from '../../chunk-NWMJYTMB.js';
3
- export { flightRSC as flightRSCVite } from '../../chunk-ZIE56LCA.js';
4
- import '../../chunk-PDW5WCMW.js';
1
+ export { flightRSCEsbuild } from '../../chunk-PAVI5W6M.js';
2
+ export { flightRSCRollup } from '../../chunk-LAKHYTHL.js';
3
+ export { flightRSC as flightRSCVite } from '../../chunk-XU6MRYG2.js';
4
+ import '../../chunk-5XHOLZBJ.js';
5
5
  //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- export { rollup_default as default, flightRSCRollup } from '../../chunk-NWMJYTMB.js';
2
- import '../../chunk-PDW5WCMW.js';
1
+ export { rollup_default as default, flightRSCRollup } from '../../chunk-LAKHYTHL.js';
2
+ import '../../chunk-5XHOLZBJ.js';
3
3
  //# sourceMappingURL=rollup.js.map
4
4
  //# sourceMappingURL=rollup.js.map
@@ -1,5 +1,5 @@
1
- export { FlightRenderer, createRenderer, renderServerComponent, renderServerComponentStreaming } from '../chunk-P6WSBVDT.js';
2
- import '../chunk-K2CQZPCG.js';
3
- import '../chunk-PDW5WCMW.js';
1
+ export { FlightRenderer, createRenderer, renderServerComponent, renderServerComponentStreaming } from '../chunk-FRAH5QNY.js';
2
+ import '../chunk-6GI6HFSQ.js';
3
+ import '../chunk-5XHOLZBJ.js';
4
4
  //# sourceMappingURL=renderer.js.map
5
5
  //# sourceMappingURL=renderer.js.map
@@ -1,3 +1,3 @@
1
- export { FlightStreamError, consumeFlightStream, createFlightResponse, createFlightStream, createFlightStreamFromArray, createHybridResponse, createStreamController, mergeFlightStreams, parseFlightStream, parseFlightStreamSync, prettyPrintChunks, transformFlightStream } from '../chunk-PVUMB632.js';
1
+ export { FlightStreamError, consumeFlightStream, createFlightResponse, createFlightStream, createFlightStreamFromArray, createHybridResponse, createStreamController, mergeFlightStreams, parseFlightStream, parseFlightStreamSync, prettyPrintChunks, transformFlightStream } from '../chunk-A2QRUBVE.js';
2
2
  //# sourceMappingURL=stream.js.map
3
3
  //# sourceMappingURL=stream.js.map
@@ -1,4 +1,4 @@
1
- export { vite_plugin_default as default, flightRSC } from '../chunk-ZIE56LCA.js';
2
- import '../chunk-PDW5WCMW.js';
1
+ export { vite_plugin_default as default, flightRSC } from '../chunk-XU6MRYG2.js';
2
+ import '../chunk-5XHOLZBJ.js';
3
3
  //# sourceMappingURL=vite-plugin.js.map
4
4
  //# sourceMappingURL=vite-plugin.js.map
@@ -1,6 +1,6 @@
1
- export { createServer, getRuntime, isFlightServer } from '../chunk-ROJFQCGV.js';
2
- import '../chunk-IXMD5QH2.js';
3
- import '../chunk-GCQZ4FHI.js';
4
- import '../chunk-OYF2OAKS.js';
1
+ export { createServer, getRuntime, isFlightServer } from '../chunk-KDEA64UX.js';
2
+ import '../chunk-R7MEVVA4.js';
3
+ import '../chunk-EHVUAFNH.js';
4
+ import '../chunk-ARBKF6VI.js';
5
5
  //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- export { createHTMXStreamAdapter, createReactStreamAdapter, createSolidStreamAdapter, createStreamAdapter, createSvelteStreamAdapter, createVueStreamAdapter } from '../../chunk-MQQLYWZZ.js';
1
+ export { createHTMXStreamAdapter, createReactStreamAdapter, createSolidStreamAdapter, createStreamAdapter, createSvelteStreamAdapter, createVueStreamAdapter } from '../../chunk-GNS2FGPC.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- export { DEFAULT_BOT_PATTERNS, addStreamingHeaders, createConditionalStreamer, createStaticResponse, createStreamingResponse, isBot, isSlowConnection, prefersNoStream, streamIf, supportsStreaming } from '../chunk-XOIYNY4I.js';
1
+ export { DEFAULT_BOT_PATTERNS, addStreamingHeaders, createConditionalStreamer, createStaticResponse, createStreamingResponse, isBot, isSlowConnection, prefersNoStream, streamIf, supportsStreaming } from '../chunk-VNO2YUVD.js';
2
2
  //# sourceMappingURL=conditional.js.map
3
3
  //# sourceMappingURL=conditional.js.map
@@ -1,3 +1,3 @@
1
- export { createLazyContent, createStreamingResponse, createStreamingSSR, renderWithStreaming, streamParallel, streamSequential } from '../chunk-RSVA2EYO.js';
1
+ export { createLazyContent, createStreamingResponse, createStreamingSSR, renderWithStreaming, streamParallel, streamSequential } from '../chunk-CNY3ZUVG.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- export { MetricsAggregator, createHttpObserver, createInstrumentedStream, createLoggerObserver } from '../chunk-6BDCTUQY.js';
2
- import '../chunk-RSVA2EYO.js';
1
+ export { MetricsAggregator, createHttpObserver, createInstrumentedStream, createLoggerObserver } from '../chunk-YNTMYL36.js';
2
+ import '../chunk-CNY3ZUVG.js';
3
3
  //# sourceMappingURL=observability.js.map
4
4
  //# sourceMappingURL=observability.js.map
@@ -1,3 +1,3 @@
1
- export { streamWithPriority, validateDependencies } from '../chunk-WOEIJWGJ.js';
1
+ export { streamWithPriority, validateDependencies } from '../chunk-NZS2YJ43.js';
2
2
  //# sourceMappingURL=priority.js.map
3
3
  //# sourceMappingURL=priority.js.map
@@ -1,4 +1,4 @@
1
1
  import '../chunk-PL37KFRJ.js';
2
- export { getEnvironment, isBrowser, isDevelopment, isProduction, isServer, isTest } from '../chunk-YHEVHRLH.js';
2
+ export { getEnvironment, isBrowser, isDevelopment, isProduction, isServer, isTest } from '../chunk-OZBPR27I.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map