@unocss/core 0.12.16 → 0.13.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.d.ts CHANGED
@@ -33,6 +33,7 @@ declare type FlatObjectTuple<T> = {
33
33
  [K in keyof T]: T[K];
34
34
  };
35
35
  declare type PartialByKeys<T, K extends keyof T = keyof T> = FlatObjectTuple<Partial<Pick<T, Extract<keyof T, K>>> & Omit<T, K>>;
36
+ declare type RequiredByKey<T, K extends keyof T = keyof T> = FlatObjectTuple<Required<Pick<T, Extract<keyof T, K>>> & Omit<T, K>>;
36
37
  declare type CSSObject = Record<string, string | number | undefined>;
37
38
  declare type CSSEntries = [string, string | number | undefined][];
38
39
  interface RuleContext<Theme extends {} = {}> {
@@ -95,6 +96,7 @@ declare type StaticShortcutMap = Record<string, string | string[]>;
95
96
  declare type DynamicShortcut<Theme extends {} = {}> = [RegExp, DynamicShortcutMatcher<Theme>] | [RegExp, DynamicShortcutMatcher<Theme>, RuleMeta];
96
97
  declare type UserShortcuts<Theme extends {} = {}> = StaticShortcutMap | (StaticShortcut | DynamicShortcut<Theme> | StaticShortcutMap)[];
97
98
  declare type Shortcut<Theme extends {} = {}> = StaticShortcut | DynamicShortcut<Theme>;
99
+ declare type FilterPattern = ReadonlyArray<string | RegExp> | string | RegExp | null;
98
100
  interface Preflight {
99
101
  getCSS: () => string | undefined;
100
102
  layer?: string;
@@ -226,11 +228,34 @@ interface UserOnlyOptions<Theme extends {} = {}> {
226
228
  */
227
229
  envMode?: 'dev' | 'build';
228
230
  }
229
- interface UserConfig<Theme extends {} = {}> extends ConfigBase<Theme>, UserOnlyOptions<Theme>, GeneratorOptions {
231
+ /**
232
+ * For other modules to aggregate the options
233
+ */
234
+ interface PluginOptions {
235
+ /**
236
+ * Load from configs files
237
+ *
238
+ * set `false` to disable
239
+ */
240
+ configFile?: string | false;
241
+ /**
242
+ * List of files that will also triggers config reloads
243
+ */
244
+ configDeps?: string[];
245
+ /**
246
+ * Patterns that filter the files being extracted.
247
+ */
248
+ include?: FilterPattern;
249
+ /**
250
+ * Patterns that filter the files NOT being extracted.
251
+ */
252
+ exclude?: FilterPattern;
253
+ }
254
+ interface UserConfig<Theme extends {} = {}> extends ConfigBase<Theme>, UserOnlyOptions<Theme>, GeneratorOptions, PluginOptions {
230
255
  }
231
256
  interface UserConfigDefaults<Theme extends {} = {}> extends ConfigBase<Theme>, UserOnlyOptions<Theme> {
232
257
  }
233
- interface ResolvedConfig extends Omit<PartialByKeys<Required<UserConfig>, 'preprocess'>, 'rules' | 'shortcuts'> {
258
+ interface ResolvedConfig extends Omit<RequiredByKey<UserConfig, 'mergeSelectors' | 'theme' | 'rules' | 'variants' | 'layers' | 'extractors' | 'blocklist' | 'safelist' | 'preflights' | 'sortLayers'>, 'rules' | 'shortcuts'> {
234
259
  shortcuts: Shortcut[];
235
260
  variants: VariantObject[];
236
261
  rulesSize: number;
@@ -343,4 +368,4 @@ declare function warnOnce(msg: string): void;
343
368
 
344
369
  declare const extractorSplit: Extractor;
345
370
 
346
- export { ArgumentType, Awaitable, BetterMap, BlocklistRule, CSSEntries, CSSObject, ConfigBase, DeepPartial, DynamicMatcher, DynamicRule, DynamicShortcut, DynamicShortcutMatcher, Extractor, ExtractorContext, FlatObjectTuple, GenerateOptions, GenerateResult, GeneratorOptions, ParsedUtil, PartialByKeys, Preflight, Preset, RawUtil, ResolvedConfig, RestArgs, Rule, RuleContext, RuleMeta, Shift, Shortcut, StaticRule, StaticShortcut, StaticShortcutMap, StringifiedUtil, TwoKeyMap, UnoGenerator, UserConfig, UserConfigDefaults, UserOnlyOptions, UserShortcuts, Variant, VariantFunction, VariantHandler, VariantMatchedResult, VariantObject, attributifyRE, createGenerator, e, entriesToCss, escapeRegExp, escapeSelector, expandVariantGroup, extractorSplit, hasScopePlaceholder, hex2rgba, isAttributifySelector, isObject, isRawUtil, isStaticRule, isStaticShortcut, isValidSelector, mergeDeep, mergeSet, normalizeVariant, regexClassGroup, toArray, uniq, validateFilterRE, warnOnce, withLayer };
371
+ export { ArgumentType, Awaitable, BetterMap, BlocklistRule, CSSEntries, CSSObject, ConfigBase, DeepPartial, DynamicMatcher, DynamicRule, DynamicShortcut, DynamicShortcutMatcher, Extractor, ExtractorContext, FilterPattern, FlatObjectTuple, GenerateOptions, GenerateResult, GeneratorOptions, ParsedUtil, PartialByKeys, PluginOptions, Preflight, Preset, RawUtil, RequiredByKey, ResolvedConfig, RestArgs, Rule, RuleContext, RuleMeta, Shift, Shortcut, StaticRule, StaticShortcut, StaticShortcutMap, StringifiedUtil, TwoKeyMap, UnoGenerator, UserConfig, UserConfigDefaults, UserOnlyOptions, UserShortcuts, Variant, VariantFunction, VariantHandler, VariantMatchedResult, VariantObject, attributifyRE, createGenerator, e, entriesToCss, escapeRegExp, escapeSelector, expandVariantGroup, extractorSplit, hasScopePlaceholder, hex2rgba, isAttributifySelector, isObject, isRawUtil, isStaticRule, isStaticShortcut, isValidSelector, mergeDeep, mergeSet, normalizeVariant, regexClassGroup, toArray, uniq, validateFilterRE, warnOnce, withLayer };
package/dist/index.js CHANGED
@@ -336,7 +336,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
336
336
  }
337
337
 
338
338
  // package.json
339
- var version = "0.12.16";
339
+ var version = "0.13.1";
340
340
 
341
341
  // src/generator/index.ts
342
342
  var UnoGenerator = class {
package/dist/index.mjs CHANGED
@@ -296,7 +296,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
296
296
  }
297
297
 
298
298
  // package.json
299
- var version = "0.12.16";
299
+ var version = "0.13.1";
300
300
 
301
301
  // src/generator/index.ts
302
302
  var UnoGenerator = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/core",
3
- "version": "0.12.16",
3
+ "version": "0.13.1",
4
4
  "description": "The instant on-demand Atomic CSS engine.",
5
5
  "keywords": [
6
6
  "unocss",