@unocss/core 0.55.2 → 0.55.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.cjs +19 -23
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +19 -23
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -15,6 +15,10 @@ function escapeSelector(str) {
|
|
|
15
15
|
result += "\uFFFD";
|
|
16
16
|
continue;
|
|
17
17
|
}
|
|
18
|
+
if (codeUnit === 37) {
|
|
19
|
+
result += "\\%";
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
18
22
|
if (codeUnit === 44) {
|
|
19
23
|
result += "\\,";
|
|
20
24
|
continue;
|
|
@@ -566,33 +570,25 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
566
570
|
shortcuts: resolveShortcuts(getMerged("shortcuts")).reverse(),
|
|
567
571
|
extractors,
|
|
568
572
|
safelist: getMerged("safelist"),
|
|
569
|
-
separators
|
|
573
|
+
separators,
|
|
574
|
+
details: config.details ?? config.envMode === "dev"
|
|
570
575
|
};
|
|
571
576
|
for (const p of sources)
|
|
572
577
|
p?.configResolved?.(resolved);
|
|
573
578
|
return resolved;
|
|
574
579
|
}
|
|
575
580
|
function mergeConfigs(configs) {
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
theme
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
postprocess: getMerged("postprocess"),
|
|
588
|
-
preflights: getMerged("preflights"),
|
|
589
|
-
rules: getMerged("rules"),
|
|
590
|
-
variants: getMerged("variants"),
|
|
591
|
-
shortcuts: getMerged("shortcuts"),
|
|
592
|
-
extractors: getMerged("extractors")
|
|
593
|
-
}
|
|
594
|
-
);
|
|
595
|
-
return merged;
|
|
581
|
+
const maybeArrays = ["shortcuts", "preprocess", "postprocess"];
|
|
582
|
+
const config = configs.map((config2) => Object.entries(config2).reduce((acc, [key, value]) => ({
|
|
583
|
+
...acc,
|
|
584
|
+
[key]: maybeArrays.includes(key) ? toArray(value) : value
|
|
585
|
+
}), {})).reduce(({ theme: themeA, ...a }, { theme: themeB, ...b }) => {
|
|
586
|
+
const c = mergeDeep(a, b, true);
|
|
587
|
+
if (themeA || themeB)
|
|
588
|
+
c.theme = mergeThemes([themeA, themeB]);
|
|
589
|
+
return c;
|
|
590
|
+
}, {});
|
|
591
|
+
return config;
|
|
596
592
|
}
|
|
597
593
|
function mergeThemes(themes) {
|
|
598
594
|
return themes.map((theme) => theme ? clone(theme) : {}).reduce((a, b) => mergeDeep(a, b), {});
|
|
@@ -617,7 +613,7 @@ function mergeAutocompleteShorthands(shorthands) {
|
|
|
617
613
|
);
|
|
618
614
|
}
|
|
619
615
|
|
|
620
|
-
const version = "0.55.
|
|
616
|
+
const version = "0.55.4";
|
|
621
617
|
|
|
622
618
|
var __defProp = Object.defineProperty;
|
|
623
619
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -829,7 +825,7 @@ class UnoGenerator {
|
|
|
829
825
|
if (!parent)
|
|
830
826
|
return rules;
|
|
831
827
|
const parents = parent.split(" $$ ");
|
|
832
|
-
return `${parents.join("{")}{${nl}${rules}${nl}
|
|
828
|
+
return `${parents.join("{")}{${nl}${rules}${nl}${"}".repeat(parents.length)}`;
|
|
833
829
|
}).filter(Boolean).join(nl);
|
|
834
830
|
if (preflights) {
|
|
835
831
|
css = [preflightsMap[layer], css].filter(Boolean).join(nl);
|
package/dist/index.d.cts
CHANGED
|
@@ -584,7 +584,7 @@ interface ConfigBase<Theme extends object = object> {
|
|
|
584
584
|
*
|
|
585
585
|
* You don't usually need to set this.
|
|
586
586
|
*
|
|
587
|
-
* @default false
|
|
587
|
+
* @default `true` when `envMode` is `dev`, otherwise `false`
|
|
588
588
|
*/
|
|
589
589
|
details?: boolean;
|
|
590
590
|
}
|
|
@@ -987,4 +987,4 @@ declare function resolveConfig<Theme extends object = object>(userConfig?: UserC
|
|
|
987
987
|
*/
|
|
988
988
|
declare function mergeConfigs<Theme extends object = object>(configs: UserConfig<Theme>[]): UserConfig<Theme>;
|
|
989
989
|
|
|
990
|
-
export { ArgumentType, Arrayable, AutoCompleteExtractor, AutoCompleteExtractorContext, AutoCompleteExtractorResult, AutoCompleteFunction, AutoCompleteTemplate, Awaitable, BetterMap, BlocklistRule, CONTROL_SHORTCUT_NO_MERGE, CSSColorValue, CSSEntries, CSSObject, CSSValue, CSSValues, CliEntryItem, CliOptions, ConfigBase, ContentOptions, CountableSet, DeepPartial, DynamicMatcher, DynamicRule, DynamicShortcut, DynamicShortcutMatcher, ExtendedTokenInfo, Extractor, ExtractorContext, FilterPattern, FlatObjectTuple, GenerateOptions, GenerateResult, GeneratorOptions, HighlightAnnotation, ParsedColorValue, ParsedUtil, PartialByKeys, PluginOptions, Postprocessor, Preflight, PreflightContext, PreparedRule, Preprocessor, Preset, PresetOptions, RGBAColorValue, RawUtil, Replacement, RequiredByKey, ResolvedConfig, RestArgs, Rule, RuleContext, RuleMeta, Shift, Shortcut, ShortcutValue, SourceCodeTransformer, SourceCodeTransformerEnforce, SourceMap, StaticRule, StaticShortcut, StaticShortcutMap, StringifiedUtil, SuggestResult, ThemeExtender, ToArray, TwoKeyMap, UnoGenerator, UnocssPluginContext, UserConfig, UserConfigDefaults, UserOnlyOptions, UserShortcuts, UtilObject, ValueHandler, ValueHandlerCallback, Variant, VariantContext, VariantFunction, VariantHandler, VariantHandlerContext, VariantMatchedResult, VariantObject, attributifyRE, clearIdenticalEntries, clone, collapseVariantGroup, createGenerator, createValueHandler, cssIdRE, defaultSplitRE, e, entriesToCss, escapeRegExp, escapeSelector, expandVariantGroup, extractorSplit as extractorDefault, extractorSplit, hasScopePlaceholder, isAttributifySelector, isCountableSet, isObject, isRawUtil, isStaticRule, isStaticShortcut, isString, isValidSelector, makeRegexClassGroup, mergeConfigs, mergeDeep, noop, normalizeCSSEntries, normalizeCSSValues, normalizeVariant, notNull, parseVariantGroup, regexScopePlaceholder, resolveConfig, resolvePreset, resolvePresets, resolveShortcuts, splitWithVariantGroupRE, toArray, toEscapedSelector, uniq, validateFilterRE, warnOnce, withLayer };
|
|
990
|
+
export { type ArgumentType, type Arrayable, type AutoCompleteExtractor, type AutoCompleteExtractorContext, type AutoCompleteExtractorResult, type AutoCompleteFunction, type AutoCompleteTemplate, type Awaitable, BetterMap, type BlocklistRule, CONTROL_SHORTCUT_NO_MERGE, type CSSColorValue, type CSSEntries, type CSSObject, type CSSValue, type CSSValues, type CliEntryItem, type CliOptions, type ConfigBase, type ContentOptions, CountableSet, type DeepPartial, type DynamicMatcher, type DynamicRule, type DynamicShortcut, type DynamicShortcutMatcher, type ExtendedTokenInfo, type Extractor, type ExtractorContext, type FilterPattern, type FlatObjectTuple, type GenerateOptions, type GenerateResult, type GeneratorOptions, type HighlightAnnotation, type ParsedColorValue, type ParsedUtil, type PartialByKeys, type PluginOptions, type Postprocessor, type Preflight, type PreflightContext, type PreparedRule, type Preprocessor, type Preset, type PresetOptions, type RGBAColorValue, type RawUtil, type Replacement, type RequiredByKey, type ResolvedConfig, type RestArgs, type Rule, type RuleContext, type RuleMeta, type Shift, type Shortcut, type ShortcutValue, type SourceCodeTransformer, type SourceCodeTransformerEnforce, type SourceMap, type StaticRule, type StaticShortcut, type StaticShortcutMap, type StringifiedUtil, type SuggestResult, type ThemeExtender, type ToArray, TwoKeyMap, UnoGenerator, type UnocssPluginContext, type UserConfig, type UserConfigDefaults, type UserOnlyOptions, type UserShortcuts, type UtilObject, type ValueHandler, type ValueHandlerCallback, type Variant, type VariantContext, type VariantFunction, type VariantHandler, type VariantHandlerContext, type VariantMatchedResult, type VariantObject, attributifyRE, clearIdenticalEntries, clone, collapseVariantGroup, createGenerator, createValueHandler, cssIdRE, defaultSplitRE, e, entriesToCss, escapeRegExp, escapeSelector, expandVariantGroup, extractorSplit as extractorDefault, extractorSplit, hasScopePlaceholder, isAttributifySelector, isCountableSet, isObject, isRawUtil, isStaticRule, isStaticShortcut, isString, isValidSelector, makeRegexClassGroup, mergeConfigs, mergeDeep, noop, normalizeCSSEntries, normalizeCSSValues, normalizeVariant, notNull, parseVariantGroup, regexScopePlaceholder, resolveConfig, resolvePreset, resolvePresets, resolveShortcuts, splitWithVariantGroupRE, toArray, toEscapedSelector, uniq, validateFilterRE, warnOnce, withLayer };
|
package/dist/index.d.mts
CHANGED
|
@@ -584,7 +584,7 @@ interface ConfigBase<Theme extends object = object> {
|
|
|
584
584
|
*
|
|
585
585
|
* You don't usually need to set this.
|
|
586
586
|
*
|
|
587
|
-
* @default false
|
|
587
|
+
* @default `true` when `envMode` is `dev`, otherwise `false`
|
|
588
588
|
*/
|
|
589
589
|
details?: boolean;
|
|
590
590
|
}
|
|
@@ -987,4 +987,4 @@ declare function resolveConfig<Theme extends object = object>(userConfig?: UserC
|
|
|
987
987
|
*/
|
|
988
988
|
declare function mergeConfigs<Theme extends object = object>(configs: UserConfig<Theme>[]): UserConfig<Theme>;
|
|
989
989
|
|
|
990
|
-
export { ArgumentType, Arrayable, AutoCompleteExtractor, AutoCompleteExtractorContext, AutoCompleteExtractorResult, AutoCompleteFunction, AutoCompleteTemplate, Awaitable, BetterMap, BlocklistRule, CONTROL_SHORTCUT_NO_MERGE, CSSColorValue, CSSEntries, CSSObject, CSSValue, CSSValues, CliEntryItem, CliOptions, ConfigBase, ContentOptions, CountableSet, DeepPartial, DynamicMatcher, DynamicRule, DynamicShortcut, DynamicShortcutMatcher, ExtendedTokenInfo, Extractor, ExtractorContext, FilterPattern, FlatObjectTuple, GenerateOptions, GenerateResult, GeneratorOptions, HighlightAnnotation, ParsedColorValue, ParsedUtil, PartialByKeys, PluginOptions, Postprocessor, Preflight, PreflightContext, PreparedRule, Preprocessor, Preset, PresetOptions, RGBAColorValue, RawUtil, Replacement, RequiredByKey, ResolvedConfig, RestArgs, Rule, RuleContext, RuleMeta, Shift, Shortcut, ShortcutValue, SourceCodeTransformer, SourceCodeTransformerEnforce, SourceMap, StaticRule, StaticShortcut, StaticShortcutMap, StringifiedUtil, SuggestResult, ThemeExtender, ToArray, TwoKeyMap, UnoGenerator, UnocssPluginContext, UserConfig, UserConfigDefaults, UserOnlyOptions, UserShortcuts, UtilObject, ValueHandler, ValueHandlerCallback, Variant, VariantContext, VariantFunction, VariantHandler, VariantHandlerContext, VariantMatchedResult, VariantObject, attributifyRE, clearIdenticalEntries, clone, collapseVariantGroup, createGenerator, createValueHandler, cssIdRE, defaultSplitRE, e, entriesToCss, escapeRegExp, escapeSelector, expandVariantGroup, extractorSplit as extractorDefault, extractorSplit, hasScopePlaceholder, isAttributifySelector, isCountableSet, isObject, isRawUtil, isStaticRule, isStaticShortcut, isString, isValidSelector, makeRegexClassGroup, mergeConfigs, mergeDeep, noop, normalizeCSSEntries, normalizeCSSValues, normalizeVariant, notNull, parseVariantGroup, regexScopePlaceholder, resolveConfig, resolvePreset, resolvePresets, resolveShortcuts, splitWithVariantGroupRE, toArray, toEscapedSelector, uniq, validateFilterRE, warnOnce, withLayer };
|
|
990
|
+
export { type ArgumentType, type Arrayable, type AutoCompleteExtractor, type AutoCompleteExtractorContext, type AutoCompleteExtractorResult, type AutoCompleteFunction, type AutoCompleteTemplate, type Awaitable, BetterMap, type BlocklistRule, CONTROL_SHORTCUT_NO_MERGE, type CSSColorValue, type CSSEntries, type CSSObject, type CSSValue, type CSSValues, type CliEntryItem, type CliOptions, type ConfigBase, type ContentOptions, CountableSet, type DeepPartial, type DynamicMatcher, type DynamicRule, type DynamicShortcut, type DynamicShortcutMatcher, type ExtendedTokenInfo, type Extractor, type ExtractorContext, type FilterPattern, type FlatObjectTuple, type GenerateOptions, type GenerateResult, type GeneratorOptions, type HighlightAnnotation, type ParsedColorValue, type ParsedUtil, type PartialByKeys, type PluginOptions, type Postprocessor, type Preflight, type PreflightContext, type PreparedRule, type Preprocessor, type Preset, type PresetOptions, type RGBAColorValue, type RawUtil, type Replacement, type RequiredByKey, type ResolvedConfig, type RestArgs, type Rule, type RuleContext, type RuleMeta, type Shift, type Shortcut, type ShortcutValue, type SourceCodeTransformer, type SourceCodeTransformerEnforce, type SourceMap, type StaticRule, type StaticShortcut, type StaticShortcutMap, type StringifiedUtil, type SuggestResult, type ThemeExtender, type ToArray, TwoKeyMap, UnoGenerator, type UnocssPluginContext, type UserConfig, type UserConfigDefaults, type UserOnlyOptions, type UserShortcuts, type UtilObject, type ValueHandler, type ValueHandlerCallback, type Variant, type VariantContext, type VariantFunction, type VariantHandler, type VariantHandlerContext, type VariantMatchedResult, type VariantObject, attributifyRE, clearIdenticalEntries, clone, collapseVariantGroup, createGenerator, createValueHandler, cssIdRE, defaultSplitRE, e, entriesToCss, escapeRegExp, escapeSelector, expandVariantGroup, extractorSplit as extractorDefault, extractorSplit, hasScopePlaceholder, isAttributifySelector, isCountableSet, isObject, isRawUtil, isStaticRule, isStaticShortcut, isString, isValidSelector, makeRegexClassGroup, mergeConfigs, mergeDeep, noop, normalizeCSSEntries, normalizeCSSValues, normalizeVariant, notNull, parseVariantGroup, regexScopePlaceholder, resolveConfig, resolvePreset, resolvePresets, resolveShortcuts, splitWithVariantGroupRE, toArray, toEscapedSelector, uniq, validateFilterRE, warnOnce, withLayer };
|
package/dist/index.d.ts
CHANGED
|
@@ -584,7 +584,7 @@ interface ConfigBase<Theme extends object = object> {
|
|
|
584
584
|
*
|
|
585
585
|
* You don't usually need to set this.
|
|
586
586
|
*
|
|
587
|
-
* @default false
|
|
587
|
+
* @default `true` when `envMode` is `dev`, otherwise `false`
|
|
588
588
|
*/
|
|
589
589
|
details?: boolean;
|
|
590
590
|
}
|
|
@@ -987,4 +987,4 @@ declare function resolveConfig<Theme extends object = object>(userConfig?: UserC
|
|
|
987
987
|
*/
|
|
988
988
|
declare function mergeConfigs<Theme extends object = object>(configs: UserConfig<Theme>[]): UserConfig<Theme>;
|
|
989
989
|
|
|
990
|
-
export { ArgumentType, Arrayable, AutoCompleteExtractor, AutoCompleteExtractorContext, AutoCompleteExtractorResult, AutoCompleteFunction, AutoCompleteTemplate, Awaitable, BetterMap, BlocklistRule, CONTROL_SHORTCUT_NO_MERGE, CSSColorValue, CSSEntries, CSSObject, CSSValue, CSSValues, CliEntryItem, CliOptions, ConfigBase, ContentOptions, CountableSet, DeepPartial, DynamicMatcher, DynamicRule, DynamicShortcut, DynamicShortcutMatcher, ExtendedTokenInfo, Extractor, ExtractorContext, FilterPattern, FlatObjectTuple, GenerateOptions, GenerateResult, GeneratorOptions, HighlightAnnotation, ParsedColorValue, ParsedUtil, PartialByKeys, PluginOptions, Postprocessor, Preflight, PreflightContext, PreparedRule, Preprocessor, Preset, PresetOptions, RGBAColorValue, RawUtil, Replacement, RequiredByKey, ResolvedConfig, RestArgs, Rule, RuleContext, RuleMeta, Shift, Shortcut, ShortcutValue, SourceCodeTransformer, SourceCodeTransformerEnforce, SourceMap, StaticRule, StaticShortcut, StaticShortcutMap, StringifiedUtil, SuggestResult, ThemeExtender, ToArray, TwoKeyMap, UnoGenerator, UnocssPluginContext, UserConfig, UserConfigDefaults, UserOnlyOptions, UserShortcuts, UtilObject, ValueHandler, ValueHandlerCallback, Variant, VariantContext, VariantFunction, VariantHandler, VariantHandlerContext, VariantMatchedResult, VariantObject, attributifyRE, clearIdenticalEntries, clone, collapseVariantGroup, createGenerator, createValueHandler, cssIdRE, defaultSplitRE, e, entriesToCss, escapeRegExp, escapeSelector, expandVariantGroup, extractorSplit as extractorDefault, extractorSplit, hasScopePlaceholder, isAttributifySelector, isCountableSet, isObject, isRawUtil, isStaticRule, isStaticShortcut, isString, isValidSelector, makeRegexClassGroup, mergeConfigs, mergeDeep, noop, normalizeCSSEntries, normalizeCSSValues, normalizeVariant, notNull, parseVariantGroup, regexScopePlaceholder, resolveConfig, resolvePreset, resolvePresets, resolveShortcuts, splitWithVariantGroupRE, toArray, toEscapedSelector, uniq, validateFilterRE, warnOnce, withLayer };
|
|
990
|
+
export { type ArgumentType, type Arrayable, type AutoCompleteExtractor, type AutoCompleteExtractorContext, type AutoCompleteExtractorResult, type AutoCompleteFunction, type AutoCompleteTemplate, type Awaitable, BetterMap, type BlocklistRule, CONTROL_SHORTCUT_NO_MERGE, type CSSColorValue, type CSSEntries, type CSSObject, type CSSValue, type CSSValues, type CliEntryItem, type CliOptions, type ConfigBase, type ContentOptions, CountableSet, type DeepPartial, type DynamicMatcher, type DynamicRule, type DynamicShortcut, type DynamicShortcutMatcher, type ExtendedTokenInfo, type Extractor, type ExtractorContext, type FilterPattern, type FlatObjectTuple, type GenerateOptions, type GenerateResult, type GeneratorOptions, type HighlightAnnotation, type ParsedColorValue, type ParsedUtil, type PartialByKeys, type PluginOptions, type Postprocessor, type Preflight, type PreflightContext, type PreparedRule, type Preprocessor, type Preset, type PresetOptions, type RGBAColorValue, type RawUtil, type Replacement, type RequiredByKey, type ResolvedConfig, type RestArgs, type Rule, type RuleContext, type RuleMeta, type Shift, type Shortcut, type ShortcutValue, type SourceCodeTransformer, type SourceCodeTransformerEnforce, type SourceMap, type StaticRule, type StaticShortcut, type StaticShortcutMap, type StringifiedUtil, type SuggestResult, type ThemeExtender, type ToArray, TwoKeyMap, UnoGenerator, type UnocssPluginContext, type UserConfig, type UserConfigDefaults, type UserOnlyOptions, type UserShortcuts, type UtilObject, type ValueHandler, type ValueHandlerCallback, type Variant, type VariantContext, type VariantFunction, type VariantHandler, type VariantHandlerContext, type VariantMatchedResult, type VariantObject, attributifyRE, clearIdenticalEntries, clone, collapseVariantGroup, createGenerator, createValueHandler, cssIdRE, defaultSplitRE, e, entriesToCss, escapeRegExp, escapeSelector, expandVariantGroup, extractorSplit as extractorDefault, extractorSplit, hasScopePlaceholder, isAttributifySelector, isCountableSet, isObject, isRawUtil, isStaticRule, isStaticShortcut, isString, isValidSelector, makeRegexClassGroup, mergeConfigs, mergeDeep, noop, normalizeCSSEntries, normalizeCSSValues, normalizeVariant, notNull, parseVariantGroup, regexScopePlaceholder, resolveConfig, resolvePreset, resolvePresets, resolveShortcuts, splitWithVariantGroupRE, toArray, toEscapedSelector, uniq, validateFilterRE, warnOnce, withLayer };
|
package/dist/index.mjs
CHANGED
|
@@ -13,6 +13,10 @@ function escapeSelector(str) {
|
|
|
13
13
|
result += "\uFFFD";
|
|
14
14
|
continue;
|
|
15
15
|
}
|
|
16
|
+
if (codeUnit === 37) {
|
|
17
|
+
result += "\\%";
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
16
20
|
if (codeUnit === 44) {
|
|
17
21
|
result += "\\,";
|
|
18
22
|
continue;
|
|
@@ -564,33 +568,25 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
564
568
|
shortcuts: resolveShortcuts(getMerged("shortcuts")).reverse(),
|
|
565
569
|
extractors,
|
|
566
570
|
safelist: getMerged("safelist"),
|
|
567
|
-
separators
|
|
571
|
+
separators,
|
|
572
|
+
details: config.details ?? config.envMode === "dev"
|
|
568
573
|
};
|
|
569
574
|
for (const p of sources)
|
|
570
575
|
p?.configResolved?.(resolved);
|
|
571
576
|
return resolved;
|
|
572
577
|
}
|
|
573
578
|
function mergeConfigs(configs) {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
theme
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
postprocess: getMerged("postprocess"),
|
|
586
|
-
preflights: getMerged("preflights"),
|
|
587
|
-
rules: getMerged("rules"),
|
|
588
|
-
variants: getMerged("variants"),
|
|
589
|
-
shortcuts: getMerged("shortcuts"),
|
|
590
|
-
extractors: getMerged("extractors")
|
|
591
|
-
}
|
|
592
|
-
);
|
|
593
|
-
return merged;
|
|
579
|
+
const maybeArrays = ["shortcuts", "preprocess", "postprocess"];
|
|
580
|
+
const config = configs.map((config2) => Object.entries(config2).reduce((acc, [key, value]) => ({
|
|
581
|
+
...acc,
|
|
582
|
+
[key]: maybeArrays.includes(key) ? toArray(value) : value
|
|
583
|
+
}), {})).reduce(({ theme: themeA, ...a }, { theme: themeB, ...b }) => {
|
|
584
|
+
const c = mergeDeep(a, b, true);
|
|
585
|
+
if (themeA || themeB)
|
|
586
|
+
c.theme = mergeThemes([themeA, themeB]);
|
|
587
|
+
return c;
|
|
588
|
+
}, {});
|
|
589
|
+
return config;
|
|
594
590
|
}
|
|
595
591
|
function mergeThemes(themes) {
|
|
596
592
|
return themes.map((theme) => theme ? clone(theme) : {}).reduce((a, b) => mergeDeep(a, b), {});
|
|
@@ -615,7 +611,7 @@ function mergeAutocompleteShorthands(shorthands) {
|
|
|
615
611
|
);
|
|
616
612
|
}
|
|
617
613
|
|
|
618
|
-
const version = "0.55.
|
|
614
|
+
const version = "0.55.4";
|
|
619
615
|
|
|
620
616
|
var __defProp = Object.defineProperty;
|
|
621
617
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -827,7 +823,7 @@ class UnoGenerator {
|
|
|
827
823
|
if (!parent)
|
|
828
824
|
return rules;
|
|
829
825
|
const parents = parent.split(" $$ ");
|
|
830
|
-
return `${parents.join("{")}{${nl}${rules}${nl}
|
|
826
|
+
return `${parents.join("{")}{${nl}${rules}${nl}${"}".repeat(parents.length)}`;
|
|
831
827
|
}).filter(Boolean).join(nl);
|
|
832
828
|
if (preflights) {
|
|
833
829
|
css = [preflightsMap[layer], css].filter(Boolean).join(nl);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/core",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.4",
|
|
4
4
|
"description": "The instant on-demand Atomic CSS engine.",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"magic-string": "^0.30.
|
|
40
|
+
"magic-string": "^0.30.3",
|
|
41
41
|
"unconfig": "^0.3.10"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|