@chaibuilder/sdk 2.2.27 → 2.2.29
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.cjs +4 -4
- package/dist/core.d.ts +10 -5
- package/dist/core.js +478 -450
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +18 -24
- package/package.json +3 -4
package/dist/core.d.ts
CHANGED
|
@@ -308,13 +308,16 @@ export declare type ChaiLibraryBlock<T = Record<string, any>> = {
|
|
|
308
308
|
description?: string;
|
|
309
309
|
} & T;
|
|
310
310
|
|
|
311
|
-
declare
|
|
311
|
+
declare type ChaiLibraryConfig<T> = {
|
|
312
312
|
id: string;
|
|
313
313
|
name: string;
|
|
314
314
|
description: string;
|
|
315
|
-
getBlocksList: (library: ChaiLibrary) => Promise<ChaiLibraryBlock[]>;
|
|
316
|
-
getBlock: (library
|
|
317
|
-
|
|
315
|
+
getBlocksList: (library: ChaiLibrary) => Promise<ChaiLibraryBlock<T>[]>;
|
|
316
|
+
getBlock: ({ library, block, }: {
|
|
317
|
+
library: ChaiLibrary;
|
|
318
|
+
block: ChaiLibraryBlock<T>;
|
|
319
|
+
}) => Promise<HTMLString | ChaiBlock_2[]>;
|
|
320
|
+
};
|
|
318
321
|
|
|
319
322
|
export declare const ChaiOutline: () => JSX_2.Element;
|
|
320
323
|
|
|
@@ -426,6 +429,8 @@ declare type HexColor = string;
|
|
|
426
429
|
|
|
427
430
|
declare type HSLColor = string;
|
|
428
431
|
|
|
432
|
+
declare type HTMLString = string;
|
|
433
|
+
|
|
429
434
|
export { i18n }
|
|
430
435
|
|
|
431
436
|
declare type MediaManagerProps = {
|
|
@@ -479,7 +484,7 @@ export declare const registerBlockSettingWidget: (id: string, component: React.C
|
|
|
479
484
|
|
|
480
485
|
export declare const registerChaiAddBlockTab: (id: string, tab: Omit<AddBlockTab, "id">) => void;
|
|
481
486
|
|
|
482
|
-
export declare const registerChaiLibrary: (id: string, library: Omit<ChaiLibraryConfig
|
|
487
|
+
export declare const registerChaiLibrary: <T extends Record<string, any> = Record<string, any>>(id: string, library: Omit<ChaiLibraryConfig<T>, "id">) => void;
|
|
483
488
|
|
|
484
489
|
export declare const registerChaiMediaManager: (component: React.ComponentType<MediaManagerProps>) => void;
|
|
485
490
|
|