@ai-matrx/design-system 0.21.4 → 0.21.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/data-table/copy-helpers.d.cts +1 -1
  3. package/dist/data-table/copy-helpers.d.ts +1 -1
  4. package/dist/data-table/filter-engine.d.cts +1 -1
  5. package/dist/data-table/filter-engine.d.ts +1 -1
  6. package/dist/data-table/host.d.cts +1 -1
  7. package/dist/data-table/host.d.ts +1 -1
  8. package/dist/data-table/index.cjs +75 -22
  9. package/dist/data-table/index.cjs.map +1 -1
  10. package/dist/data-table/index.d.cts +10 -3
  11. package/dist/data-table/index.d.ts +10 -3
  12. package/dist/data-table/index.js +75 -22
  13. package/dist/data-table/index.js.map +1 -1
  14. package/dist/data-table/infer-filter.cjs +16 -0
  15. package/dist/data-table/infer-filter.cjs.map +1 -1
  16. package/dist/data-table/infer-filter.d.cts +1 -1
  17. package/dist/data-table/infer-filter.d.ts +1 -1
  18. package/dist/data-table/infer-filter.js +16 -0
  19. package/dist/data-table/infer-filter.js.map +1 -1
  20. package/dist/data-table/layered-filters.d.cts +1 -1
  21. package/dist/data-table/layered-filters.d.ts +1 -1
  22. package/dist/data-table/query-control.cjs +19 -0
  23. package/dist/data-table/query-control.cjs.map +1 -1
  24. package/dist/data-table/query-control.d.cts +1 -1
  25. package/dist/data-table/query-control.d.ts +1 -1
  26. package/dist/data-table/query-control.js +19 -0
  27. package/dist/data-table/query-control.js.map +1 -1
  28. package/dist/data-table/types.cjs.map +1 -1
  29. package/dist/data-table/types.d.cts +1 -1
  30. package/dist/data-table/types.d.ts +1 -1
  31. package/dist/data-table/url-state.d.cts +1 -1
  32. package/dist/data-table/url-state.d.ts +1 -1
  33. package/dist/data-table/xlsx.d.cts +1 -1
  34. package/dist/data-table/xlsx.d.ts +1 -1
  35. package/dist/{types-CbGNfo7r.d.ts → types-Dpl8OW_m.d.ts} +17 -1
  36. package/dist/{types-DRusLYrU.d.cts → types-DsmrqJHN.d.cts} +17 -1
  37. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { h as MatrxDataTableProps, i as TableViewSnapshot, c as MatrxDataTableRecordControls } from '../types-DRusLYrU.cjs';
