tailwindcss-patch 9.4.4 → 9.5.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/{cli-srv0kRlt.js → cli-CGyUnvFc.js} +3 -2
- package/dist/{cli-CLvyx3xl.mjs → cli-DRfALTSo.mjs} +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.mjs +2 -2
- package/dist/commands/cli-runtime.d.mts +1 -1
- package/dist/commands/cli-runtime.d.ts +1 -1
- package/dist/commands/cli-runtime.js +2 -2
- package/dist/commands/cli-runtime.mjs +2 -2
- package/dist/{dist-Dn7cMVhi.js → dist-DlC5vuI2.js} +1 -1
- package/dist/index.d.mts +7 -149
- package/dist/index.d.ts +8 -150
- package/dist/index.js +294 -521
- package/dist/index.mjs +6 -471
- package/dist/{validate-oAkURzUC.d.mts → validate-B5-08lrU.d.ts} +8 -252
- package/dist/{validate-BuqRodYI.d.ts → validate-CgrG4aAY.d.mts} +8 -252
- package/dist/{validate-CUNJFfHh.mjs → validate-Q00Ccqht.mjs} +5 -1402
- package/dist/{validate-RpdgpjgT.js → validate-XiYmTZcd.js} +79 -1705
- package/package.json +4 -6
- package/src/api/tailwindcss-patcher.ts +3 -2
- package/src/extraction/candidate-extractor.ts +17 -701
- package/src/extraction/split-candidate-tokens.ts +5 -101
- package/src/options/types.ts +1 -2
- package/src/style-candidates.ts +5 -35
- package/src/style-generator.ts +11 -80
- package/src/types.ts +21 -95
- package/src/v3/index.ts +2 -2
- package/src/v4/index.ts +104 -28
- package/src/v3/style-generator.ts +0 -384
- package/src/v4/bare-arbitrary-values.ts +0 -545
- package/src/v4/candidates.ts +0 -316
- package/src/v4/engine.ts +0 -112
- package/src/v4/node-adapter.ts +0 -207
- package/src/v4/source-scan.ts +0 -432
- package/src/v4/source.ts +0 -235
- package/src/v4/style-generator.ts +0 -44
- package/src/v4/types.ts +0 -103
package/src/v4/types.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import type { TailwindStyleSource } from '../style-candidates'
|
|
2
|
-
|
|
3
|
-
export interface TailwindV4SourceOptions {
|
|
4
|
-
projectRoot?: string
|
|
5
|
-
cwd?: string
|
|
6
|
-
base?: string
|
|
7
|
-
baseFallbacks?: string[]
|
|
8
|
-
css?: string
|
|
9
|
-
cssSources?: TailwindV4CssSource[]
|
|
10
|
-
cssEntries?: string[]
|
|
11
|
-
packageName?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface TailwindV4CssSource {
|
|
15
|
-
css: string
|
|
16
|
-
base?: string
|
|
17
|
-
file?: string
|
|
18
|
-
dependencies?: string[]
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface TailwindV4ResolvedSource {
|
|
22
|
-
projectRoot: string
|
|
23
|
-
base: string
|
|
24
|
-
baseFallbacks: string[]
|
|
25
|
-
css: string
|
|
26
|
-
dependencies: string[]
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface TailwindV4CandidateSource {
|
|
30
|
-
content: string
|
|
31
|
-
extension?: string
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface TailwindV4StyleSource extends TailwindStyleSource {}
|
|
35
|
-
|
|
36
|
-
export interface TailwindV4GenerateOptions {
|
|
37
|
-
candidates?: Iterable<string>
|
|
38
|
-
sources?: TailwindV4CandidateSource[]
|
|
39
|
-
/**
|
|
40
|
-
* Enables UnoCSS-style bare arbitrary values such as `p-10%` and `p-2.5px`.
|
|
41
|
-
*/
|
|
42
|
-
bareArbitraryValues?: boolean | {
|
|
43
|
-
units?: string[]
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* 扫描文件系统 source entries 中的候选类名。
|
|
47
|
-
*
|
|
48
|
-
* - `true`:使用 Tailwind v4 编译入口解析出的 `@source` 列表。
|
|
49
|
-
* - `TailwindV4SourcePattern[]`:使用调用方显式传入的 source 列表。
|
|
50
|
-
*/
|
|
51
|
-
scanSources?: boolean | TailwindV4SourcePattern[]
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export type TailwindV4CompiledSourceRoot = null | 'none' | {
|
|
55
|
-
base: string
|
|
56
|
-
pattern: string
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface TailwindV4SourcePattern {
|
|
60
|
-
base: string
|
|
61
|
-
pattern: string
|
|
62
|
-
negated: boolean
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface TailwindV4GenerateResult {
|
|
66
|
-
css: string
|
|
67
|
-
classSet: Set<string>
|
|
68
|
-
rawCandidates: Set<string>
|
|
69
|
-
dependencies: string[]
|
|
70
|
-
sources: TailwindV4SourcePattern[]
|
|
71
|
-
root: TailwindV4CompiledSourceRoot
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface TailwindV4StyleGenerateOptions extends TailwindV4SourceOptions {
|
|
75
|
-
source?: TailwindV4ResolvedSource
|
|
76
|
-
candidates?: Iterable<string>
|
|
77
|
-
sources?: TailwindV4StyleSource[]
|
|
78
|
-
/**
|
|
79
|
-
* Enables UnoCSS-style bare arbitrary values such as `p-10%` and `p-2.5px`.
|
|
80
|
-
*/
|
|
81
|
-
bareArbitraryValues?: TailwindV4GenerateOptions['bareArbitraryValues']
|
|
82
|
-
/**
|
|
83
|
-
* Scans the compiled Tailwind CSS v4 source entries in addition to in-memory sources.
|
|
84
|
-
*/
|
|
85
|
-
scanSources?: TailwindV4GenerateOptions['scanSources']
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export interface TailwindV4StyleGenerateResult extends TailwindV4GenerateResult {
|
|
89
|
-
tokens: Set<string>
|
|
90
|
-
source: TailwindV4ResolvedSource
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export interface TailwindV4DesignSystem {
|
|
94
|
-
parseCandidate: (candidate: string) => unknown[]
|
|
95
|
-
candidatesToCss: (candidates: string[]) => Array<string | null | undefined>
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export interface TailwindV4Engine {
|
|
99
|
-
source: TailwindV4ResolvedSource
|
|
100
|
-
loadDesignSystem: () => Promise<TailwindV4DesignSystem>
|
|
101
|
-
validateCandidates: (candidates: Iterable<string>) => Promise<Set<string>>
|
|
102
|
-
generate: (options?: TailwindV4GenerateOptions) => Promise<TailwindV4GenerateResult>
|
|
103
|
-
}
|