@unocss/autocomplete 0.39.0 → 0.39.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/dist/index.d.ts +12 -14
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SuggestResult, AutoCompleteFunction, UnoGenerator } from '@unocss/core';
|
|
2
2
|
import LRU from 'lru-cache';
|
|
3
3
|
|
|
4
|
-
declare function createAutocomplete(uno: UnoGenerator): {
|
|
5
|
-
suggest: (input: string) => Promise<string[]>;
|
|
6
|
-
suggestInFile: (content: string, cursor: number) => Promise<SuggestResult>;
|
|
7
|
-
templates: (string | AutoCompleteFunction)[];
|
|
8
|
-
cache: LRU<string, string[]>;
|
|
9
|
-
reset: () => void;
|
|
10
|
-
/**
|
|
11
|
-
* Enumerate possible suggestions from 'aa' - 'zz'
|
|
12
|
-
*/
|
|
13
|
-
enumerate: () => Promise<Set<string>>;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
4
|
declare type AutocompleteTemplatePart = AutocompleteTemplateStatic | AutocompleteTemplateGroup | AutocompleteTemplateTheme;
|
|
17
5
|
interface AutocompleteTemplateStatic {
|
|
18
6
|
type: 'static';
|
|
@@ -30,6 +18,16 @@ interface ParsedAutocompleteTemplate {
|
|
|
30
18
|
parts: AutocompleteTemplatePart[];
|
|
31
19
|
suggest(input: string): string[] | undefined;
|
|
32
20
|
}
|
|
21
|
+
interface UnocssAutocomplete {
|
|
22
|
+
suggest: (input: string) => Promise<string[]>;
|
|
23
|
+
suggestInFile: (content: string, cursor: number) => Promise<SuggestResult>;
|
|
24
|
+
templates: (string | AutoCompleteFunction)[];
|
|
25
|
+
cache: LRU<string, string[]>;
|
|
26
|
+
reset: () => void;
|
|
27
|
+
enumerate: () => Promise<Set<string>>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare function createAutocomplete(uno: UnoGenerator): UnocssAutocomplete;
|
|
33
31
|
|
|
34
32
|
declare const shorthands: Record<string, string>;
|
|
35
33
|
declare const ignoredThemeKeys: string[];
|
|
@@ -41,4 +39,4 @@ declare function searchUsageBoundary(line: string, index: number): {
|
|
|
41
39
|
end: number;
|
|
42
40
|
};
|
|
43
41
|
|
|
44
|
-
export { AutocompleteTemplateGroup, AutocompleteTemplatePart, AutocompleteTemplateStatic, AutocompleteTemplateTheme, ParsedAutocompleteTemplate, createAutocomplete, ignoredThemeKeys, parseAutocomplete, searchUsageBoundary, shorthands };
|
|
42
|
+
export { AutocompleteTemplateGroup, AutocompleteTemplatePart, AutocompleteTemplateStatic, AutocompleteTemplateTheme, ParsedAutocompleteTemplate, UnocssAutocomplete, createAutocomplete, ignoredThemeKeys, parseAutocomplete, searchUsageBoundary, shorthands };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/autocomplete",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.1",
|
|
4
4
|
"description": "Autocomplete utils for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"lru-cache": "^7.10.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@unocss/core": "0.39.
|
|
38
|
+
"@unocss/core": "0.39.1"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "unbuild",
|