@leanmcp/ui 0.3.4 → 0.3.5
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/dist/chunk-57VDL5UC.js +138 -0
- package/dist/chunk-57VDL5UC.js.map +1 -0
- package/dist/chunk-5RGEQPF3.mjs +124 -0
- package/dist/chunk-5RGEQPF3.mjs.map +1 -0
- package/dist/globals.css +138 -0
- package/dist/index.css +641 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +1773 -0
- package/dist/index.d.ts +1773 -0
- package/dist/index.js +3751 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3521 -0
- package/dist/index.mjs.map +1 -0
- package/dist/server.d.mts +179 -0
- package/dist/server.d.ts +179 -0
- package/dist/server.js +73 -0
- package/dist/server.js.map +1 -0
- package/dist/server.mjs +4 -0
- package/dist/server.mjs.map +1 -0
- package/dist/styles.css +4 -0
- package/dist/theme.css +102 -0
- package/package.json +1 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
export { McpUiAppResourceConfig, McpUiAppToolConfig, RESOURCE_MIME_TYPE, RESOURCE_URI_META_KEY, ToolConfig, registerAppResource, registerAppTool } from '@modelcontextprotocol/ext-apps/server';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @UIApp Decorator
|
|
6
|
+
*
|
|
7
|
+
* Links an MCP tool to a React UI component.
|
|
8
|
+
* When applied to a tool method, it:
|
|
9
|
+
* 1. Adds _meta.ui/resourceUri to the tool definition
|
|
10
|
+
* 2. Auto-registers a resource that renders the component to HTML
|
|
11
|
+
*
|
|
12
|
+
* This decorator is designed to work with @leanmcp/core decorators.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
declare const UI_APP_COMPONENT_KEY = "ui:app:component";
|
|
16
|
+
declare const UI_APP_URI_KEY = "ui:app:uri";
|
|
17
|
+
declare const UI_APP_OPTIONS_KEY = "ui:app:options";
|
|
18
|
+
/**
|
|
19
|
+
* Options for @UIApp decorator
|
|
20
|
+
*/
|
|
21
|
+
interface UIAppOptions {
|
|
22
|
+
/**
|
|
23
|
+
* React component or path to component file (relative to service file).
|
|
24
|
+
* - Use path string (e.g., './WeatherCard') for CLI build - avoids importing browser code in server
|
|
25
|
+
* - Use component reference for direct SSR rendering
|
|
26
|
+
*/
|
|
27
|
+
component: React__default.ComponentType<any> | string;
|
|
28
|
+
/** Custom resource URI (auto-generated if not provided) */
|
|
29
|
+
uri?: string;
|
|
30
|
+
/** HTML document title */
|
|
31
|
+
title?: string;
|
|
32
|
+
/** Additional CSS styles */
|
|
33
|
+
styles?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Decorator that links a tool to a UI component.
|
|
37
|
+
*
|
|
38
|
+
* When the tool is called, the host will fetch the UI resource
|
|
39
|
+
* which returns the component rendered as HTML.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* import { Tool } from '@leanmcp/core';
|
|
44
|
+
* import { UIApp } from '@leanmcp/ui';
|
|
45
|
+
* import { WeatherCard } from './WeatherCard';
|
|
46
|
+
*
|
|
47
|
+
* class WeatherService {
|
|
48
|
+
* @Tool({ description: 'Get weather for a city' })
|
|
49
|
+
* @UIApp({ component: WeatherCard })
|
|
50
|
+
* async getWeather(args: { city: string }) {
|
|
51
|
+
* return { city: args.city, temp: 22 };
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare function UIApp(options: UIAppOptions): MethodDecorator;
|
|
57
|
+
/**
|
|
58
|
+
* Helper to get UIApp metadata from a method
|
|
59
|
+
*/
|
|
60
|
+
declare function getUIAppMetadata(target: Function): UIAppOptions | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Helper to get the resource URI from a method
|
|
63
|
+
*/
|
|
64
|
+
declare function getUIAppUri(target: Function): string | undefined;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @GPTApp Decorator
|
|
68
|
+
*
|
|
69
|
+
* Links an MCP tool to a React UI component compliant with ChatGPT Apps SDK.
|
|
70
|
+
*
|
|
71
|
+
* When applied to a tool method, it:
|
|
72
|
+
* 1. Adds _meta.ui/resourceUri to the tool definition
|
|
73
|
+
* 2. Adds OpenAI-specific metadata (widgetAccessible, outputTemplate, etc.)
|
|
74
|
+
* 3. Auto-registers a resource that renders the component to HTML with 'text/html+skybridge' mimeType
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
declare const GPT_APP_COMPONENT_KEY = "gptapp:component";
|
|
78
|
+
declare const GPT_APP_URI_KEY = "gptapp:uri";
|
|
79
|
+
declare const GPT_APP_OPTIONS_KEY = "gptapp:options";
|
|
80
|
+
/**
|
|
81
|
+
* Options for @GPTApp decorator
|
|
82
|
+
*/
|
|
83
|
+
interface GPTAppOptions {
|
|
84
|
+
/**
|
|
85
|
+
* React component or path to component file (relative to service file).
|
|
86
|
+
* - Use path string (e.g., './WeatherCard') for CLI build - avoids importing browser code in server
|
|
87
|
+
* - Use component reference for direct SSR rendering
|
|
88
|
+
*/
|
|
89
|
+
component: React__default.ComponentType<any> | string;
|
|
90
|
+
/** Custom resource URI (auto-generated ui://... if not provided) */
|
|
91
|
+
uri?: string;
|
|
92
|
+
/** HTML document title */
|
|
93
|
+
title?: string;
|
|
94
|
+
/** Additional CSS styles */
|
|
95
|
+
styles?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Allow widget to call tools via window.openai.callTool.
|
|
98
|
+
* Maps to _meta["openai/widgetAccessible"]
|
|
99
|
+
*/
|
|
100
|
+
widgetAccessible?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Tool visibility: 'public' (default) or 'private'.
|
|
103
|
+
* 'private' hides the tool from the model but keeps it callable by the widget.
|
|
104
|
+
* Maps to _meta["openai/visibility"]
|
|
105
|
+
*/
|
|
106
|
+
visibility?: 'public' | 'private';
|
|
107
|
+
/**
|
|
108
|
+
* Widget prefers border around iframe.
|
|
109
|
+
* Maps to _meta["openai/widgetPrefersBorder"]
|
|
110
|
+
*/
|
|
111
|
+
prefersBorder?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Widget domain for API allowlists.
|
|
114
|
+
* Maps to _meta["openai/widgetDomain"]
|
|
115
|
+
*/
|
|
116
|
+
widgetDomain?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Widget description for the model.
|
|
119
|
+
* Maps to _meta["openai/widgetDescription"]
|
|
120
|
+
*/
|
|
121
|
+
widgetDescription?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Content Security Policy configuration.
|
|
124
|
+
* Maps to _meta["openai/widgetCSP"]
|
|
125
|
+
*/
|
|
126
|
+
csp?: {
|
|
127
|
+
connect_domains?: string[];
|
|
128
|
+
resource_domains?: string[];
|
|
129
|
+
redirect_domains?: string[];
|
|
130
|
+
frame_domains?: string[];
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* File parameters (fields treated as file uploads).
|
|
134
|
+
* Maps to _meta["openai/fileParams"]
|
|
135
|
+
*/
|
|
136
|
+
fileParams?: string[];
|
|
137
|
+
/**
|
|
138
|
+
* Invocation messages shown during tool call.
|
|
139
|
+
* Maps to _meta["openai/toolInvocation"]
|
|
140
|
+
*/
|
|
141
|
+
invocation?: {
|
|
142
|
+
invoking?: string;
|
|
143
|
+
invoked?: string;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Decorator that links a tool to a UI component for ChatGPT Apps.
|
|
148
|
+
*
|
|
149
|
+
* When the tool is called, the host will fetch the UI resource
|
|
150
|
+
* which returns the component rendered as HTML with 'text/html+skybridge'.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```typescript
|
|
154
|
+
* import { Tool } from '@leanmcp/core';
|
|
155
|
+
* import { GPTApp } from '@leanmcp/ui';
|
|
156
|
+
* import { KanbanBoard } from './KanbanBoard';
|
|
157
|
+
*
|
|
158
|
+
* class KanbanService {
|
|
159
|
+
* @Tool({ description: 'Show Kanban Board' })
|
|
160
|
+
* @GPTApp({
|
|
161
|
+
* component: KanbanBoard,
|
|
162
|
+
* widgetAccessible: true,
|
|
163
|
+
* invocation: { invoking: 'Loading board...' }
|
|
164
|
+
* })
|
|
165
|
+
* async showBoard() { ... }
|
|
166
|
+
* }
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
169
|
+
declare function GPTApp(options: GPTAppOptions): MethodDecorator;
|
|
170
|
+
/**
|
|
171
|
+
* Helper to get GPTApp metadata from a method
|
|
172
|
+
*/
|
|
173
|
+
declare function getGPTAppMetadata(target: Function): GPTAppOptions | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* Helper to get the resource URI from a method
|
|
176
|
+
*/
|
|
177
|
+
declare function getGPTAppUri(target: Function): string | undefined;
|
|
178
|
+
|
|
179
|
+
export { GPTApp, type GPTAppOptions, GPT_APP_COMPONENT_KEY, GPT_APP_OPTIONS_KEY, GPT_APP_URI_KEY, UIApp, type UIAppOptions, UI_APP_COMPONENT_KEY, UI_APP_OPTIONS_KEY, UI_APP_URI_KEY, getGPTAppMetadata, getGPTAppUri, getUIAppMetadata, getUIAppUri };
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
export { McpUiAppResourceConfig, McpUiAppToolConfig, RESOURCE_MIME_TYPE, RESOURCE_URI_META_KEY, ToolConfig, registerAppResource, registerAppTool } from '@modelcontextprotocol/ext-apps/server';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @UIApp Decorator
|
|
6
|
+
*
|
|
7
|
+
* Links an MCP tool to a React UI component.
|
|
8
|
+
* When applied to a tool method, it:
|
|
9
|
+
* 1. Adds _meta.ui/resourceUri to the tool definition
|
|
10
|
+
* 2. Auto-registers a resource that renders the component to HTML
|
|
11
|
+
*
|
|
12
|
+
* This decorator is designed to work with @leanmcp/core decorators.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
declare const UI_APP_COMPONENT_KEY = "ui:app:component";
|
|
16
|
+
declare const UI_APP_URI_KEY = "ui:app:uri";
|
|
17
|
+
declare const UI_APP_OPTIONS_KEY = "ui:app:options";
|
|
18
|
+
/**
|
|
19
|
+
* Options for @UIApp decorator
|
|
20
|
+
*/
|
|
21
|
+
interface UIAppOptions {
|
|
22
|
+
/**
|
|
23
|
+
* React component or path to component file (relative to service file).
|
|
24
|
+
* - Use path string (e.g., './WeatherCard') for CLI build - avoids importing browser code in server
|
|
25
|
+
* - Use component reference for direct SSR rendering
|
|
26
|
+
*/
|
|
27
|
+
component: React__default.ComponentType<any> | string;
|
|
28
|
+
/** Custom resource URI (auto-generated if not provided) */
|
|
29
|
+
uri?: string;
|
|
30
|
+
/** HTML document title */
|
|
31
|
+
title?: string;
|
|
32
|
+
/** Additional CSS styles */
|
|
33
|
+
styles?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Decorator that links a tool to a UI component.
|
|
37
|
+
*
|
|
38
|
+
* When the tool is called, the host will fetch the UI resource
|
|
39
|
+
* which returns the component rendered as HTML.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* import { Tool } from '@leanmcp/core';
|
|
44
|
+
* import { UIApp } from '@leanmcp/ui';
|
|
45
|
+
* import { WeatherCard } from './WeatherCard';
|
|
46
|
+
*
|
|
47
|
+
* class WeatherService {
|
|
48
|
+
* @Tool({ description: 'Get weather for a city' })
|
|
49
|
+
* @UIApp({ component: WeatherCard })
|
|
50
|
+
* async getWeather(args: { city: string }) {
|
|
51
|
+
* return { city: args.city, temp: 22 };
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare function UIApp(options: UIAppOptions): MethodDecorator;
|
|
57
|
+
/**
|
|
58
|
+
* Helper to get UIApp metadata from a method
|
|
59
|
+
*/
|
|
60
|
+
declare function getUIAppMetadata(target: Function): UIAppOptions | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Helper to get the resource URI from a method
|
|
63
|
+
*/
|
|
64
|
+
declare function getUIAppUri(target: Function): string | undefined;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @GPTApp Decorator
|
|
68
|
+
*
|
|
69
|
+
* Links an MCP tool to a React UI component compliant with ChatGPT Apps SDK.
|
|
70
|
+
*
|
|
71
|
+
* When applied to a tool method, it:
|
|
72
|
+
* 1. Adds _meta.ui/resourceUri to the tool definition
|
|
73
|
+
* 2. Adds OpenAI-specific metadata (widgetAccessible, outputTemplate, etc.)
|
|
74
|
+
* 3. Auto-registers a resource that renders the component to HTML with 'text/html+skybridge' mimeType
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
declare const GPT_APP_COMPONENT_KEY = "gptapp:component";
|
|
78
|
+
declare const GPT_APP_URI_KEY = "gptapp:uri";
|
|
79
|
+
declare const GPT_APP_OPTIONS_KEY = "gptapp:options";
|
|
80
|
+
/**
|
|
81
|
+
* Options for @GPTApp decorator
|
|
82
|
+
*/
|
|
83
|
+
interface GPTAppOptions {
|
|
84
|
+
/**
|
|
85
|
+
* React component or path to component file (relative to service file).
|
|
86
|
+
* - Use path string (e.g., './WeatherCard') for CLI build - avoids importing browser code in server
|
|
87
|
+
* - Use component reference for direct SSR rendering
|
|
88
|
+
*/
|
|
89
|
+
component: React__default.ComponentType<any> | string;
|
|
90
|
+
/** Custom resource URI (auto-generated ui://... if not provided) */
|
|
91
|
+
uri?: string;
|
|
92
|
+
/** HTML document title */
|
|
93
|
+
title?: string;
|
|
94
|
+
/** Additional CSS styles */
|
|
95
|
+
styles?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Allow widget to call tools via window.openai.callTool.
|
|
98
|
+
* Maps to _meta["openai/widgetAccessible"]
|
|
99
|
+
*/
|
|
100
|
+
widgetAccessible?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Tool visibility: 'public' (default) or 'private'.
|
|
103
|
+
* 'private' hides the tool from the model but keeps it callable by the widget.
|
|
104
|
+
* Maps to _meta["openai/visibility"]
|
|
105
|
+
*/
|
|
106
|
+
visibility?: 'public' | 'private';
|
|
107
|
+
/**
|
|
108
|
+
* Widget prefers border around iframe.
|
|
109
|
+
* Maps to _meta["openai/widgetPrefersBorder"]
|
|
110
|
+
*/
|
|
111
|
+
prefersBorder?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Widget domain for API allowlists.
|
|
114
|
+
* Maps to _meta["openai/widgetDomain"]
|
|
115
|
+
*/
|
|
116
|
+
widgetDomain?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Widget description for the model.
|
|
119
|
+
* Maps to _meta["openai/widgetDescription"]
|
|
120
|
+
*/
|
|
121
|
+
widgetDescription?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Content Security Policy configuration.
|
|
124
|
+
* Maps to _meta["openai/widgetCSP"]
|
|
125
|
+
*/
|
|
126
|
+
csp?: {
|
|
127
|
+
connect_domains?: string[];
|
|
128
|
+
resource_domains?: string[];
|
|
129
|
+
redirect_domains?: string[];
|
|
130
|
+
frame_domains?: string[];
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* File parameters (fields treated as file uploads).
|
|
134
|
+
* Maps to _meta["openai/fileParams"]
|
|
135
|
+
*/
|
|
136
|
+
fileParams?: string[];
|
|
137
|
+
/**
|
|
138
|
+
* Invocation messages shown during tool call.
|
|
139
|
+
* Maps to _meta["openai/toolInvocation"]
|
|
140
|
+
*/
|
|
141
|
+
invocation?: {
|
|
142
|
+
invoking?: string;
|
|
143
|
+
invoked?: string;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Decorator that links a tool to a UI component for ChatGPT Apps.
|
|
148
|
+
*
|
|
149
|
+
* When the tool is called, the host will fetch the UI resource
|
|
150
|
+
* which returns the component rendered as HTML with 'text/html+skybridge'.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```typescript
|
|
154
|
+
* import { Tool } from '@leanmcp/core';
|
|
155
|
+
* import { GPTApp } from '@leanmcp/ui';
|
|
156
|
+
* import { KanbanBoard } from './KanbanBoard';
|
|
157
|
+
*
|
|
158
|
+
* class KanbanService {
|
|
159
|
+
* @Tool({ description: 'Show Kanban Board' })
|
|
160
|
+
* @GPTApp({
|
|
161
|
+
* component: KanbanBoard,
|
|
162
|
+
* widgetAccessible: true,
|
|
163
|
+
* invocation: { invoking: 'Loading board...' }
|
|
164
|
+
* })
|
|
165
|
+
* async showBoard() { ... }
|
|
166
|
+
* }
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
169
|
+
declare function GPTApp(options: GPTAppOptions): MethodDecorator;
|
|
170
|
+
/**
|
|
171
|
+
* Helper to get GPTApp metadata from a method
|
|
172
|
+
*/
|
|
173
|
+
declare function getGPTAppMetadata(target: Function): GPTAppOptions | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* Helper to get the resource URI from a method
|
|
176
|
+
*/
|
|
177
|
+
declare function getGPTAppUri(target: Function): string | undefined;
|
|
178
|
+
|
|
179
|
+
export { GPTApp, type GPTAppOptions, GPT_APP_COMPONENT_KEY, GPT_APP_OPTIONS_KEY, GPT_APP_URI_KEY, UIApp, type UIAppOptions, UI_APP_COMPONENT_KEY, UI_APP_OPTIONS_KEY, UI_APP_URI_KEY, getGPTAppMetadata, getGPTAppUri, getUIAppMetadata, getUIAppUri };
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk57VDL5UC_js = require('./chunk-57VDL5UC.js');
|
|
4
|
+
var server = require('@modelcontextprotocol/ext-apps/server');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "GPTApp", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunk57VDL5UC_js.GPTApp; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "GPT_APP_COMPONENT_KEY", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunk57VDL5UC_js.GPT_APP_COMPONENT_KEY; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "GPT_APP_OPTIONS_KEY", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunk57VDL5UC_js.GPT_APP_OPTIONS_KEY; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "GPT_APP_URI_KEY", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunk57VDL5UC_js.GPT_APP_URI_KEY; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "UIApp", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunk57VDL5UC_js.UIApp; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "UI_APP_COMPONENT_KEY", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunk57VDL5UC_js.UI_APP_COMPONENT_KEY; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "UI_APP_OPTIONS_KEY", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunk57VDL5UC_js.UI_APP_OPTIONS_KEY; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "UI_APP_URI_KEY", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunk57VDL5UC_js.UI_APP_URI_KEY; }
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "getGPTAppMetadata", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () { return chunk57VDL5UC_js.getGPTAppMetadata; }
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "getGPTAppUri", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return chunk57VDL5UC_js.getGPTAppUri; }
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "getUIAppMetadata", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return chunk57VDL5UC_js.getUIAppMetadata; }
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "getUIAppUri", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return chunk57VDL5UC_js.getUIAppUri; }
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "RESOURCE_MIME_TYPE", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () { return server.RESOURCE_MIME_TYPE; }
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "RESOURCE_URI_META_KEY", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return server.RESOURCE_URI_META_KEY; }
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, "registerAppResource", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () { return server.registerAppResource; }
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "registerAppTool", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () { return server.registerAppTool; }
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=server.js.map
|
|
73
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"server.js","sourcesContent":[]}
|
package/dist/server.mjs
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { GPTApp, GPT_APP_COMPONENT_KEY, GPT_APP_OPTIONS_KEY, GPT_APP_URI_KEY, UIApp, UI_APP_COMPONENT_KEY, UI_APP_OPTIONS_KEY, UI_APP_URI_KEY, getGPTAppMetadata, getGPTAppUri, getUIAppMetadata, getUIAppUri } from './chunk-5RGEQPF3.mjs';
|
|
2
|
+
export { RESOURCE_MIME_TYPE, RESOURCE_URI_META_KEY, registerAppResource, registerAppTool } from '@modelcontextprotocol/ext-apps/server';
|
|
3
|
+
//# sourceMappingURL=server.mjs.map
|
|
4
|
+
//# sourceMappingURL=server.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"server.mjs","sourcesContent":[]}
|
package/dist/styles.css
ADDED
package/dist/theme.css
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* @leanmcp/ui Theme Variables */
|
|
2
|
+
:root {
|
|
3
|
+
/* Colors */
|
|
4
|
+
--lui-primary: #6366f1;
|
|
5
|
+
--lui-primary-hover: #4f46e5;
|
|
6
|
+
--lui-primary-active: #4338ca;
|
|
7
|
+
|
|
8
|
+
--lui-success: #22c55e;
|
|
9
|
+
--lui-warning: #f59e0b;
|
|
10
|
+
--lui-error: #ef4444;
|
|
11
|
+
--lui-info: #3b82f6;
|
|
12
|
+
|
|
13
|
+
/* Backgrounds */
|
|
14
|
+
--lui-bg: #ffffff;
|
|
15
|
+
--lui-bg-secondary: #f8fafc;
|
|
16
|
+
--lui-surface: #f1f5f9;
|
|
17
|
+
--lui-surface-hover: #e2e8f0;
|
|
18
|
+
|
|
19
|
+
/* Text */
|
|
20
|
+
--lui-text: #0f172a;
|
|
21
|
+
--lui-text-secondary: #475569;
|
|
22
|
+
--lui-text-muted: #94a3b8;
|
|
23
|
+
--lui-text-inverse: #ffffff;
|
|
24
|
+
|
|
25
|
+
/* Borders */
|
|
26
|
+
--lui-border: #e2e8f0;
|
|
27
|
+
--lui-border-focus: #6366f1;
|
|
28
|
+
|
|
29
|
+
/* Spacing */
|
|
30
|
+
--lui-space-1: 4px;
|
|
31
|
+
--lui-space-2: 8px;
|
|
32
|
+
--lui-space-3: 12px;
|
|
33
|
+
--lui-space-4: 16px;
|
|
34
|
+
--lui-space-5: 20px;
|
|
35
|
+
--lui-space-6: 24px;
|
|
36
|
+
--lui-space-8: 32px;
|
|
37
|
+
|
|
38
|
+
/* Radius */
|
|
39
|
+
--lui-radius-sm: 4px;
|
|
40
|
+
--lui-radius-md: 8px;
|
|
41
|
+
--lui-radius-lg: 12px;
|
|
42
|
+
--lui-radius-xl: 16px;
|
|
43
|
+
--lui-radius-full: 9999px;
|
|
44
|
+
|
|
45
|
+
/* Shadows */
|
|
46
|
+
--lui-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
47
|
+
--lui-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
48
|
+
--lui-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
49
|
+
|
|
50
|
+
/* Transitions */
|
|
51
|
+
--lui-transition-fast: 100ms ease;
|
|
52
|
+
--lui-transition: 150ms ease;
|
|
53
|
+
--lui-transition-slow: 300ms ease;
|
|
54
|
+
|
|
55
|
+
/* Typography */
|
|
56
|
+
--lui-font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
57
|
+
--lui-font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
|
|
58
|
+
|
|
59
|
+
--lui-text-xs: 0.75rem;
|
|
60
|
+
--lui-text-sm: 0.875rem;
|
|
61
|
+
--lui-text-base: 1rem;
|
|
62
|
+
--lui-text-lg: 1.125rem;
|
|
63
|
+
--lui-text-xl: 1.25rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Dark theme */
|
|
67
|
+
[data-theme="dark"],
|
|
68
|
+
.lui-dark {
|
|
69
|
+
--lui-primary: #818cf8;
|
|
70
|
+
--lui-primary-hover: #6366f1;
|
|
71
|
+
--lui-primary-active: #4f46e5;
|
|
72
|
+
|
|
73
|
+
--lui-bg: #0f172a;
|
|
74
|
+
--lui-bg-secondary: #1e293b;
|
|
75
|
+
--lui-surface: #334155;
|
|
76
|
+
--lui-surface-hover: #475569;
|
|
77
|
+
|
|
78
|
+
--lui-text: #f1f5f9;
|
|
79
|
+
--lui-text-secondary: #cbd5e1;
|
|
80
|
+
--lui-text-muted: #64748b;
|
|
81
|
+
--lui-text-inverse: #0f172a;
|
|
82
|
+
|
|
83
|
+
--lui-border: #334155;
|
|
84
|
+
--lui-border-focus: #818cf8;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Base styles */
|
|
88
|
+
.lui-root {
|
|
89
|
+
font-family: var(--lui-font-sans);
|
|
90
|
+
font-size: var(--lui-text-base);
|
|
91
|
+
color: var(--lui-text);
|
|
92
|
+
background: var(--lui-bg);
|
|
93
|
+
line-height: 1.5;
|
|
94
|
+
-webkit-font-smoothing: antialiased;
|
|
95
|
+
-moz-osx-font-smoothing: grayscale;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Focus ring utility */
|
|
99
|
+
.lui-focus-ring:focus-visible {
|
|
100
|
+
outline: 2px solid var(--lui-border-focus);
|
|
101
|
+
outline-offset: 2px;
|
|
102
|
+
}
|
package/package.json
CHANGED