@flexbe/sdk 0.2.15 → 0.2.16

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.
@@ -132,19 +132,38 @@ export interface BulkDeleteResponse {
132
132
  deleted: number[];
133
133
  errors: BulkDeleteError[];
134
134
  }
135
+ type HexColor = `#${string}`;
136
+ type RGBColor = `rgb(${string})`;
137
+ type RGBAColor = `rgba(${string})`;
138
+ type HSLColor = `hsl(${string})`;
139
+ type HSLAColor = `hsla(${string})`;
140
+ type CSSLinearGradient = `linear-gradient(${string})`;
141
+ type CSSRadialGradient = `radial-gradient(${string})`;
142
+ type CSSColor = HexColor | RGBColor | RGBAColor | HSLColor | HSLAColor | string;
143
+ type ColorContrast = 'dark' | 'light';
144
+ export interface ImageObj {
145
+ id: number;
146
+ ext: string;
147
+ name?: string;
148
+ average?: string;
149
+ preview?: string;
150
+ width?: number;
151
+ height?: number;
152
+ proportion?: number;
153
+ border?: 'none' | 'transparent' | 'mixed' | string;
154
+ animated?: boolean;
155
+ transparent?: number;
156
+ }
157
+ export interface PageBackgroundStyles {
158
+ backgroundColor: CSSColor | CSSLinearGradient | CSSRadialGradient;
159
+ backgroundFixed: boolean;
160
+ backgroundRepeat: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';
161
+ backgroundPosition: string;
162
+ backgroundSize: 'cover' | 'contain' | 'auto';
163
+ contrast: ColorContrast;
164
+ }
135
165
  export interface PageBackground {
136
- image: {
137
- id: number;
138
- ext: string;
139
- average: string;
140
- preview: string;
141
- width: number;
142
- height: number;
143
- proportion: number;
144
- border: string;
145
- animated: boolean;
146
- transparent: number;
147
- } | null;
166
+ image: ImageObj | null;
148
167
  styles: {
149
168
  backgroundRepeat: string;
150
169
  backgroundPosition: string;
@@ -169,57 +188,50 @@ export interface PageGrid {
169
188
  gap: string;
170
189
  };
171
190
  }
172
- export interface PageFont {
173
- set: Array<{
174
- id: string;
175
- uid: string;
176
- protected: boolean;
177
- title: string;
178
- style: {
179
- fontId: string;
180
- family: string;
181
- weight: number;
182
- size: string;
183
- line_height: number;
184
- letter_spacing: number;
185
- registry: string;
186
- decoration_italic: boolean;
187
- color: string;
188
- contrast: string;
189
- decoration_strike: boolean;
190
- decoration_underline: boolean;
191
- colors: {
192
- enable: boolean;
193
- light: {
194
- color: string;
195
- opacity: number;
196
- contrast: string;
197
- };
198
- dark: {
199
- color: string;
200
- opacity: number;
201
- contrast: string;
202
- };
203
- };
204
- };
205
- mobile: {
206
- weight: string;
207
- size: string;
208
- line_height: number;
209
- letter_spacing: string;
210
- fontId: string;
211
- family: string;
212
- registry: string;
213
- decoration_italic: string;
214
- decoration_strike: string;
215
- decoration_underline: string;
216
- colors: {
217
- light: string;
218
- dark: string;
219
- };
220
- };
221
- subsets: string[];
222
- }>;
191
+ export interface TextStyleItem {
192
+ uid: string;
193
+ id: string;
194
+ title: string;
195
+ protected?: boolean;
196
+ source?: 'project' | 'page';
197
+ style: TextStyleProperties;
198
+ mobile?: Pick<TextStyleProperties, 'size' | 'weight' | 'line_height' | 'letter_spacing'>;
199
+ }
200
+ export interface TextStyleProperties {
201
+ fontId?: string;
202
+ family?: string;
203
+ size: 'inherit' | number | string;
204
+ weight: 'inherit' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
205
+ line_height: 'inherit' | number;
206
+ letter_spacing: 'inherit' | number | string;
207
+ registry?: 'inherit' | 'none' | 'capitalize' | 'uppercase' | 'lowercase';
208
+ decoration_italic?: 'inherit' | 'italic' | 'normal' | false;
209
+ color?: 'auto' | CSSColor;
210
+ contrast?: 'light' | 'dark';
211
+ }
212
+ export interface FontFamilyItem {
213
+ id?: string;
214
+ name: string;
215
+ source: 'user' | 'google' | 'system';
216
+ subsets?: string[];
217
+ variants: FontVariant[];
218
+ }
219
+ export type UploadedFont = {
220
+ id: string;
221
+ name: string;
222
+ variants?: FontVariant[];
223
+ };
224
+ export interface FontVariant {
225
+ fileName?: string;
226
+ fileExt?: string;
227
+ format?: string;
228
+ weight: number;
229
+ style: 'normal' | 'italic';
230
+ }
231
+ export interface StylesDataRaw {
232
+ uploadedFonts?: UploadedFont[];
233
+ siteTextStyles: TextStyleItem[];
234
+ pageTextStyles?: TextStyleItem[];
223
235
  }
224
236
  export interface PageBlock {
225
237
  update_time: number;
@@ -266,17 +278,7 @@ export interface PageModal {
266
278
  template_id: string;
267
279
  mod_id: string;
268
280
  p_id: number;
269
- screenshot: {
270
- id: number;
271
- ext: string;
272
- average: string;
273
- preview: string;
274
- width: number;
275
- height: number;
276
- proportion: number;
277
- animated: boolean;
278
- transparent: number;
279
- };
281
+ screenshot: ImageObj | null;
280
282
  }
281
283
  export interface PageContent {
282
284
  blocks: PageBlock[];
@@ -285,7 +287,12 @@ export interface PageContent {
285
287
  widgets: PageWidget[];
286
288
  codes: string[];
287
289
  background: PageBackground;
288
- fonts: PageFont;
290
+ textStyles: TextStyleItem[];
289
291
  abtests: PageABTest[];
290
292
  responsive: string | boolean;
293
+ assets: {
294
+ images: number[];
295
+ files: string[];
296
+ };
291
297
  }
298
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexbe/sdk",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "description": "TypeScript SDK for Flexbe API",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",