ketcher-macromolecules 3.23.0-dev.1 → 3.23.0-dev.2

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.
@@ -29,4 +29,4 @@ export declare const getReferencingCustomPresets: (monomer: MonomerItemType, cus
29
29
  export declare const getDeleteConfirmation: (isOnCanvas: boolean, hasReferencingPresets: boolean) => {
30
30
  title: string;
31
31
  confirmationText: string;
32
- } | null;
32
+ } | undefined;
@@ -1,4 +1,4 @@
1
- import { LabeledNodesWithPositionInSequence } from 'ketcher-core';
1
+ import { LabeledNodesWithPositionInSequence, MonomerOrAmbiguousType } from 'ketcher-core';
2
2
  export declare const MULTIPLE_MONOMERS_LABEL = "[multiple]";
3
3
  export declare const DISABLED_MONOMERS_LABEL = "[disabled]";
4
4
  export declare const generateSequenceSelectionGroupNames: (labeledNucleotides?: LabeledNodesWithPositionInSequence[]) => {
@@ -7,3 +7,4 @@ export declare const generateSequenceSelectionGroupNames: (labeledNucleotides?:
7
7
  Phosphates: string;
8
8
  } | undefined;
9
9
  export declare const generateSequenceSelectionName: (labeledNucleoelements: LabeledNodesWithPositionInSequence[]) => string;
10
+ export declare const applyMonomerToSequenceSelection: (sequenceSelection: LabeledNodesWithPositionInSequence[], field: string, groupItem: MonomerOrAmbiguousType, isBaseGroup: boolean) => LabeledNodesWithPositionInSequence[];
@@ -3,5 +3,5 @@ type Props = {
3
3
  idtAliases: IKetIdtAliases | undefined;
4
4
  attachmentPointsToBonds: AttachmentPointsToBonds | undefined;
5
5
  };
6
- declare const useIDTAliasesTextForMonomer: ({ idtAliases, attachmentPointsToBonds, }: Props) => string | null | undefined;
6
+ declare const useIDTAliasesTextForMonomer: ({ idtAliases, attachmentPointsToBonds, }: Props) => string | undefined;
7
7
  export default useIDTAliasesTextForMonomer;
@@ -5,5 +5,5 @@ type Props = {
5
5
  position: PresetPosition;
6
6
  idtAliases: IKetIdtAliases | undefined;
7
7
  };
8
- declare const useIDTAliasesTextForPreset: ({ presetName, position, idtAliases, }: Props) => string | null | undefined;
8
+ declare const useIDTAliasesTextForPreset: ({ presetName, position, idtAliases, }: Props) => string | undefined;
9
9
  export default useIDTAliasesTextForPreset;
@@ -17,6 +17,8 @@ import { CSSProperties } from 'react';
17
17
  export type Option = {
18
18
  id: string;
19
19
  label: string;
20
+ /** i18n key. When present, it overrides `label` as the displayed text. */
21
+ labelKey?: string;
20
22
  };
21
23
  export type DropDownProps = {
22
24
  options: Array<Option>;
@@ -45,7 +45,7 @@ export declare const CUSTOM_PRESETS = "ketcher_custom_presets";
45
45
  export declare const PRESET_PHOSPHATE_FILTER_STORAGE_KEY = "ketcher_preset_phosphate_filter";
46
46
  export declare const SEQUENCE_TYPE_STORAGE_KEY = "ketcher_polymer_sequence_type";
47
47
  export declare const NoNaturalAnalogueGroupCode = "Z";
48
- export declare const NoNaturalAnalogueGroupTitle = "No natural analogue";
48
+ export declare const NoNaturalAnalogueGroupTitle = "macromolecules:library.noNaturalAnalogue";
49
49
  export declare const DNA_TEMPLATE_NAME_PART = "thymine";
50
50
  export declare const RNA_TEMPLATE_NAME_PART = "uracil";
51
51
  export declare const LIBRARY_TAB_INDEX: {
@@ -0,0 +1,8 @@
1
+ import type { TFunction } from 'i18next';
2
+ import type { Option } from '../components/shared/dropDown/dropDown';
3
+ /**
4
+ * Returns a copy of the options where every entry that declares a `labelKey`
5
+ * gets its `label` replaced by the translation. Entries without a `labelKey`
6
+ * are returned as is, so the English `label` remains their fallback.
7
+ */
8
+ export declare const localizeOptions: <T extends Option>(options: Array<T>, t: TFunction) => Array<T>;
@@ -0,0 +1,8 @@
1
+ import type { TFunction } from 'i18next';
2
+ /**
3
+ * Group titles are either namespace-qualified i18n keys
4
+ * ("macromolecules:library.noNaturalAnalogue") or literal codes ("A", "U").
5
+ * Only the former are translated; translating a literal would log a spurious
6
+ * missing-key warning.
7
+ */
8
+ export declare const resolveLocalizedTitle: (title: string | undefined, t: TFunction) => string | undefined;
@@ -88,6 +88,19 @@ export declare const BASE_RESOURCES: {
88
88
  phosphateOnLeft: string;
89
89
  phosphateOnRight: string;
90
90
  };
91
+ library: {
92
+ ambiguousGroup: {
93
+ bases: string;
94
+ dnaBases: string;
95
+ rnaBases: string;
96
+ sugars: string;
97
+ phosphates: string;
98
+ aminoAcids: string;
99
+ nucleotides: string;
100
+ chem: string;
101
+ };
102
+ noNaturalAnalogue: string;
103
+ };
91
104
  };
92
105
  macromoleculesDialogs: {
93
106
  monomerLibrary: {
@@ -196,6 +209,12 @@ export declare const BASE_RESOURCES: {
196
209
  openFromImage: string;
197
210
  orDragFileHere: string;
198
211
  imageRecognitionUnavailable: string;
212
+ formats: {
213
+ sequence: string;
214
+ peptide: string;
215
+ oneLetterCode: string;
216
+ threeLetterCode: string;
217
+ };
199
218
  };
200
219
  save: {
201
220
  title: string;
@@ -206,6 +225,11 @@ export declare const BASE_RESOURCES: {
206
225
  helmSmilesExportNotice: string;
207
226
  helmAliasExportNotice: string;
208
227
  sequenceTypeRecognitionError: string;
228
+ formats: {
229
+ sequence1Letter: string;
230
+ sequence3Letter: string;
231
+ svgDocument: string;
232
+ };
209
233
  };
210
234
  updateSequence: {
211
235
  title: string;
@@ -326,6 +350,19 @@ export declare const EXTRA_LOCALE_RESOURCES: {
326
350
  phosphateOnLeft: string;
327
351
  phosphateOnRight: string;
328
352
  };
353
+ library: {
354
+ ambiguousGroup: {
355
+ bases: string;
356
+ dnaBases: string;
357
+ rnaBases: string;
358
+ sugars: string;
359
+ phosphates: string;
360
+ aminoAcids: string;
361
+ nucleotides: string;
362
+ chem: string;
363
+ };
364
+ noNaturalAnalogue: string;
365
+ };
329
366
  };
330
367
  readonly macromoleculesDialogs: {
331
368
  monomerLibrary: {
@@ -434,6 +471,12 @@ export declare const EXTRA_LOCALE_RESOURCES: {
434
471
  openFromImage: string;
435
472
  orDragFileHere: string;
436
473
  imageRecognitionUnavailable: string;
474
+ formats: {
475
+ sequence: string;
476
+ peptide: string;
477
+ oneLetterCode: string;
478
+ threeLetterCode: string;
479
+ };
437
480
  };
438
481
  save: {
439
482
  title: string;
@@ -444,6 +487,11 @@ export declare const EXTRA_LOCALE_RESOURCES: {
444
487
  helmSmilesExportNotice: string;
445
488
  helmAliasExportNotice: string;
446
489
  sequenceTypeRecognitionError: string;
490
+ formats: {
491
+ sequence1Letter: string;
492
+ sequence3Letter: string;
493
+ svgDocument: string;
494
+ };
447
495
  };
448
496
  updateSequence: {
449
497
  title: string;
@@ -563,6 +611,19 @@ export declare const EXTRA_LOCALE_RESOURCES: {
563
611
  phosphateOnLeft: string;
564
612
  phosphateOnRight: string;
565
613
  };
614
+ library: {
615
+ ambiguousGroup: {
616
+ bases: string;
617
+ dnaBases: string;
618
+ rnaBases: string;
619
+ sugars: string;
620
+ phosphates: string;
621
+ aminoAcids: string;
622
+ nucleotides: string;
623
+ chem: string;
624
+ };
625
+ noNaturalAnalogue: string;
626
+ };
566
627
  };
567
628
  readonly macromoleculesDialogs: {
568
629
  monomerLibrary: {
@@ -671,6 +732,12 @@ export declare const EXTRA_LOCALE_RESOURCES: {
671
732
  openFromImage: string;
672
733
  orDragFileHere: string;
673
734
  imageRecognitionUnavailable: string;
735
+ formats: {
736
+ sequence: string;
737
+ peptide: string;
738
+ oneLetterCode: string;
739
+ threeLetterCode: string;
740
+ };
674
741
  };
675
742
  save: {
676
743
  title: string;
@@ -681,6 +748,11 @@ export declare const EXTRA_LOCALE_RESOURCES: {
681
748
  helmSmilesExportNotice: string;
682
749
  helmAliasExportNotice: string;
683
750
  sequenceTypeRecognitionError: string;
751
+ formats: {
752
+ sequence1Letter: string;
753
+ sequence3Letter: string;
754
+ svgDocument: string;
755
+ };
684
756
  };
685
757
  updateSequence: {
686
758
  title: string;