@chaibuilder/sdk 2.2.4 → 2.2.5
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 +35 -35
- package/dist/render.d.ts +2 -2
- package/package.json +1 -1
package/dist/core.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ export declare interface ChaiBuilderEditorProps {
|
|
|
104
104
|
/**
|
|
105
105
|
* Theme presets
|
|
106
106
|
*/
|
|
107
|
-
themePresets?: Record<string, Partial<
|
|
107
|
+
themePresets?: Record<string, Partial<ChaiThemeValues>>[];
|
|
108
108
|
/**
|
|
109
109
|
* Theme options
|
|
110
110
|
*/
|
|
@@ -112,11 +112,11 @@ export declare interface ChaiBuilderEditorProps {
|
|
|
112
112
|
/**
|
|
113
113
|
* Theme
|
|
114
114
|
*/
|
|
115
|
-
theme?: Partial<
|
|
115
|
+
theme?: Partial<ChaiThemeValues>;
|
|
116
116
|
/**
|
|
117
117
|
* Builder theme
|
|
118
118
|
*/
|
|
119
|
-
builderTheme?:
|
|
119
|
+
builderTheme?: ChaiThemeValues;
|
|
120
120
|
/**
|
|
121
121
|
* Theme panel component
|
|
122
122
|
* TODO: Move to registerChaiThemePanelComponent()
|
|
@@ -252,36 +252,6 @@ declare type ChaiBuilderThemeOptions = {
|
|
|
252
252
|
}[];
|
|
253
253
|
};
|
|
254
254
|
|
|
255
|
-
declare type ChaiBuilderThemeValues = {
|
|
256
|
-
fontFamily: {
|
|
257
|
-
heading: string;
|
|
258
|
-
body: string;
|
|
259
|
-
};
|
|
260
|
-
borderRadius: string;
|
|
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
|
-
};
|
|
283
|
-
};
|
|
284
|
-
|
|
285
255
|
export declare function ChaiDarkModeSwitcher(): JSX_2.Element;
|
|
286
256
|
|
|
287
257
|
export declare const ChaiDefaultBlocks: ({ parentId, position, gridCols, }: {
|
|
@@ -321,6 +291,36 @@ export declare interface ChaiSidebarPanel {
|
|
|
321
291
|
|
|
322
292
|
export declare const ChaiThemeConfigPanel: React_2.FC<ThemeConfigProps>;
|
|
323
293
|
|
|
294
|
+
export declare type ChaiThemeValues = {
|
|
295
|
+
fontFamily: {
|
|
296
|
+
heading: string;
|
|
297
|
+
body: string;
|
|
298
|
+
};
|
|
299
|
+
borderRadius: string;
|
|
300
|
+
colors: {
|
|
301
|
+
background: [HexColor, HexColor];
|
|
302
|
+
foreground: [HexColor, HexColor];
|
|
303
|
+
primary: [HexColor, HexColor];
|
|
304
|
+
"primary-foreground": [HexColor, HexColor];
|
|
305
|
+
secondary: [HexColor, HexColor];
|
|
306
|
+
"secondary-foreground": [HexColor, HexColor];
|
|
307
|
+
muted: [HexColor, HexColor];
|
|
308
|
+
"muted-foreground": [HSLColor, HSLColor];
|
|
309
|
+
accent: [HSLColor, HSLColor];
|
|
310
|
+
"accent-foreground": [HSLColor, HSLColor];
|
|
311
|
+
destructive: [HSLColor, HSLColor];
|
|
312
|
+
"destructive-foreground": [HSLColor, HSLColor];
|
|
313
|
+
border: [HSLColor, HSLColor];
|
|
314
|
+
input: [HSLColor, HSLColor];
|
|
315
|
+
ring: [HexColor, HexColor];
|
|
316
|
+
card: [HexColor, HexColor];
|
|
317
|
+
"card-foreground": [HexColor, HexColor];
|
|
318
|
+
popover: [HexColor, HexColor];
|
|
319
|
+
"popover-foreground": [HexColor, HexColor];
|
|
320
|
+
[key: string]: [HexColor, HexColor];
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
|
|
324
324
|
export declare const ChaiUILibrariesPanel: ({ parentId, position }: {
|
|
325
325
|
parentId?: string;
|
|
326
326
|
position?: number;
|
|
@@ -447,7 +447,7 @@ export declare const registerChaiTopBar: (component: React.ComponentType) => voi
|
|
|
447
447
|
declare type SavePageData = {
|
|
448
448
|
autoSave: boolean;
|
|
449
449
|
blocks: ChaiBlock[];
|
|
450
|
-
theme?:
|
|
450
|
+
theme?: ChaiThemeValues;
|
|
451
451
|
};
|
|
452
452
|
|
|
453
453
|
declare type SaveToLibraryProps = {
|
|
@@ -706,7 +706,7 @@ export declare const useTheme: () => readonly [{
|
|
|
706
706
|
"popover-foreground": [string, string];
|
|
707
707
|
[key: string]: [string, string];
|
|
708
708
|
};
|
|
709
|
-
}, (args_0:
|
|
709
|
+
}, (args_0: ChaiThemeValues | Partial<ChaiThemeValues> | ((prev: ChaiThemeValues | Partial<ChaiThemeValues>) => ChaiThemeValues | Partial<ChaiThemeValues>)) => void];
|
|
710
710
|
|
|
711
711
|
export declare const useThemeOptions: () => ChaiBuilderThemeOptions;
|
|
712
712
|
|
package/dist/render.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ declare type ChaiBuilderThemeOptions = {
|
|
|
22
22
|
}[];
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
declare type
|
|
25
|
+
declare type ChaiThemeValues = {
|
|
26
26
|
fontFamily: {
|
|
27
27
|
heading: string;
|
|
28
28
|
body: string;
|
|
@@ -58,7 +58,7 @@ declare type ChaiBuilderThemeValues = {
|
|
|
58
58
|
*/
|
|
59
59
|
export declare const convertToBlocks: (chaiFormatContent: string) => ChaiBlock[];
|
|
60
60
|
|
|
61
|
-
export declare const getChaiThemeCssVariables: (chaiTheme:
|
|
61
|
+
export declare const getChaiThemeCssVariables: (chaiTheme: ChaiThemeValues) => string;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* Get the tailwind css for the blocks
|