@fileverse-dev/dsheet 4.0.1-ref → 4.0.2-a

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.
@@ -1,53 +0,0 @@
1
- import { Context } from '../context';
2
- import { DefinedName, SingleRange } from '../types';
3
-
4
- /** Excel/Google: names must start with letter/underscore; no spaces; not a cell ref. */
5
- export declare function isValidDefinedNameIdentifier(name: string): boolean;
6
- export declare function getDefinedNameDisplayRange(ctx: Context, dn: DefinedName): string;
7
- export declare function findDefinedNameForSelection(ctx: Context): DefinedName | null;
8
- export declare function findDefinedNameByName(ctx: Context, name: string, excludeId?: string): DefinedName | null;
9
- /**
10
- * Resolve a formula VARIABLE (e.g. `=SUM(Custom)`) to a defined name.
11
- * Prefers sheet-scoped names matching `formulaSheetId`, then workbook-scoped.
12
- */
13
- export declare function resolveDefinedNameForFormula(definedNames: DefinedName[] | undefined | null, name: string, formulaSheetId?: string): DefinedName | null;
14
- export declare function addDefinedName(ctx: Context, input: {
15
- name: string;
16
- sheetId: string;
17
- range: SingleRange;
18
- scope?: DefinedName['scope'];
19
- localSheetId?: string;
20
- }): {
21
- ok: true;
22
- namedRange: DefinedName;
23
- } | {
24
- ok: false;
25
- error: string;
26
- };
27
- export declare function updateDefinedName(ctx: Context, id: string, patch: {
28
- name?: string;
29
- sheetId?: string;
30
- range?: SingleRange;
31
- }): {
32
- ok: true;
33
- namedRange: DefinedName;
34
- } | {
35
- ok: false;
36
- error: string;
37
- };
38
- export declare function deleteDefinedName(ctx: Context, id: string): boolean;
39
- /** Jump to a named range (switch sheet if needed) and select its cells. */
40
- export declare function selectDefinedName(ctx: Context, id: string): boolean;
41
- export declare function openNamedRangesSidebar(): void;
42
- /**
43
- * Defer Yjs sync until after Immer applies the draft (same pattern as
44
- * sheet-metadata-hooks). Capture the hook fn — not `ctx.hooks` — so the
45
- * draft proxy is not read after revoke.
46
- */
47
- export declare function scheduleDefinedNamesSync(ctx: Context): void;
48
- /** Shift named ranges on the given sheet after row/col insert. Returns affected names. */
49
- export declare function shiftDefinedNamesOnInsert(ctx: Context, sheetId: string, type: 'row' | 'column', index: number, count: number, direction: 'lefttop' | 'rightbottom'): string[];
50
- /** Shift/remove named ranges on the given sheet after row/col delete. */
51
- export declare function shiftDefinedNamesOnDelete(ctx: Context, sheetId: string, type: 'row' | 'column', start: number, end: number): string[];
52
- /** Drop named ranges that pointed at a deleted sheet. */
53
- export declare function removeDefinedNamesForSheet(ctx: Context, deletedSheetId: string): string[];
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- declare const NamedRanges: React.FC;
4
- export default NamedRanges;