@tanstack/table-core 9.0.0-beta.2 → 9.0.0-beta.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 (271) hide show
  1. package/dist/core/cells/coreCellsFeature.cjs +11 -20
  2. package/dist/core/cells/coreCellsFeature.cjs.map +1 -1
  3. package/dist/core/cells/coreCellsFeature.d.cts +4 -12
  4. package/dist/core/cells/coreCellsFeature.d.ts +4 -12
  5. package/dist/core/cells/coreCellsFeature.js +12 -20
  6. package/dist/core/cells/coreCellsFeature.js.map +1 -1
  7. package/dist/core/columns/coreColumnsFeature.cjs +59 -68
  8. package/dist/core/columns/coreColumnsFeature.cjs.map +1 -1
  9. package/dist/core/columns/coreColumnsFeature.d.cts +4 -12
  10. package/dist/core/columns/coreColumnsFeature.d.ts +4 -12
  11. package/dist/core/columns/coreColumnsFeature.js +60 -68
  12. package/dist/core/columns/coreColumnsFeature.js.map +1 -1
  13. package/dist/core/headers/buildHeaderGroups.cjs.map +1 -1
  14. package/dist/core/headers/buildHeaderGroups.js.map +1 -1
  15. package/dist/core/headers/coreHeadersFeature.cjs +44 -53
  16. package/dist/core/headers/coreHeadersFeature.cjs.map +1 -1
  17. package/dist/core/headers/coreHeadersFeature.d.cts +4 -12
  18. package/dist/core/headers/coreHeadersFeature.d.ts +4 -12
  19. package/dist/core/headers/coreHeadersFeature.js +45 -53
  20. package/dist/core/headers/coreHeadersFeature.js.map +1 -1
  21. package/dist/core/headers/coreHeadersFeature.utils.cjs.map +1 -1
  22. package/dist/core/headers/coreHeadersFeature.utils.js.map +1 -1
  23. package/dist/core/row-models/coreRowModelsFeature.cjs +17 -26
  24. package/dist/core/row-models/coreRowModelsFeature.cjs.map +1 -1
  25. package/dist/core/row-models/coreRowModelsFeature.d.cts +4 -12
  26. package/dist/core/row-models/coreRowModelsFeature.d.ts +4 -12
  27. package/dist/core/row-models/coreRowModelsFeature.js +18 -26
  28. package/dist/core/row-models/coreRowModelsFeature.js.map +1 -1
  29. package/dist/core/row-models/coreRowModelsFeature.types.d.cts +3 -5
  30. package/dist/core/row-models/coreRowModelsFeature.types.d.ts +3 -5
  31. package/dist/core/row-models/createCoreRowModel.cjs.map +1 -1
  32. package/dist/core/row-models/createCoreRowModel.js.map +1 -1
  33. package/dist/core/rows/coreRowsFeature.cjs +27 -36
  34. package/dist/core/rows/coreRowsFeature.cjs.map +1 -1
  35. package/dist/core/rows/coreRowsFeature.d.cts +4 -12
  36. package/dist/core/rows/coreRowsFeature.d.ts +4 -12
  37. package/dist/core/rows/coreRowsFeature.js +28 -36
  38. package/dist/core/rows/coreRowsFeature.js.map +1 -1
  39. package/dist/core/table/constructTable.cjs +2 -2
  40. package/dist/core/table/constructTable.cjs.map +1 -1
  41. package/dist/core/table/constructTable.js +2 -2
  42. package/dist/core/table/constructTable.js.map +1 -1
  43. package/dist/core/table/coreTablesFeature.cjs +7 -16
  44. package/dist/core/table/coreTablesFeature.cjs.map +1 -1
  45. package/dist/core/table/coreTablesFeature.d.cts +4 -12
  46. package/dist/core/table/coreTablesFeature.d.ts +4 -12
  47. package/dist/core/table/coreTablesFeature.js +8 -16
  48. package/dist/core/table/coreTablesFeature.js.map +1 -1
  49. package/dist/core/table/coreTablesFeature.utils.cjs.map +1 -1
  50. package/dist/core/table/coreTablesFeature.utils.js.map +1 -1
  51. package/dist/features/column-faceting/columnFacetingFeature.cjs +49 -61
  52. package/dist/features/column-faceting/columnFacetingFeature.cjs.map +1 -1
  53. package/dist/features/column-faceting/columnFacetingFeature.d.cts +4 -15
  54. package/dist/features/column-faceting/columnFacetingFeature.d.ts +4 -15
  55. package/dist/features/column-faceting/columnFacetingFeature.js +50 -61
  56. package/dist/features/column-faceting/columnFacetingFeature.js.map +1 -1
  57. package/dist/features/column-faceting/createFacetedMinMaxValues.cjs.map +1 -1
  58. package/dist/features/column-faceting/createFacetedMinMaxValues.js.map +1 -1
  59. package/dist/features/column-faceting/createFacetedRowModel.cjs.map +1 -1
  60. package/dist/features/column-faceting/createFacetedRowModel.js.map +1 -1
  61. package/dist/features/column-faceting/createFacetedUniqueValues.cjs.map +1 -1
  62. package/dist/features/column-faceting/createFacetedUniqueValues.js.map +1 -1
  63. package/dist/features/column-filtering/columnFilteringFeature.cjs +40 -53
  64. package/dist/features/column-filtering/columnFilteringFeature.cjs.map +1 -1
  65. package/dist/features/column-filtering/columnFilteringFeature.d.cts +4 -16
  66. package/dist/features/column-filtering/columnFilteringFeature.d.ts +4 -16
  67. package/dist/features/column-filtering/columnFilteringFeature.js +41 -53
  68. package/dist/features/column-filtering/columnFilteringFeature.js.map +1 -1
  69. package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +3 -3
  70. package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +3 -3
  71. package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +1 -1
  72. package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +1 -1
  73. package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +1 -1
  74. package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +1 -1
  75. package/dist/features/column-filtering/createFilteredRowModel.cjs.map +1 -1
  76. package/dist/features/column-filtering/createFilteredRowModel.d.cts +1 -1
  77. package/dist/features/column-filtering/createFilteredRowModel.d.ts +1 -1
  78. package/dist/features/column-filtering/createFilteredRowModel.js.map +1 -1
  79. package/dist/features/column-grouping/columnGroupingFeature.cjs +57 -69
  80. package/dist/features/column-grouping/columnGroupingFeature.cjs.map +1 -1
  81. package/dist/features/column-grouping/columnGroupingFeature.d.cts +4 -15
  82. package/dist/features/column-grouping/columnGroupingFeature.d.ts +4 -15
  83. package/dist/features/column-grouping/columnGroupingFeature.js +58 -69
  84. package/dist/features/column-grouping/columnGroupingFeature.js.map +1 -1
  85. package/dist/features/column-grouping/createGroupedRowModel.cjs.map +1 -1
  86. package/dist/features/column-grouping/createGroupedRowModel.js.map +1 -1
  87. package/dist/features/column-ordering/columnOrderingFeature.cjs +47 -59
  88. package/dist/features/column-ordering/columnOrderingFeature.cjs.map +1 -1
  89. package/dist/features/column-ordering/columnOrderingFeature.d.cts +4 -15
  90. package/dist/features/column-ordering/columnOrderingFeature.d.ts +4 -15
  91. package/dist/features/column-ordering/columnOrderingFeature.js +48 -59
  92. package/dist/features/column-ordering/columnOrderingFeature.js.map +1 -1
  93. package/dist/features/column-pinning/columnPinningFeature.cjs +209 -221
  94. package/dist/features/column-pinning/columnPinningFeature.cjs.map +1 -1
  95. package/dist/features/column-pinning/columnPinningFeature.d.cts +4 -15
  96. package/dist/features/column-pinning/columnPinningFeature.d.ts +4 -15
  97. package/dist/features/column-pinning/columnPinningFeature.js +210 -221
  98. package/dist/features/column-pinning/columnPinningFeature.js.map +1 -1
  99. package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +1 -1
  100. package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +12 -12
  101. package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +12 -12
  102. package/dist/features/column-pinning/columnPinningFeature.utils.js.map +1 -1
  103. package/dist/features/column-resizing/columnResizingFeature.cjs +31 -43
  104. package/dist/features/column-resizing/columnResizingFeature.cjs.map +1 -1
  105. package/dist/features/column-resizing/columnResizingFeature.d.cts +4 -15
  106. package/dist/features/column-resizing/columnResizingFeature.d.ts +4 -15
  107. package/dist/features/column-resizing/columnResizingFeature.js +32 -43
  108. package/dist/features/column-resizing/columnResizingFeature.js.map +1 -1
  109. package/dist/features/column-sizing/columnSizingFeature.cjs +112 -125
  110. package/dist/features/column-sizing/columnSizingFeature.cjs.map +1 -1
  111. package/dist/features/column-sizing/columnSizingFeature.d.cts +4 -16
  112. package/dist/features/column-sizing/columnSizingFeature.d.ts +4 -16
  113. package/dist/features/column-sizing/columnSizingFeature.js +113 -125
  114. package/dist/features/column-sizing/columnSizingFeature.js.map +1 -1
  115. package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +3 -3
  116. package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +3 -3
  117. package/dist/features/column-visibility/columnVisibilityFeature.cjs +83 -95
  118. package/dist/features/column-visibility/columnVisibilityFeature.cjs.map +1 -1
  119. package/dist/features/column-visibility/columnVisibilityFeature.d.cts +4 -15
  120. package/dist/features/column-visibility/columnVisibilityFeature.d.ts +4 -15
  121. package/dist/features/column-visibility/columnVisibilityFeature.js +84 -95
  122. package/dist/features/column-visibility/columnVisibilityFeature.js.map +1 -1
  123. package/dist/features/global-filtering/globalFilteringFeature.cjs +31 -43
  124. package/dist/features/global-filtering/globalFilteringFeature.cjs.map +1 -1
  125. package/dist/features/global-filtering/globalFilteringFeature.d.cts +4 -15
  126. package/dist/features/global-filtering/globalFilteringFeature.d.ts +4 -15
  127. package/dist/features/global-filtering/globalFilteringFeature.js +32 -43
  128. package/dist/features/global-filtering/globalFilteringFeature.js.map +1 -1
  129. package/dist/features/global-filtering/globalFilteringFeature.utils.cjs.map +1 -1
  130. package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +4 -2
  131. package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +4 -2
  132. package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +1 -1
  133. package/dist/features/row-expanding/createExpandedRowModel.cjs.map +1 -1
  134. package/dist/features/row-expanding/createExpandedRowModel.js.map +1 -1
  135. package/dist/features/row-expanding/rowExpandingFeature.cjs +37 -49
  136. package/dist/features/row-expanding/rowExpandingFeature.cjs.map +1 -1
  137. package/dist/features/row-expanding/rowExpandingFeature.d.cts +4 -15
  138. package/dist/features/row-expanding/rowExpandingFeature.d.ts +4 -15
  139. package/dist/features/row-expanding/rowExpandingFeature.js +38 -49
  140. package/dist/features/row-expanding/rowExpandingFeature.js.map +1 -1
  141. package/dist/features/row-pagination/createPaginatedRowModel.cjs.map +1 -1
  142. package/dist/features/row-pagination/createPaginatedRowModel.js.map +1 -1
  143. package/dist/features/row-pagination/rowPaginationFeature.cjs +35 -47
  144. package/dist/features/row-pagination/rowPaginationFeature.cjs.map +1 -1
  145. package/dist/features/row-pagination/rowPaginationFeature.d.cts +4 -15
  146. package/dist/features/row-pagination/rowPaginationFeature.d.ts +4 -15
  147. package/dist/features/row-pagination/rowPaginationFeature.js +36 -47
  148. package/dist/features/row-pagination/rowPaginationFeature.js.map +1 -1
  149. package/dist/features/row-pinning/rowPinningFeature.cjs +55 -67
  150. package/dist/features/row-pinning/rowPinningFeature.cjs.map +1 -1
  151. package/dist/features/row-pinning/rowPinningFeature.d.cts +4 -15
  152. package/dist/features/row-pinning/rowPinningFeature.d.ts +4 -15
  153. package/dist/features/row-pinning/rowPinningFeature.js +56 -67
  154. package/dist/features/row-pinning/rowPinningFeature.js.map +1 -1
  155. package/dist/features/row-selection/rowSelectionFeature.cjs +65 -77
  156. package/dist/features/row-selection/rowSelectionFeature.cjs.map +1 -1
  157. package/dist/features/row-selection/rowSelectionFeature.d.cts +4 -15
  158. package/dist/features/row-selection/rowSelectionFeature.d.ts +4 -15
  159. package/dist/features/row-selection/rowSelectionFeature.js +66 -77
  160. package/dist/features/row-selection/rowSelectionFeature.js.map +1 -1
  161. package/dist/features/row-sorting/createSortedRowModel.cjs.map +1 -1
  162. package/dist/features/row-sorting/createSortedRowModel.js.map +1 -1
  163. package/dist/features/row-sorting/rowSortingFeature.cjs +45 -57
  164. package/dist/features/row-sorting/rowSortingFeature.cjs.map +1 -1
  165. package/dist/features/row-sorting/rowSortingFeature.d.cts +4 -15
  166. package/dist/features/row-sorting/rowSortingFeature.d.ts +4 -15
  167. package/dist/features/row-sorting/rowSortingFeature.js +46 -57
  168. package/dist/features/row-sorting/rowSortingFeature.js.map +1 -1
  169. package/dist/fns/aggregationFns.cjs +18 -18
  170. package/dist/fns/aggregationFns.cjs.map +1 -1
  171. package/dist/fns/aggregationFns.d.cts +21 -19
  172. package/dist/fns/aggregationFns.d.ts +21 -19
  173. package/dist/fns/aggregationFns.js +18 -18
  174. package/dist/fns/aggregationFns.js.map +1 -1
  175. package/dist/fns/filterFns.cjs +51 -65
  176. package/dist/fns/filterFns.cjs.map +1 -1
  177. package/dist/fns/filterFns.d.cts +82 -28
  178. package/dist/fns/filterFns.d.ts +82 -28
  179. package/dist/fns/filterFns.js +51 -65
  180. package/dist/fns/filterFns.js.map +1 -1
  181. package/dist/fns/sortFns.cjs.map +1 -1
  182. package/dist/fns/sortFns.d.cts +15 -13
  183. package/dist/fns/sortFns.d.ts +15 -13
  184. package/dist/fns/sortFns.js.map +1 -1
  185. package/dist/index.cjs +0 -20
  186. package/dist/index.d.cts +34 -34
  187. package/dist/index.d.ts +34 -34
  188. package/dist/index.js +21 -21
  189. package/dist/types/Cell.d.cts +3 -8
  190. package/dist/types/Cell.d.ts +3 -8
  191. package/dist/types/Column.d.cts +3 -8
  192. package/dist/types/Column.d.ts +3 -8
  193. package/dist/types/ColumnDef.d.cts +3 -8
  194. package/dist/types/ColumnDef.d.ts +3 -8
  195. package/dist/types/Header.d.cts +3 -8
  196. package/dist/types/Header.d.ts +3 -8
  197. package/dist/types/HeaderGroup.d.cts +3 -8
  198. package/dist/types/HeaderGroup.d.ts +3 -8
  199. package/dist/types/Row.d.cts +3 -8
  200. package/dist/types/Row.d.ts +3 -8
  201. package/dist/types/RowModel.d.cts +4 -10
  202. package/dist/types/RowModel.d.ts +4 -10
  203. package/dist/types/RowModelFns.d.cts +3 -8
  204. package/dist/types/RowModelFns.d.ts +3 -8
  205. package/dist/types/Table.d.cts +3 -8
  206. package/dist/types/Table.d.ts +3 -8
  207. package/dist/types/TableFeatures.d.cts +13 -39
  208. package/dist/types/TableFeatures.d.ts +13 -39
  209. package/dist/types/TableOptions.d.cts +3 -4
  210. package/dist/types/TableOptions.d.ts +3 -4
  211. package/dist/types/TableState.d.cts +5 -10
  212. package/dist/types/TableState.d.ts +5 -10
  213. package/dist/utils.cjs.map +1 -1
  214. package/dist/utils.d.cts +1 -1
  215. package/dist/utils.d.ts +1 -1
  216. package/dist/utils.js.map +1 -1
  217. package/package.json +1 -1
  218. package/src/core/cells/coreCellsFeature.ts +17 -39
  219. package/src/core/columns/coreColumnsFeature.ts +56 -83
  220. package/src/core/headers/buildHeaderGroups.ts +1 -1
  221. package/src/core/headers/coreHeadersFeature.ts +42 -64
  222. package/src/core/headers/coreHeadersFeature.utils.ts +1 -1
  223. package/src/core/row-models/coreRowModelsFeature.ts +43 -64
  224. package/src/core/row-models/coreRowModelsFeature.types.ts +2 -6
  225. package/src/core/row-models/createCoreRowModel.ts +1 -1
  226. package/src/core/rows/coreRowsFeature.ts +45 -72
  227. package/src/core/table/constructTable.ts +10 -7
  228. package/src/core/table/coreTablesFeature.ts +13 -35
  229. package/src/core/table/coreTablesFeature.utils.ts +1 -1
  230. package/src/features/column-faceting/columnFacetingFeature.ts +71 -102
  231. package/src/features/column-faceting/createFacetedMinMaxValues.ts +1 -1
  232. package/src/features/column-faceting/createFacetedRowModel.ts +1 -1
  233. package/src/features/column-faceting/createFacetedUniqueValues.ts +1 -1
  234. package/src/features/column-filtering/columnFilteringFeature.ts +60 -103
  235. package/src/features/column-filtering/columnFilteringFeature.types.ts +3 -3
  236. package/src/features/column-filtering/columnFilteringFeature.utils.ts +4 -4
  237. package/src/features/column-filtering/createFilteredRowModel.ts +2 -2
  238. package/src/features/column-grouping/columnGroupingFeature.ts +82 -126
  239. package/src/features/column-grouping/createGroupedRowModel.ts +1 -1
  240. package/src/features/column-ordering/columnOrderingFeature.ts +52 -84
  241. package/src/features/column-pinning/columnPinningFeature.ts +268 -304
  242. package/src/features/column-pinning/columnPinningFeature.utils.ts +5 -5
  243. package/src/features/column-resizing/columnResizingFeature.ts +44 -78
  244. package/src/features/column-sizing/columnSizingFeature.ts +115 -152
  245. package/src/features/column-visibility/columnVisibilityFeature.ts +92 -129
  246. package/src/features/global-filtering/globalFilteringFeature.ts +45 -79
  247. package/src/features/global-filtering/globalFilteringFeature.utils.ts +4 -2
  248. package/src/features/row-expanding/createExpandedRowModel.ts +1 -1
  249. package/src/features/row-expanding/rowExpandingFeature.ts +65 -101
  250. package/src/features/row-pagination/createPaginatedRowModel.ts +1 -1
  251. package/src/features/row-pagination/rowPaginationFeature.ts +69 -103
  252. package/src/features/row-pinning/rowPinningFeature.ts +72 -104
  253. package/src/features/row-selection/rowSelectionFeature.ts +103 -135
  254. package/src/features/row-sorting/createSortedRowModel.ts +1 -1
  255. package/src/features/row-sorting/rowSortingFeature.ts +73 -114
  256. package/src/fns/aggregationFns.ts +26 -42
  257. package/src/fns/filterFns.ts +231 -264
  258. package/src/fns/sortFns.ts +18 -19
  259. package/src/types/Cell.ts +3 -19
  260. package/src/types/Column.ts +2 -18
  261. package/src/types/ColumnDef.ts +2 -18
  262. package/src/types/Header.ts +2 -18
  263. package/src/types/HeaderGroup.ts +2 -13
  264. package/src/types/Row.ts +2 -17
  265. package/src/types/RowModel.ts +3 -25
  266. package/src/types/RowModelFns.ts +2 -17
  267. package/src/types/Table.ts +2 -17
  268. package/src/types/TableFeatures.ts +51 -112
  269. package/src/types/TableOptions.ts +1 -12
  270. package/src/types/TableState.ts +4 -30
  271. package/src/utils.ts +5 -4
