@fileverse-dev/dsheet 3.0.1-yjs-1 → 3.0.2

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 (25) hide show
  1. package/dist/{constants-Cdz6oSCq.js → constants-Q8nzbvQO.js} +5 -3
  2. package/dist/constants.js +1 -1
  3. package/dist/editor/constants/shared-constants.d.ts +2 -0
  4. package/dist/{executeStringFunction-B2qjYgmE.js → executeStringFunction-C5hEkx9z.js} +9233 -13453
  5. package/dist/formula.js +1 -1
  6. package/dist/{index-C7kCuqoG.js → index-Dql-IRPC.js} +24580 -21253
  7. package/dist/index.es.js +42 -42
  8. package/dist/sheet-engine/core/api/cell.d.ts +20 -0
  9. package/dist/sheet-engine/core/api/common.d.ts +1 -2
  10. package/dist/sheet-engine/core/api/index.d.ts +0 -1
  11. package/dist/sheet-engine/core/api/sheet.d.ts +0 -5
  12. package/dist/sheet-engine/core/modules/formula-worker-bridge.d.ts +0 -1
  13. package/dist/sheet-engine/core/types.d.ts +0 -3
  14. package/dist/sheet-engine/react/components/Workbook/api.d.ts +1 -8
  15. package/dist/sheet-engine/react/components/Workbook/index.d.ts +1 -5
  16. package/dist/{use-xlsx-import-impl-BQsXcyKJ.js → use-xlsx-import-impl-BsL90Hs0.js} +477 -491
  17. package/dist/{xlsx-export-impl-BBux0CIG.js → xlsx-export-impl-DfQuhamE.js} +1106 -1106
  18. package/package.json +2 -2
  19. package/dist/editor/utils/config-ydoc-update.d.ts +0 -20
  20. package/dist/observability/publish-trace.d.ts +0 -26
  21. package/dist/sheet-engine/core/api/sheet-flowdata-lifecycle.d.ts +0 -15
  22. package/dist/sheet-engine/core/paste/paste-border-utils.d.ts +0 -23
  23. package/dist/sheet-engine/core/utils/border-config-utils.d.ts +0 -10
  24. package/dist/sheet-engine/core/utils/cell-persist-utils.d.ts +0 -8
  25. package/dist/sheet-engine/core/utils/range-format.d.ts +0 -43
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/dsheet",
3
3
  "private": false,
4
4
  "description": "DSheet",
5
- "version": "3.0.1-yjs-1",
5
+ "version": "3.0.2",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -112,4 +112,4 @@
112
112
  "typescript": "^5.2.2",
113
113
  "vite": "^5.0.0"
114
114
  }
