@gridsheet/preact-core 3.1.0 → 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/components/StoreObserver.d.ts +2 -0
- package/dist/index.js +80 -8
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +27 -1
- package/package.json +3 -3
package/dist/types.d.ts
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
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;
|
|
@@ -20,6 +31,19 @@ export type OptionsType = {
|
|
|
20
31
|
eager?: boolean;
|
|
21
32
|
limits?: SheetLimits;
|
|
22
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;
|
|
23
47
|
contextMenu?: ContextMenuItemDescriptor[];
|
|
24
48
|
rowMenu?: RowMenuItemDescriptor[];
|
|
25
49
|
colMenu?: ColMenuItemDescriptor[];
|
|
@@ -46,6 +70,8 @@ export type StoreType = {
|
|
|
46
70
|
dragging: boolean;
|
|
47
71
|
sheetHeight: number;
|
|
48
72
|
sheetWidth: number;
|
|
73
|
+
fixedWidth: boolean;
|
|
74
|
+
fixedHeight: boolean;
|
|
49
75
|
mode: ModeType;
|
|
50
76
|
searchQuery?: string;
|
|
51
77
|
searchCaseSensitive: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridsheet/preact-core",
|
|
3
|
-
"version": "3.
|
|
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.
|
|
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.
|
|
38
|
+
"@gridsheet/functions": "3.2.0"
|
|
39
39
|
},
|
|
40
40
|
"bugs": {
|
|
41
41
|
"url": "https://github.com/walkframe/gridsheet/issues"
|