sheet-happens 0.0.49 → 0.0.51
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/autosize.d.ts +1 -0
- package/dist/cell.d.ts +9 -0
- package/dist/constants.d.ts +2 -2
- package/dist/coordinate.d.ts +2 -1
- package/dist/image.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1217 -1346
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1218 -1348
- package/dist/index.modern.js.map +1 -1
- package/dist/layout.d.ts +1 -1
- package/dist/mouse.d.ts +2 -2
- package/dist/render.d.ts +5 -3
- package/dist/style.d.ts +1 -2
- package/dist/text.d.ts +2 -0
- package/dist/types.d.ts +48 -18
- package/package.json +24 -23
package/dist/autosize.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { RowOrColumnPropertyFunction, RowOrColumnPropertyStyledFunction, CellPropertyFunction, CellPropertyStyledFunction, CellContentType, Style } from './types';
|
|
2
2
|
export declare const useAutoSizeColumn: (rows: number[], displayData: CellPropertyStyledFunction<CellContentType>, cellStyle: CellPropertyFunction<Style>, columnHeaders: RowOrColumnPropertyStyledFunction<CellContentType>, columnHeaderStyle: RowOrColumnPropertyFunction<Style>, canvasWidth: number) => (x: number) => number;
|
|
3
|
+
export declare const useAutoSizeRow: (columns: number[], displayData: CellPropertyStyledFunction<CellContentType>, cellStyle: CellPropertyFunction<Style>, columnHeaders: RowOrColumnPropertyStyledFunction<CellContentType>, columnHeaderStyle: RowOrColumnPropertyFunction<Style>, cellWidth: RowOrColumnPropertyFunction<number>, canvasHeight: number) => (y: number) => number;
|
package/dist/cell.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Align, Anchor, CellContentContainer, CellContentItem, CellContentRender, Justify } from './types';
|
|
2
|
+
export declare const getInlineAlignment: (cellWidth: number, contentWidth: number, align: Align) => number;
|
|
3
|
+
export declare const measureFlexWidth: (context: CanvasRenderingContext2D, item: CellContentItem) => number;
|
|
4
|
+
export declare const resolveCellFlexLayout: (context: CanvasRenderingContext2D, cellContent: CellContentContainer, cellLeft: number, cellTop: number, cellWidth: number, cellHeight: number) => CellContentRender[];
|
|
5
|
+
export declare const resolveCellAbsoluteLayout: (cellContent: CellContentContainer, cellLeft: number, cellTop: number, cellWidth: number, cellHeight: number) => CellContentRender[];
|
|
6
|
+
export declare const growRow: (slack: number, grow: number[], sizes: number[]) => boolean;
|
|
7
|
+
export declare const shrinkRow: (slack: number, shrink: number[], sizes: number[]) => boolean;
|
|
8
|
+
export declare const getAlignmentAnchor: (x: Anchor) => number;
|
|
9
|
+
export declare const getAlignmentSpacing: (slack: number, n: number, justify: Justify) => number[];
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { XY, Rectangle, Selection,
|
|
1
|
+
import { CellContentRender, XY, Rectangle, Selection, Direction, Style } from './types';
|
|
2
2
|
export declare const INITIAL_MAX_SCROLL: XY;
|
|
3
3
|
export declare const ORIGIN: XY;
|
|
4
4
|
export declare const ONE_ONE: XY;
|
|
@@ -6,7 +6,7 @@ export declare const NEG_NEG: XY;
|
|
|
6
6
|
export declare const NO_CELL: XY;
|
|
7
7
|
export declare const NO_SELECTION: Rectangle;
|
|
8
8
|
export declare const NO_SELECTIONS: Selection[];
|
|
9
|
-
export declare const NO_CLICKABLES:
|
|
9
|
+
export declare const NO_CLICKABLES: CellContentRender[];
|
|
10
10
|
export declare const NO_STYLE: {};
|
|
11
11
|
export declare const MAX_SEARCHABLE_INDEX = 100000;
|
|
12
12
|
export declare const COLORS: {
|
package/dist/coordinate.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ export declare const minXY: (a: XY, b: XY) => XY;
|
|
|
7
7
|
export declare const clampXY: (p: XY, min: XY, max?: XY) => XY;
|
|
8
8
|
export declare const getDirectionStep: (direction: string) => XY;
|
|
9
9
|
export declare const isSameXY: (a: XY, b: XY) => boolean;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const isSameRectangle: (a: Rectangle, b: Rectangle) => boolean;
|
|
11
|
+
export declare const isPointInsideRectangle: (rectangle: Rectangle, point: XY) => boolean;
|
|
11
12
|
export declare const forRange: (min: number, max: number, callback: (i: number) => void) => void;
|
|
12
13
|
export declare const forSelectionColumns: (selection: Rectangle) => (callback: (i: number) => void) => void;
|
|
13
14
|
export declare const forSelectionRows: (selection: Rectangle) => (callback: (i: number) => void) => void;
|
package/dist/image.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { CellContentItem, Rectangle, Style } from './types';
|
|
3
|
+
export declare const svgToImage: (icon: ReactElement | string) => HTMLImageElement;
|
|
4
|
+
export declare const useImageRenderer: () => (renderContext: CanvasRenderingContext2D, item: CellContentItem & {
|
|
5
|
+
display: 'image' | 'icon';
|
|
6
|
+
}, style: Required<Style>, box: Rectangle) => void;
|