import type { FifoLogger } from 'fifo-logger'; import type { z } from 'zod/v4'; import type { WorkspaceWithSource } from '../../../../reducer/preferences/preferencesReducer.ts'; import { workspaceValidation } from '../validation.ts'; /** * Best effort to return typesafe values for the form * If one step does not work * - warn zod result with workspace in context * - fallback on the next step. * * 1. try to encode the current workspace * 2. try to encode the current workspace merged with workspaceDefaultProperties * 3. fallback on defaultGeneralSettingsFormValues (apply / save will lose current workspace values) * * NB: merge use a replacement array strategy. */ export declare function useDefaultValues(): { display: { general?: { experimentalFeatures?: { display: boolean; visible: boolean; open?: boolean | undefined; } | undefined; hidePanelsBar?: boolean | undefined; } | undefined; panels?: { spectraPanel: "undefined" | "active" | "hidden" | "open" | "available"; informationPanel: "undefined" | "active" | "hidden" | "open" | "available"; peaksPanel: "undefined" | "active" | "hidden" | "open" | "available"; integralsPanel: "undefined" | "active" | "hidden" | "open" | "available"; rangesPanel: "undefined" | "active" | "hidden" | "open" | "available"; structuresPanel: "undefined" | "active" | "hidden" | "open" | "available"; processingsPanel: "undefined" | "active" | "hidden" | "open" | "available"; zonesPanel: "undefined" | "active" | "hidden" | "open" | "available"; summaryPanel: "undefined" | "active" | "hidden" | "open" | "available"; multipleSpectraAnalysisPanel: "undefined" | "active" | "hidden" | "open" | "available"; databasePanel: "undefined" | "active" | "hidden" | "open" | "available"; predictionPanel: "undefined" | "active" | "hidden" | "open" | "available"; automaticAssignmentPanel: "undefined" | "active" | "hidden" | "open" | "available"; matrixGenerationPanel: "undefined" | "active" | "hidden" | "open" | "available"; simulationPanel: "undefined" | "active" | "hidden" | "open" | "available"; } | undefined; toolBarButtons?: { zoom?: boolean | undefined; zoomOut?: boolean | undefined; import?: boolean | undefined; exportAs?: boolean | undefined; spectraStackAlignments?: boolean | undefined; spectraCenterAlignments?: boolean | undefined; realImaginary?: boolean | undefined; peakPicking?: boolean | undefined; integral?: boolean | undefined; zonePicking?: boolean | undefined; slicing?: boolean | undefined; rangePicking?: boolean | undefined; zeroFilling?: boolean | undefined; zeroFillingDimension1?: boolean | undefined; zeroFillingDimension2?: boolean | undefined; apodization?: boolean | undefined; apodizationDimension1?: boolean | undefined; apodizationDimension2?: boolean | undefined; phaseCorrection?: boolean | undefined; phaseCorrectionTwoDimensions?: boolean | undefined; baselineCorrection?: boolean | undefined; fft?: boolean | undefined; fftDimension1?: boolean | undefined; fftDimension2?: boolean | undefined; multipleSpectraAnalysis?: boolean | undefined; exclusionZones?: boolean | undefined; autoRangeAndZonePicking?: boolean | undefined; inset?: boolean | undefined; } | undefined; }; general: { dimmedSpectraOpacity: unknown; invert: boolean; invertScroll: boolean; spectraRendering: "auto" | "crispEdges" | "geometricPrecision" | "optimizeSpeed"; popupLoggingLevel?: "error" | "info" | "fatal" | "warn" | "debug" | "trace" | "silent" | undefined; loggingLevel?: "error" | "info" | "fatal" | "warn" | "debug" | "trace" | "silent" | undefined; }; nuclei: { nucleus: string; ppmFormat: string; hzFormat: string; uuid: string; axisFrom?: string | undefined; axisTo?: string | undefined; }[]; databases: { defaultDatabase: string; data: { key: string; label: string; url: string; enabled: boolean; }[]; }; nmrLoaders: { general: { dataSelection?: "both" | "ft" | "fid" | "preferFT" | "preferFID" | undefined; keep1D?: boolean | undefined; keep2D?: boolean | undefined; onlyReal?: boolean | undefined; }; bruker: { processingNumbers?: string | undefined; experimentNumbers?: string | undefined; onlyFirstProcessedData?: boolean | undefined; }; }; infoBlock: { visible: boolean; fields: { format: string; jpath: string; visible: boolean; label: string; uuid: string; }[]; nameStyle?: { fill?: string | undefined; fontSize?: string | undefined; fontStyle?: "normal" | "italic" | undefined; fontWeight?: "bold" | "normal" | undefined; } | undefined; valueStyle?: { fill?: string | undefined; fontSize?: string | undefined; fontStyle?: "normal" | "italic" | undefined; fontWeight?: "bold" | "normal" | undefined; } | undefined; }; onLoadProcessing: { autoProcessing: boolean; filters?: Record | undefined; }; spectraColors: { highlightColor: string; indicatorLineColor: string; oneDimension: { jpath: string; value: string; color: string; uuid: string; }[]; twoDimensions: { jpath: string; value: string; positiveColor: string; negativeColor: string; uuid: string; }[]; }; externalAPIs: { key: "CT"; serverLink: string; APIKey: string; uuid: string; }[]; export: { png: { size: "Letter" | "Legal" | "Tabloid" | "Executive" | "Statement" | "Folio" | "A3" | "A4" | "A5" | "B4" | "B5"; layout: "portrait" | "landscape"; useDefaultSettings: boolean; dpi: string; mode: "basic"; } | { width: string; height: string; unit: "in" | "ft" | "m" | "px" | "yd" | "cm" | "mm" | "pt" | "pc"; useDefaultSettings: boolean; dpi: string; mode: "advance"; }; svg: { size: "Letter" | "Legal" | "Tabloid" | "Executive" | "Statement" | "Folio" | "A3" | "A4" | "A5" | "B4" | "B5"; layout: "portrait" | "landscape"; useDefaultSettings: boolean; dpi: string; mode: "basic"; } | { width: string; height: string; unit: "in" | "ft" | "m" | "px" | "yd" | "cm" | "mm" | "pt" | "pc"; useDefaultSettings: boolean; dpi: string; mode: "advance"; }; clipboard: { size: "Letter" | "Legal" | "Tabloid" | "Executive" | "Statement" | "Folio" | "A3" | "A4" | "A5" | "B4" | "B5"; layout: "portrait" | "landscape"; useDefaultSettings: boolean; dpi: string; mode: "basic"; } | { width: string; height: string; unit: "in" | "ft" | "m" | "px" | "yd" | "cm" | "mm" | "pt" | "pc"; useDefaultSettings: boolean; dpi: string; mode: "advance"; }; }; peaksLabel: { marginTop: unknown; }; }; export declare function unsafeWorkspaceToForm(potentialUnsafeWorkspace: WorkspaceWithSource, logger?: FifoLogger): { display: { general?: { experimentalFeatures?: { display: boolean; visible: boolean; open?: boolean | undefined; } | undefined; hidePanelsBar?: boolean | undefined; } | undefined; panels?: { spectraPanel: "undefined" | "active" | "hidden" | "open" | "available"; informationPanel: "undefined" | "active" | "hidden" | "open" | "available"; peaksPanel: "undefined" | "active" | "hidden" | "open" | "available"; integralsPanel: "undefined" | "active" | "hidden" | "open" | "available"; rangesPanel: "undefined" | "active" | "hidden" | "open" | "available"; structuresPanel: "undefined" | "active" | "hidden" | "open" | "available"; processingsPanel: "undefined" | "active" | "hidden" | "open" | "available"; zonesPanel: "undefined" | "active" | "hidden" | "open" | "available"; summaryPanel: "undefined" | "active" | "hidden" | "open" | "available"; multipleSpectraAnalysisPanel: "undefined" | "active" | "hidden" | "open" | "available"; databasePanel: "undefined" | "active" | "hidden" | "open" | "available"; predictionPanel: "undefined" | "active" | "hidden" | "open" | "available"; automaticAssignmentPanel: "undefined" | "active" | "hidden" | "open" | "available"; matrixGenerationPanel: "undefined" | "active" | "hidden" | "open" | "available"; simulationPanel: "undefined" | "active" | "hidden" | "open" | "available"; } | undefined; toolBarButtons?: { zoom?: boolean | undefined; zoomOut?: boolean | undefined; import?: boolean | undefined; exportAs?: boolean | undefined; spectraStackAlignments?: boolean | undefined; spectraCenterAlignments?: boolean | undefined; realImaginary?: boolean | undefined; peakPicking?: boolean | undefined; integral?: boolean | undefined; zonePicking?: boolean | undefined; slicing?: boolean | undefined; rangePicking?: boolean | undefined; zeroFilling?: boolean | undefined; zeroFillingDimension1?: boolean | undefined; zeroFillingDimension2?: boolean | undefined; apodization?: boolean | undefined; apodizationDimension1?: boolean | undefined; apodizationDimension2?: boolean | undefined; phaseCorrection?: boolean | undefined; phaseCorrectionTwoDimensions?: boolean | undefined; baselineCorrection?: boolean | undefined; fft?: boolean | undefined; fftDimension1?: boolean | undefined; fftDimension2?: boolean | undefined; multipleSpectraAnalysis?: boolean | undefined; exclusionZones?: boolean | undefined; autoRangeAndZonePicking?: boolean | undefined; inset?: boolean | undefined; } | undefined; }; general: { dimmedSpectraOpacity: unknown; invert: boolean; invertScroll: boolean; spectraRendering: "auto" | "crispEdges" | "geometricPrecision" | "optimizeSpeed"; popupLoggingLevel?: "error" | "info" | "fatal" | "warn" | "debug" | "trace" | "silent" | undefined; loggingLevel?: "error" | "info" | "fatal" | "warn" | "debug" | "trace" | "silent" | undefined; }; nuclei: { nucleus: string; ppmFormat: string; hzFormat: string; uuid: string; axisFrom?: string | undefined; axisTo?: string | undefined; }[]; databases: { defaultDatabase: string; data: { key: string; label: string; url: string; enabled: boolean; }[]; }; nmrLoaders: { general: { dataSelection?: "both" | "ft" | "fid" | "preferFT" | "preferFID" | undefined; keep1D?: boolean | undefined; keep2D?: boolean | undefined; onlyReal?: boolean | undefined; }; bruker: { processingNumbers?: string | undefined; experimentNumbers?: string | undefined; onlyFirstProcessedData?: boolean | undefined; }; }; infoBlock: { visible: boolean; fields: { format: string; jpath: string; visible: boolean; label: string; uuid: string; }[]; nameStyle?: { fill?: string | undefined; fontSize?: string | undefined; fontStyle?: "normal" | "italic" | undefined; fontWeight?: "bold" | "normal" | undefined; } | undefined; valueStyle?: { fill?: string | undefined; fontSize?: string | undefined; fontStyle?: "normal" | "italic" | undefined; fontWeight?: "bold" | "normal" | undefined; } | undefined; }; onLoadProcessing: { autoProcessing: boolean; filters?: Record | undefined; }; spectraColors: { highlightColor: string; indicatorLineColor: string; oneDimension: { jpath: string; value: string; color: string; uuid: string; }[]; twoDimensions: { jpath: string; value: string; positiveColor: string; negativeColor: string; uuid: string; }[]; }; externalAPIs: { key: "CT"; serverLink: string; APIKey: string; uuid: string; }[]; export: { png: { size: "Letter" | "Legal" | "Tabloid" | "Executive" | "Statement" | "Folio" | "A3" | "A4" | "A5" | "B4" | "B5"; layout: "portrait" | "landscape"; useDefaultSettings: boolean; dpi: string; mode: "basic"; } | { width: string; height: string; unit: "in" | "ft" | "m" | "px" | "yd" | "cm" | "mm" | "pt" | "pc"; useDefaultSettings: boolean; dpi: string; mode: "advance"; }; svg: { size: "Letter" | "Legal" | "Tabloid" | "Executive" | "Statement" | "Folio" | "A3" | "A4" | "A5" | "B4" | "B5"; layout: "portrait" | "landscape"; useDefaultSettings: boolean; dpi: string; mode: "basic"; } | { width: string; height: string; unit: "in" | "ft" | "m" | "px" | "yd" | "cm" | "mm" | "pt" | "pc"; useDefaultSettings: boolean; dpi: string; mode: "advance"; }; clipboard: { size: "Letter" | "Legal" | "Tabloid" | "Executive" | "Statement" | "Folio" | "A3" | "A4" | "A5" | "B4" | "B5"; layout: "portrait" | "landscape"; useDefaultSettings: boolean; dpi: string; mode: "basic"; } | { width: string; height: string; unit: "in" | "ft" | "m" | "px" | "yd" | "cm" | "mm" | "pt" | "pc"; useDefaultSettings: boolean; dpi: string; mode: "advance"; }; }; peaksLabel: { marginTop: unknown; }; }; export declare function formValueToWorkspace(value: z.input, baseValue: WorkspaceWithSource): WorkspaceWithSource; //# sourceMappingURL=use_safe_workspace.d.ts.map