nmrium 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/BrushTracker1D.d.ts.map +1 -1
- package/lib/component/1d/BrushTracker1D.js +5 -2
- package/lib/component/1d/BrushTracker1D.js.map +1 -1
- package/lib/component/1d/FloatPublicationString.d.ts.map +1 -1
- package/lib/component/1d/FloatPublicationString.js +28 -24
- package/lib/component/1d/FloatPublicationString.js.map +1 -1
- package/lib/component/1d/plugin_chart_brush_tracker.d.ts.map +1 -1
- package/lib/component/1d/plugin_chart_brush_tracker.js +2 -1
- package/lib/component/1d/plugin_chart_brush_tracker.js.map +1 -1
- package/lib/component/1d/plugin_svg_chart.d.ts.map +1 -1
- package/lib/component/1d/plugin_svg_chart.js +15 -2
- package/lib/component/1d/plugin_svg_chart.js.map +1 -1
- package/lib/component/1d/ranges/FloatingRanges.js +2 -2
- package/lib/component/1d/ranges/FloatingRanges.js.map +1 -1
- package/lib/component/1d/ranges/Range.d.ts.map +1 -1
- package/lib/component/1d/ranges/Range.js +1 -1
- package/lib/component/1d/ranges/Range.js.map +1 -1
- package/lib/component/1d-2d/FieldEdition.d.ts +2 -1
- package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
- package/lib/component/1d-2d/FieldEdition.js +3 -3
- package/lib/component/1d-2d/FieldEdition.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +3 -3
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js +2 -1
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +2 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js.map +1 -1
- package/lib/component/2d/BrushTracker2D.d.ts.map +1 -1
- package/lib/component/2d/BrushTracker2D.js +5 -1
- package/lib/component/2d/BrushTracker2D.js.map +1 -1
- package/lib/component/2d/SVGContent2D.d.ts.map +1 -1
- package/lib/component/2d/SVGContent2D.js +2 -1
- package/lib/component/2d/SVGContent2D.js.map +1 -1
- package/lib/component/2d/SignalDeltaLine.d.ts +3 -0
- package/lib/component/2d/SignalDeltaLine.d.ts.map +1 -1
- package/lib/component/2d/SignalDeltaLine.js +3 -4
- package/lib/component/2d/SignalDeltaLine.js.map +1 -1
- package/lib/component/2d/linked-signals/LinkedSignal.d.ts +7 -0
- package/lib/component/2d/linked-signals/LinkedSignal.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignal.js +42 -0
- package/lib/component/2d/linked-signals/LinkedSignal.js.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.d.ts +8 -0
- package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.js +152 -0
- package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.js.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignals.d.ts +2 -0
- package/lib/component/2d/linked-signals/LinkedSignals.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignals.js +32 -0
- package/lib/component/2d/linked-signals/LinkedSignals.js.map +1 -0
- package/lib/component/2d/linked-signals/SignalCrossingIndicator.d.ts +3 -0
- package/lib/component/2d/linked-signals/SignalCrossingIndicator.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/SignalCrossingIndicator.js +36 -0
- package/lib/component/2d/linked-signals/SignalCrossingIndicator.js.map +1 -0
- package/lib/component/2d/linked-signals/useClassifyCorrelation.d.ts +5 -0
- package/lib/component/2d/linked-signals/useClassifyCorrelation.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/useClassifyCorrelation.js +16 -0
- package/lib/component/2d/linked-signals/useClassifyCorrelation.js.map +1 -0
- package/lib/component/2d/linked-signals/useNearestSignalCrossing.d.ts +13 -0
- package/lib/component/2d/linked-signals/useNearestSignalCrossing.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/useNearestSignalCrossing.js +41 -0
- package/lib/component/2d/linked-signals/useNearestSignalCrossing.js.map +1 -0
- package/lib/component/2d/linked-signals/utilities/getCorrelationColor.d.ts +5 -0
- package/lib/component/2d/linked-signals/utilities/getCorrelationColor.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/utilities/getCorrelationColor.js +31 -0
- package/lib/component/2d/linked-signals/utilities/getCorrelationColor.js.map +1 -0
- package/lib/component/2d/linked-signals/utilities/getCouplingLength.d.ts +3 -0
- package/lib/component/2d/linked-signals/utilities/getCouplingLength.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/utilities/getCouplingLength.js +41 -0
- package/lib/component/2d/linked-signals/utilities/getCouplingLength.js.map +1 -0
- package/lib/component/2d/linked-signals/utilities/signalCrossings.d.ts +45 -0
- package/lib/component/2d/linked-signals/utilities/signalCrossings.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/utilities/signalCrossings.js +73 -0
- package/lib/component/2d/linked-signals/utilities/signalCrossings.js.map +1 -0
- package/lib/component/2d/utilities/extractSpectrumSignals.d.ts +5 -0
- package/lib/component/2d/utilities/extractSpectrumSignals.d.ts.map +1 -1
- package/lib/component/2d/utilities/extractSpectrumSignals.js +15 -0
- package/lib/component/2d/utilities/extractSpectrumSignals.js.map +1 -1
- package/lib/component/2d/utilities/useAssignmentLabelLinkPath.d.ts +17 -0
- package/lib/component/2d/utilities/useAssignmentLabelLinkPath.d.ts.map +1 -0
- package/lib/component/2d/utilities/useAssignmentLabelLinkPath.js +99 -0
- package/lib/component/2d/utilities/useAssignmentLabelLinkPath.js.map +1 -0
- package/lib/component/2d/zones/SignalsGuideLines.d.ts.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +3 -2
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/Zone.d.ts.map +1 -1
- package/lib/component/2d/zones/Zone.js +47 -1
- package/lib/component/2d/zones/Zone.js.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.d.ts.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js +4 -148
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +101 -16
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +6 -0
- package/lib/component/EventsTrackers/KeysListenerTracker.js.map +1 -1
- package/lib/component/EventsTrackers/brush_tracker.types.d.ts +40 -0
- package/lib/component/EventsTrackers/brush_tracker.types.d.ts.map +1 -1
- package/lib/component/EventsTrackers/brush_tracker_drag_gesture.d.ts +42 -0
- package/lib/component/EventsTrackers/brush_tracker_drag_gesture.d.ts.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker_drag_gesture.js +46 -0
- package/lib/component/EventsTrackers/brush_tracker_drag_gesture.js.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts +1 -1
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts.map +1 -1
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.js.map +1 -1
- package/lib/component/context/DispatchContext.d.ts +2 -1
- package/lib/component/context/DispatchContext.d.ts.map +1 -1
- package/lib/component/context/DispatchContext.js.map +1 -1
- package/lib/component/context/processings_mutations_context.api.d.ts.map +1 -1
- package/lib/component/context/processings_mutations_context.api.js +5 -2
- package/lib/component/context/processings_mutations_context.api.js.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.d.ts +1 -0
- package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.js +14 -6
- package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
- package/lib/component/elements/export/ExportContent.js +1 -1
- package/lib/component/elements/export/ExportContent.js.map +1 -1
- package/lib/component/elements/print/PrintContent.js +1 -1
- package/lib/component/elements/print/PrintContent.js.map +1 -1
- package/lib/component/elements/tanstack_table/elements/table_row.d.ts.map +1 -1
- package/lib/component/elements/tanstack_table/elements/table_row.js +2 -2
- package/lib/component/elements/tanstack_table/elements/table_row.js.map +1 -1
- package/lib/component/elements/tanstack_table/table.d.ts.map +1 -1
- package/lib/component/elements/tanstack_table/table.js +2 -1
- package/lib/component/elements/tanstack_table/table.js.map +1 -1
- package/lib/component/elements/tanstack_table/types.d.ts +2 -0
- package/lib/component/elements/tanstack_table/types.d.ts.map +1 -1
- package/lib/component/highlight/index.d.ts +2 -0
- package/lib/component/highlight/index.d.ts.map +1 -1
- package/lib/component/highlight/index.js.map +1 -1
- package/lib/component/hooks/usePanelPreferences.d.ts +2 -2
- package/lib/component/hooks/usePanelPreferences.d.ts.map +1 -1
- package/lib/component/hooks/usePanelPreferences.js +5 -1
- package/lib/component/hooks/usePanelPreferences.js.map +1 -1
- package/lib/component/hooks/useToolsFunctions.d.ts.map +1 -1
- package/lib/component/hooks/useToolsFunctions.js +8 -5
- package/lib/component/hooks/useToolsFunctions.js.map +1 -1
- package/lib/component/hooks/use_publication_strings.d.ts +3 -1
- package/lib/component/hooks/use_publication_strings.d.ts.map +1 -1
- package/lib/component/hooks/use_publication_strings.js +10 -6
- package/lib/component/hooks/use_publication_strings.js.map +1 -1
- package/lib/component/modal/PredictSpectraModal.d.ts.map +1 -1
- package/lib/component/modal/PredictSpectraModal.js +5 -2
- package/lib/component/modal/PredictSpectraModal.js.map +1 -1
- package/lib/component/modal/PredictionLimitModal.d.ts +10 -0
- package/lib/component/modal/PredictionLimitModal.d.ts.map +1 -0
- package/lib/component/modal/PredictionLimitModal.js +31 -0
- package/lib/component/modal/PredictionLimitModal.js.map +1 -0
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +24 -0
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +24 -0
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +24 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +2 -0
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.js +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.js +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.d.ts +11 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.js +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.d.ts +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.js +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +2 -2
- package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +5 -5
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js +11 -9
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js +7 -2
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts +3 -0
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js +31 -17
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.d.ts +18 -0
- package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.js +113 -0
- package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.d.ts +11 -0
- package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.js +28 -0
- package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.js.map +1 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraPanelHeader.js +1 -1
- package/lib/component/panels/SpectraPanel/SpectraPanelHeader.js.map +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.js +40 -4
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.js.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +17 -5
- package/lib/component/panels/ZonesPanel/ZonesPanel.js.map +1 -1
- package/lib/component/panels/accordionItems.d.ts.map +1 -1
- package/lib/component/panels/accordionItems.js +7 -0
- package/lib/component/panels/accordionItems.js.map +1 -1
- package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.d.ts +2 -0
- package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.js +136 -0
- package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.js.map +1 -0
- package/lib/component/panels/assignment-summary/AssignmentsExportModal.d.ts +10 -0
- package/lib/component/panels/assignment-summary/AssignmentsExportModal.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/AssignmentsExportModal.js +128 -0
- package/lib/component/panels/assignment-summary/AssignmentsExportModal.js.map +1 -0
- package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.d.ts +11 -0
- package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.js +113 -0
- package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.js.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.d.ts +8 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.js +16 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.js.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.d.ts +7 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.js +22 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.js.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.d.ts +7 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.js +5 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.js.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.d.ts +9 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.js +10 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.d.ts +54 -0
- package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.js +161 -0
- package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/exportAssignments.d.ts +19 -0
- package/lib/component/panels/assignment-summary/utilities/exportAssignments.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/exportAssignments.js +74 -0
- package/lib/component/panels/assignment-summary/utilities/exportAssignments.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.d.ts +7 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.js +28 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.d.ts +12 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.js +14 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.d.ts +9 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.js +23 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.d.ts +7 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.js +41 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.d.ts +18 -0
- package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.js +121 -0
- package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.d.ts +16 -0
- package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.js +53 -0
- package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/types.d.ts +39 -0
- package/lib/component/panels/assignment-summary/utilities/types.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/types.js +2 -0
- package/lib/component/panels/assignment-summary/utilities/types.js.map +1 -0
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings/operator_edit_banner.d.ts +6 -0
- package/lib/component/panels/filtersPanel/processings/operator_edit_banner.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/processings/operator_edit_banner.js +2 -2
- package/lib/component/panels/filtersPanel/processings/operator_edit_banner.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings/processing_item.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/processings/processing_item.js +1 -1
- package/lib/component/panels/filtersPanel/processings/processing_item.js.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +4 -2
- package/lib/component/panels/predictionPanel/PredictionPanel.js.map +1 -1
- package/lib/component/reducer/Reducer.d.ts.map +1 -1
- package/lib/component/reducer/Reducer.js +14 -2
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js +5 -2
- package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
- package/lib/component/reducer/actions/LinkedSignalsActions.d.ts +29 -0
- package/lib/component/reducer/actions/LinkedSignalsActions.d.ts.map +1 -0
- package/lib/component/reducer/actions/LinkedSignalsActions.js +62 -0
- package/lib/component/reducer/actions/LinkedSignalsActions.js.map +1 -0
- package/lib/component/reducer/actions/MoleculeActions.d.ts +7 -28
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +78 -10
- package/lib/component/reducer/actions/MoleculeActions.js.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +2 -8
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +3 -43
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +10 -0
- package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.d.ts +16 -2
- package/lib/component/reducer/actions/ZonesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +57 -14
- package/lib/component/reducer/actions/ZonesActions.js.map +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +19 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts.map +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +19 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +3 -2
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +4 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts.map +1 -1
- package/lib/component/toolbar/ToolTypes.js +15 -0
- package/lib/component/toolbar/ToolTypes.js.map +1 -1
- package/lib/component/toolbar/nmr_toolbar.d.ts.map +1 -1
- package/lib/component/toolbar/nmr_toolbar.js +15 -7
- package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js +62 -4
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js.map +1 -1
- package/lib/component/utility/core_slots/core_operator_chart_svg.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_chart_svg.js +2 -2
- package/lib/component/utility/core_slots/core_operator_chart_svg.js.map +1 -1
- package/lib/component/workspaces/assignment.d.ts.map +1 -1
- package/lib/component/workspaces/assignment.js +5 -3
- package/lib/component/workspaces/assignment.js.map +1 -1
- package/lib/component/workspaces/basic.d.ts.map +1 -1
- package/lib/component/workspaces/basic.js +7 -5
- package/lib/component/workspaces/basic.js.map +1 -1
- package/lib/component/workspaces/embedded.d.ts.map +1 -1
- package/lib/component/workspaces/embedded.js +1 -0
- package/lib/component/workspaces/embedded.js.map +1 -1
- package/lib/component/workspaces/prediction.d.ts.map +1 -1
- package/lib/component/workspaces/prediction.js +1 -0
- package/lib/component/workspaces/prediction.js.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +2 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
- package/lib/data/PredictionManager.d.ts +5 -0
- package/lib/data/PredictionManager.d.ts.map +1 -1
- package/lib/data/PredictionManager.js +11 -1
- package/lib/data/PredictionManager.js.map +1 -1
- package/lib/data/constants/Multiplets.js +2 -2
- package/lib/data/constants/Multiplets.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -0
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +9 -10
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js.map +1 -1
- package/lib/data/molecules/Molecule.d.ts +1 -0
- package/lib/data/molecules/Molecule.d.ts.map +1 -1
- package/lib/data/molecules/Molecule.js +18 -3
- package/lib/data/molecules/Molecule.js.map +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +5 -2
- package/lib/data/molecules/MoleculeManager.d.ts.map +1 -1
- package/lib/data/molecules/MoleculeManager.js +10 -7
- package/lib/data/molecules/MoleculeManager.js.map +1 -1
- package/lib/utils/clipboard/clipboardHooks.d.ts +3 -1
- package/lib/utils/clipboard/clipboardHooks.d.ts.map +1 -1
- package/lib/utils/clipboard/clipboardHooks.js +15 -9
- package/lib/utils/clipboard/clipboardHooks.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +48 -48
- package/src/component/1d/BrushTracker1D.tsx +5 -2
- package/src/component/1d/FloatPublicationString.tsx +39 -33
- package/src/component/1d/plugin_chart_brush_tracker.tsx +2 -0
- package/src/component/1d/plugin_svg_chart.tsx +20 -1
- package/src/component/1d/ranges/FloatingRanges.tsx +2 -2
- package/src/component/1d/ranges/Range.tsx +1 -2
- package/src/component/1d-2d/FieldEdition.tsx +14 -4
- package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +3 -3
- package/src/component/2d/1d-tracer/HorizontalSliceChart.tsx +6 -1
- package/src/component/2d/1d-tracer/VerticalSliceChart.tsx +6 -1
- package/src/component/2d/BrushTracker2D.tsx +7 -1
- package/src/component/2d/SVGContent2D.tsx +2 -0
- package/src/component/2d/SignalDeltaLine.tsx +8 -2
- package/src/component/2d/linked-signals/LinkedSignal.tsx +68 -0
- package/src/component/2d/linked-signals/LinkedSignalAssignmentLabel.tsx +248 -0
- package/src/component/2d/linked-signals/LinkedSignals.tsx +56 -0
- package/src/component/2d/linked-signals/SignalCrossingIndicator.tsx +63 -0
- package/src/component/2d/linked-signals/useClassifyCorrelation.ts +24 -0
- package/src/component/2d/linked-signals/useNearestSignalCrossing.ts +68 -0
- package/src/component/2d/linked-signals/utilities/getCorrelationColor.ts +46 -0
- package/src/component/2d/linked-signals/utilities/getCouplingLength.ts +58 -0
- package/src/component/2d/linked-signals/utilities/signalCrossings.ts +167 -0
- package/src/component/2d/utilities/extractSpectrumSignals.ts +22 -0
- package/src/component/2d/utilities/useAssignmentLabelLinkPath.ts +138 -0
- package/src/component/2d/zones/SignalsGuideLines.tsx +9 -2
- package/src/component/2d/zones/Zone.tsx +58 -1
- package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +5 -198
- package/src/component/EventsTrackers/BrushTracker.tsx +135 -25
- package/src/component/EventsTrackers/KeysListenerTracker.tsx +6 -0
- package/src/component/EventsTrackers/brush_tracker.types.ts +43 -0
- package/src/component/EventsTrackers/brush_tracker_drag_gesture.ts +84 -0
- package/src/component/EventsTrackers/brush_tracker_events_listeners.ts +7 -1
- package/src/component/context/DispatchContext.tsx +2 -0
- package/src/component/context/processings_mutations_context.api.ts +6 -2
- package/src/component/elements/ActionsButtonsPopover.tsx +22 -3
- package/src/component/elements/export/ExportContent.tsx +1 -0
- package/src/component/elements/print/PrintContent.tsx +1 -0
- package/src/component/elements/tanstack_table/elements/table_row.tsx +5 -1
- package/src/component/elements/tanstack_table/table.tsx +2 -0
- package/src/component/elements/tanstack_table/types.ts +2 -0
- package/src/component/highlight/index.tsx +2 -0
- package/src/component/hooks/usePanelPreferences.ts +15 -5
- package/src/component/hooks/useToolsFunctions.ts +8 -4
- package/src/component/hooks/use_publication_strings.ts +19 -7
- package/src/component/modal/PredictSpectraModal.tsx +8 -2
- package/src/component/modal/PredictionLimitModal.tsx +88 -0
- package/src/component/modal/editRange/forms/validation/EditRangeValidation.ts +1 -1
- package/src/component/modal/setting/tanstack_general_settings/tabs/panels_tab.tsx +6 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/tools_tab.tsx +3 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.ts +1 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.ts +1 -0
- package/src/component/panels/IntegralsPanel/IntegralTable.tsx +2 -2
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +7 -5
- package/src/component/panels/MoleculesPanel/MoleculeStructure.tsx +14 -12
- package/src/component/panels/MoleculesPanel/hooks/useAtomAssignment.tsx +12 -2
- package/src/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.ts +57 -20
- package/src/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.ts +191 -0
- package/src/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.ts +29 -0
- package/src/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.tsx +2 -2
- package/src/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.tsx +2 -2
- package/src/component/panels/SpectraPanel/SpectraPanelHeader.tsx +1 -1
- package/src/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.tsx +3 -3
- package/src/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.tsx +57 -4
- package/src/component/panels/ZonesPanel/ZonesPanel.tsx +19 -8
- package/src/component/panels/accordionItems.tsx +7 -0
- package/src/component/panels/assignment-summary/AssignmentSummaryPanel.tsx +263 -0
- package/src/component/panels/assignment-summary/AssignmentsExportModal.tsx +249 -0
- package/src/component/panels/assignment-summary/MoleculeAssignmentTable.tsx +223 -0
- package/src/component/panels/assignment-summary/table-cells/AssignmentAtomCell.tsx +36 -0
- package/src/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.tsx +57 -0
- package/src/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.tsx +23 -0
- package/src/component/panels/assignment-summary/table-cells/AssignmentLabelCell.tsx +16 -0
- package/src/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.ts +254 -0
- package/src/component/panels/assignment-summary/utilities/exportAssignments.ts +135 -0
- package/src/component/panels/assignment-summary/utilities/formatAssignmentACS.ts +35 -0
- package/src/component/panels/assignment-summary/utilities/formatAssignmentShifts.ts +26 -0
- package/src/component/panels/assignment-summary/utilities/getAssignedAtomCounts.ts +32 -0
- package/src/component/panels/assignment-summary/utilities/getAssignmentSignals.ts +55 -0
- package/src/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.ts +175 -0
- package/src/component/panels/assignment-summary/utilities/getSignalsByNucleus.ts +60 -0
- package/src/component/panels/assignment-summary/utilities/types.ts +47 -0
- package/src/component/panels/extra/utilities/MultiplicityUtilities.ts +2 -2
- package/src/component/panels/filtersPanel/processings/operator_edit_banner.tsx +8 -1
- package/src/component/panels/filtersPanel/processings/processing_item.tsx +2 -1
- package/src/component/panels/predictionPanel/PredictionPanel.tsx +6 -2
- package/src/component/reducer/Reducer.ts +23 -5
- package/src/component/reducer/actions/FiltersActions.ts +6 -2
- package/src/component/reducer/actions/LinkedSignalsActions.ts +128 -0
- package/src/component/reducer/actions/MoleculeActions.ts +139 -11
- package/src/component/reducer/actions/RangesActions.ts +3 -85
- package/src/component/reducer/actions/ToolsActions.ts +13 -0
- package/src/component/reducer/actions/ZonesActions.ts +95 -13
- package/src/component/reducer/helper/ZoomHistoryManager.ts +41 -1
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +7 -0
- package/src/component/toolbar/ToolTypes.ts +15 -0
- package/src/component/toolbar/nmr_toolbar.tsx +17 -21
- package/src/component/utility/core_slots/core_operator_chart_brush.commons.ts +99 -3
- package/src/component/utility/core_slots/core_operator_chart_svg.tsx +4 -0
- package/src/component/workspaces/assignment.ts +5 -3
- package/src/component/workspaces/basic.ts +7 -5
- package/src/component/workspaces/embedded.ts +1 -0
- package/src/component/workspaces/prediction.ts +1 -0
- package/src/component/workspaces/workspaceDefaultProperties.ts +2 -0
- package/src/data/PredictionManager.ts +11 -1
- package/src/data/constants/Multiplets.ts +2 -2
- package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +1 -0
- package/src/data/data2d/Spectrum2D/zones/detectZonesManual.ts +1 -1
- package/src/data/data2d/Spectrum2D/zones/getDetectionZones.ts +7 -8
- package/src/data/molecules/Molecule.ts +22 -6
- package/src/data/molecules/MoleculeManager.ts +11 -9
- package/src/utils/clipboard/clipboardHooks.ts +19 -16
- package/src/versionInfo.ts +1 -1
- package/lib/utils/clipboard/clipboard.d.ts +0 -15
- package/lib/utils/clipboard/clipboard.d.ts.map +0 -1
- package/lib/utils/clipboard/clipboard.js +0 -19
- package/lib/utils/clipboard/clipboard.js.map +0 -1
- package/src/utils/clipboard/clipboard.ts +0 -36
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from 'react';
|
|
2
|
-
import { newClipboardItem, read, readText, write, writeText, } from './clipboard.js';
|
|
3
2
|
/**
|
|
4
3
|
* Give you a wrapped clipboard api and a shouldFallback state.
|
|
5
4
|
* ignore if read and readText return promise filled with undefined, and rely on shouldFallback to display an alternative interaction.
|
|
@@ -49,7 +48,7 @@ export function useClipboard() {
|
|
|
49
48
|
*/
|
|
50
49
|
async read() {
|
|
51
50
|
try {
|
|
52
|
-
return await read();
|
|
51
|
+
return await navigator.clipboard.read();
|
|
53
52
|
}
|
|
54
53
|
catch {
|
|
55
54
|
setShouldFallback('read');
|
|
@@ -61,7 +60,7 @@ export function useClipboard() {
|
|
|
61
60
|
*/
|
|
62
61
|
async readText() {
|
|
63
62
|
try {
|
|
64
|
-
return await readText();
|
|
63
|
+
return await navigator.clipboard.readText();
|
|
65
64
|
}
|
|
66
65
|
catch {
|
|
67
66
|
setShouldFallback('readText');
|
|
@@ -70,7 +69,7 @@ export function useClipboard() {
|
|
|
70
69
|
},
|
|
71
70
|
async write(data) {
|
|
72
71
|
try {
|
|
73
|
-
return await write(data);
|
|
72
|
+
return await navigator.clipboard.write(data);
|
|
74
73
|
}
|
|
75
74
|
catch {
|
|
76
75
|
const blobs = await Promise.all(data.map((ci) => ci.getType(ci.types[0])));
|
|
@@ -79,20 +78,24 @@ export function useClipboard() {
|
|
|
79
78
|
}
|
|
80
79
|
},
|
|
81
80
|
async rawWriteWithType(data, type = 'text/plain') {
|
|
81
|
+
const text = type === 'text/html' ? htmlToText(data) : data;
|
|
82
82
|
try {
|
|
83
|
-
const
|
|
83
|
+
const blobs = {
|
|
84
84
|
[type]: new Blob([data], { type }),
|
|
85
|
-
}
|
|
86
|
-
|
|
85
|
+
};
|
|
86
|
+
if (type === 'text/html') {
|
|
87
|
+
blobs['text/plain'] = new Blob([text], { type: 'text/plain' });
|
|
88
|
+
}
|
|
89
|
+
return await navigator.clipboard.write([new ClipboardItem(blobs)]);
|
|
87
90
|
}
|
|
88
91
|
catch {
|
|
89
|
-
setText(
|
|
92
|
+
setText(text);
|
|
90
93
|
setShouldFallback('writeText');
|
|
91
94
|
}
|
|
92
95
|
},
|
|
93
96
|
async writeText(data) {
|
|
94
97
|
try {
|
|
95
|
-
return await writeText(data);
|
|
98
|
+
return await navigator.clipboard.writeText(data);
|
|
96
99
|
}
|
|
97
100
|
catch {
|
|
98
101
|
setText(data);
|
|
@@ -108,4 +111,7 @@ export function useClipboard() {
|
|
|
108
111
|
cleanShouldFallback,
|
|
109
112
|
};
|
|
110
113
|
}
|
|
114
|
+
function htmlToText(html) {
|
|
115
|
+
return new DOMParser().parseFromString(html, 'text/html').body.textContent;
|
|
116
|
+
}
|
|
111
117
|
//# sourceMappingURL=clipboardHooks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboardHooks.js","sourceRoot":"","sources":["../../../src/utils/clipboard/clipboardHooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"clipboardHooks.js","sourceRoot":"","sources":["../../../src/utils/clipboard/clipboardHooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAgEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,UAAU,YAAY;IAC1B,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,EAEjD,CAAC;IACJ,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,EAAsB,CAAC;IACvD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,EAAsB,CAAC;IACzD,MAAM,mBAAmB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC3C,iBAAiB,CAAC,SAAS,CAAC,CAAC;QAC7B,OAAO,CAAC,SAAS,CAAC,CAAC;QACnB,QAAQ,CAAC,SAAS,CAAC,CAAC;IACtB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,YAAY,GAAG,OAAO,CAC1B,GAAG,EAAE,CAAC,CAAC;QACL;;WAEG;QACH,KAAK,CAAC,IAAI;YACR,IAAI,CAAC;gBACH,OAAO,MAAM,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;YAC1C,CAAC;YAAC,MAAM,CAAC;gBACP,iBAAiB,CAAC,MAAM,CAAC,CAAC;gBAC1B,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QACD;;WAEG;QACH,KAAK,CAAC,QAAQ;YACZ,IAAI,CAAC;gBACH,OAAO,MAAM,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;YAC9C,CAAC;YAAC,MAAM,CAAC;gBACP,iBAAiB,CAAC,UAAU,CAAC,CAAC;gBAC9B,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QACD,KAAK,CAAC,KAAK,CAAC,IAAoB;YAC9B,IAAI,CAAC;gBACH,OAAO,MAAM,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC/C,CAAC;YAAC,MAAM,CAAC;gBACP,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAC7B,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAC1C,CAAC;gBACF,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAChB,iBAAiB,CAAC,OAAO,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;QACD,KAAK,CAAC,gBAAgB,CAAC,IAAY,EAAE,IAAI,GAAG,YAAY;YACtD,MAAM,IAAI,GAAG,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YAC5D,IAAI,CAAC;gBACH,MAAM,KAAK,GAAyB;oBAClC,CAAC,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC;iBACnC,CAAC;gBACF,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;oBACzB,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;gBACjE,CAAC;gBACD,OAAO,MAAM,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACrE,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,CAAC,IAAI,CAAC,CAAC;gBACd,iBAAiB,CAAC,WAAW,CAAC,CAAC;YACjC,CAAC;QACH,CAAC;QACD,KAAK,CAAC,SAAS,CAAC,IAAY;YAC1B,IAAI,CAAC;gBACH,OAAO,MAAM,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACnD,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,CAAC,IAAI,CAAC,CAAC;gBACd,iBAAiB,CAAC,WAAW,CAAC,CAAC;YACjC,CAAC;QACH,CAAC;KACF,CAAC,EACF,EAAE,CACH,CAAC;IAEF,OAAO;QACL,GAAG,YAAY;QACf,cAAc;QACd,IAAI;QACJ,KAAK;QACL,mBAAmB;KACpB,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;AAC7E,CAAC"}
|
package/lib/versionInfo.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default { version: 'v3.
|
|
1
|
+
export default { version: 'v3.2.0' };
|
|
2
2
|
//# sourceMappingURL=versionInfo.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nmrium",
|
|
3
3
|
"description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.2.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"clean-lib": "rimraf lib",
|
|
27
27
|
"cspell": "cspell lint \"**/*.tsx\"",
|
|
28
28
|
"dev": "vite --host localhost --port 3000 --open",
|
|
29
|
-
"eslint": "eslint . --cache --max-warnings=
|
|
29
|
+
"eslint": "eslint . --cache --max-warnings=56",
|
|
30
30
|
"eslint-fix": "node --run eslint -- --fix",
|
|
31
31
|
"install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start",
|
|
32
32
|
"knip": "knip",
|
|
@@ -62,30 +62,30 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@emotion/react": "^11.14.0",
|
|
64
64
|
"@emotion/styled": "^11.14.1",
|
|
65
|
-
"@hookform/resolvers": "^
|
|
65
|
+
"@hookform/resolvers": "^7.0.7",
|
|
66
66
|
"@tanstack/react-form": "^1.33.5",
|
|
67
67
|
"@tanstack/react-store": "^0.11.2",
|
|
68
|
-
"@tanstack/react-table": "^9.
|
|
69
|
-
"@zakodium/nmr-types": "^0.5.
|
|
70
|
-
"@zakodium/nmrium-core": "^0.7.
|
|
71
|
-
"@zakodium/nmrium-core-plugins": "^0.7.
|
|
68
|
+
"@tanstack/react-table": "^9.3.1",
|
|
69
|
+
"@zakodium/nmr-types": "^0.5.37",
|
|
70
|
+
"@zakodium/nmrium-core": "^0.7.87",
|
|
71
|
+
"@zakodium/nmrium-core-plugins": "^0.7.127",
|
|
72
72
|
"@zakodium/pdnd-esm": "^1.2.0",
|
|
73
|
-
"@zakodium/utils": "^0.
|
|
74
|
-
"@zip.js/zip.js": "^2.
|
|
75
|
-
"cheminfo-font": "^1.
|
|
73
|
+
"@zakodium/utils": "^0.7.0",
|
|
74
|
+
"@zip.js/zip.js": "^2.25.0",
|
|
75
|
+
"cheminfo-font": "^1.29.0",
|
|
76
76
|
"cheminfo-types": "^1.16.0",
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"d3-
|
|
80
|
-
"d3-
|
|
81
|
-
"d3-zoom": "^3.0.0",
|
|
77
|
+
"colord": "^2.14.0",
|
|
78
|
+
"d3-array": "^3.2.5",
|
|
79
|
+
"d3-scale": "^4.0.3",
|
|
80
|
+
"d3-zoom": "^3.0.1",
|
|
82
81
|
"dlv": "^1.1.3",
|
|
83
82
|
"eventemitter3": "^5.0.4",
|
|
83
|
+
"expand-chemical-groups": "^1.0.0",
|
|
84
84
|
"fifo-logger": "^2.0.1",
|
|
85
85
|
"file-collection": "^6.7.0",
|
|
86
86
|
"file-saver": "^2.0.5",
|
|
87
87
|
"get-jpaths": "^1.4.1",
|
|
88
|
-
"immer": "^11.
|
|
88
|
+
"immer": "^11.2.10",
|
|
89
89
|
"lodash": "^4.18.1",
|
|
90
90
|
"mf-parser": "^3.9.3",
|
|
91
91
|
"ml-array-mean": "^2.0.0",
|
|
@@ -96,15 +96,15 @@
|
|
|
96
96
|
"ml-signal-processing": "^2.2.2",
|
|
97
97
|
"ml-spectra-processing": "^14.35.1",
|
|
98
98
|
"ml-tree-similarity": "^2.2.0",
|
|
99
|
-
"nmr-processing": "^22.
|
|
99
|
+
"nmr-processing": "^22.28.3",
|
|
100
100
|
"numeral": "^2.0.6",
|
|
101
|
-
"openchemlib": "^9.
|
|
102
|
-
"openchemlib-utils": "^8.
|
|
103
|
-
"papaparse": "^5.7.
|
|
101
|
+
"openchemlib": "^9.26.0",
|
|
102
|
+
"openchemlib-utils": "^8.20.1",
|
|
103
|
+
"papaparse": "^5.7.1",
|
|
104
104
|
"react-d3-utils": "^3.1.2",
|
|
105
|
-
"react-dropzone": "^20.
|
|
105
|
+
"react-dropzone": "^20.2.0",
|
|
106
106
|
"react-error-boundary": "^6.1.6",
|
|
107
|
-
"react-hook-form": "^7.
|
|
107
|
+
"react-hook-form": "^7.92.0",
|
|
108
108
|
"react-icons": "^5.7.0",
|
|
109
109
|
"react-inspector": "^9.0.0",
|
|
110
110
|
"react-mf": "^3.1.1",
|
|
@@ -112,17 +112,17 @@
|
|
|
112
112
|
"react-ocl-nmr": "^4.1.1",
|
|
113
113
|
"react-plot": "^3.1.2",
|
|
114
114
|
"react-rnd": "^10.5.3",
|
|
115
|
-
"react-science": "^24.
|
|
115
|
+
"react-science": "^24.1.1",
|
|
116
116
|
"smart-array-filter": "^5.0.0",
|
|
117
|
-
"ts-pattern": "^5.9.
|
|
117
|
+
"ts-pattern": "^5.9.2",
|
|
118
118
|
"usehooks-ts": "^3.1.1",
|
|
119
119
|
"yup": "^1.7.1",
|
|
120
|
-
"zod": "^4.6.
|
|
120
|
+
"zod": "^4.6.7"
|
|
121
121
|
},
|
|
122
122
|
"devDependencies": {
|
|
123
|
-
"@blueprintjs/core": "^6.
|
|
124
|
-
"@blueprintjs/icons": "^6.
|
|
125
|
-
"@blueprintjs/select": "^6.4.
|
|
123
|
+
"@blueprintjs/core": "^6.23.0",
|
|
124
|
+
"@blueprintjs/icons": "^6.16.0",
|
|
125
|
+
"@blueprintjs/select": "^6.4.2",
|
|
126
126
|
"@playwright/test": "=1.57.0",
|
|
127
127
|
"@simbathesailor/use-what-changed": "^2.0.0",
|
|
128
128
|
"@types/d3-array": "^3.2.2",
|
|
@@ -130,36 +130,36 @@
|
|
|
130
130
|
"@types/d3-zoom": "^3.0.9",
|
|
131
131
|
"@types/dlv": "^1.1.5",
|
|
132
132
|
"@types/file-saver": "^2.0.7",
|
|
133
|
-
"@types/lodash": "^4.17.
|
|
134
|
-
"@types/node": "^26.6.
|
|
133
|
+
"@types/lodash": "^4.17.27",
|
|
134
|
+
"@types/node": "^26.6.6",
|
|
135
135
|
"@types/numeral": "^2.0.5",
|
|
136
136
|
"@types/papaparse": "^5.5.2",
|
|
137
137
|
"@types/react": "^19.3.0",
|
|
138
138
|
"@types/react-dom": "^19.3.0",
|
|
139
|
-
"@vitejs/plugin-react": "^6.
|
|
140
|
-
"@vitest/coverage-v8": "^5.
|
|
139
|
+
"@vitejs/plugin-react": "^6.3.0",
|
|
140
|
+
"@vitest/coverage-v8": "^5.1.1",
|
|
141
141
|
"@zakodium/tsconfig": "^1.0.5",
|
|
142
142
|
"cross-env": "^10.1.0",
|
|
143
|
-
"cspell": "^10.
|
|
144
|
-
"eslint": "^10.
|
|
145
|
-
"eslint-config-cheminfo-react": "^21.0.
|
|
143
|
+
"cspell": "^10.5.2",
|
|
144
|
+
"eslint": "^10.15.0",
|
|
145
|
+
"eslint-config-cheminfo-react": "^21.0.3",
|
|
146
146
|
"eslint-config-cheminfo-typescript": "^23.0.0",
|
|
147
|
-
"knip": "^6.
|
|
147
|
+
"knip": "^6.45.1",
|
|
148
148
|
"modern-normalize": "^3.0.1",
|
|
149
|
-
"postcss": "^8.5.
|
|
150
|
-
"postcss-styled-syntax": "^0.7.
|
|
151
|
-
"prettier": "^3.
|
|
149
|
+
"postcss": "^8.5.33",
|
|
150
|
+
"postcss-styled-syntax": "^0.7.4",
|
|
151
|
+
"prettier": "^3.10.1",
|
|
152
152
|
"rc-menu": "^9.16.1",
|
|
153
|
-
"react": "^19.3.
|
|
154
|
-
"react-dom": "^19.3.
|
|
155
|
-
"react-router-dom": "^7.18.
|
|
156
|
-
"rimraf": "^6.1.
|
|
157
|
-
"serve": "^14.2.
|
|
158
|
-
"stylelint": "^
|
|
159
|
-
"stylelint-config-standard": "^
|
|
153
|
+
"react": "^19.3.1",
|
|
154
|
+
"react-dom": "^19.3.1",
|
|
155
|
+
"react-router-dom": "^7.18.5",
|
|
156
|
+
"rimraf": "^6.1.4",
|
|
157
|
+
"serve": "^14.2.8",
|
|
158
|
+
"stylelint": "^18.0.0",
|
|
159
|
+
"stylelint-config-standard": "^41.0.0",
|
|
160
160
|
"typescript": "~6.0.3",
|
|
161
|
-
"vite": "^8.3.
|
|
162
|
-
"vitest": "^5.
|
|
161
|
+
"vite": "^8.3.8",
|
|
162
|
+
"vitest": "^5.1.1"
|
|
163
163
|
},
|
|
164
164
|
"volta": {
|
|
165
165
|
"node": "24.21.0"
|
|
@@ -260,9 +260,12 @@ export function BrushTracker1D({ children }: Required<PropsWithChildren>) {
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
const tools = new Set<Tool>(['zoom']);
|
|
263
|
+
// The region zoom is the tool action of the zoom tool, so it follows
|
|
264
|
+
// the `general.invert` preference like the other tools' actions: it
|
|
265
|
+
// is enabled when the primary key is activated (with `invert: false`
|
|
266
|
+
// that means SHIFT + drag, with `invert: true` a plain drag).
|
|
263
267
|
const isDefaultBrushEnabled =
|
|
264
|
-
!tools.has(selectedTool) ||
|
|
265
|
-
(tools.has(selectedTool) && !brushData.shiftKey);
|
|
268
|
+
!tools.has(selectedTool) || (tools.has(selectedTool) && isPrimary);
|
|
266
269
|
|
|
267
270
|
if (!shouldExecuteDefaultAction || selectedTool == null) {
|
|
268
271
|
return;
|
|
@@ -26,6 +26,8 @@ const MARKERS: Record<string, SVGProps<SVGTSpanElement>> = {
|
|
|
26
26
|
'**': { fontStyle: 'italic' },
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
+
const TEXT_PADDING = 10;
|
|
30
|
+
|
|
29
31
|
function getMarker(word: string) {
|
|
30
32
|
return Object.keys(MARKERS).find(
|
|
31
33
|
(marker) => word.startsWith(marker) && word.endsWith(marker),
|
|
@@ -83,10 +85,10 @@ function useWrapSVGText(params: UseWrapSVGTextParams) {
|
|
|
83
85
|
const marker = getMarker(word);
|
|
84
86
|
const cleanWord = marker ? word.replaceAll(marker, '') : word;
|
|
85
87
|
const wordWidth = getTextWidth(cleanWord);
|
|
86
|
-
if (lineWidth + wordWidth > width) {
|
|
88
|
+
if (line.length > 0 && lineWidth + wordWidth > width) {
|
|
87
89
|
lines.push(line);
|
|
88
90
|
line = [word];
|
|
89
|
-
lineWidth = wordWidth;
|
|
91
|
+
lineWidth = wordWidth + spaceWidth;
|
|
90
92
|
} else {
|
|
91
93
|
line.push(word);
|
|
92
94
|
lineWidth += wordWidth + spaceWidth;
|
|
@@ -127,33 +129,21 @@ function useWrapSVGText(params: UseWrapSVGTextParams) {
|
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
interface PublicationTextProps {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
lines: string[][];
|
|
133
|
+
lineHeight: number;
|
|
134
|
+
textStyle: TextStyle & { fontSize: number };
|
|
133
135
|
}
|
|
134
136
|
|
|
135
137
|
function PublicationText(props: PublicationTextProps) {
|
|
136
|
-
const {
|
|
137
|
-
const padding = 10;
|
|
138
|
-
const boxWidth = width - padding * 2;
|
|
139
|
-
|
|
140
|
-
const textStyleWithSize = {
|
|
141
|
-
...textStyle,
|
|
142
|
-
fontSize: textStyle?.fontSize ?? 12,
|
|
143
|
-
};
|
|
144
|
-
const { lineHeight, lines } = useWrapSVGText({
|
|
145
|
-
width: boxWidth,
|
|
146
|
-
style: textStyleWithSize,
|
|
147
|
-
text,
|
|
148
|
-
});
|
|
138
|
+
const { textStyle, lineHeight, lines } = props;
|
|
149
139
|
|
|
150
140
|
return (
|
|
151
|
-
<g transform={`translate(${
|
|
141
|
+
<g transform={`translate(${TEXT_PADDING} ${TEXT_PADDING})`}>
|
|
152
142
|
{lines.map((line, lineIndex) => (
|
|
153
143
|
<SVGStyledText
|
|
154
144
|
// eslint-disable-next-line @eslint-react/no-array-index-key
|
|
155
145
|
key={lineIndex}
|
|
156
|
-
{...
|
|
146
|
+
{...textStyle}
|
|
157
147
|
fontFamily="Arial"
|
|
158
148
|
y={lineIndex * lineHeight}
|
|
159
149
|
dominantBaseline="hanging"
|
|
@@ -165,7 +155,7 @@ function PublicationText(props: PublicationTextProps) {
|
|
|
165
155
|
const props = MARKERS[marker];
|
|
166
156
|
const isBaselineShift = 'baselineShift' in props;
|
|
167
157
|
const fontSize = isBaselineShift
|
|
168
|
-
? Math.floor((5 / 6) *
|
|
158
|
+
? Math.floor((5 / 6) * textStyle.fontSize)
|
|
169
159
|
: undefined;
|
|
170
160
|
|
|
171
161
|
return (
|
|
@@ -176,6 +166,7 @@ function PublicationText(props: PublicationTextProps) {
|
|
|
176
166
|
{...props}
|
|
177
167
|
>
|
|
178
168
|
{word.replaceAll(marker, '')}
|
|
169
|
+
{marker === '**' ? ' ' : ''}
|
|
179
170
|
</tspan>
|
|
180
171
|
);
|
|
181
172
|
}
|
|
@@ -288,6 +279,17 @@ function DraggablePublicationString(props: DraggablePublicationStringProps) {
|
|
|
288
279
|
const { bounding, setBounding, convertToPercent } = useBoundingBox(
|
|
289
280
|
externalBoundingInPercent,
|
|
290
281
|
);
|
|
282
|
+
const textStyle = {
|
|
283
|
+
...acsOptions.textStyle,
|
|
284
|
+
fontSize: acsOptions.textStyle?.fontSize ?? 12,
|
|
285
|
+
};
|
|
286
|
+
const { lines, lineHeight } = useWrapSVGText({
|
|
287
|
+
text: value,
|
|
288
|
+
width: bounding.width - TEXT_PADDING * 2,
|
|
289
|
+
style: textStyle,
|
|
290
|
+
});
|
|
291
|
+
const textHeight = lines.length * lineHeight + TEXT_PADDING * 2;
|
|
292
|
+
const displayHeight = Math.max(bounding.height || 0, textHeight);
|
|
291
293
|
|
|
292
294
|
function handleResize(bounding: Pick<BoundingBox, 'height' | 'width'>) {
|
|
293
295
|
setBounding((prevBounding) => {
|
|
@@ -328,15 +330,15 @@ function DraggablePublicationString(props: DraggablePublicationStringProps) {
|
|
|
328
330
|
|
|
329
331
|
if (!viewerRef || !value) return null;
|
|
330
332
|
|
|
331
|
-
const { width
|
|
333
|
+
const { width = 'auto', x = 0, y = 0 } = bounding;
|
|
332
334
|
|
|
333
335
|
if (isExportProcessStart) {
|
|
334
336
|
return (
|
|
335
337
|
<g transform={`translate(${x} ${y})`}>
|
|
336
338
|
<PublicationText
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
textStyle={
|
|
339
|
+
lines={lines}
|
|
340
|
+
lineHeight={lineHeight}
|
|
341
|
+
textStyle={textStyle}
|
|
340
342
|
/>
|
|
341
343
|
</g>
|
|
342
344
|
);
|
|
@@ -369,10 +371,11 @@ function DraggablePublicationString(props: DraggablePublicationStringProps) {
|
|
|
369
371
|
return (
|
|
370
372
|
<>
|
|
371
373
|
<ReactRnd
|
|
374
|
+
data-testid="publication-string-box"
|
|
372
375
|
position={{ x, y }}
|
|
373
|
-
size={{ width
|
|
376
|
+
size={{ width, height: displayHeight }}
|
|
374
377
|
minWidth={100}
|
|
375
|
-
minHeight={50}
|
|
378
|
+
minHeight={Math.max(50, textHeight)}
|
|
376
379
|
dragHandleClassName="handle"
|
|
377
380
|
enableUserSelectHack={false}
|
|
378
381
|
bounds={`#${viewerRef.id}`}
|
|
@@ -412,14 +415,15 @@ function DraggablePublicationString(props: DraggablePublicationStringProps) {
|
|
|
412
415
|
y={y}
|
|
413
416
|
>
|
|
414
417
|
<svg
|
|
415
|
-
|
|
416
|
-
|
|
418
|
+
data-testid="publication-string"
|
|
419
|
+
width={width}
|
|
420
|
+
height={displayHeight}
|
|
417
421
|
xmlns="http://www.w3.org/2000/svg"
|
|
418
422
|
>
|
|
419
423
|
<PublicationText
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
textStyle={
|
|
424
|
+
lines={lines}
|
|
425
|
+
lineHeight={lineHeight}
|
|
426
|
+
textStyle={textStyle}
|
|
423
427
|
/>
|
|
424
428
|
</svg>
|
|
425
429
|
</ActionsButtonsPopover>
|
|
@@ -467,6 +471,8 @@ export function FloatPublicationString() {
|
|
|
467
471
|
id,
|
|
468
472
|
info: { nucleus },
|
|
469
473
|
} = spectrum;
|
|
474
|
+
const value = publicationString[id];
|
|
475
|
+
if (!value) return null;
|
|
470
476
|
|
|
471
477
|
return (
|
|
472
478
|
<DraggablePublicationString
|
|
@@ -474,7 +480,7 @@ export function FloatPublicationString() {
|
|
|
474
480
|
spectrum={spectrum}
|
|
475
481
|
nucleus={nucleus}
|
|
476
482
|
bounding={publicationStringBounding}
|
|
477
|
-
value={
|
|
483
|
+
value={value}
|
|
478
484
|
/>
|
|
479
485
|
);
|
|
480
486
|
});
|
|
@@ -33,6 +33,7 @@ export function PluginChartBrushTracker() {
|
|
|
33
33
|
if (!operatorUI) return null;
|
|
34
34
|
|
|
35
35
|
const isLiveEditable = operatorUI?.isLiveEditable ?? false;
|
|
36
|
+
const isLivePreview = isLiveEditable && (liveEdit.value?.checked ?? false);
|
|
36
37
|
|
|
37
38
|
return (
|
|
38
39
|
<CoreOperatorChartBrushTracker
|
|
@@ -40,6 +41,7 @@ export function PluginChartBrushTracker() {
|
|
|
40
41
|
operatorUI={operatorUI}
|
|
41
42
|
spectrum={spectrum}
|
|
42
43
|
operation={liveOperation}
|
|
44
|
+
isLivePreview={isLivePreview}
|
|
43
45
|
height={height}
|
|
44
46
|
width={width}
|
|
45
47
|
margin={margin}
|
|
@@ -5,9 +5,11 @@ import { useChartData } from '../context/ChartContext.tsx';
|
|
|
5
5
|
import { useCore } from '../context/CoreContext.tsx';
|
|
6
6
|
import type { ScaleLinearNumberFunction } from '../context/ScaleContext.tsx';
|
|
7
7
|
import { useScaleChecked } from '../context/ScaleContext.tsx';
|
|
8
|
+
import { useProcessingsMutations } from '../context/processings_mutations_context.tsx';
|
|
8
9
|
import { useIndicatorLineColor } from '../hooks/useIndicatorLineColor.ts';
|
|
9
10
|
import useSpectrum from '../hooks/useSpectrum.ts';
|
|
10
11
|
import { useVerticalAlign } from '../hooks/useVerticalAlign.ts';
|
|
12
|
+
import { useLiveEdit } from '../panels/filtersPanel/processings/use_live_edit.ts';
|
|
11
13
|
import { useLiveOperation } from '../panels/filtersPanel/processings/use_live_operation.ts';
|
|
12
14
|
import { CoreOperatorChartSVG } from '../utility/core_slots/core_operator_chart_svg.tsx';
|
|
13
15
|
|
|
@@ -17,7 +19,9 @@ export function PluginSVGChart1D() {
|
|
|
17
19
|
const core = useCore();
|
|
18
20
|
const spectrum = useSpectrum();
|
|
19
21
|
const { height, width, margin } = useChartData();
|
|
20
|
-
const [liveOperation] = useLiveOperation();
|
|
22
|
+
const [liveOperation, setLiveOperation] = useLiveOperation();
|
|
23
|
+
const liveEdit = useLiveEdit(liveOperation?.uid);
|
|
24
|
+
const processingsMutations = useProcessingsMutations();
|
|
21
25
|
const { scaleX: scaleXBuilder } = useScaleChecked();
|
|
22
26
|
const indicatorLineColor = useIndicatorLineColor();
|
|
23
27
|
|
|
@@ -31,12 +35,27 @@ export function PluginSVGChart1D() {
|
|
|
31
35
|
const operatorUI = core.slotOperator(liveOperation.operatorId);
|
|
32
36
|
if (!operatorUI) return null;
|
|
33
37
|
|
|
38
|
+
const isLiveEditable = operatorUI?.isLiveEditable ?? false;
|
|
39
|
+
const isLivePreview = isLiveEditable && (liveEdit.value?.checked ?? false);
|
|
40
|
+
|
|
34
41
|
return (
|
|
35
42
|
<CoreOperatorChartSVG
|
|
36
43
|
core={core}
|
|
37
44
|
operatorUI={operatorUI}
|
|
38
45
|
spectrum={spectrum}
|
|
39
46
|
operation={liveOperation}
|
|
47
|
+
isLivePreview={isLivePreview}
|
|
48
|
+
onChange={(liveOperation) => {
|
|
49
|
+
liveOperation = setLiveOperation(liveOperation);
|
|
50
|
+
|
|
51
|
+
if (!isLiveEditable) return;
|
|
52
|
+
if (!liveEdit.value?.checked) return;
|
|
53
|
+
|
|
54
|
+
void processingsMutations.applyLiveChange(
|
|
55
|
+
liveOperation,
|
|
56
|
+
liveEdit.value?.shouldProcessNext ?? false,
|
|
57
|
+
);
|
|
58
|
+
}}
|
|
40
59
|
height={height}
|
|
41
60
|
width={width}
|
|
42
61
|
margin={margin}
|
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
FloatingRangesTablePreferences,
|
|
7
7
|
} from '@zakodium/nmrium-core';
|
|
8
8
|
import { isSpectrum1D } from '@zakodium/nmrium-core';
|
|
9
|
-
import {
|
|
9
|
+
import { isMultiplicityValid } from 'nmr-processing';
|
|
10
10
|
import { memo, useEffect, useMemo, useState } from 'react';
|
|
11
11
|
import { BsArrowsMove } from 'react-icons/bs';
|
|
12
12
|
import { FaCog, FaLink, FaTimes } from 'react-icons/fa';
|
|
@@ -102,7 +102,7 @@ function buildSignalItem(
|
|
|
102
102
|
js = [],
|
|
103
103
|
diaIDs,
|
|
104
104
|
} = signal;
|
|
105
|
-
const isNotMultiplet = !
|
|
105
|
+
const isNotMultiplet = !isMultiplicityValid(multiplicity, ['m']);
|
|
106
106
|
return {
|
|
107
107
|
id: base.id,
|
|
108
108
|
from: base.from,
|
|
@@ -127,8 +127,7 @@ function Range(options: RangeProps) {
|
|
|
127
127
|
const isSignalAssigned = isRangeAssigned(range);
|
|
128
128
|
const isResizingActive = useResizerStatus('rangePicking');
|
|
129
129
|
const hasOnlyOneSignal = signals.length === 1;
|
|
130
|
-
const isAssigned =
|
|
131
|
-
hasOnlyOneSignal && signal.diaIDs ? signal.diaIDs.length > 0 : false;
|
|
130
|
+
const isAssigned = hasOnlyOneSignal && (signal.diaIDs?.length ?? 0) > 0;
|
|
132
131
|
|
|
133
132
|
const actionsButtons = useAssignmentsPopoverActionsButtons({
|
|
134
133
|
isToggleMultiplicityTreeButtonVisible: !hasOnlyOneSignal,
|
|
@@ -2,7 +2,7 @@ import type { PopoverNextProps } from '@blueprintjs/core';
|
|
|
2
2
|
import { PopoverNext } from '@blueprintjs/core';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import { revalidateLogic } from '@tanstack/react-form';
|
|
5
|
-
import type { ReactNode } from 'react';
|
|
5
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
6
6
|
import { useMemo, useState } from 'react';
|
|
7
7
|
import { AppForm, coerceNumberInput, useForm } from 'react-science/ui';
|
|
8
8
|
import { match } from 'ts-pattern';
|
|
@@ -20,6 +20,7 @@ interface FieldProps {
|
|
|
20
20
|
value: number | string;
|
|
21
21
|
inputType?: InputType;
|
|
22
22
|
onChange: (value: string) => void;
|
|
23
|
+
rightElement?: ReactElement;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
interface FieldEditionsProps extends FieldProps {
|
|
@@ -43,7 +44,16 @@ export function FieldEdition(props: FieldEditionsProps) {
|
|
|
43
44
|
onClose={() => setIsOpen(false)}
|
|
44
45
|
onInteraction={() => setIsOpen(true)}
|
|
45
46
|
content={
|
|
46
|
-
<Field
|
|
47
|
+
<Field
|
|
48
|
+
onChange={handleChange}
|
|
49
|
+
value={value}
|
|
50
|
+
inputType={inputType}
|
|
51
|
+
rightElement={
|
|
52
|
+
props.rightElement && (
|
|
53
|
+
<span onClick={() => setIsOpen(false)}>{props.rightElement}</span>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
/>
|
|
47
57
|
}
|
|
48
58
|
{...PopoverProps}
|
|
49
59
|
>
|
|
@@ -70,7 +80,7 @@ function validationSchema(
|
|
|
70
80
|
}
|
|
71
81
|
|
|
72
82
|
function Field(props: FieldProps) {
|
|
73
|
-
const { value, inputType = 'text', onChange } = props;
|
|
83
|
+
const { value, inputType = 'text', onChange, rightElement } = props;
|
|
74
84
|
|
|
75
85
|
const validation = useMemo(() => {
|
|
76
86
|
return validationSchema(inputType).transform(({ value }) => {
|
|
@@ -99,7 +109,7 @@ function Field(props: FieldProps) {
|
|
|
99
109
|
inputType === 'number' ? (
|
|
100
110
|
<field.NumericInput autoFocus />
|
|
101
111
|
) : (
|
|
102
|
-
<field.Input autoFocus />
|
|
112
|
+
<field.Input autoFocus rightElement={rightElement} />
|
|
103
113
|
)
|
|
104
114
|
}
|
|
105
115
|
</form.AppField>
|
|
@@ -3,8 +3,8 @@ import type { MoleculeView } from '@zakodium/nmrium-core';
|
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
4
|
import { ResponsiveChart } from 'react-d3-utils';
|
|
5
5
|
import { BsArrowsMove } from 'react-icons/bs';
|
|
6
|
-
import { FaRegBookmark, FaTimes } from 'react-icons/fa';
|
|
7
|
-
import { MdFormatColorText
|
|
6
|
+
import { FaHashtag, FaRegBookmark, FaTimes } from 'react-icons/fa';
|
|
7
|
+
import { MdFormatColorText } from 'react-icons/md';
|
|
8
8
|
import { Rnd } from 'react-rnd';
|
|
9
9
|
|
|
10
10
|
import type {
|
|
@@ -135,7 +135,7 @@ export function DraggableStructure(props: DraggableStructureProps) {
|
|
|
135
135
|
elementType: 'separator',
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
|
-
icon: <
|
|
138
|
+
icon: <FaHashtag />,
|
|
139
139
|
title: `${booleanToString(!isActiveAnnotation('atom-numbers'))} atom number`,
|
|
140
140
|
onClick: () => toggleAtomAnnotation('atom-numbers'),
|
|
141
141
|
active: isActiveAnnotation('atom-numbers'),
|
|
@@ -20,7 +20,11 @@ interface UsePathOptions extends BaseProps {
|
|
|
20
20
|
|
|
21
21
|
function usePath(data: NmrData1D, options: UsePathOptions) {
|
|
22
22
|
const { height = 100, verticalMargin = 10 } = options;
|
|
23
|
-
const {
|
|
23
|
+
const {
|
|
24
|
+
mode,
|
|
25
|
+
view: { slicingScaleRatio },
|
|
26
|
+
toolOptions: { selectedTool },
|
|
27
|
+
} = useChartData();
|
|
24
28
|
const scaleX = useScale2DX();
|
|
25
29
|
const spectrum = useSpectrum() as Spectrum2D;
|
|
26
30
|
|
|
@@ -30,6 +34,7 @@ function usePath(data: NmrData1D, options: UsePathOptions) {
|
|
|
30
34
|
|
|
31
35
|
const scaleY = getSliceYScale(spectrum.data, height, mode, {
|
|
32
36
|
margin: verticalMargin,
|
|
37
|
+
scaleRatio: selectedTool === 'slicing' ? slicingScaleRatio : 1,
|
|
33
38
|
});
|
|
34
39
|
|
|
35
40
|
const pathBuilder = new SVGPathBuilder();
|
|
@@ -21,7 +21,11 @@ interface usePathOptions extends BaseProps {
|
|
|
21
21
|
|
|
22
22
|
function usePath(data: NmrData1D, props: usePathOptions) {
|
|
23
23
|
const { reverse, width = 100, horizontalMargin = 10 } = props;
|
|
24
|
-
const {
|
|
24
|
+
const {
|
|
25
|
+
mode,
|
|
26
|
+
view: { slicingScaleRatio },
|
|
27
|
+
toolOptions: { selectedTool },
|
|
28
|
+
} = useChartData();
|
|
25
29
|
const scaleX = useScale2DY({ reverse });
|
|
26
30
|
const spectrum = useSpectrum() as Spectrum2D;
|
|
27
31
|
|
|
@@ -33,6 +37,7 @@ function usePath(data: NmrData1D, props: usePathOptions) {
|
|
|
33
37
|
|
|
34
38
|
const scaleY = getSliceYScale(spectrum.data, width, mode, {
|
|
35
39
|
margin: horizontalMargin,
|
|
40
|
+
scaleRatio: selectedTool === 'slicing' ? slicingScaleRatio : 1,
|
|
36
41
|
});
|
|
37
42
|
|
|
38
43
|
const pathBuilder = new SVGPathBuilder();
|