@glideapps/glide-data-grid
Advanced tools
Comparing version 5.0.1-alpha1 to 5.0.1-alpha2
@@ -96,2 +96,12 @@ import * as React from "react"; | ||
} | ||
declare type ScrollToFn = (col: number | { | ||
amount: number; | ||
unit: "cell" | "px"; | ||
}, row: number | { | ||
amount: number; | ||
unit: "cell" | "px"; | ||
}, dir?: "horizontal" | "vertical" | "both", paddingX?: number, paddingY?: number, options?: { | ||
hAlign?: "start" | "center" | "end"; | ||
vAlign?: "start" | "center" | "end"; | ||
}) => void; | ||
export interface DataEditorRef { | ||
@@ -103,5 +113,5 @@ appendRow: (col: number) => Promise<void>; | ||
emit: (eventName: EmitEvents) => Promise<void>; | ||
scrollTo: (col: number, row: number, dir?: "horizontal" | "vertical" | "both", paddingX?: number, paddingY?: number) => void; | ||
scrollTo: ScrollToFn; | ||
} | ||
export declare const DataEditor: React.ForwardRefExoticComponent<DataEditorProps & React.RefAttributes<DataEditorRef>>; | ||
export {}; |
@@ -40,3 +40,18 @@ import type { Theme } from "../.."; | ||
readonly provideEditor?: ProvideEditorCallback<T>; | ||
readonly onClick?: (cell: T, posX: number, posY: number, bounds: Rectangle) => T | undefined; | ||
readonly onClick?: (args: { | ||
readonly cell: T; | ||
readonly posX: number; | ||
readonly posY: number; | ||
readonly bounds: Rectangle; | ||
readonly theme: Theme; | ||
readonly preventDefault: () => void; | ||
}) => T | undefined; | ||
readonly onSelect?: (args: { | ||
readonly cell: T; | ||
readonly posX: number; | ||
readonly posY: number; | ||
readonly bounds: Rectangle; | ||
readonly theme: Theme; | ||
readonly preventDefault: () => void; | ||
}) => void; | ||
readonly onDelete?: (cell: T) => T | undefined; | ||
@@ -43,0 +58,0 @@ } |
@@ -7,3 +7,3 @@ export type { OverlayImageEditorProps } from "./data-grid-overlay-editor/private/image-overlay-editor"; | ||
export type { DrawArgs } from "./data-editor/custom-cell-draw-args"; | ||
export type { CustomRenderer as AdditionalRenderer } from "./data-grid/cells/cell-types"; | ||
export type { CustomRenderer } from "./data-grid/cells/cell-types"; | ||
export * from "./data-editor/data-editor"; | ||
@@ -14,3 +14,3 @@ export * from "./data-grid/data-grid-types"; | ||
export { default as TextCellEntry } from "./growing-entry/growing-entry"; | ||
export { parseToRgba } from "./data-grid/color-parser"; | ||
export { parseToRgba, withAlpha, blend } from "./data-grid/color-parser"; | ||
export { measureTextCached, getMiddleCenterBias, drawTextCellExternal as drawTextCell, } from "./data-grid/data-grid-lib"; | ||
@@ -17,0 +17,0 @@ export { getDataEditorTheme as getDefaultTheme, useTheme } from "./common/styles"; |
{ | ||
"name": "@glideapps/glide-data-grid", | ||
"version": "5.0.1-alpha1", | ||
"version": "5.0.1-alpha2", | ||
"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 too big to display
2611969
89
21140