4
- export { A as AnyOfColumnSearch, j as CellEditType, k as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, M as MatrxColumnDef, l as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, d as MatrxDataTableDensity, m as MatrxDataTableDetailConfig, n as MatrxDataTableEditConfig, o as MatrxDataTableEmptyState, p as MatrxDataTableFilterUi, q as MatrxDataTableHierarchyConfig, r as MatrxDataTableHierarchyMove, s as MatrxDataTableMobileCardControls, t as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, u as MatrxDataTableSelectionConfig, v as MatrxDataTableSourceProcessing, w as MatrxDataTableToolbar, x as MatrxDataTableUrlStateConfig, y as MatrxDataTableWindowConfig, z as MatrxTablePagination, B as SortDirection, S as SortState, b as TableSavedViewsProps, T as TableSearchMatchMode, D as TableViewQuery, E as TextFilterMode, F as ToolbarFacet } from '../types-DRusLYrU.cjs';
3
+ import { h as MatrxDataTableProps, i as TableViewSnapshot, c as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-DsmrqJHN.cjs';
4
+ export { A as AnyOfColumnSearch, k as CellEditType, l as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, m as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, d as MatrxDataTableDensity, n as MatrxDataTableDetailConfig, o as MatrxDataTableEditConfig, p as MatrxDataTableEmptyState, q as MatrxDataTableFilterUi, r as MatrxDataTableHierarchyConfig, s as MatrxDataTableHierarchyMove, t as MatrxDataTableMobileCardControls, u as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, v as MatrxDataTableSelectionConfig, w as MatrxDataTableSourceProcessing, x as MatrxDataTableToolbar, y as MatrxDataTableUrlStateConfig, z as MatrxDataTableWindowConfig, B as MatrxTablePagination, D as SortDirection, S as SortState, b as TableSavedViewsProps, T as TableSearchMatchMode, E as TableViewQuery, F as TextFilterMode, G as ToolbarFacet } from '../types-DsmrqJHN.cjs';
5
5
  export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableDoors, TableEntityRefProps, TableLinkProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.cjs';
6
6
  import { CopyControlProps } from './copy-types.cjs';
7
7
  export { AgentPayloadInput } from './copy-types.cjs';
@@ -78,6 +78,13 @@ declare function MatrxTableRowAlchemyProvider({ copy, placement, controls, child
78
78
  children: ReactNode;
79
79
  }): React.JSX.Element;
80
80
 
81
+ type ResolvedColumnMarker = Exclude<ColumnMarker, false>;
82
+ /**
83
+ * Resolve the semantic without guessing from partial names. A field such as
84
+ * `favorite_count` is not a marker; consumers can always opt in explicitly.
85
+ */
86
+ declare function resolveColumnMarker<T>(column: MatrxColumnDef<T>): ResolvedColumnMarker | undefined;
87
+
81
88
  interface TableViewTab {
82
89
  id: string;
83
90
  label: string;
@@ -96,4 +103,4 @@ interface TableViewTabsProps {
96
103
  /** One shared tab strip; hosts may own URL state without copying its UI. */
97
104
  declare function TableViewTabs({ tabs, activeId, onSelect, onAdd, onClose, onRename, related }: TableViewTabsProps): React.JSX.Element;
98
105
 
99
- export { MatrxDataTable, MatrxDataTableProps, MatrxDataTableRecordControls, MatrxTableRowAlchemyProvider, SavedViewsControl, type SavedViewsControlProps, TableTitleRow, type TableTitleRowProps, TableViewSnapshot, type TableViewTab, TableViewTabs, type TableViewTabsProps, parseTableViewSnapshot };
106
+ export { ColumnMarker, MatrxColumnDef, MatrxDataTable, MatrxDataTableProps, MatrxDataTableRecordControls, MatrxTableRowAlchemyProvider, type ResolvedColumnMarker, SavedViewsControl, type SavedViewsControlProps, TableTitleRow, type TableTitleRowProps, TableViewSnapshot, type TableViewTab, TableViewTabs, type TableViewTabsProps, parseTableViewSnapshot, resolveColumnMarker };
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { h as MatrxDataTableProps, i as TableViewSnapshot, c as MatrxDataTableRecordControls } from '../types-CbGNfo7r.js';
4
- export { A as AnyOfColumnSearch, j as CellEditType, k as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, M as MatrxColumnDef, l as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, d as MatrxDataTableDensity, m as MatrxDataTableDetailConfig, n as MatrxDataTableEditConfig, o as MatrxDataTableEmptyState, p as MatrxDataTableFilterUi, q as MatrxDataTableHierarchyConfig, r as MatrxDataTableHierarchyMove, s as MatrxDataTableMobileCardControls, t as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, u as MatrxDataTableSelectionConfig, v as MatrxDataTableSourceProcessing, w as MatrxDataTableToolbar, x as MatrxDataTableUrlStateConfig, y as MatrxDataTableWindowConfig, z as MatrxTablePagination, B as SortDirection, S as SortState, b as TableSavedViewsProps, T as TableSearchMatchMode, D as TableViewQuery, E as TextFilterMode, F as ToolbarFacet } from '../types-CbGNfo7r.js';
3
+ import { h as MatrxDataTableProps, i as TableViewSnapshot, c as MatrxDataTableRecordControls, j as ColumnMarker, M as MatrxColumnDef } from '../types-Dpl8OW_m.js';
4
+ export { A as AnyOfColumnSearch, k as CellEditType, l as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, m as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, d as MatrxDataTableDensity, n as MatrxDataTableDetailConfig, o as MatrxDataTableEditConfig, p as MatrxDataTableEmptyState, q as MatrxDataTableFilterUi, r as MatrxDataTableHierarchyConfig, s as MatrxDataTableHierarchyMove, t as MatrxDataTableMobileCardControls, u as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, v as MatrxDataTableSelectionConfig, w as MatrxDataTableSourceProcessing, x as MatrxDataTableToolbar, y as MatrxDataTableUrlStateConfig, z as MatrxDataTableWindowConfig, B as MatrxTablePagination, D as SortDirection, S as SortState, b as TableSavedViewsProps, T as TableSearchMatchMode, E as TableViewQuery, F as TextFilterMode, G as ToolbarFacet } from '../types-Dpl8OW_m.js';
5
5
  export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableDoors, TableEntityRefProps, TableLinkProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.js';
6
6
  import { CopyControlProps } from './copy-types.js';
7
7
  export { AgentPayloadInput } from './copy-types.js';
@@ -78,6 +78,13 @@ declare function MatrxTableRowAlchemyProvider({ copy, placement, controls, child
78
78
  children: ReactNode;
79
79
  }): React.JSX.Element;
80
80
 
81
+ type ResolvedColumnMarker = Exclude<ColumnMarker, false>;
82
+ /**
83
+ * Resolve the semantic without guessing from partial names. A field such as
84
+ * `favorite_count` is not a marker; consumers can always opt in explicitly.
85
+ */
86
+ declare function resolveColumnMarker<T>(column: MatrxColumnDef<T>): ResolvedColumnMarker | undefined;
87
+
81
88
  interface TableViewTab {
82
89
  id: string;
83
90
  label: string;
@@ -96,4 +103,4 @@ interface TableViewTabsProps {
96
103
  /** One shared tab strip; hosts may own URL state without copying its UI. */
97
104
  declare function TableViewTabs({ tabs, activeId, onSelect, onAdd, onClose, onRename, related }: TableViewTabsProps): React.JSX.Element;
98
105
 
99
- export { MatrxDataTable, MatrxDataTableProps, MatrxDataTableRecordControls, MatrxTableRowAlchemyProvider, SavedViewsControl, type SavedViewsControlProps, TableTitleRow, type TableTitleRowProps, TableViewSnapshot, type TableViewTab, TableViewTabs, type TableViewTabsProps, parseTableViewSnapshot };
106
+ export { ColumnMarker, MatrxColumnDef, MatrxDataTable, MatrxDataTableProps, MatrxDataTableRecordControls, MatrxTableRowAlchemyProvider, type ResolvedColumnMarker, SavedViewsControl, type SavedViewsControlProps, TableTitleRow, type TableTitleRowProps, TableViewSnapshot, type TableViewTab, TableViewTabs, type TableViewTabsProps, parseTableViewSnapshot, resolveColumnMarker };
@@ -5783,6 +5783,34 @@ var CommandShortcut = ({
5783
5783
  };
5784
5784
  CommandShortcut.displayName = "CommandShortcut";
5785
5785
 
5786
+ // src/data-table/column-marker.ts
5787
+ var MARKER_ACCESSORS = {
5788
+ favorite: "favorite",
5789
+ is_favorite: "favorite",
5790
+ favourite: "favorite",
5791
+ is_favourite: "favorite",
5792
+ pinned: "pin",
5793
+ is_pinned: "pin"
5794
+ };
5795
+ function resolveColumnMarker(column) {
5796
+ if (column.marker === false) return void 0;
5797
+ if (column.marker) return column.marker;
5798
+ return column.accessorKey ? MARKER_ACCESSORS[column.accessorKey] : void 0;
5799
+ }
5800
+ function markerCopy(marker) {
5801
+ return marker === "favorite" ? {
5802
+ label: "Favorites",
5803
+ lowerLabel: "favorites",
5804
+ onlyLabel: "Favorites only",
5805
+ notLabel: "Not favorites"
5806
+ } : {
5807
+ label: "Pins",
5808
+ lowerLabel: "pins",
5809
+ onlyLabel: "Pins only",
5810
+ notLabel: "Not pinned"
5811
+ };
5812
+ }
5813
+
5786
5814
  // src/data-table/ColumnHeaderCell.tsx
5787
5815
  import { Fragment as Fragment4, jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
5788
5816
  var HeaderButton = forwardRef12(({ dragDescription, "aria-describedby": tooltipDescription, ...props }, ref) => {
@@ -5815,6 +5843,7 @@ function ColumnHeaderCell({
5815
5843
  align = "left",
5816
5844
  className,
5817
5845
  compact = false,
5846
+ marker,
5818
5847
  filterApplyLabel,
5819
5848
  filterShowCancel = false,
5820
5849
  filterFooterHint,
@@ -5866,7 +5895,9 @@ function ColumnHeaderCell({
5866
5895
  if (deferredFilter) setDraftFilter(next);
5867
5896
  else onFilterChange(next);
5868
5897
  };
5869
- const menuLabel = labelText ? `Sort or filter ${labelText}` : "Sort or filter column";
5898
+ const markerLabels = marker ? markerCopy(marker) : void 0;
5899
+ const accessibleLabel = markerLabels?.label ?? labelText;
5900
+ const menuLabel = accessibleLabel ? `Sort or filter ${accessibleLabel}` : "Sort or filter column";
5870
5901
  const menuContent = /* @__PURE__ */ jsxs22(
5871
5902
  PopoverContent,
5872
5903
  {
@@ -5895,7 +5926,7 @@ function ColumnHeaderCell({
5895
5926
  onClick: onSortAsc,
5896
5927
  children: [
5897
5928
  /* @__PURE__ */ jsx31(ArrowUp, { className: "h-3.5 w-3.5" }),
5898
- "Sort ascending"
5929
+ markerLabels ? `${markerLabels.label} last` : "Sort ascending"
5899
5930
  ]
5900
5931
  }
5901
5932
  ),
@@ -5908,7 +5939,7 @@ function ColumnHeaderCell({
5908
5939
  onClick: onSortDesc,
5909
5940
  children: [
5910
5941
  /* @__PURE__ */ jsx31(ArrowDown, { className: "h-3.5 w-3.5" }),
5911
- "Sort descending"
5942
+ markerLabels ? `${markerLabels.label} first` : "Sort descending"
5912
5943
  ]
5913
5944
  }
5914
5945
  ),
@@ -5921,7 +5952,7 @@ function ColumnHeaderCell({
5921
5952
  onClick: onClearSort,
5922
5953
  children: [
5923
5954
  /* @__PURE__ */ jsx31(ListX, { className: "h-3.5 w-3.5" }),
5924
- "Clear sort"
5955
+ markerLabels ? `Clear ${markerLabels.lowerLabel} sort` : "Clear sort"
5925
5956
  ]
5926
5957
  }
5927
5958
  ) : null
@@ -5940,6 +5971,13 @@ function ColumnHeaderCell({
5940
5971
  },
5941
5972
  selectOptions,
5942
5973
  selectSingle,
5974
+ ...markerLabels ? {
5975
+ booleanLabels: {
5976
+ all: "All",
5977
+ true: markerLabels.onlyLabel,
5978
+ false: markerLabels.notLabel
5979
+ }
5980
+ } : {},
5943
5981
  allowNullModes
5944
5982
  }
5945
5983
  ) : null,
@@ -6155,7 +6193,8 @@ function FilterBody({
6155
6193
  onChange,
6156
6194
  selectOptions,
6157
6195
  selectSingle = false,
6158
- allowNullModes = false
6196
+ allowNullModes = false,
6197
+ booleanLabels
6159
6198
  }) {
6160
6199
  if (kind === "text") {
6161
6200
  const text = value?.kind === "text" ? value.value : "";
@@ -6242,9 +6281,9 @@ function FilterBody({
6242
6281
  children: [
6243
6282
  /* @__PURE__ */ jsx31(SelectTrigger, { className: "h-8 text-xs", children: /* @__PURE__ */ jsx31(SelectValue, {}) }),
6244
6283
  /* @__PURE__ */ jsxs22(SelectContent, { children: [
6245
- /* @__PURE__ */ jsx31(SelectItem, { value: "__all__", children: "All" }),
6246
- /* @__PURE__ */ jsx31(SelectItem, { value: "true", children: "Yes" }),
6247
- /* @__PURE__ */ jsx31(SelectItem, { value: "false", children: "No" })
6284
+ /* @__PURE__ */ jsx31(SelectItem, { value: "__all__", children: booleanLabels?.all ?? "All" }),
6285
+ /* @__PURE__ */ jsx31(SelectItem, { value: "true", children: booleanLabels?.true ?? "Yes" }),
6286
+ /* @__PURE__ */ jsx31(SelectItem, { value: "false", children: booleanLabels?.false ?? "No" })
6248
6287
  ] })
6249
6288
  ]
6250
6289
  }
@@ -8353,6 +8392,7 @@ var SELECT_CARDINALITY_CAP = 24;
8353
8392
  function resolveFilterKind(col, sampleRows) {
8354
8393
  if (col.filter === false) return null;
8355
8394
  if (col.filter && col.filter !== "auto") return col.filter;
8395
+ if (resolveColumnMarker(col)) return "boolean";
8356
8396
  const values = sampleRows.slice(0, 200).map((row) => getCellValue(row, col)).filter((v) => v != null);
8357
8397
  if (values.length === 0) return "text";
8358
8398
  if (values.every((v) => typeof v === "boolean")) return "boolean";
@@ -8418,6 +8458,9 @@ function resolveQueryFilterMeta(column, rows, controlled) {
8418
8458
  };
8419
8459
  }
8420
8460
  if (column.filter === false) return { kind: null, options: [] };
8461
+ if (resolveColumnMarker(column) && (column.filter === void 0 || column.filter === "auto")) {
8462
+ return { kind: "boolean", options: [] };
8463
+ }
8421
8464
  const declared = column.filter;
8422
8465
  const kind = declared && declared !== "auto" ? declared : column.filterOptions?.length ? "select" : "text";
8423
8466
  return {
@@ -10659,6 +10702,10 @@ function MatrxDataTableCore({
10659
10702
  const defaultSortDirection = col.defaultSortDirection ?? "asc";
10660
10703
  const isColumnDragShadow = columnDragPreview?.draggedId === id && columnDragPreview.targetId !== null;
10661
10704
  const columnResizable = resizableColumns && col.resizable !== false;
10705
+ const marker = resolveColumnMarker(col);
10706
+ const compact = col.compact || marker !== void 0;
10707
+ const width = marker && col.width === void 0 ? 40 : col.width;
10708
+ const minWidth = marker && col.minWidth === void 0 ? 40 : col.minWidth;
10662
10709
  return /* @__PURE__ */ jsxs31(
10663
10710
  "th",
10664
10711
  {
@@ -10670,7 +10717,7 @@ function MatrxDataTableCore({
10670
10717
  // ICON COLUMN (MatrxColumnDef.compact): a 40px star
10671
10718
  // column cannot honor `width: 40` while paying 16px of
10672
10719
  // padding for a 14px glyph.
10673
- col.compact ? "px-1" : "px-2",
10720
+ compact ? "px-1" : "px-2",
10674
10721
  // An intentional mobile column set (see
10675
10722
  // MatrxColumnDef.mobileHidden). CSS, not a JS
10676
10723
  // breakpoint — no hydration mismatch, and the column
@@ -10681,13 +10728,13 @@ function MatrxDataTableCore({
10681
10728
  // it, a crowded table crushes a declared 190px column to a
10682
10729
  // few characters wide instead of using the canonical
10683
10730
  // horizontal-scroll surface.
10684
- (col.width !== void 0 || columnResizable) && "sm:w-[var(--matrx-col-w)] sm:min-w-[var(--matrx-col-w)]",
10731
+ (width !== void 0 || columnResizable) && "sm:w-[var(--matrx-col-w)] sm:min-w-[var(--matrx-col-w)]",
10685
10732
  col.headerClassName,
10686
10733
  isColumnDragShadow && "bg-primary/10 shadow-[inset_2px_0_0_var(--primary),inset_-2px_0_0_var(--primary)]",
10687
10734
  col.align === "center" && "text-center",
10688
10735
  col.align === "right" && "text-right"
10689
10736
  ),
10690
- style: columnWidthVar(col.width, effectiveColumnWidths[id], id, columnResizable),
10737
+ style: columnWidthVar(width, effectiveColumnWidths[id], id, columnResizable),
10691
10738
  children: [
10692
10739
  /* @__PURE__ */ jsx41(ColumnHeaderDropZone, { id, enabled: reorderableColumns, children: /* @__PURE__ */ jsx41(
10693
10740
  ColumnHeaderCell,
@@ -10722,7 +10769,8 @@ function MatrxDataTableCore({
10722
10769
  allowNegation: filterUi?.allowNegation,
10723
10770
  allowNullModes: filterUi?.allowNullModes,
10724
10771
  align: col.align,
10725
- compact: col.compact,
10772
+ compact,
10773
+ marker,
10726
10774
  reorderColumn: reorderableColumns ? { id, label: headerLabel } : void 0
10727
10775
  }
10728
10776
  ) }),
@@ -10732,12 +10780,12 @@ function MatrxDataTableCore({
10732
10780
  columnId: id,
10733
10781
  label: headerLabel,
10734
10782
  tableRef,
10735
- minWidth: col.minWidth,
10783
+ minWidth,
10736
10784
  maxWidth: col.maxWidth,
10737
10785
  onResizeStart: captureResizeGestureSnapshot,
10738
10786
  onResizeCancel: clearResizeGestureSnapshot,
10739
- onResizeCommit: (columnId2, width) => commitColumnWidths(
10740
- { ...effectiveColumnWidths, [columnId2]: width },
10787
+ onResizeCommit: (columnId2, width2) => commitColumnWidths(
10788
+ { ...effectiveColumnWidths, [columnId2]: width2 },
10741
10789
  true
10742
10790
  )
10743
10791
  }
@@ -10767,7 +10815,7 @@ function MatrxDataTableCore({
10767
10815
  {
10768
10816
  className: cn(
10769
10817
  "py-2",
10770
- col.compact ? "px-1" : "px-2",
10818
+ col.compact || resolveColumnMarker(col) !== void 0 ? "px-1" : "px-2",
10771
10819
  col.mobileHidden && "max-sm:hidden"
10772
10820
  ),
10773
10821
  children: /* @__PURE__ */ jsx41(Skeleton, { className: "h-5 w-full" })
@@ -10853,19 +10901,19 @@ function MatrxDataTableCore({
10853
10901
  "data-matrx-column-drag-shadow": isColumnDragShadow ? "true" : void 0,
10854
10902
  className: cn(
10855
10903
  "py-1.5 align-middle lg:py-0.5",
10856
- col.compact ? "px-1" : "px-2",
10904
+ col.compact || resolveColumnMarker(col) !== void 0 ? "px-1" : "px-2",
10857
10905
  // nowrap (NOT truncate — truncate clips the cell and
10858
10906
  // defeats w-max, killing the horizontal scroll).
10859
10907
  "max-sm:whitespace-nowrap",
10860
10908
  col.mobileHidden && "max-sm:hidden",
10861
- (col.width !== void 0 || resizableColumns && col.resizable !== false) && "sm:w-[var(--matrx-col-w)] sm:min-w-[var(--matrx-col-w)] sm:max-w-[var(--matrx-col-w)]",
10909
+ ((resolveColumnMarker(col) && col.width === void 0 ? 40 : col.width) !== void 0 || resizableColumns && col.resizable !== false) && "sm:w-[var(--matrx-col-w)] sm:min-w-[var(--matrx-col-w)] sm:max-w-[var(--matrx-col-w)]",
10862
10910
  col.className,
10863
10911
  isColumnDragShadow && "bg-primary/10 shadow-[inset_2px_0_0_var(--primary),inset_-2px_0_0_var(--primary)]",
10864
10912
  col.align === "center" && "text-center",
10865
10913
  col.align === "right" && "text-right"
10866
10914
  ),
10867
10915
  style: columnWidthVar(
10868
- col.width,
10916
+ resolveColumnMarker(col) && col.width === void 0 ? 40 : col.width,
10869
10917
  effectiveColumnWidths[columnId(col)],
10870
10918
  columnId(col),
10871
10919
  resizableColumns && col.resizable !== false
@@ -10997,13 +11045,13 @@ function MatrxDataTableCore({
10997
11045
  {
10998
11046
  className: cn(
10999
11047
  "px-2 py-2 align-middle",
11000
- column.compact && "px-1",
11048
+ (column.compact || resolveColumnMarker(column) !== void 0) && "px-1",
11001
11049
  column.className,
11002
11050
  column.align === "center" && "text-center",
11003
11051
  column.align === "right" && "text-right"
11004
11052
  ),
11005
11053
  style: columnWidthVar(
11006
- column.width,
11054
+ resolveColumnMarker(column) && column.width === void 0 ? 40 : column.width,
11007
11055
  effectiveColumnWidths[columnId(column)],
11008
11056
  columnId(column),
11009
11057
  resizableColumns && column.resizable !== false
@@ -11595,7 +11643,11 @@ function normalizeColumnWidthsForColumns(widths, columns) {
11595
11643
  return Object.fromEntries(
11596
11644
  Object.entries(normalized).map(([id, width]) => {
11597
11645
  const column = byId.get(id);
11598
- const bounds = resolveColumnResizeBounds(column?.minWidth, column?.maxWidth);
11646
+ const marker = column ? resolveColumnMarker(column) : void 0;
11647
+ const bounds = resolveColumnResizeBounds(
11648
+ marker && column?.minWidth === void 0 ? 40 : column?.minWidth,
11649
+ column?.maxWidth
11650
+ );
11599
11651
  return [id, clampColumnWidth(width, bounds)];
11600
11652
  })
11601
11653
  );
@@ -11959,6 +12011,7 @@ export {
11959
12011
  downloadTableAsXlsx,
11960
12012
  filterKindLabel,
11961
12013
  parseTableViewSnapshot,
12014
+ resolveColumnMarker,
11962
12015
  resolveFilterKind,
11963
12016
  rowsToCsvFromColumns,
11964
12017
  rowsToMarkdownTable,