From bce557cc2dc767628bed6aac87301a1be7c5431b Mon Sep 17 00:00:00 2001 From: rxliuli Date: Tue, 4 Nov 2025 05:03:50 +0800 Subject: init commit --- .../src/common/web-navigation/web-navigation.js | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js (limited to 'node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js') diff --git a/node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js b/node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js new file mode 100644 index 0000000..13b7f6d --- /dev/null +++ b/node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js @@ -0,0 +1,28 @@ +import { createPlatformSelectors } from "./platform-selection"; +import { createLandingPageLinks } from "./landing-page-links-by-platform"; +import { makeWebSearchAction } from "../search/web-search-action"; +/** + * Create a {@linkcode WebNavigation} based on the active {@linkcode Intent} + */ +export function createWebNavigation(objectGraph, platform) { + const webNavigation = { + platforms: [], + tabs: [], + searchAction: makeWebSearchAction(objectGraph, platform), + }; + setActivePlatform(objectGraph, webNavigation, platform); + return webNavigation; +} +/** + * Updates a {@linkcode WebNavigation} to reflect: + * + * 1. the platform specified by {@linkcode platform} + * 2. the "active landing page" specified by {@linkcode intent} + */ +export function setActivePlatform(objectGraph, shelf, platform, intent) { + shelf.platforms = createPlatformSelectors(objectGraph, platform); + const searchActionDestination = shelf.searchAction.destination; + shelf.tabs = createLandingPageLinks(objectGraph, platform, intent); + searchActionDestination.platform = platform; +} +//# sourceMappingURL=web-navigation.js.map \ No newline at end of file -- cgit v1.2.3