@chaibuilder/sdk 2.1.0 → 2.1.1

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,6 +9,8 @@ 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
+
12
14
  declare type AddBlocks = {
13
15
  addCoreBlock: any;
14
16
  addPredefinedBlock: any;
@@ -38,6 +40,8 @@ declare type Breakpoint = {
38
40
  width: number;
39
41
  };
40
42
 
43
+ export declare const CHAI_BUILDER_PANELS: Record<string, ChaiSidebarPanel<any>>;
44
+
41
45
  export declare const ChaiAddBlocksDialog: () => JSX_2.Element;
42
46
 
43
47
  export declare const ChaiAddBlocksPanel: ({ className, showHeading, parentId, position, }: {
@@ -285,7 +289,7 @@ export declare const ChaiScreenSizes: ({ openDelay, canvas, tooltip, }: {
285
289
  tooltip?: boolean;
286
290
  }) => JSX_2.Element;
287
291
 
288
- declare interface ChaiSidebarPanel<T> {
292
+ export declare interface ChaiSidebarPanel<T> {
289
293
  id: string;
290
294
  position: "top" | "bottom";
291
295
  view?: "standard" | "modal" | "overlay" | "drawer";
@@ -420,6 +424,12 @@ export declare const registerChaiSidebarPanel: <T extends Record<string, any>>(p
420
424
 
421
425
  export declare const registerChaiTopBar: (component: React.ComponentType) => void;
422
426
 
427
+ export declare const RJSF_EXTENSIONS: Record<string, {
428
+ id: string;
429
+ component: React.ComponentType<any>;
430
+ type: string;
431
+ }>;
432
+
423
433
  declare type SavePageData = {
424
434
  autoSave: boolean;
425
435
  blocks: ChaiBlock[];
@@ -454,6 +464,8 @@ export declare const useBlockHighlight: () => {
454
464
  lastHighlighted: HTMLElement;
455
465
  };
456
466
 
467
+ export declare const useBlockSettingComponents: (type: "widget" | "field" | "template") => Record<string, React.ComponentType<any>>;
468
+
457
469
  export declare const useBlocksStore: () => [any[], (args_0: any[] | ((prev: any[]) => any[])) => void];
458
470
 
459
471
  export declare const useBlocksStoreUndoableActions: () => {
@@ -484,6 +496,8 @@ export declare const useCanvasDisplayWidth: () => readonly [number, (args_0: num
484
496
  */
485
497
  export declare const useCanvasZoom: () => [number, (args_0: number | RESET | ((prev: number) => number | RESET)) => void];
486
498
 
499
+ export declare const useChaiSidebarPanels: (position: "top" | "bottom") => any;
500
+
487
501
  /**
488
502
  * Custom hook to access the current state of the code editor.
489
503
  * @category Hooks
@@ -533,6 +547,8 @@ export declare const useLibraryBlocks: (library?: Partial<ChaiUILibrary> & {
533
547
  resetLibrary: () => void;
534
548
  };
535
549
 
550
+ export declare const useMediaManagerComponent: () => ComponentType<MediaManagerProps>;
551
+
536
552
  export declare const usePartailBlocksStore: () => {
537
553
  getPartailBlocks: (partailBlock: string) => any;
538
554
  reset: () => void;
@@ -624,6 +640,8 @@ export declare const useTheme: () => readonly [{
624
640
 
625
641
  export declare const useThemeOptions: () => ChaiBuilderThemeOptions;
626
642
 
643
+ export declare const useTopBarComponent: () => ComponentType< {}>;
644
+
627
645
  export { useTranslation }
628
646
 
629
647
  export declare const useUILibraryBlocks: () => {
package/dist/core.js CHANGED
@@ -12925,6 +12925,8 @@ const RootLayout = () => {
12925
12925
  if (typeof window > "u")
12926
12926
  throw new Error("@chaibuilder/sdk is only supported in the browser. Avoid using it in the server side.");
12927
12927
  export {
12928
+ ADD_BLOCK_TABS,
12929
+ CHAI_BUILDER_PANELS,
12928
12930
  AddBlocksDialog as ChaiAddBlocksDialog,
12929
12931
  AddBlocksPanel as ChaiAddBlocksPanel,
12930
12932
  AISetContext as ChaiAskAiPanel,
@@ -12943,6 +12945,7 @@ export {
12943
12945
  UILibrariesPanel as ChaiUILibrariesPanel,
12944
12946
  UndoRedo as ChaiUndoRedo,
12945
12947
  PERMISSIONS,
12948
+ RJSF_EXTENSIONS,
12946
12949
  getBlocksFromHTML as convertHTMLToChaiBlocks,
12947
12950
  generateUUID as generateBlockId,
12948
12951
  getBlocksFromHTML,
@@ -12959,6 +12962,7 @@ export {
12959
12962
  useAddClassesToBlocks,
12960
12963
  useAskAi,
12961
12964
  useBlockHighlight,
12965
+ useBlockSettingComponents,
12962
12966
  useBlocksStore,
12963
12967
  useBlocksStoreUndoableActions,
12964
12968
  useBrandingOptions,
@@ -12966,6 +12970,7 @@ export {
12966
12970
  useBuilderReset,
12967
12971
  useCanvasDisplayWidth,
12968
12972
  useCanvasZoom,
12973
+ useChaiSidebarPanels,
12969
12974
  useCodeEditor,
12970
12975
  useCopyBlockIds,
12971
12976
  useCopyToClipboard,
@@ -12977,6 +12982,7 @@ export {
12977
12982
  useHighlightBlockId,
12978
12983
  useLanguages,
12979
12984
  useLibraryBlocks,
12985
+ useMediaManagerComponent,
12980
12986
  usePartailBlocksStore,
12981
12987
  usePartialBlocksList,
12982
12988
  usePasteBlocks,
@@ -12999,6 +13005,7 @@ export {
12999
13005
  useStylingState,
13000
13006
  useTheme,
13001
13007
  useThemeOptions,
13008
+ useTopBarComponent,
13002
13009
  We as useTranslation,
13003
13010
  useUILibraryBlocks,
13004
13011
  useUndoManager,
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "author": "Suraj Air",
6
6
  "license": "BSD-3-Clause",
7
7
  "homepage": "https://chaibuilder.com",
8
- "version": "2.1.0",
8
+ "version": "2.1.1",
9
9
  "type": "module",
10
10
  "repository": {
11
11
  "type": "git",