@seed-ship/mcp-ui-solid 4.3.3 → 4.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/CHANGELOG.md +20 -0
- package/dist/components/ExpandableWrapper.cjs +9 -1
- package/dist/components/ExpandableWrapper.cjs.map +1 -1
- package/dist/components/ExpandableWrapper.d.ts +3 -1
- package/dist/components/ExpandableWrapper.d.ts.map +1 -1
- package/dist/components/ExpandableWrapper.js +11 -3
- package/dist/components/ExpandableWrapper.js.map +1 -1
- package/dist/components/UIResourceRenderer.cjs +12 -6
- package/dist/components/UIResourceRenderer.cjs.map +1 -1
- package/dist/components/UIResourceRenderer.d.ts.map +1 -1
- package/dist/components/UIResourceRenderer.js +13 -7
- package/dist/components/UIResourceRenderer.js.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
- package/src/components/ExpandableWrapper.tsx +10 -2
- package/src/components/UIResourceRenderer.tsx +16 -7
- package/src/index.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UIResourceRenderer.d.ts","sourceRoot":"","sources":["../../src/components/UIResourceRenderer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,SAAS,EAAqD,MAAM,UAAU,CAAA;AAEvF,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAA0B,MAAM,UAAU,CAAA;AAgE5F;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,OAAO,EAAE,WAAW,GAAG,QAAQ,CAAA;IAE/B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IAExC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAiJD;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CA4ElD;
|
|
1
|
+
{"version":3,"file":"UIResourceRenderer.d.ts","sourceRoot":"","sources":["../../src/components/UIResourceRenderer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,SAAS,EAAqD,MAAM,UAAU,CAAA;AAEvF,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAA0B,MAAM,UAAU,CAAA;AAgE5F;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,OAAO,EAAE,WAAW,GAAG,QAAQ,CAAA;IAE/B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IAExC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAiJD;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CA4ElD;AA+/BD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,CAAC,uBAAuB,CA6GjE,CAAA"}
|
|
@@ -15,7 +15,7 @@ import { ImageGalleryRenderer } from "./ImageGalleryRenderer.js";
|
|
|
15
15
|
import { VideoRenderer } from "./VideoRenderer.js";
|
|
16
16
|
import { CodeBlockRenderer } from "./CodeBlockRenderer.js";
|
|
17
17
|
import { MapRenderer } from "./MapRenderer.js";
|
|
18
|
-
import { ExpandableWrapper } from "./ExpandableWrapper.js";
|
|
18
|
+
import { useExpanded, ExpandableWrapper } from "./ExpandableWrapper.js";
|
|
19
19
|
import { RenderProvider } from "./RenderContext.js";
|
|
20
20
|
import { useAction } from "../hooks/useAction.js";
|
|
21
21
|
import { marked as k } from "../node_modules/.pnpm/marked@16.4.2/node_modules/marked/lib/marked.esm.js";
|
|
@@ -335,7 +335,10 @@ function TableRenderer(props) {
|
|
|
335
335
|
return normalize(String(val)).includes(q);
|
|
336
336
|
}));
|
|
337
337
|
});
|
|
338
|
-
const
|
|
338
|
+
const isExpanded = useExpanded();
|
|
339
|
+
const fullPageSize = () => tableParams.pageSize ?? 25;
|
|
340
|
+
const chatPageSize = () => tableParams.chatPageSize ?? Math.min(10, fullPageSize());
|
|
341
|
+
const clientPageSize = () => isExpanded() ? fullPageSize() : chatPageSize();
|
|
339
342
|
const hasServerPagination = () => !!tableParams.pagination;
|
|
340
343
|
const isProgressiveMode = () => !!tableParams.showAllLabel;
|
|
341
344
|
const needsClientPagination = () => !hasServerPagination() && clientPageSize() > 0 && filteredRows().length > clientPageSize();
|
|
@@ -454,7 +457,7 @@ ${dataRows}`;
|
|
|
454
457
|
URL.revokeObjectURL(url);
|
|
455
458
|
};
|
|
456
459
|
const exportable = tableParams.exportable;
|
|
457
|
-
const exportFormats = typeof exportable === "object" && (exportable == null ? void 0 : exportable.formats) ? exportable.formats : ["csv", "
|
|
460
|
+
const exportFormats = typeof exportable === "object" && (exportable == null ? void 0 : exportable.formats) ? exportable.formats : ["csv", "json"];
|
|
458
461
|
const exportFilename = typeof exportable === "object" && (exportable == null ? void 0 : exportable.filename) || `table-${Math.random().toString(36).slice(2, 9)}`;
|
|
459
462
|
const [showExportMenu, setShowExportMenu] = createSignal(false);
|
|
460
463
|
const handleExport = (format) => {
|
|
@@ -544,17 +547,17 @@ ${dataRows}`;
|
|
|
544
547
|
return tableParams.title || "Table";
|
|
545
548
|
},
|
|
546
549
|
get copyData() {
|
|
547
|
-
return
|
|
550
|
+
return getTableCSV();
|
|
548
551
|
},
|
|
549
|
-
copyLabel: "Copy table (
|
|
552
|
+
copyLabel: "Copy table (CSV)",
|
|
550
553
|
get children() {
|
|
551
554
|
var _el$29 = getNextElement(_tmpl$26), _el$142 = _el$29.firstChild, [_el$143, _co$35] = getNextMarker(_el$142.nextSibling), _el$44 = _el$143.nextSibling, _el$132 = _el$44.firstChild, [_el$133, _co$30] = getNextMarker(_el$132.nextSibling), _el$134 = _el$133.nextSibling, [_el$135, _co$31] = getNextMarker(_el$134.nextSibling), _el$70 = _el$135.nextSibling, _el$71 = _el$70.firstChild, _el$72 = _el$71.firstChild, _el$73 = _el$72.firstChild, _el$74 = _el$72.nextSibling, [_el$75, _co$14] = getNextMarker(_el$74.nextSibling), _el$136 = _el$70.nextSibling, [_el$137, _co$32] = getNextMarker(_el$136.nextSibling), _el$138 = _el$137.nextSibling, [_el$139, _co$33] = getNextMarker(_el$138.nextSibling), _el$140 = _el$139.nextSibling, [_el$141, _co$34] = getNextMarker(_el$140.nextSibling);
|
|
552
555
|
insert(_el$29, createComponent(Show, {
|
|
553
556
|
when: exportable,
|
|
554
557
|
get fallback() {
|
|
555
558
|
return createComponent(CopyButton, {
|
|
556
|
-
getText:
|
|
557
|
-
title: "Copy table
|
|
559
|
+
getText: getTableCSV,
|
|
560
|
+
title: "Copy table (CSV)",
|
|
558
561
|
position: "top-right"
|
|
559
562
|
});
|
|
560
563
|
},
|
|
@@ -783,6 +786,9 @@ ${dataRows}`;
|
|
|
783
786
|
var _v$0 = isVirtualizing() ? {
|
|
784
787
|
"max-height": "500px",
|
|
785
788
|
"overflow-y": "auto"
|
|
789
|
+
} : clientVisibleRows().length > 8 ? {
|
|
790
|
+
"max-height": isExpanded() ? "70vh" : "400px",
|
|
791
|
+
"overflow-y": "auto"
|
|
786
792
|
} : {}, _v$1 = tableParams.title || "Data table", _v$10 = tableParams.title ? `${tableId}-title` : void 0;
|
|
787
793
|
_p$.e = style(_el$70, _v$0, _p$.e);
|
|
788
794
|
_v$1 !== _p$.t && setAttribute(_el$70, "aria-label", _p$.t = _v$1);
|