foldkit-data-grid 0.2.3 → 0.3.1

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
@@ -269,6 +269,14 @@ GridSelection.isSelected(picked.selection.rows)('p1') // true
269
269
  selection in `'single'` mode; either way it becomes the anchor.
270
270
  `RowsExtended({ rows, to })` adds a Shift range the view worked out with
271
271
  `GridSelection.rowsBetween`; `RowsCleared` empties it.
272
+ - **A Shift click** in a `'multiple'` grid without `cellSelection` focuses
273
+ the cell and reports `Out.RowsRequested({ from, to })`: from the anchor, or
274
+ the row focused before it, to the row clicked. A click reaches the grid
275
+ through a Mount, which cannot read the rows the view last drew, so the
276
+ application, which holds them, adds the range:
277
+ `Grid.extendRows(rows, model.grid, request)` is the grid's Model with it
278
+ added, the rows between taken in the order they are drawn. With
279
+ `cellSelection`, a Shift click spans cells instead.
272
280
  - **Cells** are one rectangle, `CellsSelected({ anchor, focus })`, named by
273
281
  its corners, so it survives a re-sort as the same two cells and
274
282
  `GridSelection.boxOf(projection, range)` is what it covers now. A plain
@@ -310,7 +318,7 @@ const priced = Columns.define<Product>()({
310
318
  })
311
319
  const Prices = DataGrid.make({ id: 'prices', columns: priced })
312
320
  // Edited({ row, column, text }) | Pasted({ accepted, refused }) | Filled({ source, to })
313
- // | UndoRequested | RedoRequested
321
+ // | UndoRequested | RedoRequested | RowsRequested({ from, to })
314
322
  type Out = typeof Prices.Out.Type
315
323
 
316
324
  // In `onOut`: the committed text read back as its column's value, a number here.
@@ -497,6 +505,5 @@ twice keeps its first place.
497
505
  ## Limits
498
506
 
499
507
  - Not built: a drag across regions to pin a column (the view's column
500
- menu pins), a Shift-click row range,
501
- more than one cell range, and a fill handle.
508
+ menu pins), and more than one cell range.
502
509
  - Every row is one height.
package/dist/crud.d.mts CHANGED
@@ -1,7 +1,6 @@
1
- import { l as ColumnSpec, n as RowModel, r as RowStatus, u as Columns } from "./rows-TYJdJ7tK.mjs";
1
+ import { l as ColumnSpec, n as RowModel, r as RowStatus, u as Columns } from "./rows-D8siEVqF.mjs";
2
2
  import { DisplayColumn, DisplayWords } from "foldkit-crud";
3
3
  import { Page, RemoteData } from "foldkit-remote";
4
- //#region src/crud.d.ts
5
4
  /** What a grid adds to a listed member's column: where it stands, its size, and editing. */
6
5
  type ColumnOptions<Row> = Partial<Omit<ColumnSpec<Row, string>, 'value'>>;
