@measured/puck-plugin-heading-analyzer 0.14.0-canary.adac562 → 0.14.0-canary.bf4f527
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.css +77 -48
- package/dist/index.d.ts +36 -12
- package/dist/index.js +4871 -2035
- package/package.json +3 -2
package/README.md
CHANGED
package/dist/index.css
CHANGED
@@ -1,60 +1,76 @@
|
|
1
|
-
/*
|
2
|
-
.
|
1
|
+
/* ../core/components/SidebarSection/styles.module.css */
|
2
|
+
.styles_SidebarSection {
|
3
3
|
display: flex;
|
4
4
|
position: relative;
|
5
5
|
flex-direction: column;
|
6
|
-
color: black;
|
6
|
+
color: var(--puck-color-black);
|
7
7
|
}
|
8
|
-
.
|
8
|
+
.styles_SidebarSection:last-of-type {
|
9
9
|
flex-grow: 1;
|
10
10
|
}
|
11
|
-
.
|
12
|
-
background: white;
|
11
|
+
.styles_SidebarSection-title {
|
12
|
+
background: var(--puck-color-white);
|
13
13
|
padding: 16px;
|
14
|
-
border-bottom: 1px solid var(--puck-color-grey-
|
15
|
-
border-top: 1px solid var(--puck-color-grey-
|
14
|
+
border-bottom: 1px solid var(--puck-color-grey-09);
|
15
|
+
border-top: 1px solid var(--puck-color-grey-09);
|
16
16
|
overflow-x: auto;
|
17
17
|
}
|
18
|
-
.
|
18
|
+
.styles_SidebarSection--noBorderTop > .styles_SidebarSection-title {
|
19
19
|
border-top: 0px;
|
20
20
|
}
|
21
|
-
.
|
21
|
+
.styles_SidebarSection-content {
|
22
22
|
padding: 16px;
|
23
23
|
}
|
24
|
-
.
|
24
|
+
.styles_SidebarSection--noPadding > .styles_SidebarSection-content {
|
25
25
|
padding: 0px;
|
26
26
|
}
|
27
|
-
.
|
27
|
+
.styles_SidebarSection--noPadding > .styles_SidebarSection-content:last-child {
|
28
28
|
padding-bottom: 4px;
|
29
29
|
}
|
30
|
-
.
|
30
|
+
.styles_SidebarSection:last-of-type .styles_SidebarSection-content {
|
31
31
|
border-bottom: none;
|
32
32
|
flex-grow: 1;
|
33
33
|
}
|
34
|
-
.
|
35
|
-
|
34
|
+
.styles_SidebarSection-breadcrumbLabel {
|
35
|
+
background: none;
|
36
|
+
border: 0;
|
37
|
+
border-radius: 2px;
|
38
|
+
color: var(--puck-color-azure-04);
|
39
|
+
cursor: pointer;
|
40
|
+
font: inherit;
|
36
41
|
flex-shrink: 0;
|
42
|
+
padding: 0;
|
43
|
+
transition: color 50ms ease-in;
|
37
44
|
}
|
38
|
-
.
|
39
|
-
|
40
|
-
|
41
|
-
|
45
|
+
.styles_SidebarSection-breadcrumbLabel:focus-visible {
|
46
|
+
outline: 2px solid var(--puck-color-azure-05);
|
47
|
+
outline-offset: 2px;
|
48
|
+
}
|
49
|
+
@media (hover: hover) and (pointer: fine) {
|
50
|
+
.styles_SidebarSection-breadcrumbLabel:hover {
|
51
|
+
color: var(--puck-color-azure-03);
|
52
|
+
transition: none;
|
53
|
+
}
|
42
54
|
}
|
43
|
-
.
|
55
|
+
.styles_SidebarSection-breadcrumbLabel:active {
|
56
|
+
color: var(--puck-color-azure-02);
|
57
|
+
transition: none;
|
58
|
+
}
|
59
|
+
.styles_SidebarSection-breadcrumbs {
|
44
60
|
align-items: center;
|
45
61
|
display: flex;
|
46
62
|
gap: 4px;
|
47
63
|
}
|
48
|
-
.
|
64
|
+
.styles_SidebarSection-breadcrumb {
|
49
65
|
align-items: center;
|
50
66
|
display: flex;
|
51
67
|
gap: 4px;
|
52
68
|
}
|
53
|
-
.
|
69
|
+
.styles_SidebarSection-heading {
|
54
70
|
padding-right: 16px;
|
55
71
|
}
|
56
|
-
.
|
57
|
-
background: white;
|
72
|
+
.styles_SidebarSection-loadingOverlay {
|
73
|
+
background: var(--puck-color-white);
|
58
74
|
display: flex;
|
59
75
|
justify-content: center;
|
60
76
|
align-items: center;
|
@@ -68,55 +84,54 @@
|
|
68
84
|
opacity: 0.8;
|
69
85
|
}
|
70
86
|
|
71
|
-
/*
|
72
|
-
.
|
87
|
+
/* ../core/components/Heading/styles.module.css */
|
88
|
+
.styles_Heading {
|
73
89
|
display: block;
|
74
90
|
color: var(--puck-color-black);
|
75
|
-
font-family: var(--puck-font-stack);
|
76
91
|
font-weight: 700;
|
77
92
|
margin: 0;
|
78
93
|
}
|
79
|
-
.
|
94
|
+
.styles_Heading b {
|
80
95
|
font-weight: 700;
|
81
96
|
}
|
82
|
-
.
|
97
|
+
.styles_Heading--xxxxl {
|
83
98
|
font-size: var(--puck-font-size-xxxxl);
|
84
99
|
letter-spacing: 0.08ch;
|
85
100
|
font-weight: 800;
|
86
101
|
}
|
87
|
-
.
|
102
|
+
.styles_Heading--xxxl {
|
88
103
|
font-size: var(--puck-font-size-xxxl);
|
89
104
|
}
|
90
|
-
.
|
105
|
+
.styles_Heading--xxl {
|
91
106
|
font-size: var(--puck-font-size-xxl);
|
92
107
|
}
|
93
|
-
.
|
108
|
+
.styles_Heading--xl {
|
94
109
|
font-size: var(--puck-font-size-xl);
|
95
110
|
}
|
96
|
-
.
|
111
|
+
.styles_Heading--l {
|
97
112
|
font-size: var(--puck-font-size-l);
|
98
113
|
}
|
99
|
-
.
|
114
|
+
.styles_Heading--m {
|
100
115
|
font-size: var(--puck-font-size-m);
|
101
116
|
}
|
102
|
-
.
|
117
|
+
.styles_Heading--s {
|
103
118
|
font-size: var(--puck-font-size-s);
|
104
119
|
}
|
105
|
-
.
|
120
|
+
.styles_Heading--xs {
|
106
121
|
font-size: var(--puck-font-size-xs);
|
107
122
|
}
|
108
123
|
|
109
|
-
/*
|
110
|
-
.
|
111
|
-
color: var(--puck-color-grey-
|
112
|
-
font-family: var(--puck-font-
|
124
|
+
/* ../core/components/OutlineList/styles.module.css */
|
125
|
+
.styles_OutlineList {
|
126
|
+
color: var(--puck-color-grey-03);
|
127
|
+
font-family: var(--puck-font-family);
|
113
128
|
margin: 0;
|
114
129
|
padding-left: 16px;
|
115
130
|
position: relative;
|
116
131
|
list-style: none;
|
117
132
|
}
|
118
|
-
.
|
119
|
-
background: var(--puck-color-grey-
|
133
|
+
.styles_OutlineList::before {
|
134
|
+
background: var(--puck-color-grey-08);
|
120
135
|
position: absolute;
|
121
136
|
left: -1px;
|
122
137
|
top: 0px;
|
@@ -124,12 +139,12 @@
|
|
124
139
|
height: calc(100% - 9px);
|
125
140
|
content: "";
|
126
141
|
}
|
127
|
-
.
|
142
|
+
.styles_OutlineListItem {
|
128
143
|
position: relative;
|
129
144
|
margin-bottom: 4px;
|
130
145
|
}
|
131
|
-
.
|
132
|
-
background: var(--puck-color-grey-
|
146
|
+
.styles_OutlineListItem::before {
|
147
|
+
background: var(--puck-color-grey-08);
|
133
148
|
position: absolute;
|
134
149
|
left: -17px;
|
135
150
|
top: 9px;
|
@@ -137,10 +152,24 @@
|
|
137
152
|
height: 1px;
|
138
153
|
content: "";
|
139
154
|
}
|
140
|
-
.
|
141
|
-
color: var(--puck-color-blue);
|
155
|
+
.styles_OutlineListItem--clickable {
|
142
156
|
cursor: pointer;
|
157
|
+
transition: color 50ms ease-in;
|
158
|
+
}
|
159
|
+
.styles_OutlineListItem--clickable:focus-visible {
|
160
|
+
outline: 2px solid var(--puck-color-azure-05);
|
161
|
+
outline-offset: 2px;
|
162
|
+
}
|
163
|
+
@media (hover: hover) and (pointer: fine) {
|
164
|
+
.styles_OutlineListItem--clickable:hover {
|
165
|
+
color: var(--puck-color-azure-04);
|
166
|
+
transition: none;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
.styles_OutlineListItem--clickable:active {
|
170
|
+
color: var(--puck-color-azure-03);
|
171
|
+
transition: none;
|
143
172
|
}
|
144
|
-
.
|
173
|
+
.styles_OutlineListItem > .styles_OutlineList {
|
145
174
|
margin: 8px 0;
|
146
175
|
}
|
package/dist/index.d.ts
CHANGED
@@ -1,10 +1,23 @@
|
|
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
|
+
|
16
|
+
type FieldOption = {
|
17
|
+
label: string;
|
18
|
+
value: string | number | boolean;
|
19
|
+
};
|
20
|
+
type FieldOptions = Array<FieldOption> | ReadonlyArray<FieldOption>;
|
8
21
|
type BaseField = {
|
9
22
|
label?: string;
|
10
23
|
};
|
@@ -21,17 +34,11 @@ type TextareaField = BaseField & {
|
|
21
34
|
};
|
22
35
|
type SelectField = BaseField & {
|
23
36
|
type: "select";
|
24
|
-
options:
|
25
|
-
label: string;
|
26
|
-
value: string | number | boolean;
|
27
|
-
}[];
|
37
|
+
options: FieldOptions;
|
28
38
|
};
|
29
39
|
type RadioField = BaseField & {
|
30
40
|
type: "radio";
|
31
|
-
options:
|
32
|
-
label: string;
|
33
|
-
value: string | number | boolean;
|
34
|
-
}[];
|
41
|
+
options: FieldOptions;
|
35
42
|
};
|
36
43
|
type ArrayField<Props extends {
|
37
44
|
[key: string]: any;
|
@@ -44,6 +51,8 @@ type ArrayField<Props extends {
|
|
44
51
|
};
|
45
52
|
defaultItemProps?: Props[0];
|
46
53
|
getItemSummary?: (item: Props[0], index?: number) => string;
|
54
|
+
max?: number;
|
55
|
+
min?: number;
|
47
56
|
};
|
48
57
|
type ObjectField<Props extends {
|
49
58
|
[key: string]: any;
|
@@ -52,7 +61,7 @@ type ObjectField<Props extends {
|
|
52
61
|
}> = BaseField & {
|
53
62
|
type: "object";
|
54
63
|
objectFields: {
|
55
|
-
[SubPropName in keyof Props
|
64
|
+
[SubPropName in keyof Props]: Field<Props[SubPropName]>;
|
56
65
|
};
|
57
66
|
};
|
58
67
|
type Adaptor<AdaptorParams = {}, TableShape extends Record<string, any> = {}, PropShape = TableShape> = {
|
@@ -80,11 +89,15 @@ type ExternalField<Props extends {
|
|
80
89
|
placeholder?: string;
|
81
90
|
fetchList: (params: {
|
82
91
|
query: string;
|
92
|
+
filters: Record<string, any>;
|
83
93
|
}) => Promise<any[] | null>;
|
84
94
|
mapProp?: (value: any) => Props;
|
95
|
+
mapRow?: (value: any) => Record<string, string | number>;
|
85
96
|
getItemSummary: (item: Props, index?: number) => string;
|
86
97
|
showSearch?: boolean;
|
87
98
|
initialQuery?: string;
|
99
|
+
filterFields?: Record<string, Field>;
|
100
|
+
initialFilters?: Record<string, any>;
|
88
101
|
};
|
89
102
|
type CustomField<Props extends {
|
90
103
|
[key: string]: any;
|
@@ -125,6 +138,14 @@ type UiState = {
|
|
125
138
|
expanded?: boolean;
|
126
139
|
}>;
|
127
140
|
isDragging: boolean;
|
141
|
+
viewports: {
|
142
|
+
current: {
|
143
|
+
width: number;
|
144
|
+
height: number | "auto";
|
145
|
+
};
|
146
|
+
controlsVisible: boolean;
|
147
|
+
options: Viewport[];
|
148
|
+
};
|
128
149
|
};
|
129
150
|
|
130
151
|
type InputProps<F = Field<any>> = {
|
@@ -142,7 +163,7 @@ type RenderFunc<Props extends {
|
|
142
163
|
[key: string]: any;
|
143
164
|
} = {
|
144
165
|
children: ReactNode;
|
145
|
-
}> =
|
166
|
+
}> = (props: Props) => ReactElement;
|
146
167
|
declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "components", "componentItem", "outline", "puck", "preview"];
|
147
168
|
type OverrideKey = (typeof overrideKeys)[number];
|
148
169
|
type OverridesGeneric<Shape extends {
|
@@ -172,7 +193,10 @@ type Overrides = OverridesGeneric<{
|
|
172
193
|
className?: string;
|
173
194
|
}>;
|
174
195
|
components: RenderFunc;
|
175
|
-
componentItem: RenderFunc
|
196
|
+
componentItem: RenderFunc<{
|
197
|
+
children: ReactNode;
|
198
|
+
name: string;
|
199
|
+
}>;
|
176
200
|
outline: RenderFunc;
|
177
201
|
puck: RenderFunc;
|
178
202
|
}>;
|