vite-plugin-vue-devtools 8.1.0 → 8.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/client/assets/{IconTitle.vue_vue_type_script_setup_true_lang-DJUwPLzM.js → IconTitle.vue_vue_type_script_setup_true_lang-DmOyYSsM.js} +1 -1
  2. package/client/assets/SectionBlock-D-Tfq7G_.js +1 -0
  3. package/client/assets/{assets-W1sJ1gXE.js → assets-rxSrDlpI.js} +1 -1
  4. package/client/assets/components-DxgZQ-IO.js +1 -0
  5. package/client/assets/custom-inspector-tab-view-CdxKO_4u.js +1 -0
  6. package/client/assets/{custom-tab-view-CyM11f9-.js → custom-tab-view-ZDhzwPEw.js} +1 -1
  7. package/client/assets/{graph-CNTi98vr.js → graph-wnRn8UNq.js} +1 -1
  8. package/client/assets/{index-DHoFh1q_.css → index-BmFftAtl.css} +1 -1
  9. package/client/assets/{index-D8B9oRep.js → index-tvfuK4RW.js} +257 -257
  10. package/client/assets/{overview-Dh_9B-aT.js → overview-DZxAymiJ.js} +1 -1
  11. package/client/assets/{pages-TYJYrRRg.js → pages-DooL8y43.js} +1 -1
  12. package/client/assets/pinia-CwQtJ1zf.js +1 -0
  13. package/client/assets/{router-BjSNl7sf.js → router-_5lv7gLh.js} +1 -1
  14. package/client/assets/{settings-C16ll9_V.js → settings-m2v-t2vR.js} +1 -1
  15. package/client/assets/timeline-C70dHO3X.js +1 -0
  16. package/client/index.html +1 -1
  17. package/package.json +5 -5
  18. package/src/overlay/devtools-overlay.css +1 -1
  19. package/src/overlay/devtools-overlay.mjs +4 -4
  20. package/src/overlay.js +14 -1
  21. package/client/assets/SectionBlock-g2jz8uHh.js +0 -1
  22. package/client/assets/components-CnHnWKfe.js +0 -1
  23. package/client/assets/custom-inspector-tab-view-EZYOpRoH.js +0 -1
  24. package/client/assets/pinia-B2KncPEp.js +0 -1
  25. package/client/assets/timeline-CvN993pC.js +0 -1
package/src/overlay.js CHANGED
@@ -41,7 +41,20 @@ link.href = `${overlayDir}/devtools-overlay.css`
41
41
 
42
42
  // create script
43
43
  const script = document.createElement('script')
44
- script.src = `${overlayDir}/devtools-overlay.mjs`
44
+ const scriptUrl = `${overlayDir}/devtools-overlay.mjs`
45
+ // Under a `require-trusted-types-for 'script'` CSP, assigning a string to
46
+ // `script.src` is blocked. Wrap the URL in a TrustedScriptURL via a named
47
+ // policy so apps can opt-in by allowing `vue-devtools` in their CSP's
48
+ // `trusted-types` directive.
49
+ if (typeof window !== 'undefined' && window.trustedTypes && typeof window.trustedTypes.createPolicy === 'function') {
50
+ const policy = window.trustedTypes.createPolicy('vue-devtools', {
51
+ createScriptURL: input => input,
52
+ })
53
+ script.src = policy.createScriptURL(scriptUrl)
54
+ }
55
+ else {
56
+ script.src = scriptUrl
57
+ }
45
58
  script.type = 'module'
46
59
 
47
60
  // append to head
