@unocss/inspector 0.55.1 → 0.55.2
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/index.cjs +17 -12
- package/dist/index.d.cts +6 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.mjs +13 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6,10 +6,10 @@ const sirv = require('sirv');
|
|
|
6
6
|
const core = require('@unocss/core');
|
|
7
7
|
const gzipSize = require('gzip-size');
|
|
8
8
|
|
|
9
|
-
function
|
|
9
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
10
10
|
|
|
11
|
-
const sirv__default = /*#__PURE__*/
|
|
12
|
-
const gzipSize__default = /*#__PURE__*/
|
|
11
|
+
const sirv__default = /*#__PURE__*/_interopDefaultCompat(sirv);
|
|
12
|
+
const gzipSize__default = /*#__PURE__*/_interopDefaultCompat(gzipSize);
|
|
13
13
|
|
|
14
14
|
const SKIP_START_COMMENT = "@unocss-skip-start";
|
|
15
15
|
const SKIP_END_COMMENT = "@unocss-skip-end";
|
|
@@ -57,6 +57,7 @@ const numberRE = /^(-?\d*(?:\.\d+)?)$/i;
|
|
|
57
57
|
const unitOnlyRE = /^(px)$/i;
|
|
58
58
|
|
|
59
59
|
const cssProps = [
|
|
60
|
+
// basic props
|
|
60
61
|
"color",
|
|
61
62
|
"border-color",
|
|
62
63
|
"background-color",
|
|
@@ -74,12 +75,14 @@ const cssProps = [
|
|
|
74
75
|
"text-shadow",
|
|
75
76
|
"transform",
|
|
76
77
|
"box-shadow",
|
|
78
|
+
// positions
|
|
77
79
|
"background-position",
|
|
78
80
|
"left",
|
|
79
81
|
"right",
|
|
80
82
|
"top",
|
|
81
83
|
"bottom",
|
|
82
84
|
"object-position",
|
|
85
|
+
// sizes
|
|
83
86
|
"max-height",
|
|
84
87
|
"min-height",
|
|
85
88
|
"max-width",
|
|
@@ -98,6 +101,7 @@ const cssProps = [
|
|
|
98
101
|
"border-spacing",
|
|
99
102
|
"letter-spacing",
|
|
100
103
|
"word-spacing",
|
|
104
|
+
// enhances
|
|
101
105
|
"stroke",
|
|
102
106
|
"filter",
|
|
103
107
|
"backdrop-filter",
|
|
@@ -281,23 +285,23 @@ function position(str) {
|
|
|
281
285
|
|
|
282
286
|
const valueHandlers = {
|
|
283
287
|
__proto__: null,
|
|
284
|
-
numberWithUnit: numberWithUnit,
|
|
285
288
|
auto: auto,
|
|
286
|
-
rem: rem,
|
|
287
|
-
px: px,
|
|
288
|
-
number: number,
|
|
289
|
-
percent: percent,
|
|
290
|
-
fraction: fraction,
|
|
291
289
|
bracket: bracket,
|
|
292
290
|
bracketOfColor: bracketOfColor,
|
|
293
291
|
bracketOfLength: bracketOfLength,
|
|
294
292
|
bracketOfPosition: bracketOfPosition,
|
|
295
293
|
cssvar: cssvar,
|
|
296
|
-
time: time,
|
|
297
294
|
degree: degree,
|
|
295
|
+
fraction: fraction,
|
|
298
296
|
global: global,
|
|
297
|
+
number: number,
|
|
298
|
+
numberWithUnit: numberWithUnit,
|
|
299
|
+
percent: percent,
|
|
300
|
+
position: position,
|
|
299
301
|
properties: properties,
|
|
300
|
-
|
|
302
|
+
px: px,
|
|
303
|
+
rem: rem,
|
|
304
|
+
time: time
|
|
301
305
|
};
|
|
302
306
|
|
|
303
307
|
const handler = core.createValueHandler(valueHandlers);
|
|
@@ -980,7 +984,7 @@ async function analyzer(modules, ctx) {
|
|
|
980
984
|
};
|
|
981
985
|
}
|
|
982
986
|
|
|
983
|
-
const _dirname = typeof __dirname !== "undefined" ? __dirname : node_path.dirname(node_url.fileURLToPath((typeof document === 'undefined' ?
|
|
987
|
+
const _dirname = typeof __dirname !== "undefined" ? __dirname : node_path.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('index.cjs', document.baseURI).href))));
|
|
984
988
|
function UnocssInspector(ctx) {
|
|
985
989
|
async function configureServer(server) {
|
|
986
990
|
await ctx.ready;
|
|
@@ -994,6 +998,7 @@ function UnocssInspector(ctx) {
|
|
|
994
998
|
if (req.url === "/") {
|
|
995
999
|
const info = {
|
|
996
1000
|
version: ctx.uno.version,
|
|
1001
|
+
// use the resolved config from the dev server
|
|
997
1002
|
root: server.config.root,
|
|
998
1003
|
modules: Array.from(ctx.modules.keys()),
|
|
999
1004
|
config: ctx.uno.config,
|
package/dist/index.d.cts
ADDED
package/dist/index.d.mts
ADDED
package/dist/index.mjs
CHANGED
|
@@ -50,6 +50,7 @@ const numberRE = /^(-?\d*(?:\.\d+)?)$/i;
|
|
|
50
50
|
const unitOnlyRE = /^(px)$/i;
|
|
51
51
|
|
|
52
52
|
const cssProps = [
|
|
53
|
+
// basic props
|
|
53
54
|
"color",
|
|
54
55
|
"border-color",
|
|
55
56
|
"background-color",
|
|
@@ -67,12 +68,14 @@ const cssProps = [
|
|
|
67
68
|
"text-shadow",
|
|
68
69
|
"transform",
|
|
69
70
|
"box-shadow",
|
|
71
|
+
// positions
|
|
70
72
|
"background-position",
|
|
71
73
|
"left",
|
|
72
74
|
"right",
|
|
73
75
|
"top",
|
|
74
76
|
"bottom",
|
|
75
77
|
"object-position",
|
|
78
|
+
// sizes
|
|
76
79
|
"max-height",
|
|
77
80
|
"min-height",
|
|
78
81
|
"max-width",
|
|
@@ -91,6 +94,7 @@ const cssProps = [
|
|
|
91
94
|
"border-spacing",
|
|
92
95
|
"letter-spacing",
|
|
93
96
|
"word-spacing",
|
|
97
|
+
// enhances
|
|
94
98
|
"stroke",
|
|
95
99
|
"filter",
|
|
96
100
|
"backdrop-filter",
|
|
@@ -274,23 +278,23 @@ function position(str) {
|
|
|
274
278
|
|
|
275
279
|
const valueHandlers = {
|
|
276
280
|
__proto__: null,
|
|
277
|
-
numberWithUnit: numberWithUnit,
|
|
278
281
|
auto: auto,
|
|
279
|
-
rem: rem,
|
|
280
|
-
px: px,
|
|
281
|
-
number: number,
|
|
282
|
-
percent: percent,
|
|
283
|
-
fraction: fraction,
|
|
284
282
|
bracket: bracket,
|
|
285
283
|
bracketOfColor: bracketOfColor,
|
|
286
284
|
bracketOfLength: bracketOfLength,
|
|
287
285
|
bracketOfPosition: bracketOfPosition,
|
|
288
286
|
cssvar: cssvar,
|
|
289
|
-
time: time,
|
|
290
287
|
degree: degree,
|
|
288
|
+
fraction: fraction,
|
|
291
289
|
global: global,
|
|
290
|
+
number: number,
|
|
291
|
+
numberWithUnit: numberWithUnit,
|
|
292
|
+
percent: percent,
|
|
293
|
+
position: position,
|
|
292
294
|
properties: properties,
|
|
293
|
-
|
|
295
|
+
px: px,
|
|
296
|
+
rem: rem,
|
|
297
|
+
time: time
|
|
294
298
|
};
|
|
295
299
|
|
|
296
300
|
const handler = createValueHandler(valueHandlers);
|
|
@@ -987,6 +991,7 @@ function UnocssInspector(ctx) {
|
|
|
987
991
|
if (req.url === "/") {
|
|
988
992
|
const info = {
|
|
989
993
|
version: ctx.uno.version,
|
|
994
|
+
// use the resolved config from the dev server
|
|
990
995
|
root: server.config.root,
|
|
991
996
|
modules: Array.from(ctx.modules.keys()),
|
|
992
997
|
config: ctx.uno.config,
|