@unocss/inspector 66.5.4 → 66.5.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.
@@ -1,3 +1,3 @@
1
- import{d as g,r as h,u as x,a as S,b,f as k,c as V,o as _,e as s,g as a,w as i,_ as B,h as w,i as C,j as m,v as R,k as l,l as P,n as p,m as E,p as N,q as U}from"./index-D3D5lRrI.js";const $={"h-full":"",grid:"~ rows-[max-content_1fr]","of-hidden":""},I={"h-full":"","of-hidden":"",grid:"","grid-cols-2":""},L=g({__name:"ReplPlayground",setup(f){const r=h(null),t=x(r,"repl-scrolls"),o=S("unocss:inspector:repl",`<div class="text-sm hover:text-red">
1
+ import{d as g,r as h,u as x,a as S,b,f as k,c as V,o as _,e as s,g as a,w as i,_ as B,h as w,i as C,j as m,v as R,k as l,l as P,n as p,m as E,p as N,q as U}from"./index-BNV8OkUv.js";const $={"h-full":"",grid:"~ rows-[max-content_1fr]","of-hidden":""},I={"h-full":"","of-hidden":"",grid:"","grid-cols-2":""},L=g({__name:"ReplPlayground",setup(f){const r=h(null),t=x(r,"repl-scrolls"),o=S("unocss:inspector:repl",`<div class="text-sm hover:text-red">
2
2
  Hello World
3
3
  </div>`),n=b("unocss-inspector-safelist",!1),{data:c}=k(o,n);return(j,e)=>{const y=B,v=P,u=E;return _(),V("div",$,[s("div",{ref_key:"status",ref:r},[a(y,null,{default:i(()=>[...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(v,{border:"b gray-400/20",title:""},{default:i(()=>[s("label",null,[w(s("input",{"onUpdate:modelValue":e[0]||(e[0]=d=>m(n)?n.value=d:null),type:"checkbox"},null,512),[[R,l(n)]]),e[3]||(e[3]=C(" Include safelist ",-1))])]),_:1})],512),s("div",I,[a(u,{modelValue:l(o),"onUpdate:modelValue":e[1]||(e[1]=d=>m(o)?o.value=d:null),mode:"html",matched:l(c)?.matched||[],class:"scrolls repl-scrolls",style:p(l(t))},null,8,["modelValue","matched","style"]),a(u,{border:"l main","model-value":l(c)?.css||"/* empty */","read-only":!0,mode:"css",class:"scrolls repl-scrolls",style:p(l(t))},null,8,["model-value","style"])])])}}}),M={};function T(f,r){const t=L;return _(),U(t)}const z=N(M,[["render",T]]);export{z as default};
@@ -11,7 +11,7 @@
11
11
  href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;400&family=Fira+Code&display=swap"
12
12
  rel="stylesheet"
13
13
  />
14
- <script type="module" crossorigin src="/__unocss/assets/index-D3D5lRrI.js"></script>
14
+ <script type="module" crossorigin src="/__unocss/assets/index-BNV8OkUv.js"></script>
15
15
  <link rel="stylesheet" crossorigin href="/__unocss/assets/index-CZFvCVAX.css">
16
16
  </head>
17
17
  <body>
package/dist/index.mjs CHANGED
@@ -820,9 +820,9 @@ async function analyzer(modules, ctx) {
820
820
 
821
821
  const _dirname = typeof __dirname !== "undefined" ? __dirname : dirname(fileURLToPath(import.meta.url));
822
822
  function UnocssInspector(ctx) {
823
+ const baseUrl = "__unocss";
823
824
  async function configureServer(server) {
824
825
  await ctx.ready;
825
- const baseUrl = "__unocss";
826
826
  server.middlewares.use(`/${baseUrl}`, sirv(resolve(_dirname, "../dist/client"), {
827
827
  single: true,
828
828
  dev: true
@@ -915,7 +915,18 @@ function UnocssInspector(ctx) {
915
915
  return {
916
916
  name: "unocss:inspector",
917
917
  apply: "serve",
918
- configureServer
918
+ configureServer,
919
+ devtools: {
920
+ setup(ctx2) {
921
+ ctx2.docks.register({
922
+ id: "unocss",
923
+ title: "UnoCSS",
924
+ icon: "https://unocss.dev/logo.svg",
925
+ type: "iframe",
926
+ url: `/${baseUrl}`
927
+ });
928
+ }
929
+ }
919
930
  };
920
931
  }
921
932
  function getCircularReplacer() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/inspector",
3
3
  "type": "module",
4
- "version": "66.5.4",
4
+ "version": "66.5.6",
5
5
  "description": "The inspector UI for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -38,8 +38,11 @@
38
38
  "gzip-size": "^6.0.0",
39
39
  "sirv": "^3.0.2",
40
40
  "vue-flow-layout": "^0.2.0",
41
- "@unocss/core": "66.5.4",
42
- "@unocss/rule-utils": "66.5.4"
41
+ "@unocss/core": "66.5.6",
42
+ "@unocss/rule-utils": "66.5.6"
43
+ },
44
+ "devDependencies": {
45
+ "@vitejs/devtools-kit": "^0.0.0-alpha.10"
43
46
  },
44
47
  "scripts": {
45
48
  "build": "unbuild",