@unocss/inspector 0.65.1 → 0.65.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/client/assets/{_id_-B3ZSHsoY.js → _id_-DqjmtSUb.js} +1 -1
- package/dist/client/assets/{index-gfmpz2CL.js → index-DWgTJaLB.js} +145 -145
- package/dist/client/assets/{repl-mB_9M5jH.js → repl-Cm27FgzZ.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/index.mjs +10 -17
- package/package.json +6 -5
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{d as x,r as S,u as b,a as k,b as V,f as B,o as y,c as w,e as s,g as a,w as p,h as C,i as _,v as R,j as l,k as P,n as f,_ as E,l as N,m as U,p as $,q as I}from"./index-
|
|
1
|
+
import{d as x,r as S,u as b,a as k,b as V,f as B,o as y,c as w,e as s,g as a,w as p,h as C,i as _,v as R,j as l,k as P,n as f,_ as E,l as N,m as U,p as $,q as I}from"./index-DWgTJaLB.js";const L={"h-full":"",grid:"~ rows-[max-content_1fr]","of-hidden":""},M={"h-full":"","of-hidden":"",grid:"","grid-cols-2":""},T=x({__name:"ReplPlayground",setup(v){const r=S(null),t=b(r,"repl-scrolls"),o=k("unocss:inspector:repl",`<div class="text-sm hover:text-red">
|
|
2
2
|
Hello World
|
|
3
3
|
</div>`),n=V("unocss-inspector-safelist",!1),{data:c}=B(o,n);return(z,e)=>{var i,m;const g=E,h=N,u=U;return y(),w("div",L,[s("div",{ref_key:"status",ref:r},[a(g,null,{default:p(()=>e[2]||(e[2]=[s("div",null," REPL Playground ",-1),s("div",{op60:""}," Edit your code below to test and play UnoCSS's matching and generating. ",-1)])),_:1}),a(h,{border:"b gray-400/20",title:""},{default:p(()=>[s("label",null,[C(s("input",{"onUpdate:modelValue":e[0]||(e[0]=d=>_(n)?n.value=d:null),type:"checkbox"},null,512),[[R,l(n)]]),e[3]||(e[3]=P(" Include safelist "))])]),_:1})],512),s("div",M,[a(u,{modelValue:l(o),"onUpdate:modelValue":e[1]||(e[1]=d=>_(o)?o.value=d:null),mode:"html",matched:((i=l(c))==null?void 0:i.matched)||[],class:"scrolls repl-scrolls",style:f(l(t))},null,8,["modelValue","matched","style"]),a(u,{border:"l main","model-value":((m=l(c))==null?void 0:m.css)||"/* empty */","read-only":!0,mode:"css",class:"scrolls repl-scrolls",style:f(l(t))},null,8,["model-value","style"])])])}}}),j={};function q(v,r){const t=T;return y(),I(t)}const H=$(j,[["render",q]]);export{H as default};
|
package/dist/client/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
10
10
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;400&family=Fira+Code&display=swap" rel="stylesheet" />
|
|
11
|
-
<script type="module" crossorigin src="/__unocss/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/__unocss/assets/index-DWgTJaLB.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/__unocss/assets/index-D30AaiJX.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
package/dist/index.mjs
CHANGED
|
@@ -375,25 +375,18 @@ function parseColor(body, theme, key) {
|
|
|
375
375
|
}
|
|
376
376
|
let no = "DEFAULT";
|
|
377
377
|
if (!color) {
|
|
378
|
-
let
|
|
378
|
+
let keys = colors;
|
|
379
|
+
let _no;
|
|
379
380
|
const [scale] = colors.slice(-1);
|
|
380
381
|
if (/^\d+$/.test(scale)) {
|
|
381
|
-
no = scale;
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
} else {
|
|
388
|
-
|
|
389
|
-
if (!colorData && colors.length <= 2) {
|
|
390
|
-
[, no = no] = colors;
|
|
391
|
-
colorData = getThemeColor(theme, [name], key);
|
|
392
|
-
}
|
|
393
|
-
if (typeof colorData === "string")
|
|
394
|
-
color = colorData;
|
|
395
|
-
else if (no && colorData)
|
|
396
|
-
color = colorData[no];
|
|
382
|
+
no = _no = scale;
|
|
383
|
+
keys = colors.slice(0, -1);
|
|
384
|
+
}
|
|
385
|
+
const colorData = getThemeColor(theme, keys, key);
|
|
386
|
+
if (typeof colorData === "object") {
|
|
387
|
+
color = colorData[_no ?? no];
|
|
388
|
+
} else if (typeof colorData === "string" && !_no) {
|
|
389
|
+
color = colorData;
|
|
397
390
|
}
|
|
398
391
|
}
|
|
399
392
|
return {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/inspector",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.65.
|
|
4
|
+
"version": "0.65.2",
|
|
5
5
|
"description": "The inspector UI for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,16 +35,17 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"gzip-size": "^6.0.0",
|
|
38
|
-
"sirv": "^
|
|
38
|
+
"sirv": "^3.0.0",
|
|
39
39
|
"vue-flow-layout": "^0.1.1",
|
|
40
|
-
"@unocss/core": "0.65.
|
|
41
|
-
"@unocss/rule-utils": "0.65.
|
|
40
|
+
"@unocss/core": "0.65.2",
|
|
41
|
+
"@unocss/rule-utils": "0.65.2"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "unbuild",
|
|
45
45
|
"build-post": "vite build",
|
|
46
46
|
"stub": "unbuild --stub",
|
|
47
47
|
"dev": "nr stub && vite",
|
|
48
|
-
"update-post": "vite build"
|
|
48
|
+
"update-post": "vite build",
|
|
49
|
+
"test:attw": "attw --pack --config-path ../../.attw-esm-only.json"
|
|
49
50
|
}
|
|
50
51
|
}
|