jbrowse-plugin-protein3d 0.0.2 → 0.0.4
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/dist/AddHighlightModel/GenomeMouseoverHighlight.js +3 -9
- package/dist/AddHighlightModel/GenomeMouseoverHighlight.js.map +1 -1
- package/dist/AddHighlightModel/ProteinToGenomeClickHighlight.js +4 -3
- package/dist/AddHighlightModel/ProteinToGenomeClickHighlight.js.map +1 -1
- package/dist/AddHighlightModel/ProteinToGenomeHoverHighlight.d.ts +1 -2
- package/dist/AddHighlightModel/ProteinToGenomeHoverHighlight.js +4 -3
- package/dist/AddHighlightModel/ProteinToGenomeHoverHighlight.js.map +1 -1
- package/dist/AddHighlightModel/util.js +1 -1
- package/dist/AddHighlightModel/util.js.map +1 -1
- package/dist/AlphaFoldConfidenceAdapter/AlphaFoldConfidenceAdapter.d.ts +16 -0
- package/dist/AlphaFoldConfidenceAdapter/AlphaFoldConfidenceAdapter.js +43 -0
- package/dist/AlphaFoldConfidenceAdapter/AlphaFoldConfidenceAdapter.js.map +1 -0
- package/dist/AlphaFoldConfidenceAdapter/configSchema.d.ts +13 -0
- package/dist/AlphaFoldConfidenceAdapter/configSchema.js +16 -0
- package/dist/AlphaFoldConfidenceAdapter/configSchema.js.map +1 -0
- package/dist/AlphaFoldConfidenceAdapter/index.d.ts +2 -0
- package/dist/AlphaFoldConfidenceAdapter/index.js +11 -0
- package/dist/AlphaFoldConfidenceAdapter/index.js.map +1 -0
- package/dist/AlphaMissensePathogenicityAdapter/AlphaMissensePathogenicityAdapter.d.ts +30 -0
- package/dist/AlphaMissensePathogenicityAdapter/AlphaMissensePathogenicityAdapter.js +78 -0
- package/dist/AlphaMissensePathogenicityAdapter/AlphaMissensePathogenicityAdapter.js.map +1 -0
- package/dist/AlphaMissensePathogenicityAdapter/configSchema.d.ts +13 -0
- package/dist/AlphaMissensePathogenicityAdapter/configSchema.js +16 -0
- package/dist/AlphaMissensePathogenicityAdapter/configSchema.js.map +1 -0
- package/dist/AlphaMissensePathogenicityAdapter/index.d.ts +2 -0
- package/dist/AlphaMissensePathogenicityAdapter/index.js +11 -0
- package/dist/AlphaMissensePathogenicityAdapter/index.js.map +1 -0
- package/dist/LaunchProteinView/components/AlphaFoldDBSearch.js +201 -34
- package/dist/LaunchProteinView/components/AlphaFoldDBSearch.js.map +1 -1
- package/dist/LaunchProteinView/components/AlphaFoldDBSearchStatus.d.ts +7 -4
- package/dist/LaunchProteinView/components/AlphaFoldDBSearchStatus.js +35 -14
- package/dist/LaunchProteinView/components/AlphaFoldDBSearchStatus.js.map +1 -1
- package/dist/LaunchProteinView/components/HelpButton.js +6 -2
- package/dist/LaunchProteinView/components/HelpButton.js.map +1 -1
- package/dist/LaunchProteinView/components/HelpDialog.js +13 -4
- package/dist/LaunchProteinView/components/HelpDialog.js.map +1 -1
- package/dist/LaunchProteinView/components/LaunchProteinViewDialog.js +9 -9
- package/dist/LaunchProteinView/components/LaunchProteinViewDialog.js.map +1 -1
- package/dist/LaunchProteinView/components/MSATable.d.ts +10 -0
- package/dist/LaunchProteinView/components/MSATable.js +55 -0
- package/dist/LaunchProteinView/components/MSATable.js.map +1 -0
- package/dist/LaunchProteinView/components/TranscriptSelector.d.ts +7 -3
- package/dist/LaunchProteinView/components/TranscriptSelector.js +25 -8
- package/dist/LaunchProteinView/components/TranscriptSelector.js.map +1 -1
- package/dist/LaunchProteinView/components/UserProvidedStructure.js +67 -47
- package/dist/LaunchProteinView/components/UserProvidedStructure.js.map +1 -1
- package/dist/LaunchProteinView/{calculateProteinSequence.js → components/calculateProteinSequence.js} +5 -3
- package/dist/LaunchProteinView/components/calculateProteinSequence.js.map +1 -0
- package/dist/LaunchProteinView/components/useIsoformProteinSequences.d.ts +14 -0
- package/dist/LaunchProteinView/{useProteinSequences.js → components/useIsoformProteinSequences.js} +11 -6
- package/dist/LaunchProteinView/components/useIsoformProteinSequences.js.map +1 -0
- package/dist/LaunchProteinView/components/useLocalStructureFileSequence.d.ts +7 -0
- package/dist/LaunchProteinView/components/useLocalStructureFileSequence.js +64 -0
- package/dist/LaunchProteinView/components/useLocalStructureFileSequence.js.map +1 -0
- package/dist/LaunchProteinView/{useMyGeneInfo.d.ts → components/useMyGeneInfoUniprotIdLookup.d.ts} +2 -2
- package/dist/LaunchProteinView/{useMyGeneInfo.js → components/useMyGeneInfoUniprotIdLookup.js} +15 -10
- package/dist/LaunchProteinView/components/useMyGeneInfoUniprotIdLookup.js.map +1 -0
- package/dist/LaunchProteinView/components/useRemoteStructureFileSequence.d.ts +7 -0
- package/dist/LaunchProteinView/components/useRemoteStructureFileSequence.js +59 -0
- package/dist/LaunchProteinView/components/useRemoteStructureFileSequence.js.map +1 -0
- package/dist/LaunchProteinView/{util.d.ts → components/util.d.ts} +0 -10
- package/dist/LaunchProteinView/{util.js → components/util.js} +4 -25
- package/dist/LaunchProteinView/components/util.js.map +1 -0
- package/dist/LaunchProteinView/index.js +6 -2
- package/dist/LaunchProteinView/index.js.map +1 -1
- package/dist/ProteinView/{loadStructureFromData.d.ts → addStructureFromData.d.ts} +2 -2
- package/dist/ProteinView/{loadStructureFromData.js → addStructureFromData.js} +3 -8
- package/dist/ProteinView/addStructureFromData.js.map +1 -0
- package/dist/ProteinView/{loadStructureFromURL.d.ts → addStructureFromURL.d.ts} +2 -2
- package/dist/ProteinView/{loadStructureFromURL.js → addStructureFromURL.js} +11 -9
- package/dist/ProteinView/addStructureFromURL.js.map +1 -0
- package/dist/ProteinView/clearSelection.js +1 -1
- package/dist/ProteinView/clearSelection.js.map +1 -1
- package/dist/ProteinView/components/ProteinAlignment.d.ts +2 -2
- package/dist/ProteinView/components/ProteinAlignment.js +37 -26
- package/dist/ProteinView/components/ProteinAlignment.js.map +1 -1
- package/dist/ProteinView/components/ProteinAlignmentHelpButton.d.ts +2 -2
- package/dist/ProteinView/components/ProteinAlignmentHelpButton.js +6 -4
- package/dist/ProteinView/components/ProteinAlignmentHelpButton.js.map +1 -1
- package/dist/ProteinView/components/ProteinAlignmentHelpDialog.js +6 -5
- package/dist/ProteinView/components/ProteinAlignmentHelpDialog.js.map +1 -1
- package/dist/ProteinView/components/ProteinView.js +18 -60
- package/dist/ProteinView/components/ProteinView.js.map +1 -1
- package/dist/ProteinView/components/{Header.js → ProteinViewHeader.js} +29 -12
- package/dist/ProteinView/components/ProteinViewHeader.js.map +1 -0
- package/dist/ProteinView/components/SplitString.d.ts +4 -4
- package/dist/ProteinView/components/SplitString.js +4 -4
- package/dist/ProteinView/components/SplitString.js.map +1 -1
- package/dist/ProteinView/genomeToProtein.d.ts +2 -2
- package/dist/ProteinView/genomeToProtein.js +4 -5
- package/dist/ProteinView/genomeToProtein.js.map +1 -1
- package/dist/ProteinView/highlightResidue.js +2 -2
- package/dist/ProteinView/highlightResidue.js.map +1 -1
- package/dist/ProteinView/launchRemotePairwiseAlignment.d.ts +2 -5
- package/dist/ProteinView/launchRemotePairwiseAlignment.js +7 -3
- package/dist/ProteinView/launchRemotePairwiseAlignment.js.map +1 -1
- package/dist/ProteinView/model.d.ts +496 -156
- package/dist/ProteinView/model.js +66 -225
- package/dist/ProteinView/model.js.map +1 -1
- package/dist/ProteinView/proteinToGenomeMapping.d.ts +6 -6
- package/dist/ProteinView/proteinToGenomeMapping.js +29 -28
- package/dist/ProteinView/proteinToGenomeMapping.js.map +1 -1
- package/dist/ProteinView/selectResidue.js +1 -1
- package/dist/ProteinView/selectResidue.js.map +1 -1
- package/dist/ProteinView/structureModel.d.ts +183 -0
- package/dist/ProteinView/structureModel.js +407 -0
- package/dist/ProteinView/structureModel.js.map +1 -0
- package/dist/ProteinView/useProteinView.d.ts +1 -4
- package/dist/ProteinView/useProteinView.js +3 -15
- package/dist/ProteinView/useProteinView.js.map +1 -1
- package/dist/ProteinView/util.d.ts +3 -3
- package/dist/ProteinView/util.js +8 -6
- package/dist/ProteinView/util.js.map +1 -1
- package/dist/UniProtVariationAdapter/UniProtVariationAdapter.d.ts +15 -0
- package/dist/UniProtVariationAdapter/UniProtVariationAdapter.js +55 -0
- package/dist/UniProtVariationAdapter/UniProtVariationAdapter.js.map +1 -0
- package/dist/UniProtVariationAdapter/configSchema.d.ts +17 -0
- package/dist/UniProtVariationAdapter/configSchema.js +20 -0
- package/dist/UniProtVariationAdapter/configSchema.js.map +1 -0
- package/dist/UniProtVariationAdapter/index.d.ts +2 -0
- package/dist/UniProtVariationAdapter/index.js +11 -0
- package/dist/UniProtVariationAdapter/index.js.map +1 -0
- package/dist/genomeToTranscriptMapping.d.ts +2 -2
- package/dist/genomeToTranscriptMapping.js +3 -3
- package/dist/genomeToTranscriptMapping.js.map +1 -1
- package/dist/index.js +6 -9
- package/dist/index.js.map +1 -1
- package/dist/jbrowse-plugin-protein3d.umd.production.min.js +1473 -1489
- package/dist/jbrowse-plugin-protein3d.umd.production.min.js.map +4 -4
- package/dist/mappings.d.ts +12 -10
- package/dist/mappings.js +7 -7
- package/dist/mappings.js.map +1 -1
- package/dist/mappings.test.js +7 -5
- package/dist/mappings.test.js.map +1 -1
- package/dist/test_data/gene.d.ts +577 -64
- package/dist/test_data/gene.js +1 -1
- package/dist/test_data/gene.js.map +1 -1
- package/package.json +17 -16
- package/src/AddHighlightModel/GenomeMouseoverHighlight.tsx +4 -17
- package/src/AddHighlightModel/ProteinToGenomeClickHighlight.tsx +17 -14
- package/src/AddHighlightModel/ProteinToGenomeHoverHighlight.tsx +18 -17
- package/src/AddHighlightModel/util.ts +1 -1
- package/src/AlphaFoldConfidenceAdapter/AlphaFoldConfidenceAdapter.ts +63 -0
- package/src/AlphaFoldConfidenceAdapter/configSchema.ts +21 -0
- package/src/AlphaFoldConfidenceAdapter/index.ts +19 -0
- package/src/AlphaMissensePathogenicityAdapter/AlphaMissensePathogenicityAdapter.ts +109 -0
- package/src/AlphaMissensePathogenicityAdapter/configSchema.ts +21 -0
- package/src/AlphaMissensePathogenicityAdapter/index.ts +19 -0
- package/src/LaunchProteinView/components/AlphaFoldDBSearch.tsx +266 -53
- package/src/LaunchProteinView/components/AlphaFoldDBSearchStatus.tsx +71 -29
- package/src/LaunchProteinView/components/HelpButton.tsx +10 -2
- package/src/LaunchProteinView/components/HelpDialog.tsx +41 -8
- package/src/LaunchProteinView/components/LaunchProteinViewDialog.tsx +10 -12
- package/src/LaunchProteinView/components/MSATable.tsx +98 -0
- package/src/LaunchProteinView/components/TranscriptSelector.tsx +39 -11
- package/src/LaunchProteinView/components/UserProvidedStructure.tsx +119 -68
- package/src/LaunchProteinView/{calculateProteinSequence.ts → components/calculateProteinSequence.ts} +6 -4
- package/src/LaunchProteinView/{useProteinSequences.ts → components/useIsoformProteinSequences.ts} +12 -7
- package/src/LaunchProteinView/components/useLocalStructureFileSequence.ts +72 -0
- package/src/LaunchProteinView/{useMyGeneInfo.ts → components/useMyGeneInfoUniprotIdLookup.ts} +16 -11
- package/src/LaunchProteinView/components/useRemoteStructureFileSequence.ts +59 -0
- package/src/LaunchProteinView/{util.ts → components/util.ts} +4 -36
- package/src/LaunchProteinView/index.ts +36 -26
- package/src/ProteinView/{loadStructureFromData.ts → addStructureFromData.ts} +2 -8
- package/src/ProteinView/{loadStructureFromURL.ts → addStructureFromURL.ts} +11 -11
- package/src/ProteinView/clearSelection.ts +1 -1
- package/src/ProteinView/components/ProteinAlignment.tsx +51 -35
- package/src/ProteinView/components/ProteinAlignmentHelpButton.tsx +4 -4
- package/src/ProteinView/components/ProteinAlignmentHelpDialog.tsx +15 -11
- package/src/ProteinView/components/ProteinView.tsx +22 -82
- package/src/ProteinView/components/{Header.tsx → ProteinViewHeader.tsx} +44 -21
- package/src/ProteinView/components/SplitString.tsx +9 -9
- package/src/ProteinView/genomeToProtein.ts +5 -9
- package/src/ProteinView/highlightResidue.ts +2 -2
- package/src/ProteinView/launchRemotePairwiseAlignment.ts +6 -3
- package/src/ProteinView/model.ts +80 -265
- package/src/ProteinView/proteinToGenomeMapping.ts +40 -38
- package/src/ProteinView/selectResidue.ts +1 -1
- package/src/ProteinView/structureModel.ts +512 -0
- package/src/ProteinView/useProteinView.ts +2 -19
- package/src/ProteinView/util.ts +20 -9
- package/src/UniProtVariationAdapter/UniProtVariationAdapter.ts +99 -0
- package/src/UniProtVariationAdapter/configSchema.ts +25 -0
- package/src/UniProtVariationAdapter/index.ts +17 -0
- package/src/__snapshots__/mappings.test.ts.snap +224 -224
- package/src/genomeToTranscriptMapping.ts +9 -9
- package/src/index.ts +7 -12
- package/src/mappings.test.ts +7 -5
- package/src/mappings.ts +25 -23
- package/src/test_data/gene.ts +3 -3
- package/dist/LaunchProteinView/calculateProteinSequence.js.map +0 -1
- package/dist/LaunchProteinView/components/PreLoadedStructureMapping.d.ts +0 -8
- package/dist/LaunchProteinView/components/PreLoadedStructureMapping.js +0 -72
- package/dist/LaunchProteinView/components/PreLoadedStructureMapping.js.map +0 -1
- package/dist/LaunchProteinView/components/useCheckAlphaFoldDBExistence.d.ts +0 -7
- package/dist/LaunchProteinView/components/useCheckAlphaFoldDBExistence.js +0 -26
- package/dist/LaunchProteinView/components/useCheckAlphaFoldDBExistence.js.map +0 -1
- package/dist/LaunchProteinView/useMyGeneInfo.js.map +0 -1
- package/dist/LaunchProteinView/useProteinSequences.d.ts +0 -10
- package/dist/LaunchProteinView/useProteinSequences.js.map +0 -1
- package/dist/LaunchProteinView/util.js.map +0 -1
- package/dist/ProteinModelSessionExtension.d.ts +0 -11
- package/dist/ProteinModelSessionExtension.js +0 -53
- package/dist/ProteinModelSessionExtension.js.map +0 -1
- package/dist/ProteinView/components/Header.js.map +0 -1
- package/dist/ProteinView/loadStructureFromData.js.map +0 -1
- package/dist/ProteinView/loadStructureFromURL.js.map +0 -1
- package/dist/ProteinView/useProteinViewClickBehavior.d.ts +0 -8
- package/dist/ProteinView/useProteinViewClickBehavior.js +0 -34
- package/dist/ProteinView/useProteinViewClickBehavior.js.map +0 -1
- package/dist/ProteinView/useProteinViewHoverBehavior.d.ts +0 -6
- package/dist/ProteinView/useProteinViewHoverBehavior.js +0 -31
- package/dist/ProteinView/useProteinViewHoverBehavior.js.map +0 -1
- package/src/LaunchProteinView/components/PreLoadedStructureMapping.tsx +0 -153
- package/src/LaunchProteinView/components/useCheckAlphaFoldDBExistence.ts +0 -31
- package/src/ProteinModelSessionExtension.ts +0 -71
- package/src/ProteinView/useProteinViewClickBehavior.ts +0 -48
- package/src/ProteinView/useProteinViewHoverBehavior.ts +0 -44
- /package/dist/LaunchProteinView/{calculateProteinSequence.d.ts → components/calculateProteinSequence.d.ts} +0 -0
- /package/dist/ProteinView/components/{Header.d.ts → ProteinViewHeader.d.ts} +0 -0
package/dist/mappings.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { Feature } from '@jbrowse/core/util';
|
|
2
|
-
export interface
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
seq: string;
|
|
6
|
-
}[];
|
|
2
|
+
export interface AlignmentRow {
|
|
3
|
+
id: string;
|
|
4
|
+
seq: string;
|
|
7
5
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export interface PairwiseAlignment {
|
|
7
|
+
consensus: string;
|
|
8
|
+
alns: readonly [AlignmentRow, AlignmentRow];
|
|
9
|
+
}
|
|
10
|
+
export declare function structureSeqVsTranscriptSeqMap(pairwiseAlignment: PairwiseAlignment): {
|
|
11
|
+
structureSeqToTranscriptSeqPosition: Record<string, number>;
|
|
12
|
+
transcriptSeqToStructureSeqPosition: Record<string, number>;
|
|
11
13
|
};
|
|
12
|
-
export declare function structurePositionToAlignmentMap(
|
|
13
|
-
export declare function transcriptPositionToAlignmentMap(
|
|
14
|
+
export declare function structurePositionToAlignmentMap(pairwiseAlignment: PairwiseAlignment): Record<string, number>;
|
|
15
|
+
export declare function transcriptPositionToAlignmentMap(pairwiseAlignment: PairwiseAlignment): Record<string, number>;
|
|
14
16
|
export declare function genomeToTranscriptSeqMapping(feature: Feature): {
|
|
15
17
|
g2p: Record<number, number | undefined>;
|
|
16
18
|
p2g: Record<number, number | undefined>;
|
package/dist/mappings.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { genomeToTranscriptSeqMapping as g2p } from 'g2p_mapper';
|
|
2
|
-
export function structureSeqVsTranscriptSeqMap(
|
|
3
|
-
const structureSeq =
|
|
4
|
-
const transcriptSeq =
|
|
2
|
+
export function structureSeqVsTranscriptSeqMap(pairwiseAlignment) {
|
|
3
|
+
const structureSeq = pairwiseAlignment.alns[1].seq;
|
|
4
|
+
const transcriptSeq = pairwiseAlignment.alns[0].seq;
|
|
5
5
|
if (structureSeq.length !== transcriptSeq.length) {
|
|
6
6
|
throw new Error('mismatched length');
|
|
7
7
|
}
|
|
@@ -37,8 +37,8 @@ export function structureSeqVsTranscriptSeqMap(alignment) {
|
|
|
37
37
|
transcriptSeqToStructureSeqPosition,
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
export function structurePositionToAlignmentMap(
|
|
41
|
-
const structureSeq =
|
|
40
|
+
export function structurePositionToAlignmentMap(pairwiseAlignment) {
|
|
41
|
+
const structureSeq = pairwiseAlignment.alns[1].seq;
|
|
42
42
|
const structurePositionToAlignment = {};
|
|
43
43
|
for (let i = 0, j = 0; i < structureSeq.length; i++) {
|
|
44
44
|
if (structureSeq[i] !== '-') {
|
|
@@ -48,8 +48,8 @@ export function structurePositionToAlignmentMap(alignment) {
|
|
|
48
48
|
}
|
|
49
49
|
return structurePositionToAlignment;
|
|
50
50
|
}
|
|
51
|
-
export function transcriptPositionToAlignmentMap(
|
|
52
|
-
const transcriptSeq =
|
|
51
|
+
export function transcriptPositionToAlignmentMap(pairwiseAlignment) {
|
|
52
|
+
const transcriptSeq = pairwiseAlignment.alns[0].seq;
|
|
53
53
|
const transcriptPositionToAlignment = {};
|
|
54
54
|
for (let i = 0, j = 0; i < transcriptSeq.length; i++) {
|
|
55
55
|
if (transcriptSeq[i] !== '-') {
|
package/dist/mappings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mappings.js","sourceRoot":"","s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,CAAC;IAED,OAAO,6BAA6B,CAAA;AACtC,CAAC;AAED,yCAAyC;AACzC,MAAM,UAAU,4BAA4B,CAAC,OAAgB;IAC3D,mBAAmB;IACnB,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;AAC9B,CAAC"}
|
package/dist/mappings.test.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import { expect, test } from 'vitest';
|
|
1
2
|
import { genomeToTranscriptSeqMapping, structureSeqVsTranscriptSeqMap, } from './mappings';
|
|
2
3
|
import { SimpleFeature } from '@jbrowse/core/util';
|
|
3
|
-
import { feature,
|
|
4
|
+
import { feature, pairwiseAlignment } from './test_data/gene';
|
|
4
5
|
test('test', () => {
|
|
5
|
-
const ret = structureSeqVsTranscriptSeqMap(
|
|
6
|
+
const ret = structureSeqVsTranscriptSeqMap(pairwiseAlignment);
|
|
6
7
|
expect(ret).toMatchSnapshot();
|
|
7
8
|
});
|
|
8
9
|
test('mapping', () => {
|
|
10
|
+
// @ts-expect-error
|
|
9
11
|
const res = genomeToTranscriptSeqMapping(new SimpleFeature(feature));
|
|
10
12
|
const { p2g } = res;
|
|
11
|
-
const aln = structureSeqVsTranscriptSeqMap(
|
|
13
|
+
const aln = structureSeqVsTranscriptSeqMap(pairwiseAlignment);
|
|
12
14
|
// expected position in sequence
|
|
13
|
-
const s2 =
|
|
15
|
+
const s2 = pairwiseAlignment.alns[1].seq;
|
|
14
16
|
expect(s2[392]).toBe('M');
|
|
15
17
|
expect(s2[393]).toBe('K');
|
|
16
18
|
expect(s2[394]).toBe('A');
|
|
@@ -18,7 +20,7 @@ test('mapping', () => {
|
|
|
18
20
|
// maps the 392 position in the "pdb version of the protein" to the 0th
|
|
19
21
|
// position in the genome version of the protein, and then maps that back to
|
|
20
22
|
// the genome
|
|
21
|
-
const p0 = aln.
|
|
23
|
+
const p0 = aln.transcriptSeqToStructureSeqPosition[392];
|
|
22
24
|
const g0 = p2g[p0];
|
|
23
25
|
expect(p0).toBe(0);
|
|
24
26
|
expect(g0).toBe(51_296_155);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mappings.test.js","sourceRoot":"","sources":["../src/mappings.test.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"mappings.test.js","sourceRoot":"","sources":["../src/mappings.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EACL,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAE7D,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;IAChB,MAAM,GAAG,GAAG,8BAA8B,CAAC,iBAAiB,CAAC,CAAA;IAC7D,MAAM,CAAC,GAAG,CAAC,CAAC,eAAe,EAAE,CAAA;AAC/B,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE;IACnB,mBAAmB;IACnB,MAAM,GAAG,GAAG,4BAA4B,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC,CAAA;IACpE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA;IACnB,MAAM,GAAG,GAAG,8BAA8B,CAAC,iBAAiB,CAAC,CAAA;IAE7D,gCAAgC;IAChC,MAAM,EAAE,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;IACxC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACzB,M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