@unocss/extractor-pug 66.6.6-beta.1 → 66.6.7

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.mts CHANGED
@@ -1,6 +1,38 @@
1
1
  import { Options } from "pug";
2
- import { Extractor } from "@unocss/core";
3
2
 
3
+ //#region ../../packages-engine/core/dist/index.d.mts
4
+ //#endregion
5
+ //#region src/utils/countable-set.d.ts
6
+ declare class CountableSet<K> extends Set<K> {
7
+ _map: Map<K, number>;
8
+ constructor(values?: Iterable<K>);
9
+ add(key: K): this;
10
+ delete(key: K): boolean;
11
+ clear(): void;
12
+ getCount(key: K): number;
13
+ setCount(key: K, count: number): this;
14
+ }
15
+ //#endregion
16
+ //#region src/types.d.ts
17
+ type Awaitable<T> = T | Promise<T>;
18
+ interface ExtractorContext {
19
+ readonly original: string;
20
+ code: string;
21
+ id?: string;
22
+ extracted: Set<string> | CountableSet<string>;
23
+ envMode?: 'dev' | 'build';
24
+ }
25
+ interface Extractor {
26
+ name: string;
27
+ order?: number;
28
+ /**
29
+ * Extract the code and return a list of selectors.
30
+ *
31
+ * Return `undefined` to skip this extractor.
32
+ */
33
+ extract?: (ctx: ExtractorContext) => Awaitable<Set<string> | CountableSet<string> | string[] | undefined | void>;
34
+ }
35
+ //#endregion
4
36
  //#region src/index.d.ts
5
37
  declare function extractorPug(options?: Options): Extractor;
6
38
  //#endregion
package/dist/index.mjs CHANGED
@@ -28,6 +28,5 @@ function extractorPug(options = {}) {
28
28
  }
29
29
  };
30
30
  }
31
-
32
31
  //#endregion
33
- export { extractorPug as default };
32
+ export { extractorPug as default };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/extractor-pug",
3
3
  "type": "module",
4
- "version": "66.6.6-beta.1",
4
+ "version": "66.6.7",
5
5
  "description": "UnoCSS extractor for Pug",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -40,7 +40,7 @@
40
40
  "devDependencies": {
41
41
  "@types/pug": "^2.0.10",
42
42
  "pug": "^3.0.3",
43
- "@unocss/core": "66.6.6-beta.1"
43
+ "@unocss/core": "66.6.7"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "tsdown --config-loader unrun",