@tanstack/table-core 9.0.0-beta.37 → 9.0.0-beta.42

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 (100) hide show
  1. package/README.md +1 -0
  2. package/dist/core/headers/buildHeaderGroups.cjs.map +1 -1
  3. package/dist/core/headers/buildHeaderGroups.d.cts +1 -1
  4. package/dist/core/headers/buildHeaderGroups.d.ts +1 -1
  5. package/dist/core/headers/buildHeaderGroups.js.map +1 -1
  6. package/dist/core/headers/coreHeadersFeature.utils.cjs +7 -7
  7. package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
  8. package/dist/core/headers/coreHeadersFeature.utils.js +7 -7
  9. package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
  10. package/dist/core/table/coreTablesFeature.utils.cjs +1 -1
  11. package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
  12. package/dist/core/table/coreTablesFeature.utils.js +1 -1
  13. package/dist/core/table/coreTablesFeature.utils.js.map +1 -1
  14. package/dist/features/column-ordering/columnOrderingFeature.types.d.cts +5 -5
  15. package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +5 -5
  16. package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +6 -6
  17. package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +1 -1
  18. package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +3 -3
  19. package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +3 -3
  20. package/dist/features/column-ordering/columnOrderingFeature.utils.js +6 -6
  21. package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +1 -1
  22. package/dist/features/column-pinning/columnPinningFeature.cjs +44 -39
  23. package/dist/features/column-pinning/columnPinningFeature.cjs.map +1 -1
  24. package/dist/features/column-pinning/columnPinningFeature.d.cts +6 -1
  25. package/dist/features/column-pinning/columnPinningFeature.d.ts +6 -1
  26. package/dist/features/column-pinning/columnPinningFeature.js +45 -40
  27. package/dist/features/column-pinning/columnPinningFeature.js.map +1 -1
  28. package/dist/features/column-pinning/columnPinningFeature.types.d.cts +49 -38
  29. package/dist/features/column-pinning/columnPinningFeature.types.d.ts +49 -38
  30. package/dist/features/column-pinning/columnPinningFeature.utils.cjs +154 -146
  31. package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
  32. package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +81 -73
  33. package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +81 -73
  34. package/dist/features/column-pinning/columnPinningFeature.utils.js +141 -133
  35. package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
  36. package/dist/features/column-sizing/columnSizingFeature.cjs +4 -4
  37. package/dist/features/column-sizing/columnSizingFeature.cjs.map +1 -1
  38. package/dist/features/column-sizing/columnSizingFeature.js +5 -5
  39. package/dist/features/column-sizing/columnSizingFeature.js.map +1 -1
  40. package/dist/features/column-sizing/columnSizingFeature.types.d.cts +18 -12
  41. package/dist/features/column-sizing/columnSizingFeature.types.d.ts +18 -12
  42. package/dist/features/column-sizing/columnSizingFeature.utils.cjs +24 -20
  43. package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +1 -1
  44. package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +18 -14
  45. package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +18 -14
  46. package/dist/features/column-sizing/columnSizingFeature.utils.js +24 -20
  47. package/dist/features/column-sizing/columnSizingFeature.utils.js.map +1 -1
  48. package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +16 -16
  49. package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +1 -1
  50. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +3 -3
  51. package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +3 -3
  52. package/dist/features/column-visibility/columnVisibilityFeature.utils.js +16 -16
  53. package/dist/features/column-visibility/columnVisibilityFeature.utils.js.map +1 -1
  54. package/dist/static-functions.cjs +16 -16
  55. package/dist/static-functions.d.cts +3 -3
  56. package/dist/static-functions.d.ts +3 -3
  57. package/dist/static-functions.js +3 -3
  58. package/package.json +1 -1
  59. package/skills/api-not-found/SKILL.md +113 -0
  60. package/skills/client-vs-server/SKILL.md +164 -0
  61. package/skills/column-faceting/SKILL.md +91 -0
  62. package/skills/column-filtering/SKILL.md +82 -0
  63. package/skills/column-ordering/SKILL.md +75 -0
  64. package/skills/column-pinning/SKILL.md +89 -0
  65. package/skills/column-resizing/SKILL.md +91 -0
  66. package/skills/column-sizing/SKILL.md +72 -0
  67. package/skills/column-visibility/SKILL.md +75 -0
  68. package/skills/core/SKILL.md +140 -0
  69. package/skills/custom-features/SKILL.md +207 -0
  70. package/skills/expanding/SKILL.md +80 -0
  71. package/skills/global-filtering/SKILL.md +84 -0
  72. package/skills/grouping/SKILL.md +50 -394
  73. package/skills/migrate-v8-to-v9/SKILL.md +230 -390
  74. package/skills/pagination/SKILL.md +35 -344
  75. package/skills/row-pinning/SKILL.md +47 -238
  76. package/skills/row-selection/SKILL.md +39 -351
  77. package/skills/sorting/SKILL.md +35 -299
  78. package/skills/table-features/SKILL.md +153 -0
  79. package/skills/typescript/SKILL.md +126 -0
  80. package/src/core/headers/buildHeaderGroups.ts +1 -1
  81. package/src/core/headers/coreHeadersFeature.utils.ts +7 -7
  82. package/src/core/table/coreTablesFeature.utils.ts +1 -1
  83. package/src/features/column-ordering/columnOrderingFeature.types.ts +5 -5
  84. package/src/features/column-ordering/columnOrderingFeature.utils.ts +9 -9
  85. package/src/features/column-pinning/columnPinningFeature.ts +64 -59
  86. package/src/features/column-pinning/columnPinningFeature.types.ts +49 -38
  87. package/src/features/column-pinning/columnPinningFeature.utils.ts +163 -155
  88. package/src/features/column-sizing/columnSizingFeature.ts +6 -6
  89. package/src/features/column-sizing/columnSizingFeature.types.ts +18 -12
  90. package/src/features/column-sizing/columnSizingFeature.utils.ts +31 -27
  91. package/src/features/column-visibility/columnVisibilityFeature.utils.ts +15 -15
  92. package/skills/column-definitions/SKILL.md +0 -330
  93. package/skills/column-layout/SKILL.md +0 -326
  94. package/skills/column-layout/references/subsystems.md +0 -220
  95. package/skills/customizing-feature-behavior/SKILL.md +0 -423
  96. package/skills/filtering/SKILL.md +0 -375
  97. package/skills/filtering/references/faceting-and-fuzzy.md +0 -218
  98. package/skills/row-expanding/SKILL.md +0 -356
  99. package/skills/setup/SKILL.md +0 -390
  100. package/skills/state-management/SKILL.md +0 -403
