react-glide-table 2.2.1 → 2.3.1

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.
@@ -220,9 +220,23 @@ declare module "@tanstack/react-table" {
220
220
  * Defaults to true.
221
221
  */
222
222
  reorderable?: boolean;
223
- /** CSS min-width for header/body cells. Independent of column resize. */
223
+ /**
224
+ * Explicit `Column.width` when provided. Used to distinguish fixed columns
225
+ * from flexible / min-max bounded columns during layout.
226
+ */
227
+ width?: number;
228
+ /**
229
+ * Minimum column width in px. Independent of column resize.
230
+ * With `maxWidth` and no `width`, layout picks a size in this range
231
+ * (preferring `maxWidth` when space allows) and leaves leftover space
232
+ * to unconstrained columns.
233
+ */
224
234
  minWidth?: number;
225
- /** CSS max-width for header/body cells. Independent of column resize. */
235
+ /**
236
+ * Maximum column width in px. Independent of column resize.
237
+ * With `minWidth` and no `width`, layout prefers this size when space
238
+ * allows, then shrinks toward `minWidth` if the viewport is tight.
239
+ */
226
240
  maxWidth?: number;
227
241
  }
228
242
  interface CellContext<TData, TValue> {
@@ -550,13 +564,16 @@ type TableColumnProps<T extends Record<string, unknown>, K extends string = keyo
550
564
  /** Initial / default column width in px (TanStack `size`) */
551
565
  width?: number;
552
566
  /**
553
- * CSS min-width for this column's cells.
554
- * Independent of `enableColumnResize` / `minResizeWidth`.
567
+ * Minimum column width in px. Independent of `enableColumnResize` / `minResizeWidth`.
568
+ * With `maxWidth` and no `width`, layout resolves a size in `[minWidth, maxWidth]`,
569
+ * preferring `maxWidth` when space allows, and leaves leftover space to columns
570
+ * without `width`.
555
571
  */
556
572
  minWidth?: number;
557
573
  /**
558
- * CSS max-width for this column's cells.
559
- * Independent of `enableColumnResize` / `maxResizeWidth`.
574
+ * Maximum column width in px. Independent of `enableColumnResize` / `maxResizeWidth`.
575
+ * With `minWidth` and no `width`, layout prefers this size when space allows,
576
+ * then shrinks toward `minWidth` if the viewport is tight.
560
577
  */
561
578
  maxWidth?: number;
562
579
  /** Minimum drag-resize width in px. Defaults to the table min when omitted */
@@ -220,9 +220,23 @@ declare module "@tanstack/react-table" {
220
220
  * Defaults to true.
221
221
  */
222
222
  reorderable?: boolean;
223
- /** CSS min-width for header/body cells. Independent of column resize. */
223
+ /**
224
+ * Explicit `Column.width` when provided. Used to distinguish fixed columns
225
+ * from flexible / min-max bounded columns during layout.
226
+ */
227
+ width?: number;
228
+ /**
229
+ * Minimum column width in px. Independent of column resize.
230
+ * With `maxWidth` and no `width`, layout picks a size in this range
231
+ * (preferring `maxWidth` when space allows) and leaves leftover space
232
+ * to unconstrained columns.
233
+ */
224
234
  minWidth?: number;
225
- /** CSS max-width for header/body cells. Independent of column resize. */
235
+ /**
236
+ * Maximum column width in px. Independent of column resize.
237
+ * With `minWidth` and no `width`, layout prefers this size when space
238
+ * allows, then shrinks toward `minWidth` if the viewport is tight.
239
+ */
226
240
  maxWidth?: number;
227
241
  }
228
242
  interface CellContext<TData, TValue> {
@@ -550,13 +564,16 @@ type TableColumnProps<T extends Record<string, unknown>, K extends string = keyo
550
564
  /** Initial / default column width in px (TanStack `size`) */
551
565
  width?: number;
552
566
  /**
553
- * CSS min-width for this column's cells.
554
- * Independent of `enableColumnResize` / `minResizeWidth`.
567
+ * Minimum column width in px. Independent of `enableColumnResize` / `minResizeWidth`.
568
+ * With `maxWidth` and no `width`, layout resolves a size in `[minWidth, maxWidth]`,
569
+ * preferring `maxWidth` when space allows, and leaves leftover space to columns
570
+ * without `width`.
555
571
  */
556
572
  minWidth?: number;
557
573
  /**
558
- * CSS max-width for this column's cells.
559
- * Independent of `enableColumnResize` / `maxResizeWidth`.
574
+ * Maximum column width in px. Independent of `enableColumnResize` / `maxResizeWidth`.
575
+ * With `minWidth` and no `width`, layout prefers this size when space allows,
576
+ * then shrinks toward `minWidth` if the viewport is tight.
560
577
  */
561
578
  maxWidth?: number;
562
579
  /** Minimum drag-resize width in px. Defaults to the table min when omitted */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-glide-table",
3
- "version": "2.2.1",
3
+ "version": "2.3.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/zpxlffjrm/react-glide-table.git"