@@ -3,17 +3,12 @@ import { CachedRowModel_Sorted, CreateRowModel_Sorted } from "../features/row-so
3
3
  import { CachedRowModel_Filtered, CreateRowModel_Filtered } from "../features/column-filtering/columnFilteringFeature.types.cjs";
4
4
  import { CachedRowModel_Expanded, CreateRowModel_Expanded } from "../features/row-expanding/rowExpandingFeature.types.cjs";
5
5
  import { CachedRowModel_Paginated, CreateRowModel_Paginated } from "../features/row-pagination/rowPaginationFeature.types.cjs";
6
- import { ExtractFeatureMapTypes, ExtractFeatureTypes, TableFeatures } from "./TableFeatures.cjs";
6
+ import { ExtractFeatureMapTypes, TableFeatures } from "./TableFeatures.cjs";
7
7
  import { CachedRowModel_Faceted, CreateRowModel_Faceted } from "../features/column-faceting/columnFacetingFeature.types.cjs";
8
8
  import { CachedRowModel_Core, CreateRowModel_Core, RowModel } from "../core/row-models/coreRowModelsFeature.types.cjs";
9
9
  import { CachedRowModel_Grouped, CreateRowModel_Grouped } from "../features/column-grouping/columnGroupingFeature.types.cjs";
