@unocss/core 66.1.0-beta.2 → 66.1.0-beta.4

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
@@ -397,7 +397,7 @@ type CSSValue = CSSObject | CSSEntries;
397
397
  type CSSValues = CSSValue | CSSValue[];
398
398
  type DynamicMatcher<Theme extends object = object> = (match: RegExpMatchArray, context: Readonly<RuleContext<Theme>>) => Awaitable<CSSValueInput | string | (CSSValueInput | string)[] | undefined> | Generator<CSSValueInput | string | undefined> | AsyncGenerator<CSSValueInput | string | undefined>;
399
399
  type DynamicRule<Theme extends object = object> = [RegExp, DynamicMatcher<Theme>, RuleMeta?];
400
- type StaticRule = [string, CSSObject | CSSEntries, RuleMeta?];
400
+ type StaticRule = [string, CSSObject | CSSEntries | (CSSValueInput | string)[], RuleMeta?];
401
401
  type Rule<Theme extends object = object> = DynamicRule<Theme> | StaticRule;
402
402
  type DynamicShortcutMatcher<Theme extends object = object> = ((match: RegExpMatchArray, context: Readonly<RuleContext<Theme>>) => (string | ShortcutValue[] | undefined));
403
403
  type StaticShortcut = [string, string | ShortcutValue[], RuleMeta?];
package/dist/index.d.ts CHANGED
@@ -397,7 +397,7 @@ type CSSValue = CSSObject | CSSEntries;
397
397
  type CSSValues = CSSValue | CSSValue[];
398
398
  type DynamicMatcher<Theme extends object = object> = (match: RegExpMatchArray, context: Readonly<RuleContext<Theme>>) => Awaitable<CSSValueInput | string | (CSSValueInput | string)[] | undefined> | Generator<CSSValueInput | string | undefined> | AsyncGenerator<CSSValueInput | string | undefined>;
399
399
  type DynamicRule<Theme extends object = object> = [RegExp, DynamicMatcher<Theme>, RuleMeta?];
400
- type StaticRule = [string, CSSObject | CSSEntries, RuleMeta?];
400
+ type StaticRule = [string, CSSObject | CSSEntries | (CSSValueInput | string)[], RuleMeta?];
401
401
  type Rule<Theme extends object = object> = DynamicRule<Theme> | StaticRule;
402
402
  type DynamicShortcutMatcher<Theme extends object = object> = ((match: RegExpMatchArray, context: Readonly<RuleContext<Theme>>) => (string | ShortcutValue[] | undefined));
403
403
  type StaticShortcut = [string, string | ShortcutValue[], RuleMeta?];
package/dist/index.mjs CHANGED
@@ -320,7 +320,7 @@ const regexCache = {};
320
320
  function makeRegexClassGroup(separators = ["-", ":"]) {
321
321
  const key = separators.join("|");
322
322
  if (!regexCache[key])
323
- regexCache[key] = new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${key})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`, "gm");
323
+ regexCache[key] = new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${key})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[[^\\]]*?\\])+?)\\)(?!\\s*?=>)`, "gm");
324
324
  regexCache[key].lastIndex = 0;
325
325
  return regexCache[key];
326
326
  }
@@ -651,7 +651,7 @@ function definePreset(preset) {
651
651
  return preset;
652
652
  }
653
653
 
654
- const version = "66.1.0-beta.2";
654
+ const version = "66.1.0-beta.4";
655
655
 
656
656
  const symbols = {
657
657
  shortcutsNoMerge: "$$symbol-shortcut-no-merge",
@@ -1047,12 +1047,15 @@ class UnoGeneratorInternal {
1047
1047
  if (this.config.details)
1048
1048
  context.rules.push(staticMatch);
1049
1049
  const index = this.config.rules.indexOf(staticMatch);
1050
- const entry = normalizeCSSEntries(staticMatch[1]);
1050
+ const entries = normalizeCSSValues(staticMatch[1]).filter((i) => i.length);
1051
1051
  const meta = staticMatch[2];
1052
- if (isString(entry))
1053
- return [[index, entry, meta]];
1054
- else
1055
- return [[index, raw, entry, meta, variantHandlers]];
1052
+ if (entries.length) {
1053
+ return entries.map((css) => {
1054
+ if (isString(css))
1055
+ return [index, css, meta];
1056
+ return [index, raw, css, meta, variantHandlers];
1057
+ });
1058
+ }
1056
1059
  }
1057
1060
  }
1058
1061
  context.variantHandlers = variantHandlers;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/core",
3
3
  "type": "module",
4
- "version": "66.1.0-beta.2",
4
+ "version": "66.1.0-beta.4",
5
5
  "description": "The instant on-demand Atomic CSS engine.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  ],
39
39
  "devDependencies": {
40
40
  "magic-string": "^0.30.17",
41
- "unconfig": "~7.0.0"
41
+ "unconfig": "^7.3.1"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "unbuild",