@@ -1 +0,0 @@
1
- import{_ as x}from"./IconTitle.vue_vue_type_script_setup_true_lang-DJUwPLzM.js";import{d as g,c,o as i,F as y,b as o,u as l,S as B,T as $,n as r,s as h,w as b,r as s,e as k,a as d,U as w,V as C,A as u,t as p,W as V}from"./index-D8B9oRep.js";const S=["open"],N={"text-base":""},T={key:0,"text-sm":"",op50:""},z=g({__name:"SectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(e){const n=B(e,"open",void 0,{passive:!0});function v(t){n.value=t.target.open}return(t,a)=>{const f=x,m=C("lazy-show");return i(),c(y,null,[o("details",{open:l(n),onToggle:v},[o("summary",{class:r(["cursor-pointer select-none p4 hover:bg-active",e.collapse?"":"pointer-events-none"])},[h(f,{icon:e.icon,text:e.text,"text-xl":"",transition:"",class:r(l(n)?"op100":"op60")},{default:b(()=>[o("div",null,[o("div",N,[s(t.$slots,"text",{},()=>[u(p(e.text),1)],!0)]),e.description||t.$slots.description?(i(),c("div",T,[s(t.$slots,"description",{},()=>[u(p(e.description),1)],!0)])):d("",!0)]),a[0]||(a[0]=o("div",{class:"flex-auto"},null,-1)),s(t.$slots,"actions",{},void 0,!0),e.collapse?(i(),k(l(w),{key:0,icon:"i-carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):d("",!0)]),_:3},8,["icon","text","class"])],2),$((i(),c("div",{class:r(["flex flex-col flex-gap2 pb6 pt2",typeof e.padding=="string"?e.padding:e.padding?"px4":""])},[s(t.$slots,"details",{},void 0,!0),o("div",{class:r([e.containerClass,"mt1"])},[s(t.$slots,"default",{},void 0,!0)],2),s(t.$slots,"footer",{},void 0,!0)],2)),[[m,l(n)]])],40,S),a[1]||(a[1]=o("div",{class:"x-divider"},null,-1))],64)}}}),A=V(z,[["__scopeId","data-v-d1d325e5"]]);export{A as _};
@@ -1 +0,0 @@
1
- import{d as p,e as a,o as s,u as n,f as r,g as c,h as e}from"./index-D8B9oRep.js";/* empty css */const d=p({__name:"components",setup(m){function o(){e.value.emit("toggle-panel",!1)}function t(){e.value.emit("toggle-panel",!0)}return(l,u)=>(s(),a(n(c),{onOpenInEditor:n(r),onOnInspectComponentStart:o,onOnInspectComponentEnd:t},null,8,["onOpenInEditor"]))}});export{d as default};
@@ -1 +0,0 @@
1
- import{d as m,q as d,Q as p,j as f,L as x,c as v,e as _,a as g,u as e,o as i,b as o,A as b,t as k,R as T,O as y}from"./index-D8B9oRep.js";/* empty css */const B={key:0,flex:"~ col","h-full":"","items-center":"","justify-center":""},C={flex:"~ col gap2",mxa:"","items-center":""},I={"text-xl":""},R={"text-rose":""},V=m({__name:"custom-inspector-tab-view",setup(w){const a=x(),u=y(),n=d(!1),c=p(),r=f(()=>c.value.find(s=>s.name===a.params.name)?.pluginId);function l(){n.value=!0;const s=setTimeout(()=>{clearTimeout(s),u.replace("/overview")},2e3)}return(s,t)=>e(n)?(i(),v("div",B,[o("div",C,[t[1]||(t[1]=o("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1)),o("p",I,[o("code",R,k(e(a).params.name),1),t[0]||(t[0]=b(" not found ",-1))]),t[2]||(t[2]=o("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1))])])):!e(n)&&e(r)?(i(),_(e(T),{key:1,id:e(a).params.name,"plugin-id":e(r),onLoadError:l},null,8,["id","plugin-id"])):g("",!0)}});export{V as default};
@@ -1 +0,0 @@
1
- import{d as e,e as a,o,u as n,x as r}from"./index-D8B9oRep.js";/* empty css */const i=e({__name:"pinia",setup(s){return(t,p)=>(o(),a(n(r)))}});export{i as default};
@@ -1 +0,0 @@
1
- import{d as M,ag as V,j as f,Y as I,ah as D,ai as j,aj as U,c as n,o as l,b as c,a as N,u as e,T as C,ak as L,s as r,al as $,F,v as P,h as E,n as W,A as q,t as z,J as H,W as J,q as h,am as K,a7 as Y,w as k,e as G,an as O,C as A,ae as R,ao as Q,af as X}from"./index-D8B9oRep.js";const Z={"h-full":"",flex:"","flex-col":"",p2:""},ee={class:"relative mb-1 w-full flex items-center justify-end pb-1",border:"b dashed base"},te={key:0,class:"absolute left-0 text-xs text-gray-300 dark:text-gray-500"},ae={class:"flex items-center gap-2 px-1"},le={key:0,class:"recording recording-btn bg-[#ef4444]"},oe={key:1,class:"recording-btn bg-black op70 dark:bg-white hover:op100"},ne={class:"flex items-center gap1"},se={class:"p2"},ie=["onClick"],re=["onClick"],ce=M({__name:"TimelineLayers",props:V({data:{}},{modelValue:{},modelModifiers:{}}),emits:V(["select","clear"],["update:modelValue"]),setup(w,{emit:y}){const b=y,_=I(),u=f(()=>_.timelineLayersState.value.recordingState),d=f(()=>_.timelineLayersState.value),g=f(()=>u.value?"Stop recording":"Start recording");D();const p=j(w,"modelValue");function S(t){p.value=t,b("select",t),E.value.updateTimelineLayersState({selected:t})}U(()=>d.value.selected,t=>{p.value=t},{immediate:!0});function s(t){return{mouse:d.value.mouseEventEnabled,keyboard:d.value.keyboardEventEnabled,"component-event":d.value.componentEventEnabled,performance:d.value.performanceEventEnabled}[t]}function T(){E.value.updateTimelineLayersState({recordingState:!u.value})}function v(t){const i={mouse:"mouseEventEnabled",keyboard:"keyboardEventEnabled","component-event":"componentEventEnabled",performance:"performanceEventEnabled"}[t];E.value.updateTimelineLayersState({[i]:!s(t)})}return(t,i)=>(l(),n("div",Z,[c("div",ee,[e(u)?N("",!0):(l(),n("span",te,"Not recording")),c("div",ae,[C((l(),n("div",{class:"flex items-center gap1",onClick:T},[e(u)?(l(),n("span",le)):(l(),n("span",oe))])),[[e(L),{content:e(g)},void 0,{"bottom-end":!0}]]),C((l(),n("div",{class:"flex items-center gap1",onClick:i[0]||(i[0]=o=>b("clear"))},[r(e($),{name:"baseline-delete","cursor-pointer":"","text-xl":"",op70:"","hover:op100":""})])),[[e(L),{content:"Clear all timelines"},void 0,{"bottom-end":!0}]]),C((l(),n("div",ne,[r(e($),{name:"baseline-tips-and-updates","cursor-pointer":"","text-xl":"",op70:"","hover:op100":""})])),[[e(L),{content:"<p style='width: 285px'>Timeline events can cause significant performance overhead in large applications, so we recommend enabling it only when needed and on-demand. </p>",html:!0},void 0,{"bottom-end":!0}]])])]),c("ul",se,[(l(!0),n(F,null,P(w.data,o=>(l(),n("li",{key:o.id,class:W(["group relative selectable-item",{active:o.id===p.value,op60:!s(o.id)}]),onClick:a=>S(o.id)},[q(z(o.label)+" ",1),c("span",{class:"absolute right-2 rounded-1 bg-primary-500 px1 text-3 text-white op0 [.active_&]:bg-primary-400 [.active_&]:dark:bg-gray-600 group-hover:op80 hover:op100!",onClick:H(a=>v(o.id),["stop"])},z(s(o.id)?"Disable":"Enable"),9,re)],10,ie))),128))])]))}}),de=J(ce,[["__scopeId","data-v-95cda1e2"]]),ue={class:"h-full w-full"},pe={class:"no-scrollbar h-full flex select-none gap-2 overflow-scroll"},ve={class:"h-full flex flex-col"},me={class:"no-scrollbar h-full flex select-none gap-2 overflow-scroll"},fe={class:"h-full flex flex-col p2"},_e=M({__name:"timeline",setup(w){const y=h(),b=h(),_=h(!1),{width:u}=K(b),d=f(()=>_.value?u.value<700:!1),g=I(),p=f(()=>g.appRecords.value.map(a=>({label:a.name+(a.version?` (${a.version})`:""),value:a.id}))),S=f(()=>p.value.map(a=>({label:a.label,id:a.value}))),s=h(g.activeAppRecordId.value);Y(()=>{s.value=g.activeAppRecordId.value});function T(a){E.value.toggleApp(a).then(()=>{i()})}const v=h(""),t=[{label:"Mouse",id:"mouse"},{label:"Keyboard",id:"keyboard"},{label:"Component events",id:"component-event"},{label:"Performance",id:"performance"}];function i(){y.value?.clear()}function o(){i()}return(a,m)=>{const B=de;return l(),n("div",ue,[r(e(X),{ref_key:"splitpanesRef",ref:b,class:"flex-1 overflow-auto",horizontal:e(d),onReady:m[2]||(m[2]=x=>_.value=!0)},{default:k(()=>[e(p).length>1?(l(),G(e(R),{key:0,border:"base h-full",size:"20"},{default:k(()=>[c("div",pe,[r(e(O),{modelValue:e(s),"onUpdate:modelValue":m[0]||(m[0]=x=>A(s)?s.value=x:null),data:e(S),class:"w-full",onSelect:T},null,8,["modelValue","data"])])]),_:1})):N("",!0),r(e(R),{border:"base","h-full":""},{default:k(()=>[c("div",ve,[c("div",me,[r(B,{modelValue:e(v),"onUpdate:modelValue":m[1]||(m[1]=x=>A(v)?v.value=x:null),data:t,class:"w-full",onSelect:o,onClear:i},null,8,["modelValue"])])])]),_:1}),r(e(R),{relative:"","h-full":"",size:"65"},{default:k(()=>[c("div",fe,[r(e(Q),{ref_key:"timelineRef",ref:y,"layer-ids":[e(v)],"header-visible":!1,"doc-link":"","plugin-id":"","switcher-visible":!1},null,8,["layer-ids"])])]),_:1})]),_:1},8,["horizontal"])])}}});export{_e as default};