10
10
 
11
11
  //#region src/types/RowModel.d.ts
12
- /**
13
- * Use this interface as a target for declaration merging to add your own plugin properties.
14
- * Note: This will affect the types of all tables in your project.
15
- */
16
- interface CreateRowModels_Plugins<TFeatures extends TableFeatures, TData extends RowData> {}
17
12
  interface CreateRowModels_FeatureMap<TFeatures extends TableFeatures, TData extends RowData> {
18
13
  columnFacetingFeature: CreateRowModel_Faceted<TFeatures, TData>;
19
14
  columnFilteringFeature: CreateRowModel_Filtered<TFeatures, TData>;
@@ -22,9 +17,8 @@ interface CreateRowModels_FeatureMap<TFeatures extends TableFeatures, TData exte
22
17
  rowPaginationFeature: CreateRowModel_Paginated<TFeatures, TData>;
23
18
  rowSortingFeature: CreateRowModel_Sorted<TFeatures, TData>;
24
19
  }
25
- type CreateRowModels<TFeatures extends TableFeatures, TData extends RowData> = CreateRowModel_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, CreateRowModels_FeatureMap<TFeatures, TData>> & ExtractFeatureTypes<'CreateRowModels', TFeatures> & CreateRowModels_Plugins<TFeatures, TData>;
20
+ type CreateRowModels<TFeatures extends TableFeatures, TData extends RowData> = CreateRowModel_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, CreateRowModels_FeatureMap<TFeatures, TData>>;
26
21
  type CreateRowModels_All<TFeatures extends TableFeatures, TData extends RowData> = CreateRowModel_Core<TFeatures, TData> & CreateRowModel_Expanded<TFeatures, TData> & CreateRowModel_Faceted<TFeatures, TData> & CreateRowModel_Filtered<TFeatures, TData> & CreateRowModel_Grouped<TFeatures, TData> & CreateRowModel_Paginated<TFeatures, TData> & CreateRowModel_Sorted<TFeatures, TData>;
27
- interface CachedRowModels_Plugins<TFeatures extends TableFeatures, TData extends RowData> {}
28
22
  interface CachedRowModels_FeatureMap<TFeatures extends TableFeatures, TData extends RowData> {
29
23
  columnFacetingFeature: CachedRowModel_Faceted<TFeatures, TData>;
30
24
  columnFilteringFeature: CachedRowModel_Filtered<TFeatures, TData>;
@@ -35,8 +29,8 @@ interface CachedRowModels_FeatureMap<TFeatures extends TableFeatures, TData exte
35
29
  }
36
30
  type CachedRowModels<TFeatures extends TableFeatures, TData extends RowData> = {
37
31
  CachedRowModel_Core: () => RowModel<TFeatures, TData>;
38
- } & ExtractFeatureMapTypes<TFeatures, CachedRowModels_FeatureMap<TFeatures, TData>> & ExtractFeatureTypes<'CachedRowModel', TFeatures> & CachedRowModels_Plugins<TFeatures, TData>;
32
+ } & ExtractFeatureMapTypes<TFeatures, CachedRowModels_FeatureMap<TFeatures, TData>>;
39
33
  type CachedRowModel_All<TFeatures extends TableFeatures, TData extends RowData = any> = Partial<CachedRowModel_Core<TFeatures, TData> & CachedRowModel_Expanded<TFeatures, TData> & CachedRowModel_Faceted<TFeatures, TData> & CachedRowModel_Filtered<TFeatures, TData> & CachedRowModel_Grouped<TFeatures, TData> & CachedRowModel_Paginated<TFeatures, TData> & CachedRowModel_Sorted<TFeatures, TData>>;
