@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talex-touch/utils",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "private": false,
5
5
  "description": "Tuff series utils",
6
6
  "author": "TalexDreamSoul",
@@ -23,7 +23,7 @@ function normalizeItem(item: PluginClipboardItem | null): PluginClipboardItem |
23
23
  return item
24
24
  }
25
25
 
26
- export type ClipboardHistoryOptions = Omit<PluginClipboardSearchOptions, 'keyword' | 'startTime' | 'endTime' | 'type' | 'isFavorite' | 'sourceApp' | 'sortOrder'> & { page?: number }
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 { page = 1 } = options
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
  : []