@nuxt/scripts 1.0.0-rc.5 → 1.0.0-rc.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/devtools-client/200.html +1 -1
  2. package/dist/devtools-client/404.html +1 -1
  3. package/dist/devtools-client/_nuxt/{DoF6byDH.js → B7jHEBMT.js} +1 -1
  4. package/dist/devtools-client/_nuxt/{D838xXrH.js → BaiqmiV1.js} +1 -1
  5. package/dist/devtools-client/_nuxt/{Duf9abe1.js → BjmZlwuw.js} +1 -1
  6. package/dist/devtools-client/_nuxt/{BfQVeAez.js → CLjOeO0G.js} +1 -1
  7. package/dist/devtools-client/_nuxt/{C7-YRs3P.js → Chi3DhDl.js} +1 -1
  8. package/dist/devtools-client/_nuxt/{CL6TeQIJ.js → HLYrIHDq.js} +31 -31
  9. package/dist/devtools-client/_nuxt/builds/latest.json +1 -1
  10. package/dist/devtools-client/_nuxt/builds/meta/640f0a39-e659-4a31-8b8d-adbd9af52f1e.json +1 -0
  11. package/dist/devtools-client/_nuxt/error-404.Dwj0Wlzm.css +1 -0
  12. package/dist/devtools-client/_nuxt/error-500.B4wHUYBa.css +1 -0
  13. package/dist/devtools-client/_nuxt/{BFtOB2Ap.js → qfgRjj7S.js} +1 -1
  14. package/dist/devtools-client/docs/index.html +1 -1
  15. package/dist/devtools-client/first-party/index.html +1 -1
  16. package/dist/devtools-client/index.html +1 -1
  17. package/dist/devtools-client/registry/index.html +1 -1
  18. package/dist/module.json +1 -1
  19. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.d.vue.ts +73 -93
  20. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue +65 -57
  21. package/dist/runtime/components/GoogleMaps/ScriptGoogleMaps.vue.d.ts +73 -93
  22. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.d.vue.ts +49 -28
  23. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue +143 -103
  24. package/dist/runtime/components/GoogleMaps/ScriptGoogleMapsOverlayView.vue.d.ts +49 -28
  25. package/dist/runtime/components/GoogleMaps/useGoogleMapsResource.d.ts +50 -0
  26. package/dist/runtime/components/GoogleMaps/useGoogleMapsResource.js +76 -1
  27. package/dist/types-source.mjs +2 -198
  28. package/package.json +2 -2
  29. package/dist/devtools-client/_nuxt/builds/meta/03a9e297-6209-4281-8c3d-4265bdd5d038.json +0 -1
  30. package/dist/devtools-client/_nuxt/error-404.BGYgyi5Q.css +0 -1
  31. package/dist/devtools-client/_nuxt/error-500.7RpV0mcx.css +0 -1