40
34
  //#endregion
41
- export { CachedRowModel_All, CachedRowModels, CachedRowModels_FeatureMap, CachedRowModels_Plugins, CreateRowModels, CreateRowModels_All, CreateRowModels_FeatureMap, CreateRowModels_Plugins };
35
+ export { CachedRowModel_All, CachedRowModels, CachedRowModels_FeatureMap, CreateRowModels, CreateRowModels_All, CreateRowModels_FeatureMap };
42
36
  //# sourceMappingURL=RowModel.d.cts.map
@@ -3,17 +3,12 @@ import { CachedRowModel_Sorted, CreateRowModel_Sorted } from "../features/row-so
3
3
  import { CachedRowModel_Filtered, CreateRowModel_Filtered } from "../features/column-filtering/columnFilteringFeature.types.js";
4
4
  import { CachedRowModel_Expanded, CreateRowModel_Expanded } from "../features/row-expanding/rowExpandingFeature.types.js";
5
5
  import { CachedRowModel_Paginated, CreateRowModel_Paginated } from "../features/row-pagination/rowPaginationFeature.types.js";
6
- import { ExtractFeatureMapTypes, ExtractFeatureTypes, TableFeatures } from "./TableFeatures.js";
6
+ import { ExtractFeatureMapTypes, TableFeatures } from "./TableFeatures.js";
7
7
  import { CachedRowModel_Faceted, CreateRowModel_Faceted } from "../features/column-faceting/columnFacetingFeature.types.js";
8
8
  import { CachedRowModel_Core, CreateRowModel_Core, RowModel } from "../core/row-models/coreRowModelsFeature.types.js";
9
9
  import { CachedRowModel_Grouped, CreateRowModel_Grouped } from "../features/column-grouping/columnGroupingFeature.types.js";
10
10
 
11
11
  //#region src/types/RowModel.d.ts
12
- /**
13
- * Use this interface as a target for declaration merging to add your own plugin properties.
14
- * Note: This will affect the types of all tables in your project.
15
- */
16
- interface CreateRowModels_Plugins<TFeatures extends TableFeatures, TData extends RowData> {}
17
12
  interface CreateRowModels_FeatureMap<TFeatures extends TableFeatures, TData extends RowData> {
18
13
  columnFacetingFeature: CreateRowModel_Faceted<TFeatures, TData>;
19
14
  columnFilteringFeature: CreateRowModel_Filtered<TFeatures, TData>;
@@ -22,9 +17,8 @@ interface CreateRowModels_FeatureMap<TFeatures extends TableFeatures, TData exte
22
17
  rowPaginationFeature: CreateRowModel_Paginated<TFeatures, TData>;
23
18
  rowSortingFeature: CreateRowModel_Sorted<TFeatures, TData>;
24
19
  }
25
- type CreateRowModels<TFeatures extends TableFeatures, TData extends RowData> = CreateRowModel_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, CreateRowModels_FeatureMap<TFeatures, TData>> & ExtractFeatureTypes<'CreateRowModels', TFeatures> & CreateRowModels_Plugins<TFeatures, TData>;
20
+ type CreateRowModels<TFeatures extends TableFeatures, TData extends RowData> = CreateRowModel_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, CreateRowModels_FeatureMap<TFeatures, TData>>;
26
21
  type CreateRowModels_All<TFeatures extends TableFeatures, TData extends RowData> = CreateRowModel_Core<TFeatures, TData> & CreateRowModel_Expanded<TFeatures, TData> & CreateRowModel_Faceted<TFeatures, TData> & CreateRowModel_Filtered<TFeatures, TData> & CreateRowModel_Grouped<TFeatures, TData> & CreateRowModel_Paginated<TFeatures, TData> & CreateRowModel_Sorted<TFeatures, TData>;
27
- interface CachedRowModels_Plugins<TFeatures extends TableFeatures, TData extends RowData> {}
28
22
  interface CachedRowModels_FeatureMap<TFeatures extends TableFeatures, TData extends RowData> {
29
23
  columnFacetingFeature: CachedRowModel_Faceted<TFeatures, TData>;
30
24
  columnFilteringFeature: CachedRowModel_Filtered<TFeatures, TData>;
@@ -35,8 +29,8 @@ interface CachedRowModels_FeatureMap<TFeatures extends TableFeatures, TData exte
35
29
  }
36
30
  type CachedRowModels<TFeatures extends TableFeatures, TData extends RowData> = {
37
31
  CachedRowModel_Core: () => RowModel<TFeatures, TData>;
38
- } & ExtractFeatureMapTypes<TFeatures, CachedRowModels_FeatureMap<TFeatures, TData>> & ExtractFeatureTypes<'CachedRowModel', TFeatures> & CachedRowModels_Plugins<TFeatures, TData>;
32
+ } & ExtractFeatureMapTypes<TFeatures, CachedRowModels_FeatureMap<TFeatures, TData>>;
39
33
  type CachedRowModel_All<TFeatures extends TableFeatures, TData extends RowData = any> = Partial<CachedRowModel_Core<TFeatures, TData> & CachedRowModel_Expanded<TFeatures, TData> & CachedRowModel_Faceted<TFeatures, TData> & CachedRowModel_Filtered<TFeatures, TData> & CachedRowModel_Grouped<TFeatures, TData> & CachedRowModel_Paginated<TFeatures, TData> & CachedRowModel_Sorted<TFeatures, TData>>;
40
34
  //#endregion
41
- export { CachedRowModel_All, CachedRowModels, CachedRowModels_FeatureMap, CachedRowModels_Plugins, CreateRowModels, CreateRowModels_All, CreateRowModels_FeatureMap, CreateRowModels_Plugins };
35
+ export { CachedRowModel_All, CachedRowModels, CachedRowModels_FeatureMap, CreateRowModels, CreateRowModels_All, CreateRowModels_FeatureMap };
42
36
  //# sourceMappingURL=RowModel.d.ts.map
@@ -1,23 +1,18 @@
1
1
  import { RowData } from "./type-utils.cjs";
2
2
  import { RowModelFns_RowSorting } from "../features/row-sorting/rowSortingFeature.types.cjs";
3
3
  import { RowModelFns_ColumnFiltering } from "../features/column-filtering/columnFilteringFeature.types.cjs";
4
- import { ExtractFeatureMapTypes, ExtractFeatureTypes, TableFeatures } from "./TableFeatures.cjs";
4
+ import { ExtractFeatureMapTypes, TableFeatures } from "./TableFeatures.cjs";
5
5
  import { RowModelFns_ColumnGrouping } from "../features/column-grouping/columnGroupingFeature.types.cjs";
6
6
 
7
7
  //#region src/types/RowModelFns.d.ts
8
- /**
9
- * Use this interface as a target for declaration merging to add your own plugin properties.
10
- * Note: This will affect the types of all tables in your project.
11
- */
12
- interface RowModelFns_Plugins<TFeatures extends TableFeatures, TData extends RowData> {}
13
8
  interface RowModelFns_Core {}
14
9
  interface RowModelFns_FeatureMap<TFeatures extends TableFeatures, TData extends RowData> {
15
10
  columnFilteringFeature: RowModelFns_ColumnFiltering<TFeatures, TData>;
16
11
  columnGroupingFeature: RowModelFns_ColumnGrouping<TFeatures, TData>;
17
12
  rowSortingFeature: RowModelFns_RowSorting<TFeatures, TData>;
18
13
  }
19
- type RowModelFns<TFeatures extends TableFeatures, TData extends RowData> = Partial<ExtractFeatureMapTypes<TFeatures, RowModelFns_FeatureMap<TFeatures, TData>> & ExtractFeatureTypes<'RowModelFns', TFeatures> & RowModelFns_Plugins<TFeatures, TData>>;
14
+ type RowModelFns<TFeatures extends TableFeatures, TData extends RowData> = Partial<ExtractFeatureMapTypes<TFeatures, RowModelFns_FeatureMap<TFeatures, TData>>>;
20
15
  type RowModelFns_All<TFeatures extends TableFeatures, TData extends RowData> = Partial<RowModelFns_ColumnFiltering<TFeatures, TData> & RowModelFns_ColumnGrouping<TFeatures, TData> & RowModelFns_RowSorting<TFeatures, TData>>;
