comins-table 0.1.10 → 0.2.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/CHANGELOG.md +54 -1
- package/DESIGN.md +15 -1
- package/README.md +46 -11
- package/THIRD_PARTY_NOTICES.md +0 -2
- package/dist/browser/clipboard.d.ts +4 -0
- package/dist/browser/clipboard.d.ts.map +1 -0
- package/dist/browser/measurements.d.ts +28 -0
- package/dist/browser/measurements.d.ts.map +1 -0
- package/dist/browser/pointer.d.ts +25 -0
- package/dist/browser/pointer.d.ts.map +1 -0
- package/dist/browser/scroll.d.ts +9 -0
- package/dist/browser/scroll.d.ts.map +1 -0
- package/dist/browser/table-transfer.d.ts +38 -0
- package/dist/browser/table-transfer.d.ts.map +1 -0
- package/dist/browser/viewport-requests.d.ts +27 -0
- package/dist/browser/viewport-requests.d.ts.map +1 -0
- package/dist/cell-fill.d.ts +25 -0
- package/dist/cell-fill.d.ts.map +1 -0
- package/dist/clipboard-CNrbmDue.js +959 -0
- package/dist/clipboard-CNrbmDue.js.map +1 -0
- package/dist/clipboard-text.d.ts +5 -0
- package/dist/clipboard-text.d.ts.map +1 -0
- package/dist/clipboard.d.ts +2 -2
- package/dist/clipboard.d.ts.map +1 -1
- package/dist/clipboard.js +3 -2
- package/dist/column-filter.d.ts +2 -1
- package/dist/column-filter.d.ts.map +1 -1
- package/dist/column-layout.d.ts +24 -0
- package/dist/column-layout.d.ts.map +1 -0
- package/dist/component-renderer.d.ts +1 -1
- package/dist/component-renderer.d.ts.map +1 -1
- package/dist/core/editing/cells.d.ts +9 -0
- package/dist/core/editing/cells.d.ts.map +1 -0
- package/dist/core/editing/clipboard.d.ts +8 -0
- package/dist/core/editing/clipboard.d.ts.map +1 -0
- package/dist/core/editing/export.d.ts +4 -0
- package/dist/core/editing/export.d.ts.map +1 -0
- package/dist/core/layout/columns.d.ts +69 -0
- package/dist/core/layout/columns.d.ts.map +1 -0
- package/dist/core/layout/row-height.d.ts +25 -0
- package/dist/core/layout/row-height.d.ts.map +1 -0
- package/dist/core/layout/viewport.d.ts +21 -0
- package/dist/core/layout/viewport.d.ts.map +1 -0
- package/dist/core/layout/virtual.d.ts +119 -0
- package/dist/core/layout/virtual.d.ts.map +1 -0
- package/dist/core/model.d.ts +128 -0
- package/dist/core/model.d.ts.map +1 -0
- package/dist/core/rows/filtering.d.ts +45 -0
- package/dist/core/rows/filtering.d.ts.map +1 -0
- package/dist/core/rows/grouping.d.ts +97 -0
- package/dist/core/rows/grouping.d.ts.map +1 -0
- package/dist/core/rows/projection.d.ts +73 -0
- package/dist/core/rows/projection.d.ts.map +1 -0
- package/dist/core/rows/summary.d.ts +3 -0
- package/dist/core/rows/summary.d.ts.map +1 -0
- package/dist/core/selection/navigation.d.ts +49 -0
- package/dist/core/selection/navigation.d.ts.map +1 -0
- package/dist/core/selection/state.d.ts +131 -0
- package/dist/core/selection/state.d.ts.map +1 -0
- package/dist/core/state/access.d.ts +11 -0
- package/dist/core/state/access.d.ts.map +1 -0
- package/dist/core/state/changes.d.ts +14 -0
- package/dist/core/state/changes.d.ts.map +1 -0
- package/dist/core/state/reconcile.d.ts +18 -0
- package/dist/core/state/reconcile.d.ts.map +1 -0
- package/dist/core/state/table.d.ts +77 -0
- package/dist/core/state/table.d.ts.map +1 -0
- package/dist/core/transfer/policy.d.ts +116 -0
- package/dist/core/transfer/policy.d.ts.map +1 -0
- package/dist/core/viewport/data.d.ts +70 -0
- package/dist/core/viewport/data.d.ts.map +1 -0
- package/dist/core/viewport/requests.d.ts +19 -0
- package/dist/core/viewport/requests.d.ts.map +1 -0
- package/dist/core-compat-B4I2OHGY.js +391 -0
- package/dist/core-compat-B4I2OHGY.js.map +1 -0
- package/dist/core.d.ts +9 -704
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +3 -2
- package/dist/export-Cfk5Jz4a.js +37 -0
- package/dist/export-Cfk5Jz4a.js.map +1 -0
- package/dist/filtering.d.ts +8 -9
- package/dist/filtering.d.ts.map +1 -1
- package/dist/grouping.d.ts +11 -21
- package/dist/grouping.d.ts.map +1 -1
- package/dist/index.d.ts +16 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3400 -2552
- package/dist/index.js.map +1 -1
- package/dist/model.d.ts +140 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/react/core-compat.d.ts +141 -0
- package/dist/react/core-compat.d.ts.map +1 -0
- package/dist/react/edit-policy.d.ts +9 -0
- package/dist/react/edit-policy.d.ts.map +1 -0
- package/dist/react/model.d.ts +14 -0
- package/dist/react/model.d.ts.map +1 -0
- package/dist/react/rows.d.ts +6 -0
- package/dist/react/rows.d.ts.map +1 -0
- package/dist/react/state.d.ts +43 -0
- package/dist/react/state.d.ts.map +1 -0
- package/dist/react/table-transfer.d.ts +55 -0
- package/dist/react/table-transfer.d.ts.map +1 -0
- package/dist/react/viewport.d.ts +10 -0
- package/dist/react/viewport.d.ts.map +1 -0
- package/dist/react-types.d.ts +292 -0
- package/dist/react-types.d.ts.map +1 -0
- package/dist/row-detail.d.ts +2 -0
- package/dist/row-detail.d.ts.map +1 -1
- package/dist/row-height.d.ts +1 -24
- package/dist/row-height.d.ts.map +1 -1
- package/dist/row-value.d.ts +2 -0
- package/dist/row-value.d.ts.map +1 -0
- package/dist/selection-data.d.ts +2 -1
- package/dist/selection-data.d.ts.map +1 -1
- package/dist/selection.d.ts +2 -2
- package/dist/selection.d.ts.map +1 -1
- package/dist/selection.js +2 -2
- package/dist/summary.d.ts +1 -1
- package/dist/summary.d.ts.map +1 -1
- package/dist/table-icons.d.ts.map +1 -1
- package/dist/table-state.d.ts +24 -0
- package/dist/table-state.d.ts.map +1 -0
- package/dist/table-transfer.d.ts +1 -152
- package/dist/table-transfer.d.ts.map +1 -1
- package/dist/tree-drag.d.ts +1 -0
- package/dist/tree-drag.d.ts.map +1 -1
- package/dist/tree.d.ts +1 -1
- package/dist/tree.d.ts.map +1 -1
- package/dist/use-viewport.d.ts.map +1 -1
- package/dist/viewport-data.d.ts +8 -71
- package/dist/viewport-data.d.ts.map +1 -1
- package/dist/viewport-layout.d.ts +1 -20
- package/dist/viewport-layout.d.ts.map +1 -1
- package/dist/viewport-requests.d.ts +1 -8
- package/dist/viewport-requests.d.ts.map +1 -1
- package/dist/virtual-layout.d.ts +1 -118
- package/dist/virtual-layout.d.ts.map +1 -1
- package/package.json +19 -2
- package/styles.css +167 -38
- package/dist/core-D01wEe-7.js +0 -897
- package/dist/core-D01wEe-7.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,59 @@
|
|
|
1
1
|
# Comins Table
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.2.0 - 2026-10-02
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- **Migration:** `comins-table/core` now exports neutral state, Column/Group and payload contracts. Labels are strings, cell data guards live directly on `cell`, and React renderer/theme/DOM contracts are excluded. Move React state helpers and React-only types previously imported from `/core` to `comins-table`.
|
|
8
|
+
- The root, `/clipboard`, and `/selection` preserve their existing React-state APIs, JSX labels, props guards, callbacks and theme behavior. Use `/core` helpers with neutral state. Package exports and React peer dependencies are unchanged; this is not an SSR or Vue support declaration.
|
|
9
|
+
- Local verification now checks a freshly built and packed Core artifact with no React installation and ES2022-only declarations, plus source and runtime dependency graphs.
|
|
10
|
+
- Release verification checks the exact publication artifact with the neutral Core consumer and React 18/19 consumers, including strict types, helper execution, client mounting, and browser JS/CSS builds.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Pending Row Detail focus retries are cancelled when their owning Table unmounts, while disclosure-collapse focus restoration is preserved.
|
|
15
|
+
- Fill gestures explicitly release pointer capture on cancellation and cleanup, and stopped pointer animation loops cannot schedule another frame during cleanup.
|
|
16
|
+
- Repeated cleanup of an old cross-table transfer registration no longer removes a replacement registered under the same scope and Table ID.
|
|
17
|
+
- Playground TSV inputs display multiline samples with full-width styling. Pinned-column boundary and cross-table duplicate-ID policy explanations now describe the existing behavior explicitly.
|
|
18
|
+
|
|
19
|
+
## 0.1.11 - 2026-09-22
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- Opt-in external plain-text TSV paste through `clipboardPaste`, typed `cell.parseClipboard`, `onClipboardError`, and `parseCominsClipboardText` / `pasteCominsText` Core helpers. Parsing is bounded and batch errors are atomic; native editors keep their clipboard behavior.
|
|
24
|
+
- Opt-in `fillHandle` with typed value/pattern repetition, preview, edge scrolling, cancellation, and click/Ref `fillSelection` alternatives. Both editing options require Cell selection and a controlled data callback.
|
|
25
|
+
- Optional `cell.validateFill` validates typed destination values before a Fill commits. Returning `false` or throwing rejects the entire operation without changing data; React reports the error through `onClipboardError`.
|
|
26
|
+
- A 1,000-Row Playground editing example with automatic height, pinned Columns, numeric conversion and protected Rows/Cells, plus matching English/Korean guides.
|
|
27
|
+
- A Clipboard/Fill README animation and refreshed 0.1.11 overview and feature GIFs captured from live demos.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- **Migration:** Row Drag is now disabled by default. Set `rowProps={{ draggable: true }}` to retain handle-based movement. `onChangeData` remains optional for local Row reordering; a new `data` array replaces internal Rows, while option-only rerenders preserve local order. Tree and cross-Group/transfer ownership contracts remain unchanged.
|
|
32
|
+
- Header Sort uses the same Chevron family and 24px icon-button primitive as Row Group disclosure, retaining sorting, keyboard activation, multi-sort and resize/drag isolation.
|
|
33
|
+
- Header and Row Group drag feedback uses accent/danger tokens, neutral source placeholders and a readable light/dark drag preview. Filled ranges, focus, disabled controls and reduced motion follow `DESIGN.md`.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- Completed Playground option toggle styling, including automatic-height content length, width, renderer expansion, Tree policies, Group visibility, and Viewport request options. Pressed states are visible and support native Enter/Space activation.
|
|
38
|
+
- Excluded ignored local diagnostic files from Vitest discovery so the normal verification command does not execute Playwright-only diagnostics.
|
|
39
|
+
- Removed duplicated perimeter borders at the final Body/Header/Summary Cell and unified Row, Tree and Group drop feedback with the Header target tokens.
|
|
40
|
+
- Enabled local Row/Group edge auto-scroll with refreshed virtual drop targets and viewport-clipped bounds. Tree pointer drops preserve the scrolled viewport instead of following a moved anchor Row.
|
|
41
|
+
- Connected CRUD reordering to controlled data and replaced position-based IDs and labels in both Virtualization examples with stable Row identities. Clarified the Viewport Datasource Row Drag exclusion.
|
|
42
|
+
- Kept the top border stationary when Headers are hidden, and removed Row drag placeholder layout shifts. Local virtual Row drops preserve the viewport position; fixed-height virtual rendering uses the same logical/physical offset convention as variable-height rendering.
|
|
43
|
+
- Made Component example labels follow stable Row data, aligned example text/numeric/control values, clarified empty filtered Groups and disabled Rows, and connected Context Create/Delete to actual example data changes.
|
|
44
|
+
- Added a two-value TSV sample and explained trailing empty fields without changing intentional empty-cell paste behavior.
|
|
45
|
+
- Separated the CRUD Playground's internal Row identity from editable `column4`, so all six displayed fields can be updated while selection and deletion keep targeting the same Row.
|
|
46
|
+
- Clamped logical scroll anchors to the final viewport after sorting variable-height Rows, preventing blank space below the last Row.
|
|
47
|
+
- Preserved keyboard focus when clearing Header sort and opening the first or closing the last virtual Row Detail.
|
|
48
|
+
- Kept incomplete filter drafts independent from applied conditions and repositioned filter popovers after layout changes, above sibling Headers while inheriting Table theme tokens.
|
|
49
|
+
- Connected controlled expansion in the 10,000-node Tree Playground and rejected non-numeric Fill values in its numeric editing example.
|
|
50
|
+
|
|
51
|
+
### Compatibility notes
|
|
52
|
+
|
|
53
|
+
- `clipboard`, `clipboardPaste` and `fillHandle` remain independent opt-in features. Existing internal paste remains the default. OS paste imports strings unless a Column parser converts them, and intentional empty TSV Cells overwrite editable destinations.
|
|
54
|
+
- Fill repeats existing values; automatic series and source clearing on shrink are not included. Viewport edits require contiguous loaded data and do not fetch or persist it.
|
|
55
|
+
|
|
56
|
+
## 0.1.10 - 2026-09-11
|
|
4
57
|
|
|
5
58
|
### Added
|
|
6
59
|
|
package/DESIGN.md
CHANGED
|
@@ -22,7 +22,7 @@ Motion is limited to short color, opacity, position, and resize feedback. Motion
|
|
|
22
22
|
|
|
23
23
|
| Surface | Contract |
|
|
24
24
|
| --- | --- |
|
|
25
|
-
| Frame | Owns
|
|
25
|
+
| Frame | Owns a single 1px outer border, radius, background, and the final horizontal scrollbar. Header and final Cells must not duplicate the perimeter border; pinned-zone separators remain distinct. |
|
|
26
26
|
| Header | Uses an accent surface by default and retains visible focus, resize, sort, move, and pinned boundaries. |
|
|
27
27
|
| Body Cell | Keeps grid borders and application Row backgrounds visible beneath selection indicators. |
|
|
28
28
|
| Group Row | Uses one semantic full-width Cell. Its content remains visible at the Body viewport start during horizontal scrolling. |
|
|
@@ -38,6 +38,20 @@ Rest, hover, active, `focus-visible`, selected, disabled, loading, invalid, drag
|
|
|
38
38
|
|
|
39
39
|
For variable business Row heights, `getRowHeight` owns the layout policy. Returning `"auto"` measures normal-flow Cell content; `estimatedRowHeight` supplies the initial estimate without imposing a limit on the Renderer. Group headings retain their fixed `rowHeight`, and Row Details keep their independent height policy. CSS height overrides alone do not update virtual geometry. Viewport loading estimates unloaded heights and may adjust the scrollbar as content is measured.
|
|
40
40
|
|
|
41
|
+
## Icons, sorting, and drag feedback
|
|
42
|
+
|
|
43
|
+
Built-in icons use the existing Radix 15px SVG primitives and inherit their foreground. Icon buttons have a 24px square interaction area. Disclosure uses right/down Chevrons; ascending/descending sorting uses up/down Chevrons from the same family. Sorting remains a Header action, with `aria-sort` on the owning Header, an accessible button label, decorative SVGs, and native Enter/Space activation. Sort direction must not be confused with Group expansion state.
|
|
44
|
+
|
|
45
|
+
| Interaction state | Treatment |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| Source placeholder | Neutral `surface-muted` / `muted` pair and a one-pixel inset dashed `drop-marker` outline. Preserve original geometry. |
|
|
48
|
+
| Valid target | `drop-valid-background` with readable `foreground`; 2px solid `drop-valid` outline or insertion line for Row, Tree, Group and Header targets. |
|
|
49
|
+
| Invalid target | `drop-invalid-background` with readable foreground and 2px solid `drop-invalid` outline; retain rejected-drop semantics. |
|
|
50
|
+
| Floating drag preview | `surface` / `foreground`, `drop-marker` border, 2px radius, compact spacing, subdued shadow; never intercept pointer events. |
|
|
51
|
+
| Fill Handle | 24px hit area, 8px accent marker, visible keyboard focus, preview without data mutation. Click actions provide a non-drag alternative. |
|
|
52
|
+
|
|
53
|
+
Header and Row Group targets share these states while retaining their own insertion geometry. Never substitute a hard-coded light foreground on a dark-theme accent marker. Component disabled text uses `component-muted`; menu and virtual-list items distinguish keyboard focus from hover. Reduced-motion mode disables Sort and Group disclosure transitions as well as movement animation.
|
|
54
|
+
|
|
41
55
|
## CSS token stability
|
|
42
56
|
|
|
43
57
|
The canonical machine-readable inventory is `docs/feature-manifest.json`. Stability means:
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Comins Table
|
|
2
2
|
|
|
3
|
+
<img src="example/public/comins-symbol.svg" width="64" height="64" alt="Comins" />
|
|
4
|
+
|
|
3
5
|
Comins Table is a controlled React data table for data-heavy application screens. Applications keep ownership of their data and business models while the Table provides virtualized rendering, structured Rows, configurable Headers, precise selection, and customizable cells.
|
|
4
6
|
|
|
5
7
|
[](https://www.npmjs.com/package/comins-table)
|
|
@@ -7,7 +9,7 @@ Comins Table is a controlled React data table for data-heavy application screens
|
|
|
7
9
|
[](https://github.com/kim1124/comins-table/actions/workflows/verify.yml)
|
|
8
10
|
[](LICENSE)
|
|
9
11
|
|
|
10
|
-

|
|
11
13
|
|
|
12
14
|
## Why Comins Table
|
|
13
15
|
|
|
@@ -21,9 +23,20 @@ Comins Table is a controlled React data table for data-heavy application screens
|
|
|
21
23
|
|
|
22
24
|
Comins Table is standalone and does not wrap another table or grid implementation.
|
|
23
25
|
|
|
24
|
-
### Version 0.
|
|
26
|
+
### Version 0.2.0
|
|
27
|
+
|
|
28
|
+
The source targets 0.2.0. The animations were recorded with 0.1.11. See the [changelog](https://github.com/kim1124/comins-table/blob/main/CHANGELOG.md) for release status.
|
|
29
|
+
|
|
30
|
+
**0.1.11 migration:** Row Drag is opt-in with `rowProps={{ draggable: true }}`. `onChangeData` is optional for local Row movement; connect it to synchronize application state. New `data` arrays remain authoritative.
|
|
31
|
+
|
|
32
|
+
**0.2.0 migration:** `/core` now exposes framework-neutral contracts. Move React state helpers and React-only types from `/core` to `comins-table`; see the [migration guide](https://github.com/kim1124/comins-table/blob/main/docs/user/26-migration-0.2.0.md). Existing opt-in TSV paste, Fill Handle, Tree Row drag, automatic heights, and Viewport Datasource remain available.
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
For migration, keep these data-ownership boundaries explicit:
|
|
35
|
+
|
|
36
|
+
- Local Row reordering needs `rowProps.draggable: true`; connect `onChangeData` when the application must retain the new order. Use stable Row IDs and keep the input array reference stable when relying on internal order.
|
|
37
|
+
- Tree movement still requires `treeRowDrag` and controlled `onChangeData`. Cross-Table transfers use the Coordinator; enabling a local Row handle does not enable transfers.
|
|
38
|
+
- OS paste and Fill require `cellSelection` and `onChangeData`; both remain opt-in. A two-field TSV updates two destination Cells. A trailing tab deliberately supplies an additional empty field.
|
|
39
|
+
- Viewport loading has no Row Drag handles. Reordering a partially loaded dataset belongs to the server, followed by a dataset reset.
|
|
27
40
|
|
|
28
41
|
### Feature catalog
|
|
29
42
|
|
|
@@ -156,12 +169,14 @@ Set `multiSort` to opt into ordered multi-column sorting. Normal Header click or
|
|
|
156
169
|
|
|
157
170
|
## Package Entry Points
|
|
158
171
|
|
|
172
|
+
**0.2.0:** `/core` uses neutral state and string labels. Existing React state helpers and JSX/renderer/theme types belong to the root; `/clipboard` and `/selection` retain React-state contracts. Published 0.1.x behavior is not changed by this guide. See the [English migration guide](https://github.com/kim1124/comins-table/blob/main/docs/user/26-migration-0.2.0.md) or [한국어 마이그레이션](https://github.com/kim1124/comins-table/blob/main/docs/ko/26-migration-0.2.0.md). React peers and the client-only Table boundary remain unchanged; Vue support is not included.
|
|
173
|
+
|
|
159
174
|
| Import | Purpose |
|
|
160
175
|
| --- | --- |
|
|
161
176
|
| `comins-table` | React component, public types, and root helper exports |
|
|
162
|
-
| `comins-table/core` |
|
|
163
|
-
| `comins-table/clipboard` |
|
|
164
|
-
| `comins-table/selection` |
|
|
177
|
+
| `comins-table/core` | Neutral state, row, column, pagination, sorting, layout, selection, clipboard, export, and virtualization helpers |
|
|
178
|
+
| `comins-table/clipboard` | React-state clipboard helper subset |
|
|
179
|
+
| `comins-table/selection` | React-state selection helper subset |
|
|
165
180
|
| `comins-table/styles.css` | Optional table shell, theme, and built-in component skin |
|
|
166
181
|
|
|
167
182
|
## Header And Layout
|
|
@@ -170,7 +185,7 @@ Sortable headers support pointer and keyboard activation and expose `aria-sort`.
|
|
|
170
185
|
|
|
171
186
|
A left-button mouse interaction activates column movement after a 6-pixel horizontal drag, provided horizontal movement remains greater than vertical movement. The source becomes a source placeholder while a ghost and target marker show the proposed move. Pointer Up commits only over a valid target; vertical intent, pointer cancellation, `Escape`, and window blur cancel the pending move. Non-mouse pointers retain one-second long-press compatibility. Parent header groups move their children as one block.
|
|
172
187
|
|
|
173
|
-
Use `getColumnLayout()` and `setColumnLayout()` through the Ref API, or `serializeCominsColumnLayout()` and `applyCominsColumnLayout()`
|
|
188
|
+
Use `getColumnLayout()` and `setColumnLayout()` through the Ref API, or `serializeCominsColumnLayout()` and `applyCominsColumnLayout()` to persist and restore order, widths, and visibility. Import helpers from the root for React state or from `comins-table/core` for neutral state.
|
|
174
189
|
|
|
175
190
|
### Column Pinning
|
|
176
191
|
|
|
@@ -239,6 +254,24 @@ Use `getRowHeight={() => "auto"}` for content-driven business Row heights, or re
|
|
|
239
254
|
|
|
240
255
|
Viewport bounds cached data and measured heights; distant scrolling does not fetch every earlier page or require a full dataset array. Unloaded heights are estimated, so scrollbar size can change as content is measured. Selection getters and copy operate on loaded data without fetching missing Rows. The application owns network requests and edit persistence. Tree, Row Grouping, Row Detail, Row Drag, append loading, pagination, built-in sorting/filtering, and automatic Summary aggregation are unavailable in Viewport mode.
|
|
241
256
|
|
|
257
|
+
### Tree subtree movement
|
|
258
|
+
|
|
259
|
+
Move Gamma and its child Epsilon to another parent, then fold and expand the hierarchy.
|
|
260
|
+
|
|
261
|
+

|
|
262
|
+
|
|
263
|
+
### Content-driven heights
|
|
264
|
+
|
|
265
|
+
Expand a Cell Renderer and narrow the Table. Row heights adjust automatically across 100,000 virtualized Rows.
|
|
266
|
+
|
|
267
|
+

|
|
268
|
+
|
|
269
|
+
### Load the visible region
|
|
270
|
+
|
|
271
|
+
Drag the scrollbar to a distant region of 1,000,000 Rows, inspect the bounded cache, and change the query. This recording uses a simulated asynchronous source with a 250 ms delay.
|
|
272
|
+
|
|
273
|
+

|
|
274
|
+
|
|
242
275
|
See [automatic height](https://github.com/kim1124/comins-table/blob/main/docs/user/24-auto-row-height.md), [Viewport Datasource](https://github.com/kim1124/comins-table/blob/main/docs/user/25-viewport-datasource.md), and [Tree drag](https://github.com/kim1124/comins-table/blob/main/docs/user/17-tree-grid.md) for examples, defaults, and combination limits.
|
|
243
276
|
|
|
244
277
|
## Column Filtering
|
|
@@ -283,9 +316,11 @@ Virtual List Item activation follows the normal Row selection modifiers. More se
|
|
|
283
316
|
|
|
284
317
|
Set `clipboard` to enable OS keyboard copy. It defaults to `false`, preserving the existing internal copy buffer. With OS copy enabled, the default priority is multiple selected Cells → selected Rows → one selected Cell. Five selected Rows and three selected Cells copy the three Cells while retaining all five selected Rows. Discontiguous Cells produce a TSV rectangle with unselected positions empty; internal paste skips those positions.
|
|
285
318
|
|
|
286
|
-
Call `copySelection("auto" | "cells" | "rows")` from a button or context menu to choose the target explicitly. This Ref method writes to the OS clipboard regardless of the `clipboard` prop, returns `Promise<string | null>`, and rejects if writing is unavailable or denied. Native text editing keeps its own copy behavior. Ctrl/Cmd+V uses the Table's internal buffer
|
|
319
|
+
Call `copySelection("auto" | "cells" | "rows")` from a button or context menu to choose the target explicitly. This Ref method writes to the OS clipboard regardless of the `clipboard` prop, returns `Promise<string | null>`, and rejects if writing is unavailable or denied. Native text editing keeps its own copy behavior. Ctrl/Cmd+V uses the Table's internal buffer by default; enable `clipboardPaste` to import external TSV instead. See the [Clipboard guide](https://github.com/kim1124/comins-table/blob/main/docs/user/09-clipboard.md) for guards, TSV escaping, and loaded-data limits.
|
|
320
|
+
|
|
321
|
+

|
|
287
322
|
|
|
288
|
-
`copyCominsRow`, `copyCominsCell`, and `copyCominsCellRange` read Row or Cell selections. `pasteCominsRow`, `pasteCominsCell`, and `pasteCominsCellRange` apply clipboard data while respecting `props.copyable`, `props.pasteable`, and disabled guards. `fillCominsCellRange`
|
|
323
|
+
`copyCominsRow`, `copyCominsCell`, and `copyCominsCellRange` read Row or Cell selections. `pasteCominsRow`, `pasteCominsCell`, and `pasteCominsCellRange` apply clipboard data while respecting `props.copyable`, `props.pasteable`, and disabled guards. `fillCominsCellRange` accepts a single Cell or rectangular source pattern. Enable `clipboardPaste` for OS TSV paste and `fillHandle` for visual pattern repetition; both default to false and require `cellSelection` and `onChangeData`. Set `cell.parseClipboard` for typed external values, optional `cell.validateFill` for atomic Fill validation, and `onClipboardError` for rejected input. `parseCominsClipboardText` and `pasteCominsText` are available from the root, `/core`, and `/clipboard`. See the [Clipboard guide](https://github.com/kim1124/comins-table/blob/main/docs/user/09-clipboard.md) for limits, guards, native-editor behavior, and `fillSelection("down" | "right")` click alternatives.
|
|
289
324
|
|
|
290
325
|
Use `exportCominsRowsToCsv` and `exportCominsRowsToJson` with the exact rows and export columns the application wants to serialize. Export remains independent of visible pagination, filtering, and selection unless the application passes those rows.
|
|
291
326
|
|
|
@@ -345,7 +380,7 @@ Use the [source repository](https://github.com/kim1124/comins-table) for develop
|
|
|
345
380
|
|
|
346
381
|
Comins Table provides CSR arrays and known-count Viewport range loading. Server-side Row models and built-in server filtering, custom Filter editor renderers, Tree filtering, pivoting, charts, AI assistance, remote Tree loading, hierarchy pagination, Tree Row copy/paste, Tree Grid Row Details, nested managed Details, Firefox, Safari, and SSR are not shipped or supported.
|
|
347
382
|
|
|
348
|
-
The visual fill handle
|
|
383
|
+
The visual fill handle repeats values or selected patterns. Automatic numeric/date series and source clearing on range shrink are not supported. Viewport edits require contiguous loaded Rows and never request missing data.
|
|
349
384
|
|
|
350
385
|
## Development
|
|
351
386
|
|
|
@@ -360,7 +395,7 @@ npm run verify
|
|
|
360
395
|
npm run docs:readme-gif
|
|
361
396
|
```
|
|
362
397
|
|
|
363
|
-
`npm run docs:readme-gif` is a maintainer command that captures the real hidden Playground fixtures and regenerates the overview animation plus
|
|
398
|
+
`npm run docs:readme-gif` is a maintainer command that captures the real hidden Playground fixtures and regenerates the overview animation plus eight detailed feature animations, including TSV paste and Fill Handle, Tree subtree drag, automatic height, and Viewport loading.
|
|
364
399
|
|
|
365
400
|
## Trusted Publishing
|
|
366
401
|
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function writeCominsClipboardText(text: string): Promise<void>;
|
|
2
|
+
export declare function readCominsClipboardEvent(data: Pick<DataTransfer, "types" | "getData">): string | null;
|
|
3
|
+
export declare function writeCominsClipboardEvent(data: Pick<DataTransfer, "setData">, text: string): void;
|
|
4
|
+
//# sourceMappingURL=clipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../src/browser/clipboard.ts"],"names":[],"mappings":"AAAA,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,MAAM,iBAG1D;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC,iBAErF;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,QAE1F"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type CominsElementMeasurement = {
|
|
2
|
+
element: Element;
|
|
3
|
+
height: number;
|
|
4
|
+
rectHeight: number;
|
|
5
|
+
width: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function measureCominsElement(element: Element, entry?: ResizeObserverEntry): CominsElementMeasurement;
|
|
8
|
+
/** Owns DOM targets only; adapters map measurements to rows and flush a batch once. */
|
|
9
|
+
export declare function createMeasurementObserver(options: {
|
|
10
|
+
onMeasure: (measurement: CominsElementMeasurement) => void;
|
|
11
|
+
onBatchComplete?: () => void;
|
|
12
|
+
}): {
|
|
13
|
+
observe(element: Element): void;
|
|
14
|
+
unobserve(element: Element): void;
|
|
15
|
+
dispose(): void;
|
|
16
|
+
};
|
|
17
|
+
export declare function hasCominsResizeObserver(): boolean;
|
|
18
|
+
export declare function observeCominsViewport(element: HTMLElement, onMeasure: (value: {
|
|
19
|
+
height: number;
|
|
20
|
+
width: number;
|
|
21
|
+
scrollWidth: number;
|
|
22
|
+
outerWidth: number;
|
|
23
|
+
viewportWidth: number;
|
|
24
|
+
}) => void): () => void;
|
|
25
|
+
export declare function observeCominsFontChanges(onChange: () => void): () => void;
|
|
26
|
+
export declare function getCominsElementRect(element: Element): DOMRect;
|
|
27
|
+
export declare function getCominsElementRect(element: Element | null | undefined): DOMRect | undefined;
|
|
28
|
+
//# sourceMappingURL=measurements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measurements.d.ts","sourceRoot":"","sources":["../../src/browser/measurements.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,mBAAmB,GAAG,wBAAwB,CAI5G;AAED,uFAAuF;AACvF,wBAAgB,yBAAyB,CAAC,OAAO,EAAE;IACjD,SAAS,EAAE,CAAC,WAAW,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC3D,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;IAUG,OAAO,UAAU,OAAO;IAoBxB,SAAS,UAAU,OAAO;IAK1B,OAAO;EAOV;AAED,wBAAgB,uBAAuB,YAAoD;AAE3F,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE;IAC7E,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;CAC/F,KAAK,IAAI,cAOT;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,IAAI,cAI5D;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC;AAChE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare function captureCominsPointer(element: Pick<Element, "setPointerCapture" | "releasePointerCapture">, pointerId: number): () => void;
|
|
2
|
+
export declare function registerCominsPointerListeners(input: {
|
|
3
|
+
move: (event: PointerEvent) => void;
|
|
4
|
+
up: (event: PointerEvent) => void;
|
|
5
|
+
cancel: (event: PointerEvent) => void;
|
|
6
|
+
blur: () => void;
|
|
7
|
+
key: (event: KeyboardEvent) => void;
|
|
8
|
+
keyCapture?: boolean;
|
|
9
|
+
}): () => void;
|
|
10
|
+
export declare function startCominsPointerFrames(onFrame: FrameRequestCallback, host?: Pick<Window, "requestAnimationFrame" | "cancelAnimationFrame">): () => void;
|
|
11
|
+
export declare function focusCominsPointerTarget(element: HTMLElement | null): void;
|
|
12
|
+
export declare function applyCominsDragScroll(viewport: HTMLElement, input: {
|
|
13
|
+
top: number;
|
|
14
|
+
bottom: number;
|
|
15
|
+
clientY: number;
|
|
16
|
+
deltaMs: number;
|
|
17
|
+
onlyIfChanged?: boolean;
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
}): void;
|
|
20
|
+
export declare function isCominsNativeEditor(target: EventTarget | null): boolean;
|
|
21
|
+
export declare const createCrossTableAutoScroll: (resolveTarget: (clientX: number, clientY: number) => void) => {
|
|
22
|
+
stop: () => void;
|
|
23
|
+
update: (nextViewport: HTMLElement | null, nextClientX: number, nextClientY: number, valid: boolean) => void;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=pointer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../../src/browser/pointer.ts"],"names":[],"mappings":"AAEA,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,mBAAmB,GAAG,uBAAuB,CAAC,EAAE,SAAS,EAAE,MAAM,cAQ5H;AACD,wBAAgB,8BAA8B,CAAC,KAAK,EAAE;IACpD,IAAI,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAAC,EAAE,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAAC,MAAM,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC9G,IAAI,EAAE,MAAM,IAAI,CAAC;IAAC,GAAG,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC7E,cAQA;AACD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,oBAAoB,EAAE,IAAI,GAAE,IAAI,CAAC,MAAM,EAAE,uBAAuB,GAAG,sBAAsB,CAAU,cASpJ;AACD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,QAEnE;AACD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,QAGhL;AACD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,WAE9D;AAED,eAAO,MAAM,0BAA0B,kBACpB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI;;2BAsDzC,WAAW,GAAG,IAAI,eACnB,MAAM,eACN,MAAM,SACZ,OAAO;CAqCjB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function setCominsScrollTop(element: HTMLElement, top: number): void;
|
|
2
|
+
export declare function setCominsScrollLeft(element: HTMLElement, left: number): void;
|
|
3
|
+
export declare function scrollCominsRowIntoView(viewport: HTMLElement, index: number): void;
|
|
4
|
+
export declare function focusCominsElement(element: HTMLElement | null | undefined, options?: FocusOptions): void;
|
|
5
|
+
export declare function createCominsDetailFocusRestorer(): {
|
|
6
|
+
restore(element: HTMLElement | null, getToggle: () => HTMLButtonElement | null): void;
|
|
7
|
+
dispose(): void;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=scroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../src/browser/scroll.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,QAEnE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,QAErE;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,QAE3E;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,CAAC,EAAE,YAAY,QAEjG;AAED,wBAAgB,+BAA+B;IAG3C,OAAO,UAAU,WAAW,GAAG,IAAI,aAAa,MAAM,iBAAiB,GAAG,IAAI;IAW9E,OAAO;EAKV"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** The registry only observes identity and DOM fields; adapter metadata stays opaque. */
|
|
2
|
+
export type BrowserTransferSnapshot = {
|
|
3
|
+
config: {
|
|
4
|
+
coordinator: object;
|
|
5
|
+
scope: string;
|
|
6
|
+
tableId: string;
|
|
7
|
+
};
|
|
8
|
+
endpoint: {
|
|
9
|
+
tableId: string;
|
|
10
|
+
};
|
|
11
|
+
instanceId: string;
|
|
12
|
+
root: HTMLElement | null;
|
|
13
|
+
viewport: HTMLElement | null;
|
|
14
|
+
};
|
|
15
|
+
type Registration<TSnapshot> = {
|
|
16
|
+
getSnapshot: () => TSnapshot | null;
|
|
17
|
+
};
|
|
18
|
+
export declare function createTableTransferRegistry<TSnapshot extends BrowserTransferSnapshot>(): {
|
|
19
|
+
register(scope: string, tableId: string, registration: Registration<TSnapshot>): () => void;
|
|
20
|
+
get(scope: string, tableId: string): Registration<TSnapshot> | null;
|
|
21
|
+
};
|
|
22
|
+
export declare function getRegisteredTransferSnapshot<TSnapshot extends BrowserTransferSnapshot>(registry: ReturnType<typeof createTableTransferRegistry<TSnapshot>>, coordinator: object, scope: string, tableId: string): TSnapshot | null;
|
|
23
|
+
export declare function getCrossTableTransferHit<TSnapshot extends BrowserTransferSnapshot>(input: {
|
|
24
|
+
sourceTableId: string;
|
|
25
|
+
scope: string;
|
|
26
|
+
instanceId: string;
|
|
27
|
+
root: HTMLElement | null;
|
|
28
|
+
clientX: number;
|
|
29
|
+
clientY: number;
|
|
30
|
+
document: Pick<Document, "elementFromPoint">;
|
|
31
|
+
getSnapshot: (tableId: string) => TSnapshot | null;
|
|
32
|
+
}): {
|
|
33
|
+
element: HTMLElement;
|
|
34
|
+
root: HTMLElement;
|
|
35
|
+
snapshot: TSnapshot;
|
|
36
|
+
} | null;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=table-transfer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-transfer.d.ts","sourceRoot":"","sources":["../../src/browser/table-transfer.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,QAAQ,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;CAC9B,CAAC;AACF,KAAK,YAAY,CAAC,SAAS,IAAI;IAAE,WAAW,EAAE,MAAM,SAAS,GAAG,IAAI,CAAA;CAAE,CAAC;AAEvE,wBAAgB,2BAA2B,CAAC,SAAS,SAAS,uBAAuB;IAGjF,QAAQ,QAAQ,MAAM,WAAW,MAAM,gBAAgB,YAAY,CAAC,SAAS,CAAC;IAe9E,GAAG,QAAQ,MAAM,WAAW,MAAM;EAKrC;AAED,wBAAgB,6BAA6B,CAAC,SAAS,SAAS,uBAAuB,EACrF,QAAQ,EAAE,UAAU,CAAC,OAAO,2BAA2B,CAAC,SAAS,CAAC,CAAC,EACnE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,oBAKpD;AAED,wBAAgB,wBAAwB,CAAC,SAAS,SAAS,uBAAuB,EAAE,KAAK,EAAE;IACzF,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC;IAC7C,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,SAAS,GAAG,IAAI,CAAC;CACpD;;;;SASA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CoreViewportRequest, CominsViewportDataEvent } from "../core/viewport/data";
|
|
2
|
+
export type CominsViewportRequest = CoreViewportRequest & {
|
|
3
|
+
signal: AbortSignal;
|
|
4
|
+
};
|
|
5
|
+
type WithSignal<TEvent> = TEvent extends {
|
|
6
|
+
request: CoreViewportRequest;
|
|
7
|
+
} ? Omit<TEvent, "request"> & {
|
|
8
|
+
request: CominsViewportRequest;
|
|
9
|
+
} : TEvent;
|
|
10
|
+
export type BrowserViewportDataEvent<T> = WithSignal<CominsViewportDataEvent<T>>;
|
|
11
|
+
export declare function createViewportRequestExecutor(options: {
|
|
12
|
+
onRequest: (request: CominsViewportRequest) => void | Promise<void>;
|
|
13
|
+
onSettled: (requestId: string) => void;
|
|
14
|
+
}): {
|
|
15
|
+
start(descriptor: CoreViewportRequest): void;
|
|
16
|
+
cancel: (requestId: string) => void;
|
|
17
|
+
release(requestId: string): void;
|
|
18
|
+
dispose(): void;
|
|
19
|
+
};
|
|
20
|
+
/** The consumer owns data; this boundary owns only execution and listener lifetime. */
|
|
21
|
+
export declare function runViewportRequest<T>(input: {
|
|
22
|
+
request: CominsViewportRequest;
|
|
23
|
+
getRows: (request: CominsViewportRequest) => readonly T[] | Promise<readonly T[]>;
|
|
24
|
+
dispatch: (event: BrowserViewportDataEvent<T>) => void;
|
|
25
|
+
}): Promise<void>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=viewport-requests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewport-requests.d.ts","sourceRoot":"","sources":["../../src/browser/viewport-requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAE1F,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,GAAG;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,CAAC;AAClF,KAAK,UAAU,CAAC,MAAM,IAAI,MAAM,SAAS;IAAE,OAAO,EAAE,mBAAmB,CAAA;CAAE,GAAG,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,EAAE,qBAAqB,CAAA;CAAE,GAAG,MAAM,CAAC;AAClJ,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC;AAEjF,wBAAgB,6BAA6B,CAAC,OAAO,EAAE;IACrD,SAAS,EAAE,CAAC,OAAO,EAAE,qBAAqB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;sBAUqB,mBAAmB;wBAPZ,MAAM;uBAuBZ,MAAM;;EAS5B;AAED,uFAAuF;AACvF,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE;IACjD,OAAO,EAAE,qBAAqB,CAAC;IAC/B,OAAO,EAAE,CAAC,OAAO,EAAE,qBAAqB,KAAK,SAAS,CAAC,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAClF,QAAQ,EAAE,CAAC,KAAK,EAAE,wBAAwB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CACxD,GAAG,OAAO,CAAC,IAAI,CAAC,CAchB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import type { CominsCellAddress, CominsCellRange, CominsRowId, CominsTableState } from "./react/core-compat";
|
|
3
|
+
/** Private gesture controller. All writes go through the owning Table's batch callback. */
|
|
4
|
+
export declare function useCominsCellFill<TData>(options: {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
state: CominsTableState<TData>;
|
|
7
|
+
rowIds: readonly CominsRowId[];
|
|
8
|
+
columnIds: readonly string[];
|
|
9
|
+
root: RefObject<HTMLDivElement | null>;
|
|
10
|
+
viewport: RefObject<HTMLDivElement | null>;
|
|
11
|
+
addressAtPoint: (x: number, y: number) => CominsCellAddress | null;
|
|
12
|
+
canUseRange: (range: CominsCellRange) => boolean;
|
|
13
|
+
onFill: (source: CominsCellRange, target: CominsCellRange) => boolean;
|
|
14
|
+
registerGesture: (cleanup: () => void) => void;
|
|
15
|
+
releaseGesture: (cleanup: () => void) => void;
|
|
16
|
+
scrollHorizontal: (delta: number) => void;
|
|
17
|
+
}): {
|
|
18
|
+
fillSelection: (direction: "down" | "right") => boolean;
|
|
19
|
+
preview: CominsCellRange | null;
|
|
20
|
+
isPreview: (address: CominsCellAddress) => boolean;
|
|
21
|
+
handleAddress: CominsCellAddress | null;
|
|
22
|
+
handle: import("react").JSX.Element;
|
|
23
|
+
menu: import("react").JSX.Element | null;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=cell-fill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cell-fill.d.ts","sourceRoot":"","sources":["../src/cell-fill.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgF,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACrH,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAI7G,2FAA2F;AAC3F,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC/B,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;IAC/B,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,IAAI,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACvC,QAAQ,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3C,cAAc,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,iBAAiB,GAAG,IAAI,CAAC;IACnE,WAAW,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC;IACjD,MAAM,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,KAAK,OAAO,CAAC;IACtE,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAC/C,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;+BAyBmC,MAAM,GAAG,OAAO;;yBA2E3B,iBAAiB;;;;EAqBzC"}
|