@@ -1 +1 @@
1
- {"id":"03a9e297-6209-4281-8c3d-4265bdd5d038","timestamp":1775569702087}
1
+ {"id":"640f0a39-e659-4a31-8b8d-adbd9af52f1e","timestamp":1775787703990}
@@ -0,0 +1 @@
1
+ {"id":"640f0a39-e659-4a31-8b8d-adbd9af52f1e","timestamp":1775787703990,"prerendered":[]}
@@ -0,0 +1 @@
1
+ .grid[data-v-4b6f334a]{display:grid}.mb-2[data-v-4b6f334a]{margin-bottom:.5rem}.mb-4[data-v-4b6f334a]{margin-bottom:1rem}.max-w-520px[data-v-4b6f334a]{max-width:520px}.min-h-screen[data-v-4b6f334a]{min-height:100vh}.w-full[data-v-4b6f334a]{width:100%}.flex[data-v-4b6f334a]{display:flex}.place-content-center[data-v-4b6f334a]{place-content:center}.items-center[data-v-4b6f334a]{align-items:center}.justify-center[data-v-4b6f334a]{justify-content:center}.overflow-hidden[data-v-4b6f334a]{overflow:hidden}.bg-white[data-v-4b6f334a]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-4b6f334a]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-4b6f334a]{text-align:center}.text-\[80px\][data-v-4b6f334a]{font-size:80px}.text-2xl[data-v-4b6f334a]{font-size:1.5rem;line-height:2rem}.text-sm[data-v-4b6f334a]{font-size:.875rem;line-height:1.25rem}.text-\[\#020420\][data-v-4b6f334a]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-4b6f334a]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.hover\:text-\[\#00DC82\][data-v-4b6f334a]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-medium[data-v-4b6f334a]{font-weight:500}.font-semibold[data-v-4b6f334a]{font-weight:600}.leading-none[data-v-4b6f334a]{line-height:1}.tracking-wide[data-v-4b6f334a]{letter-spacing:.025em}.font-sans[data-v-4b6f334a]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-4b6f334a]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.underline[data-v-4b6f334a]{text-decoration-line:underline}.underline-offset-3[data-v-4b6f334a]{text-underline-offset:3px}.antialiased[data-v-4b6f334a]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-4b6f334a]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-4b6f334a]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-4b6f334a]{font-size:110px}.sm\:text-3xl[data-v-4b6f334a]{font-size:1.875rem;line-height:2.25rem}}
@@ -0,0 +1 @@
1
+ .grid[data-v-3c69d55a]{display:grid}.mb-2[data-v-3c69d55a]{margin-bottom:.5rem}.mb-4[data-v-3c69d55a]{margin-bottom:1rem}.max-w-520px[data-v-3c69d55a]{max-width:520px}.min-h-screen[data-v-3c69d55a]{min-height:100vh}.place-content-center[data-v-3c69d55a]{place-content:center}.overflow-hidden[data-v-3c69d55a]{overflow:hidden}.bg-white[data-v-3c69d55a]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-3c69d55a]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-3c69d55a]{text-align:center}.text-\[80px\][data-v-3c69d55a]{font-size:80px}.text-2xl[data-v-3c69d55a]{font-size:1.5rem;line-height:2rem}.text-\[\#020420\][data-v-3c69d55a]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-3c69d55a]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold[data-v-3c69d55a]{font-weight:600}.leading-none[data-v-3c69d55a]{line-height:1}.tracking-wide[data-v-3c69d55a]{letter-spacing:.025em}.font-sans[data-v-3c69d55a]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-3c69d55a]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased[data-v-3c69d55a]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-3c69d55a]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-3c69d55a]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-3c69d55a]{font-size:110px}.sm\:text-3xl[data-v-3c69d55a]{font-size:1.875rem;line-height:2.25rem}}
@@ -1 +1 @@
1
- import{f as j,o as s,c as n,n as k,h as o,a as e,t as r,x as $,_ as F,b as y,j as D,d as v,m as x,y as A,z as K,F as _,l as G,w as C,r as S,g as z,A as M,B as Z,C as X,D as q,E as tt,G as W,H as P,I as et,J,K as R,L as st,M as Q,N as at,O as ot,P as I,Q as nt,i as lt,R as V,S as rt,T as it}from"./CL6TeQIJ.js";const ct={class:"capitalize"},dt=j({__name:"ScriptStatus",props:{status:{},error:{}},setup(l){const p=$(()=>l.error?l.error==="TypeError: Failed to fetch"?"CORS Error":l.error:l.status||"unknown"),u=$(()=>{if(l.error||l.status==="error")return"status-error";switch(l.status){case"loaded":return"status-loaded";case"loading":return"status-loading";case"awaitingLoad":return"status-awaiting";case"validation-failed":return"status-validation";default:return"status-unknown"}});return(g,h)=>(s(),n("div",{class:k(["script-status",o(u)])},[h[0]||(h[0]=e("span",{class:"script-status-dot"},null,-1)),e("span",ct,r(o(p)),1)],2))}}),ut=Object.assign(F(dt,[["__scopeId","data-v-5cf865ba"]]),{__name:"ScriptStatus"}),mt={key:0,class:"script-metric"},pt=j({__name:"ScriptSize",props:{size:{}},setup(l){return(p,u)=>{const g=D;return l.size?(s(),n("span",mt,[y(g,{name:"i-carbon-meter",class:"text-[10px] opacity-50"}),v(" "+r(l.size),1)])):x("",!0)}}}),_t=Object.assign(F(pt,[["__scopeId","data-v-b147450b"]]),{__name:"ScriptSize"}),xt={key:0,class:"script-metric"},ft=j({__name:"ScriptLoadTime",props:{loadTime:{}},setup(l){return(p,u)=>{const g=D;return l.loadTime?(s(),n("span",xt,[y(g,{name:"i-carbon-timer",class:"text-[10px] opacity-50"}),v(" "+r(l.loadTime),1)])):x("",!0)}}}),yt=Object.assign(F(ft,[["__scopeId","data-v-c6837c50"]]),{__name:"ScriptLoadTime"}),vt={key:0,class:"panel-grids flex flex-col items-center justify-center py-8 gap-1.5 rounded-b-xl"},gt={key:1,class:"waterfall-container"},bt={class:"waterfall-stats"},ht={class:"waterfall-stat"},kt={class:"waterfall-stat-value"},wt={class:"waterfall-stat"},$t={class:"waterfall-stat-value"},St={class:"waterfall-stat"},Lt={class:"waterfall-stat-value"},Ct={class:"waterfall-proxied-badge"},Tt={class:"waterfall-stat-value"},jt={class:"text-xs space-y-1 max-w-60"},zt={class:"opacity-70"},Bt={class:"px-1 py-px rounded bg-white/10 text-[10px]"},Pt={key:0,class:"opacity-70"},Rt={class:"flex items-center gap-1"},Ft={class:"text-xs space-y-0.5"},Mt={class:"font-mono font-semibold"},It={class:"opacity-70"},Dt={key:0,class:"opacity-60"},Ot={key:1,class:"text-emerald-400"},Nt={class:"waterfall-table"},Ut={class:"waterfall-legend"},Ht={class:"waterfall-rows"},Et={class:"waterfall-url"},At={class:"waterfall-bar-track"},Kt={class:"waterfall-duration"},Wt={class:"text-xs space-y-1.5 max-w-80"},Vt={class:"font-mono text-[11px] break-all opacity-90"},Jt={class:"flex items-center gap-2 opacity-70"},Qt={class:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5"},Gt={class:"flex items-center gap-1 opacity-60"},Xt={class:"tabular-nums text-right"},Yt={key:0,class:"flex items-center gap-1 text-emerald-400"},Zt=j({__name:"NetworkWaterfall",props:{requests:{},domains:{default:()=>[]},proxyRoutes:{default:()=>[]},privacyLevel:{},proxyPrefix:{},isFirstParty:{type:Boolean,default:!1}},setup(l){const p=[{key:"dns",label:"DNS",color:"oklch(70% 0.15 165)"},{key:"connect",label:"Connect",color:"oklch(72% 0.14 75)"},{key:"ssl",label:"SSL",color:"oklch(65% 0.15 300)"},{key:"ttfb",label:"TTFB",color:"oklch(65% 0.13 250)"},{key:"download",label:"Download",color:"oklch(72% 0.12 200)"}],u=$(()=>[...l.requests].sort((i,t)=>i.startTime-t.startTime)),g=$(()=>{if(!u.value.length)return{min:0,max:1};const i=u.value[0].startTime,t=Math.max(...u.value.map(d=>d.startTime+d.duration));return{min:i,max:t||i+1}}),h=$(()=>l.requests.reduce((i,t)=>i+t.transferSize,0)),B=$(()=>g.value.max-g.value.min),b=$(()=>l.requests.filter(i=>i.isProxied).length),m=$(()=>{const i=new Map;for(const t of l.requests){const d=T(t.url),f=i.get(d)||{count:0,transfer:0,proxied:!1};f.count++,f.transfer+=t.transferSize,t.isProxied&&(f.proxied=!0),i.set(d,f)}return[...i.entries()].sort((t,d)=>d[1].transfer-t[1].transfer).map(([t,d])=>({domain:t,...d,isKnown:l.domains.includes(t),proxyRoute:l.proxyRoutes.find(f=>f.target.includes(t))}))}),w=/\/_scripts\/p\/([^/]+)/;function T(i){try{return new URL(i).hostname}catch{return i.match(w)?.[1]||"localhost"}}function O(i){const{min:t,max:d}=g.value,f=d-t;return{left:`${(i.startTime-t)/f*100}%`,width:`${Math.max(i.duration/f*100,.5)}%`}}function N(i,t){if(i.duration===0)return"0%";const d=i[t.key];return`${Math.max(d/i.duration*100,d>0?2:0)}%`}function U(i){try{const t=new URL(i),d=t.pathname+t.search;return d.length>50?`${d.slice(0,47)}...`:d}catch{return i.length>50?`${i.slice(0,47)}...`:i}}function H(i){return{script:"Script",xmlhttprequest:"XHR",fetch:"Fetch",img:"Image",css:"Stylesheet",beacon:"Beacon"}[i]||i}function E(i){return{script:"i-carbon-code",xmlhttprequest:"i-carbon-send-alt",fetch:"i-carbon-send-alt",img:"i-carbon-image",css:"i-carbon-paint-brush",beacon:"i-carbon-satellite-radar"}[i]||"i-carbon-document"}function a(i){return i.transferSize===0&&i.decodedBodySize>0?304:200}return(i,t)=>{const d=D,f=G;return l.requests.length?(s(),n("div",gt,[e("div",bt,[e("span",ht,[e("span",kt,r(l.requests.length),1),t[1]||(t[1]=e("span",{class:"waterfall-stat-label"},"req",-1))]),t[7]||(t[7]=e("span",{class:"waterfall-sep"},null,-1)),e("span",wt,[e("span",$t,r(o(A)(o(h))),1)]),t[8]||(t[8]=e("span",{class:"waterfall-sep"},null,-1)),e("span",St,[e("span",Lt,r(o(K)(Math.round(o(B)))),1)]),l.isFirstParty&&o(b)>0?(s(),n(_,{key:0},[t[5]||(t[5]=e("span",{class:"waterfall-sep"},null,-1)),y(f,null,{content:C(()=>[e("div",jt,[t[4]||(t[4]=e("div",{class:"font-semibold"}," First-Party Proxy ",-1)),e("div",zt,[v(r(o(b))+" request"+r(o(b)!==1?"s":"")+" routed through ",1),e("code",Bt,r(l.proxyPrefix||"/_scripts/p"),1)]),l.privacyLevel?(s(),n("div",Pt,[t[3]||(t[3]=v(" Privacy: ",-1)),e("span",{class:k(l.privacyLevel==="full"?"text-emerald-400":l.privacyLevel==="partial"?"text-amber-400":"")},r(l.privacyLevel),3)])):x("",!0)])]),default:C(()=>[e("span",Ct,[y(d,{name:"i-carbon-security",class:"text-[10px]"}),e("span",Tt,r(o(b))+"/"+r(l.requests.length),1),t[2]||(t[2]=v(" proxied ",-1))])]),_:1})],64)):x("",!0),o(m).length>1?(s(),n(_,{key:1},[t[6]||(t[6]=e("span",{class:"waterfall-sep"},null,-1)),e("div",Rt,[(s(!0),n(_,null,S(o(m),c=>(s(),z(f,{key:c.domain},{content:C(()=>[e("div",Ft,[e("div",Mt,r(c.domain),1),e("div",It,r(c.count)+" req · "+r(o(A)(c.transfer)),1),c.proxyRoute?(s(),n("div",Dt,r(c.proxyRoute.target)+" → "+r(c.proxyRoute.local),1)):x("",!0),c.proxied?(s(),n("div",Ot," Proxied through first-party ")):x("",!0)])]),default:C(()=>[e("span",{class:k(["domain-pill",c.proxied?"domain-pill-proxied":""])},[c.proxied?(s(),z(d,{key:0,name:"i-carbon-security",class:"text-[8px]"})):x("",!0),v(" "+r(c.domain),1)],2)]),_:2},1024))),128))])],64)):x("",!0)]),e("div",Nt,[e("div",Ut,[(s(),n(_,null,S(p,c=>e("div",{key:c.key,class:"waterfall-legend-item"},[e("span",{class:"waterfall-legend-dot",style:M({background:c.color})},null,4),v(" "+r(c.label),1)])),64))]),e("div",Ht,[(s(!0),n(_,null,S(o(u),(c,Y)=>(s(),z(f,{key:Y},{content:C(()=>[e("div",Wt,[e("div",Vt,r(c.url),1),e("div",Jt,[e("span",null,r(H(c.initiatorType)),1),t[10]||(t[10]=e("span",{class:"opacity-30"},"·",-1)),e("span",null,r(o(K)(Math.round(c.duration))),1),c.transferSize>0?(s(),n(_,{key:0},[t[9]||(t[9]=e("span",{class:"opacity-30"},"·",-1)),e("span",null,r(o(A)(c.transferSize)),1)],64)):x("",!0)]),e("div",Qt,[(s(),n(_,null,S(p,L=>(s(),n(_,{key:L.key},[c[L.key]>.1?(s(),n(_,{key:0},[e("div",Gt,[e("span",{class:"w-1.5 h-1.5 rounded-sm inline-block",style:M({background:L.color})},null,4),v(" "+r(L.label),1)]),e("div",Xt,r(c[L.key].toFixed(1))+"ms ",1)],64)):x("",!0)],64))),64))]),c.isProxied?(s(),n("div",Yt,[y(d,{name:"i-carbon-security",class:"text-[10px]"}),t[11]||(t[11]=v(" Proxied through first-party ",-1))])):x("",!0)])]),default:C(()=>[e("div",{class:k(["waterfall-row",c.isProxied?"waterfall-row-proxied":""])},[e("div",{class:k(["waterfall-status",a(c)===304?"waterfall-status-304":"waterfall-status-200"])},r(a(c)),3),y(d,{name:c.isProxied?"i-carbon-security":E(c.initiatorType),class:k(["waterfall-row-icon",c.isProxied?"waterfall-row-icon-proxied":""])},null,8,["name","class"]),e("div",Et,r(U(c.url)),1),e("div",At,[e("div",{class:"waterfall-bar",style:M(O(c))},[(s(),n(_,null,S(p,L=>e("div",{key:L.key,style:M({width:N(c,L),background:L.color}),class:"h-full"},null,4)),64))],4)]),e("div",Kt,r(o(K)(Math.round(c.duration))),1)],2)]),_:2},1024))),128))])])])):(s(),n("div",vt,[y(d,{name:"i-carbon-network-4",class:"text-xl text-(--color-text-subtle)"}),t[0]||(t[0]=e("p",{class:"text-xs text-(--color-text-subtle)"}," Requests appear as the script loads ",-1))]))}}}),qt=Object.assign(F(Zt,[["__scopeId","data-v-a64c8d9a"]]),{__name:"NetworkWaterfall"});function te(l=2e3){const{copy:p,copied:u}=Z({legacy:!0,copiedDuring:l});return{copy:p,copied:u}}const ee=j({__name:"DevtoolsCopyButton",props:{text:{}},setup(l){const{copy:p,copied:u}=te();return(g,h)=>{const B=X,b=G;return s(),z(b,{text:o(u)?"Copied!":"Copy"},{default:C(()=>[y(B,{icon:o(u)?"carbon:checkmark":"carbon:copy","aria-label":o(u)?"Copied":"Copy to clipboard",class:k(o(u)?"text-[var(--seo-green)]":""),onClick:h[0]||(h[0]=m=>o(p)(l.text))},null,8,["icon","aria-label","class"])]),_:1},8,["text"])}}}),se=Object.assign(ee,{__name:"DevtoolsCopyButton"}),ae=["innerHTML"],oe=j({__name:"OCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!1},transformRendered:{type:Function}},setup(l){const p=q(()=>l.code,l.lang),u=$(()=>l.transformRendered?l.transformRendered(p.value||""):p.value);return(g,h)=>(s(),n("pre",{class:k(["code-block p-5",l.lines?"code-block-lines":""]),innerHTML:o(u)},null,10,ae))}}),ne=Object.assign(oe,{__name:"OCodeBlock"}),le={class:"devtools-snippet"},re={key:0,class:"devtools-snippet-header"},ie={class:"devtools-snippet-label"},ce=j({__name:"DevtoolsSnippet",props:{label:{},code:{},lang:{default:"js"}},setup(l){return(p,u)=>{const g=se,h=ne;return s(),n("div",le,[l.label||p.$slots.header?(s(),n("div",re,[tt(p.$slots,"header",{},()=>[e("code",ie,r(l.label),1)],!0),y(g,{text:l.code},null,8,["text"])])):x("",!0),y(h,{code:l.code,lang:l.lang,class:"devtools-snippet-block"},null,8,["code","lang"])])}}}),de=Object.assign(F(ce,[["__scopeId","data-v-265ccc31"]]),{__name:"DevtoolsSnippet"}),ue={class:"py-1"},me={key:0,class:"panel-grids rounded-xl flex flex-col items-center justify-center py-16 gap-3"},pe={class:"w-12 h-12 rounded-xl bg-(--color-surface-elevated) border border-(--color-border) flex items-center justify-center"},_e={class:"filter-bar"},xe=["onClick"],fe={class:"filter-chip-count"},ye={class:"stagger-children space-y-3"},ve={class:"px-4 py-3 flex items-center justify-between gap-3"},ge={class:"flex items-center gap-2.5 min-w-0"},be={class:"w-7 h-7 rounded-lg bg-(--color-surface-sunken) border border-(--color-border-subtle) flex items-center justify-center flex-shrink-0 overflow-hidden"},he=["src"],ke=["innerHTML"],we=["src"],$e={class:"min-w-0"},Se={class:"flex items-center gap-2"},Le=["href","title"],Ce=["href"],Te={class:"px-4 pb-3 flex items-center gap-2 flex-wrap"},je={key:0,class:"status-enabled"},ze={key:1,class:"inline-flex items-center gap-1 text-[11px] text-(--color-text-subtle) font-mono"},Be={class:"border-t border-(--color-border-subtle)"},Pe={class:"flex items-center border-b border-(--color-border-subtle)"},Re=["onClick"],Fe={key:0,class:"text-[9px] px-1 py-px rounded-full bg-(--color-surface-sunken) tabular-nums font-mono"},Me={key:0,class:"p-3"},Ie={key:0,class:"text-xs text-(--color-text-subtle) py-2 text-center"},De={key:1,class:"event-timeline"},Oe={class:"event-time"},Ne={key:0,class:"flex items-center gap-2 min-w-0"},Ue={class:"text-[11px] text-(--color-text-subtle) truncate"},He={key:1,class:"event-fn"},Ee={key:1},Ae={key:2,class:"p-3"},Ke=j({__name:"index",setup(l){const p=[{label:"Events",value:"events",icon:"i-carbon-list"},{label:"Network",value:"network",icon:"i-carbon-network-4"},{label:"API",value:"api",icon:"i-carbon-code"}],u=it("all"),g=$(()=>{const b=Object.values(W.value||{}),m=b.filter(T=>R(T)!=="awaitingLoad").length,w=b.filter(T=>R(T)==="awaitingLoad").length;return{total:b.length,active:m,awaiting:w}}),h=$(()=>{const b=W.value||{};return u.value==="all"?b:Object.fromEntries(Object.entries(b).filter(([,m])=>{const w=R(m);return u.value==="active"?w!=="awaitingLoad":w==="awaitingLoad"}))});function B(b){switch(b){case"loaded":return"status-badge-loaded";case"loading":return"status-badge-loading";case"awaitingLoad":return"status-badge-awaiting";case"removed":case"error":return"status-badge-error";case"validation-failed":return"status-badge-validation";default:return"status-badge-default"}}return(b,m)=>{const w=D,T=X,O=ut,N=_t,U=yt,H=qt,E=de;return s(),n("div",ue,[Object.keys(o(W)||{}).length?(s(),n(_,{key:1},[e("div",_e,[(s(!0),n(_,null,S([{key:"all",label:"All",count:o(g).total},{key:"active",label:"Active",count:o(g).active},{key:"awaiting",label:"Awaiting",count:o(g).awaiting}],a=>(s(),n("button",{key:a.key,class:k(["filter-chip",o(u)===a.key?"filter-chip-active":""]),onClick:i=>u.value=a.key},[v(r(a.label)+" ",1),e("span",fe,r(a.count),1)],10,xe))),128))]),e("div",ye,[(s(!0),n(_,null,S(o(h),(a,i)=>(s(),n("div",{key:i,class:"card overflow-hidden"},[e("div",ve,[e("div",ge,[e("div",be,[o(P)(a)&&typeof o(P)(a)=="string"&&o(P)(a).startsWith("http")?(s(),n("img",{key:0,class:"w-5 h-5 object-contain",src:o(P)(a),alt:""},null,8,he)):o(P)(a)?(s(),n("div",{key:1,class:"w-5 h-5 flex items-center [&>svg]:max-w-5 [&>svg]:max-h-5",innerHTML:o(P)(a)},null,8,ke)):a.src&&!a.src.startsWith("/")?(s(),n("img",{key:2,src:`https://www.google.com/s2/favicons?domain=${o(et)(a.src)}`,class:"w-4 h-4 rounded-sm",alt:""},null,8,we)):(s(),z(w,{key:3,name:"i-carbon-script",class:"text-sm text-(--color-text-subtle)"}))]),e("div",$e,[e("div",Se,[e("a",{href:a.src,target:"_blank",class:"text-sm font-semibold tracking-tight truncate link-external",title:a.src},r(a.registry?.label||a.key||a.src),9,Le),a.docs?(s(),n("a",{key:0,href:a.docs,target:"_blank",class:"text-[10px] font-medium text-(--color-text-subtle) hover:text-(--color-text-muted) transition-colors"}," docs ",8,Ce)):x("",!0)])])]),o(J)(a)&&o(R)(a)==="awaitingLoad"?(s(),z(T,{key:0,size:"xs",color:"primary",variant:"soft",icon:"i-carbon-play-filled-alt",onClick:t=>a.$script.load()},{default:C(()=>[...m[2]||(m[2]=[v(" Load ",-1)])]),_:1},8,["onClick"])):o(J)(a)&&o(R)(a)==="loaded"?(s(),z(T,{key:1,size:"xs",color:"neutral",variant:"ghost",icon:"i-carbon-close",onClick:t=>a.$script.remove()},{default:C(()=>[...m[3]||(m[3]=[v(" Remove ",-1)])]),_:1},8,["onClick"])):x("",!0)]),e("div",Te,[y(O,{status:o(R)(a),error:o(st)[a.src]},null,8,["status","error"]),o(Q)(a.registryKey)?(s(),n("span",je,[y(w,{name:"i-carbon-security",class:"text-xs"}),m[4]||(m[4]=v(" First-Party ",-1))])):x("",!0),y(N,{size:o(at)[a.src]},null,8,["size"]),y(U,{"load-time":a.loadTime},null,8,["load-time"]),a.loadedFrom&&a.loadedFrom!=="unknown"?(s(),n("span",ze,[m[5]||(m[5]=e("svg",{xmlns:"http://www.w3.org/2000/svg",height:"10",viewBox:"0 0 256 221",class:"opacity-60"},[e("path",{fill:"#41B883",d:"M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0z"}),e("path",{fill:"#41B883",d:"m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0z"}),e("path",{fill:"#35495E",d:"M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0z"})],-1)),v(" "+r(a.loadedFrom),1)])):x("",!0),(s(!0),n(_,null,S(Object.keys(a.registryMeta||{}),t=>(s(),n("span",{key:t,class:"text-[11px] text-(--color-text-subtle) font-mono"},r(t)+": "+r(a.registryMeta[t]),1))),128))]),e("div",Be,[e("div",Pe,[(s(),n(_,null,S(p,t=>e("button",{key:t.value,class:k(["sub-tab",o(I)(a.src)===t.value?"sub-tab-active":""]),onClick:d=>o(ot)(a.src,t.value)},[y(w,{name:t.icon,class:"text-xs"},null,8,["name"]),v(" "+r(t.label)+" ",1),t.value==="network"&&a.networkRequests?.length?(s(),n("span",Fe,r(a.networkRequests.length),1)):x("",!0)],10,Re)),64))]),o(I)(a.src)==="events"?(s(),n("div",Me,[a.events?.length?(s(),n("div",De,[(s(!0),n(_,null,S(a.events,(t,d)=>(s(),n("div",{key:d,class:"event-row"},[e("div",Oe,r(o(nt)(t.at)),1),t.type==="status"?(s(),n(_,{key:0},[t.status==="validation-failed"?(s(),n("div",Ne,[e("span",{class:k(["event-badge",B(t.status)])},r(t.status),3),e("span",Ue,r(t.args.issues.map(f=>`${f.path?.map(c=>c.key).join(".")}: ${f.message}`).join(", ")),1)])):(s(),n("span",{key:1,class:k(["event-badge",B(t.status)])},r(t.status),3))],64)):t.type==="fn-call"?(s(),n("span",He,[t.args?(s(),n(_,{key:0},[v(r(`${t.fn}(${t.args?.map(f=>JSON.stringify(f,null,2)).join(", ")||""})`),1)],64)):(s(),n(_,{key:1},[m[6]||(m[6]=e("span",{class:"opacity-40"},"QUEUED",-1)),v(" "+r(t.fn),1)],64))])):x("",!0)]))),128))])):(s(),n("div",Ie," No events recorded "))])):o(I)(a.src)==="network"?(s(),n("div",Ee,[y(H,{requests:a.networkRequests||[],domains:o(V)(a.registryKey)?.domains,"proxy-routes":o(V)(a.registryKey)?.routes,"privacy-level":o(V)(a.registryKey)?.privacyLevel,"proxy-prefix":o(lt)?.proxyPrefix,"is-first-party":o(Q)(a.registryKey)},null,8,["requests","domains","proxy-routes","privacy-level","proxy-prefix","is-first-party"])])):o(I)(a.src)==="api"?(s(),n("div",Ae,[y(E,{code:o(rt)(a.$script?.instance),lang:"js"},null,8,["code"])])):x("",!0)])]))),128))])],64)):(s(),n("div",me,[e("div",pe,[y(w,{name:"i-carbon-script",class:"text-2xl text-(--color-text-subtle)"})]),m[0]||(m[0]=e("p",{class:"text-sm font-medium text-(--color-text-muted)"}," No scripts loaded ",-1)),m[1]||(m[1]=e("p",{class:"text-xs text-(--color-text-subtle)"}," Scripts will appear here as they are registered ",-1))]))])}}}),Ve=F(Ke,[["__scopeId","data-v-1d33b8c9"]]);export{Ve as default};
1
+ import{f as j,o as s,c as n,n as k,h as o,a as e,t as r,x as $,_ as F,b as y,j as D,d as v,m as x,y as A,z as K,F as _,l as G,w as C,r as S,g as z,A as M,B as Z,C as X,D as q,E as tt,G as W,H as P,I as et,J,K as R,L as st,M as Q,N as at,O as ot,P as I,Q as nt,i as lt,R as V,S as rt,T as it}from"./HLYrIHDq.js";const ct={class:"capitalize"},dt=j({__name:"ScriptStatus",props:{status:{},error:{}},setup(l){const p=$(()=>l.error?l.error==="TypeError: Failed to fetch"?"CORS Error":l.error:l.status||"unknown"),u=$(()=>{if(l.error||l.status==="error")return"status-error";switch(l.status){case"loaded":return"status-loaded";case"loading":return"status-loading";case"awaitingLoad":return"status-awaiting";case"validation-failed":return"status-validation";default:return"status-unknown"}});return(g,h)=>(s(),n("div",{class:k(["script-status",o(u)])},[h[0]||(h[0]=e("span",{class:"script-status-dot"},null,-1)),e("span",ct,r(o(p)),1)],2))}}),ut=Object.assign(F(dt,[["__scopeId","data-v-5cf865ba"]]),{__name:"ScriptStatus"}),mt={key:0,class:"script-metric"},pt=j({__name:"ScriptSize",props:{size:{}},setup(l){return(p,u)=>{const g=D;return l.size?(s(),n("span",mt,[y(g,{name:"i-carbon-meter",class:"text-[10px] opacity-50"}),v(" "+r(l.size),1)])):x("",!0)}}}),_t=Object.assign(F(pt,[["__scopeId","data-v-b147450b"]]),{__name:"ScriptSize"}),xt={key:0,class:"script-metric"},ft=j({__name:"ScriptLoadTime",props:{loadTime:{}},setup(l){return(p,u)=>{const g=D;return l.loadTime?(s(),n("span",xt,[y(g,{name:"i-carbon-timer",class:"text-[10px] opacity-50"}),v(" "+r(l.loadTime),1)])):x("",!0)}}}),yt=Object.assign(F(ft,[["__scopeId","data-v-c6837c50"]]),{__name:"ScriptLoadTime"}),vt={key:0,class:"panel-grids flex flex-col items-center justify-center py-8 gap-1.5 rounded-b-xl"},gt={key:1,class:"waterfall-container"},bt={class:"waterfall-stats"},ht={class:"waterfall-stat"},kt={class:"waterfall-stat-value"},wt={class:"waterfall-stat"},$t={class:"waterfall-stat-value"},St={class:"waterfall-stat"},Lt={class:"waterfall-stat-value"},Ct={class:"waterfall-proxied-badge"},Tt={class:"waterfall-stat-value"},jt={class:"text-xs space-y-1 max-w-60"},zt={class:"opacity-70"},Bt={class:"px-1 py-px rounded bg-white/10 text-[10px]"},Pt={key:0,class:"opacity-70"},Rt={class:"flex items-center gap-1"},Ft={class:"text-xs space-y-0.5"},Mt={class:"font-mono font-semibold"},It={class:"opacity-70"},Dt={key:0,class:"opacity-60"},Ot={key:1,class:"text-emerald-400"},Nt={class:"waterfall-table"},Ut={class:"waterfall-legend"},Ht={class:"waterfall-rows"},Et={class:"waterfall-url"},At={class:"waterfall-bar-track"},Kt={class:"waterfall-duration"},Wt={class:"text-xs space-y-1.5 max-w-80"},Vt={class:"font-mono text-[11px] break-all opacity-90"},Jt={class:"flex items-center gap-2 opacity-70"},Qt={class:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5"},Gt={class:"flex items-center gap-1 opacity-60"},Xt={class:"tabular-nums text-right"},Yt={key:0,class:"flex items-center gap-1 text-emerald-400"},Zt=j({__name:"NetworkWaterfall",props:{requests:{},domains:{default:()=>[]},proxyRoutes:{default:()=>[]},privacyLevel:{},proxyPrefix:{},isFirstParty:{type:Boolean,default:!1}},setup(l){const p=[{key:"dns",label:"DNS",color:"oklch(70% 0.15 165)"},{key:"connect",label:"Connect",color:"oklch(72% 0.14 75)"},{key:"ssl",label:"SSL",color:"oklch(65% 0.15 300)"},{key:"ttfb",label:"TTFB",color:"oklch(65% 0.13 250)"},{key:"download",label:"Download",color:"oklch(72% 0.12 200)"}],u=$(()=>[...l.requests].sort((i,t)=>i.startTime-t.startTime)),g=$(()=>{if(!u.value.length)return{min:0,max:1};const i=u.value[0].startTime,t=Math.max(...u.value.map(d=>d.startTime+d.duration));return{min:i,max:t||i+1}}),h=$(()=>l.requests.reduce((i,t)=>i+t.transferSize,0)),B=$(()=>g.value.max-g.value.min),b=$(()=>l.requests.filter(i=>i.isProxied).length),m=$(()=>{const i=new Map;for(const t of l.requests){const d=T(t.url),f=i.get(d)||{count:0,transfer:0,proxied:!1};f.count++,f.transfer+=t.transferSize,t.isProxied&&(f.proxied=!0),i.set(d,f)}return[...i.entries()].sort((t,d)=>d[1].transfer-t[1].transfer).map(([t,d])=>({domain:t,...d,isKnown:l.domains.includes(t),proxyRoute:l.proxyRoutes.find(f=>f.target.includes(t))}))}),w=/\/_scripts\/p\/([^/]+)/;function T(i){try{return new URL(i).hostname}catch{return i.match(w)?.[1]||"localhost"}}function O(i){const{min:t,max:d}=g.value,f=d-t;return{left:`${(i.startTime-t)/f*100}%`,width:`${Math.max(i.duration/f*100,.5)}%`}}function N(i,t){if(i.duration===0)return"0%";const d=i[t.key];return`${Math.max(d/i.duration*100,d>0?2:0)}%`}function U(i){try{const t=new URL(i),d=t.pathname+t.search;return d.length>50?`${d.slice(0,47)}...`:d}catch{return i.length>50?`${i.slice(0,47)}...`:i}}function H(i){return{script:"Script",xmlhttprequest:"XHR",fetch:"Fetch",img:"Image",css:"Stylesheet",beacon:"Beacon"}[i]||i}function E(i){return{script:"i-carbon-code",xmlhttprequest:"i-carbon-send-alt",fetch:"i-carbon-send-alt",img:"i-carbon-image",css:"i-carbon-paint-brush",beacon:"i-carbon-satellite-radar"}[i]||"i-carbon-document"}function a(i){return i.transferSize===0&&i.decodedBodySize>0?304:200}return(i,t)=>{const d=D,f=G;return l.requests.length?(s(),n("div",gt,[e("div",bt,[e("span",ht,[e("span",kt,r(l.requests.length),1),t[1]||(t[1]=e("span",{class:"waterfall-stat-label"},"req",-1))]),t[7]||(t[7]=e("span",{class:"waterfall-sep"},null,-1)),e("span",wt,[e("span",$t,r(o(A)(o(h))),1)]),t[8]||(t[8]=e("span",{class:"waterfall-sep"},null,-1)),e("span",St,[e("span",Lt,r(o(K)(Math.round(o(B)))),1)]),l.isFirstParty&&o(b)>0?(s(),n(_,{key:0},[t[5]||(t[5]=e("span",{class:"waterfall-sep"},null,-1)),y(f,null,{content:C(()=>[e("div",jt,[t[4]||(t[4]=e("div",{class:"font-semibold"}," First-Party Proxy ",-1)),e("div",zt,[v(r(o(b))+" request"+r(o(b)!==1?"s":"")+" routed through ",1),e("code",Bt,r(l.proxyPrefix||"/_scripts/p"),1)]),l.privacyLevel?(s(),n("div",Pt,[t[3]||(t[3]=v(" Privacy: ",-1)),e("span",{class:k(l.privacyLevel==="full"?"text-emerald-400":l.privacyLevel==="partial"?"text-amber-400":"")},r(l.privacyLevel),3)])):x("",!0)])]),default:C(()=>[e("span",Ct,[y(d,{name:"i-carbon-security",class:"text-[10px]"}),e("span",Tt,r(o(b))+"/"+r(l.requests.length),1),t[2]||(t[2]=v(" proxied ",-1))])]),_:1})],64)):x("",!0),o(m).length>1?(s(),n(_,{key:1},[t[6]||(t[6]=e("span",{class:"waterfall-sep"},null,-1)),e("div",Rt,[(s(!0),n(_,null,S(o(m),c=>(s(),z(f,{key:c.domain},{content:C(()=>[e("div",Ft,[e("div",Mt,r(c.domain),1),e("div",It,r(c.count)+" req · "+r(o(A)(c.transfer)),1),c.proxyRoute?(s(),n("div",Dt,r(c.proxyRoute.target)+" → "+r(c.proxyRoute.local),1)):x("",!0),c.proxied?(s(),n("div",Ot," Proxied through first-party ")):x("",!0)])]),default:C(()=>[e("span",{class:k(["domain-pill",c.proxied?"domain-pill-proxied":""])},[c.proxied?(s(),z(d,{key:0,name:"i-carbon-security",class:"text-[8px]"})):x("",!0),v(" "+r(c.domain),1)],2)]),_:2},1024))),128))])],64)):x("",!0)]),e("div",Nt,[e("div",Ut,[(s(),n(_,null,S(p,c=>e("div",{key:c.key,class:"waterfall-legend-item"},[e("span",{class:"waterfall-legend-dot",style:M({background:c.color})},null,4),v(" "+r(c.label),1)])),64))]),e("div",Ht,[(s(!0),n(_,null,S(o(u),(c,Y)=>(s(),z(f,{key:Y},{content:C(()=>[e("div",Wt,[e("div",Vt,r(c.url),1),e("div",Jt,[e("span",null,r(H(c.initiatorType)),1),t[10]||(t[10]=e("span",{class:"opacity-30"},"·",-1)),e("span",null,r(o(K)(Math.round(c.duration))),1),c.transferSize>0?(s(),n(_,{key:0},[t[9]||(t[9]=e("span",{class:"opacity-30"},"·",-1)),e("span",null,r(o(A)(c.transferSize)),1)],64)):x("",!0)]),e("div",Qt,[(s(),n(_,null,S(p,L=>(s(),n(_,{key:L.key},[c[L.key]>.1?(s(),n(_,{key:0},[e("div",Gt,[e("span",{class:"w-1.5 h-1.5 rounded-sm inline-block",style:M({background:L.color})},null,4),v(" "+r(L.label),1)]),e("div",Xt,r(c[L.key].toFixed(1))+"ms ",1)],64)):x("",!0)],64))),64))]),c.isProxied?(s(),n("div",Yt,[y(d,{name:"i-carbon-security",class:"text-[10px]"}),t[11]||(t[11]=v(" Proxied through first-party ",-1))])):x("",!0)])]),default:C(()=>[e("div",{class:k(["waterfall-row",c.isProxied?"waterfall-row-proxied":""])},[e("div",{class:k(["waterfall-status",a(c)===304?"waterfall-status-304":"waterfall-status-200"])},r(a(c)),3),y(d,{name:c.isProxied?"i-carbon-security":E(c.initiatorType),class:k(["waterfall-row-icon",c.isProxied?"waterfall-row-icon-proxied":""])},null,8,["name","class"]),e("div",Et,r(U(c.url)),1),e("div",At,[e("div",{class:"waterfall-bar",style:M(O(c))},[(s(),n(_,null,S(p,L=>e("div",{key:L.key,style:M({width:N(c,L),background:L.color}),class:"h-full"},null,4)),64))],4)]),e("div",Kt,r(o(K)(Math.round(c.duration))),1)],2)]),_:2},1024))),128))])])])):(s(),n("div",vt,[y(d,{name:"i-carbon-network-4",class:"text-xl text-(--color-text-subtle)"}),t[0]||(t[0]=e("p",{class:"text-xs text-(--color-text-subtle)"}," Requests appear as the script loads ",-1))]))}}}),qt=Object.assign(F(Zt,[["__scopeId","data-v-a64c8d9a"]]),{__name:"NetworkWaterfall"});function te(l=2e3){const{copy:p,copied:u}=Z({legacy:!0,copiedDuring:l});return{copy:p,copied:u}}const ee=j({__name:"DevtoolsCopyButton",props:{text:{}},setup(l){const{copy:p,copied:u}=te();return(g,h)=>{const B=X,b=G;return s(),z(b,{text:o(u)?"Copied!":"Copy"},{default:C(()=>[y(B,{icon:o(u)?"carbon:checkmark":"carbon:copy","aria-label":o(u)?"Copied":"Copy to clipboard",class:k(o(u)?"text-[var(--seo-green)]":""),onClick:h[0]||(h[0]=m=>o(p)(l.text))},null,8,["icon","aria-label","class"])]),_:1},8,["text"])}}}),se=Object.assign(ee,{__name:"DevtoolsCopyButton"}),ae=["innerHTML"],oe=j({__name:"OCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!1},transformRendered:{type:Function}},setup(l){const p=q(()=>l.code,l.lang),u=$(()=>l.transformRendered?l.transformRendered(p.value||""):p.value);return(g,h)=>(s(),n("pre",{class:k(["code-block p-5",l.lines?"code-block-lines":""]),innerHTML:o(u)},null,10,ae))}}),ne=Object.assign(oe,{__name:"OCodeBlock"}),le={class:"devtools-snippet"},re={key:0,class:"devtools-snippet-header"},ie={class:"devtools-snippet-label"},ce=j({__name:"DevtoolsSnippet",props:{label:{},code:{},lang:{default:"js"}},setup(l){return(p,u)=>{const g=se,h=ne;return s(),n("div",le,[l.label||p.$slots.header?(s(),n("div",re,[tt(p.$slots,"header",{},()=>[e("code",ie,r(l.label),1)],!0),y(g,{text:l.code},null,8,["text"])])):x("",!0),y(h,{code:l.code,lang:l.lang,class:"devtools-snippet-block"},null,8,["code","lang"])])}}}),de=Object.assign(F(ce,[["__scopeId","data-v-265ccc31"]]),{__name:"DevtoolsSnippet"}),ue={class:"py-1"},me={key:0,class:"panel-grids rounded-xl flex flex-col items-center justify-center py-16 gap-3"},pe={class:"w-12 h-12 rounded-xl bg-(--color-surface-elevated) border border-(--color-border) flex items-center justify-center"},_e={class:"filter-bar"},xe=["onClick"],fe={class:"filter-chip-count"},ye={class:"stagger-children space-y-3"},ve={class:"px-4 py-3 flex items-center justify-between gap-3"},ge={class:"flex items-center gap-2.5 min-w-0"},be={class:"w-7 h-7 rounded-lg bg-(--color-surface-sunken) border border-(--color-border-subtle) flex items-center justify-center flex-shrink-0 overflow-hidden"},he=["src"],ke=["innerHTML"],we=["src"],$e={class:"min-w-0"},Se={class:"flex items-center gap-2"},Le=["href","title"],Ce=["href"],Te={class:"px-4 pb-3 flex items-center gap-2 flex-wrap"},je={key:0,class:"status-enabled"},ze={key:1,class:"inline-flex items-center gap-1 text-[11px] text-(--color-text-subtle) font-mono"},Be={class:"border-t border-(--color-border-subtle)"},Pe={class:"flex items-center border-b border-(--color-border-subtle)"},Re=["onClick"],Fe={key:0,class:"text-[9px] px-1 py-px rounded-full bg-(--color-surface-sunken) tabular-nums font-mono"},Me={key:0,class:"p-3"},Ie={key:0,class:"text-xs text-(--color-text-subtle) py-2 text-center"},De={key:1,class:"event-timeline"},Oe={class:"event-time"},Ne={key:0,class:"flex items-center gap-2 min-w-0"},Ue={class:"text-[11px] text-(--color-text-subtle) truncate"},He={key:1,class:"event-fn"},Ee={key:1},Ae={key:2,class:"p-3"},Ke=j({__name:"index",setup(l){const p=[{label:"Events",value:"events",icon:"i-carbon-list"},{label:"Network",value:"network",icon:"i-carbon-network-4"},{label:"API",value:"api",icon:"i-carbon-code"}],u=it("all"),g=$(()=>{const b=Object.values(W.value||{}),m=b.filter(T=>R(T)!=="awaitingLoad").length,w=b.filter(T=>R(T)==="awaitingLoad").length;return{total:b.length,active:m,awaiting:w}}),h=$(()=>{const b=W.value||{};return u.value==="all"?b:Object.fromEntries(Object.entries(b).filter(([,m])=>{const w=R(m);return u.value==="active"?w!=="awaitingLoad":w==="awaitingLoad"}))});function B(b){switch(b){case"loaded":return"status-badge-loaded";case"loading":return"status-badge-loading";case"awaitingLoad":return"status-badge-awaiting";case"removed":case"error":return"status-badge-error";case"validation-failed":return"status-badge-validation";default:return"status-badge-default"}}return(b,m)=>{const w=D,T=X,O=ut,N=_t,U=yt,H=qt,E=de;return s(),n("div",ue,[Object.keys(o(W)||{}).length?(s(),n(_,{key:1},[e("div",_e,[(s(!0),n(_,null,S([{key:"all",label:"All",count:o(g).total},{key:"active",label:"Active",count:o(g).active},{key:"awaiting",label:"Awaiting",count:o(g).awaiting}],a=>(s(),n("button",{key:a.key,class:k(["filter-chip",o(u)===a.key?"filter-chip-active":""]),onClick:i=>u.value=a.key},[v(r(a.label)+" ",1),e("span",fe,r(a.count),1)],10,xe))),128))]),e("div",ye,[(s(!0),n(_,null,S(o(h),(a,i)=>(s(),n("div",{key:i,class:"card overflow-hidden"},[e("div",ve,[e("div",ge,[e("div",be,[o(P)(a)&&typeof o(P)(a)=="string"&&o(P)(a).startsWith("http")?(s(),n("img",{key:0,class:"w-5 h-5 object-contain",src:o(P)(a),alt:""},null,8,he)):o(P)(a)?(s(),n("div",{key:1,class:"w-5 h-5 flex items-center [&>svg]:max-w-5 [&>svg]:max-h-5",innerHTML:o(P)(a)},null,8,ke)):a.src&&!a.src.startsWith("/")?(s(),n("img",{key:2,src:`https://www.google.com/s2/favicons?domain=${o(et)(a.src)}`,class:"w-4 h-4 rounded-sm",alt:""},null,8,we)):(s(),z(w,{key:3,name:"i-carbon-script",class:"text-sm text-(--color-text-subtle)"}))]),e("div",$e,[e("div",Se,[e("a",{href:a.src,target:"_blank",class:"text-sm font-semibold tracking-tight truncate link-external",title:a.src},r(a.registry?.label||a.key||a.src),9,Le),a.docs?(s(),n("a",{key:0,href:a.docs,target:"_blank",class:"text-[10px] font-medium text-(--color-text-subtle) hover:text-(--color-text-muted) transition-colors"}," docs ",8,Ce)):x("",!0)])])]),o(J)(a)&&o(R)(a)==="awaitingLoad"?(s(),z(T,{key:0,size:"xs",color:"primary",variant:"soft",icon:"i-carbon-play-filled-alt",onClick:t=>a.$script.load()},{default:C(()=>[...m[2]||(m[2]=[v(" Load ",-1)])]),_:1},8,["onClick"])):o(J)(a)&&o(R)(a)==="loaded"?(s(),z(T,{key:1,size:"xs",color:"neutral",variant:"ghost",icon:"i-carbon-close",onClick:t=>a.$script.remove()},{default:C(()=>[...m[3]||(m[3]=[v(" Remove ",-1)])]),_:1},8,["onClick"])):x("",!0)]),e("div",Te,[y(O,{status:o(R)(a),error:o(st)[a.src]},null,8,["status","error"]),o(Q)(a.registryKey)?(s(),n("span",je,[y(w,{name:"i-carbon-security",class:"text-xs"}),m[4]||(m[4]=v(" First-Party ",-1))])):x("",!0),y(N,{size:o(at)[a.src]},null,8,["size"]),y(U,{"load-time":a.loadTime},null,8,["load-time"]),a.loadedFrom&&a.loadedFrom!=="unknown"?(s(),n("span",ze,[m[5]||(m[5]=e("svg",{xmlns:"http://www.w3.org/2000/svg",height:"10",viewBox:"0 0 256 221",class:"opacity-60"},[e("path",{fill:"#41B883",d:"M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0z"}),e("path",{fill:"#41B883",d:"m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0z"}),e("path",{fill:"#35495E",d:"M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0z"})],-1)),v(" "+r(a.loadedFrom),1)])):x("",!0),(s(!0),n(_,null,S(Object.keys(a.registryMeta||{}),t=>(s(),n("span",{key:t,class:"text-[11px] text-(--color-text-subtle) font-mono"},r(t)+": "+r(a.registryMeta[t]),1))),128))]),e("div",Be,[e("div",Pe,[(s(),n(_,null,S(p,t=>e("button",{key:t.value,class:k(["sub-tab",o(I)(a.src)===t.value?"sub-tab-active":""]),onClick:d=>o(ot)(a.src,t.value)},[y(w,{name:t.icon,class:"text-xs"},null,8,["name"]),v(" "+r(t.label)+" ",1),t.value==="network"&&a.networkRequests?.length?(s(),n("span",Fe,r(a.networkRequests.length),1)):x("",!0)],10,Re)),64))]),o(I)(a.src)==="events"?(s(),n("div",Me,[a.events?.length?(s(),n("div",De,[(s(!0),n(_,null,S(a.events,(t,d)=>(s(),n("div",{key:d,class:"event-row"},[e("div",Oe,r(o(nt)(t.at)),1),t.type==="status"?(s(),n(_,{key:0},[t.status==="validation-failed"?(s(),n("div",Ne,[e("span",{class:k(["event-badge",B(t.status)])},r(t.status),3),e("span",Ue,r(t.args.issues.map(f=>`${f.path?.map(c=>c.key).join(".")}: ${f.message}`).join(", ")),1)])):(s(),n("span",{key:1,class:k(["event-badge",B(t.status)])},r(t.status),3))],64)):t.type==="fn-call"?(s(),n("span",He,[t.args?(s(),n(_,{key:0},[v(r(`${t.fn}(${t.args?.map(f=>JSON.stringify(f,null,2)).join(", ")||""})`),1)],64)):(s(),n(_,{key:1},[m[6]||(m[6]=e("span",{class:"opacity-40"},"QUEUED",-1)),v(" "+r(t.fn),1)],64))])):x("",!0)]))),128))])):(s(),n("div",Ie," No events recorded "))])):o(I)(a.src)==="network"?(s(),n("div",Ee,[y(H,{requests:a.networkRequests||[],domains:o(V)(a.registryKey)?.domains,"proxy-routes":o(V)(a.registryKey)?.routes,"privacy-level":o(V)(a.registryKey)?.privacyLevel,"proxy-prefix":o(lt)?.proxyPrefix,"is-first-party":o(Q)(a.registryKey)},null,8,["requests","domains","proxy-routes","privacy-level","proxy-prefix","is-first-party"])])):o(I)(a.src)==="api"?(s(),n("div",Ae,[y(E,{code:o(rt)(a.$script?.instance),lang:"js"},null,8,["code"])])):x("",!0)])]))),128))])],64)):(s(),n("div",me,[e("div",pe,[y(w,{name:"i-carbon-script",class:"text-2xl text-(--color-text-subtle)"})]),m[0]||(m[0]=e("p",{class:"text-sm font-medium text-(--color-text-muted)"}," No scripts loaded ",-1)),m[1]||(m[1]=e("p",{class:"text-xs text-(--color-text-subtle)"}," Scripts will appear here as they are registered ",-1))]))])}}}),Ve=F(Ke,[["__scopeId","data-v-1d33b8c9"]]);export{Ve as default};
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.BwpOBArY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/CL6TeQIJ.js"><script type="module" src="/__nuxt-scripts/_nuxt/CL6TeQIJ.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"03a9e297-6209-4281-8c3d-4265bdd5d038",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1775569710780,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.BwpOBArY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/HLYrIHDq.js"><script type="module" src="/__nuxt-scripts/_nuxt/HLYrIHDq.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"640f0a39-e659-4a31-8b8d-adbd9af52f1e",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1775787712674,false]</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.BwpOBArY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/CL6TeQIJ.js"><script type="module" src="/__nuxt-scripts/_nuxt/CL6TeQIJ.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"03a9e297-6209-4281-8c3d-4265bdd5d038",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1775569710781,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.BwpOBArY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/HLYrIHDq.js"><script type="module" src="/__nuxt-scripts/_nuxt/HLYrIHDq.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"640f0a39-e659-4a31-8b8d-adbd9af52f1e",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1775787712675,false]</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.BwpOBArY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/CL6TeQIJ.js"><script type="module" src="/__nuxt-scripts/_nuxt/CL6TeQIJ.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"03a9e297-6209-4281-8c3d-4265bdd5d038",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1775569710782,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.BwpOBArY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/HLYrIHDq.js"><script type="module" src="/__nuxt-scripts/_nuxt/HLYrIHDq.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"640f0a39-e659-4a31-8b8d-adbd9af52f1e",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1775787712676,false]</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.BwpOBArY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/CL6TeQIJ.js"><script type="module" src="/__nuxt-scripts/_nuxt/CL6TeQIJ.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"03a9e297-6209-4281-8c3d-4265bdd5d038",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1775569710781,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__nuxt-scripts/_nuxt/entry.BwpOBArY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-scripts/_nuxt/HLYrIHDq.js"><script type="module" src="/__nuxt-scripts/_nuxt/HLYrIHDq.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-scripts",buildId:"640f0a39-e659-4a31-8b8d-adbd9af52f1e",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1775787712675,false]</script></body></html>
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.16"
6
6
  },