21
16
  //#endregion
22
- export { RowModelFns, RowModelFns_All, RowModelFns_Core, RowModelFns_FeatureMap, RowModelFns_Plugins };
17
+ export { RowModelFns, RowModelFns_All, RowModelFns_Core, RowModelFns_FeatureMap };
23
18
  //# sourceMappingURL=RowModelFns.d.cts.map
@@ -1,23 +1,18 @@
1
1
  import { RowData } from "./type-utils.js";
2
2
  import { RowModelFns_RowSorting } from "../features/row-sorting/rowSortingFeature.types.js";
3
3
  import { RowModelFns_ColumnFiltering } from "../features/column-filtering/columnFilteringFeature.types.js";
4
- import { ExtractFeatureMapTypes, ExtractFeatureTypes, TableFeatures } from "./TableFeatures.js";
4
+ import { ExtractFeatureMapTypes, TableFeatures } from "./TableFeatures.js";
5
5
  import { RowModelFns_ColumnGrouping } from "../features/column-grouping/columnGroupingFeature.types.js";
6
6
 
7
7
  //#region src/types/RowModelFns.d.ts
8
- /**
9
- * Use this interface as a target for declaration merging to add your own plugin properties.
10
- * Note: This will affect the types of all tables in your project.
11
- */
12
- interface RowModelFns_Plugins<TFeatures extends TableFeatures, TData extends RowData> {}
13
8
  interface RowModelFns_Core {}
14
9
  interface RowModelFns_FeatureMap<TFeatures extends TableFeatures, TData extends RowData> {
15
10
  columnFilteringFeature: RowModelFns_ColumnFiltering<TFeatures, TData>;
16
11
  columnGroupingFeature: RowModelFns_ColumnGrouping<TFeatures, TData>;
17
12
  rowSortingFeature: RowModelFns_RowSorting<TFeatures, TData>;
18
13
  }
19
- type RowModelFns<TFeatures extends TableFeatures, TData extends RowData> = Partial<ExtractFeatureMapTypes<TFeatures, RowModelFns_FeatureMap<TFeatures, TData>> & ExtractFeatureTypes<'RowModelFns', TFeatures> & RowModelFns_Plugins<TFeatures, TData>>;
14
+ type RowModelFns<TFeatures extends TableFeatures, TData extends RowData> = Partial<ExtractFeatureMapTypes<TFeatures, RowModelFns_FeatureMap<TFeatures, TData>>>;
20
15
  type RowModelFns_All<TFeatures extends TableFeatures, TData extends RowData> = Partial<RowModelFns_ColumnFiltering<TFeatures, TData> & RowModelFns_ColumnGrouping<TFeatures, TData> & RowModelFns_RowSorting<TFeatures, TData>>;
21
16
  //#endregion
22
- export { RowModelFns, RowModelFns_All, RowModelFns_Core, RowModelFns_FeatureMap, RowModelFns_Plugins };
17
+ export { RowModelFns, RowModelFns_All, RowModelFns_Core, RowModelFns_FeatureMap };
23
18
  //# sourceMappingURL=RowModelFns.d.ts.map
@@ -19,18 +19,13 @@ import { CachedRowModel_All, CreateRowModels_All } from "./RowModel.cjs";
19
19
  import { TableState_All } from "./TableState.cjs";
20
20
  import { Atoms_All, BaseAtoms_All, ExternalAtoms_All, Table_Table } from "../core/table/coreTablesFeature.types.cjs";
21
21
  import { TableOptions_All } from "./TableOptions.cjs";
22
- import { ExtractFeatureMapTypes, ExtractFeatureTypes, TableFeatures } from "./TableFeatures.cjs";
22
+ import { ExtractFeatureMapTypes, TableFeatures } from "./TableFeatures.cjs";
23
23
  import { Table_ColumnFaceting } from "../features/column-faceting/columnFacetingFeature.types.cjs";
24
24
  import { Table_RowModels } from "../core/row-models/coreRowModelsFeature.types.cjs";
25
25
  import { Table_ColumnGrouping } from "../features/column-grouping/columnGroupingFeature.types.cjs";
26
26
  import { ReadonlyStore } from "@tanstack/store";
27
27
 
28
28
  //#region src/types/Table.d.ts
29
- /**
30
- * Use this interface as a target for declaration merging to add your own plugin properties.
31
- * Note: This will affect the types of all tables in your project.
32
- */
33
- interface Table_Plugins<TFeatures extends TableFeatures, TData extends RowData> {}
34
29
  /**
35
30
  * The core table object that only includes the core table functionality such as column, header, row, and table APIS.
36
31
  * No features are included.
@@ -55,7 +50,7 @@ interface Table_FeatureMap<TFeatures extends TableFeatures, TData extends RowDat
55
50
  /**
56
51
  * The table object that includes both the core table functionality and the features that are enabled via the `features` table option.
57
52
  */
58
- type Table<TFeatures extends TableFeatures, TData extends RowData> = Table_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, Table_FeatureMap<TFeatures, TData>> & ExtractFeatureTypes<'Table', TFeatures> & Table_Plugins<TFeatures, TData>;
53
+ type Table<TFeatures extends TableFeatures, TData extends RowData> = Table_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, Table_FeatureMap<TFeatures, TData>>;
59
54
  type Table_Internal<TFeatures extends TableFeatures, TData extends RowData = any> = Table<TFeatures, TData> & {
60
55
  _rowModels: CachedRowModel_All<TFeatures, TData>;
61
56
  _rowModelFns: RowModelFns_All<TFeatures, TData>;
@@ -71,5 +66,5 @@ type Table_Internal<TFeatures extends TableFeatures, TData extends RowData = any
71
66
  store: ReadonlyStore<TableState_All>;
72
67
  };
73
68
  //#endregion
74
- export { Table, Table_Core, Table_FeatureMap, Table_Internal, Table_Plugins };
69
+ export { Table, Table_Core, Table_FeatureMap, Table_Internal };
75
70
  //# sourceMappingURL=Table.d.cts.map
@@ -19,18 +19,13 @@ import { CachedRowModel_All, CreateRowModels_All } from "./RowModel.js";
19
19
  import { TableState_All } from "./TableState.js";
20
20
  import { Atoms_All, BaseAtoms_All, ExternalAtoms_All, Table_Table } from "../core/table/coreTablesFeature.types.js";
21
21
  import { TableOptions_All } from "./TableOptions.js";
22
- import { ExtractFeatureMapTypes, ExtractFeatureTypes, TableFeatures } from "./TableFeatures.js";
22
+ import { ExtractFeatureMapTypes, TableFeatures } from "./TableFeatures.js";
23
23
  import { Table_ColumnFaceting } from "../features/column-faceting/columnFacetingFeature.types.js";
24
24
  import { Table_RowModels } from "../core/row-models/coreRowModelsFeature.types.js";
25
25
  import { Table_ColumnGrouping } from "../features/column-grouping/columnGroupingFeature.types.js";
26
26
  import { ReadonlyStore } from "@tanstack/store";
27
27
 
28
28
  //#region src/types/Table.d.ts
29
- /**
30
- * Use this interface as a target for declaration merging to add your own plugin properties.
31
- * Note: This will affect the types of all tables in your project.
32
- */
33
- interface Table_Plugins<TFeatures extends TableFeatures, TData extends RowData> {}
34
29
  /**
35
30
  * The core table object that only includes the core table functionality such as column, header, row, and table APIS.
36
31
  * No features are included.
@@ -55,7 +50,7 @@ interface Table_FeatureMap<TFeatures extends TableFeatures, TData extends RowDat
55
50
  /**
56
51
  * The table object that includes both the core table functionality and the features that are enabled via the `features` table option.
57
52
  */
58
- type Table<TFeatures extends TableFeatures, TData extends RowData> = Table_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, Table_FeatureMap<TFeatures, TData>> & ExtractFeatureTypes<'Table', TFeatures> & Table_Plugins<TFeatures, TData>;
53
+ type Table<TFeatures extends TableFeatures, TData extends RowData> = Table_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, Table_FeatureMap<TFeatures, TData>>;
59
54
  type Table_Internal<TFeatures extends TableFeatures, TData extends RowData = any> = Table<TFeatures, TData> & {
60
55
  _rowModels: CachedRowModel_All<TFeatures, TData>;
61
56
  _rowModelFns: RowModelFns_All<TFeatures, TData>;
@@ -71,5 +66,5 @@ type Table_Internal<TFeatures extends TableFeatures, TData extends RowData = any
71
66
  store: ReadonlyStore<TableState_All>;
72
67
  };
