@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.
@@ -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;AAs/BD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,CAAC,uBAAuB,CA6GjE,CAAA"}
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 clientPageSize = () => tableParams.pageSize ?? 25;
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", "tsv", "json"];
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 getTableText();
550
+ return getTableCSV();
548
551
  },
549
- copyLabel: "Copy table (TSV)",
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: getTableText,
557
- title: "Copy table data",
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);