@breadstone-infrastructure/style-dictionary 0.0.206 → 0.0.209
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/CHANGELOG.md +182 -0
- package/formats/tailwind/v4/buildTailwindV4Config.d.ts +83 -0
- package/formats/tailwind/v4/buildTailwindV4Config.d.ts.map +1 -0
- package/formats/tailwind/v4/buildTailwindV4Config.js +338 -0
- package/formats/tailwind/v4/buildTailwindV4Config.js.map +1 -0
- package/formats/tailwind/v4/index.d.ts +2 -0
- package/formats/tailwind/v4/index.d.ts.map +1 -1
- package/formats/tailwind/v4/index.js +2 -0
- package/formats/tailwind/v4/index.js.map +1 -1
- package/formats/tailwind/v4/tailwindV4Format.d.ts +64 -0
- package/formats/tailwind/v4/tailwindV4Format.d.ts.map +1 -1
- package/formats/tailwind/v4/tailwindV4Format.js +82 -1
- package/formats/tailwind/v4/tailwindV4Format.js.map +1 -1
- package/package.json +3 -3
- package/formats/tailwind/DesignTokenType.d.ts +0 -10
- package/formats/tailwind/DesignTokenType.d.ts.map +0 -1
- package/formats/tailwind/DesignTokenType.js +0 -3
- package/formats/tailwind/DesignTokenType.js.map +0 -1
- package/formats/tailwind/TailwindPropertyMapping.d.ts +0 -61
- package/formats/tailwind/TailwindPropertyMapping.d.ts.map +0 -1
- package/formats/tailwind/TailwindPropertyMapping.js +0 -421
- package/formats/tailwind/TailwindPropertyMapping.js.map +0 -1
- package/formats/tailwind/buildTailwindConfig.d.ts +0 -23
- package/formats/tailwind/buildTailwindConfig.d.ts.map +0 -1
- package/formats/tailwind/buildTailwindConfig.js +0 -280
- package/formats/tailwind/buildTailwindConfig.js.map +0 -1
- package/formats/tailwind/index.d.ts +0 -3
- package/formats/tailwind/index.d.ts.map +0 -1
- package/formats/tailwind/index.js +0 -19
- package/formats/tailwind/index.js.map +0 -1
- package/formats/tailwind/tailwindFormat.d.ts +0 -13
- package/formats/tailwind/tailwindFormat.d.ts.map +0 -1
- package/formats/tailwind/tailwindFormat.js +0 -57
- package/formats/tailwind/tailwindFormat.js.map +0 -1
- package/formats/tailwind/tailwindFormat2.d.ts +0 -13
- package/formats/tailwind/tailwindFormat2.d.ts.map +0 -1
- package/formats/tailwind/tailwindFormat2.js +0 -65
- package/formats/tailwind/tailwindFormat2.js.map +0 -1
- package/formats/tailwind/v3/TailwindPropertyMapping.d.ts +0 -61
- package/formats/tailwind/v3/TailwindPropertyMapping.d.ts.map +0 -1
- package/formats/tailwind/v3/TailwindPropertyMapping.js +0 -421
- package/formats/tailwind/v3/TailwindPropertyMapping.js.map +0 -1
- package/formats/tailwind/v3/buildTailwindConfig.d.ts +0 -23
- package/formats/tailwind/v3/buildTailwindConfig.d.ts.map +0 -1
- package/formats/tailwind/v3/buildTailwindConfig.js +0 -281
- package/formats/tailwind/v3/buildTailwindConfig.js.map +0 -1
- package/formats/tailwind/v3/tailwindFormat.d.ts +0 -13
- package/formats/tailwind/v3/tailwindFormat.d.ts.map +0 -1
- package/formats/tailwind/v3/tailwindFormat.js +0 -57
- package/formats/tailwind/v3/tailwindFormat.js.map +0 -1
- package/formats/tailwind/v3/tailwindFormat2.d.ts +0 -13
- package/formats/tailwind/v3/tailwindFormat2.d.ts.map +0 -1
- package/formats/tailwind/v3/tailwindFormat2.js +0 -65
- package/formats/tailwind/v3/tailwindFormat2.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,185 @@
|
|
|
1
|
+
## 0.0.208 (2025-12-13)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- update component properties and descriptions for better clarity and functionality ([5d4069bff7](https://github.com/RueDeRennes/mosaik/commit/5d4069bff7))
|
|
6
|
+
|
|
7
|
+
## 0.0.207 (2025-12-13)
|
|
8
|
+
|
|
9
|
+
### 🚀 Features
|
|
10
|
+
|
|
11
|
+
- **tailwind:** implement Tailwind v4 config generation and update package scripts ([db31430aaf](https://github.com/RueDeRennes/mosaik/commit/db31430aaf))
|
|
12
|
+
|
|
13
|
+
### 🩹 Fixes
|
|
14
|
+
|
|
15
|
+
- **stepper:** update properties and styles for Stepper themes and components ([5f66855a75](https://github.com/RueDeRennes/mosaik/commit/5f66855a75))
|
|
16
|
+
|
|
17
|
+
## 0.0.206 (2025-12-09)
|
|
18
|
+
|
|
19
|
+
### 🚀 Features
|
|
20
|
+
|
|
21
|
+
- **tailwind:** add material and memphis theme presets for Tailwind CSS ([79cfb43ae2](https://github.com/RueDeRennes/mosaik/commit/79cfb43ae2))
|
|
22
|
+
|
|
23
|
+
## 0.0.205 (2025-12-07)
|
|
24
|
+
|
|
25
|
+
### 🩹 Fixes
|
|
26
|
+
|
|
27
|
+
- **buttons): update stack-gap variable usage in FloatingActionButton, RepeatButton, SplitButton, ToggleButton themes fix(card): update stack-gap variable usage in CardActions theme fix(expander): update stack-gap variable usage in Expander theme fix(comment): update stack-gap variable usage in Comment theme fix(dialog): update stack-gap variable usage in DialogActions theme fix(segment): update stack-gap variable usage in SegmentItem theme fix(tab-strip): update stack-gap variable usage in TabStripItem theme fix(states): update stack-gap variable usage in Busy, Empty, Error, and Success state themes chore(package:** bump version to 0.0.204 in package.json ([878a490c1e](https://github.com/RueDeRennes/mosaik/commit/878a490c1e))
|
|
28
|
+
|
|
29
|
+
## 0.0.204 (2025-12-07)
|
|
30
|
+
|
|
31
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
32
|
+
|
|
33
|
+
## 0.0.203 (2025-12-06)
|
|
34
|
+
|
|
35
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
36
|
+
|
|
37
|
+
## 0.0.202 (2025-12-06)
|
|
38
|
+
|
|
39
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
40
|
+
|
|
41
|
+
## 0.0.201 (2025-12-05)
|
|
42
|
+
|
|
43
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
44
|
+
|
|
45
|
+
## 0.0.200 (2025-12-05)
|
|
46
|
+
|
|
47
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
48
|
+
|
|
49
|
+
## 0.0.199 (2025-12-05)
|
|
50
|
+
|
|
51
|
+
### 🩹 Fixes
|
|
52
|
+
|
|
53
|
+
- **package:** add missing newline at end of file ([e7bbe4e7c1](https://github.com/RueDeRennes/mosaik/commit/e7bbe4e7c1))
|
|
54
|
+
|
|
55
|
+
## 0.0.198 (2025-12-05)
|
|
56
|
+
|
|
57
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
58
|
+
|
|
59
|
+
## 0.0.197 (2025-12-05)
|
|
60
|
+
|
|
61
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
62
|
+
|
|
63
|
+
## 0.0.196 (2025-12-05)
|
|
64
|
+
|
|
65
|
+
### 🚀 Features
|
|
66
|
+
|
|
67
|
+
- **event-hub:** add Event Hub pattern implementation for Angular 2025 ([88dc4f7404](https://github.com/RueDeRennes/mosaik/commit/88dc4f7404))
|
|
68
|
+
|
|
69
|
+
### 🩹 Fixes
|
|
70
|
+
|
|
71
|
+
- **keywords:** add Event Bus and Message Bus to event hub documentation ([69cafcf76f](https://github.com/RueDeRennes/mosaik/commit/69cafcf76f))
|
|
72
|
+
|
|
73
|
+
## 0.0.195 (2025-12-03)
|
|
74
|
+
|
|
75
|
+
### 🩹 Fixes
|
|
76
|
+
|
|
77
|
+
- **package:** add missing newline at end of file in package.json ([a9bf15349b](https://github.com/RueDeRennes/mosaik/commit/a9bf15349b))
|
|
78
|
+
|
|
79
|
+
## 0.0.194 (2025-12-03)
|
|
80
|
+
|
|
81
|
+
### 🩹 Fixes
|
|
82
|
+
|
|
83
|
+
- **Cdk:** export FormFieldStatusDirective alongside FORM_STATUS_HOST from FormStatusDirective ([c8521cd4ff](https://github.com/RueDeRennes/mosaik/commit/c8521cd4ff))
|
|
84
|
+
|
|
85
|
+
## 0.0.193 (2025-12-03)
|
|
86
|
+
|
|
87
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
88
|
+
|
|
89
|
+
## 0.0.192 (2025-12-03)
|
|
90
|
+
|
|
91
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
92
|
+
|
|
93
|
+
## 0.0.191 (2025-12-03)
|
|
94
|
+
|
|
95
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
96
|
+
|
|
97
|
+
## 0.0.190 (2025-12-02)
|
|
98
|
+
|
|
99
|
+
### 🩹 Fixes
|
|
100
|
+
|
|
101
|
+
- **choice-group:** add flex property to root part for improved layout consistency ([8bd80ed40b](https://github.com/RueDeRennes/mosaik/commit/8bd80ed40b))
|
|
102
|
+
|
|
103
|
+
## 0.0.189 (2025-12-02)
|
|
104
|
+
|
|
105
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
106
|
+
|
|
107
|
+
## 0.0.188 (2025-12-02)
|
|
108
|
+
|
|
109
|
+
### 🚀 Features
|
|
110
|
+
|
|
111
|
+
- **directives:** update FormFieldDirective to improve error handling and usage documentation ([7c07bb43fd](https://github.com/RueDeRennes/mosaik/commit/7c07bb43fd))
|
|
112
|
+
|
|
113
|
+
## 0.0.187 (2025-12-02)
|
|
114
|
+
|
|
115
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
116
|
+
|
|
117
|
+
## 0.0.186 (2025-12-02)
|
|
118
|
+
|
|
119
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
120
|
+
|
|
121
|
+
## 0.0.185 (2025-12-02)
|
|
122
|
+
|
|
123
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
124
|
+
|
|
125
|
+
## 0.0.184 (2025-12-02)
|
|
126
|
+
|
|
127
|
+
### 🚀 Features
|
|
128
|
+
|
|
129
|
+
- **eslint:** enhance ESLint configuration and add .eslintignore file ([4b3deb5566](https://github.com/RueDeRennes/mosaik/commit/4b3deb5566))
|
|
130
|
+
|
|
131
|
+
## 0.0.183 (2025-11-30)
|
|
132
|
+
|
|
133
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
134
|
+
|
|
135
|
+
## 0.0.182 (2025-11-30)
|
|
136
|
+
|
|
137
|
+
### 🚀 Features
|
|
138
|
+
|
|
139
|
+
- **themes:** refactor theme generator strategies and update build process ([55859a854f](https://github.com/RueDeRennes/mosaik/commit/55859a854f))
|
|
140
|
+
|
|
141
|
+
## 0.0.181 (2025-11-30)
|
|
142
|
+
|
|
143
|
+
This was a version bump only for style-dictionary-plugins to align it with other projects, there were no code changes.
|
|
144
|
+
|
|
145
|
+
## 0.0.180 (2025-11-30)
|
|
146
|
+
|
|
147
|
+
### 🚀 Features
|
|
148
|
+
|
|
149
|
+
- **tailwind:** refactor exports to use module.exports and add v3 directory structure ([7e66c07bf2](https://github.com/RueDeRennes/mosaik/commit/7e66c07bf2))
|
|
150
|
+
|
|
151
|
+
## 0.0.179 (2025-11-29)
|
|
152
|
+
|
|
153
|
+
### 🚀 Features
|
|
154
|
+
|
|
155
|
+
- **tailwind): add Material and Memphis presets for Tailwind CSS themes fix(tokens): correct typo in headline2 key in joy and memphis theme JSON files chore(tsconfig:** update TypeScript configuration to include Tailwind files ([0ae3d28053](https://github.com/RueDeRennes/mosaik/commit/0ae3d28053))
|
|
156
|
+
|
|
157
|
+
## 0.0.178 (2025-11-29)
|
|
158
|
+
|
|
159
|
+
### 🩹 Fixes
|
|
160
|
+
|
|
161
|
+
- **package:** add missing newline at end of file ([0fc5a107d6](https://github.com/RueDeRennes/mosaik/commit/0fc5a107d6))
|
|
162
|
+
|
|
163
|
+
## 0.0.177 (2025-11-29)
|
|
164
|
+
|
|
165
|
+
### 🚀 Features
|
|
166
|
+
|
|
167
|
+
- **theme:** add new design tokens and update existing token categories for consistency ([331e4a684a](https://github.com/RueDeRennes/mosaik/commit/331e4a684a))
|
|
168
|
+
|
|
169
|
+
### 🩹 Fixes
|
|
170
|
+
|
|
171
|
+
- **release:** update release script version to 0.0.177 ([1895016b0a](https://github.com/RueDeRennes/mosaik/commit/1895016b0a))
|
|
172
|
+
|
|
173
|
+
## 0.0.176 (2025-11-29)
|
|
174
|
+
|
|
175
|
+
### 🚀 Features
|
|
176
|
+
|
|
177
|
+
- add oklch color transform and update dependencies in style-dictionary plugins ([40063afe0a](https://github.com/RueDeRennes/mosaik/commit/40063afe0a))
|
|
178
|
+
|
|
179
|
+
### 🩹 Fixes
|
|
180
|
+
|
|
181
|
+
- add missing newline at end of JSON files ([60b2109dd0](https://github.com/RueDeRennes/mosaik/commit/60b2109dd0))
|
|
182
|
+
|
|
1
183
|
## 0.0.175 (2025-11-28)
|
|
2
184
|
|
|
3
185
|
### 🩹 Fixes
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { TransformedToken } from 'style-dictionary/types';
|
|
2
|
+
/**
|
|
3
|
+
* Tailwind v4 theme configuration structure.
|
|
4
|
+
* In v4, the theme is much flatter and uses direct CSS variable references.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type ITailwindV4Theme = Readonly<Record<string, string | Record<string, string | Record<string, string>>>>;
|
|
9
|
+
/**
|
|
10
|
+
* Tailwind v4 configuration structure.
|
|
11
|
+
* Note: v4 uses a flatter structure compared to v3.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export interface ITailwindV4Config {
|
|
16
|
+
readonly theme?: ITailwindV4Theme;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Options for building the Tailwind v4 JavaScript config.
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export interface IBuildTailwindV4ConfigOptions {
|
|
24
|
+
/**
|
|
25
|
+
* Token name substrings to ignore.
|
|
26
|
+
*/
|
|
27
|
+
readonly ignoredTokenNameSubstrings?: ReadonlyArray<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Whether to wrap theme values in extend.
|
|
30
|
+
* In v4, you can still use extend to add to defaults rather than replace.
|
|
31
|
+
*
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
readonly useExtend?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Builds a Tailwind v4 config object from Style-Dictionary tokens.
|
|
38
|
+
*
|
|
39
|
+
* In Tailwind v4, the configuration structure is flatter and works
|
|
40
|
+
* in conjunction with the CSS-first approach. This generates a config
|
|
41
|
+
* that can be used with the @config directive.
|
|
42
|
+
*
|
|
43
|
+
* @param allTokens All transformed tokens from Style-Dictionary.
|
|
44
|
+
* @param options Build options.
|
|
45
|
+
* @returns A Tailwind v4 config object.
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
export declare function buildTailwindV4Config(allTokens: ReadonlyArray<TransformedToken>, options?: IBuildTailwindV4ConfigOptions): ITailwindV4Config;
|
|
49
|
+
/**
|
|
50
|
+
* Formats a Tailwind v4 config object as a JavaScript module string.
|
|
51
|
+
*
|
|
52
|
+
* @param config The config object.
|
|
53
|
+
* @returns Formatted JavaScript string.
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export declare function formatTailwindV4ConfigAsJs(config: ITailwindV4Config): string;
|
|
57
|
+
/**
|
|
58
|
+
* Formats a Tailwind v4 config object as a TypeScript module string.
|
|
59
|
+
*
|
|
60
|
+
* @param config The config object.
|
|
61
|
+
* @returns Formatted TypeScript string.
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
export declare function formatTailwindV4ConfigAsTs(config: ITailwindV4Config): string;
|
|
65
|
+
/**
|
|
66
|
+
* Builds and formats a Tailwind v4 JavaScript config file from tokens.
|
|
67
|
+
*
|
|
68
|
+
* @param allTokens All transformed tokens from Style-Dictionary.
|
|
69
|
+
* @param options Build options.
|
|
70
|
+
* @returns Formatted JavaScript config file content.
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
export declare function buildTailwindV4ConfigJs(allTokens: ReadonlyArray<TransformedToken>, options?: IBuildTailwindV4ConfigOptions): string;
|
|
74
|
+
/**
|
|
75
|
+
* Builds and formats a Tailwind v4 TypeScript config file from tokens.
|
|
76
|
+
*
|
|
77
|
+
* @param allTokens All transformed tokens from Style-Dictionary.
|
|
78
|
+
* @param options Build options.
|
|
79
|
+
* @returns Formatted TypeScript config file content.
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
export declare function buildTailwindV4ConfigTs(allTokens: ReadonlyArray<TransformedToken>, options?: IBuildTailwindV4ConfigOptions): string;
|
|
83
|
+
//# sourceMappingURL=buildTailwindV4Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildTailwindV4Config.d.ts","sourceRoot":"","sources":["../../../../src/formats/tailwind/v4/buildTailwindV4Config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAgB/D;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAElH;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAED;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAE1C;;OAEG;IACH,QAAQ,CAAC,0BAA0B,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAE5D;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAChC;AAoLD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACjC,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,EAC1C,OAAO,GAAE,6BAAkC,GAC5C,iBAAiB,CAoHnB;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAQ5E;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAW5E;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACnC,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,EAC1C,OAAO,GAAE,6BAAkC,GAC5C,MAAM,CAGR;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACnC,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,EAC1C,OAAO,GAAE,6BAAkC,GAC5C,MAAM,CAGR"}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// #region Imports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.buildTailwindV4Config = buildTailwindV4Config;
|
|
5
|
+
exports.formatTailwindV4ConfigAsJs = formatTailwindV4ConfigAsJs;
|
|
6
|
+
exports.formatTailwindV4ConfigAsTs = formatTailwindV4ConfigAsTs;
|
|
7
|
+
exports.buildTailwindV4ConfigJs = buildTailwindV4ConfigJs;
|
|
8
|
+
exports.buildTailwindV4ConfigTs = buildTailwindV4ConfigTs;
|
|
9
|
+
const utilities_1 = require("@breadstone-infrastructure/utilities");
|
|
10
|
+
const getType_js_1 = require("../../../utilities/getType.js");
|
|
11
|
+
const getValue_js_1 = require("../../../utilities/getValue.js");
|
|
12
|
+
const TailwindV4PropertyMapping_js_1 = require("./TailwindV4PropertyMapping.js");
|
|
13
|
+
// #endregion
|
|
14
|
+
// #region Fields
|
|
15
|
+
/**
|
|
16
|
+
* Auto-generated file header comment for JS files.
|
|
17
|
+
*
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
const JS_FILE_HEADER = `/* ------------------------------------------------------------------------------
|
|
21
|
+
* <auto-generated>
|
|
22
|
+
* This code was generated by a tool.
|
|
23
|
+
* Changes to this file may cause incorrect behavior and will be lost if
|
|
24
|
+
* the code is regenerated.
|
|
25
|
+
* </auto-generated>
|
|
26
|
+
* ------------------------------------------------------------------------------ */`;
|
|
27
|
+
/**
|
|
28
|
+
* Auto-generated file header comment for TS files.
|
|
29
|
+
*
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
const TS_FILE_HEADER = `/* ------------------------------------------------------------------------------
|
|
33
|
+
* <auto-generated>
|
|
34
|
+
* This code was generated by a tool.
|
|
35
|
+
* Changes to this file may cause incorrect behavior and will be lost if
|
|
36
|
+
* the code is regenerated.
|
|
37
|
+
* </auto-generated>
|
|
38
|
+
* ------------------------------------------------------------------------------ */`;
|
|
39
|
+
// #endregion
|
|
40
|
+
// #region Methods
|
|
41
|
+
/**
|
|
42
|
+
* Normalizes a raw token value into a JS value suitable for a Tailwind config.
|
|
43
|
+
*
|
|
44
|
+
* @param value Raw token value.
|
|
45
|
+
* @returns Normalized value (string, number, or array) that can be used in Tailwind config.
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
function normalizeValue(value) {
|
|
49
|
+
if (Array.isArray(value)) {
|
|
50
|
+
return value.map((v) => String(v));
|
|
51
|
+
}
|
|
52
|
+
if (typeof value === 'string' || typeof value === 'number') {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return String(value);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Deeply sets a value on an object via a path array. Similar to lodash.set.
|
|
59
|
+
*
|
|
60
|
+
* @param obj Target object.
|
|
61
|
+
* @param path Array of keys.
|
|
62
|
+
* @param value Value to set.
|
|
63
|
+
* @private
|
|
64
|
+
*/
|
|
65
|
+
function deepSet(obj, path, value) {
|
|
66
|
+
let current = obj;
|
|
67
|
+
for (let i = 0; i < path.length; i++) {
|
|
68
|
+
const key = path[i];
|
|
69
|
+
if (i === path.length - 1) {
|
|
70
|
+
current[key] = value;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
if (!current[key] || typeof current[key] !== 'object') {
|
|
74
|
+
current[key] = {};
|
|
75
|
+
}
|
|
76
|
+
current = current[key];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Validates that tokens use supported logical types and logs warnings
|
|
82
|
+
* for those that cannot be mapped to Tailwind v4.
|
|
83
|
+
*
|
|
84
|
+
* @param tokens All transformed tokens.
|
|
85
|
+
* @param ignoredNames Optional substrings; tokens whose name contains any of them are ignored.
|
|
86
|
+
* @private
|
|
87
|
+
*/
|
|
88
|
+
function validateTokenTypes(tokens, ignoredNames = []) {
|
|
89
|
+
const supported = new Set(TailwindV4PropertyMapping_js_1.SUPPORTED_TOKEN_TYPES);
|
|
90
|
+
tokens
|
|
91
|
+
.filter((token) => {
|
|
92
|
+
const lower = token.name.toLowerCase();
|
|
93
|
+
return !ignoredNames.some((substr) => lower.includes(substr.toLowerCase()));
|
|
94
|
+
})
|
|
95
|
+
.forEach((token) => {
|
|
96
|
+
// If token has a valid category mapping, skip type validation
|
|
97
|
+
const rawCategory = token.category;
|
|
98
|
+
if (rawCategory && rawCategory in TailwindV4PropertyMapping_js_1.CATEGORY_TO_V4_MAPPING) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const type = (0, getType_js_1.getType)(token);
|
|
102
|
+
if (!type) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (!supported.has(type)) {
|
|
106
|
+
console.warn(`${(0, utilities_1.symbol)('warning')} ${(0, utilities_1.yellow)(`Type "${type}" is not supported in Tailwind v4 config builder for token "${token.path.join('.')}:${token.name}".`)}`);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Resolves the mapping for a token in Tailwind v4 format.
|
|
112
|
+
*
|
|
113
|
+
* @param token The token to resolve mapping for.
|
|
114
|
+
* @returns An IV4KeyMapping when resolvable, otherwise undefined.
|
|
115
|
+
* @private
|
|
116
|
+
*/
|
|
117
|
+
function resolveMappingForToken(token) {
|
|
118
|
+
const rawCategory = token.category;
|
|
119
|
+
// 1. Category-based mapping (if present)
|
|
120
|
+
if (rawCategory) {
|
|
121
|
+
if (rawCategory in TailwindV4PropertyMapping_js_1.CATEGORY_TO_V4_MAPPING) {
|
|
122
|
+
return TailwindV4PropertyMapping_js_1.CATEGORY_TO_V4_MAPPING[rawCategory];
|
|
123
|
+
}
|
|
124
|
+
console.warn(`${(0, utilities_1.symbol)('warning')} ${(0, utilities_1.yellow)(`Token "${token.name}" specifies category "${rawCategory}", which is not mapped. Falling back to token type.`)}`);
|
|
125
|
+
}
|
|
126
|
+
// 2. Type-based mapping
|
|
127
|
+
const type = (token.type ?? token.$type ?? token.original.type ?? token.original.$type);
|
|
128
|
+
if (type) {
|
|
129
|
+
const byType = TailwindV4PropertyMapping_js_1.TOKEN_TYPE_TO_V4_MAPPING[type];
|
|
130
|
+
if (byType) {
|
|
131
|
+
return byType;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Maps v4 CSS variable namespace to Tailwind v4 theme key.
|
|
138
|
+
* In v4, the theme keys are more directly mapped to CSS variable namespaces.
|
|
139
|
+
*
|
|
140
|
+
* @param namespace The CSS variable namespace.
|
|
141
|
+
* @returns The corresponding theme key for v4 config.
|
|
142
|
+
* @private
|
|
143
|
+
*/
|
|
144
|
+
function namespaceToThemeKey(namespace) {
|
|
145
|
+
// Remove leading '--' and convert to camelCase-ish theme key
|
|
146
|
+
// --color -> colors
|
|
147
|
+
// --font-family -> fontFamily
|
|
148
|
+
// --font-size -> fontSize
|
|
149
|
+
// --spacing -> spacing
|
|
150
|
+
// --radius -> borderRadius
|
|
151
|
+
// --shadow -> boxShadow
|
|
152
|
+
const mapping = {
|
|
153
|
+
'--color': 'colors',
|
|
154
|
+
'--font-family': 'fontFamily',
|
|
155
|
+
'--font-size': 'fontSize',
|
|
156
|
+
'--font-weight': 'fontWeight',
|
|
157
|
+
'--letter-spacing': 'letterSpacing',
|
|
158
|
+
'--line-height': 'lineHeight',
|
|
159
|
+
'--radius': 'borderRadius',
|
|
160
|
+
'--shadow': 'boxShadow',
|
|
161
|
+
'--spacing': 'spacing',
|
|
162
|
+
'--width': 'width',
|
|
163
|
+
'--height': 'height',
|
|
164
|
+
'--z': 'zIndex',
|
|
165
|
+
'--opacity': 'opacity',
|
|
166
|
+
'--transition-duration': 'transitionDuration',
|
|
167
|
+
'--border-width': 'borderWidth'
|
|
168
|
+
};
|
|
169
|
+
return mapping[namespace] ?? namespace.slice(2);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Builds a Tailwind v4 config object from Style-Dictionary tokens.
|
|
173
|
+
*
|
|
174
|
+
* In Tailwind v4, the configuration structure is flatter and works
|
|
175
|
+
* in conjunction with the CSS-first approach. This generates a config
|
|
176
|
+
* that can be used with the @config directive.
|
|
177
|
+
*
|
|
178
|
+
* @param allTokens All transformed tokens from Style-Dictionary.
|
|
179
|
+
* @param options Build options.
|
|
180
|
+
* @returns A Tailwind v4 config object.
|
|
181
|
+
* @public
|
|
182
|
+
*/
|
|
183
|
+
function buildTailwindV4Config(allTokens, options = {}) {
|
|
184
|
+
const { ignoredTokenNameSubstrings = [], useExtend = false } = options;
|
|
185
|
+
validateTokenTypes(allTokens, ignoredTokenNameSubstrings);
|
|
186
|
+
const theme = {};
|
|
187
|
+
for (const token of allTokens) {
|
|
188
|
+
const lowerName = token.name.toLowerCase();
|
|
189
|
+
const tokenPath = token.path.join('.');
|
|
190
|
+
// Check if any ignored substring appears in the token name OR path
|
|
191
|
+
const isIgnored = ignoredTokenNameSubstrings.some((substr) => lowerName.includes(substr.toLowerCase()) || tokenPath.toLowerCase().includes(substr.toLowerCase()));
|
|
192
|
+
if (isIgnored) {
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
// Skip expanded shadow parts
|
|
196
|
+
const shadowPartPattern = /\.(offsetX|offsetY|blur|spread|color)\.\d+$/i;
|
|
197
|
+
if (shadowPartPattern.test(tokenPath)) {
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
// Skip duration tokens without values
|
|
201
|
+
if (token.path[0] === 'duration' && !token.value) {
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
const mapping = resolveMappingForToken(token);
|
|
205
|
+
if (!mapping) {
|
|
206
|
+
console.warn(`${(0, utilities_1.symbol)('warning')} ${(0, utilities_1.yellow)(`Token "${token.path.join('.')}:${token.name}" cannot be mapped to Tailwind v4 config (no valid category or type mapping). Skipping.`)}`);
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
const rawValue = (0, getValue_js_1.getValue)(token);
|
|
210
|
+
const normalizedValue = normalizeValue(rawValue);
|
|
211
|
+
const rawPath = token.path.length > 0 ? token.path : [token.name];
|
|
212
|
+
// Get the theme key from namespace
|
|
213
|
+
const themeKey = namespaceToThemeKey(mapping.namespace);
|
|
214
|
+
// Apply pathTransform if defined
|
|
215
|
+
const transformedName = mapping.pathTransform
|
|
216
|
+
? mapping.pathTransform(rawPath)
|
|
217
|
+
: rawPath.join('-').toLowerCase();
|
|
218
|
+
// Initialize theme section if needed
|
|
219
|
+
if (!theme[themeKey]) {
|
|
220
|
+
theme[themeKey] = {};
|
|
221
|
+
}
|
|
222
|
+
// Handle nested paths for colors (e.g., primary.500)
|
|
223
|
+
if (themeKey === 'colors' && transformedName.includes('-')) {
|
|
224
|
+
const parts = transformedName.split('-');
|
|
225
|
+
// Check if it looks like a color scale (name-shade pattern)
|
|
226
|
+
const lastPart = parts[parts.length - 1];
|
|
227
|
+
const isShade = (/^(\d+|dark|light|DEFAULT)$/i).test(lastPart);
|
|
228
|
+
if (isShade && parts.length >= 2) {
|
|
229
|
+
const colorGroup = parts.slice(0, -1).join('-');
|
|
230
|
+
const shade = parts[parts.length - 1];
|
|
231
|
+
if (!theme[themeKey][colorGroup]) {
|
|
232
|
+
theme[themeKey][colorGroup] = {};
|
|
233
|
+
}
|
|
234
|
+
const group = theme[themeKey][colorGroup];
|
|
235
|
+
if (typeof group === 'object' && group !== null) {
|
|
236
|
+
group[shade] = normalizedValue;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
theme[themeKey][transformedName] = normalizedValue;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
else if (themeKey === 'boxShadow' && Array.isArray(normalizedValue)) {
|
|
244
|
+
// Shadows need to be joined as strings
|
|
245
|
+
theme[themeKey][transformedName] = normalizedValue.map((v) => String(v)).join(', ');
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
theme[themeKey][transformedName] = normalizedValue;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
// Post-process: normalize single-entry objects
|
|
252
|
+
for (const [categoryKey, categoryValue] of Object.entries(theme)) {
|
|
253
|
+
if (typeof categoryValue === 'object' && categoryValue !== null) {
|
|
254
|
+
const keys = Object.keys(categoryValue);
|
|
255
|
+
if (keys.length === 1 && keys[0] !== 'DEFAULT') {
|
|
256
|
+
const value = categoryValue[keys[0]];
|
|
257
|
+
theme[categoryKey] = { DEFAULT: value };
|
|
258
|
+
}
|
|
259
|
+
else if (categoryKey === 'colors') {
|
|
260
|
+
// For colors, normalize nested single-entry objects
|
|
261
|
+
for (const [colorKey, colorValue] of Object.entries(categoryValue)) {
|
|
262
|
+
if (typeof colorValue === 'object' && colorValue !== null && !Array.isArray(colorValue)) {
|
|
263
|
+
const colorObj = colorValue;
|
|
264
|
+
const colorKeys = Object.keys(colorObj);
|
|
265
|
+
if (colorKeys.length === 1 && colorKeys[0] !== 'DEFAULT') {
|
|
266
|
+
categoryValue[colorKey] = { DEFAULT: colorObj[colorKeys[0]] };
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
if (useExtend) {
|
|
274
|
+
return {
|
|
275
|
+
theme: {
|
|
276
|
+
extend: theme
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
return { theme };
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Formats a Tailwind v4 config object as a JavaScript module string.
|
|
284
|
+
*
|
|
285
|
+
* @param config The config object.
|
|
286
|
+
* @returns Formatted JavaScript string.
|
|
287
|
+
* @public
|
|
288
|
+
*/
|
|
289
|
+
function formatTailwindV4ConfigAsJs(config) {
|
|
290
|
+
const parts = [JS_FILE_HEADER, ''];
|
|
291
|
+
parts.push('/** @type {import(\'tailwindcss\').Config} */');
|
|
292
|
+
parts.push(`export default ${JSON.stringify(config, null, 2).replace(/"([^"]+)":/g, '$1:')};`);
|
|
293
|
+
parts.push('');
|
|
294
|
+
return parts.join('\n');
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Formats a Tailwind v4 config object as a TypeScript module string.
|
|
298
|
+
*
|
|
299
|
+
* @param config The config object.
|
|
300
|
+
* @returns Formatted TypeScript string.
|
|
301
|
+
* @public
|
|
302
|
+
*/
|
|
303
|
+
function formatTailwindV4ConfigAsTs(config) {
|
|
304
|
+
const parts = [TS_FILE_HEADER, ''];
|
|
305
|
+
parts.push('import type { Config } from \'tailwindcss\';');
|
|
306
|
+
parts.push('');
|
|
307
|
+
parts.push(`const config: Config = ${JSON.stringify(config, null, 2).replace(/"([^"]+)":/g, '$1:')};`);
|
|
308
|
+
parts.push('');
|
|
309
|
+
parts.push('export default config;');
|
|
310
|
+
parts.push('');
|
|
311
|
+
return parts.join('\n');
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Builds and formats a Tailwind v4 JavaScript config file from tokens.
|
|
315
|
+
*
|
|
316
|
+
* @param allTokens All transformed tokens from Style-Dictionary.
|
|
317
|
+
* @param options Build options.
|
|
318
|
+
* @returns Formatted JavaScript config file content.
|
|
319
|
+
* @public
|
|
320
|
+
*/
|
|
321
|
+
function buildTailwindV4ConfigJs(allTokens, options = {}) {
|
|
322
|
+
const config = buildTailwindV4Config(allTokens, options);
|
|
323
|
+
return formatTailwindV4ConfigAsJs(config);
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Builds and formats a Tailwind v4 TypeScript config file from tokens.
|
|
327
|
+
*
|
|
328
|
+
* @param allTokens All transformed tokens from Style-Dictionary.
|
|
329
|
+
* @param options Build options.
|
|
330
|
+
* @returns Formatted TypeScript config file content.
|
|
331
|
+
* @public
|
|
332
|
+
*/
|
|
333
|
+
function buildTailwindV4ConfigTs(allTokens, options = {}) {
|
|
334
|
+
const config = buildTailwindV4Config(allTokens, options);
|
|
335
|
+
return formatTailwindV4ConfigAsTs(config);
|
|
336
|
+
}
|
|
337
|
+
// #endregion
|
|
338
|
+
//# sourceMappingURL=buildTailwindV4Config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildTailwindV4Config.js","sourceRoot":"","sources":["../../../../src/formats/tailwind/v4/buildTailwindV4Config.ts"],"names":[],"mappings":";AAAA,kBAAkB;;AAuPlB,sDAuHC;AASD,gEAQC;AASD,gEAWC;AAUD,0DAMC;AAUD,0DAMC;AAhbD,oEAAsE;AACtE,8DAAwD;AACxD,gEAA0D;AAE1D,iFAKwC;AA6CxC,aAAa;AAEb,iBAAiB;AAEjB;;;;GAIG;AACH,MAAM,cAAc,GAAG;;;;;;qFAM8D,CAAC;AAEtF;;;;GAIG;AACH,MAAM,cAAc,GAAG;;;;;;qFAM8D,CAAC;AAEtF,aAAa;AAEb,kBAAkB;AAElB;;;;;;GAMG;AACH,SAAS,cAAc,CAAC,KAAc;IAClC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAA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CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,0BAA0B,CAAC,MAAyB;IAChE,MAAM,KAAK,GAAkB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IAElD,KAAK,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;IAC3D,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,0BAA0B,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACvG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;IACrC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,uBAAuB,CACnC,SAA0C,EAC1C,UAAyC,EAAE;IAE3C,MAAM,MAAM,GAAG,qBAAqB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACzD,OAAO,0BAA0B,CAAC,MAAM,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,uBAAuB,CACnC,SAA0C,EAC1C,UAAyC,EAAE;IAE3C,MAAM,MAAM,GAAG,qBAAqB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACzD,OAAO,0BAA0B,CAAC,MAAM,CAAC,CAAC;AAC9C,CAAC;AAED,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/formats/tailwind/v4/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/formats/tailwind/v4/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC"}
|
|
@@ -15,4 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./tailwindV4Format.js"), exports);
|
|
18
|
+
__exportStar(require("./buildTailwindV4Config.js"), exports);
|
|
19
|
+
__exportStar(require("./buildTailwindV4Theme.js"), exports);
|
|
18
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/formats/tailwind/v4/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/formats/tailwind/v4/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,6DAA2C;AAC3C,4DAA0C"}
|