unlayer-types 1.5.48 → 1.5.50

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.
Files changed (2) hide show
  1. package/embed.d.ts +20 -12
  2. package/package.json +1 -1
package/embed.d.ts CHANGED
@@ -183,6 +183,7 @@ declare module "editor/components/editors/types" {
183
183
  } : T;
184
184
  }
185
185
  declare module "state/types/index" {
186
+ import { MutableRefObject, ReactInstance } from 'react';
186
187
  import { InputType } from 'reactstrap/lib/Input';
187
188
  import { State as Design } from '../../state/reducer/design';
188
189
  import { CollaborationThread } from "editor/components/editors/types";
@@ -307,10 +308,19 @@ declare module "state/types/index" {
307
308
  threadId: CollaborationThread['id'] | null;
308
309
  openedPanel?: 'images' | 'content' | 'uploads' | 'audit' | 'blocks';
309
310
  }
311
+ export interface LayerGroup {
312
+ elementRef: MutableRefObject<ReactInstance | undefined> | null | undefined;
313
+ layerCollection: Location['collection'];
314
+ layerIndex?: Placeholder['index'];
315
+ parentCollection: Location['collection'];
316
+ parentId: Location['id'];
317
+ placeholders: Partial<Record<NonNullable<Placeholder['index']>, Placeholder | undefined>>;
318
+ }
310
319
  export interface Placeholder {
311
- active: boolean;
312
- layerGroup: Location | null;
313
- index: number | null;
320
+ elementRef: MutableRefObject<ReactInstance | undefined> | null | undefined;
321
+ active?: boolean;
322
+ index: number | 'first' | 'last' | undefined;
323
+ layerGroupParentLocation: Location | undefined;
314
324
  }
315
325
  export interface Tool {
316
326
  active: boolean;
@@ -915,9 +925,9 @@ declare module "editor/hooks/useImageUploader" {
915
925
  triggerSelectImageCallback: () => void;
916
926
  uploadProgress: number;
917
927
  };
918
- function triggerImageUploadCallback(images: FileList | Array<File | Blob | string>, source: ImageSource, { maxSize, onError, onImageUpload, project, setIsUploading, setUploadProgress, shouldReloadUserUploadsAfterUpload, shouldTriggerReduxOptimisticUpdate, store, userId, }: {
928
+ function triggerImageUploadCallback(images: FileList | Array<File | Blob | string>, source: ImageSource, { maxSize, onErrorOrNull, onImageUpload, project, setIsUploading, setUploadProgress, shouldReloadUserUploadsAfterUpload, shouldTriggerReduxOptimisticUpdate, store, userId, }: {
919
929
  maxSize?: Params['maxSize'];
920
- onError?: (error: Error | null) => void;
930
+ onErrorOrNull?: (error: Error | null) => void;
921
931
  onImageUpload?: Params['onImageUpload'];
922
932
  project: {
923
933
  id?: number;
@@ -929,9 +939,9 @@ declare module "editor/hooks/useImageUploader" {
929
939
  store: Store;
930
940
  userId: string;
931
941
  }): Promise<void>;
932
- function uploadFiles(images: FileList | Array<File | Blob | string>, source: ImageSource, { maxSize, onError, onImageUpload, project, setIsUploading, setUploadProgress, shouldReloadUserUploadsAfterUpload, shouldTriggerReduxOptimisticUpdate, store, userId, }: {
942
+ function uploadFiles(images: FileList | Array<File | Blob | string>, source: ImageSource, { maxSize, onErrorOrNull, onImageUpload, project, setIsUploading, setUploadProgress, shouldReloadUserUploadsAfterUpload, shouldTriggerReduxOptimisticUpdate, store, userId, }: {
933
943
  maxSize?: Params['maxSize'];
934
- onError?: (error: Error | null) => void;
944
+ onErrorOrNull?: (error: Error | null) => void;
935
945
  onImageUpload?: Params['onImageUpload'];
936
946
  project: {
937
947
  id?: number;
@@ -1343,10 +1353,8 @@ declare module "editor/components/editors/pixie/pixie.umd" {
1343
1353
  export = _exports;
1344
1354
  }
1345
1355
  declare module "editor/components/editors/pixie/PixieImageEditor" {
1346
- export default PixieImageEditor;
1347
- class PixieImageEditor extends React.Component<any, any, any> {
1348
- constructor(props: any);
1349
- constructor(props: any, context: any);
1356
+ import { Component } from 'react';
1357
+ class PixieImageEditor extends Component {
1350
1358
  state: {
1351
1359
  loading: boolean;
1352
1360
  saving: boolean;
@@ -1360,7 +1368,7 @@ declare module "editor/components/editors/pixie/PixieImageEditor" {
1360
1368
  render(): JSX.Element;
1361
1369
  b64toBlob: (b64Data: any, contentType: any, sliceSize: any) => Blob;
1362
1370
  }
1363
- import React from "react";
1371
+ export default PixieImageEditor;
1364
1372
  }
1365
1373
  declare module "editor/components/editors/BackgroundImageEditor" {
1366
1374
  import { EditorProps } from "editor/components/editors/types";
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "unlayer-types",
3
- "version": "1.5.48",
3
+ "version": "1.5.50",
4
4
  "license": "MIT"
5
5
  }