Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

spotlight: navigation searcher added (#3245)

Anwarul Islamf7c1825de520
diff --git a/packages/hoppscotch-common/src/components.d.ts b/packages/hoppscotch-common/src/components.d.ts
index d8037387c..54b8070ad 100644
--- a/packages/hoppscotch-common/src/components.d.ts
+++ b/packages/hoppscotch-common/src/components.d.ts
@@ -1,222 +1,32 @@
// generated by unplugin-vue-components
// We suggest you to commit this file into source control
// Read more: https://github.com/vuejs/core/pull/3399
-import "@vue/runtime-core"
+import '@vue/runtime-core'
export {}
-declare module "@vue/runtime-core" {
+declare module '@vue/runtime-core' {
export interface GlobalComponents {
- AppActionHandler: typeof import("./components/app/ActionHandler.vue")["default"]
- AppAnnouncement: typeof import("./components/app/Announcement.vue")["default"]
- AppDeveloperOptions: typeof import("./components/app/DeveloperOptions.vue")["default"]
- AppFooter: typeof import("./components/app/Footer.vue")["default"]
- AppGitHubStarButton: typeof import("./components/app/GitHubStarButton.vue")["default"]
- AppHeader: typeof import("./components/app/Header.vue")["default"]
- AppInterceptor: typeof import("./components/app/Interceptor.vue")["default"]
- AppLogo: typeof import("./components/app/Logo.vue")["default"]
- AppOptions: typeof import("./components/app/Options.vue")["default"]
- AppPaneLayout: typeof import("./components/app/PaneLayout.vue")["default"]
- AppShare: typeof import("./components/app/Share.vue")["default"]
- AppShortcuts: typeof import("./components/app/Shortcuts.vue")["default"]
- AppShortcutsEntry: typeof import("./components/app/ShortcutsEntry.vue")["default"]
- AppShortcutsPrompt: typeof import("./components/app/ShortcutsPrompt.vue")["default"]
- AppSidenav: typeof import("./components/app/Sidenav.vue")["default"]
- AppSpotlight: typeof import("./components/app/spotlight/index.vue")["default"]
- AppSpotlightEntry: typeof import("./components/app/spotlight/Entry.vue")["default"]
- AppSpotlightEntryGQLHistory: typeof import("./components/app/spotlight/entry/GQLHistory.vue")["default"]
- AppSpotlightEntryRESTHistory: typeof import("./components/app/spotlight/entry/RESTHistory.vue")["default"]
- AppSupport: typeof import("./components/app/Support.vue")["default"]
- ButtonPrimary: typeof import("./../../hoppscotch-ui/src/components/button/Primary.vue")["default"]
- ButtonSecondary: typeof import("./../../hoppscotch-ui/src/components/button/Secondary.vue")["default"]
- Collections: typeof import("./components/collections/index.vue")["default"]
- CollectionsAdd: typeof import("./components/collections/Add.vue")["default"]
- CollectionsAddFolder: typeof import("./components/collections/AddFolder.vue")["default"]
- CollectionsAddRequest: typeof import("./components/collections/AddRequest.vue")["default"]
- CollectionsCollection: typeof import("./components/collections/Collection.vue")["default"]
- CollectionsEdit: typeof import("./components/collections/Edit.vue")["default"]
- CollectionsEditFolder: typeof import("./components/collections/EditFolder.vue")["default"]
- CollectionsEditRequest: typeof import("./components/collections/EditRequest.vue")["default"]
- CollectionsGraphql: typeof import("./components/collections/graphql/index.vue")["default"]
- CollectionsGraphqlAdd: typeof import("./components/collections/graphql/Add.vue")["default"]
- CollectionsGraphqlAddFolder: typeof import("./components/collections/graphql/AddFolder.vue")["default"]
- CollectionsGraphqlAddRequest: typeof import("./components/collections/graphql/AddRequest.vue")["default"]
- CollectionsGraphqlCollection: typeof import("./components/collections/graphql/Collection.vue")["default"]
- CollectionsGraphqlEdit: typeof import("./components/collections/graphql/Edit.vue")["default"]
- CollectionsGraphqlEditFolder: typeof import("./components/collections/graphql/EditFolder.vue")["default"]
- CollectionsGraphqlEditRequest: typeof import("./components/collections/graphql/EditRequest.vue")["default"]
- CollectionsGraphqlFolder: typeof import("./components/collections/graphql/Folder.vue")["default"]
- CollectionsGraphqlImportExport: typeof import("./components/collections/graphql/ImportExport.vue")["default"]
- CollectionsGraphqlRequest: typeof import("./components/collections/graphql/Request.vue")["default"]
- CollectionsImportExport: typeof import("./components/collections/ImportExport.vue")["default"]
- CollectionsMyCollections: typeof import("./components/collections/MyCollections.vue")["default"]
- CollectionsRequest: typeof import("./components/collections/Request.vue")["default"]
- CollectionsSaveRequest: typeof import("./components/collections/SaveRequest.vue")["default"]
- CollectionsTeamCollections: typeof import("./components/collections/TeamCollections.vue")["default"]
- Environments: typeof import("./components/environments/index.vue")["default"]
- EnvironmentsImportExport: typeof import("./components/environments/ImportExport.vue")["default"]
- EnvironmentsMy: typeof import("./components/environments/my/index.vue")["default"]
- EnvironmentsMyDetails: typeof import("./components/environments/my/Details.vue")["default"]
- EnvironmentsMyEnvironment: typeof import("./components/environments/my/Environment.vue")["default"]
- EnvironmentsSelector: typeof import("./components/environments/Selector.vue")["default"]
- EnvironmentsTeams: typeof import("./components/environments/teams/index.vue")["default"]
- EnvironmentsTeamsDetails: typeof import("./components/environments/teams/Details.vue")["default"]
- EnvironmentsTeamsEnvironment: typeof import("./components/environments/teams/Environment.vue")["default"]
- FirebaseLogin: typeof import("./components/firebase/Login.vue")["default"]
- FirebaseLogout: typeof import("./components/firebase/Logout.vue")["default"]
- GraphqlAuthorization: typeof import("./components/graphql/Authorization.vue")["default"]
- GraphqlField: typeof import("./components/graphql/Field.vue")["default"]
- GraphqlRequest: typeof import("./components/graphql/Request.vue")["default"]
- GraphqlRequestOptions: typeof import("./components/graphql/RequestOptions.vue")["default"]
- GraphqlResponse: typeof import("./components/graphql/Response.vue")["default"]
- GraphqlSidebar: typeof import("./components/graphql/Sidebar.vue")["default"]
- GraphqlType: typeof import("./components/graphql/Type.vue")["default"]
- GraphqlTypeLink: typeof import("./components/graphql/TypeLink.vue")["default"]
- History: typeof import("./components/history/index.vue")["default"]
- HistoryGraphqlCard: typeof import("./components/history/graphql/Card.vue")["default"]
- HistoryRestCard: typeof import("./components/history/rest/Card.vue")["default"]
- HoppButtonPrimary: typeof import("@hoppscotch/ui")["HoppButtonPrimary"]
- HoppButtonSecondary: typeof import("@hoppscotch/ui")["HoppButtonSecondary"]
- HoppSmartAnchor: typeof import("@hoppscotch/ui")["HoppSmartAnchor"]
- HoppSmartAutoComplete: typeof import("@hoppscotch/ui")["HoppSmartAutoComplete"]
- HoppSmartCheckbox: typeof import("@hoppscotch/ui")["HoppSmartCheckbox"]
- HoppSmartConfirmModal: typeof import("@hoppscotch/ui")["HoppSmartConfirmModal"]
- HoppSmartExpand: typeof import("@hoppscotch/ui")["HoppSmartExpand"]
- HoppSmartFileChip: typeof import("@hoppscotch/ui")["HoppSmartFileChip"]
- HoppSmartInput: typeof import("@hoppscotch/ui")["HoppSmartInput"]
- HoppSmartIntersection: typeof import("@hoppscotch/ui")["HoppSmartIntersection"]
- HoppSmartItem: typeof import("@hoppscotch/ui")["HoppSmartItem"]
- HoppSmartLink: typeof import("@hoppscotch/ui")["HoppSmartLink"]
- HoppSmartModal: typeof import("@hoppscotch/ui")["HoppSmartModal"]
- HoppSmartPicture: typeof import("@hoppscotch/ui")["HoppSmartPicture"]
- HoppSmartPlaceholder: typeof import("@hoppscotch/ui")["HoppSmartPlaceholder"]
- HoppSmartProgressRing: typeof import("@hoppscotch/ui")["HoppSmartProgressRing"]
- HoppSmartRadioGroup: typeof import("@hoppscotch/ui")["HoppSmartRadioGroup"]
- HoppSmartSlideOver: typeof import("@hoppscotch/ui")["HoppSmartSlideOver"]
- HoppSmartSpinner: typeof import("@hoppscotch/ui")["HoppSmartSpinner"]
- HoppSmartTab: typeof import("@hoppscotch/ui")["HoppSmartTab"]
- HoppSmartTabs: typeof import("@hoppscotch/ui")["HoppSmartTabs"]
- HoppSmartToggle: typeof import("@hoppscotch/ui")["HoppSmartToggle"]
- HoppSmartWindow: typeof import("@hoppscotch/ui")["HoppSmartWindow"]
- HoppSmartWindows: typeof import("@hoppscotch/ui")["HoppSmartWindows"]
- HttpAuthorization: typeof import("./components/http/Authorization.vue")["default"]
- HttpAuthorizationApiKey: typeof import("./components/http/authorization/ApiKey.vue")["default"]
- HttpAuthorizationBasic: typeof import("./components/http/authorization/Basic.vue")["default"]
- HttpBody: typeof import("./components/http/Body.vue")["default"]
- HttpBodyParameters: typeof import("./components/http/BodyParameters.vue")["default"]
- HttpCodegenModal: typeof import("./components/http/CodegenModal.vue")["default"]
- HttpHeaders: typeof import("./components/http/Headers.vue")["default"]
- HttpImportCurl: typeof import("./components/http/ImportCurl.vue")["default"]
- HttpOAuth2Authorization: typeof import("./components/http/OAuth2Authorization.vue")["default"]
- HttpParameters: typeof import("./components/http/Parameters.vue")["default"]
- HttpPreRequestScript: typeof import("./components/http/PreRequestScript.vue")["default"]
- HttpRawBody: typeof import("./components/http/RawBody.vue")["default"]
- HttpReqChangeConfirmModal: typeof import("./components/http/ReqChangeConfirmModal.vue")["default"]
- HttpRequest: typeof import("./components/http/Request.vue")["default"]
- HttpRequestOptions: typeof import("./components/http/RequestOptions.vue")["default"]
- HttpRequestTab: typeof import("./components/http/RequestTab.vue")["default"]
- HttpResponse: typeof import("./components/http/Response.vue")["default"]
- HttpResponseMeta: typeof import("./components/http/ResponseMeta.vue")["default"]
- HttpSidebar: typeof import("./components/http/Sidebar.vue")["default"]
- HttpTestResult: typeof import("./components/http/TestResult.vue")["default"]
- HttpTestResultEntry: typeof import("./components/http/TestResultEntry.vue")["default"]
- HttpTestResultEnv: typeof import("./components/http/TestResultEnv.vue")["default"]
- HttpTestResultReport: typeof import("./components/http/TestResultReport.vue")["default"]
- HttpTests: typeof import("./components/http/Tests.vue")["default"]
- HttpURLEncodedParams: typeof import("./components/http/URLEncodedParams.vue")["default"]
- IconLucideAlertTriangle: typeof import("~icons/lucide/alert-triangle")["default"]
- IconLucideArrowLeft: typeof import("~icons/lucide/arrow-left")["default"]
- IconLucideCheckCircle: typeof import("~icons/lucide/check-circle")["default"]
- IconLucideChevronRight: typeof import("~icons/lucide/chevron-right")["default"]
- IconLucideGlobe: typeof import("~icons/lucide/globe")["default"]
- IconLucideHelpCircle: typeof import("~icons/lucide/help-circle")["default"]
- IconLucideInbox: typeof import("~icons/lucide/inbox")["default"]
- IconLucideInfo: typeof import("~icons/lucide/info")["default"]
- IconLucideLayers: typeof import("~icons/lucide/layers")["default"]
- IconLucideListEnd: typeof import("~icons/lucide/list-end")["default"]
- IconLucideMinus: typeof import("~icons/lucide/minus")["default"]
- IconLucideSearch: typeof import("~icons/lucide/search")["default"]
- IconLucideUsers: typeof import("~icons/lucide/users")["default"]
- IconLucideVerified: typeof import("~icons/lucide/verified")["default"]
- LensesHeadersRenderer: typeof import("./components/lenses/HeadersRenderer.vue")["default"]
- LensesHeadersRendererEntry: typeof import("./components/lenses/HeadersRendererEntry.vue")["default"]
- LensesRenderersAudioLensRenderer: typeof import("./components/lenses/renderers/AudioLensRenderer.vue")["default"]
- LensesRenderersHTMLLensRenderer: typeof import("./components/lenses/renderers/HTMLLensRenderer.vue")["default"]
- LensesRenderersImageLensRenderer: typeof import("./components/lenses/renderers/ImageLensRenderer.vue")["default"]
- LensesRenderersJSONLensRenderer: typeof import("./components/lenses/renderers/JSONLensRenderer.vue")["default"]
- LensesRenderersPDFLensRenderer: typeof import("./components/lenses/renderers/PDFLensRenderer.vue")["default"]
- LensesRenderersRawLensRenderer: typeof import("./components/lenses/renderers/RawLensRenderer.vue")["default"]
- LensesRenderersVideoLensRenderer: typeof import("./components/lenses/renderers/VideoLensRenderer.vue")["default"]
- LensesRenderersXMLLensRenderer: typeof import("./components/lenses/renderers/XMLLensRenderer.vue")["default"]
- LensesResponseBodyRenderer: typeof import("./components/lenses/ResponseBodyRenderer.vue")["default"]
- ProfileShortcode: typeof import("./components/profile/Shortcode.vue")["default"]
- ProfileShortcodes: typeof import("./components/profile/Shortcodes.vue")["default"]
- ProfileUserDelete: typeof import("./components/profile/UserDelete.vue")["default"]
- RealtimeCommunication: typeof import("./components/realtime/Communication.vue")["default"]
- RealtimeConnectionConfig: typeof import("./components/realtime/ConnectionConfig.vue")["default"]
- RealtimeLog: typeof import("./components/realtime/Log.vue")["default"]
- RealtimeLogEntry: typeof import("./components/realtime/LogEntry.vue")["default"]
- RealtimeSubscription: typeof import("./components/realtime/Subscription.vue")["default"]
- SmartAccentModePicker: typeof import("./components/smart/AccentModePicker.vue")["default"]
- SmartAnchor: typeof import("./../../hoppscotch-ui/src/components/smart/Anchor.vue")["default"]
- SmartAutoComplete: typeof import("./../../hoppscotch-ui/src/components/smart/AutoComplete.vue")["default"]
- SmartChangeLanguage: typeof import("./components/smart/ChangeLanguage.vue")["default"]
- SmartCheckbox: typeof import("./../../hoppscotch-ui/src/components/smart/Checkbox.vue")["default"]
- SmartColorModePicker: typeof import("./components/smart/ColorModePicker.vue")["default"]
- SmartConfirmModal: typeof import("./../../hoppscotch-ui/src/components/smart/ConfirmModal.vue")["default"]
- SmartEnvInput: typeof import("./components/smart/EnvInput.vue")["default"]
- SmartExpand: typeof import("./../../hoppscotch-ui/src/components/smart/Expand.vue")["default"]
- SmartFileChip: typeof import("./../../hoppscotch-ui/src/components/smart/FileChip.vue")["default"]
- SmartFontSizePicker: typeof import("./components/smart/FontSizePicker.vue")["default"]
- SmartInput: typeof import("./../../hoppscotch-ui/src/components/smart/Input.vue")["default"]
- SmartIntersection: typeof import("./../../hoppscotch-ui/src/components/smart/Intersection.vue")["default"]
- SmartItem: typeof import("./../../hoppscotch-ui/src/components/smart/Item.vue")["default"]
- SmartLink: typeof import("./../../hoppscotch-ui/src/components/smart/Link.vue")["default"]
- SmartModal: typeof import("./../../hoppscotch-ui/src/components/smart/Modal.vue")["default"]
- SmartPicture: typeof import("./../../hoppscotch-ui/src/components/smart/Picture.vue")["default"]
- SmartPlaceholder: typeof import("./../../hoppscotch-ui/src/components/smart/Placeholder.vue")["default"]
- SmartProgressRing: typeof import("./../../hoppscotch-ui/src/components/smart/ProgressRing.vue")["default"]
- SmartRadio: typeof import("./../../hoppscotch-ui/src/components/smart/Radio.vue")["default"]
- SmartRadioGroup: typeof import("./../../hoppscotch-ui/src/components/smart/RadioGroup.vue")["default"]
- SmartSlideOver: typeof import("./../../hoppscotch-ui/src/components/smart/SlideOver.vue")["default"]
- SmartSpinner: typeof import("./../../hoppscotch-ui/src/components/smart/Spinner.vue")["default"]
- SmartTab: typeof import("./../../hoppscotch-ui/src/components/smart/Tab.vue")["default"]
- SmartTabs: typeof import("./../../hoppscotch-ui/src/components/smart/Tabs.vue")["default"]
- SmartToggle: typeof import("./../../hoppscotch-ui/src/components/smart/Toggle.vue")["default"]
- SmartTree: typeof import("./components/smart/Tree.vue")["default"]
- SmartTreeBranch: typeof import("./components/smart/TreeBranch.vue")["default"]
- SmartWindow: typeof import("./../../hoppscotch-ui/src/components/smart/Window.vue")["default"]
- SmartWindows: typeof import("./../../hoppscotch-ui/src/components/smart/Windows.vue")["default"]
- TabPrimary: typeof import("./components/tab/Primary.vue")["default"]
- TabSecondary: typeof import("./components/tab/Secondary.vue")["default"]
- Teams: typeof import("./components/teams/index.vue")["default"]
- TeamsAdd: typeof import("./components/teams/Add.vue")["default"]
- TeamsEdit: typeof import("./components/teams/Edit.vue")["default"]
- TeamsInvite: typeof import("./components/teams/Invite.vue")["default"]
- TeamsMemberStack: typeof import("./components/teams/MemberStack.vue")["default"]
- TeamsModal: typeof import("./components/teams/Modal.vue")["default"]
- TeamsTeam: typeof import("./components/teams/Team.vue")["default"]
- Tippy: typeof import("vue-tippy")["Tippy"]
- WorkspaceCurrent: typeof import("./components/workspace/Current.vue")["default"]
- WorkspaceSelector: typeof import("./components/workspace/Selector.vue")["default"]
AppActionHandler: typeof import('./components/app/ActionHandler.vue')['default']
AppAnnouncement: typeof import('./components/app/Announcement.vue')['default']
+ AppContextMenu: typeof import('./components/app/ContextMenu.vue')['default']
AppDeveloperOptions: typeof import('./components/app/DeveloperOptions.vue')['default']
AppFooter: typeof import('./components/app/Footer.vue')['default']
- AppFuse: typeof import('./components/app/Fuse.vue')['default']
AppGitHubStarButton: typeof import('./components/app/GitHubStarButton.vue')['default']
AppHeader: typeof import('./components/app/Header.vue')['default']
AppInterceptor: typeof import('./components/app/Interceptor.vue')['default']
AppLogo: typeof import('./components/app/Logo.vue')['default']
AppOptions: typeof import('./components/app/Options.vue')['default']
AppPaneLayout: typeof import('./components/app/PaneLayout.vue')['default']
- AppPowerSearch: typeof import('./components/app/PowerSearch.vue')['default']
- AppPowerSearchEntry: typeof import('./components/app/PowerSearchEntry.vue')['default']
AppShare: typeof import('./components/app/Share.vue')['default']
AppShortcuts: typeof import('./components/app/Shortcuts.vue')['default']
AppShortcutsEntry: typeof import('./components/app/ShortcutsEntry.vue')['default']
AppShortcutsPrompt: typeof import('./components/app/ShortcutsPrompt.vue')['default']
AppSidenav: typeof import('./components/app/Sidenav.vue')['default']
+ AppSpotlight: typeof import('./components/app/spotlight/index.vue')['default']
+ AppSpotlightEntry: typeof import('./components/app/spotlight/Entry.vue')['default']
+ AppSpotlightEntryGQLHistory: typeof import('./components/app/spotlight/entry/GQLHistory.vue')['default']
+ AppSpotlightEntryRESTHistory: typeof import('./components/app/spotlight/entry/RESTHistory.vue')['default']
AppSupport: typeof import('./components/app/Support.vue')['default']
ButtonPrimary: typeof import('./../../hoppscotch-ui/src/components/button/Primary.vue')['default']
ButtonSecondary: typeof import('./../../hoppscotch-ui/src/components/button/Secondary.vue')['default']
@@ -245,6 +55,7 @@ declare module "@vue/runtime-core" {
CollectionsSaveRequest: typeof import('./components/collections/SaveRequest.vue')['default']
CollectionsTeamCollections: typeof import('./components/collections/TeamCollections.vue')['default']
Environments: typeof import('./components/environments/index.vue')['default']
+ EnvironmentsAdd: typeof import('./components/environments/Add.vue')['default']
EnvironmentsImportExport: typeof import('./components/environments/ImportExport.vue')['default']
EnvironmentsMy: typeof import('./components/environments/my/index.vue')['default']
EnvironmentsMyDetails: typeof import('./components/environments/my/Details.vue')['default']
@@ -274,7 +85,7 @@ declare module "@vue/runtime-core" {
HoppSmartConfirmModal: typeof import('@hoppscotch/ui')['HoppSmartConfirmModal']
HoppSmartExpand: typeof import('@hoppscotch/ui')['HoppSmartExpand']
HoppSmartFileChip: typeof import('@hoppscotch/ui')['HoppSmartFileChip']
- HoppSmartIntersection: typeof import('@hoppscotch/ui')['HoppSmartIntersection']
+ HoppSmartInput: typeof import('@hoppscotch/ui')['HoppSmartInput']
HoppSmartItem: typeof import('@hoppscotch/ui')['HoppSmartItem']
HoppSmartLink: typeof import('@hoppscotch/ui')['HoppSmartLink']
HoppSmartModal: typeof import('@hoppscotch/ui')['HoppSmartModal']
@@ -308,7 +119,6 @@ declare module "@vue/runtime-core" {
HttpResponse: typeof import('./components/http/Response.vue')['default']
HttpResponseMeta: typeof import('./components/http/ResponseMeta.vue')['default']
HttpSidebar: typeof import('./components/http/Sidebar.vue')['default']
- HttpTabHead: typeof import('./components/http/TabHead.vue')['default']
HttpTestResult: typeof import('./components/http/TestResult.vue')['default']
HttpTestResultEntry: typeof import('./components/http/TestResultEntry.vue')['default']
HttpTestResultEnv: typeof import('./components/http/TestResultEnv.vue')['default']
@@ -328,7 +138,6 @@ declare module "@vue/runtime-core" {
IconLucideMinus: typeof import('~icons/lucide/minus')['default']
IconLucideSearch: typeof import('~icons/lucide/search')['default']
IconLucideUsers: typeof import('~icons/lucide/users')['default']
- IconLucideVerified: typeof import('~icons/lucide/verified')['default']
LensesHeadersRenderer: typeof import('./components/lenses/HeadersRenderer.vue')['default']
LensesHeadersRendererEntry: typeof import('./components/lenses/HeadersRendererEntry.vue')['default']
LensesRenderersAudioLensRenderer: typeof import('./components/lenses/renderers/AudioLensRenderer.vue')['default']
@@ -359,11 +168,13 @@ declare module "@vue/runtime-core" {
SmartExpand: typeof import('./../../hoppscotch-ui/src/components/smart/Expand.vue')['default']
SmartFileChip: typeof import('./../../hoppscotch-ui/src/components/smart/FileChip.vue')['default']
SmartFontSizePicker: typeof import('./components/smart/FontSizePicker.vue')['default']
+ SmartInput: typeof import('./../../hoppscotch-ui/src/components/smart/Input.vue')['default']
SmartIntersection: typeof import('./../../hoppscotch-ui/src/components/smart/Intersection.vue')['default']
SmartItem: typeof import('./../../hoppscotch-ui/src/components/smart/Item.vue')['default']
SmartLink: typeof import('./../../hoppscotch-ui/src/components/smart/Link.vue')['default']
SmartModal: typeof import('./../../hoppscotch-ui/src/components/smart/Modal.vue')['default']
SmartPicture: typeof import('./../../hoppscotch-ui/src/components/smart/Picture.vue')['default']
+ SmartPlaceholder: typeof import('./../../hoppscotch-ui/src/components/smart/Placeholder.vue')['default']
SmartProgressRing: typeof import('./../../hoppscotch-ui/src/components/smart/ProgressRing.vue')['default']
SmartRadio: typeof import('./../../hoppscotch-ui/src/components/smart/Radio.vue')['default']
SmartRadioGroup: typeof import('./../../hoppscotch-ui/src/components/smart/RadioGroup.vue')['default']
@@ -389,4 +200,5 @@ declare module "@vue/runtime-core" {
WorkspaceCurrent: typeof import('./components/workspace/Current.vue')['default']
WorkspaceSelector: typeof import('./components/workspace/Selector.vue')['default']
}
+
}
diff --git a/packages/hoppscotch-common/src/components/app/spotlight/index.vue b/packages/hoppscotch-common/src/components/app/spotlight/index.vue
index cebd053f7..1ba53711b 100644
--- a/packages/hoppscotch-common/src/components/app/spotlight/index.vue
+++ b/packages/hoppscotch-common/src/components/app/spotlight/index.vue
@@ -95,6 +95,7 @@ import {
import { isEqual } from "lodash-es"
import { HistorySpotlightSearcherService } from "~/services/spotlight/searchers/history.searcher"
import { UserSpotlightSearcherService } from "~/services/spotlight/searchers/user.searcher"
+import { NavigationSpotlightSearcherService } from "~/services/spotlight/searchers/navigation.searcher"
const t = useI18n()
@@ -110,6 +111,7 @@ const spotlightService = useService(SpotlightService)
useService(HistorySpotlightSearcherService)
useService(UserSpotlightSearcherService)
+useService(NavigationSpotlightSearcherService)
const search = ref("")
diff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/navigation.searcher.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/navigation.searcher.ts
new file mode 100644
index 000000000..a72d808e1
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/spotlight/searchers/navigation.searcher.ts
@@ -0,0 +1,98 @@
+import { Component, markRaw, reactive } from "vue"
+import { HoppActionWithNoArgs, invokeAction } from "~/helpers/actions"
+import { getI18n } from "~/modules/i18n"
+import { SpotlightSearcherResult, SpotlightService } from ".."
+import {
+ SearchResult,
+ StaticSpotlightSearcherService,
+} from "./base/static.searcher"
+
+import IconArrowRight from "~icons/lucide/arrow-right"
+
+type Doc = {
+ text: string
+ alternates: string[]
+ icon: object | Component
+}
+
+/**
+ *
+ * This searcher is responsible for providing navigation related actions on the spotlight results.
+ *
+ * NOTE: Initializing this service registers it as a searcher with the Spotlight Service.
+ */
+export class NavigationSpotlightSearcherService extends StaticSpotlightSearcherService<Doc> {
+ public static readonly ID = "NAVIGATION_SPOTLIGHT_SEARCHER_SERVICE"
+
+ private t = getI18n()
+
+ public readonly searcherID = "navigation"
+ public searcherSectionTitle = this.t("shortcut.navigation.title")
+
+ private readonly spotlight = this.bind(SpotlightService)
+
+ private documents: Record<string, Doc> = reactive({
+ settings: {
+ text: this.t("shortcut.navigation.settings"),
+ alternates: ["navigation", "settings", "preferences"],
+ icon: markRaw(IconArrowRight),
+ },
+ rest: {
+ text: this.t("shortcut.navigation.rest"),
+ alternates: ["navigation", "rest", "request", "http"],
+ icon: markRaw(IconArrowRight),
+ },
+ graphql: {
+ text: this.t("shortcut.navigation.graphql"),
+ alternates: ["navigation", "graphql", "gql"],
+ icon: markRaw(IconArrowRight),
+ },
+ realtime: {
+ text: this.t("shortcut.navigation.realtime"),
+ alternates: ["navigation", "realtime", "socket", "ws"],
+ icon: markRaw(IconArrowRight),
+ },
+ documentation: {
+ text: this.t("shortcut.navigation.documentation"),
+ alternates: ["navigation", "documentation", "docs"],
+ icon: markRaw(IconArrowRight),
+ },
+ profile: {
+ text: this.t("shortcut.navigation.profile"),
+ alternates: ["navigation", "profile", "account"],
+ icon: markRaw(IconArrowRight),
+ },
+ })
+
+ private docKeys = Object.keys(this.documents)
+
+ constructor() {
+ super({
+ searchFields: ["text", "alternates"],
+ fieldWeights: {
+ text: 2,
+ alternates: 1,
+ },
+ })
+
+ this.setDocuments(this.documents)
+ this.spotlight.registerSearcher(this)
+ }
+
+ protected getSearcherResultForSearchResult(
+ result: SearchResult<Doc>
+ ): SpotlightSearcherResult {
+ return {
+ id: result.id,
+ icon: result.doc.icon,
+ text: { type: "text", text: result.doc.text },
+ score: result.score,
+ }
+ }
+
+ public onDocSelected(id: string): void {
+ if (this.docKeys.includes(id) === false) return
+
+ invokeAction(`navigation.jump.${id}` as HoppActionWithNoArgs)
+ }
+}