@unocss/postcss 66.5.10 → 66.5.11
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/esm.cjs +284 -0
- package/dist/esm.d.cts +969 -0
- package/dist/esm.d.mts +965 -17
- package/dist/esm.mjs +241 -276
- package/dist/index.d.mts +970 -23
- package/dist/index.mjs +13 -12
- package/package.json +7 -8
- package/dist/esm.d.ts +0 -21
- package/dist/index.cjs +0 -19
- package/dist/index.d.cts +0 -30
- package/dist/index.d.ts +0 -30
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
//#region src/index.ts
|
|
1
2
|
function unocss(options = {}) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
]
|
|
12
|
-
};
|
|
3
|
+
var _options$directiveMap;
|
|
4
|
+
let promise;
|
|
5
|
+
return {
|
|
6
|
+
postcssPlugin: ((_options$directiveMap = options.directiveMap) === null || _options$directiveMap === void 0 ? void 0 : _options$directiveMap.unocss) || "unocss",
|
|
7
|
+
plugins: [async (root, result) => {
|
|
8
|
+
if (!promise) promise = import("@unocss/postcss/esm").then((r) => r.createPlugin(options));
|
|
9
|
+
return await (await promise)(root, result);
|
|
10
|
+
}]
|
|
11
|
+
};
|
|
13
12
|
}
|
|
14
13
|
unocss.postcss = true;
|
|
15
14
|
unocss.default = unocss;
|
|
15
|
+
var src_default = unocss;
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
//#endregion
|
|
18
|
+
export { src_default as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/postcss",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "66.5.
|
|
4
|
+
"version": "66.5.11",
|
|
5
5
|
"description": "PostCSS plugin for UnoCSS",
|
|
6
6
|
"author": "sibbng <sibbngheid@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"main": "dist/index.cjs",
|
|
37
37
|
"module": "dist/index.mjs",
|
|
38
|
-
"types": "dist/index.d.
|
|
38
|
+
"types": "dist/index.d.mts",
|
|
39
39
|
"typesVersions": {
|
|
40
40
|
"*": {
|
|
41
41
|
"*": [
|
|
@@ -57,13 +57,12 @@
|
|
|
57
57
|
"css-tree": "^3.1.0",
|
|
58
58
|
"postcss": "^8.5.6",
|
|
59
59
|
"tinyglobby": "^0.2.15",
|
|
60
|
-
"@unocss/core": "66.5.
|
|
61
|
-
"@unocss/
|
|
62
|
-
"@unocss/
|
|
60
|
+
"@unocss/core": "66.5.11",
|
|
61
|
+
"@unocss/rule-utils": "66.5.11",
|
|
62
|
+
"@unocss/config": "66.5.11"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
|
-
"build": "
|
|
66
|
-
"
|
|
67
|
-
"test:attw": "attw --pack --config-path ../../.attw-esm-only.json"
|
|
65
|
+
"build": "tsdown --config-loader unrun",
|
|
66
|
+
"dev": "tsdown --config-loader unrun --watch"
|
|
68
67
|
}
|
|
69
68
|
}
|
package/dist/esm.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Root, Result } from 'postcss';
|
|
2
|
-
import { UserConfig } from '@unocss/core';
|
|
3
|
-
|
|
4
|
-
interface UnoPostcssPluginOptions {
|
|
5
|
-
content?: (string | {
|
|
6
|
-
raw: string;
|
|
7
|
-
extension: string;
|
|
8
|
-
})[];
|
|
9
|
-
directiveMap?: {
|
|
10
|
-
apply?: string;
|
|
11
|
-
screen?: string;
|
|
12
|
-
theme?: string;
|
|
13
|
-
unocss?: string;
|
|
14
|
-
};
|
|
15
|
-
cwd?: string;
|
|
16
|
-
configOrPath?: string | UserConfig;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare function createPlugin(options: UnoPostcssPluginOptions): (root: Root, result: Result) => Promise<void>;
|
|
20
|
-
|
|
21
|
-
export { createPlugin };
|
package/dist/index.cjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function unocss(options = {}) {
|
|
4
|
-
let promise;
|
|
5
|
-
return {
|
|
6
|
-
postcssPlugin: options.directiveMap?.unocss || "unocss",
|
|
7
|
-
plugins: [
|
|
8
|
-
async (root, result) => {
|
|
9
|
-
if (!promise)
|
|
10
|
-
promise = import('@unocss/postcss/esm').then((r) => r.createPlugin(options));
|
|
11
|
-
return await (await promise)(root, result);
|
|
12
|
-
}
|
|
13
|
-
]
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
unocss.postcss = true;
|
|
17
|
-
unocss.default = unocss;
|
|
18
|
-
|
|
19
|
-
module.exports = unocss;
|
package/dist/index.d.cts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Root, Result } from 'postcss';
|
|
2
|
-
import { UserConfig } from '@unocss/core';
|
|
3
|
-
|
|
4
|
-
interface UnoPostcssPluginOptions {
|
|
5
|
-
content?: (string | {
|
|
6
|
-
raw: string;
|
|
7
|
-
extension: string;
|
|
8
|
-
})[];
|
|
9
|
-
directiveMap?: {
|
|
10
|
-
apply?: string;
|
|
11
|
-
screen?: string;
|
|
12
|
-
theme?: string;
|
|
13
|
-
unocss?: string;
|
|
14
|
-
};
|
|
15
|
-
cwd?: string;
|
|
16
|
-
configOrPath?: string | UserConfig;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare function unocss(options?: UnoPostcssPluginOptions): {
|
|
20
|
-
postcssPlugin: string;
|
|
21
|
-
plugins: ((root: Root, result: Result) => Promise<void>)[];
|
|
22
|
-
};
|
|
23
|
-
declare namespace unocss {
|
|
24
|
-
export var postcss: boolean;
|
|
25
|
-
var _a: typeof unocss;
|
|
26
|
-
export { _a as default };
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export = unocss;
|
|
30
|
-
export type { UnoPostcssPluginOptions };
|
package/dist/index.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Root, Result } from 'postcss';
|
|
2
|
-
import { UserConfig } from '@unocss/core';
|
|
3
|
-
|
|
4
|
-
interface UnoPostcssPluginOptions {
|
|
5
|
-
content?: (string | {
|
|
6
|
-
raw: string;
|
|
7
|
-
extension: string;
|
|
8
|
-
})[];
|
|
9
|
-
directiveMap?: {
|
|
10
|
-
apply?: string;
|
|
11
|
-
screen?: string;
|
|
12
|
-
theme?: string;
|
|
13
|
-
unocss?: string;
|
|
14
|
-
};
|
|
15
|
-
cwd?: string;
|
|
16
|
-
configOrPath?: string | UserConfig;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare function unocss(options?: UnoPostcssPluginOptions): {
|
|
20
|
-
postcssPlugin: string;
|
|
21
|
-
plugins: ((root: Root, result: Result) => Promise<void>)[];
|
|
22
|
-
};
|
|
23
|
-
declare namespace unocss {
|
|
24
|
-
export var postcss: boolean;
|
|
25
|
-
var _a: typeof unocss;
|
|
26
|
-
export { _a as default };
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export = unocss;
|
|
30
|
-
export type { UnoPostcssPluginOptions };
|