@humanspeak/svelte-headless-table 5.1.0 → 6.0.0

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/README.md CHANGED
@@ -1,10 +1,13 @@
1
- <p align="center">
2
- <img src="https://user-images.githubusercontent.com/42545742/169733428-295e2678-e509-4175-aeb3-cb3a9c9894e1.svg" alt="svelte-headless-table" width="400px"/>
3
- </p>
4
- <h1 align="center">Svelte Headless Table</h1>
5
-
1
+ <!-- trunk-ignore-all(markdownlint/MD033) -->
2
+ <!-- trunk-ignore(markdownlint/MD041) -->
6
3
  <div align="center">
7
4
 
5
+ <img src="https://user-images.githubusercontent.com/42545742/169733428-295e2678-e509-4175-aeb3-cb3a9c9894e1.svg" alt="svelte-headless-table" width="400" />
6
+
7
+ # Svelte Headless Table
8
+
9
+ </div>
10
+
8
11
  [![NPM version](https://img.shields.io/npm/v/@humanspeak/svelte-headless-table.svg)](https://www.npmjs.com/package/@humanspeak/svelte-headless-table)
9
12
  [![Build Status](https://github.com/humanspeak/svelte-headless-table/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/humanspeak/svelte-headless-table/actions/workflows/npm-publish.yml)
10
13
  [![Coverage Status](https://coveralls.io/repos/github/humanspeak/svelte-headless-table/badge.svg?branch=main)](https://coveralls.io/github/humanspeak/svelte-headless-table?branch=main)
@@ -64,7 +64,7 @@ export declare const getBodyRows: <Item, Plugins extends AnyPlugins = AnyPlugins
64
64
  /**
65
65
  * Flat columns before column transformations.
66
66
  */
67
- flatColumns: FlatColumn<Item, Plugins>[], { rowDataId }?: BodyRowsOptions<Item>) => BodyRow<Item, Plugins>[];
67
+ flatColumns: FlatColumn<Item, Plugins>[], { rowDataId }?: BodyRowsOptions<Item>) => DataBodyRow<Item, Plugins>[];
68
68
  /**
69
69
  * Arranges and hides columns in an array of `BodyRow`s based on
70
70
  * `columnIdOrder` by transforming the `cells` property of each row.
@@ -75,7 +75,7 @@ flatColumns: FlatColumn<Item, Plugins>[], { rowDataId }?: BodyRowsOptions<Item>)
75
75
  * @param columnIdOrder The column order to transform to.
76
76
  * @returns A new array of `BodyRow`s with corrected row references.
77
77
  */
78
- export declare const getColumnedBodyRows: <Item, Plugins extends AnyPlugins = AnyPlugins>(rows: BodyRow<Item, Plugins>[], columnIdOrder: string[]) => BodyRow<Item, Plugins>[];
78
+ export declare const getColumnedBodyRows: <Item, Plugins extends AnyPlugins = AnyPlugins>(rows: DataBodyRow<Item, Plugins>[], columnIdOrder: string[]) => DataBodyRow<Item, Plugins>[];
79
79
  /**
80
80
  * Converts an array of items into an array of table `BodyRow`s based on a parent row.
81
81
  * @param subItems The sub data to display.
@@ -1,5 +1,5 @@
1
1
  import { type Readable, type Writable } from 'svelte/store';
2
- import { BodyRow } from './bodyRows.js';
2
+ import { BodyRow, DataBodyRow } from './bodyRows.js';
3
3
  import { FlatColumn, type Column } from './columns.js';
4
4
  import type { Table } from './createTable.js';
5
5
  import { HeaderRow } from './headerRows.js';
@@ -19,8 +19,8 @@ export interface TableViewModel<Item, Plugins extends AnyPlugins = AnyPlugins> {
19
19
  visibleColumns: Readable<FlatColumn<Item, Plugins>[]>;
20
20
  headerRows: Readable<HeaderRow<Item, Plugins>[]>;
21
21
  originalRows: Readable<BodyRow<Item, Plugins>[]>;
22
- rows: Readable<BodyRow<Item, Plugins>[]>;
23
- pageRows: Readable<BodyRow<Item, Plugins>[]>;
22
+ rows: Readable<DataBodyRow<Item, Plugins>[]>;
23
+ pageRows: Readable<DataBodyRow<Item, Plugins>[]>;
24
24
  pluginStates: PluginStates<Plugins>;
25
25
  }
26
26
  export type ReadOrWritable<T> = Readable<T> | Writable<T>;
@@ -1,5 +1,5 @@
1
1
  import { derived, readable, writable } from 'svelte/store';
2
- import { BodyRow, getBodyRows, getColumnedBodyRows } from './bodyRows.js';
2
+ import { BodyRow, DataBodyRow, getBodyRows, getColumnedBodyRows } from './bodyRows.js';
3
3
  import { FlatColumn, getFlatColumns } from './columns.js';
4
4
  import { getHeaderRows, HeaderRow } from './headerRows.js';
5
5
  import { finalizeAttributes } from './utils/attributes.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humanspeak/svelte-headless-table",
3
- "version": "5.1.0",
3
+ "version": "6.0.0",
4
4
  "description": "A powerful, headless table library for Svelte that provides complete control over table UI while handling complex data operations like sorting, filtering, pagination, grouping, and row expansion. Build custom, accessible data tables with zero styling opinions.",
5
5
  "keywords": [
6
6
  "svelte",
@@ -59,6 +59,7 @@
59
59
  ],
60
60
  "scripts": {
61
61
  "build": "vite build && npm run package",
62
+ "changeset": "npx @changesets/cli",
62
63
  "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
63
64
  "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
64
65
  "dev": "vite dev",
@@ -85,45 +86,45 @@
85
86
  "@humanspeak/svelte-subscribe": "^5.0.0"
86
87
  },
87
88
  "devDependencies": {
88
- "@eslint/compat": "^1.2.7",
89
- "@eslint/js": "^9.22.0",
90
- "@faker-js/faker": "^9.6.0",
91
- "@playwright/test": "^1.51.0",
92
- "@sveltejs/adapter-auto": "^4.0.0",
93
- "@sveltejs/kit": "^2.19.0",
94
- "@sveltejs/package": "^2.3.10",
89
+ "@eslint/compat": "^1.2.9",
90
+ "@eslint/js": "^9.27.0",
91
+ "@faker-js/faker": "^9.8.0",
92
+ "@playwright/test": "^1.52.0",
93
+ "@sveltejs/adapter-auto": "^6.0.1",
94
+ "@sveltejs/kit": "^2.21.0",
95
+ "@sveltejs/package": "^2.3.11",
95
96
  "@sveltejs/vite-plugin-svelte": "^5.0.3",
96
97
  "@testing-library/jest-dom": "^6.6.3",
97
98
  "@testing-library/svelte": "^5.2.7",
98
99
  "@types/eslint": "9.6.1",
99
- "@types/node": "^22.13.9",
100
- "@typescript-eslint/eslint-plugin": "^8.26.0",
101
- "@typescript-eslint/parser": "^8.26.0",
102
- "@vitest/coverage-v8": "^3.0.8",
103
- "eslint": "^9.22.0",
104
- "eslint-config-prettier": "^10.1.1",
100
+ "@types/node": "^22.15.18",
101
+ "@typescript-eslint/eslint-plugin": "^8.32.1",
102
+ "@typescript-eslint/parser": "^8.32.1",
103
+ "@vitest/coverage-v8": "^3.1.3",
104
+ "eslint": "^9.27.0",
105
+ "eslint-config-prettier": "^10.1.5",
105
106
  "eslint-plugin-import": "^2.31.0",
106
- "eslint-plugin-svelte": "^3.0.3",
107
+ "eslint-plugin-svelte": "^3.8.1",
107
108
  "eslint-plugin-unused-imports": "^4.1.4",
108
- "globals": "^16.0.0",
109
+ "globals": "^16.1.0",
109
110
  "prettier": "^3.5.3",
110
111
  "prettier-plugin-organize-imports": "^4.1.0",
111
- "prettier-plugin-svelte": "^3.3.3",
112
+ "prettier-plugin-svelte": "^3.4.0",
112
113
  "prettier-plugin-tailwindcss": "^0.6.11",
113
- "publint": "^0.3.8",
114
- "svelte": "^5.22.6",
115
- "svelte-check": "^4.1.5",
114
+ "publint": "^0.3.12",
115
+ "svelte": "^5.30.2",
116
+ "svelte-check": "^4.2.1",
116
117
  "tslib": "^2.8.1",
117
- "type-fest": "^4.37.0",
118
- "typescript": "^5.8.2",
119
- "typescript-eslint": "^8.26.0",
120
- "vite": "^6.2.1",
121
- "vitest": "^3.0.8"
118
+ "type-fest": "^4.41.0",
119
+ "typescript": "^5.8.3",
120
+ "typescript-eslint": "^8.32.1",
121
+ "vite": "^6.3.5",
122
+ "vitest": "^3.1.3"
122
123
  },
123
124
  "peerDependencies": {
124
- "svelte": "^5.0.0"
125
+ "svelte": "^5.30.0"
125
126
  },
126
127
  "volta": {
127
- "node": "22.14.0"
128
+ "node": "22.15.1"
128
129
  }
129
130
  }