@decky/ui 4.0.1 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/components/Carousel.d.ts +2 -2
  2. package/dist/components/ControlsList.d.ts +2 -1
  3. package/dist/components/Dialog.d.ts +2 -1
  4. package/dist/components/Dropdown.d.ts +3 -3
  5. package/dist/components/Field.d.ts +1 -0
  6. package/dist/components/Focusable.d.ts +2 -2
  7. package/dist/components/Item.d.ts +1 -0
  8. package/dist/components/ProgressBar.d.ts +4 -4
  9. package/dist/components/SidebarNavigation.d.ts +2 -2
  10. package/dist/components/TextField.d.ts +2 -2
  11. package/package.json +2 -2
  12. package/src/components/Carousel.ts +2 -2
  13. package/src/components/{ControlsList.tsx → ControlsList.ts} +2 -1
  14. package/src/components/{Dialog.tsx → Dialog.ts} +2 -1
  15. package/src/components/{Dropdown.tsx → Dropdown.ts} +3 -3
  16. package/src/components/{Field.tsx → Field.ts} +1 -0
  17. package/src/components/{Focusable.tsx → Focusable.ts} +2 -2
  18. package/src/components/{Item.tsx → Item.ts} +1 -0
  19. package/src/components/{ProgressBar.tsx → ProgressBar.ts} +4 -4
  20. package/src/components/{SidebarNavigation.tsx → SidebarNavigation.ts} +2 -2
  21. package/src/components/{TextField.tsx → TextField.ts} +2 -2
  22. package/src/custom-hooks/{useQuickAccessVisible.tsx → useQuickAccessVisible.ts} +2 -2
  23. package/dist/plugin.d.ts +0 -68
  24. package/dist/plugin.js +0 -5
  25. /package/src/components/{Button.tsx → Button.ts} +0 -0
  26. /package/src/components/{ButtonItem.tsx → ButtonItem.ts} +0 -0
  27. /package/src/components/{DialogCheckbox.tsx → DialogCheckbox.ts} +0 -0
  28. /package/src/components/{Marquee.tsx → Marquee.ts} +0 -0
  29. /package/src/components/{Menu.tsx → Menu.ts} +0 -0
  30. /package/src/components/{Modal.tsx → Modal.ts} +0 -0
  31. /package/src/components/{Panel.tsx → Panel.ts} +0 -0
  32. /package/src/components/{Scroll.tsx → Scroll.ts} +0 -0
  33. /package/src/components/{SliderField.tsx → SliderField.ts} +0 -0
  34. /package/src/components/{Spinner.tsx → Spinner.ts} +0 -0
  35. /package/src/components/{SteamSpinner.tsx → SteamSpinner.ts} +0 -0
  36. /package/src/components/{Toggle.tsx → Toggle.ts} +0 -0
  37. /package/src/components/{ToggleField.tsx → ToggleField.ts} +0 -0
  38. /package/src/modules/{Router.tsx → Router.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { HTMLAttributes, ReactNode, RefAttributes, VFC } from 'react';
1
+ import { HTMLAttributes, ReactNode, RefAttributes, FC } from 'react';
2
2
  export interface CarouselProps extends HTMLAttributes<HTMLDivElement> {
3
3
  autoFocus?: boolean;
4
4
  enableBumperPaging?: boolean;
@@ -16,4 +16,4 @@ export interface CarouselProps extends HTMLAttributes<HTMLDivElement> {
16
16
  name?: string;
17
17
  scrollToAlignment?: 'center';
18
18
  }
19
- export declare const Carousel: VFC<CarouselProps & RefAttributes<HTMLDivElement>>;
19
+ export declare const Carousel: FC<CarouselProps & RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,7 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  export interface ControlsListProps {
3
3
  alignItems?: 'left' | 'right' | 'center';
4
4
  spacing?: 'standard' | 'extra';
5
+ children?: ReactNode;
5
6
  }
6
7
  export declare const ControlsList: FC<ControlsListProps>;
@@ -1,8 +1,9 @@
1
- import { CSSProperties, FC, RefAttributes } from 'react';
1
+ import { CSSProperties, FC, ReactNode, RefAttributes } from 'react';
2
2
  import { FooterLegendProps } from './FooterLegend';
3
3
  export interface DialogCommonProps extends RefAttributes<HTMLDivElement> {
4
4
  style?: CSSProperties;
5
5
  className?: string;
6
+ children?: ReactNode;
6
7
  }
7
8
  export interface DialogButtonProps extends DialogCommonProps, FooterLegendProps {
8
9
  noFocusRing?: boolean;
@@ -1,4 +1,4 @@
1
- import { ReactNode, VFC } from 'react';
1
+ import { ReactNode, FC } from 'react';
2
2
  import { ItemProps } from './Item';
3
3
  export interface SingleDropdownOption {
4
4
  data: any;
@@ -28,7 +28,7 @@ export interface DropdownProps {
28
28
  renderButtonValue?(element: ReactNode): ReactNode;
29
29
  focusable?: boolean;
30
30
  }
31
- export declare const Dropdown: VFC<DropdownProps>;
31
+ export declare const Dropdown: FC<DropdownProps>;
32
32
  export interface DropdownItemProps extends DropdownProps, ItemProps {
33
33
  }
34
- export declare const DropdownItem: VFC<DropdownItemProps>;
34
+ export declare const DropdownItem: FC<DropdownItemProps>;
@@ -1,6 +1,7 @@
1
1
  import { FC, ReactNode, RefAttributes } from 'react';
2
2
  import { FooterLegendProps } from './FooterLegend';
3
3
  export interface FieldProps extends FooterLegendProps {
4
+ children?: ReactNode;
4
5
  label?: ReactNode;
5
6
  bottomSeparator?: 'standard' | 'thick' | 'none';
6
7
  description?: ReactNode;
@@ -1,4 +1,4 @@
1
- import { HTMLAttributes, ReactNode, RefAttributes, VFC } from 'react';
1
+ import { HTMLAttributes, ReactNode, RefAttributes, FC } from 'react';
2
2
  import { FooterLegendProps } from './FooterLegend';
3
3
  export interface FocusableProps extends HTMLAttributes<HTMLDivElement>, FooterLegendProps {
4
4
  children: ReactNode;
@@ -9,4 +9,4 @@ export interface FocusableProps extends HTMLAttributes<HTMLDivElement>, FooterLe
9
9
  onActivate?: (e: CustomEvent) => void;
10
10
  onCancel?: (e: CustomEvent) => void;
11
11
  }
12
- export declare const Focusable: VFC<FocusableProps & RefAttributes<HTMLDivElement>>;
12
+ export declare const Focusable: FC<FocusableProps & RefAttributes<HTMLDivElement>>;
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
2
2
  export interface ItemProps {
3
3
  label?: ReactNode;
4
4
  description?: ReactNode;
5
+ children?: ReactNode;
5
6
  layout?: 'below' | 'inline';
6
7
  icon?: ReactNode;
7
8
  bottomSeparator?: 'standard' | 'thick' | 'none';
@@ -1,4 +1,4 @@
1
- import { ReactNode, VFC } from 'react';
1
+ import { ReactNode, FC } from 'react';
2
2
  import { ItemProps } from './Item';
3
3
  export interface ProgressBarItemProps extends ItemProps {
4
4
  indeterminate?: boolean;
@@ -16,6 +16,6 @@ export interface ProgressBarWithInfoProps extends ProgressBarItemProps {
16
16
  sTimeRemaining?: ReactNode;
17
17
  sOperationText?: ReactNode;
18
18
  }
19
- export declare const ProgressBar: VFC<ProgressBarProps>;
20
- export declare const ProgressBarWithInfo: VFC<ProgressBarWithInfoProps>;
21
- export declare const ProgressBarItem: VFC<ProgressBarItemProps>;
19
+ export declare const ProgressBar: FC<ProgressBarProps>;
20
+ export declare const ProgressBarWithInfo: FC<ProgressBarWithInfoProps>;
21
+ export declare const ProgressBarItem: FC<ProgressBarItemProps>;
@@ -1,4 +1,4 @@
1
- import { ReactNode, VFC } from 'react';
1
+ import { ReactNode, FC } from 'react';
2
2
  export interface SidebarNavigationPage {
3
3
  title: ReactNode;
4
4
  content: ReactNode;
@@ -18,4 +18,4 @@ export interface SidebarNavigationProps {
18
18
  page?: string;
19
19
  onPageRequested?: (page: string) => void;
20
20
  }
21
- export declare const SidebarNavigation: VFC<SidebarNavigationProps>;
21
+ export declare const SidebarNavigation: FC<SidebarNavigationProps>;
@@ -1,4 +1,4 @@
1
- import { ChangeEventHandler, HTMLAttributes, ReactNode, VFC } from 'react';
1
+ import { ChangeEventHandler, HTMLAttributes, ReactNode, FC } from 'react';
2
2
  export interface TextFieldProps extends HTMLAttributes<HTMLInputElement> {
3
3
  label?: ReactNode;
4
4
  requiredLabel?: ReactNode;
@@ -19,4 +19,4 @@ export interface TextFieldProps extends HTMLAttributes<HTMLInputElement> {
19
19
  onChange?: ChangeEventHandler<HTMLInputElement>;
20
20
  value?: string;
21
21
  }
22
- export declare const TextField: VFC<TextFieldProps>;
22
+ export declare const TextField: FC<TextFieldProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decky/ui",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "A library for interacting with the Steam frontend in Decky plugins and elsewhere.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -47,7 +47,7 @@
47
47
  "@semantic-release/changelog": "^6.0.1",
48
48
  "@semantic-release/git": "^10.0.1",
49
49
  "@types/jest": "^27.4.1",
50
- "@types/react": "16.14.0",
50
+ "@types/react": "18.2.0",
51
51
  "@types/react-router": "5.1.18",
52
52
  "commitizen": "^4.2.4",
53
53
  "husky": "^8.0.1",
@@ -1,4 +1,4 @@
1
- import { HTMLAttributes, ReactNode, RefAttributes, VFC } from 'react';
1
+ import { HTMLAttributes, ReactNode, RefAttributes, FC } from 'react';
2
2
 
3
3
  import { Export, findModuleExport } from '../webpack';
4
4
 
@@ -20,6 +20,6 @@ export interface CarouselProps extends HTMLAttributes<HTMLDivElement> {
20
20
  scrollToAlignment?: 'center';
21
21
  }
22
22
 
23
- export const Carousel = findModuleExport((e: Export) => e.render?.toString().includes('setFocusedColumn:')) as VFC<
23
+ export const Carousel = findModuleExport((e: Export) => e.render?.toString().includes('setFocusedColumn:')) as FC<
24
24
  CarouselProps & RefAttributes<HTMLDivElement>
25
25
  >;
@@ -1,10 +1,11 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
 
3
3
  import { Export, findModuleExport } from '../webpack';
4
4
 
5
5
  export interface ControlsListProps {
6
6
  alignItems?: 'left' | 'right' | 'center';
7
7
  spacing?: 'standard' | 'extra';
8
+ children?: ReactNode;
8
9
  }
9
10
 
10
11
  export const ControlsList: FC<ControlsListProps> = findModuleExport(
@@ -1,4 +1,4 @@
1
- import { CSSProperties, FC, RefAttributes } from 'react';
1
+ import { CSSProperties, FC, ReactNode, RefAttributes } from 'react';
2
2
 
3
3
  import { CommonUIModule } from '../webpack';
4
4
  import { FooterLegendProps } from './FooterLegend';
@@ -6,6 +6,7 @@ import { FooterLegendProps } from './FooterLegend';
6
6
  export interface DialogCommonProps extends RefAttributes<HTMLDivElement> {
7
7
  style?: CSSProperties;
8
8
  className?: string;
9
+ children?: ReactNode;
9
10
  }
10
11
 
11
12
  export interface DialogButtonProps extends DialogCommonProps, FooterLegendProps {
@@ -1,4 +1,4 @@
1
- import { ReactNode, VFC } from 'react';
1
+ import { ReactNode, FC } from 'react';
2
2
 
3
3
  import { CommonUIModule } from '../webpack';
4
4
  import { ItemProps } from './Item';
@@ -40,10 +40,10 @@ export interface DropdownProps {
40
40
 
41
41
  export const Dropdown = Object.values(CommonUIModule).find(
42
42
  (mod: any) => mod?.prototype?.SetSelectedOption && mod?.prototype?.BuildMenu,
43
- ) as VFC<DropdownProps>;
43
+ ) as FC<DropdownProps>;
44
44
 
45
45
  export interface DropdownItemProps extends DropdownProps, ItemProps {}
46
46
 
47
47
  export const DropdownItem = Object.values(CommonUIModule).find((mod: any) =>
48
48
  mod?.toString()?.includes('"dropDownControlRef","description"'),
49
- ) as VFC<DropdownItemProps>;
49
+ ) as FC<DropdownItemProps>;
@@ -4,6 +4,7 @@ import { Export, findModuleExport } from '../webpack';
4
4
  import { FooterLegendProps } from './FooterLegend';
5
5
 
6
6
  export interface FieldProps extends FooterLegendProps {
7
+ children?: ReactNode;
7
8
  label?: ReactNode;
8
9
  bottomSeparator?: 'standard' | 'thick' | 'none';
9
10
  description?: ReactNode;
@@ -1,4 +1,4 @@
1
- import { HTMLAttributes, ReactNode, RefAttributes, VFC } from 'react';
1
+ import { HTMLAttributes, ReactNode, RefAttributes, FC } from 'react';
2
2
 
3
3
  import { Export, findModuleExport } from '../webpack';
4
4
  import { FooterLegendProps } from './FooterLegend';
@@ -15,4 +15,4 @@ export interface FocusableProps extends HTMLAttributes<HTMLDivElement>, FooterLe
15
15
 
16
16
  export const Focusable = findModuleExport((e: Export) =>
17
17
  e?.render?.toString()?.includes('["flow-children","onActivate","onCancel","focusClassName",'),
18
- ) as VFC<FocusableProps & RefAttributes<HTMLDivElement>>;
18
+ ) as FC<FocusableProps & RefAttributes<HTMLDivElement>>;
@@ -3,6 +3,7 @@ import { ReactNode } from 'react';
3
3
  export interface ItemProps {
4
4
  label?: ReactNode;
5
5
  description?: ReactNode;
6
+ children?: ReactNode;
6
7
  layout?: 'below' | 'inline';
7
8
  icon?: ReactNode;
8
9
  bottomSeparator?: 'standard' | 'thick' | 'none';
@@ -1,4 +1,4 @@
1
- import { ReactNode, VFC } from 'react';
1
+ import { ReactNode, FC } from 'react';
2
2
 
3
3
  import { Export, findModuleExport } from '../webpack';
4
4
  import { ItemProps } from './Item';
@@ -24,12 +24,12 @@ export interface ProgressBarWithInfoProps extends ProgressBarItemProps {
24
24
 
25
25
  export const ProgressBar = findModuleExport((e: Export) =>
26
26
  e?.toString()?.includes('.ProgressBar,"standard"=='),
27
- ) as VFC<ProgressBarProps>;
27
+ ) as FC<ProgressBarProps>;
28
28
 
29
29
  export const ProgressBarWithInfo = findModuleExport((e: Export) =>
30
30
  e?.toString()?.includes('.ProgressBarFieldStatus},'),
31
- ) as VFC<ProgressBarWithInfoProps>;
31
+ ) as FC<ProgressBarWithInfoProps>;
32
32
 
33
33
  export const ProgressBarItem = findModuleExport((e: Export) =>
34
34
  e?.toString()?.includes('"indeterminate","nTransitionSec"'),
35
- ) as VFC<ProgressBarItemProps>;
35
+ ) as FC<ProgressBarItemProps>;
@@ -1,4 +1,4 @@
1
- import { ReactNode, VFC } from 'react';
1
+ import { ReactNode, FC } from 'react';
2
2
 
3
3
  import { Export, findModuleExport } from '../webpack';
4
4
 
@@ -25,4 +25,4 @@ export interface SidebarNavigationProps {
25
25
 
26
26
  export const SidebarNavigation = findModuleExport((e: Export) =>
27
27
  e?.toString()?.includes('"disableRouteReporting"'),
28
- ) as VFC<SidebarNavigationProps>;
28
+ ) as FC<SidebarNavigationProps>;
@@ -1,4 +1,4 @@
1
- import { ChangeEventHandler, HTMLAttributes, ReactNode, VFC } from 'react';
1
+ import { ChangeEventHandler, HTMLAttributes, ReactNode, FC } from 'react';
2
2
 
3
3
  import { CommonUIModule, Module } from '../webpack';
4
4
 
@@ -25,4 +25,4 @@ export interface TextFieldProps extends HTMLAttributes<HTMLInputElement> {
25
25
 
26
26
  export const TextField = Object.values(CommonUIModule).find(
27
27
  (mod: Module) => mod?.validateUrl && mod?.validateEmail,
28
- ) as VFC<TextFieldProps>;
28
+ ) as FC<TextFieldProps>;
@@ -15,10 +15,10 @@ function getQuickAccessWindow(): Window | null {
15
15
  * @returns `true` if quick access menu is visible and `false` otherwise.
16
16
  *
17
17
  * @example
18
- * import { VFC, useEffect } from "react";
18
+ * import { FC, useEffect } from "react";
19
19
  * import { useQuickAccessVisible } from "decky-frontend-lib";
20
20
  *
21
- * export const PluginPanelView: VFC<{}> = ({ }) => {
21
+ * export const PluginPanelView: FC<{}> = ({ }) => {
22
22
  * const isVisible = useQuickAccessVisible();
23
23
  *
24
24
  * useEffect(() => {
package/dist/plugin.d.ts DELETED
@@ -1,68 +0,0 @@
1
- import type { ComponentType, ReactNode } from 'react';
2
- import { RouteProps } from 'react-router';
3
- export interface Plugin {
4
- title: JSX.Element;
5
- icon: JSX.Element;
6
- content?: JSX.Element;
7
- onDismount?(): void;
8
- alwaysRender?: boolean;
9
- }
10
- interface ServerResponseSuccess<TRes> {
11
- success: true;
12
- result: TRes;
13
- }
14
- interface ServerResponseError {
15
- success: false;
16
- result: string;
17
- }
18
- export type ServerResponse<TRes> = ServerResponseSuccess<TRes> | ServerResponseError;
19
- export type RoutePatch = (route: RouteProps) => RouteProps;
20
- export interface RouterHook {
21
- addRoute(path: string, component: ComponentType, props?: Omit<RouteProps, 'path' | 'children'>): void;
22
- addPatch(path: string, patch: RoutePatch): RoutePatch;
23
- addGlobalComponent(name: string, component: ComponentType): void;
24
- removeRoute(path: string): void;
25
- removePatch(path: string, patch: RoutePatch): void;
26
- removeGlobalComponent(name: string): void;
27
- }
28
- export interface ToastData {
29
- title: ReactNode;
30
- body: ReactNode;
31
- onClick?: () => void;
32
- logo?: ReactNode;
33
- icon?: ReactNode;
34
- className?: string;
35
- contentClassName?: string;
36
- duration?: number;
37
- critical?: boolean;
38
- eType?: number;
39
- sound?: number;
40
- playSound?: boolean;
41
- showToast?: boolean;
42
- }
43
- export interface Toaster {
44
- toast(toast: ToastData): void;
45
- }
46
- export interface FilePickerRes {
47
- path: string;
48
- realpath: string;
49
- }
50
- export declare const enum FileSelectionType {
51
- FILE = 0,
52
- FOLDER = 1
53
- }
54
- export interface ServerAPI {
55
- routerHook: RouterHook;
56
- toaster: Toaster;
57
- openFilePicker(startPath: string, includeFiles?: boolean, regex?: RegExp): Promise<FilePickerRes>;
58
- openFilePickerV2(select: FileSelectionType, startPath: string, includeFiles?: boolean, includeFolders?: boolean, filter?: RegExp | ((file: File) => boolean), extensions?: string[], showHiddenFiles?: boolean, allowAllFiles?: boolean, max?: number): Promise<FilePickerRes>;
59
- callPluginMethod<TArgs = {}, TRes = {}>(methodName: string, args: TArgs): Promise<ServerResponse<TRes>>;
60
- callServerMethod<TArgs = {}, TRes = {}>(methodName: string, args: TArgs): Promise<ServerResponse<TRes>>;
61
- fetchNoCors<TRes = {}>(url: RequestInfo, request?: RequestInit): Promise<ServerResponse<TRes>>;
62
- executeInTab(tab: string, runAsync: boolean, code: string): Promise<unknown>;
63
- injectCssIntoTab<TRes = string>(tab: string, style: string): Promise<ServerResponse<TRes>>;
64
- removeCssFromTab(tab: string, cssId: string): Promise<unknown>;
65
- }
66
- type DefinePluginFn = (serverAPI: ServerAPI) => Plugin;
67
- export declare const definePlugin: (fn: DefinePluginFn) => DefinePluginFn;
68
- export {};
package/dist/plugin.js DELETED
@@ -1,5 +0,0 @@
1
- export const definePlugin = (fn) => {
2
- return (...args) => {
3
- return fn(...args);
4
- };
5
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes