@ishibashi0112/spreadsheet-grid-solid 1.11.0 → 1.13.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.
@@ -36,6 +36,11 @@ import { For as For5, Match, NoHydration, Show as Show12, Switch, createEffect a
36
36
  import { isServer } from "@solidjs/web";
37
37
  import { createGridEngine } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/createGridEngine";
38
38
  import { gridActions } from "@ishibashi0112/spreadsheet-grid-core/internal/model/gridActions";
39
+ import {
40
+ resolveChangeNavOrigin,
41
+ resolveRowOffRemovedRow,
42
+ shouldClearChangeNavMark
43
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/changeNavigation";
39
44
  import { isCopiedRangeCurrent } from "@ishibashi0112/spreadsheet-grid-core/internal/model/gridStore";
40
45
  import {
41
46
  resolveExcelShortcuts as resolveExcelShortcuts2,
@@ -51,8 +56,10 @@ import { ROW_DRAG_HANDLE_COLUMN_KEY as ROW_DRAG_HANDLE_COLUMN_KEY2, moveArrayIte
51
56
  import {
52
57
  resolveSelectionBand,
53
58
  resolveSelectionBandSegments,
54
- resolveSelectionExtents
59
+ resolveSelectionExtents,
60
+ resolveRowRunsPaneRects
55
61
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectionOverlayGeometry";
62
+ import { findScopeRowRuns } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/findController";
56
63
  import {
57
64
  isActiveCellRendered,
58
65
  placementRectInPane,
@@ -751,6 +758,8 @@ var markReusedRow = (element) => {
751
758
  };
752
759
 
753
760
  // src/view/GridBodyLayer.tsx
761
+ var IGNORE_POINTER = () => {
762
+ };
754
763
  var sameTreeRow = (a, b) => a === b || a !== void 0 && b !== void 0 && a.level === b.level && a.hasChildren === b.hasChildren && a.open === b.open && a.posInSet === b.posInSet && a.setSize === b.setSize && a.matched === b.matched && a.aggregates === b.aggregates;
755
764
  var sameUnsavedTexts = (a, b) => {
756
765
  if (a === b) {
@@ -769,6 +778,7 @@ var sameUnsavedTexts = (a, b) => {
769
778
  var NO_SELECTED_COLUMNS = [-1, -1];
770
779
  var EMPTY_SLOT = resolveSlotProps(void 0);
771
780
  var NO_VALUE = () => null;
781
+ var joinMarks = (first, second) => first === null ? second : second === null ? first : () => [first(), second()];
772
782
  var NO_SLOT = () => EMPTY_SLOT;
773
783
  var NO_FALSE = () => false;
774
784
  var EMPTY_NEW_ROW = /* @__PURE__ */ Object.freeze({});
@@ -832,6 +842,7 @@ function GridBodyLayer(props) {
832
842
  }
833
843
  );
834
844
  const trackingOn = createMemo5(() => props.unsavedTracking !== void 0);
845
+ const originalOn = createMemo5(() => props.unsavedTracking?.describeOriginal !== void 0);
835
846
  const treeKey = createMemo5(() => props.treeColumnKey);
836
847
  return <For2 each={slotted().state.items} keyed={(item) => item.slot}>
837
848
  {(item) => {
@@ -861,7 +872,10 @@ function GridBodyLayer(props) {
861
872
  const isEntry = untrack3(() => item().newRow === true);
862
873
  const newRowState = isEntry ? createMemo5(() => props.newRowDraft?.draft !== void 0 ? "draft" : "empty") : void 0;
863
874
  const newRowBlank = newRowState ? () => newRowState() === "empty" : NO_FALSE;
864
- const row = isEntry ? () => props.newRowLayer ? props.newRowDraft?.draft ?? EMPTY_NEW_ROW : void 0 : () => props.rowModel.getRow(rowIndex());
875
+ const isRemoved = untrack3(
876
+ () => !isEntry && props.removedRowLayer !== void 0 && props.rowModel.getRemovedRow?.(item().index) !== void 0
877
+ );
878
+ const row = isEntry ? () => props.newRowLayer ? props.newRowDraft?.draft ?? EMPTY_NEW_ROW : void 0 : isRemoved ? () => props.rowModel.getRemovedRow?.(rowIndex()) : () => props.rowModel.getRow(rowIndex());
865
879
  const groupRow = createMemo5(() => props.grouping ? props.rowModel.getGroupRow?.(rowIndex()) : void 0);
866
880
  const labelRow = createMemo5(
867
881
  () => props.labelRowLayer ? props.rowModel.getLabelRow?.(rowIndex()) : void 0
@@ -927,7 +941,7 @@ function GridBodyLayer(props) {
927
941
  return props.rowModel.getRowKey(rowIndex()) ?? rowIndex();
928
942
  });
929
943
  let rowElement;
930
- if (!isEntry) {
944
+ if (!isEntry && !isRemoved) {
931
945
  createRenderEffect(
932
946
  rowKey,
933
947
  (_next, previous) => {
@@ -938,16 +952,19 @@ function GridBodyLayer(props) {
938
952
  { name: "reusedRow" }
939
953
  );
940
954
  }
941
- const sourceRowIndex = isEntry ? () => -1 : createMemo5(() => props.rowModel.getSourceIndex(rowIndex()) ?? rowIndex());
955
+ const sourceRowIndex = isEntry || isRemoved ? () => -1 : createMemo5(() => props.rowModel.getSourceIndex(rowIndex()) ?? rowIndex());
942
956
  const rowSize = createMemo5(() => item().size ?? props.rowHeight);
943
957
  const isRowChecked = createMemo5(
944
- () => props.enableRowSelection && !isEntry ? resolveIsRowSelected(props.rowSelectionState, rowKey()) : false
958
+ () => props.enableRowSelection && !isEntry && !isRemoved ? resolveIsRowSelected(props.rowSelectionState, rowKey()) : false
945
959
  );
946
960
  const isRowSelected = createMemo5(
947
- () => !isEntry && props.selection.kind === "row" && rowIndex() >= props.selection.startRow && rowIndex() <= props.selection.endRow
961
+ () => !isEntry && !isRemoved && props.selection.kind === "row" && rowIndex() >= props.selection.startRow && rowIndex() <= props.selection.endRow
948
962
  );
949
963
  const selectedColRange = createMemo5(() => {
950
964
  const selection = props.selection;
965
+ if (isRemoved) {
966
+ return NO_SELECTED_COLUMNS;
967
+ }
951
968
  if (selection.kind === "col" && !isEntry) {
952
969
  return [selection.startCol, selection.endCol];
953
970
  }
@@ -958,7 +975,9 @@ function GridBodyLayer(props) {
958
975
  });
959
976
  const selectedColStart = () => selectedColRange()[0];
960
977
  const selectedColEnd = () => selectedColRange()[1];
961
- const activeCol = createMemo5(() => props.activeCell?.row === rowIndex() ? props.activeCell.col : -1);
978
+ const activeCol = createMemo5(
979
+ () => !isRemoved && props.activeCell?.row === rowIndex() ? props.activeCell.col : -1
980
+ );
962
981
  const rowFindHits = createMemo5(() => props.findIndex.get(rowIndex()));
963
982
  const rowFindCurrent = createMemo5(() => {
964
983
  const hits = rowFindHits();
@@ -973,11 +992,13 @@ function GridBodyLayer(props) {
973
992
  }
974
993
  return null;
975
994
  });
976
- const editingCol = createMemo5(() => props.editingCell?.row === rowIndex() ? props.editingCell.col : -1);
995
+ const editingCol = createMemo5(
996
+ () => !isRemoved && props.editingCell?.row === rowIndex() ? props.editingCell.col : -1
997
+ );
977
998
  const rowAutoHeight = createMemo5(() => !!props.autoHeight);
978
- const isHovered = createMemo5(() => props.hoveredRowIndex === rowIndex());
999
+ const isHovered = createMemo5(() => !isRemoved && props.hoveredRowIndex === rowIndex());
979
1000
  const rowSlot = createMemo5(
980
- () => newRowBlank() ? EMPTY_SLOT : resolveSlotProps(
1001
+ () => newRowBlank() || isRemoved ? EMPTY_SLOT : resolveSlotProps(
981
1002
  props.getRowClassName?.(currentRow(), rowIndex(), {
982
1003
  row: currentRow(),
983
1004
  rowIndex: rowIndex(),
@@ -988,7 +1009,7 @@ function GridBodyLayer(props) {
988
1009
  )
989
1010
  );
990
1011
  const rowNumber = () => props.labelViewIndexes ? resolveDataRowNumber(props.labelViewIndexes, rowIndex()) : rowIndex() + 1;
991
- const rowTracking = isEntry ? NO_FALSE : trackingOn;
1012
+ const rowTracking = isEntry || isRemoved ? NO_FALSE : trackingOn;
992
1013
  const rowUnsavedTexts = createMemoWhen(
993
1014
  rowTracking,
994
1015
  () => {
@@ -1011,6 +1032,28 @@ function GridBodyLayer(props) {
1011
1032
  sameUnsavedTexts
1012
1033
  );
1013
1034
  const rowUnsaved = () => rowUnsavedTexts() !== void 0;
1035
+ const rowOriginalTexts = createMemoWhen(
1036
+ () => rowTracking() && originalOn(),
1037
+ () => {
1038
+ const marks = props.unsavedTracking;
1039
+ const describeOriginal = marks?.describeOriginal;
1040
+ const saved = marks?.getUnsavedCells(rowKey());
1041
+ if (!marks || !describeOriginal || !saved) {
1042
+ return void 0;
1043
+ }
1044
+ const current = currentRow();
1045
+ let texts2;
1046
+ for (const [columnKey, savedValue] of saved) {
1047
+ const trackedColumn = marks.trackedColumns.get(columnKey);
1048
+ if (trackedColumn && !Object.is(getCellValue(current, trackedColumn), savedValue)) {
1049
+ (texts2 ??= /* @__PURE__ */ new Map()).set(columnKey, describeOriginal(trackedColumn, current, savedValue));
1050
+ }
1051
+ }
1052
+ return texts2;
1053
+ },
1054
+ void 0,
1055
+ sameUnsavedTexts
1056
+ );
1014
1057
  const closedTreeUnsaved = () => props.closedTreeUnsaved?.has(rowKey()) === true;
1015
1058
  const rowAdded = () => props.unsavedTracking?.isAddedRow?.(rowKey()) === true;
1016
1059
  const rowHeaderDescription = () => {
@@ -1022,13 +1065,28 @@ function GridBodyLayer(props) {
1022
1065
  return parts.length === 0 ? void 0 : parts.join(" / ");
1023
1066
  };
1024
1067
  const treeRow = createMemoWhen(
1025
- () => !isEntry && props.treeColumnKey !== void 0,
1068
+ () => !isEntry && !isRemoved && props.treeColumnKey !== void 0,
1026
1069
  () => props.rowModel.getTreeRow?.(rowIndex()),
1027
1070
  void 0,
1028
1071
  sameTreeRow
1029
1072
  );
1030
1073
  const unsavedTextOf = (columnKey) => untrack3(rowTracking) ? () => rowUnsavedTexts()?.get(columnKey) ?? null : NO_VALUE;
1031
1074
  const unsavedMarkOf = (unsavedText) => untrack3(rowTracking) ? () => unsavedText() !== null ? <span class="ssg-unsaved-mark" aria-hidden="true" /> : null : null;
1075
+ const originalTextOf = (columnKey) => untrack3(rowTracking) && untrack3(originalOn) ? () => rowOriginalTexts()?.get(columnKey) ?? null : NO_VALUE;
1076
+ const originalMarkOf = (originalText) => untrack3(rowTracking) && untrack3(originalOn) ? () => {
1077
+ const text = originalText();
1078
+ return text !== null ? <s class="ssg-diff-original" aria-hidden="true">
1079
+ {text}
1080
+ </s> : null;
1081
+ } : null;
1082
+ const describeCell = (text, active) => {
1083
+ const decoration = active ? props.activeCellDecorationText : void 0;
1084
+ if (decoration === void 0) {
1085
+ return text ?? void 0;
1086
+ }
1087
+ return text === null ? decoration : `${text}
1088
+ ${decoration}`;
1089
+ };
1032
1090
  const textCellBase = createMemo5(() => {
1033
1091
  const slot = rowSlot();
1034
1092
  const bodyCell = cellEnv().bodyCellSlot;
@@ -1060,12 +1118,14 @@ function GridBodyLayer(props) {
1060
1118
  const cell = () => ({ row: rowIndex(), col: colIndex() });
1061
1119
  const unsavedText = unsavedTextOf(untrack3(unbound).key);
1062
1120
  const unsavedMark = unsavedMarkOf(unsavedText);
1121
+ const originalText = originalTextOf(untrack3(unbound).key);
1122
+ const trailingMark = joinMarks(originalMarkOf(originalText), unsavedMark);
1063
1123
  return <div
1064
1124
  role="gridcell"
1065
1125
  aria-colindex={colIndex() + 2}
1066
1126
  aria-selected={isSelected() ? "true" : "false"}
1067
1127
  aria-readonly={readOnlyCell() ? "true" : void 0}
1068
- aria-description={unsavedText() ?? void 0}
1128
+ aria-description={describeCell(unsavedText(), isActive())}
1069
1129
  id={isActive() ? props.activeCellDomId : void 0}
1070
1130
  aria-owns={editingCol() === colIndex() ? props.cellEditorDomId : void 0}
1071
1131
  data-ssg-col-key={column().key}
@@ -1078,6 +1138,7 @@ function GridBodyLayer(props) {
1078
1138
  alignTop() && "ssg-body-cell--valign-top",
1079
1139
  readOnlyCell() && !isSelected() && "ssg-body-cell--readonly",
1080
1140
  unsavedText() !== null && "ssg-body-cell--unsaved",
1141
+ originalText() !== null && "ssg-body-cell--with-original",
1081
1142
  isHovered() && "ssg-body-cell--row-hovered"
1082
1143
  )}
1083
1144
  onPointerDown={(event) => props.onCellPointerDown(cell(), event)}
@@ -1099,18 +1160,19 @@ function GridBodyLayer(props) {
1099
1160
  <span class="ssg-cell-value">
1100
1161
  {props.cellText(currentRow(), column(), findRanges(), rowFindCurrent)}
1101
1162
  </span>
1102
- {unsavedMark}
1163
+ {trailingMark}
1103
1164
  </div>;
1104
1165
  };
1105
1166
  const cells = () => <For2 each={props.entries} keyed={cellKey}>
1106
1167
  {(entry) => {
1107
1168
  const shape = untrack3(() => cellShapeOf(entry().column));
1108
- if (shape === "text" && !isEntry) {
1169
+ if (shape === "text" && !isEntry && !isRemoved) {
1109
1170
  return renderTextCell(entry);
1110
1171
  }
1111
1172
  const plain = shape !== "decorated";
1112
1173
  const newRowSynthetic = isEntry && untrack3(() => isSyntheticColumnKey2(entry().column.key));
1113
- const decorOff = newRowSynthetic ? () => true : newRowBlank;
1174
+ const removedSynthetic = isRemoved && untrack3(() => isSyntheticColumnKey2(entry().column.key));
1175
+ const decorOff = newRowSynthetic || isRemoved ? () => true : newRowBlank;
1114
1176
  const unbound = createMemo5(() => entry().column);
1115
1177
  const column = () => unbound();
1116
1178
  const colIndex = createMemo5(() => entry().logicalIndex);
@@ -1119,6 +1181,9 @@ function GridBodyLayer(props) {
1119
1181
  const isEditing = () => editingCol() === colIndex();
1120
1182
  const isSelected = () => isRowSelected() || selectedColStart() >= 0 && colIndex() >= selectedColStart() && colIndex() <= selectedColEnd();
1121
1183
  const readOnlyCell = () => {
1184
+ if (isRemoved) {
1185
+ return true;
1186
+ }
1122
1187
  const env = editPermission();
1123
1188
  return !isColumnEditable(env.readOnly, unbound()) || env.canEditCell !== void 0 && !newRowBlank() && !isCellEditable(env, rowIndex(), colIndex(), currentRow(), unbound(), {
1124
1189
  sourceRowIndex: sourceRowIndex(),
@@ -1194,7 +1259,7 @@ function GridBodyLayer(props) {
1194
1259
  }),
1195
1260
  null
1196
1261
  );
1197
- const conditionalCell = plain || newRowSynthetic ? NO_SLOT : createMemoWhen(
1262
+ const conditionalCell = plain || newRowSynthetic || removedSynthetic ? NO_SLOT : createMemoWhen(
1198
1263
  () => column().cellClassName !== void 0,
1199
1264
  () => {
1200
1265
  const cellClassName = column().cellClassName;
@@ -1249,6 +1314,8 @@ function GridBodyLayer(props) {
1249
1314
  );
1250
1315
  const unsavedText = unsavedTextOf(untrack3(unbound).key);
1251
1316
  const unsavedMark = unsavedMarkOf(unsavedText);
1317
+ const originalText = originalTextOf(untrack3(unbound).key);
1318
+ const trailingMark = joinMarks(originalMarkOf(originalText), unsavedMark);
1252
1319
  const tooltipText = () => resolveCellTooltipText(invalidMessage(), cellNote(), unsavedText());
1253
1320
  const autoHeightFlags = createMemoWhen(
1254
1321
  rowAutoHeight,
@@ -1268,7 +1335,11 @@ function GridBodyLayer(props) {
1268
1335
  });
1269
1336
  const cell = () => ({ row: rowIndex(), col: colIndex() });
1270
1337
  const keyedContent = untrack3(() => entry().column.renderCell !== void 0);
1271
- const cellChildren = plain ? () => props.renderCellContent(currentRow, column(), cellState) : () => <>
1338
+ const contentColumn = isRemoved ? createMemo5(() => {
1339
+ const current = column();
1340
+ return current.renderCell || current.conditionalFormat ? { ...current, renderCell: void 0, conditionalFormat: void 0 } : current;
1341
+ }) : column;
1342
+ const cellChildren = plain ? () => props.renderCellContent(currentRow, contentColumn(), cellState) : () => <>
1272
1343
  <Show2 when={dataBar()}>
1273
1344
  {(bar) => <span
1274
1345
  class={["ssg-cf-bar", { "ssg-cf-bar--negative": bar().negative }]}
@@ -1282,10 +1353,10 @@ function GridBodyLayer(props) {
1282
1353
  </Show2>
1283
1354
  <Show2
1284
1355
  when={isAutoHeightCell()}
1285
- fallback={props.renderCellContent(currentRow, column(), cellState)}
1356
+ fallback={props.renderCellContent(currentRow, contentColumn(), cellState)}
1286
1357
  >
1287
1358
  <div class="ssg-autoheight-content" data-autoheight-content="">
1288
- {props.renderCellContent(currentRow, column(), cellState)}
1359
+ {props.renderCellContent(currentRow, contentColumn(), cellState)}
1289
1360
  </div>
1290
1361
  </Show2>
1291
1362
  </>;
@@ -1293,14 +1364,14 @@ function GridBodyLayer(props) {
1293
1364
  rowKey();
1294
1365
  return cellChildren();
1295
1366
  } : cellChildren;
1296
- const cellContent = !isEntry ? dataContent : newRowSynthetic ? NO_VALUE : () => newRowBlank() ? renderNewRowPlaceholder(isEditing() ? null : props.newRowLayer?.placeholder(column()) ?? null) : dataContent();
1367
+ const cellContent = removedSynthetic ? NO_VALUE : !isEntry ? dataContent : newRowSynthetic ? NO_VALUE : () => newRowBlank() ? renderNewRowPlaceholder(isEditing() ? null : props.newRowLayer?.placeholder(column()) ?? null) : dataContent();
1297
1368
  return <div
1298
1369
  role="gridcell"
1299
1370
  aria-colindex={colIndex() + 2}
1300
1371
  aria-selected={isSelected() ? "true" : "false"}
1301
1372
  aria-readonly={readOnlyCell() ? "true" : void 0}
1302
1373
  aria-invalid={invalidMessage() !== null ? "true" : void 0}
1303
- aria-description={tooltipText() ?? void 0}
1374
+ aria-description={describeCell(tooltipText(), isActive())}
1304
1375
  id={isActive() ? props.activeCellDomId : void 0}
1305
1376
  aria-owns={isEditing() ? props.cellEditorDomId : void 0}
1306
1377
  data-ssg-col-key={column().key}
@@ -1326,17 +1397,21 @@ function GridBodyLayer(props) {
1326
1397
  invalidMessage() !== null && "ssg-body-cell--invalid",
1327
1398
  cellNote() !== null && "ssg-body-cell--has-note",
1328
1399
  unsavedText() !== null && "ssg-body-cell--unsaved",
1400
+ originalText() !== null && "ssg-body-cell--with-original",
1329
1401
  isHovered() && "ssg-body-cell--row-hovered"
1330
1402
  )}
1331
1403
  onPointerDown={(event) => {
1404
+ if (isRemoved) {
1405
+ return;
1406
+ }
1332
1407
  if (event.target instanceof Element && event.target.closest(".ssg-detail-toggle, .ssg-tree-toggle")) {
1333
1408
  return;
1334
1409
  }
1335
1410
  props.onCellPointerDown(cell(), event);
1336
1411
  }}
1337
- onPointerEnter={(event) => props.onCellPointerEnter(cell(), event)}
1338
- onClick={(event) => props.onCellClick(cell(), event)}
1339
- onDblClick={(event) => props.onCellDoubleClick(cell(), event)}
1412
+ onPointerEnter={isRemoved ? IGNORE_POINTER : (event) => props.onCellPointerEnter(cell(), event)}
1413
+ onClick={isRemoved ? IGNORE_POINTER : (event) => props.onCellClick(cell(), event)}
1414
+ onDblClick={isRemoved ? IGNORE_POINTER : (event) => props.onCellDoubleClick(cell(), event)}
1340
1415
  ref={markClickTarget}
1341
1416
  style={{
1342
1417
  ...cellEnv().bodyCellSlot?.style,
@@ -1353,12 +1428,13 @@ function GridBodyLayer(props) {
1353
1428
  }}
1354
1429
  >
1355
1430
  {cellContent()}
1356
- {unsavedMark}
1431
+ {trailingMark}
1357
1432
  </div>;
1358
1433
  }}
1359
1434
  </For2>;
1360
1435
  const switchedCells = createMemo5(() => {
1361
1436
  trackingOn();
1437
+ originalOn();
1362
1438
  treeKey();
1363
1439
  return untrack3(cells);
1364
1440
  });
@@ -1370,7 +1446,7 @@ function GridBodyLayer(props) {
1370
1446
  data-row-index={rowIndex()}
1371
1447
  role="row"
1372
1448
  aria-rowindex={rowIndex() + 2 + props.ariaRowOffset}
1373
- aria-selected={props.enableRowSelection && !isEntry ? isRowChecked() ? "true" : "false" : void 0}
1449
+ aria-selected={props.enableRowSelection && !isEntry && !isRemoved ? isRowChecked() ? "true" : "false" : void 0}
1374
1450
  data-row-key={String(rowKey())}
1375
1451
  data-ssg-new-row={newRowState?.()}
1376
1452
  aria-level={treeRow() !== void 0 ? treeRow().level + 1 : void 0}
@@ -1388,7 +1464,10 @@ function GridBodyLayer(props) {
1388
1464
  rowAdded() && "ssg-body-row--added",
1389
1465
  treeRow()?.matched === false && "ssg-body-row--tree-unmatched",
1390
1466
  // 追加(1.10.0): 入力行(公開の契約。状態は data-ssg-new-row)。
1391
- isEntry && "ssg-body-row--new"
1467
+ isEntry && "ssg-body-row--new",
1468
+ // 追加(1.13.0 / 差分の表示): 削除の行と、変更を回って着いた削除の行。
1469
+ isRemoved && "ssg-body-row--removed",
1470
+ isRemoved && props.changeNavRowKey !== null && props.changeNavRowKey !== void 0 && props.changeNavRowKey === rowKey() && "ssg-body-row--change-target"
1392
1471
  )}
1393
1472
  style={{
1394
1473
  ...props.slots.bodyRow?.style,
@@ -1402,20 +1481,22 @@ function GridBodyLayer(props) {
1402
1481
  role="rowheader"
1403
1482
  aria-colindex={1}
1404
1483
  aria-description={rowHeaderDescription()}
1405
- onPointerDown={(event) => props.onRowHeaderPointerDown(rowIndex(), event)}
1406
- onPointerEnter={(event) => props.onRowHeaderPointerEnter(rowIndex(), event)}
1407
- onPointerLeave={() => props.onRowHeaderPointerLeave(rowIndex())}
1484
+ onPointerDown={isRemoved ? IGNORE_POINTER : (event) => props.onRowHeaderPointerDown(rowIndex(), event)}
1485
+ onPointerEnter={isRemoved ? IGNORE_POINTER : (event) => props.onRowHeaderPointerEnter(rowIndex(), event)}
1486
+ onPointerLeave={isRemoved ? IGNORE_POINTER : () => props.onRowHeaderPointerLeave(rowIndex())}
1408
1487
  class={joinClasses(
1409
1488
  "ssg-header-cell ssg-row-header-cell",
1410
1489
  rowSlot().className,
1411
1490
  props.slots.rowHeaderCell?.className,
1412
- props.enableRowSelection && !isEntry && "ssg-row-header-cell--checkbox",
1491
+ props.enableRowSelection && !isEntry && !isRemoved && "ssg-row-header-cell--checkbox",
1413
1492
  // 追加(1.10.0): 入力行の行番号(* / 下書きは ✎)。
1414
1493
  isEntry && "ssg-row-header-cell--new",
1415
1494
  (rowUnsaved() || closedTreeUnsaved()) && "ssg-row-header-cell--unsaved",
1416
1495
  // 追加(1.10.0): グリッドで足した行の行番号(左の縦の線)。
1417
1496
  rowAdded() && "ssg-row-header-cell--added",
1418
- (props.isWholeGridSelected && !isEntry || isRowSelected()) && "ssg-header-cell--selected",
1497
+ // 追加(1.13.0): 削除の行の行番号(「−」)。
1498
+ isRemoved && "ssg-row-header-cell--removed",
1499
+ (props.isWholeGridSelected && !isEntry && !isRemoved || isRowSelected()) && "ssg-header-cell--selected",
1419
1500
  isHovered() && "ssg-header-cell--hovered"
1420
1501
  )}
1421
1502
  style={{
@@ -1426,7 +1507,13 @@ function GridBodyLayer(props) {
1426
1507
  height: px(rowSize())
1427
1508
  }}
1428
1509
  >
1429
- {newRowState ? (
1510
+ {isRemoved ? (
1511
+ // 追加(1.13.0): 削除の行は行番号を取らないので「−」と、読み上げの名前を見えない文字で(入力行の印と同じ)。
1512
+ <>
1513
+ <span aria-hidden="true">{"\u2212"}</span>
1514
+ <span class="ssg-visually-hidden">{props.removedRowLayer?.description}</span>
1515
+ </>
1516
+ ) : newRowState ? (
1430
1517
  // 追加(1.10.0): 入力行の行番号は印(* / ✎)なので、読み上げの名前を見えない文字で添える(E4-08)。
1431
1518
  <>
1432
1519
  <span aria-hidden="true">{newRowState() === "draft" ? "\u270E" : "\uFF0A"}</span>
@@ -2664,9 +2751,12 @@ function DefaultGridBottomBar(props) {
2664
2751
  const SelectionAggregates = props.SelectionAggregates;
2665
2752
  return SelectionAggregates ? <SelectionAggregates aggregates={props.selectionAggregates} trailing={trailing} /> : null;
2666
2753
  };
2667
- const unsavedChip = () => <Show10 when={props.unsavedText}>
2668
- {(text) => <span class="ssg-bar-chip ssg-bar-chip--unsaved">{text()}</span>}
2669
- </Show10>;
2754
+ const unsavedChip = () => <>
2755
+ {props.diffChip}
2756
+ <Show10 when={props.unsavedText}>
2757
+ {(text) => <span class="ssg-bar-chip ssg-bar-chip--unsaved">{text()}</span>}
2758
+ </Show10>
2759
+ </>;
2670
2760
  return <div class={["ssg-bar--bottom", props.slot?.className]} style={props.slot?.style}>
2671
2761
  <div class="ssg-bar-container">
2672
2762
  <Show10 when={props.showCounts}>
@@ -2741,6 +2831,15 @@ var createChangeEffect = (compute, effect) => {
2741
2831
  };
2742
2832
  var FEATURE_PROPS = {
2743
2833
  find: [{ prop: "find", isUsed: (props) => props.find !== void 0 && props.find !== false }],
2834
+ // 追加(1.12.0 / 検索と置換): find={{ replace: true }}(機能が無いと検索だけ。React 版と同じ)。
2835
+ findReplace: [
2836
+ {
2837
+ prop: "find.replace",
2838
+ isUsed: (props) => typeof props.find === "object" && props.find !== null && props.find.replace === true
2839
+ }
2840
+ ],
2841
+ // 追加(1.12.0 / 書式つきのコピー): copyFormat="rich"(機能が無いと TSV だけ)。
2842
+ richCopy: [{ prop: "copyFormat", isUsed: (props) => props.copyFormat === "rich" }],
2744
2843
  fillHandle: [{ prop: "fillHandle", isUsed: (props) => Boolean(props.fillHandle) }],
2745
2844
  // 列の並べ替えは onColumnsChange で有効になる(リサイズ等と共通の prop なので、それでは警告しない)。
2746
2845
  columnReorder: [{ prop: "columnDragMotion", isUsed: (props) => props.columnDragMotion !== void 0 }],
@@ -2778,6 +2877,15 @@ var FEATURE_PROPS = {
2778
2877
  },
2779
2878
  { prop: "onChangesChange", isUsed: (props) => props.onChangesChange !== void 0 }
2780
2879
  ],
2880
+ // 追加(1.13.0 / 差分の表示): trackChanges の baseline(機能が無いと 1.8.0 の変更の追跡。React 版と同じ)。
2881
+ diffView: [
2882
+ {
2883
+ prop: "trackChanges.baseline",
2884
+ isUsed: (props) => typeof props.trackChanges === "object" && props.trackChanges !== null && props.trackChanges.baseline !== void 0
2885
+ }
2886
+ ],
2887
+ // 追加(1.13.0 / 範囲の飾り)
2888
+ rangeDecorations: [{ prop: "rangeDecorations", isUsed: (props) => (props.rangeDecorations?.length ?? 0) > 0 }],
2781
2889
  // 追加(1.10.0 / Excel のキー): 切り取り以外のキーを効かせたとき(切り取りは本体なので、既定の省略では警告しない)。
2782
2890
  excelShortcuts: [
2783
2891
  {
@@ -3000,6 +3108,16 @@ function createShellDevWarningsInDev(args) {
3000
3108
  );
3001
3109
  }
3002
3110
  });
3111
+ const findReplaceWarned = /* @__PURE__ */ new Set();
3112
+ createChangeEffect(args.findReplaceOnServerSide, (onServerSide) => {
3113
+ if (onServerSide) {
3114
+ warnOncePerGrid(
3115
+ findReplaceWarned,
3116
+ "findReplaceServerSide",
3117
+ "[SpreadsheetGrid] find \u306E replace \u306F serverSide(dataSource)\u3067\u306F\u4F7F\u3048\u307E\u305B\u3093(\u691C\u7D22\u3060\u3051\u3092\u51FA\u3057\u307E\u3059)\u3002\n[SpreadsheetGrid] find.replace does not work with serverSide (dataSource). Only find is shown."
3118
+ );
3119
+ }
3120
+ });
3003
3121
  const newRowWarned = /* @__PURE__ */ new Set();
3004
3122
  createChangeEffect(
3005
3123
  () => {
@@ -3042,6 +3160,38 @@ function createShellDevWarningsInDev(args) {
3042
3160
  warnOncePerGrid(multiSelectWarned, warning.id, warning.message);
3043
3161
  }
3044
3162
  });
3163
+ const rangeDecorationsWarned = /* @__PURE__ */ new Set();
3164
+ createChangeEffect(
3165
+ () => args.rangeDecorationCount() > args.rangeDecorationWarnCount ? args.rangeDecorationCount() : 0,
3166
+ (count) => {
3167
+ if (count > 0) {
3168
+ warnOncePerGrid(
3169
+ rangeDecorationsWarned,
3170
+ "rangeDecorationsCount",
3171
+ `[SpreadsheetGrid] rangeDecorations \u304C ${count} \u500B\u3042\u308A\u307E\u3059(${args.rangeDecorationWarnCount} \u500B\u3092\u8D85\u3048\u308B\u3068\u63CF\u304F\u306E\u304C\u9045\u304F\u306A\u308A\u307E\u3059\u3002\u7BC4\u56F2\u3092\u307E\u3068\u3081\u3066\u304F\u3060\u3055\u3044)\u3002
3172
+ [SpreadsheetGrid] rangeDecorations has ${count} entries (more than ${args.rangeDecorationWarnCount} slows down drawing; merge the ranges).`
3173
+ );
3174
+ }
3175
+ }
3176
+ );
3177
+ createChangeEffect(
3178
+ () => args.rangeDecorationWithoutRowKeysWarning !== void 0 && args.rangeDecorationCount() > 0 && !args.hasRowKeyGetter(),
3179
+ (missing) => {
3180
+ if (missing && args.rangeDecorationWithoutRowKeysWarning !== void 0) {
3181
+ warnOncePerGrid(rangeDecorationsWarned, "rangeDecorationsRowKeyGetter", args.rangeDecorationWithoutRowKeysWarning);
3182
+ }
3183
+ }
3184
+ );
3185
+ const diffWarned = /* @__PURE__ */ new Set();
3186
+ createChangeEffect(args.diffShowRemovedBlocked, (blocked) => {
3187
+ if (blocked) {
3188
+ warnOncePerGrid(
3189
+ diffWarned,
3190
+ "diffShowRemovedBlocked",
3191
+ "[SpreadsheetGrid] trackChanges \u306E showRemoved \u306F\u884C\u306E\u30B0\u30EB\u30FC\u30D7\u5316(rowGroup)\u30FB\u30E9\u30D9\u30EB\u884C(labelRow)\u30FB\u30C4\u30EA\u30FC\u30C7\u30FC\u30BF(treeData)\u3068\u4E00\u7DD2\u306E\u3068\u304D\u306F\u524A\u9664\u306E\u884C\u3092\u8868\u306B\u51FA\u3057\u307E\u305B\u3093(\u4EF6\u6570\u3068 getChanges() \u306B\u306F\u5165\u308A\u307E\u3059)\u3002\n[SpreadsheetGrid] trackChanges showRemoved does not show removed rows in the grid together with row grouping (rowGroup), label rows (labelRow) or tree data (treeData). They are still counted and returned by getChanges()."
3192
+ );
3193
+ }
3194
+ });
3045
3195
  if (!args.filteringAvailable) {
3046
3196
  createChangeEffect(
3047
3197
  () => args.globalFilterText().trim() !== "" || args.columnFilterCount() > 0,
@@ -3086,6 +3236,10 @@ import {
3086
3236
  mayBeMultiSelectColumn
3087
3237
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/multiSelect";
3088
3238
  var EMPTY_ROWS = [];
3239
+ var EMPTY_RANGE_DECORATIONS = [];
3240
+ var EMPTY_DECORATION_FRAMES = [];
3241
+ var EMPTY_DIFF_COLUMN_FILTERS = {};
3242
+ var EMPTY_DIFF_SORT = [];
3089
3243
  var NEVER_EDITABLE = () => false;
3090
3244
  var NO_TREE_DATA_WARNINGS = [];
3091
3245
  var NO_COLUMNS = [];
@@ -3212,7 +3366,7 @@ function GridShellBody(props, features, mountGate, mode) {
3212
3366
  const columnFilterEnabled = () => props.enableColumnFilter ?? true;
3213
3367
  const enableRowHover = () => props.enableRowHover ?? true;
3214
3368
  const enableColumnResize = () => props.enableColumnResize ?? true;
3215
- const activeRowFollowEnabled = () => (props.activeCellFollows ?? "position") === "row" && !isServerSide();
3369
+ const activeRowFollowEnabled = () => (props.activeCellFollows ?? (diffChangedOnly() ? "row" : "position")) === "row" && !isServerSide();
3216
3370
  const enableRowSelection = () => props.enableRowSelection ?? false;
3217
3371
  const rowSelectionMode = () => props.rowSelectionMode ?? "multiple";
3218
3372
  const enableSelectAllRows = () => props.enableSelectAllRows ?? (enableRowSelection() && rowSelectionMode() === "multiple");
@@ -3286,6 +3440,27 @@ function GridShellBody(props, features, mountGate, mode) {
3286
3440
  const viewScrollTop = createMemo10(() => view().scrollTop);
3287
3441
  const viewMaxBodyPx = createMemo10(() => view().maxBodyPx);
3288
3442
  const newRowDraft = createMemo10(() => view().newRowDraft ?? null);
3443
+ const changeNavRowKey = createMemo10(() => view().changeNavRowKey ?? null);
3444
+ const setChangeNavRow = (rowKey) => {
3445
+ if ((store.getViewState().changeNavRowKey ?? null) !== rowKey || rowKey !== null) {
3446
+ store.setViewState({
3447
+ changeNavRowKey: rowKey,
3448
+ changeNavActiveCell: rowKey === null ? null : store.getState().activeCell
3449
+ });
3450
+ }
3451
+ };
3452
+ connectController(
3453
+ {
3454
+ update: (activeCell) => {
3455
+ if (shouldClearChangeNavMark(store.getViewState(), activeCell)) {
3456
+ setChangeNavRow(null);
3457
+ }
3458
+ }
3459
+ },
3460
+ () => ui().activeCell,
3461
+ "effect",
3462
+ "changeNavClear"
3463
+ );
3289
3464
  const viewSetters = createGridViewSetters(store);
3290
3465
  const { setHoveredColumnIndex, setIsCornerHovered, setEditorInitialValue } = viewSetters;
3291
3466
  const gridRootRef = { current: null };
@@ -3433,6 +3608,58 @@ function GridShellBody(props, features, mountGate, mode) {
3433
3608
  const globalFilterStatus = filterOrder ? filterOrder.globalFilterStatus : () => "idle";
3434
3609
  const globalFilterProgress = filterOrder ? filterOrder.globalFilterProgress : () => 1;
3435
3610
  const relativeDateKey = filterOrder ? filterOrder.relativeDateKey : () => "";
3611
+ const changeTrackingParts = features.changeTracking;
3612
+ const changeTracker = engine.changeTracker;
3613
+ const rangeDecorationParts = features.rangeDecorations;
3614
+ const rangeDecorationResolver = rangeDecorationParts?.createRangeDecorationResolver() ?? null;
3615
+ const RangeDecorationFrames = rangeDecorationParts?.RangeDecorationFrames;
3616
+ const trackChangesOptions = createMemo10(
3617
+ () => typeof props.trackChanges === "object" && props.trackChanges !== null ? props.trackChanges : null
3618
+ );
3619
+ const diffViewParts = features.diffView;
3620
+ const diffRequested = createMemo10(() => trackChangesOptions()?.baseline !== void 0 && diffViewParts !== void 0);
3621
+ const changeTrackingActive = createMemo10(
3622
+ () => isTrackChangesOn(props.trackChanges) && changeTrackingParts !== void 0 && !isServerSide() && props.rowKeyGetter !== void 0 && (props.onRowsChange != null || diffRequested())
3623
+ );
3624
+ const diffActive = createMemo10(() => changeTrackingActive() && diffRequested());
3625
+ const trackRowChanges = createMemo10(
3626
+ () => changeTrackingActive() && (trackChangesOptions()?.rows === true || diffActive())
3627
+ );
3628
+ const diffShowOriginal = createMemo10(() => diffActive() && trackChangesOptions()?.showOriginal === true);
3629
+ const changeSnapshot = createExternalStoreSignal(changeTracker, "changeTrackerStore");
3630
+ const diffChangedOnly = createMemo10(() => diffActive() && trackChangesOptions()?.changedOnly === true);
3631
+ const diffShowRemovedRequested = createMemo10(() => diffActive() && trackChangesOptions()?.showRemoved === true);
3632
+ const diffShowRemoved = createMemo10(
3633
+ () => diffShowRemovedRequested() && !rowGroupingActive() && !labelRowEnabled() && !treeDataActive()
3634
+ );
3635
+ const diffInfo = createMemo10(() => {
3636
+ if (!diffActive()) {
3637
+ return null;
3638
+ }
3639
+ changeSnapshot();
3640
+ return changeTracker.getDiff?.() ?? null;
3641
+ });
3642
+ const diffStageInputs = createMemo10(() => {
3643
+ const info = diffInfo();
3644
+ const changedOnly = diffChangedOnly();
3645
+ const showRemoved = diffShowRemoved();
3646
+ if (!info || !changedOnly && !showRemoved) {
3647
+ return null;
3648
+ }
3649
+ return {
3650
+ diff: info.result,
3651
+ baselineIndex: info.baselineIndex,
3652
+ changedOnly,
3653
+ showRemoved,
3654
+ filterSortColumns: filterSortColumns(),
3655
+ columnFilters: manualFiltering() || !filteringAvailable ? EMPTY_DIFF_COLUMN_FILTERS : columnFilters(),
3656
+ relativeDateKey: relativeDateKey(),
3657
+ globalFilterColumns: globalFilterColumns(),
3658
+ globalFilterMatch: props.globalFilterMatch ?? "value",
3659
+ globalText: globalFilterEnabled() && !manualFiltering() && filteringAvailable ? globalFilterText() : "",
3660
+ sort: manualSorting() ? EMPTY_DIFF_SORT : ui().sort
3661
+ };
3662
+ });
3436
3663
  const orderResolution = createMemo10(
3437
3664
  () => engine.rowPipeline.resolveOrder({
3438
3665
  rows: rows(),
@@ -3446,7 +3673,10 @@ function GridShellBody(props, features, mountGate, mode) {
3446
3673
  manualSorting: manualSorting(),
3447
3674
  relativeDateKey: relativeDateKey(),
3448
3675
  // 追加(1.9.0 / ツリーデータ): 全体を並べず、絞り込んだ行を rows の順で返します(きょうだいの中で並べるのは木の段)。
3449
- treeActive: treeDataActive()
3676
+ treeActive: treeDataActive(),
3677
+ // 追加(1.13.0 / 差分の表示): changedOnly で変更のある行だけに絞ります。
3678
+ diff: diffStageInputs(),
3679
+ rowKeyGetter: resolvedRowKeyGetter()
3450
3680
  })
3451
3681
  );
3452
3682
  const filterConditionsActive = () => globalFilterText().trim().length > 0 || Object.keys(columnFilters()).length > 0;
@@ -3459,7 +3689,8 @@ function GridShellBody(props, features, mountGate, mode) {
3459
3689
  globalText: globalFilterEnabled() ? globalFilterText() : "",
3460
3690
  columnFilters: columnFilters(),
3461
3691
  relativeDateKey: relativeDateKey(),
3462
- pending: globalFilterStatus() === "filtering"
3692
+ pending: globalFilterStatus() === "filtering",
3693
+ changedOnly: diffChangedOnly()
3463
3694
  }) : null
3464
3695
  );
3465
3696
  const treeOpenState = createMemo10(() => ui().treeOpen);
@@ -3492,7 +3723,9 @@ function GridShellBody(props, features, mountGate, mode) {
3492
3723
  sortActive: !manualSorting() && ui().sort.length > 0,
3493
3724
  manualSorting: manualSorting(),
3494
3725
  // 追加(1.9.0 / ツリーデータ)
3495
- tree: treeInputs()
3726
+ tree: treeInputs(),
3727
+ // 追加(1.13.0 / 差分の表示): showRemoved で削除の行を差し込みます。
3728
+ diff: diffStageInputs()
3496
3729
  })
3497
3730
  );
3498
3731
  const treeStage = createMemo10(() => treeDataActive() ? clientRowModel().tree : null);
@@ -3577,13 +3810,14 @@ function GridShellBody(props, features, mountGate, mode) {
3577
3810
  const order = () => orderResolution().order;
3578
3811
  const groupTree = () => clientRowModel().groupTree;
3579
3812
  const labelDisplay = () => clientRowModel().labelDisplay;
3580
- const labelViewIndexes = createMemo10(() => labelDisplay()?.labelViewIndexes);
3813
+ const removedViewIndexes = () => clientRowModel().removedViewIndexes;
3814
+ const labelViewIndexes = createMemo10(() => labelDisplay()?.labelViewIndexes ?? removedViewIndexes() ?? void 0);
3581
3815
  const leafRowCount = createMemo10(() => {
3582
3816
  const tree = treeStage();
3583
3817
  if (tree) {
3584
3818
  return tree.visibility.matchedCount;
3585
3819
  }
3586
- return clientRowModel().groupedDisplay || clientRowModel().labelDisplay ? order().length : newRowActive() ? viewRowCount() - 1 : viewRowCount();
3820
+ return clientRowModel().groupedDisplay || clientRowModel().labelDisplay || removedViewIndexes() ? order().length : newRowActive() ? viewRowCount() - 1 : viewRowCount();
3587
3821
  });
3588
3822
  const handleGroupToggle = (groupKey) => dispatch(gridActions.toggleGroupCollapsed(groupKey));
3589
3823
  const groupingFeature2 = features.grouping;
@@ -3601,6 +3835,20 @@ function GridShellBody(props, features, mountGate, mode) {
3601
3835
  }),
3602
3836
  { name: "clampSelectionToRowCount" }
3603
3837
  );
3838
+ createEffect4(
3839
+ () => removedViewIndexes() === null ? null : rowModel(),
3840
+ outsideGraphApply((model) => {
3841
+ if (model === null) {
3842
+ return;
3843
+ }
3844
+ const activeCell = store.getState().activeCell;
3845
+ const row = activeCell === null ? null : resolveRowOffRemovedRow(model, activeCell.row);
3846
+ if (row !== null) {
3847
+ dispatch(gridActions.followActiveRow(row, model.getRowCount()));
3848
+ }
3849
+ }),
3850
+ { name: "moveActiveCellOffRemovedRow" }
3851
+ );
3604
3852
  const autoHeightSnapshot = createExternalStoreSignal(engine.autoHeightMeasurer, "autoHeightStore");
3605
3853
  const vertical = createMemo10(
3606
3854
  () => engine.resolveVerticalLayout({
@@ -3641,7 +3889,9 @@ function GridShellBody(props, features, mountGate, mode) {
3641
3889
  maxBodyPx: () => viewMaxBodyPx() ?? MAX_BODY_PX,
3642
3890
  globalFilterText,
3643
3891
  columnFilterCount: () => Object.keys(columnFilters()).length,
3644
- trackChangesUnavailable: () => !isTrackChangesOn(props.trackChanges) || features.changeTracking === void 0 ? null : isServerSide() ? "serverSide" : props.rowKeyGetter === void 0 ? "rowKeyGetter" : props.onRowsChange == null ? "onRowsChange" : null,
3892
+ trackChangesUnavailable: () => !isTrackChangesOn(props.trackChanges) || features.changeTracking === void 0 ? null : isServerSide() ? "serverSide" : props.rowKeyGetter === void 0 ? "rowKeyGetter" : props.onRowsChange == null && !diffRequested() ? "onRowsChange" : null,
3893
+ // 追加(1.12.0 / 検索と置換): 置換を serverSide で使った(機能があるときだけ。React 版と同じ条件と文言)。
3894
+ findReplaceOnServerSide: () => typeof props.find === "object" && props.find !== null && props.find.replace === true && features.find !== void 0 && features.findReplace !== void 0 && isServerSide(),
3645
3895
  // 追加(1.10.0 / 入力行): 入力行が出ない理由(機能があり newRow を指定したときだけ。React 版と同じ条件と文言)。
3646
3896
  newRowUnavailable: () => {
3647
3897
  if (!newRowGiven() || newRowParts === void 0) {
@@ -3662,6 +3912,13 @@ function GridShellBody(props, features, mountGate, mode) {
3662
3912
  },
3663
3913
  // 追加(1.11.0 / 複数選択): 複数選択の列でこの版では効かない書き方(allowFreeText / fillRow / rowGroup。React 版と同じ)。
3664
3914
  multiSelectWarnings: () => describeMultiSelectColumnProblems(props.columns),
3915
+ // 追加(1.13.0 / 差分の表示): showRemoved が効かない組み合わせ(行のグループ化・ラベル行・ツリーデータ)。
3916
+ diffShowRemovedBlocked: () => diffShowRemovedRequested() && !diffShowRemoved(),
3917
+ // 追加(1.13.0 / 範囲の飾り)
3918
+ rangeDecorationCount: () => rangeDecorationResolver ? props.rangeDecorations?.length ?? 0 : 0,
3919
+ rangeDecorationWarnCount: rangeDecorationResolver?.warnCount ?? Number.POSITIVE_INFINITY,
3920
+ rangeDecorationWithoutRowKeysWarning: rangeDecorationResolver?.withoutRowKeysWarning,
3921
+ hasRowKeyGetter: () => props.rowKeyGetter !== void 0,
3665
3922
  // 追加(1.9.0 / ツリーデータ): 一緒に使えないもの・効かない理由と、木の形の問題(親のキーが rows に無い行・循環・同じキーの行)。
3666
3923
  treeDataWarnings: () => {
3667
3924
  const parts = treeDataParts;
@@ -4399,14 +4656,6 @@ function GridShellBody(props, features, mountGate, mode) {
4399
4656
  onGutterRowSelect: rowSelectionCommands.handleGutterRowSelect,
4400
4657
  onGutterRowSelectDrag: rowSelectionCommands.handleGutterRowSelectDrag
4401
4658
  }), "render", "pointer");
4402
- const changeTrackingParts = features.changeTracking;
4403
- const changeTracker = engine.changeTracker;
4404
- const changeTrackingActive = createMemo10(
4405
- () => isTrackChangesOn(props.trackChanges) && changeTrackingParts !== void 0 && !isServerSide() && props.rowKeyGetter !== void 0 && props.onRowsChange != null
4406
- );
4407
- const trackRowChanges = createMemo10(
4408
- () => changeTrackingActive() && typeof props.trackChanges === "object" && props.trackChanges.rows === true
4409
- );
4410
4659
  const history = createHistoryController();
4411
4660
  const historyRowLocator = createMemo10(() => createHistoryRowLocator(rowModel(), treeStage()));
4412
4661
  connectController(history, () => ({
@@ -4440,9 +4689,11 @@ function GridShellBody(props, features, mountGate, mode) {
4440
4689
  columns: columns(),
4441
4690
  rowKeyGetter: props.rowKeyGetter,
4442
4691
  applyRows: props.onRowsChange ? history.applyRows : void 0,
4443
- trackRows: trackRowChanges()
4692
+ trackRows: trackRowChanges(),
4693
+ // 追加(1.13.0 / 差分の表示): baseline と比べる(機能 diffView の突き合わせのランナー)。
4694
+ baseline: diffActive() ? trackChangesOptions()?.baseline : void 0,
4695
+ createRowDiffer: diffViewParts?.createRowDiffer
4444
4696
  }), "render", "changeTracker");
4445
- const changeSnapshot = createExternalStoreSignal(changeTracker, "changeTrackerStore");
4446
4697
  connectController(
4447
4698
  { update: (args) => changeTracker.notifyChanges(args.callback) },
4448
4699
  () => {
@@ -4476,17 +4727,41 @@ function GridShellBody(props, features, mountGate, mode) {
4476
4727
  }
4477
4728
  changeSnapshot();
4478
4729
  const texts = localeTexts();
4730
+ const diffParts = diffActive() ? diffViewParts : void 0;
4731
+ const diffTexts2 = localeTexts();
4732
+ const formatOriginal = diffShowOriginal() ? diffViewParts?.formatDiffOriginalText : void 0;
4479
4733
  return {
4480
4734
  getUnsavedCells: changeTracker.getUnsavedCells,
4481
4735
  trackedColumns: changeTracker.getTrackedColumns(),
4482
- describeCell: (column, row, savedValue) => parts.describeUnsavedCell(column, row, savedValue, texts),
4483
- rowDescription: texts.unsavedRow,
4736
+ describeCell: diffParts ? (column, row, savedValue) => diffParts.describeDiffCell(column, row, savedValue, diffTexts2) : (column, row, savedValue) => parts.describeUnsavedCell(column, row, savedValue, texts),
4737
+ rowDescription: diffParts ? diffTexts2.diffChangedRow : texts.unsavedRow,
4484
4738
  closedTreeDescription: texts.unsavedInClosedTreeRow,
4485
4739
  // 追加(1.10.0): グリッドで足した行(行を追っているときだけ)。
4486
4740
  isAddedRow: trackRowChanges() ? changeTracker.isAddedRow : void 0,
4487
- addedRowDescription: texts.unsavedAddedRow
4741
+ addedRowDescription: diffParts ? diffTexts2.diffAddedRow : texts.unsavedAddedRow,
4742
+ // 追加(1.13.0 / showOriginal): 変更のセルの前の値。
4743
+ describeOriginal: formatOriginal ? (column, row, savedValue) => formatOriginal(column, row, savedValue, diffTexts2) : void 0
4488
4744
  };
4489
4745
  });
4746
+ const changeNavAnnouncement = createMemo10(() => view().changeNavAnnouncement ?? "");
4747
+ const announceChangeNav = (target, position, total) => {
4748
+ const parts = diffViewParts;
4749
+ if (!parts || !diffActive()) {
4750
+ return;
4751
+ }
4752
+ const text = parts.describeChangeNavTarget(
4753
+ target,
4754
+ position,
4755
+ total,
4756
+ rowModel(),
4757
+ orderedColumns(),
4758
+ (rowKey, columnKey) => changeTracker.getUnsavedCells(rowKey)?.get(columnKey),
4759
+ localeTexts()
4760
+ );
4761
+ store.setViewState({
4762
+ changeNavAnnouncement: parts.nextChangeNavAnnouncement(store.getViewState().changeNavAnnouncement, text)
4763
+ });
4764
+ };
4490
4765
  const closedTreeUnsaved = createMemo10(
4491
4766
  () => changeTrackingActive() && treeStage() && (changeSnapshot().rowCount > 0 || changeSnapshot().addedCount > 0) ? engine.rowPipeline.getClosedTreeAncestorKeys(treeOpenState(), changeTracker.getUnsavedRowKeys()) : null
4492
4767
  );
@@ -4597,6 +4872,13 @@ function GridShellBody(props, features, mountGate, mode) {
4597
4872
  onPasteSkipped: inOwnTick(props.onPasteSkipped),
4598
4873
  localeTexts: localeTexts(),
4599
4874
  pasteFillsSelection: props.pasteFillsSelection,
4875
+ // 追加(1.12.0 / copyHeaders・書式つきコピー): 見出しの行・列のグループの段・text/html の表(機能 richCopy)・色を読む要素・
4876
+ // カラースケールの min / max(条件付き書式の機能があるときだけ。React 版と同じ)。
4877
+ copyHeaders: props.copyHeaders,
4878
+ columnGroupTree: columnGroupTree(),
4879
+ richCopy: props.copyFormat === "rich" ? features.richCopy : void 0,
4880
+ getCopyColorHost: () => gridRootRef.current,
4881
+ getConditionalFormatStats: features.conditionalFormat ? () => untrack13(conditionalFormatStats) : void 0,
4600
4882
  onRowsChange: handleRowsChange(),
4601
4883
  onColumnsChange: inOwnTick(props.onColumnsChange),
4602
4884
  applyServerSideCellEdits: applyServerSideCellEdits(),
@@ -4642,6 +4924,9 @@ function GridShellBody(props, features, mountGate, mode) {
4642
4924
  const findOptions = createMemo10(() => typeof props.find === "object" ? props.find : null);
4643
4925
  const findShortcut = createMemo10(() => findEnabled() && (findOptions()?.shortcut ?? true));
4644
4926
  const findSnapshot = createExternalStoreSignal(engine.find, "findStore");
4927
+ const findReplaceFeature2 = features.findReplace;
4928
+ const findReplaceWanted = createMemo10(() => findEnabled() && findOptions()?.replace === true && findReplaceFeature2 !== void 0);
4929
+ const findReplaceSnapshot = createExternalStoreSignal(engine.findReplace, "findReplaceStore");
4645
4930
  const FindBar = findFeature2?.FindBar;
4646
4931
  const findIndex = createMemo10(() => findSnapshot().index);
4647
4932
  const findCurrentIndex = createMemo10(() => findSnapshot().currentIndex);
@@ -4667,6 +4952,8 @@ function GridShellBody(props, features, mountGate, mode) {
4667
4952
  toViewRow: findToViewRow(),
4668
4953
  // 追加(1.11.0 / 複数選択): 複数選択のセルの文字の区切り(チップの印と同じ位置。React 版と同じ)。
4669
4954
  multiSelectSeparator: localeTexts().multiSelectSeparator,
4955
+ // 追加(1.12.0 / 検索と置換): 「選んだ範囲だけ」の範囲(件数・印・↑↓ も範囲の中だけ。React 版と同じ)。
4956
+ scope: findReplaceSnapshot().scope,
4670
4957
  // カレントのヒットへ: クリックと同じ 1 セルの選択 + 見える位置へのスクロール(命令的 API と同じ経路)。
4671
4958
  // 変更(1.9.0 の点検 T3-02 / T6-09): 打っている途中の移動('query')で開いた親は、次の文字の移動で閉じ直す(React 版と同じ)。
4672
4959
  onNavigate: (rowIndex, colIndex, cause) => {
@@ -4682,11 +4969,113 @@ function GridShellBody(props, features, mountGate, mode) {
4682
4969
  onChange: inOwnTick(props.onFindChange)
4683
4970
  };
4684
4971
  }, "render", "find");
4685
- const openFindFromShortcut = () => engine.find.open();
4972
+ const findReplaceEnabled = createMemo10(
4973
+ () => findReplaceWanted() && !isServerSide() && !editLocked() && props.onRowsChange != null
4974
+ );
4975
+ connectController(engine.findReplace, () => {
4976
+ const treeRowModel = findTreeRowModel();
4977
+ const state = ui();
4978
+ return {
4979
+ enabled: findReplaceEnabled(),
4980
+ find: engine.find,
4981
+ rows: rows(),
4982
+ rowModel: treeRowModel ?? rowModel(),
4983
+ columns: orderedColumns(),
4984
+ caseSensitive: findOptions()?.caseSensitive ?? false,
4985
+ conditionalFormat: conditionalFormatFeature2 !== void 0,
4986
+ multiSelectSeparator: localeTexts().multiSelectSeparator,
4987
+ validationTexts: localeTexts(),
4988
+ toViewRow: findToViewRow(),
4989
+ readOnly: editLocked(),
4990
+ canEditCell: canEditCell(),
4991
+ // 履歴付きの onRowsChange(元に戻すが 1 回・変更の追跡の印も付く)。
4992
+ commitRows: (nextRows) => handleRowsChange()?.(nextRows),
4993
+ getSelection: () => store.getState().selection,
4994
+ viewRowCount: viewRowCount(),
4995
+ viewSignature: [state.sort, state.filters, state.collapsedGroupKeys, orderedColumnKeys()]
4996
+ };
4997
+ }, "render", "findReplace");
4998
+ const openFindFromShortcut = () => {
4999
+ if (findReplaceEnabled()) {
5000
+ engine.findReplace.open(false);
5001
+ return;
5002
+ }
5003
+ engine.find.open();
5004
+ };
5005
+ const openFindReplaceFromShortcut = () => engine.findReplace.open(true);
4686
5006
  const closeFindAndRefocus = () => {
4687
5007
  engine.find.close();
4688
5008
  gridRootRef.current?.focus({ preventScroll: true });
4689
5009
  };
5010
+ const findScopeRects = createMemo10(() => {
5011
+ const scope = findSnapshot().open ? findReplaceSnapshot().scope : null;
5012
+ if (scope === null) {
5013
+ return null;
5014
+ }
5015
+ const v = vertical();
5016
+ return resolveRowRunsPaneRects(findScopeRowRuns(scope), scope.startCol, scope.endCol, {
5017
+ paneLayout: paneLayout(),
5018
+ viewRowCount: viewRowCount(),
5019
+ windowFirstRow: v.windowFirstRow,
5020
+ windowLastRow: v.windowLastRow,
5021
+ rowMetrics: v.rowMetrics,
5022
+ detailActive: v.detailActive,
5023
+ detailExtras: v.detailExtras
5024
+ });
5025
+ });
5026
+ const findScopeRectsForPane = (pane) => findScopeRects()?.[pane] ?? [];
5027
+ const normalizedRangeDecorations = createMemo10(
5028
+ () => rangeDecorationResolver ? rangeDecorationResolver.normalize(props.rangeDecorations) : EMPTY_RANGE_DECORATIONS
5029
+ );
5030
+ const rangeDecorationVisibleFirstRow = createMemo10(() => {
5031
+ if (!rangeDecorationResolver || normalizedRangeDecorations().length === 0) {
5032
+ return void 0;
5033
+ }
5034
+ const v = vertical();
5035
+ return rangeDecorationResolver.resolveVisibleTop(
5036
+ v.rowMetrics,
5037
+ physicalToLogicalScrollTop(viewScrollTop(), v.verticalScaleFactor)
5038
+ ).row;
5039
+ });
5040
+ const rangeDecorationVisibleFirstRowTight = createMemo10(() => {
5041
+ if (!rangeDecorationResolver || normalizedRangeDecorations().length === 0) {
5042
+ return void 0;
5043
+ }
5044
+ const v = vertical();
5045
+ return rangeDecorationResolver.resolveVisibleTop(
5046
+ v.rowMetrics,
5047
+ physicalToLogicalScrollTop(viewScrollTop(), v.verticalScaleFactor)
5048
+ ).tight;
5049
+ });
5050
+ const rangeDecorationFrames = createMemo10(() => {
5051
+ const decorations = normalizedRangeDecorations();
5052
+ if (!rangeDecorationResolver || decorations.length === 0) {
5053
+ return null;
5054
+ }
5055
+ const v = vertical();
5056
+ return rangeDecorationResolver.resolveFrames(decorations, {
5057
+ paneLayout: paneLayout(),
5058
+ rowModel: rowModel(),
5059
+ windowFirstRow: v.windowFirstRow,
5060
+ windowLastRow: v.windowLastRow,
5061
+ rowMetrics: v.rowMetrics,
5062
+ detailActive: v.detailActive,
5063
+ detailExtras: v.detailExtras,
5064
+ visibleFirstRow: rangeDecorationVisibleFirstRow(),
5065
+ visibleFirstRowTight: rangeDecorationVisibleFirstRowTight()
5066
+ });
5067
+ });
5068
+ const rangeDecorationFramesForPane = (pane) => rangeDecorationFrames()?.[pane] ?? EMPTY_DECORATION_FRAMES;
5069
+ const activeCellDecorationText = createMemo10(() => {
5070
+ const decorations = normalizedRangeDecorations();
5071
+ const active = ui().activeCell;
5072
+ if (!rangeDecorationResolver || decorations.length === 0 || !active) {
5073
+ return void 0;
5074
+ }
5075
+ const model = rowModel();
5076
+ const rowKey = model.getRow(active.row) != null ? model.getRowKey(active.row) : void 0;
5077
+ return rangeDecorationResolver.describeCell(decorations, rowKey, orderedColumns()[active.col]?.key);
5078
+ });
4690
5079
  const filterPopover = features.filtering?.createFilterPopover({
4691
5080
  visibleColumns,
4692
5081
  columnFilters,
@@ -4897,9 +5286,13 @@ function GridShellBody(props, features, mountGate, mode) {
4897
5286
  handleCut: resolvedExcelShortcuts().cut ? clipboard.handleCut : void 0,
4898
5287
  // 追加(1.10.0 / 入力行): 編集していない入力行の Escape は下書きを捨てる。
4899
5288
  onEscapeNewRow: newRowActive() ? engine.newRow.discardAt : void 0,
5289
+ // 追加(1.13.0 の実アプリでの点検 RD3-05 / RD5-07): 削除の行に着いた後の ↑ ↓ はその行から(React 版と同じ)。
5290
+ getChangeNavOrigin: diffActive() ? () => resolveChangeNavOrigin(store.getViewState(), store.getState().activeCell, rowModel()) : void 0,
4900
5291
  onTabPastNewRowDraft: newRowActive() ? engine.newRow.commitFromLastColumn : void 0,
4901
5292
  onShortcutKeyDown: excelShortcutCommandsEnabled() ? engine.excelShortcuts.handleKeyDown : void 0,
4902
5293
  openFind: findShortcut() ? openFindFromShortcut : void 0,
5294
+ // 追加(1.12.0 / 検索と置換): Ctrl+H で置換の段も開く(置換が使えて shortcut が true のときだけ横取り)。
5295
+ openFindReplace: findShortcut() && findReplaceEnabled() ? openFindReplaceFromShortcut : void 0,
4903
5296
  handleCellDoubleClick: tryStartEditCell,
4904
5297
  isWholeGridSelected: isWholeGridSelected(),
4905
5298
  selectEntireGrid,
@@ -5374,7 +5767,18 @@ function GridShellBody(props, features, mountGate, mode) {
5374
5767
  activeToolPanelTab: toolPanel?.activeTab() ?? null,
5375
5768
  openToolPanel,
5376
5769
  closeToolPanel: toolPanel?.close ?? noop3,
5377
- find: { open: engine.find.open, close: engine.find.close, next: engine.find.next, prev: engine.find.prev },
5770
+ find: {
5771
+ open: engine.find.open,
5772
+ close: engine.find.close,
5773
+ next: engine.find.next,
5774
+ prev: engine.find.prev,
5775
+ // 追加(1.12.0 / 検索と置換): openFind({ replace: true }) / replaceNext / replaceAll の委譲先(置換が使えるときだけ)。
5776
+ replace: findReplaceEnabled() ? {
5777
+ open: engine.findReplace.open,
5778
+ replaceCurrent: engine.findReplace.replaceCurrent,
5779
+ replaceAll: engine.findReplace.replaceAll
5780
+ } : void 0
5781
+ },
5378
5782
  undoRows: history.undo,
5379
5783
  redoRows: history.redo,
5380
5784
  canUndoRows: history.canUndo,
@@ -5384,6 +5788,10 @@ function GridShellBody(props, features, mountGate, mode) {
5384
5788
  // 追加(1.8.0): 変更の追跡(getChanges / markChangesSaved / revertChanges の委譲先)。
5385
5789
  changeTracker,
5386
5790
  changeTrackingActive: changeTrackingActive(),
5791
+ // 追加(1.13.0 / 差分の表示): goToNextChange / goToPrevChange(削除の行に動いたら行に目印)。
5792
+ diffActive: diffActive(),
5793
+ setChangeNavRow,
5794
+ announceChangeNav,
5387
5795
  // 追加(1.9.0 / ツリーデータ): 木の開閉のハンドル・getState の closedTreeRows・エクスポートの深さ・検索の移動。
5388
5796
  treeData: treeApi(),
5389
5797
  detailRowEnabled: detailRowEnabled(),
@@ -5587,6 +5995,37 @@ function GridShellBody(props, features, mountGate, mode) {
5587
5995
  {customTopBar()}
5588
5996
  </Show12>
5589
5997
  </Show12>;
5998
+ const removedRowLayer = createMemo10(
5999
+ () => diffShowRemoved() && removedViewIndexes() ? { description: localeTexts().diffRemovedRow } : void 0
6000
+ );
6001
+ const diffTexts = () => localeTexts();
6002
+ const diffCanNavigate = () => {
6003
+ const snapshot2 = changeSnapshot();
6004
+ return snapshot2.cellCount > 0 || snapshot2.addedCount > 0 || diffShowRemoved() && snapshot2.removedCount > 0;
6005
+ };
6006
+ const diffComparing = () => {
6007
+ const info = diffInfo();
6008
+ return info?.result == null || info.running;
6009
+ };
6010
+ const diffBarChip = () => {
6011
+ const parts = diffViewParts;
6012
+ if (!parts) {
6013
+ return null;
6014
+ }
6015
+ const DiffBarChip = parts.DiffBarChip;
6016
+ return <Show12 when={diffActive()}>
6017
+ <DiffBarChip
6018
+ parts={parts.formatDiffSummaryParts(changeSnapshot(), !diffComparing(), diffTexts())}
6019
+ comparingText={diffTexts().diffComparing}
6020
+ separator={diffTexts().unsavedSeparator}
6021
+ prevLabel={diffTexts().diffPrevChange}
6022
+ nextLabel={diffTexts().diffNextChange}
6023
+ canNavigate={diffCanNavigate()}
6024
+ onPrev={engine.gridApi.handle.goToPrevChange}
6025
+ onNext={engine.gridApi.handle.goToNextChange}
6026
+ />
6027
+ </Show12>;
6028
+ };
5590
6029
  const bottomBar = () => <Show12 when={props.showBottomBar ?? true}>
5591
6030
  <Show12
5592
6031
  when={renderBottomBarFn() !== void 0}
@@ -5596,7 +6035,8 @@ function GridShellBody(props, features, mountGate, mode) {
5596
6035
  showCounts={props.showBottomBarCounts ?? true}
5597
6036
  selectionAggregates={selectionAggregates()}
5598
6037
  SelectionAggregates={selectionAggregatesFeature2?.SelectionAggregates}
5599
- unsavedText={changeTrackingParts ? changeTrackingParts.formatUnsavedSummary(unsavedChanges(), localeTexts()) : null}
6038
+ unsavedText={changeTrackingParts && !diffActive() ? changeTrackingParts.formatUnsavedSummary(unsavedChanges(), localeTexts()) : null}
6039
+ diffChip={diffBarChip()}
5600
6040
  />}
5601
6041
  >
5602
6042
  {customBottomBar()}
@@ -5702,7 +6142,7 @@ function GridShellBody(props, features, mountGate, mode) {
5702
6142
  return <Show12 when={draggable()}>
5703
6143
  <RowDragHandle2
5704
6144
  operable={rowDragOperable()}
5705
- tooltip={rowDragOperable() ? rowDragTexts().dragRow : rowDragTexts().dragRowDisabled}
6145
+ tooltip={rowDragOperable() ? rowDragTexts().dragRow : orderResolution().rowDragBlockedByRemovedRows ? rowDragTexts().dragRowDisabledRemoved : rowDragTexts().dragRowDisabled}
5706
6146
  onPointerDown={(event) => rowDrag.onRowDragHandlePointerDown(untrack13(() => cell.rowIndex), event)}
5707
6147
  />
5708
6148
  </Show12>;
@@ -6111,6 +6551,29 @@ function GridShellBody(props, features, mountGate, mode) {
6111
6551
  transform: vertical().bodyLayerTransform
6112
6552
  }}
6113
6553
  >
6554
+ {
6555
+ /* 追加(1.13.0 / 範囲の飾り): 行と列のキーの範囲の枠と名札(選択の枠より下。React 版と同じ)。 */
6556
+ }
6557
+ {RangeDecorationFrames ? <RangeDecorationFrames
6558
+ frames={rangeDecorationFramesForPane(pane)}
6559
+ headerHeight={headerHeight()}
6560
+ leadingWidth={leadingWidth()}
6561
+ baseOffset={vertical().overlayBaseOffset}
6562
+ /> : null}
6563
+ {
6564
+ /* 追加(1.12.0 / 検索と置換): 「選んだ範囲だけ」の範囲の色(選択の枠より下。React 版と同じ)。 */
6565
+ }
6566
+ {findReplaceFeature2 ? (() => {
6567
+ const { FindScopeOverlay } = findReplaceFeature2;
6568
+ return <For5 each={findScopeRectsForPane(pane)} keyed={false}>
6569
+ {(rect) => <FindScopeOverlay
6570
+ rect={rect()}
6571
+ headerHeight={headerHeight()}
6572
+ leadingWidth={leadingWidth()}
6573
+ baseOffset={vertical().overlayBaseOffset}
6574
+ />}
6575
+ </For5>;
6576
+ })() : null}
6114
6577
  <For5 each={selectionRectsForPane(pane)} keyed={false}>
6115
6578
  {(rect) => <Overlay
6116
6579
  class="ssg-selection-overlay"
@@ -6205,6 +6668,9 @@ function GridShellBody(props, features, mountGate, mode) {
6205
6668
  labelViewIndexes={labelViewIndexes()}
6206
6669
  newRowLayer={newRowLayer()}
6207
6670
  newRowDraft={newRowDraft()}
6671
+ removedRowLayer={removedRowLayer()}
6672
+ changeNavRowKey={changeNavRowKey()}
6673
+ activeCellDecorationText={activeCellDecorationText()}
6208
6674
  rowHeaderWidth={rowHeaderWidth()}
6209
6675
  rows={bodyRows()}
6210
6676
  entries={entries()}
@@ -6270,7 +6736,17 @@ function GridShellBody(props, features, mountGate, mode) {
6270
6736
  </div>;
6271
6737
  };
6272
6738
  const activeDescendantId = () => activeCellRendered() ? activeCellDomId : void 0;
6273
- const emptyStateText = () => (isServerSide() ? !filterConditionsActive() : rows().length === 0 && !manualFilterActive()) ? props.noRowsText ?? localeTexts().noRows : props.noMatchingRowsText ?? localeTexts().noMatchingRows;
6739
+ const diffEmptyText = () => {
6740
+ if (!diffChangedOnly() || rows().length === 0) {
6741
+ return null;
6742
+ }
6743
+ if (diffComparing()) {
6744
+ return diffTexts().diffComparing;
6745
+ }
6746
+ const snapshot2 = changeSnapshot();
6747
+ return snapshot2.cellCount + snapshot2.addedCount + snapshot2.removedCount === 0 ? diffTexts().diffNoChanges : null;
6748
+ };
6749
+ const emptyStateText = () => (isServerSide() ? !filterConditionsActive() : rows().length === 0 && !manualFilterActive()) ? props.noRowsText ?? localeTexts().noRows : diffEmptyText() ?? props.noMatchingRowsText ?? localeTexts().noMatchingRows;
6274
6750
  const rootStyle = () => ({
6275
6751
  ...toSolidStyle(heightLayout().rootStyle),
6276
6752
  ...slots().root?.style,
@@ -6290,9 +6766,13 @@ function GridShellBody(props, features, mountGate, mode) {
6290
6766
  "ssg-root--selecting": ui().dragState?.type === "selection",
6291
6767
  "ssg-root--filling": fill?.filling() ?? false,
6292
6768
  "ssg-root--animate-rows": animateRowsActive(),
6769
+ // 追加(1.13.0 のレビュー DA-5): 列の幅を引いている間(範囲の飾りの枠を滑らせない)。
6770
+ "ssg-root--resizing-column": ui().dragState?.type === "columnResize",
6293
6771
  "ssg-root--dim-readonly": props.dimReadOnlyCells ?? false,
6294
6772
  // 追加(1.5.0 / serverSideRefetch="keep"): 取り直しの間に前の行を見せている(行を薄くする)。
6295
6773
  "ssg-root--refetching": refetchingRows(),
6774
+ // 追加(1.13.0 / 差分の表示): baseline と比べている(変更のセル・追加の行・削除の行を色で塗る。ユーザー判断 C)。
6775
+ "ssg-root--diff": diffActive(),
6296
6776
  "ssg-root--fill-height": heightLayout().fillParent,
6297
6777
  // クロスヘア(列見出し / 行番号を選択の色で染める。列の帯は ColumnHoverOverlay)。
6298
6778
  "ssg-root--hover-cross": hoverCross()
@@ -6487,6 +6967,14 @@ function GridShellBody(props, features, mountGate, mode) {
6487
6967
  </div>
6488
6968
  </Show12>
6489
6969
  {
6970
+ /* 追加(1.13.0 の実アプリでの点検 RD4-02): ▲ ▼ で回った先の読み上げ(見た目には出さない。差分の表示の間だけ置く)。 */
6971
+ }
6972
+ <Show12 when={diffActive() && diffViewParts !== void 0}>
6973
+ <span class="ssg-visually-hidden" aria-live="polite" aria-atomic="true">
6974
+ {changeNavAnnouncement()}
6975
+ </span>
6976
+ </Show12>
6977
+ {
6490
6978
  /* グローバルフィルターの適用中の overlay(しきい値を超える表の時間分割の間だけ。pointer-events: none)。 */
6491
6979
  }
6492
6980
  <Show12 when={globalFilterStatus() === "filtering"}>
@@ -6511,6 +6999,18 @@ function GridShellBody(props, features, mountGate, mode) {
6511
6999
  onPrev={engine.find.prev}
6512
7000
  onClose={closeFindAndRefocus}
6513
7001
  slot={slots().findBar}
7002
+ replaceParts={findReplaceEnabled() ? findReplaceFeature2 : void 0}
7003
+ replaceSnapshot={findReplaceSnapshot()}
7004
+ onReplaceToggle={() => engine.findReplace.setExpanded(!engine.findReplace.getSnapshot().expanded)}
7005
+ onReplacementChange={engine.findReplace.setReplacement}
7006
+ onReplace={() => {
7007
+ engine.findReplace.replaceCurrent();
7008
+ }}
7009
+ onReplaceAll={() => {
7010
+ void engine.findReplace.replaceAll();
7011
+ }}
7012
+ onScopeChange={engine.findReplace.setScopeEnabled}
7013
+ onReplaceShortcut={() => engine.findReplace.setExpanded(true)}
6514
7014
  />}
6515
7015
  </Show12>
6516
7016
  {
@@ -8844,7 +9344,7 @@ import { splitTextByFindRanges } from "@ishibashi0112/spreadsheet-grid-core/inte
8844
9344
  import { DEFAULT_FIND_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
8845
9345
 
8846
9346
  // src/view/GridFindBar.tsx
8847
- import { createRenderEffect as createRenderEffect6, createSignal as createSignal14, onSettled as onSettled7, untrack as untrack17 } from "solid-js";
9347
+ import { Show as Show20, createEffect as createEffect9, createRenderEffect as createRenderEffect6, createSignal as createSignal14, onSettled as onSettled7, untrack as untrack17 } from "solid-js";
8848
9348
  import { isImeComposingKeyEvent as isImeComposingKeyEvent3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
8849
9349
  function GridFindBar(props) {
8850
9350
  const texts = useFeatureLocaleText();
@@ -8855,6 +9355,20 @@ function GridFindBar(props) {
8855
9355
  element?.focus();
8856
9356
  element?.select();
8857
9357
  });
9358
+ let lastFocusRequest = untrack17(() => props.snapshot.focusRequest);
9359
+ createEffect9(
9360
+ () => props.snapshot.focusRequest,
9361
+ (request) => {
9362
+ if (request === lastFocusRequest) {
9363
+ return;
9364
+ }
9365
+ lastFocusRequest = request;
9366
+ const element = untrack17(input);
9367
+ element?.focus();
9368
+ element?.select();
9369
+ },
9370
+ { name: "findBarFocusRequest" }
9371
+ );
8858
9372
  createRenderEffect6(
8859
9373
  () => [input(), props.snapshot.query],
8860
9374
  ([element, query]) => {
@@ -8899,17 +9413,17 @@ function GridFindBar(props) {
8899
9413
  } else if (event.key === "Escape") {
8900
9414
  event.preventDefault();
8901
9415
  props.onClose();
9416
+ } else if (props.replaceParts && event.ctrlKey && !event.metaKey && !event.altKey && event.key.toLowerCase() === "h") {
9417
+ event.preventDefault();
9418
+ props.onReplaceShortcut?.();
8902
9419
  }
8903
9420
  event.stopPropagation();
8904
9421
  };
8905
- return <div
8906
- class={["ssg-find-bar", props.slot?.className]}
8907
- style={{ ...props.slot?.style, top: px(props.headerHeight + 6) }}
8908
- role="search"
8909
- aria-label={texts().findLabel}
8910
- onPointerDown={(event) => event.stopPropagation()}
8911
- data-ssg-find-bar=""
8912
- >
9422
+ const main = (parts) => <>
9423
+ {parts ? (() => {
9424
+ const Toggle = parts.FindReplaceToggle;
9425
+ return <Toggle expanded={props.replaceSnapshot?.expanded ?? false} onToggle={() => props.onReplaceToggle?.()} />;
9426
+ })() : null}
8913
9427
  <span class="ssg-find-bar-icon" aria-hidden="true">
8914
9428
  <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round">
8915
9429
  <circle cx="11" cy="11" r="7" />
@@ -8964,6 +9478,45 @@ function GridFindBar(props) {
8964
9478
  >
8965
9479
  ×
8966
9480
  </button>
9481
+ </>;
9482
+ return <div
9483
+ class={["ssg-find-bar", { "ssg-find-bar--replace": props.replaceParts !== void 0 }, props.slot?.className]}
9484
+ style={{ ...props.slot?.style, top: px(props.headerHeight + 6) }}
9485
+ role="search"
9486
+ aria-label={texts().findLabel}
9487
+ onPointerDown={(event) => event.stopPropagation()}
9488
+ onKeyDown={(event) => {
9489
+ if (event.key === "Escape" && !isImeComposingKeyEvent3(event)) {
9490
+ event.preventDefault();
9491
+ event.stopPropagation();
9492
+ props.onClose();
9493
+ } else if (props.replaceParts && event.ctrlKey && !event.metaKey && !event.altKey && event.key.toLowerCase() === "h") {
9494
+ event.preventDefault();
9495
+ event.stopPropagation();
9496
+ props.onReplaceShortcut?.();
9497
+ }
9498
+ }}
9499
+ data-ssg-find-bar=""
9500
+ >
9501
+ <Show20 when={props.replaceParts} fallback={main()}>
9502
+ {(parts) => <>
9503
+ <div class="ssg-find-bar-row">{main(parts())}</div>
9504
+ <Show20 when={props.replaceSnapshot?.expanded === true && props.replaceSnapshot}>
9505
+ {(snapshot2) => {
9506
+ const Section = untrack17(parts).FindReplaceSection;
9507
+ return <Section
9508
+ snapshot={snapshot2()}
9509
+ matchCount={count()}
9510
+ onReplacementChange={(text) => props.onReplacementChange?.(text)}
9511
+ onReplace={() => props.onReplace?.()}
9512
+ onReplaceAll={() => props.onReplaceAll?.()}
9513
+ onScopeChange={(enabled) => props.onScopeChange?.(enabled)}
9514
+ onClose={() => props.onClose()}
9515
+ />;
9516
+ }}
9517
+ </Show20>
9518
+ </>}
9519
+ </Show20>
8967
9520
  </div>;
8968
9521
  }
8969
9522
 
@@ -8975,19 +9528,218 @@ var findFeature = {
8975
9528
  localeText: DEFAULT_FIND_LOCALE_TEXT
8976
9529
  };
8977
9530
 
9531
+ // src/features/findReplace.ts
9532
+ import { createFindReplaceController } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/findReplaceController";
9533
+ import { DEFAULT_FIND_REPLACE_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
9534
+
9535
+ // src/view/GridFindReplace.tsx
9536
+ import { Show as Show21, createRenderEffect as createRenderEffect7, createSignal as createSignal15, untrack as untrack18 } from "solid-js";
9537
+ import { formatLocaleText as formatLocaleText12 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
9538
+ import { isImeComposingKeyEvent as isImeComposingKeyEvent4 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
9539
+ var describeFindReplaceNotice = (notice, texts) => {
9540
+ if (notice.kind === "cellSkipped") {
9541
+ switch (notice.reason) {
9542
+ case "unsupported":
9543
+ return texts.findReplaceCellUnsupported;
9544
+ case "notOption":
9545
+ return texts.findReplaceCellNotOption;
9546
+ case "invalid":
9547
+ return formatLocaleText12(texts.findReplaceCellInvalid, { message: notice.message ?? "" });
9548
+ case "unchanged":
9549
+ return texts.findReplaceCellUnchanged;
9550
+ default:
9551
+ return texts.findReplaceCellSkipped;
9552
+ }
9553
+ }
9554
+ if (notice.kind === "scopeNeedsRange") {
9555
+ return texts.findInSelectionNeedsRange;
9556
+ }
9557
+ if (notice.kind === "interrupted") {
9558
+ return texts.findReplaceInterrupted;
9559
+ }
9560
+ if (notice.replaced === 0 && notice.skipped === 0) {
9561
+ return texts.findReplaceNothing;
9562
+ }
9563
+ return notice.skipped > 0 ? formatLocaleText12(texts.findReplacedSkipped, { replaced: notice.replaced, skipped: notice.skipped }) : formatLocaleText12(texts.findReplaced, { replaced: notice.replaced });
9564
+ };
9565
+ function GridFindReplaceToggle(props) {
9566
+ const texts = useFeatureLocaleText();
9567
+ return <button
9568
+ type="button"
9569
+ class="ssg-find-bar-btn ssg-find-bar-toggle"
9570
+ aria-expanded={props.expanded ? "true" : "false"}
9571
+ aria-label={props.expanded ? texts().findReplaceHide : texts().findReplaceShow}
9572
+ data-ssg-tooltip={texts().findReplaceToggleHint}
9573
+ onClick={() => props.onToggle()}
9574
+ >
9575
+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
9576
+ <polyline points="9 6 15 12 9 18" />
9577
+ </svg>
9578
+ </button>;
9579
+ }
9580
+ function GridFindReplaceSection(props) {
9581
+ const texts = useFeatureLocaleText();
9582
+ const [input, setInput] = createSignal15();
9583
+ const initialReplacement = untrack18(() => props.snapshot.replacement);
9584
+ createRenderEffect7(
9585
+ () => [input(), props.snapshot.replacement],
9586
+ ([element, replacement]) => {
9587
+ if (element && element.value !== replacement) {
9588
+ element.value = replacement;
9589
+ }
9590
+ },
9591
+ { name: "findReplaceInput" }
9592
+ );
9593
+ const handleKeyDown = (event) => {
9594
+ if (isImeComposingKeyEvent4(event)) {
9595
+ return;
9596
+ }
9597
+ if (event.key === "Enter") {
9598
+ event.preventDefault();
9599
+ if (!props.snapshot.running && props.matchCount > 0) {
9600
+ props.onReplace();
9601
+ }
9602
+ } else if (event.key === "Escape") {
9603
+ event.preventDefault();
9604
+ props.onClose();
9605
+ } else if (event.ctrlKey && !event.metaKey && !event.altKey && event.key.toLowerCase() === "h") {
9606
+ event.preventDefault();
9607
+ }
9608
+ event.stopPropagation();
9609
+ };
9610
+ const message = () => {
9611
+ const snapshot2 = props.snapshot;
9612
+ if (snapshot2.running) {
9613
+ return texts().findReplacing;
9614
+ }
9615
+ return snapshot2.notice ? describeFindReplaceNotice(snapshot2.notice, texts()) : "";
9616
+ };
9617
+ const disabled = () => props.snapshot.running || props.matchCount === 0;
9618
+ return <>
9619
+ <div class="ssg-find-bar-row">
9620
+ <span class="ssg-find-bar-indent" aria-hidden="true" />
9621
+ <input
9622
+ ref={setInput}
9623
+ class="ssg-find-bar-input"
9624
+ type="text"
9625
+ value={initialReplacement}
9626
+ placeholder={texts().findReplacePlaceholder}
9627
+ aria-label={texts().findReplaceInput}
9628
+ onInput={(event) => props.onReplacementChange(event.currentTarget.value)}
9629
+ onKeyDown={handleKeyDown}
9630
+ />
9631
+ {
9632
+ /* 使えないときは disabled ではなく aria-disabled(押したボタンのフォーカスを body へ落とさない。React 版と同じ)。 */
9633
+ }
9634
+ <button
9635
+ type="button"
9636
+ class="ssg-find-bar-text-btn"
9637
+ onClick={() => {
9638
+ if (!props.snapshot.running) {
9639
+ props.onReplace();
9640
+ }
9641
+ }}
9642
+ aria-disabled={disabled() ? "true" : void 0}
9643
+ data-ssg-tooltip={texts().findReplaceHint}
9644
+ >
9645
+ {texts().findReplace}
9646
+ </button>
9647
+ <button
9648
+ type="button"
9649
+ class="ssg-find-bar-text-btn"
9650
+ onClick={() => {
9651
+ if (props.snapshot.running) {
9652
+ return;
9653
+ }
9654
+ if (props.matchCount === 0) {
9655
+ props.onReplace();
9656
+ } else {
9657
+ props.onReplaceAll();
9658
+ }
9659
+ }}
9660
+ aria-disabled={disabled() ? "true" : void 0}
9661
+ >
9662
+ {texts().findReplaceAll}
9663
+ </button>
9664
+ </div>
9665
+ <div class="ssg-find-bar-options">
9666
+ <label class="ssg-find-bar-check">
9667
+ <input
9668
+ type="checkbox"
9669
+ checked={props.snapshot.scope !== null}
9670
+ onChange={(event) => {
9671
+ const target = event.currentTarget;
9672
+ const wanted = target.checked;
9673
+ target.checked = !wanted;
9674
+ props.onScopeChange(wanted);
9675
+ }}
9676
+ />
9677
+ {texts().findInSelection}
9678
+ </label>
9679
+ </div>
9680
+ {
9681
+ /* 知らせのたびに文の要素を作り直します(同じ文が続いても読み上げに届く。React 版と同じ)。 */
9682
+ }
9683
+ <div class={["ssg-find-bar-message", { "ssg-find-bar-message--empty": message().length === 0 }]} aria-live="polite">
9684
+ <Show21 when={props.snapshot.noticeId + 1} keyed>
9685
+ {(noticeKey) => {
9686
+ void noticeKey;
9687
+ return <span>{message()}</span>;
9688
+ }}
9689
+ </Show21>
9690
+ </div>
9691
+ </>;
9692
+ }
9693
+ function GridFindScopeOverlay(props) {
9694
+ return <Show21 when={props.rect}>
9695
+ {(rect) => <div
9696
+ class="ssg-find-scope-overlay"
9697
+ style={{
9698
+ position: "absolute",
9699
+ left: px(props.leadingWidth + rect().left),
9700
+ top: px(props.headerHeight + rect().top - props.baseOffset),
9701
+ width: px(rect().width),
9702
+ height: px(rect().height)
9703
+ }}
9704
+ data-ssg-find-scope=""
9705
+ />}
9706
+ </Show21>;
9707
+ }
9708
+
9709
+ // src/features/findReplace.ts
9710
+ var findReplaceFeature = {
9711
+ createFindReplaceController,
9712
+ FindReplaceToggle: GridFindReplaceToggle,
9713
+ FindReplaceSection: GridFindReplaceSection,
9714
+ FindScopeOverlay: GridFindScopeOverlay,
9715
+ localeText: DEFAULT_FIND_REPLACE_LOCALE_TEXT
9716
+ };
9717
+
9718
+ // src/features/richCopy.ts
9719
+ import {
9720
+ buildClipboardHtml,
9721
+ createClipboardColorResolver,
9722
+ writeRichToClipboard
9723
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/clipboardHtml";
9724
+ var richCopyFeature = {
9725
+ buildClipboardHtml,
9726
+ createClipboardColorResolver,
9727
+ writeRichToClipboard
9728
+ };
9729
+
8978
9730
  // src/features/grouping.ts
8979
9731
  import { buildGroupTree, flattenGroupTree } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/grouping";
8980
9732
  import { DEFAULT_GROUPING_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
8981
9733
 
8982
9734
  // src/view/GridBodyGroupRow.tsx
8983
- import { For as For11, Show as Show20, createMemo as createMemo23 } from "solid-js";
9735
+ import { For as For11, Show as Show22, createMemo as createMemo23 } from "solid-js";
8984
9736
  import { GROUP_AUTO_COLUMN_KEY as GROUP_AUTO_COLUMN_KEY3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/grouping";
8985
9737
  import {
8986
9738
  formatTotalRowCellText,
8987
9739
  formatTotalRowNumber,
8988
9740
  resolveTotalRowCaption
8989
9741
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/totalRow";
8990
- import { formatLocaleText as formatLocaleText12 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
9742
+ import { formatLocaleText as formatLocaleText13 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
8991
9743
  var GROUP_INDENT_PX = 16;
8992
9744
  function GridBodyGroupRow(props) {
8993
9745
  const texts = useFeatureLocaleText();
@@ -9010,7 +9762,7 @@ function GridBodyGroupRow(props) {
9010
9762
  }}
9011
9763
  onDblClick={() => props.onGroupToggle(props.groupRow.groupKey)}
9012
9764
  >
9013
- <Show20 when={props.ownsRowHeader}>
9765
+ <Show22 when={props.ownsRowHeader}>
9014
9766
  <div
9015
9767
  role={rowHeaderIsCell() ? "rowheader" : void 0}
9016
9768
  aria-colindex={rowHeaderIsCell() ? 1 : void 0}
@@ -9035,7 +9787,7 @@ function GridBodyGroupRow(props) {
9035
9787
  >
9036
9788
  {props.showRowCheckbox ? null : props.rowIndex + 1}
9037
9789
  </div>
9038
- </Show20>
9790
+ </Show22>
9039
9791
  <For11 each={props.entries} keyed={(entry) => entry.column.key}>
9040
9792
  {(entry) => {
9041
9793
  const unbound = createMemo23(() => entry().column);
@@ -9078,19 +9830,19 @@ function GridBodyGroupRow(props) {
9078
9830
  "z-index": 1
9079
9831
  }}
9080
9832
  >
9081
- <Show20
9833
+ <Show22
9082
9834
  when={isAutoGroupColumn()}
9083
- fallback={<Show20 when={aggregate()}>
9835
+ fallback={<Show22 when={aggregate()}>
9084
9836
  {(shown) => <span
9085
9837
  class="ssg-group-value"
9086
9838
  data-ssg-tooltip-overflow={shown().text !== "" ? shown().caption !== void 0 ? `${shown().caption} ${shown().text}` : shown().text : void 0}
9087
9839
  >
9088
- <Show20 when={shown().caption !== void 0 && shown().text !== ""}>
9840
+ <Show22 when={shown().caption !== void 0 && shown().text !== ""}>
9089
9841
  <span class="ssg-group-caption">{shown().caption}</span>
9090
- </Show20>
9842
+ </Show22>
9091
9843
  {shown().text}
9092
9844
  </span>}
9093
- </Show20>}
9845
+ </Show22>}
9094
9846
  >
9095
9847
  <span
9096
9848
  aria-hidden="true"
@@ -9102,7 +9854,7 @@ function GridBodyGroupRow(props) {
9102
9854
  tabindex={-1}
9103
9855
  class="ssg-group-toggle"
9104
9856
  aria-expanded={props.isCollapsed ? "false" : "true"}
9105
- aria-label={formatLocaleText12(props.isCollapsed ? texts().expandGroup : texts().collapseGroup, {
9857
+ aria-label={formatLocaleText13(props.isCollapsed ? texts().expandGroup : texts().collapseGroup, {
9106
9858
  group: groupLabel()
9107
9859
  })}
9108
9860
  onClick={() => props.onGroupToggle(props.groupRow.groupKey)}
@@ -9112,9 +9864,9 @@ function GridBodyGroupRow(props) {
9112
9864
  </button>
9113
9865
  <span class="ssg-group-label">{groupLabel()}</span>
9114
9866
  <span class="ssg-group-count">
9115
- {formatLocaleText12(texts().groupRowCount, { count: formatTotalRowNumber(props.groupRow.leafCount) })}
9867
+ {formatLocaleText13(texts().groupRowCount, { count: formatTotalRowNumber(props.groupRow.leafCount) })}
9116
9868
  </span>
9117
- </Show20>
9869
+ </Show22>
9118
9870
  </div>;
9119
9871
  }}
9120
9872
  </For11>
@@ -9150,7 +9902,7 @@ import {
9150
9902
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/labelRows";
9151
9903
 
9152
9904
  // src/view/GridBodyLabelRow.tsx
9153
- import { Show as Show21, createMemo as createMemo24 } from "solid-js";
9905
+ import { Show as Show23, createMemo as createMemo24 } from "solid-js";
9154
9906
  var createLabelRowRenderContext = (labelRow, rowIndex, rowKey) => {
9155
9907
  const row = createMemo24(() => labelRow().row);
9156
9908
  const sourceRowIndex = createMemo24(() => labelRow().sourceIndex);
@@ -9200,7 +9952,7 @@ function GridBodyLabelRow(props) {
9200
9952
  transform: `translateY(${props.top}px)`
9201
9953
  }}
9202
9954
  >
9203
- <Show21 when={props.ownsRowHeader}>
9955
+ <Show23 when={props.ownsRowHeader}>
9204
9956
  <div
9205
9957
  aria-hidden="true"
9206
9958
  class={["ssg-header-cell", "ssg-row-header-cell", "ssg-row-header-cell--label", props.slots.rowHeaderCell?.className]}
@@ -9211,8 +9963,8 @@ function GridBodyLabelRow(props) {
9211
9963
  height: px(props.rowHeight)
9212
9964
  }}
9213
9965
  />
9214
- </Show21>
9215
- <Show21 when={props.renderContent}>
9966
+ </Show23>
9967
+ <Show23 when={props.renderContent}>
9216
9968
  {(render) => <div
9217
9969
  role="rowheader"
9218
9970
  aria-colindex={1}
@@ -9226,17 +9978,17 @@ function GridBodyLabelRow(props) {
9226
9978
  {render()(ctx)}
9227
9979
  </div>
9228
9980
  </div>}
9229
- </Show21>
9981
+ </Show23>
9230
9982
  </div>;
9231
9983
  }
9232
9984
 
9233
9985
  // src/view/GridStickyLabelLayer.tsx
9234
- import { Show as Show22, createMemo as createMemo25, onSettled as onSettled8 } from "solid-js";
9986
+ import { Show as Show24, createMemo as createMemo25, onSettled as onSettled8 } from "solid-js";
9235
9987
  var FOCUSABLE_SELECTOR = 'a[href], button, input, select, textarea, [tabindex], [contenteditable="true"]';
9236
9988
  function GridStickyLabelLayer(props) {
9237
- return <Show22 when={props.entry}>
9989
+ return <Show24 when={props.entry}>
9238
9990
  {(entry) => <StickyLabel layer={props} entry={entry} />}
9239
- </Show22>;
9991
+ </Show24>;
9240
9992
  }
9241
9993
  function StickyLabel(props) {
9242
9994
  const layer = props.layer;
@@ -9298,7 +10050,7 @@ function StickyLabel(props) {
9298
10050
  ...props.entry().pushOffset > 0 ? { transform: `translateY(${-props.entry().pushOffset}px)` } : null
9299
10051
  }}
9300
10052
  >
9301
- <Show22 when={layer.ownsRowHeader}>
10053
+ <Show24 when={layer.ownsRowHeader}>
9302
10054
  <div
9303
10055
  class={["ssg-header-cell", "ssg-row-header-cell", "ssg-row-header-cell--label", layer.slots.rowHeaderCell?.className]}
9304
10056
  style={{
@@ -9308,8 +10060,8 @@ function StickyLabel(props) {
9308
10060
  height: px(height())
9309
10061
  }}
9310
10062
  />
9311
- </Show22>
9312
- <Show22 when={layer.renderContent}>
10063
+ </Show24>
10064
+ <Show24 when={layer.renderContent}>
9313
10065
  {(render) => <div
9314
10066
  class="ssg-label-row-content-holder"
9315
10067
  style={{ left: px(layer.contentStickyLeft), width: px(layer.contentWidth), height: px(height()) }}
@@ -9318,12 +10070,12 @@ function StickyLabel(props) {
9318
10070
  class={["ssg-label-row-content", layer.slots.labelRowContent?.className]}
9319
10071
  style={layer.slots.labelRowContent?.style}
9320
10072
  >
9321
- <Show22 when={[rowKey(), render()]} keyed>
10073
+ <Show24 when={[rowKey(), render()]} keyed>
9322
10074
  {([, renderContent]) => renderContent(ctx)}
9323
- </Show22>
10075
+ </Show24>
9324
10076
  </div>
9325
10077
  </div>}
9326
- </Show22>
10078
+ </Show24>
9327
10079
  </div>
9328
10080
  </div>
9329
10081
  );
@@ -9346,12 +10098,12 @@ import { createSaveStatusController } from "@ishibashi0112/spreadsheet-grid-core
9346
10098
  import { DEFAULT_SERVER_SIDE_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
9347
10099
 
9348
10100
  // src/primitives/serverSide.ts
9349
- import { createMemo as createMemo26, untrack as untrack18 } from "solid-js";
10101
+ import { createMemo as createMemo26, untrack as untrack19 } from "solid-js";
9350
10102
  import {
9351
10103
  createServerSideRowModel
9352
10104
  } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/serverSideRowModel";
9353
10105
  function createServerSide(args) {
9354
- const controller = createServerSideRowModel(untrack18(args));
10106
+ const controller = createServerSideRowModel(untrack19(args));
9355
10107
  let updated = false;
9356
10108
  let pendingRange = null;
9357
10109
  connectController(
@@ -9400,21 +10152,21 @@ function createServerSide(args) {
9400
10152
  }
9401
10153
 
9402
10154
  // src/view/GridServerSideErrorBars.tsx
9403
- import { Show as Show23, createSignal as createSignal15 } from "solid-js";
9404
- import { formatLocaleText as formatLocaleText13 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
10155
+ import { Show as Show25, createSignal as createSignal16 } from "solid-js";
10156
+ import { formatLocaleText as formatLocaleText14 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
9405
10157
  function GridServerSideErrorBars(props) {
9406
- const [dismissedLoadError, setDismissedLoadError] = createSignal15(null);
9407
- const [dismissedWriteError, setDismissedWriteError] = createSignal15(null);
10158
+ const [dismissedLoadError, setDismissedLoadError] = createSignal16(null);
10159
+ const [dismissedWriteError, setDismissedWriteError] = createSignal16(null);
9408
10160
  const texts = () => props.localeTexts;
9409
10161
  const shownLoadError = () => props.loadError !== null && props.loadError !== dismissedLoadError() ? props.loadError : null;
9410
10162
  const shownWriteError = () => props.writeError !== null && props.writeError !== dismissedWriteError() ? props.writeError : null;
9411
- return <Show23 when={shownLoadError() !== null || shownWriteError() !== null}>
10163
+ return <Show25 when={shownLoadError() !== null || shownWriteError() !== null}>
9412
10164
  <div class="ssg-ssrm-error-bars">
9413
- <Show23 when={shownLoadError()}>
10165
+ <Show25 when={shownLoadError()}>
9414
10166
  {(loadError) => <div class={["ssg-ssrm-error-bar", props.slot?.className]} style={props.slot?.style} role="alert">
9415
10167
  <span class="ssg-ssrm-error-bar-dot" aria-hidden="true" />
9416
10168
  <span class="ssg-ssrm-error-bar-msg">
9417
- {formatLocaleText13(texts().loadFailed, { count: loadError().failedBlockCount })}
10169
+ {formatLocaleText14(texts().loadFailed, { count: loadError().failedBlockCount })}
9418
10170
  </span>
9419
10171
  <button type="button" class="ssg-ssrm-error-bar-retry" onClick={() => props.onRetry()}>
9420
10172
  {texts().retry}
@@ -9428,12 +10180,12 @@ function GridServerSideErrorBars(props) {
9428
10180
  ×
9429
10181
  </button>
9430
10182
  </div>}
9431
- </Show23>
9432
- <Show23 when={shownWriteError()}>
10183
+ </Show25>
10184
+ <Show25 when={shownWriteError()}>
9433
10185
  {(writeError) => <div class={["ssg-ssrm-error-bar", props.slot?.className]} style={props.slot?.style} role="alert">
9434
10186
  <span class="ssg-ssrm-error-bar-dot" aria-hidden="true" />
9435
10187
  <span class="ssg-ssrm-error-bar-msg">
9436
- {formatLocaleText13(texts().saveFailed, { count: writeError().failedRowCount })}
10188
+ {formatLocaleText14(texts().saveFailed, { count: writeError().failedRowCount })}
9437
10189
  </span>
9438
10190
  <button
9439
10191
  type="button"
@@ -9444,13 +10196,13 @@ function GridServerSideErrorBars(props) {
9444
10196
  ×
9445
10197
  </button>
9446
10198
  </div>}
9447
- </Show23>
10199
+ </Show25>
9448
10200
  </div>
9449
- </Show23>;
10201
+ </Show25>;
9450
10202
  }
9451
10203
 
9452
10204
  // src/view/GridBodySkeletonRow.tsx
9453
- import { For as For12, Show as Show24 } from "solid-js";
10205
+ import { For as For12, Show as Show26 } from "solid-js";
9454
10206
  var SKELETON_BAR_WIDTHS = ["62%", "46%", "78%", "54%"];
9455
10207
  function GridBodySkeletonRow(props) {
9456
10208
  return <div
@@ -9467,7 +10219,7 @@ function GridBodySkeletonRow(props) {
9467
10219
  transform: `translateY(${props.top}px)`
9468
10220
  }}
9469
10221
  >
9470
- <Show24 when={props.ownsRowHeader}>
10222
+ <Show26 when={props.ownsRowHeader}>
9471
10223
  <div
9472
10224
  role="rowheader"
9473
10225
  aria-colindex={1}
@@ -9491,11 +10243,11 @@ function GridBodySkeletonRow(props) {
9491
10243
  height: px(props.rowHeight)
9492
10244
  }}
9493
10245
  >
9494
- <Show24 when={props.showRowCheckbox} fallback={props.rowIndex + 1}>
10246
+ <Show26 when={props.showRowCheckbox} fallback={props.rowIndex + 1}>
9495
10247
  <RowSelectionCheckbox slot={props.slots.checkbox} state="unchecked" disabled />
9496
- </Show24>
10248
+ </Show26>
9497
10249
  </div>
9498
- </Show24>
10250
+ </Show26>
9499
10251
  <For12 each={props.entries} keyed={(entry) => entry.logicalIndex}>
9500
10252
  {(entry) => {
9501
10253
  const cell = () => ({ row: props.rowIndex, col: entry().logicalIndex });
@@ -9550,12 +10302,12 @@ var motionExtrasFeature = {
9550
10302
  import { DEFAULT_PINNED_ROWS_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
9551
10303
 
9552
10304
  // src/view/GridPinnedRows.tsx
9553
- import { For as For13, Show as Show25, createMemo as createMemo27 } from "solid-js";
10305
+ import { For as For13, Show as Show27, createMemo as createMemo27 } from "solid-js";
9554
10306
  import { resolveSlotProps as resolveSlotProps3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/slotProps";
9555
10307
  import { isSyntheticColumnKey as isSyntheticColumnKey4 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/detailRow";
9556
10308
  import { isCheckboxChecked as isCheckboxChecked2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/checkboxEditor";
9557
10309
  import { resolveColumnEditor as resolveColumnEditor2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/columnEditor";
9558
- import { formatLocaleText as formatLocaleText14 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
10310
+ import { formatLocaleText as formatLocaleText15 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
9559
10311
  import { getCellValue as getCellValue5 } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/permissions";
9560
10312
  import { formatCellText as formatCellText2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/cellText";
9561
10313
  var noop4 = () => {
@@ -9566,9 +10318,9 @@ function GridPinnedRows(props) {
9566
10318
  const texts = useFeatureLocaleText();
9567
10319
  const hidden = () => !props.ownsRowHeader && props.entries.length === 0;
9568
10320
  return <>
9569
- <Show25 when={props.bodyHeight > 0}>
10321
+ <Show27 when={props.bodyHeight > 0}>
9570
10322
  <div aria-hidden="true" style={{ height: px(props.bodyHeight) }} />
9571
- </Show25>
10323
+ </Show27>
9572
10324
  <div
9573
10325
  class={["ssg-pinned-rows", `ssg-pinned-rows--${props.position}`]}
9574
10326
  style={{ [props.position]: px(props.stickyOffset), height: px(props.rows.length * props.rowHeight) }}
@@ -9598,7 +10350,7 @@ function GridPinnedRows(props) {
9598
10350
  class={["ssg-pinned-row", rowSlot().className]}
9599
10351
  style={{ ...rowSlot().style, height: px(props.rowHeight), top: px(index * props.rowHeight) }}
9600
10352
  >
9601
- <Show25 when={props.ownsRowHeader}>
10353
+ <Show27 when={props.ownsRowHeader}>
9602
10354
  <div
9603
10355
  role="rowheader"
9604
10356
  aria-colindex={1}
@@ -9621,7 +10373,7 @@ function GridPinnedRows(props) {
9621
10373
  class="ssg-pinned-row-icon"
9622
10374
  viewBox="0 0 16 16"
9623
10375
  role="img"
9624
- aria-label={formatLocaleText14(
10376
+ aria-label={formatLocaleText15(
9625
10377
  props.position === "top" ? texts().pinnedTopRow : texts().pinnedBottomRow,
9626
10378
  { row: index + 1 }
9627
10379
  )}
@@ -9629,7 +10381,7 @@ function GridPinnedRows(props) {
9629
10381
  <path d={PIN_ICON_PATH} />
9630
10382
  </svg>
9631
10383
  </div>
9632
- </Show25>
10384
+ </Show27>
9633
10385
  <For13 each={props.entries} keyed={(entry) => entry.column.key}>
9634
10386
  {(entry) => {
9635
10387
  const unbound = createMemo27(() => entry().column);
@@ -9746,7 +10498,7 @@ function GridPinnedRows(props) {
9746
10498
  height: px(props.rowHeight)
9747
10499
  }}
9748
10500
  >
9749
- <Show25 when={dataBar()}>
10501
+ <Show27 when={dataBar()}>
9750
10502
  {(bar) => <span
9751
10503
  class={["ssg-cf-bar", { "ssg-cf-bar--negative": bar().negative }]}
9752
10504
  style={{
@@ -9756,7 +10508,7 @@ function GridPinnedRows(props) {
9756
10508
  }}
9757
10509
  aria-hidden="true"
9758
10510
  />}
9759
- </Show25>
10511
+ </Show27>
9760
10512
  {content()}
9761
10513
  </div>;
9762
10514
  }}
@@ -9778,7 +10530,7 @@ var pinnedRowsFeature = {
9778
10530
  import { DEFAULT_ROW_DRAG_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
9779
10531
 
9780
10532
  // src/primitives/rowDrag.ts
9781
- import { createEffect as createEffect9, createMemo as createMemo28, untrack as untrack19 } from "solid-js";
10533
+ import { createEffect as createEffect10, createMemo as createMemo28, untrack as untrack20 } from "solid-js";
9782
10534
  import {
9783
10535
  createRowDragController
9784
10536
  } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/rowDragController";
@@ -9794,8 +10546,8 @@ function createRowDrag(inputs) {
9794
10546
  const centerIndicatorRef = { current: null };
9795
10547
  const rightIndicatorRef = { current: null };
9796
10548
  const canDropAt = createMemo28(() => createRowDropCheck(inputs.canDropRow(), inputs.rows(), inputs.resolveRowKey()));
9797
- const getRowDragLabel = (viewIndex) => resolveRowDragLabel(untrack19(inputs.rowModel), untrack19(inputs.visibleColumns), viewIndex, untrack19(inputs.dragRowLabel));
9798
- const getDragRow = (viewIndex) => getDragRowToken(untrack19(inputs.rowModel), viewIndex);
10549
+ const getRowDragLabel = (viewIndex) => resolveRowDragLabel(untrack20(inputs.rowModel), untrack20(inputs.visibleColumns), viewIndex, untrack20(inputs.dragRowLabel));
10550
+ const getDragRow = (viewIndex) => getDragRowToken(untrack20(inputs.rowModel), viewIndex);
9799
10551
  const locateDragRow = createMemo28(() => {
9800
10552
  const rowModel = inputs.rowModel();
9801
10553
  const hasRowKeys = inputs.hasRowKeys();
@@ -9818,7 +10570,7 @@ function createRowDrag(inputs) {
9818
10570
  "effect",
9819
10571
  "rowDrag"
9820
10572
  );
9821
- createEffect9(inputs.rowModel, () => {
10573
+ createEffect10(inputs.rowModel, () => {
9822
10574
  controller.applyReorderSettle();
9823
10575
  }, { name: "rowDragSettle" });
9824
10576
  return {
@@ -9872,7 +10624,7 @@ import { resolveScrollHintOptions } from "@ishibashi0112/spreadsheet-grid-core/i
9872
10624
  import { DEFAULT_SCROLL_HINT_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
9873
10625
 
9874
10626
  // src/view/GridScrollHint.tsx
9875
- import { For as For14, Show as Show26, createMemo as createMemo29, createSignal as createSignal16, createEffect as createEffect10 } from "solid-js";
10627
+ import { For as For14, Show as Show28, createMemo as createMemo29, createSignal as createSignal17, createEffect as createEffect11 } from "solid-js";
9876
10628
  import { physicalToLogicalScrollTop as physicalToLogicalScrollTop3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/verticalGeometry";
9877
10629
  import { resolveDataRowNumber as resolveDataRowNumber3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/labelRows";
9878
10630
  import {
@@ -9881,7 +10633,7 @@ import {
9881
10633
  computeScrollHintTrackPointerScrollTop,
9882
10634
  resolveScrollHintDetail
9883
10635
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/scrollHint";
9884
- import { formatLocaleText as formatLocaleText15 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
10636
+ import { formatLocaleText as formatLocaleText16 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
9885
10637
  var SCROLL_HINT_LINGER_MS = 1e3;
9886
10638
  var SCROLL_HINT_BUBBLE_GAP_PX = 8;
9887
10639
  var SCROLL_HINT_GUTTER_WIDTH_PX = 14;
@@ -9890,11 +10642,11 @@ var SCROLL_HINT_OVERLAY_TRACK_ZONE_PX = 8;
9890
10642
  var SCROLL_HINT_JUMP_LABEL_FLIP_PX = 28;
9891
10643
  function GridScrollHint(props) {
9892
10644
  const texts = useFeatureLocaleText();
9893
- const [scrollActive, setScrollActive] = createSignal16(false);
9894
- const [hovered, setHovered] = createSignal16(false);
9895
- const [scrollbarWidth, setScrollbarWidth] = createSignal16(0);
9896
- const [trackPointerY, setTrackPointerY] = createSignal16(null);
9897
- const [dragging, setDragging] = createSignal16(false);
10645
+ const [scrollActive, setScrollActive] = createSignal17(false);
10646
+ const [hovered, setHovered] = createSignal17(false);
10647
+ const [scrollbarWidth, setScrollbarWidth] = createSignal17(0);
10648
+ const [trackPointerY, setTrackPointerY] = createSignal17(null);
10649
+ const [dragging, setDragging] = createSignal17(false);
9898
10650
  let lingerTimer = null;
9899
10651
  let dragGrab = null;
9900
10652
  let gutter;
@@ -9910,7 +10662,7 @@ function GridScrollHint(props) {
9910
10662
  })
9911
10663
  );
9912
10664
  const shown = createMemo29(() => track() !== null && props.rowMetrics.rowCount > 0);
9913
- createEffect10(scrollbar, (customScrollbar) => {
10665
+ createEffect11(scrollbar, (customScrollbar) => {
9914
10666
  const element = props.scrollContainerRef.current;
9915
10667
  if (!element) {
9916
10668
  return void 0;
@@ -9959,7 +10711,7 @@ function GridScrollHint(props) {
9959
10711
  }
9960
10712
  };
9961
10713
  }, { name: "scrollHintListeners" });
9962
- createEffect10(
10714
+ createEffect11(
9963
10715
  () => scrollbar() && shown(),
9964
10716
  (on) => {
9965
10717
  const element = props.scrollContainerRef.current;
@@ -10076,9 +10828,9 @@ function GridScrollHint(props) {
10076
10828
  setTrackPointerY(null);
10077
10829
  }
10078
10830
  };
10079
- return <Show26 when={shown()}>
10831
+ return <Show28 when={shown()}>
10080
10832
  <div class={["ssg-scroll-hint", props.slot?.className]} style={props.slot?.style} aria-hidden="true">
10081
- <Show26 when={props.options.ruler && rulerTicks().length > 0}>
10833
+ <Show28 when={props.options.ruler && rulerTicks().length > 0}>
10082
10834
  <div
10083
10835
  class={["ssg-scroll-hint-ruler", { "ssg-scroll-hint-ruler--visible": rulerVisible() }]}
10084
10836
  style={{ top: px(props.headerHeight), right: px(rightInset()) }}
@@ -10092,8 +10844,8 @@ function GridScrollHint(props) {
10092
10844
  </div>}
10093
10845
  </For14>
10094
10846
  </div>
10095
- </Show26>
10096
- <Show26 when={jumpPreview()}>
10847
+ </Show28>
10848
+ <Show28 when={jumpPreview()}>
10097
10849
  {(preview) => <div class="ssg-scroll-hint-jumpline" style={{ top: px(preview().lineY), right: px(rightInset()) }}>
10098
10850
  <span
10099
10851
  class={[
@@ -10103,17 +10855,17 @@ function GridScrollHint(props) {
10103
10855
  }
10104
10856
  ]}
10105
10857
  >
10106
- {formatLocaleText15(texts().scrollHintJump, { row: rowNumberOf(preview().rowIndex).toLocaleString() })}
10107
- <Show26 when={preview().detail !== null}>
10858
+ {formatLocaleText16(texts().scrollHintJump, { row: rowNumberOf(preview().rowIndex).toLocaleString() })}
10859
+ <Show28 when={preview().detail !== null}>
10108
10860
  <span class="ssg-scroll-hint-jumpline-detail">
10109
10861
  {` ${texts().scrollHintJumpSeparator} `}
10110
10862
  {preview().detail}
10111
10863
  </span>
10112
- </Show26>
10864
+ </Show28>
10113
10865
  </span>
10114
10866
  </div>}
10115
- </Show26>
10116
- <Show26 when={props.options.bubble}>
10867
+ </Show28>
10868
+ <Show28 when={props.options.bubble}>
10117
10869
  <div
10118
10870
  class={["ssg-scroll-hint-bubble", { "ssg-scroll-hint-bubble--visible": visible() }]}
10119
10871
  style={{
@@ -10122,17 +10874,17 @@ function GridScrollHint(props) {
10122
10874
  }}
10123
10875
  >
10124
10876
  <span class="ssg-scroll-hint-bubble-main">
10125
- {formatLocaleText15(texts().scrollHintRow, { row: rowNumberOf(topRowIndex()).toLocaleString() })}
10877
+ {formatLocaleText16(texts().scrollHintRow, { row: rowNumberOf(topRowIndex()).toLocaleString() })}
10126
10878
  <span class="ssg-scroll-hint-bubble-total">
10127
10879
  {" "}/ {dataRowCount().toLocaleString()}
10128
10880
  </span>
10129
10881
  </span>
10130
- <Show26 when={detail() !== null}>
10882
+ <Show28 when={detail() !== null}>
10131
10883
  <span class="ssg-scroll-hint-bubble-detail">{detail()}</span>
10132
- </Show26>
10884
+ </Show28>
10133
10885
  </div>
10134
- </Show26>
10135
- <Show26 when={scrollbar()}>
10886
+ </Show28>
10887
+ <Show28 when={scrollbar()}>
10136
10888
  <div
10137
10889
  ref={(element) => {
10138
10890
  gutter = element;
@@ -10156,9 +10908,9 @@ function GridScrollHint(props) {
10156
10908
  style={{ top: px(track()?.thumbTop ?? 0), height: px(track()?.thumbHeight ?? 0) }}
10157
10909
  />
10158
10910
  </div>
10159
- </Show26>
10911
+ </Show28>
10160
10912
  </div>
10161
- </Show26>;
10913
+ </Show28>;
10162
10914
  }
10163
10915
 
10164
10916
  // src/features/scrollHint.ts
@@ -10172,7 +10924,7 @@ var scrollHintFeature = {
10172
10924
  import { DEFAULT_SELECT_SEARCH_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
10173
10925
 
10174
10926
  // src/editors/SearchSelectCellEditor.tsx
10175
- import { For as For15, Show as Show27, createEffect as createEffect11, createMemo as createMemo30, createRenderEffect as createRenderEffect7, createSignal as createSignal17, createUniqueId as createUniqueId6, onCleanup as onCleanup13, onSettled as onSettled9, untrack as untrack20 } from "solid-js";
10927
+ import { For as For15, Show as Show29, createEffect as createEffect12, createMemo as createMemo30, createRenderEffect as createRenderEffect8, createSignal as createSignal18, createUniqueId as createUniqueId6, onCleanup as onCleanup13, onSettled as onSettled9, untrack as untrack21 } from "solid-js";
10176
10928
  import { Portal as Portal5 } from "@solidjs/web";
10177
10929
  import {
10178
10930
  computeSelectPopoverPlacement as computeSelectPopoverPlacement2,
@@ -10190,26 +10942,26 @@ import {
10190
10942
  import {
10191
10943
  createSearchSelectEditorController
10192
10944
  } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/searchSelectEditorController";
10193
- import { isImeComposingKeyEvent as isImeComposingKeyEvent4 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
10945
+ import { isImeComposingKeyEvent as isImeComposingKeyEvent5 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
10194
10946
  import { isCommitToSelectionKey as isCommitToSelectionKey2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorKeys";
10195
10947
  function MatchedText(props) {
10196
10948
  const parts = createMemo30(() => splitSelectSearchText(props.text, props.range));
10197
10949
  return <For15 each={parts()} keyed={false}>
10198
- {(part) => <Show27 when={part().match} fallback={part().text}>
10950
+ {(part) => <Show29 when={part().match} fallback={part().text}>
10199
10951
  <mark class="ssg-select-editor-match">{part().text}</mark>
10200
- </Show27>}
10952
+ </Show29>}
10201
10953
  </For15>;
10202
10954
  }
10203
10955
  function SearchSelectCellEditor(props) {
10204
10956
  const texts = useFeatureLocaleText();
10205
10957
  const portal = useGridPortal();
10206
- const [input, setInput] = createSignal17();
10207
- const [scroller, setScroller] = createSignal17();
10208
- const [popover, setPopover] = createSignal17();
10958
+ const [input, setInput] = createSignal18();
10959
+ const [scroller, setScroller] = createSignal18();
10960
+ const [popover, setPopover] = createSignal18();
10209
10961
  createTopAlignedInput(input, () => props.alignTop ?? false, () => props.cellHeight ?? 0);
10210
10962
  const listId = createUniqueId6();
10211
10963
  const pointerMoved = createPointerMoveFilter2();
10212
- const [error, setError] = createSignal17(null);
10964
+ const [error, setError] = createSignal18(null);
10213
10965
  let commitToSelectionPending = false;
10214
10966
  const commitWithResult = (committed, direction, option, forwardText) => {
10215
10967
  const toSelection = commitToSelectionPending ? props.onCommitToSelection : void 0;
@@ -10220,7 +10972,7 @@ function SearchSelectCellEditor(props) {
10220
10972
  }
10221
10973
  return result;
10222
10974
  };
10223
- const controller = untrack20(
10975
+ const controller = untrack21(
10224
10976
  () => createSearchSelectEditorController({
10225
10977
  options: props.options,
10226
10978
  value: props.value,
@@ -10232,20 +10984,20 @@ function SearchSelectCellEditor(props) {
10232
10984
  onCancel: () => props.onCancel()
10233
10985
  })
10234
10986
  );
10235
- const [snapshot2, setSnapshot] = createSignal17(controller.getSnapshot(), { name: "searchSelectSnapshot" });
10236
- createEffect11(
10987
+ const [snapshot2, setSnapshot] = createSignal18(controller.getSnapshot(), { name: "searchSelectSnapshot" });
10988
+ createEffect12(
10237
10989
  () => props.options,
10238
10990
  outsideGraphApply((options) => controller.setOptions(options)),
10239
10991
  { name: "searchSelectOptions" }
10240
10992
  );
10241
- props.onRegisterFlush?.(untrack20(() => props.allowFreeText) ? controller.flush : null);
10993
+ props.onRegisterFlush?.(untrack21(() => props.allowFreeText) ? controller.flush : null);
10242
10994
  const rowHeight = resolveSelectOptionRowHeight2();
10243
- const [placement2, setPlacement] = createSignal17(null);
10244
- const [scrollTop, setScrollTop] = createSignal17(0);
10995
+ const [placement2, setPlacement] = createSignal18(null);
10996
+ const [scrollTop, setScrollTop] = createSignal18(0);
10245
10997
  const listRows = createMemo30(() => Math.max(snapshot2().results.length, 1));
10246
10998
  const viewportHeight = createMemo30(() => Math.min(listRows(), 8) * rowHeight);
10247
10999
  const measure = () => {
10248
- const element = untrack20(input);
11000
+ const element = untrack21(input);
10249
11001
  if (!element) {
10250
11002
  return;
10251
11003
  }
@@ -10254,7 +11006,7 @@ function SearchSelectCellEditor(props) {
10254
11006
  element,
10255
11007
  computeSelectPopoverPlacement2(
10256
11008
  element.getBoundingClientRect(),
10257
- untrack20(listRows),
11009
+ untrack21(listRows),
10258
11010
  window.innerWidth,
10259
11011
  window.innerHeight,
10260
11012
  rowHeight,
@@ -10276,10 +11028,10 @@ function SearchSelectCellEditor(props) {
10276
11028
  };
10277
11029
  let disposed = false;
10278
11030
  onSettled9(() => {
10279
- const element = untrack20(input);
11031
+ const element = untrack21(input);
10280
11032
  if (element) {
10281
11033
  element.focus();
10282
- if (untrack20(() => props.initialText) === void 0) {
11034
+ if (untrack21(() => props.initialText) === void 0) {
10283
11035
  element.select();
10284
11036
  } else {
10285
11037
  element.setSelectionRange(element.value.length, element.value.length);
@@ -10302,7 +11054,7 @@ function SearchSelectCellEditor(props) {
10302
11054
  disposed = true;
10303
11055
  });
10304
11056
  let measuredKey;
10305
- createEffect11(
11057
+ createEffect12(
10306
11058
  () => `${listRows()}:${props.cellTop ?? 0}:${props.cellLeft ?? 0}`,
10307
11059
  outsideGraphApply((key) => {
10308
11060
  const previous = measuredKey;
@@ -10313,13 +11065,13 @@ function SearchSelectCellEditor(props) {
10313
11065
  }),
10314
11066
  { name: "searchSelectMeasure" }
10315
11067
  );
10316
- createEffect11(
11068
+ createEffect12(
10317
11069
  () => [snapshot2().results, scroller(), viewportHeight()],
10318
11070
  outsideGraphApply(([, element, height]) => reveal(element, height)),
10319
11071
  { name: "searchSelectReveal" }
10320
11072
  );
10321
11073
  const handleKeyDown = (event) => {
10322
- if (isImeComposingKeyEvent4(event)) {
11074
+ if (isImeComposingKeyEvent5(event)) {
10323
11075
  return;
10324
11076
  }
10325
11077
  const before = controller.getSnapshot().highlight;
@@ -10330,7 +11082,7 @@ function SearchSelectCellEditor(props) {
10330
11082
  }
10331
11083
  if (controller.keyDown(toEditorKeyEvent(event), props.enterMove) && controller.getSnapshot().highlight !== before) {
10332
11084
  setError(null);
10333
- reveal(untrack20(scroller), untrack20(viewportHeight));
11085
+ reveal(untrack21(scroller), untrack21(viewportHeight));
10334
11086
  }
10335
11087
  };
10336
11088
  const results = () => snapshot2().results;
@@ -10347,7 +11099,7 @@ function SearchSelectCellEditor(props) {
10347
11099
  };
10348
11100
  const freeTextOnly = () => props.allowFreeText === true && status() === "ready" && snapshot2().filtered && results().length === 0;
10349
11101
  const mount = () => placement2() !== null && !freeTextOnly() ? portal.container() : null;
10350
- const initialText = untrack20(() => snapshot2().text);
11102
+ const initialText = untrack21(() => snapshot2().text);
10351
11103
  const view = <>
10352
11104
  <input
10353
11105
  ref={setInput}
@@ -10381,7 +11133,7 @@ function SearchSelectCellEditor(props) {
10381
11133
  style={props.align ? { "text-align": props.align } : void 0}
10382
11134
  />
10383
11135
  <CellEditorError message={error()} />
10384
- <Show27 when={mount()}>
11136
+ <Show29 when={mount()}>
10385
11137
  {(container) => <Portal5 mount={container()}>
10386
11138
  <div
10387
11139
  ref={setPopover}
@@ -10402,7 +11154,7 @@ function SearchSelectCellEditor(props) {
10402
11154
  }}
10403
11155
  onPointerDown={(event) => event.preventDefault()}
10404
11156
  >
10405
- <Show27 when={status() === "error"}>
11157
+ <Show29 when={status() === "error"}>
10406
11158
  <div class="ssg-select-editor-empty ssg-select-editor-error" role="alert">
10407
11159
  <span class="ssg-select-editor-error-text" title={snapshot2().errorMessage ?? void 0}>
10408
11160
  {texts().selectSearchFailed}
@@ -10411,13 +11163,13 @@ function SearchSelectCellEditor(props) {
10411
11163
  {texts().retry}
10412
11164
  </button>
10413
11165
  </div>
10414
- </Show27>
10415
- <Show27 when={status() !== "error" && results().length === 0}>
11166
+ </Show29>
11167
+ <Show29 when={status() !== "error" && results().length === 0}>
10416
11168
  <div class="ssg-select-editor-empty" role="status">
10417
11169
  {status() === "loading" ? texts().selectSearchLoading : snapshot2().filtered ? texts().selectSearchNoMatch : texts().noOptions}
10418
11170
  </div>
10419
- </Show27>
10420
- <Show27 when={results().length > 0}>
11171
+ </Show29>
11172
+ <Show29 when={results().length > 0}>
10421
11173
  <div
10422
11174
  ref={setScroller}
10423
11175
  role="listbox"
@@ -10441,33 +11193,33 @@ function SearchSelectCellEditor(props) {
10441
11193
  { "ssg-select-editor-option--highlighted": item().index === snapshot2().highlight }
10442
11194
  ]}
10443
11195
  style={{ top: px(item().index * rowHeight) }}
10444
- onClick={() => controller.choose(untrack20(item).index)}
11196
+ onClick={() => controller.choose(untrack21(item).index)}
10445
11197
  onPointerEnter={(event) => revealOverflowTitle2(event.currentTarget)}
10446
11198
  onPointerMove={(event) => {
10447
11199
  if (pointerMoved(event)) {
10448
- controller.hover(untrack20(item).index);
11200
+ controller.hover(untrack21(item).index);
10449
11201
  }
10450
11202
  }}
10451
11203
  >
10452
11204
  <span class="ssg-select-editor-option-label">
10453
11205
  <MatchedText text={item().result.option.label} range={item().result.labelMatch} />
10454
11206
  </span>
10455
- <Show27 when={item().result.option.description}>
11207
+ <Show29 when={item().result.option.description}>
10456
11208
  {(description) => <span class="ssg-select-editor-option-description">
10457
11209
  <MatchedText text={description()} range={item().result.descriptionMatch} />
10458
11210
  </span>}
10459
- </Show27>
11211
+ </Show29>
10460
11212
  </div>}
10461
11213
  </For15>
10462
11214
  </div>
10463
11215
  </div>
10464
- </Show27>
11216
+ </Show29>
10465
11217
  </div>
10466
11218
  </Portal5>}
10467
- </Show27>
11219
+ </Show29>
10468
11220
  </>;
10469
11221
  createPortalTokens(popover, () => props.themeClassName, placement2);
10470
- createRenderEffect7(
11222
+ createRenderEffect8(
10471
11223
  () => [input(), snapshot2().text],
10472
11224
  ([element, text]) => {
10473
11225
  if (element && element.value !== text) {
@@ -10489,11 +11241,11 @@ var selectSearchFeature = {
10489
11241
  import { DEFAULT_DATE_TIME_EDITORS_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
10490
11242
 
10491
11243
  // src/editors/DateTimeCellEditor.tsx
10492
- import { For as For16, Show as Show28, createEffect as createEffect12, createMemo as createMemo31, createRenderEffect as createRenderEffect8, createSignal as createSignal18, createUniqueId as createUniqueId7, onCleanup as onCleanup14, onSettled as onSettled10, untrack as untrack21 } from "solid-js";
11244
+ import { For as For16, Show as Show30, createEffect as createEffect13, createMemo as createMemo31, createRenderEffect as createRenderEffect9, createSignal as createSignal19, createUniqueId as createUniqueId7, onCleanup as onCleanup14, onSettled as onSettled10, untrack as untrack22 } from "solid-js";
10493
11245
  import { Portal as Portal6 } from "@solidjs/web";
10494
11246
  import { handleEditorKeyDown as handleEditorKeyDown4 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorKeys";
10495
- import { formatLocaleText as formatLocaleText16 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
10496
- import { isImeComposingKeyEvent as isImeComposingKeyEvent5 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
11247
+ import { formatLocaleText as formatLocaleText17 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
11248
+ import { isImeComposingKeyEvent as isImeComposingKeyEvent6 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
10497
11249
  import { toDateInputValue as toDateInputValue2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorValues";
10498
11250
  import { toDateTimeValue, toTimeValue } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/dateTimeValues";
10499
11251
  import {
@@ -10519,15 +11271,15 @@ import {
10519
11271
  } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/dateTimeEditorController";
10520
11272
  var TIME_LIST_MIN_WIDTH = 96;
10521
11273
  function DateTimeCellEditor(props) {
10522
- const kind = untrack21(() => props.editor.type);
10523
- const defaultTime = resolveDefaultTime(untrack21(() => props.editor.type === "datetime" ? props.editor.defaultTime : void 0));
10524
- const typedText = untrack21(() => resolveDateTimeTypedText(kind, props.initialValue, props.value, defaultTime));
11274
+ const kind = untrack22(() => props.editor.type);
11275
+ const defaultTime = resolveDefaultTime(untrack22(() => props.editor.type === "datetime" ? props.editor.defaultTime : void 0));
11276
+ const typedText = untrack22(() => resolveDateTimeTypedText(kind, props.initialValue, props.value, defaultTime));
10525
11277
  if (typedText === void 0 && isCoarsePointer()) {
10526
11278
  if (kind === "date") {
10527
11279
  return <DateCellEditor
10528
11280
  ariaLabel={props.ariaLabel}
10529
11281
  enterMove={props.enterMove}
10530
- initialValue={toDateInputValue2(untrack21(() => props.value))}
11282
+ initialValue={toDateInputValue2(untrack22(() => props.value))}
10531
11283
  onCommit={(value, direction) => props.onCommit(value, direction)}
10532
11284
  onCancel={() => props.onCancel()}
10533
11285
  onCommitToSelection={props.onCommitToSelection}
@@ -10542,22 +11294,22 @@ function DateTimeCellEditor(props) {
10542
11294
  return <TypedDateTimeEditor {...props} kind={kind} defaultTime={defaultTime} typedText={typedText} />;
10543
11295
  }
10544
11296
  function NativeDateTimeEditor(props) {
10545
- const [input, setInput] = createSignal18();
10546
- const [error, setError] = createSignal18(null);
11297
+ const [input, setInput] = createSignal19();
11298
+ const [error, setError] = createSignal19(null);
10547
11299
  createTopAlignedInput(input, () => props.alignTop ?? false, () => props.cellHeight ?? 0);
10548
- const kind = untrack21(() => props.kind);
10549
- const startValue = untrack21(
11300
+ const kind = untrack22(() => props.kind);
11301
+ const startValue = untrack22(
10550
11302
  () => kind === "time" ? toTimeValue(props.value) : toDateTimeValue(props.value, props.defaultTime)
10551
11303
  );
10552
- const step = resolveTimeStep(untrack21(() => props.editor.type === "date" ? void 0 : props.editor.step));
11304
+ const step = resolveTimeStep(untrack22(() => props.editor.type === "date" ? void 0 : props.editor.step));
10553
11305
  let edited = false;
10554
- const resolveValue = (current) => edited ? current : untrack21(() => props.value);
11306
+ const resolveValue = (current) => edited ? current : untrack22(() => props.value);
10555
11307
  let disposed = false;
10556
11308
  onCleanup14(() => {
10557
11309
  disposed = true;
10558
11310
  });
10559
11311
  props.onRegisterFlush?.(() => {
10560
- untrack21(() => {
11312
+ untrack22(() => {
10561
11313
  const element = input();
10562
11314
  if (element && edited) {
10563
11315
  props.onCommit(element.value);
@@ -10565,7 +11317,7 @@ function NativeDateTimeEditor(props) {
10565
11317
  });
10566
11318
  });
10567
11319
  onSettled10(() => {
10568
- untrack21(input)?.focus();
11320
+ untrack22(input)?.focus();
10569
11321
  });
10570
11322
  return <>
10571
11323
  <input
@@ -10607,13 +11359,13 @@ var samePlacement = (a, b) => a === b || a !== null && b !== null && a.left ===
10607
11359
  function TypedDateTimeEditor(props) {
10608
11360
  const texts = useFeatureLocaleText();
10609
11361
  const portal = useGridPortal();
10610
- const kind = untrack21(() => props.kind);
10611
- const editor = untrack21(() => props.editor);
10612
- const typedText = untrack21(() => props.typedText);
11362
+ const kind = untrack22(() => props.kind);
11363
+ const editor = untrack22(() => props.editor);
11364
+ const typedText = untrack22(() => props.typedText);
10613
11365
  const invalidMessage = () => kind === "date" ? texts().enterDate : kind === "time" ? texts().enterTime : texts().enterDateTime;
10614
- const [input, setInput] = createSignal18();
10615
- const [popover, setPopover] = createSignal18();
10616
- const [scroller, setScroller] = createSignal18();
11366
+ const [input, setInput] = createSignal19();
11367
+ const [popover, setPopover] = createSignal19();
11368
+ const [scroller, setScroller] = createSignal19();
10617
11369
  createTopAlignedInput(input, () => props.alignTop ?? false, () => props.cellHeight ?? 0);
10618
11370
  const popupId = createUniqueId7();
10619
11371
  const handlers = {
@@ -10630,7 +11382,7 @@ function TypedDateTimeEditor(props) {
10630
11382
  return texts().enterTime;
10631
11383
  }
10632
11384
  };
10633
- const controller = untrack21(
11385
+ const controller = untrack22(
10634
11386
  () => createDateTimeEditorController({
10635
11387
  kind,
10636
11388
  value: props.value,
@@ -10644,7 +11396,7 @@ function TypedDateTimeEditor(props) {
10644
11396
  })
10645
11397
  );
10646
11398
  controller.setHandlers(handlers);
10647
- const [snapshot2, setSnapshot] = createSignal18(controller.getSnapshot(), { name: "dateTimeEditorSnapshot" });
11399
+ const [snapshot2, setSnapshot] = createSignal19(controller.getSnapshot(), { name: "dateTimeEditorSnapshot" });
10648
11400
  onCleanup14(controller.subscribe(() => setSnapshot(controller.getSnapshot())));
10649
11401
  props.onRegisterFlush?.(controller.flush);
10650
11402
  const hasCalendar = kind !== "time";
@@ -10660,10 +11412,10 @@ function TypedDateTimeEditor(props) {
10660
11412
  const rowHeight = resolveSelectOptionRowHeight3();
10661
11413
  const listCount = controller.timeList.length;
10662
11414
  const viewportHeight = Math.min(listCount, 8) * rowHeight;
10663
- const [placement2, setPlacement] = createSignal18(null);
10664
- const [scrollTop, setScrollTop] = createSignal18(0);
11415
+ const [placement2, setPlacement] = createSignal19(null);
11416
+ const [scrollTop, setScrollTop] = createSignal19(0);
10665
11417
  const measure = () => {
10666
- const anchor = untrack21(input);
11418
+ const anchor = untrack22(input);
10667
11419
  if (!anchor) {
10668
11420
  return;
10669
11421
  }
@@ -10675,7 +11427,7 @@ function TypedDateTimeEditor(props) {
10675
11427
  computeSelectPopoverPlacement3(rect, listCount, window.innerWidth, window.innerHeight, rowHeight, TIME_LIST_MIN_WIDTH)
10676
11428
  );
10677
11429
  } else {
10678
- const element = untrack21(popover);
11430
+ const element = untrack22(popover);
10679
11431
  if (!element) {
10680
11432
  return;
10681
11433
  }
@@ -10684,7 +11436,7 @@ function TypedDateTimeEditor(props) {
10684
11436
  placeDateTimePopup(rect, { width: element.offsetWidth, height: element.offsetHeight }, window.innerWidth, window.innerHeight)
10685
11437
  );
10686
11438
  }
10687
- if (!samePlacement(untrack21(placement2), next)) {
11439
+ if (!samePlacement(untrack22(placement2), next)) {
10688
11440
  setPlacement(next);
10689
11441
  }
10690
11442
  };
@@ -10693,7 +11445,7 @@ function TypedDateTimeEditor(props) {
10693
11445
  disposed = true;
10694
11446
  });
10695
11447
  onSettled10(() => {
10696
- const element = untrack21(input);
11448
+ const element = untrack22(input);
10697
11449
  if (element) {
10698
11450
  element.focus();
10699
11451
  if (typedText === void 0) {
@@ -10712,7 +11464,7 @@ function TypedDateTimeEditor(props) {
10712
11464
  window.removeEventListener("scroll", measure, true);
10713
11465
  };
10714
11466
  });
10715
- createEffect12(
11467
+ createEffect13(
10716
11468
  () => [popover(), snapshot2(), popupReady(), props.cellTop ?? 0, props.cellLeft ?? 0],
10717
11469
  outsideGraphApply(([element, , ready]) => {
10718
11470
  if (popupWanted && ready && (hasList || element)) {
@@ -10723,7 +11475,7 @@ function TypedDateTimeEditor(props) {
10723
11475
  );
10724
11476
  const opened = () => placement2() !== null;
10725
11477
  let lastAnchor = null;
10726
- createEffect12(
11478
+ createEffect13(
10727
11479
  () => [scroller(), opened(), snapshot2().listAnchor],
10728
11480
  outsideGraphApply(([element, isOpened, anchor]) => {
10729
11481
  if (!hasList || !isOpened || !element) {
@@ -10742,14 +11494,14 @@ function TypedDateTimeEditor(props) {
10742
11494
  }),
10743
11495
  { name: "dateTimeEditorRevealTime" }
10744
11496
  );
10745
- const focusInsideEditor = (next) => next instanceof Node && (untrack21(input)?.contains(next) === true || untrack21(popover)?.contains(next) === true);
11497
+ const focusInsideEditor = (next) => next instanceof Node && (untrack22(input)?.contains(next) === true || untrack22(popover)?.contains(next) === true);
10746
11498
  const handleBlur = (event) => {
10747
11499
  if (!disposed && !focusInsideEditor(event.relatedTarget)) {
10748
11500
  controller.blur();
10749
11501
  }
10750
11502
  };
10751
11503
  const handleKeyDown = (event, target) => {
10752
- if (isImeComposingKeyEvent5(event)) {
11504
+ if (isImeComposingKeyEvent6(event)) {
10753
11505
  return;
10754
11506
  }
10755
11507
  if (target === "time") {
@@ -10765,18 +11517,18 @@ function TypedDateTimeEditor(props) {
10765
11517
  };
10766
11518
  const highlight = () => snapshot2().listHighlight;
10767
11519
  const activeId = () => hasList && opened() && highlight() >= 0 ? `${popupId}-${highlight()}` : void 0;
10768
- const label = () => formatLocaleText16(hasList ? texts().timeEditorList : texts().dateEditorCalendar, { column: props.columnTitle });
11520
+ const label = () => formatLocaleText17(hasList ? texts().timeEditorList : texts().dateEditorCalendar, { column: props.columnTitle });
10769
11521
  const visible = createMemo31(() => {
10770
11522
  const window_ = resolveSelectListWindow2(scrollTop(), viewportHeight, rowHeight, listCount);
10771
11523
  return controller.timeList.slice(window_.start, window_.end).map((time, offset) => ({ time, index: window_.start + offset }));
10772
11524
  });
10773
11525
  const mount = () => popupWanted && popupReady() ? portal.container() : null;
10774
- const startText = untrack21(() => snapshot2().text);
10775
- const noticeNode = () => <Show28 when={notice() !== null}>
11526
+ const startText = untrack22(() => snapshot2().text);
11527
+ const noticeNode = () => <Show30 when={notice() !== null}>
10776
11528
  <div class="ssg-date-editor-notice" role="alert">
10777
11529
  {notice()}
10778
11530
  </div>
10779
- </Show28>;
11531
+ </Show30>;
10780
11532
  const view = <>
10781
11533
  <input
10782
11534
  ref={setInput}
@@ -10804,7 +11556,7 @@ function TypedDateTimeEditor(props) {
10804
11556
  style={props.align ? { "text-align": props.align } : void 0}
10805
11557
  />
10806
11558
  <CellEditorError message={noticeInPopup() ? null : notice()} />
10807
- <Show28 when={mount()}>
11559
+ <Show30 when={mount()}>
10808
11560
  {(container) => <Portal6 mount={container()}>
10809
11561
  <div
10810
11562
  ref={setPopover}
@@ -10832,9 +11584,9 @@ function TypedDateTimeEditor(props) {
10832
11584
  }
10833
11585
  }}
10834
11586
  >
10835
- <Show28
11587
+ <Show30
10836
11588
  when={hasCalendar ? calendarViews() : null}
10837
- fallback={<Show28 when={hasList}>
11589
+ fallback={<Show30 when={hasList}>
10838
11590
  {noticeNode()}
10839
11591
  <div
10840
11592
  ref={setScroller}
@@ -10858,17 +11610,17 @@ function TypedDateTimeEditor(props) {
10858
11610
  { "ssg-select-editor-option--highlighted": item().index === highlight() }
10859
11611
  ]}
10860
11612
  style={{ top: px(item().index * rowHeight) }}
10861
- onClick={() => controller.chooseTime(untrack21(item).index)}
11613
+ onClick={() => controller.chooseTime(untrack22(item).index)}
10862
11614
  >
10863
11615
  {item().time}
10864
11616
  </div>}
10865
11617
  </For16>
10866
11618
  </div>
10867
11619
  </div>
10868
- </Show28>}
11620
+ </Show30>}
10869
11621
  >
10870
11622
  {(views) => {
10871
- const Calendar = untrack21(views).DateEditorCalendar;
11623
+ const Calendar = untrack22(views).DateEditorCalendar;
10872
11624
  return <Calendar
10873
11625
  controller={controller}
10874
11626
  snapshot={snapshot2()}
@@ -10879,13 +11631,13 @@ function TypedDateTimeEditor(props) {
10879
11631
  notice={noticeNode()}
10880
11632
  />;
10881
11633
  }}
10882
- </Show28>
11634
+ </Show30>
10883
11635
  </div>
10884
11636
  </Portal6>}
10885
- </Show28>
11637
+ </Show30>
10886
11638
  </>;
10887
11639
  createPortalTokens(popover, () => props.themeClassName, placement2);
10888
- createRenderEffect8(
11640
+ createRenderEffect9(
10889
11641
  () => [input(), snapshot2().text],
10890
11642
  ([element, text]) => {
10891
11643
  if (element && element.value !== text) {
@@ -10895,13 +11647,13 @@ function TypedDateTimeEditor(props) {
10895
11647
  { name: "dateTimeEditorInputText" }
10896
11648
  );
10897
11649
  const timeSelection = createMemo31(() => snapshot2().timeSelection);
10898
- createRenderEffect8(
11650
+ createRenderEffect9(
10899
11651
  () => [input(), timeSelection()],
10900
11652
  ([element, timeSelection2]) => {
10901
11653
  if (!element || timeSelection2 === 0) {
10902
11654
  return;
10903
11655
  }
10904
- const text = untrack21(() => snapshot2().text);
11656
+ const text = untrack22(() => snapshot2().text);
10905
11657
  if (element.value !== text) {
10906
11658
  element.value = text;
10907
11659
  }
@@ -10929,7 +11681,7 @@ import {
10929
11681
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/multiSelect";
10930
11682
 
10931
11683
  // src/editors/MultiSelectCellEditor.tsx
10932
- import { For as For17, Show as Show29, createEffect as createEffect13, createMemo as createMemo32, createRenderEffect as createRenderEffect9, createSignal as createSignal19, createUniqueId as createUniqueId8, onCleanup as onCleanup15, onSettled as onSettled11, untrack as untrack22 } from "solid-js";
11684
+ import { For as For17, Show as Show31, createEffect as createEffect14, createMemo as createMemo32, createRenderEffect as createRenderEffect10, createSignal as createSignal20, createUniqueId as createUniqueId8, onCleanup as onCleanup15, onSettled as onSettled11, untrack as untrack23 } from "solid-js";
10933
11685
  import { Portal as Portal7 } from "@solidjs/web";
10934
11686
  import {
10935
11687
  computeSelectPopoverPlacement as computeSelectPopoverPlacement4,
@@ -10946,14 +11698,14 @@ import {
10946
11698
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectSearch";
10947
11699
  import { createMultiSelectEditorController } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/multiSelectEditorController";
10948
11700
  import { MULTI_SELECT_VISIBLE_ROWS } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/multiSelect";
10949
- import { isImeComposingKeyEvent as isImeComposingKeyEvent6 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
11701
+ import { isImeComposingKeyEvent as isImeComposingKeyEvent7 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
10950
11702
  import { isCommitToSelectionKey as isCommitToSelectionKey3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorKeys";
10951
11703
  function MatchedText2(props) {
10952
11704
  const parts = createMemo32(() => splitSelectSearchText2(props.text, props.range));
10953
11705
  return <For17 each={parts()} keyed={false}>
10954
- {(part) => <Show29 when={part().match} fallback={part().text}>
11706
+ {(part) => <Show31 when={part().match} fallback={part().text}>
10955
11707
  <mark class="ssg-select-editor-match">{part().text}</mark>
10956
- </Show29>}
11708
+ </Show31>}
10957
11709
  </For17>;
10958
11710
  }
10959
11711
  var SVG_NOT_FOCUSABLE6 = { focusable: "false" };
@@ -10973,14 +11725,14 @@ function CheckIcon() {
10973
11725
  function MultiSelectCellEditor(props) {
10974
11726
  const texts = useFeatureLocaleText();
10975
11727
  const portal = useGridPortal();
10976
- const [box, setBox] = createSignal19();
10977
- const [input, setInput] = createSignal19();
10978
- const [scroller, setScroller] = createSignal19();
10979
- const [popover, setPopover] = createSignal19();
11728
+ const [box, setBox] = createSignal20();
11729
+ const [input, setInput] = createSignal20();
11730
+ const [scroller, setScroller] = createSignal20();
11731
+ const [popover, setPopover] = createSignal20();
10980
11732
  const listId = createUniqueId8();
10981
11733
  const pointerMoved = createPointerMoveFilter3();
10982
- const [error, setError] = createSignal19(null);
10983
- const search = untrack22(() => props.search);
11734
+ const [error, setError] = createSignal20(null);
11735
+ const search = untrack23(() => props.search);
10984
11736
  const hint = () => search ? texts().multiSelectSearchHint : texts().multiSelectHint;
10985
11737
  const commitWithResult = (committed, direction) => {
10986
11738
  const result = props.onCommit(committed, direction);
@@ -10989,7 +11741,7 @@ function MultiSelectCellEditor(props) {
10989
11741
  }
10990
11742
  return result;
10991
11743
  };
10992
- const controller = untrack22(
11744
+ const controller = untrack23(
10993
11745
  () => createMultiSelectEditorController({
10994
11746
  options: props.options,
10995
11747
  value: props.value,
@@ -11000,21 +11752,21 @@ function MultiSelectCellEditor(props) {
11000
11752
  onCancel: () => props.onCancel()
11001
11753
  })
11002
11754
  );
11003
- const [snapshot2, setSnapshot] = createSignal19(controller.getSnapshot(), { name: "multiSelectSnapshot" });
11004
- createEffect13(
11755
+ const [snapshot2, setSnapshot] = createSignal20(controller.getSnapshot(), { name: "multiSelectSnapshot" });
11756
+ createEffect14(
11005
11757
  () => props.options,
11006
11758
  outsideGraphApply((options) => controller.setOptions(options)),
11007
11759
  { name: "multiSelectOptions" }
11008
11760
  );
11009
11761
  props.onRegisterFlush?.(controller.flush);
11010
11762
  const rowHeight = resolveSelectOptionRowHeight4();
11011
- const [placement2, setPlacement] = createSignal19(null);
11012
- const [scrollTop, setScrollTop] = createSignal19(0);
11763
+ const [placement2, setPlacement] = createSignal20(null);
11764
+ const [scrollTop, setScrollTop] = createSignal20(0);
11013
11765
  const listRows = createMemo32(() => Math.max(snapshot2().results.length, 1));
11014
11766
  const visibleRows = createMemo32(() => Math.min(listRows(), MULTI_SELECT_VISIBLE_ROWS));
11015
11767
  const viewportHeight = createMemo32(() => visibleRows() * rowHeight);
11016
11768
  const measure = () => {
11017
- const element = untrack22(box);
11769
+ const element = untrack23(box);
11018
11770
  if (!element) {
11019
11771
  return;
11020
11772
  }
@@ -11023,7 +11775,7 @@ function MultiSelectCellEditor(props) {
11023
11775
  element,
11024
11776
  computeSelectPopoverPlacement4(
11025
11777
  element.getBoundingClientRect(),
11026
- untrack22(visibleRows) + 1,
11778
+ untrack23(visibleRows) + 1,
11027
11779
  window.innerWidth,
11028
11780
  window.innerHeight,
11029
11781
  rowHeight,
@@ -11045,7 +11797,7 @@ function MultiSelectCellEditor(props) {
11045
11797
  };
11046
11798
  let disposed = false;
11047
11799
  onSettled11(() => {
11048
- const element = search ? untrack22(input) : untrack22(box);
11800
+ const element = search ? untrack23(input) : untrack23(box);
11049
11801
  if (element) {
11050
11802
  element.focus();
11051
11803
  if (element instanceof HTMLInputElement) {
@@ -11069,7 +11821,7 @@ function MultiSelectCellEditor(props) {
11069
11821
  disposed = true;
11070
11822
  });
11071
11823
  let measuredKey;
11072
- createEffect13(
11824
+ createEffect14(
11073
11825
  () => `${visibleRows()}:${props.cellTop ?? 0}:${props.cellLeft ?? 0}`,
11074
11826
  outsideGraphApply((key) => {
11075
11827
  const previous = measuredKey;
@@ -11080,13 +11832,13 @@ function MultiSelectCellEditor(props) {
11080
11832
  }),
11081
11833
  { name: "multiSelectMeasure" }
11082
11834
  );
11083
- createEffect13(
11835
+ createEffect14(
11084
11836
  () => [snapshot2().results, scroller(), viewportHeight()],
11085
11837
  outsideGraphApply(([, element, height]) => reveal(element, height)),
11086
11838
  { name: "multiSelectReveal" }
11087
11839
  );
11088
11840
  const handleKeyDown = (event) => {
11089
- if (isImeComposingKeyEvent6(event)) {
11841
+ if (isImeComposingKeyEvent7(event)) {
11090
11842
  return;
11091
11843
  }
11092
11844
  if (props.onCommitToSelection !== void 0 && isCommitToSelectionKey3(event)) {
@@ -11104,7 +11856,7 @@ function MultiSelectCellEditor(props) {
11104
11856
  setError(null);
11105
11857
  }
11106
11858
  if (after.highlight !== before.highlight) {
11107
- reveal(untrack22(scroller), untrack22(viewportHeight));
11859
+ reveal(untrack23(scroller), untrack23(viewportHeight));
11108
11860
  }
11109
11861
  }
11110
11862
  };
@@ -11126,7 +11878,7 @@ function MultiSelectCellEditor(props) {
11126
11878
  return listShown() && highlight >= 0 && results()[highlight] ? `${listId}-${highlight}` : void 0;
11127
11879
  };
11128
11880
  const mount = () => placement2() !== null ? portal.container() : null;
11129
- const initialText = untrack22(() => snapshot2().text);
11881
+ const initialText = untrack23(() => snapshot2().text);
11130
11882
  const justify = () => props.align === "right" ? "flex-end" : props.align === "center" ? "center" : void 0;
11131
11883
  const view = <>
11132
11884
  <div
@@ -11151,7 +11903,7 @@ function MultiSelectCellEditor(props) {
11151
11903
  onKeyDown={search ? void 0 : handleKeyDown}
11152
11904
  onBlur={search ? void 0 : handleBlur}
11153
11905
  onPointerDown={(event) => {
11154
- const field2 = untrack22(input);
11906
+ const field2 = untrack23(input);
11155
11907
  if (search && event.target !== field2) {
11156
11908
  event.preventDefault();
11157
11909
  field2?.focus();
@@ -11170,7 +11922,7 @@ function MultiSelectCellEditor(props) {
11170
11922
  onPointerDown={(event) => event.preventDefault()}
11171
11923
  onClick={() => {
11172
11924
  setError(null);
11173
- controller.remove(untrack22(chip).value);
11925
+ controller.remove(untrack23(chip).value);
11174
11926
  }}
11175
11927
  >
11176
11928
  ×
@@ -11178,7 +11930,7 @@ function MultiSelectCellEditor(props) {
11178
11930
  </span>}
11179
11931
  </For17>
11180
11932
  </span>
11181
- <Show29 when={search}>
11933
+ <Show31 when={search}>
11182
11934
  <input
11183
11935
  ref={setInput}
11184
11936
  type="text"
@@ -11198,14 +11950,14 @@ function MultiSelectCellEditor(props) {
11198
11950
  spellcheck="false"
11199
11951
  class="ssg-multi-select-editor-search"
11200
11952
  />
11201
- </Show29>
11953
+ </Show31>
11202
11954
  </div>
11203
11955
  {
11204
11956
  /* 変更(1.11.0 / レビュー EB-4): 一覧を出している間は、検査で拒まれた知らせを一覧の下(操作の説明の所)に出します
11205
11957
  (セルの下の吹き出しは一覧に隠れていた)。一覧が隠れているときだけ吹き出し。React 版と同じ。 */
11206
11958
  }
11207
11959
  <CellEditorError message={mount() !== null && placement2()?.hidden !== true ? null : error()} />
11208
- <Show29 when={mount()}>
11960
+ <Show31 when={mount()}>
11209
11961
  {(container) => <Portal7 mount={container()}>
11210
11962
  <div
11211
11963
  ref={setPopover}
@@ -11227,7 +11979,7 @@ function MultiSelectCellEditor(props) {
11227
11979
  }}
11228
11980
  onPointerDown={(event) => event.preventDefault()}
11229
11981
  >
11230
- <Show29 when={status() === "error"}>
11982
+ <Show31 when={status() === "error"}>
11231
11983
  <div class="ssg-select-editor-empty ssg-select-editor-error" role="alert">
11232
11984
  <span class="ssg-select-editor-error-text" title={snapshot2().errorMessage ?? void 0}>
11233
11985
  {texts().multiSelectFailed}
@@ -11236,13 +11988,13 @@ function MultiSelectCellEditor(props) {
11236
11988
  {texts().retry}
11237
11989
  </button>
11238
11990
  </div>
11239
- </Show29>
11240
- <Show29 when={status() !== "error" && results().length === 0}>
11991
+ </Show31>
11992
+ <Show31 when={status() !== "error" && results().length === 0}>
11241
11993
  <div class="ssg-select-editor-empty" role="status">
11242
11994
  {status() === "loading" ? texts().multiSelectLoading : snapshot2().filtered ? texts().multiSelectNoMatch : texts().noOptions}
11243
11995
  </div>
11244
- </Show29>
11245
- <Show29 when={results().length > 0}>
11996
+ </Show31>
11997
+ <Show31 when={results().length > 0}>
11246
11998
  <div
11247
11999
  ref={setScroller}
11248
12000
  role="listbox"
@@ -11274,52 +12026,52 @@ function MultiSelectCellEditor(props) {
11274
12026
  style={{ top: px(item().index * rowHeight) }}
11275
12027
  onClick={() => {
11276
12028
  setError(null);
11277
- controller.toggle(untrack22(item).index);
12029
+ controller.toggle(untrack23(item).index);
11278
12030
  }}
11279
12031
  onPointerEnter={(event) => revealOverflowTitle3(event.currentTarget)}
11280
12032
  onPointerMove={(event) => {
11281
12033
  if (pointerMoved(event)) {
11282
- controller.hover(untrack22(item).index);
12034
+ controller.hover(untrack23(item).index);
11283
12035
  }
11284
12036
  }}
11285
12037
  >
11286
12038
  <span class="ssg-multi-select-check" aria-hidden="true">
11287
- <Show29 when={checked()}>
12039
+ <Show31 when={checked()}>
11288
12040
  <CheckIcon />
11289
- </Show29>
12041
+ </Show31>
11290
12042
  </span>
11291
12043
  <span class="ssg-select-editor-option-label">
11292
12044
  <MatchedText2 text={item().result.option.label} range={item().result.labelMatch} />
11293
12045
  </span>
11294
- <Show29 when={item().result.option.description}>
12046
+ <Show31 when={item().result.option.description}>
11295
12047
  {(description) => <span class="ssg-select-editor-option-description">
11296
12048
  <MatchedText2 text={description()} range={item().result.descriptionMatch} />
11297
12049
  </span>}
11298
- </Show29>
12050
+ </Show31>
11299
12051
  </div>;
11300
12052
  }}
11301
12053
  </For17>
11302
12054
  </div>
11303
12055
  </div>
11304
- </Show29>
11305
- <Show29
12056
+ </Show31>
12057
+ <Show31
11306
12058
  when={error() === null}
11307
12059
  fallback={<div class="ssg-multi-select-hint ssg-multi-select-hint--error" role="alert" style={{ "min-height": px(rowHeight) }}>
11308
12060
  {error()}
11309
12061
  </div>}
11310
12062
  >
11311
- <Show29 when={hint() !== ""}>
12063
+ <Show31 when={hint() !== ""}>
11312
12064
  <div class="ssg-multi-select-hint" aria-hidden="true" style={{ "min-height": px(rowHeight) }}>
11313
12065
  {hint()}
11314
12066
  </div>
11315
- </Show29>
11316
- </Show29>
12067
+ </Show31>
12068
+ </Show31>
11317
12069
  </div>
11318
12070
  </Portal7>}
11319
- </Show29>
12071
+ </Show31>
11320
12072
  </>;
11321
12073
  createPortalTokens(popover, () => props.themeClassName, placement2);
11322
- createRenderEffect9(
12074
+ createRenderEffect10(
11323
12075
  () => [input(), snapshot2().text],
11324
12076
  ([element, text]) => {
11325
12077
  if (element && element.value !== text) {
@@ -11332,9 +12084,9 @@ function MultiSelectCellEditor(props) {
11332
12084
  }
11333
12085
 
11334
12086
  // src/view/GridMultiSelectChips.tsx
11335
- import { For as For18, Show as Show30 } from "solid-js";
12087
+ import { For as For18, Show as Show32 } from "solid-js";
11336
12088
  function GridMultiSelectChips(props) {
11337
- return <Show30 when={props.labels.length > 0}>
12089
+ return <Show32 when={props.labels.length > 0}>
11338
12090
  <span class="ssg-multi-select-chips" data-ssg-tooltip-overflow={props.labels.join(props.separator)}>
11339
12091
  <For18 each={props.labels} keyed={false}>
11340
12092
  {(label, index) => <span class="ssg-multi-select-chip">
@@ -11342,7 +12094,7 @@ function GridMultiSelectChips(props) {
11342
12094
  </span>}
11343
12095
  </For18>
11344
12096
  </span>
11345
- </Show30>;
12097
+ </Show32>;
11346
12098
  }
11347
12099
 
11348
12100
  // src/features/multiSelect.ts
@@ -11370,6 +12122,141 @@ var changeTrackingFeature = {
11370
12122
  localeText: DEFAULT_CHANGE_TRACKING_LOCALE_TEXT
11371
12123
  };
11372
12124
 
12125
+ // src/features/diffView.ts
12126
+ import { createRowDiffer } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/rowDiffer";
12127
+ import { createDiffStage } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/diffStage";
12128
+ import { collectChangeTargets } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/changeNavigation";
12129
+ import {
12130
+ describeChangeNavTarget,
12131
+ describeDiffCell,
12132
+ formatDiffOriginalText,
12133
+ formatDiffSummaryParts,
12134
+ nextChangeNavAnnouncement
12135
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/diffView";
12136
+ import { DEFAULT_DIFF_VIEW_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
12137
+
12138
+ // src/view/GridDiffBar.tsx
12139
+ import { For as For19, Show as Show33 } from "solid-js";
12140
+ var keepFocus = (event, run) => {
12141
+ const button = event.currentTarget;
12142
+ run();
12143
+ if (button.isConnected && button.ownerDocument.activeElement !== button) {
12144
+ button.focus({ preventScroll: true });
12145
+ }
12146
+ };
12147
+ function GridDiffBarChip(props) {
12148
+ return <>
12149
+ <span class="ssg-bar-chip ssg-bar-chip--diff">
12150
+ <Show33 when={props.parts} fallback={props.comparingText}>
12151
+ {(parts) => <For19 each={parts()} keyed={(part) => part.kind}>
12152
+ {(part, index) => <span class="ssg-bar-diff-part" data-kind={part().kind}>
12153
+ <Show33 when={index() > 0}>
12154
+ <span class="ssg-bar-diff-sep">{props.separator}</span>
12155
+ </Show33>
12156
+ <span class="ssg-bar-diff-count">{part().text}</span>
12157
+ </span>}
12158
+ </For19>}
12159
+ </Show33>
12160
+ </span>
12161
+ <span class="ssg-bar-diff-nav">
12162
+ <button
12163
+ type="button"
12164
+ class="ssg-bar-diff-nav-btn"
12165
+ aria-label={props.prevLabel}
12166
+ data-ssg-tooltip={props.prevLabel}
12167
+ disabled={!props.canNavigate}
12168
+ onClick={(event) => keepFocus(event, props.onPrev)}
12169
+ >
12170
+ <span aria-hidden="true">{"\u25B2"}</span>
12171
+ </button>
12172
+ <button
12173
+ type="button"
12174
+ class="ssg-bar-diff-nav-btn"
12175
+ aria-label={props.nextLabel}
12176
+ data-ssg-tooltip={props.nextLabel}
12177
+ disabled={!props.canNavigate}
12178
+ onClick={(event) => keepFocus(event, props.onNext)}
12179
+ >
12180
+ <span aria-hidden="true">{"\u25BC"}</span>
12181
+ </button>
12182
+ </span>
12183
+ </>;
12184
+ }
12185
+
12186
+ // src/features/diffView.ts
12187
+ var diffViewFeature = {
12188
+ createRowDiffer,
12189
+ createDiffStage,
12190
+ collectChangeTargets,
12191
+ describeDiffCell,
12192
+ formatDiffOriginalText,
12193
+ formatDiffSummaryParts,
12194
+ describeChangeNavTarget,
12195
+ nextChangeNavAnnouncement,
12196
+ DiffBarChip: GridDiffBarChip,
12197
+ localeText: DEFAULT_DIFF_VIEW_LOCALE_TEXT
12198
+ };
12199
+
12200
+ // src/features/rangeDecorations.ts
12201
+ import { createRangeDecorationResolver } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/rangeDecorations";
12202
+
12203
+ // src/view/GridRangeDecorations.tsx
12204
+ import { For as For20, Show as Show34, createMemo as createMemo33 } from "solid-js";
12205
+ function GridRangeDecorationFrames(props) {
12206
+ return <For20 each={props.frames} keyed={(frame2) => frame2.key}>
12207
+ {(frame2) => {
12208
+ const label = createMemo33(() => frame2().label);
12209
+ return <div
12210
+ aria-hidden="true"
12211
+ data-ssg-range-decoration={frame2().id}
12212
+ class={[
12213
+ "ssg-range-decoration",
12214
+ {
12215
+ "ssg-range-decoration--fill": frame2().fill,
12216
+ "ssg-range-decoration--dashed": frame2().dashed,
12217
+ "ssg-range-decoration--open-left": frame2().openLeft,
12218
+ "ssg-range-decoration--open-right": frame2().openRight,
12219
+ "ssg-range-decoration--open-top": frame2().openTop,
12220
+ "ssg-range-decoration--open-bottom": frame2().openBottom
12221
+ }
12222
+ ]}
12223
+ style={{
12224
+ position: "absolute",
12225
+ left: px(props.leadingWidth + frame2().rect.left),
12226
+ top: px(props.headerHeight + frame2().rect.top - props.baseOffset),
12227
+ width: px(frame2().rect.width),
12228
+ height: px(frame2().rect.height),
12229
+ "--ssg-range-decoration-color": frame2().color
12230
+ }}
12231
+ >
12232
+ <Show34 when={label()}>
12233
+ {(current) => <span
12234
+ class={[
12235
+ "ssg-range-decoration-label",
12236
+ {
12237
+ "ssg-range-decoration-label--right": current().side === "right",
12238
+ "ssg-range-decoration-label--inside": current().inside
12239
+ }
12240
+ ]}
12241
+ style={{
12242
+ "--ssg-range-decoration-label-color": current().color,
12243
+ top: current().offsetTop > 0 ? px(current().offsetTop + 1) : void 0
12244
+ }}
12245
+ >
12246
+ {current().text}
12247
+ </span>}
12248
+ </Show34>
12249
+ </div>;
12250
+ }}
12251
+ </For20>;
12252
+ }
12253
+
12254
+ // src/features/rangeDecorations.ts
12255
+ var rangeDecorationsFeature = {
12256
+ createRangeDecorationResolver,
12257
+ RangeDecorationFrames: GridRangeDecorationFrames
12258
+ };
12259
+
11373
12260
  // src/features/excelShortcuts.ts
11374
12261
  import { createExcelShortcutCommands } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/excelShortcutCommands";
11375
12262
  var excelShortcutsFeature = {
@@ -11398,29 +12285,29 @@ import { createTreeStage } from "@ishibashi0112/spreadsheet-grid-core/internal/e
11398
12285
  import { DEFAULT_TREE_DATA_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
11399
12286
 
11400
12287
  // src/view/GridTreeCell.tsx
11401
- import { createMemo as createMemo33, Show as Show31 } from "solid-js";
11402
- import { formatLocaleText as formatLocaleText17 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
12288
+ import { createMemo as createMemo34, Show as Show35 } from "solid-js";
12289
+ import { formatLocaleText as formatLocaleText18 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
11403
12290
  import {
11404
12291
  formatTotalRowCellText as formatTotalRowCellText2,
11405
12292
  resolveTotalRowCaption as resolveTotalRowCaption2
11406
12293
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/totalRow";
11407
12294
  function GridTreeCellPrefix(props) {
11408
12295
  const texts = useFeatureLocaleText();
11409
- const label = createMemo33(() => {
12296
+ const label = createMemo34(() => {
11410
12297
  const name = props.rowLabel.trim();
11411
- return formatLocaleText17(props.open ? texts().collapseTreeRow : texts().expandTreeRow, {
11412
- row: name !== "" ? name : formatLocaleText17(texts().treeRowNumber, { row: props.rowNumber })
12298
+ return formatLocaleText18(props.open ? texts().collapseTreeRow : texts().expandTreeRow, {
12299
+ row: name !== "" ? name : formatLocaleText18(texts().treeRowNumber, { row: props.rowNumber })
11413
12300
  });
11414
12301
  });
11415
12302
  return <>
11416
- <Show31 when={props.level > 0}>
12303
+ <Show35 when={props.level > 0}>
11417
12304
  <span
11418
12305
  aria-hidden="true"
11419
12306
  class="ssg-tree-indent"
11420
12307
  style={{ width: `calc(var(--ssg-tree-indent) * ${props.level})` }}
11421
12308
  />
11422
- </Show31>
11423
- <Show31 when={props.hasChildren} fallback={<span aria-hidden="true" class="ssg-tree-spacer" />}>
12309
+ </Show35>
12310
+ <Show35 when={props.hasChildren} fallback={<span aria-hidden="true" class="ssg-tree-spacer" />}>
11424
12311
  <button
11425
12312
  type="button"
11426
12313
  tabindex={-1}
@@ -11441,28 +12328,28 @@ function GridTreeCellPrefix(props) {
11441
12328
  >
11442
12329
  {props.open ? "\u25BE" : "\u25B8"}
11443
12330
  </button>
11444
- </Show31>
12331
+ </Show35>
11445
12332
  </>;
11446
12333
  }
11447
12334
  function GridTreeAggregateValue(props) {
11448
12335
  const texts = useFeatureLocaleText();
11449
- const shown = createMemo33(() => {
12336
+ const shown = createMemo34(() => {
11450
12337
  const column = props.column;
11451
12338
  const kind = typeof column.aggFunc === "string" ? column.aggFunc : "custom";
11452
12339
  const text = formatTotalRowCellText2(column, { value: props.value, kind });
11453
12340
  return text === "" ? null : { text, caption: resolveTotalRowCaption2(kind, texts()) };
11454
12341
  });
11455
- return <Show31 when={shown()}>
12342
+ return <Show35 when={shown()}>
11456
12343
  {(current) => <span
11457
12344
  class="ssg-group-value ssg-tree-aggregate"
11458
12345
  data-ssg-tooltip-overflow={current().caption !== void 0 ? `${current().caption} ${current().text}` : current().text}
11459
12346
  >
11460
- <Show31 when={current().caption !== void 0}>
12347
+ <Show35 when={current().caption !== void 0}>
11461
12348
  <span class="ssg-group-caption">{current().caption}</span>
11462
- </Show31>
12349
+ </Show35>
11463
12350
  {current().text}
11464
12351
  </span>}
11465
- </Show31>;
12352
+ </Show35>;
11466
12353
  }
11467
12354
 
11468
12355
  // src/features/treeData.ts
@@ -11482,7 +12369,7 @@ var treeDataFeature = {
11482
12369
  import { DEFAULT_AGGREGATES_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
11483
12370
 
11484
12371
  // src/primitives/selectionAggregates.ts
11485
- import { createMemo as createMemo34 } from "solid-js";
12372
+ import { createMemo as createMemo35 } from "solid-js";
11486
12373
  import {
11487
12374
  createSelectionAggregatesRunner,
11488
12375
  resolveSyncSelectionAggregates,
@@ -11494,15 +12381,15 @@ import {
11494
12381
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectionAggregates";
11495
12382
  function createSelectionAggregates(args) {
11496
12383
  const stabilizeTarget = createSelectionAggregateTargetStabilizer();
11497
- const target = createMemo34(() => {
12384
+ const target = createMemo35(() => {
11498
12385
  const current = args();
11499
12386
  return stabilizeTarget(
11500
12387
  current.enabled ? resolveSelectionAggregateTarget(current.selection, current.viewRowCount, current.orderedColumns) : null
11501
12388
  );
11502
12389
  });
11503
- const rowModel = createMemo34(() => args().rowModel);
11504
- const key = createMemo34(() => ({ rowModel: rowModel(), target: target() }));
11505
- const syncResult = createMemo34(() => resolveSyncSelectionAggregates(key()));
12390
+ const rowModel = createMemo35(() => args().rowModel);
12391
+ const key = createMemo35(() => ({ rowModel: rowModel(), target: target() }));
12392
+ const syncResult = createMemo35(() => resolveSyncSelectionAggregates(key()));
11506
12393
  const runner = createSelectionAggregatesRunner();
11507
12394
  connectController(
11508
12395
  runner,
@@ -11511,16 +12398,16 @@ function createSelectionAggregates(args) {
11511
12398
  "selectionAggregates"
11512
12399
  );
11513
12400
  const snapshot2 = createExternalStoreSignal(runner, "selectionAggregatesStore");
11514
- return createMemo34(() => selectSelectionAggregatesResult(syncResult(), snapshot2(), key()));
12401
+ return createMemo35(() => selectSelectionAggregatesResult(syncResult(), snapshot2(), key()));
11515
12402
  }
11516
12403
 
11517
12404
  // src/view/GridSelectionAggregates.tsx
11518
- import { For as For19, Show as Show32, createMemo as createMemo35 } from "solid-js";
12405
+ import { For as For21, Show as Show36, createMemo as createMemo36 } from "solid-js";
11519
12406
  import { formatSelectionAggregateNumber } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectionAggregates";
11520
- import { formatLocaleText as formatLocaleText18 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
12407
+ import { formatLocaleText as formatLocaleText19 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
11521
12408
  function GridSelectionAggregates(props) {
11522
12409
  const texts = useFeatureLocaleText();
11523
- const chips = createMemo35(() => {
12410
+ const chips = createMemo36(() => {
11524
12411
  const aggregates = props.aggregates;
11525
12412
  if (!aggregates) {
11526
12413
  return null;
@@ -11530,7 +12417,7 @@ function GridSelectionAggregates(props) {
11530
12417
  return [
11531
12418
  {
11532
12419
  key: "computing",
11533
- text: formatLocaleText18(localeTexts.aggregateComputing, { percent: Math.floor(aggregates.progress * 100) })
12420
+ text: formatLocaleText19(localeTexts.aggregateComputing, { percent: Math.floor(aggregates.progress * 100) })
11534
12421
  }
11535
12422
  ];
11536
12423
  }
@@ -11553,12 +12440,12 @@ function GridSelectionAggregates(props) {
11553
12440
  }
11554
12441
  return list;
11555
12442
  });
11556
- return <Show32 when={chips()}>
12443
+ return <Show36 when={chips()}>
11557
12444
  {(list) => <div class={["ssg-bar-aggregates", { "ssg-bar-aggregates--trailing": props.trailing }]}>
11558
12445
  <div class="ssg-bar-aggregates-inner" title={list().map((chip) => chip.text).join(" ")}>
11559
12446
  <div class="ssg-bar-aggregates-list">
11560
12447
  <span class="ssg-bar-aggregates-fit" aria-hidden="true" />
11561
- <For19 each={list()} keyed={(chip) => chip.key}>
12448
+ <For21 each={list()} keyed={(chip) => chip.key}>
11562
12449
  {(chip, index) => <span
11563
12450
  class={[
11564
12451
  "ssg-bar-chip",
@@ -11569,16 +12456,16 @@ function GridSelectionAggregates(props) {
11569
12456
  ]}
11570
12457
  style={{ order: String(-index()) }}
11571
12458
  >
11572
- <Show32 when={chip().label !== void 0} fallback={chip().text}>
12459
+ <Show36 when={chip().label !== void 0} fallback={chip().text}>
11573
12460
  {chip().label}
11574
12461
  <b class="ssg-bar-aggregate-value">{chip().value}</b>
11575
- </Show32>
12462
+ </Show36>
11576
12463
  </span>}
11577
- </For19>
12464
+ </For21>
11578
12465
  </div>
11579
12466
  </div>
11580
12467
  </div>}
11581
- </Show32>;
12468
+ </Show36>;
11582
12469
  }
11583
12470
 
11584
12471
  // src/features/selectionAggregates.ts
@@ -11589,7 +12476,7 @@ var selectionAggregatesFeature = {
11589
12476
  };
11590
12477
 
11591
12478
  // src/primitives/toolPanel.ts
11592
- import { createMemo as createMemo36 } from "solid-js";
12479
+ import { createMemo as createMemo37 } from "solid-js";
11593
12480
  import {
11594
12481
  createToolPanelController,
11595
12482
  resolveActiveToolPanelTab,
@@ -11608,7 +12495,7 @@ function createToolPanel(inputs) {
11608
12495
  onSuppressedEscape: inputs.onSuppressedEscape
11609
12496
  }), "render", "toolPanel");
11610
12497
  const snapshot2 = createExternalStoreSignal(controller, "toolPanelStore");
11611
- const availableTabs = createMemo36(
12498
+ const availableTabs = createMemo37(
11612
12499
  () => resolveAvailableToolPanelTabs({
11613
12500
  canUseFilterTab: inputs.canUseFilterTab(),
11614
12501
  canUseColumnsTab: inputs.canUseColumnsTab(),
@@ -11617,10 +12504,10 @@ function createToolPanel(inputs) {
11617
12504
  { equals: sameTabs }
11618
12505
  );
11619
12506
  return {
11620
- activeTab: createMemo36(() => resolveActiveToolPanelTab(snapshot2().requestedTab, availableTabs())),
12507
+ activeTab: createMemo37(() => resolveActiveToolPanelTab(snapshot2().requestedTab, availableTabs())),
11621
12508
  availableTabs,
11622
- layout: createMemo36(() => snapshot2().layout),
11623
- flashTick: createMemo36(() => snapshot2().flashTick),
12509
+ layout: createMemo37(() => snapshot2().layout),
12510
+ flashTick: createMemo37(() => snapshot2().flashTick),
11624
12511
  panelRef: controller.panelRef,
11625
12512
  open: controller.open,
11626
12513
  close: controller.close,
@@ -11644,7 +12531,7 @@ import {
11644
12531
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/totalRow";
11645
12532
 
11646
12533
  // src/view/GridTotalRow.tsx
11647
- import { For as For20, Show as Show33, createMemo as createMemo37 } from "solid-js";
12534
+ import { For as For22, Show as Show37, createMemo as createMemo38 } from "solid-js";
11648
12535
  import {
11649
12536
  formatTotalRowCellText as formatTotalRowCellText3,
11650
12537
  resolveTotalRowCaption as resolveTotalRowCaption3
@@ -11671,7 +12558,7 @@ function GridTotalRow(props) {
11671
12558
  ...props.stickyBottom > 0 ? { bottom: px(props.stickyBottom) } : null
11672
12559
  }}
11673
12560
  >
11674
- <Show33 when={props.ownsRowHeader}>
12561
+ <Show37 when={props.ownsRowHeader}>
11675
12562
  <div
11676
12563
  role={rowHeaderIsCell() ? "rowheader" : void 0}
11677
12564
  aria-colindex={rowHeaderIsCell() ? 1 : void 0}
@@ -11686,13 +12573,13 @@ function GridTotalRow(props) {
11686
12573
  >
11687
12574
  {rowHeaderText() === "" ? null : rowHeaderText()}
11688
12575
  </div>
11689
- </Show33>
11690
- <For20 each={props.entries} keyed={(entry) => entry.column.key}>
12576
+ </Show37>
12577
+ <For22 each={props.entries} keyed={(entry) => entry.column.key}>
11691
12578
  {(entry) => {
11692
- const unbound = createMemo37(() => entry().column);
12579
+ const unbound = createMemo38(() => entry().column);
11693
12580
  const cell = () => props.cells.get(unbound().key);
11694
12581
  const isLabelCell = () => unbound().key === props.labelColumnKey;
11695
- const content = createMemo37(() => {
12582
+ const content = createMemo38(() => {
11696
12583
  const total = cell();
11697
12584
  if (total) {
11698
12585
  const column = unbound();
@@ -11744,7 +12631,7 @@ function GridTotalRow(props) {
11744
12631
  {content()}
11745
12632
  </div>;
11746
12633
  }}
11747
- </For20>
12634
+ </For22>
11748
12635
  </div>
11749
12636
  </>;
11750
12637
  }
@@ -11770,11 +12657,15 @@ var fullGridFeatures = {
11770
12657
  scrollHint: scrollHintFeature,
11771
12658
  motionExtras: motionExtrasFeature,
11772
12659
  find: findFeature,
12660
+ findReplace: findReplaceFeature,
12661
+ richCopy: richCopyFeature,
11773
12662
  imeDirectInput: imeDirectInputFeature,
11774
12663
  selectSearch: selectSearchFeature,
11775
12664
  dateTimeEditors: dateTimeEditorsFeature,
11776
12665
  multiSelect: multiSelectFeature,
11777
12666
  changeTracking: changeTrackingFeature,
12667
+ diffView: diffViewFeature,
12668
+ rangeDecorations: rangeDecorationsFeature,
11778
12669
  excelShortcuts: excelShortcutsFeature,
11779
12670
  newRow: newRowFeature,
11780
12671
  treeData: treeDataFeature,
@@ -11822,11 +12713,13 @@ export {
11822
12713
  contextMenuFeature,
11823
12714
  createSpreadsheetGrid,
11824
12715
  dateTimeEditorsFeature,
12716
+ diffViewFeature,
11825
12717
  excelShortcutsFeature,
11826
12718
  exportFeature,
11827
12719
  fillHandleFeature,
11828
12720
  filteringFeature,
11829
12721
  findFeature,
12722
+ findReplaceFeature,
11830
12723
  groupingFeature,
11831
12724
  imeDirectInputFeature,
11832
12725
  labelRowFeature,
@@ -11837,7 +12730,9 @@ export {
11837
12730
  numberParser,
11838
12731
  pinnedRowsFeature,
11839
12732
  preloadGridPopups,
12733
+ rangeDecorationsFeature,
11840
12734
  restoreColumnsFromState,
12735
+ richCopyFeature,
11841
12736
  rowDragFeature,
11842
12737
  scrollHintFeature,
11843
12738
  selectSearchFeature,