@unocss/transformer-variant-group 0.58.9 → 0.59.0

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/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/transformer-variant-group",
3
- "version": "0.58.9",
3
+ "type": "module",
4
+ "version": "0.59.0",
4
5
  "description": "Variant group transformer for UnoCSS",
5
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
7
  "license": "MIT",
@@ -21,22 +22,21 @@
21
22
  "sideEffects": false,
22
23
  "exports": {
23
24
  ".": {
24
- "types": "./dist/index.d.ts",
25
- "import": "./dist/index.mjs",
26
- "require": "./dist/index.cjs"
25
+ "types": "./dist/index.d.mts",
26
+ "default": "./dist/index.mjs"
27
27
  }
28
28
  },
29
- "main": "./dist/index.cjs",
29
+ "main": "./dist/index.mjs",
30
30
  "module": "./dist/index.mjs",
31
31
  "types": "./dist/index.d.ts",
32
32
  "files": [
33
33
  "dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@unocss/core": "0.58.9"
36
+ "@unocss/core": "0.59.0"
37
37
  },
38
38
  "devDependencies": {
39
- "magic-string": "^0.30.8"
39
+ "magic-string": "^0.30.9"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "unbuild",
package/dist/index.cjs DELETED
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- const core = require('@unocss/core');
4
-
5
- function transformerVariantGroup(options = {}) {
6
- return {
7
- name: "@unocss/transformer-variant-group",
8
- enforce: "pre",
9
- transform(s) {
10
- const result = core.parseVariantGroup(s, options.separators);
11
- return {
12
- get highlightAnnotations() {
13
- return [...result.groupsByOffset.values()].flatMap((group) => group.items);
14
- }
15
- };
16
- }
17
- };
18
- }
19
-
20
- module.exports = transformerVariantGroup;
package/dist/index.d.cts DELETED
@@ -1,22 +0,0 @@
1
- import { SourceCodeTransformer } from '@unocss/core';
2
-
3
- interface TransformerVariantGroupOptions {
4
- /**
5
- * Separators to expand.
6
- *
7
- * ```
8
- * foo-(bar baz) -> foo-bar foo-baz
9
- * ^
10
- * separator
11
- * ```
12
- *
13
- * You may set it to `[':']` for strictness.
14
- *
15
- * @default [':', '-']
16
- * @see https://github.com/unocss/unocss/pull/1231
17
- */
18
- separators?: (':' | '-')[];
19
- }
20
- declare function transformerVariantGroup(options?: TransformerVariantGroupOptions): SourceCodeTransformer;
21
-
22
- export { type TransformerVariantGroupOptions, transformerVariantGroup as default };