@unocss/preset-uno 0.14.1 → 0.15.1

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.
@@ -1,340 +0,0 @@
1
- // src/theme/colors.ts
2
- var colors = {
3
- inherit: "inherit",
4
- current: "currentColor",
5
- transparent: "transparent",
6
- black: "#000",
7
- white: "#fff",
8
- rose: {
9
- 50: "#fff1f2",
10
- 100: "#ffe4e6",
11
- 200: "#fecdd3",
12
- 300: "#fda4af",
13
- 400: "#fb7185",
14
- 500: "#f43f5e",
15
- 600: "#e11d48",
16
- 700: "#be123c",
17
- 800: "#9f1239",
18
- 900: "#881337"
19
- },
20
- pink: {
21
- 50: "#fdf2f8",
22
- 100: "#fce7f3",
23
- 200: "#fbcfe8",
24
- 300: "#f9a8d4",
25
- 400: "#f472b6",
26
- 500: "#ec4899",
27
- 600: "#db2777",
28
- 700: "#be185d",
29
- 800: "#9d174d",
30
- 900: "#831843"
31
- },
32
- fuchsia: {
33
- 50: "#fdf4ff",
34
- 100: "#fae8ff",
35
- 200: "#f5d0fe",
36
- 300: "#f0abfc",
37
- 400: "#e879f9",
38
- 500: "#d946ef",
39
- 600: "#c026d3",
40
- 700: "#a21caf",
41
- 800: "#86198f",
42
- 900: "#701a75"
43
- },
44
- purple: {
45
- 50: "#faf5ff",
46
- 100: "#f3e8ff",
47
- 200: "#e9d5ff",
48
- 300: "#d8b4fe",
49
- 400: "#c084fc",
50
- 500: "#a855f7",
51
- 600: "#9333ea",
52
- 700: "#7e22ce",
53
- 800: "#6b21a8",
54
- 900: "#581c87"
55
- },
56
- violet: {
57
- 50: "#f5f3ff",
58
- 100: "#ede9fe",
59
- 200: "#ddd6fe",
60
- 300: "#c4b5fd",
61
- 400: "#a78bfa",
62
- 500: "#8b5cf6",
63
- 600: "#7c3aed",
64
- 700: "#6d28d9",
65
- 800: "#5b21b6",
66
- 900: "#4c1d95"
67
- },
68
- indigo: {
69
- 50: "#eef2ff",
70
- 100: "#e0e7ff",
71
- 200: "#c7d2fe",
72
- 300: "#a5b4fc",
73
- 400: "#818cf8",
74
- 500: "#6366f1",
75
- 600: "#4f46e5",
76
- 700: "#4338ca",
77
- 800: "#3730a3",
78
- 900: "#312e81"
79
- },
80
- blue: {
81
- 50: "#eff6ff",
82
- 100: "#dbeafe",
83
- 200: "#bfdbfe",
84
- 300: "#93c5fd",
85
- 400: "#60a5fa",
86
- 500: "#3b82f6",
87
- 600: "#2563eb",
88
- 700: "#1d4ed8",
89
- 800: "#1e40af",
90
- 900: "#1e3a8a"
91
- },
92
- sky: {
93
- 50: "#f0f9ff",
94
- 100: "#e0f2fe",
95
- 200: "#bae6fd",
96
- 300: "#7dd3fc",
97
- 400: "#38bdf8",
98
- 500: "#0ea5e9",
99
- 600: "#0284c7",
100
- 700: "#0369a1",
101
- 800: "#075985",
102
- 900: "#0c4a6e"
103
- },
104
- cyan: {
105
- 50: "#ecfeff",
106
- 100: "#cffafe",
107
- 200: "#a5f3fc",
108
- 300: "#67e8f9",
109
- 400: "#22d3ee",
110
- 500: "#06b6d4",
111
- 600: "#0891b2",
112
- 700: "#0e7490",
113
- 800: "#155e75",
114
- 900: "#164e63"
115
- },
116
- teal: {
117
- 50: "#f0fdfa",
118
- 100: "#ccfbf1",
119
- 200: "#99f6e4",
120
- 300: "#5eead4",
121
- 400: "#2dd4bf",
122
- 500: "#14b8a6",
123
- 600: "#0d9488",
124
- 700: "#0f766e",
125
- 800: "#115e59",
126
- 900: "#134e4a"
127
- },
128
- emerald: {
129
- 50: "#ecfdf5",
130
- 100: "#d1fae5",
131
- 200: "#a7f3d0",
132
- 300: "#6ee7b7",
133
- 400: "#34d399",
134
- 500: "#10b981",
135
- 600: "#059669",
136
- 700: "#047857",
137
- 800: "#065f46",
138
- 900: "#064e3b"
139
- },
140
- green: {
141
- 50: "#f0fdf4",
142
- 100: "#dcfce7",
143
- 200: "#bbf7d0",
144
- 300: "#86efac",
145
- 400: "#4ade80",
146
- 500: "#22c55e",
147
- 600: "#16a34a",
148
- 700: "#15803d",
149
- 800: "#166534",
150
- 900: "#14532d"
151
- },
152
- lime: {
153
- 50: "#f7fee7",
154
- 100: "#ecfccb",
155
- 200: "#d9f99d",
156
- 300: "#bef264",
157
- 400: "#a3e635",
158
- 500: "#84cc16",
159
- 600: "#65a30d",
160
- 700: "#4d7c0f",
161
- 800: "#3f6212",
162
- 900: "#365314"
163
- },
164
- yellow: {
165
- 50: "#fefce8",
166
- 100: "#fef9c3",
167
- 200: "#fef08a",
168
- 300: "#fde047",
169
- 400: "#facc15",
170
- 500: "#eab308",
171
- 600: "#ca8a04",
172
- 700: "#a16207",
173
- 800: "#854d0e",
174
- 900: "#713f12"
175
- },
176
- amber: {
177
- 50: "#fffbeb",
178
- 100: "#fef3c7",
179
- 200: "#fde68a",
180
- 300: "#fcd34d",
181
- 400: "#fbbf24",
182
- 500: "#f59e0b",
183
- 600: "#d97706",
184
- 700: "#b45309",
185
- 800: "#92400e",
186
- 900: "#78350f"
187
- },
188
- orange: {
189
- 50: "#fff7ed",
190
- 100: "#ffedd5",
191
- 200: "#fed7aa",
192
- 300: "#fdba74",
193
- 400: "#fb923c",
194
- 500: "#f97316",
195
- 600: "#ea580c",
196
- 700: "#c2410c",
197
- 800: "#9a3412",
198
- 900: "#7c2d12"
199
- },
200
- red: {
201
- 50: "#fef2f2",
202
- 100: "#fee2e2",
203
- 200: "#fecaca",
204
- 300: "#fca5a5",
205
- 400: "#f87171",
206
- 500: "#ef4444",
207
- 600: "#dc2626",
208
- 700: "#b91c1c",
209
- 800: "#991b1b",
210
- 900: "#7f1d1d"
211
- },
212
- gray: {
213
- 50: "#f9fafb",
214
- 100: "#f3f4f6",
215
- 200: "#e5e7eb",
216
- 300: "#d1d5db",
217
- 400: "#9ca3af",
218
- 500: "#6b7280",
219
- 600: "#4b5563",
220
- 700: "#374151",
221
- 800: "#1f2937",
222
- 900: "#111827"
223
- },
224
- slate: {
225
- 50: "#f8fafc",
226
- 100: "#f1f5f9",
227
- 200: "#e2e8f0",
228
- 300: "#cbd5e1",
229
- 400: "#94a3b8",
230
- 500: "#64748b",
231
- 600: "#475569",
232
- 700: "#334155",
233
- 800: "#1e293b",
234
- 900: "#0f172a"
235
- },
236
- zinc: {
237
- 50: "#fafafa",
238
- 100: "#f4f4f5",
239
- 200: "#e4e4e7",
240
- 300: "#d4d4d8",
241
- 400: "#a1a1aa",
242
- 500: "#71717a",
243
- 600: "#52525b",
244
- 700: "#3f3f46",
245
- 800: "#27272a",
246
- 900: "#18181b"
247
- },
248
- neutral: {
249
- 50: "#fafafa",
250
- 100: "#f5f5f5",
251
- 200: "#e5e5e5",
252
- 300: "#d4d4d4",
253
- 400: "#a3a3a3",
254
- 500: "#737373",
255
- 600: "#525252",
256
- 700: "#404040",
257
- 800: "#262626",
258
- 900: "#171717"
259
- },
260
- stone: {
261
- 50: "#fafaf9",
262
- 100: "#f5f5f4",
263
- 200: "#e7e5e4",
264
- 300: "#d6d3d1",
265
- 400: "#a8a29e",
266
- 500: "#78716c",
267
- 600: "#57534e",
268
- 700: "#44403c",
269
- 800: "#292524",
270
- 900: "#1c1917"
271
- },
272
- light: {
273
- 50: "#fdfdfd",
274
- 100: "#fcfcfc",
275
- 200: "#fafafa",
276
- 300: "#f8f9fa",
277
- 400: "#f6f6f6",
278
- 500: "#f2f2f2",
279
- 600: "#f1f3f5",
280
- 700: "#e9ecef",
281
- 800: "#dee2e6",
282
- 900: "#dde1e3"
283
- },
284
- dark: {
285
- 50: "#4a4a4a",
286
- 100: "#3c3c3c",
287
- 200: "#323232",
288
- 300: "#2d2d2d",
289
- 400: "#222222",
290
- 500: "#1f1f1f",
291
- 600: "#1c1c1e",
292
- 700: "#1b1b1b",
293
- 800: "#181818",
294
- 900: "#0f0f0f"
295
- },
296
- get lightblue() {
297
- return this.sky;
298
- },
299
- get lightBlue() {
300
- return this.sky;
301
- },
302
- get warmgray() {
303
- return this.stone;
304
- },
305
- get warmGray() {
306
- return this.stone;
307
- },
308
- get truegray() {
309
- return this.neutral;
310
- },
311
- get trueGray() {
312
- return this.neutral;
313
- },
314
- get coolgray() {
315
- return this.gray;
316
- },
317
- get coolGray() {
318
- return this.gray;
319
- },
320
- get bluegray() {
321
- return this.slate;
322
- },
323
- get blueGray() {
324
- return this.slate;
325
- }
326
- };
327
- Object.values(colors).forEach((color) => {
328
- if (typeof color !== "string") {
329
- color.DEFAULT = color.DEFAULT || color[400];
330
- Object.keys(color).forEach((key) => {
331
- const short = +key / 100;
332
- if (short === Math.round(short))
333
- color[short] = color[key];
334
- });
335
- }
336
- });
337
-
338
- export {
339
- colors
340
- };
@@ -1,11 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty;
2
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
3
- var __export = (target, all) => {
4
- __markAsModule(target);
5
- for (var name in all)
6
- __defProp(target, name, { get: all[name], enumerable: true });
7
- };
8
-
9
-
10
-
11
- exports.__export = __export;
@@ -1,234 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkLPZDYB4Jjs = require('./chunk-LPZDYB4J.js');
4
-
5
- // src/variants/breakpoints.ts
6
- var regexCache = {};
7
- var variantBreakpoints = (matcher, _, theme) => {
8
- const variantEntries = Object.entries(theme.breakpoints || {}).map(([point, size], idx) => [point, size, idx]);
9
- for (const [point, size, idx] of variantEntries) {
10
- if (!regexCache[point])
11
- regexCache[point] = new RegExp(`^((?:[a|l]t-)?${point}[:-])`);
12
- const match = matcher.match(regexCache[point]);
13
- if (!match)
14
- continue;
15
- const [, pre] = match;
16
- let direction = "min";
17
- let order = parseInt(size);
18
- if (pre.startsWith("lt-")) {
19
- direction = "max";
20
- order = -order;
21
- }
22
- const m = matcher.slice(pre.length);
23
- if (m === "container")
24
- continue;
25
- if (pre.startsWith("at-") && idx < variantEntries.length - 1) {
26
- return {
27
- matcher: m,
28
- parent: [`@media (min-width: ${size}) and (max-width: ${variantEntries[idx + 1][1]})`, order]
29
- };
30
- }
31
- return {
32
- matcher: m,
33
- parent: [`@media (${direction}-width: ${size})`, order]
34
- };
35
- }
36
- };
37
-
38
- // src/variants/children.ts
39
- var variantChildren = [
40
- _chunkLPZDYB4Jjs.variantMatcher.call(void 0, "children", (input) => `${input} > *`),
41
- _chunkLPZDYB4Jjs.variantMatcher.call(void 0, "all", (input) => `${input} *`),
42
- _chunkLPZDYB4Jjs.variantMatcher.call(void 0, "next", (input) => `${input}+*`)
43
- ];
44
-
45
- // src/variants/dark.ts
46
- var variantColorsClass = [
47
- _chunkLPZDYB4Jjs.variantMatcher.call(void 0, "dark", (input) => `.dark $$ ${input}`),
48
- _chunkLPZDYB4Jjs.variantMatcher.call(void 0, "light", (input) => `.light $$ ${input}`)
49
- ];
50
- var variantColorsMedia = [
51
- (v) => {
52
- const dark = _chunkLPZDYB4Jjs.variantMatcher.call(void 0, "dark")(v);
53
- if (dark) {
54
- return {
55
- ...dark,
56
- parent: "@media (prefers-color-scheme: dark)"
57
- };
58
- }
59
- const light = _chunkLPZDYB4Jjs.variantMatcher.call(void 0, "light")(v);
60
- if (light) {
61
- return {
62
- ...light,
63
- parent: "@media (prefers-color-scheme: light)"
64
- };
65
- }
66
- }
67
- ];
68
-
69
- // src/variants/misc.ts
70
- var variantImportant = {
71
- match(matcher) {
72
- if (matcher.startsWith("!")) {
73
- return {
74
- matcher: matcher.slice(1),
75
- body: (body) => {
76
- body.forEach((v) => {
77
- if (v[1])
78
- v[1] += " !important";
79
- });
80
- return body;
81
- }
82
- };
83
- }
84
- }
85
- };
86
- var variantNegative = {
87
- match(matcher) {
88
- if (matcher.startsWith("-")) {
89
- return {
90
- matcher: matcher.slice(1),
91
- body: (body) => {
92
- body.forEach((v) => {
93
- var _a, _b;
94
- if (v[0].startsWith("--un-scale") || ((_a = v[1]) == null ? void 0 : _a.toString()) === "0")
95
- return;
96
- v[1] = (_b = v[1]) == null ? void 0 : _b.toString().replace(/[0-9.]+(?:[a-z]+|%)?/, (i) => `-${i}`);
97
- });
98
- return body;
99
- }
100
- };
101
- }
102
- }
103
- };
104
- var variantSpace = (matcher) => {
105
- if (/^space-?([xy])-?(-?.+)$/.test(matcher) || /^divide-/.test(matcher)) {
106
- return {
107
- matcher,
108
- selector: (input) => {
109
- return `${input}>:not([hidden])~:not([hidden])`;
110
- }
111
- };
112
- }
113
- };
114
-
115
- // src/variants/pseudo.ts
116
- var _core = require('@unocss/core');
117
- var PseudoClasses = Object.fromEntries([
118
- "active",
119
- "checked",
120
- "default",
121
- "empty",
122
- "enabled",
123
- "disabled",
124
- "first-of-type",
125
- ["first", "first-child"],
126
- "focus-visible",
127
- "focus-within",
128
- "focus",
129
- "hover",
130
- "indeterminate",
131
- "invalid",
132
- "last-of-type",
133
- ["last", "last-child"],
134
- "link",
135
- "only-child",
136
- "only-of-type",
137
- "optional",
138
- "placeholder-shown",
139
- "read-only",
140
- "read-write",
141
- "required",
142
- "root",
143
- "target",
144
- "valid",
145
- "visited",
146
- ["even-of-type", "nth-of-type(even)"],
147
- ["even", "nth-child(even)"],
148
- ["odd-of-type", "nth-of-type(odd)"],
149
- ["odd", "nth-child(odd)"]
150
- ].map(_core.toArray));
151
- var PseudoElements = [
152
- "before",
153
- "after",
154
- "first-letter",
155
- "first-line",
156
- "selection"
157
- ];
158
- var PseudoElementsRE = new RegExp(`^(${PseudoElements.join("|")})[:-]`);
159
- var PseudoClassesStr = Object.keys(PseudoClasses).join("|");
160
- var PseudoClassesRE = new RegExp(`^(${PseudoClassesStr})[:-]`);
161
- var PseudoClassesNotRE = new RegExp(`^not-(${PseudoClassesStr})[:-]`);
162
- var PseudoClassesGroupRE = new RegExp(`^group-(${PseudoClassesStr})[:-]`);
163
- var PseudoClassesPeerRE = new RegExp(`^peer-(${PseudoClassesStr})[:-]`);
164
- var variantPseudoElements = (input) => {
165
- const match = input.match(PseudoElementsRE);
166
- if (match) {
167
- return {
168
- matcher: input.slice(match[1].length + 1),
169
- selector: (input2) => `${input2}::${match[1]}`
170
- };
171
- }
172
- };
173
- var variantPseudoClasses = {
174
- match: (input) => {
175
- let match = input.match(PseudoClassesRE);
176
- if (match) {
177
- const pseudo = PseudoClasses[match[1]] || match[1];
178
- return {
179
- matcher: input.slice(match[1].length + 1),
180
- selector: (input2) => `${input2}:${pseudo}`
181
- };
182
- }
183
- match = input.match(PseudoClassesNotRE);
184
- if (match) {
185
- const pseudo = PseudoClasses[match[1]] || match[1];
186
- return {
187
- matcher: input.slice(match[1].length + 5),
188
- selector: (input2) => `${input2}:not(:${pseudo})`
189
- };
190
- }
191
- match = input.match(PseudoClassesGroupRE);
192
- if (match) {
193
- const pseudo = PseudoClasses[match[1]] || match[1];
194
- return {
195
- matcher: input.slice(match[1].length + 7),
196
- selector: (s) => s.includes(".group:") ? s.replace(/\.group:/, `.group:${pseudo}:`) : `.group:${pseudo} ${s}`
197
- };
198
- }
199
- match = input.match(PseudoClassesPeerRE);
200
- if (match) {
201
- const pseudo = PseudoClasses[match[1]] || match[1];
202
- return {
203
- matcher: input.slice(match[1].length + 6),
204
- selector: (s) => s.includes(".peer:") ? s.replace(/\.peer:/, `.peer:${pseudo}:`) : `.peer:${pseudo} ~ ${s}`
205
- };
206
- }
207
- },
208
- multiPass: true
209
- };
210
-
211
- // src/variants/default.ts
212
- var variants = [
213
- variantSpace,
214
- variantNegative,
215
- variantImportant,
216
- variantBreakpoints,
217
- ...variantChildren,
218
- variantPseudoClasses,
219
- variantPseudoElements
220
- ];
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
- exports.variantBreakpoints = variantBreakpoints; exports.variantChildren = variantChildren; exports.variantColorsClass = variantColorsClass; exports.variantColorsMedia = variantColorsMedia; exports.variantImportant = variantImportant; exports.variantNegative = variantNegative; exports.variantSpace = variantSpace; exports.PseudoClasses = PseudoClasses; exports.variantPseudoElements = variantPseudoElements; exports.variantPseudoClasses = variantPseudoClasses; exports.variants = variants;
@@ -1,5 +0,0 @@
1
- import { T as Theme } from './types-7963d0b3';
2
-
3
- declare const colors: Theme['colors'];
4
-
5
- export { colors as c };
package/dist/colors.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunk7O4GGKN3js = require('./chunk-7O4GGKN3.js');
4
- require('./chunk-Y6EUTGDC.js');
5
-
6
-
7
- exports.colors = _chunk7O4GGKN3js.colors;
@@ -1,5 +0,0 @@
1
- import { T as Theme } from './types-7963d0b3';
2
-
3
- declare const theme: Theme;
4
-
5
- export { theme as t };
package/dist/index.js DELETED
@@ -1,39 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
- var _chunk2BHDQQCRjs = require('./chunk-2BHDQQCR.js');
5
-
6
-
7
- var _chunkBOWXQI3Bjs = require('./chunk-BOWXQI3B.js');
8
-
9
-
10
- var _chunk7O4GGKN3js = require('./chunk-7O4GGKN3.js');
11
-
12
-
13
-
14
-
15
- var _chunkZSX2GKSHjs = require('./chunk-ZSX2GKSH.js');
16
- require('./chunk-LPZDYB4J.js');
17
- require('./chunk-Y6EUTGDC.js');
18
-
19
- // src/index.ts
20
- var preset = (options = {}) => ({
21
- name: "@unocss/preset-uno",
22
- theme: _chunkBOWXQI3Bjs.theme,
23
- rules: _chunk2BHDQQCRjs.rules,
24
- variants: [
25
- ..._chunkZSX2GKSHjs.variants,
26
- ...options.dark === "media" ? _chunkZSX2GKSHjs.variantColorsMedia : _chunkZSX2GKSHjs.variantColorsClass
27
- ],
28
- shortcuts: [
29
- ..._chunk2BHDQQCRjs.containerShortcuts
30
- ],
31
- options
32
- });
33
- var src_default = preset;
34
-
35
-
36
-
37
-
38
-
39
- exports.colors = _chunk7O4GGKN3js.colors; exports.default = src_default; exports.preset = preset; exports.theme = _chunkBOWXQI3Bjs.theme;