1 | import * as React from 'react';
|
2 | export * from './theme/types';
|
3 | import { IPropsTheme } from './theme/types';
|
4 | export declare type PropsData = Record<string, unknown> | PropArray;
|
5 | export declare type PropScalar = string | boolean | number | null | undefined;
|
6 | export declare type PropArray = Array<PropScalar | Record<string, unknown>>;
|
7 | export declare type PropValue = PropScalar | PropArray | Record<string, unknown> | Function;
|
8 | export declare type PropDataObjectType = 'object' | 'array';
|
9 | export declare type PropObjectType = PropDataObjectType | 'function';
|
10 | export declare type PropTypeScalar = 'string' | 'boolean' | 'number';
|
11 | export declare type PropEmptyType = 'null' | 'undefined';
|
12 | export declare type PropType = PropTypeScalar | PropEmptyType | PropObjectType;
|
13 | export declare type PropValueFactory = (e: PropValueFactoryArgs) => PropValueFactoryResponse | undefined | void;
|
14 | export declare type PropValueFactoryResponse = {
|
15 | el?: React.ReactNode;
|
16 | underline?: {
|
17 | color: string | number;
|
18 | style: 'solid' | 'dashed';
|
19 | };
|
20 | };
|
21 | export declare type PropValueFactoryArgs = {
|
22 | path: string;
|
23 | key: string | number;
|
24 | value: PropValue;
|
25 | type: PropType;
|
26 | theme: IPropsTheme;
|
27 | change(args: {
|
28 | to: string;
|
29 | }): void;
|
30 | onFocus(isFocused: boolean): void;
|
31 | };
|
32 | export declare type PropFilter = (e: PropFilterArgs) => boolean;
|
33 | export declare type PropFilterArgs = {
|
34 | path: string;
|
35 | key: string | number;
|
36 | value: PropValue;
|
37 | type: PropType;
|
38 | };
|
39 | export declare type PropsEvent = IPropsChangedEvent | IPropsFocusEvent;
|
40 | export declare type IPropsChangedEvent<D extends PropsData = any> = {
|
41 | type: 'PROPS/changed';
|
42 | payload: IPropsChange<D>;
|
43 | };
|
44 | export declare type IPropsChange<D extends PropsData = any> = {
|
45 | action: PropChangeAction;
|
46 | path: string;
|
47 | key: string | number;
|
48 | value: {
|
49 | from: PropValue;
|
50 | to: PropValue;
|
51 | };
|
52 | data: {
|
53 | from: D;
|
54 | to: D;
|
55 | };
|
56 | };
|
57 | export declare type PropChangeAction = 'CHANGE' | 'INSERT' | 'DELETE';
|
58 | export declare type IPropsFocusEvent = {
|
59 | type: 'PROPS/focus';
|
60 | payload: IPropsFocus;
|
61 | };
|
62 | export declare type IPropsFocus = {
|
63 | isFocused: boolean;
|
64 | path: string;
|
65 | };
|