@kittl/sdk 0.0.8 → 1.0.0-alpha.1
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/dist/dashboardStandalonePage/sdk.d.ts +8261 -0
- package/dist/dashboardStandalonePage/sdk.esm.js +1176 -0
- package/dist/dashboardStandalonePage/sdk.js +1176 -0
- package/dist/editorContentPanel/sdk.d.ts +8613 -0
- package/dist/editorContentPanel/sdk.esm.js +1462 -0
- package/dist/editorContentPanel/sdk.js +1462 -0
- package/dist/editorScriptRunner/sdk.d.ts +7977 -0
- package/dist/{kittl-sdk.esm.js → editorScriptRunner/sdk.esm.js} +400 -180
- package/dist/{kittl-sdk.js → editorScriptRunner/sdk.js} +400 -180
- package/dist/sharedFileBrowser/sdk.d.ts +328 -0
- package/dist/sharedFileBrowser/sdk.esm.js +1177 -0
- package/dist/sharedFileBrowser/sdk.js +1177 -0
- package/package.json +25 -6
- package/dist/sdk.d.ts +0 -2424
package/dist/sdk.d.ts
DELETED
|
@@ -1,2424 +0,0 @@
|
|
|
1
|
-
declare abstract class BatchClient<T extends Record<string, unknown>> {
|
|
2
|
-
abstract getPatches(): PatchTree<T>[];
|
|
3
|
-
abstract getOrigin(): Origin;
|
|
4
|
-
abstract getHistoryOrigin(): HistoryOrigins;
|
|
5
|
-
abstract getWorkingState(): KittlStateStore<T>;
|
|
6
|
-
abstract commit(): void;
|
|
7
|
-
}
|
|
8
|
-
declare abstract class KittlStateStore<T extends Record<string, unknown>> {
|
|
9
|
-
abstract getSnapshot(): T;
|
|
10
|
-
abstract subscribe<U>(selector: Selector<T, U>, callback: (selected: U, meta: {
|
|
11
|
-
patch: PatchTree<T>[];
|
|
12
|
-
senderOrigin: Origin;
|
|
13
|
-
}) => void, subscriberOrigin?: Origin): () => void;
|
|
14
|
-
abstract internalPatch(args: InternalPatchArgs<T>): void;
|
|
15
|
-
abstract resetWithState(state: T): void;
|
|
16
|
-
}
|
|
17
|
-
declare class SdkBadInputError extends Error {
|
|
18
|
-
readonly name: "SdkBadInputError";
|
|
19
|
-
readonly cause?: Error;
|
|
20
|
-
constructor(message: string, cause?: Error);
|
|
21
|
-
}
|
|
22
|
-
declare class SdkInternalError extends Error {
|
|
23
|
-
readonly name: "SdkInternalError";
|
|
24
|
-
readonly cause?: Error;
|
|
25
|
-
constructor(message: string, cause?: Error);
|
|
26
|
-
}
|
|
27
|
-
declare const BASIC_SHAPE_DEFAULT_VALUES: {
|
|
28
|
-
defaultIcon: LayerIconType | undefined;
|
|
29
|
-
shadowOptions?: {
|
|
30
|
-
color?: string | undefined | null;
|
|
31
|
-
blur?: number | undefined;
|
|
32
|
-
offset?: number;
|
|
33
|
-
angle?: number;
|
|
34
|
-
};
|
|
35
|
-
presets?: LinkedPreset[] | undefined;
|
|
36
|
-
gradients?: StateGradientInfo | undefined;
|
|
37
|
-
clipPathMaskId?: string | undefined | null;
|
|
38
|
-
childrenInfo?: {
|
|
39
|
-
objectName?: string;
|
|
40
|
-
id: string;
|
|
41
|
-
fallbackObjectName: string | null;
|
|
42
|
-
objectNameLayout?: WithObjectLayout;
|
|
43
|
-
fallbackObjectNameLayout?: WithObjectLayout;
|
|
44
|
-
} | undefined;
|
|
45
|
-
hiddenColors?: Record<string, NonNullable<Color>> | undefined;
|
|
46
|
-
inLoadingStage?: boolean | undefined;
|
|
47
|
-
objectName: string;
|
|
48
|
-
skewX: number | undefined;
|
|
49
|
-
skewY: number | undefined;
|
|
50
|
-
width: number;
|
|
51
|
-
height: number;
|
|
52
|
-
scaleX: number;
|
|
53
|
-
scaleY: number;
|
|
54
|
-
angle: number;
|
|
55
|
-
top: number;
|
|
56
|
-
left: number;
|
|
57
|
-
flipX: boolean;
|
|
58
|
-
flipY: boolean;
|
|
59
|
-
name?: string | undefined;
|
|
60
|
-
defaultName: string | undefined;
|
|
61
|
-
locked?: boolean | undefined;
|
|
62
|
-
hidden?: boolean | undefined;
|
|
63
|
-
opacity?: number | undefined;
|
|
64
|
-
stroke?: string | null;
|
|
65
|
-
strokeWidth?: number;
|
|
66
|
-
fill?: ColorInfo[] | undefined;
|
|
67
|
-
scalingCorners?: boolean | undefined;
|
|
68
|
-
cornerRadii?: SerializableCornerRadii | undefined;
|
|
69
|
-
id: DesignObjectId;
|
|
70
|
-
version: string;
|
|
71
|
-
type: ObjectType.BasicShape;
|
|
72
|
-
};
|
|
73
|
-
declare const BasicShapeType: {
|
|
74
|
-
readonly RECTANGLE: "rectangle";
|
|
75
|
-
readonly CIRCLE: "ellipse";
|
|
76
|
-
readonly STAR: "star";
|
|
77
|
-
readonly TRIANGLE: "polygon";
|
|
78
|
-
};
|
|
79
|
-
declare const DEFAULT_VALUES$1: {
|
|
80
|
-
globalCompositeOperation: BlendMode;
|
|
81
|
-
stroke?: string | null;
|
|
82
|
-
strokeWidth?: number;
|
|
83
|
-
shadowOptions?: {
|
|
84
|
-
color?: string | undefined | null;
|
|
85
|
-
blur?: number | undefined;
|
|
86
|
-
offset?: number;
|
|
87
|
-
angle?: number;
|
|
88
|
-
};
|
|
89
|
-
presets?: LinkedPreset[] | undefined;
|
|
90
|
-
opacity?: number | undefined;
|
|
91
|
-
objectName: string;
|
|
92
|
-
width: number;
|
|
93
|
-
height: number;
|
|
94
|
-
scaleX: number;
|
|
95
|
-
scaleY: number;
|
|
96
|
-
angle: number;
|
|
97
|
-
top: number;
|
|
98
|
-
left: number;
|
|
99
|
-
flipX: boolean;
|
|
100
|
-
flipY: boolean;
|
|
101
|
-
name?: string | undefined;
|
|
102
|
-
defaultName: string | undefined;
|
|
103
|
-
locked?: boolean | undefined;
|
|
104
|
-
inLoadingStage?: boolean | undefined;
|
|
105
|
-
clipPathMaskId?: string | undefined | null;
|
|
106
|
-
hidden?: boolean | undefined;
|
|
107
|
-
filters: SerialisedPhotoFilter[] | undefined;
|
|
108
|
-
fill?: ColorInfo[] | undefined;
|
|
109
|
-
cropX?: number | undefined;
|
|
110
|
-
cropY?: number | undefined;
|
|
111
|
-
cropWidth?: number | undefined;
|
|
112
|
-
cropHeight?: number | undefined;
|
|
113
|
-
id: DesignObjectId;
|
|
114
|
-
version: string;
|
|
115
|
-
type: ObjectType.IllustrationImage;
|
|
116
|
-
isGeneratedByAi?: boolean;
|
|
117
|
-
aiArtId?: string;
|
|
118
|
-
generatedContentId?: string;
|
|
119
|
-
generation?: {
|
|
120
|
-
meta?: GenerationMeta;
|
|
121
|
-
generationId?: string;
|
|
122
|
-
generatorKey: string;
|
|
123
|
-
};
|
|
124
|
-
};
|
|
125
|
-
declare const DEFAULT_VALUES$2: {
|
|
126
|
-
cropX?: number | undefined;
|
|
127
|
-
cropY?: number | undefined;
|
|
128
|
-
cropWidth?: number | undefined;
|
|
129
|
-
cropHeight?: number | undefined;
|
|
130
|
-
shadowOptions?: {
|
|
131
|
-
color?: string | undefined | null;
|
|
132
|
-
blur?: number | undefined;
|
|
133
|
-
offset?: number;
|
|
134
|
-
angle?: number;
|
|
135
|
-
};
|
|
136
|
-
stroke?: string | null;
|
|
137
|
-
strokeWidth?: number;
|
|
138
|
-
opacity?: number | undefined;
|
|
139
|
-
width: number;
|
|
140
|
-
height: number;
|
|
141
|
-
scaleX: number;
|
|
142
|
-
scaleY: number;
|
|
143
|
-
angle: number;
|
|
144
|
-
top: number;
|
|
145
|
-
left: number;
|
|
146
|
-
flipX: boolean;
|
|
147
|
-
flipY: boolean;
|
|
148
|
-
name?: string | undefined;
|
|
149
|
-
defaultName: string | undefined;
|
|
150
|
-
locked?: boolean | undefined;
|
|
151
|
-
hidden?: boolean | undefined;
|
|
152
|
-
id: DesignObjectId;
|
|
153
|
-
version: string;
|
|
154
|
-
type: ObjectType.Video;
|
|
155
|
-
};
|
|
156
|
-
declare const DEFAULT_VALUES: {
|
|
157
|
-
shapes: never[];
|
|
158
|
-
operation: ShapeBooleanOperation;
|
|
159
|
-
clipPathMaskId?: string | undefined | null;
|
|
160
|
-
scalingCorners?: boolean | undefined;
|
|
161
|
-
cornerRadii?: SerializableCornerRadii | undefined;
|
|
162
|
-
childrenInfo?: {
|
|
163
|
-
objectName?: string;
|
|
164
|
-
id: string;
|
|
165
|
-
fallbackObjectName: string | null;
|
|
166
|
-
objectNameLayout?: WithObjectLayout;
|
|
167
|
-
fallbackObjectNameLayout?: WithObjectLayout;
|
|
168
|
-
} | undefined;
|
|
169
|
-
shadowOptions?: {
|
|
170
|
-
color?: string | undefined | null;
|
|
171
|
-
blur?: number | undefined;
|
|
172
|
-
offset?: number;
|
|
173
|
-
angle?: number;
|
|
174
|
-
};
|
|
175
|
-
gradients?: StateGradientInfo | undefined;
|
|
176
|
-
presets?: LinkedPreset[] | undefined;
|
|
177
|
-
opacity?: number | undefined;
|
|
178
|
-
hiddenColors?: Record<string, NonNullable<Color>> | undefined;
|
|
179
|
-
stroke?: string | null;
|
|
180
|
-
strokeWidth?: number;
|
|
181
|
-
fill?: ColorInfo[] | undefined;
|
|
182
|
-
locked?: boolean | undefined;
|
|
183
|
-
hidden?: boolean | undefined;
|
|
184
|
-
skewX: number | undefined;
|
|
185
|
-
skewY: number | undefined;
|
|
186
|
-
width: number;
|
|
187
|
-
height: number;
|
|
188
|
-
scaleX: number;
|
|
189
|
-
scaleY: number;
|
|
190
|
-
angle: number;
|
|
191
|
-
top: number;
|
|
192
|
-
left: number;
|
|
193
|
-
flipX: boolean;
|
|
194
|
-
flipY: boolean;
|
|
195
|
-
name?: string | undefined;
|
|
196
|
-
defaultName: string | undefined;
|
|
197
|
-
id: DesignObjectId;
|
|
198
|
-
version: string;
|
|
199
|
-
type: ObjectType.CombinedShape;
|
|
200
|
-
};
|
|
201
|
-
declare const GUIDE_DEFAULT_VALUES: {
|
|
202
|
-
id: DesignObjectId;
|
|
203
|
-
version: string;
|
|
204
|
-
type: ObjectType.Guide;
|
|
205
|
-
};
|
|
206
|
-
declare const GenerationOperation: {
|
|
207
|
-
readonly INPAINT: "inpaint";
|
|
208
|
-
};
|
|
209
|
-
declare const GenerationStatus: {
|
|
210
|
-
readonly CREATED: "CREATED";
|
|
211
|
-
readonly STARTED: "STARTED";
|
|
212
|
-
readonly COMPLETE: "COMPLETE";
|
|
213
|
-
readonly FAILED: "FAILED";
|
|
214
|
-
};
|
|
215
|
-
declare const ILLUSTRATION_DEFAULT_VALUES: {
|
|
216
|
-
hiddenColors?: Record<string, NonNullable<Color>> | undefined;
|
|
217
|
-
clipPathMaskId?: string | undefined | null;
|
|
218
|
-
isGeneratedByAi?: boolean;
|
|
219
|
-
aiArtId?: string;
|
|
220
|
-
generatedContentId?: string;
|
|
221
|
-
generation?: {
|
|
222
|
-
meta?: GenerationMeta;
|
|
223
|
-
generationId?: string;
|
|
224
|
-
generatorKey: string;
|
|
225
|
-
};
|
|
226
|
-
childrenInfo?: {
|
|
227
|
-
objectName?: string;
|
|
228
|
-
id: string;
|
|
229
|
-
fallbackObjectName: string | null;
|
|
230
|
-
objectNameLayout?: WithObjectLayout;
|
|
231
|
-
fallbackObjectNameLayout?: WithObjectLayout;
|
|
232
|
-
} | undefined;
|
|
233
|
-
shadowOptions?: {
|
|
234
|
-
color?: string | undefined | null;
|
|
235
|
-
blur?: number | undefined;
|
|
236
|
-
offset?: number;
|
|
237
|
-
angle?: number;
|
|
238
|
-
};
|
|
239
|
-
gradients?: StateGradientInfo | undefined;
|
|
240
|
-
presets?: LinkedPreset[] | undefined;
|
|
241
|
-
opacity?: number | undefined;
|
|
242
|
-
stroke?: string | null;
|
|
243
|
-
strokeWidth?: number;
|
|
244
|
-
fill?: ColorInfo[] | undefined;
|
|
245
|
-
inLoadingStage?: boolean | undefined;
|
|
246
|
-
locked?: boolean | undefined;
|
|
247
|
-
hidden?: boolean | undefined;
|
|
248
|
-
objectName: string;
|
|
249
|
-
width: number;
|
|
250
|
-
height: number;
|
|
251
|
-
scaleX: number;
|
|
252
|
-
scaleY: number;
|
|
253
|
-
angle: number;
|
|
254
|
-
top: number;
|
|
255
|
-
left: number;
|
|
256
|
-
flipX: boolean;
|
|
257
|
-
flipY: boolean;
|
|
258
|
-
name?: string | undefined;
|
|
259
|
-
defaultName: string | undefined;
|
|
260
|
-
id: DesignObjectId;
|
|
261
|
-
version: string;
|
|
262
|
-
type: ObjectType.Illustration;
|
|
263
|
-
};
|
|
264
|
-
declare const LOADING_CARD_DEFAULT_VALUES: {
|
|
265
|
-
locked?: boolean | undefined;
|
|
266
|
-
hidden?: boolean | undefined;
|
|
267
|
-
width: number;
|
|
268
|
-
height: number;
|
|
269
|
-
scaleX: number;
|
|
270
|
-
scaleY: number;
|
|
271
|
-
angle: number;
|
|
272
|
-
top: number;
|
|
273
|
-
left: number;
|
|
274
|
-
flipX: boolean;
|
|
275
|
-
flipY: boolean;
|
|
276
|
-
name?: string | undefined;
|
|
277
|
-
defaultName: string | undefined;
|
|
278
|
-
id: DesignObjectId;
|
|
279
|
-
version: string;
|
|
280
|
-
type: ObjectType.LoadingCard;
|
|
281
|
-
};
|
|
282
|
-
declare const MASK_DEFAULT_VALUES: {
|
|
283
|
-
inLoadingStage?: boolean | undefined;
|
|
284
|
-
opacity?: number | undefined;
|
|
285
|
-
locked?: boolean | undefined;
|
|
286
|
-
hidden?: boolean | undefined;
|
|
287
|
-
objectName: string;
|
|
288
|
-
width: number;
|
|
289
|
-
height: number;
|
|
290
|
-
scaleX: number;
|
|
291
|
-
scaleY: number;
|
|
292
|
-
angle: number;
|
|
293
|
-
top: number;
|
|
294
|
-
left: number;
|
|
295
|
-
flipX: boolean;
|
|
296
|
-
flipY: boolean;
|
|
297
|
-
name?: string | undefined;
|
|
298
|
-
defaultName: string | undefined;
|
|
299
|
-
id: DesignObjectId;
|
|
300
|
-
version: string;
|
|
301
|
-
type: ObjectType.Mask;
|
|
302
|
-
};
|
|
303
|
-
declare const MOCKUP_DESIGN_DEFAULT_VALUES: {
|
|
304
|
-
hidden?: boolean | undefined;
|
|
305
|
-
locked?: boolean | undefined;
|
|
306
|
-
width: number;
|
|
307
|
-
height: number;
|
|
308
|
-
scaleX: number;
|
|
309
|
-
scaleY: number;
|
|
310
|
-
angle: number;
|
|
311
|
-
top: number;
|
|
312
|
-
left: number;
|
|
313
|
-
flipX: boolean;
|
|
314
|
-
flipY: boolean;
|
|
315
|
-
id: DesignObjectId;
|
|
316
|
-
version: string;
|
|
317
|
-
type: ObjectType.MockupDesign;
|
|
318
|
-
};
|
|
319
|
-
declare const PATH_TEXT_DEFAULT_VALUES: {
|
|
320
|
-
fontSize: number;
|
|
321
|
-
lineHeight: number;
|
|
322
|
-
textAlignment: TextAlignment;
|
|
323
|
-
letterSpacing: number;
|
|
324
|
-
stroke: string;
|
|
325
|
-
useLigatures: boolean;
|
|
326
|
-
strokeWidth?: number;
|
|
327
|
-
fill?: Color | undefined;
|
|
328
|
-
presets?: LinkedPreset[] | undefined;
|
|
329
|
-
opacity?: number | undefined;
|
|
330
|
-
locked?: boolean | undefined;
|
|
331
|
-
hidden?: boolean | undefined;
|
|
332
|
-
width: number;
|
|
333
|
-
height: number;
|
|
334
|
-
scaleX: number;
|
|
335
|
-
scaleY: number;
|
|
336
|
-
angle: number;
|
|
337
|
-
top: number;
|
|
338
|
-
left: number;
|
|
339
|
-
flipX: boolean;
|
|
340
|
-
flipY: boolean;
|
|
341
|
-
name?: string | undefined;
|
|
342
|
-
defaultName: string | undefined;
|
|
343
|
-
id: DesignObjectId;
|
|
344
|
-
version: string;
|
|
345
|
-
type: ObjectType.PathText;
|
|
346
|
-
};
|
|
347
|
-
declare const RICH_TEXT_DEFAULT_VALUES: {
|
|
348
|
-
presets?: LinkedPreset[] | undefined;
|
|
349
|
-
opacity?: number | undefined;
|
|
350
|
-
stroke?: string | null;
|
|
351
|
-
strokeWidth?: number;
|
|
352
|
-
fill?: Color | undefined;
|
|
353
|
-
locked?: boolean | undefined;
|
|
354
|
-
hidden?: boolean | undefined;
|
|
355
|
-
width: number;
|
|
356
|
-
height: number;
|
|
357
|
-
scaleX: number;
|
|
358
|
-
scaleY: number;
|
|
359
|
-
angle: number;
|
|
360
|
-
top: number;
|
|
361
|
-
left: number;
|
|
362
|
-
flipX: boolean;
|
|
363
|
-
flipY: boolean;
|
|
364
|
-
name?: string | undefined;
|
|
365
|
-
defaultName: string | undefined;
|
|
366
|
-
id: DesignObjectId;
|
|
367
|
-
version: string;
|
|
368
|
-
type: ObjectType.RichText;
|
|
369
|
-
};
|
|
370
|
-
declare const ResultType: {
|
|
371
|
-
readonly VIDEO: "video";
|
|
372
|
-
readonly IMAGE: "image";
|
|
373
|
-
readonly ERROR: "error";
|
|
374
|
-
};
|
|
375
|
-
declare const backgroundType = "background";
|
|
376
|
-
declare const clippingMaskType = "clippingMask";
|
|
377
|
-
declare const pathType = "path";
|
|
378
|
-
declare const stringColorKeys: readonly [
|
|
379
|
-
"stroke",
|
|
380
|
-
"shadow",
|
|
381
|
-
"decoration"
|
|
382
|
-
];
|
|
383
|
-
declare const structuralGroupType = "structuralGroup";
|
|
384
|
-
declare enum Action {
|
|
385
|
-
MERGE = "MERGE",
|
|
386
|
-
SET = "SET",
|
|
387
|
-
DELETE = "DELETE"
|
|
388
|
-
}
|
|
389
|
-
declare enum BlendMode {
|
|
390
|
-
Normal = "normal",
|
|
391
|
-
SourceOver = "source-over",
|
|
392
|
-
Multiply = "multiply",
|
|
393
|
-
Screen = "screen",
|
|
394
|
-
Overlay = "overlay",
|
|
395
|
-
SoftLight = "soft-light",
|
|
396
|
-
HardLight = "hard-light",
|
|
397
|
-
ColorDodge = "color-dodge",
|
|
398
|
-
ColorBurn = "color-burn",
|
|
399
|
-
Lighten = "lighten",
|
|
400
|
-
Darken = "darken",
|
|
401
|
-
Difference = "difference",
|
|
402
|
-
Exclusion = "exclusion",
|
|
403
|
-
Lighter = "lighter",
|
|
404
|
-
Hue = "hue",
|
|
405
|
-
Saturation = "saturation",
|
|
406
|
-
Color = "color",
|
|
407
|
-
Luminosity = "luminosity",
|
|
408
|
-
AlphaMask = "destination-out"
|
|
409
|
-
}
|
|
410
|
-
declare enum BoardLayout {
|
|
411
|
-
Custom = "custom",
|
|
412
|
-
Standard = "standard",
|
|
413
|
-
TShirt = "tshirt",
|
|
414
|
-
BusinessCard = "businesscard",
|
|
415
|
-
A4 = "a4",
|
|
416
|
-
A5 = "a5",
|
|
417
|
-
Poster = "poster",
|
|
418
|
-
InstagramPost = "instagramPost",
|
|
419
|
-
InstagramPostPortrait = "instagramPostPortrait",
|
|
420
|
-
instagramPostSquare = "instagramPostSquare",
|
|
421
|
-
InstagramPostLandscape = "instagramPostLandscape",
|
|
422
|
-
InstagramStory = "instagramStory",
|
|
423
|
-
InstagramReel = "instagramReel",
|
|
424
|
-
FacebookPost = "facebookPost",
|
|
425
|
-
FacebookPostSquare = "facebookPostSquare",
|
|
426
|
-
FacebookPostLandscape = "facebookPostLandscape",
|
|
427
|
-
FacebookStory = "facebookStory",
|
|
428
|
-
YouTubeThumbnail = "youtubeThumbnail",
|
|
429
|
-
YouTubeProfileBanner = "youtubeProfileBanner",
|
|
430
|
-
YouTubeAdBanner = "youtubeAdBanner",
|
|
431
|
-
XPost = "xPost",
|
|
432
|
-
XHeader = "xHeader",
|
|
433
|
-
XCarouselAd = "xCarouselAd",
|
|
434
|
-
PinterestPin = "pinterestPin",
|
|
435
|
-
WebBannerAd = "webBannerAd",
|
|
436
|
-
Postcard = "postcard",
|
|
437
|
-
Letterhead = "letterhead",
|
|
438
|
-
Flyer = "flyer",
|
|
439
|
-
Brochure = "brochure",
|
|
440
|
-
Logo = "logo",
|
|
441
|
-
Presentation = "presentation",
|
|
442
|
-
AmazonTShirt = "amazonTShirt",
|
|
443
|
-
PrintfulTShirt = "printfulTShirt",
|
|
444
|
-
PrintfulAop = "printfulAop",
|
|
445
|
-
PrintfulHat = "printfulHat",
|
|
446
|
-
RedBubbleStandard = "redBubbleStandard",
|
|
447
|
-
RedBubbleSticker = "redBubbleSticker",
|
|
448
|
-
TeepublicStandard = "teepublicStandard",
|
|
449
|
-
DisplatePoster = "displatePoster",
|
|
450
|
-
PrintifyStandard = "printifyStandard",
|
|
451
|
-
PrintifyAop = "printifyAop",
|
|
452
|
-
PrintifyHoodie = "printifyHoodie",
|
|
453
|
-
PrintifyMug = "printifyMug",
|
|
454
|
-
PrintifyNotebook = "printifyNotebook",
|
|
455
|
-
PrintifySticker = "printifySticker",
|
|
456
|
-
AwkwardStylesTShirt = "awkwardStylesTShirt"
|
|
457
|
-
}
|
|
458
|
-
declare enum GradientType {
|
|
459
|
-
Linear = "linear",
|
|
460
|
-
Radial = "radial"
|
|
461
|
-
}
|
|
462
|
-
declare enum HistoryOrigins {
|
|
463
|
-
Tracked = "change:origin",
|
|
464
|
-
Untracked = "untracked:origin"
|
|
465
|
-
}
|
|
466
|
-
declare enum ImageFilterType {
|
|
467
|
-
"Saturation" = "Saturation",
|
|
468
|
-
"Contrast" = "Contrast",
|
|
469
|
-
"Brightness" = "Brightness",
|
|
470
|
-
"Vibrance" = "Vibrance",
|
|
471
|
-
"HueRotation" = "HueRotation",
|
|
472
|
-
"Noise" = "Noise",
|
|
473
|
-
"Blur" = "Blur",
|
|
474
|
-
"Convolute" = "Convolute",
|
|
475
|
-
"Pixelate" = "Pixelate",
|
|
476
|
-
"RemoveColor" = "RemoveColor"
|
|
477
|
-
}
|
|
478
|
-
declare enum LibraryPresetType {
|
|
479
|
-
FILL = "FILL",
|
|
480
|
-
TRANSFORMATION = "TRANSFORMATION",
|
|
481
|
-
PHOTO_FILTER = "PHOTO_FILTER",
|
|
482
|
-
SHADOW = "SHADOW",
|
|
483
|
-
TEXT = "TEXT",
|
|
484
|
-
TEXT_EFFECT = "TEXT_EFFECT",
|
|
485
|
-
TEXT_DECORATION = "TEXT_DECORATION",
|
|
486
|
-
COLOR_PALETTE = "COLOR_PALETTE"
|
|
487
|
-
}
|
|
488
|
-
declare enum ObjectType {
|
|
489
|
-
Artboard = "artboard",
|
|
490
|
-
Smartboard = "smartboard",
|
|
491
|
-
Videoboard = "videoboard",
|
|
492
|
-
MockupBoard = "mockupBoard",
|
|
493
|
-
Illustration = "illustration",
|
|
494
|
-
IllustrationImage = "illustrationImage",
|
|
495
|
-
Video = "video",
|
|
496
|
-
BasicShape = "basicShape",
|
|
497
|
-
VectorPath = "vectorPath",
|
|
498
|
-
CombinedShape = "combinedShape",
|
|
499
|
-
PathText = "pathText",
|
|
500
|
-
Mask = "mask",
|
|
501
|
-
RichText = "RichText",
|
|
502
|
-
Guide = "guide",
|
|
503
|
-
LoadingCard = "loadingCard",
|
|
504
|
-
MockupDesign = "mockupDesign",
|
|
505
|
-
ActiveSelection = "activeSelection",
|
|
506
|
-
WarpedImage = "warpedImage",
|
|
507
|
-
ArtboardTitle = "artboardTitle",
|
|
508
|
-
ArtboardTitleIcon = "artboardTitleIcon",
|
|
509
|
-
OverlayTexture = "overlayTexture",
|
|
510
|
-
CustomTextbox = "CustomTextbox",
|
|
511
|
-
ClipPath = "clipPath",
|
|
512
|
-
Path = "path",
|
|
513
|
-
Ruler = "ruler",
|
|
514
|
-
WarpControlRootPoint = "warpControlRootPoint",
|
|
515
|
-
Group = "group",
|
|
516
|
-
Circle = "circle",
|
|
517
|
-
Rect = "rect"
|
|
518
|
-
}
|
|
519
|
-
declare enum Orientation {
|
|
520
|
-
HORIZONTAL = "horizontal",
|
|
521
|
-
VERTICAL = "vertical"
|
|
522
|
-
}
|
|
523
|
-
declare enum Origin {
|
|
524
|
-
CRDT = 1,
|
|
525
|
-
CANVAS = 2,
|
|
526
|
-
UI = 4,
|
|
527
|
-
VOLATILE = 8,
|
|
528
|
-
EVENTS_SYNC = 16,
|
|
529
|
-
API = 32
|
|
530
|
-
}
|
|
531
|
-
declare enum TextAlignment {
|
|
532
|
-
right = "right",
|
|
533
|
-
left = "left",
|
|
534
|
-
center = "center",
|
|
535
|
-
justify = "justify",
|
|
536
|
-
justifyLegacy = "justify-legacy"
|
|
537
|
-
}
|
|
538
|
-
declare enum Unit {
|
|
539
|
-
px = "px",
|
|
540
|
-
in = "in",
|
|
541
|
-
mm = "mm"
|
|
542
|
-
}
|
|
543
|
-
declare global {
|
|
544
|
-
interface Window {
|
|
545
|
-
kittl: KittlSDK;
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
export declare const kittl: KittlSDK;
|
|
549
|
-
export declare function unwrapResult<T>(result: SdkResult<T, Error>): T;
|
|
550
|
-
export interface AIGenerationInputSettings {
|
|
551
|
-
prompt: string;
|
|
552
|
-
taskType?: AIGenerationModelTaskType;
|
|
553
|
-
promptStyleId?: number;
|
|
554
|
-
model: {
|
|
555
|
-
id: string;
|
|
556
|
-
};
|
|
557
|
-
additionalParams?: Record<string, unknown>;
|
|
558
|
-
actionOrigin?: AIGenerationActionOrigin;
|
|
559
|
-
type: AIGenerationContentType;
|
|
560
|
-
}
|
|
561
|
-
export interface AIGenerationOutputSettings {
|
|
562
|
-
id?: string;
|
|
563
|
-
dimensions: {
|
|
564
|
-
width: number;
|
|
565
|
-
height: number;
|
|
566
|
-
};
|
|
567
|
-
}
|
|
568
|
-
export interface AddFontStyleOptions {
|
|
569
|
-
fontFamilyId: string;
|
|
570
|
-
files: Blob[];
|
|
571
|
-
styles: string[];
|
|
572
|
-
}
|
|
573
|
-
export interface AppStateAPI {
|
|
574
|
-
getSelectedObjectsIds(): string[];
|
|
575
|
-
setSelectedObjectsIds(ids: string[]): void;
|
|
576
|
-
getSelectedLayersIds(): string[];
|
|
577
|
-
setSelectedLayersIds(ids: string[]): void;
|
|
578
|
-
getSelectedArtboardIds(): string[];
|
|
579
|
-
setSelectedArtboardIds(ids: string[]): void;
|
|
580
|
-
getSelectedArtboardsObjectIds(): string[];
|
|
581
|
-
setSelectedArtboardsObjectIds(ids: string[]): void;
|
|
582
|
-
getAllSelectedObjectsIds(): string[];
|
|
583
|
-
setAllSelectedObjectsIds(ids: string[]): void;
|
|
584
|
-
getCanvasMode(): AppState["canvasMode"];
|
|
585
|
-
setCanvasMode(mode: AppState["canvasMode"], origin?: Origin): void;
|
|
586
|
-
getActiveTool(): ActiveTool | null;
|
|
587
|
-
setActiveTool(tool: ActiveTool | null): void;
|
|
588
|
-
getIsDragPanning(): boolean;
|
|
589
|
-
viewport: ViewportAPI;
|
|
590
|
-
getHighlightedObjectId(): string | null;
|
|
591
|
-
setHighlightedObjectId(id: string | null): void;
|
|
592
|
-
setMany(fields: Partial<AppState>, origin?: Origin): void;
|
|
593
|
-
}
|
|
594
|
-
export interface AsyncAIAPI {
|
|
595
|
-
spendCredits: (options: SpendCreditsOptions) => SdkResultAsync<SpendCreditsResult, Error>;
|
|
596
|
-
startGeneration: (generatorId: string, inputSettings: AIGenerationInputSettings, output: AIGenerationOutputSettings) => SdkResultAsync<StartGenerationResult, Error>;
|
|
597
|
-
registerHandler: (generatorId: string, onStatusUpdate: OnGenerationStatusUpdate) => SdkResultAsync<() => void, Error>;
|
|
598
|
-
unregisterHandler: (generatorId: string) => SdkResultAsync<void, Error>;
|
|
599
|
-
}
|
|
600
|
-
export interface AsyncAppStateAPI extends WithAsync<AppStateAPI> {
|
|
601
|
-
}
|
|
602
|
-
export interface AsyncAppStateSubscriptionAPI {
|
|
603
|
-
/**
|
|
604
|
-
* Subscribe to one or more paths in the app state.
|
|
605
|
-
* Each path is a dot-separated string like `'selectedObjectsIds'`.
|
|
606
|
-
* The callback receives the current value at each path as positional
|
|
607
|
-
* arguments whenever any subscribed value changes.
|
|
608
|
-
* Returns a single unsubscribe function that tears down all subscriptions.
|
|
609
|
-
*
|
|
610
|
-
* @example
|
|
611
|
-
* // Single path
|
|
612
|
-
* const unsub = await kittl.appStore.subscribe(
|
|
613
|
-
* ['selectedObjectsIds'],
|
|
614
|
-
* (ids) => console.log('selection changed:', ids)
|
|
615
|
-
* );
|
|
616
|
-
*
|
|
617
|
-
* // Multiple paths
|
|
618
|
-
* const unsub = await kittl.appStore.subscribe(
|
|
619
|
-
* ['selectedObjectsIds', 'activeTool'],
|
|
620
|
-
* (ids, tool) => console.log('changed:', ids, tool)
|
|
621
|
-
* );
|
|
622
|
-
* unsub();
|
|
623
|
-
*/
|
|
624
|
-
subscribe<T extends readonly AppStateSelectorPath[]>(paths: [
|
|
625
|
-
...T
|
|
626
|
-
], callback: (...values: {
|
|
627
|
-
[K in keyof T]: T[K] extends string ? DeepValue<AppState, T[K]> | undefined : unknown;
|
|
628
|
-
}) => void): Promise<() => void>;
|
|
629
|
-
}
|
|
630
|
-
export interface AsyncAuthAPI {
|
|
631
|
-
startAuth: (request: AuthStartRequest) => Promise<SdkResult<AuthStartResult>>;
|
|
632
|
-
exchangeCode: (request: AuthExchangeRequest) => Promise<SdkResult<AuthTokenResponse>>;
|
|
633
|
-
getAuthToken: (request: AuthGetTokenRequest) => Promise<SdkResult<AuthTokenResponse | null>>;
|
|
634
|
-
refreshToken: (request: AuthRefreshRequest) => Promise<SdkResult<AuthTokenResponse>>;
|
|
635
|
-
getUserToken: () => Promise<SdkResult<UserTokenResult>>;
|
|
636
|
-
logout: (request: AuthLogoutRequest) => Promise<SdkResult<void>>;
|
|
637
|
-
}
|
|
638
|
-
export interface AsyncBatchDesignAPI extends AsyncDesignAPI {
|
|
639
|
-
commit: () => Promise<void>;
|
|
640
|
-
}
|
|
641
|
-
export interface AsyncContextAPI extends Omit<WithAsync<ContextAPI>, "subscribe"> {
|
|
642
|
-
subscribe(callback: ContextSubscriptionCallback): Promise<() => void>;
|
|
643
|
-
}
|
|
644
|
-
export interface AsyncDataAPI extends WithAsync<DataSDKApi> {
|
|
645
|
-
}
|
|
646
|
-
export interface AsyncDesignAPI extends WithAsync<WithOptsRemoved<DesignAPI>> {
|
|
647
|
-
}
|
|
648
|
-
export interface AsyncDesignStateAPI {
|
|
649
|
-
/**
|
|
650
|
-
* Subscribe to one or more paths in the design state.
|
|
651
|
-
* Each path is a dot-separated string like `'objects.id1.width'`.
|
|
652
|
-
* The callback receives the current value at each path as positional
|
|
653
|
-
* arguments whenever any subscribed value changes.
|
|
654
|
-
* Returns a single unsubscribe function that tears down all subscriptions.
|
|
655
|
-
*
|
|
656
|
-
* @example
|
|
657
|
-
* // Single path
|
|
658
|
-
* const unsub = await kittl.designStore.subscribe(
|
|
659
|
-
* ['objects.id1.width'],
|
|
660
|
-
* (width) => console.log('width changed:', width)
|
|
661
|
-
* );
|
|
662
|
-
*
|
|
663
|
-
* // Multiple paths
|
|
664
|
-
* const unsub = await kittl.designStore.subscribe(
|
|
665
|
-
* ['objects.id1.width', 'objects.id1.height'],
|
|
666
|
-
* (width, height) => console.log('changed:', width, height)
|
|
667
|
-
* );
|
|
668
|
-
* unsub();
|
|
669
|
-
*/
|
|
670
|
-
subscribe<T extends readonly DesignStateSelectorPath[]>(paths: [
|
|
671
|
-
...T
|
|
672
|
-
], callback: (...values: {
|
|
673
|
-
[K in keyof T]: T[K] extends string ? DeepValue<SelectorState, T[K]> | undefined : unknown;
|
|
674
|
-
}) => void): Promise<() => void>;
|
|
675
|
-
}
|
|
676
|
-
export interface AsyncFontAPI extends WithAsync<FontAPI> {
|
|
677
|
-
}
|
|
678
|
-
export interface AsyncStatelessAPI {
|
|
679
|
-
send: (message: {
|
|
680
|
-
type: string;
|
|
681
|
-
payload: Record<string, unknown>;
|
|
682
|
-
}) => SdkResultAsync<null>;
|
|
683
|
-
subscribe: (key: string, handler: (payload: Record<string, unknown>) => void) => SdkResultAsync<null>;
|
|
684
|
-
unsubscribe: (key: string) => SdkResultAsync<null>;
|
|
685
|
-
}
|
|
686
|
-
export interface AsyncUploadAPI extends WithAsync<UploadAPI> {
|
|
687
|
-
}
|
|
688
|
-
export interface AuthExchangeRequest {
|
|
689
|
-
code: string;
|
|
690
|
-
code_verifier?: string;
|
|
691
|
-
provider: string;
|
|
692
|
-
params?: Record<string, unknown>;
|
|
693
|
-
headers?: Record<string, string>;
|
|
694
|
-
}
|
|
695
|
-
export interface AuthGetTokenRequest {
|
|
696
|
-
provider: string;
|
|
697
|
-
}
|
|
698
|
-
export interface AuthLogoutRequest {
|
|
699
|
-
provider?: string;
|
|
700
|
-
}
|
|
701
|
-
export interface AuthRefreshRequest {
|
|
702
|
-
provider: string;
|
|
703
|
-
}
|
|
704
|
-
export interface AuthStartRequest {
|
|
705
|
-
provider: string;
|
|
706
|
-
params?: Record<string, string | number | boolean>;
|
|
707
|
-
generatePKCE?: boolean;
|
|
708
|
-
}
|
|
709
|
-
export interface AuthStartResult {
|
|
710
|
-
code: string;
|
|
711
|
-
code_verifier?: string;
|
|
712
|
-
}
|
|
713
|
-
/**
|
|
714
|
-
* Token response returned by the token endpoint (code exchange or refresh).
|
|
715
|
-
*/
|
|
716
|
-
export interface AuthTokenResponse {
|
|
717
|
-
access_token?: string;
|
|
718
|
-
refresh_token?: string;
|
|
719
|
-
expires_in?: number;
|
|
720
|
-
[key: string]: unknown;
|
|
721
|
-
}
|
|
722
|
-
export interface BackgroundImageOptions extends GeneratableObject {
|
|
723
|
-
objectName?: string;
|
|
724
|
-
globalCompositeOperation: BlendMode;
|
|
725
|
-
opacity: number;
|
|
726
|
-
filters?: SerialisedPhotoFilter[];
|
|
727
|
-
hidden?: boolean;
|
|
728
|
-
cropX?: number;
|
|
729
|
-
cropY?: number;
|
|
730
|
-
scaleX?: number;
|
|
731
|
-
scaleY?: number;
|
|
732
|
-
width?: number;
|
|
733
|
-
height?: number;
|
|
734
|
-
realWidth?: number;
|
|
735
|
-
realHeight?: number;
|
|
736
|
-
}
|
|
737
|
-
export interface BaseStandardArtboardOptions<T extends ArtboardLikeType = ArtboardLikeType> {
|
|
738
|
-
type?: T;
|
|
739
|
-
rx?: number | undefined;
|
|
740
|
-
ry?: number | undefined;
|
|
741
|
-
id?: string;
|
|
742
|
-
lockMovementX?: boolean;
|
|
743
|
-
lockMovementY?: boolean;
|
|
744
|
-
activeLayout: BoardLayout;
|
|
745
|
-
left?: number;
|
|
746
|
-
top?: number;
|
|
747
|
-
width: number;
|
|
748
|
-
height: number;
|
|
749
|
-
fill: string | GradientObject | undefined | null;
|
|
750
|
-
opacity?: number;
|
|
751
|
-
hidden?: boolean;
|
|
752
|
-
unit?: Unit;
|
|
753
|
-
dpi?: number;
|
|
754
|
-
fullSize?: boolean;
|
|
755
|
-
clip?: boolean;
|
|
756
|
-
presets?: LinkedPreset[];
|
|
757
|
-
printMargins?: PrintMargins;
|
|
758
|
-
scaleX?: number;
|
|
759
|
-
scaleY?: number;
|
|
760
|
-
}
|
|
761
|
-
export interface BaseStandardBoard<T extends ArtboardOptions = ArtboardOptions> {
|
|
762
|
-
id: string;
|
|
763
|
-
artboard: T;
|
|
764
|
-
title?: string;
|
|
765
|
-
texture?: TextureOptions;
|
|
766
|
-
backgroundImage?: BackgroundImageOptions;
|
|
767
|
-
}
|
|
768
|
-
export interface BoardAPI {
|
|
769
|
-
createStandardBoard(params: CreateBoardParams, opts?: DesignApiOptions): NormalizedBoard;
|
|
770
|
-
cloneArtboard(params: CloneArtboardParams, opts?: DesignApiOptions): NormalizedBoard;
|
|
771
|
-
updateArtboardBackground(params: UpdateArtboardBackgroundParams, opts?: DesignApiOptions): NormalizedBoard;
|
|
772
|
-
updateArtboard(params: UpdateArtboardParams, opts?: DesignApiOptions): NormalizedBoard;
|
|
773
|
-
}
|
|
774
|
-
export interface CanvasAPI {
|
|
775
|
-
getScreenshot(): Promise<{
|
|
776
|
-
data: string;
|
|
777
|
-
width: number;
|
|
778
|
-
height: number;
|
|
779
|
-
}>;
|
|
780
|
-
getPreviewImage: (id: string, options?: Partial<GetPreviewImageOptions>) => Promise<string | null>;
|
|
781
|
-
getExport: (options: GetExportOptions) => Promise<Blob | null>;
|
|
782
|
-
}
|
|
783
|
-
export interface CatalogItem {
|
|
784
|
-
id: string;
|
|
785
|
-
name: string;
|
|
786
|
-
previewImages: string[];
|
|
787
|
-
}
|
|
788
|
-
export interface ConfigAPI {
|
|
789
|
-
setConfig(config: Partial<DesignConfig>, opts?: DesignApiOptions): void;
|
|
790
|
-
}
|
|
791
|
-
export interface ContextAPI {
|
|
792
|
-
get(input?: ContextGetInput): KittlContext;
|
|
793
|
-
subscribe(callback: ContextSubscriptionCallback): () => void;
|
|
794
|
-
}
|
|
795
|
-
export interface ContextGetInput {
|
|
796
|
-
iframe?: Pick<HTMLIFrameElement, "getBoundingClientRect">;
|
|
797
|
-
}
|
|
798
|
-
export interface CreateFontOptions {
|
|
799
|
-
name: string;
|
|
800
|
-
files: Blob[];
|
|
801
|
-
styles: string[];
|
|
802
|
-
previewImage?: Blob;
|
|
803
|
-
}
|
|
804
|
-
export interface CreateLoadingCardInput extends CreateElementWithPositionAndSize {
|
|
805
|
-
imageGenerationId?: string;
|
|
806
|
-
startedAt?: number;
|
|
807
|
-
generatingModelKey?: string;
|
|
808
|
-
generationAverageSpeed?: number;
|
|
809
|
-
name?: string;
|
|
810
|
-
}
|
|
811
|
-
export interface DataSDKApi {
|
|
812
|
-
mockups: MockupDataAPI;
|
|
813
|
-
fonts: FontDataAPI;
|
|
814
|
-
}
|
|
815
|
-
export interface DecorationOptions {
|
|
816
|
-
type: "horizontalLines" | "colorCut" | "obliqueLines" | "fadingColorCut";
|
|
817
|
-
color: string | null;
|
|
818
|
-
weight: number;
|
|
819
|
-
distance: number;
|
|
820
|
-
cutDistance: number;
|
|
821
|
-
}
|
|
822
|
-
export interface DeleteFontStyleOptions {
|
|
823
|
-
fontFamilyId: string;
|
|
824
|
-
id: string;
|
|
825
|
-
}
|
|
826
|
-
export interface DesignAPI {
|
|
827
|
-
shape: ShapeAPI;
|
|
828
|
-
board: BoardAPI;
|
|
829
|
-
config: ConfigAPI;
|
|
830
|
-
text: TextAPI;
|
|
831
|
-
object: ObjectAPI;
|
|
832
|
-
guide: GuideAPI;
|
|
833
|
-
loadingCard: LoadingCardAPI;
|
|
834
|
-
image: ImageAPI;
|
|
835
|
-
illustration: IllustrationAPI;
|
|
836
|
-
state: StateAPI;
|
|
837
|
-
canvas: CanvasAPI;
|
|
838
|
-
mockupboard: MockupboardAPI;
|
|
839
|
-
smartboard: SmartboardAPI;
|
|
840
|
-
video: VideoAPI;
|
|
841
|
-
videoboard: VideoboardAPI;
|
|
842
|
-
layers: LayersAPI;
|
|
843
|
-
group: GroupAPI;
|
|
844
|
-
texture: TextureAPI;
|
|
845
|
-
}
|
|
846
|
-
export interface DesignConfig {
|
|
847
|
-
title?: string;
|
|
848
|
-
dpiVersion?: number;
|
|
849
|
-
designId?: string;
|
|
850
|
-
generationId?: string;
|
|
851
|
-
updatedAt?: string;
|
|
852
|
-
templateId?: number | string;
|
|
853
|
-
folderId?: string;
|
|
854
|
-
dpi?: number;
|
|
855
|
-
unit?: Unit;
|
|
856
|
-
overrideColorPalette?: string[];
|
|
857
|
-
overrideColorKeys?: string[];
|
|
858
|
-
overrideLuminosityRatio?: number;
|
|
859
|
-
previewBoardId?: string;
|
|
860
|
-
}
|
|
861
|
-
export interface DragAndDropDropImageInput {
|
|
862
|
-
x: number;
|
|
863
|
-
y: number;
|
|
864
|
-
grabOffsetX?: number;
|
|
865
|
-
grabOffsetY?: number;
|
|
866
|
-
src: string;
|
|
867
|
-
imgWidth?: number;
|
|
868
|
-
imgHeight?: number;
|
|
869
|
-
persistImage?: boolean;
|
|
870
|
-
}
|
|
871
|
-
export interface DragAndDropOffset {
|
|
872
|
-
left: number;
|
|
873
|
-
top: number;
|
|
874
|
-
}
|
|
875
|
-
export interface DragAndDropStartDragImageEventInput {
|
|
876
|
-
event: DragEvent;
|
|
877
|
-
img: HTMLImageElement;
|
|
878
|
-
persistImage?: boolean;
|
|
879
|
-
}
|
|
880
|
-
export interface ErrorGenerationResult {
|
|
881
|
-
type: typeof ResultType.ERROR;
|
|
882
|
-
message: string;
|
|
883
|
-
subtitle: string;
|
|
884
|
-
status: "warning" | "error";
|
|
885
|
-
}
|
|
886
|
-
export interface FileBrowserAPI {
|
|
887
|
-
registerUploadBrowser: (tab: FileBrowserTab) => Promise<SdkResponse<void>>;
|
|
888
|
-
}
|
|
889
|
-
export interface FontAPI {
|
|
890
|
-
createFont: (params: {
|
|
891
|
-
name: string;
|
|
892
|
-
files: Blob[];
|
|
893
|
-
styles: string[];
|
|
894
|
-
previewImage?: Blob;
|
|
895
|
-
}) => SdkResultAsync<UploadedFontFamily, Error>;
|
|
896
|
-
}
|
|
897
|
-
export interface FontDataAPI {
|
|
898
|
-
listUserFonts(options?: PaginationOptions): SdkResultAsync<FontListDto>;
|
|
899
|
-
listExtensionFonts(options?: PaginationOptions): SdkResultAsync<FontListDto>;
|
|
900
|
-
get(fontFamilyId: string): SdkResultAsync<FontFamilyDto>;
|
|
901
|
-
find(ids: string[]): SdkResultAsync<FontFamilyDto[]>;
|
|
902
|
-
create(options: CreateFontOptions): SdkResultAsync<FontFamilyDto>;
|
|
903
|
-
update(options: UpdateFontFamilyOptions): SdkResultAsync<FontFamilyDto>;
|
|
904
|
-
delete(ids: string[]): SdkResultAsync<void>;
|
|
905
|
-
destroy(ids: string[]): SdkResultAsync<void>;
|
|
906
|
-
addStyle(options: AddFontStyleOptions): SdkResultAsync<FontFamilyDto>;
|
|
907
|
-
updateStyle(options: UpdateFontStyleOptions): SdkResultAsync<void>;
|
|
908
|
-
deleteStyle(options: DeleteFontStyleOptions): SdkResultAsync<void>;
|
|
909
|
-
}
|
|
910
|
-
export interface FontFamilyDto extends CatalogItem {
|
|
911
|
-
styles: FontStyleDto[];
|
|
912
|
-
deletedAt: string | null;
|
|
913
|
-
extension: {
|
|
914
|
-
id: string;
|
|
915
|
-
name?: string;
|
|
916
|
-
} | null;
|
|
917
|
-
}
|
|
918
|
-
export interface FontStyleDto {
|
|
919
|
-
id: string;
|
|
920
|
-
name: string;
|
|
921
|
-
style: string | null;
|
|
922
|
-
deletedAt: string | null;
|
|
923
|
-
}
|
|
924
|
-
export interface FontVariation {
|
|
925
|
-
name: string;
|
|
926
|
-
min: number;
|
|
927
|
-
max: number;
|
|
928
|
-
default: number;
|
|
929
|
-
}
|
|
930
|
-
export interface GeneratableBoard<T extends Record<string, unknown> = never> {
|
|
931
|
-
generationSettings?: T;
|
|
932
|
-
}
|
|
933
|
-
export interface GeneratableObject {
|
|
934
|
-
generation?: {
|
|
935
|
-
meta?: GenerationMeta;
|
|
936
|
-
generationId?: string;
|
|
937
|
-
generatorKey: string;
|
|
938
|
-
};
|
|
939
|
-
}
|
|
940
|
-
export interface GenerationCreditUse {
|
|
941
|
-
amount: number;
|
|
942
|
-
refunded: number;
|
|
943
|
-
}
|
|
944
|
-
export interface GenerationInputData {
|
|
945
|
-
prompt?: string;
|
|
946
|
-
style?: {
|
|
947
|
-
id: number;
|
|
948
|
-
};
|
|
949
|
-
model?: {
|
|
950
|
-
id: string;
|
|
951
|
-
};
|
|
952
|
-
}
|
|
953
|
-
export interface GenerationMeta {
|
|
954
|
-
generationEndsAt?: number;
|
|
955
|
-
pendingGenerationId: string;
|
|
956
|
-
operation?: GenerationOperation;
|
|
957
|
-
}
|
|
958
|
-
export interface GenerationStartedResultCommonProps {
|
|
959
|
-
generationEndsAt?: number;
|
|
960
|
-
}
|
|
961
|
-
export interface GetExportOptions {
|
|
962
|
-
format: "png" | "jpg" | "pdf" | "svg" | "mp4";
|
|
963
|
-
target: {
|
|
964
|
-
boardId: string;
|
|
965
|
-
} | {
|
|
966
|
-
nodeIds: string[];
|
|
967
|
-
};
|
|
968
|
-
dimensions?: {
|
|
969
|
-
multiplier: number;
|
|
970
|
-
} | {
|
|
971
|
-
pixelCount: number;
|
|
972
|
-
} | {
|
|
973
|
-
target: {
|
|
974
|
-
width: number;
|
|
975
|
-
height: number;
|
|
976
|
-
};
|
|
977
|
-
};
|
|
978
|
-
size?: {
|
|
979
|
-
width: number;
|
|
980
|
-
height: number;
|
|
981
|
-
unit: Unit;
|
|
982
|
-
};
|
|
983
|
-
dpi?: number;
|
|
984
|
-
colorModel?: "rgb" | "cmyk";
|
|
985
|
-
removeArtboardBackground?: boolean;
|
|
986
|
-
optimizedQuality?: boolean;
|
|
987
|
-
renderingIntent?: "download" | "pdf";
|
|
988
|
-
}
|
|
989
|
-
export interface GetObjectParams {
|
|
990
|
-
id: string;
|
|
991
|
-
}
|
|
992
|
-
export interface GetPreviewImageOptions {
|
|
993
|
-
targetPixelCount: number;
|
|
994
|
-
}
|
|
995
|
-
export interface GradientColorStop {
|
|
996
|
-
color: string | null;
|
|
997
|
-
offset: number;
|
|
998
|
-
opacity?: number;
|
|
999
|
-
}
|
|
1000
|
-
export interface GradientInfo {
|
|
1001
|
-
count: number;
|
|
1002
|
-
angle: number;
|
|
1003
|
-
offsets: number[];
|
|
1004
|
-
gradientTransform?: number[];
|
|
1005
|
-
coords?: {
|
|
1006
|
-
x1: number;
|
|
1007
|
-
x2: number;
|
|
1008
|
-
y1: number;
|
|
1009
|
-
y2: number;
|
|
1010
|
-
r1?: number;
|
|
1011
|
-
r2?: number;
|
|
1012
|
-
};
|
|
1013
|
-
type: GradientType;
|
|
1014
|
-
}
|
|
1015
|
-
export interface GradientObject {
|
|
1016
|
-
id?: string;
|
|
1017
|
-
key?: string;
|
|
1018
|
-
colorStops: GradientColorStop[];
|
|
1019
|
-
coords?: {
|
|
1020
|
-
x1: number;
|
|
1021
|
-
x2: number;
|
|
1022
|
-
y1: number;
|
|
1023
|
-
y2: number;
|
|
1024
|
-
r1?: number;
|
|
1025
|
-
r2?: number;
|
|
1026
|
-
};
|
|
1027
|
-
type: GradientType;
|
|
1028
|
-
angle?: number;
|
|
1029
|
-
gradientTransform?: number[];
|
|
1030
|
-
}
|
|
1031
|
-
export interface GroupAPI {
|
|
1032
|
-
createGroup(input: CreateGroupParams, opts?: DesignApiOptions): void;
|
|
1033
|
-
removeGroup(input: RemoveGroupParams, opts?: DesignApiOptions): void;
|
|
1034
|
-
addIntoGroup(input: AddIntoGroupParams, opts?: DesignApiOptions): void;
|
|
1035
|
-
removeFromGroup(input: RemoveFromGroupParams, opts?: DesignApiOptions): void;
|
|
1036
|
-
}
|
|
1037
|
-
export interface GuideAPI {
|
|
1038
|
-
createGuide(input: CreateGuideInput, opts?: DesignApiOptions): NormalizedGuideObject;
|
|
1039
|
-
updateGuide(input: UpdateGuideInput, opts?: DesignApiOptions): NormalizedGuideObject;
|
|
1040
|
-
}
|
|
1041
|
-
export interface IllustrationAPI {
|
|
1042
|
-
addIllustration(params: AddIllustrationParams, opts?: DesignApiOptions): Promise<NormalizedIllustrationObject>;
|
|
1043
|
-
updateIllustration(params: UpdateIllustrationParams, opts?: DesignApiOptions): NormalizedIllustrationObject;
|
|
1044
|
-
}
|
|
1045
|
-
export interface ImageAPI {
|
|
1046
|
-
addImage(params: AddImageParams, opts?: DesignApiOptions): SdkResultAsync<NormalizedIllustrationImageObject, SdkError>;
|
|
1047
|
-
updateImage(params: UpdateImageParams, opts?: DesignApiOptions): NormalizedIllustrationImageObject;
|
|
1048
|
-
updateImageSource(params: UpdateImageSourceParams, opts?: DesignApiOptions): SdkResultAsync<NormalizedIllustrationImageObject, SdkError>;
|
|
1049
|
-
resetImageCrop(params: ResetImageCropParams, opts?: DesignApiOptions): SdkResultAsync<NormalizedIllustrationImageObject, SdkError>;
|
|
1050
|
-
resetImageBackgroundRemoval(params: ResetImageBackgroundRemovalParams, opts?: DesignApiOptions): SdkResultAsync<NormalizedIllustrationImageObject, SdkError>;
|
|
1051
|
-
}
|
|
1052
|
-
export interface ImageGenerationResult {
|
|
1053
|
-
type: typeof ResultType.IMAGE;
|
|
1054
|
-
objectName: string;
|
|
1055
|
-
}
|
|
1056
|
-
export interface ImageGenerationStartedResult extends GenerationStartedResultCommonProps {
|
|
1057
|
-
type: typeof ResultType.IMAGE;
|
|
1058
|
-
}
|
|
1059
|
-
export interface KittlContext {
|
|
1060
|
-
colorScheme: EditorColorScheme;
|
|
1061
|
-
dragAndDrop: {
|
|
1062
|
-
offset: DragAndDropOffset;
|
|
1063
|
-
};
|
|
1064
|
-
}
|
|
1065
|
-
export interface KittlSDK {
|
|
1066
|
-
loaded: boolean;
|
|
1067
|
-
onLoadedCallback: (() => void) | null;
|
|
1068
|
-
onReady: (cb: () => void) => void;
|
|
1069
|
-
ai: AsyncAIAPI;
|
|
1070
|
-
data: AsyncDataAPI;
|
|
1071
|
-
design: AsyncDesignAPI;
|
|
1072
|
-
designStore: AsyncDesignStateAPI;
|
|
1073
|
-
appStore: AsyncAppStateSubscriptionAPI;
|
|
1074
|
-
context: AsyncContextAPI;
|
|
1075
|
-
dragAndDrop: PublicDragAndDropAPI;
|
|
1076
|
-
state: AsyncAppStateAPI;
|
|
1077
|
-
auth: AsyncAuthAPI;
|
|
1078
|
-
upload: AsyncUploadAPI;
|
|
1079
|
-
fileBrowser: FileBrowserAPI;
|
|
1080
|
-
stateless: AsyncStatelessAPI;
|
|
1081
|
-
font: AsyncFontAPI;
|
|
1082
|
-
createBatch: () => Promise<AsyncBatchDesignAPI>;
|
|
1083
|
-
}
|
|
1084
|
-
export interface LayersAPI {
|
|
1085
|
-
moveTo(input: MoveToParams, opts?: DesignApiOptions): void;
|
|
1086
|
-
sendForward(input: SendToParams, opts?: DesignApiOptions): void;
|
|
1087
|
-
sendToFront(input: SendToParams, opts?: DesignApiOptions): void;
|
|
1088
|
-
sendBackward(input: SendToParams, opts?: DesignApiOptions): void;
|
|
1089
|
-
sendToBack(input: SendToParams, opts?: DesignApiOptions): void;
|
|
1090
|
-
}
|
|
1091
|
-
export interface LinkedFillPresetMeta {
|
|
1092
|
-
key: string;
|
|
1093
|
-
target: FillMetaTarget;
|
|
1094
|
-
source?: string;
|
|
1095
|
-
}
|
|
1096
|
-
export interface LoadingCardAPI {
|
|
1097
|
-
createLoadingCard(input: CreateLoadingCardInput, opts?: DesignApiOptions): NormalizedLoadingCardObject;
|
|
1098
|
-
updateLoadingCard(input: UpdateLoadingCardInput, opts?: DesignApiOptions): NormalizedLoadingCardObject;
|
|
1099
|
-
}
|
|
1100
|
-
export interface MockupDataAPI {
|
|
1101
|
-
get(id: number): SdkResultAsync<CatalogItem>;
|
|
1102
|
-
getOverview(options?: Pick<PaginationOptions, "sort">): SdkResultAsync<MockupOverviewDto>;
|
|
1103
|
-
getGroup(groupId: string, options?: PaginationOptions): SdkResultAsync<MockupGroupDto>;
|
|
1104
|
-
search(query: string, options?: PaginationOptions): SdkResultAsync<PaginatedResult<CatalogItem>>;
|
|
1105
|
-
getSuggestions(): SdkResultAsync<MockupSuggestions>;
|
|
1106
|
-
}
|
|
1107
|
-
export interface MockupGroupDto {
|
|
1108
|
-
group: {
|
|
1109
|
-
id: string;
|
|
1110
|
-
name: string;
|
|
1111
|
-
};
|
|
1112
|
-
data: PaginatedResult<CatalogItem>;
|
|
1113
|
-
}
|
|
1114
|
-
export interface MockupOverviewDto {
|
|
1115
|
-
overview: MockupOverviewGroupDto[];
|
|
1116
|
-
}
|
|
1117
|
-
export interface MockupOverviewGroupDto {
|
|
1118
|
-
id: string;
|
|
1119
|
-
name: string;
|
|
1120
|
-
mockups: CatalogItem[];
|
|
1121
|
-
total: number;
|
|
1122
|
-
}
|
|
1123
|
-
export interface MockupSuggestions {
|
|
1124
|
-
tags: string[];
|
|
1125
|
-
groups: string[];
|
|
1126
|
-
}
|
|
1127
|
-
export interface MockupboardAPI {
|
|
1128
|
-
addMockupBoard(params: AddMockupBoardParams, opts?: DesignApiOptions): NormalizedStandardBoard<MockupBoardOptions>;
|
|
1129
|
-
addMockupDesignObject(params: AddMockupDesignObjectParams, opts?: DesignApiOptions): NormalizedMockupDesignObject;
|
|
1130
|
-
updateMockupBoard(params: UpdateMockupBoardParams, opts?: DesignApiOptions): NormalizedStandardBoard<MockupBoardOptions>;
|
|
1131
|
-
}
|
|
1132
|
-
export interface ObjectAPI {
|
|
1133
|
-
setLockedState(params: SetLockedParams, opts?: DesignApiOptions): WithLocked;
|
|
1134
|
-
removeObject(params: RemoveObjectParams, opts?: DesignApiOptions): RemoveObjectResult;
|
|
1135
|
-
setHiddenState(params: SetHiddenParams, opts?: DesignApiOptions): WithHidden;
|
|
1136
|
-
rotateObject(params: RotateObjectParams, opts?: DesignApiOptions): WithObjectLayout;
|
|
1137
|
-
getAllByFilter<T extends NormalizedObject>(predicate: (object: NormalizedObject) => boolean, opts?: DesignApiOptions): T[];
|
|
1138
|
-
rename(input: RenameParams, opts?: DesignApiOptions): string;
|
|
1139
|
-
getObject(params: GetObjectParams, opts?: DesignApiOptions): NormalizedObject;
|
|
1140
|
-
_dangerouslyUpdate(updateParams: Partial<Omit<SerializedObject, "id">> & {
|
|
1141
|
-
id: string;
|
|
1142
|
-
}, opts?: DesignApiOptions): {
|
|
1143
|
-
id: string;
|
|
1144
|
-
};
|
|
1145
|
-
}
|
|
1146
|
-
export interface PaginatedResult<T> {
|
|
1147
|
-
items: T[];
|
|
1148
|
-
total?: number;
|
|
1149
|
-
hasMore: boolean;
|
|
1150
|
-
}
|
|
1151
|
-
export interface PaginationOptions {
|
|
1152
|
-
take?: number;
|
|
1153
|
-
skip?: number;
|
|
1154
|
-
sort?: string;
|
|
1155
|
-
cursor?: string;
|
|
1156
|
-
}
|
|
1157
|
-
export interface PhotoFilterOptions {
|
|
1158
|
-
[ImageFilterType.Saturation]: {
|
|
1159
|
-
saturation: number;
|
|
1160
|
-
};
|
|
1161
|
-
[ImageFilterType.Contrast]: {
|
|
1162
|
-
contrast: number;
|
|
1163
|
-
};
|
|
1164
|
-
[ImageFilterType.Brightness]: {
|
|
1165
|
-
brightness: number;
|
|
1166
|
-
};
|
|
1167
|
-
[ImageFilterType.Vibrance]: {
|
|
1168
|
-
vibrance: number;
|
|
1169
|
-
};
|
|
1170
|
-
[ImageFilterType.HueRotation]: {
|
|
1171
|
-
rotation: number;
|
|
1172
|
-
};
|
|
1173
|
-
[ImageFilterType.Noise]: {
|
|
1174
|
-
noise: number;
|
|
1175
|
-
};
|
|
1176
|
-
[ImageFilterType.Blur]: {
|
|
1177
|
-
blur: number;
|
|
1178
|
-
};
|
|
1179
|
-
[ImageFilterType.Convolute]: {
|
|
1180
|
-
matrix: number[];
|
|
1181
|
-
};
|
|
1182
|
-
[ImageFilterType.Pixelate]: {
|
|
1183
|
-
blocksize: number;
|
|
1184
|
-
};
|
|
1185
|
-
[ImageFilterType.RemoveColor]: {
|
|
1186
|
-
color: string | null;
|
|
1187
|
-
distance: number;
|
|
1188
|
-
};
|
|
1189
|
-
}
|
|
1190
|
-
export interface PublicDragAndDropAPI {
|
|
1191
|
-
startDragImageEvent(input: DragAndDropStartDragImageEventInput): void;
|
|
1192
|
-
dropImage(input: DragAndDropDropImageInput): Promise<string | null>;
|
|
1193
|
-
}
|
|
1194
|
-
export interface RemoveObjectParams {
|
|
1195
|
-
id: string;
|
|
1196
|
-
}
|
|
1197
|
-
export interface RemoveObjectResult {
|
|
1198
|
-
removedObject: NormalizedObject;
|
|
1199
|
-
}
|
|
1200
|
-
export interface RichTextCompressedStylesV1 {
|
|
1201
|
-
version: "v1";
|
|
1202
|
-
[lineIndex: LineIndex]: {
|
|
1203
|
-
charsAt: CharacterIndex[];
|
|
1204
|
-
styles: Partial<RichTextSerializedCharacterStyle>;
|
|
1205
|
-
}[];
|
|
1206
|
-
}
|
|
1207
|
-
export interface RichTextCompressedStylesV2 {
|
|
1208
|
-
version: "v2";
|
|
1209
|
-
customStyles: Record<string, Partial<RichTextSerializedCharacterStyle>>;
|
|
1210
|
-
[lineIndex: LineIndex]: {
|
|
1211
|
-
charsAt: [
|
|
1212
|
-
CharacterIndex,
|
|
1213
|
-
SequenceLength
|
|
1214
|
-
][];
|
|
1215
|
-
styleId: string;
|
|
1216
|
-
}[];
|
|
1217
|
-
}
|
|
1218
|
-
export interface RotateObjectParams {
|
|
1219
|
-
id: string;
|
|
1220
|
-
angle: number;
|
|
1221
|
-
origin?: {
|
|
1222
|
-
x: OriginX;
|
|
1223
|
-
y: OriginY;
|
|
1224
|
-
};
|
|
1225
|
-
}
|
|
1226
|
-
export interface SetHiddenParams {
|
|
1227
|
-
id: string;
|
|
1228
|
-
hidden: boolean;
|
|
1229
|
-
}
|
|
1230
|
-
export interface SetLockedParams {
|
|
1231
|
-
id: string;
|
|
1232
|
-
locked: boolean;
|
|
1233
|
-
}
|
|
1234
|
-
export interface ShadowOptions {
|
|
1235
|
-
angle: number;
|
|
1236
|
-
offset: number;
|
|
1237
|
-
blur: number;
|
|
1238
|
-
color: string | null;
|
|
1239
|
-
}
|
|
1240
|
-
export interface ShapeAPI {
|
|
1241
|
-
createPredefinedShape(input: CreateShapeInput, opts?: DesignApiOptions): NormalizedBasicShapeObject;
|
|
1242
|
-
createBasicShape(input: CreateBasicShapeInput, opts?: DesignApiOptions): Promise<NormalizedBasicShapeObject>;
|
|
1243
|
-
updateShape(input: UpdateShapeInput, opts?: DesignApiOptions): NormalizedBasicShapeObject;
|
|
1244
|
-
convertShapeToMask(input: ConvertShapeToMaskInput, opts?: DesignApiOptions): DesignStructureObject;
|
|
1245
|
-
}
|
|
1246
|
-
export interface SmartboardAPI {
|
|
1247
|
-
addSmartboard(params: AddSmartboardParams, opts?: DesignApiOptions): NormalizedStandardBoard<SmartboardOptions>;
|
|
1248
|
-
updateSmartboard(params: UpdateSmartboardParams, opts?: DesignApiOptions): NormalizedStandardBoard<SmartboardOptions>;
|
|
1249
|
-
}
|
|
1250
|
-
export interface SpendCreditsOptions {
|
|
1251
|
-
amount: number;
|
|
1252
|
-
message: string;
|
|
1253
|
-
onAccept?: () => void;
|
|
1254
|
-
onDecline?: () => void;
|
|
1255
|
-
}
|
|
1256
|
-
export interface SpendCreditsResult {
|
|
1257
|
-
success: boolean;
|
|
1258
|
-
}
|
|
1259
|
-
export interface StandardArtboardOptions extends BaseStandardArtboardOptions<ObjectType.Artboard> {
|
|
1260
|
-
}
|
|
1261
|
-
export interface StartGenerationResult {
|
|
1262
|
-
generationId: string;
|
|
1263
|
-
}
|
|
1264
|
-
export interface StateAPI {
|
|
1265
|
-
implementSubState(params: Partial<NormalizedDesignState>, opts?: DesignApiOptions): Partial<NormalizedDesignState>;
|
|
1266
|
-
getState(): NormalizedDesignState;
|
|
1267
|
-
}
|
|
1268
|
-
export interface StructureObjectMeta {
|
|
1269
|
-
name?: string;
|
|
1270
|
-
type?: LayerType;
|
|
1271
|
-
defaultIcon?: LayerIconType;
|
|
1272
|
-
hidden?: boolean;
|
|
1273
|
-
locked?: boolean;
|
|
1274
|
-
open?: boolean;
|
|
1275
|
-
linkedBoardId?: string;
|
|
1276
|
-
maskObjectId?: string;
|
|
1277
|
-
maskBackgroundColor?: string | null;
|
|
1278
|
-
}
|
|
1279
|
-
export interface TextAPI {
|
|
1280
|
-
addText(params: AddTextParams, opts?: DesignApiOptions): NormalizedRichTextObject;
|
|
1281
|
-
updateText(params: UpdateTextParams, opts?: DesignApiOptions): NormalizedRichTextObject;
|
|
1282
|
-
updateRenderPlugin(params: UpdateRenderPluginParams, opts?: DesignApiOptions): NormalizedRichTextObject;
|
|
1283
|
-
updateDecorationPlugin(params: UpdateDecorationPluginParams, opts?: DesignApiOptions): NormalizedRichTextObject;
|
|
1284
|
-
}
|
|
1285
|
-
export interface TextureAPI {
|
|
1286
|
-
setTexture(params: SetTextureParams, opts?: DesignApiOptions): SdkResult<NormalizedBoard, SdkError>;
|
|
1287
|
-
removeTexture(params: RemoveTextureParams, opts?: DesignApiOptions): SdkResult<NormalizedBoard, SdkError>;
|
|
1288
|
-
updateTexture(params: UpdateTextureParams, opts?: DesignApiOptions): SdkResult<NormalizedBoard, SdkError>;
|
|
1289
|
-
releaseTexture(params: ReleaseTextureParams, opts?: DesignApiOptions): SdkResult<IllustrationImageSerializedObject, SdkError>;
|
|
1290
|
-
}
|
|
1291
|
-
export interface TextureOptions {
|
|
1292
|
-
texture: string;
|
|
1293
|
-
mode: BlendMode;
|
|
1294
|
-
opacity: number;
|
|
1295
|
-
hidden?: boolean;
|
|
1296
|
-
loaded?: boolean;
|
|
1297
|
-
isAlphaMask?: boolean;
|
|
1298
|
-
renderClip?: boolean;
|
|
1299
|
-
}
|
|
1300
|
-
export interface TransformOptions {
|
|
1301
|
-
type: "freeLine" | "freeForm" | "circle" | "angle" | "arch" | "rise" | "wave" | "flag" | null;
|
|
1302
|
-
directionInverted?: boolean;
|
|
1303
|
-
curve?: number;
|
|
1304
|
-
isChanging?: boolean;
|
|
1305
|
-
}
|
|
1306
|
-
export interface UpdateFontFamilyOptions {
|
|
1307
|
-
id: string;
|
|
1308
|
-
name: string;
|
|
1309
|
-
}
|
|
1310
|
-
export interface UpdateFontStyleOptions {
|
|
1311
|
-
fontFamilyId: string;
|
|
1312
|
-
id: string;
|
|
1313
|
-
style: string;
|
|
1314
|
-
}
|
|
1315
|
-
export interface UpdateGuideInput {
|
|
1316
|
-
id: string;
|
|
1317
|
-
top?: number;
|
|
1318
|
-
left?: number;
|
|
1319
|
-
}
|
|
1320
|
-
export interface UpdateLoadingCardInput {
|
|
1321
|
-
id: string;
|
|
1322
|
-
position?: CreateElementWithPositionAndSize["position"];
|
|
1323
|
-
size?: CreateElementWithPositionAndSize["size"];
|
|
1324
|
-
imageGenerationId?: string;
|
|
1325
|
-
startedAt?: number;
|
|
1326
|
-
generatingModelKey?: string;
|
|
1327
|
-
generationAverageSpeed?: number;
|
|
1328
|
-
name?: string;
|
|
1329
|
-
}
|
|
1330
|
-
export interface UploadAPI {
|
|
1331
|
-
image: UploadImageAPI;
|
|
1332
|
-
}
|
|
1333
|
-
export interface UploadImageAPI {
|
|
1334
|
-
upload: ({ blob, }: {
|
|
1335
|
-
blob: Blob;
|
|
1336
|
-
}) => SdkResultAsync<UserImageUpload[], Error>;
|
|
1337
|
-
uploadTemp: ({ blob, }: {
|
|
1338
|
-
blob: Blob;
|
|
1339
|
-
}) => SdkResultAsync<TempUserImageUpload[], Error>;
|
|
1340
|
-
}
|
|
1341
|
-
export interface UserTokenResult {
|
|
1342
|
-
success: true;
|
|
1343
|
-
token: string;
|
|
1344
|
-
}
|
|
1345
|
-
export interface VideoAPI {
|
|
1346
|
-
addVideo(params: AddVideoParams, opts?: DesignApiOptions): Promise<NormalizedVideoObject>;
|
|
1347
|
-
updateVideo(params: UpdateVideoParams, opts?: DesignApiOptions): NormalizedVideoObject;
|
|
1348
|
-
removePlaylistItem(params: RemoveVideoPlaylistItemParams, opts?: DesignApiOptions): NormalizedVideoObject;
|
|
1349
|
-
updatePlaylistItem(params: UpdateVideoPlaylistItemParams, opts?: DesignApiOptions): Promise<NormalizedVideoObject>;
|
|
1350
|
-
}
|
|
1351
|
-
export interface VideoGenerationResult {
|
|
1352
|
-
type: typeof ResultType.VIDEO;
|
|
1353
|
-
status: "PROCESSING" | "READY" | "FAILED";
|
|
1354
|
-
playbackId?: string;
|
|
1355
|
-
duration?: number;
|
|
1356
|
-
aspectRatio?: string;
|
|
1357
|
-
hostingProvider?: "MUX";
|
|
1358
|
-
}
|
|
1359
|
-
export interface VideoGenerationStartedResult extends GenerationStartedResultCommonProps {
|
|
1360
|
-
type: typeof ResultType.VIDEO;
|
|
1361
|
-
}
|
|
1362
|
-
export interface VideoboardAPI {
|
|
1363
|
-
addVideoboard(params: AddVideoboardParams, opts?: DesignApiOptions): Promise<NormalizedStandardBoard<VideoboardOptions>>;
|
|
1364
|
-
setVideoOnVideoboard(params: SetVideoOnVideoboardParams, opts?: DesignApiOptions): Promise<NormalizedStandardBoard<VideoboardOptions>>;
|
|
1365
|
-
updateVideoboard(params: UpdateVideoboardParams, opts?: DesignApiOptions): NormalizedStandardBoard<VideoboardOptions>;
|
|
1366
|
-
removePlaylistItem(params: RemovePlaylistItemParams, opts?: DesignApiOptions): NormalizedStandardBoard<VideoboardOptions>;
|
|
1367
|
-
updatePlaylistItem(params: UpdatePlaylistItemParams, opts?: DesignApiOptions): Promise<NormalizedStandardBoard<VideoboardOptions>>;
|
|
1368
|
-
}
|
|
1369
|
-
export interface WithHidden {
|
|
1370
|
-
hidden?: boolean | undefined;
|
|
1371
|
-
}
|
|
1372
|
-
export interface WithLocked {
|
|
1373
|
-
locked?: boolean | undefined;
|
|
1374
|
-
}
|
|
1375
|
-
export interface WithObjectLayout {
|
|
1376
|
-
width: number;
|
|
1377
|
-
height: number;
|
|
1378
|
-
scaleX: number;
|
|
1379
|
-
scaleY: number;
|
|
1380
|
-
angle: number;
|
|
1381
|
-
top: number;
|
|
1382
|
-
left: number;
|
|
1383
|
-
flipX: boolean;
|
|
1384
|
-
flipY: boolean;
|
|
1385
|
-
}
|
|
1386
|
-
export type AIGenerationActionOrigin = "COPILOT" | "RIGHT_PANEL" | "LEFT_PANEL" | "MICRO_APP" | "IMAGE_SETS" | "AI_CHAT" | "SMARTBOARD" | "AI_INPUT_GENERATE_IMAGE" | "AI_INPUT_REMIX_IMAGE" | "AI_INPUT_GENERATE_VIDEO" | "AI_HUB_GENERATE_IMAGE" | "AI_HUB_REMIX_IMAGE" | "AI_HUB_GENERATE_VIDEO" | "VIDEOBOARD" | "AGENT" | "WORKFLOW";
|
|
1387
|
-
export type AIGenerationContentType = "image" | "video";
|
|
1388
|
-
export type AIGenerationModelTaskType = "IMAGE_TO_IMAGE" | "IMAGE_INPAINT" | "IMAGE_OUTPAINT" | "TEXT_TO_IMAGE" | "IMAGE_TO_VIDEO";
|
|
1389
|
-
export type APIOptions<T extends Record<string, unknown>> = {
|
|
1390
|
-
batchClient?: BatchClient<T>;
|
|
1391
|
-
} | {
|
|
1392
|
-
origin?: Origin;
|
|
1393
|
-
historyOrigin?: HistoryOrigins;
|
|
1394
|
-
} | undefined;
|
|
1395
|
-
export type AbsolutePosition = {
|
|
1396
|
-
absolute: LeftTopPosition;
|
|
1397
|
-
};
|
|
1398
|
-
export type ActiveTool = {
|
|
1399
|
-
type: "artboard";
|
|
1400
|
-
} | {
|
|
1401
|
-
type: "move";
|
|
1402
|
-
} | {
|
|
1403
|
-
type: "hand";
|
|
1404
|
-
} | {
|
|
1405
|
-
type: "pen";
|
|
1406
|
-
} | {
|
|
1407
|
-
type: "pen-vector-editing";
|
|
1408
|
-
} | {
|
|
1409
|
-
type: "comment";
|
|
1410
|
-
} | {
|
|
1411
|
-
type: "shape";
|
|
1412
|
-
shape: BasicShapeType;
|
|
1413
|
-
};
|
|
1414
|
-
export type AddIllustrationParams = {
|
|
1415
|
-
src: string;
|
|
1416
|
-
objectProperties?: IllustrationProperties;
|
|
1417
|
-
} & CreateElementWithPositionAndSize;
|
|
1418
|
-
export type AddImageParams = ({
|
|
1419
|
-
src: string;
|
|
1420
|
-
} | {
|
|
1421
|
-
width: number;
|
|
1422
|
-
height: number;
|
|
1423
|
-
src?: never;
|
|
1424
|
-
}) & GeneratableObject & {
|
|
1425
|
-
objectProperties?: ImageProperties;
|
|
1426
|
-
} & CreateElementWithPositionAndSize;
|
|
1427
|
-
export type AddIntoGroupParams = {
|
|
1428
|
-
groupId: string;
|
|
1429
|
-
objectIds: string[];
|
|
1430
|
-
};
|
|
1431
|
-
export type AddMockupBoardParams = {
|
|
1432
|
-
inputBoardIds: string[];
|
|
1433
|
-
mockupTemplateId: number;
|
|
1434
|
-
shouldMockupColorMatchArtboard?: boolean;
|
|
1435
|
-
initialDesigns?: AddMockupDesignObjectParams[];
|
|
1436
|
-
} & {
|
|
1437
|
-
position: AbsolutePosition | RelativePosition;
|
|
1438
|
-
size: Dimensions;
|
|
1439
|
-
};
|
|
1440
|
-
export type AddMockupDesignObjectParams = {
|
|
1441
|
-
mockupBoardId: string;
|
|
1442
|
-
inputBoardId: string;
|
|
1443
|
-
mockupTemplateId: number;
|
|
1444
|
-
initialNormalizedUnwarpedRect: MockupDesignRect;
|
|
1445
|
-
};
|
|
1446
|
-
export type AddSmartboardParams = {
|
|
1447
|
-
linkedBoardIds?: string[];
|
|
1448
|
-
} & {
|
|
1449
|
-
position: AbsolutePosition | RelativePosition;
|
|
1450
|
-
size: Dimensions;
|
|
1451
|
-
};
|
|
1452
|
-
export type AddTextParams = {
|
|
1453
|
-
text: string;
|
|
1454
|
-
id?: string;
|
|
1455
|
-
textProperties?: TextProperties;
|
|
1456
|
-
position: CreateElementWithPositionAndSize["position"];
|
|
1457
|
-
size: Dimensions;
|
|
1458
|
-
};
|
|
1459
|
-
export type AddVideoParams = {
|
|
1460
|
-
playlist: Omit<VideoPlaylistItem, "id">[];
|
|
1461
|
-
videoSize?: {
|
|
1462
|
-
width: number;
|
|
1463
|
-
height: number;
|
|
1464
|
-
};
|
|
1465
|
-
} & CreateElementWithPositionAndSize;
|
|
1466
|
-
export type AddVideoboardParams = {
|
|
1467
|
-
linkedBoardIds?: string[];
|
|
1468
|
-
video?: {
|
|
1469
|
-
width?: number;
|
|
1470
|
-
height?: number;
|
|
1471
|
-
playlist: Omit<VideoPlaylistItem, "id">[];
|
|
1472
|
-
};
|
|
1473
|
-
} & {
|
|
1474
|
-
position: AbsolutePosition | RelativePosition;
|
|
1475
|
-
size: Dimensions;
|
|
1476
|
-
};
|
|
1477
|
-
export type AppState = {
|
|
1478
|
-
selectedObjectsIds: string[];
|
|
1479
|
-
selectedLayersIds: string[];
|
|
1480
|
-
selectedArtboardIds: string[];
|
|
1481
|
-
selectedArtboardsObjectIds: string[];
|
|
1482
|
-
allSelectedObjectsIds: string[];
|
|
1483
|
-
canvasMode: CanvasMode | string;
|
|
1484
|
-
activeTool: ActiveTool | null;
|
|
1485
|
-
viewport: Viewport;
|
|
1486
|
-
isDragPanning: boolean;
|
|
1487
|
-
highlightedObjectId: string | null;
|
|
1488
|
-
};
|
|
1489
|
-
/**
|
|
1490
|
-
* A dot-separated string path into the app state.
|
|
1491
|
-
* The first segment must be a valid top-level key of AppState.
|
|
1492
|
-
*
|
|
1493
|
-
* @example
|
|
1494
|
-
* 'selectedObjectsIds'
|
|
1495
|
-
* 'viewport.coords.tl.x'
|
|
1496
|
-
* 'activeTool.type'
|
|
1497
|
-
*/
|
|
1498
|
-
export type AppStateSelectorPath = AppStateTopLevelKey | `${AppStateTopLevelKey}.${string}`;
|
|
1499
|
-
/**
|
|
1500
|
-
* Top-level keys of AppState that extensions can subscribe to.
|
|
1501
|
-
*/
|
|
1502
|
-
export type AppStateTopLevelKey = keyof AppState;
|
|
1503
|
-
export type ArtboardLikeType = ObjectType.Artboard | ObjectType.MockupBoard | ObjectType.Smartboard | ObjectType.Videoboard;
|
|
1504
|
-
export type ArtboardOptions = StandardArtboardOptions | SmartboardOptions | MockupBoardOptions | VideoboardOptions;
|
|
1505
|
-
export type AvailableShadowOptions = Partial<Pick<ShadowOptions, "blur">> & Omit<ShadowOptions, "blur">;
|
|
1506
|
-
export type BaseFloatingBoard = {
|
|
1507
|
-
id: string;
|
|
1508
|
-
floating: true;
|
|
1509
|
-
};
|
|
1510
|
-
export type BasicShapeConfigurableFields = {
|
|
1511
|
-
angle?: BasicShapeSerializedObject["angle"];
|
|
1512
|
-
flipX?: BasicShapeSerializedObject["flipX"];
|
|
1513
|
-
flipY?: BasicShapeSerializedObject["flipY"];
|
|
1514
|
-
hidden?: BasicShapeSerializedObject["hidden"];
|
|
1515
|
-
opacity?: BasicShapeSerializedObject["opacity"];
|
|
1516
|
-
skewX?: BasicShapeSerializedObject["skewX"];
|
|
1517
|
-
skewY?: BasicShapeSerializedObject["skewY"];
|
|
1518
|
-
cornerRadii?: BasicShapeSerializedObject["cornerRadii"];
|
|
1519
|
-
name?: BasicShapeSerializedObject["name"];
|
|
1520
|
-
shadowOptions?: BasicShapeSerializedObject["shadowOptions"];
|
|
1521
|
-
shadowColor?: NonNullable<BasicShapeSerializedObject["shadowOptions"]>["color"];
|
|
1522
|
-
fill?: BasicShapeSerializedObject["fill"];
|
|
1523
|
-
fillColor?: NonNullable<BasicShapeSerializedObject["fill"]>[number]["value"];
|
|
1524
|
-
stroke?: BasicShapeSerializedObject["stroke"];
|
|
1525
|
-
strokeWidth?: BasicShapeSerializedObject["strokeWidth"];
|
|
1526
|
-
};
|
|
1527
|
-
export type BasicShapeSerializedObject = typeof BASIC_SHAPE_DEFAULT_VALUES & {
|
|
1528
|
-
nPoints?: number | undefined;
|
|
1529
|
-
};
|
|
1530
|
-
export type BasicShapeType = (typeof BasicShapeType)[keyof typeof BasicShapeType];
|
|
1531
|
-
export type BridgedSdkResult<T> = T extends SdkResult<infer _R, infer _E> ? T : SdkResult<T, Error>;
|
|
1532
|
-
export type Builtin = Date | Function | Uint8Array | RegExp | Map<unknown, unknown> | Set<unknown>;
|
|
1533
|
-
export type CanvasMode = "erase" | "crop" | "reframe" | "inpaint" | null;
|
|
1534
|
-
export type CharacterIndex = number;
|
|
1535
|
-
export type CloneArtboardParams = {
|
|
1536
|
-
boardId: string;
|
|
1537
|
-
position: CreateElementWithPositionAndSize["position"];
|
|
1538
|
-
};
|
|
1539
|
-
export type Color = GradientObject | string | null | undefined;
|
|
1540
|
-
export type ColorInfo = StringColor | FullColor;
|
|
1541
|
-
export type CombinedShapeSerializedObject = Omit<typeof DEFAULT_VALUES, "shapes"> & {
|
|
1542
|
-
shapes: Shape[];
|
|
1543
|
-
};
|
|
1544
|
-
export type ConnectedArtboardOptions<T extends ArtboardLikeType = ArtboardLikeType> = BaseStandardArtboardOptions<T> & {
|
|
1545
|
-
inputBoardIds?: string[];
|
|
1546
|
-
};
|
|
1547
|
-
export type ContextSubscriptionCallback = (context: KittlContext) => void;
|
|
1548
|
-
export type ConvertShapeToMaskInput = {
|
|
1549
|
-
id: NormalizedBasicShapeObject["id"];
|
|
1550
|
-
};
|
|
1551
|
-
export type CreateBasicShapeInput = CreateElementWithPositionAndSize & {
|
|
1552
|
-
objectName: string;
|
|
1553
|
-
objectProperties?: ShapeProperties;
|
|
1554
|
-
};
|
|
1555
|
-
export type CreateBoardParams = Omit<CreateElementWithPositionAndSize, "size" | "boardId"> & {
|
|
1556
|
-
title?: string;
|
|
1557
|
-
size: {
|
|
1558
|
-
width: number;
|
|
1559
|
-
height: number;
|
|
1560
|
-
};
|
|
1561
|
-
};
|
|
1562
|
-
export type CreateElementWithPositionAndSize = {
|
|
1563
|
-
boardId?: string;
|
|
1564
|
-
position: AbsolutePosition | RelativePosition;
|
|
1565
|
-
size?: Dimensions & {
|
|
1566
|
-
applyViewportScale?: boolean;
|
|
1567
|
-
};
|
|
1568
|
-
};
|
|
1569
|
-
export type CreateGroupParams = {
|
|
1570
|
-
structureIds: string[];
|
|
1571
|
-
};
|
|
1572
|
-
export type CreateGuideInput = {
|
|
1573
|
-
boardId?: string;
|
|
1574
|
-
} & OrientationConditional;
|
|
1575
|
-
export type CreateShapeInput = CreateElementWithPositionAndSize & {
|
|
1576
|
-
shapeType: BasicShapeType;
|
|
1577
|
-
objectProperties?: ShapeProperties;
|
|
1578
|
-
};
|
|
1579
|
-
export type DeepPartial<T> = {
|
|
1580
|
-
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
1581
|
-
};
|
|
1582
|
-
/**
|
|
1583
|
-
* Resolves a dot-separated string path against a type `T`.
|
|
1584
|
-
*
|
|
1585
|
-
* For `Record<string, V>` intermediaries (e.g. `objects`), any string
|
|
1586
|
-
* key is accepted and the type continues into `V`.
|
|
1587
|
-
*
|
|
1588
|
-
* @example
|
|
1589
|
-
* DeepValue<SelectorState, 'objects.id1.width'> // number | undefined
|
|
1590
|
-
* DeepValue<SelectorState, 'config'> // DesignConfig
|
|
1591
|
-
* DeepValue<AppState, 'viewport.coords.tl.x'> // number
|
|
1592
|
-
*/
|
|
1593
|
-
export type DeepValue<T, P extends string> = P extends `${infer K}.${infer Rest}` ? K extends keyof T ? DeepValue<NonNullable<T[K]>, Rest> : T extends Record<string, infer V> ? DeepValue<NonNullable<V>, Rest> : undefined : P extends keyof T ? T[P] : T extends Record<string, infer V> ? V : undefined;
|
|
1594
|
-
export type DesignApiOptions = APIOptions<NormalizedDesignState>;
|
|
1595
|
-
export type DesignObjectId = string;
|
|
1596
|
-
/**
|
|
1597
|
-
* A dot-separated string path into the design state.
|
|
1598
|
-
* The first segment must be a valid top-level key of NormalizedDesignState.
|
|
1599
|
-
*
|
|
1600
|
-
* @example
|
|
1601
|
-
* 'objects.id1.width'
|
|
1602
|
-
* 'config.title'
|
|
1603
|
-
* 'boards.board1.backgroundColor'
|
|
1604
|
-
*/
|
|
1605
|
-
export type DesignStateSelectorPath = DesignStateTopLevelKey | `${DesignStateTopLevelKey}.${string}`;
|
|
1606
|
-
/**
|
|
1607
|
-
* Top-level keys of NormalizedDesignState that extensions can subscribe to.
|
|
1608
|
-
*/
|
|
1609
|
-
export type DesignStateTopLevelKey = keyof NormalizedDesignState;
|
|
1610
|
-
export type DesignStructureObject = {
|
|
1611
|
-
id?: StructureObjectId | null;
|
|
1612
|
-
meta?: StructureObjectMeta;
|
|
1613
|
-
parentId?: ID;
|
|
1614
|
-
};
|
|
1615
|
-
export type Dimensions = {
|
|
1616
|
-
width: number;
|
|
1617
|
-
height: number;
|
|
1618
|
-
};
|
|
1619
|
-
export type EditorColorScheme = "light" | "dark";
|
|
1620
|
-
export type ElementLocation = "origin" | "center";
|
|
1621
|
-
export type Expand<T> = T extends infer O ? {
|
|
1622
|
-
[K in keyof O]: O[K];
|
|
1623
|
-
} : never;
|
|
1624
|
-
export type FileBrowserContent = FileBrowserItem | FileBrowserFolder;
|
|
1625
|
-
export type FileBrowserFetchContentParams = {
|
|
1626
|
-
id?: string;
|
|
1627
|
-
next?: string | number;
|
|
1628
|
-
};
|
|
1629
|
-
export type FileBrowserFetchContentResult = {
|
|
1630
|
-
content: FileBrowserContent[];
|
|
1631
|
-
next?: string | number;
|
|
1632
|
-
error?: string;
|
|
1633
|
-
};
|
|
1634
|
-
export type FileBrowserFolder = {
|
|
1635
|
-
type: "folder";
|
|
1636
|
-
label: string;
|
|
1637
|
-
id: string;
|
|
1638
|
-
preview?: string;
|
|
1639
|
-
content?: Array<FileBrowserContent>;
|
|
1640
|
-
};
|
|
1641
|
-
export type FileBrowserItem = {
|
|
1642
|
-
type: "item";
|
|
1643
|
-
label: string;
|
|
1644
|
-
id: string;
|
|
1645
|
-
preview?: string;
|
|
1646
|
-
content: {
|
|
1647
|
-
data: string;
|
|
1648
|
-
};
|
|
1649
|
-
};
|
|
1650
|
-
export type FileBrowserTab = {
|
|
1651
|
-
id: string;
|
|
1652
|
-
label: string;
|
|
1653
|
-
fetchContent: (params?: FileBrowserFetchContentParams) => Promise<FileBrowserFetchContentResult>;
|
|
1654
|
-
};
|
|
1655
|
-
export type FillMetaTarget = "border" | "fill";
|
|
1656
|
-
export type FlattenUnion<T> = UnionToIntersection<T extends unknown ? Partial<T> : never>;
|
|
1657
|
-
export type FontListDto = PaginatedResult<FontFamilyDto>;
|
|
1658
|
-
export type FontVariationSettings = Record<string, number> & Partial<Record<KnownFontVariationAxis, number>>;
|
|
1659
|
-
export type FontWeight = OrAnyString<"Regular" | "Bold" | "Light" | "Medium" | "Black" | "SemiBold" | "Italic" | "ExtraLight" | "Thin" | "ExtraBold" | "LightItalic" | "MediumItalic" | "SemiBoldItalic" | "BlackItalic" | "ExtraBoldItalic" | "ThinItalic" | "ExtraLightItalic" | "BoldItalic">;
|
|
1660
|
-
export type FullColor = {
|
|
1661
|
-
key: "fill" | (Exclude<string, StringColorKeysType> & {});
|
|
1662
|
-
value: Color;
|
|
1663
|
-
visible: boolean;
|
|
1664
|
-
};
|
|
1665
|
-
export type FunctionType = (...args: never) => unknown;
|
|
1666
|
-
export type GenerationOperation = (typeof GenerationOperation)[keyof typeof GenerationOperation];
|
|
1667
|
-
export type GenerationStatus = (typeof GenerationStatus)[keyof typeof GenerationStatus];
|
|
1668
|
-
export type GenerationStatusUpdate = {
|
|
1669
|
-
generationId: string;
|
|
1670
|
-
status: typeof GenerationStatus.CREATED;
|
|
1671
|
-
inputData: undefined;
|
|
1672
|
-
creditUse: undefined;
|
|
1673
|
-
result: undefined;
|
|
1674
|
-
} | {
|
|
1675
|
-
generationId: string;
|
|
1676
|
-
status: typeof GenerationStatus.STARTED;
|
|
1677
|
-
inputData: GenerationInputData;
|
|
1678
|
-
creditUse?: GenerationCreditUse;
|
|
1679
|
-
result: StartedGenerationResult;
|
|
1680
|
-
} | {
|
|
1681
|
-
generationId: string;
|
|
1682
|
-
status: typeof GenerationStatus.COMPLETE;
|
|
1683
|
-
inputData: GenerationInputData;
|
|
1684
|
-
creditUse?: GenerationCreditUse;
|
|
1685
|
-
result: SuccessGenerationResult;
|
|
1686
|
-
} | {
|
|
1687
|
-
generationId: string;
|
|
1688
|
-
status: typeof GenerationStatus.FAILED;
|
|
1689
|
-
inputData: GenerationInputData | undefined;
|
|
1690
|
-
creditUse?: GenerationCreditUse;
|
|
1691
|
-
result: ErrorGenerationResult;
|
|
1692
|
-
};
|
|
1693
|
-
export type GuideSerializedObject = typeof GUIDE_DEFAULT_VALUES & OrientationDir;
|
|
1694
|
-
export type ID = string;
|
|
1695
|
-
export type IllustrationImageSerializedObject = typeof DEFAULT_VALUES$1 & {
|
|
1696
|
-
backgroundRemoved?: boolean | undefined;
|
|
1697
|
-
objectNameWithBackground?: string;
|
|
1698
|
-
backgroundRestorePathBoundary?: number | undefined;
|
|
1699
|
-
realWidth?: number | undefined;
|
|
1700
|
-
realHeight?: number | undefined;
|
|
1701
|
-
erasePaths?: {
|
|
1702
|
-
cacheKey: string;
|
|
1703
|
-
objectName: string | null;
|
|
1704
|
-
fallbackObjectName?: string;
|
|
1705
|
-
} | undefined;
|
|
1706
|
-
eraseStrokeWidth?: number | undefined;
|
|
1707
|
-
inpaintingStrokeWidth?: number | undefined;
|
|
1708
|
-
};
|
|
1709
|
-
export type IllustrationProperties = {
|
|
1710
|
-
angle?: IllustrationSerializedObject["angle"];
|
|
1711
|
-
flipX?: IllustrationSerializedObject["flipX"];
|
|
1712
|
-
flipY?: IllustrationSerializedObject["flipY"];
|
|
1713
|
-
hidden?: IllustrationSerializedObject["hidden"];
|
|
1714
|
-
opacity?: IllustrationSerializedObject["opacity"];
|
|
1715
|
-
shadowOptions?: IllustrationSerializedObject["shadowOptions"];
|
|
1716
|
-
stroke?: IllustrationSerializedObject["stroke"];
|
|
1717
|
-
strokeWidth?: IllustrationSerializedObject["strokeWidth"];
|
|
1718
|
-
fill?: IllustrationSerializedObject["fill"];
|
|
1719
|
-
gradients?: IllustrationSerializedObject["gradients"];
|
|
1720
|
-
generation?: IllustrationSerializedObject["generation"];
|
|
1721
|
-
};
|
|
1722
|
-
export type IllustrationSerializedObject = typeof ILLUSTRATION_DEFAULT_VALUES;
|
|
1723
|
-
export type ImageProperties = {
|
|
1724
|
-
angle?: IllustrationImageSerializedObject["angle"];
|
|
1725
|
-
flipX?: IllustrationImageSerializedObject["flipX"];
|
|
1726
|
-
flipY?: IllustrationImageSerializedObject["flipY"];
|
|
1727
|
-
hidden?: IllustrationImageSerializedObject["hidden"];
|
|
1728
|
-
opacity?: IllustrationImageSerializedObject["opacity"];
|
|
1729
|
-
shadowOptions?: IllustrationImageSerializedObject["shadowOptions"];
|
|
1730
|
-
stroke?: IllustrationImageSerializedObject["stroke"];
|
|
1731
|
-
strokeWidth?: IllustrationImageSerializedObject["strokeWidth"];
|
|
1732
|
-
fill?: IllustrationImageSerializedObject["fill"];
|
|
1733
|
-
};
|
|
1734
|
-
export type InternalPatchArgs<T> = {
|
|
1735
|
-
patch: PatchTree<T> | PatchTree<T>[];
|
|
1736
|
-
origin: Origin;
|
|
1737
|
-
historyOrigin?: HistoryOrigins;
|
|
1738
|
-
transactionMeta?: TransactionMeta;
|
|
1739
|
-
};
|
|
1740
|
-
export type KnownFontVariationAxis = "wght" | "wdth" | "slnt" | "ital" | "opsz" | "GRAD";
|
|
1741
|
-
export type LayerIconType = "drawIcon";
|
|
1742
|
-
export type LayerType = Exclude<SerializableObjectType, ObjectType.Guide> | typeof structuralGroupType | typeof clippingMaskType | typeof backgroundType | typeof pathType;
|
|
1743
|
-
export type LayersMovePosition = "before" | "after" | "into";
|
|
1744
|
-
export type LeftTopPosition = {
|
|
1745
|
-
left: number;
|
|
1746
|
-
top: number;
|
|
1747
|
-
};
|
|
1748
|
-
export type LineHeight = {
|
|
1749
|
-
value: number;
|
|
1750
|
-
unit: LineHeightUnit;
|
|
1751
|
-
};
|
|
1752
|
-
export type LineHeightUnit = "px" | "%";
|
|
1753
|
-
export type LineIndex = number;
|
|
1754
|
-
export type LinkedPreset = {
|
|
1755
|
-
id: string;
|
|
1756
|
-
libraryId: string;
|
|
1757
|
-
} & LinkedPresetMeta;
|
|
1758
|
-
export type LinkedPresetMeta = {
|
|
1759
|
-
type: LibraryPresetType.FILL;
|
|
1760
|
-
meta: LinkedFillPresetMeta;
|
|
1761
|
-
} | {
|
|
1762
|
-
type: LibraryPresetType.TRANSFORMATION;
|
|
1763
|
-
meta?: never;
|
|
1764
|
-
} | {
|
|
1765
|
-
type: LibraryPresetType.PHOTO_FILTER;
|
|
1766
|
-
meta?: never;
|
|
1767
|
-
} | {
|
|
1768
|
-
type: LibraryPresetType.SHADOW;
|
|
1769
|
-
meta?: never;
|
|
1770
|
-
} | {
|
|
1771
|
-
type: LibraryPresetType.TEXT;
|
|
1772
|
-
meta?: never;
|
|
1773
|
-
} | {
|
|
1774
|
-
type: LibraryPresetType.TEXT_EFFECT;
|
|
1775
|
-
meta?: never;
|
|
1776
|
-
} | {
|
|
1777
|
-
type: LibraryPresetType.TEXT_DECORATION;
|
|
1778
|
-
meta?: never;
|
|
1779
|
-
};
|
|
1780
|
-
export type LoadingCardSerializedObject = typeof LOADING_CARD_DEFAULT_VALUES & {
|
|
1781
|
-
imageGenerationId?: string | undefined;
|
|
1782
|
-
startedAt?: number | undefined;
|
|
1783
|
-
generatingModelKey?: string | undefined;
|
|
1784
|
-
generationAverageSpeed?: number | undefined;
|
|
1785
|
-
};
|
|
1786
|
-
export type MaskSerializedObject = typeof MASK_DEFAULT_VALUES & {
|
|
1787
|
-
maskFill?: string | null | undefined;
|
|
1788
|
-
isClipPath?: boolean | undefined;
|
|
1789
|
-
};
|
|
1790
|
-
export type MockupBoardOptions = ConnectedArtboardOptions<ObjectType.MockupBoard> & {
|
|
1791
|
-
mockupTemplateId?: number;
|
|
1792
|
-
shouldMockupColorMatchArtboard?: boolean;
|
|
1793
|
-
};
|
|
1794
|
-
export type MockupDesignRect = {
|
|
1795
|
-
x: number;
|
|
1796
|
-
y: number;
|
|
1797
|
-
width: number;
|
|
1798
|
-
height: number;
|
|
1799
|
-
};
|
|
1800
|
-
export type MockupDesignSerializedObject = typeof MOCKUP_DESIGN_DEFAULT_VALUES & {
|
|
1801
|
-
inputBoardId: string;
|
|
1802
|
-
mockupTemplateId: number;
|
|
1803
|
-
initialNormalizedUnwarpedRect: MockupDesignRect;
|
|
1804
|
-
};
|
|
1805
|
-
export type MoveToParams = {
|
|
1806
|
-
boardOrObjectIds: string[];
|
|
1807
|
-
position: LayersMovePosition;
|
|
1808
|
-
targetId: string;
|
|
1809
|
-
};
|
|
1810
|
-
export type NormalizeArray<T> = T extends (infer U)[] ? Record<string, Normalized<U>> : never;
|
|
1811
|
-
export type NormalizeObject<T> = Expand<{
|
|
1812
|
-
[K in keyof T]: NormalizeValue<T[K]>;
|
|
1813
|
-
} & {
|
|
1814
|
-
[K in keyof T as undefined extends T[K] ? never : NonNullable<T[K]> extends Array<unknown> ? T[K] extends null ? never : `${Extract<K, string>}Indices` : never]: Record<string, string>;
|
|
1815
|
-
} & {
|
|
1816
|
-
[K in keyof T as undefined extends T[K] ? NonNullable<T[K]> extends Array<unknown> ? T[K] extends null | undefined ? never : `${Extract<K, string>}Indices` : never : never]?: Record<string, string>;
|
|
1817
|
-
}>;
|
|
1818
|
-
export type NormalizeValue<T> = T extends null | undefined ? T : NonNullable<T> extends unknown[] | readonly unknown[] ? undefined extends T ? NormalizeArray<NonNullable<T>> | undefined : NormalizeArray<T> : T extends Builtin ? T : NonNullable<T> extends object ? Normalized<T> : T;
|
|
1819
|
-
export type Normalized<T> = T extends null | undefined ? T : T extends Builtin ? T : T extends unknown[] | readonly unknown[] ? NormalizeArray<T> : T extends object ? NormalizeObject<T> : T;
|
|
1820
|
-
export type NormalizedBasicShapeObject = Normalized<BasicShapeSerializedObject>;
|
|
1821
|
-
export type NormalizedBoard = NormalizedStandardBoard | NormalizedFloatingBoard;
|
|
1822
|
-
export type NormalizedCombinedShapeObject = Normalized<CombinedShapeSerializedObject>;
|
|
1823
|
-
export type NormalizedDesignState = {
|
|
1824
|
-
boards: Record<ID, NormalizedBoard>;
|
|
1825
|
-
boardsIndices: Record<ID, string>;
|
|
1826
|
-
objects: Record<ID, NormalizedObject>;
|
|
1827
|
-
groupStructures: Record<ID, DesignStructureObject>;
|
|
1828
|
-
groupStructuresIndices: Record<ID, string>;
|
|
1829
|
-
config: DesignConfig;
|
|
1830
|
-
};
|
|
1831
|
-
export type NormalizedFloatingBoard = Normalized<BaseFloatingBoard>;
|
|
1832
|
-
export type NormalizedGuideObject = Normalized<GuideSerializedObject>;
|
|
1833
|
-
export type NormalizedIllustrationImageObject = Normalized<IllustrationImageSerializedObject>;
|
|
1834
|
-
export type NormalizedIllustrationObject = Normalized<IllustrationSerializedObject>;
|
|
1835
|
-
export type NormalizedLoadingCardObject = Normalized<LoadingCardSerializedObject>;
|
|
1836
|
-
export type NormalizedMaskObject = Normalized<MaskSerializedObject>;
|
|
1837
|
-
export type NormalizedMockupDesignObject = Normalized<MockupDesignSerializedObject>;
|
|
1838
|
-
export type NormalizedObject = NormalizedStandardObject | NormalizedGuideObject;
|
|
1839
|
-
export type NormalizedPathTextObject = Normalized<PathTextSerializedObject>;
|
|
1840
|
-
export type NormalizedRichTextObject = Normalized<RichTextSerializedObject>;
|
|
1841
|
-
export type NormalizedStandardBoard<T extends ArtboardOptions = ArtboardOptions> = Normalized<BaseStandardBoard<T>>;
|
|
1842
|
-
export type NormalizedStandardObject = NormalizedBasicShapeObject | NormalizedCombinedShapeObject | NormalizedIllustrationImageObject | NormalizedIllustrationObject | NormalizedLoadingCardObject | NormalizedMaskObject | NormalizedMockupDesignObject | NormalizedPathTextObject | NormalizedRichTextObject | NormalizedVideoObject;
|
|
1843
|
-
export type NormalizedVideoObject = Normalized<VideoSerializedObject>;
|
|
1844
|
-
export type NullablePathTextShadowOptions = PathTextShadowOptions | {
|
|
1845
|
-
type: null;
|
|
1846
|
-
};
|
|
1847
|
-
export type OnGenerationStatusUpdate = (update: GenerationStatusUpdate) => void | Promise<void>;
|
|
1848
|
-
export type OrAnyString<T extends string> = T | (string & {});
|
|
1849
|
-
export type OrientationConditional = {
|
|
1850
|
-
orientation: Orientation.HORIZONTAL;
|
|
1851
|
-
top: number;
|
|
1852
|
-
} | {
|
|
1853
|
-
orientation: Orientation.VERTICAL;
|
|
1854
|
-
left: number;
|
|
1855
|
-
};
|
|
1856
|
-
export type OrientationDir = {
|
|
1857
|
-
orientation: Orientation.HORIZONTAL;
|
|
1858
|
-
top: number;
|
|
1859
|
-
} | {
|
|
1860
|
-
orientation: Orientation.VERTICAL;
|
|
1861
|
-
left: number;
|
|
1862
|
-
};
|
|
1863
|
-
export type OriginX = "left" | "center" | "right";
|
|
1864
|
-
export type OriginY = "top" | "center" | "bottom";
|
|
1865
|
-
export type PatchAction<T> = {
|
|
1866
|
-
action: Action.MERGE;
|
|
1867
|
-
value: DeepPartial<T>;
|
|
1868
|
-
} | {
|
|
1869
|
-
action: Action.SET;
|
|
1870
|
-
value: T;
|
|
1871
|
-
} | {
|
|
1872
|
-
action: Action.DELETE;
|
|
1873
|
-
};
|
|
1874
|
-
export type PatchTree<S> = {
|
|
1875
|
-
[K in keyof S]?: NonNullable<S[K]> extends object ? PatchAction<DeepPartial<S[K]>> | PatchTree<NonNullable<DeepPartial<S[K]>>> : PatchAction<DeepPartial<S[K]>>;
|
|
1876
|
-
};
|
|
1877
|
-
export type PathTextSerializedObject = typeof PATH_TEXT_DEFAULT_VALUES & {
|
|
1878
|
-
relativeSize?: number | undefined;
|
|
1879
|
-
overrideText?: string | undefined;
|
|
1880
|
-
transformOptions: PathTextTransformOptions;
|
|
1881
|
-
fontFamily?: string | undefined;
|
|
1882
|
-
fontWeight?: string | undefined;
|
|
1883
|
-
text: string;
|
|
1884
|
-
shadowOptions: NullablePathTextShadowOptions;
|
|
1885
|
-
adjustableWidth?: number | undefined;
|
|
1886
|
-
uppercase?: boolean | undefined;
|
|
1887
|
-
underline?: boolean | undefined;
|
|
1888
|
-
variation?: Record<string, number> | undefined;
|
|
1889
|
-
variationAxes?: Record<string, FontVariation> | undefined;
|
|
1890
|
-
decorationOptions?: DecorationOptions | undefined;
|
|
1891
|
-
isUserFont?: boolean | undefined;
|
|
1892
|
-
};
|
|
1893
|
-
export type PathTextShadowOptions = ShadingOptions & ShadowOptions & {
|
|
1894
|
-
color: string;
|
|
1895
|
-
};
|
|
1896
|
-
export type PathTextTransformOptions = TransformOptions & {
|
|
1897
|
-
points: {
|
|
1898
|
-
x: number;
|
|
1899
|
-
y: number;
|
|
1900
|
-
}[];
|
|
1901
|
-
};
|
|
1902
|
-
export type PrintMargins = {
|
|
1903
|
-
enabled: boolean;
|
|
1904
|
-
top: number;
|
|
1905
|
-
right: number;
|
|
1906
|
-
bottom: number;
|
|
1907
|
-
left: number;
|
|
1908
|
-
};
|
|
1909
|
-
export type RelativePosition = {
|
|
1910
|
-
relative: RelativeToObject | RelativeToViewport | RelativeToScreen;
|
|
1911
|
-
};
|
|
1912
|
-
export type RelativeToObject = {
|
|
1913
|
-
to: Exclude<string, "viewport">;
|
|
1914
|
-
location: ElementLocation;
|
|
1915
|
-
offset?: LeftTopPosition;
|
|
1916
|
-
};
|
|
1917
|
-
export type RelativeToScreen = {
|
|
1918
|
-
to: "screen";
|
|
1919
|
-
coordinates: ScreenCoordinates;
|
|
1920
|
-
offset?: LeftTopPosition;
|
|
1921
|
-
};
|
|
1922
|
-
export type RelativeToViewport = {
|
|
1923
|
-
to: "viewport";
|
|
1924
|
-
location: ElementLocation;
|
|
1925
|
-
offset?: LeftTopPosition;
|
|
1926
|
-
};
|
|
1927
|
-
export type ReleaseTextureParams = {
|
|
1928
|
-
boardId: string;
|
|
1929
|
-
};
|
|
1930
|
-
export type RemoveFromGroupParams = {
|
|
1931
|
-
objectIds: string[];
|
|
1932
|
-
};
|
|
1933
|
-
export type RemoveGroupParams = {
|
|
1934
|
-
groupId: string;
|
|
1935
|
-
};
|
|
1936
|
-
export type RemovePlaylistItemParams = {
|
|
1937
|
-
videoBoardId: string;
|
|
1938
|
-
playlistItemId: string;
|
|
1939
|
-
};
|
|
1940
|
-
export type RemoveTextureParams = {
|
|
1941
|
-
boardId: string;
|
|
1942
|
-
};
|
|
1943
|
-
export type RemoveVideoPlaylistItemParams = {
|
|
1944
|
-
videoId: string;
|
|
1945
|
-
playlistItemId: string;
|
|
1946
|
-
};
|
|
1947
|
-
export type RenameParams = {
|
|
1948
|
-
objectId: string;
|
|
1949
|
-
newName: string;
|
|
1950
|
-
};
|
|
1951
|
-
export type ResetImageBackgroundRemovalParams = {
|
|
1952
|
-
id: IllustrationImageSerializedObject["id"];
|
|
1953
|
-
};
|
|
1954
|
-
export type ResetImageCropParams = {
|
|
1955
|
-
id: IllustrationImageSerializedObject["id"];
|
|
1956
|
-
};
|
|
1957
|
-
export type ResultType = (typeof ResultType)[keyof typeof ResultType];
|
|
1958
|
-
export type RichTextBasePluginSerializedObject = {
|
|
1959
|
-
id: string;
|
|
1960
|
-
name: string;
|
|
1961
|
-
version: string;
|
|
1962
|
-
};
|
|
1963
|
-
export type RichTextCompressedColor = string | GradientObject | null;
|
|
1964
|
-
export type RichTextCompressedStyles = RichTextCompressedStylesV1 | RichTextCompressedStylesV2;
|
|
1965
|
-
export type RichTextDecorationPluginSerializedObject = RichTextBasePluginSerializedObject & {
|
|
1966
|
-
fillStyle: string;
|
|
1967
|
-
[key: string]: string | number;
|
|
1968
|
-
};
|
|
1969
|
-
export type RichTextHyperlinkSerializedObject = {
|
|
1970
|
-
id: string;
|
|
1971
|
-
url: string;
|
|
1972
|
-
};
|
|
1973
|
-
export type RichTextRenderPluginSerializedObject = RichTextBasePluginSerializedObject & {
|
|
1974
|
-
color: string;
|
|
1975
|
-
angle: number;
|
|
1976
|
-
offset: number;
|
|
1977
|
-
[key: string]: string | number;
|
|
1978
|
-
};
|
|
1979
|
-
export type RichTextResizeBehavior = "hug" | "none" | "hug-height";
|
|
1980
|
-
export type RichTextSerializedCharacterStyle = Partial<{
|
|
1981
|
-
fontFamily: string;
|
|
1982
|
-
fontWeight: FontWeight;
|
|
1983
|
-
fontSize: number;
|
|
1984
|
-
fill: RichTextCompressedColor;
|
|
1985
|
-
underline: boolean;
|
|
1986
|
-
linethrough: boolean;
|
|
1987
|
-
charSpacing: number;
|
|
1988
|
-
textCase: TextCase;
|
|
1989
|
-
lineHeightValue: LineHeight;
|
|
1990
|
-
hyperlinkId: string | null;
|
|
1991
|
-
preLinkFill: RichTextCompressedColor;
|
|
1992
|
-
fontVariationSettings: FontVariationSettings;
|
|
1993
|
-
fontFeatureSettings: Record<string, boolean | number>;
|
|
1994
|
-
}>;
|
|
1995
|
-
export type RichTextSerializedObject = typeof RICH_TEXT_DEFAULT_VALUES & {
|
|
1996
|
-
text: string;
|
|
1997
|
-
fontFamily: string;
|
|
1998
|
-
styles?: RichTextCompressedStyles;
|
|
1999
|
-
activeRenderPlugins?: RichTextRenderPluginSerializedObject[];
|
|
2000
|
-
activeDecorationPlugins?: RichTextDecorationPluginSerializedObject[];
|
|
2001
|
-
activeTransformPlugin?: RichTextSerializedTransformPluginObject;
|
|
2002
|
-
fontSize?: number;
|
|
2003
|
-
fontWeight?: FontWeight;
|
|
2004
|
-
textAlign?: TextAlign;
|
|
2005
|
-
charSpacing?: number;
|
|
2006
|
-
underline?: boolean;
|
|
2007
|
-
linethrough?: boolean;
|
|
2008
|
-
fontVariationSettings?: FontVariationSettings;
|
|
2009
|
-
textCase?: TextCase;
|
|
2010
|
-
lineHeightValue?: LineHeight;
|
|
2011
|
-
untransformedWidth?: number;
|
|
2012
|
-
widthBeforeTransform?: number;
|
|
2013
|
-
resizeBehavior?: RichTextResizeBehavior;
|
|
2014
|
-
hyperlinkId?: string;
|
|
2015
|
-
preLinkFill?: string | GradientObject | null;
|
|
2016
|
-
fontFeatureSettings?: Record<string, boolean | number>;
|
|
2017
|
-
links?: RichTextHyperlinkSerializedObject[];
|
|
2018
|
-
volatileData?: {
|
|
2019
|
-
top: number;
|
|
2020
|
-
left: number;
|
|
2021
|
-
width: number;
|
|
2022
|
-
height: number;
|
|
2023
|
-
activeTransformPlugin: RichTextSerializedTransformPluginObject;
|
|
2024
|
-
key: string;
|
|
2025
|
-
};
|
|
2026
|
-
};
|
|
2027
|
-
export type RichTextSerializedTransformPluginObject = RichTextBasePluginSerializedObject & {
|
|
2028
|
-
type?: string;
|
|
2029
|
-
points: {
|
|
2030
|
-
x: number;
|
|
2031
|
-
y: number;
|
|
2032
|
-
}[];
|
|
2033
|
-
curveHeight?: number;
|
|
2034
|
-
directionInverted?: boolean;
|
|
2035
|
-
};
|
|
2036
|
-
export type ScreenCoordinates = {
|
|
2037
|
-
x: number;
|
|
2038
|
-
y: number;
|
|
2039
|
-
};
|
|
2040
|
-
export type SdkError = SdkBadInputError | SdkInternalError;
|
|
2041
|
-
export type SdkResponse<T> = {
|
|
2042
|
-
isOk: true;
|
|
2043
|
-
result: T;
|
|
2044
|
-
} | {
|
|
2045
|
-
isOk: false;
|
|
2046
|
-
error: Error;
|
|
2047
|
-
};
|
|
2048
|
-
export type SdkResult<T, E = SdkError> = {
|
|
2049
|
-
isOk: true;
|
|
2050
|
-
result: T;
|
|
2051
|
-
error?: never;
|
|
2052
|
-
} | {
|
|
2053
|
-
isOk: false;
|
|
2054
|
-
result?: never;
|
|
2055
|
-
error: E;
|
|
2056
|
-
};
|
|
2057
|
-
export type SdkResultAsync<T, E = SdkError> = Promise<{
|
|
2058
|
-
isOk: true;
|
|
2059
|
-
result: T;
|
|
2060
|
-
error?: never;
|
|
2061
|
-
} | {
|
|
2062
|
-
isOk: false;
|
|
2063
|
-
result?: never;
|
|
2064
|
-
error: E;
|
|
2065
|
-
}>;
|
|
2066
|
-
export type Selector<T, U = unknown> = (state: T) => U;
|
|
2067
|
-
/**
|
|
2068
|
-
* The design state shape exposed to string path selectors.
|
|
2069
|
-
* `objects` values are flattened so that variant-specific properties
|
|
2070
|
-
* (e.g. `width`, `fill`) are accessible without manual narrowing.
|
|
2071
|
-
*/
|
|
2072
|
-
export type SelectorState = Omit<NormalizedDesignState, "objects"> & {
|
|
2073
|
-
objects: Record<string, FlattenUnion<NormalizedObject>>;
|
|
2074
|
-
};
|
|
2075
|
-
export type SendToParams = {
|
|
2076
|
-
boardOrObjectIds: string[];
|
|
2077
|
-
};
|
|
2078
|
-
export type SequenceLength = number;
|
|
2079
|
-
export type SerialisedPhotoFilter = ({
|
|
2080
|
-
type: ImageFilterType;
|
|
2081
|
-
} & PhotoFilterOptions[ImageFilterType]) | {
|
|
2082
|
-
type: ImageFilterType;
|
|
2083
|
-
};
|
|
2084
|
-
export type SerializableCornerRadii = Record<string, Record<string, number>>;
|
|
2085
|
-
export type SerializableObjectType = ObjectType.IllustrationImage | ObjectType.Illustration | ObjectType.Artboard | ObjectType.Smartboard | ObjectType.Videoboard | ObjectType.MockupBoard | ObjectType.PathText | ObjectType.RichText | ObjectType.MockupDesign | ObjectType.OverlayTexture | ObjectType.Mask | ObjectType.BasicShape | ObjectType.VectorPath | ObjectType.Guide | ObjectType.CombinedShape | ObjectType.LoadingCard | ObjectType.Video;
|
|
2086
|
-
export type SerializedObject = StandardSerializedObject | GuideSerializedObject;
|
|
2087
|
-
export type SetTextureParams = {
|
|
2088
|
-
boardId: string;
|
|
2089
|
-
texture: string;
|
|
2090
|
-
options?: Partial<TextureOptions>;
|
|
2091
|
-
};
|
|
2092
|
-
export type SetVideoOnVideoboardParams = {
|
|
2093
|
-
videoBoardId: string;
|
|
2094
|
-
video: {
|
|
2095
|
-
width?: number;
|
|
2096
|
-
height?: number;
|
|
2097
|
-
playlist: Omit<VideoPlaylistItem, "id">[];
|
|
2098
|
-
};
|
|
2099
|
-
} & Pick<VideoboardOptions, "generationSettings">;
|
|
2100
|
-
export type ShadingOptions = AvailableShadowOptions & {
|
|
2101
|
-
type: "drop" | "line" | "block" | "detail";
|
|
2102
|
-
outlineWidth?: number;
|
|
2103
|
-
borderColor?: string | null;
|
|
2104
|
-
};
|
|
2105
|
-
export type Shape = {
|
|
2106
|
-
groupId?: string;
|
|
2107
|
-
} & (BasicShapeSerializedObject | CombinedShapeSerializedObject | IllustrationSerializedObject | PathTextSerializedObject | RichTextSerializedObject);
|
|
2108
|
-
export type ShapeBooleanOperation = "unite" | "subtract" | "intersect" | "exclude" | "divide";
|
|
2109
|
-
export type ShapeProperties = {
|
|
2110
|
-
angle?: BasicShapeSerializedObject["angle"];
|
|
2111
|
-
flipX?: BasicShapeSerializedObject["flipX"];
|
|
2112
|
-
flipY?: BasicShapeSerializedObject["flipY"];
|
|
2113
|
-
hidden?: BasicShapeSerializedObject["hidden"];
|
|
2114
|
-
opacity?: BasicShapeSerializedObject["opacity"];
|
|
2115
|
-
skewX?: BasicShapeSerializedObject["skewX"];
|
|
2116
|
-
skewY?: BasicShapeSerializedObject["skewY"];
|
|
2117
|
-
cornerRadii?: BasicShapeSerializedObject["cornerRadii"];
|
|
2118
|
-
name?: BasicShapeSerializedObject["name"];
|
|
2119
|
-
shadowOptions?: BasicShapeSerializedObject["shadowOptions"];
|
|
2120
|
-
fill?: NonNullable<BasicShapeSerializedObject["fill"]>;
|
|
2121
|
-
fillColor?: NonNullable<BasicShapeSerializedObject["fill"]>[number]["value"];
|
|
2122
|
-
stroke?: NonNullable<BasicShapeSerializedObject["stroke"]>;
|
|
2123
|
-
strokeWidth?: NonNullable<BasicShapeSerializedObject["strokeWidth"]>;
|
|
2124
|
-
};
|
|
2125
|
-
export type SmartboardAction = SmartboardActionWithAiPrompt | SmartboardActionInitial;
|
|
2126
|
-
export type SmartboardActionInitial = {
|
|
2127
|
-
type: "noAction";
|
|
2128
|
-
aspectRatio?: SmartboardAspectRatio;
|
|
2129
|
-
modelId?: string;
|
|
2130
|
-
};
|
|
2131
|
-
export type SmartboardActionWithAiPrompt = {
|
|
2132
|
-
type: "aiPrompt";
|
|
2133
|
-
prompt: string;
|
|
2134
|
-
quality?: SmartboardQuality;
|
|
2135
|
-
aspectRatio?: SmartboardAspectRatio;
|
|
2136
|
-
transparentBackground?: boolean;
|
|
2137
|
-
background?: SmartboardBackground;
|
|
2138
|
-
modelId?: string;
|
|
2139
|
-
averageSpeed?: number;
|
|
2140
|
-
generatedContent?: SmartboardGeneratedContent;
|
|
2141
|
-
};
|
|
2142
|
-
export type SmartboardAspectRatio = string;
|
|
2143
|
-
export type SmartboardBackground = "transparent" | "opaque";
|
|
2144
|
-
export type SmartboardGeneratedContent = {
|
|
2145
|
-
id: string;
|
|
2146
|
-
status: "STARTED" | "COMPLETE" | "FAILED";
|
|
2147
|
-
objectName?: string;
|
|
2148
|
-
startedAt?: number;
|
|
2149
|
-
};
|
|
2150
|
-
export type SmartboardGenerationSettings = Record<string, unknown>;
|
|
2151
|
-
export type SmartboardOptions = ConnectedArtboardOptions<ObjectType.Smartboard> & {
|
|
2152
|
-
action?: SmartboardAction;
|
|
2153
|
-
} & GeneratableBoard<SmartboardGenerationSettings>;
|
|
2154
|
-
export type SmartboardQuality = "auto" | "high" | "medium" | "low";
|
|
2155
|
-
export type StandardSerializedObject = BasicShapeSerializedObject | CombinedShapeSerializedObject | IllustrationImageSerializedObject | IllustrationSerializedObject | LoadingCardSerializedObject | MaskSerializedObject | MockupDesignSerializedObject | PathTextSerializedObject | RichTextSerializedObject | VideoSerializedObject;
|
|
2156
|
-
export type StartedGenerationResult = VideoGenerationStartedResult | ImageGenerationStartedResult;
|
|
2157
|
-
export type StateGradientInfo = {
|
|
2158
|
-
[key: string]: GradientInfo;
|
|
2159
|
-
};
|
|
2160
|
-
export type StringColor = {
|
|
2161
|
-
key: StringColorKeysType;
|
|
2162
|
-
value: string | null | undefined;
|
|
2163
|
-
visible: boolean;
|
|
2164
|
-
};
|
|
2165
|
-
export type StringColorKeysType = (typeof stringColorKeys)[number];
|
|
2166
|
-
export type StructureObjectId = string;
|
|
2167
|
-
export type SuccessGenerationResult = VideoGenerationResult | ImageGenerationResult;
|
|
2168
|
-
export type TempUserImageUpload = {
|
|
2169
|
-
objectId: string;
|
|
2170
|
-
mimeType: string;
|
|
2171
|
-
};
|
|
2172
|
-
export type TextAlign = "left" | "center" | "right" | "justify" | "justify-left" | "justify-center" | "justify-right" | "justify-legacy";
|
|
2173
|
-
export type TextCase = "none" | "uppercase";
|
|
2174
|
-
export type TextProperties = {
|
|
2175
|
-
fontFamily?: string;
|
|
2176
|
-
fontSize?: number;
|
|
2177
|
-
fontWeight?: string;
|
|
2178
|
-
fontVariationSettings?: FontVariationSettings;
|
|
2179
|
-
fill?: Color;
|
|
2180
|
-
textAlign?: TextAlign;
|
|
2181
|
-
lineHeightValue?: LineHeight;
|
|
2182
|
-
resizeBehavior?: "none" | "hug" | "hug-height";
|
|
2183
|
-
charSpacing?: number;
|
|
2184
|
-
underline?: boolean;
|
|
2185
|
-
overline?: boolean;
|
|
2186
|
-
linethrough?: boolean;
|
|
2187
|
-
angle?: number;
|
|
2188
|
-
scaleX?: number;
|
|
2189
|
-
scaleY?: number;
|
|
2190
|
-
stroke?: string | null;
|
|
2191
|
-
strokeWidth?: number;
|
|
2192
|
-
};
|
|
2193
|
-
export type TransactionMeta = {
|
|
2194
|
-
isLocal: boolean;
|
|
2195
|
-
isUndoRedo: boolean;
|
|
2196
|
-
};
|
|
2197
|
-
/**
|
|
2198
|
-
* Collapses a union type into a single object type where:
|
|
2199
|
-
* - Properties shared by all members keep their original type.
|
|
2200
|
-
* - Properties that exist only on some members become optional.
|
|
2201
|
-
*/
|
|
2202
|
-
export type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
2203
|
-
export type UpdateArtboardBackgroundParams = {
|
|
2204
|
-
id: string;
|
|
2205
|
-
objectName: string;
|
|
2206
|
-
};
|
|
2207
|
-
export type UpdateArtboardParams = {
|
|
2208
|
-
id: string;
|
|
2209
|
-
artboard?: Partial<ArtboardOptions>;
|
|
2210
|
-
title?: string;
|
|
2211
|
-
texture?: TextureOptions;
|
|
2212
|
-
backgroundImage?: BackgroundImageOptions;
|
|
2213
|
-
};
|
|
2214
|
-
export type UpdateDecorationPluginParams = {
|
|
2215
|
-
textId: string;
|
|
2216
|
-
decorationPluginId: string;
|
|
2217
|
-
decorationPlugin: Partial<Omit<RichTextDecorationPluginSerializedObject, "id">>;
|
|
2218
|
-
};
|
|
2219
|
-
export type UpdateIllustrationParams = {
|
|
2220
|
-
id: string;
|
|
2221
|
-
left?: number;
|
|
2222
|
-
top?: number;
|
|
2223
|
-
width?: number;
|
|
2224
|
-
height?: number;
|
|
2225
|
-
objectName?: string;
|
|
2226
|
-
shadowOptions?: IllustrationSerializedObject["shadowOptions"];
|
|
2227
|
-
shadowColor?: NonNullable<IllustrationSerializedObject["shadowOptions"]>["color"];
|
|
2228
|
-
stroke?: IllustrationSerializedObject["stroke"];
|
|
2229
|
-
strokeWidth?: IllustrationSerializedObject["strokeWidth"];
|
|
2230
|
-
fill?: IllustrationSerializedObject["fill"];
|
|
2231
|
-
};
|
|
2232
|
-
export type UpdateImageParams = {
|
|
2233
|
-
id: IllustrationImageSerializedObject["id"];
|
|
2234
|
-
left?: IllustrationImageSerializedObject["left"];
|
|
2235
|
-
top?: IllustrationImageSerializedObject["top"];
|
|
2236
|
-
width?: IllustrationImageSerializedObject["width"];
|
|
2237
|
-
height?: IllustrationImageSerializedObject["height"];
|
|
2238
|
-
objectName?: IllustrationImageSerializedObject["objectName"];
|
|
2239
|
-
shadowOptions?: IllustrationImageSerializedObject["shadowOptions"];
|
|
2240
|
-
shadowColor?: NonNullable<IllustrationImageSerializedObject["shadowOptions"]>["color"];
|
|
2241
|
-
stroke?: IllustrationImageSerializedObject["stroke"];
|
|
2242
|
-
strokeWidth?: IllustrationImageSerializedObject["strokeWidth"];
|
|
2243
|
-
} & GeneratableObject;
|
|
2244
|
-
export type UpdateImageSourceParams = {
|
|
2245
|
-
id: IllustrationImageSerializedObject["id"];
|
|
2246
|
-
objectName: IllustrationImageSerializedObject["objectName"];
|
|
2247
|
-
keepObjectDimensions?: boolean;
|
|
2248
|
-
flatten?: boolean;
|
|
2249
|
-
};
|
|
2250
|
-
export type UpdateMockupBoardParams = {
|
|
2251
|
-
mockupBoardId: string;
|
|
2252
|
-
size?: Dimensions;
|
|
2253
|
-
mockupTemplateId?: number;
|
|
2254
|
-
shouldMockupColorMatchArtboard?: boolean;
|
|
2255
|
-
};
|
|
2256
|
-
export type UpdatePlaylistItemParams = {
|
|
2257
|
-
videoBoardId: string;
|
|
2258
|
-
playlistItemId: string;
|
|
2259
|
-
playlistItem: Omit<VideoPlaylistItem, "id">;
|
|
2260
|
-
};
|
|
2261
|
-
export type UpdateRenderPluginParams = {
|
|
2262
|
-
textId: string;
|
|
2263
|
-
renderPluginId: string;
|
|
2264
|
-
renderPlugin: Partial<Omit<RichTextRenderPluginSerializedObject, "id">>;
|
|
2265
|
-
};
|
|
2266
|
-
export type UpdateShapeInput = Partial<CreateElementWithPositionAndSize> & BasicShapeConfigurableFields & {
|
|
2267
|
-
id: NormalizedBasicShapeObject["id"];
|
|
2268
|
-
};
|
|
2269
|
-
export type UpdateSmartboardParams = {
|
|
2270
|
-
smartboardId: string;
|
|
2271
|
-
size?: Dimensions;
|
|
2272
|
-
backgroundImage?: Partial<BackgroundImageOptions>;
|
|
2273
|
-
} & Pick<SmartboardOptions, "generationSettings">;
|
|
2274
|
-
export type UpdateTextParams = {
|
|
2275
|
-
textId: string;
|
|
2276
|
-
text?: string;
|
|
2277
|
-
left?: number;
|
|
2278
|
-
top?: number;
|
|
2279
|
-
angle?: number;
|
|
2280
|
-
} & Partial<TextProperties>;
|
|
2281
|
-
export type UpdateTextureParams = {
|
|
2282
|
-
boardId: string;
|
|
2283
|
-
options: Partial<TextureOptions>;
|
|
2284
|
-
};
|
|
2285
|
-
export type UpdateVideoParams = {
|
|
2286
|
-
videoId: string;
|
|
2287
|
-
position?: AbsolutePosition | RelativePosition;
|
|
2288
|
-
size?: Dimensions;
|
|
2289
|
-
shadowOptions?: VideoSerializedObject["shadowOptions"];
|
|
2290
|
-
shadowColor?: NonNullable<VideoSerializedObject["shadowOptions"]>["color"];
|
|
2291
|
-
stroke?: VideoSerializedObject["stroke"];
|
|
2292
|
-
strokeWidth?: VideoSerializedObject["strokeWidth"];
|
|
2293
|
-
};
|
|
2294
|
-
export type UpdateVideoPlaylistItemParams = {
|
|
2295
|
-
videoId: string;
|
|
2296
|
-
playlistItemId: string;
|
|
2297
|
-
playlistItem: Omit<VideoPlaylistItem, "id">;
|
|
2298
|
-
};
|
|
2299
|
-
export type UpdateVideoboardParams = {
|
|
2300
|
-
videoBoardId: string;
|
|
2301
|
-
size?: Dimensions;
|
|
2302
|
-
} & Pick<VideoboardOptions, "generationSettings">;
|
|
2303
|
-
export type UploadedFontFamily = {
|
|
2304
|
-
id: string;
|
|
2305
|
-
name: string;
|
|
2306
|
-
fonts: UploadedFontStyle[];
|
|
2307
|
-
workspaceId?: string;
|
|
2308
|
-
preview?: string;
|
|
2309
|
-
extension?: {
|
|
2310
|
-
id: string;
|
|
2311
|
-
name?: string;
|
|
2312
|
-
};
|
|
2313
|
-
};
|
|
2314
|
-
export type UploadedFontStyle = {
|
|
2315
|
-
name: string;
|
|
2316
|
-
id: string;
|
|
2317
|
-
style: string | null;
|
|
2318
|
-
objectName: string;
|
|
2319
|
-
};
|
|
2320
|
-
export type UserImageUpload = {
|
|
2321
|
-
id: string;
|
|
2322
|
-
objectName: string;
|
|
2323
|
-
mimeType: string;
|
|
2324
|
-
};
|
|
2325
|
-
export type VideoBoardGenerationSettings = Record<string, unknown>;
|
|
2326
|
-
export type VideoPlaylistItem = {
|
|
2327
|
-
id: string;
|
|
2328
|
-
objectName?: string;
|
|
2329
|
-
meta?: GeneratableObject & {
|
|
2330
|
-
generation?: {
|
|
2331
|
-
isGenerating?: boolean;
|
|
2332
|
-
};
|
|
2333
|
-
};
|
|
2334
|
-
};
|
|
2335
|
-
export type VideoSerializedObject = typeof DEFAULT_VALUES$2 & {
|
|
2336
|
-
playlist: VideoPlaylistItem[];
|
|
2337
|
-
realWidth?: number;
|
|
2338
|
-
realHeight?: number;
|
|
2339
|
-
};
|
|
2340
|
-
export type VideoboardOptions = ConnectedArtboardOptions<ObjectType.Videoboard> & {
|
|
2341
|
-
video?: {
|
|
2342
|
-
width: number;
|
|
2343
|
-
height: number;
|
|
2344
|
-
playlist: VideoPlaylistItem[];
|
|
2345
|
-
};
|
|
2346
|
-
} & GeneratableBoard<VideoBoardGenerationSettings>;
|
|
2347
|
-
export type Viewport = {
|
|
2348
|
-
coords: {
|
|
2349
|
-
tl: {
|
|
2350
|
-
x: number;
|
|
2351
|
-
y: number;
|
|
2352
|
-
};
|
|
2353
|
-
tr: {
|
|
2354
|
-
x: number;
|
|
2355
|
-
y: number;
|
|
2356
|
-
};
|
|
2357
|
-
bl: {
|
|
2358
|
-
x: number;
|
|
2359
|
-
y: number;
|
|
2360
|
-
};
|
|
2361
|
-
br: {
|
|
2362
|
-
x: number;
|
|
2363
|
-
y: number;
|
|
2364
|
-
};
|
|
2365
|
-
};
|
|
2366
|
-
transform: [
|
|
2367
|
-
number,
|
|
2368
|
-
number,
|
|
2369
|
-
number,
|
|
2370
|
-
number,
|
|
2371
|
-
number,
|
|
2372
|
-
number
|
|
2373
|
-
];
|
|
2374
|
-
};
|
|
2375
|
-
export type ViewportAPI = {
|
|
2376
|
-
get(): Viewport;
|
|
2377
|
-
set(patch: ViewportPatch, origin?: Origin): void;
|
|
2378
|
-
getTransform(): Viewport["transform"];
|
|
2379
|
-
setTransform(transform: Viewport["transform"], origin?: Origin): void;
|
|
2380
|
-
getZoom(): number;
|
|
2381
|
-
setZoom(zoom: number, origin?: Origin): void;
|
|
2382
|
-
getCoords(): Viewport["coords"];
|
|
2383
|
-
setCoords(coords: Viewport["coords"], origin?: Origin): void;
|
|
2384
|
-
getPosition(): {
|
|
2385
|
-
x: number;
|
|
2386
|
-
y: number;
|
|
2387
|
-
};
|
|
2388
|
-
setPosition(position: {
|
|
2389
|
-
x: number;
|
|
2390
|
-
y: number;
|
|
2391
|
-
}, origin?: Origin): void;
|
|
2392
|
-
};
|
|
2393
|
-
export type ViewportPatch = {
|
|
2394
|
-
transform: Viewport["transform"];
|
|
2395
|
-
zoom?: never;
|
|
2396
|
-
position?: never;
|
|
2397
|
-
} | {
|
|
2398
|
-
zoom: number;
|
|
2399
|
-
position?: {
|
|
2400
|
-
x: number;
|
|
2401
|
-
y: number;
|
|
2402
|
-
};
|
|
2403
|
-
transform?: never;
|
|
2404
|
-
} | {
|
|
2405
|
-
position: {
|
|
2406
|
-
x: number;
|
|
2407
|
-
y: number;
|
|
2408
|
-
};
|
|
2409
|
-
zoom?: never;
|
|
2410
|
-
transform?: never;
|
|
2411
|
-
};
|
|
2412
|
-
export type WithAsync<T> = {
|
|
2413
|
-
[K in keyof T]: T[K] extends (...args: infer Args) => infer Return ? Return extends Promise<infer U> ? (...args: Args) => Promise<BridgedSdkResult<U>> : (...args: Args) => Promise<BridgedSdkResult<Return>> : T[K] extends object ? T[K] extends FunctionType | Array<unknown> ? T[K] : WithAsync<T[K]> : T[K];
|
|
2414
|
-
};
|
|
2415
|
-
export type WithOptsRemoved<T> = {
|
|
2416
|
-
[K in keyof T]: T[K] extends (...args: infer Args) => infer Return ? Args extends [
|
|
2417
|
-
infer First,
|
|
2418
|
-
...unknown[]
|
|
2419
|
-
] ? (arg: First) => Return : T[K] : T[K] extends object ? WithOptsRemoved<T[K]> : T[K];
|
|
2420
|
-
};
|
|
2421
|
-
|
|
2422
|
-
export as namespace kittl;
|
|
2423
|
-
|
|
2424
|
-
export {};
|