@mintlify/common 1.0.1222 → 1.0.1224
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/colors.d.ts +4 -0
- package/dist/colors.js +6 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
package/dist/colors.d.ts
CHANGED
|
@@ -52,6 +52,10 @@ export declare const generateDynamicGrayScale: (primaryColor: string) => Tailwin
|
|
|
52
52
|
* "255 0 128", the function will return "255, 0, 128".
|
|
53
53
|
*/
|
|
54
54
|
export declare const convertColorsToRgbWithCommas: (color: string) => string;
|
|
55
|
+
export declare const getDefaultBackgroundColors: (primaryLight?: string) => {
|
|
56
|
+
light: string;
|
|
57
|
+
dark: string;
|
|
58
|
+
};
|
|
55
59
|
export declare function getBackgroundColors(docsConfig?: DocsConfig): {
|
|
56
60
|
light: string;
|
|
57
61
|
dark: string;
|
package/dist/colors.js
CHANGED
|
@@ -98,10 +98,15 @@ export const generateDynamicGrayScale = (primaryColor) => {
|
|
|
98
98
|
export const convertColorsToRgbWithCommas = (color) => {
|
|
99
99
|
return color.split(' ').join(', ');
|
|
100
100
|
};
|
|
101
|
+
const DEFAULT_PRIMARY_LIGHT = '#4ADE80';
|
|
102
|
+
export const getDefaultBackgroundColors = (primaryLight = DEFAULT_PRIMARY_LIGHT) => ({
|
|
103
|
+
light: '#ffffff',
|
|
104
|
+
dark: generateDynamicBackgroundDarkColor(primaryLight, undefined, true),
|
|
105
|
+
});
|
|
101
106
|
export function getBackgroundColors(docsConfig) {
|
|
102
107
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
103
108
|
const primaryColor = (docsConfig === null || docsConfig === void 0 ? void 0 : docsConfig.colors.primary) || '#16A34A';
|
|
104
|
-
const primaryLight = (_a = docsConfig === null || docsConfig === void 0 ? void 0 : docsConfig.colors.light) !== null && _a !== void 0 ? _a :
|
|
109
|
+
const primaryLight = (_a = docsConfig === null || docsConfig === void 0 ? void 0 : docsConfig.colors.light) !== null && _a !== void 0 ? _a : DEFAULT_PRIMARY_LIGHT;
|
|
105
110
|
if ((docsConfig === null || docsConfig === void 0 ? void 0 : docsConfig.theme) === 'linden') {
|
|
106
111
|
docsConfig.background = Object.assign(Object.assign({}, docsConfig.background), { color: {
|
|
107
112
|
light: ((_c = (_b = docsConfig.background) === null || _b === void 0 ? void 0 : _b.color) === null || _c === void 0 ? void 0 : _c.light) ||
|