@talex-touch/utils 1.0.38 → 1.0.39
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/package.json +1 -1
- package/plugin/sdk/clipboard.ts +2 -4
package/package.json
CHANGED
package/plugin/sdk/clipboard.ts
CHANGED
|
@@ -23,7 +23,7 @@ function normalizeItem(item: PluginClipboardItem | null): PluginClipboardItem |
|
|
|
23
23
|
return item
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export type ClipboardHistoryOptions =
|
|
26
|
+
export type ClipboardHistoryOptions = PluginClipboardSearchOptions
|
|
27
27
|
|
|
28
28
|
export interface ClipboardFavoriteOptions {
|
|
29
29
|
id: number
|
|
@@ -47,7 +47,6 @@ export interface ClipboardApplyOptions {
|
|
|
47
47
|
export type ClipboardSearchOptions = PluginClipboardSearchOptions
|
|
48
48
|
export type ClipboardSearchResponse = PluginClipboardSearchResponse
|
|
49
49
|
|
|
50
|
-
|
|
51
50
|
export function useClipboardHistory() {
|
|
52
51
|
const channel = ensurePluginChannel()
|
|
53
52
|
|
|
@@ -58,8 +57,7 @@ export function useClipboardHistory() {
|
|
|
58
57
|
},
|
|
59
58
|
|
|
60
59
|
async getHistory(options: ClipboardHistoryOptions = {}): Promise<PluginClipboardHistoryResponse> {
|
|
61
|
-
const
|
|
62
|
-
const response = await channel.send('clipboard:get-history', { page })
|
|
60
|
+
const response = await channel.send('clipboard:get-history', options)
|
|
63
61
|
const history = Array.isArray(response?.history)
|
|
64
62
|
? response.history.map((item: PluginClipboardItem) => normalizeItem(item) ?? item)
|
|
65
63
|
: []
|