@chaibuilder/sdk 2.2.18 → 2.2.19

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/core.d.ts CHANGED
@@ -250,6 +250,16 @@ export declare interface ChaiBuilderEditorProps {
250
250
  * Search page type items
251
251
  */
252
252
  searchPageTypeItems?: (pageTypeKey: string, query: string) => Promise<PageTypeItem[] | Error>;
253
+ /**
254
+ * Collections
255
+ */
256
+ collections?: ChaiCollectoin[];
257
+ /**
258
+ * Get Block Async Props
259
+ */
260
+ getBlockAsyncProps?: (block: ChaiBlock) => Promise<{
261
+ [key: string]: any;
262
+ }>;
253
263
  }
254
264
 
255
265
  declare type ChaiBuilderThemeOptions = {
@@ -261,6 +271,14 @@ declare type ChaiBuilderThemeOptions = {
261
271
  }[];
262
272
  };
263
273
 
274
+ declare type ChaiCollectoin = {
275
+ id: string;
276
+ name: string;
277
+ description?: string;
278
+ filters?: FilterOptions[];
279
+ sorts?: SortOptions[];
280
+ };
281
+
264
282
  export declare function ChaiDarkModeSwitcher(): JSX_2.Element;
265
283
 
266
284
  export declare const ChaiDefaultBlocks: ({ parentId, position, gridCols, }: {
@@ -375,6 +393,12 @@ declare type CopyFn = (text: string) => Promise<boolean>;
375
393
 
376
394
  declare type ExcludedBuilderProps = "blocks" | "subPages" | "brandingOptions" | "dataProviders";
377
395
 
396
+ declare type FilterOptions = {
397
+ id: string;
398
+ name: string;
399
+ description?: string;
400
+ };
401
+
378
402
  /**
379
403
  * Get the unique uuid
380
404
  */
@@ -466,6 +490,12 @@ declare type SaveToLibraryProps = {
466
490
  close: () => void;
467
491
  };
468
492
 
493
+ declare type SortOptions = {
494
+ id: string;
495
+ name: string;
496
+ description?: string;
497
+ };
498
+
469
499
  declare interface ThemeConfigProps {
470
500
  className?: string;
471
501
  }
@@ -728,12 +758,12 @@ export declare const useUILibraryBlocks: () => {
728
758
  };
729
759
 
730
760
  export declare const useUndoManager: () => {
731
- add: any;
732
- undo: any;
733
- redo: any;
734
- hasRedo: any;
735
- hasUndo: any;
736
- clear: any;
761
+ add: (action: any) => void;
762
+ undo: () => void;
763
+ redo: () => void;
764
+ hasUndo: () => boolean;
765
+ hasRedo: () => boolean;
766
+ clear: () => void;
737
767
  };
738
768
 
739
769
  /**