From c53f87b4a9273b377853bfff1d27474ebd6e564a Mon Sep 17 00:00:00 2001 From: Jozen Blue Martinez Date: Thu, 29 Dec 2022 15:36:08 +0800 Subject: [PATCH 1/8] fix(Item): add highlightOnFocus prop --- src/deck-components/Item.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/deck-components/Item.tsx b/src/deck-components/Item.tsx index a101d80..2861edc 100644 --- a/src/deck-components/Item.tsx +++ b/src/deck-components/Item.tsx @@ -8,4 +8,5 @@ export interface ItemProps { bottomSeparator?: 'standard' | 'thick' | 'none'; indentLevel?: number; tooltip?: string; + highlightOnFocus?: boolean; } From 5a074b5bb68c675c484a7b693f67a67488be9bcf Mon Sep 17 00:00:00 2001 From: Travis Lane <63308171+Tormak9970@users.noreply.github.com> Date: Tue, 21 Feb 2023 22:37:26 -0500 Subject: [PATCH 2/8] feat: added reorderable list and updated fieldProps (#57) --- src/custom-components/ReorderableList.tsx | 174 ++++++++++++++++++++++ src/custom-components/index.ts | 1 + 2 files changed, 175 insertions(+) create mode 100644 src/custom-components/ReorderableList.tsx diff --git a/src/custom-components/ReorderableList.tsx b/src/custom-components/ReorderableList.tsx new file mode 100644 index 0000000..06eb023 --- /dev/null +++ b/src/custom-components/ReorderableList.tsx @@ -0,0 +1,174 @@ +import { Fragment, JSXElementConstructor, ReactElement, useEffect, useState } from 'react'; + +import { Field, FieldProps, Focusable, GamepadButton } from '../deck-components'; + +/** + * A ReorderableList entry of type . + * @param label The name of this entry in the list. + * @param data Optional data to connect to this entry. + * @param position The position of this entry in the list. + */ +export type ReorderableEntry = { + label: string; + data?: T; + position: number; +}; + +/** + * Properties for a ReorderableList component of type . + * + * @param animate If the list should animate. @default true + */ +export type ReorderableListProps = { + entries: ReorderableEntry[]; + onSave: (entries: ReorderableEntry[]) => void; + interactables?: JSXElementConstructor<{ entry: ReorderableEntry }>; + fieldProps?: FieldProps; + animate?: boolean; +}; + +/** + * A component for creating reorderable lists. + * + * See an example implementation {@linkplain https://github.com/Tormak9970/Component-Testing-Plugin/blob/main/src/testing-window/ReorderableListTest.tsx here}. + */ +export function ReorderableList(props: ReorderableListProps) { + if (props.animate === undefined) props.animate = true; + const [entryList, setEntryList] = useState[]>( + props.entries.sort((a: ReorderableEntry, b: ReorderableEntry) => a.position - b.position), + ); + const [reorderEnabled, setReorderEnabled] = useState(false); + + useEffect(() => { + setEntryList(props.entries.sort((a: ReorderableEntry, b: ReorderableEntry) => a.position - b.position)); + }, [props.entries]); + + function toggleReorderEnabled(): void { + let newReorderValue = !reorderEnabled; + setReorderEnabled(newReorderValue); + + if (!newReorderValue) { + props.onSave(entryList); + } + } + + return ( + +
+ + {entryList.map((entry: ReorderableEntry) => ( + + {props.interactables ? : null} + + ))} + +
+
+ ); +} + +/** + * Properties for a ReorderableItem component of type + */ +export type ReorderableListEntryProps = { + fieldProps?: FieldProps; + listData: ReorderableEntry[]; + entryData: ReorderableEntry; + reorderEntryFunc: CallableFunction; + reorderEnabled: boolean; + animate: boolean; + children: ReactElement | null; +}; + +function ReorderableItem(props: ReorderableListEntryProps) { + const [isSelected, _setIsSelected] = useState(false); + const [isSelectedLastFrame, setIsSelectedLastFrame] = useState(false); + const listEntries = props.listData; + + function onReorder(e: Event): void { + if (!props.reorderEnabled) return; + + const event = e as CustomEvent; + const currentIdx = listEntries.findIndex((entryData: ReorderableEntry) => entryData === props.entryData); + const currentIdxValue = listEntries[currentIdx]; + if (currentIdx < 0) return; + + let targetPosition: number = -1; + if (event.detail.button == GamepadButton.DIR_DOWN) { + targetPosition = currentIdxValue.position + 1; + } else if (event.detail.button == GamepadButton.DIR_UP) { + targetPosition = currentIdxValue.position - 1; + } + + if (targetPosition >= listEntries.length || targetPosition < 0) return; + + let otherToUpdate = listEntries.find((entryData: ReorderableEntry) => entryData.position === targetPosition); + if (!otherToUpdate) return; + + let currentPosition = currentIdxValue.position; + + currentIdxValue.position = otherToUpdate.position; + otherToUpdate.position = currentPosition; + + props.reorderEntryFunc( + [...listEntries].sort((a: ReorderableEntry, b: ReorderableEntry) => a.position - b.position), + ); + } + + async function setIsSelected(val: boolean) { + _setIsSelected(val); + // Wait 3 frames, then set. I have no idea why, but if you dont wait long enough it doesn't work. + for (let i = 0; i < 3; i++) await new Promise((res) => requestAnimationFrame(res)); + setIsSelectedLastFrame(val); + } + + return ( +
+ setIsSelected(false)} + onGamepadFocus={() => setIsSelected(true)} + > + {props.children} + +
+ ); +} diff --git a/src/custom-components/index.ts b/src/custom-components/index.ts index 7035898..94d0a7b 100644 --- a/src/custom-components/index.ts +++ b/src/custom-components/index.ts @@ -1,2 +1,3 @@ export * from './SuspensefulImage'; export * from './ColorPickerModal'; +export * from './ReorderableList'; From 18ce1ad790be84214bfd0912a3d81ca56265de92 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 22 Feb 2023 03:38:02 +0000 Subject: [PATCH 3/8] chore(release): 3.19.0 [CI SKIP] --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f4fcfb..171170e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [3.19.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.18.11...v3.19.0) (2023-02-22) + + +### Features + +* added reorderable list and updated fieldProps ([#57](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/57)) ([5a074b5](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/5a074b5bb68c675c484a7b693f67a67488be9bcf)) + ## [3.18.11](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.18.10...v3.18.11) (2023-02-18) diff --git a/package.json b/package.json index 613868c..6784b98 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "decky-frontend-lib", - "version": "3.18.11", + "version": "3.19.0", "description": "A library for building decky plugins", "main": "dist/index.js", "types": "dist/index.d.ts", From 0b6dc24c0da2d7644e185425e975787657f8bba1 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Wed, 22 Feb 2023 21:56:46 -0500 Subject: [PATCH 4/8] fix(*): refactoring to fix for feb 22 2023 beta --- src/custom-hooks/useQuickAccessVisible.tsx | 11 ++- src/deck-components/ButtonItem.tsx | 13 +-- src/deck-components/Panel.tsx | 12 +-- src/deck-components/Router.tsx | 33 ++++---- src/deck-components/index.ts | 95 +++++++++++----------- src/utils/index.ts | 19 ++++- 6 files changed, 96 insertions(+), 87 deletions(-) diff --git a/src/custom-hooks/useQuickAccessVisible.tsx b/src/custom-hooks/useQuickAccessVisible.tsx index 296e26b..e6569dc 100644 --- a/src/custom-hooks/useQuickAccessVisible.tsx +++ b/src/custom-hooks/useQuickAccessVisible.tsx @@ -1,14 +1,13 @@ import { useEffect, useState } from 'react'; -declare global { - var FocusNavController: any; -} +import { getFocusNavController } from '../utils'; function getQuickAccessWindow(): Window | null { try { - const context = FocusNavController?.m_ActiveContext || FocusNavController?.m_LastActiveContext; - const navTrees = context?.m_rgGamepadNavigationTrees || FocusNavController?.m_rgGamepadNavigationTrees; - return navTrees?.find((tree: any) => tree?.id === "QuickAccess-NA")?.m_Root?.m_element?.ownerDocument.defaultView ?? null; + const navTrees = getFocusNavController()?.m_rgGamepadNavigationTrees; + return ( + navTrees?.find((tree: any) => tree?.id === 'QuickAccess-NA')?.m_Root?.m_element?.ownerDocument.defaultView ?? null + ); } catch (error) { console.error(error); return null; diff --git a/src/deck-components/ButtonItem.tsx b/src/deck-components/ButtonItem.tsx index e27b309..4c898b2 100644 --- a/src/deck-components/ButtonItem.tsx +++ b/src/deck-components/ButtonItem.tsx @@ -7,9 +7,10 @@ export interface ButtonItemProps extends ItemProps { onClick?(e: MouseEvent): void; disabled?: boolean; } - -export const ButtonItem = Object.values(CommonUIModule).find( - (mod: any) => - mod?.render?.toString()?.includes('"highlightOnFocus","childrenContainerWidth"') || - mod?.render?.toString()?.includes('childrenContainerWidth:"min"'), -) as FC; +export const ButtonItem = + CommonUIModule.ButtonField || + (Object.values(CommonUIModule).find( + (mod: any) => + mod?.render?.toString()?.includes('"highlightOnFocus","childrenContainerWidth"') || + mod?.render?.toString()?.includes('childrenContainerWidth:"min"'), + ) as FC); diff --git a/src/deck-components/Panel.tsx b/src/deck-components/Panel.tsx index 86c9d6d..629d5d0 100644 --- a/src/deck-components/Panel.tsx +++ b/src/deck-components/Panel.tsx @@ -5,7 +5,7 @@ import { findModuleChild } from '../webpack'; export interface PanelSectionProps { title?: string; spinner?: boolean; - children?: ReactNode + children?: ReactNode; } const [panelSection, mod] = findModuleChild((mod: any) => { @@ -20,9 +20,9 @@ const [panelSection, mod] = findModuleChild((mod: any) => { export const PanelSection = panelSection as FC; export interface PanelSectionRowProps { - children?: ReactNode + children?: ReactNode; } - -export const PanelSectionRow = Object.values(mod).filter( - (exp: any) => !exp?.toString()?.includes('.PanelSection'), -)[0] as FC; +// New as of Feb 22 2023 Beta || Old +export const PanelSectionRow = + mod.PanelSectionRow || + (Object.values(mod).filter((exp: any) => !exp?.toString()?.includes('.PanelSection'))[0] as FC); diff --git a/src/deck-components/Router.tsx b/src/deck-components/Router.tsx index 9ca5c80..a86345d 100644 --- a/src/deck-components/Router.tsx +++ b/src/deck-components/Router.tsx @@ -77,7 +77,6 @@ export interface WindowRouter { NavigateToChat(): void; NavigateToSteamWeb(url: string): void; NavigateBack(): void; - NavigateToWebRoute(unknown?: any, unknown2?: any): void; } export interface WindowStore { @@ -118,7 +117,6 @@ export interface Navigation { NavigateToLibraryTab(): void; NavigateToLayoutPreview(e: unknown): void; NavigateToSteamWeb(url: string): void; - NavigateToWebRoute(unknown?: any, unknown2?: any): void; OpenSideMenu(sideMenu: SideMenu): void; OpenQuickAccessMenu(quickAccessTab?: QuickAccessTab): void; OpenMainMenu(): void; @@ -154,33 +152,30 @@ try { } } const newNavigation = { - Navigate: Router.Navigate.bind(Router), - NavigateBack: Router.WindowStore?.GamepadUIMainWindowInstance?.NavigateBack.bind( + Navigate: Router.Navigate?.bind(Router), + NavigateBack: Router.WindowStore?.GamepadUIMainWindowInstance?.NavigateBack?.bind( Router.WindowStore.GamepadUIMainWindowInstance, ), - NavigateToAppProperties: InternalNavigators?.AppProperties || Router.NavigateToAppProperties.bind(Router), - NavigateToExternalWeb: InternalNavigators?.ExternalWeb || Router.NavigateToExternalWeb.bind(Router), - NavigateToInvites: InternalNavigators?.Invites || Router.NavigateToInvites.bind(Router), - NavigateToChat: Router.NavigateToChat.bind(Router), - NavigateToLibraryTab: InternalNavigators?.LibraryTab || Router.NavigateToLibraryTab.bind(Router), - NavigateToLayoutPreview: Router.NavigateToLayoutPreview.bind(Router), - NavigateToSteamWeb: Router.WindowStore?.GamepadUIMainWindowInstance?.NavigateToSteamWeb.bind( + NavigateToAppProperties: InternalNavigators?.AppProperties || Router.NavigateToAppProperties?.bind(Router), + NavigateToExternalWeb: InternalNavigators?.ExternalWeb || Router.NavigateToExternalWeb?.bind(Router), + NavigateToInvites: InternalNavigators?.Invites || Router.NavigateToInvites?.bind(Router), + NavigateToChat: Router.NavigateToChat?.bind(Router), + NavigateToLibraryTab: InternalNavigators?.LibraryTab || Router.NavigateToLibraryTab?.bind(Router), + NavigateToLayoutPreview: Router.NavigateToLayoutPreview?.bind(Router), + NavigateToSteamWeb: Router.WindowStore?.GamepadUIMainWindowInstance?.NavigateToSteamWeb?.bind( Router.WindowStore.GamepadUIMainWindowInstance, ), - NavigateToWebRoute: Router.WindowStore?.GamepadUIMainWindowInstance?.NavigateToWebRoute.bind( - Router.WindowStore.GamepadUIMainWindowInstance, - ), - OpenSideMenu: Router.WindowStore?.GamepadUIMainWindowInstance?.MenuStore.OpenSideMenu.bind( + OpenSideMenu: Router.WindowStore?.GamepadUIMainWindowInstance?.MenuStore.OpenSideMenu?.bind( Router.WindowStore.GamepadUIMainWindowInstance.MenuStore, ), - OpenQuickAccessMenu: Router.WindowStore?.GamepadUIMainWindowInstance?.MenuStore.OpenQuickAccessMenu.bind( + OpenQuickAccessMenu: Router.WindowStore?.GamepadUIMainWindowInstance?.MenuStore.OpenQuickAccessMenu?.bind( Router.WindowStore.GamepadUIMainWindowInstance.MenuStore, ), - OpenMainMenu: Router.WindowStore?.GamepadUIMainWindowInstance?.MenuStore.OpenMainMenu.bind( + OpenMainMenu: Router.WindowStore?.GamepadUIMainWindowInstance?.MenuStore.OpenMainMenu?.bind( Router.WindowStore.GamepadUIMainWindowInstance.MenuStore, ), - CloseSideMenus: Router.CloseSideMenus.bind(Router), - OpenPowerMenu: Router.OpenPowerMenu.bind(Router), + CloseSideMenus: Router.CloseSideMenus?.bind(Router), + OpenPowerMenu: Router.OpenPowerMenu?.bind(Router), } as Navigation; Object.assign(Navigation, newNavigation); diff --git a/src/deck-components/index.ts b/src/deck-components/index.ts index 9508ee9..11e45e5 100755 --- a/src/deck-components/index.ts +++ b/src/deck-components/index.ts @@ -26,55 +26,56 @@ export * from './Toggle'; export * from './ToggleField'; export * from './SteamClient'; -import { SteamClient, SteamAppOverview, LogoPosition } from './SteamClient'; +import { AppDetails, LogoPosition, SteamAppOverview, SteamClient } from './SteamClient'; declare global { - var SteamClient: SteamClient; + var SteamClient: SteamClient; - interface Window { - LocalizationManager: { - m_mapTokens: Map; - m_mapFallbackTokens: Map; - m_rgLocalesToUse: string[]; + interface Window { + LocalizationManager: { + m_mapTokens: Map; + m_mapFallbackTokens: Map; + m_rgLocalesToUse: string[]; + }; + App: { + m_CurrentUser: { + bIsLimited: boolean; + bIsOfflineMode: boolean; + bSupportAlertActive: boolean; + bCanInviteFriends: boolean; + NotificationCounts: { + comments: number; + inventory_items: number; + invites: number; + gifts: number; + offline_messages: number; + trade_offers: number; + async_game_updates: number; + moderator_messages: number; + help_request_replies: number; }; - App: { - m_CurrentUser: { - bIsLimited: boolean; - bIsOfflineMode: boolean; - bSupportAlertActive: boolean; - bCanInviteFriends: boolean; - NotificationCounts: { - comments: number; - inventory_items: number; - invites: number; - gifts: number; - offline_messages: number; - trade_offers: number; - async_game_updates: number; - moderator_messages: number; - help_request_replies: number; - }; - strAccountBalance: string; - strAccountName: string; - strSteamID: string; - }; - }; - appStore: { - GetAppOverviewByAppID: (appId: number) => SteamAppOverview | null; - GetCustomVerticalCapsuleURLs: (app: SteamAppOverview) => string[]; - GetCustomLandcapeImageURLs: (app: SteamAppOverview) => string[]; - GetCustomHeroImageURLs: (app: SteamAppOverview) => string[]; - GetCustomLogoImageURLs: (app: SteamAppOverview) => string[]; - GetLandscapeImageURLForApp: (app: SteamAppOverview) => string; - GetVerticalCapsuleURLForApp: (app: SteamAppOverview) => string; - GetCachedLandscapeImageURLForApp: (app: SteamAppOverview) => string; - GetCachedVerticalImageURLForApp: (app: SteamAppOverview) => string; - GetPregeneratedVerticalCapsuleForApp: (app: SteamAppOverview) => string; - GetIconURLForApp: (app: SteamAppOverview) => string; - }; - appDetailsStore: { - GetCustomLogoPosition: (app: SteamAppOverview) => LogoPosition | null; - SaveCustomLogoPosition: (app: SteamAppOverview, logoPositions: LogoPosition) => any; - } - } + strAccountBalance: string; + strAccountName: string; + strSteamID: string; + }; + }; + appStore: { + GetAppOverviewByAppID: (appId: number) => SteamAppOverview | null; + GetCustomVerticalCapsuleURLs: (app: SteamAppOverview) => string[]; + GetCustomLandcapeImageURLs: (app: SteamAppOverview) => string[]; + GetCustomHeroImageURLs: (app: SteamAppOverview) => string[]; + GetCustomLogoImageURLs: (app: SteamAppOverview) => string[]; + GetLandscapeImageURLForApp: (app: SteamAppOverview) => string; + GetVerticalCapsuleURLForApp: (app: SteamAppOverview) => string; + GetCachedLandscapeImageURLForApp: (app: SteamAppOverview) => string; + GetCachedVerticalImageURLForApp: (app: SteamAppOverview) => string; + GetPregeneratedVerticalCapsuleForApp: (app: SteamAppOverview) => string; + GetIconURLForApp: (app: SteamAppOverview) => string; + }; + appDetailsStore: { + GetAppDetails: (appId: number) => AppDetails | null; + GetCustomLogoPosition: (app: SteamAppOverview) => LogoPosition | null; + SaveCustomLogoPosition: (app: SteamAppOverview, logoPositions: LogoPosition) => any; + }; + } } diff --git a/src/utils/index.ts b/src/utils/index.ts index d139e36..fbf0e11 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,6 +1,11 @@ export * from './patcher'; export * from './react'; +declare global { + var FocusNavController: any; + var GamepadNavTree: any; +} + export function joinClassNames(...classes: string[]): string { return classes.join(' '); } @@ -16,7 +21,15 @@ export function findSP(): Window { // old (SP as host) if (document.title == 'SP') return window; // new (SP as popup) - const context = FocusNavController.m_ActiveContext || FocusNavController.m_LastActiveContext; - return context.m_rgGamepadNavigationTrees.find((x: any) => x.m_ID == 'root_1_').Root - .Element.ownerDocument.defaultView; + const focusNav = getFocusNavController(); + const context = focusNav.m_ActiveContext || focusNav.m_LastActiveContext; + return context.m_rgGamepadNavigationTrees.find((x: any) => x.m_ID == 'root_1_').Root.Element.ownerDocument + .defaultView; +} + +/** + * Gets the correct FocusNavController, as the Feb 22 2023 beta has two for some reason. + */ +export function getFocusNavController(): any { + return window.GamepadNavTree?.m_context?.m_controller || window.FocusNavController; } From 86f33de2c0034714e12a874d714249df680faf7e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 23 Feb 2023 02:57:40 +0000 Subject: [PATCH 5/8] chore(release): 3.19.1 [CI SKIP] --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 171170e..4d5c7f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [3.19.1](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.19.0...v3.19.1) (2023-02-23) + + +### Bug Fixes + +* refactoring to fix for feb 22 2023 beta ([0b6dc24](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/0b6dc24c0da2d7644e185425e975787657f8bba1)) + # [3.19.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.18.11...v3.19.0) (2023-02-22) diff --git a/package.json b/package.json index 6784b98..2aedb41 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "decky-frontend-lib", - "version": "3.19.0", + "version": "3.19.1", "description": "A library for building decky plugins", "main": "dist/index.js", "types": "dist/index.d.ts", From 419835204e719f26bd238cef1f8a0f0307247ec9 Mon Sep 17 00:00:00 2001 From: Travis Lane <63308171+Tormak9970@users.noreply.github.com> Date: Mon, 6 Mar 2023 11:15:36 -0600 Subject: [PATCH 6/8] Add support for SidebarNavigation separator Looked into it and in order to render a separator you need to pass `"separator"` --- src/deck-components/SidebarNavigation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/deck-components/SidebarNavigation.tsx b/src/deck-components/SidebarNavigation.tsx index 8afe94b..9cb0551 100644 --- a/src/deck-components/SidebarNavigation.tsx +++ b/src/deck-components/SidebarNavigation.tsx @@ -16,7 +16,7 @@ export interface SidebarNavigationPage { export interface SidebarNavigationProps { title?: string; - pages: SidebarNavigationPage[]; + pages: (SidebarNavigationPage|string)[]; showTitle?: boolean; disableRouteReporting?: boolean; page?: string; From 7e5c7b5ac322ed63b6c2b6ce7d46a2cf71233809 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 7 Mar 2023 23:48:45 +0000 Subject: [PATCH 7/8] chore(release): 3.19.2 [CI SKIP] --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d5c7f8..fbf64ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [3.19.2](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.19.1...v3.19.2) (2023-03-07) + + +### Bug Fixes + +* **Item:** add highlightOnFocus prop ([c53f87b](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/c53f87b4a9273b377853bfff1d27474ebd6e564a)) + ## [3.19.1](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.19.0...v3.19.1) (2023-02-23) diff --git a/package.json b/package.json index 2aedb41..632ad55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "decky-frontend-lib", - "version": "3.19.1", + "version": "3.19.2", "description": "A library for building decky plugins", "main": "dist/index.js", "types": "dist/index.d.ts", From 1a34501868e8f8e9747bd956be2ed218699a2275 Mon Sep 17 00:00:00 2001 From: Travis Lane <63308171+Tormak9970@users.noreply.github.com> Date: Wed, 22 Mar 2023 20:17:58 -0500 Subject: [PATCH 8/8] updated to use 'separator' instead of string --- src/deck-components/SidebarNavigation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/deck-components/SidebarNavigation.tsx b/src/deck-components/SidebarNavigation.tsx index 9cb0551..10ad495 100644 --- a/src/deck-components/SidebarNavigation.tsx +++ b/src/deck-components/SidebarNavigation.tsx @@ -16,7 +16,7 @@ export interface SidebarNavigationPage { export interface SidebarNavigationProps { title?: string; - pages: (SidebarNavigationPage|string)[]; + pages: (SidebarNavigationPage | 'separator')[]; showTitle?: boolean; disableRouteReporting?: boolean; page?: string;