73
68
  //#endregion
74
- export { Table, Table_Core, Table_FeatureMap, Table_Internal, Table_Plugins };
69
+ export { Table, Table_Core, Table_FeatureMap, Table_Internal };
75
70
  //# sourceMappingURL=Table.d.ts.map
@@ -8,72 +8,46 @@ import { StockFeatures } from "../features/stockFeatures.cjs";
8
8
  import { Table_Internal } from "./Table.cjs";
9
9
 
10
10
  //#region src/types/TableFeatures.d.ts
11
- type ExtractFeatureTypes<TKey extends keyof FeatureConstructors, TFeatures extends TableFeatures> = UnionToIntersection<{ [K in keyof TFeatures]: K extends 'coreReativityFeature' ? never : TFeatures[K] extends TableFeature<infer FeatureConstructorOptions> ? TKey extends keyof FeatureConstructorOptions ? FeatureConstructorOptions[TKey] : never : any }[keyof TFeatures]>;
12
11
  type IsAny<T> = 0 extends 1 & T ? true : false;
13
- type ExtractFeatureMapTypes<TFeatures extends TableFeatures, TFeatureMap extends object> = IsAny<TFeatures> extends true ? UnionToIntersection<TFeatureMap[keyof TFeatureMap]> : UnionToIntersection<TFeatureMap[Extract<keyof TFeatures, keyof TFeatureMap>]>;
14
- interface FeatureConstructors {
15
- CachedRowModel?: any;
16
- Cell?: any;
17
- Column?: any;
18
- ColumnDef?: any;
19
- CreateRowModels?: any;
20
- Header?: any;
21
- HeaderGroup?: any;
22
- Row?: any;
23
- RowModelFns?: any;
24
- Table?: any;
25
- TableOptions?: any;
26
- TableState?: any;
27
- }
12
+ type UnionToIntersectionOrEmpty<T> = [T] extends [never] ? {} : UnionToIntersection<T> & {};
13
+ type ExtractFeatureMapTypes<TFeatures extends TableFeatures, TFeatureMap extends object> = IsAny<TFeatures> extends true ? UnionToIntersection<TFeatureMap[keyof TFeatureMap]> : UnionToIntersectionOrEmpty<TFeatureMap[Extract<keyof TFeatures, keyof TFeatureMap>]>;
28
14
  interface Plugins {}
29
15
  interface TableFeatures extends Partial<CoreFeatures>, Partial<StockFeatures>, Partial<Plugins> {}
30
- type ConstructTableAPIs<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData> & Partial<TConstructors['Table']> & {
31
- options: Partial<TConstructors['TableOptions']>;
32
- }) => void;
33
- type GetDefaultColumnDef<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>() => ColumnDefBase_All<TFeatures, TData, TValue> & Partial<TConstructors['ColumnDef']>;
34
- type GetDefaultTableOptions<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData> & Partial<TConstructors['Table']>) => Partial<TableOptions_All<TFeatures, TData>> & Partial<TConstructors['TableOptions']>;
35
- type GetInitialState<TConstructors extends FeatureConstructors> = (initialState: Partial<TableState_All> & Partial<TConstructors['TableState']>) => TableState_All & Partial<TConstructors['TableState']>;
36
- type GetDefaultStateSelector<TConstructors extends FeatureConstructors> = (state: TableState_All) => Partial<TableState_All> & Partial<TConstructors['TableState']>;
37
- type AssignCellPrototype<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
38
- type AssignColumnPrototype<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
39
- type AssignHeaderPrototype<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
40
- type AssignRowPrototype<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
41
- type InitRowInstanceData<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData> & Partial<TConstructors['Row']>) => void;
42
- interface TableFeature<TConstructors extends FeatureConstructors> {
16
+ interface TableFeature {
43
17
  /**
44
18
  * Assigns Cell APIs to the cell prototype for memory-efficient method sharing.
45
19
  * This is called once per table to build a shared prototype for all cells.
46
20
  */
47
- assignCellPrototype?: AssignCellPrototype<TConstructors>;
21
+ assignCellPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
48
22
  /**
49
23
  * Assigns Column APIs to the column prototype for memory-efficient method sharing.
50
24
  * This is called once per table to build a shared prototype for all columns.
51
25
  */
52
- assignColumnPrototype?: AssignColumnPrototype<TConstructors>;
26
+ assignColumnPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
53
27
  /**
54
28
  * Assigns Header APIs to the header prototype for memory-efficient method sharing.
55
29
  * This is called once per table to build a shared prototype for all headers.
56
30
  */
57
- assignHeaderPrototype?: AssignHeaderPrototype<TConstructors>;
31
+ assignHeaderPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
58
32
  /**
59
33
  * Assigns Row APIs to the row prototype for memory-efficient method sharing.
60
34
  * This is called once per table to build a shared prototype for all rows.
61
35
  */
62
- assignRowPrototype?: AssignRowPrototype<TConstructors>;
36
+ assignRowPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
63
37
  /**
64
38
  * Assigns Table APIs to the table instance.
65
39
  * Unlike row/cell/column/header, the table is a singleton so methods are assigned directly.
66
40
  */
67
- constructTableAPIs?: ConstructTableAPIs<TConstructors>;
68
- getDefaultColumnDef?: GetDefaultColumnDef<TConstructors>;
69
- getDefaultTableOptions?: GetDefaultTableOptions<TConstructors>;
70
- getInitialState?: GetInitialState<TConstructors>;
41
+ constructTableAPIs?: <TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>) => void;
42
+ getDefaultColumnDef?: <TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>() => ColumnDefBase_All<TFeatures, TData, TValue>;
43
+ getDefaultTableOptions?: <TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>) => Partial<TableOptions_All<TFeatures, TData>>;
44
+ getInitialState?: (initialState: Partial<TableState_All>) => TableState_All;
71
45
  /**
72
46
  * Initializes instance-specific data on each row (e.g., caches).
73
47
  * Methods should be assigned via assignRowPrototype instead.
74
48
  */
75
- initRowInstanceData?: InitRowInstanceData<TConstructors>;
49
+ initRowInstanceData?: <TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData>) => void;
76
50
  }
77
51
  //#endregion
78
- export { AssignCellPrototype, AssignColumnPrototype, AssignHeaderPrototype, AssignRowPrototype, ConstructTableAPIs, ExtractFeatureMapTypes, ExtractFeatureTypes, FeatureConstructors, GetDefaultColumnDef, GetDefaultStateSelector, GetDefaultTableOptions, GetInitialState, InitRowInstanceData, Plugins, TableFeature, TableFeatures };
52
+ export { ExtractFeatureMapTypes, Plugins, TableFeature, TableFeatures };
79
53
  //# sourceMappingURL=TableFeatures.d.cts.map
@@ -8,72 +8,46 @@ import { StockFeatures } from "../features/stockFeatures.js";
8
8
  import { Table_Internal } from "./Table.js";
9
9
 
10
10
  //#region src/types/TableFeatures.d.ts
11
- type ExtractFeatureTypes<TKey extends keyof FeatureConstructors, TFeatures extends TableFeatures> = UnionToIntersection<{ [K in keyof TFeatures]: K extends 'coreReativityFeature' ? never : TFeatures[K] extends TableFeature<infer FeatureConstructorOptions> ? TKey extends keyof FeatureConstructorOptions ? FeatureConstructorOptions[TKey] : never : any }[keyof TFeatures]>;
12
11
  type IsAny<T> = 0 extends 1 & T ? true : false;
