-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgutenberg.d.ts
123 lines (111 loc) · 2.39 KB
/
gutenberg.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// Import antd dependencies
import {
RowProps,
ColProps,
TypographyProps,
ButtonProps,
ImageProps,
TitleProps,
} from "antd";
export interface GutenbergAntDesignAttributes {
api?: {};
visibility?: [];
styles?:
| {
// @TODO: key should be one of the screen sizes: xs, sm, md, etc.
[key: string]: {
backgroundType: string;
};
}
| undefined;
}
export interface GutenbergGlobalBlockProps {
name: string;
innerBlocks?: GutenbergGlobalBlockProps[];
attributes: GutenbergAntDesignAttributes;
}
export interface GutenbergAntDesignRowBlockProps
extends GutenbergGlobalBlockProps {
attributes: {
api: RowProps;
};
}
export interface GutenbergAntDesignColBlockProps
extends GutenbergGlobalBlockProps {
attributes: {
api: ColProps;
};
}
export interface GutenbergAntDesignListItemBlockProps
extends GutenbergGlobalBlockProps {
attributes: {
settings: {};
};
}
export interface GutenbergAntDesignListBlockProps
extends GutenbergGlobalBlockProps {
attributes: {
settings: {
type: "ol" | "ul";
};
};
}
export interface GutenbergAntDesignTitleBlockProps
extends GutenbergGlobalBlockProps {
attributes: {
api: TitleProps & { text: string };
};
}
export interface GutenbergAntDesignParagraphBlockProps
extends GutenbergGlobalBlockProps {
attributes: {
api: TypographyProps & { text: string };
};
}
export interface GutenbergAntDesignButtonBlockProps
extends GutenbergGlobalBlockProps {
attributes: {
api: ButtonProps & { text: string };
};
}
export interface GutenbergAntDesignImageBlockProps
extends GutenbergGlobalBlockProps {
attributes: {
api: Omit<ImageProps, "src"> & {
text: string;
src: { alt: string; url: string; width: number; height: number };
};
settings: {
image: {
alt: string;
url: string;
width: number;
height: number;
};
};
};
}
export interface GutenbergCoreQueryBlockProps
extends GutenbergGlobalBlockProps {
attributes: {
query: {
author: string;
exclude: [];
inherit: boolean;
perPage: number;
pages: number;
offset: number;
order: "asc" | "desc";
orderBy: string;
pages: number;
postType: string;
search: string;
sticky: string;
};
};
}
export interface GutenbergFormProps {
attributes: {
formId: string;
};
}