mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-01-12 15:26:28 +01:00
Rename the extension SDK to Microsoft.CmdPal.Extensions (#40)
This obviously touched the entire world
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
"snippets":
|
||||
[
|
||||
{
|
||||
"input": "pwsh -c .\\doc\\initial-sdk-spec\\generate-interface.ps1 > .\\extensionsdk\\Microsoft.Windows.CommandPalette.Extensions\\Microsoft.Windows.CommandPalette.Extensions.idl",
|
||||
"input": "pwsh -c .\\doc\\initial-sdk-spec\\generate-interface.ps1 > .\\extensionsdk\\Microsoft.CmdPal.Extensions\\Microsoft.CmdPal.Extensions.idl",
|
||||
"name": "Generate interface",
|
||||
"description": "Generate the interface from the SDK spec\nThis drops it into Microsoft.Windows.CommandPalette.Extensions"
|
||||
"description": "Generate the interface from the SDK spec\nThis drops it into Microsoft.CmdPal.Extensions"
|
||||
},
|
||||
{
|
||||
"input": "tasklist | findstr Extension",
|
||||
|
||||
@@ -14,6 +14,6 @@ First things first: make sure you've opened up the root PowerToys.sln, and resto
|
||||
|
||||
Then, to build the Windows Command Palette, you can open up `WindowsCommandPalette.sln`. Projects of interest are:
|
||||
* `Microsoft.CmdPal.UI.Poc`: This is the main project for the Windows Command Palette. Build and run this to get the command palette..
|
||||
* `Microsoft.Windows.CommandPalette.Extensions`: This is the official extension interface.
|
||||
* `Microsoft.CmdPal.Extensions`: This is the official extension interface.
|
||||
* `Microsoft.CmdPal.Extensions.Helpers`: This is a C# helper library for creating extensions. This makes writing extensions easier.
|
||||
* Everything under "Sample Plugins": These are example plugins to demo how to author extensions. Deploy any number of these.
|
||||
|
||||
@@ -10,9 +10,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Terminal.UI", "sr
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extension SDK", "Extension SDK", "{FAA24D36-5515-467C-91E7-101A189AAF48}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Windows.CommandPalette.Extensions", "extensionsdk\Microsoft.Windows.CommandPalette.Extensions\Microsoft.Windows.CommandPalette.Extensions.vcxproj", "{305DD37E-C85D-4B08-AAFE-7381FA890463}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.CmdPal.Extensions", "extensionsdk\Microsoft.CmdPal.Extensions\Microsoft.CmdPal.Extensions.vcxproj", "{305DD37E-C85D-4B08-AAFE-7381FA890463}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Extensions.Helpers", "extensionsdk\Microsoft.Windows.CommandPalette.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj", "{79060D06-7174-4D66-8D0B-4FF021154049}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Extensions.Helpers", "extensionsdk\Microsoft.CmdPal.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj", "{79060D06-7174-4D66-8D0B-4FF021154049}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Common", "src\Microsoft.CmdPal.Common\Microsoft.CmdPal.Common.csproj", "{05CDE6EE-23AE-42AF-A9F5-E398C382675F}"
|
||||
EndProject
|
||||
|
||||
@@ -11,7 +11,7 @@ foreach ($item in $json.children) {
|
||||
if ($item.language -eq 'c#') {
|
||||
$code = $item.children.content
|
||||
# Each line that starts with with `runtimeclass` or `interface` should be prefixed with the contract attribute
|
||||
$code = $code -replace "(?m)^(runtimeclass|interface) ", "[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]`n`$1 "
|
||||
$code = $code -replace "(?m)^(runtimeclass|interface) ", "[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]`n`$1 "
|
||||
|
||||
# all the lines that start with `(whitespace)async (T)` should be translated to `IAsyncOperation<T>`
|
||||
$code = $code -replace "(?m)^(\s*)async\s+(void)\s+([A-Za-z0-9_]+)\s*\(", "`$1Windows.Foundation.IAsyncAction `$3("
|
||||
@@ -31,7 +31,7 @@ foreach ($item in $json.children) {
|
||||
if ($item.language -eq 'csharp') {
|
||||
$code = $item.children.content
|
||||
# Each line that starts with with `runtimeclass` or `interface` should be prefixed with the contract attribute
|
||||
$code = $code -replace "(?m)^(runtimeclass|interface) ", "[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]`n`$1 "
|
||||
$code = $code -replace "(?m)^(runtimeclass|interface) ", "[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]`n`$1 "
|
||||
|
||||
# all the lines that start with `(whitespace)async (T)` should be translated to `IAsyncOperation<T>`
|
||||
$code = $code -replace "(?m)^(\s*)async\s+(void)\s+([A-Za-z0-9_]+)\s*\(", "`$1Windows.Foundation.IAsyncAction `$3("
|
||||
@@ -48,34 +48,34 @@ foreach ($item in $json.children) {
|
||||
|
||||
# now, write the fully formatted interface with headers and all:
|
||||
Write-Output @"
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions
|
||||
namespace Microsoft.CmdPal.Extensions
|
||||
{
|
||||
[contractversion(1)]
|
||||
apicontract RunContract {}
|
||||
apicontract ExtensionsContract {}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IExtension {
|
||||
IInspectable GetProvider(ProviderType providerType);
|
||||
void Dispose();
|
||||
};
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
enum ProviderType {
|
||||
Commands = 0,
|
||||
};
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
runtimeclass IconDataType {
|
||||
IconDataType(String iconString);
|
||||
String Icon { get; };
|
||||
};
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface INotifyPropChanged {
|
||||
event Windows.Foundation.TypedEventHandler<Object, PropChangedEventArgs> PropChanged;
|
||||
};
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
runtimeclass PropChangedEventArgs {
|
||||
PropChangedEventArgs(String propertyName);
|
||||
String PropertyName { get; };
|
||||
|
||||
@@ -358,7 +358,7 @@ extensions simpler.
|
||||
Below details the SDK that developers can use to create extensions for the
|
||||
DevPal. These interfaces are exposed through the `Microsoft.Windows.Run`
|
||||
namespace. We'll expose an SDK with helper classes and default implementations
|
||||
in the `Microsoft.Windows.CommandPalette.Extensions` namespace.
|
||||
in the `Microsoft.CmdPal.Extensions` namespace.
|
||||
|
||||
> [NOTE!]
|
||||
>
|
||||
@@ -1146,7 +1146,7 @@ thinking about storing credentials securely.
|
||||
|
||||
## Helper SDK Classes
|
||||
|
||||
As a part of the `Microsoft.Windows.CommandPalette.Extensions` namespace, we'll provide a set of
|
||||
As a part of the `Microsoft.CmdPal.Extensions` namespace, we'll provide a set of
|
||||
default implementations and helper classes that developers can use to make
|
||||
authoring extensions easier.
|
||||
|
||||
@@ -1369,7 +1369,7 @@ The `.idl` for this SDK can be generated directly from this file. To do so, run
|
||||
Or, to generate straight to the place I'm consuming it from:
|
||||
|
||||
```ps1
|
||||
.\doc\initial-sdk-spec\generate-interface.ps1 > .\extensionsdk\Microsoft.Windows.CommandPalette.Extensions\Microsoft.Windows.Run.Extensions.idl
|
||||
.\doc\initial-sdk-spec\generate-interface.ps1 > .\extensionsdk\Microsoft.CmdPal.Extensions\Microsoft.Windows.Run.Extensions.idl
|
||||
```
|
||||
|
||||
[^1]: In this example, as in other places, I've referenced a
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Diagnostics;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace HackerNewsExtension;
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace HackerNewsExtension;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\extensionsdk\Microsoft.Windows.CommandPalette.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj" />
|
||||
<ProjectReference Include="..\..\extensionsdk\Microsoft.CmdPal.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
|
||||
@@ -8,8 +8,8 @@ using System.Net.Http;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace HackerNewsExtension;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Diagnostics;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace HackerNewsExtension;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
|
||||
namespace HackerNewsExtension;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
|
||||
namespace HackerNewsExtension;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\extensionsdk\Microsoft.Windows.CommandPalette.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj" />
|
||||
<ProjectReference Include="..\..\extensionsdk\Microsoft.CmdPal.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace MastodonExtension;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
|
||||
namespace MastodonExtension;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
|
||||
namespace MastodonExtension;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
|
||||
namespace MediaControlsExtension;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\extensionsdk\Microsoft.Windows.CommandPalette.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj" />
|
||||
<ProjectReference Include="..\..\extensionsdk\Microsoft.CmdPal.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
using Windows.Media.Control;
|
||||
|
||||
namespace MediaControlsExtension;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
using Windows.Media.Control;
|
||||
|
||||
namespace MediaControlsExtension;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
|
||||
namespace MediaControlsExtension;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
|
||||
namespace MediaControlsExtension;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
using Windows.Media.Control;
|
||||
|
||||
namespace MediaControlsExtension;
|
||||
|
||||
@@ -6,8 +6,8 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace ProcessMonitorExtension;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace ProcessMonitorExtension;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\extensionsdk\Microsoft.Windows.CommandPalette.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj">
|
||||
<ProjectReference Include="..\..\extensionsdk\Microsoft.CmdPal.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj">
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
|
||||
namespace ProcessMonitorExtension;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
|
||||
namespace ProcessMonitorExtension;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace ProcessMonitorExtension;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Diagnostics;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace ProcessMonitorExtension;
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Run.SDK", "Run.SDK", "{FAA24D36-5515-467C-91E7-101A189AAF48}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Windows.CommandPalette.Extensions", "..\extensionsdk\Microsoft.Windows.CommandPalette.Extensions\Microsoft.Windows.CommandPalette.Extensions.vcxproj", "{305DD37E-C85D-4B08-AAFE-7381FA890463}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.CmdPal.Extensions", "..\extensionsdk\Microsoft.CmdPal.Extensions\Microsoft.CmdPal.Extensions.vcxproj", "{305DD37E-C85D-4B08-AAFE-7381FA890463}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.CommandPalette.Extensions.Helpers", "..\extensionsdk\Microsoft.Windows.CommandPalette.Extensions.Helpers\Microsoft.Windows.CommandPalette.Extensions.Helpers.csproj", "{79060D06-7174-4D66-8D0B-4FF021154049}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Extensions.Helpers", "..\extensionsdk\Microsoft.CmdPal.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj", "{79060D06-7174-4D66-8D0B-4FF021154049}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HackerNewsExtension", "HackerNewsExtension\HackerNewsExtension.csproj", "{D343B8C6-4F11-483F-B070-AB6D357534CE}"
|
||||
EndProject
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace SpongebotExtension;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
|
||||
namespace SpongebotExtension;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
|
||||
namespace SpongebotExtension;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text.Json.Nodes;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace SpongebotExtension;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace SpongebotExtension;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\extensionsdk\Microsoft.Windows.CommandPalette.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj" />
|
||||
<ProjectReference Include="..\..\extensionsdk\Microsoft.CmdPal.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
|
||||
@@ -7,8 +7,8 @@ using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace SpongebotExtension;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace SpongebotExtension;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
|
||||
namespace TemplateExtension;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
|
||||
namespace TemplateExtension;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\extensionsdk\Microsoft.Windows.CommandPalette.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj" />
|
||||
<ProjectReference Include="..\..\extensionsdk\Microsoft.CmdPal.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace TemplateExtension;
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ Try {
|
||||
("$PSScriptRoot\CmdPalSDK.sln"),
|
||||
("/p:Platform="+$platform),
|
||||
("/p:Configuration="+$config),
|
||||
("/binaryLogger:Microsoft.Windows.CommandPalette.Extensions.$platform.$config.binlog"),
|
||||
("/binaryLogger:Microsoft.CmdPal.Extensions.$platform.$config.binlog"),
|
||||
("/p:VersionNumber="+$VersionOfSDK)
|
||||
)
|
||||
|
||||
@@ -78,7 +78,7 @@ Try {
|
||||
foreach ($config in $Configuration.Split(",")) {
|
||||
if ($config -eq "release")
|
||||
{
|
||||
& $nugetPath pack (Join-Path $PSScriptRoot "nuget\Microsoft.Windows.CommandPalette.Extensions.nuspec") -Version $VersionOfSDK -OutputDirectory "$PSScriptRoot\_build"
|
||||
& $nugetPath pack (Join-Path $PSScriptRoot "nuget\Microsoft.CmdPal.Extensions.nuspec") -Version $VersionOfSDK -OutputDirectory "$PSScriptRoot\_build"
|
||||
} else {
|
||||
Write-Host @"
|
||||
WARNING: You are currently building as '$config' configuration.
|
||||
|
||||
@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.3.32901.215
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Windows.CommandPalette.Extensions", "Microsoft.Windows.CommandPalette.Extensions\Microsoft.Windows.CommandPalette.Extensions.vcxproj", "{305DD37E-C85D-4B08-AAFE-7381FA890463}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.CmdPal.Extensions", "Microsoft.CmdPal.Extensions\Microsoft.CmdPal.Extensions.vcxproj", "{305DD37E-C85D-4B08-AAFE-7381FA890463}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.CommandPalette.Extensions.Helpers", "Microsoft.Windows.CommandPalette.Extensions.Helpers\Microsoft.Windows.CommandPalette.Extensions.Helpers.csproj", "{79060D06-7174-4D66-8D0B-4FF021154049}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CmdPal.Extensions.Helpers", "Microsoft.CmdPal.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj", "{79060D06-7174-4D66-8D0B-4FF021154049}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class Action : BaseObservable, ICommand
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class ActionResult : ICommandResult
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Windows.Foundation;
|
||||
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
// TODO! We probably want to have OnPropertyChanged raise the event
|
||||
// asynchonously, so as to not block the extension app while it's being
|
||||
@@ -11,6 +11,6 @@ public class BaseObservable : INotifyPropChanged
|
||||
protected void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
if (PropChanged != null)
|
||||
PropChanged.Invoke(this, new Microsoft.Windows.CommandPalette.Extensions.PropChangedEventArgs(propertyName));
|
||||
PropChanged.Invoke(this, new Microsoft.CmdPal.Extensions.PropChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
// shamelessly from https://github.com/PowerShell/PowerShell/blob/master/src/Microsoft.PowerShell.Commands.Management/commands/management/Clipboard.cs
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class CommandContextItem : ICommandContextItem
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class Details : BaseObservable, IDetails
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class DetailsElement : IDetailsElement
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class DetailsLink : IDetailsLink
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class DetailsTags : IDetailsTags
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class DynamicListPage : ListPage, IDynamicListPage
|
||||
{
|
||||
@@ -6,7 +6,7 @@ using Windows.Win32;
|
||||
using Windows.Win32.Foundation;
|
||||
using WinRT;
|
||||
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions;
|
||||
namespace Microsoft.CmdPal.Extensions;
|
||||
|
||||
[ComVisible(true)]
|
||||
internal sealed class ExtensionInstanceManager<T> : IClassFactory
|
||||
@@ -4,7 +4,7 @@
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions;
|
||||
namespace Microsoft.CmdPal.Extensions;
|
||||
|
||||
public sealed class ExtensionServer : IDisposable
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class Filter : IFilter
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class Form: IForm
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class FormPage : Action, IFormPage
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class GoToPageArgs : IGoToPageArgs
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class InvokableCommand : Action, IInvokableCommand
|
||||
{
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class ListHelpers
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class ListItem : BaseObservable, IListItem
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class ListPage : Action, IListPage
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class ListSection : ISection
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class MarkdownPage : Action, IMarkdownPage
|
||||
{
|
||||
@@ -7,7 +7,7 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: InternalsVisibleTo("Microsoft.Plugin.Program.UnitTests")]
|
||||
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class MatchOption
|
||||
{
|
||||
@@ -24,4 +24,4 @@ public class MatchOption
|
||||
public string Suffix { get; set; } = string.Empty;
|
||||
|
||||
public bool IgnoreCase { get; set; } = true;
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: InternalsVisibleTo("Microsoft.Plugin.Program.UnitTests")]
|
||||
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class MatchResult
|
||||
{
|
||||
@@ -71,4 +71,4 @@ public class MatchResult
|
||||
{
|
||||
return IsSearchPrecisionScoreMet(rawScore) ? rawScore : 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<CsWinRTIncludes>Microsoft.Windows.CommandPalette.Extensions</CsWinRTIncludes>
|
||||
<CsWinRTIncludes>Microsoft.CmdPal.Extensions</CsWinRTIncludes>
|
||||
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.Windows.CommandPalette.Extensions\Microsoft.Windows.CommandPalette.Extensions.vcxproj" />
|
||||
<ProjectReference Include="..\Microsoft.CmdPal.Extensions\Microsoft.CmdPal.Extensions.vcxproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class NoOpAction : InvokableCommand
|
||||
{
|
||||
@@ -6,11 +6,11 @@
|
||||
//[assembly: InternalsVisibleTo("Microsoft.PowerToys.Run.Plugin.System.UnitTests")]
|
||||
//[assembly: InternalsVisibleTo("Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests")]
|
||||
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public enum SearchPrecisionScore
|
||||
{
|
||||
Regular = 50,
|
||||
Low = 20,
|
||||
None = 0,
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ using System.Globalization;
|
||||
//[assembly: InternalsVisibleTo("Microsoft.PowerToys.Run.Plugin.System.UnitTests")]
|
||||
//[assembly: InternalsVisibleTo("Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests")]
|
||||
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class StringMatcher
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Windows.UI;
|
||||
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
namespace Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
public class Tag : BaseObservable, ITag
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "IconDataType.g.h"
|
||||
|
||||
namespace winrt::Microsoft::Windows::CommandPalette::Extensions::implementation
|
||||
namespace winrt::Microsoft::CmdPal::Extensions::implementation
|
||||
{
|
||||
struct IconDataType : IconDataTypeT<IconDataType>
|
||||
{
|
||||
@@ -14,7 +14,7 @@ namespace winrt::Microsoft::Windows::CommandPalette::Extensions::implementation
|
||||
til::property<hstring> Icon;
|
||||
};
|
||||
}
|
||||
namespace winrt::Microsoft::Windows::CommandPalette::Extensions::factory_implementation
|
||||
namespace winrt::Microsoft::CmdPal::Extensions::factory_implementation
|
||||
{
|
||||
struct IconDataType : IconDataTypeT<IconDataType, implementation::IconDataType>
|
||||
{
|
||||
@@ -0,0 +1,222 @@
|
||||
namespace Microsoft.CmdPal.Extensions
|
||||
{
|
||||
[contractversion(1)]
|
||||
apicontract ExtensionsContract {}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IExtension {
|
||||
IInspectable GetProvider(ProviderType providerType);
|
||||
void Dispose();
|
||||
};
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
enum ProviderType {
|
||||
Commands = 0,
|
||||
};
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
runtimeclass IconDataType {
|
||||
IconDataType(String iconString);
|
||||
String Icon { get; };
|
||||
};
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface INotifyPropChanged {
|
||||
event Windows.Foundation.TypedEventHandler<Object, PropChangedEventArgs> PropChanged;
|
||||
};
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
runtimeclass PropChangedEventArgs {
|
||||
PropChangedEventArgs(String propertyName);
|
||||
String PropertyName { get; };
|
||||
};
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ICommand requires INotifyPropChanged{
|
||||
String Name{ get; };
|
||||
IconDataType Icon{ get; };
|
||||
}
|
||||
|
||||
enum CommandResultKind {
|
||||
Dismiss, // Reset the palette to the main page and dismiss
|
||||
GoHome, // Go back to the main page, but keep it open
|
||||
KeepOpen, // Do nothing.
|
||||
GoToPage, // Go to another page. GoToPageArgs will tell you where.
|
||||
};
|
||||
[uuid("f9d6423b-bd5e-44bb-a204-2f5c77a72396")]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ICommandResultArgs{};
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ICommandResult {
|
||||
CommandResultKind Kind { get; };
|
||||
ICommandResultArgs Args { get; };
|
||||
}
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IGoToPageArgs requires ICommandResultArgs{
|
||||
String PageId { get; };
|
||||
}
|
||||
|
||||
// This is a "leaf" of the UI. This is something that can be "done" by the user.
|
||||
// * A ListPage
|
||||
// * the MoreCommands flyout of for a ListItem or a MarkdownPage
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IInvokableCommand requires ICommand {
|
||||
ICommandResult Invoke();
|
||||
}
|
||||
|
||||
[uuid("ef5db50c-d26b-4aee-9343-9f98739ab411")]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IFilterItem {}
|
||||
|
||||
[uuid("0a923c7f-5b7b-431d-9898-3c8c841d02ed")]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ISeparatorFilterItem requires IFilterItem {}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IFilter requires IFilterItem {
|
||||
String Id { get; };
|
||||
String Name { get; };
|
||||
IconDataType Icon { get; };
|
||||
}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IFilters {
|
||||
String CurrentFilterId { get; set; };
|
||||
IFilterItem[] Filters();
|
||||
}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ITag {
|
||||
IconDataType Icon { get; };
|
||||
String Text { get; };
|
||||
Windows.UI.Color Color { get; };
|
||||
String ToolTip { get; };
|
||||
ICommand Command { get; };
|
||||
};
|
||||
|
||||
[uuid("6a6dd345-37a3-4a1e-914d-4f658a4d583d")]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDetailsData {}
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDetailsElement {
|
||||
String Key { get; };
|
||||
IDetailsData Data { get; };
|
||||
}
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDetails {
|
||||
IconDataType HeroImage { get; };
|
||||
String Title { get; };
|
||||
String Body { get; };
|
||||
IDetailsElement[] Metadata { get; };
|
||||
}
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDetailsTags requires IDetailsData {
|
||||
ITag[] Tags { get; };
|
||||
}
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDetailsLink requires IDetailsData {
|
||||
Windows.Foundation.Uri Link { get; };
|
||||
String Text { get; };
|
||||
}
|
||||
[uuid("58070392-02bb-4e89-9beb-47ceb8c3d741")]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDetailsSeparator requires IDetailsData {}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IPage requires ICommand {
|
||||
Boolean Loading { get; };
|
||||
}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IFallbackHandler {
|
||||
void UpdateQuery(String query);
|
||||
}
|
||||
|
||||
[uuid("c78b9851-e76b-43ee-8f76-da5ba14e69a4")]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IContextItem {}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ICommandContextItem requires IContextItem {
|
||||
ICommand Command { get; };
|
||||
String Tooltip { get; };
|
||||
Boolean IsCritical { get; }; // todo: better name for "make this red"
|
||||
|
||||
// TODO-future: we should allow app developers to specify a default keybinding for each of these actions
|
||||
}
|
||||
[uuid("924a87fc-32fe-4471-9156-84b3b30275a6")]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ISeparatorContextItem requires IContextItem {}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IListItem requires INotifyPropChanged {
|
||||
String Title{ get; };
|
||||
String Subtitle{ get; };
|
||||
ICommand Command{ get; };
|
||||
IContextItem[] MoreCommands{ get; }; // TODO: name should be better
|
||||
ITag[] Tags{ get; };
|
||||
IDetails Details{ get; };
|
||||
IFallbackHandler FallbackHandler{ get; };
|
||||
}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ISection {
|
||||
String Title { get; };
|
||||
IListItem[] Items { get; };
|
||||
}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IGridProperties {
|
||||
Windows.Foundation.Size TileSize { get; };
|
||||
}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IListPage requires IPage {
|
||||
String SearchText { get; };
|
||||
String PlaceholderText { get; };
|
||||
Boolean ShowDetails{ get; };
|
||||
IFilters Filters { get; };
|
||||
IGridProperties GridProperties { get; };
|
||||
|
||||
ISection[] GetItems(); // DevPal will be responsible for filtering the list of items
|
||||
}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDynamicListPage requires IListPage {
|
||||
ISection[] GetItems(String query); // DevPal will do no filtering of these items
|
||||
}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IMarkdownPage requires IPage {
|
||||
String Title { get; };
|
||||
String[] Bodies(); // TODO! should this be an IBody, so we can make it observable?
|
||||
IDetails Details();
|
||||
IContextItem[] Commands { get; };
|
||||
}
|
||||
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IForm { // TODO! should this be observable?
|
||||
String TemplateJson();
|
||||
String DataJson();
|
||||
String StateJson();
|
||||
ICommandResult SubmitForm(String payload);
|
||||
}
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IFormPage requires IPage {
|
||||
IForm[] Forms();
|
||||
}
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ICommandProvider requires Windows.Foundation.IClosable
|
||||
{
|
||||
String DisplayName { get; };
|
||||
IconDataType Icon { get; };
|
||||
// TODO! Boolean CanBeCached { get; };
|
||||
// TODO! IFormPage SettingsPage { get; };
|
||||
|
||||
IListItem[] TopLevelCommands();
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
@@ -15,8 +15,8 @@
|
||||
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
|
||||
<MinimalCoreWin>true</MinimalCoreWin>
|
||||
<ProjectGuid>{305dd37e-c85d-4b08-aafe-7381fa890463}</ProjectGuid>
|
||||
<ProjectName>Microsoft.Windows.CommandPalette.Extensions</ProjectName>
|
||||
<RootNamespace>Microsoft.Windows.CommandPalette.Extensions</RootNamespace>
|
||||
<ProjectName>Microsoft.CmdPal.Extensions</ProjectName>
|
||||
<RootNamespace>Microsoft.CmdPal.Extensions</RootNamespace>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
<AppContainerApplication>false</AppContainerApplication>
|
||||
@@ -122,7 +122,7 @@
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<ModuleDefinitionFile>Microsoft.Windows.CommandPalette.Extensions.def</ModuleDefinitionFile>
|
||||
<ModuleDefinitionFile>Microsoft.CmdPal.Extensions.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
@@ -154,11 +154,11 @@
|
||||
<ClCompile Include="PropChangedEventArgs.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="Microsoft.Windows.CommandPalette.Extensions.idl" />
|
||||
<Midl Include="Microsoft.CmdPal.Extensions.idl" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Microsoft.Windows.CommandPalette.Extensions.def" />
|
||||
<None Include="Microsoft.CmdPal.Extensions.def" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="readme.txt">
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "PropChangedEventArgs.g.h"
|
||||
|
||||
namespace winrt::Microsoft::Windows::CommandPalette::Extensions::implementation
|
||||
namespace winrt::Microsoft::CmdPal::Extensions::implementation
|
||||
{
|
||||
struct PropChangedEventArgs : PropChangedEventArgsT<PropChangedEventArgs>
|
||||
{
|
||||
@@ -12,7 +12,7 @@ namespace winrt::Microsoft::Windows::CommandPalette::Extensions::implementation
|
||||
};
|
||||
}
|
||||
|
||||
namespace winrt::Microsoft::Windows::CommandPalette::Extensions::factory_implementation
|
||||
namespace winrt::Microsoft::CmdPal::Extensions::factory_implementation
|
||||
{
|
||||
struct PropChangedEventArgs : PropChangedEventArgsT<PropChangedEventArgs, implementation::PropChangedEventArgs>
|
||||
{
|
||||
@@ -18,9 +18,9 @@ BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Microsoft Corporation"
|
||||
VALUE "FileDescription", "Microsoft.Windows.CommandPalette.Extensions.Helpers"
|
||||
VALUE "FileDescription", "Microsoft.CmdPal.Extensions.Helpers"
|
||||
VALUE "FileVersion", VERSION_NUMBER
|
||||
VALUE "ProductName", "Microsoft.Windows.CommandPalette.Extensions.Helpers"
|
||||
VALUE "ProductName", "Microsoft.CmdPal.Extensions.Helpers"
|
||||
VALUE "ProductVersion", VERSION_NUMBER
|
||||
VALUE "LegalCopyright", "Copyright (c) Microsoft Corporation"
|
||||
END
|
||||
@@ -1,5 +0,0 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
|
||||
public class DetailsSeparator : IDetailsSeparator
|
||||
{
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
|
||||
public class SeparatorContextItem : ISeparatorContextItem
|
||||
{
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
|
||||
public class SeparatorFilterItem : ISeparatorFilterItem
|
||||
{
|
||||
}
|
||||
@@ -1,42 +1,42 @@
|
||||
namespace Microsoft.Windows.CommandPalette.Extensions
|
||||
namespace Microsoft.CmdPal.Extensions
|
||||
{
|
||||
[contractversion(1)]
|
||||
apicontract RunContract {}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IExtension {
|
||||
IInspectable GetProvider(ProviderType providerType);
|
||||
void Dispose();
|
||||
};
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
enum ProviderType {
|
||||
Commands = 0,
|
||||
};
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
runtimeclass IconDataType {
|
||||
IconDataType(String iconString);
|
||||
String Icon { get; };
|
||||
};
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface INotifyPropChanged {
|
||||
event Windows.Foundation.TypedEventHandler<Object, PropChangedEventArgs> PropChanged;
|
||||
};
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
runtimeclass PropChangedEventArgs {
|
||||
PropChangedEventArgs(String propertyName);
|
||||
String PropertyName { get; };
|
||||
};
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ICommand requires INotifyPropChanged{
|
||||
String Name{ get; };
|
||||
IconDataType Icon{ get; };
|
||||
}
|
||||
|
||||
|
||||
enum CommandResultKind {
|
||||
Dismiss, // Reset the palette to the main page and dismiss
|
||||
GoHome, // Go back to the main page, but keep it open
|
||||
@@ -44,48 +44,48 @@ namespace Microsoft.Windows.CommandPalette.Extensions
|
||||
GoToPage, // Go to another page. GoToPageArgs will tell you where.
|
||||
};
|
||||
[uuid("f9d6423b-bd5e-44bb-a204-2f5c77a72396")]
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ICommandResultArgs{};
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ICommandResult {
|
||||
CommandResultKind Kind { get; };
|
||||
ICommandResultArgs Args { get; };
|
||||
}
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IGoToPageArgs requires ICommandResultArgs{
|
||||
String PageId { get; };
|
||||
}
|
||||
|
||||
|
||||
// This is a "leaf" of the UI. This is something that can be "done" by the user.
|
||||
// * A ListPage
|
||||
// * the MoreCommands flyout of for a ListItem or a MarkdownPage
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IInvokableCommand requires ICommand {
|
||||
ICommandResult Invoke();
|
||||
}
|
||||
|
||||
|
||||
[uuid("ef5db50c-d26b-4aee-9343-9f98739ab411")]
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IFilterItem {}
|
||||
|
||||
|
||||
[uuid("0a923c7f-5b7b-431d-9898-3c8c841d02ed")]
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ISeparatorFilterItem requires IFilterItem {}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IFilter requires IFilterItem {
|
||||
String Id { get; };
|
||||
String Name { get; };
|
||||
IconDataType Icon { get; };
|
||||
}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IFilters {
|
||||
String CurrentFilterId { get; set; };
|
||||
IFilterItem[] Filters();
|
||||
}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ITag {
|
||||
IconDataType Icon { get; };
|
||||
String Text { get; };
|
||||
@@ -93,62 +93,62 @@ namespace Microsoft.Windows.CommandPalette.Extensions
|
||||
String ToolTip { get; };
|
||||
ICommand Command { get; };
|
||||
};
|
||||
|
||||
|
||||
[uuid("6a6dd345-37a3-4a1e-914d-4f658a4d583d")]
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDetailsData {}
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDetailsElement {
|
||||
String Key { get; };
|
||||
IDetailsData Data { get; };
|
||||
}
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDetails {
|
||||
IconDataType HeroImage { get; };
|
||||
String Title { get; };
|
||||
String Body { get; };
|
||||
IDetailsElement[] Metadata { get; };
|
||||
}
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDetailsTags requires IDetailsData {
|
||||
ITag[] Tags { get; };
|
||||
}
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDetailsLink requires IDetailsData {
|
||||
Windows.Foundation.Uri Link { get; };
|
||||
String Text { get; };
|
||||
}
|
||||
[uuid("58070392-02bb-4e89-9beb-47ceb8c3d741")]
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDetailsSeparator requires IDetailsData {}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IPage requires ICommand {
|
||||
Boolean Loading { get; };
|
||||
}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IFallbackHandler {
|
||||
void UpdateQuery(String query);
|
||||
}
|
||||
|
||||
|
||||
[uuid("c78b9851-e76b-43ee-8f76-da5ba14e69a4")]
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IContextItem {}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ICommandContextItem requires IContextItem {
|
||||
ICommand Command { get; };
|
||||
String Tooltip { get; };
|
||||
Boolean IsCritical { get; }; // todo: better name for "make this red"
|
||||
|
||||
|
||||
// TODO-future: we should allow app developers to specify a default keybinding for each of these actions
|
||||
}
|
||||
[uuid("924a87fc-32fe-4471-9156-84b3b30275a6")]
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ISeparatorContextItem requires IContextItem {}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IListItem requires INotifyPropChanged {
|
||||
String Title{ get; };
|
||||
String Subtitle{ get; };
|
||||
@@ -158,65 +158,65 @@ namespace Microsoft.Windows.CommandPalette.Extensions
|
||||
IDetails Details{ get; };
|
||||
IFallbackHandler FallbackHandler{ get; };
|
||||
}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ISection {
|
||||
String Title { get; };
|
||||
IListItem[] Items { get; };
|
||||
}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IGridProperties {
|
||||
Windows.Foundation.Size TileSize { get; };
|
||||
}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IListPage requires IPage {
|
||||
String SearchText { get; };
|
||||
String PlaceholderText { get; };
|
||||
Boolean ShowDetails{ get; };
|
||||
IFilters Filters { get; };
|
||||
IGridProperties GridProperties { get; };
|
||||
|
||||
|
||||
ISection[] GetItems(); // DevPal will be responsible for filtering the list of items
|
||||
}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IDynamicListPage requires IListPage {
|
||||
ISection[] GetItems(String query); // DevPal will do no filtering of these items
|
||||
}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IMarkdownPage requires IPage {
|
||||
String Title { get; };
|
||||
String[] Bodies(); // TODO! should this be an IBody, so we can make it observable?
|
||||
IDetails Details();
|
||||
IContextItem[] Commands { get; };
|
||||
}
|
||||
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IForm { // TODO! should this be observable?
|
||||
String TemplateJson();
|
||||
String DataJson();
|
||||
String StateJson();
|
||||
ICommandResult SubmitForm(String payload);
|
||||
}
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface IFormPage requires IPage {
|
||||
IForm[] Forms();
|
||||
}
|
||||
|
||||
[contract(Microsoft.Windows.CommandPalette.Extensions.RunContract, 1)]
|
||||
|
||||
[contract(Microsoft.CmdPal.Extensions.ExtensionsContract, 1)]
|
||||
interface ICommandProvider requires Windows.Foundation.IClosable
|
||||
{
|
||||
String DisplayName { get; };
|
||||
IconDataType Icon { get; };
|
||||
// TODO! Boolean CanBeCached { get; };
|
||||
// TODO! IFormPage SettingsPage { get; };
|
||||
|
||||
|
||||
IListItem[] TopLevelCommands();
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata minClientVersion="2.5">
|
||||
<id>Microsoft.Windows.CommandPalette.Extensions</id>
|
||||
<id>Microsoft.CmdPal.Extensions</id>
|
||||
<version>1.0.0</version>
|
||||
<title>Command Palette SDK</title>
|
||||
<authors>Microsoft</authors>
|
||||
@@ -21,16 +21,16 @@
|
||||
</metadata>
|
||||
<files>
|
||||
<!-- TODO : Add NOTICE.txt and LICENSE files -->
|
||||
<file src="Microsoft.Windows.CommandPalette.Extensions.props" target="build\"/>
|
||||
<file src="Microsoft.Windows.CommandPalette.Extensions.targets" target="build\"/>
|
||||
<file src="Microsoft.CmdPal.Extensions.props" target="build\"/>
|
||||
<file src="Microsoft.CmdPal.Extensions.targets" target="build\"/>
|
||||
<!-- AnyCPU Managed dlls from SDK.Lib project -->
|
||||
<file src="..\Microsoft.Windows.CommandPalette.Extensions.Helpers\bin\Release\net8.0-windows10.0.19041.0\Microsoft.Windows.CommandPalette.Extensions.Helpers.dll" target="lib\net8.0-windows10.0.19041.0\"/>
|
||||
<file src="..\Microsoft.Windows.CommandPalette.Extensions.Helpers\bin\Release\net8.0-windows10.0.19041.0\Microsoft.Windows.CommandPalette.Extensions.Helpers.deps.json" target="lib\net8.0-windows10.0.19041.0\"/>
|
||||
<file src="..\Microsoft.CmdPal.Extensions.Helpers\bin\Release\net8.0-windows10.0.19041.0\Microsoft.CmdPal.Extensions.Helpers.dll" target="lib\net8.0-windows10.0.19041.0\"/>
|
||||
<file src="..\Microsoft.CmdPal.Extensions.Helpers\bin\Release\net8.0-windows10.0.19041.0\Microsoft.CmdPal.Extensions.Helpers.deps.json" target="lib\net8.0-windows10.0.19041.0\"/>
|
||||
<!-- Native dlls and winmd from SDK cpp project -->
|
||||
<file src="..\Microsoft.Windows.CommandPalette.Extensions\bin\x64\Release\Microsoft.Windows.CommandPalette.Extensions.dll" target="runtimes\win-x64\native\"/>
|
||||
<file src="..\Microsoft.Windows.CommandPalette.Extensions\bin\x86\Release\Microsoft.Windows.CommandPalette.Extensions.dll" target="runtimes\win-x86\native\"/>
|
||||
<file src="..\Microsoft.Windows.CommandPalette.Extensions\bin\arm64\Release\Microsoft.Windows.CommandPalette.Extensions.dll" target="runtimes\win-arm64\native\"/>
|
||||
<file src="..\Microsoft.CmdPal.Extensions\bin\x64\Release\Microsoft.CmdPal.Extensions.dll" target="runtimes\win-x64\native\"/>
|
||||
<file src="..\Microsoft.CmdPal.Extensions\bin\x86\Release\Microsoft.CmdPal.Extensions.dll" target="runtimes\win-x86\native\"/>
|
||||
<file src="..\Microsoft.CmdPal.Extensions\bin\arm64\Release\Microsoft.CmdPal.Extensions.dll" target="runtimes\win-arm64\native\"/>
|
||||
<!-- Not putting in the following the lib folder because we don't want plugin project to directly reference the winmd -->
|
||||
<file src="..\Microsoft.Windows.CommandPalette.Extensions\bin\x64\Release\Microsoft.Windows.CommandPalette.Extensions.winmd" target="winmd\"/>
|
||||
<file src="..\Microsoft.CmdPal.Extensions\bin\x64\Release\Microsoft.CmdPal.Extensions.winmd" target="winmd\"/>
|
||||
</files>
|
||||
</package>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text.Json.Nodes;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
using Windows.Foundation;
|
||||
|
||||
namespace Microsoft.CmdPal.Ext.Bookmarks;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
using Windows.Foundation;
|
||||
|
||||
namespace Microsoft.CmdPal.Ext.Bookmarks;
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
using Windows.System;
|
||||
|
||||
namespace Microsoft.CmdPal.Ext.Bookmarks;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace Microsoft.CmdPal.Ext.Bookmarks;
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace Microsoft.CmdPal.Ext.Bookmarks;
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\extensionsdk\Microsoft.Windows.CommandPalette.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj" />
|
||||
<ProjectReference Include="..\..\..\extensionsdk\Microsoft.CmdPal.Extensions.Helpers\Microsoft.CmdPal.Extensions.Helpers.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using Microsoft.Windows.CommandPalette.Extensions;
|
||||
using Microsoft.Windows.CommandPalette.Extensions.Helpers;
|
||||
using Microsoft.CmdPal.Extensions;
|
||||
using Microsoft.CmdPal.Extensions.Helpers;
|
||||
|
||||
namespace Microsoft.CmdPal.Ext.Bookmarks;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user