@tanstack/table-core 9.0.0-beta.51 → 9.0.0-beta.53
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.
- package/dist/core/cells/constructCell.d.ts +1 -2
- package/dist/core/cells/constructCell.js +1 -2
- package/dist/core/cells/coreCellsFeature.d.ts +1 -2
- package/dist/core/cells/coreCellsFeature.js +1 -2
- package/dist/core/cells/coreCellsFeature.types.d.ts +1 -2
- package/dist/core/cells/coreCellsFeature.utils.d.ts +1 -2
- package/dist/core/cells/coreCellsFeature.utils.js +1 -2
- package/dist/core/columns/constructColumn.d.ts +1 -2
- package/dist/core/columns/constructColumn.js +1 -2
- package/dist/core/columns/coreColumnsFeature.d.ts +1 -2
- package/dist/core/columns/coreColumnsFeature.js +1 -2
- package/dist/core/columns/coreColumnsFeature.types.d.ts +1 -2
- package/dist/core/columns/coreColumnsFeature.utils.d.ts +1 -2
- package/dist/core/columns/coreColumnsFeature.utils.js +1 -2
- package/dist/core/coreFeatures.d.ts +1 -2
- package/dist/core/coreFeatures.js +1 -2
- package/dist/core/headers/buildHeaderGroups.d.ts +1 -2
- package/dist/core/headers/buildHeaderGroups.js +1 -2
- package/dist/core/headers/constructHeader.d.ts +1 -2
- package/dist/core/headers/constructHeader.js +1 -2
- package/dist/core/headers/coreHeadersFeature.d.ts +1 -2
- package/dist/core/headers/coreHeadersFeature.js +1 -2
- package/dist/core/headers/coreHeadersFeature.types.d.ts +1 -2
- package/dist/core/headers/coreHeadersFeature.utils.d.ts +1 -2
- package/dist/core/headers/coreHeadersFeature.utils.js +1 -2
- package/dist/core/reactivity/coreReactivityFeature.types.d.ts +1 -2
- package/dist/core/reactivity/coreReactivityFeature.utils.d.ts +1 -2
- package/dist/core/reactivity/coreReactivityFeature.utils.js +1 -2
- package/dist/core/row-models/coreRowModelsFeature.d.ts +1 -2
- package/dist/core/row-models/coreRowModelsFeature.js +1 -2
- package/dist/core/row-models/coreRowModelsFeature.types.d.ts +1 -2
- package/dist/core/row-models/coreRowModelsFeature.utils.d.ts +1 -2
- package/dist/core/row-models/coreRowModelsFeature.utils.js +1 -2
- package/dist/core/row-models/createCoreRowModel.d.ts +1 -2
- package/dist/core/row-models/createCoreRowModel.js +1 -2
- package/dist/core/rows/constructRow.d.ts +1 -2
- package/dist/core/rows/constructRow.js +1 -2
- package/dist/core/rows/coreRowsFeature.d.ts +1 -2
- package/dist/core/rows/coreRowsFeature.js +1 -2
- package/dist/core/rows/coreRowsFeature.types.d.ts +1 -2
- package/dist/core/rows/coreRowsFeature.utils.d.ts +1 -2
- package/dist/core/rows/coreRowsFeature.utils.js +1 -2
- package/dist/core/table/constructTable.d.ts +1 -2
- package/dist/core/table/constructTable.js +1 -2
- package/dist/core/table/coreTablesFeature.d.ts +1 -2
- package/dist/core/table/coreTablesFeature.js +1 -2
- package/dist/core/table/coreTablesFeature.types.d.ts +1 -2
- package/dist/core/table/coreTablesFeature.utils.d.ts +1 -2
- package/dist/core/table/coreTablesFeature.utils.js +1 -2
- package/dist/features/column-faceting/columnFacetingFeature.d.ts +1 -2
- package/dist/features/column-faceting/columnFacetingFeature.js +1 -2
- package/dist/features/column-faceting/columnFacetingFeature.types.d.ts +1 -2
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.ts +1 -2
- package/dist/features/column-faceting/columnFacetingFeature.utils.js +1 -2
- package/dist/features/column-faceting/createFacetedMinMaxValues.d.ts +1 -2
- package/dist/features/column-faceting/createFacetedMinMaxValues.js +1 -2
- package/dist/features/column-faceting/createFacetedRowModel.d.ts +1 -2
- package/dist/features/column-faceting/createFacetedRowModel.js +1 -2
- package/dist/features/column-faceting/createFacetedUniqueValues.d.ts +1 -2
- package/dist/features/column-faceting/createFacetedUniqueValues.js +1 -2
- package/dist/features/column-filtering/columnFilteringFeature.d.ts +1 -2
- package/dist/features/column-filtering/columnFilteringFeature.js +1 -2
- package/dist/features/column-filtering/columnFilteringFeature.types.d.ts +1 -2
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.ts +1 -2
- package/dist/features/column-filtering/columnFilteringFeature.utils.js +1 -2
- package/dist/features/column-filtering/createFilteredRowModel.d.ts +1 -2
- package/dist/features/column-filtering/createFilteredRowModel.js +1 -2
- package/dist/features/column-filtering/filterFns.d.ts +1 -2
- package/dist/features/column-filtering/filterFns.js +1 -2
- package/dist/features/column-filtering/filterRowsUtils.js +1 -2
- package/dist/features/column-grouping/columnGroupingFeature.d.ts +1 -2
- package/dist/features/column-grouping/columnGroupingFeature.js +1 -2
- package/dist/features/column-grouping/columnGroupingFeature.types.d.ts +1 -2
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.ts +1 -2
- package/dist/features/column-grouping/columnGroupingFeature.utils.js +1 -2
- package/dist/features/column-grouping/createGroupedRowModel.d.ts +1 -2
- package/dist/features/column-grouping/createGroupedRowModel.js +21 -14
- package/dist/features/column-ordering/columnOrderingFeature.d.ts +1 -2
- package/dist/features/column-ordering/columnOrderingFeature.js +1 -2
- package/dist/features/column-ordering/columnOrderingFeature.types.d.ts +1 -2
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.ts +1 -2
- package/dist/features/column-ordering/columnOrderingFeature.utils.js +1 -2
- package/dist/features/column-pinning/columnPinningFeature.d.ts +1 -2
- package/dist/features/column-pinning/columnPinningFeature.js +1 -2
- package/dist/features/column-pinning/columnPinningFeature.types.d.ts +1 -2
- package/dist/features/column-pinning/columnPinningFeature.utils.d.ts +1 -2
- package/dist/features/column-pinning/columnPinningFeature.utils.js +1 -2
- package/dist/features/column-resizing/columnResizingFeature.d.ts +1 -2
- package/dist/features/column-resizing/columnResizingFeature.js +1 -2
- package/dist/features/column-resizing/columnResizingFeature.types.d.ts +1 -2
- package/dist/features/column-resizing/columnResizingFeature.utils.d.ts +1 -2
- package/dist/features/column-resizing/columnResizingFeature.utils.js +1 -2
- package/dist/features/column-sizing/columnSizingFeature.d.ts +1 -2
- package/dist/features/column-sizing/columnSizingFeature.js +1 -2
- package/dist/features/column-sizing/columnSizingFeature.types.d.ts +1 -2
- package/dist/features/column-sizing/columnSizingFeature.utils.d.ts +1 -2
- package/dist/features/column-sizing/columnSizingFeature.utils.js +1 -2
- package/dist/features/column-visibility/columnVisibilityFeature.d.ts +1 -2
- package/dist/features/column-visibility/columnVisibilityFeature.js +1 -2
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.ts +1 -2
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.ts +1 -2
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js +1 -2
- package/dist/features/global-filtering/globalFilteringFeature.d.ts +1 -2
- package/dist/features/global-filtering/globalFilteringFeature.js +1 -2
- package/dist/features/global-filtering/globalFilteringFeature.types.d.ts +1 -2
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.ts +1 -2
- package/dist/features/global-filtering/globalFilteringFeature.utils.js +1 -2
- package/dist/features/row-aggregation/aggregationFns.d.ts +1 -2
- package/dist/features/row-aggregation/aggregationFns.js +81 -37
- package/dist/features/row-aggregation/rowAggregationFeature.d.ts +1 -2
- package/dist/features/row-aggregation/rowAggregationFeature.js +2 -6
- package/dist/features/row-aggregation/rowAggregationFeature.types.d.ts +3 -4
- package/dist/features/row-aggregation/rowAggregationFeature.types.js +1 -2
- package/dist/features/row-aggregation/rowAggregationFeature.utils.d.ts +15 -2
- package/dist/features/row-aggregation/rowAggregationFeature.utils.js +35 -6
- package/dist/features/row-expanding/createExpandedRowModel.d.ts +1 -2
- package/dist/features/row-expanding/createExpandedRowModel.js +1 -2
- package/dist/features/row-expanding/rowExpandingFeature.d.ts +1 -2
- package/dist/features/row-expanding/rowExpandingFeature.js +1 -2
- package/dist/features/row-expanding/rowExpandingFeature.types.d.ts +1 -2
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.ts +1 -2
- package/dist/features/row-expanding/rowExpandingFeature.utils.js +1 -2
- package/dist/features/row-pagination/createPaginatedRowModel.d.ts +1 -2
- package/dist/features/row-pagination/createPaginatedRowModel.js +1 -2
- package/dist/features/row-pagination/rowPaginationFeature.d.ts +1 -2
- package/dist/features/row-pagination/rowPaginationFeature.js +1 -2
- package/dist/features/row-pagination/rowPaginationFeature.types.d.ts +1 -2
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.ts +1 -2
- package/dist/features/row-pagination/rowPaginationFeature.utils.js +1 -2
- package/dist/features/row-pinning/rowPinningFeature.d.ts +1 -2
- package/dist/features/row-pinning/rowPinningFeature.js +1 -2
- package/dist/features/row-pinning/rowPinningFeature.types.d.ts +1 -2
- package/dist/features/row-pinning/rowPinningFeature.utils.d.ts +1 -2
- package/dist/features/row-pinning/rowPinningFeature.utils.js +1 -2
- package/dist/features/row-selection/rowSelectionFeature.d.ts +1 -2
- package/dist/features/row-selection/rowSelectionFeature.js +1 -2
- package/dist/features/row-selection/rowSelectionFeature.types.d.ts +1 -2
- package/dist/features/row-selection/rowSelectionFeature.utils.d.ts +1 -2
- package/dist/features/row-selection/rowSelectionFeature.utils.js +1 -2
- package/dist/features/row-sorting/createSortedRowModel.d.ts +1 -2
- package/dist/features/row-sorting/createSortedRowModel.js +1 -2
- package/dist/features/row-sorting/rowSortingFeature.d.ts +1 -2
- package/dist/features/row-sorting/rowSortingFeature.js +1 -2
- package/dist/features/row-sorting/rowSortingFeature.types.d.ts +1 -2
- package/dist/features/row-sorting/rowSortingFeature.utils.d.ts +1 -2
- package/dist/features/row-sorting/rowSortingFeature.utils.js +1 -2
- package/dist/features/row-sorting/sortFns.d.ts +1 -2
- package/dist/features/row-sorting/sortFns.js +1 -2
- package/dist/features/stockFeatures.d.ts +1 -2
- package/dist/features/stockFeatures.js +1 -2
- package/dist/flex-render.d.ts +1 -2
- package/dist/flex-render.js +1 -2
- package/dist/helpers/columnHelper.d.ts +1 -2
- package/dist/helpers/columnHelper.js +1 -2
- package/dist/helpers/metaHelper.d.ts +1 -2
- package/dist/helpers/metaHelper.js +1 -2
- package/dist/helpers/tableFeatures.d.ts +1 -2
- package/dist/helpers/tableFeatures.js +1 -2
- package/dist/helpers/tableOptions.d.ts +1 -2
- package/dist/helpers/tableOptions.js +1 -2
- package/dist/static-functions.d.ts +2 -2
- package/dist/static-functions.js +2 -2
- package/dist/store-reactivity-bindings.d.ts +1 -2
- package/dist/store-reactivity-bindings.js +1 -2
- package/dist/types/Cell.d.ts +1 -2
- package/dist/types/Column.d.ts +1 -2
- package/dist/types/ColumnDef.d.ts +1 -2
- package/dist/types/Header.d.ts +1 -2
- package/dist/types/HeaderGroup.d.ts +1 -2
- package/dist/types/Row.d.ts +1 -2
- package/dist/types/RowModel.d.ts +1 -2
- package/dist/types/RowModelFns.d.ts +1 -2
- package/dist/types/Table.d.ts +1 -2
- package/dist/types/TableFeatures.d.ts +1 -2
- package/dist/types/TableOptions.d.ts +1 -2
- package/dist/types/TableState.d.ts +1 -2
- package/dist/types/type-utils.d.ts +1 -2
- package/dist/utils.d.ts +1 -2
- package/dist/utils.js +1 -2
- package/dist/worker/createTableWorker.d.ts +1 -2
- package/dist/worker/createTableWorker.js +1 -2
- package/dist/worker/createWorkerRowModel.d.ts +1 -2
- package/dist/worker/createWorkerRowModel.js +1 -2
- package/dist/worker/initTableWorker.d.ts +1 -2
- package/dist/worker/initTableWorker.js +1 -2
- package/dist/worker/rebuildRowModel.d.ts +1 -2
- package/dist/worker/rebuildRowModel.js +1 -2
- package/dist/worker/serializeRowModel.js +1 -2
- package/dist/worker/tableWorkerProtocol.d.ts +1 -2
- package/dist/worker/tableWorkerProtocol.js +1 -2
- package/package.json +9 -30
- package/skills/aggregation/SKILL.md +2 -2
- package/skills/api-not-found/SKILL.md +5 -5
- package/skills/client-vs-server/SKILL.md +2 -2
- package/skills/column-faceting/SKILL.md +2 -2
- package/skills/column-filtering/SKILL.md +2 -2
- package/skills/column-ordering/SKILL.md +2 -2
- package/skills/column-pinning/SKILL.md +2 -2
- package/skills/column-resizing/SKILL.md +2 -2
- package/skills/column-sizing/SKILL.md +2 -2
- package/skills/column-visibility/SKILL.md +2 -2
- package/skills/core/SKILL.md +2 -2
- package/skills/custom-features/SKILL.md +2 -2
- package/skills/expanding/SKILL.md +2 -2
- package/skills/global-filtering/SKILL.md +2 -2
- package/skills/grouping/SKILL.md +2 -2
- package/skills/migrate-v8-to-v9/SKILL.md +7 -7
- package/skills/pagination/SKILL.md +2 -2
- package/skills/row-pinning/SKILL.md +2 -2
- package/skills/row-selection/SKILL.md +2 -2
- package/skills/sorting/SKILL.md +2 -2
- package/skills/table-features/SKILL.md +2 -2
- package/skills/typescript/SKILL.md +2 -2
- package/dist/core/cells/constructCell.cjs +0 -31
- package/dist/core/cells/constructCell.cjs.map +0 -1
- package/dist/core/cells/constructCell.d.cts +0 -17
- package/dist/core/cells/constructCell.js.map +0 -1
- package/dist/core/cells/coreCellsFeature.cjs +0 -21
- package/dist/core/cells/coreCellsFeature.cjs.map +0 -1
- package/dist/core/cells/coreCellsFeature.d.cts +0 -10
- package/dist/core/cells/coreCellsFeature.js.map +0 -1
- package/dist/core/cells/coreCellsFeature.types.d.cts +0 -57
- package/dist/core/cells/coreCellsFeature.utils.cjs +0 -57
- package/dist/core/cells/coreCellsFeature.utils.cjs.map +0 -1
- package/dist/core/cells/coreCellsFeature.utils.d.cts +0 -53
- package/dist/core/cells/coreCellsFeature.utils.js.map +0 -1
- package/dist/core/columns/constructColumn.cjs +0 -60
- package/dist/core/columns/constructColumn.cjs.map +0 -1
- package/dist/core/columns/constructColumn.d.cts +0 -16
- package/dist/core/columns/constructColumn.js.map +0 -1
- package/dist/core/columns/coreColumnsFeature.cjs +0 -64
- package/dist/core/columns/coreColumnsFeature.cjs.map +0 -1
- package/dist/core/columns/coreColumnsFeature.d.cts +0 -10
- package/dist/core/columns/coreColumnsFeature.js.map +0 -1
- package/dist/core/columns/coreColumnsFeature.types.d.cts +0 -94
- package/dist/core/columns/coreColumnsFeature.utils.cjs +0 -183
- package/dist/core/columns/coreColumnsFeature.utils.cjs.map +0 -1
- package/dist/core/columns/coreColumnsFeature.utils.d.cts +0 -119
- package/dist/core/columns/coreColumnsFeature.utils.js.map +0 -1
- package/dist/core/coreFeatures.cjs +0 -25
- package/dist/core/coreFeatures.cjs.map +0 -1
- package/dist/core/coreFeatures.d.cts +0 -26
- package/dist/core/coreFeatures.js.map +0 -1
- package/dist/core/headers/buildHeaderGroups.cjs +0 -102
- package/dist/core/headers/buildHeaderGroups.cjs.map +0 -1
- package/dist/core/headers/buildHeaderGroups.d.cts +0 -16
- package/dist/core/headers/buildHeaderGroups.js.map +0 -1
- package/dist/core/headers/constructHeader.cjs +0 -38
- package/dist/core/headers/constructHeader.cjs.map +0 -1
- package/dist/core/headers/constructHeader.d.cts +0 -22
- package/dist/core/headers/constructHeader.js.map +0 -1
- package/dist/core/headers/coreHeadersFeature.cjs +0 -52
- package/dist/core/headers/coreHeadersFeature.cjs.map +0 -1
- package/dist/core/headers/coreHeadersFeature.d.cts +0 -10
- package/dist/core/headers/coreHeadersFeature.js.map +0 -1
- package/dist/core/headers/coreHeadersFeature.types.d.cts +0 -106
- package/dist/core/headers/coreHeadersFeature.utils.cjs +0 -140
- package/dist/core/headers/coreHeadersFeature.utils.cjs.map +0 -1
- package/dist/core/headers/coreHeadersFeature.utils.d.cts +0 -85
- package/dist/core/headers/coreHeadersFeature.utils.js.map +0 -1
- package/dist/core/reactivity/coreReactivityFeature.types.d.cts +0 -48
- package/dist/core/reactivity/coreReactivityFeature.utils.cjs +0 -24
- package/dist/core/reactivity/coreReactivityFeature.utils.cjs.map +0 -1
- package/dist/core/reactivity/coreReactivityFeature.utils.d.cts +0 -24
- package/dist/core/reactivity/coreReactivityFeature.utils.js.map +0 -1
- package/dist/core/row-models/coreRowModelsFeature.cjs +0 -27
- package/dist/core/row-models/coreRowModelsFeature.cjs.map +0 -1
- package/dist/core/row-models/coreRowModelsFeature.d.cts +0 -10
- package/dist/core/row-models/coreRowModelsFeature.js.map +0 -1
- package/dist/core/row-models/coreRowModelsFeature.types.d.cts +0 -33
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs +0 -197
- package/dist/core/row-models/coreRowModelsFeature.utils.cjs.map +0 -1
- package/dist/core/row-models/coreRowModelsFeature.utils.d.cts +0 -153
- package/dist/core/row-models/coreRowModelsFeature.utils.js.map +0 -1
- package/dist/core/row-models/createCoreRowModel.cjs +0 -50
- package/dist/core/row-models/createCoreRowModel.cjs.map +0 -1
- package/dist/core/row-models/createCoreRowModel.d.cts +0 -15
- package/dist/core/row-models/createCoreRowModel.js.map +0 -1
- package/dist/core/rows/constructRow.cjs +0 -40
- package/dist/core/rows/constructRow.cjs.map +0 -1
- package/dist/core/rows/constructRow.d.cts +0 -15
- package/dist/core/rows/constructRow.js.map +0 -1
- package/dist/core/rows/coreRowsFeature.cjs +0 -53
- package/dist/core/rows/coreRowsFeature.cjs.map +0 -1
- package/dist/core/rows/coreRowsFeature.d.cts +0 -10
- package/dist/core/rows/coreRowsFeature.js.map +0 -1
- package/dist/core/rows/coreRowsFeature.types.d.cts +0 -133
- package/dist/core/rows/coreRowsFeature.utils.cjs +0 -246
- package/dist/core/rows/coreRowsFeature.utils.cjs.map +0 -1
- package/dist/core/rows/coreRowsFeature.utils.d.cts +0 -146
- package/dist/core/rows/coreRowsFeature.utils.js.map +0 -1
- package/dist/core/table/constructTable.cjs +0 -128
- package/dist/core/table/constructTable.cjs.map +0 -1
- package/dist/core/table/constructTable.d.cts +0 -22
- package/dist/core/table/constructTable.js.map +0 -1
- package/dist/core/table/coreTablesFeature.cjs +0 -17
- package/dist/core/table/coreTablesFeature.cjs.map +0 -1
- package/dist/core/table/coreTablesFeature.d.cts +0 -10
- package/dist/core/table/coreTablesFeature.js.map +0 -1
- package/dist/core/table/coreTablesFeature.types.d.cts +0 -199
- package/dist/core/table/coreTablesFeature.utils.cjs +0 -120
- package/dist/core/table/coreTablesFeature.utils.cjs.map +0 -1
- package/dist/core/table/coreTablesFeature.utils.d.cts +0 -60
- package/dist/core/table/coreTablesFeature.utils.js.map +0 -1
- package/dist/experimental-worker-plugin.cjs +0 -14
- package/dist/experimental-worker-plugin.d.cts +0 -5
- package/dist/features/column-faceting/columnFacetingFeature.cjs +0 -55
- package/dist/features/column-faceting/columnFacetingFeature.cjs.map +0 -1
- package/dist/features/column-faceting/columnFacetingFeature.d.cts +0 -10
- package/dist/features/column-faceting/columnFacetingFeature.js.map +0 -1
- package/dist/features/column-faceting/columnFacetingFeature.types.d.cts +0 -67
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs +0 -114
- package/dist/features/column-faceting/columnFacetingFeature.utils.cjs.map +0 -1
- package/dist/features/column-faceting/columnFacetingFeature.utils.d.cts +0 -84
- package/dist/features/column-faceting/columnFacetingFeature.utils.js.map +0 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.cjs +0 -47
- package/dist/features/column-faceting/createFacetedMinMaxValues.cjs.map +0 -1
- package/dist/features/column-faceting/createFacetedMinMaxValues.d.cts +0 -14
- package/dist/features/column-faceting/createFacetedMinMaxValues.js.map +0 -1
- package/dist/features/column-faceting/createFacetedRowModel.cjs +0 -45
- package/dist/features/column-faceting/createFacetedRowModel.cjs.map +0 -1
- package/dist/features/column-faceting/createFacetedRowModel.d.cts +0 -15
- package/dist/features/column-faceting/createFacetedRowModel.js.map +0 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs +0 -45
- package/dist/features/column-faceting/createFacetedUniqueValues.cjs.map +0 -1
- package/dist/features/column-faceting/createFacetedUniqueValues.d.cts +0 -14
- package/dist/features/column-faceting/createFacetedUniqueValues.js.map +0 -1
- package/dist/features/column-filtering/columnFilteringFeature.cjs +0 -50
- package/dist/features/column-filtering/columnFilteringFeature.cjs.map +0 -1
- package/dist/features/column-filtering/columnFilteringFeature.d.cts +0 -10
- package/dist/features/column-filtering/columnFilteringFeature.js.map +0 -1
- package/dist/features/column-filtering/columnFilteringFeature.types.d.cts +0 -214
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs +0 -218
- package/dist/features/column-filtering/columnFilteringFeature.utils.cjs.map +0 -1
- package/dist/features/column-filtering/columnFilteringFeature.utils.d.cts +0 -147
- package/dist/features/column-filtering/columnFilteringFeature.utils.js.map +0 -1
- package/dist/features/column-filtering/createFilteredRowModel.cjs +0 -114
- package/dist/features/column-filtering/createFilteredRowModel.cjs.map +0 -1
- package/dist/features/column-filtering/createFilteredRowModel.d.cts +0 -22
- package/dist/features/column-filtering/createFilteredRowModel.js.map +0 -1
- package/dist/features/column-filtering/filterFns.cjs +0 -399
- package/dist/features/column-filtering/filterFns.cjs.map +0 -1
- package/dist/features/column-filtering/filterFns.d.cts +0 -210
- package/dist/features/column-filtering/filterFns.js.map +0 -1
- package/dist/features/column-filtering/filterRowsUtils.cjs +0 -82
- package/dist/features/column-filtering/filterRowsUtils.cjs.map +0 -1
- package/dist/features/column-filtering/filterRowsUtils.js.map +0 -1
- package/dist/features/column-grouping/columnGroupingFeature.cjs +0 -55
- package/dist/features/column-grouping/columnGroupingFeature.cjs.map +0 -1
- package/dist/features/column-grouping/columnGroupingFeature.d.cts +0 -10
- package/dist/features/column-grouping/columnGroupingFeature.js.map +0 -1
- package/dist/features/column-grouping/columnGroupingFeature.types.d.cts +0 -129
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs +0 -195
- package/dist/features/column-grouping/columnGroupingFeature.utils.cjs.map +0 -1
- package/dist/features/column-grouping/columnGroupingFeature.utils.d.cts +0 -153
- package/dist/features/column-grouping/columnGroupingFeature.utils.js.map +0 -1
- package/dist/features/column-grouping/createGroupedRowModel.cjs +0 -132
- package/dist/features/column-grouping/createGroupedRowModel.cjs.map +0 -1
- package/dist/features/column-grouping/createGroupedRowModel.d.cts +0 -18
- package/dist/features/column-grouping/createGroupedRowModel.js.map +0 -1
- package/dist/features/column-ordering/columnOrderingFeature.cjs +0 -54
- package/dist/features/column-ordering/columnOrderingFeature.cjs.map +0 -1
- package/dist/features/column-ordering/columnOrderingFeature.d.cts +0 -10
- package/dist/features/column-ordering/columnOrderingFeature.js.map +0 -1
- package/dist/features/column-ordering/columnOrderingFeature.types.d.cts +0 -81
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs +0 -192
- package/dist/features/column-ordering/columnOrderingFeature.utils.cjs.map +0 -1
- package/dist/features/column-ordering/columnOrderingFeature.utils.d.cts +0 -119
- package/dist/features/column-ordering/columnOrderingFeature.utils.js.map +0 -1
- package/dist/features/column-pinning/columnPinningFeature.cjs +0 -202
- package/dist/features/column-pinning/columnPinningFeature.cjs.map +0 -1
- package/dist/features/column-pinning/columnPinningFeature.d.cts +0 -15
- package/dist/features/column-pinning/columnPinningFeature.js.map +0 -1
- package/dist/features/column-pinning/columnPinningFeature.types.d.cts +0 -189
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs +0 -584
- package/dist/features/column-pinning/columnPinningFeature.utils.cjs.map +0 -1
- package/dist/features/column-pinning/columnPinningFeature.utils.d.cts +0 -384
- package/dist/features/column-pinning/columnPinningFeature.utils.js.map +0 -1
- package/dist/features/column-resizing/columnResizingFeature.cjs +0 -41
- package/dist/features/column-resizing/columnResizingFeature.cjs.map +0 -1
- package/dist/features/column-resizing/columnResizingFeature.d.cts +0 -10
- package/dist/features/column-resizing/columnResizingFeature.js.map +0 -1
- package/dist/features/column-resizing/columnResizingFeature.types.d.cts +0 -78
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs +0 -286
- package/dist/features/column-resizing/columnResizingFeature.utils.cjs.map +0 -1
- package/dist/features/column-resizing/columnResizingFeature.utils.d.cts +0 -109
- package/dist/features/column-resizing/columnResizingFeature.utils.js.map +0 -1
- package/dist/features/column-sizing/columnSizingFeature.cjs +0 -90
- package/dist/features/column-sizing/columnSizingFeature.cjs.map +0 -1
- package/dist/features/column-sizing/columnSizingFeature.d.cts +0 -10
- package/dist/features/column-sizing/columnSizingFeature.js.map +0 -1
- package/dist/features/column-sizing/columnSizingFeature.types.d.cts +0 -139
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs +0 -299
- package/dist/features/column-sizing/columnSizingFeature.utils.cjs.map +0 -1
- package/dist/features/column-sizing/columnSizingFeature.utils.d.cts +0 -200
- package/dist/features/column-sizing/columnSizingFeature.utils.js.map +0 -1
- package/dist/features/column-visibility/columnVisibilityFeature.cjs +0 -83
- package/dist/features/column-visibility/columnVisibilityFeature.cjs.map +0 -1
- package/dist/features/column-visibility/columnVisibilityFeature.d.cts +0 -10
- package/dist/features/column-visibility/columnVisibilityFeature.js.map +0 -1
- package/dist/features/column-visibility/columnVisibilityFeature.types.d.cts +0 -97
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs +0 -284
- package/dist/features/column-visibility/columnVisibilityFeature.utils.cjs.map +0 -1
- package/dist/features/column-visibility/columnVisibilityFeature.utils.d.cts +0 -189
- package/dist/features/column-visibility/columnVisibilityFeature.utils.js.map +0 -1
- package/dist/features/global-filtering/globalFilteringFeature.cjs +0 -40
- package/dist/features/global-filtering/globalFilteringFeature.cjs.map +0 -1
- package/dist/features/global-filtering/globalFilteringFeature.d.cts +0 -10
- package/dist/features/global-filtering/globalFilteringFeature.js.map +0 -1
- package/dist/features/global-filtering/globalFilteringFeature.types.d.cts +0 -71
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs +0 -88
- package/dist/features/global-filtering/globalFilteringFeature.utils.cjs.map +0 -1
- package/dist/features/global-filtering/globalFilteringFeature.utils.d.cts +0 -71
- package/dist/features/global-filtering/globalFilteringFeature.utils.js.map +0 -1
- package/dist/features/row-aggregation/aggregationFns.cjs +0 -246
- package/dist/features/row-aggregation/aggregationFns.cjs.map +0 -1
- package/dist/features/row-aggregation/aggregationFns.d.cts +0 -68
- package/dist/features/row-aggregation/aggregationFns.js.map +0 -1
- package/dist/features/row-aggregation/rowAggregationFeature.cjs +0 -39
- package/dist/features/row-aggregation/rowAggregationFeature.cjs.map +0 -1
- package/dist/features/row-aggregation/rowAggregationFeature.d.cts +0 -10
- package/dist/features/row-aggregation/rowAggregationFeature.js.map +0 -1
- package/dist/features/row-aggregation/rowAggregationFeature.types.cjs +0 -13
- package/dist/features/row-aggregation/rowAggregationFeature.types.cjs.map +0 -1
- package/dist/features/row-aggregation/rowAggregationFeature.types.d.cts +0 -195
- package/dist/features/row-aggregation/rowAggregationFeature.types.js.map +0 -1
- package/dist/features/row-aggregation/rowAggregationFeature.utils.cjs +0 -212
- package/dist/features/row-aggregation/rowAggregationFeature.utils.cjs.map +0 -1
- package/dist/features/row-aggregation/rowAggregationFeature.utils.d.cts +0 -34
- package/dist/features/row-aggregation/rowAggregationFeature.utils.js.map +0 -1
- package/dist/features/row-expanding/createExpandedRowModel.cjs +0 -55
- package/dist/features/row-expanding/createExpandedRowModel.cjs.map +0 -1
- package/dist/features/row-expanding/createExpandedRowModel.d.cts +0 -21
- package/dist/features/row-expanding/createExpandedRowModel.js.map +0 -1
- package/dist/features/row-expanding/rowExpandingFeature.cjs +0 -47
- package/dist/features/row-expanding/rowExpandingFeature.cjs.map +0 -1
- package/dist/features/row-expanding/rowExpandingFeature.d.cts +0 -10
- package/dist/features/row-expanding/rowExpandingFeature.js.map +0 -1
- package/dist/features/row-expanding/rowExpandingFeature.types.d.cts +0 -118
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs +0 -283
- package/dist/features/row-expanding/rowExpandingFeature.utils.cjs.map +0 -1
- package/dist/features/row-expanding/rowExpandingFeature.utils.d.cts +0 -191
- package/dist/features/row-expanding/rowExpandingFeature.utils.js.map +0 -1
- package/dist/features/row-pagination/createPaginatedRowModel.cjs +0 -58
- package/dist/features/row-pagination/createPaginatedRowModel.cjs.map +0 -1
- package/dist/features/row-pagination/createPaginatedRowModel.d.cts +0 -15
- package/dist/features/row-pagination/createPaginatedRowModel.js.map +0 -1
- package/dist/features/row-pagination/rowPaginationFeature.cjs +0 -45
- package/dist/features/row-pagination/rowPaginationFeature.cjs.map +0 -1
- package/dist/features/row-pagination/rowPaginationFeature.d.cts +0 -10
- package/dist/features/row-pagination/rowPaginationFeature.js.map +0 -1
- package/dist/features/row-pagination/rowPaginationFeature.types.d.cts +0 -126
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs +0 -306
- package/dist/features/row-pagination/rowPaginationFeature.utils.cjs.map +0 -1
- package/dist/features/row-pagination/rowPaginationFeature.utils.d.cts +0 -218
- package/dist/features/row-pagination/rowPaginationFeature.utils.js.map +0 -1
- package/dist/features/row-pinning/rowPinningFeature.cjs +0 -55
- package/dist/features/row-pinning/rowPinningFeature.cjs.map +0 -1
- package/dist/features/row-pinning/rowPinningFeature.d.cts +0 -10
- package/dist/features/row-pinning/rowPinningFeature.js.map +0 -1
- package/dist/features/row-pinning/rowPinningFeature.types.d.cts +0 -83
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs +0 -224
- package/dist/features/row-pinning/rowPinningFeature.utils.cjs.map +0 -1
- package/dist/features/row-pinning/rowPinningFeature.utils.d.cts +0 -143
- package/dist/features/row-pinning/rowPinningFeature.utils.js.map +0 -1
- package/dist/features/row-selection/rowSelectionFeature.cjs +0 -119
- package/dist/features/row-selection/rowSelectionFeature.cjs.map +0 -1
- package/dist/features/row-selection/rowSelectionFeature.d.cts +0 -10
- package/dist/features/row-selection/rowSelectionFeature.js.map +0 -1
- package/dist/features/row-selection/rowSelectionFeature.types.d.cts +0 -174
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs +0 -570
- package/dist/features/row-selection/rowSelectionFeature.utils.cjs.map +0 -1
- package/dist/features/row-selection/rowSelectionFeature.utils.d.cts +0 -345
- package/dist/features/row-selection/rowSelectionFeature.utils.js.map +0 -1
- package/dist/features/row-sorting/createSortedRowModel.cjs +0 -114
- package/dist/features/row-sorting/createSortedRowModel.cjs.map +0 -1
- package/dist/features/row-sorting/createSortedRowModel.d.cts +0 -22
- package/dist/features/row-sorting/createSortedRowModel.js.map +0 -1
- package/dist/features/row-sorting/rowSortingFeature.cjs +0 -55
- package/dist/features/row-sorting/rowSortingFeature.cjs.map +0 -1
- package/dist/features/row-sorting/rowSortingFeature.d.cts +0 -10
- package/dist/features/row-sorting/rowSortingFeature.js.map +0 -1
- package/dist/features/row-sorting/rowSortingFeature.types.d.cts +0 -220
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs +0 -316
- package/dist/features/row-sorting/rowSortingFeature.utils.cjs.map +0 -1
- package/dist/features/row-sorting/rowSortingFeature.utils.d.cts +0 -193
- package/dist/features/row-sorting/rowSortingFeature.utils.js.map +0 -1
- package/dist/features/row-sorting/sortFns.cjs +0 -226
- package/dist/features/row-sorting/sortFns.cjs.map +0 -1
- package/dist/features/row-sorting/sortFns.d.cts +0 -98
- package/dist/features/row-sorting/sortFns.js.map +0 -1
- package/dist/features/stockFeatures.cjs +0 -43
- package/dist/features/stockFeatures.cjs.map +0 -1
- package/dist/features/stockFeatures.d.cts +0 -43
- package/dist/features/stockFeatures.js.map +0 -1
- package/dist/flex-render.cjs +0 -29
- package/dist/flex-render.cjs.map +0 -1
- package/dist/flex-render.d.cts +0 -34
- package/dist/flex-render.js.map +0 -1
- package/dist/helpers/columnHelper.cjs +0 -41
- package/dist/helpers/columnHelper.cjs.map +0 -1
- package/dist/helpers/columnHelper.d.cts +0 -71
- package/dist/helpers/columnHelper.js.map +0 -1
- package/dist/helpers/metaHelper.cjs +0 -30
- package/dist/helpers/metaHelper.cjs.map +0 -1
- package/dist/helpers/metaHelper.d.cts +0 -26
- package/dist/helpers/metaHelper.js.map +0 -1
- package/dist/helpers/tableFeatures.cjs +0 -49
- package/dist/helpers/tableFeatures.cjs.map +0 -1
- package/dist/helpers/tableFeatures.d.cts +0 -47
- package/dist/helpers/tableFeatures.js.map +0 -1
- package/dist/helpers/tableOptions.cjs +0 -15
- package/dist/helpers/tableOptions.cjs.map +0 -1
- package/dist/helpers/tableOptions.d.cts +0 -57
- package/dist/helpers/tableOptions.js.map +0 -1
- package/dist/index.cjs +0 -153
- package/dist/index.d.cts +0 -81
- package/dist/reactivity.cjs +0 -4
- package/dist/reactivity.d.cts +0 -3
- package/dist/static-functions.cjs +0 -274
- package/dist/static-functions.d.cts +0 -22
- package/dist/store-reactivity-bindings.cjs +0 -44
- package/dist/store-reactivity-bindings.cjs.map +0 -1
- package/dist/store-reactivity-bindings.d.cts +0 -22
- package/dist/store-reactivity-bindings.js.map +0 -1
- package/dist/types/Cell.d.cts +0 -16
- package/dist/types/Column.d.cts +0 -36
- package/dist/types/ColumnDef.d.cts +0 -125
- package/dist/types/Header.d.cts +0 -16
- package/dist/types/HeaderGroup.d.cts +0 -10
- package/dist/types/Row.d.cts +0 -28
- package/dist/types/RowModel.d.cts +0 -24
- package/dist/types/RowModelFns.d.cts +0 -18
- package/dist/types/Table.d.cts +0 -65
- package/dist/types/TableFeatures.d.cts +0 -381
- package/dist/types/TableOptions.d.cts +0 -77
- package/dist/types/TableState.d.cts +0 -48
- package/dist/types/type-utils.d.cts +0 -30
- package/dist/utils.cjs +0 -265
- package/dist/utils.cjs.map +0 -1
- package/dist/utils.d.cts +0 -136
- package/dist/utils.js.map +0 -1
- package/dist/worker/createTableWorker.cjs +0 -189
- package/dist/worker/createTableWorker.cjs.map +0 -1
- package/dist/worker/createTableWorker.d.cts +0 -102
- package/dist/worker/createTableWorker.js.map +0 -1
- package/dist/worker/createWorkerRowModel.cjs +0 -78
- package/dist/worker/createWorkerRowModel.cjs.map +0 -1
- package/dist/worker/createWorkerRowModel.d.cts +0 -42
- package/dist/worker/createWorkerRowModel.js.map +0 -1
- package/dist/worker/initTableWorker.cjs +0 -100
- package/dist/worker/initTableWorker.cjs.map +0 -1
- package/dist/worker/initTableWorker.d.cts +0 -33
- package/dist/worker/initTableWorker.js.map +0 -1
- package/dist/worker/rebuildRowModel.cjs +0 -72
- package/dist/worker/rebuildRowModel.cjs.map +0 -1
- package/dist/worker/rebuildRowModel.d.cts +0 -9
- package/dist/worker/rebuildRowModel.js.map +0 -1
- package/dist/worker/serializeRowModel.cjs +0 -53
- package/dist/worker/serializeRowModel.cjs.map +0 -1
- package/dist/worker/serializeRowModel.js.map +0 -1
- package/dist/worker/tableWorkerProtocol.cjs +0 -29
- package/dist/worker/tableWorkerProtocol.cjs.map +0 -1
- package/dist/worker/tableWorkerProtocol.d.cts +0 -88
- package/dist/worker/tableWorkerProtocol.js.map +0 -1
- package/src/core/cells/constructCell.ts +0 -55
- package/src/core/cells/coreCellsFeature.ts +0 -27
- package/src/core/cells/coreCellsFeature.types.ts +0 -68
- package/src/core/cells/coreCellsFeature.utils.ts +0 -68
- package/src/core/columns/constructColumn.ts +0 -125
- package/src/core/columns/coreColumnsFeature.ts +0 -73
- package/src/core/columns/coreColumnsFeature.types.ts +0 -108
- package/src/core/columns/coreColumnsFeature.utils.ts +0 -275
- package/src/core/coreFeatures.ts +0 -31
- package/src/core/headers/buildHeaderGroups.ts +0 -184
- package/src/core/headers/constructHeader.ts +0 -67
- package/src/core/headers/coreHeadersFeature.ts +0 -56
- package/src/core/headers/coreHeadersFeature.types.ts +0 -125
- package/src/core/headers/coreHeadersFeature.utils.ts +0 -199
- package/src/core/reactivity/coreReactivityFeature.types.ts +0 -56
- package/src/core/reactivity/coreReactivityFeature.utils.ts +0 -44
- package/src/core/row-models/coreRowModelsFeature.ts +0 -62
- package/src/core/row-models/coreRowModelsFeature.types.ts +0 -50
- package/src/core/row-models/coreRowModelsFeature.utils.ts +0 -272
- package/src/core/row-models/createCoreRowModel.ts +0 -94
- package/src/core/rows/constructRow.ts +0 -68
- package/src/core/rows/coreRowsFeature.ts +0 -83
- package/src/core/rows/coreRowsFeature.types.ts +0 -154
- package/src/core/rows/coreRowsFeature.utils.ts +0 -352
- package/src/core/table/constructTable.ts +0 -210
- package/src/core/table/coreTablesFeature.ts +0 -19
- package/src/core/table/coreTablesFeature.types.ts +0 -241
- package/src/core/table/coreTablesFeature.utils.ts +0 -171
- package/src/experimental-worker-plugin.ts +0 -22
- package/src/features/column-faceting/columnFacetingFeature.ts +0 -89
- package/src/features/column-faceting/columnFacetingFeature.types.ts +0 -78
- package/src/features/column-faceting/columnFacetingFeature.utils.ts +0 -180
- package/src/features/column-faceting/createFacetedMinMaxValues.ts +0 -92
- package/src/features/column-faceting/createFacetedRowModel.ts +0 -92
- package/src/features/column-faceting/createFacetedUniqueValues.ts +0 -97
- package/src/features/column-filtering/columnFilteringFeature.ts +0 -87
- package/src/features/column-filtering/columnFilteringFeature.types.ts +0 -308
- package/src/features/column-filtering/columnFilteringFeature.utils.ts +0 -345
- package/src/features/column-filtering/createFilteredRowModel.ts +0 -194
- package/src/features/column-filtering/filterFns.ts +0 -533
- package/src/features/column-filtering/filterRowsUtils.ts +0 -158
- package/src/features/column-grouping/columnGroupingFeature.ts +0 -97
- package/src/features/column-grouping/columnGroupingFeature.types.ts +0 -152
- package/src/features/column-grouping/columnGroupingFeature.utils.ts +0 -271
- package/src/features/column-grouping/createGroupedRowModel.ts +0 -221
- package/src/features/column-ordering/columnOrderingFeature.ts +0 -78
- package/src/features/column-ordering/columnOrderingFeature.types.ts +0 -86
- package/src/features/column-ordering/columnOrderingFeature.utils.ts +0 -292
- package/src/features/column-pinning/columnPinningFeature.ts +0 -333
- package/src/features/column-pinning/columnPinningFeature.types.ts +0 -203
- package/src/features/column-pinning/columnPinningFeature.utils.ts +0 -922
- package/src/features/column-resizing/columnResizingFeature.ts +0 -65
- package/src/features/column-resizing/columnResizingFeature.types.ts +0 -86
- package/src/features/column-resizing/columnResizingFeature.utils.ts +0 -432
- package/src/features/column-sizing/columnSizingFeature.ts +0 -145
- package/src/features/column-sizing/columnSizingFeature.types.ts +0 -147
- package/src/features/column-sizing/columnSizingFeature.utils.ts +0 -462
- package/src/features/column-visibility/columnVisibilityFeature.ts +0 -126
- package/src/features/column-visibility/columnVisibilityFeature.types.ts +0 -112
- package/src/features/column-visibility/columnVisibilityFeature.utils.ts +0 -402
- package/src/features/global-filtering/globalFilteringFeature.ts +0 -65
- package/src/features/global-filtering/globalFilteringFeature.types.ts +0 -91
- package/src/features/global-filtering/globalFilteringFeature.utils.ts +0 -126
- package/src/features/row-aggregation/aggregationFns.ts +0 -345
- package/src/features/row-aggregation/rowAggregationFeature.ts +0 -60
- package/src/features/row-aggregation/rowAggregationFeature.types.ts +0 -339
- package/src/features/row-aggregation/rowAggregationFeature.utils.ts +0 -430
- package/src/features/row-expanding/createExpandedRowModel.ts +0 -82
- package/src/features/row-expanding/rowExpandingFeature.ts +0 -94
- package/src/features/row-expanding/rowExpandingFeature.types.ts +0 -132
- package/src/features/row-expanding/rowExpandingFeature.utils.ts +0 -399
- package/src/features/row-pagination/createPaginatedRowModel.ts +0 -83
- package/src/features/row-pagination/rowPaginationFeature.ts +0 -95
- package/src/features/row-pagination/rowPaginationFeature.types.ts +0 -137
- package/src/features/row-pagination/rowPaginationFeature.utils.ts +0 -400
- package/src/features/row-pinning/rowPinningFeature.ts +0 -97
- package/src/features/row-pinning/rowPinningFeature.types.ts +0 -95
- package/src/features/row-pinning/rowPinningFeature.utils.ts +0 -323
- package/src/features/row-selection/rowSelectionFeature.ts +0 -190
- package/src/features/row-selection/rowSelectionFeature.types.ts +0 -195
- package/src/features/row-selection/rowSelectionFeature.utils.ts +0 -927
- package/src/features/row-sorting/createSortedRowModel.ts +0 -189
- package/src/features/row-sorting/rowSortingFeature.ts +0 -103
- package/src/features/row-sorting/rowSortingFeature.types.ts +0 -288
- package/src/features/row-sorting/rowSortingFeature.utils.ts +0 -513
- package/src/features/row-sorting/sortFns.ts +0 -366
- package/src/features/stockFeatures.ts +0 -56
- package/src/flex-render.ts +0 -70
- package/src/helpers/columnHelper.ts +0 -122
- package/src/helpers/metaHelper.ts +0 -24
- package/src/helpers/tableFeatures.ts +0 -56
- package/src/helpers/tableOptions.ts +0 -117
- package/src/index.ts +0 -138
- package/src/process-env.d.ts +0 -6
- package/src/reactivity.ts +0 -2
- package/src/static-functions.ts +0 -32
- package/src/store-reactivity-bindings.ts +0 -47
- package/src/types/Cell.ts +0 -23
- package/src/types/Column.ts +0 -55
- package/src/types/ColumnDef.ts +0 -258
- package/src/types/Header.ts +0 -23
- package/src/types/HeaderGroup.ts +0 -13
- package/src/types/Row.ts +0 -36
- package/src/types/RowModel.ts +0 -43
- package/src/types/RowModelFns.ts +0 -32
- package/src/types/Table.ts +0 -116
- package/src/types/TableFeatures.ts +0 -479
- package/src/types/TableOptions.ts +0 -154
- package/src/types/TableState.ts +0 -61
- package/src/types/type-utils.ts +0 -92
- package/src/utils.ts +0 -493
- package/src/worker/createTableWorker.ts +0 -357
- package/src/worker/createWorkerRowModel.ts +0 -121
- package/src/worker/initTableWorker.ts +0 -164
- package/src/worker/rebuildRowModel.ts +0 -120
- package/src/worker/serializeRowModel.ts +0 -80
- package/src/worker/tableWorkerProtocol.ts +0 -105
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { RowData } from "../types/type-utils.cjs";
|
|
2
|
-
import { TableOptions } from "../types/TableOptions.cjs";
|
|
3
|
-
import { TableFeatures } from "../types/TableFeatures.cjs";
|
|
4
|
-
|
|
5
|
-
//#region src/worker/initTableWorker.d.ts
|
|
6
|
-
type TableWorkerConfig<TFeatures extends TableFeatures, TData extends RowData> = Omit<TableOptions<TFeatures, TData>, 'data'>;
|
|
7
|
-
/**
|
|
8
|
-
* Runs a headless "shadow table" inside a dedicated Web Worker.
|
|
9
|
-
*
|
|
10
|
-
* Call this from a user-authored worker entry file, passing the same columns
|
|
11
|
-
* and processing features used on the main thread. The shadow table runs the
|
|
12
|
-
* real table-core row model pipeline (real fns, real Row objects) off the
|
|
13
|
-
* main thread and posts back one payload per stage the main thread requested:
|
|
14
|
-
* a transferable index permutation for flat results, a serialized row tree
|
|
15
|
-
* (with eagerly computed aggregates) when grouping produces synthetic rows.
|
|
16
|
-
*
|
|
17
|
-
* Everything passed here must be thread-portable: `accessorKey` columns or
|
|
18
|
-
* accessors defined in a shared module, and fns from registries or shared
|
|
19
|
-
* modules (no closures over app state).
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* // table.worker.ts
|
|
24
|
-
* import { initTableWorker } from '@tanstack/table-core/experimental-worker-plugin'
|
|
25
|
-
* import { columns, sharedFeatures } from './tableConfig'
|
|
26
|
-
*
|
|
27
|
-
* initTableWorker({ features: sharedFeatures, columns })
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
declare function initTableWorker<TFeatures extends TableFeatures, TData extends RowData>(config: TableWorkerConfig<TFeatures, TData>): void;
|
|
31
|
-
//#endregion
|
|
32
|
-
export { TableWorkerConfig, initTableWorker };
|
|
33
|
-
//# sourceMappingURL=initTableWorker.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initTableWorker.js","names":[],"sources":["../../src/worker/initTableWorker.ts"],"sourcesContent":["import { constructTable } from '../core/table/constructTable'\nimport { storeReactivityBindings } from '../store-reactivity-bindings'\nimport { makeObjectMap } from '../utils'\nimport { serializeRowModel } from './serializeRowModel'\nimport type { RowData } from '../types/type-utils'\nimport type { TableFeatures } from '../types/TableFeatures'\nimport type { TableOptions } from '../types/TableOptions'\nimport type { Table_Internal } from '../types/Table'\nimport type {\n TableWorkerRequest,\n TableWorkerResult,\n TableWorkerStage,\n TableWorkerStagePayload,\n} from './tableWorkerProtocol'\n\nexport type TableWorkerConfig<\n TFeatures extends TableFeatures,\n TData extends RowData,\n> = Omit<TableOptions<TFeatures, TData>, 'data'>\n\nfunction capitalize(stage: string) {\n return stage.charAt(0).toUpperCase() + stage.slice(1)\n}\n\n/** Flatten column-group defs to leaf defs (mirrors core's id resolution). */\nfunction flattenColumnDefs(defs: Array<any>): Array<any> {\n return defs.flatMap((def) =>\n def.columns ? flattenColumnDefs(def.columns) : [def],\n )\n}\n\n/**\n * Runs a headless \"shadow table\" inside a dedicated Web Worker.\n *\n * Call this from a user-authored worker entry file, passing the same columns\n * and processing features used on the main thread. The shadow table runs the\n * real table-core row model pipeline (real fns, real Row objects) off the\n * main thread and posts back one payload per stage the main thread requested:\n * a transferable index permutation for flat results, a serialized row tree\n * (with eagerly computed aggregates) when grouping produces synthetic rows.\n *\n * Everything passed here must be thread-portable: `accessorKey` columns or\n * accessors defined in a shared module, and fns from registries or shared\n * modules (no closures over app state).\n *\n * @example\n * ```ts\n * // table.worker.ts\n * import { initTableWorker } from '@tanstack/table-core/experimental-worker-plugin'\n * import { columns, sharedFeatures } from './tableConfig'\n *\n * initTableWorker({ features: sharedFeatures, columns })\n * ```\n */\nexport function initTableWorker<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(config: TableWorkerConfig<TFeatures, TData>): void {\n let table: Table_Internal<TFeatures, TData> | undefined\n let dataVersion = 0\n let coreIndexById: Record<string, number> = makeObjectMap()\n let aggregateColumnIds: Array<string> = []\n // Last-sent model identity per stage: the memoized getters return stable\n // objects when their inputs did not change, so identity equality is exactly\n // \"this stage's result is unchanged\".\n let lastSentModels: { [K in TableWorkerStage]?: unknown } = {}\n\n self.onmessage = (event: MessageEvent<TableWorkerRequest<TData>>) => {\n const message = event.data\n\n if (message.type === 'data') {\n dataVersion = message.dataVersion\n lastSentModels = {}\n if (!table) {\n table = constructTable<TFeatures, TData>({\n ...(config as TableOptions<TFeatures, TData>),\n features: {\n coreReactivityFeature: storeReactivityBindings(),\n ...config.features,\n },\n data: message.data,\n })\n // Only columns with an explicit aggregation get eagerly aggregated\n // per group. Sync tables aggregate lazily (visible cells only), so\n // auto-aggregating every column would explode on high-cardinality\n // grouping for values nothing renders. Read the RAW column defs:\n // rowAggregationFeature injects default aggregatedCell/aggregationFn\n // into every resolved columnDef, so the resolved defs can't tell\n // explicit from default.\n aggregateColumnIds = flattenColumnDefs(config.columns as Array<any>)\n .filter(\n (def) => def.aggregationFn != null || def.aggregatedCell != null,\n )\n .map(\n (def) =>\n def.id ??\n (typeof def.accessorKey === 'string'\n ? def.accessorKey.replaceAll('.', '_')\n : undefined),\n )\n .filter((id): id is string => id != null)\n } else {\n table.setOptions((prev) => ({ ...prev, data: message.data }))\n }\n // Map row ids to data positions once per dataset; serialization uses it\n // to express every stage result in terms of core row positions.\n const coreFlatRows = table.getCoreRowModel().flatRows\n coreIndexById = makeObjectMap()\n for (let i = 0; i < coreFlatRows.length; i++) {\n coreIndexById[coreFlatRows[i]!.id] = i\n }\n return\n }\n\n if (!table) return\n\n const start = performance.now()\n\n // Apply the serializable state slices to the shadow table's base atoms.\n table._reactivity.batch(() => {\n for (const [key, value] of Object.entries(message.state)) {\n const baseAtom = (table!.baseAtoms as Record<string, any>)[key]\n if (baseAtom && value !== undefined) {\n baseAtom.set(value)\n }\n }\n })\n\n // Compute exactly the stages the main thread requested, skipping any this\n // shadow table has no row model factory for (the main thread warns).\n const stages: { [K in TableWorkerStage]?: TableWorkerStagePayload } = {}\n const transfer: Array<Transferable> = []\n\n for (const stage of message.stages) {\n if (!(config.features as Record<string, unknown>)[`${stage}RowModel`]) {\n continue\n }\n const model = (table as any)[`get${capitalize(stage)}RowModel`]()\n // Memoized getters return the same object when inputs are unchanged;\n // skip re-serializing (and the main thread skips rebuilding). Safe under\n // single-flight: results are never dropped within a dataVersion.\n if (lastSentModels[stage] === model) {\n stages[stage] = { kind: 'unchanged' }\n continue\n }\n lastSentModels[stage] = model\n stages[stage] = serializeRowModel(\n model,\n coreIndexById,\n aggregateColumnIds,\n transfer,\n )\n }\n\n const response: TableWorkerResult = {\n type: 'result',\n requestId: message.requestId,\n dataVersion,\n stages,\n computeMs: performance.now() - start,\n }\n postMessage(response, { transfer })\n }\n}\n"],"mappings":";;;;;;AAoBA,SAAS,WAAW,OAAe;CACjC,OAAO,MAAM,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,MAAM,MAAM,CAAC;AACtD;;AAGA,SAAS,kBAAkB,MAA8B;CACvD,OAAO,KAAK,SAAS,QACnB,IAAI,UAAU,kBAAkB,IAAI,OAAO,IAAI,CAAC,GAAG,CACrD;AACF;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAgB,gBAGd,QAAmD;CACnD,IAAI;CACJ,IAAI,cAAc;CAClB,IAAI,gBAAwC,cAAc;CAC1D,IAAI,qBAAoC,CAAC;CAIzC,IAAI,iBAAwD,CAAC;CAE7D,KAAK,aAAa,UAAmD;EACnE,MAAM,UAAU,MAAM;EAEtB,IAAI,QAAQ,SAAS,QAAQ;GAC3B,cAAc,QAAQ;GACtB,iBAAiB,CAAC;GAClB,IAAI,CAAC,OAAO;IACV,QAAQ,eAAiC;KACvC,GAAI;KACJ,UAAU;MACR,uBAAuB,wBAAwB;MAC/C,GAAG,OAAO;KACZ;KACA,MAAM,QAAQ;IAChB,CAAC;IAQD,qBAAqB,kBAAkB,OAAO,OAAqB,CAAC,CACjE,QACE,QAAQ,IAAI,iBAAiB,QAAQ,IAAI,kBAAkB,IAC9D,CAAC,CACA,KACE,QACC,IAAI,OACH,OAAO,IAAI,gBAAgB,WACxB,IAAI,YAAY,WAAW,KAAK,GAAG,IACnC,OACR,CAAC,CACA,QAAQ,OAAqB,MAAM,IAAI;GAC5C,OACE,MAAM,YAAY,UAAU;IAAE,GAAG;IAAM,MAAM,QAAQ;GAAK,EAAE;GAI9D,MAAM,eAAe,MAAM,gBAAgB,CAAC,CAAC;GAC7C,gBAAgB,cAAc;GAC9B,KAAK,IAAI,IAAI,GAAG,IAAI,aAAa,QAAQ,KACvC,cAAc,aAAa,EAAE,CAAE,MAAM;GAEvC;EACF;EAEA,IAAI,CAAC,OAAO;EAEZ,MAAM,QAAQ,YAAY,IAAI;EAG9B,MAAM,YAAY,YAAY;GAC5B,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,QAAQ,KAAK,GAAG;IACxD,MAAM,WAAY,MAAO,UAAkC;IAC3D,IAAI,YAAY,UAAU,QACxB,SAAS,IAAI,KAAK;GAEtB;EACF,CAAC;EAID,MAAM,SAAgE,CAAC;EACvE,MAAM,WAAgC,CAAC;EAEvC,KAAK,MAAM,SAAS,QAAQ,QAAQ;GAClC,IAAI,CAAE,OAAO,SAAqC,GAAG,MAAM,YACzD;GAEF,MAAM,QAAS,MAAc,MAAM,WAAW,KAAK,EAAE,UAAU,CAAC;GAIhE,IAAI,eAAe,WAAW,OAAO;IACnC,OAAO,SAAS,EAAE,MAAM,YAAY;IACpC;GACF;GACA,eAAe,SAAS;GACxB,OAAO,SAAS,kBACd,OACA,eACA,oBACA,QACF;EACF;EAEA,MAAM,WAA8B;GAClC,MAAM;GACN,WAAW,QAAQ;GACnB;GACA;GACA,WAAW,YAAY,IAAI,IAAI;EACjC;EACA,YAAY,UAAU,EAAE,SAAS,CAAC;CACpC;AACF"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
const require_utils = require('../utils.cjs');
|
|
2
|
-
const require_constructRow = require('../core/rows/constructRow.cjs');
|
|
3
|
-
|
|
4
|
-
//#region src/worker/rebuildRowModel.ts
|
|
5
|
-
function collectLeafRows(subRows, out) {
|
|
6
|
-
for (let i = 0; i < subRows.length; i++) {
|
|
7
|
-
const row = subRows[i];
|
|
8
|
-
if (row.groupingColumnId == null) out.push(row);
|
|
9
|
-
else collectLeafRows(row.subRows, out);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
function rebuildRowModel(table, payload, resetDepths) {
|
|
13
|
-
const core = table.getCoreRowModel();
|
|
14
|
-
if (payload.kind === "flat") {
|
|
15
|
-
const { indices } = payload;
|
|
16
|
-
const rows = new Array(indices.length);
|
|
17
|
-
for (let i = 0; i < indices.length; i++) {
|
|
18
|
-
const row = core.flatRows[indices[i]];
|
|
19
|
-
if (resetDepths) {
|
|
20
|
-
row.depth = 0;
|
|
21
|
-
row.parentId = void 0;
|
|
22
|
-
}
|
|
23
|
-
rows[i] = row;
|
|
24
|
-
}
|
|
25
|
-
return {
|
|
26
|
-
rows,
|
|
27
|
-
flatRows: rows,
|
|
28
|
-
rowsById: core.rowsById
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
const flatRows = [];
|
|
32
|
-
const rowsById = Object.create(core.rowsById);
|
|
33
|
-
const rebuildRows = (nodes, depth, parentId) => {
|
|
34
|
-
const rows = new Array(nodes.length);
|
|
35
|
-
for (let i = 0; i < nodes.length; i++) {
|
|
36
|
-
const node = nodes[i];
|
|
37
|
-
if (typeof node === "number") {
|
|
38
|
-
const row = core.flatRows[node];
|
|
39
|
-
row.depth = depth;
|
|
40
|
-
row.parentId = parentId;
|
|
41
|
-
flatRows.push(row);
|
|
42
|
-
rows[i] = row;
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
const subRows = rebuildRows(node.children, depth + 1, node.id);
|
|
46
|
-
const leafRows = [];
|
|
47
|
-
collectLeafRows(subRows, leafRows);
|
|
48
|
-
const row = require_constructRow.constructRow(table, node.id, leafRows[0]?.original, node.index, depth, void 0, parentId);
|
|
49
|
-
const aggregates = node.aggregates;
|
|
50
|
-
Object.assign(row, {
|
|
51
|
-
groupingColumnId: node.groupingColumnId,
|
|
52
|
-
groupingValue: node.groupingValue,
|
|
53
|
-
subRows,
|
|
54
|
-
leafRows,
|
|
55
|
-
getValue: (columnId) => require_utils.hasOwn(aggregates, columnId) ? aggregates[columnId] : void 0
|
|
56
|
-
});
|
|
57
|
-
flatRows.push(row);
|
|
58
|
-
rowsById[node.id] = row;
|
|
59
|
-
rows[i] = row;
|
|
60
|
-
}
|
|
61
|
-
return rows;
|
|
62
|
-
};
|
|
63
|
-
return {
|
|
64
|
-
rows: rebuildRows(payload.children, 0, void 0),
|
|
65
|
-
flatRows,
|
|
66
|
-
rowsById
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
//#endregion
|
|
71
|
-
exports.rebuildRowModel = rebuildRowModel;
|
|
72
|
-
//# sourceMappingURL=rebuildRowModel.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rebuildRowModel.cjs","names":["constructRow","hasOwn"],"sources":["../../src/worker/rebuildRowModel.ts"],"sourcesContent":["import { constructRow } from '../core/rows/constructRow'\nimport { hasOwn } from '../utils'\nimport type { RowModel } from '../core/row-models/coreRowModelsFeature.types'\nimport type { Table_Internal } from '../types/Table'\nimport type { TableFeatures } from '../types/TableFeatures'\nimport type { RowData } from '../types/type-utils'\nimport type {\n TableWorkerRowNode,\n TableWorkerStagePayload,\n} from './tableWorkerProtocol'\n\n/** Payloads that carry data; `unchanged` never reaches the rebuilder. */\nexport type TableWorkerDataPayload = Exclude<\n TableWorkerStagePayload,\n { kind: 'unchanged' }\n>\n\n// Main-thread side: payload + this table's core rows -> RowModel. Mirrors how\n// the sync row models treat rows: data rows are reused (with depth/parentId\n// rewritten, exactly like createGroupedRowModel does), synthetic group rows\n// are reconstructed via constructRow with their worker-computed aggregates\n// pre-seeded so no aggregation ever runs on the main thread.\n\nfunction collectLeafRows(subRows: Array<any>, out: Array<any>) {\n for (let i = 0; i < subRows.length; i++) {\n const row = subRows[i]\n if (row.groupingColumnId == null) {\n out.push(row)\n } else {\n collectLeafRows(row.subRows, out)\n }\n }\n}\n\nexport function rebuildRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n payload: TableWorkerDataPayload,\n /**\n * Whether a flat payload should rewrite row depth/parentId. Mirrors core:\n * the grouped model's passthrough resets them, the filtered model never\n * touches them. Without this distinction a filtered rebuild could zero the\n * depths a grouped/sorted tree rebuild just assigned to shared row objects.\n */\n resetDepths: boolean,\n): RowModel<TFeatures, TData> {\n const core = table.getCoreRowModel()\n\n if (payload.kind === 'flat') {\n const { indices } = payload\n const rows = new Array(indices.length)\n for (let i = 0; i < indices.length; i++) {\n const row: any = core.flatRows[indices[i]!]!\n if (resetDepths) {\n row.depth = 0\n row.parentId = undefined\n }\n rows[i] = row\n }\n return { rows, flatRows: rows, rowsById: core.rowsById }\n }\n\n const flatRows: Array<any> = []\n // Data rows resolve through the prototype chain to the core map; only\n // synthetic group rows are added on top.\n const rowsById: Record<string, any> = Object.create(core.rowsById)\n\n const rebuildRows = (\n nodes: Array<TableWorkerRowNode>,\n depth: number,\n parentId: string | undefined,\n ): Array<any> => {\n const rows = new Array(nodes.length)\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i]!\n if (typeof node === 'number') {\n const row: any = core.flatRows[node]!\n row.depth = depth\n row.parentId = parentId\n flatRows.push(row)\n rows[i] = row\n continue\n }\n\n const subRows = rebuildRows(node.children, depth + 1, node.id)\n const leafRows: Array<any> = []\n collectLeafRows(subRows, leafRows)\n\n const row: any = constructRow(\n table,\n node.id,\n leafRows[0]?.original,\n node.index,\n depth,\n undefined,\n parentId,\n )\n const aggregates = node.aggregates\n Object.assign(row, {\n groupingColumnId: node.groupingColumnId,\n groupingValue: node.groupingValue,\n subRows,\n leafRows,\n getValue: (columnId: string) =>\n hasOwn(aggregates, columnId) ? aggregates[columnId] : undefined,\n })\n\n flatRows.push(row)\n rowsById[node.id] = row\n rows[i] = row\n }\n return rows\n }\n\n const rows = rebuildRows(payload.children, 0, undefined)\n\n return { rows, flatRows, rowsById }\n}\n"],"mappings":";;;;AAuBA,SAAS,gBAAgB,SAAqB,KAAiB;CAC7D,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;EACvC,MAAM,MAAM,QAAQ;EACpB,IAAI,IAAI,oBAAoB,MAC1B,IAAI,KAAK,GAAG;OAEZ,gBAAgB,IAAI,SAAS,GAAG;CAEpC;AACF;AAEA,SAAgB,gBAId,OACA,SAOA,aAC4B;CAC5B,MAAM,OAAO,MAAM,gBAAgB;CAEnC,IAAI,QAAQ,SAAS,QAAQ;EAC3B,MAAM,EAAE,YAAY;EACpB,MAAM,OAAO,IAAI,MAAM,QAAQ,MAAM;EACrC,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;GACvC,MAAM,MAAW,KAAK,SAAS,QAAQ;GACvC,IAAI,aAAa;IACf,IAAI,QAAQ;IACZ,IAAI,WAAW;GACjB;GACA,KAAK,KAAK;EACZ;EACA,OAAO;GAAE;GAAM,UAAU;GAAM,UAAU,KAAK;EAAS;CACzD;CAEA,MAAM,WAAuB,CAAC;CAG9B,MAAM,WAAgC,OAAO,OAAO,KAAK,QAAQ;CAEjE,MAAM,eACJ,OACA,OACA,aACe;EACf,MAAM,OAAO,IAAI,MAAM,MAAM,MAAM;EACnC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;GACrC,MAAM,OAAO,MAAM;GACnB,IAAI,OAAO,SAAS,UAAU;IAC5B,MAAM,MAAW,KAAK,SAAS;IAC/B,IAAI,QAAQ;IACZ,IAAI,WAAW;IACf,SAAS,KAAK,GAAG;IACjB,KAAK,KAAK;IACV;GACF;GAEA,MAAM,UAAU,YAAY,KAAK,UAAU,QAAQ,GAAG,KAAK,EAAE;GAC7D,MAAM,WAAuB,CAAC;GAC9B,gBAAgB,SAAS,QAAQ;GAEjC,MAAM,MAAWA,kCACf,OACA,KAAK,IACL,SAAS,EAAE,EAAE,UACb,KAAK,OACL,OACA,QACA,QACF;GACA,MAAM,aAAa,KAAK;GACxB,OAAO,OAAO,KAAK;IACjB,kBAAkB,KAAK;IACvB,eAAe,KAAK;IACpB;IACA;IACA,WAAW,aACTC,qBAAO,YAAY,QAAQ,IAAI,WAAW,YAAY;GAC1D,CAAC;GAED,SAAS,KAAK,GAAG;GACjB,SAAS,KAAK,MAAM;GACpB,KAAK,KAAK;EACZ;EACA,OAAO;CACT;CAIA,OAAO;EAAE,MAFI,YAAY,QAAQ,UAAU,GAAG,MAElC;EAAG;EAAU;CAAS;AACpC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TableWorkerStagePayload } from "./tableWorkerProtocol.cjs";
|
|
2
|
-
//#region src/worker/rebuildRowModel.d.ts
|
|
3
|
-
/** Payloads that carry data; `unchanged` never reaches the rebuilder. */
|
|
4
|
-
type TableWorkerDataPayload = Exclude<TableWorkerStagePayload, {
|
|
5
|
-
kind: 'unchanged';
|
|
6
|
-
}>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { TableWorkerDataPayload };
|
|
9
|
-
//# sourceMappingURL=rebuildRowModel.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rebuildRowModel.js","names":[],"sources":["../../src/worker/rebuildRowModel.ts"],"sourcesContent":["import { constructRow } from '../core/rows/constructRow'\nimport { hasOwn } from '../utils'\nimport type { RowModel } from '../core/row-models/coreRowModelsFeature.types'\nimport type { Table_Internal } from '../types/Table'\nimport type { TableFeatures } from '../types/TableFeatures'\nimport type { RowData } from '../types/type-utils'\nimport type {\n TableWorkerRowNode,\n TableWorkerStagePayload,\n} from './tableWorkerProtocol'\n\n/** Payloads that carry data; `unchanged` never reaches the rebuilder. */\nexport type TableWorkerDataPayload = Exclude<\n TableWorkerStagePayload,\n { kind: 'unchanged' }\n>\n\n// Main-thread side: payload + this table's core rows -> RowModel. Mirrors how\n// the sync row models treat rows: data rows are reused (with depth/parentId\n// rewritten, exactly like createGroupedRowModel does), synthetic group rows\n// are reconstructed via constructRow with their worker-computed aggregates\n// pre-seeded so no aggregation ever runs on the main thread.\n\nfunction collectLeafRows(subRows: Array<any>, out: Array<any>) {\n for (let i = 0; i < subRows.length; i++) {\n const row = subRows[i]\n if (row.groupingColumnId == null) {\n out.push(row)\n } else {\n collectLeafRows(row.subRows, out)\n }\n }\n}\n\nexport function rebuildRowModel<\n TFeatures extends TableFeatures,\n TData extends RowData,\n>(\n table: Table_Internal<TFeatures, TData>,\n payload: TableWorkerDataPayload,\n /**\n * Whether a flat payload should rewrite row depth/parentId. Mirrors core:\n * the grouped model's passthrough resets them, the filtered model never\n * touches them. Without this distinction a filtered rebuild could zero the\n * depths a grouped/sorted tree rebuild just assigned to shared row objects.\n */\n resetDepths: boolean,\n): RowModel<TFeatures, TData> {\n const core = table.getCoreRowModel()\n\n if (payload.kind === 'flat') {\n const { indices } = payload\n const rows = new Array(indices.length)\n for (let i = 0; i < indices.length; i++) {\n const row: any = core.flatRows[indices[i]!]!\n if (resetDepths) {\n row.depth = 0\n row.parentId = undefined\n }\n rows[i] = row\n }\n return { rows, flatRows: rows, rowsById: core.rowsById }\n }\n\n const flatRows: Array<any> = []\n // Data rows resolve through the prototype chain to the core map; only\n // synthetic group rows are added on top.\n const rowsById: Record<string, any> = Object.create(core.rowsById)\n\n const rebuildRows = (\n nodes: Array<TableWorkerRowNode>,\n depth: number,\n parentId: string | undefined,\n ): Array<any> => {\n const rows = new Array(nodes.length)\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i]!\n if (typeof node === 'number') {\n const row: any = core.flatRows[node]!\n row.depth = depth\n row.parentId = parentId\n flatRows.push(row)\n rows[i] = row\n continue\n }\n\n const subRows = rebuildRows(node.children, depth + 1, node.id)\n const leafRows: Array<any> = []\n collectLeafRows(subRows, leafRows)\n\n const row: any = constructRow(\n table,\n node.id,\n leafRows[0]?.original,\n node.index,\n depth,\n undefined,\n parentId,\n )\n const aggregates = node.aggregates\n Object.assign(row, {\n groupingColumnId: node.groupingColumnId,\n groupingValue: node.groupingValue,\n subRows,\n leafRows,\n getValue: (columnId: string) =>\n hasOwn(aggregates, columnId) ? aggregates[columnId] : undefined,\n })\n\n flatRows.push(row)\n rowsById[node.id] = row\n rows[i] = row\n }\n return rows\n }\n\n const rows = rebuildRows(payload.children, 0, undefined)\n\n return { rows, flatRows, rowsById }\n}\n"],"mappings":";;;;AAuBA,SAAS,gBAAgB,SAAqB,KAAiB;CAC7D,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;EACvC,MAAM,MAAM,QAAQ;EACpB,IAAI,IAAI,oBAAoB,MAC1B,IAAI,KAAK,GAAG;OAEZ,gBAAgB,IAAI,SAAS,GAAG;CAEpC;AACF;AAEA,SAAgB,gBAId,OACA,SAOA,aAC4B;CAC5B,MAAM,OAAO,MAAM,gBAAgB;CAEnC,IAAI,QAAQ,SAAS,QAAQ;EAC3B,MAAM,EAAE,YAAY;EACpB,MAAM,OAAO,IAAI,MAAM,QAAQ,MAAM;EACrC,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;GACvC,MAAM,MAAW,KAAK,SAAS,QAAQ;GACvC,IAAI,aAAa;IACf,IAAI,QAAQ;IACZ,IAAI,WAAW;GACjB;GACA,KAAK,KAAK;EACZ;EACA,OAAO;GAAE;GAAM,UAAU;GAAM,UAAU,KAAK;EAAS;CACzD;CAEA,MAAM,WAAuB,CAAC;CAG9B,MAAM,WAAgC,OAAO,OAAO,KAAK,QAAQ;CAEjE,MAAM,eACJ,OACA,OACA,aACe;EACf,MAAM,OAAO,IAAI,MAAM,MAAM,MAAM;EACnC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;GACrC,MAAM,OAAO,MAAM;GACnB,IAAI,OAAO,SAAS,UAAU;IAC5B,MAAM,MAAW,KAAK,SAAS;IAC/B,IAAI,QAAQ;IACZ,IAAI,WAAW;IACf,SAAS,KAAK,GAAG;IACjB,KAAK,KAAK;IACV;GACF;GAEA,MAAM,UAAU,YAAY,KAAK,UAAU,QAAQ,GAAG,KAAK,EAAE;GAC7D,MAAM,WAAuB,CAAC;GAC9B,gBAAgB,SAAS,QAAQ;GAEjC,MAAM,MAAW,aACf,OACA,KAAK,IACL,SAAS,EAAE,EAAE,UACb,KAAK,OACL,OACA,QACA,QACF;GACA,MAAM,aAAa,KAAK;GACxB,OAAO,OAAO,KAAK;IACjB,kBAAkB,KAAK;IACvB,eAAe,KAAK;IACpB;IACA;IACA,WAAW,aACT,OAAO,YAAY,QAAQ,IAAI,WAAW,YAAY;GAC1D,CAAC;GAED,SAAS,KAAK,GAAG;GACjB,SAAS,KAAK,MAAM;GACpB,KAAK,KAAK;EACZ;EACA,OAAO;CACT;CAIA,OAAO;EAAE,MAFI,YAAY,QAAQ,UAAU,GAAG,MAElC;EAAG;EAAU;CAAS;AACpC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/worker/serializeRowModel.ts
|
|
3
|
-
function isCloneSafe(value) {
|
|
4
|
-
return typeof value !== "function" && typeof value !== "symbol";
|
|
5
|
-
}
|
|
6
|
-
function serializeRows(rows, coreIndexById, aggregateColumnIds) {
|
|
7
|
-
const nodes = new Array(rows.length);
|
|
8
|
-
for (let i = 0; i < rows.length; i++) {
|
|
9
|
-
const row = rows[i];
|
|
10
|
-
if (row.groupingColumnId == null) {
|
|
11
|
-
nodes[i] = coreIndexById[row.id];
|
|
12
|
-
continue;
|
|
13
|
-
}
|
|
14
|
-
const aggregates = {};
|
|
15
|
-
for (let c = 0; c < aggregateColumnIds.length; c++) {
|
|
16
|
-
const columnId = aggregateColumnIds[c];
|
|
17
|
-
const value = row.getValue(columnId);
|
|
18
|
-
if (value !== void 0 && isCloneSafe(value)) aggregates[columnId] = value;
|
|
19
|
-
}
|
|
20
|
-
if (!(row.groupingColumnId in aggregates)) {
|
|
21
|
-
const value = row.getValue(row.groupingColumnId);
|
|
22
|
-
if (value !== void 0 && isCloneSafe(value)) aggregates[row.groupingColumnId] = value;
|
|
23
|
-
}
|
|
24
|
-
nodes[i] = {
|
|
25
|
-
id: row.id,
|
|
26
|
-
groupingColumnId: row.groupingColumnId,
|
|
27
|
-
groupingValue: row.groupingValue,
|
|
28
|
-
index: row.index,
|
|
29
|
-
aggregates,
|
|
30
|
-
children: serializeRows(row.subRows, coreIndexById, aggregateColumnIds)
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
return nodes;
|
|
34
|
-
}
|
|
35
|
-
function serializeRowModel(model, coreIndexById, aggregateColumnIds, transfer) {
|
|
36
|
-
if (model.flatRows.length === model.rows.length) {
|
|
37
|
-
const indices = new Uint32Array(model.rows.length);
|
|
38
|
-
for (let i = 0; i < indices.length; i++) indices[i] = coreIndexById[model.rows[i].id];
|
|
39
|
-
transfer.push(indices.buffer);
|
|
40
|
-
return {
|
|
41
|
-
kind: "flat",
|
|
42
|
-
indices
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
kind: "tree",
|
|
47
|
-
children: serializeRows(model.rows, coreIndexById, aggregateColumnIds)
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
//#endregion
|
|
52
|
-
exports.serializeRowModel = serializeRowModel;
|
|
53
|
-
//# sourceMappingURL=serializeRowModel.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serializeRowModel.cjs","names":[],"sources":["../../src/worker/serializeRowModel.ts"],"sourcesContent":["import type { RowModel } from '../core/row-models/coreRowModelsFeature.types'\nimport type {\n TableWorkerRowNode,\n TableWorkerStagePayload,\n} from './tableWorkerProtocol'\n\n// Worker-side: RowModel -> transferable payload. Stage-agnostic; the payload\n// kind is chosen from the model's shape (synthetic rows present or not).\n\nfunction isCloneSafe(value: unknown): boolean {\n return typeof value !== 'function' && typeof value !== 'symbol'\n}\n\nfunction serializeRows(\n rows: Array<any>,\n coreIndexById: Record<string, number>,\n aggregateColumnIds: Array<string>,\n): Array<TableWorkerRowNode> {\n const nodes = new Array<TableWorkerRowNode>(rows.length)\n for (let i = 0; i < rows.length; i++) {\n const row = rows[i]\n if (row.groupingColumnId == null) {\n // Data row: its position in `options.data` is all the main thread needs.\n nodes[i] = coreIndexById[row.id]!\n continue\n }\n // Synthetic group row: compute aggregates eagerly (the expensive per-group\n // work we want off the main thread), but only for columns with an explicit\n // aggregation; sync tables aggregate lazily, so eagerly auto-aggregating\n // every column would explode on high-cardinality grouping.\n const aggregates: Record<string, unknown> = {}\n for (let c = 0; c < aggregateColumnIds.length; c++) {\n const columnId = aggregateColumnIds[c]!\n const value = row.getValue(columnId)\n if (value !== undefined && isCloneSafe(value)) {\n aggregates[columnId] = value\n }\n }\n // The group's own column always serializes its display value (the first\n // leaf's value) so grouped cells render.\n if (!(row.groupingColumnId in aggregates)) {\n const value = row.getValue(row.groupingColumnId)\n if (value !== undefined && isCloneSafe(value)) {\n aggregates[row.groupingColumnId] = value\n }\n }\n nodes[i] = {\n id: row.id,\n groupingColumnId: row.groupingColumnId,\n groupingValue: row.groupingValue,\n index: row.index,\n aggregates,\n children: serializeRows(row.subRows, coreIndexById, aggregateColumnIds),\n }\n }\n return nodes\n}\n\nexport function serializeRowModel(\n model: RowModel<any, any>,\n coreIndexById: Record<string, number>,\n aggregateColumnIds: Array<string>,\n transfer: Array<Transferable>,\n): TableWorkerStagePayload {\n // Flat fast path: no synthetic rows anywhere (flatRows === rows for flat\n // data). A Uint32Array permutation transfers at zero-copy cost.\n if (model.flatRows.length === model.rows.length) {\n const indices = new Uint32Array(model.rows.length)\n for (let i = 0; i < indices.length; i++) {\n indices[i] = coreIndexById[model.rows[i]!.id]!\n }\n transfer.push(indices.buffer)\n return { kind: 'flat', indices }\n }\n\n return {\n kind: 'tree',\n children: serializeRows(model.rows, coreIndexById, aggregateColumnIds),\n }\n}\n"],"mappings":";;AASA,SAAS,YAAY,OAAyB;CAC5C,OAAO,OAAO,UAAU,cAAc,OAAO,UAAU;AACzD;AAEA,SAAS,cACP,MACA,eACA,oBAC2B;CAC3B,MAAM,QAAQ,IAAI,MAA0B,KAAK,MAAM;CACvD,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EACpC,MAAM,MAAM,KAAK;EACjB,IAAI,IAAI,oBAAoB,MAAM;GAEhC,MAAM,KAAK,cAAc,IAAI;GAC7B;EACF;EAKA,MAAM,aAAsC,CAAC;EAC7C,KAAK,IAAI,IAAI,GAAG,IAAI,mBAAmB,QAAQ,KAAK;GAClD,MAAM,WAAW,mBAAmB;GACpC,MAAM,QAAQ,IAAI,SAAS,QAAQ;GACnC,IAAI,UAAU,UAAa,YAAY,KAAK,GAC1C,WAAW,YAAY;EAE3B;EAGA,IAAI,EAAE,IAAI,oBAAoB,aAAa;GACzC,MAAM,QAAQ,IAAI,SAAS,IAAI,gBAAgB;GAC/C,IAAI,UAAU,UAAa,YAAY,KAAK,GAC1C,WAAW,IAAI,oBAAoB;EAEvC;EACA,MAAM,KAAK;GACT,IAAI,IAAI;GACR,kBAAkB,IAAI;GACtB,eAAe,IAAI;GACnB,OAAO,IAAI;GACX;GACA,UAAU,cAAc,IAAI,SAAS,eAAe,kBAAkB;EACxE;CACF;CACA,OAAO;AACT;AAEA,SAAgB,kBACd,OACA,eACA,oBACA,UACyB;CAGzB,IAAI,MAAM,SAAS,WAAW,MAAM,KAAK,QAAQ;EAC/C,MAAM,UAAU,IAAI,YAAY,MAAM,KAAK,MAAM;EACjD,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAClC,QAAQ,KAAK,cAAc,MAAM,KAAK,EAAE,CAAE;EAE5C,SAAS,KAAK,QAAQ,MAAM;EAC5B,OAAO;GAAE,MAAM;GAAQ;EAAQ;CACjC;CAEA,OAAO;EACL,MAAM;EACN,UAAU,cAAc,MAAM,MAAM,eAAe,kBAAkB;CACvE;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serializeRowModel.js","names":[],"sources":["../../src/worker/serializeRowModel.ts"],"sourcesContent":["import type { RowModel } from '../core/row-models/coreRowModelsFeature.types'\nimport type {\n TableWorkerRowNode,\n TableWorkerStagePayload,\n} from './tableWorkerProtocol'\n\n// Worker-side: RowModel -> transferable payload. Stage-agnostic; the payload\n// kind is chosen from the model's shape (synthetic rows present or not).\n\nfunction isCloneSafe(value: unknown): boolean {\n return typeof value !== 'function' && typeof value !== 'symbol'\n}\n\nfunction serializeRows(\n rows: Array<any>,\n coreIndexById: Record<string, number>,\n aggregateColumnIds: Array<string>,\n): Array<TableWorkerRowNode> {\n const nodes = new Array<TableWorkerRowNode>(rows.length)\n for (let i = 0; i < rows.length; i++) {\n const row = rows[i]\n if (row.groupingColumnId == null) {\n // Data row: its position in `options.data` is all the main thread needs.\n nodes[i] = coreIndexById[row.id]!\n continue\n }\n // Synthetic group row: compute aggregates eagerly (the expensive per-group\n // work we want off the main thread), but only for columns with an explicit\n // aggregation; sync tables aggregate lazily, so eagerly auto-aggregating\n // every column would explode on high-cardinality grouping.\n const aggregates: Record<string, unknown> = {}\n for (let c = 0; c < aggregateColumnIds.length; c++) {\n const columnId = aggregateColumnIds[c]!\n const value = row.getValue(columnId)\n if (value !== undefined && isCloneSafe(value)) {\n aggregates[columnId] = value\n }\n }\n // The group's own column always serializes its display value (the first\n // leaf's value) so grouped cells render.\n if (!(row.groupingColumnId in aggregates)) {\n const value = row.getValue(row.groupingColumnId)\n if (value !== undefined && isCloneSafe(value)) {\n aggregates[row.groupingColumnId] = value\n }\n }\n nodes[i] = {\n id: row.id,\n groupingColumnId: row.groupingColumnId,\n groupingValue: row.groupingValue,\n index: row.index,\n aggregates,\n children: serializeRows(row.subRows, coreIndexById, aggregateColumnIds),\n }\n }\n return nodes\n}\n\nexport function serializeRowModel(\n model: RowModel<any, any>,\n coreIndexById: Record<string, number>,\n aggregateColumnIds: Array<string>,\n transfer: Array<Transferable>,\n): TableWorkerStagePayload {\n // Flat fast path: no synthetic rows anywhere (flatRows === rows for flat\n // data). A Uint32Array permutation transfers at zero-copy cost.\n if (model.flatRows.length === model.rows.length) {\n const indices = new Uint32Array(model.rows.length)\n for (let i = 0; i < indices.length; i++) {\n indices[i] = coreIndexById[model.rows[i]!.id]!\n }\n transfer.push(indices.buffer)\n return { kind: 'flat', indices }\n }\n\n return {\n kind: 'tree',\n children: serializeRows(model.rows, coreIndexById, aggregateColumnIds),\n }\n}\n"],"mappings":";AASA,SAAS,YAAY,OAAyB;CAC5C,OAAO,OAAO,UAAU,cAAc,OAAO,UAAU;AACzD;AAEA,SAAS,cACP,MACA,eACA,oBAC2B;CAC3B,MAAM,QAAQ,IAAI,MAA0B,KAAK,MAAM;CACvD,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EACpC,MAAM,MAAM,KAAK;EACjB,IAAI,IAAI,oBAAoB,MAAM;GAEhC,MAAM,KAAK,cAAc,IAAI;GAC7B;EACF;EAKA,MAAM,aAAsC,CAAC;EAC7C,KAAK,IAAI,IAAI,GAAG,IAAI,mBAAmB,QAAQ,KAAK;GAClD,MAAM,WAAW,mBAAmB;GACpC,MAAM,QAAQ,IAAI,SAAS,QAAQ;GACnC,IAAI,UAAU,UAAa,YAAY,KAAK,GAC1C,WAAW,YAAY;EAE3B;EAGA,IAAI,EAAE,IAAI,oBAAoB,aAAa;GACzC,MAAM,QAAQ,IAAI,SAAS,IAAI,gBAAgB;GAC/C,IAAI,UAAU,UAAa,YAAY,KAAK,GAC1C,WAAW,IAAI,oBAAoB;EAEvC;EACA,MAAM,KAAK;GACT,IAAI,IAAI;GACR,kBAAkB,IAAI;GACtB,eAAe,IAAI;GACnB,OAAO,IAAI;GACX;GACA,UAAU,cAAc,IAAI,SAAS,eAAe,kBAAkB;EACxE;CACF;CACA,OAAO;AACT;AAEA,SAAgB,kBACd,OACA,eACA,oBACA,UACyB;CAGzB,IAAI,MAAM,SAAS,WAAW,MAAM,KAAK,QAAQ;EAC/C,MAAM,UAAU,IAAI,YAAY,MAAM,KAAK,MAAM;EACjD,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAClC,QAAQ,KAAK,cAAc,MAAM,KAAK,EAAE,CAAE;EAE5C,SAAS,KAAK,QAAQ,MAAM;EAC5B,OAAO;GAAE,MAAM;GAAQ;EAAQ;CACjC;CAEA,OAAO;EACL,MAAM;EACN,UAAU,cAAc,MAAM,MAAM,eAAe,kBAAkB;CACvE;AACF"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/worker/tableWorkerProtocol.ts
|
|
3
|
-
/**
|
|
4
|
-
* Row model stages that can be offloaded to the worker, in pipeline order.
|
|
5
|
-
* Everything else in this module is derived from this list; adding a stage
|
|
6
|
-
* means adding an entry here and to `tableWorkerStageStateDeps`.
|
|
7
|
-
*/
|
|
8
|
-
const tableWorkerPipeline = [
|
|
9
|
-
"filtered",
|
|
10
|
-
"grouped",
|
|
11
|
-
"sorted",
|
|
12
|
-
"expanded"
|
|
13
|
-
];
|
|
14
|
-
/**
|
|
15
|
-
* The state slices each stage's computation depends on. The main thread sends
|
|
16
|
-
* the union of deps for its registered stages; a change to any of them
|
|
17
|
-
* triggers one worker round trip.
|
|
18
|
-
*/
|
|
19
|
-
const tableWorkerStageStateDeps = {
|
|
20
|
-
filtered: ["columnFilters", "globalFilter"],
|
|
21
|
-
grouped: ["grouping"],
|
|
22
|
-
sorted: ["sorting"],
|
|
23
|
-
expanded: ["expanded"]
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
exports.tableWorkerPipeline = tableWorkerPipeline;
|
|
28
|
-
exports.tableWorkerStageStateDeps = tableWorkerStageStateDeps;
|
|
29
|
-
//# sourceMappingURL=tableWorkerProtocol.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tableWorkerProtocol.cjs","names":[],"sources":["../../src/worker/tableWorkerProtocol.ts"],"sourcesContent":["import type { RowData } from '../types/type-utils'\n\n/**\n * Row model stages that can be offloaded to the worker, in pipeline order.\n * Everything else in this module is derived from this list; adding a stage\n * means adding an entry here and to `tableWorkerStageStateDeps`.\n */\nexport const tableWorkerPipeline = [\n 'filtered',\n 'grouped',\n 'sorted',\n 'expanded',\n] as const\n\nexport type TableWorkerStage = (typeof tableWorkerPipeline)[number]\n\n/**\n * The state slices each stage's computation depends on. The main thread sends\n * the union of deps for its registered stages; a change to any of them\n * triggers one worker round trip.\n */\nexport const tableWorkerStageStateDeps: Record<\n TableWorkerStage,\n Array<string>\n> = {\n filtered: ['columnFilters', 'globalFilter'],\n grouped: ['grouping'],\n sorted: ['sorting'],\n expanded: ['expanded'],\n}\n\n/**\n * A serialized synthetic (group) row. Leaf rows serialize as their position in\n * `options.data`; group rows carry what `constructRow` + the grouped row model\n * need to rebuild them, plus eagerly computed aggregate values so no\n * aggregation runs on the main thread.\n */\nexport interface TableWorkerGroupNode {\n id: string\n groupingColumnId: string\n groupingValue: unknown\n index: number\n aggregates: Record<string, unknown>\n children: Array<TableWorkerRowNode>\n}\n\nexport type TableWorkerRowNode = number | TableWorkerGroupNode\n\n/**\n * A stage result. Flat models (every row is a data row) travel as a\n * transferable index permutation; models containing synthetic rows (grouping)\n * travel as a tree. The kind is chosen from the model's actual shape at\n * runtime, not from the stage name: a sorted model is flat without grouping\n * and a tree with it.\n *\n * `unchanged` means the stage's model is identical to the last one sent for\n * this dataset (its memoized inputs did not change); the main thread keeps\n * its previous result and skips the rebuild entirely.\n */\nexport type TableWorkerStagePayload =\n | { kind: 'flat'; indices: Uint32Array }\n | { kind: 'tree'; children: Array<TableWorkerRowNode> }\n | { kind: 'unchanged' }\n\nexport type TableWorkerRequest<TData extends RowData = any> =\n | {\n type: 'data'\n dataVersion: number\n data: Array<TData>\n }\n | {\n type: 'process'\n requestId: number\n dataVersion: number\n /** The stages the main thread has worker-backed row models for. */\n stages: Array<TableWorkerStage>\n /** Serializable state slices (union of the stages' deps). */\n state: Record<string, unknown>\n }\n\nexport interface TableWorkerResult {\n type: 'result'\n requestId: number\n dataVersion: number\n stages: { [K in TableWorkerStage]?: TableWorkerStagePayload }\n computeMs: number\n}\n\nexport type TableWorkerResponse = TableWorkerResult\n\n/**\n * The state slice added by `workerRowModelsFeature`. `version` bumps when a\n * worker result lands (driving re-renders through the normal state path);\n * `isPending` is true while a request is in flight. The timing fields expose\n * the last result's worker compute time and full round trip for devtools and\n * debugging.\n */\nexport interface TableState_WorkerRowModels {\n workerRowModels: {\n version: number\n isPending: boolean\n lastComputeMs?: number\n lastRoundTripMs?: number\n }\n}\n"],"mappings":";;;;;;;AAOA,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;AACF;;;;;;AASA,MAAa,4BAGT;CACF,UAAU,CAAC,iBAAiB,cAAc;CAC1C,SAAS,CAAC,UAAU;CACpB,QAAQ,CAAC,SAAS;CAClB,UAAU,CAAC,UAAU;AACvB"}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { RowData } from "../types/type-utils.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/worker/tableWorkerProtocol.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Row model stages that can be offloaded to the worker, in pipeline order.
|
|
6
|
-
* Everything else in this module is derived from this list; adding a stage
|
|
7
|
-
* means adding an entry here and to `tableWorkerStageStateDeps`.
|
|
8
|
-
*/
|
|
9
|
-
declare const tableWorkerPipeline: readonly ["filtered", "grouped", "sorted", "expanded"];
|
|
10
|
-
type TableWorkerStage = (typeof tableWorkerPipeline)[number];
|
|
11
|
-
/**
|
|
12
|
-
* The state slices each stage's computation depends on. The main thread sends
|
|
13
|
-
* the union of deps for its registered stages; a change to any of them
|
|
14
|
-
* triggers one worker round trip.
|
|
15
|
-
*/
|
|
16
|
-
declare const tableWorkerStageStateDeps: Record<TableWorkerStage, Array<string>>;
|
|
17
|
-
/**
|
|
18
|
-
* A serialized synthetic (group) row. Leaf rows serialize as their position in
|
|
19
|
-
* `options.data`; group rows carry what `constructRow` + the grouped row model
|
|
20
|
-
* need to rebuild them, plus eagerly computed aggregate values so no
|
|
21
|
-
* aggregation runs on the main thread.
|
|
22
|
-
*/
|
|
23
|
-
interface TableWorkerGroupNode {
|
|
24
|
-
id: string;
|
|
25
|
-
groupingColumnId: string;
|
|
26
|
-
groupingValue: unknown;
|
|
27
|
-
index: number;
|
|
28
|
-
aggregates: Record<string, unknown>;
|
|
29
|
-
children: Array<TableWorkerRowNode>;
|
|
30
|
-
}
|
|
31
|
-
type TableWorkerRowNode = number | TableWorkerGroupNode;
|
|
32
|
-
/**
|
|
33
|
-
* A stage result. Flat models (every row is a data row) travel as a
|
|
34
|
-
* transferable index permutation; models containing synthetic rows (grouping)
|
|
35
|
-
* travel as a tree. The kind is chosen from the model's actual shape at
|
|
36
|
-
* runtime, not from the stage name: a sorted model is flat without grouping
|
|
37
|
-
* and a tree with it.
|
|
38
|
-
*
|
|
39
|
-
* `unchanged` means the stage's model is identical to the last one sent for
|
|
40
|
-
* this dataset (its memoized inputs did not change); the main thread keeps
|
|
41
|
-
* its previous result and skips the rebuild entirely.
|
|
42
|
-
*/
|
|
43
|
-
type TableWorkerStagePayload = {
|
|
44
|
-
kind: 'flat';
|
|
45
|
-
indices: Uint32Array;
|
|
46
|
-
} | {
|
|
47
|
-
kind: 'tree';
|
|
48
|
-
children: Array<TableWorkerRowNode>;
|
|
49
|
-
} | {
|
|
50
|
-
kind: 'unchanged';
|
|
51
|
-
};
|
|
52
|
-
type TableWorkerRequest<TData extends RowData = any> = {
|
|
53
|
-
type: 'data';
|
|
54
|
-
dataVersion: number;
|
|
55
|
-
data: Array<TData>;
|
|
56
|
-
} | {
|
|
57
|
-
type: 'process';
|
|
58
|
-
requestId: number;
|
|
59
|
-
dataVersion: number; /** The stages the main thread has worker-backed row models for. */
|
|
60
|
-
stages: Array<TableWorkerStage>; /** Serializable state slices (union of the stages' deps). */
|
|
61
|
-
state: Record<string, unknown>;
|
|
62
|
-
};
|
|
63
|
-
interface TableWorkerResult {
|
|
64
|
-
type: 'result';
|
|
65
|
-
requestId: number;
|
|
66
|
-
dataVersion: number;
|
|
67
|
-
stages: { [K in TableWorkerStage]?: TableWorkerStagePayload };
|
|
68
|
-
computeMs: number;
|
|
69
|
-
}
|
|
70
|
-
type TableWorkerResponse = TableWorkerResult;
|
|
71
|
-
/**
|
|
72
|
-
* The state slice added by `workerRowModelsFeature`. `version` bumps when a
|
|
73
|
-
* worker result lands (driving re-renders through the normal state path);
|
|
74
|
-
* `isPending` is true while a request is in flight. The timing fields expose
|
|
75
|
-
* the last result's worker compute time and full round trip for devtools and
|
|
76
|
-
* debugging.
|
|
77
|
-
*/
|
|
78
|
-
interface TableState_WorkerRowModels {
|
|
79
|
-
workerRowModels: {
|
|
80
|
-
version: number;
|
|
81
|
-
isPending: boolean;
|
|
82
|
-
lastComputeMs?: number;
|
|
83
|
-
lastRoundTripMs?: number;
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
//#endregion
|
|
87
|
-
export { TableState_WorkerRowModels, TableWorkerGroupNode, TableWorkerRequest, TableWorkerResponse, TableWorkerResult, TableWorkerRowNode, TableWorkerStage, TableWorkerStagePayload, tableWorkerPipeline, tableWorkerStageStateDeps };
|
|
88
|
-
//# sourceMappingURL=tableWorkerProtocol.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tableWorkerProtocol.js","names":[],"sources":["../../src/worker/tableWorkerProtocol.ts"],"sourcesContent":["import type { RowData } from '../types/type-utils'\n\n/**\n * Row model stages that can be offloaded to the worker, in pipeline order.\n * Everything else in this module is derived from this list; adding a stage\n * means adding an entry here and to `tableWorkerStageStateDeps`.\n */\nexport const tableWorkerPipeline = [\n 'filtered',\n 'grouped',\n 'sorted',\n 'expanded',\n] as const\n\nexport type TableWorkerStage = (typeof tableWorkerPipeline)[number]\n\n/**\n * The state slices each stage's computation depends on. The main thread sends\n * the union of deps for its registered stages; a change to any of them\n * triggers one worker round trip.\n */\nexport const tableWorkerStageStateDeps: Record<\n TableWorkerStage,\n Array<string>\n> = {\n filtered: ['columnFilters', 'globalFilter'],\n grouped: ['grouping'],\n sorted: ['sorting'],\n expanded: ['expanded'],\n}\n\n/**\n * A serialized synthetic (group) row. Leaf rows serialize as their position in\n * `options.data`; group rows carry what `constructRow` + the grouped row model\n * need to rebuild them, plus eagerly computed aggregate values so no\n * aggregation runs on the main thread.\n */\nexport interface TableWorkerGroupNode {\n id: string\n groupingColumnId: string\n groupingValue: unknown\n index: number\n aggregates: Record<string, unknown>\n children: Array<TableWorkerRowNode>\n}\n\nexport type TableWorkerRowNode = number | TableWorkerGroupNode\n\n/**\n * A stage result. Flat models (every row is a data row) travel as a\n * transferable index permutation; models containing synthetic rows (grouping)\n * travel as a tree. The kind is chosen from the model's actual shape at\n * runtime, not from the stage name: a sorted model is flat without grouping\n * and a tree with it.\n *\n * `unchanged` means the stage's model is identical to the last one sent for\n * this dataset (its memoized inputs did not change); the main thread keeps\n * its previous result and skips the rebuild entirely.\n */\nexport type TableWorkerStagePayload =\n | { kind: 'flat'; indices: Uint32Array }\n | { kind: 'tree'; children: Array<TableWorkerRowNode> }\n | { kind: 'unchanged' }\n\nexport type TableWorkerRequest<TData extends RowData = any> =\n | {\n type: 'data'\n dataVersion: number\n data: Array<TData>\n }\n | {\n type: 'process'\n requestId: number\n dataVersion: number\n /** The stages the main thread has worker-backed row models for. */\n stages: Array<TableWorkerStage>\n /** Serializable state slices (union of the stages' deps). */\n state: Record<string, unknown>\n }\n\nexport interface TableWorkerResult {\n type: 'result'\n requestId: number\n dataVersion: number\n stages: { [K in TableWorkerStage]?: TableWorkerStagePayload }\n computeMs: number\n}\n\nexport type TableWorkerResponse = TableWorkerResult\n\n/**\n * The state slice added by `workerRowModelsFeature`. `version` bumps when a\n * worker result lands (driving re-renders through the normal state path);\n * `isPending` is true while a request is in flight. The timing fields expose\n * the last result's worker compute time and full round trip for devtools and\n * debugging.\n */\nexport interface TableState_WorkerRowModels {\n workerRowModels: {\n version: number\n isPending: boolean\n lastComputeMs?: number\n lastRoundTripMs?: number\n }\n}\n"],"mappings":";;;;;;AAOA,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;AACF;;;;;;AASA,MAAa,4BAGT;CACF,UAAU,CAAC,iBAAiB,cAAc;CAC1C,SAAS,CAAC,UAAU;CACpB,QAAQ,CAAC,SAAS;CAClB,UAAU,CAAC,UAAU;AACvB"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { Table_Internal } from '../../types/Table'
|
|
2
|
-
import type { CellData, RowData } from '../../types/type-utils'
|
|
3
|
-
import type { TableFeatures } from '../../types/TableFeatures'
|
|
4
|
-
import type { Row } from '../../types/Row'
|
|
5
|
-
import type { Cell } from '../../types/Cell'
|
|
6
|
-
import type { Column } from '../../types/Column'
|
|
7
|
-
import type { Cell_CoreProperties } from './coreCellsFeature.types'
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Creates or retrieves the cell prototype for a table.
|
|
11
|
-
* The prototype is cached on the table and shared by all cell instances.
|
|
12
|
-
*/
|
|
13
|
-
function getCellPrototype<
|
|
14
|
-
TFeatures extends TableFeatures,
|
|
15
|
-
TData extends RowData,
|
|
16
|
-
>(table: Table_Internal<TFeatures, TData>): object {
|
|
17
|
-
if (!table._cellPrototype) {
|
|
18
|
-
table._cellPrototype = { table }
|
|
19
|
-
const features = Object.values(table._features)
|
|
20
|
-
for (let i = 0; i < features.length; i++) {
|
|
21
|
-
features[i]!.assignCellPrototype?.(table._cellPrototype, table)
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return table._cellPrototype
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Constructs a cell instance from normalized table internals.
|
|
29
|
-
*
|
|
30
|
-
* This wires core properties, feature prototype APIs, and instance data used by table rendering and row-model operations.
|
|
31
|
-
*/
|
|
32
|
-
export function constructCell<
|
|
33
|
-
TFeatures extends TableFeatures,
|
|
34
|
-
TData extends RowData,
|
|
35
|
-
TValue extends CellData = CellData,
|
|
36
|
-
>(
|
|
37
|
-
column: Column<TFeatures, TData, TValue>,
|
|
38
|
-
row: Row<TFeatures, TData>,
|
|
39
|
-
table: Table_Internal<TFeatures, TData>,
|
|
40
|
-
): Cell<TFeatures, TData, TValue> {
|
|
41
|
-
// Create cell with shared prototype for memory efficiency
|
|
42
|
-
const cellPrototype = getCellPrototype(table)
|
|
43
|
-
const cell = Object.create(cellPrototype) as Cell_CoreProperties<
|
|
44
|
-
TFeatures,
|
|
45
|
-
TData,
|
|
46
|
-
TValue
|
|
47
|
-
>
|
|
48
|
-
|
|
49
|
-
// Only assign instance-specific properties
|
|
50
|
-
cell.column = column
|
|
51
|
-
cell.id = `${row.id}_${column.id}`
|
|
52
|
-
cell.row = row
|
|
53
|
-
|
|
54
|
-
return cell as Cell<TFeatures, TData, TValue>
|
|
55
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { assignPrototypeAPIs } from '../../utils'
|
|
2
|
-
import {
|
|
3
|
-
cell_getContext,
|
|
4
|
-
cell_getValue,
|
|
5
|
-
cell_renderValue,
|
|
6
|
-
} from './coreCellsFeature.utils'
|
|
7
|
-
import type { TableFeature } from '../../types/TableFeatures'
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Core feature that adds cell value, render, and context APIs.
|
|
11
|
-
*/
|
|
12
|
-
export const coreCellsFeature: TableFeature = {
|
|
13
|
-
assignCellPrototype: (prototype, table) => {
|
|
14
|
-
assignPrototypeAPIs('coreCellsFeature', prototype, table, {
|
|
15
|
-
cell_getValue: {
|
|
16
|
-
fn: (cell) => cell_getValue(cell),
|
|
17
|
-
},
|
|
18
|
-
cell_renderValue: {
|
|
19
|
-
fn: (cell) => cell_renderValue(cell),
|
|
20
|
-
},
|
|
21
|
-
cell_getContext: {
|
|
22
|
-
fn: (cell) => cell_getContext(cell),
|
|
23
|
-
memoDeps: (cell) => [cell],
|
|
24
|
-
},
|
|
25
|
-
})
|
|
26
|
-
},
|
|
27
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import type { CellData, Getter, RowData } from '../../types/type-utils'
|
|
2
|
-
import type { TableFeatures } from '../../types/TableFeatures'
|
|
3
|
-
import type { Table, Table_Internal } from '../../types/Table'
|
|
4
|
-
import type { Row } from '../../types/Row'
|
|
5
|
-
import type { Cell } from '../../types/Cell'
|
|
6
|
-
import type { Column } from '../../types/Column'
|
|
7
|
-
|
|
8
|
-
export interface CellContext<
|
|
9
|
-
in out TFeatures extends TableFeatures,
|
|
10
|
-
in out TData extends RowData,
|
|
11
|
-
TValue extends CellData = CellData,
|
|
12
|
-
> {
|
|
13
|
-
cell: Cell<TFeatures, TData, TValue>
|
|
14
|
-
column: Column<TFeatures, TData, TValue>
|
|
15
|
-
getValue: Getter<TValue>
|
|
16
|
-
renderValue: Getter<TValue | null>
|
|
17
|
-
row: Row<TFeatures, TData>
|
|
18
|
-
table: Table<TFeatures, TData>
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface Cell_CoreProperties<
|
|
22
|
-
in out TFeatures extends TableFeatures,
|
|
23
|
-
in out TData extends RowData,
|
|
24
|
-
TValue extends CellData = CellData,
|
|
25
|
-
> {
|
|
26
|
-
/**
|
|
27
|
-
* The associated Column object for the cell.
|
|
28
|
-
*/
|
|
29
|
-
column: Column<TFeatures, TData, TValue>
|
|
30
|
-
/**
|
|
31
|
-
* The unique ID for the cell across the entire table.
|
|
32
|
-
*/
|
|
33
|
-
id: string
|
|
34
|
-
/**
|
|
35
|
-
* The associated Row object for the cell.
|
|
36
|
-
*/
|
|
37
|
-
row: Row<TFeatures, TData>
|
|
38
|
-
/**
|
|
39
|
-
* Reference to the parent table instance.
|
|
40
|
-
*/
|
|
41
|
-
table: Table_Internal<TFeatures, TData>
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface Cell_Cell<
|
|
45
|
-
in out TFeatures extends TableFeatures,
|
|
46
|
-
in out TData extends RowData,
|
|
47
|
-
TValue extends CellData = CellData,
|
|
48
|
-
> extends Cell_CoreProperties<TFeatures, TData, TValue> {
|
|
49
|
-
/**
|
|
50
|
-
* Returns the rendering context (or props) for cell-based components like cells and aggregated cells. Use these props with your framework's `flexRender` utility to render these using the template of your choice:
|
|
51
|
-
*/
|
|
52
|
-
getContext: () => CellContext<TFeatures, TData, TValue>
|
|
53
|
-
/**
|
|
54
|
-
* Returns the value for the cell, accessed via the associated column's accessor key or accessor function.
|
|
55
|
-
*/
|
|
56
|
-
getValue: CellContext<TFeatures, TData, TValue>['getValue']
|
|
57
|
-
/**
|
|
58
|
-
* Renders the value for a cell the same as `getValue`, but will return the `renderFallbackValue` if no value is found.
|
|
59
|
-
*/
|
|
60
|
-
renderValue: CellContext<TFeatures, TData, TValue>['renderValue']
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface TableOptions_Cell {
|
|
64
|
-
/**
|
|
65
|
-
* Value used when the desired value is not found in the data.
|
|
66
|
-
*/
|
|
67
|
-
renderFallbackValue?: any
|
|
68
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import type { CellData, RowData } from '../../types/type-utils'
|
|
2
|
-
import type { TableFeatures } from '../../types/TableFeatures'
|
|
3
|
-
import type { Cell } from '../../types/Cell'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Reads this cell's accessor value from its owning row and column.
|
|
7
|
-
*
|
|
8
|
-
* This is the standalone implementation behind `cell.getValue()`, useful when
|
|
9
|
-
* importing static APIs instead of calling methods from the cell prototype.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const value = cell_getValue(cell)
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
export function cell_getValue<
|
|
17
|
-
TFeatures extends TableFeatures,
|
|
18
|
-
TData extends RowData,
|
|
19
|
-
TValue extends CellData = CellData,
|
|
20
|
-
>(cell: Cell<TFeatures, TData, TValue>): TValue {
|
|
21
|
-
return cell.row.getValue(cell.column.id)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Reads the value that should be rendered for this cell.
|
|
26
|
-
*
|
|
27
|
-
* Nullish accessor values are replaced with `table.options.renderFallbackValue`,
|
|
28
|
-
* matching the behavior of `cell.renderValue()`.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* const rendered = cell_renderValue(cell)
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export function cell_renderValue<
|
|
36
|
-
TFeatures extends TableFeatures,
|
|
37
|
-
TData extends RowData,
|
|
38
|
-
TValue extends CellData = CellData,
|
|
39
|
-
>(cell: Cell<TFeatures, TData, TValue>) {
|
|
40
|
-
return cell.getValue() ?? cell.table.options.renderFallbackValue
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Builds the render context passed to a column's `cell` template.
|
|
45
|
-
*
|
|
46
|
-
* The returned object includes stable references to the table, row, column, and
|
|
47
|
-
* cell, plus bound `getValue` and `renderValue` helpers for render functions.
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* const context = cell_getContext(cell)
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
export function cell_getContext<
|
|
55
|
-
TFeatures extends TableFeatures,
|
|
56
|
-
TData extends RowData,
|
|
57
|
-
TValue extends CellData = CellData,
|
|
58
|
-
>(cell: Cell<TFeatures, TData, TValue>) {
|
|
59
|
-
return {
|
|
60
|
-
table: cell.table,
|
|
61
|
-
column: cell.column,
|
|
62
|
-
row: cell.row,
|
|
63
|
-
cell: cell,
|
|
64
|
-
// Wrap in arrow functions to preserve `this` binding (methods are on prototype)
|
|
65
|
-
getValue: () => cell.getValue(),
|
|
66
|
-
renderValue: () => cell.renderValue(),
|
|
67
|
-
}
|
|
68
|
-
}
|