7
- "version": "1.0.0-rc.5",
7
+ "version": "1.0.0-rc.6",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -1,11 +1,10 @@
1
1
  import type { ElementScriptTrigger } from '#nuxt-scripts/types';
2
2
  import type { HTMLAttributes, ReservedProps, ShallowRef } from 'vue';
3
3
  export { MAP_INJECTION_KEY } from './useGoogleMapsResource.js';
4
- declare const _default: typeof __VLS_export;
5
- export default _default;
6
- declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
4
+ export interface ScriptGoogleMapsProps {
7
5
  /**
8
6
  * Defines the trigger event to load the script.
7
+ * @default ['mouseenter', 'mouseover', 'mousedown']
9
8
  */
10
9
  trigger?: ElementScriptTrigger;
11
10
  /**
@@ -14,11 +13,20 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
14
13
  apiKey?: string;
15
14
  /**
16
15
  * A latitude / longitude of where to focus the map.
16
+ *
17
+ * @deprecated Pass `center` via `mapOptions` instead. The top-level `center`
18
+ * prop will be removed in a future major version. When both are set,
19
+ * `mapOptions.center` wins.
20
+ * @see https://scripts.nuxt.com/docs/migration-guide/v0-to-v1
17
21
  */
18
22
  center?: google.maps.LatLng | google.maps.LatLngLiteral | `${string},${string}`;
19
23
  /**
20
24
  * Zoom level for the map (0-21). Reactive: changing this will update the map.
21
- * Takes precedence over mapOptions.zoom when provided.
25
+ *
26
+ * @deprecated Pass `zoom` via `mapOptions` instead. The top-level `zoom`
27
+ * prop will be removed in a future major version. When both are set,
28
+ * `mapOptions.zoom` wins.
29
+ * @see https://scripts.nuxt.com/docs/migration-guide/v0-to-v1
22
30
  */
23
31
  zoom?: number;
24
32
  /**
@@ -30,19 +38,21 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
30
38
  */
31
39
  region?: string;
32
40
  /**
33
- * Defines the language of the map
41
+ * Defines the language of the map.
34
42
  */
35
43
  language?: string;
36
44
  /**
37
- * Defines the version of google maps js API
45
+ * Defines the version of google maps js API.
38
46
  */
39
47
  version?: string;
40
48
  /**
41
49
  * Defines the width of the map.
50
+ * @default 640
42
51
  */
43
52
  width?: number | string;
44
53
  /**
45
- * Defines the height of the map
54
+ * Defines the height of the map.
55
+ * @default 400
46
56
  */
47
57
  height?: number | string;
48
58
  /**
@@ -60,122 +70,92 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
60
70
  };
61
71
  /**
62
72
  * Manual color mode control. When provided, overrides auto-detection from @nuxtjs/color-mode.
63
- * Accepts 'light', 'dark', or a reactive ref.
64
- */
65
- colorMode?: "light" | "dark";
66
- }, {
67
- readonly googleMaps: import("vue").Ref<typeof google.maps | undefined, typeof google.maps | undefined>;
68
- readonly map: ShallowRef<google.maps.Map | undefined>;
69
- readonly resolveQueryToLatLng: (query: string) => Promise<google.maps.LatLng | google.maps.LatLngLiteral | undefined>;
70
- readonly importLibrary: {
71
- (key: "marker"): Promise<google.maps.MarkerLibrary>;
72
- (key: "places"): Promise<google.maps.PlacesLibrary>;
73
- (key: "geometry"): Promise<google.maps.GeometryLibrary>;
74
- (key: "drawing"): Promise<google.maps.DrawingLibrary>;
75
- (key: "visualization"): Promise<google.maps.VisualizationLibrary>;
76
- (key: string): Promise<any>;
77
- };
78
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
79
- error: () => any;
80
- ready: (e: {
81
- readonly googleMaps: import("vue").Ref<typeof google.maps | undefined, typeof google.maps | undefined>;
82
- readonly map: ShallowRef<google.maps.Map | undefined>;
83
- readonly resolveQueryToLatLng: (query: string) => Promise<google.maps.LatLng | google.maps.LatLngLiteral | undefined>;
84
- readonly importLibrary: {
85
- (key: "marker"): Promise<google.maps.MarkerLibrary>;
86
- (key: "places"): Promise<google.maps.PlacesLibrary>;
87
- (key: "geometry"): Promise<google.maps.GeometryLibrary>;
88
- (key: "drawing"): Promise<google.maps.DrawingLibrary>;
89
- (key: "visualization"): Promise<google.maps.VisualizationLibrary>;
90
- (key: string): Promise<any>;
91
- };
92
- }) => any;
93
- }, string, import("vue").PublicProps, Readonly<{
94
- /**
95
- * Defines the trigger event to load the script.
73
+ * Accepts 'light' or 'dark'.
96
74
  */
97
- trigger?: ElementScriptTrigger;
75
+ colorMode?: 'light' | 'dark';
76
+ }
77
+ export interface ScriptGoogleMapsExpose {
98
78
  /**
99
- * Defines the Google Maps API key. Must have access to the Static Maps API as well.
79
+ * A reference to the loaded Google Maps API namespace (`google.maps`), or
80
+ * `undefined` if not yet loaded.
100
81
  */
101
- apiKey?: string;
82
+ mapsApi: ShallowRef<typeof google.maps | undefined>;
102
83
  /**
103
- * A latitude / longitude of where to focus the map.
84
+ * A reference to the loaded Google Maps API namespace, or `undefined` if not
85
+ * yet loaded.
86
+ *
87
+ * @deprecated Use `mapsApi` instead. The `googleMaps` alias will be removed
88
+ * in a future major version.
89
+ * @see https://scripts.nuxt.com/docs/migration-guide/v0-to-v1
104
90
  */
105
- center?: google.maps.LatLng | google.maps.LatLngLiteral | `${string},${string}`;
91
+ googleMaps: ShallowRef<typeof google.maps | undefined>;
106
92
  /**
107
- * Zoom level for the map (0-21). Reactive: changing this will update the map.
108
- * Takes precedence over mapOptions.zoom when provided.
93
+ * A reference to the Google Map instance, or `undefined` if not yet initialized.
109
94
  */
110
- zoom?: number;
95
+ map: ShallowRef<google.maps.Map | undefined>;
111
96
  /**
112
- * Options for the map.
97
+ * Utility function to resolve a location query (e.g. "New York, NY") to latitude/longitude coordinates.
98
+ * Uses a caching mechanism and a server-side proxy to avoid unnecessary client-side API calls.
113
99
  */
114
- mapOptions?: google.maps.MapOptions;
100
+ resolveQueryToLatLng: (query: string) => Promise<google.maps.LatLng | google.maps.LatLngLiteral | undefined>;
115
101
  /**
116
- * Defines the region of the map.
102
+ * Utility function to dynamically import additional Google Maps libraries (e.g. "marker", "places").
103
+ * Caches imported libraries for efficient reuse.
117
104
  */
118
- region?: string;
105
+ importLibrary: {
106
+ (key: 'marker'): Promise<google.maps.MarkerLibrary>;
107
+ (key: 'places'): Promise<google.maps.PlacesLibrary>;
108
+ (key: 'geometry'): Promise<google.maps.GeometryLibrary>;
109
+ (key: 'drawing'): Promise<google.maps.DrawingLibrary>;
110
+ (key: 'visualization'): Promise<google.maps.VisualizationLibrary>;
111
+ (key: string): Promise<any>;
112
+ };
113
+ }
114
+ export interface ScriptGoogleMapsEmits {
119
115
  /**
120
- * Defines the language of the map
116
+ * Fired when the Google Maps instance is fully loaded and ready to use. Provides access to the maps API.
121
117
  */
122
- language?: string;
118
+ ready: [payload: ScriptGoogleMapsExpose];
123
119
  /**
124
- * Defines the version of google maps js API
120
+ * Fired when the Google Maps script fails to load.
125
121
  */
126
- version?: string;
122
+ error: [];
123
+ }
124
+ export interface ScriptGoogleMapsSlots {
127
125
  /**
128
- * Defines the width of the map.
126
+ * Default slot for rendering child components (e.g. markers, info windows) that depend on the map being ready.
129
127
  */
130
- width?: number | string;
128
+ default?: () => any;
131
129
  /**
132
- * Defines the height of the map
130
+ * Slot displayed while the map is loading. Can be used to show a custom loading indicator.
133
131
  */
134
- height?: number | string;
132
+ loading?: () => any;
135
133
  /**
136
- * Customize the root element attributes.
134
+ * Slot displayed when the script is awaiting user interaction to load (based on the `trigger` prop).
137
135
  */
138
- rootAttrs?: HTMLAttributes & ReservedProps & Record<string, unknown>;
136
+ awaitingLoad?: () => any;
139
137
  /**
140
- * Map IDs for light and dark color modes.
141
- * When provided, the map will automatically switch styles based on color mode.
142
- * Requires @nuxtjs/color-mode or manual colorMode prop.
138
+ * Slot displayed if the script fails to load.
143
139
  */
144
- mapIds?: {
145
- light?: string;
146
- dark?: string;
147
- };
140
+ error?: () => any;
148
141
  /**
149
- * Manual color mode control. When provided, overrides auto-detection from @nuxtjs/color-mode.
150
- * Accepts 'light', 'dark', or a reactive ref.
142
+ * Slot displayed as a placeholder before the map is ready. Useful for showing a static map or skeleton.
151
143
  */
152
- colorMode?: "light" | "dark";
153
- }> & Readonly<{
144
+ placeholder?: () => any;
145
+ }
146
+ declare const _default: typeof __VLS_export;
147
+ export default _default;
148
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ScriptGoogleMapsProps, ScriptGoogleMapsExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
149
+ error: () => any;
150
+ ready: (payload: ScriptGoogleMapsExpose) => any;
151
+ }, string, import("vue").PublicProps, Readonly<ScriptGoogleMapsProps> & Readonly<{
154
152
  onError?: (() => any) | undefined;
155
- onReady?: ((e: {
156
- readonly googleMaps: import("vue").Ref<typeof google.maps | undefined, typeof google.maps | undefined>;
157
- readonly map: ShallowRef<google.maps.Map | undefined>;
158
- readonly resolveQueryToLatLng: (query: string) => Promise<google.maps.LatLng | google.maps.LatLngLiteral | undefined>;
159
- readonly importLibrary: {
160
- (key: "marker"): Promise<google.maps.MarkerLibrary>;
161
- (key: "places"): Promise<google.maps.PlacesLibrary>;
162
- (key: "geometry"): Promise<google.maps.GeometryLibrary>;
163
- (key: "drawing"): Promise<google.maps.DrawingLibrary>;
164
- (key: "visualization"): Promise<google.maps.VisualizationLibrary>;
165
- (key: string): Promise<any>;
166
- };
167
- }) => any) | undefined;
153
+ onReady?: ((payload: ScriptGoogleMapsExpose) => any) | undefined;
168
154
  }>, {
169
155
  trigger: ElementScriptTrigger;
170
156
  width: number | string;
171
157
  height: number | string;
172
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
173
- default?: () => any;
174
- placeholder?: () => any;
175
- loading?: () => any;
176
- awaitingLoad?: () => any;
177
- error?: () => any;
178
- }>;
158
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ScriptGoogleMapsSlots>;
179
159
  type __VLS_WithSlots<T, S> = T & {
180
160
  new (): {
181
161
  $slots: S;