@decky/ui 4.16.4 → 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.
Files changed (92) hide show
  1. package/README.md +4 -1
  2. package/dist/class-mapper.d.ts +1 -1
  3. package/dist/class-mapper.js +3 -3
  4. package/dist/common-modules.d.ts +3 -0
  5. package/dist/common-modules.js +12 -0
  6. package/dist/components/ButtonItem.js +3 -3
  7. package/dist/components/Carousel.js +2 -2
  8. package/dist/components/ControlsList.js +2 -2
  9. package/dist/components/Dialog.js +10 -9
  10. package/dist/components/DialogCheckbox.js +2 -3
  11. package/dist/components/Dropdown.js +1 -1
  12. package/dist/components/ErrorBoundary.js +1 -1
  13. package/dist/components/Field.js +2 -2
  14. package/dist/components/FocusRing.js +1 -1
  15. package/dist/components/Focusable.js +1 -1
  16. package/dist/components/Marquee.js +2 -2
  17. package/dist/components/Menu.js +7 -5
  18. package/dist/components/Modal.js +9 -4
  19. package/dist/components/Panel.d.ts +2 -4
  20. package/dist/components/Panel.js +5 -4
  21. package/dist/components/ProgressBar.d.ts +3 -3
  22. package/dist/components/ProgressBar.js +4 -4
  23. package/dist/components/Scroll.js +3 -3
  24. package/dist/components/SidebarNavigation.js +2 -2
  25. package/dist/components/SliderField.js +2 -2
  26. package/dist/components/Spinner.js +2 -2
  27. package/dist/components/SteamSpinner.js +2 -2
  28. package/dist/components/Tabs.d.ts +2 -2
  29. package/dist/components/Tabs.js +4 -3
  30. package/dist/components/TextField.js +1 -1
  31. package/dist/components/Toggle.js +1 -1
  32. package/dist/components/ToggleField.js +2 -2
  33. package/dist/components/Wrappers.d.ts +2 -0
  34. package/dist/components/Wrappers.js +3 -0
  35. package/dist/components/index.d.ts +1 -0
  36. package/dist/components/index.js +1 -0
  37. package/dist/custom-components/ColorPickerModal.js +5 -6
  38. package/dist/deck-hooks/useParams.js +1 -1
  39. package/dist/globals/stores/appstore.d.ts +1 -1
  40. package/dist/index.d.ts +3 -1
  41. package/dist/index.js +3 -1
  42. package/dist/{webpack.d.ts → module-system.d.ts} +12 -3
  43. package/dist/module-system.js +244 -0
  44. package/dist/modules/Router.js +1 -1
  45. package/dist/tsconfig.tsbuildinfo +1 -1
  46. package/dist/utils/classData/index.d.ts +811 -0
  47. package/dist/utils/classData/index.js +1645 -0
  48. package/dist/utils/react/react.js +1 -1
  49. package/dist/utils/react/treepatcher.js +1 -1
  50. package/dist/utils/static-classes.d.ts +1 -46
  51. package/dist/utils/static-classes.js +1 -24
  52. package/package.json +1 -1
  53. package/src/class-mapper.ts +3 -3
  54. package/src/common-modules.ts +15 -0
  55. package/src/components/ButtonItem.ts +3 -3
  56. package/src/components/Carousel.ts +2 -2
  57. package/src/components/ControlsList.ts +2 -2
  58. package/src/components/Dialog.ts +12 -14
  59. package/src/components/DialogCheckbox.ts +2 -5
  60. package/src/components/Dropdown.tsx +1 -1
  61. package/src/components/ErrorBoundary.ts +1 -1
  62. package/src/components/Field.ts +2 -2
  63. package/src/components/FocusRing.ts +1 -1
  64. package/src/components/Focusable.ts +1 -1
  65. package/src/components/Marquee.ts +3 -3
  66. package/src/components/Menu.ts +20 -6
  67. package/src/components/Modal.ts +23 -7
  68. package/src/components/Panel.ts +12 -10
  69. package/src/components/ProgressBar.ts +12 -15
  70. package/src/components/Scroll.ts +3 -3
  71. package/src/components/SidebarNavigation.ts +3 -3
  72. package/src/components/SliderField.ts +2 -3
  73. package/src/components/Spinner.ts +2 -2
  74. package/src/components/SteamSpinner.ts +3 -3
  75. package/src/components/Tabs.ts +4 -3
  76. package/src/components/TextField.ts +2 -1
  77. package/src/components/Toggle.ts +1 -1
  78. package/src/components/ToggleField.ts +2 -3
  79. package/src/components/Wrappers.ts +12 -0
  80. package/src/components/index.ts +1 -0
  81. package/src/custom-components/ColorPickerModal.tsx +5 -6
  82. package/src/deck-hooks/useParams.ts +1 -1
  83. package/src/globals/stores/appstore.ts +1 -1
  84. package/src/index.ts +3 -1
  85. package/src/module-system.ts +309 -0
  86. package/src/modules/Router.ts +1 -1
  87. package/src/utils/classData/index.ts +1680 -0
  88. package/src/utils/react/react.ts +1 -1
  89. package/src/utils/react/treepatcher.ts +1 -1
  90. package/src/utils/static-classes.ts +1 -984
  91. package/dist/webpack.js +0 -121
  92. package/src/webpack.ts +0 -160
@@ -4,7 +4,7 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
4
4
  };
5
5
  import { useState } from 'react';
