@seed-ship/mcp-ui-solid 1.0.25 → 1.0.26
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/package.json +6 -1
- package/validation.ts +38 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-ship/mcp-ui-solid",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"description": "SolidJS components for rendering MCP-generated UI resources",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -30,10 +30,15 @@
|
|
|
30
30
|
"import": "./dist/types/index.js",
|
|
31
31
|
"require": "./dist/types/index.cjs",
|
|
32
32
|
"types": "./dist/types/index.d.ts"
|
|
33
|
+
},
|
|
34
|
+
"./validation": {
|
|
35
|
+
"import": "./validation.ts",
|
|
36
|
+
"types": "./validation.ts"
|
|
33
37
|
}
|
|
34
38
|
},
|
|
35
39
|
"files": [
|
|
36
40
|
"dist",
|
|
41
|
+
"validation.ts",
|
|
37
42
|
"README.md",
|
|
38
43
|
"CHANGELOG.md"
|
|
39
44
|
],
|
package/validation.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SSR-safe validation exports
|
|
3
|
+
*
|
|
4
|
+
* This file ONLY exports validation functions and types,
|
|
5
|
+
* WITHOUT loading any UI components that contain client-only APIs.
|
|
6
|
+
*
|
|
7
|
+
* Use this for server-side validation:
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { validateLayout } from '@seed-ship/mcp-ui-solid/validation'
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// Re-export validation functions (no component dependencies)
|
|
14
|
+
export {
|
|
15
|
+
validateComponent,
|
|
16
|
+
validateLayout,
|
|
17
|
+
validateGridPosition,
|
|
18
|
+
validateChartComponent,
|
|
19
|
+
validateTableComponent,
|
|
20
|
+
validatePayloadSize,
|
|
21
|
+
validateIframeDomain,
|
|
22
|
+
sanitizeString,
|
|
23
|
+
DEFAULT_RESOURCE_LIMITS,
|
|
24
|
+
} from './src/services/validation'
|
|
25
|
+
|
|
26
|
+
// Re-export types only (no runtime code)
|
|
27
|
+
export type {
|
|
28
|
+
UIComponent,
|
|
29
|
+
UILayout,
|
|
30
|
+
GridPosition,
|
|
31
|
+
ComponentType,
|
|
32
|
+
ChartComponentParams,
|
|
33
|
+
TableComponentParams,
|
|
34
|
+
MetricComponentParams,
|
|
35
|
+
TextComponentParams,
|
|
36
|
+
ValidationResult,
|
|
37
|
+
ResourceLimits,
|
|
38
|
+
} from './src/types'
|