@rowsncolumns/spreadsheet 10.19.2 → 10.19.4

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.
Files changed (39) hide show
  1. package/dist/cjs/api/entry-selections.d.ts +85 -0
  2. package/dist/cjs/api/entry-selections.d.ts.map +1 -0
  3. package/dist/cjs/api/entry-selections.js +122 -0
  4. package/dist/cjs/atoms/entry-selections.atom.d.ts +11 -0
  5. package/dist/cjs/atoms/entry-selections.atom.d.ts.map +1 -0
  6. package/dist/cjs/atoms/entry-selections.atom.js +11 -0
  7. package/dist/cjs/components/canvas-grid/index.d.ts.map +1 -1
  8. package/dist/cjs/components/canvas-grid/index.js +183 -23
  9. package/dist/cjs/hooks/use-editable.d.ts +9 -1
  10. package/dist/cjs/hooks/use-editable.d.ts.map +1 -1
  11. package/dist/cjs/hooks/use-editable.js +12 -10
  12. package/dist/cjs/hooks/use-editor-change.d.ts +7 -3
  13. package/dist/cjs/hooks/use-editor-change.d.ts.map +1 -1
  14. package/dist/cjs/hooks/use-editor-change.js +12 -14
  15. package/dist/cjs/hooks/use-editor-submit.d.ts +4 -2
  16. package/dist/cjs/hooks/use-editor-submit.d.ts.map +1 -1
  17. package/dist/cjs/hooks/use-editor-submit.js +5 -0
  18. package/dist/cjs/release-date.js +1 -1
  19. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  20. package/dist/esm/api/entry-selections.d.ts +85 -0
  21. package/dist/esm/api/entry-selections.d.ts.map +1 -0
  22. package/dist/esm/api/entry-selections.js +88 -0
  23. package/dist/esm/atoms/entry-selections.atom.d.ts +11 -0
  24. package/dist/esm/atoms/entry-selections.atom.d.ts.map +1 -0
  25. package/dist/esm/atoms/entry-selections.atom.js +8 -0
  26. package/dist/esm/components/canvas-grid/index.d.ts.map +1 -1
  27. package/dist/esm/components/canvas-grid/index.js +180 -23
  28. package/dist/esm/hooks/use-editable.d.ts +9 -1
  29. package/dist/esm/hooks/use-editable.d.ts.map +1 -1
  30. package/dist/esm/hooks/use-editable.js +7 -5
  31. package/dist/esm/hooks/use-editor-change.d.ts +7 -3
  32. package/dist/esm/hooks/use-editor-change.d.ts.map +1 -1
  33. package/dist/esm/hooks/use-editor-change.js +10 -12
  34. package/dist/esm/hooks/use-editor-submit.d.ts +4 -2
  35. package/dist/esm/hooks/use-editor-submit.d.ts.map +1 -1
  36. package/dist/esm/hooks/use-editor-submit.js +5 -0
  37. package/dist/esm/release-date.js +1 -1
  38. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  39. package/package.json +1 -1
