@decky/ui 4.16.5 → 5.0.0
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.
- package/README.md +4 -1
- package/dist/class-mapper.d.ts +1 -1
- package/dist/class-mapper.js +3 -3
- package/dist/common-modules.d.ts +3 -0
- package/dist/common-modules.js +12 -0
- package/dist/components/ButtonItem.js +3 -3
- package/dist/components/Carousel.js +2 -2
- package/dist/components/ControlsList.js +2 -2
- package/dist/components/Dialog.js +10 -9
- package/dist/components/DialogCheckbox.js +2 -3
- package/dist/components/Dropdown.js +1 -1
- package/dist/components/ErrorBoundary.js +1 -1
- package/dist/components/Field.js +2 -2
- package/dist/components/FocusRing.js +1 -1
- package/dist/components/Focusable.js +1 -1
- package/dist/components/Marquee.js +2 -2
- package/dist/components/Menu.js +7 -5
- package/dist/components/Modal.js +9 -4
- package/dist/components/Panel.d.ts +2 -4
- package/dist/components/Panel.js +5 -4
- package/dist/components/ProgressBar.d.ts +3 -3
- package/dist/components/ProgressBar.js +4 -4
- package/dist/components/Scroll.js +3 -3
- package/dist/components/SidebarNavigation.js +2 -2
- package/dist/components/SliderField.js +2 -2
- package/dist/components/Spinner.js +2 -2
- package/dist/components/SteamSpinner.js +2 -2
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tabs.js +4 -3
- package/dist/components/TextField.js +1 -1
- package/dist/components/Toggle.js +1 -1
- package/dist/components/ToggleField.js +2 -2
- package/dist/components/Wrappers.d.ts +2 -0
- package/dist/components/Wrappers.js +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/custom-components/ColorPickerModal.js +5 -6
- package/dist/deck-hooks/useParams.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/{webpack.d.ts → module-system.d.ts} +12 -3
- package/dist/module-system.js +244 -0
- package/dist/modules/Router.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/classData/index.d.ts +811 -0
- package/dist/utils/classData/index.js +1645 -0
- package/dist/utils/react/react.js +1 -1
- package/dist/utils/react/treepatcher.js +1 -1
- package/dist/utils/static-classes.d.ts +1 -46
- package/dist/utils/static-classes.js +1 -24
- package/package.json +1 -1
- package/src/class-mapper.ts +3 -3
- package/src/common-modules.ts +15 -0
- package/src/components/ButtonItem.ts +3 -3
- package/src/components/Carousel.ts +2 -2
- package/src/components/ControlsList.ts +2 -2
- package/src/components/Dialog.ts +12 -14
- package/src/components/DialogCheckbox.ts +2 -5
- package/src/components/Dropdown.tsx +1 -1
- package/src/components/ErrorBoundary.ts +1 -1
- package/src/components/Field.ts +2 -2
- package/src/components/FocusRing.ts +1 -1
- package/src/components/Focusable.ts +1 -1
- package/src/components/Marquee.ts +3 -3
- package/src/components/Menu.ts +20 -6
- package/src/components/Modal.ts +23 -7
- package/src/components/Panel.ts +12 -10
- package/src/components/ProgressBar.ts +12 -15
- package/src/components/Scroll.ts +3 -3
- package/src/components/SidebarNavigation.ts +3 -3
- package/src/components/SliderField.ts +2 -3
- package/src/components/Spinner.ts +2 -2
- package/src/components/SteamSpinner.ts +3 -3
- package/src/components/Tabs.ts +4 -3
- package/src/components/TextField.ts +2 -1
- package/src/components/Toggle.ts +1 -1
- package/src/components/ToggleField.ts +2 -3
- package/src/components/Wrappers.ts +12 -0
- package/src/components/index.ts +1 -0
- package/src/custom-components/ColorPickerModal.tsx +5 -6
- package/src/deck-hooks/useParams.ts +1 -1
- package/src/index.ts +3 -1
- package/src/module-system.ts +309 -0
- package/src/modules/Router.ts +1 -1
- package/src/utils/classData/index.ts +1680 -0
- package/src/utils/react/react.ts +1 -1
- package/src/utils/react/treepatcher.ts +1 -1
- package/src/utils/static-classes.ts +1 -984
- package/dist/webpack.js +0 -121
- package/src/webpack.ts +0 -160
package/README.md
CHANGED
|
@@ -27,4 +27,7 @@ If you want to start making a plugin with decky-frontend-lib, please direct your
|
|
|
27
27
|
This library can be found on [npm](https://www.npmjs.com/package/decky-frontend-lib) and as such you can pull it without a local copy for your project as needed.
|
|
28
28
|
|
|
29
29
|
Tips for fixing failing module finds after Steam updates:
|
|
30
|
-
- `Object.entries(DFL)` can point out any undefined exports
|
|
30
|
+
- `Object.entries(DFL)` can point out any undefined exports
|
|
31
|
+
|
|
32
|
+
### Standalone Use
|
|
33
|
+
You will need a loader to provide support for CDP module scope access. A spec doc will be released soon.
|
package/dist/class-mapper.d.ts
CHANGED
package/dist/class-mapper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const classModuleMap =
|
|
3
|
-
if (typeof m == 'object' && !m
|
|
1
|
+
import { createVarMapping } from './module-system';
|
|
2
|
+
export const classModuleMap = createVarMapping((m) => {
|
|
3
|
+
if (m && m != null && typeof m == 'object' && !(m instanceof Array) && !m?.__esModule) {
|
|
4
4
|
const keys = Object.keys(m);
|
|
5
5
|
if (keys.length == 1 && m.version)
|
|
6
6
|
return false;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { findModule, findModuleByExport, findModuleExport } from "./module-system";
|
|
2
|
+
export const CommonUIModule = findModule((m) => {
|
|
3
|
+
if (typeof m !== 'object')
|
|
4
|
+
return false;
|
|
5
|
+
for (let prop in m) {
|
|
6
|
+
if (m[prop]?.contextType?._currentValue && Object.keys(m).length > 60)
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
return false;
|
|
10
|
+
});
|
|
11
|
+
export const IconsModule = findModuleExport(e => e?.ABXYButton && e?.VR) || findModuleByExport((e) => e?.toString && /Spinner\),children:\[\(0,\w+\.jsx\)\("path",\{d:"M18 /.test(e.toString?.()) || /Spinner\)}\)?,.\.createElement\(\"path\",{d:\"M18 /.test(e.toString?.()));
|
|
12
|
+
export const ReactRouter = findModuleByExport((e) => e.computeRootMatch);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CommonUIModule } from '../
|
|
1
|
+
import { CommonUIModule } from '../common-modules';
|
|
2
2
|
import { createPropListRegex } from '../utils';
|
|
3
3
|
const buttonItemRegex = createPropListRegex(["highlightOnFocus", "childrenContainerWidth"], false);
|
|
4
|
-
export const ButtonItem = Object.values(CommonUIModule).find((mod) =>
|
|
5
|
-
mod?.render?.toString?.().includes('
|
|
4
|
+
export const ButtonItem = Object.values(CommonUIModule).find((mod) => mod?.render?.toString && buttonItemRegex.test(mod.render.toString()) &&
|
|
5
|
+
mod?.render?.toString?.().includes('childrenLayout'));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const Carousel =
|
|
1
|
+
import { findVar } from '../module-system';
|
|
2
|
+
export const Carousel = findVar((e) => e.render?.toString().includes('setFocusedColumn:'));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { findModuleExport } from '../
|
|
2
|
-
export const ControlsList = findModuleExport((e) => e?.toString && e.toString?.().includes('
|
|
1
|
+
import { findModuleExport } from '../module-system';
|
|
2
|
+
export const ControlsList = findModuleExport((e) => e?.toString && e.toString?.().includes('itemMaxSize??`gamepad`') && e.toString?.().includes('.PREFERRED_CHILD'));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { CommonUIModule } from '../
|
|
1
|
+
import { CommonUIModule } from '../common-modules';
|
|
2
2
|
const CommonDialogDivs = Object.values(CommonUIModule).filter((m) => typeof m === 'object' &&
|
|
3
|
-
(m?.render?.toString().includes('
|
|
4
|
-
m?.render?.toString().includes('
|
|
5
|
-
|
|
6
|
-
m?.render?.toString().includes('
|
|
3
|
+
(m?.render?.toString().includes('`div`,{') &&
|
|
4
|
+
m?.render?.toString().includes('role:') &&
|
|
5
|
+
m?.render?.toString().includes('ref:') &&
|
|
6
|
+
!m?.render?.toString().includes('PlayNavSound') &&
|
|
7
|
+
!m?.render?.toString().includes('useContext')));
|
|
7
8
|
const MappedDialogDivs = new Map(Object.values(CommonDialogDivs).map((m) => {
|
|
8
9
|
try {
|
|
9
10
|
const renderedDiv = m.render({});
|
|
@@ -14,9 +15,9 @@ const MappedDialogDivs = new Map(Object.values(CommonDialogDivs).map((m) => {
|
|
|
14
15
|
return [null, null];
|
|
15
16
|
}
|
|
16
17
|
}));
|
|
17
|
-
export const DialogHeader = (
|
|
18
|
+
export const DialogHeader = (Object.values(CommonUIModule).find((component) => {
|
|
18
19
|
const str = component?.render?.toString?.();
|
|
19
|
-
return str?.includes("role
|
|
20
|
+
return (str?.includes("role:`heading`")) && (str.includes("(`DialogHeader`,"));
|
|
20
21
|
}));
|
|
21
22
|
export const DialogSubHeader = MappedDialogDivs.get('DialogSubHeader');
|
|
22
23
|
export const DialogFooter = MappedDialogDivs.get('DialogFooter');
|
|
@@ -25,6 +26,6 @@ export const DialogBodyText = MappedDialogDivs.get('DialogBodyText');
|
|
|
25
26
|
export const DialogBody = MappedDialogDivs.get('DialogBody');
|
|
26
27
|
export const DialogControlsSection = MappedDialogDivs.get('DialogControlsSection');
|
|
27
28
|
export const DialogControlsSectionHeader = MappedDialogDivs.get('DialogControlsSectionHeader');
|
|
28
|
-
export const DialogButtonPrimary = Object.values(CommonUIModule).find((mod) => mod?.render?.toString?.()?.includes('
|
|
29
|
-
export const DialogButtonSecondary = Object.values(CommonUIModule).find((mod) => mod?.render?.toString?.()?.includes('
|
|
29
|
+
export const DialogButtonPrimary = Object.values(CommonUIModule).find((mod) => mod?.render?.toString?.()?.includes('`DialogButton`,`_DialogLayout`,`Primary`'));
|
|
30
|
+
export const DialogButtonSecondary = Object.values(CommonUIModule).find((mod) => mod?.render?.toString?.()?.includes('`DialogButton`,`_DialogLayout`,`Secondary`'));
|
|
30
31
|
export const DialogButton = DialogButtonSecondary;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { findModuleExport } from '../
|
|
1
|
+
import { findModuleExport } from '../module-system';
|
|
2
2
|
export const DialogCheckbox = findModuleExport(e => e?.prototype &&
|
|
3
3
|
typeof e?.prototype == "object" &&
|
|
4
4
|
"GetPanelElementProps" in e?.prototype &&
|
|
5
5
|
"SetChecked" in e?.prototype &&
|
|
6
6
|
"Toggle" in e?.prototype &&
|
|
7
|
-
|
|
8
|
-
e.prototype?.render?.toString?.().includes('fallback:'))));
|
|
7
|
+
e?.prototype?.render?.toString?.().includes('=`DialogCheckbox`'));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { CommonUIModule } from '../
|
|
2
|
+
import { CommonUIModule } from '../common-modules';
|
|
3
3
|
import { createPropListRegex } from '../utils';
|
|
4
4
|
export const Dropdown = Object.values(CommonUIModule).find((mod) => mod?.prototype?.SetSelectedOption && mod?.prototype?.BuildMenu);
|
|
5
5
|
const dropdownItemRegex = createPropListRegex(["dropDownControlRef", "description"], false);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { findModuleExport } from "../
|
|
1
|
+
import { findModuleExport } from "../module-system";
|
|
2
2
|
export const ErrorBoundary = findModuleExport((e) => e?.prototype?.Reset && e?.prototype?.componentDidCatch && e.prototype?.render?.toString().includes("lastErrorKey"));
|
package/dist/components/Field.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { findModuleExport } from '../
|
|
2
|
-
export const Field = findModuleExport((e) =>
|
|
1
|
+
import { findModuleExport } from '../module-system';
|
|
2
|
+
export const Field = findModuleExport((e) => e?.toString?.()?.includes('style:{"--indent-level":') && e?.toString?.()?.includes('shift-children-below'));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { findModuleExport } from '../
|
|
1
|
+
import { findModuleExport } from '../module-system';
|
|
2
2
|
export const FocusRing = findModuleExport((e) => e?.toString?.()?.includes('.GetShowDebugFocusRing())'));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { findModuleExport } from '../
|
|
1
|
+
import { findModuleExport } from '../module-system';
|
|
2
2
|
import { createPropListRegex } from '../utils';
|
|
3
3
|
const focusableRegex = createPropListRegex(["flow-children", "onActivate", "onCancel", "focusClassName", "focusWithinClassName"]);
|
|
4
4
|
export const Focusable = findModuleExport((e) => (typeof e == 'function' && e?.toString && focusableRegex.test(e.toString?.())) || (e?.render?.toString && focusableRegex.test(e.render.toString())));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const Marquee =
|
|
1
|
+
import { findVar } from '../module-system';
|
|
2
|
+
export const Marquee = findVar((e) => typeof e == "function" && e.toString?.().includes('--fade-length-left') && e.toString?.().includes('--fade-length-right'));
|
package/dist/components/Menu.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { findModuleByExport, findModuleDetailsByExport, findModuleExport } from '../
|
|
1
|
+
import { findModuleByExport, findModuleDetailsByExport, findModuleExport } from '../module-system';
|
|
2
2
|
export const showContextMenu = findModuleExport((e) => typeof e === 'function' &&
|
|
3
3
|
e.toString?.().includes('GetContextMenuManagerFromWindow(') &&
|
|
4
4
|
e.toString?.().includes('.CreateContextMenuInstance('));
|
|
5
5
|
const MenuModule = findModuleDetailsByExport((e) => e?.render?.toString()?.includes('bPlayAudio:') || (e?.prototype?.OnOKButton && e?.prototype?.OnMouseEnter));
|
|
6
|
-
export const Menu =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export const Menu = Object.values(MenuModule?.[0] ?? {}).find((e) => e?.toString?.()?.includes?.(`useId`) && e?.toString?.()?.includes?.(`labelId`));
|
|
7
|
+
const MenuGroupModule = findModuleByExport((e) => e?.prototype?.Focus &&
|
|
8
|
+
e?.prototype?.OnOKButton &&
|
|
9
|
+
(e?.prototype?.render?.toString().includes?.("this.props.tone==`emphasis`")));
|
|
10
|
+
export const MenuGroup = MenuGroupModule &&
|
|
11
|
+
Object.values(MenuGroupModule).find((e) => typeof e == 'function' && e?.toString?.()?.includes('bInGamepadUI:'));
|
|
10
12
|
export const MenuItem = MenuModule?.[1];
|
|
11
13
|
export const MenuSeparator = findModuleExport((e) => typeof e === 'function' && /className:.+?\.ContextMenuSeparator/.test(e.toString?.()));
|
package/dist/components/Modal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { findModule, findModuleDetailsByExport, findModuleExport } from '../module-system';
|
|
1
2
|
import { findSP } from '../utils';
|
|
2
|
-
import { findModule, findModuleDetailsByExport, findModuleExport } from '../webpack';
|
|
3
3
|
const showModalRaw = findModuleExport((e) => typeof e === 'function' && e.toString?.().includes('props.bDisableBackgroundDismiss') && !e?.prototype?.Cancel);
|
|
4
4
|
export const showModal = (modal, parent, props = {
|
|
5
5
|
strTitle: 'Decky Dialog',
|
|
@@ -9,8 +9,11 @@ export const showModal = (modal, parent, props = {
|
|
|
9
9
|
bHideActions: props.bHideActionIcons,
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
|
-
export const ConfirmModal = findModuleExport((e) => e?.toString?.()?.includes('bUpdateDisabled') &&
|
|
13
|
-
|
|
12
|
+
export const ConfirmModal = findModuleExport((e) => e?.toString?.()?.includes('bUpdateDisabled') &&
|
|
13
|
+
e?.toString?.()?.includes('closeModal') &&
|
|
14
|
+
e?.toString?.()?.includes('onGamepadCancel'));
|
|
15
|
+
export const ModalRoot = findModuleExport((e) => typeof e === 'function' &&
|
|
16
|
+
e.toString?.().includes('Either closeModal or onCancel should be passed to GenericDialog. Classes: ')) ||
|
|
14
17
|
Object.values(findModule((m) => {
|
|
15
18
|
if (typeof m !== 'object')
|
|
16
19
|
return false;
|
|
@@ -21,7 +24,9 @@ export const ModalRoot = findModuleExport((e) => typeof e === 'function' && e.to
|
|
|
21
24
|
}
|
|
22
25
|
return false;
|
|
23
26
|
}) || {})?.find((x) => x?.type?.toString?.()?.includes('((function(){'));
|
|
24
|
-
const [ModalModule, _ModalPosition] = findModuleDetailsByExport((e) => e
|
|
27
|
+
const [ModalModule, _ModalPosition] = findModuleDetailsByExport((e) => typeof e == 'function' &&
|
|
28
|
+
e?.toString?.()?.includes('.ShowPortalModal()') &&
|
|
29
|
+
e?.toString?.()?.includes('.OnElementReadyCallbacks.Register('), 5);
|
|
25
30
|
const ModalModuleProps = ModalModule ? Object.values(ModalModule) : [];
|
|
26
31
|
export const SimpleModal = ModalModuleProps.find((prop) => {
|
|
27
32
|
const string = prop?.toString();
|
|
@@ -5,7 +5,5 @@ export interface PanelSectionProps {
|
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export declare const PanelSection: FC<PanelSectionProps>;
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export declare const PanelSectionRow: FC<PanelSectionRowProps>;
|
|
8
|
+
export type PanelSectionRowProps = Parameters<typeof PanelSectionRow>[0];
|
|
9
|
+
export declare const PanelSectionRow: import("react").ForwardRefExoticComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
package/dist/components/Panel.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const
|
|
1
|
+
import { findVar } from '../module-system';
|
|
2
|
+
import { createDivWrapper } from './Wrappers';
|
|
3
|
+
import { createPropListRegex, quickAccessControlsClasses } from '../utils';
|
|
4
|
+
export const PanelSection = findVar((v) => typeof v == "function" && createPropListRegex(["title", "children"], true).test(v.toString()));
|
|
5
|
+
export const PanelSectionRow = createDivWrapper(quickAccessControlsClasses.PanelSectionRow);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ReactNode, FC } from 'react';
|
|
2
2
|
import { ItemProps } from './Item';
|
|
3
3
|
export interface ProgressBarItemProps extends ItemProps {
|
|
4
|
+
rtEstimatedCompletionTime?: number;
|
|
5
|
+
sOperationText?: ReactNode;
|
|
4
6
|
indeterminate?: boolean;
|
|
5
7
|
nTransitionSec?: number;
|
|
6
8
|
nProgress?: number;
|
|
@@ -13,9 +15,7 @@ export interface ProgressBarProps {
|
|
|
13
15
|
focusable?: boolean;
|
|
14
16
|
}
|
|
15
17
|
export interface ProgressBarWithInfoProps extends ProgressBarItemProps {
|
|
16
|
-
rtEstimatedCompletionTime?: number;
|
|
17
|
-
sOperationText?: ReactNode;
|
|
18
18
|
}
|
|
19
19
|
export declare const ProgressBar: FC<ProgressBarProps>;
|
|
20
|
-
export declare const ProgressBarWithInfo: FC<ProgressBarWithInfoProps>;
|
|
21
20
|
export declare const ProgressBarItem: FC<ProgressBarItemProps>;
|
|
21
|
+
export declare const ProgressBarWithInfo: FC<ProgressBarItemProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { findVar } from '../module-system';
|
|
2
2
|
import { createPropListRegex } from '../utils';
|
|
3
|
-
export const ProgressBar =
|
|
4
|
-
export const ProgressBarWithInfo = findModuleExport((e) => e?.toString?.()?.includes('.ProgressBarFieldStatus,children') || e?.toString?.()?.includes('.ProgressBarFieldStatus},'));
|
|
3
|
+
export const ProgressBar = findVar((e) => typeof e == "function" && e?.toString()?.includes("#ProgressBar_ValueUnknown"));
|
|
5
4
|
const progressBarItemRegex = createPropListRegex(["indeterminate", "nTransitionSec", "nProgress"]);
|
|
6
|
-
export const ProgressBarItem =
|
|
5
|
+
export const ProgressBarItem = findVar((e) => typeof e == "function" && progressBarItemRegex.test(e.toString?.()));
|
|
6
|
+
export const ProgressBarWithInfo = ProgressBarItem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { findModuleByExport, findModuleExport } from '../
|
|
2
|
-
const ScrollingModule = findModuleByExport((e) => e?.render?.toString?.().includes('{case
|
|
1
|
+
import { findModuleByExport, findModuleExport } from '../module-system';
|
|
2
|
+
const ScrollingModule = findModuleByExport((e) => e?.render?.toString?.().includes('{case`x`:'));
|
|
3
3
|
const ScrollingModuleProps = ScrollingModule ? Object.values(ScrollingModule) : [];
|
|
4
|
-
export const ScrollPanel = ScrollingModuleProps.find((prop) => prop?.render?.toString?.().includes('{case
|
|
4
|
+
export const ScrollPanel = ScrollingModuleProps.find((prop) => prop?.render?.toString?.().includes('{case`x`:'));
|
|
5
5
|
export const ScrollPanelGroup = findModuleExport((e) => e?.render?.toString().includes('.FocusVisibleChild(),[])') || e?.render?.toString().includes('.FocusVisibleChild()),[])'));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { findVar } from '../module-system';
|
|
2
2
|
import { createPropListRegex } from '../utils';
|
|
3
3
|
const sidebarNavigationRegex = createPropListRegex(["pages", "fnSetNavigateToPage", "disableRouteReporting"]);
|
|
4
|
-
export const SidebarNavigation =
|
|
4
|
+
export const SidebarNavigation = findVar((e) => typeof e == "function" && sidebarNavigationRegex.test(e.toString?.()));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CommonUIModule } from '../
|
|
2
|
-
export const SliderField = Object.values(CommonUIModule).find((mod) => mod?.toString?.()?.includes(
|
|
1
|
+
import { CommonUIModule } from '../common-modules';
|
|
2
|
+
export const SliderField = Object.values(CommonUIModule).find((mod) => mod?.toString?.()?.includes("SliderField`,"));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IconsModule } from '../
|
|
2
|
-
export const Spinner = IconsModule && Object.values(IconsModule)?.find((mod) => mod?.toString &&
|
|
1
|
+
import { IconsModule } from '../common-modules';
|
|
2
|
+
export const Spinner = IconsModule && Object.values(IconsModule)?.find((mod) => mod?.toString && /,[a-zA-Z0-9_$]+\),children:\[\(0,[a-zA-Z0-9_$]+\.jsx\)\(`path`,\{d:`M18 /.test(mod.toString()));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const SteamSpinner =
|
|
1
|
+
import { findVar } from '../module-system';
|
|
2
|
+
export const SteamSpinner = findVar((e) => typeof e == "function" && e?.toString?.()?.includes('Steam Spinner') && e?.toString?.()?.includes('src'));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { FooterLegendProps } from './FooterLegend';
|
|
3
3
|
export interface Tab {
|
|
4
4
|
id: string;
|
|
@@ -13,4 +13,4 @@ export interface TabsProps {
|
|
|
13
13
|
onShowTab: (tab: string) => void;
|
|
14
14
|
autoFocusContents?: boolean;
|
|
15
15
|
}
|
|
16
|
-
export declare const Tabs:
|
|
16
|
+
export declare const Tabs: FC<TabsProps>;
|
package/dist/components/Tabs.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { findVar } from '../module-system';
|
|
2
|
+
import { createPropListRegex } from '../utils';
|
|
3
|
+
const tabsRegex = createPropListRegex(["activeTab", "autoFocusContents", "cancelSkipTabHeader", "tabs"]);
|
|
4
|
+
export const Tabs = findVar(e => typeof e == "function" && tabsRegex.test(e.toString()));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CommonUIModule } from '../
|
|
1
|
+
import { CommonUIModule } from '../common-modules';
|
|
2
2
|
export const TextField = Object.values(CommonUIModule).find((mod) => mod?.validateUrl && mod?.validateEmail);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CommonUIModule } from '../
|
|
1
|
+
import { CommonUIModule } from '../common-modules';
|
|
2
2
|
export const Toggle = Object.values(CommonUIModule).find((mod) => mod?.render?.toString?.()?.includes('.ToggleOff)'));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CommonUIModule } from '../
|
|
2
|
-
export const ToggleField = Object.values(CommonUIModule).find((mod) => mod?.render?.toString?.()?.includes(
|
|
1
|
+
import { CommonUIModule } from '../common-modules';
|
|
2
|
+
export const ToggleField = Object.values(CommonUIModule).find((mod) => mod?.render?.toString?.()?.includes("ToggleField`,"));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
2
|
+
export declare const createDivWrapper: (className: string, role?: string, defaultProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => ForwardRefExoticComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { ConfirmModal, SliderField } from '../components';
|
|
4
|
-
import { gamepadSliderClasses } from '../utils/static-classes';
|
|
5
4
|
export const ColorPickerModal = ({ closeModal, onConfirm = () => { }, title = 'Color Picker', defaultH = 0, defaultS = 100, defaultL = 50, defaultA = 1, }) => {
|
|
6
5
|
const [H, setH] = useState(defaultH);
|
|
7
6
|
const [S, setS] = useState(defaultS);
|
|
@@ -18,13 +17,13 @@ export const ColorPickerModal = ({ closeModal, onConfirm = () => { }, title = 'C
|
|
|
18
17
|
closeModal();
|
|
19
18
|
}, children: [_jsx("style", { children: `
|
|
20
19
|
/* This removes the cyan track color that is behind the slider head */
|
|
21
|
-
.ColorPicker_Container
|
|
20
|
+
.ColorPicker_Container .SliderTrack {
|
|
22
21
|
--left-track-color: #0000;
|
|
23
22
|
/* This is for compatibility with the "Colored Toggles" CSSLoader Theme*/
|
|
24
23
|
--colored-toggles-main-color: #0000;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
.ColorPicker_HSlider
|
|
26
|
+
.ColorPicker_HSlider .SliderTrack {
|
|
28
27
|
background: linear-gradient(
|
|
29
28
|
270deg,
|
|
30
29
|
hsla(360, var(--decky-color-picker-svalue), var(--decky-color-picker-lvalue), var(--decky-color-picker-avalue)),
|
|
@@ -35,7 +34,7 @@ export const ColorPickerModal = ({ closeModal, onConfirm = () => { }, title = 'C
|
|
|
35
34
|
);
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
.ColorPicker_SSlider
|
|
37
|
+
.ColorPicker_SSlider .SliderTrack {
|
|
39
38
|
background: linear-gradient(
|
|
40
39
|
90deg,
|
|
41
40
|
hsla(var(--decky-color-picker-hvalue), 0%, var(--decky-color-picker-lvalue), var(--decky-color-picker-avalue)),
|
|
@@ -43,7 +42,7 @@ export const ColorPickerModal = ({ closeModal, onConfirm = () => { }, title = 'C
|
|
|
43
42
|
);
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
.ColorPicker_LSlider
|
|
45
|
+
.ColorPicker_LSlider .SliderTrack {
|
|
47
46
|
background: linear-gradient(
|
|
48
47
|
90deg,
|
|
49
48
|
hsla(var(--decky-color-picker-hvalue), var(--decky-color-picker-svalue), 0%, var(--decky-color-picker-avalue)),
|
|
@@ -52,7 +51,7 @@ export const ColorPickerModal = ({ closeModal, onConfirm = () => { }, title = 'C
|
|
|
52
51
|
);
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
.ColorPicker_ASlider
|
|
54
|
+
.ColorPicker_ASlider .SliderTrack {
|
|
56
55
|
background: linear-gradient(
|
|
57
56
|
90deg,
|
|
58
57
|
hsla(var(--decky-color-picker-hvalue), var(--decky-color-picker-svalue), var(--decky-color-picker-lvalue), 0),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ReactRouter } from '../
|
|
1
|
+
import { ReactRouter } from '../common-modules';
|
|
2
2
|
export const useParams = Object.values(ReactRouter).find((val) => /return (\w*)\?\1\.params:{}/.test(`${val}`));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
export * from './module-system';
|
|
1
2
|
export * from './custom-components';
|
|
2
3
|
export * from './custom-hooks';
|
|
3
4
|
export * from './components';
|
|
4
5
|
export * from './deck-hooks';
|
|
5
6
|
export * from './modules';
|
|
6
7
|
export * from './globals';
|
|
7
|
-
export * from './
|
|
8
|
+
export * from './modules';
|
|
8
9
|
export * from './utils';
|
|
9
10
|
export * from './class-mapper';
|
|
11
|
+
export * from './common-modules';
|
|
10
12
|
export declare const definePlugin: (fn: any) => any;
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
export * from './module-system';
|
|
1
2
|
export * from './custom-components';
|
|
2
3
|
export * from './custom-hooks';
|
|
3
4
|
export * from './components';
|
|
4
5
|
export * from './deck-hooks';
|
|
5
6
|
export * from './modules';
|
|
6
7
|
export * from './globals';
|
|
7
|
-
export * from './
|
|
8
|
+
export * from './modules';
|
|
8
9
|
export * from './utils';
|
|
9
10
|
export * from './class-mapper';
|
|
11
|
+
export * from './common-modules';
|
|
10
12
|
export const definePlugin = (fn) => {
|
|
11
13
|
return (...args) => {
|
|
12
14
|
return fn(...args);
|
|
@@ -6,18 +6,27 @@ declare global {
|
|
|
6
6
|
export type ModuleID = string;
|
|
7
7
|
export type Module = any;
|
|
8
8
|
export type Export = any;
|
|
9
|
+
export type Var = any;
|
|
9
10
|
type FilterFn = (module: any) => boolean;
|
|
10
11
|
type ExportFilterFn = (moduleExport: any, exportName?: any) => boolean;
|
|
12
|
+
type VarFilterFn = (variable: any, varName?: any) => boolean;
|
|
11
13
|
type FindFn = (module: any) => any;
|
|
14
|
+
type ResolveModuleScopeFn = (objectFromScope: any, moduleForDebug?: string) => Promise<Module>;
|
|
15
|
+
export declare let processedModules: string[];
|
|
12
16
|
export declare let modules: Map<string, any>;
|
|
17
|
+
export declare let moduleScopes: Map<string, any>;
|
|
18
|
+
export declare function initModules(resolveModuleScopeFn: ResolveModuleScopeFn): Promise<void>;
|
|
13
19
|
export declare const findModule: (filter: FilterFn) => any;
|
|
14
20
|
export declare const findModuleDetailsByExport: (filter: ExportFilterFn, minExports?: number) => [module: Module | undefined, moduleExport: any, exportName: any, moduleID: string | undefined];
|
|
15
21
|
export declare const findModuleByExport: (filter: ExportFilterFn, minExports?: number) => any;
|
|
16
22
|
export declare const findModuleExport: (filter: ExportFilterFn, minExports?: number) => any;
|
|
23
|
+
export declare const findScope: (filter: FilterFn) => any;
|
|
24
|
+
export declare const findScopeDetailsByVar: (filter: VarFilterFn, minExports?: number) => [moduleScope: Module | undefined, moduleExport: any, exportName: any, moduleID: string | undefined];
|
|
25
|
+
export declare const findModuleScopeByVar: (filter: VarFilterFn, minVars?: number) => any;
|
|
26
|
+
export declare const findVar: (filter: VarFilterFn, minVars?: number) => any;
|
|
17
27
|
export declare const findModuleChild: (filter: FindFn) => any;
|
|
18
28
|
export declare const findAllModules: (filter: FilterFn) => any[];
|
|
19
29
|
export declare const createModuleMapping: (filter: FilterFn) => Map<string, any>;
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const ReactRouter: any;
|
|
30
|
+
export declare const createScopeMapping: (filter: FilterFn) => Map<string, any>;
|
|
31
|
+
export declare const createVarMapping: (filter: FilterFn) => Map<string, any>;
|
|
23
32
|
export {};
|