mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-21 18:38:47 +02:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c213204ff4 | ||
|
|
9128c1e7da | ||
|
|
5ffa14bec8 | ||
|
|
ee51dc5fc0 | ||
|
|
b38ec17d8f | ||
|
|
8b54ee990e | ||
|
|
7e01781d40 | ||
|
|
2b31473614 | ||
|
|
8bfeae4b35 |
28
CHANGELOG.md
28
CHANGELOG.md
@@ -1,3 +1,31 @@
|
|||||||
|
## [3.21.7](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.21.6...v3.21.7) (2023-06-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* add patch indicator to prevent crashes ([#88](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/88)) ([9128c1e](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/9128c1e7dadb98a8926d3dba9907a01cc78d90cf))
|
||||||
|
|
||||||
|
## [3.21.6](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.21.5...v3.21.6) (2023-06-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* reposition parameter for file picker V2 ([ee51dc5](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/ee51dc5fc0dd5bdc2b0b9e10aa27607fbe51f491))
|
||||||
|
|
||||||
|
## [3.21.5](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.21.4...v3.21.5) (2023-06-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* missing parameter ([8b54ee9](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/8b54ee990ee4d9b51174737979c35ab7ad92ed7a))
|
||||||
|
|
||||||
|
## [3.21.4](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.21.3...v3.21.4) (2023-06-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* move the new file picker api as v2 ([8bfeae4](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/8bfeae4b3593b2efa0aa075a0d9e0b5926cdf169))
|
||||||
|
|
||||||
## [3.21.3](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.21.2...v3.21.3) (2023-06-22)
|
## [3.21.3](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.21.2...v3.21.3) (2023-06-22)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "decky-frontend-lib",
|
"name": "decky-frontend-lib",
|
||||||
"version": "3.21.3",
|
"version": "3.21.7",
|
||||||
"description": "A library for building decky plugins",
|
"description": "A library for building decky plugins",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@@ -57,14 +57,21 @@ export interface FilePickerRes {
|
|||||||
realpath: string;
|
realpath: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum FileSelectionType {
|
||||||
|
FILE,
|
||||||
|
FOLDER,
|
||||||
|
}
|
||||||
|
|
||||||
export interface ServerAPI {
|
export interface ServerAPI {
|
||||||
routerHook: RouterHook;
|
routerHook: RouterHook;
|
||||||
toaster: Toaster;
|
toaster: Toaster;
|
||||||
openFilePicker(
|
openFilePicker(startPath: string, includeFiles?: boolean, regex?: RegExp): Promise<FilePickerRes>;
|
||||||
|
openFilePickerV2(
|
||||||
|
select: FileSelectionType,
|
||||||
startPath: string,
|
startPath: string,
|
||||||
includeFiles?: boolean,
|
includeFiles?: boolean,
|
||||||
filter?: RegExp | ((file: File) => boolean),
|
|
||||||
includeFolders?: boolean,
|
includeFolders?: boolean,
|
||||||
|
filter?: RegExp | ((file: File) => boolean),
|
||||||
extensions?: string[],
|
extensions?: string[],
|
||||||
showHiddenFiles?: boolean,
|
showHiddenFiles?: boolean,
|
||||||
allowAllFiles?: boolean,
|
allowAllFiles?: boolean,
|
||||||
|
|||||||
@@ -46,13 +46,21 @@ export function fakeRenderComponent(fun: Function, customHooks: any = {}): any {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function wrapReactType(node: any, prop: any = 'type') {
|
export function wrapReactType(node: any, prop: any = 'type') {
|
||||||
return (node[prop] = { ...node[prop] });
|
if (node[prop]?.__DECKY_WRAPPED) {
|
||||||
|
return node[prop];
|
||||||
|
} else {
|
||||||
|
return (node[prop] = { ...node[prop], __DECKY_WRAPPED: true });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function wrapReactClass(node: any, prop: any = 'type') {
|
export function wrapReactClass(node: any, prop: any = 'type') {
|
||||||
const cls = node[prop];
|
if (node[prop]?.__DECKY_WRAPPED) {
|
||||||
const wrappedCls = class extends cls {};
|
return node[prop];
|
||||||
return (node[prop] = wrappedCls);
|
} else {
|
||||||
|
const cls = node[prop];
|
||||||
|
const wrappedCls = class extends cls { static __DECKY_WRAPPED = true; };
|
||||||
|
return (node[prop] = wrappedCls);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getReactInstance(o: HTMLElement | Element | Node) {
|
export function getReactInstance(o: HTMLElement | Element | Node) {
|
||||||
|
|||||||
Reference in New Issue
Block a user