Make it styles.variables instead of styles
This commit is contained in:
parent
2fa243ae8c
commit
445a5836cf
3 changed files with 717 additions and 496 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -63,6 +63,10 @@ export type McpUiToolCancelledNotificationSchemaInferredType = z.infer<
|
|||
typeof generated.McpUiToolCancelledNotificationSchema
|
||||
>;
|
||||
|
||||
export type McpUiHostStylesSchemaInferredType = z.infer<
|
||||
typeof generated.McpUiHostStylesSchema
|
||||
>;
|
||||
|
||||
export type McpUiResourceTeardownRequestSchemaInferredType = z.infer<
|
||||
typeof generated.McpUiResourceTeardownRequestSchema
|
||||
>;
|
||||
|
|
@ -177,6 +181,8 @@ expectType<spec.McpUiToolCancelledNotification>(
|
|||
expectType<McpUiToolCancelledNotificationSchemaInferredType>(
|
||||
{} as spec.McpUiToolCancelledNotification,
|
||||
);
|
||||
expectType<spec.McpUiHostStyles>({} as McpUiHostStylesSchemaInferredType);
|
||||
expectType<McpUiHostStylesSchemaInferredType>({} as spec.McpUiHostStyles);
|
||||
expectType<spec.McpUiResourceTeardownRequest>(
|
||||
{} as McpUiResourceTeardownRequestSchemaInferredType,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -246,6 +246,16 @@ export const McpUiToolCancelledNotificationSchema = z.object({
|
|||
}),
|
||||
});
|
||||
|
||||
/**
|
||||
* @description Style configuration for theming MCP apps.
|
||||
*/
|
||||
export const McpUiHostStylesSchema = z.object({
|
||||
/** @description CSS variables for theming the app. */
|
||||
variables: McpUiStylesSchema.optional().describe(
|
||||
"CSS variables for theming the app.",
|
||||
),
|
||||
});
|
||||
|
||||
/**
|
||||
* @description Request for graceful shutdown of the Guest UI (Host -> Guest UI).
|
||||
* @see {@link app-bridge.AppBridge.sendResourceTeardown} for the host method that sends this
|
||||
|
|
@ -422,9 +432,9 @@ export const McpUiHostContextSchema = z.looseObject({
|
|||
theme: McpUiThemeSchema.optional().describe(
|
||||
"Current color theme preference.",
|
||||
),
|
||||
/** @description CSS variables for theming the app. */
|
||||
styles: McpUiStylesSchema.optional().describe(
|
||||
"CSS variables for theming the app.",
|
||||
/** @description Style configuration for theming the app. */
|
||||
styles: McpUiHostStylesSchema.optional().describe(
|
||||
"Style configuration for theming the app.",
|
||||
),
|
||||
/** @description How the UI is currently displayed. */
|
||||
displayMode: McpUiDisplayModeSchema.optional().describe(
|
||||
|
|
|
|||
Loading…
Reference in a new issue