@@ -161,15 +161,15 @@ var MEDIA_KEYS = new Set([
161
161
  */
162
162
  var useEditable = function (_a) {
163
163
  var _b, _c;
164
- var _d = _a.getEditor, getEditor = _d === void 0 ? exports.getDefaultEditor : _d, getValue = _a.getValue, getTextFormatRuns = _a.getTextFormatRuns, onChange = _a.onChange, onSubmit = _a.onSubmit, onCancel = _a.onCancel, onBlur = _a.onBlur, onDelete = _a.onDelete, sheetId = _a.sheetId, _e = _a.selections, selections = _e === void 0 ? config_1.DEFAULT_ARRAY : _e, activeCell = _a.activeCell, _f = _a.canEdit, canEdit = _f === void 0 ? defaultCanEdit : _f, _g = _a.canView, canView = _g === void 0 ? defaultCanView : _g, _h = _a.frozenRows, frozenRows = _h === void 0 ? 0 : _h, _j = _a.frozenColumns, frozenColumns = _j === void 0 ? 0 : _j, _k = _a.hideOnBlur, hideOnBlur = _k === void 0 ? true : _k, _l = _a.isHiddenRow, isHiddenRow = _l === void 0 ? defaultIsHidden : _l, _m = _a.isHiddenColumn, isHiddenColumn = _m === void 0 ? defaultIsHidden : _m, rowCount = _a.rowCount, columnCount = _a.columnCount, _o = _a.selectionTopBound, selectionTopBound = _o === void 0 ? 0 : _o, _p = _a.selectionBottomBound, selectionBottomBound = _p === void 0 ? rowCount : _p, _q = _a.selectionLeftBound, selectionLeftBound = _q === void 0 ? 0 : _q, _r = _a.selectionRightBound, selectionRightBound = _r === void 0 ? columnCount : _r, _s = _a.enableEditOnEnterKey, enableEditOnEnterKey = _s === void 0 ? true : _s, _t = _a.keymap, keymap = _t === void 0 ? "sheets" : _t, clearSelections = _a.clearSelections, onRequestCut = _a.onRequestCut, shouldHandleKeyDown = _a.shouldHandleKeyDown, sticky = _a.sticky, editorBorderColor = _a.editorBorderColor, editorBorderOutlineColor = _a.editorBorderOutlineColor, onBeforeEdit = _a.onBeforeEdit, onKeyDown = _a.onKeyDown, onEditorKeyDown = _a.onEditorKeyDown, getCellOffsetFromCoords = _a.getCellOffsetFromCoords, getCellCoordsFromOffset = _a.getCellCoordsFromOffset, getCellBounds = _a.getCellBounds, focus = _a.focus, getActualCellCoords = _a.getActualCellCoords, scrollToCell = _a.scrollToCell, onChangeBatch = _a.onChangeBatch, _u = _a.containerWidth, containerWidth = _u === void 0 ? 0 : _u, _v = _a.containerHeight, containerHeight = _v === void 0 ? 0 : _v, getScrollPosition = _a.getScrollPosition, getColumnOffset = _a.getColumnOffset, getEditorAlignment = _a.getEditorAlignment, getSheetRowCount = _a.getSheetRowCount, getSheetColumnCount = _a.getSheetColumnCount, getBooleanValue = _a.getBooleanValue, getDataValidation = _a.getDataValidation, setActiveCell = _a.setActiveCell, onCopy = _a.onCopy, onPaste = _a.onPaste, onCut = _a.onCut, tables = _a.tables, onInsertTableRow = _a.onInsertTableRow;
164
+ var _d = _a.getEditor, getEditor = _d === void 0 ? exports.getDefaultEditor : _d, getValue = _a.getValue, getTextFormatRuns = _a.getTextFormatRuns, onChange = _a.onChange, onSubmit = _a.onSubmit, onCancel = _a.onCancel, onBlur = _a.onBlur, onDelete = _a.onDelete, sheetId = _a.sheetId, _e = _a.selections, selections = _e === void 0 ? config_1.DEFAULT_ARRAY : _e, _f = _a.navigationSelections, navigationSelections = _f === void 0 ? selections : _f, activeCell = _a.activeCell, _g = _a.canEdit, canEdit = _g === void 0 ? defaultCanEdit : _g, _h = _a.canView, canView = _h === void 0 ? defaultCanView : _h, _j = _a.frozenRows, frozenRows = _j === void 0 ? 0 : _j, _k = _a.frozenColumns, frozenColumns = _k === void 0 ? 0 : _k, _l = _a.hideOnBlur, hideOnBlur = _l === void 0 ? true : _l, _m = _a.isHiddenRow, isHiddenRow = _m === void 0 ? defaultIsHidden : _m, _o = _a.isHiddenColumn, isHiddenColumn = _o === void 0 ? defaultIsHidden : _o, rowCount = _a.rowCount, columnCount = _a.columnCount, _p = _a.selectionTopBound, selectionTopBound = _p === void 0 ? 0 : _p, _q = _a.selectionBottomBound, selectionBottomBound = _q === void 0 ? rowCount : _q, _r = _a.selectionLeftBound, selectionLeftBound = _r === void 0 ? 0 : _r, _s = _a.selectionRightBound, selectionRightBound = _s === void 0 ? columnCount : _s, _t = _a.enableEditOnEnterKey, enableEditOnEnterKey = _t === void 0 ? true : _t, _u = _a.keymap, keymap = _u === void 0 ? "sheets" : _u, clearSelections = _a.clearSelections, onRequestCut = _a.onRequestCut, shouldHandleKeyDown = _a.shouldHandleKeyDown, sticky = _a.sticky, editorBorderColor = _a.editorBorderColor, editorBorderOutlineColor = _a.editorBorderOutlineColor, onBeforeEdit = _a.onBeforeEdit, onKeyDown = _a.onKeyDown, onEditorKeyDown = _a.onEditorKeyDown, getCellOffsetFromCoords = _a.getCellOffsetFromCoords, getCellCoordsFromOffset = _a.getCellCoordsFromOffset, getCellBounds = _a.getCellBounds, focus = _a.focus, getActualCellCoords = _a.getActualCellCoords, scrollToCell = _a.scrollToCell, onChangeBatch = _a.onChangeBatch, _v = _a.containerWidth, containerWidth = _v === void 0 ? 0 : _v, _w = _a.containerHeight, containerHeight = _w === void 0 ? 0 : _w, getScrollPosition = _a.getScrollPosition, getColumnOffset = _a.getColumnOffset, getEditorAlignment = _a.getEditorAlignment, getSheetRowCount = _a.getSheetRowCount, getSheetColumnCount = _a.getSheetColumnCount, getBooleanValue = _a.getBooleanValue, getDataValidation = _a.getDataValidation, setActiveCell = _a.setActiveCell, onCopy = _a.onCopy, onPaste = _a.onPaste, onCut = _a.onCut, tables = _a.tables, onInsertTableRow = _a.onInsertTableRow;
165
165
  var editingCellCoordinate = (0, atoms_1.useEditingCellCoordinate)();
166
- var _w = tslib_1.__read((0, atoms_1.useEditorVisibility)(), 2), isEditorShown = _w[0], setShowEditor = _w[1];
167
- var _x = tslib_1.__read((0, atoms_1.useCellEditorValue)(), 2), value = _x[0], setValue = _x[1];
168
- var _y = tslib_1.__read((0, atoms_1.useCellEditorTextFormatRuns)(), 2), textFormatRuns = _y[0], setTextFormatRuns = _y[1];
166
+ var _x = tslib_1.__read((0, atoms_1.useEditorVisibility)(), 2), isEditorShown = _x[0], setShowEditor = _x[1];
167
+ var _y = tslib_1.__read((0, atoms_1.useCellEditorValue)(), 2), value = _y[0], setValue = _y[1];
168
+ var _z = tslib_1.__read((0, atoms_1.useCellEditorTextFormatRuns)(), 2), textFormatRuns = _z[0], setTextFormatRuns = _z[1];
169
169
  var currentActiveCellRef = (0, react_1.useRef)(null);
170
170
  var initialActiveCell = (0, react_1.useRef)(undefined);
171
- var _z = tslib_1.__read((0, react_1.useState)(true), 2), autoFocus = _z[0], setAutoFocus = _z[1];
172
- var _0 = tslib_1.__read((0, react_1.useState)(false), 2), isScrolling = _0[0], setIsScrolling = _0[1];
171
+ var _0 = tslib_1.__read((0, react_1.useState)(true), 2), autoFocus = _0[0], setAutoFocus = _0[1];
172
+ var _1 = tslib_1.__read((0, react_1.useState)(false), 2), isScrolling = _1[0], setIsScrolling = _1[1];
173
173
  var isDirtyRef = (0, react_1.useRef)(false);
174
174
  var isEnteringNewValue = (0, react_1.useRef)(false);
175
175
  var currentValueRef = (0, react_1.useRef)(value);
@@ -658,7 +658,7 @@ var useEditable = function (_a) {
658
658
  if (!bounds)
659
659
  return null;
660
660
  /* Inside a table, Tab / Shift+Tab wrap within the table (Excel) unless a selection cycles */
661
- var table = restrictWithinSelection && selections.length
661
+ var table = restrictWithinSelection && navigationSelections.length
662
662
  ? undefined
663
663
  : (0, table_1.findActiveTableWithinCell)(sheetId, currentCell, tables);
664
664
  var tableTarget = table
@@ -722,8 +722,10 @@ var useEditable = function (_a) {
722
722
  setInitialActiveCell(null);
723
723
  }
724
724
  /* If user has selected some cells and active cell is within this selection */
725
- if (restrictWithinSelection && selections.length && currentCell) {
726
- var range = selections[selections.length - 1].range;
725
+ if (restrictWithinSelection &&
726
+ navigationSelections.length &&
727
+ currentCell) {
728
+ var range = navigationSelections[navigationSelections.length - 1].range;
727
729
  var activeCellBounds = getCellBounds(currentCell);
728
730
  var nextCell = (0, grid_2.findNextCellWithinBounds)(activeCellBounds, range, direction);
729
731
  if (nextCell)
@@ -731,7 +733,7 @@ var useEditable = function (_a) {
731
733
  }
732
734
  return nextActiveCell;
733
735
  }, [
734
- selections,
736
+ navigationSelections,
735
737
  isHiddenRow,
736
738
  isHiddenColumn,
737
739
  selectionBottomBound,
@@ -3,16 +3,20 @@ import type { TextFormatRun } from "@rowsncolumns/ui";
3
3
  import { type FormulaLocale, type ReferenceStyle } from "@rowsncolumns/utils";
4
4
  import type { CanvasGridProps, SelectionAttributes } from "../components/canvas-grid/typings";
5
5
  type UseEditorChangeProps = {
6
- selections: SelectionArea<SelectionAttributes>[];
7
6
  getSelectionsFromFormula(value: string, cell: CellInterface): SelectionArea<SelectionAttributes>[];
8
7
  onChangeEditorValue: CanvasGridProps["onChangeEditorValue"];
9
- onChangeSelections?: CanvasGridProps["onChangeSelections"];
8
+ /**
9
+ * Takes the ranges picked for the formula being entered out of the sheets' selections: each
10
+ * sheet one was picked on gets its own selection back. A sheet nothing was picked on is left
11
+ * alone.
12
+ */
13
+ restoreSelections?(): void;
10
14
  onChangeActiveCell?: CanvasGridProps["onChangeActiveCell"];
11
15
  /** The formula locale the editor text is written in; `onChangeEditorValue` receives canonical text. */
12
16
  formulaLocale?: FormulaLocale;
13
17
  /** The reference style the editor text is written in; R1C1 text is read as A1 for the edited cell. */
14
18
  referenceStyle?: ReferenceStyle;
15
19
  };
16
- export declare const useEditorChange: ({ selections, getSelectionsFromFormula, onChangeEditorValue, onChangeSelections, onChangeActiveCell, formulaLocale, referenceStyle, }: UseEditorChangeProps) => (value: string, textFormatRuns: TextFormatRun[] | undefined | null, editingSheetId: number, activeCell: CellInterface) => void;
20
+ export declare const useEditorChange: ({ getSelectionsFromFormula, onChangeEditorValue, restoreSelections, onChangeActiveCell, formulaLocale, referenceStyle, }: UseEditorChangeProps) => (value: string, textFormatRuns: TextFormatRun[] | undefined | null, editingSheetId: number, activeCell: CellInterface) => void;
17
21
  export {};
18
22
  //# sourceMappingURL=use-editor-change.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-editor-change.d.ts","sourceRoot":"","sources":["../../../hooks/use-editor-change.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAiB7B,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACpB,MAAM,mCAAmC,CAAC;AAG3C,KAAK,oBAAoB,GAAG;IAC1B,UAAU,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAAE,CAAC;IACjD,wBAAwB,CACtB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,aAAa,GAClB,aAAa,CAAC,mBAAmB,CAAC,EAAE,CAAC;IACxC,mBAAmB,EAAE,eAAe,CAAC,qBAAqB,CAAC,CAAC;IAC5D,kBAAkB,CAAC,EAAE,eAAe,CAAC,oBAAoB,CAAC,CAAC;IAC3D,kBAAkB,CAAC,EAAE,eAAe,CAAC,oBAAoB,CAAC,CAAC;IAC3D,uGAAuG;IACvG,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,sGAAsG;IACtG,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,uIAQ7B,oBAAoB,aAUV,MAAM,kBACG,aAAa,EAAE,GAAG,SAAS,GAAG,IAAI,kBAClC,MAAM,cACV,aAAa,SAiF9B,CAAC"}
1
+ {"version":3,"file":"use-editor-change.d.ts","sourceRoot":"","sources":["../../../hooks/use-editor-change.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAiB7B,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACpB,MAAM,mCAAmC,CAAC;AAE3C,KAAK,oBAAoB,GAAG;IAC1B,wBAAwB,CACtB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,aAAa,GAClB,aAAa,CAAC,mBAAmB,CAAC,EAAE,CAAC;IACxC,mBAAmB,EAAE,eAAe,CAAC,qBAAqB,CAAC,CAAC;IAC5D;;;;OAIG;IACH,iBAAiB,CAAC,IAAI,IAAI,CAAC;IAC3B,kBAAkB,CAAC,EAAE,eAAe,CAAC,oBAAoB,CAAC,CAAC;IAC3D,uGAAuG;IACvG,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,sGAAsG;IACtG,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,0HAO7B,oBAAoB,aAUV,MAAM,kBACG,aAAa,EAAE,GAAG,SAAS,GAAG,IAAI,kBAClC,MAAM,cACV,aAAa,SAgF9B,CAAC"}
@@ -9,9 +9,8 @@ var atoms_1 = require("../atoms");
9
9
  var formula_bar_editor_value_atom_1 = require("../atoms/formula-bar-editor-value.atom");
10
10
  var formula_mode_atom_1 = require("../atoms/formula-mode.atom");
11
11
  var formula_selections_atom_1 = require("../atoms/formula-selections.atom");
12
- var config_1 = require("../config");
13
12
  var useEditorChange = function (_a) {
14
- var selections = _a.selections, getSelectionsFromFormula = _a.getSelectionsFromFormula, onChangeEditorValue = _a.onChangeEditorValue, onChangeSelections = _a.onChangeSelections, onChangeActiveCell = _a.onChangeActiveCell, formulaLocale = _a.formulaLocale, referenceStyle = _a.referenceStyle;
13
+ var getSelectionsFromFormula = _a.getSelectionsFromFormula, onChangeEditorValue = _a.onChangeEditorValue, restoreSelections = _a.restoreSelections, onChangeActiveCell = _a.onChangeActiveCell, formulaLocale = _a.formulaLocale, referenceStyle = _a.referenceStyle;
15
14
  var formulaMode = (0, formula_mode_atom_1.useFormulaModeValue)();
16
15
  var setFormulaMode = (0, formula_mode_atom_1.useSetFormulaMode)();
17
16
  var setFormulaSelections = (0, formula_selections_atom_1.useSetFormulaSelections)();
@@ -46,19 +45,19 @@ var useEditorChange = function (_a) {
46
45
  : editingCellCoordinate &&
47
46
  (0, grid_1.isEqualCells)(editingCellCoordinate, activeCell);
48
47
  /**
49
- * The ranges picked while the entry was a formula are appended to the
50
- * sheet's selection (they are its reference highlights), so a formula
51
- * deleted mid-edit would leave them behind: leaving formula mode drops
52
- * them. A constant entry never picked any, and the selection the edit
53
- * started with stays — Ctrl+Enter fills it and the Name Box keeps
54
- * reading it, as in Excel (#1176).
48
+ * The ranges picked while the entry was a formula live in the sheets'
49
+ * selections (they are its reference highlights), so a formula deleted
50
+ * mid-edit would leave them behind: leaving formula mode takes them out,
51
+ * on every sheet one was picked on. The selection the edit started with
52
+ * stays, whatever was typed — Ctrl+Enter fills it and the Name Box
53
+ * keeps reading it, as in Excel (#1176).
55
54
  */
56
55
  if (isFormula) {
57
- var selections_1 = getSelectionsFromFormula(a1Value, activeCell);
58
- setFormulaSelections === null || setFormulaSelections === void 0 ? void 0 : setFormulaSelections(selections_1);
56
+ var selections = getSelectionsFromFormula(a1Value, activeCell);
57
+ setFormulaSelections === null || setFormulaSelections === void 0 ? void 0 : setFormulaSelections(selections);
59
58
  }
60
- else if (formulaMode && selections.length) {
61
- onChangeSelections === null || onChangeSelections === void 0 ? void 0 : onChangeSelections(editingSheetId, config_1.DEFAULT_ARRAY, true);
59
+ else if (formulaMode) {
60
+ restoreSelections === null || restoreSelections === void 0 ? void 0 : restoreSelections();
62
61
  }
63
62
  if (shouldResetActiveCell && editingCellCoordinate) {
64
63
  onChangeActiveCell === null || onChangeActiveCell === void 0 ? void 0 : onChangeActiveCell(editingSheetId, editingCellCoordinate);
@@ -68,7 +67,6 @@ var useEditorChange = function (_a) {
68
67
  onChangeEditorValue((0, utils_1.canonicalizeCellInput)(a1Value, formulaLocale), editingSheetId, activeCell);
69
68
  }
70
69
  }, [
71
- selections,
72
70
  editingCellCoordinate,
73
71
  formulaMode,
74
72
  formulaSelections,
@@ -78,7 +76,7 @@ var useEditorChange = function (_a) {
78
76
  setFormulabarEditorValue,
79
77
  setFormulaBarTextFormatRuns,
80
78
  onChangeEditorValue,
81
- onChangeSelections,
79
+ restoreSelections,
82
80
  onChangeActiveCell,
83
81
  formulaLocale,
84
82
  referenceStyle,
@@ -93,8 +93,10 @@ type UseEditorSubmitProps = {
93
93
  */
94
94
  onComplete?(): void;
95
95
  /**
96
- * The grid's current selections — the target of a Ctrl+Enter commit
97
- * (`options.fillSelection`). Read through a ref, so the identity may change freely.
96
+ * What the sheet the entry is typed on has selected — the target of a Ctrl+Enter commit
97
+ * (`options.fillSelection`). Not the grid's live selections: those hold the ranges picked for
98
+ * the formula, or are another sheet's when the sheet in view is not the typing one. Read
99
+ * through a ref, so the identity may change freely.
98
100
  */
99
101
  selections?: SelectionArea<SelectionAttributes>[];
100
102
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"use-editor-submit.d.ts","sourceRoot":"","sources":["../../../hooks/use-editor-submit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,KAAK,EAAE,aAAa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gBAAgB,GAAG,SAAS,CAAC,CAAC;IAC1E;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5E;;;OAGG;IACH,kBAAkB,CAAC,EAAE,eAAe,CAAC,oBAAoB,CAAC,CAAC;IAC3D;;;OAGG;IACH,kBAAkB,CAAC,EAAE,eAAe,CAAC,oBAAoB,CAAC,CAAC;IAC3D;;;OAGG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,wFAAwF;IACxF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,sTAoB7B,oBAAoB,aAQV,MAAM,GAAG,OAAO,kBACP,aAAa,EAAE,GAAG,SAAS,GAAG,IAAI,iBACnC,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,kBAClC,MAAM,cACV,aAAa,mBACR,aAAa,GAAG,IAAI,YAC3B,OAAO,YACP,mBAAmB,kBA8PlC,CAAC"}
@@ -266,6 +266,11 @@ var useEditorSubmit = function (_a) {
266
266
  var e_3, _a;
267
267
  var _b;
268
268
  writeActiveCell();
269
+ // An entry Excel's limits refuse is written nowhere: not into the other selected
270
+ // cells, and not as a format. It is typed again and committed, which fills them.
271
+ if (refused) {
272
+ return;
273
+ }
269
274
  try {
270
275
  for (var fillWrites_1 = tslib_1.__values(fillWrites), fillWrites_1_1 = fillWrites_1.next(); !fillWrites_1_1.done; fillWrites_1_1 = fillWrites_1.next()) {
271
276
  var write = fillWrites_1_1.value;
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.releaseDate = void 0;
5
5
  exports.releaseDate =
6
6
  // @ts-ignore
7
- (_a = new Date("2026-11-20")) !== null && _a !== void 0 ? _a : new Date("2025-06-18");
7
+ (_a = new Date("2026-11-22")) !== null && _a !== void 0 ? _a : new Date("2025-06-18");
@@ -1 +1 @@
1
- {"root":["../../config.ts","../../helpers.ts","../../index.tsx","../../platform.ts","../../release-date.ts","../../test-setup.ts","../../themes.ts","../../types.ts","../../vitest.config.ts","../../api/animate.ts","../../api/autocomplete.ts","../../api/banded-ranges.ts","../../api/calculated-column-fill.ts","../../api/cf-data-bar.ts","../../api/cf-engine.ts","../../api/cf-icons.ts","../../api/cf-overlays.ts","../../api/cf-priority.ts","../../api/cf-window.ts","../../api/chart-sheet.ts","../../api/chart-source-ranges.ts","../../api/colors.ts","../../api/copy-paste.ts","../../api/editor-formula.ts","../../api/error-checking.ts","../../api/evaluate-formula.ts","../../api/excel-edit-value.ts","../../api/excel-validation-kinds.ts","../../api/fill-patterns.ts","../../api/fill-series.ts","../../api/font-loader.ts","../../api/go-to-special.ts","../../api/go-to.ts","../../api/heatmap.ts","../../api/index-ranges.ts","../../api/insert-options.ts","../../api/move-overwrite.ts","../../api/multi-selection.ts","../../api/scheduler.ts","../../api/scroller.ts","../../api/selections.ts","../../api/split-pane.ts","../../api/spreadsheet-api.ts","../../api/table-auto-expansion.ts","../../api/table.ts","../../api/validation-tooltip.tsx","../../api/validation.ts","../../atoms/active-editor.atom.ts","../../atoms/advanced-filter-dialog.atom.ts","../../atoms/calculated-column-fill.atom.ts","../../atoms/cell-editor-mode.atom.ts","../../atoms/cell-input-context.atom.ts","../../atoms/chart-actions.atom.ts","../../atoms/consolidate-dialog.atom.ts","../../atoms/copied-range.atom.ts","../../atoms/editing-cell.atom.ts","../../atoms/enter-key-direction.atom.ts","../../atoms/evaluate-formula-dialog.atom.ts","../../atoms/fill-options.atom.ts","../../atoms/fill-series-dialog.atom.ts","../../atoms/flash-fill-options.atom.ts","../../atoms/formula-bar-editor-value.atom.ts","../../atoms/formula-mode.atom.ts","../../atoms/formula-selection-state.atom.ts","../../atoms/formula-selections.atom.ts","../../atoms/frozen-area-sent.atom.ts","../../atoms/go-to-dialog.atom.ts","../../atoms/goal-seek-dialog.atom.ts","../../atoms/index.ts","../../atoms/insert-cells-dialog.atom.ts","../../atoms/insert-options.atom.ts","../../atoms/loading-indicator.atom.ts","../../atoms/magic-fill-state.atom.ts","../../atoms/move-chart-dialog.atom.ts","../../atoms/move-overwrite-confirm.atom.ts","../../atoms/outline-settings-dialog.atom.ts","../../atoms/paste-menu.atom.ts","../../atoms/paste-special-dialog.atom.ts","../../atoms/persistent-tooltip.atom.ts","../../atoms/pick-list.atom.ts","../../atoms/popover.atom.ts","../../atoms/range-selector.atom.ts","../../atoms/remove-duplicates-dialog.atom.ts","../../atoms/selected-chart-embed.atom.ts","../../atoms/selected-chart-series.atom.ts","../../atoms/selected-object-formula.atom.ts","../../atoms/sheet-context.atom.ts","../../atoms/sheet-status-display.atom.ts","../../atoms/show-formula-help.atom.ts","../../atoms/sort-dialog.atom.ts","../../atoms/sparkline-dialog.atom.ts","../../atoms/spreadsheet-api.atom.ts","../../atoms/subtotal-dialog.atom.ts","../../atoms/table-auto-expansion.atom.ts","../../atoms/text-to-columns-dialog.atom.ts","../../atoms/undo-redo-sent.atom.ts","../../atoms/validation-alert.atom.ts","../../atoms/watch-window.atom.ts","../../components/advanced-filter-dialog/index.tsx","../../components/autocorrect-options-smart-tag/index.tsx","../../components/bottom-bar/index.tsx","../../components/calculated-column-smart-tag/index.tsx","../../components/calculation-options-dialog/index.tsx","../../components/canvas-grid/frozen-start.ts","../../components/canvas-grid/helpers.ts","../../components/canvas-grid/index.tsx","../../components/canvas-grid/overflow.ts","../../components/canvas-grid/page-break-preview-styles.ts","../../components/canvas-grid/page-breaks.ts","../../components/canvas-grid/typings.ts","../../components/cell/alignment.ts","../../components/cell/cell-background.tsx","../../components/cell/cell-backgrounds.tsx","../../components/cell/cell-text-runs.tsx","../../components/cell/helpers.ts","../../components/cell/index.tsx","../../components/cell/line-height.ts","../../components/cell/number-format-layout.ts","../../components/cell/rich-text.ts","../../components/cell/typings.ts","../../components/cell-arrow/index.tsx","../../components/cell-calculated/index.tsx","../../components/cell-checkbox/index.tsx","../../components/cell-diff/index.tsx","../../components/cell-editor/calendar-popup.tsx","../../components/cell-editor/formula-result-preview.tsx","../../components/cell-editor/helpers.ts","../../components/cell-editor/index.tsx","../../components/cell-editor/style.tsx","../../components/cell-expand/index.tsx","../../components/cell-filter/index.tsx","../../components/cell-group/index.tsx","../../components/cell-indicator/index.tsx","../../components/cell-input/cell-input.tsx","../../components/cell-input/formula-bar-cell-input.tsx","../../components/cell-input/index.tsx","../../components/cell-input/style.tsx","../../components/cell-overlay/index.tsx","../../components/cell-structured/cell-image.tsx","../../components/cell-structured/image-geometry.ts","../../components/cell-structured/index.tsx","../../components/cell-structured/sparkline-math.ts","../../components/cell-structured/sparkline.tsx","../../components/cell-structured/types.ts","../../components/cell-tooltip/index.tsx","../../components/cell-tooltip/note-editor.tsx","../../components/cell-tooltip/style.tsx","../../components/cf-icon-preview/index.tsx","../../components/chart-sheet-view/index.tsx","../../components/consolidate-dialog/index.tsx","../../components/context-menu/embed-context-menu.tsx","../../components/context-menu/index.tsx","../../components/context-menu/menu.tsx","../../components/context-menu/style.tsx","../../components/context-menu/total-row-function-menu.tsx","../../components/context-menu/total-row-functions.ts","../../components/data-table-dialog/index.tsx","../../components/embeds/chart-component.tsx","../../components/embeds/embed-component.tsx","../../components/embeds/embed-draggable.tsx","../../components/embeds/index.tsx","../../components/embeds/linked-picture.tsx","../../components/embeds/object-cell-offset.ts","../../components/embeds/object-focus.ts","../../components/embeds/page-gaps.ts","../../components/embeds/pane-copy.tsx","../../components/embeds/shape-geometry.ts","../../components/embeds/shape-svg.tsx","../../components/embeds/slicer-component.tsx","../../components/embeds/text-box-view.tsx","../../components/error-check-smart-tag/index.tsx","../../components/evaluate-formula-dialog/index.tsx","../../components/fill-handle/index.tsx","../../components/fill-series-dialog/index.tsx","../../components/filter-box/date-tree.ts","../../components/filter-box/filter-by-color.tsx","../../components/filter-box/filter-by-condition.tsx","../../components/filter-box/filter-by-value.tsx","../../components/filter-box/index.tsx","../../components/flash-fill-options-smart-tag/index.tsx","../../components/floating-cell-editor/index.tsx","../../components/forecast-sheet-dialog/index.tsx","../../components/formula-bar/index.tsx","../../components/formula-bar/style.tsx","../../components/formula-input/index.tsx","../../components/go-to-dialog/index.tsx","../../components/goal-seek-dialog/index.tsx","../../components/grid-footer/index.tsx","../../components/header-cell/index.tsx","../../components/header-menu/index.tsx","../../components/header-move/index.tsx","../../components/header-resizer/index.tsx","../../components/hidden-markers/index.tsx","../../components/hidden-markers/style.tsx","../../components/insert-cells-dialog/index.tsx","../../components/insert-function-dialog/index.tsx","../../components/insert-options-smart-tag/index.tsx","../../components/loading-indicator/index.tsx","../../components/move-chart-dialog/index.tsx","../../components/move-overwrite-confirm-dialog/index.tsx","../../components/outline-gutter/index.tsx","../../components/outline-gutter/offsets.ts","../../components/outline-settings-dialog/index.tsx","../../components/page-layout-view/compute-page-layout.ts","../../components/page-layout-view/header-footer-codes.ts","../../components/page-layout-view/index.ts","../../components/page-layout-view/page-layout-chrome.tsx","../../components/paste-special-dialog/index.tsx","../../components/pivot-placeholder/index.tsx","../../components/print-preview/cell-styles.ts","../../components/print-preview/index.ts","../../components/print-preview/page-block.tsx","../../components/print-preview/page-break-preview.ts","../../components/print-preview/print-cells.ts","../../components/print-preview/print-comments.tsx","../../components/print-preview/print-preview-dialog.tsx","../../components/print-preview/run-print.ts","../../components/print-preview/settings.ts","../../components/print-preview/sheet-page-setup.ts","../../components/print-preview/use-page-layout.ts","../../components/protect-sheet-dialog/allow-edit-ranges-dialog.tsx","../../components/protect-sheet-dialog/constants.ts","../../components/protect-sheet-dialog/index.tsx","../../components/range-selector/index.tsx","../../components/remove-duplicates-dialog/index.tsx","../../components/resizer/index.tsx","../../components/scenario-manager-dialog/index.tsx","../../components/selection/avatar.tsx","../../components/selection/fill-options-menu.tsx","../../components/selection/index.tsx","../../components/selection/magic-fill.tsx","../../components/selection/paste-menu.tsx","../../components/selection/paste-options.ts","../../components/selection/quick-edit.tsx","../../components/selection/style.tsx","../../components/selection/suggestion-action.tsx","../../components/selection/title.tsx","../../components/selection/types.ts","../../components/selection-drop-menu/index.tsx","../../components/selection-input/index.tsx","../../components/selection-input/style.tsx","../../components/sheet-background/index.tsx","../../components/sheet-search/index.tsx","../../components/sheet-status/index.tsx","../../components/sheet-status/style.tsx","../../components/sheet-switcher/index.tsx","../../components/sheet-switcher/new-sheet-button.tsx","../../components/sheet-tabs/context-menu.tsx","../../components/sheet-tabs/index.tsx","../../components/sheet-tabs/sheet-tab.tsx","../../components/sheet-tabs/style.tsx","../../components/sheet-tabs/types.ts","../../components/solver-dialog/index.tsx","../../components/sort-range-dialog/index.tsx","../../components/sparkline-dialog/index.tsx","../../components/subtotal-dialog/index.tsx","../../components/table-auto-expansion-smart-tag/index.tsx","../../components/text-to-columns-dialog/index.tsx","../../components/toolbar/background-color-selector.tsx","../../components/toolbar/border-color-selector.tsx","../../components/toolbar/border-line-style-options.tsx","../../components/toolbar/border-line-style-selector.tsx","../../components/toolbar/border-location-options.tsx","../../components/toolbar/border-selector.tsx","../../components/toolbar/buttons.tsx","../../components/toolbar/cell-style-selector.tsx","../../components/toolbar/color-selector.tsx","../../components/toolbar/fill-selectors.tsx","../../components/toolbar/font-family-selector.tsx","../../components/toolbar/font-size-selector.tsx","../../components/toolbar/index.tsx","../../components/toolbar/insert-menu.tsx","../../components/toolbar/merge-cells-selector.tsx","../../components/toolbar/scale-selector.tsx","../../components/toolbar/sparkline-actions.tsx","../../components/toolbar/style.tsx","../../components/toolbar/table-actions.tsx","../../components/toolbar/table-style-editor.tsx","../../components/toolbar/table-style-selector.tsx","../../components/toolbar/text-color-selector.tsx","../../components/toolbar/text-format-selector.tsx","../../components/toolbar/text-horizontal-align-selector.tsx","../../components/toolbar/text-rotation-selector.tsx","../../components/toolbar/text-vertical-align-selector.tsx","../../components/toolbar/text-wrap-selector.tsx","../../components/toolbar/theme-selector.tsx","../../components/toolbar/toolbar.tsx","../../components/toolbar/types.ts","../../components/toolbar/view-menu.tsx","../../components/validation-alert-dialog/index.tsx","../../components/watch-window/index.tsx","../../helpers/merged-cell-borders.ts","../../hooks/export-range-tiles.ts","../../hooks/index.ts","../../hooks/object-clipboard-payload.ts","../../hooks/object-spec-schema.generated.ts","../../hooks/show-zeros.ts","../../hooks/use-async.ts","../../hooks/use-border-styles.ts","../../hooks/use-callback-ref.ts","../../hooks/use-cell-diff-highlight.ts","../../hooks/use-cell-popover.tsx","../../hooks/use-cell-renderer.tsx","../../hooks/use-chart-clipboard.ts","../../hooks/use-chart-source-ranges.ts","../../hooks/use-column-color-icons.ts","../../hooks/use-conditional-formatting.ts","../../hooks/use-context-menu.tsx","../../hooks/use-context-setter.ts","../../hooks/use-copy-paste-cut.tsx","../../hooks/use-create-address-from-selection.ts","../../hooks/use-create-formula-tokenizer.ts","../../hooks/use-delayed-value.ts","../../hooks/use-editable.tsx","../../hooks/use-editor-cancel.ts","../../hooks/use-editor-change.ts","../../hooks/use-editor-keydown.ts","../../hooks/use-editor-submit.ts","../../hooks/use-embeds-charts.tsx","../../hooks/use-expand-cell.tsx","../../hooks/use-export-range.ts","../../hooks/use-filter.ts","../../hooks/use-flash-fill-suggestion.ts","../../hooks/use-flash.ts","../../hooks/use-fonts.ts","../../hooks/use-formula-range-helpers.ts","../../hooks/use-get-tooltip.tsx","../../hooks/use-get-values-from-range.ts","../../hooks/use-grid-children.tsx","../../hooks/use-header-actions.tsx","../../hooks/use-hidden-dimension-markers.tsx","../../hooks/use-hidden-dimensions.ts","../../hooks/use-hovered-selection-ids.ts","../../hooks/use-isomorphic-layout-effect.ts","../../hooks/use-keyboard-handler.tsx","../../hooks/use-licensekey-validator.tsx","../../hooks/use-memo-compare.ts","../../hooks/use-merge.refs.ts","../../hooks/use-move-columns-rows.tsx","../../hooks/use-navigate-sheet-range.ts","../../hooks/use-previous.ts","../../hooks/use-raf.ts","../../hooks/use-resize-observer.ts","../../hooks/use-reveal-chart-embed.ts","../../hooks/use-scale-listener.ts","../../hooks/use-selected-rows-columns.ts","../../hooks/use-selection-aware-formatting.ts","../../hooks/use-selection-change.ts","../../hooks/use-selection-drag-copy.ts","../../hooks/use-selection-interceptors.ts","../../hooks/use-selection-move.ts","../../hooks/use-selection-renderer.tsx","../../hooks/use-selection-resize.ts","../../hooks/use-selection.ts","../../hooks/use-sheet-change-handler.ts","../../hooks/use-shown-notes.tsx","../../hooks/use-sizer.ts","../../hooks/use-spreadsheet-theme.ts","../../hooks/use-stable-ref.ts","../../hooks/use-structured-reference-selection.ts","../../hooks/use-table-hit-zones.ts","../../hooks/use-table-resizer.tsx","../../hooks/use-text-dimensions.ts","../../hooks/use-tooltip.ts","../../hooks/use-touch.ts","../../providers/spreadsheet-provider.tsx","../../signals/scroll-subscriber.ts","../../utils/copy-as-picture.ts","../../utils/maybe.ts","../../utils/pivot-chart-field-buttons.ts","../../utils/z-order.ts"],"version":"5.8.3"}
1
+ {"root":["../../config.ts","../../helpers.ts","../../index.tsx","../../platform.ts","../../release-date.ts","../../test-setup.ts","../../themes.ts","../../types.ts","../../vitest.config.ts","../../api/animate.ts","../../api/autocomplete.ts","../../api/banded-ranges.ts","../../api/calculated-column-fill.ts","../../api/cf-data-bar.ts","../../api/cf-engine.ts","../../api/cf-icons.ts","../../api/cf-overlays.ts","../../api/cf-priority.ts","../../api/cf-window.ts","../../api/chart-sheet.ts","../../api/chart-source-ranges.ts","../../api/colors.ts","../../api/copy-paste.ts","../../api/editor-formula.ts","../../api/entry-selections.ts","../../api/error-checking.ts","../../api/evaluate-formula.ts","../../api/excel-edit-value.ts","../../api/excel-validation-kinds.ts","../../api/fill-patterns.ts","../../api/fill-series.ts","../../api/font-loader.ts","../../api/go-to-special.ts","../../api/go-to.ts","../../api/heatmap.ts","../../api/index-ranges.ts","../../api/insert-options.ts","../../api/move-overwrite.ts","../../api/multi-selection.ts","../../api/scheduler.ts","../../api/scroller.ts","../../api/selections.ts","../../api/split-pane.ts","../../api/spreadsheet-api.ts","../../api/table-auto-expansion.ts","../../api/table.ts","../../api/validation-tooltip.tsx","../../api/validation.ts","../../atoms/active-editor.atom.ts","../../atoms/advanced-filter-dialog.atom.ts","../../atoms/calculated-column-fill.atom.ts","../../atoms/cell-editor-mode.atom.ts","../../atoms/cell-input-context.atom.ts","../../atoms/chart-actions.atom.ts","../../atoms/consolidate-dialog.atom.ts","../../atoms/copied-range.atom.ts","../../atoms/editing-cell.atom.ts","../../atoms/enter-key-direction.atom.ts","../../atoms/entry-selections.atom.ts","../../atoms/evaluate-formula-dialog.atom.ts","../../atoms/fill-options.atom.ts","../../atoms/fill-series-dialog.atom.ts","../../atoms/flash-fill-options.atom.ts","../../atoms/formula-bar-editor-value.atom.ts","../../atoms/formula-mode.atom.ts","../../atoms/formula-selection-state.atom.ts","../../atoms/formula-selections.atom.ts","../../atoms/frozen-area-sent.atom.ts","../../atoms/go-to-dialog.atom.ts","../../atoms/goal-seek-dialog.atom.ts","../../atoms/index.ts","../../atoms/insert-cells-dialog.atom.ts","../../atoms/insert-options.atom.ts","../../atoms/loading-indicator.atom.ts","../../atoms/magic-fill-state.atom.ts","../../atoms/move-chart-dialog.atom.ts","../../atoms/move-overwrite-confirm.atom.ts","../../atoms/outline-settings-dialog.atom.ts","../../atoms/paste-menu.atom.ts","../../atoms/paste-special-dialog.atom.ts","../../atoms/persistent-tooltip.atom.ts","../../atoms/pick-list.atom.ts","../../atoms/popover.atom.ts","../../atoms/range-selector.atom.ts","../../atoms/remove-duplicates-dialog.atom.ts","../../atoms/selected-chart-embed.atom.ts","../../atoms/selected-chart-series.atom.ts","../../atoms/selected-object-formula.atom.ts","../../atoms/sheet-context.atom.ts","../../atoms/sheet-status-display.atom.ts","../../atoms/show-formula-help.atom.ts","../../atoms/sort-dialog.atom.ts","../../atoms/sparkline-dialog.atom.ts","../../atoms/spreadsheet-api.atom.ts","../../atoms/subtotal-dialog.atom.ts","../../atoms/table-auto-expansion.atom.ts","../../atoms/text-to-columns-dialog.atom.ts","../../atoms/undo-redo-sent.atom.ts","../../atoms/validation-alert.atom.ts","../../atoms/watch-window.atom.ts","../../components/advanced-filter-dialog/index.tsx","../../components/autocorrect-options-smart-tag/index.tsx","../../components/bottom-bar/index.tsx","../../components/calculated-column-smart-tag/index.tsx","../../components/calculation-options-dialog/index.tsx","../../components/canvas-grid/frozen-start.ts","../../components/canvas-grid/helpers.ts","../../components/canvas-grid/index.tsx","../../components/canvas-grid/overflow.ts","../../components/canvas-grid/page-break-preview-styles.ts","../../components/canvas-grid/page-breaks.ts","../../components/canvas-grid/typings.ts","../../components/cell/alignment.ts","../../components/cell/cell-background.tsx","../../components/cell/cell-backgrounds.tsx","../../components/cell/cell-text-runs.tsx","../../components/cell/helpers.ts","../../components/cell/index.tsx","../../components/cell/line-height.ts","../../components/cell/number-format-layout.ts","../../components/cell/rich-text.ts","../../components/cell/typings.ts","../../components/cell-arrow/index.tsx","../../components/cell-calculated/index.tsx","../../components/cell-checkbox/index.tsx","../../components/cell-diff/index.tsx","../../components/cell-editor/calendar-popup.tsx","../../components/cell-editor/formula-result-preview.tsx","../../components/cell-editor/helpers.ts","../../components/cell-editor/index.tsx","../../components/cell-editor/style.tsx","../../components/cell-expand/index.tsx","../../components/cell-filter/index.tsx","../../components/cell-group/index.tsx","../../components/cell-indicator/index.tsx","../../components/cell-input/cell-input.tsx","../../components/cell-input/formula-bar-cell-input.tsx","../../components/cell-input/index.tsx","../../components/cell-input/style.tsx","../../components/cell-overlay/index.tsx","../../components/cell-structured/cell-image.tsx","../../components/cell-structured/image-geometry.ts","../../components/cell-structured/index.tsx","../../components/cell-structured/sparkline-math.ts","../../components/cell-structured/sparkline.tsx","../../components/cell-structured/types.ts","../../components/cell-tooltip/index.tsx","../../components/cell-tooltip/note-editor.tsx","../../components/cell-tooltip/style.tsx","../../components/cf-icon-preview/index.tsx","../../components/chart-sheet-view/index.tsx","../../components/consolidate-dialog/index.tsx","../../components/context-menu/embed-context-menu.tsx","../../components/context-menu/index.tsx","../../components/context-menu/menu.tsx","../../components/context-menu/style.tsx","../../components/context-menu/total-row-function-menu.tsx","../../components/context-menu/total-row-functions.ts","../../components/data-table-dialog/index.tsx","../../components/embeds/chart-component.tsx","../../components/embeds/embed-component.tsx","../../components/embeds/embed-draggable.tsx","../../components/embeds/index.tsx","../../components/embeds/linked-picture.tsx","../../components/embeds/object-cell-offset.ts","../../components/embeds/object-focus.ts","../../components/embeds/page-gaps.ts","../../components/embeds/pane-copy.tsx","../../components/embeds/shape-geometry.ts","../../components/embeds/shape-svg.tsx","../../components/embeds/slicer-component.tsx","../../components/embeds/text-box-view.tsx","../../components/error-check-smart-tag/index.tsx","../../components/evaluate-formula-dialog/index.tsx","../../components/fill-handle/index.tsx","../../components/fill-series-dialog/index.tsx","../../components/filter-box/date-tree.ts","../../components/filter-box/filter-by-color.tsx","../../components/filter-box/filter-by-condition.tsx","../../components/filter-box/filter-by-value.tsx","../../components/filter-box/index.tsx","../../components/flash-fill-options-smart-tag/index.tsx","../../components/floating-cell-editor/index.tsx","../../components/forecast-sheet-dialog/index.tsx","../../components/formula-bar/index.tsx","../../components/formula-bar/style.tsx","../../components/formula-input/index.tsx","../../components/go-to-dialog/index.tsx","../../components/goal-seek-dialog/index.tsx","../../components/grid-footer/index.tsx","../../components/header-cell/index.tsx","../../components/header-menu/index.tsx","../../components/header-move/index.tsx","../../components/header-resizer/index.tsx","../../components/hidden-markers/index.tsx","../../components/hidden-markers/style.tsx","../../components/insert-cells-dialog/index.tsx","../../components/insert-function-dialog/index.tsx","../../components/insert-options-smart-tag/index.tsx","../../components/loading-indicator/index.tsx","../../components/move-chart-dialog/index.tsx","../../components/move-overwrite-confirm-dialog/index.tsx","../../components/outline-gutter/index.tsx","../../components/outline-gutter/offsets.ts","../../components/outline-settings-dialog/index.tsx","../../components/page-layout-view/compute-page-layout.ts","../../components/page-layout-view/header-footer-codes.ts","../../components/page-layout-view/index.ts","../../components/page-layout-view/page-layout-chrome.tsx","../../components/paste-special-dialog/index.tsx","../../components/pivot-placeholder/index.tsx","../../components/print-preview/cell-styles.ts","../../components/print-preview/index.ts","../../components/print-preview/page-block.tsx","../../components/print-preview/page-break-preview.ts","../../components/print-preview/print-cells.ts","../../components/print-preview/print-comments.tsx","../../components/print-preview/print-preview-dialog.tsx","../../components/print-preview/run-print.ts","../../components/print-preview/settings.ts","../../components/print-preview/sheet-page-setup.ts","../../components/print-preview/use-page-layout.ts","../../components/protect-sheet-dialog/allow-edit-ranges-dialog.tsx","../../components/protect-sheet-dialog/constants.ts","../../components/protect-sheet-dialog/index.tsx","../../components/range-selector/index.tsx","../../components/remove-duplicates-dialog/index.tsx","../../components/resizer/index.tsx","../../components/scenario-manager-dialog/index.tsx","../../components/selection/avatar.tsx","../../components/selection/fill-options-menu.tsx","../../components/selection/index.tsx","../../components/selection/magic-fill.tsx","../../components/selection/paste-menu.tsx","../../components/selection/paste-options.ts","../../components/selection/quick-edit.tsx","../../components/selection/style.tsx","../../components/selection/suggestion-action.tsx","../../components/selection/title.tsx","../../components/selection/types.ts","../../components/selection-drop-menu/index.tsx","../../components/selection-input/index.tsx","../../components/selection-input/style.tsx","../../components/sheet-background/index.tsx","../../components/sheet-search/index.tsx","../../components/sheet-status/index.tsx","../../components/sheet-status/style.tsx","../../components/sheet-switcher/index.tsx","../../components/sheet-switcher/new-sheet-button.tsx","../../components/sheet-tabs/context-menu.tsx","../../components/sheet-tabs/index.tsx","../../components/sheet-tabs/sheet-tab.tsx","../../components/sheet-tabs/style.tsx","../../components/sheet-tabs/types.ts","../../components/solver-dialog/index.tsx","../../components/sort-range-dialog/index.tsx","../../components/sparkline-dialog/index.tsx","../../components/subtotal-dialog/index.tsx","../../components/table-auto-expansion-smart-tag/index.tsx","../../components/text-to-columns-dialog/index.tsx","../../components/toolbar/background-color-selector.tsx","../../components/toolbar/border-color-selector.tsx","../../components/toolbar/border-line-style-options.tsx","../../components/toolbar/border-line-style-selector.tsx","../../components/toolbar/border-location-options.tsx","../../components/toolbar/border-selector.tsx","../../components/toolbar/buttons.tsx","../../components/toolbar/cell-style-selector.tsx","../../components/toolbar/color-selector.tsx","../../components/toolbar/fill-selectors.tsx","../../components/toolbar/font-family-selector.tsx","../../components/toolbar/font-size-selector.tsx","../../components/toolbar/index.tsx","../../components/toolbar/insert-menu.tsx","../../components/toolbar/merge-cells-selector.tsx","../../components/toolbar/scale-selector.tsx","../../components/toolbar/sparkline-actions.tsx","../../components/toolbar/style.tsx","../../components/toolbar/table-actions.tsx","../../components/toolbar/table-style-editor.tsx","../../components/toolbar/table-style-selector.tsx","../../components/toolbar/text-color-selector.tsx","../../components/toolbar/text-format-selector.tsx","../../components/toolbar/text-horizontal-align-selector.tsx","../../components/toolbar/text-rotation-selector.tsx","../../components/toolbar/text-vertical-align-selector.tsx","../../components/toolbar/text-wrap-selector.tsx","../../components/toolbar/theme-selector.tsx","../../components/toolbar/toolbar.tsx","../../components/toolbar/types.ts","../../components/toolbar/view-menu.tsx","../../components/validation-alert-dialog/index.tsx","../../components/watch-window/index.tsx","../../helpers/merged-cell-borders.ts","../../hooks/export-range-tiles.ts","../../hooks/index.ts","../../hooks/object-clipboard-payload.ts","../../hooks/object-spec-schema.generated.ts","../../hooks/show-zeros.ts","../../hooks/use-async.ts","../../hooks/use-border-styles.ts","../../hooks/use-callback-ref.ts","../../hooks/use-cell-diff-highlight.ts","../../hooks/use-cell-popover.tsx","../../hooks/use-cell-renderer.tsx","../../hooks/use-chart-clipboard.ts","../../hooks/use-chart-source-ranges.ts","../../hooks/use-column-color-icons.ts","../../hooks/use-conditional-formatting.ts","../../hooks/use-context-menu.tsx","../../hooks/use-context-setter.ts","../../hooks/use-copy-paste-cut.tsx","../../hooks/use-create-address-from-selection.ts","../../hooks/use-create-formula-tokenizer.ts","../../hooks/use-delayed-value.ts","../../hooks/use-editable.tsx","../../hooks/use-editor-cancel.ts","../../hooks/use-editor-change.ts","../../hooks/use-editor-keydown.ts","../../hooks/use-editor-submit.ts","../../hooks/use-embeds-charts.tsx","../../hooks/use-expand-cell.tsx","../../hooks/use-export-range.ts","../../hooks/use-filter.ts","../../hooks/use-flash-fill-suggestion.ts","../../hooks/use-flash.ts","../../hooks/use-fonts.ts","../../hooks/use-formula-range-helpers.ts","../../hooks/use-get-tooltip.tsx","../../hooks/use-get-values-from-range.ts","../../hooks/use-grid-children.tsx","../../hooks/use-header-actions.tsx","../../hooks/use-hidden-dimension-markers.tsx","../../hooks/use-hidden-dimensions.ts","../../hooks/use-hovered-selection-ids.ts","../../hooks/use-isomorphic-layout-effect.ts","../../hooks/use-keyboard-handler.tsx","../../hooks/use-licensekey-validator.tsx","../../hooks/use-memo-compare.ts","../../hooks/use-merge.refs.ts","../../hooks/use-move-columns-rows.tsx","../../hooks/use-navigate-sheet-range.ts","../../hooks/use-previous.ts","../../hooks/use-raf.ts","../../hooks/use-resize-observer.ts","../../hooks/use-reveal-chart-embed.ts","../../hooks/use-scale-listener.ts","../../hooks/use-selected-rows-columns.ts","../../hooks/use-selection-aware-formatting.ts","../../hooks/use-selection-change.ts","../../hooks/use-selection-drag-copy.ts","../../hooks/use-selection-interceptors.ts","../../hooks/use-selection-move.ts","../../hooks/use-selection-renderer.tsx","../../hooks/use-selection-resize.ts","../../hooks/use-selection.ts","../../hooks/use-sheet-change-handler.ts","../../hooks/use-shown-notes.tsx","../../hooks/use-sizer.ts","../../hooks/use-spreadsheet-theme.ts","../../hooks/use-stable-ref.ts","../../hooks/use-structured-reference-selection.ts","../../hooks/use-table-hit-zones.ts","../../hooks/use-table-resizer.tsx","../../hooks/use-text-dimensions.ts","../../hooks/use-tooltip.ts","../../hooks/use-touch.ts","../../providers/spreadsheet-provider.tsx","../../signals/scroll-subscriber.ts","../../utils/copy-as-picture.ts","../../utils/maybe.ts","../../utils/pivot-chart-field-buttons.ts","../../utils/z-order.ts"],"version":"5.8.3"}
@@ -0,0 +1,85 @@
1
+ import type { SelectionArea } from "@rowsncolumns/grid";
2
+ import type { SelectionAttributes } from "../components/canvas-grid/typings";
3
+ /**
4
+ * A range picked for a formula (pointer or arrow keys) lives in the sheet's
5
+ * own selection until the entry ends: appended after it, or in its place (a
6
+ * heading click, Shift+Arrow as the first pick, a pick that replaces a typed
7
+ * reference, a table's edge). The entry itself acts on what the sheet has
8
+ * selected WITHOUT those ranges: the commit key moves the active cell inside
9
+ * it, Ctrl+Enter fills it, and the sheet gets it back when the entry ends.
10
+ *
11
+ * The host owns the selection. So what is kept here is only ever what the
12
+ * host last gave the grid for a sheet, with the entry's own picks taken out.
13
+ * A selection the host sets while the entry is open (a collaborator's row or
14
+ * column edit moves it) replaces what was kept: nothing the entry writes may
15
+ * land outside what the host has selected now.
16
+ */
17
+ type Selections = SelectionArea<SelectionAttributes>[];
18
+ /** What one sheet has selected, as far as the open cell entry is concerned. */
19
+ export type EntrySheetSelections = {
20
+ /** What the host last gave the grid for the sheet, without the entry's picks. */
21
+ own: Selections;
22
+ /**
23
+ * The sheet's selection as a gesture on the grid last wrote it for the
24
+ * entry, picked ranges included. Absent while nothing is picked on the
25
+ * sheet.
26
+ */
27
+ written?: Selections;
28
+ /** How many of `written`'s leading selections are the sheet's own; the rest are picks. */
29
+ ownCount: number;
30
+ /** The selection the host last handed the grid for the sheet. */
31
+ seen: Selections;
32
+ };
33
+ export type EntryCell = {
34
+ sheetId: number;
35
+ rowIndex: number;
36
+ columnIndex: number;
37
+ };
38
+ export type EntrySelections = {
39
+ /** The cell the entry is typed in: another cell is another entry. */
40
+ cell: EntryCell;
41
+ sheets: ReadonlyMap<number, EntrySheetSelections>;
42
+ };
43
+ export declare const isSameEntryCell: (a: EntryCell | undefined, b: EntryCell | undefined) => boolean;
44
+ /** How many leading selections of `a` and `b` cover the same ranges. */
45
+ export declare const leadingSameRanges: (a: Selections, b: Selections) => number;
46
+ /**
47
+ * Whether two selections cover the same ranges in the same order. A host may
48
+ * hand back other objects than the grid wrote, or a new array on every render,
49
+ * so identity says nothing about who chose a selection.
50
+ */
51
+ export declare const sameRanges: (a: Selections, b: Selections) => boolean;
52
+ /** A sheet nothing is picked on, holding what the host gave for it. */
53
+ export declare const entrySheetSelections: (own: Selections, seen?: Selections) => EntrySheetSelections;
54
+ /**
55
+ * A gesture on the grid wrote `next` for the sheet while the entry takes
56
+ * picks. `current` is what the host has for the sheet now; it is what the
57
+ * sheet's own selection is when this is its first pick.
58
+ *
59
+ * The sheet's own selections are the leading ones a pick left as they were.
60
+ * An appended pick leaves them all; a pick that takes the selection's place
61
+ * leaves none, and from then on none of what is written is the sheet's own.
62
+ */
63
+ export declare const afterPick: (sheet: EntrySheetSelections | undefined, current: Selections, next: Selections) => EntrySheetSelections;
64
+ /**
65
+ * The host handed the grid `given` for the sheet. Returns the same object when
66
+ * it is nothing new.
67
+ *
68
+ * It is the host's own choice only when it is neither what the grid last
69
+ * wrote nor what the host had handed over before: a host that applies a write
70
+ * a tick later, or builds a new array on every render, shows the old selection
71
+ * once more before the grid's write comes back.
72
+ *
73
+ * The host's choice replaces what was kept. When it has as many selections as
74
+ * the grid wrote, they are the same ones moved (a row or a column inserted or
75
+ * deleted above them), so the sheet's own are still the leading ones and the
76
+ * picks the rest. Otherwise the host chose something else altogether, and the
77
+ * sheet has that selected with nothing picked on it.
78
+ */
79
+ export declare const afterHostGave: (sheet: EntrySheetSelections, given: Selections) => EntrySheetSelections;
80
+ /** Whether a range picked for the entry is in any sheet's selection. */
81
+ export declare const hasEntryPicks: (state: EntrySelections) => boolean;
82
+ /** The sheet once its picks are out of its selection again. */
83
+ export declare const afterPutBack: (sheet: EntrySheetSelections) => EntrySheetSelections;
84
+ export {};
85
+ //# sourceMappingURL=entry-selections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-selections.d.ts","sourceRoot":"","sources":["../../../api/entry-selections.ts"],"names":[],"mappings":"AAAA,O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UAAU,KACf,oBAWF,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,GACxB,OAAO,oBAAoB,EAC3B,OAAO,UAAU,KAChB,oBAgBF,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,aAAa,GAAI,OAAO,eAAe,KAAG,OAOtD,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,YAAY,GACvB,OAAO,oBAAoB,KAC1B,oBAAmE,CAAC"}
@@ -0,0 +1,88 @@
1
+ export const isSameEntryCell = (a, b) => a !== undefined &&
2
+ b !== undefined &&
3
+ a.sheetId === b.sheetId &&
4
+ a.rowIndex === b.rowIndex &&
5
+ a.columnIndex === b.columnIndex;
6
+ const isSameRange = (a, b) => a.range.startRowIndex === b.range.startRowIndex &&
7
+ a.range.endRowIndex === b.range.endRowIndex &&
8
+ a.range.startColumnIndex === b.range.startColumnIndex &&
9
+ a.range.endColumnIndex === b.range.endColumnIndex;
10
+ /** How many leading selections of `a` and `b` cover the same ranges. */
11
+ export const leadingSameRanges = (a, b) => {
12
+ let count = 0;
13
+ while (count < a.length &&
14
+ count < b.length &&
15
+ isSameRange(a[count], b[count])) {
16
+ count++;
17
+ }
18
+ return count;
19
+ };
20
+ /**
21
+ * Whether two selections cover the same ranges in the same order. A host may
22
+ * hand back other objects than the grid wrote, or a new array on every render,
23
+ * so identity says nothing about who chose a selection.
24
+ */
25
+ export const sameRanges = (a, b) => a === b || (a.length === b.length && leadingSameRanges(a, b) === a.length);
26
+ /** A sheet nothing is picked on, holding what the host gave for it. */
27
+ export const entrySheetSelections = (own, seen = own) => ({ own, ownCount: own.length, seen });
28
+ /**
29
+ * A gesture on the grid wrote `next` for the sheet while the entry takes
30
+ * picks. `current` is what the host has for the sheet now; it is what the
31
+ * sheet's own selection is when this is its first pick.
32
+ *
33
+ * The sheet's own selections are the leading ones a pick left as they were.
34
+ * An appended pick leaves them all; a pick that takes the selection's place
35
+ * leaves none, and from then on none of what is written is the sheet's own.
36
+ */
37
+ export const afterPick = (sheet, current, next) => {
38
+ const known = sheet ?? entrySheetSelections(current);
39
+ return {
40
+ own: known.own,
41
+ written: next,
42
+ ownCount: Math.min(known.ownCount, leadingSameRanges(known.written ?? known.own, next)),
43
+ seen: known.seen,
44
+ };
45
+ };
46
+ /**
47
+ * The host handed the grid `given` for the sheet. Returns the same object when
48
+ * it is nothing new.
49
+ *
50
+ * It is the host's own choice only when it is neither what the grid last
51
+ * wrote nor what the host had handed over before: a host that applies a write
52
+ * a tick later, or builds a new array on every render, shows the old selection
53
+ * once more before the grid's write comes back.
54
+ *
55
+ * The host's choice replaces what was kept. When it has as many selections as
56
+ * the grid wrote, they are the same ones moved (a row or a column inserted or
57
+ * deleted above them), so the sheet's own are still the leading ones and the
58
+ * picks the rest. Otherwise the host chose something else altogether, and the
59
+ * sheet has that selected with nothing picked on it.
60
+ */
61
+ export const afterHostGave = (sheet, given) => {
62
+ if (sameRanges(given, sheet.seen)) {
63
+ return sheet;
64
+ }
65
+ if (sameRanges(given, sheet.written ?? sheet.own)) {
66
+ return { ...sheet, seen: given };
67
+ }
68
+ if (sheet.written && given.length === sheet.written.length) {
69
+ return {
70
+ own: given.slice(0, sheet.ownCount),
71
+ written: given,
72
+ ownCount: sheet.ownCount,
73
+ seen: given,
74
+ };
75
+ }
76
+ return entrySheetSelections(given);
77
+ };
78
+ /** Whether a range picked for the entry is in any sheet's selection. */
79
+ export const hasEntryPicks = (state) => {
80
+ for (const sheet of state.sheets.values()) {
81
+ if (sheet.written) {
82
+ return true;
83
+ }
84
+ }
85
+ return false;
86
+ };
87
+ /** The sheet once its picks are out of its selection again. */
88
+ export const afterPutBack = (sheet) => entrySheetSelections(sheet.own, sheet.seen);
@@ -0,0 +1,11 @@
1
+ import type { EntrySelections } from "../api/entry-selections";
2
+ /**
3
+ * What each sheet has selected, as far as the cell entry now open is
4
+ * concerned (`api/entry-selections.ts`). It lives beside the editing cell so
5
+ * that it outlives a grid that remounts in the middle of an entry, as the
6
+ * editing cell does. Not part of the package's exports.
7
+ */
8
+ export declare const entrySelectionsAtom: import("jotai").PrimitiveAtom<EntrySelections | undefined> & {
9
+ init: EntrySelections | undefined;
10
+ };
11
+ //# sourceMappingURL=entry-selections.atom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-selections.atom.d.ts","sourceRoot":"","sources":["../../../atoms/entry-selections.atom.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;CAA+C,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { atom } from "jotai";
2
+ /**
3
+ * What each sheet has selected, as far as the cell entry now open is
4
+ * concerned (`api/entry-selections.ts`). It lives beside the editing cell so
5
+ * that it outlives a grid that remounts in the middle of an entry, as the
6
+ * editing cell does. Not part of the package's exports.
7
+ */
8
+ export const entrySelectionsAtom = atom(undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/canvas-grid/index.tsx"],"names":[],"mappings":"AAqEA,OAAO,KASN,MAAM,OAAO,CAAC;AAuRf,OAAO,KAAK,EAGV,QAAQ,EAcT,MAAM,aAAa,CAAC;AA0DrB,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,EAEhB,MAAM,WAAW,CAAC;AAixQnB,eAAO,MAAM,UAAU,EAA4C,CACjE,CAAC,SAAS,QAAQ,CAAC,GAAG,CAAC,EAEvB,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GACvB,wBAAwB,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAAE,KAChE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/canvas-grid/index.tsx"],"names":[],"mappings":"AAqEA,OAAO,KASN,MAAM,OAAO,CAAC;AAmSf,OAAO,KAAK,EAGV,QAAQ,EAcT,MAAM,aAAa,CAAC;AA0DrB,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,EAEhB,MAAM,WAAW,CAAC;AAm8QnB,eAAO,MAAM,UAAU,EAA4C,CACjE,CAAC,SAAS,QAAQ,CAAC,GAAG,CAAC,EAEvB,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GACvB,wBAAwB,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAAE,KAChE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC"}