@webflow/designer-extension-typings 0.1.6 → 0.1.8
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/components.d.ts +8 -0
- package/elements-generated.d.ts +15 -14
- package/index.d.ts +9 -0
- package/package.json +1 -1
- package/styles-generated.d.ts +118 -112
- package/variables.d.ts +73 -0
package/components.d.ts
ADDED
package/elements-generated.d.ts
CHANGED
|
@@ -65,6 +65,20 @@ interface NoChildren {
|
|
|
65
65
|
readonly children: false;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
interface ComponentElement
|
|
69
|
+
extends WebflowElement,
|
|
70
|
+
NoConfigurable,
|
|
71
|
+
NoCustomAttributes,
|
|
72
|
+
NoDomId,
|
|
73
|
+
NoStyles,
|
|
74
|
+
NoChildren,
|
|
75
|
+
NoTextContent {
|
|
76
|
+
readonly id: ElementId;
|
|
77
|
+
readonly type: 'ComponentInstance';
|
|
78
|
+
readonly plugin: '';
|
|
79
|
+
getComponent(): Component;
|
|
80
|
+
}
|
|
81
|
+
|
|
68
82
|
interface UnknownElement
|
|
69
83
|
extends WebflowElement,
|
|
70
84
|
NoConfigurable,
|
|
@@ -3438,19 +3452,6 @@ interface GoogleAnalyticsElement
|
|
|
3438
3452
|
readonly plugin: 'Ssr';
|
|
3439
3453
|
}
|
|
3440
3454
|
|
|
3441
|
-
interface SymbolElement
|
|
3442
|
-
extends WebflowElement,
|
|
3443
|
-
Configurable,
|
|
3444
|
-
CustomAttributes,
|
|
3445
|
-
DomId,
|
|
3446
|
-
Styles,
|
|
3447
|
-
Children,
|
|
3448
|
-
NoTextContent {
|
|
3449
|
-
readonly id: ElementId;
|
|
3450
|
-
readonly type: 'Symbol';
|
|
3451
|
-
readonly plugin: 'Symbol';
|
|
3452
|
-
}
|
|
3453
|
-
|
|
3454
3455
|
interface TabsContentElement
|
|
3455
3456
|
extends WebflowElement,
|
|
3456
3457
|
Configurable,
|
|
@@ -4232,6 +4233,7 @@ interface SlotElement
|
|
|
4232
4233
|
}
|
|
4233
4234
|
|
|
4234
4235
|
declare type AnyElement =
|
|
4236
|
+
| ComponentElement
|
|
4235
4237
|
| UnknownElement
|
|
4236
4238
|
| DOMElement
|
|
4237
4239
|
| AnimationElement
|
|
@@ -4491,7 +4493,6 @@ declare type AnyElement =
|
|
|
4491
4493
|
| CommentElement
|
|
4492
4494
|
| FacebookPixelElement
|
|
4493
4495
|
| GoogleAnalyticsElement
|
|
4494
|
-
| SymbolElement
|
|
4495
4496
|
| TabsContentElement
|
|
4496
4497
|
| TabsLinkElement
|
|
4497
4498
|
| TabsMenuElement
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference path="./styles.d.ts" />
|
|
2
2
|
/// <reference path="./pages.d.ts" />
|
|
3
3
|
/// <reference path="./elements.d.ts" />
|
|
4
|
+
/// <reference path="./components.d.ts" />
|
|
5
|
+
/// <reference path="./variables.d.ts" />
|
|
4
6
|
|
|
5
7
|
declare global {
|
|
6
8
|
const webflow: WebflowApi;
|
|
@@ -10,6 +12,12 @@ interface WebflowApi {
|
|
|
10
12
|
getSiteInfo(): Promise<{siteId: string; siteName: string; shortName: string}>;
|
|
11
13
|
getSelectedElement(): Promise<null | AnyElement>;
|
|
12
14
|
getMediaQuery(): Promise<BreakpointId>;
|
|
15
|
+
registerComponent(name: string, rootElement: AnyElement): Promise<Component>;
|
|
16
|
+
unregisterComponent(component: Component): Promise<void>;
|
|
17
|
+
getAllComponents(): Promise<Array<Component>>;
|
|
18
|
+
enterComponent(instance: ComponentElement): Promise<void>;
|
|
19
|
+
exitComponent(): Promise<void>;
|
|
20
|
+
getRootElement(): Promise<null | AnyElement>;
|
|
13
21
|
getAllElements(): Promise<Array<AnyElement>>;
|
|
14
22
|
createStyle(name: string): Style;
|
|
15
23
|
getStyleByName(name: string): Promise<null | Style>;
|
|
@@ -22,6 +30,7 @@ interface WebflowApi {
|
|
|
22
30
|
createString(text: string): StringElement;
|
|
23
31
|
createDOM(tag: string): DOMElement;
|
|
24
32
|
createHeading(tag: 1 | 2 | 3 | 4 | 5 | 6): HeadingElement;
|
|
33
|
+
getDefaultVariableCollection(): Promise<null | VariableCollection>;
|
|
25
34
|
setExtensionSize(
|
|
26
35
|
size: 'default' | 'comfortable' | 'large' | {width: number; height: number}
|
|
27
36
|
): Promise<null>;
|
package/package.json
CHANGED
package/styles-generated.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
// This file was automatically generated. See designer-extensions docs.
|
|
2
|
+
|
|
1
3
|
declare type PropertyMap = {
|
|
2
|
-
'accent-color'?: string;
|
|
4
|
+
'accent-color'?: string | ColorVariable;
|
|
3
5
|
'align-content'?: string;
|
|
4
6
|
'align-items'?: string;
|
|
5
7
|
'align-self'?: string;
|
|
@@ -17,75 +19,75 @@ declare type PropertyMap = {
|
|
|
17
19
|
'background-attachment'?: string;
|
|
18
20
|
'background-blend-mode'?: string;
|
|
19
21
|
'background-clip'?: string;
|
|
20
|
-
'background-color'?: string;
|
|
22
|
+
'background-color'?: string | ColorVariable;
|
|
21
23
|
'background-image'?: string;
|
|
22
24
|
'background-origin'?: string;
|
|
23
25
|
'background-position'?: string;
|
|
24
|
-
'background-position-x'?: string;
|
|
25
|
-
'background-position-y'?: string;
|
|
26
|
+
'background-position-x'?: string | SizeVariable;
|
|
27
|
+
'background-position-y'?: string | SizeVariable;
|
|
26
28
|
'background-repeat'?: string;
|
|
27
29
|
'background-size'?: string;
|
|
28
|
-
'block-size'?: string;
|
|
29
|
-
'border-block-end-color'?: string;
|
|
30
|
+
'block-size'?: string | SizeVariable;
|
|
31
|
+
'border-block-end-color'?: string | ColorVariable;
|
|
30
32
|
'border-block-end-style'?: string;
|
|
31
|
-
'border-block-end-width'?: string;
|
|
32
|
-
'border-block-start-color'?: string;
|
|
33
|
+
'border-block-end-width'?: string | SizeVariable;
|
|
34
|
+
'border-block-start-color'?: string | ColorVariable;
|
|
33
35
|
'border-block-start-style'?: string;
|
|
34
|
-
'border-block-start-width'?: string;
|
|
35
|
-
'border-bottom-color'?: string;
|
|
36
|
-
'border-bottom-left-radius'?: string;
|
|
37
|
-
'border-bottom-right-radius'?: string;
|
|
36
|
+
'border-block-start-width'?: string | SizeVariable;
|
|
37
|
+
'border-bottom-color'?: string | ColorVariable;
|
|
38
|
+
'border-bottom-left-radius'?: string | SizeVariable;
|
|
39
|
+
'border-bottom-right-radius'?: string | SizeVariable;
|
|
38
40
|
'border-bottom-style'?: string;
|
|
39
|
-
'border-bottom-width'?: string;
|
|
41
|
+
'border-bottom-width'?: string | SizeVariable;
|
|
40
42
|
'border-collapse'?: string;
|
|
41
|
-
'border-end-end-radius'?: string;
|
|
42
|
-
'border-end-start-radius'?: string;
|
|
43
|
-
'border-image-outset'?: string;
|
|
43
|
+
'border-end-end-radius'?: string | SizeVariable;
|
|
44
|
+
'border-end-start-radius'?: string | SizeVariable;
|
|
45
|
+
'border-image-outset'?: string | SizeVariable;
|
|
44
46
|
'border-image-repeat'?: string;
|
|
45
47
|
'border-image-slice'?: string;
|
|
46
48
|
'border-image-source'?: string;
|
|
47
|
-
'border-image-width'?: string;
|
|
48
|
-
'border-inline-end-color'?: string;
|
|
49
|
+
'border-image-width'?: string | SizeVariable;
|
|
50
|
+
'border-inline-end-color'?: string | ColorVariable;
|
|
49
51
|
'border-inline-end-style'?: string;
|
|
50
|
-
'border-inline-end-width'?: string;
|
|
51
|
-
'border-inline-start-color'?: string;
|
|
52
|
+
'border-inline-end-width'?: string | SizeVariable;
|
|
53
|
+
'border-inline-start-color'?: string | ColorVariable;
|
|
52
54
|
'border-inline-start-style'?: string;
|
|
53
|
-
'border-inline-start-width'?: string;
|
|
54
|
-
'border-left-color'?: string;
|
|
55
|
+
'border-inline-start-width'?: string | SizeVariable;
|
|
56
|
+
'border-left-color'?: string | ColorVariable;
|
|
55
57
|
'border-left-style'?: string;
|
|
56
|
-
'border-left-width'?: string;
|
|
57
|
-
'border-right-color'?: string;
|
|
58
|
+
'border-left-width'?: string | SizeVariable;
|
|
59
|
+
'border-right-color'?: string | ColorVariable;
|
|
58
60
|
'border-right-style'?: string;
|
|
59
|
-
'border-right-width'?: string;
|
|
60
|
-
'border-start-end-radius'?: string;
|
|
61
|
-
'border-start-start-radius'?: string;
|
|
62
|
-
'border-top-color'?: string;
|
|
63
|
-
'border-top-left-radius'?: string;
|
|
64
|
-
'border-top-right-radius'?: string;
|
|
61
|
+
'border-right-width'?: string | SizeVariable;
|
|
62
|
+
'border-start-end-radius'?: string | SizeVariable;
|
|
63
|
+
'border-start-start-radius'?: string | SizeVariable;
|
|
64
|
+
'border-top-color'?: string | ColorVariable;
|
|
65
|
+
'border-top-left-radius'?: string | SizeVariable;
|
|
66
|
+
'border-top-right-radius'?: string | SizeVariable;
|
|
65
67
|
'border-top-style'?: string;
|
|
66
|
-
'border-top-width'?: string;
|
|
67
|
-
bottom?: string;
|
|
68
|
+
'border-top-width'?: string | SizeVariable;
|
|
69
|
+
bottom?: string | SizeVariable;
|
|
68
70
|
'box-shadow'?: string;
|
|
69
71
|
'box-sizing'?: string;
|
|
70
72
|
'break-after'?: string;
|
|
71
73
|
'break-before'?: string;
|
|
72
74
|
'break-inside'?: string;
|
|
73
75
|
'caption-side'?: string;
|
|
74
|
-
'caret-color'?: string;
|
|
76
|
+
'caret-color'?: string | ColorVariable;
|
|
75
77
|
clear?: string;
|
|
76
78
|
clip?: string;
|
|
77
79
|
'clip-path'?: string;
|
|
78
80
|
'clip-rule'?: string;
|
|
79
|
-
color?: string;
|
|
81
|
+
color?: string | ColorVariable;
|
|
80
82
|
'color-interpolation'?: string;
|
|
81
83
|
'color-interpolation-filters'?: string;
|
|
82
84
|
'column-count'?: string;
|
|
83
|
-
'column-gap'?: string;
|
|
84
|
-
'column-rule-color'?: string;
|
|
85
|
+
'column-gap'?: string | SizeVariable;
|
|
86
|
+
'column-rule-color'?: string | ColorVariable;
|
|
85
87
|
'column-rule-style'?: string;
|
|
86
|
-
'column-rule-width'?: string;
|
|
88
|
+
'column-rule-width'?: string | SizeVariable;
|
|
87
89
|
'column-span'?: string;
|
|
88
|
-
'column-width'?: string;
|
|
90
|
+
'column-width'?: string | SizeVariable;
|
|
89
91
|
content?: string;
|
|
90
92
|
cursor?: string;
|
|
91
93
|
cx?: string;
|
|
@@ -98,18 +100,18 @@ declare type PropertyMap = {
|
|
|
98
100
|
'fill-opacity'?: string;
|
|
99
101
|
'fill-rule'?: string;
|
|
100
102
|
filter?: string;
|
|
101
|
-
'flex-basis'?: string;
|
|
103
|
+
'flex-basis'?: string | SizeVariable;
|
|
102
104
|
'flex-direction'?: string;
|
|
103
105
|
'flex-grow'?: string;
|
|
104
106
|
'flex-shrink'?: string;
|
|
105
107
|
'flex-wrap'?: string;
|
|
106
108
|
float?: string;
|
|
107
|
-
'flood-color'?: string;
|
|
109
|
+
'flood-color'?: string | ColorVariable;
|
|
108
110
|
'flood-opacity'?: string;
|
|
109
|
-
'font-family'?: string;
|
|
111
|
+
'font-family'?: string | FontFamilyVariable;
|
|
110
112
|
'font-kerning'?: string;
|
|
111
113
|
'font-optical-sizing'?: string;
|
|
112
|
-
'font-size'?: string;
|
|
114
|
+
'font-size'?: string | SizeVariable;
|
|
113
115
|
'font-stretch'?: string;
|
|
114
116
|
'font-style'?: string;
|
|
115
117
|
'font-variant-alternates'?: string;
|
|
@@ -122,134 +124,136 @@ declare type PropertyMap = {
|
|
|
122
124
|
'grid-auto-flow'?: string;
|
|
123
125
|
'grid-auto-rows'?: string;
|
|
124
126
|
'grid-column-end'?: string;
|
|
127
|
+
'grid-column-gap'?: string;
|
|
125
128
|
'grid-column-start'?: string;
|
|
126
129
|
'grid-row-end'?: string;
|
|
130
|
+
'grid-row-gap'?: string | SizeVariable;
|
|
127
131
|
'grid-row-start'?: string;
|
|
128
132
|
'grid-template-areas'?: string;
|
|
129
133
|
'grid-template-columns'?: string;
|
|
130
134
|
'grid-template-rows'?: string;
|
|
131
|
-
height?: string;
|
|
135
|
+
height?: string | SizeVariable;
|
|
132
136
|
'image-orientation'?: string;
|
|
133
137
|
'image-rendering'?: string;
|
|
134
|
-
'inline-size'?: string;
|
|
135
|
-
'inset-block-end'?: string;
|
|
136
|
-
'inset-block-start'?: string;
|
|
137
|
-
'inset-inline-end'?: string;
|
|
138
|
-
'inset-inline-start'?: string;
|
|
138
|
+
'inline-size'?: string | SizeVariable;
|
|
139
|
+
'inset-block-end'?: string | SizeVariable;
|
|
140
|
+
'inset-block-start'?: string | SizeVariable;
|
|
141
|
+
'inset-inline-end'?: string | SizeVariable;
|
|
142
|
+
'inset-inline-start'?: string | SizeVariable;
|
|
139
143
|
isolation?: string;
|
|
140
144
|
'justify-content'?: string;
|
|
141
145
|
'justify-items'?: string;
|
|
142
146
|
'justify-self'?: string;
|
|
143
|
-
left?: string;
|
|
144
|
-
'letter-spacing'?: string;
|
|
145
|
-
'lighting-color'?: string;
|
|
147
|
+
left?: string | SizeVariable;
|
|
148
|
+
'letter-spacing'?: string | SizeVariable;
|
|
149
|
+
'lighting-color'?: string | ColorVariable;
|
|
146
150
|
'line-break'?: string;
|
|
147
|
-
'line-height'?: string;
|
|
151
|
+
'line-height'?: string | SizeVariable;
|
|
148
152
|
'list-style-image'?: string;
|
|
149
153
|
'list-style-position'?: string;
|
|
150
154
|
'list-style-type'?: string;
|
|
151
|
-
'margin-block-end'?: string;
|
|
152
|
-
'margin-block-start'?: string;
|
|
153
|
-
'margin-bottom'?: string;
|
|
154
|
-
'margin-inline-end'?: string;
|
|
155
|
-
'margin-inline-start'?: string;
|
|
156
|
-
'margin-left'?: string;
|
|
157
|
-
'margin-right'?: string;
|
|
158
|
-
'margin-top'?: string;
|
|
155
|
+
'margin-block-end'?: string | SizeVariable;
|
|
156
|
+
'margin-block-start'?: string | SizeVariable;
|
|
157
|
+
'margin-bottom'?: string | SizeVariable;
|
|
158
|
+
'margin-inline-end'?: string | SizeVariable;
|
|
159
|
+
'margin-inline-start'?: string | SizeVariable;
|
|
160
|
+
'margin-left'?: string | SizeVariable;
|
|
161
|
+
'margin-right'?: string | SizeVariable;
|
|
162
|
+
'margin-top'?: string | SizeVariable;
|
|
159
163
|
'marker-end'?: string;
|
|
160
164
|
'marker-mid'?: string;
|
|
161
165
|
'marker-start'?: string;
|
|
162
166
|
'mask-type'?: string;
|
|
163
|
-
'max-block-size'?: string;
|
|
164
|
-
'max-height'?: string;
|
|
165
|
-
'max-inline-size'?: string;
|
|
166
|
-
'max-width'?: string;
|
|
167
|
-
'min-block-size'?: string;
|
|
168
|
-
'min-height'?: string;
|
|
169
|
-
'min-inline-size'?: string;
|
|
170
|
-
'min-width'?: string;
|
|
167
|
+
'max-block-size'?: string | SizeVariable;
|
|
168
|
+
'max-height'?: string | SizeVariable;
|
|
169
|
+
'max-inline-size'?: string | SizeVariable;
|
|
170
|
+
'max-width'?: string | SizeVariable;
|
|
171
|
+
'min-block-size'?: string | SizeVariable;
|
|
172
|
+
'min-height'?: string | SizeVariable;
|
|
173
|
+
'min-inline-size'?: string | SizeVariable;
|
|
174
|
+
'min-width'?: string | SizeVariable;
|
|
171
175
|
'mix-blend-mode'?: string;
|
|
172
176
|
'object-fit'?: string;
|
|
173
177
|
'object-position'?: string;
|
|
174
178
|
'offset-anchor'?: string;
|
|
175
|
-
'offset-distance'?: string;
|
|
179
|
+
'offset-distance'?: string | SizeVariable;
|
|
176
180
|
'offset-path'?: string;
|
|
177
181
|
'offset-rotate'?: string;
|
|
178
182
|
opacity?: string;
|
|
179
183
|
order?: string;
|
|
180
|
-
'outline-color'?: string;
|
|
181
|
-
'outline-offset'?: string;
|
|
184
|
+
'outline-color'?: string | ColorVariable;
|
|
185
|
+
'outline-offset'?: string | SizeVariable;
|
|
182
186
|
'outline-style'?: string;
|
|
183
|
-
'outline-width'?: string;
|
|
187
|
+
'outline-width'?: string | SizeVariable;
|
|
184
188
|
'overflow-wrap'?: string;
|
|
185
189
|
'overflow-x'?: string;
|
|
186
190
|
'overflow-y'?: string;
|
|
187
191
|
'overscroll-behavior-block'?: string;
|
|
188
192
|
'overscroll-behavior-inline'?: string;
|
|
189
|
-
'padding-block-end'?: string;
|
|
190
|
-
'padding-block-start'?: string;
|
|
191
|
-
'padding-bottom'?: string;
|
|
192
|
-
'padding-inline-end'?: string;
|
|
193
|
-
'padding-inline-start'?: string;
|
|
194
|
-
'padding-left'?: string;
|
|
195
|
-
'padding-right'?: string;
|
|
196
|
-
'padding-top'?: string;
|
|
193
|
+
'padding-block-end'?: string | SizeVariable;
|
|
194
|
+
'padding-block-start'?: string | SizeVariable;
|
|
195
|
+
'padding-bottom'?: string | SizeVariable;
|
|
196
|
+
'padding-inline-end'?: string | SizeVariable;
|
|
197
|
+
'padding-inline-start'?: string | SizeVariable;
|
|
198
|
+
'padding-left'?: string | SizeVariable;
|
|
199
|
+
'padding-right'?: string | SizeVariable;
|
|
200
|
+
'padding-top'?: string | SizeVariable;
|
|
197
201
|
'paint-order'?: string;
|
|
198
|
-
perspective?: string;
|
|
202
|
+
perspective?: string | SizeVariable;
|
|
199
203
|
'perspective-origin'?: string;
|
|
200
204
|
'pointer-events'?: string;
|
|
201
205
|
position?: string;
|
|
202
|
-
r?: string;
|
|
206
|
+
r?: string | SizeVariable;
|
|
203
207
|
resize?: string;
|
|
204
|
-
right?: string;
|
|
208
|
+
right?: string | SizeVariable;
|
|
205
209
|
rotate?: string;
|
|
206
|
-
'row-gap'?: string;
|
|
207
|
-
rx?: string;
|
|
208
|
-
ry?: string;
|
|
210
|
+
'row-gap'?: string | SizeVariable;
|
|
211
|
+
rx?: string | SizeVariable;
|
|
212
|
+
ry?: string | SizeVariable;
|
|
209
213
|
scale?: string;
|
|
210
214
|
'scroll-behavior'?: string;
|
|
211
|
-
'scroll-margin-block-end'?: string;
|
|
212
|
-
'scroll-margin-block-start'?: string;
|
|
213
|
-
'scroll-margin-inline-end'?: string;
|
|
214
|
-
'scroll-margin-inline-start'?: string;
|
|
215
|
-
'scroll-padding-block-end'?: string;
|
|
216
|
-
'scroll-padding-block-start'?: string;
|
|
217
|
-
'scroll-padding-inline-end'?: string;
|
|
218
|
-
'scroll-padding-inline-start'?: string;
|
|
215
|
+
'scroll-margin-block-end'?: string | SizeVariable;
|
|
216
|
+
'scroll-margin-block-start'?: string | SizeVariable;
|
|
217
|
+
'scroll-margin-inline-end'?: string | SizeVariable;
|
|
218
|
+
'scroll-margin-inline-start'?: string | SizeVariable;
|
|
219
|
+
'scroll-padding-block-end'?: string | SizeVariable;
|
|
220
|
+
'scroll-padding-block-start'?: string | SizeVariable;
|
|
221
|
+
'scroll-padding-inline-end'?: string | SizeVariable;
|
|
222
|
+
'scroll-padding-inline-start'?: string | SizeVariable;
|
|
219
223
|
'shape-image-threshold'?: string;
|
|
220
|
-
'shape-margin'?: string;
|
|
224
|
+
'shape-margin'?: string | SizeVariable;
|
|
221
225
|
'shape-outside'?: string;
|
|
222
226
|
'shape-rendering'?: string;
|
|
223
|
-
'stop-color'?: string;
|
|
227
|
+
'stop-color'?: string | ColorVariable;
|
|
224
228
|
'stop-opacity'?: string;
|
|
225
|
-
stroke?: string;
|
|
229
|
+
stroke?: string | ColorVariable;
|
|
226
230
|
'stroke-dasharray'?: string;
|
|
227
|
-
'stroke-dashoffset'?: string;
|
|
231
|
+
'stroke-dashoffset'?: string | SizeVariable;
|
|
228
232
|
'stroke-linecap'?: string;
|
|
229
233
|
'stroke-linejoin'?: string;
|
|
230
234
|
'stroke-miterlimit'?: string;
|
|
231
235
|
'stroke-opacity'?: string;
|
|
232
|
-
'stroke-width'?: string;
|
|
233
|
-
'tab-size'?: string;
|
|
236
|
+
'stroke-width'?: string | SizeVariable;
|
|
237
|
+
'tab-size'?: string | SizeVariable;
|
|
234
238
|
'table-layout'?: string;
|
|
235
239
|
'text-align'?: string;
|
|
236
240
|
'text-align-last'?: string;
|
|
237
241
|
'text-anchor'?: string;
|
|
238
242
|
'text-decoration'?: string;
|
|
239
|
-
'text-decoration-color'?: string;
|
|
243
|
+
'text-decoration-color'?: string | ColorVariable;
|
|
240
244
|
'text-decoration-line'?: string;
|
|
241
245
|
'text-decoration-skip-ink'?: string;
|
|
242
246
|
'text-decoration-style'?: string;
|
|
243
|
-
'text-emphasis-color'?: string;
|
|
247
|
+
'text-emphasis-color'?: string | ColorVariable;
|
|
244
248
|
'text-emphasis-position'?: string;
|
|
245
249
|
'text-emphasis-style'?: string;
|
|
246
|
-
'text-indent'?: string;
|
|
250
|
+
'text-indent'?: string | SizeVariable;
|
|
247
251
|
'text-overflow'?: string;
|
|
248
252
|
'text-rendering'?: string;
|
|
249
253
|
'text-shadow'?: string;
|
|
250
254
|
'text-transform'?: string;
|
|
251
255
|
'text-underline-position'?: string;
|
|
252
|
-
top?: string;
|
|
256
|
+
top?: string | SizeVariable;
|
|
253
257
|
'touch-action'?: string;
|
|
254
258
|
transform?: string;
|
|
255
259
|
'transform-origin'?: string;
|
|
@@ -258,24 +262,24 @@ declare type PropertyMap = {
|
|
|
258
262
|
'transition-duration'?: string;
|
|
259
263
|
'transition-property'?: string;
|
|
260
264
|
'transition-timing-function'?: string;
|
|
261
|
-
translate?: string;
|
|
265
|
+
translate?: string | SizeVariable;
|
|
262
266
|
'unicode-bidi'?: string;
|
|
263
267
|
'vector-effect'?: string;
|
|
264
268
|
'vertical-align'?: string;
|
|
265
269
|
visibility?: string;
|
|
266
270
|
'white-space'?: string;
|
|
267
|
-
width?: string;
|
|
271
|
+
width?: string | SizeVariable;
|
|
268
272
|
'will-change'?: string;
|
|
269
273
|
'word-break'?: string;
|
|
270
|
-
'word-spacing'?: string;
|
|
274
|
+
'word-spacing'?: string | SizeVariable;
|
|
271
275
|
'writing-mode'?: string;
|
|
272
|
-
x?: string;
|
|
273
|
-
y?: string;
|
|
276
|
+
x?: string | SizeVariable;
|
|
277
|
+
y?: string | SizeVariable;
|
|
274
278
|
'z-index'?: string;
|
|
275
279
|
'-webkit-line-clamp'?: string;
|
|
276
|
-
'-webkit-text-fill-color'?: string;
|
|
277
|
-
'-webkit-text-stroke-color'?: string;
|
|
278
|
-
'-webkit-text-stroke-width'?: string;
|
|
280
|
+
'-webkit-text-fill-color'?: string | ColorVariable;
|
|
281
|
+
'-webkit-text-stroke-color'?: string | ColorVariable;
|
|
282
|
+
'-webkit-text-stroke-width'?: string | SizeVariable;
|
|
279
283
|
};
|
|
280
284
|
|
|
281
285
|
declare type StyleProperty =
|
|
@@ -402,8 +406,10 @@ declare type StyleProperty =
|
|
|
402
406
|
| 'grid-auto-flow'
|
|
403
407
|
| 'grid-auto-rows'
|
|
404
408
|
| 'grid-column-end'
|
|
409
|
+
| 'grid-column-gap'
|
|
405
410
|
| 'grid-column-start'
|
|
406
411
|
| 'grid-row-end'
|
|
412
|
+
| 'grid-row-gap'
|
|
407
413
|
| 'grid-row-start'
|
|
408
414
|
| 'grid-template-areas'
|
|
409
415
|
| 'grid-template-columns'
|
package/variables.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
interface ColorVariable {
|
|
2
|
+
readonly id: VariableId;
|
|
3
|
+
readonly type: 'Color';
|
|
4
|
+
getName(): Promise<null | string>;
|
|
5
|
+
setName(newName: string): Promise<void>;
|
|
6
|
+
set(value: ColorValue | ColorVariable): Promise<void>;
|
|
7
|
+
get(): Promise<null | ColorValue | ColorVariable>;
|
|
8
|
+
remove(): Promise<boolean>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface SizeVariable {
|
|
12
|
+
readonly id: VariableId;
|
|
13
|
+
readonly type: 'Size';
|
|
14
|
+
getName(): Promise<null | string>;
|
|
15
|
+
setName(newName: string): Promise<void>;
|
|
16
|
+
set(value: SizeValue | SizeVariable): Promise<void>;
|
|
17
|
+
get(): Promise<null | SizeValue | SizeVariable>;
|
|
18
|
+
remove(): Promise<boolean>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface FontFamilyVariable {
|
|
22
|
+
readonly id: VariableId;
|
|
23
|
+
readonly type: 'FontFamily';
|
|
24
|
+
getName(): Promise<null | string>;
|
|
25
|
+
setName(newName: string): Promise<void>;
|
|
26
|
+
set(value: FontFamilyValue | FontFamilyVariable): Promise<void>;
|
|
27
|
+
get(): Promise<null | FontFamilyValue | FontFamilyVariable>;
|
|
28
|
+
remove(): Promise<boolean>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare type Variable = ColorVariable | SizeVariable | FontFamilyVariable;
|
|
32
|
+
|
|
33
|
+
interface VariableCollection {
|
|
34
|
+
readonly id: VariableCollectionId;
|
|
35
|
+
getName(): Promise<null | string>;
|
|
36
|
+
getVariable(id: VariableId): Promise<null | Variable>;
|
|
37
|
+
getVariableByName(name: string): Promise<null | Variable>;
|
|
38
|
+
getAllVariables(): Promise<Array<Variable>>;
|
|
39
|
+
createColorVariable(
|
|
40
|
+
name: string,
|
|
41
|
+
value: string | ColorVariable
|
|
42
|
+
): Promise<null | ColorVariable>;
|
|
43
|
+
createSizeVariable(
|
|
44
|
+
name: string,
|
|
45
|
+
value: SizeValue | SizeVariable
|
|
46
|
+
): Promise<null | SizeVariable>;
|
|
47
|
+
createFontFamilyVariable(
|
|
48
|
+
name: string,
|
|
49
|
+
value: string | FontFamilyVariable
|
|
50
|
+
): Promise<null | FontFamilyVariable>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare type VariableCollectionId = string;
|
|
54
|
+
declare type VariableId = string;
|
|
55
|
+
declare type ColorValue = string;
|
|
56
|
+
declare type SizeValue = {value: number; unit: SizeUnit};
|
|
57
|
+
declare type FontFamilyValue = string;
|
|
58
|
+
|
|
59
|
+
declare type SizeUnit =
|
|
60
|
+
| 'px'
|
|
61
|
+
| 'em'
|
|
62
|
+
| 'rem'
|
|
63
|
+
| 'vh'
|
|
64
|
+
| 'vw'
|
|
65
|
+
| 'dvh'
|
|
66
|
+
| 'dvw'
|
|
67
|
+
| 'lvh'
|
|
68
|
+
| 'lvw'
|
|
69
|
+
| 'svh'
|
|
70
|
+
| 'svw'
|
|
71
|
+
| 'vmax'
|
|
72
|
+
| 'vmin'
|
|
73
|
+
| 'ch';
|