@nuxt/devtools 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +4 -2
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +37 -41
- package/dist/client/404.html +37 -41
- package/dist/client/_nuxt/{CodeDiff.vue.786903cd.js → CodeDiff.vue._dCq5f_z.js} +2 -2
- package/dist/client/_nuxt/{ComposableItem.vue.93291047.js → ComposableItem.vue.xjjgcokF.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.e78a09d4.js → DataSchemaButton.vue.xvehQ20c.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.f39b3d44.js → DataSchemaDrawer.IkoxYN9B.js} +91 -91
- package/dist/client/_nuxt/{DurationDisplay.vue.ce619fea.js → DurationDisplay.vue.EcbbfLCJ.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.e3761da9.js → FilepathItem.vue.KRS5685n.js} +1 -1
- package/dist/client/_nuxt/HelpFab.vue.K4yHYYQx.js +1 -0
- package/dist/client/_nuxt/LaunchPage.vue.TOWJvQ6t.js +1 -0
- package/dist/client/_nuxt/{NBadge.787d75d1.js → NBadge.IQAZmm2D.js} +1 -1
- package/dist/client/_nuxt/NCheckbox.vue._sgKubGr.js +1 -0
- package/dist/client/_nuxt/NCodeBlock.XH4dGkTz.css +1 -0
- package/dist/client/_nuxt/NCodeBlock.vue.2w5Cy5b6.js +2 -0
- package/dist/client/_nuxt/{NDrawer.vue.fa4b06a6.js → NDrawer.vue.16o-RaPU.js} +1 -1
- package/dist/client/_nuxt/NDropdown.vue.ZtGr97L2.js +1 -0
- package/dist/client/_nuxt/NIconTitle.vue.WxyT9iC2.js +1 -0
- package/dist/client/_nuxt/{NLink.vue.0a35d66d.js → NLink.vue.R78P2sWn.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.099cce55.js → NMarkdown.vue.cV8rBrR_.js} +1 -1
- package/dist/client/_nuxt/{NNavbar.vue.9cb56412.js → NNavbar.vue._6IXF0Xt.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.o39x0IHF.js +1 -0
- package/dist/client/_nuxt/{NSelect.vue.cdaf42b9.js → NSelect.vue.-sTE6wwQ.js} +1 -1
- package/dist/client/_nuxt/{NSelectTabs.vue.cf18ccbe.js → NSelectTabs.vue.fSn-iFey.js} +1 -1
- package/dist/client/_nuxt/{NSwitch.vue.6e493b89.js → NSwitch.vue.hSNKFLMl.js} +1 -1
- package/dist/client/_nuxt/{StacktraceList.vue.a54c08af.js → StacktraceList.vue.Gb_bhKzx.js} +1 -1
- package/dist/client/_nuxt/{StateEditor.vue.2b7dac11.js → StateEditor.vue.uD82H9Pv.js} +1 -1
- package/dist/client/_nuxt/{__blank.38ec0588.js → __blank.rg_1bnXo.js} +1 -1
- package/dist/client/_nuxt/{analyze-build.3c8ffa82.js → analyze-build.JxJ_8lFN.js} +1 -1
- package/dist/client/_nuxt/{assets.c6f98235.js → assets.1FyMcY8L.js} +3 -3
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/08fd0fd8-5cfa-4695-8e27-78457d182dae.json +1 -0
- package/dist/client/_nuxt/{client.7628b7e9.js → client.eqvAG3u2.js} +1 -1
- package/dist/client/_nuxt/{components.0df44336.js → components.cp8uehQU.js} +1 -1
- package/dist/client/_nuxt/{css.f61fd02b.js → css.a-KJtBLB.js} +19 -19
- package/dist/client/_nuxt/{custom-_name_.97248110.js → custom-_name_.djPre3b7.js} +1 -1
- package/dist/client/_nuxt/{default.80c1f1c2.js → default.7wQj6c36.js} +1 -1
- package/dist/client/_nuxt/diff.-l9-nN5b.js +1 -0
- package/dist/client/_nuxt/entry.AC_HBPW1.css +1 -0
- package/dist/client/_nuxt/entry.a1BLIhrc.js +48 -0
- package/dist/client/_nuxt/error-404.3dfc8fFE.js +1 -0
- package/dist/client/_nuxt/error-404.m36D2jj-.css +1 -0
- package/dist/client/_nuxt/{error-500.14a76226.js → error-500.qvz9zIUY.js} +1 -1
- package/dist/client/_nuxt/{error.81ad2d42.js → error.2PxdKqsT.js} +1 -1
- package/dist/client/_nuxt/full.w5ioE28h.js +1 -0
- package/dist/client/_nuxt/hooks.13fp5T8X.js +1 -0
- package/dist/client/_nuxt/{html.14085b69.js → html.0DSFJ4KV.js} +2 -2
- package/dist/client/_nuxt/{imports.996d62b8.js → imports.E-T17-Mp.js} +1 -1
- package/dist/client/_nuxt/{index.64fbc2ea.js → index.ctUdIrWg.js} +1 -1
- package/dist/client/_nuxt/javascript.Of8SnKfU.js +699 -0
- package/dist/client/_nuxt/{json-editor-vue.d503734c.js → json-editor-vue.C3M8qDH6.js} +47 -41
- package/dist/client/_nuxt/json.t1qiHl76.js +25 -0
- package/dist/client/_nuxt/{modules.56c28a7c.js → modules.z6wgZaun.js} +2 -2
- package/dist/client/_nuxt/{none.194e11c7.js → none.UJDcJL42.js} +1 -1
- package/dist/client/_nuxt/open-graph.ovVmSUH6.js +3 -0
- package/dist/client/_nuxt/{overview.17cbcb18.js → overview.RtevshhZ.js} +1 -1
- package/dist/client/_nuxt/{pages.7378ad18.js → pages.jN1YZniN.js} +1 -1
- package/dist/client/_nuxt/{payload.d51e3588.js → payload.QEY7GKAn.js} +1 -1
- package/dist/client/_nuxt/plugins.OPV4346K.js +1 -0
- package/dist/client/_nuxt/{runtime-configs.ea309d52.js → runtime-configs.BdJla29K.js} +1 -1
- package/dist/client/_nuxt/server-routes.7v7M6BNy.js +9 -0
- package/dist/client/_nuxt/settings.yb3IRCgQ.js +1 -0
- package/dist/client/_nuxt/shellscript.h1L64xId.js +4 -0
- package/dist/client/_nuxt/{state-components.bc8116fe.js → state-components.7HYELvqe.js} +1 -1
- package/dist/client/_nuxt/{state-modules.a9841149.js → state-modules.oo9Oe5GR.js} +1 -1
- package/dist/client/_nuxt/{storage-options.e85e583e.js → storage-options.fwiCb1uI.js} +1 -1
- package/dist/client/_nuxt/storage.DlSn8HWp.js +1 -0
- package/dist/client/_nuxt/{terminals.ae8551c9.js → terminals.XRY8ruVV.js} +4 -4
- package/dist/client/_nuxt/{timeline.595f30d2.js → timeline.AZ4Ag11k.js} +2 -2
- package/dist/client/_nuxt/typescript.b1Nw_bQe.js +666 -0
- package/dist/client/_nuxt/{unocss-runtime.2336828a.js → unocss-runtime.NnHejI5X.js} +2 -2
- package/dist/client/_nuxt/virtual-files.dM-a5WY-.js +1 -0
- package/dist/client/_nuxt/vitesse-dark.5VceXvs6.js +1 -0
- package/dist/client/_nuxt/vitesse-light.HOMMxGxw.js +1 -0
- package/dist/client/_nuxt/vue-html.KfgsLQjp.js +1 -0
- package/dist/client/_nuxt/vue.c6DnC5ch.js +2002 -0
- package/dist/client/_nuxt/{yaml.b29e536f.js → yaml.FtfhlYqU.js} +2 -2
- package/dist/client/index.html +37 -41
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/function-metrics-helpers.mjs +2 -1
- package/dist/runtime/plugins/view/client.mjs +3 -2
- package/dist/shared/{devtools.371fa152.mjs → devtools.fc176ede.mjs} +2 -2
- package/package.json +38 -38
- package/dist/client/_nuxt/HelpFab.vue.452fd066.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.5db0c060.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.7e495ed2.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.a117b19b.css +0 -1
- package/dist/client/_nuxt/NCodeBlock.vue.7e25538f.js +0 -2
- package/dist/client/_nuxt/NDropdown.vue.7a6942fe.js +0 -1
- package/dist/client/_nuxt/NIconTitle.vue.8e6741d5.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.f3242abf.js +0 -1
- package/dist/client/_nuxt/builds/meta/de4ce1fd-092b-47eb-98b3-1a9b7af1000f.json +0 -1
- package/dist/client/_nuxt/diff.22e0b108.js +0 -1
- package/dist/client/_nuxt/entry.52bc93cd.js +0 -27
- package/dist/client/_nuxt/entry.8bdf7dd8.css +0 -1
- package/dist/client/_nuxt/error-404.82ac0ec5.css +0 -1
- package/dist/client/_nuxt/error-404.c1c64157.js +0 -1
- package/dist/client/_nuxt/full.6e527000.js +0 -1
- package/dist/client/_nuxt/hooks.e54b1704.js +0 -1
- package/dist/client/_nuxt/javascript.b7d6d348.js +0 -699
- package/dist/client/_nuxt/json.709f1c4d.js +0 -25
- package/dist/client/_nuxt/open-graph.da61329c.js +0 -3
- package/dist/client/_nuxt/plugins.0aa922de.js +0 -1
- package/dist/client/_nuxt/server-routes.8a6576d0.js +0 -9
- package/dist/client/_nuxt/settings.d6b62c31.js +0 -1
- package/dist/client/_nuxt/shellscript.e25d1410.js +0 -4
- package/dist/client/_nuxt/storage.9ae52fa2.js +0 -1
- package/dist/client/_nuxt/typescript.24e7badf.js +0 -666
- package/dist/client/_nuxt/virtual-files.acddf2b7.js +0 -1
- package/dist/client/_nuxt/vitesse-dark.ff0e7dcb.js +0 -1
- package/dist/client/_nuxt/vitesse-light.c6996724.js +0 -1
- package/dist/client/_nuxt/vue-html.1cd5a6cc.js +0 -1
- package/dist/client/_nuxt/vue.e4f172c2.js +0 -5891
- /package/dist/client/_nuxt/{HelpFab.f179afc3.css → HelpFab.x07F_IqA.css} +0 -0
- /package/dist/client/_nuxt/{NSectionBlock.3af235cd.css → NSectionBlock.a3MwpCxg.css} +0 -0
- /package/dist/client/_nuxt/{assets.a19ea08e.css → assets.xk970LH3.css} +0 -0
- /package/dist/client/_nuxt/{constants.2cc6e981.js → constants.jFgWOlQV.js} +0 -0
- /package/dist/client/_nuxt/{error-500.ff959f66.css → error-500.oAiyMzGs.css} +0 -0
- /package/dist/client/_nuxt/{index.f5673bec.js → index.9SQHhWq3.js} +0 -0
- /package/dist/client/_nuxt/{nuxt-docs.100caa70.js → nuxt-docs.83FO1Cbd.js} +0 -0
- /package/dist/client/_nuxt/{onig.0c57a370.js → onig.mBJmD8D5.js} +0 -0
- /package/dist/client/_nuxt/{open-graph.058fa32c.css → open-graph.PgUMoob_.css} +0 -0
- /package/dist/client/_nuxt/{terminals.ae8c3544.css → terminals.GzwV8rXv.css} +0 -0
- /package/dist/client/_nuxt/{timeline.58bc6682.css → timeline.7wyW2pbe.css} +0 -0
- /package/dist/client/_nuxt/{vanilla-picker-NKbIFE8h.23409a58.js → vanilla-picker-NKbIFE8h.vtyeXros.js} +0 -0
- /package/dist/client/_nuxt/{virtual-files.a8748389.css → virtual-files.lmRDNyeH.css} +0 -0
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const n=Object.freeze({information_for_contributors:["This file has been converted from https://github.com/microsoft/vscode-JSON.tmLanguage/blob/master/JSON.tmLanguage","If you want to provide a fix or improvement, please create a pull request against the original repository.","Once accepted there, we are happy to receive an update request."],version:"https://github.com/microsoft/vscode-JSON.tmLanguage/commit/9bd83f1c252b375e957203f21793316203f61f70",name:"json",scopeName:"source.json",patterns:[{include:"#value"}],repository:{array:{begin:"\\[",beginCaptures:{0:{name:"punctuation.definition.array.begin.json"}},end:"\\]",endCaptures:{0:{name:"punctuation.definition.array.end.json"}},name:"meta.structure.array.json",patterns:[{include:"#value"},{match:",",name:"punctuation.separator.array.json"},{match:"[^\\s\\]]",name:"invalid.illegal.expected-array-separator.json"}]},comments:{patterns:[{begin:"/\\*\\*(?!/)",captures:{0:{name:"punctuation.definition.comment.json"}},end:"\\*/",name:"comment.block.documentation.json"},{begin:"/\\*",captures:{0:{name:"punctuation.definition.comment.json"}},end:"\\*/",name:"comment.block.json"},{captures:{1:{name:"punctuation.definition.comment.json"}},match:"(//).*$\\n?",name:"comment.line.double-slash.js"}]},constant:{match:"\\b(?:true|false|null)\\b",name:"constant.language.json"},number:{match:`(?x) # turn on extended mode
|
|
2
|
-
-? # an optional minus
|
|
3
|
-
(?:
|
|
4
|
-
0 # a zero
|
|
5
|
-
| # ...or...
|
|
6
|
-
[1-9] # a 1-9 character
|
|
7
|
-
\\d* # followed by zero or more digits
|
|
8
|
-
)
|
|
9
|
-
(?:
|
|
10
|
-
(?:
|
|
11
|
-
\\. # a period
|
|
12
|
-
\\d+ # followed by one or more digits
|
|
13
|
-
)?
|
|
14
|
-
(?:
|
|
15
|
-
[eE] # an e character
|
|
16
|
-
[+-]? # followed by an option +/-
|
|
17
|
-
\\d+ # followed by one or more digits
|
|
18
|
-
)? # make exponent optional
|
|
19
|
-
)? # make decimal portion optional`,name:"constant.numeric.json"},object:{begin:"\\{",beginCaptures:{0:{name:"punctuation.definition.dictionary.begin.json"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.dictionary.end.json"}},name:"meta.structure.dictionary.json",patterns:[{comment:"the JSON object key",include:"#objectkey"},{include:"#comments"},{begin:":",beginCaptures:{0:{name:"punctuation.separator.dictionary.key-value.json"}},end:"(,)|(?=\\})",endCaptures:{1:{name:"punctuation.separator.dictionary.pair.json"}},name:"meta.structure.dictionary.value.json",patterns:[{comment:"the JSON object value",include:"#value"},{match:"[^\\s,]",name:"invalid.illegal.expected-dictionary-separator.json"}]},{match:"[^\\s\\}]",name:"invalid.illegal.expected-dictionary-separator.json"}]},string:{begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.json"}},end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.json"}},name:"string.quoted.double.json",patterns:[{include:"#stringcontent"}]},objectkey:{begin:'"',beginCaptures:{0:{name:"punctuation.support.type.property-name.begin.json"}},end:'"',endCaptures:{0:{name:"punctuation.support.type.property-name.end.json"}},name:"string.json support.type.property-name.json",patterns:[{include:"#stringcontent"}]},stringcontent:{patterns:[{match:`(?x) # turn on extended mode
|
|
20
|
-
\\\\ # a literal backslash
|
|
21
|
-
(?: # ...followed by...
|
|
22
|
-
["\\\\/bfnrt] # one of these characters
|
|
23
|
-
| # ...or...
|
|
24
|
-
u # a u
|
|
25
|
-
[0-9a-fA-F]{4}) # and four hex digits`,name:"constant.character.escape.json"},{match:"\\\\.",name:"invalid.illegal.unrecognized-string-escape.json"}]},value:{patterns:[{include:"#constant"},{include:"#number"},{include:"#string"},{include:"#array"},{include:"#object"},{include:"#comments"}]}},displayName:"JSON"});var e=[n];export{e as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{d as N,a as C,aV as oe,e as ne,ac as G,r as A,f as t,h as I,j as _,p as x,o,k as e,m as a,n as B,G as O,t as p,F as S,i as d,v as $,ao as H,_ as J,a9 as R,aW as P,aX as ae,aY as se,aZ as re,y as ie,z as ce,q as le,a_ as de,a$ as pe,b0 as me,b as ue,b1 as ge,b2 as he,b3 as _e,b4 as E,ay as fe,a2 as ve,l as be,ae as we,I as z,X as xe}from"./entry.52bc93cd.js";import{_ as ye}from"./NNavbar.vue.9cb56412.js";import{_ as U}from"./NLink.vue.0a35d66d.js";import{_ as q}from"./NSectionBlock.f3242abf.js";import{_ as ke}from"./NCodeBlock.vue.7e25538f.js";import{_ as $e}from"./HelpFab.vue.452fd066.js";import"./NIconTitle.vue.8e6741d5.js";import"./client.7628b7e9.js";const K=[{name:"title",suggestion:"required",head:{title:"[title]"},seoMeta:{title:"[title]"},docs:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title",description:"A concise and descriptive title for the browser that accurately summarizes the content of the page."},{name:"description",suggestion:"required",head:{meta:[{name:"description",content:"[description]"}]},seoMeta:{description:"[description]"},description:"A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results."},{name:"icon",suggestion:"recommended",head:{link:[{rel:"icon",type:"image/png",href:"/favicon.png"}]},description:"A small image that appears in the browser tab and bookmark menu to help users easily identify the page."},{name:"lang",suggestion:"recommended",head:{htmlAttrs:{lang:"en"}},description:"The primary language of the page to help search engines and browsers understand the content."},{name:"og:title",suggestion:"recommended",head:{meta:[{property:"og:title",content:"[og:title]"}]},seoMeta:{ogTitle:"[og:title]"},docs:"https://ogp.me/#metadata",description:"A title for the link preview used by social media platforms."},{name:"og:description",suggestion:"recommended",head:{meta:[{property:"og:description",content:"[og:description]"}]},seoMeta:{ogDescription:"[og:description]"},docs:"https://ogp.me/#metadata",description:"A description for the link preview used by social media platforms."},{name:"og:image",suggestion:"recommended",head:{meta:[{property:"og:image",content:"[og:image]"}]},seoMeta:{ogImage:"[og:image]"},docs:"https://ogp.me/#metadata",description:"An image for the link preview used by social media platforms."},{name:"og:url",suggestion:"recommended",head:{meta:[{property:"og:url",content:"[og:url]"}]},seoMeta:{ogUrl:"[og:url]"},docs:"https://ogp.me/#metadata",description:"A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page."},{name:"twitter:title",suggestion:"recommended",head:{meta:[{name:"twitter:title",content:"[twitter:title]"}]},seoMeta:{twitterTitle:"[twitter:title]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A title for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:description",suggestion:"recommended",head:{meta:[{name:"twitter:description",content:"[twitter:description]"}]},seoMeta:{twitterDescription:"[twitter:description]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A description for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:image",suggestion:"recommended",head:{meta:[{name:"twitter:image",content:"[twitter:image]"}]},seoMeta:{twitterImage:"[twitter:image]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"An image for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:card",suggestion:"recommended",head:{meta:[{name:"twitter:card",content:"summary"}]},seoMeta:{twitterCard:"summary"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"The type of Twitter card to use, which determines the type of card to display in link previews on Twitter."}],Te={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},Se=["onClick"],Ce=e("div",{border:"b base","flex-auto":""},null,-1),Ne={key:0,"x-divider":""},Me={key:1,"x-divider":""},Oe={flex:"~ gap-1 items-center",class:"px2 pt2",lg:"px4 py2"},Ie=e("div",{"i-carbon-warning":"","text-orange":""},null,-1),Ae={"w-full":"",p2:"",op75:""},Be={key:1,m4:"",flex:"~ col gap-2"},Re={flex:"~ gap-1 wrap items-center"},Le={key:1},je={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Fe=N({__name:"OpenGraphMissingTabs",props:{tags:{},matchedRouteFilepath:{}},setup(h){const s=h,l=C(()=>K.filter(r=>!s.tags?.some(g=>g.name===r.name))),n=C(()=>{let r={};const g={};l.value.forEach(u=>{u.seoMeta?Object.assign(g,u.seoMeta):r=oe(r,u.head)});const b=[];if(Object.keys(g).length){const u=JSON.stringify(g,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useSeoMeta(${u})`)}if(Object.keys(r).length){const u=JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useHead(${u})`)}return b.join(`
|
|
2
|
-
|
|
3
|
-
`)}),m=ne(),y=G(),k=["Missing Tags","Code Snippet"],f=A(k[0]);return(r,g)=>{const b=U,u=H,T=J,M=ke,L=q;return t(l).length?(o(),I(L,{key:0,text:"Missing Tags",description:`${t(l).length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:_(()=>[e("div",Te,[(o(),a(S,null,B(k,(i,c)=>e("button",{key:c,px4:"",py2:"",border:"r t base",hover:"bg-active",class:O(i===t(f)?"":"border-b"),onClick:v=>f.value=i},[e("div",{class:O(i===t(f)?"":"op30"),capitalize:""},p(i),3)],10,Se)),64)),Ce]),t(f)===k[0]?(o(),I(u,{key:0,grid:"~ cols-[1fr] lg:cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:_(()=>[(o(!0),a(S,null,B(t(l),(i,c)=>(o(),a(S,{key:c},[c?(o(),a("div",Ne)):x("",!0),c?(o(),a("div",Me)):x("",!0),e("div",Oe,[Ie,d(b,{"op-50":"",href:i.docs,target:"_blank",n:"orange"},{default:_(()=>[$(p(i.name),1)]),_:2},1032,["href"])]),e("div",Ae,p(i.description),1)],64))),128))]),_:1})):(o(),a("div",Be,[e("p",Re,[d(T,{icon:"carbon-copy",n:"xs","px-2":"",onClick:g[0]||(g[0]=i=>t(m)(t(n),"open-graph-suggestion"))},{default:_(()=>[$(" Copy ")]),_:1}),$(" the following code snippet and paste it into your "),r.matchedRouteFilepath?(o(),I(T,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:g[1]||(g[1]=i=>t(y)(r.matchedRouteFilepath))},{default:_(()=>[$(" page component ")]),_:1})):(o(),a("span",Le,"page component")),$(" to full fill the missing tags. ")]),d(u,{relative:"","n-code-block":""},{default:_(()=>[d(M,{code:t(n),lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),e("div",je,[d(T,{icon:"carbon-copy",onClick:g[2]||(g[2]=i=>t(m)(t(n),"open-graph-suggestion"))},{default:_(()=>[$(" Copy ")]),_:1})])]),_:1})]))]),_:1},8,["description"])):x("",!0)}}}),De={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},ze={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Ve={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},Ee={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},Ge={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},He={class:"mt-[3px] block h-[18px] max-h-[80px] border-separate select-none overflow-hidden truncate whitespace-nowrap break-words text-left text-[14px] leading-[20px] op50",style:{"-webkit-line-clamp":"1","border-spacing":"0px","-webkit-box-orient":"vertical"}},Je=N({__name:"SocialFacebook",props:{card:{}},setup(h){return(s,l)=>(o(),a("div",De,[e("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",ze,[e("div",Ve,p(s.card.url),1),e("div",Ee,[e("div",Ge,p(s.card.title),1),e("div",He,p(s.card.description),1)])])]))}}),Pe={class:"max-w-[438px] min-w-[438px] of-hidden border border-base rounded-[16px] bg-base -outline-offset-1",style:{"font-family":"TwitterChirp, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif"}},Ue={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-[2px]"},qe={class:"overflow-hidden truncate whitespace-nowrap text-[15px] leading-[20px] lowercase op50"},Ke={class:"m-0 truncate text-[15px] font-semibold leading-[20px]"},We={class:"line-clamp-2 select-none overflow-hidden break-words text-left text-[15px] leading-[20px] op50"},Xe=N({__name:"SocialTwitter",props:{tags:{}},setup(h){const s=h,l=C(()=>P(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"twitter:image"},{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"twitter:image:alt"}],description:[{tag:"meta",name:"twitter:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]})),n=C(()=>l.value.image?s.tags.find(m=>m.tag==="meta"&&m.name==="twitter:card")?.value||"summary_large_image":"summary");return(m,y)=>(o(),a("div",Pe,[e("div",{class:O(["cursor-pointer overflow-hidden leading-[1.3em]",t(n)==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[t(n)==="summary_large_image"?(o(),a("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(t(l).image)})`})},null,4)):(o(),a("div",{key:1,class:"h-[129px] w-[129px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(t(l).image)})`})},null,4)),e("div",Ue,[e("div",qe,p(t(l).url),1),e("div",Ke,p(t(l).title),1),e("div",We,p(t(l).description),1)])],2)]))}}),Ye={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},Ze={class:"break-words p-[10px] antialiased"},Qe={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},et={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},tt={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},ot=N({__name:"SocialLinkedin",props:{card:{}},setup(h){return(s,l)=>(o(),a("div",Ye,[e("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:R({backgroundImage:`url(${JSON.stringify(s.card.image)})`})},null,4),e("div",Ze,[e("div",Qe,[e("div",et,p(s.card.title),1),e("div",tt,p(s.card.url),1)])])]))}}),nt=h=>(ie("data-v-6d584478"),h=h(),ce(),h),at={class:"relative max-w-[420px] min-w-[420px] rounded-[16px] rounded-bl-0 py-[6px] leading-[18px] drop-shadow-sm drop-shadow-color-[#10232f26] bg-base"},st={class:"pl-[10px] pr-[8px]"},rt={class:"text-[#3390ec] leading-normal underline"},it={class:"quote w-full flex"},ct={class:"flex flex-col gap-1"},lt={key:0,class:"my-[3px] overflow-hidden rounded"},dt=["src"],pt={class:"cursor-pointer text-sm text-[#3390ec]"},mt={class:"cursor-pointer text-sm"},ut={class:"cursor-pointer text-sm"},gt={class:"flex justify-end text-xs text-[#707579]"},ht=nt(()=>e("svg",{width:"11",height:"20",viewBox:"0 0 11 20",xmlns:"http://www.w3.org/2000/svg",class:"absolute bottom-0 ml-[-8.4px] translate-y-px text-white"},[e("g",{transform:"translate(9 -14)","fill-rule":"evenodd"},[e("path",{id:"corner-fill",d:"M-6 16h6v17c-.193-2.84-.876-5.767-2.05-8.782-.904-2.325-2.446-4.485-4.625-6.48A1 1 0 01-6 16z",transform:"matrix(1 0 0 -1 0 49)",fill:"currentColor"})])],-1)),_t=N({__name:"SocialTelegram",props:{card:{}},setup(h){const s=ae(),l=se(re(),"HH:mm");return(n,m)=>(o(),a("div",at,[e("div",st,[e("div",rt,p(n.card.url),1),e("div",it,[e("div",ct,[n.card.image?(o(),a("div",lt,[e("img",{class:"h-full max-w-full w-full rounded object-cover",src:n.card.image},null,8,dt)])):x("",!0),e("div",pt,[e("strong",null,p(t(s).hostname),1)]),e("div",mt,[e("strong",null,p(n.card.title),1)]),e("div",ut,p(n.card.description),1)])]),e("div",gt,[e("span",null,p(t(l)),1)])]),ht]))}});const ft=le(_t,[["__scopeId","data-v-6d584478"]]),vt={flex:"~ col"},bt={flex:"~ wrap","w-full":"","flex-none":""},wt=["onClick"],xt=e("div",{border:"b base","flex-auto":""},null,-1),yt={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},kt={key:0},$t={key:1},Tt={key:2},St={key:3},Ct=N({__name:"SocialPreviewGroup",props:{tags:{}},setup(h){const s=h,l=["twitter","facebook","linkedin","telegram"],n=de("nuxt-devtools-social-preview-tab",l[0]),m=C(()=>P(s.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"og:image:alt"}],description:[{tag:"meta",name:"og:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]}));return(y,k)=>{const f=Je,r=Xe,g=ot,b=ft;return o(),a("div",vt,[e("div",bt,[(o(),a(S,null,B(l,(u,T)=>e("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:O(u===t(n)?"":"border-b"),onClick:M=>n.value=u},[e("div",{class:O(u===t(n)?"":"op30"),capitalize:""},p(u),3)],10,wt)),64)),xt]),e("div",yt,[t(n)==="facebook"?(o(),a("div",kt,[d(f,{card:t(m)},null,8,["card"])])):t(n)==="twitter"?(o(),a("div",$t,[d(r,{tags:y.tags},null,8,["tags"])])):t(n)==="linkedin"?(o(),a("div",Tt,[d(g,{card:t(m)},null,8,["card"])])):t(n)==="telegram"?(o(),a("div",St,[d(b,{card:t(m)},null,8,["card"])])):x("",!0)])])}}}),Nt={class:"markdown-body"},Mt=pe('<h1>Open Graph</h1><p>Nuxt provides several different ways to manage your meta tags using <a href="https://unhead.harlanzw.com/" target="_blank" rel="noopener"><code>unhead</code></a>. Improve your Nuxt app’s SEO with powerful head config, composables and components.</p><p><a href="https://nuxt.com/docs/getting-started/seo-meta" target="_blank" rel="noopener">Learn more on the documentation</a></p><hr><p>You can also find how open graph specs are defined in:</p><ul><li><a href="https://ogp.me/" target="_blank" rel="noopener">The Open Graph protocol</a></li><li><a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started" target="_blank" rel="noopener">Twitter Cards</a></li></ul>',6),Ot=[Mt],It={__name:"open-graph",setup(h,{expose:s}){return s({frontmatter:{}}),(n,m)=>(o(),a("div",Nt,Ot))}},At={flex:"~ col lg:row","h-full":"","w-full":"","of-hidden":""},Bt={"flex-auto":"","of-auto":""},Rt={"flex-none":"",flex:"~ gap2 items-center"},Lt={flex:"~ col"},jt={key:0,"x-divider":""},Ft={key:1,"x-divider":""},Dt={mr2:"",px4:"",py2:""},qt=N({__name:"open-graph",setup(h){const s=A(0),l=me(),n=ue(async()=>(s.value,(await l.value?.resolveTags()).map(c=>{const v=c.props||{};return c.tag==="htmlAttrs"&&v.lang?{tag:"html",name:"lang",value:v.lang}:v.charset?{tag:"meta",name:"charset",value:v.charset}:{tag:c.tag,name:v.property??v.name??v.rel??c.tag,value:v.content??v.href??c.textContent??JSON.stringify(v)}})),[]),m=A(!0);function y(){s.value+=1}const k=ge(),f=he(),r=A(""),g=_e(),b=G();async function u(){r.value!==f.value.path&&k.value.push(r.value||"/")}const T=C(()=>r.value===f.value.path?[]:k.value.resolve(r.value||"/").matched),M=C(()=>{const i=g.value.find(c=>c.path===f.value?.matched?.[0]?.path);return i?.file||i?.meta?.file});function L(i){return K.find(c=>c.name===i.name)?.docs}return E(f).toBeTruthy().then(i=>{r.value=i.path}),E(k).toBeTruthy().then(i=>{i.afterEach(()=>{fe(()=>{r.value=f.value.path,setTimeout(y,200),setTimeout(y,800)})})}),(i,c)=>{const v=xe,j=J,W=ye,V=U,X=H,Y=q,Z=Fe,Q=Ct,ee=It,te=$e,F=ve("tooltip");return o(),a(S,null,[e("div",At,[e("div",Bt,[d(W,null,{search:_(()=>[d(v,{modelValue:t(r),"onUpdate:modelValue":c[0]||(c[0]=w=>be(r)?r.value=w:null),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:O(["px-5 py-2",t(f)?.path===t(r)?"":t(T).length?"text-green":"text-orange"]),onKeydown:we(u,["enter"])},null,8,["modelValue","class","onKeydown"])]),actions:_(()=>[e("div",Rt,[t(M)?z((o(),I(j,{key:0,"text-lg":"",border:!1,icon:"carbon:launch",title:"Open file in editor",onClick:c[1]||(c[1]=w=>t(b)(t(M)))},null,512)),[[F,"Open file in editor"]]):x("",!0),z(d(j,{"text-lg":"",border:!1,icon:"carbon:reset",title:"Refresh Data",onClick:y},null,512),[[F,"Refresh Data"]]),z(d(j,{"text-lg":"",border:!1,icon:t(m)?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:c[2]||(c[2]=w=>m.value=!t(m))},null,8,["icon"]),[[F,"Toggle Preview"]])])]),_:1}),e("div",Lt,[d(Y,{text:"Tags",icon:"carbon:tag-group"},{default:_(()=>[d(X,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:_(()=>[(o(!0),a(S,null,B(t(n),(w,D)=>(o(),a(S,{key:D},[D?(o(),a("div",jt)):x("",!0),D?(o(),a("div",Ft)):x("",!0),e("div",Dt,[d(V,{op50:"",href:L(w),target:"_blank",n:"primary"},{default:_(()=>[$(p(w.name),1)]),_:2},1032,["href"])]),d(V,{href:w.value.match(/^https?:\/\//)?w.value:void 0,target:"_blank","w-full":"",p2:"","font-mono":"",n:"primary"},{default:_(()=>[$(p(w.value),1)]),_:2},1032,["href"])],64))),128))]),_:1})]),_:1}),d(Z,{tags:t(n),"matched-route-filepath":t(M)},null,8,["tags","matched-route-filepath"])])]),t(m)&&t(n)?.length?(o(),I(Q,{key:0,tags:t(n),"flex-none":"","border-base":"","lt-lg":"border-t",lg:"h-full w-140 border-l"},null,8,["tags"])):x("",!0)]),d(te,null,{default:_(()=>[d(ee)]),_:1})],64)}}});export{qt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as S}from"./FilepathItem.vue.e3761da9.js";import{_ as D}from"./NBadge.787d75d1.js";import{_ as C}from"./DurationDisplay.vue.ce619fea.js";import{d as v,ab as B,a as x,be as V,o as n,m,k as t,t as P,i as l,f,h as u,p as d,ap as F,aa as N,a6 as H,q as I,j as g,v as y,bg as E,au as W,F as k,n as j,G as L}from"./entry.52bc93cd.js";import{_ as M}from"./NSectionBlock.f3242abf.js";import{_ as q}from"./HelpFab.vue.452fd066.js";import"./NIconTitle.vue.8e6741d5.js";const z={flex:"~ gap2","items-center":""},A={w8:"","text-right":"","text-sm":"",op25:""},G={key:0,"flex-auto":"","text-right":""},R=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(p){const e=p,a=B(),r=x(()=>V(e.plugin.src,a.value?.rootDir||"").path);return(i,c)=>{const _=S,o=D,s=C;return n(),m("div",z,[t("div",A,P(i.index),1),l(_,{filepath:e.plugin.src,subpath:!0},null,8,["filepath"]),t("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,n:"rose",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,n:"gray",textContent:"module"})),i.plugin.mode==="server"?(n(),u(o,{key:2,n:"teal",textContent:"server"})):d("",!0),i.plugin.mode==="client"?(n(),u(o,{key:3,n:"orange",textContent:"client"})):d("",!0)]),i.plugin.metric?.duration!=null?(n(),m("div",G,[l(s,{duration:i.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),Y={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},J={flex:"~ items-center gap-1","font-bold":""},K=v({__name:"HelpTip",props:{title:{},icon:{}},setup(p){return(e,a)=>{const r=H,i=F("ContentSlot");return n(),m("div",Y,[t("div",J,[e.icon?(n(),u(r,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),t("div",null,P(e.title),1)]),t("div",null,[N(e.$slots,"default",{},()=>[l(i,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),O={};function Q(p,e){const a=K;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:g(()=>[N(p.$slots,"default")]),_:3})}const U=I(O,[["render",Q]]),X={class:"markdown-body"},Z=t("h1",null,"Plugins",-1),tt=t("p",null,[y("Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the "),t("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=t("p",null,[t("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),nt={__name:"plugins",setup(p,{expose:e}){return e({frontmatter:{}}),(r,i)=>{const c=U;return n(),m("div",X,[Z,tt,l(c,null,{default:g(()=>[y(" Plugins always run before your application's runtime. The loading time of each plugin will directly impact your application's initial loading time. ")]),_:1}),et])}}},ot={pt4:""},st={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},it=t("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),at=t("span",{op50:""},"Total execution time:",-1),dt=v({__name:"plugins",setup(p){const e=E(),a=W(),r=x(()=>{const c=e.value?.plugins||[],_=a.value?.metrics.clientPlugins()||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:_.find(h=>h.src===s.src||h.src.startsWith(s.src))}})}),i=x(()=>{const c=a.value?.metrics.clientPlugins()||[],_=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-_});return(c,_)=>{const o=R,s=C,h=M,T=nt,w=q;return n(),m(k,null,[l(h,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:g(()=>[t("div",ot,[(n(!0),m(k,null,j(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:L(b?"border-t":"")},null,8,["plugin","index","class"]))),128)),t("div",st,[it,at,l(s,{duration:f(i),factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(w,null,{default:g(()=>[l(T)]),_:1})],64)}}});export{dt as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{d as ae,r as B,bm as $e,o as t,m as y,k as i,G as q,h as C,f as e,bn as se,t as L,p as N,v as W,a9 as We,aa as Z,F as I,n as M,a6 as fe,a0 as Je,a as T,w as Se,i as h,j as $,X as Te,_ as me,bo as Ve,bp as Re,ay as Ke,bq as Qe,br as Xe,bs as Ye,ab as Ze,au as et,aw as pe,ac as tt,az as ot,e as nt,a2 as Ue,l as Y,I as le,at as st,V as lt,A as De,bt as at,bu as rt,ah as it,U as ut,bv as dt,ao as ct}from"./entry.52bc93cd.js";import{_ as pt}from"./NNavbar.vue.9cb56412.js";import{_ as Ne}from"./NBadge.787d75d1.js";import{_ as Ie}from"./NSelect.vue.cdaf42b9.js";import{_ as ft}from"./NCheckbox.vue.7e495ed2.js";import{u as Ee,_ as mt}from"./storage-options.e85e583e.js";import{_ as vt}from"./DataSchemaButton.vue.e78a09d4.js";import{_ as ht}from"./NCodeBlock.vue.7e25538f.js";import{C as xe,S as je}from"./constants.2cc6e981.js";import{q as yt}from"./json-editor-vue.d503734c.js";import{_ as gt}from"./NSectionBlock.f3242abf.js";import{_ as _t}from"./NDrawer.vue.fa4b06a6.js";import"./client.7628b7e9.js";import"./NIconTitle.vue.8e6741d5.js";const ne=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function bt(l,g){if(typeof l!="string")throw new TypeError("argument str must be a string");const u={},k=(g||{}).decode||Ct;let x=0;for(;x<l.length;){const p=l.indexOf("=",x);if(p===-1)break;let f=l.indexOf(";",x);if(f===-1)f=l.length;else if(f<p){x=l.lastIndexOf(";",p-1)+1;continue}const s=l.slice(x,p).trim();if(u[s]===void 0){let d=l.slice(p+1,f).trim();d.codePointAt(0)===34&&(d=d.slice(1,-1)),u[s]=xt(d,k)}x=f+1}return u}function Ce(l,g,u){const o=u||{},k=o.encode||wt;if(typeof k!="function")throw new TypeError("option encode is invalid");if(!ne.test(l))throw new TypeError("argument name is invalid");const x=k(g);if(x&&!ne.test(x))throw new TypeError("argument val is invalid");let p=l+"="+x;if(o.maxAge!==void 0&&o.maxAge!==null){const f=o.maxAge-0;if(Number.isNaN(f)||!Number.isFinite(f))throw new TypeError("option maxAge is invalid");p+="; Max-Age="+Math.floor(f)}if(o.domain){if(!ne.test(o.domain))throw new TypeError("option domain is invalid");p+="; Domain="+o.domain}if(o.path){if(!ne.test(o.path))throw new TypeError("option path is invalid");p+="; Path="+o.path}if(o.expires){if(!kt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");p+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(p+="; HttpOnly"),o.secure&&(p+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":p+="; Priority=Low";break;case"medium":p+="; Priority=Medium";break;case"high":p+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:p+="; SameSite=Strict";break;case"lax":p+="; SameSite=Lax";break;case"strict":p+="; SameSite=Strict";break;case"none":p+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return p}function kt(l){return Object.prototype.toString.call(l)==="[object Date]"||l instanceof Date}function xt(l,g){try{return g(l)}catch{return l}}function Ct(l){return l.includes("%")?decodeURIComponent(l):l}function wt(l){return encodeURIComponent(l)}const $t=i("div",{"x-divider":""},null,-1),Oe=ae({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(l){const g=B(!0),u=$e();return(o,k)=>{const x=fe,p=Ne,f=Oe;return t(),y("div",null,[i("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:q([{"bg-active":e(u)===o.item.filepath}]),style:We({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:k[0]||(k[0]=s=>{g.value=!e(g),u.value=o.item.filepath})},[i("div",{class:q({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(t(),C(x,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(g)?90:0,transition:""},null,8,["transform-rotate"])):(t(),C(p,{key:1,class:q(("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(o.item.method||"*")),textContent:L((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),i("span",{class:q({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(t(),C(x,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),W(" "+L(o.item.route),1)],2)],6),$t,e(g)?Z(o.$slots,"default",{key:0},()=>[(t(!0),y(I,null,M(o.item.routes,s=>(t(),C(f,{key:s.filepath,item:s,index:o.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}}),St={p4:"",flex:"~ col gap-4"},Tt={key:1,ml2:"",flex:""},Vt=["value"],Rt={key:0,flex:"","gap-4":""},Ut=i("div",{"flex-auto":""},null,-1),Le=ae({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(l,{emit:g}){const u=l,k=Je(u,"modelValue",g,{passive:!0}),x=T(()=>[...u.keys,"active","key","value","type"]),p=T(()=>{const d={};for(const a of x.value)d[a]=u.default[a]||"";return d}),f=["string","number","boolean","file","date","time","datetime-local"];function s(d,a){const E=a.target;if(E.files&&E.files[0]){const F=E.files[0],H=new FileReader;H.readAsDataURL(F),H.onload=()=>{k.value[d].value=H.result}}}return Se(()=>k,d=>{d.value.forEach(a=>{if(a.type==="number"&&typeof a.value!="number"){const E=Number.parseFloat(a.value);a.value=Number.isNaN(E)?0:E}else a.type==="boolean"&&typeof a.value!="boolean"?a.value=!0:a.type==="file"&&typeof a.value!="object"?a.value="":a.type==="date"&&typeof a.value=="string"&&!a.value.match(/^\d{4}-\d{2}-\d{2}$/)?a.value=new Date().toISOString().slice(0,10):a.type==="time"&&typeof a.value=="string"&&!a.value.match(/^\d{2}:\d{2}$/)?a.value=new Date().toISOString().slice(11,16):a.type==="datetime-local"&&typeof a.value=="string"&&!a.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?a.value=new Date().toISOString().slice(0,16):a.type==="string"&&(a.value=a.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(d,a)=>{const E=ft,F=Te,H=Ie,V=fe,w=me;return t(),y("div",St,[(t(!0),y(I,null,M(e(k),(m,S)=>(t(),y("div",{key:S,flex:"~ gap-2","justify-around":""},[Z(d.$slots,"input",{item:m}),(t(!0),y(I,null,M(e(x),_=>(t(),y(I,{key:_},[m.type!==null&&_==="active"?(t(),C(E,{key:0,modelValue:m[_],"onUpdate:modelValue":b=>m[_]=b,n:"sm primary",disabled:d.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):N("",!0),m.type!==null&&_==="key"?(t(),C(F,{key:1,modelValue:m[_],"onUpdate:modelValue":b=>m[_]=b,placeholder:_,"flex-1":"","font-mono":"",n:"sm primary",disabled:d.disabled,class:q(d.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):_==="value"?(t(),y(I,{key:2},[m.type==="file"?(t(),C(F,{key:0,type:"file",disabled:d.disabled,class:q(d.disabled?"op75":""),onChange:b=>s(S,b)},null,8,["disabled","class","onChange"])):m.type==="boolean"?(t(),y("div",Tt,[h(E,{modelValue:m.value,"onUpdate:modelValue":b=>m.value=b,placeholder:"Value",n:"green lg",disabled:d.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(t(),C(F,{key:2,modelValue:m.value,"onUpdate:modelValue":b=>m.value=b,type:m.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:d.disabled,class:q(d.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):_==="type"?(t(),C(H,{key:3,modelValue:m.type,"onUpdate:modelValue":b=>m.type=b,n:"sm green",class:q(d.disabled?"op75":""),disabled:d.disabled},{default:$(()=>[(t(),y(I,null,M(f,b=>i("option",{key:b,value:b},L(b),9,Vt)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):N("",!0)],64))),128)),Z(d.$slots,"input-actions",{},()=>[h(w,{n:"red",disabled:d.disabled,class:q(d.disabled?"op0!":""),onClick:_=>e(k).splice(S,1)},{default:$(()=>[h(V,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),d.disabled?N("",!0):(t(),y("div",Rt,[Z(d.$slots,"actions",{params:e(k)},()=>[h(w,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:a[0]||(a[0]=m=>e(k).push({...e(p)}))},{default:$(()=>[W(" Add ")]),_:1}),Ut,e(k).length?(t(),C(w,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:a[1]||(a[1]=m=>k.value=[])},{default:$(()=>[W(" Remove All ")]),_:1})):N("",!0)])])),Z(d.$slots,"default")])}}}),Dt={path:"/",watch:!0,decode:l=>Xe(decodeURIComponent(l)),encode:l=>encodeURIComponent(typeof l=="string"?l:JSON.stringify(l))};function Nt(l,g){const u={...Dt,...g},o=It(u)||{};let k;u.maxAge!==void 0?k=u.maxAge*1e3:u.expires&&(k=u.expires.getTime()-Date.now());const x=k!==void 0&&k<=0,p=x?void 0:o[l]??u.default?.(),f=k&&!x?Ot(p,k):B(p);{const s=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${l}`),d=()=>{jt(l,f.value,u),s?.postMessage(u.encode(f.value))};let a=!1;Ve()&&Re(()=>{a=!0,d(),s?.close()}),s&&(s.onmessage=E=>{a=!0,f.value=u.decode(E.data),Ke(()=>{a=!1})}),u.watch?Se(f,()=>{a||d()},{deep:u.watch!=="shallow"}):d()}return f}function It(l={}){return bt(document.cookie,l)}function Et(l,g,u={}){return g==null?Ce(l,g,{...u,maxAge:-1}):Ce(l,g,u)}function jt(l,g,u={}){document.cookie=Et(l,g,u)}const we=2147483647;function Ot(l,g){let u,o=0;return Ve()&&Re(()=>{clearTimeout(u)}),Qe((k,x)=>{function p(){clearTimeout(u);const f=g-o,s=f<we?f:we;u=setTimeout(()=>{if(o+=s,o<g)return p();l=void 0,x()},s)}return{get(){return k(),l},set(f){p(),l=f,x()}}})}const Lt={"h-full":"","w-full":"",flex:"~ col"},qt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},At={flex:"~ gap2 items-center"},Pt={relative:"","w-full":""},Bt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Mt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ft=i("div",{"flex-auto":""},null,-1),zt=i("div",{"text-xs":"",op50:""}," Send from ",-1),Ht=i("option",{value:"app"}," App ",-1),Gt=i("option",{value:"devtools"}," DevTools ",-1),Wt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Jt={"text-right":"","font-mono":""},Kt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Qt={flex:"~ gap-4"},Xt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Yt=i("div",{"w-5":"","x-divider":""},null,-1),Zt=i("div",{"flex-none":""}," Default Inputs ",-1),eo=i("div",{"x-divider":""},null,-1),to={key:2},oo={key:3,border:"b base",relative:"","n-code-block":""},no={flex:"~ wrap","w-full":""},so=["onClick"],lo=i("div",{border:"b base","flex-auto":""},null,-1),ao={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},ro=i("div",null,"Response",-1),io={key:1,"text-xs":"",op50:""},uo=i("div",{"flex-auto":""},null,-1),co=i("div",{op50:""}," Request finished in ",-1),po={key:0,"flex-auto":"","overflow-auto":""},fo={border:"~ base","h-full":"","w-full":"",rounded:""},mo=["data"],vo={key:2,"flex-auto":"","overflow-auto":"",p4:""},ho={border:"~ base",rounded:""},yo=["src"],go={key:1,controls:"",rounded:""},_o=["src"],bo=ae({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(l,{emit:g}){const u=l,o=g,[k,x]=Ye(),p=Ze(),f=et(),s=pe({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),d=T(()=>s.contentType.includes("application/json")?"json":s.contentType.includes("text/html")?"html":s.contentType.includes("text/css")?"css":s.contentType.includes("text/javascript")?"javascript":s.contentType.includes("image")||s.contentType.includes("video")?"media":s.contentType.includes("text/xml")||s.contentType.includes("application/xml")?"xml":s.contentType.includes("application/pdf")?"pdf":"text"),a=T(()=>{if(d.value==="json")return JSON.stringify(s.data,null,2);if(d.value==="media"||d.value==="pdf"){const n=new Blob([s.data],{type:s.contentType});return URL.createObjectURL(n)}return s.data}),E=B(!1),F=B(!1),H=tt(),V=T(()=>u.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),w=T(()=>V.value?.filter(n=>n.startsWith(":")||n.startsWith("**:"))||[]),m=B(u.route.method||"GET"),S=B({}),_=pe({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),b=B({}),{inputDefaults:R,sendFrom:O}=Ee("serverRoutes"),P=T(()=>f?.value?.app?.$fetch?O.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=T(()=>ie.includes(m.value.toUpperCase())),A=B(w.value.length?"params":"query"),U=["input","json"],G=B(U[0]),te=T({get:()=>_[A.value],set:n=>{_[A.value]=n}}),ve=T(()=>({...K(R.value.query),...K(_.query)})),he=T(()=>({...K(R.value.headers),...K(_.headers)})),ue=T(()=>ee.value?G.value==="json"?{...K(R.value.body),...b.value}:{...K(R.value.body),...K(_.body)}:void 0),qe=T(()=>{let n=window?.location.origin;return n.charAt(n.length-1)==="/"&&(n=n.slice(0,-1)),n}),oe=T(()=>{let n=new URLSearchParams(ve.value).toString();n&&(n=`?${n}`);const c=(V.value?.map(j=>(j.startsWith(":")||j.startsWith("**:"))&&S.value[j]||j).join("")||"")+n;let v=p.value?.app.baseURL||"";return(v==="./"||v===".")&&(v=""),v.endsWith("/")&&(v=v.slice(0,-1)),v+c}),ye=T(()=>qe.value+oe.value);function K(n){const c=Object.fromEntries(n.filter(({active:v,key:j,value:D})=>v&&j&&D!==void 0).map(({key:v,value:j})=>[v,j]));return Object.entries(c).length?c:void 0}async function ge(){F.value=!0,E.value=!0;const n=Date.now(),c=P.value==="app"?f.value.app.$fetch:$fetch;lt("server-routes:fetch",{method:m.value,sendFrom:P.value});try{s.data=await c(ye.value,{method:m.value.toUpperCase(),headers:he.value,query:ve.value,body:ue.value,onResponse({response:v}){s.contentType=(v.headers.get("content-type")||"").toString().toLowerCase().trim(),s.statusCode=v.status,s.error=void 0},onResponseError(v){s.error=v.response._data,s.data=v.response._data}})}catch{}E.value=!1,s.fetchTime=Date.now()-n}const _e=T(()=>{const n=[],c=[],v=Object.entries(he.value).filter(([D,z])=>D&&z&&!(D==="Content-Type"&&z==="application/json")).map(([D,z])=>` '${D}': '${z}'`).join(`,
|
|
2
|
-
`);m.value.toUpperCase()!=="GET"&&c.push(`method: '${m.value.toUpperCase()}'`),v&&c.push(`headers: {
|
|
3
|
-
${v}
|
|
4
|
-
}`),ue.value&&c.push(`body: ${JSON.stringify(ue.value,null,2)}`);const j=c.length?`, {
|
|
5
|
-
${c.join(`,
|
|
6
|
-
`).split(`
|
|
7
|
-
`).map(D=>` ${D}`).join(`
|
|
8
|
-
`)}
|
|
9
|
-
}`:"";return n.push({name:"useFetch",lang:"javascript",docs:xe.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${j})`}),n.push({name:"$fetch",lang:"javascript",docs:xe.nuxt.$fetch,code:`await $fetch('${oe.value}'${j})`}),n}),Q=B(Pe()),J=pe({key:"",value:""}),Ae=T(()=>{const n=[];return w.value.length&&n.push({name:"Params",slug:"params",length:w.value.length}),n.push({name:"Query",slug:"query",length:_.query.length}),ee.value&&n.push({name:"Body",slug:"body",length:_.body.length}),n.push({name:"Headers",slug:"headers",length:_.headers.length}),n.push({name:"Cookies",slug:"cookies",length:Q.value.length}),n.push({name:"Snippets",slug:"snippet"}),n});function Pe(){return document.cookie.split("; ").map(n=>{const[c,v]=n.split("=");return{key:c,value:v}}).filter(n=>n.key)}function de(n,c){if(!n)return;const v=Q.value.find(D=>D.key===n),j=Nt(n);v!==void 0?c===void 0&&(Q.value=Q.value.filter(D=>D.key!==n)):(Q.value.push({key:n,value:c}),J.key="",J.value=""),j.value=c}ot(()=>{G.value==="json"&&typeof b.value=="string"&&(b.value=JSON.parse(b.value))});const Be=nt();return(n,c)=>{const v=me,j=Ie,D=Te,z=fe,be=Le,Me=mt,Fe=De,ze=at,ce=Ne,He=vt,Ge=ht,ke=Ue("tooltip");return t(),y("div",Lt,[i("div",qt,[i("div",At,[n.route.method?(t(),C(v,{key:0,class:q(["n-badge-base n-sm",("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(e(m))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:$(()=>[W(L(e(m).toUpperCase()),1)]),_:1},8,["class"])):(t(),C(j,{key:1,modelValue:e(m),"onUpdate:modelValue":c[0]||(c[0]=r=>Y(m)?m.value=r:null),class:q(["n-badge-base n-sm",("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(e(m))])},{default:$(()=>[(t(),y(I,null,M(re,r=>i("option",{key:r,class:q(("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(r))},L(r.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),i("div",Pt,[h(D,{"model-value":e(oe),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),i("div",Bt,[le(h(v,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:c[1]||(c[1]=r=>e(Be)(e(ye),"server-route-url"))},null,512),[[ke,"Copy URL"]]),le(h(v,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:c[2]||(c[2]=r=>e(H)(n.route.filepath))},null,512),[[ke,"Open in Editor"]])])]),h(v,{"h-full":"",n:"primary solid",onClick:ge},{default:$(()=>[h(z,{icon:"carbon:send"})]),_:1})])]),i("div",Mt,[(t(!0),y(I,null,M(e(Ae),r=>(t(),C(v,{key:r.slug,class:q(e(A)===r.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:X=>A.value=r.slug},{default:$(()=>[h(z,{icon:("ServerRouteTabIcons"in n?n.ServerRouteTabIcons:e(je))[r.slug]},null,8,["icon"]),W(" "+L(r.name)+" "+L(r?.length?`(${r.length})`:"")+" ",1),i("span",null,L(e(R)[r.slug]?.length?`(${e(R)[r.slug].length})`:""),1)]),_:2},1032,["class","onClick"]))),128)),Ft,zt,h(j,{modelValue:e(P),"onUpdate:modelValue":c[3]||(c[3]=r=>Y(P)?P.value=r:null),class:"n-xs",disabled:!e(f)?.app?.$fetch},{default:$(()=>[Ht,Gt]),_:1},8,["modelValue","disabled"])]),e(A)==="params"?(t(),y("div",Wt,[(t(!0),y(I,null,M(e(w),r=>(t(),y(I,{key:r},[i("div",Jt,L(r),1),h(D,{modelValue:e(S)[r],"onUpdate:modelValue":X=>e(S)[r]=X,placeholder:r,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):N("",!0),e(A)==="cookies"?(t(),y("div",Kt,[(t(!0),y(I,null,M(e(Q),r=>(t(),y("div",{key:r.key,flex:"~ gap-4 items-center"},[h(D,{placeholder:"Key...","model-value":r.key,disabled:"","op-70":""},null,8,["model-value"]),h(D,{placeholder:"Value...","model-value":r.value,"flex-1":"",n:"primary",onInput:X=>de(r.key,X.target?.value)},null,8,["model-value","onInput"]),h(v,{title:"Delete",n:"red",onClick:X=>de(r.key,void 0)},{default:$(()=>[h(z,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),i("div",Qt,[h(D,{modelValue:e(J).key,"onUpdate:modelValue":c[4]||(c[4]=r=>e(J).key=r),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),h(D,{modelValue:e(J).value,"onUpdate:modelValue":c[5]||(c[5]=r=>e(J).value=r),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),h(v,{title:"Add",n:"primary",onClick:c[6]||(c[6]=r=>de(e(J).key,e(J).value))},{default:$(()=>[h(z,{icon:"i-carbon-save"})]),_:1})])])):N("",!0),h(e(k),null,{default:$(()=>[h(be,{modelValue:e(te),"onUpdate:modelValue":c[9]||(c[9]=r=>Y(te)?te.value=r:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:$(()=>[e(R)[e(A)]?.length?(t(),y(I,{key:0},[i("div",Xt,[Yt,Zt,h(v,{icon:"i-carbon-edit",border:!1,onClick:c[7]||(c[7]=r=>o("open-default-input"))}),eo]),h(be,{modelValue:e(R)[e(A)],"onUpdate:modelValue":c[8]||(c[8]=r=>e(R)[e(A)]=r),disabled:"",p0:""},null,8,["modelValue"])],64)):N("",!0)]),_:1},8,["modelValue"])]),_:1}),e(A)==="snippet"?(t(),y("div",to,[e(_e).length?(t(),C(Me,{key:0,"code-snippets":e(_e)},null,8,["code-snippets"])):N("",!0)])):e(te)?(t(),y("div",oo,[e(A)==="body"?(t(),y(I,{key:0},[i("div",no,[(t(),y(I,null,M(U,r=>i("button",{key:r,px4:"",py2:"",border:"r base",hover:"bg-active",class:q({"border-b":r!==e(G)}),onClick:X=>G.value=r},[i("div",{class:q({op30:r!==e(G)}),"font-mono":""},L(r),3)],10,so)),64)),lo]),e(G)==="input"?(t(),C(e(x),{key:0})):e(G)==="json"?(t(),C(e(yt),st({key:1,modelValue:e(b),"onUpdate:modelValue":c[10]||(c[10]=r=>Y(b)?b.value=r:null),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):N("",!0)],64)):(t(),C(e(x),{key:1}))])):N("",!0),e(F)?e(E)?(t(),C(ze,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:$(()=>[W(" Fetching... ")]),_:1})):(t(),y(I,{key:6},[i("div",ao,[ro,e(s).error?(t(),C(ce,{key:0,n:"red"},{default:$(()=>[W(" Error ")]),_:1})):N("",!0),h(ce,{n:e(s).error?"orange":"green",textContent:L(e(s).statusCode)},null,8,["n","textContent"]),e(s).contentType?(t(),y("code",io,L(e(s).contentType),1)):N("",!0),e(s).contentType==="application/json"?(t(),C(He,{key:2,getter:()=>({input:e(a)})},null,8,["getter"])):N("",!0),uo,co,h(ce,{n:"green"},{default:$(()=>[W(L(e(s).fetchTime)+" ms ",1)]),_:1})]),e(d)==="pdf"?(t(),y("div",po,[i("div",fo,[i("object",{data:e(a),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,mo)])])):e(d)!=="media"?(t(),C(Ge,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(a),lang:e(d)},null,8,["code","lang"])):(t(),y("div",vo,[i("div",ho,[e(s).contentType.includes("image")?(t(),y("img",{key:0,rounded:"",src:e(a)},null,8,yo)):(t(),y("video",go,[i("source",{src:e(a),type:"video/mp4"},null,8,_o)]))])]))],64)):(t(),C(Fe,{key:4},{default:$(()=>[h(v,{n:"primary",onClick:ge},{default:$(()=>[h(z,{icon:"carbon:send"}),W(" Send request ")]),_:1})]),_:1}))])}}}),ko={flex:"~ gap1","text-sm":""},xo={key:0,op50:""},Co={op50:""},wo=i("span",{op75:""},"Select a route to start",-1),$o=i("div",{p4:"",border:"b base"},[i("span",{"text-lg":""},"Default Inputs"),i("br"),i("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1),Po=ae({__name:"server-routes",setup(l){const g=B(!1),u=rt(),o=$e(),{selectedRoute:k,view:x,inputDefaults:p}=Ee("serverRoutes"),f=T(()=>{!o.value&&k.value&&(o.value=k.value.filepath);const V=u.value?.find(w=>w.filepath===o.value);return o.value!==k.value?.filepath&&V&&(k.value=V),V}),s=B(""),d=T(()=>new it(u.value||[],{keys:["method","route"],shouldSort:!0})),a=T(()=>u.value?s.value?d.value.search(s.value).map(w=>w.item):u.value:[]),E=T(()=>{const V=[],w=(S,_)=>{S.routes=S.routes||[],S.routes.push(_)},m=(S,_)=>{const b=_?_.routes?.find(O=>O.route===S):V.find(O=>O.route===S);if(b)return b;const R={route:S,filepath:S.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};return _?w(_,R):V.push(R),R};return a.value.forEach(S=>{let _,b;const R=S.filepath.split("/"),O=R.slice(R.indexOf("server")+1);if(S.type==="runtime"){O[0]="runtime";const P=R.indexOf("dist");P!==-1&&(_=R[P-1],_&&O.splice(1,0,_))}O.length>0&&O[O.length-1].includes(".")&&O.pop(),O.forEach(P=>{b=m(P,b)}),b?w(b,S):V.push(S)}),V});function F(){x.value=x.value==="tree"?"list":"tree"}function H(V){return V.charAt(0).toUpperCase()+V.slice(1)}return(V,w)=>{const m=me,S=pt,_=Oe,b=bo,R=ct,O=De,P=ut,re=Le,ie=gt,ee=_t,A=Ue("tooltip");return t(),y(I,null,[h(P,{"storage-key":"tab-server-routes"},{left:$(()=>[h(S,{search:e(s),"onUpdate:search":w[1]||(w[1]=U=>Y(s)?s.value=U:null),pb2:""},{actions:$(()=>[le(h(m,{"text-lg":"",icon:e(x)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:F},null,8,["icon"]),[[A,"Toggle View"]]),le(h(m,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:w[0]||(w[0]=U=>g.value=!e(g))},null,512),[[A,"Default Inputs"]])]),default:$(()=>[i("div",ko,[e(s)?(t(),y("span",xo,L(e(a).length)+" matched · ",1)):N("",!0),i("span",Co,L(e(u)?.length)+" routes in total",1)])]),_:1},8,["search"]),(t(!0),y(I,null,M(e(x)==="tree"?e(E):e(a),U=>(t(),C(_,{key:U.filepath,item:U},null,8,["item"]))),128))]),right:$(()=>[(t(),C(dt,{max:10},[e(f)?(t(),C(b,{key:e(f).filepath,route:e(f),onOpenDefaultInput:w[2]||(w[2]=U=>g.value=!0)},null,8,["route"])):N("",!0)],1024)),e(f)?N("",!0):(t(),C(O,{key:0},{default:$(()=>[h(R,{px6:"",py2:""},{default:$(()=>[wo]),_:1})]),_:1}))]),_:1}),h(ee,{modelValue:e(g),"onUpdate:modelValue":w[3]||(w[3]=U=>Y(g)?g.value=U:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:w[4]||(w[4]=U=>g.value=!1)},{default:$(()=>[i("div",null,[$o,(t(!0),y(I,null,M(Object.keys(e(p)),U=>(t(),C(ie,{key:U,text:`${H(U)} ${e(p)[U].length?`(${e(p)[U].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in V?V.ServerRouteTabIcons:e(je))[U]},{default:$(()=>[h(re,{modelValue:e(p)[U],"onUpdate:modelValue":G=>e(p)[U]=G,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Po as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as Q}from"./NIconTitle.vue.8e6741d5.js";import{_ as X}from"./NSwitch.vue.6e493b89.js";import{d as Y,au as Z,bO as ee,aD as le,az as E,m,i as n,k as e,F as v,n as N,f as t,j as a,L as oe,_ as ne,ao as te,o as r,h as P,t as y,G as j,p as A,v as O,l as c,C as z,B as ae,bG as se,bP as ie}from"./entry.52bc93cd.js";import{_ as ue}from"./NSelect.vue.cdaf42b9.js";import{_ as de}from"./NCheckbox.vue.7e495ed2.js";import{_ as re}from"./NLink.vue.0a35d66d.js";const ce={px8:"",py6:""},pe={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},me={flex:"~ col gap-2"},_e=e("h3",{"text-lg":""}," Tabs ",-1),fe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},ve={capitalize:"",op75:""},ge=e("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),he=e("div",{"flex-auto":""},null,-1),be={flex:"~ col gap-2"},xe=e("h3",{"text-lg":""}," Appearance ",-1),ye=e("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1),ke=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Ve=e("p",null,"UI Scale",-1),Ce=["value"],we=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Te=e("span",null," Expand Sidebar ",-1),Se=e("span",null," Scrollable Sidebar ",-1),Ne=e("h3",{mt2:"","text-lg":""}," Features ",-1),Oe=e("span",null,"Close DevTools when clicking outside",-1),Ue=e("span",null,"Show help buttons",-1),$e=e("span",null,"Always show the floating panel",-1),Ie=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),De=e("p",null,"Minimize floating panel on inactive",-1),ze=["value"],Be=e("h3",{mt2:"","text-lg":""}," Feedback ",-1),Le=e("span",null,"Send anonymous statistics, help us improving DevTools",-1),Ee=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Pe={flex:"~ gap-2"},je=e("div",{"i-carbon-data-enrichment":""},null,-1),Ae=e("div",{"i-carbon-debug":""},null,-1),Fe=e("h3",{mt2:"","text-lg":""}," Debug ",-1),Me={flex:"~ gap-2"},Re=e("div",{"i-carbon-breaking-change":""},null,-1),Xe=Y({__name:"settings",setup(Ge){const{interactionCloseOnOutsideClick:k,showPanel:U,showHelpButtons:$,scale:I,hiddenTabs:g,pinnedTabs:u,hiddenTabCategories:h,minimizePanelInactive:V,sidebarExpanded:C,sidebarScrollable:D}=ae(),b=Z(),F=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],M=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],R=ee(le());function G(s,o){o?g.value=g.value.filter(d=>d!==s):g.value.push(s)}function H(s,o){o?h.value=h.value.filter(d=>d!==s):h.value.push(s)}function W(s){u.value.includes(s)?u.value=u.value.filter(o=>o!==s):u.value.push(s)}function B(s,o){const d=u.value.indexOf(s);if(d===-1)return;const _=d+o;if(_<0||_>=u.value.length)return;const x=[...u.value];x.splice(d,1),x.splice(_,0,s),u.value=x}async function q(){confirm("Are you sure you to reset all local settings & state? The app will reload.")&&(Object.keys(localStorage).forEach(s=>{s.startsWith("nuxt-devtools-")&&localStorage.removeItem(s)}),await oe.clearOptions(),b.value?.app?.reload?.(),window.location.reload())}return E(()=>{b.value&&(b.value.app.frameState.value.closeOnOutsideClick=k.value)}),E(()=>{b.value&&(b.value.app.frameState.value.minimizePanelInactive=V.value)}),(s,o)=>{const d=Q,_=X,x=se,p=ne,w=te,J=ie,L=ue,f=de,K=re;return r(),m("div",ce,[n(d,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",pe,[e("div",me,[_e,(r(!0),m(v,null,N(t(R),([l,T])=>(r(),m(v,{key:l},[T.length?(r(),P(w,{key:0,p3:"",flex:"~ col gap-1",class:j(t(h).includes(l)?"op50 grayscale":"")},{default:a(()=>[n(_,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(h).includes(l),"onUpdate:modelValue":i=>H(l,i)},{default:a(()=>[e("div",fe,[e("span",ve,y(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),ge,(r(!0),m(v,null,N(T,i=>(r(),P(_,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(g).includes(i.name),"onUpdate:modelValue":S=>G(i.name,S)},{default:a(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:j(t(g).includes(i.name)?"op25":"")},[n(x,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),e("span",null,y(i.title),1),he,t(u).includes(i.name)?(r(),m(v,{key:0},[n(p,{icon:"i-carbon-caret-up",disabled:t(u).indexOf(i.name)===0,border:!1,onClick:S=>B(i.name,-1)},null,8,["disabled","onClick"]),n(p,{icon:"i-carbon-caret-down",disabled:t(u).indexOf(i.name)===t(u).length-1,border:!1,onClick:S=>B(i.name,1)},null,8,["disabled","onClick"])],64)):A("",!0),n(p,{icon:t(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:S=>W(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):A("",!0)],64))),128))]),e("div",be,[xe,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[e("div",null,[n(J,null,{default:a(({toggle:l,isDark:T})=>[n(p,{n:"primary",onClick:l},{default:a(()=>[ye,O(" "+y(T.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),ke,Ve,n(L,{modelValue:t(I),"onUpdate:modelValue":o[0]||(o[0]=l=>c(I)?I.value=l:null),n:"primary"},{default:a(()=>[(r(),m(v,null,N(F,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,Ce)),64))]),_:1},8,["modelValue"]),we,n(f,{modelValue:t(C),"onUpdate:modelValue":o[1]||(o[1]=l=>c(C)?C.value=l:null),"n-primary":""},{default:a(()=>[Te]),_:1},8,["modelValue"]),n(f,{modelValue:t(D),"onUpdate:modelValue":o[2]||(o[2]=l=>c(D)?D.value=l:null),disabled:t(C),"n-primary":""},{default:a(()=>[Se]),_:1},8,["modelValue","disabled"])]),_:1}),Ne,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(k),"onUpdate:modelValue":o[3]||(o[3]=l=>c(k)?k.value=l:null),"n-primary":""},{default:a(()=>[Oe]),_:1},8,["modelValue"]),n(f,{modelValue:t($),"onUpdate:modelValue":o[4]||(o[4]=l=>c($)?$.value=l:null),"n-primary":""},{default:a(()=>[Ue]),_:1},8,["modelValue"]),n(f,{modelValue:t(U),"onUpdate:modelValue":o[5]||(o[5]=l=>c(U)?U.value=l:null),"n-primary":""},{default:a(()=>[$e]),_:1},8,["modelValue"]),Ie,De,n(L,{modelValue:t(V),"onUpdate:modelValue":o[6]||(o[6]=l=>c(V)?V.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(r(),m(v,null,N(M,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,ze)),64))]),_:1},8,["modelValue"])]),_:1}),Be,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(z),"onUpdate:modelValue":o[7]||(o[7]=l=>c(z)?z.value=l:null),"n-primary":""},{default:a(()=>[Le,n(K,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1},8,["modelValue"]),Ee,e("div",Pe,[n(p,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>[je,O(" Ideas & Suggestions ")]),_:1}),n(p,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>[Ae,O(" Bug Reports ")]),_:1})])]),_:1}),Fe,e("div",Me,[n(p,{n:"orange",onClick:q},{default:a(()=>[Re,O(" Reset Local Settings & State ")]),_:1})])])])])}}});export{Xe as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const e=Object.freeze({information_for_contributors:["This file has been converted from https://github.com/jeff-hykin/better-shell-syntax/blob/master/autogenerated/shell.tmLanguage.json","If you want to provide a fix or improvement, please create a pull request against the original repository.","Once accepted there, we are happy to receive an update request."],version:"https://github.com/jeff-hykin/better-shell-syntax/commit/a3de7b32f1537194a83ee848838402fbf4b67424",name:"shellscript",scopeName:"source.shell",patterns:[{include:"#initial_context"}],repository:{alias_statement:{begin:"(alias)[ \\t]*+[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))",end:"(?:(?= |\\t|$)|(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n))",beginCaptures:{1:{name:"storage.type.alias.shell"},2:{name:"storage.modifier.$2.shell"},3:{name:"variable.other.assignment.shell"},4:{name:"punctuation.definition.array.access.shell"},5:{name:"variable.other.assignment.shell"},6:{name:"punctuation.definition.array.access.shell"},7:{name:"keyword.operator.assignment.shell"},8:{name:"keyword.operator.assignment.compound.shell"},9:{name:"keyword.operator.assignment.compound.shell"}},endCaptures:{1:{name:"punctuation.terminator.statement.semicolon.shell"},2:{name:"punctuation.separator.statement.and.shell"},3:{name:"punctuation.separator.statement.or.shell"},4:{name:"punctuation.separator.statement.background.shell"}},name:"meta.expression.assignment.shell",patterns:[{include:"#normal_statement_context"}]},argument:{begin:"[ \\t]++(?!(?:&|\\||\\(|\\[|#|\\n|$|;))",end:"(?= |\\t|;|\\||&|$|\\n|\\)|\\`)",beginCaptures:{},endCaptures:{},name:"meta.argument.shell",patterns:[{include:"#argument_context"},{include:"#line_continuation"}]},argument_context:{patterns:[{match:`[ \\t]*+([^
|
|
2
|
-
'&;<>\\(\\)\\$\`\\\\"\\|]+(?!>))`,captures:{1:{name:"string.unquoted.argument.shell",patterns:[{match:"\\*",name:"variable.language.special.wildcard.shell"},{include:"#variable"},{include:"#numeric_literal"},{match:"(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)",captures:{1:{name:"constant.language.$1.shell"}}}]}}},{include:"#normal_statement_context"}]},assignment:{patterns:[{begin:"[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))[ \\t]*+(\\()",end:"\\)",beginCaptures:{1:{name:"storage.modifier.$1.shell"},2:{name:"variable.other.assignment.shell"},3:{name:"punctuation.definition.array.access.shell"},4:{name:"variable.other.assignment.shell"},5:{name:"punctuation.definition.array.access.shell"},6:{name:"keyword.operator.assignment.shell"},7:{name:"keyword.operator.assignment.compound.shell"},8:{name:"keyword.operator.assignment.compound.shell"},9:{name:"punctuation.shell"}},endCaptures:{0:{name:"punctuation.shell"}},name:"meta.expression.assignment.shell",patterns:[{include:"#comment"},{include:"#argument_context"}]},{begin:"[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))",end:"(?:(?= |\\t|$)|(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n))",beginCaptures:{1:{name:"storage.modifier.$1.shell"},2:{name:"variable.other.assignment.shell"},3:{name:"punctuation.definition.array.access.shell"},4:{name:"variable.other.assignment.shell"},5:{name:"punctuation.definition.array.access.shell"},6:{name:"keyword.operator.assignment.shell"},7:{name:"keyword.operator.assignment.compound.shell"},8:{name:"keyword.operator.assignment.compound.shell"}},endCaptures:{1:{name:"punctuation.terminator.statement.semicolon.shell"},2:{name:"punctuation.separator.statement.and.shell"},3:{name:"punctuation.separator.statement.or.shell"},4:{name:"punctuation.separator.statement.background.shell"}},name:"meta.expression.assignment.shell",patterns:[{include:"#comment"},{include:"#argument_context"}]}]},basic_command_name:{match:`(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))|((?!"|'|\\\\\\n?$)[^!'" \\t\\n\\r]+?))(?:(?= |\\t)|(?=;|\\||&|\\n|\\)|\\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\))`,captures:{1:{name:"storage.modifier.$1.shell"},2:{name:"entity.name.function.call.shell entity.name.command.shell",patterns:[{match:"(?<!\\w)(?:continue|return|break)(?!\\w)",name:"keyword.control.$0.shell"},{match:"(?<!\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/)(?!\\w)",name:"support.function.builtin.shell"},{include:"#variable"}]}},name:"meta.statement.command.name.basic.shell"},block_comment:{begin:"\\s*+(\\/\\*)",end:"\\*\\/",beginCaptures:{1:{name:"punctuation.definition.comment.begin.shell"}},endCaptures:{0:{name:"punctuation.definition.comment.end.shell"}},name:"comment.block.shell"},boolean:{match:"\\b(?:true|false)\\b",name:"constant.language.$0.shell"},"case-clause":{patterns:[{begin:"(?=\\S)",end:";;&?|;&",endCaptures:{0:{name:"punctuation.terminator.case-clause.shell"}},name:"meta.scope.case-clause.shell",patterns:[{begin:"\\(|(?=\\S)",beginCaptures:{0:{name:"punctuation.definition.case-pattern.shell"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.case-pattern.shell"}},name:"meta.scope.case-pattern.shell",patterns:[{match:"\\|",name:"punctuation.separator.pipe-sign.shell"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#pathname"}]},{begin:"(?<=\\))",end:"(?=;;&?|;&)",name:"meta.scope.case-clause-body.shell",patterns:[{include:"#initial_context"}]}]}]},comment:{match:"(?:^|[ \\t]++)(?:((#!).*)|((#).*))",captures:{1:{name:"comment.line.number-sign.shell meta.shebang.shell"},2:{name:"punctuation.definition.comment.shebang.shell"},3:{name:"comment.line.number-sign.shell"},4:{name:"punctuation.definition.comment.shell"}}},comments:{patterns:[{include:"#block_comment"},{include:"#line_comment"}]},"compound-command":{patterns:[{begin:"\\[{1,2}",beginCaptures:{0:{name:"punctuation.definition.logical-expression.shell"}},end:"\\]{1,2}",endCaptures:{0:{name:"punctuation.definition.logical-expression.shell"}},name:"meta.scope.logical-expression.shell",patterns:[{include:"#logical-expression"},{include:"#initial_context"}]},{begin:"\\({2}",beginCaptures:{0:{name:"punctuation.definition.string.begin.shell"}},end:"\\){2}",endCaptures:{0:{name:"punctuation.definition.string.end.shell"}},name:"string.other.math.shell",patterns:[{include:"#math"}]},{begin:"\\(",beginCaptures:{0:{name:"punctuation.definition.subshell.shell"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.subshell.shell"}},name:"meta.scope.subshell.shell",patterns:[{include:"#initial_context"}]},{begin:"(?<=\\s|^){(?=\\s|$)",beginCaptures:{0:{name:"punctuation.definition.group.shell"}},end:"(?<=^|;)\\s*(})",endCaptures:{1:{name:"punctuation.definition.group.shell"}},name:"meta.scope.group.shell",patterns:[{include:"#initial_context"}]}]},continuation_of_double_quoted_command_name:{begin:'\\G(?<=")',end:'"',beginCaptures:{},endCaptures:{0:{name:"string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}},contentName:"meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command",patterns:[{match:'\\\\[\\$\\n`"\\\\]',name:"constant.character.escape.shell"},{include:"#variable"},{include:"#interpolation"}]},continuation_of_single_quoted_command_name:{begin:"\\G(?<=')",end:"'",beginCaptures:{},endCaptures:{0:{name:"string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}},contentName:"meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command"},custom_command_names:{patterns:[]},custom_commands:{patterns:[]},double_quote_context:{patterns:[{match:'\\\\[\\$`"\\\\\\n]',name:"constant.character.escape.shell"},{include:"#variable"},{include:"#interpolation"}]},double_quote_escape_char:{match:'\\\\[\\$`"\\\\\\n]',name:"constant.character.escape.shell"},function_definition:{begin:"[ \\t]*+(?:(\\bfunction\\b)[ \\t]*+([^ \\t\\n\\r\\(\\)=]+)(?:(\\()[ \\t]*+(\\)))?|([^ \\t\\n\\r\\(\\)=]+)[ \\t]*+(\\()[ \\t]*+(\\)))",end:"(?<=\\}|\\))",beginCaptures:{1:{name:"storage.type.function.shell"},2:{name:"entity.name.function.shell"},3:{name:"punctuation.definition.arguments.shell"},4:{name:"punctuation.definition.arguments.shell"},5:{name:"entity.name.function.shell"},6:{name:"punctuation.definition.arguments.shell"},7:{name:"punctuation.definition.arguments.shell"}},endCaptures:{},name:"meta.function.shell",patterns:[{match:"\\G(?:\\t| |\\n)"},{begin:"\\{",end:"\\}",beginCaptures:{0:{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},endCaptures:{0:{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},name:"meta.function.body.shell",patterns:[{include:"#initial_context"}]},{begin:"\\(",end:"\\)",beginCaptures:{0:{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},endCaptures:{0:{name:"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},name:"meta.function.body.shell",patterns:[{include:"#initial_context"}]}],applyEndPatternLast:1},heredoc:{patterns:[{begin:`((?<!<)<<-)[ \\t]*+("|')[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|"|')(?:\\2)(.*)`,end:"^\\t*(?:\\3)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.operator.heredoc.shell"},2:{},3:{name:"punctuation.definition.string.heredoc.shell"},4:{patterns:[{include:"#normal_statement_context"}]}},endCaptures:{0:{name:"punctuation.definition.string.heredoc.shell"}},contentName:"string.quoted.heredoc.indent",patterns:[]},{begin:`((?<!<)<<(?!<))[ \\t]*+("|')[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|"|')(?:\\2)(.*)`,end:"^(?:\\3)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.operator.heredoc.shell"},2:{},3:{name:"punctuation.definition.string.heredoc.shell"},4:{patterns:[{include:"#normal_statement_context"}]}},endCaptures:{0:{name:"punctuation.definition.string.heredoc.shell"}},contentName:"string.quoted.heredoc.no-indent",patterns:[]},{begin:`((?<!<)<<-)[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|"|')(.*)`,end:"^\\t*(?:\\2)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.operator.heredoc.shell"},2:{name:"punctuation.definition.string.heredoc.shell"},3:{patterns:[{include:"#normal_statement_context"}]}},endCaptures:{0:{name:"punctuation.definition.string.heredoc.shell"}},contentName:"string.unquoted.heredoc.indent",patterns:[{include:"#double_quote_escape_char"},{include:"#variable"},{include:"#interpolation"}]},{begin:`((?<!<)<<(?!<))[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|"|')(.*)`,end:"^(?:\\2)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.operator.heredoc.shell"},2:{name:"punctuation.definition.string.heredoc.shell"},3:{patterns:[{include:"#normal_statement_context"}]}},endCaptures:{0:{name:"punctuation.definition.string.heredoc.shell"}},contentName:"string.unquoted.heredoc.no-indent",patterns:[{include:"#double_quote_escape_char"},{include:"#variable"},{include:"#interpolation"}]}]},herestring:{patterns:[{begin:"(<<<)\\s*(('))",beginCaptures:{1:{name:"keyword.operator.herestring.shell"},2:{name:"string.quoted.single.shell"},3:{name:"punctuation.definition.string.begin.shell"}},end:"(')",endCaptures:{0:{name:"string.quoted.single.shell"},1:{name:"punctuation.definition.string.end.shell"}},name:"meta.herestring.shell",contentName:"string.quoted.single.shell"},{begin:'(<<<)\\s*(("))',beginCaptures:{1:{name:"keyword.operator.herestring.shell"},2:{name:"string.quoted.double.shell"},3:{name:"punctuation.definition.string.begin.shell"}},end:'(")',endCaptures:{0:{name:"string.quoted.double.shell"},1:{name:"punctuation.definition.string.end.shell"}},name:"meta.herestring.shell",contentName:"string.quoted.double.shell",patterns:[{include:"#double_quote_context"}]},{captures:{1:{name:"keyword.operator.herestring.shell"},2:{name:"string.unquoted.herestring.shell",patterns:[{include:"#initial_context"}]}},match:"(<<<)\\s*(([^\\s)\\\\]|\\\\.)+)",name:"meta.herestring.shell"}]},initial_context:{patterns:[{include:"#comment"},{include:"#pipeline"},{include:"#normal_statement_seperator"},{include:"#logical_expression_double"},{include:"#logical_expression_single"},{include:"#misc_ranges"},{include:"#loop"},{include:"#function_definition"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#redirection"},{include:"#pathname"},{include:"#keyword"},{include:"#alias_statement"},{include:"#normal_statement"},{include:"#string"},{include:"#support"}]},inline_comment:{match:"(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/))",captures:{1:{name:"comment.block.shell punctuation.definition.comment.begin.shell"},2:{name:"comment.block.shell"},3:{patterns:[{match:"\\*\\/",name:"comment.block.shell punctuation.definition.comment.end.shell"},{match:"\\*",name:"comment.block.shell"}]}}},interpolation:{patterns:[{begin:"\\$\\({2}",beginCaptures:{0:{name:"punctuation.definition.evaluation.arithmetic.begin.shell"}},end:"\\)\\s*\\)",endCaptures:{0:{name:"punctuation.definition.evaluation.arithmetic.end.shell"}},name:"string.other.math.shell",patterns:[{include:"#math"}]},{begin:"`",beginCaptures:{0:{name:"punctuation.definition.evaluation.backticks.shell"}},end:"`",endCaptures:{0:{name:"punctuation.definition.evaluation.backticks.shell"}},name:"string.interpolated.backtick.shell",patterns:[{match:"\\\\[`\\\\$]",name:"constant.character.escape.shell"},{begin:"(?<=\\W)(?=#)(?!#{)",beginCaptures:{1:{name:"punctuation.whitespace.comment.leading.shell"}},end:"(?!\\G)",patterns:[{begin:"#",beginCaptures:{0:{name:"punctuation.definition.comment.shell"}},end:"(?=`)",name:"comment.line.number-sign.shell"}]},{include:"#initial_context"}]},{begin:"\\$\\(",beginCaptures:{0:{name:"punctuation.definition.evaluation.parens.begin.shell"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.evaluation.parens.end.shell"}},name:"string.interpolated.dollar.shell",patterns:[{include:"#initial_context"}]}]},keyword:{patterns:[{match:"(?<=^|;|&| |\\t)(?:continue|foreach|return|select|repeat|break|until|while|case|done|elif|else|esac|then|for|end|do|if|fi|in)(?= |\\t|;|&|$)",name:"keyword.control.$0.shell"}]},line_comment:{begin:"\\s*+(\\/\\/)",end:"(?<=\\n)(?<!\\\\\\n)",beginCaptures:{1:{name:"punctuation.definition.comment.shell"}},endCaptures:{},name:"comment.line.double-slash.shell",patterns:[{include:"#line_continuation_character"}]},line_continuation:{match:"\\\\(?=\\n)",name:"constant.character.escape.line-continuation.shell"},"logical-expression":{patterns:[{comment:"do we want a special rule for ( expr )?",match:"=[=~]?|!=?|<|>|&&|\\|\\|",name:"keyword.operator.logical.shell"},{match:"(?<!\\S)-(nt|ot|ef|eq|ne|l[te]|g[te]|[a-hknoprstuwxzOGLSN])\\b",name:"keyword.operator.logical.shell"}]},logical_expression_context:{patterns:[{include:"#regex_comparison"},{include:"#logical-expression"},{include:"#logical_expression_single"},{include:"#logical_expression_double"},{include:"#comment"},{include:"#boolean"},{include:"#redirect_number"},{include:"#numeric_literal"},{include:"#pipeline"},{include:"#normal_statement_seperator"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#pathname"},{include:"#keyword"},{include:"#support"}]},logical_expression_double:{begin:"\\[\\[",end:"\\]\\]",beginCaptures:{0:{name:"punctuation.definition.logical-expression.shell"}},endCaptures:{0:{name:"punctuation.definition.logical-expression.shell"}},name:"meta.scope.logical-expression.shell",patterns:[{include:"#logical_expression_context"}]},logical_expression_single:{begin:"\\[",end:"\\]",beginCaptures:{0:{name:"punctuation.definition.logical-expression.shell"}},endCaptures:{0:{name:"punctuation.definition.logical-expression.shell"}},name:"meta.scope.logical-expression.shell",patterns:[{include:"#logical_expression_context"}]},loop:{patterns:[{begin:"(?<=^|;|&|\\s)(for)\\s+(?=\\({2})",beginCaptures:{1:{name:"keyword.control.shell"}},end:"(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))",endCaptures:{0:{name:"keyword.control.shell"}},name:"meta.scope.for-loop.shell",patterns:[{include:"#initial_context"}]},{begin:"(?<=^|;|&|\\s)(for)\\s+(.+?)\\s+(in)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.control.shell"},2:{name:"variable.other.loop.shell",patterns:[{include:"#string"}]},3:{name:"keyword.control.shell"}},end:"(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))",endCaptures:{0:{name:"keyword.control.shell"}},name:"meta.scope.for-in-loop.shell",patterns:[{include:"#initial_context"}]},{begin:"(?<=^|;|&|\\s)(while|until)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.control.shell"}},end:"(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))",endCaptures:{0:{name:"keyword.control.shell"}},name:"meta.scope.while-loop.shell",patterns:[{include:"#initial_context"}]},{begin:"(?<=^|;|&|\\s)(select)\\s+((?:[^\\s\\\\]|\\\\.)+)(?=\\s|;|&|$)",beginCaptures:{1:{name:"keyword.control.shell"},2:{name:"variable.other.loop.shell"}},end:"(?<=^|;|&|\\s)(done)(?=\\s|;|&|$|\\))",endCaptures:{1:{name:"keyword.control.shell"}},name:"meta.scope.select-block.shell",patterns:[{include:"#initial_context"}]},{begin:"(?<=^|;|&|\\s)case(?=\\s|;|&|$)",beginCaptures:{0:{name:"keyword.control.shell"}},end:"(?<=^|;|&|\\s)esac(?=\\s|;|&|$)",endCaptures:{0:{name:"keyword.control.shell"}},name:"meta.scope.case-block.shell",patterns:[{begin:"(?<=^|;|&|\\s)in(?=\\s|;|&|$)",beginCaptures:{0:{name:"keyword.control.shell"}},end:"(?<=^|;|&|\\s)(?=esac(\\s|;|&|$))",name:"meta.scope.case-body.shell",patterns:[{include:"#comment"},{include:"#case-clause"}]},{include:"#initial_context"}]},{begin:"(?<=^|;|&|\\s)if(?=\\s|;|&|$)",beginCaptures:{0:{name:"keyword.control.shell"}},end:"(?<=^|;|&|\\s)fi(?=\\s|;|&|$)",endCaptures:{0:{name:"keyword.control.shell"}},name:"meta.scope.if-block.shell",patterns:[{include:"#initial_context"}]}]},math:{patterns:[{include:"#variable"},{match:"\\+{1,2}|-{1,2}|!|~|\\*{1,2}|/|%|<[<=]?|>[>=]?|==|!=|^|\\|{1,2}|&{1,2}|\\?|\\:|,|=|[*/%+\\-&^|]=|<<=|>>=",name:"keyword.operator.arithmetic.shell"},{match:"0[xX][0-9A-Fa-f]+",name:"constant.numeric.hex.shell"},{match:"0\\d+",name:"constant.numeric.octal.shell"},{match:"\\d{1,2}#[0-9a-zA-Z@_]+",name:"constant.numeric.other.shell"},{match:"\\d+",name:"constant.numeric.integer.shell"}]},misc_ranges:{patterns:[{include:"#logical_expression_single"},{include:"#logical_expression_double"},{begin:"\\(\\(",end:"\\)\\)",beginCaptures:{0:{name:"punctuation.section.arithmetic.shell"}},endCaptures:{0:{name:"punctuation.section.arithmetic.shell"}},name:"meta.arithmetic.shell",patterns:[{include:"#math"}]},{begin:"(?<!=)\\(",end:"\\)",beginCaptures:{0:{name:"punctuation.definition.subshell"}},endCaptures:{0:{name:"punctuation.definition.subshell"}},name:"meta.scope.subshell",patterns:[{include:"#initial_context"}]},{begin:"(?<![^ \\t])({)",end:"}",beginCaptures:{1:{name:"punctuation.definition.group.shell"}},endCaptures:{0:{name:"punctuation.definition.group.shell"}},name:"meta.scope.group.shell",patterns:[{include:"#initial_context"}]}]},modifiers:{match:"(?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$)",name:"storage.modifier.$0.shell"},normal_statement:{begin:"(?!^[ \\t]*+$)(?:(?<=^until | until |\\tuntil |^while | while |\\twhile |^elif | elif |\\telif |^else | else |\\telse |^then | then |\\tthen |^do | do |\\tdo |^if | if |\\tif )|(?<=(?:^|;|\\||&|!|\\(|\\{|\\`)))[ \\t]*+(?!nocorrect\\W|nocorrect\\$|function\\W|function\\$|foreach\\W|foreach\\$|repeat\\W|repeat\\$|logout\\W|logout\\$|coproc\\W|coproc\\$|select\\W|select\\$|while\\W|while\\$|pushd\\W|pushd\\$|until\\W|until\\$|case\\W|case\\$|done\\W|done\\$|elif\\W|elif\\$|else\\W|else\\$|esac\\W|esac\\$|popd\\W|popd\\$|then\\W|then\\$|time\\W|time\\$|for\\W|for\\$|end\\W|end\\$|fi\\W|fi\\$|do\\W|do\\$|in\\W|in\\$|if\\W|if\\$)",end:"(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)",beginCaptures:{},endCaptures:{},name:"meta.statement.shell",patterns:[{include:"#function_definition"},{include:"#assignment"},{begin:"[ \\t]*+(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)",end:"(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)",beginCaptures:{},endCaptures:{},name:"meta.statement.command.shell",patterns:[{begin:"\\G",end:"(?= |\\t|;|\\||&|$|\\n|\\)|\\`)",beginCaptures:{},endCaptures:{},name:"meta.statement.command.name.shell",patterns:[{include:"#modifiers"},{match:"(?<!\\w)(?:continue|return|break)(?!\\w)",name:"entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell"},{match:"(?<!\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/)(?!\\w)",name:"entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell"},{include:"#variable"},{match:`(?<=\\G|'|"|\\}|\\))([^ \\n\\t\\r"'=;&\\|\`\\)\\{]+)`,captures:{1:{name:"entity.name.function.call.shell entity.name.command.shell"}}},{begin:`(?:\\G|(?<! |\\t|;|\\||&|\\n|\\{|#))((?:\\$)?)((?:(")|(')))`,end:"(?<!\\G)(?<=(?:\\2))",beginCaptures:{1:{name:"meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell"},2:{},3:{name:"meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},4:{name:"meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"}},endCaptures:{},patterns:[{include:"#continuation_of_single_quoted_command_name"},{include:"#continuation_of_double_quoted_command_name"}]},{include:"#line_continuation"}]},{include:"#line_continuation"},{include:"#option"},{include:"#argument"},{include:"#statement_context"},{include:"#string"}]},{include:"#line_continuation"},{include:"#normal_statement_context"}]},normal_statement_context:{patterns:[{include:"#comment"},{include:"#pipeline"},{include:"#normal_statement_seperator"},{include:"#misc_ranges"},{include:"#boolean"},{include:"#redirect_number"},{include:"#numeric_literal"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#redirection"},{include:"#pathname"},{include:"#keyword"},{include:"#support"}]},normal_statement_seperator:{match:"(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n)",captures:{1:{name:"punctuation.terminator.statement.semicolon.shell"},2:{name:"punctuation.separator.statement.and.shell"},3:{name:"punctuation.separator.statement.or.shell"},4:{name:"punctuation.separator.statement.background.shell"}}},numeric_literal:{match:"[ \\t]*+(?<==| |\\t|^|\\{|\\(|\\[)(?:(?:(?:(?:(0[xX][0-9A-Fa-f]+)|(0\\d+))|(\\d{1,2}#[0-9a-zA-Z@_]+))|(-?\\d+\\.\\d+))|(-?\\d+))(?!>)",captures:{1:{name:"constant.numeric.shell constant.numeric.hex.shell"},2:{name:"constant.numeric.shell constant.numeric.octal.shell"},3:{name:"constant.numeric.shell constant.numeric.other.shell"},4:{name:"constant.numeric.shell constant.numeric.integer.shell"},5:{name:"constant.numeric.shell constant.numeric.integer.shell"}}},option:{begin:"[ \\t]++(-)((?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t])))",end:"(?:(?=[ \\t])|(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\))",beginCaptures:{1:{name:"string.unquoted.argument.shell constant.other.option.dash.shell"},2:{name:"string.unquoted.argument.shell constant.other.option.shell"}},endCaptures:{},contentName:"string.unquoted.argument constant.other.option",patterns:[{include:"#option_context"}]},option_context:{patterns:[{include:"#misc_ranges"},{include:"#string"},{include:"#variable"},{include:"#interpolation"},{include:"#heredoc"},{include:"#herestring"},{include:"#redirection"},{include:"#pathname"},{include:"#keyword"},{include:"#support"}]},pathname:{patterns:[{match:"(?<=\\s|:|=|^)~",name:"keyword.operator.tilde.shell"},{match:"\\*|\\?",name:"keyword.operator.glob.shell"},{begin:"([?*+@!])(\\()",beginCaptures:{1:{name:"keyword.operator.extglob.shell"},2:{name:"punctuation.definition.extglob.shell"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.extglob.shell"}},name:"meta.structure.extglob.shell",patterns:[{include:"#initial_context"}]}]},pipeline:{patterns:[{match:"(?<=^|;|&|\\s)(time)(?=\\s|;|&|$)",name:"keyword.other.shell"},{match:"[|!]",name:"keyword.operator.pipe.shell"}]},redirect_number:{match:"(?<=[ \\t])(?:(1)|(2)|(\\d+))(?=>)",captures:{1:{name:"keyword.operator.redirect.stdout.shell"},2:{name:"keyword.operator.redirect.stderr.shell"},3:{name:"keyword.operator.redirect.$3.shell"}}},redirection:{patterns:[{begin:"[><]\\(",beginCaptures:{0:{name:"punctuation.definition.string.begin.shell"}},end:"\\)",endCaptures:{0:{name:"punctuation.definition.string.end.shell"}},name:"string.interpolated.process-substitution.shell",patterns:[{include:"#initial_context"}]},{match:"(?<![<>])(&>|\\d*>&\\d*|\\d*(>>|>|<)|\\d*<&|\\d*<>)(?![<>])",name:"keyword.operator.redirect.shell"}]},regex_comparison:{match:"\\=~",name:"keyword.operator.logical.regex.shell"},regexp:{patterns:[{match:".+"}]},simple_options:{match:"(?:[ \\t]++\\-\\w+)*",captures:{0:{patterns:[{match:"[ \\t]++(\\-)(\\w+)",captures:{1:{name:"string.unquoted.argument.shell constant.other.option.dash.shell"},2:{name:"string.unquoted.argument.shell constant.other.option.shell"}}}]}}},start_of_command:{match:"[ \\t]*+(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)"},start_of_double_quoted_command_name:{match:`(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:[ \\t]*+([^
|
|
3
|
-
'&;<>\\(\\)\\$\`\\\\"\\|]+(?!>)))?(?:(?:\\$")|")`,captures:{1:{name:"entity.name.function.call.shell entity.name.command.shell",patterns:[{match:"\\*",name:"variable.language.special.wildcard.shell"},{include:"#variable"},{include:"#numeric_literal"},{match:"(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)",captures:{1:{name:"constant.language.$1.shell"}}}]}},name:"meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},start_of_single_quoted_command_name:{match:`(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:[ \\t]*+([^
|
|
4
|
-
'&;<>\\(\\)\\$\`\\\\"\\|]+(?!>)))?(?:(?:\\$')|')`,captures:{1:{name:"entity.name.function.call.shell entity.name.command.shell",patterns:[{match:"\\*",name:"variable.language.special.wildcard.shell"},{include:"#variable"},{include:"#numeric_literal"},{match:"(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)",captures:{1:{name:"constant.language.$1.shell"}}}]}},name:"meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},string:{patterns:[{match:"\\\\.",name:"constant.character.escape.shell"},{begin:"'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.shell"}},endCaptures:{0:{name:"punctuation.definition.string.end.shell"}},name:"string.quoted.single.shell"},{begin:'\\$?"',end:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.shell"}},endCaptures:{0:{name:"punctuation.definition.string.end.shell"}},name:"string.quoted.double.shell",patterns:[{match:'\\\\[\\$\\n`"\\\\]',name:"constant.character.escape.shell"},{include:"#variable"},{include:"#interpolation"}]},{begin:"\\$'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.shell"}},endCaptures:{0:{name:"punctuation.definition.string.end.shell"}},name:"string.quoted.single.dollar.shell",patterns:[{match:"\\\\(?:a|b|e|f|n|r|t|v|\\\\|')",name:"constant.character.escape.ansi-c.shell"},{match:'\\\\[0-9]{3}"',name:"constant.character.escape.octal.shell"},{match:'\\\\x[0-9a-fA-F]{2}"',name:"constant.character.escape.hex.shell"},{match:'\\\\c."',name:"constant.character.escape.control-char.shell"}]}]},support:{patterns:[{match:"(?<=^|;|&|\\s)(?::|\\.)(?=\\s|;|&|$)",name:"support.function.builtin.shell"}]},variable:{patterns:[{match:"(\\$)(\\@(?!\\w))",captures:{1:{name:"punctuation.definition.variable.shell variable.parameter.positional.all.shell"},2:{name:"variable.parameter.positional.all.shell"}}},{match:"(\\$)([0-9](?!\\w))",captures:{1:{name:"punctuation.definition.variable.shell variable.parameter.positional.shell"},2:{name:"variable.parameter.positional.shell"}}},{match:"(\\$)([-*#?$!0_](?!\\w))",captures:{1:{name:"punctuation.definition.variable.shell variable.language.special.shell"},2:{name:"variable.language.special.shell"}}},{begin:"(\\$)(\\{)[ \\t]*+(?=\\d)",end:"\\}",beginCaptures:{1:{name:"punctuation.definition.variable.shell variable.parameter.positional.shell"},2:{name:"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},endCaptures:{0:{name:"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},contentName:"meta.parameter-expansion",patterns:[{match:"!|:[-=?]?|\\*|@|##|#|%%|%|\\/",name:"keyword.operator.expansion.shell"},{match:"(\\[)[^\\]]+(\\])",captures:{1:{name:"punctuation.section.array.shell"},2:{name:"punctuation.section.array.shell"}}},{match:"[0-9]+",name:"variable.parameter.positional.shell"},{match:"(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)",name:"variable.other.normal.shell"},{include:"#variable"},{include:"#string"}]},{begin:"(\\$)(\\{)",end:"\\}",beginCaptures:{1:{name:"punctuation.definition.variable.shell"},2:{name:"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell"}},endCaptures:{0:{name:"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell"}},contentName:"meta.parameter-expansion",patterns:[{match:"!|:[-=?]?|\\*|@|##|#|%%|%|\\/",name:"keyword.operator.expansion.shell"},{match:"(\\[)[^\\]]+(\\])",captures:{1:{name:"punctuation.section.array.shell"},2:{name:"punctuation.section.array.shell"}}},{match:"(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)",name:"variable.other.normal.shell"},{include:"#variable"},{include:"#string"}]},{match:"(\\$)(\\w+(?!\\w))",captures:{1:{name:"punctuation.definition.variable.shell variable.other.normal.shell"},2:{name:"variable.other.normal.shell"}}}]}},displayName:"Shell",aliases:["bash","sh","shell","zsh"]});var n=[e];export{n as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as R,P as ne,r as A,Q as z,bz as T,aA as ae,w as oe,az as se,a1 as le,a as re,L as f,M as k,f as t,o as l,h as m,j as u,k as r,i as c,l as D,m as i,F as w,n as U,t as b,G as E,ae as M,v as d,p as F,at as ue,I as ie,bf as de,af as ce,bA as pe,bB as G,_ as me,X as _e,a6 as fe,ao as ve,A as ye,U as ge,aG as he}from"./entry.52bc93cd.js";import{_ as ke}from"./NSelect.vue.cdaf42b9.js";import{_ as be}from"./NLink.vue.0a35d66d.js";import{_ as xe}from"./FilepathItem.vue.e3761da9.js";import{q as we}from"./json-editor-vue.d503734c.js";const Ce={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ke={class:"w-full text-sm"},Se=["value"],Ve=["onClick"],$e=r("div",{"x-divider":""},null,-1),Ne={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Ie={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},je={class:"flex items-center gap-4"},Ae={key:1},De=["onKeyup"],Ue=r("br",null,null,-1),Me={key:0,op50:""},qe={key:1},Be=r("code",null,"nitro.storage",-1),Le=r("br",null,null,-1),Pe={"font-bold":""},ze=r("br",null,null,-1),Te={"text-sm":""},Ee=r("br",null,null,-1),Fe=R({__name:"StorageDetails",async setup(O){let p,g;const C=pe(),h=ne(),x=A(""),v=A(""),s=z("storage:current",""),e=A(),y=z("storage:file:state",""),{data:K}=([p,g]=T(()=>G("storageMounts",()=>f.getStorageMounts())),p=await p,g(),p),{data:S,refresh:q}=([p,g]=T(async()=>G("storageKeys",async()=>s.value?await f.getStorageKeys(s.value):[])),p=await p,g(),p),Q=C.hook("storage:key:update",async(n,a)=>{if(!(!s.value||n.split(":")[0]!==s.value)&&(await q(),y.value===n)){if(a==="remove")return h.replace({query:{storage:s.value}});await $(y.value)}});ae(Q),oe(s,()=>{q(),y.value=""}),se(async()=>{if(!y.value){e.value=null;return}$(y.value)}),le("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(N(),n.preventDefault())});function V(n){return n.replace(`${s.value}:`,"")}const W=re(()=>S.value?S.value.filter(n=>n.includes(x.value)):[]);async function $(n){const a=await f.getStorageItem(await k(),n);e.value={key:n,updatedKey:V(n),editingKey:!1,content:a,updatedContent:a}}async function X(){if(!v.value||!s.value)return;const n=`${s.value}:${v.value}`;S.value?.includes(n)||await f.setStorageItem(await k(),n,""),h.replace({query:{storage:s.value,key:n}}),v.value=""}async function N(){e.value&&(await f.setStorageItem(await k(),e.value.key,e.value.updatedContent),await $(e.value.key))}async function H(){!e.value||!s.value||(await f.removeStorageItem(await k(),e.value.key),e.value=null)}async function J(){if(!e.value||!s.value)return;const n=`${s.value}:${e.value.updatedKey}`,a=await k();await f.setStorageItem(a,n,e.value.updatedContent),await f.removeStorageItem(a,e.value.key),h.replace({query:{storage:s.value,key:n}})}return(n,a)=>{const I=me,Y=ke,j=_e,Z=fe,B=be,L=ve,P=ye,ee=ge,te=xe;return t(s)?(l(),m(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[r("div",Ce,[c(I,{icon:"carbon-chevron-left","ml--1":"",border:!1,onClick:a[0]||(a[0]=o=>s.value="")}),r("div",Ke,[c(Y,{modelValue:t(s),"onUpdate:modelValue":a[1]||(a[1]=o=>D(s)?s.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(l(!0),i(w,null,U(t(K),(o,_)=>(l(),i("option",{key:_,value:_},b(_),9,Se))),128))]),_:1},8,["modelValue"])])]),c(j,{modelValue:t(x),"onUpdate:modelValue":a[2]||(a[2]=o=>D(x)?x.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(l(!0),i(w,null,U(t(W),o=>(l(),i(w,{key:o},[r("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:E(o===t(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:_=>y.value=o},b(V(o)),11,Ve),$e],64))),128)),c(j,{modelValue:t(v),"onUpdate:modelValue":a[3]||(a[3]=o=>D(v)?v.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:M(X,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[t(e)?.key?(l(),i("div",Ne,[r("div",Ie,[r("div",je,[t(e).editingKey?(l(),m(j,{key:0,modelValue:t(e).updatedKey,"onUpdate:modelValue":a[4]||(a[4]=o=>t(e).updatedKey=o),onKeyup:M(J,["enter"])},null,8,["modelValue","onKeyup"])):(l(),i("code",Ae,[d(b(V(t(e).key))+" ",1),c(Z,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:a[5]||(a[5]=o=>t(e).editingKey=!0)})])),t(e).editingKey?F("",!0):(l(),m(I,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:E({"border-green":t(e).content!==t(e).updatedContent}),onClick:N},{default:u(()=>[d(" Save ")]),_:1},8,["disabled","class"]))]),r("div",null,[c(I,{n:"red xs",onClick:H},{default:u(()=>[d(" Delete ")]),_:1})])]),typeof t(e).content=="object"?(l(),m(t(we),ue({key:0,modelValue:t(e).updatedContent,"onUpdate:modelValue":a[6]||(a[6]=o=>t(e).updatedContent=o),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):ie((l(),i("textarea",{key:1,"onUpdate:modelValue":a[7]||(a[7]=o=>t(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:M(de(N,["ctrl"]),["enter"])},null,40,De)),[[ce,t(e).updatedContent]])])):(l(),m(P,{key:1},{default:u(()=>[c(L,{px6:"",py4:""},{default:u(()=>[d(" Select one key to start."),Ue,d("Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(l(),m(P,{key:1},{default:u(()=>[Object.keys(t(K)).length?(l(),i("p",Me," Select one storage to start: ")):(l(),i("p",qe,[d(" No custom storage defined in "),Be,d("."),Le,d(" Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})])),(l(!0),i(w,null,U(t(K),(o,_)=>(l(),m(L,{key:_,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Ge=>s.value=_},{default:u(()=>[r("span",Pe,b(_),1),ze,r("span",Te,b(o.driver)+" driver",1),Ee,o.base?(l(),m(te,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):F("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),He=R({__name:"storage",setup(O){return(p,g)=>{const C=Fe,h=he;return l(),m(h,null,{default:u(()=>[c(C)]),_:1})}}});export{He as default};
|