zs_library 0.8.2 → 0.9.1
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/README.md +25 -0
- package/dist/components/desktop/context/config/context.d.ts +2 -3
- package/dist/components/desktop/context/state/context-menu-context.d.ts +21 -0
- package/dist/components/desktop/context/state/context.d.ts +2 -32
- package/dist/components/desktop/context/state/drag-context.d.ts +20 -0
- package/dist/components/desktop/context/state/hooks.d.ts +36 -1
- package/dist/components/desktop/context/state/modal-context.d.ts +10 -0
- package/dist/components/desktop/drawer/base-drawer.d.ts +1 -0
- package/dist/components/desktop/index.d.ts +10 -0
- package/dist/components/desktop/items/group-item.d.ts +1 -0
- package/dist/components/desktop/items/sortable-item.d.ts +1 -0
- package/dist/components/desktop/modal/base-modal.d.ts +1 -0
- package/dist/components/desktop/sortable.d.ts +2 -0
- package/dist/components/desktop-next/component-registry/remote-loader.d.ts +19 -0
- package/dist/components/desktop-next/config.d.ts +44 -0
- package/dist/components/desktop-next/context-menu/capsule-background.d.ts +8 -0
- package/dist/components/desktop-next/context-menu/content.d.ts +5 -0
- package/dist/components/desktop-next/context-menu/hover-context.d.ts +5 -0
- package/dist/components/desktop-next/context-menu/index.d.ts +14 -0
- package/dist/components/desktop-next/context-menu/menu-item.d.ts +10 -0
- package/dist/components/desktop-next/context-menu/portal.d.ts +2 -0
- package/dist/components/desktop-next/context-menu/size-sub-menu-content.d.ts +7 -0
- package/dist/components/desktop-next/context-menu/sub-menu-item.d.ts +9 -0
- package/dist/components/desktop-next/context.d.ts +86 -0
- package/dist/components/desktop-next/dock/dock.d.ts +20 -0
- package/dist/components/desktop-next/dock/index.d.ts +9 -0
- package/dist/components/desktop-next/dock/launchpad-button.d.ts +12 -0
- package/dist/components/desktop-next/dock/launchpad-modal.d.ts +10 -0
- package/dist/components/desktop-next/dock/search-box.d.ts +11 -0
- package/dist/components/desktop-next/dock/stacked-icon.d.ts +11 -0
- package/dist/components/desktop-next/drawer/base-drawer.d.ts +12 -0
- package/dist/components/desktop-next/drawer/index.d.ts +2 -0
- package/dist/components/desktop-next/grid.d.ts +9 -0
- package/dist/components/desktop-next/hooks/use-drag-engine.d.ts +11 -0
- package/dist/components/desktop-next/hooks/use-folder-sort-engine.d.ts +13 -0
- package/dist/components/desktop-next/hooks/use-grid-layout.d.ts +11 -0
- package/dist/components/desktop-next/index.d.ts +39 -0
- package/dist/components/desktop-next/items/folder-item.d.ts +14 -0
- package/dist/components/desktop-next/items/grid-item.d.ts +17 -0
- package/dist/components/desktop-next/modal/base-modal.d.ts +23 -0
- package/dist/components/desktop-next/modal/folder-modal.d.ts +7 -0
- package/dist/components/desktop-next/modal/index.d.ts +2 -0
- package/dist/components/desktop-next/themes/dark.d.ts +2 -0
- package/dist/components/desktop-next/themes/index.d.ts +125 -0
- package/dist/components/desktop-next/themes/light.d.ts +2 -0
- package/dist/components/desktop-next/themes/utils.d.ts +2 -0
- package/dist/components/desktop-next/types.d.ts +151 -0
- package/dist/components/desktop-next/utils/pinyin.d.ts +1 -0
- package/dist/components/desktop-next/utils/shatter-effect.d.ts +1 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9461 -5406
- package/package.json +1 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const useGridLayout: (iconSize: number, measureRef: React.RefObject<HTMLDivElement | null>) => {
|
|
2
|
+
getGridPosition: (index: number) => {
|
|
3
|
+
col: number;
|
|
4
|
+
row: number;
|
|
5
|
+
};
|
|
6
|
+
getIndexFromPosition: (x: number, y: number, containerRect: DOMRect) => number;
|
|
7
|
+
cols: number;
|
|
8
|
+
cellSize: number;
|
|
9
|
+
containerWidth: number;
|
|
10
|
+
gap: number;
|
|
11
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { default as React, JSX } from 'react';
|
|
2
|
+
import { DesktopDndProps, DndSortItem, DndPageItem, ComponentRegistry } from './types';
|
|
3
|
+
import { DockProps } from './dock';
|
|
4
|
+
import { Theme } from './themes';
|
|
5
|
+
export interface DesktopHandle {
|
|
6
|
+
pages: DndPageItem[];
|
|
7
|
+
currentPage: number;
|
|
8
|
+
setCurrentPage: (page: number) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface DesktopDndExtendedProps<D = unknown> extends DesktopDndProps<D> {
|
|
11
|
+
dockProps?: DockProps;
|
|
12
|
+
theme?: Theme | "light" | "dark";
|
|
13
|
+
noLetters?: boolean;
|
|
14
|
+
storageKey?: string;
|
|
15
|
+
pageTransition?: import('./types').PageTransition;
|
|
16
|
+
itemBuilder?: (item: DndSortItem, index: number) => React.ReactNode | null;
|
|
17
|
+
itemBuilderAllowNull?: boolean;
|
|
18
|
+
itemIconBuilderAllowNull?: boolean;
|
|
19
|
+
pagingDotBuilder?: (index: number, isActive: boolean) => React.ReactNode;
|
|
20
|
+
pagingDotsBuilder?: (dots: React.ReactNode[]) => React.ReactNode;
|
|
21
|
+
extraItems?: DndSortItem[];
|
|
22
|
+
componentRegistry?: ComponentRegistry;
|
|
23
|
+
}
|
|
24
|
+
declare const DesktopDnd: <D = unknown>(props: DesktopDndExtendedProps<D> & {
|
|
25
|
+
ref?: React.ForwardedRef<DesktopHandle>;
|
|
26
|
+
}) => JSX.Element;
|
|
27
|
+
export default DesktopDnd;
|
|
28
|
+
export type { DesktopDndProps, DndSortItem, DndPageItem, DndItemBaseData, SizeConfig, SortItemUserConfig, MenuItemConfig, DataTypeMenuConfigMap, SortItemDefaultConfig, TypeConfigMap, ContextMenuData, DesktopDndContextMenuProps, ContextMenuActionPayload, ContextMenuActionType, ListItem, SortItemBaseData, SortItemBaseConfig, ComponentRegistryEntry, ComponentRegistry, PageTransition, } from './types';
|
|
29
|
+
export { loadRemoteComponent, RemoteComponentErrorBoundary } from './component-registry/remote-loader';
|
|
30
|
+
export { appDefaultConfig, groupDefaultConfig, builtinConfigMap, getDefaultConfig, commonSizeConfigs, commonSizeConfigsArray, getSizeConfig, getItemSize, getDataTypeMenuConfig, } from './config';
|
|
31
|
+
export type { Theme, ThemeType } from './themes';
|
|
32
|
+
export { themeLight, themeDark, defaultTheme, themes, } from './themes';
|
|
33
|
+
export { mergeTheme } from './themes/utils';
|
|
34
|
+
export { Dock, LaunchpadModal, LaunchpadButton, StackedIcon, SearchBox } from './dock';
|
|
35
|
+
export type { DockProps, LaunchpadModalProps, LaunchpadButtonProps, StackedIconProps } from './dock';
|
|
36
|
+
export { BaseModal } from './modal';
|
|
37
|
+
export type { BaseModalProps } from './modal';
|
|
38
|
+
export { BaseDrawer } from './drawer';
|
|
39
|
+
export type { BaseDrawerProps } from './drawer';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DndSortItem } from '../types';
|
|
3
|
+
interface FolderItemProps {
|
|
4
|
+
item: DndSortItem;
|
|
5
|
+
onDragStart: (item: DndSortItem, clientX: number, clientY: number, pointerId: number, el: HTMLElement) => void;
|
|
6
|
+
onItemClick?: (item: DndSortItem) => void;
|
|
7
|
+
iconBuilder?: (item: DndSortItem) => React.ReactNode;
|
|
8
|
+
size?: {
|
|
9
|
+
col: number;
|
|
10
|
+
row: number;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare const FolderItem: ({ item, onDragStart, iconBuilder, size, }: FolderItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default FolderItem;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DndSortItem } from '../types';
|
|
3
|
+
interface GridItemProps {
|
|
4
|
+
item: DndSortItem;
|
|
5
|
+
onDragStart: (item: DndSortItem, clientX: number, clientY: number, pointerId: number, el: HTMLElement) => void;
|
|
6
|
+
onItemClick?: (item: DndSortItem) => void;
|
|
7
|
+
iconBuilder?: (item: DndSortItem) => React.ReactNode;
|
|
8
|
+
size?: {
|
|
9
|
+
col: number;
|
|
10
|
+
row: number;
|
|
11
|
+
};
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
noLabel?: boolean;
|
|
14
|
+
iconSize?: number;
|
|
15
|
+
}
|
|
16
|
+
declare const _default: React.MemoExoticComponent<({ item, onDragStart, onItemClick, iconBuilder, size, children, noLabel, iconSize: iconSizeProp, }: GridItemProps) => import("react/jsx-runtime").JSX.Element>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Theme } from '../themes';
|
|
3
|
+
export interface BaseModalProps {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
title?: ReactNode;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
width?: number;
|
|
9
|
+
mousePosition?: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
} | null;
|
|
13
|
+
destroyOnClose?: boolean;
|
|
14
|
+
closable?: boolean;
|
|
15
|
+
footer?: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
rootClassName?: string;
|
|
18
|
+
contentClassName?: string;
|
|
19
|
+
disableMaxHeight?: boolean;
|
|
20
|
+
theme?: Theme;
|
|
21
|
+
}
|
|
22
|
+
declare const BaseModal: (props: BaseModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default BaseModal;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DndSortItem } from '../types';
|
|
3
|
+
interface FolderModalProps {
|
|
4
|
+
iconBuilder?: (item: DndSortItem) => React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const FolderModal: ({ iconBuilder }: FolderModalProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export default FolderModal;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { themeDark } from './dark';
|
|
2
|
+
import { themeLight } from './light';
|
|
3
|
+
export interface BaseModalTheme {
|
|
4
|
+
mask?: {
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
backdropFilter?: string;
|
|
7
|
+
};
|
|
8
|
+
content?: {
|
|
9
|
+
backgroundColor?: string;
|
|
10
|
+
backdropFilter?: string;
|
|
11
|
+
boxShadowColor?: string;
|
|
12
|
+
boxShadowBorderColor?: string;
|
|
13
|
+
borderColor?: string;
|
|
14
|
+
borderRadius?: string;
|
|
15
|
+
};
|
|
16
|
+
header?: {
|
|
17
|
+
textColor?: string;
|
|
18
|
+
};
|
|
19
|
+
scrollbar?: {
|
|
20
|
+
width?: string;
|
|
21
|
+
trackColor?: string;
|
|
22
|
+
thumbColor?: string;
|
|
23
|
+
thumbHoverColor?: string;
|
|
24
|
+
borderRadius?: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface DockTheme {
|
|
28
|
+
backgroundColor?: string;
|
|
29
|
+
borderColor?: string;
|
|
30
|
+
boxShadowColor?: string;
|
|
31
|
+
divider?: {
|
|
32
|
+
color?: string;
|
|
33
|
+
};
|
|
34
|
+
launchpad?: {
|
|
35
|
+
modal?: {
|
|
36
|
+
searchBox?: {
|
|
37
|
+
iconColor?: string;
|
|
38
|
+
iconFocusColor?: string;
|
|
39
|
+
backgroundColor?: string;
|
|
40
|
+
focusBackgroundColor?: string;
|
|
41
|
+
textColor?: string;
|
|
42
|
+
placeholderColor?: string;
|
|
43
|
+
shadowColor?: string;
|
|
44
|
+
clearButton?: {
|
|
45
|
+
backgroundColor?: string;
|
|
46
|
+
hoverBackgroundColor?: string;
|
|
47
|
+
textColor?: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
icon?: {
|
|
52
|
+
textColor?: string;
|
|
53
|
+
backgroundColor?: string;
|
|
54
|
+
borderColor?: string;
|
|
55
|
+
shadowColor?: string;
|
|
56
|
+
hoverGlowColor?: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export interface LaunchpadTheme {
|
|
61
|
+
button?: {
|
|
62
|
+
backgroundColor?: string;
|
|
63
|
+
subBackgroundColor?: string;
|
|
64
|
+
thirdBackgroundColor?: string;
|
|
65
|
+
borderColor?: string;
|
|
66
|
+
hoverBackgroundColor?: string;
|
|
67
|
+
};
|
|
68
|
+
modal?: BaseModalTheme;
|
|
69
|
+
}
|
|
70
|
+
export interface ContextMenuTheme {
|
|
71
|
+
textColor?: string;
|
|
72
|
+
activeColor?: string;
|
|
73
|
+
dangerColor?: string;
|
|
74
|
+
backgroundColor?: string;
|
|
75
|
+
shadowColor?: string;
|
|
76
|
+
boxShadowBorderColor?: string;
|
|
77
|
+
borderColor?: string;
|
|
78
|
+
backdropFilter?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface ItemsTheme {
|
|
81
|
+
textColor?: string;
|
|
82
|
+
iconBackgroundColor?: string;
|
|
83
|
+
iconShadowColor?: string;
|
|
84
|
+
groupIconBackgroundColor?: string;
|
|
85
|
+
groupIconShadowColor?: string;
|
|
86
|
+
infoModalBackgroundColor?: string;
|
|
87
|
+
groupModal?: {
|
|
88
|
+
backgroundColor?: string;
|
|
89
|
+
title?: {
|
|
90
|
+
textColor?: string;
|
|
91
|
+
backgroundColor?: string;
|
|
92
|
+
hoverBackgroundColor?: string;
|
|
93
|
+
focusBackgroundColor?: string;
|
|
94
|
+
shadowColor?: string;
|
|
95
|
+
placeholderColor?: string;
|
|
96
|
+
selectionBackgroundColor?: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export interface BaseTheme {
|
|
101
|
+
hoverColor?: string;
|
|
102
|
+
dangerColor?: string;
|
|
103
|
+
backgroundColor?: string;
|
|
104
|
+
textColor?: string;
|
|
105
|
+
shadowColor?: string;
|
|
106
|
+
boxShadowBorderColor?: string;
|
|
107
|
+
borderColor?: string;
|
|
108
|
+
backdropFilter?: string;
|
|
109
|
+
}
|
|
110
|
+
export interface Theme {
|
|
111
|
+
token: {
|
|
112
|
+
base?: BaseTheme;
|
|
113
|
+
dock?: DockTheme;
|
|
114
|
+
modal?: BaseModalTheme;
|
|
115
|
+
contextMenu?: ContextMenuTheme;
|
|
116
|
+
items?: ItemsTheme;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export declare const defaultTheme: Theme;
|
|
120
|
+
export declare const themes: {
|
|
121
|
+
light: Theme;
|
|
122
|
+
dark: Theme;
|
|
123
|
+
};
|
|
124
|
+
export type ThemeType = keyof typeof themes;
|
|
125
|
+
export { themeLight, themeDark };
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** 基础数据接口 */
|
|
3
|
+
export interface DndItemBaseData {
|
|
4
|
+
name: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
iconColor?: string;
|
|
7
|
+
}
|
|
8
|
+
/** 桌面项 */
|
|
9
|
+
export interface DndSortItem<D = any> {
|
|
10
|
+
id: string | number;
|
|
11
|
+
/** 项目类型: app 或 group(文件夹) */
|
|
12
|
+
type: "app" | "group" | string;
|
|
13
|
+
dataType?: string;
|
|
14
|
+
config?: SortItemUserConfig;
|
|
15
|
+
data?: D & DndItemBaseData;
|
|
16
|
+
children?: DndSortItem<D>[];
|
|
17
|
+
}
|
|
18
|
+
/** 分页数据 */
|
|
19
|
+
export interface DndPageItem<D = any> {
|
|
20
|
+
id: string | number;
|
|
21
|
+
children: DndSortItem<D>[];
|
|
22
|
+
}
|
|
23
|
+
/** 拖拽状态 */
|
|
24
|
+
export interface DragState {
|
|
25
|
+
activeId: string | number | null;
|
|
26
|
+
isDragging: boolean;
|
|
27
|
+
pointerPosition: {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
} | null;
|
|
31
|
+
pointerOffset: {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
} | null;
|
|
35
|
+
mergeTargetId: string | number | null;
|
|
36
|
+
dragSource: "main" | "folder" | null;
|
|
37
|
+
draggedItem: DndSortItem | null;
|
|
38
|
+
gapIndex: number;
|
|
39
|
+
sourcePageIndex: number;
|
|
40
|
+
}
|
|
41
|
+
/** 文件夹弹窗状态 */
|
|
42
|
+
export interface FolderModalState {
|
|
43
|
+
openFolder: DndSortItem | null;
|
|
44
|
+
openPosition: {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
} | null;
|
|
48
|
+
}
|
|
49
|
+
export type PageTransition = "slide" | "cube" | "fade" | "zoom";
|
|
50
|
+
/** 组件 Props */
|
|
51
|
+
export interface DesktopDndProps<D = any> {
|
|
52
|
+
pages: DndPageItem<D>[];
|
|
53
|
+
onChange: (pages: DndPageItem<D>[]) => void;
|
|
54
|
+
iconSize?: number;
|
|
55
|
+
onItemClick?: (item: DndSortItem<D>) => void;
|
|
56
|
+
itemIconBuilder?: (item: DndSortItem<D>) => React.ReactNode;
|
|
57
|
+
className?: string;
|
|
58
|
+
maxPages?: number;
|
|
59
|
+
mergeDwellTime?: number;
|
|
60
|
+
typeConfigMap?: TypeConfigMap;
|
|
61
|
+
dataTypeMenuConfigMap?: DataTypeMenuConfigMap;
|
|
62
|
+
onRemoveClick?: (item: DndSortItem<D>) => void;
|
|
63
|
+
onContextMenuItemClick?: (item: DndSortItem<D>, payload: ContextMenuActionPayload) => void;
|
|
64
|
+
contextMenuProps?: DesktopDndContextMenuProps;
|
|
65
|
+
}
|
|
66
|
+
export interface SizeConfig {
|
|
67
|
+
id?: string;
|
|
68
|
+
name: string;
|
|
69
|
+
col: number;
|
|
70
|
+
row: number;
|
|
71
|
+
}
|
|
72
|
+
export interface SortItemUserConfig {
|
|
73
|
+
sizeId?: string;
|
|
74
|
+
sourceId?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface MenuItemConfig {
|
|
77
|
+
text: string;
|
|
78
|
+
icon?: ReactNode;
|
|
79
|
+
color?: string;
|
|
80
|
+
textColor?: string;
|
|
81
|
+
onClick?: (item: DndSortItem, contextActions: DesktopDndContextActions) => void;
|
|
82
|
+
}
|
|
83
|
+
export type DataTypeMenuConfigMap = Record<string, MenuItemConfig[]>;
|
|
84
|
+
export interface SortItemDefaultConfig {
|
|
85
|
+
sizeConfigs?: SizeConfig[];
|
|
86
|
+
defaultSizeId?: string;
|
|
87
|
+
allowResize?: boolean;
|
|
88
|
+
allowContextMenu?: boolean;
|
|
89
|
+
allowShare?: boolean;
|
|
90
|
+
allowDelete?: boolean;
|
|
91
|
+
allowInfo?: boolean;
|
|
92
|
+
}
|
|
93
|
+
/** 完整的配置接口(用户配置 + 系统默认配置) */
|
|
94
|
+
export interface SortItemBaseConfig extends SortItemUserConfig, SortItemDefaultConfig {
|
|
95
|
+
}
|
|
96
|
+
export interface SortItemBaseData {
|
|
97
|
+
name: string;
|
|
98
|
+
icon?: string;
|
|
99
|
+
iconColor?: string;
|
|
100
|
+
}
|
|
101
|
+
/** List项目类型,只包含id、type、children三个属性 */
|
|
102
|
+
export interface ListItem<D = any> {
|
|
103
|
+
id: string | number;
|
|
104
|
+
/** 区分数据类型:page表示分页数据,dock表示dock数据,string任意类型 */
|
|
105
|
+
type: "page" | "dock" | string;
|
|
106
|
+
children: DndSortItem<D>[];
|
|
107
|
+
}
|
|
108
|
+
export interface ComponentRegistryEntry {
|
|
109
|
+
name: string;
|
|
110
|
+
sizeConfigs?: SizeConfig[];
|
|
111
|
+
defaultSizeId?: string;
|
|
112
|
+
allowResize?: boolean;
|
|
113
|
+
allowContextMenu?: boolean;
|
|
114
|
+
allowShare?: boolean;
|
|
115
|
+
allowDelete?: boolean;
|
|
116
|
+
allowInfo?: boolean;
|
|
117
|
+
component?: React.ComponentType<{
|
|
118
|
+
item: DndSortItem;
|
|
119
|
+
}>;
|
|
120
|
+
iconUrl?: string;
|
|
121
|
+
remoteUrl?: string;
|
|
122
|
+
meta?: Record<string, unknown>;
|
|
123
|
+
}
|
|
124
|
+
export type ComponentRegistry = Record<string, ComponentRegistryEntry>;
|
|
125
|
+
export type SortableItemData = DndSortItem;
|
|
126
|
+
export type DesktopSizeConfig = SizeConfig;
|
|
127
|
+
export type DesktopTypeConfigMap = TypeConfigMap;
|
|
128
|
+
export type TypeConfigMap = Record<string, SortItemDefaultConfig>;
|
|
129
|
+
export interface ContextMenuData {
|
|
130
|
+
rect: DOMRect;
|
|
131
|
+
data: DndSortItem;
|
|
132
|
+
pageX?: number;
|
|
133
|
+
pageY?: number;
|
|
134
|
+
element?: Element | null;
|
|
135
|
+
}
|
|
136
|
+
export interface DesktopDndContextActions {
|
|
137
|
+
setContextMenu: (data: ContextMenuData | null) => void;
|
|
138
|
+
hideContextMenu: () => void;
|
|
139
|
+
removeItem: (itemId: string | number) => void;
|
|
140
|
+
updateItemConfig: (itemId: string | number, config: SortItemUserConfig) => void;
|
|
141
|
+
}
|
|
142
|
+
export interface DesktopDndContextMenuProps {
|
|
143
|
+
showRemoveButton?: boolean;
|
|
144
|
+
showSizeButton?: boolean;
|
|
145
|
+
}
|
|
146
|
+
export type ContextMenuActionType = "remove" | "resize" | "custom";
|
|
147
|
+
export interface ContextMenuActionPayload {
|
|
148
|
+
actionType: ContextMenuActionType;
|
|
149
|
+
menuItem?: MenuItemConfig;
|
|
150
|
+
sizeConfig?: SizeConfig;
|
|
151
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getGroupLetter(name: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function playShatterEffect(element: Element): Promise<void>;
|
|
@@ -33,5 +33,14 @@ export { default as GeoMap } from './map-view';
|
|
|
33
33
|
export type { GeoMapProps } from './map-view';
|
|
34
34
|
export { default as SimpleEditor, SimpleEditorViewer, useSimpleEditor, jsonToHtml, htmlToJson, EditorFormatConverter, } from './tiptap-editor/simple';
|
|
35
35
|
export type { SimpleEditorProps, SimpleEditorViewerProps, SimpleEditorFeatures, EditorOutputFormat, UseSimpleEditorProps, JSONContent, } from './tiptap-editor/simple';
|
|
36
|
+
export { default as DesktopNext } from './desktop-next';
|
|
37
|
+
export { commonSizeConfigs as desktopNextCommonSizeConfigs, appDefaultConfig as desktopNextAppDefaultConfig, groupDefaultConfig as desktopNextGroupDefaultConfig, builtinConfigMap as desktopNextBuiltinConfigMap, getDefaultConfig as getDesktopNextDefaultConfig, getSizeConfig as getDesktopNextSizeConfig, getItemSize as getDesktopNextItemSize, } from './desktop-next/config';
|
|
38
|
+
export { themeLight as desktopNextThemeLight, themeDark as desktopNextThemeDark, defaultTheme as desktopNextDefaultTheme, themes as desktopNextThemes, } from './desktop-next/themes';
|
|
39
|
+
export type { Theme as DesktopNextTheme, ThemeType as DesktopNextThemeType, } from './desktop-next/themes';
|
|
40
|
+
export type { DesktopDndProps as DesktopNextProps, DndSortItem, DndPageItem, DndItemBaseData, SizeConfig, SortItemUserConfig, MenuItemConfig, DataTypeMenuConfigMap, SortItemDefaultConfig, TypeConfigMap, ContextMenuData, DesktopDndContextMenuProps as DesktopNextContextMenuProps, ContextMenuActionPayload, ContextMenuActionType, } from './desktop-next/types';
|
|
41
|
+
export { default as DesktopDnd } from './desktop-next';
|
|
42
|
+
/** @deprecated Use desktopNextCommonSizeConfigs instead */
|
|
43
|
+
export { commonSizeConfigs as desktopDndCommonSizeConfigs, appDefaultConfig as desktopDndAppDefaultConfig, groupDefaultConfig as desktopDndGroupDefaultConfig, builtinConfigMap as desktopDndBuiltinConfigMap, getDefaultConfig as getDesktopDndDefaultConfig, getSizeConfig as getDesktopDndSizeConfig, getItemSize as getDesktopDndItemSize, } from './desktop-next/config';
|
|
44
|
+
export type { DesktopDndProps, DesktopDndContextMenuProps, } from './desktop-next/types';
|
|
36
45
|
export { PhotoWatermark, availableTemplates, extractExifData, parseExifData, formatXiaomiLeicaExifData, HtmlRenderer, } from './photo-watermark';
|
|
37
46
|
export type { ExifData, ExifExtractResult, WatermarkComponentProps as PhotoWatermarkProps, TemplateConfig, ExifParamsForm } from './photo-watermark';
|