@removify/tailwind-preset 0.0.7 → 0.0.9
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-A4JTRVFS.js +252 -0
- package/dist/cli/index.cjs +329 -0
- package/dist/cli/index.js +88 -0
- package/dist/index.cjs +90 -20
- package/dist/index.d.cts +248 -48
- package/dist/index.d.ts +248 -48
- package/dist/index.js +17 -78
- package/package.json +23 -20
- package/dist/chunk-UJDFJG2Z.js +0 -114
- package/dist/cli.cjs +0 -163
- 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,252 @@
|
|
|
1
|
+
// src/theme/colors.ts
|
|
2
|
+
var colors = {
|
|
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
|
+
primary: {
|
|
14
|
+
50: "#E8F1F6",
|
|
15
|
+
100: "#BED9E6",
|
|
16
|
+
200: "#95C0D5",
|
|
17
|
+
300: "#6CA7C3",
|
|
18
|
+
400: "#448DB1",
|
|
19
|
+
500: "#1C749F",
|
|
20
|
+
600: "#166085",
|
|
21
|
+
700: "#104C6A",
|
|
22
|
+
800: "#0B384E",
|
|
23
|
+
900: "#062432"
|
|
24
|
+
},
|
|
25
|
+
secondary: {
|
|
26
|
+
50: "#FFEFEF",
|
|
27
|
+
100: "#FFD3D2",
|
|
28
|
+
200: "#FFB7B5",
|
|
29
|
+
300: "#FF9B99",
|
|
30
|
+
400: "#FF807E",
|
|
31
|
+
500: "#FF6663",
|
|
32
|
+
600: "#D25350",
|
|
33
|
+
700: "#A6403E",
|
|
34
|
+
800: "#792E2C",
|
|
35
|
+
900: "#4D1C1B"
|
|
36
|
+
},
|
|
37
|
+
green: {
|
|
38
|
+
50: "#E7F7F1",
|
|
39
|
+
100: "#BCE7D7",
|
|
40
|
+
200: "#91D7BD",
|
|
41
|
+
300: "#67C7A3",
|
|
42
|
+
400: "#3EB688",
|
|
43
|
+
500: "#15A46E",
|
|
44
|
+
600: "#10895B",
|
|
45
|
+
700: "#0B6D48",
|
|
46
|
+
800: "#075035",
|
|
47
|
+
900: "#043322"
|
|
48
|
+
},
|
|
49
|
+
fuchsia: {
|
|
50
|
+
50: "#FAEBFD",
|
|
51
|
+
100: "#F0C7FA",
|
|
52
|
+
200: "#E6A3F6",
|
|
53
|
+
300: "#DB81F2",
|
|
54
|
+
400: "#D05FED",
|
|
55
|
+
500: "#C53DE7",
|
|
56
|
+
600: "#A431C0",
|
|
57
|
+
700: "#822599",
|
|
58
|
+
800: "#5F1A71",
|
|
59
|
+
900: "#3D1048"
|
|
60
|
+
},
|
|
61
|
+
indigo: {
|
|
62
|
+
50: "#EFF0FF",
|
|
63
|
+
100: "#D3D5FE",
|
|
64
|
+
200: "#B8BAFC",
|
|
65
|
+
300: "#9DA0FA",
|
|
66
|
+
400: "#8286F7",
|
|
67
|
+
500: "#686DF4",
|
|
68
|
+
600: "#5459CB",
|
|
69
|
+
700: "#4145A1",
|
|
70
|
+
800: "#2F3276",
|
|
71
|
+
900: "#1D1F4B"
|
|
72
|
+
},
|
|
73
|
+
neutral: {
|
|
74
|
+
50: "#F1F2F5",
|
|
75
|
+
100: "#EAEDF2",
|
|
76
|
+
200: "#E1E5EA",
|
|
77
|
+
300: "#D5DBE2",
|
|
78
|
+
400: "#CAD1D9",
|
|
79
|
+
500: "#BEC7D1",
|
|
80
|
+
600: "#9DA4AD",
|
|
81
|
+
700: "#7B8188",
|
|
82
|
+
800: "#5A5F64",
|
|
83
|
+
900: "#393C3F"
|
|
84
|
+
},
|
|
85
|
+
orange: {
|
|
86
|
+
50: "#FFF6EA",
|
|
87
|
+
100: "#FFE5C5",
|
|
88
|
+
200: "#FFD3A0",
|
|
89
|
+
300: "#FFC27C",
|
|
90
|
+
400: "#FFB159",
|
|
91
|
+
500: "#FFA037",
|
|
92
|
+
600: "#D2842B",
|
|
93
|
+
700: "#A66821",
|
|
94
|
+
800: "#794C17",
|
|
95
|
+
900: "#4D300E"
|
|
96
|
+
},
|
|
97
|
+
seafoam: {
|
|
98
|
+
50: "#EBFAFA",
|
|
99
|
+
100: "#C7EFF1",
|
|
100
|
+
200: "#A4E5E8",
|
|
101
|
+
300: "#82DADE",
|
|
102
|
+
400: "#60CED4",
|
|
103
|
+
500: "#3EC2C9",
|
|
104
|
+
600: "#32A1A7",
|
|
105
|
+
700: "#268085",
|
|
106
|
+
800: "#1B5E62",
|
|
107
|
+
900: "#113C3E"
|
|
108
|
+
},
|
|
109
|
+
red: {
|
|
110
|
+
50: "#FEEAE9",
|
|
111
|
+
100: "#FBC5C1",
|
|
112
|
+
200: "#F8A09A",
|
|
113
|
+
300: "#F47C74",
|
|
114
|
+
400: "#EF584E",
|
|
115
|
+
500: "#EA3529",
|
|
116
|
+
600: "#C32A20",
|
|
117
|
+
700: "#9B2018",
|
|
118
|
+
800: "#731610",
|
|
119
|
+
900: "#490D09"
|
|
120
|
+
},
|
|
121
|
+
amber: {
|
|
122
|
+
50: "#FFF9E8",
|
|
123
|
+
100: "#FFEEBF",
|
|
124
|
+
200: "#FFE397",
|
|
125
|
+
300: "#FFD770",
|
|
126
|
+
400: "#FECB4A",
|
|
127
|
+
500: "#FBBF24",
|
|
128
|
+
600: "#D19F1C",
|
|
129
|
+
700: "#A67E14",
|
|
130
|
+
800: "#795C0D",
|
|
131
|
+
900: "#4D3B08"
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
// src/util/font.ts
|
|
136
|
+
import { kebabKeys } from "string-ts";
|
|
137
|
+
|
|
138
|
+
// src/types/fontSize.ts
|
|
139
|
+
function isDetailFont(value) {
|
|
140
|
+
return Array.isArray(value) && typeof value[1] === "object";
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// src/util/font.ts
|
|
144
|
+
var entries = Object.entries;
|
|
145
|
+
function fontConfigKeysKebabCase(fontConfig) {
|
|
146
|
+
const result = {};
|
|
147
|
+
for (const [key, value] of entries(fontConfig)) {
|
|
148
|
+
if (value) {
|
|
149
|
+
if (isDetailFont(value)) {
|
|
150
|
+
const [size, detail] = value;
|
|
151
|
+
const kebabDetail = kebabKeys(detail);
|
|
152
|
+
result[key] = [size, kebabDetail];
|
|
153
|
+
} else {
|
|
154
|
+
result[key] = value;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return result;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// src/theme/fontSize.ts
|
|
162
|
+
var fontSizes = {
|
|
163
|
+
"2xs": ["0.6875rem", "1rem"],
|
|
164
|
+
"xs": ["0.75rem", "1rem"],
|
|
165
|
+
"sm": ["0.875rem", "1.25rem"],
|
|
166
|
+
"base": ["1rem", "1.5rem"],
|
|
167
|
+
"lg": ["1.25rem", "1.625rem"],
|
|
168
|
+
"display1": ["3.75rem", {
|
|
169
|
+
fontWeight: 700,
|
|
170
|
+
lineHeight: "5rem",
|
|
171
|
+
letterSpacing: "-0.0625rem"
|
|
172
|
+
}],
|
|
173
|
+
"display2": ["3.25rem", {
|
|
174
|
+
fontWeight: 700,
|
|
175
|
+
lineHeight: "4.25rem",
|
|
176
|
+
letterSpacing: "-0.05rem"
|
|
177
|
+
}],
|
|
178
|
+
"display3": ["2.75rem", {
|
|
179
|
+
fontWeight: 700,
|
|
180
|
+
lineHeight: "3.625rem",
|
|
181
|
+
letterSpacing: "-0.0375rem"
|
|
182
|
+
}],
|
|
183
|
+
"h1": ["3rem", {
|
|
184
|
+
fontWeight: 700,
|
|
185
|
+
lineHeight: "3.75rem",
|
|
186
|
+
letterSpacing: "-0.0125rem"
|
|
187
|
+
}],
|
|
188
|
+
"h2": ["2.5rem", {
|
|
189
|
+
fontWeight: 700,
|
|
190
|
+
lineHeight: "3.25rem",
|
|
191
|
+
letterSpacing: "-0.0125rem"
|
|
192
|
+
}],
|
|
193
|
+
"h3": ["2.25rem", {
|
|
194
|
+
fontWeight: 700,
|
|
195
|
+
lineHeight: "3rem",
|
|
196
|
+
letterSpacing: "-0.0125rem"
|
|
197
|
+
}],
|
|
198
|
+
"h4": ["2rem", {
|
|
199
|
+
fontWeight: 700,
|
|
200
|
+
lineHeight: "2.625rem",
|
|
201
|
+
letterSpacing: "-0.0125rem"
|
|
202
|
+
}],
|
|
203
|
+
"h5": ["1.5rem", {
|
|
204
|
+
fontWeight: 700,
|
|
205
|
+
lineHeight: "2rem",
|
|
206
|
+
letterSpacing: "-0.0125rem"
|
|
207
|
+
}],
|
|
208
|
+
"h6": ["1.25rem", {
|
|
209
|
+
fontWeight: 700,
|
|
210
|
+
lineHeight: "1.625rem",
|
|
211
|
+
letterSpacing: "-0.0125rem"
|
|
212
|
+
}]
|
|
213
|
+
};
|
|
214
|
+
var unocssFontSizes = fontConfigKeysKebabCase(fontSizes);
|
|
215
|
+
|
|
216
|
+
// src/theme/shadows.ts
|
|
217
|
+
var shadows = {
|
|
218
|
+
"elevation-0": "0 0 0 0 rgba(0, 0, 0, 0.10)",
|
|
219
|
+
"elevation-1": "0 1px 2px 0 rgba(0, 0, 0, 0.10)",
|
|
220
|
+
"elevation-2": "0 4px 8px 0 rgba(0, 0, 0, 0.10)",
|
|
221
|
+
"elevation-3": "0 6px 12px 0 rgba(0, 0, 0, 0.10)",
|
|
222
|
+
"elevation-4": "0 8px 16px 0 rgba(0, 0, 0, 0.10)",
|
|
223
|
+
"elevation-5": "0 12px 24px 0 rgba(0, 0, 0, 0.10)"
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
// src/theme/fontFamily.ts
|
|
227
|
+
import { fontFamily } from "tailwindcss/defaultTheme";
|
|
228
|
+
var customFontFamily = {
|
|
229
|
+
sans: ["DM Sans", ...fontFamily.sans]
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
// src/theme/index.ts
|
|
233
|
+
var theme = {
|
|
234
|
+
colors,
|
|
235
|
+
boxShadow: shadows,
|
|
236
|
+
fontSize: fontSizes,
|
|
237
|
+
fontFamily: customFontFamily
|
|
238
|
+
};
|
|
239
|
+
var unocssTheme = {
|
|
240
|
+
colors,
|
|
241
|
+
boxShadow: shadows,
|
|
242
|
+
fontSize: unocssFontSizes
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
export {
|
|
246
|
+
colors,
|
|
247
|
+
fontSizes,
|
|
248
|
+
shadows,
|
|
249
|
+
customFontFamily,
|
|
250
|
+
theme,
|
|
251
|
+
unocssTheme
|
|
252
|
+
};
|
|
@@ -0,0 +1,329 @@
|
|
|
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 colors = {
|
|
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
|
+
primary: {
|
|
43
|
+
50: "#E8F1F6",
|
|
44
|
+
100: "#BED9E6",
|
|
45
|
+
200: "#95C0D5",
|
|
46
|
+
300: "#6CA7C3",
|
|
47
|
+
400: "#448DB1",
|
|
48
|
+
500: "#1C749F",
|
|
49
|
+
600: "#166085",
|
|
50
|
+
700: "#104C6A",
|
|
51
|
+
800: "#0B384E",
|
|
52
|
+
900: "#062432"
|
|
53
|
+
},
|
|
54
|
+
secondary: {
|
|
55
|
+
50: "#FFEFEF",
|
|
56
|
+
100: "#FFD3D2",
|
|
57
|
+
200: "#FFB7B5",
|
|
58
|
+
300: "#FF9B99",
|
|
59
|
+
400: "#FF807E",
|
|
60
|
+
500: "#FF6663",
|
|
61
|
+
600: "#D25350",
|
|
62
|
+
700: "#A6403E",
|
|
63
|
+
800: "#792E2C",
|
|
64
|
+
900: "#4D1C1B"
|
|
65
|
+
},
|
|
66
|
+
green: {
|
|
67
|
+
50: "#E7F7F1",
|
|
68
|
+
100: "#BCE7D7",
|
|
69
|
+
200: "#91D7BD",
|
|
70
|
+
300: "#67C7A3",
|
|
71
|
+
400: "#3EB688",
|
|
72
|
+
500: "#15A46E",
|
|
73
|
+
600: "#10895B",
|
|
74
|
+
700: "#0B6D48",
|
|
75
|
+
800: "#075035",
|
|
76
|
+
900: "#043322"
|
|
77
|
+
},
|
|
78
|
+
fuchsia: {
|
|
79
|
+
50: "#FAEBFD",
|
|
80
|
+
100: "#F0C7FA",
|
|
81
|
+
200: "#E6A3F6",
|
|
82
|
+
300: "#DB81F2",
|
|
83
|
+
400: "#D05FED",
|
|
84
|
+
500: "#C53DE7",
|
|
85
|
+
600: "#A431C0",
|
|
86
|
+
700: "#822599",
|
|
87
|
+
800: "#5F1A71",
|
|
88
|
+
900: "#3D1048"
|
|
89
|
+
},
|
|
90
|
+
indigo: {
|
|
91
|
+
50: "#EFF0FF",
|
|
92
|
+
100: "#D3D5FE",
|
|
93
|
+
200: "#B8BAFC",
|
|
94
|
+
300: "#9DA0FA",
|
|
95
|
+
400: "#8286F7",
|
|
96
|
+
500: "#686DF4",
|
|
97
|
+
600: "#5459CB",
|
|
98
|
+
700: "#4145A1",
|
|
99
|
+
800: "#2F3276",
|
|
100
|
+
900: "#1D1F4B"
|
|
101
|
+
},
|
|
102
|
+
neutral: {
|
|
103
|
+
50: "#F1F2F5",
|
|
104
|
+
100: "#EAEDF2",
|
|
105
|
+
200: "#E1E5EA",
|
|
106
|
+
300: "#D5DBE2",
|
|
107
|
+
400: "#CAD1D9",
|
|
108
|
+
500: "#BEC7D1",
|
|
109
|
+
600: "#9DA4AD",
|
|
110
|
+
700: "#7B8188",
|
|
111
|
+
800: "#5A5F64",
|
|
112
|
+
900: "#393C3F"
|
|
113
|
+
},
|
|
114
|
+
orange: {
|
|
115
|
+
50: "#FFF6EA",
|
|
116
|
+
100: "#FFE5C5",
|
|
117
|
+
200: "#FFD3A0",
|
|
118
|
+
300: "#FFC27C",
|
|
119
|
+
400: "#FFB159",
|
|
120
|
+
500: "#FFA037",
|
|
121
|
+
600: "#D2842B",
|
|
122
|
+
700: "#A66821",
|
|
123
|
+
800: "#794C17",
|
|
124
|
+
900: "#4D300E"
|
|
125
|
+
},
|
|
126
|
+
seafoam: {
|
|
127
|
+
50: "#EBFAFA",
|
|
128
|
+
100: "#C7EFF1",
|
|
129
|
+
200: "#A4E5E8",
|
|
130
|
+
300: "#82DADE",
|
|
131
|
+
400: "#60CED4",
|
|
132
|
+
500: "#3EC2C9",
|
|
133
|
+
600: "#32A1A7",
|
|
134
|
+
700: "#268085",
|
|
135
|
+
800: "#1B5E62",
|
|
136
|
+
900: "#113C3E"
|
|
137
|
+
},
|
|
138
|
+
red: {
|
|
139
|
+
50: "#FEEAE9",
|
|
140
|
+
100: "#FBC5C1",
|
|
141
|
+
200: "#F8A09A",
|
|
142
|
+
300: "#F47C74",
|
|
143
|
+
400: "#EF584E",
|
|
144
|
+
500: "#EA3529",
|
|
145
|
+
600: "#C32A20",
|
|
146
|
+
700: "#9B2018",
|
|
147
|
+
800: "#731610",
|
|
148
|
+
900: "#490D09"
|
|
149
|
+
},
|
|
150
|
+
amber: {
|
|
151
|
+
50: "#FFF9E8",
|
|
152
|
+
100: "#FFEEBF",
|
|
153
|
+
200: "#FFE397",
|
|
154
|
+
300: "#FFD770",
|
|
155
|
+
400: "#FECB4A",
|
|
156
|
+
500: "#FBBF24",
|
|
157
|
+
600: "#D19F1C",
|
|
158
|
+
700: "#A67E14",
|
|
159
|
+
800: "#795C0D",
|
|
160
|
+
900: "#4D3B08"
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
// src/util/font.ts
|
|
165
|
+
var import_string_ts = require("string-ts");
|
|
166
|
+
|
|
167
|
+
// src/types/fontSize.ts
|
|
168
|
+
function isDetailFont(value) {
|
|
169
|
+
return Array.isArray(value) && typeof value[1] === "object";
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// src/util/font.ts
|
|
173
|
+
var entries = Object.entries;
|
|
174
|
+
function fontConfigKeysKebabCase(fontConfig) {
|
|
175
|
+
const result = {};
|
|
176
|
+
for (const [key, value] of entries(fontConfig)) {
|
|
177
|
+
if (value) {
|
|
178
|
+
if (isDetailFont(value)) {
|
|
179
|
+
const [size, detail] = value;
|
|
180
|
+
const kebabDetail = (0, import_string_ts.kebabKeys)(detail);
|
|
181
|
+
result[key] = [size, kebabDetail];
|
|
182
|
+
} else {
|
|
183
|
+
result[key] = value;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return result;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// src/theme/fontSize.ts
|
|
191
|
+
var fontSizes = {
|
|
192
|
+
"2xs": ["0.6875rem", "1rem"],
|
|
193
|
+
"xs": ["0.75rem", "1rem"],
|
|
194
|
+
"sm": ["0.875rem", "1.25rem"],
|
|
195
|
+
"base": ["1rem", "1.5rem"],
|
|
196
|
+
"lg": ["1.25rem", "1.625rem"],
|
|
197
|
+
"display1": ["3.75rem", {
|
|
198
|
+
fontWeight: 700,
|
|
199
|
+
lineHeight: "5rem",
|
|
200
|
+
letterSpacing: "-0.0625rem"
|
|
201
|
+
}],
|
|
202
|
+
"display2": ["3.25rem", {
|
|
203
|
+
fontWeight: 700,
|
|
204
|
+
lineHeight: "4.25rem",
|
|
205
|
+
letterSpacing: "-0.05rem"
|
|
206
|
+
}],
|
|
207
|
+
"display3": ["2.75rem", {
|
|
208
|
+
fontWeight: 700,
|
|
209
|
+
lineHeight: "3.625rem",
|
|
210
|
+
letterSpacing: "-0.0375rem"
|
|
211
|
+
}],
|
|
212
|
+
"h1": ["3rem", {
|
|
213
|
+
fontWeight: 700,
|
|
214
|
+
lineHeight: "3.75rem",
|
|
215
|
+
letterSpacing: "-0.0125rem"
|
|
216
|
+
}],
|
|
217
|
+
"h2": ["2.5rem", {
|
|
218
|
+
fontWeight: 700,
|
|
219
|
+
lineHeight: "3.25rem",
|
|
220
|
+
letterSpacing: "-0.0125rem"
|
|
221
|
+
}],
|
|
222
|
+
"h3": ["2.25rem", {
|
|
223
|
+
fontWeight: 700,
|
|
224
|
+
lineHeight: "3rem",
|
|
225
|
+
letterSpacing: "-0.0125rem"
|
|
226
|
+
}],
|
|
227
|
+
"h4": ["2rem", {
|
|
228
|
+
fontWeight: 700,
|
|
229
|
+
lineHeight: "2.625rem",
|
|
230
|
+
letterSpacing: "-0.0125rem"
|
|
231
|
+
}],
|
|
232
|
+
"h5": ["1.5rem", {
|
|
233
|
+
fontWeight: 700,
|
|
234
|
+
lineHeight: "2rem",
|
|
235
|
+
letterSpacing: "-0.0125rem"
|
|
236
|
+
}],
|
|
237
|
+
"h6": ["1.25rem", {
|
|
238
|
+
fontWeight: 700,
|
|
239
|
+
lineHeight: "1.625rem",
|
|
240
|
+
letterSpacing: "-0.0125rem"
|
|
241
|
+
}]
|
|
242
|
+
};
|
|
243
|
+
var unocssFontSizes = fontConfigKeysKebabCase(fontSizes);
|
|
244
|
+
|
|
245
|
+
// src/theme/fontFamily.ts
|
|
246
|
+
var import_defaultTheme = require("tailwindcss/defaultTheme");
|
|
247
|
+
var customFontFamily = {
|
|
248
|
+
sans: ["DM Sans", ...import_defaultTheme.fontFamily.sans]
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// src/cli/src/theme/color.ts
|
|
252
|
+
var css = String.raw;
|
|
253
|
+
function generateColorVariables(filetype) {
|
|
254
|
+
let theme = css``;
|
|
255
|
+
for (const [key, value] of Object.entries(colors)) {
|
|
256
|
+
if (typeof value === "object") {
|
|
257
|
+
for (const [subKey, subValue] of Object.entries(value)) {
|
|
258
|
+
if (filetype === "tailwind" || filetype === "css") {
|
|
259
|
+
theme += css` --color-${key}-${subKey}: ${subValue};
|
|
260
|
+
`;
|
|
261
|
+
} else if (filetype === "scss") {
|
|
262
|
+
theme += css`$color-${key}-${subKey}: ${subValue};
|
|
263
|
+
`;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
} else {
|
|
267
|
+
if (filetype === "tailwind" || filetype === "css") {
|
|
268
|
+
theme += css` --color-${key}: ${value};
|
|
269
|
+
`;
|
|
270
|
+
} else if (filetype === "scss") {
|
|
271
|
+
theme += css`$color-${key}: ${value};
|
|
272
|
+
`;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
return theme;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// src/cli/src/css.ts
|
|
280
|
+
var css2 = String.raw;
|
|
281
|
+
function generateCssTheme() {
|
|
282
|
+
let theme = css2`*, *::before, *::after {
|
|
283
|
+
`;
|
|
284
|
+
theme += generateColorVariables("css");
|
|
285
|
+
return theme += css2`}`;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// src/cli/src/scss.ts
|
|
289
|
+
var css3 = String.raw;
|
|
290
|
+
function generateScssTheme() {
|
|
291
|
+
let theme = css3``;
|
|
292
|
+
theme += generateColorVariables("scss");
|
|
293
|
+
return theme;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
// src/cli/src/tailwind.ts
|
|
297
|
+
var css4 = String.raw;
|
|
298
|
+
function generateTailwindTheme(extend) {
|
|
299
|
+
let theme = css4`@import "tailwindcss";
|
|
300
|
+
@theme {
|
|
301
|
+
`;
|
|
302
|
+
if (!extend) {
|
|
303
|
+
theme += css4` --color-*: initial;
|
|
304
|
+
`;
|
|
305
|
+
}
|
|
306
|
+
theme += generateColorVariables("tailwind");
|
|
307
|
+
return theme += css4`}`;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// src/cli/src/utils/log.ts
|
|
311
|
+
function log(...args) {
|
|
312
|
+
console.log(...args);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// src/cli/index.ts
|
|
316
|
+
var filetypes = ["tailwind", "css", "scss"];
|
|
317
|
+
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();
|
|
318
|
+
if (argv.filetype === "tailwind") {
|
|
319
|
+
const theme = generateTailwindTheme(argv.extend);
|
|
320
|
+
log(theme);
|
|
321
|
+
}
|
|
322
|
+
if (argv.filetype === "css") {
|
|
323
|
+
const theme = generateCssTheme();
|
|
324
|
+
log(theme);
|
|
325
|
+
}
|
|
326
|
+
if (argv.filetype === "scss") {
|
|
327
|
+
const theme = generateScssTheme();
|
|
328
|
+
log(theme);
|
|
329
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colors
|
|
3
|
+
} from "../chunk-A4JTRVFS.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
|
+
}
|