11import React , { useEffect , useRef , useImperativeHandle , forwardRef } from 'react' ;
22import clsx from 'clsx' ;
33import { Skeleton } from './Skeleton' ;
4- import type { RepresentationType , ColoringType , ChainInfo , Measurement , PDBMetadata , CustomColorRule , CustomStyleRule , CustomTransparencyRule , ColorPalette , ResidueInfo , StructureInfo , MeasurementTextColor , AtomInfo , SuperposedStructure , Annotation } from '../types' ;
4+ import type { RepresentationType , ColoringType , ChainInfo , Measurement , CustomColorRule , CustomStyleRule , CustomTransparencyRule , ColorPalette , ResidueInfo , StructureInfo , MeasurementTextColor , AtomInfo , SuperposedStructure , Annotation } from '../types' ;
55import { type DataSource , getStructureUrl } from '../utils/pdbUtils' ;
66
77
@@ -141,9 +141,7 @@ export const ProteinViewer = forwardRef<ProteinViewerRef, ProteinViewerProps>(({
141141 customColors = [ ] ,
142142 chainStyles = { } ,
143143 customStyles = [ ] ,
144- setCustomStyles,
145144 customTransparency = [ ] ,
146- setCustomTransparency,
147145 smoothSheetEnabled = false ,
148146 overlays,
149147
@@ -2617,15 +2615,15 @@ export const ProteinViewer = forwardRef<ProteinViewerRef, ProteinViewerProps>(({
26172615
26182616 // Add the default representation (for non-overridden atoms)
26192617 if ( defaultSelection !== "not ()" && defaultSelection !== "none" ) {
2620- component . addRepresentation ( repType , { ...globalParams , sele : defaultSelection } ) ;
2618+ component . addRepresentation ( repType as any , { ...globalParams , sele : defaultSelection } ) ;
26212619 }
26222620
26232621 // --- 5. RENDER CHAIN-SPECIFIC STYLES ---
26242622 if ( chainStyles ) {
26252623 Object . entries ( chainStyles ) . forEach ( ( [ chain , style ] ) => {
26262624 if ( ! style ) return ;
26272625
2628- let actualStyle = style ;
2626+ let actualStyle = style as any ;
26292627 if ( actualStyle === 'backbone' ) actualStyle = 'trace' ;
26302628 console . log ( `[ProteinViewer] Chain ${ chain } style: ${ style } -> ${ actualStyle } ` ) ;
26312629
@@ -2646,7 +2644,7 @@ export const ProteinViewer = forwardRef<ProteinViewerRef, ProteinViewerProps>(({
26462644 // No overrides - use global defaults
26472645 }
26482646
2649- component . addRepresentation ( actualStyle , chainParams ) ;
2647+ component . addRepresentation ( actualStyle as any , chainParams ) ;
26502648 } ) ;
26512649 }
26522650
@@ -2657,7 +2655,7 @@ export const ProteinViewer = forwardRef<ProteinViewerRef, ProteinViewerProps>(({
26572655 const resPart = rule . residues ? ( rule . chain === 'All' ? ` and ${ rule . residues } ` : ` and ${ rule . residues } ` ) : '' ;
26582656 const selection = `${ chainPart } ${ resPart } ` ; // e.g. ":A and 50-60"
26592657
2660- let actualStyle = rule . style ;
2658+ let actualStyle = rule . style as any ;
26612659 if ( actualStyle === 'backbone' ) actualStyle = 'trace' ;
26622660
26632661 const ruleParams : any = {
0 commit comments