zs_library 0.6.21 → 0.6.22
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/components/desktop/config.d.ts +1 -1
- package/dist/components/desktop/context/config/hooks.d.ts +2 -0
- package/dist/components/desktop/context-menu/content.d.ts +1 -2
- package/dist/components/desktop/context-menu/sub-menu-item.d.ts +1 -1
- package/dist/components/desktop/items/item-content.d.ts +9 -0
- package/dist/components/desktop/sortable.d.ts +4 -0
- package/dist/components/desktop/types.d.ts +7 -7
- package/dist/index.js +2246 -2216
- package/package.json +1 -1
|
@@ -54,7 +54,7 @@ export declare function getDefaultConfig(type: string, customConfigMap?: TypeCon
|
|
|
54
54
|
* @param defaultSizeId 默认尺寸配置ID
|
|
55
55
|
* @returns 尺寸配置对象
|
|
56
56
|
*/
|
|
57
|
-
export declare function getSizeConfig(sizeId: string | undefined, sizeConfigs
|
|
57
|
+
export declare function getSizeConfig(sizeId: string | undefined, sizeConfigs?: SizeConfig[], defaultSizeId?: string | number): SizeConfig;
|
|
58
58
|
/**
|
|
59
59
|
* 获取项目的实际尺寸(col和row)
|
|
60
60
|
* @param type 项目类型
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Theme } from '../../themes';
|
|
2
2
|
export declare const useSortableConfig: () => {
|
|
3
3
|
theme: Theme;
|
|
4
|
+
computeGap: (iconSize: number) => number;
|
|
5
|
+
computeCellSize: (iconSize: number) => number;
|
|
4
6
|
noLetters?: boolean;
|
|
5
7
|
typeConfigMap?: import('../..').TypeConfigMap;
|
|
6
8
|
dataTypeMenuConfigMap?: import('../..').DataTypeMenuConfigMap;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { motion } from 'motion/react';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
export
|
|
4
|
-
}
|
|
3
|
+
export type ContentMenuContextProps = React.ComponentProps<typeof motion.div>;
|
|
5
4
|
declare const ContextMenuContent: FC<ContentMenuContextProps>;
|
|
6
5
|
export default ContextMenuContent;
|
|
@@ -6,4 +6,4 @@ export interface SubMenuItemProps {
|
|
|
6
6
|
color?: string;
|
|
7
7
|
textColor?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare const SubMenuItem: ({ text,
|
|
9
|
+
export declare const SubMenuItem: ({ text, index, children, color, textColor, ...props }: SubMenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { motion } from 'motion/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { SortItem } from '../types';
|
|
4
|
+
interface ItemContentProps<D, C> extends ComponentProps<typeof motion.div> {
|
|
5
|
+
data: SortItem<D, C>;
|
|
6
|
+
iconSize?: number;
|
|
7
|
+
}
|
|
8
|
+
declare const ItemContent: <D, C>({ className, data, children, iconSize, ...rest }: ItemContentProps<D, C>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default ItemContent;
|
|
@@ -32,19 +32,19 @@ export type DataTypeMenuConfigMap = Record<string, MenuItemConfig[]>;
|
|
|
32
32
|
/** 系统默认配置(不会存储到用户数据中,防止篡改) */
|
|
33
33
|
export interface SortItemDefaultConfig {
|
|
34
34
|
/** 可用的尺寸配置列表 */
|
|
35
|
-
sizeConfigs
|
|
35
|
+
sizeConfigs?: SizeConfig[];
|
|
36
36
|
/** 默认尺寸配置ID */
|
|
37
|
-
defaultSizeId
|
|
37
|
+
defaultSizeId?: string;
|
|
38
38
|
/** 允许设置大小 */
|
|
39
|
-
allowResize
|
|
39
|
+
allowResize?: boolean;
|
|
40
40
|
/** 允许打开右键菜单 */
|
|
41
|
-
allowContextMenu
|
|
41
|
+
allowContextMenu?: boolean;
|
|
42
42
|
/** 允许显示分享按钮 */
|
|
43
|
-
allowShare
|
|
43
|
+
allowShare?: boolean;
|
|
44
44
|
/** 允许显示删除按钮 */
|
|
45
|
-
allowDelete
|
|
45
|
+
allowDelete?: boolean;
|
|
46
46
|
/** 允许显示信息按钮 */
|
|
47
|
-
allowInfo
|
|
47
|
+
allowInfo?: boolean;
|
|
48
48
|
}
|
|
49
49
|
/** 完整的配置接口(用户配置 + 系统默认配置) */
|
|
50
50
|
export interface SortItemBaseConfig extends SortItemUserConfig, SortItemDefaultConfig {
|