@chaibuilder/sdk 2.2.2 → 2.2.4
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/CodeEditor-B7r9YjDC.cjs +1 -0
- package/dist/CodeEditor-HKrlrH8b.js +71 -0
- package/dist/core.cjs +5 -13
- package/dist/core.d.ts +88 -11
- package/dist/core.js +4085 -4123
- package/dist/get-chai-builder-theme-ByeXCyGx.js +12 -0
- package/dist/get-chai-builder-theme-CeaKvOZ8.cjs +1 -0
- package/dist/mockServiceWorker.js +1 -1
- package/dist/plugin-C01tjI6V.cjs +22 -0
- package/dist/plugin-fnBB3TCm.js +258 -0
- package/dist/render-chai-blocks-6SVNwoLW.js +201 -0
- package/dist/render-chai-blocks-Bvl2_fRE.cjs +1 -0
- package/dist/render.cjs +2 -2
- package/dist/render.d.ts +29 -3
- package/dist/render.js +38 -188
- package/dist/sooner-AJ7QkeLS.cjs +1 -0
- package/dist/sooner-DGhT8-JI.js +831 -0
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.js +3 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +36 -28
- package/dist/ui.js +232 -196
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +1210 -1069
- package/package.json +5 -4
- package/dist/CodeEditor-CPR3N3wa.cjs +0 -1
- package/dist/CodeEditor-CuhsobXe.js +0 -65
- package/dist/chai-theme-helpers-BjWE6otR.cjs +0 -22
- package/dist/chai-theme-helpers-FO9vdd-R.js +0 -219
- package/dist/getSplitClasses-DodqA_KW.cjs +0 -1
- package/dist/getSplitClasses-DphwgQiE.js +0 -48
- package/dist/plugin-B09c0d5S.js +0 -24
- package/dist/plugin-BiiuylVf.cjs +0 -1
- package/dist/tooltip-BF2E5xPf.cjs +0 -1
- package/dist/tooltip-DGVZAvLU.js +0 -755
- /package/dist/{Functions-BGzDsf1z.js → common-functions-BGzDsf1z.js} +0 -0
- /package/dist/{Functions-BZmyleS1.cjs → common-functions-BZmyleS1.cjs} +0 -0
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ChaiBlock as ChaiBlock_2 } from '@chaibuilder/runtime';
|
|
2
1
|
import { ClassValue } from 'clsx';
|
|
3
2
|
import { ComponentType } from 'react';
|
|
4
3
|
import { default as default_2 } from 'react';
|
|
@@ -114,6 +113,10 @@ export declare interface ChaiBuilderEditorProps {
|
|
|
114
113
|
* Theme
|
|
115
114
|
*/
|
|
116
115
|
theme?: Partial<ChaiBuilderThemeValues>;
|
|
116
|
+
/**
|
|
117
|
+
* Builder theme
|
|
118
|
+
*/
|
|
119
|
+
builderTheme?: ChaiBuilderThemeValues;
|
|
117
120
|
/**
|
|
118
121
|
* Theme panel component
|
|
119
122
|
* TODO: Move to registerChaiThemePanelComponent()
|
|
@@ -250,9 +253,33 @@ declare type ChaiBuilderThemeOptions = {
|
|
|
250
253
|
};
|
|
251
254
|
|
|
252
255
|
declare type ChaiBuilderThemeValues = {
|
|
253
|
-
fontFamily:
|
|
256
|
+
fontFamily: {
|
|
257
|
+
heading: string;
|
|
258
|
+
body: string;
|
|
259
|
+
};
|
|
254
260
|
borderRadius: string;
|
|
255
|
-
colors:
|
|
261
|
+
colors: {
|
|
262
|
+
background: [HexColor, HexColor];
|
|
263
|
+
foreground: [HexColor, HexColor];
|
|
264
|
+
primary: [HexColor, HexColor];
|
|
265
|
+
"primary-foreground": [HexColor, HexColor];
|
|
266
|
+
secondary: [HexColor, HexColor];
|
|
267
|
+
"secondary-foreground": [HexColor, HexColor];
|
|
268
|
+
muted: [HexColor, HexColor];
|
|
269
|
+
"muted-foreground": [HSLColor, HSLColor];
|
|
270
|
+
accent: [HSLColor, HSLColor];
|
|
271
|
+
"accent-foreground": [HSLColor, HSLColor];
|
|
272
|
+
destructive: [HSLColor, HSLColor];
|
|
273
|
+
"destructive-foreground": [HSLColor, HSLColor];
|
|
274
|
+
border: [HSLColor, HSLColor];
|
|
275
|
+
input: [HSLColor, HSLColor];
|
|
276
|
+
ring: [HexColor, HexColor];
|
|
277
|
+
card: [HexColor, HexColor];
|
|
278
|
+
"card-foreground": [HexColor, HexColor];
|
|
279
|
+
popover: [HexColor, HexColor];
|
|
280
|
+
"popover-foreground": [HexColor, HexColor];
|
|
281
|
+
[key: string]: [HexColor, HexColor];
|
|
282
|
+
};
|
|
256
283
|
};
|
|
257
284
|
|
|
258
285
|
export declare function ChaiDarkModeSwitcher(): JSX_2.Element;
|
|
@@ -353,6 +380,8 @@ declare const getBlocksFromHTML: (html: string) => ChaiBlock[];
|
|
|
353
380
|
export { getBlocksFromHTML as convertHTMLToChaiBlocks }
|
|
354
381
|
export { getBlocksFromHTML }
|
|
355
382
|
|
|
383
|
+
declare type HexColor = string;
|
|
384
|
+
|
|
356
385
|
declare type HSLColor = string;
|
|
357
386
|
|
|
358
387
|
export { i18n }
|
|
@@ -423,7 +452,7 @@ declare type SavePageData = {
|
|
|
423
452
|
|
|
424
453
|
declare type SaveToLibraryProps = {
|
|
425
454
|
blockId: string;
|
|
426
|
-
blocks
|
|
455
|
+
blocks: ChaiBlock[];
|
|
427
456
|
close: () => void;
|
|
428
457
|
};
|
|
429
458
|
|
|
@@ -566,7 +595,7 @@ export declare const useRemoveBlocks: () => (blockIds: Array<string>) => void;
|
|
|
566
595
|
|
|
567
596
|
export declare const useRemoveClassesFromBlocks: () => Function;
|
|
568
597
|
|
|
569
|
-
export declare const useRightPanel: () => ["
|
|
598
|
+
export declare const useRightPanel: () => ["block" | "theme" | "ai" | "settings", (args_0: "block" | "theme" | "ai" | "settings" | ((prev: "block" | "theme" | "ai" | "settings") => "block" | "theme" | "ai" | "settings")) => void];
|
|
570
599
|
|
|
571
600
|
export declare const useSavePage: () => {
|
|
572
601
|
savePage: ThrottledFunction<(autoSave?: boolean) => Promise<boolean>>;
|
|
@@ -622,13 +651,61 @@ export declare const useStylingBreakpoint: () => [string, (args_0: string | RESE
|
|
|
622
651
|
export declare const useStylingState: () => [unknown, (...args: unknown[]) => unknown];
|
|
623
652
|
|
|
624
653
|
export declare const useTheme: () => readonly [{
|
|
625
|
-
fontFamily:
|
|
654
|
+
fontFamily: {
|
|
655
|
+
heading: string;
|
|
656
|
+
body: string;
|
|
657
|
+
};
|
|
626
658
|
borderRadius: string;
|
|
627
|
-
colors:
|
|
659
|
+
colors: {
|
|
660
|
+
background: [string, string];
|
|
661
|
+
foreground: [string, string];
|
|
662
|
+
primary: [string, string];
|
|
663
|
+
"primary-foreground": [string, string];
|
|
664
|
+
secondary: [string, string];
|
|
665
|
+
"secondary-foreground": [string, string];
|
|
666
|
+
muted: [string, string];
|
|
667
|
+
"muted-foreground": [string, string];
|
|
668
|
+
accent: [string, string];
|
|
669
|
+
"accent-foreground": [string, string];
|
|
670
|
+
destructive: [string, string];
|
|
671
|
+
"destructive-foreground": [string, string];
|
|
672
|
+
border: [string, string];
|
|
673
|
+
input: [string, string];
|
|
674
|
+
ring: [string, string];
|
|
675
|
+
card: [string, string];
|
|
676
|
+
"card-foreground": [string, string];
|
|
677
|
+
popover: [string, string];
|
|
678
|
+
"popover-foreground": [string, string];
|
|
679
|
+
[key: string]: [string, string];
|
|
680
|
+
};
|
|
628
681
|
} | {
|
|
629
|
-
fontFamily
|
|
630
|
-
|
|
631
|
-
|
|
682
|
+
fontFamily: {
|
|
683
|
+
heading: string;
|
|
684
|
+
body: string;
|
|
685
|
+
};
|
|
686
|
+
borderRadius: string;
|
|
687
|
+
colors: {
|
|
688
|
+
background: [string, string];
|
|
689
|
+
foreground: [string, string];
|
|
690
|
+
primary: [string, string];
|
|
691
|
+
"primary-foreground": [string, string];
|
|
692
|
+
secondary: [string, string];
|
|
693
|
+
"secondary-foreground": [string, string];
|
|
694
|
+
muted: [string, string];
|
|
695
|
+
"muted-foreground": [string, string];
|
|
696
|
+
accent: [string, string];
|
|
697
|
+
"accent-foreground": [string, string];
|
|
698
|
+
destructive: [string, string];
|
|
699
|
+
"destructive-foreground": [string, string];
|
|
700
|
+
border: [string, string];
|
|
701
|
+
input: [string, string];
|
|
702
|
+
ring: [string, string];
|
|
703
|
+
card: [string, string];
|
|
704
|
+
"card-foreground": [string, string];
|
|
705
|
+
popover: [string, string];
|
|
706
|
+
"popover-foreground": [string, string];
|
|
707
|
+
[key: string]: [string, string];
|
|
708
|
+
};
|
|
632
709
|
}, (args_0: ChaiBuilderThemeValues | Partial<ChaiBuilderThemeValues> | ((prev: ChaiBuilderThemeValues | Partial<ChaiBuilderThemeValues>) => ChaiBuilderThemeValues | Partial<ChaiBuilderThemeValues>)) => void];
|
|
633
710
|
|
|
634
711
|
export declare const useThemeOptions: () => ChaiBuilderThemeOptions;
|
|
@@ -656,7 +733,7 @@ export declare const useUpdateBlocksProps: () => (blockIds: Array<string>, props
|
|
|
656
733
|
|
|
657
734
|
export declare const useUpdateBlocksPropsRealtime: () => (blockIds: Array<string>, props: Record<string, any>) => void;
|
|
658
735
|
|
|
659
|
-
export declare const useWrapperBlock: () =>
|
|
736
|
+
export declare const useWrapperBlock: () => ChaiBlock;
|
|
660
737
|
|
|
661
738
|
declare type VariableKey = string;
|
|
662
739
|
|