@@ -78,7 +78,7 @@ export function table_getHeaderGroups<
78
78
  TFeatures extends TableFeatures,
79
79
  TData extends RowData,
80
80
  >(table: Table_Internal<TFeatures, TData>) {
81
- const { left, right } =
81
+ const { start, end } =
82
82
  table.atoms.columnPinning?.get() ?? getDefaultColumnPinningState()
83
83
  const allColumns = table.getAllColumns()
84
84
  const leafColumns = callMemoOrStaticFn(
@@ -88,15 +88,15 @@ export function table_getHeaderGroups<
88
88
  )
89
89
 
90
90
  // Fast path: no columns are pinned — skip per-side lookups, partition, and spread.
91
- if (!left.length && !right.length) {
91
+ if (!start.length && !end.length) {
92
92
  return buildHeaderGroups(allColumns, leafColumns, table)
93
93
  }
94
94
 
95
95
  const leafColumnsById = table.getAllLeafColumnsById()
96
96
 
97
97
  const leftColumns: typeof leafColumns = []
98
- for (let i = 0; i < left.length; i++) {
99
- const column = leafColumnsById[left[i]!]
98
+ for (let i = 0; i < start.length; i++) {
99
+ const column = leafColumnsById[start[i]!]
100
100
  if (
101
101
  column &&
102
102
  callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)
@@ -106,8 +106,8 @@ export function table_getHeaderGroups<
106
106
  }
107
107
 
108
108
  const rightColumns: typeof leafColumns = []
109
- for (let i = 0; i < right.length; i++) {
110
- const column = leafColumnsById[right[i]!]
109
+ for (let i = 0; i < end.length; i++) {
110
+ const column = leafColumnsById[end[i]!]
111
111
  if (
112
112
  column &&
113
113
  callMemoOrStaticFn(column, 'getIsVisible', column_getIsVisible)
@@ -117,7 +117,7 @@ export function table_getHeaderGroups<
117
117
  }
118
118
 
119
119
  const centerColumns = leafColumns.filter(
120
- (column) => !left.includes(column.id) && !right.includes(column.id),
120
+ (column) => !start.includes(column.id) && !end.includes(column.id),
121
121
  )
122
122
 
123
123
  return buildHeaderGroups(
@@ -32,7 +32,7 @@ export function table_syncExternalStateToBaseAtoms<
32
32
  }
33
33
 
34
34
  const externalState = state[key as keyof typeof state]
35
- if (externalState !== baseAtom.get()) {
35
+ if (externalState !== table._reactivity.untrack(() => baseAtom.get())) {
36
36
  baseAtom.set(() => externalState)
37
37
  }
38
38
  }
@@ -14,13 +14,13 @@ export interface ColumnIndexes {
14
14
  */
15
15
  center: Record<string, number>
16
16
  /**
17
- * Maps each left-pinned visible leaf column id to its index within the left region.
17
+ * Maps each start-pinned visible leaf column id to its index within the start region.
18
18
  */
19
- left: Record<string, number>
19
+ start: Record<string, number>
20
20
  /**
21
- * Maps each right-pinned visible leaf column id to its index within the right region.
21
+ * Maps each end-pinned visible leaf column id to its index within the end region.
22
22
  */
23
- right: Record<string, number>
23
+ end: Record<string, number>
24
24
  }
25
25
 
26
26
  export interface TableState_ColumnOrdering {
@@ -40,7 +40,7 @@ export interface Column_ColumnOrdering {
40
40
  /**
41
41
  * Finds this column's zero-based index among visible columns.
42
42
  *
43
- * Pass `'left'`, `'center'`, or `'right'` to measure within that pinned
43
+ * Pass `'start'`, `'center'`, or `'end'` to measure within that pinned
44
44
  * region instead of the full visible leaf order.
45
45
  */
46
46
  getIndex: (position?: ColumnPinningPosition | 'center') => number
@@ -57,15 +57,15 @@ export function table_getColumnIndexes<
57
57
  return {
58
58
  all: buildIndexes(table_getPinnedVisibleLeafColumns(table)),
59
59
  center: buildIndexes(table_getPinnedVisibleLeafColumns(table, 'center')),
60
- left: buildIndexes(table_getPinnedVisibleLeafColumns(table, 'left')),
61
- right: buildIndexes(table_getPinnedVisibleLeafColumns(table, 'right')),
60
+ start: buildIndexes(table_getPinnedVisibleLeafColumns(table, 'start')),
61
+ end: buildIndexes(table_getPinnedVisibleLeafColumns(table, 'end')),
62
62
  }
63
63
  }
64
64
 
65
65
  /**
66
66
  * Finds this column's index within a visible pinning region.
67
67
  *
68
- * Pass `'left'`, `'center'`, or `'right'` to search that region; omit the
68
+ * Pass `'start'`, `'center'`, or `'end'` to search that region; omit the
69
69
  * position to search the full visible leaf column list.
70
70
  *
71
71
  * @example
@@ -87,10 +87,10 @@ export function column_getIndex<
87
87
  table_getColumnIndexes,
88
88
  )
89
89
  const key =
90
- position === 'left'
91
- ? 'left'
92
- : position === 'right'
93
- ? 'right'
90
+ position === 'start'
91
+ ? 'start'
92
+ : position === 'end'
93
+ ? 'end'
94
94
  : position === 'center'
95
95
  ? 'center'
96
96
  : 'all'
@@ -104,7 +104,7 @@ export function column_getIndex<
104
104
  *
105
105
  * @example
106
106
  * ```ts
107
- * const isFirst = column_getIsFirstColumn(column, 'left')
107
+ * const isFirst = column_getIsFirstColumn(column, 'start')
108
108
  * ```
109
109
  */
110
110
  export function column_getIsFirstColumn<
@@ -126,7 +126,7 @@ export function column_getIsFirstColumn<
126
126
  *
127
127
  * @example
128
128
  * ```ts
129
- * const isLast = column_getIsLastColumn(column, 'right')
129
+ * const isLast = column_getIsLastColumn(column, 'end')
130
130
  * ```
131
131
  */
132
132
  export function column_getIsLastColumn<
@@ -12,36 +12,41 @@ import {
12
12
  column_pin,
13
13
  getDefaultColumnPinningState,
14
14
  row_getCenterVisibleCells,
15
- row_getLeftVisibleCells,
16
- row_getRightVisibleCells,
15
+ row_getEndVisibleCells,
16
+ row_getStartVisibleCells,
17
17
  table_getCenterFlatHeaders,
18
18
  table_getCenterFooterGroups,
19
19
  table_getCenterHeaderGroups,
20
20
  table_getCenterLeafColumns,
21
21
  table_getCenterLeafHeaders,
22
22
  table_getCenterVisibleLeafColumns,
23
+ table_getEndFlatHeaders,
24
+ table_getEndFooterGroups,
25
+ table_getEndHeaderGroups,
26
+ table_getEndLeafColumns,
27
+ table_getEndLeafHeaders,
28
+ table_getEndVisibleLeafColumns,
23
29
  table_getIsSomeColumnsPinned,
24
- table_getLeftFlatHeaders,
25
- table_getLeftFooterGroups,
26
- table_getLeftHeaderGroups,
27
- table_getLeftLeafColumns,
28
- table_getLeftLeafHeaders,
29
- table_getLeftVisibleLeafColumns,
30
30
  table_getPinnedLeafColumns,
31
31
  table_getPinnedVisibleLeafColumns,
32
- table_getRightFlatHeaders,
33
- table_getRightFooterGroups,
34
- table_getRightHeaderGroups,
35
- table_getRightLeafColumns,
36
- table_getRightLeafHeaders,
37
- table_getRightVisibleLeafColumns,
32
+ table_getStartFlatHeaders,
33
+ table_getStartFooterGroups,
34
+ table_getStartHeaderGroups,
35
+ table_getStartLeafColumns,
36
+ table_getStartLeafHeaders,
37
+ table_getStartVisibleLeafColumns,
38
38
  table_resetColumnPinning,
39
39
  table_setColumnPinning,
40
40
  } from './columnPinningFeature.utils'
41
41
  import type { TableFeature } from '../../types/TableFeatures'
42
42
 
43
43
  /**
44
- * Feature that adds column pinning state and APIs for left, center, and right regions.
44
+ * Feature that adds column pinning state and APIs for logical start, center,
45
+ * and end regions.
46
+ *
47
+ * In LTR languages/layouts, start usually corresponds to left and end to
48
+ * right. In RTL languages/layouts, start usually corresponds to right and end
49
+ * to left.
45
50
  */
46
51
  export const columnPinningFeature: TableFeature = {
47
52
  getInitialState: (initialState) => {
@@ -87,19 +92,19 @@ export const columnPinningFeature: TableFeature = {
87
92
  row.table.atoms.columnVisibility?.get(),
88
93
  ],
89
94
  },
90
- row_getLeftVisibleCells: {
91
- fn: (row) => row_getLeftVisibleCells(row),
95
+ row_getStartVisibleCells: {
96
+ fn: (row) => row_getStartVisibleCells(row),
92
97
  memoDeps: (row) => [
93
98
  row.getAllCells(),
94
- row.table.atoms.columnPinning?.get()?.left,
99
+ row.table.atoms.columnPinning?.get()?.start,
95
100
  row.table.atoms.columnVisibility?.get(),
96
101
  ],
97
102
  },
98
- row_getRightVisibleCells: {
99
- fn: (row) => row_getRightVisibleCells(row),
103
+ row_getEndVisibleCells: {
104
+ fn: (row) => row_getEndVisibleCells(row),
100
105
  memoDeps: (row) => [
101
106
  row.getAllCells(),
102
- row.table.atoms.columnPinning?.get()?.right,
107
+ row.table.atoms.columnPinning?.get()?.end,
103
108
  row.table.atoms.columnVisibility?.get(),
104
109
  ],
105
110
  },
@@ -118,8 +123,8 @@ export const columnPinningFeature: TableFeature = {
118
123
  fn: (position) => table_getIsSomeColumnsPinned(table, position),
119
124
  },
120
125
  // header groups
121
- table_getLeftHeaderGroups: {
122
- fn: () => table_getLeftHeaderGroups(table),
126
+ table_getStartHeaderGroups: {
127
+ fn: () => table_getStartHeaderGroups(table),
123
128
  memoDeps: () => [
124
129
  table.getAllColumns(),
125
130
  callMemoOrStaticFn(
@@ -127,7 +132,7 @@ export const columnPinningFeature: TableFeature = {
127
132
  'getVisibleLeafColumns',
128
133
  table_getVisibleLeafColumns,
129
134
  ),
130
- table.atoms.columnPinning?.get()?.left,
135
+ table.atoms.columnPinning?.get()?.start,
131
136
  table.atoms.columnOrder?.get(),
132
137
  ],
133
138
  },
@@ -144,8 +149,8 @@ export const columnPinningFeature: TableFeature = {
144
149
  table.atoms.columnOrder?.get(),
145
150
  ],
146
151
  },
147
- table_getRightHeaderGroups: {
148
- fn: () => table_getRightHeaderGroups(table),
152
+ table_getEndHeaderGroups: {
153
+ fn: () => table_getEndHeaderGroups(table),
149
154
  memoDeps: () => [
150
155
  table.getAllColumns(),
151
156
  callMemoOrStaticFn(
@@ -153,18 +158,18 @@ export const columnPinningFeature: TableFeature = {
153
158
  'getVisibleLeafColumns',
154
159
  table_getVisibleLeafColumns,
155
160
  ),
156
- table.atoms.columnPinning?.get()?.right,
161
+ table.atoms.columnPinning?.get()?.end,
157
162
  table.atoms.columnOrder?.get(),
158
163
  ],
159
164
  },
160
165
  // footer groups
161
- table_getLeftFooterGroups: {
162
- fn: () => table_getLeftFooterGroups(table),
166
+ table_getStartFooterGroups: {
167
+ fn: () => table_getStartFooterGroups(table),
163
168
  memoDeps: () => [
164
169
  callMemoOrStaticFn(
165
170
  table,
166
- 'getLeftHeaderGroups',
167
- table_getLeftHeaderGroups,
171
+ 'getStartHeaderGroups',
172
+ table_getStartHeaderGroups,
168
173
  ),
169
174
  ],
170
175
  },
@@ -178,34 +183,34 @@ export const columnPinningFeature: TableFeature = {
178
183
  ),
179
184
  ],
180
185
  },
181
- table_getRightFooterGroups: {
182
- fn: () => table_getRightFooterGroups(table),
186
+ table_getEndFooterGroups: {
187
+ fn: () => table_getEndFooterGroups(table),
183
188
  memoDeps: () => [
184
189
  callMemoOrStaticFn(
185
190
  table,
186
- 'getRightHeaderGroups',
187
- table_getRightHeaderGroups,
191
+ 'getEndHeaderGroups',
192
+ table_getEndHeaderGroups,
188
193
  ),
189
194
  ],
190
195
  },
191
196
  // flat headers
192
- table_getLeftFlatHeaders: {
193
- fn: () => table_getLeftFlatHeaders(table),
197
+ table_getStartFlatHeaders: {
198
+ fn: () => table_getStartFlatHeaders(table),
194
199
  memoDeps: () => [
195
200
  callMemoOrStaticFn(
196
201
  table,
197
- 'getLeftHeaderGroups',
198
- table_getLeftHeaderGroups,
202
+ 'getStartHeaderGroups',
203
+ table_getStartHeaderGroups,
199
204
  ),
200
205
  ],
201
206
  },
202
- table_getRightFlatHeaders: {
203
- fn: () => table_getRightFlatHeaders(table),
207
+ table_getEndFlatHeaders: {
208
+ fn: () => table_getEndFlatHeaders(table),
204
209
  memoDeps: () => [
205
210
  callMemoOrStaticFn(
206
211
  table,
207
- 'getRightHeaderGroups',
208
- table_getRightHeaderGroups,
212
+ 'getEndHeaderGroups',
213
+ table_getEndHeaderGroups,
209
214
  ),
210
215
  ],
211
216
  },
@@ -220,23 +225,23 @@ export const columnPinningFeature: TableFeature = {
220
225
  ],
221
226
  },
222
227
  // leaf headers
223
- table_getLeftLeafHeaders: {
224
- fn: () => table_getLeftLeafHeaders(table),
228
+ table_getStartLeafHeaders: {
229
+ fn: () => table_getStartLeafHeaders(table),
225
230
  memoDeps: () => [
226
231
  callMemoOrStaticFn(
227
232
  table,
228
- 'getLeftHeaderGroups',
229
- table_getLeftHeaderGroups,
233
+ 'getStartHeaderGroups',
234
+ table_getStartHeaderGroups,
230
235
  ),
231
236
  ],
232
237
  },
233
- table_getRightLeafHeaders: {
234
- fn: () => table_getRightLeafHeaders(table),
238
+ table_getEndLeafHeaders: {
239
+ fn: () => table_getEndLeafHeaders(table),
235
240
  memoDeps: () => [
236
241
  callMemoOrStaticFn(
237
242
  table,
238
- 'getRightHeaderGroups',
239
- table_getRightHeaderGroups,
243
+ 'getEndHeaderGroups',
244
+ table_getEndHeaderGroups,
240
245
  ),
241
246
  ],
242
247
  },
@@ -251,8 +256,8 @@ export const columnPinningFeature: TableFeature = {
251
256
  ],
252
257
  },
253
258
  // leaf columns
254
- table_getLeftLeafColumns: {
255
- fn: () => table_getLeftLeafColumns(table),
259
+ table_getStartLeafColumns: {
260
+ fn: () => table_getStartLeafColumns(table),
256
261
  memoDeps: () => [
257
262
  table.options.columns,
258
263
  table.atoms.columnPinning?.get(),
@@ -261,8 +266,8 @@ export const columnPinningFeature: TableFeature = {
261
266
  table.options.groupedColumnMode,
262
267
  ],
263
268
  },
264
- table_getRightLeafColumns: {
265
- fn: () => table_getRightLeafColumns(table),
269
+ table_getEndLeafColumns: {
270
+ fn: () => table_getEndLeafColumns(table),
266
271
  memoDeps: () => [
267
272
  table.options.columns,
268
273
  table.atoms.columnPinning?.get(),
@@ -286,8 +291,8 @@ export const columnPinningFeature: TableFeature = {
286
291
  // must not memo here as it's just a shortcut function
287
292
  },
288
293
  // visible leaf columns
289
- table_getLeftVisibleLeafColumns: {
290
- fn: () => table_getLeftVisibleLeafColumns(table),
294
+ table_getStartVisibleLeafColumns: {
295
+ fn: () => table_getStartVisibleLeafColumns(table),
291
296
  memoDeps: () => [
292
297
  table.options.columns,
293
298
  table.atoms.columnPinning?.get(),
@@ -308,8 +313,8 @@ export const columnPinningFeature: TableFeature = {
308
313
  table.options.groupedColumnMode,
309
314
  ],
310
315
  },
311
- table_getRightVisibleLeafColumns: {
312
- fn: () => table_getRightVisibleLeafColumns(table),
316
+ table_getEndVisibleLeafColumns: {
317
+ fn: () => table_getEndVisibleLeafColumns(table),
313
318
  memoDeps: () => [
314
319
  table.options.columns,
315
320
  table.atoms.columnPinning?.get(),
@@ -5,11 +5,18 @@ import type { Header } from '../../types/Header'
5
5
  import type { HeaderGroup } from '../../types/HeaderGroup'
6
6
  import type { Column } from '../../types/Column'
7
7
 
8
- export type ColumnPinningPosition = false | 'left' | 'right'
8
+ /**
9
+ * Logical column pinning region.
10
+ *
11
+ * In LTR languages/layouts, `start` usually corresponds to left and `end`
12
+ * usually corresponds to right. In RTL languages/layouts, `start` usually
13
+ * corresponds to right and `end` usually corresponds to left.
14
+ */
15
+ export type ColumnPinningPosition = false | 'start' | 'end'
9
16
 
10
17
  export interface ColumnPinningState {
11
- left: Array<string>
12
- right: Array<string>
18
+ start: Array<string>
19
+ end: Array<string>
13
20
  }
14
21
 
15
22
  export interface TableState_ColumnPinning {
@@ -18,7 +25,11 @@ export interface TableState_ColumnPinning {
18
25
 
19
26
  export interface TableOptions_ColumnPinning {
20
27
  /**
21
- * Allows columns to be pinned into left and right regions.
28
+ * Allows columns to be pinned into logical start and end regions.
29
+ *
30
+ * In LTR languages/layouts, start usually corresponds to left and end to
31
+ * right. In RTL languages/layouts, start usually corresponds to right and end
32
+ * to left.
22
33
  *
23
34
  * Defaults to `true`; column-level `enablePinning` can still opt individual
24
35
  * columns out.
@@ -52,7 +63,7 @@ export interface Column_ColumnPinning {
52
63
  */
53
64
  getCanPin: () => boolean
54
65
  /**
55
- * Reads the column's pinned position: `'left'`, `'right'`, or `false`.
66
+ * Reads the column's logical pinned position: `'start'`, `'end'`, or `false`.
56
67
  */
57
68
  getIsPinned: () => ColumnPinningPosition
58
69
  /**
@@ -60,8 +71,8 @@ export interface Column_ColumnPinning {
60
71
  */
61
72
  getPinnedIndex: () => number
62
73
  /**
63
- * Pins this column's leaf columns left or right, or unpins them when `false`
64
- * is passed.
74
+ * Pins this column's leaf columns to logical start or end, or unpins them
75
+ * when `false` is passed.
65
76
  */
66
77
  pin: (position: ColumnPinningPosition) => void
67
78
  }
@@ -71,17 +82,17 @@ export interface Row_ColumnPinning<
71
82
  in out TData extends RowData,
72
83
  > {
73
84
  /**
74
- * Gets visible row cells whose columns are not pinned left or right.
85
+ * Gets visible row cells whose columns are not pinned start or end.
75
86
  */
76
87
  getCenterVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>
77
88
  /**
78
- * Gets visible row cells whose columns are pinned left.
89
+ * Gets visible row cells whose columns are pinned to logical start.
79
90
  */
80
- getLeftVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>
91
+ getStartVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>
81
92
  /**
82
- * Gets visible row cells whose columns are pinned right.
93
+ * Gets visible row cells whose columns are pinned to logical end.
83
94
  */
84
- getRightVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>
95
+ getEndVisibleCells: () => Array<Cell<TFeatures, TData, unknown>>
85
96
  }
86
97
 
87
98
  export interface Table_ColumnPinning<
@@ -102,7 +113,7 @@ export interface Table_ColumnPinning<
102
113
  */
103
114
  getCenterHeaderGroups: () => Array<HeaderGroup<TFeatures, TData>>
104
115
  /**
105
- * Gets leaf columns that are not pinned left or right.
116
+ * Gets leaf columns that are not pinned start or end.
106
117
  */
107
118
  getCenterLeafColumns: () => Array<Column<TFeatures, TData, unknown>>
108
119
  /**
@@ -118,59 +129,59 @@ export interface Table_ColumnPinning<
118
129
  */
119
130
  getIsSomeColumnsPinned: (position?: ColumnPinningPosition) => boolean
120
131
  /**
121
- * Builds flat left-region headers for pinned columns, including parent
132
+ * Builds flat logical start-region headers for pinned columns, including parent
122
133
  * headers.
123
134
  */
124
- getLeftFlatHeaders: () => Array<Header<TFeatures, TData, unknown>>
135
+ getStartFlatHeaders: () => Array<Header<TFeatures, TData, unknown>>
125
136
  /**
126
- * Builds footer groups for left-pinned columns.
137
+ * Builds footer groups for logical start-pinned columns.
127
138
  */
128
- getLeftFooterGroups: () => Array<HeaderGroup<TFeatures, TData>>
139
+ getStartFooterGroups: () => Array<HeaderGroup<TFeatures, TData>>
129
140
  /**
130
- * Builds header groups for left-pinned columns.
141
+ * Builds header groups for logical start-pinned columns.
131
142
  */
132
- getLeftHeaderGroups: () => Array<HeaderGroup<TFeatures, TData>>
143
+ getStartHeaderGroups: () => Array<HeaderGroup<TFeatures, TData>>
133
144
  /**
134
- * Gets leaf columns pinned to the left region in pinning-state order.
145
+ * Gets leaf columns pinned to the logical start region in pinning-state order.
135
146
  */
136
- getLeftLeafColumns: () => Array<Column<TFeatures, TData, unknown>>
147
+ getStartLeafColumns: () => Array<Column<TFeatures, TData, unknown>>
137
148
  /**
138
- * Builds leaf headers for left-pinned columns.
149
+ * Builds leaf headers for logical start-pinned columns.
139
150
  */
140
- getLeftLeafHeaders: () => Array<Header<TFeatures, TData, unknown>>
151
+ getStartLeafHeaders: () => Array<Header<TFeatures, TData, unknown>>
141
152
  /**
142
- * Lists visible leaf columns in the left pinned region.
153
+ * Lists visible leaf columns in the logical start pinned region.
143
154
  */
144
- getLeftVisibleLeafColumns: () => Array<Column<TFeatures, TData, unknown>>
155
+ getStartVisibleLeafColumns: () => Array<Column<TFeatures, TData, unknown>>
145
156
  /**
146
- * Builds flat right-region headers for pinned columns, including parent
157
+ * Builds flat logical end-region headers for pinned columns, including parent
147
158
  * headers.
148
159
  */
149
- getRightFlatHeaders: () => Array<Header<TFeatures, TData, unknown>>
160
+ getEndFlatHeaders: () => Array<Header<TFeatures, TData, unknown>>
150
161
  /**
151
- * Builds footer groups for right-pinned columns.
162
+ * Builds footer groups for logical end-pinned columns.
152
163
  */
153
- getRightFooterGroups: () => Array<HeaderGroup<TFeatures, TData>>
164
+ getEndFooterGroups: () => Array<HeaderGroup<TFeatures, TData>>
154
165
  /**
155
- * Builds header groups for right-pinned columns.
166
+ * Builds header groups for logical end-pinned columns.
156
167
  */
157
- getRightHeaderGroups: () => Array<HeaderGroup<TFeatures, TData>>
168
+ getEndHeaderGroups: () => Array<HeaderGroup<TFeatures, TData>>
158
169
  /**
159
- * Gets leaf columns pinned to the right region in pinning-state order.
170
+ * Gets leaf columns pinned to the logical end region in pinning-state order.
160
171
  */
161
- getRightLeafColumns: () => Array<Column<TFeatures, TData, unknown>>
172
+ getEndLeafColumns: () => Array<Column<TFeatures, TData, unknown>>
162
173
  /**
163
- * Builds leaf headers for right-pinned columns.
174
+ * Builds leaf headers for logical end-pinned columns.
164
175
  */
165
- getRightLeafHeaders: () => Array<Header<TFeatures, TData, unknown>>
176
+ getEndLeafHeaders: () => Array<Header<TFeatures, TData, unknown>>
166
177
  /**
167
- * Lists visible leaf columns in the right pinned region.
178
+ * Lists visible leaf columns in the logical end pinned region.
168
179
  */
169
- getRightVisibleLeafColumns: () => Array<Column<TFeatures, TData, unknown>>
180
+ getEndVisibleLeafColumns: () => Array<Column<TFeatures, TData, unknown>>
170
181
  /**
171
182
  * Resets `columnPinning` to `initialState.columnPinning`.
172
183
  *
173
- * Pass `true` to ignore initial state and reset to empty left/right arrays.
184
+ * Pass `true` to ignore initial state and reset to empty start/end arrays.
174
185
  */
175
186
  resetColumnPinning: (defaultState?: boolean) => void
176
187
  /**