From e5cad58ab858dbf7b8f9b699e817adcb29fc8843 Mon Sep 17 00:00:00 2001 From: RichardLuo <22096448+RichardLuo0@users.noreply.github.com> Date: Mon, 16 Dec 2024 00:27:00 +0800 Subject: [PATCH] 0.8.14 --- CHANGELOG.md | 5 +++++ inject/config.json | 3 ++- inject/vscode-frosted-glass-theme.js | 2 +- inject/vscode-frosted-glass-theme.js.map | 4 ++-- package.json | 10 +++++----- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36eab3a..4efcfd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## [0.8.14] +- 7ad167b: feat: add pane-header to animation list +- 63ba521: fix: open css not work on vscodium+linux +- 8cfbc8e: fix: url is not appended on win32 + ## [0.8.13] - f17f664: feat: `disableMenuFocusBackground` instead of two settings - dc04f07: feat: add iconActionLabel and menubarTitle in animation diff --git a/inject/config.json b/inject/config.json index ebd6f07..e5b6a66 100644 --- a/inject/config.json +++ b/inject/config.json @@ -57,7 +57,8 @@ "compositeBarItem": "fgt-revealEffect, fgt-flipEffect", "commandCenter": "fgt-revealEffect", "menubarTitle": "fgt-flipEffect", - "settingsTreeItem": "" + "settingsTreeItem": "", + "paneHeader": "fgt-revealEffect, fgt-flipEffect" }, "effect": { "revealEffect": { diff --git a/inject/vscode-frosted-glass-theme.js b/inject/vscode-frosted-glass-theme.js index e35b976..63b95bf 100644 --- a/inject/vscode-frosted-glass-theme.js +++ b/inject/vscode-frosted-glass-theme.js @@ -1,2 +1,2 @@ -import Re from"./config.json"with{type:"json"};function p(e){return e&&e instanceof HTMLElement}function x(e,t){return t.hasOwnProperty(e)}var O;function ke(){if(O)return O;let e=import.meta.url;return O=e.substring(0,e.lastIndexOf("/")+1)}function C(e){return e.startsWith(".")||e.startsWith("..")?ke()+e:`vscode-file://vscode-app/${e}`}function S(e,t){let n=e.getBoundingClientRect(),o=t.pageX-n.left-window.scrollX,r=t.pageY-n.top-window.scrollY;return[o,r]}var s=(e,...t)=>e.reduce((n,o,r)=>{let i=t[r];return i?n+o+i:n+o},""),Ee;function X(){let e=vscode.process.versions.chrome.match(/^\d+/)?.[0];return Ee=e?parseInt(e,10):0}var we=trustedTypes.createPolicy("fgtSvg",{createHTML(e){return e},createScriptURL(e){return e}});function A(e){let t=[];for(let n of e)t.push(fetch(C(n)));return async function n(o,r=!1){let i=n,a=!1;if(!i.svgs){a=!0,i.svgs=[];for(let c of await Promise.all(t)){let l=await c.text(),u=new DOMParser().parseFromString(we.createHTML(l),"text/xml").querySelector("svg");if(!u)throw c.url+" does not contain a valid svg!";u.style.position="absolute",u.style.width="0px",u.style.height="0px",u.style.colorInterpolation="srgb",u.style.colorInterpolationFilters="srgb",i.svgs.push(u)}}if(r||!a)for(let c of i.svgs)o.appendChild(c.cloneNode(!0));else o.append(...i.svgs)}}import Se from"./config.json"with{type:"json"};var{opacity:m}=Se,Z=[["--vscode-menu-selectionBackground",m.selection],["--vscode-quickInputList-focusBackground",m.selection],["--vscode-editorSuggestWidget-selectedBackground",m.selection],["--vscode-menu-border",m.border],["--vscode-widget-border",m.border],["--vscode-editorWidget-border",m.border],["--vscode-editorHoverWidget-border",m.border],["--vscode-editorSuggestWidget-border",m.border],["--vscode-menu-separatorBackground",m.separator]];function G(e,t,n){Z.push([e,t,n])}function P(e){let n=e.ownerDocument.querySelector("head > style.contributedColorTheme");if(!n)return;Y(e,n),new MutationObserver(Y.bind(globalThis,e,n)).observe(n,{characterData:!1,attributes:!1,childList:!0,subtree:!1})}function Te(e,t){if(e=e.trim(),e.startsWith("#")){let o=Math.round(t*255).toString(16);return e.length===7?e+o:e}let n=e.slice(e.indexOf("(")+1,-1);if(e.startsWith("rgb")){let o=n.split(",");if(o.length>=4)return e;let[r,i,a]=o.map(Number);return`rgba(${r}, ${i}, ${a}, ${t})`}if(e.startsWith("hsl")){let o=n.split(",");if(o.length>=4)return e;let[r,i,a]=o.map(parseFloat);return`hsla(${r}, ${i}%, ${a}%, ${t})`}return e}function Fe(e){return Array.from(document.styleSheets).find(t=>t.ownerNode===e)}function Y(e,t){let n=Fe(t)?.cssRules;if(!n)return;let o=n[n.length-1];if(!(o instanceof CSSStyleRule))return;let r=o.style;Z.forEach(i=>{e.style.setProperty(i[2]??i[0],Te(r.getPropertyValue(i[0]),i[1]))})}import U from"./vscode-frosted-glass-theme.css"with{type:"css"};var{filter:Me,tintSvg:$e}=Re,J=A($e),Q=[["multiDiffEditorHeader","--vscode-editor-background",".monaco-component.multiDiffEditor .header","--fgt-multiDiffEditorHeader-background"],["editorHoverWidget","--vscode-editorHoverWidget-background",".debug-hover-widget, .monaco-editor-overlaymessage .message"],["editorSuggestWidget","--vscode-editorSuggestWidget-background",".monaco-editor .suggest-details"],["peekViewResult","--vscode-peekViewResult-background",".monaco-tree-type-filter"],["quickInput","--vscode-quickInput-background",".quick-input-widget"],["menu","--vscode-menu-background",".monaco-menu-container .monaco-scrollable-element"],["notifications","--vscode-notifications-background",".notifications-list-container"],["notificationCenterHeader","--vscode-notificationCenterHeader-background",".notifications-center-header"],["hover","--vscode-editorHoverWidget-statusBarBackground",".monaco-hover"],["editorStickyScroll","--vscode-editorStickyScroll-background",".sticky-widget"],["listFilterWidget","--vscode-listFilterWidget-background",".editor-widget.find-widget"],["editorWidget","--vscode-editorWidget-background",".editor-widget, .simple-find-part, .monaco-dialog-box, .action-widget, .rename-box, .defineKeybindingWidget"],["breadcrumbPicker","--vscode-breadcrumbPicker-background",".monaco-breadcrumbs-picker > :not(.arrow)"],["debugToolBar","--vscode-debugToolBar-background",".debug-toolbar"],["treeStickyContainer","--vscode-sideBarStickyScroll-background",".monaco-tree-sticky-container","--fgt-treeStickyContainer-background"],["cellTitleToolbar","--vscode-editorStickyScroll-background",".cell-title-toolbar","--fgt-cellTitleToolbar-background"],["slider","--vscode-scrollbarSlider-background",".editor-scrollable > .scrollbar.horizontal > .slider, .monaco-scrollable-element:not(.editor-scrollable) > .scrollbar > .slider"],["sideBarSectionHeader","--vscode-sideBarSectionHeader-background",".pane-header.expanded"],["dropdown","--vscode-dropdown-background",".select-box-dropdown-list-container, .select-box-details-pane"],["minimap","--fgt-transparent",".minimap"],["decorationsOverviewRuler","--fgt-transparent",".monaco-editor .decorationsOverviewRuler"],["terminalOverlay","--fgt-transparent",".hover-overlay"]];U.insertRule(s` [role="application"] { --fgt-transparent: transparent; } `);var T={};{let t=function(o,r=e){if(o!==void 0)return typeof o=="string"?{...r,filter:o}:{...r,...o}};Ce=t;let e={filter:"",disableBackgroundColor:!1,opacity:1},n=Me;T.default=t(n.default);for(let o in n)o!="default"&&(T[o]=t(n[o],T.default??e))}var Ce;Q.forEach(e=>{let t=T[e[0]]??T.default;if(t===void 0)return;G(e[1],t.opacity,e[3]);let n=t.filter.replaceAll("{key}",e[0]);U.insertRule(s` ${e[2]} { backdrop-filter: ${n}; background-color: ${t.disableBackgroundColor?"transparent":`var(${e[1]})`} !important; } `)});async function q(e){for(let t of Q){let n=document.createElement("div");n.style.setProperty("--fgt-current-background",`var(${t[1]})`),await J(n,!0),n.querySelectorAll("filter").forEach(o=>o.id=o.id+"-"+t[0]),e.appendChild(n)}}function ee(e){let t=document.createElement("div");t.style.setProperty("--fgt-current-background","var(--vscode-menu-background)"),J(t,!0),t.querySelectorAll("filter").forEach(n=>n.id=n.id+"-menu"),e.appendChild(t)}import k from"./config.json"with{type:"json"};import Oe from"./config.json"with{type:"json"};window._fgtTheme=Object.create(null);var te=window._fgtTheme;import H from"./vscode-frosted-glass-theme.css"with{type:"css"};import Ae from"./config.json"with{type:"json"};var{effect:{flipEffect:L}}=Ae,Le=new Function("radius",'"use strict";return '+L.reducedDistanceFunc);function He(e,t,n){return(-t+Math.sqrt(t*t-4*e*n))/(2*e)}function ne(e,t){let n=S(e,t),o=e.getBoundingClientRect(),r=[o.width/2,o.height/2],i=[r[0]-n[0],r[1]-n[1]],a=[i[1],-i[0]],c=(o.width*o.width+o.height*o.height)/4,l=Math.sqrt(c),u=Math.sqrt(i[0]*i[0]+i[1]*i[1]),f=L.perspective*96/2.54,E=Le(l),v=l-E,w=l-(1-He((f*f/(v*v)+1)*c,-(2*f*f*l)/v,f*f-c))*u,K=Math.acos(w/l),be=Math.sin(K)*l,he=w*f/(l-E)-f-be,ye=`perspective(${L.perspective}cm)`,ve=`rotate3d(${a[0]}, ${a[1]}, 0, ${K*180/Math.PI}deg)`,xe=`translateZ(-${he}px)`;e.style.transform=`${ye} ${xe} ${ve}`}function oe(e){if(e._appliedFlipEffect||!p(e))return;let t=e.style.transform,n=!1;e.style.transition="transform "+L.transition,e.addEventListener("mousedown",o=>{n=!0,ne(e,o)}),e.addEventListener("mousemove",o=>{n&&ne(e,o)}),e.addEventListener("mouseup",()=>{n=!1,e.style.transform=t}),e.addEventListener("mouseleave",()=>{n=!1,e.style.transform=t}),e._appliedFlipEffect=!0}import Ne from"./config.json"with{type:"json"};var{effect:{revealEffect:h}}=Ne;function re(e,t){if(typeof t=="number")return t;if(t.endsWith("%")){let n=e.getBoundingClientRect();return Math.max(n.width,n.height)*Number.parseFloat(t.substring(0,t.length-1))/100}else return Number.parseFloat(t)}function Be(e,t,n){return`radial-gradient(circle ${n}px at ${e}px ${t}px, ${h.lightColor}, transparent)`}function _e(e,t,n,o){return`radial-gradient(circle ${n}px at ${e}px ${t}px, transparent, ${o}, transparent)`}function Ie(e,t){e._revealEffectAnimation&&cancelAnimationFrame(e._revealEffectAnimation);let[n,o]=S(e,t),r=h.clickEffect.speed,i=re(e,h.clickEffect.size),a=h.clickEffect.duration,c=a*r,l;function u(f){l===void 0&&(l=f);let E=f-l,v=e._revealEffectHover;if(E{let[o,r]=S(e,n),i=Be(o,r,re(e,h.gradientSize));e._revealEffectAnimation?e._revealEffectHover=i:e.style.backgroundImage=i}),e.addEventListener("mouseleave",()=>{e.style.backgroundImage=t,e._revealEffectHover=t}),h.clickEffect&&!e.classList.contains("disabled")&&e.addEventListener("mousedown",n=>{e._revealEffectHover=e.style.backgroundImage,Ie(e,n)}),e._appliedRevealEffect=!0}var{effect:{extendMenuFocusBackground:Pe,disableForDisabledItem:qe}}=Oe,j=Pe,N={"fgt-revealEffect":ie,"fgt-flipEffect":oe};for(let e in N)H.insertRule(s` @keyframes ${e} { } `);te.registerEffect=(e,t)=>{N[e]=t,H.insertRule(s` @keyframes ${e} { } `)};j&&(H.insertRule(s` .monaco-menu-container ul.actions-container > li > a.action-menu-item { background-color: transparent !important; outline: none !important; } `),H.insertRule(s` .monaco-menu-container ul.actions-container .action-item.focused { background-color: ${j===!0?"var(--vscode-menu-selectionBackground)":j}; } `));function B(e){e.addEventListener("animationstart",t=>{"animationName"in t&&t.target instanceof Element&&(qe&&t.target.classList.contains("disabled")||x(t.animationName,N)&&N[t.animationName](t.target))})}import je from"./config.json"with{type:"json"};import g from"./vscode-frosted-glass-theme.css"with{type:"css"};var{fakeMica:b}=je;b.enabled&&(g.insertRule(s` [role="application"]::before { content: ""; display: block; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; } `),g.insertRule(s` .fgt-mica-svg-loaded::before { filter: ${b.filter}; background: url("vscode-file://vscode-app/${b.url}") ${b.position}; } `),g.insertRule(s` .monaco-list-rows { background-color: transparent !important; } `),g.insertRule(s` .settings-body .monaco-list-row { background-color: transparent !important; } `),b.titlebarFix&&g.insertRule(s` .part.titlebar { background-color: color-mix( in srgb, var(--vscode-titleBar-activeBackground) ${b.titlebarFix*100}%, transparent ) !important; } `),b.editorBackgroundFix&&(g.insertRule(s` .content, .monaco-editor, .monaco-editor-background, .view-overlays .selected-text:has(+ .monaco-editor-background) { background-color: transparent !important; } `),g.insertRule(s` .editor-group-container.empty { background-color: var(--vscode-editor-background); } `),g.insertRule(s` .profiles-editor { margin: 0 auto 0 !important; padding-top: 20px; } `)));async function V(e,t){b.enabled&&(await t,e.classList.add("fgt-mica-svg-loaded"))}function d(e,t,n){if(!e[t]||e[t]._proxied)return;let o=e[t];e[t]=function(...r){return n.call(this,o.bind(this),...r)},e[t]._proxied=!0}function _(e,t,n){for(let o of t)d(e,o,n)}function F(e){return function(t,...n){return e.call(this,t(...n),...n)}}function D(e){return function(t,...n){return e.call(this,...n),t(...n)}}function y(e,t){return function(n,o,...r){return p(o)&&(e===null||o.classList.contains(e))&&t.call(this,o,...r),n(o,...r)}}function R(e,t,n,o){let r=e.querySelector("div."+t);r&&o(r);let i=y(t,o);n instanceof Array?_(e,n,i):d(e,n,i)}function M(e){if(!p(e))return;d(e,"appendChild",(o,r)=>o(p(r)&&r.classList.contains("monaco-scrollable-element")?n(r):r));function t(o,r){function i(a){return!p(a)||a._fixedSubMenu||(Object.defineProperty(a,"parentNode",{get(){return o}}),o._subMenu=a,d(o,"contains",F((c,l)=>c||o._subMenu===l||(o._subMenu?.contains(l)??!1))),a.addEventListener("focusout",c=>setTimeout(()=>o.dispatchEvent(new Event(c.type,{...c,bubbles:!1})))),M(a),a._fixedSubMenu=!0),a}o.append=a=>r.append(i(a)),o.removeChild=a=>r.removeChild(a),o.replaceChild=(a,c)=>r.replaceChild(i(a),c)}function n(o){if(!p(o))return o;let r=o.querySelector("div.monaco-action-bar");if(!r)return o;let i=r.cloneNode();for(let a of Array.from(r.children))i.appendChild(a);return r.parentNode?.replaceChild(i,r),r.className="",r.appendChild(o),r.querySelectorAll("ul.actions-container > li:has(> .monaco-submenu-item)").forEach(a=>t(a,r)),r}}function se(e){let t=r=>{p(r)&&_(r,["append","appendChild"],D(M))};{let r=e.querySelector("#workbench\\.parts\\.titlebar > div > div.titlebar-left");if(!r)return;R(r,"menubar","append",i=>{i.querySelectorAll("div.menubar-menu-button").forEach(t),_(i,["append","appendChild","insertBefore"],D(t))})}function n(r){r&&R(r,"menubar","prepend",i=>{R(i,"menubar-menu-button","appendChild",t)})}n(e.querySelector("#workbench\\.parts\\.activitybar > div.content"));let o=e.querySelector("#workbench\\.parts\\.sidebar");o&&R(o,"composite",["insertBefore","appendChild"],r=>n(r.querySelector("div.composite-bar-container")))}var ae=M;import $ from"./vscode-frosted-glass-theme.css"with{type:"css"};import Ve from"./config.json"with{type:"json"};import De from"./vscode-frosted-glass-theme.css"with{type:"css"};var{animation:ce}=Ve,le={menu:".monaco-menu-container .monaco-scrollable-element, .action-widget, .monaco-breadcrumbs-picker, .quick-input-widget",dialog:".dialog-shadow",dropdown:".monaco-select-box-dropdown-container",hover:".monaco-hover",notificationCenter:".notifications-center, .notification-toast",notificationCenterHeader:".notifications-center-header",notification:".notifications-list-container .monaco-list-row",menuItem:".monaco-menu-container ul > li.action-item:not(:has(> a.separator))",actionMenuItem:".monaco-menu-container ul > li > a.action-menu-item:not(.separator)",button:".monaco-button",iconActionLabel:":not(.activitybar, .composite-bar) > .monaco-action-bar .action-label.codicon",tab:".tabs-container > .tab",listItem:":not(.settings-tree-container, .notifications-list-container, .profile-tree) > .monaco-list .monaco-list-row",statusbarItem:".statusbar-item:not(.has-background-color) > .statusbar-item-label, .statusbar-item.has-background-color",activitybarItem:".activitybar li.action-item:not(:has(> a.separator))",compositeBarItem:".pane-composite-part .composite-bar li.action-item:not(:has(> a.separator))",commandCenter:".command-center-center",menubarTitle:".menubar-menu-title",settingsTreeItem:".settings-tree-container .monaco-list-rows .settings-row-inner-container"};for(let e in ce){let t=ce[e];t.length!=0&&De.insertRule(s` ${x(e,le)?le[e]:e} { animation: ${t}; } `)}import We from"./config.json"with{type:"json"};import ze from"./vscode-frosted-glass-theme.css"with{type:"css"};var{borderRadius:de}=We,ue={menuItem:".monaco-menu-container ul.actions-container > li > a.action-menu-item",menu:".monaco-menu-container .monaco-scrollable-element",suggestWidget:".editor-widget.suggest-widget",tab:".tab"};for(let e in de){let t=de[e];t.length!=0&&ze.insertRule(s` ${x(e,ue)?ue[e]:e} { border-radius: ${t} !important; overflow: hidden; } `)}import pe from"./vscode-frosted-glass-theme.css"with{type:"css"};function W(e,t,n){X()>=128?pe.insertRule(s` ${e} { clip-path: ${t} !important; } `):pe.insertRule(s` ${e} { overflow: clip !important; overflow-clip-margin: ${n} !important; } `)}function z(e,t=!1){return`inset(${e}px ${t?"calc(-infinity * 1px) calc(-infinity * 1px))":"0px 0px"}`}W(s`.monaco-menu-container, .context-view`,z(-1,!0),"10px");W(s`.select-container > .context-view`,z(0,!0),"0px");W(s`.pane-body, .pane-body .monaco-list > .monaco-scrollable-element`,z(-22),"22px");import Ke from"./config.json"with{type:"json"};import I from"./vscode-frosted-glass-theme.css"with{type:"css"};var{miscellaneous:fe}=Ke;fe.progressBarBehindSectionHeader?(I.insertRule(s` .pane > .monaco-progress-container { height: 22px !important; top: 0px !important; } `),I.insertRule(s` .pane > .monaco-progress-container > .progress-bit { height: 22px !important; left: 1px !important; } `)):I.insertRule(s` .pane > .monaco-progress-container { z-index: 20; } `);fe.disableFocusOutline&&I.insertRule(s` .monaco-workbench [tabindex="-1"]:focus, .monaco-workbench [tabindex="0"]:focus, .monaco-workbench button:focus, .monaco-workbench input[type="button"]:focus, .monaco-workbench input[type="checkbox"]:focus, .monaco-workbench input[type="search"]:focus, .monaco-workbench input[type="text"]:focus, .monaco-workbench select:focus, .monaco-workbench textarea:focus, .monaco-list::before { outline: none !important; } `);var{opacity:Xe}=k;$.insertRule(s` [role="application"] { --fgt-transition: ${k.transition}; --fgt-minimap-opacity: ${Xe.minimap*100}%; } `);for(let e of k.additionalStyle){let t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href",C(e)),document.head.append(t)}function me(e,t){$.insertRule(s` ${e} { ${Object.entries(t).reduce((n,o)=>{let[r,i]=o;return n+`--${r}: ${i};`},"")} } `)}me('[role="application"]',k.variable);me('[role="application"].vs-dark, [role="application"].hc-black',k.variableDark);document.adoptedStyleSheets.push($);var ge=A(k.svg);d(document.body,"appendChild",y("monaco-workbench",e=>{P(e);let t=ge(e);V(e,t),q(e),B(e),d(e,"prepend",y("monaco-grid-view",se)),d(e,"appendChild",y("context-view",ae))}));d(Element.prototype,"attachShadow",F(e=>(e.adoptedStyleSheets.push(...e.ownerDocument.adoptedStyleSheets),ee(e),B(e),d(e,"appendChild",y("monaco-menu-container",M)),e)));d(window,"open",F(e=>{if(!e)return e;let t=e,n=e.document,o=new t.CSSStyleSheet;for(let r=0;r<$.cssRules.length;r++)o.insertRule($.cssRules[r].cssText);return n.adoptedStyleSheets.push(o),d(n.body,"append",y(null,r=>{P(r);let i=ge(r);V(r,i),q(r),B(r)})),e})); +import Re from"./config.json"with{type:"json"};function p(e){return e&&e instanceof HTMLElement}function x(e,t){return t.hasOwnProperty(e)}var O;function ke(){if(O)return O;let e=import.meta.url;return O=e.substring(0,e.lastIndexOf("/")+1)}function C(e){return e.startsWith(".")||e.startsWith("..")?ke()+e:`vscode-file://vscode-app/${e}`}function S(e,t){let n=e.getBoundingClientRect(),o=t.pageX-n.left-window.scrollX,r=t.pageY-n.top-window.scrollY;return[o,r]}var a=(e,...t)=>e.reduce((n,o,r)=>{let i=t[r];return i?n+o+i:n+o},""),Ee;function X(){let e=vscode.process.versions.chrome.match(/^\d+/)?.[0];return Ee=e?parseInt(e,10):0}var we=trustedTypes.createPolicy("fgtSvg",{createHTML(e){return e},createScriptURL(e){return e}});function A(e){let t=[];for(let n of e)t.push(fetch(C(n)));return async function n(o,r=!1){let i=n,s=!1;if(!i.svgs){s=!0,i.svgs=[];for(let c of await Promise.all(t)){let l=await c.text(),u=new DOMParser().parseFromString(we.createHTML(l),"text/xml").querySelector("svg");if(!u)throw c.url+" does not contain a valid svg!";u.style.position="absolute",u.style.width="0px",u.style.height="0px",u.style.colorInterpolation="srgb",u.style.colorInterpolationFilters="srgb",i.svgs.push(u)}}if(r||!s)for(let c of i.svgs)o.appendChild(c.cloneNode(!0));else o.append(...i.svgs)}}import Se from"./config.json"with{type:"json"};var{opacity:m}=Se,Z=[["--vscode-menu-selectionBackground",m.selection],["--vscode-quickInputList-focusBackground",m.selection],["--vscode-editorSuggestWidget-selectedBackground",m.selection],["--vscode-menu-border",m.border],["--vscode-widget-border",m.border],["--vscode-editorWidget-border",m.border],["--vscode-editorHoverWidget-border",m.border],["--vscode-editorSuggestWidget-border",m.border],["--vscode-menu-separatorBackground",m.separator]];function G(e,t,n){Z.push([e,t,n])}function P(e){let n=e.ownerDocument.querySelector("head > style.contributedColorTheme");if(!n)return;Y(e,n),new MutationObserver(Y.bind(globalThis,e,n)).observe(n,{characterData:!1,attributes:!1,childList:!0,subtree:!1})}function Te(e,t){if(e=e.trim(),e.startsWith("#")){let o=Math.round(t*255).toString(16);return e.length===7?e+o:e}let n=e.slice(e.indexOf("(")+1,-1);if(e.startsWith("rgb")){let o=n.split(",");if(o.length>=4)return e;let[r,i,s]=o.map(Number);return`rgba(${r}, ${i}, ${s}, ${t})`}if(e.startsWith("hsl")){let o=n.split(",");if(o.length>=4)return e;let[r,i,s]=o.map(parseFloat);return`hsla(${r}, ${i}%, ${s}%, ${t})`}return e}function Fe(e){return Array.from(document.styleSheets).find(t=>t.ownerNode===e)}function Y(e,t){let n=Fe(t)?.cssRules;if(!n)return;let o=n[n.length-1];if(!(o instanceof CSSStyleRule))return;let r=o.style;Z.forEach(i=>{e.style.setProperty(i[2]??i[0],Te(r.getPropertyValue(i[0]),i[1]))})}import U from"./vscode-frosted-glass-theme.css"with{type:"css"};var{filter:Me,tintSvg:$e}=Re,J=A($e),Q=[["multiDiffEditorHeader","--vscode-editor-background",".monaco-component.multiDiffEditor .header","--fgt-multiDiffEditorHeader-background"],["editorHoverWidget","--vscode-editorHoverWidget-background",".debug-hover-widget, .monaco-editor-overlaymessage .message"],["editorSuggestWidget","--vscode-editorSuggestWidget-background",".monaco-editor .suggest-details"],["peekViewResult","--vscode-peekViewResult-background",".monaco-tree-type-filter"],["quickInput","--vscode-quickInput-background",".quick-input-widget"],["menu","--vscode-menu-background",".monaco-menu-container .monaco-scrollable-element"],["notifications","--vscode-notifications-background",".notifications-list-container"],["notificationCenterHeader","--vscode-notificationCenterHeader-background",".notifications-center-header"],["hover","--vscode-editorHoverWidget-statusBarBackground",".monaco-hover"],["editorStickyScroll","--vscode-editorStickyScroll-background",".sticky-widget"],["listFilterWidget","--vscode-listFilterWidget-background",".editor-widget.find-widget"],["editorWidget","--vscode-editorWidget-background",".editor-widget, .simple-find-part, .monaco-dialog-box, .action-widget, .rename-box, .defineKeybindingWidget"],["breadcrumbPicker","--vscode-breadcrumbPicker-background",".monaco-breadcrumbs-picker > :not(.arrow)"],["debugToolBar","--vscode-debugToolBar-background",".debug-toolbar"],["treeStickyContainer","--vscode-sideBarStickyScroll-background",".monaco-tree-sticky-container","--fgt-treeStickyContainer-background"],["cellTitleToolbar","--vscode-editorStickyScroll-background",".cell-title-toolbar","--fgt-cellTitleToolbar-background"],["slider","--vscode-scrollbarSlider-background",".editor-scrollable > .scrollbar.horizontal > .slider, .monaco-scrollable-element:not(.editor-scrollable) > .scrollbar > .slider"],["sideBarSectionHeader","--vscode-sideBarSectionHeader-background",".pane-header.expanded"],["dropdown","--vscode-dropdown-background",".select-box-dropdown-list-container, .select-box-details-pane"],["minimap","--fgt-transparent",".minimap"],["decorationsOverviewRuler","--fgt-transparent",".monaco-editor .decorationsOverviewRuler"],["terminalOverlay","--fgt-transparent",".hover-overlay"]];U.insertRule(a` [role="application"] { --fgt-transparent: transparent; } `);var T={};{let t=function(o,r=e){if(o!==void 0)return typeof o=="string"?{...r,filter:o}:{...r,...o}};Ce=t;let e={filter:"",disableBackgroundColor:!1,opacity:1},n=Me;T.default=t(n.default);for(let o in n)o!="default"&&(T[o]=t(n[o],T.default??e))}var Ce;Q.forEach(e=>{let t=T[e[0]]??T.default;if(t===void 0)return;G(e[1],t.opacity,e[3]);let n=t.filter.replaceAll("{key}",e[0]);U.insertRule(a` ${e[2]} { backdrop-filter: ${n}; background-color: ${t.disableBackgroundColor?"transparent":`var(${e[1]})`} !important; } `)});async function q(e){for(let t of Q){let n=document.createElement("div");n.style.setProperty("--fgt-current-background",`var(${t[1]})`),await J(n,!0),n.querySelectorAll("filter").forEach(o=>o.id=o.id+"-"+t[0]),e.appendChild(n)}}function ee(e){let t=document.createElement("div");t.style.setProperty("--fgt-current-background","var(--vscode-menu-background)"),J(t,!0),t.querySelectorAll("filter").forEach(n=>n.id=n.id+"-menu"),e.appendChild(t)}import k from"./config.json"with{type:"json"};import Oe from"./config.json"with{type:"json"};window._fgtTheme=Object.create(null);var te=window._fgtTheme;import H from"./vscode-frosted-glass-theme.css"with{type:"css"};import Ae from"./config.json"with{type:"json"};var{effect:{flipEffect:L}}=Ae,Le=new Function("radius",'"use strict";return '+L.reducedDistanceFunc);function He(e,t,n){return(-t+Math.sqrt(t*t-4*e*n))/(2*e)}function ne(e,t){let n=S(e,t),o=e.getBoundingClientRect(),r=[o.width/2,o.height/2],i=[r[0]-n[0],r[1]-n[1]],s=[i[1],-i[0]],c=(o.width*o.width+o.height*o.height)/4,l=Math.sqrt(c),u=Math.sqrt(i[0]*i[0]+i[1]*i[1]),f=L.perspective*96/2.54,E=Le(l),v=l-E,w=l-(1-He((f*f/(v*v)+1)*c,-(2*f*f*l)/v,f*f-c))*u,K=Math.acos(w/l),be=Math.sin(K)*l,he=w*f/(l-E)-f-be,ye=`perspective(${L.perspective}cm)`,ve=`rotate3d(${s[0]}, ${s[1]}, 0, ${K*180/Math.PI}deg)`,xe=`translateZ(-${he}px)`;e.style.transform=`${ye} ${xe} ${ve}`}function oe(e){if(e._appliedFlipEffect||!p(e))return;let t=e.style.transform,n=!1;e.style.transition="transform "+L.transition,e.addEventListener("mousedown",o=>{n=!0,ne(e,o)}),e.addEventListener("mousemove",o=>{n&&ne(e,o)}),e.addEventListener("mouseup",()=>{n=!1,e.style.transform=t}),e.addEventListener("mouseleave",()=>{n=!1,e.style.transform=t}),e._appliedFlipEffect=!0}import Ne from"./config.json"with{type:"json"};var{effect:{revealEffect:h}}=Ne;function re(e,t){if(typeof t=="number")return t;if(t.endsWith("%")){let n=e.getBoundingClientRect();return Math.max(n.width,n.height)*Number.parseFloat(t.substring(0,t.length-1))/100}else return Number.parseFloat(t)}function Be(e,t,n){return`radial-gradient(circle ${n}px at ${e}px ${t}px, ${h.lightColor}, transparent)`}function _e(e,t,n,o){return`radial-gradient(circle ${n}px at ${e}px ${t}px, transparent, ${o}, transparent)`}function Ie(e,t){e._revealEffectAnimation&&cancelAnimationFrame(e._revealEffectAnimation);let[n,o]=S(e,t),r=h.clickEffect.speed,i=re(e,h.clickEffect.size),s=h.clickEffect.duration,c=s*r,l;function u(f){l===void 0&&(l=f);let E=f-l,v=e._revealEffectHover;if(E{let[o,r]=S(e,n),i=Be(o,r,re(e,h.gradientSize));e._revealEffectAnimation?e._revealEffectHover=i:e.style.backgroundImage=i}),e.addEventListener("mouseleave",()=>{e.style.backgroundImage=t,e._revealEffectHover=t}),h.clickEffect&&!e.classList.contains("disabled")&&e.addEventListener("mousedown",n=>{e._revealEffectHover=e.style.backgroundImage,Ie(e,n)}),e._appliedRevealEffect=!0}var{effect:{extendMenuFocusBackground:Pe,disableForDisabledItem:qe}}=Oe,j=Pe,N={"fgt-revealEffect":ie,"fgt-flipEffect":oe};for(let e in N)H.insertRule(a` @keyframes ${e} { } `);te.registerEffect=(e,t)=>{N[e]=t,H.insertRule(a` @keyframes ${e} { } `)};j&&(H.insertRule(a` .monaco-menu-container ul.actions-container > li > a.action-menu-item { background-color: transparent !important; outline: none !important; } `),H.insertRule(a` .monaco-menu-container ul.actions-container .action-item.focused { background-color: ${j===!0?"var(--vscode-menu-selectionBackground)":j}; } `));function B(e){e.addEventListener("animationstart",t=>{"animationName"in t&&t.target instanceof Element&&(qe&&t.target.classList.contains("disabled")||x(t.animationName,N)&&N[t.animationName](t.target))})}import je from"./config.json"with{type:"json"};import g from"./vscode-frosted-glass-theme.css"with{type:"css"};var{fakeMica:b}=je;b.enabled&&(g.insertRule(a` [role="application"]::before { content: ""; display: block; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; } `),g.insertRule(a` .fgt-mica-svg-loaded::before { filter: ${b.filter}; background: url("vscode-file://vscode-app/${b.url}") ${b.position}; } `),g.insertRule(a` .monaco-list-rows { background-color: transparent !important; } `),g.insertRule(a` .settings-body .monaco-list-row { background-color: transparent !important; } `),b.titlebarFix&&g.insertRule(a` .part.titlebar { background-color: color-mix( in srgb, var(--vscode-titleBar-activeBackground) ${b.titlebarFix*100}%, transparent ) !important; } `),b.editorBackgroundFix&&(g.insertRule(a` .content, .monaco-editor, .monaco-editor-background, .view-overlays .selected-text:has(+ .monaco-editor-background) { background-color: transparent !important; } `),g.insertRule(a` .editor-group-container.empty { background-color: var(--vscode-editor-background); } `),g.insertRule(a` .profiles-editor { margin: 0 auto 0 !important; padding-top: 20px; } `)));async function V(e,t){b.enabled&&(await t,e.classList.add("fgt-mica-svg-loaded"))}function d(e,t,n){if(!e[t]||e[t]._proxied)return;let o=e[t];e[t]=function(...r){return n.call(this,o.bind(this),...r)},e[t]._proxied=!0}function _(e,t,n){for(let o of t)d(e,o,n)}function F(e){return function(t,...n){return e.call(this,t(...n),...n)}}function D(e){return function(t,...n){return e.call(this,...n),t(...n)}}function y(e,t){return function(n,o,...r){return p(o)&&(e===null||o.classList.contains(e))&&t.call(this,o,...r),n(o,...r)}}function R(e,t,n,o){let r=e.querySelector("div."+t);r&&o(r);let i=y(t,o);n instanceof Array?_(e,n,i):d(e,n,i)}function M(e){if(!p(e))return;d(e,"appendChild",(o,r)=>o(p(r)&&r.classList.contains("monaco-scrollable-element")?n(r):r));function t(o,r){function i(s){return!p(s)||s._fixedSubMenu||(Object.defineProperty(s,"parentNode",{get(){return o}}),o._subMenu=s,d(o,"contains",F((c,l)=>c||o._subMenu===l||(o._subMenu?.contains(l)??!1))),s.addEventListener("focusout",c=>setTimeout(()=>o.dispatchEvent(new Event(c.type,{...c,bubbles:!1})))),M(s),s._fixedSubMenu=!0),s}o.append=s=>r.append(i(s)),o.removeChild=s=>r.removeChild(s),o.replaceChild=(s,c)=>r.replaceChild(i(s),c)}function n(o){if(!p(o))return o;let r=o.querySelector("div.monaco-action-bar");if(!r)return o;let i=r.cloneNode();for(let s of Array.from(r.children))i.appendChild(s);return r.parentNode?.replaceChild(i,r),r.className="",r.appendChild(o),r.querySelectorAll("ul.actions-container > li:has(> .monaco-submenu-item)").forEach(s=>t(s,r)),r}}function ae(e){let t=r=>{p(r)&&_(r,["append","appendChild"],D(M))};{let r=e.querySelector("#workbench\\.parts\\.titlebar > div > div.titlebar-left");if(!r)return;R(r,"menubar","append",i=>{i.querySelectorAll("div.menubar-menu-button").forEach(t),_(i,["append","appendChild","insertBefore"],D(t))})}function n(r){r&&R(r,"menubar","prepend",i=>{R(i,"menubar-menu-button","appendChild",t)})}n(e.querySelector("#workbench\\.parts\\.activitybar > div.content"));let o=e.querySelector("#workbench\\.parts\\.sidebar");o&&R(o,"composite",["insertBefore","appendChild"],r=>n(r.querySelector("div.composite-bar-container")))}var se=M;import $ from"./vscode-frosted-glass-theme.css"with{type:"css"};import Ve from"./config.json"with{type:"json"};import De from"./vscode-frosted-glass-theme.css"with{type:"css"};var{animation:ce}=Ve,le={menu:".monaco-menu-container .monaco-scrollable-element, .action-widget, .monaco-breadcrumbs-picker, .quick-input-widget",dialog:".dialog-shadow",dropdown:".monaco-select-box-dropdown-container",hover:".monaco-hover",notificationCenter:".notifications-center, .notification-toast",notificationCenterHeader:".notifications-center-header",notification:".notifications-list-container .monaco-list-row",menuItem:".monaco-menu-container ul > li.action-item:not(:has(> a.separator))",actionMenuItem:".monaco-menu-container ul > li > a.action-menu-item:not(.separator)",button:".monaco-button",iconActionLabel:":not(.activitybar, .composite-bar) > .monaco-action-bar .action-label.codicon",tab:".tabs-container > .tab",listItem:":not(.settings-tree-container, .notifications-list-container, .profile-tree) > .monaco-list .monaco-list-row",statusbarItem:".statusbar-item:not(.has-background-color) > .statusbar-item-label, .statusbar-item.has-background-color",activitybarItem:".activitybar li.action-item:not(:has(> a.separator))",compositeBarItem:".pane-composite-part .composite-bar li.action-item:not(:has(> a.separator))",commandCenter:".command-center-center",menubarTitle:".menubar-menu-title",settingsTreeItem:".settings-tree-container .monaco-list-rows .settings-row-inner-container",paneHeader:".pane-header"};for(let e in ce){let t=ce[e];t.length!=0&&De.insertRule(a` ${x(e,le)?le[e]:e} { animation: ${t}; } `)}import We from"./config.json"with{type:"json"};import ze from"./vscode-frosted-glass-theme.css"with{type:"css"};var{borderRadius:de}=We,ue={menuItem:".monaco-menu-container ul.actions-container > li > a.action-menu-item",menu:".monaco-menu-container .monaco-scrollable-element",suggestWidget:".editor-widget.suggest-widget",tab:".tab"};for(let e in de){let t=de[e];t.length!=0&&ze.insertRule(a` ${x(e,ue)?ue[e]:e} { border-radius: ${t} !important; overflow: hidden; } `)}import pe from"./vscode-frosted-glass-theme.css"with{type:"css"};function W(e,t,n){X()>=128?pe.insertRule(a` ${e} { clip-path: ${t} !important; } `):pe.insertRule(a` ${e} { overflow: clip !important; overflow-clip-margin: ${n} !important; } `)}function z(e,t=!1){return`inset(${e}px ${t?"calc(-infinity * 1px) calc(-infinity * 1px))":"0px 0px"}`}W(a`.monaco-menu-container, .context-view`,z(-1,!0),"10px");W(a`.select-container > .context-view`,z(0,!0),"0px");W(a`.pane-body, .pane-body .monaco-list > .monaco-scrollable-element`,z(-22),"22px");import Ke from"./config.json"with{type:"json"};import I from"./vscode-frosted-glass-theme.css"with{type:"css"};var{miscellaneous:fe}=Ke;fe.progressBarBehindSectionHeader?(I.insertRule(a` .pane > .monaco-progress-container { height: 22px !important; top: 0px !important; } `),I.insertRule(a` .pane > .monaco-progress-container > .progress-bit { height: 22px !important; left: 1px !important; } `)):I.insertRule(a` .pane > .monaco-progress-container { z-index: 20; } `);fe.disableFocusOutline&&I.insertRule(a` .monaco-workbench [tabindex="-1"]:focus, .monaco-workbench [tabindex="0"]:focus, .monaco-workbench button:focus, .monaco-workbench input[type="button"]:focus, .monaco-workbench input[type="checkbox"]:focus, .monaco-workbench input[type="search"]:focus, .monaco-workbench input[type="text"]:focus, .monaco-workbench select:focus, .monaco-workbench textarea:focus, .monaco-list::before { outline: none !important; } `);var{opacity:Xe}=k;$.insertRule(a` [role="application"] { --fgt-transition: ${k.transition}; --fgt-minimap-opacity: ${Xe.minimap*100}%; } `);for(let e of k.additionalStyle){let t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href",C(e)),document.head.append(t)}function me(e,t){$.insertRule(a` ${e} { ${Object.entries(t).reduce((n,o)=>{let[r,i]=o;return n+`--${r}: ${i};`},"")} } `)}me('[role="application"]',k.variable);me('[role="application"].vs-dark, [role="application"].hc-black',k.variableDark);document.adoptedStyleSheets.push($);var ge=A(k.svg);d(document.body,"appendChild",y("monaco-workbench",e=>{P(e);let t=ge(e);V(e,t),q(e),B(e),d(e,"prepend",y("monaco-grid-view",ae)),d(e,"appendChild",y("context-view",se))}));d(Element.prototype,"attachShadow",F(e=>(e.adoptedStyleSheets.push(...e.ownerDocument.adoptedStyleSheets),ee(e),B(e),d(e,"appendChild",y("monaco-menu-container",M)),e)));d(window,"open",F(e=>{if(!e)return e;let t=e,n=e.document,o=new t.CSSStyleSheet;for(let r=0;r<$.cssRules.length;r++)o.insertRule($.cssRules[r].cssText);return n.adoptedStyleSheets.push(o),d(n.body,"append",y(null,r=>{P(r);let i=ge(r);V(r,i),q(r),B(r)})),e})); //# sourceMappingURL=vscode-frosted-glass-theme.js.map diff --git a/inject/vscode-frosted-glass-theme.js.map b/inject/vscode-frosted-glass-theme.js.map index 973d4bd..20b3bd7 100644 --- a/inject/vscode-frosted-glass-theme.js.map +++ b/inject/vscode-frosted-glass-theme.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../src-inject/backdropFilter.ts", "../src-inject/utils.ts", "../src-inject/loadSvg.ts", "../src-inject/observeThemeColor.ts", "../src-inject/main.ts", "../src-inject/effect/effect.ts", "../src-inject/globalExport.ts", "../src-inject/effect/flipEffect.ts", "../src-inject/effect/revealEffect.ts", "../src-inject/fakeMica.ts", "../src-inject/proxy.ts", "../src-inject/fixMenu.ts", "../src-inject/animation.ts", "../src-inject/borderRadius.ts", "../src-inject/fixClipPath.ts", "../src-inject/miscellaneous.ts"], - "sourcesContent": ["import config from \"./config.json\" with { type: \"json\" };\r\nimport { loadSvgs } from \"./loadSvg\";\r\nimport { registerColorVar } from \"./observeThemeColor\";\r\nimport { css } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nconst { filter, tintSvg } = config;\r\n\r\nconst mountSvgTo = loadSvgs(tintSvg);\r\n\r\n// the item type is of [key, colorVar, cssSelector, newColorVar?]\r\nconst colorVarList: [string, string, string, string?][] = [\r\n [\r\n \"multiDiffEditorHeader\",\r\n \"--vscode-editor-background\",\r\n \".monaco-component.multiDiffEditor .header\",\r\n \"--fgt-multiDiffEditorHeader-background\",\r\n ],\r\n [\r\n \"editorHoverWidget\",\r\n \"--vscode-editorHoverWidget-background\",\r\n \".debug-hover-widget, .monaco-editor-overlaymessage .message\",\r\n ],\r\n [\r\n \"editorSuggestWidget\",\r\n \"--vscode-editorSuggestWidget-background\",\r\n \".monaco-editor .suggest-details\",\r\n ],\r\n [\r\n \"peekViewResult\",\r\n \"--vscode-peekViewResult-background\",\r\n \".monaco-tree-type-filter\",\r\n ],\r\n [\"quickInput\", \"--vscode-quickInput-background\", \".quick-input-widget\"],\r\n [\r\n \"menu\",\r\n \"--vscode-menu-background\",\r\n \".monaco-menu-container .monaco-scrollable-element\",\r\n ],\r\n [\r\n \"notifications\",\r\n \"--vscode-notifications-background\",\r\n \".notifications-list-container\",\r\n ],\r\n [\r\n \"notificationCenterHeader\",\r\n \"--vscode-notificationCenterHeader-background\",\r\n \".notifications-center-header\",\r\n ],\r\n [\"hover\", \"--vscode-editorHoverWidget-statusBarBackground\", \".monaco-hover\"],\r\n [\r\n \"editorStickyScroll\",\r\n \"--vscode-editorStickyScroll-background\",\r\n \".sticky-widget\",\r\n ],\r\n [\r\n \"listFilterWidget\",\r\n \"--vscode-listFilterWidget-background\",\r\n \".editor-widget.find-widget\",\r\n ],\r\n [\r\n \"editorWidget\",\r\n \"--vscode-editorWidget-background\",\r\n \".editor-widget, .simple-find-part, .monaco-dialog-box, .action-widget, .rename-box, .defineKeybindingWidget\",\r\n ],\r\n [\r\n \"breadcrumbPicker\",\r\n \"--vscode-breadcrumbPicker-background\",\r\n \".monaco-breadcrumbs-picker > :not(.arrow)\",\r\n ],\r\n [\"debugToolBar\", \"--vscode-debugToolBar-background\", \".debug-toolbar\"],\r\n [\r\n \"treeStickyContainer\",\r\n \"--vscode-sideBarStickyScroll-background\",\r\n \".monaco-tree-sticky-container\",\r\n \"--fgt-treeStickyContainer-background\",\r\n ],\r\n [\r\n \"cellTitleToolbar\",\r\n \"--vscode-editorStickyScroll-background\",\r\n \".cell-title-toolbar\",\r\n \"--fgt-cellTitleToolbar-background\",\r\n ],\r\n [\r\n \"slider\",\r\n \"--vscode-scrollbarSlider-background\",\r\n \".editor-scrollable > .scrollbar.horizontal > .slider, .monaco-scrollable-element:not(.editor-scrollable) > .scrollbar > .slider\",\r\n ],\r\n [\r\n \"sideBarSectionHeader\",\r\n \"--vscode-sideBarSectionHeader-background\",\r\n \".pane-header.expanded\",\r\n ],\r\n [\r\n \"dropdown\",\r\n \"--vscode-dropdown-background\",\r\n \".select-box-dropdown-list-container, .select-box-details-pane\",\r\n ],\r\n // Background color is embedded into canvas so can not remove\r\n [\"minimap\", \"--fgt-transparent\", \".minimap\"],\r\n [\r\n \"decorationsOverviewRuler\",\r\n \"--fgt-transparent\",\r\n \".monaco-editor .decorationsOverviewRuler\",\r\n ],\r\n [\"terminalOverlay\", \"--fgt-transparent\", \".hover-overlay\"],\r\n];\r\n\r\nfgtSheet.insertRule(css` [role=\"application\"] { --fgt-transparent: transparent; } `);\r\n\r\ntype Filter = {\r\n filter: string;\r\n disableBackgroundColor: boolean;\r\n opacity: number;\r\n};\r\ntype FilterPart = Partial;\r\n\r\nconst filterMap: {\r\n [key: string]: Filter | undefined;\r\n} = {};\r\n{\r\n const fallbackFilter: Filter = {\r\n filter: \"\",\r\n disableBackgroundColor: false,\r\n opacity: 1,\r\n };\r\n\r\n function generateFilter(\r\n filterPart?: string | FilterPart,\r\n defaultFallbackFilter = fallbackFilter\r\n ): Filter | undefined {\r\n if (filterPart === undefined) return undefined;\r\n return typeof filterPart == \"string\"\r\n ? {\r\n ...defaultFallbackFilter,\r\n filter: filterPart,\r\n }\r\n : {\r\n ...defaultFallbackFilter,\r\n ...filterPart,\r\n };\r\n }\r\n\r\n const _filter = filter as {\r\n [key: string]: string | FilterPart | undefined;\r\n };\r\n filterMap.default = generateFilter(_filter.default);\r\n for (const key in _filter) {\r\n if (key == \"default\") continue;\r\n filterMap[key] = generateFilter(\r\n _filter[key],\r\n filterMap.default ?? fallbackFilter\r\n );\r\n }\r\n}\r\n\r\ncolorVarList.forEach(entry => {\r\n const filter = filterMap[entry[0]] ?? filterMap.default;\r\n if (filter === undefined) return;\r\n registerColorVar(entry[1], filter.opacity, entry[3]);\r\n const filterStr = filter.filter.replaceAll(\"{key}\", entry[0]);\r\n fgtSheet.insertRule(css` ${entry[2]} { backdrop-filter: ${filterStr}; background-color: ${filter.disableBackgroundColor\r\n ? \"transparent\"\r\n : `var(${entry[1]})`} !important; } `);\r\n});\r\n\r\nexport async function applyBackdropFilter(element: HTMLElement) {\r\n for (const entry of colorVarList) {\r\n const wrapper = document.createElement(\"div\");\r\n wrapper.style.setProperty(\"--fgt-current-background\", `var(${entry[1]})`);\r\n await mountSvgTo(wrapper, true);\r\n wrapper\r\n .querySelectorAll(\"filter\")\r\n .forEach(f => (f.id = f.id + \"-\" + entry[0]));\r\n element.appendChild(wrapper);\r\n }\r\n}\r\n\r\nexport function applyBackdropFilterOnMenu(element: Node & ParentNode) {\r\n const wrapper = document.createElement(\"div\");\r\n wrapper.style.setProperty(\r\n \"--fgt-current-background\",\r\n \"var(--vscode-menu-background)\"\r\n );\r\n mountSvgTo(wrapper, true);\r\n wrapper.querySelectorAll(\"filter\").forEach(f => (f.id = f.id + \"-menu\"));\r\n element.appendChild(wrapper);\r\n}\r\n", "export function isHTMLElement(a: T): a is HTMLElement & T {\r\n return a && a instanceof HTMLElement;\r\n}\r\n\r\nexport function isHTMLElementWithClass(\r\n a: T,\r\n className: string\r\n): a is HTMLElement & T {\r\n return isHTMLElement(a) && a.classList.contains(className);\r\n}\r\n\r\nexport function isKeyInObject(\r\n key: PropertyKey,\r\n obj: T\r\n): key is keyof T {\r\n return obj.hasOwnProperty(key);\r\n}\r\n\r\nlet scriptFolder: string | undefined = undefined;\r\nexport function getScriptFolder() {\r\n if (scriptFolder) return scriptFolder;\r\n const scriptPath = import.meta.url;\r\n return (scriptFolder = scriptPath.substring(\r\n 0,\r\n scriptPath.lastIndexOf(\"/\") + 1\r\n ));\r\n}\r\n\r\nexport function makeAbsolutePath(url: string) {\r\n return url.startsWith(\".\") || url.startsWith(\"..\")\r\n ? getScriptFolder() + url\r\n : `vscode-file://vscode-app/${url}`;\r\n}\r\n\r\nexport function getRelativePos(element: HTMLElement, e: MouseEvent) {\r\n const offset = element.getBoundingClientRect();\r\n const x = e.pageX - offset.left - window.scrollX;\r\n const y = e.pageY - offset.top - window.scrollY;\r\n return [x, y];\r\n}\r\n\r\nexport const css = (sa: TemplateStringsArray, ...args: any[]) =>\r\n sa.reduce((acc, cur, i) => {\r\n const arg = args[i];\r\n return arg ? acc + cur + arg : acc + cur;\r\n }, \"\");\r\n\r\nlet chromeMainVersion: number | undefined = undefined;\r\nexport function getChromeMainVersion() {\r\n const mainVerStr = vscode.process.versions.chrome.match(/^\\d+/)?.[0];\r\n return (chromeMainVersion = mainVerStr ? parseInt(mainVerStr, 10) : 0);\r\n}\r\n", "import { makeAbsolutePath } from \"./utils\";\r\n\r\ndeclare const trustedTypes: any;\r\n\r\nconst ttp = trustedTypes.createPolicy(\"fgtSvg\", {\r\n createHTML(html: any) {\r\n return html;\r\n },\r\n\r\n createScriptURL(scriptUrl: any) {\r\n return scriptUrl;\r\n },\r\n});\r\n\r\nexport function loadSvgs(svgList: string[]) {\r\n let fetchList = [];\r\n for (const svg of svgList) {\r\n fetchList.push(fetch(makeAbsolutePath(svg)));\r\n }\r\n return async function mountSvgTo(\r\n element: Node & ParentNode,\r\n copy: boolean = false\r\n ) {\r\n let _this = mountSvgTo as typeof mountSvgTo & { svgs?: Node[] };\r\n let justCreated = false;\r\n if (!_this.svgs) {\r\n justCreated = true;\r\n _this.svgs = [];\r\n for (const res of await Promise.all(fetchList)) {\r\n const svgStr = await res.text();\r\n const svg = new DOMParser()\r\n .parseFromString(ttp.createHTML(svgStr), \"text/xml\")\r\n .querySelector(\"svg\");\r\n if (!svg) throw res.url + \" does not contain a valid svg!\";\r\n svg.style.position = \"absolute\";\r\n svg.style.width = \"0px\";\r\n svg.style.height = \"0px\";\r\n svg.style.colorInterpolation = \"srgb\";\r\n svg.style.colorInterpolationFilters = \"srgb\";\r\n _this.svgs.push(svg);\r\n }\r\n }\r\n if (copy || !justCreated)\r\n for (const svg of _this.svgs) element.appendChild(svg.cloneNode(true));\r\n else element.append(..._this.svgs);\r\n };\r\n}\r\n", "import config from \"./config.json\" with { type: \"json\" };\r\n\r\nconst { opacity } = config;\r\n\r\nconst colorVarList: [string, number, string?][] = [\r\n [\"--vscode-menu-selectionBackground\", opacity.selection],\r\n [\"--vscode-quickInputList-focusBackground\", opacity.selection],\r\n [\"--vscode-editorSuggestWidget-selectedBackground\", opacity.selection],\r\n [\"--vscode-menu-border\", opacity.border],\r\n [\"--vscode-widget-border\", opacity.border],\r\n [\"--vscode-editorWidget-border\", opacity.border],\r\n [\"--vscode-editorHoverWidget-border\", opacity.border],\r\n [\"--vscode-editorSuggestWidget-border\", opacity.border],\r\n [\"--vscode-menu-separatorBackground\", opacity.separator],\r\n];\r\n\r\nexport function registerColorVar(\r\n colorVar: string,\r\n opacity: number,\r\n newColorVar?: string\r\n) {\r\n colorVarList.push([colorVar, opacity, newColorVar]);\r\n}\r\n\r\nexport function observeThemeColorChange(monacoWorkbench: HTMLElement) {\r\n const document = monacoWorkbench.ownerDocument;\r\n\r\n const contributedColorTheme = document.querySelector(\r\n \"head > style.contributedColorTheme\"\r\n );\r\n if (!contributedColorTheme) return;\r\n\r\n setupColor(monacoWorkbench, contributedColorTheme);\r\n const observer = new MutationObserver(\r\n setupColor.bind(globalThis, monacoWorkbench, contributedColorTheme)\r\n );\r\n observer.observe(contributedColorTheme, {\r\n characterData: false,\r\n attributes: false,\r\n childList: true,\r\n subtree: false,\r\n });\r\n}\r\n\r\nfunction applyOpacity(color: string, opacity: number) {\r\n color = color.trim();\r\n if (color.startsWith(\"#\")) {\r\n const alpha = Math.round(opacity * 255).toString(16);\r\n return color.length === 7 ? color + alpha : color;\r\n }\r\n const data = color.slice(color.indexOf(\"(\") + 1, -1);\r\n if (color.startsWith(\"rgb\")) {\r\n const splits = data.split(\",\");\r\n if (splits.length >= 4) return color;\r\n const [red, green, blue] = splits.map(Number);\r\n return `rgba(${red}, ${green}, ${blue}, ${opacity})`;\r\n }\r\n if (color.startsWith(\"hsl\")) {\r\n const splits = data.split(\",\");\r\n if (splits.length >= 4) return color;\r\n const [hue, saturation, lightness] = splits.map(parseFloat);\r\n return `hsla(${hue}, ${saturation}%, ${lightness}%, ${opacity})`;\r\n }\r\n return color;\r\n}\r\n\r\nfunction findStyleSheetList(ownerNode: Element | null) {\r\n return Array.from(document.styleSheets).find(\r\n styleSheetList => styleSheetList.ownerNode === ownerNode\r\n );\r\n}\r\n\r\nfunction setupColor(monacoWorkbench: HTMLElement, ownerNode: Element) {\r\n const monacoWorkbenchCSSRule = findStyleSheetList(ownerNode)?.cssRules;\r\n if (!monacoWorkbenchCSSRule) return;\r\n\r\n const cssRule = monacoWorkbenchCSSRule[monacoWorkbenchCSSRule.length - 1];\r\n if (!(cssRule instanceof CSSStyleRule)) return;\r\n const cssStyle = cssRule.style;\r\n\r\n colorVarList.forEach(entry => {\r\n monacoWorkbench.style.setProperty(\r\n entry[2] ?? entry[0],\r\n applyOpacity(cssStyle.getPropertyValue(entry[0]), entry[1])\r\n );\r\n });\r\n}\r\n", "import {\r\n applyBackdropFilter,\r\n applyBackdropFilterOnMenu,\r\n} from \"./backdropFilter\";\r\nimport config from \"./config.json\" with { type: \"json\" };\r\nimport { applyEffect } from \"./effect/effect\";\r\nimport { applyFakeMica } from \"./fakeMica\";\r\nimport { fixContextMenu, fixMenu, fixMenuBar } from \"./fixMenu\";\r\nimport { loadSvgs } from \"./loadSvg\";\r\nimport { observeThemeColorChange } from \"./observeThemeColor\";\r\nimport { proxy, useHTMLElement, useRet } from \"./proxy\";\r\nimport { css, makeAbsolutePath } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nimport \"./animation\";\r\nimport \"./borderRadius\";\r\nimport \"./fixClipPath\";\r\nimport \"./miscellaneous\";\r\n\r\nconst { opacity } = config;\r\n\r\nfgtSheet.insertRule(css` [role=\"application\"] { --fgt-transition: ${config.transition}; --fgt-minimap-opacity: ${opacity.minimap * 100}%; } `);\r\n\r\nfor (const style of config.additionalStyle as string[]) {\r\n const styleElement = document.createElement(\"link\");\r\n styleElement.setAttribute(\"rel\", \"stylesheet\");\r\n styleElement.setAttribute(\"type\", \"text/css\");\r\n styleElement.setAttribute(\"href\", makeAbsolutePath(style));\r\n document.head.append(styleElement);\r\n}\r\n\r\nfunction insertVariables(cssSelector: string, variables: object) {\r\n fgtSheet.insertRule(css` ${cssSelector} { ${Object.entries(variables).reduce((total, pair) => {\r\n const [key, value] = pair;\r\n return total + `--${key}: ${value};`;\r\n }, \"\")} } `);\r\n}\r\n\r\ninsertVariables('[role=\"application\"]', config.variable);\r\ninsertVariables(\r\n '[role=\"application\"].vs-dark, [role=\"application\"].hc-black',\r\n config.variableDark\r\n);\r\n\r\ndocument.adoptedStyleSheets.push(fgtSheet);\r\n\r\nconst mountSvgTo = loadSvgs(config.svg);\r\n\r\nproxy(\r\n document.body,\r\n \"appendChild\",\r\n useHTMLElement(\"monaco-workbench\", monacoWorkbench => {\r\n observeThemeColorChange(monacoWorkbench);\r\n const svgMounted = mountSvgTo(monacoWorkbench);\r\n applyFakeMica(monacoWorkbench, svgMounted);\r\n applyBackdropFilter(monacoWorkbench);\r\n applyEffect(monacoWorkbench);\r\n proxy(\r\n monacoWorkbench,\r\n \"prepend\",\r\n useHTMLElement(\"monaco-grid-view\", fixMenuBar)\r\n );\r\n proxy(\r\n monacoWorkbench,\r\n \"appendChild\",\r\n useHTMLElement(\"context-view\", fixContextMenu)\r\n );\r\n })\r\n);\r\n\r\n// Fix menu which is wrapped into shadow dom\r\nproxy(\r\n Element.prototype,\r\n \"attachShadow\",\r\n useRet(shadowDom => {\r\n shadowDom.adoptedStyleSheets.push(\r\n ...shadowDom.ownerDocument.adoptedStyleSheets\r\n );\r\n applyBackdropFilterOnMenu(shadowDom);\r\n applyEffect(shadowDom);\r\n proxy(\r\n shadowDom,\r\n \"appendChild\",\r\n useHTMLElement(\"monaco-menu-container\", fixMenu)\r\n );\r\n return shadowDom;\r\n })\r\n);\r\n\r\n// Fix floating window\r\nproxy(\r\n window,\r\n \"open\",\r\n useRet(newWindow => {\r\n if (!newWindow) return newWindow;\r\n const global = newWindow as Window & typeof globalThis;\r\n const newDocument = newWindow.document;\r\n const sheet = new global.CSSStyleSheet();\r\n for (let i = 0; i < fgtSheet.cssRules.length; i++) {\r\n sheet.insertRule(fgtSheet.cssRules[i].cssText);\r\n }\r\n newDocument.adoptedStyleSheets.push(sheet);\r\n proxy(\r\n newDocument.body,\r\n \"append\",\r\n useHTMLElement(null, monacoWorkbench => {\r\n observeThemeColorChange(monacoWorkbench);\r\n const svgMounted = mountSvgTo(monacoWorkbench);\r\n applyFakeMica(monacoWorkbench, svgMounted);\r\n applyBackdropFilter(monacoWorkbench);\r\n applyEffect(monacoWorkbench);\r\n })\r\n );\r\n return newWindow;\r\n })\r\n);\r\n", "import config from \"../config.json\" with { type: \"json\" };\r\nimport globalExport from \"../globalExport\";\r\nimport { css, isKeyInObject } from \"../utils\";\r\nimport fgtSheet from \"../vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\nimport { applyFlipEffect } from \"./flipEffect\";\r\nimport { applyRevealEffect } from \"./revealEffect\";\r\n\r\nconst {\r\n effect: { extendMenuFocusBackground, disableForDisabledItem },\r\n} = config;\r\n\r\nconst _extendMenuFocusBackground = extendMenuFocusBackground as\r\n | boolean\r\n | string;\r\n\r\nconst effectMap: Record void> = {\r\n \"fgt-revealEffect\": applyRevealEffect,\r\n \"fgt-flipEffect\": applyFlipEffect,\r\n};\r\n\r\nfor (const key in effectMap) {\r\n fgtSheet.insertRule(css` @keyframes ${key} { } `);\r\n}\r\n\r\n// Export the register function so you can add your own effect\r\nglobalExport.registerEffect = (key: string, func: (e: Element) => void) => {\r\n effectMap[key] = func;\r\n fgtSheet.insertRule(css` @keyframes ${key} { } `);\r\n};\r\n\r\nif (_extendMenuFocusBackground) {\r\n fgtSheet.insertRule(css` .monaco-menu-container ul.actions-container > li > a.action-menu-item { background-color: transparent !important; outline: none !important; } `);\r\n fgtSheet.insertRule(css` .monaco-menu-container ul.actions-container .action-item.focused { background-color: ${_extendMenuFocusBackground === true\r\n ? \"var(--vscode-menu-selectionBackground)\"\r\n : _extendMenuFocusBackground}; } `);\r\n}\r\n\r\nexport function applyEffect(element: HTMLElement | ShadowRoot) {\r\n element.addEventListener(\"animationstart\", (e: Event | AnimationEvent) => {\r\n if (!(\"animationName\" in e)) return;\r\n if (!(e.target instanceof Element)) return;\r\n if (disableForDisabledItem && e.target.classList.contains(\"disabled\"))\r\n return;\r\n if (isKeyInObject(e.animationName, effectMap))\r\n effectMap[e.animationName](e.target);\r\n });\r\n}\r\n", "declare global {\r\n interface Window {\r\n _fgtTheme: Record;\r\n }\r\n}\r\n\r\nwindow._fgtTheme = Object.create(null);\r\nexport default window._fgtTheme;\r\n", "import config from \"../config.json\" with { type: \"json\" };\r\nimport { getRelativePos, isHTMLElement } from \"../utils\";\r\n\r\nconst {\r\n effect: { flipEffect },\r\n} = config;\r\n\r\nconst reducedDistanceFunc = new Function(\r\n \"radius\",\r\n '\"use strict\";return ' + flipEffect.reducedDistanceFunc\r\n) as (radius: number) => number;\r\n\r\nfunction positiveRoot(a: number, b: number, c: number) {\r\n return (-b + Math.sqrt(b * b - 4 * a * c)) / (2 * a);\r\n}\r\n\r\n// p: perspective\r\n// r: radius\r\n// d: reduced distance = reducedPercentage * radius;\r\n// z = adjacent * p / (r - d) - p - opposite\r\n// when z = 0, let a = r - d, c is cos\\theta, solve (p^2r^2/a^2 + r^2)c^2 - 2p^2rc/a + p^2 - r^2\r\nfunction transform(element: HTMLElement, e: MouseEvent) {\r\n const mouse = getRelativePos(element, e);\r\n const rect = element.getBoundingClientRect();\r\n const center = [rect.width / 2, rect.height / 2];\r\n const vector = [center[0] - mouse[0], center[1] - mouse[1]];\r\n const axis = [vector[1], -vector[0]];\r\n const rS = (rect.width * rect.width + rect.height * rect.height) / 4;\r\n const radius = Math.sqrt(rS);\r\n const distance = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]);\r\n const p = (flipEffect.perspective * 96) / 2.54;\r\n const d = reducedDistanceFunc(radius);\r\n const a = radius - d; // remain distance\r\n const adjacent =\r\n radius -\r\n (1 -\r\n positiveRoot(\r\n ((p * p) / (a * a) + 1) * rS,\r\n -(2 * p * p * radius) / a,\r\n p * p - rS\r\n )) *\r\n distance;\r\n const degreeInRadius = Math.acos(adjacent / radius);\r\n const opposite = Math.sin(degreeInRadius) * radius;\r\n const z = (adjacent * p) / (radius - d) - p - opposite;\r\n const perspective = `perspective(${flipEffect.perspective}cm)`;\r\n const rotate3d = `rotate3d(${axis[0]}, ${axis[1]}, 0, ${(degreeInRadius * 180) / Math.PI}deg)`;\r\n const translateZ = `translateZ(-${z}px)`;\r\n element.style.transform = `${perspective} ${translateZ} ${rotate3d}`;\r\n}\r\n\r\nexport function applyFlipEffect(\r\n element: Element & {\r\n _appliedFlipEffect?: boolean;\r\n }\r\n) {\r\n if (element._appliedFlipEffect || !isHTMLElement(element)) return;\r\n\r\n const oriTransform = element.style.transform;\r\n\r\n let isPressed = false;\r\n element.style.transition = \"transform \" + flipEffect.transition;\r\n element.addEventListener(\"mousedown\", e => {\r\n isPressed = true;\r\n transform(element, e);\r\n });\r\n\r\n element.addEventListener(\"mousemove\", e => {\r\n if (isPressed) transform(element, e);\r\n });\r\n\r\n element.addEventListener(\"mouseup\", () => {\r\n isPressed = false;\r\n element.style.transform = oriTransform;\r\n });\r\n element.addEventListener(\"mouseleave\", () => {\r\n isPressed = false;\r\n element.style.transform = oriTransform;\r\n });\r\n\r\n element._appliedFlipEffect = true;\r\n}\r\n", "import config from \"../config.json\" with { type: \"json\" };\r\nimport { getRelativePos, isHTMLElement } from \"../utils\";\r\n\r\nconst {\r\n effect: { revealEffect },\r\n} = config;\r\n\r\nfunction getSize(element: HTMLElement, pxOrPer: number | string) {\r\n if (typeof pxOrPer == \"number\") return pxOrPer;\r\n else if (pxOrPer.endsWith(\"%\")) {\r\n const rect = element.getBoundingClientRect();\r\n return (\r\n (Math.max(rect.width, rect.height) *\r\n Number.parseFloat(pxOrPer.substring(0, pxOrPer.length - 1))) /\r\n 100\r\n );\r\n } else return Number.parseFloat(pxOrPer);\r\n}\r\n\r\nfunction lightHoverEffect(x: number, y: number, size: number) {\r\n return `radial-gradient(circle ${size}px at ${x}px ${y}px, ${revealEffect.lightColor}, transparent)`;\r\n}\r\n\r\nfunction lightClickEffect(\r\n x: number,\r\n y: number,\r\n size: number,\r\n lightColor: string\r\n) {\r\n return `radial-gradient(circle ${size}px at ${x}px ${y}px, transparent, ${lightColor}, transparent)`;\r\n}\r\n\r\nfunction startClickAnimation(\r\n element: HTMLElement & {\r\n _revealEffectAnimation?: number;\r\n _revealEffectHover?: string;\r\n },\r\n e: MouseEvent\r\n) {\r\n if (element._revealEffectAnimation)\r\n cancelAnimationFrame(element._revealEffectAnimation);\r\n\r\n const [x, y] = getRelativePos(element, e);\r\n const speed = revealEffect.clickEffect.speed;\r\n const startSize = getSize(element, revealEffect.clickEffect.size);\r\n const duration = revealEffect.clickEffect.duration;\r\n const distance = duration * speed;\r\n\r\n let start: DOMHighResTimeStamp | undefined;\r\n function step(time: DOMHighResTimeStamp) {\r\n if (start === undefined) start = time;\r\n const elapsed = time - start;\r\n const hoverEffect = element._revealEffectHover;\r\n if (elapsed < duration) {\r\n const percentage = elapsed / duration;\r\n element.style.backgroundImage =\r\n hoverEffect +\r\n \", \" +\r\n lightClickEffect(\r\n x,\r\n y,\r\n distance * percentage + startSize,\r\n `color-mix(in srgb, ${revealEffect.lightColor}, transparent ${percentage * 100}%)`\r\n );\r\n element._revealEffectAnimation = requestAnimationFrame(step);\r\n } else {\r\n element.style.backgroundImage = hoverEffect ?? \"\";\r\n element._revealEffectAnimation = undefined;\r\n }\r\n }\r\n element._revealEffectAnimation = requestAnimationFrame(step);\r\n}\r\n\r\nexport function applyRevealEffect(\r\n element: Element & {\r\n _appliedRevealEffect?: boolean;\r\n _revealEffectHover?: string;\r\n _revealEffectAnimation?: number;\r\n }\r\n) {\r\n if (element._appliedRevealEffect || !isHTMLElement(element)) return;\r\n\r\n const oriBackground = element.style.backgroundImage;\r\n\r\n element.addEventListener(\"mousemove\", e => {\r\n const [x, y] = getRelativePos(element, e);\r\n const hoverEffect = lightHoverEffect(\r\n x,\r\n y,\r\n getSize(element, revealEffect.gradientSize)\r\n );\r\n if (!element._revealEffectAnimation)\r\n element.style.backgroundImage = hoverEffect;\r\n else element._revealEffectHover = hoverEffect;\r\n });\r\n element.addEventListener(\"mouseleave\", () => {\r\n element.style.backgroundImage = oriBackground;\r\n element._revealEffectHover = oriBackground;\r\n });\r\n\r\n if (revealEffect.clickEffect && !element.classList.contains(\"disabled\")) {\r\n element.addEventListener(\"mousedown\", e => {\r\n element._revealEffectHover = element.style.backgroundImage;\r\n startClickAnimation(element, e);\r\n });\r\n }\r\n\r\n element._appliedRevealEffect = true;\r\n}\r\n", "import config from \"./config.json\" with { type: \"json\" };\r\nimport { css } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nconst { fakeMica } = config;\r\n\r\nif (fakeMica.enabled) {\r\n fgtSheet.insertRule(css` [role=\"application\"]::before { content: \"\"; display: block; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; } `);\r\n\r\n fgtSheet.insertRule(css` .fgt-mica-svg-loaded::before { filter: ${fakeMica.filter}; background: url(\"vscode-file://vscode-app/${fakeMica.url}\") ${fakeMica.position}; } `);\r\n\r\n // Fix list background\r\n fgtSheet.insertRule(css` .monaco-list-rows { background-color: transparent !important; } `);\r\n\r\n // Fix settings row background\r\n fgtSheet.insertRule(css` .settings-body .monaco-list-row { background-color: transparent !important; } `);\r\n\r\n if (fakeMica.titlebarFix) {\r\n fgtSheet.insertRule(css` .part.titlebar { background-color: color-mix( in srgb, var(--vscode-titleBar-activeBackground) ${fakeMica.titlebarFix * 100}%, transparent ) !important; } `);\r\n }\r\n\r\n if (fakeMica.editorBackgroundFix) {\r\n fgtSheet.insertRule(css` .content, .monaco-editor, .monaco-editor-background, .view-overlays .selected-text:has(+ .monaco-editor-background) { background-color: transparent !important; } `);\r\n fgtSheet.insertRule(css` .editor-group-container.empty { background-color: var(--vscode-editor-background); } `);\r\n // VScode puts a top margin so that there will be a gap on the top.\r\n // Fix it by replacing with padding.\r\n fgtSheet.insertRule(css` .profiles-editor { margin: 0 auto 0 !important; padding-top: 20px; } `);\r\n }\r\n}\r\n\r\nexport async function applyFakeMica(\r\n element: HTMLElement,\r\n svgMounted: Promise\r\n) {\r\n if (fakeMica.enabled) {\r\n await svgMounted;\r\n element.classList.add(\"fgt-mica-svg-loaded\");\r\n }\r\n}\r\n", "import { isHTMLElement } from \"./utils\";\r\n\r\ntype AnyFunction = (this: any, ...args: any) => unknown;\r\n\r\ntype NewFunc = OldFunc extends (\r\n this: infer This,\r\n ...args: infer Args\r\n) => infer Ret\r\n ? (this: This, oldFunc: OmitThisParameter, ...args: Args) => Ret\r\n : never;\r\n\r\n// Proxy function on src\r\nexport function proxy<\r\n Src extends Record<\r\n FuncName,\r\n AnyFunction & {\r\n _proxied?: boolean;\r\n }\r\n >,\r\n FuncName extends string,\r\n>(src: Src, funcName: FuncName, newFunc: NewFunc) {\r\n if (!src[funcName] || src[funcName]._proxied) return;\r\n const oldFunc = src[funcName];\r\n src[funcName] = function (\r\n this: ThisParameterType,\r\n ...args: Parameters\r\n ) {\r\n return newFunc.call(this, oldFunc.bind(this), ...args);\r\n } as Src[FuncName];\r\n src[funcName]._proxied = true;\r\n}\r\n\r\nexport function proxyAll<\r\n Src extends Record,\r\n FuncNames extends string,\r\n>(src: Src, funcNames: FuncNames[], newFunc: NewFunc) {\r\n for (const funcName of funcNames) proxy(src, funcName, newFunc);\r\n}\r\n\r\nexport function useRet(\r\n f: (this: This, oldRet: Ret, ...args: Args) => Ret\r\n) {\r\n return function (this: This, oldFunc: (...args: any) => Ret, ...args: Args) {\r\n return f.call(this, oldFunc(...args), ...args);\r\n };\r\n}\r\n\r\nexport function useArgs(\r\n f: (this: This, ...args: Args) => void\r\n) {\r\n return function (\r\n this: This,\r\n oldFunc: OldFunc,\r\n ...args: Args\r\n ) {\r\n f.call(this, ...args);\r\n return oldFunc(...args) as ReturnType;\r\n };\r\n}\r\n\r\nexport function useHTMLElement(\r\n className: string | null,\r\n f: (this: This, e: HTMLElement, ...args: Args) => void\r\n) {\r\n return function (\r\n this: This,\r\n oldFunc: OldFunc,\r\n e: unknown,\r\n ...args: Args\r\n ) {\r\n isHTMLElement(e) &&\r\n (className === null || e.classList.contains(className)) &&\r\n f.call(this, e, ...args);\r\n return oldFunc(e, ...args) as ReturnType;\r\n };\r\n}\r\n\r\nexport function applyAndProxy(\r\n parent: Element &\r\n Record unknown>,\r\n className: string,\r\n funcName: FunNames | FunNames[],\r\n func: (e: Element, ...args: any[]) => void\r\n) {\r\n const e = parent.querySelector(\"div.\" + className);\r\n if (e) func(e);\r\n const newFunc = useHTMLElement(className, func) as NewFunc<\r\n (typeof parent)[FunNames]\r\n >;\r\n if (funcName instanceof Array) proxyAll(parent, funcName, newFunc);\r\n else proxy(parent, funcName, newFunc);\r\n}\r\n", "import { applyAndProxy, proxy, proxyAll, useArgs, useRet } from \"./proxy\";\r\nimport { isHTMLElement } from \"./utils\";\r\n\r\n// `position: fixed` will be invalid if `backdrop-filter` or `transform` is set on ancestor.\r\n// 1. Clone and replace the `div.monaco-action-bar` to keep the layout and style things.\r\n// 2. Move the original `div.monaco-action-bar` with event listeners to top level and remove any styles.\r\n// 3. Move sub menu below `div.monaco-action-bar` to avoid those properties being present on the ancestors.\r\nexport function fixMenu(menuContainer?: string | Node) {\r\n if (!isHTMLElement(menuContainer)) return;\r\n\r\n proxy(menuContainer, \"appendChild\", (oldFunc, e) =>\r\n oldFunc(\r\n isHTMLElement(e) && e.classList.contains(\"monaco-scrollable-element\")\r\n ? fix(e)\r\n : e\r\n )\r\n );\r\n\r\n function moveSubMenu(\r\n src: HTMLElement & { _subMenu?: Node },\r\n parent: Element\r\n ) {\r\n function fixSubMenu(\r\n subMenu: NodeType & { _fixedSubMenu?: boolean }\r\n ) {\r\n if (!isHTMLElement(subMenu) || subMenu._fixedSubMenu) return subMenu;\r\n\r\n // https://github.com/microsoft/vscode/blob/5cd507ba17ec7a0d8a822c35bfcde8eca33de861/src/vs/base/browser/dom.ts#L581\r\n // Fake parent, thus `dom.isAncestor` will always return `true`\r\n Object.defineProperty(subMenu, \"parentNode\", {\r\n get() {\r\n return src;\r\n },\r\n });\r\n // https://github.com/microsoft/vscode/blob/3e452bfef11522d0151fd2e884bb8bf869d7d2fa/src/vs/base/browser/dom.ts#L632\r\n // Change since vscode 1.84.0\r\n src._subMenu = subMenu;\r\n proxy(\r\n src,\r\n \"contains\",\r\n useRet(\r\n (ret, e) =>\r\n ret || src._subMenu === e || (src._subMenu?.contains(e) ?? false)\r\n )\r\n );\r\n // If submenu loses focus, dispatch to `
  • `\r\n subMenu.addEventListener(\"focusout\", e =>\r\n setTimeout(() =>\r\n src.dispatchEvent(new Event(e.type, { ...e, bubbles: false }))\r\n )\r\n );\r\n // Recursively fix new menu\r\n fixMenu(subMenu);\r\n\r\n subMenu._fixedSubMenu = true;\r\n return subMenu;\r\n }\r\n\r\n src.append = e => parent.append(fixSubMenu(e));\r\n src.removeChild = e => parent.removeChild(e);\r\n src.replaceChild = (e, e2) => parent.replaceChild(fixSubMenu(e), e2);\r\n }\r\n\r\n function fix(scrollableElement: Node) {\r\n if (!isHTMLElement(scrollableElement)) return scrollableElement;\r\n\r\n const actionBar = scrollableElement.querySelector(\"div.monaco-action-bar\");\r\n if (!actionBar) return scrollableElement;\r\n\r\n const clone = actionBar.cloneNode();\r\n for (const child of Array.from(actionBar.children)) {\r\n clone.appendChild(child);\r\n }\r\n actionBar.parentNode?.replaceChild(clone, actionBar);\r\n\r\n actionBar.className = \"\";\r\n actionBar.appendChild(scrollableElement);\r\n actionBar\r\n .querySelectorAll(\r\n \"ul.actions-container > li:has(> .monaco-submenu-item)\"\r\n )\r\n .forEach(menuItem => moveSubMenu(menuItem, actionBar));\r\n return actionBar;\r\n }\r\n}\r\n\r\n// Fix top bar menu\r\nexport function fixMenuBar(gridView: HTMLElement) {\r\n const fixMenuButton = (menu?: string | Node) => {\r\n if (!isHTMLElement(menu)) return;\r\n proxyAll(menu, [\"append\", \"appendChild\"], useArgs(fixMenu));\r\n };\r\n // Classic\r\n {\r\n const titlebar = gridView.querySelector(\r\n \"#workbench\\\\.parts\\\\.titlebar > div > div.titlebar-left\"\r\n );\r\n if (!titlebar) return;\r\n applyAndProxy(titlebar, \"menubar\", \"append\", (menuBar: Element) => {\r\n const menus = menuBar.querySelectorAll(\"div.menubar-menu-button\");\r\n menus.forEach(fixMenuButton);\r\n proxyAll(\r\n menuBar,\r\n [\"append\", \"appendChild\", \"insertBefore\"],\r\n useArgs(fixMenuButton)\r\n );\r\n });\r\n }\r\n // Compact\r\n function fixCompat(container: Element | null) {\r\n if (!container) return;\r\n applyAndProxy(container, \"menubar\", \"prepend\", (menuBar: Element) => {\r\n applyAndProxy(\r\n menuBar,\r\n \"menubar-menu-button\",\r\n \"appendChild\",\r\n fixMenuButton\r\n );\r\n });\r\n }\r\n fixCompat(\r\n gridView.querySelector(\"#workbench\\\\.parts\\\\.activitybar > div.content\")\r\n );\r\n const sidebar = gridView.querySelector(\"#workbench\\\\.parts\\\\.sidebar\");\r\n if (sidebar)\r\n applyAndProxy(\r\n sidebar,\r\n \"composite\",\r\n [\"insertBefore\", \"appendChild\"],\r\n (composite: Element) =>\r\n fixCompat(composite.querySelector(\"div.composite-bar-container\"))\r\n );\r\n}\r\n\r\nexport const fixContextMenu = fixMenu;\r\n", "import config from \"./config.json\" with { type: \"json\" };\r\nimport { css, isKeyInObject } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nconst { animation } = config;\r\n\r\nconst selectorMap = {\r\n menu: \".monaco-menu-container .monaco-scrollable-element, .action-widget, .monaco-breadcrumbs-picker, .quick-input-widget\",\r\n dialog: \".dialog-shadow\",\r\n dropdown: \".monaco-select-box-dropdown-container\",\r\n hover: \".monaco-hover\",\r\n notificationCenter: \".notifications-center, .notification-toast\",\r\n notificationCenterHeader: \".notifications-center-header\",\r\n notification: \".notifications-list-container .monaco-list-row\",\r\n menuItem:\r\n \".monaco-menu-container ul > li.action-item:not(:has(> a.separator))\",\r\n actionMenuItem:\r\n \".monaco-menu-container ul > li > a.action-menu-item:not(.separator)\",\r\n button: \".monaco-button\",\r\n iconActionLabel:\r\n \":not(.activitybar, .composite-bar) > .monaco-action-bar .action-label.codicon\",\r\n tab: \".tabs-container > .tab\",\r\n listItem:\r\n \":not(.settings-tree-container, .notifications-list-container, .profile-tree) > .monaco-list .monaco-list-row\",\r\n statusbarItem:\r\n \".statusbar-item:not(.has-background-color) > .statusbar-item-label, .statusbar-item.has-background-color\",\r\n activitybarItem: \".activitybar li.action-item:not(:has(> a.separator))\",\r\n compositeBarItem:\r\n \".pane-composite-part .composite-bar li.action-item:not(:has(> a.separator))\",\r\n commandCenter: \".command-center-center\",\r\n menubarTitle: \".menubar-menu-title\",\r\n settingsTreeItem:\r\n \".settings-tree-container .monaco-list-rows .settings-row-inner-container\",\r\n};\r\n\r\nfor (const key in animation) {\r\n const value = animation[key as keyof typeof animation];\r\n if (value.length != 0)\r\n fgtSheet.insertRule(css` ${isKeyInObject(key, selectorMap) ? selectorMap[key] : key} { animation: ${value}; } `);\r\n}\r\n", "import config from \"./config.json\" with { type: \"json\" };\r\nimport { css, isKeyInObject } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nconst { borderRadius } = config;\r\n\r\nconst selectorMap = {\r\n menuItem:\r\n \".monaco-menu-container ul.actions-container > li > a.action-menu-item\",\r\n menu: \".monaco-menu-container .monaco-scrollable-element\",\r\n suggestWidget: \".editor-widget.suggest-widget\",\r\n tab: \".tab\",\r\n};\r\n\r\nfor (const key in borderRadius) {\r\n const value = borderRadius[key as keyof typeof borderRadius];\r\n if (value.length != 0)\r\n fgtSheet.insertRule(css` ${isKeyInObject(key, selectorMap) ? selectorMap[key] : key} { border-radius: ${value} !important; overflow: hidden; } `);\r\n}\r\n", "import { css, getChromeMainVersion } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nfunction polyfillClipPath(\r\n selector: string,\r\n clipPath: string,\r\n overflowClipMargin: string\r\n) {\r\n if (getChromeMainVersion() >= 128)\r\n fgtSheet.insertRule(css` ${selector} { clip-path: ${clipPath} !important; } `);\r\n else\r\n fgtSheet.insertRule(css` ${selector} { overflow: clip !important; overflow-clip-margin: ${overflowClipMargin} !important; } `);\r\n}\r\n\r\nfunction inset(top: number, unbound: boolean = false) {\r\n return `inset(${top}px ${unbound ? \"calc(-infinity * 1px) calc(-infinity * 1px))\" : \"0px 0px\"}`;\r\n}\r\n\r\n// Menu Animation\r\npolyfillClipPath(\r\n css`.monaco-menu-container, .context-view`,\r\n inset(-1, true),\r\n \"10px\"\r\n);\r\n\r\n// Dropdown Animation\r\npolyfillClipPath(css`.select-container > .context-view`, inset(0, true), \"0px\");\r\n\r\n// Panel Header\r\npolyfillClipPath(\r\n css`.pane-body, .pane-body .monaco-list > .monaco-scrollable-element`,\r\n inset(-22),\r\n \"22px\"\r\n);\r\n", "import config from \"./config.json\" with { type: \"json\" };\r\nimport { css } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nconst { miscellaneous } = config;\r\n\r\nif (miscellaneous.progressBarBehindSectionHeader) {\r\n fgtSheet.insertRule(css` .pane > .monaco-progress-container { height: 22px !important; top: 0px !important; } `);\r\n // `left: 1px` because of a weird flash\r\n fgtSheet.insertRule(css` .pane > .monaco-progress-container > .progress-bit { height: 22px !important; left: 1px !important; } `);\r\n} else {\r\n fgtSheet.insertRule(css` .pane > .monaco-progress-container { z-index: 20; } `);\r\n}\r\n\r\nif (miscellaneous.disableFocusOutline)\r\n fgtSheet.insertRule(css` .monaco-workbench [tabindex=\"-1\"]:focus, .monaco-workbench [tabindex=\"0\"]:focus, .monaco-workbench button:focus, .monaco-workbench input[type=\"button\"]:focus, .monaco-workbench input[type=\"checkbox\"]:focus, .monaco-workbench input[type=\"search\"]:focus, .monaco-workbench input[type=\"text\"]:focus, .monaco-workbench select:focus, .monaco-workbench textarea:focus, .monaco-list::before { outline: none !important; } `);\r\n"], - "mappings": "AAAA,OAAOA,OAAY,eAAgB,IAAK,CAAE,KAAM,MAAO,ECAhD,SAASC,EAAiBC,EAA4B,CAC3D,OAAOA,GAAKA,aAAa,WAC3B,CASO,SAASC,EACdC,EACAC,EACgB,CAChB,OAAOA,EAAI,eAAeD,CAAG,CAC/B,CAEA,IAAIE,EACG,SAASC,IAAkB,CAChC,GAAID,EAAc,OAAOA,EACzB,IAAME,EAAa,YAAY,IAC/B,OAAQF,EAAeE,EAAW,UAChC,EACAA,EAAW,YAAY,GAAG,EAAI,CAChC,CACF,CAEO,SAASC,EAAiBC,EAAa,CAC5C,OAAOA,EAAI,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CAAmC,IAAK,CAAE,KAAM,KAAM,EAE3E,GAAM,CAAE,OAAAC,GAAQ,QAAAC,EAAQ,EAAIC,GAEtBC,EAAaC,EAASH,EAAO,EAG7BI,EAAoD,CACxD,CACE,wBACA,6BACA,4CACA,wCACF,EACA,CACE,oBACA,wCACA,6DACF,EACA,CACE,sBACA,0CACA,iCACF,EACA,CACE,iBACA,qCACA,0BACF,EACA,CAAC,aAAc,iCAAkC,qBAAqB,EACtE,CACE,OACA,2BACA,mDACF,EACA,CACE,gBACA,oCACA,+BACF,EACA,CACE,2BACA,+CACA,8BACF,EACA,CAAC,QAAS,iDAAkD,eAAe,EAC3E,CACE,qBACA,yCACA,gBACF,EACA,CACE,mBACA,uCACA,4BACF,EACA,CACE,eACA,mCACA,6GACF,EACA,CACE,mBACA,uCACA,2CACF,EACA,CAAC,eAAgB,mCAAoC,gBAAgB,EACrE,CACE,sBACA,0CACA,gCACA,sCACF,EACA,CACE,mBACA,yCACA,sBACA,mCACF,EACA,CACE,SACA,sCACA,iIACF,EACA,CACE,uBACA,2CACA,uBACF,EACA,CACE,WACA,+BACA,+DACF,EAEA,CAAC,UAAW,oBAAqB,UAAU,EAC3C,CACE,2BACA,oBACA,0CACF,EACA,CAAC,kBAAmB,oBAAqB,gBAAgB,CAC3D,EAEAN,EAAS,WAAWO,6DAA+D,EASnF,IAAMC,EAEF,CAAC,EACL,CAOE,IAASC,EAAT,SACEC,EACAC,EAAwBC,EACJ,CACpB,GAAIF,IAAe,OACnB,OAAO,OAAOA,GAAc,SACxB,CACE,GAAGC,EACH,OAAQD,CACV,EACA,CACE,GAAGC,EACH,GAAGD,CACL,CACN,EAdSD,KANT,IAAMG,EAAyB,CAC7B,OAAQ,GACR,uBAAwB,GACxB,QAAS,CACX,EAkBMC,EAAUZ,GAGhBO,EAAU,QAAUC,EAAeI,EAAQ,OAAO,EAClD,QAAWC,KAAOD,EACZC,GAAO,YACXN,EAAUM,CAAG,EAAIL,EACfI,EAAQC,CAAG,EACXN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C,EAASd,EAAO,GAAG,EAEtCe,EACE,SAAS,KACT,cACAC,EAAe,mBAAoBC,GAAmB,CACpDC,EAAwBD,CAAe,EACvC,IAAME,EAAaN,GAAWI,CAAe,EAC7CG,EAAcH,EAAiBE,CAAU,EACzCE,EAAoBJ,CAAe,EACnCK,EAAYL,CAAe,EAC3BF,EACEE,EACA,UACAD,EAAe,mBAAoBO,EAAU,CAC/C,EACAR,EACEE,EACA,cACAD,EAAe,eAAgBQ,EAAc,CAC/C,CACF,CAAC,CACH,EAGAT,EACE,QAAQ,UACR,eACAU,EAAOC,IACLA,EAAU,mBAAmB,KAC3B,GAAGA,EAAU,cAAc,kBAC7B,EACAC,GAA0BD,CAAS,EACnCJ,EAAYI,CAAS,EACrBX,EACEW,EACA,cACAV,EAAe,wBAAyBY,CAAO,CACjD,EACOF,EACR,CACH,EAGAX,EACE,OACA,OACAU,EAAOI,GAAa,CAClB,GAAI,CAACA,EAAW,OAAOA,EACvB,IAAMC,EAASD,EACTE,EAAcF,EAAU,SACxBG,EAAQ,IAAIF,EAAO,cACzB,QAASG,EAAI,EAAGA,EAAIhC,EAAS,SAAS,OAAQgC,IAC5CD,EAAM,WAAW/B,EAAS,SAASgC,CAAC,EAAE,OAAO,EAE/C,OAAAF,EAAY,mBAAmB,KAAKC,CAAK,EACzCjB,EACEgB,EAAY,KACZ,SACAf,EAAe,KAAMC,GAAmB,CACtCC,EAAwBD,CAAe,EACvC,IAAME,EAAaN,GAAWI,CAAe,EAC7CG,EAAcH,EAAiBE,CAAU,EACzCE,EAAoBJ,CAAe,EACnCK,EAAYL,CAAe,CAC7B,CAAC,CACH,EACOY,CACT,CAAC,CACH", + "sourcesContent": ["import config from \"./config.json\" with { type: \"json\" };\r\nimport { loadSvgs } from \"./loadSvg\";\r\nimport { registerColorVar } from \"./observeThemeColor\";\r\nimport { css } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nconst { filter, tintSvg } = config;\r\n\r\nconst mountSvgTo = loadSvgs(tintSvg);\r\n\r\n// the item type is of [key, colorVar, cssSelector, newColorVar?]\r\nconst colorVarList: [string, string, string, string?][] = [\r\n [\r\n \"multiDiffEditorHeader\",\r\n \"--vscode-editor-background\",\r\n \".monaco-component.multiDiffEditor .header\",\r\n \"--fgt-multiDiffEditorHeader-background\",\r\n ],\r\n [\r\n \"editorHoverWidget\",\r\n \"--vscode-editorHoverWidget-background\",\r\n \".debug-hover-widget, .monaco-editor-overlaymessage .message\",\r\n ],\r\n [\r\n \"editorSuggestWidget\",\r\n \"--vscode-editorSuggestWidget-background\",\r\n \".monaco-editor .suggest-details\",\r\n ],\r\n [\r\n \"peekViewResult\",\r\n \"--vscode-peekViewResult-background\",\r\n \".monaco-tree-type-filter\",\r\n ],\r\n [\"quickInput\", \"--vscode-quickInput-background\", \".quick-input-widget\"],\r\n [\r\n \"menu\",\r\n \"--vscode-menu-background\",\r\n \".monaco-menu-container .monaco-scrollable-element\",\r\n ],\r\n [\r\n \"notifications\",\r\n \"--vscode-notifications-background\",\r\n \".notifications-list-container\",\r\n ],\r\n [\r\n \"notificationCenterHeader\",\r\n \"--vscode-notificationCenterHeader-background\",\r\n \".notifications-center-header\",\r\n ],\r\n [\"hover\", \"--vscode-editorHoverWidget-statusBarBackground\", \".monaco-hover\"],\r\n [\r\n \"editorStickyScroll\",\r\n \"--vscode-editorStickyScroll-background\",\r\n \".sticky-widget\",\r\n ],\r\n [\r\n \"listFilterWidget\",\r\n \"--vscode-listFilterWidget-background\",\r\n \".editor-widget.find-widget\",\r\n ],\r\n [\r\n \"editorWidget\",\r\n \"--vscode-editorWidget-background\",\r\n \".editor-widget, .simple-find-part, .monaco-dialog-box, .action-widget, .rename-box, .defineKeybindingWidget\",\r\n ],\r\n [\r\n \"breadcrumbPicker\",\r\n \"--vscode-breadcrumbPicker-background\",\r\n \".monaco-breadcrumbs-picker > :not(.arrow)\",\r\n ],\r\n [\"debugToolBar\", \"--vscode-debugToolBar-background\", \".debug-toolbar\"],\r\n [\r\n \"treeStickyContainer\",\r\n \"--vscode-sideBarStickyScroll-background\",\r\n \".monaco-tree-sticky-container\",\r\n \"--fgt-treeStickyContainer-background\",\r\n ],\r\n [\r\n \"cellTitleToolbar\",\r\n \"--vscode-editorStickyScroll-background\",\r\n \".cell-title-toolbar\",\r\n \"--fgt-cellTitleToolbar-background\",\r\n ],\r\n [\r\n \"slider\",\r\n \"--vscode-scrollbarSlider-background\",\r\n \".editor-scrollable > .scrollbar.horizontal > .slider, .monaco-scrollable-element:not(.editor-scrollable) > .scrollbar > .slider\",\r\n ],\r\n [\r\n \"sideBarSectionHeader\",\r\n \"--vscode-sideBarSectionHeader-background\",\r\n \".pane-header.expanded\",\r\n ],\r\n [\r\n \"dropdown\",\r\n \"--vscode-dropdown-background\",\r\n \".select-box-dropdown-list-container, .select-box-details-pane\",\r\n ],\r\n // Background color is embedded into canvas so can not remove\r\n [\"minimap\", \"--fgt-transparent\", \".minimap\"],\r\n [\r\n \"decorationsOverviewRuler\",\r\n \"--fgt-transparent\",\r\n \".monaco-editor .decorationsOverviewRuler\",\r\n ],\r\n [\"terminalOverlay\", \"--fgt-transparent\", \".hover-overlay\"],\r\n];\r\n\r\nfgtSheet.insertRule(css` [role=\"application\"] { --fgt-transparent: transparent; } `);\r\n\r\ntype Filter = {\r\n filter: string;\r\n disableBackgroundColor: boolean;\r\n opacity: number;\r\n};\r\ntype FilterPart = Partial;\r\n\r\nconst filterMap: {\r\n [key: string]: Filter | undefined;\r\n} = {};\r\n{\r\n const fallbackFilter: Filter = {\r\n filter: \"\",\r\n disableBackgroundColor: false,\r\n opacity: 1,\r\n };\r\n\r\n function generateFilter(\r\n filterPart?: string | FilterPart,\r\n defaultFallbackFilter = fallbackFilter\r\n ): Filter | undefined {\r\n if (filterPart === undefined) return undefined;\r\n return typeof filterPart == \"string\"\r\n ? {\r\n ...defaultFallbackFilter,\r\n filter: filterPart,\r\n }\r\n : {\r\n ...defaultFallbackFilter,\r\n ...filterPart,\r\n };\r\n }\r\n\r\n const _filter = filter as {\r\n [key: string]: string | FilterPart | undefined;\r\n };\r\n filterMap.default = generateFilter(_filter.default);\r\n for (const key in _filter) {\r\n if (key == \"default\") continue;\r\n filterMap[key] = generateFilter(\r\n _filter[key],\r\n filterMap.default ?? fallbackFilter\r\n );\r\n }\r\n}\r\n\r\ncolorVarList.forEach(entry => {\r\n const filter = filterMap[entry[0]] ?? filterMap.default;\r\n if (filter === undefined) return;\r\n registerColorVar(entry[1], filter.opacity, entry[3]);\r\n const filterStr = filter.filter.replaceAll(\"{key}\", entry[0]);\r\n fgtSheet.insertRule(css` ${entry[2]} { backdrop-filter: ${filterStr}; background-color: ${filter.disableBackgroundColor\r\n ? \"transparent\"\r\n : `var(${entry[1]})`} !important; } `);\r\n});\r\n\r\nexport async function applyBackdropFilter(element: HTMLElement) {\r\n for (const entry of colorVarList) {\r\n const wrapper = document.createElement(\"div\");\r\n wrapper.style.setProperty(\"--fgt-current-background\", `var(${entry[1]})`);\r\n await mountSvgTo(wrapper, true);\r\n wrapper\r\n .querySelectorAll(\"filter\")\r\n .forEach(f => (f.id = f.id + \"-\" + entry[0]));\r\n element.appendChild(wrapper);\r\n }\r\n}\r\n\r\nexport function applyBackdropFilterOnMenu(element: Node & ParentNode) {\r\n const wrapper = document.createElement(\"div\");\r\n wrapper.style.setProperty(\r\n \"--fgt-current-background\",\r\n \"var(--vscode-menu-background)\"\r\n );\r\n mountSvgTo(wrapper, true);\r\n wrapper.querySelectorAll(\"filter\").forEach(f => (f.id = f.id + \"-menu\"));\r\n element.appendChild(wrapper);\r\n}\r\n", "export function isHTMLElement(a: T): a is HTMLElement & T {\r\n return a && a instanceof HTMLElement;\r\n}\r\n\r\nexport function isHTMLElementWithClass(\r\n a: T,\r\n className: string\r\n): a is HTMLElement & T {\r\n return isHTMLElement(a) && a.classList.contains(className);\r\n}\r\n\r\nexport function isKeyInObject(\r\n key: PropertyKey,\r\n obj: T\r\n): key is keyof T {\r\n return obj.hasOwnProperty(key);\r\n}\r\n\r\nlet scriptFolder: string | undefined = undefined;\r\nexport function getScriptFolder() {\r\n if (scriptFolder) return scriptFolder;\r\n const scriptPath = import.meta.url;\r\n return (scriptFolder = scriptPath.substring(\r\n 0,\r\n scriptPath.lastIndexOf(\"/\") + 1\r\n ));\r\n}\r\n\r\nexport function makeAbsolutePath(url: string) {\r\n return url.startsWith(\".\") || url.startsWith(\"..\")\r\n ? getScriptFolder() + url\r\n : `vscode-file://vscode-app/${url}`;\r\n}\r\n\r\nexport function getRelativePos(element: HTMLElement, e: MouseEvent) {\r\n const offset = element.getBoundingClientRect();\r\n const x = e.pageX - offset.left - window.scrollX;\r\n const y = e.pageY - offset.top - window.scrollY;\r\n return [x, y];\r\n}\r\n\r\nexport const css = (sa: TemplateStringsArray, ...args: any[]) =>\r\n sa.reduce((acc, cur, i) => {\r\n const arg = args[i];\r\n return arg ? acc + cur + arg : acc + cur;\r\n }, \"\");\r\n\r\nlet chromeMainVersion: number | undefined = undefined;\r\nexport function getChromeMainVersion() {\r\n const mainVerStr = vscode.process.versions.chrome.match(/^\\d+/)?.[0];\r\n return (chromeMainVersion = mainVerStr ? parseInt(mainVerStr, 10) : 0);\r\n}\r\n", "import { makeAbsolutePath } from \"./utils\";\r\n\r\ndeclare const trustedTypes: any;\r\n\r\nconst ttp = trustedTypes.createPolicy(\"fgtSvg\", {\r\n createHTML(html: any) {\r\n return html;\r\n },\r\n\r\n createScriptURL(scriptUrl: any) {\r\n return scriptUrl;\r\n },\r\n});\r\n\r\nexport function loadSvgs(svgList: string[]) {\r\n let fetchList = [];\r\n for (const svg of svgList) {\r\n fetchList.push(fetch(makeAbsolutePath(svg)));\r\n }\r\n return async function mountSvgTo(\r\n element: Node & ParentNode,\r\n copy: boolean = false\r\n ) {\r\n let _this = mountSvgTo as typeof mountSvgTo & { svgs?: Node[] };\r\n let justCreated = false;\r\n if (!_this.svgs) {\r\n justCreated = true;\r\n _this.svgs = [];\r\n for (const res of await Promise.all(fetchList)) {\r\n const svgStr = await res.text();\r\n const svg = new DOMParser()\r\n .parseFromString(ttp.createHTML(svgStr), \"text/xml\")\r\n .querySelector(\"svg\");\r\n if (!svg) throw res.url + \" does not contain a valid svg!\";\r\n svg.style.position = \"absolute\";\r\n svg.style.width = \"0px\";\r\n svg.style.height = \"0px\";\r\n svg.style.colorInterpolation = \"srgb\";\r\n svg.style.colorInterpolationFilters = \"srgb\";\r\n _this.svgs.push(svg);\r\n }\r\n }\r\n if (copy || !justCreated)\r\n for (const svg of _this.svgs) element.appendChild(svg.cloneNode(true));\r\n else element.append(..._this.svgs);\r\n };\r\n}\r\n", "import config from \"./config.json\" with { type: \"json\" };\r\n\r\nconst { opacity } = config;\r\n\r\nconst colorVarList: [string, number, string?][] = [\r\n [\"--vscode-menu-selectionBackground\", opacity.selection],\r\n [\"--vscode-quickInputList-focusBackground\", opacity.selection],\r\n [\"--vscode-editorSuggestWidget-selectedBackground\", opacity.selection],\r\n [\"--vscode-menu-border\", opacity.border],\r\n [\"--vscode-widget-border\", opacity.border],\r\n [\"--vscode-editorWidget-border\", opacity.border],\r\n [\"--vscode-editorHoverWidget-border\", opacity.border],\r\n [\"--vscode-editorSuggestWidget-border\", opacity.border],\r\n [\"--vscode-menu-separatorBackground\", opacity.separator],\r\n];\r\n\r\nexport function registerColorVar(\r\n colorVar: string,\r\n opacity: number,\r\n newColorVar?: string\r\n) {\r\n colorVarList.push([colorVar, opacity, newColorVar]);\r\n}\r\n\r\nexport function observeThemeColorChange(monacoWorkbench: HTMLElement) {\r\n const document = monacoWorkbench.ownerDocument;\r\n\r\n const contributedColorTheme = document.querySelector(\r\n \"head > style.contributedColorTheme\"\r\n );\r\n if (!contributedColorTheme) return;\r\n\r\n setupColor(monacoWorkbench, contributedColorTheme);\r\n const observer = new MutationObserver(\r\n setupColor.bind(globalThis, monacoWorkbench, contributedColorTheme)\r\n );\r\n observer.observe(contributedColorTheme, {\r\n characterData: false,\r\n attributes: false,\r\n childList: true,\r\n subtree: false,\r\n });\r\n}\r\n\r\nfunction applyOpacity(color: string, opacity: number) {\r\n color = color.trim();\r\n if (color.startsWith(\"#\")) {\r\n const alpha = Math.round(opacity * 255).toString(16);\r\n return color.length === 7 ? color + alpha : color;\r\n }\r\n const data = color.slice(color.indexOf(\"(\") + 1, -1);\r\n if (color.startsWith(\"rgb\")) {\r\n const splits = data.split(\",\");\r\n if (splits.length >= 4) return color;\r\n const [red, green, blue] = splits.map(Number);\r\n return `rgba(${red}, ${green}, ${blue}, ${opacity})`;\r\n }\r\n if (color.startsWith(\"hsl\")) {\r\n const splits = data.split(\",\");\r\n if (splits.length >= 4) return color;\r\n const [hue, saturation, lightness] = splits.map(parseFloat);\r\n return `hsla(${hue}, ${saturation}%, ${lightness}%, ${opacity})`;\r\n }\r\n return color;\r\n}\r\n\r\nfunction findStyleSheetList(ownerNode: Element | null) {\r\n return Array.from(document.styleSheets).find(\r\n styleSheetList => styleSheetList.ownerNode === ownerNode\r\n );\r\n}\r\n\r\nfunction setupColor(monacoWorkbench: HTMLElement, ownerNode: Element) {\r\n const monacoWorkbenchCSSRule = findStyleSheetList(ownerNode)?.cssRules;\r\n if (!monacoWorkbenchCSSRule) return;\r\n\r\n const cssRule = monacoWorkbenchCSSRule[monacoWorkbenchCSSRule.length - 1];\r\n if (!(cssRule instanceof CSSStyleRule)) return;\r\n const cssStyle = cssRule.style;\r\n\r\n colorVarList.forEach(entry => {\r\n monacoWorkbench.style.setProperty(\r\n entry[2] ?? entry[0],\r\n applyOpacity(cssStyle.getPropertyValue(entry[0]), entry[1])\r\n );\r\n });\r\n}\r\n", "import {\r\n applyBackdropFilter,\r\n applyBackdropFilterOnMenu,\r\n} from \"./backdropFilter\";\r\nimport config from \"./config.json\" with { type: \"json\" };\r\nimport { applyEffect } from \"./effect/effect\";\r\nimport { applyFakeMica } from \"./fakeMica\";\r\nimport { fixContextMenu, fixMenu, fixMenuBar } from \"./fixMenu\";\r\nimport { loadSvgs } from \"./loadSvg\";\r\nimport { observeThemeColorChange } from \"./observeThemeColor\";\r\nimport { proxy, useHTMLElement, useRet } from \"./proxy\";\r\nimport { css, makeAbsolutePath } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nimport \"./animation\";\r\nimport \"./borderRadius\";\r\nimport \"./fixClipPath\";\r\nimport \"./miscellaneous\";\r\n\r\nconst { opacity } = config;\r\n\r\nfgtSheet.insertRule(css` [role=\"application\"] { --fgt-transition: ${config.transition}; --fgt-minimap-opacity: ${opacity.minimap * 100}%; } `);\r\n\r\nfor (const style of config.additionalStyle as string[]) {\r\n const styleElement = document.createElement(\"link\");\r\n styleElement.setAttribute(\"rel\", \"stylesheet\");\r\n styleElement.setAttribute(\"type\", \"text/css\");\r\n styleElement.setAttribute(\"href\", makeAbsolutePath(style));\r\n document.head.append(styleElement);\r\n}\r\n\r\nfunction insertVariables(cssSelector: string, variables: object) {\r\n fgtSheet.insertRule(css` ${cssSelector} { ${Object.entries(variables).reduce((total, pair) => {\r\n const [key, value] = pair;\r\n return total + `--${key}: ${value};`;\r\n }, \"\")} } `);\r\n}\r\n\r\ninsertVariables('[role=\"application\"]', config.variable);\r\ninsertVariables(\r\n '[role=\"application\"].vs-dark, [role=\"application\"].hc-black',\r\n config.variableDark\r\n);\r\n\r\ndocument.adoptedStyleSheets.push(fgtSheet);\r\n\r\nconst mountSvgTo = loadSvgs(config.svg);\r\n\r\nproxy(\r\n document.body,\r\n \"appendChild\",\r\n useHTMLElement(\"monaco-workbench\", monacoWorkbench => {\r\n observeThemeColorChange(monacoWorkbench);\r\n const svgMounted = mountSvgTo(monacoWorkbench);\r\n applyFakeMica(monacoWorkbench, svgMounted);\r\n applyBackdropFilter(monacoWorkbench);\r\n applyEffect(monacoWorkbench);\r\n proxy(\r\n monacoWorkbench,\r\n \"prepend\",\r\n useHTMLElement(\"monaco-grid-view\", fixMenuBar)\r\n );\r\n proxy(\r\n monacoWorkbench,\r\n \"appendChild\",\r\n useHTMLElement(\"context-view\", fixContextMenu)\r\n );\r\n })\r\n);\r\n\r\n// Fix menu which is wrapped into shadow dom\r\nproxy(\r\n Element.prototype,\r\n \"attachShadow\",\r\n useRet(shadowDom => {\r\n shadowDom.adoptedStyleSheets.push(\r\n ...shadowDom.ownerDocument.adoptedStyleSheets\r\n );\r\n applyBackdropFilterOnMenu(shadowDom);\r\n applyEffect(shadowDom);\r\n proxy(\r\n shadowDom,\r\n \"appendChild\",\r\n useHTMLElement(\"monaco-menu-container\", fixMenu)\r\n );\r\n return shadowDom;\r\n })\r\n);\r\n\r\n// Fix floating window\r\nproxy(\r\n window,\r\n \"open\",\r\n useRet(newWindow => {\r\n if (!newWindow) return newWindow;\r\n const global = newWindow as Window & typeof globalThis;\r\n const newDocument = newWindow.document;\r\n const sheet = new global.CSSStyleSheet();\r\n for (let i = 0; i < fgtSheet.cssRules.length; i++) {\r\n sheet.insertRule(fgtSheet.cssRules[i].cssText);\r\n }\r\n newDocument.adoptedStyleSheets.push(sheet);\r\n proxy(\r\n newDocument.body,\r\n \"append\",\r\n useHTMLElement(null, monacoWorkbench => {\r\n observeThemeColorChange(monacoWorkbench);\r\n const svgMounted = mountSvgTo(monacoWorkbench);\r\n applyFakeMica(monacoWorkbench, svgMounted);\r\n applyBackdropFilter(monacoWorkbench);\r\n applyEffect(monacoWorkbench);\r\n })\r\n );\r\n return newWindow;\r\n })\r\n);\r\n", "import config from \"../config.json\" with { type: \"json\" };\r\nimport globalExport from \"../globalExport\";\r\nimport { css, isKeyInObject } from \"../utils\";\r\nimport fgtSheet from \"../vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\nimport { applyFlipEffect } from \"./flipEffect\";\r\nimport { applyRevealEffect } from \"./revealEffect\";\r\n\r\nconst {\r\n effect: { extendMenuFocusBackground, disableForDisabledItem },\r\n} = config;\r\n\r\nconst _extendMenuFocusBackground = extendMenuFocusBackground as\r\n | boolean\r\n | string;\r\n\r\nconst effectMap: Record void> = {\r\n \"fgt-revealEffect\": applyRevealEffect,\r\n \"fgt-flipEffect\": applyFlipEffect,\r\n};\r\n\r\nfor (const key in effectMap) {\r\n fgtSheet.insertRule(css` @keyframes ${key} { } `);\r\n}\r\n\r\n// Export the register function so you can add your own effect\r\nglobalExport.registerEffect = (key: string, func: (e: Element) => void) => {\r\n effectMap[key] = func;\r\n fgtSheet.insertRule(css` @keyframes ${key} { } `);\r\n};\r\n\r\nif (_extendMenuFocusBackground) {\r\n fgtSheet.insertRule(css` .monaco-menu-container ul.actions-container > li > a.action-menu-item { background-color: transparent !important; outline: none !important; } `);\r\n fgtSheet.insertRule(css` .monaco-menu-container ul.actions-container .action-item.focused { background-color: ${_extendMenuFocusBackground === true\r\n ? \"var(--vscode-menu-selectionBackground)\"\r\n : _extendMenuFocusBackground}; } `);\r\n}\r\n\r\nexport function applyEffect(element: HTMLElement | ShadowRoot) {\r\n element.addEventListener(\"animationstart\", (e: Event | AnimationEvent) => {\r\n if (!(\"animationName\" in e)) return;\r\n if (!(e.target instanceof Element)) return;\r\n if (disableForDisabledItem && e.target.classList.contains(\"disabled\"))\r\n return;\r\n if (isKeyInObject(e.animationName, effectMap))\r\n effectMap[e.animationName](e.target);\r\n });\r\n}\r\n", "declare global {\r\n interface Window {\r\n _fgtTheme: Record;\r\n }\r\n}\r\n\r\nwindow._fgtTheme = Object.create(null);\r\nexport default window._fgtTheme;\r\n", "import config from \"../config.json\" with { type: \"json\" };\r\nimport { getRelativePos, isHTMLElement } from \"../utils\";\r\n\r\nconst {\r\n effect: { flipEffect },\r\n} = config;\r\n\r\nconst reducedDistanceFunc = new Function(\r\n \"radius\",\r\n '\"use strict\";return ' + flipEffect.reducedDistanceFunc\r\n) as (radius: number) => number;\r\n\r\nfunction positiveRoot(a: number, b: number, c: number) {\r\n return (-b + Math.sqrt(b * b - 4 * a * c)) / (2 * a);\r\n}\r\n\r\n// p: perspective\r\n// r: radius\r\n// d: reduced distance = reducedPercentage * radius;\r\n// z = adjacent * p / (r - d) - p - opposite\r\n// when z = 0, let a = r - d, c is cos\\theta, solve (p^2r^2/a^2 + r^2)c^2 - 2p^2rc/a + p^2 - r^2\r\nfunction transform(element: HTMLElement, e: MouseEvent) {\r\n const mouse = getRelativePos(element, e);\r\n const rect = element.getBoundingClientRect();\r\n const center = [rect.width / 2, rect.height / 2];\r\n const vector = [center[0] - mouse[0], center[1] - mouse[1]];\r\n const axis = [vector[1], -vector[0]];\r\n const rS = (rect.width * rect.width + rect.height * rect.height) / 4;\r\n const radius = Math.sqrt(rS);\r\n const distance = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]);\r\n const p = (flipEffect.perspective * 96) / 2.54;\r\n const d = reducedDistanceFunc(radius);\r\n const a = radius - d; // remain distance\r\n const adjacent =\r\n radius -\r\n (1 -\r\n positiveRoot(\r\n ((p * p) / (a * a) + 1) * rS,\r\n -(2 * p * p * radius) / a,\r\n p * p - rS\r\n )) *\r\n distance;\r\n const degreeInRadius = Math.acos(adjacent / radius);\r\n const opposite = Math.sin(degreeInRadius) * radius;\r\n const z = (adjacent * p) / (radius - d) - p - opposite;\r\n const perspective = `perspective(${flipEffect.perspective}cm)`;\r\n const rotate3d = `rotate3d(${axis[0]}, ${axis[1]}, 0, ${(degreeInRadius * 180) / Math.PI}deg)`;\r\n const translateZ = `translateZ(-${z}px)`;\r\n element.style.transform = `${perspective} ${translateZ} ${rotate3d}`;\r\n}\r\n\r\nexport function applyFlipEffect(\r\n element: Element & {\r\n _appliedFlipEffect?: boolean;\r\n }\r\n) {\r\n if (element._appliedFlipEffect || !isHTMLElement(element)) return;\r\n\r\n const oriTransform = element.style.transform;\r\n\r\n let isPressed = false;\r\n element.style.transition = \"transform \" + flipEffect.transition;\r\n element.addEventListener(\"mousedown\", e => {\r\n isPressed = true;\r\n transform(element, e);\r\n });\r\n\r\n element.addEventListener(\"mousemove\", e => {\r\n if (isPressed) transform(element, e);\r\n });\r\n\r\n element.addEventListener(\"mouseup\", () => {\r\n isPressed = false;\r\n element.style.transform = oriTransform;\r\n });\r\n element.addEventListener(\"mouseleave\", () => {\r\n isPressed = false;\r\n element.style.transform = oriTransform;\r\n });\r\n\r\n element._appliedFlipEffect = true;\r\n}\r\n", "import config from \"../config.json\" with { type: \"json\" };\r\nimport { getRelativePos, isHTMLElement } from \"../utils\";\r\n\r\nconst {\r\n effect: { revealEffect },\r\n} = config;\r\n\r\nfunction getSize(element: HTMLElement, pxOrPer: number | string) {\r\n if (typeof pxOrPer == \"number\") return pxOrPer;\r\n else if (pxOrPer.endsWith(\"%\")) {\r\n const rect = element.getBoundingClientRect();\r\n return (\r\n (Math.max(rect.width, rect.height) *\r\n Number.parseFloat(pxOrPer.substring(0, pxOrPer.length - 1))) /\r\n 100\r\n );\r\n } else return Number.parseFloat(pxOrPer);\r\n}\r\n\r\nfunction lightHoverEffect(x: number, y: number, size: number) {\r\n return `radial-gradient(circle ${size}px at ${x}px ${y}px, ${revealEffect.lightColor}, transparent)`;\r\n}\r\n\r\nfunction lightClickEffect(\r\n x: number,\r\n y: number,\r\n size: number,\r\n lightColor: string\r\n) {\r\n return `radial-gradient(circle ${size}px at ${x}px ${y}px, transparent, ${lightColor}, transparent)`;\r\n}\r\n\r\nfunction startClickAnimation(\r\n element: HTMLElement & {\r\n _revealEffectAnimation?: number;\r\n _revealEffectHover?: string;\r\n },\r\n e: MouseEvent\r\n) {\r\n if (element._revealEffectAnimation)\r\n cancelAnimationFrame(element._revealEffectAnimation);\r\n\r\n const [x, y] = getRelativePos(element, e);\r\n const speed = revealEffect.clickEffect.speed;\r\n const startSize = getSize(element, revealEffect.clickEffect.size);\r\n const duration = revealEffect.clickEffect.duration;\r\n const distance = duration * speed;\r\n\r\n let start: DOMHighResTimeStamp | undefined;\r\n function step(time: DOMHighResTimeStamp) {\r\n if (start === undefined) start = time;\r\n const elapsed = time - start;\r\n const hoverEffect = element._revealEffectHover;\r\n if (elapsed < duration) {\r\n const percentage = elapsed / duration;\r\n element.style.backgroundImage =\r\n hoverEffect +\r\n \", \" +\r\n lightClickEffect(\r\n x,\r\n y,\r\n distance * percentage + startSize,\r\n `color-mix(in srgb, ${revealEffect.lightColor}, transparent ${percentage * 100}%)`\r\n );\r\n element._revealEffectAnimation = requestAnimationFrame(step);\r\n } else {\r\n element.style.backgroundImage = hoverEffect ?? \"\";\r\n element._revealEffectAnimation = undefined;\r\n }\r\n }\r\n element._revealEffectAnimation = requestAnimationFrame(step);\r\n}\r\n\r\nexport function applyRevealEffect(\r\n element: Element & {\r\n _appliedRevealEffect?: boolean;\r\n _revealEffectHover?: string;\r\n _revealEffectAnimation?: number;\r\n }\r\n) {\r\n if (element._appliedRevealEffect || !isHTMLElement(element)) return;\r\n\r\n const oriBackground = element.style.backgroundImage;\r\n\r\n element.addEventListener(\"mousemove\", e => {\r\n const [x, y] = getRelativePos(element, e);\r\n const hoverEffect = lightHoverEffect(\r\n x,\r\n y,\r\n getSize(element, revealEffect.gradientSize)\r\n );\r\n if (!element._revealEffectAnimation)\r\n element.style.backgroundImage = hoverEffect;\r\n else element._revealEffectHover = hoverEffect;\r\n });\r\n element.addEventListener(\"mouseleave\", () => {\r\n element.style.backgroundImage = oriBackground;\r\n element._revealEffectHover = oriBackground;\r\n });\r\n\r\n if (revealEffect.clickEffect && !element.classList.contains(\"disabled\")) {\r\n element.addEventListener(\"mousedown\", e => {\r\n element._revealEffectHover = element.style.backgroundImage;\r\n startClickAnimation(element, e);\r\n });\r\n }\r\n\r\n element._appliedRevealEffect = true;\r\n}\r\n", "import config from \"./config.json\" with { type: \"json\" };\r\nimport { css } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nconst { fakeMica } = config;\r\n\r\nif (fakeMica.enabled) {\r\n fgtSheet.insertRule(css` [role=\"application\"]::before { content: \"\"; display: block; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; } `);\r\n\r\n fgtSheet.insertRule(css` .fgt-mica-svg-loaded::before { filter: ${fakeMica.filter}; background: url(\"vscode-file://vscode-app/${fakeMica.url}\") ${fakeMica.position}; } `);\r\n\r\n // Fix list background\r\n fgtSheet.insertRule(css` .monaco-list-rows { background-color: transparent !important; } `);\r\n\r\n // Fix settings row background\r\n fgtSheet.insertRule(css` .settings-body .monaco-list-row { background-color: transparent !important; } `);\r\n\r\n if (fakeMica.titlebarFix) {\r\n fgtSheet.insertRule(css` .part.titlebar { background-color: color-mix( in srgb, var(--vscode-titleBar-activeBackground) ${fakeMica.titlebarFix * 100}%, transparent ) !important; } `);\r\n }\r\n\r\n if (fakeMica.editorBackgroundFix) {\r\n fgtSheet.insertRule(css` .content, .monaco-editor, .monaco-editor-background, .view-overlays .selected-text:has(+ .monaco-editor-background) { background-color: transparent !important; } `);\r\n fgtSheet.insertRule(css` .editor-group-container.empty { background-color: var(--vscode-editor-background); } `);\r\n // VScode puts a top margin so that there will be a gap on the top.\r\n // Fix it by replacing with padding.\r\n fgtSheet.insertRule(css` .profiles-editor { margin: 0 auto 0 !important; padding-top: 20px; } `);\r\n }\r\n}\r\n\r\nexport async function applyFakeMica(\r\n element: HTMLElement,\r\n svgMounted: Promise\r\n) {\r\n if (fakeMica.enabled) {\r\n await svgMounted;\r\n element.classList.add(\"fgt-mica-svg-loaded\");\r\n }\r\n}\r\n", "import { isHTMLElement } from \"./utils\";\r\n\r\ntype AnyFunction = (this: any, ...args: any) => unknown;\r\n\r\ntype NewFunc = OldFunc extends (\r\n this: infer This,\r\n ...args: infer Args\r\n) => infer Ret\r\n ? (this: This, oldFunc: OmitThisParameter, ...args: Args) => Ret\r\n : never;\r\n\r\n// Proxy function on src\r\nexport function proxy<\r\n Src extends Record<\r\n FuncName,\r\n AnyFunction & {\r\n _proxied?: boolean;\r\n }\r\n >,\r\n FuncName extends string,\r\n>(src: Src, funcName: FuncName, newFunc: NewFunc) {\r\n if (!src[funcName] || src[funcName]._proxied) return;\r\n const oldFunc = src[funcName];\r\n src[funcName] = function (\r\n this: ThisParameterType,\r\n ...args: Parameters\r\n ) {\r\n return newFunc.call(this, oldFunc.bind(this), ...args);\r\n } as Src[FuncName];\r\n src[funcName]._proxied = true;\r\n}\r\n\r\nexport function proxyAll<\r\n Src extends Record,\r\n FuncNames extends string,\r\n>(src: Src, funcNames: FuncNames[], newFunc: NewFunc) {\r\n for (const funcName of funcNames) proxy(src, funcName, newFunc);\r\n}\r\n\r\nexport function useRet(\r\n f: (this: This, oldRet: Ret, ...args: Args) => Ret\r\n) {\r\n return function (this: This, oldFunc: (...args: any) => Ret, ...args: Args) {\r\n return f.call(this, oldFunc(...args), ...args);\r\n };\r\n}\r\n\r\nexport function useArgs(\r\n f: (this: This, ...args: Args) => void\r\n) {\r\n return function (\r\n this: This,\r\n oldFunc: OldFunc,\r\n ...args: Args\r\n ) {\r\n f.call(this, ...args);\r\n return oldFunc(...args) as ReturnType;\r\n };\r\n}\r\n\r\nexport function useHTMLElement(\r\n className: string | null,\r\n f: (this: This, e: HTMLElement, ...args: Args) => void\r\n) {\r\n return function (\r\n this: This,\r\n oldFunc: OldFunc,\r\n e: unknown,\r\n ...args: Args\r\n ) {\r\n isHTMLElement(e) &&\r\n (className === null || e.classList.contains(className)) &&\r\n f.call(this, e, ...args);\r\n return oldFunc(e, ...args) as ReturnType;\r\n };\r\n}\r\n\r\nexport function applyAndProxy(\r\n parent: Element &\r\n Record unknown>,\r\n className: string,\r\n funcName: FunNames | FunNames[],\r\n func: (e: Element, ...args: any[]) => void\r\n) {\r\n const e = parent.querySelector(\"div.\" + className);\r\n if (e) func(e);\r\n const newFunc = useHTMLElement(className, func) as NewFunc<\r\n (typeof parent)[FunNames]\r\n >;\r\n if (funcName instanceof Array) proxyAll(parent, funcName, newFunc);\r\n else proxy(parent, funcName, newFunc);\r\n}\r\n", "import { applyAndProxy, proxy, proxyAll, useArgs, useRet } from \"./proxy\";\r\nimport { isHTMLElement } from \"./utils\";\r\n\r\n// `position: fixed` will be invalid if `backdrop-filter` or `transform` is set on ancestor.\r\n// 1. Clone and replace the `div.monaco-action-bar` to keep the layout and style things.\r\n// 2. Move the original `div.monaco-action-bar` with event listeners to top level and remove any styles.\r\n// 3. Move sub menu below `div.monaco-action-bar` to avoid those properties being present on the ancestors.\r\nexport function fixMenu(menuContainer?: string | Node) {\r\n if (!isHTMLElement(menuContainer)) return;\r\n\r\n proxy(menuContainer, \"appendChild\", (oldFunc, e) =>\r\n oldFunc(\r\n isHTMLElement(e) && e.classList.contains(\"monaco-scrollable-element\")\r\n ? fix(e)\r\n : e\r\n )\r\n );\r\n\r\n function moveSubMenu(\r\n src: HTMLElement & { _subMenu?: Node },\r\n parent: Element\r\n ) {\r\n function fixSubMenu(\r\n subMenu: NodeType & { _fixedSubMenu?: boolean }\r\n ) {\r\n if (!isHTMLElement(subMenu) || subMenu._fixedSubMenu) return subMenu;\r\n\r\n // https://github.com/microsoft/vscode/blob/5cd507ba17ec7a0d8a822c35bfcde8eca33de861/src/vs/base/browser/dom.ts#L581\r\n // Fake parent, thus `dom.isAncestor` will always return `true`\r\n Object.defineProperty(subMenu, \"parentNode\", {\r\n get() {\r\n return src;\r\n },\r\n });\r\n // https://github.com/microsoft/vscode/blob/3e452bfef11522d0151fd2e884bb8bf869d7d2fa/src/vs/base/browser/dom.ts#L632\r\n // Change since vscode 1.84.0\r\n src._subMenu = subMenu;\r\n proxy(\r\n src,\r\n \"contains\",\r\n useRet(\r\n (ret, e) =>\r\n ret || src._subMenu === e || (src._subMenu?.contains(e) ?? false)\r\n )\r\n );\r\n // If submenu loses focus, dispatch to `
  • `\r\n subMenu.addEventListener(\"focusout\", e =>\r\n setTimeout(() =>\r\n src.dispatchEvent(new Event(e.type, { ...e, bubbles: false }))\r\n )\r\n );\r\n // Recursively fix new menu\r\n fixMenu(subMenu);\r\n\r\n subMenu._fixedSubMenu = true;\r\n return subMenu;\r\n }\r\n\r\n src.append = e => parent.append(fixSubMenu(e));\r\n src.removeChild = e => parent.removeChild(e);\r\n src.replaceChild = (e, e2) => parent.replaceChild(fixSubMenu(e), e2);\r\n }\r\n\r\n function fix(scrollableElement: Node) {\r\n if (!isHTMLElement(scrollableElement)) return scrollableElement;\r\n\r\n const actionBar = scrollableElement.querySelector(\"div.monaco-action-bar\");\r\n if (!actionBar) return scrollableElement;\r\n\r\n const clone = actionBar.cloneNode();\r\n for (const child of Array.from(actionBar.children)) {\r\n clone.appendChild(child);\r\n }\r\n actionBar.parentNode?.replaceChild(clone, actionBar);\r\n\r\n actionBar.className = \"\";\r\n actionBar.appendChild(scrollableElement);\r\n actionBar\r\n .querySelectorAll(\r\n \"ul.actions-container > li:has(> .monaco-submenu-item)\"\r\n )\r\n .forEach(menuItem => moveSubMenu(menuItem, actionBar));\r\n return actionBar;\r\n }\r\n}\r\n\r\n// Fix top bar menu\r\nexport function fixMenuBar(gridView: HTMLElement) {\r\n const fixMenuButton = (menu?: string | Node) => {\r\n if (!isHTMLElement(menu)) return;\r\n proxyAll(menu, [\"append\", \"appendChild\"], useArgs(fixMenu));\r\n };\r\n // Classic\r\n {\r\n const titlebar = gridView.querySelector(\r\n \"#workbench\\\\.parts\\\\.titlebar > div > div.titlebar-left\"\r\n );\r\n if (!titlebar) return;\r\n applyAndProxy(titlebar, \"menubar\", \"append\", (menuBar: Element) => {\r\n const menus = menuBar.querySelectorAll(\"div.menubar-menu-button\");\r\n menus.forEach(fixMenuButton);\r\n proxyAll(\r\n menuBar,\r\n [\"append\", \"appendChild\", \"insertBefore\"],\r\n useArgs(fixMenuButton)\r\n );\r\n });\r\n }\r\n // Compact\r\n function fixCompat(container: Element | null) {\r\n if (!container) return;\r\n applyAndProxy(container, \"menubar\", \"prepend\", (menuBar: Element) => {\r\n applyAndProxy(\r\n menuBar,\r\n \"menubar-menu-button\",\r\n \"appendChild\",\r\n fixMenuButton\r\n );\r\n });\r\n }\r\n fixCompat(\r\n gridView.querySelector(\"#workbench\\\\.parts\\\\.activitybar > div.content\")\r\n );\r\n const sidebar = gridView.querySelector(\"#workbench\\\\.parts\\\\.sidebar\");\r\n if (sidebar)\r\n applyAndProxy(\r\n sidebar,\r\n \"composite\",\r\n [\"insertBefore\", \"appendChild\"],\r\n (composite: Element) =>\r\n fixCompat(composite.querySelector(\"div.composite-bar-container\"))\r\n );\r\n}\r\n\r\nexport const fixContextMenu = fixMenu;\r\n", "import config from \"./config.json\" with { type: \"json\" };\r\nimport { css, isKeyInObject } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nconst { animation } = config;\r\n\r\nconst selectorMap = {\r\n menu: \".monaco-menu-container .monaco-scrollable-element, .action-widget, .monaco-breadcrumbs-picker, .quick-input-widget\",\r\n dialog: \".dialog-shadow\",\r\n dropdown: \".monaco-select-box-dropdown-container\",\r\n hover: \".monaco-hover\",\r\n notificationCenter: \".notifications-center, .notification-toast\",\r\n notificationCenterHeader: \".notifications-center-header\",\r\n notification: \".notifications-list-container .monaco-list-row\",\r\n menuItem:\r\n \".monaco-menu-container ul > li.action-item:not(:has(> a.separator))\",\r\n actionMenuItem:\r\n \".monaco-menu-container ul > li > a.action-menu-item:not(.separator)\",\r\n button: \".monaco-button\",\r\n iconActionLabel:\r\n \":not(.activitybar, .composite-bar) > .monaco-action-bar .action-label.codicon\",\r\n tab: \".tabs-container > .tab\",\r\n listItem:\r\n \":not(.settings-tree-container, .notifications-list-container, .profile-tree) > .monaco-list .monaco-list-row\",\r\n statusbarItem:\r\n \".statusbar-item:not(.has-background-color) > .statusbar-item-label, .statusbar-item.has-background-color\",\r\n activitybarItem: \".activitybar li.action-item:not(:has(> a.separator))\",\r\n compositeBarItem:\r\n \".pane-composite-part .composite-bar li.action-item:not(:has(> a.separator))\",\r\n commandCenter: \".command-center-center\",\r\n menubarTitle: \".menubar-menu-title\",\r\n settingsTreeItem:\r\n \".settings-tree-container .monaco-list-rows .settings-row-inner-container\",\r\n paneHeader: \".pane-header\",\r\n};\r\n\r\nfor (const key in animation) {\r\n const value = animation[key as keyof typeof animation];\r\n if (value.length != 0)\r\n fgtSheet.insertRule(css` ${isKeyInObject(key, selectorMap) ? selectorMap[key] : key} { animation: ${value}; } `);\r\n}\r\n", "import config from \"./config.json\" with { type: \"json\" };\r\nimport { css, isKeyInObject } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nconst { borderRadius } = config;\r\n\r\nconst selectorMap = {\r\n menuItem:\r\n \".monaco-menu-container ul.actions-container > li > a.action-menu-item\",\r\n menu: \".monaco-menu-container .monaco-scrollable-element\",\r\n suggestWidget: \".editor-widget.suggest-widget\",\r\n tab: \".tab\",\r\n};\r\n\r\nfor (const key in borderRadius) {\r\n const value = borderRadius[key as keyof typeof borderRadius];\r\n if (value.length != 0)\r\n fgtSheet.insertRule(css` ${isKeyInObject(key, selectorMap) ? selectorMap[key] : key} { border-radius: ${value} !important; overflow: hidden; } `);\r\n}\r\n", "import { css, getChromeMainVersion } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nfunction polyfillClipPath(\r\n selector: string,\r\n clipPath: string,\r\n overflowClipMargin: string\r\n) {\r\n if (getChromeMainVersion() >= 128)\r\n fgtSheet.insertRule(css` ${selector} { clip-path: ${clipPath} !important; } `);\r\n else\r\n fgtSheet.insertRule(css` ${selector} { overflow: clip !important; overflow-clip-margin: ${overflowClipMargin} !important; } `);\r\n}\r\n\r\nfunction inset(top: number, unbound: boolean = false) {\r\n return `inset(${top}px ${unbound ? \"calc(-infinity * 1px) calc(-infinity * 1px))\" : \"0px 0px\"}`;\r\n}\r\n\r\n// Menu Animation\r\npolyfillClipPath(\r\n css`.monaco-menu-container, .context-view`,\r\n inset(-1, true),\r\n \"10px\"\r\n);\r\n\r\n// Dropdown Animation\r\npolyfillClipPath(css`.select-container > .context-view`, inset(0, true), \"0px\");\r\n\r\n// Panel Header\r\npolyfillClipPath(\r\n css`.pane-body, .pane-body .monaco-list > .monaco-scrollable-element`,\r\n inset(-22),\r\n \"22px\"\r\n);\r\n", "import config from \"./config.json\" with { type: \"json\" };\r\nimport { css } from \"./utils\";\r\nimport fgtSheet from \"./vscode-frosted-glass-theme.css\" with { type: \"css\" };\r\n\r\nconst { miscellaneous } = config;\r\n\r\nif (miscellaneous.progressBarBehindSectionHeader) {\r\n fgtSheet.insertRule(css` .pane > .monaco-progress-container { height: 22px !important; top: 0px !important; } `);\r\n // `left: 1px` because of a weird flash\r\n fgtSheet.insertRule(css` .pane > .monaco-progress-container > .progress-bit { height: 22px !important; left: 1px !important; } `);\r\n} else {\r\n fgtSheet.insertRule(css` .pane > .monaco-progress-container { z-index: 20; } `);\r\n}\r\n\r\nif (miscellaneous.disableFocusOutline)\r\n fgtSheet.insertRule(css` .monaco-workbench [tabindex=\"-1\"]:focus, .monaco-workbench [tabindex=\"0\"]:focus, .monaco-workbench button:focus, .monaco-workbench input[type=\"button\"]:focus, .monaco-workbench input[type=\"checkbox\"]:focus, .monaco-workbench input[type=\"search\"]:focus, .monaco-workbench input[type=\"text\"]:focus, .monaco-workbench select:focus, .monaco-workbench textarea:focus, .monaco-list::before { outline: none !important; } `);\r\n"], + "mappings": "AAAA,OAAOA,OAAY,eAAgB,IAAK,CAAE,KAAM,MAAO,ECAhD,SAASC,EAAiBC,EAA4B,CAC3D,OAAOA,GAAKA,aAAa,WAC3B,CASO,SAASC,EACdC,EACAC,EACgB,CAChB,OAAOA,EAAI,eAAeD,CAAG,CAC/B,CAEA,IAAIE,EACG,SAASC,IAAkB,CAChC,GAAID,EAAc,OAAOA,EACzB,IAAME,EAAa,YAAY,IAC/B,OAAQF,EAAeE,EAAW,UAChC,EACAA,EAAW,YAAY,GAAG,EAAI,CAChC,CACF,CAEO,SAASC,EAAiBC,EAAa,CAC5C,OAAOA,EAAI,WAAW,GAAG,GAAKA,EAAI,WAAW,IAAI,EAC7CH,GAAgB,EAAIG,EACpB,4BAA4BA,CAAG,EACrC,CAEO,SAASC,EAAeC,EAAsBC,EAAe,CAClE,IAAMC,EAASF,EAAQ,sBAAsB,EACvCG,EA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ACA,CACE,oBACA,wCACA,6DACF,EACA,CACE,sBACA,0CACA,iCACF,EACA,CACE,iBACA,qCACA,0BACF,EACA,CAAC,aAAc,iCAAkC,qBAAqB,EACtE,CACE,OACA,2BACA,mDACF,EACA,CACE,gBACA,oCACA,+BACF,EACA,CACE,2BACA,+CACA,8BACF,EACA,CAAC,QAAS,iDAAkD,eAAe,EAC3E,CACE,qBACA,yCACA,gBACF,EACA,CACE,mBACA,uCACA,4BACF,EACA,CACE,eACA,mCACA,6GACF,EACA,CACE,mBACA,uCACA,2CACF,EACA,CAAC,eAAgB,mCAAoC,gBAAgB,EACrE,CACE,sBACA,0CACA,gCACA,sCACF,EACA,CACE,mBACA,yCACA,sBACA,mCACF,EACA,CACE,SACA,sCACA,iIACF,EACA,CACE,uBACA,2CACA,uBACF,EACA,CACE,WACA,+BACA,+DACF,EAEA,CAAC,UAAW,oBAAqB,UAAU,EAC3C,CACE,2BACA,oBACA,0CACF,EACA,CAAC,kBAAmB,oBAAqB,gBAAgB,CAC3D,EAEAN,EAAS,WAAWO,6DAA+D,EASnF,IAAMC,EAEF,CAAC,EACL,CAOE,IAASC,EAAT,SACEC,EACAC,EAAwBC,EACJ,CACpB,GAAIF,IAAe,OACnB,OAAO,OAAOA,GAAc,SACxB,CACE,GAAGC,EACH,OAAQD,CACV,EACA,CACE,GAAGC,EACH,GAAGD,CACL,CACN,EAdSD,KANT,IAAMG,EAAyB,CAC7B,OAAQ,GACR,uBAAwB,GACxB,QAAS,CACX,EAkBMC,EAAUZ,GAGhBO,EAAU,QAAUC,EAAeI,EAAQ,OAAO,EAClD,QAAWC,KAAOD,EACZC,GAAO,YACXN,EAAUM,CAAG,EAAIL,EACfI,EAAQC,CAAG,EACXN,EAAU,SAAWI,CACvB,EAEJ,CA3BW,IAAAH,GA6BXH,EAAa,QAAQS,GAAS,CAC5B,IAAMd,EAASO,EAAUO,EAAM,CAAC,CAAC,GAAKP,EAAU,QAChD,GAAIP,IAAW,OAAW,OAC1Be,EAA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,EACzCE,EAAoBJ,CAAe,EACnCK,EAAYL,CAAe,EAC3BF,EACEE,EACA,UACAD,EAAe,mBAAoBO,EAAU,CAC/C,EACAR,EACEE,EACA,cACAD,EAAe,eAAgBQ,EAAc,CAC/C,CACF,CAAC,CACH,EAGAT,EACE,QAAQ,UACR,eACAU,EAAOC,IACLA,EAAU,mBAAmB,KAC3B,GAAGA,EAAU,cAAc,kBAC7B,EACAC,GAA0BD,CAAS,EACnCJ,EAAYI,CAAS,EACrBX,EACEW,EACA,cACAV,EAAe,wBAAyBY,CAAO,CACjD,EACOF,EACR,CACH,EAGAX,EACE,OACA,OACAU,EAAOI,GAAa,CAClB,GAAI,CAACA,EAAW,OAAOA,EACvB,IAAMC,EAASD,EACTE,EAAcF,EAAU,SACxBG,EAAQ,IAAIF,EAAO,cACzB,QAASG,EAAI,EAAGA,EAAIhC,EAAS,SAAS,OAAQgC,IAC5CD,EAAM,WAAW/B,EAAS,SAASgC,CAAC,EAAE,OAAO,EAE/C,OAAAF,EAAY,mBAAmB,KAAKC,CAAK,EACzCjB,EACEgB,EAAY,KACZ,SACAf,EAAe,KAAMC,GAAmB,CACtCC,EAAwBD,CAAe,EACvC,IAAME,EAAaN,GAAWI,CAAe,EAC7CG,EAAcH,EAAiBE,CAAU,EACzCE,EAAoBJ,CAAe,EACnCK,EAAYL,CAAe,CAC7B,CAAC,CACH,EACOY,CACT,CAAC,CACH", "names": ["config", "isHTMLElement", "a", "isKeyInObject", "key", "obj", "scriptFolder", "getScriptFolder", "scriptPath", "makeAbsolutePath", "url", "getRelativePos", "element", "e", "offset", "x", "y", "css", "sa", "args", "acc", "cur", "i", "arg", "chromeMainVersion", "getChromeMainVersion", "mainVerStr", "ttp", "html", "scriptUrl", "loadSvgs", "svgList", "fetchList", "svg", "makeAbsolutePath", "mountSvgTo", "element", "copy", "_this", "justCreated", "res", "svgStr", "config", "opacity", "colorVarList", "registerColorVar", "colorVar", "newColorVar", "observeThemeColorChange", "monacoWorkbench", "contributedColorTheme", "setupColor", "applyOpacity", "color", "alpha", "data", "splits", "red", "green", "blue", "hue", "saturation", "lightness", "findStyleSheetList", "ownerNode", "styleSheetList", "monacoWorkbenchCSSRule", "cssRule", "cssStyle", "entry", "fgtSheet", "filter", "tintSvg", "config", "mountSvgTo", "loadSvgs", "colorVarList", "css", "filterMap", "generateFilter", "filterPart", "defaultFallbackFilter", "fallbackFilter", "_filter", "key", "entry", "registerColorVar", "filterStr", "applyBackdropFilter", "element", "wrapper", "f", "applyBackdropFilterOnMenu", "config", "config", "globalExport_default", "fgtSheet", "config", "flipEffect", "config", "reducedDistanceFunc", "positiveRoot", "a", "b", "c", "transform", "element", "e", "mouse", "getRelativePos", "rect", "center", "vector", "axis", "rS", "radius", "distance", "p", "d", "adjacent", "degreeInRadius", "opposite", "z", "perspective", "rotate3d", "translateZ", "applyFlipEffect", "isHTMLElement", "oriTransform", "isPressed", "config", "revealEffect", "config", "getSize", "element", "pxOrPer", "rect", "lightHoverEffect", "x", "y", "size", "lightClickEffect", "lightColor", "startClickAnimation", "e", "getRelativePos", "speed", "startSize", "duration", "distance", "start", "step", "time", "elapsed", "hoverEffect", "percentage", "applyRevealEffect", "isHTMLElement", "oriBackground", "extendMenuFocusBackground", "disableForDisabledItem", "config", "_extendMenuFocusBackground", "effectMap", "applyRevealEffect", "applyFlipEffect", "key", "fgtSheet", "css", "globalExport_default", "func", "applyEffect", "element", "e", "isKeyInObject", "config", "fgtSheet", "fakeMica", "config", "css", "applyFakeMica", "element", "svgMounted", "proxy", "src", "funcName", "newFunc", "oldFunc", "args", "proxyAll", "funcNames", "useRet", "f", "useArgs", "useHTMLElement", "className", "e", "isHTMLElement", "applyAndProxy", "parent", "func", "fixMenu", "menuContainer", "isHTMLElement", "proxy", "oldFunc", "e", "fix", "moveSubMenu", "src", "parent", "fixSubMenu", "subMenu", "useRet", "ret", "e2", "scrollableElement", "actionBar", "clone", "child", "menuItem", "fixMenuBar", "gridView", "fixMenuButton", "menu", "proxyAll", "useArgs", "titlebar", "applyAndProxy", "menuBar", "fixCompat", "container", "sidebar", "composite", "fixContextMenu", "fgtSheet", "config", "fgtSheet", "animation", "config", "selectorMap", "key", "value", "css", "isKeyInObject", "config", "fgtSheet", "borderRadius", "config", "selectorMap", "key", "value", "css", "isKeyInObject", "fgtSheet", "polyfillClipPath", "selector", "clipPath", "overflowClipMargin", "getChromeMainVersion", "css", "inset", "top", "unbound", "config", "fgtSheet", "miscellaneous", "config", "css", "opacity", "config", "fgtSheet", "css", "style", "styleElement", "makeAbsolutePath", "insertVariables", "cssSelector", "variables", "total", "pair", "key", "value", "mountSvgTo", "loadSvgs", "proxy", "useHTMLElement", "monacoWorkbench", "observeThemeColorChange", "svgMounted", "applyFakeMica", "applyBackdropFilter", "applyEffect", "fixMenuBar", "fixContextMenu", "useRet", "shadowDom", "applyBackdropFilterOnMenu", "fixMenu", "newWindow", "global", "newDocument", "sheet", "i"] } diff --git a/package.json b/package.json index b0e82a5..34314e4 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "publisher": "RichardLuo", "description": "Bring frosted glass menu (like windows acrylic or mac os) to your vscode!", - "version": "0.8.13", + "version": "0.8.14", "repository": { "type": "git", "url": "https://github.com/RichardLuo0/vscode-frosted-glass-theme" @@ -421,14 +421,14 @@ "package": "vsce package" }, "devDependencies": { - "@types/node": "^22.10.0", + "@types/node": "^22.10.2", "@types/uuid": "^10.0.0", "@types/vscode": "^1.64.0", - "@typescript-eslint/eslint-plugin": "^8.16.0", - "@typescript-eslint/parser": "^8.16.0", + "@typescript-eslint/eslint-plugin": "^8.18.0", + "@typescript-eslint/parser": "^8.18.0", "@vscode/test-electron": "^2.4.1", "esbuild": "^0.24.0", - "eslint": "^9.15.0", + "eslint": "^9.17.0", "generate-license-file": "^3.6.0", "parse-literals": "^1.2.1", "typescript": "^5.7.2"