ai-props 2.1.3 → 2.4.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.
- package/.dev.vars +2 -0
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +20 -0
- package/README.md +2 -0
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +4 -4
- package/dist/ai.js.map +1 -1
- package/dist/cascade.d.ts +329 -0
- package/dist/cascade.d.ts.map +1 -0
- package/dist/cascade.js +522 -0
- package/dist/cascade.js.map +1 -0
- package/dist/client.d.ts +233 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +191 -0
- package/dist/client.js.map +1 -0
- package/dist/durable-cascade.d.ts +280 -0
- package/dist/durable-cascade.d.ts.map +1 -0
- package/dist/durable-cascade.js +469 -0
- package/dist/durable-cascade.js.map +1 -0
- package/dist/event-bridge.d.ts +257 -0
- package/dist/event-bridge.d.ts.map +1 -0
- package/dist/event-bridge.js +317 -0
- package/dist/event-bridge.js.map +1 -0
- package/dist/generate.d.ts.map +1 -1
- package/dist/generate.js +12 -6
- package/dist/generate.js.map +1 -1
- package/dist/hoc.d.ts.map +1 -1
- package/dist/hoc.js +13 -13
- package/dist/hoc.js.map +1 -1
- package/dist/hono-jsx.d.ts +208 -0
- package/dist/hono-jsx.d.ts.map +1 -0
- package/dist/hono-jsx.js +459 -0
- package/dist/hono-jsx.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mdx-types.d.ts +152 -0
- package/dist/mdx-types.d.ts.map +1 -0
- package/dist/mdx-types.js +9 -0
- package/dist/mdx-types.js.map +1 -0
- package/dist/mdx-utils.d.ts +106 -0
- package/dist/mdx-utils.d.ts.map +1 -0
- package/dist/mdx-utils.js +384 -0
- package/dist/mdx-utils.js.map +1 -0
- package/dist/mdx.d.ts +230 -0
- package/dist/mdx.d.ts.map +1 -0
- package/dist/mdx.js +820 -0
- package/dist/mdx.js.map +1 -0
- package/dist/rpc.d.ts +313 -0
- package/dist/rpc.d.ts.map +1 -0
- package/dist/rpc.js +359 -0
- package/dist/rpc.js.map +1 -0
- package/dist/streaming.d.ts +199 -0
- package/dist/streaming.d.ts.map +1 -0
- package/dist/streaming.js +402 -0
- package/dist/streaming.js.map +1 -0
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +11 -13
- package/dist/validate.js.map +1 -1
- package/dist/worker.d.ts +270 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +405 -0
- package/dist/worker.js.map +1 -0
- package/package.json +39 -13
- package/src/ai.ts +12 -31
- package/src/cascade.ts +795 -0
- package/src/client.ts +440 -0
- package/src/durable-cascade.ts +743 -0
- package/src/event-bridge.ts +478 -0
- package/src/generate.ts +14 -12
- package/src/hoc.ts +15 -19
- package/src/hono-jsx.ts +675 -0
- package/src/index.ts +30 -0
- package/src/mdx-types.ts +169 -0
- package/src/mdx-utils.ts +437 -0
- package/src/mdx.ts +1008 -0
- package/src/rpc.ts +614 -0
- package/src/streaming.ts +618 -0
- package/src/validate.ts +15 -29
- package/src/worker.ts +547 -0
- package/test/cascade.test.ts +338 -0
- package/test/durable-cascade.test.ts +319 -0
- package/test/event-bridge.test.ts +351 -0
- package/test/generate.test.ts +6 -16
- package/test/mdx.test.ts +817 -0
- package/test/worker/capnweb-rpc.test.ts +1084 -0
- package/test/worker/full-flow.integration.test.ts +1463 -0
- package/test/worker/hono-jsx.test.ts +1258 -0
- package/test/worker/mdx-parsing.test.ts +1148 -0
- package/test/worker/setup.ts +56 -0
- package/test/worker.test.ts +595 -0
- package/tsconfig.json +2 -1
- package/vitest.config.js +6 -0
- package/vitest.config.ts +15 -1
- package/vitest.workers.config.ts +58 -0
- package/wrangler.jsonc +27 -0
- package/LICENSE +0 -21
- package/src/ai.js +0 -198
- package/src/cache.js +0 -182
- package/src/generate.js +0 -220
- package/src/hoc.js +0 -235
- package/src/index.js +0 -20
- package/src/types.js +0 -6
- package/src/validate.js +0 -252
package/dist/hono-jsx.js
ADDED
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hono/jsx integration for AI-powered props with hydration and streaming
|
|
3
|
+
*
|
|
4
|
+
* This module provides:
|
|
5
|
+
* - Hydration data collection during server render
|
|
6
|
+
* - Streaming render support with hono/jsx
|
|
7
|
+
* - AI-powered component prop generation
|
|
8
|
+
* - Context-aware rendering with Suspense support
|
|
9
|
+
*
|
|
10
|
+
* Bead: aip-fxpy (tests), aip-z57t (implementation)
|
|
11
|
+
*
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
import { generateProps, mergeWithGenerated } from './generate.js';
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// Global hydration context (for useHydration hook simulation)
|
|
17
|
+
// ============================================================================
|
|
18
|
+
let globalHydrationContext = null;
|
|
19
|
+
// ============================================================================
|
|
20
|
+
// Hydration Data Collection
|
|
21
|
+
// ============================================================================
|
|
22
|
+
/**
|
|
23
|
+
* Create hydration data with the toJSON method
|
|
24
|
+
*/
|
|
25
|
+
function createHydrationData(components, tree) {
|
|
26
|
+
return {
|
|
27
|
+
components,
|
|
28
|
+
tree,
|
|
29
|
+
toJSON() {
|
|
30
|
+
return serializeHydrationData(this);
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Collect hydration data from a component render
|
|
36
|
+
*
|
|
37
|
+
* @param component - Component function to render
|
|
38
|
+
* @param props - Props to pass to component
|
|
39
|
+
* @returns Hydration data collected during render
|
|
40
|
+
*/
|
|
41
|
+
export async function collectHydrationData(component, props) {
|
|
42
|
+
// Create a hydration context
|
|
43
|
+
const ctx = createHydrationContext();
|
|
44
|
+
// Store global context for nested components
|
|
45
|
+
const prevContext = globalHydrationContext;
|
|
46
|
+
globalHydrationContext = ctx;
|
|
47
|
+
try {
|
|
48
|
+
// Get component name
|
|
49
|
+
const componentName = component.name || 'Anonymous';
|
|
50
|
+
// Register the component
|
|
51
|
+
ctx.register(componentName, props);
|
|
52
|
+
// Render the component (this might trigger nested registrations)
|
|
53
|
+
await component(props);
|
|
54
|
+
// Return collected data
|
|
55
|
+
return ctx.getData();
|
|
56
|
+
}
|
|
57
|
+
finally {
|
|
58
|
+
// Restore previous context
|
|
59
|
+
globalHydrationContext = prevContext;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Create a hydration context for tracking component renders
|
|
64
|
+
*
|
|
65
|
+
* @returns New hydration context
|
|
66
|
+
*/
|
|
67
|
+
export function createHydrationContext() {
|
|
68
|
+
const components = new Map();
|
|
69
|
+
const tree = [];
|
|
70
|
+
let idCounter = 0;
|
|
71
|
+
return {
|
|
72
|
+
register(componentName, props) {
|
|
73
|
+
const id = `${componentName}-${idCounter++}`;
|
|
74
|
+
components.set(componentName, props);
|
|
75
|
+
const node = {
|
|
76
|
+
id,
|
|
77
|
+
component: componentName,
|
|
78
|
+
props,
|
|
79
|
+
children: [],
|
|
80
|
+
};
|
|
81
|
+
tree.push(node);
|
|
82
|
+
return id;
|
|
83
|
+
},
|
|
84
|
+
getData() {
|
|
85
|
+
return createHydrationData(new Map(components), [...tree]);
|
|
86
|
+
},
|
|
87
|
+
clear() {
|
|
88
|
+
components.clear();
|
|
89
|
+
tree.length = 0;
|
|
90
|
+
idCounter = 0;
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Serialize hydration data to JSON string
|
|
96
|
+
*
|
|
97
|
+
* @param data - Hydration data to serialize
|
|
98
|
+
* @returns JSON string safe for script embedding
|
|
99
|
+
*/
|
|
100
|
+
export function serializeHydrationData(data) {
|
|
101
|
+
// Convert Map to object for serialization
|
|
102
|
+
const componentsObj = {};
|
|
103
|
+
// Use a WeakSet to detect circular references
|
|
104
|
+
const seen = new WeakSet();
|
|
105
|
+
function sanitizeValue(value) {
|
|
106
|
+
if (value === null || value === undefined) {
|
|
107
|
+
return value;
|
|
108
|
+
}
|
|
109
|
+
if (typeof value === 'object') {
|
|
110
|
+
if (seen.has(value)) {
|
|
111
|
+
return '[Circular]';
|
|
112
|
+
}
|
|
113
|
+
seen.add(value);
|
|
114
|
+
if (Array.isArray(value)) {
|
|
115
|
+
return value.map(sanitizeValue);
|
|
116
|
+
}
|
|
117
|
+
const result = {};
|
|
118
|
+
for (const [k, v] of Object.entries(value)) {
|
|
119
|
+
result[k] = sanitizeValue(v);
|
|
120
|
+
}
|
|
121
|
+
return result;
|
|
122
|
+
}
|
|
123
|
+
return value;
|
|
124
|
+
}
|
|
125
|
+
for (const [key, value] of data.components) {
|
|
126
|
+
componentsObj[key] = sanitizeValue(value);
|
|
127
|
+
}
|
|
128
|
+
const serializable = {
|
|
129
|
+
components: componentsObj,
|
|
130
|
+
tree: data.tree.map((node) => ({
|
|
131
|
+
id: node.id,
|
|
132
|
+
component: node.component,
|
|
133
|
+
props: sanitizeValue(node.props),
|
|
134
|
+
children: node.children,
|
|
135
|
+
})),
|
|
136
|
+
};
|
|
137
|
+
let json = JSON.stringify(serializable);
|
|
138
|
+
// Escape script tags to prevent XSS
|
|
139
|
+
json = json.replace(/<script/gi, '\\u003cscript');
|
|
140
|
+
json = json.replace(/<\/script/gi, '\\u003c/script');
|
|
141
|
+
return json;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Provider component that enables hydration tracking for children
|
|
145
|
+
*
|
|
146
|
+
* @param props - Provider props with context and children
|
|
147
|
+
* @returns Rendered output with hydration tracking
|
|
148
|
+
*/
|
|
149
|
+
export function HydrationProvider(props) {
|
|
150
|
+
// Store context globally for nested components
|
|
151
|
+
const prevContext = globalHydrationContext;
|
|
152
|
+
globalHydrationContext = props.context;
|
|
153
|
+
try {
|
|
154
|
+
// Return children - in a real JSX environment this would render them
|
|
155
|
+
return props.children;
|
|
156
|
+
}
|
|
157
|
+
finally {
|
|
158
|
+
// Note: In real JSX, we'd restore on unmount, not here
|
|
159
|
+
// For our purposes, we keep it set for the duration
|
|
160
|
+
globalHydrationContext = prevContext;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Hook to access hydration context from within a component
|
|
165
|
+
*
|
|
166
|
+
* @returns Current hydration context
|
|
167
|
+
*/
|
|
168
|
+
export function useHydration() {
|
|
169
|
+
if (!globalHydrationContext) {
|
|
170
|
+
// Return a no-op context if not in a HydrationProvider
|
|
171
|
+
return createHydrationContext();
|
|
172
|
+
}
|
|
173
|
+
return globalHydrationContext;
|
|
174
|
+
}
|
|
175
|
+
// ============================================================================
|
|
176
|
+
// Streaming Render
|
|
177
|
+
// ============================================================================
|
|
178
|
+
/**
|
|
179
|
+
* Render a component to a ReadableStream
|
|
180
|
+
*
|
|
181
|
+
* @param component - Component function to render
|
|
182
|
+
* @param props - Props to pass to component
|
|
183
|
+
* @param options - Streaming options
|
|
184
|
+
* @returns ReadableStream of rendered HTML
|
|
185
|
+
*/
|
|
186
|
+
export async function renderToReadableStream(component, props, options) {
|
|
187
|
+
const encoder = new TextEncoder();
|
|
188
|
+
return new ReadableStream({
|
|
189
|
+
async start(controller) {
|
|
190
|
+
try {
|
|
191
|
+
// Create hydration context if needed
|
|
192
|
+
const ctx = options?.includeHydration ? createHydrationContext() : null;
|
|
193
|
+
if (ctx) {
|
|
194
|
+
globalHydrationContext = ctx;
|
|
195
|
+
}
|
|
196
|
+
// Render the component
|
|
197
|
+
let content;
|
|
198
|
+
try {
|
|
199
|
+
content = await component(props);
|
|
200
|
+
}
|
|
201
|
+
catch (error) {
|
|
202
|
+
if (options?.onError && error instanceof Error) {
|
|
203
|
+
content = options.onError(error);
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
throw error;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
// Enqueue the content in chunks for streaming behavior
|
|
210
|
+
const chunkSize = 1024;
|
|
211
|
+
for (let i = 0; i < content.length; i += chunkSize) {
|
|
212
|
+
const chunk = content.slice(i, i + chunkSize);
|
|
213
|
+
controller.enqueue(encoder.encode(chunk));
|
|
214
|
+
}
|
|
215
|
+
// Add hydration script if requested
|
|
216
|
+
if (options?.includeHydration && ctx) {
|
|
217
|
+
const componentName = component.name || 'Anonymous';
|
|
218
|
+
ctx.register(componentName, props);
|
|
219
|
+
const hydrationData = ctx.getData();
|
|
220
|
+
const hydrationScript = `<script>window.__HYDRATION_DATA__=${serializeHydrationData(hydrationData)}</script>`;
|
|
221
|
+
controller.enqueue(encoder.encode(hydrationScript));
|
|
222
|
+
}
|
|
223
|
+
controller.close();
|
|
224
|
+
}
|
|
225
|
+
catch (error) {
|
|
226
|
+
controller.error(error);
|
|
227
|
+
}
|
|
228
|
+
finally {
|
|
229
|
+
globalHydrationContext = null;
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Create a streaming Response from a component
|
|
236
|
+
*
|
|
237
|
+
* @param component - Component function to render
|
|
238
|
+
* @param props - Props to pass to component
|
|
239
|
+
* @param options - Streaming options
|
|
240
|
+
* @returns Response with streaming body
|
|
241
|
+
*/
|
|
242
|
+
export async function streamJSXResponse(component, props, options) {
|
|
243
|
+
const stream = await renderToReadableStream(component, props, options);
|
|
244
|
+
const headers = new Headers({
|
|
245
|
+
'Content-Type': 'text/html; charset=utf-8',
|
|
246
|
+
...options?.headers,
|
|
247
|
+
});
|
|
248
|
+
// Don't set Content-Length for streaming responses
|
|
249
|
+
if (options?.streaming) {
|
|
250
|
+
// Transfer-Encoding is typically set automatically by the runtime
|
|
251
|
+
}
|
|
252
|
+
return new Response(stream, {
|
|
253
|
+
status: 200,
|
|
254
|
+
headers,
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Create a reusable streaming renderer with configuration
|
|
259
|
+
*
|
|
260
|
+
* @param options - Renderer options
|
|
261
|
+
* @returns Streaming renderer instance
|
|
262
|
+
*/
|
|
263
|
+
export function createStreamingRenderer(options) {
|
|
264
|
+
return {
|
|
265
|
+
async render(component, props) {
|
|
266
|
+
const encoder = new TextEncoder();
|
|
267
|
+
return new ReadableStream({
|
|
268
|
+
async start(controller) {
|
|
269
|
+
try {
|
|
270
|
+
// Create hydration context
|
|
271
|
+
const ctx = options.includeHydration ? createHydrationContext() : null;
|
|
272
|
+
if (ctx) {
|
|
273
|
+
globalHydrationContext = ctx;
|
|
274
|
+
}
|
|
275
|
+
// Render the component
|
|
276
|
+
const content = await component(props);
|
|
277
|
+
// Register for hydration data
|
|
278
|
+
if (ctx) {
|
|
279
|
+
const componentName = component.name || 'Anonymous';
|
|
280
|
+
ctx.register(componentName, props);
|
|
281
|
+
}
|
|
282
|
+
// Get hydration data
|
|
283
|
+
let hydrationJson = '';
|
|
284
|
+
if (options.includeHydration && ctx) {
|
|
285
|
+
hydrationJson = serializeHydrationData(ctx.getData());
|
|
286
|
+
}
|
|
287
|
+
// Apply shell wrapper if provided
|
|
288
|
+
let output;
|
|
289
|
+
if (options.shell) {
|
|
290
|
+
// When using shell, pass hydration data with __HYDRATION_DATA__ prefix
|
|
291
|
+
// so the shell can embed it directly in a script tag
|
|
292
|
+
const hydrationScript = hydrationJson
|
|
293
|
+
? `window.__HYDRATION_DATA__=${hydrationJson}`
|
|
294
|
+
: '';
|
|
295
|
+
output = options.shell(content, hydrationScript);
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
output = content;
|
|
299
|
+
if (options.includeHydration && hydrationJson) {
|
|
300
|
+
output += `<script>window.__HYDRATION_DATA__=${hydrationJson}</script>`;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
// Prepend doctype if provided
|
|
304
|
+
if (options.doctype) {
|
|
305
|
+
output = options.doctype + '\n' + output;
|
|
306
|
+
}
|
|
307
|
+
// Stream in chunks
|
|
308
|
+
const chunkSize = 1024;
|
|
309
|
+
for (let i = 0; i < output.length; i += chunkSize) {
|
|
310
|
+
const chunk = output.slice(i, i + chunkSize);
|
|
311
|
+
controller.enqueue(encoder.encode(chunk));
|
|
312
|
+
}
|
|
313
|
+
controller.close();
|
|
314
|
+
}
|
|
315
|
+
catch (error) {
|
|
316
|
+
controller.error(error);
|
|
317
|
+
}
|
|
318
|
+
finally {
|
|
319
|
+
globalHydrationContext = null;
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
});
|
|
323
|
+
},
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
// ============================================================================
|
|
327
|
+
// AI Component Creation
|
|
328
|
+
// ============================================================================
|
|
329
|
+
/**
|
|
330
|
+
* Create a component with AI-powered prop generation
|
|
331
|
+
*
|
|
332
|
+
* @param options - Component options including schema and render function
|
|
333
|
+
* @returns AI-enhanced component function
|
|
334
|
+
*/
|
|
335
|
+
export function createAIComponent(options) {
|
|
336
|
+
const { name, schema, render, fallback, progressive } = options;
|
|
337
|
+
const aiComponent = async (props) => {
|
|
338
|
+
const { context, ...partialProps } = props;
|
|
339
|
+
// Check which props are missing
|
|
340
|
+
const schemaKeys = Object.keys(schema);
|
|
341
|
+
const providedKeys = Object.keys(partialProps);
|
|
342
|
+
const missingKeys = schemaKeys.filter((k) => !providedKeys.includes(k));
|
|
343
|
+
let finalProps;
|
|
344
|
+
if (missingKeys.length === 0) {
|
|
345
|
+
// All props provided, no generation needed
|
|
346
|
+
finalProps = partialProps;
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
// Generate missing props
|
|
350
|
+
try {
|
|
351
|
+
// Build schema for only missing props
|
|
352
|
+
const missingSchema = {};
|
|
353
|
+
for (const key of missingKeys) {
|
|
354
|
+
const schemaValue = schema[key];
|
|
355
|
+
if (schemaValue !== undefined) {
|
|
356
|
+
missingSchema[key] = schemaValue;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
const result = await generateProps({
|
|
360
|
+
schema: missingSchema,
|
|
361
|
+
context: context || partialProps,
|
|
362
|
+
});
|
|
363
|
+
finalProps = {
|
|
364
|
+
...result.props,
|
|
365
|
+
...partialProps,
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
catch (error) {
|
|
369
|
+
// Use fallback on error
|
|
370
|
+
if (fallback) {
|
|
371
|
+
finalProps = {
|
|
372
|
+
...fallback,
|
|
373
|
+
...partialProps,
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
throw error;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
// Render the component
|
|
382
|
+
return render(finalProps);
|
|
383
|
+
};
|
|
384
|
+
// Attach schema and metadata
|
|
385
|
+
aiComponent.schema = schema;
|
|
386
|
+
aiComponent.displayName = `AI(${name})`;
|
|
387
|
+
return aiComponent;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Wrap an existing component with AI prop generation
|
|
391
|
+
*
|
|
392
|
+
* @param component - Component function to wrap
|
|
393
|
+
* @param options - AI props options
|
|
394
|
+
* @returns Wrapped component with AI props
|
|
395
|
+
*/
|
|
396
|
+
export function withAIProps(component, options) {
|
|
397
|
+
const { schema, fallback } = options;
|
|
398
|
+
const wrappedComponent = async (props) => {
|
|
399
|
+
const { context, ...partialProps } = props;
|
|
400
|
+
// Check which props are missing
|
|
401
|
+
const schemaKeys = Object.keys(schema);
|
|
402
|
+
const providedKeys = Object.keys(partialProps);
|
|
403
|
+
const missingKeys = schemaKeys.filter((k) => !providedKeys.includes(k));
|
|
404
|
+
let finalProps;
|
|
405
|
+
if (missingKeys.length === 0) {
|
|
406
|
+
// All props provided
|
|
407
|
+
finalProps = partialProps;
|
|
408
|
+
}
|
|
409
|
+
else {
|
|
410
|
+
// Generate missing props
|
|
411
|
+
try {
|
|
412
|
+
const missingSchema = {};
|
|
413
|
+
for (const key of missingKeys) {
|
|
414
|
+
const schemaValue = schema[key];
|
|
415
|
+
if (schemaValue !== undefined) {
|
|
416
|
+
missingSchema[key] = schemaValue;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
const result = await generateProps({
|
|
420
|
+
schema: missingSchema,
|
|
421
|
+
context: context || partialProps,
|
|
422
|
+
});
|
|
423
|
+
finalProps = {
|
|
424
|
+
...result.props,
|
|
425
|
+
...partialProps,
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
catch (error) {
|
|
429
|
+
if (fallback) {
|
|
430
|
+
finalProps = {
|
|
431
|
+
...fallback,
|
|
432
|
+
...partialProps,
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
throw error;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
return component(finalProps);
|
|
441
|
+
};
|
|
442
|
+
// Preserve displayName
|
|
443
|
+
const originalName = component.displayName || component.name || 'Component';
|
|
444
|
+
wrappedComponent.schema = schema;
|
|
445
|
+
wrappedComponent.displayName = `withAIProps(${originalName})`;
|
|
446
|
+
return wrappedComponent;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Provider component for AI props configuration
|
|
450
|
+
*
|
|
451
|
+
* @param props - Provider props with config and children
|
|
452
|
+
* @returns Rendered output with AI props context
|
|
453
|
+
*/
|
|
454
|
+
export function AIPropsProvider(props) {
|
|
455
|
+
// Store configuration globally (in a real implementation, use React Context)
|
|
456
|
+
// For now, we just pass through children
|
|
457
|
+
return props.children;
|
|
458
|
+
}
|
|
459
|
+
//# sourceMappingURL=hono-jsx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hono-jsx.js","sourceRoot":"","sources":["../src/hono-jsx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAyHjE,+EAA+E;AAC/E,8DAA8D;AAC9D,+EAA+E;AAE/E,IAAI,sBAAsB,GAA4B,IAAI,CAAA;AAE1D,+EAA+E;AAC/E,4BAA4B;AAC5B,+EAA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iBACjC,CAAC,CAAA;gBAEF,UAAU,GAAG;oBACX,GAAG,MAAM,CAAC,KAAK;oBACf,GAAG,YAAY;iBACX,CAAA;YACR,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,QAAQ,EAAE,CAAC;oBACb,UAAU,GAAG;wBACX,GAAG,QAAQ;wBACX,GAAG,YAAY;qBACX,CAAA;gBACR,CAAC;qBAAM,CAAC;oBACN,MAAM,KAAK,CAAA;gBACb,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,SAAS,CAAC,UAAU,CAAC,CAAA;IAC9B,CAAC,CAAA;IAED,uBAAuB;IACvB,MAAM,YAAY,GACf,SAAsC,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,CAAA;IACtF,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAA;IAChC,gBAAgB,CAAC,WAAW,GAAG,eAAe,YAAY,GAAG,CAAA;IAE7D,OAAO,gBAAgB,CAAA;AACzB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,6EAA6E;IAC7E,yCAAyC;IACzC,OAAO,KAAK,CAAC,QAAQ,CAAA;AACvB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,4 +12,5 @@ export { generateProps, getPropsSync, prefetchProps, generatePropsMany, mergeWit
|
|
|
12
12
|
export { MemoryPropsCache, LRUPropsCache, createCacheKey, getDefaultCache, configureCache, clearCache, DEFAULT_CACHE_TTL, } from './cache.js';
|
|
13
13
|
export { createPropsEnhancer, createAsyncPropsProvider, createPropsTransformer, createConditionalGenerator, createBatchGenerator, type WithAIPropsOptions, } from './hoc.js';
|
|
14
14
|
export { validateProps, hasRequiredProps, getMissingProps, isComplete, getMissingFromSchema, sanitizeProps, mergeWithDefaults, createValidator, assertValidProps, } from './validate.js';
|
|
15
|
+
export { parseMDX, extractComponentSchemas, renderMDXWithProps, streamMDXWithProps, createMDXPropsGenerator, compileMDX, clearMDXCache, getMDXCacheSize, configureMDXCache, getMDXCacheStats, invalidateMDXCacheByTag, cleanupMDXCache, type ParsedMDX, type ComponentSchemas, type MDXPropsGeneratorOptions, type MDXPropsGenerator, type RenderMDXOptions, type StreamMDXOptions, type CompileMDXOptions, type CompiledMDXFunction, type MDXCacheEntry, type MDXParseError, type CacheInvalidationStrategy, type MDXCacheOptions, type MDXCacheStats, type ParseMDXOptions, } from './mdx.js';
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,YAAY,CAAA;AAG1B,OAAO,EACL,EAAE,EACF,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,SAAS,CAAA;AAGhB,OAAO,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,WAAW,GACZ,MAAM,eAAe,CAAA;AAGtB,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,UAAU,EACV,iBAAiB,GAClB,MAAM,YAAY,CAAA;AAGnB,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,oBAAoB,EACpB,KAAK,kBAAkB,GACxB,MAAM,UAAU,CAAA;AAGjB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,YAAY,CAAA;AAG1B,OAAO,EACL,EAAE,EACF,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,SAAS,CAAA;AAGhB,OAAO,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,WAAW,GACZ,MAAM,eAAe,CAAA;AAGtB,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,UAAU,EACV,iBAAiB,GAClB,MAAM,YAAY,CAAA;AAGnB,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,oBAAoB,EACpB,KAAK,kBAAkB,GACxB,MAAM,UAAU,CAAA;AAGjB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,eAAe,CAAA;AAGtB,OAAO,EACL,QAAQ,EACR,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,UAAU,EACV,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,UAAU,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -18,4 +18,6 @@ export { MemoryPropsCache, LRUPropsCache, createCacheKey, getDefaultCache, confi
|
|
|
18
18
|
export { createPropsEnhancer, createAsyncPropsProvider, createPropsTransformer, createConditionalGenerator, createBatchGenerator, } from './hoc.js';
|
|
19
19
|
// Export validation utilities
|
|
20
20
|
export { validateProps, hasRequiredProps, getMissingProps, isComplete, getMissingFromSchema, sanitizeProps, mergeWithDefaults, createValidator, assertValidProps, } from './validate.js';
|
|
21
|
+
// Export MDX utilities
|
|
22
|
+
export { parseMDX, extractComponentSchemas, renderMDXWithProps, streamMDXWithProps, createMDXPropsGenerator, compileMDX, clearMDXCache, getMDXCacheSize, configureMDXCache, getMDXCacheStats, invalidateMDXCacheByTag, cleanupMDXCache, } from './mdx.js';
|
|
21
23
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAe;AACf,cAAc,YAAY,CAAA;AAE1B,4BAA4B;AAC5B,OAAO,EACL,EAAE,EACF,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,SAAS,CAAA;AAEhB,8BAA8B;AAC9B,OAAO,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,WAAW,GACZ,MAAM,eAAe,CAAA;AAEtB,yBAAyB;AACzB,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,UAAU,EACV,iBAAiB,GAClB,MAAM,YAAY,CAAA;AAEnB,2BAA2B;AAC3B,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,oBAAoB,GAErB,MAAM,UAAU,CAAA;AAEjB,8BAA8B;AAC9B,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAe;AACf,cAAc,YAAY,CAAA;AAE1B,4BAA4B;AAC5B,OAAO,EACL,EAAE,EACF,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,SAAS,CAAA;AAEhB,8BAA8B;AAC9B,OAAO,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,WAAW,GACZ,MAAM,eAAe,CAAA;AAEtB,yBAAyB;AACzB,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,UAAU,EACV,iBAAiB,GAClB,MAAM,YAAY,CAAA;AAEnB,2BAA2B;AAC3B,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,oBAAoB,GAErB,MAAM,UAAU,CAAA;AAEjB,8BAA8B;AAC9B,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,eAAe,CAAA;AAEtB,uBAAuB;AACvB,OAAO,EACL,QAAQ,EACR,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,UAAU,EACV,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,GAehB,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for MDX integration
|
|
3
|
+
*
|
|
4
|
+
* Shared types used across MDX parsing, props generation, and rendering.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Result of parsing MDX content
|
|
10
|
+
*/
|
|
11
|
+
export interface ParsedMDX {
|
|
12
|
+
/** Original MDX content */
|
|
13
|
+
content: string;
|
|
14
|
+
/** Body content without frontmatter */
|
|
15
|
+
body: string;
|
|
16
|
+
/** Parsed frontmatter data */
|
|
17
|
+
frontmatter: Record<string, unknown>;
|
|
18
|
+
/** List of component names found in MDX */
|
|
19
|
+
components: string[];
|
|
20
|
+
/** Props extracted from components */
|
|
21
|
+
componentProps: Record<string, Record<string, unknown>>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Component schema definitions
|
|
25
|
+
* Each component maps to an object schema (key -> description string)
|
|
26
|
+
*/
|
|
27
|
+
export type ComponentSchemas = Record<string, Record<string, string>>;
|
|
28
|
+
/**
|
|
29
|
+
* Options for creating an MDX props generator
|
|
30
|
+
*/
|
|
31
|
+
export interface MDXPropsGeneratorOptions {
|
|
32
|
+
/** Schemas for components */
|
|
33
|
+
schemas: ComponentSchemas;
|
|
34
|
+
/** Whether to cache generated props */
|
|
35
|
+
cache?: boolean;
|
|
36
|
+
/** Model to use for generation */
|
|
37
|
+
model?: string;
|
|
38
|
+
/** Maximum parallel generation requests (default: 3) */
|
|
39
|
+
maxParallel?: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* MDX props generator instance
|
|
43
|
+
*/
|
|
44
|
+
export interface MDXPropsGenerator {
|
|
45
|
+
/** Generate props for components in MDX */
|
|
46
|
+
generate: (mdx: string) => Promise<Record<string, Record<string, unknown>>>;
|
|
47
|
+
/** Clear the generator's cache */
|
|
48
|
+
clearCache?: () => void;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Options for rendering MDX with props
|
|
52
|
+
*/
|
|
53
|
+
export interface RenderMDXOptions {
|
|
54
|
+
/** Custom component renderers */
|
|
55
|
+
components?: Record<string, (props: Record<string, unknown>) => string>;
|
|
56
|
+
/** Enable streaming render */
|
|
57
|
+
stream?: boolean;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Options for compiling MDX
|
|
61
|
+
*/
|
|
62
|
+
export interface CompileMDXOptions {
|
|
63
|
+
/** Custom component map */
|
|
64
|
+
components?: Record<string, (props: Record<string, unknown>) => string>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Compiled MDX function type
|
|
68
|
+
*/
|
|
69
|
+
export interface CompiledMDXFunction {
|
|
70
|
+
(props: Record<string, Record<string, unknown>>): string;
|
|
71
|
+
/** Exported metadata from MDX */
|
|
72
|
+
metadata?: Record<string, unknown>;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Options for streaming MDX rendering
|
|
76
|
+
*/
|
|
77
|
+
export interface StreamMDXOptions {
|
|
78
|
+
/** Custom component renderers */
|
|
79
|
+
components?: Record<string, (props: Record<string, unknown>) => string>;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Cache entry for parsed MDX
|
|
83
|
+
*/
|
|
84
|
+
export interface MDXCacheEntry {
|
|
85
|
+
/** Content hash */
|
|
86
|
+
hash: string;
|
|
87
|
+
/** Parsed MDX result */
|
|
88
|
+
parsed: ParsedMDX;
|
|
89
|
+
/** Timestamp of cache entry */
|
|
90
|
+
timestamp: number;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Cache entry for generated props
|
|
94
|
+
*/
|
|
95
|
+
export interface PropsCacheEntry {
|
|
96
|
+
/** Cache key */
|
|
97
|
+
key: string;
|
|
98
|
+
/** Generated props */
|
|
99
|
+
props: Record<string, unknown>;
|
|
100
|
+
/** Timestamp of cache entry */
|
|
101
|
+
timestamp: number;
|
|
102
|
+
/** Content hash used for generation */
|
|
103
|
+
contentHash?: string;
|
|
104
|
+
/** Tags for invalidation */
|
|
105
|
+
tags?: string[];
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* MDX parse error with location information
|
|
109
|
+
*/
|
|
110
|
+
export interface MDXParseError extends Error {
|
|
111
|
+
/** Line number where error occurred (1-indexed) */
|
|
112
|
+
line?: number;
|
|
113
|
+
/** Column number where error occurred (1-indexed) */
|
|
114
|
+
column?: number;
|
|
115
|
+
/** The problematic content */
|
|
116
|
+
source?: string;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Cache invalidation strategy type
|
|
120
|
+
*/
|
|
121
|
+
export type CacheInvalidationStrategy = 'ttl' | 'lru' | 'tag' | 'manual';
|
|
122
|
+
/**
|
|
123
|
+
* Options for MDX cache configuration
|
|
124
|
+
*/
|
|
125
|
+
export interface MDXCacheOptions {
|
|
126
|
+
/** Maximum cache size (default: 100) */
|
|
127
|
+
maxSize?: number;
|
|
128
|
+
/** Time-to-live in milliseconds (default: 5 minutes) */
|
|
129
|
+
ttl?: number;
|
|
130
|
+
/** Invalidation strategy (default: 'lru') */
|
|
131
|
+
strategy?: CacheInvalidationStrategy;
|
|
132
|
+
/** Enable automatic cleanup interval */
|
|
133
|
+
autoCleanup?: boolean;
|
|
134
|
+
/** Cleanup interval in milliseconds (default: 60 seconds) */
|
|
135
|
+
cleanupInterval?: number;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* MDX cache statistics
|
|
139
|
+
*/
|
|
140
|
+
export interface MDXCacheStats {
|
|
141
|
+
/** Number of cache hits */
|
|
142
|
+
hits: number;
|
|
143
|
+
/** Number of cache misses */
|
|
144
|
+
misses: number;
|
|
145
|
+
/** Current cache size */
|
|
146
|
+
size: number;
|
|
147
|
+
/** Maximum cache size */
|
|
148
|
+
maxSize: number;
|
|
149
|
+
/** Cache hit ratio */
|
|
150
|
+
hitRatio: number;
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=mdx-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mdx-types.d.ts","sourceRoot":"","sources":["../src/mdx-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,WAAW,SAAS;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