6
6
  export function createPropListRegex(propList, fromStart = true) {
7
- let regexString = fromStart ? "const\{" : "";
7
+ let regexString = fromStart ? "(?:const|let)\{" : "";
8
8
  propList.forEach((prop, propIdx) => {
9
9
  regexString += `"?${prop}"?:[a-zA-Z_$]{1,2}`;
10
10
  if (propIdx < propList.length - 1) {
@@ -1,7 +1,7 @@
1
1
  import Logger from '../../logger';
2
2
  import { afterPatch } from '../patcher';
3
3
  import { wrapReactClass, wrapReactType } from './react';
4
- let loggingEnabled = true;
4
+ let loggingEnabled = false;
5
5
  let perfLoggingEnabled = false;
6
6
  export function setReactPatcherLoggingEnabled(value = true) { loggingEnabled = value; }
7
7
  ;
@@ -1,54 +1,9 @@
1
- type QuickAccessMenuClasses = Record<'ActiveTab' | 'AllTabContents' | 'BackgroundAnimation' | 'BatteryDetailsLabels' | 'BatteryIcon' | 'BatteryPercentageLabel' | 'BatteryProjectedLabel' | 'BatteryProjectedValue' | 'BatterySectionContainer' | 'Blocked' | 'ComingSoon' | 'Container' | 'ContentTransition' | 'Down' | 'EmptyNotifications' | 'Enter' | 'EnterActive' | 'Exit' | 'ExitActive' | 'FooterBoxShadow' | 'FriendsListTabPanel' | 'FriendsTitle' | 'FullHeight' | 'HeaderAndFooterVisible' | 'HeaderContainer' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'KeyboardButton' | 'Label' | 'LowBattery' | 'LowBatteryGauge' | 'Menu' | 'Open' | 'PanelExitAnchor' | 'PanelOuterNav' | 'PanelSection' | 'PanelSectionRow' | 'PanelSectionTitle' | 'PopupBody' | 'QuickAccessMenu' | 'QuickAccessNotifications' | 'ReallyLow' | 'Remaining' | 'Selected' | 'Tab' | 'TabContentColumn' | 'TabGroupPanel' | 'TabPanelHidden' | 'Tabs' | 'TabsWithFooter' | 'Text' | 'Title' | 'TransitionMenuDelay' | 'Up' | 'VR' | 'ViewPlaceholder' | 'VoiceTab' | 'duration-app-launch' | 'focusAnimation' | 'hoverAnimation' | 'vrgamepadui-floating-bar-popup-panel-height' | 'vrgamepadui-floating-bar-popup-panel-width' | 'vrgamepadui-floating-keyboard-height' | 'vrgamepadui-floating-keyboard-width' | 'vrgamepadui-floating-side-panel-height' | 'vrgamepadui-floating-side-panel-width', string>;
2
- type ScrollPanelClasses = Record<'ScrollBoth' | 'ScrollPanel' | 'ScrollX' | 'ScrollY', string>;
3
- type GamepadDialogClasses = Record<'ActiveAndUnfocused' | 'AlignCenter' | 'AlignLeft' | 'AlignRight' | 'BackgroundAnimation' | 'BasicTextInput' | 'BeforeChildren' | 'BottomButtons' | 'Button' | 'ChildrenWidthFixed' | 'ChildrenWidthGrow' | 'Clickable' | 'CompactPadding' | 'ControlsListChild' | 'ControlsListOuterPanel' | 'Disabled' | 'DropDownControlButtonContents' | 'DropDownRow' | 'ExtraPaddingOnChildrenBelow' | 'ExtraSpacing' | 'Field' | 'FieldChildrenInner' | 'FieldChildrenWithIcon' | 'FieldClickTarget' | 'FieldDescription' | 'FieldIcon' | 'FieldLabel' | 'FieldLabelRow' | 'FieldLabelValue' | 'FieldLeftColumn' | 'Front' | 'FullWidth' | 'GamepadDialogContent' | 'GamepadDialogContent_InnerWidth' | 'HighlightOnFocus' | 'IconContainer' | 'InlineWrapShiftsChildrenBelow' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'ItemMaxSizeDesktop' | 'Label' | 'LabelFieldValue' | 'ModalClickToDismiss' | 'ModalPosition' | 'NoHeaderPadding' | 'NoMinWidth' | 'On' | 'QuickAccess-Menu' | 'ScrollWithin' | 'Spacer' | 'StandaloneFieldSeparator' | 'StandardPadding' | 'StandardSpacing' | 'Toggle' | 'ToggleRail' | 'ToggleSwitch' | 'VR' | 'VerticalAlignCenter' | 'WithBottomSeparator' | 'WithBottomSeparatorStandard' | 'WithBottomSeparatorThick' | 'WithChildrenBelow' | 'WithDescription' | 'WithFirstRow' | 'WithStandardPadding' | 'duration-app-launch' | 'focusAnimation' | 'hoverAnimation' | 'slideInAnimation', string>;
4
- type QuickAccessControlsClasses = Record<'BackgroundAnimation' | 'BatteryDetailsLabels' | 'BatteryIcon' | 'BatteryPercentageLabel' | 'BatteryProjectedLabel' | 'BatteryProjectedValue' | 'BatterySectionContainer' | 'ComingSoon' | 'EmptyNotifications' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'Label' | 'LowBattery' | 'LowBatteryGauge' | 'PanelSection' | 'PanelSectionRow' | 'PanelSectionTitle' | 'QuickAccessNotifications' | 'ReallyLow' | 'Remaining' | 'Text' | 'VR' | 'duration-app-launch' | 'focusAnimation' | 'hoverAnimation', string>;
5
- type UpdaterFieldClasses = Record<'ApplyingText' | 'BackgroundAnimation' | 'BatteryLowWarning' | 'Body' | 'CurrentStatus' | 'Denominator' | 'EventDetailTitle' | 'EventDetailsBody' | 'EventDetailsSubTitle' | 'InsufficientBatteryText' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'Label' | 'Numerator' | 'OOBEUpdateStatusContainer' | 'PatchNotes' | 'PostedTime' | 'ProgressInfoContainer' | 'ProgressStatus' | 'Separator' | 'Text' | 'TextContainer' | 'TimeRemaining' | 'Title' | 'TotalUpdateSize' | 'UnsupportedHardwareWarning' | 'UpdateBytesRemaining' | 'UpdatePanel' | 'UpdateScreen' | 'UpdateStatusContainer' | 'UpdaterFieldStatusApplying' | 'UpdaterFieldStatusSuccess' | 'duration-app-launch' | 'fadeInAnimation' | 'focusAnimation' | 'hoverAnimation', string>;
6
- type PlaySectionClasses = Record<'AchievementCountLabel' | 'AchievementProgressRow' | 'AchievementSVG' | 'ActionSection' | 'AppButtonsContainer' | 'Arrow' | 'AvatarAndPersona' | 'BackgroundAnimation' | 'BreakNarrow' | 'BreakShort' | 'BreakTall' | 'BreakUltraWide' | 'BreakWide' | 'ButtonChild' | 'ButtonText' | 'ChooseButton' | 'ClaimButton' | 'ClaimButtonContainer' | 'ClickablePlayBarItem' | 'CloudIconSVG' | 'CloudStatusIcon' | 'CloudStatusLabel' | 'CloudStatusRow' | 'CloudStatusSyncFail' | 'CloudSyncProblem' | 'CloudSynching' | 'ComingSoon' | 'Container' | 'ControllerConfigButton' | 'ControllerSupportInfo' | 'ControllerSupportRow' | 'DetailsProgressBar' | 'DetailsProgressContainer' | 'DetailsSection' | 'DetailsSectionExtra' | 'DetailsSectionStatus' | 'Disabled' | 'DotDotDot' | 'DownloadPaused' | 'DownloadProgressBar' | 'Downloading' | 'FavoriteButton' | 'Favorited' | 'FeatureHidden' | 'GameInfoButton' | 'GameStat' | 'GameStatIcon' | 'GameStatIconForced' | 'GameStatRight' | 'GameStatsSection' | 'GamepadUIBreakNarrow' | 'GamepadUIBreakShort' | 'GamepadUIBreakWide' | 'Glassy' | 'HideWhenNarrow' | 'Icon' | 'Icons' | 'InPage' | 'InnerContainer' | 'InvalidPlatform' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'LastPlayed' | 'LastPlayedInfo' | 'LaunchOptionCallout' | 'LaunchOptionCalloutMessage' | 'LaunchOptionCalloutMessageContainer' | 'LongButton' | 'MenuActive' | 'MenuButton' | 'MenuButtonContainer' | 'MiniAchievements' | 'OfflineMode' | 'OnlyDownloadBar' | 'PermanentlyUnavailable' | 'PlayBar' | 'PlayBarCloudStatusContainer' | 'PlayBarDetailLabel' | 'PlayBarGameIcon' | 'PlayBarGameName' | 'PlayBarIconAndGame' | 'PlayBarLabel' | 'Playtime' | 'PlaytimeIcon' | 'PlaytimeIconForced' | 'PortraitBar' | 'PrivateAppActiveIndicator' | 'RecentlyUpdated' | 'RecentlyUpdatedIcon' | 'RecentlyUpdatedLink' | 'RecentlyUpdatedText' | 'RightBreakNarrow' | 'RightBreakUltraNarrow' | 'RightBreakUltraWide' | 'RightBreakWide' | 'RightControls' | 'Row' | 'SharedLibrary' | 'ShowStreaming' | 'StatusAndStats' | 'StatusNameContainer' | 'StickyHeader' | 'StickyHeaderShadow' | 'SuperimposedGridItems' | 'SyncAnim' | 'Visible' | 'duration-app-launch' | 'favorited' | 'focusAnimation' | 'hoverAnimation', string>;
7
- type GamepadSliderClasses = Record<'AlignToEnds' | 'AlignToLeft' | 'AlignToRight' | 'BackgroundAnimation' | 'CompoundSlider' | 'CompoundSliderSubSlider' | 'CompoundSliderSubSliderLabel' | 'CompoundSliderSubSliderLabelContainer' | 'CompoundSliderSubSliderLabelInternal' | 'CompoundSliderSubSliderLabelPositioner' | 'DefaultValueColorLeft' | 'DefaultValueColorRight' | 'DefaultValueIsColorRange' | 'DefaultValueTick' | 'DefaultValueTickContainer' | 'DescriptionValue' | 'Disabled' | 'EditableValue' | 'ErrorShake' | 'FakeEditableValue' | 'Icon' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'LabelText' | 'Left' | 'ParenSliderHandle' | 'ParenSliderHandleContainer' | 'RedBorder' | 'Right' | 'SliderControl' | 'SliderControlAndNotches' | 'SliderControlPanelGroup' | 'SliderHandle' | 'SliderHandleContainer' | 'SliderHandleFocusPop' | 'SliderHasNotches' | 'SliderNotch' | 'SliderNotchContainer' | 'SliderNotchLabel' | 'SliderNotchTick' | 'SliderTrack' | 'SliderTrackDark' | 'TickActive' | 'VerticalLineSliderHandle' | 'VerticalLineSliderHandleContainer' | 'WithDefaultValue' | 'duration-app-launch' | 'error-shake' | 'error-shake-duration', string>;
8
1
  type AppDetailsHeaderClasses = Record<'AddBoxSizer' | 'Background' | 'Bottom' | 'BottomCenter' | 'BottomLeft' | 'BottomRight' | 'BoxSizer' | 'BoxSizerButtonContainer' | 'BoxSizerContainer' | 'BoxSizerDelete' | 'BoxSizerDragBox' | 'BoxSizerEdge' | 'BoxSizerGridBox' | 'BoxSizerInfo' | 'BoxSizerSettings' | 'BoxSizerValidRegion' | 'CenterCenter' | 'DialogButton' | 'EdgeDown' | 'FallbackArt' | 'Features' | 'FullscreenEnterActive' | 'FullscreenEnterDone' | 'FullscreenEnterStart' | 'FullscreenExitActive' | 'FullscreenExitDone' | 'FullscreenExitStart' | 'HeaderBackgroundImage' | 'ImgBlur' | 'ImgBlurBackdrop' | 'ImgContainer' | 'ImgSrc' | 'Left' | 'Loaded' | 'Middle' | 'NoArt' | 'PinBox' | 'Right' | 'SVGTitle' | 'SaveBoxSizer' | 'TextNameSpace' | 'TitleImageContainer' | 'TitleLogo' | 'TitleSection' | 'Top' | 'TopCapsule' | 'TopGradient' | 'TopLeft' | 'TopRight' | 'UpperCenter' | 'UpperLeft' | 'duration-app-launch', string>;
9
- type AppDetailsClasses = Record<'AppDetailsOverviewPanel' | 'BackgroundAnimation' | 'BreakNarrow' | 'BreakShort' | 'BreakTall' | 'BreakUltraWide' | 'BreakWide' | 'Container' | 'GamepadUIBreakNarrow' | 'GamepadUIBreakShort' | 'GamepadUIBreakWide' | 'Glassy' | 'Header' | 'HeaderLoaded' | 'InnerContainer' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'PlayBar' | 'PreventScrolling' | 'RightBreakNarrow' | 'RightBreakUltraNarrow' | 'RightBreakUltraWide' | 'RightBreakWide' | 'ScrollContainer' | 'ShowPlayBar' | 'Throbber' | 'duration-app-launch' | 'fadein' | 'focusAnimation' | 'hoverAnimation', string>;
10
2
  type GamepadUIClasses = Record<'BackgroundAnimation' | 'BasicHome' | 'BasicUiRoot' | 'Content' | 'ContinuousRenderPixel' | 'ContinuousRenderPixelBlink' | 'GamepadDialogOverlay' | 'GamepadUIPopupWindowBody' | 'HeaderHeightVisible' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'MainNavMenuAnchor' | 'MainNavMenuMainSplit' | 'OpaqueBackground' | 'PopupBody' | 'QuickAccessMenuAnchor' | 'StandaloneKeyboard' | 'SteamUIPopupHTML' | 'SteamUIPopupWindow' | 'SteamUIPopupWindowBody' | 'TransparentBackground' | 'TrueBlackBackground' | 'VR' | 'duration-app-launch' | 'focusAnimation' | 'hoverAnimation' | 'vrgamepadui-floating-bar-popup-panel-height' | 'vrgamepadui-floating-bar-popup-panel-width' | 'vrgamepadui-floating-keyboard-height' | 'vrgamepadui-floating-keyboard-width' | 'vrgamepadui-floating-side-panel-height' | 'vrgamepadui-floating-side-panel-width', string>;
11
3
  type GamepadTabbedPageClasses = Record<'Active' | 'AnimateDownwardExpansion' | 'Arrows' | 'BackgroundAnimation' | 'BleedGlyphs' | 'CanBeHeaderBackground' | 'ContentTransition' | 'Enter' | 'EnterActive' | 'Exit' | 'ExitActive' | 'ExpandFadeDownwards' | 'FixCenterAlignScroll' | 'Floating' | 'GamepadTabbedPage' | 'Glyphs' | 'HasAddon' | 'IsUnderHeader' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'Left' | 'LeftAddon' | 'OverlayPinnedView' | 'Right' | 'RightAddon' | 'ScrolledDown' | 'Selected' | 'Show' | 'SortAndFilterButton' | 'SortAndFilterContainer' | 'Tab' | 'TabBadge' | 'TabContents' | 'TabContentsScroll' | 'TabCount' | 'TabCountBadge' | 'TabHeaderRowWrapper' | 'TabIcon' | 'TabRow' | 'TabRowSpacer' | 'TabRowTabs' | 'TabTitle' | 'TabsRowScroll' | 'contentPadding' | 'duration-app-launch' | 'headerHeight', string>;
12
4
  type GamepadContextMenuClasses = Record<'Arrow' | 'BackgroundAnimation' | 'BasicContextMenuContainer' | 'BasicContextMenuHeader' | 'BasicContextMenuHeaderShrinkableSpacing' | 'BasicContextMenuModal' | 'Capitalized' | 'ContextMenuSeparator' | 'Destructive' | 'Emphasis' | 'Focused' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'Label' | 'MenuSectionHeader' | 'Positive' | 'Selected' | 'SubMenu' | 'UpperCase' | 'active' | 'contextMenu' | 'contextMenuContents' | 'contextMenuFade' | 'contextMenuItem' | 'duration-app-launch' | 'focusAnimation' | 'hasSubMenu' | 'hoverAnimation' | 'slideInAnimation', string>;
13
- type AchievementListClasses = Record<'AchievementContent' | 'AchievementDescription' | 'AchievementGlobalPercentage' | 'AchievementList' | 'AchievementListItemBase' | 'AchievementTitle' | 'AlignEnd' | 'Avatar' | 'AvatarContainer' | 'ComparisonAchieverColumn' | 'ComparisonAchieverInfo' | 'Container' | 'Content' | 'Description' | 'Footer' | 'FriendAchievementFooter' | 'GlobalAchievementListItem' | 'GlobalAchievementsListHeader' | 'GlobalPercentage' | 'HeaderText' | 'Hidden' | 'HiddenAchievementContent' | 'ImageContainer' | 'InBody' | 'Info' | 'ListTitle' | 'Percent' | 'ProgressBar' | 'ProgressContainer' | 'ProgressCount' | 'ProgressFill' | 'ProgressLabel' | 'Right' | 'SearchField' | 'Secondary' | 'SpoilerWarning' | 'Title' | 'Unachieved' | 'UnlockContainer' | 'UnlockDate' | 'UserUnlockDateTime' | 'VerticalContent' | 'duration-app-launch' | 'nAchievementGap' | 'nAchievementHeight' | 'nAchievementsListTitleHeight' | 'nGlobalAchievementHeight', string>;
14
- type AchievementPageClasses = Record<'AchievementContent' | 'AchievementDescription' | 'AchievementGlobalPercentage' | 'AchievementList' | 'AchievementListItemBase' | 'AchievementTabs' | 'AchievementTitle' | 'AlignEnd' | 'Avatar' | 'AvatarContainer' | 'Background' | 'Blur' | 'CompareButtonContainer' | 'ComparisonAchieverColumn' | 'ComparisonAchieverInfo' | 'Container' | 'Content' | 'Description' | 'DragHandle' | 'ErrorButtons' | 'ErrorContainer' | 'ErrorTitle' | 'Footer' | 'FriendAchievementFooter' | 'FriendAchievementsListHeader' | 'GlobalAchievementListItem' | 'GlobalAchievementsListHeader' | 'GlobalButton' | 'GlobalPercentage' | 'HeaderContainer' | 'HeaderImage' | 'HeaderText' | 'Hidden' | 'HiddenAchievementContent' | 'ImageContainer' | 'InBody' | 'Info' | 'Label' | 'List' | 'ListTitle' | 'LoadingContainer' | 'MyAchievementsHeader' | 'Nav' | 'NotOwnedMessage' | 'Page' | 'Percent' | 'PerfectGame' | 'PinnedView' | 'PinnedViewTabs' | 'ProgressBar' | 'ProgressContainer' | 'ProgressCount' | 'ProgressFill' | 'ProgressLabel' | 'Right' | 'SearchField' | 'Secondary' | 'SortableAchievementsList' | 'SortableUserAchievement' | 'SortableUserAchievementInner' | 'SpoilerWarning' | 'Text' | 'Throbber' | 'Title' | 'ToggleContainer' | 'Unachieved' | 'UnlockContainer' | 'UnlockDate' | 'UserContext' | 'UserUnlockDateTime' | 'VerticalContent' | 'duration-app-launch' | 'headerPadding' | 'nAchievementGap' | 'nAchievementHeight' | 'nAchievementsListTitleHeight' | 'nGlobalAchievementHeight', string>;
15
- type MainMenuAppRunningClasses = Record<'Active' | 'ActiveContent' | 'ActiveDot' | 'AppColumn' | 'AppColumnContent' | 'AppRunningControls' | 'BackgroundAnimation' | 'Collapsible' | 'Container' | 'ControllerColumnFocused' | 'CurrentGameBackground' | 'CurrentGameLogo' | 'Disabled' | 'FocusedColumn' | 'HideMask' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'KeyBoardVisible' | 'NavColumnFocused' | 'NavigationBox' | 'NavigationColumn' | 'NavigationMenuItem' | 'NavigationMenuItemSeparator' | 'OverlayAchievements' | 'OverlayGuides' | 'OverlayInplaceBrowser' | 'OverlayNotes' | 'ScrollMask' | 'SelectableAppWindow' | 'SwitchAppsTitle' | 'Visible' | 'duration-app-launch' | 'focusAnimation' | 'hoverAnimation', string>;
16
- type BasicAppDetailsSectionStylerClasses = Record<'ActionButtonAndStatusPanel' | 'ActionRow' | 'AppActionButton' | 'AppButtons' | 'AppDetailSectionList' | 'AppDetailsContainer' | 'AppDetailsContent' | 'AppDetailsRoot' | 'CollectionsHeader' | 'DeckVerifiedFeedbackButton' | 'DeckVerifiedFeedbackConfirmation' | 'DeckVerifiedFeedbackConfirmationContainer' | 'DeckVerifiedFeedbackContainer' | 'DeckVerifiedFeedbackQuestion' | 'GameInfoCollections' | 'GameInfoContainer' | 'GameInfoQuickLinks' | 'Header' | 'InvertFocusedIcon' | 'PlaySection' | 'duration-app-launch' | 'headerPadding', string>;
17
- type SteamSpinnerClasses = Record<'BackgroundAnimation' | 'Black' | 'Container' | 'ContainerBackground' | 'ExtraSpace' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'LoadingStatus' | 'Medium' | 'Small' | 'Spacer' | 'SpinnerLoaderContainer' | 'focusAnimation' | 'hoverAnimation', string>;
18
- type FooterClasses = Record<'BackgroundAnimation' | 'BasicFooter' | 'FooterLegend' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'Opaque' | 'PillShapedIcon' | 'QuickAccessFooter' | 'Relative' | 'Spacer' | 'WithKeyboard' | 'duration-app-launch' | 'focusAnimation' | 'hoverAnimation', string>;
19
- type AppActionButtonClasses = Record<'BackgroundAnimation' | 'BreakNarrow' | 'BreakShort' | 'BreakTall' | 'BreakUltraWide' | 'BreakWide' | 'ButtonChild' | 'ButtonText' | 'ButtonThrobberPadding' | 'Disabled' | 'ForceShutdownButton' | 'GamepadUIBreakNarrow' | 'GamepadUIBreakShort' | 'GamepadUIBreakWide' | 'Green' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'LongButton' | 'NoAction' | 'PlayButton' | 'PlayButtonContainer' | 'RightBreakNarrow' | 'RightBreakUltraNarrow' | 'RightBreakUltraWide' | 'RightBreakWide' | 'ShowStreaming' | 'ShowingStreaming' | 'ShutdownAppButton' | 'StreamingCallout' | 'StreamingCalloutMessage' | 'StreamingCalloutMessageContainer' | 'StreamingContextMenuItem' | 'StreamingSelector' | 'Throbber' | 'ThrobberContainer' | 'WaitingForForceShutdown' | 'WaitingForShutdownSpinner' | 'duration-app-launch' | 'focusAnimation' | 'hoverAnimation' | 'rotate', string>;
20
- type LibraryAssetImageClasses = Record<'Container' | 'GreyBackground' | 'Hidden' | 'Image' | 'LandscapeImage' | 'LongTitles' | 'NoTransitions' | 'PortraitImage' | 'Short' | 'Title' | 'Visibility' | 'Visible' | 'duration-app-launch', string>;
21
- type GamepadLibraryClasses = Record<'AppGridFilterHeader' | 'AppGridFilterHeaderAsButton' | 'AppGridFilterText' | 'BackgroundAnimation' | 'BreakNarrow' | 'BreakShort' | 'BreakTall' | 'BreakUltraWide' | 'BreakWide' | 'CollectionContents' | 'CollectionHeader' | 'ComingSoon' | 'GamepadLibrary' | 'GamepadUIBreakNarrow' | 'GamepadUIBreakShort' | 'GamepadUIBreakWide' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'RightBreakNarrow' | 'RightBreakUltraNarrow' | 'RightBreakUltraWide' | 'RightBreakWide' | 'duration-app-launch' | 'focusAnimation' | 'hoverAnimation', string>;
22
- type FocusRingClasses = Record<'DebugFocusRing' | 'FocusRing' | 'FocusRingOnHiddenItem' | 'FocusRingRoot' | 'blinker' | 'fadeOutline' | 'flash' | 'growOutline', string>;
23
- type SearchBarClasses = Record<'BackgroundAnimation' | 'ForceExpanded' | 'IconMovesOnHover' | 'ItemFocusAnim-darkGrey' | 'ItemFocusAnim-darkerGrey' | 'ItemFocusAnim-darkerGrey-nocolor' | 'ItemFocusAnim-green' | 'ItemFocusAnim-grey' | 'ItemFocusAnim-translucent-white-10' | 'ItemFocusAnim-translucent-white-20' | 'ItemFocusAnimBorder-darkGrey' | 'SearchAndTitleContainer' | 'SearchBox' | 'SearchFieldBackground' | 'SearchIconLeft' | 'SearchIconRight' | 'ShowingSearch' | 'ShowingTitle' | 'VR' | 'Visible' | 'WhiteBackground' | 'duration-app-launch', string>;
24
- type MainBrowserClasses = Record<'Browser' | 'BrowserContainer' | 'BrowserNavRoot' | 'Disabled' | 'ExternalBrowserContainer' | 'InputSupportLevel' | 'MainBrowser' | 'MainBrowserContainer' | 'MicroTxnContainer' | 'NavigationButton' | 'RequireTouchscreenLabel' | 'StatusIcon' | 'Toggled' | 'URL' | 'URLBar' | 'URLInput' | 'Visible' | 'duration-app-launch' | 'showSupportLevel', string>;
25
- type VRDashboardClasses = Record<'duration-app-launch' | 'vrgamepadui-floating-side-panel-width' | 'vrgamepadui-floating-side-panel-height' | 'vrgamepadui-floating-bar-popup-panel-width' | 'vrgamepadui-floating-bar-popup-panel-height' | 'vrgamepadui-floating-keyboard-width' | 'vrgamepadui-floating-keyboard-height' | 'vrgamepadui-dashboard-bar-side-button-click-animation-duration' | 'PopupBody' | 'DashboardBar' | 'DynamicWidth' | 'BarSurface' | 'Bookend' | 'BarSurfaceSection' | 'SmallButtonSection' | 'Tabs' | 'Right' | 'Tray' | 'SmallBarButtons' | 'EmptySpace' | 'Item' | 'Clickable' | 'Highlight' | 'Inner' | 'BatteryIconHeaderItem' | 'Active' | 'AddWindowButton' | 'AvatarButton' | 'MenuVisible' | 'FocusRingHint' | 'Avatar' | 'ClickAnimation' | 'ClickPop' | 'BarTabs' | 'FadeLeft' | 'FadeRight' | 'BarTab' | 'Selected' | 'OldColors' | 'Badge' | 'Icon' | 'OverlayIcon' | 'AppIcon' | 'SteamSVG' | 'DashboardBarPopupContents' | 'FullHeight' | 'QuickAccessPopupContents' | 'VolumePopup' | 'ExitVRIcon' | 'ExitVRText' | 'QuickAccessPopupTitle' | 'QuickAccessPopupPanel' | 'BottomFade' | 'ClickableSliderIcon' | 'DashboardBarPopupList' | 'DashboardBarPopupListHeader' | 'DashboardBarPopupListScrollRegion' | 'FadeTop' | 'FadeBottom' | 'DashboardBarPopupSectionStack' | 'DashboardBarPopupListScrollPanel' | 'DashboardBarPopupListItem' | 'BarPopupStack' | 'FullWidth' | 'QuickAccessButton' | 'HasAvatar' | 'Time' | 'Icons' | 'StatusItem' | 'Friends' | 'flash' | 'growOutline' | 'fadeOutline' | 'blinker', string>;
26
- export declare const quickAccessMenuClasses: QuickAccessMenuClasses;
27
- export declare const scrollPanelClasses: ScrollPanelClasses;
28
- export declare const gamepadDialogClasses: GamepadDialogClasses;
29
- export declare const quickAccessControlsClasses: QuickAccessControlsClasses;
30
- export declare const updaterFieldClasses: UpdaterFieldClasses;
31
- export declare const playSectionClasses: PlaySectionClasses;
32
- export declare const gamepadSliderClasses: GamepadSliderClasses;
33
5
  export declare const appDetailsHeaderClasses: AppDetailsHeaderClasses;
34
- export declare const appDetailsClasses: AppDetailsClasses;
35
6
  export declare const gamepadUIClasses: GamepadUIClasses;
36
7
  export declare const gamepadTabbedPageClasses: GamepadTabbedPageClasses;
37
8
  export declare const gamepadContextMenuClasses: GamepadContextMenuClasses;
38
- export declare const achievementListClasses: AchievementListClasses;
39
- export declare const achievementPageClasses: AchievementPageClasses;
40
- export declare const mainMenuAppRunningClasses: MainMenuAppRunningClasses;
41
- export declare const basicAppDetailsSectionStylerClasses: BasicAppDetailsSectionStylerClasses;
42
- export declare const steamSpinnerClasses: SteamSpinnerClasses;
43
- export declare const footerClasses: FooterClasses;
44
- export declare const appActionButtonClasses: AppActionButtonClasses;
45
- export declare const libraryAssetImageClasses: LibraryAssetImageClasses;
46
- export declare const gamepadLibraryClasses: GamepadLibraryClasses;
47
- export declare const focusRingClasses: FocusRingClasses;
48
- export declare const searchBarClasses: SearchBarClasses;
49
- export declare const mainBrowserClasses: MainBrowserClasses;
50
- export declare const vrDashboardClasses: VRDashboardClasses;
51
- export declare const staticClasses: QuickAccessMenuClasses;
52
- export declare const scrollClasses: ScrollPanelClasses;
53
- export declare const achievementClasses: AchievementListClasses;
54
- export {};
9
+ export * from "./classData";
@@ -1,29 +1,6 @@
1
1
  import { findClassModule } from '../class-mapper';
2
- export const quickAccessMenuClasses = findClassModule((m) => m.Title && m.QuickAccessMenu);
3
- export const scrollPanelClasses = findClassModule((m) => m.ScrollPanel);
4
- export const gamepadDialogClasses = findClassModule((m) => m.GamepadDialogContent && !m.BindingButtons);
5
- export const quickAccessControlsClasses = findClassModule((m) => m.BatteryPercentageLabel && m.PanelSection && !m['vr-dashboard-bar-height'] && !m.QuickAccessMenu && !m.QuickAccess && !m.PerfProfileInfo);
6
- export const updaterFieldClasses = findClassModule((m) => m.OOBEUpdateStatusContainer);
7
- export const playSectionClasses = findClassModule((m) => m.PlayBarDetailLabel);
8
- export const gamepadSliderClasses = findClassModule((m) => m.SliderControlPanelGroup);
9
2
  export const appDetailsHeaderClasses = findClassModule((m) => m.TopCapsule);
10
- export const appDetailsClasses = findClassModule((m) => m.HeaderLoaded);
11
3
  export const gamepadUIClasses = findClassModule((m) => m.BasicUiRoot);
12
4
  export const gamepadTabbedPageClasses = findClassModule((m) => m.GamepadTabbedPage);
13
5
  export const gamepadContextMenuClasses = findClassModule((m) => m.BasicContextMenuModal);
14
- export const achievementListClasses = findClassModule((m) => m.AchievementListItemBase && !m.Page);
15
- export const achievementPageClasses = findClassModule((m) => m.AchievementListItemBase && m.Page);
16
- export const mainMenuAppRunningClasses = findClassModule((m) => m.AppRunningControls && m.OverlayAchievements);
17
- export const basicAppDetailsSectionStylerClasses = findClassModule((m) => m.AppDetailsRoot);
18
- export const steamSpinnerClasses = findClassModule(m => m.SpinnerLoaderContainer);
19
- export const footerClasses = findClassModule(m => m.QuickAccessFooter);
20
- export const appActionButtonClasses = findClassModule(m => m.PlayButtonContainer);
21
- export const libraryAssetImageClasses = findClassModule(m => m.LongTitles && m.GreyBackground);
22
- export const gamepadLibraryClasses = findClassModule(m => m.GamepadLibrary);
23
- export const focusRingClasses = findClassModule(m => m.FocusRingRoot);
24
- export const searchBarClasses = findClassModule(m => m.SearchAndTitleContainer);
25
- export const mainBrowserClasses = findClassModule(m => m.MainBrowserContainer);
26
- export const vrDashboardClasses = findClassModule(m => m.DashboardBarPopupContents && m.DashboardBar);
27
- export const staticClasses = quickAccessMenuClasses;
28
- export const scrollClasses = scrollPanelClasses;
29
- export const achievementClasses = achievementListClasses;
6
+ export * from "./classData";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decky/ui",
3
- "version": "4.16.4",
3
+ "version": "5.0.0",
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",
@@ -1,11 +1,11 @@
1
- import { Module, ModuleID, createModuleMapping } from './webpack';
1
+ import { Module, ModuleID, createVarMapping } from './module-system';
2
2
 
3
3
  export interface ClassModule {
4
4
  [name: string]: string;
5
5
  }
6
6
 
7
- export const classModuleMap: Map<ModuleID, ClassModule> = createModuleMapping((m: Module) => {
8
- if (typeof m == 'object' && !m.__esModule) {
7
+ export const classModuleMap: Map<ModuleID, ClassModule> = createVarMapping((m: Module) => {
8
+ if (m && m != null && typeof m == 'object' && !(m instanceof Array) && !m?.__esModule) {
9
9
  const keys = Object.keys(m);
10
10
  // special case some libraries
11
11
  if (keys.length == 1 && m.version) return false;
@@ -0,0 +1,15 @@
1
+ import { findModule, findModuleByExport, findModuleExport, Module } from "./module-system";
2
+
3
+ export const CommonUIModule = findModule((m: Module) => {
4
+ if (typeof m !== 'object') return false;
5
+ for (let prop in m) {
6
+ if (m[prop]?.contextType?._currentValue && Object.keys(m).length > 60) return true;
7
+ }
8
+ return false;
9
+ });
10
+
11
+ export const IconsModule = findModuleExport(e => e?.ABXYButton && e?.VR) || findModuleByExport(
12
+ (e) => e?.toString && /Spinner\),children:\[\(0,\w+\.jsx\)\("path",\{d:"M18 /.test(e.toString?.()) || /Spinner\)}\)?,.\.createElement\(\"path\",{d:\"M18 /.test(e.toString?.()),
13
+ );
14
+
15
+ export const ReactRouter = findModuleByExport((e) => e.computeRootMatch);
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
2
 
3
- import { CommonUIModule } from '../webpack';
3
+ import { CommonUIModule } from '../common-modules';
4
4
  import { ItemProps } from './Item';
5
5
  import { createPropListRegex } from '../utils';
6
6
 
@@ -11,6 +11,6 @@ export interface ButtonItemProps extends ItemProps {
11
11
  const buttonItemRegex = createPropListRegex(["highlightOnFocus", "childrenContainerWidth"], false);
12
12
  export const ButtonItem = Object.values(CommonUIModule).find(
13
13
  (mod: any) =>
14
- (mod?.render?.toString && buttonItemRegex.test(mod.render.toString())) ||
15
- mod?.render?.toString?.().includes('childrenContainerWidth:"min"'),
14
+ mod?.render?.toString && buttonItemRegex.test(mod.render.toString()) &&
15
+ mod?.render?.toString?.().includes('childrenLayout'),
16
16
  ) as FC<ButtonItemProps>;
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes, ReactNode, RefAttributes, FC } from 'react';
2
2
 
3
- import { Export, findModuleExport } from '../webpack';
3
+ import { findVar, Var } from '../module-system';
4
4
 
5
5
  export interface CarouselProps extends HTMLAttributes<HTMLDivElement> {
6
6
  autoFocus?: boolean;
@@ -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 FC<
23
+ export const Carousel = findVar((e: Var) => e.render?.toString().includes('setFocusedColumn:')) as FC<
24
24
  CarouselProps & RefAttributes<HTMLDivElement>
25
25
  >;
@@ -1,6 +1,6 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
 
3
- import { Export, findModuleExport } from '../webpack';
3
+ import { Export, findModuleExport } from '../module-system';
4
4
 
5
5
  export interface ControlsListProps {
6
6
  alignItems?: 'left' | 'right' | 'center';
@@ -10,5 +10,5 @@ export interface ControlsListProps {
10
10
 
11
11
  export const ControlsList: FC<ControlsListProps> = findModuleExport(
12
12
  (e: Export) =>
13
- e?.toString && e.toString?.().includes('().ControlsListChild') && e.toString?.().includes('().ControlsListOuterPanel'),
13
+ e?.toString && e.toString?.().includes('itemMaxSize??`gamepad`') && e.toString?.().includes('.PREFERRED_CHILD')
14
14
  );
@@ -1,6 +1,7 @@
1
1
  import { CSSProperties, FC, ReactNode, RefAttributes } from 'react';
2
2
 
3
- import { CommonUIModule, Module } from '../webpack';
3
+ import { Module } from "../module-system";
4
+ import { CommonUIModule } from '../common-modules';
4
5
  import { FooterLegendProps } from './FooterLegend';
5
6
 
6
7
  export interface DialogCommonProps extends RefAttributes<HTMLDivElement> {
@@ -53,15 +54,12 @@ export interface DialogButtonProps extends DialogCommonProps, FooterLegendProps
53
54
 
54
55
  const CommonDialogDivs = Object.values(CommonUIModule).filter(
55
56
  (m: any) => typeof m === 'object' &&
56
- // New
57
57
  (
58
- m?.render?.toString().includes('jsx)("div",{...') ||
59
- m?.render?.toString().includes('jsx)("div",Object.assign({},')
60
- ) ||
61
- // Old
62
- (
63
- m?.render?.toString().includes('createElement("div",{...') ||
64
- m?.render?.toString().includes('createElement("div",Object.assign({},')
58
+ m?.render?.toString().includes('`div`,{') &&
59
+ m?.render?.toString().includes('role:') &&
60
+ m?.render?.toString().includes('ref:') &&
61
+ !m?.render?.toString().includes('PlayNavSound') &&
62
+ !m?.render?.toString().includes('useContext')
65
63
  )
66
64
  );
67
65
  const MappedDialogDivs = new Map(
@@ -77,10 +75,10 @@ const MappedDialogDivs = new Map(
77
75
  }),
78
76
  );
79
77
 
80
- // Old | New
81
- export const DialogHeader = (MappedDialogDivs.get('DialogHeader') || Object.values(CommonUIModule).find((component: Module) => {
78
+ // New
79
+ export const DialogHeader = (Object.values(CommonUIModule).find((component: Module) => {
82
80
  const str = component?.render?.toString?.();
83
- return str?.includes("role:\"heading\"") && str.includes(")(\"DialogHeader\",");
81
+ return (str?.includes("role:`heading`")) && (str.includes("(`DialogHeader`,"));
84
82
  })) as FC<DialogCommonProps>;
85
83
 
86
84
  export const DialogSubHeader = MappedDialogDivs.get('DialogSubHeader') as FC<DialogCommonProps>;
@@ -92,11 +90,11 @@ export const DialogControlsSection = MappedDialogDivs.get('DialogControlsSection
92
90
  export const DialogControlsSectionHeader = MappedDialogDivs.get('DialogControlsSectionHeader') as FC<DialogCommonProps>;
93
91
 
94
92
  export const DialogButtonPrimary = Object.values(CommonUIModule).find(
95
- (mod: any) => mod?.render?.toString?.()?.includes('"DialogButton","_DialogLayout","Primary"'),
93
+ (mod: any) => mod?.render?.toString?.()?.includes('`DialogButton`,`_DialogLayout`,`Primary`'),
96
94
  ) as FC<DialogButtonProps>;
97
95
 
98
96
  export const DialogButtonSecondary = Object.values(CommonUIModule).find(
99
- (mod: any) => mod?.render?.toString?.()?.includes('"DialogButton","_DialogLayout","Secondary"')
97
+ (mod: any) => mod?.render?.toString?.()?.includes('`DialogButton`,`_DialogLayout`,`Secondary`')
100
98
  ) as FC<DialogButtonProps>;
101
99
 
102
100
  // This is the "main" button. The Primary can act as a submit button,
@@ -1,6 +1,6 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
 
3
- import { findModuleExport } from '../webpack';
3
+ import { findModuleExport } from '../module-system';
4
4
  import { DialogCommonProps } from './Dialog';
5
5
  import { FooterLegendProps } from './FooterLegend';
6
6
 
@@ -26,8 +26,5 @@ export const DialogCheckbox = findModuleExport(e =>
26
26
  "SetChecked" in e?.prototype &&
27
27
  "Toggle" in e?.prototype &&
28
28
  // beta || stable as of oct 2 2024
29
- (e?.prototype?.render?.toString?.().includes('="DialogCheckbox"') || (
30
- e.contextType &&
31
- e.prototype?.render?.toString?.().includes('fallback:')
32
- ))
29
+ e?.prototype?.render?.toString?.().includes('=`DialogCheckbox`')
33
30
  ) as FC<DialogCheckboxProps>;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode, FC } from 'react';
2
2
 
3
- import { CommonUIModule } from '../webpack';
3
+ import { CommonUIModule } from '../common-modules';
4
4
  import { ItemProps } from './Item';
5
5
  import { createPropListRegex } from '../utils';
6
6
  import type { ContextMenuCreationOptions } from './Menu';
@@ -1,5 +1,5 @@
1
1
  import { FC, PropsWithChildren } from "react";
2
- import { findModuleExport } from "../webpack";
2
+ import { findModuleExport } from "../module-system";
3
3
 
4
4
  export const ErrorBoundary = findModuleExport(
5
5
  (e) => e?.prototype?.Reset && e?.prototype?.componentDidCatch && e.prototype?.render?.toString().includes("lastErrorKey"),
@@ -1,6 +1,6 @@
1
1
  import { FC, ReactNode, RefAttributes } from 'react';
2
2
 
3
- import { Export, findModuleExport } from '../webpack';
3
+ import { Export, findModuleExport } from '../module-system';
4
4
  import { FooterLegendProps } from './FooterLegend';
5
5
 
6
6
  export interface FieldProps extends FooterLegendProps {
@@ -25,6 +25,6 @@ export interface FieldProps extends FooterLegendProps {
25
25
  }
26
26
 
27
27
  // new || old
28
- export const Field = findModuleExport((e: Export) => (e?.toString?.()?.includes('().Field') && e?.toString?.()?.includes('"shift-children-below"')) || e?.render?.toString()?.includes('"shift-children-below"')) as FC<
28
+ export const Field = findModuleExport((e: Export) => e?.toString?.()?.includes('style:{"--indent-level":') && e?.toString?.()?.includes('shift-children-below')) as FC<
29
29
  FieldProps & RefAttributes<HTMLDivElement>
30
30
  >;
@@ -1,6 +1,6 @@
1
1
  import { ElementType, FC, ReactNode } from 'react';
2
2
 
3
- import { Export, findModuleExport } from '../webpack';
3
+ import { Export, findModuleExport } from '../module-system';
4
4
 
5
5
  export interface FocusRingProps {
6
6
  className?: string;
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes, ReactNode, RefAttributes, FC } from 'react';
2
2
 
3
- import { Export, findModuleExport } from '../webpack';
3
+ import { Export, findModuleExport } from '../module-system';
4
4
  import { FooterLegendProps } from './FooterLegend';
5
5
  import { createPropListRegex } from '../utils';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { CSSProperties, FC } from 'react';
2
2
 
3
- import { Export, findModuleExport } from '../webpack';
3
+ import { Var, findVar } from '../module-system';
4
4
 
5
5
  export interface MarqueeProps {
6
6
  play?: boolean;
@@ -15,6 +15,6 @@ export interface MarqueeProps {
15
15
  children: React.ReactNode;
16
16
  }
17
17
 
18
- export const Marquee: FC<MarqueeProps> = findModuleExport(
19
- (e: Export) => e?.toString && e.toString?.().includes('.Marquee') && e.toString?.().includes('--fade-length'),
18
+ export const Marquee: FC<MarqueeProps> = findVar(
19
+ (e: Var) => typeof e == "function" && e.toString?.().includes('--fade-length-left') && e.toString?.().includes('--fade-length-right'),
20
20
  );
@@ -1,6 +1,7 @@
1
1
  import type { FC, ReactNode } from 'react';
2
+
2
3
  import type { PopupCreationOptions } from '../globals/stores/popupmanager';
3
- import { type Export, findModuleByExport, findModuleDetailsByExport, findModuleExport } from '../webpack';
4
+ import { Export, findModuleByExport, findModuleDetailsByExport, findModuleExport } from '../module-system';
4
5
  import type { FooterLegendProps } from './FooterLegend';
5
6
 
6
7
  // Separate interface, since one of webpack module exports uses this exact object,
@@ -124,11 +125,15 @@ export interface MenuProps extends FooterLegendProps {
124
125
  children?: ReactNode;
125
126
  }
126
127
 
127
- const MenuModule = findModuleDetailsByExport((e: Export) => e?.render?.toString()?.includes('bPlayAudio:') || (e?.prototype?.OnOKButton && e?.prototype?.OnMouseEnter));
128
+ const MenuModule = findModuleDetailsByExport(
129
+ (e: Export) =>
130
+ e?.render?.toString()?.includes('bPlayAudio:') || (e?.prototype?.OnOKButton && e?.prototype?.OnMouseEnter),
131
+ );
128
132
 
129
133
  export const Menu: FC<MenuProps> =
130
- findModuleExport((e: Export) => e?.prototype?.HideIfSubmenu && e?.prototype?.HideMenu) || // Legacy Menu
131
- (Object.values(MenuModule?.[0] ?? {}).find((e) => e?.toString?.()?.includes?.(`useId`) && e?.toString?.()?.includes?.(`labelId`)) as FC<MenuProps>); // New Menu 6/15/2025
134
+ (Object.values(MenuModule?.[0] ?? {}).find(
135
+ (e) => e?.toString?.()?.includes?.(`useId`) && e?.toString?.()?.includes?.(`labelId`),
136
+ ) as FC<MenuProps>); // New Menu 6/15/2025
132
137
 
133
138
  export interface MenuGroupProps {
134
139
  label: string;
@@ -137,8 +142,17 @@ export interface MenuGroupProps {
137
142
  }
138
143
 
139
144
  // New || Old 9/14/2026
140
- const MenuGroupModule = findModuleByExport(e => e?.prototype?.Focus && e?.prototype?.OnOKButton && (e?.prototype?.render?.toString().includes?.(`this.props.tone=="emphasis"`) || e?.prototype?.render?.toString().includes?.(`"emphasis"==this.props.tone`)));
141
- export const MenuGroup: FC<MenuGroupProps> = MenuGroupModule && Object.values(MenuGroupModule).find((e: Export) => typeof e == "function" && e?.toString?.()?.includes("bInGamepadUI:"));
145
+ const MenuGroupModule = findModuleByExport(
146
+ (e) =>
147
+ e?.prototype?.Focus &&
148
+ e?.prototype?.OnOKButton &&
149
+ (e?.prototype?.render?.toString().includes?.("this.props.tone==`emphasis`")),
150
+ );
151
+ export const MenuGroup: FC<MenuGroupProps> =
152
+ MenuGroupModule &&
153
+ Object.values(MenuGroupModule).find(
154
+ (e: Export) => typeof e == 'function' && e?.toString?.()?.includes('bInGamepadUI:'),
155
+ );
142
156
  export interface MenuItemProps extends FooterLegendProps {
143
157
  bInteractableItem?: boolean;
144
158
  onClick?(evt: Event): void;
@@ -1,7 +1,8 @@
1
1
  import type { FC, ReactNode } from 'react';
2
+
2
3
  import type { BrowserContext } from '../globals/shared';
4
+ import { Export, findModule, findModuleDetailsByExport, findModuleExport } from '../module-system';
3
5
  import { findSP } from '../utils';
4
- import { type Export, findModule, findModuleDetailsByExport, findModuleExport } from '../webpack';
5
6
 
6
7
  export interface ShowModalProps {
7
8
  browserContext?: BrowserContext;
@@ -118,14 +119,21 @@ export interface ConfirmModalProps extends ModalRootProps {
118
119
  }
119
120
 
120
121
  export const ConfirmModal = findModuleExport(
121
- (e: Export) => e?.toString?.()?.includes('bUpdateDisabled') && e?.toString?.()?.includes('closeModal') && e?.toString?.()?.includes('onGamepadCancel'),
122
+ (e: Export) =>
123
+ e?.toString?.()?.includes('bUpdateDisabled') &&
124
+ e?.toString?.()?.includes('closeModal') &&
125
+ e?.toString?.()?.includes('onGamepadCancel'),
122
126
  ) as FC<ConfirmModalProps>;
123
127
 
124
- export const ModalRoot =
128
+ export const ModalRoot =
125
129
  // new
126
- findModuleExport((e: Export) => typeof e === 'function' && e.toString?.().includes('Either closeModal or onCancel should be passed to GenericDialog. Classes: ')) ||
130
+ findModuleExport(
131
+ (e: Export) =>
132
+ typeof e === 'function' &&
133
+ e.toString?.().includes('Either closeModal or onCancel should be passed to GenericDialog. Classes: '),
134
+ ) ||
127
135
  // old
128
- Object.values(
136
+ (Object.values(
129
137
  findModule((m: any) => {
130
138
  if (typeof m !== 'object') return false;
131
139
 
@@ -137,14 +145,21 @@ export const ModalRoot =
137
145
 
138
146
  return false;
139
147
  }) || {},
140
- )?.find((x: any) => x?.type?.toString?.()?.includes('((function(){')) as FC<ModalRootProps>;
148
+ )?.find((x: any) => x?.type?.toString?.()?.includes('((function(){')) as FC<ModalRootProps>);
141
149
 
142
150
  interface SimpleModalProps {
143
151
  active?: boolean;
144
152
  children: ReactNode;
145
153
  }
146
154
 
147
- const [ModalModule, _ModalPosition] = findModuleDetailsByExport((e: Export) => e?.toString?.().includes('.ModalPosition'), 5)
155
+ // TODO should refactor this
156
+ const [ModalModule, _ModalPosition] = findModuleDetailsByExport(
157
+ (e: Export) =>
158
+ typeof e == 'function' &&
159
+ e?.toString?.()?.includes('.ShowPortalModal()') &&
160
+ e?.toString?.()?.includes('.OnElementReadyCallbacks.Register('),
161
+ 5,
162
+ );
148
163
 
149
164
  const ModalModuleProps = ModalModule ? Object.values(ModalModule) : [];
150
165
 
@@ -153,4 +168,5 @@ export const SimpleModal = ModalModuleProps.find((prop) => {
153
168
  return string?.includes('.ShowPortalModal()') && string?.includes('.OnElementReadyCallbacks.Register(');
154
169
  }) as FC<SimpleModalProps>;
155
170
 
171
+ // @todo what?
156
172
  export const ModalPosition = _ModalPosition as FC<SimpleModalProps>;
@@ -1,6 +1,8 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
 
3
- import { Export, findModuleDetailsByExport } from '../webpack';
3
+ import { Var, findVar } from '../module-system';
4
+ import { createDivWrapper } from './Wrappers';
5
+ import { createPropListRegex, quickAccessControlsClasses } from '../utils';
4
6
 
5
7
  // TODO where did this go?
6
8
  // export const Panel: FC<{ children?: ReactNode; }> = findModuleExport((e: Export) => {
@@ -14,13 +16,13 @@ export interface PanelSectionProps {
14
16
  children?: ReactNode;
15
17
  }
16
18
 
17
- const [mod, panelSection] = findModuleDetailsByExport((e: Export) => e.toString?.()?.includes('.PanelSection'));
19
+ export const PanelSection = findVar((v: Var) => typeof v == "function" && createPropListRegex(["title", "children"], true).test(v.toString())) as FC<PanelSectionProps>;
18
20
 
19
- export const PanelSection = panelSection as FC<PanelSectionProps>;
20
-
21
- export interface PanelSectionRowProps {
22
- children?: ReactNode;
23
- }
24
- export const PanelSectionRow = Object.values(mod).filter(
25
- (exp: any) => !exp?.toString?.()?.includes('.PanelSection'),
26
- )[0] as FC<PanelSectionRowProps>;
21
+ export type PanelSectionRowProps = Parameters<typeof PanelSectionRow>[0];
22
+ // export const PanelSectionRow = Object.values(mod).filter(
23
+ // (exp: any) => !exp?.toString?.()?.includes('.PanelSection'),
24
+ // )[0] as FC<PanelSectionRowProps>;
25
+ // export const PanelSectionRow = Object.values(mod).filter(
26
+ // (exp: any) => !exp?.toString?.()?.includes('.PanelSection'),
27
+ // )[0] as FC<PanelSectionRowProps>;
28
+ export const PanelSectionRow = createDivWrapper(quickAccessControlsClasses.PanelSectionRow);
@@ -1,10 +1,12 @@
1
1
  import { ReactNode, FC } from 'react';
2
2
 
3
- import { Export, findModuleExport } from '../webpack';
3
+ import { findVar, Var } from '../module-system';
4
4
  import { ItemProps } from './Item';
5
5
  import { createPropListRegex } from '../utils';
6
6
 
7
7
  export interface ProgressBarItemProps extends ItemProps {
8
+ rtEstimatedCompletionTime?: number;
9
+ sOperationText?: ReactNode;
8
10
  indeterminate?: boolean;
9
11
  nTransitionSec?: number;
10
12
  nProgress?: number;
@@ -18,22 +20,17 @@ export interface ProgressBarProps {
18
20
  focusable?: boolean;
19
21
  }
20
22
 
21
- export interface ProgressBarWithInfoProps extends ProgressBarItemProps {
22
- /** Timestamp of the completion time, has to be divided by 1000 */
23
- rtEstimatedCompletionTime?: number;
24
- sOperationText?: ReactNode;
25
- }
23
+ // @deprecated use ProgressBarItem instead, they are the same
24
+ export interface ProgressBarWithInfoProps extends ProgressBarItemProps {}
26
25
 
27
- export const ProgressBar = findModuleExport((e: Export) =>
28
- e?.toString && /\.ProgressBar,(?:\w*==)?"standard"(?:==)?/.test(e.toString?.()),
26
+ export const ProgressBar = findVar((e: Var) =>
27
+ typeof e == "function" && e?.toString()?.includes("#ProgressBar_ValueUnknown"),
29
28
  ) as FC<ProgressBarProps>;
30
29
 
31
- export const ProgressBarWithInfo = findModuleExport((e: Export) =>
32
- // new || old
33
- e?.toString?.()?.includes('.ProgressBarFieldStatus,children') || e?.toString?.()?.includes('.ProgressBarFieldStatus},'),
34
- ) as FC<ProgressBarWithInfoProps>;
35
-
36
30
  const progressBarItemRegex = createPropListRegex(["indeterminate", "nTransitionSec", "nProgress"]);
37
- export const ProgressBarItem = findModuleExport((e: Export) =>
38
- e?.toString && progressBarItemRegex.test(e.toString?.()),
31
+ export const ProgressBarItem = findVar((e: Var) =>
32
+ typeof e == "function" && progressBarItemRegex.test(e.toString?.()),
39
33
  ) as FC<ProgressBarItemProps>;
34
+
35
+ // @deprecated use ProgressBarItem instead, they are the same
36
+ export const ProgressBarWithInfo = ProgressBarItem;