13
- type ExtractFeatureMapTypes<TFeatures extends TableFeatures, TFeatureMap extends object> = IsAny<TFeatures> extends true ? UnionToIntersection<TFeatureMap[keyof TFeatureMap]> : UnionToIntersection<TFeatureMap[Extract<keyof TFeatures, keyof TFeatureMap>]>;
14
- interface FeatureConstructors {
15
- CachedRowModel?: any;
16
- Cell?: any;
17
- Column?: any;
18
- ColumnDef?: any;
19
- CreateRowModels?: any;
20
- Header?: any;
21
- HeaderGroup?: any;
22
- Row?: any;
23
- RowModelFns?: any;
24
- Table?: any;
25
- TableOptions?: any;
26
- TableState?: any;
27
- }
12
+ type UnionToIntersectionOrEmpty<T> = [T] extends [never] ? {} : UnionToIntersection<T> & {};
13
+ type ExtractFeatureMapTypes<TFeatures extends TableFeatures, TFeatureMap extends object> = IsAny<TFeatures> extends true ? UnionToIntersection<TFeatureMap[keyof TFeatureMap]> : UnionToIntersectionOrEmpty<TFeatureMap[Extract<keyof TFeatures, keyof TFeatureMap>]>;
28
14
  interface Plugins {}
29
15
  interface TableFeatures extends Partial<CoreFeatures>, Partial<StockFeatures>, Partial<Plugins> {}
30
- type ConstructTableAPIs<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData> & Partial<TConstructors['Table']> & {
31
- options: Partial<TConstructors['TableOptions']>;
32
- }) => void;
33
- type GetDefaultColumnDef<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>() => ColumnDefBase_All<TFeatures, TData, TValue> & Partial<TConstructors['ColumnDef']>;
34
- type GetDefaultTableOptions<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData> & Partial<TConstructors['Table']>) => Partial<TableOptions_All<TFeatures, TData>> & Partial<TConstructors['TableOptions']>;
35
- type GetInitialState<TConstructors extends FeatureConstructors> = (initialState: Partial<TableState_All> & Partial<TConstructors['TableState']>) => TableState_All & Partial<TConstructors['TableState']>;
36
- type GetDefaultStateSelector<TConstructors extends FeatureConstructors> = (state: TableState_All) => Partial<TableState_All> & Partial<TConstructors['TableState']>;
37
- type AssignCellPrototype<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
38
- type AssignColumnPrototype<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
39
- type AssignHeaderPrototype<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
40
- type AssignRowPrototype<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
41
- type InitRowInstanceData<TConstructors extends FeatureConstructors> = <TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData> & Partial<TConstructors['Row']>) => void;
42
- interface TableFeature<TConstructors extends FeatureConstructors> {
16
+ interface TableFeature {
43
17
  /**
44
18
  * Assigns Cell APIs to the cell prototype for memory-efficient method sharing.
45
19
  * This is called once per table to build a shared prototype for all cells.
46
20
  */
47
- assignCellPrototype?: AssignCellPrototype<TConstructors>;
21
+ assignCellPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
48
22
  /**
49
23
  * Assigns Column APIs to the column prototype for memory-efficient method sharing.
50
24
  * This is called once per table to build a shared prototype for all columns.
51
25
  */
52
- assignColumnPrototype?: AssignColumnPrototype<TConstructors>;
26
+ assignColumnPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
53
27
  /**
54
28
  * Assigns Header APIs to the header prototype for memory-efficient method sharing.
55
29
  * This is called once per table to build a shared prototype for all headers.
56
30
  */
57
- assignHeaderPrototype?: AssignHeaderPrototype<TConstructors>;
31
+ assignHeaderPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
58
32
  /**
59
33
  * Assigns Row APIs to the row prototype for memory-efficient method sharing.
60
34
  * This is called once per table to build a shared prototype for all rows.
61
35
  */
62
- assignRowPrototype?: AssignRowPrototype<TConstructors>;
36
+ assignRowPrototype?: <TFeatures extends TableFeatures, TData extends RowData>(prototype: Record<string, any>, table: Table_Internal<TFeatures, TData>) => void;
63
37
  /**
64
38
  * Assigns Table APIs to the table instance.
65
39
  * Unlike row/cell/column/header, the table is a singleton so methods are assigned directly.
66
40
  */
67
- constructTableAPIs?: ConstructTableAPIs<TConstructors>;
68
- getDefaultColumnDef?: GetDefaultColumnDef<TConstructors>;
69
- getDefaultTableOptions?: GetDefaultTableOptions<TConstructors>;
70
- getInitialState?: GetInitialState<TConstructors>;
41
+ constructTableAPIs?: <TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>) => void;
42
+ getDefaultColumnDef?: <TFeatures extends TableFeatures, TData extends RowData, TValue extends CellData = CellData>() => ColumnDefBase_All<TFeatures, TData, TValue>;
43
+ getDefaultTableOptions?: <TFeatures extends TableFeatures, TData extends RowData>(table: Table_Internal<TFeatures, TData>) => Partial<TableOptions_All<TFeatures, TData>>;
44
+ getInitialState?: (initialState: Partial<TableState_All>) => TableState_All;
71
45
  /**
72
46
  * Initializes instance-specific data on each row (e.g., caches).
73
47
  * Methods should be assigned via assignRowPrototype instead.
74
48
  */
75
- initRowInstanceData?: InitRowInstanceData<TConstructors>;
49
+ initRowInstanceData?: <TFeatures extends TableFeatures, TData extends RowData>(row: Row<TFeatures, TData>) => void;
76
50
  }
77
51
  //#endregion
78
- export { AssignCellPrototype, AssignColumnPrototype, AssignHeaderPrototype, AssignRowPrototype, ConstructTableAPIs, ExtractFeatureMapTypes, ExtractFeatureTypes, FeatureConstructors, GetDefaultColumnDef, GetDefaultStateSelector, GetDefaultTableOptions, GetInitialState, InitRowInstanceData, Plugins, TableFeature, TableFeatures };
52
+ export { ExtractFeatureMapTypes, Plugins, TableFeature, TableFeatures };
79
53
  //# sourceMappingURL=TableFeatures.d.ts.map
@@ -16,11 +16,10 @@ import { TableOptions_Rows } from "../core/rows/coreRowsFeature.types.cjs";
16
16
  import { TableOptions_Cell } from "../core/cells/coreCellsFeature.types.cjs";
17
17
  import { TableOptions_RowPagination } from "../features/row-pagination/rowPaginationFeature.types.cjs";
18
18
  import { TableOptions_Table } from "../core/table/coreTablesFeature.types.cjs";
19
- import { ExtractFeatureMapTypes, ExtractFeatureTypes, TableFeatures } from "./TableFeatures.cjs";
19
+ import { ExtractFeatureMapTypes, TableFeatures } from "./TableFeatures.cjs";
20
20
  import { TableOptions_ColumnGrouping } from "../features/column-grouping/columnGroupingFeature.types.cjs";
21
21
 
22
22
  //#region src/types/TableOptions.d.ts
23
- interface TableOptions_Plugins<TFeatures extends TableFeatures, TData extends RowData> {}
24
23
  /**
25
24
  * Core options that are always available on a table, before optional feature
26
25
  * options are mixed in.
@@ -59,12 +58,12 @@ type TableOptions_FeatureMap_All<TFeatures extends TableFeatures, TData extends
59
58
  * `TFeatures`, then custom feature/plugin options and debug options are mixed
60
59
  * in.
61
60
  */
62
- type TableOptions<TFeatures extends TableFeatures, TData extends RowData> = TableOptions_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, TableOptions_FeatureMap<TFeatures, TData>> & ExtractFeatureTypes<'TableOptions', TFeatures> & TableOptions_Plugins<TFeatures, TData> & DebugOptions<TFeatures>;
61
+ type TableOptions<TFeatures extends TableFeatures, TData extends RowData> = TableOptions_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, TableOptions_FeatureMap<TFeatures, TData>> & DebugOptions<TFeatures>;
63
62
  /**
64
63
  * Internal broad option shape used where feature code may need to read options
65
64
  * from features that are not present in the current generic feature set.
66
65
  */
67
66
  type TableOptions_All<TFeatures extends TableFeatures, TData extends RowData> = TableOptions_Core<TFeatures, TData> & Partial<TableOptions_FeatureMap_All<TFeatures, TData>>;
68
67
  //#endregion
69
- export { DebugOptions, TableOptions, TableOptions_All, TableOptions_Core, TableOptions_FeatureMap, TableOptions_FeatureMap_All, TableOptions_Plugins };
68
+ export { DebugOptions, TableOptions, TableOptions_All, TableOptions_Core, TableOptions_FeatureMap, TableOptions_FeatureMap_All };
70
69
  //# sourceMappingURL=TableOptions.d.cts.map
@@ -16,11 +16,10 @@ import { TableOptions_Rows } from "../core/rows/coreRowsFeature.types.js";
16
16
  import { TableOptions_Cell } from "../core/cells/coreCellsFeature.types.js";