7
6
  /**
@@ -27,6 +26,5 @@ export declare const GridCrud: {
27
26
  rows: typeof rows;
28
27
  status: typeof status;
29
28
  };
30
- //#endregion
31
29
  export {};
32
30
  //# sourceMappingURL=crud.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"crud.d.mts","names":[],"sources":["../src/crud.ts"],"mappings":";;;;;KAcK,cAAc,OAAO,QAAQ,KAAK,WAAW;;;;;;;;;cAU5C,UACJ,oBACA,wBAAwB,KAAK,kBAE7B,4BAA4B,KAAK,OAAO,cAAc,SAAM;WAE3C,SAAS,cAAc,cAAc;WAAgB,KAAK;GAAK;WAC5D,QAAQ;WAAuB,UAAU;MAC5D,QAAQ,iBAAiB,KAAK,MAAM,WAAW,eAAe,QAAQ;cA4BnE,OAAQ,KAAG,MAAQ,WAAW,KAAK,OAAK,MAAQ,KAAK,mBAAiB,SAAS;;cAuB/E,SAAU,KAAG,MAAQ,WAAW,KAAK,UAAQ;qBAUtC"}
1
+ {"version":3,"file":"crud.d.mts","names":[],"sources":["../src/crud.ts"],"mappings":";;;;KAcK,cAAc,OAAO,QAAQ,KAAK,WAAW;;;;;;;;;cAU5C,UACJ,oBACA,wBAAwB,KAAK,kBAE7B,4BAA4B,KAAK,OAAO,cAAc,SAAM;WAE3C,SAAS,cAAc,cAAc;WAAgB,KAAK;GAAK;WAC5D,QAAQ;WAAuB,UAAU;MAC5D,QAAQ,iBAAiB,KAAK,MAAM,WAAW,eAAe,QAAQ;cA4BnE,OAAQ,KAAG,MAAQ,WAAW,KAAK,OAAK,MAAQ,KAAK,mBAAiB,SAAS;;cAuB/E,SAAU,KAAG,MAAQ,WAAW,KAAK,UAAQ;qBAUtC"}
package/dist/crud.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { n as RowModel, o as Columns, r as RowStatus, t as RowCount } from "./rows-BFm_vy9f.mjs";
1
+ import { n as RowModel, o as Columns, r as RowStatus, t as RowCount } from "./rows-Dy1HPpGX.mjs";
2
2
  import { Option } from "effect";
3
3
  import { Display } from "foldkit-crud";
4
4
  import { RemoteData } from "foldkit-remote";
5
- //#region src/crud.ts
5
+ // src/crud.ts
6
6
  /**
7
7
  * `foldkit-data-grid/crud` — a grid over a `foldkit-crud` list and the Remote
8
8
  * page it reads. The list says the columns, their labels and how each value
@@ -74,7 +74,6 @@ const GridCrud = {
74
74
  rows,
75
75
  status
76
76
  };
77
- //#endregion
78
77
  export { GridCrud };
79
78
 
80
79
  //# sourceMappingURL=crud.mjs.map
package/dist/index.d.mts CHANGED
@@ -1,10 +1,9 @@
1
- import { a as CellEditor, c as ColumnId, d as EditValue, f as EditableId, i as addressableRows, l as ColumnSpec, n as RowModel, o as Column, r as RowStatus, s as ColumnEdit, t as RowCount, u as Columns } from "./rows-TYJdJ7tK.mjs";
1
+ import { a as CellEditor, c as ColumnId, d as EditValue, f as EditableId, i as addressableRows, l as ColumnSpec, n as RowModel, o as Column, r as RowStatus, s as ColumnEdit, t as RowCount, u as Columns } from "./rows-D8siEVqF.mjs";
2
2
  import { Option, Schema } from "effect";
3
3
  import { Bundle } from "foldkit-bundle";
4
4
  import * as Mount from "foldkit/mount";
5
5
  import { KeyboardModifiers } from "foldkit/html";
6
6
  import { Command } from "foldkit/command";
7
- //#region src/layout.d.ts
8
7
  /**
9
8
  * Where each column stands: the start, center and end regions in display
10
9
  * order, and which columns are hidden. Hiding keeps a column's place, so
@@ -23,8 +22,6 @@ export declare const ColumnLayout: {
23
22
  /** The layout the columns declare: definition order, each in its `pinned` region. */
24
23
  initial: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>>(columns: Columns<Row, Specs>) => ColumnLayout<keyof Specs & string>;
25
24
  };
26
- //#endregion
27
- //#region src/projection.d.ts
28
25
  /** A cell named by identity, so it stays the same cell through a sort or a reorder. */
