react-glide-table 1.1.1 → 1.1.2
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 +22 -14
- package/dist/compound.cjs +2085 -0
- package/dist/compound.d.cts +63 -0
- package/dist/compound.d.ts +63 -0
- package/dist/compound.js +2067 -0
- package/dist/core.cjs +1198 -0
- package/dist/core.d.cts +255 -0
- package/dist/core.d.ts +255 -0
- package/dist/core.js +1154 -0
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +5 -481
- package/dist/index.d.ts +5 -481
- package/dist/types-ByOoRY8x.d.cts +177 -0
- package/dist/types-ByOoRY8x.d.ts +177 -0
- package/package.json +12 -1
package/README.md
CHANGED
|
@@ -16,10 +16,18 @@ pnpm add react-glide-table
|
|
|
16
16
|
|
|
17
17
|
Peer dependencies: `react` and `react-dom` (`^18` or `^19`).
|
|
18
18
|
|
|
19
|
+
The package is marked `"sideEffects": false` for tree-shaking. Prefer subpath imports when you only need one surface:
|
|
20
|
+
|
|
21
|
+
| Import | Contents |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| `react-glide-table` | Full barrel (compound + core) |
|
|
24
|
+
| `react-glide-table/compound` | `createTable` / `Table` / `DataTable` + related types |
|
|
25
|
+
| `react-glide-table/core` | `useGlideTable` + feature hooks/helpers (no compound UI) |
|
|
26
|
+
|
|
19
27
|
## Quick start (compound)
|
|
20
28
|
|
|
21
29
|
```tsx
|
|
22
|
-
import { createTable } from "react-glide-table"
|
|
30
|
+
import { createTable } from "react-glide-table/compound"
|
|
23
31
|
import { useState } from "react"
|
|
24
32
|
|
|
25
33
|
type Product = { id: string; name: string; qty: number }
|
|
@@ -66,8 +74,8 @@ Row-level UI → `slots.Row`. Cell content → `Column.render`. Header/Cell are
|
|
|
66
74
|
|
|
67
75
|
```tsx
|
|
68
76
|
import { flexRender } from "@tanstack/react-table"
|
|
69
|
-
import { useGlideTable } from "react-glide-table"
|
|
70
|
-
import type { ColumnDef } from "react-glide-table"
|
|
77
|
+
import { useGlideTable } from "react-glide-table/core"
|
|
78
|
+
import type { ColumnDef } from "react-glide-table/core"
|
|
71
79
|
|
|
72
80
|
type Product = { id: string; name: string; qty: number }
|
|
73
81
|
|
|
@@ -121,17 +129,17 @@ Wire `rowContextValue` into your own row/cell components for edit, selection, ex
|
|
|
121
129
|
|
|
122
130
|
## Public API
|
|
123
131
|
|
|
124
|
-
| Export | Role |
|
|
125
|
-
| --- | --- |
|
|
126
|
-
| `createTable` / `Table` | Compound column DSL (`Header` / `Column` / `Body` / `Pagination`) |
|
|
127
|
-
| `DataTable` | Unstyled default renderer (semantic HTML + slots/props) |
|
|
128
|
-
| `useGlideTable` | Headless engine escape hatch |
|
|
129
|
-
| `useCellEdit` / `useCellSelection` / `useConvertTreeData` | Feature hooks |
|
|
130
|
-
| `applyCellEdit`, `applyFillData`, `buildColumnRowSpanMap`, … | Pure helpers |
|
|
131
|
-
| `DEFAULT_DATA_TABLE_LABELS` / `resolveDataTableLabels` | Optional English UI copy helpers |
|
|
132
|
-
| Tree field defaults | `id` / `parentId` / `children` / `qty` |
|
|
133
|
-
|
|
134
|
-
Related types: `TableProps`, `TableColumnProps`, `DataTableProps`, `DataTableSlots`, `TableCompoundComponent`, `ColumnDef`, …
|
|
132
|
+
| Export | Path | Role |
|
|
133
|
+
| --- | --- | --- |
|
|
134
|
+
| `createTable` / `Table` | `/compound` | Compound column DSL (`Header` / `Column` / `Body` / `Pagination`) |
|
|
135
|
+
| `DataTable` | `/compound` | Unstyled default renderer (semantic HTML + slots/props) |
|
|
136
|
+
| `useGlideTable` | `/core` | Headless engine escape hatch |
|
|
137
|
+
| `useCellEdit` / `useCellSelection` / `useConvertTreeData` | `/core` | Feature hooks |
|
|
138
|
+
| `applyCellEdit`, `applyFillData`, `buildColumnRowSpanMap`, … | `/core` | Pure helpers |
|
|
139
|
+
| `DEFAULT_DATA_TABLE_LABELS` / `resolveDataTableLabels` | `/core` | Optional English UI copy helpers |
|
|
140
|
+
| Tree field defaults | `/core` | `id` / `parentId` / `children` / `qty` |
|
|
141
|
+
|
|
142
|
+
Root `react-glide-table` re-exports both surfaces. Related types: `TableProps`, `TableColumnProps`, `DataTableProps`, `DataTableSlots`, `TableCompoundComponent`, `ColumnDef`, …
|
|
135
143
|
|
|
136
144
|
## Notable constraints
|
|
137
145
|
|