@unocss/core 0.6.3 → 0.7.0
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 +2 -1
- package/dist/index.js +6 -2
- package/dist/index.mjs +6 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -160,6 +160,7 @@ interface ConfigBase<Theme extends {} = {}> {
|
|
|
160
160
|
sortLayers?: (layers: string[]) => string[];
|
|
161
161
|
}
|
|
162
162
|
interface Preset extends ConfigBase {
|
|
163
|
+
name: string;
|
|
163
164
|
enforce?: 'pre' | 'post';
|
|
164
165
|
}
|
|
165
166
|
interface GeneratorOptions {
|
|
@@ -202,7 +203,7 @@ interface UserConfig<Theme extends {} = {}> extends ConfigBase<Theme>, UserOnlyO
|
|
|
202
203
|
}
|
|
203
204
|
interface UserConfigDefaults<Theme extends {} = {}> extends ConfigBase<Theme>, UserOnlyOptions<Theme> {
|
|
204
205
|
}
|
|
205
|
-
interface ResolvedConfig extends Omit<Required<UserConfig>, '
|
|
206
|
+
interface ResolvedConfig extends Omit<Required<UserConfig>, 'rules' | 'shortcuts'> {
|
|
206
207
|
shortcuts: Shortcut[];
|
|
207
208
|
variants: VariantObject[];
|
|
208
209
|
rulesSize: number;
|
package/dist/index.js
CHANGED
|
@@ -286,6 +286,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
286
286
|
mergeSelectors: true,
|
|
287
287
|
warnExcluded: true,
|
|
288
288
|
excluded: [],
|
|
289
|
+
presets: [],
|
|
289
290
|
sortLayers: (layers2) => layers2,
|
|
290
291
|
...config,
|
|
291
292
|
envMode: config.envMode || "build",
|
|
@@ -534,10 +535,13 @@ ${css}` : css;
|
|
|
534
535
|
if (!match)
|
|
535
536
|
continue;
|
|
536
537
|
const result = await handler(match, context);
|
|
538
|
+
if (!result)
|
|
539
|
+
continue;
|
|
537
540
|
if (typeof result === "string")
|
|
538
541
|
return [i, result, meta];
|
|
539
|
-
|
|
540
|
-
|
|
542
|
+
const entries = normalizeEntries(result).filter((i2) => i2[1] != null);
|
|
543
|
+
if (entries.length)
|
|
544
|
+
return [i, raw, entries, meta, variantHandlers];
|
|
541
545
|
}
|
|
542
546
|
}
|
|
543
547
|
stringifyUtil(parsed) {
|
package/dist/index.mjs
CHANGED
|
@@ -249,6 +249,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
249
249
|
mergeSelectors: true,
|
|
250
250
|
warnExcluded: true,
|
|
251
251
|
excluded: [],
|
|
252
|
+
presets: [],
|
|
252
253
|
sortLayers: (layers2) => layers2,
|
|
253
254
|
...config,
|
|
254
255
|
envMode: config.envMode || "build",
|
|
@@ -497,10 +498,13 @@ ${css}` : css;
|
|
|
497
498
|
if (!match)
|
|
498
499
|
continue;
|
|
499
500
|
const result = await handler(match, context);
|
|
501
|
+
if (!result)
|
|
502
|
+
continue;
|
|
500
503
|
if (typeof result === "string")
|
|
501
504
|
return [i, result, meta];
|
|
502
|
-
|
|
503
|
-
|
|
505
|
+
const entries = normalizeEntries(result).filter((i2) => i2[1] != null);
|
|
506
|
+
if (entries.length)
|
|
507
|
+
return [i, raw, entries, meta, variantHandlers];
|
|
504
508
|
}
|
|
505
509
|
}
|
|
506
510
|
stringifyUtil(parsed) {
|