29
26
  export interface CellAddress<Id extends string> {
30
27
  readonly row: string;
@@ -107,8 +104,6 @@ export declare const GridProjection: {
107
104
  */
108
105
  make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>>(options: ProjectionOptions<Row, Specs>) => GridProjection<Row, keyof Specs & string>;
109
106
  };
110
- //#endregion
111
- //#region src/clipboard.d.ts
112
107
  /** One cell's text in a paste, by identity: what the grid hands the application. */
113
108
  interface CellText<Id extends string> {
114
109
  readonly row: string;
@@ -150,8 +145,6 @@ export declare const Clipboard: {
150
145
  copy: typeof copy;
151
146
  pasteAt: typeof pasteAt;
152
147
  };
153
- //#endregion
154
- //#region src/fill.d.ts
155
148
  /** A fill: the range whose cells are carried on, and the cell it was carried to. */
156
149
  interface FillRequest<Id extends string> {
157
150
  readonly source: {
@@ -196,8 +189,6 @@ export declare const Fill: {
196
189
  plan: typeof plan;
197
190
  cells: typeof cells;
198
191
  };
199
- //#endregion
200
- //#region src/columnState.d.ts
201
192
  type Region = 'start' | 'center' | 'end';
202
193
  /**
203
194
  * Where each column stands and how wide the resized ones are. Widths list only
@@ -246,8 +237,6 @@ declare const make$2: <Row, Specs extends Record<string, ColumnSpec<Row, unknown
246
237
  export declare const ColumnState: {
247
238
  make: typeof make$2;
248
239
  };
249
- //#endregion
250
- //#region src/virtual.d.ts
251
240
  /** The scroll container's offsets and size, in pixels. */
252
241
  interface Viewport {
253
242
  readonly top: number;
@@ -317,8 +306,6 @@ export declare const VirtualGrid: {
317
306
  window: typeof window;
318
307
  reveal: typeof reveal;
319
308
  };
320
- //#endregion
321
- //#region src/grid.d.ts
322
309
  /**
323
310
  * One grid's interaction state: focus, the viewport and the column state, as
324
311
  * one Bundle. Its update is the parts' own, joined: a key that moves focus
@@ -515,6 +502,172 @@ declare const make$1: <Row, Specs extends Record<string, ColumnSpec<Row, unknown
515
502
  readonly error: string;
516
503
  })[];
517
504
  };
505
+ extendRows: (rows: RowModel<Row>, model: {
506
+ readonly focus: {
507
+ readonly current: Option.Option<{
508
+ readonly row: string;
509
+ readonly column: keyof Specs & string;
510
+ }>;
511
+ readonly header: Option.Option<keyof Specs & string>;
512
+ };
513
+ readonly viewport: {
514
+ readonly top: number;
515
+ readonly left: number;
516
+ readonly width: number;
517
+ readonly height: number;
518
+ };
519
+ readonly columns: {
520
+ readonly start: readonly (keyof Specs & string)[];
521
+ readonly center: readonly (keyof Specs & string)[];
522
+ readonly end: readonly (keyof Specs & string)[];
523
+ readonly hidden: readonly (keyof Specs & string)[];
524
+ readonly widths: readonly {
525
+ readonly column: keyof Specs & string;
526
+ readonly width: number;
527
+ }[];
528
+ };
529
+ readonly resizing: Option.Option<{
530
+ readonly column: keyof Specs & string;
531
+ readonly from: number;
532
+ }>;
533
+ readonly dragging: Option.Option<{
534
+ readonly column: keyof Specs & string;
535
+ readonly delta: number;
536
+ }>;
537
+ readonly menu: Option.Option<{
538
+ readonly column: keyof Specs & string;
539
+ readonly active: number;
540
+ }>;
541
+ readonly filling: Option.Option<{
542
+ readonly source: {
543
+ readonly anchor: {
544
+ readonly row: string;
545
+ readonly column: keyof Specs & string;
546
+ };
547
+ readonly focus: {
548
+ readonly row: string;
549
+ readonly column: keyof Specs & string;
550
+ };
551
+ };
552
+ readonly to: {
553
+ readonly row: string;
554
+ readonly column: keyof Specs & string;
555
+ };
556
+ }>;
557
+ readonly selection: {
558
+ readonly rows: {
559
+ readonly _tag: "AllExcept";
560
+ readonly except: readonly string[];
561
+ } | {
562
+ readonly _tag: "Keys";
563
+ readonly keys: readonly string[];
564
+ };
565
+ readonly anchor: Option.Option<string>;
566
+ readonly cells: Option.Option<{
567
+ readonly anchor: {
568
+ readonly row: string;
569
+ readonly column: keyof Specs & string;
570
+ };
571
+ readonly focus: {
572
+ readonly row: string;
573
+ readonly column: keyof Specs & string;
574
+ };
575
+ }>;
576
+ };
577
+ readonly editing: Option.Option<{
578
+ readonly address: {
579
+ readonly row: string;
580
+ readonly column: keyof Specs & string;
581
+ };
582
+ readonly from: string;
583
+ readonly draft: string;
584
+ readonly error: Option.Option<string>;
585
+ }>;
586
+ }, request: {
587
+ readonly from: string;
588
+ readonly to: string;
589
+ }) => {
590
+ readonly focus: {
591
+ readonly current: Option.Option<{
592
+ readonly row: string;
593
+ readonly column: keyof Specs & string;
594
+ }>;
595
+ readonly header: Option.Option<keyof Specs & string>;
596
+ };
597
+ readonly viewport: {
598
+ readonly top: number;
599
+ readonly left: number;
600
+ readonly width: number;
601
+ readonly height: number;
602
+ };
603
+ readonly columns: {
604
+ readonly start: readonly (keyof Specs & string)[];
605
+ readonly center: readonly (keyof Specs & string)[];
606
+ readonly end: readonly (keyof Specs & string)[];
607
+ readonly hidden: readonly (keyof Specs & string)[];
608
+ readonly widths: readonly {
609
+ readonly column: keyof Specs & string;
610
+ readonly width: number;
611
+ }[];
612
+ };
613
+ readonly resizing: Option.Option<{
614
+ readonly column: keyof Specs & string;
615
+ readonly from: number;
616
+ }>;
617
+ readonly dragging: Option.Option<{
618
+ readonly column: keyof Specs & string;
619
+ readonly delta: number;
620
+ }>;
621
+ readonly menu: Option.Option<{
622
+ readonly column: keyof Specs & string;
623
+ readonly active: number;
624
+ }>;
625
+ readonly filling: Option.Option<{
626
+ readonly source: {
627
+ readonly anchor: {
628
+ readonly row: string;
629
+ readonly column: keyof Specs & string;
630
+ };
631
+ readonly focus: {
632
+ readonly row: string;
633
+ readonly column: keyof Specs & string;
634
+ };
635
+ };
636
+ readonly to: {
637
+ readonly row: string;
638
+ readonly column: keyof Specs & string;
639
+ };
640
+ }>;
641
+ readonly selection: {
642
+ readonly rows: {
643
+ readonly _tag: "AllExcept";
644
+ readonly except: readonly string[];
645
+ } | {
646
+ readonly _tag: "Keys";
647
+ readonly keys: readonly string[];
648
+ };
649
+ readonly anchor: Option.Option<string>;
650
+ readonly cells: Option.Option<{
651
+ readonly anchor: {
652
+ readonly row: string;
653
+ readonly column: keyof Specs & string;
654
+ };
655
+ readonly focus: {
656
+ readonly row: string;
657
+ readonly column: keyof Specs & string;
658
+ };
659
+ }>;
660
+ };
661
+ readonly editing: Option.Option<{
662
+ readonly address: {
663
+ readonly row: string;
664
+ readonly column: keyof Specs & string;
665
+ };
666
+ readonly from: string;
667
+ readonly draft: string;
668
+ readonly error: Option.Option<string>;
669
+ }>;
670
+ };
518
671
  draftOf: (projection: GridProjection<Row, keyof Specs & string>, address: {
519
672
  readonly row: string;
520
673
  readonly column: keyof Specs & string;
@@ -561,6 +714,15 @@ declare const make$1: <Row, Specs extends Record<string, ColumnSpec<Row, unknown
561
714
  readonly column: Schema.Literals<readonly (keyof Specs & string)[]>;
562
715
  }>;
563
716
  };
717
+ /**
718
+ * A Shift-click range of rows, from the anchor to the clicked row. Which
719
+ * rows lie between is worked out from the rows by `extendRows`, which the
720
+ * application holds.
721
+ */
722
+ readonly RowsRequested: {
723
+ from: Schema.String;
724
+ to: Schema.String;
725
+ };
564
726
  }>;
565
727
  Model: Schema.Struct<{
566
728
  readonly focus: Schema.Struct<{
@@ -1221,6 +1383,10 @@ declare const make$1: <Row, Specs extends Record<string, ColumnSpec<Row, unknown
1221
1383
  readonly text: string;
1222
1384
  readonly error: string;
1223
1385
  }[];
1386
+ } | {
1387
+ readonly _tag: "RowsRequested";
1388
+ readonly from: string;
1389
+ readonly to: string;
1224
1390
  }, never, never, void, {}, {}>;
1225
1391
  };
1226
1392
  export declare const DataGrid: {
@@ -1228,8 +1394,6 @@ export declare const DataGrid: {
1228
1394
  };
1229
1395
  /** What `DataGrid.make` returns for these columns: the grid a view draws. */
1230
1396
  type DataGridOf<Row, Specs extends Record<string, ColumnSpec<Row, unknown>>> = ReturnType<typeof make$1<Row, Specs>>;
1231
- //#endregion
1232
- //#region src/focus.d.ts
1233
1397
  type Direction = 'ltr' | 'rtl';
1234
1398
  interface KeyOptions<Id extends string> {
1235
1399
  readonly current: Option.Option<CellAddress<Id>>;
@@ -1348,8 +1512,6 @@ export declare const GridFocus: {
1348
1512
  headerId: typeof headerId;
1349
1513
  headerOf: typeof headerOf;
1350
1514
  };
1351
- //#endregion
1352
- //#region src/selection.d.ts
1353
1515
  /**
1354
1516
  * Which rows are selected. `Keys` names them; `AllExcept` is every row but
1355
1517
  * these, so select-all holds whatever the rows are, loaded or not, and
@@ -1409,8 +1571,6 @@ export declare const GridSelection: {
1409
1571
  boxOf: typeof boxOf;
1410
1572
  extend: typeof extend;
1411
1573
  };
1412
- //#endregion
1413
- //#region src/viewport.d.ts
1414
1574
  declare const Message: import("foldkit/message").MessageUnion<{
1415
1575
  /** The scroll container moved or changed size; the Mount reports it. */
1416
1576
  readonly Measured: {
@@ -1478,6 +1638,5 @@ export declare const GridViewport: {
1478
1638
  }>;
1479
1639
  scrollTo: typeof scrollTo;
1480
1640
  };
1481
- //#endregion
1482
1641
  export { type AxisWindow, type CellBox, CellEditor, type CellOffset, type CellPosition, type CellRange, type CellText, type Column, type ColumnEdit, type ColumnId, type ColumnSpec, Columns, type DataGridOf, type Direction, type EditableId, type ExtendOptions, type FillPlan, type FillRequest, type Geometry, type GridWindow, type KeyOptions, type PastedCell, type ProjectionOptions, type Region, type Restored, type RevealOptions, RowCount, RowModel, RowStatus, type Viewport, type WindowOptions, addressableRows };
1483
1642
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":["make","make","_$__columnState_js0.Region","_$__columnState_js0.Restored"],"sources":["../src/layout.ts","../src/projection.ts","../src/clipboard.ts","../src/fill.ts","../src/columnState.ts","../src/virtual.ts","../src/grid.ts","../src/focus.ts","../src/selection.ts","../src/viewport.ts"],"mappings":";;;;;;;;;;;;;iBAQiB,aAAa;;WAEnB,OAAO,cAAc;WACrB,QAAQ,cAAc;;WAEtB,KAAK,cAAc;WACnB,QAAQ,cAAc;;qBAGpB;;EAEX,UAAU,KAAK,cAAc,eAAe,WAAW,gBAAc,SA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,"file":"index.d.mts","names":["make","make","_$__columnState_js0.Region","_$__columnState_js0.Restored"],"sources":["../src/layout.ts","../src/projection.ts","../src/clipboard.ts","../src/fill.ts","../src/columnState.ts","../src/virtual.ts","../src/grid.ts","../src/focus.ts","../src/selection.ts","../src/viewport.ts"],"mappings":";;;;;;;;;;;;iBAQiB,aAAa;;WAEnB,OAAO,cAAc;WACrB,QAAQ,cAAc;;WAEtB,KAAK,cAAc;WACnB,QAAQ,cAAc;;qBAGpB;;EAEX,UAAU,KAAK,cAAc,eAAe,WAAW,gBAAc,SAC1D,QAAQ,KAAK,WACrB,mBAAmB;;;iBCfP,YAAY;WAClB;WACA,QAAQ;;qBAGN;;;;;;EAMX,SAAS,KAAK,cAAc,eAAe,WAAW,gBAAc,SACzD,QAAQ,KAAK,WAAM,OAAA;;;;;;UAKf;WACN;WACA;;;UAIM,QAAQ;WACd;aAAiB;aAAwB;;WACzC,SAAS,cAAc;;UAGjB;WACN;WACA;;;;;;;;;;;;iBAaM,eAAe,KAAK;WAC1B,MAAM,SAAS;WACf,UAAU;;WAEV,SAAS,cAAc;;WAEvB,OAAO,cAAc;WACrB,QAAQ,cAAc;WACtB,KAAK,cAAc;EAC5B,YAAY,IAAI,KAAK,OAAO;EAC5B,SAAS,cAAc,OAAO;EAC9B,OAAO,UAAU,eAAe,OAAO,OAAO,YAAY;EAC1D,WAAW,SAAS,YAAY,MAAM,OAAO,OAAO;;;;;EAKpD,OAAO,SAAS,YAAY,KAAK,QAAQ,aAAa,OAAO,OAAO,YAAY;EAChF,SAAS,SAAS,YAAY,MAAM,OAAO,OAAO,YAAY;EAC9D,OAAO,SAAS,YAAY,MAAM,OAAO,OAAO,YAAY;EAC5D,SAAS,OAAO,OAAO,YAAY;EACnC,QAAQ,OAAO,OAAO,YAAY;;EAElC,IAAI,QAAQ,YAAY,KAAK,OAAO,YAAY,MAAM,OAAO,OAAO,QAAQ;;UAG7D,kBAAkB,KAAK,cAAc,eAAe,WAAW;WACrE,MAAM,S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AU,QAChB,OAAO,OAAO,QAAQ;UAER,cAAc;WACpB,OAAO,OAAO,OAAO,UAAU;;WAE/B,SAAS,OAAO,OAAO,YAAY;WACnC;WACA,WAAW;WACX;WACA,YAAY;;;;;;;;;;cAsCjB,SAAU,KAAK,mBAAiB,YACxB,eAAe,KAAK,KAAG,SAC1B,cAAc,QACtB,OAAO,OAAO,UAAU;qBAkBd;;;;;;;;;;;;cClJP,mCAAO;;;IAGT,KAAG,OAAA;IACH,MAAI,OAAA;IACJ,OAAK,OAAA;IACL,QAAM,OAAA;;;;IAGI,KAAG,OAAA;IAAiB,MAAI,OAAA;;;KAEjC,iBAAiB,QAAQ;;;;;;cA+FxB,WAAQ,oBACM,SACT,KAAK,8BACb,QAAQ;qBAaE;;;;;;;;;;MAvHT,KAAG,OAAA;MACH,MAAI,OAAA;MACJ,OAAK,OAAA;MACL,QAAM,OAAA;;;;MAGI,KAAG,OAAA;MAAiB,MAAI,OAAA"}
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import { a as CellEditor, i as addressableRows, n as RowModel, o as Columns, r as RowStatus, s as editorOf, t as RowCount } from "./rows-BFm_vy9f.mjs";
1
+ import { a as CellEditor, i as addressableRows, n as RowModel, o as Columns, r as RowStatus, s as editorOf, t as RowCount } from "./rows-Dy1HPpGX.mjs";
2
2
  import { Effect, Equal, Option, Queue, Result, Schema, Stream } from "effect";
3
3
  import { defineTaggedUnion } from "foldkit/schema";
4
4
  import { defineMessageUnion } from "foldkit/message";
5
5
  import { modifyFields } from "foldkit/struct";
6
6
  import { Bundle } from "foldkit-bundle";
7
7
  import * as Mount from "foldkit/mount";
8
- //#region src/clipboard.ts
8
+ // src/clipboard.ts
9
9
  const needsQuotes = /[\t\n\r"]/;
10
10
  const quote = (cell) => needsQuotes.test(cell) ? `"${cell.replaceAll("\"", "\"\"")}"` : cell;
11
11
  /** Rows of cells as tab-separated text, the form spreadsheets copy and paste. */
@@ -110,8 +110,7 @@ const Clipboard = {
110
110
  copy,
111
111
  pasteAt
112
112
  };
113
- //#endregion
114
- //#region src/fill.ts
113
+ // src/fill.ts
115
114
  const number = /^-?\d+(?:\.(\d+))?$/;
116
115
  /**
117
116
  * The texts that carry `source` on for `count` cells, the first of them next
@@ -220,8 +219,7 @@ const Fill = {
220
219
  plan,
221
220
  cells
222
221
  };
223
- //#endregion
224
- //#region src/layout.ts
222
+ // src/layout.ts
225
223
  const ColumnLayout = {
226
224
  /** The layout the columns declare: definition order, each in its `pinned` region. */
227
225
  initial: (columns) => {
@@ -245,8 +243,7 @@ initial: (columns) => {
245
243
  hidden
246
244
  };
247
245
  } };
248
- //#endregion
249
- //#region src/columnState.ts
246
+ // src/columnState.ts
250
247
  const regions = [
251
248
  "start",
252
249
  "center",
@@ -441,8 +438,7 @@ const make$2 = (columns) => {
441
438
  };
442
439
  };
443
440
  const ColumnState = { make: make$2 };
444
- //#endregion
445
- //#region src/projection.ts
441
+ // src/projection.ts
446
442
  const CellAddress = {
447
443
  /**
448
444
  * An address as stored or sent: the row key as text, and the column as one
@@ -539,8 +535,7 @@ make: (options) => {
539
535
  })))
540
536
  };
541
537
  } };
542
- //#endregion
543
- //#region src/focus.ts
538
+ // src/focus.ts
544
539
  const sameAddress = (a, b) => a.row === b.row && a.column === b.column;
545
540
  /**
546
541
  * The cell that holds the grid's one tab stop: the focused cell while it is
@@ -682,8 +677,7 @@ const GridFocus = {
682
677
  headerId,
683
678
  headerOf
684
679
  };
685
- //#endregion
686
- //#region src/selection.ts
680
+ // src/selection.ts
687
681
  /**
688
682
  * Which rows are selected. `Keys` names them; `AllExcept` is every row but
689
683
  * these, so select-all holds whatever the rows are, loaded or not, and
@@ -815,8 +809,7 @@ const GridSelection = {
815
809
  boxOf,
816
810
  extend
817
811
  };
818
- //#endregion
819
- //#region src/viewport.ts
812
+ // src/viewport.ts
820
813
  const Model = Schema.Struct({
821
814
  top: Schema.Number,
822
815
  left: Schema.Number,
@@ -924,8 +917,7 @@ const GridViewport = {
924
917
  Measure,
925
918
  scrollTo
926
919
  };
927
- //#endregion
928
- //#region src/virtual.ts
920
+ // src/virtual.ts
929
921
  const sum = (values) => values.reduce((total, value) => total + value, 0);
930
922
  /** `edges[i]` is where center column `i` begins; `edges[count]` is the center's width. */
931
923
  const edgesOf = (ids, width) => {
@@ -1032,8 +1024,7 @@ const VirtualGrid = {
1032
1024
  window,
1033
1025
  reveal
1034
1026
  };
1035
- //#endregion
1036
- //#region src/grid.ts
1027
+ // src/grid.ts
1037
1028
  const Offsets = Schema.Struct({
1038
1029
  top: Schema.Number,
1039
1030
  left: Schema.Number
@@ -1332,7 +1323,16 @@ const make = (options) => {
1332
1323
  * A fill: carry `source` on to `to`. What it writes is worked out from the
1333
1324
  * rows by `fill`, which the application holds.
1334
1325
  */
1335
- Filled: FillRequest.fields
1326
+ Filled: FillRequest.fields,
1327
+ /**
1328
+ * A Shift-click range of rows, from the anchor to the clicked row. Which
1329
+ * rows lie between is worked out from the rows by `extendRows`, which the
1330
+ * application holds.
1331
+ */
1332
+ RowsRequested: {
1333
+ from: Schema.String,
1334
+ to: Schema.String
1335
+ }
1336
1336
  });
1337
1337
  const focusTo = (model, address) => {
1338
1338
  const next = focus.bundle.update(model.focus, focus.Message.Focused({ address }), void 0).model;
@@ -1366,6 +1366,19 @@ const make = (options) => {
1366
1366
  }) };
1367
1367
  }
1368
1368
  const focused = clearCells(focusTo(model, address));
1369
+ if (shiftKey && options.rowSelection === "multiple") {
1370
+ const from = Option.getOrElse(Option.orElse(model.selection.anchor, () => Option.map(model.focus.current, (current) => current.row)), () => address.row);
1371
+ return {
1372
+ model: Option.isSome(focused.selection.anchor) ? focused : selectionBy(focused, {
1373
+ ...focused.selection,
1374
+ anchor: Option.some(from)
1375
+ }),
1376
+ outMessage: Out.RowsRequested({
1377
+ from,
1378
+ to: address.row
1379
+ })
1380
+ };
1381
+ }
1369
1382
  if (toggleKey && options.rowSelection !== void 0) return { model: selectionBy(focused, choose(focused.selection, address.row)) };
1370
1383
  return { model: focused };
1371
1384
  };
@@ -1906,6 +1919,14 @@ const make = (options) => {
1906
1919
  }))
1907
1920
  });
