@chaibuilder/sdk 2.1.1 → 2.1.2

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
@@ -9,8 +9,6 @@ import { RESET } from 'jotai/utils';
9
9
  import { ThrottledFunction } from '@react-hookz/web';
10
10
  import { useTranslation } from 'react-i18next';
11
11
 
12
- export declare const ADD_BLOCK_TABS: Record<string, AddBlockTab>;
13
-
14
12
  declare type AddBlocks = {
15
13
  addCoreBlock: any;
16
14
  addPredefinedBlock: any;
@@ -40,8 +38,6 @@ declare type Breakpoint = {
40
38
  width: number;
41
39
  };
42
40
 
43
- export declare const CHAI_BUILDER_PANELS: Record<string, ChaiSidebarPanel<any>>;
44
-
45
41
  export declare const ChaiAddBlocksDialog: () => JSX_2.Element;
46
42
 
47
43
  export declare const ChaiAddBlocksPanel: ({ className, showHeading, parentId, position, }: {
@@ -289,14 +285,18 @@ export declare const ChaiScreenSizes: ({ openDelay, canvas, tooltip, }: {
289
285
  tooltip?: boolean;
290
286
  }) => JSX_2.Element;
291
287
 
292
- export declare interface ChaiSidebarPanel<T> {
288
+ export declare interface ChaiSidebarPanel {
293
289
  id: string;
294
290
  position: "top" | "bottom";
295
291
  view?: "standard" | "modal" | "overlay" | "drawer";
296
- icon: React.ReactNode;
292
+ button: React.ComponentType<{
293
+ isActive: boolean;
294
+ show: () => void;
295
+ panelId: string;
296
+ position: "top" | "bottom";
297
+ }>;
297
298
  label: string;
298
- component: ComponentType;
299
- showIf?: (params: T) => boolean;
299
+ panel?: ComponentType;
300
300
  width?: number;
301
301
  isInternal?: boolean;
302
302
  }
@@ -420,16 +420,10 @@ export declare const registerChaiAddBlockTab: (id: string, tab: Omit<AddBlockTab
420
420
 
421
421
  export declare const registerChaiMediaManager: (component: React.ComponentType<MediaManagerProps>) => void;
422
422
 
423
- export declare const registerChaiSidebarPanel: <T extends Record<string, any>>(panelId: string, panelOptions: Omit<ChaiSidebarPanel<T>, "id">) => void;
423
+ export declare const registerChaiSidebarPanel: (panelId: string, panelOptions: Omit<ChaiSidebarPanel, "id">) => void;
424
424
 
425
425
  export declare const registerChaiTopBar: (component: React.ComponentType) => void;
426
426
 
427
- export declare const RJSF_EXTENSIONS: Record<string, {
428
- id: string;
429
- component: React.ComponentType<any>;
430
- type: string;
431
- }>;
432
-
433
427
  declare type SavePageData = {
434
428
  autoSave: boolean;
435
429
  blocks: ChaiBlock[];
@@ -464,8 +458,6 @@ export declare const useBlockHighlight: () => {
464
458
  lastHighlighted: HTMLElement;
465
459
  };
466
460
 
467
- export declare const useBlockSettingComponents: (type: "widget" | "field" | "template") => Record<string, React.ComponentType<any>>;
468
-
469
461
  export declare const useBlocksStore: () => [any[], (args_0: any[] | ((prev: any[]) => any[])) => void];
470
462
 
471
463
  export declare const useBlocksStoreUndoableActions: () => {
@@ -496,8 +488,6 @@ export declare const useCanvasDisplayWidth: () => readonly [number, (args_0: num
496
488
  */
497
489
  export declare const useCanvasZoom: () => [number, (args_0: number | RESET | ((prev: number) => number | RESET)) => void];
498
490
 
499
- export declare const useChaiSidebarPanels: (position: "top" | "bottom") => any;
500
-
501
491
  /**
502
492
  * Custom hook to access the current state of the code editor.
503
493
  * @category Hooks
@@ -640,8 +630,6 @@ export declare const useTheme: () => readonly [{
640
630
 
641
631
  export declare const useThemeOptions: () => ChaiBuilderThemeOptions;
642
632
 
643
- export declare const useTopBarComponent: () => ComponentType< {}>;
644
-
645
633
  export { useTranslation }
646
634
 
647
635
  export declare const useUILibraryBlocks: () => {