-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: file structure for PI support (#26)
* refactor: relocate target (API) * refactor: relocate device (API) * fix: export DeviceType enum * refactor: relocate layout (API) * refactor: relocate command (API) * refactor: relocate events (API) * refactor: relocate registration info (API) * refactor: relocate manifest (API) * refactor: relocate plugin files (Node.js) * fix: remove rogue console log * refactor: streamline accessing API types * fix: missing exports --------- Co-authored-by: Richard Herman <[email protected]>
- Loading branch information
Showing
86 changed files
with
555 additions
and
516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/connectivity/__mocks__/events.ts → src/api/__mocks__/events.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* Languages supported by Stream Deck. | ||
*/ | ||
export const supportedLanguages = ["de", "en", "es", "fr", "ja", "zh_CN"] as const; | ||
|
||
/** | ||
* Language supported by Stream Deck | ||
*/ | ||
export type Language = (typeof supportedLanguages)[number]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export * from "./command"; | ||
export { DeviceType } from "./device"; | ||
export * from "./events"; | ||
export { Language, supportedLanguages } from "./i18n"; | ||
export * from "./layout"; | ||
export { Manifest } from "./manifest"; | ||
export { RegistrationInfo, RegistrationParameter } from "./registration"; | ||
export { Target } from "./target"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
import type { DeviceInfo } from "./device"; | ||
import type { Language } from "./i18n"; | ||
|
||
/** | ||
* Defines the type of argument supplied by Stream Deck. | ||
*/ | ||
export enum RegistrationParameter { | ||
/** | ||
* Identifies the argument that specifies the web socket port that Stream Deck is listening on. | ||
*/ | ||
Port = "-port", | ||
|
||
/** | ||
* Identifies the argument that supplies information about the Stream Deck and the plugin. | ||
*/ | ||
Info = "-info", | ||
|
||
/** | ||
* Identifies the argument that specifies the unique identifier that can be used when registering the plugin. | ||
*/ | ||
PluginUUID = "-pluginUUID", | ||
|
||
/** | ||
* Identifies the argument that specifies the event to be sent to Stream Deck as part of the registration procedure. | ||
*/ | ||
RegisterEvent = "-registerEvent" | ||
} | ||
|
||
/** | ||
* Object containing information about the Stream Deck application, the plugin, the user's operating system, user's Stream Deck devices, etc. | ||
*/ | ||
export type RegistrationInfo = { | ||
/** | ||
* Stream Deck application specific information. | ||
*/ | ||
readonly application: { | ||
/** | ||
* Font being used by the Stream Deck application. | ||
*/ | ||
readonly font: string; | ||
|
||
/** | ||
* Users preferred language; this is used by the Stream Deck application for localization. | ||
*/ | ||
readonly language: Language; | ||
|
||
/** | ||
* Operating system. | ||
*/ | ||
readonly platform: "mac" | "windows"; | ||
|
||
/** | ||
* Operating system version, e.g. "10" for Windows 10. | ||
*/ | ||
readonly platformVersion: string; | ||
|
||
/** | ||
* Stream Deck application version. | ||
*/ | ||
readonly version: string; | ||
}; | ||
|
||
/** | ||
* Collection of preferred colors used by the Stream Deck. | ||
*/ | ||
readonly colors: { | ||
/** | ||
* Color that denotes the background of a button that is being moused over. | ||
*/ | ||
readonly buttonMouseOverBackgroundColor: string; | ||
|
||
/** | ||
* Color that denotes the background of a pressed button. | ||
*/ | ||
readonly buttonPressedBackgroundColor: string; | ||
|
||
/** | ||
* Color that denotes the border of a press button. | ||
*/ | ||
readonly buttonPressedBorderColor: string; | ||
|
||
/** | ||
* Color that denotes the text of a pressed button. | ||
*/ | ||
readonly buttonPressedTextColor: string; | ||
|
||
/** | ||
* Color of highlighted text. | ||
*/ | ||
readonly highlightColor: string; | ||
}; | ||
|
||
/** | ||
* Pixel ratio, used to identify if the Stream Deck application is running on a high DPI screen. | ||
*/ | ||
readonly devicePixelRatio: number; | ||
|
||
/** | ||
* Devices associated with the Stream Deck application; this may include devices that are not currently connected. Use `"deviceDidConnect"` event to determine which devices are active. | ||
*/ | ||
readonly devices: [ | ||
DeviceInfo & { | ||
/** | ||
* Unique identifier of the Stream Deck device. | ||
*/ | ||
readonly id: string; | ||
} | ||
]; | ||
|
||
/** | ||
* Information about the plugin. | ||
*/ | ||
readonly plugin: { | ||
/** | ||
* Unique identifier of the plugin, as defined by the plugin. | ||
*/ | ||
readonly uuid: string; | ||
|
||
/** | ||
* Version of the plugin. | ||
*/ | ||
readonly version: string; | ||
}; | ||
}; |
File renamed without changes.
Oops, something went wrong.