File tree Expand file tree Collapse file tree 2 files changed +15
-16
lines changed Expand file tree Collapse file tree 2 files changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ Changelog
33
44## master  
55
6+ -  Fixed: ` @_spi `  errors (#339  )
7+ 
68## [ 0.11.0]  
79
810-  Added: visionOS support (#327  )
Original file line number Diff line number Diff line change @@ -108,6 +108,17 @@ public protocol PlatformEntity: AnyObject {
108108    func  isDescendant( of other:  Base )  ->  Bool 
109109} 
110110
111+ extension  PlatformEntity  { 
112+     @_spi ( Internals)  
113+     public  var  ancestor :  Base ?   {  nil  } 
114+ 
115+     @_spi ( Internals)  
116+     public  var  descendants :  [ Base ]  {  [ ]  } 
117+ 
118+     @_spi ( Internals)  
119+     public  func  isDescendant( of other:  Base )  ->  Bool  {  false  } 
120+ } 
121+ 
111122extension  PlatformEntity  { 
112123    @_spi ( Internals)  
113124    public  var  ancestors :  some  Sequence < Base >  { 
@@ -196,24 +207,10 @@ extension PlatformViewController: PlatformEntity {
196207
197208#if canImport(UIKit) 
198209extension  UIPresentationController :  PlatformEntity  { 
199-     @_spi ( Internals)  
200-     public  var  ancestor :  UIPresentationController ?   {  nil  } 
201- 
202-     @_spi ( Internals)  
203-     public  var  descendants :  [ UIPresentationController ]  {  [ ]  } 
204- 
205-     @_spi ( Internals)  
206-     public  func  isDescendant( of other:  UIPresentationController )  ->  Bool  {  false  } 
210+     public  typealias  Base  =  UIPresentationController 
207211} 
208212#elseif canImport(AppKit) 
209213extension  NSWindow :  PlatformEntity  { 
210-     @_spi ( Internals)  
211-     public  var  ancestor :  NSWindow ?   {  nil  } 
212- 
213-     @_spi ( Internals)  
214-     public  var  descendants :  [ NSWindow ]  {  [ ]  } 
215- 
216-     @_spi ( Internals)  
217-     public  func  isDescendant( of other:  NSWindow )  ->  Bool  {  false  } 
214+     public  typealias  Base  =  NSWindow 
218215} 
219216#endif 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments