@fileverse-dev/dsheet 4.0.2 → 4.0.3-import-compaction.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.
@@ -0,0 +1,25 @@
1
+ import { Sheet } from '../../sheet-engine/react';
2
+
3
+ /**
4
+ * XLSX imports (Google Sheets exports especially) materialize every
5
+ * styled-but-empty cell. Move those into config.cellFormatRanges — the same
6
+ * sparse representation the editor uses — so they never inflate celldata/Yjs.
7
+ * Cells with content, merges, hyperlinks, notes or masks are kept verbatim.
8
+ */
9
+ export declare function compactImportedSheetFormatting(sheet: Sheet): void;
10
+ /**
11
+ * Imported validations repeat the full option list + per-option color string
12
+ * on every covered cell (whole-column dropdowns → thousands of copies). Store
13
+ * each unique entry once in dataVerificationDefs and keep numeric refs in the
14
+ * per-cell map; expandSheetDataVerification restores objects for the engine.
15
+ */
16
+ export declare function internImportedDataVerification(sheet: Sheet): void;
17
+ /**
18
+ * Resolve interned dataVerification refs back to shared entry objects before
19
+ * the sheet reaches the engine or the XLSX exporter. No-op (and no mutation)
20
+ * when the map already holds objects, so live workbook sheets pass through.
21
+ */
22
+ export declare function expandSheetDataVerification<T extends {
23
+ dataVerification?: unknown;
24
+ dataVerificationDefs?: unknown;
25
+ }>(sheet: T): T;
@@ -0,0 +1,25 @@
1
+ import { Sheet } from '../../sheet-engine/react';
2
+
3
+ export declare function generateImportSheetId(): string;
4
+ export type XlsxImportWarning = {
5
+ code: 'tables-unsupported';
6
+ } | {
7
+ code: 'filters-unsupported';
8
+ };
9
+ export type XlsxParseSettings = {
10
+ /** Workbook default column width in px (from the live workbook settings, if any). */
11
+ workbookDefaultColWidth?: number;
12
+ /** Workbook default row height in px (from the live workbook settings, if any). */
13
+ workbookDefaultRowHeight?: number;
14
+ };
15
+ export type XlsxParsedWorkbook = {
16
+ /** Decorated + compacted sheets, ready for the ydoc write. */
17
+ sheets: Sheet[];
18
+ /** Workbook name from luckyexcel info (extension not yet stripped). */
19
+ workbookName: string;
20
+ /** UI warnings to replay on the main thread (toasts/onWarning). */
21
+ warnings: XlsxImportWarning[];
22
+ /** Sheet ids this pipeline generated — the caller may remap them with a custom generator. */
23
+ generatedSheetIds: string[];
24
+ };
25
+ export declare function parseXlsxWorkbook(file: File, settings?: XlsxParseSettings): Promise<XlsxParsedWorkbook>;
@@ -32612,19 +32612,21 @@ export {
32612
32612
  cg as e7,
32613
32613
  fg as e8,
32614
32614
  fu as e9,
32615
- Wp as ea,
32616
- vc as eb,
32617
- Up as ec,
32618
- Pp as ed,
32619
- Ap as ee,
32620
- xp as ef,
32621
- tc as eg,
32622
- Dp as eh,
32623
- wa as ei,
32624
- Do as ej,
32625
- Ip as ek,
32626
- qp as el,
32627
- Ju as em,
32615
+ dc as ea,
32616
+ zn as eb,
32617
+ Wp as ec,
32618
+ vc as ed,
32619
+ Up as ee,
32620
+ Pp as ef,
32621
+ Ap as eg,
32622
+ xp as eh,
32623
+ tc as ei,
32624
+ Dp as ej,
32625
+ wa as ek,
32626
+ Do as el,
32627
+ Ip as em,
32628
+ qp as en,
32629
+ Ju as eo,
32628
32630
  Mp as f,
32629
32631
  As as g,
32630
32632
  Ff as h,
package/dist/formula.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { FLVURL as r } from "@fileverse-dev/formulajs";
2
- import { e as t, f } from "./executeStringFunction-BQvE7aeV.js";
2
+ import { e as t, f } from "./executeStringFunction-C1C2F-4h.js";
3
3
  export {
4
4
  r as FLVURL,
5
5
  t as executeStringFunction,