@chaibuilder/sdk 2.1.3 → 2.1.5

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
@@ -88,7 +88,7 @@ export declare interface ChaiBuilderEditorProps {
88
88
  name: string;
89
89
  email: string;
90
90
  avatar?: string;
91
- role: string;
91
+ role?: string;
92
92
  };
93
93
  /**
94
94
  * Permissions
@@ -191,18 +191,9 @@ export declare interface ChaiBuilderEditorProps {
191
191
  */
192
192
  getUILibraryBlock?: (library: ChaiUILibrary, uiLibBlock: ChaiUILibraryBlock) => Promise<ChaiBlock[]>;
193
193
  /**
194
- * Upsert library block
194
+ * Get partial blocks
195
+ * @returns {Record<string, { type: string; name: string; description?: string }>}
195
196
  */
196
- upsertLibraryBlock?: (params: {
197
- id?: string;
198
- description: string;
199
- group: string;
200
- library: string;
201
- name: string;
202
- preview?: string;
203
- }) => Promise<{
204
- id: string;
205
- } | Error>;
206
197
  getPartialBlocks?: () => Promise<Record<string, {
207
198
  type: string;
208
199
  name: string;
@@ -420,6 +411,8 @@ export declare const registerChaiAddBlockTab: (id: string, tab: Omit<AddBlockTab
420
411
 
421
412
  export declare const registerChaiMediaManager: (component: React.ComponentType<MediaManagerProps>) => void;
422
413
 
414
+ export declare const registerChaiSaveToLibrary: (component: ComponentType<SaveToLibraryProps>) => void;
415
+
423
416
  export declare const registerChaiSidebarPanel: (panelId: string, panelOptions: Omit<ChaiSidebarPanel, "id">) => void;
424
417
 
425
418
  export declare const registerChaiTopBar: (component: React.ComponentType) => void;
@@ -430,6 +423,12 @@ declare type SavePageData = {
430
423
  theme?: ChaiBuilderThemeValues;
431
424
  };
432
425
 
426
+ declare type SaveToLibraryProps = {
427
+ blockId: string;
428
+ blocks?: ChaiBlock[];
429
+ close: () => void;
430
+ };
431
+
433
432
  declare interface ThemeConfigProps {
434
433
  className?: string;
435
434
  }