@chaibuilder/sdk 2.2.1 → 2.2.3

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
@@ -114,6 +114,10 @@ export declare interface ChaiBuilderEditorProps {
114
114
  * Theme
115
115
  */
116
116
  theme?: Partial<ChaiBuilderThemeValues>;
117
+ /**
118
+ * Builder theme
119
+ */
120
+ builderTheme?: ChaiBuilderThemeValues;
117
121
  /**
118
122
  * Theme panel component
119
123
  * TODO: Move to registerChaiThemePanelComponent()
@@ -250,9 +254,33 @@ declare type ChaiBuilderThemeOptions = {
250
254
  };
251
255
 
252
256
  declare type ChaiBuilderThemeValues = {
253
- fontFamily: Record<string, string>;
257
+ fontFamily: {
258
+ heading: string;
259
+ body: string;
260
+ };
254
261
  borderRadius: string;
255
- colors: Record<string, string[]>;
262
+ colors: {
263
+ background: [HexColor, HexColor];
264
+ foreground: [HexColor, HexColor];
265
+ primary: [HexColor, HexColor];
266
+ "primary-foreground": [HexColor, HexColor];
267
+ secondary: [HexColor, HexColor];
268
+ "secondary-foreground": [HexColor, HexColor];
269
+ muted: [HexColor, HexColor];
270
+ "muted-foreground": [HSLColor, HSLColor];
271
+ accent: [HSLColor, HSLColor];
272
+ "accent-foreground": [HSLColor, HSLColor];
273
+ destructive: [HSLColor, HSLColor];
274
+ "destructive-foreground": [HSLColor, HSLColor];
275
+ border: [HSLColor, HSLColor];
276
+ input: [HSLColor, HSLColor];
277
+ ring: [HexColor, HexColor];
278
+ card: [HexColor, HexColor];
279
+ "card-foreground": [HexColor, HexColor];
280
+ popover: [HexColor, HexColor];
281
+ "popover-foreground": [HexColor, HexColor];
282
+ [key: string]: [HexColor, HexColor];
283
+ };
256
284
  };
257
285
 
258
286
  export declare function ChaiDarkModeSwitcher(): JSX_2.Element;
@@ -353,6 +381,8 @@ declare const getBlocksFromHTML: (html: string) => ChaiBlock[];
353
381
  export { getBlocksFromHTML as convertHTMLToChaiBlocks }
354
382
  export { getBlocksFromHTML }
355
383
 
384
+ declare type HexColor = string;
385
+
356
386
  declare type HSLColor = string;
357
387
 
358
388
  export { i18n }
@@ -622,13 +652,61 @@ export declare const useStylingBreakpoint: () => [string, (args_0: string | RESE
622
652
  export declare const useStylingState: () => [unknown, (...args: unknown[]) => unknown];
623
653
 
624
654
  export declare const useTheme: () => readonly [{
625
- fontFamily: Record<string, string>;
655
+ fontFamily: {
656
+ heading: string;
657
+ body: string;
658
+ };
626
659
  borderRadius: string;
627
- colors: Record<string, string[]>;
660
+ colors: {
661
+ background: [string, string];
662
+ foreground: [string, string];
663
+ primary: [string, string];
664
+ "primary-foreground": [string, string];
665
+ secondary: [string, string];
666
+ "secondary-foreground": [string, string];
667
+ muted: [string, string];
668
+ "muted-foreground": [string, string];
669
+ accent: [string, string];
670
+ "accent-foreground": [string, string];
671
+ destructive: [string, string];
672
+ "destructive-foreground": [string, string];
673
+ border: [string, string];
674
+ input: [string, string];
675
+ ring: [string, string];
676
+ card: [string, string];
677
+ "card-foreground": [string, string];
678
+ popover: [string, string];
679
+ "popover-foreground": [string, string];
680
+ [key: string]: [string, string];
681
+ };
628
682
  } | {
629
- fontFamily?: Record<string, string>;
630
- borderRadius?: string;
631
- colors?: Record<string, string[]>;
683
+ fontFamily: {
684
+ heading: string;
685
+ body: string;
686
+ };
687
+ borderRadius: string;
688
+ colors: {
689
+ background: [string, string];
690
+ foreground: [string, string];
691
+ primary: [string, string];
692
+ "primary-foreground": [string, string];
693
+ secondary: [string, string];
694
+ "secondary-foreground": [string, string];
695
+ muted: [string, string];
696
+ "muted-foreground": [string, string];
697
+ accent: [string, string];
698
+ "accent-foreground": [string, string];
699
+ destructive: [string, string];
700
+ "destructive-foreground": [string, string];
701
+ border: [string, string];
702
+ input: [string, string];
703
+ ring: [string, string];
704
+ card: [string, string];
705
+ "card-foreground": [string, string];
706
+ popover: [string, string];
707
+ "popover-foreground": [string, string];
708
+ [key: string]: [string, string];
709
+ };
632
710
  }, (args_0: ChaiBuilderThemeValues | Partial<ChaiBuilderThemeValues> | ((prev: ChaiBuilderThemeValues | Partial<ChaiBuilderThemeValues>) => ChaiBuilderThemeValues | Partial<ChaiBuilderThemeValues>)) => void];
633
711
 
634
712
  export declare const useThemeOptions: () => ChaiBuilderThemeOptions;