stylelint-config-inspector 2.0.1 → 2.0.3
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/cli.mjs +10 -4
- package/dist/nitro.json +1 -1
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/5MfIQUL7.js +1 -0
- package/dist/public/_nuxt/6J8ln_TP.js +1 -0
- package/dist/public/_nuxt/B2W_qr1e.js +1 -0
- package/dist/public/_nuxt/BGg6a0gq.js +2 -0
- package/dist/public/_nuxt/BIKfqVNQ.js +1 -0
- package/dist/public/_nuxt/{D9VMXJyI.js → Bdm1-Non.js} +1 -1
- package/dist/public/_nuxt/BrWqqD4c.js +1 -0
- package/dist/public/_nuxt/{nBUflmkO.js → Bt9z7wWW.js} +1 -1
- package/dist/public/_nuxt/{BwdVnuqT.js → C6S6QGXR.js} +1 -1
- package/dist/public/_nuxt/C8LIkYQA.js +1 -0
- package/dist/public/_nuxt/Cfi2rMnF.js +13 -0
- package/dist/public/_nuxt/{BgZd1qfO.js → CqxBMan9.js} +2 -2
- package/dist/public/_nuxt/{DUtXDOXB.js → CwjCYxLG.js} +1 -1
- package/dist/public/_nuxt/DKSsXTxC.js +1 -0
- package/dist/public/_nuxt/{D5nuuTIN.js → Dl5u4ggG.js} +2 -2
- package/dist/public/_nuxt/{Gf5y-pjW.js → Od1p3DBV.js} +1 -1
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/fb79c9c3-aac0-4678-ab11-c149ec56e7c1.json +1 -0
- package/dist/public/_nuxt/{3_mkTJ2v.js → pswINk0x.js} +1 -1
- package/dist/public/_nuxt/q_WJf-VC.js +1 -0
- package/dist/public/_nuxt/{CYI4Dqes.js → us1Ri1jC.js} +1 -1
- package/dist/public/_nuxt/xMy-GMS0.js +1 -0
- package/dist/public/index.html +1 -1
- package/package.json +60 -55
- package/dist/public/_nuxt/BFHLvPhn.js +0 -1
- package/dist/public/_nuxt/BKBBWEz4.js +0 -1
- package/dist/public/_nuxt/BiE9LVQS.js +0 -2
- package/dist/public/_nuxt/C62pfWG4.js +0 -1
- package/dist/public/_nuxt/C79VbMUr.js +0 -1
- package/dist/public/_nuxt/DBzO6yCd.js +0 -1
- package/dist/public/_nuxt/DDlp5JcD.js +0 -1
- package/dist/public/_nuxt/DYop16xf.js +0 -1
- package/dist/public/_nuxt/D_UhJN5P.js +0 -1
- package/dist/public/_nuxt/builds/meta/3d019b3b-611d-496b-a62f-feea85871ee0.json +0 -1
- package/dist/public/_nuxt/cxyxlHGV.js +0 -13
- package/dist/public/_nuxt/rX12-d6r.js +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -936,6 +936,14 @@ const basename$2 = function(p, extension) {
|
|
|
936
936
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
937
937
|
};
|
|
938
938
|
//#endregion
|
|
939
|
+
//#region src/build-static-html.ts
|
|
940
|
+
const RE_ABSOLUTE_ASSET_ATTR = /\s(href|src)="\//g;
|
|
941
|
+
const RE_IMPORTMAP_ENTRY = /("#entry"\s*:\s*")\/_nuxt\//g;
|
|
942
|
+
function rewriteStaticHtmlWithBase(content, baseURL) {
|
|
943
|
+
if (baseURL === "/") return content;
|
|
944
|
+
return content.replaceAll(RE_ABSOLUTE_ASSET_ATTR, ` $1="${baseURL}`).replaceAll("baseURL:\"/\"", `baseURL:"${baseURL}"`).replaceAll(RE_IMPORTMAP_ENTRY, `$1${baseURL}_nuxt/`);
|
|
945
|
+
}
|
|
946
|
+
//#endregion
|
|
939
947
|
//#region src/constants.ts
|
|
940
948
|
const stylelintConfigFilenames = [
|
|
941
949
|
"stylelint.config.js",
|
|
@@ -3858,7 +3866,6 @@ new ObjectSchema(filesAndIgnoresSchema);
|
|
|
3858
3866
|
Object.freeze({ status: "external" });
|
|
3859
3867
|
Object.freeze({ status: "ignored" });
|
|
3860
3868
|
Object.freeze({ status: "unconfigured" });
|
|
3861
|
-
Error;
|
|
3862
3869
|
const ConfigArraySymbol = {
|
|
3863
3870
|
isNormalized: Symbol("isNormalized"),
|
|
3864
3871
|
configCache: Symbol("configCache"),
|
|
@@ -3866,7 +3873,7 @@ const ConfigArraySymbol = {
|
|
|
3866
3873
|
finalizeConfig: Symbol("finalizeConfig"),
|
|
3867
3874
|
preprocessConfig: Symbol("preprocessConfig")
|
|
3868
3875
|
};
|
|
3869
|
-
|
|
3876
|
+
ConfigArraySymbol.finalizeConfig, ConfigArraySymbol.preprocessConfig;
|
|
3870
3877
|
//#endregion
|
|
3871
3878
|
//#region shared/configs.ts
|
|
3872
3879
|
const DEFAULT_WORKSPACE_SCAN_GLOBS = ["**/*.{css,scss,sass,less,pcss,sss,styl,stylus,vue,svelte,astro,html}"];
|
|
@@ -5499,7 +5506,6 @@ async function createHostServer(options) {
|
|
|
5499
5506
|
//#endregion
|
|
5500
5507
|
//#region src/cli.ts
|
|
5501
5508
|
const RE_CONSECUTIVE_SLASHES = /\/+/g;
|
|
5502
|
-
const RE_ABSOLUTE_ASSET_ATTR = /\s(href|src)="\//g;
|
|
5503
5509
|
const cli = cac("stylelint-config-inspector");
|
|
5504
5510
|
cli.command("build", "Build inspector with current config file for static hosting").option("--config <configFile>", "Config file path").option("--files", "Include matched file paths in payload", { default: true }).option("--file <filePath>", "Alias of --target").option("--target <filePath>", "Target file path used to resolve effective config").option("--basePath <basePath>", "Base directory for globs to resolve. Default to directory of config file if not provided").option("--base <baseURL>", "Base URL for deployment", { default: "/" }).option("--outDir <dir>", "Output directory", { default: ".stylelint-config-inspector" }).action(async (rawOptions) => {
|
|
5505
5511
|
const options = normalizeCliInspectorOptions(rawOptions);
|
|
@@ -5536,7 +5542,7 @@ cli.command("build", "Build inspector with current config file for static hostin
|
|
|
5536
5542
|
});
|
|
5537
5543
|
if (baseURL !== "/") for (const file of htmlFiles) {
|
|
5538
5544
|
if (!file) continue;
|
|
5539
|
-
const newContent = (await fs$1.readFile(resolve$2(distDir, file), "utf-8")
|
|
5545
|
+
const newContent = rewriteStaticHtmlWithBase(await fs$1.readFile(resolve$2(distDir, file), "utf-8"), baseURL);
|
|
5540
5546
|
await fs$1.writeFile(resolve$2(outDir, file), newContent, "utf-8");
|
|
5541
5547
|
}
|
|
5542
5548
|
await fs$1.mkdir(resolve$2(outDir, "api"), { recursive: true });
|
package/dist/nitro.json
CHANGED
package/dist/public/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/_nuxt/Dl5u4ggG.js"}}</script><title>Stylelint Config Inspector</title><link rel="stylesheet" href="/_nuxt/entry.BbIOcLZN.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Dl5u4ggG.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DKSsXTxC.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/pswINk0x.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/D5CeIdpL.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Bdm1-Non.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/CwjCYxLG.js"><script type="module" src="/_nuxt/Dl5u4ggG.js" crossorigin></script><meta name="theme-color" content="#5B21B6"><meta name="apple-mobile-web-app-title" content="Stylelint Inspector"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="alternate icon" type="image/svg+xml" href="/stylelint/stylelint-icon-black.svg"><link rel="alternate icon" type="image/png" href="/stylelint/stylelint-icon-white-512.png"><link rel="apple-touch-icon" href="/stylelint/stylelint-icon-white-512.png"><script id="unhead:payload" type="application/json">{"title":"Stylelint Config Inspector"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"fb79c9c3-aac0-4678-ab11-c149ec56e7c1",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774394037936,false]</script></body></html>
|
package/dist/public/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/_nuxt/Dl5u4ggG.js"}}</script><title>Stylelint Config Inspector</title><link rel="stylesheet" href="/_nuxt/entry.BbIOcLZN.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Dl5u4ggG.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DKSsXTxC.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/pswINk0x.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/D5CeIdpL.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Bdm1-Non.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/CwjCYxLG.js"><script type="module" src="/_nuxt/Dl5u4ggG.js" crossorigin></script><meta name="theme-color" content="#5B21B6"><meta name="apple-mobile-web-app-title" content="Stylelint Inspector"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="alternate icon" type="image/svg+xml" href="/stylelint/stylelint-icon-black.svg"><link rel="alternate icon" type="image/png" href="/stylelint/stylelint-icon-white-512.png"><link rel="apple-touch-icon" href="/stylelint/stylelint-icon-white-512.png"><script id="unhead:payload" type="application/json">{"title":"Stylelint Config Inspector"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"fb79c9c3-aac0-4678-ab11-c149ec56e7c1",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774394037937,false]</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,s as t}from"./DKSsXTxC.js";import{A as n,C as r,D as i,It as a,J as o,O as ee,S as s,W as c,b as l,ft as u,h as d,nt as f,tt as p,x as m,y as h,yt as g,zt as _}from"./pswINk0x.js";import{n as v,r as te}from"#entry";import{i as ne}from"./Cfi2rMnF.js";import{t as re}from"./BGg6a0gq.js";var y={flex:`~ col gap-4`,my4:``},b={flex:`~ wrap gap-2 items-center`},x=[`data-testid`,`onClick`],S={key:0,border:`~ base rounded-xl`,flex:`~ col gap-4`,"bg-black:4":``,p4:``,"dark:bg-white:3":``},C={flex:`~ col gap-2 md:row md:items-start md:justify-between`},w={flex:`~ col gap-2`},T={flex:`~ items-center gap-2 wrap`},E={class:`rounded-full bg-violet:10 px3 py1 text-violet7 font-mono dark:text-violet3`},D={border:`~ base rounded-full`,"px2.5":``,"py0.5":``,"text-xs":``,op80:``},O={key:0,class:`rounded-full bg-sky:10 px2.5 py0.5 text-xs text-sky7 font-mono dark:text-sky3`},k={key:0,"text-sm":``,"leading-6":``,op80:``},A={key:1,"text-sm":``,italic:``,op60:``},j={grid:`~ cols-1 gap-3 md:cols-2 xl:cols-3`},M={border:`~ base rounded-lg`,"bg-black:6":``,p3:``,"dark:bg-white:3":``},N={mt2:``,flex:`~ col gap-2`},P={flex:`~ gap-2 items-center wrap`},ie={"font-mono":``,op60:``},F={key:1,italic:``,op60:``},I={border:`~ base rounded-lg`,"bg-black:6":``,p3:``,"dark:bg-white:3":``},L={key:0,mt2:``,flex:`~ gap-2 wrap items-center`},R={key:1,mt2:``,"text-sm":``,italic:``,op60:``},z={border:`~ base rounded-lg`,"bg-black:6":``,p3:``,"dark:bg-white:3":``},B={mt2:``,flex:`~ col gap-3`},V={key:0,mt1:``,flex:`~ gap-2 wrap items-center`},H={key:1,mt1:``,"text-sm":``,italic:``,op60:``},U={key:0,class:`mt1 inline-flex rounded-full bg-emerald:10 px2.5 py0.5 text-xs text-emerald7 font-mono dark:text-emerald3`},W={key:1,mt1:``,"text-sm":``,italic:``,op60:``},G={mt1:``,"font-mono":``},K={border:`~ base rounded-lg`,"bg-black:6":``,p3:``,"dark:bg-white:3":``},q={flex:`~ items-center gap-2 wrap`},J={op60:``},Y=[`data-testid`],ae={key:1,mt3:``,"text-sm":``,italic:``,op60:``},oe={key:1,"rounded-xl":``,border:`~ base`,"bg-black:5":``,p4:``,"text-sm":``,"dark:bg-white:3":``},X=n({__name:`extends`,setup(n){let X=h(()=>t.value.extendsInfo??[]),Z=u(``);p(()=>{if(!X.value.length){Z.value=``;return}X.value.some(e=>e.specifier===Z.value)||(Z.value=X.value[0]?.specifier??``)});let Q=h(()=>X.value.find(e=>e.specifier===Z.value)),se=h(()=>{let e=Q.value;return e?e.usedByConfigIndexes.map(e=>t.value.configs[e]).filter(e=>!!e):[]}),$=h(()=>(Q.value?.rules??[]).map(t=>e(t)));return(e,t)=>{let n=te,u=ne,p=re;return c(),r(`div`,y,[t[10]||=l(`div`,{border:`~ amber/20 rounded-full`,flex:`~ inline gap-2 items-center`,"w-fit":``,"bg-amber:8":``,px3:``,py1:``,"text-sm":``,"text-amber7":``,"dark:text-amber3":``},[l(`div`,{"i-ph-flask-duotone":``,"flex-none":``}),l(`span`,null,`This view is experimental and based on best-effort package/config loading.`)],-1),X.value.length?(c(),r(d,{key:0},[l(`div`,b,[(c(!0),r(d,null,o(X.value,e=>(c(),r(`button`,{key:e.specifier,"data-testid":g(v).extends.specifierButton,border:`~ base rounded-full`,px3:``,py1:``,"text-left":``,"font-mono":``,transition:``,class:a(Z.value===e.specifier?`bg-active`:`hover:bg-hover op85 hover:op100`),onClick:t=>Z.value=e.specifier},_(e.specifier),11,x))),128))]),Q.value?(c(),r(`div`,S,[l(`div`,C,[l(`div`,w,[l(`div`,T,[l(`code`,E,_(Q.value.specifier),1),l(`span`,D,_(Q.value.source),1),Q.value.packageName?(c(),r(`code`,O,_(Q.value.packageName),1)):s(``,!0)]),Q.value.description?(c(),r(`div`,k,_(Q.value.description),1)):(c(),r(`div`,A,` No package description metadata was found for this extended config. `))]),Q.value.docsUrl?(c(),m(n,{key:0,"btn-action":``,to:Q.value.docsUrl,target:`_blank`,rel:`noopener noreferrer`},{default:f(()=>[...t[0]||=[l(`div`,{"i-ph-book-duotone":``},null,-1),i(` Docs `,-1)]]),_:1},8,[`to`])):s(``,!0)]),l(`div`,j,[l(`div`,M,[t[1]||=l(`div`,{"text-sm":``,"font-medium":``},` Used by config items `,-1),l(`div`,N,[(c(!0),r(d,null,o(se.value,e=>(c(),m(n,{key:e.index,class:`border border-base rounded-lg px3 py2 hover:bg-hover`,to:`/configs?index=${e.index+1}`},{default:f(()=>[l(`div`,P,[l(`span`,ie,`#`+_(e.index+1),1),e.name?(c(),m(u,{key:0,name:e.name},null,8,[`name`])):(c(),r(`span`,F,`anonymous`))])]),_:2},1032,[`to`]))),128))])]),l(`div`,I,[t[3]||=l(`div`,{"text-sm":``,"font-medium":``},` Direct extends `,-1),Q.value.directExtends?.length?(c(),r(`div`,L,[(c(!0),r(d,null,o(Q.value.directExtends,e=>(c(),r(`code`,{key:e,class:`rounded-full bg-violet:10 px2.5 py0.5 text-xs text-violet7 font-mono dark:text-violet3`},_(e),1))),128))])):(c(),r(`div`,R,[...t[2]||=[i(` No direct `,-1),l(`code`,null,`extends`,-1),i(` entries were detected. `,-1)]]))]),l(`div`,z,[t[7]||=l(`div`,{"text-sm":``,"font-medium":``},` Plugins and syntax `,-1),l(`div`,B,[l(`div`,null,[t[4]||=l(`div`,{"text-xs":``,op60:``},` Plugins `,-1),Q.value.plugins?.length?(c(),r(`div`,V,[(c(!0),r(d,null,o(Q.value.plugins,e=>(c(),r(`code`,{key:e,class:`rounded-full bg-teal:10 px2.5 py0.5 text-xs text-teal7 font-mono dark:text-teal3`},_(e),1))),128))])):(c(),r(`div`,H,` No plugin metadata detected. `))]),l(`div`,null,[t[5]||=l(`div`,{"text-xs":``,op60:``},` Custom syntax `,-1),Q.value.customSyntax?(c(),r(`code`,U,_(Q.value.customSyntax),1)):(c(),r(`div`,W,` No custom syntax metadata detected. `))]),l(`div`,null,[t[6]||=l(`div`,{"text-xs":``,op60:``},` Rule count `,-1),l(`div`,G,_(Q.value.ruleCount??`unknown`),1)])])])]),l(`div`,K,[l(`div`,q,[t[8]||=l(`div`,{"i-ph-list-dashes-duotone":``,"text-blue5":``},null,-1),t[9]||=l(`span`,{"text-sm":``,"font-medium":``},`Rules from this extends entry`,-1),l(`span`,J,`(`+_($.value.length)+`)`,1)]),$.value.length?(c(),r(`div`,{key:0,"data-testid":g(v).extends.rulesListContainer,mt3:``},[ee(p,{"grid-view":!1,rules:$.value,"show-rule-states":!1,"list-columns":`40px_minmax(14rem,clamp(14rem,36vw,28rem))_5.25rem_minmax(0,1fr)`},null,8,[`rules`])],8,Y)):(c(),r(`div`,ae,` No rules were extracted for this extends entry. `))])])):s(``,!0)],64)):(c(),r(`div`,oe,` No extended configs were found in the current payload. `))])}}});export{X as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as e,p as t,s as n}from"./DKSsXTxC.js";import{$ as r,A as i,C as a,D as o,I as s,It as c,J as l,O as u,S as d,W as f,X as p,Y as m,b as h,ft as g,h as _,nt as v,tt as y,x as b,y as x,yt as S,zt as C}from"./pswINk0x.js";import{d as w}from"./Bdm1-Non.js";import{n as T}from"#entry";import{a as E,i as ee,t as te}from"./Cfi2rMnF.js";import{t as ne}from"./q_WJf-VC.js";var re=[`open`],ie={block:``},ae={class:`absolute right-[calc(100%+10px)] top-1.5`,"text-right":``,"font-mono":``,op35:``,"lt-lg:hidden":``},D={flex:`~ gap-2 items-start wrap items-center`,"cursor-pointer":``,"select-none":``,"bg-hover":``,px2:``,py2:``,"text-sm":``,"font-mono":``},O={flex:``,"flex-auto":``,"flex-col":``,"gap-3":``,"md:flex-row":``},k={"flex-auto":``,flex:`~ gap-2 items-center`},A=[`data-testid`],j={op85:``},M=[`data-testid`],N={op85:``},P={key:2,op50:``},F={flex:`~ gap-2 items-start wrap`},I={"pointer-events-none":``,absolute:``,"right-2":``,"top-2":``,"text-right":``,"text-5em":``,"font-mono":``,op5:``},L={key:0,flex:`~ col gap-4`,"of-auto":``,px4:``,py4:``},R={flex:`~ gap-2 items-center`},z={flex:`~ col gap-1`,ml6:``,"mt--2":``},B={badge:``,"text-start":``},V={key:0,"max-h":`50vh`,"min-w-100":``},H={flex:`~ items-center gap-2`,p3:``},U=[`onClick`],W={p3:``,border:`t base`},G={flex:`~ gap-2 items-start`},K={flex:`~ col gap-2`},oe={flex:`~ gap-2 items-center wrap`},q={key:0,"rounded-md":``,border:`~ base`,bg:`zinc-950/35`,px2:``,py1:``,"text-2.5":``},se={key:0,ml7:``,flex:`~ gap-1 wrap items-center`,text:`2.5 zinc-600 dark:zinc-300/75`},ce={key:0,"rounded-md":``,border:`~ base`,bg:`black:8 dark:zinc-950/35`,"px1.5":``,"py0.5":``},le={key:1,"rounded-md":``,border:`~ base`,bg:`black:6 dark:zinc-950/25`,"px1.5":``,"py0.5":``,text:`zinc-600 dark:zinc-300/70`},ue={flex:`~ gap-1 wrap`,ml6:``,"mt--2":``},de=[`open`],fe={flex:`~ gap-2 items-center wrap`,"cursor-pointer":``,"select-none":``},pe={flex:`~ col gap-1`,mt3:``},J=Object.assign(i({__name:`FileGroupItem`,props:s({index:{},group:{}},{open:{default:!0},openModifiers:{}}),emits:[`update:open`],setup(e){let t=e,n=r(e,`open`),i=g(n.value);if(!i.value){let e=y(()=>{n.value&&(i.value=!0,e())})}let s=x(()=>{if(t.group.kind!==`matched`||t.group.files.length===0||t.group.globs.size===1)return{type:`glob`,globs:[...t.group.globs.values()]};if(t.group.configs.length===1)return{type:`config`,config:t.group.configs[0]};if(t.group.globs.size<=2)return{type:`glob`,globs:[...t.group.globs.values()]}}),J=w();function Y(e){J.push(`/configs?index=${e+1}`)}function X(e){return(e.files??[]).flat().map(e=>e.trim()).filter(Boolean)}let Z=g(!0),Q=x(()=>s.value?.type===`config`?{label:`Config`,icon:`i-ph-stack-duotone`,colorClass:`text-sky6 dark:text-sky3`}:t.group.kind===`default`?{label:`Workspace scan`,icon:`i-ph-binoculars-duotone`,colorClass:`text-fuchsia6 dark:text-fuchsia3`}:{label:`Glob`,icon:`i-ph-file-magnifying-glass-duotone`,colorClass:`text-violet6 dark:text-violet3`});return(t,r)=>{let g=ee,y=te,x=ne,w=p(`VDropdown`),J=E;return f(),a(`details`,{class:`flat-config-item`,open:n.value,border:`~ base rounded-lg`,relative:``,onToggle:r[1]||=e=>n.value=e.target.open},[h(`summary`,ie,[h(`div`,ae,` #`+C(e.index+1),1),h(`div`,D,[r[2]||=h(`div`,{class:`[details[open]_&]:rotate-90`,"i-ph-caret-right":``,op50:``,transition:``},null,-1),h(`div`,O,[h(`span`,k,[s.value?.type===`config`?(f(),a(_,{key:0},[h(`span`,{"data-testid":S(T).files.groupIdentityLabel,flex:`~ gap-1.5 items-center`,class:c(Q.value.colorClass)},[h(`div`,{class:c(Q.value.icon),"flex-none":``},null,2),h(`span`,j,C(Q.value.label),1)],10,A),u(g,{badge:``,name:s.value.config.name,index:s.value.config.index},null,8,[`name`,`index`])],64)):s.value?.type===`glob`?(f(),a(_,{key:1},[h(`span`,{"data-testid":S(T).files.groupIdentityLabel,flex:`~ gap-1.5 items-center`,class:c(Q.value.colorClass)},[h(`div`,{class:c(Q.value.icon),"flex-none":``},null,2),h(`span`,N,C(Q.value.label),1)],10,M),(f(!0),a(_,null,l(s.value.globs,(e,t)=>(f(),b(y,{key:t,glob:e},null,8,[`glob`]))),128))],64)):(f(),a(`span`,P,` Files group #`+C(e.index+1),1))]),h(`div`,F,[u(x,{icon:`i-ph-files-duotone`,number:e.group.files?.length||0,color:`text-yellow5`,title:`Files`},null,8,[`number`]),u(x,{icon:`i-ph-stack-duotone`,number:e.group.configs.length,color:`text-blue5 dark:text-blue4`,title:`Configs`,"mr-2":``},null,8,[`number`])])])])]),h(`div`,I,` #`+C(e.index+1),1),i.value?(f(),a(`div`,L,[h(`div`,R,[r[3]||=h(`div`,{"i-ph-stack-duotone":``,"flex-none":``},null,-1),h(`div`,null,`Configs Specific to the Files (`+C(e.group.configs.length)+`)`,1)]),h(`div`,z,[(f(!0),a(_,null,l(e.group.configs,n=>(f(),a(`div`,{key:`${n.name}:${n.index}`,"font-mono":``,flex:`~ col gap-1`},[u(w,null,{popper:v(({shown:i})=>[i?(f(),a(`div`,V,[h(`div`,H,[h(`button`,{"btn-action-sm":``,title:`Copy`,onClick:e=>Y(n.index)},[...r[4]||=[h(`div`,{"i-ph-stack-duotone":``},null,-1),o(` Go to this config `,-1)]],8,U),m(t.$slots,`popup-actions`)]),h(`div`,W,[h(`div`,G,[r[6]||=h(`div`,{"i-ph-file-magnifying-glass-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),h(`div`,K,[r[5]||=h(`div`,{op50:``},` Applies to files matching `,-1),h(`div`,oe,[(f(!0),a(_,null,l(n.files?.flat(),(t,n)=>(f(),b(y,{key:n,glob:t,active:e.group.globs.has(t)},null,8,[`glob`,`active`]))),128))]),n.customSyntax?(f(),a(`div`,q,` customSyntax: `+C(n.customSyntax),1)):d(``,!0)])])])])):d(``,!0)]),default:v(()=>[h(`button`,B,[u(g,{name:n.name,index:n.index},null,8,[`name`,`index`])])]),_:2},1024),n.customSyntax||X(n).length>0?(f(),a(`div`,se,[n.customSyntax?(f(),a(`span`,ce,` syntax: `+C(n.customSyntax),1)):d(``,!0),(f(!0),a(_,null,l(X(n).slice(0,3),e=>(f(),b(y,{key:`${n.name}:${e}`,glob:e},null,8,[`glob`]))),128)),X(n).length>3?(f(),a(`span`,le,` +`+C(X(n).length-3)+` more `,1)):d(``,!0)])):d(``,!0)]))),128))]),r[9]||=h(`div`,{flex:`~ gap-2 items-center`},[h(`div`,{"i-ph-file-magnifying-glass-duotone":``,"flex-none":``}),h(`div`,null,`Matched Globs`)],-1),h(`div`,ue,[(f(!0),a(_,null,l(e.group.globs,(e,t)=>(f(),b(y,{key:t,glob:e},null,8,[`glob`]))),128))]),h(`details`,{open:Z.value,class:`border border-base rounded-lg bg-black:4 p3 dark:bg-white:3`,onToggle:r[0]||=e=>Z.value=e.target.open},[h(`summary`,fe,[r[7]||=h(`div`,{class:`[details[open]_&]:rotate-90`,"i-ph-caret-right":``,op50:``,transition:``},null,-1),r[8]||=h(`div`,{"i-ph-files-duotone":``,"flex-none":``},null,-1),h(`div`,null,`Matched Local Files (`+C(e.group.files.length)+`)`,1)]),h(`div`,pe,[(f(!0),a(_,null,l(e.group.files,e=>(f(),b(J,{key:e,"font-mono":``,filepath:e},null,8,[`filepath`]))),128))])],40,de)])):d(``,!0)],40,re)}}}),{__name:`FileGroupItem`}),Y={flex:`~ col gap-4`,my4:``},X={flex:`~ gap-2 items-center`},Z={border:`~ base rounded`,flex:`~ inline`},Q=[`data-testid`],me=[`data-testid`],he={key:0,flex:`~ gap-2 col`},ge={key:1},$=[`open`,`data-testid`],_e=[`data-testid`],ve={flex:`~ col gap-1`,py4:``,"font-mono":``},ye={key:1,rounded:``,border:`~ base`,"bg-gray:5":``,p3:``,"text-sm":``},be=i({__name:`files`,setup(r){let i=g(!0);function s(){e.value=e.value.map(()=>!0)}function u(){e.value=e.value.map(()=>!1)}return(r,p)=>{let m=J,g=E;return f(),a(`div`,Y,[p[10]||=h(`div`,{"text-gray:75":``},[o(` This tab shows a preview of file matches from the workspace. This feature is `),h(`span`,{"text-amber":``},`experimental`),o(` and may not be 100% accurate. `)],-1),S(n).filesResolved?(f(),a(_,{key:0},[h(`div`,X,[h(`div`,Z,[h(`button`,{class:c(S(t).viewFilesTab===`list`?`btn-action-active`:`op50`),"data-testid":S(T).files.viewListButton,"btn-action":``,"border-none":``,onClick:p[0]||=e=>S(t).viewFilesTab=`list`},[...p[3]||=[h(`div`,{"i-ph-files-duotone":``},null,-1),h(`span`,null,`List`,-1)]],10,Q),p[5]||=h(`div`,{border:`l base`},null,-1),h(`button`,{class:c(S(t).viewFilesTab===`group`?`btn-action-active`:`op50`),"data-testid":S(T).files.viewGroupsButton,"btn-action":``,"border-none":``,onClick:p[1]||=e=>S(t).viewFilesTab=`group`},[...p[4]||=[h(`div`,{"i-ph-rows-duotone":``},null,-1),h(`span`,null,`File Groups`,-1)]],10,me)]),p[6]||=h(`div`,{"flex-auto":``},null,-1),S(t).viewFilesTab===`group`?(f(),a(_,{key:0},[h(`button`,{"btn-action":``,px3:``,onClick:s},` Expand All `),h(`button`,{"btn-action":``,px3:``,onClick:u},` Collapse All `)],64)):d(``,!0)]),S(t).viewFilesTab===`group`?(f(),a(`div`,he,[(f(!0),a(_,null,l(S(n).filesResolved.groups,(t,n)=>(f(),b(m,{key:t.id,open:S(e)[n],"onUpdate:open":t=>S(e)[n]=t,group:t,index:n},null,8,[`open`,`onUpdate:open`,`group`,`index`]))),128))])):(f(),a(`div`,ge,[h(`details`,{open:i.value,"data-testid":S(T).files.matchedListDetails,class:`border border-base rounded-xl bg-black:4 p3 dark:bg-white:3`,onToggle:p[2]||=e=>i.value=e.target.open},[h(`summary`,{"data-testid":S(T).files.matchedListSummary,flex:`~ gap-2 items-center wrap`,"cursor-pointer":``,"select-none":``},[p[7]||=h(`div`,{class:`[details[open]_&]:rotate-90`,"i-ph-caret-right":``,op50:``,transition:``},null,-1),p[8]||=h(`div`,{"i-ph-files-duotone":``,"flex-none":``,"text-sky5":``},null,-1),h(`div`,null,` Matched Local Files (`+C(S(n).filesResolved.list.length)+`) `,1)],8,_e),h(`div`,ve,[(f(!0),a(_,null,l(S(n).filesResolved.list,e=>(f(),b(g,{key:e,filepath:e},null,8,[`filepath`]))),128))])],40,$)]))],64)):(f(),a(`div`,ye,[...p[9]||=[o(` File matching data is unavailable in the current payload. In CLI mode, enable file matching with `,-1),h(`code`,{"font-mono":``},`--files`,-1),o(` to populate this tab. `,-1)]]))])}}});export{be as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,s as t}from"./DKSsXTxC.js";import{A as n,C as r,D as i,J as a,W as o,b as s,h as c,y as l,yt as u,zt as d}from"./pswINk0x.js";var ee={py4:``,flex:`~ col gap-4`},te={border:`~ sky/20 rounded-xl`,"bg-sky:6":``,p4:``},ne={mt3:``,grid:`~ cols-1 gap-3 md:cols-2 xl:cols-4`},re={border:`~ base rounded-lg`,"bg-black:8":``,p3:``,"text-sm":``,"leading-7":``,"dark:bg-white:4":``},ie={class:`dev-kv`},ae={class:`dev-value`},oe={class:`dev-kv`},se={class:`dev-value`},ce={class:`dev-kv`},le={class:`dev-value`},ue={class:`dev-kv`},de={class:`dev-value`},fe={class:`dev-kv`},f={class:`dev-value`},p={border:`~ base rounded-lg`,"bg-black:8":``,p3:``,"text-sm":``,"leading-7":``,"dark:bg-white:4":``},m={class:`dev-kv`},h={class:`dev-value`},g={class:`dev-kv`},_={class:`dev-value`},v={class:`dev-kv`},y={class:`dev-value`},b={class:`dev-kv`},x={class:`dev-value`},S={class:`dev-kv`},C={class:`dev-value`},w={border:`~ base rounded-lg`,"bg-black:8":``,p3:``,"text-sm":``,"leading-7":``,"dark:bg-white:4":``},T={class:`dev-kv`},E={class:`dev-value`},D={class:`dev-kv`},O={class:`dev-value`},k={class:`dev-kv`},A={class:`dev-value`},j={class:`dev-kv`},M={class:`dev-value`},N={class:`dev-kv`},P={class:`dev-value`},F={border:`~ base rounded-lg`,"bg-black:8":``,p3:``,"text-sm":``,"leading-7":``,"dark:bg-white:4":``},I={class:`dev-kv`},L={class:`dev-value`},R={class:`dev-kv`},z={class:`dev-value`},B={class:`dev-kv`},V={class:`dev-value`},pe={class:`dev-kv`},me={class:`dev-value`},he={class:`dev-kv`},ge={class:`dev-value`},_e={border:`~ purple/20 rounded-xl`,"bg-purple:6":``,p4:``},ve={border:`~ purple/20`,mt3:``,"rounded-lg":``,"bg-black:10":``,p3:``,"text-sm":``,"leading-7":``,"font-mono":``},ye={class:`dev-kv`},be={class:`dev-value`},xe={class:`dev-kv`},Se={class:`dev-value`},Ce={class:`dev-kv`},we={class:`dev-value`},Te={class:`dev-kv`},Ee={class:`dev-value`},De={class:`dev-kv`},Oe={class:`dev-value`},ke={border:`~ amber/25 rounded-xl`,"bg-amber:6":``,p4:``},Ae={flex:`~ gap-2 items-center`,"text-amber7":``,"dark:text-amber3":``},je={"font-medium":``},Me={key:0,mt2:``},Ne={ml5:``,"list-disc":``,"text-amber7":``,op90:``,"dark:text-amber3":``},Pe={key:1,mt2:``,"text-sm":``,op70:``},Fe={border:`~ emerald/20 rounded-xl`,"bg-emerald:6":``,p4:``},Ie={border:`~ emerald/20`,mt3:``,"rounded-lg":``,"bg-black:8":``,p3:``,"text-sm":``,"leading-7":``,"font-mono":``,"dark:bg-white:4":``},Le={class:`dev-kv`},Re={class:`dev-value`},ze={class:`dev-kv`},Be={class:`dev-value`},Ve={class:`dev-kv`},He={class:`dev-value`},Ue={class:`dev-kv`},We={class:`dev-value`},Ge={class:`dev-kv`},Ke={class:`dev-value`},qe={class:`dev-kv`},Je={class:`dev-value`},Ye={class:`dev-kv`},Xe={class:`dev-value`},Ze={class:`dev-kv`},Qe={class:`dev-value`},$e={class:`dev-kv`},et={class:`dev-value`},tt={class:`dev-kv`},nt={class:`dev-value`},rt={class:`dev-kv`},it={class:`dev-value`},at={key:0,mt3:``,flex:`~ gap-2 wrap`},ot={key:1,mt3:``,"text-sm":``,op70:``},st={border:`~ violet/20 rounded-xl`,"bg-violet:6":``,p4:``},ct={border:`~ violet/20`,mt3:``,"rounded-lg":``,"bg-black:8":``,p3:``,"text-sm":``,"leading-7":``,"font-mono":``,"dark:bg-white:4":``},lt={class:`dev-kv`},ut={class:`dev-value`},dt={class:`dev-kv`},ft={class:`dev-value`},pt={class:`dev-kv`},mt={class:`dev-value`},ht={class:`dev-kv`},gt={class:`dev-value`},_t={class:`dev-kv`},vt={class:`dev-value`},yt={class:`dev-kv`},bt={class:`dev-value`},xt={mt3:``,grid:`~ cols-1 gap-3 lg:cols-2`},St={border:`~ violet/20`,"rounded-lg":``,"bg-black:8":``,p3:``,"dark:bg-white:4":``},Ct={mt2:``,flex:`~ gap-2 wrap`},wt={border:`~ violet/20`,"rounded-lg":``,"bg-black:8":``,p3:``,"dark:bg-white:4":``},Tt={key:0,mt2:``,flex:`~ gap-2 wrap`},Et={key:1,mt2:``,"text-sm":``,op60:``},H=n({__name:`dev`,setup(n){let H=/<value>|‹[^›]+›/u,U=l(()=>Object.values(t.value.rules)),W=l(()=>t.value.diagnostics??[]),G=l(()=>t.value.configs),K=l(()=>t.value.filesResolved),Dt=l(()=>t.value.extendsInfo??[]),q=l(()=>t.value.meta.stylelintIgnore),J=l(()=>{let e=G.value;return{total:e.length,general:t.value.configsGeneral.length,ignoreOnly:t.value.configsIgnoreOnly.length,overrides:e.filter(e=>e.name?.startsWith(`stylelint/override-`)).length,root:e.filter(e=>e.name===`stylelint/root`).length,withExtends:e.filter(e=>!!e.extends?.length).length,withPlugins:e.filter(e=>Object.keys(e.plugins??{}).length>0).length}}),Y=l(()=>{let e=K.value;return{matchedFiles:e?.list.length??0,groups:e?.groups.length??0,globs:e?.globToFiles.size??0,configsWithFiles:e?.configToFiles.size??0}}),X=l(()=>{let e=Dt.value;return{total:e.length,packages:e.filter(e=>e.source===`package`).length,locals:e.filter(e=>e.source===`local`).length,withRules:e.filter(e=>!!e.rules?.length).length,totalRules:e.reduce((e,t)=>e+(t.rules?.length??0),0)}}),Ot=l(()=>{let e=new Map;for(let t of G.value)for(let n of Object.keys(t.plugins??{}))e.set(n,(e.get(n)??0)+1);return Array.from(e.entries(),([e,t])=>({name:e,count:t})).toSorted((e,t)=>t.count-e.count||e.name.localeCompare(t.name))}),Z=l(()=>({theme:e.theme,fontScale:e.fontScale,dimDisabledRules:e.dimDisabledRules,configsViewType:e.viewType,rulesViewType:e.rulesViewType,viewFilesTab:e.viewFilesTab,viewFileMatchType:e.viewFileMatchType,configFilepathFilter:e.filtersConfigs.filepath,configRuleFilter:e.filtersConfigs.rule,configPluginFilters:e.filtersConfigs.plugins,rulesPluginFilters:e.filtersRules.plugins})),Q=l(()=>{let e=[];return Z.value.configFilepathFilter&&e.push(`filepath:${Z.value.configFilepathFilter}`),Z.value.configRuleFilter&&e.push(`config-rule:${Z.value.configRuleFilter}`),Z.value.configPluginFilters.forEach(t=>e.push(`config-plugin:${t}`)),Z.value.rulesPluginFilters.forEach(t=>e.push(`rules-plugin:${t}`)),e}),$=l(()=>{let e=U.value,t=e.length,n=e.filter(e=>e.docs?.descriptionSource===`generated`||e.docs?.descriptionMissing).length,r=e.filter(e=>e.docs?.descriptionSource===`message`).length,i=e.filter(e=>!e.docs?.url).length,a=e.filter(e=>e.docs?.urlSource===`inferred`).length,o=e.filter(e=>H.test(e.docs?.description??``)).length,s=e=>t?Math.round(e/t*1e3)/10:0;return{generatedDescriptions:n,generatedDescriptionsPct:s(n),messageDescriptions:r,messageDescriptionsPct:s(r),missingDocsUrls:i,missingDocsUrlsPct:s(i),inferredDocsUrls:a,placeholderDescriptions:o,placeholderDescriptionsPct:s(o)}});return(e,n)=>(o(),r(`div`,ee,[s(`section`,te,[n[40]||=s(`div`,{flex:`~ items-center gap-2 wrap`,"text-sky8":``,"dark:text-sky3":``},[s(`div`,{"i-ph-chart-bar-horizontal-duotone":``,"flex-none":``}),s(`span`,{"font-medium":``},`Inspector snapshot`)],-1),s(`div`,ne,[s(`div`,re,[s(`div`,ie,[n[0]||=s(`span`,{class:`dev-label`},`Config path:`,-1),n[1]||=i(),s(`code`,ae,d(u(t).meta.configPath||`not resolved`),1)]),s(`div`,oe,[n[2]||=s(`span`,{class:`dev-label`},`Target file:`,-1),n[3]||=i(),s(`code`,se,d(u(t).meta.targetFilePath||`default synthetic target`),1)]),s(`div`,ce,[n[4]||=s(`span`,{class:`dev-label`},`Engine:`,-1),n[5]||=i(),s(`code`,le,d(u(t).meta.engine||`unknown`),1)]),s(`div`,ue,[n[6]||=s(`span`,{class:`dev-label`},`Last update:`,-1),n[7]||=i(),s(`code`,de,d(new Date(u(t).meta.lastUpdate).toLocaleString()),1)]),s(`div`,fe,[n[8]||=s(`span`,{class:`dev-label`},`.stylelintignore:`,-1),n[9]||=i(),s(`code`,f,d(u(t).meta.stylelintIgnore?.path||`not found`),1)])]),s(`div`,p,[s(`div`,m,[n[10]||=s(`span`,{class:`dev-label`},`Total rules:`,-1),n[11]||=i(),s(`span`,h,d(U.value.length),1)]),s(`div`,g,[n[12]||=s(`span`,{class:`dev-label`},`Total config items:`,-1),n[13]||=i(),s(`span`,_,d(J.value.total),1)]),s(`div`,v,[n[14]||=s(`span`,{class:`dev-label`},`General configs:`,-1),n[15]||=i(),s(`span`,y,d(J.value.general),1)]),s(`div`,b,[n[16]||=s(`span`,{class:`dev-label`},`Ignore-only configs:`,-1),n[17]||=i(),s(`span`,x,d(J.value.ignoreOnly),1)]),s(`div`,S,[n[18]||=s(`span`,{class:`dev-label`},`Override configs:`,-1),n[19]||=i(),s(`span`,C,d(J.value.overrides),1)])]),s(`div`,w,[s(`div`,T,[n[20]||=s(`span`,{class:`dev-label`},`Matched files:`,-1),n[21]||=i(),s(`span`,E,d(Y.value.matchedFiles),1)]),s(`div`,D,[n[22]||=s(`span`,{class:`dev-label`},`File groups:`,-1),n[23]||=i(),s(`span`,O,d(Y.value.groups),1)]),s(`div`,k,[n[24]||=s(`span`,{class:`dev-label`},`Tracked globs:`,-1),n[25]||=i(),s(`span`,A,d(Y.value.globs),1)]),s(`div`,j,[n[26]||=s(`span`,{class:`dev-label`},`Configs with files:`,-1),n[27]||=i(),s(`span`,M,d(Y.value.configsWithFiles),1)]),s(`div`,N,[n[28]||=s(`span`,{class:`dev-label`},`Diagnostics:`,-1),n[29]||=i(),s(`span`,P,d(W.value.length),1)])]),s(`div`,F,[s(`div`,I,[n[30]||=s(`span`,{class:`dev-label`},`Extends entries:`,-1),n[31]||=i(),s(`span`,L,d(X.value.total),1)]),s(`div`,R,[n[32]||=s(`span`,{class:`dev-label`},`Package extends:`,-1),n[33]||=i(),s(`span`,z,d(X.value.packages),1)]),s(`div`,B,[n[34]||=s(`span`,{class:`dev-label`},`Local extends:`,-1),n[35]||=i(),s(`span`,V,d(X.value.locals),1)]),s(`div`,pe,[n[36]||=s(`span`,{class:`dev-label`},`Extends with rules:`,-1),n[37]||=i(),s(`span`,me,d(X.value.withRules),1)]),s(`div`,he,[n[38]||=s(`span`,{class:`dev-label`},`Total extends rules:`,-1),n[39]||=i(),s(`span`,ge,d(X.value.totalRules),1)])])])]),s(`section`,_e,[n[51]||=s(`div`,{flex:`~ items-center gap-2 wrap`,"text-violet8":``,"dark:text-violet3":``},[s(`div`,{"i-ph-flask-duotone":``,"flex-none":``}),s(`span`,{"font-medium":``},`Metadata health`)],-1),n[52]||=s(`div`,{mt1:``,"text-sm":``,op70:``},` (quality depends heavily on upstream Stylelint/plugin metadata) `,-1),s(`div`,ve,[s(`div`,ye,[n[41]||=s(`span`,{class:`dev-label`},`Generated descriptions:`,-1),n[42]||=i(),s(`span`,be,d($.value.generatedDescriptions)+` (`+d($.value.generatedDescriptionsPct)+`%)`,1)]),s(`div`,xe,[n[43]||=s(`span`,{class:`dev-label`},`Message-derived descriptions:`,-1),n[44]||=i(),s(`span`,Se,d($.value.messageDescriptions)+` (`+d($.value.messageDescriptionsPct)+`%)`,1)]),s(`div`,Ce,[n[45]||=s(`span`,{class:`dev-label`},`Missing docs URLs:`,-1),n[46]||=i(),s(`span`,we,d($.value.missingDocsUrls)+` (`+d($.value.missingDocsUrlsPct)+`%)`,1)]),s(`div`,Te,[n[47]||=s(`span`,{class:`dev-label`},`Inferred docs URLs:`,-1),n[48]||=i(),s(`span`,Ee,d($.value.inferredDocsUrls),1)]),s(`div`,De,[n[49]||=s(`span`,{class:`dev-label`},`Placeholder descriptions:`,-1),n[50]||=i(),s(`span`,Oe,d($.value.placeholderDescriptions)+` (`+d($.value.placeholderDescriptionsPct)+`%)`,1)])])]),s(`section`,ke,[s(`div`,Ae,[n[53]||=s(`div`,{"i-ph-warning-circle-duotone":``,"flex-none":``},null,-1),s(`span`,je,`Inspector diagnostics (`+d(W.value.length)+`)`,1)]),W.value.length?(o(),r(`div`,Me,[s(`ul`,Ne,[(o(!0),r(c,null,a(W.value,(e,t)=>(o(),r(`li`,{key:t},d(e),1))),128))])])):(o(),r(`div`,Pe,` No diagnostics emitted. `))]),s(`section`,Fe,[n[76]||=s(`div`,{flex:`~ gap-2 items-center`,"text-emerald7":``,"dark:text-emerald3":``},[s(`div`,{"i-ph-sliders-horizontal-duotone":``,"flex-none":``}),s(`span`,{"font-medium":``},`Viewer state`)],-1),s(`div`,Ie,[s(`div`,Le,[n[54]||=s(`span`,{class:`dev-label`},`Theme:`,-1),n[55]||=i(),s(`span`,Re,d(Z.value.theme),1)]),s(`div`,ze,[n[56]||=s(`span`,{class:`dev-label`},`Font scale:`,-1),n[57]||=i(),s(`span`,Be,d(Z.value.fontScale),1)]),s(`div`,Ve,[n[58]||=s(`span`,{class:`dev-label`},`Configs view:`,-1),n[59]||=i(),s(`span`,He,d(Z.value.configsViewType),1)]),s(`div`,Ue,[n[60]||=s(`span`,{class:`dev-label`},`Rules view:`,-1),n[61]||=i(),s(`span`,We,d(Z.value.rulesViewType),1)]),s(`div`,Ge,[n[62]||=s(`span`,{class:`dev-label`},`Files tab mode:`,-1),n[63]||=i(),s(`span`,Ke,d(Z.value.viewFilesTab),1)]),s(`div`,qe,[n[64]||=s(`span`,{class:`dev-label`},`File match view:`,-1),n[65]||=i(),s(`span`,Je,d(Z.value.viewFileMatchType),1)]),s(`div`,Ye,[n[66]||=s(`span`,{class:`dev-label`},`Config filepath filter:`,-1),n[67]||=i(),s(`span`,Xe,d(Z.value.configFilepathFilter||`∅`),1)]),s(`div`,Ze,[n[68]||=s(`span`,{class:`dev-label`},`Config rule filter:`,-1),n[69]||=i(),s(`span`,Qe,d(Z.value.configRuleFilter||`∅`),1)]),s(`div`,$e,[n[70]||=s(`span`,{class:`dev-label`},`Config plugin filters:`,-1),n[71]||=i(),s(`span`,et,d(Z.value.configPluginFilters.length?Z.value.configPluginFilters.join(`, `):`∅`),1)]),s(`div`,tt,[n[72]||=s(`span`,{class:`dev-label`},`Rules plugin filters:`,-1),n[73]||=i(),s(`span`,nt,d(Z.value.rulesPluginFilters.length?Z.value.rulesPluginFilters.join(`, `):`∅`),1)]),s(`div`,rt,[n[74]||=s(`span`,{class:`dev-label`},`Dim disabled rules:`,-1),n[75]||=i(),s(`span`,it,d(Z.value.dimDisabledRules?`on`:`off`),1)])]),Q.value.length?(o(),r(`div`,at,[(o(!0),r(c,null,a(Q.value,e=>(o(),r(`code`,{key:e,class:`rounded-full bg-emerald:12 px3 py0.5 text-xs text-emerald8 font-mono dark:text-emerald2`},d(e),1))),128))])):(o(),r(`div`,ot,` No active viewer filters. `))]),s(`section`,st,[n[92]||=s(`div`,{flex:`~ gap-2 items-center`,"text-violet8":``,"dark:text-violet3":``},[s(`div`,{"i-ph-stack-duotone":``,"flex-none":``}),s(`span`,{"font-medium":``},`Config composition summary`)],-1),s(`div`,ct,[s(`div`,lt,[n[77]||=s(`span`,{class:`dev-label`},`Root entries:`,-1),n[78]||=i(),s(`span`,ut,d(J.value.root),1)]),s(`div`,dt,[n[79]||=s(`span`,{class:`dev-label`},`Configs with extends:`,-1),n[80]||=i(),s(`span`,ft,d(J.value.withExtends),1)]),s(`div`,pt,[n[81]||=s(`span`,{class:`dev-label`},`Configs with plugins:`,-1),n[82]||=i(),s(`span`,mt,d(J.value.withPlugins),1)]),s(`div`,ht,[n[83]||=s(`span`,{class:`dev-label`},`Unique extends entries:`,-1),n[84]||=i(),s(`span`,gt,d(u(t).extendsInfo?.length??0),1)]),s(`div`,_t,[n[85]||=s(`span`,{class:`dev-label`},`General config items:`,-1),n[86]||=i(),s(`span`,vt,d(J.value.general),1)]),s(`div`,yt,[n[87]||=s(`span`,{class:`dev-label`},`Ignore-only config items:`,-1),n[88]||=i(),s(`span`,bt,d(J.value.ignoreOnly),1)])]),s(`div`,xt,[s(`div`,St,[n[89]||=s(`div`,{"text-sm":``,"font-medium":``},` Declared plugins `,-1),s(`div`,Ct,[(o(!0),r(c,null,a(Ot.value.slice(0,18),e=>(o(),r(`code`,{key:e.name,class:`rounded-full bg-violet:10 px2.5 py0.5 text-xs text-violet8 font-mono dark:text-violet2`},d(e.name)+` · `+d(e.count),1))),128))])]),s(`div`,wt,[n[91]||=s(`div`,{"text-sm":``,"font-medium":``},` .stylelintignore patterns `,-1),q.value?.patterns.length?(o(),r(`div`,Tt,[(o(!0),r(c,null,a(q.value.patterns,e=>(o(),r(`code`,{key:e,class:`rounded-full bg-fuchsia:10 px2.5 py0.5 text-xs text-fuchsia8 font-mono dark:text-fuchsia2`},d(e),1))),128))])):(o(),r(`div`,Et,[...n[90]||=[i(` No `,-1),s(`code`,null,`.stylelintignore`,-1),i(` file was discovered. `,-1)]]))])])])]))}});export{H as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as e,g as t,h as n,m as r,n as i,r as a,s as o,u as s,x as c}from"./DKSsXTxC.js";import{A as l,C as u,D as d,It as f,J as p,L as m,N as h,O as g,Q as _,Rt as v,S as y,W as b,X as x,Y as S,b as C,h as w,nt as T,rt as E,ut as D,x as O,y as k,yt as A,zt as j}from"./pswINk0x.js";import{d as M}from"./Bdm1-Non.js";import{a as ee,i as N,r as te,t as P}from"#entry";import{i as F,n as ne,o as I,r as L,t as re}from"./Cfi2rMnF.js";import{t as ie}from"./BDH0pOV6.js";var R={key:1,class:`flex-none`,op30:``},ae={key:2},z={class:`colorized-rule-name__name`,op75:``},oe=Object.assign(ie(l({__name:`ColorizedRuleName`,props:{name:{},prefix:{},url:{},as:{},deprecated:{type:[Boolean,Object]},borderless:{type:Boolean},break:{type:Boolean},hoverReveal:{type:Boolean},hideCorePrefix:{type:Boolean,default:!0}},setup(e){let t=e,n=/^\/+/,r=k(()=>{let e=t.name.split(`/`),r=e[0]??``;return e.length===1?t.prefix?{scope:t.prefix,name:r.replace(n,``)}:{scope:void 0,name:r}:{scope:r,name:e.slice(1).join(`/`)}}),i=k(()=>{if(r.value.scope&&!(t.hideCorePrefix&&r.value.scope===`stylelint`))return r.value.scope}),a=k(()=>r.value.scope?r.value.scope===`plugin`&&t.prefix?t.prefix:r.value.scope:``),o=k(()=>I(a.value));return(n,a)=>(b(),O(_(e.as||`div`),{title:t.name,class:f([`colorized-rule-name`,[e.as===`button`?`colorized-rule-name--button`:``,e.deprecated?`line-through`:``,e.borderless?``:`badge`,e.hoverReveal?`colorized-rule-name--hoverable`:``]])},{default:T(()=>[i.value?(b(),u(`span`,{key:0,class:`flex-none`,style:v({color:o.value})},j(i.value),5)):y(``,!0),i.value?(b(),u(`span`,R,`/`)):y(``,!0),i.value&&t.break?(b(),u(`br`,ae)):y(``,!0),C(`span`,z,j(r.value.name),1)]),_:1},8,[`title`,`class`]))}}),[[`__scopeId`,`data-v-e8ebe894`]]),{__name:`ColorizedRuleName`}),se=/\[\s*'--',\s*(\S.+),\s*'--'\s*\],?/g,ce=/"(\w+)":/g,B=/"/g;function V(e){let t=`${e}`;return t.endsWith(`1`)&&e!==11?`${t}st`:t.endsWith(`2`)&&e!==12?`${t}nd`:t.endsWith(`3`)&&e!==13?`${t}rd`:`${e}th`}function H(e){return U(e).replace(se,`$1, // [!code muted]`)}function U(e){return JSON.stringify(e,null,2).replace(ce,`$1:`).replace(B,`'`)}var W=[`title`],G=Object.assign(l({__name:`RuleLevelIcon`,props:{level:{},hasOptions:{type:Boolean},hasRedundantOptions:{type:Boolean},configIndex:{},class:{}},setup(e){let t=e,n=k(()=>t.configIndex==null?`Enabled as '${t.level}'`:`Enabled as '${t.level}', in the ${V(t.configIndex+1)} config item`),r=k(()=>({error:`text-red op80`,warn:`text-yellow5 op80 dark:text-yellow4`,off:`text-gray op62`})[t.level]),i=k(()=>({error:`i-ph-warning-circle-duotone`,warn:`i-ph-warning-duotone`,off:`i-ph-circle-half-tilt-duotone`})[t.level]);return(a,o)=>(b(),u(`div`,{relative:``,"inline-flex":``,"items-center":``,"justify-center":``,"leading-none":``,class:f([r.value,t.class]),title:n.value},[C(`div`,{class:f(i.value)},null,2),e.hasOptions?(b(),u(`div`,{key:0,absolute:``,"right--2px":``,"top--2px":``,"h-6px":``,"w-6px":``,"rounded-full":``,"bg-current":``,op75:``,class:f(e.hasRedundantOptions?`text-blue5`:``)},null,2)):y(``,!0)],10,W))}}),{__name:`RuleLevelIcon`}),le=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function K(e,t,n){let r=[];for(let i of e){if(n===`v3`){let e=i.children.flatMap((e,t)=>{if(e.type!==`element`)return e;let n=e.children[0];if(n.type!==`text`)return e;let r=t===i.children.length-1;if(!J(n.value,r))return e;let a=n.value.split(/(\s+\/\/)/);if(a.length<=1)return e;let o=[a[0]];for(let e=1;e<a.length;e+=2)o.push(a[e]+(a[e+1]||``));return o=o.filter(Boolean),o.length<=1?e:o.map(t=>({...e,children:[{type:`text`,value:t}]}))});e.length!==i.children.length&&(i.children=e)}let e=i.children,a=e.length-1;n===`v1`?a=0:t&&(a=e.length-2);for(let n=Math.max(a,0);n<e.length;n++){let a=e[n];if(a.type!==`element`)continue;let o=a.children.at(0);if(o?.type!==`text`)continue;let s=n===e.length-1,c=J(o.value,s);if(!c&&n>0&&o.value.trim().startsWith(`[!code`)){let t=e[n-1];if(t?.type===`element`){let n=t.children.at(0);if(n?.type===`text`&&n.value.includes(`//`)){let l=J(n.value+o.value,s);if(l){c=l,r.push({info:l,line:i,token:t,isLineCommentOnly:e.length===2&&t.children.length===1&&a.children.length===1,isJsxStyle:!1,additionalTokens:[a]});continue}}}}if(c)if(t&&!s&&n!==0){let t=q(e[n-1],`{`)&&q(e[n+1],`}`);r.push({info:c,line:i,token:a,isLineCommentOnly:e.length===3&&a.children.length===1,isJsxStyle:t,additionalTokens:void 0})}else r.push({info:c,line:i,token:a,isLineCommentOnly:e.length===1&&a.children.length===1,isJsxStyle:!1,additionalTokens:void 0})}}return r}function q(e,t){if(e.type!==`element`)return!1;let n=e.children[0];return n.type===`text`?n.value.trim()===t:!1}function J(e,t){let n=e.trimStart(),r=e.length-n.length;n=n.trimEnd();let i=e.length-n.length-r;for(let[e,a]of le){if(a&&!t)continue;let o=e.exec(n);if(o)return[` `.repeat(r)+o[1],o[2],o[3]?o[3]+` `.repeat(i):void 0]}}function ue(e){let t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function de(e,t,n,r){return r??=`v3`,{name:e,code(e){let i=e.children.filter(e=>e.type===`element`),a=[];e.data??={};let o=e.data;o._shiki_notation??=K(i,[`jsx`,`tsx`].includes(this.options.lang),r);let s=o._shiki_notation;for(let e of s){if(e.info[1].length===0)continue;let o=i.indexOf(e.line);e.isLineCommentOnly&&r!==`v1`&&o++;let s=!1;if(e.info[1]=e.info[1].replace(t,(...t)=>n.call(this,t,e.line,e.token,i,o)?(s=!0,``):t[0]),!s)continue;r===`v1`&&(e.info[1]=ue(e.info[1]));let c=e.info[1].trim().length===0;if(c&&(e.info[1]=``),c&&e.isLineCommentOnly)a.push(e.line);else if(c&&e.isJsxStyle)e.line.children.splice(e.line.children.indexOf(e.token)-1,3);else if(c){if(e.additionalTokens)for(let t=e.additionalTokens.length-1;t>=0;t--){let n=e.additionalTokens[t],r=e.line.children.indexOf(n);r!==-1&&e.line.children.splice(r,1)}e.line.children.splice(e.line.children.indexOf(e.token),1)}else{let t=e.token.children[0];if(t.type===`text`&&(t.value=e.info.join(``),e.additionalTokens))for(let t of e.additionalTokens){let e=t.children[0];e?.type===`text`&&(e.value=``)}}}for(let t of a){let n=e.children.indexOf(t),r=e.children[n+1],i=1;r?.type===`text`&&r?.value===`
|
|
2
|
+
`&&(i=2),e.children.splice(n,i)}}}}function Y(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function fe(e={},t=`@shikijs/transformers:notation-map`){let{classMap:n={},classActivePre:r=void 0,classActiveCode:i=void 0}=e;return de(t,RegExp(`#?\\s*\\[!code (${Object.keys(n).map(Y).join(`|`)})(:\\d+)?\\]`,`gi`),function([e,t,a=`:1`],o,s,c,l){let u=Number.parseInt(a.slice(1),10);for(let e=l;e<Math.min(l+u,c.length);e++)this.addClassToHast(c[e],n[t]);return r&&this.addClassToHast(this.pre,r),i&&this.addClassToHast(this.code,i),!0},e.matchAlgorithm)}var pe=l({name:`Shiki`,props:{code:{type:String,required:!0},lang:{type:String,required:!0}},setup(e){let t=k(()=>L.value?L.value.codeToHtml(e.code,{lang:e.lang,theme:P.value?`vitesse-dark`:`vitesse-light`,transformers:[{pre(e){e.properties.style=``}},fe({classMap:{muted:`muted`}},`@shikijs/transformers:notation-muted`)]}):ne(e.code));return()=>h(`div`,{class:`filter-hue-rotate-90`,innerHTML:t.value})}}),X;function me(e){return X=!0,[`--`,e,`--`]}function Z(e,t){if(t===void 0||typeof e!=typeof t)return e;if(e===t)return me(e);if(typeof e==`object`&&e&&t!==null){if(Array.isArray(e)&&Array.isArray(t)&&e.length===t.length)return e.length===0?me(e):e.map((e,n)=>Z(e,t[n]));if(!Array.isArray(e)&&!Array.isArray(t))return Object.keys(e).reduce((n,r)=>(n[r]=Z(e[r],t[r]),n),{})}return e}function Q(e,t){return X=!1,{options:e.map((e,n)=>Z(e,n<t.length?t[n]:void 0)),hasRedundantOptions:X}}var he={"min-w-100":``,p4:``,flex:`~ col gap-2`},ge={flex:`~ gap-1 items-center`},_e={key:0,ml1:``,op50:``},ve={key:1,ml1:``,op50:``},ye={key:3,op50:``},be={key:0,flex:`~ gap-2`},xe={flex:`~ col gap-2`},Se={flex:`~ gap-2 items-center wrap`},Ce={"items-center":``,"justify-between":``,"md:flex":``},we={flex:`~ gap-1`,op50:``},Te={key:0,border:`~ base rounded-full`,flex:`~ gap-2 items-center`,"bg-active":``,px2:``,py1:``,"text-sm":``},Ee={key:1,border:`~ base rounded-full`,flex:`~ gap-2 items-center`,"bg-active":``,px2:``,py1:``,"text-sm":``},De={key:0,op50:``},Oe={key:2,op50:``},$=Object.assign(l({__name:`RuleStateItem`,props:{state:{},isLocal:{type:Boolean}},setup(e){let t=e,n={error:`text-red`,warn:`text-amber`,off:`text-gray`},r=k(()=>o.value.configs[t.state.configIndex]),a=k(()=>i(t.state.name)),c=k(()=>Q(t.state.options??[],a.value)),l=k(()=>t.state.primaryOption!==void 0||!!t.state.options?.length),m=k(()=>!!a.value?.length),h=k(()=>l.value&&m.value),_=D({viewType:k(()=>!l.value&&a.value?.length?`default`:`state`).value}),v=M();function x(){s.rule=t.state.name,s.plugins=[],v.push(`/configs`)}return(t,i)=>{let o=G,s=F,v=re,S=pe;return b(),u(`div`,he,[C(`div`,ge,[g(o,{level:e.state.level,"config-index":e.state.configIndex},null,8,[`level`,`config-index`]),e.state.level===`off`?(b(),u(`span`,_e,`Turned `)):(b(),u(`span`,ve,`Set to `)),C(`span`,{"font-mono":``,class:f(n[e.state.level])},j(e.state.level),3),e.isLocal?(b(),u(`div`,ye,` in this config `)):(b(),u(w,{key:2},[i[5]||=C(`span`,{op50:``},`in`,-1),C(`button`,{hover:`!color-base`,"text-gray":``,onClick:i[0]||=e=>x()},[r.value.name?(b(),O(s,{key:0,name:r.value.name,px2:``,"font-mono":``,border:`~ base rounded`},null,8,[`name`])):y(``,!0),i[3]||=C(`span`,{op50:``},` the `,-1),d(` `+j(A(V)(e.state.configIndex+1))+` `,1),i[4]||=C(`span`,{op50:``},` config item `,-1)])],64))]),e.isLocal?y(``,!0):(b(),u(`div`,be,[r.value.files?(b(),u(w,{key:0},[i[7]||=C(`div`,{"i-ph-file-magnifying-glass-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),C(`div`,xe,[i[6]||=C(`div`,{op50:``},` Applies to files matching `,-1),C(`div`,Se,[(b(!0),u(w,null,p(r.value.files?.flat(),(e,t)=>(b(),O(v,{key:t,glob:e},null,8,[`glob`]))),128))])])],64)):r.value.rules?(b(),u(w,{key:1},[i[8]||=C(`div`,{"i-ph-files-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),i[9]||=C(`div`,{op50:``},` Applied generally for all files `,-1)],64)):y(``,!0)])),l.value||a.value?.length?(b(),u(w,{key:1},[C(`div`,Ce,[C(`div`,we,[h.value?(b(),u(w,{key:0},[l.value?(b(),u(`button`,{key:0,"btn-action":``,class:f({"btn-action-active":_.viewType===`state`}),onClick:i[1]||=e=>_.viewType=`state`},[...i[10]||=[C(`div`,{"i-ph-sliders-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),d(` Rule options `,-1)]],2)):y(``,!0),m.value?(b(),u(`button`,{key:1,"btn-action":``,class:f({"btn-action-active":_.viewType===`default`}),onClick:i[2]||=e=>_.viewType=`default`},[...i[11]||=[C(`div`,{"i-ph-faders-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),d(` Option defaults `,-1)]],2)):y(``,!0)],64)):(b(),u(w,{key:1},[l.value?(b(),u(`div`,Te,[...i[12]||=[C(`div`,{"i-ph-sliders-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),d(` Rule options `,-1)]])):m.value?(b(),u(`div`,Ee,[...i[13]||=[C(`div`,{"i-ph-faders-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),d(` Option defaults `,-1)]])):y(``,!0)],64))])]),_.viewType===`state`?(b(),u(w,{key:0},[e.state.primaryOption===void 0?y(``,!0):(b(),O(S,{key:0,lang:`ts`,code:`configuredPrimaryOption: ${A(H)(e.state.primaryOption)}`,rounded:``,"bg-code":``,p2:``,"text-sm":``},null,8,[`code`])),(b(!0),u(w,null,p(c.value.options,(e,t)=>(b(),O(S,{key:t,lang:`ts`,code:A(H)(e),rounded:``,"bg-code":``,p2:``,"text-sm":``},null,8,[`code`]))),128))],64)):y(``,!0),_.viewType===`default`?(b(),u(w,{key:1},[l.value?y(``,!0):(b(),u(`div`,De,` No explicit options are configured in this state; showing Stylelint defaults. `)),(b(!0),u(w,null,p(a.value,(e,t)=>(b(),O(S,{key:t,lang:`ts`,code:A(H)(e),rounded:``,"bg-code":``,p2:``,"text-sm":``},null,8,[`code`]))),128))],64)):y(``,!0)],64)):y(``,!0),_.viewType===`state`&&c.value.hasRedundantOptions?(b(),u(`div`,Oe,[...i[14]||=[d(` Options `,-1),C(`span`,{italic:``,op75:``},`italicized`,-1),d(` match the default for the rule `,-1)]])):y(``,!0)])}}}),{__name:`RuleStateItem`}),ke={border:`~ red/25 rounded`,"select-none":``,"bg-red:5":``,px1:``,"text-xs":``,"text-red":``},Ae={key:0,"p-2":``,"text-sm":``,op75:``},je={key:0,mb1:``,flex:`~ gap-1`,"text-red":``},Me={key:1},Ne={key:2},Pe={mt2:``},Fe=[`href`],Ie=Object.assign(l({__name:`RuleDeprecatedInfo`,props:{deprecated:{type:[Boolean,Object]},invalid:{type:Boolean}},setup(e){let t=k(()=>{if(!(!e.deprecated||typeof e.deprecated==`boolean`))return e.deprecated}),n=k(()=>{if(!t.value)return;let e=``;return t.value.deprecatedSince&&(e+=`was deprecated in v${t.value.deprecatedSince}`),t.value.availableUntil&&(e&&(e+=`, and `),e+=`will be removed in v${t.value.availableUntil}`),`This rule ${e}.`});function r(e){return[`text-blue5 dark:text-blue4`,e?`underline`:``]}return(i,a)=>{let o=te;return b(),O(A(ee),{"inline-block":``,disabled:!t.value},{popper:T(({shown:e})=>[e&&t.value?(b(),u(`div`,Ae,[t.value.message?(b(),u(`p`,je,[a[0]||=C(`span`,{"i-ph-warning-duotone":``,"inline-block":``},null,-1),d(j(t.value.message),1)])):y(``,!0),n.value?(b(),u(`p`,Me,j(n.value),1)):y(``,!0),t.value.replacedBy?.length?(b(),u(`p`,Ne,[a[2]||=d(` Please use the `,-1),(b(!0),u(w,null,p(t.value.replacedBy,({rule:e,plugin:n},i)=>(b(),u(w,null,[e?(b(),O(o,{key:e.name,class:f(r(e.url)),href:e.url,target:`_blank`},{default:T(()=>[d(j(e.name??e.url),1)]),_:2},1032,[`class`,`href`])):y(``,!0),n?(b(),u(w,{key:1},[a[1]||=d(` in `,-1),(b(),O(o,{key:n.name,class:f(r(n.url)),href:n.url,target:`_blank`},{default:T(()=>[d(j(n.name??n.url),1)]),_:2},1032,[`class`,`href`]))],64)):y(``,!0),d(j(i===t.value.replacedBy.length-1?`.`:i===0?``:`, `),1)],64))),256))])):y(``,!0),C(`p`,Pe,[C(`a`,{"text-red":``,underline:``,href:t.value.url},`Learn more`,8,Fe)])])):y(``,!0)]),default:T(()=>[C(`div`,ke,j(e.invalid?`INVALID`:`DEPRECATED`),1)]),_:1},8,[`disabled`])}}}),{__name:`RuleDeprecatedInfo`}),Le={key:2,"h-5":``,"w-5":``,op0:``},Re={"min-w-0":``,"w-full":``,"inline-flex":``,"items-center":``,"gap-1":``},ze={key:0,"max-h":`50vh`,"min-w":`min(32rem,82vw)`,"text-sm":``,"leading-5":``},Be={flex:`~ items-center gap-2`,p3:``},Ve={key:0,"i-ph-magic-wand-duotone":``,op60:``},He={border:`t base`,px3:``,pb3:``,"pt2.5":``},Ue={flex:`~ items-center gap-1.5 wrap`},We={"font-mono":``},Ge={class:`wrap mt2 flex items-center gap-2`},Ke={"text-sm":``,"font-medium":``,op80:``},qe={key:0,class:`inline-flex border border-violet/30 rounded-full bg-violet/8 px2 py0.5 text-xs text-violet7 dark:text-violet3`},Je={key:0,class:`mt2 inline-flex items-start gap-1.5 text-sm op80`},Ye={class:`inline-flex flex-col gap-0.5`},Xe={grid:`~ cols-[repeat(4,1.15rem)]`,"min-h-5":``,"items-center":``,"justify-items-center":``,"gap-x-1.5":``},Ze={key:0,class:`col-start-1`,"i-ph-seal-warning-duotone":``,"text-red5":``,op80:``},Qe={key:1,class:`col-start-2`,"i-ph-check-square-duotone":``,"text-green6":``,op70:``},$e={key:2,class:`col-start-3`,"i-ph-wrench-duotone":``,"text-amber6":``,op70:``},et={key:3,class:`col-start-4`,"i-ph-prohibit-inset-duotone":``,op60:``},tt=[`title`],nt={key:0},rt={key:1,class:`mx-0.5 inline text-[0.94em] text-violet7 font-mono dark:text-violet3`},it={key:0,"i-ph-asterisk":``,"text-2.5":``,"text-amber5":``,op55:``},at={key:1,"i-ph-chat-centered-text-duotone":``,"text-3":``,"text-violet5":``,op55:``},ot={key:1,flex:``,"flex-auto":``,"flex-col":``,"items-start":``,"justify-end":``},st={flex:`~ gap-2`,mt1:``},ct={key:1,"i-ph-check-square-duotone":``,op50:``},lt={key:2,"i-ph-wrench-duotone":``,op50:``},ut=`foo`,dt=`Built-in stylelint rule: Do not use a prefix in your config.`,ft=Object.assign(l({__name:`RuleItem`,props:{rule:{},ruleStates:{},value:{},class:{},gridView:{type:Boolean},dimDisabled:{type:Boolean}},emits:[`badgeClick`,`stateClick`],setup(e,{emit:a}){let o=e,s=a,l=/no more than|at most|at least|specificity|match pattern|to be one of|must be|should be|allowed list|disallowed list/,m=/<value>|‹([^›]+)›/gu;function h(e){let{hasRedundantOptions:t}=Q(e??[],i(o.rule.name));return t}let{copy:_}=c();function D(e){return e&&e[0].toUpperCase()+e.slice(1)}function M(e){if(typeof e==`string`)return e;let t=JSON.stringify(e);return t===void 0?String(e):t}function ee(e){return typeof e==`string`||typeof e==`number`}function P(e,t){let n=e.slice(Math.max(0,t-56),t).toLowerCase();return l.test(n)}function F(e,t){if(!e.includes(`<value>`)||!ee(t))return e;let n=M(t);if(!n.length)return e;let r=`<value>`,i=[],a=e.indexOf(r);for(;a!==-1;)i.push(a),a=e.indexOf(r,a+7);if(!i.length)return e;if(i.length===1)return P(e,i[0])?e.replace(r,n):e;let o=[],s=0,c=!1;for(let t of i)o.push(e.slice(s,t)),P(e,t)?(o.push(n),c=!0):o.push(r),s=t+7;return o.push(e.slice(s)),c?o.join(``):e}let ne=k(()=>{let e=o.ruleStates;if(e?.length)return e.toReversed().find(e=>e.level!==`off`)??e.at(-1)}),L=k(()=>{if(o.value!==void 0)return t(o.value)??n(o.value)?.[0]}),re=k(()=>{if(L.value!==void 0)return L.value;let e=ne.value;if(e)return e.primaryOption??e.options?.[0]}),ie=k(()=>{let e=o.ruleStates;return e?.length?e.every(e=>e.level===`off`):!1}),R=k(()=>{if(o.rule.invalid)return`Invalid rule has no description`;let e=o.rule.docs?.description,t=D(e)??`No description available`,n=re.value;return n===void 0?t:F(t,n)}),ae=k(()=>{let e=R.value,t=[],n=0;for(let r of e.matchAll(m)){let i=r.index??0;n<i&&t.push({type:`text`,value:e.slice(n,i)}),t.push({type:`token`,value:r[1]??ut}),n=i+r[0].length}return n<e.length&&t.push({type:`text`,value:e.slice(n)}),t.length?t:[{type:`text`,value:e}]}),z=k(()=>!!o.rule.docs?.descriptionMissing&&!o.rule.invalid),se=k(()=>o.rule.docs?.descriptionSource),ce=k(()=>se.value===`message`&&!z.value),B=k(()=>o.rule.docs?.urlSource===`inferred`),V=k(()=>B.value?`Docs (inferred from plugin package metadata)`:`Docs`),H=k(()=>o.dimDisabled??!0?o.value===void 0?ie.value:r(o.value)===`off`:!1),U=k(()=>H.value?`op55 hover:op100 transition-opacity`:``),W=k(()=>(o.ruleStates?.length??0)>0),le=k(()=>o.value!==void 0),K=k(()=>o.rule.plugin===`stylelint`?!0:o.rule.name.startsWith(`stylelint/`)),q=k(()=>{if(K.value)return`stylelint`;if(o.rule.pluginPackageName)return o.rule.pluginPackageName;if(o.rule.plugin)return`stylelint-${o.rule.plugin}`}),J=k(()=>K.value?`Rule source`:`Plugin package`),ue=k(()=>q.value?q.value:o.rule.plugin?o.rule.plugin:`unknown`),de=k(()=>{let e=q.value||o.rule.plugin||`stylelint`;return{color:I(e),borderColor:I(e,.5),backgroundColor:I(e,.1)}}),Y=k(()=>{let[e]=o.rule.name.split(`/`);if(e===`plugin`)return q.value?{firstLineBeforePrefix:`This rule is published with a generic`,firstLineAfterPrefix:`prefix.`}:{firstLineBeforePrefix:`This rule uses a generic`,firstLineAfterPrefix:`prefix from its upstream package.`}});return(i,a)=>{let c=G,l=$,m=x(`VDropdown`),D=oe,k=te,M=Ie;return b(),u(w,null,[C(`div`,{class:f([o.class,U.value,e.gridView?`absolute top-2 right-2 flex justify-end items-start`:`w-full flex items-center justify-end`]),"text-lg":``},[W.value?(b(),u(`div`,{key:0,flex:`~ items-center gap-0.5 justify-end`,class:f(e.gridView?`flex-col`:``)},[(b(!0),u(w,null,p(e.ruleStates,(e,t)=>(b(),O(m,{key:t},{popper:T(({shown:t})=>[t?(b(),O(l,{key:0,state:e},null,8,[`state`])):y(``,!0)]),default:T(()=>[g(c,{level:e.level,"config-index":e.configIndex,"has-options":e.primaryOption!==void 0||!!e.options?.length,"has-redundant-options":h(e.options)},null,8,[`level`,`config-index`,`has-options`,`has-redundant-options`])]),_:2},1024))),128))],2)):le.value?(b(),O(c,{key:1,level:A(r)(e.value),"has-options":A(t)(e.value)!==void 0||!!A(n)(e.value)?.length,"has-redundant-options":h(A(n)(e.value))},null,8,[`level`,`has-options`,`has-redundant-options`])):e.gridView?y(``,!0):(b(),u(`div`,Le))],2),C(`div`,{class:f([o.class,U.value]),relative:``,"min-w-0":``,pr2:``},[g(m,null,{popper:T(({shown:t})=>[t?(b(),u(`div`,ze,[C(`div`,Be,[!e.rule.invalid&&e.rule.docs?.url?E((b(),O(k,{key:0,class:`inline-flex items-center gap-1.5 border border-base rounded-full bg-black/8 px3 py1.5 text-sm text-inherit no-underline transition dark:bg-white/6 hover:bg-black/14 dark:hover:bg-white/12`,to:e.rule.docs?.url,target:`_blank`,rel:`noopener noreferrer`,title:V.value},{default:T(()=>[a[3]||=C(`div`,{"i-ph-book-duotone":``},null,-1),a[4]||=d(` Docs `,-1),B.value?(b(),u(`div`,Ve)):y(``,!0)]),_:1},8,[`to`,`title`])),[[A(N),V.value]]):y(``,!0),C(`button`,{class:`inline-flex items-center gap-1.5 border border-base rounded-full bg-black/8 px3 py1.5 text-sm text-inherit transition dark:bg-white/6 hover:bg-black/14 dark:hover:bg-white/12`,title:`Copy`,onClick:a[1]||=t=>A(_)(e.rule.name)},[...a[5]||=[C(`div`,{"i-ph-copy-duotone":``},null,-1),d(` Copy name `,-1)]]),S(i.$slots,`popup-actions`)]),C(`div`,He,[C(`div`,Ue,[a[6]||=C(`span`,{"text-sm":``,op70:``},`Rule name`,-1),C(`code`,We,j(e.rule.name),1)]),C(`div`,Ge,[C(`span`,Ke,j(J.value),1),C(`code`,{class:`inline-flex items-center border rounded-full px2 py0.5 text-sm font-mono`,style:v(de.value)},j(ue.value),5),K.value?(b(),u(`span`,qe,[...a[7]||=[d(` Built-in rule · omit `,-1),C(`span`,{class:`mx1 text-violet8 font-mono dark:text-violet2`},`stylelint/`,-1),d(` in config `,-1)]])):y(``,!0)]),Y.value?(b(),u(`div`,Je,[a[10]||=C(`span`,{"i-ph-info-duotone":``,"mt0.25":``,"text-sm":``},null,-1),C(`span`,Ye,[C(`span`,null,[d(j(Y.value.firstLineBeforePrefix)+` `,1),a[8]||=C(`span`,{class:`mx0.5 text-violet7 font-mono dark:text-violet3`},`plugin/`,-1),d(` `+j(Y.value.firstLineAfterPrefix),1)]),a[9]||=C(`span`,null,[d(` Keep the `),C(`span`,{class:`mx0.5 text-violet7 font-mono dark:text-violet3`},`plugin/`),d(` prefix in your config. `)],-1)])])):y(``,!0)]),S(i.$slots,`popup`)])):y(``,!0)]),default:T(()=>[C(`div`,Re,[K.value?E((b(),u(`span`,{key:0,class:`inline-flex flex-none cursor-help items-center text-violet6 op75 dark:text-violet3`,title:dt},[...a[2]||=[C(`span`,{"i-ph-asterisk":``,class:`text-3 leading-none`},null,-1)]])),[[A(N),dt]]):y(``,!0),g(D,{name:e.rule.name,prefix:e.rule.plugin,deprecated:e.rule.deprecated,borderless:!0,break:e.gridView,"hover-reveal":!1,title:e.rule.name,class:`min-w-0`,"text-start":``,as:`button`,onClick:a[0]||=e=>s(`badgeClick`,e)},null,8,[`name`,`prefix`,`deprecated`,`break`,`title`])])]),_:3})],2),e.gridView?y(``,!0):(b(),u(`div`,{key:0,class:f([o.class,U.value]),mx2:``,"min-w-0":``,flex:``,"justify-center":``},[C(`div`,Xe,[e.rule.invalid?E((b(),u(`div`,Ze,null,512)),[[A(N),`❌ Invalid rule`]]):y(``,!0),e.rule.docs?.recommended?E((b(),u(`div`,Qe,null,512)),[[A(N),`✅ Recommended`]]):y(``,!0),e.rule.fixable?E((b(),u(`div`,$e,null,512)),[[A(N),`🔧 Fixable`]]):y(``,!0),e.rule.deprecated?E((b(),u(`div`,et,null,512)),[[A(N),`🪦 Deprecated`]]):y(``,!0)])],2)),C(`div`,{class:f([o.class,U.value]),"min-w-0":``,flex:`~ gap-2 items-center`,"of-hidden":``},[C(`div`,{title:R.value,class:f([e.rule.deprecated?`line-through`:``,e.rule.invalid?`text-red`:``,e.gridView?`op55 text-sm leading-5`:`op75 text-sm ws-nowrap of-hidden text-ellipsis line-clamp-1`])},[(b(!0),u(w,null,p(ae.value,(e,t)=>(b(),u(w,{key:t},[e.type===`text`?(b(),u(`span`,nt,j(e.value),1)):(b(),u(`code`,rt,j(e.value),1))],64))),128))],10,tt),z.value?E((b(),u(`div`,it,null,512)),[[A(N),`No description metadata found for this rule; showing a generated fallback.`]]):ce.value?E((b(),u(`div`,at,null,512)),[[A(N),`Description derived from plugin message templates because dedicated metadata is missing.`]]):y(``,!0)],2),e.gridView&&(e.rule.invalid||e.rule.deprecated||e.rule.fixable||e.rule.docs?.recommended)?(b(),u(`div`,ot,[C(`div`,st,[e.rule.invalid||e.rule.deprecated?(b(),O(M,{key:0,deprecated:e.rule.deprecated,invalid:e.rule.invalid},null,8,[`deprecated`,`invalid`])):y(``,!0),e.rule.docs?.recommended?E((b(),u(`div`,ct,null,512)),[[A(N),`✅ Recommended`]]):y(``,!0),e.rule.fixable?E((b(),u(`div`,lt,null,512)),[[A(N),`🔧 Fixable`]]):y(``,!0)])])):y(``,!0)],64)}}}),{__name:`RuleItem`}),pt=`42px_minmax(12rem,clamp(12rem,32vw,24rem))_5rem_minmax(0,1fr)`,mt=Object.assign(l({__name:`RuleList`,props:{rules:{},getBind:{type:Function},filter:{type:Function},listColumns:{},dimDisabled:{type:Boolean},showRuleStates:{type:Boolean},gridView:{type:Boolean}},setup(t){let n=t,r=k(()=>n.gridView??e.value),i=k(()=>Array.isArray(n.rules)?n.rules.map(e=>e.name):Object.keys(n.rules)),s=k(()=>n.dimDisabled??!0);function c(e){return Array.isArray(n.rules)?n.rules.find(t=>t.name===e):a(e)}function d(e){return Array.isArray(n.rules)?void 0:n.rules[e]}let _=k(()=>r.value?`grid grid-cols-[repeat(auto-fill,minmax(min(100%,350px),1fr))] gap-2`:`grid max-w-full min-w-0 gap-x-2 gap-y-2 items-center`),x=k(()=>{if(!r.value)return{gridTemplateColumns:(n.listColumns||pt).replaceAll(`_`,` `)}}),C=l({setup(e,{slots:t}){return()=>r.value?h(`div`,{class:`relative border border-base max-w-full rounded-lg p4 py3 flex flex-col gap-2 of-hidden justify-start`},t.default?.()):h(w,t.default?.())}});return(e,a)=>{let l=$,h=ft;return b(),u(`div`,{class:f(_.value),style:v(x.value)},[(b(!0),u(w,null,p(i.value,i=>(b(),u(w,{key:i},[n.filter?.(i)===!1?y(``,!0):(b(),O(A(C),{key:0},{default:T(()=>[g(h,m({rule:c(i),"rule-states":n.showRuleStates!==!1&&Array.isArray(t.rules)?A(o).ruleToState.get(i)||[]:void 0,"grid-view":r.value,value:d(i)},{ref_for:!0},t.getBind?.(i),{"dim-disabled":s.value}),{popup:T(()=>[S(e.$slots,`popup`,{ruleName:i,value:d(i)},()=>[(b(!0),u(w,null,p(A(o).ruleToState.get(i)||[],(e,t)=>(b(),O(l,{key:t,border:`t base`,state:e},null,8,[`state`]))),128))])]),"popup-actions":T(()=>[S(e.$slots,`popup-actions`,{ruleName:i})]),_:2},1040,[`rule`,`rule-states`,`grid-view`,`value`,`dim-disabled`])]),_:2},1024))],64))),128))],6)}}}),{__name:`RuleList`});export{oe as a,U as i,$ as n,G as r,mt as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,D as t,O as n,W as r,b as i,nt as a,zt as o}from"./pswINk0x.js";import{t as s}from"./Bt9z7wWW.js";import{r as c}from"#entry";import{t as l}from"./BDH0pOV6.js";var u={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},d={class:`max-w-520px text-center`},f=[`textContent`],p=[`textContent`],m=[`textContent`],h={class:`flex items-center justify-center w-full`},g=l({__name:`error-404`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:404},statusText:{type:String,default:`Page not found`},description:{type:String,default:`Sorry, the page you are looking for could not be found.`},backHome:{type:String,default:`Go back home`}},setup(l){let g=l;return s({title:`${g.status} - ${g.statusText} | ${g.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(s,g)=>{let _=c;return r(),e(`div`,u,[i(`div`,d,[i(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:o(l.status)},null,8,f),i(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:o(l.statusText)},null,8,p),i(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:o(l.description)},null,8,m),i(`div`,h,[n(_,{to:`/`,class:`font-medium hover:text-[#00DC82] text-sm underline underline-offset-3`},{default:a(()=>[t(o(l.backHome),1)]),_:1})])])])}}},[[`__scopeId`,`data-v-204d37bf`]]);export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,P as t,_t as n,i as r}from"./
|
|
1
|
+
import{F as e,P as t,_t as n,i as r}from"./pswINk0x.js";import{a as i,c as a,d as o,l as s,n as c,r as l,t as u}from"./D5CeIdpL.js";function d(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function f(e,t,n=`.`,r){if(!d(t))return f(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:d(a)&&d(i[t])?i[t]=f(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function p(e){return(...t)=>t.reduce((t,n)=>f(t,n,``,e),{})}var m=p();function h(e,t){try{return t in e}catch{return!1}}var g=class extends Error{static __h3_error__=!0;statusCode=500;fatal=!1;unhandled=!1;statusMessage;data;cause;constructor(e,t={}){super(e,t),t.cause&&!this.cause&&(this.cause=t.cause)}toJSON(){let e={message:this.message,statusCode:x(this.statusCode,500)};return this.statusMessage&&(e.statusMessage=b(this.statusMessage)),this.data!==void 0&&(e.data=this.data),e}};function _(e){if(typeof e==`string`)return new g(e);if(v(e))return e;let t=new g(e.message??e.statusMessage??``,{cause:e.cause||e});if(h(e,`stack`))try{Object.defineProperty(t,`stack`,{get(){return e.stack}})}catch{try{t.stack=e.stack}catch{}}if(e.data&&(t.data=e.data),e.statusCode?t.statusCode=x(e.statusCode,t.statusCode):e.status&&(t.statusCode=x(e.status,t.statusCode)),e.statusMessage?t.statusMessage=e.statusMessage:e.statusText&&(t.statusMessage=e.statusText),t.statusMessage){let e=t.statusMessage;b(t.statusMessage)!==e&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return e.fatal!==void 0&&(t.fatal=e.fatal),e.unhandled!==void 0&&(t.unhandled=e.unhandled),t}function v(e){return e?.constructor?.__h3_error__===!0}var y=/[^\u0009\u0020-\u007E]/g;function b(e=``){return e.replace(y,``)}function x(e,t=200){return!e||(typeof e==`string`&&(e=Number.parseInt(e,10)),e<100||e>999)?t:e}globalThis.Headers,globalThis.Response;var S=Symbol(`layout-meta`),C=Symbol(`route`),w=()=>r()?.$router,T=()=>t()?e(C,r()._route):r()._route;function E(e){return e}var D=()=>{try{if(r()._processingMiddleware)return!0}catch{return!1}return!1},O=(e,t)=>{e||=`/`;let n=typeof e==`string`?e:`path`in e?k(e):w().resolve(e).href;if(t?.open){let{target:e=`_blank`,windowFeatures:r={}}=t.open,i=[];for(let[e,t]of Object.entries(r))t!==void 0&&i.push(`${e.toLowerCase()}=${t}`);return open(n,e,i.join(`, `)),Promise.resolve()}let o=l(n,{acceptRelative:!0}),c=t?.external||o;if(c){if(!t?.external)throw Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");let{protocol:e}=new URL(n,window.location.href);if(e&&i(e))throw Error(`Cannot navigate to a URL with '${e}' protocol.`)}let u=D();if(!c&&u){if(t?.replace){if(typeof e==`string`){let{pathname:t,search:n,hash:r}=s(e);return{path:t,...n&&{query:a(n)},...r&&{hash:r},replace:!0}}return{...e,replace:!0}}return e}let d=w(),f=r();if(c)return f._scope.stop(),t?.replace?location.replace(n):location.href=n,u?f.isHydrating?new Promise(()=>{}):!1:Promise.resolve();let p=typeof e==`string`?A(e):e;return t?.replace?d.replace(p):d.push(p)};function k(e){return o(e.path||``,e.query||{})+(e.hash||``)}function A(e){let t=s(e);return c(u(t.pathname))+t.search+t.hash}var j=`__nuxt_error`,M=()=>n(r().payload,`error`),N=e=>{let t=I(e);try{let e=M();r().hooks.callHook(`app:error`,t),e.value||=t}catch{throw t}return t},P=async(e={})=>{let t=r(),n=M();t.callHook(`app:error:cleared`,e),e.redirect&&await w().replace(e.redirect),n.value=void 0},F=e=>!!e&&typeof e==`object`&&`__nuxt_error`in e,I=e=>{typeof e!=`string`&&e.statusText&&(e.message??=e.statusText);let t=_(e);return Object.defineProperty(t,j,{value:!0,configurable:!1,writable:!1}),Object.defineProperty(t,`status`,{get:()=>t.statusCode,configurable:!0}),Object.defineProperty(t,`statusText`,{get:()=>t.statusMessage,configurable:!0}),t};export{M as a,O as c,w as d,S as f,N as i,k as l,m,I as n,E as o,C as p,F as r,A as s,P as t,T as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,C as t,W as n,Y as r}from"./pswINk0x.js";import{d as i}from"./Bdm1-Non.js";var a=e({__name:`index`,setup(e){return i().replace(`/configs`),(e,i)=>(n(),t(`div`,null,[r(e.$slots,`default`)]))}});export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,P as t,i as n}from"./
|
|
1
|
+
import{F as e,P as t,i as n}from"./pswINk0x.js";import{c as r}from"#entry";function i(r){let i=r||n();return i.ssrContext?.head||i.runWithContext(()=>{if(t()){let t=e(`usehead`);if(!t)throw Error(`[nuxt] [unhead] Missing Unhead instance.`);return t}})}function a(e,t={}){return r(e,{head:t.head||i(t.nuxt),...t})}export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,W as t,b as n,zt as r}from"./
|
|
1
|
+
import{C as e,W as t,b as n,zt as r}from"./pswINk0x.js";import{t as i}from"./Bt9z7wWW.js";import{t as a}from"./BDH0pOV6.js";var o={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},s={class:`max-w-520px text-center`},c=[`textContent`],l=[`textContent`],u=[`textContent`],d=a({__name:`error-500`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:500},statusText:{type:String,default:`Internal server error`},description:{type:String,default:`This page is temporarily unavailable.`},refresh:{type:String,default:`Refresh this page`}},setup(a){let d=a;return i({title:`${d.status} - ${d.statusText} | ${d.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(i,d)=>(t(),e(`div`,o,[n(`div`,s,[n(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:r(a.status)},null,8,c),n(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:r(a.statusText)},null,8,l),n(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:r(a.description)},null,8,u)])]))}},[[`__scopeId`,`data-v-d349100d`]]);export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e,c as t,g as n,h as r,m as i,p as a,s as o,u as s,w as c,y as l}from"./DKSsXTxC.js";import{$ as u,A as d,C as f,D as p,I as m,It as h,J as g,N as _,O as v,R as ee,Rt as te,S as y,U as b,W as x,Z as ne,b as S,et as C,ft as w,h as T,ht as E,nt as re,rt as D,tt as O,x as k,y as A,yt as j,zt as M}from"./pswINk0x.js";import{a as N,c as P,o as F,s as I}from"./CwjCYxLG.js";import{u as ie}from"./Bdm1-Non.js";import{n as L}from"#entry";import{i as R,o as z,t as ae}from"./Cfi2rMnF.js";import{a as oe,i as B,n as se,t as ce}from"./BGg6a0gq.js";import{t as le}from"./q_WJf-VC.js";import{t as ue}from"./CMyQ_JSA.js";var V=/\.[^.]+$/,H=/^stylelint-plugin-/,U=/^stylelint-/,W=/^(@[^/]+)\/stylelint-plugin(?:-(.+))?$/,de=/^(@[^/]+)\/stylelint-(.+)$/;function G(e){return new Set([...e].filter(e=>typeof e==`string`&&e.length>0))}function K(e){let t=e.split(`/`).filter(Boolean);if(!t.length)return``;if(t[0]?.startsWith(`@`)===!0){let e=t[0];if(t.length>=3){let n=t[1];return typeof n==`string`&&n.length>0?`${e}/${n}`:e??``}return e??``}return t[0]??``}function fe(e){let t=e.rules;return t?new Set(Object.keys(t).filter(e=>e.includes(`/`)).map(e=>K(e)).filter(Boolean)):new Set}function q(e){let t=e.trim();if(t.length===0)return[];let n=new Set([t]),r=W.exec(t);if(r){let e=r[1],t=r[2];typeof e==`string`&&e.length>0&&n.add(e),typeof e==`string`&&e.length>0&&typeof t==`string`&&t.length>0&&n.add(`${e}/${t}`),typeof t==`string`&&t.length>0&&n.add(t)}let i=de.exec(t);if(i){let e=i[1],t=i[2];typeof e==`string`&&e.length>0&&n.add(e),typeof e==`string`&&e.length>0&&typeof t==`string`&&t.length>0&&n.add(`${e}/${t}`),typeof t==`string`&&t.length>0&&n.add(t)}H.test(t)&&n.add(t.replace(H,``)),U.test(t)&&t!==`stylelint`&&n.add(t.replace(U,``));let a=t.split(`/`).at(-1);if(typeof a==`string`&&a.length>0){n.add(a);let e=a.replace(V,``);e.length>0&&n.add(e),H.test(a)&&n.add(a.replace(H,``)),H.test(e)&&n.add(e.replace(H,``)),U.test(a)&&a!==`stylelint`&&n.add(a.replace(U,``)),U.test(e)&&e!==`stylelint`&&n.add(e.replace(U,``))}return[...n]}function J(e,t,n=[]){let r=G(t),i=G(n),a=q(e);for(let e of a)if(r.has(e))return e;for(let e of a)for(let t of i)if(e===t||e.endsWith(`/${t}`)||e.endsWith(`-${t}`))return t;return``}function Y(e,t){if(!t.length)return!0;let n=K(e);return t.includes(n)}var pe=[`open`],me={block:``},X={class:`absolute right-[calc(100%+10px)] top-1.5`,"text-right":``,"font-mono":``,op35:``,"lt-lg:hidden":``},he={flex:`~ gap-2 items-center`,"cursor-pointer":``,"select-none":``,"bg-hover":``,px2:``,py2:``,"text-sm":``,"font-mono":``},ge={flex:``,"flex-auto":``,"flex-col":``,"flex-wrap":``,"gap-3":``,"md:flex-row":``,"md:justify-end":``},_e={key:1},ve=[`title`],ye=[`data-testid`],be={"pointer-events-none":``,absolute:``,"right-2":``,"top-2":``,"text-right":``,"text-5em":``,"font-mono":``,op5:``},xe={key:0,flex:`~ col gap-4`,"of-auto":``,px4:``,py3:``},Se={flex:`~ col gap-2`},Ce={flex:`~ gap-2 items-center wrap`},we={key:1,flex:`~ gap-2 items-center`},Te={flex:`~ col gap-2`},Ee={flex:`~ gap-2 items-center wrap`},De={key:0,"text-sm":``,op65:``},Oe={flex:`~ gap-2 items-center wrap`},ke=[`title`],Ae={flex:`~ col gap-2`},je={flex:`~ gap-2 items-center wrap`},Me={key:4,flex:`~ gap-2 items-start`},Ne={flex:`~ col gap-2`},Pe={border:`~ base rounded-full`,"bg-emerald:8":``,px3:``,"py0.5":``,"text-emerald7":``,"font-mono":``,"dark:text-emerald3":``},Fe={flex:`~ col gap-2`},Ie={key:0},Le={key:1},Re={flex:`~ gap-2 items-center wrap`},ze={class:`rounded-full bg-fuchsia:10 px3 py0.5 text-fuchsia7 font-mono dark:text-fuchsia3`},Be={"text-sm":``,op60:``},Ve={mt3:``,flex:`~ gap-2 items-start`},He={flex:`~ col gap-2`},Ue={flex:`~ gap-2 items-center wrap`},We={flex:`~ gap-2 items-center wrap`},Ge={key:0,"text-sm":``,op60:``},Ke={key:1,"text-sm":``,op60:``},qe=[`onClick`],Je={flex:`~ col gap-2`,"w-full":``},Ye={key:0,class:`grid gap-x-2 gap-y-1.5 md:grid-cols-[minmax(9rem,auto)_1fr]`},Xe={class:`text-zinc-700 font-600 dark:text-zinc-300`},Ze={key:0,class:`break-all rounded bg-black:8 px1.5 py0.5 text-zinc-800 dark:bg-zinc-900/50 dark:text-zinc-200`},Qe={key:1,class:`break-all rounded bg-black:6 px1.5 py0.5 text-zinc-700 dark:bg-zinc-900/35 dark:text-zinc-300`},$e=`40px_minmax(14rem,clamp(14rem,38vw,28rem))_5rem_minmax(0,1fr)`,Z=Object.assign(d({__name:`ConfigItem`,props:m({config:{},index:{},filters:{},active:{type:Boolean},matchedGlobs:{}},{open:{default:!0},openModifiers:{}}),emits:m([`badgeClick`],[`update:open`]),setup(e,{emit:t}){let s=e,c=t,l=new Set([`name`]),d=new Set([`index`]),m=/^stylelint\/override-(\d+)(?:\s+\(.+\))?$/,_=u(e,`open`),b=w(_.value),C=w(!1);if(!b.value){let e=O(()=>{_.value&&(b.value=!0,e())})}let E=A(()=>new Set(Object.values(o.value.rules).map(e=>e.plugin).filter(Boolean))),N=A(()=>fe(s.config)),P=A(()=>s.filters?.plugins??[]),F=A(()=>{let e=new Set;for(let t of P.value){if(!(t in(s.config.plugins??{})))continue;let n=nt(t);n&&e.add(n)}return[...e].toSorted((e,t)=>e.localeCompare(t))}),I=A(()=>Object.keys(s.config.plugins??{}).map(e=>{let t=nt(e);return{name:e,filter:t,hasPluginScopedRules:t.length>0&&N.value.has(t),isSelected:P.value.includes(e),style:{color:z(e),borderColor:z(e,.55),backgroundColor:z(e,.1)}}})),ie=A(()=>Object.keys(s.config.rules??{}).length),oe=A(()=>Object.keys(s.config.rules??{}).filter(e=>Y(e,F.value)).length),ue=A(()=>P.value.length>0),V=A(()=>F.value.length>0),H=A(()=>s.config.name===`stylelint/root`||s.config.name===`stylelint/resolved/root`),U=A(()=>H.value?o.value.meta.stylelintIgnore:void 0),W=w(),de=w(),G=w(),K=w(),q=w(),Z=w(),et=w(),tt=w();function nt(e){return J(e,E.value,N.value)}function rt(e){return Y(e,F.value)}function it(e){return a.dimDisabledRules&&i(s.config.rules?.[e])===`off`?`rule-muted-off`:``}let at=A(()=>{let e=o.value.filesResolved?.configToFiles;return e?e.get(s.config.index)?.size??0:0}),Q=A(()=>{let e=[`files`,`plugins`,`ignores`,`rules`,`extends`,`customSyntax`,`name`,`index`];return Object.fromEntries(Object.entries(s.config).filter(([t])=>!e.includes(t)))});function ot(e){return e==null||[`string`,`number`,`boolean`].includes(typeof e)}let $=A(()=>{let e=s.config.name??``;if(e===`stylelint/root`||e===`stylelint/resolved/root`)return{text:`Root`,colorClass:`text-sky6 dark:text-sky3`,bgClass:`bg-sky:8`};let t=m.exec(e);if(t?.[1]){let e=s.config.files?.flat().join(`, `);return{text:e||`Override #${t[1]}`,title:e||`Override #${t[1]}`,colorClass:`text-amber6 dark:text-amber3`,bgClass:`bg-amber:10`}}}),st=A(()=>{let e=Object.keys(Q.value).length,t=Object.keys(s.config.plugins??{}).length,n=s.config.extends?.length??0,r=Object.keys(s.config.rules??{}).length,i=s.config.ignores?.length??0,a=U.value?.patterns.length??0;return[{key:`stylelintignore`,icon:`i-ph-file-x-duotone`,number:a,color:`text-fuchsia5 dark:text-fuchsia4`,title:`.stylelintignore`,clickable:a>0,section:`stylelintignore`},{key:`ignores`,icon:`i-ph-eye-closed-duotone`,number:i,color:`text-purple5 dark:text-purple4`,title:`ignoreFiles`,clickable:i>0,section:`ignores`},{key:`options`,icon:`i-ph-sliders-duotone`,number:e,color:`text-green5`,title:`Options`,clickable:e>0,section:`options`},{key:`files`,icon:`i-ph-file-magnifying-glass-duotone`,number:at.value,color:`text-yellow5`,title:`Files`,clickable:at.value>0||!!s.config.files,section:`files`},{key:`plugins`,icon:`i-ph-plug-duotone`,number:t,color:`text-teal5`,title:`Plugins`,clickable:t>0,section:`plugins`},{key:`extends`,icon:`i-ph-stack-plus-duotone`,number:n,color:`text-violet5`,title:`Extends`,clickable:n>0,section:`extends`},{key:`rules`,icon:`i-ph-list-dashes-duotone`,number:r,color:`text-blue5 dark:text-blue4`,title:`Rules`,clickable:r>0,section:`rules`,extraClass:`mr-2`}]});async function ct(e){_.value=!0,e===`options`&&(C.value=!0),e===`stylelintignore`&&Z.value&&(Z.value.open=!0),await ee(),{files:W.value,plugins:de.value,extends:G.value,ignores:K.value,stylelintignore:q.value,rules:et.value,options:tt.value}[e]?.scrollIntoView({behavior:`smooth`,block:`center`})}return(t,a)=>{let o=R,s=le,u=ae,m=se,ee=ce,w=ne(`close-popper`);return x(),f(`details`,{class:h([`flat-config-item`,e.active?`border-yellow:70`:`border-base`]),open:_.value,border:`~ rounded-lg`,relative:``,onToggle:a[2]||=e=>_.value=e.target.open},[S(`summary`,me,[S(`div`,X,` #`+M(e.index+1),1),S(`div`,he,[a[3]||=S(`div`,{class:`[details[open]_&]:rotate-90`,"i-ph-caret-right":``,"flex-none":``,op50:``,transition:``},null,-1),S(`div`,ge,[S(`span`,{class:h(e.config.name?``:`op50 italic`),flex:`~ gap-2 items-center`,"flex-1":``},[e.config.name?(x(),k(o,{key:0,name:e.config.name},null,8,[`name`])):(x(),f(`span`,_e,`anonymous #`+M(e.index+1),1)),$.value?(x(),f(`code`,{key:2,border:`~ base rounded-full`,title:$.value.title??$.value.text,class:h([`max-w-[min(48vw,34rem)] of-hidden text-ellipsis ws-nowrap`,[$.value.colorClass,$.value.bgClass]]),px2:``,"py0.2":``,"text-xs":``},M($.value.text),11,ve)):y(``,!0)],2),S(`div`,{"data-testid":j(L).configs.summaryGrid,class:`grid grid-cols-7 items-center justify-items-end gap-2`},[(x(!0),f(T,null,g(st.value,e=>(x(),k(s,{key:e.key,"data-testid":j(L).configs.summaryItem,class:h([`w-14 justify-between`,e.extraClass]),icon:e.icon,number:e.number,color:e.color,title:e.title,clickable:e.clickable,onClick:t=>ct(e.section)},null,8,[`data-testid`,`icon`,`number`,`color`,`title`,`clickable`,`class`,`onClick`]))),128))],8,ye)])])]),S(`div`,be,` #`+M(e.index+1),1),b.value?(x(),f(`div`,xe,[e.config.files?(x(),f(`div`,{key:0,ref_key:`filesSectionEl`,ref:W,flex:`~ gap-2 items-start`},[a[5]||=S(`div`,{"i-ph-file-magnifying-glass-duotone":``,my1:``,"flex-none":``},null,-1),S(`div`,Se,[a[4]||=S(`div`,null,`Applies to files matching`,-1),S(`div`,Ce,[(x(!0),f(T,null,g(e.config.files?.flat(),(t,n)=>(x(),k(u,{key:n,glob:t,popup:`files`,variant:`files`,active:e.matchedGlobs?.includes(t)},null,8,[`glob`,`active`]))),128))])])],512)):e.config.rules||Object.keys(Q.value).length?(x(),f(`div`,we,[...a[6]||=[S(`div`,{"i-ph-files-duotone":``,"flex-none":``},null,-1),S(`div`,null,`Generally applies to all files`,-1)]])):y(``,!0),e.config.plugins?(x(),f(`div`,{key:2,ref_key:`pluginsSectionEl`,ref:de,flex:`~ gap-2 items-start`},[a[7]||=S(`div`,{"i-ph-plug-duotone":``,my1:``,"flex-none":``},null,-1),S(`div`,Te,[S(`div`,Ee,[S(`span`,null,`Plugins (`+M(I.value.length)+`)`,1)]),N.value.size?y(``,!0):(x(),f(`div`,De,` No plugin-scoped rules are declared in this config item; these plugins likely augment core rules, syntax, or metadata. `)),S(`div`,Oe,[(x(!0),f(T,null,g(I.value,e=>(x(),f(`code`,{key:e.name,class:h([`badge border border-transparent rounded-full px-2.5 py-0.5 text-sm leading-4`,[e.hasPluginScopedRules?`ring-1 ring-teal/25 shadow-sm`:`opacity-80`,e.isSelected?`ring-2 ring-violet/45 shadow-sm`:``]]),style:te(e.style),"font-mono":``,title:e.hasPluginScopedRules?`Plugin-scoped rules detected here under ${e.filter}`:`No plugin-scoped rule names detected in this config item`},M(e.name),15,ke))),128))])])],512)):y(``,!0),e.config.extends?.length?(x(),f(`div`,{key:3,ref_key:`extendsSectionEl`,ref:G,flex:`~ gap-2 items-start`},[a[8]||=S(`div`,{"i-ph-stack-plus-duotone":``,my1:``,"flex-none":``},null,-1),S(`div`,Ae,[S(`div`,null,`Extends (`+M(e.config.extends.length)+`)`,1),S(`div`,je,[(x(!0),f(T,null,g(e.config.extends,(e,t)=>(x(),f(`code`,{key:t,border:`~ base rounded-full`,"bg-violet:8":``,px3:``,"py0.5":``,"text-violet7":``,"font-mono":``,"dark:text-violet3":``},M(e),1))),128))])])],512)):y(``,!0),e.config.customSyntax?(x(),f(`div`,Me,[a[10]||=S(`div`,{"i-ph-file-code-duotone":``,my1:``,"flex-none":``},null,-1),S(`div`,Ne,[a[9]||=S(`div`,null,`Custom syntax`,-1),S(`code`,Pe,M(e.config.customSyntax),1)])])):y(``,!0),e.config.ignores?(x(),f(`div`,{key:5,ref_key:`ignoresSectionEl`,ref:K,flex:`~ gap-2 items-start`},[a[12]||=S(`div`,{"i-ph-eye-closed-duotone":``,my1:``,"flex-none":``},null,-1),S(`div`,Fe,[Object.keys(e.config).some(e=>e!==`ignores`&&!j(d).has(e)&&!j(l).has(e))===!1?(x(),f(`div`,Ie,` Ignore files globally `)):(x(),f(`div`,Le,` ignoreFiles `)),a[11]||=S(`div`,{"text-sm":``,op65:``},[p(` This shows config-level `),S(`code`,null,`ignoreFiles`),p(` patterns, not entries from `),S(`code`,null,`.stylelintignore`),p(`. `)],-1),S(`div`,Re,[(x(!0),f(T,null,g(e.config.ignores,(t,n)=>(x(),k(u,{key:n,glob:t,variant:`ignore-files`,active:e.matchedGlobs?.includes(t)},null,8,[`glob`,`active`]))),128))])])],512)):y(``,!0),U.value?.patterns.length?(x(),f(`details`,{key:6,ref_key:`stylelintIgnoreDetailsEl`,ref:Z,class:`border border-fuchsia/18 rounded-lg bg-fuchsia/5 p3`},[S(`summary`,{ref_key:`stylelintIgnoreSectionEl`,ref:q,flex:`~ gap-2 items-center wrap`,"cursor-pointer":``,"select-none":``},[a[13]||=S(`div`,{"i-ph-file-x-duotone":``,"flex-none":``,"text-fuchsia5":``},null,-1),a[14]||=S(`span`,{"font-medium":``},`.stylelintignore`,-1),S(`code`,ze,M(U.value.path),1),S(`span`,Be,M(U.value.patterns.length)+` patterns `,1),a[15]||=S(`div`,{"i-ph-caret-right":``,class:`[details[open]_&]:rotate-90`,op50:``,transition:``},null,-1)],512),S(`div`,Ve,[a[17]||=S(`div`,{"i-ph-eye-slash-duotone":``,my1:``,"flex-none":``,"text-fuchsia5":``},null,-1),S(`div`,He,[a[16]||=S(`div`,{"text-sm":``,op65:``},[p(` Workspace-level ignore patterns loaded from `),S(`code`,null,`.stylelintignore`),p(`. `)],-1),S(`div`,Ue,[(x(!0),f(T,null,g(U.value.patterns,(t,n)=>(x(),k(u,{key:n,glob:t,variant:`stylelintignore`,active:e.matchedGlobs?.includes(t)},null,8,[`glob`,`active`]))),128))])])])],512)):y(``,!0),e.config.rules&&Object.keys(e.config.rules).length?(x(),f(`div`,{key:7,ref_key:`rulesSectionEl`,ref:et},[S(`div`,We,[a[19]||=S(`div`,{"i-ph-list-dashes-duotone":``,my1:``,"flex-none":``},null,-1),S(`div`,null,[a[18]||=p(` Rules `,-1),V.value?(x(),f(T,{key:0},[p(` (`+M(oe.value)+` / `+M(ie.value)+`) `,1)],64)):(x(),f(T,{key:1},[p(` (`+M(ie.value)+`) `,1)],64))]),V.value?(x(),f(`div`,Ge,` filtered by the page plugin filter `)):ue.value?(x(),f(`div`,Ke,` selected plugin package has no plugin-scoped rules here `)):y(``,!0)]),v(ee,{py2:``,"grid-view":!1,"list-columns":$e,rules:e.config.rules,filter:t=>(!e.filters?.rule||e.filters.rule===t)&&rt(t),"get-bind":e=>({class:it(e)})},{popup:re(({ruleName:t,value:a})=>[v(m,{border:`t base`,"is-local":!0,state:{name:t,level:j(i)(a),configIndex:e.index,primaryOption:j(n)(a),options:j(r)(a)}},null,8,[`state`])]),"popup-actions":re(({ruleName:e})=>[D((x(),f(`button`,{"btn-action-sm":``,onClick:t=>c(`badgeClick`,e)},[...a[20]||=[S(`div`,{"i-ph-funnel-duotone":``},null,-1),p(` Filter by this rule `,-1)]],8,qe)),[[w]])]),_:1},8,[`rules`,`filter`,`get-bind`]),S(`div`,null,[e.filters?.rule?(x(),f(`button`,{key:0,ml8:``,op50:``,onClick:a[0]||=e=>c(`badgeClick`,``)},` ...`+M(Object.keys(e.config.rules).filter(t=>t!==e.filters?.rule).length)+` others rules are hidden `,1)):y(``,!0)])],512)):y(``,!0),Object.keys(Q.value).length?(x(),f(`div`,{key:8,ref_key:`optionsSectionEl`,ref:tt,flex:`~ gap-2`},[a[21]||=S(`div`,{"i-ph-sliders-duotone":``,my1:``,"flex-none":``},null,-1),S(`div`,Je,[S(`button`,{class:`w-fit flex items-center gap-1 text-sm text-zinc-700 dark:text-zinc-300 hover:text-zinc-900 dark:hover:text-zinc-100`,onClick:a[1]||=e=>C.value=!C.value},[S(`span`,null,`Additional configurations (`+M(Object.keys(Q.value).length)+`)`,1),S(`span`,{"i-ph-caret-down-fill":``,"transition-transform":``,class:h(C.value?`rotate-180`:``)},null,2)]),C.value?(x(),f(`div`,Ye,[(x(!0),f(T,null,g(Q.value,(e,t)=>(x(),f(T,{key:t},[S(`span`,Xe,M(t)+`:`,1),ot(e)?(x(),f(`code`,Ze,M(j(B)(e)),1)):(x(),f(`code`,Qe,M(JSON.stringify(e)),1))],64))),128))])):y(``,!0)])],512)):y(``,!0)])):y(``,!0)],42,pe)}}}),{__name:`ConfigItem`}),et={flex:`~ col gap-3`,py4:``},tt={relative:``,flex:``},nt={pos:`absolute left-8 right-8 top-1/1`,border:`~ base rounded`,flex:`~ col`,"z-1":``,"mt--1":``,"max-h-80":``,"of-auto":``,"bg-glass":``,py1:``,shadow:``},rt=[`onClick`],it={key:0,flex:`~ gap-2 items-center wrap`,mb2:``},at={key:0},Q={key:0,op50:``},ot={key:1},$={flex:`~ gap-2 items-center`,border:`~ blue/20 rounded-full`,"bg-violet:10":``,px3:``,py1:``},st={key:1,grid:`~ cols-[max-content_1fr] gap-2`,my2:``,"items-center":``},ct={class:`space-y-2`},lt={class:`flex flex-wrap items-center gap-2`},ut=[`onClick`],dt={flex:`~ gap-2 items-center wrap`},ft={key:0,border:`~ base rounded`,flex:``},pt={key:1,flex:`~ gap-2 items-center`,ml2:``,"select-none":``},mt=[`checked`],ht={flex:`~ items-center gap-1`},gt={flex:`~ gap-1`},_t={flex:`~ gap-2 items-center wrap`},vt={class:`flat-config-item`,border:`~ base rounded-lg`,relative:``},yt={block:``},bt={flex:`~ gap-2 items-start`,"cursor-pointer":``,"select-none":``,"bg-hover":``,px2:``,py2:``,"text-sm":``,"font-mono":``,op75:``},xt={class:`flat-config-item`,border:`~ base rounded-lg`,open:``,relative:``},St={block:``},Ct={flex:`~ gap-2 items-start`,"cursor-pointer":``,"select-none":``,"bg-hover":``,px2:``,py2:``,"text-sm":``,"font-mono":``,op75:``},wt={px4:``,pt4:``},Tt={px4:``,pt4:``},Et=d({__name:`configs`,setup(n){let r=w(s.filepath),u=w(0),m=w(!1);function ne(){t.value=t.value.map(()=>!0)}function re(){t.value=t.value.map(()=>!1)}let L=E([]),R=E([]),B=E(null);O(()=>{let t=o.value.configs;s.filepath?(B.value=e(s.filepath,o.value.configs,o.value.meta.basePath),t=B.value.configs.length?[...new Set([...B.value.configs,...o.value.configsGeneral.filter(e=>!l(e)).map(e=>e.index)])].toSorted((e,t)=>e-t).map(e=>o.value.configs[e]):[]):B.value=null,s.rule&&(t=t.filter(e=>s.rule in(e.rules||{}))),R.value=t});let se=A(()=>{let e=new Set;for(let t of R.value)for(let n of Object.keys(t.plugins??{}))e.add(n);return[...e].toSorted((e,t)=>e.localeCompare(t))}),le=A(()=>se.value.map(e=>({value:e,title:e,style:{color:z(e),borderColor:z(e,.55),backgroundColor:z(e,.1)}}))),V=A(()=>s.plugins.length>0),H=A(()=>!!(s.filepath||s.rule||s.plugins.length)),U=A(()=>!!(s.filepath||s.rule));function W(e){return s.plugins.includes(e)}function de(e){let t=new Set(s.plugins);t.has(e)?t.delete(e):t.add(e),s.plugins=[...t].toSorted((e,t)=>e.localeCompare(t))}function G(){s.plugins=[]}function K(){s.filepath=``,r.value=``,m.value=!1,u.value=0}function fe(){K(),s.rule=``,G()}O(()=>{let e=new Set(se.value),t=s.plugins.filter(t=>e.has(t));t.length!==s.plugins.length&&(s.plugins=t)}),O(()=>{let e=R.value;s.plugins.length&&(e=e.filter(e=>s.plugins.some(t=>t in(e.plugins??{})))),L.value=e});let q=A(()=>new ue(o.value.filesResolved?.list||[],{threshold:.3,includeMatches:!0})),J=A(()=>q.value.search(s.filepath||``));function Y(e=u.value){m.value&&=(r.value=s.filepath=J.value[e]?.item||s.filepath,!1)}function pe(){setTimeout(()=>{m.value=!1},100)}function me(e){m.value&&(u.value+=e,u.value<0&&(u.value+=J.value.length),u.value>=J.value.length&&(u.value-=J.value.length))}let X=A(()=>{if(!s.filepath||a.viewFileMatchType!==`merged`)return{all:{},common:{},specific:{},specificDisabled:{},specificEnabled:{}};let e={},t={},n={};L.value.forEach(r=>{r.rules&&(Object.assign(e,r.rules),r.files?Object.assign(n,r.rules):Object.assign(t,r.rules))});let r=Object.fromEntries(Object.entries(n).filter(([e,t])=>i(t)===`off`)),o=Object.fromEntries(Object.entries(n).filter(([e,t])=>i(t)!==`off`));for(let t in e)i(e[t])===`off`&&delete e[t];return{all:e,common:t,specific:n,specificDisabled:r,specificEnabled:o}}),he=d({props:{matches:Array},setup(e){return()=>e.matches?.map(e=>{let t=0,n=e.value||``,r=[];for(let[i,a]of e.indices)t<i&&r.push(_(`span`,{class:`op50`},n.slice(t,i))),r.push(_(`span`,{class:`text-purple font-bold`},n.slice(i,a+1))),t=a+1;return t<n.length&&r.push(_(`span`,{class:`op50`},n.slice(t))),r})}});c(()=>r.value,()=>{s.filepath=r.value,u.value=0},{debounce:200}),C(()=>s.filepath,()=>{s.filepath!==r.value&&(r.value=s.filepath)},{flush:`sync`});let ge=new Map,_e=ie();return b(async()=>{if(_e.query.index!=null){let e=Number(_e.query.index)-1;t.value=t.value.map((t,n)=>n===e),await ee(),ge.get(e)?.scrollIntoView({behavior:`smooth`,block:`start`})}}),(e,n)=>{let i=oe,c=ae,l=ce,d=Z;return x(),f(`div`,null,[S(`div`,et,[S(`div`,tt,[D(S(`input`,{"onUpdate:modelValue":n[0]||=e=>r.value=e,placeholder:`Test matching with filepath...`,border:`~ base rounded-full`,class:h(r.value?`font-mono`:``),"w-full":``,"bg-transparent":``,px3:``,py2:``,pl10:``,"outline-none":``,onFocus:n[1]||=e=>m.value=!0,onClick:n[2]||=e=>m.value=!0,onBlur:pe,onKeydown:[n[3]||=I(e=>m.value=!1,[`esc`]),n[4]||=I(P(e=>me(1),[`prevent`]),[`down`]),n[5]||=I(P(e=>me(-1),[`prevent`]),[`up`]),n[6]||=I(P(e=>Y(),[`prevent`]),[`enter`])]},null,34),[[N,r.value]]),n[15]||=S(`div`,{absolute:``,"bottom-0":``,"left-0":``,"top-0":``,flex:`~ items-center justify-center`,p4:``,op50:``},[S(`div`,{"i-ph-magnifying-glass-duotone":``})],-1),D(S(`div`,nt,[(x(!0),f(T,null,g(J.value,(e,t)=>(x(),f(`button`,{key:e.item,class:h(t===u.value?`bg-active`:``),px3:``,"py0.5":``,"text-left":``,"font-mono":``,"hover:bg-active":``,onClick:e=>Y(t)},[e.matches?(x(),k(j(he),{key:0,matches:e.matches},null,8,[`matches`])):(x(),f(T,{key:1},[p(M(e.item),1)],64))],10,rt))),128))],512),[[F,m.value&&J.value.length]])]),U.value?(x(),f(`div`,it,[j(s).filepath?(x(),f(`div`,at,[S(`div`,{flex:`~ gap-2 items-center wrap`,border:`~ purple/20 rounded-full`,"bg-purple:10":``,px3:``,py1:``,class:h({"saturate-0":!L.value.length})},[n[21]||=S(`div`,{"i-ph-file-dotted-duotone":``,"text-purple":``},null,-1),n[22]||=S(`span`,{op50:``},`Filepath`,-1),S(`code`,null,M(j(s).filepath),1),L.value.length?j(a).viewFileMatchType===`configs`?(x(),f(T,{key:1},[n[16]||=S(`span`,{op50:``},`matched with`,-1),S(`span`,null,M(L.value.length)+` / `+M(j(o).configs.length),1),n[17]||=S(`span`,{op50:``},`config items`,-1)],64)):(x(),f(T,{key:2},[n[18]||=S(`span`,{op50:``},`matched with total `,-1),S(`span`,null,M(Object.keys(X.value.all).length),1),n[19]||=S(`span`,{op50:``},`rules, `,-1),S(`span`,null,M(Object.keys(X.value.specific).length),1),n[20]||=S(`span`,{op50:``},`of them are specific to the file`,-1)],64)):(x(),f(`span`,Q,`is not included or has been ignored`)),S(`button`,{"i-ph-x":``,"text-sm":``,op25:``,"hover:op100":``,onClick:n[7]||=e=>K()})],2)])):y(``,!0),j(s).rule?(x(),f(`div`,ot,[S(`div`,$,[n[23]||=S(`div`,{"i-ph-funnel-duotone":``},null,-1),n[24]||=S(`span`,{op50:``},`Filtered by`,-1),v(i,{name:j(s).rule},null,8,[`name`]),n[25]||=S(`span`,{op50:``},`rule`,-1),S(`button`,{"i-ph-x":``,"text-sm":``,op25:``,"hover:op100":``,onClick:n[8]||=e=>j(s).rule=``})])])):y(``,!0)])):y(``,!0),le.value.length?(x(),f(`div`,st,[n[27]||=S(`div`,{"text-right":``,"text-sm":``,op50:``},` Plugin rules `,-1),S(`div`,ct,[n[26]||=S(`div`,{class:`text-xs text-zinc-600 font-semibold tracking-wide uppercase dark:text-zinc-300/85`},` Filter all configs by plugin-scoped rules `,-1),S(`div`,lt,[S(`button`,{type:`button`,class:h([`plugin-filter-button badge border border-base px-2 py-0.5 text-xs transition`,[V.value?`bg-white/65 text-zinc-700 hover:bg-black/6 dark:bg-zinc-900/30 dark:text-zinc-300 dark:hover:bg-zinc-800/50`:`bg-violet-100 text-violet-800 dark:bg-zinc-700/45 dark:text-zinc-100`]]),onClick:G},` All plugins `,2),(x(!0),f(T,null,g(le.value,e=>(x(),f(`button`,{key:e.value,type:`button`,class:h([`plugin-filter-button badge border border-base px-2 py-0.5 text-xs transition`,[W(e.value)?`bg-violet-100 text-violet-800 opacity-100 dark:bg-zinc-700/45 dark:text-zinc-100`:V.value?`bg-white/65 text-zinc-700 opacity-55 hover:opacity-85 dark:bg-zinc-900/30 dark:text-zinc-300 dark:opacity-45 dark:hover:opacity-80`:`bg-white/65 text-zinc-700 hover:bg-black/6 dark:bg-zinc-900/30 dark:text-zinc-300 dark:hover:bg-zinc-800/50`]]),style:te(e.style),onClick:t=>de(e.value)},M(e.title),15,ut))),128))])])])):y(``,!0),S(`div`,dt,[j(s).filepath?(x(),f(`div`,ft,[S(`button`,{class:h(j(a).viewFileMatchType===`configs`?`btn-action-active`:`op50`),"btn-action":``,"border-none":``,onClick:n[9]||=e=>j(a).viewFileMatchType=j(a).viewFileMatchType===`configs`?`merged`:`configs`},[...n[28]||=[S(`div`,{"i-ph-stack-duotone":``},null,-1),S(`span`,null,`Matched Config Items`,-1)]],2),n[30]||=S(`div`,{border:`l base`},null,-1),S(`button`,{class:h(j(a).viewFileMatchType===`configs`?`op50`:`btn-action-active`),"btn-action":``,"border-none":``,onClick:n[10]||=e=>j(a).viewFileMatchType=j(a).viewFileMatchType===`configs`?`merged`:`configs`},[...n[29]||=[S(`div`,{"i-ph-film-script-duotone":``},null,-1),S(`span`,null,`Merged Rules`,-1)]],2)])):y(``,!0),j(s).filepath&&j(a).viewFileMatchType===`configs`?(x(),f(`label`,pt,[S(`input`,{checked:j(a).showSpecificOnly,type:`checkbox`,onChange:n[11]||=e=>j(a).showSpecificOnly=!!e.target.checked},null,40,mt),n[31]||=S(`span`,{op50:``},`Show Specific Rules Only`,-1)])):y(``,!0),n[35]||=S(`div`,{"flex-auto":``},null,-1),S(`div`,ht,[H.value?(x(),f(`button`,{key:0,"btn-action":``,px3:``,onClick:fe},[...n[32]||=[S(`div`,{"i-ph-funnel-duotone":``},null,-1),p(` Clear filters `,-1)]])):y(``,!0),S(`div`,gt,[S(`button`,{"btn-action":``,class:h({"btn-action-active":j(a).viewType===`list`}),onClick:n[12]||=e=>j(a).viewType=`list`},[...n[33]||=[S(`div`,{"i-ph-list-duotone":``},null,-1),p(` List `,-1)]],2),S(`button`,{"btn-action":``,class:h({"btn-action-active":j(a).viewType===`grid`}),onClick:n[13]||=e=>j(a).viewType=`grid`},[...n[34]||=[S(`div`,{"i-ph-grid-four-duotone":``},null,-1),p(` Grid `,-1)]],2)])]),S(`button`,{"btn-action":``,px3:``,onClick:ne},` Expand All `),S(`button`,{"btn-action":``,px3:``,onClick:re},` Collapse All `)]),L.value.length?(x(),f(T,{key:3},[j(s).filepath&&j(a).viewFileMatchType===`merged`?(x(),f(T,{key:0},[S(`details`,vt,[S(`summary`,yt,[S(`div`,bt,[n[38]||=S(`div`,{"i-ph-caret-right":``,class:`[details[open]_&]:rotate-90`,transition:``},null,-1),p(` Merged Rules: Common to every file (`+M(Object.keys(X.value.common).length)+` rules) `,1)])]),v(l,{m4:``,rules:X.value.common,"grid-view":!1},null,8,[`rules`])]),S(`details`,xt,[S(`summary`,St,[S(`div`,Ct,[n[39]||=S(`div`,{"i-ph-caret-right":``,class:`[details[open]_&]:rotate-90`,transition:``},null,-1),p(` Merged Rules: Specific to matched file (`+M(Object.keys(X.value.specific).length)+` rules) `,1)])]),Object.keys(X.value.specificDisabled).length?(x(),f(T,{key:0},[S(`div`,wt,` Disables (`+M(Object.keys(X.value.specificDisabled).length)+`) `,1),v(l,{m4:``,"grid-view":!1,"get-bind":e=>({class:`op50`}),rules:X.value.specificDisabled},null,8,[`rules`])],64)):y(``,!0),Object.keys(X.value.specificEnabled).length?(x(),f(T,{key:1},[S(`div`,Tt,` Enables (`+M(Object.keys(X.value.specificEnabled).length)+`) `,1),v(l,{m4:``,rules:X.value.specificEnabled,"grid-view":!1},null,8,[`rules`])],64)):y(``,!0)])],64)):(x(!0),f(T,{key:1},g(j(o).configs,(e,r)=>D((x(),k(d,{key:r,ref_for:!0,ref:e=>{j(ge).set(r,e?.$el)},open:j(t)[r],"onUpdate:open":e=>j(t)[r]=e,config:e,index:r,filters:j(s),active:!!(j(s).filepath&&e.files),"matched-globs":B.value?.globs,onBadgeClick:n[14]||=e=>j(s).rule=e},null,8,[`open`,`onUpdate:open`,`config`,`index`,`filters`,`active`,`matched-globs`])),[[F,L.value.includes(e)&&(!j(s).filepath||!j(a).showSpecificOnly||e.files)]])),128))],64)):(x(),f(T,{key:2},[n[37]||=S(`div`,{mt5:``,italic:``,op50:``},` No matched config items. `,-1),B.value?.globs.length?(x(),f(T,{key:0},[n[36]||=S(`div`,null,`Ignored by globs:`,-1),S(`div`,_t,[(x(!0),f(T,null,g(B.value.globs,(e,t)=>(x(),k(c,{key:t,glob:e,popup:`configs`},null,8,[`glob`]))),128))])],64)):y(``,!0)],64))])])}}});export{Et as default};
|