@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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/dsheet",
3
3
  "private": false,
4
4
  "description": "DSheet",
5
- "version": "4.0.1-ref",
5
+ "version": "4.0.2-a",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -1,2 +0,0 @@
1
- declare const NamedRanges: () => import("react/jsx-runtime").JSX.Element;
2
- export { NamedRanges };
@@ -1,31 +0,0 @@
1
- import { WorkbookInstance } from '../../sheet-engine/react';
2
- import { DefinedName } from '../../sheet-engine/core/types';
3
- import { RefObject } from 'react';
4
-
5
- import * as Y from 'yjs';
6
- /** Sibling share key on the same Y.Doc as the sheet array. */
7
- export declare function getDefinedNamesMapKey(dsheetId: string): string;
8
- export declare function getDefinedNamesYMap(ydoc: Y.Doc, dsheetId: string): Y.Map<DefinedName>;
9
- /** Read workbook-level named ranges from Yjs (stable name order). */
10
- export declare function readDefinedNamesFromYdoc(ydoc: Y.Doc, dsheetId: string): DefinedName[];
11
- /**
12
- * Prefer the sheet `Y.Array` share key when a doc has sibling maps
13
- * (e.g. `${dsheetId}:definedNames`).
14
- */
15
- export declare function resolveSheetArrayShareKey(doc: Y.Doc, preferredKey?: string): string | null;
16
- /**
17
- * Diff Context definedNames against the Y.Map and apply set/delete by id.
18
- */
19
- export declare function syncDefinedNamesToYdoc({ ydoc, dsheetId, definedNames, handleContentPortal, }: {
20
- ydoc: Y.Doc;
21
- dsheetId: string;
22
- definedNames: DefinedName[];
23
- handleContentPortal?: () => void;
24
- }): void;
25
- /** Push current workbook definedNames into Yjs (editor hook target). */
26
- export declare const definedNamesYdocUpdate: ({ sheetEditorRef, ydocRef, dsheetId, handleContentPortal, }: {
27
- sheetEditorRef: RefObject<WorkbookInstance | null>;
28
- ydocRef: RefObject<Y.Doc | null>;
29
- dsheetId: string;
30
- handleContentPortal?: () => void;
31
- }) => void;
@@ -1,41 +0,0 @@
1
- import { DefinedName } from '../../sheet-engine/core/types';
2
-
3
- export type ExcelDefinedNameEntry = {
4
- name: string;
5
- ranges: string[];
6
- localSheetId?: number;
7
- };
8
- export declare function isExcelSystemDefinedName(name: string): boolean;
9
- /** Build Excel loc string: `Sheet1!$A$1:$C$2` (or single cell). */
10
- export declare function encodeDefinedNameExcelRef(sheetName: string, range: DefinedName['range']): string;
11
- /**
12
- * Parse `Sheet1!$A$1:$B$2` / `'My Sheet'!$A$1` into sheet name + 0-based range.
13
- */
14
- export declare function parseExcelDefinedNameRef(ref: string): {
15
- sheetName: string;
16
- range: {
17
- row: [number, number];
18
- column: [number, number];
19
- };
20
- } | null;
21
- /**
22
- * Convert Excel defined-name entries into our DefinedName list.
23
- * `sheets` must already have stable ids and names (Excel order).
24
- */
25
- export declare function excelEntriesToDefinedNames(entries: ExcelDefinedNameEntry[], sheets: Array<{
26
- id?: string;
27
- name?: string;
28
- }>): DefinedName[];
29
- /** Write defined names onto an ExcelJS workbook (Pass 2). */
30
- export declare function applyDefinedNamesToExcelWorkbook(excelWorkbook: {
31
- definedNames: {
32
- add: (loc: string, name: string) => void;
33
- };
34
- }, definedNames: DefinedName[] | undefined, sheets: Array<{
35
- id?: string;
36
- name?: string;
37
- }>): void;
38
- /**
39
- * Parse `<definedNames>` from xl/workbook.xml (keeps localSheetId).
40
- */
41
- export declare function parseDefinedNamesFromXlsxBuffer(arrayBuffer: ArrayBuffer): Promise<ExcelDefinedNameEntry[]>;