@unocss/core 0.26.0 → 0.26.3
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 +5 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -366,7 +366,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
-
const version = "0.26.
|
|
369
|
+
const version = "0.26.3";
|
|
370
370
|
|
|
371
371
|
class UnoGenerator {
|
|
372
372
|
constructor(userConfig = {}, defaults = {}) {
|
|
@@ -719,11 +719,11 @@ class UnoGenerator {
|
|
|
719
719
|
function createGenerator(config, defaults) {
|
|
720
720
|
return new UnoGenerator(config, defaults);
|
|
721
721
|
}
|
|
722
|
-
const
|
|
723
|
-
const hasScopePlaceholder = (css) => css.match(
|
|
722
|
+
const regexScopePlaceholder = / \$\$ /;
|
|
723
|
+
const hasScopePlaceholder = (css) => css.match(regexScopePlaceholder);
|
|
724
724
|
function applyScope(css, scope) {
|
|
725
725
|
if (hasScopePlaceholder(css))
|
|
726
|
-
return css.replace(
|
|
726
|
+
return css.replace(regexScopePlaceholder, scope ? ` ${scope} ` : " ");
|
|
727
727
|
else
|
|
728
728
|
return scope ? `${scope} ${css}` : css;
|
|
729
729
|
}
|
|
@@ -764,6 +764,7 @@ exports.normalizeCSSValues = normalizeCSSValues;
|
|
|
764
764
|
exports.normalizeVariant = normalizeVariant;
|
|
765
765
|
exports.notNull = notNull;
|
|
766
766
|
exports.regexClassGroup = regexClassGroup;
|
|
767
|
+
exports.regexScopePlaceholder = regexScopePlaceholder;
|
|
767
768
|
exports.toArray = toArray;
|
|
768
769
|
exports.uniq = uniq;
|
|
769
770
|
exports.validateFilterRE = validateFilterRE;
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ declare class UnoGenerator {
|
|
|
24
24
|
isBlocked(raw: string): boolean;
|
|
25
25
|
}
|
|
26
26
|
declare function createGenerator(config?: UserConfig, defaults?: UserConfigDefaults): UnoGenerator;
|
|
27
|
+
declare const regexScopePlaceholder: RegExp;
|
|
27
28
|
declare const hasScopePlaceholder: (css: string) => RegExpMatchArray | null;
|
|
28
29
|
|
|
29
30
|
declare function escapeRegExp(string: string): string;
|
|
@@ -531,4 +532,4 @@ declare const extractorSplit: Extractor;
|
|
|
531
532
|
|
|
532
533
|
declare const extractorSvelte: Extractor;
|
|
533
534
|
|
|
534
|
-
export { ArgumentType, Arrayable, Awaitable, BetterMap, BlocklistRule, CONTROL_SHORTCUT_NO_MERGE, CSSColorValue, CSSEntries, CSSObject, CSSValues, ConfigBase, DeepPartial, DynamicMatcher, DynamicRule, DynamicShortcut, DynamicShortcutMatcher, Extractor, ExtractorContext, FilterPattern, FlatObjectTuple, GenerateOptions, GenerateResult, GeneratorOptions, ParsedColorValue, ParsedUtil, PartialByKeys, PluginOptions, Postprocessor, Preflight, Preprocessor, Preset, PresetOptions, RGBAColorValue, RawUtil, RequiredByKey, ResolvedConfig, RestArgs, Rule, RuleContext, RuleMeta, Shift, Shortcut, SourceCodeTransformer, SourceMap, StaticRule, StaticShortcut, StaticShortcutMap, StringifiedUtil, ThemeExtender, TransformResult, TwoKeyMap, UnoGenerator, UnocssPluginContext, UserConfig, UserConfigDefaults, UserOnlyOptions, UserShortcuts, UtilObject, ValueHandler, ValueHandlerCallback, Variant, VariantContext, VariantFunction, VariantHandler, VariantMatchedResult, VariantObject, attributifyRE, clearIdenticalEntries, clone, createGenerator, createValueHandler, e, entriesToCss, escapeRegExp, escapeSelector, expandVariantGroup, extractorSplit, extractorSvelte, hasScopePlaceholder, isAttributifySelector, isObject, isRawUtil, isStaticRule, isStaticShortcut, isValidSelector, mergeDeep, mergeSet, normalizeCSSEntries, normalizeCSSValues, normalizeVariant, notNull, regexClassGroup, toArray, uniq, validateFilterRE, warnOnce, withLayer };
|
|
535
|
+
export { ArgumentType, Arrayable, Awaitable, BetterMap, BlocklistRule, CONTROL_SHORTCUT_NO_MERGE, CSSColorValue, CSSEntries, CSSObject, CSSValues, ConfigBase, DeepPartial, DynamicMatcher, DynamicRule, DynamicShortcut, DynamicShortcutMatcher, Extractor, ExtractorContext, FilterPattern, FlatObjectTuple, GenerateOptions, GenerateResult, GeneratorOptions, ParsedColorValue, ParsedUtil, PartialByKeys, PluginOptions, Postprocessor, Preflight, Preprocessor, Preset, PresetOptions, RGBAColorValue, RawUtil, RequiredByKey, ResolvedConfig, RestArgs, Rule, RuleContext, RuleMeta, Shift, Shortcut, SourceCodeTransformer, SourceMap, StaticRule, StaticShortcut, StaticShortcutMap, StringifiedUtil, ThemeExtender, TransformResult, TwoKeyMap, UnoGenerator, UnocssPluginContext, UserConfig, UserConfigDefaults, UserOnlyOptions, UserShortcuts, UtilObject, ValueHandler, ValueHandlerCallback, Variant, VariantContext, VariantFunction, VariantHandler, VariantMatchedResult, VariantObject, attributifyRE, clearIdenticalEntries, clone, createGenerator, createValueHandler, e, entriesToCss, escapeRegExp, escapeSelector, expandVariantGroup, extractorSplit, extractorSvelte, hasScopePlaceholder, isAttributifySelector, isObject, isRawUtil, isStaticRule, isStaticShortcut, isValidSelector, mergeDeep, mergeSet, normalizeCSSEntries, normalizeCSSValues, normalizeVariant, notNull, regexClassGroup, regexScopePlaceholder, toArray, uniq, validateFilterRE, warnOnce, withLayer };
|
package/dist/index.mjs
CHANGED
|
@@ -362,7 +362,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
362
362
|
};
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
const version = "0.26.
|
|
365
|
+
const version = "0.26.3";
|
|
366
366
|
|
|
367
367
|
class UnoGenerator {
|
|
368
368
|
constructor(userConfig = {}, defaults = {}) {
|
|
@@ -715,11 +715,11 @@ class UnoGenerator {
|
|
|
715
715
|
function createGenerator(config, defaults) {
|
|
716
716
|
return new UnoGenerator(config, defaults);
|
|
717
717
|
}
|
|
718
|
-
const
|
|
719
|
-
const hasScopePlaceholder = (css) => css.match(
|
|
718
|
+
const regexScopePlaceholder = / \$\$ /;
|
|
719
|
+
const hasScopePlaceholder = (css) => css.match(regexScopePlaceholder);
|
|
720
720
|
function applyScope(css, scope) {
|
|
721
721
|
if (hasScopePlaceholder(css))
|
|
722
|
-
return css.replace(
|
|
722
|
+
return css.replace(regexScopePlaceholder, scope ? ` ${scope} ` : " ");
|
|
723
723
|
else
|
|
724
724
|
return scope ? `${scope} ${css}` : css;
|
|
725
725
|
}
|
|
@@ -730,4 +730,4 @@ function toEscapedSelector(raw) {
|
|
|
730
730
|
return `.${e(raw)}`;
|
|
731
731
|
}
|
|
732
732
|
|
|
733
|
-
export { BetterMap, CONTROL_SHORTCUT_NO_MERGE, TwoKeyMap, UnoGenerator, attributifyRE, clearIdenticalEntries, clone, createGenerator, createValueHandler, e, entriesToCss, escapeRegExp, escapeSelector, expandVariantGroup, extractorSplit, extractorSvelte, hasScopePlaceholder, isAttributifySelector, isObject, isRawUtil, isStaticRule, isStaticShortcut, isValidSelector, mergeDeep, mergeSet, normalizeCSSEntries, normalizeCSSValues, normalizeVariant, notNull, regexClassGroup, toArray, uniq, validateFilterRE, warnOnce, withLayer };
|
|
733
|
+
export { BetterMap, CONTROL_SHORTCUT_NO_MERGE, TwoKeyMap, UnoGenerator, attributifyRE, clearIdenticalEntries, clone, createGenerator, createValueHandler, e, entriesToCss, escapeRegExp, escapeSelector, expandVariantGroup, extractorSplit, extractorSvelte, hasScopePlaceholder, isAttributifySelector, isObject, isRawUtil, isStaticRule, isStaticShortcut, isValidSelector, mergeDeep, mergeSet, normalizeCSSEntries, normalizeCSSValues, normalizeVariant, notNull, regexClassGroup, regexScopePlaceholder, toArray, uniq, validateFilterRE, warnOnce, withLayer };
|