lightningcss-tailwindcss 2.0.3 → 2.1.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/README.md +6 -0
- package/README.zh.md +6 -0
- package/dist/index.d.ts +16 -17
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -103,3 +103,9 @@ That means:
|
|
|
103
103
|
- Better fit for tools that already consume Lightning CSS visitors
|
|
104
104
|
|
|
105
105
|
If you need to inspect the consuming project's installed Tailwind runtime or config file, use `postcss-tailwindcss`.
|
|
106
|
+
|
|
107
|
+
## Project links
|
|
108
|
+
|
|
109
|
+
- Documentation: https://repoctl.icebreaker.top
|
|
110
|
+
- Repository: https://github.com/sonofmagic/repoctl/tree/main/packages/lightningcss-tailwindcss
|
|
111
|
+
- Issues: https://github.com/sonofmagic/repoctl/issues
|
package/README.zh.md
CHANGED
|
@@ -99,3 +99,9 @@ interface TailwindAnalysis {
|
|
|
99
99
|
- 更适合已经基于 Lightning CSS visitor 的工具
|
|
100
100
|
|
|
101
101
|
如果你还需要感知使用方项目里真实安装的 Tailwind 版本和配置文件位置,应该选 `postcss-tailwindcss`。
|
|
102
|
+
|
|
103
|
+
## 项目链接
|
|
104
|
+
|
|
105
|
+
- 文档:https://repoctl.icebreaker.top
|
|
106
|
+
- 仓库:https://github.com/sonofmagic/repoctl/tree/main/packages/lightningcss-tailwindcss
|
|
107
|
+
- 问题反馈:https://github.com/sonofmagic/repoctl/issues
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ImportRule, Location2, Selector, StyleSheet, UnknownAtRule } from "lightningcss";
|
|
2
2
|
//#region src/index.d.ts
|
|
3
|
-
type TailwindVersion = 3 | 4 | 'unknown';
|
|
4
|
-
interface LightningWarning {
|
|
3
|
+
export type TailwindVersion = 3 | 4 | 'unknown';
|
|
4
|
+
export interface LightningWarning {
|
|
5
5
|
message: string;
|
|
6
6
|
type: string;
|
|
7
7
|
loc?: {
|
|
@@ -10,22 +10,22 @@ interface LightningWarning {
|
|
|
10
10
|
column: number;
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
interface ParseTailwindCssResult {
|
|
13
|
+
export interface ParseTailwindCssResult {
|
|
14
14
|
stylesheet: StyleSheet;
|
|
15
15
|
warnings: LightningWarning[];
|
|
16
16
|
}
|
|
17
|
-
interface UtilityCandidate {
|
|
17
|
+
export interface UtilityCandidate {
|
|
18
18
|
candidate: string;
|
|
19
19
|
ruleName: string;
|
|
20
20
|
loc: UnknownAtRule['loc'];
|
|
21
21
|
}
|
|
22
|
-
interface ThemeCall {
|
|
22
|
+
export interface ThemeCall {
|
|
23
23
|
raw: string;
|
|
24
24
|
path: string;
|
|
25
25
|
opacity: string | null;
|
|
26
26
|
functionName: string;
|
|
27
27
|
}
|
|
28
|
-
interface TailwindImportDirective {
|
|
28
|
+
export interface TailwindImportDirective {
|
|
29
29
|
importTarget: string;
|
|
30
30
|
functions: Array<{
|
|
31
31
|
name: string;
|
|
@@ -35,12 +35,12 @@ interface TailwindImportDirective {
|
|
|
35
35
|
mediaQuery: string | null;
|
|
36
36
|
loc: ImportRule['loc'];
|
|
37
37
|
}
|
|
38
|
-
interface UtilitySelector {
|
|
38
|
+
export interface UtilitySelector {
|
|
39
39
|
className: string;
|
|
40
40
|
selector: Selector;
|
|
41
41
|
loc: Location2;
|
|
42
42
|
}
|
|
43
|
-
interface TailwindAnalysis {
|
|
43
|
+
export interface TailwindAnalysis {
|
|
44
44
|
version: TailwindVersion;
|
|
45
45
|
applyCandidates: UtilityCandidate[];
|
|
46
46
|
themeCalls: ThemeCall[];
|
|
@@ -48,12 +48,11 @@ interface TailwindAnalysis {
|
|
|
48
48
|
utilitySelectors: UtilitySelector[];
|
|
49
49
|
warnings: LightningWarning[];
|
|
50
50
|
}
|
|
51
|
-
declare function parseTailwindCss(input: string): ParseTailwindCssResult;
|
|
52
|
-
declare function detectTailwindVersion(input: string): TailwindVersion;
|
|
53
|
-
declare function collectApplyCandidates(input: string): UtilityCandidate[];
|
|
54
|
-
declare function collectThemeCalls(input: string): ThemeCall[];
|
|
55
|
-
declare function collectImportDirectives(input: string): TailwindImportDirective[];
|
|
56
|
-
declare function collectUtilitySelectors(input: string): UtilitySelector[];
|
|
57
|
-
declare function analyzeTailwindCss(input: string): TailwindAnalysis;
|
|
58
|
-
//#endregion
|
|
59
|
-
export { LightningWarning, ParseTailwindCssResult, TailwindAnalysis, TailwindImportDirective, TailwindVersion, ThemeCall, UtilityCandidate, UtilitySelector, analyzeTailwindCss, collectApplyCandidates, collectImportDirectives, collectThemeCalls, collectUtilitySelectors, detectTailwindVersion, parseTailwindCss };
|
|
51
|
+
export declare function parseTailwindCss(input: string): ParseTailwindCssResult;
|
|
52
|
+
export declare function detectTailwindVersion(input: string): TailwindVersion;
|
|
53
|
+
export declare function collectApplyCandidates(input: string): UtilityCandidate[];
|
|
54
|
+
export declare function collectThemeCalls(input: string): ThemeCall[];
|
|
55
|
+
export declare function collectImportDirectives(input: string): TailwindImportDirective[];
|
|
56
|
+
export declare function collectUtilitySelectors(input: string): UtilitySelector[];
|
|
57
|
+
export declare function analyzeTailwindCss(input: string): TailwindAnalysis;
|
|
58
|
+
//#endregion
|
package/package.json
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lightningcss-tailwindcss",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"description": "Lightning CSS AST utilities for analyzing Tailwind CSS syntax",
|
|
6
|
-
"author": "ice breaker <
|
|
6
|
+
"author": "ice breaker <hi@sonofmagic.top>",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"homepage": "https://repoctl.icebreaker.top",
|
|
8
9
|
"repository": {
|
|
9
10
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/sonofmagic/
|
|
11
|
+
"url": "git+https://github.com/sonofmagic/repoctl.git",
|
|
11
12
|
"directory": "packages/lightningcss-tailwindcss"
|
|
12
13
|
},
|
|
13
14
|
"bugs": {
|
|
14
|
-
"url": "https://github.com/sonofmagic/
|
|
15
|
+
"url": "https://github.com/sonofmagic/repoctl/issues"
|
|
15
16
|
},
|
|
16
17
|
"keywords": [
|
|
17
|
-
"
|
|
18
|
+
"repoctl",
|
|
18
19
|
"icebreakers",
|
|
19
20
|
"lightningcss",
|
|
20
21
|
"tailwindcss"
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
"dist"
|
|
37
38
|
],
|
|
38
39
|
"engines": {
|
|
39
|
-
"node": ">=22.
|
|
40
|
+
"node": ">=22.13.0"
|
|
40
41
|
},
|
|
41
42
|
"dependencies": {
|
|
42
43
|
"lightningcss": "^1.33.0"
|