@measured/puck-plugin-heading-analyzer 0.14.0-canary.1c4c076 → 0.14.0-canary.26bc4ff
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +21 -3
- package/dist/index.js +652 -75643
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
@@ -1,10 +1,18 @@
|
|
1
|
-
import {
|
1
|
+
import { ReactNode, ReactElement } from 'react';
|
2
2
|
|
3
3
|
type ItemSelector = {
|
4
4
|
index: number;
|
5
5
|
zone?: string;
|
6
6
|
};
|
7
7
|
|
8
|
+
type iconTypes = "Smartphone" | "Monitor" | "Tablet";
|
9
|
+
type Viewport = {
|
10
|
+
width: number;
|
11
|
+
height?: number | "auto";
|
12
|
+
label?: string;
|
13
|
+
icon?: iconTypes | ReactNode;
|
14
|
+
};
|
15
|
+
|
8
16
|
type FieldOption = {
|
9
17
|
label: string;
|
10
18
|
value: string | number | boolean;
|
@@ -43,6 +51,8 @@ type ArrayField<Props extends {
|
|
43
51
|
};
|
44
52
|
defaultItemProps?: Props[0];
|
45
53
|
getItemSummary?: (item: Props[0], index?: number) => string;
|
54
|
+
max?: number;
|
55
|
+
min?: number;
|
46
56
|
};
|
47
57
|
type ObjectField<Props extends {
|
48
58
|
[key: string]: any;
|
@@ -51,7 +61,7 @@ type ObjectField<Props extends {
|
|
51
61
|
}> = BaseField & {
|
52
62
|
type: "object";
|
53
63
|
objectFields: {
|
54
|
-
[SubPropName in keyof Props
|
64
|
+
[SubPropName in keyof Props]: Field<Props[SubPropName]>;
|
55
65
|
};
|
56
66
|
};
|
57
67
|
type Adaptor<AdaptorParams = {}, TableShape extends Record<string, any> = {}, PropShape = TableShape> = {
|
@@ -83,7 +93,7 @@ type ExternalField<Props extends {
|
|
83
93
|
}) => Promise<any[] | null>;
|
84
94
|
mapProp?: (value: any) => Props;
|
85
95
|
mapRow?: (value: any) => Record<string, string | number>;
|
86
|
-
getItemSummary
|
96
|
+
getItemSummary?: (item: Props, index?: number) => string;
|
87
97
|
showSearch?: boolean;
|
88
98
|
initialQuery?: string;
|
89
99
|
filterFields?: Record<string, Field>;
|
@@ -128,6 +138,14 @@ type UiState = {
|
|
128
138
|
expanded?: boolean;
|
129
139
|
}>;
|
130
140
|
isDragging: boolean;
|
141
|
+
viewports: {
|
142
|
+
current: {
|
143
|
+
width: number;
|
144
|
+
height: number | "auto";
|
145
|
+
};
|
146
|
+
controlsVisible: boolean;
|
147
|
+
options: Viewport[];
|
148
|
+
};
|
131
149
|
};
|
132
150
|
|
133
151
|
type InputProps<F = Field<any>> = {
|