Add way to pass fonts

This commit is contained in:
martinalong 2025-12-14 18:01:24 -08:00
commit 6397ec1511
No known key found for this signature in database

View file

@ -285,6 +285,17 @@ export const McpUiToolCancelledNotificationSchema = z.object({
}),
});
/**
* @description CSS blocks that can be injected by apps.
*/
export const McpUiHostCssSchema = z.object({
/** @description CSS for font loading (@font-face rules or @import statements). Apps must apply using applyHostFonts(). */
fonts: z
.string()
.optional()
.describe("CSS for font loading (@font-face rules or"),
});
/**
* @description Style configuration for theming MCP apps.
*/
@ -293,6 +304,10 @@ export const McpUiHostStylesSchema = z.object({
variables: McpUiStylesSchema.optional().describe(
"CSS variables for theming the app.",
),
/** @description CSS blocks that apps can inject. */
css: McpUiHostCssSchema.optional().describe(
"CSS blocks that apps can inject.",
),
});
/**