@flightdev/ui 2.0.1 → 4.0.0

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 (120) hide show
  1. package/README.md +283 -68
  2. package/dist/{chunk-XTDK7ME5.js → chunk-S4DTUQII.js} +246 -19
  3. package/dist/chunk-S4DTUQII.js.map +1 -0
  4. package/dist/core/index.d.ts +423 -3
  5. package/dist/core/index.js +23 -2
  6. package/dist/core/index.js.map +1 -0
  7. package/dist/index.d.ts +2 -3
  8. package/dist/index.js +29 -5
  9. package/dist/index.js.map +1 -0
  10. package/package.json +7 -183
  11. package/.turbo/turbo-build.log +0 -81
  12. package/.turbo/turbo-lint.log +0 -40
  13. package/.turbo/turbo-typecheck.log +0 -4
  14. package/TESTING.md +0 -124
  15. package/dist/adapter-MMD-iHNx.d.ts +0 -424
  16. package/dist/adapters/tier-1/angular.d.ts +0 -60
  17. package/dist/adapters/tier-1/angular.js +0 -2
  18. package/dist/adapters/tier-1/index.d.ts +0 -7
  19. package/dist/adapters/tier-1/index.js +0 -7
  20. package/dist/adapters/tier-1/qwik.d.ts +0 -55
  21. package/dist/adapters/tier-1/qwik.js +0 -2
  22. package/dist/adapters/tier-1/react.d.ts +0 -67
  23. package/dist/adapters/tier-1/react.js +0 -2
  24. package/dist/adapters/tier-1/solid.d.ts +0 -45
  25. package/dist/adapters/tier-1/solid.js +0 -2
  26. package/dist/adapters/tier-1/svelte.d.ts +0 -48
  27. package/dist/adapters/tier-1/svelte.js +0 -2
  28. package/dist/adapters/tier-1/vue.d.ts +0 -47
  29. package/dist/adapters/tier-1/vue.js +0 -2
  30. package/dist/adapters/tier-2/index.d.ts +0 -7
  31. package/dist/adapters/tier-2/index.js +0 -7
  32. package/dist/adapters/tier-2/inferno.d.ts +0 -31
  33. package/dist/adapters/tier-2/inferno.js +0 -2
  34. package/dist/adapters/tier-2/lit.d.ts +0 -34
  35. package/dist/adapters/tier-2/lit.js +0 -2
  36. package/dist/adapters/tier-2/marko.d.ts +0 -59
  37. package/dist/adapters/tier-2/marko.js +0 -2
  38. package/dist/adapters/tier-2/mithril.d.ts +0 -31
  39. package/dist/adapters/tier-2/mithril.js +0 -2
  40. package/dist/adapters/tier-2/preact.d.ts +0 -33
  41. package/dist/adapters/tier-2/preact.js +0 -2
  42. package/dist/adapters/tier-2/stencil.d.ts +0 -52
  43. package/dist/adapters/tier-2/stencil.js +0 -2
  44. package/dist/adapters/tier-3/alpine.d.ts +0 -73
  45. package/dist/adapters/tier-3/alpine.js +0 -2
  46. package/dist/adapters/tier-3/hotwire.d.ts +0 -71
  47. package/dist/adapters/tier-3/hotwire.js +0 -2
  48. package/dist/adapters/tier-3/htmx.d.ts +0 -88
  49. package/dist/adapters/tier-3/htmx.js +0 -2
  50. package/dist/adapters/tier-3/index.d.ts +0 -7
  51. package/dist/adapters/tier-3/index.js +0 -7
  52. package/dist/adapters/tier-3/petite-vue.d.ts +0 -56
  53. package/dist/adapters/tier-3/petite-vue.js +0 -2
  54. package/dist/adapters/tier-3/stimulus.d.ts +0 -63
  55. package/dist/adapters/tier-3/stimulus.js +0 -2
  56. package/dist/adapters/tier-3/vanilla.d.ts +0 -63
  57. package/dist/adapters/tier-3/vanilla.js +0 -2
  58. package/dist/chunk-2SNQ6PTM.js +0 -217
  59. package/dist/chunk-3D4XMIZI.js +0 -136
  60. package/dist/chunk-3HU6GSQ4.js +0 -125
  61. package/dist/chunk-4PZDNFL7.js +0 -148
  62. package/dist/chunk-5IBLFTYL.js +0 -114
  63. package/dist/chunk-64JZJ7OK.js +0 -142
  64. package/dist/chunk-7ZJI3QU2.js +0 -132
  65. package/dist/chunk-CE4FJHQJ.js +0 -133
  66. package/dist/chunk-DTCAUBH5.js +0 -87
  67. package/dist/chunk-NTASPOHG.js +0 -106
  68. package/dist/chunk-OI2AMQLG.js +0 -152
  69. package/dist/chunk-Q7HUE44H.js +0 -106
  70. package/dist/chunk-QH3LOWXU.js +0 -155
  71. package/dist/chunk-QIVAK6BH.js +0 -103
  72. package/dist/chunk-V34XPVGK.js +0 -103
  73. package/dist/chunk-VK7ZPMO7.js +0 -221
  74. package/dist/chunk-X6CNUW6T.js +0 -136
  75. package/dist/chunk-YFGSHW5S.js +0 -121
  76. package/dist/chunk-ZAJVSE7J.js +0 -90
  77. package/docs/ADAPTERS.md +0 -946
  78. package/docs/PATTERNS.md +0 -836
  79. package/src/adapters/tier-1/angular.ts +0 -223
  80. package/src/adapters/tier-1/index.ts +0 -12
  81. package/src/adapters/tier-1/qwik.ts +0 -177
  82. package/src/adapters/tier-1/react.ts +0 -330
  83. package/src/adapters/tier-1/solid.ts +0 -222
  84. package/src/adapters/tier-1/svelte.ts +0 -211
  85. package/src/adapters/tier-1/vue.ts +0 -234
  86. package/src/adapters/tier-2/index.ts +0 -12
  87. package/src/adapters/tier-2/inferno.ts +0 -149
  88. package/src/adapters/tier-2/lit.ts +0 -191
  89. package/src/adapters/tier-2/marko.ts +0 -199
  90. package/src/adapters/tier-2/mithril.ts +0 -152
  91. package/src/adapters/tier-2/preact.ts +0 -133
  92. package/src/adapters/tier-2/stencil.ts +0 -214
  93. package/src/adapters/tier-3/alpine.ts +0 -218
  94. package/src/adapters/tier-3/hotwire.ts +0 -254
  95. package/src/adapters/tier-3/htmx.ts +0 -263
  96. package/src/adapters/tier-3/index.ts +0 -12
  97. package/src/adapters/tier-3/petite-vue.ts +0 -163
  98. package/src/adapters/tier-3/stimulus.ts +0 -233
  99. package/src/adapters/tier-3/vanilla.ts +0 -252
  100. package/src/ambient.d.ts +0 -310
  101. package/src/core/adapter.ts +0 -366
  102. package/src/core/index.ts +0 -56
  103. package/src/core/registry.ts +0 -518
  104. package/src/core/types.ts +0 -461
  105. package/src/htmx.ts +0 -134
  106. package/src/index.ts +0 -263
  107. package/test/__mocks__/stencil-core.ts +0 -19
  108. package/test/__mocks__/stencil-hydrate.ts +0 -15
  109. package/test/adapters/tier-1.test.ts +0 -206
  110. package/test/adapters/tier-2.test.ts +0 -175
  111. package/test/adapters/tier-3.test.ts +0 -284
  112. package/test/contracts/adapter.contract.ts +0 -293
  113. package/test/core/core.test.ts +0 -310
  114. package/test/errors/error-handling.test.ts +0 -454
  115. package/test/integration/htmx.integration.test.ts +0 -246
  116. package/test/integration/react.integration.test.ts +0 -271
  117. package/test/integration/registry.integration.test.ts +0 -308
  118. package/tsconfig.json +0 -22
  119. package/tsup.config.ts +0 -93
  120. package/vitest.config.ts +0 -101
