-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
542 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
/** | ||
* This is the global CiderApp object, for debugging and plugin purposes. | ||
*/ | ||
declare namespace CiderApp { | ||
/** | ||
* AppFS file system. | ||
*/ | ||
const AppFS: { | ||
/** | ||
* Read a file from the AppFS. | ||
*/ | ||
readFile(fileName: string): Promise<string>, | ||
/** | ||
* Write a file to the AppFS. | ||
*/ | ||
writeFile(fileName: string, contents: string): Promise<void>, | ||
}, | ||
/** | ||
* CiderFirebase class | ||
*/ | ||
CiderFirebase: any, | ||
/** | ||
* CiderCompose class | ||
*/ | ||
CiderCompose: any, | ||
/** | ||
* CiderPlaylists class | ||
*/ | ||
CiderPlaylists: any, | ||
/** | ||
* CiderStripe class | ||
*/ | ||
CiderStripe: any, | ||
/** | ||
* ClientDB | ||
*/ | ||
DexieDB: any, | ||
/** | ||
* PouchDB object | ||
*/ | ||
PouchDb: any, | ||
/** | ||
* Apple Music URL functions | ||
*/ | ||
amURL: { | ||
/** | ||
* Open an Apple Music URL in the app. | ||
* @param url | ||
*/ | ||
openAppleMusicURL(url: string): void | ||
} | ||
/** | ||
* Quasar | ||
*/ | ||
const quasar: typeof import("quasar") | ||
/** | ||
* Vue app instance | ||
*/ | ||
const app: import("vue").App | ||
/** | ||
* Pinia App state | ||
*/ | ||
const appState: any | ||
/** | ||
* Cider config | ||
*/ | ||
const config: any | ||
/** | ||
* Dialogs | ||
*/ | ||
const dialogs: { | ||
/** | ||
* Immersive modal | ||
*/ | ||
immersive(): void | ||
/** | ||
* Settings Modal | ||
*/ | ||
settings(): void | ||
} | ||
/** | ||
* Force the platform to a specific value. | ||
* @param platform | ||
*/ | ||
function forcePlatform(platform: undefined | null | "win32" | "linux" | "darwin"): void | ||
/** | ||
* Handle a protocol URL. | ||
* @param url | ||
*/ | ||
function handleProtocolURL(url: string): void | ||
/** | ||
* MusicKit Store | ||
*/ | ||
const musicKitStore: any | ||
/** | ||
* Vue router instance | ||
*/ | ||
const router: import("vue-router").Router | ||
/** | ||
* Pinia store | ||
*/ | ||
const store: import("pinia").Pinia | ||
/** | ||
* URI handler | ||
*/ | ||
const uriHandler: { | ||
/** | ||
* Call all functions that have been added to the onUri event. | ||
* This is called by the main process when the app receives a URI. | ||
*/ | ||
onUri(uri: string): void | ||
} | ||
} | ||
|
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,82 @@ | ||
interface RenderComponentOptions { | ||
component: import('../ComponentNames').ComponentNames; | ||
props?: Record<string, any>; | ||
// @ts-ignore | ||
element: Element; | ||
} | ||
|
||
|
||
declare namespace __PLUGINSYS__ { | ||
const Components: { | ||
MainMenu: { | ||
addMenuItem(item: import("../MenuEntry").MenuItem): import("../MenuEntry").MenuItem | ||
removeMenuItem(item: import("../MenuEntry").MenuItem): void | ||
items: import("../MenuEntry").MenuItem[] | ||
}, | ||
ImmersiveMenu: { | ||
addMenuItem(item: import("../MenuEntry").MenuItem): import("../MenuEntry").MenuItem | ||
removeMenuItem(item: import("../MenuEntry").MenuItem): void | ||
items: import("../MenuEntry").MenuItem[] | ||
}, | ||
ImmersiveLayouts: { | ||
addLayout(layout: import("../ImmersiveLayout.ts").CustomImmersiveLayout): void | ||
removeLayout(layout: import("../ImmersiveLayout.ts").CustomImmersiveLayout): void | ||
layouts: import("../ImmersiveLayout.ts").CustomImmersiveLayout[] | ||
}, | ||
MediaItemContextMenu: { | ||
addMenuItem(item: import("../MenuEntry").MenuItem): import("../MenuEntry").MenuItem | ||
removeMenuItem(item: import("../MenuEntry").MenuItem): void | ||
removeLayoutByIdentifier(identifier: string): void | ||
items: import("../MenuEntry").MenuItem[] | ||
}, | ||
CustomButtons: { | ||
addCustomButton(opts: import("../CustomButton").CustomButtonOptions): void | ||
removeCustomButton(opts: import("../CustomButton").CustomButtonOptions): void | ||
buttons: import("../CustomButton").CustomButtonOptions[] | ||
} | ||
} | ||
|
||
const ExternalMessages: { | ||
addEventListener(event: string, cb: (e: any) => void, opts?: Partial<{ once: boolean, passive: boolean, capture: boolean }>): void | ||
removeEventListener(event: string, cb: (e: any) => void): void | ||
dispatchEvent(event: string, data: any): void | ||
} | ||
|
||
const Quasar: { | ||
Dialog: any; | ||
} | ||
|
||
const IZAPI: { | ||
mDNS: { | ||
createBrowser(tcp_service: string, timeout: number): { | ||
addresses: string[] | ||
fullname: string | ||
host: string | ||
interfaceIndex: number | ||
port: number | ||
query: string[] | ||
txt: string[] | ||
type: { | ||
name: string | ||
protocol: string | ||
subtypes: string[] | ||
}[] | ||
}[] | ||
} | ||
} | ||
|
||
const PAPIInstance: { | ||
addEventListener(event: import('./PAPIEvents').PAPIEvents, cb: (e: any) => void, opts?: Partial<{ once: boolean, passive: boolean, capture: boolean }>): void | ||
removeEventListener(event: import('./PAPIEvents').PAPIEvents, cb: (e: any) => void): void | ||
} | ||
|
||
const App: { | ||
Components: import('../ComponentNames').ComponentNames[] | ||
RenderComponent: (opts: RenderComponentOptions) => void | ||
vue: { | ||
// @ts-ignore | ||
render: (component: any, element: Element) => void | ||
h: (component: any, props: Record<string, any>, children: any) => void | ||
} | ||
} | ||
} |
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,111 @@ | ||
import {App} from "vue" | ||
/** | ||
* This is the global CiderApp object, for debugging and plugin purposes. | ||
*/ | ||
interface ICiderApp { | ||
/** | ||
* AppFS file system. | ||
*/ | ||
AppFS: { | ||
/** | ||
* Read a file from the AppFS. | ||
*/ | ||
readFile(fileName: string): Promise<string>, | ||
/** | ||
* Write a file to the AppFS. | ||
*/ | ||
writeFile(fileName: string, contents: string): Promise<void>, | ||
}, | ||
/** | ||
* CiderFirebase class | ||
*/ | ||
CiderFirebase: any, | ||
/** | ||
* CiderCompose class | ||
*/ | ||
CiderCompose: any, | ||
/** | ||
* CiderPlaylists class | ||
*/ | ||
CiderPlaylists: any, | ||
/** | ||
* CiderStripe class | ||
*/ | ||
CiderStripe: any, | ||
/** | ||
* ClientDB | ||
*/ | ||
DexieDB: any, | ||
/** | ||
* PouchDB object | ||
*/ | ||
PouchDb: any, | ||
/** | ||
* Apple Music URL functions | ||
*/ | ||
amURL: { | ||
/** | ||
* Open an Apple Music URL in the app. | ||
* @param url | ||
*/ | ||
openAppleMusicURL(url: string): void, | ||
}, | ||
/** | ||
* Vue app instance | ||
*/ | ||
app: App, | ||
/** | ||
* Pinia App state | ||
*/ | ||
appState: any, | ||
/** | ||
* Cider config | ||
*/ | ||
config: any, | ||
/** | ||
* Dialogs | ||
*/ | ||
dialogs: { | ||
/** | ||
* Immersive modal | ||
*/ | ||
immersive(): void, | ||
/** | ||
* Settings Modal | ||
*/ | ||
settings(): void, | ||
}, | ||
/** | ||
* Force the platform to a specific value. | ||
* @param platform | ||
*/ | ||
forcePlatform(platform: undefined | null | "win32" | "linux" | "darwin"): void, | ||
/** | ||
* Handle a protocol URL. | ||
* @param url | ||
*/ | ||
handleProtocolURL(url: string): void, | ||
/** | ||
* MusicKit Store | ||
*/ | ||
musicKitStore: any, | ||
/** | ||
* Vue router instance | ||
*/ | ||
router: any, | ||
/** | ||
* Pinia store | ||
*/ | ||
store: any, | ||
/** | ||
* URI handler | ||
*/ | ||
uriHandler: { | ||
/** | ||
* Call all functions that have been added to the onUri event. | ||
* This is called by the main process when the app receives a URI. | ||
*/ | ||
onUri(uri: string): void, | ||
}, | ||
} | ||
|
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 type PAPIEvents = | ||
'app:ready' | | ||
'shell:layout_type_changed' | | ||
'immersive:opened' | | ||
'immersive:closed' | | ||
'miniplayer:opened' | | ||
'miniplayer:closed' | | ||
'browser:page_changed' |
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,14 @@ | ||
declare namespace PAPITypes { | ||
declare namespace App { | ||
type Ready = {} | ||
} | ||
declare namespace Shell { | ||
type LayoutTypeChanged = { | ||
type: 'immersive' | 'miniplayer' | 'browser' | ||
} | ||
type ImmersiveOpened = {} | ||
type ImmersiveClosed = {} | ||
type MiniplayerOpened = {} | ||
type MiniplayerClosed = {} | ||
} | ||
} |
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,7 @@ | ||
// Type definitions for musickit-js 1.0 | ||
// Project: https://developer.apple.com/documentation/musickitjs | ||
// Definitions by: Devid Farinelli <https://github.com/misterdev> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
|
||
/// <reference path="CiderApp.d.ts" /> | ||
/// <reference path="CiderPluginSystem.d.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"lib": [ | ||
"es6" | ||
], | ||
"noImplicitAny": true, | ||
"noImplicitThis": true, | ||
"strictFunctionTypes": true, | ||
"strictNullChecks": true, | ||
"baseUrl": "../", | ||
"typeRoots": [ | ||
"../" | ||
], | ||
"types": [], | ||
"noEmit": true, | ||
"forceConsistentCasingInFileNames": true | ||
}, | ||
"files": [ | ||
"index.d.ts", | ||
] | ||
} |
Oops, something went wrong.