@unocss/core 0.58.3 → 0.58.5
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 +2 -2
- package/dist/index.d.cts +5 -5
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -590,7 +590,7 @@ function definePreset(preset) {
|
|
|
590
590
|
return preset;
|
|
591
591
|
}
|
|
592
592
|
|
|
593
|
-
const version = "0.58.
|
|
593
|
+
const version = "0.58.5";
|
|
594
594
|
|
|
595
595
|
var __defProp = Object.defineProperty;
|
|
596
596
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -764,7 +764,7 @@ class UnoGenerator {
|
|
|
764
764
|
})();
|
|
765
765
|
const layers = this.config.sortLayers(Array.from(layerSet).sort((a, b) => (this.config.layers[a] ?? 0) - (this.config.layers[b] ?? 0) || a.localeCompare(b)));
|
|
766
766
|
const layerCache = {};
|
|
767
|
-
const getLayer = (layer) => {
|
|
767
|
+
const getLayer = (layer = LAYER_DEFAULT) => {
|
|
768
768
|
if (layerCache[layer])
|
|
769
769
|
return layerCache[layer];
|
|
770
770
|
let css = Array.from(sheet).sort((a, b) => (this.parentOrders.get(a[0]) ?? 0) - (this.parentOrders.get(b[0]) ?? 0) || a[0]?.localeCompare(b[0] || "") || 0).map(([parent, items]) => {
|
package/dist/index.d.cts
CHANGED
|
@@ -296,7 +296,7 @@ interface Extractor {
|
|
|
296
296
|
*
|
|
297
297
|
* Return `undefined` to skip this extractor.
|
|
298
298
|
*/
|
|
299
|
-
extract
|
|
299
|
+
extract?: (ctx: ExtractorContext) => Awaitable<Set<string> | CountableSet<string> | string[] | undefined | void>;
|
|
300
300
|
}
|
|
301
301
|
interface RuleMeta {
|
|
302
302
|
/**
|
|
@@ -702,7 +702,7 @@ interface UnocssPluginContext<Config extends UserConfig = UserConfig> {
|
|
|
702
702
|
/**
|
|
703
703
|
* Await all pending tasks
|
|
704
704
|
*/
|
|
705
|
-
flushTasks()
|
|
705
|
+
flushTasks: () => Promise<any>;
|
|
706
706
|
filter: (code: string, id: string) => boolean;
|
|
707
707
|
extract: (code: string, id?: string) => Promise<void>;
|
|
708
708
|
reloadConfig: () => Promise<LoadConfigResult<Config>>;
|
|
@@ -824,7 +824,7 @@ interface PluginOptions {
|
|
|
824
824
|
*
|
|
825
825
|
* Supported sources:
|
|
826
826
|
* - `filesystem` - extract from file system
|
|
827
|
-
* - `
|
|
827
|
+
* - `inline` - extract from plain inline text
|
|
828
828
|
* - `pipeline` - extract from build tools' transformation pipeline, such as Vite and Webpack
|
|
829
829
|
*
|
|
830
830
|
* The usage extracted from each source will be **merged** together.
|
|
@@ -869,8 +869,8 @@ interface ResolvedConfig<Theme extends object = object> extends Omit<RequiredByK
|
|
|
869
869
|
interface GenerateResult<T = Set<string>> {
|
|
870
870
|
css: string;
|
|
871
871
|
layers: string[];
|
|
872
|
-
getLayer(name?: string)
|
|
873
|
-
getLayers(includes?: string[], excludes?: string[])
|
|
872
|
+
getLayer: (name?: string) => string | undefined;
|
|
873
|
+
getLayers: (includes?: string[], excludes?: string[]) => string;
|
|
874
874
|
matched: T;
|
|
875
875
|
}
|
|
876
876
|
type VariantMatchedResult<Theme extends object = object> = readonly [
|
package/dist/index.d.mts
CHANGED
|
@@ -296,7 +296,7 @@ interface Extractor {
|
|
|
296
296
|
*
|
|
297
297
|
* Return `undefined` to skip this extractor.
|
|
298
298
|
*/
|
|
299
|
-
extract
|
|
299
|
+
extract?: (ctx: ExtractorContext) => Awaitable<Set<string> | CountableSet<string> | string[] | undefined | void>;
|
|
300
300
|
}
|
|
301
301
|
interface RuleMeta {
|
|
302
302
|
/**
|
|
@@ -702,7 +702,7 @@ interface UnocssPluginContext<Config extends UserConfig = UserConfig> {
|
|
|
702
702
|
/**
|
|
703
703
|
* Await all pending tasks
|
|
704
704
|
*/
|
|
705
|
-
flushTasks()
|
|
705
|
+
flushTasks: () => Promise<any>;
|
|
706
706
|
filter: (code: string, id: string) => boolean;
|
|
707
707
|
extract: (code: string, id?: string) => Promise<void>;
|
|
708
708
|
reloadConfig: () => Promise<LoadConfigResult<Config>>;
|
|
@@ -824,7 +824,7 @@ interface PluginOptions {
|
|
|
824
824
|
*
|
|
825
825
|
* Supported sources:
|
|
826
826
|
* - `filesystem` - extract from file system
|
|
827
|
-
* - `
|
|
827
|
+
* - `inline` - extract from plain inline text
|
|
828
828
|
* - `pipeline` - extract from build tools' transformation pipeline, such as Vite and Webpack
|
|
829
829
|
*
|
|
830
830
|
* The usage extracted from each source will be **merged** together.
|
|
@@ -869,8 +869,8 @@ interface ResolvedConfig<Theme extends object = object> extends Omit<RequiredByK
|
|
|
869
869
|
interface GenerateResult<T = Set<string>> {
|
|
870
870
|
css: string;
|
|
871
871
|
layers: string[];
|
|
872
|
-
getLayer(name?: string)
|
|
873
|
-
getLayers(includes?: string[], excludes?: string[])
|
|
872
|
+
getLayer: (name?: string) => string | undefined;
|
|
873
|
+
getLayers: (includes?: string[], excludes?: string[]) => string;
|
|
874
874
|
matched: T;
|
|
875
875
|
}
|
|
876
876
|
type VariantMatchedResult<Theme extends object = object> = readonly [
|
package/dist/index.d.ts
CHANGED
|
@@ -296,7 +296,7 @@ interface Extractor {
|
|
|
296
296
|
*
|
|
297
297
|
* Return `undefined` to skip this extractor.
|
|
298
298
|
*/
|
|
299
|
-
extract
|
|
299
|
+
extract?: (ctx: ExtractorContext) => Awaitable<Set<string> | CountableSet<string> | string[] | undefined | void>;
|
|
300
300
|
}
|
|
301
301
|
interface RuleMeta {
|
|
302
302
|
/**
|
|
@@ -702,7 +702,7 @@ interface UnocssPluginContext<Config extends UserConfig = UserConfig> {
|
|
|
702
702
|
/**
|
|
703
703
|
* Await all pending tasks
|
|
704
704
|
*/
|
|
705
|
-
flushTasks()
|
|
705
|
+
flushTasks: () => Promise<any>;
|
|
706
706
|
filter: (code: string, id: string) => boolean;
|
|
707
707
|
extract: (code: string, id?: string) => Promise<void>;
|
|
708
708
|
reloadConfig: () => Promise<LoadConfigResult<Config>>;
|
|
@@ -824,7 +824,7 @@ interface PluginOptions {
|
|
|
824
824
|
*
|
|
825
825
|
* Supported sources:
|
|
826
826
|
* - `filesystem` - extract from file system
|
|
827
|
-
* - `
|
|
827
|
+
* - `inline` - extract from plain inline text
|
|
828
828
|
* - `pipeline` - extract from build tools' transformation pipeline, such as Vite and Webpack
|
|
829
829
|
*
|
|
830
830
|
* The usage extracted from each source will be **merged** together.
|
|
@@ -869,8 +869,8 @@ interface ResolvedConfig<Theme extends object = object> extends Omit<RequiredByK
|
|
|
869
869
|
interface GenerateResult<T = Set<string>> {
|
|
870
870
|
css: string;
|
|
871
871
|
layers: string[];
|
|
872
|
-
getLayer(name?: string)
|
|
873
|
-
getLayers(includes?: string[], excludes?: string[])
|
|
872
|
+
getLayer: (name?: string) => string | undefined;
|
|
873
|
+
getLayers: (includes?: string[], excludes?: string[]) => string;
|
|
874
874
|
matched: T;
|
|
875
875
|
}
|
|
876
876
|
type VariantMatchedResult<Theme extends object = object> = readonly [
|
package/dist/index.mjs
CHANGED
|
@@ -588,7 +588,7 @@ function definePreset(preset) {
|
|
|
588
588
|
return preset;
|
|
589
589
|
}
|
|
590
590
|
|
|
591
|
-
const version = "0.58.
|
|
591
|
+
const version = "0.58.5";
|
|
592
592
|
|
|
593
593
|
var __defProp = Object.defineProperty;
|
|
594
594
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -762,7 +762,7 @@ class UnoGenerator {
|
|
|
762
762
|
})();
|
|
763
763
|
const layers = this.config.sortLayers(Array.from(layerSet).sort((a, b) => (this.config.layers[a] ?? 0) - (this.config.layers[b] ?? 0) || a.localeCompare(b)));
|
|
764
764
|
const layerCache = {};
|
|
765
|
-
const getLayer = (layer) => {
|
|
765
|
+
const getLayer = (layer = LAYER_DEFAULT) => {
|
|
766
766
|
if (layerCache[layer])
|
|
767
767
|
return layerCache[layer];
|
|
768
768
|
let css = Array.from(sheet).sort((a, b) => (this.parentOrders.get(a[0]) ?? 0) - (this.parentOrders.get(b[0]) ?? 0) || a[0]?.localeCompare(b[0] || "") || 0).map(([parent, items]) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/core",
|
|
3
|
-
"version": "0.58.
|
|
3
|
+
"version": "0.58.5",
|
|
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.6",
|
|
41
41
|
"unconfig": "^0.3.11"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|