@unocss/extractor-svelte 66.6.6 → 66.6.8

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