zs_library 0.5.3 → 0.6.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.
Files changed (40) hide show
  1. package/dist/components/desktop/config.d.ts +74 -5
  2. package/dist/components/desktop/context/config/context.d.ts +11 -3
  3. package/dist/components/desktop/context/state/context.d.ts +8 -5
  4. package/dist/components/desktop/context-menu/index.d.ts +2 -0
  5. package/dist/components/desktop/context-menu/portal.d.ts +3 -0
  6. package/dist/components/desktop/dock/dock.d.ts +50 -0
  7. package/dist/components/desktop/dock/index.d.ts +6 -0
  8. package/dist/components/desktop/dock/launchpad-button.d.ts +17 -0
  9. package/dist/components/desktop/dock/launchpad-modal.d.ts +17 -0
  10. package/dist/components/desktop/dock/search-box.d.ts +9 -0
  11. package/dist/components/desktop/dock/stacked-icon.d.ts +13 -0
  12. package/dist/components/desktop/drag-styles.d.ts +74 -0
  13. package/dist/components/desktop/drag-trigger-pagination.d.ts +44 -0
  14. package/dist/components/desktop/index.d.ts +10 -0
  15. package/dist/components/desktop/items/item-name.d.ts +10 -0
  16. package/dist/components/desktop/items/modal/editable-title.d.ts +9 -0
  17. package/dist/components/desktop/items/modal/index.d.ts +3 -0
  18. package/dist/components/desktop/items/sortable-item.d.ts +4 -0
  19. package/dist/components/desktop/modal/base-modal.d.ts +17 -0
  20. package/dist/components/desktop/modal/index.d.ts +1 -0
  21. package/dist/components/desktop/pagination/index.d.ts +33 -0
  22. package/dist/components/desktop/pagination/utils.d.ts +3 -0
  23. package/dist/components/desktop/sortable.d.ts +34 -0
  24. package/dist/components/desktop/themes/dark.d.ts +2 -0
  25. package/dist/components/desktop/themes/index.d.ts +42 -0
  26. package/dist/components/desktop/themes/light.d.ts +2 -0
  27. package/dist/components/desktop/types.d.ts +69 -23
  28. package/dist/components/desktop/{utils.d.ts → utils/index.d.ts} +3 -2
  29. package/dist/components/desktop/utils/render-icon.d.ts +10 -0
  30. package/dist/components/dock/dock-desktop.d.ts +1 -1
  31. package/dist/components/dock/dock-mobile.d.ts +1 -1
  32. package/dist/components/dock/index.d.ts +1 -1
  33. package/dist/components/editor/type.d.ts +6 -6
  34. package/dist/components/editor/ui/button.d.ts +1 -1
  35. package/dist/components/index.d.ts +9 -7
  36. package/dist/index.css +1 -1
  37. package/dist/index.d.ts +2 -2
  38. package/dist/index.js +3913 -2654
  39. package/package.json +6 -3
  40. package/dist/components/desktop/theme.d.ts +0 -16
