@gridsheet/preact-core 3.0.7 → 3.2.0

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/dist/types.d.ts CHANGED
@@ -1,18 +1,49 @@
1
1
  import { RefObject, CSSProperties, KeyboardEvent } from 'react';
2
- import { Sheet, UserSheet, BookType, PolicyType, ModeType, PointType, ZoneType, RectType, PositionType, CellsByAddressType, SheetLimits } from '@gridsheet/core';
2
+ import { Sheet, UserSheet, BookType, PolicyType, ModeType, DensityType, GridLinesType, MatrixAlignmentType, PointType, ZoneType, RectType, PositionType, CellsByAddressType, SheetLimits } from '@gridsheet/core';
3
3
  import { ContextMenuItemDescriptor, RowMenuItemDescriptor, ColMenuItemDescriptor } from './lib/menu';
4
4
  export type { CSSPropertiesLike, RefLike, Resolution, Y, X, Height, Width, ShapeType, RectType, MatrixType, CursorStateType, FeedbackType, ModeType, HeadersType, AsyncCache, System, FilterConditionMethod, FilterCondition, FilterConfig, CellType, RawCellType, CellPatchType, CellFilter, CellsByAddressType, CellsByIdType, SystemsByIdType, RangeType, PointType, ExtraPointType, PositionType, ZoneType, AreaType, WriterType, Id, Ids, IdMatrix, Address, MatricesByAddress, StorePatchType, HistoryUpdateType, MoveRelation, MoveRelations, HistoryMoveType, HistoryInsertRowsType, HistoryRemoveRowsType, HistoryInsertColsType, HistoryRemoveColsType, HistorySortRowsType, HistoryType, Virtualization, OperatorType, OperationType, Dispatcher, StoreDispatchType, ContextsBySheetId, SheetIdsByName, RefPaletteType, } from '@gridsheet/core';
5
5
  export type Policies = {
6
6
  [s: string]: PolicyType;
7
7
  };
8
+ /**
9
+ * Border visibility per side. `all` sets every side; a specific side overrides `all`.
10
+ * e.g. { all: true, bottom: false } => every side except bottom.
11
+ */
12
+ export type BorderSides = {
13
+ all?: boolean;
14
+ left?: boolean;
15
+ top?: boolean;
16
+ right?: boolean;
17
+ bottom?: boolean;
18
+ };
8
19
  export type OptionsType = {
9
20
  sheetHeight?: number | string;
10
21
  sheetWidth?: number | string;
11
22
  sheetResize?: CSSProperties['resize'];
12
23
  editingOnEnter?: boolean;
13
24
  showFormulaBar?: boolean;
25
+ /**
26
+ * Opt into eager resolution for this sheet: solve every formula cell
27
+ * regardless of the visible range, so off-screen async formulas fire instead
28
+ * of waiting to be scrolled into view. OFF by default to preserve
29
+ * virtualization. See `Sheet.eager` / `Sheet.resolveAll()`.
30
+ */
31
+ eager?: boolean;
14
32
  limits?: SheetLimits;
15
33
  mode?: ModeType;
34
+ /** Cell spacing. 'compact' (default) keeps the current metrics; 'comfortable' roomier. */
35
+ density?: DensityType;
36
+ /** Grid line visibility. 'all' (default) | 'horizontal' (no vertical lines) | 'none'. */
37
+ gridLines?: GridLinesType;
38
+ /** Which sides of the formula bar draw a border. Default: { all: true }. */
39
+ formulaBarBorders?: BorderSides;
40
+ /** Which sides of the matrix (cell grid) draw an outer border. Default: { all: true }. */
41
+ matrixBorders?: BorderSides;
42
+ /**
43
+ * Center the matrix inside the sheet box when the box (explicit sheetWidth/sheetHeight,
44
+ * or a manual resize) is larger than the content. Default 'none' keeps top-left.
45
+ */
46
+ matrixAlignment?: MatrixAlignmentType;
16
47
  contextMenu?: ContextMenuItemDescriptor[];
17
48
  rowMenu?: RowMenuItemDescriptor[];
18
49
  colMenu?: ColMenuItemDescriptor[];
@@ -39,6 +70,8 @@ export type StoreType = {
39
70
  dragging: boolean;
40
71
  sheetHeight: number;
41
72
  sheetWidth: number;
73
+ fixedWidth: boolean;
74
+ fixedHeight: boolean;
42
75
  mode: ModeType;
43
76
  searchQuery?: string;
44
77
  searchCaseSensitive: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsheet/preact-core",
3
- "version": "3.0.7",
3
+ "version": "3.2.0",
4
4
  "description": "Spreadsheet component for Preact",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -10,7 +10,7 @@
10
10
  "url": "git+https://github.com/walkframe/gridsheet.git"
11
11
  },
12
12
  "dependencies": {
13
- "@gridsheet/core": "3.0.7"
13
+ "@gridsheet/core": "3.2.0"
14
14
  },
15
15
  "exports": {
16
16
  ".": {
@@ -35,7 +35,7 @@
35
35
  "vite": "^6.2.2",
36
36
  "vite-plugin-dts": "^4.5.3",
37
37
  "@preact/preset-vite": "^2.10.1",
38
- "@gridsheet/functions": "3.0.7"
38
+ "@gridsheet/functions": "3.2.0"
39
39
  },
40
40
  "bugs": {
41
41
  "url": "https://github.com/walkframe/gridsheet/issues"