UNPKG

dmeditor

Version:

dmeditor is a block-style visual editor. Data is in json format.

20 lines (19 loc) 1.52 kB
/// <reference types="react" /> import { type PaddingSeparateProps, type TYPE_UNDEFINED_VALUE } from './types'; export declare const handleKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void; export interface HandleInputKeyboardParams { min: number; max: number; onKeyDown: (value: number | TYPE_UNDEFINED_VALUE, e: React.KeyboardEvent<HTMLTextAreaElement | HTMLInputElement>, position?: 'top' | 'right' | 'bottom' | 'left') => void; } export declare const createHandleInputKeyDown: ({ min, max, onKeyDown }: HandleInputKeyboardParams) => (event: React.KeyboardEvent<HTMLTextAreaElement | HTMLInputElement>) => void; export interface HandleInputChangeParams { min: number; max: number; onChange: (value: number | '', e: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>, position?: 'top' | 'right' | 'bottom' | 'left') => void; } export declare const createHandleInputChange: ({ min, max, onChange }: HandleInputChangeParams) => (e: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>) => false | undefined; export declare const convertedPaddingValue: (value: number | string | null | undefined, type?: 'input' | 'slider') => number | TYPE_UNDEFINED_VALUE | undefined; export declare const convertedPaddingSeparateValue: (values: PaddingSeparateProps['value']) => (number | "-" | undefined)[]; export declare function inputConverted(value: number | string | null): number | TYPE_UNDEFINED_VALUE; export declare const setChangingValue: (value: string) => number | "" | "-";