@glideapps/glide-data-grid
Advanced tools
Comparing version 5.0.1-alpha2 to 5.1.0-alpha1
@@ -14,4 +14,4 @@ import type { ImageWindowLoader, Item, Rectangle } from "../data-grid/data-grid-types"; | ||
private loadImage; | ||
loadOrGetImage(url: string, col: number, row: number): HTMLImageElement | undefined; | ||
loadOrGetImage(url: string, col: number, row: number): HTMLImageElement | ImageBitmap | undefined; | ||
} | ||
export default ImageWindowLoaderImpl; |
@@ -6,3 +6,3 @@ import { MutableRefObject } from "react"; | ||
} | ||
export declare function useResizeDetector<T extends HTMLElement = HTMLElement>(): UseResizeDetectorReturn<T>; | ||
export declare function useResizeDetector<T extends HTMLElement = HTMLElement>(initialSize?: readonly [width: number, height: number]): UseResizeDetectorReturn<T>; | ||
export interface UseResizeDetectorReturn<T> extends ReactResizeDetectorDimensions { | ||
@@ -9,0 +9,0 @@ ref: MutableRefObject<T | null>; |
@@ -14,1 +14,2 @@ import * as React from "react"; | ||
export declare function getScrollBarWidth(): number; | ||
export declare function useStateWithReactiveInput<T>(inputState: T): [T, React.Dispatch<React.SetStateAction<T>>, {}]; |
@@ -70,2 +70,4 @@ import * as React from "react"; | ||
readonly rowSelect?: "none" | "single" | "multi"; | ||
readonly scrollOffsetY?: number; | ||
readonly scrollOffsetX?: number; | ||
readonly rowHeight?: DataGridSearchProps["rowHeight"]; | ||
@@ -72,0 +74,0 @@ readonly onMouseMove?: DataGridSearchProps["onMouseMove"]; |
import type { Theme } from "../.."; | ||
import type { SpriteManager } from "../data-grid-sprites"; | ||
import type { InnerGridCell, Rectangle, ImageWindowLoader, CustomCell, ProvideEditorCallback } from "../data-grid-types"; | ||
import type { InnerGridCell, Rectangle, ImageWindowLoader, CustomCell, ProvideEditorCallback, BaseGridMouseEventArgs } from "../data-grid-types"; | ||
export interface BaseDrawArgs { | ||
@@ -47,3 +47,3 @@ ctx: CanvasRenderingContext2D; | ||
readonly preventDefault: () => void; | ||
}) => T | undefined; | ||
} & BaseGridMouseEventArgs) => T | undefined; | ||
readonly onSelect?: (args: { | ||
@@ -56,3 +56,3 @@ readonly cell: T; | ||
readonly preventDefault: () => void; | ||
}) => void; | ||
} & BaseGridMouseEventArgs) => void; | ||
readonly onDelete?: (cell: T) => T | undefined; | ||
@@ -59,0 +59,0 @@ } |
@@ -38,3 +38,3 @@ import type { Theme } from "../common/styles"; | ||
export declare function drawDrilldownCell(args: BaseDrawArgs, data: readonly DrilldownCellData[]): void; | ||
export declare function drawImage(args: BaseDrawArgs, data: readonly string[]): void; | ||
export declare function drawImage(args: BaseDrawArgs, data: readonly string[], rounding?: number): void; | ||
interface Point { | ||
@@ -41,0 +41,0 @@ x: number; |
@@ -26,3 +26,3 @@ /// <reference types="react" /> | ||
export declare type GetRowThemeCallback = (row: number) => Partial<Theme> | undefined; | ||
interface BlitData { | ||
export interface BlitData { | ||
readonly cellXOffset: number; | ||
@@ -32,2 +32,3 @@ readonly cellYOffset: number; | ||
readonly translateY: number; | ||
readonly mustDrawFocusOnHeader: boolean; | ||
} | ||
@@ -34,0 +35,0 @@ interface DragAndDropState { |
@@ -28,3 +28,3 @@ import type { Theme } from "../common/styles"; | ||
setWindow(newWindow: Rectangle, freezeCols: number): void; | ||
loadOrGetImage(url: string, col: number, row: number): HTMLImageElement | undefined; | ||
loadOrGetImage(url: string, col: number, row: number): HTMLImageElement | ImageBitmap | undefined; | ||
setCallback(imageLoaded: (locations: readonly Item[]) => void): void; | ||
@@ -40,3 +40,3 @@ } | ||
} | ||
interface BaseGridMouseEventArgs { | ||
export interface BaseGridMouseEventArgs { | ||
readonly shiftKey: boolean; | ||
@@ -86,2 +86,4 @@ readonly ctrlKey: boolean; | ||
readonly cancel: () => void; | ||
readonly stopPropagation: () => void; | ||
readonly preventDefault: () => void; | ||
readonly rawEvent: React.KeyboardEvent<HTMLElement> | undefined; | ||
@@ -253,2 +255,3 @@ } | ||
readonly data: string[]; | ||
readonly rounding?: number; | ||
readonly displayData?: string[]; | ||
@@ -255,0 +258,0 @@ readonly allowAdd: boolean; |
@@ -13,2 +13,4 @@ import type { Rectangle } from ".."; | ||
readonly scrollToEnd?: boolean; | ||
readonly initialScrollPosition?: readonly [scrollX: number, scrollY: number]; | ||
readonly initialSize?: readonly [width: number, height: number]; | ||
readonly rightElementProps?: { | ||
@@ -20,3 +22,2 @@ readonly sticky?: boolean; | ||
readonly minimap?: React.ReactNode; | ||
readonly style?: React.CSSProperties; | ||
readonly scrollRef?: React.MutableRefObject<HTMLDivElement | null>; | ||
@@ -23,0 +24,0 @@ readonly update: (region: Rectangle & { |
@@ -13,2 +13,3 @@ import * as React from "react"; | ||
readonly overscrollY?: number; | ||
readonly initialSize?: readonly [width: number, height: number]; | ||
readonly preventDiagonalScrolling?: boolean; | ||
@@ -15,0 +16,0 @@ readonly rightElementProps?: { |
{ | ||
"name": "@glideapps/glide-data-grid", | ||
"version": "5.0.1-alpha2", | ||
"version": "5.1.0-alpha1", | ||
"description": "Super fast, pure canvas Data Grid Editor", | ||
@@ -5,0 +5,0 @@ "sideEffects": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
2632725
21291