@unocss/preset-mini 0.15.5 → 0.15.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/default2.cjs +5 -0
- package/dist/chunks/default2.mjs +5 -0
- package/dist/chunks/index.cjs +7 -39
- package/dist/chunks/index.mjs +6 -30
- package/dist/utils.cjs +3 -10
- package/dist/utils.d.ts +4 -12
- package/dist/utils.mjs +2 -1
- package/package.json +2 -2
package/dist/chunks/default2.cjs
CHANGED
package/dist/chunks/default2.mjs
CHANGED
package/dist/chunks/index.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const core = require('@unocss/core');
|
|
4
|
+
|
|
3
5
|
const directionMap = {
|
|
4
6
|
"l": ["-left"],
|
|
5
7
|
"r": ["-right"],
|
|
@@ -111,7 +113,7 @@ function global(str) {
|
|
|
111
113
|
return str;
|
|
112
114
|
}
|
|
113
115
|
|
|
114
|
-
const
|
|
116
|
+
const valueHandlers = {
|
|
115
117
|
__proto__: null,
|
|
116
118
|
rem: rem,
|
|
117
119
|
px: px,
|
|
@@ -124,51 +126,17 @@ const handlers = {
|
|
|
124
126
|
global: global
|
|
125
127
|
};
|
|
126
128
|
|
|
127
|
-
const
|
|
128
|
-
const
|
|
129
|
-
const s = this.__options?.sequence || [];
|
|
130
|
-
this.__options.sequence = [];
|
|
131
|
-
for (const n of s) {
|
|
132
|
-
const res = handlers[n](str);
|
|
133
|
-
if (res != null)
|
|
134
|
-
return res;
|
|
135
|
-
}
|
|
136
|
-
return void 0;
|
|
137
|
-
};
|
|
138
|
-
function addProcessor(that, name) {
|
|
139
|
-
if (!that.__options) {
|
|
140
|
-
that.__options = {
|
|
141
|
-
sequence: []
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
that.__options.sequence.push(name);
|
|
145
|
-
return that;
|
|
146
|
-
}
|
|
147
|
-
handlersNames.forEach((i) => {
|
|
148
|
-
Object.defineProperty(handler, i, {
|
|
149
|
-
enumerable: true,
|
|
150
|
-
get() {
|
|
151
|
-
return addProcessor(this, i);
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
});
|
|
129
|
+
const handler = core.createValueHandler(valueHandlers);
|
|
130
|
+
const h = handler;
|
|
155
131
|
|
|
156
132
|
function capitalize(str) {
|
|
157
133
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
158
134
|
}
|
|
159
135
|
|
|
160
|
-
exports.bracket = bracket;
|
|
161
136
|
exports.capitalize = capitalize;
|
|
162
137
|
exports.cornerMap = cornerMap;
|
|
163
|
-
exports.cssvar = cssvar;
|
|
164
138
|
exports.directionMap = directionMap;
|
|
165
|
-
exports.
|
|
166
|
-
exports.global = global;
|
|
139
|
+
exports.h = h;
|
|
167
140
|
exports.handler = handler;
|
|
168
|
-
exports.
|
|
169
|
-
exports.number = number;
|
|
170
|
-
exports.percent = percent;
|
|
171
|
-
exports.px = px;
|
|
172
|
-
exports.rem = rem;
|
|
173
|
-
exports.time = time;
|
|
141
|
+
exports.valueHandlers = valueHandlers;
|
|
174
142
|
exports.xyzMap = xyzMap;
|
package/dist/chunks/index.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { createValueHandler } from '@unocss/core';
|
|
2
|
+
|
|
1
3
|
const directionMap = {
|
|
2
4
|
"l": ["-left"],
|
|
3
5
|
"r": ["-right"],
|
|
@@ -109,7 +111,7 @@ function global(str) {
|
|
|
109
111
|
return str;
|
|
110
112
|
}
|
|
111
113
|
|
|
112
|
-
const
|
|
114
|
+
const valueHandlers = {
|
|
113
115
|
__proto__: null,
|
|
114
116
|
rem: rem,
|
|
115
117
|
px: px,
|
|
@@ -122,37 +124,11 @@ const handlers = {
|
|
|
122
124
|
global: global
|
|
123
125
|
};
|
|
124
126
|
|
|
125
|
-
const
|
|
126
|
-
const
|
|
127
|
-
const s = this.__options?.sequence || [];
|
|
128
|
-
this.__options.sequence = [];
|
|
129
|
-
for (const n of s) {
|
|
130
|
-
const res = handlers[n](str);
|
|
131
|
-
if (res != null)
|
|
132
|
-
return res;
|
|
133
|
-
}
|
|
134
|
-
return void 0;
|
|
135
|
-
};
|
|
136
|
-
function addProcessor(that, name) {
|
|
137
|
-
if (!that.__options) {
|
|
138
|
-
that.__options = {
|
|
139
|
-
sequence: []
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
that.__options.sequence.push(name);
|
|
143
|
-
return that;
|
|
144
|
-
}
|
|
145
|
-
handlersNames.forEach((i) => {
|
|
146
|
-
Object.defineProperty(handler, i, {
|
|
147
|
-
enumerable: true,
|
|
148
|
-
get() {
|
|
149
|
-
return addProcessor(this, i);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
});
|
|
127
|
+
const handler = createValueHandler(valueHandlers);
|
|
128
|
+
const h = handler;
|
|
153
129
|
|
|
154
130
|
function capitalize(str) {
|
|
155
131
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
156
132
|
}
|
|
157
133
|
|
|
158
|
-
export { capitalize as a,
|
|
134
|
+
export { capitalize as a, h as b, cornerMap as c, directionMap as d, handler as h, valueHandlers as v, xyzMap as x };
|
package/dist/utils.cjs
CHANGED
|
@@ -4,22 +4,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./chunks/index.cjs');
|
|
6
6
|
const variants = require('./chunks/variants.cjs');
|
|
7
|
+
require('@unocss/core');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
10
|
-
exports.bracket = index.bracket;
|
|
11
11
|
exports.capitalize = index.capitalize;
|
|
12
12
|
exports.cornerMap = index.cornerMap;
|
|
13
|
-
exports.cssvar = index.cssvar;
|
|
14
13
|
exports.directionMap = index.directionMap;
|
|
15
|
-
exports.
|
|
16
|
-
exports.global = index.global;
|
|
14
|
+
exports.h = index.h;
|
|
17
15
|
exports.handler = index.handler;
|
|
18
|
-
exports.
|
|
19
|
-
exports.number = index.number;
|
|
20
|
-
exports.percent = index.percent;
|
|
21
|
-
exports.px = index.px;
|
|
22
|
-
exports.rem = index.rem;
|
|
23
|
-
exports.time = index.time;
|
|
16
|
+
exports.valueHandlers = index.valueHandlers;
|
|
24
17
|
exports.xyzMap = index.xyzMap;
|
|
25
18
|
exports.variantMatcher = variants.variantMatcher;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _unocss_core from '@unocss/core';
|
|
1
2
|
import { VariantHandler } from '@unocss/core';
|
|
2
3
|
|
|
3
4
|
declare const directionMap: Record<string, string[]>;
|
|
@@ -37,20 +38,11 @@ declare namespace handlers {
|
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
declare
|
|
41
|
-
declare const
|
|
42
|
-
declare type Handler = {
|
|
43
|
-
[K in HandlerName]: Handler;
|
|
44
|
-
} & {
|
|
45
|
-
(str: string): string | undefined;
|
|
46
|
-
__options: {
|
|
47
|
-
sequence: HandlerName[];
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
declare const handler: Handler;
|
|
41
|
+
declare const handler: _unocss_core.ValueHandler<"number" | "rem" | "px" | "percent" | "fraction" | "bracket" | "cssvar" | "time" | "global">;
|
|
42
|
+
declare const h: _unocss_core.ValueHandler<"number" | "rem" | "px" | "percent" | "fraction" | "bracket" | "cssvar" | "time" | "global">;
|
|
51
43
|
|
|
52
44
|
declare const variantMatcher: (name: string, selector?: ((input: string) => string | undefined) | undefined) => (input: string) => VariantHandler | undefined;
|
|
53
45
|
|
|
54
46
|
declare function capitalize<T extends string>(str: T): Capitalize<T>;
|
|
55
47
|
|
|
56
|
-
export {
|
|
48
|
+
export { capitalize, cornerMap, directionMap, h, handler, handlers as valueHandlers, variantMatcher, xyzMap };
|
package/dist/utils.mjs
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a as capitalize, c as cornerMap, d as directionMap, b as h, h as handler, v as valueHandlers, x as xyzMap } from './chunks/index.mjs';
|
|
2
2
|
export { v as variantMatcher } from './chunks/variants.mjs';
|
|
3
|
+
import '@unocss/core';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.6",
|
|
4
4
|
"description": "The minimal preset for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"*.css"
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@unocss/core": "0.15.
|
|
64
|
+
"@unocss/core": "0.15.6"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "unbuild",
|