UNPKG

@desci-labs/frontend-components

Version:

A library for commonly used components on the DeSci Frontend web apps

25 lines 1.27 kB
import { DriveObject, DrivePath } from '@desci-labs/desci-models'; import { BreadCrumb } from '../components/publishedResearch/files/breadcrumb/BreadCrumb'; import { Viewer } from '../components/publishedResearch/interfaces'; export declare const constructBreadCrumbs: (path: DrivePath) => BreadCrumb[]; export declare const checkIfAuthorIsCurrentUser: ({ idInRoute, author, }: { idInRoute: string; author: { orcid: string | null; name: string; id?: string | null; }; }) => boolean; export declare const calculateDuration: (startDate: string, endDate: string) => string; export declare function seedToColor(seed: string): string; export declare const formatAuthors: (authors: string[], threshold: number) => string; export declare const BytesToHumanFileSize: (size: number) => string; export declare const getFileExtension: (filename: string) => string; export declare function isValidGitHubUrl(url: string): boolean; export declare function separateFileNameAndExtension(fileName: string): { fileName: string; extension?: string; }; export declare function determineViewingExperience(file: DriveObject): Viewer; export declare function openInNewTab(url: string, newWindow?: boolean): void; //# sourceMappingURL=helpers.d.ts.map