@unocss/autocomplete 0.51.7 → 0.51.11

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.cjs CHANGED
@@ -3,11 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const core = require('@unocss/core');
6
- const LRU = require('lru-cache');
7
-
8
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
9
-
10
- const LRU__default = /*#__PURE__*/_interopDefaultLegacy(LRU);
6
+ const lruCache = require('lru-cache');
11
7
 
12
8
  const shorthands = {
13
9
  num: `(${[0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 24, 36].join("|")})`,
@@ -152,7 +148,7 @@ function searchUsageBoundary(line, index) {
152
148
 
153
149
  function createAutocomplete(uno) {
154
150
  const templateCache = /* @__PURE__ */ new Map();
155
- const cache = new LRU__default({ max: 5e3 });
151
+ const cache = new lruCache.LRUCache({ max: 5e3 });
156
152
  let staticUtils = [];
157
153
  const templates = [];
158
154
  reset();
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { SuggestResult, AutoCompleteFunction, UnoGenerator } from '@unocss/core';
2
- import LRU from 'lru-cache';
2
+ import { LRUCache } from 'lru-cache';
3
3
 
4
4
  type AutocompleteTemplatePart = AutocompleteTemplateStatic | AutocompleteTemplateGroup | AutocompleteTemplateTheme;
5
5
  interface AutocompleteTemplateStatic {
@@ -22,7 +22,7 @@ interface UnocssAutocomplete {
22
22
  suggest: (input: string) => Promise<string[]>;
23
23
  suggestInFile: (content: string, cursor: number) => Promise<SuggestResult>;
24
24
  templates: (string | AutoCompleteFunction)[];
25
- cache: LRU<string, string[]>;
25
+ cache: LRUCache<string, string[]>;
26
26
  reset: () => void;
27
27
  enumerate: () => Promise<Set<string>>;
28
28
  }
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { escapeRegExp, toArray, uniq } from '@unocss/core';
2
- import LRU from 'lru-cache';
2
+ import { LRUCache } from 'lru-cache';
3
3
 
4
4
  const shorthands = {
5
5
  num: `(${[0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 24, 36].join("|")})`,
@@ -144,7 +144,7 @@ function searchUsageBoundary(line, index) {
144
144
 
145
145
  function createAutocomplete(uno) {
146
146
  const templateCache = /* @__PURE__ */ new Map();
147
- const cache = new LRU({ max: 5e3 });
147
+ const cache = new LRUCache({ max: 5e3 });
148
148
  let staticUtils = [];
149
149
  const templates = [];
150
150
  reset();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/autocomplete",
3
- "version": "0.51.7",
3
+ "version": "0.51.11",
4
4
  "description": "Autocomplete utils for UnoCSS",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -8,7 +8,7 @@
8
8
  "homepage": "https://github.com/unocss/unocss/tree/main/packages/autocomplete#readme",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/unocss/unocss.git",
11
+ "url": "https://github.com/unocss/unocss",
12
12
  "directory": "packages/autocomplete"
13
13
  },
14
14
  "bugs": {
@@ -33,10 +33,10 @@
33
33
  "dist"
34
34
  ],
35
35
  "dependencies": {
36
- "lru-cache": "^8.0.5"
36
+ "lru-cache": "^9.1.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@unocss/core": "0.51.7"
39
+ "@unocss/core": "0.51.11"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "unbuild",