diff --git a/src/plugins/navigation/types.tsx b/src/plugins/navigation/types.tsx new file mode 100644 index 000000000..39cbb62a2 --- /dev/null +++ b/src/plugins/navigation/types.tsx @@ -0,0 +1,52 @@ +/** + * Copyright 2018-present Facebook. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * @format + */ + +export type URI = string; + +export type State = { + shouldShowSaveBookmarkDialog: boolean; + shouldShowURIErrorDialog: boolean; + saveBookmarkURI: URI | null; + requiredParameters: Array; +}; + +export type PersistedState = { + bookmarks: Map; + navigationEvents: Array; + bookmarksProvider: AutoCompleteProvider; + appMatchPatterns: Array; + appMatchPatternsProvider: AutoCompleteProvider; + currentURI: string; +}; + +export type NavigationEvent = { + date: Date | null; + uri: URI | null; + className: string | null; + screenshot: string | null; +}; + +export type Bookmark = { + uri: URI; + commonName: string; +}; + +export type AutoCompleteProvider = { + icon: string; + matchPatterns: Map; +}; + +export type AutoCompleteLineItem = { + icon: string; + matchPattern: string; + uri: URI; +}; + +export type AppMatchPattern = { + className: string; + pattern: string; +};