From f1322d22c389d8d8e63f5b581118586120d33934 Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Thu, 21 Nov 2024 14:29:57 +0000 Subject: [PATCH 1/5] [ci]Fix signing new Workspaces dll in Dart (#36036) --- .pipelines/ESRPSigning_core.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.pipelines/ESRPSigning_core.json b/.pipelines/ESRPSigning_core.json index 5319bdc55f..e1f0101fa2 100644 --- a/.pipelines/ESRPSigning_core.json +++ b/.pipelines/ESRPSigning_core.json @@ -201,6 +201,7 @@ "PowerToys.WorkspacesLauncherUI.exe", "PowerToys.WorkspacesLauncherUI.dll", "PowerToys.WorkspacesModuleInterface.dll", + "PowerToys.WorkspacesCsharpLibrary.dll", "WinUI3Apps\\PowerToys.RegistryPreviewExt.dll", "WinUI3Apps\\PowerToys.RegistryPreviewUILib.dll", From 40acdea356f16552d89934074f6882e4744c78e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Kottal?= Date: Thu, 21 Nov 2024 16:35:18 +0100 Subject: [PATCH 2/5] Adds two new third party plugins for Run (#35453) * Update thirdPartyRunPlugins.md * Update expect.txt --------- Co-authored-by: Clint Rutkas --- .github/actions/spell-check/expect.txt | 4 ++++ doc/thirdPartyRunPlugins.md | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 2271d20e11..d7ca1f84fe 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -151,6 +151,7 @@ CALG callbackptr calpwstr Cangjie +caniuse CANRENAME CAPTUREBLT CAPTURECHANGED @@ -732,6 +733,7 @@ ith ITHUMBNAIL IUI IUnknown +IUse IWbem IWeb IWIC @@ -1586,6 +1588,8 @@ SYSLIB SYSMENU SYSTEMAPPS SYSTEMTIME +SYSTEMWOW +tailwindcss tapp TApplication TApplied diff --git a/doc/thirdPartyRunPlugins.md b/doc/thirdPartyRunPlugins.md index bd179eea25..a8136ec623 100644 --- a/doc/thirdPartyRunPlugins.md +++ b/doc/thirdPartyRunPlugins.md @@ -39,6 +39,8 @@ Contact the developers of a plugin directly for assistance with a specific plugi | [GitHubRepo](https://github.com/8LWXpg/PowerToysRun-GitHubRepo) | [8LWXpg](https://github.com/8LWXpg) | Search and open GitHub repositories | | [ProcessKiller](https://github.com/8LWXpg/PowerToysRun-ProcessKiller) | [8LWXpg](https://github.com/8LWXpg) | Search and kill processes | | [ChatGPT](https://github.com/ferraridavide/ChatGPTPowerToys) | [ferraridavide](https://github.com/ferraridavide) | Ask a question to ChatGPT | +| [CanIUse](https://github.com/skttl/ptrun-caniuse) | [skttl](https://github.com/skttl) | Look up browser feature support with caniuse.com | +| [TailwindCSS](https://github.com/skttl/ptrun-tailwindcss) | [skttl](https://github.com/skttl) | Search the documentation of TailwindCSS | ## Extending software plugins From b81478eb972d0b3c5252b0bc0034915afaf091f9 Mon Sep 17 00:00:00 2001 From: Dave Rayment Date: Fri, 22 Nov 2024 14:49:35 +0000 Subject: [PATCH 3/5] [Peek]Expand image format support for Image Previewer using local capabilities (#35622) * Use BitmapDecoder to query compatible file extensions. * Delete spellcheck exceptions for removed file types * Remove unused usings. --- .github/actions/spell-check/expect.txt | 24 +----- .../MediaPreviewer/ImagePreviewer.cs | 77 ++----------------- 2 files changed, 11 insertions(+), 90 deletions(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index d7ca1f84fe..5a8c5e280c 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -69,11 +69,9 @@ AQS ARandom ARCHITEW ARemapped -ari ARPINSTALLLOCATION ARPPRODUCTICON ARRAYSIZE -arw asf AShortcut ASingle @@ -261,7 +259,6 @@ critsec Crossdevice CRSEL crx -crw CSearch CSettings cso @@ -303,8 +300,8 @@ DCOM dcommon dcomp DComposition -dcr -dcs +DCR +DCs ddd DDEIf DDevice @@ -374,7 +371,6 @@ DRAWCLIPBOARD DRAWFRAME drawingcolor dreamsofameaningfullife -drf drivedetectionwarning dshow DSTINVERT @@ -418,7 +414,6 @@ editkeyboardwindow EDITSHORTCUTS editshortcutswindow EFile -eip ekus emmintrin Emoji @@ -592,7 +587,7 @@ Hiberboot HIBYTE hicon HIDEWINDOW -hif +Hif HIMAGELIST himl hinst @@ -668,7 +663,6 @@ IGNOREUNKNOWN IGraphics iid Iindex -iiq IJson Ijwhost IKs @@ -739,10 +733,8 @@ IWeb IWIC iwr IYUV -jfi jfif jgeosdfsdsgmkedfgdfgdfgbkmhcgcflmi -jif jjw jobject jpe @@ -751,7 +743,6 @@ Jsons jsonval junja jxr -kdc keybd KEYBDDATA KEYBDINPUT @@ -876,7 +867,6 @@ MAXIMIZEBOX MAXSHORTCUTSIZE maxversiontested MBR -mdc MDICHILD MDL mdtext @@ -884,7 +874,6 @@ mdtxt mdwn MEDIASUBTYPE mediatype -mef MENUITEMINFO MENUITEMINFOW MERGECOPY @@ -942,7 +931,6 @@ mpmc MRM MRT mru -mrw msc mscorlib msdata @@ -1065,7 +1053,6 @@ NOZORDER NPH npmjs NResize -nrw nsunt NTAPI ntdll @@ -1095,7 +1082,6 @@ opensource openxmlformats OPTIMIZEFORINVOKE ORAW -ori ORPHANEDDIALOGTITLE ORSCANS oss @@ -1274,7 +1260,6 @@ QUERYENDSESSION QUERYOPEN QUEUESYNC QUNS -raf RAII RAlt Rasterize @@ -1378,8 +1363,6 @@ runtimes ruuid rvm rwin -rwl -rwz sacl safeprojectname SAMEKEYPREVIOUSLYMAPPED @@ -1513,7 +1496,6 @@ Srch SRCINVERT SRCPAINT SResize -srf srme srre srw diff --git a/src/modules/peek/Peek.FilePreviewer/Previewers/MediaPreviewer/ImagePreviewer.cs b/src/modules/peek/Peek.FilePreviewer/Previewers/MediaPreviewer/ImagePreviewer.cs index 9698e43f5a..47e488c4d3 100644 --- a/src/modules/peek/Peek.FilePreviewer/Previewers/MediaPreviewer/ImagePreviewer.cs +++ b/src/modules/peek/Peek.FilePreviewer/Previewers/MediaPreviewer/ImagePreviewer.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -22,6 +23,7 @@ using Peek.FilePreviewer.Models; using Peek.FilePreviewer.Previewers.Helpers; using Peek.FilePreviewer.Previewers.Interfaces; using Windows.Foundation; +using Windows.Graphics.Imaging; namespace Peek.FilePreviewer.Previewers { @@ -58,6 +60,12 @@ namespace Peek.FilePreviewer.Previewers private DispatcherQueue Dispatcher { get; } + private static readonly HashSet _supportedFileTypes = + BitmapDecoder.GetDecoderInformationEnumerator() + .SelectMany(di => di.FileExtensions) + .Union([".svg", ".qoi"]) + .ToHashSet(StringComparer.OrdinalIgnoreCase); + public static bool IsItemSupported(IFileSystemItem item) { return _supportedFileTypes.Contains(item.Extension); @@ -199,74 +207,5 @@ namespace Peek.FilePreviewer.Previewers }); }); } - - private static readonly HashSet _supportedFileTypes = new HashSet - { - // Image types - ".bmp", - ".gif", - ".jpg", - ".jfif", - ".jfi", - ".jif", - ".jpeg", - ".jpe", - ".png", - ".tif", // very slow for large files: no thumbnail? - ".tiff", // NEED TO TEST - ".dib", // NEED TO TEST - ".heic", - ".heif", - ".hif", // NEED TO TEST - ".avif", // NEED TO TEST - ".jxr", - ".wdp", - ".ico", // NEED TO TEST - ".thumb", // NEED TO TEST - ".webp", - - // Raw types - ".arw", - ".cr2", - ".crw", - ".erf", - ".kdc", // NEED TO TEST - ".mrw", - ".nef", - ".nrw", - ".orf", - ".pef", - ".raf", - ".raw", - ".rw2", - ".rwl", - ".sr2", - ".srw", - ".srf", - ".dcs", // NEED TO TEST - ".dcr", - ".drf", // NEED TO TEST - ".k25", - ".3fr", - ".ari", // NEED TO TEST - ".bay", // NEED TO TEST - ".cap", // NEED TO TEST - ".iiq", - ".eip", // NEED TO TEST - ".fff", - ".mef", - - // ".mdc", // Crashes in GetFullBitmapFromPathAsync - ".mos", - ".R3D", - ".rwz", // NEED TO TEST - ".x3f", - ".ori", - ".cr3", - - ".svg", - - ".qoi", - }; } } From 863f7aa233628b51394c9c7ed00badd0c63f0c85 Mon Sep 17 00:00:00 2001 From: Dave Rayment Date: Fri, 22 Nov 2024 16:24:15 +0000 Subject: [PATCH 4/5] [Peek] Fix Monaco assets folder discovery (#35925) --- src/common/FilePreviewCommon/MonacoHelper.cs | 40 +++++++++----------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/src/common/FilePreviewCommon/MonacoHelper.cs b/src/common/FilePreviewCommon/MonacoHelper.cs index 20ea747e2e..e8442c0bff 100644 --- a/src/common/FilePreviewCommon/MonacoHelper.cs +++ b/src/common/FilePreviewCommon/MonacoHelper.cs @@ -29,34 +29,28 @@ namespace Microsoft.PowerToys.FilePreviewCommon new XmlFormatter(), }.AsReadOnly(); - private static string? _monacoDirectory; + private static readonly Lazy _monacoDirectory = new(GetRuntimeMonacoDirectory); - public static string GetRuntimeMonacoDirectory() + /// + /// Gets the path of the Monaco assets folder. + /// + public static string MonacoDirectory => _monacoDirectory.Value; + + private static string GetRuntimeMonacoDirectory() { - string codeBase = Assembly.GetExecutingAssembly().Location; - string path = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(codeBase) ?? string.Empty, "Assets", "Monaco")); - if (Path.Exists(path)) - { - return path; - } - else - { - // We're likely in WinUI3Apps directory and need to go back to the base directory. - return Path.GetFullPath(Path.Combine(Path.GetDirectoryName(codeBase) ?? string.Empty, "..", "Assets", "Monaco")); - } - } + string exePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty; - public static string MonacoDirectory - { - get + // If the executable is within "WinUI3Apps", correct the path first. + if (Path.GetFileName(exePath) == "WinUI3Apps") { - if (string.IsNullOrEmpty(_monacoDirectory)) - { - _monacoDirectory = GetRuntimeMonacoDirectory(); - } - - return _monacoDirectory; + exePath = Path.Combine(exePath, ".."); } + + string monacoPath = Path.Combine(exePath, "Assets", "Monaco"); + + return Directory.Exists(monacoPath) ? + monacoPath : + throw new DirectoryNotFoundException($"Monaco assets directory not found at {monacoPath}"); } public static JsonDocument GetLanguages() From 6cece12b85a1d8cced42b65394599858c3c38a13 Mon Sep 17 00:00:00 2001 From: Dave Rayment Date: Fri, 22 Nov 2024 16:25:01 +0000 Subject: [PATCH 5/5] [Peek]Add support for previewing .ahk files as plaintext (#35538) --- src/Monaco/monacoSpecialLanguages.js | 2 +- src/Monaco/monaco_languages.json | 2 +- .../Previewers/WebBrowserPreviewer/Helpers/MonacoHelper.cs | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Monaco/monacoSpecialLanguages.js b/src/Monaco/monacoSpecialLanguages.js index c213f617bb..e237c404f0 100644 --- a/src/Monaco/monacoSpecialLanguages.js +++ b/src/Monaco/monacoSpecialLanguages.js @@ -7,7 +7,7 @@ export async function registerAdditionalLanguages(monaco){ await languageDefinitions(); registerAdditionalLanguage("cppExt", [".ino", ".pde"], "cpp", monaco) registerAdditionalLanguage("xmlExt", [".wsdl", ".csproj", ".vcxproj", ".vbproj", ".fsproj"], "xml", monaco) - registerAdditionalLanguage("txtExt", [".sln", ".log", ".vsconfig", ".env", ".srt"], "txt", monaco) + registerAdditionalLanguage("txtExt", [".sln", ".log", ".vsconfig", ".env", ".srt", ".ahk"], "txt", monaco) registerAdditionalLanguage("razorExt", [".razor"], "razor", monaco) registerAdditionalLanguage("vbExt", [".vbs"], "vb", monaco) registerAdditionalLanguage("iniExt", [".inf", ".gitconfig", ".gitattributes", ".editorconfig"], "ini", monaco) diff --git a/src/Monaco/monaco_languages.json b/src/Monaco/monaco_languages.json index 28fa3c98b4..7cdb5ae252 100644 --- a/src/Monaco/monaco_languages.json +++ b/src/Monaco/monaco_languages.json @@ -1 +1 @@ -{"list":[{"id":"plaintext","extensions":[".txt"],"aliases":["Plain Text","text"],"mimetypes":["text/plain"]},{"id":"abap","extensions":[".abap"],"aliases":["abap","ABAP"]},{"id":"apex","extensions":[".cls"],"aliases":["Apex","apex"],"mimetypes":["text/x-apex-source","text/x-apex"]},{"id":"azcli","extensions":[".azcli"],"aliases":["Azure CLI","azcli"]},{"id":"bat","extensions":[".bat",".cmd"],"aliases":["Batch","bat"]},{"id":"bicep","extensions":[".bicep"],"aliases":["Bicep"]},{"id":"cameligo","extensions":[".mligo"],"aliases":["Cameligo"]},{"id":"clojure","extensions":[".clj",".cljs",".cljc",".edn"],"aliases":["clojure","Clojure"]},{"id":"coffeescript","extensions":[".coffee"],"aliases":["CoffeeScript","coffeescript","coffee"],"mimetypes":["text/x-coffeescript","text/coffeescript"]},{"id":"c","extensions":[".c",".h"],"aliases":["C","c"]},{"id":"cpp","extensions":[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],"aliases":["C++","Cpp","cpp"]},{"id":"csharp","extensions":[".cs",".csx",".cake"],"aliases":["C#","csharp"]},{"id":"csp","extensions":[],"aliases":["CSP","csp"]},{"id":"css","extensions":[".css"],"aliases":["CSS","css"],"mimetypes":["text/css"]},{"id":"cypher","extensions":[".cypher",".cyp"],"aliases":["Cypher","OpenCypher"]},{"id":"dart","extensions":[".dart"],"aliases":["Dart","dart"],"mimetypes":["text/x-dart-source","text/x-dart"]},{"id":"dockerfile","extensions":[".dockerfile"],"filenames":["Dockerfile"],"aliases":["Dockerfile"]},{"id":"ecl","extensions":[".ecl"],"aliases":["ECL","Ecl","ecl"]},{"id":"elixir","extensions":[".ex",".exs"],"aliases":["Elixir","elixir","ex"]},{"id":"flow9","extensions":[".flow"],"aliases":["Flow9","Flow","flow9","flow"]},{"id":"fsharp","extensions":[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],"aliases":["F#","FSharp","fsharp"]},{"id":"freemarker2","extensions":[".ftl",".ftlh",".ftlx"],"aliases":["FreeMarker2","Apache FreeMarker2"]},{"id":"freemarker2.tag-angle.interpolation-dollar","aliases":["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"]},{"id":"freemarker2.tag-bracket.interpolation-dollar","aliases":["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"]},{"id":"freemarker2.tag-angle.interpolation-bracket","aliases":["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"]},{"id":"freemarker2.tag-bracket.interpolation-bracket","aliases":["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"]},{"id":"freemarker2.tag-auto.interpolation-dollar","aliases":["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"]},{"id":"freemarker2.tag-auto.interpolation-bracket","aliases":["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"]},{"id":"go","extensions":[".go"],"aliases":["Go"]},{"id":"graphql","extensions":[".graphql",".gql"],"aliases":["GraphQL","graphql","gql"],"mimetypes":["application/graphql"]},{"id":"handlebars","extensions":[".handlebars",".hbs"],"aliases":["Handlebars","handlebars","hbs"],"mimetypes":["text/x-handlebars-template"]},{"id":"hcl","extensions":[".tf",".tfvars",".hcl"],"aliases":["Terraform","tf","HCL","hcl"]},{"id":"html","extensions":[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],"aliases":["HTML","htm","html","xhtml"],"mimetypes":["text/html","text/x-jshtm","text/template","text/ng-template"]},{"id":"ini","extensions":[".ini",".properties",".gitconfig"],"filenames":["config",".gitattributes",".gitconfig",".editorconfig"],"aliases":["Ini","ini"]},{"id":"java","extensions":[".java",".jav"],"aliases":["Java","java"],"mimetypes":["text/x-java-source","text/x-java"]},{"id":"javascript","extensions":[".js",".es6",".jsx",".mjs",".cjs"],"firstLine":"^#!.*\\bnode","filenames":["jakefile"],"aliases":["JavaScript","javascript","js"],"mimetypes":["text/javascript"]},{"id":"julia","extensions":[".jl"],"aliases":["julia","Julia"]},{"id":"kotlin","extensions":[".kt",".kts"],"aliases":["Kotlin","kotlin"],"mimetypes":["text/x-kotlin-source","text/x-kotlin"]},{"id":"less","extensions":[".less"],"aliases":["Less","less"],"mimetypes":["text/x-less","text/less"]},{"id":"lexon","extensions":[".lex"],"aliases":["Lexon"]},{"id":"lua","extensions":[".lua"],"aliases":["Lua","lua"]},{"id":"liquid","extensions":[".liquid",".html.liquid"],"aliases":["Liquid","liquid"],"mimetypes":["application/liquid"]},{"id":"m3","extensions":[".m3",".i3",".mg",".ig"],"aliases":["Modula-3","Modula3","modula3","m3"]},{"id":"markdown","extensions":[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],"aliases":["Markdown","markdown"]},{"id":"mdx","extensions":[".mdx"],"aliases":["MDX","mdx"]},{"id":"mips","extensions":[".s"],"aliases":["MIPS","MIPS-V"],"mimetypes":["text/x-mips","text/mips","text/plaintext"]},{"id":"msdax","extensions":[".dax",".msdax"],"aliases":["DAX","MSDAX"]},{"id":"mysql","extensions":[],"aliases":["MySQL","mysql"]},{"id":"objective-c","extensions":[".m"],"aliases":["Objective-C"]},{"id":"pascal","extensions":[".pas",".p",".pp"],"aliases":["Pascal","pas"],"mimetypes":["text/x-pascal-source","text/x-pascal"]},{"id":"pascaligo","extensions":[".ligo"],"aliases":["Pascaligo","ligo"]},{"id":"perl","extensions":[".pl",".pm"],"aliases":["Perl","pl"]},{"id":"pgsql","extensions":[],"aliases":["PostgreSQL","postgres","pg","postgre"]},{"id":"php","extensions":[".php",".php4",".php5",".phtml",".ctp"],"aliases":["PHP","php"],"mimetypes":["application/x-php"]},{"id":"pla","extensions":[".pla"]},{"id":"postiats","extensions":[".dats",".sats",".hats"],"aliases":["ATS","ATS/Postiats"]},{"id":"powerquery","extensions":[".pq",".pqm"],"aliases":["PQ","M","Power Query","Power Query M"]},{"id":"powershell","extensions":[".ps1",".psm1",".psd1"],"aliases":["PowerShell","powershell","ps","ps1"]},{"id":"proto","extensions":[".proto"],"aliases":["protobuf","Protocol Buffers"]},{"id":"pug","extensions":[".jade",".pug"],"aliases":["Pug","Jade","jade"]},{"id":"python","extensions":[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],"aliases":["Python","py"],"firstLine":"^#!/.*\\bpython[0-9.-]*\\b"},{"id":"qsharp","extensions":[".qs"],"aliases":["Q#","qsharp"]},{"id":"r","extensions":[".r",".rhistory",".rmd",".rprofile",".rt"],"aliases":["R","r"]},{"id":"razor","extensions":[".cshtml"],"aliases":["Razor","razor"],"mimetypes":["text/x-cshtml"]},{"id":"redis","extensions":[".redis"],"aliases":["redis"]},{"id":"redshift","extensions":[],"aliases":["Redshift","redshift"]},{"id":"restructuredtext","extensions":[".rst"],"aliases":["reStructuredText","restructuredtext"]},{"id":"ruby","extensions":[".rb",".rbx",".rjs",".gemspec",".pp"],"filenames":["rakefile","Gemfile"],"aliases":["Ruby","rb"]},{"id":"rust","extensions":[".rs",".rlib"],"aliases":["Rust","rust"]},{"id":"sb","extensions":[".sb"],"aliases":["Small Basic","sb"]},{"id":"scala","extensions":[".scala",".sc",".sbt"],"aliases":["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],"mimetypes":["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"]},{"id":"scheme","extensions":[".scm",".ss",".sch",".rkt"],"aliases":["scheme","Scheme"]},{"id":"scss","extensions":[".scss"],"aliases":["Sass","sass","scss"],"mimetypes":["text/x-scss","text/scss"]},{"id":"shell","extensions":[".sh",".bash"],"aliases":["Shell","sh"]},{"id":"sol","extensions":[".sol"],"aliases":["sol","solidity","Solidity"]},{"id":"aes","extensions":[".aes"],"aliases":["aes","sophia","Sophia"]},{"id":"sparql","extensions":[".rq"],"aliases":["sparql","SPARQL"]},{"id":"sql","extensions":[".sql"],"aliases":["SQL"]},{"id":"st","extensions":[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],"aliases":["StructuredText","scl","stl"]},{"id":"swift","aliases":["Swift","swift"],"extensions":[".swift"],"mimetypes":["text/swift"]},{"id":"systemverilog","extensions":[".sv",".svh"],"aliases":["SV","sv","SystemVerilog","systemverilog"]},{"id":"verilog","extensions":[".v",".vh"],"aliases":["V","v","Verilog","verilog"]},{"id":"tcl","extensions":[".tcl"],"aliases":["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"]},{"id":"twig","extensions":[".twig"],"aliases":["Twig","twig"],"mimetypes":["text/x-twig"]},{"id":"typescript","extensions":[".ts",".tsx",".cts",".mts"],"aliases":["TypeScript","ts","typescript"],"mimetypes":["text/typescript"]},{"id":"vb","extensions":[".vb"],"aliases":["Visual Basic","vb"]},{"id":"wgsl","extensions":[".wgsl"],"aliases":["WebGPU Shading Language","WGSL","wgsl"]},{"id":"xml","extensions":[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],"firstLine":"(\\<\\?xml.*)|(\\ GetExtensions() { - HashSet set = new HashSet(); + HashSet set = []; + try { - JsonDocument languageListDocument = Microsoft.PowerToys.FilePreviewCommon.MonacoHelper.GetLanguages(); + using JsonDocument languageListDocument = Microsoft.PowerToys.FilePreviewCommon.MonacoHelper.GetLanguages(); JsonElement languageList = languageListDocument.RootElement.GetProperty("list"); foreach (JsonElement e in languageList.EnumerateArray()) {