@chaibuilder/sdk 2.0.0-beta.107 → 2.0.0-beta.109
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/README.md +2 -0
- package/dist/core.cjs +5 -5
- package/dist/core.d.ts +26 -25
- package/dist/core.js +1290 -1094
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +213 -178
- package/package.json +1 -1
package/dist/core.d.ts
CHANGED
|
@@ -187,17 +187,15 @@ export declare interface ChaiBuilderEditorProps {
|
|
|
187
187
|
getUILibraryBlocks?: (library: UILibrary) => Promise<UiLibraryBlock[]>;
|
|
188
188
|
getUILibraryBlock?: (library: UILibrary, uiLibBlock: UiLibraryBlock) => Promise<ChaiBlock[]>;
|
|
189
189
|
getBlockAsyncProps?: (block: ChaiBlock) => Promise<string>;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
getGlobalBlocks?: () => Promise<Record<string, {
|
|
194
|
-
name?: string;
|
|
190
|
+
getPartialBlocks?: () => Promise<Record<string, {
|
|
191
|
+
type: string;
|
|
192
|
+
name: string;
|
|
195
193
|
description?: string;
|
|
196
194
|
}>>;
|
|
197
195
|
/**
|
|
198
|
-
* Get all blocks of a
|
|
196
|
+
* Get all blocks of a partial block
|
|
199
197
|
*/
|
|
200
|
-
|
|
198
|
+
getPartialBlockBlocks?: (partialBlockKey: string) => Promise<ChaiBlock[]>;
|
|
201
199
|
/**
|
|
202
200
|
* Blocks for the page
|
|
203
201
|
*/
|
|
@@ -318,11 +316,6 @@ export declare const getClassValueAndUnit: (className: string) => {
|
|
|
318
316
|
value: string;
|
|
319
317
|
};
|
|
320
318
|
|
|
321
|
-
declare type GlobalBlockList = Record<string, {
|
|
322
|
-
name?: string;
|
|
323
|
-
description?: string;
|
|
324
|
-
}>;
|
|
325
|
-
|
|
326
319
|
declare type HSLColor = string;
|
|
327
320
|
|
|
328
321
|
export { i18n }
|
|
@@ -358,6 +351,12 @@ declare type PageTypeItem = {
|
|
|
358
351
|
slug?: string;
|
|
359
352
|
};
|
|
360
353
|
|
|
354
|
+
declare type PartialBlockList = Record<string, {
|
|
355
|
+
name?: string;
|
|
356
|
+
description?: string;
|
|
357
|
+
type?: string;
|
|
358
|
+
}>;
|
|
359
|
+
|
|
361
360
|
declare type ReactComponentType = default_2.ComponentType<any>;
|
|
362
361
|
|
|
363
362
|
export { registerChaiBlock }
|
|
@@ -367,12 +366,13 @@ declare type RichText = string;
|
|
|
367
366
|
declare type SavePageData = {
|
|
368
367
|
autoSave: boolean;
|
|
369
368
|
blocks: ChaiBlock[];
|
|
370
|
-
theme?:
|
|
369
|
+
theme?: ChaiBuilderThemeValues;
|
|
371
370
|
};
|
|
372
371
|
|
|
373
|
-
export declare const ScreenSizes: ({ openDelay, canvas }: {
|
|
372
|
+
export declare const ScreenSizes: ({ openDelay, canvas, tooltip, }: {
|
|
374
373
|
openDelay?: number;
|
|
375
374
|
canvas?: boolean;
|
|
375
|
+
tooltip?: boolean;
|
|
376
376
|
}) => JSX_2.Element;
|
|
377
377
|
|
|
378
378
|
declare interface ThemeConfigProps {
|
|
@@ -488,17 +488,6 @@ export declare const useDarkMode: () => [boolean, Function];
|
|
|
488
488
|
*/
|
|
489
489
|
export declare const useDuplicateBlocks: () => Function;
|
|
490
490
|
|
|
491
|
-
export declare const useGlobalBlocksList: () => {
|
|
492
|
-
data: GlobalBlockList;
|
|
493
|
-
isLoading: boolean;
|
|
494
|
-
refetch: () => Promise<void>;
|
|
495
|
-
};
|
|
496
|
-
|
|
497
|
-
export declare const useGlobalBlocksStore: () => {
|
|
498
|
-
getGlobalBlocks: (globalBlock: string) => any;
|
|
499
|
-
reset: () => void;
|
|
500
|
-
};
|
|
501
|
-
|
|
502
491
|
export declare const useHiddenBlockIds: () => readonly [string[], (args_0: string[] | ((prev: string[]) => string[])) => void, (blockId: string) => void];
|
|
503
492
|
|
|
504
493
|
/**
|
|
@@ -515,6 +504,18 @@ export declare const useLanguages: () => {
|
|
|
515
504
|
|
|
516
505
|
export declare const useLayoutVariant: () => readonly [LayoutVariant, (args_0: RESET | LayoutVariant | ((prev: LayoutVariant) => RESET | LayoutVariant)) => void];
|
|
517
506
|
|
|
507
|
+
export declare const usePartailBlocksStore: () => {
|
|
508
|
+
getPartailBlocks: (partailBlock: string) => any;
|
|
509
|
+
reset: () => void;
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
export declare const usePartialBlocksList: () => {
|
|
513
|
+
data: PartialBlockList;
|
|
514
|
+
isLoading: boolean;
|
|
515
|
+
refetch: () => Promise<void>;
|
|
516
|
+
error: string;
|
|
517
|
+
};
|
|
518
|
+
|
|
518
519
|
export declare const usePasteBlocks: () => {
|
|
519
520
|
canPaste: (newParentId: string) => Promise<boolean>;
|
|
520
521
|
pasteBlocks: (newParentId: string | string[]) => Promise<void>;
|