@fileverse-dev/dsheet 2.0.6 → 2.0.7-importExport-fix-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,6 +40,32 @@ export type Context = {
40
40
  presences?: Presence[];
41
41
  showSearch?: boolean;
42
42
  showReplace?: boolean;
43
+ findReplaceHiddenDuringRangePick?: boolean;
44
+ findReplaceRestoreVisibility?: {
45
+ showSearch: boolean;
46
+ showReplace: boolean;
47
+ };
48
+ showQuickSearch?: boolean;
49
+ quickSearchFocusNonce?: number;
50
+ findReplacePrefill?: string;
51
+ quickSearchLoading?: boolean;
52
+ quickSearchHighlight?: {
53
+ matches: {
54
+ r: number;
55
+ c: number;
56
+ }[];
57
+ activeIndex: number;
58
+ } | null;
59
+ searchRangeScopeHighlight?: {
60
+ row: number[];
61
+ column: number[];
62
+ } | null;
63
+ /**
64
+ * When true, render the specific-range scope border in an emphasized style
65
+ * (e.g. after pressing Find). When false, keep a lighter border after
66
+ * confirming the range.
67
+ */
68
+ searchRangeScopeEmphasis?: boolean;
43
69
  linkCard?: LinkCardProps;
44
70
  rangeDialog?: RangeDialogProps;
45
71
  warnDialog?: string;
@@ -7,9 +7,10 @@ export { defaultSettings } from './settings';
7
7
  export type { Settings, Hooks } from './settings';
8
8
  export { handleCopy, handleGlobalKeyDown, handlePaste, handlePasteByClick, fixPositionOnFrozenCells, handleCellAreaMouseDown, handleCellAreaDoubleClick, handleContextMenu, mouseRender, handleOverlayMouseMove, handleOverlayMouseUp, handleRowHeaderMouseDown, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColSizeHandleDoubleClick, handleRowSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleRowFreezeHandleMouseDown, } from './events';
9
9
  export * from './locale';
10
- export { getBorderInfoComputeRange, getBorderInfoCompute, normalizedCellAttr, normalizedAttr, getCellValue, setCellValue, getRealCellValue, mergeBorder, cancelNormalSelected, updateCell, getRangetxt, getRangeByTxt, getInlineStringHTML, getStyleByCell, clearSelectedCellFormat, clearRowsCellsFormat, clearColumnsCellsFormat, clipboard, moveToEnd, getRangeRectsByCharacterOffset, update, is_date, valueShowEs, FormulaCache, groupValuesRefresh, setCaretPosition, getrangeseleciton, getFormulaEditorOwner, rangeHightlightselected, handleFormulaInput, israngeseleciton, createRangeHightlight, maybeRecoverDirtyRangeSelection, getFormulaRangeIndexAtCaret, isCaretAtValidFormulaRangeInsertionPoint, isLegacyFormulaRangeMode, markRangeSelectionDirty, setFormulaEditorOwner, functionHTMLGenerate, suppressFormulaRangeSelectionForInitialEdit, rangeSetValue, getFormulaRangeIndexForKeyboardSync, createFormulaRangeSelect, isFormulaReferenceInputMode, seedFormulaFuncSelectedRangeFromLastSelection, initFreeze, isInlineStringCell, getInlineStringNoStyle, applyLinkToSelection, getHyperlinksFromInlineSegments, getUniformLinkFromWindowSelectionInEditor, getHyperlinkAtCaretInContentEditable, rowLocation, rowLocationByIndex, colLocation, colLocationByIndex, insertRowCol, deleteRowCol, hideSelected, showSelected, isShowHidenCR, scrollToHighlightCell, selectTitlesMap, selectTitlesRange, normalizeSelection, syncPrimaryCellActiveFromSelection, setPrimaryCellActive, advancePrimaryCellInLastMultiSelection, snapSheetSelectionFocusToCellPreserveMultiRange, moveHighlightCell, deleteSelectedCellText, selectAll, fixRowStyleOverflowInFreeze, fixColumnStyleOverflowInFreeze, calcSelectionInfo, addSheet, deleteSheet, editSheetName, changeSheet, updateFormat, autoSelectionFormula, handleBold, handleItalic, handleStrikeThrough, handleUnderline, handleHorizontalAlign, handleVerticalAlign, handleTextColor, handleTextBackground, handleBorder, handleMerge, handleSort, handleFreeze, handleTextSize, handleSum, handleLink, captureLinkEditorOpenSnapshot, toolbarItemClickHandler, toolbarItemSelectedFunc, handleScreenShot, insertImage, showImgChooser, drawArrow, setEditingComment, removeEditingComment, newComment, editComment, deleteComment, showComments, showHideComment, showHideAllComments, onCommentBoxMoveStart, removeActiveImage, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, createDropCellRange, sortSelection, searchAll, searchNext, replace, replaceAll, getCellRowColumn, getCellHyperlink, getCellHyperlinks, getHyperlinkDisplayTextInCell, getInlineLinkPlainRange, getUniformLinkCoveringPlainRange, getUniformLinkAtPlainOffset, saveHyperlink, removeHyperlink, removeHyperlinkForLink, updateHyperlinkForLink, syncLinkCardAfterHyperlinkChange, showLinkCard, goToLink, isLinkValid, createFilterOptions, clearFilter, createFilter, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, onCellsMoveStart, cfSplitRange, updateMoreCell, getRegStr, getDataArr, applyLocation, getOptionValue, getSelectRange, getDropdownList, setDropdownValue, confirmMessage, setConditionRules, handleOverlayTouchStart, handleOverlayTouchEnd, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, handleKeydownForZoom, jfrefreshgrid, sanitizeDuneUrl, insertDuneChart, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, setCellError, clearCellError, isdatatypemulti, diff, isdatetime, isRealNull, isRealNum, isNumericCellType, iscelldata, getcellrange, cancelFunctionrangeSelected, seletedHighlistByindex, spillSortResult, execfunction, execFunctionGroup, insertUpdateFunctionGroup, remapFormulaReferencesByMap, checkCF, getComputeMap, cancelPaintModel, hideCRCount, getdatabyselection, } from './modules';
10
+ export { getBorderInfoComputeRange, getBorderInfoCompute, normalizedCellAttr, normalizedAttr, getCellValue, setCellValue, getRealCellValue, mergeBorder, cancelNormalSelected, updateCell, getRangetxt, getRangeByTxt, getInlineStringHTML, applyLinkToSelection, getHyperlinksFromInlineSegments, getUniformLinkFromWindowSelectionInEditor, getHyperlinkAtCaretInContentEditable, getStyleByCell, clearSelectedCellFormat, clearRowsCellsFormat, clearColumnsCellsFormat, clipboard, moveToEnd, getRangeRectsByCharacterOffset, update, is_date, valueShowEs, FormulaCache, groupValuesRefresh, execFunctionGroup, setCaretPosition, getrangeseleciton, getFormulaEditorOwner, rangeHightlightselected, handleFormulaInput, israngeseleciton, createRangeHightlight, maybeRecoverDirtyRangeSelection, getFormulaRangeIndexAtCaret, isCaretAtValidFormulaRangeInsertionPoint, isLegacyFormulaRangeMode, markRangeSelectionDirty, setFormulaEditorOwner, functionHTMLGenerate, suppressFormulaRangeSelectionForInitialEdit, rangeSetValue, getFormulaRangeIndexForKeyboardSync, createFormulaRangeSelect, isFormulaReferenceInputMode, seedFormulaFuncSelectedRangeFromLastSelection, initFreeze, isInlineStringCell, getInlineStringNoStyle, rowLocation, rowLocationByIndex, colLocation, colLocationByIndex, insertRowCol, deleteRowCol, hideSelected, showSelected, isShowHidenCR, scrollToHighlightCell, selectTitlesMap, selectTitlesRange, normalizeSelection, syncPrimaryCellActiveFromSelection, setPrimaryCellActive, advancePrimaryCellInLastMultiSelection, snapSheetSelectionFocusToCellPreserveMultiRange, moveHighlightCell, deleteSelectedCellText, selectAll, fixRowStyleOverflowInFreeze, fixColumnStyleOverflowInFreeze, calcSelectionInfo, addSheet, deleteSheet, editSheetName, changeSheet, updateFormat, autoSelectionFormula, handleBold, handleItalic, handleStrikeThrough, handleUnderline, handleHorizontalAlign, handleVerticalAlign, handleTextColor, handleTextBackground, handleBorder, handleMerge, handleSort, handleFreeze, handleTextSize, handleSum, handleLink, captureLinkEditorOpenSnapshot, toolbarItemClickHandler, toolbarItemSelectedFunc, handleScreenShot, insertImage, showImgChooser, drawArrow, setEditingComment, removeEditingComment, newComment, editComment, deleteComment, showComments, showHideComment, showHideAllComments, onCommentBoxMoveStart, removeActiveImage, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, createDropCellRange, sortSelection, searchAll, searchNext, replace, replaceAll, getSearchIndexArr, getSearchIndexArrAsync, getFindRangeOnCurrentSheet, getQuickSearchIndexArr, getQuickSearchHiddenConfig, getCellHyperlinks, getHyperlinkDisplayTextInCell, getInlineLinkPlainRange, getUniformLinkCoveringPlainRange, getUniformLinkAtPlainOffset, removeHyperlinkForLink, updateHyperlinkForLink, syncLinkCardAfterHyperlinkChange, expandCellRectForMerge, shouldQuickSearchUseAsync, runQuickSearchIndexArrAsync, QUICK_SEARCH_ASYNC_ROW_THRESHOLD, parseRangeText, getCellRowColumn, getCellHyperlink, saveHyperlink, removeHyperlink, showLinkCard, goToLink, isLinkValid, createFilterOptions, clearFilter, createFilter, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, onCellsMoveStart, cfSplitRange, updateMoreCell, getRegStr, getDataArr, applyLocation, getOptionValue, getSelectRange, getDropdownList, setDropdownValue, confirmMessage, setConditionRules, handleOverlayTouchStart, handleOverlayTouchEnd, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, handleKeydownForZoom, jfrefreshgrid, sanitizeDuneUrl, insertDuneChart, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, setCellError, clearCellError, isdatatypemulti, diff, isdatetime, isRealNull, isRealNum, isNumericCellType, iscelldata, getcellrange, cancelFunctionrangeSelected, seletedHighlistByindex, spillSortResult, execfunction, insertUpdateFunctionGroup, remapFormulaReferencesByMap, checkCF, getComputeMap, cancelPaintModel, hideCRCount, getdatabyselection, } from './modules';
11
11
  export type { FilterDate, FilterValue, FilterColor } from './modules';
12
12
  export { getFreezeState, toggleFreeze, indexToColumnChar, escapeScriptTag, escapeHTMLTag, getSheetIndex, replaceHtml, isAllowEdit, isAllowEditReadOnly, filterPatch, patchToOp, opToPatch, inverseRowColOptions, } from './utils';
13
13
  export type { PatchOptions, ChangedSheet } from './utils';
14
14
  export type { Op, Cell, CellWithRowAndCol, CellMatrix, HyperlinkEntry, Selection, Presence, Sheet, GlobalCache, SingleRange, Range, SearchResult, LinkCardProps, LiveQueryData, Freezen, } from './types';
15
+ export type { CheckModes, HyperlinkMap, FindSearchScope, SearchHiddenConfig, SearchNextResult, ReplaceAllResult, } from './modules/searchReplace';
15
16
  export { cellFadeAnimator, markCellChanged } from './animate';
@@ -467,11 +467,38 @@ declare const _default: {
467
467
  locationExample: string;
468
468
  lessTwoRowTip: string;
469
469
  lessTwoColumnTip: string;
470
+ searchNoResults: string;
471
+ searchMatchCountAria: string;
472
+ quickSearchDialogAria: string;
473
+ quickSearchPlaceholder: string;
474
+ quickSearchSearching: string;
475
+ quickSearchNoResults: string;
476
+ quickSearchCounterTemplate: string;
477
+ quickSearchMatchCountAria: string;
478
+ quickSearchPrevAria: string;
479
+ quickSearchNextAria: string;
480
+ quickSearchMoreOptionsTitle: string;
481
+ quickSearchOpenFindReplaceAria: string;
482
+ quickSearchCloseAria: string;
470
483
  findTextbox: string;
471
484
  replaceTextbox: string;
472
485
  regexTextbox: string;
473
486
  wholeTextbox: string;
474
487
  distinguishTextbox: string;
488
+ formulaTextbox: string;
489
+ linkTextbox: string;
490
+ allSheetsTextbox: string;
491
+ searchScopeLabel: string;
492
+ searchScopeAllSheets: string;
493
+ searchScopeThisSheet: string;
494
+ searchScopeSpecificRange: string;
495
+ rangeInputPlaceholder: string;
496
+ rangeInputInvalidError: string;
497
+ rangeSelectOnSheetTitle: string;
498
+ selectDataRangeTitle: string;
499
+ replaceAllWithSkippedTip: string;
500
+ replaceAllSuccessInfotext: string;
501
+ replaceAllSuccessWithSkippedInfotext: string;
475
502
  allReplaceBtn: string;
476
503
  replaceBtn: string;
477
504
  allFindBtn: string;
@@ -630,11 +630,28 @@ declare const _default: {
630
630
  locationExample: string;
631
631
  lessTwoRowTip: string;
632
632
  lessTwoColumnTip: string;
633
+ quickSearchDialogAria: string;
634
+ quickSearchPlaceholder: string;
635
+ quickSearchSearching: string;
636
+ quickSearchNoResults: string;
637
+ quickSearchCounterTemplate: string;
638
+ quickSearchMatchCountAria: string;
639
+ quickSearchPrevAria: string;
640
+ quickSearchNextAria: string;
641
+ quickSearchMoreOptionsTitle: string;
642
+ quickSearchOpenFindReplaceAria: string;
643
+ quickSearchCloseAria: string;
633
644
  findTextbox: string;
634
645
  replaceTextbox: string;
635
646
  regexTextbox: string;
636
647
  wholeTextbox: string;
637
648
  distinguishTextbox: string;
649
+ formulaTextbox: string;
650
+ linkTextbox: string;
651
+ allSheetsTextbox: string;
652
+ searchScopeLabel: string;
653
+ searchScopeAllSheets: string;
654
+ searchScopeThisSheet: string;
638
655
  allReplaceBtn: string;
639
656
  replaceBtn: string;
640
657
  allFindBtn: string;
@@ -505,11 +505,28 @@ declare const _default: {
505
505
  locationExample: string;
506
506
  lessTwoRowTip: string;
507
507
  lessTwoColumnTip: string;
508
+ quickSearchDialogAria: string;
509
+ quickSearchPlaceholder: string;
510
+ quickSearchSearching: string;
511
+ quickSearchNoResults: string;
512
+ quickSearchCounterTemplate: string;
513
+ quickSearchMatchCountAria: string;
514
+ quickSearchPrevAria: string;
515
+ quickSearchNextAria: string;
516
+ quickSearchMoreOptionsTitle: string;
517
+ quickSearchOpenFindReplaceAria: string;
518
+ quickSearchCloseAria: string;
508
519
  findTextbox: string;
509
520
  replaceTextbox: string;
510
521
  regexTextbox: string;
511
522
  wholeTextbox: string;
512
523
  distinguishTextbox: string;
524
+ formulaTextbox: string;
525
+ linkTextbox: string;
526
+ allSheetsTextbox: string;
527
+ searchScopeLabel: string;
528
+ searchScopeAllSheets: string;
529
+ searchScopeThisSheet: string;
513
530
  allReplaceBtn: string;
514
531
  replaceBtn: string;
515
532
  allFindBtn: string;
@@ -523,11 +523,28 @@ declare const _default: {
523
523
  locationExample: string;
524
524
  lessTwoRowTip: string;
525
525
  lessTwoColumnTip: string;
526
+ quickSearchDialogAria: string;
527
+ quickSearchPlaceholder: string;
528
+ quickSearchSearching: string;
529
+ quickSearchNoResults: string;
530
+ quickSearchCounterTemplate: string;
531
+ quickSearchMatchCountAria: string;
532
+ quickSearchPrevAria: string;
533
+ quickSearchNextAria: string;
534
+ quickSearchMoreOptionsTitle: string;
535
+ quickSearchOpenFindReplaceAria: string;
536
+ quickSearchCloseAria: string;
526
537
  findTextbox: string;
527
538
  replaceTextbox: string;
528
539
  regexTextbox: string;
529
540
  wholeTextbox: string;
530
541
  distinguishTextbox: string;
542
+ formulaTextbox: string;
543
+ linkTextbox: string;
544
+ allSheetsTextbox: string;
545
+ searchScopeLabel: string;
546
+ searchScopeAllSheets: string;
547
+ searchScopeThisSheet: string;
531
548
  allReplaceBtn: string;
532
549
  replaceBtn: string;
533
550
  allFindBtn: string;
@@ -668,11 +668,28 @@ declare const _default: {
668
668
  locationExample: string;
669
669
  lessTwoRowTip: string;
670
670
  lessTwoColumnTip: string;
671
+ quickSearchDialogAria: string;
672
+ quickSearchPlaceholder: string;
673
+ quickSearchSearching: string;
674
+ quickSearchNoResults: string;
675
+ quickSearchCounterTemplate: string;
676
+ quickSearchMatchCountAria: string;
677
+ quickSearchPrevAria: string;
678
+ quickSearchNextAria: string;
679
+ quickSearchMoreOptionsTitle: string;
680
+ quickSearchOpenFindReplaceAria: string;
681
+ quickSearchCloseAria: string;
671
682
  findTextbox: string;
672
683
  replaceTextbox: string;
673
684
  regexTextbox: string;
674
685
  wholeTextbox: string;
675
686
  distinguishTextbox: string;
687
+ formulaTextbox: string;
688
+ linkTextbox: string;
689
+ allSheetsTextbox: string;
690
+ searchScopeLabel: string;
691
+ searchScopeAllSheets: string;
692
+ searchScopeThisSheet: string;
676
693
  allReplaceBtn: string;
677
694
  replaceBtn: string;
678
695
  allFindBtn: string;
@@ -17,7 +17,8 @@ export { showImgChooser, insertImage, removeActiveImage, cancelActiveImgItem, on
17
17
  export { createDropCellRange, dropCellCache, getTypeItemHide, updateDropCell, } from './dropCell';
18
18
  export { mergeCells } from './merge';
19
19
  export { sortSelection, spillSortResult } from './sort';
20
- export { searchAll, searchNext, replace, replaceAll } from './searchReplace';
20
+ export { searchAll, searchNext, replace, replaceAll, getSearchIndexArr, getSearchIndexArrAsync, getFindRangeOnCurrentSheet, getQuickSearchIndexArr, getQuickSearchHiddenConfig, expandCellRectForMerge, shouldQuickSearchUseAsync, runQuickSearchIndexArrAsync, QUICK_SEARCH_ASYNC_ROW_THRESHOLD, parseRangeText, } from './searchReplace';
21
+ export type { CheckModes, HyperlinkMap, FindSearchScope, SearchHiddenConfig, SearchNextResult, ReplaceAllResult, } from './searchReplace';
21
22
  export { getCellRowColumn, getCellHyperlink, getCellHyperlinks, getHyperlinkDisplayTextInCell, getInlineLinkPlainRange, getUniformLinkCoveringPlainRange, getUniformLinkAtPlainOffset, saveHyperlink, removeHyperlink, removeHyperlinkForLink, updateHyperlinkForLink, syncLinkCardAfterHyperlinkChange, showLinkCard, goToLink, isLinkValid, } from './hyperlink';
22
23
  export { createFilterOptions, clearFilter, createFilter, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, } from './filter';
23
24
  export type { FilterDate, FilterValue, FilterColor } from './filter';
@@ -1,37 +1,129 @@
1
1
  import { Context } from '../context';
2
- import { CellMatrix, SearchResult, GlobalCache } from '../types';
2
+ import { CellMatrix, Selection, SearchResult, GlobalCache } from '../types';
3
3
 
4
+ /** Where find/replace scans on the current sheet (workbook-wide only applies to find-all). */
5
+ export type FindSearchScope = 'allSheets' | 'thisSheet' | 'specificRange';
6
+ /**
7
+ * Return value of {@link searchNext}.
8
+ *
9
+ * @remarks
10
+ * **Semver:** Older releases returned `string | null` from `searchNext` (a localized message, or `null` on success).
11
+ * The object form is a **breaking change** for callers that still expect `string | null`; update them to read
12
+ * {@link SearchNextResult.alertMsg} (and optionally {@link SearchNextResult.matchIndex} /
13
+ * {@link SearchNextResult.matchTotal} for on-sheet scoped search UI).
14
+ */
15
+ export type SearchNextResult = {
16
+ /** Localized message for an alert dialog, or `null` when the next/previous hit was selected successfully. */
17
+ alertMsg: string | null;
18
+ /**
19
+ * 0-based index of the selected hit in the current sheet's ordered hit list when
20
+ * `scope` is `thisSheet` or `specificRange` and navigation succeeded; otherwise `0`.
21
+ */
22
+ matchIndex: number;
23
+ /**
24
+ * Size of that hit list for `thisSheet` / `specificRange`; `0` when not applicable (e.g. `allSheets`, errors,
25
+ * or empty search).
26
+ */
27
+ matchTotal: number;
28
+ };
29
+ /** Outcome of {@link replaceAll} for UI (inline status vs. error message). */
30
+ export type ReplaceAllResult = {
31
+ ok: false;
32
+ message: string;
33
+ } | {
34
+ ok: true;
35
+ replaced: number;
36
+ skipped: number;
37
+ };
38
+ /** Full used grid on the active sheet for find/replace on this sheet; `null` if the sheet has no cells. */
39
+ export declare function getFindRangeOnCurrentSheet(flowdata: CellMatrix): Selection[] | null;
40
+ export type HyperlinkMap = Record<string, {
41
+ linkType?: string;
42
+ linkAddress?: string;
43
+ }>;
44
+ export interface CheckModes {
45
+ regCheck?: boolean;
46
+ wordCheck?: boolean;
47
+ caseCheck?: boolean;
48
+ /** Also search inside formula strings (cell.f) */
49
+ formulaCheck?: boolean;
50
+ /** Also search sheet hyperlink address/type for the cell */
51
+ linkCheck?: boolean;
52
+ }
53
+ /** Skip cells in hidden rows/columns (manual hide + filter). */
54
+ export type SearchHiddenConfig = {
55
+ rowhidden?: Record<string, number> | null;
56
+ colhidden?: Record<string, number> | null;
57
+ };
4
58
  export declare function getSearchIndexArr(searchText: string, range: {
5
59
  row: number[];
6
60
  column: number[];
7
- }[], flowdata: CellMatrix, { regCheck, wordCheck, caseCheck }?: {
8
- regCheck: boolean;
9
- wordCheck: boolean;
10
- caseCheck: boolean;
11
- }): {
61
+ }[], flowdata: CellMatrix, { regCheck, wordCheck, caseCheck, formulaCheck, linkCheck, }?: CheckModes, hyperlinkMap?: HyperlinkMap, hiddenConfig?: SearchHiddenConfig): {
12
62
  r: number;
13
63
  c: number;
14
64
  }[];
15
- export declare function searchNext(ctx: Context, searchText: string, checkModes: {
16
- regCheck: boolean;
17
- wordCheck: boolean;
18
- caseCheck: boolean;
19
- }): any;
20
- export declare function searchAll(ctx: Context, searchText: string, checkModes: {
21
- regCheck: boolean;
22
- wordCheck: boolean;
23
- caseCheck: boolean;
24
- }): SearchResult[];
65
+ /** Use chunked async scan when the active sheet has at least this many rows. */
66
+ export declare const QUICK_SEARCH_ASYNC_ROW_THRESHOLD = 50000;
67
+ export declare function getQuickSearchHiddenConfig(ctx: Context): SearchHiddenConfig;
68
+ /** Display-only, case-insensitive substring find; skips hidden rows/columns. */
69
+ export declare function getQuickSearchIndexArr(ctx: Context, searchText: string, flowdata: CellMatrix): {
70
+ r: number;
71
+ c: number;
72
+ }[];
73
+ /** Bounding grid rect for overlay (merged region or single cell). */
74
+ export declare function expandCellRectForMerge(ctx: Context, r: number, c: number): {
75
+ r1: number;
76
+ r2: number;
77
+ c1: number;
78
+ c2: number;
79
+ };
80
+ export declare function shouldQuickSearchUseAsync(flowdata: CellMatrix): boolean;
81
+ /**
82
+ * Finds the next or previous match, updates selection and scroll, and optionally switches sheet when
83
+ * `scope` is `allSheets`.
84
+ *
85
+ * @param specificRange - When `scope` is `specificRange`, restricts the scan to this rectangle on the active sheet.
86
+ * @returns Structured result; see {@link SearchNextResult} and semver note on {@link SearchNextResult} remarks.
87
+ */
88
+ export declare function searchNext(ctx: Context, searchText: string, checkModes: CheckModes, scope?: FindSearchScope, direction?: 'next' | 'prev', specificRange?: Selection): SearchNextResult;
89
+ export declare function searchAll(ctx: Context, searchText: string, checkModes: CheckModes, scope?: FindSearchScope, specificRange?: Selection): SearchResult[];
25
90
  export declare function onSearchDialogMoveStart(globalCache: GlobalCache, e: MouseEvent, container: HTMLDivElement): void;
26
91
  export declare function onSearchDialogMove(globalCache: GlobalCache, e: MouseEvent): void;
27
92
  export declare function onSearchDialogMoveEnd(globalCache: GlobalCache): void;
28
- export declare function replace(ctx: Context, searchText: string, replaceText: string, checkModes: {
29
- regCheck: boolean;
30
- wordCheck: boolean;
31
- caseCheck: boolean;
32
- }): any;
33
- export declare function replaceAll(ctx: Context, searchText: string, replaceText: string, checkModes: {
34
- regCheck: boolean;
35
- wordCheck: boolean;
36
- caseCheck: boolean;
37
- }): any;
93
+ export declare function replace(ctx: Context, searchText: string, replaceText: string, checkModes: CheckModes, specificRange?: Selection): any;
94
+ export declare function replaceAll(ctx: Context, searchText: string, replaceText: string, checkModes: CheckModes, specificRange?: Selection): ReplaceAllResult;
95
+ /**
96
+ * Asynchronously scans `flowdata` for `searchText` in chunks, yielding
97
+ * between chunks so the main thread stays responsive.
98
+ *
99
+ * Returns an AbortController — call `.abort()` to cancel an in-flight scan.
100
+ *
101
+ * @param onProgress - called with partial results after each chunk
102
+ * @param onComplete - called once with the full result array when done
103
+ */
104
+ export declare function getSearchIndexArrAsync(searchText: string, range: {
105
+ row: number[];
106
+ column: number[];
107
+ }[], flowdata: CellMatrix, modes: CheckModes, hyperlinkMap?: HyperlinkMap, hiddenConfig?: SearchHiddenConfig, onProgress?: (partial: {
108
+ r: number;
109
+ c: number;
110
+ }[]) => void, onComplete?: (all: {
111
+ r: number;
112
+ c: number;
113
+ }[]) => void): AbortController;
114
+ /** Chunked quick search with hidden row/column skip (same semantics as `getQuickSearchIndexArr`). */
115
+ export declare function runQuickSearchIndexArrAsync(ctx: Context, searchText: string, flowdata: CellMatrix, onProgress: (partial: {
116
+ r: number;
117
+ c: number;
118
+ }[]) => void, onComplete: (all: {
119
+ r: number;
120
+ c: number;
121
+ }[]) => void): AbortController;
122
+ /**
123
+ * Parses an A1-notation range string (e.g. "E10:H14" or "Sheet1!E10:H14")
124
+ * into a `Selection` suitable for scoping find/replace.
125
+ *
126
+ * Returns `null` if the text is empty or cannot be parsed.
127
+ * The sheet-name prefix is stripped before parsing — the active sheet is always used.
128
+ */
129
+ export declare function parseRangeText(rangeText: string, ctx: Context): Selection | null;
@@ -399,6 +399,8 @@ export type GlobalCache = {
399
399
  } | undefined;
400
400
  };
401
401
  };
402
+ /** Element to restore focus to after closing Quick Search (not stored in Immer context). */
403
+ quickSearchReturnFocus?: Element | null;
402
404
  linkCard?: {
403
405
  mouseEnter?: boolean;
404
406
  rangeSelectionModal?: {
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+
3
+ declare const QuickSearchBar: React.FC;
4
+ export default QuickSearchBar;