115
- }
115
+ }
@@ -1,20 +0,0 @@
1
- import { WorkbookInstance } from '../../sheet-engine/react';
2
- import { SheetChangePath } from './update-ydoc';
3
-
4
- import * as Y from 'yjs';
5
- /** Diff top-level config sub-keys and emit granular Yjs updates. */
6
- export declare function buildConfigSubKeyChanges({ sheetId, oldConfig, newConfig, }: {
7
- sheetId: string;
8
- oldConfig: Record<string, any>;
9
- newConfig: Record<string, any>;
10
- }): SheetChangePath[];
11
- /**
12
- * Sync active sheet config sub-keys to Yjs (borderInfo, merge, rowlen, …).
13
- * Replaces whole-config writes so only changed sub-keys are broadcast.
14
- */
15
- export declare const configYdocUpdate: ({ sheetEditorRef, ydocRef, dsheetId, handleContentPortal, }: {
16
- sheetEditorRef: React.RefObject<WorkbookInstance | null>;
17
- ydocRef: React.RefObject<Y.Doc | null>;
18
- dsheetId: string;
19
- handleContentPortal?: any;
20
- }) => void;
@@ -1,26 +0,0 @@
1
- export type PackagePublishTraceEvent = {
2
- kind: 'package-onChange';
3
- dsheetId: string;
4
- traceId: number;
5
- step: string;
6
- ms: number;
7
- heapMB: number | null;
8
- meta?: Record<string, unknown>;
9
- outcome?: 'complete' | 'skipped';
10
- };
11
- declare global {
12
- interface Window {
13
- __publishTraceEnabled?: () => boolean;
14
- __publishTraceSink?: (event: PackagePublishTraceEvent) => void;
15
- }
16
- }
17
- export declare class PackagePublishTrace {
18
- private readonly dsheetId;
19
- private last;
20
- private traceId;
21
- private finished;
22
- constructor(dsheetId: string);
23
- mark(step: string, meta?: Record<string, unknown>): void;
24
- finish(meta?: Record<string, unknown>): void;
25
- skip(reason: string, meta?: Record<string, unknown>): void;
26
- }
@@ -1,15 +0,0 @@
1
- import { Context } from '../context';
2
-
3
- /**
4
- * Sheets that must keep dense `data` while `activeSheetId` is active:
5
- * the active tab plus any tab referenced by its formulas (deps graph + text scan).
6
- */
7
- export declare function getSheetsRequiredDense(ctx: Context, activeSheetId: string): Set<string>;
8
- /** Sheets the formula worker needs dense — active refs plus any tab with formulas. */
9
- export declare function getSheetsNeededForWorkerSnapshot(ctx: Context): Set<string>;
10
- export declare function demoteSheetToCelldata(ctx: Context, sheetId: string): void;
11
- /**
12
- * On tab switch: persist outgoing config, demote tabs not needed dense,
13
- * hydrate active tab + cross-sheet references.
14
- */
15
- export declare function syncAndDemoteInactiveFlowdata(ctx: Context, activeSheetId: string, previousSheetId: string | null): Set<string>;
@@ -1,23 +0,0 @@
1
- export declare function isTransparentBorderColor(color: string): boolean;
2
- export declare function isMeaningfulBorderSide(side: {
3
- style?: number;
4
- color?: string;
5
- } | undefined): boolean;
6
- export declare function filterMeaningfulBorderSides(sides: {
7
- l?: {
8
- style?: number;
9
- color?: string;
10
- };
11
- r?: {
12
- style?: number;
13
- color?: string;
14
- };
15
- t?: {
16
- style?: number;
17
- color?: string;
18
- };
19
- b?: {
20
- style?: number;
21
- color?: string;
22
- };
23
- }): typeof sides;
@@ -1,10 +0,0 @@
1
- import { Context } from '../context';
2
-
3
- export type BorderSelection = {
4
- row: [number, number];
5
- column: [number, number];
6
- };
7
- /** Remove border entries overlapping a single selection (cell + range types). */
8
- export declare function removeBorderInfoForSelection(borderInfo: any[], rowSt: number, rowEd: number, colSt: number, colEd: number): any[];
9
- export declare function removeBorderInfoInSelections(borderInfo: any[] | undefined, selections: BorderSelection[]): any[];
10
- export declare function syncBorderInfoToYdoc(ctx: Context, borderInfo: any[]): void;
@@ -1,8 +0,0 @@
1
- import { Cell } from '../types';
2
-
3
- export declare const CELL_FORMAT_ATTRS: readonly ["tb", "ht", "vt", "tr", "fs", "ff", "fc", "bl", "it", "un", "cl", "bg", "ct"];
4
- export type CellFormatAttr = (typeof CELL_FORMAT_ATTRS)[number];
5
- export declare function hasCellMeaningfulContent(cell: Cell | string | number | boolean | null | undefined): boolean;
6
- export declare function isFormatOnlyEmptyCell(cell: Cell | string | number | boolean | null | undefined): boolean;
7
- export declare function shouldPersistCelldataCell(cell: Cell | string | number | boolean | null | undefined): boolean;
8
- export declare function celldataEntryEqual(existing: unknown, next: unknown): boolean;
@@ -1,43 +0,0 @@
1
- import { Cell, CellMatrix, CellWithRowAndCol, Sheet } from '../types';
2
-
3
- export type CellFormatRange = {
4
- row: [number, number];
5
- column: [number, number];
6
- tb?: string;
7
- ht?: number | string;
8
- vt?: number | string;
9
- tr?: string;
10
- fs?: number;
11
- ff?: number | string;
12
- fc?: string;
13
- bl?: number;
14
- it?: number;
15
- un?: number;
16
- cl?: number;
17
- bg?: string;
18
- ct?: Cell['ct'];
19
- };
20
- declare function rangesEqual(a: CellFormatRange[] | undefined, b: CellFormatRange[] | undefined): boolean;
21
- /** Merge overlapping/adjacent ranges that carry identical format attrs. */
22
- export declare function normalizeCellFormatRanges(ranges: CellFormatRange[] | undefined): CellFormatRange[];
23
- export declare function getCellFormatRangeGridBounds(ranges: CellFormatRange[] | undefined): {
24
- maxRow: number;
25
- maxCol: number;
26
- } | null;
27
- export declare function upsertCellFormatRange(ranges: CellFormatRange[] | undefined, rowSt: number, rowEd: number, colSt: number, colEd: number, attrs: Partial<CellFormatRange>): {
28
- ranges: CellFormatRange[];
29
- changed: boolean;
30
- };
31
- export declare function punchHoleInCellFormatRanges(ranges: CellFormatRange[] | undefined, r: number, c: number): CellFormatRange[];
32
- export declare function punchRectHoleInCellFormatRanges(ranges: CellFormatRange[] | undefined, rowSt: number, rowEd: number, colSt: number, colEd: number): CellFormatRange[];
33
- export declare function shiftCellFormatRangesOnInsert(ranges: CellFormatRange[] | undefined, type: 'row' | 'column', index: number, count: number, direction: 'lefttop' | 'rightbottom'): CellFormatRange[];
34
- export declare function shiftCellFormatRangesOnDelete(ranges: CellFormatRange[] | undefined, type: 'row' | 'column', start: number, end: number): CellFormatRange[];
35
- export declare function applyCellFormatRangesToData(data: CellMatrix | null | undefined, ranges: CellFormatRange[] | undefined): void;
36
- export declare function buildSheetDataMatrixForExport(sheet: {
37
- data?: CellMatrix | null;
38
- celldata?: CellWithRowAndCol[];
39
- row?: number;
40
- column?: number;
41
- config?: Sheet['config'];
42
- }): CellMatrix;
43
- export { rangesEqual };