@seed-ship/mcp-ui-solid 4.3.4 → 4.3.6
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 +7 -0
- package/dist/components/UIResourceRenderer.cjs +9 -6
- package/dist/components/UIResourceRenderer.cjs.map +1 -1
- package/dist/components/UIResourceRenderer.d.ts.map +1 -1
- package/dist/components/UIResourceRenderer.js +9 -6
- package/dist/components/UIResourceRenderer.js.map +1 -1
- package/package.json +1 -1
- package/src/components/UIResourceRenderer.tsx +13 -7
- package/tsconfig.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -554,7 +554,7 @@ function TableRenderer(props: {
|
|
|
554
554
|
const exportable = tableParams.exportable
|
|
555
555
|
const exportFormats = typeof exportable === 'object' && exportable?.formats
|
|
556
556
|
? exportable.formats
|
|
557
|
-
: ['csv', '
|
|
557
|
+
: ['csv', 'json']
|
|
558
558
|
const exportFilename = (typeof exportable === 'object' && exportable?.filename) || `table-${Math.random().toString(36).slice(2, 9)}`
|
|
559
559
|
|
|
560
560
|
// Export dropdown state
|
|
@@ -638,9 +638,9 @@ function TableRenderer(props: {
|
|
|
638
638
|
}
|
|
639
639
|
|
|
640
640
|
return (
|
|
641
|
-
<ExpandableWrapper title={tableParams.title || 'Table'} copyData={
|
|
641
|
+
<ExpandableWrapper title={tableParams.title || 'Table'} copyData={getTableCSV()} copyLabel="Copy table (CSV)">
|
|
642
642
|
<div class="relative w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden group">
|
|
643
|
-
<Show when={exportable} fallback={<CopyButton getText={
|
|
643
|
+
<Show when={exportable} fallback={<CopyButton getText={getTableCSV} title="Copy table (CSV)" position="top-right" />}>
|
|
644
644
|
<div class="absolute right-10 top-2 z-10">
|
|
645
645
|
<button
|
|
646
646
|
onClick={() => setShowExportMenu(!showExportMenu())}
|
|
@@ -686,7 +686,7 @@ function TableRenderer(props: {
|
|
|
686
686
|
value={searchQuery()}
|
|
687
687
|
onInput={(e) => handleSearch(e.currentTarget.value)}
|
|
688
688
|
placeholder={searchPlaceholder()}
|
|
689
|
-
class="w-full pl-8 pr-8 py-1.5 text-sm border border-gray-200 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-400 focus:border-blue-400 focus:ring-1 focus:ring-blue-400 outline-none"
|
|
689
|
+
class="w-full max-w-xs min-w-[200px] pl-8 pr-8 py-1.5 text-sm border border-gray-200 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-400 focus:border-blue-400 focus:ring-1 focus:ring-blue-400 outline-none"
|
|
690
690
|
/>
|
|
691
691
|
<Show when={searchQuery()}>
|
|
692
692
|
<button
|
|
@@ -707,7 +707,13 @@ function TableRenderer(props: {
|
|
|
707
707
|
<div
|
|
708
708
|
ref={scrollContainerRef}
|
|
709
709
|
class="overflow-x-auto"
|
|
710
|
-
style={
|
|
710
|
+
style={
|
|
711
|
+
isVirtualizing()
|
|
712
|
+
? { 'max-height': '500px', 'overflow-y': 'auto' }
|
|
713
|
+
: clientVisibleRows().length > 8
|
|
714
|
+
? { 'max-height': isExpanded() ? '70vh' : '400px', 'overflow-y': 'auto' }
|
|
715
|
+
: {}
|
|
716
|
+
}
|
|
711
717
|
role="region"
|
|
712
718
|
aria-label={tableParams.title || 'Data table'}
|
|
713
719
|
tabindex="0"
|
|
@@ -716,13 +722,13 @@ function TableRenderer(props: {
|
|
|
716
722
|
class="min-w-full divide-y divide-gray-200 dark:divide-gray-700 border-separate border-spacing-0"
|
|
717
723
|
aria-labelledby={tableParams.title ? `${tableId}-title` : undefined}
|
|
718
724
|
>
|
|
719
|
-
<thead class="bg-gray-50 dark:bg-gray-900
|
|
725
|
+
<thead class="bg-gray-50 dark:bg-gray-900 sticky top-0 z-10">
|
|
720
726
|
<tr>
|
|
721
727
|
<For each={tableParams.columns}>
|
|
722
728
|
{(column: any) => (
|
|
723
729
|
<th
|
|
724
730
|
scope="col"
|
|
725
|
-
class="px-6 py-3 text-left text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider border-b border-gray-200 dark:border-gray-700 first:pl-6 last:pr-6 bg-gray-50 dark:bg-gray-900
|
|
731
|
+
class="px-6 py-3 text-left text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider border-b border-gray-200 dark:border-gray-700 first:pl-6 last:pr-6 bg-gray-50 dark:bg-gray-900 cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"
|
|
726
732
|
style={column.width ? { width: column.width } : {}}
|
|
727
733
|
on:click={() => handleSort(column.key)}
|
|
728
734
|
title={`Sort by ${column.label}`}
|