@blocklet/pages-kit 0.4.157 → 0.4.159
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/lib/cjs/builtin/color-picker.js +183 -70
- package/lib/cjs/contexts/color.js +33 -33
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/data-source.js +3 -3
- package/lib/cjs/utils/style.js +0 -4
- package/lib/esm/builtin/color-picker.js +183 -72
- package/lib/esm/contexts/color.js +31 -34
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/data-source.js +3 -3
- package/lib/esm/utils/style.js +0 -3
- package/lib/types/builtin/color-picker.d.ts +18 -3
- package/lib/types/contexts/color.d.ts +3 -2
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/lib/types/utils/style.d.ts +0 -1
- package/package.json +5 -5
|
@@ -5,9 +5,9 @@ export function setPageDataSource(page, state, locale, pageData) {
|
|
|
5
5
|
page.locales = {};
|
|
6
6
|
}
|
|
7
7
|
page.locales[locale] = cloneDeep(page.locales[locale] || {});
|
|
8
|
-
page.locales[locale].title =
|
|
9
|
-
page.locales[locale].image =
|
|
10
|
-
page.locales[locale].description =
|
|
8
|
+
page.locales[locale].title = page.locales[locale].title || pageData.title;
|
|
9
|
+
page.locales[locale].image = page.locales[locale].image || pageData.image;
|
|
10
|
+
page.locales[locale].description = page.locales[locale].description || pageData.description;
|
|
11
11
|
// 遍历 pageData 的每个 key
|
|
12
12
|
Object.entries(pageData.sectionsData).forEach(([sectionKey, sectionData]) => {
|
|
13
13
|
try {
|
package/lib/esm/utils/style.js
CHANGED
|
@@ -21,9 +21,24 @@ export interface ConfigColorDialogProps {
|
|
|
21
21
|
}, close: () => void) => void;
|
|
22
22
|
enableMuiPalette?: boolean;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
interface AlternateColorIndicatorProps {
|
|
25
|
+
value?: string;
|
|
26
|
+
sx?: object;
|
|
27
|
+
}
|
|
28
|
+
export declare function AlternateColorIndicator({ value, sx }: AlternateColorIndicatorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
+
interface ThemeModeLabelProps {
|
|
30
|
+
mode: 'light' | 'dark';
|
|
31
|
+
position?: 'top-left' | 'bottom-right';
|
|
32
|
+
sx?: object;
|
|
33
|
+
}
|
|
34
|
+
export declare function ThemeModeLabel({ mode, position, sx }: ThemeModeLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
interface CornerBorderProps {
|
|
36
|
+
border: string;
|
|
37
|
+
cornerSize?: number;
|
|
38
|
+
borderRadius?: number;
|
|
39
|
+
sx?: object;
|
|
40
|
+
}
|
|
41
|
+
export declare function CornerBorder({ border, cornerSize, borderRadius, sx }: CornerBorderProps): import("react/jsx-runtime").JSX.Element;
|
|
27
42
|
export declare function ColorItem({ color, sx, ...props }: ColorItemProps): import("react/jsx-runtime").JSX.Element;
|
|
28
43
|
export declare const ConfigColorDialog: import("react").ForwardRefExoticComponent<ConfigColorDialogProps & import("react").RefAttributes<ConfigColorDialogRef>>;
|
|
29
44
|
export declare function ColorPicker({ value, onChange, style, sx }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,7 @@ interface ColorInfo {
|
|
|
2
2
|
colorKey: string;
|
|
3
3
|
colorValue: string;
|
|
4
4
|
group: string;
|
|
5
|
+
alternateColorValue?: string;
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* Hook 用于获取和操作 MUI 主题色
|
|
@@ -11,12 +12,12 @@ export declare function useMuiColorPalette(): {
|
|
|
11
12
|
groupedMuiColors: Record<string, {
|
|
12
13
|
colorKey: string;
|
|
13
14
|
colorValue: string;
|
|
15
|
+
alternateColorValue?: string;
|
|
14
16
|
}[]>;
|
|
15
|
-
presetColors: string[];
|
|
16
17
|
getMuiKeyByColor: (colorValue: string) => string | null;
|
|
17
18
|
getColorByMuiKey: (muiKey: string) => string | null;
|
|
18
19
|
isMuiColorKey: (value: string) => boolean;
|
|
19
|
-
theme: import("@mui/material").Theme;
|
|
20
|
+
theme: import("@mui/material/styles").Theme;
|
|
20
21
|
};
|
|
21
22
|
/**
|
|
22
23
|
* React Hook,用于实时转换颜色值(包括MUI主题色键)
|