@kine-design/core 0.0.1-beta.10 → 0.0.1-beta.11
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/.vlaude/last-session-id +1 -1
- package/components/base/autoComplete/api.ts +1 -1
- package/components/base/cascader/api.ts +1 -1
- package/components/base/datePicker/__tests__/useDatePicker.test.ts +8 -17
- package/components/base/datePicker/api.ts +1 -1
- package/components/base/datePicker/index.ts +1 -1
- package/components/base/datePicker/useDatePicker.ts +1 -18
- package/components/base/empty/api.ts +1 -1
- package/components/base/select/api.ts +1 -1
- package/components/base/timePicker/__tests__/useTimePicker.test.ts +5 -4
- package/components/base/timePicker/api.ts +1 -1
- package/components/base/timePicker/useTimePicker.ts +1 -1
- package/components/base/tooltip/api.ts +2 -3
- package/components/base/tooltip/index.ts +2 -3
- package/components/base/tooltip/props.d.ts +6 -12
- package/components/base/tooltip/useTooltip.ts +56 -175
- package/components/base/transfer/api.ts +2 -2
- package/components/message/confirm/api.ts +2 -2
- package/compositions/common/useLocale.ts +53 -0
- package/dist/components/base/datePicker/index.d.ts +1 -1
- package/dist/components/base/datePicker/useDatePicker.d.ts +0 -7
- package/dist/components/base/tooltip/index.d.ts +0 -1
- package/dist/components/base/tooltip/useTooltip.d.ts +17 -20
- package/dist/compositions/common/useLocale.d.ts +14 -0
- package/dist/core.js +498 -851
- package/dist/index.d.ts +2 -1
- package/dist/locale/en.d.ts +3 -0
- package/dist/locale/index.d.ts +9 -0
- package/dist/locale/types.d.ts +222 -0
- package/dist/locale/zh.d.ts +3 -0
- package/index.ts +9 -1
- package/locale/.vlaude/last-session-id +1 -0
- package/locale/en.ts +187 -0
- package/locale/index.ts +29 -0
- package/locale/types.ts +214 -0
- package/locale/zh.ts +190 -0
- package/package.json +19 -32
- package/.vlaude/session-switch.signal +0 -1
- package/compositions/commandPalette/index.ts +0 -11
- package/compositions/commandPalette/types.ts +0 -29
- package/compositions/commandPalette/useCommandPalette.ts +0 -135
- package/compositions/contextMenu/index.ts +0 -10
- package/compositions/contextMenu/types.ts +0 -21
- package/compositions/contextMenu/useContextMenu.ts +0 -101
- package/compositions/editor/index.ts +0 -18
- package/compositions/editor/types.ts +0 -147
- package/compositions/editor/useEditor.ts +0 -224
- package/compositions/index.ts +0 -15
- package/compositions/overlay/index.ts +0 -14
- package/compositions/overlay/useOverlayStack.ts +0 -146
- package/compositions/peekView/index.ts +0 -10
- package/compositions/peekView/usePeekView.ts +0 -99
- package/compositions/theme/index.ts +0 -17
- package/compositions/theme/presets/compact.ts +0 -117
- package/compositions/theme/presets/dark.ts +0 -113
- package/compositions/theme/presets/index.ts +0 -11
- package/compositions/theme/presets/light.ts +0 -113
- package/compositions/theme/types.ts +0 -46
- package/compositions/theme/useTheme.ts +0 -269
- package/compositions/toast/index.ts +0 -10
- package/compositions/toast/useToast.ts +0 -176
- package/compositions/tooltip/index.ts +0 -9
- package/compositions/tooltip/useTooltip.ts +0 -10
- package/dist/compositions/commandPalette/index.d.ts +0 -11
- package/dist/compositions/commandPalette/types.d.ts +0 -20
- package/dist/compositions/commandPalette/useCommandPalette.d.ts +0 -32
- package/dist/compositions/contextMenu/index.d.ts +0 -10
- package/dist/compositions/contextMenu/types.d.ts +0 -12
- package/dist/compositions/contextMenu/useContextMenu.d.ts +0 -52
- package/dist/compositions/editor/index.d.ts +0 -10
- package/dist/compositions/editor/types.d.ts +0 -132
- package/dist/compositions/editor/useEditor.d.ts +0 -13
- package/dist/compositions/index.d.ts +0 -15
- package/dist/compositions/overlay/index.d.ts +0 -10
- package/dist/compositions/overlay/useOverlayStack.d.ts +0 -188
- package/dist/compositions/peekView/index.d.ts +0 -10
- package/dist/compositions/peekView/usePeekView.d.ts +0 -16
- package/dist/compositions/theme/index.d.ts +0 -11
- package/dist/compositions/theme/presets/compact.d.ts +0 -6
- package/dist/compositions/theme/presets/dark.d.ts +0 -2
- package/dist/compositions/theme/presets/index.d.ts +0 -11
- package/dist/compositions/theme/presets/light.d.ts +0 -2
- package/dist/compositions/theme/types.d.ts +0 -41
- package/dist/compositions/theme/useTheme.d.ts +0 -167
- package/dist/compositions/toast/index.d.ts +0 -10
- package/dist/compositions/toast/useToast.d.ts +0 -71
- package/dist/compositions/tooltip/index.d.ts +0 -9
- package/dist/compositions/tooltip/useTooltip.d.ts +0 -10
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
export type OverlayType = 'popover' | 'alert-dialog' | 'context-menu' | 'command-palette';
|
|
2
|
-
export interface OverlayItem {
|
|
3
|
-
id: string;
|
|
4
|
-
type: OverlayType;
|
|
5
|
-
close: () => void;
|
|
6
|
-
zIndex: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const useOverlayStackStore: import('pinia').StoreDefinition<"overlayStack", Pick<{
|
|
9
|
-
overlayStack: import('vue').Ref<{
|
|
10
|
-
id: string;
|
|
11
|
-
type: OverlayType;
|
|
12
|
-
close: () => void;
|
|
13
|
-
zIndex: number;
|
|
14
|
-
}[], OverlayItem[] | {
|
|
15
|
-
id: string;
|
|
16
|
-
type: OverlayType;
|
|
17
|
-
close: () => void;
|
|
18
|
-
zIndex: number;
|
|
19
|
-
}[]>;
|
|
20
|
-
isEmpty: import('vue').ComputedRef<boolean>;
|
|
21
|
-
topItem: import('vue').ComputedRef<{
|
|
22
|
-
id: string;
|
|
23
|
-
type: OverlayType;
|
|
24
|
-
close: () => void;
|
|
25
|
-
zIndex: number;
|
|
26
|
-
} | undefined>;
|
|
27
|
-
push: (item: Omit<OverlayItem, "zIndex">) => OverlayItem;
|
|
28
|
-
pop: () => {
|
|
29
|
-
id: string;
|
|
30
|
-
type: OverlayType;
|
|
31
|
-
close: () => void;
|
|
32
|
-
zIndex: number;
|
|
33
|
-
} | undefined;
|
|
34
|
-
remove: (id: string) => void;
|
|
35
|
-
attachEscListener: () => void;
|
|
36
|
-
detachEscListener: () => void;
|
|
37
|
-
}, "overlayStack">, Pick<{
|
|
38
|
-
overlayStack: import('vue').Ref<{
|
|
39
|
-
id: string;
|
|
40
|
-
type: OverlayType;
|
|
41
|
-
close: () => void;
|
|
42
|
-
zIndex: number;
|
|
43
|
-
}[], OverlayItem[] | {
|
|
44
|
-
id: string;
|
|
45
|
-
type: OverlayType;
|
|
46
|
-
close: () => void;
|
|
47
|
-
zIndex: number;
|
|
48
|
-
}[]>;
|
|
49
|
-
isEmpty: import('vue').ComputedRef<boolean>;
|
|
50
|
-
topItem: import('vue').ComputedRef<{
|
|
51
|
-
id: string;
|
|
52
|
-
type: OverlayType;
|
|
53
|
-
close: () => void;
|
|
54
|
-
zIndex: number;
|
|
55
|
-
} | undefined>;
|
|
56
|
-
push: (item: Omit<OverlayItem, "zIndex">) => OverlayItem;
|
|
57
|
-
pop: () => {
|
|
58
|
-
id: string;
|
|
59
|
-
type: OverlayType;
|
|
60
|
-
close: () => void;
|
|
61
|
-
zIndex: number;
|
|
62
|
-
} | undefined;
|
|
63
|
-
remove: (id: string) => void;
|
|
64
|
-
attachEscListener: () => void;
|
|
65
|
-
detachEscListener: () => void;
|
|
66
|
-
}, "isEmpty" | "topItem">, Pick<{
|
|
67
|
-
overlayStack: import('vue').Ref<{
|
|
68
|
-
id: string;
|
|
69
|
-
type: OverlayType;
|
|
70
|
-
close: () => void;
|
|
71
|
-
zIndex: number;
|
|
72
|
-
}[], OverlayItem[] | {
|
|
73
|
-
id: string;
|
|
74
|
-
type: OverlayType;
|
|
75
|
-
close: () => void;
|
|
76
|
-
zIndex: number;
|
|
77
|
-
}[]>;
|
|
78
|
-
isEmpty: import('vue').ComputedRef<boolean>;
|
|
79
|
-
topItem: import('vue').ComputedRef<{
|
|
80
|
-
id: string;
|
|
81
|
-
type: OverlayType;
|
|
82
|
-
close: () => void;
|
|
83
|
-
zIndex: number;
|
|
84
|
-
} | undefined>;
|
|
85
|
-
push: (item: Omit<OverlayItem, "zIndex">) => OverlayItem;
|
|
86
|
-
pop: () => {
|
|
87
|
-
id: string;
|
|
88
|
-
type: OverlayType;
|
|
89
|
-
close: () => void;
|
|
90
|
-
zIndex: number;
|
|
91
|
-
} | undefined;
|
|
92
|
-
remove: (id: string) => void;
|
|
93
|
-
attachEscListener: () => void;
|
|
94
|
-
detachEscListener: () => void;
|
|
95
|
-
}, "pop" | "push" | "remove" | "attachEscListener" | "detachEscListener">>;
|
|
96
|
-
export declare function useOverlayStack(): import('pinia').Store<"overlayStack", Pick<{
|
|
97
|
-
overlayStack: import('vue').Ref<{
|
|
98
|
-
id: string;
|
|
99
|
-
type: OverlayType;
|
|
100
|
-
close: () => void;
|
|
101
|
-
zIndex: number;
|
|
102
|
-
}[], OverlayItem[] | {
|
|
103
|
-
id: string;
|
|
104
|
-
type: OverlayType;
|
|
105
|
-
close: () => void;
|
|
106
|
-
zIndex: number;
|
|
107
|
-
}[]>;
|
|
108
|
-
isEmpty: import('vue').ComputedRef<boolean>;
|
|
109
|
-
topItem: import('vue').ComputedRef<{
|
|
110
|
-
id: string;
|
|
111
|
-
type: OverlayType;
|
|
112
|
-
close: () => void;
|
|
113
|
-
zIndex: number;
|
|
114
|
-
} | undefined>;
|
|
115
|
-
push: (item: Omit<OverlayItem, "zIndex">) => OverlayItem;
|
|
116
|
-
pop: () => {
|
|
117
|
-
id: string;
|
|
118
|
-
type: OverlayType;
|
|
119
|
-
close: () => void;
|
|
120
|
-
zIndex: number;
|
|
121
|
-
} | undefined;
|
|
122
|
-
remove: (id: string) => void;
|
|
123
|
-
attachEscListener: () => void;
|
|
124
|
-
detachEscListener: () => void;
|
|
125
|
-
}, "overlayStack">, Pick<{
|
|
126
|
-
overlayStack: import('vue').Ref<{
|
|
127
|
-
id: string;
|
|
128
|
-
type: OverlayType;
|
|
129
|
-
close: () => void;
|
|
130
|
-
zIndex: number;
|
|
131
|
-
}[], OverlayItem[] | {
|
|
132
|
-
id: string;
|
|
133
|
-
type: OverlayType;
|
|
134
|
-
close: () => void;
|
|
135
|
-
zIndex: number;
|
|
136
|
-
}[]>;
|
|
137
|
-
isEmpty: import('vue').ComputedRef<boolean>;
|
|
138
|
-
topItem: import('vue').ComputedRef<{
|
|
139
|
-
id: string;
|
|
140
|
-
type: OverlayType;
|
|
141
|
-
close: () => void;
|
|
142
|
-
zIndex: number;
|
|
143
|
-
} | undefined>;
|
|
144
|
-
push: (item: Omit<OverlayItem, "zIndex">) => OverlayItem;
|
|
145
|
-
pop: () => {
|
|
146
|
-
id: string;
|
|
147
|
-
type: OverlayType;
|
|
148
|
-
close: () => void;
|
|
149
|
-
zIndex: number;
|
|
150
|
-
} | undefined;
|
|
151
|
-
remove: (id: string) => void;
|
|
152
|
-
attachEscListener: () => void;
|
|
153
|
-
detachEscListener: () => void;
|
|
154
|
-
}, "isEmpty" | "topItem">, Pick<{
|
|
155
|
-
overlayStack: import('vue').Ref<{
|
|
156
|
-
id: string;
|
|
157
|
-
type: OverlayType;
|
|
158
|
-
close: () => void;
|
|
159
|
-
zIndex: number;
|
|
160
|
-
}[], OverlayItem[] | {
|
|
161
|
-
id: string;
|
|
162
|
-
type: OverlayType;
|
|
163
|
-
close: () => void;
|
|
164
|
-
zIndex: number;
|
|
165
|
-
}[]>;
|
|
166
|
-
isEmpty: import('vue').ComputedRef<boolean>;
|
|
167
|
-
topItem: import('vue').ComputedRef<{
|
|
168
|
-
id: string;
|
|
169
|
-
type: OverlayType;
|
|
170
|
-
close: () => void;
|
|
171
|
-
zIndex: number;
|
|
172
|
-
} | undefined>;
|
|
173
|
-
push: (item: Omit<OverlayItem, "zIndex">) => OverlayItem;
|
|
174
|
-
pop: () => {
|
|
175
|
-
id: string;
|
|
176
|
-
type: OverlayType;
|
|
177
|
-
close: () => void;
|
|
178
|
-
zIndex: number;
|
|
179
|
-
} | undefined;
|
|
180
|
-
remove: (id: string) => void;
|
|
181
|
-
attachEscListener: () => void;
|
|
182
|
-
detachEscListener: () => void;
|
|
183
|
-
}, "pop" | "push" | "remove" | "attachEscListener" | "detachEscListener">>;
|
|
184
|
-
export declare function useOverlayItem(type: OverlayType): {
|
|
185
|
-
register: (closeFn: () => void) => OverlayItem;
|
|
186
|
-
unregister: () => void;
|
|
187
|
-
currentZIndex: import('vue').ComputedRef<number | undefined>;
|
|
188
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description peekView composables barrel export
|
|
3
|
-
* @author kine-design
|
|
4
|
-
* @date 2026/5/22
|
|
5
|
-
* @version v1.0.0
|
|
6
|
-
*
|
|
7
|
-
* 江湖的业务千篇一律,复杂的代码好几百行。
|
|
8
|
-
*/
|
|
9
|
-
export { usePeekView } from './usePeekView';
|
|
10
|
-
export type { PeekViewMode, UsePeekViewOptions } from './usePeekView';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export type PeekViewMode = 'side' | 'modal' | 'full';
|
|
2
|
-
export interface UsePeekViewOptions {
|
|
3
|
-
/** Default mode when opening without explicit mode */
|
|
4
|
-
defaultMode?: PeekViewMode;
|
|
5
|
-
/** Enable URL query param sync (?peek=<id>) */
|
|
6
|
-
urlSync?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function usePeekView(options?: UsePeekViewOptions): {
|
|
9
|
-
isOpen: import('vue').Ref<boolean, boolean>;
|
|
10
|
-
mode: import('vue').Ref<PeekViewMode, PeekViewMode>;
|
|
11
|
-
peekId: import('vue').Ref<string | undefined, string | undefined>;
|
|
12
|
-
open: (id: string, openMode?: PeekViewMode) => void;
|
|
13
|
-
close: () => void;
|
|
14
|
-
setMode: (newMode: PeekViewMode) => void;
|
|
15
|
-
handleOutsideClick: (event: MouseEvent, panelEl: HTMLElement | null) => void;
|
|
16
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description theme composables barrel export
|
|
3
|
-
* @author kine-design
|
|
4
|
-
* @date 2026/5/22
|
|
5
|
-
* @version v1.0.0
|
|
6
|
-
*
|
|
7
|
-
* 江湖的业务千篇一律,复杂的代码好几百行。
|
|
8
|
-
*/
|
|
9
|
-
export { useThemeStore } from './useTheme';
|
|
10
|
-
export type { ThemeDefinition, ThemeTokens, ThemeTokenCategory, ThemeOverrides, PersistedThemeState, } from './types';
|
|
11
|
-
export { lightTheme, darkTheme, compactTheme } from './presets';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description built-in theme presets barrel export
|
|
3
|
-
* @author kine-design
|
|
4
|
-
* @date 2026/5/22
|
|
5
|
-
* @version v1.0.0
|
|
6
|
-
*
|
|
7
|
-
* 江湖的业务千篇一律,复杂的代码好几百行。
|
|
8
|
-
*/
|
|
9
|
-
export { lightTheme } from './light';
|
|
10
|
-
export { darkTheme } from './dark';
|
|
11
|
-
export { compactTheme } from './compact';
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description theme system type definitions
|
|
3
|
-
* @author kine-design
|
|
4
|
-
* @date 2026/5/22
|
|
5
|
-
* @version v1.0.0
|
|
6
|
-
*
|
|
7
|
-
* 江湖的业务千篇一律,复杂的代码好几百行。
|
|
8
|
-
*/
|
|
9
|
-
/** Token category map: flat key-value pairs per category */
|
|
10
|
-
export interface ThemeTokens {
|
|
11
|
-
/** e.g. 'bg-primary': '#f5f5f5', 'neutral-3': '#d4d4d4', 'accent-light': '#e8f5ef' */
|
|
12
|
-
color: Record<string, string>;
|
|
13
|
-
/** e.g. '1': '2px', '2': '4px' */
|
|
14
|
-
spacing: Record<string, string>;
|
|
15
|
-
/** e.g. 'xs': '2px', 'sm': '6px' */
|
|
16
|
-
radius: Record<string, string>;
|
|
17
|
-
/** e.g. 'size-sm': '12px', 'family-system': 'system-ui, ...' */
|
|
18
|
-
font: Record<string, string>;
|
|
19
|
-
/** e.g. 'sm': '0px 1px 2px ...', 'glow-radius': '8px' */
|
|
20
|
-
shadow: Record<string, string>;
|
|
21
|
-
/** e.g. 'duration-fast': '200ms', 'easing-default': 'ease-in-out' */
|
|
22
|
-
motion: Record<string, string>;
|
|
23
|
-
/** e.g. 'hover-intensity': '15%', 'transition-duration': '150ms' */
|
|
24
|
-
interaction: Record<string, string>;
|
|
25
|
-
}
|
|
26
|
-
/** All supported token category names */
|
|
27
|
-
export type ThemeTokenCategory = keyof ThemeTokens;
|
|
28
|
-
/** A registered theme definition */
|
|
29
|
-
export interface ThemeDefinition {
|
|
30
|
-
id: string;
|
|
31
|
-
name: string;
|
|
32
|
-
description?: string;
|
|
33
|
-
tokens: Partial<ThemeTokens>;
|
|
34
|
-
}
|
|
35
|
-
/** User-level per-token overrides (sparse) */
|
|
36
|
-
export type ThemeOverrides = Partial<ThemeTokens>;
|
|
37
|
-
/** Serialized state persisted to localStorage */
|
|
38
|
-
export interface PersistedThemeState {
|
|
39
|
-
currentTheme: string;
|
|
40
|
-
overrides: ThemeOverrides;
|
|
41
|
-
}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { ThemeDefinition, ThemeTokenCategory, ThemeTokens } from './types';
|
|
2
|
-
export declare const useThemeStore: import('pinia').StoreDefinition<"kine-theme", Pick<{
|
|
3
|
-
currentThemeId: import('vue').Ref<string, string>;
|
|
4
|
-
themes: import('vue').Ref<Map<string, {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
description?: string | undefined;
|
|
8
|
-
tokens: {
|
|
9
|
-
color?: Record<string, string> | undefined;
|
|
10
|
-
spacing?: Record<string, string> | undefined;
|
|
11
|
-
radius?: Record<string, string> | undefined;
|
|
12
|
-
font?: Record<string, string> | undefined;
|
|
13
|
-
shadow?: Record<string, string> | undefined;
|
|
14
|
-
motion?: Record<string, string> | undefined;
|
|
15
|
-
interaction?: Record<string, string> | undefined;
|
|
16
|
-
};
|
|
17
|
-
}> & Omit<Map<string, ThemeDefinition>, keyof Map<any, any>>, Map<string, ThemeDefinition> | (Map<string, {
|
|
18
|
-
id: string;
|
|
19
|
-
name: string;
|
|
20
|
-
description?: string | undefined;
|
|
21
|
-
tokens: {
|
|
22
|
-
color?: Record<string, string> | undefined;
|
|
23
|
-
spacing?: Record<string, string> | undefined;
|
|
24
|
-
radius?: Record<string, string> | undefined;
|
|
25
|
-
font?: Record<string, string> | undefined;
|
|
26
|
-
shadow?: Record<string, string> | undefined;
|
|
27
|
-
motion?: Record<string, string> | undefined;
|
|
28
|
-
interaction?: Record<string, string> | undefined;
|
|
29
|
-
};
|
|
30
|
-
}> & Omit<Map<string, ThemeDefinition>, keyof Map<any, any>>)>;
|
|
31
|
-
overrides: import('vue').Ref<{
|
|
32
|
-
color?: Record<string, string> | undefined;
|
|
33
|
-
spacing?: Record<string, string> | undefined;
|
|
34
|
-
radius?: Record<string, string> | undefined;
|
|
35
|
-
font?: Record<string, string> | undefined;
|
|
36
|
-
shadow?: Record<string, string> | undefined;
|
|
37
|
-
motion?: Record<string, string> | undefined;
|
|
38
|
-
interaction?: Record<string, string> | undefined;
|
|
39
|
-
}, Partial<ThemeTokens> | {
|
|
40
|
-
color?: Record<string, string> | undefined;
|
|
41
|
-
spacing?: Record<string, string> | undefined;
|
|
42
|
-
radius?: Record<string, string> | undefined;
|
|
43
|
-
font?: Record<string, string> | undefined;
|
|
44
|
-
shadow?: Record<string, string> | undefined;
|
|
45
|
-
motion?: Record<string, string> | undefined;
|
|
46
|
-
interaction?: Record<string, string> | undefined;
|
|
47
|
-
}>;
|
|
48
|
-
currentTheme: import('vue').ComputedRef<ThemeDefinition | undefined>;
|
|
49
|
-
resolvedTokens: import('vue').ComputedRef<Partial<ThemeTokens>>;
|
|
50
|
-
isDark: import('vue').ComputedRef<boolean>;
|
|
51
|
-
themeList: import('vue').ComputedRef<ThemeDefinition[]>;
|
|
52
|
-
registerTheme: (definition: ThemeDefinition) => void;
|
|
53
|
-
setTheme: (id: string) => void;
|
|
54
|
-
setTokenOverride: (category: ThemeTokenCategory, key: string, value: string) => void;
|
|
55
|
-
resetOverrides: () => void;
|
|
56
|
-
init: () => void;
|
|
57
|
-
}, "currentThemeId" | "themes" | "overrides">, Pick<{
|
|
58
|
-
currentThemeId: import('vue').Ref<string, string>;
|
|
59
|
-
themes: import('vue').Ref<Map<string, {
|
|
60
|
-
id: string;
|
|
61
|
-
name: string;
|
|
62
|
-
description?: string | undefined;
|
|
63
|
-
tokens: {
|
|
64
|
-
color?: Record<string, string> | undefined;
|
|
65
|
-
spacing?: Record<string, string> | undefined;
|
|
66
|
-
radius?: Record<string, string> | undefined;
|
|
67
|
-
font?: Record<string, string> | undefined;
|
|
68
|
-
shadow?: Record<string, string> | undefined;
|
|
69
|
-
motion?: Record<string, string> | undefined;
|
|
70
|
-
interaction?: Record<string, string> | undefined;
|
|
71
|
-
};
|
|
72
|
-
}> & Omit<Map<string, ThemeDefinition>, keyof Map<any, any>>, Map<string, ThemeDefinition> | (Map<string, {
|
|
73
|
-
id: string;
|
|
74
|
-
name: string;
|
|
75
|
-
description?: string | undefined;
|
|
76
|
-
tokens: {
|
|
77
|
-
color?: Record<string, string> | undefined;
|
|
78
|
-
spacing?: Record<string, string> | undefined;
|
|
79
|
-
radius?: Record<string, string> | undefined;
|
|
80
|
-
font?: Record<string, string> | undefined;
|
|
81
|
-
shadow?: Record<string, string> | undefined;
|
|
82
|
-
motion?: Record<string, string> | undefined;
|
|
83
|
-
interaction?: Record<string, string> | undefined;
|
|
84
|
-
};
|
|
85
|
-
}> & Omit<Map<string, ThemeDefinition>, keyof Map<any, any>>)>;
|
|
86
|
-
overrides: import('vue').Ref<{
|
|
87
|
-
color?: Record<string, string> | undefined;
|
|
88
|
-
spacing?: Record<string, string> | undefined;
|
|
89
|
-
radius?: Record<string, string> | undefined;
|
|
90
|
-
font?: Record<string, string> | undefined;
|
|
91
|
-
shadow?: Record<string, string> | undefined;
|
|
92
|
-
motion?: Record<string, string> | undefined;
|
|
93
|
-
interaction?: Record<string, string> | undefined;
|
|
94
|
-
}, Partial<ThemeTokens> | {
|
|
95
|
-
color?: Record<string, string> | undefined;
|
|
96
|
-
spacing?: Record<string, string> | undefined;
|
|
97
|
-
radius?: Record<string, string> | undefined;
|
|
98
|
-
font?: Record<string, string> | undefined;
|
|
99
|
-
shadow?: Record<string, string> | undefined;
|
|
100
|
-
motion?: Record<string, string> | undefined;
|
|
101
|
-
interaction?: Record<string, string> | undefined;
|
|
102
|
-
}>;
|
|
103
|
-
currentTheme: import('vue').ComputedRef<ThemeDefinition | undefined>;
|
|
104
|
-
resolvedTokens: import('vue').ComputedRef<Partial<ThemeTokens>>;
|
|
105
|
-
isDark: import('vue').ComputedRef<boolean>;
|
|
106
|
-
themeList: import('vue').ComputedRef<ThemeDefinition[]>;
|
|
107
|
-
registerTheme: (definition: ThemeDefinition) => void;
|
|
108
|
-
setTheme: (id: string) => void;
|
|
109
|
-
setTokenOverride: (category: ThemeTokenCategory, key: string, value: string) => void;
|
|
110
|
-
resetOverrides: () => void;
|
|
111
|
-
init: () => void;
|
|
112
|
-
}, "currentTheme" | "resolvedTokens" | "isDark" | "themeList">, Pick<{
|
|
113
|
-
currentThemeId: import('vue').Ref<string, string>;
|
|
114
|
-
themes: import('vue').Ref<Map<string, {
|
|
115
|
-
id: string;
|
|
116
|
-
name: string;
|
|
117
|
-
description?: string | undefined;
|
|
118
|
-
tokens: {
|
|
119
|
-
color?: Record<string, string> | undefined;
|
|
120
|
-
spacing?: Record<string, string> | undefined;
|
|
121
|
-
radius?: Record<string, string> | undefined;
|
|
122
|
-
font?: Record<string, string> | undefined;
|
|
123
|
-
shadow?: Record<string, string> | undefined;
|
|
124
|
-
motion?: Record<string, string> | undefined;
|
|
125
|
-
interaction?: Record<string, string> | undefined;
|
|
126
|
-
};
|
|
127
|
-
}> & Omit<Map<string, ThemeDefinition>, keyof Map<any, any>>, Map<string, ThemeDefinition> | (Map<string, {
|
|
128
|
-
id: string;
|
|
129
|
-
name: string;
|
|
130
|
-
description?: string | undefined;
|
|
131
|
-
tokens: {
|
|
132
|
-
color?: Record<string, string> | undefined;
|
|
133
|
-
spacing?: Record<string, string> | undefined;
|
|
134
|
-
radius?: Record<string, string> | undefined;
|
|
135
|
-
font?: Record<string, string> | undefined;
|
|
136
|
-
shadow?: Record<string, string> | undefined;
|
|
137
|
-
motion?: Record<string, string> | undefined;
|
|
138
|
-
interaction?: Record<string, string> | undefined;
|
|
139
|
-
};
|
|
140
|
-
}> & Omit<Map<string, ThemeDefinition>, keyof Map<any, any>>)>;
|
|
141
|
-
overrides: import('vue').Ref<{
|
|
142
|
-
color?: Record<string, string> | undefined;
|
|
143
|
-
spacing?: Record<string, string> | undefined;
|
|
144
|
-
radius?: Record<string, string> | undefined;
|
|
145
|
-
font?: Record<string, string> | undefined;
|
|
146
|
-
shadow?: Record<string, string> | undefined;
|
|
147
|
-
motion?: Record<string, string> | undefined;
|
|
148
|
-
interaction?: Record<string, string> | undefined;
|
|
149
|
-
}, Partial<ThemeTokens> | {
|
|
150
|
-
color?: Record<string, string> | undefined;
|
|
151
|
-
spacing?: Record<string, string> | undefined;
|
|
152
|
-
radius?: Record<string, string> | undefined;
|
|
153
|
-
font?: Record<string, string> | undefined;
|
|
154
|
-
shadow?: Record<string, string> | undefined;
|
|
155
|
-
motion?: Record<string, string> | undefined;
|
|
156
|
-
interaction?: Record<string, string> | undefined;
|
|
157
|
-
}>;
|
|
158
|
-
currentTheme: import('vue').ComputedRef<ThemeDefinition | undefined>;
|
|
159
|
-
resolvedTokens: import('vue').ComputedRef<Partial<ThemeTokens>>;
|
|
160
|
-
isDark: import('vue').ComputedRef<boolean>;
|
|
161
|
-
themeList: import('vue').ComputedRef<ThemeDefinition[]>;
|
|
162
|
-
registerTheme: (definition: ThemeDefinition) => void;
|
|
163
|
-
setTheme: (id: string) => void;
|
|
164
|
-
setTokenOverride: (category: ThemeTokenCategory, key: string, value: string) => void;
|
|
165
|
-
resetOverrides: () => void;
|
|
166
|
-
init: () => void;
|
|
167
|
-
}, "init" | "registerTheme" | "setTheme" | "setTokenOverride" | "resetOverrides">>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description toast composition 导出
|
|
3
|
-
* @author 阿怪
|
|
4
|
-
* @date 2026/5/22
|
|
5
|
-
* @version v1.0.0
|
|
6
|
-
*
|
|
7
|
-
* 江湖的业务千篇一律,复杂的代码好几百行。
|
|
8
|
-
*/
|
|
9
|
-
export { useToast } from './useToast';
|
|
10
|
-
export type { ToastType, ToastItem, ToastShowOptions, ToastPromiseOptions } from './useToast';
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Toast 类型
|
|
3
|
-
*/
|
|
4
|
-
export type ToastType = 'success' | 'error' | 'warning' | 'info' | 'loading';
|
|
5
|
-
/**
|
|
6
|
-
* Toast 队列中每一条 toast 的内部结构
|
|
7
|
-
*/
|
|
8
|
-
export interface ToastItem {
|
|
9
|
-
id: number;
|
|
10
|
-
type: ToastType;
|
|
11
|
-
title: string;
|
|
12
|
-
message?: string;
|
|
13
|
-
duration: number;
|
|
14
|
-
createdAt: number;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* 创建 toast 时的配置参数
|
|
18
|
-
*/
|
|
19
|
-
export interface ToastShowOptions {
|
|
20
|
-
type?: ToastType;
|
|
21
|
-
title: string;
|
|
22
|
-
message?: string;
|
|
23
|
-
duration?: number;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* promise() 方法的三阶段配置
|
|
27
|
-
*/
|
|
28
|
-
export interface ToastPromiseOptions<T> {
|
|
29
|
-
loading: string | {
|
|
30
|
-
title: string;
|
|
31
|
-
message?: string;
|
|
32
|
-
};
|
|
33
|
-
success: string | {
|
|
34
|
-
title: string;
|
|
35
|
-
message?: string;
|
|
36
|
-
} | ((data: T) => string | {
|
|
37
|
-
title: string;
|
|
38
|
-
message?: string;
|
|
39
|
-
});
|
|
40
|
-
error: string | {
|
|
41
|
-
title: string;
|
|
42
|
-
message?: string;
|
|
43
|
-
} | ((err: unknown) => string | {
|
|
44
|
-
title: string;
|
|
45
|
-
message?: string;
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Toast 队列 composable
|
|
50
|
-
* 管理 toast 的增删、自动关闭定时器与 Promise 模式
|
|
51
|
-
*/
|
|
52
|
-
export declare function useToast(): {
|
|
53
|
-
toasts: import('vue').Ref<{
|
|
54
|
-
id: number;
|
|
55
|
-
type: ToastType;
|
|
56
|
-
title: string;
|
|
57
|
-
message?: string | undefined;
|
|
58
|
-
duration: number;
|
|
59
|
-
createdAt: number;
|
|
60
|
-
}[], ToastItem[] | {
|
|
61
|
-
id: number;
|
|
62
|
-
type: ToastType;
|
|
63
|
-
title: string;
|
|
64
|
-
message?: string | undefined;
|
|
65
|
-
duration: number;
|
|
66
|
-
createdAt: number;
|
|
67
|
-
}[]>;
|
|
68
|
-
show: (options: ToastShowOptions) => number;
|
|
69
|
-
dismiss: (id: number) => void;
|
|
70
|
-
promise: <T>(p: Promise<T>, options: ToastPromiseOptions<T>) => Promise<T>;
|
|
71
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description tooltip composable re-export from component layer
|
|
3
|
-
* @author 阿怪
|
|
4
|
-
* @date 2026/5/22
|
|
5
|
-
* @version v1.0.0
|
|
6
|
-
*
|
|
7
|
-
* 江湖的业务千篇一律,复杂的代码好几百行。
|
|
8
|
-
*/
|
|
9
|
-
export { useTooltip } from '../../components/base/tooltip/useTooltip';
|
|
10
|
-
export type { TooltipPlacement, TooltipPositionData } from '../../components/base/tooltip/useTooltip';
|