@unocss/autocomplete 0.60.3 → 0.60.4
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.mjs +4 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -283,7 +283,10 @@ function createAutocomplete(uno, options = {}) {
|
|
|
283
283
|
return [];
|
|
284
284
|
if (cache.has(input))
|
|
285
285
|
return cache.get(input);
|
|
286
|
-
const
|
|
286
|
+
const attributify = uno.config.presets.find((i) => i.name === "@unocss/preset-attributify");
|
|
287
|
+
const attributifyPrefix = attributify?.options?.prefix;
|
|
288
|
+
const _input = attributifyPrefix ? input.startsWith(attributifyPrefix) ? input.slice(attributifyPrefix.length) : input.replace(`:${attributifyPrefix}`, ":") : input;
|
|
289
|
+
const [, processed, , variants] = await uno.matchVariants(_input);
|
|
287
290
|
let idx = processed ? input.search(escapeRegExp(processed)) : input.length;
|
|
288
291
|
if (idx === -1)
|
|
289
292
|
idx = 0;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/autocomplete",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.60.
|
|
4
|
+
"version": "0.60.4",
|
|
5
5
|
"description": "Autocomplete utils for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"lru-cache": "^10.2.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@unocss/core": "0.60.
|
|
40
|
+
"@unocss/core": "0.60.4"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "unbuild",
|