1908
1921
  };
1922
+ /**
1923
+ * The grid's Model with an `Out.RowsRequested` range added to its row
1924
+ * selection, over `rows` as they are now.
1925
+ */
1926
+ const extendRows = (rows, model, request) => bundle.update(model, Message.RowsExtended({
1927
+ rows: GridSelection.rowsBetween(project(rows, model.columns), request.from, request.to),
1928
+ to: request.to
1929
+ }), void 0).model;
1909
1930
  /** The grid as presented: the rows through the column state in the Model. */
1910
1931
  const project = (rows, state) => {
1911
1932
  const cached = projections.get(rows);
@@ -1947,6 +1968,7 @@ const make = (options) => {
1947
1968
  project,
1948
1969
  window,
1949
1970
  fill,
1971
+ extendRows,
1950
1972
  draftOf,
1951
1973
  Out,
1952
1974
  Model,
@@ -1955,7 +1977,6 @@ const make = (options) => {
1955
1977
  };
1956
1978
  };
1957
1979
  const DataGrid = { make };
1958
- //#endregion
1959
1980
  export { CellAddress, CellEditor, Clipboard, ColumnLayout, ColumnState, Columns, DataGrid, Fill, GridFocus, GridProjection, GridSelection, GridViewport, RowCount, RowModel, RowSelection, RowStatus, VirtualGrid, addressableRows };
1960
1981
 
1961
1982
  //# sourceMappingURL=index.mjs.map