17
17
  import { TableOptions_RowPagination } from "../features/row-pagination/rowPaginationFeature.types.js";
18
18
  import { TableOptions_Table } from "../core/table/coreTablesFeature.types.js";
19
- import { ExtractFeatureMapTypes, ExtractFeatureTypes, TableFeatures } from "./TableFeatures.js";
19
+ import { ExtractFeatureMapTypes, TableFeatures } from "./TableFeatures.js";
20
20
  import { TableOptions_ColumnGrouping } from "../features/column-grouping/columnGroupingFeature.types.js";
21
21
 
22
22
  //#region src/types/TableOptions.d.ts
23
- interface TableOptions_Plugins<TFeatures extends TableFeatures, TData extends RowData> {}
24
23
  /**
25
24
  * Core options that are always available on a table, before optional feature
26
25
  * options are mixed in.
@@ -59,12 +58,12 @@ type TableOptions_FeatureMap_All<TFeatures extends TableFeatures, TData extends
59
58
  * `TFeatures`, then custom feature/plugin options and debug options are mixed
60
59
  * in.
61
60
  */
62
- type TableOptions<TFeatures extends TableFeatures, TData extends RowData> = TableOptions_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, TableOptions_FeatureMap<TFeatures, TData>> & ExtractFeatureTypes<'TableOptions', TFeatures> & TableOptions_Plugins<TFeatures, TData> & DebugOptions<TFeatures>;
61
+ type TableOptions<TFeatures extends TableFeatures, TData extends RowData> = TableOptions_Core<TFeatures, TData> & ExtractFeatureMapTypes<TFeatures, TableOptions_FeatureMap<TFeatures, TData>> & DebugOptions<TFeatures>;
63
62
  /**
64
63
  * Internal broad option shape used where feature code may need to read options
65
64
  * from features that are not present in the current generic feature set.
66
65
  */
67
66
  type TableOptions_All<TFeatures extends TableFeatures, TData extends RowData> = TableOptions_Core<TFeatures, TData> & Partial<TableOptions_FeatureMap_All<TFeatures, TData>>;
68
67
  //#endregion
69
- export { DebugOptions, TableOptions, TableOptions_All, TableOptions_Core, TableOptions_FeatureMap, TableOptions_FeatureMap_All, TableOptions_Plugins };
68
+ export { DebugOptions, TableOptions, TableOptions_All, TableOptions_Core, TableOptions_FeatureMap, TableOptions_FeatureMap_All };
70
69
  //# sourceMappingURL=TableOptions.d.ts.map
@@ -10,15 +10,10 @@ import { TableState_RowExpanding } from "../features/row-expanding/rowExpandingF
10
10
  import { TableState_RowPinning } from "../features/row-pinning/rowPinningFeature.types.cjs";
11
11
  import { TableState_RowSelection } from "../features/row-selection/rowSelectionFeature.types.cjs";
12
12
  import { TableState_RowPagination } from "../features/row-pagination/rowPaginationFeature.types.cjs";
13
- import { ExtractFeatureMapTypes, ExtractFeatureTypes, TableFeatures } from "./TableFeatures.cjs";
13
+ import { ExtractFeatureMapTypes, TableFeatures } from "./TableFeatures.cjs";
14
14
  import { TableState_ColumnGrouping } from "../features/column-grouping/columnGroupingFeature.types.cjs";
15
15
 
16
16
  //#region src/types/TableState.d.ts
17
- /**
18
- * Use this interface as a target for declaration merging to add your own state properties.
19
- * Note: This will affect the types of all tables in your project.
20
- */
21
- interface TableState_Plugins<TFeatures extends TableFeatures> {}
22
17
  interface TableState_FeatureMap {
23
18
  columnFilteringFeature: TableState_ColumnFiltering;
24
19
  columnGroupingFeature: TableState_ColumnGrouping;
@@ -40,14 +35,14 @@ interface TableState_FeatureMap {
40
35
  * State slices are included only when their feature is present in `TFeatures`,
41
36
  * then custom feature/plugin state is mixed in.
42
37
  */
43
- type TableState<TFeatures extends TableFeatures> = ExtractFeatureMapTypes<TFeatures, TableState_FeatureMap> & ExtractFeatureTypes<'TableState', TFeatures> & TableState_Plugins<TFeatures>;
38
+ type TableState<TFeatures extends TableFeatures> = ExtractFeatureMapTypes<TFeatures, TableState_FeatureMap>;
44
39
  /**
45
- * Internal broad state shape containing every stock feature state slice.
40
+ * Internal broad state shape containing every registered feature state slice.
46
41
  *
47
42
  * Feature internals use this when they may need to inspect optional slices owned
48
43
  * by other features.
49
44
  */
50
- type TableState_All = Partial<TableState_ColumnFiltering & TableState_ColumnGrouping & TableState_ColumnOrdering & TableState_ColumnPinning & TableState_ColumnResizing & TableState_ColumnSizing & TableState_ColumnVisibility & TableState_GlobalFiltering & TableState_RowExpanding & TableState_RowPagination & TableState_RowPinning & TableState_RowSelection & TableState_RowSorting>;
45
+ type TableState_All = Partial<TableState<TableFeatures>>;
51
46
  //#endregion
52
- export { TableState, TableState_All, TableState_FeatureMap, TableState_Plugins };
47
+ export { TableState, TableState_All, TableState_FeatureMap };
53
48
  //# sourceMappingURL=TableState.d.cts.map
@@ -10,15 +10,10 @@ import { TableState_RowExpanding } from "../features/row-expanding/rowExpandingF
10
10
  import { TableState_RowPinning } from "../features/row-pinning/rowPinningFeature.types.js";
11
11
  import { TableState_RowSelection } from "../features/row-selection/rowSelectionFeature.types.js";
12
12
  import { TableState_RowPagination } from "../features/row-pagination/rowPaginationFeature.types.js";
13
- import { ExtractFeatureMapTypes, ExtractFeatureTypes, TableFeatures } from "./TableFeatures.js";
13
+ import { ExtractFeatureMapTypes, TableFeatures } from "./TableFeatures.js";
14
14
  import { TableState_ColumnGrouping } from "../features/column-grouping/columnGroupingFeature.types.js";
15
15
 
16
16
  //#region src/types/TableState.d.ts
17
- /**
18
- * Use this interface as a target for declaration merging to add your own state properties.
19
- * Note: This will affect the types of all tables in your project.
20
- */
21
- interface TableState_Plugins<TFeatures extends TableFeatures> {}
22
17
  interface TableState_FeatureMap {
23
18
  columnFilteringFeature: TableState_ColumnFiltering;
24
19
  columnGroupingFeature: TableState_ColumnGrouping;
@@ -40,14 +35,14 @@ interface TableState_FeatureMap {
40
35
  * State slices are included only when their feature is present in `TFeatures`,
41
36
  * then custom feature/plugin state is mixed in.
42
37
  */
43
- type TableState<TFeatures extends TableFeatures> = ExtractFeatureMapTypes<TFeatures, TableState_FeatureMap> & ExtractFeatureTypes<'TableState', TFeatures> & TableState_Plugins<TFeatures>;
38
+ type TableState<TFeatures extends TableFeatures> = ExtractFeatureMapTypes<TFeatures, TableState_FeatureMap>;
44
39
  /**
45
- * Internal broad state shape containing every stock feature state slice.
40
+ * Internal broad state shape containing every registered feature state slice.
46
41
  *
47
42
  * Feature internals use this when they may need to inspect optional slices owned
48
43
  * by other features.
49
44
  */
50
- type TableState_All = Partial<TableState_ColumnFiltering & TableState_ColumnGrouping & TableState_ColumnOrdering & TableState_ColumnPinning & TableState_ColumnResizing & TableState_ColumnSizing & TableState_ColumnVisibility & TableState_GlobalFiltering & TableState_RowExpanding & TableState_RowPagination & TableState_RowPinning & TableState_RowSelection & TableState_RowSorting>;
45
+ type TableState_All = Partial<TableState<TableFeatures>>;
51
46
  //#endregion
52
- export { TableState, TableState_All, TableState_FeatureMap, TableState_Plugins };
47
+ export { TableState, TableState_All, TableState_FeatureMap };
53
48
  //# sourceMappingURL=TableState.d.ts.map