@removify/tailwind-preset 0.0.8 → 0.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/bin/index.js +1 -1
- package/dist/chunk-IUSDLEUF.js +275 -0
- package/dist/cli/index.cjs +352 -0
- package/dist/cli/index.js +88 -0
- package/dist/index.cjs +145 -113
- package/dist/index.d.cts +99 -23
- package/dist/index.d.ts +99 -23
- package/dist/index.js +13 -110
- package/package.json +14 -12
- package/dist/chunk-5LOSNWQT.js +0 -137
- package/dist/cli.cjs +0 -186
- package/dist/cli.js +0 -30
- /package/dist/{cli.d.cts → cli/index.d.cts} +0 -0
- /package/dist/{cli.d.ts → cli/index.d.ts} +0 -0
package/bin/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import '../dist/cli.js';
|
|
2
|
+
import '../dist/cli/index.js';
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
// src/theme/colors.ts
|
|
2
|
+
var mainColors = {
|
|
3
|
+
inherit: "inherit",
|
|
4
|
+
current: "currentColor",
|
|
5
|
+
transparent: "transparent",
|
|
6
|
+
danger: "#EA3529",
|
|
7
|
+
warning: "#FFA037",
|
|
8
|
+
success: "#15A46E",
|
|
9
|
+
info: "#3EC2C9",
|
|
10
|
+
special: "#686DF4",
|
|
11
|
+
black: "#000000",
|
|
12
|
+
white: "#FFFFFF",
|
|
13
|
+
bateau: {
|
|
14
|
+
50: "#F2F5F7",
|
|
15
|
+
100: "#E7ECF0",
|
|
16
|
+
200: "#CCD7E1",
|
|
17
|
+
300: "#ADC0D0",
|
|
18
|
+
400: "#6390B0",
|
|
19
|
+
500: "#1C749F",
|
|
20
|
+
600: "#1B6F98",
|
|
21
|
+
700: "#186388",
|
|
22
|
+
800: "#155675",
|
|
23
|
+
900: "#114660",
|
|
24
|
+
950: "#0C3144"
|
|
25
|
+
},
|
|
26
|
+
pompelmo: {
|
|
27
|
+
50: "#FFF4F4",
|
|
28
|
+
100: "#FFEBEA",
|
|
29
|
+
200: "#FFD4D4",
|
|
30
|
+
300: "#FFBCBB",
|
|
31
|
+
400: "#FF9F9E",
|
|
32
|
+
500: "#FF6663",
|
|
33
|
+
600: "#F3615E",
|
|
34
|
+
700: "#DA5754",
|
|
35
|
+
800: "#BC4B49",
|
|
36
|
+
900: "#9A3E3C",
|
|
37
|
+
950: "#6D2C2A"
|
|
38
|
+
},
|
|
39
|
+
neutral: {
|
|
40
|
+
50: "#F9FAFB",
|
|
41
|
+
100: "#F4F6F7",
|
|
42
|
+
200: "#E9ECEF",
|
|
43
|
+
300: "#DEE2E7",
|
|
44
|
+
400: "#D2D8DE",
|
|
45
|
+
500: "#BEC7D1",
|
|
46
|
+
600: "#B5BEC7",
|
|
47
|
+
700: "#A2AAB2",
|
|
48
|
+
800: "#8C939A",
|
|
49
|
+
900: "#73787E",
|
|
50
|
+
950: "#515559"
|
|
51
|
+
},
|
|
52
|
+
orange: {
|
|
53
|
+
50: "#FEF5F2",
|
|
54
|
+
100: "#FEECE7",
|
|
55
|
+
200: "#FDD7CC",
|
|
56
|
+
300: "#FCC0AD",
|
|
57
|
+
400: "#FBA586",
|
|
58
|
+
500: "#F97316",
|
|
59
|
+
600: "#EE6E15",
|
|
60
|
+
700: "#D46213",
|
|
61
|
+
800: "#B85510",
|
|
62
|
+
900: "#96450D",
|
|
63
|
+
950: "#6A3109"
|
|
64
|
+
},
|
|
65
|
+
amber: {
|
|
66
|
+
50: "#FFF9F2",
|
|
67
|
+
100: "#FEF5E7",
|
|
68
|
+
200: "#FEEACD",
|
|
69
|
+
300: "#FDDEAE",
|
|
70
|
+
400: "#FCD288",
|
|
71
|
+
500: "#FBBF24",
|
|
72
|
+
600: "#EFB622",
|
|
73
|
+
700: "#D6A31F",
|
|
74
|
+
800: "#B98D1B",
|
|
75
|
+
900: "#977316",
|
|
76
|
+
950: "#6B510F"
|
|
77
|
+
},
|
|
78
|
+
indigo: {
|
|
79
|
+
50: "#F4F4FE",
|
|
80
|
+
100: "#EBEBFD",
|
|
81
|
+
200: "#D5D6FB",
|
|
82
|
+
300: "#BCBEF9",
|
|
83
|
+
400: "#A0A2F7",
|
|
84
|
+
500: "#686DF4",
|
|
85
|
+
600: "#6368E9",
|
|
86
|
+
700: "#595DD0",
|
|
87
|
+
800: "#4D51B4",
|
|
88
|
+
900: "#3F4293",
|
|
89
|
+
950: "#2C2F68"
|
|
90
|
+
},
|
|
91
|
+
seafoam: {
|
|
92
|
+
50: "#F3FAFA",
|
|
93
|
+
100: "#E8F5F6",
|
|
94
|
+
200: "#CFEBED",
|
|
95
|
+
300: "#B2E0E3",
|
|
96
|
+
400: "#8FD4D9",
|
|
97
|
+
500: "#3EC2C9",
|
|
98
|
+
600: "#3BB9C0",
|
|
99
|
+
700: "#35A6AB",
|
|
100
|
+
800: "#2E8F95",
|
|
101
|
+
900: "#257579",
|
|
102
|
+
950: "#1A5356"
|
|
103
|
+
},
|
|
104
|
+
green: {
|
|
105
|
+
50: "#F2F7F4",
|
|
106
|
+
100: "#E7F1EB",
|
|
107
|
+
200: "#CCE2D6",
|
|
108
|
+
300: "#ADD2BE",
|
|
109
|
+
400: "#86C1A3",
|
|
110
|
+
500: "#15A46E",
|
|
111
|
+
600: "#149C69",
|
|
112
|
+
700: "#128C5E",
|
|
113
|
+
800: "#107951",
|
|
114
|
+
900: "#0D6342",
|
|
115
|
+
950: "#09462F"
|
|
116
|
+
},
|
|
117
|
+
fuchsia: {
|
|
118
|
+
50: "#FAF3FD",
|
|
119
|
+
100: "#F5E8FB",
|
|
120
|
+
200: "#ECCFF7",
|
|
121
|
+
300: "#E1B2F2",
|
|
122
|
+
400: "#D68FEE",
|
|
123
|
+
500: "#C53DE7",
|
|
124
|
+
600: "#BC3ADC",
|
|
125
|
+
700: "#A834C5",
|
|
126
|
+
800: "#922DAB",
|
|
127
|
+
900: "#77258B",
|
|
128
|
+
950: "#541A63"
|
|
129
|
+
},
|
|
130
|
+
red: {
|
|
131
|
+
50: "#FDF2F2",
|
|
132
|
+
100: "#FBE8E7",
|
|
133
|
+
200: "#F8CECD",
|
|
134
|
+
300: "#F4B0AE",
|
|
135
|
+
400: "#F08C8A",
|
|
136
|
+
500: "#EA3529",
|
|
137
|
+
600: "#DF3327",
|
|
138
|
+
700: "#C82D23",
|
|
139
|
+
800: "#AD271E",
|
|
140
|
+
900: "#8D2019",
|
|
141
|
+
950: "#641711"
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
var colors = {
|
|
145
|
+
...mainColors,
|
|
146
|
+
primary: mainColors.bateau,
|
|
147
|
+
secondary: mainColors.pompelmo
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
// src/util/font.ts
|
|
151
|
+
import { kebabKeys } from "string-ts";
|
|
152
|
+
|
|
153
|
+
// src/types/fontSize.ts
|
|
154
|
+
function isDetailFont(value) {
|
|
155
|
+
return Array.isArray(value) && typeof value[1] === "object";
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// src/util/font.ts
|
|
159
|
+
var entries = Object.entries;
|
|
160
|
+
function fontConfigKeysKebabCase(fontConfig) {
|
|
161
|
+
const result = {};
|
|
162
|
+
for (const [key, value] of entries(fontConfig)) {
|
|
163
|
+
if (value) {
|
|
164
|
+
if (isDetailFont(value)) {
|
|
165
|
+
const [size, detail] = value;
|
|
166
|
+
const kebabDetail = kebabKeys(detail);
|
|
167
|
+
result[key] = [size, kebabDetail];
|
|
168
|
+
} else {
|
|
169
|
+
result[key] = value;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return result;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// src/theme/fontSize.ts
|
|
177
|
+
var fontSizes = {
|
|
178
|
+
"2xs": ["0.6875rem", "1rem"],
|
|
179
|
+
"xs": ["0.75rem", "1rem"],
|
|
180
|
+
"sm": ["0.875rem", "1.25rem"],
|
|
181
|
+
"base": ["1rem", "1.5rem"],
|
|
182
|
+
"lg": ["1.25rem", "1.625rem"],
|
|
183
|
+
"display1": ["3.75rem", {
|
|
184
|
+
fontWeight: 700,
|
|
185
|
+
lineHeight: "5rem",
|
|
186
|
+
letterSpacing: "-0.0625rem"
|
|
187
|
+
}],
|
|
188
|
+
"display2": ["3.25rem", {
|
|
189
|
+
fontWeight: 700,
|
|
190
|
+
lineHeight: "4.25rem",
|
|
191
|
+
letterSpacing: "-0.05rem"
|
|
192
|
+
}],
|
|
193
|
+
"display3": ["2.75rem", {
|
|
194
|
+
fontWeight: 700,
|
|
195
|
+
lineHeight: "3.625rem",
|
|
196
|
+
letterSpacing: "-0.0375rem"
|
|
197
|
+
}],
|
|
198
|
+
"h1": ["3rem", {
|
|
199
|
+
fontWeight: 700,
|
|
200
|
+
lineHeight: "3.75rem",
|
|
201
|
+
letterSpacing: "-0.0125rem"
|
|
202
|
+
}],
|
|
203
|
+
"h2": ["2.5rem", {
|
|
204
|
+
fontWeight: 700,
|
|
205
|
+
lineHeight: "3.25rem",
|
|
206
|
+
letterSpacing: "-0.0125rem"
|
|
207
|
+
}],
|
|
208
|
+
"h3": ["2.25rem", {
|
|
209
|
+
fontWeight: 700,
|
|
210
|
+
lineHeight: "3rem",
|
|
211
|
+
letterSpacing: "-0.0125rem"
|
|
212
|
+
}],
|
|
213
|
+
"h4": ["2rem", {
|
|
214
|
+
fontWeight: 700,
|
|
215
|
+
lineHeight: "2.625rem",
|
|
216
|
+
letterSpacing: "-0.0125rem"
|
|
217
|
+
}],
|
|
218
|
+
"h5": ["1.5rem", {
|
|
219
|
+
fontWeight: 700,
|
|
220
|
+
lineHeight: "2rem",
|
|
221
|
+
letterSpacing: "-0.0125rem"
|
|
222
|
+
}],
|
|
223
|
+
"h6": ["1.25rem", {
|
|
224
|
+
fontWeight: 700,
|
|
225
|
+
lineHeight: "1.625rem",
|
|
226
|
+
letterSpacing: "-0.0125rem"
|
|
227
|
+
}]
|
|
228
|
+
};
|
|
229
|
+
var unocssFontSizes = fontConfigKeysKebabCase(fontSizes);
|
|
230
|
+
|
|
231
|
+
// src/theme/shadows.ts
|
|
232
|
+
var shadows = {
|
|
233
|
+
"elevation-0": "0 0 0 0 rgba(0, 0, 0, 0.10)",
|
|
234
|
+
"elevation-1": "0 1px 2px 0 rgba(0, 0, 0, 0.10)",
|
|
235
|
+
"elevation-2": "0 4px 8px 0 rgba(0, 0, 0, 0.10)",
|
|
236
|
+
"elevation-3": "0 6px 12px 0 rgba(0, 0, 0, 0.10)",
|
|
237
|
+
"elevation-4": "0 8px 16px 0 rgba(0, 0, 0, 0.10)",
|
|
238
|
+
"elevation-5": "0 12px 24px 0 rgba(0, 0, 0, 0.10)"
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
// src/theme/fontFamily.ts
|
|
242
|
+
var fontFamilySans = [
|
|
243
|
+
"ui-sans-serif",
|
|
244
|
+
"system-ui",
|
|
245
|
+
"sans-serif",
|
|
246
|
+
'"Apple Color Emoji"',
|
|
247
|
+
'"Segoe UI Emoji"',
|
|
248
|
+
'"Segoe UI Symbol"',
|
|
249
|
+
'"Noto Color Emoji"'
|
|
250
|
+
];
|
|
251
|
+
var customFontFamily = {
|
|
252
|
+
sans: ["DM Sans", ...fontFamilySans]
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
// src/theme/index.ts
|
|
256
|
+
var theme = {
|
|
257
|
+
colors,
|
|
258
|
+
boxShadow: shadows,
|
|
259
|
+
fontSize: fontSizes,
|
|
260
|
+
fontFamily: customFontFamily
|
|
261
|
+
};
|
|
262
|
+
var unocssTheme = {
|
|
263
|
+
colors,
|
|
264
|
+
boxShadow: shadows,
|
|
265
|
+
fontSize: unocssFontSizes
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
export {
|
|
269
|
+
colors,
|
|
270
|
+
fontSizes,
|
|
271
|
+
shadows,
|
|
272
|
+
customFontFamily,
|
|
273
|
+
theme,
|
|
274
|
+
unocssTheme
|
|
275
|
+
};
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
|
|
25
|
+
// src/cli/index.ts
|
|
26
|
+
var import_helpers = require("yargs/helpers");
|
|
27
|
+
var import_yargs = __toESM(require("yargs"), 1);
|
|
28
|
+
var import_node_process = __toESM(require("process"), 1);
|
|
29
|
+
|
|
30
|
+
// src/theme/colors.ts
|
|
31
|
+
var mainColors = {
|
|
32
|
+
inherit: "inherit",
|
|
33
|
+
current: "currentColor",
|
|
34
|
+
transparent: "transparent",
|
|
35
|
+
danger: "#EA3529",
|
|
36
|
+
warning: "#FFA037",
|
|
37
|
+
success: "#15A46E",
|
|
38
|
+
info: "#3EC2C9",
|
|
39
|
+
special: "#686DF4",
|
|
40
|
+
black: "#000000",
|
|
41
|
+
white: "#FFFFFF",
|
|
42
|
+
bateau: {
|
|
43
|
+
50: "#F2F5F7",
|
|
44
|
+
100: "#E7ECF0",
|
|
45
|
+
200: "#CCD7E1",
|
|
46
|
+
300: "#ADC0D0",
|
|
47
|
+
400: "#6390B0",
|
|
48
|
+
500: "#1C749F",
|
|
49
|
+
600: "#1B6F98",
|
|
50
|
+
700: "#186388",
|
|
51
|
+
800: "#155675",
|
|
52
|
+
900: "#114660",
|
|
53
|
+
950: "#0C3144"
|
|
54
|
+
},
|
|
55
|
+
pompelmo: {
|
|
56
|
+
50: "#FFF4F4",
|
|
57
|
+
100: "#FFEBEA",
|
|
58
|
+
200: "#FFD4D4",
|
|
59
|
+
300: "#FFBCBB",
|
|
60
|
+
400: "#FF9F9E",
|
|
61
|
+
500: "#FF6663",
|
|
62
|
+
600: "#F3615E",
|
|
63
|
+
700: "#DA5754",
|
|
64
|
+
800: "#BC4B49",
|
|
65
|
+
900: "#9A3E3C",
|
|
66
|
+
950: "#6D2C2A"
|
|
67
|
+
},
|
|
68
|
+
neutral: {
|
|
69
|
+
50: "#F9FAFB",
|
|
70
|
+
100: "#F4F6F7",
|
|
71
|
+
200: "#E9ECEF",
|
|
72
|
+
300: "#DEE2E7",
|
|
73
|
+
400: "#D2D8DE",
|
|
74
|
+
500: "#BEC7D1",
|
|
75
|
+
600: "#B5BEC7",
|
|
76
|
+
700: "#A2AAB2",
|
|
77
|
+
800: "#8C939A",
|
|
78
|
+
900: "#73787E",
|
|
79
|
+
950: "#515559"
|
|
80
|
+
},
|
|
81
|
+
orange: {
|
|
82
|
+
50: "#FEF5F2",
|
|
83
|
+
100: "#FEECE7",
|
|
84
|
+
200: "#FDD7CC",
|
|
85
|
+
300: "#FCC0AD",
|
|
86
|
+
400: "#FBA586",
|
|
87
|
+
500: "#F97316",
|
|
88
|
+
600: "#EE6E15",
|
|
89
|
+
700: "#D46213",
|
|
90
|
+
800: "#B85510",
|
|
91
|
+
900: "#96450D",
|
|
92
|
+
950: "#6A3109"
|
|
93
|
+
},
|
|
94
|
+
amber: {
|
|
95
|
+
50: "#FFF9F2",
|
|
96
|
+
100: "#FEF5E7",
|
|
97
|
+
200: "#FEEACD",
|
|
98
|
+
300: "#FDDEAE",
|
|
99
|
+
400: "#FCD288",
|
|
100
|
+
500: "#FBBF24",
|
|
101
|
+
600: "#EFB622",
|
|
102
|
+
700: "#D6A31F",
|
|
103
|
+
800: "#B98D1B",
|
|
104
|
+
900: "#977316",
|
|
105
|
+
950: "#6B510F"
|
|
106
|
+
},
|
|
107
|
+
indigo: {
|
|
108
|
+
50: "#F4F4FE",
|
|
109
|
+
100: "#EBEBFD",
|
|
110
|
+
200: "#D5D6FB",
|
|
111
|
+
300: "#BCBEF9",
|
|
112
|
+
400: "#A0A2F7",
|
|
113
|
+
500: "#686DF4",
|
|
114
|
+
600: "#6368E9",
|
|
115
|
+
700: "#595DD0",
|
|
116
|
+
800: "#4D51B4",
|
|
117
|
+
900: "#3F4293",
|
|
118
|
+
950: "#2C2F68"
|
|
119
|
+
},
|
|
120
|
+
seafoam: {
|
|
121
|
+
50: "#F3FAFA",
|
|
122
|
+
100: "#E8F5F6",
|
|
123
|
+
200: "#CFEBED",
|
|
124
|
+
300: "#B2E0E3",
|
|
125
|
+
400: "#8FD4D9",
|
|
126
|
+
500: "#3EC2C9",
|
|
127
|
+
600: "#3BB9C0",
|
|
128
|
+
700: "#35A6AB",
|
|
129
|
+
800: "#2E8F95",
|
|
130
|
+
900: "#257579",
|
|
131
|
+
950: "#1A5356"
|
|
132
|
+
},
|
|
133
|
+
green: {
|
|
134
|
+
50: "#F2F7F4",
|
|
135
|
+
100: "#E7F1EB",
|
|
136
|
+
200: "#CCE2D6",
|
|
137
|
+
300: "#ADD2BE",
|
|
138
|
+
400: "#86C1A3",
|
|
139
|
+
500: "#15A46E",
|
|
140
|
+
600: "#149C69",
|
|
141
|
+
700: "#128C5E",
|
|
142
|
+
800: "#107951",
|
|
143
|
+
900: "#0D6342",
|
|
144
|
+
950: "#09462F"
|
|
145
|
+
},
|
|
146
|
+
fuchsia: {
|
|
147
|
+
50: "#FAF3FD",
|
|
148
|
+
100: "#F5E8FB",
|
|
149
|
+
200: "#ECCFF7",
|
|
150
|
+
300: "#E1B2F2",
|
|
151
|
+
400: "#D68FEE",
|
|
152
|
+
500: "#C53DE7",
|
|
153
|
+
600: "#BC3ADC",
|
|
154
|
+
700: "#A834C5",
|
|
155
|
+
800: "#922DAB",
|
|
156
|
+
900: "#77258B",
|
|
157
|
+
950: "#541A63"
|
|
158
|
+
},
|
|
159
|
+
red: {
|
|
160
|
+
50: "#FDF2F2",
|
|
161
|
+
100: "#FBE8E7",
|
|
162
|
+
200: "#F8CECD",
|
|
163
|
+
300: "#F4B0AE",
|
|
164
|
+
400: "#F08C8A",
|
|
165
|
+
500: "#EA3529",
|
|
166
|
+
600: "#DF3327",
|
|
167
|
+
700: "#C82D23",
|
|
168
|
+
800: "#AD271E",
|
|
169
|
+
900: "#8D2019",
|
|
170
|
+
950: "#641711"
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
var colors = {
|
|
174
|
+
...mainColors,
|
|
175
|
+
primary: mainColors.bateau,
|
|
176
|
+
secondary: mainColors.pompelmo
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// src/util/font.ts
|
|
180
|
+
var import_string_ts = require("string-ts");
|
|
181
|
+
|
|
182
|
+
// src/types/fontSize.ts
|
|
183
|
+
function isDetailFont(value) {
|
|
184
|
+
return Array.isArray(value) && typeof value[1] === "object";
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// src/util/font.ts
|
|
188
|
+
var entries = Object.entries;
|
|
189
|
+
function fontConfigKeysKebabCase(fontConfig) {
|
|
190
|
+
const result = {};
|
|
191
|
+
for (const [key, value] of entries(fontConfig)) {
|
|
192
|
+
if (value) {
|
|
193
|
+
if (isDetailFont(value)) {
|
|
194
|
+
const [size, detail] = value;
|
|
195
|
+
const kebabDetail = (0, import_string_ts.kebabKeys)(detail);
|
|
196
|
+
result[key] = [size, kebabDetail];
|
|
197
|
+
} else {
|
|
198
|
+
result[key] = value;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return result;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// src/theme/fontSize.ts
|
|
206
|
+
var fontSizes = {
|
|
207
|
+
"2xs": ["0.6875rem", "1rem"],
|
|
208
|
+
"xs": ["0.75rem", "1rem"],
|
|
209
|
+
"sm": ["0.875rem", "1.25rem"],
|
|
210
|
+
"base": ["1rem", "1.5rem"],
|
|
211
|
+
"lg": ["1.25rem", "1.625rem"],
|
|
212
|
+
"display1": ["3.75rem", {
|
|
213
|
+
fontWeight: 700,
|
|
214
|
+
lineHeight: "5rem",
|
|
215
|
+
letterSpacing: "-0.0625rem"
|
|
216
|
+
}],
|
|
217
|
+
"display2": ["3.25rem", {
|
|
218
|
+
fontWeight: 700,
|
|
219
|
+
lineHeight: "4.25rem",
|
|
220
|
+
letterSpacing: "-0.05rem"
|
|
221
|
+
}],
|
|
222
|
+
"display3": ["2.75rem", {
|
|
223
|
+
fontWeight: 700,
|
|
224
|
+
lineHeight: "3.625rem",
|
|
225
|
+
letterSpacing: "-0.0375rem"
|
|
226
|
+
}],
|
|
227
|
+
"h1": ["3rem", {
|
|
228
|
+
fontWeight: 700,
|
|
229
|
+
lineHeight: "3.75rem",
|
|
230
|
+
letterSpacing: "-0.0125rem"
|
|
231
|
+
}],
|
|
232
|
+
"h2": ["2.5rem", {
|
|
233
|
+
fontWeight: 700,
|
|
234
|
+
lineHeight: "3.25rem",
|
|
235
|
+
letterSpacing: "-0.0125rem"
|
|
236
|
+
}],
|
|
237
|
+
"h3": ["2.25rem", {
|
|
238
|
+
fontWeight: 700,
|
|
239
|
+
lineHeight: "3rem",
|
|
240
|
+
letterSpacing: "-0.0125rem"
|
|
241
|
+
}],
|
|
242
|
+
"h4": ["2rem", {
|
|
243
|
+
fontWeight: 700,
|
|
244
|
+
lineHeight: "2.625rem",
|
|
245
|
+
letterSpacing: "-0.0125rem"
|
|
246
|
+
}],
|
|
247
|
+
"h5": ["1.5rem", {
|
|
248
|
+
fontWeight: 700,
|
|
249
|
+
lineHeight: "2rem",
|
|
250
|
+
letterSpacing: "-0.0125rem"
|
|
251
|
+
}],
|
|
252
|
+
"h6": ["1.25rem", {
|
|
253
|
+
fontWeight: 700,
|
|
254
|
+
lineHeight: "1.625rem",
|
|
255
|
+
letterSpacing: "-0.0125rem"
|
|
256
|
+
}]
|
|
257
|
+
};
|
|
258
|
+
var unocssFontSizes = fontConfigKeysKebabCase(fontSizes);
|
|
259
|
+
|
|
260
|
+
// src/theme/fontFamily.ts
|
|
261
|
+
var fontFamilySans = [
|
|
262
|
+
"ui-sans-serif",
|
|
263
|
+
"system-ui",
|
|
264
|
+
"sans-serif",
|
|
265
|
+
'"Apple Color Emoji"',
|
|
266
|
+
'"Segoe UI Emoji"',
|
|
267
|
+
'"Segoe UI Symbol"',
|
|
268
|
+
'"Noto Color Emoji"'
|
|
269
|
+
];
|
|
270
|
+
var customFontFamily = {
|
|
271
|
+
sans: ["DM Sans", ...fontFamilySans]
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
// src/cli/src/theme/color.ts
|
|
275
|
+
var css = String.raw;
|
|
276
|
+
function generateColorVariables(filetype) {
|
|
277
|
+
let theme = css``;
|
|
278
|
+
for (const [key, value] of Object.entries(colors)) {
|
|
279
|
+
if (typeof value === "object") {
|
|
280
|
+
for (const [subKey, subValue] of Object.entries(value)) {
|
|
281
|
+
if (filetype === "tailwind" || filetype === "css") {
|
|
282
|
+
theme += css` --color-${key}-${subKey}: ${subValue};
|
|
283
|
+
`;
|
|
284
|
+
} else if (filetype === "scss") {
|
|
285
|
+
theme += css`$color-${key}-${subKey}: ${subValue};
|
|
286
|
+
`;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
} else {
|
|
290
|
+
if (filetype === "tailwind" || filetype === "css") {
|
|
291
|
+
theme += css` --color-${key}: ${value};
|
|
292
|
+
`;
|
|
293
|
+
} else if (filetype === "scss") {
|
|
294
|
+
theme += css`$color-${key}: ${value};
|
|
295
|
+
`;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return theme;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// src/cli/src/css.ts
|
|
303
|
+
var css2 = String.raw;
|
|
304
|
+
function generateCssTheme() {
|
|
305
|
+
let theme = css2`*, *::before, *::after {
|
|
306
|
+
`;
|
|
307
|
+
theme += generateColorVariables("css");
|
|
308
|
+
return theme += css2`}`;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// src/cli/src/scss.ts
|
|
312
|
+
var css3 = String.raw;
|
|
313
|
+
function generateScssTheme() {
|
|
314
|
+
let theme = css3``;
|
|
315
|
+
theme += generateColorVariables("scss");
|
|
316
|
+
return theme;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// src/cli/src/tailwind.ts
|
|
320
|
+
var css4 = String.raw;
|
|
321
|
+
function generateTailwindTheme(extend) {
|
|
322
|
+
let theme = css4`@import "tailwindcss";
|
|
323
|
+
@theme {
|
|
324
|
+
`;
|
|
325
|
+
if (!extend) {
|
|
326
|
+
theme += css4` --color-*: initial;
|
|
327
|
+
`;
|
|
328
|
+
}
|
|
329
|
+
theme += generateColorVariables("tailwind");
|
|
330
|
+
return theme += css4`}`;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// src/cli/src/utils/log.ts
|
|
334
|
+
function log(...args) {
|
|
335
|
+
console.log(...args);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// src/cli/index.ts
|
|
339
|
+
var filetypes = ["tailwind", "css", "scss"];
|
|
340
|
+
var argv = (0, import_yargs.default)((0, import_helpers.hideBin)(import_node_process.default.argv)).scriptName("@removify/tailwind-preset").usage("$0 [options] > src/style.css").help().options({ extend: { type: "boolean", default: true, alias: "e" } }).options({ filetype: { choices: filetypes, default: "css", alias: "f" } }).parseSync();
|
|
341
|
+
if (argv.filetype === "tailwind") {
|
|
342
|
+
const theme = generateTailwindTheme(argv.extend);
|
|
343
|
+
log(theme);
|
|
344
|
+
}
|
|
345
|
+
if (argv.filetype === "css") {
|
|
346
|
+
const theme = generateCssTheme();
|
|
347
|
+
log(theme);
|
|
348
|
+
}
|
|
349
|
+
if (argv.filetype === "scss") {
|
|
350
|
+
const theme = generateScssTheme();
|
|
351
|
+
log(theme);
|
|
352
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colors
|
|
3
|
+
} from "../chunk-IUSDLEUF.js";
|
|
4
|
+
|
|
5
|
+
// src/cli/index.ts
|
|
6
|
+
import { hideBin } from "yargs/helpers";
|
|
7
|
+
import yargs from "yargs";
|
|
8
|
+
import process from "process";
|
|
9
|
+
|
|
10
|
+
// src/cli/src/theme/color.ts
|
|
11
|
+
var css = String.raw;
|
|
12
|
+
function generateColorVariables(filetype) {
|
|
13
|
+
let theme = css``;
|
|
14
|
+
for (const [key, value] of Object.entries(colors)) {
|
|
15
|
+
if (typeof value === "object") {
|
|
16
|
+
for (const [subKey, subValue] of Object.entries(value)) {
|
|
17
|
+
if (filetype === "tailwind" || filetype === "css") {
|
|
18
|
+
theme += css` --color-${key}-${subKey}: ${subValue};
|
|
19
|
+
`;
|
|
20
|
+
} else if (filetype === "scss") {
|
|
21
|
+
theme += css`$color-${key}-${subKey}: ${subValue};
|
|
22
|
+
`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
if (filetype === "tailwind" || filetype === "css") {
|
|
27
|
+
theme += css` --color-${key}: ${value};
|
|
28
|
+
`;
|
|
29
|
+
} else if (filetype === "scss") {
|
|
30
|
+
theme += css`$color-${key}: ${value};
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return theme;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// src/cli/src/css.ts
|
|
39
|
+
var css2 = String.raw;
|
|
40
|
+
function generateCssTheme() {
|
|
41
|
+
let theme = css2`*, *::before, *::after {
|
|
42
|
+
`;
|
|
43
|
+
theme += generateColorVariables("css");
|
|
44
|
+
return theme += css2`}`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// src/cli/src/scss.ts
|
|
48
|
+
var css3 = String.raw;
|
|
49
|
+
function generateScssTheme() {
|
|
50
|
+
let theme = css3``;
|
|
51
|
+
theme += generateColorVariables("scss");
|
|
52
|
+
return theme;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// src/cli/src/tailwind.ts
|
|
56
|
+
var css4 = String.raw;
|
|
57
|
+
function generateTailwindTheme(extend) {
|
|
58
|
+
let theme = css4`@import "tailwindcss";
|
|
59
|
+
@theme {
|
|
60
|
+
`;
|
|
61
|
+
if (!extend) {
|
|
62
|
+
theme += css4` --color-*: initial;
|
|
63
|
+
`;
|
|
64
|
+
}
|
|
65
|
+
theme += generateColorVariables("tailwind");
|
|
66
|
+
return theme += css4`}`;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// src/cli/src/utils/log.ts
|
|
70
|
+
function log(...args) {
|
|
71
|
+
console.log(...args);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// src/cli/index.ts
|
|
75
|
+
var filetypes = ["tailwind", "css", "scss"];
|
|
76
|
+
var argv = yargs(hideBin(process.argv)).scriptName("@removify/tailwind-preset").usage("$0 [options] > src/style.css").help().options({ extend: { type: "boolean", default: true, alias: "e" } }).options({ filetype: { choices: filetypes, default: "css", alias: "f" } }).parseSync();
|
|
77
|
+
if (argv.filetype === "tailwind") {
|
|
78
|
+
const theme = generateTailwindTheme(argv.extend);
|
|
79
|
+
log(theme);
|
|
80
|
+
}
|
|
81
|
+
if (argv.filetype === "css") {
|
|
82
|
+
const theme = generateCssTheme();
|
|
83
|
+
log(theme);
|
|
84
|
+
}
|
|
85
|
+
if (argv.filetype === "scss") {
|
|
86
|
+
const theme = generateScssTheme();
|
|
87
|
+
log(theme);
|
|
88
|
+
}
|