@unocss/extractor-arbitrary-variants 0.54.3 → 0.55.1

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
@@ -8,19 +8,19 @@ const quotedArbitraryValuesRE = /(?:[\w&:[\]-]|\[\S+=\S+\])+\[\\?['"]?\S+?['"]\]
8
8
  const arbitraryPropertyRE = /\[(\\\W|[\w-])+:[^\s:]*?("\S+?"|'\S+?'|`\S+?`|[^\s:]+?)[^\s:]*?\)?\]/g;
9
9
  const arbitraryPropertyCandidateRE = /^\[(\\\W|[\w-])+:['"]?\S+?['"]?\]$/;
10
10
  function splitCodeWithArbitraryVariants(code) {
11
- const result = /* @__PURE__ */ new Set();
11
+ const result = [];
12
12
  for (const match of code.matchAll(arbitraryPropertyRE)) {
13
13
  if (!code[match.index - 1]?.match(/^[\s'"`]/))
14
14
  continue;
15
- result.add(match[0]);
15
+ result.push(match[0]);
16
16
  }
17
17
  for (const match of code.matchAll(quotedArbitraryValuesRE))
18
- result.add(match[0]);
18
+ result.push(match[0]);
19
19
  code.split(core.defaultSplitRE).forEach((match) => {
20
20
  if (core.isValidSelector(match) && !arbitraryPropertyCandidateRE.test(match))
21
- result.add(match);
21
+ result.push(match);
22
22
  });
23
- return [...result];
23
+ return result;
24
24
  }
25
25
  const extractorArbitraryVariants = {
26
26
  name: "@unocss/extractor-arbitrary-variants",
package/dist/index.mjs CHANGED
@@ -4,19 +4,19 @@ const quotedArbitraryValuesRE = /(?:[\w&:[\]-]|\[\S+=\S+\])+\[\\?['"]?\S+?['"]\]
4
4
  const arbitraryPropertyRE = /\[(\\\W|[\w-])+:[^\s:]*?("\S+?"|'\S+?'|`\S+?`|[^\s:]+?)[^\s:]*?\)?\]/g;
5
5
  const arbitraryPropertyCandidateRE = /^\[(\\\W|[\w-])+:['"]?\S+?['"]?\]$/;
6
6
  function splitCodeWithArbitraryVariants(code) {
7
- const result = /* @__PURE__ */ new Set();
7
+ const result = [];
8
8
  for (const match of code.matchAll(arbitraryPropertyRE)) {
9
9
  if (!code[match.index - 1]?.match(/^[\s'"`]/))
10
10
  continue;
11
- result.add(match[0]);
11
+ result.push(match[0]);
12
12
  }
13
13
  for (const match of code.matchAll(quotedArbitraryValuesRE))
14
- result.add(match[0]);
14
+ result.push(match[0]);
15
15
  code.split(defaultSplitRE).forEach((match) => {
16
16
  if (isValidSelector(match) && !arbitraryPropertyCandidateRE.test(match))
17
- result.add(match);
17
+ result.push(match);
18
18
  });
19
- return [...result];
19
+ return result;
20
20
  }
21
21
  const extractorArbitraryVariants = {
22
22
  name: "@unocss/extractor-arbitrary-variants",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/extractor-arbitrary-variants",
3
- "version": "0.54.3",
3
+ "version": "0.55.1",
4
4
  "description": "Extractor arbitrary variants for utilities",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@unocss/core": "0.54.3"
36
+ "@unocss/core": "0.55.1"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "unbuild",