@chaibuilder/sdk 2.0.0-beta.91 → 2.0.0-beta.94
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 +555 -383
- package/dist/core.d.ts +5 -13
- package/dist/core.js +559 -387
- package/package.json +4 -3
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Atom } from 'jotai';
|
|
2
1
|
import { ChaiBlock as ChaiBlock_2 } from '@chaibuilder/runtime';
|
|
3
2
|
import { ClassValue } from 'clsx';
|
|
4
3
|
import { default as default_2 } from 'react';
|
|
@@ -73,13 +72,6 @@ export declare type ChaiBlock<T = Record<string, any>> = {
|
|
|
73
72
|
_type: string;
|
|
74
73
|
} & T;
|
|
75
74
|
|
|
76
|
-
declare type ChaiBuilderBlockWithAtom = {
|
|
77
|
-
_type: string;
|
|
78
|
-
_id: string;
|
|
79
|
-
_parent: string | null;
|
|
80
|
-
_atom: Atom<ChaiBlock>;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
75
|
export declare const ChaiBuilderCanvas: default_2.FC;
|
|
84
76
|
|
|
85
77
|
/**
|
|
@@ -436,15 +428,15 @@ export declare const useBlockHighlight: () => {
|
|
|
436
428
|
lastHighlighted: HTMLElement;
|
|
437
429
|
};
|
|
438
430
|
|
|
439
|
-
export declare const useBlocksStore: () => [
|
|
431
|
+
export declare const useBlocksStore: () => [any[], (args_0: any[] | ((prev: any[]) => any[])) => void];
|
|
440
432
|
|
|
441
433
|
export declare const useBlocksStoreUndoableActions: () => {
|
|
442
434
|
moveBlocks: (blockIds: string[], parent: string | undefined, position: number) => void;
|
|
443
|
-
addBlocks: (newBlocks:
|
|
444
|
-
removeBlocks: (blocks:
|
|
435
|
+
addBlocks: (newBlocks: ChaiBlock[], parent?: string, position?: number) => void;
|
|
436
|
+
removeBlocks: (blocks: ChaiBlock[]) => void;
|
|
445
437
|
updateBlocks: (blockIds: string[], props: Partial<ChaiBlock>, oldPropsState?: Partial<ChaiBlock>) => void;
|
|
446
438
|
updateBlocksRuntime: (blockIds: string[], props: Record<string, any>) => void;
|
|
447
|
-
setNewBlocks: (newBlocks:
|
|
439
|
+
setNewBlocks: (newBlocks: ChaiBlock[]) => void;
|
|
448
440
|
updateMultipleBlocksProps: (blocks: Array<{
|
|
449
441
|
_id: string;
|
|
450
442
|
} & Partial<ChaiBlock>>) => void;
|
|
@@ -503,7 +495,7 @@ export declare const useGlobalBlocksList: () => {
|
|
|
503
495
|
};
|
|
504
496
|
|
|
505
497
|
export declare const useGlobalBlocksStore: () => {
|
|
506
|
-
getGlobalBlocks: (
|
|
498
|
+
getGlobalBlocks: (globalBlock: string) => any;
|
|
507
499
|
reset: () => void;
|
|
508
500
|
};
|
|
509
501
|
|