@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/{chai-theme-helpers-FO9vdd-R.js → chai-theme-helpers-CfZwxV6S.js} +90 -63
- package/dist/chai-theme-helpers-utzv3TbX.cjs +22 -0
- package/dist/core.cjs +4 -12
- package/dist/core.d.ts +85 -7
- package/dist/core.js +884 -887
- package/dist/{plugin-B09c0d5S.js → plugin-DW1HhfzA.js} +1 -1
- package/dist/{plugin-BiiuylVf.cjs → plugin-kqWzHDpF.cjs} +1 -1
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +29 -3
- package/dist/render.js +3 -3
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.js +1 -1
- package/dist/ui.d.ts +3 -3
- package/package.json +3 -3
- package/dist/chai-theme-helpers-BjWE6otR.cjs +0 -22
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:
|
|
257
|
+
fontFamily: {
|
|
258
|
+
heading: string;
|
|
259
|
+
body: string;
|
|
260
|
+
};
|
|
254
261
|
borderRadius: string;
|
|
255
|
-
colors:
|
|
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:
|
|
655
|
+
fontFamily: {
|
|
656
|
+
heading: string;
|
|
657
|
+
body: string;
|
|
658
|
+
};
|
|
626
659
|
borderRadius: string;
|
|
627
|
-
colors:
|
|
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
|
|
630
|
-
|
|
631
|
-
|
|
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;
|