@vuepress-plume/plugin-search 1.0.0-rc.208 → 1.0.0-rc.209

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.
@@ -12,7 +12,7 @@ import { SearchBoxLocales, SearchLocaleOptions } from "../../shared/index.js";
12
12
  * const locale = useLocale(locales)
13
13
  * console.log(locale.value.placeholder) // 'Search' or localized value
14
14
  */
15
- declare function useLocale(locales: MaybeRef<SearchBoxLocales>): ComputedRef<Partial<SearchLocaleOptions>>;
15
+ export declare function useLocale(locales: MaybeRef<SearchBoxLocales>): ComputedRef<Partial<SearchLocaleOptions>>;
16
16
  //#endregion
17
17
  //#region src/client/composables/searchIndex.d.ts
18
18
  /**
@@ -37,6 +37,5 @@ type SearchIndexData = Record<string, () => Promise<{
37
37
  * const indexData = useSearchIndex()
38
38
  * const localeIndex = await indexData.value['/zh/']()
39
39
  */
40
- declare function useSearchIndex(): ShallowRef<SearchIndexData>;
41
- //#endregion
42
- export { useLocale, useSearchIndex };
40
+ export declare function useSearchIndex(): ShallowRef<SearchIndexData>;
41
+ //#endregion
@@ -28,7 +28,7 @@
28
28
  * cache.set('d', 4) // 'a' is evicted
29
29
  * cache.get('b') // returns 2, 'b' becomes most recent
30
30
  */
31
- declare class LRUCache<K, V> {
31
+ export declare class LRUCache<K, V> {
32
32
  /** Maximum number of items in the cache / 缓存中的最大项数 */
33
33
  private max;
34
34
  /** Internal Map storage / 内部 Map 存储 */
@@ -83,5 +83,4 @@ declare class LRUCache<K, V> {
83
83
  */
84
84
  clear(): void;
85
85
  }
86
- //#endregion
87
- export { LRUCache };
86
+ //#endregion
@@ -31,7 +31,7 @@ interface SearchIndexOptions {
31
31
  * @param options.isSearchable - Function to filter searchable pages / 过滤可搜索页面的函数
32
32
  * @param options.searchOptions - MiniSearch configuration / MiniSearch 配置
33
33
  */
34
- declare function prepareSearchIndex({ app, isSearchable, searchOptions }: SearchIndexOptions): Promise<void>;
34
+ export declare function prepareSearchIndex({ app, isSearchable, searchOptions }: SearchIndexOptions): Promise<void>;
35
35
  //#endregion
36
36
  //#region src/node/searchPlugin.d.ts
37
37
  /**
@@ -64,6 +64,5 @@ declare function prepareSearchIndex({ app, isSearchable, searchOptions }: Search
64
64
  * ]
65
65
  * }
66
66
  */
67
- declare function searchPlugin({ locales, isSearchable, ...searchOptions }?: SearchPluginOptions): Plugin;
68
- //#endregion
69
- export { prepareSearchIndex, searchPlugin };
67
+ export declare function searchPlugin({ locales, isSearchable, ...searchOptions }?: SearchPluginOptions): Plugin;
68
+ //#endregion
@@ -6,7 +6,7 @@ import { LocaleConfig, Page } from "vuepress/core";
6
6
  *
7
7
  * 搜索 UI 字符串的语言选项。
8
8
  */
9
- interface SearchLocaleOptions {
9
+ export interface SearchLocaleOptions {
10
10
  /** Placeholder text for search input / 搜索输入框的占位文本 */
11
11
  placeholder: string;
12
12
  /** Text for search button / 搜索按钮的文本 */
@@ -40,13 +40,13 @@ interface SearchLocaleOptions {
40
40
  *
41
41
  * 搜索框的语言配置类型。
42
42
  */
43
- type SearchBoxLocales = LocaleConfig<SearchLocaleOptions>;
43
+ export type SearchBoxLocales = LocaleConfig<SearchLocaleOptions>;
44
44
  /**
45
45
  * Options for the search plugin.
46
46
  *
47
47
  * 搜索插件的选项。
48
48
  */
49
- interface SearchPluginOptions extends SearchOptions {
49
+ export interface SearchPluginOptions extends SearchOptions {
50
50
  /** Locale-specific search configurations / 特定语言的搜索配置 */
51
51
  locales?: SearchBoxLocales;
52
52
  /**
@@ -64,7 +64,7 @@ interface SearchPluginOptions extends SearchOptions {
64
64
  *
65
65
  * 搜索配置选项。
66
66
  */
67
- interface SearchOptions {
67
+ export interface SearchOptions {
68
68
  /**
69
69
  * Whether to disable query persistence in session storage.
70
70
  *
@@ -97,5 +97,4 @@ interface SearchOptions {
97
97
  searchOptions?: Options['searchOptions'];
98
98
  };
99
99
  }
100
- //#endregion
101
- export { SearchBoxLocales, SearchLocaleOptions, SearchOptions, SearchPluginOptions };
100
+ //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vuepress-plume/plugin-search",
3
3
  "type": "module",
4
- "version": "1.0.0-rc.208",
4
+ "version": "1.0.0-rc.209",
5
5
  "description": "The Plugin for VuePress 2 - local search",
6
6
  "author": "pengzhanbo <volodymyr@foxmail.com>",
7
7
  "license": "MIT",
@@ -31,10 +31,10 @@
31
31
  "dist"
32
32
  ],
33
33
  "peerDependencies": {
34
- "vuepress": "2.0.0-rc.30"
34
+ "vuepress": "2.0.0-rc.31"
35
35
  },
36
36
  "dependencies": {
37
- "@vuepress/helper": "2.0.0-rc.131",
37
+ "@vuepress/helper": "2.0.0-rc.134",
38
38
  "@vueuse/core": "^14.4.0",
39
39
  "@vueuse/integrations": "^14.4.0",
40
40
  "chokidar": "5.0.0",