@seed-ship/mcp-ui-solid 3.0.5 → 4.0.1
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/CHANGELOG.md +115 -0
- package/README.md +253 -280
- package/dist/components/ChartJSRenderer.cjs +37 -15
- package/dist/components/ChartJSRenderer.cjs.map +1 -1
- package/dist/components/ChartJSRenderer.d.ts.map +1 -1
- package/dist/components/ChartJSRenderer.js +37 -15
- package/dist/components/ChartJSRenderer.js.map +1 -1
- package/dist/components/DataPreviewSection.cjs +213 -0
- package/dist/components/DataPreviewSection.cjs.map +1 -0
- package/dist/components/DataPreviewSection.d.ts +19 -0
- package/dist/components/DataPreviewSection.d.ts.map +1 -0
- package/dist/components/DataPreviewSection.js +213 -0
- package/dist/components/DataPreviewSection.js.map +1 -0
- package/dist/components/MapRenderer.cjs +168 -26
- package/dist/components/MapRenderer.cjs.map +1 -1
- package/dist/components/MapRenderer.d.ts +2 -2
- package/dist/components/MapRenderer.d.ts.map +1 -1
- package/dist/components/MapRenderer.js +169 -27
- package/dist/components/MapRenderer.js.map +1 -1
- package/dist/components/ScratchpadPanel.cjs +83 -1
- package/dist/components/ScratchpadPanel.cjs.map +1 -1
- package/dist/components/ScratchpadPanel.d.ts.map +1 -1
- package/dist/components/ScratchpadPanel.js +84 -2
- package/dist/components/ScratchpadPanel.js.map +1 -1
- package/dist/components/VerifiedText.cjs +166 -0
- package/dist/components/VerifiedText.cjs.map +1 -0
- package/dist/components/VerifiedText.d.ts +22 -0
- package/dist/components/VerifiedText.d.ts.map +1 -0
- package/dist/components/VerifiedText.js +166 -0
- package/dist/components/VerifiedText.js.map +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components.cjs +4 -0
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +4 -0
- package/dist/components.d.ts +4 -0
- package/dist/components.js +4 -0
- package/dist/components.js.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useDataValidator.cjs +31 -0
- package/dist/hooks/useDataValidator.cjs.map +1 -0
- package/dist/hooks/useDataValidator.d.ts +42 -0
- package/dist/hooks/useDataValidator.d.ts.map +1 -0
- package/dist/hooks/useDataValidator.js +31 -0
- package/dist/hooks/useDataValidator.js.map +1 -0
- package/dist/hooks.cjs +2 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +2 -0
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.js +2 -0
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -5
- package/dist/index.d.ts +9 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@mapbox_point-geometry@1.1.0/node_modules/@mapbox/point-geometry/index.cjs +290 -0
- package/dist/node_modules/.pnpm/@mapbox_point-geometry@1.1.0/node_modules/@mapbox/point-geometry/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/@mapbox_point-geometry@1.1.0/node_modules/@mapbox/point-geometry/index.js +291 -0
- package/dist/node_modules/.pnpm/@mapbox_point-geometry@1.1.0/node_modules/@mapbox/point-geometry/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@mapbox_vector-tile@2.0.4/node_modules/@mapbox/vector-tile/index.cjs +243 -0
- package/dist/node_modules/.pnpm/@mapbox_vector-tile@2.0.4/node_modules/@mapbox/vector-tile/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/@mapbox_vector-tile@2.0.4/node_modules/@mapbox/vector-tile/index.js +243 -0
- package/dist/node_modules/.pnpm/@mapbox_vector-tile@2.0.4/node_modules/@mapbox/vector-tile/index.js.map +1 -0
- package/dist/node_modules/.pnpm/color2k@2.0.3/node_modules/color2k/dist/index.exports.import.es.cjs +137 -0
- package/dist/node_modules/.pnpm/color2k@2.0.3/node_modules/color2k/dist/index.exports.import.es.cjs.map +1 -0
- package/dist/node_modules/.pnpm/color2k@2.0.3/node_modules/color2k/dist/index.exports.import.es.js +137 -0
- package/dist/node_modules/.pnpm/color2k@2.0.3/node_modules/color2k/dist/index.exports.import.es.js.map +1 -0
- package/dist/node_modules/.pnpm/pbf@4.0.1/node_modules/pbf/index.cjs +686 -0
- package/dist/node_modules/.pnpm/pbf@4.0.1/node_modules/pbf/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/pbf@4.0.1/node_modules/pbf/index.js +687 -0
- package/dist/node_modules/.pnpm/pbf@4.0.1/node_modules/pbf/index.js.map +1 -0
- package/dist/node_modules/.pnpm/pmtiles@3.2.1/node_modules/pmtiles/dist/index.cjs +1366 -0
- package/dist/node_modules/.pnpm/pmtiles@3.2.1/node_modules/pmtiles/dist/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/pmtiles@3.2.1/node_modules/pmtiles/dist/index.js +1366 -0
- package/dist/node_modules/.pnpm/pmtiles@3.2.1/node_modules/pmtiles/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/potpack@1.0.2/node_modules/potpack/index.cjs +54 -0
- package/dist/node_modules/.pnpm/potpack@1.0.2/node_modules/potpack/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/potpack@1.0.2/node_modules/potpack/index.js +55 -0
- package/dist/node_modules/.pnpm/potpack@1.0.2/node_modules/potpack/index.js.map +1 -0
- package/dist/node_modules/.pnpm/protomaps-leaflet@4.1.1/node_modules/protomaps-leaflet/dist/esm/index.cjs +1256 -0
- package/dist/node_modules/.pnpm/protomaps-leaflet@4.1.1/node_modules/protomaps-leaflet/dist/esm/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/protomaps-leaflet@4.1.1/node_modules/protomaps-leaflet/dist/esm/index.js +1256 -0
- package/dist/node_modules/.pnpm/protomaps-leaflet@4.1.1/node_modules/protomaps-leaflet/dist/esm/index.js.map +1 -0
- package/dist/node_modules/.pnpm/quickselect@2.0.0/node_modules/quickselect/index.cjs +47 -0
- package/dist/node_modules/.pnpm/quickselect@2.0.0/node_modules/quickselect/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/quickselect@2.0.0/node_modules/quickselect/index.js +48 -0
- package/dist/node_modules/.pnpm/quickselect@2.0.0/node_modules/quickselect/index.js.map +1 -0
- package/dist/node_modules/.pnpm/rbush@3.0.1/node_modules/rbush/index.cjs +378 -0
- package/dist/node_modules/.pnpm/rbush@3.0.1/node_modules/rbush/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/rbush@3.0.1/node_modules/rbush/index.js +379 -0
- package/dist/node_modules/.pnpm/rbush@3.0.1/node_modules/rbush/index.js.map +1 -0
- package/dist/services/data-validator.cjs +85 -0
- package/dist/services/data-validator.cjs.map +1 -0
- package/dist/services/data-validator.d.ts +28 -0
- package/dist/services/data-validator.d.ts.map +1 -0
- package/dist/services/data-validator.js +85 -0
- package/dist/services/data-validator.js.map +1 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/types/chat-bus.d.ts +88 -1
- package/dist/types/chat-bus.d.ts.map +1 -1
- package/dist/types/index.d.ts +135 -6
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types.d.cts +135 -6
- package/dist/types.d.ts +135 -6
- package/package.json +5 -1
- package/src/components/ChartJSRenderer.tsx +35 -13
- package/src/components/DataPreviewSection.tsx +251 -0
- package/src/components/MapRenderer.test.tsx +94 -5
- package/src/components/MapRenderer.tsx +246 -45
- package/src/components/ScratchpadPanel.tsx +19 -3
- package/src/components/VerifiedText.tsx +187 -0
- package/src/components/index.ts +7 -0
- package/src/hooks/index.ts +7 -0
- package/src/hooks/useDataValidator.ts +68 -0
- package/src/index.ts +26 -1
- package/src/services/data-validator.test.ts +151 -0
- package/src/services/data-validator.ts +149 -0
- package/src/services/index.ts +2 -0
- package/src/types/chat-bus.ts +98 -1
- package/src/types/index.ts +145 -6
- package/tsconfig.tsbuildinfo +1 -1
package/src/types/index.ts
CHANGED
|
@@ -94,10 +94,14 @@ export interface ChartComponentParams {
|
|
|
94
94
|
labels: string[]
|
|
95
95
|
datasets: Array<{
|
|
96
96
|
label: string
|
|
97
|
-
data: number[]
|
|
97
|
+
data: number[] | Array<{ x: string | number; y: number }>
|
|
98
98
|
backgroundColor?: string | string[]
|
|
99
99
|
borderColor?: string | string[]
|
|
100
100
|
borderWidth?: number
|
|
101
|
+
/** Fill area under line (useful for time-series) */
|
|
102
|
+
fill?: boolean | string
|
|
103
|
+
/** Line tension (0 = straight, 0.4 = smooth) */
|
|
104
|
+
tension?: number
|
|
101
105
|
}>
|
|
102
106
|
}
|
|
103
107
|
options?: {
|
|
@@ -118,6 +122,22 @@ export interface ChartComponentParams {
|
|
|
118
122
|
* Enable PNG export button (v2.2.0)
|
|
119
123
|
*/
|
|
120
124
|
exportable?: boolean
|
|
125
|
+
/**
|
|
126
|
+
* Time-series axis configuration (v3.1.0).
|
|
127
|
+
* When set, x-axis labels are parsed as dates.
|
|
128
|
+
*/
|
|
129
|
+
timeAxis?: {
|
|
130
|
+
/** Date format for parsing labels (Chart.js adapter format, e.g. 'yyyy-MM-dd') */
|
|
131
|
+
parser?: string
|
|
132
|
+
/** Display unit for x-axis ticks */
|
|
133
|
+
unit?: 'day' | 'week' | 'month' | 'quarter' | 'year'
|
|
134
|
+
/** Date format for tooltip display */
|
|
135
|
+
tooltipFormat?: string
|
|
136
|
+
/** Min date (ISO string) */
|
|
137
|
+
min?: string
|
|
138
|
+
/** Max date (ISO string) */
|
|
139
|
+
max?: string
|
|
140
|
+
}
|
|
121
141
|
/**
|
|
122
142
|
* Chart container height as CSS value (v2.2.0, default '250px')
|
|
123
143
|
*/
|
|
@@ -750,9 +770,60 @@ export interface MapClusterOptions {
|
|
|
750
770
|
animateAddingMarkers?: boolean
|
|
751
771
|
}
|
|
752
772
|
|
|
773
|
+
/**
|
|
774
|
+
* GeoJSON feature popup configuration (v3.1.0)
|
|
775
|
+
*/
|
|
776
|
+
export interface MapPopupConfig {
|
|
777
|
+
/** Property key used as popup title */
|
|
778
|
+
titleField?: string
|
|
779
|
+
/** Property keys to display in popup body */
|
|
780
|
+
fields?: string[]
|
|
781
|
+
/** Custom HTML template (use {{property}} placeholders) */
|
|
782
|
+
template?: string
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* GeoJSON style configuration (v3.1.0)
|
|
787
|
+
* Supports static styles and choropleth (data-driven) coloring.
|
|
788
|
+
*/
|
|
789
|
+
export interface MapGeoJSONStyle {
|
|
790
|
+
/** Fill color (CSS color or choropleth config) */
|
|
791
|
+
fillColor?: string
|
|
792
|
+
/** Fill opacity (0-1, default: 0.6) */
|
|
793
|
+
fillOpacity?: number
|
|
794
|
+
/** Stroke color (default: '#333') */
|
|
795
|
+
strokeColor?: string
|
|
796
|
+
/** Stroke width (default: 1) */
|
|
797
|
+
strokeWeight?: number
|
|
798
|
+
/** Stroke opacity (0-1, default: 1) */
|
|
799
|
+
strokeOpacity?: number
|
|
800
|
+
/** Choropleth: property key for data-driven coloring */
|
|
801
|
+
choroplethField?: string
|
|
802
|
+
/** Choropleth: color scale stops [value, color][] sorted ascending */
|
|
803
|
+
choroplethScale?: Array<[number, string]>
|
|
804
|
+
/** Choropleth: color for features with missing/null values */
|
|
805
|
+
choroplethFallback?: string
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Named GeoJSON layer for multi-layer maps (v3.1.0)
|
|
810
|
+
*/
|
|
811
|
+
export interface MapLayer {
|
|
812
|
+
/** Layer name (shown in layer control) */
|
|
813
|
+
name: string
|
|
814
|
+
/** Is this layer visible by default? */
|
|
815
|
+
visible?: boolean
|
|
816
|
+
/** GeoJSON FeatureCollection (inline or from API) */
|
|
817
|
+
geojson: unknown // GeoJSON.FeatureCollection — kept as unknown for zero-dep types
|
|
818
|
+
/** Per-layer style override */
|
|
819
|
+
style?: MapGeoJSONStyle
|
|
820
|
+
/** Per-layer popup config */
|
|
821
|
+
popup?: MapPopupConfig
|
|
822
|
+
}
|
|
823
|
+
|
|
753
824
|
/**
|
|
754
825
|
* Map component parameters (Sprint 6)
|
|
755
|
-
* Updated
|
|
826
|
+
* Updated v3.1.0: GeoJSON, choropleth, popups, layers
|
|
756
827
|
*/
|
|
757
828
|
export interface MapComponentParams {
|
|
758
829
|
/**
|
|
@@ -776,7 +847,7 @@ export interface MapComponentParams {
|
|
|
776
847
|
height?: string
|
|
777
848
|
|
|
778
849
|
/**
|
|
779
|
-
* Auto-fit bounds to show all markers (default: false)
|
|
850
|
+
* Auto-fit bounds to show all markers/features (default: false)
|
|
780
851
|
*/
|
|
781
852
|
fitBounds?: boolean
|
|
782
853
|
|
|
@@ -802,9 +873,6 @@ export interface MapComponentParams {
|
|
|
802
873
|
|
|
803
874
|
/**
|
|
804
875
|
* Enable marker clustering (Sprint Ultimate U.2)
|
|
805
|
-
* - true: Enable with default options
|
|
806
|
-
* - false: Disable clustering
|
|
807
|
-
* - MapClusterOptions: Enable with custom options
|
|
808
876
|
*/
|
|
809
877
|
clustering?: boolean | MapClusterOptions
|
|
810
878
|
|
|
@@ -812,6 +880,77 @@ export interface MapComponentParams {
|
|
|
812
880
|
* Custom CSS class (Sprint 7)
|
|
813
881
|
*/
|
|
814
882
|
className?: string
|
|
883
|
+
|
|
884
|
+
// ─── GeoJSON (v3.1.0) ────────────────────
|
|
885
|
+
|
|
886
|
+
/**
|
|
887
|
+
* GeoJSON FeatureCollection to render on the map.
|
|
888
|
+
* Use this for polygons, lines, points from structured data.
|
|
889
|
+
*/
|
|
890
|
+
geojson?: unknown // GeoJSON.FeatureCollection
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Style for the GeoJSON layer.
|
|
894
|
+
* Supports static colors and choropleth (data-driven) coloring.
|
|
895
|
+
*/
|
|
896
|
+
geojsonStyle?: MapGeoJSONStyle
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* Popup configuration for GeoJSON features.
|
|
900
|
+
* Shown on feature click.
|
|
901
|
+
*/
|
|
902
|
+
popup?: MapPopupConfig
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* Named layers for multi-layer maps.
|
|
906
|
+
* Each layer has its own GeoJSON, style, and popup config.
|
|
907
|
+
* A Leaflet layer control is added when layers are present.
|
|
908
|
+
*/
|
|
909
|
+
layers?: MapLayer[]
|
|
910
|
+
|
|
911
|
+
// ─── PMTiles (v3.1.0) ────────────────────
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* PMTiles vector tile source for large datasets (>5000 features).
|
|
915
|
+
* Requires protomaps-leaflet peer dependency.
|
|
916
|
+
* Pipeline: GeoParquet -> Tippecanoe -> PMTiles (static file on S3/CDN).
|
|
917
|
+
*/
|
|
918
|
+
pmtiles?: MapPMTilesConfig
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* PMTiles configuration for large vector tile datasets (v3.1.0)
|
|
923
|
+
*/
|
|
924
|
+
export interface MapPMTilesConfig {
|
|
925
|
+
/** URL to the .pmtiles file (S3, CDN, local) */
|
|
926
|
+
url: string
|
|
927
|
+
/** Attribution text for this tile source */
|
|
928
|
+
attribution?: string
|
|
929
|
+
/** Style rules for vector features */
|
|
930
|
+
paintRules?: Array<{
|
|
931
|
+
/** Layer name in the PMTiles source */
|
|
932
|
+
dataLayer: string
|
|
933
|
+
/** Symbol type */
|
|
934
|
+
symbolizer: 'polygon' | 'line' | 'circle'
|
|
935
|
+
/** Fill/stroke color (CSS color or function name) */
|
|
936
|
+
color?: string
|
|
937
|
+
/** Stroke width */
|
|
938
|
+
width?: number
|
|
939
|
+
/** Fill opacity */
|
|
940
|
+
opacity?: number
|
|
941
|
+
}>
|
|
942
|
+
/** Label rules for text labels */
|
|
943
|
+
labelRules?: Array<{
|
|
944
|
+
dataLayer: string
|
|
945
|
+
/** Property key for label text */
|
|
946
|
+
textField: string
|
|
947
|
+
/** Font size */
|
|
948
|
+
fontSize?: number
|
|
949
|
+
}>
|
|
950
|
+
/** Max zoom level */
|
|
951
|
+
maxZoom?: number
|
|
952
|
+
/** Min zoom level */
|
|
953
|
+
minZoom?: number
|
|
815
954
|
}
|
|
816
955
|
|
|
817
956
|
/**
|