@@ -1,6 +1,75 @@
1
- import { SortItemBaseConfig } from './types';
2
- export declare const appConfig: SortItemBaseConfig;
3
- export declare const groupConfig: SortItemBaseConfig;
4
- export declare const configMap: {
5
- [key: string]: SortItemBaseConfig;
1
+ import { SortItemDefaultConfig, TypeConfigMap, SizeConfig, DataTypeMenuConfigMap } from './types';
2
+ /** 通用尺寸配置 */
3
+ export declare const commonSizeConfigs: {
4
+ readonly "1x1": {
5
+ readonly name: "1x1";
6
+ readonly col: 1;
7
+ readonly row: 1;
8
+ };
9
+ readonly "2x1": {
10
+ readonly name: "2x1";
11
+ readonly col: 2;
12
+ readonly row: 1;
13
+ };
14
+ readonly "1x2": {
15
+ readonly name: "1x2";
16
+ readonly col: 1;
17
+ readonly row: 2;
18
+ };
19
+ readonly "2x2": {
20
+ readonly name: "2x2";
21
+ readonly col: 2;
22
+ readonly row: 2;
23
+ };
24
+ readonly "3x2": {
25
+ readonly name: "3x2";
26
+ readonly col: 3;
27
+ readonly row: 2;
28
+ };
29
+ readonly "4x3": {
30
+ readonly name: "4x3";
31
+ readonly col: 4;
32
+ readonly row: 3;
33
+ };
6
34
  };
35
+ /** 通用尺寸配置数组(用于需要数组格式的场景) */
36
+ export declare const commonSizeConfigsArray: SizeConfig[];
37
+ /** app类型的默认配置 */
38
+ export declare const appDefaultConfig: SortItemDefaultConfig;
39
+ /** group类型的默认配置 */
40
+ export declare const groupDefaultConfig: SortItemDefaultConfig;
41
+ /** 内置默认配置映射表 */
42
+ export declare const builtinConfigMap: TypeConfigMap;
43
+ /**
44
+ * 获取指定类型的默认配置
45
+ * @param type 类型名称
46
+ * @param customConfigMap 自定义类型配置映射表
47
+ * @returns 默认配置对象,如果类型不存在则返回app类型的配置
48
+ */
49
+ export declare function getDefaultConfig(type: string, customConfigMap?: TypeConfigMap): SortItemDefaultConfig;
50
+ /**
51
+ * 根据尺寸配置ID获取具体的尺寸信息
52
+ * @param sizeId 尺寸配置ID
53
+ * @param sizeConfigs 可用的尺寸配置列表
54
+ * @param defaultSizeId 默认尺寸配置ID
55
+ * @returns 尺寸配置对象
56
+ */
57
+ export declare function getSizeConfig(sizeId: string | undefined, sizeConfigs: SizeConfig[], defaultSizeId: string): SizeConfig;
58
+ /**
59
+ * 获取项目的实际尺寸(col和row)
60
+ * @param type 项目类型
61
+ * @param sizeId 尺寸配置ID
62
+ * @param customConfigMap 自定义类型配置映射表
63
+ * @returns 包含col和row的对象
64
+ */
65
+ export declare function getItemSize(type: string, sizeId?: string, customConfigMap?: TypeConfigMap): {
66
+ col: number;
67
+ row: number;
68
+ };
69
+ /**
70
+ * 获取dataType对应的菜单配置
71
+ * @param dataType 数据类型
72
+ * @param customConfigMap 自定义dataType菜单配置映射表
73
+ * @returns 菜单配置数组
74
+ */
75
+ export declare function getDataTypeMenuConfig(dataType: string, customConfigMap?: DataTypeMenuConfigMap): import('./types').MenuItemConfig[];
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
- import { Theme } from '../../theme';
2
+ import { Theme } from '../../themes';
3
3
  import { ContextMenuProps } from '../../context-menu';
4
- import { SortItem } from '../../types';
4
+ import { SortItem, ListItem, TypeConfigMap, DataTypeMenuConfigMap } from '../../types';
5
5
  /**
6
6
  * 需要跨多个组件传递的配置,使用 context 传递
7
7
  */
@@ -11,6 +11,14 @@ export interface SortableConfig<D, C> {
11
11
  * 是否不显示名称
12
12
  */
13
13
  noLetters?: boolean;
14
+ /**
15
+ * 类型配置映射表
16
+ */
17
+ typeConfigMap?: TypeConfigMap;
18
+ /**
19
+ * dataType菜单配置映射表
20
+ */
21
+ dataTypeMenuConfigMap?: DataTypeMenuConfigMap;
14
22
  /**
15
23
  * 右键菜单设置
16
24
  */
@@ -25,7 +33,7 @@ export interface SortableConfig<D, C> {
25
33
  * @param index 分页项索引
26
34
  * @param isActive 是否为当前选中页
27
35
  */
28
- pagingDotBuilder?: (item: SortItem<D, C>, index: number, isActive: boolean) => React.JSX.Element;
36
+ pagingDotBuilder?: (item: ListItem<D, C>, index: number, isActive: boolean) => React.JSX.Element;
29
37
  /**
30
38
  * 自定义 item 渲染
31
39
  */
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { SortItem } from '../../types';
2
+ import { SortItem, ListItem } from '../../types';
3
3
  interface ContextMenu {
4
4
  rect: DOMRect;
5
5
  data: any;
@@ -8,7 +8,7 @@ interface ContextMenu {
8
8
  }
9
9
  type ListStatus = "onMove";
10
10
  export interface SortableState {
11
- list: SortItem[];
11
+ list: ListItem[];
12
12
  setList: any;
13
13
  contextMenu: ContextMenu | null;
14
14
  setContextMenu: (e: ContextMenu | null) => void;
@@ -28,7 +28,7 @@ export interface SortableState {
28
28
  updateItemConfig: (id: string | number, config: any) => void;
29
29
  removeItem: (id: string) => void;
30
30
  addItem: (data: SortItem, parentIds: (string | number)[]) => void;
31
- addRootItem: (data: SortItem) => void;
31
+ addRootItem: (data: ListItem) => void;
32
32
  updateRootItem: (id: string | number, data: any) => void;
33
33
  removeRootItem: (id: string | number) => void;
34
34
  /** 当前移动的元素id */
@@ -37,17 +37,20 @@ export interface SortableState {
37
37
  /** 当前元素将要移动到的元素id */
38
38
  moveTargetId: string | number | null;
39
39
  setMoveTargetId: (e: string | number | null) => void;
40
+ /** 当前拖拽的元素 */
41
+ dragItem: SortItem | null;
42
+ setDragItem: (e: SortItem | null) => void;
40
43
  }
41
44
  export declare const SortableStateContext: React.Context<SortableState>;
42
45
  export interface SortableStateProviderProps<D, C> {
43
46
  /**
44
47
  * 列表数据
45
48
  */
46
- list?: SortItem<D, C>[];
49
+ list?: ListItem<D, C>[];
47
50
  /**
48
51
  * 列表数据变更事件
49
52
  */
50
- onChange?: (list: SortItem<D, C>[]) => void;
53
+ onChange?: (list: ListItem<D, C>[]) => void;
51
54
  /**
52
55
  * 本地存储 key
53
56
  */
@@ -7,6 +7,8 @@ export interface ContextMenuProps<D, C> {
7
7
  onShareClick?: (item: SortItem<D, C>) => void;
8
8
  onInfoClick?: (item: SortItem<D, C>) => void;
9
9
  onRemoveClick?: (item: SortItem<D, C>, remove: (id: string) => void) => void;
10
+ animationOrigin?: string;
11
+ isOpen?: boolean;
10
12
  }
11
13
  declare const ContextMenu: <D, C>(props: ContextMenuProps<D, C>) => import("react/jsx-runtime").JSX.Element;
12
14
  export default ContextMenu;
@@ -0,0 +1,3 @@
1
+ import { ContextMenuProps } from './index';
2
+ declare const GlobalContextMenu: <D, C>(props: ContextMenuProps<D, C>) => import("react/jsx-runtime").JSX.Element | null;
3
+ export default GlobalContextMenu;
@@ -0,0 +1,50 @@
1
+ import { default as React } from 'react';
2
+ import { SortItem } from '../types';
3
+ export interface DockProps {
4
+ /**
5
+ * dock 项目列表
6
+ */
7
+ items?: SortItem[];
8
+ /**
9
+ * 固定项目列表(在sortable之前显示,不可拖拽排序)
10
+ */
11
+ fixedItems?: SortItem[];
12
+ /**
13
+ * dock 位置
14
+ */
15
+ position?: "top" | "bottom" | "left" | "right";
16
+ /**
17
+ * dock 样式类名
18
+ */
19
+ className?: string;
20
+ /**
21
+ * dock 项目点击事件
22
+ */
23
+ onItemClick?: (item: SortItem) => void;
24
+ /**
25
+ * 自定义项目渲染
26
+ */
27
+ itemBuilder?: (item: SortItem, index: number) => React.ReactNode;
28
+ /**
29
+ * 自定义固定项目渲染
30
+ */
31
+ fixedItemBuilder?: (item: SortItem, index: number) => React.ReactNode;
32
+ /**
33
+ * 是否显示启动台按钮
34
+ */
35
+ showLaunchpad?: boolean;
36
+ /**
37
+ * 启动台按钮点击事件
38
+ */
39
+ onLaunchpadClick?: () => void;
40
+ /**
41
+ * 拖放事件
42
+ */
43
+ onDrop?: () => void;
44
+ /**
45
+ * dock 项目列表变更事件
46
+ */
47
+ onDockItemsChange?: (items: SortItem[]) => void;
48
+ }
49
+ declare const Dock: React.FC<DockProps>;
50
+ export default Dock;
@@ -0,0 +1,6 @@
1
+ export { default as Dock } from './dock';
2
+ export { default as LaunchpadModal } from './launchpad-modal';
3
+ export { default as LaunchpadButton } from './launchpad-button';
4
+ export type { DockProps } from './dock';
5
+ export type { LaunchpadModalProps } from './launchpad-modal';
6
+ export type { LaunchpadButtonProps } from './launchpad-button';
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ export interface LaunchpadButtonProps {
3
+ /**
4
+ * 启动台按钮点击事件
5
+ */
6
+ onClick?: () => void;
7
+ /**
8
+ * 自定义样式类名
9
+ */
10
+ className?: string;
11
+ /**
12
+ * dock 位置,用于调整分隔线样式
13
+ */
14
+ position?: "top" | "bottom" | "left" | "right";
15
+ }
16
+ declare const LaunchpadButton: React.FC<LaunchpadButtonProps>;
17
+ export default LaunchpadButton;
@@ -0,0 +1,17 @@
1
+ import { SortItem } from '../types';
2
+ export interface LaunchpadModalProps<D, C> {
3
+ /**
4
+ * 是否显示启动台
5
+ */
6
+ visible: boolean;
7
+ /**
8
+ * 关闭启动台
9
+ */
10
+ onClose: () => void;
11
+ /**
12
+ * 项目点击事件
13
+ */
14
+ onItemClick?: (item: SortItem<D, C>) => void;
15
+ }
16
+ declare const LaunchpadModal: <D, C>({ visible, onClose, onItemClick }: LaunchpadModalProps<D, C>) => import("react/jsx-runtime").JSX.Element;
17
+ export default LaunchpadModal;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ interface SearchBoxProps {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ placeholder?: string;
6
+ className?: string;
7
+ }
8
+ declare const SearchBox: React.FC<SearchBoxProps>;
9
+ export default SearchBox;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ export interface StackedIconProps {
3
+ /**
4
+ * 点击事件
5
+ */
6
+ onClick?: () => void;
7
+ /**
8
+ * 自定义类名
9
+ */
10
+ className?: string;
11
+ }
12
+ declare const StackedIcon: React.FC<StackedIconProps>;
13
+ export default StackedIcon;
@@ -0,0 +1,74 @@
1
+ /**
2
+ * 统一的拖拽容器样式
3
+ * iOS风格的拖拽区域样式,包含毛玻璃效果和过渡动画
4
+ */
5
+ export declare const dragContainerStyle: string;
6
+ /**
7
+ * 主要拖拽容器样式(用于sortable组件)
8
+ * 针对主界面的拖拽区域优化
9
+ */
10
+ export declare const mainDragContainerStyle: string;
11
+ /**
12
+ * 拖拽幽灵元素样式
13
+ * 增强版的ghostClass,提供更好的iOS风格视觉反馈
14
+ */
15
+ export declare const enhancedGhostClass: string;
16
+ /**
17
+ * 拖拽区域悬停效果
18
+ * 当拖拽元素进入可放置区域时的样式
19
+ */
20
+ export declare const dragDropZoneStyle: string;
21
+ /**
22
+ * 拖拽状态指示器样式
23
+ * 显示当前拖拽状态的视觉指示器
24
+ */
25
+ export declare const dragStatusIndicatorStyle: string;
26
+ /**
27
+ * 通用拖拽配置
28
+ * 统一的拖拽配置选项,确保一致的交互体验
29
+ */
30
+ export declare const commonDragConfig: {
31
+ animation: number;
32
+ easing: string;
33
+ fallbackOnBody: boolean;
34
+ swapThreshold: number;
35
+ ghostClass: string;
36
+ chosenClass: string;
37
+ dragClass: string;
38
+ fallbackClass: string;
39
+ };
40
+ /**
41
+ * 模态框特定的拖拽配置
42
+ * 针对模态框内的拖拽操作优化的配置
43
+ */
44
+ export declare const modalDragConfig: {
45
+ group: {
46
+ name: string;
47
+ pull: boolean;
48
+ put: boolean;
49
+ };
50
+ animation: number;
51
+ easing: string;
52
+ fallbackOnBody: boolean;
53
+ swapThreshold: number;
54
+ ghostClass: string;
55
+ chosenClass: string;
56
+ dragClass: string;
57
+ fallbackClass: string;
58
+ };
59
+ /**
60
+ * 主界面拖拽配置
61
+ * 针对主界面拖拽操作优化的配置
62
+ */
63
+ export declare const mainDragConfig: {
64
+ swapThreshold: number;
65
+ filter: string;
66
+ animation: number;
67
+ easing: string;
68
+ fallbackOnBody: boolean;
69
+ ghostClass: string;
70
+ chosenClass: string;
71
+ dragClass: string;
72
+ fallbackClass: string;
73
+ group: string;
74
+ };
@@ -0,0 +1,44 @@
1
+ import { default as React } from 'react';
2
+ import { default as Slider } from 'react-slick';
3
+ export interface DragTriggerPaginationRef {
4
+ handleDragMove: (e: React.DragEvent) => void;
5
+ }
6
+ export interface DragTriggerPaginationProps {
7
+ /**
8
+ * Slider 实例引用
9
+ */
10
+ sliderRef: React.RefObject<Slider>;
11
+ /**
12
+ * 当前激活的幻灯片索引
13
+ */
14
+ activeSlide: number;
15
+ /**
16
+ * 总页数
17
+ */
18
+ totalSlides: number;
19
+ /**
20
+ * 是否正在拖拽
21
+ */
22
+ isDragging: boolean;
23
+ /**
24
+ * 拖拽触发延迟时间(毫秒)
25
+ * @default 800
26
+ */
27
+ triggerDelay?: number;
28
+ /**
29
+ * 触发区域宽度(像素)
30
+ * @default 80
31
+ */
32
+ triggerZoneWidth?: number;
33
+ /**
34
+ * 容器引用
35
+ */
36
+ containerRef: React.RefObject<HTMLDivElement>;
37
+ /**
38
+ * 创建新页面的回调函数
39
+ */
40
+ onCreateNewPage?: () => void;
41
+ }
42
+ declare const DragTriggerPagination: React.ForwardRefExoticComponent<DragTriggerPaginationProps & React.RefAttributes<DragTriggerPaginationRef>>;
43
+ export default DragTriggerPagination;
44
+ export { DragTriggerPagination };
@@ -3,6 +3,10 @@ import { SortableProps } from './sortable';
3
3
  import { SortableConfigProviderProps, SortableConfig } from './context/config/context';
4
4
  import { SortableStateProviderProps, SortableState } from './context/state/context';
5
5
  export interface DesktopProps<D = any, C = any> extends SortableProps<D, C>, Omit<SortableStateProviderProps<D, C>, "children">, Omit<SortableConfigProviderProps<D, C>, "children"> {
6
+ /** 类型配置映射表,用于定义不同类型的默认配置 */
7
+ typeConfigMap?: import('./types').TypeConfigMap;
8
+ /** dataType菜单配置映射表,用于定义不同dataType的菜单项 */
9
+ dataTypeMenuConfigMap?: import('./types').DataTypeMenuConfigMap;
6
10
  }
7
11
  export interface DesktopHandle<D = any, C = any> {
8
12
  state: SortableState;
@@ -11,4 +15,10 @@ export interface DesktopHandle<D = any, C = any> {
11
15
  declare const Desktop: <D = any, C = any>(props: DesktopProps<D, C> & {
12
16
  ref?: React.ForwardedRef<DesktopHandle<D, C>>;
13
17
  }) => JSX.Element;
18
+ export type { SortItem, ListItem, SortItemBaseConfig, SortItemBaseData, SortItemDefaultConfig, SortItemUserConfig, SortableItemData, TypeConfigMap, SizeConfig, MenuItemConfig, DataTypeMenuConfigMap, } from './types';
19
+ export { appDefaultConfig as desktopAppDefaultConfig, groupDefaultConfig as desktopGroupDefaultConfig, builtinConfigMap as desktopBuiltinConfigMap, getDefaultConfig as getDesktopDefaultConfig, commonSizeConfigs as desktopCommonSizeConfigs, getSizeConfig as getDesktopSizeConfig, getItemSize as getDesktopItemSize, getDataTypeMenuConfig as getDesktopDataTypeMenuConfig, } from './config';
20
+ export type { Theme, ThemeType } from './themes';
21
+ export { themeLight as desktopThemeLight, themeDark as desktopThemeDark, defaultTheme as desktopDefaultTheme, themes as desktopThemes, } from './themes';
22
+ export { Dock, LaunchpadModal, LaunchpadButton } from './dock';
23
+ export type { DockProps, LaunchpadModalProps, LaunchpadButtonProps } from './dock';
14
24
  export default Desktop;
@@ -0,0 +1,10 @@
1
+ import { SortItem } from '../types';
2
+ export interface ItemNameProps<D, C> {
3
+ data: SortItem<D, C>;
4
+ noLetters?: boolean;
5
+ name?: string;
6
+ defaultName?: string;
7
+ className?: string;
8
+ }
9
+ declare const ItemName: <D, C>(props: ItemNameProps<D, C>) => import("react/jsx-runtime").JSX.Element;
10
+ export default ItemName;
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ interface EditableTitleProps {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ onBlur?: () => void;
6
+ placeholder?: string;
7
+ }
8
+ declare const EditableTitle: FC<EditableTitleProps>;
9
+ export default EditableTitle;
@@ -0,0 +1,3 @@
1
+ export { default as EditableTitle } from './editable-title';
2
+ export { default as GroupItemModal } from './group-item-modal';
3
+ export { default as ItemInfoModal } from './info-modal';
@@ -13,6 +13,10 @@ export interface SortableItemProps<D, C> {
13
13
  childrenLength?: number;
14
14
  contextMenuProps?: false | Partial<ContextMenuProps<D, C>>;
15
15
  icon?: React.ReactNode;
16
+ /**
17
+ * 来源 当前仅支持 dock
18
+ */
19
+ from?: string;
16
20
  }
17
21
  export declare const SortableItemDefaultContent: <D, C>(props: SortableItemProps<D, C>) => import("react/jsx-runtime").JSX.Element;
18
22
  declare const SortableItem: <D, C>(props: SortableItemProps<D, C>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ interface BaseModalProps {
3
+ visible: boolean;
4
+ onClose: () => void;
5
+ title?: ReactNode;
6
+ children?: ReactNode;
7
+ width?: number;
8
+ mousePosition?: {
9
+ x: number;
10
+ y: number;
11
+ } | null;
12
+ destroyOnClose?: boolean;
13
+ closable?: boolean;
14
+ footer?: ReactNode;
15
+ }
16
+ declare const BaseModal: (props: BaseModalProps) => import("react/jsx-runtime").JSX.Element;
17
+ export default BaseModal;
@@ -0,0 +1 @@
1
+ export { default as BaseModal } from './base-modal';
@@ -0,0 +1,33 @@
1
+ import { default as React } from 'react';
2
+ export interface PaginationProps {
3
+ /**
4
+ * 当前活跃的页面索引
5
+ */
6
+ activeSlide: number;
7
+ /**
8
+ * 拖拽进入分页点的回调
9
+ */
10
+ onDragEnter: (index: number) => void;
11
+ /**
12
+ * 点击分页点的回调
13
+ */
14
+ onClick?: (index: number) => void;
15
+ /**
16
+ * 自定义分页点容器构建器
17
+ */
18
+ pagingDotsBuilder?: (dots: React.ReactNode[]) => React.ReactNode;
19
+ /**
20
+ * react-slick 生成的分页点数组
21
+ */
22
+ slickDots: React.ReactNode[];
23
+ /**
24
+ * 是否禁用分页显示
25
+ */
26
+ disabled?: boolean;
27
+ /**
28
+ * 额外的CSS类名
29
+ */
30
+ className?: string;
31
+ }
32
+ declare const Pagination: ({ pagingDotsBuilder, slickDots, disabled, className }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
33
+ export default Pagination;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { ListItem } from '../types';
3
+ export declare const createCustomPagingDot: <D, C>(list: ListItem<D, C>[], activeSlide: number, pagingDotBuilder?: (item: ListItem<D, C>, index: number, isActive: boolean) => React.ReactElement) => (index: number) => React.ReactElement;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { default as Slider, Settings } from 'react-slick';
3
3
  import { SortItem } from './types';
4
+ import { DockProps } from './dock/dock';
4
5
  export interface Pagination {
5
6
  position?: "top" | "bottom" | "left" | "right";
6
7
  }
@@ -30,6 +31,39 @@ export interface SortableProps<D, C> {
30
31
  * 自定义额外项目,将显示在子项列表末尾
31
32
  */
32
33
  extraItems?: (listItem: SortItem<D, C>) => React.ReactNode;
34
+ /**
35
+ * dock 配置
36
+ */
37
+ dock?: {
38
+ /**
39
+ * 是否显示 dock
40
+ */
41
+ enabled?: boolean;
42
+ /**
43
+ * dock 位置
44
+ */
45
+ position?: "top" | "bottom" | "left" | "right";
46
+ /**
47
+ * dock 样式类名
48
+ */
49
+ className?: string;
50
+ /**
51
+ * 自定义 dock 项目渲染
52
+ */
53
+ itemBuilder?: DockProps["itemBuilder"];
54
+ /**
55
+ * 自定义固定项目渲染
56
+ */
57
+ fixedItemBuilder?: DockProps["fixedItemBuilder"];
58
+ /**
59
+ * 固定项目列表(在sortable之前显示,不可拖拽排序)
60
+ */
61
+ fixedItems?: DockProps["fixedItems"];
62
+ /**
63
+ * 是否显示启动台按钮
64
+ */
65
+ showLaunchpad?: boolean;
66
+ };
33
67
  }
34
68
  declare const Sortable: <D, C>(props: SortableProps<D, C>) => import("react/jsx-runtime").JSX.Element;
35
69
  export default Sortable;
@@ -0,0 +1,2 @@
1
+ import { Theme } from '.';
2
+ export declare const themeDark: Theme;
@@ -0,0 +1,42 @@
1
+ import { themeDark } from './dark';
2
+ import { themeLight } from './light';
3
+ export interface DockTheme {
4
+ backgroundColor?: string;
5
+ borderColor?: string;
6
+ boxShadowColor?: string;
7
+ divider?: {
8
+ color?: string;
9
+ };
10
+ }
11
+ export interface LaunchpadTheme {
12
+ button?: {
13
+ backgroundColor?: string;
14
+ subBackgroundColor?: string;
15
+ thirdBackgroundColor?: string;
16
+ borderColor?: string;
17
+ hoverBackgroundColor?: string;
18
+ };
19
+ modal?: {};
20
+ }
21
+ export interface Theme {
22
+ token: {
23
+ itemNameColor?: string;
24
+ itemIconBackgroundColor?: string;
25
+ itemIconShadowColor?: string;
26
+ groupItemIconBackgroundColor?: string;
27
+ groupItemIconShadowColor?: string;
28
+ groupItemModalBackgroundColor?: string;
29
+ contextMenuTextColor?: string;
30
+ contextMenuActiveColor?: string;
31
+ contextMenuBackgroundColor?: string;
32
+ contextMenuShadowColor?: string;
33
+ dock?: DockTheme;
34
+ };
35
+ }
36
+ export declare const defaultTheme: Theme;
37
+ export declare const themes: {
38
+ light: Theme;
39
+ dark: Theme;
40
+ };
41
+ export type ThemeType = keyof typeof themes;
42
+ export { themeLight, themeDark };
@@ -0,0 +1,2 @@
1
+ import { Theme } from '.';
2
+ export declare const themeLight: Theme;