@@ -1,424 +0,0 @@
1
- /**
2
- * @flightdev/ui - Core Type Definitions
3
- *
4
- * Universal type system for all UI framework adapters.
5
- * Supports SSR, streaming, islands architecture, and resumable hydration.
6
- *
7
- * @module @flightdev/ui/core/types
8
- * @version 2.0.0
9
- */
10
- /**
11
- * Adapter capabilities flags.
12
- * Used for feature detection and optimization decisions.
13
- */
14
- interface AdapterCapabilities {
15
- /** Supports streaming SSR via renderToStream */
16
- streaming: boolean;
17
- /** Supports partial/selective hydration */
18
- partialHydration: boolean;
19
- /** Supports islands architecture */
20
- islands: boolean;
21
- /** Supports resumable hydration (Qwik-style serialization) */
22
- resumable: boolean;
23
- /** Supports Static Site Generation */
24
- ssg: boolean;
25
- /** Supports Client-Side Rendering only */
26
- csr: boolean;
27
- /** Supports Server Components (React Server Components, etc) */
28
- serverComponents: boolean;
29
- }
30
- /**
31
- * Default capabilities for adapters that don't specify their own
32
- */
33
- declare const DEFAULT_CAPABILITIES: AdapterCapabilities;
34
- /**
35
- * Adapter tier classification.
36
- *
37
- * - tier-1: Full support, first-class citizens (React, Vue, Angular, Svelte, Solid, Qwik)
38
- * - tier-2: SSR + Hydration support (Preact, Lit, Marko, Stencil, Mithril, Inferno)
39
- * - tier-3: HTML-first, minimal JS (HTMX, Alpine, Hotwire, Stimulus, Web Components)
40
- */
41
- type AdapterTier = 'tier-1' | 'tier-2' | 'tier-3';
42
- /**
43
- * Tier metadata for documentation and tooling
44
- */
45
- interface TierInfo {
46
- tier: AdapterTier;
47
- name: string;
48
- description: string;
49
- features: string[];
50
- }
51
- declare const TIER_INFO: Record<AdapterTier, TierInfo>;
52
- /**
53
- * Universal component wrapper type
54
- */
55
- interface Component<P = Record<string, unknown>> {
56
- /** The actual component (React element, Vue component, HTML string, etc) */
57
- component: unknown;
58
- /** Props to pass to the component */
59
- props?: P;
60
- /** Slots/children content */
61
- children?: unknown;
62
- /** Component identifier for hydration */
63
- id?: string;
64
- }
65
- /**
66
- * Render context passed to adapters
67
- */
68
- interface RenderContext {
69
- /** Current request URL */
70
- url?: string;
71
- /** Request headers */
72
- headers?: Headers;
73
- /** Server-side cookies */
74
- cookies?: Map<string, string>;
75
- /** Locale for i18n */
76
- locale?: string;
77
- /** Custom context data */
78
- data?: Record<string, unknown>;
79
- /** AbortSignal for cancellation */
80
- signal?: AbortSignal;
81
- }
82
- /**
83
- * Result of a render operation
84
- */
85
- interface RenderResult {
86
- /** The rendered HTML string */
87
- html: string;
88
- /** Head elements (meta, title, link, etc) */
89
- head?: string;
90
- /** Hydration data to pass to client */
91
- hydrationData?: Record<string, unknown>;
92
- /** CSS to inline in the document */
93
- css?: string;
94
- /** Scripts to inject */
95
- scripts?: string[];
96
- /** HTTP status code (for error pages, redirects) */
97
- status?: number;
98
- /** HTTP headers to set */
99
- headers?: Record<string, string>;
100
- /** Timing information for performance monitoring */
101
- timing?: RenderTiming;
102
- }
103
- /**
104
- * Render timing information
105
- */
106
- interface RenderTiming {
107
- /** Total render time in milliseconds */
108
- total: number;
109
- /** Time to first byte */
110
- ttfb?: number;
111
- /** Component render times */
112
- components?: Map<string, number>;
113
- }
114
- /**
115
- * Streaming render options
116
- */
117
- interface StreamingOptions {
118
- /** Emit shell HTML before async content resolves */
119
- emitShellEarly?: boolean;
120
- /** Timeout for streaming (ms) */
121
- timeout?: number;
122
- /** Callback when shell is ready */
123
- onShellReady?: () => void;
124
- /** Callback when shell errors */
125
- onShellError?: (error: Error) => void;
126
- /** Callback when all content is ready */
127
- onAllReady?: () => void;
128
- /** Callback for each error during streaming */
129
- onError?: (error: Error, errorInfo?: unknown) => void;
130
- }
131
- /**
132
- * Streaming render result
133
- */
134
- interface StreamingRenderResult {
135
- /** The readable stream of HTML chunks */
136
- stream: ReadableStream<Uint8Array>;
137
- /** Promise that resolves when streaming is complete */
138
- done: Promise<void>;
139
- /** Abort the stream */
140
- abort: () => void;
141
- }
142
- /**
143
- * Island hydration strategy
144
- */
145
- type IslandHydrationStrategy = 'load' | 'idle' | 'visible' | 'media' | 'interaction' | 'none';
146
- /**
147
- * Island configuration options
148
- */
149
- interface IslandOptions {
150
- /** Hydration strategy */
151
- hydrate?: IslandHydrationStrategy;
152
- /** For 'media' strategy: the media query */
153
- media?: string;
154
- /** For 'interaction' strategy: events to listen for */
155
- on?: string[];
156
- /** Island priority (higher = hydrate first) */
157
- priority?: number;
158
- /** Fallback content while loading */
159
- fallback?: string;
160
- }
161
- /**
162
- * Island definition
163
- */
164
- interface Island {
165
- /** Unique island identifier */
166
- id: string;
167
- /** The component to render */
168
- component: unknown;
169
- /** Component props */
170
- props?: Record<string, unknown>;
171
- /** Island options */
172
- options?: IslandOptions;
173
- /** Rendered HTML placeholder */
174
- placeholder?: string;
175
- }
176
- /**
177
- * Universal UI Adapter Interface (Version 2)
178
- *
179
- * All UI framework adapters must implement this interface.
180
- * Optional methods are for advanced features (streaming, islands, etc).
181
- */
182
- interface UIAdapterV2 {
183
- /** Unique adapter identifier (e.g., 'react', 'vue', 'angular') */
184
- readonly id: string;
185
- /** Human-readable adapter name */
186
- readonly name: string;
187
- /** Framework name */
188
- readonly framework: string;
189
- /** Framework version compatibility */
190
- readonly frameworkVersion?: string;
191
- /** Adapter tier classification */
192
- readonly tier: AdapterTier;
193
- /** Supported capabilities */
194
- readonly capabilities: AdapterCapabilities;
195
- /**
196
- * Render a component to an HTML string.
197
- * This is the primary SSR method.
198
- */
199
- renderToString(component: Component, context?: RenderContext): Promise<RenderResult>;
200
- /**
201
- * Generate the hydration script for client-side hydration.
202
- */
203
- getHydrationScript(result: RenderResult): string;
204
- /**
205
- * Get the client-side entry point code.
206
- */
207
- getClientEntry(): string;
208
- /**
209
- * Render a component as a stream (for streaming SSR).
210
- * Only available if capabilities.streaming is true.
211
- */
212
- renderToStream?(component: Component, context?: RenderContext, options?: StreamingOptions): StreamingRenderResult;
213
- /**
214
- * Create an island wrapper for partial hydration.
215
- * Only available if capabilities.islands is true.
216
- */
217
- createIsland?(component: unknown, props?: Record<string, unknown>, options?: IslandOptions): Island;
218
- /**
219
- * Hydrate an island on the client.
220
- */
221
- hydrateIsland?(element: Element, island: Island): void;
222
- /**
223
- * Serialize component state for resumable hydration.
224
- * Only available if capabilities.resumable is true.
225
- */
226
- serializeState?(state: unknown): string;
227
- /**
228
- * Resume from serialized state.
229
- */
230
- resumeFromState?(serialized: string): unknown;
231
- /**
232
- * Initialize the adapter (load dependencies, warm up caches, etc).
233
- */
234
- init?(): Promise<void>;
235
- /**
236
- * Clean up resources.
237
- */
238
- dispose?(): Promise<void>;
239
- /**
240
- * Transform a component for SSR if needed.
241
- */
242
- transformForSSR?(component: unknown): unknown;
243
- }
244
- /**
245
- * Legacy V1 adapter interface for backward compatibility.
246
- * @deprecated Use UIAdapterV2 instead
247
- */
248
- interface UIAdapterV1 {
249
- readonly name: string;
250
- readonly framework: string;
251
- renderToString(component: Component): Promise<RenderResult>;
252
- getHydrationScript(result: RenderResult): string;
253
- getClientEntry(): string;
254
- transformForSSR?(component: unknown): unknown;
255
- }
256
- /**
257
- * Type alias for backward compatibility
258
- * @deprecated Use UIAdapterV2 instead
259
- */
260
- type UIAdapter = UIAdapterV1;
261
- /**
262
- * UI configuration for Flight
263
- */
264
- interface UIConfig {
265
- /** The UI adapter to use */
266
- adapter: UIAdapterV2 | UIAdapterV1;
267
- /** Enable streaming SSR */
268
- streaming?: boolean;
269
- /** Hydration strategy */
270
- hydration?: 'full' | 'partial' | 'progressive' | 'none';
271
- /** Islands mode */
272
- islands?: boolean;
273
- /** Default island hydration strategy */
274
- defaultIslandStrategy?: IslandHydrationStrategy;
275
- }
276
- /**
277
- * Extract props type from a component
278
- */
279
- type ComponentProps<C> = C extends Component<infer P> ? P : never;
280
- /**
281
- * Check if adapter supports a capability
282
- */
283
- type HasCapability<A extends UIAdapterV2, C extends keyof AdapterCapabilities> = A['capabilities'][C] extends true ? true : false;
284
-
285
- /**
286
- * @flightdev/ui - Base Adapter Class
287
- *
288
- * Abstract base class providing common functionality for all UI adapters.
289
- * Extend this class to create new framework adapters.
290
- *
291
- * @module @flightdev/ui/core/adapter
292
- * @version 2.0.0
293
- */
294
-
295
- /**
296
- * Abstract base class for UI adapters.
297
- *
298
- * Provides common functionality and sensible defaults.
299
- * Subclasses must implement the abstract methods.
300
- *
301
- * @example
302
- * ```typescript
303
- * class MyAdapter extends BaseUIAdapter {
304
- * readonly id = 'my-framework';
305
- * readonly name = 'My Framework';
306
- * readonly framework = 'my-framework';
307
- * readonly tier = 'tier-2';
308
- *
309
- * async renderToString(component: Component): Promise<RenderResult> {
310
- * // Implementation
311
- * }
312
- * }
313
- * ```
314
- */
315
- declare abstract class BaseUIAdapter implements UIAdapterV2 {
316
- abstract readonly id: string;
317
- abstract readonly name: string;
318
- abstract readonly framework: string;
319
- abstract readonly tier: AdapterTier;
320
- readonly capabilities: AdapterCapabilities;
321
- readonly frameworkVersion?: string;
322
- abstract renderToString(component: Component, context?: RenderContext): Promise<RenderResult>;
323
- /**
324
- * Generate hydration script.
325
- * Override for framework-specific hydration.
326
- */
327
- getHydrationScript(result: RenderResult): string;
328
- /**
329
- * Get client entry point code.
330
- * Override for framework-specific client initialization.
331
- */
332
- getClientEntry(): string;
333
- /**
334
- * Escape HTML entities to prevent XSS
335
- */
336
- protected escapeHtml(str: string): string;
337
- /**
338
- * Serialize props to JSON for hydration
339
- */
340
- protected serializeProps(props: unknown): string;
341
- /**
342
- * JSON replacer for serialization
343
- */
344
- protected jsonReplacer(_key: string, value: unknown): unknown;
345
- /**
346
- * Create a hydration marker comment
347
- */
348
- protected createHydrationMarker(id: string, type?: 'start' | 'end'): string;
349
- /**
350
- * Wrap content with hydration markers
351
- */
352
- protected wrapWithMarkers(id: string, content: string): string;
353
- /**
354
- * Generate a unique component ID
355
- */
356
- protected generateId(): string;
357
- /**
358
- * Create timing information
359
- */
360
- protected createTiming(startTime: number): {
361
- total: number;
362
- };
363
- /**
364
- * Merge render context with defaults
365
- */
366
- protected mergeContext(context?: RenderContext): RenderContext;
367
- /**
368
- * Render to stream (override if capabilities.streaming is true)
369
- */
370
- renderToStream?(_component: Component, _context?: RenderContext, _options?: StreamingOptions): StreamingRenderResult;
371
- /**
372
- * Create an island (default implementation)
373
- * Override for framework-specific island behavior.
374
- */
375
- createIsland(component: unknown, props?: Record<string, unknown>, options?: IslandOptions): Island;
376
- /**
377
- * Hydrate an island on the client
378
- */
379
- hydrateIsland?(_element: Element, _island: Island): void;
380
- /**
381
- * Serialize state for resumability
382
- */
383
- serializeState?(state: unknown): string;
384
- /**
385
- * Resume from serialized state
386
- */
387
- resumeFromState?(serialized: string): unknown;
388
- /**
389
- * JSON reviver for deserialization
390
- */
391
- protected jsonReviver(_key: string, value: unknown): unknown;
392
- /**
393
- * Initialize the adapter
394
- */
395
- init(): Promise<void>;
396
- /**
397
- * Clean up resources
398
- */
399
- dispose(): Promise<void>;
400
- }
401
- /**
402
- * Wrap a V1 adapter to make it compatible with V2 interface.
403
- *
404
- * @example
405
- * ```typescript
406
- * const legacyAdapter = oldReact();
407
- * const v2Adapter = wrapV1Adapter(legacyAdapter, 'tier-1');
408
- * ```
409
- */
410
- declare function wrapV1Adapter(v1Adapter: UIAdapterV1, tier?: AdapterTier): UIAdapterV2;
411
- /**
412
- * Check if an adapter is V2 compatible
413
- */
414
- declare function isV2Adapter(adapter: unknown): adapter is UIAdapterV2;
415
- /**
416
- * Check if an adapter supports a specific capability
417
- */
418
- declare function hasCapability(adapter: UIAdapterV2, capability: keyof AdapterCapabilities): boolean;
419
- /**
420
- * Get all capabilities of an adapter as an array
421
- */
422
- declare function getCapabilities(adapter: UIAdapterV2): (keyof AdapterCapabilities)[];
423
-
424
- export { type AdapterCapabilities as A, BaseUIAdapter as B, type Component as C, DEFAULT_CAPABILITIES as D, type HasCapability as H, type IslandHydrationStrategy as I, type RenderContext as R, type StreamingOptions as S, type TierInfo as T, type UIAdapterV2 as U, type UIAdapterV1 as a, type UIConfig as b, type RenderResult as c, type AdapterTier as d, type ComponentProps as e, type RenderTiming as f, type StreamingRenderResult as g, type IslandOptions as h, type Island as i, type UIAdapter as j, TIER_INFO as k, isV2Adapter as l, hasCapability as m, getCapabilities as n, wrapV1Adapter as w };
@@ -1,60 +0,0 @@
1
- import { B as BaseUIAdapter, A as AdapterCapabilities, C as Component, R as RenderContext, c as RenderResult } from '../../adapter-MMD-iHNx.js';
2
-
3
- /**
4
- * @flightdev/ui - Angular Adapter (Tier 1)
5
- *
6
- * Full-featured Angular 17+ SSR adapter with hydration and incremental hydration support.
7
- *
8
- * @module @flightdev/ui/angular
9
- * @version 2.0.0
10
- */
11
-
12
- /**
13
- * Angular bootstrap function type
14
- */
15
- type AngularBootstrapFn = (document: string, url: string) => Promise<unknown>;
16
- interface AngularAdapterOptions {
17
- /** Enable incremental hydration (Angular 17+) */
18
- incrementalHydration?: boolean;
19
- /** Enable event replay during hydration */
20
- eventReplay?: boolean;
21
- /** Document template for SSR */
22
- documentTemplate?: string;
23
- /** Custom providers for SSR */
24
- providers?: unknown[];
25
- }
26
- declare class AngularAdapter extends BaseUIAdapter {
27
- private options;
28
- readonly id = "angular";
29
- readonly name = "Angular";
30
- readonly framework = "angular";
31
- readonly frameworkVersion = "17+";
32
- readonly tier: "tier-1";
33
- readonly capabilities: AdapterCapabilities;
34
- private documentTemplate;
35
- constructor(options?: AngularAdapterOptions);
36
- renderToString(component: Component, context?: RenderContext): Promise<RenderResult>;
37
- getHydrationScript(result: RenderResult): string;
38
- getClientEntry(): string;
39
- /**
40
- * Get the default document template for SSR
41
- */
42
- private getDefaultDocumentTemplate;
43
- }
44
- /**
45
- * Create an Angular UI adapter.
46
- *
47
- * @example
48
- * ```typescript
49
- * import { angular } from '@flightdev/ui/angular';
50
- * import { defineUI } from '@flightdev/ui';
51
- *
52
- * export default defineUI(angular({
53
- * incrementalHydration: true,
54
- * eventReplay: true,
55
- * }));
56
- * ```
57
- */
58
- declare function angular(options?: AngularAdapterOptions): AngularAdapter;
59
-
60
- export { AngularAdapter, type AngularAdapterOptions, type AngularBootstrapFn, angular, angular as default };
@@ -1,2 +0,0 @@
1
- export { AngularAdapter, angular, angular_default as default } from '../../chunk-3D4XMIZI.js';
2
- import '../../chunk-2SNQ6PTM.js';
@@ -1,7 +0,0 @@
1
- export { ReactAdapter, ReactAdapterOptions, default as react } from './react.js';
2
- export { VueAdapter, VueAdapterOptions, default as vue } from './vue.js';
3
- export { AngularAdapter, AngularAdapterOptions, AngularBootstrapFn, default as angular } from './angular.js';
4
- export { SvelteAdapter, SvelteAdapterOptions, default as svelte } from './svelte.js';
5
- export { SolidAdapter, SolidAdapterOptions, default as solid } from './solid.js';
6
- export { QwikAdapter, QwikAdapterOptions, default as qwik } from './qwik.js';
7
- import '../../adapter-MMD-iHNx.js';
@@ -1,7 +0,0 @@
1
- export { VueAdapter, vue } from '../../chunk-QH3LOWXU.js';
2
- export { AngularAdapter, angular } from '../../chunk-3D4XMIZI.js';
3
- export { QwikAdapter, qwik } from '../../chunk-NTASPOHG.js';
4
- export { ReactAdapter, react } from '../../chunk-VK7ZPMO7.js';
5
- export { SolidAdapter, solid } from '../../chunk-64JZJ7OK.js';
6
- export { SvelteAdapter, svelte } from '../../chunk-X6CNUW6T.js';
7
- import '../../chunk-2SNQ6PTM.js';
@@ -1,55 +0,0 @@
1
- import { B as BaseUIAdapter, A as AdapterCapabilities, C as Component, R as RenderContext, c as RenderResult } from '../../adapter-MMD-iHNx.js';
2
-
3
- /**
4
- * @flightdev/ui - Qwik Adapter (Tier 1)
5
- *
6
- * Qwik adapter with resumable hydration - zero JavaScript until interaction.
7
- *
8
- * @module @flightdev/ui/qwik
9
- * @version 2.0.0
10
- */
11
-
12
- interface QwikAdapterOptions {
13
- /** Enable prefetching */
14
- prefetch?: boolean;
15
- /** Prefetch strategy */
16
- prefetchStrategy?: 'hover' | 'viewport' | 'idle';
17
- /** Container tag name */
18
- containerTagName?: string;
19
- }
20
- declare class QwikAdapter extends BaseUIAdapter {
21
- private options;
22
- readonly id = "qwik";
23
- readonly name = "Qwik";
24
- readonly framework = "qwik";
25
- readonly frameworkVersion = "1.0+";
26
- readonly tier: "tier-1";
27
- readonly capabilities: AdapterCapabilities;
28
- constructor(options?: QwikAdapterOptions);
29
- renderToString(component: Component, _context?: RenderContext): Promise<RenderResult>;
30
- /**
31
- * Serialize state for resumability (Qwik's specialty)
32
- */
33
- serializeState(state: unknown): string;
34
- /**
35
- * Resume from serialized state
36
- */
37
- resumeFromState(_serialized: string): unknown;
38
- getHydrationScript(_result: RenderResult): string;
39
- getClientEntry(): string;
40
- }
41
- /**
42
- * Create a Qwik UI adapter.
43
- *
44
- * @example
45
- * ```typescript
46
- * import { qwik } from '@flightdev/ui/qwik';
47
- * import { defineUI } from '@flightdev/ui';
48
- *
49
- * // Qwik's resumability means zero JS until interaction!
50
- * export default defineUI(qwik({ prefetchStrategy: 'idle' }));
51
- * ```
52
- */
53
- declare function qwik(options?: QwikAdapterOptions): QwikAdapter;
54
-
55
- export { QwikAdapter, type QwikAdapterOptions, qwik as default, qwik };
@@ -1,2 +0,0 @@
1
- export { QwikAdapter, qwik_default as default, qwik } from '../../chunk-NTASPOHG.js';
2
- import '../../chunk-2SNQ6PTM.js';
@@ -1,67 +0,0 @@
1
- import { B as BaseUIAdapter, A as AdapterCapabilities, C as Component, R as RenderContext, c as RenderResult, S as StreamingOptions, g as StreamingRenderResult } from '../../adapter-MMD-iHNx.js';
2
-
3
- /**
4
- * @flightdev/ui - React Adapter (Tier 1)
5
- *
6
- * Full-featured React 18+ SSR adapter with streaming and hydration support.
7
- *
8
- * @module @flightdev/ui/react
9
- * @version 2.0.0
10
- */
11
-
12
- interface ReactAdapterOptions {
13
- /** Enable streaming SSR with renderToPipeableStream */
14
- streaming?: boolean;
15
- /** Enable React Server Components support */
16
- serverComponents?: boolean;
17
- /** Custom error handler for streaming */
18
- onError?: (error: Error) => void;
19
- /** Custom shell ready handler */
20
- onShellReady?: () => void;
21
- }
22
- declare class ReactAdapter extends BaseUIAdapter {
23
- private options;
24
- readonly id = "react";
25
- readonly name = "React";
26
- readonly framework = "react";
27
- readonly frameworkVersion = "18+";
28
- readonly tier: "tier-1";
29
- readonly capabilities: AdapterCapabilities;
30
- constructor(options?: ReactAdapterOptions);
31
- renderToString(component: Component, _context?: RenderContext): Promise<RenderResult>;
32
- /**
33
- * Render to stream using React 18+ streaming SSR.
34
- *
35
- * Uses `renderToReadableStream` (Web Streams API) which works in:
36
- * - Node.js 18+ (with Web Streams support)
37
- * - Deno
38
- * - Cloudflare Workers
39
- * - Vercel Edge Runtime
40
- * - Other edge runtimes
41
- *
42
- * Falls back to `renderToPipeableStream` for Node.js environments
43
- * that require traditional streams.
44
- */
45
- renderToStream(component: Component, _context?: RenderContext, options?: StreamingOptions): StreamingRenderResult;
46
- /**
47
- * Fallback render for environments without Web Streams support.
48
- * Uses renderToString and emits as a single chunk.
49
- */
50
- private fallbackStreamRender;
51
- getHydrationScript(result: RenderResult): string;
52
- getClientEntry(): string;
53
- }
54
- /**
55
- * Create a React UI adapter.
56
- *
57
- * @example
58
- * ```typescript
59
- * import { react } from '@flightdev/ui/react';
60
- * import { defineUI } from '@flightdev/ui';
61
- *
62
- * export default defineUI(react({ streaming: true }));
63
- * ```
64
- */
65
- declare function react(options?: ReactAdapterOptions): ReactAdapter;
66
-
67
- export { ReactAdapter, type ReactAdapterOptions, react as default, react };
@@ -1,2 +0,0 @@
1
- export { ReactAdapter, react_default as default, react } from '../../chunk-VK7ZPMO7.js';
2
- import '../../chunk-2SNQ6PTM.js';
@@ -1,45 +0,0 @@
1
- import { B as BaseUIAdapter, A as AdapterCapabilities, C as Component, R as RenderContext, c as RenderResult, S as StreamingOptions, g as StreamingRenderResult } from '../../adapter-MMD-iHNx.js';
2
-
3
- /**
4
- * @flightdev/ui - Solid Adapter (Tier 1)
5
- *
6
- * Full-featured SolidJS SSR adapter with streaming and hydration support.
7
- *
8
- * @module @flightdev/ui/solid
9
- * @version 2.0.0
10
- */
11
-
12
- interface SolidAdapterOptions {
13
- /** Enable streaming SSR */
14
- streaming?: boolean;
15
- /** Render timeout in milliseconds */
16
- timeout?: number;
17
- }
18
- declare class SolidAdapter extends BaseUIAdapter {
19
- private options;
20
- readonly id = "solid";
21
- readonly name = "Solid";
22
- readonly framework = "solid";
23
- readonly frameworkVersion = "1.8+";
24
- readonly tier: "tier-1";
25
- readonly capabilities: AdapterCapabilities;
26
- constructor(options?: SolidAdapterOptions);
27
- renderToString(component: Component, _context?: RenderContext): Promise<RenderResult>;
28
- renderToStream(component: Component, _context?: RenderContext, options?: StreamingOptions): StreamingRenderResult;
29
- getHydrationScript(result: RenderResult): string;
30
- getClientEntry(): string;
31
- }
32
- /**
33
- * Create a Solid UI adapter.
34
- *
35
- * @example
36
- * ```typescript
37
- * import { solid } from '@flightdev/ui/solid';
38
- * import { defineUI } from '@flightdev/ui';
39
- *
40
- * export default defineUI(solid({ streaming: true }));
41
- * ```
42
- */
43
- declare function solid(options?: SolidAdapterOptions): SolidAdapter;
44
-
45
- export { SolidAdapter, type SolidAdapterOptions, solid as default, solid };
@@ -1,2 +0,0 @@
1
- export { SolidAdapter, solid_default as default, solid } from '../../chunk-64JZJ7OK.js';
2
- import '../../chunk-2SNQ6PTM.js';