@marimo-team/islands 0.23.11-dev24 → 0.23.11-dev26

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.
@@ -25758,10 +25758,10 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
25758
25758
  });
25759
25759
  }), Objects.entries(t);
25760
25760
  };
25761
- generateColumns = function({ rowHeaders: e, selection: t, fieldTypes: n, chartSpecModel: i, textJustifyColumns: o, wrappedColumns: s, headerTooltip: c, showDataTypes: d, calculateTopKRows: f, fractionDigitsByColumn: h }) {
25762
- let _ = new Set(e.map(([e2]) => e2)), v = Maps.keyBy(n, (e2) => e2[0]), y = (t2) => {
25761
+ generateColumns = function({ rowHeaders: e, selection: t, fieldTypes: n, chartSpecModel: i, textJustifyColumns: o, wrappedColumns: s, headerTooltip: c, showDataTypes: d, calculateTopKRows: f, fractionDigitsByColumn: h, columnWidths: _ }) {
25762
+ let v = new Set(e.map(([e2]) => e2)), y = Maps.keyBy(n, (e2) => e2[0]), S = (t2) => {
25763
25763
  var _a2, _b;
25764
- let n2 = (_a2 = v.get(t2)) == null ? void 0 : _a2[1], i2 = _.has(t2);
25764
+ let n2 = (_a2 = y.get(t2)) == null ? void 0 : _a2[1], i2 = v.has(t2);
25765
25765
  if (i2 || !n2) {
25766
25766
  let n3 = (_b = e.find(([e2]) => e2 === t2)) == null ? void 0 : _b[1];
25767
25767
  return {
@@ -25778,22 +25778,22 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
25778
25778
  dataType: n2[0],
25779
25779
  minFractionDigits: h == null ? void 0 : h[t2]
25780
25780
  };
25781
- }, S = (e2) => {
25781
+ }, w = (e2) => {
25782
25782
  if (o == null ? void 0 : o[e2]) return o[e2];
25783
- let t2 = y(e2).dataType;
25783
+ let t2 = S(e2).dataType;
25784
25784
  if (isNumericType(t2)) return "right";
25785
- }, w = [
25786
- ..._,
25785
+ }, E = [
25786
+ ...v,
25787
25787
  ...n.map(([e2]) => e2)
25788
- ], E = w.indexOf(INDEX_COLUMN_NAME);
25789
- E !== -1 && w.splice(E, 1);
25790
- let O = w.map((e2, n2) => ({
25788
+ ], O = E.indexOf(INDEX_COLUMN_NAME);
25789
+ O !== -1 && E.splice(O, 1);
25790
+ let A = E.map((e2, n2) => ({
25791
25791
  id: e2 || `__m_column__${n2}`,
25792
25792
  accessorFn: (t2) => t2[e2],
25793
- enableHiding: !_.has(e2) && e2 !== "",
25793
+ enableHiding: !v.has(e2) && e2 !== "",
25794
25794
  header: ({ column: t2, table: n3 }) => {
25795
25795
  var _a2;
25796
- let s2 = i == null ? void 0 : i.getColumnStats(e2), h2 = (_a2 = t2.columnDef.meta) == null ? void 0 : _a2.dtype, v2 = c == null ? void 0 : c[e2], y2 = o == null ? void 0 : o[e2], S2 = d && h2 ? (0, import_jsx_runtime.jsxs)("div", {
25796
+ let s2 = i == null ? void 0 : i.getColumnStats(e2), h2 = (_a2 = t2.columnDef.meta) == null ? void 0 : _a2.dtype, _2 = c == null ? void 0 : c[e2], y2 = o == null ? void 0 : o[e2], S2 = d && h2 ? (0, import_jsx_runtime.jsxs)("div", {
25797
25797
  className: cn("flex flex-row gap-1", y2 === "center" && "justify-center", y2 === "right" && "justify-end"),
25798
25798
  children: [
25799
25799
  (0, import_jsx_runtime.jsx)("span", {
@@ -25810,11 +25810,11 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
25810
25810
  })
25811
25811
  ]
25812
25812
  }) : null, w2 = (0, import_jsx_runtime.jsx)("span", {
25813
- className: cn("font-bold", v2 && "underline decoration-dotted"),
25813
+ className: cn("font-bold", _2 && "underline decoration-dotted"),
25814
25814
  children: e2 === "" ? " " : e2
25815
25815
  }), E2 = (0, import_jsx_runtime.jsx)(DataTableColumnHeader, {
25816
- header: v2 ? (0, import_jsx_runtime.jsx)(Tooltip, {
25817
- content: v2,
25816
+ header: _2 ? (0, import_jsx_runtime.jsx)(Tooltip, {
25817
+ content: _2,
25818
25818
  delayDuration: 300,
25819
25819
  children: w2
25820
25820
  }) : w2,
@@ -25824,7 +25824,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
25824
25824
  calculateTopKRows: f,
25825
25825
  table: n3
25826
25826
  });
25827
- return _.has(e2) ? E2 : (0, import_jsx_runtime.jsxs)("div", {
25827
+ return v.has(e2) ? E2 : (0, import_jsx_runtime.jsxs)("div", {
25828
25828
  className: cn("flex flex-col h-full pt-0.5 pb-3 justify-between items-start", y2 === "center" && "items-center", y2 === "right" && "items-end"),
25829
25829
  children: [
25830
25830
  E2,
@@ -25840,7 +25840,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
25840
25840
  var _a3;
25841
25841
  t !== "single-cell" && t !== "multi-cell" || ((_a3 = o2.toggleSelected) == null ? void 0 : _a3.call(o2));
25842
25842
  }
25843
- let d2 = S(e2), f2 = s == null ? void 0 : s.includes(e2), h2 = ((_a2 = o2 == null ? void 0 : o2.getIsSelected) == null ? void 0 : _a2.call(o2)) || false, v2 = (t === "single-cell" || t === "multi-cell") && !h2, y2 = (_b = n3.columnDef.meta) == null ? void 0 : _b.dataType, w2 = renderCellValue({
25843
+ let d2 = w(e2), f2 = s == null ? void 0 : s.includes(e2), h2 = ((_a2 = o2 == null ? void 0 : o2.getIsSelected) == null ? void 0 : _a2.call(o2)) || false, _2 = (t === "single-cell" || t === "multi-cell") && !h2, y2 = (_b = n3.columnDef.meta) == null ? void 0 : _b.dataType, S2 = renderCellValue({
25844
25844
  column: n3,
25845
25845
  renderValue: i2,
25846
25846
  getValue: a,
@@ -25848,20 +25848,28 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
25848
25848
  cellStyles: getCellStyleClass({
25849
25849
  justify: d2,
25850
25850
  wrapped: f2,
25851
- canSelectCell: v2,
25851
+ canSelectCell: _2,
25852
25852
  isSelected: h2,
25853
25853
  isNumeric: isNumericType(y2)
25854
25854
  })
25855
25855
  });
25856
- return _.has(e2) ? (0, import_jsx_runtime.jsx)("b", {
25857
- children: w2
25858
- }) : w2;
25856
+ return v.has(e2) ? (0, import_jsx_runtime.jsx)("b", {
25857
+ children: S2
25858
+ }) : S2;
25859
25859
  },
25860
25860
  filterFn: void 0,
25861
25861
  enableSorting: !!e2,
25862
- meta: y(e2)
25862
+ meta: {
25863
+ ...S(e2),
25864
+ width: _ == null ? void 0 : _[e2]
25865
+ },
25866
+ ...(_ == null ? void 0 : _[e2]) === void 0 ? {} : {
25867
+ size: _[e2],
25868
+ minSize: _[e2],
25869
+ maxSize: _[e2]
25870
+ }
25863
25871
  }));
25864
- return (t === "single" || t === "multi") && O.unshift({
25872
+ return (t === "single" || t === "multi") && A.unshift({
25865
25873
  id: "__select__",
25866
25874
  maxSize: 40,
25867
25875
  header: ({ table: e2 }) => t === "multi" ? (0, import_jsx_runtime.jsx)(Checkbox, {
@@ -25883,7 +25891,7 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
25883
25891
  }),
25884
25892
  enableSorting: false,
25885
25893
  enableHiding: false
25886
- }), O;
25894
+ }), A;
25887
25895
  };
25888
25896
  var PopoutColumn = ({ cellStyles: e, selectCell: t, rawStringValue: n, edges: i, contentClassName: o, buttonText: s, wrapped: c, children: d }) => {
25889
25897
  let f = i !== void 0 && (i.leading.length > 0 || i.trailing.length > 0) ? n.slice(i.leading.length, n.length - i.trailing.length) : n;
@@ -32633,14 +32641,14 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
32633
32641
  }), M = useTableHoverTooltip({
32634
32642
  table: e
32635
32643
  }), I = (e2) => e2.map((e3) => {
32636
- var _a2, _b, _c;
32637
- let { className: t2, style: n2 } = getPinningStyles(e3.column), i2 = Object.assign({}, ((_a2 = e3.getUserStyling) == null ? void 0 : _a2.call(e3)) || {}, n2);
32644
+ var _a2, _b, _c, _d;
32645
+ let { className: t2, style: n2 } = getPinningStyles(e3.column), i2 = (_a2 = e3.column.columnDef.meta) == null ? void 0 : _a2.width, o2 = Object.assign({}, ((_b = e3.getUserStyling) == null ? void 0 : _b.call(e3)) || {}, n2);
32638
32646
  return (0, import_react.createElement)(TableCell, {
32639
32647
  tabIndex: 0,
32640
32648
  ...getCellDomProps(e3.id),
32641
32649
  key: e3.id,
32642
- className: cn("whitespace-pre truncate max-w-[300px] outline-hidden border-r border-r-border/75", e3.column.getColumnWrapping && ((_c = (_b = e3.column).getColumnWrapping) == null ? void 0 : _c.call(_b)) === "wrap" && "whitespace-pre-wrap min-w-[200px]", "px-1.5 py-[0.18rem]", t2),
32643
- style: i2,
32650
+ className: cn("whitespace-pre truncate outline-hidden border-r border-r-border/75", !i2 && "max-w-[300px]", e3.column.getColumnWrapping && ((_d = (_c = e3.column).getColumnWrapping) == null ? void 0 : _d.call(_c)) === "wrap" && "whitespace-pre-wrap min-w-[200px]", "px-1.5 py-[0.18rem]", t2),
32651
+ style: o2,
32644
32652
  onMouseDown: (t3) => {
32645
32653
  v(t3, e3), M.hideTooltip();
32646
32654
  },
@@ -32739,7 +32747,8 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
32739
32747
  });
32740
32748
  };
32741
32749
  function getPinningStyles(e) {
32742
- let t = e.getIsPinned(), n = t === "left" && e.getIsLastColumn("left"), i = t === "right" && e.getIsFirstColumn("right");
32750
+ var _a2;
32751
+ let t = e.getIsPinned(), n = t === "left" && e.getIsLastColumn("left"), i = t === "right" && e.getIsFirstColumn("right"), o = (_a2 = e.columnDef.meta) == null ? void 0 : _a2.width;
32743
32752
  return {
32744
32753
  className: cn(t && "bg-inherit", "shadow-r z-10"),
32745
32754
  style: {
@@ -32749,7 +32758,11 @@ Database schema: ${n}`), (_a3 = t2.aiFix) == null ? void 0 : _a3.setAiCompletion
32749
32758
  opacity: 1,
32750
32759
  position: t ? "sticky" : "relative",
32751
32760
  zIndex: t ? 1 : 0,
32752
- width: e.getSize()
32761
+ width: e.getSize(),
32762
+ ...o ? {
32763
+ minWidth: o,
32764
+ maxWidth: o
32765
+ } : {}
32753
32766
  }
32754
32767
  };
32755
32768
  }
@@ -35983,7 +35996,7 @@ ${d}`,
35983
35996
  return Logger.warn("Failed to get version from mount config"), null;
35984
35997
  }
35985
35998
  }
35986
- marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.11-dev24");
35999
+ marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.11-dev26");
35987
36000
  showCodeInRunModeAtom = atom(true);
35988
36001
  atom(null);
35989
36002
  var import_compiler_runtime = require_compiler_runtime();