@unlayer/types 1.489.0 → 1.491.0
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 +12 -0
- package/dist/design.d.ts +3 -1
- package/dist/editor/design.d.ts +3 -1
- package/dist/editor/editor.d.ts +153 -9
- package/dist/editor/features.d.ts +18 -6
- package/dist/editor/intl.d.ts +1139 -6
- package/dist/editor/link-types.d.ts +8 -4
- package/dist/editor/theme.d.ts +117 -9
- package/dist/editor/types.d.ts +56 -14
- package/dist/editor/utils.d.ts +3 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -62,6 +62,18 @@ function handleDesign(design: JSONTemplate) {
|
|
|
62
62
|
}
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
+
## Generated declaration formatting
|
|
66
|
+
|
|
67
|
+
The type builders write each member of a named union on its own line in
|
|
68
|
+
`__generated__/` and `dist/`, so adding or removing a value produces a small diff.
|
|
69
|
+
This package-local generation step runs after TypeScript emits declarations;
|
|
70
|
+
TypeScript otherwise collapses union members onto one line. Inline property and
|
|
71
|
+
parameter annotations keep their existing layout.
|
|
72
|
+
|
|
73
|
+
Run `pnpm --filter=@unlayer/types build` to regenerate the declarations and
|
|
74
|
+
`pnpm --filter=@unlayer/types test:unit` to check the formatter. Do not manually
|
|
75
|
+
reformat generated files or change the repository-wide Prettier configuration.
|
|
76
|
+
|
|
65
77
|
## License
|
|
66
78
|
|
|
67
79
|
MIT
|
package/dist/design.d.ts
CHANGED
|
@@ -62,7 +62,9 @@ type DesignCustomContentItem<
|
|
|
62
62
|
values: ContentValues<TDisplayMode> & Record<string, unknown>;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
export type DesignContentType =
|
|
65
|
+
export type DesignContentType =
|
|
66
|
+
| keyof ContentToolValuesMap
|
|
67
|
+
| (string & {});
|
|
66
68
|
|
|
67
69
|
type DesignBuiltInContentItem<
|
|
68
70
|
TDisplayMode extends DisplayMode | undefined = undefined,
|
package/dist/editor/design.d.ts
CHANGED
package/dist/editor/editor.d.ts
CHANGED
|
@@ -18,11 +18,30 @@ import type { BodyValues } from '../containers/body';
|
|
|
18
18
|
import type { ColumnValues } from '../containers/column';
|
|
19
19
|
import type { RowValues } from '../containers/row';
|
|
20
20
|
|
|
21
|
-
type AICopilotDataType =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
type AICopilotDataType =
|
|
22
|
+
| 'template_block'
|
|
23
|
+
| 'page_block'
|
|
24
|
+
| 'body_block'
|
|
25
|
+
| 'row_block'
|
|
26
|
+
| 'header_block'
|
|
27
|
+
| 'footer_block'
|
|
28
|
+
| 'column_block'
|
|
29
|
+
| 'content_block'
|
|
30
|
+
| 'text'
|
|
31
|
+
| 'import_html'
|
|
32
|
+
| 'import_image';
|
|
33
|
+
|
|
34
|
+
export type Container =
|
|
35
|
+
| 'body'
|
|
36
|
+
| 'row'
|
|
37
|
+
| 'column'
|
|
38
|
+
| 'content';
|
|
39
|
+
|
|
40
|
+
export type ImageSource =
|
|
41
|
+
| 'unsplash'
|
|
42
|
+
| 'pixabay'
|
|
43
|
+
| 'pexel'
|
|
44
|
+
| 'user';
|
|
26
45
|
|
|
27
46
|
export interface ToolConfig {
|
|
28
47
|
enabled?: boolean | undefined;
|
|
@@ -129,11 +148,127 @@ meta: {
|
|
|
129
148
|
// Theme & Appearance
|
|
130
149
|
// ───────────────────────────────────────────────────────────────────────────
|
|
131
150
|
|
|
132
|
-
type AIProvider =
|
|
151
|
+
type AIProvider =
|
|
152
|
+
| 'openai'
|
|
153
|
+
| 'anthropic'
|
|
154
|
+
| 'google'
|
|
155
|
+
| 'xai';
|
|
133
156
|
|
|
134
157
|
export type AIImageProvider = Extract<AIProvider, 'google' | 'openai'>;
|
|
135
158
|
|
|
136
|
-
export type InboxPreviewClientId =
|
|
159
|
+
export type InboxPreviewClientId =
|
|
160
|
+
| 'android10_gmailapp_pixel4_dm'
|
|
161
|
+
| 'android10_gmailapp_pixel4_lm'
|
|
162
|
+
| 'android11_gmailapp_pixel5_dm'
|
|
163
|
+
| 'android12_gmailapp_pixel6_dm'
|
|
164
|
+
| 'android12_gmailapp_pixel6_lm'
|
|
165
|
+
| 'android12_outlookapp_pixel6_dm'
|
|
166
|
+
| 'android12_outlookapp_pixel6_lm'
|
|
167
|
+
| 'android13_gmailapp_pixel7_dm'
|
|
168
|
+
| 'android13_gmailapp_pixel7_lm'
|
|
169
|
+
| 'android14_gmailapp_pixel8_dm'
|
|
170
|
+
| 'android14_gmailapp_pixel8_lm'
|
|
171
|
+
| 'android15_gmailapp_pixel9_dm'
|
|
172
|
+
| 'android15_gmailapp_pixel9_lm'
|
|
173
|
+
| 'android16_gmailapp_pixel10_dm'
|
|
174
|
+
| 'android16_gmailapp_pixel10_lm'
|
|
175
|
+
| 'aolcom-dm_chrcurrent_win10'
|
|
176
|
+
| 'aolcom-dm_edgecurrent_win10'
|
|
177
|
+
| 'aolcom-dm_ffcurrent_win10'
|
|
178
|
+
| 'aolcom-lm_chrcurrent_win10'
|
|
179
|
+
| 'aolcom-lm_edgecurrent_win10'
|
|
180
|
+
| 'aolcom-lm_ffcurrent_win10'
|
|
181
|
+
| 'applemail16'
|
|
182
|
+
| 'applemail16_dm'
|
|
183
|
+
| 'freefr-dm_chrcurrent_win10'
|
|
184
|
+
| 'freefr-dm_edgecurrent_win10'
|
|
185
|
+
| 'freefr-dm_ffcurrent_win10'
|
|
186
|
+
| 'freefr-lm_chrcurrent_win10'
|
|
187
|
+
| 'freefr-lm_edgecurrent_win10'
|
|
188
|
+
| 'freefr-lm_ffcurrent_win10'
|
|
189
|
+
| 'gmailcom-dm_chrcurrent_win10'
|
|
190
|
+
| 'gmailcom-dm_edgecurrent_win10'
|
|
191
|
+
| 'gmailcom-dm_ffcurrent_win10'
|
|
192
|
+
| 'gmailcom-lm_chrcurrent_win10'
|
|
193
|
+
| 'gmailcom-lm_edgecurrent_win10'
|
|
194
|
+
| 'gmailcom-lm_ffcurrent_win10'
|
|
195
|
+
| 'gmxnet-lm_chrcurrent_win10'
|
|
196
|
+
| 'gmxnet-lm_edgecurrent_win10'
|
|
197
|
+
| 'gmxnet-lm_ffcurrent_win10'
|
|
198
|
+
| 'iphone13ol_15'
|
|
199
|
+
| 'iphone13ol_15_dm'
|
|
200
|
+
| 'iphone14_16'
|
|
201
|
+
| 'iphone14_16_dm'
|
|
202
|
+
| 'iphone14pro_16'
|
|
203
|
+
| 'iphone14pro_16_dm'
|
|
204
|
+
| 'iphone14promax_16'
|
|
205
|
+
| 'iphone14promax_16_dm'
|
|
206
|
+
| 'iphone15_17'
|
|
207
|
+
| 'iphone15_17_dm'
|
|
208
|
+
| 'iphone15plus_17'
|
|
209
|
+
| 'iphone15plus_17_dm'
|
|
210
|
+
| 'iphone15pro_17'
|
|
211
|
+
| 'iphone15pro_17_dm'
|
|
212
|
+
| 'iphone15promax_17'
|
|
213
|
+
| 'iphone15promax_17_dm'
|
|
214
|
+
| 'iphone16_18'
|
|
215
|
+
| 'iphone16_18_dm'
|
|
216
|
+
| 'iphone16gmail_18'
|
|
217
|
+
| 'iphone16gmail_18_dm'
|
|
218
|
+
| 'iphone16gmail_26'
|
|
219
|
+
| 'iphone16gmail_26_dm'
|
|
220
|
+
| 'iphone16pro_18'
|
|
221
|
+
| 'iphone16pro_18_dm'
|
|
222
|
+
| 'iphone16promax_18'
|
|
223
|
+
| 'iphone16promax_18_dm'
|
|
224
|
+
| 'iphone17_26'
|
|
225
|
+
| 'iphone17_26_dm'
|
|
226
|
+
| 'iphone17pro_26'
|
|
227
|
+
| 'iphone17pro_26_dm'
|
|
228
|
+
| 'iphone17promax_26'
|
|
229
|
+
| 'iphone17promax_26_dm'
|
|
230
|
+
| 'liberoit-lm_chrcurrent_win10'
|
|
231
|
+
| 'liberoit-lm_edgecurrent_win10'
|
|
232
|
+
| 'liberoit-lm_ffcurrent_win10'
|
|
233
|
+
| 'm365_mac13_dm_dt'
|
|
234
|
+
| 'm365_mac13_lm_dt'
|
|
235
|
+
| 'm365_w11_dm_dt'
|
|
236
|
+
| 'm365_w11_lm_dt'
|
|
237
|
+
| 'm365com-dm_chrcurrent_win10'
|
|
238
|
+
| 'm365com-dm_edgecurrent_win10'
|
|
239
|
+
| 'm365com-dm_ffcurrent_win10'
|
|
240
|
+
| 'm365com-lm_chrcurrent_win10'
|
|
241
|
+
| 'm365com-lm_edgecurrent_win10'
|
|
242
|
+
| 'm365com-lm_ffcurrent_win10'
|
|
243
|
+
| 'o365_w10_dm_dt'
|
|
244
|
+
| 'o365_w10_lm_dt'
|
|
245
|
+
| 'outlook16_win10'
|
|
246
|
+
| 'outlook16_win10_125'
|
|
247
|
+
| 'outlook19'
|
|
248
|
+
| 'outlook19_125'
|
|
249
|
+
| 'outlook2021_win11_dm_dt'
|
|
250
|
+
| 'outlook2021_win11_lm_dt'
|
|
251
|
+
| 'outlook2024_win_dm_dt'
|
|
252
|
+
| 'outlook2024_win_lm_dt'
|
|
253
|
+
| 'outlookcom-dm_chrcurrent_win10'
|
|
254
|
+
| 'outlookcom-dm_edgecurrent_win10'
|
|
255
|
+
| 'outlookcom-dm_ffcurrent_win10'
|
|
256
|
+
| 'outlookcom-lm_chrcurrent_win10'
|
|
257
|
+
| 'outlookcom-lm_edgecurrent_win10'
|
|
258
|
+
| 'outlookcom-lm_ffcurrent_win10'
|
|
259
|
+
| 'tonlinede-lm_chrcurrent_win10'
|
|
260
|
+
| 'tonlinede-lm_edgecurrent_win10'
|
|
261
|
+
| 'tonlinede-lm_ffcurrent_win10'
|
|
262
|
+
| 'webde-lm_chrcurrent_win10'
|
|
263
|
+
| 'webde-lm_edgecurrent_win10'
|
|
264
|
+
| 'webde-lm_ffcurrent_win10'
|
|
265
|
+
| 'yahoocom-dm_chrcurrent_win10'
|
|
266
|
+
| 'yahoocom-dm_edgecurrent_win10'
|
|
267
|
+
| 'yahoocom-dm_ffcurrent_win10'
|
|
268
|
+
| 'yahoocom-lm_chrcurrent_win10'
|
|
269
|
+
| 'yahoocom-lm_edgecurrent_win10'
|
|
270
|
+
| 'yahoocom-lm_ffcurrent_win10'
|
|
271
|
+
| (string & {});
|
|
137
272
|
|
|
138
273
|
interface Config {
|
|
139
274
|
id?: string;
|
|
@@ -385,7 +520,10 @@ export type CreditPurchaseHandler = (
|
|
|
385
520
|
request: CreditPurchaseRequest,
|
|
386
521
|
) => CreditPurchaseResult | Promise<CreditPurchaseResult>;
|
|
387
522
|
|
|
388
|
-
export type CreditPurchaseReason =
|
|
523
|
+
export type CreditPurchaseReason =
|
|
524
|
+
| 'low_balance'
|
|
525
|
+
| 'exhausted'
|
|
526
|
+
| 'disabled';
|
|
389
527
|
|
|
390
528
|
export type CreditResource = 'ai';
|
|
391
529
|
|
|
@@ -552,5 +690,11 @@ type WidgetComponentClass = any & {
|
|
|
552
690
|
schema?: Record<string, unknown> | null;
|
|
553
691
|
};
|
|
554
692
|
|
|
555
|
-
type AIFeatureType =
|
|
693
|
+
type AIFeatureType =
|
|
694
|
+
| 'full_template_gen'
|
|
695
|
+
| 'block_edit'
|
|
696
|
+
| 'html_import'
|
|
697
|
+
| 'image_import'
|
|
698
|
+
| 'image_generation'
|
|
699
|
+
| 'image_edit';
|
|
556
700
|
/** Token usage payload reported by the AI Assistant pipeline. */
|
|
@@ -16,13 +16,21 @@ export interface Image {
|
|
|
16
16
|
optimistic?: boolean;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export type AICopilotModel =
|
|
19
|
+
export type AICopilotModel =
|
|
20
|
+
| `${AIProvider}/${string}`
|
|
21
|
+
| (string & {});
|
|
20
22
|
|
|
21
|
-
export type AIFallbackModels =
|
|
23
|
+
export type AIFallbackModels =
|
|
24
|
+
| boolean
|
|
25
|
+
| AICopilotModel[];
|
|
22
26
|
|
|
23
|
-
export type AIImageModel =
|
|
27
|
+
export type AIImageModel =
|
|
28
|
+
| `${AIImageProvider}/${string}`
|
|
29
|
+
| (string & {});
|
|
24
30
|
|
|
25
|
-
export type AIImageFallbackModels =
|
|
31
|
+
export type AIImageFallbackModels =
|
|
32
|
+
| boolean
|
|
33
|
+
| AIImageModel[];
|
|
26
34
|
|
|
27
35
|
export interface AIBrand {
|
|
28
36
|
companyName?: string;
|
|
@@ -77,7 +85,9 @@ export interface ColorPicker {
|
|
|
77
85
|
recentColors?: boolean | null;
|
|
78
86
|
}
|
|
79
87
|
|
|
80
|
-
export type ImageEditorToolConfig =
|
|
88
|
+
export type ImageEditorToolConfig =
|
|
89
|
+
| boolean
|
|
90
|
+
| {
|
|
81
91
|
enabled?: boolean;
|
|
82
92
|
icon?: string;
|
|
83
93
|
};
|
|
@@ -89,7 +99,9 @@ export type ImageEditorToolConfig = boolean | {
|
|
|
89
99
|
* forward-compatible with newer IDs returned by the live clients endpoint.
|
|
90
100
|
*/
|
|
91
101
|
|
|
92
|
-
export type InboxPreviewsFeature =
|
|
102
|
+
export type InboxPreviewsFeature =
|
|
103
|
+
| boolean
|
|
104
|
+
| {
|
|
93
105
|
enabled?: boolean;
|
|
94
106
|
/**
|
|
95
107
|
* Email clients requested for runs from this editor instance. This
|