@deephaven/grid 1.27.5-alpha-nodehttp2-config3.276eddc.0 → 1.29.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/dist/Grid.d.ts +102 -43
- package/dist/Grid.d.ts.map +1 -1
- package/dist/Grid.js +442 -390
- package/dist/Grid.js.map +1 -1
- package/dist/GridA11yFallback.d.ts +26 -0
- package/dist/GridA11yFallback.d.ts.map +1 -0
- package/dist/GridA11yFallback.js +115 -0
- package/dist/GridA11yFallback.js.map +1 -0
- package/dist/GridA11yUtils.d.ts +89 -0
- package/dist/GridA11yUtils.d.ts.map +1 -0
- package/dist/GridA11yUtils.js +321 -0
- package/dist/GridA11yUtils.js.map +1 -0
- package/dist/GridRenderer.d.ts +9 -0
- package/dist/GridRenderer.d.ts.map +1 -1
- package/dist/GridRenderer.js +187 -39
- package/dist/GridRenderer.js.map +1 -1
- package/dist/GridRendererTypes.d.ts +3 -4
- package/dist/GridRendererTypes.d.ts.map +1 -1
- package/dist/GridRendererTypes.js.map +1 -1
- package/dist/GridSelectionUtils.d.ts +98 -0
- package/dist/GridSelectionUtils.d.ts.map +1 -0
- package/dist/GridSelectionUtils.js +180 -0
- package/dist/GridSelectionUtils.js.map +1 -0
- package/dist/RangedSelection.d.ts +120 -0
- package/dist/RangedSelection.d.ts.map +1 -0
- package/dist/RangedSelection.js +375 -0
- package/dist/RangedSelection.js.map +1 -0
- package/dist/Selection.d.ts +221 -0
- package/dist/Selection.d.ts.map +1 -0
- package/dist/Selection.js +71 -0
- package/dist/Selection.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/key-handlers/EditKeyHandler.js +3 -3
- package/dist/key-handlers/EditKeyHandler.js.map +1 -1
- package/dist/key-handlers/SelectionKeyHandler.d.ts +1 -0
- package/dist/key-handlers/SelectionKeyHandler.d.ts.map +1 -1
- package/dist/key-handlers/SelectionKeyHandler.js +144 -138
- package/dist/key-handlers/SelectionKeyHandler.js.map +1 -1
- package/dist/key-handlers/TreeKeyHandler.d.ts.map +1 -1
- package/dist/key-handlers/TreeKeyHandler.js +6 -3
- package/dist/key-handlers/TreeKeyHandler.js.map +1 -1
- package/dist/mouse-handlers/GridRowTreeMouseHandler.d.ts +1 -0
- package/dist/mouse-handlers/GridRowTreeMouseHandler.d.ts.map +1 -1
- package/dist/mouse-handlers/GridRowTreeMouseHandler.js +7 -0
- package/dist/mouse-handlers/GridRowTreeMouseHandler.js.map +1 -1
- package/dist/mouse-handlers/GridSelectionMouseHandler.d.ts +0 -9
- package/dist/mouse-handlers/GridSelectionMouseHandler.d.ts.map +1 -1
- package/dist/mouse-handlers/GridSelectionMouseHandler.js +41 -39
- package/dist/mouse-handlers/GridSelectionMouseHandler.js.map +1 -1
- package/dist/mouse-handlers/GridTokenMouseHandler.js +4 -1
- package/dist/mouse-handlers/GridTokenMouseHandler.js.map +1 -1
- package/package.json +3 -3
|
@@ -2,12 +2,12 @@ import type React from 'react';
|
|
|
2
2
|
import { type VisibleIndex, type Coordinate } from './GridMetrics';
|
|
3
3
|
import type GridMetrics from './GridMetrics';
|
|
4
4
|
import type GridModel from './GridModel';
|
|
5
|
-
import type GridRange from './GridRange';
|
|
6
5
|
import { type GridTheme } from './GridTheme';
|
|
7
6
|
import { type DraggingColumn } from './mouse-handlers/GridColumnMoveMouseHandler';
|
|
8
7
|
import { type GridSeparator } from './mouse-handlers/GridSeparatorMouseHandler';
|
|
9
8
|
import type { CellInputFieldProps } from './CellInputField';
|
|
10
9
|
import type { ColumnRestriction } from './GridModel';
|
|
10
|
+
import type { GestureMode, Selection } from './Selection';
|
|
11
11
|
export declare const DEFAULT_FONT_WIDTH = 10;
|
|
12
12
|
/**
|
|
13
13
|
* Props passed to a cell input renderer, combining the base CellInputField
|
|
@@ -54,9 +54,7 @@ export type GridRenderState = {
|
|
|
54
54
|
metrics: GridMetrics;
|
|
55
55
|
mouseX: Coordinate | null;
|
|
56
56
|
mouseY: Coordinate | null;
|
|
57
|
-
|
|
58
|
-
cursorRow: VisibleIndex | null;
|
|
59
|
-
selectedRanges: readonly GridRange[];
|
|
57
|
+
selection: Selection;
|
|
60
58
|
draggingColumn: DraggingColumn | null;
|
|
61
59
|
draggingColumnSeparator: GridSeparator | null;
|
|
62
60
|
draggingRow: VisibleIndex | null;
|
|
@@ -66,5 +64,6 @@ export type GridRenderState = {
|
|
|
66
64
|
isDraggingHorizontalScrollBar: boolean;
|
|
67
65
|
isDraggingVerticalScrollBar: boolean;
|
|
68
66
|
isDragging: boolean;
|
|
67
|
+
gestureMode: GestureMode | null;
|
|
69
68
|
};
|
|
70
69
|
//# sourceMappingURL=GridRendererTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridRendererTypes.d.ts","sourceRoot":"","sources":["../src/GridRendererTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"GridRendererTypes.d.ts","sourceRoot":"","sources":["../src/GridRendererTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,EAAE,KAAK,a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G,IAAI,CAAC;IAG1B,SAAS,EAAE,SAAS,CAAC;IAGrB,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,uBAAuB,EAAE,aAAa,GAAG,IAAI,CAAC;IAC9C,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;IACjC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,oBAAoB,EAAE,aAAa,GAAG,IAAI,CAAC;IAG3C,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,6BAA6B,EAAE,OAAO,CAAC;IACvC,2BAA2B,EAAE,OAAO,CAAC;IACrC,UAAU,EAAE,OAAO,CAAC;IAIpB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;CACjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridRendererTypes.js","names":["DEFAULT_FONT_WIDTH"],"sources":["../src/GridRendererTypes.ts"],"sourcesContent":["import type React from 'react';\nimport { type VisibleIndex, type Coordinate } from './GridMetrics';\nimport type GridMetrics from './GridMetrics';\nimport type GridModel from './GridModel';\nimport
|
|
1
|
+
{"version":3,"file":"GridRendererTypes.js","names":["DEFAULT_FONT_WIDTH"],"sources":["../src/GridRendererTypes.ts"],"sourcesContent":["import type React from 'react';\nimport { type VisibleIndex, type Coordinate } from './GridMetrics';\nimport type GridMetrics from './GridMetrics';\nimport type GridModel from './GridModel';\nimport { type GridTheme } from './GridTheme';\nimport { type DraggingColumn } from './mouse-handlers/GridColumnMoveMouseHandler';\nimport { type GridSeparator } from './mouse-handlers/GridSeparatorMouseHandler';\nimport type { CellInputFieldProps } from './CellInputField';\nimport type { ColumnRestriction } from './GridModel';\nimport type { GestureMode, Selection } from './Selection';\n\n// Default font width in pixels if it cannot be retrieved from the context\nexport const DEFAULT_FONT_WIDTH = 10;\n\n/**\n * Props passed to a cell input renderer, combining the base CellInputField\n * props with the restrictions that apply to the cell being edited.\n */\nexport type CellInputProps = CellInputFieldProps & {\n restrictions: readonly ColumnRestriction[];\n};\n\n/**\n * A renderer for a single cell input field based on column restriction type.\n *\n * Set `preservesExistingValue = true` on the function to signal that\n * keystroke-initiated edits should open the editor with the existing cell\n * value rather than replacing it with the typed character.\n */\nexport type CellInputRendererFn = ((\n props: CellInputProps\n) => React.ReactNode) & {\n /**\n * When true, keystroke-initiated edits preserve the existing cell value\n * instead of replacing it with the typed character. Intended for renderers\n * like dropdowns where the typed character has no meaning as a new value.\n */\n preservesExistingValue?: boolean;\n};\n\n/**\n * A map from column restriction type string to a cell input renderer function.\n * Grid looks up restrictions[0].type in this registry and falls back to\n * CellInputField when there is no match.\n */\nexport type CellInputRendererRegistry = ReadonlyMap<\n string,\n CellInputRendererFn\n>;\n\nexport type EditingCellTextSelectionRange = [start: number, end: number];\n\nexport type EditingCell = {\n // Index of the editing cell\n column: VisibleIndex;\n row: VisibleIndex;\n\n // Selection within the text\n selectionRange?: EditingCellTextSelectionRange;\n\n // The value to use for the edit\n value: string;\n\n // Whether the selection was triggered with a quick edit action (e.g. Start typing with the cell in focus)\n isQuickEdit?: boolean;\n};\n\nexport type GridRenderState = {\n // Width and height of the total canvas area\n width: number;\n height: number;\n\n // The canvas context\n context: CanvasRenderingContext2D;\n\n // The grid theme\n theme: GridTheme;\n\n // The model used by the grid\n model: GridModel;\n\n // The grid metrics\n metrics: GridMetrics;\n\n // Location of the mouse on the grid\n mouseX: Coordinate | null;\n mouseY: Coordinate | null;\n\n // Current selection. Owns the cursor and shift/drag endpoint.\n selection: Selection;\n\n // Currently dragged column/row information\n draggingColumn: DraggingColumn | null;\n draggingColumnSeparator: GridSeparator | null;\n draggingRow: VisibleIndex | null;\n draggingRowOffset: number | null;\n draggingRowSeparator: GridSeparator | null;\n\n // The currently editing cell\n editingCell: EditingCell | null;\n isDraggingHorizontalScrollBar: boolean;\n isDraggingVerticalScrollBar: boolean;\n isDragging: boolean;\n\n // Modifier-derived mode of the in-flight mouse gesture; `null` when no\n // gesture is active. Drives the drag-overlay stroke on additive gestures.\n gestureMode: GestureMode | null;\n};\n"],"mappings":"AAWA;AACA,OAAO,IAAMA,kBAAkB,GAAG,EAAE;;AAEpC;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import GridRange, { type GridRangeIndex, type SELECTION_DIRECTION } from './GridRange';
|
|
2
|
+
import type { CommitGestureOptions, GestureExtendOptions, GestureMode, Selection } from './Selection';
|
|
3
|
+
/**
|
|
4
|
+
* Maps modifier-key state on a mouse event to the appropriate `GestureMode`.
|
|
5
|
+
* The four modifier combinations partition the gesture space:
|
|
6
|
+
* - shift + ctrl/meta → `maximize`
|
|
7
|
+
* - shift alone → `extend`
|
|
8
|
+
* - ctrl/meta alone → `add`
|
|
9
|
+
* - no modifiers → `replace`
|
|
10
|
+
*/
|
|
11
|
+
export declare function gestureModeFromModifiers(modifiers: {
|
|
12
|
+
isShiftKey: boolean;
|
|
13
|
+
isModifierKey: boolean;
|
|
14
|
+
}): GestureMode;
|
|
15
|
+
/**
|
|
16
|
+
* Shape describing how a mouse gesture should mutate the selection's ranges.
|
|
17
|
+
* Consumed by each `Selection` implementation's `withGestureExtend` to install
|
|
18
|
+
* the transient overlay.
|
|
19
|
+
*/
|
|
20
|
+
export type GestureExtendResult = {
|
|
21
|
+
/** The new range list to install as the transient overlay. */
|
|
22
|
+
newRanges: readonly GridRange[];
|
|
23
|
+
/**
|
|
24
|
+
* True when the caller should drop any previously-committed selection state
|
|
25
|
+
* (relevant to `KeyedSelection.selectedKeys`; ignored by `RangedSelection`).
|
|
26
|
+
*/
|
|
27
|
+
isReplacing: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* True when the caller should trim to the last committed range before
|
|
30
|
+
* installing the new ranges. Applies to `extend` mode.
|
|
31
|
+
*/
|
|
32
|
+
trimBefore: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* True when the caller should reset the gesture anchor to `cursor` after
|
|
35
|
+
* installing. False preserves the existing anchor.
|
|
36
|
+
*/
|
|
37
|
+
resetAnchor: boolean;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Compute the geometry for a mouse gesture. Given the current active ranges,
|
|
41
|
+
* gesture anchor, cursor position, and mode, returns the new overlay ranges
|
|
42
|
+
* plus the flags describing how the caller should install them.
|
|
43
|
+
*
|
|
44
|
+
* This is the shared arithmetic used by both `RangedSelection` and
|
|
45
|
+
* `KeyedSelection` for their `withGestureExtend` implementations.
|
|
46
|
+
*/
|
|
47
|
+
export declare function computeGestureExtend(activeRanges: readonly GridRange[], anchor: {
|
|
48
|
+
row: GridRangeIndex;
|
|
49
|
+
column: GridRangeIndex;
|
|
50
|
+
} | null, cursor: {
|
|
51
|
+
row: GridRangeIndex;
|
|
52
|
+
column: GridRangeIndex;
|
|
53
|
+
}, opts: GestureExtendOptions): GestureExtendResult;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the next cursor cell in `direction` walking through `ranges`.
|
|
56
|
+
* Falls back to walking the full grid when the ranges are empty or contain
|
|
57
|
+
* exactly one cell — matches Tab/Enter behavior for single-cell selections.
|
|
58
|
+
* Shared by `RangedSelection` and `KeyedSelection` implementations of
|
|
59
|
+
* `getNextCursorInDirection`.
|
|
60
|
+
*/
|
|
61
|
+
export declare function nextCursorInRanges(ranges: readonly GridRange[], current: {
|
|
62
|
+
row: GridRangeIndex;
|
|
63
|
+
column: GridRangeIndex;
|
|
64
|
+
}, direction: SELECTION_DIRECTION, bounds: {
|
|
65
|
+
columnCount: number;
|
|
66
|
+
rowCount: number;
|
|
67
|
+
}): {
|
|
68
|
+
row: GridRangeIndex;
|
|
69
|
+
column: GridRangeIndex;
|
|
70
|
+
} | null;
|
|
71
|
+
/**
|
|
72
|
+
* Returns the first cell of `ranges` bounded to `[columnCount, rowCount]`.
|
|
73
|
+
* Shared by `RangedSelection` and `KeyedSelection` implementations of
|
|
74
|
+
* `getCursorLandingCell`.
|
|
75
|
+
*/
|
|
76
|
+
export declare function cursorLandingCellForRanges(ranges: readonly GridRange[], bounds: {
|
|
77
|
+
columnCount: number;
|
|
78
|
+
rowCount: number;
|
|
79
|
+
}): {
|
|
80
|
+
row: GridRangeIndex;
|
|
81
|
+
column: GridRangeIndex;
|
|
82
|
+
} | null;
|
|
83
|
+
/**
|
|
84
|
+
* Returns `settled` with the post-commit cursor placed. Uses `opts.cursor`
|
|
85
|
+
* as the target; substitutes `landing` when the target falls outside a
|
|
86
|
+
* non-empty settled selection; preserves the target when settled is empty
|
|
87
|
+
* (matches Escape's "cursor survives clear" semantics).
|
|
88
|
+
*
|
|
89
|
+
* Callers pass `landing` precomputed from the pre-commit selection so this
|
|
90
|
+
* helper doesn't need to reach back into the caller's overlay state.
|
|
91
|
+
* Returns `settled` unchanged when the cursor is already correct so
|
|
92
|
+
* mouseUp no-ops preserve reference equality.
|
|
93
|
+
*/
|
|
94
|
+
export declare function withCommittedCursor<S extends Selection>(settled: S, landing: {
|
|
95
|
+
row: GridRangeIndex;
|
|
96
|
+
column: GridRangeIndex;
|
|
97
|
+
} | null, opts: CommitGestureOptions): S;
|
|
98
|
+
//# sourceMappingURL=GridSelectionUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridSelectionUtils.d.ts","sourceRoot":"","sources":["../src/GridSelectionUtils.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAChB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACzB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,EACX,SAAS,EACV,MAAM,aAAa,CAAC;AAErB;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE;IAClD,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;CACxB,GAAG,WAAW,CAMd;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;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IAAE,GAAG,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,cAAc,CAAA;CAAE,GAAG,IAAI,EAC/D,IAAI,EAAE,oBAAoB,GACzB,CAAC,CA4BH"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import GridRange from "./GridRange.js";
|
|
2
|
+
/**
|
|
3
|
+
* Maps modifier-key state on a mouse event to the appropriate `GestureMode`.
|
|
4
|
+
* The four modifier combinations partition the gesture space:
|
|
5
|
+
* - shift + ctrl/meta → `maximize`
|
|
6
|
+
* - shift alone → `extend`
|
|
7
|
+
* - ctrl/meta alone → `add`
|
|
8
|
+
* - no modifiers → `replace`
|
|
9
|
+
*/
|
|
10
|
+
export function gestureModeFromModifiers(modifiers) {
|
|
11
|
+
var isShiftKey = modifiers.isShiftKey,
|
|
12
|
+
isModifierKey = modifiers.isModifierKey;
|
|
13
|
+
if (isShiftKey && isModifierKey) return 'maximize';
|
|
14
|
+
if (isShiftKey) return 'extend';
|
|
15
|
+
if (isModifierKey) return 'add';
|
|
16
|
+
return 'replace';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Shape describing how a mouse gesture should mutate the selection's ranges.
|
|
21
|
+
* Consumed by each `Selection` implementation's `withGestureExtend` to install
|
|
22
|
+
* the transient overlay.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Compute the geometry for a mouse gesture. Given the current active ranges,
|
|
27
|
+
* gesture anchor, cursor position, and mode, returns the new overlay ranges
|
|
28
|
+
* plus the flags describing how the caller should install them.
|
|
29
|
+
*
|
|
30
|
+
* This is the shared arithmetic used by both `RangedSelection` and
|
|
31
|
+
* `KeyedSelection` for their `withGestureExtend` implementations.
|
|
32
|
+
*/
|
|
33
|
+
export function computeGestureExtend(activeRanges, anchor, cursor, opts) {
|
|
34
|
+
var _anchor$row, _anchor$column;
|
|
35
|
+
var mode = opts.mode,
|
|
36
|
+
autoSelectRow = opts.autoSelectRow,
|
|
37
|
+
autoSelectColumn = opts.autoSelectColumn;
|
|
38
|
+
var row = cursor.row,
|
|
39
|
+
column = cursor.column;
|
|
40
|
+
var singleCellColumn = autoSelectRow ? null : column;
|
|
41
|
+
var singleCellRow = autoSelectColumn ? null : row;
|
|
42
|
+
var singleCell = GridRange.makeNormalized(singleCellColumn, singleCellRow, singleCellColumn, singleCellRow);
|
|
43
|
+
if (mode === 'replace') {
|
|
44
|
+
return {
|
|
45
|
+
newRanges: [singleCell],
|
|
46
|
+
isReplacing: true,
|
|
47
|
+
trimBefore: false,
|
|
48
|
+
resetAnchor: true
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (mode === 'add') {
|
|
52
|
+
return {
|
|
53
|
+
newRanges: [...activeRanges, singleCell],
|
|
54
|
+
isReplacing: false,
|
|
55
|
+
trimBefore: false,
|
|
56
|
+
resetAnchor: true
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// extend or maximize — both extend an existing range from anchor/last-range.
|
|
61
|
+
var trimBefore = mode === 'extend';
|
|
62
|
+
var isReplacing = mode === 'extend';
|
|
63
|
+
var rangesBeforeExtend = trimBefore && activeRanges.length > 0 ? [activeRanges[activeRanges.length - 1]] : activeRanges;
|
|
64
|
+
var anchorRow = (_anchor$row = anchor === null || anchor === void 0 ? void 0 : anchor.row) !== null && _anchor$row !== void 0 ? _anchor$row : null;
|
|
65
|
+
var anchorColumn = (_anchor$column = anchor === null || anchor === void 0 ? void 0 : anchor.column) !== null && _anchor$column !== void 0 ? _anchor$column : null;
|
|
66
|
+
|
|
67
|
+
// Nothing to extend from → fall through to replace-with-cell semantics.
|
|
68
|
+
if (rangesBeforeExtend.length === 0 && anchor == null) {
|
|
69
|
+
return {
|
|
70
|
+
newRanges: [singleCell],
|
|
71
|
+
isReplacing: true,
|
|
72
|
+
trimBefore: false,
|
|
73
|
+
resetAnchor: true
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
var lastRange = rangesBeforeExtend.length > 0 ? rangesBeforeExtend[rangesBeforeExtend.length - 1] : GridRange.makeNormalized(anchorColumn, anchorRow, anchorColumn, anchorRow);
|
|
77
|
+
var left = null;
|
|
78
|
+
var top = null;
|
|
79
|
+
var right = null;
|
|
80
|
+
var bottom = null;
|
|
81
|
+
if (mode === 'maximize') {
|
|
82
|
+
var _lastRange$startColum, _lastRange$startRow, _lastRange$endColumn, _lastRange$endRow;
|
|
83
|
+
left = autoSelectRow ? null : Math.min(column !== null && column !== void 0 ? column : 0, (_lastRange$startColum = lastRange.startColumn) !== null && _lastRange$startColum !== void 0 ? _lastRange$startColum : 0);
|
|
84
|
+
top = autoSelectColumn ? null : Math.min(row !== null && row !== void 0 ? row : 0, (_lastRange$startRow = lastRange.startRow) !== null && _lastRange$startRow !== void 0 ? _lastRange$startRow : 0);
|
|
85
|
+
right = autoSelectRow ? null : Math.max(column !== null && column !== void 0 ? column : 0, (_lastRange$endColumn = lastRange.endColumn) !== null && _lastRange$endColumn !== void 0 ? _lastRange$endColumn : 0);
|
|
86
|
+
bottom = autoSelectColumn ? null : Math.max(row !== null && row !== void 0 ? row : 0, (_lastRange$endRow = lastRange.endRow) !== null && _lastRange$endRow !== void 0 ? _lastRange$endRow : 0);
|
|
87
|
+
} else {
|
|
88
|
+
// extend — anchor to cursor, replacing the last range.
|
|
89
|
+
left = lastRange.startColumn;
|
|
90
|
+
top = lastRange.startRow;
|
|
91
|
+
if (anchorColumn != null || anchorRow != null) {
|
|
92
|
+
if (!autoSelectRow) left = anchorColumn;
|
|
93
|
+
if (!autoSelectColumn) top = anchorRow;
|
|
94
|
+
}
|
|
95
|
+
right = autoSelectRow ? null : column;
|
|
96
|
+
bottom = autoSelectColumn ? null : row;
|
|
97
|
+
}
|
|
98
|
+
var extended = GridRange.makeNormalized(left, top, right, bottom);
|
|
99
|
+
if (lastRange.equals(extended)) {
|
|
100
|
+
return {
|
|
101
|
+
newRanges: rangesBeforeExtend,
|
|
102
|
+
isReplacing,
|
|
103
|
+
trimBefore,
|
|
104
|
+
resetAnchor: false
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
var newRanges = [...rangesBeforeExtend];
|
|
108
|
+
if (newRanges.length > 0) {
|
|
109
|
+
newRanges[newRanges.length - 1] = extended;
|
|
110
|
+
} else {
|
|
111
|
+
newRanges.push(extended);
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
newRanges,
|
|
115
|
+
isReplacing,
|
|
116
|
+
trimBefore,
|
|
117
|
+
resetAnchor: false
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Returns the next cursor cell in `direction` walking through `ranges`.
|
|
123
|
+
* Falls back to walking the full grid when the ranges are empty or contain
|
|
124
|
+
* exactly one cell — matches Tab/Enter behavior for single-cell selections.
|
|
125
|
+
* Shared by `RangedSelection` and `KeyedSelection` implementations of
|
|
126
|
+
* `getNextCursorInDirection`.
|
|
127
|
+
*/
|
|
128
|
+
export function nextCursorInRanges(ranges, current, direction, bounds) {
|
|
129
|
+
var activeRanges = ranges.length > 0 ? ranges : [GridRange.makeCell(current.column, current.row)];
|
|
130
|
+
if (activeRanges.length === 1 && GridRange.cellCount(activeRanges) === 1) {
|
|
131
|
+
var _gridRange$nextCell;
|
|
132
|
+
var gridRange = new GridRange(0, 0, bounds.columnCount - 1, bounds.rowCount - 1);
|
|
133
|
+
return (_gridRange$nextCell = gridRange.nextCell(current.column, current.row, direction)) !== null && _gridRange$nextCell !== void 0 ? _gridRange$nextCell : gridRange.startCell(direction);
|
|
134
|
+
}
|
|
135
|
+
return GridRange.nextCell(GridRange.boundedRanges(activeRanges, bounds.columnCount, bounds.rowCount), current.column, current.row, direction);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Returns the first cell of `ranges` bounded to `[columnCount, rowCount]`.
|
|
140
|
+
* Shared by `RangedSelection` and `KeyedSelection` implementations of
|
|
141
|
+
* `getCursorLandingCell`.
|
|
142
|
+
*/
|
|
143
|
+
export function cursorLandingCellForRanges(ranges, bounds) {
|
|
144
|
+
if (ranges.length === 0) return null;
|
|
145
|
+
return GridRange.nextCell(GridRange.boundedRanges(ranges, bounds.columnCount, bounds.rowCount));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Returns `settled` with the post-commit cursor placed. Uses `opts.cursor`
|
|
150
|
+
* as the target; substitutes `landing` when the target falls outside a
|
|
151
|
+
* non-empty settled selection; preserves the target when settled is empty
|
|
152
|
+
* (matches Escape's "cursor survives clear" semantics).
|
|
153
|
+
*
|
|
154
|
+
* Callers pass `landing` precomputed from the pre-commit selection so this
|
|
155
|
+
* helper doesn't need to reach back into the caller's overlay state.
|
|
156
|
+
* Returns `settled` unchanged when the cursor is already correct so
|
|
157
|
+
* mouseUp no-ops preserve reference equality.
|
|
158
|
+
*/
|
|
159
|
+
export function withCommittedCursor(settled, landing, opts) {
|
|
160
|
+
var target = opts.cursor;
|
|
161
|
+
if (target === undefined) return settled;
|
|
162
|
+
var desiredRow;
|
|
163
|
+
var desiredColumn;
|
|
164
|
+
if (settled.isEmpty()) {
|
|
165
|
+
desiredRow = target.row;
|
|
166
|
+
desiredColumn = target.column;
|
|
167
|
+
} else if (target.row != null && target.column != null && settled.isCellSelected(target.column, target.row)) {
|
|
168
|
+
desiredRow = target.row;
|
|
169
|
+
desiredColumn = target.column;
|
|
170
|
+
} else {
|
|
171
|
+
var _landing$row, _landing$column;
|
|
172
|
+
desiredRow = (_landing$row = landing === null || landing === void 0 ? void 0 : landing.row) !== null && _landing$row !== void 0 ? _landing$row : null;
|
|
173
|
+
desiredColumn = (_landing$column = landing === null || landing === void 0 ? void 0 : landing.column) !== null && _landing$column !== void 0 ? _landing$column : null;
|
|
174
|
+
}
|
|
175
|
+
if (settled.cursorRow === desiredRow && settled.cursorColumn === desiredColumn) {
|
|
176
|
+
return settled;
|
|
177
|
+
}
|
|
178
|
+
return settled.withCursor(desiredRow, desiredColumn);
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=GridSelectionUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridSelectionUtils.js","names":["GridRange","gestureModeFromModifiers","modifiers","isShiftKey","isModifierKey","computeGestureExtend","activeRanges","anchor","cursor","opts","_anchor$row","_anchor$column","mode","autoSelectRow","autoSelectColumn","row","column","singleCellColumn","singleCellRow","singleCell","makeNormalized","newRanges","isReplacing","trimBefore","resetAnchor","rangesBeforeExtend","length","anchorRow","anchorColumn","lastRange","left","top","right","bottom","_lastRange$startColum","_lastRange$startRow","_lastRange$endColumn","_lastRange$endRow","Math","min","startColumn","startRow","max","endColumn","endRow","extended","equals","push","nextCursorInRanges","ranges","current","direction","bounds","makeCell","cellCount","_gridRange$nextCell","gridRange","columnCount","rowCount","nextCell","startCell","boundedRanges","cursorLandingCellForRanges","withCommittedCursor","settled","landing","target","undefined","desiredRow","desiredColumn","isEmpty","isCellSelected","_landing$row","_landing$column","cursorRow","cursorColumn","withCursor"],"sources":["../src/GridSelectionUtils.ts"],"sourcesContent":["import GridRange, {\n type GridRangeIndex,\n type SELECTION_DIRECTION,\n} from './GridRange';\nimport type {\n CommitGestureOptions,\n GestureExtendOptions,\n GestureMode,\n Selection,\n} from './Selection';\n\n/**\n * Maps modifier-key state on a mouse event to the appropriate `GestureMode`.\n * The four modifier combinations partition the gesture space:\n * - shift + ctrl/meta → `maximize`\n * - shift alone → `extend`\n * - ctrl/meta alone → `add`\n * - no modifiers → `replace`\n */\nexport function gestureModeFromModifiers(modifiers: {\n isShiftKey: boolean;\n isModifierKey: boolean;\n}): GestureMode {\n const { isShiftKey, isModifierKey } = modifiers;\n if (isShiftKey && isModifierKey) return 'maximize';\n if (isShiftKey) return 'extend';\n if (isModifierKey) return 'add';\n return 'replace';\n}\n\n/**\n * Shape describing how a mouse gesture should mutate the selection's ranges.\n * Consumed by each `Selection` implementation's `withGestureExtend` to install\n * the transient overlay.\n */\nexport type GestureExtendResult = {\n /** The new range list to install as the transient overlay. */\n newRanges: readonly GridRange[];\n /**\n * True when the caller should drop any previously-committed selection state\n * (relevant to `KeyedSelection.selectedKeys`; ignored by `RangedSelection`).\n */\n isReplacing: boolean;\n /**\n * True when the caller should trim to the last committed range before\n * installing the new ranges. Applies to `extend` mode.\n */\n trimBefore: boolean;\n /**\n * True when the caller should reset the gesture anchor to `cursor` after\n * installing. False preserves the existing anchor.\n */\n resetAnchor: boolean;\n};\n\n/**\n * Compute the geometry for a mouse gesture. Given the current active ranges,\n * gesture anchor, cursor position, and mode, returns the new overlay ranges\n * plus the flags describing how the caller should install them.\n *\n * This is the shared arithmetic used by both `RangedSelection` and\n * `KeyedSelection` for their `withGestureExtend` implementations.\n */\nexport function computeGestureExtend(\n activeRanges: readonly GridRange[],\n anchor: { row: GridRangeIndex; column: GridRangeIndex } | null,\n cursor: { row: GridRangeIndex; column: GridRangeIndex },\n opts: GestureExtendOptions\n): GestureExtendResult {\n const { mode, autoSelectRow, autoSelectColumn } = opts;\n const { row, column } = cursor;\n\n const singleCellColumn = autoSelectRow ? null : column;\n const singleCellRow = autoSelectColumn ? null : row;\n const singleCell = GridRange.makeNormalized(\n singleCellColumn,\n singleCellRow,\n singleCellColumn,\n singleCellRow\n );\n\n if (mode === 'replace') {\n return {\n newRanges: [singleCell],\n isReplacing: true,\n trimBefore: false,\n resetAnchor: true,\n };\n }\n\n if (mode === 'add') {\n return {\n newRanges: [...activeRanges, singleCell],\n isReplacing: false,\n trimBefore: false,\n resetAnchor: true,\n };\n }\n\n // extend or maximize — both extend an existing range from anchor/last-range.\n const trimBefore = mode === 'extend';\n const isReplacing = mode === 'extend';\n\n const rangesBeforeExtend =\n trimBefore && activeRanges.length > 0\n ? [activeRanges[activeRanges.length - 1]]\n : activeRanges;\n\n const anchorRow = anchor?.row ?? null;\n const anchorColumn = anchor?.column ?? null;\n\n // Nothing to extend from → fall through to replace-with-cell semantics.\n if (rangesBeforeExtend.length === 0 && anchor == null) {\n return {\n newRanges: [singleCell],\n isReplacing: true,\n trimBefore: false,\n resetAnchor: true,\n };\n }\n\n const lastRange =\n rangesBeforeExtend.length > 0\n ? rangesBeforeExtend[rangesBeforeExtend.length - 1]\n : GridRange.makeNormalized(\n anchorColumn,\n anchorRow,\n anchorColumn,\n anchorRow\n );\n\n let left: GridRangeIndex = null;\n let top: GridRangeIndex = null;\n let right: GridRangeIndex = null;\n let bottom: GridRangeIndex = null;\n\n if (mode === 'maximize') {\n left = autoSelectRow\n ? null\n : Math.min(column ?? 0, lastRange.startColumn ?? 0);\n top = autoSelectColumn ? null : Math.min(row ?? 0, lastRange.startRow ?? 0);\n right = autoSelectRow\n ? null\n : Math.max(column ?? 0, lastRange.endColumn ?? 0);\n bottom = autoSelectColumn\n ? null\n : Math.max(row ?? 0, lastRange.endRow ?? 0);\n } else {\n // extend — anchor to cursor, replacing the last range.\n left = lastRange.startColumn;\n top = lastRange.startRow;\n if (anchorColumn != null || anchorRow != null) {\n if (!autoSelectRow) left = anchorColumn;\n if (!autoSelectColumn) top = anchorRow;\n }\n right = autoSelectRow ? null : column;\n bottom = autoSelectColumn ? null : row;\n }\n\n const extended = GridRange.makeNormalized(left, top, right, bottom);\n\n if (lastRange.equals(extended)) {\n return {\n newRanges: rangesBeforeExtend,\n isReplacing,\n trimBefore,\n resetAnchor: false,\n };\n }\n\n const newRanges = [...rangesBeforeExtend];\n if (newRanges.length > 0) {\n newRanges[newRanges.length - 1] = extended;\n } else {\n newRanges.push(extended);\n }\n\n return {\n newRanges,\n isReplacing,\n trimBefore,\n resetAnchor: false,\n };\n}\n\n/**\n * Returns the next cursor cell in `direction` walking through `ranges`.\n * Falls back to walking the full grid when the ranges are empty or contain\n * exactly one cell — matches Tab/Enter behavior for single-cell selections.\n * Shared by `RangedSelection` and `KeyedSelection` implementations of\n * `getNextCursorInDirection`.\n */\nexport function nextCursorInRanges(\n ranges: readonly GridRange[],\n current: { row: GridRangeIndex; column: GridRangeIndex },\n direction: SELECTION_DIRECTION,\n bounds: { columnCount: number; rowCount: number }\n): { row: GridRangeIndex; column: GridRangeIndex } | null {\n const activeRanges =\n ranges.length > 0\n ? ranges\n : [GridRange.makeCell(current.column, current.row)];\n if (activeRanges.length === 1 && GridRange.cellCount(activeRanges) === 1) {\n const gridRange = new GridRange(\n 0,\n 0,\n bounds.columnCount - 1,\n bounds.rowCount - 1\n );\n return (\n gridRange.nextCell(current.column, current.row, direction) ??\n gridRange.startCell(direction)\n );\n }\n return GridRange.nextCell(\n GridRange.boundedRanges(activeRanges, bounds.columnCount, bounds.rowCount),\n current.column,\n current.row,\n direction\n );\n}\n\n/**\n * Returns the first cell of `ranges` bounded to `[columnCount, rowCount]`.\n * Shared by `RangedSelection` and `KeyedSelection` implementations of\n * `getCursorLandingCell`.\n */\nexport function cursorLandingCellForRanges(\n ranges: readonly GridRange[],\n bounds: { columnCount: number; rowCount: number }\n): { row: GridRangeIndex; column: GridRangeIndex } | null {\n if (ranges.length === 0) return null;\n return GridRange.nextCell(\n GridRange.boundedRanges(ranges, bounds.columnCount, bounds.rowCount)\n );\n}\n\n/**\n * Returns `settled` with the post-commit cursor placed. Uses `opts.cursor`\n * as the target; substitutes `landing` when the target falls outside a\n * non-empty settled selection; preserves the target when settled is empty\n * (matches Escape's \"cursor survives clear\" semantics).\n *\n * Callers pass `landing` precomputed from the pre-commit selection so this\n * helper doesn't need to reach back into the caller's overlay state.\n * Returns `settled` unchanged when the cursor is already correct so\n * mouseUp no-ops preserve reference equality.\n */\nexport function withCommittedCursor<S extends Selection>(\n settled: S,\n landing: { row: GridRangeIndex; column: GridRangeIndex } | null,\n opts: CommitGestureOptions\n): S {\n const target = opts.cursor;\n if (target === undefined) return settled;\n\n let desiredRow: GridRangeIndex;\n let desiredColumn: GridRangeIndex;\n if (settled.isEmpty()) {\n desiredRow = target.row;\n desiredColumn = target.column;\n } else if (\n target.row != null &&\n target.column != null &&\n settled.isCellSelected(target.column, target.row)\n ) {\n desiredRow = target.row;\n desiredColumn = target.column;\n } else {\n desiredRow = landing?.row ?? null;\n desiredColumn = landing?.column ?? null;\n }\n\n if (\n settled.cursorRow === desiredRow &&\n settled.cursorColumn === desiredColumn\n ) {\n return settled;\n }\n return settled.withCursor(desiredRow, desiredColumn) as S;\n}\n"],"mappings":"OAAOA,SAAS;AAWhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAACC,SAGxC,EAAe;EACd,IAAQC,UAAU,GAAoBD,SAAS,CAAvCC,UAAU;IAAEC,aAAa,GAAKF,SAAS,CAA3BE,aAAa;EACjC,IAAID,UAAU,IAAIC,aAAa,EAAE,OAAO,UAAU;EAClD,IAAID,UAAU,EAAE,OAAO,QAAQ;EAC/B,IAAIC,aAAa,EAAE,OAAO,KAAK;EAC/B,OAAO,SAAS;AAClB;;AAEA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAClCC,YAAkC,EAClCC,MAA8D,EAC9DC,MAAuD,EACvDC,IAA0B,EACL;EAAA,IAAAC,WAAA,EAAAC,cAAA;EACrB,IAAQC,IAAI,GAAsCH,IAAI,CAA9CG,IAAI;IAAEC,aAAa,GAAuBJ,IAAI,CAAxCI,aAAa;IAAEC,gBAAgB,GAAKL,IAAI,CAAzBK,gBAAgB;EAC7C,IAAQC,GAAG,GAAaP,MAAM,CAAtBO,GAAG;IAAEC,MAAM,GAAKR,MAAM,CAAjBQ,MAAM;EAEnB,IAAMC,gBAAgB,GAAGJ,aAAa,GAAG,IAAI,GAAGG,MAAM;EACtD,IAAME,aAAa,GAAGJ,gBAAgB,GAAG,IAAI,GAAGC,GAAG;EACnD,IAAMI,UAAU,GAAGnB,SAAS,CAACoB,cAAc,CACzCH,gBAAgB,EAChBC,aAAa,EACbD,gBAAgB,EAChBC,aACF,CAAC;EAED,IAAIN,IAAI,KAAK,SAAS,EAAE;IACtB,OAAO;MACLS,SAAS,EAAE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,aAAa,GAAGH,MAAM,CAAClD,MAAM;EAC/B,CAAC,MAAM,IACLkD,MAAM,CAACnD,GAAG,IAAI,IAAI,IAClBmD,MAAM,CAAClD,MAAM,IAAI,IAAI,IACrBgD,OAAO,CAACO,cAAc,CAACL,MAAM,CAAClD,MAAM,EAAEkD,MAAM,CAACnD,GAAG,CAAC,EACjD;IACAqD,UAAU,GAAGF,MAAM,CAACnD,GAAG;IACvBsD,aAAa,GAAGH,MAAM,CAAClD,MAAM;EAC/B,CAAC,MAAM;IAAA,IAAAwD,YAAA,EAAAC,eAAA;IACLL,UAAU,IAAAI,YAAA,GAAGP,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAElD,GAAG,cAAAyD,YAAA,cAAAA,YAAA,GAAI,IAAI;IACjCH,aAAa,IAAAI,eAAA,GAAGR,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEjD,MAAM,cAAAyD,eAAA,cAAAA,eAAA,GAAI,IAAI;EACzC;EAEA,IACET,OAAO,CAACU,SAAS,KAAKN,UAAU,IAChCJ,OAAO,CAACW,YAAY,KAAKN,aAAa,EACtC;IACA,OAAOL,OAAO;EAChB;EACA,OAAOA,OAAO,CAACY,UAAU,CAACR,UAAU,EAAEC,aAAa,CAAC;AACtD","ignoreList":[]}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import GridRange, { type GridRangeIndex, type SELECTION_DIRECTION } from './GridRange';
|
|
2
|
+
import type { VisibleIndex } from './GridMetrics';
|
|
3
|
+
import { type BoundedAxisRange } from './GridAxisRange';
|
|
4
|
+
import type { CommitGestureOptions, GestureExtendOptions, GetModel, Selection, TickRangeSelection } from './Selection';
|
|
5
|
+
/**
|
|
6
|
+
* Immutable `Selection` for standard (row-indexed) grids. Each entry in
|
|
7
|
+
* `ranges` describes a rectangle of cells; consumers iterate/consolidate
|
|
8
|
+
* as needed.
|
|
9
|
+
*/
|
|
10
|
+
export declare class RangedSelection implements Selection, TickRangeSelection {
|
|
11
|
+
/** Committed selection rectangles; may be empty for a cleared selection. */
|
|
12
|
+
readonly ranges: readonly GridRange[];
|
|
13
|
+
/**
|
|
14
|
+
* Deferred lookup for the current `GridModel`. Passed as a closure
|
|
15
|
+
* (not a direct reference) so this Selection always reads the model
|
|
16
|
+
* currently on `Grid.props.model` — surviving prop swaps without
|
|
17
|
+
* holding a stale reference.
|
|
18
|
+
*/
|
|
19
|
+
private readonly getModel;
|
|
20
|
+
/** Anchor row for shift-click / keyboard extend; null when no anchor is set. */
|
|
21
|
+
private readonly gestureStartRow;
|
|
22
|
+
/** Anchor column for shift-click / keyboard extend; null when no anchor is set. */
|
|
23
|
+
private readonly gestureStartColumn;
|
|
24
|
+
/** Focus row; null when no cursor is set. */
|
|
25
|
+
readonly cursorRow: VisibleIndex | null;
|
|
26
|
+
/** Focus column; null when no cursor is set. */
|
|
27
|
+
readonly cursorColumn: VisibleIndex | null;
|
|
28
|
+
/** Last shift/drag endpoint row; null when unset. */
|
|
29
|
+
readonly selectionEndRow: VisibleIndex | null;
|
|
30
|
+
/** Last shift/drag endpoint column; null when unset. */
|
|
31
|
+
readonly selectionEndColumn: VisibleIndex | null;
|
|
32
|
+
static empty(getModel: GetModel): RangedSelection;
|
|
33
|
+
constructor(
|
|
34
|
+
/** Committed selection rectangles; may be empty for a cleared selection. */
|
|
35
|
+
ranges: readonly GridRange[],
|
|
36
|
+
/**
|
|
37
|
+
* Deferred lookup for the current `GridModel`. Passed as a closure
|
|
38
|
+
* (not a direct reference) so this Selection always reads the model
|
|
39
|
+
* currently on `Grid.props.model` — surviving prop swaps without
|
|
40
|
+
* holding a stale reference.
|
|
41
|
+
*/
|
|
42
|
+
getModel: GetModel,
|
|
43
|
+
/** Anchor row for shift-click / keyboard extend; null when no anchor is set. */
|
|
44
|
+
gestureStartRow?: GridRangeIndex,
|
|
45
|
+
/** Anchor column for shift-click / keyboard extend; null when no anchor is set. */
|
|
46
|
+
gestureStartColumn?: GridRangeIndex,
|
|
47
|
+
/** Focus row; null when no cursor is set. */
|
|
48
|
+
cursorRow?: VisibleIndex | null,
|
|
49
|
+
/** Focus column; null when no cursor is set. */
|
|
50
|
+
cursorColumn?: VisibleIndex | null,
|
|
51
|
+
/** Last shift/drag endpoint row; null when unset. */
|
|
52
|
+
selectionEndRow?: VisibleIndex | null,
|
|
53
|
+
/** Last shift/drag endpoint column; null when unset. */
|
|
54
|
+
selectionEndColumn?: VisibleIndex | null);
|
|
55
|
+
/**
|
|
56
|
+
* Returns a copy with the given fields overridden. Unspecified fields
|
|
57
|
+
* carry through from `this`, so mutations that only touch ranges /
|
|
58
|
+
* anchor keep cursor + endpoint intact without extra bookkeeping at
|
|
59
|
+
* every call site.
|
|
60
|
+
*/
|
|
61
|
+
private copyWith;
|
|
62
|
+
isEmpty(): boolean;
|
|
63
|
+
describe(): string;
|
|
64
|
+
isCellSelected(column: VisibleIndex, row: VisibleIndex): boolean;
|
|
65
|
+
isRowSelected(row: VisibleIndex): boolean;
|
|
66
|
+
isColumnSelected(column: VisibleIndex): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Checks if all ranges are within the bounds of the grid model.
|
|
69
|
+
* @returns True if all ranges are within bounds, false otherwise.
|
|
70
|
+
*/
|
|
71
|
+
isInBounds(): boolean;
|
|
72
|
+
toRanges(): readonly GridRange[];
|
|
73
|
+
getColumnTickRanges(): readonly BoundedAxisRange[];
|
|
74
|
+
getRowTickRanges(): readonly BoundedAxisRange[];
|
|
75
|
+
private cachedColumnTickRanges;
|
|
76
|
+
private cachedRowTickRanges;
|
|
77
|
+
withCommittedRanges(ranges: readonly GridRange[], anchor?: {
|
|
78
|
+
row: GridRangeIndex;
|
|
79
|
+
column: GridRangeIndex;
|
|
80
|
+
}): RangedSelection;
|
|
81
|
+
/**
|
|
82
|
+
* Sets the gesture anchor (extend-from position for shift-click and
|
|
83
|
+
* keyboard extend) to the given cell. Passing `null` for both clears it.
|
|
84
|
+
*/
|
|
85
|
+
private withGestureAnchor;
|
|
86
|
+
/**
|
|
87
|
+
* The current `{row, column}` of the gesture anchor, or `null` if none is set.
|
|
88
|
+
*/
|
|
89
|
+
private getGestureAnchor;
|
|
90
|
+
selectAll(): RangedSelection;
|
|
91
|
+
getNextCursorInDirection(current: {
|
|
92
|
+
row: GridRangeIndex;
|
|
93
|
+
column: GridRangeIndex;
|
|
94
|
+
}, direction: SELECTION_DIRECTION): {
|
|
95
|
+
row: GridRangeIndex;
|
|
96
|
+
column: GridRangeIndex;
|
|
97
|
+
} | null;
|
|
98
|
+
private getCursorLandingCell;
|
|
99
|
+
withCursor(row: VisibleIndex | null, column: VisibleIndex | null): RangedSelection;
|
|
100
|
+
withSelectionEnd(row: VisibleIndex | null, column: VisibleIndex | null): RangedSelection;
|
|
101
|
+
withGestureExtend(cursor: {
|
|
102
|
+
row: GridRangeIndex;
|
|
103
|
+
column: GridRangeIndex;
|
|
104
|
+
}, opts: GestureExtendOptions): RangedSelection;
|
|
105
|
+
commitGesture(lastCommitted: Selection, opts: CommitGestureOptions): RangedSelection;
|
|
106
|
+
clear(): RangedSelection;
|
|
107
|
+
trimmed(): RangedSelection;
|
|
108
|
+
truncate(maxRows: number): RangedSelection;
|
|
109
|
+
}
|
|
110
|
+
export declare function isRangedSelection(selection: Selection): selection is RangedSelection;
|
|
111
|
+
export declare function assertIsRangedSelection(selection: Selection): asserts selection is RangedSelection;
|
|
112
|
+
/**
|
|
113
|
+
* Returns `selection.toRanges()` when `selection` is a `RangedSelection`,
|
|
114
|
+
* otherwise `EMPTY_ARRAY`. Handy for consumers that only care about the
|
|
115
|
+
* range-form projection of a selection (e.g. legacy `selectedRanges`
|
|
116
|
+
* callbacks) and want a stable empty array for keyed / null selections.
|
|
117
|
+
*/
|
|
118
|
+
export declare function selectionToRanges(selection: Selection | null | undefined): readonly GridRange[];
|
|
119
|
+
export default RangedSelection;
|
|
120
|
+
//# sourceMappingURL=RangedSelection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RangedSelection.d.ts","sourceR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