import type { CustomWorkspacesInput, NMRiumCore, NmriumState, WorkspacePreferences as NMRiumPreferences } from '@zakodium/nmrium-core'; import type { FileCollection } from 'file-collection'; import type { ReactElement, ReactNode, Ref } from 'react'; import type { ErrorBoundaryPropsWithComponent } from 'react-error-boundary'; import type { NMRiumRefAPI } from './NMRiumRefAPI.js'; import type { NMRiumChangeCb, NMRiumWorkspace } from './types.js'; export interface NMRiumProps { /** * If you choose to bind the state to the component, you have to use a valid one. * - It must have the latest version supported by the core used by the NMRium component. * - It must come from a read api of `nmrium-core`. * - It will be transmitted as-is to the state reducer of `NMRium` component. * - `aggregator` must also be provided. */ state?: Partial; /** * Each of the core read apis returns a file collection. * Sometimes with the `fileCollection` name (not in aggregated form), sometimes with `ium` or `aggregator` name (already aggregated). * `aggregator` is a meta file collection. Each user source of data is placed in his dedicated uuid folder. * In the UI, it means one drag n drop (with possibly multiple files) = one uuid folder. * * @example * ```ts * const {nmriumState, fileCollection, containsNmrium, selectorRoot} = core.read(); * const aggregator = containsNmrium * ? fileCollection * : new FileCollection().appendFileCollection(fileCollection, selectorRoot); * * * ``` * * ```ts * const [state, ium] = core.readNMRiumArchive(); * * * ``` * * ```ts * const [state, aggregator] = core.readNMRiumObject(); * // const [state, aggregator] = core.readNMRiumFile(); * * * ``` * * ```ts * const [state, fileCollection, selectorRoot] = core.readFromWebSource(); * const aggregator = new FileCollection().appendFileCollection(fileCollection, selectorRoot); * * * ``` */ aggregator?: FileCollection; onChange?: NMRiumChangeCb; /** * Externally control highlighting of ranges, signals, zones, and peaks ...etc by providing their IDs from the loaded data. * These highlights are applied in addition to NMRium's internal highlights. */ highlightedIds?: readonly string[]; noErrorBoundary?: boolean; onError?: ErrorBoundaryPropsWithComponent['onError']; workspace?: NMRiumWorkspace; customWorkspaces?: CustomWorkspacesInput; preferences?: NMRiumPreferences; emptyText?: ReactNode; /** * Returns a custom spinner that will be rendered while loading data. */ getSpinner?: () => ReactElement; core?: NMRiumCore; ref?: Ref; } declare function NMRiumBase(props: NMRiumProps): import("react").JSX.Element; export declare const NMRium: import("react").MemoExoticComponent; export {}; //# sourceMappingURL=NMRium.d.ts.map